billboard.js 4.0.3 → 4.1.0-next.2
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/README.md +82 -7
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +1848 -494
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +19 -24
- package/dist/billboard.pkgd.js +1844 -679
- package/dist/billboard.pkgd.min.js +24 -29
- package/dist/billboard.react.js +205 -0
- package/dist/billboard.react.min.js +9 -0
- package/dist/billboard.worker.js +10 -0
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +5 -3
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +6 -3
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +6 -3
- package/dist/plugin/billboardjs-plugin-stanford.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-tableview.js +59 -27
- package/dist/plugin/billboardjs-plugin-tableview.min.js +5 -5
- package/dist/plugin/billboardjs-plugin-textoverlap.js +75 -55
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +5 -3
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +6 -3
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +3 -3
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +6 -3
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +59 -27
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +11 -11
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +68 -3557
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +8 -8
- package/dist/theme/dark.css +1 -1
- package/dist/theme/dark.min.css +1 -1
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +1 -1
- package/dist/theme/modern.css +1 -1
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/Chart/Chart.js +134 -152
- package/dist-esm/Chart/api/axis.js +217 -237
- package/dist-esm/Chart/api/category.js +54 -54
- package/dist-esm/Chart/api/chart.js +172 -215
- package/dist-esm/Chart/api/color.js +21 -21
- package/dist-esm/Chart/api/data.js +172 -173
- package/dist-esm/Chart/api/export.js +242 -262
- package/dist-esm/Chart/api/flow.js +198 -254
- package/dist-esm/Chart/api/focus.js +136 -143
- package/dist-esm/Chart/api/grid.js +191 -190
- package/dist-esm/Chart/api/group.js +31 -34
- package/dist-esm/Chart/api/legend.js +54 -63
- package/dist-esm/Chart/api/load.js +237 -257
- package/dist-esm/Chart/api/regions.js +148 -168
- package/dist-esm/Chart/api/selection.js +181 -139
- package/dist-esm/Chart/api/show.js +133 -147
- package/dist-esm/Chart/api/stubs.js +43 -42
- package/dist-esm/Chart/api/subchart.js +155 -172
- package/dist-esm/Chart/api/tooltip.js +132 -177
- package/dist-esm/Chart/api/x.js +67 -71
- package/dist-esm/Chart/api/zoom.js +183 -220
- package/dist-esm/ChartInternal/Axis/Axis.js +1059 -1266
- package/dist-esm/ChartInternal/Axis/AxisRenderer.js +408 -540
- package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +113 -149
- package/dist-esm/ChartInternal/ChartInternal.js +573 -749
- package/dist-esm/ChartInternal/data/convert.helper.js +133 -159
- package/dist-esm/ChartInternal/data/convert.js +200 -229
- package/dist-esm/ChartInternal/data/data.js +967 -1153
- package/dist-esm/ChartInternal/data/load.js +145 -197
- package/dist-esm/ChartInternal/interactions/drag.js +86 -122
- package/dist-esm/ChartInternal/interactions/eventrect.js +455 -621
- package/dist-esm/ChartInternal/interactions/flow.js +151 -215
- package/dist-esm/ChartInternal/interactions/interaction.js +214 -252
- package/dist-esm/ChartInternal/interactions/subchart.js +425 -300
- package/dist-esm/ChartInternal/interactions/zoom.js +321 -440
- package/dist-esm/ChartInternal/internals/category.js +18 -18
- package/dist-esm/ChartInternal/internals/class.js +89 -99
- package/dist-esm/ChartInternal/internals/clip.js +88 -119
- package/dist-esm/ChartInternal/internals/color.js +233 -288
- package/dist-esm/ChartInternal/internals/domain.js +452 -588
- package/dist-esm/ChartInternal/internals/format.js +64 -77
- package/dist-esm/ChartInternal/internals/grid.js +333 -457
- package/dist-esm/ChartInternal/internals/legend.js +675 -927
- package/dist-esm/ChartInternal/internals/redraw.js +200 -289
- package/dist-esm/ChartInternal/internals/region.js +106 -159
- package/dist-esm/ChartInternal/internals/scale.js +186 -215
- package/dist-esm/ChartInternal/internals/selection.js +132 -159
- package/dist-esm/ChartInternal/internals/size.axis.js +92 -139
- package/dist-esm/ChartInternal/internals/size.js +286 -394
- package/dist-esm/ChartInternal/internals/style.js +39 -41
- package/dist-esm/ChartInternal/internals/subchart.util.js +49 -0
- package/dist-esm/ChartInternal/internals/text.arc.js +155 -219
- package/dist-esm/ChartInternal/internals/text.js +368 -528
- package/dist-esm/ChartInternal/internals/text.util.js +179 -239
- package/dist-esm/ChartInternal/internals/title.js +96 -121
- package/dist-esm/ChartInternal/internals/tooltip.js +450 -586
- package/dist-esm/ChartInternal/internals/transform.js +79 -97
- package/dist-esm/ChartInternal/internals/type.js +285 -236
- package/dist-esm/ChartInternal/shape/arc.js +825 -1112
- package/dist-esm/ChartInternal/shape/area.js +73 -94
- package/dist-esm/ChartInternal/shape/bar.js +227 -288
- package/dist-esm/ChartInternal/shape/bubble.js +9 -8
- package/dist-esm/ChartInternal/shape/candlestick.js +110 -138
- package/dist-esm/ChartInternal/shape/core/barRadius.js +197 -133
- package/dist-esm/ChartInternal/shape/core/bubble.js +64 -73
- package/dist-esm/ChartInternal/shape/core/candlestick.js +93 -86
- package/dist-esm/ChartInternal/shape/core/dataRegion.js +68 -75
- package/dist-esm/ChartInternal/shape/core/geometry.js +112 -112
- package/dist-esm/ChartInternal/shape/core/path.js +142 -115
- package/dist-esm/ChartInternal/shape/core/point.js +105 -125
- package/dist-esm/ChartInternal/shape/core/treemap.js +83 -88
- package/dist-esm/ChartInternal/shape/funnel.js +310 -338
- package/dist-esm/ChartInternal/shape/gauge.js +71 -103
- package/dist-esm/ChartInternal/shape/line.js +208 -278
- package/dist-esm/ChartInternal/shape/point.js +310 -425
- package/dist-esm/ChartInternal/shape/polar.js +84 -109
- package/dist-esm/ChartInternal/shape/radar.js +228 -318
- package/dist-esm/ChartInternal/shape/shape.js +782 -843
- package/dist-esm/ChartInternal/shape/treemap.js +152 -190
- package/dist-esm/canvas/CanvasAxisRenderer.js +1180 -1328
- package/dist-esm/canvas/CanvasEngine.js +148 -166
- package/dist-esm/canvas/CanvasPainter.js +395 -411
- package/dist-esm/canvas/CanvasRenderer.js +1584 -1834
- package/dist-esm/canvas/CanvasTheme.js +899 -802
- package/dist-esm/canvas/HitDetector.js +394 -463
- package/dist-esm/canvas/axisTicks.js +672 -786
- package/dist-esm/canvas/classes.js +19 -17
- package/dist-esm/canvas/color.js +40 -59
- package/dist-esm/canvas/geometry.js +38 -38
- package/dist-esm/canvas/labels.js +318 -371
- package/dist-esm/canvas/pointPattern.js +578 -580
- package/dist-esm/canvas/util.js +242 -262
- package/dist-esm/config/Options/Options.js +29 -32
- package/dist-esm/config/Options/axis/axis.js +101 -101
- package/dist-esm/config/Options/axis/x.js +759 -755
- package/dist-esm/config/Options/axis/y.js +525 -522
- package/dist-esm/config/Options/axis/y2.js +501 -485
- package/dist-esm/config/Options/common/boost.js +93 -32
- package/dist-esm/config/Options/common/color.js +88 -87
- package/dist-esm/config/Options/common/grid.js +74 -73
- package/dist-esm/config/Options/common/legend.js +180 -179
- package/dist-esm/config/Options/common/main.js +474 -473
- package/dist-esm/config/Options/common/point.js +160 -159
- package/dist-esm/config/Options/common/title.js +47 -46
- package/dist-esm/config/Options/common/tooltip.js +253 -252
- package/dist-esm/config/Options/data/axis.js +173 -172
- package/dist-esm/config/Options/data/data.js +958 -957
- package/dist-esm/config/Options/data/selection.js +131 -130
- package/dist-esm/config/Options/interaction/interaction.js +53 -52
- package/dist-esm/config/Options/interaction/subchart.js +164 -73
- package/dist-esm/config/Options/interaction/zoom.js +86 -85
- package/dist-esm/config/Options/shape/arc.js +150 -149
- package/dist-esm/config/Options/shape/area.js +69 -68
- package/dist-esm/config/Options/shape/bar.js +147 -146
- package/dist-esm/config/Options/shape/bubble.js +35 -34
- package/dist-esm/config/Options/shape/candlestick.js +61 -60
- package/dist-esm/config/Options/shape/donut.js +181 -180
- package/dist-esm/config/Options/shape/funnel.js +49 -48
- package/dist-esm/config/Options/shape/gauge.js +237 -236
- package/dist-esm/config/Options/shape/line.js +58 -57
- package/dist-esm/config/Options/shape/pie.js +185 -184
- package/dist-esm/config/Options/shape/polar.js +167 -166
- package/dist-esm/config/Options/shape/radar.js +76 -75
- package/dist-esm/config/Options/shape/scatter.js +36 -36
- package/dist-esm/config/Options/shape/spline.js +46 -46
- package/dist-esm/config/Options/shape/treemap.js +80 -79
- package/dist-esm/config/Store/Element.js +64 -62
- package/dist-esm/config/Store/State.js +189 -200
- package/dist-esm/config/Store/Store.js +25 -26
- package/dist-esm/config/classes.js +157 -155
- package/dist-esm/config/config.js +26 -35
- package/dist-esm/config/const.js +120 -128
- package/dist-esm/config/resolver/axis.core.js +25 -25
- package/dist-esm/config/resolver/axis.js +26 -27
- package/dist-esm/config/resolver/canvas.js +2071 -2472
- package/dist-esm/config/resolver/canvasShape.js +201 -177
- package/dist-esm/config/resolver/category.js +26 -27
- package/dist-esm/config/resolver/export.js +24 -26
- package/dist-esm/config/resolver/flow.js +29 -31
- package/dist-esm/config/resolver/grid.js +34 -35
- package/dist-esm/config/resolver/interaction/selection.js +17 -17
- package/dist-esm/config/resolver/interaction/subchart.js +17 -17
- package/dist-esm/config/resolver/interaction/zoom.js +17 -17
- package/dist-esm/config/resolver/regions.js +30 -31
- package/dist-esm/config/resolver/shape/arc.helpers.js +19 -19
- package/dist-esm/config/resolver/shape/area.js +17 -17
- package/dist-esm/config/resolver/shape/axis.helpers.js +28 -25
- package/dist-esm/config/resolver/shape/bar.js +13 -13
- package/dist-esm/config/resolver/shape/bubble.js +18 -14
- package/dist-esm/config/resolver/shape/candlestick.js +13 -13
- package/dist-esm/config/resolver/shape/donut.js +11 -11
- package/dist-esm/config/resolver/shape/funnel.js +11 -11
- package/dist-esm/config/resolver/shape/gauge.js +12 -12
- package/dist-esm/config/resolver/shape/line.js +10 -10
- package/dist-esm/config/resolver/shape/pie.js +11 -11
- package/dist-esm/config/resolver/shape/polar.js +12 -12
- package/dist-esm/config/resolver/shape/radar.js +22 -14
- package/dist-esm/config/resolver/shape/scatter.js +13 -13
- package/dist-esm/config/resolver/shape/treemap.js +11 -11
- package/dist-esm/core.js +208 -211
- package/dist-esm/index.canvas.js +14 -13
- package/dist-esm/index.esm.js +25 -24
- package/dist-esm/module/Cache.js +117 -129
- package/dist-esm/module/browser.js +30 -35
- package/dist-esm/module/dsv.js +107 -127
- package/dist-esm/module/error.js +45 -52
- package/dist-esm/module/generator.js +75 -83
- package/dist-esm/module/sanitize.js +302 -399
- package/dist-esm/module/util/brush.js +27 -38
- package/dist-esm/module/util/dom.js +288 -348
- package/dist-esm/module/util/object.js +277 -341
- package/dist-esm/module/util/type-checks.js +21 -25
- package/dist-esm/module/worker.js +312 -130
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +185 -198
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +442 -450
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +813 -950
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +708 -788
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +344 -301
- package/dist-esm/react/index.js +157 -0
- package/package.json +28 -8
- package/src/Chart/api/selection.ts +130 -5
- package/src/ChartInternal/Axis/Axis.ts +164 -65
- package/src/ChartInternal/Axis/AxisRenderer.ts +41 -8
- package/src/ChartInternal/Axis/AxisRendererHelper.ts +1 -1
- package/src/ChartInternal/ChartInternal.ts +1 -1
- package/src/ChartInternal/data/convert.ts +54 -4
- package/src/ChartInternal/data/data.ts +4 -1
- package/src/ChartInternal/interactions/eventrect.ts +8 -2
- package/src/ChartInternal/interactions/subchart.ts +437 -66
- package/src/ChartInternal/internals/color.ts +2 -2
- package/src/ChartInternal/internals/domain.ts +15 -3
- package/src/ChartInternal/internals/grid.ts +21 -1
- package/src/ChartInternal/internals/scale.ts +9 -2
- package/src/ChartInternal/internals/selection.ts +1 -1
- package/src/ChartInternal/internals/subchart.util.ts +55 -0
- package/src/ChartInternal/internals/text.arc.ts +3 -1
- package/src/ChartInternal/internals/text.ts +18 -5
- package/src/ChartInternal/internals/transform.ts +8 -2
- package/src/ChartInternal/internals/type.ts +105 -1
- package/src/ChartInternal/shape/IShape.ts +6 -3
- package/src/ChartInternal/shape/bar.ts +62 -31
- package/src/ChartInternal/shape/core/barRadius.ts +129 -0
- package/src/ChartInternal/shape/core/candlestick.ts +1 -1
- package/src/ChartInternal/shape/core/path.ts +76 -9
- package/src/ChartInternal/shape/funnel.ts +2 -3
- package/src/ChartInternal/shape/point.ts +2 -2
- package/src/ChartInternal/shape/shape.ts +149 -17
- package/src/Plugin/stanford/index.ts +0 -4
- package/src/Plugin/tableview/index.ts +85 -3
- package/src/Plugin/textoverlap/index.ts +9 -15
- package/src/canvas/CanvasAxisRenderer.ts +184 -36
- package/src/canvas/CanvasRenderer.ts +247 -160
- package/src/canvas/CanvasTheme.ts +212 -0
- package/src/canvas/axisTicks.ts +122 -40
- package/src/config/Options/axis/y2.ts +13 -0
- package/src/config/Options/common/boost.ts +64 -4
- package/src/config/Options/common/color.ts +2 -2
- package/src/config/Options/interaction/subchart.ts +98 -1
- package/src/config/Options/shape/gauge.ts +1 -1
- package/src/config/Options/shape/treemap.ts +2 -2
- package/src/config/Store/Element.ts +3 -1
- package/src/config/Store/State.ts +1 -0
- package/src/config/classes.ts +1 -0
- package/src/config/resolver/canvas.ts +92 -10
- package/src/module/util/type-checks.ts +3 -1
- package/src/module/voronoi.ts +119 -0
- package/src/module/worker.entry.ts +61 -0
- package/src/module/worker.ts +346 -63
- package/src/react/index.ts +193 -0
- package/types/options.d.ts +206 -3
- package/types/react/index.d.ts +27 -0
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 4.0.
|
|
8
|
+
* @version 4.1.0-next.2
|
|
9
9
|
*
|
|
10
10
|
* All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
|
|
11
11
|
* - @types/d3-selection ^3.0.11
|
|
@@ -21,46 +21,41 @@
|
|
|
21
21
|
* - d3-time-format ^4.1.0
|
|
22
22
|
* - d3-transition ^3.0.1
|
|
23
23
|
* - d3-zoom ^3.0.0
|
|
24
|
-
*/(function(vo,qn){if(typeof exports=="object"&&typeof module=="object")module.exports=qn();else if(typeof define=="function"&&define.amd)define([],qn);else{var po=qn();for(var T in po)(typeof exports=="object"?exports:vo)[T]=po[T]}})(this,function(){return(function(){"use strict";var pu=[(function(T,w,a){a(1),a(100),a(101),a(102),a(103),a(104),a(105),a(106),a(107),a(108),a(109),a(110),a(111),a(112),a(113),a(114),a(115),a(116),a(129),a(130),a(132),a(142),a(143),a(144),a(146),a(150),a(153),a(155),a(157),a(158),a(159),a(160),a(162),a(163),a(165),a(166),a(168),a(172),a(173),a(174),a(175),a(180),a(181),a(183),a(184),a(185),a(186),a(190),a(191),a(192),a(193),a(194),a(199),a(201),a(202),a(203),a(206),a(207),a(208),a(209),a(210),a(211),a(222),a(224),a(225),a(227),a(228),a(231),a(234),a(240),a(241),a(242),a(243),a(244),a(245),a(249),a(250),a(252),a(253),a(255),a(256),a(258),a(259),a(260),a(261),a(262),a(265),a(266),a(272),a(273),a(274),a(275),a(277),a(278),a(279),a(280),a(281),a(282),a(283),a(284),a(285),a(286),a(94),a(288),a(289),a(296),a(298),a(299),a(300),a(302),a(303),a(304),a(305),a(306),a(308),a(309),a(310),a(311),a(312),a(313),a(315),a(316),a(317),a(318),a(319),a(320),a(321),a(322),a(323),a(327),a(328),a(330),a(332),a(333),a(334),a(335),a(336),a(338),a(340),a(341),a(342),a(343),a(345),a(346),a(348),a(349),a(350),a(351),a(353),a(354),a(355),a(356),a(357),a(358),a(359),a(360),a(361),a(363),a(364),a(365),a(366),a(367),a(368),a(369),a(370),a(371),a(372),a(373),a(375),a(376),a(377),a(378),a(402),a(403),a(404),a(405),a(406),a(407),a(414),a(415),a(416),a(417),a(418),a(419),a(420),a(422),a(423),a(424),a(425),a(426),a(427),a(428),a(429),a(430),a(431),a(439),a(441),a(442),a(444),a(445),a(446),a(447),a(448),a(450),a(460),a(462),a(464),a(466),a(468),a(471),a(473),a(474),a(476),a(479),a(480),a(481),a(482),a(483),a(487),a(488),a(490),a(491),a(492),a(493),a(495),a(496),a(497),a(498),a(499),a(500),a(501),a(503),a(506),a(509),a(512),a(513),a(514),a(515),a(516),a(517),a(518),a(519),a(520),a(521),a(522),a(523),a(524),a(532),a(533),a(534),a(535),a(536),a(537),a(538),a(539),a(540),a(541),a(542),a(543),a(544),a(546),a(547),a(548),a(549),a(550),a(551),a(552),a(553),a(554),a(555),a(556),a(557),a(558),a(559),a(560),a(561),a(562),a(563),a(564),a(565),a(566),a(567),a(568),a(569),a(570),a(571),a(572),a(577),a(579),a(581),a(582),a(583),a(584),a(585),a(588),a(590),a(593),a(595),a(596),a(597),a(600),a(601),a(603),a(604),a(605),a(609),a(610),a(611),a(612),a(615),a(620),a(621),a(622),a(623),a(624),a(625),a(626),a(80)}),(function(T,w,a){a(2),a(91),a(93),a(94),a(99)}),(function(T,w,a){var g=a(3),v=a(4),p=a(8),x=a(14),y=a(36),b=a(6),S=a(26),E=a(7),R=a(38),O=a(24),M=a(46),D=a(12),L=a(18),$=a(68),F=a(11),k=a(71),G=a(73),U=a(57),X=a(75),j=a(66),H=a(5),Y=a(44),Z=a(72),Q=a(10),K=a(47),tt=a(77),nt=a(34),rt=a(53),it=a(54),st=a(40),ct=a(33),ht=a(78),gt=a(79),yt=a(81),Ct=a(82),Tt=a(51),Ft=a(83).forEach,Lt=rt("hidden"),Pt="Symbol",pt="prototype",mt=Tt.set,Ot=Tt.getterFor(Pt),Bt=Object[pt],Qt=v.Symbol,wt=Qt&&Qt[pt],Wt=v.RangeError,ae=v.TypeError,pe=v.QObject,oe=H.f,de=Y.f,Re=X.f,Pe=Q.f,Ee=x([].push),he=nt("symbols"),ye=nt("op-symbols"),Ge=nt("wks"),Vt=!pe||!pe[pt]||!pe[pt].findChild,ne=function(Xt,Mt,$t){var qt=oe(Bt,Mt);return qt&&delete Bt[Mt],de(Xt,Mt,$t),qt&&Xt!==Bt&&de(Bt,Mt,qt),Xt},re=b&&E(function(){return k(de({},"a",{get:function(){return de(this,"a",{value:7}).a}})).a!==7})?ne:de,en=function(Xt,Mt){var $t=he[Xt]=k(wt);return mt($t,{type:Pt,tag:Xt,description:Mt}),b||($t.description=Mt),$t},Ht=function(Mt,$t,qt){Mt===Bt&&Ht(ye,$t,qt),M(Mt);var Nt=L($t);return M(qt),R(he,Nt)?(("enumerable"in qt?!qt.enumerable:!R(Mt,Nt)||R(Mt,Lt)&&Mt[Lt][Nt])?(R(Mt,Lt)||de(Mt,Lt,F(1,k(null))),Mt[Lt][Nt]=!0):(R(Mt,Lt)&&Mt[Lt][Nt]&&(Mt[Lt][Nt]=!1),qt=k(qt,{enumerable:F(0,!1)})),re(Mt,Nt,qt)):de(Mt,Nt,qt)},ee=function(Mt,$t){M(Mt);var qt=D($t),Nt=G(qt).concat(It(qt));return Ft(Nt,function(be){(!b||p(se,qt,be))&&Ht(Mt,be,qt[be])}),Mt},ve=function(Mt,$t){return $t===void 0?k(Mt):ee(k(Mt),$t)},se=function(Mt){var $t=L(Mt),qt=p(Pe,this,$t);return this===Bt&&R(he,$t)&&!R(ye,$t)?!1:qt||!R(this,$t)||!R(he,$t)||R(this,Lt)&&this[Lt][$t]?qt:!0},Oe=function(Mt,$t){var qt=D(Mt),Nt=L($t);if(!(qt===Bt&&R(he,Nt)&&!R(ye,Nt))){var be=oe(qt,Nt);return be&&R(he,Nt)&&!(R(qt,Lt)&&qt[Lt][Nt])&&(be.enumerable=!0),be}},rn=function(Mt){var $t=Re(D(Mt)),qt=[];return Ft($t,function(Nt){!R(he,Nt)&&!R(it,Nt)&&Ee(qt,Nt)}),qt},It=function(Xt){var Mt=Xt===Bt,$t=Re(Mt?ye:D(Xt)),qt=[];return Ft($t,function(Nt){R(he,Nt)&&(!Mt||R(Bt,Nt))&&Ee(qt,he[Nt])}),qt};S||(Qt=function(){if(O(wt,this))throw new ae("Symbol is not a constructor");var Mt=!arguments.length||arguments[0]===void 0?void 0:$(arguments[0]),$t=st(Mt),qt=function(Nt){var be=this===void 0?v:this;be===Bt&&p(qt,ye,Nt),R(be,Lt)&&R(be[Lt],$t)&&(be[Lt][$t]=!1);var Ve=F(1,Nt);try{re(be,$t,Ve)}catch(Gt){if(!(Gt instanceof Wt))throw Gt;ne(be,$t,Ve)}};return b&&Vt&&re(Bt,$t,{configurable:!0,set:qt}),en($t,Mt)},wt=Qt[pt],K(wt,"toString",function(){return Ot(this).tag}),K(Qt,"withoutSetter",function(Xt){return en(st(Xt),Xt)}),Q.f=se,Y.f=Ht,Z.f=ee,H.f=Oe,U.f=X.f=rn,j.f=It,ht.f=function(Xt){return en(ct(Xt),Xt)},b&&(tt(wt,"description",{configurable:!0,get:function(){return Ot(this).description}}),y||K(Bt,"propertyIsEnumerable",se,{unsafe:!0}))),g({global:!0,constructor:!0,wrap:!0,forced:!S,sham:!S},{Symbol:Qt}),Ft(G(Ge),function(Xt){gt(Xt)}),g({target:Pt,stat:!0,forced:!S},{useSetter:function(){Vt=!0},useSimple:function(){Vt=!1}}),g({target:"Object",stat:!0,forced:!S,sham:!b},{create:ve,defineProperty:Ht,defineProperties:ee,getOwnPropertyDescriptor:Oe}),g({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:rn}),yt(),Ct(Qt,Pt),it[Lt]=!0}),(function(T,w,a){var g=a(4),v=a(5).f,p=a(43),x=a(47),y=a(37),b=a(55),S=a(67);T.exports=function(E,R){var O=E.target,M=E.global,D=E.stat,L,$,F,k,G,U;if(M?$=g:D?$=g[O]||y(O,{}):$=g[O]&&g[O].prototype,$)for(F in R){if(G=R[F],E.dontCallGetSet?(U=v($,F),k=U&&U.value):k=$[F],L=S(M?F:O+(D?".":"#")+F,E.forced),!L&&k!==void 0){if(typeof G==typeof k)continue;b(G,k)}(E.sham||k&&k.sham)&&p(G,"sham",!0),x($,F,G,E)}}}),(function(T){var w=function(a){return a&&a.Math===Math&&a};T.exports=w(typeof globalThis=="object"&&globalThis)||w(typeof window=="object"&&window)||w(typeof self=="object"&&self)||w(typeof global=="object"&&global)||w(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()}),(function(T,w,a){var g=a(6),v=a(8),p=a(10),x=a(11),y=a(12),b=a(18),S=a(38),E=a(41),R=Object.getOwnPropertyDescriptor;w.f=g?R:function(M,D){if(M=y(M),D=b(D),E)try{return R(M,D)}catch(L){}if(S(M,D))return x(!v(p.f,M,D),M[D])}}),(function(T,w,a){var g=a(7);T.exports=!g(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),(function(T){T.exports=function(w){try{return!!w()}catch(a){return!0}}}),(function(T,w,a){var g=a(9),v=Function.prototype.call;T.exports=g?v.bind(v):function(){return v.apply(v,arguments)}}),(function(T,w,a){var g=a(7);T.exports=!g(function(){var v=function(){}.bind();return typeof v!="function"||v.hasOwnProperty("prototype")})}),(function(T,w){var a={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,v=g&&!a.call({1:2},1);w.f=v?function(x){var y=g(this,x);return!!y&&y.enumerable}:a}),(function(T){T.exports=function(w,a){return{enumerable:!(w&1),configurable:!(w&2),writable:!(w&4),value:a}}}),(function(T,w,a){var g=a(13),v=a(16);T.exports=function(p){return g(v(p))}}),(function(T,w,a){var g=a(14),v=a(7),p=a(15),x=Object,y=g("".split);T.exports=v(function(){return!x("z").propertyIsEnumerable(0)})?function(b){return p(b)==="String"?y(b,""):x(b)}:x}),(function(T,w,a){var g=a(9),v=Function.prototype,p=v.call,x=g&&v.bind.bind(p,p);T.exports=g?x:function(y){return function(){return p.apply(y,arguments)}}}),(function(T,w,a){var g=a(14),v=g({}.toString),p=g("".slice);T.exports=function(x){return p(v(x),8,-1)}}),(function(T,w,a){var g=a(17),v=TypeError;T.exports=function(p){if(g(p))throw new v("Can't call method on "+p);return p}}),(function(T){T.exports=function(w){return w==null}}),(function(T,w,a){var g=a(19),v=a(22);T.exports=function(p){var x=g(p,"string");return v(x)?x:x+""}}),(function(T,w,a){var g=a(8),v=a(20),p=a(22),x=a(29),y=a(32),b=a(33),S=TypeError,E=b("toPrimitive");T.exports=function(R,O){if(!v(R)||p(R))return R;var M=x(R,E),D;if(M){if(O===void 0&&(O="default"),D=g(M,R,O),!v(D)||p(D))return D;throw new S("Can't convert object to primitive value")}return O===void 0&&(O="number"),y(R,O)}}),(function(T,w,a){var g=a(21);T.exports=function(v){return typeof v=="object"?v!==null:g(v)}}),(function(T){var w=typeof document=="object"&&document.all;T.exports=typeof w=="undefined"&&w!==void 0?function(a){return typeof a=="function"||a===w}:function(a){return typeof a=="function"}}),(function(T,w,a){var g=a(23),v=a(21),p=a(24),x=a(25),y=Object;T.exports=x?function(b){return typeof b=="symbol"}:function(b){var S=g("Symbol");return v(S)&&p(S.prototype,y(b))}}),(function(T,w,a){var g=a(4),v=a(21),p=function(x){return v(x)?x:void 0};T.exports=function(x,y){return arguments.length<2?p(g[x]):g[x]&&g[x][y]}}),(function(T,w,a){var g=a(14);T.exports=g({}.isPrototypeOf)}),(function(T,w,a){var g=a(26);T.exports=g&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),(function(T,w,a){var g=a(27),v=a(7),p=a(4),x=p.String;T.exports=!!Object.getOwnPropertySymbols&&!v(function(){var y=Symbol("symbol detection");return!x(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&g&&g<41})}),(function(T,w,a){var g=a(4),v=a(28),p=g.process,x=g.Deno,y=p&&p.versions||x&&x.version,b=y&&y.v8,S,E;b&&(S=b.split("."),E=S[0]>0&&S[0]<4?1:+(S[0]+S[1])),!E&&v&&(S=v.match(/Edge\/(\d+)/),(!S||S[1]>=74)&&(S=v.match(/Chrome\/(\d+)/),S&&(E=+S[1]))),T.exports=E}),(function(T,w,a){var g=a(4),v=g.navigator,p=v&&v.userAgent;T.exports=p?String(p):""}),(function(T,w,a){var g=a(30),v=a(17);T.exports=function(p,x){var y=p[x];return v(y)?void 0:g(y)}}),(function(T,w,a){var g=a(21),v=a(31),p=TypeError;T.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not a function")}}),(function(T){var w=String;T.exports=function(a){try{return w(a)}catch(g){return"Object"}}}),(function(T,w,a){var g=a(8),v=a(21),p=a(20),x=TypeError;T.exports=function(y,b){var S,E;if(b==="string"&&v(S=y.toString)&&!p(E=g(S,y))||v(S=y.valueOf)&&!p(E=g(S,y))||b!=="string"&&v(S=y.toString)&&!p(E=g(S,y)))return E;throw new x("Can't convert object to primitive value")}}),(function(T,w,a){var g=a(4),v=a(34),p=a(38),x=a(40),y=a(26),b=a(25),S=g.Symbol,E=v("wks"),R=b?S.for||S:S&&S.withoutSetter||x;T.exports=function(O){return p(E,O)||(E[O]=y&&p(S,O)?S[O]:R("Symbol."+O)),E[O]}}),(function(T,w,a){var g=a(35);T.exports=function(v,p){return g[v]||(g[v]=p||{})}}),(function(T,w,a){var g=a(36),v=a(4),p=a(37),x="__core-js_shared__",y=T.exports=v[x]||p(x,{});(y.versions||(y.versions=[])).push({version:"3.49.0",mode:g?"pure":"global",copyright:"\xA9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),(function(T){T.exports=!1}),(function(T,w,a){var g=a(4),v=Object.defineProperty;T.exports=function(p,x){try{v(g,p,{value:x,configurable:!0,writable:!0})}catch(y){g[p]=x}return x}}),(function(T,w,a){var g=a(14),v=a(39),p=g({}.hasOwnProperty);T.exports=Object.hasOwn||function(y,b){return p(v(y),b)}}),(function(T,w,a){var g=a(16),v=Object;T.exports=function(p){return v(g(p))}}),(function(T,w,a){var g=a(14),v=0,p=Math.random(),x=g(1.1.toString);T.exports=function(y){return"Symbol("+(y===void 0?"":y)+")_"+x(++v+p,36)}}),(function(T,w,a){var g=a(6),v=a(7),p=a(42);T.exports=!g&&!v(function(){return Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a!==7})}),(function(T,w,a){var g=a(4),v=a(20),p=g.document,x=v(p)&&v(p.createElement);T.exports=function(y){return x?p.createElement(y):{}}}),(function(T,w,a){var g=a(6),v=a(44),p=a(11);T.exports=g?function(x,y,b){return v.f(x,y,p(1,b))}:function(x,y,b){return x[y]=b,x}}),(function(T,w,a){var g=a(6),v=a(41),p=a(45),x=a(46),y=a(18),b=TypeError,S=Object.defineProperty,E=Object.getOwnPropertyDescriptor,R="enumerable",O="configurable",M="writable";w.f=g?p?function(L,$,F){if(x(L),$=y($),x(F),typeof L=="function"&&$==="prototype"&&"value"in F&&M in F&&!F[M]){var k=E(L,$);k&&k[M]&&(L[$]=F.value,F={configurable:O in F?F[O]:k[O],enumerable:R in F?F[R]:k[R],writable:!1})}return S(L,$,F)}:S:function(L,$,F){if(x(L),$=y($),x(F),v)try{return S(L,$,F)}catch(k){}if("get"in F||"set"in F)throw new b("Accessors not supported");return"value"in F&&(L[$]=F.value),L}}),(function(T,w,a){var g=a(6),v=a(7);T.exports=g&&v(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}),(function(T,w,a){var g=a(20),v=String,p=TypeError;T.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not an object")}}),(function(T,w,a){var g=a(21),v=a(44),p=a(48),x=a(37);T.exports=function(y,b,S,E){E||(E={});var R=E.enumerable,O=E.name!==void 0?E.name:b;if(g(S)&&p(S,O,E),E.global)R?y[b]=S:x(b,S);else{try{E.unsafe?y[b]&&(R=!0):delete y[b]}catch(M){}R?y[b]=S:v.f(y,b,{value:S,enumerable:!1,configurable:!E.nonConfigurable,writable:!E.nonWritable})}return y}}),(function(T,w,a){var g=a(14),v=a(7),p=a(21),x=a(38),y=a(6),b=a(49).CONFIGURABLE,S=a(50),E=a(51),R=E.enforce,O=E.get,M=String,D=Object.defineProperty,L=g("".slice),$=g("".replace),F=g([].join),k=y&&!v(function(){return D(function(){},"length",{value:8}).length!==8}),G=String(String).split("String"),U=T.exports=function(X,j,H){L(M(j),0,7)==="Symbol("&&(j="["+$(M(j),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),H&&H.getter&&(j="get "+j),H&&H.setter&&(j="set "+j),(!x(X,"name")||b&&X.name!==j)&&(y?D(X,"name",{value:j,configurable:!0}):X.name=j),k&&H&&x(H,"arity")&&X.length!==H.arity&&D(X,"length",{value:H.arity});try{H&&x(H,"constructor")&&H.constructor?y&&D(X,"prototype",{writable:!1}):X.prototype&&(X.prototype=void 0)}catch(Z){}var Y=R(X);return x(Y,"source")||(Y.source=F(G,typeof j=="string"?j:"")),X};Function.prototype.toString=U(function(){return p(this)&&O(this).source||S(this)},"toString")}),(function(T,w,a){var g=a(6),v=a(38),p=Function.prototype,x=g&&Object.getOwnPropertyDescriptor,y=v(p,"name"),b=y&&function(){}.name==="something",S=y&&(!g||g&&x(p,"name").configurable);T.exports={EXISTS:y,PROPER:b,CONFIGURABLE:S}}),(function(T,w,a){var g=a(14),v=a(21),p=a(35),x=g(Function.toString);v(p.inspectSource)||(p.inspectSource=function(y){return x(y)}),T.exports=p.inspectSource}),(function(T,w,a){var g=a(52),v=a(4),p=a(20),x=a(43),y=a(38),b=a(35),S=a(53),E=a(54),R="Object already initialized",O=v.TypeError,M=v.WeakMap,D,L,$,F=function(X){return $(X)?L(X):D(X,{})},k=function(X){return function(j){var H;if(!p(j)||(H=L(j)).type!==X)throw new O("Incompatible receiver, "+X+" required");return H}};if(g||b.state){var G=b.state||(b.state=new M);G.get=G.get,G.has=G.has,G.set=G.set,D=function(X,j){if(G.has(X))throw new O(R);return j.facade=X,G.set(X,j),j},L=function(X){return G.get(X)||{}},$=function(X){return G.has(X)}}else{var U=S("state");E[U]=!0,D=function(X,j){if(y(X,U))throw new O(R);return j.facade=X,x(X,U,j),j},L=function(X){return y(X,U)?X[U]:{}},$=function(X){return y(X,U)}}T.exports={set:D,get:L,has:$,enforce:F,getterFor:k}}),(function(T,w,a){var g=a(4),v=a(21),p=g.WeakMap;T.exports=v(p)&&/native code/.test(String(p))}),(function(T,w,a){var g=a(34),v=a(40),p=g("keys");T.exports=function(x){return p[x]||(p[x]=v(x))}}),(function(T){T.exports={}}),(function(T,w,a){var g=a(38),v=a(56),p=a(5),x=a(44);T.exports=function(y,b,S){for(var E=v(b),R=x.f,O=p.f,M=0;M<E.length;M++){var D=E[M];!g(y,D)&&!(S&&g(S,D))&&R(y,D,O(b,D))}}}),(function(T,w,a){var g=a(23),v=a(14),p=a(57),x=a(66),y=a(46),b=v([].concat);T.exports=g("Reflect","ownKeys")||function(E){var R=p.f(y(E)),O=x.f;return O?b(R,O(E)):R}}),(function(T,w,a){var g=a(58),v=a(65),p=v.concat("length","prototype");w.f=Object.getOwnPropertyNames||function(y){return g(y,p)}}),(function(T,w,a){var g=a(14),v=a(38),p=a(12),x=a(59).indexOf,y=a(54),b=g([].push);T.exports=function(S,E){var R=p(S),O=0,M=[],D;for(D in R)!v(y,D)&&v(R,D)&&b(M,D);for(;E.length>O;)v(R,D=E[O++])&&(~x(M,D)||b(M,D));return M}}),(function(T,w,a){var g=a(12),v=a(60),p=a(63),x=function(y){return function(b,S,E){var R=g(b),O=p(R);if(O===0)return!y&&-1;var M=v(E,O),D;if(y&&S!==S){for(;O>M;)if(D=R[M++],D!==D)return!0}else for(;O>M;M++)if((y||M in R)&&R[M]===S)return y||M||0;return!y&&-1}};T.exports={includes:x(!0),indexOf:x(!1)}}),(function(T,w,a){var g=a(61),v=Math.max,p=Math.min;T.exports=function(x,y){var b=g(x);return b<0?v(b+y,0):p(b,y)}}),(function(T,w,a){var g=a(62);T.exports=function(v){var p=+v;return p!==p||p===0?0:g(p)}}),(function(T){var w=Math.ceil,a=Math.floor;T.exports=Math.trunc||function(v){var p=+v;return(p>0?a:w)(p)}}),(function(T,w,a){var g=a(64);T.exports=function(v){return g(v.length)}}),(function(T,w,a){var g=a(61),v=Math.min;T.exports=function(p){var x=g(p);return x>0?v(x,9007199254740991):0}}),(function(T){T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),(function(T,w){w.f=Object.getOwnPropertySymbols}),(function(T,w,a){var g=a(7),v=a(21),p=/#|\.prototype\./,x=function(R,O){var M=b[y(R)];return M===E?!0:M===S?!1:v(O)?g(O):!!O},y=x.normalize=function(R){return String(R).replace(p,".").toLowerCase()},b=x.data={},S=x.NATIVE="N",E=x.POLYFILL="P";T.exports=x}),(function(T,w,a){var g=a(69),v=String;T.exports=function(p){if(g(p)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return v(p)}}),(function(T,w,a){var g=a(70),v=a(21),p=a(15),x=a(33),y=x("toStringTag"),b=Object,S=p((function(){return arguments})())==="Arguments",E=function(R,O){try{return R[O]}catch(M){}};T.exports=g?p:function(R){var O,M,D;return R===void 0?"Undefined":R===null?"Null":typeof(M=E(O=b(R),y))=="string"?M:S?p(O):(D=p(O))==="Object"&&v(O.callee)?"Arguments":D}}),(function(T,w,a){var g=a(33),v=g("toStringTag"),p={};p[v]="z",T.exports=String(p)==="[object z]"}),(function(T,w,a){var g=a(46),v=a(72),p=a(65),x=a(54),y=a(74),b=a(42),S=a(53),E=">",R="<",O="prototype",M="script",D=S("IE_PROTO"),L=function(){},$=function(X){return R+M+E+X+R+"/"+M+E},F=function(X){X.write($("")),X.close();var j=X.parentWindow.Object;return X=null,j},k=function(){var X=b("iframe"),j="java"+M+":",H;return X.style.display="none",y.appendChild(X),X.src=String(j),H=X.contentWindow.document,H.open(),H.write($("document.F=Object")),H.close(),H.F},G,U=function(){try{G=new ActiveXObject("htmlfile")}catch(j){}U=typeof document!="undefined"?document.domain&&G?F(G):k():F(G);for(var X=p.length;X--;)delete U[O][p[X]];return U()};x[D]=!0,T.exports=Object.create||function(j,H){var Y;return j!==null?(L[O]=g(j),Y=new L,L[O]=null,Y[D]=j):Y=U(),H===void 0?Y:v.f(Y,H)}}),(function(T,w,a){var g=a(6),v=a(45),p=a(44),x=a(46),y=a(12),b=a(73);w.f=g&&!v?Object.defineProperties:function(E,R){x(E);for(var O=y(R),M=b(R),D=M.length,L=0,$;D>L;)p.f(E,$=M[L++],O[$]);return E}}),(function(T,w,a){var g=a(58),v=a(65);T.exports=Object.keys||function(x){return g(x,v)}}),(function(T,w,a){var g=a(23);T.exports=g("document","documentElement")}),(function(T,w,a){var g=a(15),v=a(12),p=a(57).f,x=a(76),y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b=function(S){try{return p(S)}catch(E){return x(y)}};T.exports.f=function(E){return y&&g(E)==="Window"?b(E):p(v(E))}}),(function(T,w,a){var g=a(14);T.exports=g([].slice)}),(function(T,w,a){var g=a(48),v=a(44);T.exports=function(p,x,y){return y.get&&g(y.get,x,{getter:!0}),y.set&&g(y.set,x,{setter:!0}),v.f(p,x,y)}}),(function(T,w,a){var g=a(33);w.f=g}),(function(T,w,a){var g=a(80),v=a(38),p=a(78),x=a(44).f;T.exports=function(y){var b=g.Symbol||(g.Symbol={});v(b,y)||x(b,y,{value:p.f(y)})}}),(function(T,w,a){var g=a(4);T.exports=g}),(function(T,w,a){var g=a(8),v=a(23),p=a(33),x=a(47);T.exports=function(){var y=v("Symbol"),b=y&&y.prototype,S=b&&b.valueOf,E=p("toPrimitive");b&&!b[E]&&x(b,E,function(R){return g(S,this)},{arity:1})}}),(function(T,w,a){var g=a(44).f,v=a(38),p=a(33),x=p("toStringTag");T.exports=function(y,b,S){y&&!S&&(y=y.prototype),y&&!v(y,x)&&g(y,x,{configurable:!0,value:b})}}),(function(T,w,a){var g=a(84),v=a(13),p=a(39),x=a(63),y=a(86),b=a(90),S=function(E){var R=E===1,O=E===2,M=E===3,D=E===4,L=E===6,$=E===7,F=E===5||L;return function(k,G,U){for(var X=p(k),j=v(X),H=x(j),Y=g(G,U),Z=0,Q=0,K=R?y(k,H):O||$?y(k,0):void 0,tt,nt;H>Z;Z++)if((F||Z in j)&&(tt=j[Z],nt=Y(tt,Z,X),E))if(R)b(K,Z,nt);else if(nt)switch(E){case 3:return!0;case 5:return tt;case 6:return Z;case 2:b(K,Q++,tt)}else switch(E){case 4:return!1;case 7:b(K,Q++,tt)}return L?-1:M||D?D:K}};T.exports={forEach:S(0),map:S(1),filter:S(2),some:S(3),every:S(4),find:S(5),findIndex:S(6),filterReject:S(7)}}),(function(T,w,a){var g=a(85),v=a(30),p=a(9),x=g(g.bind);T.exports=function(y,b){return v(y),b===void 0?y:p?x(y,b):function(){return y.apply(b,arguments)}}}),(function(T,w,a){var g=a(15),v=a(14);T.exports=function(p){if(g(p)==="Function")return v(p)}}),(function(T,w,a){var g=a(87);T.exports=function(v,p){return new(g(v))(p===0?0:p)}}),(function(T,w,a){var g=a(88),v=a(89),p=a(20),x=a(33),y=x("species"),b=Array;T.exports=function(S){var E;return g(S)&&(E=S.constructor,v(E)&&(E===b||g(E.prototype))?E=void 0:p(E)&&(E=E[y],E===null&&(E=void 0))),E===void 0?b:E}}),(function(T,w,a){var g=a(15);T.exports=Array.isArray||function(p){return g(p)==="Array"}}),(function(T,w,a){var g=a(14),v=a(7),p=a(21),x=a(69),y=a(23),b=a(50),S=function(){},E=y("Reflect","construct"),R=/^\s*(?:class|function)\b/,O=g(R.exec),M=!R.test(S),D=function(F){if(!p(F))return!1;try{return E(S,[],F),!0}catch(k){return!1}},L=function(F){if(!p(F))return!1;switch(x(F)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return M||!!O(R,b(F))}catch(k){return!0}};L.sham=!0,T.exports=!E||v(function(){var $;return D(D.call)||!D(Object)||!D(function(){$=!0})||$})?L:D}),(function(T,w,a){var g=a(6),v=a(44),p=a(11);T.exports=function(x,y,b){g?v.f(x,y,p(0,b)):x[y]=b}}),(function(T,w,a){var g=a(3),v=a(23),p=a(38),x=a(68),y=a(34),b=a(92),S=y("string-to-symbol-registry"),E=y("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!b},{for:function(R){var O=x(R);if(p(S,O))return S[O];var M=v("Symbol")(O);return S[O]=M,E[M]=O,M}})}),(function(T,w,a){var g=a(26);T.exports=g&&!!Symbol.for&&!!Symbol.keyFor}),(function(T,w,a){var g=a(3),v=a(38),p=a(22),x=a(31),y=a(34),b=a(92),S=y("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!b},{keyFor:function(R){if(!p(R))throw new TypeError(x(R)+" is not a symbol");if(v(S,R))return S[R]}})}),(function(T,w,a){var g=a(3),v=a(23),p=a(95),x=a(8),y=a(14),b=a(7),S=a(88),E=a(21),R=a(96),O=a(22),M=a(15),D=a(68),L=a(76),$=a(97),F=a(40),k=a(26),G=a(98),U=String,X=v("JSON","stringify"),j=y(/./.exec),H=y("".charAt),Y=y("".charCodeAt),Z=y("".replace),Q=y("".slice),K=y([].push),tt=y(1.1.toString),nt=/[\uD800-\uDFFF]/g,rt=/^[\uD800-\uDBFF]$/,it=/^[\uDC00-\uDFFF]$/,st=F(),ct=st.length,ht=!k||b(function(){var Ft=v("Symbol")("stringify detection");return X([Ft])!=="[null]"||X({a:Ft})!=="{}"||X(Object(Ft))!=="{}"}),gt=b(function(){return X("\uDF06\uD834")!=='"\\udf06\\ud834"'||X("\uDEAD")!=='"\\udead"'}),yt=ht?function(Ft,Lt){var Pt=L(arguments),pt=Tt(Lt);if(!(!E(pt)&&(Ft===void 0||O(Ft))))return Pt[1]=function(mt,Ot){if(E(pt)&&(Ot=x(pt,this,U(mt),Ot)),!O(Ot))return Ot},p(X,null,Pt)}:X,Ct=function(Ft,Lt,Pt){var pt=H(Pt,Lt-1),mt=H(Pt,Lt+1);return j(rt,Ft)&&!j(it,mt)||j(it,Ft)&&!j(rt,pt)?"\\u"+tt(Y(Ft,0),16):Ft},Tt=function(Ft){if(E(Ft))return Ft;if(S(Ft)){for(var Lt=Ft.length,Pt=[],pt=0;pt<Lt;pt++){var mt=Ft[pt];typeof mt=="string"?K(Pt,mt):(typeof mt=="number"||M(mt)==="Number"||M(mt)==="String")&&K(Pt,D(mt))}var Ot=Pt.length,Bt=!0;return function(Qt,wt){if(Bt)return Bt=!1,wt;if(S(this))return wt;for(var Wt=0;Wt<Ot;Wt++)if(Pt[Wt]===Qt)return wt}}};X&&g({target:"JSON",stat:!0,arity:3,forced:ht||gt||!G},{stringify:function(Lt,Pt,pt){var mt=Tt(Pt),Ot=[],Bt=yt(Lt,function(de,Re){var Pe=E(mt)?x(mt,this,U(de),Re):Re;return!G&&R(Pe)?st+(K(Ot,Pe.rawJSON)-1):Pe},pt);if(typeof Bt!="string"||(gt&&(Bt=Z(Bt,nt,Ct)),G))return Bt;for(var Qt="",wt=Bt.length,Wt=0;Wt<wt;Wt++){var ae=H(Bt,Wt);if(ae==='"'){var pe=$(Bt,++Wt).end-1,oe=Q(Bt,Wt,pe);Qt+=Q(oe,0,ct)===st?Ot[Q(oe,ct)]:'"'+oe+'"',Wt=pe}else Qt+=ae}return Qt}})}),(function(T,w,a){var g=a(9),v=Function.prototype,p=v.apply,x=v.call;T.exports=typeof Reflect=="object"&&Reflect.apply||(g?x.bind(p):function(){return x.apply(p,arguments)})}),(function(T,w,a){var g=a(20),v=a(51).get;T.exports=function(x){if(!g(x))return!1;var y=v(x);return!!y&&y.type==="RawJSON"}}),(function(T,w,a){var g=a(14),v=a(38),p=SyntaxError,x=parseInt,y=String.fromCharCode,b=g("".charAt),S=g("".slice),E=g(/./.exec),R={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
|
|
25
|
-
`,"\\r":"\r","\\t":" "},O=/^[\da-f]{4}$/i,M=/^[\u0000-\u001F]$/;T.exports=function(D,L){for(var $=!0,F="";L<D.length;){var k=b(D,L);if(k==="\\"){var G=S(D,L,L+2);if(v(R,G))F+=R[G],L+=2;else if(G==="\\u"){L+=2;var U=S(D,L,L+4);if(!E(O,U))throw new p("Bad Unicode escape at: "+L);F+=y(x(U,16)),L+=4}else throw new p('Unknown escape sequence: "'+G+'"')}else if(k==='"'){$=!1,L++;break}else{if(E(M,k))throw new p("Bad control character in string literal at: "+L);F+=k,L++}}if($)throw new p("Unterminated string at: "+L);return{value:F,end:L}}}),(function(T,w,a){var g=a(7);T.exports=!g(function(){var v="9007199254740993",p=JSON.rawJSON(v);return!JSON.isRawJSON(p)||JSON.stringify(p)!==v})}),(function(T,w,a){var g=a(3),v=a(26),p=a(7),x=a(66),y=a(39),b=!v||p(function(){x.f(1)});g({target:"Object",stat:!0,forced:b},{getOwnPropertySymbols:function(E){var R=x.f;return R?R(y(E)):[]}})}),(function(T,w,a){var g=a(3),v=a(6),p=a(4),x=a(8),y=a(14),b=a(38),S=a(21),E=a(24),R=a(68),O=a(77),M=a(55),D=p.Symbol,L=D&&D.prototype;if(v&&S(D)&&(!("description"in L)||D().description!==void 0)){var $={},F=function(){var Q=arguments.length<1||arguments[0]===void 0?void 0:R(arguments[0]),K=E(L,this)?new D(Q):Q===void 0?D():D(Q);return Q===""&&($[K]=!0),K};M(F,D);var k=F.for;F.for=function(Z){var Q=R(Z),K=x(k,this,Q);return Q===""&&($[K]=!0),K},F.prototype=L,L.constructor=F;var G=String(D("description detection"))==="Symbol(description detection)",U=y(L.valueOf),X=y(L.toString),j=/^Symbol\((.*)\)[^)]+$/,H=y("".replace),Y=y("".slice);O(L,"description",{configurable:!0,get:function(){var Q=U(this);if(b($,Q))return"";var K=X(Q),tt=G?Y(K,7,-1):H(K,j,"$1");return tt===""?void 0:tt}}),g({global:!0,constructor:!0,forced:!0},{Symbol:F})}}),(function(T,w,a){var g=a(4),v=a(79),p=a(44).f,x=a(5).f,y=g.Symbol;if(v("asyncDispose"),y){var b=x(y,"asyncDispose");b.enumerable&&b.configurable&&b.writable&&p(y,"asyncDispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,w,a){var g=a(79);g("asyncIterator")}),(function(T,w,a){var g=a(4),v=a(79),p=a(44).f,x=a(5).f,y=g.Symbol;if(v("dispose"),y){var b=x(y,"dispose");b.enumerable&&b.configurable&&b.writable&&p(y,"dispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,w,a){var g=a(79);g("hasInstance")}),(function(T,w,a){var g=a(79);g("isConcatSpreadable")}),(function(T,w,a){var g=a(79);g("iterator")}),(function(T,w,a){var g=a(79);g("match")}),(function(T,w,a){var g=a(79);g("matchAll")}),(function(T,w,a){var g=a(79);g("replace")}),(function(T,w,a){var g=a(79);g("search")}),(function(T,w,a){var g=a(79);g("species")}),(function(T,w,a){var g=a(79);g("split")}),(function(T,w,a){var g=a(79),v=a(81);g("toPrimitive"),v()}),(function(T,w,a){var g=a(23),v=a(79),p=a(82);v("toStringTag"),p(g("Symbol"),"Symbol")}),(function(T,w,a){var g=a(79);g("unscopables")}),(function(T,w,a){var g=a(3),v=a(4),p=a(95),x=a(117),y="WebAssembly",b=v[y],S=new Error("e",{cause:7}).cause!==7,E=function(O,M){var D={};D[O]=x(O,M,S),g({global:!0,constructor:!0,arity:1,forced:S},D)},R=function(O,M){if(b&&b[O]){var D={};D[O]=x(y+"."+O,M,S),g({target:y,stat:!0,constructor:!0,arity:1,forced:S},D)}};E("Error",function(O){return function(D){return p(O,this,arguments)}}),E("EvalError",function(O){return function(D){return p(O,this,arguments)}}),E("RangeError",function(O){return function(D){return p(O,this,arguments)}}),E("ReferenceError",function(O){return function(D){return p(O,this,arguments)}}),E("SyntaxError",function(O){return function(D){return p(O,this,arguments)}}),E("TypeError",function(O){return function(D){return p(O,this,arguments)}}),E("URIError",function(O){return function(D){return p(O,this,arguments)}}),R("CompileError",function(O){return function(D){return p(O,this,arguments)}}),R("LinkError",function(O){return function(D){return p(O,this,arguments)}}),R("RuntimeError",function(O){return function(D){return p(O,this,arguments)}})}),(function(T,w,a){var g=a(23),v=a(38),p=a(43),x=a(24),y=a(118),b=a(55),S=a(122),E=a(123),R=a(124),O=a(125),M=a(126),D=a(6),L=a(36);T.exports=function($,F,k,G){var U="stackTraceLimit",X=G?2:1,j=$.split("."),H=j[j.length-1],Y=g.apply(null,j);if(Y){var Z=Y.prototype;if(!L&&v(Z,"cause")&&delete Z.cause,!k)return Y;var Q=g("Error"),K=F(function(tt,nt){var rt=R(G?nt:tt,void 0),it=G?new Y(tt):new Y;return rt!==void 0&&p(it,"message",rt),M(it,K,it.stack,2),this&&x(Z,this)&&E(it,this,K),arguments.length>X&&O(it,arguments[X]),it});if(K.prototype=Z,H!=="Error"?y?y(K,Q):b(K,Q,{name:!0}):D&&U in Y&&(S(K,Y,U),S(K,Y,"prepareStackTrace")),b(K,Y),!L)try{Z.name!==H&&p(Z,"name",H),Z.constructor=K}catch(tt){}return K}}}),(function(T,w,a){var g=a(119),v=a(20),p=a(16),x=a(120);T.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var y=!1,b={},S;try{S=g(Object.prototype,"__proto__","set"),S(b,[]),y=b instanceof Array}catch(E){}return function(R,O){return p(R),x(O),v(R)&&(y?S(R,O):R.__proto__=O),R}})():void 0)}),(function(T,w,a){var g=a(14),v=a(30);T.exports=function(p,x,y){try{return g(v(Object.getOwnPropertyDescriptor(p,x)[y]))}catch(b){}}}),(function(T,w,a){var g=a(121),v=String,p=TypeError;T.exports=function(x){if(g(x))return x;throw new p("Can't set "+v(x)+" as a prototype")}}),(function(T,w,a){var g=a(20);T.exports=function(v){return g(v)||v===null}}),(function(T,w,a){var g=a(44).f;T.exports=function(v,p,x){x in v||g(v,x,{configurable:!0,get:function(){return p[x]},set:function(y){p[x]=y}})}}),(function(T,w,a){var g=a(21),v=a(20),p=a(118);T.exports=function(x,y,b){var S,E;return p&&g(S=y.constructor)&&S!==b&&v(E=S.prototype)&&E!==b.prototype&&p(x,E),x}}),(function(T,w,a){var g=a(68);T.exports=function(v,p){return v===void 0?arguments.length<2?"":p:g(v)}}),(function(T,w,a){var g=a(20),v=a(43);T.exports=function(p,x){g(x)&&"cause"in x&&v(p,"cause",x.cause)}}),(function(T,w,a){var g=a(43),v=a(127),p=a(128),x=Error.captureStackTrace;T.exports=function(y,b,S,E){p&&(x?x(y,b):g(y,"stack",v(S,E)))}}),(function(T,w,a){var g=a(14),v=Error,p=g("".replace),x=(function(S){return String(new v(S).stack)})("zxcasd"),y=/\n\s*at [^:]*:[^\n]*/,b=y.test(x);T.exports=function(S,E){if(b&&typeof S=="string"&&!v.prepareStackTrace)for(;E--;)S=p(S,y,"");return S}}),(function(T,w,a){var g=a(7),v=a(11);T.exports=!g(function(){var p=new Error("a");return"stack"in p?(Object.defineProperty(p,"stack",v(1,7)),p.stack!==7):!0})}),(function(T,w,a){var g=a(3),v=a(23),p=a(20),x=a(69),y=a(7),b="Error",S="DOMException",E=Object.setPrototypeOf||{}.__proto__,R=v(S),O=Error,M=O.isError,D=!M||!E||y(function(){return R&&!M(new R(S))||!M(new O(b,{cause:function(){}}))||M(v("Object","create")(O.prototype))});g({target:"Error",stat:!0,sham:!0,forced:D},{isError:function($){if(!p($))return!1;var F=x($);return F===b||F===S}})}),(function(T,w,a){var g=a(47),v=a(131),p=Error.prototype;p.toString!==v&&g(p,"toString",v)}),(function(T,w,a){var g=a(6),v=a(7),p=a(46),x=a(124),y=Error.prototype.toString,b=v(function(){if(g){var S=Object.create(Object.defineProperty({},"name",{get:function(){return this===S}}));if(y.call(S)!=="true")return!0}return y.call({message:1,name:2})!=="2: 1"||y.call({})!=="Error"});T.exports=b?function(){var E=p(this),R=x(E.name,"Error"),O=x(E.message);return R?O?R+": "+O:R:O}:y}),(function(T,w,a){a(133)}),(function(T,w,a){var g=a(3),v=a(24),p=a(134),x=a(118),y=a(55),b=a(71),S=a(43),E=a(11),R=a(125),O=a(126),M=a(136),D=a(124),L=a(33),$=L("toStringTag"),F=Error,k=[].push,G=function(j,H){var Y=v(U,this),Z;x?Z=x(new F,Y?p(this):U):(Z=Y?this:b(U),S(Z,$,"Error")),H!==void 0&&S(Z,"message",D(H)),O(Z,G,Z.stack,1),arguments.length>2&&R(Z,arguments[2]);var Q=[];return M(j,k,{that:Q}),S(Z,"errors",Q),Z};x?x(G,F):y(G,F,{name:!0});var U=G.prototype=b(F.prototype,{constructor:E(1,G),message:E(1,""),name:E(1,"AggregateError")});g({global:!0,constructor:!0,arity:2},{AggregateError:G})}),(function(T,w,a){var g=a(38),v=a(21),p=a(39),x=a(53),y=a(135),b=x("IE_PROTO"),S=Object,E=S.prototype;T.exports=y?S.getPrototypeOf:function(R){var O=p(R);if(g(O,b))return O[b];var M=O.constructor;return v(M)&&O instanceof M?M.prototype:O instanceof S?E:null}}),(function(T,w,a){var g=a(7);T.exports=!g(function(){function v(){}return v.prototype.constructor=null,Object.getPrototypeOf(new v)!==v.prototype})}),(function(T,w,a){var g=a(84),v=a(8),p=a(46),x=a(31),y=a(137),b=a(63),S=a(24),E=a(139),R=a(140),O=a(141),M=TypeError,D=function($,F){this.stopped=$,this.result=F},L=D.prototype;T.exports=function($,F,k){var G=k&&k.that,U=!!(k&&k.AS_ENTRIES),X=!!(k&&k.IS_RECORD),j=!!(k&&k.IS_ITERATOR),H=!!(k&&k.INTERRUPTED),Y=g(F,G),Z,Q,K,tt,nt,rt,it,st=function(gt){var yt=Z;return Z=void 0,yt&&O(yt,"normal"),new D(!0,gt)},ct=function(gt){return U?(p(gt),H?Y(gt[0],gt[1],st):Y(gt[0],gt[1])):H?Y(gt,st):Y(gt)};if(X)Z=$.iterator;else if(j)Z=$;else{if(Q=R($),!Q)throw new M(x($)+" is not iterable");if(y(Q)){for(K=0,tt=b($);tt>K;K++)if(nt=ct($[K]),nt&&S(L,nt))return nt;return new D(!1)}Z=E($,Q)}for(rt=X?$.next:Z.next;!(it=v(rt,Z)).done;){var ht=it.value;try{nt=ct(ht)}catch(gt){if(Z)O(Z,"throw",gt);else throw gt}if(typeof nt=="object"&&nt&&S(L,nt))return nt}return new D(!1)}}),(function(T,w,a){var g=a(33),v=a(138),p=g("iterator"),x=Array.prototype;T.exports=function(y){return y!==void 0&&(v.Array===y||x[p]===y)}}),(function(T){T.exports={}}),(function(T,w,a){var g=a(8),v=a(30),p=a(46),x=a(31),y=a(140),b=TypeError;T.exports=function(S,E){var R=arguments.length<2?y(S):E;if(v(R))return p(g(R,S));throw new b(x(S)+" is not iterable")}}),(function(T,w,a){var g=a(69),v=a(29),p=a(17),x=a(138),y=a(33),b=y("iterator");T.exports=function(S){if(!p(S))return v(S,b)||v(S,"@@iterator")||x[g(S)]}}),(function(T,w,a){var g=a(8),v=a(46),p=a(29);T.exports=function(x,y,b){var S,E;v(x);try{if(S=p(x,"return"),!S){if(y==="throw")throw b;return b}S=g(S,x)}catch(R){E=!0,S=R}if(y==="throw")throw b;if(E)throw S;return v(S),b}}),(function(T,w,a){var g=a(3),v=a(23),p=a(95),x=a(7),y=a(117),b="AggregateError",S=v(b),E=!x(function(){return S([1]).errors[0]!==1})&&x(function(){return S([1],b,{cause:7}).cause!==7});g({global:!0,constructor:!0,arity:2,forced:E},{AggregateError:y(b,function(R){return function(M,D){return p(R,this,arguments)}},E,!0)})}),(function(T,w,a){var g=a(3),v=a(4),p=a(24),x=a(134),y=a(118),b=a(55),S=a(71),E=a(43),R=a(11),O=a(126),M=a(124),D=a(33),L=a(7),$=a(36),F=v.SuppressedError,k=D("toStringTag"),G=Error,U=!!F&&F.length!==3,X=!!F&&L(function(){return new F(1,2,3,{cause:4}).cause===4}),j=U||X,H=function(Q,K,tt){var nt=p(Y,this),rt;return y?rt=j&&(!nt||x(this)===Y)?new F:y(new G,nt?x(this):Y):(rt=nt?this:S(Y),E(rt,k,"Error")),tt!==void 0&&E(rt,"message",M(tt)),O(rt,H,rt.stack,1),E(rt,"error",Q),E(rt,"suppressed",K),rt};y?y(H,G):b(H,G,{name:!0});var Y=H.prototype=j?F.prototype:S(G.prototype,{constructor:R(1,H),message:R(1,""),name:R(1,"SuppressedError")});j&&!$&&(Y.constructor=H),g({global:!0,constructor:!0,arity:3,forced:j},{SuppressedError:H})}),(function(T,w,a){var g=a(3),v=a(39),p=a(63),x=a(61),y=a(145);g({target:"Array",proto:!0},{at:function(S){var E=v(this),R=p(E),O=x(S),M=O>=0?O:R+O;return M<0||M>=R?void 0:E[M]}}),y("at")}),(function(T,w,a){var g=a(33),v=a(71),p=a(44).f,x=g("unscopables"),y=Array.prototype;y[x]===void 0&&p(y,x,{configurable:!0,value:v(null)}),T.exports=function(b){y[x][b]=!0}}),(function(T,w,a){var g=a(3),v=a(7),p=a(88),x=a(20),y=a(39),b=a(63),S=a(147),E=a(90),R=a(148),O=a(86),M=a(149),D=a(33),L=a(27),$=D("isConcatSpreadable"),F=L>=51||!v(function(){var U=[];return U[$]=!1,U.concat()[0]!==U}),k=function(U){if(!x(U))return!1;var X=U[$];return X!==void 0?!!X:p(U)},G=!F||!M("concat");g({target:"Array",proto:!0,arity:1,forced:G},{concat:function(X){var j=y(this),H=O(j,0),Y=0,Z,Q,K,tt,nt;for(Z=-1,K=arguments.length;Z<K;Z++)if(nt=Z===-1?j:arguments[Z],k(nt))for(tt=b(nt),S(Y+tt),Q=0;Q<tt;Q++,Y++)Q in nt&&E(H,Y,nt[Q]);else S(Y+1),E(H,Y++,nt);return R(H,Y),H}})}),(function(T){var w=TypeError,a=9007199254740991;T.exports=function(g){if(g>a)throw new w("Maximum allowed index exceeded");return g}}),(function(T,w,a){var g=a(6),v=a(88),p=TypeError,x=Object.getOwnPropertyDescriptor,y=g&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}})();T.exports=y?function(b,S){if(v(b)&&!x(b,"length").writable)throw new p("Cannot set read only .length");return b.length=S}:function(b,S){return b.length=S}}),(function(T,w,a){var g=a(7),v=a(33),p=a(27),x=v("species");T.exports=function(y){return p>=51||!g(function(){var b=[],S=b.constructor={};return S[x]=function(){return{foo:1}},b[y](Boolean).foo!==1})}}),(function(T,w,a){var g=a(3),v=a(151),p=a(145);g({target:"Array",proto:!0},{copyWithin:v}),p("copyWithin")}),(function(T,w,a){var g=a(39),v=a(60),p=a(63),x=a(152),y=Math.min;T.exports=[].copyWithin||function(S,E){var R=g(this),O=p(R),M=v(S,O),D=v(E,O),L=arguments.length>2?arguments[2]:void 0,$=y((L===void 0?O:v(L,O))-D,O-M),F=1;for(D<M&&M<D+$&&(F=-1,D+=$-1,M+=$-1);$-- >0;)D in R?R[M]=R[D]:x(R,M),M+=F,D+=F;return R}}),(function(T,w,a){var g=a(31),v=TypeError;T.exports=function(p,x){if(!delete p[x])throw new v("Cannot delete property "+g(x)+" of "+g(p))}}),(function(T,w,a){var g=a(3),v=a(83).every,p=a(154),x=p("every");g({target:"Array",proto:!0,forced:!x},{every:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,w,a){var g=a(7);T.exports=function(v,p){var x=[][v];return!!x&&g(function(){x.call(null,p||function(){return 1},1)})}}),(function(T,w,a){var g=a(3),v=a(156),p=a(145);g({target:"Array",proto:!0},{fill:v}),p("fill")}),(function(T,w,a){var g=a(39),v=a(60),p=a(63);T.exports=function(y){for(var b=g(this),S=p(b),E=arguments.length,R=v(E>1?arguments[1]:void 0,S),O=E>2?arguments[2]:void 0,M=O===void 0?S:v(O,S);M>R;)b[R++]=y;return b}}),(function(T,w,a){var g=a(3),v=a(83).filter,p=a(149),x=p("filter");g({target:"Array",proto:!0,forced:!x},{filter:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,w,a){var g=a(3),v=a(83).find,p=a(145),x="find",y=!0;x in[]&&Array(1)[x](function(){y=!1}),g({target:"Array",proto:!0,forced:y},{find:function(S){return v(this,S,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,w,a){var g=a(3),v=a(83).findIndex,p=a(145),x="findIndex",y=!0;x in[]&&Array(1)[x](function(){y=!1}),g({target:"Array",proto:!0,forced:y},{findIndex:function(S){return v(this,S,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,w,a){var g=a(3),v=a(161).findLast,p=a(145);g({target:"Array",proto:!0},{findLast:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLast")}),(function(T,w,a){var g=a(84),v=a(13),p=a(39),x=a(63),y=function(b){var S=b===1;return function(E,R,O){for(var M=p(E),D=v(M),L=x(D),$=g(R,O),F,k;L-- >0;)if(F=D[L],k=$(F,L,M),k)switch(b){case 0:return F;case 1:return L}return S?-1:void 0}};T.exports={findLast:y(0),findLastIndex:y(1)}}),(function(T,w,a){var g=a(3),v=a(161).findLastIndex,p=a(145);g({target:"Array",proto:!0},{findLastIndex:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLastIndex")}),(function(T,w,a){var g=a(3),v=a(164),p=a(39),x=a(63),y=a(61),b=a(86);g({target:"Array",proto:!0},{flat:function(){var E=arguments.length?arguments[0]:void 0,R=p(this),O=x(R),M=E===void 0?1:y(E),D=b(R,0);return v(D,R,R,O,0,M),D}})}),(function(T,w,a){var g=a(88),v=a(63),p=a(147),x=a(84),y=a(90),b=function(S,E,R,O,M,D,L,$){for(var F=M,k=0,G=L?x(L,$):!1,U,X;k<O;)k in R&&(U=G?G(R[k],k,E):R[k],D>0&&g(U)?(X=v(U),F=b(S,E,U,X,F,D-1)-1):(p(F+1),y(S,F,U)),F++),k++;return F};T.exports=b}),(function(T,w,a){var g=a(3),v=a(164),p=a(30),x=a(39),y=a(63),b=a(86);g({target:"Array",proto:!0},{flatMap:function(E){var R=x(this),O=y(R),M;return p(E),M=b(R,0),v(M,R,R,O,0,1,E,arguments.length>1?arguments[1]:void 0),M}})}),(function(T,w,a){var g=a(3),v=a(167);g({target:"Array",proto:!0,forced:[].forEach!==v},{forEach:v})}),(function(T,w,a){var g=a(83).forEach,v=a(154),p=v("forEach");T.exports=p?[].forEach:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}}),(function(T,w,a){var g=a(3),v=a(169),p=a(171),x=!p(function(y){Array.from(y)});g({target:"Array",stat:!0,forced:x},{from:v})}),(function(T,w,a){var g=a(84),v=a(8),p=a(39),x=a(170),y=a(137),b=a(89),S=a(63),E=a(90),R=a(148),O=a(139),M=a(140),D=a(141),L=Array;T.exports=function(F){var k=b(this),G=arguments.length,U=G>1?arguments[1]:void 0,X=U!==void 0;X&&(U=g(U,G>2?arguments[2]:void 0));var j=p(F),H=M(j),Y=0,Z,Q,K,tt,nt,rt;if(H&&!(this===L&&y(H)))for(Q=k?new this:[],tt=O(j,H),nt=tt.next;!(K=v(nt,tt)).done;Y++){rt=X?x(tt,U,[K.value,Y],!0):K.value;try{E(Q,Y,rt)}catch(it){D(tt,"throw",it)}}else for(Z=S(j),Q=k?new this(Z):L(Z);Z>Y;Y++)rt=X?U(j[Y],Y):j[Y],E(Q,Y,rt);return R(Q,Y),Q}}),(function(T,w,a){var g=a(46),v=a(141);T.exports=function(p,x,y,b){try{return b?x(g(y)[0],y[1]):x(y)}catch(S){v(p,"throw",S)}}}),(function(T,w,a){var g=a(33),v=g("iterator"),p=!1;try{var x=0,y={next:function(){return{done:!!x++}},return:function(){p=!0}};y[v]=function(){return this},Array.from(y,function(){throw 2})}catch(b){}T.exports=function(b,S){try{if(!S&&!p)return!1}catch(O){return!1}var E=!1;try{var R={};R[v]=function(){return{next:function(){return{done:E=!0}}}},b(R)}catch(O){}return E}}),(function(T,w,a){var g=a(3),v=a(59).includes,p=a(7),x=a(145),y=p(function(){return!Array(1).includes()}),b=p(function(){return[,1].includes(void 0,1)});g({target:"Array",proto:!0,forced:y||b},{includes:function(E){return v(this,E,arguments.length>1?arguments[1]:void 0)}}),x("includes")}),(function(T,w,a){var g=a(3),v=a(85),p=a(59).indexOf,x=a(154),y=v([].indexOf),b=!!y&&1/y([1],1,-0)<0,S=b||!x("indexOf");g({target:"Array",proto:!0,forced:S},{indexOf:function(R){var O=arguments.length>1?arguments[1]:void 0;return b?y(this,R,O)||0:p(this,R,O)}})}),(function(T,w,a){var g=a(3),v=a(88);g({target:"Array",stat:!0},{isArray:v})}),(function(T,w,a){var g=a(12),v=a(145),p=a(138),x=a(51),y=a(44).f,b=a(176),S=a(179),E=a(36),R=a(6),O="Array Iterator",M=x.set,D=x.getterFor(O);T.exports=b(Array,"Array",function($,F){M(this,{type:O,target:g($),index:0,kind:F})},function(){var $=D(this),F=$.target,k=$.index++;if(!F||k>=F.length)return $.target=null,S(void 0,!0);switch($.kind){case"keys":return S(k,!1);case"values":return S(F[k],!1)}return S([k,F[k]],!1)},"values");var L=p.Arguments=p.Array;if(v("keys"),v("values"),v("entries"),!E&&R&&L.name!=="values")try{y(L,"name",{value:"values"})}catch($){}}),(function(T,w,a){var g=a(3),v=a(8),p=a(36),x=a(49),y=a(21),b=a(177),S=a(134),E=a(118),R=a(82),O=a(43),M=a(47),D=a(33),L=a(138),$=a(178),F=x.PROPER,k=x.CONFIGURABLE,G=$.IteratorPrototype,U=$.BUGGY_SAFARI_ITERATORS,X=D("iterator"),j="keys",H="values",Y="entries",Z=function(){return this};T.exports=function(Q,K,tt,nt,rt,it,st){b(tt,K,nt);var ct=function(mt){if(mt===rt&&Tt)return Tt;if(!U&&mt&&mt in yt)return yt[mt];switch(mt){case j:return function(){return new tt(this,mt)};case H:return function(){return new tt(this,mt)};case Y:return function(){return new tt(this,mt)}}return function(){return new tt(this)}},ht=K+" Iterator",gt=!1,yt=Q.prototype,Ct=yt[X]||yt["@@iterator"]||rt&&yt[rt],Tt=!U&&Ct||ct(rt),Ft=K==="Array"&&yt.entries||Ct,Lt,Pt,pt;if(Ft&&(Lt=S(Ft.call(new Q)),Lt!==Object.prototype&&Lt.next&&(!p&&S(Lt)!==G&&(E?E(Lt,G):y(Lt[X])||M(Lt,X,Z)),R(Lt,ht,!0,!0),p&&(L[ht]=Z))),F&&rt===H&&Ct&&Ct.name!==H&&(!p&&k?O(yt,"name",H):(gt=!0,Tt=function(){return v(Ct,this)})),rt)if(Pt={values:ct(H),keys:it?Tt:ct(j),entries:ct(Y)},st)for(pt in Pt)(U||gt||!(pt in yt))&&M(yt,pt,Pt[pt]);else g({target:K,proto:!0,forced:U||gt},Pt);return(!p||st)&&yt[X]!==Tt&&M(yt,X,Tt,{name:rt}),L[K]=Tt,Pt}}),(function(T,w,a){var g=a(178).IteratorPrototype,v=a(71),p=a(11),x=a(82),y=a(138),b=function(){return this};T.exports=function(S,E,R,O){var M=E+" Iterator";return S.prototype=v(g,{next:p(+!O,R)}),x(S,M,!1,!0),y[M]=b,S}}),(function(T,w,a){var g=a(7),v=a(21),p=a(20),x=a(71),y=a(134),b=a(47),S=a(33),E=a(36),R=S("iterator"),O=!1,M,D,L;[].keys&&(L=[].keys(),"next"in L?(D=y(y(L)),D!==Object.prototype&&(M=D)):O=!0);var $=!p(M)||g(function(){var F={};return M[R].call(F)!==F});$?M={}:E&&(M=x(M)),v(M[R])||b(M,R,function(){return this}),T.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:O}}),(function(T){T.exports=function(w,a){return{value:w,done:a}}}),(function(T,w,a){var g=a(3),v=a(14),p=a(13),x=a(12),y=a(154),b=v([].join),S=p!==Object,E=S||!y("join",",");g({target:"Array",proto:!0,forced:E},{join:function(O){return b(x(this),O===void 0?",":O)}})}),(function(T,w,a){var g=a(3),v=a(182);g({target:"Array",proto:!0,forced:v!==[].lastIndexOf},{lastIndexOf:v})}),(function(T,w,a){var g=a(95),v=a(12),p=a(61),x=a(63),y=a(154),b=Math.min,S=[].lastIndexOf,E=!!S&&1/[1].lastIndexOf(1,-0)<0,R=y("lastIndexOf"),O=E||!R;T.exports=O?function(D){if(E)return g(S,this,arguments)||0;var L=v(this),$=x(L);if($===0)return-1;var F=$-1;for(arguments.length>1&&(F=b(F,p(arguments[1]))),F<0&&(F=$+F);F>=0;F--)if(F in L&&L[F]===D)return F||0;return-1}:S}),(function(T,w,a){var g=a(3),v=a(83).map,p=a(149),x=p("map");g({target:"Array",proto:!0,forced:!x},{map:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,w,a){var g=a(3),v=a(7),p=a(89),x=a(90),y=a(148),b=Array,S=v(function(){function E(){}return!(b.of.call(E)instanceof E)});g({target:"Array",stat:!0,forced:S},{of:function(){for(var R=0,O=arguments.length,M=new(p(this)?this:b)(O);O>R;)x(M,R,arguments[R++]);return y(M,O),M}})}),(function(T,w,a){var g=a(3),v=a(39),p=a(63),x=a(148),y=a(147),b=a(7),S=b(function(){return[].push.call({length:4294967296},1)!==4294967297}),E=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(O){return O instanceof TypeError}},R=S||!E();g({target:"Array",proto:!0,arity:1,forced:R},{push:function(M){var D=v(this),L=p(D),$=arguments.length;y(L+$);for(var F=0;F<$;F++)D[L]=arguments[F],L++;return x(D,L),L}})}),(function(T,w,a){var g=a(3),v=a(187).left,p=a(154),x=a(27),y=a(188),b=!y&&x>79&&x<83,S=b||!p("reduce");g({target:"Array",proto:!0,forced:S},{reduce:function(R){var O=arguments.length;return v(this,R,O,O>1?arguments[1]:void 0)}})}),(function(T,w,a){var g=a(30),v=a(39),p=a(13),x=a(63),y=TypeError,b="Reduce of empty array with no initial value",S=function(E){return function(R,O,M,D){var L=v(R),$=p(L),F=x(L);if(g(O),F===0&&M<2)throw new y(b);var k=E?F-1:0,G=E?-1:1;if(M<2)for(;;){if(k in $){D=$[k],k+=G;break}if(k+=G,E?k<0:F<=k)throw new y(b)}for(;E?k>=0:F>k;k+=G)k in $&&(D=O(D,$[k],k,L));return D}};T.exports={left:S(!1),right:S(!0)}}),(function(T,w,a){var g=a(189);T.exports=g==="NODE"}),(function(T,w,a){var g=a(4),v=a(28),p=a(15),x=function(y){return v.slice(0,y.length)===y};T.exports=(function(){return x("Bun/")?"BUN":x("Cloudflare-Workers")?"CLOUDFLARE":x("Deno/")?"DENO":x("Node.js/")?"NODE":g.Bun&&typeof Bun.version=="string"?"BUN":g.Deno&&typeof Deno.version=="object"?"DENO":p(g.process)==="process"?"NODE":g.window&&g.document?"BROWSER":"REST"})()}),(function(T,w,a){var g=a(3),v=a(187).right,p=a(154),x=a(27),y=a(188),b=!y&&x>79&&x<83,S=b||!p("reduceRight");g({target:"Array",proto:!0,forced:S},{reduceRight:function(R){return v(this,R,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(88),x=v([].reverse),y=[1,2];g({target:"Array",proto:!0,forced:String(y)===String(y.reverse())},{reverse:function(){return p(this)&&(this.length=this.length),x(this)}})}),(function(T,w,a){var g=a(3),v=a(88),p=a(89),x=a(20),y=a(60),b=a(63),S=a(12),E=a(90),R=a(148),O=a(33),M=a(149),D=a(76),L=M("slice"),$=O("species"),F=Array,k=Math.max;g({target:"Array",proto:!0,forced:!L},{slice:function(U,X){var j=S(this),H=b(j),Y=y(U,H),Z=y(X===void 0?H:X,H),Q,K,tt;if(v(j)&&(Q=j.constructor,p(Q)&&(Q===F||v(Q.prototype))?Q=void 0:x(Q)&&(Q=Q[$],Q===null&&(Q=void 0)),Q===F||Q===void 0))return D(j,Y,Z);for(K=new(Q===void 0?F:Q)(k(Z-Y,0)),tt=0;Y<Z;Y++,tt++)Y in j&&E(K,tt,j[Y]);return R(K,tt),K}})}),(function(T,w,a){var g=a(3),v=a(83).some,p=a(154),x=p("some");g({target:"Array",proto:!0,forced:!x},{some:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(30),x=a(39),y=a(63),b=a(152),S=a(68),E=a(7),R=a(195),O=a(154),M=a(196),D=a(197),L=a(27),$=a(198),F=[],k=v(F.sort),G=v(F.push),U=E(function(){F.sort(void 0)}),X=E(function(){F.sort(null)}),j=O("sort"),H=!E(function(){if(L)return L<70;if(!(M&&M>3)){if(D)return!0;if($)return $<603;var Q="",K,tt,nt,rt;for(K=65;K<76;K++){switch(tt=String.fromCharCode(K),K){case 66:case 69:case 70:case 72:nt=3;break;case 68:case 71:nt=4;break;default:nt=2}for(rt=0;rt<47;rt++)F.push({k:tt+rt,v:nt})}for(F.sort(function(it,st){return st.v-it.v}),rt=0;rt<F.length;rt++)tt=F[rt].k.charAt(0),Q.charAt(Q.length-1)!==tt&&(Q+=tt);return Q!=="DGBEFHACIJK"}}),Y=U||!X||!j||!H,Z=function(Q){return function(K,tt){if(tt===void 0)return-1;if(K===void 0)return 1;if(Q!==void 0)return+Q(K,tt)||0;var nt=S(K),rt=S(tt);return nt===rt?0:nt>rt?1:-1}};g({target:"Array",proto:!0,forced:Y},{sort:function(K){K!==void 0&&p(K);var tt=x(this);if(H)return K===void 0?k(tt):k(tt,K);var nt=[],rt=y(tt),it,st;for(st=0;st<rt;st++)st in tt&&G(nt,tt[st]);for(R(nt,Z(K)),it=y(nt),st=0;st<it;)tt[st]=nt[st++];for(;st<rt;)b(tt,st++);return tt}})}),(function(T,w,a){var g=a(76),v=Math.floor,p=function(x,y){var b=x.length;if(b<8)for(var S=1,E,R;S<b;){for(R=S,E=x[S];R&&y(x[R-1],E)>0;)x[R]=x[--R];R!==S++&&(x[R]=E)}else for(var O=v(b/2),M=p(g(x,0,O),y),D=p(g(x,O),y),L=M.length,$=D.length,F=0,k=0;F<L||k<$;)x[F+k]=F<L&&k<$?y(M[F],D[k])<=0?M[F++]:D[k++]:F<L?M[F++]:D[k++];return x};T.exports=p}),(function(T,w,a){var g=a(28),v=g.match(/firefox\/(\d+)/i);T.exports=!!v&&+v[1]}),(function(T,w,a){var g=a(28);T.exports=/MSIE|Trident/.test(g)}),(function(T,w,a){var g=a(28),v=g.match(/AppleWebKit\/(\d+)\./);T.exports=!!v&&+v[1]}),(function(T,w,a){var g=a(200);g("Array")}),(function(T,w,a){var g=a(23),v=a(77),p=a(33),x=a(6),y=p("species");T.exports=function(b){var S=g(b);x&&S&&!S[y]&&v(S,y,{configurable:!0,get:function(){return this}})}}),(function(T,w,a){var g=a(3),v=a(39),p=a(60),x=a(61),y=a(63),b=a(148),S=a(147),E=a(86),R=a(90),O=a(152),M=a(149),D=M("splice"),L=Math.max,$=Math.min;g({target:"Array",proto:!0,forced:!D},{splice:function(k,G){var U=v(this),X=y(U),j=p(k,X),H=arguments.length,Y,Z,Q,K,tt,nt;for(H===0?Y=Z=0:H===1?(Y=0,Z=X-j):(Y=H-2,Z=$(L(x(G),0),X-j)),S(X+Y-Z),Q=E(U,Z),K=0;K<Z;K++)tt=j+K,tt in U&&R(Q,K,U[tt]);if(b(Q,Z),Y<Z){for(K=j;K<X-Z;K++)tt=K+Z,nt=K+Y,tt in U?U[nt]=U[tt]:O(U,nt);for(K=X;K>X-Z+Y;K--)O(U,K-1)}else if(Y>Z)for(K=X-Z;K>j;K--)tt=K+Z-1,nt=K+Y-1,tt in U?U[nt]=U[tt]:O(U,nt);for(K=0;K<Y;K++)U[K+j]=arguments[K+2];return b(U,X-Z+Y),Q}})}),(function(T,w,a){var g=a(3),v=a(63),p=a(12),x=a(90),y=a(145),b=Array;g({target:"Array",proto:!0},{toReversed:function(){for(var E=p(this),R=v(E),O=new b(R),M=0;M<R;M++)x(O,M,E[R-M-1]);return O}}),y("toReversed")}),(function(T,w,a){var g=a(3),v=a(14),p=a(30),x=a(12),y=a(204),b=a(205),S=a(145),E=Array,R=v(b("Array","sort"));g({target:"Array",proto:!0},{toSorted:function(M){M!==void 0&&p(M);var D=x(this),L=y(E,D);return R(L,M)}}),S("toSorted")}),(function(T,w,a){var g=a(63);T.exports=function(v,p,x){for(var y=0,b=arguments.length>2?x:g(p),S=new v(b);b>y;)S[y]=p[y++];return S}}),(function(T,w,a){var g=a(4);T.exports=function(v,p){var x=g[v],y=x&&x.prototype;return y&&y[p]}}),(function(T,w,a){var g=a(3),v=a(145),p=a(147),x=a(63),y=a(60),b=a(12),S=a(61),E=a(90),R=Array,O=Math.max,M=Math.min;g({target:"Array",proto:!0},{toSpliced:function(L,$){var F=b(this),k=x(F),G=y(L,k),U=arguments.length,X=0,j,H,Y,Z;for(U===0?j=H=0:U===1?(j=0,H=k-G):(j=U-2,H=M(O(S($),0),k-G)),Y=p(k+j-H),Z=R(Y);X<G;X++)E(Z,X,F[X]);for(;X<G+j;X++)E(Z,X,arguments[X-G+2]);for(;X<Y;X++)E(Z,X,F[X+H-j]);return Z}}),v("toSpliced")}),(function(T,w,a){var g=a(145);g("flat")}),(function(T,w,a){var g=a(145);g("flatMap")}),(function(T,w,a){var g=a(3),v=a(39),p=a(63),x=a(148),y=a(152),b=a(147),S=[].unshift(0)!==1,E=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(O){return O instanceof TypeError}},R=S||!E();g({target:"Array",proto:!0,arity:1,forced:R},{unshift:function(M){var D=v(this),L=p(D),$=arguments.length;if($){b(L+$);for(var F=L;F--;){var k=F+$;F in D?D[k]=D[F]:y(D,k)}for(var G=0;G<$;G++)D[G]=arguments[G]}return x(D,L+$)}})}),(function(T,w,a){var g=a(3),v=a(63),p=a(61),x=a(12),y=a(90),b=Array,S=RangeError,E=(function(){try{[].with({valueOf:function(){throw 4}},null)}catch(R){return R!==4}})();g({target:"Array",proto:!0,forced:E},{with:function(R,O){var M=x(this),D=v(M),L=p(R),$=L<0?D+L:L;if($>=D||$<0)throw new S("Incorrect index");for(var F=new b(D),k=0;k<D;k++)y(F,k,k===$?O:M[k]);return F}})}),(function(T,w,a){var g=a(3),v=a(4),p=a(212),x=a(200),y="ArrayBuffer",b=p[y],S=v[y];g({global:!0,constructor:!0,forced:S!==b},{ArrayBuffer:b}),x(y)}),(function(T,w,a){var g=a(4),v=a(14),p=a(6),x=a(213),y=a(49),b=a(43),S=a(77),E=a(214),R=a(7),O=a(215),M=a(61),D=a(216),L=a(217),$=a(221),F=a(134),k=a(118),G=a(156),U=a(76),X=a(123),j=a(55),H=a(82),Y=a(51),Z=y.PROPER,Q=y.CONFIGURABLE,K="ArrayBuffer",tt="DataView",nt="prototype",rt="Wrong length",it="Wrong index",st=Y.getterFor(K),ct=Y.getterFor(tt),ht=Y.set,gt=g[K],yt=gt,Ct=yt&&yt[nt],Tt=g[tt],Ft=Tt&&Tt[nt],Lt=Object.prototype,Pt=g.Array,pt=g.RangeError,mt=v(G),Ot=v([].reverse),Bt=$.pack,Qt=$.unpack,wt=function(Vt){return[Vt&255]},Wt=function(Vt){return[Vt&255,Vt>>8&255]},ae=function(Vt){return[Vt&255,Vt>>8&255,Vt>>16&255,Vt>>24&255]},pe=function(Vt){return Vt[3]<<24|Vt[2]<<16|Vt[1]<<8|Vt[0]},oe=function(Vt){return Bt(L(Vt),23,4)},de=function(Vt){return Bt(Vt,52,8)},Re=function(Vt,ne,re){S(Vt[nt],ne,{configurable:!0,get:function(){return re(this)[ne]}})},Pe=function(Vt,ne,re,en){var Ht=ct(Vt),ee=D(re),ve=!!en;if(ee+ne>Ht.byteLength)throw new pt(it);var se=Ht.bytes,Oe=ee+Ht.byteOffset,rn=U(se,Oe,Oe+ne);return ve?rn:Ot(rn)},Ee=function(Vt,ne,re,en,Ht,ee){var ve=ct(Vt),se=D(re),Oe=en(+Ht),rn=!!ee;if(se+ne>ve.byteLength)throw new pt(it);for(var It=ve.bytes,Xt=se+ve.byteOffset,Mt=0;Mt<ne;Mt++)It[Xt+Mt]=Oe[rn?Mt:ne-Mt-1]};if(!x)yt=function(ne){O(this,Ct);var re=D(ne);ht(this,{type:K,bytes:mt(Pt(re),0),byteLength:re}),p||(this.byteLength=re,this.detached=!1)},Ct=yt[nt],Tt=function(ne,re,en){O(this,Ft),O(ne,Ct);var Ht=st(ne),ee=Ht.byteLength,ve=M(re);if(ve<0||ve>ee)throw new pt("Wrong offset");if(en=en===void 0?ee-ve:D(en),ve+en>ee)throw new pt(rt);ht(this,{type:tt,buffer:ne,byteLength:en,byteOffset:ve,bytes:Ht.bytes}),p||(this.buffer=ne,this.byteLength=en,this.byteOffset=ve)},Ft=Tt[nt],p&&(Re(yt,"byteLength",st),Re(Tt,"buffer",ct),Re(Tt,"byteLength",ct),Re(Tt,"byteOffset",ct)),E(Ft,{getInt8:function(ne){return Pe(this,1,ne)[0]<<24>>24},getUint8:function(ne){return Pe(this,1,ne)[0]},getInt16:function(ne){var re=Pe(this,2,ne,arguments.length>1?arguments[1]:!1);return(re[1]<<8|re[0])<<16>>16},getUint16:function(ne){var re=Pe(this,2,ne,arguments.length>1?arguments[1]:!1);return re[1]<<8|re[0]},getInt32:function(ne){return pe(Pe(this,4,ne,arguments.length>1?arguments[1]:!1))},getUint32:function(ne){return pe(Pe(this,4,ne,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(ne){return Qt(Pe(this,4,ne,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(ne){return Qt(Pe(this,8,ne,arguments.length>1?arguments[1]:!1),52)},setInt8:function(ne,re){Ee(this,1,ne,wt,re)},setUint8:function(ne,re){Ee(this,1,ne,wt,re)},setInt16:function(ne,re){Ee(this,2,ne,Wt,re,arguments.length>2?arguments[2]:!1)},setUint16:function(ne,re){Ee(this,2,ne,Wt,re,arguments.length>2?arguments[2]:!1)},setInt32:function(ne,re){Ee(this,4,ne,ae,re,arguments.length>2?arguments[2]:!1)},setUint32:function(ne,re){Ee(this,4,ne,ae,re,arguments.length>2?arguments[2]:!1)},setFloat32:function(ne,re){Ee(this,4,ne,oe,re,arguments.length>2?arguments[2]:!1)},setFloat64:function(ne,re){Ee(this,8,ne,de,re,arguments.length>2?arguments[2]:!1)}});else{var he=Z&>.name!==K;!R(function(){gt(1)})||!R(function(){new gt(-1)})||R(function(){return new gt,new gt(1.5),new gt(NaN),gt.length!==1||he&&!Q})?(yt=function(ne){return O(this,Ct),X(new gt(D(ne)),this,yt)},yt[nt]=Ct,Ct.constructor=yt,j(yt,gt)):he&&Q&&b(gt,"name",K),k&&F(Ft)!==Lt&&k(Ft,Lt);var ye=new Tt(new yt(2)),Ge=v(Ft.setInt8);ye.setInt8(0,2147483648),ye.setInt8(1,2147483649),(ye.getInt8(0)||!ye.getInt8(1))&&E(Ft,{setInt8:function(ne,re){Ge(this,ne,re<<24>>24)},setUint8:function(ne,re){Ge(this,ne,re<<24>>24)}},{unsafe:!0})}H(yt,K),H(Tt,tt),T.exports={ArrayBuffer:yt,DataView:Tt}}),(function(T){T.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"}),(function(T,w,a){var g=a(47);T.exports=function(v,p,x){for(var y in p)g(v,y,p[y],x);return v}}),(function(T,w,a){var g=a(24),v=TypeError;T.exports=function(p,x){if(g(x,p))return p;throw new v("Incorrect invocation")}}),(function(T,w,a){var g=a(61),v=a(64),p=RangeError;T.exports=function(x){if(x===void 0)return 0;var y=g(x),b=v(y);if(y!==b)throw new p("Wrong length or index");return b}}),(function(T,w,a){var g=a(218),v=11920928955078125e-23,p=34028234663852886e22,x=11754943508222875e-54;T.exports=Math.fround||function(b){return g(b,v,p,x)}}),(function(T,w,a){var g=a(219),v=a(220),p=Math.abs,x=2220446049250313e-31;T.exports=function(y,b,S,E){var R=+y,O=p(R),M=g(R);if(O<E)return M*v(O/E/b)*E*b;var D=(1+b/x)*O,L=D-(D-O);return L>S||L!==L?M*(1/0):M*L}}),(function(T){T.exports=Math.sign||function(a){var g=+a;return g===0||g!==g?g:g<0?-1:1}}),(function(T){var w=2220446049250313e-31,a=1/w;T.exports=function(g){return g+a-a}}),(function(T){var w=Array,a=Math.abs,g=Math.pow,v=Math.floor,p=Math.log,x=Math.LN2,y=function(S,E,R){var O=w(R),M=R*8-E-1,D=(1<<M)-1,L=D>>1,$=E===23?g(2,-24)-g(2,-77):0,F=S<0||S===0&&1/S<0?1:0,k=0,G,U,X;for(S=a(S),S!==S||S===1/0?(U=S!==S?1:0,G=D):(G=v(p(S)/x),X=g(2,-G),S*X<1&&(G--,X*=2),G+L>=1?S+=$/X:S+=$*g(2,1-L),S*X>=2&&(G++,X/=2),G+L>=D?(U=0,G=D):G+L>=1?(U=(S*X-1)*g(2,E),G+=L):(U=S*g(2,L-1)*g(2,E),G=0));E>=8;)O[k++]=U&255,U/=256,E-=8;for(G=G<<E|U,M+=E;M>0;)O[k++]=G&255,G/=256,M-=8;return O[k-1]|=F*128,O},b=function(S,E){var R=S.length,O=R*8-E-1,M=(1<<O)-1,D=M>>1,L=O-7,$=R-1,F=S[$--],k=F&127,G;for(F>>=7;L>0;)k=k*256+S[$--],L-=8;for(G=k&(1<<-L)-1,k>>=-L,L+=E;L>0;)G=G*256+S[$--],L-=8;if(k===0)k=1-D;else{if(k===M)return G?NaN:F?-1/0:1/0;G+=g(2,E),k-=D}return(F?-1:1)*G*g(2,k-E)};T.exports={pack:y,unpack:b}}),(function(T,w,a){var g=a(3),v=a(223),p=v.NATIVE_ARRAY_BUFFER_VIEWS;g({target:"ArrayBuffer",stat:!0,forced:!p},{isView:v.isView})}),(function(T,w,a){var g=a(213),v=a(6),p=a(4),x=a(21),y=a(20),b=a(38),S=a(69),E=a(31),R=a(43),O=a(47),M=a(77),D=a(24),L=a(134),$=a(118),F=a(33),k=a(40),G=a(51),U=G.enforce,X=G.get,j=p.Int8Array,H=j&&j.prototype,Y=p.Uint8ClampedArray,Z=Y&&Y.prototype,Q=j&&L(j),K=H&&L(H),tt=Object.prototype,nt=p.TypeError,rt=F("toStringTag"),it=k("TYPED_ARRAY_TAG"),st="TypedArrayConstructor",ct=g&&!!$&&S(p.opera)!=="Opera",ht=!1,gt,yt,Ct,Tt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ft={BigInt64Array:8,BigUint64Array:8},Lt=function(Wt){if(!y(Wt))return!1;var ae=S(Wt);return ae==="DataView"||b(Tt,ae)||b(Ft,ae)},Pt=function(wt){var Wt=L(wt);if(y(Wt)){var ae=X(Wt);return ae&&b(ae,st)?ae[st]:Pt(Wt)}},pt=function(wt){if(!y(wt))return!1;var Wt=S(wt);return b(Tt,Wt)||b(Ft,Wt)},mt=function(wt){if(pt(wt))return wt;throw new nt("Target is not a typed array")},Ot=function(wt){if(x(wt)&&(!$||D(Q,wt)))return wt;throw new nt(E(wt)+" is not a typed array constructor")},Bt=function(wt,Wt,ae,pe){if(v){if(ae)for(var oe in Tt){var de=p[oe];if(de&&b(de.prototype,wt))try{delete de.prototype[wt]}catch(Re){try{de.prototype[wt]=Wt}catch(Pe){}}}(!K[wt]||ae)&&O(K,wt,ae?Wt:ct&&H[wt]||Wt,pe)}},Qt=function(wt,Wt,ae){var pe,oe;if(v){if($){if(ae){for(pe in Tt)if(oe=p[pe],oe&&b(oe,wt))try{delete oe[wt]}catch(de){}}if(!Q[wt]||ae)try{return O(Q,wt,ae?Wt:ct&&Q[wt]||Wt)}catch(de){}else return}for(pe in Tt)oe=p[pe],oe&&(!oe[wt]||ae)&&O(oe,wt,Wt)}};for(gt in Tt)yt=p[gt],Ct=yt&&yt.prototype,Ct?U(Ct)[st]=yt:ct=!1;for(gt in Ft)yt=p[gt],Ct=yt&&yt.prototype,Ct&&(U(Ct)[st]=yt);if((!ct||!x(Q)||Q===Function.prototype)&&(Q=function(){throw new nt("Incorrect invocation")},ct))for(gt in Tt)p[gt]&&$(p[gt],Q);if((!ct||!K||K===tt)&&(K=Q.prototype,ct))for(gt in Tt)p[gt]&&$(p[gt].prototype,K);if(ct&&L(Z)!==K&&$(Z,K),v&&!b(K,rt)){ht=!0,M(K,rt,{configurable:!0,get:function(){return y(this)?this[it]:void 0}});for(gt in Tt)p[gt]&&R(p[gt].prototype,it,gt)}T.exports={NATIVE_ARRAY_BUFFER_VIEWS:ct,TYPED_ARRAY_TAG:ht&&it,aTypedArray:mt,aTypedArrayConstructor:Ot,exportTypedArrayMethod:Bt,exportTypedArrayStaticMethod:Qt,getTypedArrayConstructor:Pt,isView:Lt,isTypedArray:pt,TypedArray:Q,TypedArrayPrototype:K}}),(function(T,w,a){var g=a(3),v=a(85),p=a(7),x=a(212),y=a(46),b=a(60),S=a(64),E=x.ArrayBuffer,R=x.DataView,O=R.prototype,M=v(E.prototype.slice),D=v(O.getUint8),L=v(O.setUint8),$=p(function(){return!new E(2).slice(1,void 0).byteLength});g({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:$},{slice:function(k,G){if(M&&G===void 0)return M(y(this),k);for(var U=y(this).byteLength,X=b(k,U),j=b(G===void 0?U:G,U),H=new E(S(j-X)),Y=new R(this),Z=new R(H),Q=0;X<j;)L(Z,Q++,D(Y,X++));return H}})}),(function(T,w,a){a(226)}),(function(T,w,a){var g=a(3),v=a(212),p=a(213);g({global:!0,constructor:!0,forced:!p},{DataView:v.DataView})}),(function(T,w,a){var g=a(3),v=a(14),p=Math.pow,x=31,y=1023,b=p(2,-24),S=.0009765625,E=function(O){var M=O>>>15,D=O>>>10&x,L=O&y;return D===x?L===0?M===0?1/0:-1/0:NaN:D===0?L*(M===0?b:-b):p(2,D-15)*(M===0?1+L*S:-1-L*S)},R=v(DataView.prototype.getUint16);g({target:"DataView",proto:!0},{getFloat16:function(M){return E(R(this,M,arguments.length>1?arguments[1]:!1))}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(229),x=a(216),y=a(230),b=a(220),S=Math.floor,E=Math.pow,R=65520,O=61005353927612305e-21,M=16777216,D=1024,L=function(F){if(F!==F)return 32256;if(F===0)return(1/F===-1/0)<<15;var k=F<0;if(k&&(F=-F),F>=R)return k<<15|31744;if(F<O)return k<<15|b(F*M);var G=S(y(F));if(G===-15)return k<<15|D;var U=b((F*E(2,-G)-1)*D);return U===D?k<<15|G+16<<10:k<<15|G+15<<10|U},$=v(DataView.prototype.setUint16);g({target:"DataView",proto:!0},{setFloat16:function(k,G){$(p(this),x(k),L(+G),arguments.length>2?arguments[2]:!1)}})}),(function(T,w,a){var g=a(69),v=TypeError;T.exports=function(p){if(g(p)==="DataView")return p;throw new v("Argument is not a DataView")}}),(function(T){var w=Math.log,a=Math.LN2;T.exports=Math.log2||function(v){return w(v)/a}}),(function(T,w,a){var g=a(6),v=a(77),p=a(232),x=ArrayBuffer.prototype;g&&!("detached"in x)&&v(x,"detached",{configurable:!0,get:function(){return p(this)}})}),(function(T,w,a){var g=a(4),v=a(213),p=a(233),x=g.DataView;T.exports=function(y){if(!v||p(y)!==0)return!1;try{return new x(y),!1}catch(b){return!0}}}),(function(T,w,a){var g=a(4),v=a(119),p=a(15),x=g.ArrayBuffer,y=g.TypeError;T.exports=x&&v(x.prototype,"byteLength","get")||function(b){if(p(b)!=="ArrayBuffer")throw new y("ArrayBuffer expected");return b.byteLength}}),(function(T,w,a){var g=a(3),v=a(235);v&&g({target:"ArrayBuffer",proto:!0},{transfer:function(){return v(this,arguments.length?arguments[0]:void 0,!0)}})}),(function(T,w,a){var g=a(4),v=a(14),p=a(119),x=a(216),y=a(236),b=a(233),S=a(237),E=a(239),R=g.structuredClone,O=g.ArrayBuffer,M=g.DataView,D=Math.max,L=Math.min,$=O.prototype,F=M.prototype,k=v($.slice),G=p($,"resizable","get"),U=p($,"maxByteLength","get"),X=v(F.getInt8),j=v(F.setInt8);T.exports=(E||S)&&function(H,Y,Z){var Q=b(H),K=Y===void 0?Q:x(Y),tt=!G||!G(H),nt;if(y(H),E&&(H=R(H,{transfer:[H]}),Q===K&&(Z||tt)))return H;if(Q>=K&&(!Z||tt))nt=k(H,0,K);else{var rt=Z&&!tt&&U?{maxByteLength:D(K,U(H))}:void 0;nt=new O(K,rt);for(var it=new M(H),st=new M(nt),ct=L(K,Q),ht=0;ht<ct;ht++)j(st,ht,X(it,ht))}return E||S(H),nt}}),(function(T,w,a){var g=a(232),v=TypeError;T.exports=function(p){if(g(p))throw new v("ArrayBuffer is detached");return p}}),(function(T,w,a){var g=a(4),v=a(238),p=a(239),x=g.structuredClone,y=g.ArrayBuffer,b=g.MessageChannel,S=!1,E,R,O,M;if(p)S=function(D){x(D,{transfer:[D]})};else if(y)try{b||(E=v("worker_threads"),E&&(b=E.MessageChannel)),b&&(R=new b,O=new y(2),M=function(D){R.port1.postMessage(null,[D])},O.byteLength===2&&(M(O),O.byteLength===0&&(S=M)))}catch(D){}T.exports=S}),(function(T,w,a){var g=a(4),v=a(188);T.exports=function(p){if(v){try{return g.process.getBuiltinModule(p)}catch(x){}try{return Function('return require("'+p+'")')()}catch(x){}}}}),(function(T,w,a){var g=a(4),v=a(7),p=a(27),x=a(189),y=g.structuredClone;T.exports=!!y&&!v(function(){if(x==="DENO"&&p>92||x==="NODE"&&p>94||x==="BROWSER"&&p>97)return!1;var b=new ArrayBuffer(8),S=y(b,{transfer:[b]});return b.byteLength!==0||S.byteLength!==8})}),(function(T,w,a){var g=a(3),v=a(235);v&&g({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return v(this,arguments.length?arguments[0]:void 0,!1)}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(7),x=p(function(){return new Date(16e11).getYear()!==120}),y=v(Date.prototype.getFullYear);g({target:"Date",proto:!0,forced:x},{getYear:function(){return y(this)-1900}})}),(function(T,w,a){var g=a(3),v=a(14),p=Date,x=v(p.prototype.getTime);g({target:"Date",stat:!0},{now:function(){return x(new p)}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(61),x=Date.prototype,y=v(x.getTime),b=v(x.setFullYear);g({target:"Date",proto:!0},{setYear:function(E){y(this);var R=+E;if(R!==R)return b(this,R);var O=p(R),M=O>=0&&O<=99?O+1900:O;return b(this,M)}})}),(function(T,w,a){var g=a(3);g({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})}),(function(T,w,a){var g=a(3),v=a(246);g({target:"Date",proto:!0,forced:Date.prototype.toISOString!==v},{toISOString:v})}),(function(T,w,a){var g=a(14),v=a(7),p=a(247).start,x=RangeError,y=isFinite,b=Math.abs,S=Date.prototype,E=S.toISOString,R=g(S.getTime),O=g(S.getUTCDate),M=g(S.getUTCFullYear),D=g(S.getUTCHours),L=g(S.getUTCMilliseconds),$=g(S.getUTCMinutes),F=g(S.getUTCMonth),k=g(S.getUTCSeconds);T.exports=v(function(){return E.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!v(function(){E.call(new Date(NaN))})?function(){if(!y(R(this)))throw new x("Invalid time value");var U=this,X=M(U),j=L(U),H=X<0?"-":X>9999?"+":"";return H+p(b(X),H?6:4,0)+"-"+p(F(U)+1,2,0)+"-"+p(O(U),2,0)+"T"+p(D(U),2,0)+":"+p($(U),2,0)+":"+p(k(U),2,0)+"."+p(j,3,0)+"Z"}:E}),(function(T,w,a){var g=a(14),v=a(64),p=a(68),x=a(248),y=a(16),b=g(x),S=g("".slice),E=Math.ceil,R=function(O){return function(M,D,L){var $=p(y(M)),F=v(D),k=$.length;if(F<=k)return $;var G=L===void 0?" ":p(L),U,X;return G===""?$:(U=F-k,X=b(G,E(U/G.length)),X.length>U&&(X=S(X,0,U)),O?$+X:X+$)}};T.exports={start:R(!1),end:R(!0)}}),(function(T,w,a){var g=a(61),v=a(68),p=a(16),x=RangeError,y=Math.floor;T.exports=function(S){var E=v(p(this)),R="",O=g(S);if(O<0||O===1/0)throw new x("Wrong number of repetitions");for(;O>0;(O=y(O/2))&&(E+=E))O%2&&(R+=E);return R}}),(function(T,w,a){var g=a(3),v=a(7),p=a(39),x=a(19),y=v(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});g({target:"Date",proto:!0,arity:1,forced:y},{toJSON:function(S){var E=p(this),R=x(E,"number");return typeof R=="number"&&!isFinite(R)?null:E.toISOString()}})}),(function(T,w,a){var g=a(38),v=a(47),p=a(251),x=a(33),y=x("toPrimitive"),b=Date.prototype;g(b,y)||v(b,y,p)}),(function(T,w,a){var g=a(46),v=a(32),p=TypeError;T.exports=function(x){if(g(this),x==="string"||x==="default")x="string";else if(x!=="number")throw new p("Incorrect hint");return v(this,x)}}),(function(T,w,a){var g=a(14),v=a(47),p=Date.prototype,x="Invalid Date",y="toString",b=g(p[y]),S=g(p.getTime);String(new Date(NaN))!==x&&v(p,y,function(){var R=S(this);return R===R?b(this):x})}),(function(T,w,a){var g=a(3),v=a(6),p=a(23),x=a(30),y=a(215),b=a(47),S=a(214),E=a(77),R=a(33),O=a(51),M=a(254),D=p("SuppressedError"),L=ReferenceError,$=R("dispose"),F=R("toStringTag"),k="DisposableStack",G=O.set,U=O.getterFor(k),X="sync-dispose",j="disposed",H="pending",Y=function(K){var tt=U(K);if(tt.state===j)throw new L(k+" already disposed");return tt},Z=function(){G(y(this,Q),{type:k,state:H,stack:[]}),v||(this.disposed=!1)},Q=Z.prototype;S(Q,{dispose:function(){var tt=U(this);if(tt.state!==j){tt.state=j,v||(this.disposed=!0);for(var nt=tt.stack,rt=nt.length,it=!1,st;rt;){var ct=nt[--rt];nt[rt]=null;try{ct()}catch(ht){it?st=new D(ht,st):(it=!0,st=ht)}}if(tt.stack=null,it)throw st}},use:function(tt){return M(Y(this),tt,X),tt},adopt:function(tt,nt){var rt=Y(this);return x(nt),M(rt,void 0,X,function(){nt(tt)}),tt},defer:function(tt){var nt=Y(this);x(tt),M(nt,void 0,X,tt)},move:function(){var tt=Y(this),nt=new Z;return U(nt).stack=tt.stack,tt.stack=[],tt.state=j,v||(this.disposed=!0),nt}}),v&&E(Q,"disposed",{configurable:!0,get:function(){return U(this).state===j}}),b(Q,$,Q.dispose,{name:"dispose"}),b(Q,F,k,{nonWritable:!0}),g({global:!0,constructor:!0},{DisposableStack:Z})}),(function(T,w,a){var g=a(23),v=a(8),p=a(14),x=a(84),y=a(46),b=a(30),S=a(17),E=a(29),R=a(33),O=R("asyncDispose"),M=R("dispose"),D=p([].push),L=function(F,k){if(k==="async-dispose"){var G=E(F,O);return G!==void 0||(G=E(F,M),G===void 0)?G:function(){var U=this,X=g("Promise");return new X(function(j){v(G,U),j(void 0)})}}return E(F,M)},$=function(F,k,G){return arguments.length<3&&!S(F)&&(G=b(L(y(F),k))),G===void 0?function(){}:x(G,F)};T.exports=function(F,k,G,U){var X;if(arguments.length<4){if(S(k)&&G==="sync-dispose")return;X=$(k,G)}else X=$(void 0,G,U);D(F.stack,X)}}),(function(T,w,a){var g=a(3),v=a(14),p=a(68),x=v("".charAt),y=v("".charCodeAt),b=v(/./.exec),S=v(1.1.toString),E=v("".toUpperCase),R=/[\w*+\-./@]/,O=function(M,D){for(var L=S(M,16);L.length<D;)L="0"+L;return L};g({global:!0},{escape:function(D){for(var L=p(D),$="",F=L.length,k=0,G,U;k<F;)G=x(L,k++),b(R,G)?$+=G:(U=y(G,0),U<256?$+="%"+E(O(U,2)):$+="%u"+E(O(U,4)));return $}})}),(function(T,w,a){var g=a(3),v=a(257);g({target:"Function",proto:!0,forced:Function.bind!==v},{bind:v})}),(function(T,w,a){var g=a(14),v=a(30),p=a(20),x=a(38),y=a(76),b=a(9),S=Function,E=g([].concat),R=g([].join),O={},M=function(D,L,$){if(!x(O,L)){for(var F=[],k=0;k<L;k++)F[k]="a["+k+"]";O[L]=S("C,a","return new C("+R(F,",")+")")}return O[L](D,$)};T.exports=b?S.bind:function(L){var $=v(this),F=$.prototype,k=y(arguments,1),G=function(){var X=E(k,y(arguments));return this instanceof G?M($,X.length,X):$.apply(L,X)};return p(F)&&(G.prototype=F),G}}),(function(T,w,a){var g=a(21),v=a(20),p=a(44),x=a(24),y=a(33),b=a(48),S=y("hasInstance"),E=Function.prototype;S in E||p.f(E,S,{value:b(function(R){if(!g(this)||!v(R))return!1;var O=this.prototype;return v(O)?x(O,R):R instanceof this},S)})}),(function(T,w,a){var g=a(6),v=a(49).EXISTS,p=a(14),x=a(77),y=Function.prototype,b=p(y.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,E=p(S.exec),R="name";g&&!v&&x(y,R,{configurable:!0,get:function(){try{return E(S,b(this))[1]}catch(O){return""}}})}),(function(T,w,a){var g=a(3),v=a(4);g({global:!0,forced:v.globalThis!==v},{globalThis:v})}),(function(T,w,a){var g=a(3),v=a(4),p=a(215),x=a(46),y=a(21),b=a(134),S=a(77),E=a(90),R=a(7),O=a(38),M=a(33),D=a(178).IteratorPrototype,L=a(6),$=a(36),F="constructor",k="Iterator",G=M("toStringTag"),U=TypeError,X=v[k],j=$||!y(X)||X.prototype!==D||!R(function(){X({})}),H=function(){if(p(this,D),b(this)===D)throw new U("Abstract class Iterator not directly constructable")},Y=function(Z,Q){L?S(D,Z,{configurable:!0,get:function(){return Q},set:function(K){if(x(this),this===D)throw new U("You can't redefine this property");O(this,Z)?this[Z]=K:E(this,Z,K)}}):D[Z]=Q};O(D,G)||Y(G,k),(j||!O(D,F)||D[F]===Object)&&Y(F,H),H.prototype=D,g({global:!0,constructor:!0,forced:j},{Iterator:H})}),(function(T,w,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(140),b=a(263),S=a(36),E=Array,R=b(function(){for(;;){var O=this.iterator;if(!O){var M=this.nextIterableIndex++,D=this.iterables;if(M>=D.length){this.done=!0;return}var L=D[M];this.iterables[M]=null,O=this.iterator=x(v(L.method,L.iterable)),this.next=O.next}var $=x(v(this.next,O));if($.done){this.iterator=null,this.next=null;continue}return $.value}});g({target:"Iterator",stat:!0,forced:S},{concat:function(){for(var M=arguments.length,D=E(M),L=0;L<M;L++){var $=x(arguments[L]);D[L]={iterable:$,method:p(y($))}}return new R({iterables:D,nextIterableIndex:0,iterator:null,next:null})}})}),(function(T,w,a){var g=a(8),v=a(71),p=a(43),x=a(214),y=a(33),b=a(51),S=a(29),E=a(178).IteratorPrototype,R=a(179),O=a(141),M=a(264),D=y("toStringTag"),L="IteratorHelper",$="WrapForValidIterator",F="normal",k="throw",G=b.set,U=function(H){var Y=b.getterFor(H?$:L);return x(v(E),{next:function(){var Q=Y(this);if(H)return Q.nextHandler();if(Q.done)return R(void 0,!0);try{var K=Q.nextHandler();return Q.returnHandlerResult?K:R(K,Q.done)}catch(tt){throw Q.done=!0,tt}},return:function(){var Z=Y(this),Q=Z.iterator,K=Z.done;if(Z.done=!0,H){var tt=S(Q,"return");return tt?g(tt,Q):R(void 0,!0)}if(K)return R(void 0,!0);if(Z.inner)try{O(Z.inner.iterator,F)}catch(nt){return O(Q,k,nt)}if(Z.openIters)try{M(Z.openIters,F)}catch(nt){if(Q)return O(Q,k,nt);throw nt}return Q&&O(Q,F),R(void 0,!0)}})},X=U(!0),j=U(!1);p(j,D,"Iterator Helper"),T.exports=function(H,Y,Z){var Q=function(tt,nt){nt?(nt.iterator=tt.iterator,nt.next=tt.next):nt=tt,nt.type=Y?$:L,nt.returnHandlerResult=!!Z,nt.nextHandler=H,nt.counter=0,nt.done=!1,G(this,nt)};return Q.prototype=Y?X:j,Q}}),(function(T,w,a){var g=a(141);T.exports=function(v,p,x){for(var y=v.length-1;y>=0;y--)if(v[y]!==void 0)try{x=g(v[y].iterator,p,x)}catch(b){p="throw",x=b}if(p==="throw")throw x;return x}}),(function(T,w,a){var g=a(8),v=a(47),p=a(29),x=a(38),y=a(33),b=a(178).IteratorPrototype,S=y("dispose");x(b,S)||v(b,S,function(){var E=p(this,"return");E&&g(E,this)})}),(function(T,w,a){var g=a(3),v=a(8),p=a(46),x=a(267),y=a(268),b=a(269),S=a(141),E=a(263),R=a(270),O=a(271),M=a(36),D=!M&&!R("drop",0),L=!M&&!D&&O("drop",RangeError),$=M||D||L,F=E(function(){for(var k=this.iterator,G=this.next,U,X;this.remaining;)if(this.remaining--,U=p(v(G,k)),X=this.done=!!U.done,X)return;if(U=p(v(G,k)),X=this.done=!!U.done,!X)return U.value});g({target:"Iterator",proto:!0,real:!0,forced:$},{drop:function(G){p(this);var U;try{U=b(y(+G))}catch(X){S(this,"throw",X)}return L?v(L,this,U):new F(x(this),{remaining:U})}})}),(function(T){T.exports=function(w){return{iterator:w,next:w.next,done:!1}}}),(function(T){var w=RangeError;T.exports=function(a){if(a===a)return a;throw new w("NaN is not allowed")}}),(function(T,w,a){var g=a(61),v=RangeError;T.exports=function(p){var x=g(p);if(x<0)throw new v("The argument can't be less than 0");return x}}),(function(T){T.exports=function(w,a){var g=typeof Iterator=="function"&&Iterator.prototype[w];if(g)try{g.call({next:null},a).next()}catch(v){return!0}}}),(function(T,w,a){var g=a(4);T.exports=function(v,p){var x=g.Iterator,y=x&&x.prototype,b=y&&y[v],S=!1;if(b)try{b.call({next:function(){return{done:!0}},return:function(){S=!0}},-1)}catch(E){E instanceof p||(S=!1)}if(!S)return b}}),(function(T,w,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),S=a(141),E=a(271),R=E("every",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{every:function(M){y(this);try{x(M)}catch($){S(this,"throw",$)}if(R)return v(R,this,M);var D=b(this),L=0;return!p(D,function($,F){if(!M($,L++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),b=a(263),S=a(170),E=a(36),R=a(141),O=a(270),M=a(271),D=!E&&!O("filter",function(){}),L=!E&&!D&&M("filter",TypeError),$=E||D||L,F=b(function(){for(var k=this.iterator,G=this.predicate,U=this.next,X,j,H;;){if(X=x(v(U,k)),j=this.done=!!X.done,j)return;if(H=X.value,S(k,G,[H,this.counter++],!0))return H}});g({target:"Iterator",proto:!0,real:!0,forced:$},{filter:function(G){x(this);try{p(G)}catch(U){R(this,"throw",U)}return L?v(L,this,G):new F(y(this),{predicate:G})}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),S=a(141),E=a(271),R=E("find",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{find:function(M){y(this);try{x(M)}catch($){S(this,"throw",$)}if(R)return v(R,this,M);var D=b(this),L=0;return p(D,function($,F){if(M($,L++))return F($)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),b=a(276),S=a(263),E=a(141),R=a(36),O=a(270),M=a(271);function D(){try{var G=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(U){return U});G.next(),G.return()}catch(U){return!0}}var L=!R&&!O("flatMap",function(){}),$=!R&&!L&&M("flatMap",TypeError),F=R||L||$||D(),k=S(function(){for(var G=this.iterator,U=this.mapper,X,j;;){if(j=this.inner)try{if(X=x(v(j.next,j.iterator)),!X.done)return X.value;this.inner=null}catch(H){E(G,"throw",H)}if(X=x(v(this.next,G)),this.done=!!X.done)return;try{this.inner=b(U(X.value,this.counter++),!1)}catch(H){E(G,"throw",H)}}});g({target:"Iterator",proto:!0,real:!0,forced:F},{flatMap:function(U){x(this);try{p(U)}catch(X){E(this,"throw",X)}return $?v($,this,U):new k(y(this),{mapper:U,inner:null})}})}),(function(T,w,a){var g=a(8),v=a(46),p=a(267),x=a(140);T.exports=function(y,b){(!b||typeof y!="string")&&v(y);var S=x(y);return p(v(S!==void 0?g(S,y):y))}}),(function(T,w,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),S=a(141),E=a(271),R=E("forEach",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{forEach:function(M){y(this);try{x(M)}catch($){S(this,"throw",$)}if(R)return v(R,this,M);var D=b(this),L=0;p(D,function($){M($,L++)},{IS_RECORD:!0})}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(39),x=a(24),y=a(178).IteratorPrototype,b=a(263),S=a(276),E=a(36),R=E||(function(){try{Iterator.from({return:null}).return()}catch(M){return!0}})(),O=b(function(){return v(this.next,this.iterator)},!0);g({target:"Iterator",stat:!0,forced:R},{from:function(D){var L=S(typeof D=="string"?p(D):D,!0);return x(y,L.iterator)?L.iterator:new O(L)}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),b=a(263),S=a(170),E=a(141),R=a(270),O=a(271),M=a(36),D=!M&&!R("map",function(){}),L=!M&&!D&&O("map",TypeError),$=M||D||L,F=b(function(){var k=this.iterator,G=x(v(this.next,k)),U=this.done=!!G.done;if(!U)return S(k,this.mapper,[G.value,this.counter++],!0)});g({target:"Iterator",proto:!0,real:!0,forced:$},{map:function(G){x(this);try{p(G)}catch(U){E(this,"throw",U)}return L?v(L,this,G):new F(y(this),{mapper:G})}})}),(function(T,w,a){var g=a(3),v=a(136),p=a(30),x=a(46),y=a(267),b=a(141),S=a(271),E=a(95),R=a(7),O=TypeError,M=R(function(){[].keys().reduce(function(){},void 0)}),D=!M&&S("reduce",O);g({target:"Iterator",proto:!0,real:!0,forced:M||D},{reduce:function($){x(this);try{p($)}catch(X){b(this,"throw",X)}var F=arguments.length<2,k=F?void 0:arguments[1];if(D)return E(D,this,F?[$]:[$,k]);var G=y(this),U=0;if(v(G,function(X){F?(F=!1,k=X):k=$(k,X,U),U++},{IS_RECORD:!0}),F)throw new O("Reduce of empty iterator with no initial value");return k}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),S=a(141),E=a(271),R=E("some",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{some:function(M){y(this);try{x(M)}catch($){S(this,"throw",$)}if(R)return v(R,this,M);var D=b(this),L=0;return p(D,function($,F){if(M($,L++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(46),x=a(267),y=a(268),b=a(269),S=a(263),E=a(141),R=a(270),O=a(271),M=a(36),D=!M&&!R("take",1),L=!M&&!D&&O("take",RangeError),$=M||D||L,F=S(function(){var k=this.iterator;if(!this.remaining--)return this.done=!0,E(k,"normal",void 0);var G=p(v(this.next,k)),U=this.done=!!G.done;if(!U)return G.value});g({target:"Iterator",proto:!0,real:!0,forced:$},{take:function(G){p(this);var U;try{U=b(y(+G))}catch(X){E(this,"throw",X)}return L?v(L,this,U):new F(x(this),{remaining:U})}})}),(function(T,w,a){var g=a(3),v=a(46),p=a(90),x=a(136),y=a(267);g({target:"Iterator",proto:!0,real:!0},{toArray:function(){var S=[],E=0;return x(y(v(this)),function(R){p(S,E++,R)},{IS_RECORD:!0}),S}})}),(function(T,w,a){var g=a(3),v=a(98),p=a(96);g({target:"JSON",stat:!0,forced:!v},{isRawJSON:p})}),(function(T,w,a){var g=a(3),v=a(6),p=a(4),x=a(23),y=a(14),b=a(8),S=a(21),E=a(20),R=a(88),O=a(38),M=a(68),D=a(63),L=a(90),$=a(7),F=a(97),k=a(26),G=p.JSON,U=p.Number,X=p.SyntaxError,j=G&&G.parse,H=x("Object","keys"),Y=Object.getOwnPropertyDescriptor,Z=y("".charAt),Q=y("".slice),K=y(/./.exec),tt=y([].push),nt=/^\d$/,rt=/^[1-9]$/,it=/^[\d-]$/,st=/^[\t\n\r ]$/,ct=0,ht=1,gt=function(pt,mt){pt=M(pt);var Ot=new Ft(pt,0,""),Bt=Ot.parse(),Qt=Bt.value,wt=Ot.skip(st,Bt.end);if(wt<pt.length)throw new X('Unexpected extra character: "'+Z(pt,wt)+'" after the parsed data at: '+wt);return S(mt)?yt({"":Qt},"",mt,Bt):Qt},yt=function(pt,mt,Ot,Bt){var Qt=pt[mt],wt=Bt&&Qt===Bt.value,Wt=wt&&typeof Bt.source=="string"?{source:Bt.source}:{},ae,pe,oe,de,Re;if(E(Qt)){var Pe=R(Qt),Ee=wt?Bt.nodes:Pe?[]:{};if(Pe)for(ae=Ee.length,oe=D(Qt),de=0;de<oe;de++)Ct(Qt,de,yt(Qt,""+de,Ot,de<ae?Ee[de]:void 0));else for(pe=H(Qt),oe=D(pe),de=0;de<oe;de++)Re=pe[de],Ct(Qt,Re,yt(Qt,Re,Ot,O(Ee,Re)?Ee[Re]:void 0))}return b(Ot,pt,mt,Qt,Wt)},Ct=function(pt,mt,Ot){if(v){var Bt=Y(pt,mt);if(Bt&&!Bt.configurable)return}Ot===void 0?delete pt[mt]:L(pt,mt,Ot)},Tt=function(pt,mt,Ot,Bt){this.value=pt,this.end=mt,this.source=Ot,this.nodes=Bt},Ft=function(pt,mt){this.source=pt,this.index=mt};Ft.prototype={fork:function(pt){return new Ft(this.source,pt)},parse:function(){var pt=this.source,mt=this.skip(st,this.index),Ot=this.fork(mt),Bt=Z(pt,mt);if(K(it,Bt))return Ot.number();switch(Bt){case"{":return Ot.object();case"[":return Ot.array();case'"':return Ot.string();case"t":return Ot.keyword(!0);case"f":return Ot.keyword(!1);case"n":return Ot.keyword(null)}throw new X('Unexpected character: "'+Bt+'" at: '+mt)},node:function(pt,mt,Ot,Bt,Qt){return new Tt(mt,Bt,pt?null:Q(this.source,Ot,Bt),Qt)},object:function(){for(var pt=this.source,mt=this.index+1,Ot=!1,Bt={},Qt={},wt=!1;mt<pt.length;){if(mt=this.until(['"',"}"],mt),Z(pt,mt)==="}"&&!Ot){mt++,wt=!0;break}var Wt=this.fork(mt).string(),ae=Wt.value;mt=Wt.end,mt=this.until([":"],mt)+1,mt=this.skip(st,mt),Wt=this.fork(mt).parse(),L(Qt,ae,Wt),L(Bt,ae,Wt.value),mt=this.until([",","}"],Wt.end);var pe=Z(pt,mt);if(pe===",")Ot=!0,mt++;else if(pe==="}"){mt++,wt=!0;break}}if(!wt)throw new X("Unterminated object at: "+mt);return this.node(ht,Bt,this.index,mt,Qt)},array:function(){for(var pt=this.source,mt=this.index+1,Ot=!1,Bt=[],Qt=[],wt=!1;mt<pt.length;){if(mt=this.skip(st,mt),Z(pt,mt)==="]"&&!Ot){mt++,wt=!0;break}var Wt=this.fork(mt).parse();if(tt(Qt,Wt),tt(Bt,Wt.value),mt=this.until([",","]"],Wt.end),Z(pt,mt)===",")Ot=!0,mt++;else if(Z(pt,mt)==="]"){mt++,wt=!0;break}}if(!wt)throw new X("Unterminated array at: "+mt);return this.node(ht,Bt,this.index,mt,Qt)},string:function(){var pt=this.index,mt=F(this.source,this.index+1);return this.node(ct,mt.value,pt,mt.end)},number:function(){var pt=this.source,mt=this.index,Ot=mt;if(Z(pt,Ot)==="-"&&Ot++,Z(pt,Ot)==="0")Ot++;else if(K(rt,Z(pt,Ot)))Ot=this.skip(nt,Ot+1);else throw new X("Failed to parse number at: "+Ot);if(Z(pt,Ot)==="."){var Bt=Ot+1;if(Ot=this.skip(nt,Bt),Bt===Ot)throw new X("Failed to parse number's fraction at: "+Ot)}if(Z(pt,Ot)==="e"||Z(pt,Ot)==="E"){Ot++,(Z(pt,Ot)==="+"||Z(pt,Ot)==="-")&&Ot++;var Qt=Ot;if(Ot=this.skip(nt,Ot),Qt===Ot)throw new X("Failed to parse number's exponent value at: "+Ot)}return this.node(ct,U(Q(pt,mt,Ot)),mt,Ot)},keyword:function(pt){var mt=""+pt,Ot=this.index,Bt=Ot+mt.length;if(Q(this.source,Ot,Bt)!==mt)throw new X("Failed to parse value at: "+Ot);return this.node(ct,pt,Ot,Bt)},skip:function(pt,mt){for(var Ot=this.source;mt<Ot.length&&K(pt,Z(Ot,mt));mt++);return mt},until:function(pt,mt){mt=this.skip(st,mt);for(var Ot=Z(this.source,mt),Bt=0;Bt<pt.length;Bt++)if(pt[Bt]===Ot)return mt;throw new X('Unexpected character: "'+Ot+'" at: '+mt)}};var Lt=$(function(){var pt="9007199254740993",mt;return j(pt,function(Ot,Bt,Qt){mt=Qt.source}),mt!==pt}),Pt=k&&!$(function(){return 1/j("-0 ")!==-1/0});g({target:"JSON",stat:!0,forced:Lt},{parse:function(mt,Ot){return Pt&&!S(Ot)?j(mt):gt(mt,Ot)}})}),(function(T,w,a){var g=a(3),v=a(287),p=a(98),x=a(23),y=a(14),b=a(68),S=a(90),E=a(51).set,R=SyntaxError,O=x("JSON","parse"),M=x("Object","create"),D=x("Object","freeze"),L=y("".charAt),$="Unacceptable as raw JSON",F=function(k){return k===" "||k===" "||k===`
|
|
26
|
-
`||k==="\r"};g({target:"JSON",stat:!0,forced:!p},{rawJSON:function(G){var U=b(G);if(U===""||F(L(U,0))||F(L(U,U.length-1)))throw new R($);var X=O(U);if(typeof X=="object"&&X!==null)throw new R($);var j=M(null);return E(j,{type:"RawJSON"}),S(j,"rawJSON",U),v?D(j):j}})}),(function(T,w,a){var g=a(7);T.exports=!g(function(){return Object.isExtensible(Object.preventExtensions({}))})}),(function(T,w,a){var g=a(4),v=a(82);v(g.JSON,"JSON",!0)}),(function(T,w,a){a(290)}),(function(T,w,a){var g=a(291),v=a(295);g("Map",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},v)}),(function(T,w,a){var g=a(3),v=a(4),p=a(14),x=a(67),y=a(47),b=a(292),S=a(136),E=a(215),R=a(21),O=a(17),M=a(20),D=a(7),L=a(171),$=a(82),F=a(123);T.exports=function(k,G,U){var X=k.indexOf("Map")!==-1,j=k.indexOf("Weak")!==-1,H=X?"set":"add",Y=v[k],Z=Y&&Y.prototype,Q=Y,K={},tt=function(gt){var yt=p(Z[gt]);y(Z,gt,gt==="add"?function(Tt){return yt(this,Tt===0?0:Tt),this}:gt==="delete"?function(Ct){return j&&!M(Ct)?!1:yt(this,Ct===0?0:Ct)}:gt==="get"?function(Tt){return j&&!M(Tt)?void 0:yt(this,Tt===0?0:Tt)}:gt==="has"?function(Tt){return j&&!M(Tt)?!1:yt(this,Tt===0?0:Tt)}:function(Tt,Ft){return yt(this,Tt===0?0:Tt,Ft),this})},nt=x(k,!R(Y)||!(j||Z.forEach&&!D(function(){new Y().entries().next()})));if(nt)Q=U.getConstructor(G,k,X,H),b.enable();else if(x(k,!0)){var rt=new Q,it=rt[H](j?{}:-0,1)!==rt,st=D(function(){rt.has(1)}),ct=L(function(gt){new Y(gt)}),ht=!j&&D(function(){for(var gt=new Y,yt=5;yt--;)gt[H](yt,yt);return!gt.has(-0)});ct||(Q=G(function(gt,yt){E(gt,Z);var Ct=F(new Y,gt,Q);return O(yt)||S(yt,Ct[H],{that:Ct,AS_ENTRIES:X}),Ct}),Q.prototype=Z,Z.constructor=Q),(st||ht)&&(tt("delete"),tt("has"),X&&tt("get")),(ht||it)&&tt(H),j&&Z.clear&&delete Z.clear}return K[k]=Q,g({global:!0,constructor:!0,forced:Q!==Y},K),$(Q,k),j||U.setStrong(Q,k,X),Q}}),(function(T,w,a){var g=a(3),v=a(14),p=a(54),x=a(20),y=a(38),b=a(44).f,S=a(57),E=a(75),R=a(293),O=a(40),M=a(287),D=!1,L=O("meta"),$=0,F=function(H){b(H,L,{value:{objectID:"O"+$++,weakData:{}}})},k=function(H,Y){if(!x(H))return typeof H=="symbol"?H:(typeof H=="string"?"S":"P")+H;if(!y(H,L)){if(!R(H))return"F";if(!Y)return"E";F(H)}return H[L].objectID},G=function(H,Y){if(!y(H,L)){if(!R(H))return!0;if(!Y)return!1;F(H)}return H[L].weakData},U=function(H){return M&&D&&R(H)&&!y(H,L)&&F(H),H},X=function(){j.enable=function(){},D=!0;var H=S.f,Y=v([].splice),Z={};Z[L]=1,H(Z).length&&(S.f=function(Q){for(var K=H(Q),tt=0,nt=K.length;tt<nt;tt++)if(K[tt]===L){Y(K,tt,1);break}return K},g({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:E.f}))},j=T.exports={enable:X,fastKey:k,getWeakData:G,onFreeze:U};p[L]=!0}),(function(T,w,a){var g=a(7),v=a(20),p=a(15),x=a(294),y=Object.isExtensible,b=g(function(){y(1)});T.exports=b||x?function(E){return!v(E)||x&&p(E)==="ArrayBuffer"?!1:y?y(E):!0}:y}),(function(T,w,a){var g=a(7);T.exports=g(function(){if(typeof ArrayBuffer=="function"){var v=new ArrayBuffer(8);Object.isExtensible(v)&&Object.defineProperty(v,"a",{value:8})}})}),(function(T,w,a){var g=a(71),v=a(77),p=a(214),x=a(84),y=a(215),b=a(17),S=a(136),E=a(176),R=a(179),O=a(200),M=a(6),D=a(292).fastKey,L=a(51),$=L.set,F=L.getterFor;T.exports={getConstructor:function(k,G,U,X){var j=k(function(K,tt){y(K,H),$(K,{type:G,index:g(null),first:null,last:null,size:0}),M||(K.size=0),b(tt)||S(tt,K[X],{that:K,AS_ENTRIES:U})}),H=j.prototype,Y=F(G),Z=function(K,tt,nt){var rt=Y(K),it=Q(K,tt),st,ct;return it?it.value=nt:(rt.last=it={index:ct=D(tt,!0),key:tt,value:nt,previous:st=rt.last,next:null,removed:!1},rt.first||(rt.first=it),st&&(st.next=it),M?rt.size++:K.size++,ct!=="F"&&(rt.index[ct]=it)),K},Q=function(K,tt){var nt=Y(K),rt=D(tt),it;if(rt!=="F")return nt.index[rt];for(it=nt.first;it;it=it.next)if(it.key===tt)return it};return p(H,{clear:function(){for(var tt=this,nt=Y(tt),rt=nt.first;rt;)rt.removed=!0,rt.previous&&(rt.previous=rt.previous.next=null),rt=rt.next;nt.first=nt.last=null,nt.index=g(null),M?nt.size=0:tt.size=0},delete:function(K){var tt=this,nt=Y(tt),rt=Q(tt,K);if(rt){var it=rt.next,st=rt.previous;delete nt.index[rt.index],rt.removed=!0,st&&(st.next=it),it&&(it.previous=st),nt.first===rt&&(nt.first=it),nt.last===rt&&(nt.last=st),M?nt.size--:tt.size--}return!!rt},forEach:function(tt){for(var nt=Y(this),rt=x(tt,arguments.length>1?arguments[1]:void 0),it;it=it?it.next:nt.first;)for(rt(it.value,it.key,this);it&&it.removed;)it=it.previous},has:function(tt){return!!Q(this,tt)}}),p(H,U?{get:function(tt){var nt=Q(this,tt);return nt&&nt.value},set:function(tt,nt){return Z(this,tt===0?0:tt,nt)}}:{add:function(tt){return Z(this,tt=tt===0?0:tt,tt)}}),M&&v(H,"size",{configurable:!0,get:function(){return Y(this).size}}),j},setStrong:function(k,G,U){var X=G+" Iterator",j=F(G),H=F(X);E(k,G,function(Y,Z){$(this,{type:X,target:Y,state:j(Y),kind:Z,last:null})},function(){for(var Y=H(this),Z=Y.kind,Q=Y.last;Q&&Q.removed;)Q=Q.previous;return!Y.target||!(Y.last=Q=Q?Q.next:Y.state.first)?(Y.target=null,R(void 0,!0)):R(Z==="keys"?Q.key:Z==="values"?Q.value:[Q.key,Q.value],!1)},U?"entries":"values",!U,!0),O(G)}}}),(function(T,w,a){var g=a(3),v=a(14),p=a(30),x=a(16),y=a(136),b=a(297),S=a(36),E=a(7),R=b.Map,O=b.has,M=b.get,D=b.set,L=v([].push),$=S||E(function(){return R.groupBy("ab",function(F){return F}).get("a").length!==1});g({target:"Map",stat:!0,forced:S||$},{groupBy:function(k,G){x(k),p(G);var U=new R,X=0;return y(k,function(j){var H=G(j,X++);O(U,H)?L(M(U,H),j):D(U,H,[j])}),U}})}),(function(T,w,a){var g=a(14),v=Map.prototype;T.exports={Map,set:g(v.set),get:g(v.get),has:g(v.has),remove:g(v.delete),proto:v}}),(function(T,w,a){var g=a(3),v=a(297),p=a(36),x=v.get,y=v.has,b=v.set;g({target:"Map",proto:!0,real:!0,forced:p},{getOrInsert:function(E,R){return y(this,E)?x(this,E):(b(this,E,R),R)}})}),(function(T,w,a){var g=a(3),v=a(30),p=a(297),x=a(36),y=p.get,b=p.has,S=p.set;g({target:"Map",proto:!0,real:!0,forced:x},{getOrInsertComputed:function(R,O){var M=b(this,R);if(v(O),M)return y(this,R);R===0&&1/R===-1/0&&(R=0);var D=O(R);return S(this,R,D),D}})}),(function(T,w,a){var g=a(3),v=a(301),p=Math.acosh,x=Math.log,y=Math.sqrt,b=Math.LN2,S=!p||Math.floor(p(Number.MAX_VALUE))!==710||p(1/0)!==1/0;g({target:"Math",stat:!0,forced:S},{acosh:function(R){var O=+R;return O<1?NaN:O>9490626562425156e-8?x(O)+b:v(O-1+y(O-1)*y(O+1))}})}),(function(T){var w=Math.log;T.exports=Math.log1p||function(g){var v=+g;return v>-1e-8&&v<1e-8?v-v*v/2:w(1+v)}}),(function(T,w,a){var g=a(3),v=Math.asinh,p=Math.log,x=Math.sqrt,y=Math.LN2,b=9490626562425156e-8;function S(R){var O=+R;return!isFinite(O)||O===0?O:O<0?-S(-O):O>b?p(O)+y:p(O+x(O*O+1))}var E=!(v&&1/v(0)>0);g({target:"Math",stat:!0,forced:E},{asinh:S})}),(function(T,w,a){var g=a(3),v=a(301),p=Math.atanh,x=!(p&&1/p(-0)<0);g({target:"Math",stat:!0,forced:x},{atanh:function(b){var S=+b;return S===0?S:v(2*S/(1-S))/2}})}),(function(T,w,a){var g=a(3),v=a(219),p=Math.abs,x=Math.pow;g({target:"Math",stat:!0},{cbrt:function(b){var S=+b;return v(S)*x(p(S),.3333333333333333)}})}),(function(T,w,a){var g=a(3),v=Math.floor,p=Math.log,x=Math.LOG2E;g({target:"Math",stat:!0},{clz32:function(b){var S=b>>>0;return S?31-v(p(S+.5)*x):32}})}),(function(T,w,a){var g=a(3),v=a(307),p=Math.cosh,x=Math.abs,y=Math.E,b=!p||p(710)===1/0;g({target:"Math",stat:!0,forced:b},{cosh:function(E){var R=v(x(E)-1)+1;return(R+1/(R*y*y))*(y/2)}})}),(function(T){var w=Math.expm1,a=Math.exp;T.exports=!w||w(10)>22025.465794806718||w(10)<22025.465794806718||w(-2e-17)!==-2e-17?function(v){var p=+v;return p===0?p:p>-1e-6&&p<1e-6?p+p*p/2:a(p)-1}:w}),(function(T,w,a){var g=a(3),v=a(307);g({target:"Math",stat:!0,forced:v!==Math.expm1},{expm1:v})}),(function(T,w,a){var g=a(3),v=a(217);g({target:"Math",stat:!0},{fround:v})}),(function(T,w,a){var g=a(3),v=a(218),p=.0009765625,x=65504,y=6103515625e-14;g({target:"Math",stat:!0},{f16round:function(S){return v(S,p,x,y)}})}),(function(T,w,a){var g=a(3),v=Math.hypot,p=Math.abs,x=Math.sqrt,y=!!v&&v(1/0,NaN)!==1/0;g({target:"Math",stat:!0,arity:2,forced:y},{hypot:function(S,E){for(var R=0,O=0,M=arguments.length,D=0,L,$;O<M;)L=p(arguments[O++]),D<L?($=D/L,R=R*$*$+1,D=L):L>0?($=L/D,R+=$*$):R+=L;return D===1/0?1/0:D*x(R)}})}),(function(T,w,a){var g=a(3),v=a(7),p=Math.imul,x=v(function(){return p(4294967295,5)!==-5||p.length!==2});g({target:"Math",stat:!0,forced:x},{imul:function(b,S){var E=65535,R=+b,O=+S,M=E&R,D=E&O;return 0|M*D+((E&R>>>16)*D+M*(E&O>>>16)<<16>>>0)}})}),(function(T,w,a){var g=a(3),v=a(314);g({target:"Math",stat:!0},{log10:v})}),(function(T){var w=Math.log,a=Math.LOG10E;T.exports=Math.log10||function(v){return w(v)*a}}),(function(T,w,a){var g=a(3),v=a(301);g({target:"Math",stat:!0},{log1p:v})}),(function(T,w,a){var g=a(3),v=a(230);g({target:"Math",stat:!0},{log2:v})}),(function(T,w,a){var g=a(3),v=a(219);g({target:"Math",stat:!0},{sign:v})}),(function(T,w,a){var g=a(3),v=a(7),p=a(307),x=Math.abs,y=Math.exp,b=Math.E,S=v(function(){return Math.sinh(-2e-17)!==-2e-17});g({target:"Math",stat:!0,forced:S},{sinh:function(R){var O=+R;return x(O)<1?(p(O)-p(-O))/2:(y(O-1)-y(-O-1))*(b/2)}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(136),x=RangeError,y=TypeError,b=1/0,S=NaN,E=Math.abs,R=Math.pow,O=v([].push),M=R(2,1023),D=R(2,53)-1,L=Number.MAX_VALUE,$=R(2,971),F={},k={},G={},U={},X={},j=function(H,Y){var Z=H+Y,Q=Y-(Z-H);return{hi:Z,lo:Q}};g({target:"Math",stat:!0},{sumPrecise:function(Y){var Z=[],Q=0,K=U;switch(p(Y,function(pt){if(++Q>D)throw new x("Maximum allowed index exceeded");if(typeof pt!="number")throw new y("Value is not a number");K!==F&&(pt!==pt?K=F:pt===b?K=K===k?F:G:pt===-b?K=K===G?F:k:(pt!==0||1/pt===b)&&(K===U||K===X)&&(K=X,O(Z,pt)))}),K){case F:return S;case k:return-b;case G:return b;case U:return-0}for(var tt=[],nt=0,rt,it,st,ct,ht,gt,yt=0;yt<Z.length;yt++){rt=Z[yt];for(var Ct=0,Tt=0;Tt<tt.length;Tt++){if(it=tt[Tt],E(rt)<E(it)&&(gt=rt,rt=it,it=gt),st=j(rt,it),ct=st.hi,ht=st.lo,E(ct)===b){var Ft=ct===b?1:-1;nt+=Ft,rt=rt-Ft*M-Ft*M,E(rt)<E(it)&&(gt=rt,rt=it,it=gt),st=j(rt,it),ct=st.hi,ht=st.lo}ht!==0&&(tt[Ct++]=ht),rt=ct}tt.length=Ct,rt!==0&&O(tt,rt)}var Lt=tt.length-1;if(ct=0,ht=0,nt!==0){var Pt=Lt>=0?tt[Lt]:0;if(Lt--,E(nt)>1||nt>0&&Pt>0||nt<0&&Pt<0)return nt>0?b:-b;if(st=j(nt*M,Pt/2),ct=st.hi,ht=st.lo,ht*=2,E(2*ct)===b)return ct>0?ct===M&&ht===-($/2)&&Lt>=0&&tt[Lt]<0?L:b:ct===-M&&ht===$/2&&Lt>=0&&tt[Lt]>0?-L:-b;ht!==0&&(tt[++Lt]=ht,ht=0),ct*=2}for(;Lt>=0&&(st=j(ct,tt[Lt--]),ct=st.hi,ht=st.lo,ht===0););return Lt>=0&&(ht<0&&tt[Lt]<0||ht>0&&tt[Lt]>0)&&(it=ht*2,rt=ct+it,it===rt-ct&&(ct=rt)),ct}})}),(function(T,w,a){var g=a(3),v=a(307),p=Math.exp;g({target:"Math",stat:!0},{tanh:function(y){var b=+y,S=v(b),E=v(-b);return S===1/0?1:E===1/0?-1:(S-E)/(p(b)+p(-b))}})}),(function(T,w,a){var g=a(82);g(Math,"Math",!0)}),(function(T,w,a){var g=a(3),v=a(62);g({target:"Math",stat:!0},{trunc:v})}),(function(T,w,a){var g=a(3),v=a(36),p=a(6),x=a(4),y=a(80),b=a(14),S=a(67),E=a(38),R=a(123),O=a(24),M=a(22),D=a(19),L=a(7),$=a(57).f,F=a(5).f,k=a(44).f,G=a(324),U=a(325).trim,X="Number",j=x[X],H=y[X],Y=j.prototype,Z=x.TypeError,Q=b("".slice),K=b("".charCodeAt),tt=function(ht){var gt=D(ht,"number");return typeof gt=="bigint"?gt:nt(gt)},nt=function(ht){var gt=D(ht,"number"),yt,Ct,Tt,Ft,Lt,Pt,pt,mt;if(M(gt))throw new Z("Cannot convert a Symbol value to a number");if(typeof gt=="string"&>.length>2){if(gt=U(gt),yt=K(gt,0),yt===43||yt===45){if(Ct=K(gt,2),Ct===88||Ct===120)return NaN}else if(yt===48){switch(K(gt,1)){case 66:case 98:Tt=2,Ft=49;break;case 79:case 111:Tt=8,Ft=55;break;default:return+gt}for(Lt=Q(gt,2),Pt=Lt.length,pt=0;pt<Pt;pt++)if(mt=K(Lt,pt),mt<48||mt>Ft)return NaN;return parseInt(Lt,Tt)}}return+gt},rt=S(X,!j(" 0o1")||!j("0b1")||j("+0x1")),it=function(ht){return O(Y,ht)&&L(function(){G(ht)})},st=function(gt){var yt=arguments.length<1?0:j(tt(gt));return it(this)?R(Object(yt),this,st):yt};st.prototype=Y,rt&&!v&&(Y.constructor=st),g({global:!0,constructor:!0,wrap:!0,forced:rt},{Number:st});var ct=function(ht,gt){for(var yt=p?$(gt):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Ct=0,Tt;yt.length>Ct;Ct++)E(gt,Tt=yt[Ct])&&!E(ht,Tt)&&k(ht,Tt,F(gt,Tt))};v&&H&&ct(y[X],H),(rt||v)&&ct(y[X],j)}),(function(T,w,a){var g=a(14);T.exports=g(1.1.valueOf)}),(function(T,w,a){var g=a(14),v=a(16),p=a(68),x=a(326),y=g("".replace),b=RegExp("^["+x+"]+"),S=RegExp("(^|[^"+x+"])["+x+"]+$"),E=function(R){return function(O){var M=p(v(O));return R&1&&(M=y(M,b,"")),R&2&&(M=y(M,S,"$1")),M}};T.exports={start:E(1),end:E(2),trim:E(3)}}),(function(T){T.exports=`
|
|
27
|
-
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`}),(function(T,w,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})}),(function(T,w,a){var g=a(3),v=a(329);g({target:"Number",stat:!0},{isFinite:v})}),(function(T,w,a){var g=a(4),v=g.isFinite;T.exports=Number.isFinite||function(x){return typeof x=="number"&&v(x)}}),(function(T,w,a){var g=a(3),v=a(331);g({target:"Number",stat:!0},{isInteger:v})}),(function(T,w,a){var g=a(20),v=Math.floor;T.exports=Number.isInteger||function(x){return!g(x)&&isFinite(x)&&v(x)===x}}),(function(T,w,a){var g=a(3);g({target:"Number",stat:!0},{isNaN:function(p){return p!==p}})}),(function(T,w,a){var g=a(3),v=a(331),p=Math.abs;g({target:"Number",stat:!0},{isSafeInteger:function(y){return v(y)&&p(y)<=9007199254740991}})}),(function(T,w,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})}),(function(T,w,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})}),(function(T,w,a){var g=a(3),v=a(337);g({target:"Number",stat:!0,forced:Number.parseFloat!==v},{parseFloat:v})}),(function(T,w,a){var g=a(4),v=a(7),p=a(14),x=a(68),y=a(325).trim,b=a(326),S=p("".charAt),E=g.parseFloat,R=g.Symbol,O=R&&R.iterator,M=1/E(b+"-0")!==-1/0||O&&!v(function(){E(Object(O))});T.exports=M?function(L){var $=y(x(L)),F=E($);return F===0&&S($,0)==="-"?-0:F}:E}),(function(T,w,a){var g=a(3),v=a(339);g({target:"Number",stat:!0,forced:Number.parseInt!==v},{parseInt:v})}),(function(T,w,a){var g=a(4),v=a(7),p=a(14),x=a(68),y=a(325).trim,b=a(326),S=g.parseInt,E=g.Symbol,R=E&&E.iterator,O=/^[+-]?0x/i,M=p(O.exec),D=S(b+"08")!==8||S(b+"0x16")!==22||R&&!v(function(){S(Object(R))});T.exports=D?function($,F){var k=y(x($));return S(k,F>>>0||(M(O,k)?16:10))}:S}),(function(T,w,a){var g=a(3),v=a(14),p=a(61),x=a(324),y=a(248),b=a(314),S=a(7),E=RangeError,R=String,O=isFinite,M=Math.abs,D=Math.floor,L=Math.pow,$=Math.round,F=v(1.1.toExponential),k=v(y),G=v("".slice),U=L(10,308),X=F(-69e-12,4)==="-6.9000e-11"&&F(1.255,2)==="1.25e+0"&&F(12345,3)==="1.235e+4"&&F(25,0)==="3e+1",j=function(){return S(function(){F(1,1/0)})&&S(function(){F(1,-1/0)})},H=function(){return!S(function(){F(1/0,1/0),F(NaN,1/0)})},Y=!X||!j()||!H();g({target:"Number",proto:!0,forced:Y},{toExponential:function(Q){var K=x(this);if(Q===void 0)return F(K);var tt=p(Q);if(!O(K))return String(K);if(tt<0||tt>20)throw new E("Incorrect fraction digits");if(X)return F(K,tt);var nt="",rt,it,st,ct,ht,gt,yt;return K<0&&(nt="-",K=-K),K===0?(it=0,rt=k("0",tt+1)):(ht=b(K),it=D(ht),tt-it>=308?yt=K*U*L(10,tt-it-308):yt=K/L(10,it-tt),gt=$(yt),yt-gt>=.5&&(gt+=1),gt>=L(10,tt+1)&&(gt/=10,it+=1),rt=R(gt)),tt!==0&&(rt=G(rt,0,1)+"."+G(rt,1)),it===0?(st="+",ct="0"):(st=it>0?"+":"-",ct=R(M(it))),rt+="e"+st+ct,nt+rt}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(61),x=a(324),y=a(248),b=a(7),S=RangeError,E=String,R=Math.floor,O=v(y),M=v("".slice),D=v(1.1.toFixed),L=function(X,j,H){return j===0?H:j%2===1?L(X,j-1,H*X):L(X*X,j/2,H)},$=function(X){for(var j=0,H=X;H>=4096;)j+=12,H/=4096;for(;H>=2;)j+=1,H/=2;return j},F=function(X,j,H){for(var Y=-1,Z=H;++Y<6;)Z+=j*X[Y],X[Y]=Z%1e7,Z=R(Z/1e7)},k=function(X,j){for(var H=6,Y=0;--H>=0;)Y+=X[H],X[H]=R(Y/j),Y=Y%j*1e7},G=function(X){for(var j=6,H="";--j>=0;)if(H!==""||j===0||X[j]!==0){var Y=E(X[j]);H=H===""?Y:H+O("0",7-Y.length)+Y}return H},U=b(function(){return D(8e-5,3)!=="0.000"||D(.9,0)!=="1"||D(1.255,2)!=="1.25"||D(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!b(function(){D({})});g({target:"Number",proto:!0,forced:U},{toFixed:function(j){var H=x(this),Y=p(j),Z=[0,0,0,0,0,0],Q="",K="0",tt,nt,rt,it;if(Y<0||Y>20)throw new S("Incorrect fraction digits");if(H!==H)return"NaN";if(H<=-1e21||H>=1e21)return E(H);if(H<0&&(Q="-",H=-H),H>1e-21)if(tt=$(H*L(2,69,1))-69,nt=tt<0?H*L(2,-tt,1):H/L(2,tt,1),nt*=4503599627370496,tt=52-tt,tt>0){for(F(Z,0,nt),rt=Y;rt>=7;)F(Z,1e7,0),rt-=7;for(F(Z,L(10,rt,1),0),rt=tt-1;rt>=23;)k(Z,8388608),rt-=23;k(Z,1<<rt),F(Z,1,1),k(Z,2),K=G(Z)}else F(Z,0,nt),F(Z,1<<-tt,0),K=G(Z)+O("0",Y);return Y>0?(it=K.length,K=Q+(it<=Y?"0."+O("0",Y-it)+K:M(K,0,it-Y)+"."+M(K,it-Y))):K=Q+K,K}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(7),x=a(324),y=v(1.1.toPrecision),b=p(function(){return y(1,void 0)!=="1"})||!p(function(){y({})});g({target:"Number",proto:!0,forced:b},{toPrecision:function(E){return E===void 0?y(x(this)):y(x(this),E)}})}),(function(T,w,a){var g=a(3),v=a(344);g({target:"Object",stat:!0,arity:2,forced:Object.assign!==v},{assign:v})}),(function(T,w,a){var g=a(6),v=a(14),p=a(8),x=a(7),y=a(73),b=a(66),S=a(10),E=a(39),R=a(13),O=Object.assign,M=Object.defineProperty,D=v([].concat);T.exports=!O||x(function(){if(g&&O({b:1},O(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var L={},$={},F=Symbol("assign detection"),k="abcdefghijklmnopqrst";return L[F]=7,k.split("").forEach(function(G){$[G]=G}),O({},L)[F]!==7||y(O({},$)).join("")!==k})?function($,F){for(var k=E($),G=arguments.length,U=1,X=b.f,j=S.f;G>U;)for(var H=R(arguments[U++]),Y=X?D(y(H),X(H)):y(H),Z=Y.length,Q=0,K;Z>Q;)K=Y[Q++],(!g||p(j,H,K))&&(k[K]=H[K]);return k}:O}),(function(T,w,a){var g=a(3),v=a(6),p=a(71);g({target:"Object",stat:!0,sham:!v},{create:p})}),(function(T,w,a){var g=a(3),v=a(6),p=a(347),x=a(30),y=a(39),b=a(44);v&&g({target:"Object",proto:!0,forced:p},{__defineGetter__:function(E,R){b.f(y(this),E,{get:x(R),enumerable:!0,configurable:!0})}})}),(function(T,w,a){var g=a(36),v=a(4),p=a(7),x=a(198);T.exports=g||!p(function(){if(!(x&&x<535)){var y=Math.random();__defineSetter__.call(null,y,function(){}),delete v[y]}})}),(function(T,w,a){var g=a(3),v=a(6),p=a(72).f;g({target:"Object",stat:!0,forced:Object.defineProperties!==p,sham:!v},{defineProperties:p})}),(function(T,w,a){var g=a(3),v=a(6),p=a(44).f;g({target:"Object",stat:!0,forced:Object.defineProperty!==p,sham:!v},{defineProperty:p})}),(function(T,w,a){var g=a(3),v=a(6),p=a(347),x=a(30),y=a(39),b=a(44);v&&g({target:"Object",proto:!0,forced:p},{__defineSetter__:function(E,R){b.f(y(this),E,{set:x(R),enumerable:!0,configurable:!0})}})}),(function(T,w,a){var g=a(3),v=a(352).entries;g({target:"Object",stat:!0},{entries:function(x){return v(x)}})}),(function(T,w,a){var g=a(6),v=a(7),p=a(14),x=a(134),y=a(73),b=a(12),S=a(10).f,E=p(S),R=p([].push),O=g&&v(function(){var D=Object.create(null);return D[2]=2,!E(D,2)}),M=function(D){return function(L){for(var $=b(L),F=y($),k=O&&x($)===null,G=F.length,U=0,X=[],j;G>U;)j=F[U++],(!g||(k?j in $:E($,j)))&&R(X,D?[j,$[j]]:$[j]);return X}};T.exports={entries:M(!0),values:M(!1)}}),(function(T,w,a){var g=a(3),v=a(287),p=a(7),x=a(20),y=a(292).onFreeze,b=Object.freeze,S=p(function(){b(1)});g({target:"Object",stat:!0,forced:S,sham:!v},{freeze:function(R){return b&&x(R)?b(y(R)):R}})}),(function(T,w,a){var g=a(3),v=a(136),p=a(90);g({target:"Object",stat:!0},{fromEntries:function(y){var b={};return v(y,function(S,E){p(b,S,E)},{AS_ENTRIES:!0}),b}})}),(function(T,w,a){var g=a(3),v=a(7),p=a(12),x=a(5).f,y=a(6),b=!y||v(function(){x(1)});g({target:"Object",stat:!0,forced:b,sham:!y},{getOwnPropertyDescriptor:function(E,R){return x(p(E),R)}})}),(function(T,w,a){var g=a(3),v=a(6),p=a(56),x=a(12),y=a(5),b=a(90);g({target:"Object",stat:!0,sham:!v},{getOwnPropertyDescriptors:function(E){for(var R=x(E),O=y.f,M=p(R),D={},L=0,$,F;M.length>L;)F=O(R,$=M[L++]),F!==void 0&&b(D,$,F);return D}})}),(function(T,w,a){var g=a(3),v=a(7),p=a(75).f,x=v(function(){return!Object.getOwnPropertyNames(1)});g({target:"Object",stat:!0,forced:x},{getOwnPropertyNames:p})}),(function(T,w,a){var g=a(3),v=a(7),p=a(39),x=a(134),y=a(135),b=v(function(){x(1)});g({target:"Object",stat:!0,forced:b,sham:!y},{getPrototypeOf:function(E){return x(p(E))}})}),(function(T,w,a){var g=a(3),v=a(90),p=a(23),x=a(14),y=a(30),b=a(16),S=a(18),E=a(136),R=a(7),O=Object.groupBy,M=p("Object","create"),D=x([].push),L=!O||R(function(){return O("ab",function($){return $}).a.length!==1});g({target:"Object",stat:!0,forced:L},{groupBy:function(F,k){b(F),y(k);var G=M(null),U=0;return E(F,function(X){var j=S(k(X,U++));j in G?D(G[j],X):v(G,j,[X])}),G}})}),(function(T,w,a){var g=a(3),v=a(38);g({target:"Object",stat:!0},{hasOwn:v})}),(function(T,w,a){var g=a(3),v=a(362);g({target:"Object",stat:!0},{is:v})}),(function(T){T.exports=Object.is||function(a,g){return a===g?a!==0||1/a===1/g:a!==a&&g!==g}}),(function(T,w,a){var g=a(3),v=a(293);g({target:"Object",stat:!0,forced:Object.isExtensible!==v},{isExtensible:v})}),(function(T,w,a){var g=a(3),v=a(7),p=a(20),x=a(15),y=a(294),b=Object.isFrozen,S=y||v(function(){b(1)});g({target:"Object",stat:!0,forced:S},{isFrozen:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,w,a){var g=a(3),v=a(7),p=a(20),x=a(15),y=a(294),b=Object.isSealed,S=y||v(function(){b(1)});g({target:"Object",stat:!0,forced:S},{isSealed:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,w,a){var g=a(3),v=a(39),p=a(73),x=a(7),y=x(function(){p(1)});g({target:"Object",stat:!0,forced:y},{keys:function(S){return p(v(S))}})}),(function(T,w,a){var g=a(3),v=a(6),p=a(347),x=a(39),y=a(18),b=a(134),S=a(5).f;v&&g({target:"Object",proto:!0,forced:p},{__lookupGetter__:function(R){var O=x(this),M=y(R),D;do if(D=S(O,M))return D.get;while(O=b(O))}})}),(function(T,w,a){var g=a(3),v=a(6),p=a(347),x=a(39),y=a(18),b=a(134),S=a(5).f;v&&g({target:"Object",proto:!0,forced:p},{__lookupSetter__:function(R){var O=x(this),M=y(R),D;do if(D=S(O,M))return D.set;while(O=b(O))}})}),(function(T,w,a){var g=a(3),v=a(20),p=a(292).onFreeze,x=a(287),y=a(7),b=Object.preventExtensions,S=y(function(){b(1)});g({target:"Object",stat:!0,forced:S,sham:!x},{preventExtensions:function(R){return b&&v(R)?b(p(R)):R}})}),(function(T,w,a){var g=a(6),v=a(77),p=a(20),x=a(121),y=a(39),b=a(16),S=Object.getPrototypeOf,E=Object.setPrototypeOf,R=Object.prototype,O="__proto__";if(g&&S&&E&&!(O in R))try{v(R,O,{configurable:!0,get:function(){return S(y(this))},set:function(D){var L=b(this);x(D)&&p(L)&&E(L,D)}})}catch(M){}}),(function(T,w,a){var g=a(3),v=a(20),p=a(292).onFreeze,x=a(287),y=a(7),b=Object.seal,S=y(function(){b(1)});g({target:"Object",stat:!0,forced:S,sham:!x},{seal:function(R){return b&&v(R)?b(p(R)):R}})}),(function(T,w,a){var g=a(3),v=a(118);g({target:"Object",stat:!0},{setPrototypeOf:v})}),(function(T,w,a){var g=a(70),v=a(47),p=a(374);g||v(Object.prototype,"toString",p,{unsafe:!0})}),(function(T,w,a){var g=a(70),v=a(69);T.exports=g?{}.toString:function(){return"[object "+v(this)+"]"}}),(function(T,w,a){var g=a(3),v=a(352).values;g({target:"Object",stat:!0},{values:function(x){return v(x)}})}),(function(T,w,a){var g=a(3),v=a(337);g({global:!0,forced:parseFloat!==v},{parseFloat:v})}),(function(T,w,a){var g=a(3),v=a(339);g({global:!0,forced:parseInt!==v},{parseInt:v})}),(function(T,w,a){a(379),a(395),a(397),a(398),a(399),a(400)}),(function(T,w,a){var g=a(3),v=a(36),p=a(188),x=a(4),y=a(80),b=a(8),S=a(47),E=a(118),R=a(82),O=a(200),M=a(30),D=a(21),L=a(20),$=a(215),F=a(380),k=a(382).set,G=a(385),U=a(390),X=a(391),j=a(387),H=a(51),Y=a(392),Z=a(393),Q=a(394),K="Promise",tt=Z.CONSTRUCTOR,nt=Z.REJECTION_EVENT,rt=Z.SUBCLASSING,it=H.getterFor(K),st=H.set,ct=Y&&Y.prototype,ht=Y,gt=ct,yt=x.TypeError,Ct=x.document,Tt=x.process,Ft=Q.f,Lt=Ft,Pt=!!(Ct&&Ct.createEvent&&x.dispatchEvent),pt="unhandledrejection",mt="rejectionhandled",Ot=0,Bt=1,Qt=2,wt=1,Wt=2,ae,pe,oe,de,Re=function(Ht){var ee;return L(Ht)&&D(ee=Ht.then)?ee:!1},Pe=function(Ht,ee){var ve=ee.value,se=ee.state===Bt,Oe=se?Ht.ok:Ht.fail,rn=Ht.resolve,It=Ht.reject,Xt=Ht.domain,Mt,$t,qt;try{Oe?(se||(ee.rejection===Wt&&Vt(ee),ee.rejection=wt),Oe===!0?Mt=ve:(Xt&&Xt.enter(),Mt=Oe(ve),Xt&&(Xt.exit(),qt=!0)),Mt===Ht.promise?It(new yt("Promise-chain cycle")):($t=Re(Mt))?b($t,Mt,rn,It):rn(Mt)):It(ve)}catch(Nt){Xt&&!qt&&Xt.exit(),It(Nt)}},Ee=function(Ht,ee){Ht.notified||(Ht.notified=!0,G(function(){for(var ve=Ht.reactions,se;se=ve.get();)Pe(se,Ht);Ht.notified=!1,ee&&!Ht.rejection&&ye(Ht)}))},he=function(Ht,ee,ve){var se,Oe;Pt?(se=Ct.createEvent("Event"),se.promise=ee,se.reason=ve,se.initEvent(Ht,!1,!0),x.dispatchEvent(se)):se={promise:ee,reason:ve},!nt&&(Oe=x["on"+Ht])?Oe(se):Ht===pt&&U("Unhandled promise rejection",ve)},ye=function(Ht){b(k,x,function(){var ee=Ht.facade,ve=Ht.value,se=Ge(Ht),Oe;if(se&&(Oe=X(function(){p?Tt.emit("unhandledRejection",ve,ee):he(pt,ee,ve)}),Ht.rejection=p||Ge(Ht)?Wt:wt,Oe.error))throw Oe.value})},Ge=function(Ht){return Ht.rejection!==wt&&!Ht.parent},Vt=function(Ht){b(k,x,function(){var ee=Ht.facade;p?Tt.emit("rejectionHandled",ee):he(mt,ee,Ht.value)})},ne=function(Ht,ee,ve){return function(se){Ht(ee,se,ve)}},re=function(Ht,ee,ve){Ht.done||(Ht.done=!0,ve&&(Ht=ve),Ht.value=ee,Ht.state=Qt,Ee(Ht,!0))},en=function(Ht,ee,ve){if(!Ht.done){Ht.done=!0,ve&&(Ht=ve);try{if(Ht.facade===ee)throw new yt("Promise can't be resolved itself");var se=Re(ee);se?G(function(){var Oe={done:!1};try{b(se,ee,ne(en,Oe,Ht),ne(re,Oe,Ht))}catch(rn){re(Oe,rn,Ht)}}):(Ht.value=ee,Ht.state=Bt,Ee(Ht,!1))}catch(Oe){re({done:!1},Oe,Ht)}}};if(tt&&(ht=function(ee){$(this,gt),M(ee),b(ae,this);var ve=it(this);try{ee(ne(en,ve),ne(re,ve))}catch(se){re(ve,se)}},gt=ht.prototype,ae=function(ee){st(this,{type:K,done:!1,notified:!1,parent:!1,reactions:new j,rejection:!1,state:Ot,value:null})},ae.prototype=S(gt,"then",function(ee,ve){var se=it(this),Oe=Ft(F(this,ht));return se.parent=!0,Oe.ok=D(ee)?ee:!0,Oe.fail=D(ve)&&ve,Oe.domain=p?Tt.domain:void 0,se.state===Ot?se.reactions.add(Oe):G(function(){Pe(Oe,se)}),Oe.promise}),pe=function(){var Ht=new ae,ee=it(Ht);this.promise=Ht,this.resolve=ne(en,ee),this.reject=ne(re,ee)},Q.f=Ft=function(Ht){return Ht===ht||Ht===oe?new pe(Ht):Lt(Ht)},!v&&D(Y)&&ct!==Object.prototype)){de=ct.then,rt||S(ct,"then",function(ee,ve){var se=this;return new ht(function(Oe,rn){b(de,se,Oe,rn)}).then(ee,ve)},{unsafe:!0});try{delete ct.constructor}catch(Ht){}E&&E(ct,gt)}g({global:!0,constructor:!0,wrap:!0,forced:tt},{Promise:ht}),oe=y.Promise,R(ht,K,!1,!0),O(K)}),(function(T,w,a){var g=a(46),v=a(381),p=a(17),x=a(33),y=x("species");T.exports=function(b,S){var E=g(b).constructor,R;return E===void 0||p(R=g(E)[y])?S:v(R)}}),(function(T,w,a){var g=a(89),v=a(31),p=TypeError;T.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not a constructor")}}),(function(T,w,a){var g=a(4),v=a(95),p=a(84),x=a(21),y=a(38),b=a(7),S=a(74),E=a(76),R=a(42),O=a(383),M=a(384),D=a(188),L=g.setImmediate,$=g.clearImmediate,F=g.process,k=g.Dispatch,G=g.Function,U=g.MessageChannel,X=g.String,j=0,H={},Y="onreadystatechange",Z,Q,K,tt;b(function(){Z=g.location});var nt=function(ct){if(y(H,ct)){var ht=H[ct];delete H[ct],ht()}},rt=function(ct){return function(){nt(ct)}},it=function(ct){nt(ct.data)},st=function(ct){g.postMessage(X(ct),Z.protocol+"//"+Z.host)};(!L||!$)&&(L=function(ht){O(arguments.length,1);var gt=x(ht)?ht:G(ht),yt=E(arguments,1);return H[++j]=function(){v(gt,void 0,yt)},Q(j),j},$=function(ht){delete H[ht]},D?Q=function(ct){F.nextTick(rt(ct))}:k&&k.now?Q=function(ct){k.now(rt(ct))}:U&&!M?(K=new U,tt=K.port2,K.port1.onmessage=it,Q=p(tt.postMessage,tt)):g.addEventListener&&x(g.postMessage)&&!g.importScripts&&Z&&Z.protocol!=="file:"&&!b(st)?(Q=st,g.addEventListener("message",it,!1)):Y in R("script")?Q=function(ct){S.appendChild(R("script"))[Y]=function(){S.removeChild(this),nt(ct)}}:Q=function(ct){setTimeout(rt(ct),0)}),T.exports={set:L,clear:$}}),(function(T){var w=TypeError;T.exports=function(a,g){if(a<g)throw new w("Not enough arguments");return a}}),(function(T,w,a){var g=a(28);T.exports=/ipad|iphone|ipod/i.test(g)&&/applewebkit/i.test(g)}),(function(T,w,a){var g=a(4),v=a(386),p=a(84),x=a(382).set,y=a(387),b=a(384),S=a(388),E=a(389),R=a(188),O=g.MutationObserver||g.WebKitMutationObserver,M=g.document,D=g.process,L=g.Promise,$=v("queueMicrotask"),F,k,G,U,X;if(!$){var j=new y,H=function(){var Y,Z;for(R&&(Y=D.domain)&&Y.exit();Z=j.get();)try{Z()}catch(Q){throw j.head&&F(),Q}Y&&Y.enter()};!b&&!R&&!E&&O&&M?(k=!0,G=M.createTextNode(""),new O(H).observe(G,{characterData:!0}),F=function(){G.data=k=!k}):!S&&L&&L.resolve?(U=L.resolve(void 0),U.constructor=L,X=p(U.then,U),F=function(){X(H)}):R?F=function(){D.nextTick(H)}:(x=p(x,g),F=function(){x(H)}),$=function(Y){j.head||F(),j.add(Y)}}T.exports=$}),(function(T,w,a){var g=a(4),v=a(6),p=Object.getOwnPropertyDescriptor;T.exports=function(x){if(!v)return g[x];var y=p(g,x);return y&&y.value}}),(function(T){var w=function(){this.head=null,this.tail=null};w.prototype={add:function(a){var g={item:a,next:null},v=this.tail;v?v.next=g:this.head=g,this.tail=g},get:function(){var a=this.head;if(a){var g=this.head=a.next;return g===null&&(this.tail=null),a.item}}},T.exports=w}),(function(T,w,a){var g=a(28);T.exports=/ipad|iphone|ipod/i.test(g)&&typeof Pebble!="undefined"}),(function(T,w,a){var g=a(28);T.exports=/web0s(?!.*chrome)/i.test(g)}),(function(T){T.exports=function(w,a){try{arguments.length===1?console.error(w):console.error(w,a)}catch(g){}}}),(function(T){T.exports=function(w){try{return{error:!1,value:w()}}catch(a){return{error:!0,value:a}}}}),(function(T,w,a){var g=a(4);T.exports=g.Promise}),(function(T,w,a){var g=a(4),v=a(392),p=a(21),x=a(67),y=a(50),b=a(33),S=a(189),E=a(36),R=a(27),O=v&&v.prototype,M=b("species"),D=!1,L=p(g.PromiseRejectionEvent),$=x("Promise",function(){var F=y(v),k=F!==String(v);if(!k&&R===66||E&&!(O.catch&&O.finally))return!0;if(!R||R<51||!/native code/.test(F)){var G=new v(function(j){j(1)}),U=function(j){j(function(){},function(){})},X=G.constructor={};if(X[M]=U,D=G.then(function(){})instanceof U,!D)return!0}return!k&&(S==="BROWSER"||S==="DENO")&&!L});T.exports={CONSTRUCTOR:$,REJECTION_EVENT:L,SUBCLASSING:D}}),(function(T,w,a){var g=a(30),v=TypeError,p=function(x){var y,b;this.promise=new x(function(S,E){if(y!==void 0||b!==void 0)throw new v("Bad Promise constructor");y=S,b=E}),this.resolve=g(y),this.reject=g(b)};T.exports.f=function(x){return new p(x)}}),(function(T,w,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),b=a(136),S=a(396);g({target:"Promise",stat:!0,forced:S},{all:function(R){var O=this,M=x.f(O),D=M.resolve,L=M.reject,$=y(function(){var F=p(O.resolve),k=[],G=0,U=1;b(R,function(X){var j=G++,H=!1;U++,v(F,O,X).then(function(Y){H||(H=!0,k[j]=Y,--U||D(k))},L)}),--U||D(k)});return $.error&&L($.value),M.promise}})}),(function(T,w,a){var g=a(392),v=a(171),p=a(393).CONSTRUCTOR;T.exports=p||!v(function(x){g.all(x).then(void 0,function(){})})}),(function(T,w,a){var g=a(3),v=a(36),p=a(393).CONSTRUCTOR,x=a(392),y=a(23),b=a(21),S=a(47),E=x&&x.prototype;if(g({target:"Promise",proto:!0,forced:p,real:!0},{catch:function(O){return this.then(void 0,O)}}),!v&&b(x)){var R=y("Promise").prototype.catch;E.catch!==R&&S(E,"catch",R,{unsafe:!0})}}),(function(T,w,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),b=a(136),S=a(396);g({target:"Promise",stat:!0,forced:S},{race:function(R){var O=this,M=x.f(O),D=M.reject,L=y(function(){var $=p(O.resolve);b(R,function(F){v($,O,F).then(M.resolve,D)})});return L.error&&D(L.value),M.promise}})}),(function(T,w,a){var g=a(3),v=a(394),p=a(393).CONSTRUCTOR;g({target:"Promise",stat:!0,forced:p},{reject:function(y){var b=v.f(this),S=b.reject;return S(y),b.promise}})}),(function(T,w,a){var g=a(3),v=a(23),p=a(36),x=a(392),y=a(393).CONSTRUCTOR,b=a(401),S=v("Promise"),E=p&&!y;g({target:"Promise",stat:!0,forced:p||y},{resolve:function(O){return b(E&&this===S?x:this,O)}})}),(function(T,w,a){var g=a(46),v=a(20),p=a(394);T.exports=function(x,y){if(g(x),v(y)&&y.constructor===x)return y;var b=p.f(x),S=b.resolve;return S(y),b.promise}}),(function(T,w,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),b=a(136),S=a(396);g({target:"Promise",stat:!0,forced:S},{allSettled:function(R){var O=this,M=x.f(O),D=M.resolve,L=M.reject,$=y(function(){var F=p(O.resolve),k=[],G=0,U=1;b(R,function(X){var j=G++,H=!1;U++,v(F,O,X).then(function(Y){H||(H=!0,k[j]={status:"fulfilled",value:Y},--U||D(k))},function(Y){H||(H=!0,k[j]={status:"rejected",reason:Y},--U||D(k))})}),--U||D(k)});return $.error&&L($.value),M.promise}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(30),x=a(23),y=a(394),b=a(391),S=a(136),E=a(396),R="No one promise resolved";g({target:"Promise",stat:!0,forced:E},{any:function(M){var D=this,L=x("AggregateError"),$=y.f(D),F=$.resolve,k=$.reject,G=b(function(){var U=p(D.resolve),X=[],j=0,H=1,Y=!1;S(M,function(Z){var Q=j++,K=!1;H++,v(U,D,Z).then(function(tt){K||Y||(Y=!0,F(tt))},function(tt){K||Y||(K=!0,X[Q]=tt,--H||k(new L(X,R)))})}),--H||k(new L(X,R))});return G.error&&k(G.value),$.promise}})}),(function(T,w,a){var g=a(3),v=a(36),p=a(392),x=a(7),y=a(23),b=a(21),S=a(380),E=a(401),R=a(47),O=p&&p.prototype,M=!!p&&x(function(){O.finally.call({then:function(){}},function(){})});if(g({target:"Promise",proto:!0,real:!0,forced:M},{finally:function(L){var $=S(this,y("Promise")),F=b(L);return this.then(F?function(k){return E($,L()).then(function(){return k})}:L,F?function(k){return E($,L()).then(function(){throw k})}:L)}}),!v&&b(p)){var D=y("Promise").prototype.finally;O.finally!==D&&R(O,"finally",D,{unsafe:!0})}}),(function(T,w,a){var g=a(3),v=a(4),p=a(95),x=a(76),y=a(394),b=a(30),S=a(391),E=v.Promise,R=!1,O=!E||!E.try||S(function(){E.try(function(M){R=M===8},8)}).error||!R;g({target:"Promise",stat:!0,forced:O},{try:function(M){var D=arguments.length>1?x(arguments,1):[],L=y.f(this),$=S(function(){return p(b(M),void 0,D)});return($.error?L.reject:L.resolve)($.value),L.promise}})}),(function(T,w,a){var g=a(3),v=a(394);g({target:"Promise",stat:!0},{withResolvers:function(){var x=v.f(this);return{promise:x.promise,resolve:x.resolve,reject:x.reject}}})}),(function(T,w,a){var g=a(3),v=a(408),p=a(7),x=Array.fromAsync,y=!x||p(function(){var b=0;return x.call(function(){return b++,[]},{length:0}),b!==1});g({target:"Array",stat:!0,forced:y},{fromAsync:v})}),(function(T,w,a){var g=a(84),v=a(14),p=a(89),x=a(409),y=a(139),b=a(267),S=a(140),E=a(29),R=a(23),O=a(205),M=a(33),D=a(410),L=a(412).toArray,$=M("asyncIterator"),F=v(O("Array","values")),k=v(F([]).next),G=function(){return new U(this)},U=function(X){this.iterator=F(X)};U.prototype.next=function(){return k(this.iterator)},T.exports=function(j){var H=this,Y=arguments.length,Z=Y>1?arguments[1]:void 0,Q=Y>2?arguments[2]:void 0;return new(R("Promise"))(function(K){Z!==void 0&&(Z=g(Z,Q));var tt=E(j,$),nt=tt?void 0:S(j)||G,rt=p(H)?new H:[],it=tt?x(j,tt):new D(b(y(j,nt)));K(L(it,Z,rt))})}}),(function(T,w,a){var g=a(8),v=a(410),p=a(46),x=a(139),y=a(267),b=a(29),S=a(33),E=S("asyncIterator");T.exports=function(R,O){var M=arguments.length<2?b(R,E):O;return M?p(g(M,R)):new v(y(x(R)))}}),(function(T,w,a){var g=a(8),v=a(46),p=a(71),x=a(29),y=a(214),b=a(51),S=a(141),E=a(23),R=a(411),O=a(179),M=E("Promise"),D="AsyncFromSyncIterator",L=b.set,$=b.getterFor(D),F=function(G,U,X,j,H){var Y=G.done;M.resolve(G.value).then(function(Z){U(O(Z,Y))},function(Z){if(!Y&&H)try{S(j,"throw",Z)}catch(Q){Z=Q}X(Z)})},k=function(U){U.type=D,L(this,U)};k.prototype=y(p(R),{next:function(){var U=$(this),X=arguments.length>0,j=X?arguments[0]:void 0;return new M(function(H,Y){var Z=v(X?g(U.next,U.iterator,j):g(U.next,U.iterator));F(Z,H,Y,U.iterator,!0)})},return:function(){var G=$(this),U=G.iterator,X=arguments.length>0,j=X?arguments[0]:void 0;return new M(function(H,Y){var Z=x(U,"return");if(Z===void 0)return H(O(j,!0));var Q=v(X?g(Z,U,j):g(Z,U));F(Q,H,Y,U)})},throw:function(){var G=$(this),U=G.iterator,X=arguments.length>0,j=X?arguments[0]:void 0;return new M(function(H,Y){var Z=x(U,"throw");if(Z===void 0){try{S(U,"normal")}catch(K){return Y(K)}return Y(new TypeError("The iterator does not provide a throw method"))}var Q=v(X?g(Z,U,j):g(Z,U));F(Q,H,Y,U,!0)})}}),T.exports=k}),(function(T,w,a){var g=a(4),v=a(35),p=a(21),x=a(71),y=a(134),b=a(47),S=a(33),E=a(36),R="USE_FUNCTION_CONSTRUCTOR",O=S("asyncIterator"),M=g.AsyncIterator,D=v.AsyncIteratorPrototype,L,$;if(D)L=D;else if(p(M))L=M.prototype;else if(v[R]||g[R])try{$=y(y(y(Function("return async function*(){}()")()))),y($)===Object.prototype&&(L=$)}catch(F){}L?E&&(L=x(L)):L={},p(L[O])||b(L,O,function(){return this}),T.exports=L}),(function(T,w,a){var g=a(8),v=a(30),p=a(46),x=a(20),y=a(147),b=a(23),S=a(90),E=a(148),R=a(267),O=a(413),M=function(D){var L=D===0,$=D===1,F=D===2,k=D===3;return function(G,U,X){p(G);var j=U!==void 0;(j||!L)&&v(U);var H=R(G),Y=b("Promise"),Z=H.iterator,Q=H.next,K=0;return new Y(function(tt,nt){var rt=function(st){O(Z,nt,st,nt)},it=function(){try{try{y(K)}catch(st){return rt(st)}Y.resolve(p(g(Q,Z))).then(function(st){try{if(p(st).done)L?(E(X,K),tt(X)):tt(k?!1:F||void 0);else{var ct=st.value;try{if(j){var ht=K++,gt=U(ct,ht),yt=function(Ct){if($)it();else if(F)Ct?it():O(Z,tt,!1,nt);else if(L)try{S(X,ht,Ct),it()}catch(Tt){rt(Tt)}else Ct?O(Z,tt,k||ct,nt):it()};x(gt)?Y.resolve(gt).then(yt,rt):yt(gt)}else S(X,K++,ct),it()}catch(Ct){rt(Ct)}}}catch(Ct){nt(Ct)}},nt)}catch(st){nt(st)}};it()})}};T.exports={toArray:M(0),forEach:M(1),every:M(2),some:M(3),find:M(4)}}),(function(T,w,a){var g=a(8),v=a(46),p=a(23),x=a(29);T.exports=function(y,b,S,E){try{var R=x(y,"return");if(R)return p("Promise").resolve(g(R,y)).then(function(O){try{b!==E&&v(O)}catch(M){E(M);return}b(S)},function(O){b===E?b(S):E(O)})}catch(O){return E(b===E?S:O)}b(S)}}),(function(T,w,a){var g=a(3),v=a(6),p=a(23),x=a(30),y=a(215),b=a(47),S=a(214),E=a(77),R=a(33),O=a(51),M=a(254),D=a(27),L=p("Promise"),$=p("SuppressedError"),F=ReferenceError,k=R("asyncDispose"),G=R("toStringTag"),U="AsyncDisposableStack",X=O.set,j=O.getterFor(U),H="async-dispose",Y="disposed",Z="pending",Q=function(rt){var it=j(rt);if(it.state===Y)throw new F(U+" already disposed");return it},K=function(){X(y(this,tt),{type:U,state:Z,stack:[]}),v||(this.disposed=!1)},tt=K.prototype;S(tt,{disposeAsync:function(){var it=this;return new L(function(st,ct){var ht=j(it);if(ht.state===Y)return st(void 0);ht.state=Y,v||(it.disposed=!0);var gt=ht.stack,yt=gt.length,Ct=!1,Tt,Ft=function(Pt){Ct?Tt=new $(Pt,Tt):(Ct=!0,Tt=Pt),Lt()},Lt=function(){if(yt){var Pt=gt[--yt];gt[yt]=null;try{L.resolve(Pt()).then(Lt,Ft)}catch(pt){Ft(pt)}}else ht.stack=null,Ct?ct(Tt):st(void 0)};Lt()})},use:function(it){return M(Q(this),it,H),it},adopt:function(it,st){var ct=Q(this);return x(st),M(ct,void 0,H,function(){return st(it)}),it},defer:function(it){var st=Q(this);x(it),M(st,void 0,H,it)},move:function(){var it=Q(this),st=new K;return j(st).stack=it.stack,it.stack=[],it.state=Y,v||(this.disposed=!0),st}}),v&&E(tt,"disposed",{configurable:!0,get:function(){return j(this).state===Y}}),b(tt,k,tt.disposeAsync,{name:"disposeAsync"}),b(tt,G,U,{nonWritable:!0});var nt=D&&D<136;g({global:!0,constructor:!0,forced:nt},{AsyncDisposableStack:K})}),(function(T,w,a){var g=a(8),v=a(47),p=a(23),x=a(29),y=a(38),b=a(33),S=a(411),E=b("asyncDispose"),R=p("Promise");y(S,E)||v(S,E,function(){var O=this;return new R(function(M,D){var L=x(O,"return");L?R.resolve(g(L,O)).then(function(){M(void 0)},D):M(void 0)})})}),(function(T,w,a){var g=a(3),v=a(95),p=a(30),x=a(46),y=a(7),b=!y(function(){Reflect.apply(function(){})});g({target:"Reflect",stat:!0,forced:b},{apply:function(E,R,O){return v(p(E),R,x(O))}})}),(function(T,w,a){var g=a(3),v=a(23),p=a(95),x=a(257),y=a(381),b=a(46),S=a(20),E=a(71),R=a(7),O=v("Reflect","construct"),M=Object.prototype,D=[].push,L=R(function(){function k(){}return!(O(function(){},[],k)instanceof k)}),$=!R(function(){O(function(){})}),F=L||$;g({target:"Reflect",stat:!0,forced:F,sham:F},{construct:function(G,U){y(G);var X=arguments.length<3?G:y(arguments[2]);if(b(U),$&&!L)return O(G,U,X);if(G===X){switch(U.length){case 0:return new G;case 1:return new G(U[0]);case 2:return new G(U[0],U[1]);case 3:return new G(U[0],U[1],U[2]);case 4:return new G(U[0],U[1],U[2],U[3])}var j=[null];return p(D,j,U),new(p(x,G,j))}var H=X.prototype,Y=E(S(H)?H:M),Z=p(G,Y,U);return S(Z)?Z:Y}})}),(function(T,w,a){var g=a(3),v=a(6),p=a(46),x=a(18),y=a(44),b=a(21),S=a(7),E=TypeError,R=S(function(){Reflect.defineProperty(y.f({},1,{value:1}),1,{value:2})});g({target:"Reflect",stat:!0,forced:R,sham:!v},{defineProperty:function(M,D,L){p(M);var $=x(D),F,k;if(p(L),("get"in L||"set"in L)&&("get"in L&&!b(F=L.get)&&F!==void 0||"set"in L&&!b(k=L.set)&&k!==void 0||"value"in L||"writable"in L))throw new E("Invalid property descriptor");try{return y.f(M,$,L),!0}catch(G){return!1}}})}),(function(T,w,a){var g=a(3),v=a(46),p=a(5).f,x=a(18);g({target:"Reflect",stat:!0},{deleteProperty:function(b,S){v(b);var E=x(S),R=p(b,E);return R&&!R.configurable?!1:delete b[E]}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(20),x=a(46),y=a(421),b=a(5),S=a(134),E=a(18),R=function(O,M,D){if(x(O)===D)return O[M];var L=b.f(O,M);if(L)return y(L)?L.value:L.get===void 0?void 0:v(L.get,D);var $=S(O);if(p($))return R($,M,D)};g({target:"Reflect",stat:!0},{get:function(M,D){return R(x(M),E(D),arguments.length<3?M:arguments[2])}})}),(function(T,w,a){var g=a(38);T.exports=function(v){return v!==void 0&&(g(v,"value")||g(v,"writable"))}}),(function(T,w,a){var g=a(3),v=a(6),p=a(46),x=a(5);g({target:"Reflect",stat:!0,sham:!v},{getOwnPropertyDescriptor:function(b,S){return x.f(p(b),S)}})}),(function(T,w,a){var g=a(3),v=a(46),p=a(134),x=a(135);g({target:"Reflect",stat:!0,sham:!x},{getPrototypeOf:function(b){return p(v(b))}})}),(function(T,w,a){var g=a(3);g({target:"Reflect",stat:!0},{has:function(p,x){return x in p}})}),(function(T,w,a){var g=a(3),v=a(46),p=a(293);g({target:"Reflect",stat:!0},{isExtensible:function(y){return v(y),p(y)}})}),(function(T,w,a){var g=a(3),v=a(56);g({target:"Reflect",stat:!0},{ownKeys:v})}),(function(T,w,a){var g=a(3),v=a(23),p=a(46),x=a(287);g({target:"Reflect",stat:!0,sham:!x},{preventExtensions:function(b){p(b);try{var S=v("Object","preventExtensions");return S&&S(b),!0}catch(E){return!1}}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(46),x=a(20),y=a(421),b=a(7),S=a(44),E=a(5),R=a(134),O=a(11),M=a(18),D=function($,F,k,G){var U=E.f(p($),F),X,j,H;if(!U){if(x(j=R($)))return D(j,F,k,G);U=O(0)}if(y(U)){if(U.writable===!1||!x(G))return!1;if(X=E.f(G,F)){if(!y(X)||X.writable===!1)return!1;S.f(G,F,{value:k})}else try{S.f(G,F,O(0,k))}catch(Y){return!1}}else{if(H=U.set,H===void 0)return!1;v(H,G,k)}return!0},L=b(function(){var $=function(){},F=S.f(new $,"a",{configurable:!0});return Reflect.set($.prototype,"a",1,F)!==!1});g({target:"Reflect",stat:!0,forced:L},{set:function(F,k,G){return D(p(F),M(k),G,arguments.length<4?F:arguments[3])}})}),(function(T,w,a){var g=a(3),v=a(46),p=a(120),x=a(118);x&&g({target:"Reflect",stat:!0},{setPrototypeOf:function(b,S){v(b),p(S);try{return x(b,S),!0}catch(E){return!1}}})}),(function(T,w,a){var g=a(3),v=a(4),p=a(82);g({global:!0},{Reflect:{}}),p(v.Reflect,"Reflect",!0)}),(function(T,w,a){var g=a(6),v=a(4),p=a(14),x=a(67),y=a(123),b=a(43),S=a(71),E=a(57).f,R=a(24),O=a(432),M=a(68),D=a(433),L=a(436),$=a(122),F=a(47),k=a(7),G=a(38),U=a(51).enforce,X=a(200),j=a(33),H=a(437),Y=a(438),Z=j("match"),Q=v.RegExp,K=Q.prototype,tt=v.SyntaxError,nt=p(K.exec),rt=p("".charAt),it=p("".replace),st=p("".indexOf),ct=p("".slice),ht=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,gt=/a/g,yt=/a/g,Ct=new Q(gt)!==gt,Tt=L.MISSED_STICKY,Ft=L.UNSUPPORTED_Y,Lt=g&&(!Ct||Tt||H||Y||k(function(){return yt[Z]=!1,Q(gt)!==gt||Q(yt)===yt||String(Q(gt,"i"))!=="/a/i"})),Pt=function(Qt){for(var wt=Qt.length,Wt=0,ae="",pe=!1,oe;Wt<wt;Wt++){if(oe=rt(Qt,Wt),oe==="\\"){ae+=oe+rt(Qt,++Wt);continue}!pe&&oe==="."?ae+="[\\s\\S]":(oe==="["?pe=!0:oe==="]"&&(pe=!1),ae+=oe)}return ae},pt=function(Qt){for(var wt=Qt.length,Wt=0,ae="",pe=[],oe=S(null),de=!1,Re=!1,Pe=0,Ee="",he;Wt<wt;Wt++){if(he=rt(Qt,Wt),he==="\\"){if(he+=rt(Qt,++Wt),!Re&&rt(he,1)==="\\"){ae+="\\x5c";continue}}else if(he==="]")de=!1;else if(!de)switch(!0){case he==="[":de=!0;break;case he==="(":ae+=he,nt(ht,ct(Qt,Wt+1))?(Wt+=2,Re=!0,Pe++):rt(Qt,Wt+1)!=="?"&&Pe++;continue;case(he===">"&&Re):if(Ee===""||G(oe,Ee))throw new tt("Invalid capture group name");oe[Ee]=!0,pe[pe.length]=[Ee,Pe],Re=!1,Ee="";continue}Re?Ee+=he:ae+=he}for(var ye=0;ye<pe.length;ye++)for(var Ge="\\k<"+pe[ye][0]+">",Vt="\\"+pe[ye][1];st(ae,Ge)>-1;)ae=it(ae,Ge,Vt);return[ae,pe]};if(x("RegExp",Lt)){for(var mt=function(wt,Wt){var ae=R(K,this),pe=O(wt),oe=Wt===void 0,de=[],Re=wt,Pe,Ee,he,ye,Ge,Vt;if(!ae&&pe&&oe&&wt.constructor===mt)return wt;if((pe||R(K,wt))&&(wt=wt.source,oe&&(Wt=D(Re))),wt=wt===void 0?"":M(wt),Wt=Wt===void 0?"":M(Wt),Re=wt,H&&"dotAll"in gt&&(Ee=!!Wt&&st(Wt,"s")>-1,Ee&&(Wt=it(Wt,/s/g,""))),Pe=Wt,Tt&&"sticky"in gt&&(he=!!Wt&&st(Wt,"y")>-1,he&&Ft&&(Wt=it(Wt,/y/g,""))),Y&&(ye=pt(wt),wt=ye[0],de=ye[1]),Ge=y(Q(wt,Wt),ae?this:K,mt),(Ee||he||de.length)&&(Vt=U(Ge),Ee&&(Vt.dotAll=!0,Vt.raw=mt(Pt(wt),Pe)),he&&(Vt.sticky=!0),de.length&&(Vt.groups=de)),wt!==Re)try{b(Ge,"source",Re===""?"(?:)":Re)}catch(ne){}return Ge},Ot=E(Q),Bt=0;Ot.length>Bt;)$(mt,Q,Ot[Bt++]);K.constructor=mt,mt.prototype=K,F(v,"RegExp",mt,{constructor:!0})}X("RegExp")}),(function(T,w,a){var g=a(20),v=a(15),p=a(33),x=p("match");T.exports=function(y){var b;return g(y)&&((b=y[x])!==void 0?!!b:v(y)==="RegExp")}}),(function(T,w,a){var g=a(8),v=a(38),p=a(24),x=a(434),y=a(435),b=RegExp.prototype;T.exports=x.correct?function(S){return S.flags}:function(S){return!x.correct&&p(b,S)&&!v(S,"flags")?g(y,S):S.flags}}),(function(T,w,a){var g=a(4),v=a(7),p=g.RegExp,x=!v(function(){var y=!0;try{p(".","d")}catch(L){y=!1}var b={},S="",E=y?"dgimsy":"gimsy",R=function(L,$){Object.defineProperty(b,L,{get:function(){return S+=$,!0}})},O={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};y&&(O.hasIndices="d");for(var M in O)R(M,O[M]);var D=Object.getOwnPropertyDescriptor(p.prototype,"flags").get.call(b);return D!==E||S!==E});T.exports={correct:x}}),(function(T,w,a){var g=a(46);T.exports=function(){var v=g(this),p="";return v.hasIndices&&(p+="d"),v.global&&(p+="g"),v.ignoreCase&&(p+="i"),v.multiline&&(p+="m"),v.dotAll&&(p+="s"),v.unicode&&(p+="u"),v.unicodeSets&&(p+="v"),v.sticky&&(p+="y"),p}}),(function(T,w,a){var g=a(7),v=a(4),p=v.RegExp,x=g(function(){var S=p("a","y");return S.lastIndex=2,S.exec("abcd")!==null}),y=x||g(function(){return!p("a","y").sticky}),b=x||g(function(){var S=p("^r","gy");return S.lastIndex=2,S.exec("str")!==null});T.exports={BROKEN_CARET:b,MISSED_STICKY:y,UNSUPPORTED_Y:x}}),(function(T,w,a){var g=a(7),v=a(4),p=v.RegExp;T.exports=g(function(){var x=p(".","s");return!(x.dotAll&&x.test(`
|
|
28
|
-
`)&&x.flags==="s")})}),(function(T,
|
|
29
|
-
`&&Lt!=="\r"&&Lt!=="\u2028"&&Lt!=="\u2029")&&(Ct="(?: (?:"+Ct+"))",Ft=" "+Ft,Tt++),st=new RegExp("^(?:"+Ct+")",yt)}j&&(st=new RegExp("^"+Ct+"$(?!\\s)",yt)),U&&(ct=K.lastIndex);var Pt=g(D,gt?st:K,Ft);return gt?Pt?(Pt.input=nt,Pt[0]=G(Pt[0],Tt),Pt.index=K.lastIndex,K.lastIndex+=Pt[0].length):K.lastIndex=0:U&&Pt&&(K.lastIndex=K.global?Pt.index+Pt[0].length:ct),j&&Pt&&Pt.length>1&&g(M,Pt[0],st,function(){for(var pt=1;pt<arguments.length-2;pt++)arguments[pt]===void 0&&(Pt[pt]=void 0)}),Pt&&ht&&Y(Pt,ht),Pt}),T.exports=L}),(function(T,w,a){var g=a(6),v=a(77),p=a(434),x=a(435);g&&!p.correct&&(v(RegExp.prototype,"flags",{configurable:!0,get:x}),p.correct=!0)}),(function(T,w,a){var g=a(6),v=a(436).MISSED_STICKY,p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,S=TypeError;g&&v&&x(b,"sticky",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).sticky;throw new S("Incompatible receiver, RegExp required")}}})}),(function(T,w,a){a(442);var g=a(3),v=a(8),p=a(21),x=a(46),y=a(68),b=(function(){var E=!1,R=/[ac]/;return R.exec=function(){return E=!0,/./.exec.apply(this,arguments)},R.test("abc")===!0&&E})(),S=/./.test;g({target:"RegExp",proto:!0,forced:!b},{test:function(E){var R=x(this),O=y(E),M=R.exec;if(!p(M))return v(S,R,O);var D=v(M,R,O);return D===null?!1:(x(D),!0)}})}),(function(T,w,a){var g=a(49).PROPER,v=a(47),p=a(46),x=a(68),y=a(7),b=a(433),S="toString",E=RegExp.prototype,R=E[S],O=y(function(){return R.call({source:"a",flags:"b"})!=="/a/b"}),M=g&&R.name!==S;(O||M)&&v(E,S,function(){var L=p(this),$=x(L.source),F=x(b(L));return"/"+$+"/"+F},{unsafe:!0})}),(function(T,w,a){a(449)}),(function(T,w,a){var g=a(291),v=a(295);g("Set",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},v)}),(function(T,w,a){var g=a(3),v=a(451),p=a(7),x=a(459),y=!x("difference",function(S){return S.size===0}),b=y||p(function(){var S={size:1,has:function(){return!0},keys:function(){var R=0;return{next:function(){var O=R++>1;return E.has(1)&&E.clear(),{done:O,value:2}}}}},E=new Set([1,2,3,4]);return E.difference(S).size!==3});g({target:"Set",proto:!0,real:!0,forced:b},{difference:v})}),(function(T,w,a){var g=a(452),v=a(453),p=a(454),x=a(457),y=a(458),b=a(455),S=a(456),E=v.has,R=v.remove;T.exports=function(M){var D=g(this),L=y(M),$=p(D);return x($)<=L.size?b($,function(F){L.includes(F)&&R($,F)}):S(L.getIterator(),function(F){E($,F)&&R($,F)}),$}}),(function(T,w,a){var g=a(453).has;T.exports=function(v){return g(v),v}}),(function(T,w,a){var g=a(14),v=Set.prototype;T.exports={Set,add:g(v.add),has:g(v.has),remove:g(v.delete),proto:v}}),(function(T,w,a){var g=a(453),v=a(455),p=g.Set,x=g.add;T.exports=function(y){var b=new p;return v(y,function(S){x(b,S)}),b}}),(function(T,w,a){var g=a(14),v=a(456),p=a(453),x=p.Set,y=p.proto,b=g(y.forEach),S=g(y.keys),E=S(new x).next;T.exports=function(R,O,M){return M?v({iterator:S(R),next:E},O):b(R,O)}}),(function(T,w,a){var g=a(8);T.exports=function(v,p,x){for(var y=x?v:v.iterator,b=v.next,S,E;!(S=g(b,y)).done;)if(E=p(S.value),E!==void 0)return E}}),(function(T,w,a){var g=a(119),v=a(453);T.exports=g(v.proto,"size","get")||function(p){return p.size}}),(function(T,w,a){var g=a(30),v=a(46),p=a(8),x=a(61),y=a(267),b="Invalid size",S=RangeError,E=TypeError,R=Math.max,O=function(M,D){this.set=M,this.size=R(D,0),this.has=g(M.has),this.keys=g(M.keys)};O.prototype={getIterator:function(){return y(v(p(this.keys,this.set)))},includes:function(M){return p(this.has,this.set,M)}},T.exports=function(M){v(M);var D=+M.size;if(D!==D)throw new E(b);var L=x(D);if(L<0)throw new S(b);return new O(M,L)}}),(function(T,w,a){var g=a(23),v=function(x){return{size:x,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},p=function(x){return{size:x,has:function(){return!0},keys:function(){throw new Error("e")}}};T.exports=function(x,y){var b=g("Set");try{new b()[x](v(0));try{return new b()[x](v(-1)),!1}catch(E){if(!y)return!0;try{return new b()[x](p(-1/0)),!1}catch(R){var S=new b([1,2]);return y(S[x](p(1/0)))}}}catch(E){return!1}}}),(function(T,w,a){var g=a(3),v=a(7),p=a(461),x=a(459),y=!x("intersection",function(b){return b.size===2&&b.has(1)&&b.has(2)})||v(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});g({target:"Set",proto:!0,real:!0,forced:y},{intersection:p})}),(function(T,w,a){var g=a(452),v=a(453),p=a(457),x=a(458),y=a(455),b=a(456),S=v.Set,E=v.add,R=v.has;T.exports=function(M){var D=g(this),L=x(M),$=new S;return p(D)>L.size?b(L.getIterator(),function(F){R(D,F)&&E($,F)}):y(D,function(F){L.includes(F)&&E($,F)}),$}}),(function(T,w,a){var g=a(3),v=a(463),p=a(459),x=!p("isDisjointFrom",function(y){return!y});g({target:"Set",proto:!0,real:!0,forced:x},{isDisjointFrom:v})}),(function(T,w,a){var g=a(452),v=a(453).has,p=a(457),x=a(458),y=a(455),b=a(456),S=a(141);T.exports=function(R){var O=g(this),M=x(R);if(p(O)<=M.size)return y(O,function(L){if(M.includes(L))return!1},!0)!==!1;var D=M.getIterator();return b(D,function(L){if(v(O,L))return S(D.iterator,"normal",!1)})!==!1}}),(function(T,w,a){var g=a(3),v=a(465),p=a(459),x=!p("isSubsetOf",function(y){return y});g({target:"Set",proto:!0,real:!0,forced:x},{isSubsetOf:v})}),(function(T,w,a){var g=a(452),v=a(457),p=a(455),x=a(458);T.exports=function(b){var S=g(this),E=x(b);return v(S)>E.size?!1:p(S,function(R){if(!E.includes(R))return!1},!0)!==!1}}),(function(T,w,a){var g=a(3),v=a(467),p=a(459),x=!p("isSupersetOf",function(y){return!y});g({target:"Set",proto:!0,real:!0,forced:x},{isSupersetOf:v})}),(function(T,w,a){var g=a(452),v=a(453).has,p=a(457),x=a(458),y=a(456),b=a(141);T.exports=function(E){var R=g(this),O=x(E);if(p(R)<O.size)return!1;var M=O.getIterator();return y(M,function(D){if(!v(R,D))return b(M.iterator,"normal",!1)})!==!1}}),(function(T,w,a){var g=a(3),v=a(469),p=a(470),x=a(459),y=!x("symmetricDifference")||!p("symmetricDifference");g({target:"Set",proto:!0,real:!0,forced:y},{symmetricDifference:v})}),(function(T,w,a){var g=a(452),v=a(453),p=a(454),x=a(458),y=a(456),b=v.add,S=v.has,E=v.remove;T.exports=function(O){var M=g(this),D=x(O).getIterator(),L=p(M);return y(D,function($){S(M,$)?E(L,$):b(L,$)}),L}}),(function(T){T.exports=function(w){try{var a=new Set,g={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return a.clear(),a.add(4),function(){return{done:!0}}}})}},v=a[w](g);return v.size===1&&v.values().next().value===4}catch(p){return!1}}}),(function(T,w,a){var g=a(3),v=a(472),p=a(470),x=a(459),y=!x("union")||!p("union");g({target:"Set",proto:!0,real:!0,forced:y},{union:v})}),(function(T,w,a){var g=a(452),v=a(453).add,p=a(454),x=a(458),y=a(456);T.exports=function(S){var E=g(this),R=x(S).getIterator(),O=p(E);return y(R,function(M){v(O,M)}),O}}),(function(T,w,a){var g=a(3),v=a(14),p=a(16),x=a(61),y=a(68),b=a(7),S=v("".charAt),E=b(function(){return"\u{20BB7}".at(-2)!=="\uD842"});g({target:"String",proto:!0,forced:E},{at:function(O){var M=y(p(this)),D=M.length,L=x(O),$=L>=0?L:D+L;return $<0||$>=D?void 0:S(M,$)}})}),(function(T,w,a){var g=a(3),v=a(475).codeAt;g({target:"String",proto:!0},{codePointAt:function(x){return v(this,x)}})}),(function(T,w,a){var g=a(14),v=a(61),p=a(68),x=a(16),y=g("".charAt),b=g("".charCodeAt),S=g("".slice),E=function(R){return function(O,M){var D=p(x(O)),L=v(M),$=D.length,F,k;return L<0||L>=$?R?"":void 0:(F=b(D,L),F<55296||F>56319||L+1===$||(k=b(D,L+1))<56320||k>57343?R?y(D,L):F:R?S(D,L,L+2):(F-55296<<10)+(k-56320)+65536)}};T.exports={codeAt:E(!1),charAt:E(!0)}}),(function(T,w,a){var g=a(3),v=a(85),p=a(5).f,x=a(64),y=a(68),b=a(477),S=a(16),E=a(478),R=a(36),O=v("".slice),M=Math.min,D=E("endsWith"),L=!R&&!D&&!!(function(){var $=p(String.prototype,"endsWith");return $&&!$.writable})();g({target:"String",proto:!0,forced:!L&&!D},{endsWith:function(F){var k=y(S(this));b(F);var G=y(F),U=arguments.length>1?arguments[1]:void 0,X=k.length,j=U===void 0?X:M(x(U),X);return O(k,j-G.length,j)===G}})}),(function(T,w,a){var g=a(432),v=TypeError;T.exports=function(p){if(g(p))throw new v("The method doesn't accept regular expressions");return p}}),(function(T,w,a){var g=a(33),v=g("match");T.exports=function(p){var x=/./;try{"/./"[p](x)}catch(y){try{return x[v]=!1,"/./"[p](x)}catch(b){}}return!1}}),(function(T,w,a){var g=a(3),v=a(14),p=a(60),x=RangeError,y=String.fromCharCode,b=String.fromCodePoint,S=v([].join),E=!!b&&b.length!==1;g({target:"String",stat:!0,arity:1,forced:E},{fromCodePoint:function(O){for(var M=[],D=arguments.length,L=0,$;D>L;){if($=+arguments[L],p($,1114111)!==$)throw new x($+" is not a valid code point");M[L++]=$<65536?y($):y((($-=65536)>>10)+55296,$%1024+56320)}return S(M,"")}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(477),x=a(16),y=a(68),b=a(478),S=v("".indexOf);g({target:"String",proto:!0,forced:!b("includes")},{includes:function(R){return!!~S(y(x(this)),y(p(R)),arguments.length>1?arguments[1]:void 0)}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(16),x=a(68),y=v("".charCodeAt);g({target:"String",proto:!0},{isWellFormed:function(){for(var S=x(p(this)),E=S.length,R=0;R<E;R++){var O=y(S,R);if((O&63488)===55296&&(O>=56320||++R>=E||(y(S,R)&64512)!==56320))return!1}return!0}})}),(function(T,w,a){var g=a(475).charAt,v=a(68),p=a(51),x=a(176),y=a(179),b="String Iterator",S=p.set,E=p.getterFor(b);x(String,"String",function(R){S(this,{type:b,string:v(R),index:0})},function(){var O=E(this),M=O.string,D=O.index,L;return D>=M.length?y(void 0,!0):(L=g(M,D),O.index+=L.length,y(L,!1))})}),(function(T,w,a){var g=a(8),v=a(14),p=a(484),x=a(46),y=a(20),b=a(64),S=a(68),E=a(16),R=a(29),O=a(485),M=a(433),D=a(486),L=v("".indexOf);p("match",function($,F,k){return[function(U){var X=E(this),j=y(U)?R(U,$):void 0;return j?g(j,U,X):new RegExp(U)[$](S(X))},function(G){var U=x(this),X=S(G),j=k(F,U,X);if(j.done)return j.value;var H=S(M(U));if(!~L(H,"g"))return D(U,X);var Y=!!~L(H,"u")||!!~L(H,"v");U.lastIndex=0;for(var Z=[],Q=0,K;(K=D(U,X))!==null;){var tt=S(K[0]);Z[Q]=tt,tt===""&&(U.lastIndex=O(X,b(U.lastIndex),Y)),Q++}return Q===0?null:Z}]})}),(function(T,w,a){a(442);var g=a(8),v=a(47),p=a(443),x=a(7),y=a(33),b=a(43),S=y("species"),E=RegExp.prototype;T.exports=function(R,O,M,D){var L=y(R),$=!x(function(){var U={};return U[L]=function(){return 7},""[R](U)!==7}),F=$&&!x(function(){var U=!1,X=/a/;if(R==="split"){var j={};j[S]=function(){return X},X={constructor:j,flags:""},X[L]=/./[L]}return X.exec=function(){return U=!0,null},X[L](""),!U});if(!$||!F||M){var k=/./[L],G=O(L,""[R],function(U,X,j,H,Y){var Z=X.exec;return Z===p||Z===E.exec?$&&!Y?{done:!0,value:g(k,X,j,H)}:{done:!0,value:g(U,j,X,H)}:{done:!1}});v(String.prototype,R,G[0]),v(E,L,G[1])}D&&b(E[L],"sham",!0)}}),(function(T,w,a){var g=a(475).charAt;T.exports=function(v,p,x){return p+(x&&g(v,p).length||1)}}),(function(T,w,a){var g=a(8),v=a(46),p=a(21),x=a(15),y=a(443),b=TypeError;T.exports=function(S,E){var R=S.exec;if(p(R)){var O=g(R,S,E);return O!==null&&v(O),O}if(x(S)==="RegExp")return g(y,S,E);throw new b("RegExp#exec called on incompatible receiver")}}),(function(T,w,a){var g=a(3),v=a(8),p=a(85),x=a(177),y=a(179),b=a(16),S=a(64),E=a(68),R=a(46),O=a(20),M=a(15),D=a(432),L=a(433),$=a(29),F=a(47),k=a(7),G=a(33),U=a(380),X=a(485),j=a(486),H=a(51),Y=a(36),Z=G("matchAll"),Q="RegExp String",K=Q+" Iterator",tt=H.set,nt=H.getterFor(K),rt=RegExp.prototype,it=TypeError,st=p("".indexOf),ct=p("".matchAll),ht=!!ct&&!k(function(){ct("a",/./)}),gt=x(function(Tt,Ft,Lt,Pt){tt(this,{type:K,regexp:Tt,string:Ft,global:Lt,unicode:Pt,done:!1})},Q,function(){var Tt=nt(this);if(Tt.done)return y(void 0,!0);var Ft=Tt.regexp,Lt=Tt.string,Pt=j(Ft,Lt);return Pt===null?(Tt.done=!0,y(void 0,!0)):Tt.global?(E(Pt[0])===""&&(Ft.lastIndex=X(Lt,S(Ft.lastIndex),Tt.unicode)),y(Pt,!1)):(Tt.done=!0,y(Pt,!1))}),yt=function(Ct){var Tt=R(this),Ft=E(Ct),Lt=U(Tt,RegExp),Pt=E(L(Tt)),pt,mt,Ot;return pt=new Lt(Lt===RegExp?Tt.source:Tt,Pt),mt=!!~st(Pt,"g"),Ot=!!~st(Pt,"u")||!!~st(Pt,"v"),pt.lastIndex=S(Tt.lastIndex),new gt(pt,Ft,mt,Ot)};g({target:"String",proto:!0,forced:ht},{matchAll:function(Tt){var Ft=b(this),Lt,Pt,pt,mt;if(O(Tt)){if(D(Tt)&&(Lt=E(b(L(Tt))),!~st(Lt,"g")))throw new it("`.matchAll` does not allow non-global regexes");if(ht)return ct(Ft,Tt);if(pt=$(Tt,Z),pt===void 0&&Y&&M(Tt)==="RegExp"&&(pt=yt),pt)return v(pt,Tt,Ft)}else if(ht)return ct(Ft,Tt);return Pt=E(Ft),mt=new RegExp(Tt,"g"),Y?v(yt,mt,Pt):mt[Z](Pt)}}),Y||Z in rt||F(rt,Z,yt)}),(function(T,w,a){var g=a(3),v=a(247).end,p=a(489);g({target:"String",proto:!0,forced:p},{padEnd:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,w,a){var g=a(28);T.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(g)}),(function(T,w,a){var g=a(3),v=a(247).start,p=a(489);g({target:"String",proto:!0,forced:p},{padStart:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(12),x=a(39),y=a(68),b=a(63),S=v([].push),E=v([].join);g({target:"String",stat:!0},{raw:function(O){var M=p(x(O).raw),D=b(M);if(!D)return"";for(var L=arguments.length,$=[],F=0;;){if(S($,y(M[F++])),F===D)return E($,"");F<L&&S($,y(arguments[F]))}}})}),(function(T,w,a){var g=a(3),v=a(248);g({target:"String",proto:!0},{repeat:v})}),(function(T,w,a){var g=a(95),v=a(8),p=a(14),x=a(484),y=a(7),b=a(46),S=a(21),E=a(20),R=a(61),O=a(64),M=a(68),D=a(16),L=a(485),$=a(29),F=a(494),k=a(433),G=a(486),U=a(33),X=U("replace"),j=Math.max,H=Math.min,Y=p([].concat),Z=p([].push),Q=p("".indexOf),K=p("".slice),tt=function(st){return st===void 0?st:String(st)},nt=(function(){return"a".replace(/./,"$0")==="$0"})(),rt=(function(){return/./[X]?/./[X]("a","$0")==="":!1})(),it=!y(function(){var st=/./;return st.exec=function(){var ct=[];return ct.groups={a:"7"},ct},"".replace(st,"$<a>")!=="7"});x("replace",function(st,ct,ht){var gt=rt?"$":"$0";return[function(Ct,Tt){var Ft=D(this),Lt=E(Ct)?$(Ct,X):void 0;return Lt?v(Lt,Ct,Ft,Tt):v(ct,M(Ft),Ct,Tt)},function(yt,Ct){var Tt=b(this),Ft=M(yt),Lt=S(Ct);Lt||(Ct=M(Ct));var Pt=M(k(Tt));if(typeof Ct=="string"&&!~Q(Ct,gt)&&!~Q(Ct,"$<")&&!~Q(Pt,"y")){var pt=ht(ct,Tt,Ft,Ct);if(pt.done)return pt.value}var mt=!!~Q(Pt,"g"),Ot;mt&&(Ot=!!~Q(Pt,"u")||!!~Q(Pt,"v"),Tt.lastIndex=0);for(var Bt=[],Qt;Qt=G(Tt,Ft),!(Qt===null||(Z(Bt,Qt),!mt));){var wt=M(Qt[0]);wt===""&&(Tt.lastIndex=L(Ft,O(Tt.lastIndex),Ot))}for(var Wt="",ae=0,pe=0;pe<Bt.length;pe++){Qt=Bt[pe];for(var oe=M(Qt[0]),de=j(H(R(Qt.index),Ft.length),0),Re=[],Pe,Ee=1;Ee<Qt.length;Ee++)Z(Re,tt(Qt[Ee]));var he=Qt.groups;if(Lt){var ye=Y([oe],Re,de,Ft);he!==void 0&&Z(ye,he),Pe=M(g(Ct,void 0,ye))}else Pe=F(oe,Ft,de,Re,he,Ct);de>=ae&&(Wt+=K(Ft,ae,de)+Pe,ae=de+oe.length)}return Wt+K(Ft,ae)}]},!it||!nt||rt)}),(function(T,w,a){var g=a(14),v=a(39),p=Math.floor,x=g("".charAt),y=g("".replace),b=g("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,E=/\$([$&'`]|\d{1,2})/g;T.exports=function(R,O,M,D,L,$){var F=M+R.length,k=D.length,G=E;return L!==void 0&&(L=v(L),G=S),y($,G,function(U,X){var j;switch(x(X,0)){case"$":return"$";case"&":return R;case"`":return b(O,0,M);case"'":return b(O,F);case"<":j=L[b(X,1,-1)];break;default:var H=+X;if(H===0)return U;if(H>k){var Y=p(H/10);return Y===0?U:Y<=k?D[Y-1]===void 0?x(X,1):D[Y-1]+x(X,1):U}j=D[H-1]}return j===void 0?"":j})}}),(function(T,w,a){var g=a(3),v=a(8),p=a(14),x=a(16),y=a(21),b=a(20),S=a(432),E=a(68),R=a(29),O=a(433),M=a(494),D=a(33),L=a(36),$=D("replace"),F=TypeError,k=p("".indexOf),G=p("".replace),U=p("".slice),X=Math.max;g({target:"String",proto:!0},{replaceAll:function(H,Y){var Z=x(this),Q,K,tt,nt,rt,it,st,ct,ht,gt,yt=0,Ct="";if(b(H)){if(Q=S(H),Q&&(K=E(x(O(H))),!~k(K,"g")))throw new F("`.replaceAll` does not allow non-global regexes");if(tt=R(H,$),tt)return v(tt,H,Z,Y);if(L&&Q)return G(E(Z),H,Y)}for(nt=E(Z),rt=E(H),it=y(Y),it||(Y=E(Y)),st=rt.length,ct=X(1,st),ht=k(nt,rt);ht!==-1;)gt=it?E(Y(rt,ht,nt)):M(rt,nt,ht,[],void 0,Y),Ct+=U(nt,yt,ht)+gt,yt=ht+st,ht=ht+ct>nt.length?-1:k(nt,rt,ht+ct);return yt<nt.length&&(Ct+=U(nt,yt)),Ct}})}),(function(T,w,a){var g=a(8),v=a(484),p=a(46),x=a(20),y=a(16),b=a(362),S=a(68),E=a(29),R=a(486);v("search",function(O,M,D){return[function($){var F=y(this),k=x($)?E($,O):void 0;return k?g(k,$,F):new RegExp($)[O](S(F))},function(L){var $=p(this),F=S(L),k=D(M,$,F);if(k.done)return k.value;var G=$.lastIndex;b(G,0)||($.lastIndex=0);var U=R($,F);return b($.lastIndex,G)||($.lastIndex=G),U===null?-1:U.index}]})}),(function(T,w,a){var g=a(8),v=a(14),p=a(484),x=a(46),y=a(20),b=a(16),S=a(380),E=a(485),R=a(64),O=a(68),M=a(29),D=a(433),L=a(486),$=a(436),F=a(7),k=$.UNSUPPORTED_Y,G=4294967295,U=Math.min,X=v([].push),j=v("".slice),H=v("".indexOf),Y=!F(function(){var Q=/(?:)/,K=Q.exec;Q.exec=function(){return K.apply(this,arguments)};var tt="ab".split(Q);return tt.length!==2||tt[0]!=="a"||tt[1]!=="b"}),Z="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;p("split",function(Q,K,tt){var nt="0".split(void 0,0).length?function(rt,it){return rt===void 0&&it===0?[]:g(K,this,rt,it)}:K;return[function(it,st){var ct=b(this),ht=y(it)?M(it,Q):void 0;return ht?g(ht,it,ct,st):g(nt,O(ct),it,st)},function(rt,it){var st=x(this),ct=O(rt);if(!Z){var ht=tt(nt,st,ct,it,nt!==K);if(ht.done)return ht.value}var gt=S(st,RegExp),yt=O(D(st)),Ct=!!~H(yt,"u")||!!~H(yt,"v");k?~H(yt,"g")||(yt+="g"):~H(yt,"y")||(yt+="y");var Tt=new gt(k?"^(?:"+st.source+")":st,yt),Ft=it===void 0?G:it>>>0;if(Ft===0)return[];if(ct.length===0)return L(Tt,ct)===null?[ct]:[];for(var Lt=0,Pt=0,pt=[];Pt<ct.length;){Tt.lastIndex=k?0:Pt;var mt=L(Tt,k?j(ct,Pt):ct),Ot;if(mt===null||(Ot=U(R(Tt.lastIndex+(k?Pt:0)),ct.length))===Lt)Pt=E(ct,Pt,Ct);else{if(X(pt,j(ct,Lt,Pt)),pt.length===Ft)return pt;for(var Bt=1;Bt<=mt.length-1;Bt++)if(X(pt,mt[Bt]),pt.length===Ft)return pt;Pt=Lt=Ot}}return X(pt,j(ct,Lt)),pt}]},Z||!Y,k)}),(function(T,w,a){var g=a(3),v=a(85),p=a(5).f,x=a(64),y=a(68),b=a(477),S=a(16),E=a(478),R=a(36),O=v("".slice),M=Math.min,D=E("startsWith"),L=!R&&!D&&!!(function(){var $=p(String.prototype,"startsWith");return $&&!$.writable})();g({target:"String",proto:!0,forced:!L&&!D},{startsWith:function(F){var k=y(S(this));b(F);var G=y(F),U=x(M(arguments.length>1?arguments[1]:void 0,k.length));return O(k,U,U+G.length)===G}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(16),x=a(61),y=a(68),b=v("".slice),S=Math.max,E=Math.min,R=!"".substr||"ab".substr(-1)!=="b";g({target:"String",proto:!0,forced:R},{substr:function(M,D){var L=y(p(this)),$=L.length,F=x(M),k=F<0?S($+F,0):E(F,$),G=D===void 0?$:x(D);if(G<=0)return"";var U=E(k+G,$);return k>=U?"":b(L,k,U)}})}),(function(T,w,a){var g=a(3),v=a(8),p=a(14),x=a(16),y=a(68),b=a(7),S=Array,E=p("".charAt),R=p("".charCodeAt),O=p([].join),M="".toWellFormed,D="\uFFFD",L=M&&b(function(){return v(M,1)!=="1"});g({target:"String",proto:!0,forced:L},{toWellFormed:function(){var F=y(x(this));if(L)return v(M,F);for(var k=F.length,G=S(k),U=0;U<k;U++){var X=R(F,U);(X&63488)!==55296?G[U]=E(F,U):X>=56320||U+1>=k||(R(F,U+1)&64512)!==56320?G[U]=D:(G[U]=E(F,U),G[++U]=E(F,U))}return O(G,"")}})}),(function(T,w,a){var g=a(3),v=a(325).trim,p=a(502);g({target:"String",proto:!0,forced:p("trim")},{trim:function(){return v(this)}})}),(function(T,w,a){var g=a(49).PROPER,v=a(7),p=a(326),x="\u200B\x85\u180E";T.exports=function(y){return v(function(){return!!p[y]()||x[y]()!==x||g&&p[y].name!==y})}}),(function(T,w,a){a(504);var g=a(3),v=a(505);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==v},{trimEnd:v})}),(function(T,w,a){var g=a(3),v=a(505);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==v},{trimRight:v})}),(function(T,w,a){var g=a(325).end,v=a(502);T.exports=v("trimEnd")?function(){return g(this)}:"".trimEnd}),(function(T,w,a){a(507);var g=a(3),v=a(508);g({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==v},{trimStart:v})}),(function(T,w,a){var g=a(3),v=a(508);g({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==v},{trimLeft:v})}),(function(T,w,a){var g=a(325).start,v=a(502);T.exports=v("trimStart")?function(){return g(this)}:"".trimStart}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("anchor")},{anchor:function(y){return v(this,"a","name",y)}})}),(function(T,w,a){var g=a(14),v=a(16),p=a(68),x=/"/g,y=g("".replace);T.exports=function(b,S,E,R){var O=p(v(b)),M="<"+S;return E!==""&&(M+=" "+E+'="'+y(p(R),x,""")+'"'),M+">"+O+"</"+S+">"}}),(function(T,w,a){var g=a(7);T.exports=function(v){return g(function(){var p=""[v]('"');return p!==p.toLowerCase()||p.split('"').length>3})}}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("big")},{big:function(){return v(this,"big","","")}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("blink")},{blink:function(){return v(this,"blink","","")}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("bold")},{bold:function(){return v(this,"b","","")}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("fixed")},{fixed:function(){return v(this,"tt","","")}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("fontcolor")},{fontcolor:function(y){return v(this,"font","color",y)}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("fontsize")},{fontsize:function(y){return v(this,"font","size",y)}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("italics")},{italics:function(){return v(this,"i","","")}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("link")},{link:function(y){return v(this,"a","href",y)}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("small")},{small:function(){return v(this,"small","","")}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("strike")},{strike:function(){return v(this,"strike","","")}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("sub")},{sub:function(){return v(this,"sub","","")}})}),(function(T,w,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("sup")},{sup:function(){return v(this,"sup","","")}})}),(function(T,w,a){var g=a(525);g("Float32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,w,a){var g=a(3),v=a(4),p=a(8),x=a(6),y=a(526),b=a(223),S=a(212),E=a(215),R=a(11),O=a(43),M=a(331),D=a(216),L=a(527),$=a(528),F=a(18),k=a(38),G=a(69),U=a(20),X=a(22),j=a(71),H=a(24),Y=a(118),Z=a(57).f,Q=a(529),K=a(83).forEach,tt=a(200),nt=a(77),rt=a(44),it=a(5),st=a(204),ct=a(51),ht=a(123),gt=ct.get,yt=ct.set,Ct=ct.enforce,Tt=rt.f,Ft=it.f,Lt=v.RangeError,Pt=S.ArrayBuffer,pt=Pt.prototype,mt=S.DataView,Ot=b.NATIVE_ARRAY_BUFFER_VIEWS,Bt=b.TYPED_ARRAY_TAG,Qt=b.TypedArray,wt=b.TypedArrayPrototype,Wt=b.isTypedArray,ae="BYTES_PER_ELEMENT",pe="Wrong length",oe=function(he,ye){nt(he,ye,{configurable:!0,get:function(){return gt(this)[ye]}})},de=function(he){var ye;return H(pt,he)||(ye=G(he))==="ArrayBuffer"||ye==="SharedArrayBuffer"},Re=function(he,ye){return Wt(he)&&!X(ye)&&ye in he&&M(+ye)&&ye>=0},Pe=function(ye,Ge){return Ge=F(Ge),Re(ye,Ge)?R(2,ye[Ge]):Ft(ye,Ge)},Ee=function(ye,Ge,Vt){return Ge=F(Ge),Re(ye,Ge)&&U(Vt)&&k(Vt,"value")&&!k(Vt,"get")&&!k(Vt,"set")&&!Vt.configurable&&(!k(Vt,"writable")||Vt.writable)&&(!k(Vt,"enumerable")||Vt.enumerable)?(ye[Ge]=Vt.value,ye):Tt(ye,Ge,Vt)};x?(Ot||(it.f=Pe,rt.f=Ee,oe(wt,"buffer"),oe(wt,"byteOffset"),oe(wt,"byteLength"),oe(wt,"length")),g({target:"Object",stat:!0,forced:!Ot},{getOwnPropertyDescriptor:Pe,defineProperty:Ee}),T.exports=function(he,ye,Ge){var Vt=he.match(/\d+/)[0]/8,ne=he+(Ge?"Clamped":"")+"Array",re="get"+he,en="set"+he,Ht=v[ne],ee=Ht,ve=ee&&ee.prototype,se={},Oe=function(Mt,$t){var qt=gt(Mt);return qt.view[re]($t*Vt+qt.byteOffset,!0)},rn=function(Mt,$t,qt){var Nt=gt(Mt);Nt.view[en]($t*Vt+Nt.byteOffset,Ge?$(qt):qt,!0)},It=function(Mt,$t){Tt(Mt,$t,{get:function(){return Oe(this,$t)},set:function(qt){return rn(this,$t,qt)},enumerable:!0})};Ot?y&&(ee=ye(function(Mt,$t,qt,Nt){return E(Mt,ve),ht((function(){return U($t)?de($t)?Nt!==void 0?new Ht($t,L(qt,Vt),Nt):qt!==void 0?new Ht($t,L(qt,Vt)):new Ht($t):Wt($t)?st(ee,$t):p(Q,ee,$t):new Ht(D($t))})(),Mt,ee)}),Y&&Y(ee,Qt),K(Z(Ht),function(Mt){Mt in ee||O(ee,Mt,Ht[Mt])}),ee.prototype=ve):(ee=ye(function(Mt,$t,qt,Nt){E(Mt,ve);var be=0,Ve=0,Gt,_t,te;if(!U($t))te=D($t),_t=te*Vt,Gt=new Pt(_t);else if(de($t)){Gt=$t,Ve=L(qt,Vt);var ie=$t.byteLength;if(Nt===void 0){if(ie%Vt)throw new Lt(pe);if(_t=ie-Ve,_t<0)throw new Lt(pe)}else if(_t=D(Nt)*Vt,_t+Ve>ie)throw new Lt(pe);te=_t/Vt}else return Wt($t)?st(ee,$t):p(Q,ee,$t);for(yt(Mt,{buffer:Gt,byteOffset:Ve,byteLength:_t,length:te,view:new mt(Gt)});be<te;)It(Mt,be++)}),Y&&Y(ee,Qt),ve=ee.prototype=j(wt)),ve.constructor!==ee&&O(ve,"constructor",ee),Ct(ve).TypedArrayConstructor=ee,Bt&&O(ve,Bt,ne);var Xt=ee!==Ht;se[ne]=ee,g({global:!0,constructor:!0,forced:Xt,sham:!Ot},se),ae in ee||O(ee,ae,Vt),ae in ve||O(ve,ae,Vt),tt(ne)}):T.exports=function(){}}),(function(T,w,a){var g=a(4),v=a(7),p=a(171),x=a(223).NATIVE_ARRAY_BUFFER_VIEWS,y=g.ArrayBuffer,b=g.Int8Array;T.exports=!x||!v(function(){b(1)})||!v(function(){new b(-1)})||!p(function(S){new b,new b(null),new b(1.5),new b(S)},!0)||v(function(){return new b(new y(2),1,void 0).length!==1})}),(function(T,w,a){var g=a(269),v=RangeError;T.exports=function(p,x){var y=g(p);if(y%x)throw new v("Wrong offset");return y}}),(function(T){var w=Math.floor;T.exports=function(a){var g=+a;if(g!==g||g<=0)return 0;if(g>=255)return 255;var v=w(g);return v+.5<g?v+1:g<v+.5||v%2===0?v:v+1}}),(function(T,w,a){var g=a(84),v=a(8),p=a(30),x=a(381),y=a(39),b=a(63),S=a(139),E=a(140),R=a(137),O=a(530),M=a(223).aTypedArrayConstructor,D=a(531);T.exports=function($){var F=x(this),k=arguments.length,G=k>1?arguments[1]:void 0,U=G!==void 0;U&&p(G);var X=y($),j=E(X),H,Y,Z,Q,K,tt,nt,rt;if(j&&!R(j))for(nt=S(X,j),rt=nt.next,X=[];!(tt=v(rt,nt)).done;)X.push(tt.value);for(U&&k>2&&(G=g(G,arguments[2])),Y=b(X),Z=new(M(F))(Y),Q=O(Z),H=0;Y>H;H++)K=U?G(X[H],H):X[H],Z[H]=Q?D(K):+K;return Z}}),(function(T,w,a){var g=a(69);T.exports=function(v){var p=g(v);return p==="BigInt64Array"||p==="BigUint64Array"}}),(function(T,w,a){var g=a(19),v=TypeError;T.exports=function(p){var x=g(p,"number");if(typeof x=="number")throw new v("Can't convert number to bigint");return BigInt(x)}}),(function(T,w,a){var g=a(525);g("Float64",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,w,a){var g=a(525);g("Int8",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,w,a){var g=a(525);g("Int16",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,w,a){var g=a(525);g("Int32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,w,a){var g=a(525);g("Uint8",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,w,a){var g=a(525);g("Uint8",function(v){return function(x,y,b){return v(this,x,y,b)}},!0)}),(function(T,w,a){var g=a(525);g("Uint16",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,w,a){var g=a(525);g("Uint32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,w,a){var g=a(223),v=a(63),p=a(61),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("at",function(S){var E=x(this),R=v(E),O=p(S),M=O>=0?O:R+O;return M<0||M>=R?void 0:E[M]})}),(function(T,w,a){var g=a(14),v=a(223),p=a(151),x=g(p),y=v.aTypedArray,b=v.exportTypedArrayMethod;b("copyWithin",function(E,R){return x(y(this),E,R,arguments.length>2?arguments[2]:void 0)})}),(function(T,w,a){var g=a(223),v=a(83).every,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("every",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(223),v=a(156),p=a(531),x=a(69),y=a(8),b=a(14),S=a(7),E=g.aTypedArray,R=g.exportTypedArrayMethod,O=b("".slice),M=S(function(){var D=0;return new Int8Array(2).fill({valueOf:function(){return D++}}),D!==1});R("fill",function(L){var $=arguments.length;E(this);var F=O(x(this),0,3)==="Big"?p(L):+L;return y(v,this,F,$>1?arguments[1]:void 0,$>2?arguments[2]:void 0)},M)}),(function(T,w,a){var g=a(223),v=a(83).filter,p=a(545),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("filter",function(S){var E=v(x(this),S,arguments.length>1?arguments[1]:void 0);return p(this,E)})}),(function(T,w,a){var g=a(204),v=a(223).getTypedArrayConstructor;T.exports=function(p,x){return g(v(p),x)}}),(function(T,w,a){var g=a(223),v=a(83).find,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("find",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(223),v=a(83).findIndex,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findIndex",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(223),v=a(161).findLast,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findLast",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(223),v=a(161).findLastIndex,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findLastIndex",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(223),v=a(83).forEach,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("forEach",function(b){v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(526),v=a(223).exportTypedArrayStaticMethod,p=a(529);v("from",p,g)}),(function(T,w,a){var g=a(223),v=a(59).includes,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("includes",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(223),v=a(59).indexOf,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("indexOf",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(4),v=a(7),p=a(14),x=a(223),y=a(175),b=a(33),S=b("iterator"),E=g.Uint8Array,R=p(y.values),O=p(y.keys),M=p(y.entries),D=x.aTypedArray,L=x.exportTypedArrayMethod,$=E&&E.prototype,F=!v(function(){$[S].call([1])}),k=!!$&&$.values&&$[S]===$.values&&$.values.name==="values",G=function(){return R(D(this))};L("entries",function(){return M(D(this))},F),L("keys",function(){return O(D(this))},F),L("values",G,F||!k,{name:"values"}),L(S,G,F||!k,{name:"values"})}),(function(T,w,a){var g=a(223),v=a(14),p=g.aTypedArray,x=g.exportTypedArrayMethod,y=v([].join);x("join",function(S){return y(p(this),S)})}),(function(T,w,a){var g=a(223),v=a(95),p=a(182),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("lastIndexOf",function(S){var E=arguments.length;return v(p,x(this),E>1?[S,arguments[1]]:[S])})}),(function(T,w,a){var g=a(223),v=a(83).map,p=a(545),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("map",function(S){var E=v(x(this),S,arguments.length>1?arguments[1]:void 0);return p(this,E)})}),(function(T,w,a){var g=a(223),v=a(526),p=g.aTypedArrayConstructor,x=g.exportTypedArrayStaticMethod;x("of",function(){for(var b=0,S=arguments.length,E=new(p(this))(S);S>b;)E[b]=arguments[b++];return E},v)}),(function(T,w,a){var g=a(223),v=a(187).left,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("reduce",function(b){var S=arguments.length;return v(p(this),b,S,S>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(223),v=a(187).right,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("reduceRight",function(b){var S=arguments.length;return v(p(this),b,S,S>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(223),v=g.aTypedArray,p=g.exportTypedArrayMethod,x=Math.floor;p("reverse",function(){for(var b=this,S=v(b).length,E=x(S/2),R=0,O;R<E;)O=b[R],b[R++]=b[--S],b[S]=O;return b})}),(function(T,w,a){var g=a(4),v=a(8),p=a(223),x=a(63),y=a(527),b=a(39),S=a(7),E=g.RangeError,R=g.Int8Array,O=R&&R.prototype,M=O&&O.set,D=p.aTypedArray,L=p.exportTypedArrayMethod,$=!S(function(){var k=new Uint8ClampedArray(2);return v(M,k,{length:1,0:3},1),k[1]!==3}),F=$&&p.NATIVE_ARRAY_BUFFER_VIEWS&&S(function(){var k=new R(2);return k.set(1),k.set("2",1),k[0]!==0||k[1]!==2});L("set",function(G){D(this);var U=y(arguments.length>1?arguments[1]:void 0,1),X=b(G);if($)return v(M,this,X,U);var j=this.length,H=x(X),Y=0;if(H+U>j)throw new E("Wrong length");for(;Y<H;)this[U+Y]=X[Y++]},!$||F)}),(function(T,w,a){var g=a(223),v=a(7),p=a(76),x=g.aTypedArray,y=g.getTypedArrayConstructor,b=g.exportTypedArrayMethod,S=v(function(){new Int8Array(1).slice()});b("slice",function(R,O){for(var M=p(x(this),R,O),D=y(this),L=0,$=M.length,F=new D($);$>L;)F[L]=M[L++];return F},S)}),(function(T,w,a){var g=a(223),v=a(83).some,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("some",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,w,a){var g=a(4),v=a(85),p=a(7),x=a(30),y=a(195),b=a(223),S=a(196),E=a(197),R=a(27),O=a(198),M=b.aTypedArray,D=b.exportTypedArrayMethod,L=g.Uint16Array,$=L&&v(L.prototype.sort),F=!!$&&!(p(function(){$(new L(2),null)})&&p(function(){$(new L(2),{})})),k=!!$&&!p(function(){if(R)return R<74;if(S)return S<67;if(E)return!0;if(O)return O<602;var U=new L(516),X=Array(516),j,H;for(j=0;j<516;j++)H=j%4,U[j]=515-j,X[j]=j-2*H+3;for($(U,function(Y,Z){return(Y/4|0)-(Z/4|0)}),j=0;j<516;j++)if(U[j]!==X[j])return!0}),G=function(U){return function(X,j){return U!==void 0?+U(X,j)||0:j!==j?X!==X?0:-1:X!==X?1:X===0&&j===0?1/X>0?1/j>0?0:1:1/j>0?-1:0:X>j?1:X<j?-1:0}};D("sort",function(X){return X!==void 0&&x(X),k?$(this,X):y(M(this),G(X))},!k||F)}),(function(T,w,a){var g=a(223),v=a(64),p=a(60),x=g.aTypedArray,y=g.getTypedArrayConstructor,b=g.exportTypedArrayMethod;b("subarray",function(E,R){var O=x(this),M=O.length,D=p(E,M),L=y(O);return new L(O.buffer,O.byteOffset+D*O.BYTES_PER_ELEMENT,v((R===void 0?M:p(R,M))-D))})}),(function(T,w,a){var g=a(4),v=a(95),p=a(223),x=a(7),y=a(76),b=g.Int8Array,S=p.aTypedArray,E=p.exportTypedArrayMethod,R=[].toLocaleString,O=!!b&&x(function(){R.call(new b(1))}),M=x(function(){return[1,2].toLocaleString()!==new b([1,2]).toLocaleString()})||!x(function(){b.prototype.toLocaleString.call([1,2])});E("toLocaleString",function(){return v(R,O?y(S(this)):S(this),y(arguments))},M)}),(function(T,w,a){var g=a(63),v=a(223),p=v.aTypedArray,x=v.exportTypedArrayMethod,y=v.getTypedArrayConstructor;x("toReversed",function(){for(var S=p(this),E=g(S),R=new(y(S))(E),O=0;O<E;O++)R[O]=S[E-O-1];return R})}),(function(T,w,a){var g=a(223),v=a(14),p=a(30),x=a(204),y=g.aTypedArray,b=g.getTypedArrayConstructor,S=g.exportTypedArrayMethod,E=v(g.TypedArrayPrototype.sort);S("toSorted",function(O){O!==void 0&&p(O);var M=y(this),D=x(b(M),M);return E(D,O)})}),(function(T,w,a){var g=a(223).exportTypedArrayMethod,v=a(7),p=a(4),x=a(14),y=p.Uint8Array,b=y&&y.prototype||{},S=[].toString,E=x([].join);v(function(){S.call({})})&&(S=function(){return E(this)});var R=b.toString!==S;g("toString",S,R)}),(function(T,w,a){var g=a(223),v=a(530),p=a(63),x=a(61),y=a(531),b=g.aTypedArray,S=g.getTypedArrayConstructor,E=g.exportTypedArrayMethod,R=RangeError,O=(function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(D){return D===8}})(),M=O&&(function(){try{new Int8Array(1).with(-.5,1)}catch(D){return!0}})();E("with",function(D,L){var $=b(this),F=p($),k=x(D),G=k<0?F+k:k,U=v($)?y(L):+L;if(G>=F||G<0)throw new R("Incorrect index");for(var X=new(S($))(F),j=0;j<F;j++)X[j]=j===G?U:$[j];return X},!O||M)}),(function(T,w,a){var g=a(3),v=a(4),p=a(204),x=a(573),y=v.Uint8Array,b=!y||!y.fromBase64||!(function(){try{y.fromBase64("a");return}catch(S){}try{y.fromBase64("",null)}catch(S){return!0}})();y&&g({target:"Uint8Array",stat:!0,forced:b},{fromBase64:function(E){var R=x(E,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return p(y,R.bytes)}})}),(function(T,w,a){var g=a(4),v=a(14),p=a(574),x=a(440),y=a(38),b=a(575),S=a(576),E=a(236),R=b.c2i,O=b.c2iUrl,M=g.SyntaxError,D=g.TypeError,L=v("".charAt),$=function(G,U){for(var X=G.length;U<X;U++){var j=L(G,U);if(j!==" "&&j!==" "&&j!==`
|
|
30
|
-
`&&j!=="\f"&&j!=="\r")break}return U},F=function(G,U,X){var j=G.length;j<4&&(G+=j===2?"AA":"A");var H=(U[L(G,0)]<<18)+(U[L(G,1)]<<12)+(U[L(G,2)]<<6)+U[L(G,3)],Y=[H>>16&255,H>>8&255,H&255];if(j===2){if(X&&Y[1]!==0)throw new M("Extra bits");return[Y[0]]}if(j===3){if(X&&Y[2]!==0)throw new M("Extra bits");return[Y[0],Y[1]]}return Y},k=function(G,U,X){for(var j=U.length,H=0;H<j;H++)G[X+H]=U[H];return X+j};T.exports=function(G,U,X,j){x(G),p(U);var H=S(U)==="base64"?R:O,Y=U?U.lastChunkHandling:void 0;if(Y===void 0&&(Y="loose"),Y!=="loose"&&Y!=="strict"&&Y!=="stop-before-partial")throw new D("Incorrect `lastChunkHandling` option");X&&E(X.buffer);var Z=G.length,Q=X||[],K=0,tt=0,nt="",rt=0;if(j)for(;;){if(rt=$(G,rt),rt===Z){if(nt.length>0){if(Y==="stop-before-partial")break;if(Y==="loose"){if(nt.length===1)throw new M("Malformed padding: exactly one additional character");K=k(Q,F(nt,H,!1),K)}else throw new M("Missing padding")}tt=Z;break}var it=L(G,rt);if(++rt,it==="="){if(nt.length<2)throw new M("Padding is too early");if(rt=$(G,rt),nt.length===2){if(rt===Z){if(Y==="stop-before-partial")break;throw new M("Malformed padding: only one =")}L(G,rt)==="="&&(++rt,rt=$(G,rt))}if(rt<Z)throw new M("Unexpected character after padding");K=k(Q,F(nt,H,Y==="strict"),K),tt=Z;break}if(!y(H,it))throw new M("Unexpected character");var st=j-K;if(st===1&&nt.length===2||st===2&&nt.length===3||(nt+=it,nt.length===4&&(K=k(Q,F(nt,H,!1),K),nt="",tt=rt,K===j)))break}return{bytes:Q,read:tt,written:K}}}),(function(T,w,a){var g=a(20),v=String,p=TypeError;T.exports=function(x){if(x===void 0||g(x))return x;throw new p(v(x)+" is not an object or undefined")}}),(function(T){var w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=w+"+/",g=w+"-_",v=function(p){for(var x={},y=0;y<64;y++)x[p.charAt(y)]=y;return x};T.exports={i2c:a,c2i:v(a),i2cUrl:g,c2iUrl:v(g)}}),(function(T){var w=TypeError;T.exports=function(a){var g=a&&a.alphabet;if(g===void 0||g==="base64"||g==="base64url")return g||"base64";throw new w("Incorrect `alphabet` option")}}),(function(T,w,a){var g=a(3),v=a(4),p=a(440),x=a(578);v.Uint8Array&&g({target:"Uint8Array",stat:!0},{fromHex:function(b){return x(p(b)).bytes}})}),(function(T,w,a){var g=a(4),v=a(14),p=g.Uint8Array,x=g.SyntaxError,y=Math.min,b=v("".match);T.exports=function(S,E){var R=S.length;if(R%2!==0)throw new x("String should be an even number of characters");for(var O=E?y(E.length,R/2):R/2,M=E||new p(O),D=b(S,/.{2}/g),L=0;L<O;L++){var $=+("0x"+D[L]+"0");if($!==$)throw new x("String should only contain hex characters");M[L]=$>>4}return{bytes:M,read:L<<1}}}),(function(T,w,a){var g=a(3),v=a(4),p=a(573),x=a(580),y=v.Uint8Array,b=!y||!y.prototype.setFromBase64||!(function(){var S=new y([255,255,255,255,255]);try{S.setFromBase64("",null);return}catch(E){}try{S.setFromBase64("a");return}catch(E){}try{S.setFromBase64("MjYyZg===")}catch(E){return S[0]===50&&S[1]===54&&S[2]===50&&S[3]===255&&S[4]===255}})();y&&g({target:"Uint8Array",proto:!0,forced:b},{setFromBase64:function(E){x(this);var R=p(E,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:R.read,written:R.written}}})}),(function(T,w,a){var g=a(69),v=TypeError;T.exports=function(p){if(g(p)==="Uint8Array")return p;throw new v("Argument is not an Uint8Array")}}),(function(T,w,a){var g=a(3),v=a(4),p=a(440),x=a(580),y=a(236),b=a(578);function S(){try{var E=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(E).setFromHex("cafed00d")}catch(R){return!0}}v.Uint8Array&&g({target:"Uint8Array",proto:!0,forced:S()},{setFromHex:function(R){x(this),p(R),y(this.buffer);var O=b(R,this).read;return{read:O,written:O/2}}})}),(function(T,w,a){var g=a(3),v=a(4),p=a(14),x=a(574),y=a(580),b=a(236),S=a(575),E=a(576),R=S.i2c,O=S.i2cUrl,M=p("".charAt),D=v.Uint8Array,L=!D||!D.prototype.toBase64||!(function(){try{var $=new D;$.toBase64(null)}catch(F){return!0}})();D&&g({target:"Uint8Array",proto:!0,forced:L},{toBase64:function(){var F=y(this),k=arguments.length?x(arguments[0]):void 0,G=E(k)==="base64"?R:O,U=!!k&&!!k.omitPadding;b(this.buffer);for(var X="",j=0,H=F.length,Y,Z=function(Q){return M(G,Y>>6*Q&63)};j+2<H;j+=3)Y=(F[j]<<16)+(F[j+1]<<8)+F[j+2],X+=Z(3)+Z(2)+Z(1)+Z(0);return j+2===H?(Y=(F[j]<<16)+(F[j+1]<<8),X+=Z(3)+Z(2)+Z(1)+(U?"":"=")):j+1===H&&(Y=F[j]<<16,X+=Z(3)+Z(2)+(U?"":"==")),X}})}),(function(T,w,a){var g=a(3),v=a(4),p=a(14),x=a(580),y=a(236),b=p(1.1.toString),S=p([].join),E=Array,R=v.Uint8Array,O=!R||!R.prototype.toHex||!(function(){try{var M=new R([255,255,255,255,255,255,255,255]);return M.toHex()==="ffffffffffffffff"}catch(D){return!1}})();R&&g({target:"Uint8Array",proto:!0,forced:O},{toHex:function(){x(this),y(this.buffer);for(var D=E(this.length),L=0,$=this.length;L<$;L++){var F=b(this[L],16);D[L]=F.length===1?"0"+F:F}return S(D,"")}})}),(function(T,w,a){var g=a(3),v=a(14),p=a(68),x=String.fromCharCode,y=v("".charAt),b=v(/./.exec),S=v("".slice),E=/^[\da-f]{2}$/i,R=/^[\da-f]{4}$/i;g({global:!0},{unescape:function(M){for(var D=p(M),L="",$=D.length,F=0,k,G;F<$;){if(k=y(D,F++),k==="%"){if(y(D,F)==="u"){if(G=S(D,F+1,F+5),b(R,G)){L+=x(parseInt(G,16)),F+=5;continue}}else if(G=S(D,F,F+2),b(E,G)){L+=x(parseInt(G,16)),F+=2;continue}}L+=k}return L}})}),(function(T,w,a){a(586)}),(function(T,w,a){var g=a(287),v=a(4),p=a(14),x=a(214),y=a(292),b=a(291),S=a(587),E=a(20),R=a(51).enforce,O=a(7),M=a(52),D=Object,L=Array.isArray,$=D.isExtensible,F=D.isFrozen,k=D.isSealed,G=D.freeze,U=D.seal,X=!v.ActiveXObject&&"ActiveXObject"in v,j,H=function(it){return function(){return it(this,arguments.length?arguments[0]:void 0)}},Y=b("WeakMap",H,S),Z=Y.prototype,Q=p(Z.set),K=function(){return g&&O(function(){var it=G([]);return Q(new Y,it,1),!F(it)})};if(M)if(X){j=S.getConstructor(H,"WeakMap",!0),y.enable();var tt=p(Z.delete),nt=p(Z.has),rt=p(Z.get);x(Z,{delete:function(it){if(E(it)&&!$(it)){var st=R(this);return st.frozen||(st.frozen=new j),tt(this,it)||st.frozen.delete(it)}return tt(this,it)},has:function(st){if(E(st)&&!$(st)){var ct=R(this);return ct.frozen||(ct.frozen=new j),nt(this,st)||ct.frozen.has(st)}return nt(this,st)},get:function(st){if(E(st)&&!$(st)){var ct=R(this);return ct.frozen||(ct.frozen=new j),nt(this,st)?rt(this,st):ct.frozen.get(st)}return rt(this,st)},set:function(st,ct){if(E(st)&&!$(st)){var ht=R(this);ht.frozen||(ht.frozen=new j),nt(this,st)?Q(this,st,ct):ht.frozen.set(st,ct)}else Q(this,st,ct);return this}})}else K()&&x(Z,{set:function(st,ct){var ht;return L(st)&&(F(st)?ht=G:k(st)&&(ht=U)),Q(this,st,ct),ht&&ht(st),this}})}),(function(T,w,a){var g=a(14),v=a(214),p=a(292).getWeakData,x=a(215),y=a(46),b=a(17),S=a(20),E=a(136),R=a(83),O=a(38),M=a(51),D=M.set,L=M.getterFor,$=R.find,F=R.findIndex,k=g([].splice),G=0,U=function(H){return H.frozen||(H.frozen=new X)},X=function(){this.entries=[]},j=function(H,Y){return $(H.entries,function(Z){return Z[0]===Y})};X.prototype={get:function(H){var Y=j(this,H);if(Y)return Y[1]},has:function(H){return!!j(this,H)},set:function(H,Y){var Z=j(this,H);Z?Z[1]=Y:this.entries.push([H,Y])},delete:function(H){var Y=F(this.entries,function(Z){return Z[0]===H});return~Y&&k(this.entries,Y,1),!!~Y}},T.exports={getConstructor:function(H,Y,Z,Q){var K=H(function(it,st){x(it,tt),D(it,{type:Y,id:G++,frozen:null}),b(st)||E(st,it[Q],{that:it,AS_ENTRIES:Z})}),tt=K.prototype,nt=L(Y),rt=function(it,st,ct){var ht=nt(it),gt=p(y(st),!0);return gt===!0?U(ht).set(st,ct):gt[ht.id]=ct,it};return v(tt,{delete:function(it){var st=nt(this);if(!S(it))return!1;var ct=p(it);return ct===!0?U(st).delete(it):ct&&O(ct,st.id)&&delete ct[st.id]},has:function(st){var ct=nt(this);if(!S(st))return!1;var ht=p(st);return ht===!0?U(ct).has(st):ht&&O(ht,ct.id)}}),v(tt,Z?{get:function(st){var ct=nt(this);if(S(st)){var ht=p(st);if(ht===!0)return U(ct).get(st);if(ht)return ht[ct.id]}},set:function(st,ct){return rt(this,st,ct)}}:{add:function(st){return rt(this,st,!0)}}),K}}}),(function(T,w,a){var g=a(3),v=a(589),p=a(36),x=v.get,y=v.has,b=v.set;g({target:"WeakMap",proto:!0,real:!0,forced:p},{getOrInsert:function(E,R){return y(this,E)?x(this,E):(b(this,E,R),R)}})}),(function(T,w,a){var g=a(14),v=WeakMap.prototype;T.exports={WeakMap,set:g(v.set),get:g(v.get),has:g(v.has),remove:g(v.delete)}}),(function(T,w,a){var g=a(3),v=a(30),p=a(591),x=a(592),y=a(589),b=a(36),S=y.get,E=y.has,R=y.set,O=b||!(function(){try{WeakMap.prototype.getOrInsertComputed&&new WeakMap().getOrInsertComputed(1,function(){throw 1})}catch(M){return M instanceof TypeError}})();g({target:"WeakMap",proto:!0,real:!0,forced:O},{getOrInsertComputed:function(D,L){if(b||p(this),x(D),v(L),E(this,D))return S(this,D);var $=L(D);return R(this,D,$),$}})}),(function(T,w,a){var g=a(589).has;T.exports=function(v){return g(v),v}}),(function(T,w,a){var g=a(589),v=new g.WeakMap,p=g.set,x=g.remove;T.exports=function(y){return p(v,y,1),x(v,y),y}}),(function(T,w,a){a(594)}),(function(T,w,a){var g=a(291),v=a(587);g("WeakSet",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},v)}),(function(T,w,a){var g=a(3),v=a(4),p=a(23),x=a(14),y=a(8),b=a(7),S=a(68),E=a(383),R=a(575).c2i,O=/[^\d+/a-z]/i,M=/[\t\n\f\r ]+/g,D=/[=]{1,2}$/,L=p("atob"),$=Array,F=String.fromCharCode,k=x("".charAt),G=x("".replace),U=x([].join),X=x(O.exec),j=!!L&&!b(function(){return L("aGk=")!=="hi"}),H=j&&b(function(){return L(" ")!==""}),Y=j&&!b(function(){L("a")}),Z=j&&!b(function(){L()}),Q=j&&L.length!==1,K=!j||H||Y||Z||Q;g({global:!0,bind:!0,enumerable:!0,forced:K},{atob:function(nt){if(E(arguments.length,1),j&&!H&&!Y)return y(L,v,nt);var rt=G(S(nt),M,""),it=0,st=0,ct,ht,gt;rt.length&3||(rt=G(rt,D,"")),ct=rt.length;var yt=ct&3;if(yt===1||X(O,rt))throw new(p("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(var Ct=new $((ct>>2)*3+(yt?yt-1:0)),Tt=0;it<ct;)ht=k(rt,it++),gt=st&3?(gt<<6)+R[ht]:R[ht],st++&3&&(Ct[Tt++]=F(255>>>(-2*st&6)));return U(Ct,"")}})}),(function(T,w,a){var g=a(3),v=a(4),p=a(23),x=a(14),y=a(8),b=a(7),S=a(68),E=a(383),R=a(575).i2c,O=p("btoa"),M=Array,D=x([].join),L=x("".charAt),$=x("".charCodeAt),F=!!O&&!b(function(){return O("hi")!=="aGk="}),k=F&&!b(function(){O()}),G=F&&b(function(){return O(null)!=="bnVsbA=="}),U=F&&O.length!==1;g({global:!0,bind:!0,enumerable:!0,forced:!F||k||G||U},{btoa:function(j){if(E(arguments.length,1),F)return y(O,v,S(j));for(var H=S(j),Y=new M((H.length+2)/3<<2),Z=0,Q=0,K=R,tt,nt;L(H,Q)||(K="=",Q%1);){if(nt=$(H,Q+=.75),nt>255)throw new(p("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");tt=tt<<8|nt,Y[Z++]=L(K,63&tt>>8-Q%1*8)}return D(Y,"")}})}),(function(T,w,a){var g=a(4),v=a(598),p=a(599),x=a(167),y=a(43),b=function(E){if(E&&E.forEach!==x)try{y(E,"forEach",x)}catch(R){E.forEach=x}};for(var S in v)v[S]&&b(g[S]&&g[S].prototype);b(p)}),(function(T){T.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),(function(T,w,a){var g=a(42),v=g("span").classList,p=v&&v.constructor&&v.constructor.prototype;T.exports=p===Object.prototype?void 0:p}),(function(T,w,a){var g=a(4),v=a(598),p=a(599),x=a(175),y=a(43),b=a(82),S=a(33),E=S("iterator"),R=x.values,O=function(D,L){if(D){if(D[E]!==R)try{y(D,E,R)}catch(F){D[E]=R}if(b(D,L,!0),v[L]){for(var $ in x)if(D[$]!==x[$])try{y(D,$,x[$])}catch(F){D[$]=x[$]}}}};for(var M in v)O(g[M]&&g[M].prototype,M);O(p,"DOMTokenList")}),(function(T,w,a){var g=a(3),v=a(23),p=a(238),x=a(7),y=a(71),b=a(11),S=a(44).f,E=a(47),R=a(77),O=a(38),M=a(215),D=a(46),L=a(131),$=a(124),F=a(602),k=a(127),G=a(51),U=a(6),X=a(36),j="DOMException",H="DATA_CLONE_ERR",Y=v("Error"),Z=v(j)||(function(){try{var wt=v("MessageChannel")||p("worker_threads").MessageChannel;new wt().port1.postMessage(new WeakMap)}catch(Wt){if(Wt.name===H&&Wt.code===25)return Wt.constructor}})(),Q=Z&&Z.prototype,K=Y.prototype,tt=G.set,nt=G.getterFor(j),rt="stack"in new Y(j),it=function(wt){return O(F,wt)&&F[wt].m?F[wt].c:0},st=function(){M(this,ct);var Wt=arguments.length,ae=$(Wt<1?void 0:arguments[0]),pe=$(Wt<2?void 0:arguments[1],"Error"),oe=it(pe);if(tt(this,{type:j,name:pe,message:ae,code:oe}),U||(this.name=pe,this.message=ae,this.code=oe),rt){var de=new Y(ae);de.name=j,S(this,"stack",b(1,k(de.stack,1)))}},ct=st.prototype=y(K),ht=function(wt){return{enumerable:!0,configurable:!0,get:wt}},gt=function(wt){return ht(function(){return nt(this)[wt]})};U&&(R(ct,"code",gt("code")),R(ct,"message",gt("message")),R(ct,"name",gt("name"))),S(ct,"constructor",b(1,st));var yt=x(function(){return!(new Z instanceof Y)}),Ct=yt||x(function(){return K.toString!==L||String(new Z(1,2))!=="2: 1"}),Tt=yt||x(function(){return new Z(1,"DataCloneError").code!==25}),Ft=yt||Z[H]!==25||Q[H]!==25,Lt=X?Ct||Tt||Ft:yt;g({global:!0,constructor:!0,forced:Lt},{DOMException:Lt?st:Z});var Pt=v(j),pt=Pt.prototype;Ct&&(X||Z===Pt)&&E(pt,"toString",L),Tt&&U&&Z===Pt&&R(pt,"code",ht(function(){return it(D(this).name)}));for(var mt in F)if(O(F,mt)){var Ot=F[mt],Bt=Ot.s,Qt=b(6,Ot.c);O(Pt,Bt)||S(Pt,Bt,Qt),O(pt,Bt)||S(pt,Bt,Qt)}}),(function(T){T.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}}),(function(T,w,a){var g=a(3),v=a(4),p=a(23),x=a(11),y=a(44).f,b=a(38),S=a(215),E=a(123),R=a(124),O=a(602),M=a(127),D=a(6),L=a(36),$="DOMException",F=p("Error"),k=p($),G=function(){S(this,U);var st=arguments.length,ct=R(st<1?void 0:arguments[0]),ht=R(st<2?void 0:arguments[1],"Error"),gt=new k(ct,ht),yt=new F(ct);return yt.name=$,y(gt,"stack",x(1,M(yt.stack,1))),E(gt,this,G),gt},U=G.prototype=k.prototype,X="stack"in new F($),j="stack"in new k(1,2),H=k&&D&&Object.getOwnPropertyDescriptor(v,$),Y=!!H&&!(H.writable&&H.configurable),Z=X&&!Y&&!j;g({global:!0,constructor:!0,forced:L||Z},{DOMException:Z?G:k});var Q=p($),K=Q.prototype;if(K.constructor!==Q){L||y(K,"constructor",x(1,Q));for(var tt in O)if(b(O,tt)){var nt=O[tt],rt=nt.s;b(Q,rt)||y(Q,rt,x(6,nt.c))}}}),(function(T,w,a){var g=a(23),v=a(82),p="DOMException";v(g(p),p)}),(function(T,w,a){a(606),a(607)}),(function(T,w,a){var g=a(3),v=a(4),p=a(382).clear;g({global:!0,bind:!0,enumerable:!0,forced:v.clearImmediate!==p},{clearImmediate:p})}),(function(T,w,a){var g=a(3),v=a(4),p=a(382).set,x=a(608),y=v.setImmediate?x(p,!1):p;g({global:!0,bind:!0,enumerable:!0,forced:v.setImmediate!==y},{setImmediate:y})}),(function(T,w,a){var g=a(4),v=a(95),p=a(21),x=a(189),y=a(28),b=a(76),S=a(383),E=g.Function,R=/MSIE .\./.test(y)||x==="BUN"&&(function(){var O=g.Bun.version.split(".");return O.length<3||O[0]==="0"&&(O[1]<3||O[1]==="3"&&O[2]==="0")})();T.exports=function(O,M){var D=M?2:1;return R?function(L,$){var F=S(arguments.length,1)>D,k=p(L)?L:E(L),G=F?b(arguments,D):[],U=F?function(){v(k,this,G)}:k;return M?O(U,$):O(U)}:O}}),(function(T,w,a){var g=a(3),v=a(4),p=a(385),x=a(30),y=a(383),b=a(7),S=a(6),E=b(function(){return S&&Object.getOwnPropertyDescriptor(v,"queueMicrotask").value.length!==1});g({global:!0,enumerable:!0,dontCallGetSet:!0,forced:E},{queueMicrotask:function(O){y(arguments.length,1),p(x(O))}})}),(function(T,w,a){var g=a(3),v=a(4),p=a(77),x=a(6),y=TypeError,b=Object.defineProperty,S=v.self!==v;try{if(x){var E=Object.getOwnPropertyDescriptor(v,"self");(S||!E||!E.get||!E.enumerable)&&p(v,"self",{get:function(){return v},set:function(O){if(this!==v)throw new y("Illegal invocation");b(v,"self",{value:O,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else g({global:!0,simple:!0,forced:S},{self:v})}catch(R){}}),(function(T,w,a){var g=a(36),v=a(3),p=a(4),x=a(23),y=a(14),b=a(7),S=a(40),E=a(21),R=a(89),O=a(17),M=a(20),D=a(22),L=a(136),$=a(46),F=a(69),k=a(38),G=a(90),U=a(43),X=a(63),j=a(383),H=a(433),Y=a(297),Z=a(453),Q=a(455),K=a(237),tt=a(128),nt=a(239),rt=p.Object,it=p.Array,st=p.Date,ct=p.Error,ht=p.TypeError,gt=p.PerformanceMark,yt=x("DOMException"),Ct=Y.Map,Tt=Y.has,Ft=Y.get,Lt=Y.set,Pt=Z.Set,pt=Z.add,mt=Z.has,Ot=x("Object","keys"),Bt=y([].push),Qt=y((!0).valueOf),wt=y(1.1.valueOf),Wt=y("".valueOf),ae=y(st.prototype.getTime),pe=S("structuredClone"),oe="DataCloneError",de="Transferring",Re=function(It){return!b(function(){var Xt=new p.Set([7]),Mt=It(Xt),$t=It(rt(7));return Mt===Xt||!Mt.has(7)||!M($t)||+$t!=7})&&It},Pe=function(It,Xt){return!b(function(){var Mt=new Xt,$t=It({a:Mt,b:Mt});return!($t&&$t.a===$t.b&&$t.a instanceof Xt&&$t.a.stack===Mt.stack)})},Ee=function(It){return!b(function(){var Xt=It(new p.AggregateError([1],pe,{cause:3}));return Xt.name!=="AggregateError"||Xt.errors[0]!==1||Xt.message!==pe||Xt.cause!==3})},he=p.structuredClone,ye=g||!Pe(he,ct)||!Pe(he,yt)||!Ee(he),Ge=!he&&Re(function(It){return new gt(pe,{detail:It}).detail}),Vt=Re(he)||Ge,ne=function(It){throw new yt("Uncloneable type: "+It,oe)},re=function(It,Xt){throw new yt((Xt||"Cloning")+" of "+It+" cannot be properly polyfilled in this engine",oe)},en=function(It,Xt){return Vt||re(Xt),Vt(It)},Ht=function(){var It;try{It=new p.DataTransfer}catch(Xt){try{It=new p.ClipboardEvent("").clipboardData}catch(Mt){}}return It&&It.items&&It.files?It:null},ee=function(It,Xt,Mt){if(Tt(Xt,It))return Ft(Xt,It);var $t=Mt||F(It),qt,Nt,be,Ve,Gt,_t;if($t==="SharedArrayBuffer")Vt?qt=Vt(It):qt=It;else{var te=p.DataView;!te&&!E(It.slice)&&re("ArrayBuffer");try{if(E(It.slice)&&!It.resizable)qt=It.slice(0);else for(Nt=It.byteLength,be=("maxByteLength"in It)?{maxByteLength:It.maxByteLength}:void 0,qt=new ArrayBuffer(Nt,be),Ve=new te(It),Gt=new te(qt),_t=0;_t<Nt;_t++)Gt.setUint8(_t,Ve.getUint8(_t))}catch(ie){throw new yt("ArrayBuffer is detached",oe)}}return Lt(Xt,It,qt),qt},ve=function(It,Xt,Mt,$t,qt){var Nt=p[Xt];return M(Nt)||re(Xt),new Nt(ee(It.buffer,qt),Mt,$t)},se=function(It,Xt){if(D(It)&&ne("Symbol"),!M(It))return It;if(Xt){if(Tt(Xt,It))return Ft(Xt,It)}else Xt=new Ct;var Mt=F(It),$t,qt,Nt,be,Ve,Gt,_t,te;switch(Mt){case"Array":Nt=it(X(It));break;case"Object":Nt={};break;case"Map":Nt=new Ct;break;case"Set":Nt=new Pt;break;case"RegExp":Nt=new RegExp(It.source,H(It));break;case"Error":switch(qt=It.name,qt){case"AggregateError":Nt=new(x(qt))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":Nt=new(x(qt));break;case"CompileError":case"LinkError":case"RuntimeError":Nt=new(x("WebAssembly",qt));break;default:Nt=new ct}break;case"DOMException":Nt=new yt(It.message,It.name);break;case"ArrayBuffer":case"SharedArrayBuffer":Nt=ee(It,Xt,Mt);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Gt=Mt==="DataView"?It.byteLength:It.length,Nt=ve(It,Mt,It.byteOffset,Gt,Xt);break;case"DOMQuad":try{Nt=new DOMQuad(se(It.p1,Xt),se(It.p2,Xt),se(It.p3,Xt),se(It.p4,Xt))}catch(ie){Nt=en(It,Mt)}break;case"File":if(Vt)try{Nt=Vt(It),F(Nt)!==Mt&&(Nt=void 0)}catch(ie){}if(!Nt)try{Nt=new File([It],It.name,It)}catch(ie){}Nt||re(Mt);break;case"FileList":if(be=Ht(),be){for(Ve=0,Gt=X(It);Ve<Gt;Ve++)be.items.add(se(It[Ve],Xt));Nt=be.files}else Nt=en(It,Mt);break;case"ImageData":try{Nt=new ImageData(se(It.data,Xt),It.width,It.height,{colorSpace:It.colorSpace})}catch(ie){Nt=en(It,Mt)}break;default:if(Vt)Nt=Vt(It);else switch(Mt){case"BigInt":Nt=rt(It.valueOf());break;case"Boolean":Nt=rt(Qt(It));break;case"Number":Nt=rt(wt(It));break;case"String":Nt=rt(Wt(It));break;case"Date":Nt=new st(ae(It));break;case"Blob":try{Nt=It.slice(0,It.size,It.type)}catch(ie){re(Mt)}break;case"DOMPoint":case"DOMPointReadOnly":$t=p[Mt];try{Nt=$t.fromPoint?$t.fromPoint(It):new $t(It.x,It.y,It.z,It.w)}catch(ie){re(Mt)}break;case"DOMRect":case"DOMRectReadOnly":$t=p[Mt];try{Nt=$t.fromRect?$t.fromRect(It):new $t(It.x,It.y,It.width,It.height)}catch(ie){re(Mt)}break;case"DOMMatrix":case"DOMMatrixReadOnly":$t=p[Mt];try{Nt=$t.fromMatrix?$t.fromMatrix(It):new $t(It)}catch(ie){re(Mt)}break;case"AudioData":case"VideoFrame":E(It.clone)||re(Mt);try{Nt=It.clone()}catch(ie){ne(Mt)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":re(Mt);default:ne(Mt)}}switch(Lt(Xt,It,Nt),Mt){case"Array":case"Object":for(_t=Ot(It),Ve=0,Gt=X(_t);Ve<Gt;Ve++)te=_t[Ve],G(Nt,te,se(It[te],Xt));break;case"Map":It.forEach(function(ie,Ce){Lt(Nt,se(Ce,Xt),se(ie,Xt))});break;case"Set":It.forEach(function(ie){pt(Nt,se(ie,Xt))});break;case"Error":U(Nt,"message",se(It.message,Xt)),k(It,"cause")&&U(Nt,"cause",se(It.cause,Xt)),qt==="AggregateError"?Nt.errors=se(It.errors,Xt):qt==="SuppressedError"&&(Nt.error=se(It.error,Xt),Nt.suppressed=se(It.suppressed,Xt));case"DOMException":tt&&U(Nt,"stack",se(It.stack,Xt))}return Nt},Oe=function(It,Xt){if(!M(It))throw new ht("Transfer option cannot be converted to a sequence");var Mt=[];L(It,function(Ce){Bt(Mt,$(Ce))});for(var $t=0,qt=X(Mt),Nt=new Pt,be,Ve,Gt,_t,te,ie;$t<qt;){if(be=Mt[$t++],Ve=F(be),_t=void 0,Ve==="ArrayBuffer"?mt(Nt,be):Tt(Xt,be))throw new yt("Duplicate transferable",oe);if(Ve==="ArrayBuffer"){pt(Nt,be);continue}if(nt)_t=he(be,{transfer:[be]});else switch(Ve){case"ImageBitmap":Gt=p.OffscreenCanvas,R(Gt)||re(Ve,de);try{te=new Gt(be.width,be.height),ie=te.getContext("bitmaprenderer"),ie.transferFromImageBitmap(be),_t=te.transferToImageBitmap()}catch(Ce){}break;case"AudioData":case"VideoFrame":(!E(be.clone)||!E(be.close))&&re(Ve,de);try{_t=be.clone(),be.close()}catch(Ce){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":re(Ve,de)}if(_t===void 0)throw new yt("This object cannot be transferred: "+Ve,oe);Lt(Xt,be,_t)}return Nt},rn=function(It){Q(It,function(Xt){nt?he(Xt,{transfer:[Xt]}):E(Xt.transfer)?Xt.transfer():K?K(Xt):re("ArrayBuffer",de)})};v({global:!0,enumerable:!0,sham:!nt,forced:ye},{structuredClone:function(Xt){var Mt=j(arguments.length,1)>1&&!O(arguments[1])?$(arguments[1]):void 0,$t=Mt?Mt.transfer:void 0,qt,Nt;$t!==void 0&&(qt=new Ct,Nt=Oe($t,qt));var be=se(Xt,qt);return Nt&&rn(Nt),be}})}),(function(T,w,a){a(613),a(614)}),(function(T,w,a){var g=a(3),v=a(4),p=a(608),x=p(v.setInterval,!0);g({global:!0,bind:!0,forced:v.setInterval!==x},{setInterval:x})}),(function(T,w,a){var g=a(3),v=a(4),p=a(608),x=p(v.setTimeout,!0);g({global:!0,bind:!0,forced:v.setTimeout!==x},{setTimeout:x})}),(function(T,w,a){a(616)}),(function(T,w,a){a(482);var g=a(3),v=a(6),p=a(617),x=a(4),y=a(84),b=a(14),S=a(47),E=a(77),R=a(215),O=a(38),M=a(344),D=a(169),L=a(76),$=a(475).codeAt,F=a(618),k=a(68),G=a(82),U=a(383),X=a(619),j=a(51),H=j.set,Y=j.getterFor("URL"),Z=X.URLSearchParams,Q=X.getState,K=x.URL,tt=x.TypeError,nt=x.encodeURIComponent,rt=x.parseInt,it=Math.floor,st=Math.pow,ct=b("".charAt),ht=b(/./.exec),gt=b([].join),yt=b(1.1.toString),Ct=b([].pop),Tt=b([].push),Ft=b("".replace),Lt=b([].shift),Pt=b("".split),pt=b("".slice),mt=b("".toLowerCase),Ot=b([].unshift),Bt="Invalid authority",Qt="Invalid scheme",wt="Invalid host",Wt="Invalid port",ae=/[a-z]/i,pe=/[\d+\-.a-z]/i,oe=/\d/,de=/^0x/i,Re=/^[0-7]+$/,Pe=/^\d+$/,Ee=/^[\da-f]+$/i,he=/[\0\t\n\r #%/:<>?@[\\\]^|]/,ye=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ge=/^[\u0000-\u0020]+/,Vt=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ne=/[\t\n\r]/g,re,en=function(St){var Ut=Pt(St,"."),At,vt;if(Ut[Ut.length-1]===""){if(Ut.length===1)return!1;Ut.length--}return At=Ut[Ut.length-1],ht(Pe,At)?!0:ht(de,At)?(vt=pt(At,2),vt===""||!!ht(Ee,vt)):!1},Ht=function(St){var Ut=Pt(St,"."),At,vt,zt,Me,ue,kt,jt;if(Ut.length&&Ut[Ut.length-1]===""&&Ut.length--,At=Ut.length,At>4)return null;for(vt=[],zt=0;zt<At;zt++){if(Me=Ut[zt],Me==="")return null;if(ue=10,Me.length>1&&ct(Me,0)==="0"&&(ue=ht(de,Me)?16:8,Me=pt(Me,ue===8?1:2)),Me==="")kt=0;else{if(!ht(ue===10?Pe:ue===8?Re:Ee,Me))return null;kt=rt(Me,ue)}Tt(vt,kt)}for(zt=0;zt<At;zt++)if(kt=vt[zt],zt===At-1){if(kt>=st(256,5-At))return null}else if(kt>255)return null;for(jt=Ct(vt),zt=0;zt<vt.length;zt++)jt+=vt[zt]*st(256,3-zt);return jt},ee=function(St){var Ut=[0,0,0,0,0,0,0,0],At=0,vt=null,zt=0,Me,ue,kt,jt,An,hn,Dt,on=function(){return ct(St,zt)};if(on()===":"){if(ct(St,1)!==":")return;zt+=2,At++,vt=At}for(;on();){if(At===8)return;if(on()===":"){if(vt!==null)return;zt++,At++,vt=At;continue}for(Me=ue=0;ue<4&&ht(Ee,on());)Me=Me*16+rt(on(),16),zt++,ue++;if(on()==="."){if(ue===0||(zt-=ue,At>6))return;for(kt=0;on();){if(jt=null,kt>0)if(on()==="."&&kt<4)zt++;else return;if(!ht(oe,on()))return;for(;ht(oe,on());){if(An=rt(on(),10),jt===null)jt=An;else{if(jt===0)return;jt=jt*10+An}if(jt>255)return;zt++}Ut[At]=Ut[At]*256+jt,kt++,(kt===2||kt===4)&&At++}if(kt!==4)return;break}else if(on()===":"){if(zt++,!on())return}else if(on())return;Ut[At++]=Me}if(vt!==null)for(hn=At-vt,At=7;At!==0&&hn>0;)Dt=Ut[At],Ut[At--]=Ut[vt+hn-1],Ut[vt+--hn]=Dt;else if(At!==8)return;return Ut},ve=function(St){for(var Ut=null,At=1,vt=null,zt=0,Me=0;Me<8;Me++)St[Me]!==0?(zt>At&&(Ut=vt,At=zt),vt=null,zt=0):(vt===null&&(vt=Me),++zt);return zt>At?vt:Ut},se=function(St){var Ut,At,vt,zt;if(typeof St=="number"){for(Ut=[],At=0;At<4;At++)Ot(Ut,St%256),St=it(St/256);return gt(Ut,".")}if(typeof St=="object"){for(Ut="",vt=ve(St),At=0;At<8;At++)zt&&St[At]===0||(zt&&(zt=!1),vt===At?(Ut+=At?":":"::",zt=!0):(Ut+=yt(St[At],16),At<7&&(Ut+=":")));return"["+Ut+"]"}return St},Oe={},rn=M({},Oe,{" ":1,'"':1,"#":1,"<":1,">":1}),It=M({},rn,{"'":1}),Xt=M({},Oe,{" ":1,'"':1,"<":1,">":1,"`":1}),Mt=M({},Xt,{"#":1,"?":1,"{":1,"}":1,"^":1}),$t=M({},Mt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),qt=function(St,Ut){var At=$(St,0);return At>=32&&At<127&&!O(Ut,St)?St:St==="'"&&O(Ut,St)?"%27":nt(St)},Nt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},be=function(St,Ut){var At;return St.length===2&&ht(ae,ct(St,0))&&((At=ct(St,1))===":"||!Ut&&At==="|")},Ve=function(St){var Ut;return St.length>1&&be(pt(St,0,2))&&(St.length===2||(Ut=ct(St,2))==="/"||Ut==="\\"||Ut==="?"||Ut==="#")},Gt=function(St){return St==="."||mt(St)==="%2e"},_t=function(St){return St=mt(St),St===".."||St==="%2e."||St===".%2e"||St==="%2e%2e"},te={},ie={},Ce={},Be={},an={},fn={},mn={},Sn={},tr={},Cr={},Ti={},bi={},Si={},Ai={},mo={},Ei={},ra={},or={},xo={},Nr={},vr={},Ci=function(St,Ut,At){var vt=k(St),zt,Me,ue;if(Ut){if(Me=this.parse(vt),Me)throw new tt(Me);this.searchParams=null}else{if(At!==void 0&&(zt=new Ci(At,!0)),Me=this.parse(vt,null,zt),Me)throw new tt(Me);ue=Q(new Z),ue.bindURL(this),this.searchParams=ue}};Ci.prototype={type:"URL",parse:function(St,Ut,At){var vt=this,zt=Ut||te,Me=0,ue="",kt=!1,jt=!1,An=!1,hn,Dt,on,pr;for(St=k(St),Ut||(vt.scheme="",vt.username="",vt.password="",vt.host=null,vt.port=null,vt.path=[],vt.query=null,vt.fragment=null,vt.cannotBeABaseURL=!1,St=Ft(St,Ge,""),St=Ft(St,Vt,"$1")),St=Ft(St,ne,""),hn=D(St);Me<=hn.length;){switch(Dt=hn[Me],zt){case te:if(Dt&&ht(ae,Dt))ue+=mt(Dt),zt=ie;else{if(Ut)return Qt;zt=Ce;continue}break;case ie:if(Dt&&ht(pe,Dt))ue+=mt(Dt);else if(Dt===":"){if(Ut&&(vt.isSpecial()!==O(Nt,ue)||ue==="file"&&(vt.includesCredentials()||vt.port!==null)||vt.scheme==="file"&&vt.host===""))return;if(vt.scheme=ue,Ut){vt.isSpecial()&&Nt[vt.scheme]===vt.port&&(vt.port=null);return}ue="",vt.scheme==="file"?zt=Ai:vt.isSpecial()&&At&&At.scheme===vt.scheme?zt=Be:vt.isSpecial()?zt=Sn:hn[Me+1]==="/"?(zt=an,Me++):(vt.cannotBeABaseURL=!0,Tt(vt.path,""),zt=xo)}else{if(Ut)return Qt;ue="",zt=Ce,Me=0;continue}break;case Ce:if(!At||At.cannotBeABaseURL&&Dt!=="#")return Qt;if(At.cannotBeABaseURL&&Dt==="#"){vt.scheme=At.scheme,vt.path=L(At.path),vt.query=At.query,vt.fragment="",vt.cannotBeABaseURL=!0,zt=vr;break}zt=At.scheme==="file"?Ai:fn;continue;case Be:if(Dt==="/"&&hn[Me+1]==="/")zt=tr,Me++;else{zt=fn;continue}break;case an:if(Dt==="/"){zt=Cr;break}else{zt=or;continue}case fn:if(vt.scheme=At.scheme,Dt===re)vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.query=At.query;else if(Dt==="/"||Dt==="\\"&&vt.isSpecial())zt=mn;else if(Dt==="?")vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.query="",zt=Nr;else if(Dt==="#")vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.query=At.query,vt.fragment="",zt=vr;else{vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.path.length&&vt.path.length--,zt=or;continue}break;case mn:if(vt.isSpecial()&&(Dt==="/"||Dt==="\\"))zt=tr;else if(Dt==="/")zt=Cr;else{vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,zt=or;continue}break;case Sn:if(zt=tr,Dt!=="/"||hn[Me+1]!=="/")continue;Me++;break;case tr:if(Dt!=="/"&&Dt!=="\\"){zt=Cr;continue}break;case Cr:if(Dt==="@"){kt&&(ue="%40"+ue),kt=!0,on=D(ue);for(var Ua=0;Ua<on.length;Ua++){var Ii=on[Ua];if(Ii===":"&&!An){An=!0;continue}var ka=qt(Ii,$t);An?vt.password+=ka:vt.username+=ka}ue=""}else if(Dt===re||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()){if(kt&&ue==="")return Bt;Me-=D(ue).length+1,ue="",zt=Ti}else ue+=Dt;break;case Ti:case bi:if(Ut&&vt.scheme==="file"){zt=Ei;continue}else if(Dt===":"&&!jt){if(ue==="")return wt;if(Ut===bi)return;if(pr=vt.parseHost(ue),pr)return pr;ue="",zt=Si}else if(Dt===re||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()){if(vt.isSpecial()&&ue==="")return wt;if(Ut&&ue===""&&(vt.includesCredentials()||vt.port!==null))return;if(pr=vt.parseHost(ue),pr)return pr;if(ue="",zt=ra,Ut)return;continue}else Dt==="["?jt=!0:Dt==="]"&&(jt=!1),ue+=Dt;break;case Si:if(ht(oe,Dt))ue+=Dt;else if(Dt===re||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()||Ut){if(ue!==""){var jn=rt(ue,10);if(jn>65535)return Wt;vt.port=vt.isSpecial()&&jn===Nt[vt.scheme]?null:jn,ue=""}if(Ut)return;zt=ra;continue}else return Wt;break;case Ai:if(vt.scheme="file",vt.host="",Dt==="/"||Dt==="\\")zt=mo;else if(At&&At.scheme==="file")switch(Dt){case re:vt.host=At.host,vt.path=L(At.path),vt.query=At.query;break;case"?":vt.host=At.host,vt.path=L(At.path),vt.query="",zt=Nr;break;case"#":vt.host=At.host,vt.path=L(At.path),vt.query=At.query,vt.fragment="",zt=vr;break;default:vt.host=At.host,Ve(gt(L(hn,Me),""))||(vt.path=L(At.path),vt.shortenPath()),zt=or;continue}else{zt=or;continue}break;case mo:if(Dt==="/"||Dt==="\\"){zt=Ei;break}At&&At.scheme==="file"&&(vt.host=At.host,!Ve(gt(L(hn,Me),""))&&be(At.path[0],!0)&&Tt(vt.path,At.path[0])),zt=or;continue;case Ei:if(Dt===re||Dt==="/"||Dt==="\\"||Dt==="?"||Dt==="#"){if(!Ut&&be(ue))zt=or;else if(ue===""){if(vt.host="",Ut)return;zt=ra}else{if(pr=vt.parseHost(ue),pr)return pr;if(vt.host==="localhost"&&(vt.host=""),Ut)return;ue="",zt=ra}continue}else ue+=Dt;break;case ra:if(vt.isSpecial()){if(zt=or,Dt!=="/"&&Dt!=="\\")continue}else if(!Ut&&Dt==="?")vt.query="",zt=Nr;else if(!Ut&&Dt==="#")vt.fragment="",zt=vr;else if(Dt!==re&&(zt=or,Dt!=="/"))continue;break;case or:if(Dt===re||Dt==="/"||Dt==="\\"&&vt.isSpecial()||!Ut&&(Dt==="?"||Dt==="#")){if(_t(ue)?(vt.shortenPath(),Dt!=="/"&&!(Dt==="\\"&&vt.isSpecial())&&Tt(vt.path,"")):Gt(ue)?Dt!=="/"&&!(Dt==="\\"&&vt.isSpecial())&&Tt(vt.path,""):(vt.scheme==="file"&&!vt.path.length&&be(ue)&&(vt.host!==null&&vt.host!==""&&(vt.host=""),ue=ct(ue,0)+":"),Tt(vt.path,ue)),ue="",vt.scheme==="file"&&(Dt===re||Dt==="?"||Dt==="#"))for(;vt.path.length>1&&vt.path[0]==="";)Lt(vt.path);Dt==="?"?(vt.query="",zt=Nr):Dt==="#"&&(vt.fragment="",zt=vr)}else ue+=qt(Dt,Mt);break;case xo:Dt==="?"?(vt.query="",zt=Nr):Dt==="#"?(vt.fragment="",zt=vr):Dt!==re&&(vt.path[0]+=qt(Dt,Oe));break;case Nr:!Ut&&Dt==="#"?(vt.fragment="",zt=vr):Dt!==re&&(vt.query+=qt(Dt,vt.isSpecial()?It:rn));break;case vr:Dt!==re&&(vt.fragment+=qt(Dt,Xt));break}Me++}},parseHost:function(St){var Ut,At,vt;if(ct(St,0)==="["){if(ct(St,St.length-1)!=="]"||(Ut=ee(pt(St,1,-1)),!Ut))return wt;this.host=Ut}else if(this.isSpecial()){if(St=F(St),ht(he,St))return wt;if(en(St)){if(Ut=Ht(St),Ut===null)return wt;this.host=Ut}else this.host=St}else{if(ht(ye,St))return wt;for(Ut="",At=D(St),vt=0;vt<At.length;vt++)Ut+=qt(At[vt],Oe);this.host=Ut}},cannotHaveUsernamePasswordPort:function(){return this.host===null||this.host===""||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return O(Nt,this.scheme)},shortenPath:function(){var St=this.path,Ut=St.length;Ut&&(this.scheme!=="file"||Ut!==1||!be(St[0],!0))&&St.length--},serialize:function(){var St=this,Ut=St.scheme,At=St.username,vt=St.password,zt=St.host,Me=St.port,ue=St.path,kt=St.query,jt=St.fragment,An=Ut+":";return zt!==null?(An+="//",St.includesCredentials()&&(An+=At+(vt?":"+vt:"")+"@"),An+=se(zt),Me!==null&&(An+=":"+Me)):Ut==="file"&&(An+="//"),zt===null&&!St.cannotBeABaseURL&&ue.length>1&&ue[0]===""&&(An+="/."),An+=St.cannotBeABaseURL?ue[0]:ue.length?"/"+gt(ue,"/"):"",kt!==null&&(An+="?"+kt),jt!==null&&(An+="#"+jt),An},setHref:function(St){var Ut=this.parse(St);if(Ut)throw new tt(Ut);this.searchParams.update()},getOrigin:function(){var St=this.scheme,Ut=this.port;if(St==="blob")try{return new aa(this.path[0]).origin}catch(At){return"null"}return St==="file"||!this.isSpecial()?"null":St+"://"+se(this.host)+(Ut!==null?":"+Ut:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(St){this.parse(k(St)+":",te)},getUsername:function(){return this.username},setUsername:function(St){var Ut=D(k(St));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var At=0;At<Ut.length;At++)this.username+=qt(Ut[At],$t)}},getPassword:function(){return this.password},setPassword:function(St){var Ut=D(k(St));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var At=0;At<Ut.length;At++)this.password+=qt(Ut[At],$t)}},getHost:function(){var St=this.host,Ut=this.port;return St===null?"":Ut===null?se(St):se(St)+":"+Ut},setHost:function(St){this.cannotBeABaseURL||this.parse(St,Ti)},getHostname:function(){var St=this.host;return St===null?"":se(St)},setHostname:function(St){this.cannotBeABaseURL||this.parse(St,bi)},getPort:function(){var St=this.port;return St===null?"":k(St)},setPort:function(St){this.cannotHaveUsernamePasswordPort()||(St=k(St),St===""?this.port=null:this.parse(St,Si))},getPathname:function(){var St=this.path;return this.cannotBeABaseURL?St[0]:St.length?"/"+gt(St,"/"):""},setPathname:function(St){this.cannotBeABaseURL||(this.path=[],this.parse(St,ra))},getSearch:function(){var St=this.query;return St?"?"+St:""},setSearch:function(St){St=k(St),St===""?this.query=null:(ct(St,0)==="?"&&(St=pt(St,1)),this.query="",this.parse(St,Nr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var St=this.fragment;return St?"#"+St:""},setHash:function(St){if(St=k(St),St===""){this.fragment=null;return}ct(St,0)==="#"&&(St=pt(St,1)),this.fragment="",this.parse(St,vr)},update:function(){this.query=this.searchParams.serialize()||null}};var aa=function(Ut){var At=R(this,Pn),vt=U(arguments.length,1)>1?arguments[1]:void 0,zt=H(At,new Ci(Ut,!1,vt));v||(At.href=zt.serialize(),At.origin=zt.getOrigin(),At.protocol=zt.getProtocol(),At.username=zt.getUsername(),At.password=zt.getPassword(),At.host=zt.getHost(),At.hostname=zt.getHostname(),At.port=zt.getPort(),At.pathname=zt.getPathname(),At.search=zt.getSearch(),At.searchParams=zt.getSearchParams(),At.hash=zt.getHash())},Pn=aa.prototype,Vn=function(St,Ut){return{get:function(){return Y(this)[St]()},set:Ut&&function(At){return Y(this)[Ut](At)},configurable:!0,enumerable:!0}};if(v&&(E(Pn,"href",Vn("serialize","setHref")),E(Pn,"origin",Vn("getOrigin")),E(Pn,"protocol",Vn("getProtocol","setProtocol")),E(Pn,"username",Vn("getUsername","setUsername")),E(Pn,"password",Vn("getPassword","setPassword")),E(Pn,"host",Vn("getHost","setHost")),E(Pn,"hostname",Vn("getHostname","setHostname")),E(Pn,"port",Vn("getPort","setPort")),E(Pn,"pathname",Vn("getPathname","setPathname")),E(Pn,"search",Vn("getSearch","setSearch")),E(Pn,"searchParams",Vn("getSearchParams")),E(Pn,"hash",Vn("getHash","setHash"))),S(Pn,"toJSON",function(){return Y(this).serialize()},{enumerable:!0}),S(Pn,"toString",function(){return Y(this).serialize()},{enumerable:!0}),K){var yo=K.createObjectURL,To=K.revokeObjectURL;yo&&S(aa,"createObjectURL",y(yo,K)),To&&S(aa,"revokeObjectURL",y(To,K))}G(aa,"URL"),g({global:!0,constructor:!0,forced:!p,sham:!v},{URL:aa})}),(function(T,w,a){var g=a(7),v=a(33),p=a(6),x=a(36),y=v("iterator");T.exports=!g(function(){var b=new URL("b?a=1&b=2&c=3","https://a"),S=b.searchParams,E=new URLSearchParams("a=1&a=2&b=3"),R="";return b.pathname="c%20d",S.forEach(function(O,M){S.delete("b"),R+=M+O}),E.delete("a",2),E.delete("b",void 0),x&&(!b.toJSON||!E.has("a",1)||E.has("a",2)||!E.has("a",void 0)||E.has("b"))||!S.size&&(x||!p)||!S.sort||b.href!=="https://a/c%20d?a=1&c=3"||S.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!S[y]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||R!=="a1c3"||new URL("https://x",void 0).host!=="x"})}),(function(T,w,a){var g=a(14),v=2147483647,p=36,x=1,y=26,b=38,S=700,E=72,R=128,O="-",M=/[^\0-\u007E]/,D=/[.\u3002\uFF0E\uFF61]/g,L="Overflow: input needs wider integers to process",$=p-x,F=RangeError,k=g(D.exec),G=Math.floor,U=String.fromCharCode,X=g("".charCodeAt),j=g([].join),H=g([].push),Y=g("".replace),Z=g("".split),Q=g("".toLowerCase),K=function(it){for(var st=[],ct=0,ht=it.length;ct<ht;){var gt=X(it,ct++);if(gt>=55296&><=56319&&ct<ht){var yt=X(it,ct++);(yt&64512)===56320?H(st,((gt&1023)<<10)+(yt&1023)+65536):(H(st,gt),ct--)}else H(st,gt)}return st},tt=function(it){return it+22+75*(it<26)},nt=function(it,st,ct){var ht=0;for(it=ct?G(it/S):it>>1,it+=G(it/st);it>$*y>>1;)it=G(it/$),ht+=p;return G(ht+($+1)*it/(it+b))},rt=function(it){var st=[];it=K(it);var ct=it.length,ht=R,gt=0,yt=E,Ct,Tt;for(Ct=0;Ct<it.length;Ct++)Tt=it[Ct],Tt<128&&H(st,U(Tt));var Ft=st.length,Lt=Ft;for(Ft&&H(st,O);Lt<ct;){var Pt=v;for(Ct=0;Ct<it.length;Ct++)Tt=it[Ct],Tt>=ht&&Tt<Pt&&(Pt=Tt);var pt=Lt+1;if(Pt-ht>G((v-gt)/pt))throw new F(L);for(gt+=(Pt-ht)*pt,ht=Pt,Ct=0;Ct<it.length;Ct++){if(Tt=it[Ct],Tt<ht&&++gt>v)throw new F(L);if(Tt===ht){for(var mt=gt,Ot=p;;){var Bt=Ot<=yt?x:Ot>=yt+y?y:Ot-yt;if(mt<Bt)break;var Qt=mt-Bt,wt=p-Bt;H(st,U(tt(Bt+Qt%wt))),mt=G(Qt/wt),Ot+=p}H(st,U(tt(mt))),yt=nt(gt,pt,Lt===Ft),gt=0,Lt++}}gt++,ht++}return j(st,"")};T.exports=function(it){var st=[],ct=Z(Y(Q(it),D,"."),"."),ht,gt;for(ht=0;ht<ct.length;ht++)gt=ct[ht],H(st,k(M,gt)?"xn--"+rt(gt):gt);return j(st,".")}}),(function(T,w,a){a(175),a(479);var g=a(3),v=a(4),p=a(386),x=a(23),y=a(8),b=a(14),S=a(6),E=a(617),R=a(47),O=a(77),M=a(214),D=a(82),L=a(177),$=a(51),F=a(215),k=a(21),G=a(38),U=a(84),X=a(69),j=a(46),H=a(20),Y=a(68),Z=a(71),Q=a(11),K=a(139),tt=a(140),nt=a(179),rt=a(383),it=a(33),st=a(195),ct=it("iterator"),ht="URLSearchParams",gt=ht+"Iterator",yt=$.set,Ct=$.getterFor(ht),Tt=$.getterFor(gt),Ft=p("fetch"),Lt=p("Request"),Pt=p("Headers"),pt=Lt&&Lt.prototype,mt=Pt&&Pt.prototype,Ot=v.TypeError,Bt=v.encodeURIComponent,Qt=String.fromCharCode,wt=x("String","fromCodePoint"),Wt=parseInt,ae=b("".charAt),pe=b([].join),oe=b([].push),de=b("".replace),Re=b([].shift),Pe=b([].splice),Ee=b("".split),he=b("".slice),ye=b(/./.exec),Ge=/\+/g,Vt="\uFFFD",ne=/^[0-9a-f]+$/i,re=function(Gt,_t){var te=he(Gt,_t,_t+2);return ye(ne,te)?Wt(te,16):NaN},en=function(Gt){for(var _t=0,te=128;te>0&&(Gt&te)!==0;te>>=1)_t++;return _t},Ht=function(Gt){var _t=null,te=Gt.length;switch(te){case 1:_t=Gt[0];break;case 2:_t=(Gt[0]&31)<<6|Gt[1]&63;break;case 3:_t=(Gt[0]&15)<<12|(Gt[1]&63)<<6|Gt[2]&63;break;case 4:_t=(Gt[0]&7)<<18|(Gt[1]&63)<<12|(Gt[2]&63)<<6|Gt[3]&63;break}return _t===null||_t>1114111||_t>=55296&&_t<=57343||_t<(te>3?65536:te>2?2048:te>1?128:0)?null:_t},ee=function(Gt){Gt=de(Gt,Ge," ");for(var _t=Gt.length,te="",ie=0;ie<_t;){var Ce=ae(Gt,ie);if(Ce==="%"){if(ae(Gt,ie+1)==="%"||ie+3>_t){te+="%",ie++;continue}var Be=re(Gt,ie+1);if(Be!==Be){te+=Ce,ie++;continue}ie+=2;var an=en(Be);if(an===0)Ce=Qt(Be);else{if(an===1||an>4){te+=Vt,ie++;continue}for(var fn=[Be],mn=1;mn<an&&(ie++,!(ie+3>_t||ae(Gt,ie)!=="%"));){var Sn=re(Gt,ie+1);if(Sn!==Sn||Sn>191||Sn<128||mn===1&&(Be===224&&Sn<160||Be===237&&Sn>159||Be===240&&Sn<144||Be===244&&Sn>143))break;oe(fn,Sn),ie+=2,mn++}if(fn.length!==an){te+=Vt;continue}var tr=Ht(fn);if(tr===null){for(var Cr=0;Cr<an;Cr++)te+=Vt;ie++;continue}else Ce=wt(tr)}}te+=Ce,ie++}return te},ve=/[!'()~]|%20/g,se={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Oe=function(Gt){return se[Gt]},rn=function(Gt){return de(Bt(Gt),ve,Oe)},It=L(function(_t,te){yt(this,{type:gt,target:Ct(_t).entries,index:0,kind:te})},ht,function(){var _t=Tt(this),te=_t.target,ie=_t.index++;if(!te||ie>=te.length)return _t.target=null,nt(void 0,!0);var Ce=te[ie];switch(_t.kind){case"keys":return nt(Ce.key,!1);case"values":return nt(Ce.value,!1)}return nt([Ce.key,Ce.value],!1)},!0),Xt=function(Gt){this.entries=[],this.url=null,Gt!==void 0&&(H(Gt)?this.parseObject(Gt):this.parseQuery(typeof Gt=="string"?ae(Gt,0)==="?"?he(Gt,1):Gt:Y(Gt)))};Xt.prototype={type:ht,bindURL:function(Gt){this.url=Gt,this.update()},parseObject:function(Gt){var _t=this.entries,te=tt(Gt),ie,Ce,Be,an,fn,mn,Sn;if(te)for(ie=K(Gt,te),Ce=ie.next;!(Be=y(Ce,ie)).done;){if(an=K(j(Be.value)),fn=an.next,(mn=y(fn,an)).done||(Sn=y(fn,an)).done||!y(fn,an).done)throw new Ot("Expected sequence with length 2");oe(_t,{key:Y(mn.value),value:Y(Sn.value)})}else for(var tr in Gt)G(Gt,tr)&&oe(_t,{key:tr,value:Y(Gt[tr])})},parseQuery:function(Gt){if(Gt)for(var _t=this.entries,te=Ee(Gt,"&"),ie=0,Ce,Be;ie<te.length;)Ce=te[ie++],Ce.length&&(Be=Ee(Ce,"="),oe(_t,{key:ee(Re(Be)),value:ee(pe(Be,"="))}))},serialize:function(){for(var Gt=this.entries,_t=[],te=0,ie;te<Gt.length;)ie=Gt[te++],oe(_t,rn(ie.key)+"="+rn(ie.value));return pe(_t,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Mt=function(){F(this,$t);var _t=arguments.length>0?arguments[0]:void 0,te=yt(this,new Xt(_t));S||(this.size=te.entries.length)},$t=Mt.prototype;if(M($t,{append:function(_t,te){var ie=Ct(this);rt(arguments.length,2),oe(ie.entries,{key:Y(_t),value:Y(te)}),S||this.size++,ie.updateURL()},delete:function(Gt){for(var _t=Ct(this),te=rt(arguments.length,1),ie=_t.entries,Ce=Y(Gt),Be=te<2?void 0:arguments[1],an=Be===void 0?Be:Y(Be),fn=0;fn<ie.length;){var mn=ie[fn];mn.key===Ce&&(an===void 0||mn.value===an)?Pe(ie,fn,1):fn++}S||(this.size=ie.length),_t.updateURL()},get:function(_t){var te=Ct(this).entries;rt(arguments.length,1);for(var ie=Y(_t),Ce=0;Ce<te.length;Ce++)if(te[Ce].key===ie)return te[Ce].value;return null},getAll:function(_t){var te=Ct(this).entries;rt(arguments.length,1);for(var ie=Y(_t),Ce=[],Be=0;Be<te.length;Be++)te[Be].key===ie&&oe(Ce,te[Be].value);return Ce},has:function(_t){for(var te=Ct(this).entries,ie=rt(arguments.length,1),Ce=Y(_t),Be=ie<2?void 0:arguments[1],an=Be===void 0?Be:Y(Be),fn=0;fn<te.length;){var mn=te[fn++];if(mn.key===Ce&&(an===void 0||mn.value===an))return!0}return!1},set:function(_t,te){var ie=Ct(this);rt(arguments.length,2);for(var Ce=ie.entries,Be=!1,an=Y(_t),fn=Y(te),mn=0,Sn;mn<Ce.length;mn++)Sn=Ce[mn],Sn.key===an&&(Be?Pe(Ce,mn--,1):(Be=!0,Sn.value=fn));Be||oe(Ce,{key:an,value:fn}),S||(this.size=Ce.length),ie.updateURL()},sort:function(){var _t=Ct(this);st(_t.entries,function(te,ie){return te.key>ie.key?1:-1}),_t.updateURL()},forEach:function(_t){for(var te=Ct(this).entries,ie=U(_t,arguments.length>1?arguments[1]:void 0),Ce=0,Be;Ce<te.length;)Be=te[Ce++],ie(Be.value,Be.key,this)},keys:function(){return new It(this,"keys")},values:function(){return new It(this,"values")},entries:function(){return new It(this,"entries")}},{enumerable:!0}),R($t,ct,$t.entries,{name:"entries"}),R($t,"toString",function(){return Ct(this).serialize()},{enumerable:!0}),S&&O($t,"size",{get:function(){return Ct(this).entries.length},configurable:!0,enumerable:!0}),D(Mt,ht),g({global:!0,constructor:!0,forced:!E},{URLSearchParams:Mt}),!E&&k(Pt)){var qt=b(mt.has),Nt=b(mt.set),be=function(Gt){if(H(Gt)){var _t=Gt.body,te;if(X(_t)===ht)return te=Gt.headers?new Pt(Gt.headers):new Pt,qt(te,"content-type")||Nt(te,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Z(Gt,{body:Q(0,Y(_t)),headers:Q(0,te)})}return Gt};if(k(Ft)&&g({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(_t){return Ft(_t,arguments.length>1?be(arguments[1]):{})}}),k(Lt)){var Ve=function(_t){return F(this,pt),new Lt(_t,arguments.length>1?be(arguments[1]):{})};pt.constructor=Ve,Ve.prototype=pt,g({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Ve})}}T.exports={URLSearchParams:Mt,getState:Ct}}),(function(T,w,a){var g=a(3),v=a(23),p=a(7),x=a(383),y=a(68),b=a(617),S=v("URL"),E=b&&p(function(){S.canParse()}),R=p(function(){return S.canParse.length!==1});g({target:"URL",stat:!0,forced:!E||R},{canParse:function(M){var D=x(arguments.length,1),L=y(M),$=D<2||arguments[1]===void 0?void 0:y(arguments[1]);try{return!!new S(L,$)}catch(F){return!1}}})}),(function(T,w,a){var g=a(3),v=a(23),p=a(383),x=a(68),y=a(617),b=v("URL");g({target:"URL",stat:!0,forced:!y},{parse:function(E){var R=p(arguments.length,1),O=x(E),M=R<2||arguments[1]===void 0?void 0:x(arguments[1]);try{return new b(O,M)}catch(D){return null}}})}),(function(T,w,a){var g=a(3),v=a(8);g({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return v(URL.prototype.toString,this)}})}),(function(T,w,a){a(619)}),(function(T,w,a){var g=a(47),v=a(14),p=a(68),x=a(383),y=URLSearchParams,b=y.prototype,S=v(b.append),E=v(b.delete),R=v(b.forEach),O=v([].push),M=new y("a=1&a=2&b=3");M.delete("a",1),M.delete("b",void 0),M+""!="a=2"&&g(b,"delete",function(D){var L=arguments.length,$=L<2?void 0:arguments[1];if(L&&$===void 0)return E(this,D);var F=[];R(this,function(H,Y){O(F,{key:Y,value:H})}),x(L,1);for(var k=p(D),G=p($),U=0,X=F.length,j;U<X;)j=F[U],E(this,j.key),U++;for(U=0;U<X;)j=F[U++],j.key===k&&j.value===G||S(this,j.key,j.value)},{enumerable:!0,unsafe:!0})}),(function(T,w,a){var g=a(47),v=a(14),p=a(68),x=a(383),y=URLSearchParams,b=y.prototype,S=v(b.getAll),E=v(b.has),R=new y("a=1");(R.has("a",2)||!R.has("a",void 0))&&g(b,"has",function(M){var D=arguments.length,L=D<2?void 0:arguments[1];if(D&&L===void 0)return E(this,M);var $=S(this,M);x(D,1);for(var F=p(L),k=0;k<$.length;)if($[k++]===F)return!0;return!1},{enumerable:!0,unsafe:!0})}),(function(T,w,a){var g=a(6),v=a(14),p=a(77),x=URLSearchParams.prototype,y=v(x.forEach);g&&!("size"in x)&&p(x,"size",{get:function(){var S=0;return y(this,function(){S++}),S},configurable:!0,enumerable:!0})}),(function(T,w,a){a.r(w),a.d(w,{bb:function(){return bp},default:function(){return bp}});var g={};a.r(g),a.d(g,{selection:function(){return qg},subchart:function(){return ev},zoom:function(){return lv}});var v={};a.r(v),a.d(v,{area:function(){return Pv},areaLineRange:function(){return Mv},areaSpline:function(){return Dv},areaSplineRange:function(){return Fv},areaStep:function(){return Nv},areaStepRange:function(){return Lv},bar:function(){return $v},bubble:function(){return Bv},candlestick:function(){return Gv},donut:function(){return Qv},funnel:function(){return np},gauge:function(){return rp},line:function(){return ap},pie:function(){return sp},polar:function(){return cp},radar:function(){return fp},scatter:function(){return dp},spline:function(){return ip},step:function(){return op},treemap:function(){return Tp}});function p(){}function x(t){return t==null?p:function(){return this.querySelector(t)}}function y(t){typeof t!="function"&&(t=x(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,l=r[i]=new Array(s),c,u,f=0;f<s;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),l[f]=u);return new vt(r,this._parents)}function b(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function S(){return[]}function E(t){return t==null?S:function(){return this.querySelectorAll(t)}}function R(t){return function(){return b(t.apply(this,arguments))}}function O(t){typeof t=="function"?t=R(t):t=E(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],l=s.length,c,u=0;u<l;++u)(c=s[u])&&(r.push(t.call(c,c.__data__,u,s)),i.push(c));return new vt(r,i)}function M(t){return function(){return this.matches(t)}}function D(t){return function(e){return e.matches(t)}}var L=Array.prototype.find;function $(t){return function(){return L.call(this.children,t)}}function F(){return this.firstElementChild}function k(t){return this.select(t==null?F:$(typeof t=="function"?t:D(t)))}var G=Array.prototype.filter;function U(){return Array.from(this.children)}function X(t){return function(){return G.call(this.children,t)}}function j(t){return this.selectAll(t==null?U:X(typeof t=="function"?t:D(t)))}function H(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,l=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&l.push(c);return new vt(r,this._parents)}function Y(t){return new Array(t.length)}function Z(){return new vt(this._enter||this._groups.map(Y),this._parents)}function Q(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Q.prototype={constructor:Q,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function K(t){return function(){return t}}function tt(t,e,n,r,i,o){for(var s=0,l,c=e.length,u=o.length;s<u;++s)(l=e[s])?(l.__data__=o[s],r[s]=l):n[s]=new Q(t,o[s]);for(;s<c;++s)(l=e[s])&&(i[s]=l)}function nt(t,e,n,r,i,o,s){var l,c,u=new Map,f=e.length,d=o.length,h=new Array(f),m;for(l=0;l<f;++l)(c=e[l])&&(h[l]=m=s.call(c,c.__data__,l,e)+"",u.has(m)?i[l]=c:u.set(m,c));for(l=0;l<d;++l)m=s.call(t,o[l],l,o)+"",(c=u.get(m))?(r[l]=c,c.__data__=o[l],u.delete(m)):n[l]=new Q(t,o[l]);for(l=0;l<f;++l)(c=e[l])&&u.get(h[l])===c&&(i[l]=c)}function rt(t){return t.__data__}function it(t,e){if(!arguments.length)return Array.from(this,rt);var n=e?nt:tt,r=this._parents,i=this._groups;typeof t!="function"&&(t=K(t));for(var o=i.length,s=new Array(o),l=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],d=i[u],h=d.length,m=st(t.call(f,f&&f.__data__,u,r)),A=m.length,I=l[u]=new Array(A),C=s[u]=new Array(A),P=c[u]=new Array(h);n(f,d,I,C,P,m,e);for(var z=0,N=0,B,W;z<A;++z)if(B=I[z]){for(z>=N&&(N=z+1);!(W=C[N])&&++N<A;);B._next=W||null}}return s=new vt(s,r),s._enter=l,s._exit=c,s}function st(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ct(){return new vt(this._exit||this._groups.map(Y),this._parents)}function ht(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function gt(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),l=new Array(i),c=0;c<s;++c)for(var u=n[c],f=r[c],d=u.length,h=l[c]=new Array(d),m,A=0;A<d;++A)(m=u[A]||f[A])&&(h[A]=m);for(;c<i;++c)l[c]=n[c];return new vt(l,this._parents)}function yt(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function Ct(t){t||(t=Tt);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],l=s.length,c=i[o]=new Array(l),u,f=0;f<l;++f)(u=s[f])&&(c[f]=u);c.sort(e)}return new vt(i,this._parents).order()}function Tt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ft(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Lt(){return Array.from(this)}function Pt(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function pt(){let t=0;for(const e of this)++t;return t}function mt(){return!this.node()}function Ot(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length,l;o<s;++o)(l=i[o])&&t.call(l,l.__data__,o,i);return this}var Bt="http://www.w3.org/1999/xhtml",Qt={svg:"http://www.w3.org/2000/svg",xhtml:Bt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function wt(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Qt.hasOwnProperty(e)?{space:Qt[e],local:t}:t}function Wt(t){return function(){this.removeAttribute(t)}}function ae(t){return function(){this.removeAttributeNS(t.space,t.local)}}function pe(t,e){return function(){this.setAttribute(t,e)}}function oe(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function de(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Re(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Pe(t,e){var n=wt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?ae:Wt:typeof e=="function"?n.local?Re:de:n.local?oe:pe)(n,e))}function Ee(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function he(t){return function(){this.style.removeProperty(t)}}function ye(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ge(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Vt(t,e,n){return arguments.length>1?this.each((e==null?he:typeof e=="function"?Ge:ye)(t,e,n==null?"":n)):ne(this.node(),t)}function ne(t,e){return t.style.getPropertyValue(e)||Ee(t).getComputedStyle(t,null).getPropertyValue(e)}function re(t){return function(){delete this[t]}}function en(t,e){return function(){this[t]=e}}function Ht(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function ee(t,e){return arguments.length>1?this.each((e==null?re:typeof e=="function"?Ht:en)(t,e)):this.node()[t]}function ve(t){return t.trim().split(/^|\s+/)}function se(t){return t.classList||new Oe(t)}function Oe(t){this._node=t,this._names=ve(t.getAttribute("class")||"")}Oe.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function rn(t,e){for(var n=se(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function It(t,e){for(var n=se(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Xt(t){return function(){rn(this,t)}}function Mt(t){return function(){It(this,t)}}function $t(t,e){return function(){(e.apply(this,arguments)?rn:It)(this,t)}}function qt(t,e){var n=ve(t+"");if(arguments.length<2){for(var r=se(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?$t:e?Xt:Mt)(n,e))}function Nt(){this.textContent=""}function be(t){return function(){this.textContent=t}}function Ve(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function Gt(t){return arguments.length?this.each(t==null?Nt:(typeof t=="function"?Ve:be)(t)):this.node().textContent}function _t(){this.innerHTML=""}function te(t){return function(){this.innerHTML=t}}function ie(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function Ce(t){return arguments.length?this.each(t==null?_t:(typeof t=="function"?ie:te)(t)):this.node().innerHTML}function Be(){this.nextSibling&&this.parentNode.appendChild(this)}function an(){return this.each(Be)}function fn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mn(){return this.each(fn)}function Sn(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Bt&&e.documentElement.namespaceURI===Bt?e.createElement(t):e.createElementNS(n,t)}}function tr(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Cr(t){var e=wt(t);return(e.local?tr:Sn)(e)}function Ti(t){var e=typeof t=="function"?t:Cr(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function bi(){return null}function Si(t,e){var n=typeof t=="function"?t:Cr(t),r=e==null?bi:typeof e=="function"?e:x(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function Ai(){var t=this.parentNode;t&&t.removeChild(this)}function mo(){return this.each(Ai)}function Ei(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ra(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function or(t){return this.select(t?ra:Ei)}function xo(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Nr(t){return function(e){t.call(this,e,this.__data__)}}function vr(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Ci(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function aa(t,e,n){return function(){var r=this.__on,i,o=Nr(e);if(r){for(var s=0,l=r.length;s<l;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Pn(t,e,n){var r=vr(t+""),i,o=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,f;c<u;++c)for(i=0,f=l[c];i<o;++i)if((s=r[i]).type===f.type&&s.name===f.name)return f.value}return}for(l=e?aa:Ci,i=0;i<o;++i)this.each(l(r[i],e,n));return this}function Vn(t,e,n){var r=Ee(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function yo(t,e){return function(){return Vn(this,t,e)}}function To(t,e){return function(){return Vn(this,t,e.apply(this,arguments))}}function St(t,e){return this.each((typeof e=="function"?To:yo)(t,e))}function*Ut(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var At=[null];function vt(t,e){this._groups=t,this._parents=e}function zt(){return new vt([[document.documentElement]],At)}function Me(){return this}vt.prototype=zt.prototype={constructor:vt,select:y,selectAll:O,selectChild:k,selectChildren:j,filter:H,data:it,enter:Z,exit:ct,join:ht,merge:gt,selection:Me,order:yt,sort:Ct,call:Ft,nodes:Lt,node:Pt,size:pt,empty:mt,each:Ot,attr:Pe,style:Vt,property:ee,classed:qt,text:Gt,html:Ce,raise:an,lower:mn,append:Ti,insert:Si,remove:mo,clone:or,datum:xo,on:Pn,dispatch:St,[Symbol.iterator]:Ut};var ue=zt;function kt(t){return typeof t=="string"?new vt([[document.querySelector(t)]],[document.documentElement]):new vt([[t]],At)}const jt={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",AREA_STEP_RANGE:"area-step-range",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",FUNNEL:"funnel",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},An={export:"exportApi",flow:"flow",xgrids:"grid",ygrids:"grid",regions:"regions",category:"category",categories:"category"},hn=10,Dt=6,on=3,pr=Dt+on,Ua=1,Ii={x:{start:"M0 -8.5 A6 6 0 0 0 -6.5 -3.5 V2.5 A6 6 0 0 0 0 8.5 Z M-2 -3.5 V3.5 M-4 -3.5 V3.5z",end:"M0 -8.5 A6 6 0 0 1 6.5 -3.5 V2.5 A6 6 0 0 1 0 8.5 Z M2 -3.5 V3.5 M4 -3.5 V3.5z"},y:{start:"M8.5 0 a6 6 0 0 0 -6 -6.5 H-2.5 a 6 6 0 0 0 -6 6.5 z m-5 -2 H-3.5 m7 -2 H-3.5z",end:"M8.5 0 a6 -6 0 0 1 -6 6.5 H-2.5 a 6 -6 0 0 1 -6 -6.5z m-5 2 H-3.5 m7 2 H-3.5z"}},ka={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",AREA_STEP_RANGE:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",FUNNEL:"initFunnel",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},jn={Area:[jt.AREA,jt.AREA_SPLINE,jt.AREA_SPLINE_RANGE,jt.AREA_LINE_RANGE,jt.AREA_STEP,jt.AREA_STEP_RANGE],AreaRange:[jt.AREA_SPLINE_RANGE,jt.AREA_LINE_RANGE,jt.AREA_STEP_RANGE],Arc:[jt.PIE,jt.DONUT,jt.GAUGE,jt.POLAR,jt.RADAR],Line:[jt.LINE,jt.SPLINE,jt.AREA,jt.AREA_SPLINE,jt.AREA_SPLINE_RANGE,jt.AREA_LINE_RANGE,jt.STEP,jt.AREA_STEP,jt.AREA_STEP_RANGE],Step:[jt.STEP,jt.AREA_STEP,jt.AREA_STEP_RANGE],Spline:[jt.SPLINE,jt.AREA_SPLINE,jt.AREA_SPLINE_RANGE]},Ap=Math.sqrt(50),Ep=Math.sqrt(10),Cp=Math.sqrt(2);function bo(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Ap?10:o>=Ep?5:o>=Cp?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/s,l=Math.round(t*u),c=Math.round(e*u),l/u<t&&++l,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*s,l=Math.round(t/u),c=Math.round(e/u),l*u<t&&++l,c*u>e&&--c),c<l&&.5<=n&&n<2?bo(t,e,n*2):[l,c,u]}function Zs(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,s]=r?bo(e,t,n):bo(t,e,n);if(!(o>=i))return[];const l=o-i+1,c=new Array(l);if(r)if(s<0)for(let u=0;u<l;++u)c[u]=(o-u)/-s;else for(let u=0;u<l;++u)c[u]=(o-u)*s;else if(s<0)for(let u=0;u<l;++u)c[u]=(i+u)/-s;else for(let u=0;u<l;++u)c[u]=(i+u)*s;return c}function Js(t,e,n){return e=+e,t=+t,n=+n,bo(t,e,n)[2]}function Qs(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Js(e,t,n):Js(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function So(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ip(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function _s(t){let e,n,r;t.length!==2?(e=So,n=(l,c)=>So(t(l),c),r=(l,c)=>t(l)-c):(e=t===So||t===Ip?t:Rp,n=t,r=t);function i(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<0?u=d+1:f=d}while(u<f)}return u}function o(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function s(l,c,u=0,f=l.length){const d=i(l,c,u,f-1);return d>u&&r(l[d-1],c)>-r(l[d],c)?d-1:d}return{left:i,center:s,right:o}}function Rp(){return 0}function Op(t){return t===null?NaN:+t}function*iR(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const mu=_s(So),wp=mu.right,oR=mu.left,sR=_s(Op).center;var Pp=wp;function qs(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function xu(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ri(){}var Oi=.7,Ao=1/Oi,Xa="\\s*([+-]?\\d+)\\s*",wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ir="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mp=/^#([0-9a-f]{3,8})$/,Lp=new RegExp(`^rgb\\(${Xa},${Xa},${Xa}\\)$`),Dp=new RegExp(`^rgb\\(${Ir},${Ir},${Ir}\\)$`),Fp=new RegExp(`^rgba\\(${Xa},${Xa},${Xa},${wi}\\)$`),Np=new RegExp(`^rgba\\(${Ir},${Ir},${Ir},${wi}\\)$`),$p=new RegExp(`^hsl\\(${wi},${Ir},${Ir}\\)$`),Bp=new RegExp(`^hsla\\(${wi},${Ir},${Ir},${wi}\\)$`),yu={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};qs(Ri,xa,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Tu,formatHex:Tu,formatHex8:zp,formatHsl:Up,formatRgb:bu,toString:bu});function Tu(){return this.rgb().formatHex()}function zp(){return this.rgb().formatHex8()}function Up(){return Iu(this).formatHsl()}function bu(){return this.rgb().formatRgb()}function xa(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Mp.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Su(e):n===3?new Jn(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Eo(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Eo(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Lp.exec(t))?new Jn(e[1],e[2],e[3],1):(e=Dp.exec(t))?new Jn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Fp.exec(t))?Eo(e[1],e[2],e[3],e[4]):(e=Np.exec(t))?Eo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=$p.exec(t))?Cu(e[1],e[2]/100,e[3]/100,1):(e=Bp.exec(t))?Cu(e[1],e[2]/100,e[3]/100,e[4]):yu.hasOwnProperty(t)?Su(yu[t]):t==="transparent"?new Jn(NaN,NaN,NaN,0):null}function Su(t){return new Jn(t>>16&255,t>>8&255,t&255,1)}function Eo(t,e,n,r){return r<=0&&(t=e=n=NaN),new Jn(t,e,n,r)}function kp(t){return t instanceof Ri||(t=xa(t)),t?(t=t.rgb(),new Jn(t.r,t.g,t.b,t.opacity)):new Jn}function Co(t,e,n,r){return arguments.length===1?kp(t):new Jn(t,e,n,r==null?1:r)}function Jn(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}qs(Jn,Co,xu(Ri,{brighter(t){return t=t==null?Ao:Math.pow(Ao,t),new Jn(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Oi:Math.pow(Oi,t),new Jn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Jn(ya(this.r),ya(this.g),ya(this.b),Io(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:Au,formatHex:Au,formatHex8:Xp,formatRgb:Eu,toString:Eu}));function Au(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}`}function Xp(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}${Ta((isNaN(this.opacity)?1:this.opacity)*255)}`}function Eu(){const t=Io(this.opacity);return`${t===1?"rgb(":"rgba("}${ya(this.r)}, ${ya(this.g)}, ${ya(this.b)}${t===1?")":`, ${t})`}`}function Io(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ya(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ta(t){return t=ya(t),(t<16?"0":"")+t.toString(16)}function Cu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new mr(t,e,n,r)}function Iu(t){if(t instanceof mr)return new mr(t.h,t.s,t.l,t.opacity);if(t instanceof Ri||(t=xa(t)),!t)return new mr;if(t instanceof mr)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(e===o?s=(n-r)/l+(n<r)*6:n===o?s=(r-e)/l+2:s=(e-n)/l+4,l/=c<.5?o+i:2-o-i,s*=60):l=c>0&&c<1?0:s,new mr(s,l,c,t.opacity)}function Gp(t,e,n,r){return arguments.length===1?Iu(t):new mr(t,e,n,r==null?1:r)}function mr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}qs(mr,Gp,xu(Ri,{brighter(t){return t=t==null?Ao:Math.pow(Ao,t),new mr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Oi:Math.pow(Oi,t),new mr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Jn(tl(t>=240?t-240:t+120,i,r),tl(t,i,r),tl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new mr(Ru(this.h),Ro(this.s),Ro(this.l),Io(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Io(this.opacity);return`${t===1?"hsl(":"hsla("}${Ru(this.h)}, ${Ro(this.s)*100}%, ${Ro(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Ru(t){return t=(t||0)%360,t<0?t+360:t}function Ro(t){return Math.max(0,Math.min(1,t||0))}function tl(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function Ou(t,e,n,r,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*r+s*i)/6}function Wp(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,l=r<e-1?t[r+2]:2*o-i;return Ou((n-r/e)*e,s,i,o,l)}}function Vp(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],s=t[(r+1)%e],l=t[(r+2)%e];return Ou((n-r/e)*e,i,o,s,l)}}var Oo=(t=>()=>t);function wu(t,e){return function(n){return t+n*e}}function jp(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function lR(t,e){var n=e-t;return n?wu(t,n>180||n<-180?n-360*Math.round(n/360):n):Oo(isNaN(t)?e:t)}function Hp(t){return(t=+t)==1?Pu:function(e,n){return n-e?jp(e,n,t):Oo(isNaN(e)?n:e)}}function Pu(t,e){var n=e-t;return n?wu(t,n):Oo(isNaN(t)?e:t)}var wo=(function t(e){var n=Hp(e);function r(i,o){var s=n((i=Co(i)).r,(o=Co(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),u=Pu(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r})(1);function Mu(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),s,l;for(s=0;s<n;++s)l=Co(e[s]),r[s]=l.r||0,i[s]=l.g||0,o[s]=l.b||0;return r=t(r),i=t(i),o=t(o),l.opacity=1,function(c){return l.r=r(c),l.g=i(c),l.b=o(c),l+""}}}var cR=Mu(Wp),uR=Mu(Vp);function Lu(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function Du(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function fR(t,e){return(Du(e)?Lu:Fu)(t,e)}function Fu(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Ga(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(l){for(s=0;s<r;++s)o[s]=i[s](l);return o}}function Yp(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function xr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Kp(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Ga(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var el=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nl=new RegExp(el.source,"g");function Zp(t){return function(){return t}}function Jp(t){return function(e){return t(e)+""}}function Nu(t,e){var n=el.lastIndex=nl.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(t=t+"",e=e+"";(r=el.exec(t))&&(i=nl.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:xr(r,i)})),n=nl.lastIndex;return n<e.length&&(o=e.slice(n),l[s]?l[s]+=o:l[++s]=o),l.length<2?c[0]?Jp(c[0].x):Zp(e):(e=c.length,function(u){for(var f=0,d;f<e;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function Ga(t,e){var n=typeof e,r;return e==null||n==="boolean"?Oo(e):(n==="number"?xr:n==="string"?(r=xa(e))?(e=r,wo):Nu:e instanceof xa?wo:e instanceof Date?Yp:Du(e)?Lu:Array.isArray(e)?Fu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Kp:xr)(t,e)}function Qp(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function _p(t){return function(){return t}}function qp(t){return+t}var $u=[0,1];function Wa(t){return t}function rl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:_p(isNaN(e)?NaN:.5)}function tm(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function em(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=rl(i,r),o=n(s,o)):(r=rl(r,i),o=n(o,s)),function(l){return o(r(l))}}function nm(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=rl(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(l){var c=Pp(t,l,1,r)-1;return o[c](i[c](l))}}function Po(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function al(){var t=$u,e=$u,n=Ga,r,i,o,s=Wa,l,c,u;function f(){var h=Math.min(t.length,e.length);return s!==Wa&&(s=tm(t[0],t[h-1])),l=h>2?nm:em,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?o:(c||(c=l(t.map(r),e,n)))(r(s(h)))}return d.invert=function(h){return s(i((u||(u=l(e,t.map(r),xr)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,qp),f()):t.slice()},d.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},d.rangeRound=function(h){return e=Array.from(h),n=Qp,f()},d.clamp=function(h){return arguments.length?(s=h?!0:Wa,f()):s!==Wa},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,m){return r=h,i=m,f()}}function Bu(){return al()(Wa,Wa)}function Va(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function dR(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}var rm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pi(t){if(!(e=rm.exec(t)))throw new Error("invalid format: "+t);var e;return new il({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]})}Pi.prototype=il.prototype;function il(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}il.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function am(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Mo(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function ja(t){return t=Mo(Math.abs(t)),t?t[1]:NaN}function im(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ja(e)/3)))*3-ja(Math.abs(t)))}function om(t,e){return function(n,r){for(var i=n.length,o=[],s=0,l=t[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),o.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=t[s=(s+1)%t.length];return o.reverse().join(e)}}function sm(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}function lm(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Lo;function cm(t,e){var n=Mo(t,e);if(!n)return Lo=void 0,t.toPrecision(e);var r=n[0],i=n[1],o=i-(Lo=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Mo(t,Math.max(0,e+o-1))[0]}function zu(t,e){var n=Mo(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}var Uu={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:am,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)=>zu(t*100,e),r:zu,s:cm,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ku(t){return t}var Xu=Array.prototype.map,Gu=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function um(t){var e=t.grouping===void 0||t.thousands===void 0?ku:om(Xu.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?ku:sm(Xu.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(d,h){d=Pi(d);var m=d.fill,A=d.align,I=d.sign,C=d.symbol,P=d.zero,z=d.width,N=d.comma,B=d.precision,W=d.trim,V=d.type;V==="n"?(N=!0,V="g"):Uu[V]||(B===void 0&&(B=12),W=!0,V="g"),(P||m==="0"&&A==="=")&&(P=!0,m="0",A="=");var J=(h&&h.prefix!==void 0?h.prefix:"")+(C==="$"?n:C==="#"&&/[boxX]/.test(V)?"0"+V.toLowerCase():""),q=(C==="$"?r:/[%p]/.test(V)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),at=Uu[V],et=/[defgprs%]/.test(V);B=B===void 0?6:/[gprs]/.test(V)?Math.max(1,Math.min(21,B)):Math.max(0,Math.min(20,B));function ot(lt){var ft=J,_=q,dt,ut,xt;if(V==="c")_=at(lt)+_,lt="";else{lt=+lt;var bt=lt<0||1/lt<0;if(lt=isNaN(lt)?c:at(Math.abs(lt),B),W&&(lt=lm(lt)),bt&&+lt==0&&I!=="+"&&(bt=!1),ft=(bt?I==="("?I:l:I==="-"||I==="("?"":I)+ft,_=(V==="s"&&!isNaN(lt)&&Lo!==void 0?Gu[8+Lo/3]:"")+_+(bt&&I==="("?")":""),et){for(dt=-1,ut=lt.length;++dt<ut;)if(xt=lt.charCodeAt(dt),48>xt||xt>57){_=(xt===46?i+lt.slice(dt+1):lt.slice(dt))+_,lt=lt.slice(0,dt);break}}}N&&!P&&(lt=e(lt,1/0));var Rt=ft.length+lt.length+_.length,Et=Rt<z?new Array(z-Rt+1).join(m):"";switch(N&&P&&(lt=e(Et+lt,Et.length?z-_.length:1/0),Et=""),A){case"<":lt=ft+lt+_+Et;break;case"=":lt=ft+Et+lt+_;break;case"^":lt=Et.slice(0,Rt=Et.length>>1)+ft+lt+_+Et.slice(Rt);break;default:lt=Et+ft+lt+_;break}return o(lt)}return ot.toString=function(){return d+""},ot}function f(d,h){var m=Math.max(-8,Math.min(8,Math.floor(ja(h)/3)))*3,A=Math.pow(10,-m),I=u((d=Pi(d),d.type="f",d),{suffix:Gu[8+m/3]});return function(C){return I(A*C)}}return{format:u,formatPrefix:f}}var Do,ol,Wu;fm({thousands:",",grouping:[3],currency:["$",""]});function fm(t){return Do=um(t),ol=Do.format,Wu=Do.formatPrefix,Do}function dm(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ja(e)-ja(t))+1}function hm(t){return Math.max(0,-ja(Math.abs(t)))}function gm(t,e,n,r){var i=Qs(t,e,n),o;switch(r=Pi(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=im(i,s))&&(r.precision=o),Wu(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=dm(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=hm(i))&&(r.precision=o-(r.type==="%")*2);break}}return ol(r)}function Vu(t){var e=t.domain;return t.ticks=function(n){var r=e();return Zs(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return gm(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],l=r[o],c,u,f=10;for(l<s&&(u=s,s=l,l=u,u=i,i=o,o=u);f-- >0;){if(u=Js(s,l,n),u===c)return r[i]=s,r[o]=l,e(r);if(u>0)s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u;else if(u<0)s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u;else break;c=u}return t},t}function Fo(){var t=Bu();return t.copy=function(){return Po(t,Fo())},Va.apply(t,arguments),Vu(t)}function ju(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Hu(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function vm(t){var e=1,n=t(ju(e),Hu(e));return n.constant=function(r){return arguments.length?t(ju(e=+r),Hu(e)):e},Vu(n)}function Yu(){var t=vm(al());return t.copy=function(){return Po(t,Yu()).constant(t.constant())},Va.apply(t,arguments)}function Ku(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],s;return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),t[n]=e.floor(i),t[r]=e.ceil(o),t}function Zu(t){return Math.log(t)}function Ju(t){return Math.exp(t)}function pm(t){return-Math.log(-t)}function mm(t){return-Math.exp(-t)}function xm(t){return isFinite(t)?+("1e"+t):t<0?0:t}function ym(t){return t===10?xm:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Tm(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Qu(t){return(e,n)=>-t(-e,n)}function bm(t){const e=t(Zu,Ju),n=e.domain;let r=10,i,o;function s(){return i=Tm(r),o=ym(r),n()[0]<0?(i=Qu(i),o=Qu(o),t(pm,mm)):t(Zu,Ju),e}return e.base=function(l){return arguments.length?(r=+l,s()):r},e.domain=function(l){return arguments.length?(n(l),s()):n()},e.ticks=l=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),m=i(f),A,I;const C=l==null?10:+l;let P=[];if(!(r%1)&&m-h<C){if(h=Math.floor(h),m=Math.ceil(m),u>0){for(;h<=m;++h)for(A=1;A<r;++A)if(I=h<0?A/o(-h):A*o(h),!(I<u)){if(I>f)break;P.push(I)}}else for(;h<=m;++h)for(A=r-1;A>=1;--A)if(I=h>0?A/o(-h):A*o(h),!(I<u)){if(I>f)break;P.push(I)}P.length*2<C&&(P=Zs(u,f,C))}else P=Zs(h,m,Math.min(m-h,C)).map(o);return d?P.reverse():P},e.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=Pi(c)).precision==null&&(c.trim=!0),c=ol(c)),l===1/0)return c;const u=Math.max(1,r*l/e.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},e.nice=()=>n(Ku(n(),{floor:l=>o(Math.floor(i(l))),ceil:l=>o(Math.ceil(i(l)))})),e}function _u(){const t=bm(al()).domain([1,10]);return t.copy=()=>Po(t,_u()).base(t.base()),Va.apply(t,arguments),t}const $r=1e3,sr=$r*60,Br=sr*60,zr=Br*24,sl=zr*7,qu=zr*30,ll=zr*365,cl=new Date,ul=new Date;function Cn(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const s=i(o),l=i.ceil(o);return o-s<l-o?s:l},i.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,l)=>{const c=[];if(o=i.ceil(o),l=l==null?1:Math.floor(l),!(o<s)||!(l>0))return c;let u;do c.push(u=new Date(+o)),e(o,l),t(o);while(u<o&&o<s);return c},i.filter=o=>Cn(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;e(s,-1),!o(s););else for(;--l>=0;)for(;e(s,1),!o(s););}),n&&(i.count=(o,s)=>(cl.setTime(+o),ul.setTime(+s),t(cl),t(ul),Math.floor(n(cl,ul))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const No=Cn(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);No.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?Cn(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):No);const hR=No.range,ba=Cn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*$r)},(t,e)=>(e-t)/$r,t=>t.getUTCSeconds()),gR=ba.range,fl=Cn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*$r)},(t,e)=>{t.setTime(+t+e*sr)},(t,e)=>(e-t)/sr,t=>t.getMinutes()),vR=fl.range,dl=Cn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*sr)},(t,e)=>(e-t)/sr,t=>t.getUTCMinutes()),pR=dl.range,hl=Cn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*$r-t.getMinutes()*sr)},(t,e)=>{t.setTime(+t+e*Br)},(t,e)=>(e-t)/Br,t=>t.getHours()),mR=hl.range,gl=Cn(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Br)},(t,e)=>(e-t)/Br,t=>t.getUTCHours()),xR=gl.range,Mi=Cn(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*sr)/zr,t=>t.getDate()-1),yR=Mi.range,$o=Cn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/zr,t=>t.getUTCDate()-1),TR=$o.range,tf=Cn(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/zr,t=>Math.floor(t/zr)),bR=tf.range;function Sa(t){return Cn(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*sr)/sl)}const Bo=Sa(0),zo=Sa(1),Sm=Sa(2),Am=Sa(3),Ha=Sa(4),Em=Sa(5),Cm=Sa(6),SR=Bo.range,AR=zo.range,ER=Sm.range,CR=Am.range,IR=Ha.range,RR=Em.range,OR=Cm.range;function Aa(t){return Cn(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/sl)}const Uo=Aa(0),ko=Aa(1),Im=Aa(2),Rm=Aa(3),Ya=Aa(4),Om=Aa(5),wm=Aa(6),wR=Uo.range,PR=ko.range,MR=Im.range,LR=Rm.range,DR=Ya.range,FR=Om.range,NR=wm.range,vl=Cn(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),$R=vl.range,pl=Cn(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),BR=pl.range,Ur=Cn(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());Ur.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Cn(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const zR=Ur.range,kr=Cn(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());kr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:Cn(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const UR=kr.range;function ef(t,e,n,r,i,o){const s=[[ba,1,$r],[ba,5,5*$r],[ba,15,15*$r],[ba,30,30*$r],[o,1,sr],[o,5,5*sr],[o,15,15*sr],[o,30,30*sr],[i,1,Br],[i,3,3*Br],[i,6,6*Br],[i,12,12*Br],[r,1,zr],[r,2,2*zr],[n,1,sl],[e,1,qu],[e,3,3*qu],[t,1,ll]];function l(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),A=m?m.range(u,+f+1):[];return h?A.reverse():A}function c(u,f,d){const h=Math.abs(f-u)/d,m=_s(([,,C])=>C).right(s,h);if(m===s.length)return t.every(Qs(u/ll,f/ll,d));if(m===0)return No.every(Math.max(Qs(u,f,d),1));const[A,I]=s[h/s[m-1][2]<s[m][2]/h?m-1:m];return A.every(I)}return[l,c]}const[Pm,Mm]=ef(kr,pl,Uo,tf,gl,dl),[Lm,Dm]=ef(Ur,vl,Bo,Mi,hl,fl);function ml(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function xl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Li(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Fm(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,s=t.shortDays,l=t.months,c=t.shortMonths,u=Di(i),f=Fi(i),d=Di(o),h=Fi(o),m=Di(s),A=Fi(s),I=Di(l),C=Fi(l),P=Di(c),z=Fi(c),N={a:xt,A:bt,b:Rt,B:Et,c:null,d:lf,e:lf,f:rx,g:hx,G:vx,H:tx,I:ex,j:nx,L:cf,m:ax,M:ix,p:Zt,q:fe,Q:vf,s:pf,S:ox,u:sx,U:lx,V:cx,w:ux,W:fx,x:null,X:null,y:dx,Y:gx,Z:px,"%":gf},B={a:me,A:xe,b:Te,B:Fe,c:null,d:ff,e:ff,f:Tx,g:Px,G:Lx,H:mx,I:xx,j:yx,L:df,m:bx,M:Sx,p:Ie,q:ke,Q:vf,s:pf,S:Ax,u:Ex,U:Cx,V:Ix,w:Rx,W:Ox,x:null,X:null,y:wx,Y:Mx,Z:Dx,"%":gf},W={a:et,A:ot,b:lt,B:ft,c:_,d:of,e:of,f:Jm,g:af,G:rf,H:sf,I:sf,j:Hm,L:Zm,m:jm,M:Ym,p:at,q:Vm,Q:_m,s:qm,S:Km,u:Um,U:km,V:Xm,w:zm,W:Gm,x:dt,X:ut,y:af,Y:rf,Z:Wm,"%":Qm};N.x=V(n,N),N.X=V(r,N),N.c=V(e,N),B.x=V(n,B),B.X=V(r,B),B.c=V(e,B);function V(Jt,Ae){return function(Le){var Yt=[],dn=-1,qe=0,Dn=Jt.length,Fn,Se,we;for(Le instanceof Date||(Le=new Date(+Le));++dn<Dn;)Jt.charCodeAt(dn)===37&&(Yt.push(Jt.slice(qe,dn)),(Se=nf[Fn=Jt.charAt(++dn)])!=null?Fn=Jt.charAt(++dn):Se=Fn==="e"?" ":"0",(we=Ae[Fn])&&(Fn=we(Le,Se)),Yt.push(Fn),qe=dn+1);return Yt.push(Jt.slice(qe,dn)),Yt.join("")}}function J(Jt,Ae){return function(Le){var Yt=Li(1900,void 0,1),dn=q(Yt,Jt,Le+="",0),qe,Dn;if(dn!=Le.length)return null;if("Q"in Yt)return new Date(Yt.Q);if("s"in Yt)return new Date(Yt.s*1e3+("L"in Yt?Yt.L:0));if(Ae&&!("Z"in Yt)&&(Yt.Z=0),"p"in Yt&&(Yt.H=Yt.H%12+Yt.p*12),Yt.m===void 0&&(Yt.m="q"in Yt?Yt.q:0),"V"in Yt){if(Yt.V<1||Yt.V>53)return null;"w"in Yt||(Yt.w=1),"Z"in Yt?(qe=xl(Li(Yt.y,0,1)),Dn=qe.getUTCDay(),qe=Dn>4||Dn===0?ko.ceil(qe):ko(qe),qe=$o.offset(qe,(Yt.V-1)*7),Yt.y=qe.getUTCFullYear(),Yt.m=qe.getUTCMonth(),Yt.d=qe.getUTCDate()+(Yt.w+6)%7):(qe=ml(Li(Yt.y,0,1)),Dn=qe.getDay(),qe=Dn>4||Dn===0?zo.ceil(qe):zo(qe),qe=Mi.offset(qe,(Yt.V-1)*7),Yt.y=qe.getFullYear(),Yt.m=qe.getMonth(),Yt.d=qe.getDate()+(Yt.w+6)%7)}else("W"in Yt||"U"in Yt)&&("w"in Yt||(Yt.w="u"in Yt?Yt.u%7:"W"in Yt?1:0),Dn="Z"in Yt?xl(Li(Yt.y,0,1)).getUTCDay():ml(Li(Yt.y,0,1)).getDay(),Yt.m=0,Yt.d="W"in Yt?(Yt.w+6)%7+Yt.W*7-(Dn+5)%7:Yt.w+Yt.U*7-(Dn+6)%7);return"Z"in Yt?(Yt.H+=Yt.Z/100|0,Yt.M+=Yt.Z%100,xl(Yt)):ml(Yt)}}function q(Jt,Ae,Le,Yt){for(var dn=0,qe=Ae.length,Dn=Le.length,Fn,Se;dn<qe;){if(Yt>=Dn)return-1;if(Fn=Ae.charCodeAt(dn++),Fn===37){if(Fn=Ae.charAt(dn++),Se=W[Fn in nf?Ae.charAt(dn++):Fn],!Se||(Yt=Se(Jt,Le,Yt))<0)return-1}else if(Fn!=Le.charCodeAt(Yt++))return-1}return Yt}function at(Jt,Ae,Le){var Yt=u.exec(Ae.slice(Le));return Yt?(Jt.p=f.get(Yt[0].toLowerCase()),Le+Yt[0].length):-1}function et(Jt,Ae,Le){var Yt=m.exec(Ae.slice(Le));return Yt?(Jt.w=A.get(Yt[0].toLowerCase()),Le+Yt[0].length):-1}function ot(Jt,Ae,Le){var Yt=d.exec(Ae.slice(Le));return Yt?(Jt.w=h.get(Yt[0].toLowerCase()),Le+Yt[0].length):-1}function lt(Jt,Ae,Le){var Yt=P.exec(Ae.slice(Le));return Yt?(Jt.m=z.get(Yt[0].toLowerCase()),Le+Yt[0].length):-1}function ft(Jt,Ae,Le){var Yt=I.exec(Ae.slice(Le));return Yt?(Jt.m=C.get(Yt[0].toLowerCase()),Le+Yt[0].length):-1}function _(Jt,Ae,Le){return q(Jt,e,Ae,Le)}function dt(Jt,Ae,Le){return q(Jt,n,Ae,Le)}function ut(Jt,Ae,Le){return q(Jt,r,Ae,Le)}function xt(Jt){return s[Jt.getDay()]}function bt(Jt){return o[Jt.getDay()]}function Rt(Jt){return c[Jt.getMonth()]}function Et(Jt){return l[Jt.getMonth()]}function Zt(Jt){return i[+(Jt.getHours()>=12)]}function fe(Jt){return 1+~~(Jt.getMonth()/3)}function me(Jt){return s[Jt.getUTCDay()]}function xe(Jt){return o[Jt.getUTCDay()]}function Te(Jt){return c[Jt.getUTCMonth()]}function Fe(Jt){return l[Jt.getUTCMonth()]}function Ie(Jt){return i[+(Jt.getUTCHours()>=12)]}function ke(Jt){return 1+~~(Jt.getUTCMonth()/3)}return{format:function(Jt){var Ae=V(Jt+="",N);return Ae.toString=function(){return Jt},Ae},parse:function(Jt){var Ae=J(Jt+="",!1);return Ae.toString=function(){return Jt},Ae},utcFormat:function(Jt){var Ae=V(Jt+="",B);return Ae.toString=function(){return Jt},Ae},utcParse:function(Jt){var Ae=J(Jt+="",!0);return Ae.toString=function(){return Jt},Ae}}}var nf={"-":"",_:" ",0:"0"},wn=/^\s*\d+/,Nm=/^%/,$m=/[\\^$*+?|[\]().{}]/g;function Qe(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function Bm(t){return t.replace($m,"\\$&")}function Di(t){return new RegExp("^(?:"+t.map(Bm).join("|")+")","i")}function Fi(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function zm(t,e,n){var r=wn.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Um(t,e,n){var r=wn.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function km(t,e,n){var r=wn.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Xm(t,e,n){var r=wn.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Gm(t,e,n){var r=wn.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function rf(t,e,n){var r=wn.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function af(t,e,n){var r=wn.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Wm(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function Vm(t,e,n){var r=wn.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function jm(t,e,n){var r=wn.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function of(t,e,n){var r=wn.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Hm(t,e,n){var r=wn.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sf(t,e,n){var r=wn.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ym(t,e,n){var r=wn.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Km(t,e,n){var r=wn.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Zm(t,e,n){var r=wn.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Jm(t,e,n){var r=wn.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Qm(t,e,n){var r=Nm.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function _m(t,e,n){var r=wn.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function qm(t,e,n){var r=wn.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function lf(t,e){return Qe(t.getDate(),e,2)}function tx(t,e){return Qe(t.getHours(),e,2)}function ex(t,e){return Qe(t.getHours()%12||12,e,2)}function nx(t,e){return Qe(1+Mi.count(Ur(t),t),e,3)}function cf(t,e){return Qe(t.getMilliseconds(),e,3)}function rx(t,e){return cf(t,e)+"000"}function ax(t,e){return Qe(t.getMonth()+1,e,2)}function ix(t,e){return Qe(t.getMinutes(),e,2)}function ox(t,e){return Qe(t.getSeconds(),e,2)}function sx(t){var e=t.getDay();return e===0?7:e}function lx(t,e){return Qe(Bo.count(Ur(t)-1,t),e,2)}function uf(t){var e=t.getDay();return e>=4||e===0?Ha(t):Ha.ceil(t)}function cx(t,e){return t=uf(t),Qe(Ha.count(Ur(t),t)+(Ur(t).getDay()===4),e,2)}function ux(t){return t.getDay()}function fx(t,e){return Qe(zo.count(Ur(t)-1,t),e,2)}function dx(t,e){return Qe(t.getFullYear()%100,e,2)}function hx(t,e){return t=uf(t),Qe(t.getFullYear()%100,e,2)}function gx(t,e){return Qe(t.getFullYear()%1e4,e,4)}function vx(t,e){var n=t.getDay();return t=n>=4||n===0?Ha(t):Ha.ceil(t),Qe(t.getFullYear()%1e4,e,4)}function px(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Qe(e/60|0,"0",2)+Qe(e%60,"0",2)}function ff(t,e){return Qe(t.getUTCDate(),e,2)}function mx(t,e){return Qe(t.getUTCHours(),e,2)}function xx(t,e){return Qe(t.getUTCHours()%12||12,e,2)}function yx(t,e){return Qe(1+$o.count(kr(t),t),e,3)}function df(t,e){return Qe(t.getUTCMilliseconds(),e,3)}function Tx(t,e){return df(t,e)+"000"}function bx(t,e){return Qe(t.getUTCMonth()+1,e,2)}function Sx(t,e){return Qe(t.getUTCMinutes(),e,2)}function Ax(t,e){return Qe(t.getUTCSeconds(),e,2)}function Ex(t){var e=t.getUTCDay();return e===0?7:e}function Cx(t,e){return Qe(Uo.count(kr(t)-1,t),e,2)}function hf(t){var e=t.getUTCDay();return e>=4||e===0?Ya(t):Ya.ceil(t)}function Ix(t,e){return t=hf(t),Qe(Ya.count(kr(t),t)+(kr(t).getUTCDay()===4),e,2)}function Rx(t){return t.getUTCDay()}function Ox(t,e){return Qe(ko.count(kr(t)-1,t),e,2)}function wx(t,e){return Qe(t.getUTCFullYear()%100,e,2)}function Px(t,e){return t=hf(t),Qe(t.getUTCFullYear()%100,e,2)}function Mx(t,e){return Qe(t.getUTCFullYear()%1e4,e,4)}function Lx(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ya(t):Ya.ceil(t),Qe(t.getUTCFullYear()%1e4,e,4)}function Dx(){return"+0000"}function gf(){return"%"}function vf(t){return+t}function pf(t){return Math.floor(+t/1e3)}var Ka,yl,mf,Tl,xf;Fx({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Fx(t){return Ka=Fm(t),yl=Ka.format,mf=Ka.parse,Tl=Ka.utcFormat,xf=Ka.utcParse,Ka}function Nx(t){return new Date(t)}function $x(t){return t instanceof Date?+t:+new Date(+t)}function bl(t,e,n,r,i,o,s,l,c,u){var f=Bu(),d=f.invert,h=f.domain,m=u(".%L"),A=u(":%S"),I=u("%I:%M"),C=u("%I %p"),P=u("%a %d"),z=u("%b %d"),N=u("%B"),B=u("%Y");function W(V){return(c(V)<V?m:l(V)<V?A:s(V)<V?I:o(V)<V?C:r(V)<V?i(V)<V?P:z:n(V)<V?N:B)(V)}return f.invert=function(V){return new Date(d(V))},f.domain=function(V){return arguments.length?h(Array.from(V,$x)):h().map(Nx)},f.ticks=function(V){var J=h();return t(J[0],J[J.length-1],V==null?10:V)},f.tickFormat=function(V,J){return J==null?W:u(J)},f.nice=function(V){var J=h();return(!V||typeof V.range!="function")&&(V=e(J[0],J[J.length-1],V==null?10:V)),V?h(Ku(J,V)):f},f.copy=function(){return Po(f,bl(t,e,n,r,i,o,s,l,c,u))},f}function Bx(){return Va.apply(bl(Lm,Dm,Ur,vl,Bo,Mi,hl,fl,ba,yl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zx(){return Va.apply(bl(Pm,Mm,kr,pl,Uo,$o,gl,dl,ba,Tl).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const We=t=>t||t===0,le=t=>typeof t=="function",Ke=t=>typeof t=="string",ge=t=>typeof t=="number",xn=t=>typeof t=="undefined",sn=t=>typeof t!="undefined",Ea=t=>typeof t=="boolean",Ux=t=>Math.ceil(t/10)*10,Za=t=>Math.ceil(t)+.5,Ca=t=>t[1]-t[0],Qn=t=>typeof t=="object",kx=t=>{for(const e in t)return!1;return!0},lr=t=>xn(t)||t===null||Ke(t)&&t.length===0||Qn(t)&&!(t instanceof Date)&&kx(t)||ge(t)&&isNaN(t),vn=t=>!lr(t),nn=t=>Array.isArray(t),je=t=>t&&!(t!=null&&t.nodeType)&&Qn(t)&&!nn(t);function Xx(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function Gx(t){const e=typeof(t==null?void 0:t.requestAnimationFrame)=="function"&&typeof(t==null?void 0:t.cancelAnimationFrame)=="function",n=typeof(t==null?void 0:t.requestIdleCallback)=="function"&&typeof(t==null?void 0:t.cancelIdleCallback)=="function",r=o=>setTimeout(o,1),i=o=>clearTimeout(o);return[e?t.requestAnimationFrame:r,e?t.cancelAnimationFrame:i,n?t.requestIdleCallback:r,n?t.cancelIdleCallback:i]}const ce=Xx(),He=ce==null?void 0:ce.document,[Wx,kR,yf,Vx]=Gx(ce),jx=new Set(["span","div","p","br","b","i","em","small","strong","mark","u","s","sub","sup","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","abbr","ins","del","a","img","figure","figcaption","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),Hx=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),Xo=new Map;jx.forEach(t=>Xo.set(t.toLowerCase(),t));const Go=new Map;Hx.forEach(t=>Go.set(t.toLowerCase(),t));const Yx=new Set(["http:","https:","mailto:"]),Kx=new Set(["href","src","xlink:href"]),Zx=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,Jx=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,Qx=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,Tf=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,bf=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,_x=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"];function Sl(t){return t.replace(/:/gi,":").replace(/&newline;/gi,`
|
|
31
|
-
`).replace(/&tab;/gi," ").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&#(\d+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-f]+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,16)))}function Sf(t){const n=Sl(t).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!n||n.startsWith("#"))return!0;const r=n.match(/^[^/?#]*:/);return r?Yx.has(r[0]):!0}function qx(t){const n=Sl(t).replace(/[\u0000-\u001f]/g,"");bf.lastIndex=0;let r;for(;(r=bf.exec(n))!==null;)if(!Sf(r[1]))return null;const i=n.toLowerCase().replace(/\s/g,"");for(const o of _x)if(i.includes(o))return null;return t}const ty={'"':""","'":"'","`":"`"},ey=/["'`]/g;function Al(t){return t.replace(ey,e=>ty[e])}function ny(t,e,n=!1){if(Kx.has(t))return Sf(e)?n?Al(e):e:null;if(t==="style"){const i=qx(e);return i===null?null:n?Al(i):i}const r=Sl(e).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(r)?null:n?Al(e):e}function ry(t){const e=t.match(Zx);return e?e[1].toLowerCase():null}function ay(t){const e=ry(t);return e!==null&&Xo.has(e)}function iy(t){var e,n,r;const i=t.match(Jx);if(i){const I=i[1].toLowerCase();return`</${(e=Xo.get(I))!=null?e:I}>`}const o=t.match(Qx);if(!o)return"";const[,s,l,c]=o,u=s.toLowerCase(),f=(n=Xo.get(u))!=null?n:u,d=[];Tf.lastIndex=0;let h;for(;(h=Tf.exec(l))!==null;){const I=h[1].toLowerCase(),C=h[2],P=h[3],z=h[4];if(I.startsWith("on"))continue;const N=(r=Go.get(I))!=null?r:I;let B,W;if(C!==void 0)B=C,W='"';else if(P!==void 0)B=P,W="'";else if(z!==void 0)B=z,W='"';else{Go.has(I)&&d.push(N);continue}if(Go.has(I)){const J=ny(I,B,z!==void 0);J!==null&&d.push(`${N}=${W}${J}${W}`)}}const m=d.length>0?` ${d.join(" ")}`:"";return`<${f}${m}${c?"/>":">"}`}function Xr(t){return typeof t!="string"||!t||t.indexOf("<")===-1?t:t.replace(/<\/?[^>]*>|[^<>\s]+>/g,e=>e.startsWith("<!--")?"":e.startsWith("<")?ay(e)?iy(e):e.replace(/</g,"<"):e.slice(0,-1)+">")}var oy=Object.defineProperty,Af=Object.getOwnPropertySymbols,sy=Object.prototype.hasOwnProperty,ly=Object.prototype.propertyIsEnumerable,Ef=(t,e,n)=>e in t?oy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cf=(t,e)=>{for(var n in e||(e={}))sy.call(e,n)&&Ef(t,n,e[n]);if(Af)for(var n of Af(e))ly.call(e,n)&&Ef(t,n,e[n]);return t};function If(t,e){for(let n=0;n<t.length;n++){const r=t[n];r!==null&&sn(r)&&e(r,n)}}function ia(t,e,n){return sn(t[e])?t[e]:n}function cy(t,e){for(const n in t)if(t[n]===e)return!0;return!1}function Ne(t,e,...n){const r=le(t);return r&&t.call(e,...n),r}function Wo(t,e){let n=0;const r=function(...i){!--n&&e.apply(this,i)};"duration"in t?t.each(()=>++n).on("end",r):(++n,t.call(r))}const $n=t=>t.charAt(0).toUpperCase()+t.slice(1);function uy(t,e="-"){return t.split(e).map((n,r)=>r?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const Ia=t=>[].slice.call(t);function fy(...t){const e=n=>{if(nn(n))return n.map(e);if(je(n)&&n.constructor){const r=new n.constructor;for(const i in n)r[i]=e(n[i]);return r}return n};return t.map(n=>e(n)).reduce((n,r)=>Cf(Cf({},n),r))}function yn(t={},e){nn(e)&&e.forEach(n=>yn(t,n));for(const n in e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}function El(t){const e=t[0]instanceof Date,n=Array.from(new Set(e?t.map(Number):t));return e?n.map(r=>new Date(r)):n}function dy(t){return t&&t.length?t.reduce((e,n)=>e.concat(n)):[]}function Gr(t,...e){if(!e.length||e.length===1&&!e[0])return t;const n=e.shift();return je(t)&&je(n)&&Object.keys(n).forEach(r=>{if(!/^(__proto__|constructor|prototype)$/i.test(r)){const i=n[r];i instanceof Date?t[r]=new Date(i.getTime()):je(i)?(!t[r]&&(t[r]={}),t[r]=Gr(t[r],i)):t[r]=nn(i)?i.concat():i}}),Gr(t,...e)}function Ja(t,e=!0){let n;return t[0]instanceof Date?n=e?(r,i)=>r-i:(r,i)=>i-r:e&&!t.every(isNaN)?n=(r,i)=>r-i:e||(n=(r,i)=>r>i&&-1||r<i&&1||r===i&&0),t.concat().sort(n)}function yr(t,e){let n=e.filter(r=>vn(r));if(n.length)if(ge(n[0])){let r=t==="min"?1/0:-1/0;for(const i of n)(t==="min"?i<r:i>r)&&(r=i);n=r}else n[0]instanceof Date&&(n=Ja(n,t==="min")[0]);else n=void 0;return n}const Vo=(t,e,n=1)=>{const r=[],i=Math.max(0,Math.ceil((e-t)/n))|0;for(let o=0;o<i;o++)r.push(t+o*n);return r};let hy=0;function Rr(t=!0){const e=++hy;return t?String(e):e}function Cl(t,e,n,r,i){if(n>r)return-1;const o=Math.floor((n+r)/2);let{x:s,w:l=0}=t[o];return i&&(s=t[o].y,l=t[o].h),e>=s&&e<=s+l?o:e<s?Cl(t,e,n,o-1,i):Cl(t,e,o+1,r,i)}function Ra(t,e){return Xr(t.replace(/\{=([^}]+)\}/g,(n,r)=>{var i;return(i=e[r])!=null?i:""}))}function Hn(t){var e;let n;if(t instanceof Date)n=t;else if(Ke(t)){const{config:r,format:i}=this;n=(e=i.dataTime(r.data_xFormat)(t))!=null?e:new Date(t)}else ge(t)&&!isNaN(t)&&(n=new Date(+t));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${t}' to Date object`),n}function Rf(t){if(je(t)&&!Ke(t)){const s=t;return{top:s.top||0,right:s.right||0,bottom:s.bottom||0,left:s.left||0}}const e=(Ke(t)?t.trim().split(/\s+/):[t]).map(s=>+s||0),[n,r=n,i=n,o=r]=e;return{top:n,right:r,bottom:i,left:o}}function Of(t,e){e()===!1?Wx(()=>Of(t,e)):t()}function wf(t,e=(n=>n)){const n=new Set;return If(t,(r,i)=>{n.add(e(r,i))}),n}function Pf(t,e,n=(r=>r)){const r=new Map;return If(t,(i,o)=>{r.set(e(i,o),n(i,o))}),r}function oa(t="linear",e,n){const r={linear:Fo,log:Yu,_log:_u,time:Bx,utc:zx}[t]();return r.type=t,/_?log/.test(t)&&r.clamp(!0),r.range([e!=null?e:0,n!=null?n:1])}var gy={getXScale(t,e,n,r){const i=this,o=i.state.loading!=="append"&&i.scale.zoom||oa(i.axis.getAxisType("x"),t,e);return i.getCustomizedXScale(n?o.domain(n):o,r)},getYScale(t,e,n,r,i){const s=this.axis.getAxisType(t);if(i&&i.type===s)return i.range([e,n]),r&&i.domain(r),i;const l=oa(s,e,n);return r&&l.domain(r),l},getYScaleById(t,e=!1){var n;const r=((n=this.axis)==null?void 0:n.getId(t))==="y2",i=e?r?"subY2":"subY":r?"y2":"y";return this.scale[i]},getCustomizedXScale(t,e){const n=this,r=()=>(e?e():n.axis.x.tickOffset())||(n.axis.isCategorized()?(t(1)-t(0))/2:0),i=n.config.axis_x_inverted,o=function(s){return t(s)+r()};for(const s in t)o[s]=t[s];return o.orgDomain=()=>t.domain(),o.orgScale=()=>t,n.axis.isCategorized()&&(o.domain=function(s){let l=s;return arguments.length?(t.domain(l),o):(l=this.orgDomain(),i?[l[0]+1,l[1]]:[l[0],l[1]+1])}),o},updateScales(t,e=!0){var n,r,i,o,s,l;const c=this,{axis:u,config:f,format:d,org:h,scale:m,state:{current:A,width:I,height:C,width2:P,height2:z,hasAxis:N,hasTreemap:B}}=c;if(N){const W=f.axis_rotated,V=c.getResettedPadding(1),J={x:W?V:0,y:W?0:C,subX:W?1:0,subY:W?0:z},q={x:W?C:I,y:W?I:V,subX:W?C:I,subY:W?P:1},at=e?(n=m.x)==null?void 0:n.orgDomain():m.zoom||(i=(r=m.x)==null?void 0:r.domain)==null?void 0:i.call(r),et=e?h.xDomain:m.zoom||(s=(o=m.subX)==null?void 0:o.domain)==null?void 0:s.call(o);m.x=c.getXScale(J.x,q.x,at,()=>u.x.tickOffset()),m.subX=c.getXScale(J.x,q.x,et,ot=>{var lt;return ot%1?0:((lt=u.subX)!=null?lt:u.x).tickOffset()}),d.xAxisTick=u.getXAxisTickFormat(),d.subXAxisTick=u.getXAxisTickFormat(!0),u.setAxis("x",m.x,f.axis_x_tick_outer,t),f.subchart_show&&u.setAxis("subX",m.subX,f.axis_x_tick_outer,t),m.y=c.getYScale("y",J.y,q.y,m.y?m.y.domain():f.axis_y_default,m.y),m.subY=c.getYScale("y",J.subY,q.subY,m.subY?m.subY.domain():f.axis_y_default,m.subY),u.setAxis("y",m.y,f.axis_y_tick_outer,t),f.axis_y2_show&&(m.y2=c.getYScale("y2",J.y,q.y,m.y2?m.y2.domain():f.axis_y2_default,m.y2),m.subY2=c.getYScale("y2",J.subY,q.subY,m.subY2?m.subY2.domain():f.axis_y2_default,m.subY2),u.setAxis("y2",m.y2,f.axis_y2_tick_outer,t))}else if(B){const W=c.getCurrentPadding();m.x=Fo().rangeRound([W.left,A.width-W.right]),m.y=Fo().rangeRound([W.top,A.height-W.bottom])}else(l=c.updateArc)==null||l.call(c)},xx(t){const e=this,{config:n,scale:{x:r,zoom:i}}=e,o=n.zoom_enabled&&i?i:r;return t?o(We(t.x)?t.x:t):null},xv(t){const e=this,{axis:n,config:r,scale:{x:i,zoom:o}}=e,s=r.zoom_enabled&&o?o:i;let l=e.getBaseValue(t);return n.isTimeSeries()?l=Hn.call(e,l):n.isCategorized()&&Ke(l)&&(l=r.axis_x_categories.indexOf(l)),s(l)},yv(t){const e=this,{scale:{y:n,y2:r}}=e;return(t.axis&&t.axis==="y2"?r:n)(e.getBaseValue(t))},subxx(t){return t?this.scale.subX(t.x):null}};const Mf=1e5;function Tr(t){const e=/(\d+(?:\.\d+)?)px/.exec(t),n=parseFloat(e?e[1]:t);return Number.isFinite(n)?n:12}function er(t,e,n,r){return e.indices[n]||t.getShapeIndices(r)}function Qa(t,e,n=[]){var r;const i=typeof e=="string"?e:e==null?void 0:e.id;return!((r=t.isGrouped)!=null&&r.call(t,i))||n.some(o=>o(t,e))}function sa(t,e){var n;const r=typeof e=="string"?e:e==null?void 0:e.id;return r&&((n=t.data_types)==null?void 0:n[r])||t.data_type||jt.LINE}function jo(t){const e=+t;return Number.isFinite(e)?e:null}function Lf(t){var e,n;const r=(n=(e=t.scale.zoom||t.scale.x)==null?void 0:e.domain)==null?void 0:n.call(e),i=jo(r==null?void 0:r[0]),o=jo(r==null?void 0:r[1]);return i===null||o===null?null:[Math.min(i,o),Math.max(i,o)]}function Ho(t){return jo(t==null?void 0:t.x)}function vy(t,e,n){let r=0,i=t.length;for(;r<i;){const o=r+i>>1,s=Ho(t[o]);if(s===null)return 0;(n?s<e:s>e)?r=o+1:i=o}return r}function py(t,e,n){let r=0,i=t.length;for(;r<i;){const o=r+i>>1,s=Ho(t[o]);if(s===null)return t.length;(n?s<=e:s>=e)?r=o+1:i=o}return r}function Wr(t,e,n=1){const r=(e==null?void 0:e.values)||[],i={start:0,end:r.length},o=Lf(t);if(!r.length||!o)return i;const s=t.state,l=s._canvasVisibleRangeCache||(s._canvasVisibleRangeCache=new Map),c=[e.id,r.length,s.dataGeneration,o[0],o[1],n].join(":"),u=l.get(e.id);if((u==null?void 0:u.key)===c)return u.range;const f=Ho(r[0]),d=Ho(r[r.length-1]);if(f===null||d===null)return i;const h=f<=d,m=vy(r,o[0],h),A=py(r,o[1],h),I={start:Math.max(0,Math.min(m,A)-n),end:Math.min(r.length,Math.max(m,A)+n)};return l.set(e.id,{key:c,range:I}),I}function nr(t,e){return sa(t.config,e)===jt.BAR}function Ni(t,e){return jn.Area.indexOf(sa(t.config,e))>-1}function _a(t,e){const n=sa(t.config,e);return jn.Line.indexOf(n)>-1}function la(t,e){return sa(t.config,e)===jt.SCATTER}function ca(t,e){return sa(t.config,e)===jt.BUBBLE}function br(t,e){return _a(t,e)||la(t,e)||ca(t,e)}function Yn(t,e){return sa(t.config,e)===jt.CANDLESTICK}function Il(t,e){return sa(t.config,e)===jt.TREEMAP}function XR(t,e){const n=sa(t,e);return n===jt.BAR||jn.Area.indexOf(n)>-1}function In(t,e){const n=t.getBaseValue(e);return n!=null}function pn(t,e){return Number.isFinite(t)&&Number.isFinite(e)}function Df(t,e,n){const r=Math.ceil(n)+1,i=Math.max(1,Math.ceil(t)+r*2+1),o=Math.max(1,Math.ceil(e)+r*2+1);return{data:new Uint8Array(i*o),height:o,offset:r,width:i}}function Ff(t,e,n){const r=Math.round(e)+t.offset,i=Math.round(n)+t.offset;if(r<0||r>=t.width||i<0||i>=t.height)return!1;const o=i*t.width+r;return t.data[o]?!1:(t.data[o]=1,!0)}function Yo(t,e){const n=typeof t=="function"?t.call(e):t;return n!=null&&n.length?n:void 0}function Nf(t,e,n){var r,i,o,s,l,c;if((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r,n))return e instanceof Date?e:Hn.call(t,e);if(n==="x"&&((s=(o=t.axis)==null?void 0:o.isCategorized)!=null&&s.call(o))&&typeof e=="string"){const u=t.config.axis_x_categories.indexOf(e);return u>=0?u:e}return(c=(l=t.axis)==null?void 0:l.isLog)!=null&&c.call(l,n)&&e!==null&&e!==void 0?+e:e}function ua(t,e){return Nf(t,e,"x")}function $i(t,e,n="y"){return Nf(t,e,n)}function $f(t,e,n="y"){return e.map(r=>$i(t,r,n))}function Rl(t,e){return e.map(n=>ua(t,n)).filter(n=>{var r,i;return!(typeof n=="string"&&((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)))})}function Oa(t,e){const n=typeof e=="function"?e():e;return t.ticks?t.ticks(n):t.domain()}function Bf(t,e){const[n,r]=t.domain(),i=+n,o=+r;if(e||!Number.isFinite(i)||!Number.isFinite(o)||o<=0)return Oa(t,e);const s=oa("_log").domain([i>0?i:1,o]).range(t.range());let l=s.ticks();for(let c=o.toFixed().length;l.length>15;c--)l=s.ticks(c);return l.length&&(l.splice(0,1,n),l.splice(l.length-1,1,r)),l}function Bi(t,e){const n=+t,r=+e;return Number.isFinite(n)&&Number.isFinite(r)?Math.abs(n-r)<1e-6:t===e}function my(t,e){const[n,r]=e,i=t.slice();return n!==void 0&&!i.some(o=>Bi(o,n))&&i.unshift(n),r!==void 0&&!i.some(o=>Bi(o,r))&&i.push(r),i}function zf(t,e){const n=ua(t,e);return jo(n)}function Ol(t){var e,n,r,i,o,s,l,c;const{scale:u}=t,f=(n=(e=u.zoom)==null?void 0:e.domain)==null?void 0:n.call(e),d=((i=(r=u.subX)==null?void 0:r.domain)==null?void 0:i.call(r))||((s=(o=u.x)==null?void 0:o.orgDomain)==null?void 0:s.call(o))||((c=(l=u.x)==null?void 0:l.domain)==null?void 0:c.call(l));return!(f!=null&&f.length)||!(d!=null&&d.length)?!1:!Bi(f[0],d[0])||!Bi(f[1],d[1])}function cr(t){return Ol(t)?t.scale.zoom:t.scale.x}function xy(t,e,n=0){var r,i;const o=(i=(r=cr(t)).domain)==null?void 0:i.call(r);if(!(o!=null&&o.length))return!0;const s=zf(t,e),l=+o[0],c=+o[1];return s===null||!Number.isFinite(l)||!Number.isFinite(c)?!0:s>=Math.min(l,c)-n&&s<=Math.max(l,c)+n}function yy(t,e){const n=[e>0?Math.abs(t[e]-t[e-1]):1/0,e<t.length-1?Math.abs(t[e+1]-t[e]):1/0].filter(Number.isFinite),r=Math.min(...n);return Number.isFinite(r)?r/2:0}function Uf(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<e?n=i+1:r=i}return n}function Ty(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<=e?n=i+1:r=i}return n}function by(t,e){var n;const{axis:r,state:i}=t,o=[i.dataGeneration,(n=r==null?void 0:r.isTimeSeries)!=null&&n.call(r)?1:0,e.map(u=>`${u.id}:${u.values.length}`).join(",")].join("|"),s=i._canvasXDataTickCache;if((s==null?void 0:s.key)===o)return s;const l=t.mapTargetsToUniqueXs(e),c={key:o,values:l,comparable:l.map(u=>{var f;return(f=zf(t,u))!=null?f:NaN})};return i._canvasXDataTickCache=c,c}function Sy(t,e){const{values:n,comparable:r}=e;if(!Ol(t))return n;const i=Lf(t);if(!i||r.length!==n.length||!Number.isFinite(r[0]))return n.filter(f=>xy(t,f));const[o,s]=i;let l=Uf(r,o),c=Ty(r,s);const u=f=>{const d=Uf(r,f);let h=-1,m=1/0;for(const A of[d-1,d]){const I=r[A],C=Math.abs(I-f);C<m&&(m=C,h=A)}h>-1&&h<r.length&&m<=yy(r,h)+1e-6&&(l=Math.min(l,h),c=Math.max(c,h+1))};return u(o),u(s),n.slice(Math.max(0,l),Math.min(n.length,c))}function Ay(t,e){return typeof t=="function"?`fn:${e}`:Array.isArray(t)?t.map(n=>n instanceof Date?+n:String(n)).join(","):""}function Ey(t,e){var n,r,i;const{config:o,state:s}=t,c=(((r=(n=cr(t)).domain)==null?void 0:r.call(n))||[]).map(f=>f instanceof Date?+f:String(f)).join(","),u=o.axis_rotated?s.height:s.width;return[e?1:0,s.dataGeneration,c,u,o.axis_x_tick_fit?1:0,o.axis_x_tick_count||"",o.axis_x_tick_culling,o.axis_x_tick_culling_max||"",o.axis_x_tick_culling_reverse?1:0,((i=o.axis_x_categories)==null?void 0:i.length)||0,Ay(o.axis_x_tick_values,s.redrawGeneration)].join("|")}function wl(t,e,n,r=!1){var i;return(i=t.axis)!=null&&i.generateTickValues?t.axis.generateTickValues(e,n,r):e}function Cy(t,e){const[n,r]=t,i=[];if(!e||!Number.isFinite(e))return i;for(let o=Math.round(n);o<=r;o+=e)i.push(o);return i}function Ko(t,e=!0){var n,r,i,o,s,l,c;const{axis:u,config:f}=t,d=cr(t),h=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),m=t.state._canvasXTickValuesCache||(t.state._canvasXTickValuesCache=new Map),A=Ey(t,e),I=m.get(A);if(I)return I;const C=N=>(m.set(A,N),N);if(!(h!=null&&h.length))return C([]);const P=Yo(f.axis_x_tick_values,t.api);if(P){const N=Rl(t,P);return C(e?Xf(t,N):N)}if(f.axis_x_tick_fit&&(h!=null&&h.length)&&t.mapTargetsToUniqueXs){const N=by(t,h),B=Sy(t,N),W=wl(t,B,f.axis_x_tick_count,(r=u==null?void 0:u.isTimeSeries)==null?void 0:r.call(u));return C(e?Xf(t,W,!0):W)}if(Ol(t)&&!((i=u==null?void 0:u.isCategorized)!=null&&i.call(u))){const N=((s=(o=t.zoom)==null?void 0:o.getDomain)==null?void 0:s.call(o))||d.domain(),B=my(Oa(d,f.axis_x_tick_count||hn),N);return C(e?zi(B,Ml(t)):B)}if((l=u==null?void 0:u.isCategorized)!=null&&l.call(u)&&((c=f.axis_x_categories)!=null&&c.length)){const N=f.axis_x_categories.map((B,W)=>W);return C(e?zi(N,Ml(t)):N)}const z=Oa(d,f.axis_x_tick_count||hn);return C(e?zi(z,Ml(t)):z)}function Iy(t){const{config:e,state:{height2:n,width2:r}}=t,i=e.axis_rotated?n:r;if(e.axis_x_tick_count)return e.axis_x_tick_count;if(e.axis_x_tick_culling!==!1)return Math.min(e.axis_x_tick_culling_max||hn,Math.max(2,Math.floor(i/70)))}function Ry(t){var e,n,r,i;const{axis:o,config:s,scale:l}=t,c=l.subX,u=((e=t.getTargetsToShow)==null?void 0:e.call(t))||t.filterTargetsToShow(),f=Iy(t),d=A=>zi(A,f);if(!c||!(u!=null&&u.length))return[];const h=Yo(s.axis_x_tick_values,t.api);if(h)return d(Rl(t,h));if(s.axis_x_tick_fit&&t.mapTargetsToUniqueXs){const A=wl(t,t.mapTargetsToUniqueXs(u),s.axis_x_tick_count,(n=o==null?void 0:o.isTimeSeries)==null?void 0:n.call(o));return d(A)}if((r=o==null?void 0:o.isCategorized)!=null&&r.call(o)&&((i=s.axis_x_categories)!=null&&i.length))return d(s.axis_x_categories.map((A,I)=>I));const m=Oa(c,s.axis_x_tick_count||hn);return d(m)}function Oy(t){var e,n;const r=cr(t),i=((e=r.orgDomain)==null?void 0:e.call(r))||((n=r.domain)==null?void 0:n.call(r));if(!(i!=null&&i.length))return[];const o=+i[0],s=+i[i.length-1];if(!Number.isFinite(o)||!Number.isFinite(s))return[];const l=Math.ceil(Math.min(o,s)),c=Math.floor(Math.max(o,s)),u=Array.from({length:Math.max(0,c-l+1)},(f,d)=>l+d);return t.config.axis_x_tick_outer?u.slice(1,-1):u}function Pl(t,e,n=cr(t)){var r,i,o,s,l;const c=n,u=ua(t,e);if((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)){const f=(o=c.orgScale)==null?void 0:o.call(c);if(f)return f(u);const d=((l=(s=t.axis.x)==null?void 0:s.tickOffset)==null?void 0:l.call(s))||(c(1)-c(0))/2;return c(u)-d}return c(u)}function wy(t,e,n){if(e.length<2)return!1;const r=Math.max(1,n)/2,i=e.map(s=>Pl(t,s)).filter(Number.isFinite).sort((s,l)=>s-l);if(i.length<2)return!1;let o=i[0]+r;for(let s=1;s<i.length;s++){const l=i[s]-r,c=i[s]+r;if(l<=o+Ua)return!0;o=Math.max(o,c)}return!1}function kf(t,e){const n=new Set;return e.filter(r=>{const i=Pl(t,r),o=Math.round(i);return!Number.isFinite(i)||n.has(o)?!1:(n.add(o),!0)})}function Py(t,e,n=1){var r;const{axis:i,config:o}=t;if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const l=Oy(t);return kf(t,l)}if(o.axis_x_tick_culling===!1||o.axis_x_tick_culling_lines===!1)return e;const s=Ko(t,!1);return wy(t,s,n)?e:kf(t,s)}function Zo(t,e="y",n,r=!0){var i,o,s;const{axis:l,config:c,scale:u}=t,f=`axis_${e}`,d=u[e],h=Yo(c[`${f}_tick_values`],t.api),m=C=>r?Fy(t,e,C):C;if(h)return m($f(t,h,e));const A=Cy(d.domain(),c[`${f}_tick_stepSize`]);if(A.length)return m(A);const I=n!=null?n:c[`${f}_tick_count`];if((i=l==null?void 0:l.isTimeSeries)!=null&&i.call(l,e)&&c[`${f}_tick_time_value`])return m(Oa(d,c[`${f}_tick_time_value`]));if((o=l==null?void 0:l.isLog)!=null&&o.call(l,e))return m(Bf(d,I));if(I){const C=d.domain();return m(wl(t,C,C.every(P=>P===0)?1:I,(s=l==null?void 0:l.isTimeSeries)==null?void 0:s.call(l,e)))}return m(Oa(d,hn))}function My(t,e,n){const r=e==="x"?cr(t):t.scale[e],i=r!=null&&r.copy?r.copy():r;return n.domain&&(i!=null&&i.domain)&&i.domain(n.domain),i}function Ly(t,e,n,r){var i,o,s;const l=r.tick||{},c=Yo(l.values,t.api);return c?e==="x"?Rl(t,c):$f(t,c,e):e!=="x"&&((o=(i=t.axis)==null?void 0:i.isLog)!=null&&o.call(i,e))?Bf(n,l.count):Oa(n,(s=l.count)!=null?s:hn)}function Dy(t,e){var n;const r=(n=e.tick)==null?void 0:n.format;return typeof r=="function"?r.bind(t.api):(i=>i)}function zi(t,e){const n=t.length-1;if(e&&n>e){const r=t.length-1;return e<=1?[t[0]]:Array.from({length:e},(i,o)=>t[Math.round(o*r/(e-1))])}return t}function Fy(t,e,n){const{config:r}=t,i=`axis_${e}_tick_culling`;if(!r[i])return n;const o=n.slice().sort((f,d)=>{const h=+f,m=+d,A=Number.isFinite(h)&&Number.isFinite(m)?h-m:String(f).localeCompare(String(d));return r[`${i}_reverse`]?-A:A}),s=o.length,l=r[`${i}_max`]||hn;let c=0;for(let f=1;f<s;f++)if(s/f<l){c=f;break}if(!c)return n;const u=new Set(o.filter((f,d)=>d%c===0));return n.filter(f=>u.has(f))}function Xf(t,e,n=!1){const{config:r}=t;if(r.axis_x_tick_culling===!1)return e;const i=r.axis_x_tick_culling_max||hn,o=n?e:e.slice().sort((u,f)=>{const d=+u,h=+f;return Number.isFinite(d)&&Number.isFinite(h)?r.axis_x_tick_culling_reverse?h-d:d-h:r.axis_x_tick_culling_reverse?String(f).localeCompare(String(u)):String(u).localeCompare(String(f))}),s=o.length;let l=0;for(let u=1;u<s;u++)if(s/u<i){l=u;break}if(!l)return e;if(n)return e.filter((u,f)=>r.axis_x_tick_culling_reverse?(s-1-f)%l===0:f%l===0);const c=new Set(o.filter((u,f)=>f%l===0));return e.filter(u=>c.has(u))}function Ml(t){const{config:e,state:{height:n,width:r}}=t,i=e.axis_rotated?n:r;if(e.axis_x_tick_count)return e.axis_x_tick_count;if(e.axis_x_tick_culling!==!1)return Math.min(e.axis_x_tick_culling_max||hn,Math.max(2,Math.floor(i/70)))}function Ny(t){var e,n;const{axis:r,config:i}=t,o=(n=(e=r==null?void 0:r.y)==null?void 0:e.getGeneratedTicks)==null?void 0:n.call(e,i.grid_y_ticks);return o!=null&&o.length?o:i.grid_y_ticks?zi(Zo(t,"y",void 0,!1),i.grid_y_ticks):Zo(t,"y",void 0,!1)}var $y=Object.defineProperty,By=(t,e,n)=>e in t?$y(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,zy=(t,e,n)=>By(t,typeof e!="symbol"?e+"":e,n);class Gf{constructor(e){zy(this,"ctx",e)}get context(){return this.ctx}withContext(e,n){const r=this.ctx;this.ctx=e;try{n()}finally{this.ctx=r}}withState(e){const{ctx:n}=this;n.save();try{e(n)}finally{n.restore()}}withTranslation(e,n,r){this.withState(i=>{i.translate(e,n),r(i)})}clipRect(e,n){this.withState(r=>{r.beginPath(),r.rect(e.x,e.y,e.w,e.h),r.clip(),n(r)})}measureText(e){return this.ctx.measureText(e)}traceLine(e,n,r,i){const{ctx:o}=this;o.moveTo(e,n),o.lineTo(r,i)}traceCrispLine(e,n,r,i,o){this.traceLine(this.crisp(e,o),this.crisp(n,o),this.crisp(r,o),this.crisp(i,o))}traceCircle(e,n,r){this.ctx.moveTo(e+r,n),this.ctx.arc(e,n,r,0,Math.PI*2)}strokePath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.stroke()})}fillPath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.fill()})}fillRect(e,n){this.withStyle(n,r=>{r.fillRect(e.x,e.y,e.w,e.h)})}fillRoundRect(e,n=0,r){const i=this.normalizeRect(e),o=this.getRectRadii(i,n);if(!o.tl&&!o.tr&&!o.br&&!o.bl){this.fillRect(i,r);return}this.fillPath(s=>{this.traceRoundRect(s,i,o)},r)}strokeRoundRect(e,n=0,r){const i=this.normalizeRect(e),o=this.getRectRadii(i,n);if(!o.tl&&!o.tr&&!o.br&&!o.bl){this.strokeRect(i,r);return}this.strokePath(s=>{this.traceRoundRect(s,i,o)},r)}strokeRect(e,n){this.withStyle(n,r=>{r.strokeRect(e.x,e.y,e.w,e.h)})}text(e,n,r,i){const o=(l,c,u)=>{(i==null?void 0:i.maxWidth)===void 0?l.fillText(e,c,u):l.fillText(e,c,u,i.maxWidth)},s=l=>{i!=null&&i.angle?(l.translate(n,r),l.rotate(i.angle*Math.PI/180),o(l,0,0)):o(l,n,r)};i!=null&&i.angle?this.withState(l=>{this.applyStyle(i),s(l)}):this.withStyle(i,s)}textLines(e,n,r,i){this.withState(o=>{const s=e.split(`
|
|
32
|
-
`),l=
|
|
24
|
+
*/(function(bo,rr){if(typeof exports=="object"&&typeof module=="object")module.exports=rr();else if(typeof define=="function"&&define.amd)define([],rr);else{var So=rr();for(var T in So)(typeof exports=="object"?exports:bo)[T]=So[T]}})(this,function(){return(function(){"use strict";var wu=[(function(T,P,a){a(1),a(100),a(101),a(102),a(103),a(104),a(105),a(106),a(107),a(108),a(109),a(110),a(111),a(112),a(113),a(114),a(115),a(116),a(129),a(130),a(132),a(142),a(143),a(144),a(146),a(150),a(153),a(155),a(157),a(158),a(159),a(160),a(162),a(163),a(165),a(166),a(168),a(172),a(173),a(174),a(175),a(180),a(181),a(183),a(184),a(185),a(186),a(190),a(191),a(192),a(193),a(194),a(199),a(201),a(202),a(203),a(206),a(207),a(208),a(209),a(210),a(211),a(222),a(224),a(225),a(227),a(228),a(231),a(234),a(240),a(241),a(242),a(243),a(244),a(245),a(249),a(250),a(252),a(253),a(255),a(256),a(258),a(259),a(260),a(261),a(262),a(265),a(266),a(272),a(273),a(274),a(275),a(277),a(278),a(279),a(280),a(281),a(282),a(283),a(284),a(285),a(286),a(94),a(288),a(289),a(296),a(298),a(299),a(300),a(302),a(303),a(304),a(305),a(306),a(308),a(309),a(310),a(311),a(312),a(313),a(315),a(316),a(317),a(318),a(319),a(320),a(321),a(322),a(323),a(327),a(328),a(330),a(332),a(333),a(334),a(335),a(336),a(338),a(340),a(341),a(342),a(343),a(345),a(346),a(348),a(349),a(350),a(351),a(353),a(354),a(355),a(356),a(357),a(358),a(359),a(360),a(361),a(363),a(364),a(365),a(366),a(367),a(368),a(369),a(370),a(371),a(372),a(373),a(375),a(376),a(377),a(378),a(402),a(403),a(404),a(405),a(406),a(407),a(414),a(415),a(416),a(417),a(418),a(419),a(420),a(422),a(423),a(424),a(425),a(426),a(427),a(428),a(429),a(430),a(431),a(439),a(441),a(442),a(444),a(445),a(446),a(447),a(448),a(450),a(460),a(462),a(464),a(466),a(468),a(471),a(473),a(474),a(476),a(479),a(480),a(481),a(482),a(483),a(487),a(488),a(490),a(491),a(492),a(493),a(495),a(496),a(497),a(498),a(499),a(500),a(501),a(503),a(506),a(509),a(512),a(513),a(514),a(515),a(516),a(517),a(518),a(519),a(520),a(521),a(522),a(523),a(524),a(532),a(533),a(534),a(535),a(536),a(537),a(538),a(539),a(540),a(541),a(542),a(543),a(544),a(546),a(547),a(548),a(549),a(550),a(551),a(552),a(553),a(554),a(555),a(556),a(557),a(558),a(559),a(560),a(561),a(562),a(563),a(564),a(565),a(566),a(567),a(568),a(569),a(570),a(571),a(572),a(577),a(579),a(581),a(582),a(583),a(584),a(585),a(588),a(590),a(593),a(595),a(596),a(597),a(600),a(601),a(603),a(604),a(605),a(609),a(610),a(611),a(612),a(615),a(620),a(621),a(622),a(623),a(624),a(625),a(626),a(80)}),(function(T,P,a){a(2),a(91),a(93),a(94),a(99)}),(function(T,P,a){var g=a(3),v=a(4),p=a(8),x=a(14),y=a(36),b=a(6),A=a(26),I=a(7),R=a(38),O=a(24),M=a(46),D=a(12),L=a(18),B=a(68),F=a(11),k=a(71),W=a(73),U=a(57),X=a(75),j=a(66),H=a(5),Y=a(44),Z=a(72),_=a(10),K=a(47),tt=a(77),nt=a(34),at=a(53),it=a(54),ot=a(40),ut=a(33),ht=a(78),gt=a(79),yt=a(81),Et=a(82),bt=a(51),Ft=a(83).forEach,Lt=at("hidden"),Pt="Symbol",mt="prototype",xt=bt.set,wt=bt.getterFor(Pt),Bt=Object[mt],Jt=v.Symbol,Ot=Jt&&Jt[mt],jt=v.RangeError,ie=v.TypeError,me=v.QObject,se=H.f,he=Y.f,Oe=X.f,Me=_.f,Re=x([].push),ge=nt("symbols"),Te=nt("op-symbols"),Ve=nt("wks"),Ht=!me||!me[mt]||!me[mt].findChild,ne=function(Xt,Mt,$t){var _t=se(Bt,Mt);return _t&&delete Bt[Mt],he(Xt,Mt,$t),_t&&Xt!==Bt&&he(Bt,Mt,_t),Xt},ae=b&&I(function(){return k(he({},"a",{get:function(){return he(this,"a",{value:7}).a}})).a!==7})?ne:he,rn=function(Xt,Mt){var $t=ge[Xt]=k(Ot);return xt($t,{type:Pt,tag:Xt,description:Mt}),b||($t.description=Mt),$t},Yt=function(Mt,$t,_t){Mt===Bt&&Yt(Te,$t,_t),M(Mt);var Nt=L($t);return M(_t),R(ge,Nt)?(("enumerable"in _t?!_t.enumerable:!R(Mt,Nt)||R(Mt,Lt)&&Mt[Lt][Nt])?(R(Mt,Lt)||he(Mt,Lt,F(1,k(null))),Mt[Lt][Nt]=!0):(R(Mt,Lt)&&Mt[Lt][Nt]&&(Mt[Lt][Nt]=!1),_t=k(_t,{enumerable:F(0,!1)})),ae(Mt,Nt,_t)):he(Mt,Nt,_t)},ee=function(Mt,$t){M(Mt);var _t=D($t),Nt=W(_t).concat(It(_t));return Ft(Nt,function(Se){(!b||p(ce,_t,Se))&&Yt(Mt,Se,_t[Se])}),Mt},pe=function(Mt,$t){return $t===void 0?k(Mt):ee(k(Mt),$t)},ce=function(Mt){var $t=L(Mt),_t=p(Me,this,$t);return this===Bt&&R(ge,$t)&&!R(Te,$t)?!1:_t||!R(this,$t)||!R(ge,$t)||R(this,Lt)&&this[Lt][$t]?_t:!0},Pe=function(Mt,$t){var _t=D(Mt),Nt=L($t);if(!(_t===Bt&&R(ge,Nt)&&!R(Te,Nt))){var Se=se(_t,Nt);return Se&&R(ge,Nt)&&!(R(_t,Lt)&&_t[Lt][Nt])&&(Se.enumerable=!0),Se}},ln=function(Mt){var $t=Oe(D(Mt)),_t=[];return Ft($t,function(Nt){!R(ge,Nt)&&!R(it,Nt)&&Re(_t,Nt)}),_t},It=function(Xt){var Mt=Xt===Bt,$t=Oe(Mt?Te:D(Xt)),_t=[];return Ft($t,function(Nt){R(ge,Nt)&&(!Mt||R(Bt,Nt))&&Re(_t,ge[Nt])}),_t};A||(Jt=function(){if(O(Ot,this))throw new ie("Symbol is not a constructor");var Mt=!arguments.length||arguments[0]===void 0?void 0:B(arguments[0]),$t=ot(Mt),_t=function(Nt){var Se=this===void 0?v:this;Se===Bt&&p(_t,Te,Nt),R(Se,Lt)&&R(Se[Lt],$t)&&(Se[Lt][$t]=!1);var He=F(1,Nt);try{ae(Se,$t,He)}catch(Wt){if(!(Wt instanceof jt))throw Wt;ne(Se,$t,He)}};return b&&Ht&&ae(Bt,$t,{configurable:!0,set:_t}),rn($t,Mt)},Ot=Jt[mt],K(Ot,"toString",function(){return wt(this).tag}),K(Jt,"withoutSetter",function(Xt){return rn(ot(Xt),Xt)}),_.f=ce,Y.f=Yt,Z.f=ee,H.f=Pe,U.f=X.f=ln,j.f=It,ht.f=function(Xt){return rn(ut(Xt),Xt)},b&&(tt(Ot,"description",{configurable:!0,get:function(){return wt(this).description}}),y||K(Bt,"propertyIsEnumerable",ce,{unsafe:!0}))),g({global:!0,constructor:!0,wrap:!0,forced:!A,sham:!A},{Symbol:Jt}),Ft(W(Ve),function(Xt){gt(Xt)}),g({target:Pt,stat:!0,forced:!A},{useSetter:function(){Ht=!0},useSimple:function(){Ht=!1}}),g({target:"Object",stat:!0,forced:!A,sham:!b},{create:pe,defineProperty:Yt,defineProperties:ee,getOwnPropertyDescriptor:Pe}),g({target:"Object",stat:!0,forced:!A},{getOwnPropertyNames:ln}),yt(),Et(Jt,Pt),it[Lt]=!0}),(function(T,P,a){var g=a(4),v=a(5).f,p=a(43),x=a(47),y=a(37),b=a(55),A=a(67);T.exports=function(I,R){var O=I.target,M=I.global,D=I.stat,L,B,F,k,W,U;if(M?B=g:D?B=g[O]||y(O,{}):B=g[O]&&g[O].prototype,B)for(F in R){if(W=R[F],I.dontCallGetSet?(U=v(B,F),k=U&&U.value):k=B[F],L=A(M?F:O+(D?".":"#")+F,I.forced),!L&&k!==void 0){if(typeof W==typeof k)continue;b(W,k)}(I.sham||k&&k.sham)&&p(W,"sham",!0),x(B,F,W,I)}}}),(function(T){var P=function(a){return a&&a.Math===Math&&a};T.exports=P(typeof globalThis=="object"&&globalThis)||P(typeof window=="object"&&window)||P(typeof self=="object"&&self)||P(typeof global=="object"&&global)||P(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()}),(function(T,P,a){var g=a(6),v=a(8),p=a(10),x=a(11),y=a(12),b=a(18),A=a(38),I=a(41),R=Object.getOwnPropertyDescriptor;P.f=g?R:function(M,D){if(M=y(M),D=b(D),I)try{return R(M,D)}catch(L){}if(A(M,D))return x(!v(p.f,M,D),M[D])}}),(function(T,P,a){var g=a(7);T.exports=!g(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),(function(T){T.exports=function(P){try{return!!P()}catch(a){return!0}}}),(function(T,P,a){var g=a(9),v=Function.prototype.call;T.exports=g?v.bind(v):function(){return v.apply(v,arguments)}}),(function(T,P,a){var g=a(7);T.exports=!g(function(){var v=function(){}.bind();return typeof v!="function"||v.hasOwnProperty("prototype")})}),(function(T,P){var a={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,v=g&&!a.call({1:2},1);P.f=v?function(x){var y=g(this,x);return!!y&&y.enumerable}:a}),(function(T){T.exports=function(P,a){return{enumerable:!(P&1),configurable:!(P&2),writable:!(P&4),value:a}}}),(function(T,P,a){var g=a(13),v=a(16);T.exports=function(p){return g(v(p))}}),(function(T,P,a){var g=a(14),v=a(7),p=a(15),x=Object,y=g("".split);T.exports=v(function(){return!x("z").propertyIsEnumerable(0)})?function(b){return p(b)==="String"?y(b,""):x(b)}:x}),(function(T,P,a){var g=a(9),v=Function.prototype,p=v.call,x=g&&v.bind.bind(p,p);T.exports=g?x:function(y){return function(){return p.apply(y,arguments)}}}),(function(T,P,a){var g=a(14),v=g({}.toString),p=g("".slice);T.exports=function(x){return p(v(x),8,-1)}}),(function(T,P,a){var g=a(17),v=TypeError;T.exports=function(p){if(g(p))throw new v("Can't call method on "+p);return p}}),(function(T){T.exports=function(P){return P==null}}),(function(T,P,a){var g=a(19),v=a(22);T.exports=function(p){var x=g(p,"string");return v(x)?x:x+""}}),(function(T,P,a){var g=a(8),v=a(20),p=a(22),x=a(29),y=a(32),b=a(33),A=TypeError,I=b("toPrimitive");T.exports=function(R,O){if(!v(R)||p(R))return R;var M=x(R,I),D;if(M){if(O===void 0&&(O="default"),D=g(M,R,O),!v(D)||p(D))return D;throw new A("Can't convert object to primitive value")}return O===void 0&&(O="number"),y(R,O)}}),(function(T,P,a){var g=a(21);T.exports=function(v){return typeof v=="object"?v!==null:g(v)}}),(function(T){var P=typeof document=="object"&&document.all;T.exports=typeof P=="undefined"&&P!==void 0?function(a){return typeof a=="function"||a===P}:function(a){return typeof a=="function"}}),(function(T,P,a){var g=a(23),v=a(21),p=a(24),x=a(25),y=Object;T.exports=x?function(b){return typeof b=="symbol"}:function(b){var A=g("Symbol");return v(A)&&p(A.prototype,y(b))}}),(function(T,P,a){var g=a(4),v=a(21),p=function(x){return v(x)?x:void 0};T.exports=function(x,y){return arguments.length<2?p(g[x]):g[x]&&g[x][y]}}),(function(T,P,a){var g=a(14);T.exports=g({}.isPrototypeOf)}),(function(T,P,a){var g=a(26);T.exports=g&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),(function(T,P,a){var g=a(27),v=a(7),p=a(4),x=p.String;T.exports=!!Object.getOwnPropertySymbols&&!v(function(){var y=Symbol("symbol detection");return!x(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&g&&g<41})}),(function(T,P,a){var g=a(4),v=a(28),p=g.process,x=g.Deno,y=p&&p.versions||x&&x.version,b=y&&y.v8,A,I;b&&(A=b.split("."),I=A[0]>0&&A[0]<4?1:+(A[0]+A[1])),!I&&v&&(A=v.match(/Edge\/(\d+)/),(!A||A[1]>=74)&&(A=v.match(/Chrome\/(\d+)/),A&&(I=+A[1]))),T.exports=I}),(function(T,P,a){var g=a(4),v=g.navigator,p=v&&v.userAgent;T.exports=p?String(p):""}),(function(T,P,a){var g=a(30),v=a(17);T.exports=function(p,x){var y=p[x];return v(y)?void 0:g(y)}}),(function(T,P,a){var g=a(21),v=a(31),p=TypeError;T.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not a function")}}),(function(T){var P=String;T.exports=function(a){try{return P(a)}catch(g){return"Object"}}}),(function(T,P,a){var g=a(8),v=a(21),p=a(20),x=TypeError;T.exports=function(y,b){var A,I;if(b==="string"&&v(A=y.toString)&&!p(I=g(A,y))||v(A=y.valueOf)&&!p(I=g(A,y))||b!=="string"&&v(A=y.toString)&&!p(I=g(A,y)))return I;throw new x("Can't convert object to primitive value")}}),(function(T,P,a){var g=a(4),v=a(34),p=a(38),x=a(40),y=a(26),b=a(25),A=g.Symbol,I=v("wks"),R=b?A.for||A:A&&A.withoutSetter||x;T.exports=function(O){return p(I,O)||(I[O]=y&&p(A,O)?A[O]:R("Symbol."+O)),I[O]}}),(function(T,P,a){var g=a(35);T.exports=function(v,p){return g[v]||(g[v]=p||{})}}),(function(T,P,a){var g=a(36),v=a(4),p=a(37),x="__core-js_shared__",y=T.exports=v[x]||p(x,{});(y.versions||(y.versions=[])).push({version:"3.49.0",mode:g?"pure":"global",copyright:"\xA9 2013\u20132025 Denis Pushkarev (zloirock.ru), 2025\u20132026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE",source:"https://github.com/zloirock/core-js"})}),(function(T){T.exports=!1}),(function(T,P,a){var g=a(4),v=Object.defineProperty;T.exports=function(p,x){try{v(g,p,{value:x,configurable:!0,writable:!0})}catch(y){g[p]=x}return x}}),(function(T,P,a){var g=a(14),v=a(39),p=g({}.hasOwnProperty);T.exports=Object.hasOwn||function(y,b){return p(v(y),b)}}),(function(T,P,a){var g=a(16),v=Object;T.exports=function(p){return v(g(p))}}),(function(T,P,a){var g=a(14),v=0,p=Math.random(),x=g(1.1.toString);T.exports=function(y){return"Symbol("+(y===void 0?"":y)+")_"+x(++v+p,36)}}),(function(T,P,a){var g=a(6),v=a(7),p=a(42);T.exports=!g&&!v(function(){return Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a!==7})}),(function(T,P,a){var g=a(4),v=a(20),p=g.document,x=v(p)&&v(p.createElement);T.exports=function(y){return x?p.createElement(y):{}}}),(function(T,P,a){var g=a(6),v=a(44),p=a(11);T.exports=g?function(x,y,b){return v.f(x,y,p(1,b))}:function(x,y,b){return x[y]=b,x}}),(function(T,P,a){var g=a(6),v=a(41),p=a(45),x=a(46),y=a(18),b=TypeError,A=Object.defineProperty,I=Object.getOwnPropertyDescriptor,R="enumerable",O="configurable",M="writable";P.f=g?p?function(L,B,F){if(x(L),B=y(B),x(F),typeof L=="function"&&B==="prototype"&&"value"in F&&M in F&&!F[M]){var k=I(L,B);k&&k[M]&&(L[B]=F.value,F={configurable:O in F?F[O]:k[O],enumerable:R in F?F[R]:k[R],writable:!1})}return A(L,B,F)}:A:function(L,B,F){if(x(L),B=y(B),x(F),v)try{return A(L,B,F)}catch(k){}if("get"in F||"set"in F)throw new b("Accessors not supported");return"value"in F&&(L[B]=F.value),L}}),(function(T,P,a){var g=a(6),v=a(7);T.exports=g&&v(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}),(function(T,P,a){var g=a(20),v=String,p=TypeError;T.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not an object")}}),(function(T,P,a){var g=a(21),v=a(44),p=a(48),x=a(37);T.exports=function(y,b,A,I){I||(I={});var R=I.enumerable,O=I.name!==void 0?I.name:b;if(g(A)&&p(A,O,I),I.global)R?y[b]=A:x(b,A);else{try{I.unsafe?y[b]&&(R=!0):delete y[b]}catch(M){}R?y[b]=A:v.f(y,b,{value:A,enumerable:!1,configurable:!I.nonConfigurable,writable:!I.nonWritable})}return y}}),(function(T,P,a){var g=a(14),v=a(7),p=a(21),x=a(38),y=a(6),b=a(49).CONFIGURABLE,A=a(50),I=a(51),R=I.enforce,O=I.get,M=String,D=Object.defineProperty,L=g("".slice),B=g("".replace),F=g([].join),k=y&&!v(function(){return D(function(){},"length",{value:8}).length!==8}),W=String(String).split("String"),U=T.exports=function(X,j,H){L(M(j),0,7)==="Symbol("&&(j="["+B(M(j),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),H&&H.getter&&(j="get "+j),H&&H.setter&&(j="set "+j),(!x(X,"name")||b&&X.name!==j)&&(y?D(X,"name",{value:j,configurable:!0}):X.name=j),k&&H&&x(H,"arity")&&X.length!==H.arity&&D(X,"length",{value:H.arity});try{H&&x(H,"constructor")&&H.constructor?y&&D(X,"prototype",{writable:!1}):X.prototype&&(X.prototype=void 0)}catch(Z){}var Y=R(X);return x(Y,"source")||(Y.source=F(W,typeof j=="string"?j:"")),X};Function.prototype.toString=U(function(){return p(this)&&O(this).source||A(this)},"toString")}),(function(T,P,a){var g=a(6),v=a(38),p=Function.prototype,x=g&&Object.getOwnPropertyDescriptor,y=v(p,"name"),b=y&&function(){}.name==="something",A=y&&(!g||g&&x(p,"name").configurable);T.exports={EXISTS:y,PROPER:b,CONFIGURABLE:A}}),(function(T,P,a){var g=a(14),v=a(21),p=a(35),x=g(Function.toString);v(p.inspectSource)||(p.inspectSource=function(y){return x(y)}),T.exports=p.inspectSource}),(function(T,P,a){var g=a(52),v=a(4),p=a(20),x=a(43),y=a(38),b=a(35),A=a(53),I=a(54),R="Object already initialized",O=v.TypeError,M=v.WeakMap,D,L,B,F=function(X){return B(X)?L(X):D(X,{})},k=function(X){return function(j){var H;if(!p(j)||(H=L(j)).type!==X)throw new O("Incompatible receiver, "+X+" required");return H}};if(g||b.state){var W=b.state||(b.state=new M);W.get=W.get,W.has=W.has,W.set=W.set,D=function(X,j){if(W.has(X))throw new O(R);return j.facade=X,W.set(X,j),j},L=function(X){return W.get(X)||{}},B=function(X){return W.has(X)}}else{var U=A("state");I[U]=!0,D=function(X,j){if(y(X,U))throw new O(R);return j.facade=X,x(X,U,j),j},L=function(X){return y(X,U)?X[U]:{}},B=function(X){return y(X,U)}}T.exports={set:D,get:L,has:B,enforce:F,getterFor:k}}),(function(T,P,a){var g=a(4),v=a(21),p=g.WeakMap;T.exports=v(p)&&/native code/.test(String(p))}),(function(T,P,a){var g=a(34),v=a(40),p=g("keys");T.exports=function(x){return p[x]||(p[x]=v(x))}}),(function(T){T.exports={}}),(function(T,P,a){var g=a(38),v=a(56),p=a(5),x=a(44);T.exports=function(y,b,A){for(var I=v(b),R=x.f,O=p.f,M=0;M<I.length;M++){var D=I[M];!g(y,D)&&!(A&&g(A,D))&&R(y,D,O(b,D))}}}),(function(T,P,a){var g=a(23),v=a(14),p=a(57),x=a(66),y=a(46),b=v([].concat);T.exports=g("Reflect","ownKeys")||function(I){var R=p.f(y(I)),O=x.f;return O?b(R,O(I)):R}}),(function(T,P,a){var g=a(58),v=a(65),p=v.concat("length","prototype");P.f=Object.getOwnPropertyNames||function(y){return g(y,p)}}),(function(T,P,a){var g=a(14),v=a(38),p=a(12),x=a(59).indexOf,y=a(54),b=g([].push);T.exports=function(A,I){var R=p(A),O=0,M=[],D;for(D in R)!v(y,D)&&v(R,D)&&b(M,D);for(;I.length>O;)v(R,D=I[O++])&&(~x(M,D)||b(M,D));return M}}),(function(T,P,a){var g=a(12),v=a(60),p=a(63),x=function(y){return function(b,A,I){var R=g(b),O=p(R);if(O===0)return!y&&-1;var M=v(I,O),D;if(y&&A!==A){for(;O>M;)if(D=R[M++],D!==D)return!0}else for(;O>M;M++)if((y||M in R)&&R[M]===A)return y||M||0;return!y&&-1}};T.exports={includes:x(!0),indexOf:x(!1)}}),(function(T,P,a){var g=a(61),v=Math.max,p=Math.min;T.exports=function(x,y){var b=g(x);return b<0?v(b+y,0):p(b,y)}}),(function(T,P,a){var g=a(62);T.exports=function(v){var p=+v;return p!==p||p===0?0:g(p)}}),(function(T){var P=Math.ceil,a=Math.floor;T.exports=Math.trunc||function(v){var p=+v;return(p>0?a:P)(p)}}),(function(T,P,a){var g=a(64);T.exports=function(v){return g(v.length)}}),(function(T,P,a){var g=a(61),v=Math.min;T.exports=function(p){var x=g(p);return x>0?v(x,9007199254740991):0}}),(function(T){T.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),(function(T,P){P.f=Object.getOwnPropertySymbols}),(function(T,P,a){var g=a(7),v=a(21),p=/#|\.prototype\./,x=function(R,O){var M=b[y(R)];return M===I?!0:M===A?!1:v(O)?g(O):!!O},y=x.normalize=function(R){return String(R).replace(p,".").toLowerCase()},b=x.data={},A=x.NATIVE="N",I=x.POLYFILL="P";T.exports=x}),(function(T,P,a){var g=a(69),v=String;T.exports=function(p){if(g(p)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return v(p)}}),(function(T,P,a){var g=a(70),v=a(21),p=a(15),x=a(33),y=x("toStringTag"),b=Object,A=p((function(){return arguments})())==="Arguments",I=function(R,O){try{return R[O]}catch(M){}};T.exports=g?p:function(R){var O,M,D;return R===void 0?"Undefined":R===null?"Null":typeof(M=I(O=b(R),y))=="string"?M:A?p(O):(D=p(O))==="Object"&&v(O.callee)?"Arguments":D}}),(function(T,P,a){var g=a(33),v=g("toStringTag"),p={};p[v]="z",T.exports=String(p)==="[object z]"}),(function(T,P,a){var g=a(46),v=a(72),p=a(65),x=a(54),y=a(74),b=a(42),A=a(53),I=">",R="<",O="prototype",M="script",D=A("IE_PROTO"),L=function(){},B=function(X){return R+M+I+X+R+"/"+M+I},F=function(X){X.write(B("")),X.close();var j=X.parentWindow.Object;return X=null,j},k=function(){var X=b("iframe"),j="java"+M+":",H;return X.style.display="none",y.appendChild(X),X.src=String(j),H=X.contentWindow.document,H.open(),H.write(B("document.F=Object")),H.close(),H.F},W,U=function(){try{W=new ActiveXObject("htmlfile")}catch(j){}U=typeof document!="undefined"?document.domain&&W?F(W):k():F(W);for(var X=p.length;X--;)delete U[O][p[X]];return U()};x[D]=!0,T.exports=Object.create||function(j,H){var Y;return j!==null?(L[O]=g(j),Y=new L,L[O]=null,Y[D]=j):Y=U(),H===void 0?Y:v.f(Y,H)}}),(function(T,P,a){var g=a(6),v=a(45),p=a(44),x=a(46),y=a(12),b=a(73);P.f=g&&!v?Object.defineProperties:function(I,R){x(I);for(var O=y(R),M=b(R),D=M.length,L=0,B;D>L;)p.f(I,B=M[L++],O[B]);return I}}),(function(T,P,a){var g=a(58),v=a(65);T.exports=Object.keys||function(x){return g(x,v)}}),(function(T,P,a){var g=a(23);T.exports=g("document","documentElement")}),(function(T,P,a){var g=a(15),v=a(12),p=a(57).f,x=a(76),y=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],b=function(A){try{return p(A)}catch(I){return x(y)}};T.exports.f=function(I){return y&&g(I)==="Window"?b(I):p(v(I))}}),(function(T,P,a){var g=a(14);T.exports=g([].slice)}),(function(T,P,a){var g=a(48),v=a(44);T.exports=function(p,x,y){return y.get&&g(y.get,x,{getter:!0}),y.set&&g(y.set,x,{setter:!0}),v.f(p,x,y)}}),(function(T,P,a){var g=a(33);P.f=g}),(function(T,P,a){var g=a(80),v=a(38),p=a(78),x=a(44).f;T.exports=function(y){var b=g.Symbol||(g.Symbol={});v(b,y)||x(b,y,{value:p.f(y)})}}),(function(T,P,a){var g=a(4);T.exports=g}),(function(T,P,a){var g=a(8),v=a(23),p=a(33),x=a(47);T.exports=function(){var y=v("Symbol"),b=y&&y.prototype,A=b&&b.valueOf,I=p("toPrimitive");b&&!b[I]&&x(b,I,function(R){return g(A,this)},{arity:1})}}),(function(T,P,a){var g=a(44).f,v=a(38),p=a(33),x=p("toStringTag");T.exports=function(y,b,A){y&&!A&&(y=y.prototype),y&&!v(y,x)&&g(y,x,{configurable:!0,value:b})}}),(function(T,P,a){var g=a(84),v=a(13),p=a(39),x=a(63),y=a(86),b=a(90),A=function(I){var R=I===1,O=I===2,M=I===3,D=I===4,L=I===6,B=I===7,F=I===5||L;return function(k,W,U){for(var X=p(k),j=v(X),H=x(j),Y=g(W,U),Z=0,_=0,K=R?y(k,H):O||B?y(k,0):void 0,tt,nt;H>Z;Z++)if((F||Z in j)&&(tt=j[Z],nt=Y(tt,Z,X),I))if(R)b(K,Z,nt);else if(nt)switch(I){case 3:return!0;case 5:return tt;case 6:return Z;case 2:b(K,_++,tt)}else switch(I){case 4:return!1;case 7:b(K,_++,tt)}return L?-1:M||D?D:K}};T.exports={forEach:A(0),map:A(1),filter:A(2),some:A(3),every:A(4),find:A(5),findIndex:A(6),filterReject:A(7)}}),(function(T,P,a){var g=a(85),v=a(30),p=a(9),x=g(g.bind);T.exports=function(y,b){return v(y),b===void 0?y:p?x(y,b):function(){return y.apply(b,arguments)}}}),(function(T,P,a){var g=a(15),v=a(14);T.exports=function(p){if(g(p)==="Function")return v(p)}}),(function(T,P,a){var g=a(87);T.exports=function(v,p){return new(g(v))(p===0?0:p)}}),(function(T,P,a){var g=a(88),v=a(89),p=a(20),x=a(33),y=x("species"),b=Array;T.exports=function(A){var I;return g(A)&&(I=A.constructor,v(I)&&(I===b||g(I.prototype))?I=void 0:p(I)&&(I=I[y],I===null&&(I=void 0))),I===void 0?b:I}}),(function(T,P,a){var g=a(15);T.exports=Array.isArray||function(p){return g(p)==="Array"}}),(function(T,P,a){var g=a(14),v=a(7),p=a(21),x=a(69),y=a(23),b=a(50),A=function(){},I=y("Reflect","construct"),R=/^\s*(?:class|function)\b/,O=g(R.exec),M=!R.test(A),D=function(F){if(!p(F))return!1;try{return I(A,[],F),!0}catch(k){return!1}},L=function(F){if(!p(F))return!1;switch(x(F)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return M||!!O(R,b(F))}catch(k){return!0}};L.sham=!0,T.exports=!I||v(function(){var B;return D(D.call)||!D(Object)||!D(function(){B=!0})||B})?L:D}),(function(T,P,a){var g=a(6),v=a(44),p=a(11);T.exports=function(x,y,b){g?v.f(x,y,p(0,b)):x[y]=b}}),(function(T,P,a){var g=a(3),v=a(23),p=a(38),x=a(68),y=a(34),b=a(92),A=y("string-to-symbol-registry"),I=y("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!b},{for:function(R){var O=x(R);if(p(A,O))return A[O];var M=v("Symbol")(O);return A[O]=M,I[M]=O,M}})}),(function(T,P,a){var g=a(26);T.exports=g&&!!Symbol.for&&!!Symbol.keyFor}),(function(T,P,a){var g=a(3),v=a(38),p=a(22),x=a(31),y=a(34),b=a(92),A=y("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!b},{keyFor:function(R){if(!p(R))throw new TypeError(x(R)+" is not a symbol");if(v(A,R))return A[R]}})}),(function(T,P,a){var g=a(3),v=a(23),p=a(95),x=a(8),y=a(14),b=a(7),A=a(88),I=a(21),R=a(96),O=a(22),M=a(15),D=a(68),L=a(76),B=a(97),F=a(40),k=a(26),W=a(98),U=String,X=v("JSON","stringify"),j=y(/./.exec),H=y("".charAt),Y=y("".charCodeAt),Z=y("".replace),_=y("".slice),K=y([].push),tt=y(1.1.toString),nt=/[\uD800-\uDFFF]/g,at=/^[\uD800-\uDBFF]$/,it=/^[\uDC00-\uDFFF]$/,ot=F(),ut=ot.length,ht=!k||b(function(){var Ft=v("Symbol")("stringify detection");return X([Ft])!=="[null]"||X({a:Ft})!=="{}"||X(Object(Ft))!=="{}"}),gt=b(function(){return X("\uDF06\uD834")!=='"\\udf06\\ud834"'||X("\uDEAD")!=='"\\udead"'}),yt=ht?function(Ft,Lt){var Pt=L(arguments),mt=bt(Lt);if(!(!I(mt)&&(Ft===void 0||O(Ft))))return Pt[1]=function(xt,wt){if(I(mt)&&(wt=x(mt,this,U(xt),wt)),!O(wt))return wt},p(X,null,Pt)}:X,Et=function(Ft,Lt,Pt){var mt=H(Pt,Lt-1),xt=H(Pt,Lt+1);return j(at,Ft)&&!j(it,xt)||j(it,Ft)&&!j(at,mt)?"\\u"+tt(Y(Ft,0),16):Ft},bt=function(Ft){if(I(Ft))return Ft;if(A(Ft)){for(var Lt=Ft.length,Pt=[],mt=0;mt<Lt;mt++){var xt=Ft[mt];typeof xt=="string"?K(Pt,xt):(typeof xt=="number"||M(xt)==="Number"||M(xt)==="String")&&K(Pt,D(xt))}var wt=Pt.length,Bt=!0;return function(Jt,Ot){if(Bt)return Bt=!1,Ot;if(A(this))return Ot;for(var jt=0;jt<wt;jt++)if(Pt[jt]===Jt)return Ot}}};X&&g({target:"JSON",stat:!0,arity:3,forced:ht||gt||!W},{stringify:function(Lt,Pt,mt){var xt=bt(Pt),wt=[],Bt=yt(Lt,function(he,Oe){var Me=I(xt)?x(xt,this,U(he),Oe):Oe;return!W&&R(Me)?ot+(K(wt,Me.rawJSON)-1):Me},mt);if(typeof Bt!="string"||(gt&&(Bt=Z(Bt,nt,Et)),W))return Bt;for(var Jt="",Ot=Bt.length,jt=0;jt<Ot;jt++){var ie=H(Bt,jt);if(ie==='"'){var me=B(Bt,++jt).end-1,se=_(Bt,jt,me);Jt+=_(se,0,ut)===ot?wt[_(se,ut)]:'"'+se+'"',jt=me}else Jt+=ie}return Jt}})}),(function(T,P,a){var g=a(9),v=Function.prototype,p=v.apply,x=v.call;T.exports=typeof Reflect=="object"&&Reflect.apply||(g?x.bind(p):function(){return x.apply(p,arguments)})}),(function(T,P,a){var g=a(20),v=a(51).get;T.exports=function(x){if(!g(x))return!1;var y=v(x);return!!y&&y.type==="RawJSON"}}),(function(T,P,a){var g=a(14),v=a(38),p=SyntaxError,x=parseInt,y=String.fromCharCode,b=g("".charAt),A=g("".slice),I=g(/./.exec),R={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
|
|
25
|
+
`,"\\r":"\r","\\t":" "},O=/^[\da-f]{4}$/i,M=/^[\u0000-\u001F]$/;T.exports=function(D,L){for(var B=!0,F="";L<D.length;){var k=b(D,L);if(k==="\\"){var W=A(D,L,L+2);if(v(R,W))F+=R[W],L+=2;else if(W==="\\u"){L+=2;var U=A(D,L,L+4);if(!I(O,U))throw new p("Bad Unicode escape at: "+L);F+=y(x(U,16)),L+=4}else throw new p('Unknown escape sequence: "'+W+'"')}else if(k==='"'){B=!1,L++;break}else{if(I(M,k))throw new p("Bad control character in string literal at: "+L);F+=k,L++}}if(B)throw new p("Unterminated string at: "+L);return{value:F,end:L}}}),(function(T,P,a){var g=a(7);T.exports=!g(function(){var v="9007199254740993",p=JSON.rawJSON(v);return!JSON.isRawJSON(p)||JSON.stringify(p)!==v})}),(function(T,P,a){var g=a(3),v=a(26),p=a(7),x=a(66),y=a(39),b=!v||p(function(){x.f(1)});g({target:"Object",stat:!0,forced:b},{getOwnPropertySymbols:function(I){var R=x.f;return R?R(y(I)):[]}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(4),x=a(8),y=a(14),b=a(38),A=a(21),I=a(24),R=a(68),O=a(77),M=a(55),D=p.Symbol,L=D&&D.prototype;if(v&&A(D)&&(!("description"in L)||D().description!==void 0)){var B={},F=function(){var _=arguments.length<1||arguments[0]===void 0?void 0:R(arguments[0]),K=I(L,this)?new D(_):_===void 0?D():D(_);return _===""&&(B[K]=!0),K};M(F,D);var k=F.for;F.for=function(Z){var _=R(Z),K=x(k,this,_);return _===""&&(B[K]=!0),K},F.prototype=L,L.constructor=F;var W=String(D("description detection"))==="Symbol(description detection)",U=y(L.valueOf),X=y(L.toString),j=/^Symbol\((.*)\)[^)]+$/,H=y("".replace),Y=y("".slice);O(L,"description",{configurable:!0,get:function(){var _=U(this);if(b(B,_))return"";var K=X(_),tt=W?Y(K,7,-1):H(K,j,"$1");return tt===""?void 0:tt}}),g({global:!0,constructor:!0,forced:!0},{Symbol:F})}}),(function(T,P,a){var g=a(4),v=a(79),p=a(44).f,x=a(5).f,y=g.Symbol;if(v("asyncDispose"),y){var b=x(y,"asyncDispose");b.enumerable&&b.configurable&&b.writable&&p(y,"asyncDispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,P,a){var g=a(79);g("asyncIterator")}),(function(T,P,a){var g=a(4),v=a(79),p=a(44).f,x=a(5).f,y=g.Symbol;if(v("dispose"),y){var b=x(y,"dispose");b.enumerable&&b.configurable&&b.writable&&p(y,"dispose",{value:b.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(T,P,a){var g=a(79);g("hasInstance")}),(function(T,P,a){var g=a(79);g("isConcatSpreadable")}),(function(T,P,a){var g=a(79);g("iterator")}),(function(T,P,a){var g=a(79);g("match")}),(function(T,P,a){var g=a(79);g("matchAll")}),(function(T,P,a){var g=a(79);g("replace")}),(function(T,P,a){var g=a(79);g("search")}),(function(T,P,a){var g=a(79);g("species")}),(function(T,P,a){var g=a(79);g("split")}),(function(T,P,a){var g=a(79),v=a(81);g("toPrimitive"),v()}),(function(T,P,a){var g=a(23),v=a(79),p=a(82);v("toStringTag"),p(g("Symbol"),"Symbol")}),(function(T,P,a){var g=a(79);g("unscopables")}),(function(T,P,a){var g=a(3),v=a(4),p=a(95),x=a(117),y="WebAssembly",b=v[y],A=new Error("e",{cause:7}).cause!==7,I=function(O,M){var D={};D[O]=x(O,M,A),g({global:!0,constructor:!0,arity:1,forced:A},D)},R=function(O,M){if(b&&b[O]){var D={};D[O]=x(y+"."+O,M,A),g({target:y,stat:!0,constructor:!0,arity:1,forced:A},D)}};I("Error",function(O){return function(D){return p(O,this,arguments)}}),I("EvalError",function(O){return function(D){return p(O,this,arguments)}}),I("RangeError",function(O){return function(D){return p(O,this,arguments)}}),I("ReferenceError",function(O){return function(D){return p(O,this,arguments)}}),I("SyntaxError",function(O){return function(D){return p(O,this,arguments)}}),I("TypeError",function(O){return function(D){return p(O,this,arguments)}}),I("URIError",function(O){return function(D){return p(O,this,arguments)}}),R("CompileError",function(O){return function(D){return p(O,this,arguments)}}),R("LinkError",function(O){return function(D){return p(O,this,arguments)}}),R("RuntimeError",function(O){return function(D){return p(O,this,arguments)}})}),(function(T,P,a){var g=a(23),v=a(38),p=a(43),x=a(24),y=a(118),b=a(55),A=a(122),I=a(123),R=a(124),O=a(125),M=a(126),D=a(6),L=a(36);T.exports=function(B,F,k,W){var U="stackTraceLimit",X=W?2:1,j=B.split("."),H=j[j.length-1],Y=g.apply(null,j);if(Y){var Z=Y.prototype;if(!L&&v(Z,"cause")&&delete Z.cause,!k)return Y;var _=g("Error"),K=F(function(tt,nt){var at=R(W?nt:tt,void 0),it=W?new Y(tt):new Y;return at!==void 0&&p(it,"message",at),M(it,K,it.stack,2),this&&x(Z,this)&&I(it,this,K),arguments.length>X&&O(it,arguments[X]),it});if(K.prototype=Z,H!=="Error"?y?y(K,_):b(K,_,{name:!0}):D&&U in Y&&(A(K,Y,U),A(K,Y,"prepareStackTrace")),b(K,Y),!L)try{Z.name!==H&&p(Z,"name",H),Z.constructor=K}catch(tt){}return K}}}),(function(T,P,a){var g=a(119),v=a(20),p=a(16),x=a(120);T.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var y=!1,b={},A;try{A=g(Object.prototype,"__proto__","set"),A(b,[]),y=b instanceof Array}catch(I){}return function(R,O){return p(R),x(O),v(R)&&(y?A(R,O):R.__proto__=O),R}})():void 0)}),(function(T,P,a){var g=a(14),v=a(30);T.exports=function(p,x,y){try{return g(v(Object.getOwnPropertyDescriptor(p,x)[y]))}catch(b){}}}),(function(T,P,a){var g=a(121),v=String,p=TypeError;T.exports=function(x){if(g(x))return x;throw new p("Can't set "+v(x)+" as a prototype")}}),(function(T,P,a){var g=a(20);T.exports=function(v){return g(v)||v===null}}),(function(T,P,a){var g=a(44).f;T.exports=function(v,p,x){x in v||g(v,x,{configurable:!0,get:function(){return p[x]},set:function(y){p[x]=y}})}}),(function(T,P,a){var g=a(21),v=a(20),p=a(118);T.exports=function(x,y,b){var A,I;return p&&g(A=y.constructor)&&A!==b&&v(I=A.prototype)&&I!==b.prototype&&p(x,I),x}}),(function(T,P,a){var g=a(68);T.exports=function(v,p){return v===void 0?arguments.length<2?"":p:g(v)}}),(function(T,P,a){var g=a(20),v=a(43);T.exports=function(p,x){g(x)&&"cause"in x&&v(p,"cause",x.cause)}}),(function(T,P,a){var g=a(43),v=a(127),p=a(128),x=Error.captureStackTrace;T.exports=function(y,b,A,I){p&&(x?x(y,b):g(y,"stack",v(A,I)))}}),(function(T,P,a){var g=a(14),v=Error,p=g("".replace),x=(function(A){return String(new v(A).stack)})("zxcasd"),y=/\n\s*at [^:]*:[^\n]*/,b=y.test(x);T.exports=function(A,I){if(b&&typeof A=="string"&&!v.prepareStackTrace)for(;I--;)A=p(A,y,"");return A}}),(function(T,P,a){var g=a(7),v=a(11);T.exports=!g(function(){var p=new Error("a");return"stack"in p?(Object.defineProperty(p,"stack",v(1,7)),p.stack!==7):!0})}),(function(T,P,a){var g=a(3),v=a(23),p=a(20),x=a(69),y=a(7),b="Error",A="DOMException",I=Object.setPrototypeOf||{}.__proto__,R=v(A),O=Error,M=O.isError,D=!M||!I||y(function(){return R&&!M(new R(A))||!M(new O(b,{cause:function(){}}))||M(v("Object","create")(O.prototype))});g({target:"Error",stat:!0,sham:!0,forced:D},{isError:function(B){if(!p(B))return!1;var F=x(B);return F===b||F===A}})}),(function(T,P,a){var g=a(47),v=a(131),p=Error.prototype;p.toString!==v&&g(p,"toString",v)}),(function(T,P,a){var g=a(6),v=a(7),p=a(46),x=a(124),y=Error.prototype.toString,b=v(function(){if(g){var A=Object.create(Object.defineProperty({},"name",{get:function(){return this===A}}));if(y.call(A)!=="true")return!0}return y.call({message:1,name:2})!=="2: 1"||y.call({})!=="Error"});T.exports=b?function(){var I=p(this),R=x(I.name,"Error"),O=x(I.message);return R?O?R+": "+O:R:O}:y}),(function(T,P,a){a(133)}),(function(T,P,a){var g=a(3),v=a(24),p=a(134),x=a(118),y=a(55),b=a(71),A=a(43),I=a(11),R=a(125),O=a(126),M=a(136),D=a(124),L=a(33),B=L("toStringTag"),F=Error,k=[].push,W=function(j,H){var Y=v(U,this),Z;x?Z=x(new F,Y?p(this):U):(Z=Y?this:b(U),A(Z,B,"Error")),H!==void 0&&A(Z,"message",D(H)),O(Z,W,Z.stack,1),arguments.length>2&&R(Z,arguments[2]);var _=[];return M(j,k,{that:_}),A(Z,"errors",_),Z};x?x(W,F):y(W,F,{name:!0});var U=W.prototype=b(F.prototype,{constructor:I(1,W),message:I(1,""),name:I(1,"AggregateError")});g({global:!0,constructor:!0,arity:2},{AggregateError:W})}),(function(T,P,a){var g=a(38),v=a(21),p=a(39),x=a(53),y=a(135),b=x("IE_PROTO"),A=Object,I=A.prototype;T.exports=y?A.getPrototypeOf:function(R){var O=p(R);if(g(O,b))return O[b];var M=O.constructor;return v(M)&&O instanceof M?M.prototype:O instanceof A?I:null}}),(function(T,P,a){var g=a(7);T.exports=!g(function(){function v(){}return v.prototype.constructor=null,Object.getPrototypeOf(new v)!==v.prototype})}),(function(T,P,a){var g=a(84),v=a(8),p=a(46),x=a(31),y=a(137),b=a(63),A=a(24),I=a(139),R=a(140),O=a(141),M=TypeError,D=function(B,F){this.stopped=B,this.result=F},L=D.prototype;T.exports=function(B,F,k){var W=k&&k.that,U=!!(k&&k.AS_ENTRIES),X=!!(k&&k.IS_RECORD),j=!!(k&&k.IS_ITERATOR),H=!!(k&&k.INTERRUPTED),Y=g(F,W),Z,_,K,tt,nt,at,it,ot=function(gt){var yt=Z;return Z=void 0,yt&&O(yt,"normal"),new D(!0,gt)},ut=function(gt){return U?(p(gt),H?Y(gt[0],gt[1],ot):Y(gt[0],gt[1])):H?Y(gt,ot):Y(gt)};if(X)Z=B.iterator;else if(j)Z=B;else{if(_=R(B),!_)throw new M(x(B)+" is not iterable");if(y(_)){for(K=0,tt=b(B);tt>K;K++)if(nt=ut(B[K]),nt&&A(L,nt))return nt;return new D(!1)}Z=I(B,_)}for(at=X?B.next:Z.next;!(it=v(at,Z)).done;){var ht=it.value;try{nt=ut(ht)}catch(gt){if(Z)O(Z,"throw",gt);else throw gt}if(typeof nt=="object"&&nt&&A(L,nt))return nt}return new D(!1)}}),(function(T,P,a){var g=a(33),v=a(138),p=g("iterator"),x=Array.prototype;T.exports=function(y){return y!==void 0&&(v.Array===y||x[p]===y)}}),(function(T){T.exports={}}),(function(T,P,a){var g=a(8),v=a(30),p=a(46),x=a(31),y=a(140),b=TypeError;T.exports=function(A,I){var R=arguments.length<2?y(A):I;if(v(R))return p(g(R,A));throw new b(x(A)+" is not iterable")}}),(function(T,P,a){var g=a(69),v=a(29),p=a(17),x=a(138),y=a(33),b=y("iterator");T.exports=function(A){if(!p(A))return v(A,b)||v(A,"@@iterator")||x[g(A)]}}),(function(T,P,a){var g=a(8),v=a(46),p=a(29);T.exports=function(x,y,b){var A,I;v(x);try{if(A=p(x,"return"),!A){if(y==="throw")throw b;return b}A=g(A,x)}catch(R){I=!0,A=R}if(y==="throw")throw b;if(I)throw A;return v(A),b}}),(function(T,P,a){var g=a(3),v=a(23),p=a(95),x=a(7),y=a(117),b="AggregateError",A=v(b),I=!x(function(){return A([1]).errors[0]!==1})&&x(function(){return A([1],b,{cause:7}).cause!==7});g({global:!0,constructor:!0,arity:2,forced:I},{AggregateError:y(b,function(R){return function(M,D){return p(R,this,arguments)}},I,!0)})}),(function(T,P,a){var g=a(3),v=a(4),p=a(24),x=a(134),y=a(118),b=a(55),A=a(71),I=a(43),R=a(11),O=a(126),M=a(124),D=a(33),L=a(7),B=a(36),F=v.SuppressedError,k=D("toStringTag"),W=Error,U=!!F&&F.length!==3,X=!!F&&L(function(){return new F(1,2,3,{cause:4}).cause===4}),j=U||X,H=function(_,K,tt){var nt=p(Y,this),at;return y?at=j&&(!nt||x(this)===Y)?new F:y(new W,nt?x(this):Y):(at=nt?this:A(Y),I(at,k,"Error")),tt!==void 0&&I(at,"message",M(tt)),O(at,H,at.stack,1),I(at,"error",_),I(at,"suppressed",K),at};y?y(H,W):b(H,W,{name:!0});var Y=H.prototype=j?F.prototype:A(W.prototype,{constructor:R(1,H),message:R(1,""),name:R(1,"SuppressedError")});j&&!B&&(Y.constructor=H),g({global:!0,constructor:!0,arity:3,forced:j},{SuppressedError:H})}),(function(T,P,a){var g=a(3),v=a(39),p=a(63),x=a(61),y=a(145);g({target:"Array",proto:!0},{at:function(A){var I=v(this),R=p(I),O=x(A),M=O>=0?O:R+O;return M<0||M>=R?void 0:I[M]}}),y("at")}),(function(T,P,a){var g=a(33),v=a(71),p=a(44).f,x=g("unscopables"),y=Array.prototype;y[x]===void 0&&p(y,x,{configurable:!0,value:v(null)}),T.exports=function(b){y[x][b]=!0}}),(function(T,P,a){var g=a(3),v=a(7),p=a(88),x=a(20),y=a(39),b=a(63),A=a(147),I=a(90),R=a(148),O=a(86),M=a(149),D=a(33),L=a(27),B=D("isConcatSpreadable"),F=L>=51||!v(function(){var U=[];return U[B]=!1,U.concat()[0]!==U}),k=function(U){if(!x(U))return!1;var X=U[B];return X!==void 0?!!X:p(U)},W=!F||!M("concat");g({target:"Array",proto:!0,arity:1,forced:W},{concat:function(X){var j=y(this),H=O(j,0),Y=0,Z,_,K,tt,nt;for(Z=-1,K=arguments.length;Z<K;Z++)if(nt=Z===-1?j:arguments[Z],k(nt))for(tt=b(nt),A(Y+tt),_=0;_<tt;_++,Y++)_ in nt&&I(H,Y,nt[_]);else A(Y+1),I(H,Y++,nt);return R(H,Y),H}})}),(function(T){var P=TypeError,a=9007199254740991;T.exports=function(g){if(g>a)throw new P("Maximum allowed index exceeded");return g}}),(function(T,P,a){var g=a(6),v=a(88),p=TypeError,x=Object.getOwnPropertyDescriptor,y=g&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(b){return b instanceof TypeError}})();T.exports=y?function(b,A){if(v(b)&&!x(b,"length").writable)throw new p("Cannot set read only .length");return b.length=A}:function(b,A){return b.length=A}}),(function(T,P,a){var g=a(7),v=a(33),p=a(27),x=v("species");T.exports=function(y){return p>=51||!g(function(){var b=[],A=b.constructor={};return A[x]=function(){return{foo:1}},b[y](Boolean).foo!==1})}}),(function(T,P,a){var g=a(3),v=a(151),p=a(145);g({target:"Array",proto:!0},{copyWithin:v}),p("copyWithin")}),(function(T,P,a){var g=a(39),v=a(60),p=a(63),x=a(152),y=Math.min;T.exports=[].copyWithin||function(A,I){var R=g(this),O=p(R),M=v(A,O),D=v(I,O),L=arguments.length>2?arguments[2]:void 0,B=y((L===void 0?O:v(L,O))-D,O-M),F=1;for(D<M&&M<D+B&&(F=-1,D+=B-1,M+=B-1);B-- >0;)D in R?R[M]=R[D]:x(R,M),M+=F,D+=F;return R}}),(function(T,P,a){var g=a(31),v=TypeError;T.exports=function(p,x){if(!delete p[x])throw new v("Cannot delete property "+g(x)+" of "+g(p))}}),(function(T,P,a){var g=a(3),v=a(83).every,p=a(154),x=p("every");g({target:"Array",proto:!0,forced:!x},{every:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(7);T.exports=function(v,p){var x=[][v];return!!x&&g(function(){x.call(null,p||function(){return 1},1)})}}),(function(T,P,a){var g=a(3),v=a(156),p=a(145);g({target:"Array",proto:!0},{fill:v}),p("fill")}),(function(T,P,a){var g=a(39),v=a(60),p=a(63);T.exports=function(y){for(var b=g(this),A=p(b),I=arguments.length,R=v(I>1?arguments[1]:void 0,A),O=I>2?arguments[2]:void 0,M=O===void 0?A:v(O,A);M>R;)b[R++]=y;return b}}),(function(T,P,a){var g=a(3),v=a(83).filter,p=a(149),x=p("filter");g({target:"Array",proto:!0,forced:!x},{filter:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(83).find,p=a(145),x="find",y=!0;x in[]&&Array(1)[x](function(){y=!1}),g({target:"Array",proto:!0,forced:y},{find:function(A){return v(this,A,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,P,a){var g=a(3),v=a(83).findIndex,p=a(145),x="findIndex",y=!0;x in[]&&Array(1)[x](function(){y=!1}),g({target:"Array",proto:!0,forced:y},{findIndex:function(A){return v(this,A,arguments.length>1?arguments[1]:void 0)}}),p(x)}),(function(T,P,a){var g=a(3),v=a(161).findLast,p=a(145);g({target:"Array",proto:!0},{findLast:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLast")}),(function(T,P,a){var g=a(84),v=a(13),p=a(39),x=a(63),y=function(b){var A=b===1;return function(I,R,O){for(var M=p(I),D=v(M),L=x(D),B=g(R,O),F,k;L-- >0;)if(F=D[L],k=B(F,L,M),k)switch(b){case 0:return F;case 1:return L}return A?-1:void 0}};T.exports={findLast:y(0),findLastIndex:y(1)}}),(function(T,P,a){var g=a(3),v=a(161).findLastIndex,p=a(145);g({target:"Array",proto:!0},{findLastIndex:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}}),p("findLastIndex")}),(function(T,P,a){var g=a(3),v=a(164),p=a(39),x=a(63),y=a(61),b=a(86);g({target:"Array",proto:!0},{flat:function(){var I=arguments.length?arguments[0]:void 0,R=p(this),O=x(R),M=I===void 0?1:y(I),D=b(R,0);return v(D,R,R,O,0,M),D}})}),(function(T,P,a){var g=a(88),v=a(63),p=a(147),x=a(84),y=a(90),b=function(A,I,R,O,M,D,L,B){for(var F=M,k=0,W=L?x(L,B):!1,U,X;k<O;)k in R&&(U=W?W(R[k],k,I):R[k],D>0&&g(U)?(X=v(U),F=b(A,I,U,X,F,D-1)-1):(p(F+1),y(A,F,U)),F++),k++;return F};T.exports=b}),(function(T,P,a){var g=a(3),v=a(164),p=a(30),x=a(39),y=a(63),b=a(86);g({target:"Array",proto:!0},{flatMap:function(I){var R=x(this),O=y(R),M;return p(I),M=b(R,0),v(M,R,R,O,0,1,I,arguments.length>1?arguments[1]:void 0),M}})}),(function(T,P,a){var g=a(3),v=a(167);g({target:"Array",proto:!0,forced:[].forEach!==v},{forEach:v})}),(function(T,P,a){var g=a(83).forEach,v=a(154),p=v("forEach");T.exports=p?[].forEach:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}}),(function(T,P,a){var g=a(3),v=a(169),p=a(171),x=!p(function(y){Array.from(y)});g({target:"Array",stat:!0,forced:x},{from:v})}),(function(T,P,a){var g=a(84),v=a(8),p=a(39),x=a(170),y=a(137),b=a(89),A=a(63),I=a(90),R=a(148),O=a(139),M=a(140),D=a(141),L=Array;T.exports=function(F){var k=b(this),W=arguments.length,U=W>1?arguments[1]:void 0,X=U!==void 0;X&&(U=g(U,W>2?arguments[2]:void 0));var j=p(F),H=M(j),Y=0,Z,_,K,tt,nt,at;if(H&&!(this===L&&y(H)))for(_=k?new this:[],tt=O(j,H),nt=tt.next;!(K=v(nt,tt)).done;Y++){at=X?x(tt,U,[K.value,Y],!0):K.value;try{I(_,Y,at)}catch(it){D(tt,"throw",it)}}else for(Z=A(j),_=k?new this(Z):L(Z);Z>Y;Y++)at=X?U(j[Y],Y):j[Y],I(_,Y,at);return R(_,Y),_}}),(function(T,P,a){var g=a(46),v=a(141);T.exports=function(p,x,y,b){try{return b?x(g(y)[0],y[1]):x(y)}catch(A){v(p,"throw",A)}}}),(function(T,P,a){var g=a(33),v=g("iterator"),p=!1;try{var x=0,y={next:function(){return{done:!!x++}},return:function(){p=!0}};y[v]=function(){return this},Array.from(y,function(){throw 2})}catch(b){}T.exports=function(b,A){try{if(!A&&!p)return!1}catch(O){return!1}var I=!1;try{var R={};R[v]=function(){return{next:function(){return{done:I=!0}}}},b(R)}catch(O){}return I}}),(function(T,P,a){var g=a(3),v=a(59).includes,p=a(7),x=a(145),y=p(function(){return!Array(1).includes()}),b=p(function(){return[,1].includes(void 0,1)});g({target:"Array",proto:!0,forced:y||b},{includes:function(I){return v(this,I,arguments.length>1?arguments[1]:void 0)}}),x("includes")}),(function(T,P,a){var g=a(3),v=a(85),p=a(59).indexOf,x=a(154),y=v([].indexOf),b=!!y&&1/y([1],1,-0)<0,A=b||!x("indexOf");g({target:"Array",proto:!0,forced:A},{indexOf:function(R){var O=arguments.length>1?arguments[1]:void 0;return b?y(this,R,O)||0:p(this,R,O)}})}),(function(T,P,a){var g=a(3),v=a(88);g({target:"Array",stat:!0},{isArray:v})}),(function(T,P,a){var g=a(12),v=a(145),p=a(138),x=a(51),y=a(44).f,b=a(176),A=a(179),I=a(36),R=a(6),O="Array Iterator",M=x.set,D=x.getterFor(O);T.exports=b(Array,"Array",function(B,F){M(this,{type:O,target:g(B),index:0,kind:F})},function(){var B=D(this),F=B.target,k=B.index++;if(!F||k>=F.length)return B.target=null,A(void 0,!0);switch(B.kind){case"keys":return A(k,!1);case"values":return A(F[k],!1)}return A([k,F[k]],!1)},"values");var L=p.Arguments=p.Array;if(v("keys"),v("values"),v("entries"),!I&&R&&L.name!=="values")try{y(L,"name",{value:"values"})}catch(B){}}),(function(T,P,a){var g=a(3),v=a(8),p=a(36),x=a(49),y=a(21),b=a(177),A=a(134),I=a(118),R=a(82),O=a(43),M=a(47),D=a(33),L=a(138),B=a(178),F=x.PROPER,k=x.CONFIGURABLE,W=B.IteratorPrototype,U=B.BUGGY_SAFARI_ITERATORS,X=D("iterator"),j="keys",H="values",Y="entries",Z=function(){return this};T.exports=function(_,K,tt,nt,at,it,ot){b(tt,K,nt);var ut=function(xt){if(xt===at&&bt)return bt;if(!U&&xt&&xt in yt)return yt[xt];switch(xt){case j:return function(){return new tt(this,xt)};case H:return function(){return new tt(this,xt)};case Y:return function(){return new tt(this,xt)}}return function(){return new tt(this)}},ht=K+" Iterator",gt=!1,yt=_.prototype,Et=yt[X]||yt["@@iterator"]||at&&yt[at],bt=!U&&Et||ut(at),Ft=K==="Array"&&yt.entries||Et,Lt,Pt,mt;if(Ft&&(Lt=A(Ft.call(new _)),Lt!==Object.prototype&&Lt.next&&(!p&&A(Lt)!==W&&(I?I(Lt,W):y(Lt[X])||M(Lt,X,Z)),R(Lt,ht,!0,!0),p&&(L[ht]=Z))),F&&at===H&&Et&&Et.name!==H&&(!p&&k?O(yt,"name",H):(gt=!0,bt=function(){return v(Et,this)})),at)if(Pt={values:ut(H),keys:it?bt:ut(j),entries:ut(Y)},ot)for(mt in Pt)(U||gt||!(mt in yt))&&M(yt,mt,Pt[mt]);else g({target:K,proto:!0,forced:U||gt},Pt);return(!p||ot)&&yt[X]!==bt&&M(yt,X,bt,{name:at}),L[K]=bt,Pt}}),(function(T,P,a){var g=a(178).IteratorPrototype,v=a(71),p=a(11),x=a(82),y=a(138),b=function(){return this};T.exports=function(A,I,R,O){var M=I+" Iterator";return A.prototype=v(g,{next:p(+!O,R)}),x(A,M,!1,!0),y[M]=b,A}}),(function(T,P,a){var g=a(7),v=a(21),p=a(20),x=a(71),y=a(134),b=a(47),A=a(33),I=a(36),R=A("iterator"),O=!1,M,D,L;[].keys&&(L=[].keys(),"next"in L?(D=y(y(L)),D!==Object.prototype&&(M=D)):O=!0);var B=!p(M)||g(function(){var F={};return M[R].call(F)!==F});B?M={}:I&&(M=x(M)),v(M[R])||b(M,R,function(){return this}),T.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:O}}),(function(T){T.exports=function(P,a){return{value:P,done:a}}}),(function(T,P,a){var g=a(3),v=a(14),p=a(13),x=a(12),y=a(154),b=v([].join),A=p!==Object,I=A||!y("join",",");g({target:"Array",proto:!0,forced:I},{join:function(O){return b(x(this),O===void 0?",":O)}})}),(function(T,P,a){var g=a(3),v=a(182);g({target:"Array",proto:!0,forced:v!==[].lastIndexOf},{lastIndexOf:v})}),(function(T,P,a){var g=a(95),v=a(12),p=a(61),x=a(63),y=a(154),b=Math.min,A=[].lastIndexOf,I=!!A&&1/[1].lastIndexOf(1,-0)<0,R=y("lastIndexOf"),O=I||!R;T.exports=O?function(D){if(I)return g(A,this,arguments)||0;var L=v(this),B=x(L);if(B===0)return-1;var F=B-1;for(arguments.length>1&&(F=b(F,p(arguments[1]))),F<0&&(F=B+F);F>=0;F--)if(F in L&&L[F]===D)return F||0;return-1}:A}),(function(T,P,a){var g=a(3),v=a(83).map,p=a(149),x=p("map");g({target:"Array",proto:!0,forced:!x},{map:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(7),p=a(89),x=a(90),y=a(148),b=Array,A=v(function(){function I(){}return!(b.of.call(I)instanceof I)});g({target:"Array",stat:!0,forced:A},{of:function(){for(var R=0,O=arguments.length,M=new(p(this)?this:b)(O);O>R;)x(M,R,arguments[R++]);return y(M,O),M}})}),(function(T,P,a){var g=a(3),v=a(39),p=a(63),x=a(148),y=a(147),b=a(7),A=b(function(){return[].push.call({length:4294967296},1)!==4294967297}),I=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(O){return O instanceof TypeError}},R=A||!I();g({target:"Array",proto:!0,arity:1,forced:R},{push:function(M){var D=v(this),L=p(D),B=arguments.length;y(L+B);for(var F=0;F<B;F++)D[L]=arguments[F],L++;return x(D,L),L}})}),(function(T,P,a){var g=a(3),v=a(187).left,p=a(154),x=a(27),y=a(188),b=!y&&x>79&&x<83,A=b||!p("reduce");g({target:"Array",proto:!0,forced:A},{reduce:function(R){var O=arguments.length;return v(this,R,O,O>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(30),v=a(39),p=a(13),x=a(63),y=TypeError,b="Reduce of empty array with no initial value",A=function(I){return function(R,O,M,D){var L=v(R),B=p(L),F=x(L);if(g(O),F===0&&M<2)throw new y(b);var k=I?F-1:0,W=I?-1:1;if(M<2)for(;;){if(k in B){D=B[k],k+=W;break}if(k+=W,I?k<0:F<=k)throw new y(b)}for(;I?k>=0:F>k;k+=W)k in B&&(D=O(D,B[k],k,L));return D}};T.exports={left:A(!1),right:A(!0)}}),(function(T,P,a){var g=a(189);T.exports=g==="NODE"}),(function(T,P,a){var g=a(4),v=a(28),p=a(15),x=function(y){return v.slice(0,y.length)===y};T.exports=(function(){return x("Bun/")?"BUN":x("Cloudflare-Workers")?"CLOUDFLARE":x("Deno/")?"DENO":x("Node.js/")?"NODE":g.Bun&&typeof Bun.version=="string"?"BUN":g.Deno&&typeof Deno.version=="object"?"DENO":p(g.process)==="process"?"NODE":g.window&&g.document?"BROWSER":"REST"})()}),(function(T,P,a){var g=a(3),v=a(187).right,p=a(154),x=a(27),y=a(188),b=!y&&x>79&&x<83,A=b||!p("reduceRight");g({target:"Array",proto:!0,forced:A},{reduceRight:function(R){return v(this,R,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(88),x=v([].reverse),y=[1,2];g({target:"Array",proto:!0,forced:String(y)===String(y.reverse())},{reverse:function(){return p(this)&&(this.length=this.length),x(this)}})}),(function(T,P,a){var g=a(3),v=a(88),p=a(89),x=a(20),y=a(60),b=a(63),A=a(12),I=a(90),R=a(148),O=a(33),M=a(149),D=a(76),L=M("slice"),B=O("species"),F=Array,k=Math.max;g({target:"Array",proto:!0,forced:!L},{slice:function(U,X){var j=A(this),H=b(j),Y=y(U,H),Z=y(X===void 0?H:X,H),_,K,tt;if(v(j)&&(_=j.constructor,p(_)&&(_===F||v(_.prototype))?_=void 0:x(_)&&(_=_[B],_===null&&(_=void 0)),_===F||_===void 0))return D(j,Y,Z);for(K=new(_===void 0?F:_)(k(Z-Y,0)),tt=0;Y<Z;Y++,tt++)Y in j&&I(K,tt,j[Y]);return R(K,tt),K}})}),(function(T,P,a){var g=a(3),v=a(83).some,p=a(154),x=p("some");g({target:"Array",proto:!0,forced:!x},{some:function(b){return v(this,b,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(30),x=a(39),y=a(63),b=a(152),A=a(68),I=a(7),R=a(195),O=a(154),M=a(196),D=a(197),L=a(27),B=a(198),F=[],k=v(F.sort),W=v(F.push),U=I(function(){F.sort(void 0)}),X=I(function(){F.sort(null)}),j=O("sort"),H=!I(function(){if(L)return L<70;if(!(M&&M>3)){if(D)return!0;if(B)return B<603;var _="",K,tt,nt,at;for(K=65;K<76;K++){switch(tt=String.fromCharCode(K),K){case 66:case 69:case 70:case 72:nt=3;break;case 68:case 71:nt=4;break;default:nt=2}for(at=0;at<47;at++)F.push({k:tt+at,v:nt})}for(F.sort(function(it,ot){return ot.v-it.v}),at=0;at<F.length;at++)tt=F[at].k.charAt(0),_.charAt(_.length-1)!==tt&&(_+=tt);return _!=="DGBEFHACIJK"}}),Y=U||!X||!j||!H,Z=function(_){return function(K,tt){if(tt===void 0)return-1;if(K===void 0)return 1;if(_!==void 0)return+_(K,tt)||0;var nt=A(K),at=A(tt);return nt===at?0:nt>at?1:-1}};g({target:"Array",proto:!0,forced:Y},{sort:function(K){K!==void 0&&p(K);var tt=x(this);if(H)return K===void 0?k(tt):k(tt,K);var nt=[],at=y(tt),it,ot;for(ot=0;ot<at;ot++)ot in tt&&W(nt,tt[ot]);for(R(nt,Z(K)),it=y(nt),ot=0;ot<it;)tt[ot]=nt[ot++];for(;ot<at;)b(tt,ot++);return tt}})}),(function(T,P,a){var g=a(76),v=Math.floor,p=function(x,y){var b=x.length;if(b<8)for(var A=1,I,R;A<b;){for(R=A,I=x[A];R&&y(x[R-1],I)>0;)x[R]=x[--R];R!==A++&&(x[R]=I)}else for(var O=v(b/2),M=p(g(x,0,O),y),D=p(g(x,O),y),L=M.length,B=D.length,F=0,k=0;F<L||k<B;)x[F+k]=F<L&&k<B?y(M[F],D[k])<=0?M[F++]:D[k++]:F<L?M[F++]:D[k++];return x};T.exports=p}),(function(T,P,a){var g=a(28),v=g.match(/firefox\/(\d+)/i);T.exports=!!v&&+v[1]}),(function(T,P,a){var g=a(28);T.exports=/MSIE|Trident/.test(g)}),(function(T,P,a){var g=a(28),v=g.match(/AppleWebKit\/(\d+)\./);T.exports=!!v&&+v[1]}),(function(T,P,a){var g=a(200);g("Array")}),(function(T,P,a){var g=a(23),v=a(77),p=a(33),x=a(6),y=p("species");T.exports=function(b){var A=g(b);x&&A&&!A[y]&&v(A,y,{configurable:!0,get:function(){return this}})}}),(function(T,P,a){var g=a(3),v=a(39),p=a(60),x=a(61),y=a(63),b=a(148),A=a(147),I=a(86),R=a(90),O=a(152),M=a(149),D=M("splice"),L=Math.max,B=Math.min;g({target:"Array",proto:!0,forced:!D},{splice:function(k,W){var U=v(this),X=y(U),j=p(k,X),H=arguments.length,Y,Z,_,K,tt,nt;for(H===0?Y=Z=0:H===1?(Y=0,Z=X-j):(Y=H-2,Z=B(L(x(W),0),X-j)),A(X+Y-Z),_=I(U,Z),K=0;K<Z;K++)tt=j+K,tt in U&&R(_,K,U[tt]);if(b(_,Z),Y<Z){for(K=j;K<X-Z;K++)tt=K+Z,nt=K+Y,tt in U?U[nt]=U[tt]:O(U,nt);for(K=X;K>X-Z+Y;K--)O(U,K-1)}else if(Y>Z)for(K=X-Z;K>j;K--)tt=K+Z-1,nt=K+Y-1,tt in U?U[nt]=U[tt]:O(U,nt);for(K=0;K<Y;K++)U[K+j]=arguments[K+2];return b(U,X-Z+Y),_}})}),(function(T,P,a){var g=a(3),v=a(63),p=a(12),x=a(90),y=a(145),b=Array;g({target:"Array",proto:!0},{toReversed:function(){for(var I=p(this),R=v(I),O=new b(R),M=0;M<R;M++)x(O,M,I[R-M-1]);return O}}),y("toReversed")}),(function(T,P,a){var g=a(3),v=a(14),p=a(30),x=a(12),y=a(204),b=a(205),A=a(145),I=Array,R=v(b("Array","sort"));g({target:"Array",proto:!0},{toSorted:function(M){M!==void 0&&p(M);var D=x(this),L=y(I,D);return R(L,M)}}),A("toSorted")}),(function(T,P,a){var g=a(63);T.exports=function(v,p,x){for(var y=0,b=arguments.length>2?x:g(p),A=new v(b);b>y;)A[y]=p[y++];return A}}),(function(T,P,a){var g=a(4);T.exports=function(v,p){var x=g[v],y=x&&x.prototype;return y&&y[p]}}),(function(T,P,a){var g=a(3),v=a(145),p=a(147),x=a(63),y=a(60),b=a(12),A=a(61),I=a(90),R=Array,O=Math.max,M=Math.min;g({target:"Array",proto:!0},{toSpliced:function(L,B){var F=b(this),k=x(F),W=y(L,k),U=arguments.length,X=0,j,H,Y,Z;for(U===0?j=H=0:U===1?(j=0,H=k-W):(j=U-2,H=M(O(A(B),0),k-W)),Y=p(k+j-H),Z=R(Y);X<W;X++)I(Z,X,F[X]);for(;X<W+j;X++)I(Z,X,arguments[X-W+2]);for(;X<Y;X++)I(Z,X,F[X+H-j]);return Z}}),v("toSpliced")}),(function(T,P,a){var g=a(145);g("flat")}),(function(T,P,a){var g=a(145);g("flatMap")}),(function(T,P,a){var g=a(3),v=a(39),p=a(63),x=a(148),y=a(152),b=a(147),A=[].unshift(0)!==1,I=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(O){return O instanceof TypeError}},R=A||!I();g({target:"Array",proto:!0,arity:1,forced:R},{unshift:function(M){var D=v(this),L=p(D),B=arguments.length;if(B){b(L+B);for(var F=L;F--;){var k=F+B;F in D?D[k]=D[F]:y(D,k)}for(var W=0;W<B;W++)D[W]=arguments[W]}return x(D,L+B)}})}),(function(T,P,a){var g=a(3),v=a(63),p=a(61),x=a(12),y=a(90),b=Array,A=RangeError,I=(function(){try{[].with({valueOf:function(){throw 4}},null)}catch(R){return R!==4}})();g({target:"Array",proto:!0,forced:I},{with:function(R,O){var M=x(this),D=v(M),L=p(R),B=L<0?D+L:L;if(B>=D||B<0)throw new A("Incorrect index");for(var F=new b(D),k=0;k<D;k++)y(F,k,k===B?O:M[k]);return F}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(212),x=a(200),y="ArrayBuffer",b=p[y],A=v[y];g({global:!0,constructor:!0,forced:A!==b},{ArrayBuffer:b}),x(y)}),(function(T,P,a){var g=a(4),v=a(14),p=a(6),x=a(213),y=a(49),b=a(43),A=a(77),I=a(214),R=a(7),O=a(215),M=a(61),D=a(216),L=a(217),B=a(221),F=a(134),k=a(118),W=a(156),U=a(76),X=a(123),j=a(55),H=a(82),Y=a(51),Z=y.PROPER,_=y.CONFIGURABLE,K="ArrayBuffer",tt="DataView",nt="prototype",at="Wrong length",it="Wrong index",ot=Y.getterFor(K),ut=Y.getterFor(tt),ht=Y.set,gt=g[K],yt=gt,Et=yt&&yt[nt],bt=g[tt],Ft=bt&&bt[nt],Lt=Object.prototype,Pt=g.Array,mt=g.RangeError,xt=v(W),wt=v([].reverse),Bt=B.pack,Jt=B.unpack,Ot=function(Ht){return[Ht&255]},jt=function(Ht){return[Ht&255,Ht>>8&255]},ie=function(Ht){return[Ht&255,Ht>>8&255,Ht>>16&255,Ht>>24&255]},me=function(Ht){return Ht[3]<<24|Ht[2]<<16|Ht[1]<<8|Ht[0]},se=function(Ht){return Bt(L(Ht),23,4)},he=function(Ht){return Bt(Ht,52,8)},Oe=function(Ht,ne,ae){A(Ht[nt],ne,{configurable:!0,get:function(){return ae(this)[ne]}})},Me=function(Ht,ne,ae,rn){var Yt=ut(Ht),ee=D(ae),pe=!!rn;if(ee+ne>Yt.byteLength)throw new mt(it);var ce=Yt.bytes,Pe=ee+Yt.byteOffset,ln=U(ce,Pe,Pe+ne);return pe?ln:wt(ln)},Re=function(Ht,ne,ae,rn,Yt,ee){var pe=ut(Ht),ce=D(ae),Pe=rn(+Yt),ln=!!ee;if(ce+ne>pe.byteLength)throw new mt(it);for(var It=pe.bytes,Xt=ce+pe.byteOffset,Mt=0;Mt<ne;Mt++)It[Xt+Mt]=Pe[ln?Mt:ne-Mt-1]};if(!x)yt=function(ne){O(this,Et);var ae=D(ne);ht(this,{type:K,bytes:xt(Pt(ae),0),byteLength:ae}),p||(this.byteLength=ae,this.detached=!1)},Et=yt[nt],bt=function(ne,ae,rn){O(this,Ft),O(ne,Et);var Yt=ot(ne),ee=Yt.byteLength,pe=M(ae);if(pe<0||pe>ee)throw new mt("Wrong offset");if(rn=rn===void 0?ee-pe:D(rn),pe+rn>ee)throw new mt(at);ht(this,{type:tt,buffer:ne,byteLength:rn,byteOffset:pe,bytes:Yt.bytes}),p||(this.buffer=ne,this.byteLength=rn,this.byteOffset=pe)},Ft=bt[nt],p&&(Oe(yt,"byteLength",ot),Oe(bt,"buffer",ut),Oe(bt,"byteLength",ut),Oe(bt,"byteOffset",ut)),I(Ft,{getInt8:function(ne){return Me(this,1,ne)[0]<<24>>24},getUint8:function(ne){return Me(this,1,ne)[0]},getInt16:function(ne){var ae=Me(this,2,ne,arguments.length>1?arguments[1]:!1);return(ae[1]<<8|ae[0])<<16>>16},getUint16:function(ne){var ae=Me(this,2,ne,arguments.length>1?arguments[1]:!1);return ae[1]<<8|ae[0]},getInt32:function(ne){return me(Me(this,4,ne,arguments.length>1?arguments[1]:!1))},getUint32:function(ne){return me(Me(this,4,ne,arguments.length>1?arguments[1]:!1))>>>0},getFloat32:function(ne){return Jt(Me(this,4,ne,arguments.length>1?arguments[1]:!1),23)},getFloat64:function(ne){return Jt(Me(this,8,ne,arguments.length>1?arguments[1]:!1),52)},setInt8:function(ne,ae){Re(this,1,ne,Ot,ae)},setUint8:function(ne,ae){Re(this,1,ne,Ot,ae)},setInt16:function(ne,ae){Re(this,2,ne,jt,ae,arguments.length>2?arguments[2]:!1)},setUint16:function(ne,ae){Re(this,2,ne,jt,ae,arguments.length>2?arguments[2]:!1)},setInt32:function(ne,ae){Re(this,4,ne,ie,ae,arguments.length>2?arguments[2]:!1)},setUint32:function(ne,ae){Re(this,4,ne,ie,ae,arguments.length>2?arguments[2]:!1)},setFloat32:function(ne,ae){Re(this,4,ne,se,ae,arguments.length>2?arguments[2]:!1)},setFloat64:function(ne,ae){Re(this,8,ne,he,ae,arguments.length>2?arguments[2]:!1)}});else{var ge=Z&>.name!==K;!R(function(){gt(1)})||!R(function(){new gt(-1)})||R(function(){return new gt,new gt(1.5),new gt(NaN),gt.length!==1||ge&&!_})?(yt=function(ne){return O(this,Et),X(new gt(D(ne)),this,yt)},yt[nt]=Et,Et.constructor=yt,j(yt,gt)):ge&&_&&b(gt,"name",K),k&&F(Ft)!==Lt&&k(Ft,Lt);var Te=new bt(new yt(2)),Ve=v(Ft.setInt8);Te.setInt8(0,2147483648),Te.setInt8(1,2147483649),(Te.getInt8(0)||!Te.getInt8(1))&&I(Ft,{setInt8:function(ne,ae){Ve(this,ne,ae<<24>>24)},setUint8:function(ne,ae){Ve(this,ne,ae<<24>>24)}},{unsafe:!0})}H(yt,K),H(bt,tt),T.exports={ArrayBuffer:yt,DataView:bt}}),(function(T){T.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"}),(function(T,P,a){var g=a(47);T.exports=function(v,p,x){for(var y in p)g(v,y,p[y],x);return v}}),(function(T,P,a){var g=a(24),v=TypeError;T.exports=function(p,x){if(g(x,p))return p;throw new v("Incorrect invocation")}}),(function(T,P,a){var g=a(61),v=a(64),p=RangeError;T.exports=function(x){if(x===void 0)return 0;var y=g(x),b=v(y);if(y!==b)throw new p("Wrong length or index");return b}}),(function(T,P,a){var g=a(218),v=11920928955078125e-23,p=34028234663852886e22,x=11754943508222875e-54;T.exports=Math.fround||function(b){return g(b,v,p,x)}}),(function(T,P,a){var g=a(219),v=a(220),p=Math.abs,x=2220446049250313e-31;T.exports=function(y,b,A,I){var R=+y,O=p(R),M=g(R);if(O<I)return M*v(O/I/b)*I*b;var D=(1+b/x)*O,L=D-(D-O);return L>A||L!==L?M*(1/0):M*L}}),(function(T){T.exports=Math.sign||function(a){var g=+a;return g===0||g!==g?g:g<0?-1:1}}),(function(T){var P=2220446049250313e-31,a=1/P;T.exports=function(g){return g+a-a}}),(function(T){var P=Array,a=Math.abs,g=Math.pow,v=Math.floor,p=Math.log,x=Math.LN2,y=function(A,I,R){var O=P(R),M=R*8-I-1,D=(1<<M)-1,L=D>>1,B=I===23?g(2,-24)-g(2,-77):0,F=A<0||A===0&&1/A<0?1:0,k=0,W,U,X;for(A=a(A),A!==A||A===1/0?(U=A!==A?1:0,W=D):(W=v(p(A)/x),X=g(2,-W),A*X<1&&(W--,X*=2),W+L>=1?A+=B/X:A+=B*g(2,1-L),A*X>=2&&(W++,X/=2),W+L>=D?(U=0,W=D):W+L>=1?(U=(A*X-1)*g(2,I),W+=L):(U=A*g(2,L-1)*g(2,I),W=0));I>=8;)O[k++]=U&255,U/=256,I-=8;for(W=W<<I|U,M+=I;M>0;)O[k++]=W&255,W/=256,M-=8;return O[k-1]|=F*128,O},b=function(A,I){var R=A.length,O=R*8-I-1,M=(1<<O)-1,D=M>>1,L=O-7,B=R-1,F=A[B--],k=F&127,W;for(F>>=7;L>0;)k=k*256+A[B--],L-=8;for(W=k&(1<<-L)-1,k>>=-L,L+=I;L>0;)W=W*256+A[B--],L-=8;if(k===0)k=1-D;else{if(k===M)return W?NaN:F?-1/0:1/0;W+=g(2,I),k-=D}return(F?-1:1)*W*g(2,k-I)};T.exports={pack:y,unpack:b}}),(function(T,P,a){var g=a(3),v=a(223),p=v.NATIVE_ARRAY_BUFFER_VIEWS;g({target:"ArrayBuffer",stat:!0,forced:!p},{isView:v.isView})}),(function(T,P,a){var g=a(213),v=a(6),p=a(4),x=a(21),y=a(20),b=a(38),A=a(69),I=a(31),R=a(43),O=a(47),M=a(77),D=a(24),L=a(134),B=a(118),F=a(33),k=a(40),W=a(51),U=W.enforce,X=W.get,j=p.Int8Array,H=j&&j.prototype,Y=p.Uint8ClampedArray,Z=Y&&Y.prototype,_=j&&L(j),K=H&&L(H),tt=Object.prototype,nt=p.TypeError,at=F("toStringTag"),it=k("TYPED_ARRAY_TAG"),ot="TypedArrayConstructor",ut=g&&!!B&&A(p.opera)!=="Opera",ht=!1,gt,yt,Et,bt={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},Ft={BigInt64Array:8,BigUint64Array:8},Lt=function(jt){if(!y(jt))return!1;var ie=A(jt);return ie==="DataView"||b(bt,ie)||b(Ft,ie)},Pt=function(Ot){var jt=L(Ot);if(y(jt)){var ie=X(jt);return ie&&b(ie,ot)?ie[ot]:Pt(jt)}},mt=function(Ot){if(!y(Ot))return!1;var jt=A(Ot);return b(bt,jt)||b(Ft,jt)},xt=function(Ot){if(mt(Ot))return Ot;throw new nt("Target is not a typed array")},wt=function(Ot){if(x(Ot)&&(!B||D(_,Ot)))return Ot;throw new nt(I(Ot)+" is not a typed array constructor")},Bt=function(Ot,jt,ie,me){if(v){if(ie)for(var se in bt){var he=p[se];if(he&&b(he.prototype,Ot))try{delete he.prototype[Ot]}catch(Oe){try{he.prototype[Ot]=jt}catch(Me){}}}(!K[Ot]||ie)&&O(K,Ot,ie?jt:ut&&H[Ot]||jt,me)}},Jt=function(Ot,jt,ie){var me,se;if(v){if(B){if(ie){for(me in bt)if(se=p[me],se&&b(se,Ot))try{delete se[Ot]}catch(he){}}if(!_[Ot]||ie)try{return O(_,Ot,ie?jt:ut&&_[Ot]||jt)}catch(he){}else return}for(me in bt)se=p[me],se&&(!se[Ot]||ie)&&O(se,Ot,jt)}};for(gt in bt)yt=p[gt],Et=yt&&yt.prototype,Et?U(Et)[ot]=yt:ut=!1;for(gt in Ft)yt=p[gt],Et=yt&&yt.prototype,Et&&(U(Et)[ot]=yt);if((!ut||!x(_)||_===Function.prototype)&&(_=function(){throw new nt("Incorrect invocation")},ut))for(gt in bt)p[gt]&&B(p[gt],_);if((!ut||!K||K===tt)&&(K=_.prototype,ut))for(gt in bt)p[gt]&&B(p[gt].prototype,K);if(ut&&L(Z)!==K&&B(Z,K),v&&!b(K,at)){ht=!0,M(K,at,{configurable:!0,get:function(){return y(this)?this[it]:void 0}});for(gt in bt)p[gt]&&R(p[gt].prototype,it,gt)}T.exports={NATIVE_ARRAY_BUFFER_VIEWS:ut,TYPED_ARRAY_TAG:ht&&it,aTypedArray:xt,aTypedArrayConstructor:wt,exportTypedArrayMethod:Bt,exportTypedArrayStaticMethod:Jt,getTypedArrayConstructor:Pt,isView:Lt,isTypedArray:mt,TypedArray:_,TypedArrayPrototype:K}}),(function(T,P,a){var g=a(3),v=a(85),p=a(7),x=a(212),y=a(46),b=a(60),A=a(64),I=x.ArrayBuffer,R=x.DataView,O=R.prototype,M=v(I.prototype.slice),D=v(O.getUint8),L=v(O.setUint8),B=p(function(){return!new I(2).slice(1,void 0).byteLength});g({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:B},{slice:function(k,W){if(M&&W===void 0)return M(y(this),k);for(var U=y(this).byteLength,X=b(k,U),j=b(W===void 0?U:W,U),H=new I(A(j-X)),Y=new R(this),Z=new R(H),_=0;X<j;)L(Z,_++,D(Y,X++));return H}})}),(function(T,P,a){a(226)}),(function(T,P,a){var g=a(3),v=a(212),p=a(213);g({global:!0,constructor:!0,forced:!p},{DataView:v.DataView})}),(function(T,P,a){var g=a(3),v=a(14),p=Math.pow,x=31,y=1023,b=p(2,-24),A=.0009765625,I=function(O){var M=O>>>15,D=O>>>10&x,L=O&y;return D===x?L===0?M===0?1/0:-1/0:NaN:D===0?L*(M===0?b:-b):p(2,D-15)*(M===0?1+L*A:-1-L*A)},R=v(DataView.prototype.getUint16);g({target:"DataView",proto:!0},{getFloat16:function(M){return I(R(this,M,arguments.length>1?arguments[1]:!1))}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(229),x=a(216),y=a(230),b=a(220),A=Math.floor,I=Math.pow,R=65520,O=61005353927612305e-21,M=16777216,D=1024,L=function(F){if(F!==F)return 32256;if(F===0)return(1/F===-1/0)<<15;var k=F<0;if(k&&(F=-F),F>=R)return k<<15|31744;if(F<O)return k<<15|b(F*M);var W=A(y(F));if(W===-15)return k<<15|D;var U=b((F*I(2,-W)-1)*D);return U===D?k<<15|W+16<<10:k<<15|W+15<<10|U},B=v(DataView.prototype.setUint16);g({target:"DataView",proto:!0},{setFloat16:function(k,W){B(p(this),x(k),L(+W),arguments.length>2?arguments[2]:!1)}})}),(function(T,P,a){var g=a(69),v=TypeError;T.exports=function(p){if(g(p)==="DataView")return p;throw new v("Argument is not a DataView")}}),(function(T){var P=Math.log,a=Math.LN2;T.exports=Math.log2||function(v){return P(v)/a}}),(function(T,P,a){var g=a(6),v=a(77),p=a(232),x=ArrayBuffer.prototype;g&&!("detached"in x)&&v(x,"detached",{configurable:!0,get:function(){return p(this)}})}),(function(T,P,a){var g=a(4),v=a(213),p=a(233),x=g.DataView;T.exports=function(y){if(!v||p(y)!==0)return!1;try{return new x(y),!1}catch(b){return!0}}}),(function(T,P,a){var g=a(4),v=a(119),p=a(15),x=g.ArrayBuffer,y=g.TypeError;T.exports=x&&v(x.prototype,"byteLength","get")||function(b){if(p(b)!=="ArrayBuffer")throw new y("ArrayBuffer expected");return b.byteLength}}),(function(T,P,a){var g=a(3),v=a(235);v&&g({target:"ArrayBuffer",proto:!0},{transfer:function(){return v(this,arguments.length?arguments[0]:void 0,!0)}})}),(function(T,P,a){var g=a(4),v=a(14),p=a(119),x=a(216),y=a(236),b=a(233),A=a(237),I=a(239),R=g.structuredClone,O=g.ArrayBuffer,M=g.DataView,D=Math.max,L=Math.min,B=O.prototype,F=M.prototype,k=v(B.slice),W=p(B,"resizable","get"),U=p(B,"maxByteLength","get"),X=v(F.getInt8),j=v(F.setInt8);T.exports=(I||A)&&function(H,Y,Z){var _=b(H),K=Y===void 0?_:x(Y),tt=!W||!W(H),nt;if(y(H),I&&(H=R(H,{transfer:[H]}),_===K&&(Z||tt)))return H;if(_>=K&&(!Z||tt))nt=k(H,0,K);else{var at=Z&&!tt&&U?{maxByteLength:D(K,U(H))}:void 0;nt=new O(K,at);for(var it=new M(H),ot=new M(nt),ut=L(K,_),ht=0;ht<ut;ht++)j(ot,ht,X(it,ht))}return I||A(H),nt}}),(function(T,P,a){var g=a(232),v=TypeError;T.exports=function(p){if(g(p))throw new v("ArrayBuffer is detached");return p}}),(function(T,P,a){var g=a(4),v=a(238),p=a(239),x=g.structuredClone,y=g.ArrayBuffer,b=g.MessageChannel,A=!1,I,R,O,M;if(p)A=function(D){x(D,{transfer:[D]})};else if(y)try{b||(I=v("worker_threads"),I&&(b=I.MessageChannel)),b&&(R=new b,O=new y(2),M=function(D){R.port1.postMessage(null,[D])},O.byteLength===2&&(M(O),O.byteLength===0&&(A=M)))}catch(D){}T.exports=A}),(function(T,P,a){var g=a(4),v=a(188);T.exports=function(p){if(v){try{return g.process.getBuiltinModule(p)}catch(x){}try{return Function('return require("'+p+'")')()}catch(x){}}}}),(function(T,P,a){var g=a(4),v=a(7),p=a(27),x=a(189),y=g.structuredClone;T.exports=!!y&&!v(function(){if(x==="DENO"&&p>92||x==="NODE"&&p>94||x==="BROWSER"&&p>97)return!1;var b=new ArrayBuffer(8),A=y(b,{transfer:[b]});return b.byteLength!==0||A.byteLength!==8})}),(function(T,P,a){var g=a(3),v=a(235);v&&g({target:"ArrayBuffer",proto:!0},{transferToFixedLength:function(){return v(this,arguments.length?arguments[0]:void 0,!1)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(7),x=p(function(){return new Date(16e11).getYear()!==120}),y=v(Date.prototype.getFullYear);g({target:"Date",proto:!0,forced:x},{getYear:function(){return y(this)-1900}})}),(function(T,P,a){var g=a(3),v=a(14),p=Date,x=v(p.prototype.getTime);g({target:"Date",stat:!0},{now:function(){return x(new p)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(61),x=Date.prototype,y=v(x.getTime),b=v(x.setFullYear);g({target:"Date",proto:!0},{setYear:function(I){y(this);var R=+I;if(R!==R)return b(this,R);var O=p(R),M=O>=0&&O<=99?O+1900:O;return b(this,M)}})}),(function(T,P,a){var g=a(3);g({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})}),(function(T,P,a){var g=a(3),v=a(246);g({target:"Date",proto:!0,forced:Date.prototype.toISOString!==v},{toISOString:v})}),(function(T,P,a){var g=a(14),v=a(7),p=a(247).start,x=RangeError,y=isFinite,b=Math.abs,A=Date.prototype,I=A.toISOString,R=g(A.getTime),O=g(A.getUTCDate),M=g(A.getUTCFullYear),D=g(A.getUTCHours),L=g(A.getUTCMilliseconds),B=g(A.getUTCMinutes),F=g(A.getUTCMonth),k=g(A.getUTCSeconds);T.exports=v(function(){return I.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"})||!v(function(){I.call(new Date(NaN))})?function(){if(!y(R(this)))throw new x("Invalid time value");var U=this,X=M(U),j=L(U),H=X<0?"-":X>9999?"+":"";return H+p(b(X),H?6:4,0)+"-"+p(F(U)+1,2,0)+"-"+p(O(U),2,0)+"T"+p(D(U),2,0)+":"+p(B(U),2,0)+":"+p(k(U),2,0)+"."+p(j,3,0)+"Z"}:I}),(function(T,P,a){var g=a(14),v=a(64),p=a(68),x=a(248),y=a(16),b=g(x),A=g("".slice),I=Math.ceil,R=function(O){return function(M,D,L){var B=p(y(M)),F=v(D),k=B.length;if(F<=k)return B;var W=L===void 0?" ":p(L),U,X;return W===""?B:(U=F-k,X=b(W,I(U/W.length)),X.length>U&&(X=A(X,0,U)),O?B+X:X+B)}};T.exports={start:R(!1),end:R(!0)}}),(function(T,P,a){var g=a(61),v=a(68),p=a(16),x=RangeError,y=Math.floor;T.exports=function(A){var I=v(p(this)),R="",O=g(A);if(O<0||O===1/0)throw new x("Wrong number of repetitions");for(;O>0;(O=y(O/2))&&(I+=I))O%2&&(R+=I);return R}}),(function(T,P,a){var g=a(3),v=a(7),p=a(39),x=a(19),y=v(function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1});g({target:"Date",proto:!0,arity:1,forced:y},{toJSON:function(A){var I=p(this),R=x(I,"number");return typeof R=="number"&&!isFinite(R)?null:I.toISOString()}})}),(function(T,P,a){var g=a(38),v=a(47),p=a(251),x=a(33),y=x("toPrimitive"),b=Date.prototype;g(b,y)||v(b,y,p)}),(function(T,P,a){var g=a(46),v=a(32),p=TypeError;T.exports=function(x){if(g(this),x==="string"||x==="default")x="string";else if(x!=="number")throw new p("Incorrect hint");return v(this,x)}}),(function(T,P,a){var g=a(14),v=a(47),p=Date.prototype,x="Invalid Date",y="toString",b=g(p[y]),A=g(p.getTime);String(new Date(NaN))!==x&&v(p,y,function(){var R=A(this);return R===R?b(this):x})}),(function(T,P,a){var g=a(3),v=a(6),p=a(23),x=a(30),y=a(215),b=a(47),A=a(214),I=a(77),R=a(33),O=a(51),M=a(254),D=p("SuppressedError"),L=ReferenceError,B=R("dispose"),F=R("toStringTag"),k="DisposableStack",W=O.set,U=O.getterFor(k),X="sync-dispose",j="disposed",H="pending",Y=function(K){var tt=U(K);if(tt.state===j)throw new L(k+" already disposed");return tt},Z=function(){W(y(this,_),{type:k,state:H,stack:[]}),v||(this.disposed=!1)},_=Z.prototype;A(_,{dispose:function(){var tt=U(this);if(tt.state!==j){tt.state=j,v||(this.disposed=!0);for(var nt=tt.stack,at=nt.length,it=!1,ot;at;){var ut=nt[--at];nt[at]=null;try{ut()}catch(ht){it?ot=new D(ht,ot):(it=!0,ot=ht)}}if(tt.stack=null,it)throw ot}},use:function(tt){return M(Y(this),tt,X),tt},adopt:function(tt,nt){var at=Y(this);return x(nt),M(at,void 0,X,function(){nt(tt)}),tt},defer:function(tt){var nt=Y(this);x(tt),M(nt,void 0,X,tt)},move:function(){var tt=Y(this),nt=new Z;return U(nt).stack=tt.stack,tt.stack=[],tt.state=j,v||(this.disposed=!0),nt}}),v&&I(_,"disposed",{configurable:!0,get:function(){return U(this).state===j}}),b(_,B,_.dispose,{name:"dispose"}),b(_,F,k,{nonWritable:!0}),g({global:!0,constructor:!0},{DisposableStack:Z})}),(function(T,P,a){var g=a(23),v=a(8),p=a(14),x=a(84),y=a(46),b=a(30),A=a(17),I=a(29),R=a(33),O=R("asyncDispose"),M=R("dispose"),D=p([].push),L=function(F,k){if(k==="async-dispose"){var W=I(F,O);return W!==void 0||(W=I(F,M),W===void 0)?W:function(){var U=this,X=g("Promise");return new X(function(j){v(W,U),j(void 0)})}}return I(F,M)},B=function(F,k,W){return arguments.length<3&&!A(F)&&(W=b(L(y(F),k))),W===void 0?function(){}:x(W,F)};T.exports=function(F,k,W,U){var X;if(arguments.length<4){if(A(k)&&W==="sync-dispose")return;X=B(k,W)}else X=B(void 0,W,U);D(F.stack,X)}}),(function(T,P,a){var g=a(3),v=a(14),p=a(68),x=v("".charAt),y=v("".charCodeAt),b=v(/./.exec),A=v(1.1.toString),I=v("".toUpperCase),R=/[\w*+\-./@]/,O=function(M,D){for(var L=A(M,16);L.length<D;)L="0"+L;return L};g({global:!0},{escape:function(D){for(var L=p(D),B="",F=L.length,k=0,W,U;k<F;)W=x(L,k++),b(R,W)?B+=W:(U=y(W,0),U<256?B+="%"+I(O(U,2)):B+="%u"+I(O(U,4)));return B}})}),(function(T,P,a){var g=a(3),v=a(257);g({target:"Function",proto:!0,forced:Function.bind!==v},{bind:v})}),(function(T,P,a){var g=a(14),v=a(30),p=a(20),x=a(38),y=a(76),b=a(9),A=Function,I=g([].concat),R=g([].join),O={},M=function(D,L,B){if(!x(O,L)){for(var F=[],k=0;k<L;k++)F[k]="a["+k+"]";O[L]=A("C,a","return new C("+R(F,",")+")")}return O[L](D,B)};T.exports=b?A.bind:function(L){var B=v(this),F=B.prototype,k=y(arguments,1),W=function(){var X=I(k,y(arguments));return this instanceof W?M(B,X.length,X):B.apply(L,X)};return p(F)&&(W.prototype=F),W}}),(function(T,P,a){var g=a(21),v=a(20),p=a(44),x=a(24),y=a(33),b=a(48),A=y("hasInstance"),I=Function.prototype;A in I||p.f(I,A,{value:b(function(R){if(!g(this)||!v(R))return!1;var O=this.prototype;return v(O)?x(O,R):R instanceof this},A)})}),(function(T,P,a){var g=a(6),v=a(49).EXISTS,p=a(14),x=a(77),y=Function.prototype,b=p(y.toString),A=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,I=p(A.exec),R="name";g&&!v&&x(y,R,{configurable:!0,get:function(){try{return I(A,b(this))[1]}catch(O){return""}}})}),(function(T,P,a){var g=a(3),v=a(4);g({global:!0,forced:v.globalThis!==v},{globalThis:v})}),(function(T,P,a){var g=a(3),v=a(4),p=a(215),x=a(46),y=a(21),b=a(134),A=a(77),I=a(90),R=a(7),O=a(38),M=a(33),D=a(178).IteratorPrototype,L=a(6),B=a(36),F="constructor",k="Iterator",W=M("toStringTag"),U=TypeError,X=v[k],j=B||!y(X)||X.prototype!==D||!R(function(){X({})}),H=function(){if(p(this,D),b(this)===D)throw new U("Abstract class Iterator not directly constructable")},Y=function(Z,_){L?A(D,Z,{configurable:!0,get:function(){return _},set:function(K){if(x(this),this===D)throw new U("You can't redefine this property");O(this,Z)?this[Z]=K:I(this,Z,K)}}):D[Z]=_};O(D,W)||Y(W,k),(j||!O(D,F)||D[F]===Object)&&Y(F,H),H.prototype=D,g({global:!0,constructor:!0,forced:j},{Iterator:H})}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(140),b=a(263),A=a(36),I=Array,R=b(function(){for(;;){var O=this.iterator;if(!O){var M=this.nextIterableIndex++,D=this.iterables;if(M>=D.length){this.done=!0;return}var L=D[M];this.iterables[M]=null,O=this.iterator=x(v(L.method,L.iterable)),this.next=O.next}var B=x(v(this.next,O));if(B.done){this.iterator=null,this.next=null;continue}return B.value}});g({target:"Iterator",stat:!0,forced:A},{concat:function(){for(var M=arguments.length,D=I(M),L=0;L<M;L++){var B=x(arguments[L]);D[L]={iterable:B,method:p(y(B))}}return new R({iterables:D,nextIterableIndex:0,iterator:null,next:null})}})}),(function(T,P,a){var g=a(8),v=a(71),p=a(43),x=a(214),y=a(33),b=a(51),A=a(29),I=a(178).IteratorPrototype,R=a(179),O=a(141),M=a(264),D=y("toStringTag"),L="IteratorHelper",B="WrapForValidIterator",F="normal",k="throw",W=b.set,U=function(H){var Y=b.getterFor(H?B:L);return x(v(I),{next:function(){var _=Y(this);if(H)return _.nextHandler();if(_.done)return R(void 0,!0);try{var K=_.nextHandler();return _.returnHandlerResult?K:R(K,_.done)}catch(tt){throw _.done=!0,tt}},return:function(){var Z=Y(this),_=Z.iterator,K=Z.done;if(Z.done=!0,H){var tt=A(_,"return");return tt?g(tt,_):R(void 0,!0)}if(K)return R(void 0,!0);if(Z.inner)try{O(Z.inner.iterator,F)}catch(nt){return O(_,k,nt)}if(Z.openIters)try{M(Z.openIters,F)}catch(nt){if(_)return O(_,k,nt);throw nt}return _&&O(_,F),R(void 0,!0)}})},X=U(!0),j=U(!1);p(j,D,"Iterator Helper"),T.exports=function(H,Y,Z){var _=function(tt,nt){nt?(nt.iterator=tt.iterator,nt.next=tt.next):nt=tt,nt.type=Y?B:L,nt.returnHandlerResult=!!Z,nt.nextHandler=H,nt.counter=0,nt.done=!1,W(this,nt)};return _.prototype=Y?X:j,_}}),(function(T,P,a){var g=a(141);T.exports=function(v,p,x){for(var y=v.length-1;y>=0;y--)if(v[y]!==void 0)try{x=g(v[y].iterator,p,x)}catch(b){p="throw",x=b}if(p==="throw")throw x;return x}}),(function(T,P,a){var g=a(8),v=a(47),p=a(29),x=a(38),y=a(33),b=a(178).IteratorPrototype,A=y("dispose");x(b,A)||v(b,A,function(){var I=p(this,"return");I&&g(I,this)})}),(function(T,P,a){var g=a(3),v=a(8),p=a(46),x=a(267),y=a(268),b=a(269),A=a(141),I=a(263),R=a(270),O=a(271),M=a(36),D=!M&&!R("drop",0),L=!M&&!D&&O("drop",RangeError),B=M||D||L,F=I(function(){for(var k=this.iterator,W=this.next,U,X;this.remaining;)if(this.remaining--,U=p(v(W,k)),X=this.done=!!U.done,X)return;if(U=p(v(W,k)),X=this.done=!!U.done,!X)return U.value});g({target:"Iterator",proto:!0,real:!0,forced:B},{drop:function(W){p(this);var U;try{U=b(y(+W))}catch(X){A(this,"throw",X)}return L?v(L,this,U):new F(x(this),{remaining:U})}})}),(function(T){T.exports=function(P){return{iterator:P,next:P.next,done:!1}}}),(function(T){var P=RangeError;T.exports=function(a){if(a===a)return a;throw new P("NaN is not allowed")}}),(function(T,P,a){var g=a(61),v=RangeError;T.exports=function(p){var x=g(p);if(x<0)throw new v("The argument can't be less than 0");return x}}),(function(T){T.exports=function(P,a){var g=typeof Iterator=="function"&&Iterator.prototype[P];if(g)try{g.call({next:null},a).next()}catch(v){return!0}}}),(function(T,P,a){var g=a(4);T.exports=function(v,p){var x=g.Iterator,y=x&&x.prototype,b=y&&y[v],A=!1;if(b)try{b.call({next:function(){return{done:!0}},return:function(){A=!0}},-1)}catch(I){I instanceof p||(A=!1)}if(!A)return b}}),(function(T,P,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),A=a(141),I=a(271),R=I("every",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{every:function(M){y(this);try{x(M)}catch(B){A(this,"throw",B)}if(R)return v(R,this,M);var D=b(this),L=0;return!p(D,function(B,F){if(!M(B,L++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),b=a(263),A=a(170),I=a(36),R=a(141),O=a(270),M=a(271),D=!I&&!O("filter",function(){}),L=!I&&!D&&M("filter",TypeError),B=I||D||L,F=b(function(){for(var k=this.iterator,W=this.predicate,U=this.next,X,j,H;;){if(X=x(v(U,k)),j=this.done=!!X.done,j)return;if(H=X.value,A(k,W,[H,this.counter++],!0))return H}});g({target:"Iterator",proto:!0,real:!0,forced:B},{filter:function(W){x(this);try{p(W)}catch(U){R(this,"throw",U)}return L?v(L,this,W):new F(y(this),{predicate:W})}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),A=a(141),I=a(271),R=I("find",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{find:function(M){y(this);try{x(M)}catch(B){A(this,"throw",B)}if(R)return v(R,this,M);var D=b(this),L=0;return p(D,function(B,F){if(M(B,L++))return F(B)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),b=a(276),A=a(263),I=a(141),R=a(36),O=a(270),M=a(271);function D(){try{var W=Iterator.prototype.flatMap.call(new Map([[4,5]]).entries(),function(U){return U});W.next(),W.return()}catch(U){return!0}}var L=!R&&!O("flatMap",function(){}),B=!R&&!L&&M("flatMap",TypeError),F=R||L||B||D(),k=A(function(){for(var W=this.iterator,U=this.mapper,X,j;;){if(j=this.inner)try{if(X=x(v(j.next,j.iterator)),!X.done)return X.value;this.inner=null}catch(H){I(W,"throw",H)}if(X=x(v(this.next,W)),this.done=!!X.done)return;try{this.inner=b(U(X.value,this.counter++),!1)}catch(H){I(W,"throw",H)}}});g({target:"Iterator",proto:!0,real:!0,forced:F},{flatMap:function(U){x(this);try{p(U)}catch(X){I(this,"throw",X)}return B?v(B,this,U):new k(y(this),{mapper:U,inner:null})}})}),(function(T,P,a){var g=a(8),v=a(46),p=a(267),x=a(140);T.exports=function(y,b){(!b||typeof y!="string")&&v(y);var A=x(y);return p(v(A!==void 0?g(A,y):y))}}),(function(T,P,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),A=a(141),I=a(271),R=I("forEach",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{forEach:function(M){y(this);try{x(M)}catch(B){A(this,"throw",B)}if(R)return v(R,this,M);var D=b(this),L=0;p(D,function(B){M(B,L++)},{IS_RECORD:!0})}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(39),x=a(24),y=a(178).IteratorPrototype,b=a(263),A=a(276),I=a(36),R=I||(function(){try{Iterator.from({return:null}).return()}catch(M){return!0}})(),O=b(function(){return v(this.next,this.iterator)},!0);g({target:"Iterator",stat:!0,forced:R},{from:function(D){var L=A(typeof D=="string"?p(D):D,!0);return x(y,L.iterator)?L.iterator:new O(L)}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),b=a(263),A=a(170),I=a(141),R=a(270),O=a(271),M=a(36),D=!M&&!R("map",function(){}),L=!M&&!D&&O("map",TypeError),B=M||D||L,F=b(function(){var k=this.iterator,W=x(v(this.next,k)),U=this.done=!!W.done;if(!U)return A(k,this.mapper,[W.value,this.counter++],!0)});g({target:"Iterator",proto:!0,real:!0,forced:B},{map:function(W){x(this);try{p(W)}catch(U){I(this,"throw",U)}return L?v(L,this,W):new F(y(this),{mapper:W})}})}),(function(T,P,a){var g=a(3),v=a(136),p=a(30),x=a(46),y=a(267),b=a(141),A=a(271),I=a(95),R=a(7),O=TypeError,M=R(function(){[].keys().reduce(function(){},void 0)}),D=!M&&A("reduce",O);g({target:"Iterator",proto:!0,real:!0,forced:M||D},{reduce:function(B){x(this);try{p(B)}catch(X){b(this,"throw",X)}var F=arguments.length<2,k=F?void 0:arguments[1];if(D)return I(D,this,F?[B]:[B,k]);var W=y(this),U=0;if(v(W,function(X){F?(F=!1,k=X):k=B(k,X,U),U++},{IS_RECORD:!0}),F)throw new O("Reduce of empty iterator with no initial value");return k}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),b=a(267),A=a(141),I=a(271),R=I("some",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:R},{some:function(M){y(this);try{x(M)}catch(B){A(this,"throw",B)}if(R)return v(R,this,M);var D=b(this),L=0;return p(D,function(B,F){if(M(B,L++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(46),x=a(267),y=a(268),b=a(269),A=a(263),I=a(141),R=a(270),O=a(271),M=a(36),D=!M&&!R("take",1),L=!M&&!D&&O("take",RangeError),B=M||D||L,F=A(function(){var k=this.iterator;if(!this.remaining--)return this.done=!0,I(k,"normal",void 0);var W=p(v(this.next,k)),U=this.done=!!W.done;if(!U)return W.value});g({target:"Iterator",proto:!0,real:!0,forced:B},{take:function(W){p(this);var U;try{U=b(y(+W))}catch(X){I(this,"throw",X)}return L?v(L,this,U):new F(x(this),{remaining:U})}})}),(function(T,P,a){var g=a(3),v=a(46),p=a(90),x=a(136),y=a(267);g({target:"Iterator",proto:!0,real:!0},{toArray:function(){var A=[],I=0;return x(y(v(this)),function(R){p(A,I++,R)},{IS_RECORD:!0}),A}})}),(function(T,P,a){var g=a(3),v=a(98),p=a(96);g({target:"JSON",stat:!0,forced:!v},{isRawJSON:p})}),(function(T,P,a){var g=a(3),v=a(6),p=a(4),x=a(23),y=a(14),b=a(8),A=a(21),I=a(20),R=a(88),O=a(38),M=a(68),D=a(63),L=a(90),B=a(7),F=a(97),k=a(26),W=p.JSON,U=p.Number,X=p.SyntaxError,j=W&&W.parse,H=x("Object","keys"),Y=Object.getOwnPropertyDescriptor,Z=y("".charAt),_=y("".slice),K=y(/./.exec),tt=y([].push),nt=/^\d$/,at=/^[1-9]$/,it=/^[\d-]$/,ot=/^[\t\n\r ]$/,ut=0,ht=1,gt=function(mt,xt){mt=M(mt);var wt=new Ft(mt,0,""),Bt=wt.parse(),Jt=Bt.value,Ot=wt.skip(ot,Bt.end);if(Ot<mt.length)throw new X('Unexpected extra character: "'+Z(mt,Ot)+'" after the parsed data at: '+Ot);return A(xt)?yt({"":Jt},"",xt,Bt):Jt},yt=function(mt,xt,wt,Bt){var Jt=mt[xt],Ot=Bt&&Jt===Bt.value,jt=Ot&&typeof Bt.source=="string"?{source:Bt.source}:{},ie,me,se,he,Oe;if(I(Jt)){var Me=R(Jt),Re=Ot?Bt.nodes:Me?[]:{};if(Me)for(ie=Re.length,se=D(Jt),he=0;he<se;he++)Et(Jt,he,yt(Jt,""+he,wt,he<ie?Re[he]:void 0));else for(me=H(Jt),se=D(me),he=0;he<se;he++)Oe=me[he],Et(Jt,Oe,yt(Jt,Oe,wt,O(Re,Oe)?Re[Oe]:void 0))}return b(wt,mt,xt,Jt,jt)},Et=function(mt,xt,wt){if(v){var Bt=Y(mt,xt);if(Bt&&!Bt.configurable)return}wt===void 0?delete mt[xt]:L(mt,xt,wt)},bt=function(mt,xt,wt,Bt){this.value=mt,this.end=xt,this.source=wt,this.nodes=Bt},Ft=function(mt,xt){this.source=mt,this.index=xt};Ft.prototype={fork:function(mt){return new Ft(this.source,mt)},parse:function(){var mt=this.source,xt=this.skip(ot,this.index),wt=this.fork(xt),Bt=Z(mt,xt);if(K(it,Bt))return wt.number();switch(Bt){case"{":return wt.object();case"[":return wt.array();case'"':return wt.string();case"t":return wt.keyword(!0);case"f":return wt.keyword(!1);case"n":return wt.keyword(null)}throw new X('Unexpected character: "'+Bt+'" at: '+xt)},node:function(mt,xt,wt,Bt,Jt){return new bt(xt,Bt,mt?null:_(this.source,wt,Bt),Jt)},object:function(){for(var mt=this.source,xt=this.index+1,wt=!1,Bt={},Jt={},Ot=!1;xt<mt.length;){if(xt=this.until(['"',"}"],xt),Z(mt,xt)==="}"&&!wt){xt++,Ot=!0;break}var jt=this.fork(xt).string(),ie=jt.value;xt=jt.end,xt=this.until([":"],xt)+1,xt=this.skip(ot,xt),jt=this.fork(xt).parse(),L(Jt,ie,jt),L(Bt,ie,jt.value),xt=this.until([",","}"],jt.end);var me=Z(mt,xt);if(me===",")wt=!0,xt++;else if(me==="}"){xt++,Ot=!0;break}}if(!Ot)throw new X("Unterminated object at: "+xt);return this.node(ht,Bt,this.index,xt,Jt)},array:function(){for(var mt=this.source,xt=this.index+1,wt=!1,Bt=[],Jt=[],Ot=!1;xt<mt.length;){if(xt=this.skip(ot,xt),Z(mt,xt)==="]"&&!wt){xt++,Ot=!0;break}var jt=this.fork(xt).parse();if(tt(Jt,jt),tt(Bt,jt.value),xt=this.until([",","]"],jt.end),Z(mt,xt)===",")wt=!0,xt++;else if(Z(mt,xt)==="]"){xt++,Ot=!0;break}}if(!Ot)throw new X("Unterminated array at: "+xt);return this.node(ht,Bt,this.index,xt,Jt)},string:function(){var mt=this.index,xt=F(this.source,this.index+1);return this.node(ut,xt.value,mt,xt.end)},number:function(){var mt=this.source,xt=this.index,wt=xt;if(Z(mt,wt)==="-"&&wt++,Z(mt,wt)==="0")wt++;else if(K(at,Z(mt,wt)))wt=this.skip(nt,wt+1);else throw new X("Failed to parse number at: "+wt);if(Z(mt,wt)==="."){var Bt=wt+1;if(wt=this.skip(nt,Bt),Bt===wt)throw new X("Failed to parse number's fraction at: "+wt)}if(Z(mt,wt)==="e"||Z(mt,wt)==="E"){wt++,(Z(mt,wt)==="+"||Z(mt,wt)==="-")&&wt++;var Jt=wt;if(wt=this.skip(nt,wt),Jt===wt)throw new X("Failed to parse number's exponent value at: "+wt)}return this.node(ut,U(_(mt,xt,wt)),xt,wt)},keyword:function(mt){var xt=""+mt,wt=this.index,Bt=wt+xt.length;if(_(this.source,wt,Bt)!==xt)throw new X("Failed to parse value at: "+wt);return this.node(ut,mt,wt,Bt)},skip:function(mt,xt){for(var wt=this.source;xt<wt.length&&K(mt,Z(wt,xt));xt++);return xt},until:function(mt,xt){xt=this.skip(ot,xt);for(var wt=Z(this.source,xt),Bt=0;Bt<mt.length;Bt++)if(mt[Bt]===wt)return xt;throw new X('Unexpected character: "'+wt+'" at: '+xt)}};var Lt=B(function(){var mt="9007199254740993",xt;return j(mt,function(wt,Bt,Jt){xt=Jt.source}),xt!==mt}),Pt=k&&!B(function(){return 1/j("-0 ")!==-1/0});g({target:"JSON",stat:!0,forced:Lt},{parse:function(xt,wt){return Pt&&!A(wt)?j(xt):gt(xt,wt)}})}),(function(T,P,a){var g=a(3),v=a(287),p=a(98),x=a(23),y=a(14),b=a(68),A=a(90),I=a(51).set,R=SyntaxError,O=x("JSON","parse"),M=x("Object","create"),D=x("Object","freeze"),L=y("".charAt),B="Unacceptable as raw JSON",F=function(k){return k===" "||k===" "||k===`
|
|
26
|
+
`||k==="\r"};g({target:"JSON",stat:!0,forced:!p},{rawJSON:function(W){var U=b(W);if(U===""||F(L(U,0))||F(L(U,U.length-1)))throw new R(B);var X=O(U);if(typeof X=="object"&&X!==null)throw new R(B);var j=M(null);return I(j,{type:"RawJSON"}),A(j,"rawJSON",U),v?D(j):j}})}),(function(T,P,a){var g=a(7);T.exports=!g(function(){return Object.isExtensible(Object.preventExtensions({}))})}),(function(T,P,a){var g=a(4),v=a(82);v(g.JSON,"JSON",!0)}),(function(T,P,a){a(290)}),(function(T,P,a){var g=a(291),v=a(295);g("Map",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},v)}),(function(T,P,a){var g=a(3),v=a(4),p=a(14),x=a(67),y=a(47),b=a(292),A=a(136),I=a(215),R=a(21),O=a(17),M=a(20),D=a(7),L=a(171),B=a(82),F=a(123);T.exports=function(k,W,U){var X=k.indexOf("Map")!==-1,j=k.indexOf("Weak")!==-1,H=X?"set":"add",Y=v[k],Z=Y&&Y.prototype,_=Y,K={},tt=function(gt){var yt=p(Z[gt]);y(Z,gt,gt==="add"?function(bt){return yt(this,bt===0?0:bt),this}:gt==="delete"?function(Et){return j&&!M(Et)?!1:yt(this,Et===0?0:Et)}:gt==="get"?function(bt){return j&&!M(bt)?void 0:yt(this,bt===0?0:bt)}:gt==="has"?function(bt){return j&&!M(bt)?!1:yt(this,bt===0?0:bt)}:function(bt,Ft){return yt(this,bt===0?0:bt,Ft),this})},nt=x(k,!R(Y)||!(j||Z.forEach&&!D(function(){new Y().entries().next()})));if(nt)_=U.getConstructor(W,k,X,H),b.enable();else if(x(k,!0)){var at=new _,it=at[H](j?{}:-0,1)!==at,ot=D(function(){at.has(1)}),ut=L(function(gt){new Y(gt)}),ht=!j&&D(function(){for(var gt=new Y,yt=5;yt--;)gt[H](yt,yt);return!gt.has(-0)});ut||(_=W(function(gt,yt){I(gt,Z);var Et=F(new Y,gt,_);return O(yt)||A(yt,Et[H],{that:Et,AS_ENTRIES:X}),Et}),_.prototype=Z,Z.constructor=_),(ot||ht)&&(tt("delete"),tt("has"),X&&tt("get")),(ht||it)&&tt(H),j&&Z.clear&&delete Z.clear}return K[k]=_,g({global:!0,constructor:!0,forced:_!==Y},K),B(_,k),j||U.setStrong(_,k,X),_}}),(function(T,P,a){var g=a(3),v=a(14),p=a(54),x=a(20),y=a(38),b=a(44).f,A=a(57),I=a(75),R=a(293),O=a(40),M=a(287),D=!1,L=O("meta"),B=0,F=function(H){b(H,L,{value:{objectID:"O"+B++,weakData:{}}})},k=function(H,Y){if(!x(H))return typeof H=="symbol"?H:(typeof H=="string"?"S":"P")+H;if(!y(H,L)){if(!R(H))return"F";if(!Y)return"E";F(H)}return H[L].objectID},W=function(H,Y){if(!y(H,L)){if(!R(H))return!0;if(!Y)return!1;F(H)}return H[L].weakData},U=function(H){return M&&D&&R(H)&&!y(H,L)&&F(H),H},X=function(){j.enable=function(){},D=!0;var H=A.f,Y=v([].splice),Z={};Z[L]=1,H(Z).length&&(A.f=function(_){for(var K=H(_),tt=0,nt=K.length;tt<nt;tt++)if(K[tt]===L){Y(K,tt,1);break}return K},g({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:I.f}))},j=T.exports={enable:X,fastKey:k,getWeakData:W,onFreeze:U};p[L]=!0}),(function(T,P,a){var g=a(7),v=a(20),p=a(15),x=a(294),y=Object.isExtensible,b=g(function(){y(1)});T.exports=b||x?function(I){return!v(I)||x&&p(I)==="ArrayBuffer"?!1:y?y(I):!0}:y}),(function(T,P,a){var g=a(7);T.exports=g(function(){if(typeof ArrayBuffer=="function"){var v=new ArrayBuffer(8);Object.isExtensible(v)&&Object.defineProperty(v,"a",{value:8})}})}),(function(T,P,a){var g=a(71),v=a(77),p=a(214),x=a(84),y=a(215),b=a(17),A=a(136),I=a(176),R=a(179),O=a(200),M=a(6),D=a(292).fastKey,L=a(51),B=L.set,F=L.getterFor;T.exports={getConstructor:function(k,W,U,X){var j=k(function(K,tt){y(K,H),B(K,{type:W,index:g(null),first:null,last:null,size:0}),M||(K.size=0),b(tt)||A(tt,K[X],{that:K,AS_ENTRIES:U})}),H=j.prototype,Y=F(W),Z=function(K,tt,nt){var at=Y(K),it=_(K,tt),ot,ut;return it?it.value=nt:(at.last=it={index:ut=D(tt,!0),key:tt,value:nt,previous:ot=at.last,next:null,removed:!1},at.first||(at.first=it),ot&&(ot.next=it),M?at.size++:K.size++,ut!=="F"&&(at.index[ut]=it)),K},_=function(K,tt){var nt=Y(K),at=D(tt),it;if(at!=="F")return nt.index[at];for(it=nt.first;it;it=it.next)if(it.key===tt)return it};return p(H,{clear:function(){for(var tt=this,nt=Y(tt),at=nt.first;at;)at.removed=!0,at.previous&&(at.previous=at.previous.next=null),at=at.next;nt.first=nt.last=null,nt.index=g(null),M?nt.size=0:tt.size=0},delete:function(K){var tt=this,nt=Y(tt),at=_(tt,K);if(at){var it=at.next,ot=at.previous;delete nt.index[at.index],at.removed=!0,ot&&(ot.next=it),it&&(it.previous=ot),nt.first===at&&(nt.first=it),nt.last===at&&(nt.last=ot),M?nt.size--:tt.size--}return!!at},forEach:function(tt){for(var nt=Y(this),at=x(tt,arguments.length>1?arguments[1]:void 0),it;it=it?it.next:nt.first;)for(at(it.value,it.key,this);it&&it.removed;)it=it.previous},has:function(tt){return!!_(this,tt)}}),p(H,U?{get:function(tt){var nt=_(this,tt);return nt&&nt.value},set:function(tt,nt){return Z(this,tt===0?0:tt,nt)}}:{add:function(tt){return Z(this,tt=tt===0?0:tt,tt)}}),M&&v(H,"size",{configurable:!0,get:function(){return Y(this).size}}),j},setStrong:function(k,W,U){var X=W+" Iterator",j=F(W),H=F(X);I(k,W,function(Y,Z){B(this,{type:X,target:Y,state:j(Y),kind:Z,last:null})},function(){for(var Y=H(this),Z=Y.kind,_=Y.last;_&&_.removed;)_=_.previous;return!Y.target||!(Y.last=_=_?_.next:Y.state.first)?(Y.target=null,R(void 0,!0)):R(Z==="keys"?_.key:Z==="values"?_.value:[_.key,_.value],!1)},U?"entries":"values",!U,!0),O(W)}}}),(function(T,P,a){var g=a(3),v=a(14),p=a(30),x=a(16),y=a(136),b=a(297),A=a(36),I=a(7),R=b.Map,O=b.has,M=b.get,D=b.set,L=v([].push),B=A||I(function(){return R.groupBy("ab",function(F){return F}).get("a").length!==1});g({target:"Map",stat:!0,forced:A||B},{groupBy:function(k,W){x(k),p(W);var U=new R,X=0;return y(k,function(j){var H=W(j,X++);O(U,H)?L(M(U,H),j):D(U,H,[j])}),U}})}),(function(T,P,a){var g=a(14),v=Map.prototype;T.exports={Map,set:g(v.set),get:g(v.get),has:g(v.has),remove:g(v.delete),proto:v}}),(function(T,P,a){var g=a(3),v=a(297),p=a(36),x=v.get,y=v.has,b=v.set;g({target:"Map",proto:!0,real:!0,forced:p},{getOrInsert:function(I,R){return y(this,I)?x(this,I):(b(this,I,R),R)}})}),(function(T,P,a){var g=a(3),v=a(30),p=a(297),x=a(36),y=p.get,b=p.has,A=p.set;g({target:"Map",proto:!0,real:!0,forced:x},{getOrInsertComputed:function(R,O){var M=b(this,R);if(v(O),M)return y(this,R);R===0&&1/R===-1/0&&(R=0);var D=O(R);return A(this,R,D),D}})}),(function(T,P,a){var g=a(3),v=a(301),p=Math.acosh,x=Math.log,y=Math.sqrt,b=Math.LN2,A=!p||Math.floor(p(Number.MAX_VALUE))!==710||p(1/0)!==1/0;g({target:"Math",stat:!0,forced:A},{acosh:function(R){var O=+R;return O<1?NaN:O>9490626562425156e-8?x(O)+b:v(O-1+y(O-1)*y(O+1))}})}),(function(T){var P=Math.log;T.exports=Math.log1p||function(g){var v=+g;return v>-1e-8&&v<1e-8?v-v*v/2:P(1+v)}}),(function(T,P,a){var g=a(3),v=Math.asinh,p=Math.log,x=Math.sqrt,y=Math.LN2,b=9490626562425156e-8;function A(R){var O=+R;return!isFinite(O)||O===0?O:O<0?-A(-O):O>b?p(O)+y:p(O+x(O*O+1))}var I=!(v&&1/v(0)>0);g({target:"Math",stat:!0,forced:I},{asinh:A})}),(function(T,P,a){var g=a(3),v=a(301),p=Math.atanh,x=!(p&&1/p(-0)<0);g({target:"Math",stat:!0,forced:x},{atanh:function(b){var A=+b;return A===0?A:v(2*A/(1-A))/2}})}),(function(T,P,a){var g=a(3),v=a(219),p=Math.abs,x=Math.pow;g({target:"Math",stat:!0},{cbrt:function(b){var A=+b;return v(A)*x(p(A),.3333333333333333)}})}),(function(T,P,a){var g=a(3),v=Math.floor,p=Math.log,x=Math.LOG2E;g({target:"Math",stat:!0},{clz32:function(b){var A=b>>>0;return A?31-v(p(A+.5)*x):32}})}),(function(T,P,a){var g=a(3),v=a(307),p=Math.cosh,x=Math.abs,y=Math.E,b=!p||p(710)===1/0;g({target:"Math",stat:!0,forced:b},{cosh:function(I){var R=v(x(I)-1)+1;return(R+1/(R*y*y))*(y/2)}})}),(function(T){var P=Math.expm1,a=Math.exp;T.exports=!P||P(10)>22025.465794806718||P(10)<22025.465794806718||P(-2e-17)!==-2e-17?function(v){var p=+v;return p===0?p:p>-1e-6&&p<1e-6?p+p*p/2:a(p)-1}:P}),(function(T,P,a){var g=a(3),v=a(307);g({target:"Math",stat:!0,forced:v!==Math.expm1},{expm1:v})}),(function(T,P,a){var g=a(3),v=a(217);g({target:"Math",stat:!0},{fround:v})}),(function(T,P,a){var g=a(3),v=a(218),p=.0009765625,x=65504,y=6103515625e-14;g({target:"Math",stat:!0},{f16round:function(A){return v(A,p,x,y)}})}),(function(T,P,a){var g=a(3),v=Math.hypot,p=Math.abs,x=Math.sqrt,y=!!v&&v(1/0,NaN)!==1/0;g({target:"Math",stat:!0,arity:2,forced:y},{hypot:function(A,I){for(var R=0,O=0,M=arguments.length,D=0,L,B;O<M;)L=p(arguments[O++]),D<L?(B=D/L,R=R*B*B+1,D=L):L>0?(B=L/D,R+=B*B):R+=L;return D===1/0?1/0:D*x(R)}})}),(function(T,P,a){var g=a(3),v=a(7),p=Math.imul,x=v(function(){return p(4294967295,5)!==-5||p.length!==2});g({target:"Math",stat:!0,forced:x},{imul:function(b,A){var I=65535,R=+b,O=+A,M=I&R,D=I&O;return 0|M*D+((I&R>>>16)*D+M*(I&O>>>16)<<16>>>0)}})}),(function(T,P,a){var g=a(3),v=a(314);g({target:"Math",stat:!0},{log10:v})}),(function(T){var P=Math.log,a=Math.LOG10E;T.exports=Math.log10||function(v){return P(v)*a}}),(function(T,P,a){var g=a(3),v=a(301);g({target:"Math",stat:!0},{log1p:v})}),(function(T,P,a){var g=a(3),v=a(230);g({target:"Math",stat:!0},{log2:v})}),(function(T,P,a){var g=a(3),v=a(219);g({target:"Math",stat:!0},{sign:v})}),(function(T,P,a){var g=a(3),v=a(7),p=a(307),x=Math.abs,y=Math.exp,b=Math.E,A=v(function(){return Math.sinh(-2e-17)!==-2e-17});g({target:"Math",stat:!0,forced:A},{sinh:function(R){var O=+R;return x(O)<1?(p(O)-p(-O))/2:(y(O-1)-y(-O-1))*(b/2)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(136),x=RangeError,y=TypeError,b=1/0,A=NaN,I=Math.abs,R=Math.pow,O=v([].push),M=R(2,1023),D=R(2,53)-1,L=Number.MAX_VALUE,B=R(2,971),F={},k={},W={},U={},X={},j=function(H,Y){var Z=H+Y,_=Y-(Z-H);return{hi:Z,lo:_}};g({target:"Math",stat:!0},{sumPrecise:function(Y){var Z=[],_=0,K=U;switch(p(Y,function(mt){if(++_>D)throw new x("Maximum allowed index exceeded");if(typeof mt!="number")throw new y("Value is not a number");K!==F&&(mt!==mt?K=F:mt===b?K=K===k?F:W:mt===-b?K=K===W?F:k:(mt!==0||1/mt===b)&&(K===U||K===X)&&(K=X,O(Z,mt)))}),K){case F:return A;case k:return-b;case W:return b;case U:return-0}for(var tt=[],nt=0,at,it,ot,ut,ht,gt,yt=0;yt<Z.length;yt++){at=Z[yt];for(var Et=0,bt=0;bt<tt.length;bt++){if(it=tt[bt],I(at)<I(it)&&(gt=at,at=it,it=gt),ot=j(at,it),ut=ot.hi,ht=ot.lo,I(ut)===b){var Ft=ut===b?1:-1;nt+=Ft,at=at-Ft*M-Ft*M,I(at)<I(it)&&(gt=at,at=it,it=gt),ot=j(at,it),ut=ot.hi,ht=ot.lo}ht!==0&&(tt[Et++]=ht),at=ut}tt.length=Et,at!==0&&O(tt,at)}var Lt=tt.length-1;if(ut=0,ht=0,nt!==0){var Pt=Lt>=0?tt[Lt]:0;if(Lt--,I(nt)>1||nt>0&&Pt>0||nt<0&&Pt<0)return nt>0?b:-b;if(ot=j(nt*M,Pt/2),ut=ot.hi,ht=ot.lo,ht*=2,I(2*ut)===b)return ut>0?ut===M&&ht===-(B/2)&&Lt>=0&&tt[Lt]<0?L:b:ut===-M&&ht===B/2&&Lt>=0&&tt[Lt]>0?-L:-b;ht!==0&&(tt[++Lt]=ht,ht=0),ut*=2}for(;Lt>=0&&(ot=j(ut,tt[Lt--]),ut=ot.hi,ht=ot.lo,ht===0););return Lt>=0&&(ht<0&&tt[Lt]<0||ht>0&&tt[Lt]>0)&&(it=ht*2,at=ut+it,it===at-ut&&(ut=at)),ut}})}),(function(T,P,a){var g=a(3),v=a(307),p=Math.exp;g({target:"Math",stat:!0},{tanh:function(y){var b=+y,A=v(b),I=v(-b);return A===1/0?1:I===1/0?-1:(A-I)/(p(b)+p(-b))}})}),(function(T,P,a){var g=a(82);g(Math,"Math",!0)}),(function(T,P,a){var g=a(3),v=a(62);g({target:"Math",stat:!0},{trunc:v})}),(function(T,P,a){var g=a(3),v=a(36),p=a(6),x=a(4),y=a(80),b=a(14),A=a(67),I=a(38),R=a(123),O=a(24),M=a(22),D=a(19),L=a(7),B=a(57).f,F=a(5).f,k=a(44).f,W=a(324),U=a(325).trim,X="Number",j=x[X],H=y[X],Y=j.prototype,Z=x.TypeError,_=b("".slice),K=b("".charCodeAt),tt=function(ht){var gt=D(ht,"number");return typeof gt=="bigint"?gt:nt(gt)},nt=function(ht){var gt=D(ht,"number"),yt,Et,bt,Ft,Lt,Pt,mt,xt;if(M(gt))throw new Z("Cannot convert a Symbol value to a number");if(typeof gt=="string"&>.length>2){if(gt=U(gt),yt=K(gt,0),yt===43||yt===45){if(Et=K(gt,2),Et===88||Et===120)return NaN}else if(yt===48){switch(K(gt,1)){case 66:case 98:bt=2,Ft=49;break;case 79:case 111:bt=8,Ft=55;break;default:return+gt}for(Lt=_(gt,2),Pt=Lt.length,mt=0;mt<Pt;mt++)if(xt=K(Lt,mt),xt<48||xt>Ft)return NaN;return parseInt(Lt,bt)}}return+gt},at=A(X,!j(" 0o1")||!j("0b1")||j("+0x1")),it=function(ht){return O(Y,ht)&&L(function(){W(ht)})},ot=function(gt){var yt=arguments.length<1?0:j(tt(gt));return it(this)?R(Object(yt),this,ot):yt};ot.prototype=Y,at&&!v&&(Y.constructor=ot),g({global:!0,constructor:!0,wrap:!0,forced:at},{Number:ot});var ut=function(ht,gt){for(var yt=p?B(gt):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),Et=0,bt;yt.length>Et;Et++)I(gt,bt=yt[Et])&&!I(ht,bt)&&k(ht,bt,F(gt,bt))};v&&H&&ut(y[X],H),(at||v)&&ut(y[X],j)}),(function(T,P,a){var g=a(14);T.exports=g(1.1.valueOf)}),(function(T,P,a){var g=a(14),v=a(16),p=a(68),x=a(326),y=g("".replace),b=RegExp("^["+x+"]+"),A=RegExp("(^|[^"+x+"])["+x+"]+$"),I=function(R){return function(O){var M=p(v(O));return R&1&&(M=y(M,b,"")),R&2&&(M=y(M,A,"$1")),M}};T.exports={start:I(1),end:I(2),trim:I(3)}}),(function(T){T.exports=`
|
|
27
|
+
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`}),(function(T,P,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})}),(function(T,P,a){var g=a(3),v=a(329);g({target:"Number",stat:!0},{isFinite:v})}),(function(T,P,a){var g=a(4),v=g.isFinite;T.exports=Number.isFinite||function(x){return typeof x=="number"&&v(x)}}),(function(T,P,a){var g=a(3),v=a(331);g({target:"Number",stat:!0},{isInteger:v})}),(function(T,P,a){var g=a(20),v=Math.floor;T.exports=Number.isInteger||function(x){return!g(x)&&isFinite(x)&&v(x)===x}}),(function(T,P,a){var g=a(3);g({target:"Number",stat:!0},{isNaN:function(p){return p!==p}})}),(function(T,P,a){var g=a(3),v=a(331),p=Math.abs;g({target:"Number",stat:!0},{isSafeInteger:function(y){return v(y)&&p(y)<=9007199254740991}})}),(function(T,P,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})}),(function(T,P,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})}),(function(T,P,a){var g=a(3),v=a(337);g({target:"Number",stat:!0,forced:Number.parseFloat!==v},{parseFloat:v})}),(function(T,P,a){var g=a(4),v=a(7),p=a(14),x=a(68),y=a(325).trim,b=a(326),A=p("".charAt),I=g.parseFloat,R=g.Symbol,O=R&&R.iterator,M=1/I(b+"-0")!==-1/0||O&&!v(function(){I(Object(O))});T.exports=M?function(L){var B=y(x(L)),F=I(B);return F===0&&A(B,0)==="-"?-0:F}:I}),(function(T,P,a){var g=a(3),v=a(339);g({target:"Number",stat:!0,forced:Number.parseInt!==v},{parseInt:v})}),(function(T,P,a){var g=a(4),v=a(7),p=a(14),x=a(68),y=a(325).trim,b=a(326),A=g.parseInt,I=g.Symbol,R=I&&I.iterator,O=/^[+-]?0x/i,M=p(O.exec),D=A(b+"08")!==8||A(b+"0x16")!==22||R&&!v(function(){A(Object(R))});T.exports=D?function(B,F){var k=y(x(B));return A(k,F>>>0||(M(O,k)?16:10))}:A}),(function(T,P,a){var g=a(3),v=a(14),p=a(61),x=a(324),y=a(248),b=a(314),A=a(7),I=RangeError,R=String,O=isFinite,M=Math.abs,D=Math.floor,L=Math.pow,B=Math.round,F=v(1.1.toExponential),k=v(y),W=v("".slice),U=L(10,308),X=F(-69e-12,4)==="-6.9000e-11"&&F(1.255,2)==="1.25e+0"&&F(12345,3)==="1.235e+4"&&F(25,0)==="3e+1",j=function(){return A(function(){F(1,1/0)})&&A(function(){F(1,-1/0)})},H=function(){return!A(function(){F(1/0,1/0),F(NaN,1/0)})},Y=!X||!j()||!H();g({target:"Number",proto:!0,forced:Y},{toExponential:function(_){var K=x(this);if(_===void 0)return F(K);var tt=p(_);if(!O(K))return String(K);if(tt<0||tt>20)throw new I("Incorrect fraction digits");if(X)return F(K,tt);var nt="",at,it,ot,ut,ht,gt,yt;return K<0&&(nt="-",K=-K),K===0?(it=0,at=k("0",tt+1)):(ht=b(K),it=D(ht),tt-it>=308?yt=K*U*L(10,tt-it-308):yt=K/L(10,it-tt),gt=B(yt),yt-gt>=.5&&(gt+=1),gt>=L(10,tt+1)&&(gt/=10,it+=1),at=R(gt)),tt!==0&&(at=W(at,0,1)+"."+W(at,1)),it===0?(ot="+",ut="0"):(ot=it>0?"+":"-",ut=R(M(it))),at+="e"+ot+ut,nt+at}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(61),x=a(324),y=a(248),b=a(7),A=RangeError,I=String,R=Math.floor,O=v(y),M=v("".slice),D=v(1.1.toFixed),L=function(X,j,H){return j===0?H:j%2===1?L(X,j-1,H*X):L(X*X,j/2,H)},B=function(X){for(var j=0,H=X;H>=4096;)j+=12,H/=4096;for(;H>=2;)j+=1,H/=2;return j},F=function(X,j,H){for(var Y=-1,Z=H;++Y<6;)Z+=j*X[Y],X[Y]=Z%1e7,Z=R(Z/1e7)},k=function(X,j){for(var H=6,Y=0;--H>=0;)Y+=X[H],X[H]=R(Y/j),Y=Y%j*1e7},W=function(X){for(var j=6,H="";--j>=0;)if(H!==""||j===0||X[j]!==0){var Y=I(X[j]);H=H===""?Y:H+O("0",7-Y.length)+Y}return H},U=b(function(){return D(8e-5,3)!=="0.000"||D(.9,0)!=="1"||D(1.255,2)!=="1.25"||D(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!b(function(){D({})});g({target:"Number",proto:!0,forced:U},{toFixed:function(j){var H=x(this),Y=p(j),Z=[0,0,0,0,0,0],_="",K="0",tt,nt,at,it;if(Y<0||Y>20)throw new A("Incorrect fraction digits");if(H!==H)return"NaN";if(H<=-1e21||H>=1e21)return I(H);if(H<0&&(_="-",H=-H),H>1e-21)if(tt=B(H*L(2,69,1))-69,nt=tt<0?H*L(2,-tt,1):H/L(2,tt,1),nt*=4503599627370496,tt=52-tt,tt>0){for(F(Z,0,nt),at=Y;at>=7;)F(Z,1e7,0),at-=7;for(F(Z,L(10,at,1),0),at=tt-1;at>=23;)k(Z,8388608),at-=23;k(Z,1<<at),F(Z,1,1),k(Z,2),K=W(Z)}else F(Z,0,nt),F(Z,1<<-tt,0),K=W(Z)+O("0",Y);return Y>0?(it=K.length,K=_+(it<=Y?"0."+O("0",Y-it)+K:M(K,0,it-Y)+"."+M(K,it-Y))):K=_+K,K}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(7),x=a(324),y=v(1.1.toPrecision),b=p(function(){return y(1,void 0)!=="1"})||!p(function(){y({})});g({target:"Number",proto:!0,forced:b},{toPrecision:function(I){return I===void 0?y(x(this)):y(x(this),I)}})}),(function(T,P,a){var g=a(3),v=a(344);g({target:"Object",stat:!0,arity:2,forced:Object.assign!==v},{assign:v})}),(function(T,P,a){var g=a(6),v=a(14),p=a(8),x=a(7),y=a(73),b=a(66),A=a(10),I=a(39),R=a(13),O=Object.assign,M=Object.defineProperty,D=v([].concat);T.exports=!O||x(function(){if(g&&O({b:1},O(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var L={},B={},F=Symbol("assign detection"),k="abcdefghijklmnopqrst";return L[F]=7,k.split("").forEach(function(W){B[W]=W}),O({},L)[F]!==7||y(O({},B)).join("")!==k})?function(B,F){for(var k=I(B),W=arguments.length,U=1,X=b.f,j=A.f;W>U;)for(var H=R(arguments[U++]),Y=X?D(y(H),X(H)):y(H),Z=Y.length,_=0,K;Z>_;)K=Y[_++],(!g||p(j,H,K))&&(k[K]=H[K]);return k}:O}),(function(T,P,a){var g=a(3),v=a(6),p=a(71);g({target:"Object",stat:!0,sham:!v},{create:p})}),(function(T,P,a){var g=a(3),v=a(6),p=a(347),x=a(30),y=a(39),b=a(44);v&&g({target:"Object",proto:!0,forced:p},{__defineGetter__:function(I,R){b.f(y(this),I,{get:x(R),enumerable:!0,configurable:!0})}})}),(function(T,P,a){var g=a(36),v=a(4),p=a(7),x=a(198);T.exports=g||!p(function(){if(!(x&&x<535)){var y=Math.random();__defineSetter__.call(null,y,function(){}),delete v[y]}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(72).f;g({target:"Object",stat:!0,forced:Object.defineProperties!==p,sham:!v},{defineProperties:p})}),(function(T,P,a){var g=a(3),v=a(6),p=a(44).f;g({target:"Object",stat:!0,forced:Object.defineProperty!==p,sham:!v},{defineProperty:p})}),(function(T,P,a){var g=a(3),v=a(6),p=a(347),x=a(30),y=a(39),b=a(44);v&&g({target:"Object",proto:!0,forced:p},{__defineSetter__:function(I,R){b.f(y(this),I,{set:x(R),enumerable:!0,configurable:!0})}})}),(function(T,P,a){var g=a(3),v=a(352).entries;g({target:"Object",stat:!0},{entries:function(x){return v(x)}})}),(function(T,P,a){var g=a(6),v=a(7),p=a(14),x=a(134),y=a(73),b=a(12),A=a(10).f,I=p(A),R=p([].push),O=g&&v(function(){var D=Object.create(null);return D[2]=2,!I(D,2)}),M=function(D){return function(L){for(var B=b(L),F=y(B),k=O&&x(B)===null,W=F.length,U=0,X=[],j;W>U;)j=F[U++],(!g||(k?j in B:I(B,j)))&&R(X,D?[j,B[j]]:B[j]);return X}};T.exports={entries:M(!0),values:M(!1)}}),(function(T,P,a){var g=a(3),v=a(287),p=a(7),x=a(20),y=a(292).onFreeze,b=Object.freeze,A=p(function(){b(1)});g({target:"Object",stat:!0,forced:A,sham:!v},{freeze:function(R){return b&&x(R)?b(y(R)):R}})}),(function(T,P,a){var g=a(3),v=a(136),p=a(90);g({target:"Object",stat:!0},{fromEntries:function(y){var b={};return v(y,function(A,I){p(b,A,I)},{AS_ENTRIES:!0}),b}})}),(function(T,P,a){var g=a(3),v=a(7),p=a(12),x=a(5).f,y=a(6),b=!y||v(function(){x(1)});g({target:"Object",stat:!0,forced:b,sham:!y},{getOwnPropertyDescriptor:function(I,R){return x(p(I),R)}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(56),x=a(12),y=a(5),b=a(90);g({target:"Object",stat:!0,sham:!v},{getOwnPropertyDescriptors:function(I){for(var R=x(I),O=y.f,M=p(R),D={},L=0,B,F;M.length>L;)F=O(R,B=M[L++]),F!==void 0&&b(D,B,F);return D}})}),(function(T,P,a){var g=a(3),v=a(7),p=a(75).f,x=v(function(){return!Object.getOwnPropertyNames(1)});g({target:"Object",stat:!0,forced:x},{getOwnPropertyNames:p})}),(function(T,P,a){var g=a(3),v=a(7),p=a(39),x=a(134),y=a(135),b=v(function(){x(1)});g({target:"Object",stat:!0,forced:b,sham:!y},{getPrototypeOf:function(I){return x(p(I))}})}),(function(T,P,a){var g=a(3),v=a(90),p=a(23),x=a(14),y=a(30),b=a(16),A=a(18),I=a(136),R=a(7),O=Object.groupBy,M=p("Object","create"),D=x([].push),L=!O||R(function(){return O("ab",function(B){return B}).a.length!==1});g({target:"Object",stat:!0,forced:L},{groupBy:function(F,k){b(F),y(k);var W=M(null),U=0;return I(F,function(X){var j=A(k(X,U++));j in W?D(W[j],X):v(W,j,[X])}),W}})}),(function(T,P,a){var g=a(3),v=a(38);g({target:"Object",stat:!0},{hasOwn:v})}),(function(T,P,a){var g=a(3),v=a(362);g({target:"Object",stat:!0},{is:v})}),(function(T){T.exports=Object.is||function(a,g){return a===g?a!==0||1/a===1/g:a!==a&&g!==g}}),(function(T,P,a){var g=a(3),v=a(293);g({target:"Object",stat:!0,forced:Object.isExtensible!==v},{isExtensible:v})}),(function(T,P,a){var g=a(3),v=a(7),p=a(20),x=a(15),y=a(294),b=Object.isFrozen,A=y||v(function(){b(1)});g({target:"Object",stat:!0,forced:A},{isFrozen:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,P,a){var g=a(3),v=a(7),p=a(20),x=a(15),y=a(294),b=Object.isSealed,A=y||v(function(){b(1)});g({target:"Object",stat:!0,forced:A},{isSealed:function(R){return!p(R)||y&&x(R)==="ArrayBuffer"?!0:b?b(R):!1}})}),(function(T,P,a){var g=a(3),v=a(39),p=a(73),x=a(7),y=x(function(){p(1)});g({target:"Object",stat:!0,forced:y},{keys:function(A){return p(v(A))}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(347),x=a(39),y=a(18),b=a(134),A=a(5).f;v&&g({target:"Object",proto:!0,forced:p},{__lookupGetter__:function(R){var O=x(this),M=y(R),D;do if(D=A(O,M))return D.get;while(O=b(O))}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(347),x=a(39),y=a(18),b=a(134),A=a(5).f;v&&g({target:"Object",proto:!0,forced:p},{__lookupSetter__:function(R){var O=x(this),M=y(R),D;do if(D=A(O,M))return D.set;while(O=b(O))}})}),(function(T,P,a){var g=a(3),v=a(20),p=a(292).onFreeze,x=a(287),y=a(7),b=Object.preventExtensions,A=y(function(){b(1)});g({target:"Object",stat:!0,forced:A,sham:!x},{preventExtensions:function(R){return b&&v(R)?b(p(R)):R}})}),(function(T,P,a){var g=a(6),v=a(77),p=a(20),x=a(121),y=a(39),b=a(16),A=Object.getPrototypeOf,I=Object.setPrototypeOf,R=Object.prototype,O="__proto__";if(g&&A&&I&&!(O in R))try{v(R,O,{configurable:!0,get:function(){return A(y(this))},set:function(D){var L=b(this);x(D)&&p(L)&&I(L,D)}})}catch(M){}}),(function(T,P,a){var g=a(3),v=a(20),p=a(292).onFreeze,x=a(287),y=a(7),b=Object.seal,A=y(function(){b(1)});g({target:"Object",stat:!0,forced:A,sham:!x},{seal:function(R){return b&&v(R)?b(p(R)):R}})}),(function(T,P,a){var g=a(3),v=a(118);g({target:"Object",stat:!0},{setPrototypeOf:v})}),(function(T,P,a){var g=a(70),v=a(47),p=a(374);g||v(Object.prototype,"toString",p,{unsafe:!0})}),(function(T,P,a){var g=a(70),v=a(69);T.exports=g?{}.toString:function(){return"[object "+v(this)+"]"}}),(function(T,P,a){var g=a(3),v=a(352).values;g({target:"Object",stat:!0},{values:function(x){return v(x)}})}),(function(T,P,a){var g=a(3),v=a(337);g({global:!0,forced:parseFloat!==v},{parseFloat:v})}),(function(T,P,a){var g=a(3),v=a(339);g({global:!0,forced:parseInt!==v},{parseInt:v})}),(function(T,P,a){a(379),a(395),a(397),a(398),a(399),a(400)}),(function(T,P,a){var g=a(3),v=a(36),p=a(188),x=a(4),y=a(80),b=a(8),A=a(47),I=a(118),R=a(82),O=a(200),M=a(30),D=a(21),L=a(20),B=a(215),F=a(380),k=a(382).set,W=a(385),U=a(390),X=a(391),j=a(387),H=a(51),Y=a(392),Z=a(393),_=a(394),K="Promise",tt=Z.CONSTRUCTOR,nt=Z.REJECTION_EVENT,at=Z.SUBCLASSING,it=H.getterFor(K),ot=H.set,ut=Y&&Y.prototype,ht=Y,gt=ut,yt=x.TypeError,Et=x.document,bt=x.process,Ft=_.f,Lt=Ft,Pt=!!(Et&&Et.createEvent&&x.dispatchEvent),mt="unhandledrejection",xt="rejectionhandled",wt=0,Bt=1,Jt=2,Ot=1,jt=2,ie,me,se,he,Oe=function(Yt){var ee;return L(Yt)&&D(ee=Yt.then)?ee:!1},Me=function(Yt,ee){var pe=ee.value,ce=ee.state===Bt,Pe=ce?Yt.ok:Yt.fail,ln=Yt.resolve,It=Yt.reject,Xt=Yt.domain,Mt,$t,_t;try{Pe?(ce||(ee.rejection===jt&&Ht(ee),ee.rejection=Ot),Pe===!0?Mt=pe:(Xt&&Xt.enter(),Mt=Pe(pe),Xt&&(Xt.exit(),_t=!0)),Mt===Yt.promise?It(new yt("Promise-chain cycle")):($t=Oe(Mt))?b($t,Mt,ln,It):ln(Mt)):It(pe)}catch(Nt){Xt&&!_t&&Xt.exit(),It(Nt)}},Re=function(Yt,ee){Yt.notified||(Yt.notified=!0,W(function(){for(var pe=Yt.reactions,ce;ce=pe.get();)Me(ce,Yt);Yt.notified=!1,ee&&!Yt.rejection&&Te(Yt)}))},ge=function(Yt,ee,pe){var ce,Pe;Pt?(ce=Et.createEvent("Event"),ce.promise=ee,ce.reason=pe,ce.initEvent(Yt,!1,!0),x.dispatchEvent(ce)):ce={promise:ee,reason:pe},!nt&&(Pe=x["on"+Yt])?Pe(ce):Yt===mt&&U("Unhandled promise rejection",pe)},Te=function(Yt){b(k,x,function(){var ee=Yt.facade,pe=Yt.value,ce=Ve(Yt),Pe;if(ce&&(Pe=X(function(){p?bt.emit("unhandledRejection",pe,ee):ge(mt,ee,pe)}),Yt.rejection=p||Ve(Yt)?jt:Ot,Pe.error))throw Pe.value})},Ve=function(Yt){return Yt.rejection!==Ot&&!Yt.parent},Ht=function(Yt){b(k,x,function(){var ee=Yt.facade;p?bt.emit("rejectionHandled",ee):ge(xt,ee,Yt.value)})},ne=function(Yt,ee,pe){return function(ce){Yt(ee,ce,pe)}},ae=function(Yt,ee,pe){Yt.done||(Yt.done=!0,pe&&(Yt=pe),Yt.value=ee,Yt.state=Jt,Re(Yt,!0))},rn=function(Yt,ee,pe){if(!Yt.done){Yt.done=!0,pe&&(Yt=pe);try{if(Yt.facade===ee)throw new yt("Promise can't be resolved itself");var ce=Oe(ee);ce?W(function(){var Pe={done:!1};try{b(ce,ee,ne(rn,Pe,Yt),ne(ae,Pe,Yt))}catch(ln){ae(Pe,ln,Yt)}}):(Yt.value=ee,Yt.state=Bt,Re(Yt,!1))}catch(Pe){ae({done:!1},Pe,Yt)}}};if(tt&&(ht=function(ee){B(this,gt),M(ee),b(ie,this);var pe=it(this);try{ee(ne(rn,pe),ne(ae,pe))}catch(ce){ae(pe,ce)}},gt=ht.prototype,ie=function(ee){ot(this,{type:K,done:!1,notified:!1,parent:!1,reactions:new j,rejection:!1,state:wt,value:null})},ie.prototype=A(gt,"then",function(ee,pe){var ce=it(this),Pe=Ft(F(this,ht));return ce.parent=!0,Pe.ok=D(ee)?ee:!0,Pe.fail=D(pe)&&pe,Pe.domain=p?bt.domain:void 0,ce.state===wt?ce.reactions.add(Pe):W(function(){Me(Pe,ce)}),Pe.promise}),me=function(){var Yt=new ie,ee=it(Yt);this.promise=Yt,this.resolve=ne(rn,ee),this.reject=ne(ae,ee)},_.f=Ft=function(Yt){return Yt===ht||Yt===se?new me(Yt):Lt(Yt)},!v&&D(Y)&&ut!==Object.prototype)){he=ut.then,at||A(ut,"then",function(ee,pe){var ce=this;return new ht(function(Pe,ln){b(he,ce,Pe,ln)}).then(ee,pe)},{unsafe:!0});try{delete ut.constructor}catch(Yt){}I&&I(ut,gt)}g({global:!0,constructor:!0,wrap:!0,forced:tt},{Promise:ht}),se=y.Promise,R(ht,K,!1,!0),O(K)}),(function(T,P,a){var g=a(46),v=a(381),p=a(17),x=a(33),y=x("species");T.exports=function(b,A){var I=g(b).constructor,R;return I===void 0||p(R=g(I)[y])?A:v(R)}}),(function(T,P,a){var g=a(89),v=a(31),p=TypeError;T.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not a constructor")}}),(function(T,P,a){var g=a(4),v=a(95),p=a(84),x=a(21),y=a(38),b=a(7),A=a(74),I=a(76),R=a(42),O=a(383),M=a(384),D=a(188),L=g.setImmediate,B=g.clearImmediate,F=g.process,k=g.Dispatch,W=g.Function,U=g.MessageChannel,X=g.String,j=0,H={},Y="onreadystatechange",Z,_,K,tt;b(function(){Z=g.location});var nt=function(ut){if(y(H,ut)){var ht=H[ut];delete H[ut],ht()}},at=function(ut){return function(){nt(ut)}},it=function(ut){nt(ut.data)},ot=function(ut){g.postMessage(X(ut),Z.protocol+"//"+Z.host)};(!L||!B)&&(L=function(ht){O(arguments.length,1);var gt=x(ht)?ht:W(ht),yt=I(arguments,1);return H[++j]=function(){v(gt,void 0,yt)},_(j),j},B=function(ht){delete H[ht]},D?_=function(ut){F.nextTick(at(ut))}:k&&k.now?_=function(ut){k.now(at(ut))}:U&&!M?(K=new U,tt=K.port2,K.port1.onmessage=it,_=p(tt.postMessage,tt)):g.addEventListener&&x(g.postMessage)&&!g.importScripts&&Z&&Z.protocol!=="file:"&&!b(ot)?(_=ot,g.addEventListener("message",it,!1)):Y in R("script")?_=function(ut){A.appendChild(R("script"))[Y]=function(){A.removeChild(this),nt(ut)}}:_=function(ut){setTimeout(at(ut),0)}),T.exports={set:L,clear:B}}),(function(T){var P=TypeError;T.exports=function(a,g){if(a<g)throw new P("Not enough arguments");return a}}),(function(T,P,a){var g=a(28);T.exports=/ipad|iphone|ipod/i.test(g)&&/applewebkit/i.test(g)}),(function(T,P,a){var g=a(4),v=a(386),p=a(84),x=a(382).set,y=a(387),b=a(384),A=a(388),I=a(389),R=a(188),O=g.MutationObserver||g.WebKitMutationObserver,M=g.document,D=g.process,L=g.Promise,B=v("queueMicrotask"),F,k,W,U,X;if(!B){var j=new y,H=function(){var Y,Z;for(R&&(Y=D.domain)&&Y.exit();Z=j.get();)try{Z()}catch(_){throw j.head&&F(),_}Y&&Y.enter()};!b&&!R&&!I&&O&&M?(k=!0,W=M.createTextNode(""),new O(H).observe(W,{characterData:!0}),F=function(){W.data=k=!k}):!A&&L&&L.resolve?(U=L.resolve(void 0),U.constructor=L,X=p(U.then,U),F=function(){X(H)}):R?F=function(){D.nextTick(H)}:(x=p(x,g),F=function(){x(H)}),B=function(Y){j.head||F(),j.add(Y)}}T.exports=B}),(function(T,P,a){var g=a(4),v=a(6),p=Object.getOwnPropertyDescriptor;T.exports=function(x){if(!v)return g[x];var y=p(g,x);return y&&y.value}}),(function(T){var P=function(){this.head=null,this.tail=null};P.prototype={add:function(a){var g={item:a,next:null},v=this.tail;v?v.next=g:this.head=g,this.tail=g},get:function(){var a=this.head;if(a){var g=this.head=a.next;return g===null&&(this.tail=null),a.item}}},T.exports=P}),(function(T,P,a){var g=a(28);T.exports=/ipad|iphone|ipod/i.test(g)&&typeof Pebble!="undefined"}),(function(T,P,a){var g=a(28);T.exports=/web0s(?!.*chrome)/i.test(g)}),(function(T){T.exports=function(P,a){try{arguments.length===1?console.error(P):console.error(P,a)}catch(g){}}}),(function(T){T.exports=function(P){try{return{error:!1,value:P()}}catch(a){return{error:!0,value:a}}}}),(function(T,P,a){var g=a(4);T.exports=g.Promise}),(function(T,P,a){var g=a(4),v=a(392),p=a(21),x=a(67),y=a(50),b=a(33),A=a(189),I=a(36),R=a(27),O=v&&v.prototype,M=b("species"),D=!1,L=p(g.PromiseRejectionEvent),B=x("Promise",function(){var F=y(v),k=F!==String(v);if(!k&&R===66||I&&!(O.catch&&O.finally))return!0;if(!R||R<51||!/native code/.test(F)){var W=new v(function(j){j(1)}),U=function(j){j(function(){},function(){})},X=W.constructor={};if(X[M]=U,D=W.then(function(){})instanceof U,!D)return!0}return!k&&(A==="BROWSER"||A==="DENO")&&!L});T.exports={CONSTRUCTOR:B,REJECTION_EVENT:L,SUBCLASSING:D}}),(function(T,P,a){var g=a(30),v=TypeError,p=function(x){var y,b;this.promise=new x(function(A,I){if(y!==void 0||b!==void 0)throw new v("Bad Promise constructor");y=A,b=I}),this.resolve=g(y),this.reject=g(b)};T.exports.f=function(x){return new p(x)}}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),b=a(136),A=a(396);g({target:"Promise",stat:!0,forced:A},{all:function(R){var O=this,M=x.f(O),D=M.resolve,L=M.reject,B=y(function(){var F=p(O.resolve),k=[],W=0,U=1;b(R,function(X){var j=W++,H=!1;U++,v(F,O,X).then(function(Y){H||(H=!0,k[j]=Y,--U||D(k))},L)}),--U||D(k)});return B.error&&L(B.value),M.promise}})}),(function(T,P,a){var g=a(392),v=a(171),p=a(393).CONSTRUCTOR;T.exports=p||!v(function(x){g.all(x).then(void 0,function(){})})}),(function(T,P,a){var g=a(3),v=a(36),p=a(393).CONSTRUCTOR,x=a(392),y=a(23),b=a(21),A=a(47),I=x&&x.prototype;if(g({target:"Promise",proto:!0,forced:p,real:!0},{catch:function(O){return this.then(void 0,O)}}),!v&&b(x)){var R=y("Promise").prototype.catch;I.catch!==R&&A(I,"catch",R,{unsafe:!0})}}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),b=a(136),A=a(396);g({target:"Promise",stat:!0,forced:A},{race:function(R){var O=this,M=x.f(O),D=M.reject,L=y(function(){var B=p(O.resolve);b(R,function(F){v(B,O,F).then(M.resolve,D)})});return L.error&&D(L.value),M.promise}})}),(function(T,P,a){var g=a(3),v=a(394),p=a(393).CONSTRUCTOR;g({target:"Promise",stat:!0,forced:p},{reject:function(y){var b=v.f(this),A=b.reject;return A(y),b.promise}})}),(function(T,P,a){var g=a(3),v=a(23),p=a(36),x=a(392),y=a(393).CONSTRUCTOR,b=a(401),A=v("Promise"),I=p&&!y;g({target:"Promise",stat:!0,forced:p||y},{resolve:function(O){return b(I&&this===A?x:this,O)}})}),(function(T,P,a){var g=a(46),v=a(20),p=a(394);T.exports=function(x,y){if(g(x),v(y)&&y.constructor===x)return y;var b=p.f(x),A=b.resolve;return A(y),b.promise}}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),b=a(136),A=a(396);g({target:"Promise",stat:!0,forced:A},{allSettled:function(R){var O=this,M=x.f(O),D=M.resolve,L=M.reject,B=y(function(){var F=p(O.resolve),k=[],W=0,U=1;b(R,function(X){var j=W++,H=!1;U++,v(F,O,X).then(function(Y){H||(H=!0,k[j]={status:"fulfilled",value:Y},--U||D(k))},function(Y){H||(H=!0,k[j]={status:"rejected",reason:Y},--U||D(k))})}),--U||D(k)});return B.error&&L(B.value),M.promise}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(30),x=a(23),y=a(394),b=a(391),A=a(136),I=a(396),R="No one promise resolved";g({target:"Promise",stat:!0,forced:I},{any:function(M){var D=this,L=x("AggregateError"),B=y.f(D),F=B.resolve,k=B.reject,W=b(function(){var U=p(D.resolve),X=[],j=0,H=1,Y=!1;A(M,function(Z){var _=j++,K=!1;H++,v(U,D,Z).then(function(tt){K||Y||(Y=!0,F(tt))},function(tt){K||Y||(K=!0,X[_]=tt,--H||k(new L(X,R)))})}),--H||k(new L(X,R))});return W.error&&k(W.value),B.promise}})}),(function(T,P,a){var g=a(3),v=a(36),p=a(392),x=a(7),y=a(23),b=a(21),A=a(380),I=a(401),R=a(47),O=p&&p.prototype,M=!!p&&x(function(){O.finally.call({then:function(){}},function(){})});if(g({target:"Promise",proto:!0,real:!0,forced:M},{finally:function(L){var B=A(this,y("Promise")),F=b(L);return this.then(F?function(k){return I(B,L()).then(function(){return k})}:L,F?function(k){return I(B,L()).then(function(){throw k})}:L)}}),!v&&b(p)){var D=y("Promise").prototype.finally;O.finally!==D&&R(O,"finally",D,{unsafe:!0})}}),(function(T,P,a){var g=a(3),v=a(4),p=a(95),x=a(76),y=a(394),b=a(30),A=a(391),I=v.Promise,R=!1,O=!I||!I.try||A(function(){I.try(function(M){R=M===8},8)}).error||!R;g({target:"Promise",stat:!0,forced:O},{try:function(M){var D=arguments.length>1?x(arguments,1):[],L=y.f(this),B=A(function(){return p(b(M),void 0,D)});return(B.error?L.reject:L.resolve)(B.value),L.promise}})}),(function(T,P,a){var g=a(3),v=a(394);g({target:"Promise",stat:!0},{withResolvers:function(){var x=v.f(this);return{promise:x.promise,resolve:x.resolve,reject:x.reject}}})}),(function(T,P,a){var g=a(3),v=a(408),p=a(7),x=Array.fromAsync,y=!x||p(function(){var b=0;return x.call(function(){return b++,[]},{length:0}),b!==1});g({target:"Array",stat:!0,forced:y},{fromAsync:v})}),(function(T,P,a){var g=a(84),v=a(14),p=a(89),x=a(409),y=a(139),b=a(267),A=a(140),I=a(29),R=a(23),O=a(205),M=a(33),D=a(410),L=a(412).toArray,B=M("asyncIterator"),F=v(O("Array","values")),k=v(F([]).next),W=function(){return new U(this)},U=function(X){this.iterator=F(X)};U.prototype.next=function(){return k(this.iterator)},T.exports=function(j){var H=this,Y=arguments.length,Z=Y>1?arguments[1]:void 0,_=Y>2?arguments[2]:void 0;return new(R("Promise"))(function(K){Z!==void 0&&(Z=g(Z,_));var tt=I(j,B),nt=tt?void 0:A(j)||W,at=p(H)?new H:[],it=tt?x(j,tt):new D(b(y(j,nt)));K(L(it,Z,at))})}}),(function(T,P,a){var g=a(8),v=a(410),p=a(46),x=a(139),y=a(267),b=a(29),A=a(33),I=A("asyncIterator");T.exports=function(R,O){var M=arguments.length<2?b(R,I):O;return M?p(g(M,R)):new v(y(x(R)))}}),(function(T,P,a){var g=a(8),v=a(46),p=a(71),x=a(29),y=a(214),b=a(51),A=a(141),I=a(23),R=a(411),O=a(179),M=I("Promise"),D="AsyncFromSyncIterator",L=b.set,B=b.getterFor(D),F=function(W,U,X,j,H){var Y=W.done;M.resolve(W.value).then(function(Z){U(O(Z,Y))},function(Z){if(!Y&&H)try{A(j,"throw",Z)}catch(_){Z=_}X(Z)})},k=function(U){U.type=D,L(this,U)};k.prototype=y(p(R),{next:function(){var U=B(this),X=arguments.length>0,j=X?arguments[0]:void 0;return new M(function(H,Y){var Z=v(X?g(U.next,U.iterator,j):g(U.next,U.iterator));F(Z,H,Y,U.iterator,!0)})},return:function(){var W=B(this),U=W.iterator,X=arguments.length>0,j=X?arguments[0]:void 0;return new M(function(H,Y){var Z=x(U,"return");if(Z===void 0)return H(O(j,!0));var _=v(X?g(Z,U,j):g(Z,U));F(_,H,Y,U)})},throw:function(){var W=B(this),U=W.iterator,X=arguments.length>0,j=X?arguments[0]:void 0;return new M(function(H,Y){var Z=x(U,"throw");if(Z===void 0){try{A(U,"normal")}catch(K){return Y(K)}return Y(new TypeError("The iterator does not provide a throw method"))}var _=v(X?g(Z,U,j):g(Z,U));F(_,H,Y,U,!0)})}}),T.exports=k}),(function(T,P,a){var g=a(4),v=a(35),p=a(21),x=a(71),y=a(134),b=a(47),A=a(33),I=a(36),R="USE_FUNCTION_CONSTRUCTOR",O=A("asyncIterator"),M=g.AsyncIterator,D=v.AsyncIteratorPrototype,L,B;if(D)L=D;else if(p(M))L=M.prototype;else if(v[R]||g[R])try{B=y(y(y(Function("return async function*(){}()")()))),y(B)===Object.prototype&&(L=B)}catch(F){}L?I&&(L=x(L)):L={},p(L[O])||b(L,O,function(){return this}),T.exports=L}),(function(T,P,a){var g=a(8),v=a(30),p=a(46),x=a(20),y=a(147),b=a(23),A=a(90),I=a(148),R=a(267),O=a(413),M=function(D){var L=D===0,B=D===1,F=D===2,k=D===3;return function(W,U,X){p(W);var j=U!==void 0;(j||!L)&&v(U);var H=R(W),Y=b("Promise"),Z=H.iterator,_=H.next,K=0;return new Y(function(tt,nt){var at=function(ot){O(Z,nt,ot,nt)},it=function(){try{try{y(K)}catch(ot){return at(ot)}Y.resolve(p(g(_,Z))).then(function(ot){try{if(p(ot).done)L?(I(X,K),tt(X)):tt(k?!1:F||void 0);else{var ut=ot.value;try{if(j){var ht=K++,gt=U(ut,ht),yt=function(Et){if(B)it();else if(F)Et?it():O(Z,tt,!1,nt);else if(L)try{A(X,ht,Et),it()}catch(bt){at(bt)}else Et?O(Z,tt,k||ut,nt):it()};x(gt)?Y.resolve(gt).then(yt,at):yt(gt)}else A(X,K++,ut),it()}catch(Et){at(Et)}}}catch(Et){nt(Et)}},nt)}catch(ot){nt(ot)}};it()})}};T.exports={toArray:M(0),forEach:M(1),every:M(2),some:M(3),find:M(4)}}),(function(T,P,a){var g=a(8),v=a(46),p=a(23),x=a(29);T.exports=function(y,b,A,I){try{var R=x(y,"return");if(R)return p("Promise").resolve(g(R,y)).then(function(O){try{b!==I&&v(O)}catch(M){I(M);return}b(A)},function(O){b===I?b(A):I(O)})}catch(O){return I(b===I?A:O)}b(A)}}),(function(T,P,a){var g=a(3),v=a(6),p=a(23),x=a(30),y=a(215),b=a(47),A=a(214),I=a(77),R=a(33),O=a(51),M=a(254),D=a(27),L=p("Promise"),B=p("SuppressedError"),F=ReferenceError,k=R("asyncDispose"),W=R("toStringTag"),U="AsyncDisposableStack",X=O.set,j=O.getterFor(U),H="async-dispose",Y="disposed",Z="pending",_=function(at){var it=j(at);if(it.state===Y)throw new F(U+" already disposed");return it},K=function(){X(y(this,tt),{type:U,state:Z,stack:[]}),v||(this.disposed=!1)},tt=K.prototype;A(tt,{disposeAsync:function(){var it=this;return new L(function(ot,ut){var ht=j(it);if(ht.state===Y)return ot(void 0);ht.state=Y,v||(it.disposed=!0);var gt=ht.stack,yt=gt.length,Et=!1,bt,Ft=function(Pt){Et?bt=new B(Pt,bt):(Et=!0,bt=Pt),Lt()},Lt=function(){if(yt){var Pt=gt[--yt];gt[yt]=null;try{L.resolve(Pt()).then(Lt,Ft)}catch(mt){Ft(mt)}}else ht.stack=null,Et?ut(bt):ot(void 0)};Lt()})},use:function(it){return M(_(this),it,H),it},adopt:function(it,ot){var ut=_(this);return x(ot),M(ut,void 0,H,function(){return ot(it)}),it},defer:function(it){var ot=_(this);x(it),M(ot,void 0,H,it)},move:function(){var it=_(this),ot=new K;return j(ot).stack=it.stack,it.stack=[],it.state=Y,v||(this.disposed=!0),ot}}),v&&I(tt,"disposed",{configurable:!0,get:function(){return j(this).state===Y}}),b(tt,k,tt.disposeAsync,{name:"disposeAsync"}),b(tt,W,U,{nonWritable:!0});var nt=D&&D<136;g({global:!0,constructor:!0,forced:nt},{AsyncDisposableStack:K})}),(function(T,P,a){var g=a(8),v=a(47),p=a(23),x=a(29),y=a(38),b=a(33),A=a(411),I=b("asyncDispose"),R=p("Promise");y(A,I)||v(A,I,function(){var O=this;return new R(function(M,D){var L=x(O,"return");L?R.resolve(g(L,O)).then(function(){M(void 0)},D):M(void 0)})})}),(function(T,P,a){var g=a(3),v=a(95),p=a(30),x=a(46),y=a(7),b=!y(function(){Reflect.apply(function(){})});g({target:"Reflect",stat:!0,forced:b},{apply:function(I,R,O){return v(p(I),R,x(O))}})}),(function(T,P,a){var g=a(3),v=a(23),p=a(95),x=a(257),y=a(381),b=a(46),A=a(20),I=a(71),R=a(7),O=v("Reflect","construct"),M=Object.prototype,D=[].push,L=R(function(){function k(){}return!(O(function(){},[],k)instanceof k)}),B=!R(function(){O(function(){})}),F=L||B;g({target:"Reflect",stat:!0,forced:F,sham:F},{construct:function(W,U){y(W);var X=arguments.length<3?W:y(arguments[2]);if(b(U),B&&!L)return O(W,U,X);if(W===X){switch(U.length){case 0:return new W;case 1:return new W(U[0]);case 2:return new W(U[0],U[1]);case 3:return new W(U[0],U[1],U[2]);case 4:return new W(U[0],U[1],U[2],U[3])}var j=[null];return p(D,j,U),new(p(x,W,j))}var H=X.prototype,Y=I(A(H)?H:M),Z=p(W,Y,U);return A(Z)?Z:Y}})}),(function(T,P,a){var g=a(3),v=a(6),p=a(46),x=a(18),y=a(44),b=a(21),A=a(7),I=TypeError,R=A(function(){Reflect.defineProperty(y.f({},1,{value:1}),1,{value:2})});g({target:"Reflect",stat:!0,forced:R,sham:!v},{defineProperty:function(M,D,L){p(M);var B=x(D),F,k;if(p(L),("get"in L||"set"in L)&&("get"in L&&!b(F=L.get)&&F!==void 0||"set"in L&&!b(k=L.set)&&k!==void 0||"value"in L||"writable"in L))throw new I("Invalid property descriptor");try{return y.f(M,B,L),!0}catch(W){return!1}}})}),(function(T,P,a){var g=a(3),v=a(46),p=a(5).f,x=a(18);g({target:"Reflect",stat:!0},{deleteProperty:function(b,A){v(b);var I=x(A),R=p(b,I);return R&&!R.configurable?!1:delete b[I]}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(20),x=a(46),y=a(421),b=a(5),A=a(134),I=a(18),R=function(O,M,D){if(x(O)===D)return O[M];var L=b.f(O,M);if(L)return y(L)?L.value:L.get===void 0?void 0:v(L.get,D);var B=A(O);if(p(B))return R(B,M,D)};g({target:"Reflect",stat:!0},{get:function(M,D){return R(x(M),I(D),arguments.length<3?M:arguments[2])}})}),(function(T,P,a){var g=a(38);T.exports=function(v){return v!==void 0&&(g(v,"value")||g(v,"writable"))}}),(function(T,P,a){var g=a(3),v=a(6),p=a(46),x=a(5);g({target:"Reflect",stat:!0,sham:!v},{getOwnPropertyDescriptor:function(b,A){return x.f(p(b),A)}})}),(function(T,P,a){var g=a(3),v=a(46),p=a(134),x=a(135);g({target:"Reflect",stat:!0,sham:!x},{getPrototypeOf:function(b){return p(v(b))}})}),(function(T,P,a){var g=a(3);g({target:"Reflect",stat:!0},{has:function(p,x){return x in p}})}),(function(T,P,a){var g=a(3),v=a(46),p=a(293);g({target:"Reflect",stat:!0},{isExtensible:function(y){return v(y),p(y)}})}),(function(T,P,a){var g=a(3),v=a(56);g({target:"Reflect",stat:!0},{ownKeys:v})}),(function(T,P,a){var g=a(3),v=a(23),p=a(46),x=a(287);g({target:"Reflect",stat:!0,sham:!x},{preventExtensions:function(b){p(b);try{var A=v("Object","preventExtensions");return A&&A(b),!0}catch(I){return!1}}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(46),x=a(20),y=a(421),b=a(7),A=a(44),I=a(5),R=a(134),O=a(11),M=a(18),D=function(B,F,k,W){var U=I.f(p(B),F),X,j,H;if(!U){if(x(j=R(B)))return D(j,F,k,W);U=O(0)}if(y(U)){if(U.writable===!1||!x(W))return!1;if(X=I.f(W,F)){if(!y(X)||X.writable===!1)return!1;A.f(W,F,{value:k})}else try{A.f(W,F,O(0,k))}catch(Y){return!1}}else{if(H=U.set,H===void 0)return!1;v(H,W,k)}return!0},L=b(function(){var B=function(){},F=A.f(new B,"a",{configurable:!0});return Reflect.set(B.prototype,"a",1,F)!==!1});g({target:"Reflect",stat:!0,forced:L},{set:function(F,k,W){return D(p(F),M(k),W,arguments.length<4?F:arguments[3])}})}),(function(T,P,a){var g=a(3),v=a(46),p=a(120),x=a(118);x&&g({target:"Reflect",stat:!0},{setPrototypeOf:function(b,A){v(b),p(A);try{return x(b,A),!0}catch(I){return!1}}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(82);g({global:!0},{Reflect:{}}),p(v.Reflect,"Reflect",!0)}),(function(T,P,a){var g=a(6),v=a(4),p=a(14),x=a(67),y=a(123),b=a(43),A=a(71),I=a(57).f,R=a(24),O=a(432),M=a(68),D=a(433),L=a(436),B=a(122),F=a(47),k=a(7),W=a(38),U=a(51).enforce,X=a(200),j=a(33),H=a(437),Y=a(438),Z=j("match"),_=v.RegExp,K=_.prototype,tt=v.SyntaxError,nt=p(K.exec),at=p("".charAt),it=p("".replace),ot=p("".indexOf),ut=p("".slice),ht=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,gt=/a/g,yt=/a/g,Et=new _(gt)!==gt,bt=L.MISSED_STICKY,Ft=L.UNSUPPORTED_Y,Lt=g&&(!Et||bt||H||Y||k(function(){return yt[Z]=!1,_(gt)!==gt||_(yt)===yt||String(_(gt,"i"))!=="/a/i"})),Pt=function(Jt){for(var Ot=Jt.length,jt=0,ie="",me=!1,se;jt<Ot;jt++){if(se=at(Jt,jt),se==="\\"){ie+=se+at(Jt,++jt);continue}!me&&se==="."?ie+="[\\s\\S]":(se==="["?me=!0:se==="]"&&(me=!1),ie+=se)}return ie},mt=function(Jt){for(var Ot=Jt.length,jt=0,ie="",me=[],se=A(null),he=!1,Oe=!1,Me=0,Re="",ge;jt<Ot;jt++){if(ge=at(Jt,jt),ge==="\\"){if(ge+=at(Jt,++jt),!Oe&&at(ge,1)==="\\"){ie+="\\x5c";continue}}else if(ge==="]")he=!1;else if(!he)switch(!0){case ge==="[":he=!0;break;case ge==="(":ie+=ge,nt(ht,ut(Jt,jt+1))?(jt+=2,Oe=!0,Me++):at(Jt,jt+1)!=="?"&&Me++;continue;case(ge===">"&&Oe):if(Re===""||W(se,Re))throw new tt("Invalid capture group name");se[Re]=!0,me[me.length]=[Re,Me],Oe=!1,Re="";continue}Oe?Re+=ge:ie+=ge}for(var Te=0;Te<me.length;Te++)for(var Ve="\\k<"+me[Te][0]+">",Ht="\\"+me[Te][1];ot(ie,Ve)>-1;)ie=it(ie,Ve,Ht);return[ie,me]};if(x("RegExp",Lt)){for(var xt=function(Ot,jt){var ie=R(K,this),me=O(Ot),se=jt===void 0,he=[],Oe=Ot,Me,Re,ge,Te,Ve,Ht;if(!ie&&me&&se&&Ot.constructor===xt)return Ot;if((me||R(K,Ot))&&(Ot=Ot.source,se&&(jt=D(Oe))),Ot=Ot===void 0?"":M(Ot),jt=jt===void 0?"":M(jt),Oe=Ot,H&&"dotAll"in gt&&(Re=!!jt&&ot(jt,"s")>-1,Re&&(jt=it(jt,/s/g,""))),Me=jt,bt&&"sticky"in gt&&(ge=!!jt&&ot(jt,"y")>-1,ge&&Ft&&(jt=it(jt,/y/g,""))),Y&&(Te=mt(Ot),Ot=Te[0],he=Te[1]),Ve=y(_(Ot,jt),ie?this:K,xt),(Re||ge||he.length)&&(Ht=U(Ve),Re&&(Ht.dotAll=!0,Ht.raw=xt(Pt(Ot),Me)),ge&&(Ht.sticky=!0),he.length&&(Ht.groups=he)),Ot!==Oe)try{b(Ve,"source",Oe===""?"(?:)":Oe)}catch(ne){}return Ve},wt=I(_),Bt=0;wt.length>Bt;)B(xt,_,wt[Bt++]);K.constructor=xt,xt.prototype=K,F(v,"RegExp",xt,{constructor:!0})}X("RegExp")}),(function(T,P,a){var g=a(20),v=a(15),p=a(33),x=p("match");T.exports=function(y){var b;return g(y)&&((b=y[x])!==void 0?!!b:v(y)==="RegExp")}}),(function(T,P,a){var g=a(8),v=a(38),p=a(24),x=a(434),y=a(435),b=RegExp.prototype;T.exports=x.correct?function(A){return A.flags}:function(A){return!x.correct&&p(b,A)&&!v(A,"flags")?g(y,A):A.flags}}),(function(T,P,a){var g=a(4),v=a(7),p=g.RegExp,x=!v(function(){var y=!0;try{p(".","d")}catch(L){y=!1}var b={},A="",I=y?"dgimsy":"gimsy",R=function(L,B){Object.defineProperty(b,L,{get:function(){return A+=B,!0}})},O={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};y&&(O.hasIndices="d");for(var M in O)R(M,O[M]);var D=Object.getOwnPropertyDescriptor(p.prototype,"flags").get.call(b);return D!==I||A!==I});T.exports={correct:x}}),(function(T,P,a){var g=a(46);T.exports=function(){var v=g(this),p="";return v.hasIndices&&(p+="d"),v.global&&(p+="g"),v.ignoreCase&&(p+="i"),v.multiline&&(p+="m"),v.dotAll&&(p+="s"),v.unicode&&(p+="u"),v.unicodeSets&&(p+="v"),v.sticky&&(p+="y"),p}}),(function(T,P,a){var g=a(7),v=a(4),p=v.RegExp,x=g(function(){var A=p("a","y");return A.lastIndex=2,A.exec("abcd")!==null}),y=x||g(function(){return!p("a","y").sticky}),b=x||g(function(){var A=p("^r","gy");return A.lastIndex=2,A.exec("str")!==null});T.exports={BROKEN_CARET:b,MISSED_STICKY:y,UNSUPPORTED_Y:x}}),(function(T,P,a){var g=a(7),v=a(4),p=v.RegExp;T.exports=g(function(){var x=p(".","s");return!(x.dotAll&&x.test(`
|
|
28
|
+
`)&&x.flags==="s")})}),(function(T,P,a){var g=a(7),v=a(4),p=v.RegExp;T.exports=g(function(){var x=p("(?<a>b)","g");return x.exec("b").groups.a!=="b"||"b".replace(x,"$<a>c")!=="bc"})}),(function(T,P,a){var g=a(3),v=a(14),p=a(440),x=a(38),y=a(247).start,b=a(326),A=Array,I=RegExp.escape,R=v("".charAt),O=v("".charCodeAt),M=v(1.1.toString),D=v([].join),L=/^[0-9a-z]/i,B=/^[$()*+./?[\\\]^{|}]/,F=RegExp("^[!\"#%&',\\-:;<=>@`~"+b+"]"),k=v(L.exec),W={" ":"t","\n":"n","\v":"v","\f":"f","\r":"r"},U=function(j){var H=M(O(j,0),16);return H.length<3?"\\x"+y(H,2,"0"):"\\u"+y(H,4,"0")},X=!I||I("ab")!=="\\x61b";g({target:"RegExp",stat:!0,forced:X},{escape:function(H){p(H);for(var Y=H.length,Z=A(Y),_=0;_<Y;_++){var K=R(H,_);if(_===0&&k(L,K))Z[_]=U(K);else if(x(W,K))Z[_]="\\"+W[K];else if(k(B,K))Z[_]="\\"+K;else if(k(F,K))Z[_]=U(K);else{var tt=O(K,0);(tt&63488)!==55296?Z[_]=K:tt>=56320||_+1>=Y||(O(H,_+1)&64512)!==56320?Z[_]=U(K):(Z[_]=K,Z[++_]=R(H,_))}}return D(Z,"")}})}),(function(T){var P=TypeError;T.exports=function(a){if(typeof a=="string")return a;throw new P("Argument is not a string")}}),(function(T,P,a){var g=a(6),v=a(437),p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,A=TypeError;g&&v&&x(b,"dotAll",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).dotAll;throw new A("Incompatible receiver, RegExp required")}}})}),(function(T,P,a){var g=a(3),v=a(443);g({target:"RegExp",proto:!0,forced:/./.exec!==v},{exec:v})}),(function(T,P,a){var g=a(8),v=a(14),p=a(68),x=a(435),y=a(436),b=a(34),A=a(71),I=a(51).get,R=a(437),O=a(438),M=b("native-string-replace",String.prototype.replace),D=RegExp.prototype.exec,L=D,B=v("".charAt),F=v("".indexOf),k=v("".replace),W=v("".slice),U=(function(){var Z=/a/,_=/b*/g;return g(D,Z,"a"),g(D,_,"a"),Z.lastIndex!==0||_.lastIndex!==0})(),X=y.BROKEN_CARET,j=/()??/.exec("")[1]!==void 0,H=U||j||X||R||O,Y=function(Z,_){for(var K=Z.groups=A(null),tt=0;tt<_.length;tt++){var nt=_[tt];K[nt[0]]=Z[nt[1]]}};H&&(L=function(_){var K=this,tt=I(K),nt=p(_),at=tt.raw,it,ot,ut;if(at)return at.lastIndex=K.lastIndex,it=g(L,at,nt),K.lastIndex=at.lastIndex,it&&tt.groups&&Y(it,tt.groups),it;var ht=tt.groups,gt=X&&K.sticky,yt=g(x,K),Et=K.source,bt=0,Ft=nt;if(gt){yt=k(yt,"y",""),F(yt,"g")===-1&&(yt+="g"),Ft=W(nt,K.lastIndex);var Lt=K.lastIndex>0&&B(nt,K.lastIndex-1);K.lastIndex>0&&(!K.multiline||K.multiline&&Lt!==`
|
|
29
|
+
`&&Lt!=="\r"&&Lt!=="\u2028"&&Lt!=="\u2029")&&(Et="(?: (?:"+Et+"))",Ft=" "+Ft,bt++),ot=new RegExp("^(?:"+Et+")",yt)}j&&(ot=new RegExp("^"+Et+"$(?!\\s)",yt)),U&&(ut=K.lastIndex);var Pt=g(D,gt?ot:K,Ft);return gt?Pt?(Pt.input=nt,Pt[0]=W(Pt[0],bt),Pt.index=K.lastIndex,K.lastIndex+=Pt[0].length):K.lastIndex=0:U&&Pt&&(K.lastIndex=K.global?Pt.index+Pt[0].length:ut),j&&Pt&&Pt.length>1&&g(M,Pt[0],ot,function(){for(var mt=1;mt<arguments.length-2;mt++)arguments[mt]===void 0&&(Pt[mt]=void 0)}),Pt&&ht&&Y(Pt,ht),Pt}),T.exports=L}),(function(T,P,a){var g=a(6),v=a(77),p=a(434),x=a(435);g&&!p.correct&&(v(RegExp.prototype,"flags",{configurable:!0,get:x}),p.correct=!0)}),(function(T,P,a){var g=a(6),v=a(436).MISSED_STICKY,p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,A=TypeError;g&&v&&x(b,"sticky",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).sticky;throw new A("Incompatible receiver, RegExp required")}}})}),(function(T,P,a){a(442);var g=a(3),v=a(8),p=a(21),x=a(46),y=a(68),b=(function(){var I=!1,R=/[ac]/;return R.exec=function(){return I=!0,/./.exec.apply(this,arguments)},R.test("abc")===!0&&I})(),A=/./.test;g({target:"RegExp",proto:!0,forced:!b},{test:function(I){var R=x(this),O=y(I),M=R.exec;if(!p(M))return v(A,R,O);var D=v(M,R,O);return D===null?!1:(x(D),!0)}})}),(function(T,P,a){var g=a(49).PROPER,v=a(47),p=a(46),x=a(68),y=a(7),b=a(433),A="toString",I=RegExp.prototype,R=I[A],O=y(function(){return R.call({source:"a",flags:"b"})!=="/a/b"}),M=g&&R.name!==A;(O||M)&&v(I,A,function(){var L=p(this),B=x(L.source),F=x(b(L));return"/"+B+"/"+F},{unsafe:!0})}),(function(T,P,a){a(449)}),(function(T,P,a){var g=a(291),v=a(295);g("Set",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},v)}),(function(T,P,a){var g=a(3),v=a(451),p=a(7),x=a(459),y=!x("difference",function(A){return A.size===0}),b=y||p(function(){var A={size:1,has:function(){return!0},keys:function(){var R=0;return{next:function(){var O=R++>1;return I.has(1)&&I.clear(),{done:O,value:2}}}}},I=new Set([1,2,3,4]);return I.difference(A).size!==3});g({target:"Set",proto:!0,real:!0,forced:b},{difference:v})}),(function(T,P,a){var g=a(452),v=a(453),p=a(454),x=a(457),y=a(458),b=a(455),A=a(456),I=v.has,R=v.remove;T.exports=function(M){var D=g(this),L=y(M),B=p(D);return x(B)<=L.size?b(B,function(F){L.includes(F)&&R(B,F)}):A(L.getIterator(),function(F){I(B,F)&&R(B,F)}),B}}),(function(T,P,a){var g=a(453).has;T.exports=function(v){return g(v),v}}),(function(T,P,a){var g=a(14),v=Set.prototype;T.exports={Set,add:g(v.add),has:g(v.has),remove:g(v.delete),proto:v}}),(function(T,P,a){var g=a(453),v=a(455),p=g.Set,x=g.add;T.exports=function(y){var b=new p;return v(y,function(A){x(b,A)}),b}}),(function(T,P,a){var g=a(14),v=a(456),p=a(453),x=p.Set,y=p.proto,b=g(y.forEach),A=g(y.keys),I=A(new x).next;T.exports=function(R,O,M){return M?v({iterator:A(R),next:I},O):b(R,O)}}),(function(T,P,a){var g=a(8);T.exports=function(v,p,x){for(var y=x?v:v.iterator,b=v.next,A,I;!(A=g(b,y)).done;)if(I=p(A.value),I!==void 0)return I}}),(function(T,P,a){var g=a(119),v=a(453);T.exports=g(v.proto,"size","get")||function(p){return p.size}}),(function(T,P,a){var g=a(30),v=a(46),p=a(8),x=a(61),y=a(267),b="Invalid size",A=RangeError,I=TypeError,R=Math.max,O=function(M,D){this.set=M,this.size=R(D,0),this.has=g(M.has),this.keys=g(M.keys)};O.prototype={getIterator:function(){return y(v(p(this.keys,this.set)))},includes:function(M){return p(this.has,this.set,M)}},T.exports=function(M){v(M);var D=+M.size;if(D!==D)throw new I(b);var L=x(D);if(L<0)throw new A(b);return new O(M,L)}}),(function(T,P,a){var g=a(23),v=function(x){return{size:x,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},p=function(x){return{size:x,has:function(){return!0},keys:function(){throw new Error("e")}}};T.exports=function(x,y){var b=g("Set");try{new b()[x](v(0));try{return new b()[x](v(-1)),!1}catch(I){if(!y)return!0;try{return new b()[x](p(-1/0)),!1}catch(R){var A=new b([1,2]);return y(A[x](p(1/0)))}}}catch(I){return!1}}}),(function(T,P,a){var g=a(3),v=a(7),p=a(461),x=a(459),y=!x("intersection",function(b){return b.size===2&&b.has(1)&&b.has(2)})||v(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!=="3,2"});g({target:"Set",proto:!0,real:!0,forced:y},{intersection:p})}),(function(T,P,a){var g=a(452),v=a(453),p=a(457),x=a(458),y=a(455),b=a(456),A=v.Set,I=v.add,R=v.has;T.exports=function(M){var D=g(this),L=x(M),B=new A;return p(D)>L.size?b(L.getIterator(),function(F){R(D,F)&&I(B,F)}):y(D,function(F){L.includes(F)&&I(B,F)}),B}}),(function(T,P,a){var g=a(3),v=a(463),p=a(459),x=!p("isDisjointFrom",function(y){return!y});g({target:"Set",proto:!0,real:!0,forced:x},{isDisjointFrom:v})}),(function(T,P,a){var g=a(452),v=a(453).has,p=a(457),x=a(458),y=a(455),b=a(456),A=a(141);T.exports=function(R){var O=g(this),M=x(R);if(p(O)<=M.size)return y(O,function(L){if(M.includes(L))return!1},!0)!==!1;var D=M.getIterator();return b(D,function(L){if(v(O,L))return A(D.iterator,"normal",!1)})!==!1}}),(function(T,P,a){var g=a(3),v=a(465),p=a(459),x=!p("isSubsetOf",function(y){return y});g({target:"Set",proto:!0,real:!0,forced:x},{isSubsetOf:v})}),(function(T,P,a){var g=a(452),v=a(457),p=a(455),x=a(458);T.exports=function(b){var A=g(this),I=x(b);return v(A)>I.size?!1:p(A,function(R){if(!I.includes(R))return!1},!0)!==!1}}),(function(T,P,a){var g=a(3),v=a(467),p=a(459),x=!p("isSupersetOf",function(y){return!y});g({target:"Set",proto:!0,real:!0,forced:x},{isSupersetOf:v})}),(function(T,P,a){var g=a(452),v=a(453).has,p=a(457),x=a(458),y=a(456),b=a(141);T.exports=function(I){var R=g(this),O=x(I);if(p(R)<O.size)return!1;var M=O.getIterator();return y(M,function(D){if(!v(R,D))return b(M.iterator,"normal",!1)})!==!1}}),(function(T,P,a){var g=a(3),v=a(469),p=a(470),x=a(459),y=!x("symmetricDifference")||!p("symmetricDifference");g({target:"Set",proto:!0,real:!0,forced:y},{symmetricDifference:v})}),(function(T,P,a){var g=a(452),v=a(453),p=a(454),x=a(458),y=a(456),b=v.add,A=v.has,I=v.remove;T.exports=function(O){var M=g(this),D=x(O).getIterator(),L=p(M);return y(D,function(B){A(M,B)?I(L,B):b(L,B)}),L}}),(function(T){T.exports=function(P){try{var a=new Set,g={size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return a.clear(),a.add(4),function(){return{done:!0}}}})}},v=a[P](g);return v.size===1&&v.values().next().value===4}catch(p){return!1}}}),(function(T,P,a){var g=a(3),v=a(472),p=a(470),x=a(459),y=!x("union")||!p("union");g({target:"Set",proto:!0,real:!0,forced:y},{union:v})}),(function(T,P,a){var g=a(452),v=a(453).add,p=a(454),x=a(458),y=a(456);T.exports=function(A){var I=g(this),R=x(A).getIterator(),O=p(I);return y(R,function(M){v(O,M)}),O}}),(function(T,P,a){var g=a(3),v=a(14),p=a(16),x=a(61),y=a(68),b=a(7),A=v("".charAt),I=b(function(){return"\u{20BB7}".at(-2)!=="\uD842"});g({target:"String",proto:!0,forced:I},{at:function(O){var M=y(p(this)),D=M.length,L=x(O),B=L>=0?L:D+L;return B<0||B>=D?void 0:A(M,B)}})}),(function(T,P,a){var g=a(3),v=a(475).codeAt;g({target:"String",proto:!0},{codePointAt:function(x){return v(this,x)}})}),(function(T,P,a){var g=a(14),v=a(61),p=a(68),x=a(16),y=g("".charAt),b=g("".charCodeAt),A=g("".slice),I=function(R){return function(O,M){var D=p(x(O)),L=v(M),B=D.length,F,k;return L<0||L>=B?R?"":void 0:(F=b(D,L),F<55296||F>56319||L+1===B||(k=b(D,L+1))<56320||k>57343?R?y(D,L):F:R?A(D,L,L+2):(F-55296<<10)+(k-56320)+65536)}};T.exports={codeAt:I(!1),charAt:I(!0)}}),(function(T,P,a){var g=a(3),v=a(85),p=a(5).f,x=a(64),y=a(68),b=a(477),A=a(16),I=a(478),R=a(36),O=v("".slice),M=Math.min,D=I("endsWith"),L=!R&&!D&&!!(function(){var B=p(String.prototype,"endsWith");return B&&!B.writable})();g({target:"String",proto:!0,forced:!L&&!D},{endsWith:function(F){var k=y(A(this));b(F);var W=y(F),U=arguments.length>1?arguments[1]:void 0,X=k.length,j=U===void 0?X:M(x(U),X);return O(k,j-W.length,j)===W}})}),(function(T,P,a){var g=a(432),v=TypeError;T.exports=function(p){if(g(p))throw new v("The method doesn't accept regular expressions");return p}}),(function(T,P,a){var g=a(33),v=g("match");T.exports=function(p){var x=/./;try{"/./"[p](x)}catch(y){try{return x[v]=!1,"/./"[p](x)}catch(b){}}return!1}}),(function(T,P,a){var g=a(3),v=a(14),p=a(60),x=RangeError,y=String.fromCharCode,b=String.fromCodePoint,A=v([].join),I=!!b&&b.length!==1;g({target:"String",stat:!0,arity:1,forced:I},{fromCodePoint:function(O){for(var M=[],D=arguments.length,L=0,B;D>L;){if(B=+arguments[L],p(B,1114111)!==B)throw new x(B+" is not a valid code point");M[L++]=B<65536?y(B):y(((B-=65536)>>10)+55296,B%1024+56320)}return A(M,"")}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(477),x=a(16),y=a(68),b=a(478),A=v("".indexOf);g({target:"String",proto:!0,forced:!b("includes")},{includes:function(R){return!!~A(y(x(this)),y(p(R)),arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(16),x=a(68),y=v("".charCodeAt);g({target:"String",proto:!0},{isWellFormed:function(){for(var A=x(p(this)),I=A.length,R=0;R<I;R++){var O=y(A,R);if((O&63488)===55296&&(O>=56320||++R>=I||(y(A,R)&64512)!==56320))return!1}return!0}})}),(function(T,P,a){var g=a(475).charAt,v=a(68),p=a(51),x=a(176),y=a(179),b="String Iterator",A=p.set,I=p.getterFor(b);x(String,"String",function(R){A(this,{type:b,string:v(R),index:0})},function(){var O=I(this),M=O.string,D=O.index,L;return D>=M.length?y(void 0,!0):(L=g(M,D),O.index+=L.length,y(L,!1))})}),(function(T,P,a){var g=a(8),v=a(14),p=a(484),x=a(46),y=a(20),b=a(64),A=a(68),I=a(16),R=a(29),O=a(485),M=a(433),D=a(486),L=v("".indexOf);p("match",function(B,F,k){return[function(U){var X=I(this),j=y(U)?R(U,B):void 0;return j?g(j,U,X):new RegExp(U)[B](A(X))},function(W){var U=x(this),X=A(W),j=k(F,U,X);if(j.done)return j.value;var H=A(M(U));if(!~L(H,"g"))return D(U,X);var Y=!!~L(H,"u")||!!~L(H,"v");U.lastIndex=0;for(var Z=[],_=0,K;(K=D(U,X))!==null;){var tt=A(K[0]);Z[_]=tt,tt===""&&(U.lastIndex=O(X,b(U.lastIndex),Y)),_++}return _===0?null:Z}]})}),(function(T,P,a){a(442);var g=a(8),v=a(47),p=a(443),x=a(7),y=a(33),b=a(43),A=y("species"),I=RegExp.prototype;T.exports=function(R,O,M,D){var L=y(R),B=!x(function(){var U={};return U[L]=function(){return 7},""[R](U)!==7}),F=B&&!x(function(){var U=!1,X=/a/;if(R==="split"){var j={};j[A]=function(){return X},X={constructor:j,flags:""},X[L]=/./[L]}return X.exec=function(){return U=!0,null},X[L](""),!U});if(!B||!F||M){var k=/./[L],W=O(L,""[R],function(U,X,j,H,Y){var Z=X.exec;return Z===p||Z===I.exec?B&&!Y?{done:!0,value:g(k,X,j,H)}:{done:!0,value:g(U,j,X,H)}:{done:!1}});v(String.prototype,R,W[0]),v(I,L,W[1])}D&&b(I[L],"sham",!0)}}),(function(T,P,a){var g=a(475).charAt;T.exports=function(v,p,x){return p+(x&&g(v,p).length||1)}}),(function(T,P,a){var g=a(8),v=a(46),p=a(21),x=a(15),y=a(443),b=TypeError;T.exports=function(A,I){var R=A.exec;if(p(R)){var O=g(R,A,I);return O!==null&&v(O),O}if(x(A)==="RegExp")return g(y,A,I);throw new b("RegExp#exec called on incompatible receiver")}}),(function(T,P,a){var g=a(3),v=a(8),p=a(85),x=a(177),y=a(179),b=a(16),A=a(64),I=a(68),R=a(46),O=a(20),M=a(15),D=a(432),L=a(433),B=a(29),F=a(47),k=a(7),W=a(33),U=a(380),X=a(485),j=a(486),H=a(51),Y=a(36),Z=W("matchAll"),_="RegExp String",K=_+" Iterator",tt=H.set,nt=H.getterFor(K),at=RegExp.prototype,it=TypeError,ot=p("".indexOf),ut=p("".matchAll),ht=!!ut&&!k(function(){ut("a",/./)}),gt=x(function(bt,Ft,Lt,Pt){tt(this,{type:K,regexp:bt,string:Ft,global:Lt,unicode:Pt,done:!1})},_,function(){var bt=nt(this);if(bt.done)return y(void 0,!0);var Ft=bt.regexp,Lt=bt.string,Pt=j(Ft,Lt);return Pt===null?(bt.done=!0,y(void 0,!0)):bt.global?(I(Pt[0])===""&&(Ft.lastIndex=X(Lt,A(Ft.lastIndex),bt.unicode)),y(Pt,!1)):(bt.done=!0,y(Pt,!1))}),yt=function(Et){var bt=R(this),Ft=I(Et),Lt=U(bt,RegExp),Pt=I(L(bt)),mt,xt,wt;return mt=new Lt(Lt===RegExp?bt.source:bt,Pt),xt=!!~ot(Pt,"g"),wt=!!~ot(Pt,"u")||!!~ot(Pt,"v"),mt.lastIndex=A(bt.lastIndex),new gt(mt,Ft,xt,wt)};g({target:"String",proto:!0,forced:ht},{matchAll:function(bt){var Ft=b(this),Lt,Pt,mt,xt;if(O(bt)){if(D(bt)&&(Lt=I(b(L(bt))),!~ot(Lt,"g")))throw new it("`.matchAll` does not allow non-global regexes");if(ht)return ut(Ft,bt);if(mt=B(bt,Z),mt===void 0&&Y&&M(bt)==="RegExp"&&(mt=yt),mt)return v(mt,bt,Ft)}else if(ht)return ut(Ft,bt);return Pt=I(Ft),xt=new RegExp(bt,"g"),Y?v(yt,xt,Pt):xt[Z](Pt)}}),Y||Z in at||F(at,Z,yt)}),(function(T,P,a){var g=a(3),v=a(247).end,p=a(489);g({target:"String",proto:!0,forced:p},{padEnd:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(28);T.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(g)}),(function(T,P,a){var g=a(3),v=a(247).start,p=a(489);g({target:"String",proto:!0,forced:p},{padStart:function(y){return v(this,y,arguments.length>1?arguments[1]:void 0)}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(12),x=a(39),y=a(68),b=a(63),A=v([].push),I=v([].join);g({target:"String",stat:!0},{raw:function(O){var M=p(x(O).raw),D=b(M);if(!D)return"";for(var L=arguments.length,B=[],F=0;;){if(A(B,y(M[F++])),F===D)return I(B,"");F<L&&A(B,y(arguments[F]))}}})}),(function(T,P,a){var g=a(3),v=a(248);g({target:"String",proto:!0},{repeat:v})}),(function(T,P,a){var g=a(95),v=a(8),p=a(14),x=a(484),y=a(7),b=a(46),A=a(21),I=a(20),R=a(61),O=a(64),M=a(68),D=a(16),L=a(485),B=a(29),F=a(494),k=a(433),W=a(486),U=a(33),X=U("replace"),j=Math.max,H=Math.min,Y=p([].concat),Z=p([].push),_=p("".indexOf),K=p("".slice),tt=function(ot){return ot===void 0?ot:String(ot)},nt=(function(){return"a".replace(/./,"$0")==="$0"})(),at=(function(){return/./[X]?/./[X]("a","$0")==="":!1})(),it=!y(function(){var ot=/./;return ot.exec=function(){var ut=[];return ut.groups={a:"7"},ut},"".replace(ot,"$<a>")!=="7"});x("replace",function(ot,ut,ht){var gt=at?"$":"$0";return[function(Et,bt){var Ft=D(this),Lt=I(Et)?B(Et,X):void 0;return Lt?v(Lt,Et,Ft,bt):v(ut,M(Ft),Et,bt)},function(yt,Et){var bt=b(this),Ft=M(yt),Lt=A(Et);Lt||(Et=M(Et));var Pt=M(k(bt));if(typeof Et=="string"&&!~_(Et,gt)&&!~_(Et,"$<")&&!~_(Pt,"y")){var mt=ht(ut,bt,Ft,Et);if(mt.done)return mt.value}var xt=!!~_(Pt,"g"),wt;xt&&(wt=!!~_(Pt,"u")||!!~_(Pt,"v"),bt.lastIndex=0);for(var Bt=[],Jt;Jt=W(bt,Ft),!(Jt===null||(Z(Bt,Jt),!xt));){var Ot=M(Jt[0]);Ot===""&&(bt.lastIndex=L(Ft,O(bt.lastIndex),wt))}for(var jt="",ie=0,me=0;me<Bt.length;me++){Jt=Bt[me];for(var se=M(Jt[0]),he=j(H(R(Jt.index),Ft.length),0),Oe=[],Me,Re=1;Re<Jt.length;Re++)Z(Oe,tt(Jt[Re]));var ge=Jt.groups;if(Lt){var Te=Y([se],Oe,he,Ft);ge!==void 0&&Z(Te,ge),Me=M(g(Et,void 0,Te))}else Me=F(se,Ft,he,Oe,ge,Et);he>=ie&&(jt+=K(Ft,ie,he)+Me,ie=he+se.length)}return jt+K(Ft,ie)}]},!it||!nt||at)}),(function(T,P,a){var g=a(14),v=a(39),p=Math.floor,x=g("".charAt),y=g("".replace),b=g("".slice),A=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,I=/\$([$&'`]|\d{1,2})/g;T.exports=function(R,O,M,D,L,B){var F=M+R.length,k=D.length,W=I;return L!==void 0&&(L=v(L),W=A),y(B,W,function(U,X){var j;switch(x(X,0)){case"$":return"$";case"&":return R;case"`":return b(O,0,M);case"'":return b(O,F);case"<":j=L[b(X,1,-1)];break;default:var H=+X;if(H===0)return U;if(H>k){var Y=p(H/10);return Y===0?U:Y<=k?D[Y-1]===void 0?x(X,1):D[Y-1]+x(X,1):U}j=D[H-1]}return j===void 0?"":j})}}),(function(T,P,a){var g=a(3),v=a(8),p=a(14),x=a(16),y=a(21),b=a(20),A=a(432),I=a(68),R=a(29),O=a(433),M=a(494),D=a(33),L=a(36),B=D("replace"),F=TypeError,k=p("".indexOf),W=p("".replace),U=p("".slice),X=Math.max;g({target:"String",proto:!0},{replaceAll:function(H,Y){var Z=x(this),_,K,tt,nt,at,it,ot,ut,ht,gt,yt=0,Et="";if(b(H)){if(_=A(H),_&&(K=I(x(O(H))),!~k(K,"g")))throw new F("`.replaceAll` does not allow non-global regexes");if(tt=R(H,B),tt)return v(tt,H,Z,Y);if(L&&_)return W(I(Z),H,Y)}for(nt=I(Z),at=I(H),it=y(Y),it||(Y=I(Y)),ot=at.length,ut=X(1,ot),ht=k(nt,at);ht!==-1;)gt=it?I(Y(at,ht,nt)):M(at,nt,ht,[],void 0,Y),Et+=U(nt,yt,ht)+gt,yt=ht+ot,ht=ht+ut>nt.length?-1:k(nt,at,ht+ut);return yt<nt.length&&(Et+=U(nt,yt)),Et}})}),(function(T,P,a){var g=a(8),v=a(484),p=a(46),x=a(20),y=a(16),b=a(362),A=a(68),I=a(29),R=a(486);v("search",function(O,M,D){return[function(B){var F=y(this),k=x(B)?I(B,O):void 0;return k?g(k,B,F):new RegExp(B)[O](A(F))},function(L){var B=p(this),F=A(L),k=D(M,B,F);if(k.done)return k.value;var W=B.lastIndex;b(W,0)||(B.lastIndex=0);var U=R(B,F);return b(B.lastIndex,W)||(B.lastIndex=W),U===null?-1:U.index}]})}),(function(T,P,a){var g=a(8),v=a(14),p=a(484),x=a(46),y=a(20),b=a(16),A=a(380),I=a(485),R=a(64),O=a(68),M=a(29),D=a(433),L=a(486),B=a(436),F=a(7),k=B.UNSUPPORTED_Y,W=4294967295,U=Math.min,X=v([].push),j=v("".slice),H=v("".indexOf),Y=!F(function(){var _=/(?:)/,K=_.exec;_.exec=function(){return K.apply(this,arguments)};var tt="ab".split(_);return tt.length!==2||tt[0]!=="a"||tt[1]!=="b"}),Z="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;p("split",function(_,K,tt){var nt="0".split(void 0,0).length?function(at,it){return at===void 0&&it===0?[]:g(K,this,at,it)}:K;return[function(it,ot){var ut=b(this),ht=y(it)?M(it,_):void 0;return ht?g(ht,it,ut,ot):g(nt,O(ut),it,ot)},function(at,it){var ot=x(this),ut=O(at);if(!Z){var ht=tt(nt,ot,ut,it,nt!==K);if(ht.done)return ht.value}var gt=A(ot,RegExp),yt=O(D(ot)),Et=!!~H(yt,"u")||!!~H(yt,"v");k?~H(yt,"g")||(yt+="g"):~H(yt,"y")||(yt+="y");var bt=new gt(k?"^(?:"+ot.source+")":ot,yt),Ft=it===void 0?W:it>>>0;if(Ft===0)return[];if(ut.length===0)return L(bt,ut)===null?[ut]:[];for(var Lt=0,Pt=0,mt=[];Pt<ut.length;){bt.lastIndex=k?0:Pt;var xt=L(bt,k?j(ut,Pt):ut),wt;if(xt===null||(wt=U(R(bt.lastIndex+(k?Pt:0)),ut.length))===Lt)Pt=I(ut,Pt,Et);else{if(X(mt,j(ut,Lt,Pt)),mt.length===Ft)return mt;for(var Bt=1;Bt<=xt.length-1;Bt++)if(X(mt,xt[Bt]),mt.length===Ft)return mt;Pt=Lt=wt}}return X(mt,j(ut,Lt)),mt}]},Z||!Y,k)}),(function(T,P,a){var g=a(3),v=a(85),p=a(5).f,x=a(64),y=a(68),b=a(477),A=a(16),I=a(478),R=a(36),O=v("".slice),M=Math.min,D=I("startsWith"),L=!R&&!D&&!!(function(){var B=p(String.prototype,"startsWith");return B&&!B.writable})();g({target:"String",proto:!0,forced:!L&&!D},{startsWith:function(F){var k=y(A(this));b(F);var W=y(F),U=x(M(arguments.length>1?arguments[1]:void 0,k.length));return O(k,U,U+W.length)===W}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(16),x=a(61),y=a(68),b=v("".slice),A=Math.max,I=Math.min,R=!"".substr||"ab".substr(-1)!=="b";g({target:"String",proto:!0,forced:R},{substr:function(M,D){var L=y(p(this)),B=L.length,F=x(M),k=F<0?A(B+F,0):I(F,B),W=D===void 0?B:x(D);if(W<=0)return"";var U=I(k+W,B);return k>=U?"":b(L,k,U)}})}),(function(T,P,a){var g=a(3),v=a(8),p=a(14),x=a(16),y=a(68),b=a(7),A=Array,I=p("".charAt),R=p("".charCodeAt),O=p([].join),M="".toWellFormed,D="\uFFFD",L=M&&b(function(){return v(M,1)!=="1"});g({target:"String",proto:!0,forced:L},{toWellFormed:function(){var F=y(x(this));if(L)return v(M,F);for(var k=F.length,W=A(k),U=0;U<k;U++){var X=R(F,U);(X&63488)!==55296?W[U]=I(F,U):X>=56320||U+1>=k||(R(F,U+1)&64512)!==56320?W[U]=D:(W[U]=I(F,U),W[++U]=I(F,U))}return O(W,"")}})}),(function(T,P,a){var g=a(3),v=a(325).trim,p=a(502);g({target:"String",proto:!0,forced:p("trim")},{trim:function(){return v(this)}})}),(function(T,P,a){var g=a(49).PROPER,v=a(7),p=a(326),x="\u200B\x85\u180E";T.exports=function(y){return v(function(){return!!p[y]()||x[y]()!==x||g&&p[y].name!==y})}}),(function(T,P,a){a(504);var g=a(3),v=a(505);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==v},{trimEnd:v})}),(function(T,P,a){var g=a(3),v=a(505);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==v},{trimRight:v})}),(function(T,P,a){var g=a(325).end,v=a(502);T.exports=v("trimEnd")?function(){return g(this)}:"".trimEnd}),(function(T,P,a){a(507);var g=a(3),v=a(508);g({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==v},{trimStart:v})}),(function(T,P,a){var g=a(3),v=a(508);g({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==v},{trimLeft:v})}),(function(T,P,a){var g=a(325).start,v=a(502);T.exports=v("trimStart")?function(){return g(this)}:"".trimStart}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("anchor")},{anchor:function(y){return v(this,"a","name",y)}})}),(function(T,P,a){var g=a(14),v=a(16),p=a(68),x=/"/g,y=g("".replace);T.exports=function(b,A,I,R){var O=p(v(b)),M="<"+A;return I!==""&&(M+=" "+I+'="'+y(p(R),x,""")+'"'),M+">"+O+"</"+A+">"}}),(function(T,P,a){var g=a(7);T.exports=function(v){return g(function(){var p=""[v]('"');return p!==p.toLowerCase()||p.split('"').length>3})}}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("big")},{big:function(){return v(this,"big","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("blink")},{blink:function(){return v(this,"blink","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("bold")},{bold:function(){return v(this,"b","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("fixed")},{fixed:function(){return v(this,"tt","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("fontcolor")},{fontcolor:function(y){return v(this,"font","color",y)}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("fontsize")},{fontsize:function(y){return v(this,"font","size",y)}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("italics")},{italics:function(){return v(this,"i","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("link")},{link:function(y){return v(this,"a","href",y)}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("small")},{small:function(){return v(this,"small","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("strike")},{strike:function(){return v(this,"strike","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("sub")},{sub:function(){return v(this,"sub","","")}})}),(function(T,P,a){var g=a(3),v=a(510),p=a(511);g({target:"String",proto:!0,forced:p("sup")},{sup:function(){return v(this,"sup","","")}})}),(function(T,P,a){var g=a(525);g("Float32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(8),x=a(6),y=a(526),b=a(223),A=a(212),I=a(215),R=a(11),O=a(43),M=a(331),D=a(216),L=a(527),B=a(528),F=a(18),k=a(38),W=a(69),U=a(20),X=a(22),j=a(71),H=a(24),Y=a(118),Z=a(57).f,_=a(529),K=a(83).forEach,tt=a(200),nt=a(77),at=a(44),it=a(5),ot=a(204),ut=a(51),ht=a(123),gt=ut.get,yt=ut.set,Et=ut.enforce,bt=at.f,Ft=it.f,Lt=v.RangeError,Pt=A.ArrayBuffer,mt=Pt.prototype,xt=A.DataView,wt=b.NATIVE_ARRAY_BUFFER_VIEWS,Bt=b.TYPED_ARRAY_TAG,Jt=b.TypedArray,Ot=b.TypedArrayPrototype,jt=b.isTypedArray,ie="BYTES_PER_ELEMENT",me="Wrong length",se=function(ge,Te){nt(ge,Te,{configurable:!0,get:function(){return gt(this)[Te]}})},he=function(ge){var Te;return H(mt,ge)||(Te=W(ge))==="ArrayBuffer"||Te==="SharedArrayBuffer"},Oe=function(ge,Te){return jt(ge)&&!X(Te)&&Te in ge&&M(+Te)&&Te>=0},Me=function(Te,Ve){return Ve=F(Ve),Oe(Te,Ve)?R(2,Te[Ve]):Ft(Te,Ve)},Re=function(Te,Ve,Ht){return Ve=F(Ve),Oe(Te,Ve)&&U(Ht)&&k(Ht,"value")&&!k(Ht,"get")&&!k(Ht,"set")&&!Ht.configurable&&(!k(Ht,"writable")||Ht.writable)&&(!k(Ht,"enumerable")||Ht.enumerable)?(Te[Ve]=Ht.value,Te):bt(Te,Ve,Ht)};x?(wt||(it.f=Me,at.f=Re,se(Ot,"buffer"),se(Ot,"byteOffset"),se(Ot,"byteLength"),se(Ot,"length")),g({target:"Object",stat:!0,forced:!wt},{getOwnPropertyDescriptor:Me,defineProperty:Re}),T.exports=function(ge,Te,Ve){var Ht=ge.match(/\d+/)[0]/8,ne=ge+(Ve?"Clamped":"")+"Array",ae="get"+ge,rn="set"+ge,Yt=v[ne],ee=Yt,pe=ee&&ee.prototype,ce={},Pe=function(Mt,$t){var _t=gt(Mt);return _t.view[ae]($t*Ht+_t.byteOffset,!0)},ln=function(Mt,$t,_t){var Nt=gt(Mt);Nt.view[rn]($t*Ht+Nt.byteOffset,Ve?B(_t):_t,!0)},It=function(Mt,$t){bt(Mt,$t,{get:function(){return Pe(this,$t)},set:function(_t){return ln(this,$t,_t)},enumerable:!0})};wt?y&&(ee=Te(function(Mt,$t,_t,Nt){return I(Mt,pe),ht((function(){return U($t)?he($t)?Nt!==void 0?new Yt($t,L(_t,Ht),Nt):_t!==void 0?new Yt($t,L(_t,Ht)):new Yt($t):jt($t)?ot(ee,$t):p(_,ee,$t):new Yt(D($t))})(),Mt,ee)}),Y&&Y(ee,Jt),K(Z(Yt),function(Mt){Mt in ee||O(ee,Mt,Yt[Mt])}),ee.prototype=pe):(ee=Te(function(Mt,$t,_t,Nt){I(Mt,pe);var Se=0,He=0,Wt,Qt,te;if(!U($t))te=D($t),Qt=te*Ht,Wt=new Pt(Qt);else if(he($t)){Wt=$t,He=L(_t,Ht);var oe=$t.byteLength;if(Nt===void 0){if(oe%Ht)throw new Lt(me);if(Qt=oe-He,Qt<0)throw new Lt(me)}else if(Qt=D(Nt)*Ht,Qt+He>oe)throw new Lt(me);te=Qt/Ht}else return jt($t)?ot(ee,$t):p(_,ee,$t);for(yt(Mt,{buffer:Wt,byteOffset:He,byteLength:Qt,length:te,view:new xt(Wt)});Se<te;)It(Mt,Se++)}),Y&&Y(ee,Jt),pe=ee.prototype=j(Ot)),pe.constructor!==ee&&O(pe,"constructor",ee),Et(pe).TypedArrayConstructor=ee,Bt&&O(pe,Bt,ne);var Xt=ee!==Yt;ce[ne]=ee,g({global:!0,constructor:!0,forced:Xt,sham:!wt},ce),ie in ee||O(ee,ie,Ht),ie in pe||O(pe,ie,Ht),tt(ne)}):T.exports=function(){}}),(function(T,P,a){var g=a(4),v=a(7),p=a(171),x=a(223).NATIVE_ARRAY_BUFFER_VIEWS,y=g.ArrayBuffer,b=g.Int8Array;T.exports=!x||!v(function(){b(1)})||!v(function(){new b(-1)})||!p(function(A){new b,new b(null),new b(1.5),new b(A)},!0)||v(function(){return new b(new y(2),1,void 0).length!==1})}),(function(T,P,a){var g=a(269),v=RangeError;T.exports=function(p,x){var y=g(p);if(y%x)throw new v("Wrong offset");return y}}),(function(T){var P=Math.floor;T.exports=function(a){var g=+a;if(g!==g||g<=0)return 0;if(g>=255)return 255;var v=P(g);return v+.5<g?v+1:g<v+.5||v%2===0?v:v+1}}),(function(T,P,a){var g=a(84),v=a(8),p=a(30),x=a(381),y=a(39),b=a(63),A=a(139),I=a(140),R=a(137),O=a(530),M=a(223).aTypedArrayConstructor,D=a(531);T.exports=function(B){var F=x(this),k=arguments.length,W=k>1?arguments[1]:void 0,U=W!==void 0;U&&p(W);var X=y(B),j=I(X),H,Y,Z,_,K,tt,nt,at;if(j&&!R(j))for(nt=A(X,j),at=nt.next,X=[];!(tt=v(at,nt)).done;)X.push(tt.value);for(U&&k>2&&(W=g(W,arguments[2])),Y=b(X),Z=new(M(F))(Y),_=O(Z),H=0;Y>H;H++)K=U?W(X[H],H):X[H],Z[H]=_?D(K):+K;return Z}}),(function(T,P,a){var g=a(69);T.exports=function(v){var p=g(v);return p==="BigInt64Array"||p==="BigUint64Array"}}),(function(T,P,a){var g=a(19),v=TypeError;T.exports=function(p){var x=g(p,"number");if(typeof x=="number")throw new v("Can't convert number to bigint");return BigInt(x)}}),(function(T,P,a){var g=a(525);g("Float64",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Int8",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Int16",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Int32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Uint8",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Uint8",function(v){return function(x,y,b){return v(this,x,y,b)}},!0)}),(function(T,P,a){var g=a(525);g("Uint16",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(525);g("Uint32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,P,a){var g=a(223),v=a(63),p=a(61),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("at",function(A){var I=x(this),R=v(I),O=p(A),M=O>=0?O:R+O;return M<0||M>=R?void 0:I[M]})}),(function(T,P,a){var g=a(14),v=a(223),p=a(151),x=g(p),y=v.aTypedArray,b=v.exportTypedArrayMethod;b("copyWithin",function(I,R){return x(y(this),I,R,arguments.length>2?arguments[2]:void 0)})}),(function(T,P,a){var g=a(223),v=a(83).every,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("every",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(156),p=a(531),x=a(69),y=a(8),b=a(14),A=a(7),I=g.aTypedArray,R=g.exportTypedArrayMethod,O=b("".slice),M=A(function(){var D=0;return new Int8Array(2).fill({valueOf:function(){return D++}}),D!==1});R("fill",function(L){var B=arguments.length;I(this);var F=O(x(this),0,3)==="Big"?p(L):+L;return y(v,this,F,B>1?arguments[1]:void 0,B>2?arguments[2]:void 0)},M)}),(function(T,P,a){var g=a(223),v=a(83).filter,p=a(545),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("filter",function(A){var I=v(x(this),A,arguments.length>1?arguments[1]:void 0);return p(this,I)})}),(function(T,P,a){var g=a(204),v=a(223).getTypedArrayConstructor;T.exports=function(p,x){return g(v(p),x)}}),(function(T,P,a){var g=a(223),v=a(83).find,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("find",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(83).findIndex,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findIndex",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(161).findLast,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findLast",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(161).findLastIndex,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findLastIndex",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(83).forEach,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("forEach",function(b){v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(526),v=a(223).exportTypedArrayStaticMethod,p=a(529);v("from",p,g)}),(function(T,P,a){var g=a(223),v=a(59).includes,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("includes",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(59).indexOf,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("indexOf",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(4),v=a(7),p=a(14),x=a(223),y=a(175),b=a(33),A=b("iterator"),I=g.Uint8Array,R=p(y.values),O=p(y.keys),M=p(y.entries),D=x.aTypedArray,L=x.exportTypedArrayMethod,B=I&&I.prototype,F=!v(function(){B[A].call([1])}),k=!!B&&B.values&&B[A]===B.values&&B.values.name==="values",W=function(){return R(D(this))};L("entries",function(){return M(D(this))},F),L("keys",function(){return O(D(this))},F),L("values",W,F||!k,{name:"values"}),L(A,W,F||!k,{name:"values"})}),(function(T,P,a){var g=a(223),v=a(14),p=g.aTypedArray,x=g.exportTypedArrayMethod,y=v([].join);x("join",function(A){return y(p(this),A)})}),(function(T,P,a){var g=a(223),v=a(95),p=a(182),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("lastIndexOf",function(A){var I=arguments.length;return v(p,x(this),I>1?[A,arguments[1]]:[A])})}),(function(T,P,a){var g=a(223),v=a(83).map,p=a(545),x=g.aTypedArray,y=g.exportTypedArrayMethod;y("map",function(A){var I=v(x(this),A,arguments.length>1?arguments[1]:void 0);return p(this,I)})}),(function(T,P,a){var g=a(223),v=a(526),p=g.aTypedArrayConstructor,x=g.exportTypedArrayStaticMethod;x("of",function(){for(var b=0,A=arguments.length,I=new(p(this))(A);A>b;)I[b]=arguments[b++];return I},v)}),(function(T,P,a){var g=a(223),v=a(187).left,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("reduce",function(b){var A=arguments.length;return v(p(this),b,A,A>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=a(187).right,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("reduceRight",function(b){var A=arguments.length;return v(p(this),b,A,A>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(223),v=g.aTypedArray,p=g.exportTypedArrayMethod,x=Math.floor;p("reverse",function(){for(var b=this,A=v(b).length,I=x(A/2),R=0,O;R<I;)O=b[R],b[R++]=b[--A],b[A]=O;return b})}),(function(T,P,a){var g=a(4),v=a(8),p=a(223),x=a(63),y=a(527),b=a(39),A=a(7),I=g.RangeError,R=g.Int8Array,O=R&&R.prototype,M=O&&O.set,D=p.aTypedArray,L=p.exportTypedArrayMethod,B=!A(function(){var k=new Uint8ClampedArray(2);return v(M,k,{length:1,0:3},1),k[1]!==3}),F=B&&p.NATIVE_ARRAY_BUFFER_VIEWS&&A(function(){var k=new R(2);return k.set(1),k.set("2",1),k[0]!==0||k[1]!==2});L("set",function(W){D(this);var U=y(arguments.length>1?arguments[1]:void 0,1),X=b(W);if(B)return v(M,this,X,U);var j=this.length,H=x(X),Y=0;if(H+U>j)throw new I("Wrong length");for(;Y<H;)this[U+Y]=X[Y++]},!B||F)}),(function(T,P,a){var g=a(223),v=a(7),p=a(76),x=g.aTypedArray,y=g.getTypedArrayConstructor,b=g.exportTypedArrayMethod,A=v(function(){new Int8Array(1).slice()});b("slice",function(R,O){for(var M=p(x(this),R,O),D=y(this),L=0,B=M.length,F=new D(B);B>L;)F[L]=M[L++];return F},A)}),(function(T,P,a){var g=a(223),v=a(83).some,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("some",function(b){return v(p(this),b,arguments.length>1?arguments[1]:void 0)})}),(function(T,P,a){var g=a(4),v=a(85),p=a(7),x=a(30),y=a(195),b=a(223),A=a(196),I=a(197),R=a(27),O=a(198),M=b.aTypedArray,D=b.exportTypedArrayMethod,L=g.Uint16Array,B=L&&v(L.prototype.sort),F=!!B&&!(p(function(){B(new L(2),null)})&&p(function(){B(new L(2),{})})),k=!!B&&!p(function(){if(R)return R<74;if(A)return A<67;if(I)return!0;if(O)return O<602;var U=new L(516),X=Array(516),j,H;for(j=0;j<516;j++)H=j%4,U[j]=515-j,X[j]=j-2*H+3;for(B(U,function(Y,Z){return(Y/4|0)-(Z/4|0)}),j=0;j<516;j++)if(U[j]!==X[j])return!0}),W=function(U){return function(X,j){return U!==void 0?+U(X,j)||0:j!==j?X!==X?0:-1:X!==X?1:X===0&&j===0?1/X>0?1/j>0?0:1:1/j>0?-1:0:X>j?1:X<j?-1:0}};D("sort",function(X){return X!==void 0&&x(X),k?B(this,X):y(M(this),W(X))},!k||F)}),(function(T,P,a){var g=a(223),v=a(64),p=a(60),x=g.aTypedArray,y=g.getTypedArrayConstructor,b=g.exportTypedArrayMethod;b("subarray",function(I,R){var O=x(this),M=O.length,D=p(I,M),L=y(O);return new L(O.buffer,O.byteOffset+D*O.BYTES_PER_ELEMENT,v((R===void 0?M:p(R,M))-D))})}),(function(T,P,a){var g=a(4),v=a(95),p=a(223),x=a(7),y=a(76),b=g.Int8Array,A=p.aTypedArray,I=p.exportTypedArrayMethod,R=[].toLocaleString,O=!!b&&x(function(){R.call(new b(1))}),M=x(function(){return[1,2].toLocaleString()!==new b([1,2]).toLocaleString()})||!x(function(){b.prototype.toLocaleString.call([1,2])});I("toLocaleString",function(){return v(R,O?y(A(this)):A(this),y(arguments))},M)}),(function(T,P,a){var g=a(63),v=a(223),p=v.aTypedArray,x=v.exportTypedArrayMethod,y=v.getTypedArrayConstructor;x("toReversed",function(){for(var A=p(this),I=g(A),R=new(y(A))(I),O=0;O<I;O++)R[O]=A[I-O-1];return R})}),(function(T,P,a){var g=a(223),v=a(14),p=a(30),x=a(204),y=g.aTypedArray,b=g.getTypedArrayConstructor,A=g.exportTypedArrayMethod,I=v(g.TypedArrayPrototype.sort);A("toSorted",function(O){O!==void 0&&p(O);var M=y(this),D=x(b(M),M);return I(D,O)})}),(function(T,P,a){var g=a(223).exportTypedArrayMethod,v=a(7),p=a(4),x=a(14),y=p.Uint8Array,b=y&&y.prototype||{},A=[].toString,I=x([].join);v(function(){A.call({})})&&(A=function(){return I(this)});var R=b.toString!==A;g("toString",A,R)}),(function(T,P,a){var g=a(223),v=a(530),p=a(63),x=a(61),y=a(531),b=g.aTypedArray,A=g.getTypedArrayConstructor,I=g.exportTypedArrayMethod,R=RangeError,O=(function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(D){return D===8}})(),M=O&&(function(){try{new Int8Array(1).with(-.5,1)}catch(D){return!0}})();I("with",function(D,L){var B=b(this),F=p(B),k=x(D),W=k<0?F+k:k,U=v(B)?y(L):+L;if(W>=F||W<0)throw new R("Incorrect index");for(var X=new(A(B))(F),j=0;j<F;j++)X[j]=j===W?U:B[j];return X},!O||M)}),(function(T,P,a){var g=a(3),v=a(4),p=a(204),x=a(573),y=v.Uint8Array,b=!y||!y.fromBase64||!(function(){try{y.fromBase64("a");return}catch(A){}try{y.fromBase64("",null)}catch(A){return!0}})();y&&g({target:"Uint8Array",stat:!0,forced:b},{fromBase64:function(I){var R=x(I,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return p(y,R.bytes)}})}),(function(T,P,a){var g=a(4),v=a(14),p=a(574),x=a(440),y=a(38),b=a(575),A=a(576),I=a(236),R=b.c2i,O=b.c2iUrl,M=g.SyntaxError,D=g.TypeError,L=v("".charAt),B=function(W,U){for(var X=W.length;U<X;U++){var j=L(W,U);if(j!==" "&&j!==" "&&j!==`
|
|
30
|
+
`&&j!=="\f"&&j!=="\r")break}return U},F=function(W,U,X){var j=W.length;j<4&&(W+=j===2?"AA":"A");var H=(U[L(W,0)]<<18)+(U[L(W,1)]<<12)+(U[L(W,2)]<<6)+U[L(W,3)],Y=[H>>16&255,H>>8&255,H&255];if(j===2){if(X&&Y[1]!==0)throw new M("Extra bits");return[Y[0]]}if(j===3){if(X&&Y[2]!==0)throw new M("Extra bits");return[Y[0],Y[1]]}return Y},k=function(W,U,X){for(var j=U.length,H=0;H<j;H++)W[X+H]=U[H];return X+j};T.exports=function(W,U,X,j){x(W),p(U);var H=A(U)==="base64"?R:O,Y=U?U.lastChunkHandling:void 0;if(Y===void 0&&(Y="loose"),Y!=="loose"&&Y!=="strict"&&Y!=="stop-before-partial")throw new D("Incorrect `lastChunkHandling` option");X&&I(X.buffer);var Z=W.length,_=X||[],K=0,tt=0,nt="",at=0;if(j)for(;;){if(at=B(W,at),at===Z){if(nt.length>0){if(Y==="stop-before-partial")break;if(Y==="loose"){if(nt.length===1)throw new M("Malformed padding: exactly one additional character");K=k(_,F(nt,H,!1),K)}else throw new M("Missing padding")}tt=Z;break}var it=L(W,at);if(++at,it==="="){if(nt.length<2)throw new M("Padding is too early");if(at=B(W,at),nt.length===2){if(at===Z){if(Y==="stop-before-partial")break;throw new M("Malformed padding: only one =")}L(W,at)==="="&&(++at,at=B(W,at))}if(at<Z)throw new M("Unexpected character after padding");K=k(_,F(nt,H,Y==="strict"),K),tt=Z;break}if(!y(H,it))throw new M("Unexpected character");var ot=j-K;if(ot===1&&nt.length===2||ot===2&&nt.length===3||(nt+=it,nt.length===4&&(K=k(_,F(nt,H,!1),K),nt="",tt=at,K===j)))break}return{bytes:_,read:tt,written:K}}}),(function(T,P,a){var g=a(20),v=String,p=TypeError;T.exports=function(x){if(x===void 0||g(x))return x;throw new p(v(x)+" is not an object or undefined")}}),(function(T){var P="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=P+"+/",g=P+"-_",v=function(p){for(var x={},y=0;y<64;y++)x[p.charAt(y)]=y;return x};T.exports={i2c:a,c2i:v(a),i2cUrl:g,c2iUrl:v(g)}}),(function(T){var P=TypeError;T.exports=function(a){var g=a&&a.alphabet;if(g===void 0||g==="base64"||g==="base64url")return g||"base64";throw new P("Incorrect `alphabet` option")}}),(function(T,P,a){var g=a(3),v=a(4),p=a(440),x=a(578);v.Uint8Array&&g({target:"Uint8Array",stat:!0},{fromHex:function(b){return x(p(b)).bytes}})}),(function(T,P,a){var g=a(4),v=a(14),p=g.Uint8Array,x=g.SyntaxError,y=Math.min,b=v("".match);T.exports=function(A,I){var R=A.length;if(R%2!==0)throw new x("String should be an even number of characters");for(var O=I?y(I.length,R/2):R/2,M=I||new p(O),D=b(A,/.{2}/g),L=0;L<O;L++){var B=+("0x"+D[L]+"0");if(B!==B)throw new x("String should only contain hex characters");M[L]=B>>4}return{bytes:M,read:L<<1}}}),(function(T,P,a){var g=a(3),v=a(4),p=a(573),x=a(580),y=v.Uint8Array,b=!y||!y.prototype.setFromBase64||!(function(){var A=new y([255,255,255,255,255]);try{A.setFromBase64("",null);return}catch(I){}try{A.setFromBase64("a");return}catch(I){}try{A.setFromBase64("MjYyZg===")}catch(I){return A[0]===50&&A[1]===54&&A[2]===50&&A[3]===255&&A[4]===255}})();y&&g({target:"Uint8Array",proto:!0,forced:b},{setFromBase64:function(I){x(this);var R=p(I,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:R.read,written:R.written}}})}),(function(T,P,a){var g=a(69),v=TypeError;T.exports=function(p){if(g(p)==="Uint8Array")return p;throw new v("Argument is not an Uint8Array")}}),(function(T,P,a){var g=a(3),v=a(4),p=a(440),x=a(580),y=a(236),b=a(578);function A(){try{var I=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(I).setFromHex("cafed00d")}catch(R){return!0}}v.Uint8Array&&g({target:"Uint8Array",proto:!0,forced:A()},{setFromHex:function(R){x(this),p(R),y(this.buffer);var O=b(R,this).read;return{read:O,written:O/2}}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(14),x=a(574),y=a(580),b=a(236),A=a(575),I=a(576),R=A.i2c,O=A.i2cUrl,M=p("".charAt),D=v.Uint8Array,L=!D||!D.prototype.toBase64||!(function(){try{var B=new D;B.toBase64(null)}catch(F){return!0}})();D&&g({target:"Uint8Array",proto:!0,forced:L},{toBase64:function(){var F=y(this),k=arguments.length?x(arguments[0]):void 0,W=I(k)==="base64"?R:O,U=!!k&&!!k.omitPadding;b(this.buffer);for(var X="",j=0,H=F.length,Y,Z=function(_){return M(W,Y>>6*_&63)};j+2<H;j+=3)Y=(F[j]<<16)+(F[j+1]<<8)+F[j+2],X+=Z(3)+Z(2)+Z(1)+Z(0);return j+2===H?(Y=(F[j]<<16)+(F[j+1]<<8),X+=Z(3)+Z(2)+Z(1)+(U?"":"=")):j+1===H&&(Y=F[j]<<16,X+=Z(3)+Z(2)+(U?"":"==")),X}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(14),x=a(580),y=a(236),b=p(1.1.toString),A=p([].join),I=Array,R=v.Uint8Array,O=!R||!R.prototype.toHex||!(function(){try{var M=new R([255,255,255,255,255,255,255,255]);return M.toHex()==="ffffffffffffffff"}catch(D){return!1}})();R&&g({target:"Uint8Array",proto:!0,forced:O},{toHex:function(){x(this),y(this.buffer);for(var D=I(this.length),L=0,B=this.length;L<B;L++){var F=b(this[L],16);D[L]=F.length===1?"0"+F:F}return A(D,"")}})}),(function(T,P,a){var g=a(3),v=a(14),p=a(68),x=String.fromCharCode,y=v("".charAt),b=v(/./.exec),A=v("".slice),I=/^[\da-f]{2}$/i,R=/^[\da-f]{4}$/i;g({global:!0},{unescape:function(M){for(var D=p(M),L="",B=D.length,F=0,k,W;F<B;){if(k=y(D,F++),k==="%"){if(y(D,F)==="u"){if(W=A(D,F+1,F+5),b(R,W)){L+=x(parseInt(W,16)),F+=5;continue}}else if(W=A(D,F,F+2),b(I,W)){L+=x(parseInt(W,16)),F+=2;continue}}L+=k}return L}})}),(function(T,P,a){a(586)}),(function(T,P,a){var g=a(287),v=a(4),p=a(14),x=a(214),y=a(292),b=a(291),A=a(587),I=a(20),R=a(51).enforce,O=a(7),M=a(52),D=Object,L=Array.isArray,B=D.isExtensible,F=D.isFrozen,k=D.isSealed,W=D.freeze,U=D.seal,X=!v.ActiveXObject&&"ActiveXObject"in v,j,H=function(it){return function(){return it(this,arguments.length?arguments[0]:void 0)}},Y=b("WeakMap",H,A),Z=Y.prototype,_=p(Z.set),K=function(){return g&&O(function(){var it=W([]);return _(new Y,it,1),!F(it)})};if(M)if(X){j=A.getConstructor(H,"WeakMap",!0),y.enable();var tt=p(Z.delete),nt=p(Z.has),at=p(Z.get);x(Z,{delete:function(it){if(I(it)&&!B(it)){var ot=R(this);return ot.frozen||(ot.frozen=new j),tt(this,it)||ot.frozen.delete(it)}return tt(this,it)},has:function(ot){if(I(ot)&&!B(ot)){var ut=R(this);return ut.frozen||(ut.frozen=new j),nt(this,ot)||ut.frozen.has(ot)}return nt(this,ot)},get:function(ot){if(I(ot)&&!B(ot)){var ut=R(this);return ut.frozen||(ut.frozen=new j),nt(this,ot)?at(this,ot):ut.frozen.get(ot)}return at(this,ot)},set:function(ot,ut){if(I(ot)&&!B(ot)){var ht=R(this);ht.frozen||(ht.frozen=new j),nt(this,ot)?_(this,ot,ut):ht.frozen.set(ot,ut)}else _(this,ot,ut);return this}})}else K()&&x(Z,{set:function(ot,ut){var ht;return L(ot)&&(F(ot)?ht=W:k(ot)&&(ht=U)),_(this,ot,ut),ht&&ht(ot),this}})}),(function(T,P,a){var g=a(14),v=a(214),p=a(292).getWeakData,x=a(215),y=a(46),b=a(17),A=a(20),I=a(136),R=a(83),O=a(38),M=a(51),D=M.set,L=M.getterFor,B=R.find,F=R.findIndex,k=g([].splice),W=0,U=function(H){return H.frozen||(H.frozen=new X)},X=function(){this.entries=[]},j=function(H,Y){return B(H.entries,function(Z){return Z[0]===Y})};X.prototype={get:function(H){var Y=j(this,H);if(Y)return Y[1]},has:function(H){return!!j(this,H)},set:function(H,Y){var Z=j(this,H);Z?Z[1]=Y:this.entries.push([H,Y])},delete:function(H){var Y=F(this.entries,function(Z){return Z[0]===H});return~Y&&k(this.entries,Y,1),!!~Y}},T.exports={getConstructor:function(H,Y,Z,_){var K=H(function(it,ot){x(it,tt),D(it,{type:Y,id:W++,frozen:null}),b(ot)||I(ot,it[_],{that:it,AS_ENTRIES:Z})}),tt=K.prototype,nt=L(Y),at=function(it,ot,ut){var ht=nt(it),gt=p(y(ot),!0);return gt===!0?U(ht).set(ot,ut):gt[ht.id]=ut,it};return v(tt,{delete:function(it){var ot=nt(this);if(!A(it))return!1;var ut=p(it);return ut===!0?U(ot).delete(it):ut&&O(ut,ot.id)&&delete ut[ot.id]},has:function(ot){var ut=nt(this);if(!A(ot))return!1;var ht=p(ot);return ht===!0?U(ut).has(ot):ht&&O(ht,ut.id)}}),v(tt,Z?{get:function(ot){var ut=nt(this);if(A(ot)){var ht=p(ot);if(ht===!0)return U(ut).get(ot);if(ht)return ht[ut.id]}},set:function(ot,ut){return at(this,ot,ut)}}:{add:function(ot){return at(this,ot,!0)}}),K}}}),(function(T,P,a){var g=a(3),v=a(589),p=a(36),x=v.get,y=v.has,b=v.set;g({target:"WeakMap",proto:!0,real:!0,forced:p},{getOrInsert:function(I,R){return y(this,I)?x(this,I):(b(this,I,R),R)}})}),(function(T,P,a){var g=a(14),v=WeakMap.prototype;T.exports={WeakMap,set:g(v.set),get:g(v.get),has:g(v.has),remove:g(v.delete)}}),(function(T,P,a){var g=a(3),v=a(30),p=a(591),x=a(592),y=a(589),b=a(36),A=y.get,I=y.has,R=y.set,O=b||!(function(){try{WeakMap.prototype.getOrInsertComputed&&new WeakMap().getOrInsertComputed(1,function(){throw 1})}catch(M){return M instanceof TypeError}})();g({target:"WeakMap",proto:!0,real:!0,forced:O},{getOrInsertComputed:function(D,L){if(b||p(this),x(D),v(L),I(this,D))return A(this,D);var B=L(D);return R(this,D,B),B}})}),(function(T,P,a){var g=a(589).has;T.exports=function(v){return g(v),v}}),(function(T,P,a){var g=a(589),v=new g.WeakMap,p=g.set,x=g.remove;T.exports=function(y){return p(v,y,1),x(v,y),y}}),(function(T,P,a){a(594)}),(function(T,P,a){var g=a(291),v=a(587);g("WeakSet",function(p){return function(){return p(this,arguments.length?arguments[0]:void 0)}},v)}),(function(T,P,a){var g=a(3),v=a(4),p=a(23),x=a(14),y=a(8),b=a(7),A=a(68),I=a(383),R=a(575).c2i,O=/[^\d+/a-z]/i,M=/[\t\n\f\r ]+/g,D=/[=]{1,2}$/,L=p("atob"),B=Array,F=String.fromCharCode,k=x("".charAt),W=x("".replace),U=x([].join),X=x(O.exec),j=!!L&&!b(function(){return L("aGk=")!=="hi"}),H=j&&b(function(){return L(" ")!==""}),Y=j&&!b(function(){L("a")}),Z=j&&!b(function(){L()}),_=j&&L.length!==1,K=!j||H||Y||Z||_;g({global:!0,bind:!0,enumerable:!0,forced:K},{atob:function(nt){if(I(arguments.length,1),j&&!H&&!Y)return y(L,v,nt);var at=W(A(nt),M,""),it=0,ot=0,ut,ht,gt;at.length&3||(at=W(at,D,"")),ut=at.length;var yt=ut&3;if(yt===1||X(O,at))throw new(p("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(var Et=new B((ut>>2)*3+(yt?yt-1:0)),bt=0;it<ut;)ht=k(at,it++),gt=ot&3?(gt<<6)+R[ht]:R[ht],ot++&3&&(Et[bt++]=F(255>>>(-2*ot&6)));return U(Et,"")}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(23),x=a(14),y=a(8),b=a(7),A=a(68),I=a(383),R=a(575).i2c,O=p("btoa"),M=Array,D=x([].join),L=x("".charAt),B=x("".charCodeAt),F=!!O&&!b(function(){return O("hi")!=="aGk="}),k=F&&!b(function(){O()}),W=F&&b(function(){return O(null)!=="bnVsbA=="}),U=F&&O.length!==1;g({global:!0,bind:!0,enumerable:!0,forced:!F||k||W||U},{btoa:function(j){if(I(arguments.length,1),F)return y(O,v,A(j));for(var H=A(j),Y=new M((H.length+2)/3<<2),Z=0,_=0,K=R,tt,nt;L(H,_)||(K="=",_%1);){if(nt=B(H,_+=.75),nt>255)throw new(p("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");tt=tt<<8|nt,Y[Z++]=L(K,63&tt>>8-_%1*8)}return D(Y,"")}})}),(function(T,P,a){var g=a(4),v=a(598),p=a(599),x=a(167),y=a(43),b=function(I){if(I&&I.forEach!==x)try{y(I,"forEach",x)}catch(R){I.forEach=x}};for(var A in v)v[A]&&b(g[A]&&g[A].prototype);b(p)}),(function(T){T.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}),(function(T,P,a){var g=a(42),v=g("span").classList,p=v&&v.constructor&&v.constructor.prototype;T.exports=p===Object.prototype?void 0:p}),(function(T,P,a){var g=a(4),v=a(598),p=a(599),x=a(175),y=a(43),b=a(82),A=a(33),I=A("iterator"),R=x.values,O=function(D,L){if(D){if(D[I]!==R)try{y(D,I,R)}catch(F){D[I]=R}if(b(D,L,!0),v[L]){for(var B in x)if(D[B]!==x[B])try{y(D,B,x[B])}catch(F){D[B]=x[B]}}}};for(var M in v)O(g[M]&&g[M].prototype,M);O(p,"DOMTokenList")}),(function(T,P,a){var g=a(3),v=a(23),p=a(238),x=a(7),y=a(71),b=a(11),A=a(44).f,I=a(47),R=a(77),O=a(38),M=a(215),D=a(46),L=a(131),B=a(124),F=a(602),k=a(127),W=a(51),U=a(6),X=a(36),j="DOMException",H="DATA_CLONE_ERR",Y=v("Error"),Z=v(j)||(function(){try{var Ot=v("MessageChannel")||p("worker_threads").MessageChannel;new Ot().port1.postMessage(new WeakMap)}catch(jt){if(jt.name===H&&jt.code===25)return jt.constructor}})(),_=Z&&Z.prototype,K=Y.prototype,tt=W.set,nt=W.getterFor(j),at="stack"in new Y(j),it=function(Ot){return O(F,Ot)&&F[Ot].m?F[Ot].c:0},ot=function(){M(this,ut);var jt=arguments.length,ie=B(jt<1?void 0:arguments[0]),me=B(jt<2?void 0:arguments[1],"Error"),se=it(me);if(tt(this,{type:j,name:me,message:ie,code:se}),U||(this.name=me,this.message=ie,this.code=se),at){var he=new Y(ie);he.name=j,A(this,"stack",b(1,k(he.stack,1)))}},ut=ot.prototype=y(K),ht=function(Ot){return{enumerable:!0,configurable:!0,get:Ot}},gt=function(Ot){return ht(function(){return nt(this)[Ot]})};U&&(R(ut,"code",gt("code")),R(ut,"message",gt("message")),R(ut,"name",gt("name"))),A(ut,"constructor",b(1,ot));var yt=x(function(){return!(new Z instanceof Y)}),Et=yt||x(function(){return K.toString!==L||String(new Z(1,2))!=="2: 1"}),bt=yt||x(function(){return new Z(1,"DataCloneError").code!==25}),Ft=yt||Z[H]!==25||_[H]!==25,Lt=X?Et||bt||Ft:yt;g({global:!0,constructor:!0,forced:Lt},{DOMException:Lt?ot:Z});var Pt=v(j),mt=Pt.prototype;Et&&(X||Z===Pt)&&I(mt,"toString",L),bt&&U&&Z===Pt&&R(mt,"code",ht(function(){return it(D(this).name)}));for(var xt in F)if(O(F,xt)){var wt=F[xt],Bt=wt.s,Jt=b(6,wt.c);O(Pt,Bt)||A(Pt,Bt,Jt),O(mt,Bt)||A(mt,Bt,Jt)}}),(function(T){T.exports={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}}}),(function(T,P,a){var g=a(3),v=a(4),p=a(23),x=a(11),y=a(44).f,b=a(38),A=a(215),I=a(123),R=a(124),O=a(602),M=a(127),D=a(6),L=a(36),B="DOMException",F=p("Error"),k=p(B),W=function(){A(this,U);var ot=arguments.length,ut=R(ot<1?void 0:arguments[0]),ht=R(ot<2?void 0:arguments[1],"Error"),gt=new k(ut,ht),yt=new F(ut);return yt.name=B,y(gt,"stack",x(1,M(yt.stack,1))),I(gt,this,W),gt},U=W.prototype=k.prototype,X="stack"in new F(B),j="stack"in new k(1,2),H=k&&D&&Object.getOwnPropertyDescriptor(v,B),Y=!!H&&!(H.writable&&H.configurable),Z=X&&!Y&&!j;g({global:!0,constructor:!0,forced:L||Z},{DOMException:Z?W:k});var _=p(B),K=_.prototype;if(K.constructor!==_){L||y(K,"constructor",x(1,_));for(var tt in O)if(b(O,tt)){var nt=O[tt],at=nt.s;b(_,at)||y(_,at,x(6,nt.c))}}}),(function(T,P,a){var g=a(23),v=a(82),p="DOMException";v(g(p),p)}),(function(T,P,a){a(606),a(607)}),(function(T,P,a){var g=a(3),v=a(4),p=a(382).clear;g({global:!0,bind:!0,enumerable:!0,forced:v.clearImmediate!==p},{clearImmediate:p})}),(function(T,P,a){var g=a(3),v=a(4),p=a(382).set,x=a(608),y=v.setImmediate?x(p,!1):p;g({global:!0,bind:!0,enumerable:!0,forced:v.setImmediate!==y},{setImmediate:y})}),(function(T,P,a){var g=a(4),v=a(95),p=a(21),x=a(189),y=a(28),b=a(76),A=a(383),I=g.Function,R=/MSIE .\./.test(y)||x==="BUN"&&(function(){var O=g.Bun.version.split(".");return O.length<3||O[0]==="0"&&(O[1]<3||O[1]==="3"&&O[2]==="0")})();T.exports=function(O,M){var D=M?2:1;return R?function(L,B){var F=A(arguments.length,1)>D,k=p(L)?L:I(L),W=F?b(arguments,D):[],U=F?function(){v(k,this,W)}:k;return M?O(U,B):O(U)}:O}}),(function(T,P,a){var g=a(3),v=a(4),p=a(385),x=a(30),y=a(383),b=a(7),A=a(6),I=b(function(){return A&&Object.getOwnPropertyDescriptor(v,"queueMicrotask").value.length!==1});g({global:!0,enumerable:!0,dontCallGetSet:!0,forced:I},{queueMicrotask:function(O){y(arguments.length,1),p(x(O))}})}),(function(T,P,a){var g=a(3),v=a(4),p=a(77),x=a(6),y=TypeError,b=Object.defineProperty,A=v.self!==v;try{if(x){var I=Object.getOwnPropertyDescriptor(v,"self");(A||!I||!I.get||!I.enumerable)&&p(v,"self",{get:function(){return v},set:function(O){if(this!==v)throw new y("Illegal invocation");b(v,"self",{value:O,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else g({global:!0,simple:!0,forced:A},{self:v})}catch(R){}}),(function(T,P,a){var g=a(36),v=a(3),p=a(4),x=a(23),y=a(14),b=a(7),A=a(40),I=a(21),R=a(89),O=a(17),M=a(20),D=a(22),L=a(136),B=a(46),F=a(69),k=a(38),W=a(90),U=a(43),X=a(63),j=a(383),H=a(433),Y=a(297),Z=a(453),_=a(455),K=a(237),tt=a(128),nt=a(239),at=p.Object,it=p.Array,ot=p.Date,ut=p.Error,ht=p.TypeError,gt=p.PerformanceMark,yt=x("DOMException"),Et=Y.Map,bt=Y.has,Ft=Y.get,Lt=Y.set,Pt=Z.Set,mt=Z.add,xt=Z.has,wt=x("Object","keys"),Bt=y([].push),Jt=y((!0).valueOf),Ot=y(1.1.valueOf),jt=y("".valueOf),ie=y(ot.prototype.getTime),me=A("structuredClone"),se="DataCloneError",he="Transferring",Oe=function(It){return!b(function(){var Xt=new p.Set([7]),Mt=It(Xt),$t=It(at(7));return Mt===Xt||!Mt.has(7)||!M($t)||+$t!=7})&&It},Me=function(It,Xt){return!b(function(){var Mt=new Xt,$t=It({a:Mt,b:Mt});return!($t&&$t.a===$t.b&&$t.a instanceof Xt&&$t.a.stack===Mt.stack)})},Re=function(It){return!b(function(){var Xt=It(new p.AggregateError([1],me,{cause:3}));return Xt.name!=="AggregateError"||Xt.errors[0]!==1||Xt.message!==me||Xt.cause!==3})},ge=p.structuredClone,Te=g||!Me(ge,ut)||!Me(ge,yt)||!Re(ge),Ve=!ge&&Oe(function(It){return new gt(me,{detail:It}).detail}),Ht=Oe(ge)||Ve,ne=function(It){throw new yt("Uncloneable type: "+It,se)},ae=function(It,Xt){throw new yt((Xt||"Cloning")+" of "+It+" cannot be properly polyfilled in this engine",se)},rn=function(It,Xt){return Ht||ae(Xt),Ht(It)},Yt=function(){var It;try{It=new p.DataTransfer}catch(Xt){try{It=new p.ClipboardEvent("").clipboardData}catch(Mt){}}return It&&It.items&&It.files?It:null},ee=function(It,Xt,Mt){if(bt(Xt,It))return Ft(Xt,It);var $t=Mt||F(It),_t,Nt,Se,He,Wt,Qt;if($t==="SharedArrayBuffer")Ht?_t=Ht(It):_t=It;else{var te=p.DataView;!te&&!I(It.slice)&&ae("ArrayBuffer");try{if(I(It.slice)&&!It.resizable)_t=It.slice(0);else for(Nt=It.byteLength,Se=("maxByteLength"in It)?{maxByteLength:It.maxByteLength}:void 0,_t=new ArrayBuffer(Nt,Se),He=new te(It),Wt=new te(_t),Qt=0;Qt<Nt;Qt++)Wt.setUint8(Qt,He.getUint8(Qt))}catch(oe){throw new yt("ArrayBuffer is detached",se)}}return Lt(Xt,It,_t),_t},pe=function(It,Xt,Mt,$t,_t){var Nt=p[Xt];return M(Nt)||ae(Xt),new Nt(ee(It.buffer,_t),Mt,$t)},ce=function(It,Xt){if(D(It)&&ne("Symbol"),!M(It))return It;if(Xt){if(bt(Xt,It))return Ft(Xt,It)}else Xt=new Et;var Mt=F(It),$t,_t,Nt,Se,He,Wt,Qt,te;switch(Mt){case"Array":Nt=it(X(It));break;case"Object":Nt={};break;case"Map":Nt=new Et;break;case"Set":Nt=new Pt;break;case"RegExp":Nt=new RegExp(It.source,H(It));break;case"Error":switch(_t=It.name,_t){case"AggregateError":Nt=new(x(_t))([]);break;case"EvalError":case"RangeError":case"ReferenceError":case"SuppressedError":case"SyntaxError":case"TypeError":case"URIError":Nt=new(x(_t));break;case"CompileError":case"LinkError":case"RuntimeError":Nt=new(x("WebAssembly",_t));break;default:Nt=new ut}break;case"DOMException":Nt=new yt(It.message,It.name);break;case"ArrayBuffer":case"SharedArrayBuffer":Nt=ee(It,Xt,Mt);break;case"DataView":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float16Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":Wt=Mt==="DataView"?It.byteLength:It.length,Nt=pe(It,Mt,It.byteOffset,Wt,Xt);break;case"DOMQuad":try{Nt=new DOMQuad(ce(It.p1,Xt),ce(It.p2,Xt),ce(It.p3,Xt),ce(It.p4,Xt))}catch(oe){Nt=rn(It,Mt)}break;case"File":if(Ht)try{Nt=Ht(It),F(Nt)!==Mt&&(Nt=void 0)}catch(oe){}if(!Nt)try{Nt=new File([It],It.name,It)}catch(oe){}Nt||ae(Mt);break;case"FileList":if(Se=Yt(),Se){for(He=0,Wt=X(It);He<Wt;He++)Se.items.add(ce(It[He],Xt));Nt=Se.files}else Nt=rn(It,Mt);break;case"ImageData":try{Nt=new ImageData(ce(It.data,Xt),It.width,It.height,{colorSpace:It.colorSpace})}catch(oe){Nt=rn(It,Mt)}break;default:if(Ht)Nt=Ht(It);else switch(Mt){case"BigInt":Nt=at(It.valueOf());break;case"Boolean":Nt=at(Jt(It));break;case"Number":Nt=at(Ot(It));break;case"String":Nt=at(jt(It));break;case"Date":Nt=new ot(ie(It));break;case"Blob":try{Nt=It.slice(0,It.size,It.type)}catch(oe){ae(Mt)}break;case"DOMPoint":case"DOMPointReadOnly":$t=p[Mt];try{Nt=$t.fromPoint?$t.fromPoint(It):new $t(It.x,It.y,It.z,It.w)}catch(oe){ae(Mt)}break;case"DOMRect":case"DOMRectReadOnly":$t=p[Mt];try{Nt=$t.fromRect?$t.fromRect(It):new $t(It.x,It.y,It.width,It.height)}catch(oe){ae(Mt)}break;case"DOMMatrix":case"DOMMatrixReadOnly":$t=p[Mt];try{Nt=$t.fromMatrix?$t.fromMatrix(It):new $t(It)}catch(oe){ae(Mt)}break;case"AudioData":case"VideoFrame":I(It.clone)||ae(Mt);try{Nt=It.clone()}catch(oe){ne(Mt)}break;case"CropTarget":case"CryptoKey":case"FileSystemDirectoryHandle":case"FileSystemFileHandle":case"FileSystemHandle":case"GPUCompilationInfo":case"GPUCompilationMessage":case"ImageBitmap":case"RTCCertificate":case"WebAssembly.Module":ae(Mt);default:ne(Mt)}}switch(Lt(Xt,It,Nt),Mt){case"Array":case"Object":for(Qt=wt(It),He=0,Wt=X(Qt);He<Wt;He++)te=Qt[He],W(Nt,te,ce(It[te],Xt));break;case"Map":It.forEach(function(oe,we){Lt(Nt,ce(we,Xt),ce(oe,Xt))});break;case"Set":It.forEach(function(oe){mt(Nt,ce(oe,Xt))});break;case"Error":U(Nt,"message",ce(It.message,Xt)),k(It,"cause")&&U(Nt,"cause",ce(It.cause,Xt)),_t==="AggregateError"?Nt.errors=ce(It.errors,Xt):_t==="SuppressedError"&&(Nt.error=ce(It.error,Xt),Nt.suppressed=ce(It.suppressed,Xt));case"DOMException":tt&&U(Nt,"stack",ce(It.stack,Xt))}return Nt},Pe=function(It,Xt){if(!M(It))throw new ht("Transfer option cannot be converted to a sequence");var Mt=[];L(It,function(we){Bt(Mt,B(we))});for(var $t=0,_t=X(Mt),Nt=new Pt,Se,He,Wt,Qt,te,oe;$t<_t;){if(Se=Mt[$t++],He=F(Se),Qt=void 0,He==="ArrayBuffer"?xt(Nt,Se):bt(Xt,Se))throw new yt("Duplicate transferable",se);if(He==="ArrayBuffer"){mt(Nt,Se);continue}if(nt)Qt=ge(Se,{transfer:[Se]});else switch(He){case"ImageBitmap":Wt=p.OffscreenCanvas,R(Wt)||ae(He,he);try{te=new Wt(Se.width,Se.height),oe=te.getContext("bitmaprenderer"),oe.transferFromImageBitmap(Se),Qt=te.transferToImageBitmap()}catch(we){}break;case"AudioData":case"VideoFrame":(!I(Se.clone)||!I(Se.close))&&ae(He,he);try{Qt=Se.clone(),Se.close()}catch(we){}break;case"MediaSourceHandle":case"MessagePort":case"MIDIAccess":case"OffscreenCanvas":case"ReadableStream":case"RTCDataChannel":case"TransformStream":case"WebTransportReceiveStream":case"WebTransportSendStream":case"WritableStream":ae(He,he)}if(Qt===void 0)throw new yt("This object cannot be transferred: "+He,se);Lt(Xt,Se,Qt)}return Nt},ln=function(It){_(It,function(Xt){nt?ge(Xt,{transfer:[Xt]}):I(Xt.transfer)?Xt.transfer():K?K(Xt):ae("ArrayBuffer",he)})};v({global:!0,enumerable:!0,sham:!nt,forced:Te},{structuredClone:function(Xt){var Mt=j(arguments.length,1)>1&&!O(arguments[1])?B(arguments[1]):void 0,$t=Mt?Mt.transfer:void 0,_t,Nt;$t!==void 0&&(_t=new Et,Nt=Pe($t,_t));var Se=ce(Xt,_t);return Nt&&ln(Nt),Se}})}),(function(T,P,a){a(613),a(614)}),(function(T,P,a){var g=a(3),v=a(4),p=a(608),x=p(v.setInterval,!0);g({global:!0,bind:!0,forced:v.setInterval!==x},{setInterval:x})}),(function(T,P,a){var g=a(3),v=a(4),p=a(608),x=p(v.setTimeout,!0);g({global:!0,bind:!0,forced:v.setTimeout!==x},{setTimeout:x})}),(function(T,P,a){a(616)}),(function(T,P,a){a(482);var g=a(3),v=a(6),p=a(617),x=a(4),y=a(84),b=a(14),A=a(47),I=a(77),R=a(215),O=a(38),M=a(344),D=a(169),L=a(76),B=a(475).codeAt,F=a(618),k=a(68),W=a(82),U=a(383),X=a(619),j=a(51),H=j.set,Y=j.getterFor("URL"),Z=X.URLSearchParams,_=X.getState,K=x.URL,tt=x.TypeError,nt=x.encodeURIComponent,at=x.parseInt,it=Math.floor,ot=Math.pow,ut=b("".charAt),ht=b(/./.exec),gt=b([].join),yt=b(1.1.toString),Et=b([].pop),bt=b([].push),Ft=b("".replace),Lt=b([].shift),Pt=b("".split),mt=b("".slice),xt=b("".toLowerCase),wt=b([].unshift),Bt="Invalid authority",Jt="Invalid scheme",Ot="Invalid host",jt="Invalid port",ie=/[a-z]/i,me=/[\d+\-.a-z]/i,se=/\d/,he=/^0x/i,Oe=/^[0-7]+$/,Me=/^\d+$/,Re=/^[\da-f]+$/i,ge=/[\0\t\n\r #%/:<>?@[\\\]^|]/,Te=/[\0\t\n\r #/:<>?@[\\\]^|]/,Ve=/^[\u0000-\u0020]+/,Ht=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,ne=/[\t\n\r]/g,ae,rn=function(St){var Gt=Pt(St,"."),At,vt;if(Gt[Gt.length-1]===""){if(Gt.length===1)return!1;Gt.length--}return At=Gt[Gt.length-1],ht(Me,At)?!0:ht(he,At)?(vt=mt(At,2),vt===""||!!ht(Re,vt)):!1},Yt=function(St){var Gt=Pt(St,"."),At,vt,zt,Le,de,Ut,kt;if(Gt.length&&Gt[Gt.length-1]===""&&Gt.length--,At=Gt.length,At>4)return null;for(vt=[],zt=0;zt<At;zt++){if(Le=Gt[zt],Le==="")return null;if(de=10,Le.length>1&&ut(Le,0)==="0"&&(de=ht(he,Le)?16:8,Le=mt(Le,de===8?1:2)),Le==="")Ut=0;else{if(!ht(de===10?Me:de===8?Oe:Re,Le))return null;Ut=at(Le,de)}bt(vt,Ut)}for(zt=0;zt<At;zt++)if(Ut=vt[zt],zt===At-1){if(Ut>=ot(256,5-At))return null}else if(Ut>255)return null;for(kt=Et(vt),zt=0;zt<vt.length;zt++)kt+=vt[zt]*ot(256,3-zt);return kt},ee=function(St){var Gt=[0,0,0,0,0,0,0,0],At=0,vt=null,zt=0,Le,de,Ut,kt,Cn,vn,Dt,fn=function(){return ut(St,zt)};if(fn()===":"){if(ut(St,1)!==":")return;zt+=2,At++,vt=At}for(;fn();){if(At===8)return;if(fn()===":"){if(vt!==null)return;zt++,At++,vt=At;continue}for(Le=de=0;de<4&&ht(Re,fn());)Le=Le*16+at(fn(),16),zt++,de++;if(fn()==="."){if(de===0||(zt-=de,At>6))return;for(Ut=0;fn();){if(kt=null,Ut>0)if(fn()==="."&&Ut<4)zt++;else return;if(!ht(se,fn()))return;for(;ht(se,fn());){if(Cn=at(fn(),10),kt===null)kt=Cn;else{if(kt===0)return;kt=kt*10+Cn}if(kt>255)return;zt++}Gt[At]=Gt[At]*256+kt,Ut++,(Ut===2||Ut===4)&&At++}if(Ut!==4)return;break}else if(fn()===":"){if(zt++,!fn())return}else if(fn())return;Gt[At++]=Le}if(vt!==null)for(vn=At-vt,At=7;At!==0&&vn>0;)Dt=Gt[At],Gt[At--]=Gt[vt+vn-1],Gt[vt+--vn]=Dt;else if(At!==8)return;return Gt},pe=function(St){for(var Gt=null,At=1,vt=null,zt=0,Le=0;Le<8;Le++)St[Le]!==0?(zt>At&&(Gt=vt,At=zt),vt=null,zt=0):(vt===null&&(vt=Le),++zt);return zt>At?vt:Gt},ce=function(St){var Gt,At,vt,zt;if(typeof St=="number"){for(Gt=[],At=0;At<4;At++)wt(Gt,St%256),St=it(St/256);return gt(Gt,".")}if(typeof St=="object"){for(Gt="",vt=pe(St),At=0;At<8;At++)zt&&St[At]===0||(zt&&(zt=!1),vt===At?(Gt+=At?":":"::",zt=!0):(Gt+=yt(St[At],16),At<7&&(Gt+=":")));return"["+Gt+"]"}return St},Pe={},ln=M({},Pe,{" ":1,'"':1,"#":1,"<":1,">":1}),It=M({},ln,{"'":1}),Xt=M({},Pe,{" ":1,'"':1,"<":1,">":1,"`":1}),Mt=M({},Xt,{"#":1,"?":1,"{":1,"}":1,"^":1}),$t=M({},Mt,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),_t=function(St,Gt){var At=B(St,0);return At>=32&&At<127&&!O(Gt,St)?St:St==="'"&&O(Gt,St)?"%27":nt(St)},Nt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},Se=function(St,Gt){var At;return St.length===2&&ht(ie,ut(St,0))&&((At=ut(St,1))===":"||!Gt&&At==="|")},He=function(St){var Gt;return St.length>1&&Se(mt(St,0,2))&&(St.length===2||(Gt=ut(St,2))==="/"||Gt==="\\"||Gt==="?"||Gt==="#")},Wt=function(St){return St==="."||xt(St)==="%2e"},Qt=function(St){return St=xt(St),St===".."||St==="%2e."||St===".%2e"||St==="%2e%2e"},te={},oe={},we={},ze={},un={},gn={},yn={},En={},ar={},wr={},Ci={},Ii={},Ri={},wi={},Ao={},Oi={},ca={},ur={},Eo={},Gr={},mr={},Pi=function(St,Gt,At){var vt=k(St),zt,Le,de;if(Gt){if(Le=this.parse(vt),Le)throw new tt(Le);this.searchParams=null}else{if(At!==void 0&&(zt=new Pi(At,!0)),Le=this.parse(vt,null,zt),Le)throw new tt(Le);de=_(new Z),de.bindURL(this),this.searchParams=de}};Pi.prototype={type:"URL",parse:function(St,Gt,At){var vt=this,zt=Gt||te,Le=0,de="",Ut=!1,kt=!1,Cn=!1,vn,Dt,fn,xr;for(St=k(St),Gt||(vt.scheme="",vt.username="",vt.password="",vt.host=null,vt.port=null,vt.path=[],vt.query=null,vt.fragment=null,vt.cannotBeABaseURL=!1,St=Ft(St,Ve,""),St=Ft(St,Ht,"$1")),St=Ft(St,ne,""),vn=D(St);Le<=vn.length;){switch(Dt=vn[Le],zt){case te:if(Dt&&ht(ie,Dt))de+=xt(Dt),zt=oe;else{if(Gt)return Jt;zt=we;continue}break;case oe:if(Dt&&ht(me,Dt))de+=xt(Dt);else if(Dt===":"){if(Gt&&(vt.isSpecial()!==O(Nt,de)||de==="file"&&(vt.includesCredentials()||vt.port!==null)||vt.scheme==="file"&&vt.host===""))return;if(vt.scheme=de,Gt){vt.isSpecial()&&Nt[vt.scheme]===vt.port&&(vt.port=null);return}de="",vt.scheme==="file"?zt=wi:vt.isSpecial()&&At&&At.scheme===vt.scheme?zt=ze:vt.isSpecial()?zt=En:vn[Le+1]==="/"?(zt=un,Le++):(vt.cannotBeABaseURL=!0,bt(vt.path,""),zt=Eo)}else{if(Gt)return Jt;de="",zt=we,Le=0;continue}break;case we:if(!At||At.cannotBeABaseURL&&Dt!=="#")return Jt;if(At.cannotBeABaseURL&&Dt==="#"){vt.scheme=At.scheme,vt.path=L(At.path),vt.query=At.query,vt.fragment="",vt.cannotBeABaseURL=!0,zt=mr;break}zt=At.scheme==="file"?wi:gn;continue;case ze:if(Dt==="/"&&vn[Le+1]==="/")zt=ar,Le++;else{zt=gn;continue}break;case un:if(Dt==="/"){zt=wr;break}else{zt=ur;continue}case gn:if(vt.scheme=At.scheme,Dt===ae)vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.query=At.query;else if(Dt==="/"||Dt==="\\"&&vt.isSpecial())zt=yn;else if(Dt==="?")vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.query="",zt=Gr;else if(Dt==="#")vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.query=At.query,vt.fragment="",zt=mr;else{vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,vt.path=L(At.path),vt.path.length&&vt.path.length--,zt=ur;continue}break;case yn:if(vt.isSpecial()&&(Dt==="/"||Dt==="\\"))zt=ar;else if(Dt==="/")zt=wr;else{vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,zt=ur;continue}break;case En:if(zt=ar,Dt!=="/"||vn[Le+1]!=="/")continue;Le++;break;case ar:if(Dt!=="/"&&Dt!=="\\"){zt=wr;continue}break;case wr:if(Dt==="@"){Ut&&(de="%40"+de),Ut=!0,fn=D(de);for(var Va=0;Va<fn.length;Va++){var Mi=fn[Va];if(Mi===":"&&!Cn){Cn=!0;continue}var ja=_t(Mi,$t);Cn?vt.password+=ja:vt.username+=ja}de=""}else if(Dt===ae||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()){if(Ut&&de==="")return Bt;Le-=D(de).length+1,de="",zt=Ci}else de+=Dt;break;case Ci:case Ii:if(Gt&&vt.scheme==="file"){zt=Oi;continue}else if(Dt===":"&&!kt){if(de==="")return Ot;if(Gt===Ii)return;if(xr=vt.parseHost(de),xr)return xr;de="",zt=Ri}else if(Dt===ae||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()){if(vt.isSpecial()&&de==="")return Ot;if(Gt&&de===""&&(vt.includesCredentials()||vt.port!==null))return;if(xr=vt.parseHost(de),xr)return xr;if(de="",zt=ca,Gt)return;continue}else Dt==="["?kt=!0:Dt==="]"&&(kt=!1),de+=Dt;break;case Ri:if(ht(se,Dt))de+=Dt;else if(Dt===ae||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()||Gt){if(de!==""){var Yn=at(de,10);if(Yn>65535)return jt;vt.port=vt.isSpecial()&&Yn===Nt[vt.scheme]?null:Yn,de=""}if(Gt)return;zt=ca;continue}else return jt;break;case wi:if(vt.scheme="file",vt.host="",Dt==="/"||Dt==="\\")zt=Ao;else if(At&&At.scheme==="file")switch(Dt){case ae:vt.host=At.host,vt.path=L(At.path),vt.query=At.query;break;case"?":vt.host=At.host,vt.path=L(At.path),vt.query="",zt=Gr;break;case"#":vt.host=At.host,vt.path=L(At.path),vt.query=At.query,vt.fragment="",zt=mr;break;default:vt.host=At.host,He(gt(L(vn,Le),""))||(vt.path=L(At.path),vt.shortenPath()),zt=ur;continue}else{zt=ur;continue}break;case Ao:if(Dt==="/"||Dt==="\\"){zt=Oi;break}At&&At.scheme==="file"&&(vt.host=At.host,!He(gt(L(vn,Le),""))&&Se(At.path[0],!0)&&bt(vt.path,At.path[0])),zt=ur;continue;case Oi:if(Dt===ae||Dt==="/"||Dt==="\\"||Dt==="?"||Dt==="#"){if(!Gt&&Se(de))zt=ur;else if(de===""){if(vt.host="",Gt)return;zt=ca}else{if(xr=vt.parseHost(de),xr)return xr;if(vt.host==="localhost"&&(vt.host=""),Gt)return;de="",zt=ca}continue}else de+=Dt;break;case ca:if(vt.isSpecial()){if(zt=ur,Dt!=="/"&&Dt!=="\\")continue}else if(!Gt&&Dt==="?")vt.query="",zt=Gr;else if(!Gt&&Dt==="#")vt.fragment="",zt=mr;else if(Dt!==ae&&(zt=ur,Dt!=="/"))continue;break;case ur:if(Dt===ae||Dt==="/"||Dt==="\\"&&vt.isSpecial()||!Gt&&(Dt==="?"||Dt==="#")){if(Qt(de)?(vt.shortenPath(),Dt!=="/"&&!(Dt==="\\"&&vt.isSpecial())&&bt(vt.path,"")):Wt(de)?Dt!=="/"&&!(Dt==="\\"&&vt.isSpecial())&&bt(vt.path,""):(vt.scheme==="file"&&!vt.path.length&&Se(de)&&(vt.host!==null&&vt.host!==""&&(vt.host=""),de=ut(de,0)+":"),bt(vt.path,de)),de="",vt.scheme==="file"&&(Dt===ae||Dt==="?"||Dt==="#"))for(;vt.path.length>1&&vt.path[0]==="";)Lt(vt.path);Dt==="?"?(vt.query="",zt=Gr):Dt==="#"&&(vt.fragment="",zt=mr)}else de+=_t(Dt,Mt);break;case Eo:Dt==="?"?(vt.query="",zt=Gr):Dt==="#"?(vt.fragment="",zt=mr):Dt!==ae&&(vt.path[0]+=_t(Dt,Pe));break;case Gr:!Gt&&Dt==="#"?(vt.fragment="",zt=mr):Dt!==ae&&(vt.query+=_t(Dt,vt.isSpecial()?It:ln));break;case mr:Dt!==ae&&(vt.fragment+=_t(Dt,Xt));break}Le++}},parseHost:function(St){var Gt,At,vt;if(ut(St,0)==="["){if(ut(St,St.length-1)!=="]"||(Gt=ee(mt(St,1,-1)),!Gt))return Ot;this.host=Gt}else if(this.isSpecial()){if(St=F(St),ht(ge,St))return Ot;if(rn(St)){if(Gt=Yt(St),Gt===null)return Ot;this.host=Gt}else this.host=St}else{if(ht(Te,St))return Ot;for(Gt="",At=D(St),vt=0;vt<At.length;vt++)Gt+=_t(At[vt],Pe);this.host=Gt}},cannotHaveUsernamePasswordPort:function(){return this.host===null||this.host===""||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return O(Nt,this.scheme)},shortenPath:function(){var St=this.path,Gt=St.length;Gt&&(this.scheme!=="file"||Gt!==1||!Se(St[0],!0))&&St.length--},serialize:function(){var St=this,Gt=St.scheme,At=St.username,vt=St.password,zt=St.host,Le=St.port,de=St.path,Ut=St.query,kt=St.fragment,Cn=Gt+":";return zt!==null?(Cn+="//",St.includesCredentials()&&(Cn+=At+(vt?":"+vt:"")+"@"),Cn+=ce(zt),Le!==null&&(Cn+=":"+Le)):Gt==="file"&&(Cn+="//"),zt===null&&!St.cannotBeABaseURL&&de.length>1&&de[0]===""&&(Cn+="/."),Cn+=St.cannotBeABaseURL?de[0]:de.length?"/"+gt(de,"/"):"",Ut!==null&&(Cn+="?"+Ut),kt!==null&&(Cn+="#"+kt),Cn},setHref:function(St){var Gt=this.parse(St);if(Gt)throw new tt(Gt);this.searchParams.update()},getOrigin:function(){var St=this.scheme,Gt=this.port;if(St==="blob")try{return new ua(this.path[0]).origin}catch(At){return"null"}return St==="file"||!this.isSpecial()?"null":St+"://"+ce(this.host)+(Gt!==null?":"+Gt:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(St){this.parse(k(St)+":",te)},getUsername:function(){return this.username},setUsername:function(St){var Gt=D(k(St));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var At=0;At<Gt.length;At++)this.username+=_t(Gt[At],$t)}},getPassword:function(){return this.password},setPassword:function(St){var Gt=D(k(St));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var At=0;At<Gt.length;At++)this.password+=_t(Gt[At],$t)}},getHost:function(){var St=this.host,Gt=this.port;return St===null?"":Gt===null?ce(St):ce(St)+":"+Gt},setHost:function(St){this.cannotBeABaseURL||this.parse(St,Ci)},getHostname:function(){var St=this.host;return St===null?"":ce(St)},setHostname:function(St){this.cannotBeABaseURL||this.parse(St,Ii)},getPort:function(){var St=this.port;return St===null?"":k(St)},setPort:function(St){this.cannotHaveUsernamePasswordPort()||(St=k(St),St===""?this.port=null:this.parse(St,Ri))},getPathname:function(){var St=this.path;return this.cannotBeABaseURL?St[0]:St.length?"/"+gt(St,"/"):""},setPathname:function(St){this.cannotBeABaseURL||(this.path=[],this.parse(St,ca))},getSearch:function(){var St=this.query;return St?"?"+St:""},setSearch:function(St){St=k(St),St===""?this.query=null:(ut(St,0)==="?"&&(St=mt(St,1)),this.query="",this.parse(St,Gr)),this.searchParams.update()},getSearchParams:function(){return this.searchParams.facade},getHash:function(){var St=this.fragment;return St?"#"+St:""},setHash:function(St){if(St=k(St),St===""){this.fragment=null;return}ut(St,0)==="#"&&(St=mt(St,1)),this.fragment="",this.parse(St,mr)},update:function(){this.query=this.searchParams.serialize()||null}};var ua=function(Gt){var At=R(this,Fn),vt=U(arguments.length,1)>1?arguments[1]:void 0,zt=H(At,new Pi(Gt,!1,vt));v||(At.href=zt.serialize(),At.origin=zt.getOrigin(),At.protocol=zt.getProtocol(),At.username=zt.getUsername(),At.password=zt.getPassword(),At.host=zt.getHost(),At.hostname=zt.getHostname(),At.port=zt.getPort(),At.pathname=zt.getPathname(),At.search=zt.getSearch(),At.searchParams=zt.getSearchParams(),At.hash=zt.getHash())},Fn=ua.prototype,Hn=function(St,Gt){return{get:function(){return Y(this)[St]()},set:Gt&&function(At){return Y(this)[Gt](At)},configurable:!0,enumerable:!0}};if(v&&(I(Fn,"href",Hn("serialize","setHref")),I(Fn,"origin",Hn("getOrigin")),I(Fn,"protocol",Hn("getProtocol","setProtocol")),I(Fn,"username",Hn("getUsername","setUsername")),I(Fn,"password",Hn("getPassword","setPassword")),I(Fn,"host",Hn("getHost","setHost")),I(Fn,"hostname",Hn("getHostname","setHostname")),I(Fn,"port",Hn("getPort","setPort")),I(Fn,"pathname",Hn("getPathname","setPathname")),I(Fn,"search",Hn("getSearch","setSearch")),I(Fn,"searchParams",Hn("getSearchParams")),I(Fn,"hash",Hn("getHash","setHash"))),A(Fn,"toJSON",function(){return Y(this).serialize()},{enumerable:!0}),A(Fn,"toString",function(){return Y(this).serialize()},{enumerable:!0}),K){var Co=K.createObjectURL,Io=K.revokeObjectURL;Co&&A(ua,"createObjectURL",y(Co,K)),Io&&A(ua,"revokeObjectURL",y(Io,K))}W(ua,"URL"),g({global:!0,constructor:!0,forced:!p,sham:!v},{URL:ua})}),(function(T,P,a){var g=a(7),v=a(33),p=a(6),x=a(36),y=v("iterator");T.exports=!g(function(){var b=new URL("b?a=1&b=2&c=3","https://a"),A=b.searchParams,I=new URLSearchParams("a=1&a=2&b=3"),R="";return b.pathname="c%20d",A.forEach(function(O,M){A.delete("b"),R+=M+O}),I.delete("a",2),I.delete("b",void 0),x&&(!b.toJSON||!I.has("a",1)||I.has("a",2)||!I.has("a",void 0)||I.has("b"))||!A.size&&(x||!p)||!A.sort||b.href!=="https://a/c%20d?a=1&c=3"||A.get("c")!=="3"||String(new URLSearchParams("?a=1"))!=="a=1"||!A[y]||new URL("https://a@b").username!=="a"||new URLSearchParams(new URLSearchParams("a=b")).get("a")!=="b"||new URL("https://\u0442\u0435\u0441\u0442").host!=="xn--e1aybc"||new URL("https://a#\u0431").hash!=="#%D0%B1"||R!=="a1c3"||new URL("https://x",void 0).host!=="x"})}),(function(T,P,a){var g=a(14),v=2147483647,p=36,x=1,y=26,b=38,A=700,I=72,R=128,O="-",M=/[^\0-\u007E]/,D=/[.\u3002\uFF0E\uFF61]/g,L="Overflow: input needs wider integers to process",B=p-x,F=RangeError,k=g(D.exec),W=Math.floor,U=String.fromCharCode,X=g("".charCodeAt),j=g([].join),H=g([].push),Y=g("".replace),Z=g("".split),_=g("".toLowerCase),K=function(it){for(var ot=[],ut=0,ht=it.length;ut<ht;){var gt=X(it,ut++);if(gt>=55296&><=56319&&ut<ht){var yt=X(it,ut++);(yt&64512)===56320?H(ot,((gt&1023)<<10)+(yt&1023)+65536):(H(ot,gt),ut--)}else H(ot,gt)}return ot},tt=function(it){return it+22+75*(it<26)},nt=function(it,ot,ut){var ht=0;for(it=ut?W(it/A):it>>1,it+=W(it/ot);it>B*y>>1;)it=W(it/B),ht+=p;return W(ht+(B+1)*it/(it+b))},at=function(it){var ot=[];it=K(it);var ut=it.length,ht=R,gt=0,yt=I,Et,bt;for(Et=0;Et<it.length;Et++)bt=it[Et],bt<128&&H(ot,U(bt));var Ft=ot.length,Lt=Ft;for(Ft&&H(ot,O);Lt<ut;){var Pt=v;for(Et=0;Et<it.length;Et++)bt=it[Et],bt>=ht&&bt<Pt&&(Pt=bt);var mt=Lt+1;if(Pt-ht>W((v-gt)/mt))throw new F(L);for(gt+=(Pt-ht)*mt,ht=Pt,Et=0;Et<it.length;Et++){if(bt=it[Et],bt<ht&&++gt>v)throw new F(L);if(bt===ht){for(var xt=gt,wt=p;;){var Bt=wt<=yt?x:wt>=yt+y?y:wt-yt;if(xt<Bt)break;var Jt=xt-Bt,Ot=p-Bt;H(ot,U(tt(Bt+Jt%Ot))),xt=W(Jt/Ot),wt+=p}H(ot,U(tt(xt))),yt=nt(gt,mt,Lt===Ft),gt=0,Lt++}}gt++,ht++}return j(ot,"")};T.exports=function(it){var ot=[],ut=Z(Y(_(it),D,"."),"."),ht,gt;for(ht=0;ht<ut.length;ht++)gt=ut[ht],H(ot,k(M,gt)?"xn--"+at(gt):gt);return j(ot,".")}}),(function(T,P,a){a(175),a(479);var g=a(3),v=a(4),p=a(386),x=a(23),y=a(8),b=a(14),A=a(6),I=a(617),R=a(47),O=a(77),M=a(214),D=a(82),L=a(177),B=a(51),F=a(215),k=a(21),W=a(38),U=a(84),X=a(69),j=a(46),H=a(20),Y=a(68),Z=a(71),_=a(11),K=a(139),tt=a(140),nt=a(179),at=a(383),it=a(33),ot=a(195),ut=it("iterator"),ht="URLSearchParams",gt=ht+"Iterator",yt=B.set,Et=B.getterFor(ht),bt=B.getterFor(gt),Ft=p("fetch"),Lt=p("Request"),Pt=p("Headers"),mt=Lt&&Lt.prototype,xt=Pt&&Pt.prototype,wt=v.TypeError,Bt=v.encodeURIComponent,Jt=String.fromCharCode,Ot=x("String","fromCodePoint"),jt=parseInt,ie=b("".charAt),me=b([].join),se=b([].push),he=b("".replace),Oe=b([].shift),Me=b([].splice),Re=b("".split),ge=b("".slice),Te=b(/./.exec),Ve=/\+/g,Ht="\uFFFD",ne=/^[0-9a-f]+$/i,ae=function(Wt,Qt){var te=ge(Wt,Qt,Qt+2);return Te(ne,te)?jt(te,16):NaN},rn=function(Wt){for(var Qt=0,te=128;te>0&&(Wt&te)!==0;te>>=1)Qt++;return Qt},Yt=function(Wt){var Qt=null,te=Wt.length;switch(te){case 1:Qt=Wt[0];break;case 2:Qt=(Wt[0]&31)<<6|Wt[1]&63;break;case 3:Qt=(Wt[0]&15)<<12|(Wt[1]&63)<<6|Wt[2]&63;break;case 4:Qt=(Wt[0]&7)<<18|(Wt[1]&63)<<12|(Wt[2]&63)<<6|Wt[3]&63;break}return Qt===null||Qt>1114111||Qt>=55296&&Qt<=57343||Qt<(te>3?65536:te>2?2048:te>1?128:0)?null:Qt},ee=function(Wt){Wt=he(Wt,Ve," ");for(var Qt=Wt.length,te="",oe=0;oe<Qt;){var we=ie(Wt,oe);if(we==="%"){if(ie(Wt,oe+1)==="%"||oe+3>Qt){te+="%",oe++;continue}var ze=ae(Wt,oe+1);if(ze!==ze){te+=we,oe++;continue}oe+=2;var un=rn(ze);if(un===0)we=Jt(ze);else{if(un===1||un>4){te+=Ht,oe++;continue}for(var gn=[ze],yn=1;yn<un&&(oe++,!(oe+3>Qt||ie(Wt,oe)!=="%"));){var En=ae(Wt,oe+1);if(En!==En||En>191||En<128||yn===1&&(ze===224&&En<160||ze===237&&En>159||ze===240&&En<144||ze===244&&En>143))break;se(gn,En),oe+=2,yn++}if(gn.length!==un){te+=Ht;continue}var ar=Yt(gn);if(ar===null){for(var wr=0;wr<un;wr++)te+=Ht;oe++;continue}else we=Ot(ar)}}te+=we,oe++}return te},pe=/[!'()~]|%20/g,ce={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},Pe=function(Wt){return ce[Wt]},ln=function(Wt){return he(Bt(Wt),pe,Pe)},It=L(function(Qt,te){yt(this,{type:gt,target:Et(Qt).entries,index:0,kind:te})},ht,function(){var Qt=bt(this),te=Qt.target,oe=Qt.index++;if(!te||oe>=te.length)return Qt.target=null,nt(void 0,!0);var we=te[oe];switch(Qt.kind){case"keys":return nt(we.key,!1);case"values":return nt(we.value,!1)}return nt([we.key,we.value],!1)},!0),Xt=function(Wt){this.entries=[],this.url=null,Wt!==void 0&&(H(Wt)?this.parseObject(Wt):this.parseQuery(typeof Wt=="string"?ie(Wt,0)==="?"?ge(Wt,1):Wt:Y(Wt)))};Xt.prototype={type:ht,bindURL:function(Wt){this.url=Wt,this.update()},parseObject:function(Wt){var Qt=this.entries,te=tt(Wt),oe,we,ze,un,gn,yn,En;if(te)for(oe=K(Wt,te),we=oe.next;!(ze=y(we,oe)).done;){if(un=K(j(ze.value)),gn=un.next,(yn=y(gn,un)).done||(En=y(gn,un)).done||!y(gn,un).done)throw new wt("Expected sequence with length 2");se(Qt,{key:Y(yn.value),value:Y(En.value)})}else for(var ar in Wt)W(Wt,ar)&&se(Qt,{key:ar,value:Y(Wt[ar])})},parseQuery:function(Wt){if(Wt)for(var Qt=this.entries,te=Re(Wt,"&"),oe=0,we,ze;oe<te.length;)we=te[oe++],we.length&&(ze=Re(we,"="),se(Qt,{key:ee(Oe(ze)),value:ee(me(ze,"="))}))},serialize:function(){for(var Wt=this.entries,Qt=[],te=0,oe;te<Wt.length;)oe=Wt[te++],se(Qt,ln(oe.key)+"="+ln(oe.value));return me(Qt,"&")},update:function(){this.entries.length=0,this.parseQuery(this.url.query)},updateURL:function(){this.url&&this.url.update()}};var Mt=function(){F(this,$t);var Qt=arguments.length>0?arguments[0]:void 0,te=yt(this,new Xt(Qt));A||(this.size=te.entries.length)},$t=Mt.prototype;if(M($t,{append:function(Qt,te){var oe=Et(this);at(arguments.length,2),se(oe.entries,{key:Y(Qt),value:Y(te)}),A||this.size++,oe.updateURL()},delete:function(Wt){for(var Qt=Et(this),te=at(arguments.length,1),oe=Qt.entries,we=Y(Wt),ze=te<2?void 0:arguments[1],un=ze===void 0?ze:Y(ze),gn=0;gn<oe.length;){var yn=oe[gn];yn.key===we&&(un===void 0||yn.value===un)?Me(oe,gn,1):gn++}A||(this.size=oe.length),Qt.updateURL()},get:function(Qt){var te=Et(this).entries;at(arguments.length,1);for(var oe=Y(Qt),we=0;we<te.length;we++)if(te[we].key===oe)return te[we].value;return null},getAll:function(Qt){var te=Et(this).entries;at(arguments.length,1);for(var oe=Y(Qt),we=[],ze=0;ze<te.length;ze++)te[ze].key===oe&&se(we,te[ze].value);return we},has:function(Qt){for(var te=Et(this).entries,oe=at(arguments.length,1),we=Y(Qt),ze=oe<2?void 0:arguments[1],un=ze===void 0?ze:Y(ze),gn=0;gn<te.length;){var yn=te[gn++];if(yn.key===we&&(un===void 0||yn.value===un))return!0}return!1},set:function(Qt,te){var oe=Et(this);at(arguments.length,2);for(var we=oe.entries,ze=!1,un=Y(Qt),gn=Y(te),yn=0,En;yn<we.length;yn++)En=we[yn],En.key===un&&(ze?Me(we,yn--,1):(ze=!0,En.value=gn));ze||se(we,{key:un,value:gn}),A||(this.size=we.length),oe.updateURL()},sort:function(){var Qt=Et(this);ot(Qt.entries,function(te,oe){return te.key>oe.key?1:-1}),Qt.updateURL()},forEach:function(Qt){for(var te=Et(this).entries,oe=U(Qt,arguments.length>1?arguments[1]:void 0),we=0,ze;we<te.length;)ze=te[we++],oe(ze.value,ze.key,this)},keys:function(){return new It(this,"keys")},values:function(){return new It(this,"values")},entries:function(){return new It(this,"entries")}},{enumerable:!0}),R($t,ut,$t.entries,{name:"entries"}),R($t,"toString",function(){return Et(this).serialize()},{enumerable:!0}),A&&O($t,"size",{get:function(){return Et(this).entries.length},configurable:!0,enumerable:!0}),D(Mt,ht),g({global:!0,constructor:!0,forced:!I},{URLSearchParams:Mt}),!I&&k(Pt)){var _t=b(xt.has),Nt=b(xt.set),Se=function(Wt){if(H(Wt)){var Qt=Wt.body,te;if(X(Qt)===ht)return te=Wt.headers?new Pt(Wt.headers):new Pt,_t(te,"content-type")||Nt(te,"content-type","application/x-www-form-urlencoded;charset=UTF-8"),Z(Wt,{body:_(0,Y(Qt)),headers:_(0,te)})}return Wt};if(k(Ft)&&g({global:!0,enumerable:!0,dontCallGetSet:!0,forced:!0},{fetch:function(Qt){return Ft(Qt,arguments.length>1?Se(arguments[1]):{})}}),k(Lt)){var He=function(Qt){return F(this,mt),new Lt(Qt,arguments.length>1?Se(arguments[1]):{})};mt.constructor=He,He.prototype=mt,g({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:He})}}T.exports={URLSearchParams:Mt,getState:Et}}),(function(T,P,a){var g=a(3),v=a(23),p=a(7),x=a(383),y=a(68),b=a(617),A=v("URL"),I=b&&p(function(){A.canParse()}),R=p(function(){return A.canParse.length!==1});g({target:"URL",stat:!0,forced:!I||R},{canParse:function(M){var D=x(arguments.length,1),L=y(M),B=D<2||arguments[1]===void 0?void 0:y(arguments[1]);try{return!!new A(L,B)}catch(F){return!1}}})}),(function(T,P,a){var g=a(3),v=a(23),p=a(383),x=a(68),y=a(617),b=v("URL");g({target:"URL",stat:!0,forced:!y},{parse:function(I){var R=p(arguments.length,1),O=x(I),M=R<2||arguments[1]===void 0?void 0:x(arguments[1]);try{return new b(O,M)}catch(D){return null}}})}),(function(T,P,a){var g=a(3),v=a(8);g({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return v(URL.prototype.toString,this)}})}),(function(T,P,a){a(619)}),(function(T,P,a){var g=a(47),v=a(14),p=a(68),x=a(383),y=URLSearchParams,b=y.prototype,A=v(b.append),I=v(b.delete),R=v(b.forEach),O=v([].push),M=new y("a=1&a=2&b=3");M.delete("a",1),M.delete("b",void 0),M+""!="a=2"&&g(b,"delete",function(D){var L=arguments.length,B=L<2?void 0:arguments[1];if(L&&B===void 0)return I(this,D);var F=[];R(this,function(H,Y){O(F,{key:Y,value:H})}),x(L,1);for(var k=p(D),W=p(B),U=0,X=F.length,j;U<X;)j=F[U],I(this,j.key),U++;for(U=0;U<X;)j=F[U++],j.key===k&&j.value===W||A(this,j.key,j.value)},{enumerable:!0,unsafe:!0})}),(function(T,P,a){var g=a(47),v=a(14),p=a(68),x=a(383),y=URLSearchParams,b=y.prototype,A=v(b.getAll),I=v(b.has),R=new y("a=1");(R.has("a",2)||!R.has("a",void 0))&&g(b,"has",function(M){var D=arguments.length,L=D<2?void 0:arguments[1];if(D&&L===void 0)return I(this,M);var B=A(this,M);x(D,1);for(var F=p(L),k=0;k<B.length;)if(B[k++]===F)return!0;return!1},{enumerable:!0,unsafe:!0})}),(function(T,P,a){var g=a(6),v=a(14),p=a(77),x=URLSearchParams.prototype,y=v(x.forEach);g&&!("size"in x)&&p(x,"size",{get:function(){var A=0;return y(this,function(){A++}),A},configurable:!0,enumerable:!0})}),(function(T,P,a){a.r(P),a.d(P,{bb:function(){return Zp},default:function(){return Zp}});var g={};a.r(g),a.d(g,{selection:function(){return Rv},subchart:function(){return Mv},zoom:function(){return zv}});var v={};a.r(v),a.d(v,{area:function(){return ap},areaLineRange:function(){return ip},areaSpline:function(){return sp},areaSplineRange:function(){return lp},areaStep:function(){return cp},areaStepRange:function(){return op},bar:function(){return up},bubble:function(){return fp},candlestick:function(){return pp},donut:function(){return Cp},funnel:function(){return Pp},gauge:function(){return Mp},line:function(){return Lp},pie:function(){return Np},polar:function(){return Bp},radar:function(){return Up},scatter:function(){return kp},spline:function(){return Dp},step:function(){return Fp},treemap:function(){return Kp}});function p(){}function x(t){return t==null?p:function(){return this.querySelector(t)}}function y(t){typeof t!="function"&&(t=x(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,l=r[i]=new Array(s),c,u,f=0;f<s;++f)(c=o[f])&&(u=t.call(c,c.__data__,f,o))&&("__data__"in c&&(u.__data__=c.__data__),l[f]=u);return new vt(r,this._parents)}function b(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function A(){return[]}function I(t){return t==null?A:function(){return this.querySelectorAll(t)}}function R(t){return function(){return b(t.apply(this,arguments))}}function O(t){typeof t=="function"?t=R(t):t=I(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var s=e[o],l=s.length,c,u=0;u<l;++u)(c=s[u])&&(r.push(t.call(c,c.__data__,u,s)),i.push(c));return new vt(r,i)}function M(t){return function(){return this.matches(t)}}function D(t){return function(e){return e.matches(t)}}var L=Array.prototype.find;function B(t){return function(){return L.call(this.children,t)}}function F(){return this.firstElementChild}function k(t){return this.select(t==null?F:B(typeof t=="function"?t:D(t)))}var W=Array.prototype.filter;function U(){return Array.from(this.children)}function X(t){return function(){return W.call(this.children,t)}}function j(t){return this.selectAll(t==null?U:X(typeof t=="function"?t:D(t)))}function H(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,l=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&l.push(c);return new vt(r,this._parents)}function Y(t){return new Array(t.length)}function Z(){return new vt(this._enter||this._groups.map(Y),this._parents)}function _(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}_.prototype={constructor:_,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function K(t){return function(){return t}}function tt(t,e,n,r,i,o){for(var s=0,l,c=e.length,u=o.length;s<u;++s)(l=e[s])?(l.__data__=o[s],r[s]=l):n[s]=new _(t,o[s]);for(;s<c;++s)(l=e[s])&&(i[s]=l)}function nt(t,e,n,r,i,o,s){var l,c,u=new Map,f=e.length,d=o.length,h=new Array(f),m;for(l=0;l<f;++l)(c=e[l])&&(h[l]=m=s.call(c,c.__data__,l,e)+"",u.has(m)?i[l]=c:u.set(m,c));for(l=0;l<d;++l)m=s.call(t,o[l],l,o)+"",(c=u.get(m))?(r[l]=c,c.__data__=o[l],u.delete(m)):n[l]=new _(t,o[l]);for(l=0;l<f;++l)(c=e[l])&&u.get(h[l])===c&&(i[l]=c)}function at(t){return t.__data__}function it(t,e){if(!arguments.length)return Array.from(this,at);var n=e?nt:tt,r=this._parents,i=this._groups;typeof t!="function"&&(t=K(t));for(var o=i.length,s=new Array(o),l=new Array(o),c=new Array(o),u=0;u<o;++u){var f=r[u],d=i[u],h=d.length,m=ot(t.call(f,f&&f.__data__,u,r)),S=m.length,E=l[u]=new Array(S),C=s[u]=new Array(S),w=c[u]=new Array(h);n(f,d,E,C,w,m,e);for(var N=0,z=0,$,G;N<S;++N)if($=E[N]){for(N>=z&&(z=N+1);!(G=C[z])&&++z<S;);$._next=G||null}}return s=new vt(s,r),s._enter=l,s._exit=c,s}function ot(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ut(){return new vt(this._exit||this._groups.map(Y),this._parents)}function ht(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function gt(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,s=Math.min(i,o),l=new Array(i),c=0;c<s;++c)for(var u=n[c],f=r[c],d=u.length,h=l[c]=new Array(d),m,S=0;S<d;++S)(m=u[S]||f[S])&&(h[S]=m);for(;c<i;++c)l[c]=n[c];return new vt(l,this._parents)}function yt(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],s;--i>=0;)(s=r[i])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function Et(t){t||(t=bt);function e(d,h){return d&&h?t(d.__data__,h.__data__):!d-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var s=n[o],l=s.length,c=i[o]=new Array(l),u,f=0;f<l;++f)(u=s[f])&&(c[f]=u);c.sort(e)}return new vt(i,this._parents).order()}function bt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Ft(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Lt(){return Array.from(this)}function Pt(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var s=r[i];if(s)return s}return null}function mt(){let t=0;for(const e of this)++t;return t}function xt(){return!this.node()}function wt(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,s=i.length,l;o<s;++o)(l=i[o])&&t.call(l,l.__data__,o,i);return this}var Bt="http://www.w3.org/1999/xhtml",Jt={svg:"http://www.w3.org/2000/svg",xhtml:Bt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ot(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),Jt.hasOwnProperty(e)?{space:Jt[e],local:t}:t}function jt(t){return function(){this.removeAttribute(t)}}function ie(t){return function(){this.removeAttributeNS(t.space,t.local)}}function me(t,e){return function(){this.setAttribute(t,e)}}function se(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function he(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Oe(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function Me(t,e){var n=Ot(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?ie:jt:typeof e=="function"?n.local?Oe:he:n.local?se:me)(n,e))}function Re(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ge(t){return function(){this.style.removeProperty(t)}}function Te(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ve(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ht(t,e,n){return arguments.length>1?this.each((e==null?ge:typeof e=="function"?Ve:Te)(t,e,n==null?"":n)):ne(this.node(),t)}function ne(t,e){return t.style.getPropertyValue(e)||Re(t).getComputedStyle(t,null).getPropertyValue(e)}function ae(t){return function(){delete this[t]}}function rn(t,e){return function(){this[t]=e}}function Yt(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function ee(t,e){return arguments.length>1?this.each((e==null?ae:typeof e=="function"?Yt:rn)(t,e)):this.node()[t]}function pe(t){return t.trim().split(/^|\s+/)}function ce(t){return t.classList||new Pe(t)}function Pe(t){this._node=t,this._names=pe(t.getAttribute("class")||"")}Pe.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function ln(t,e){for(var n=ce(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function It(t,e){for(var n=ce(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Xt(t){return function(){ln(this,t)}}function Mt(t){return function(){It(this,t)}}function $t(t,e){return function(){(e.apply(this,arguments)?ln:It)(this,t)}}function _t(t,e){var n=pe(t+"");if(arguments.length<2){for(var r=ce(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?$t:e?Xt:Mt)(n,e))}function Nt(){this.textContent=""}function Se(t){return function(){this.textContent=t}}function He(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function Wt(t){return arguments.length?this.each(t==null?Nt:(typeof t=="function"?He:Se)(t)):this.node().textContent}function Qt(){this.innerHTML=""}function te(t){return function(){this.innerHTML=t}}function oe(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function we(t){return arguments.length?this.each(t==null?Qt:(typeof t=="function"?oe:te)(t)):this.node().innerHTML}function ze(){this.nextSibling&&this.parentNode.appendChild(this)}function un(){return this.each(ze)}function gn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yn(){return this.each(gn)}function En(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Bt&&e.documentElement.namespaceURI===Bt?e.createElement(t):e.createElementNS(n,t)}}function ar(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function wr(t){var e=Ot(t);return(e.local?ar:En)(e)}function Ci(t){var e=typeof t=="function"?t:wr(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function Ii(){return null}function Ri(t,e){var n=typeof t=="function"?t:wr(t),r=e==null?Ii:typeof e=="function"?e:x(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function wi(){var t=this.parentNode;t&&t.removeChild(this)}function Ao(){return this.each(wi)}function Oi(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ca(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ur(t){return this.select(t?ca:Oi)}function Eo(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Gr(t){return function(e){t.call(this,e,this.__data__)}}function mr(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function Pi(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function ua(t,e,n){return function(){var r=this.__on,i,o=Gr(e);if(r){for(var s=0,l=r.length;s<l;++s)if((i=r[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function Fn(t,e,n){var r=mr(t+""),i,o=r.length,s;if(arguments.length<2){var l=this.node().__on;if(l){for(var c=0,u=l.length,f;c<u;++c)for(i=0,f=l[c];i<o;++i)if((s=r[i]).type===f.type&&s.name===f.name)return f.value}return}for(l=e?ua:Pi,i=0;i<o;++i)this.each(l(r[i],e,n));return this}function Hn(t,e,n){var r=Re(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Co(t,e){return function(){return Hn(this,t,e)}}function Io(t,e){return function(){return Hn(this,t,e.apply(this,arguments))}}function St(t,e){return this.each((typeof e=="function"?Io:Co)(t,e))}function*Gt(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,s;i<o;++i)(s=r[i])&&(yield s)}var At=[null];function vt(t,e){this._groups=t,this._parents=e}function zt(){return new vt([[document.documentElement]],At)}function Le(){return this}vt.prototype=zt.prototype={constructor:vt,select:y,selectAll:O,selectChild:k,selectChildren:j,filter:H,data:it,enter:Z,exit:ut,join:ht,merge:gt,selection:Le,order:yt,sort:Et,call:Ft,nodes:Lt,node:Pt,size:mt,empty:xt,each:wt,attr:Me,style:Ht,property:ee,classed:_t,text:Wt,html:we,raise:un,lower:yn,append:Ci,insert:Ri,remove:Ao,clone:ur,datum:Eo,on:Fn,dispatch:St,[Symbol.iterator]:Gt};var de=zt;function Ut(t){return typeof t=="string"?new vt([[document.querySelector(t)]],[document.documentElement]):new vt([[t]],At)}const kt={AREA:"area",AREA_LINE_RANGE:"area-line-range",AREA_SPLINE:"area-spline",AREA_SPLINE_RANGE:"area-spline-range",AREA_STEP:"area-step",AREA_STEP_RANGE:"area-step-range",BAR:"bar",BUBBLE:"bubble",CANDLESTICK:"candlestick",DONUT:"donut",FUNNEL:"funnel",GAUGE:"gauge",LINE:"line",PIE:"pie",POLAR:"polar",RADAR:"radar",SCATTER:"scatter",SPLINE:"spline",STEP:"step",TREEMAP:"treemap"},Cn={export:"exportApi",flow:"flow",xgrids:"grid",ygrids:"grid",regions:"regions",category:"category",categories:"category"},vn=10,Dt=6,fn=3,xr=Dt+fn,Va=1,Mi={x:{start:"M0 -8.5 A6 6 0 0 0 -6.5 -3.5 V2.5 A6 6 0 0 0 0 8.5 Z M-2 -3.5 V3.5 M-4 -3.5 V3.5z",end:"M0 -8.5 A6 6 0 0 1 6.5 -3.5 V2.5 A6 6 0 0 1 0 8.5 Z M2 -3.5 V3.5 M4 -3.5 V3.5z"},y:{start:"M8.5 0 a6 6 0 0 0 -6 -6.5 H-2.5 a 6 6 0 0 0 -6 6.5 z m-5 -2 H-3.5 m7 -2 H-3.5z",end:"M8.5 0 a6 -6 0 0 1 -6 6.5 H-2.5 a 6 -6 0 0 1 -6 -6.5z m-5 2 H-3.5 m7 2 H-3.5z"}},ja={AREA:"initArea",AREA_LINE_RANGE:"initArea",AREA_SPLINE:"initArea",AREA_SPLINE_RANGE:"initArea",AREA_STEP:"initArea",AREA_STEP_RANGE:"initArea",BAR:"initBar",BUBBLE:"initCircle",CANDLESTICK:"initCandlestick",DONUT:"initArc",FUNNEL:"initFunnel",GAUGE:"initArc",LINE:"initLine",PIE:"initArc",POLAR:"initPolar",RADAR:"initCircle",SCATTER:"initCircle",SPLINE:"initLine",STEP:"initLine",TREEMAP:"initTreemap"},Yn={Area:[kt.AREA,kt.AREA_SPLINE,kt.AREA_SPLINE_RANGE,kt.AREA_LINE_RANGE,kt.AREA_STEP,kt.AREA_STEP_RANGE],AreaRange:[kt.AREA_SPLINE_RANGE,kt.AREA_LINE_RANGE,kt.AREA_STEP_RANGE],Arc:[kt.PIE,kt.DONUT,kt.GAUGE,kt.POLAR,kt.RADAR],Line:[kt.LINE,kt.SPLINE,kt.AREA,kt.AREA_SPLINE,kt.AREA_SPLINE_RANGE,kt.AREA_LINE_RANGE,kt.STEP,kt.AREA_STEP,kt.AREA_STEP_RANGE],Step:[kt.STEP,kt.AREA_STEP,kt.AREA_STEP_RANGE],Spline:[kt.SPLINE,kt.AREA_SPLINE,kt.AREA_SPLINE_RANGE]},Qp=Math.sqrt(50),_p=Math.sqrt(10),qp=Math.sqrt(2);function Ro(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),s=o>=Qp?10:o>=_p?5:o>=qp?2:1;let l,c,u;return i<0?(u=Math.pow(10,-i)/s,l=Math.round(t*u),c=Math.round(e*u),l/u<t&&++l,c/u>e&&--c,u=-u):(u=Math.pow(10,i)*s,l=Math.round(t/u),c=Math.round(e/u),l*u<t&&++l,c*u>e&&--c),c<l&&.5<=n&&n<2?Ro(t,e,n*2):[l,c,u]}function al(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,s]=r?Ro(e,t,n):Ro(t,e,n);if(!(o>=i))return[];const l=o-i+1,c=new Array(l);if(r)if(s<0)for(let u=0;u<l;++u)c[u]=(o-u)/-s;else for(let u=0;u<l;++u)c[u]=(o-u)*s;else if(s<0)for(let u=0;u<l;++u)c[u]=(i+u)/-s;else for(let u=0;u<l;++u)c[u]=(i+u)*s;return c}function il(t,e,n){return e=+e,t=+t,n=+n,Ro(t,e,n)[2]}function ol(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?il(e,t,n):il(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function wo(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function tm(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sl(t){let e,n,r;t.length!==2?(e=wo,n=(l,c)=>wo(t(l),c),r=(l,c)=>t(l)-c):(e=t===wo||t===tm?t:em,n=t,r=t);function i(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<0?u=d+1:f=d}while(u<f)}return u}function o(l,c,u=0,f=l.length){if(u<f){if(e(c,c)!==0)return f;do{const d=u+f>>>1;n(l[d],c)<=0?u=d+1:f=d}while(u<f)}return u}function s(l,c,u=0,f=l.length){const d=i(l,c,u,f-1);return d>u&&r(l[d-1],c)>-r(l[d],c)?d-1:d}return{left:i,center:s,right:o}}function em(){return 0}function nm(t){return t===null?NaN:+t}function*zR(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const Ou=sl(wo),rm=Ou.right,UR=Ou.left,kR=sl(nm).center;var am=rm;function ll(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Pu(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Li(){}var Di=.7,Oo=1/Di,Ha="\\s*([+-]?\\d+)\\s*",Fi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Or="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",im=/^#([0-9a-f]{3,8})$/,om=new RegExp(`^rgb\\(${Ha},${Ha},${Ha}\\)$`),sm=new RegExp(`^rgb\\(${Or},${Or},${Or}\\)$`),lm=new RegExp(`^rgba\\(${Ha},${Ha},${Ha},${Fi}\\)$`),cm=new RegExp(`^rgba\\(${Or},${Or},${Or},${Fi}\\)$`),um=new RegExp(`^hsl\\(${Fi},${Or},${Or}\\)$`),fm=new RegExp(`^hsla\\(${Fi},${Or},${Or},${Fi}\\)$`),Mu={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};ll(Li,Ea,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Lu,formatHex:Lu,formatHex8:dm,formatHsl:hm,formatRgb:Du,toString:Du});function Lu(){return this.rgb().formatHex()}function dm(){return this.rgb().formatHex8()}function hm(){return zu(this).formatHsl()}function Du(){return this.rgb().formatRgb()}function Ea(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=im.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Fu(e):n===3?new _n(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Po(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Po(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=om.exec(t))?new _n(e[1],e[2],e[3],1):(e=sm.exec(t))?new _n(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=lm.exec(t))?Po(e[1],e[2],e[3],e[4]):(e=cm.exec(t))?Po(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=um.exec(t))?Bu(e[1],e[2]/100,e[3]/100,1):(e=fm.exec(t))?Bu(e[1],e[2]/100,e[3]/100,e[4]):Mu.hasOwnProperty(t)?Fu(Mu[t]):t==="transparent"?new _n(NaN,NaN,NaN,0):null}function Fu(t){return new _n(t>>16&255,t>>8&255,t&255,1)}function Po(t,e,n,r){return r<=0&&(t=e=n=NaN),new _n(t,e,n,r)}function gm(t){return t instanceof Li||(t=Ea(t)),t?(t=t.rgb(),new _n(t.r,t.g,t.b,t.opacity)):new _n}function Mo(t,e,n,r){return arguments.length===1?gm(t):new _n(t,e,n,r==null?1:r)}function _n(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}ll(_n,Mo,Pu(Li,{brighter(t){return t=t==null?Oo:Math.pow(Oo,t),new _n(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Di:Math.pow(Di,t),new _n(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new _n(Ca(this.r),Ca(this.g),Ca(this.b),Lo(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:Nu,formatHex:Nu,formatHex8:vm,formatRgb:$u,toString:$u}));function Nu(){return`#${Ia(this.r)}${Ia(this.g)}${Ia(this.b)}`}function vm(){return`#${Ia(this.r)}${Ia(this.g)}${Ia(this.b)}${Ia((isNaN(this.opacity)?1:this.opacity)*255)}`}function $u(){const t=Lo(this.opacity);return`${t===1?"rgb(":"rgba("}${Ca(this.r)}, ${Ca(this.g)}, ${Ca(this.b)}${t===1?")":`, ${t})`}`}function Lo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ca(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ia(t){return t=Ca(t),(t<16?"0":"")+t.toString(16)}function Bu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new yr(t,e,n,r)}function zu(t){if(t instanceof yr)return new yr(t.h,t.s,t.l,t.opacity);if(t instanceof Li||(t=Ea(t)),!t)return new yr;if(t instanceof yr)return t;t=t.rgb();var e=t.r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),s=NaN,l=o-i,c=(o+i)/2;return l?(e===o?s=(n-r)/l+(n<r)*6:n===o?s=(r-e)/l+2:s=(e-n)/l+4,l/=c<.5?o+i:2-o-i,s*=60):l=c>0&&c<1?0:s,new yr(s,l,c,t.opacity)}function pm(t,e,n,r){return arguments.length===1?zu(t):new yr(t,e,n,r==null?1:r)}function yr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}ll(yr,pm,Pu(Li,{brighter(t){return t=t==null?Oo:Math.pow(Oo,t),new yr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Di:Math.pow(Di,t),new yr(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new _n(cl(t>=240?t-240:t+120,i,r),cl(t,i,r),cl(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new yr(Uu(this.h),Do(this.s),Do(this.l),Lo(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Lo(this.opacity);return`${t===1?"hsl(":"hsla("}${Uu(this.h)}, ${Do(this.s)*100}%, ${Do(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Uu(t){return t=(t||0)%360,t<0?t+360:t}function Do(t){return Math.max(0,Math.min(1,t||0))}function cl(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function ku(t,e,n,r,i){var o=t*t,s=o*t;return((1-3*t+3*o-s)*e+(4-6*o+3*s)*n+(1+3*t+3*o-3*s)*r+s*i)/6}function mm(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],s=r>0?t[r-1]:2*i-o,l=r<e-1?t[r+2]:2*o-i;return ku((n-r/e)*e,s,i,o,l)}}function xm(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],s=t[(r+1)%e],l=t[(r+2)%e];return ku((n-r/e)*e,i,o,s,l)}}var Fo=(t=>()=>t);function Gu(t,e){return function(n){return t+n*e}}function ym(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function GR(t,e){var n=e-t;return n?Gu(t,n>180||n<-180?n-360*Math.round(n/360):n):Fo(isNaN(t)?e:t)}function Tm(t){return(t=+t)==1?Xu:function(e,n){return n-e?ym(e,n,t):Fo(isNaN(e)?n:e)}}function Xu(t,e){var n=e-t;return n?Gu(t,n):Fo(isNaN(t)?e:t)}var No=(function t(e){var n=Tm(e);function r(i,o){var s=n((i=Mo(i)).r,(o=Mo(o)).r),l=n(i.g,o.g),c=n(i.b,o.b),u=Xu(i.opacity,o.opacity);return function(f){return i.r=s(f),i.g=l(f),i.b=c(f),i.opacity=u(f),i+""}}return r.gamma=t,r})(1);function Wu(t){return function(e){var n=e.length,r=new Array(n),i=new Array(n),o=new Array(n),s,l;for(s=0;s<n;++s)l=Mo(e[s]),r[s]=l.r||0,i[s]=l.g||0,o[s]=l.b||0;return r=t(r),i=t(i),o=t(o),l.opacity=1,function(c){return l.r=r(c),l.g=i(c),l.b=o(c),l+""}}}var XR=Wu(mm),WR=Wu(xm);function Vu(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function ju(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function VR(t,e){return(ju(e)?Vu:Hu)(t,e)}function Hu(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),s;for(s=0;s<r;++s)i[s]=Ya(t[s],e[s]);for(;s<n;++s)o[s]=e[s];return function(l){for(s=0;s<r;++s)o[s]=i[s](l);return o}}function bm(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Tr(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Sm(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Ya(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ul=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fl=new RegExp(ul.source,"g");function Am(t){return function(){return t}}function Em(t){return function(e){return t(e)+""}}function Yu(t,e){var n=ul.lastIndex=fl.lastIndex=0,r,i,o,s=-1,l=[],c=[];for(t=t+"",e=e+"";(r=ul.exec(t))&&(i=fl.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),l[s]?l[s]+=o:l[++s]=o),(r=r[0])===(i=i[0])?l[s]?l[s]+=i:l[++s]=i:(l[++s]=null,c.push({i:s,x:Tr(r,i)})),n=fl.lastIndex;return n<e.length&&(o=e.slice(n),l[s]?l[s]+=o:l[++s]=o),l.length<2?c[0]?Em(c[0].x):Am(e):(e=c.length,function(u){for(var f=0,d;f<e;++f)l[(d=c[f]).i]=d.x(u);return l.join("")})}function Ya(t,e){var n=typeof e,r;return e==null||n==="boolean"?Fo(e):(n==="number"?Tr:n==="string"?(r=Ea(e))?(e=r,No):Yu:e instanceof Ea?No:e instanceof Date?bm:ju(e)?Vu:Array.isArray(e)?Hu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Sm:Tr)(t,e)}function Cm(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Im(t){return function(){return t}}function Rm(t){return+t}var Ku=[0,1];function Ka(t){return t}function dl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:Im(isNaN(e)?NaN:.5)}function wm(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function Om(t,e,n){var r=t[0],i=t[1],o=e[0],s=e[1];return i<r?(r=dl(i,r),o=n(s,o)):(r=dl(r,i),o=n(o,s)),function(l){return o(r(l))}}function Pm(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),s=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<r;)i[s]=dl(t[s],t[s+1]),o[s]=n(e[s],e[s+1]);return function(l){var c=am(t,l,1,r)-1;return o[c](i[c](l))}}function $o(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function hl(){var t=Ku,e=Ku,n=Ya,r,i,o,s=Ka,l,c,u;function f(){var h=Math.min(t.length,e.length);return s!==Ka&&(s=wm(t[0],t[h-1])),l=h>2?Pm:Om,c=u=null,d}function d(h){return h==null||isNaN(h=+h)?o:(c||(c=l(t.map(r),e,n)))(r(s(h)))}return d.invert=function(h){return s(i((u||(u=l(e,t.map(r),Tr)))(h)))},d.domain=function(h){return arguments.length?(t=Array.from(h,Rm),f()):t.slice()},d.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},d.rangeRound=function(h){return e=Array.from(h),n=Cm,f()},d.clamp=function(h){return arguments.length?(s=h?!0:Ka,f()):s!==Ka},d.interpolate=function(h){return arguments.length?(n=h,f()):n},d.unknown=function(h){return arguments.length?(o=h,d):o},function(h,m){return r=h,i=m,f()}}function Zu(){return hl()(Ka,Ka)}function Ni(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function jR(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}var Mm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $i(t){if(!(e=Mm.exec(t)))throw new Error("invalid format: "+t);var e;return new gl({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]})}$i.prototype=gl.prototype;function gl(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}gl.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function Lm(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function Bo(t,e){if(!isFinite(t)||t===0)return null;var n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"),r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Za(t){return t=Bo(Math.abs(t)),t?t[1]:NaN}function Dm(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Za(e)/3)))*3-Za(Math.abs(t)))}function Fm(t,e){return function(n,r){for(var i=n.length,o=[],s=0,l=t[0],c=0;i>0&&l>0&&(c+l+1>r&&(l=Math.max(1,r-c)),o.push(n.substring(i-=l,i+l)),!((c+=l+1)>r));)l=t[s=(s+1)%t.length];return o.reverse().join(e)}}function Nm(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}function $m(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var zo;function Bm(t,e){var n=Bo(t,e);if(!n)return zo=void 0,t.toPrecision(e);var r=n[0],i=n[1],o=i-(zo=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return o===s?r:o>s?r+new Array(o-s+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Bo(t,Math.max(0,e+o-1))[0]}function Ju(t,e){var n=Bo(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}var Qu={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:Lm,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)=>Ju(t*100,e),r:Ju,s:Bm,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function _u(t){return t}var qu=Array.prototype.map,tf=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function zm(t){var e=t.grouping===void 0||t.thousands===void 0?_u:Fm(qu.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?_u:Nm(qu.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",l=t.minus===void 0?"\u2212":t.minus+"",c=t.nan===void 0?"NaN":t.nan+"";function u(d,h){d=$i(d);var m=d.fill,S=d.align,E=d.sign,C=d.symbol,w=d.zero,N=d.width,z=d.comma,$=d.precision,G=d.trim,V=d.type;V==="n"?(z=!0,V="g"):Qu[V]||($===void 0&&($=12),G=!0,V="g"),(w||m==="0"&&S==="=")&&(w=!0,m="0",S="=");var J=(h&&h.prefix!==void 0?h.prefix:"")+(C==="$"?n:C==="#"&&/[boxX]/.test(V)?"0"+V.toLowerCase():""),Q=(C==="$"?r:/[%p]/.test(V)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),rt=Qu[V],et=/[defgprs%]/.test(V);$=$===void 0?6:/[gprs]/.test(V)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function st(ct){var dt=J,q=Q,ft,lt,pt;if(V==="c")q=rt(ct)+q,ct="";else{ct=+ct;var Tt=ct<0||1/ct<0;if(ct=isNaN(ct)?c:rt(Math.abs(ct),$),G&&(ct=$m(ct)),Tt&&+ct==0&&E!=="+"&&(Tt=!1),dt=(Tt?E==="("?E:l:E==="-"||E==="("?"":E)+dt,q=(V==="s"&&!isNaN(ct)&&zo!==void 0?tf[8+zo/3]:"")+q+(Tt&&E==="("?")":""),et){for(ft=-1,lt=ct.length;++ft<lt;)if(pt=ct.charCodeAt(ft),48>pt||pt>57){q=(pt===46?i+ct.slice(ft+1):ct.slice(ft))+q,ct=ct.slice(0,ft);break}}}z&&!w&&(ct=e(ct,1/0));var Rt=dt.length+ct.length+q.length,Ct=Rt<N?new Array(N-Rt+1).join(m):"";switch(z&&w&&(ct=e(Ct+ct,Ct.length?N-q.length:1/0),Ct=""),S){case"<":ct=dt+ct+q+Ct;break;case"=":ct=dt+Ct+ct+q;break;case"^":ct=Ct.slice(0,Rt=Ct.length>>1)+dt+ct+q+Ct.slice(Rt);break;default:ct=Ct+dt+ct+q;break}return o(ct)}return st.toString=function(){return d+""},st}function f(d,h){var m=Math.max(-8,Math.min(8,Math.floor(Za(h)/3)))*3,S=Math.pow(10,-m),E=u((d=$i(d),d.type="f",d),{suffix:tf[8+m/3]});return function(C){return E(S*C)}}return{format:u,formatPrefix:f}}var Uo,vl,ef;Um({thousands:",",grouping:[3],currency:["$",""]});function Um(t){return Uo=zm(t),vl=Uo.format,ef=Uo.formatPrefix,Uo}function km(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Za(e)-Za(t))+1}function Gm(t){return Math.max(0,-Za(Math.abs(t)))}function Xm(t,e,n,r){var i=ol(t,e,n),o;switch(r=$i(r==null?",f":r),r.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Dm(i,s))&&(r.precision=o),ef(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=km(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Gm(i))&&(r.precision=o-(r.type==="%")*2);break}}return vl(r)}function nf(t){var e=t.domain;return t.ticks=function(n){var r=e();return al(r[0],r[r.length-1],n==null?10:n)},t.tickFormat=function(n,r){var i=e();return Xm(i[0],i[i.length-1],n==null?10:n,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,s=r[i],l=r[o],c,u,f=10;for(l<s&&(u=s,s=l,l=u,u=i,i=o,o=u);f-- >0;){if(u=il(s,l,n),u===c)return r[i]=s,r[o]=l,e(r);if(u>0)s=Math.floor(s/u)*u,l=Math.ceil(l/u)*u;else if(u<0)s=Math.ceil(s*u)/u,l=Math.floor(l*u)/u;else break;c=u}return t},t}function ko(){var t=Zu();return t.copy=function(){return $o(t,ko())},Ni.apply(t,arguments),nf(t)}function rf(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function af(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Wm(t){var e=1,n=t(rf(e),af(e));return n.constant=function(r){return arguments.length?t(rf(e=+r),af(e)):e},nf(n)}function of(){var t=Wm(hl());return t.copy=function(){return $o(t,of()).constant(t.constant())},Ni.apply(t,arguments)}function sf(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],o=t[r],s;return o<i&&(s=n,n=r,r=s,s=i,i=o,o=s),t[n]=e.floor(i),t[r]=e.ceil(o),t}function lf(t){return Math.log(t)}function cf(t){return Math.exp(t)}function Vm(t){return-Math.log(-t)}function jm(t){return-Math.exp(-t)}function Hm(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ym(t){return t===10?Hm:t===Math.E?Math.exp:e=>Math.pow(t,e)}function Km(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function uf(t){return(e,n)=>-t(-e,n)}function Zm(t){const e=t(lf,cf),n=e.domain;let r=10,i,o;function s(){return i=Km(r),o=Ym(r),n()[0]<0?(i=uf(i),o=uf(o),t(Vm,jm)):t(lf,cf),e}return e.base=function(l){return arguments.length?(r=+l,s()):r},e.domain=function(l){return arguments.length?(n(l),s()):n()},e.ticks=l=>{const c=n();let u=c[0],f=c[c.length-1];const d=f<u;d&&([u,f]=[f,u]);let h=i(u),m=i(f),S,E;const C=l==null?10:+l;let w=[];if(!(r%1)&&m-h<C){if(h=Math.floor(h),m=Math.ceil(m),u>0){for(;h<=m;++h)for(S=1;S<r;++S)if(E=h<0?S/o(-h):S*o(h),!(E<u)){if(E>f)break;w.push(E)}}else for(;h<=m;++h)for(S=r-1;S>=1;--S)if(E=h>0?S/o(-h):S*o(h),!(E<u)){if(E>f)break;w.push(E)}w.length*2<C&&(w=al(u,f,C))}else w=al(h,m,Math.min(m-h,C)).map(o);return d?w.reverse():w},e.tickFormat=(l,c)=>{if(l==null&&(l=10),c==null&&(c=r===10?"s":","),typeof c!="function"&&(!(r%1)&&(c=$i(c)).precision==null&&(c.trim=!0),c=vl(c)),l===1/0)return c;const u=Math.max(1,r*l/e.ticks().length);return f=>{let d=f/o(Math.round(i(f)));return d*r<r-.5&&(d*=r),d<=u?c(f):""}},e.nice=()=>n(sf(n(),{floor:l=>o(Math.floor(i(l))),ceil:l=>o(Math.ceil(i(l)))})),e}function ff(){const t=Zm(hl()).domain([1,10]);return t.copy=()=>$o(t,ff()).base(t.base()),Ni.apply(t,arguments),t}const Xr=1e3,fr=Xr*60,Wr=fr*60,Vr=Wr*24,pl=Vr*7,df=Vr*30,ml=Vr*365,xl=new Date,yl=new Date;function On(t,e,n,r){function i(o){return t(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(t(o=new Date(+o)),o),i.ceil=o=>(t(o=new Date(o-1)),e(o,1),t(o),o),i.round=o=>{const s=i(o),l=i.ceil(o);return o-s<l-o?s:l},i.offset=(o,s)=>(e(o=new Date(+o),s==null?1:Math.floor(s)),o),i.range=(o,s,l)=>{const c=[];if(o=i.ceil(o),l=l==null?1:Math.floor(l),!(o<s)||!(l>0))return c;let u;do c.push(u=new Date(+o)),e(o,l),t(o);while(u<o&&o<s);return c},i.filter=o=>On(s=>{if(s>=s)for(;t(s),!o(s);)s.setTime(s-1)},(s,l)=>{if(s>=s)if(l<0)for(;++l<=0;)for(;e(s,-1),!o(s););else for(;--l>=0;)for(;e(s,1),!o(s););}),n&&(i.count=(o,s)=>(xl.setTime(+o),yl.setTime(+s),t(xl),t(yl),Math.floor(n(xl,yl))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?s=>r(s)%o===0:s=>i.count(0,s)%o===0):i)),i}const Go=On(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Go.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?On(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Go);const HR=Go.range,Ra=On(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Xr)},(t,e)=>(e-t)/Xr,t=>t.getUTCSeconds()),YR=Ra.range,Tl=On(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xr)},(t,e)=>{t.setTime(+t+e*fr)},(t,e)=>(e-t)/fr,t=>t.getMinutes()),KR=Tl.range,bl=On(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*fr)},(t,e)=>(e-t)/fr,t=>t.getUTCMinutes()),ZR=bl.range,Sl=On(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Xr-t.getMinutes()*fr)},(t,e)=>{t.setTime(+t+e*Wr)},(t,e)=>(e-t)/Wr,t=>t.getHours()),JR=Sl.range,Al=On(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Wr)},(t,e)=>(e-t)/Wr,t=>t.getUTCHours()),QR=Al.range,Bi=On(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*fr)/Vr,t=>t.getDate()-1),_R=Bi.range,Xo=On(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Vr,t=>t.getUTCDate()-1),qR=Xo.range,hf=On(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Vr,t=>Math.floor(t/Vr)),tw=hf.range;function wa(t){return On(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*fr)/pl)}const Wo=wa(0),Vo=wa(1),Jm=wa(2),Qm=wa(3),Ja=wa(4),_m=wa(5),qm=wa(6),ew=Wo.range,nw=Vo.range,rw=Jm.range,aw=Qm.range,iw=Ja.range,ow=_m.range,sw=qm.range;function Oa(t){return On(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/pl)}const jo=Oa(0),Ho=Oa(1),tx=Oa(2),ex=Oa(3),Qa=Oa(4),nx=Oa(5),rx=Oa(6),lw=jo.range,cw=Ho.range,uw=tx.range,fw=ex.range,dw=Qa.range,hw=nx.range,gw=rx.range,El=On(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth()),vw=El.range,Cl=On(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()),pw=Cl.range,jr=On(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());jr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:On(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});const mw=jr.range,Hr=On(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());Hr.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:On(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});const xw=Hr.range;function gf(t,e,n,r,i,o){const s=[[Ra,1,Xr],[Ra,5,5*Xr],[Ra,15,15*Xr],[Ra,30,30*Xr],[o,1,fr],[o,5,5*fr],[o,15,15*fr],[o,30,30*fr],[i,1,Wr],[i,3,3*Wr],[i,6,6*Wr],[i,12,12*Wr],[r,1,Vr],[r,2,2*Vr],[n,1,pl],[e,1,df],[e,3,3*df],[t,1,ml]];function l(u,f,d){const h=f<u;h&&([u,f]=[f,u]);const m=d&&typeof d.range=="function"?d:c(u,f,d),S=m?m.range(u,+f+1):[];return h?S.reverse():S}function c(u,f,d){const h=Math.abs(f-u)/d,m=sl(([,,C])=>C).right(s,h);if(m===s.length)return t.every(ol(u/ml,f/ml,d));if(m===0)return Go.every(Math.max(ol(u,f,d),1));const[S,E]=s[h/s[m-1][2]<s[m][2]/h?m-1:m];return S.every(E)}return[l,c]}const[ax,ix]=gf(Hr,Cl,jo,hf,Al,bl),[ox,sx]=gf(jr,El,Wo,Bi,Sl,Tl);function Il(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Rl(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function zi(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function lx(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,o=t.days,s=t.shortDays,l=t.months,c=t.shortMonths,u=Ui(i),f=ki(i),d=Ui(o),h=ki(o),m=Ui(s),S=ki(s),E=Ui(l),C=ki(l),w=Ui(c),N=ki(c),z={a:pt,A:Tt,b:Rt,B:Ct,c:null,d:Tf,e:Tf,f:Mx,g:Gx,G:Wx,H:wx,I:Ox,j:Px,L:bf,m:Lx,M:Dx,p:Kt,q:re,Q:Rf,s:wf,S:Fx,u:Nx,U:$x,V:Bx,w:zx,W:Ux,x:null,X:null,y:kx,Y:Xx,Z:Vx,"%":If},$={a:Ee,A:Ce,b:be,B:Ne,c:null,d:Af,e:Af,f:Kx,g:ay,G:oy,H:jx,I:Hx,j:Yx,L:Ef,m:Zx,M:Jx,p:ye,q:De,Q:Rf,s:wf,S:Qx,u:_x,U:qx,V:ty,w:ey,W:ny,x:null,X:null,y:ry,Y:iy,Z:sy,"%":If},G={a:et,A:st,b:ct,B:dt,c:q,d:xf,e:xf,f:Ex,g:mf,G:pf,H:yf,I:yf,j:Tx,L:Ax,m:yx,M:bx,p:rt,q:xx,Q:Ix,s:Rx,S:Sx,u:hx,U:gx,V:vx,w:dx,W:px,x:ft,X:lt,y:mf,Y:pf,Z:mx,"%":Cx};z.x=V(n,z),z.X=V(r,z),z.c=V(e,z),$.x=V(n,$),$.X=V(r,$),$.c=V(e,$);function V(Zt,ve){return function(xe){var Vt=[],je=-1,We=0,xn=Zt.length,wn,Ae,hn;for(xe instanceof Date||(xe=new Date(+xe));++je<xn;)Zt.charCodeAt(je)===37&&(Vt.push(Zt.slice(We,je)),(Ae=vf[wn=Zt.charAt(++je)])!=null?wn=Zt.charAt(++je):Ae=wn==="e"?" ":"0",(hn=ve[wn])&&(wn=hn(xe,Ae)),Vt.push(wn),We=je+1);return Vt.push(Zt.slice(We,je)),Vt.join("")}}function J(Zt,ve){return function(xe){var Vt=zi(1900,void 0,1),je=Q(Vt,Zt,xe+="",0),We,xn;if(je!=xe.length)return null;if("Q"in Vt)return new Date(Vt.Q);if("s"in Vt)return new Date(Vt.s*1e3+("L"in Vt?Vt.L:0));if(ve&&!("Z"in Vt)&&(Vt.Z=0),"p"in Vt&&(Vt.H=Vt.H%12+Vt.p*12),Vt.m===void 0&&(Vt.m="q"in Vt?Vt.q:0),"V"in Vt){if(Vt.V<1||Vt.V>53)return null;"w"in Vt||(Vt.w=1),"Z"in Vt?(We=Rl(zi(Vt.y,0,1)),xn=We.getUTCDay(),We=xn>4||xn===0?Ho.ceil(We):Ho(We),We=Xo.offset(We,(Vt.V-1)*7),Vt.y=We.getUTCFullYear(),Vt.m=We.getUTCMonth(),Vt.d=We.getUTCDate()+(Vt.w+6)%7):(We=Il(zi(Vt.y,0,1)),xn=We.getDay(),We=xn>4||xn===0?Vo.ceil(We):Vo(We),We=Bi.offset(We,(Vt.V-1)*7),Vt.y=We.getFullYear(),Vt.m=We.getMonth(),Vt.d=We.getDate()+(Vt.w+6)%7)}else("W"in Vt||"U"in Vt)&&("w"in Vt||(Vt.w="u"in Vt?Vt.u%7:"W"in Vt?1:0),xn="Z"in Vt?Rl(zi(Vt.y,0,1)).getUTCDay():Il(zi(Vt.y,0,1)).getDay(),Vt.m=0,Vt.d="W"in Vt?(Vt.w+6)%7+Vt.W*7-(xn+5)%7:Vt.w+Vt.U*7-(xn+6)%7);return"Z"in Vt?(Vt.H+=Vt.Z/100|0,Vt.M+=Vt.Z%100,Rl(Vt)):Il(Vt)}}function Q(Zt,ve,xe,Vt){for(var je=0,We=ve.length,xn=xe.length,wn,Ae;je<We;){if(Vt>=xn)return-1;if(wn=ve.charCodeAt(je++),wn===37){if(wn=ve.charAt(je++),Ae=G[wn in vf?ve.charAt(je++):wn],!Ae||(Vt=Ae(Zt,xe,Vt))<0)return-1}else if(wn!=xe.charCodeAt(Vt++))return-1}return Vt}function rt(Zt,ve,xe){var Vt=u.exec(ve.slice(xe));return Vt?(Zt.p=f.get(Vt[0].toLowerCase()),xe+Vt[0].length):-1}function et(Zt,ve,xe){var Vt=m.exec(ve.slice(xe));return Vt?(Zt.w=S.get(Vt[0].toLowerCase()),xe+Vt[0].length):-1}function st(Zt,ve,xe){var Vt=d.exec(ve.slice(xe));return Vt?(Zt.w=h.get(Vt[0].toLowerCase()),xe+Vt[0].length):-1}function ct(Zt,ve,xe){var Vt=w.exec(ve.slice(xe));return Vt?(Zt.m=N.get(Vt[0].toLowerCase()),xe+Vt[0].length):-1}function dt(Zt,ve,xe){var Vt=E.exec(ve.slice(xe));return Vt?(Zt.m=C.get(Vt[0].toLowerCase()),xe+Vt[0].length):-1}function q(Zt,ve,xe){return Q(Zt,e,ve,xe)}function ft(Zt,ve,xe){return Q(Zt,n,ve,xe)}function lt(Zt,ve,xe){return Q(Zt,r,ve,xe)}function pt(Zt){return s[Zt.getDay()]}function Tt(Zt){return o[Zt.getDay()]}function Rt(Zt){return c[Zt.getMonth()]}function Ct(Zt){return l[Zt.getMonth()]}function Kt(Zt){return i[+(Zt.getHours()>=12)]}function re(Zt){return 1+~~(Zt.getMonth()/3)}function Ee(Zt){return s[Zt.getUTCDay()]}function Ce(Zt){return o[Zt.getUTCDay()]}function be(Zt){return c[Zt.getUTCMonth()]}function Ne(Zt){return l[Zt.getUTCMonth()]}function ye(Zt){return i[+(Zt.getUTCHours()>=12)]}function De(Zt){return 1+~~(Zt.getUTCMonth()/3)}return{format:function(Zt){var ve=V(Zt+="",z);return ve.toString=function(){return Zt},ve},parse:function(Zt){var ve=J(Zt+="",!1);return ve.toString=function(){return Zt},ve},utcFormat:function(Zt){var ve=V(Zt+="",$);return ve.toString=function(){return Zt},ve},utcParse:function(Zt){var ve=J(Zt+="",!0);return ve.toString=function(){return Zt},ve}}}var vf={"-":"",_:" ",0:"0"},Ln=/^\s*\d+/,cx=/^%/,ux=/[\\^$*+?|[\]().{}]/g;function tn(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(e)+i:i)}function fx(t){return t.replace(ux,"\\$&")}function Ui(t){return new RegExp("^(?:"+t.map(fx).join("|")+")","i")}function ki(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function dx(t,e,n){var r=Ln.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function hx(t,e,n){var r=Ln.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function gx(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function vx(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function px(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function pf(t,e,n){var r=Ln.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function mf(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mx(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function xx(t,e,n){var r=Ln.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function yx(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function xf(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Tx(t,e,n){var r=Ln.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function yf(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function bx(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Sx(t,e,n){var r=Ln.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Ax(t,e,n){var r=Ln.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ex(t,e,n){var r=Ln.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Cx(t,e,n){var r=cx.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ix(t,e,n){var r=Ln.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Rx(t,e,n){var r=Ln.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Tf(t,e){return tn(t.getDate(),e,2)}function wx(t,e){return tn(t.getHours(),e,2)}function Ox(t,e){return tn(t.getHours()%12||12,e,2)}function Px(t,e){return tn(1+Bi.count(jr(t),t),e,3)}function bf(t,e){return tn(t.getMilliseconds(),e,3)}function Mx(t,e){return bf(t,e)+"000"}function Lx(t,e){return tn(t.getMonth()+1,e,2)}function Dx(t,e){return tn(t.getMinutes(),e,2)}function Fx(t,e){return tn(t.getSeconds(),e,2)}function Nx(t){var e=t.getDay();return e===0?7:e}function $x(t,e){return tn(Wo.count(jr(t)-1,t),e,2)}function Sf(t){var e=t.getDay();return e>=4||e===0?Ja(t):Ja.ceil(t)}function Bx(t,e){return t=Sf(t),tn(Ja.count(jr(t),t)+(jr(t).getDay()===4),e,2)}function zx(t){return t.getDay()}function Ux(t,e){return tn(Vo.count(jr(t)-1,t),e,2)}function kx(t,e){return tn(t.getFullYear()%100,e,2)}function Gx(t,e){return t=Sf(t),tn(t.getFullYear()%100,e,2)}function Xx(t,e){return tn(t.getFullYear()%1e4,e,4)}function Wx(t,e){var n=t.getDay();return t=n>=4||n===0?Ja(t):Ja.ceil(t),tn(t.getFullYear()%1e4,e,4)}function Vx(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+tn(e/60|0,"0",2)+tn(e%60,"0",2)}function Af(t,e){return tn(t.getUTCDate(),e,2)}function jx(t,e){return tn(t.getUTCHours(),e,2)}function Hx(t,e){return tn(t.getUTCHours()%12||12,e,2)}function Yx(t,e){return tn(1+Xo.count(Hr(t),t),e,3)}function Ef(t,e){return tn(t.getUTCMilliseconds(),e,3)}function Kx(t,e){return Ef(t,e)+"000"}function Zx(t,e){return tn(t.getUTCMonth()+1,e,2)}function Jx(t,e){return tn(t.getUTCMinutes(),e,2)}function Qx(t,e){return tn(t.getUTCSeconds(),e,2)}function _x(t){var e=t.getUTCDay();return e===0?7:e}function qx(t,e){return tn(jo.count(Hr(t)-1,t),e,2)}function Cf(t){var e=t.getUTCDay();return e>=4||e===0?Qa(t):Qa.ceil(t)}function ty(t,e){return t=Cf(t),tn(Qa.count(Hr(t),t)+(Hr(t).getUTCDay()===4),e,2)}function ey(t){return t.getUTCDay()}function ny(t,e){return tn(Ho.count(Hr(t)-1,t),e,2)}function ry(t,e){return tn(t.getUTCFullYear()%100,e,2)}function ay(t,e){return t=Cf(t),tn(t.getUTCFullYear()%100,e,2)}function iy(t,e){return tn(t.getUTCFullYear()%1e4,e,4)}function oy(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Qa(t):Qa.ceil(t),tn(t.getUTCFullYear()%1e4,e,4)}function sy(){return"+0000"}function If(){return"%"}function Rf(t){return+t}function wf(t){return Math.floor(+t/1e3)}var _a,wl,Of,Ol,Pf;ly({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function ly(t){return _a=lx(t),wl=_a.format,Of=_a.parse,Ol=_a.utcFormat,Pf=_a.utcParse,_a}function cy(t){return new Date(t)}function uy(t){return t instanceof Date?+t:+new Date(+t)}function Pl(t,e,n,r,i,o,s,l,c,u){var f=Zu(),d=f.invert,h=f.domain,m=u(".%L"),S=u(":%S"),E=u("%I:%M"),C=u("%I %p"),w=u("%a %d"),N=u("%b %d"),z=u("%B"),$=u("%Y");function G(V){return(c(V)<V?m:l(V)<V?S:s(V)<V?E:o(V)<V?C:r(V)<V?i(V)<V?w:N:n(V)<V?z:$)(V)}return f.invert=function(V){return new Date(d(V))},f.domain=function(V){return arguments.length?h(Array.from(V,uy)):h().map(cy)},f.ticks=function(V){var J=h();return t(J[0],J[J.length-1],V==null?10:V)},f.tickFormat=function(V,J){return J==null?G:u(J)},f.nice=function(V){var J=h();return(!V||typeof V.range!="function")&&(V=e(J[0],J[J.length-1],V==null?10:V)),V?h(sf(J,V)):f},f.copy=function(){return $o(f,Pl(t,e,n,r,i,o,s,l,c,u))},f}function fy(){return Ni.apply(Pl(ox,sx,jr,El,Wo,Bi,Sl,Tl,Ra,wl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function dy(){return Ni.apply(Pl(ax,ix,Hr,Cl,jo,Xo,Al,bl,Ra,Ol).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}const Xe=t=>t||t===0,ue=t=>typeof t=="function",Ye=t=>typeof t=="string",le=t=>typeof t=="number",Tn=t=>typeof t=="undefined",on=t=>typeof t!="undefined",Pa=t=>typeof t=="boolean",hy=t=>Math.ceil(t/10)*10,qa=t=>Math.ceil(t)+.5,Ma=t=>t[1]-t[0],qn=t=>typeof t=="object",gy=t=>{for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1;return!0},dr=t=>Tn(t)||t===null||Ye(t)&&t.length===0||qn(t)&&!(t instanceof Date)&&gy(t)||le(t)&&isNaN(t),pn=t=>!dr(t),en=t=>Array.isArray(t),Ke=t=>t&&!(t!=null&&t.nodeType)&&qn(t)&&!en(t);function vy(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function py(t){const e=typeof(t==null?void 0:t.requestAnimationFrame)=="function"&&typeof(t==null?void 0:t.cancelAnimationFrame)=="function",n=typeof(t==null?void 0:t.requestIdleCallback)=="function"&&typeof(t==null?void 0:t.cancelIdleCallback)=="function",r=o=>setTimeout(o,1),i=o=>clearTimeout(o);return[e?t.requestAnimationFrame:r,e?t.cancelAnimationFrame:i,n?t.requestIdleCallback:r,n?t.cancelIdleCallback:i]}const fe=vy(),Ze=fe==null?void 0:fe.document,[my,yw,Mf,xy]=py(fe),yy=new Set(["span","div","p","br","b","i","em","small","strong","mark","u","s","sub","sup","h1","h2","h3","h4","h5","h6","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","abbr","ins","del","a","img","figure","figcaption","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),Ty=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),Yo=new Map;yy.forEach(t=>Yo.set(t.toLowerCase(),t));const Ko=new Map;Ty.forEach(t=>Ko.set(t.toLowerCase(),t));const by=new Set(["http:","https:","mailto:"]),Sy=new Set(["href","src","xlink:href"]),Ay=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,Ey=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,Cy=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,Lf=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,Df=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,Iy=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"];function Ml(t){return t.replace(/:/gi,":").replace(/&newline;/gi,`
|
|
31
|
+
`).replace(/&tab;/gi," ").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&#(\d+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-f]+);?/gi,(e,n)=>String.fromCharCode(parseInt(n,16)))}function Ff(t){const n=Ml(t).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!n||n.startsWith("#"))return!0;const r=n.match(/^[^/?#]*:/);return r?by.has(r[0]):!0}function Ry(t){const n=Ml(t).replace(/[\u0000-\u001f]/g,"");Df.lastIndex=0;let r;for(;(r=Df.exec(n))!==null;)if(!Ff(r[1]))return null;const i=n.toLowerCase().replace(/\s/g,"");for(const o of Iy)if(i.includes(o))return null;return t}const wy={'"':""","'":"'","`":"`"},Oy=/["'`]/g;function Ll(t){return t.replace(Oy,e=>wy[e])}function Py(t,e,n=!1){if(Sy.has(t))return Ff(e)?n?Ll(e):e:null;if(t==="style"){const i=Ry(e);return i===null?null:n?Ll(i):i}const r=Ml(e).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(r)?null:n?Ll(e):e}function My(t){const e=t.match(Ay);return e?e[1].toLowerCase():null}function Ly(t){const e=My(t);return e!==null&&Yo.has(e)}function Dy(t){var e,n,r;const i=t.match(Ey);if(i){const E=i[1].toLowerCase();return`</${(e=Yo.get(E))!=null?e:E}>`}const o=t.match(Cy);if(!o)return"";const[,s,l,c]=o,u=s.toLowerCase(),f=(n=Yo.get(u))!=null?n:u,d=[];Lf.lastIndex=0;let h;for(;(h=Lf.exec(l))!==null;){const E=h[1].toLowerCase(),C=h[2],w=h[3],N=h[4];if(E.startsWith("on"))continue;const z=(r=Ko.get(E))!=null?r:E;let $,G;if(C!==void 0)$=C,G='"';else if(w!==void 0)$=w,G="'";else if(N!==void 0)$=N,G='"';else{Ko.has(E)&&d.push(z);continue}if(Ko.has(E)){const J=Py(E,$,N!==void 0);J!==null&&d.push(`${z}=${G}${J}${G}`)}}const m=d.length>0?` ${d.join(" ")}`:"";return`<${f}${m}${c?"/>":">"}`}function Yr(t){return typeof t!="string"||!t||t.indexOf("<")===-1?t:t.replace(/<\/?[^>]*>|[^<>\s]+>/g,e=>e.startsWith("<!--")?"":e.startsWith("<")?Ly(e)?Dy(e):e.replace(/</g,"<"):e.slice(0,-1)+">")}var Fy=Object.defineProperty,Nf=Object.getOwnPropertySymbols,Ny=Object.prototype.hasOwnProperty,$y=Object.prototype.propertyIsEnumerable,$f=(t,e,n)=>e in t?Fy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Bf=(t,e)=>{for(var n in e||(e={}))Ny.call(e,n)&&$f(t,n,e[n]);if(Nf)for(var n of Nf(e))$y.call(e,n)&&$f(t,n,e[n]);return t};function zf(t,e){for(let n=0;n<t.length;n++){const r=t[n];r!==null&&on(r)&&e(r,n)}}function fa(t,e,n){return on(t[e])?t[e]:n}function By(t,e){for(const n in t)if(t[n]===e)return!0;return!1}function $e(t,e,...n){const r=ue(t);return r&&t.call(e,...n),r}function Zo(t,e){let n=0;const r=function(...i){!--n&&e.apply(this,i)};"duration"in t?t.each(()=>++n).on("end",r):(++n,t.call(r))}const Nn=t=>t.charAt(0).toUpperCase()+t.slice(1);function zy(t,e="-"){return t.split(e).map((n,r)=>r?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const La=t=>[].slice.call(t);function Uy(...t){const e=n=>{if(en(n))return n.map(e);if(Ke(n)&&n.constructor){const r=new n.constructor;for(const i in n)r[i]=e(n[i]);return r}return n};return t.map(n=>e(n)).reduce((n,r)=>Bf(Bf({},n),r))}function bn(t={},e){en(e)&&e.forEach(n=>bn(t,n));for(const n in e)/^\d+$/.test(n)||n in t||(t[n]=e[n]);return t}function Dl(t){const e=t[0]instanceof Date,n=Array.from(new Set(e?t.map(Number):t));return e?n.map(r=>new Date(r)):n}function ky(t){return t&&t.length?t.reduce((e,n)=>e.concat(n)):[]}function Kr(t,...e){if(!e.length||e.length===1&&!e[0])return t;const n=e.shift();return Ke(t)&&Ke(n)&&Object.keys(n).forEach(r=>{if(!/^(__proto__|constructor|prototype)$/i.test(r)){const i=n[r];i instanceof Date?t[r]=new Date(i.getTime()):Ke(i)?(!t[r]&&(t[r]={}),t[r]=Kr(t[r],i)):t[r]=en(i)?i.concat():i}}),Kr(t,...e)}function ti(t,e=!0){let n;return t[0]instanceof Date?n=e?(r,i)=>r-i:(r,i)=>i-r:e&&!t.every(isNaN)?n=(r,i)=>r-i:e||(n=(r,i)=>r>i&&-1||r<i&&1||r===i&&0),t.concat().sort(n)}function br(t,e){let n=e.filter(r=>pn(r));if(n.length)if(le(n[0])){let r=t==="min"?1/0:-1/0;for(const i of n)(t==="min"?i<r:i>r)&&(r=i);n=r}else n[0]instanceof Date&&(n=ti(n,t==="min")[0]);else n=void 0;return n}const Jo=(t,e,n=1)=>{const r=[],i=Math.max(0,Math.ceil((e-t)/n))|0;for(let o=0;o<i;o++)r.push(t+o*n);return r};let Gy=0;function Pr(t=!0){const e=++Gy;return t?String(e):e}function Fl(t,e,n,r,i){if(n>r)return-1;const o=Math.floor((n+r)/2);let{x:s,w:l=0}=t[o];return i&&(s=t[o].y,l=t[o].h),e>=s&&e<=s+l?o:e<s?Fl(t,e,n,o-1,i):Fl(t,e,o+1,r,i)}function Da(t,e){return Yr(t.replace(/\{=([^}]+)\}/g,(n,r)=>{var i;return(i=e[r])!=null?i:""}))}function Kn(t){var e;let n;if(t instanceof Date)n=t;else if(Ye(t)){const{config:r,format:i}=this;n=(e=i.dataTime(r.data_xFormat)(t))!=null?e:new Date(t)}else le(t)&&!isNaN(t)&&(n=new Date(+t));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${t}' to Date object`),n}function Uf(t){if(Ke(t)&&!Ye(t)){const s=t;return{top:s.top||0,right:s.right||0,bottom:s.bottom||0,left:s.left||0}}const e=(Ye(t)?t.trim().split(/\s+/):[t]).map(s=>+s||0),[n,r=n,i=n,o=r]=e;return{top:n,right:r,bottom:i,left:o}}function kf(t,e){e()===!1?my(()=>kf(t,e)):t()}function Gf(t,e=(n=>n)){const n=new Set;return zf(t,(r,i)=>{n.add(e(r,i))}),n}function Xf(t,e,n=(r=>r)){const r=new Map;return zf(t,(i,o)=>{r.set(e(i,o),n(i,o))}),r}function da(t="linear",e,n){const r={linear:ko,log:of,_log:ff,time:fy,utc:dy}[t]();return r.type=t,/_?log/.test(t)&&r.clamp(!0),r.range([e!=null?e:0,n!=null?n:1])}var Xy={getXScale(t,e,n,r){const i=this,o=i.state.loading!=="append"&&i.scale.zoom||da(i.axis.getAxisType("x"),t,e);return i.getCustomizedXScale(n?o.domain(n):o,r)},getYScale(t,e,n,r,i){const s=this.axis.getAxisType(t);if(i&&i.type===s)return i.range([e,n]),r&&i.domain(r),i;const l=da(s,e,n);return r&&l.domain(r),l},getYScaleById(t,e=!1){var n;const r=((n=this.axis)==null?void 0:n.getId(t))==="y2",i=e?r?"subY2":"subY":r?"y2":"y";return this.scale[i]},getCustomizedXScale(t,e){const n=this,r=()=>(e?e():n.axis.x.tickOffset())||(n.axis.isCategorized()?(t(1)-t(0))/2:0),i=n.config.axis_x_inverted,o=function(s){return t(s)+r()};for(const s in t)o[s]=t[s];return o.orgDomain=()=>t.domain(),o.orgScale=()=>t,n.axis.isCategorized()&&(o.domain=function(s){let l=s;return arguments.length?(t.domain(l),o):(l=this.orgDomain(),i?[l[0]+1,l[1]]:[l[0],l[1]+1])}),o},updateScales(t,e=!0){var n,r,i,o,s,l,c,u,f;const d=this,{axis:h,config:m,format:S,org:E,scale:C,state:{current:w,width:N,height:z,width2:$,height2:G,hasAxis:V,hasTreemap:J}}=d;if(V){const Q=m.axis_rotated,rt=d.getResettedPadding(1),et={x:Q?rt:0,y:Q?0:z,subX:Q?1:0,subY:Q?0:G},st={x:Q?z:N,y:Q?N:rt,subX:Q?z:N,subY:Q?$:1},ct=e?(n=C.x)==null?void 0:n.orgDomain():C.zoom||(i=(r=C.x)==null?void 0:r.domain)==null?void 0:i.call(r),dt=e?E.xDomain:C.zoom||(s=(o=C.subX)==null?void 0:o.domain)==null?void 0:s.call(o);C.x=d.getXScale(et.x,st.x,ct,()=>h.x.tickOffset()),C.subX=d.getXScale(et.x,st.x,dt,q=>{var ft;return q%1?0:((ft=h.subX)!=null?ft:h.x).tickOffset()}),S.xAxisTick=h.getXAxisTickFormat(),S.subXAxisTick=h.getXAxisTickFormat(!0),h.setAxis("x",C.x,m.axis_x_tick_outer,t),m.subchart_show&&h.setAxis("subX",C.subX,(l=m.subchart_axis_x_tick_outer)!=null?l:m.axis_x_tick_outer,t),C.y=d.getYScale("y",et.y,st.y,C.y?C.y.domain():m.axis_y_default,C.y),C.subY=d.getYScale("y",et.subY,st.subY,C.subY?C.subY.domain():m.axis_y_default,C.subY),h.setAxis("y",C.y,m.axis_y_tick_outer,t),m.subchart_show&&m.subchart_axis_y_show&&h.setAxis("subY",C.subY,(c=m.subchart_axis_y_tick_outer)!=null?c:m.axis_y_tick_outer,t),(m.axis_y2_show||m.subchart_axis_y2_show)&&(C.y2=d.getYScale("y2",et.y,st.y,C.y2?C.y2.domain():m.axis_y2_default,C.y2),C.subY2=d.getYScale("y2",et.subY,st.subY,C.subY2?C.subY2.domain():m.axis_y2_default,C.subY2),h.setAxis("y2",C.y2,m.axis_y2_tick_outer,t),m.subchart_show&&m.subchart_axis_y2_show&&h.setAxis("subY2",C.subY2,(u=m.subchart_axis_y2_tick_outer)!=null?u:m.axis_y2_tick_outer,t))}else if(J){const Q=d.getCurrentPadding();C.x=ko().rangeRound([Q.left,w.width-Q.right]),C.y=ko().rangeRound([Q.top,w.height-Q.bottom])}else(f=d.updateArc)==null||f.call(d)},xx(t){const e=this,{config:n,scale:{x:r,zoom:i}}=e,o=n.zoom_enabled&&i?i:r;return t?o(Xe(t.x)?t.x:t):null},xv(t){const e=this,{axis:n,config:r,scale:{x:i,zoom:o}}=e,s=r.zoom_enabled&&o?o:i;let l=e.getBaseValue(t);return n.isTimeSeries()?l=Kn.call(e,l):n.isCategorized()&&Ye(l)&&(l=r.axis_x_categories.indexOf(l)),s(l)},yv(t){const e=this,{scale:{y:n,y2:r}}=e;return(t.axis&&t.axis==="y2"?r:n)(e.getBaseValue(t))},subxx(t){return t?this.scale.subX(t.x):null}};const Wf=1e5;function Sr(t){const e=/(\d+(?:\.\d+)?)px/.exec(t),n=parseFloat(e?e[1]:t);return Number.isFinite(n)?n:12}function ir(t,e,n,r){return e.indices[n]||t.getShapeIndices(r)}function ei(t,e,n=[]){var r;const i=typeof e=="string"?e:e==null?void 0:e.id;return!((r=t.isGrouped)!=null&&r.call(t,i))||n.some(o=>o(t,e))}function ha(t,e){var n;const r=typeof e=="string"?e:e==null?void 0:e.id;return r&&((n=t.data_types)==null?void 0:n[r])||t.data_type||kt.LINE}function Qo(t){const e=+t;return Number.isFinite(e)?e:null}function Vf(t){var e,n;const r=(n=(e=t.scale.zoom||t.scale.x)==null?void 0:e.domain)==null?void 0:n.call(e),i=Qo(r==null?void 0:r[0]),o=Qo(r==null?void 0:r[1]);return i===null||o===null?null:[Math.min(i,o),Math.max(i,o)]}function _o(t){return Qo(t==null?void 0:t.x)}function Wy(t,e,n){let r=0,i=t.length;for(;r<i;){const o=r+i>>1,s=_o(t[o]);if(s===null)return 0;(n?s<e:s>e)?r=o+1:i=o}return r}function Vy(t,e,n){let r=0,i=t.length;for(;r<i;){const o=r+i>>1,s=_o(t[o]);if(s===null)return t.length;(n?s<=e:s>=e)?r=o+1:i=o}return r}function Zr(t,e,n=1){const r=(e==null?void 0:e.values)||[],i={start:0,end:r.length},o=Vf(t);if(!r.length||!o)return i;const s=t.state,l=s._canvasVisibleRangeCache||(s._canvasVisibleRangeCache=new Map),c=[e.id,r.length,s.dataGeneration,o[0],o[1],n].join(":"),u=l.get(e.id);if((u==null?void 0:u.key)===c)return u.range;const f=_o(r[0]),d=_o(r[r.length-1]);if(f===null||d===null)return i;const h=f<=d,m=Wy(r,o[0],h),S=Vy(r,o[1],h),E={start:Math.max(0,Math.min(m,S)-n),end:Math.min(r.length,Math.max(m,S)+n)};return l.set(e.id,{key:c,range:E}),E}function or(t,e){return ha(t.config,e)===kt.BAR}function Gi(t,e){return Yn.Area.indexOf(ha(t.config,e))>-1}function ni(t,e){const n=ha(t.config,e);return Yn.Line.indexOf(n)>-1}function ga(t,e){return ha(t.config,e)===kt.SCATTER}function va(t,e){return ha(t.config,e)===kt.BUBBLE}function Ar(t,e){return ni(t,e)||ga(t,e)||va(t,e)}function Zn(t,e){return ha(t.config,e)===kt.CANDLESTICK}function Nl(t,e){return ha(t.config,e)===kt.TREEMAP}function Tw(t,e){const n=ha(t,e);return n===kt.BAR||Yn.Area.indexOf(n)>-1}function In(t,e){const n=t.getBaseValue(e);return n!=null}function mn(t,e){return Number.isFinite(t)&&Number.isFinite(e)}function jf(t,e,n){const r=Math.ceil(n)+1,i=Math.max(1,Math.ceil(t)+r*2+1),o=Math.max(1,Math.ceil(e)+r*2+1);return{data:new Uint8Array(i*o),height:o,offset:r,width:i}}function Hf(t,e,n){const r=Math.round(e)+t.offset,i=Math.round(n)+t.offset;if(r<0||r>=t.width||i<0||i>=t.height)return!1;const o=i*t.width+r;return t.data[o]?!1:(t.data[o]=1,!0)}function zn(t,e,n,r=`axis_${e}`){const i=t[`${r}_tick_${n}`];return i!==void 0?i:t[`axis_${e}_tick_${n}`]}function qo(t,e){const n=typeof t=="function"?t.call(e):t;return n!=null&&n.length?n:void 0}function Yf(t,e,n){var r,i,o,s,l,c;if((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r,n))return e instanceof Date?e:Kn.call(t,e);if(n==="x"&&((s=(o=t.axis)==null?void 0:o.isCategorized)!=null&&s.call(o))&&typeof e=="string"){const u=t.config.axis_x_categories.indexOf(e);return u>=0?u:e}return(c=(l=t.axis)==null?void 0:l.isLog)!=null&&c.call(l,n)&&e!==null&&e!==void 0?+e:e}function Jr(t,e){return Yf(t,e,"x")}function Xi(t,e,n="y"){return Yf(t,e,n)}function Kf(t,e,n="y"){return e.map(r=>Xi(t,r,n))}function $l(t,e){return e.map(n=>Jr(t,n)).filter(n=>{var r,i;return!(typeof n=="string"&&((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)))})}function Fa(t,e){const n=typeof e=="function"?e():e;return t.ticks?t.ticks(n):t.domain()}function Zf(t,e){const[n,r]=t.domain(),i=+n,o=+r;if(e||!Number.isFinite(i)||!Number.isFinite(o)||o<=0)return Fa(t,e);const s=da("_log").domain([i>0?i:1,o]).range(t.range());let l=s.ticks();for(let c=o.toFixed().length;l.length>15;c--)l=s.ticks(c);return l.length&&(l.splice(0,1,n),l.splice(l.length-1,1,r)),l}function Wi(t,e){const n=+t,r=+e;return Number.isFinite(n)&&Number.isFinite(r)?Math.abs(n-r)<1e-6:t===e}function jy(t,e){const[n,r]=e,i=t.slice();return n!==void 0&&!i.some(o=>Wi(o,n))&&i.unshift(n),r!==void 0&&!i.some(o=>Wi(o,r))&&i.push(r),i}function Jf(t,e){const n=Jr(t,e);return Qo(n)}function Bl(t){var e,n,r,i,o,s,l,c;const{scale:u}=t,f=(n=(e=u.zoom)==null?void 0:e.domain)==null?void 0:n.call(e),d=((i=(r=u.subX)==null?void 0:r.domain)==null?void 0:i.call(r))||((s=(o=u.x)==null?void 0:o.orgDomain)==null?void 0:s.call(o))||((c=(l=u.x)==null?void 0:l.domain)==null?void 0:c.call(l));return!(f!=null&&f.length)||!(d!=null&&d.length)?!1:!Wi(f[0],d[0])||!Wi(f[1],d[1])}function tr(t){return Bl(t)?t.scale.zoom:t.scale.x}function Hy(t,e,n=0){var r,i;const o=(i=(r=tr(t)).domain)==null?void 0:i.call(r);if(!(o!=null&&o.length))return!0;const s=Jf(t,e),l=+o[0],c=+o[1];return s===null||!Number.isFinite(l)||!Number.isFinite(c)?!0:s>=Math.min(l,c)-n&&s<=Math.max(l,c)+n}function Yy(t,e){const n=[e>0?Math.abs(t[e]-t[e-1]):1/0,e<t.length-1?Math.abs(t[e+1]-t[e]):1/0].filter(Number.isFinite),r=Math.min(...n);return Number.isFinite(r)?r/2:0}function Qf(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<e?n=i+1:r=i}return n}function Ky(t,e){let n=0,r=t.length;for(;n<r;){const i=n+r>>1;t[i]<=e?n=i+1:r=i}return n}function Zy(t,e){var n;const{axis:r,state:i}=t,o=[i.dataGeneration,(n=r==null?void 0:r.isTimeSeries)!=null&&n.call(r)?1:0,e.map(u=>`${u.id}:${u.values.length}`).join(",")].join("|"),s=i._canvasXDataTickCache;if((s==null?void 0:s.key)===o)return s;const l=t.mapTargetsToUniqueXs(e),c={key:o,values:l,comparable:l.map(u=>{var f;return(f=Jf(t,u))!=null?f:NaN})};return i._canvasXDataTickCache=c,c}function Jy(t,e){const{values:n,comparable:r}=e;if(!Bl(t))return n;const i=Vf(t);if(!i||r.length!==n.length||!Number.isFinite(r[0]))return n.filter(f=>Hy(t,f));const[o,s]=i;let l=Qf(r,o),c=Ky(r,s);const u=f=>{const d=Qf(r,f);let h=-1,m=1/0;for(const S of[d-1,d]){const E=r[S],C=Math.abs(E-f);C<m&&(m=C,h=S)}h>-1&&h<r.length&&m<=Yy(r,h)+1e-6&&(l=Math.min(l,h),c=Math.max(c,h+1))};return u(o),u(s),n.slice(Math.max(0,l),Math.min(n.length,c))}function Qy(t,e){return typeof t=="function"?`fn:${e}`:Array.isArray(t)?t.map(n=>n instanceof Date?+n:String(n)).join(","):""}function _y(t,e){var n,r,i;const{config:o,state:s}=t,c=(((r=(n=tr(t)).domain)==null?void 0:r.call(n))||[]).map(f=>f instanceof Date?+f:String(f)).join(","),u=o.axis_rotated?s.height:s.width;return[e?1:0,s.dataGeneration,c,u,o.axis_x_tick_fit?1:0,o.axis_x_tick_count||"",o.axis_x_tick_culling,o.axis_x_tick_culling_max||"",o.axis_x_tick_culling_reverse?1:0,((i=o.axis_x_categories)==null?void 0:i.length)||0,Qy(o.axis_x_tick_values,s.redrawGeneration)].join("|")}function zl(t,e,n,r=!1){var i;return(i=t.axis)!=null&&i.generateTickValues?t.axis.generateTickValues(e,n,r):e}function qy(t,e){const[n,r]=t,i=[];if(!e||!Number.isFinite(e))return i;for(let o=Math.round(n);o<=r;o+=e)i.push(o);return i}function ts(t,e=!0){var n,r,i,o,s,l,c;const{axis:u,config:f}=t,d=tr(t),h=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),m=t.state._canvasXTickValuesCache||(t.state._canvasXTickValuesCache=new Map),S=_y(t,e),E=m.get(S);if(E)return E;const C=z=>(m.set(S,z),z);if(!(h!=null&&h.length))return C([]);const w=qo(f.axis_x_tick_values,t.api);if(w){const z=$l(t,w);return C(e?kl(t,z):z)}if(f.axis_x_tick_fit&&(h!=null&&h.length)&&t.mapTargetsToUniqueXs){const z=Zy(t,h),$=Jy(t,z),G=zl(t,$,f.axis_x_tick_count,(r=u==null?void 0:u.isTimeSeries)==null?void 0:r.call(u));return C(e?kl(t,G,!0):G)}if(Bl(t)&&!((i=u==null?void 0:u.isCategorized)!=null&&i.call(u))){const z=((s=(o=t.zoom)==null?void 0:o.getDomain)==null?void 0:s.call(o))||d.domain(),$=jy(Fa(d,f.axis_x_tick_count||vn),z);return C(e?ns($,Gl(t)):$)}if((l=u==null?void 0:u.isCategorized)!=null&&l.call(u)&&((c=f.axis_x_categories)!=null&&c.length)){const z=f.axis_x_categories.map(($,G)=>G);return C(e?ns(z,Gl(t)):z)}const N=Fa(d,f.axis_x_tick_count||vn);return C(e?ns(N,Gl(t)):N)}function t0(t){const{config:e,state:{height2:n,width2:r}}=t,i=e.axis_rotated?n:r,o=zn(e,"x","count","subchart_axis_x"),s=zn(e,"x","culling","subchart_axis_x"),l=zn(e,"x","culling_max","subchart_axis_x");if(o)return o;if(s!==!1)return Math.min(l||vn,Math.max(2,Math.floor(i/70)))}function _f(t,e=!0){var n,r,i,o;const{axis:s,config:l,scale:c}=t,u=c.subX,f=((n=t.getTargetsToShow)==null?void 0:n.call(t))||t.filterTargetsToShow(),d=zn(l,"x","count","subchart_axis_x"),h=t0(t),m=(C,w=!1)=>e?kl(t,C,w,"subchart_axis_x",h):C;if(!u||!(f!=null&&f.length))return[];const S=qo(zn(l,"x","values","subchart_axis_x"),t.api);if(S)return m($l(t,S));if(l.axis_x_tick_fit&&t.mapTargetsToUniqueXs){const C=zl(t,t.mapTargetsToUniqueXs(f),d,(r=s==null?void 0:s.isTimeSeries)==null?void 0:r.call(s));return m(C,!0)}if((i=s==null?void 0:s.isCategorized)!=null&&i.call(s)&&((o=l.axis_x_categories)!=null&&o.length))return m(l.axis_x_categories.map((C,w)=>w),!0);const E=Fa(u,d||vn);return m(E,!0)}function qf(t,e=tr(t),n=t.config.axis_x_tick_outer){var r,i;const o=e,s=((r=o.orgDomain)==null?void 0:r.call(o))||((i=o.domain)==null?void 0:i.call(o));if(!(s!=null&&s.length))return[];const l=+s[0],c=+s[s.length-1];if(!Number.isFinite(l)||!Number.isFinite(c))return[];const u=Math.ceil(Math.min(l,c)),f=Math.floor(Math.max(l,c)),d=Array.from({length:Math.max(0,f-u+1)},(h,m)=>u+m);return n?d.slice(1,-1):d}function Ul(t,e,n=tr(t)){var r,i,o,s,l;const c=n,u=Jr(t,e);if((i=(r=t.axis)==null?void 0:r.isCategorized)!=null&&i.call(r)){const f=(o=c.orgScale)==null?void 0:o.call(c);if(f)return f(u);const d=((l=(s=t.axis.x)==null?void 0:s.tickOffset)==null?void 0:l.call(s))||(c(1)-c(0))/2;return c(u)-d}return c(u)}function td(t,e,n,r=tr(t)){if(e.length<2)return!1;const i=Math.max(1,n)/2,o=e.map(l=>Ul(t,l,r)).filter(Number.isFinite).sort((l,c)=>l-c);if(o.length<2)return!1;let s=o[0]+i;for(let l=1;l<o.length;l++){const c=o[l]-i,u=o[l]+i;if(c<=s+Va)return!0;s=Math.max(s,u)}return!1}function es(t,e,n=tr(t)){const r=new Set;return e.filter(i=>{const o=Ul(t,i,n),s=Math.round(o);return!Number.isFinite(o)||r.has(s)?!1:(r.add(s),!0)})}function e0(t,e,n=1){var r;const{axis:i,config:o}=t;if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const l=qf(t);return es(t,l)}if(o.axis_x_tick_culling===!1||o.axis_x_tick_culling_lines===!1)return e;const s=ts(t,!1);return td(t,s,n)?e:es(t,s)}function n0(t,e,n=1){var r;const{axis:i,config:o,scale:s}=t,l=s.subX,c=zn(o,"x","culling","subchart_axis_x"),u=zn(o,"x","culling_lines","subchart_axis_x"),f=zn(o,"x","outer","subchart_axis_x");if(!l)return[];if((r=i==null?void 0:i.isCategorized)!=null&&r.call(i)){const h=qf(t,l,f);return es(t,h,l)}if(c===!1||u===!1)return e;const d=_f(t,!1);return td(t,d,n,l)?e:es(t,d,l)}function Vi(t,e="y",n,r=!0,i=t.scale[e],o=`axis_${e}`){var s,l,c;const{axis:u,config:f}=t,d=`axis_${e}`,h=qo(zn(f,e,"values",o),t.api),m=C=>r?o0(t,e,C,o):C;if(h)return m(Kf(t,h,e));const S=qy(i.domain(),f[`${d}_tick_stepSize`]);if(S.length)return m(S);const E=n!=null?n:zn(f,e,"count",o);if((s=u==null?void 0:u.isTimeSeries)!=null&&s.call(u,e)&&f[`${d}_tick_time_value`])return m(Fa(i,f[`${d}_tick_time_value`]));if((l=u==null?void 0:u.isLog)!=null&&l.call(u,e))return m(Zf(i,E));if(E){const C=i.domain();return m(zl(t,C,C.every(w=>w===0)?1:E,(c=u==null?void 0:u.isTimeSeries)==null?void 0:c.call(u,e)))}return m(Fa(i,vn))}function r0(t,e,n){const r=e==="x"?tr(t):t.scale[e],i=r!=null&&r.copy?r.copy():r;return n.domain&&(i!=null&&i.domain)&&i.domain(n.domain),i}function a0(t,e,n,r){var i,o,s;const l=r.tick||{},c=qo(l.values,t.api);return c?e==="x"?$l(t,c):Kf(t,c,e):e!=="x"&&((o=(i=t.axis)==null?void 0:i.isLog)!=null&&o.call(i,e))?Zf(n,l.count):Fa(n,(s=l.count)!=null?s:vn)}function i0(t,e){var n;const r=(n=e.tick)==null?void 0:n.format;return typeof r=="function"?r.bind(t.api):(i=>i)}function ns(t,e){const n=t.length-1;if(e&&n>e){const r=t.length-1;return e<=1?[t[0]]:Array.from({length:e},(i,o)=>t[Math.round(o*r/(e-1))])}return t}function o0(t,e,n,r=`axis_${e}`){const{config:i}=t;if(!zn(i,e,"culling",r))return n;const s=zn(i,e,"culling_max",r)||vn,l=zn(i,e,"culling_reverse",r),c=n.slice().sort((h,m)=>{const S=+h,E=+m,C=Number.isFinite(S)&&Number.isFinite(E)?S-E:String(h).localeCompare(String(m));return l?-C:C}),u=c.length;let f=0;for(let h=1;h<u;h++)if(u/h<s){f=h;break}if(!f)return n;const d=new Set(c.filter((h,m)=>m%f===0));return n.filter(h=>d.has(h))}function kl(t,e,n=!1,r="axis_x",i){const{config:o}=t;if(zn(o,"x","culling",r)===!1)return e;const l=i||zn(o,"x","culling_max",r)||vn,c=zn(o,"x","culling_reverse",r),u=n?e:e.slice().sort((m,S)=>{const E=+m,C=+S;return Number.isFinite(E)&&Number.isFinite(C)?c?C-E:E-C:c?String(S).localeCompare(String(m)):String(m).localeCompare(String(S))}),f=u.length;let d=0;for(let m=1;m<f;m++)if(f/m<l){d=m;break}if(!d)return e;if(n)return e.filter((m,S)=>c?(f-1-S)%d===0:S%d===0);const h=new Set(u.filter((m,S)=>S%d===0));return e.filter(m=>h.has(m))}function Gl(t){const{config:e,state:{height:n,width:r}}=t,i=e.axis_rotated?n:r;if(e.axis_x_tick_count)return e.axis_x_tick_count;if(e.axis_x_tick_culling!==!1)return Math.min(e.axis_x_tick_culling_max||vn,Math.max(2,Math.floor(i/70)))}function s0(t){var e,n;const{axis:r,config:i}=t,o=(n=(e=r==null?void 0:r.y)==null?void 0:e.getGeneratedTicks)==null?void 0:n.call(e,i.grid_y_ticks);return o!=null&&o.length?o:i.grid_y_ticks?ns(Vi(t,"y",void 0,!1),i.grid_y_ticks):Vi(t,"y",void 0,!1)}var l0=Object.defineProperty,c0=(t,e,n)=>e in t?l0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,u0=(t,e,n)=>c0(t,typeof e!="symbol"?e+"":e,n);class ed{constructor(e){u0(this,"ctx",e)}get context(){return this.ctx}withContext(e,n){const r=this.ctx;this.ctx=e;try{n()}finally{this.ctx=r}}withState(e){const{ctx:n}=this;n.save();try{e(n)}finally{n.restore()}}withTranslation(e,n,r){this.withState(i=>{i.translate(e,n),r(i)})}clipRect(e,n){this.withState(r=>{r.beginPath(),r.rect(e.x,e.y,e.w,e.h),r.clip(),n(r)})}measureText(e){return this.ctx.measureText(e)}traceLine(e,n,r,i){const{ctx:o}=this;o.moveTo(e,n),o.lineTo(r,i)}traceCrispLine(e,n,r,i,o){this.traceLine(this.crisp(e,o),this.crisp(n,o),this.crisp(r,o),this.crisp(i,o))}traceCircle(e,n,r){this.ctx.moveTo(e+r,n),this.ctx.arc(e,n,r,0,Math.PI*2)}strokePath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.stroke()})}fillPath(e,n){this.withStyle(n,r=>{r.beginPath(),e(r),r.fill()})}fillRect(e,n){this.withStyle(n,r=>{r.fillRect(e.x,e.y,e.w,e.h)})}fillRoundRect(e,n=0,r){const i=this.normalizeRect(e),o=this.getRectRadii(i,n);if(!o.tl&&!o.tr&&!o.br&&!o.bl){this.fillRect(i,r);return}this.fillPath(s=>{this.traceRoundRect(s,i,o)},r)}strokeRoundRect(e,n=0,r){const i=this.normalizeRect(e),o=this.getRectRadii(i,n);if(!o.tl&&!o.tr&&!o.br&&!o.bl){this.strokeRect(i,r);return}this.strokePath(s=>{this.traceRoundRect(s,i,o)},r)}strokeRect(e,n){this.withStyle(n,r=>{r.strokeRect(e.x,e.y,e.w,e.h)})}text(e,n,r,i){const o=(l,c,u)=>{(i==null?void 0:i.maxWidth)===void 0?l.fillText(e,c,u):l.fillText(e,c,u,i.maxWidth)},s=l=>{i!=null&&i.angle?(l.translate(n,r),l.rotate(i.angle*Math.PI/180),o(l,0,0)):o(l,n,r)};i!=null&&i.angle?this.withState(l=>{this.applyStyle(i),s(l)}):this.withStyle(i,s)}textLines(e,n,r,i){this.withState(o=>{const s=e.split(`
|
|
32
|
+
`),l=Sr((i==null?void 0:i.font)||o.font),c=s.length>1?-((s.length-1)*l):0;this.applyStyle(i),o.translate(n,r),i!=null&&i.angle&&o.rotate(i.angle*Math.PI/180),s.forEach((u,f)=>{const d=c+f*l;(i==null?void 0:i.maxWidth)===void 0?o.fillText(u,0,d):o.fillText(u,0,d,i.maxWidth)})})}point(e,n,r,i,o){this.withStyle(o,s=>{const l=!(o!=null&&o.stroke)||o.fill!==void 0,c=(o==null?void 0:o.stroke)!==void 0;if(e==="rectangle"){const u=i*2,f={x:n-i,y:r-i,w:u,h:u};l&&s.fillRect(f.x,f.y,f.w,f.h),c&&s.strokeRect(f.x,f.y,f.w,f.h)}else s.beginPath(),s.arc(n,r,i,0,Math.PI*2),l&&s.fill(),c&&s.stroke()})}getRectRadii(e,n){const r=typeof n=="number"?{tl:n,tr:n,br:n,bl:n}:{tl:n.tl||0,tr:n.tr||0,br:n.br||0,bl:n.bl||0},i=Math.max(0,Math.min(Math.abs(e.w),Math.abs(e.h))/2);return{tl:Math.max(0,Math.min(r.tl,i)),tr:Math.max(0,Math.min(r.tr,i)),br:Math.max(0,Math.min(r.br,i)),bl:Math.max(0,Math.min(r.bl,i))}}traceRoundRect(e,n,r){const{x:i,y:o,w:s,h:l}=n,c=i+s,u=o+l;e.moveTo(i+r.tl,o),e.lineTo(c-r.tr,o),r.tr?e.quadraticCurveTo(c,o,c,o+r.tr):e.lineTo(c,o),e.lineTo(c,u-r.br),r.br?e.quadraticCurveTo(c,u,c-r.br,u):e.lineTo(c,u),e.lineTo(i+r.bl,u),r.bl?e.quadraticCurveTo(i,u,i,u-r.bl):e.lineTo(i,u),e.lineTo(i,o+r.tl),r.tl?e.quadraticCurveTo(i,o,i+r.tl,o):e.lineTo(i,o),e.closePath()}normalizeRect(e){const n=e.w<0?e.x+e.w:e.x,r=e.h<0?e.y+e.h:e.y;return{x:n,y:r,w:Math.abs(e.w),h:Math.abs(e.h)}}applyStyle(e){if(!e)return;const{ctx:n}=this;e.fill!==void 0&&(n.fillStyle=e.fill),e.stroke!==void 0&&(n.strokeStyle=e.stroke),e.lineWidth!==void 0&&(n.lineWidth=e.lineWidth),e.alpha!==void 0&&(n.globalAlpha=e.alpha),e.font!==void 0&&(n.font=e.font),e.textAlign!==void 0&&(n.textAlign=e.textAlign),e.textBaseline!==void 0&&(n.textBaseline=e.textBaseline),e.lineDash!==void 0&&n.setLineDash(e.lineDash)}withStyle(e,n){e?this.withState(r=>{this.applyStyle(e),n(r)}):n(this.ctx)}crisp(e,n){return n%2?Math.round(e)+.5:Math.round(e)}}var f0=Object.defineProperty,d0=Object.defineProperties,h0=Object.getOwnPropertyDescriptors,nd=Object.getOwnPropertySymbols,g0=Object.prototype.hasOwnProperty,v0=Object.prototype.propertyIsEnumerable,Xl=(t,e,n)=>e in t?f0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rd=(t,e)=>{for(var n in e||(e={}))g0.call(e,n)&&Xl(t,n,e[n]);if(nd)for(var n of nd(e))v0.call(e,n)&&Xl(t,n,e[n]);return t},ad=(t,e)=>d0(t,h0(e)),Wl=(t,e,n)=>Xl(t,typeof e!="symbol"?e+"":e,n);const id=20,od=15;function Vl(t){return t?-1:1}function p0(t,e){return t?e?-1:1:e?1:-1}function m0(t,e){var n,r,i;const o=e==="y2"?"subY2":"subY",s=(i=(r=(n=t.axis)==null?void 0:n[o])==null?void 0:r.tickFormat)==null?void 0:i.call(r),l=t.config[`subchart_axis_${e}_tick_format`]||t.config[`axis_${e}_tick_format`];return s||(typeof l=="function"?l.bind(t.api):(c=>c))}function x0(t){return t?{stroke:t.lineColor,lineWidth:t.lineWidth,lineDash:t.dashArray}:void 0}function y0(t){return t?{fill:t.labelColor,font:t.labelFont}:void 0}function jl(t,e,n){return{x:t.left-id,y:0,w:e+id*2,h:n}}function Hl(t,e,n){return{x:0,y:t.top-od,w:e,h:n+od*2}}function T0(t,e){var n,r;const i=(r=(n=t.config.axis_tooltip)==null?void 0:n.backgroundColor)!=null?r:"black";return typeof i=="string"?i:(i==null?void 0:i[e])||null}function b0(t,e,n){var r,i;const o=t.scale[e];if(!(o!=null&&o.invert))return null;const s=o.invert(n);if(s==null)return null;if(e==="x"&&((i=(r=t.axis)==null?void 0:r.isTimeSeries)!=null&&i.call(r)))return t.format.xAxisTick(s);const l=Number(s);return Number.isFinite(l)?l.toFixed(2):`${s}`}function S0(t,e){const{config:n,state:{height:r,margin:i,width:o}}=t,s=n.axis_rotated,l={x:i.left,y:i.top};return e==="x"?!s&&(l.y+=r):e==="y"?s&&(l.y+=r):s?l.y-=1:l.x+=o,l}function A0(t,e,n,r){return r?{x:t.x+n,y:t.y-e}:{x:t.x+e,y:t.y+n}}function sd(t,e){const n=t?t(e):e;return n==null?"":String(n)}function ji(t,e){return t[`${e}TickFont`]||t.labelFont}function Yl(t,e){const n=t.measureText("0"),r=(n.fontBoundingBoxAscent||0)+(n.fontBoundingBoxDescent||0),i=(n.actualBoundingBoxAscent||0)+(n.actualBoundingBoxDescent||0),o=(e||10)*(11.5/10);return Math.max(e,r,i,o)}function E0(t){return 11.5-2.5*(t/15)*(t>0?1:-1)}function C0(t){return 8*Math.sin(Math.PI*(t/180))}function Kl(t,e){if(typeof t=="number")return t;if(typeof t=="string"){const n=parseFloat(t);return Number.isFinite(n)?/em$/.test(t.trim())?n*e:n:0}return 0}function I0(t,e,n){if(!e)return[t];const r=n.measureText("0").width||5.5;function i(o,s){let l;for(let c=1;c<s.length;c++)if(s.charAt(c)===" "&&(l=c),e<r*(c+1)){const u=l||c;return i(o.concat(s.slice(0,u)),s.slice(l?l+1:c))}return o.concat(s)}return i([],t)}function Zl(t,e,n,r){var i,o;const s=t.config.axis_x_tick_width;if(s&&s>0)return s;if(n)return 95;if((o=(i=t.axis)==null?void 0:i.isCategorized)!=null&&o.call(i)&&e.length>1){const l=r(Jr(t,e[0])),c=r(Jr(t,e[1]));return Math.max(0,Math.abs(c-l)-12)}return 110}function ld(t,e,n,r,i=[],o=!1,s=tr(t),l){const c=n?n(r):r;if(c==null)return[""];if(Array.isArray(c))return c.map(f=>String(f));const u=String(c);return u.indexOf(`
|
|
33
33
|
`)>-1?u.split(`
|
|
34
|
-
`):t.config.axis_x_tick_multiline?
|
|
35
|
-
`),f=Tr(s.font),d=f*1.5,{x:h,align:m}=t0(l.title_position,c.width),A=(r=(n=e.getCanvasTitleHeight)==null?void 0:n.call(e))!=null?r:f,I=(l.title_padding.top||0)+A;o.withState(()=>{i.font=s.font,i.fillStyle=s.color,i.textAlign=m,i.textBaseline="alphabetic",u.forEach((C,P)=>{i.fillText(C,h,I+(P?f+(P-1)*d:0))})})}drawAxisLabels(e){const{ctx:n,painter:r,theme:{style:{axis:i}}}=this,{axis:o,config:s}=e,l=Tr(i.labelFont),c=["x","y","y2"],u={x:i.xLabelColor,y:i.yLabelColor,y2:i.y2LabelColor},f={start:"left",middle:"center",end:"right"};o&&r.withState(()=>{n.font=i.labelFont,n.textBaseline="alphabetic",c.forEach(d=>{const h=o.getLabelText(d);if(!h||!s[`axis_${d}_show`]||d==="y2"&&!e.scale.y2)return;const m=d==="x"&&s.axis_rotated||d!=="x"&&!s.axis_rotated,A=Zy(e,d),I=o.xForAxisLabel(d)+zl(o.dxForAxisLabel(d),l),C=zl(o.dyForAxisLabel(d),l),{x:P,y:z}=Jy(A,I,C,m),N=o.textAnchorForAxisLabel(d);n.fillStyle=u[d]||i.labelColor,n.textAlign=f[N]||"center",r.text(String(h),P,z,{angle:m?-90:0})})})}drawGrid(e){const{ctx:n,painter:r,theme:{style:{grid:i}}}=this,{config:o,scale:s,state:{height:l,margin:c,width:u}}=e;if(!i.lineColor)return;const f=o.axis_rotated,d=c.left,h=c.left+u,m=c.top,A=c.top+l;r.withState(()=>{n.strokeStyle=i.lineColor,n.lineWidth=i.lineWidth,i.dashArray.length&&n.setLineDash(i.dashArray),o.grid_x_show&&s.x&&r.strokePath(()=>{for(const I of Ko(e)){const C=Gl(e,I);fa(C)&&(f?r.traceCrispLine(d,c.top+C,h,c.top+C,i.lineWidth):r.traceCrispLine(c.left+C,m,c.left+C,A,i.lineWidth))}}),o.grid_y_show&&s.y&&r.strokePath(()=>{for(const I of Ny(e)){const C=$i(e,I),P=s.y(C);fa(P)&&(f?r.traceCrispLine(c.left+P,m,c.left+P,A,i.lineWidth):r.traceCrispLine(d,c.top+P,h,c.top+P,i.lineWidth))}}),!o.grid_lines_front&&this.drawGridLines(e)})}drawRegions(e){const{ctx:n,painter:r,theme:{style:{region:i}}}=this,{config:o,state:{height:s,margin:l,width:c}}=e,u=o.regions||[];u.length&&r.clipRect({x:l.left,y:l.top,w:c,h:s},()=>{var f;n.fillStyle=i.fill,n.font=i.labelFont,n.textBaseline="top";for(const d of u){const h=a0(e,d);if(!h||!fa(h.x)||!fa(h.y)||!h.w||!h.h)continue;const m=l.left+h.x,A=l.top+h.y,I=h.w,C=h.h;if(n.globalAlpha=Number.isFinite(d.opacity)?d.opacity:i.opacity,r.fillRect({x:m,y:A,w:I,h:C}),(f=d.label)!=null&&f.text){const P=d.label,z=P.center||"",N=String(P.text),B=r.measureText(N).width,W=parseFloat(n.font)||12;let V=m+(P.x||0),J=A+(P.y||0);z.indexOf("x")>-1&&(V+=(I-B)/2),z.indexOf("y")>-1&&(J+=(C-W)/2),r.text(N,V,J,{angle:P.rotated?-90:0,alpha:1,fill:P.color||i.labelColor})}}})}drawGridLines(e){const{ctx:n,painter:r,theme:{style:{axis:i,grid:o}}}=this,{config:s,scale:l,state:{height:c,margin:u,width:f}}=e,d=s.axis_rotated,h=u.left,m=u.left+f,A=u.top,I=u.top+c;o.lineColor&&r.withState(()=>{n.strokeStyle=o.lineColor,n.lineWidth=o.lineWidth,n.font=o.labelFont||i.labelFont,n.fillStyle=o.labelColor,n.textBaseline="middle",n.setLineDash([]);const C=(N,B,W,V=!1)=>{N&&r.text(N,B,W,{angle:V?-90:0})},P=N=>{if(N.value===void 0||!l.x)return;const B=Gl(e,N.value);if(fa(B))if(d){const W=u.top+B;r.strokePath(()=>{r.traceLine(h,W,m,W)}),n.textAlign=N.position==="start"?"left":N.position==="middle"?"center":"right",C(N.text,Qf(N.position,h,m),W-5)}else{const W=u.left+B;r.strokePath(()=>{r.traceLine(W,A,W,I)}),n.textAlign=N.position==="start"?"left":N.position==="middle"?"center":"right",C(N.text,W-5,_f(N.position,A,I),!0)}},z=N=>{const B=N.axis==="y2"?l.y2:l.y,W=N.axis==="y2"?"y2":"y";if(N.value===void 0||!B)return;const V=$i(e,N.value,W),J=B(V);if(fa(J))if(d){const q=u.left+J;r.strokePath(()=>{r.traceLine(q,A,q,I)}),n.textAlign=N.position==="start"?"left":N.position==="middle"?"center":"right",C(N.text,q-5,_f(N.position,A,I),!0)}else{const q=u.top+J;r.strokePath(()=>{r.traceLine(h,q,m,q)}),n.textAlign=N.position==="start"?"left":N.position==="middle"?"center":"right",C(N.text,Qf(N.position,h,m),q-5)}};(s.grid_x_lines||[]).forEach(P),(s.grid_y_lines||[]).forEach(z)})}drawAdditionalAxes(e){["x","y","y2"].forEach(n=>{const r=e.config[`axis_${n}_axes`]||[];!r.length||!e.scale[n]||!e.config[`axis_${n}_show`]||r.forEach((i,o)=>{var s;const l=My(e,n,i);if(!l)return;const c={scale:l,ticks:Ly(e,n,l,i),format:Dy(e,i),index:o+1,outerTick:((s=i.tick)==null?void 0:s.outer)!==!1};n==="x"?this.drawXAxis(e,c):this.drawYAxis(e,n,c)})})}drawXAxis(e,n){var r;const{ctx:i,painter:o,theme:{style:{axis:s}}}=this,{axis:l,config:c,state:{current:u,margin:f,width:d,height:h}}=e,m=c.axis_rotated,A=n!=null&&n.index?e.getAxisSize("x")*n.index:0,I=(n==null?void 0:n.scale)||cr(e),C=o.crisp(f.left-(m?A:0),s.lineWidth),P=o.crisp(f.top+h+(m?0:A),s.lineWidth),z=f.left,N=f.left+d,B=f.top,W=f.top+h,V=m?B:z,J=m?W:N,q=(n==null?void 0:n.ticks)||Ko(e),at=(n==null?void 0:n.ticks)||Py(e,q,s.tickWidth),et=(n==null?void 0:n.format)||l.getXAxisTickFormat(),ot=n?n.outerTick:c.axis_x_tick_outer,lt=m?c.axis_x_tick_inner?1:-1:c.axis_x_tick_inner?-1:1,ft=Kf(m),_=Fl(m),dt=c.axis_x_tick_text_position,ut=m?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0;o.clipRect(m?$l(f,u.width,h):Nl(f,d,u.height),()=>{if(i.strokeStyle=s.lineColor,i.lineWidth=s.lineWidth,o.strokePath(()=>{m?o.traceLine(C,B,C,W):o.traceLine(z,P,N,P),ot&&(m?(o.traceLine(C,B,C+Dt*ft,B),o.traceLine(C,W,C+Dt*ft,W)):(o.traceLine(z,P,z,P+Dt*ft),o.traceLine(N,P,N,P+Dt*ft)))}),i.font=Ui(s,"x"),i.fillStyle=s.labelColor,i.textAlign=m?_>0?"left":"right":"center",i.textBaseline=m?"middle":_>0?"top":"bottom",i.strokeStyle=s.tickColor,i.lineWidth=s.tickWidth,c.axis_x_tick_show&&o.strokePath(()=>{for(const Et of at){const Zt=Pl(e,Et,I),fe=f.left+Zt,me=f.top+Zt;Xl(m?me:fe,V,J)&&(m?o.traceLine(C,me,C+Dt*lt,me):o.traceLine(fe,P,fe,P+Dt*lt))}}),!n&&!c.axis_x_tick_text_show)return;const xt=Ui(s,"x"),bt=Bl(o,Tr(xt)),Rt=Ul(e,q,m,I);q.forEach((Et,Zt)=>{this.drawXAxisTickText(e,Et,et,s.labelColor,{isRotated:m,rangeEnd:J,rangeStart:V,tickCount:q.length,tickFont:xt,tickIndex:Zt,tickLineHeight:bt,tickTextDirection:_,tickTextWidth:Rt,tickRotate:ut,tickTextPosition:dt,targetScale:I,ticks:q,x:C,y:P})})})}drawFocusedXAxisTick(e,n){var r;const{painter:i,theme:{style:{axis:o}}}=this,{axis:s,config:l,state:{current:c,margin:u,width:f,height:d}}=e,h=(r=n==null?void 0:n[0])==null?void 0:r.x;if(h===void 0||!s||!l.axis_x_show||!l.axis_x_tick_text_show||!o.activeLabelColor||o.activeLabelColor===o.labelColor)return;const m=Ko(e),A=m.findIndex(J=>Bi(J,h)),I=m[A];if(I===void 0)return;const C=l.axis_rotated,P=i.crisp(u.left,o.lineWidth),z=i.crisp(u.top+d,o.lineWidth),N=C?u.top:u.left,B=C?u.top+d:u.left+f,W=s.getXAxisTickFormat(),V=Fl(C);i.clipRect(C?$l(u,c.width,d):Nl(u,f,c.height),()=>{var J;this.drawXAxisTickText(e,I,W,o.activeLabelColor,{isRotated:C,rangeEnd:B,rangeStart:N,targetScale:cr(e),tickCount:m.length,tickIndex:A,tickTextDirection:V,tickRotate:C?0:((J=e.getAxisTickRotate)==null?void 0:J.call(e,"x"))||0,tickTextPosition:l.axis_x_tick_text_position,ticks:m,x:P,y:z})})}drawAxisTooltip(e,n){const{ctx:r,painter:i,theme:{style:{axis:o,grid:s}}}=this,{config:l,state:{margin:c,width:u,height:f}}=e;if(!l.axis_tooltip||!n)return;const d=l.axis_rotated,h=n[0]-c.left,m=n[1]-c.top,A=h>=0&&h<=u,I=m>=0&&m<=f;if(!A&&!I)return;const C=c.left+h,P=c.top+m,z=Tr(o.labelFont),N=z||10,B=(W,V,J,q,at)=>{const et=Yy(e,W),ot=et&&Ky(e,W,V);if(!ot)return;r.font=o.labelFont,r.textAlign=at,r.textBaseline="alphabetic";const lt=r.measureText(ot),ft=lt.width,_=lt.actualBoundingBoxAscent||N*.8,dt=lt.actualBoundingBoxDescent||N*.2,ut=Math.max(2,ft*.15),xt=Math.max(3,N*.25),bt=at==="right"?J-ft:at==="center"?J-ft/2:J,Rt=q-_;r.fillStyle=et,r.fillRect(bt-ut,Rt-xt,ft+ut*2,_+dt+xt*2),r.fillStyle="#fff",r.fillText(ot,J,q)};i.withState(()=>{r.strokeStyle=s.lineColor,r.lineWidth=s.lineWidth,r.setLineDash([]),i.strokePath(()=>{A&&i.traceLine(C,c.top,C,c.top+f),I&&i.traceLine(c.left,P,c.left+u,P)}),r.setLineDash([]),d?(I&&l.axis_x_show&&B("x",m,c.left-z*.3,P+z*.4,"right"),A&&l.axis_y_show&&B("y",h,C-z*1.3,c.top+f+z*1.15,"left"),A&&l.axis_y2_show&&e.scale.y2&&B("y2",h,C-z*1.3,c.top-z*.4,"left")):(A&&l.axis_x_show&&B("x",h,C-z,c.top+f+z*1.15,"left"),I&&l.axis_y_show&&B("y",m,c.left-z*.4,P+z*.3,"right"),I&&l.axis_y2_show&&e.scale.y2&&B("y2",m,c.left+u+z*.4,P+z*.3,"left"))})}drawXAxisTickText(e,n,r,i,o){var s,l;const{ctx:c,painter:u,theme:{style:{axis:f}}}=this,{state:{margin:d}}=e,{isRotated:h,rangeEnd:m,rangeStart:A,tickTextDirection:I,tickRotate:C,tickTextPosition:P,targetScale:z,ticks:N,x:B,y:W}=o,V=Gl(e,n,z),J=d.left+V,q=d.top+V;if(!Xl(h?q:J,A,m))return;const et=(s=o.tickFont)!=null?s:Ui(f,"x");c.font=et,c.fillStyle=i;const ot=Yf(e,u,r,n,N,h,z,o.tickTextWidth),lt=(l=o.tickLineHeight)!=null?l:Bl(u,Tr(et));let ft,_;if(h)ft=B+(Dt+on)*I+(P.x||0),_=q+(P.y||0),c.textAlign=kl(e,o),c.textBaseline="middle";else if(C){const dt=Tr(et),ut=P.y?zl(P.y,dt):.71*dt,xt=_y(C)+(P.x||0),bt=Qy(C)+ut;c.textAlign=kl(e,o),c.textBaseline="alphabetic",u.withState(Rt=>{Rt.translate(J,W),Rt.rotate(C*Math.PI/180),ot.forEach((Et,Zt)=>{Rt.fillText(Et,xt,bt+Zt*lt)})});return}else ft=J+(P.x||0),_=W+(Dt+on)*I+(P.y||0),c.textAlign=kl(e,o),c.textBaseline=I>0?"top":"bottom";u.withState(dt=>{dt.translate(ft,_),C&&dt.rotate(C*Math.PI/180),ot.forEach((ut,xt)=>{dt.fillText(ut,0,xt*lt)})})}drawYAxis(e,n="y",r){var i,o,s,l;const{ctx:c,painter:u,theme:{style:{axis:f}}}=this,{config:d,scale:h,state:{margin:m,width:A,height:I}}=e,C=`axis_${n}`,P=(r==null?void 0:r.scale)||h[n],z=n==="y2",N=d.axis_rotated,B=r!=null&&r.index?e.getAxisSize(n)*r.index:0,W=u.crisp(m.left+(z?A+(N?0:B):-B),f.lineWidth),V=u.crisp(m.top+(N?z?-B-1:I+B:0),f.lineWidth),J=m.left,q=m.left+A,at=m.top,et=m.top+I,ot=(r==null?void 0:r.ticks)||Zo(e,n),lt=(r==null?void 0:r.ticks)||(d[`${C}_tick_culling`]&&d[`${C}_tick_culling_lines`]!==!1?Zo(e,n,void 0,!1):ot),ft=(r==null?void 0:r.format)||((s=(o=(i=e.axis)==null?void 0:i[n])==null?void 0:o.tickFormat)==null?void 0:s.call(o))||((l=d[`${C}_tick_format`])==null?void 0:l.bind(e.api))||(Rt=>Rt),_=r?r.outerTick:d[`${C}_tick_outer`],dt=N?z?d.axis_y2_tick_inner?1:-1:d.axis_y_tick_inner?-1:1:z?d.axis_y2_tick_inner?-1:1:d.axis_y_tick_inner?1:-1,ut=e0(d,N,z),xt=Hy(N,z),bt=d[`${C}_tick_text_position`];u.withState(()=>{c.strokeStyle=f.lineColor,c.lineWidth=f.lineWidth,u.strokePath(()=>{N?u.traceLine(J,V,q,V):u.traceLine(W,at,W,et),_&&(N?(u.traceLine(J,V,J,V+Dt*ut),u.traceLine(q,V,q,V+Dt*ut)):(u.traceLine(W,at,W+Dt*ut,at),u.traceLine(W,et,W+Dt*ut,et)))});const Rt=Ui(f,n);c.font=Rt,c.fillStyle=f.labelColor,c.textAlign=N?"center":xt>0?"left":"right",c.textBaseline=N?xt>0?"top":"bottom":"middle",c.strokeStyle=f.tickColor,c.lineWidth=f.tickWidth;const Et=[],Zt=[],fe=(me,xe)=>{const Te=$i(e,me,n),Fe=m.left+P(Te),Ie=m.top+P(Te);fa(N?Fe:Ie)&&xe.push({tick:me,tx:Fe,ty:Ie})};for(const me of ot)fe(me,Et);for(const me of lt)fe(me,Zt);if((r||d[`${C}_tick_show`])&&u.strokePath(()=>{for(const{tx:me,ty:xe}of Zt)N?u.traceLine(me,V,me,V+Dt*dt):u.traceLine(W,xe,W+Dt*dt,xe)}),r||d[`${C}_tick_text_show`])for(const{tick:me,tx:xe,ty:Te}of Et)N?u.text(Hf(ft,me),xe+(bt.x||0),V+Dt*xt+(bt.y||0)):u.text(Hf(ft,me),W+(Dt+on)*xt+(bt.x||0),Te+(bt.y||0))})}}const ur={canvas:"bb-canvas",overlay:"bb-canvas-overlay",legend:"bb-canvas-legend",legendBottom:"bb-canvas-legend-bottom",legendInset:"bb-canvas-legend-inset",legendItemInteractive:"bb-legend-item-interactive",legendItemTileCircle:"bb-legend-item-tile-circle",legendItemTitle:"bb-legend-item-title",legendRight:"bb-canvas-legend-right"};var GR=ur,o0=Object.defineProperty,s0=(t,e,n)=>e in t?o0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qa=(t,e,n)=>s0(t,typeof e!="symbol"?e+"":e,n);class l0{constructor(){qa(this,"canvas"),qa(this,"ctx"),qa(this,"dpr",1),qa(this,"frame",null),qa(this,"frameCtx",null),qa(this,"frameValid",!1)}init(e,n,r){this.canvas=He.createElement("canvas"),this.canvas.className=ur.canvas,this.canvas.style.display="block",e.appendChild(this.canvas),this.dpr=ce.devicePixelRatio||1,this.ctx=this.canvas.getContext("2d"),this.resize(n,r)}resize(e,n){const r=Math.max(0,e),i=Math.max(0,n);this.dpr=ce.devicePixelRatio||1,this.canvas.width=r*this.dpr,this.canvas.height=i*this.dpr,this.canvas.style.width=`${r}px`,this.canvas.style.height=`${i}px`,this.ctx.setTransform(this.dpr,0,0,this.dpr,0,0),this.frame=null,this.frameCtx=null,this.frameValid=!1}clearOverlay(){this.frameValid&&this.restoreFrame()}withOverlay(e){const{ctx:n}=this;this.frameValid?this.clearOverlay():this.captureFrame(),n.save(),n.setTransform(this.dpr,0,0,this.dpr,0,0);try{e(n)}finally{n.restore()}}beginFrame(e,n){const{ctx:r}=this;this.frameValid=!1,r.save(),r.setTransform(this.dpr,0,0,this.dpr,0,0),r.clearRect(0,0,e,n)}endFrame(){this.ctx.restore()}captureFrame(){const{canvas:e}=this;if(this.frameValid=!1,e.width&&e.height){let{frame:n,frameCtx:r}=this;if(!n){const i=He.createElement("canvas");n=i,r=i.getContext("2d"),this.frame=n,this.frameCtx=r}if(!n||!r)return;r.setTransform(1,0,0,1,0,0),n.width!==e.width||n.height!==e.height?(n.width=e.width,n.height=e.height):r.clearRect(0,0,e.width,e.height),r.drawImage(e,0,0),this.frameValid=!0}}restoreFrame(){if(!this.frameValid||!this.frame||!this.frameCtx)return;const{canvas:e,ctx:n}=this;n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,e.width,e.height),n.drawImage(this.frame,0,0),n.restore(),n.setTransform(this.dpr,0,0,this.dpr,0,0)}destroy(){var e;(e=this.canvas)==null||e.remove(),this.frame=null,this.frameCtx=null,this.frameValid=!1}}function Wl(t){const{bar_radius:e,bar_radius_ratio:n}=t.config;return ge(e)&&e>0?()=>e:ge(n)?r=>r*n:null}function Vl(t){const{config:e,data:n}=t,r=new Set;if(!e.data_groups.length)return r;const i=t.orderTargets(t.filterTargetsToShow(n.targets.filter(t.isBarType,t)));for(const o of e.data_groups){const s=new Set(o),l=new Map,c=new Map;for(const u of i)if(s.has(u.id))for(const f of u.values)f.value===null||f.value===0||(f.value>0?l:c).set(f.index,u.id);for(const[u,f]of l)r.add(`${f}:${u}`);for(const[u,f]of c)r.add(`${f}:${u}`)}return r}function c0(t,e,n){return n?t?e?{tl:n,bl:n}:{tr:n,br:n}:e?{br:n,bl:n}:{tl:n,tr:n}:0}function u0(t,e,n,r){let i="";return n?r&&t[0]<e?i=`0 ${e-t[0]}px 0 0`:!r&&t[0]>e&&(i=`0 0 0 ${t[0]-e}px`):r&&t[1]>e?i=`${t[1]-e}px 0 0 0`:!r&&t[1]<e&&(i=`0 0 ${e-t[1]}px 0`),i?`inset(${i})`:null}function jl(t,e,n,r,i,o){const{config:s,state:l}=t,c=s.axis_rotated,u=+c,f=+!u,d=e.value<0,h=s[`axis_${t.axis.getId(e.id)}_inverted`],m=!h&&d||h&&!d,A=t.isGrouped(e.id),I=r&&A&&e.value!==0?l.hiddenTargetIds.has(e.id)&&o?o(e):i.has(`${e.id}:${e.index}`):!1,C=[n[0][u],n[0][f]];let P=0;if(r){const N=c?f:u,B=Math.abs(n[2][N]-n[0][N]);P=Math.max(0,!A||I?r(B):0)}const z=c?n[1][u]+(m?P:-P):n[1][f]+(m?-P:P);return{radius:P,corners:c0(c,m,P),clipPath:P?u0(C,z,c,m):null,indexX:u,indexY:f,isNegative:m,pos:z}}const qf="2 2";function td(t,e,n){const r=t.axis.isTimeSeries(),i=(o,s)=>xn(o)?s:r?Hn.call(t,o):o;return(n||[]).map(o=>{var s,l;return{start:i(o.start,(s=e[0])==null?void 0:s.x),end:i(o.end,(l=e[e.length-1])==null?void 0:l.x),style:o.style||{dasharray:qf}}})}function ed(t,e){for(let n=0,r;r=e[n];n++)if(r.start<t&&t<=r.end)return r.style;return!1}function f0(t){const e=String((t==null?void 0:t.dasharray)||qf).split(/[\s,]+/).map(Number).filter(Number.isFinite);return e.length?e:[2,2]}function d0(t,e,n,r,i){const o=t.config.axis_rotated,s=td(t,e,i),l=[];for(let c=1;c<e.length;c++){const u=e[c-1],f=e[c];if(!We(u.value)||!We(f.value)){l.push({isBreak:!0});continue}const d=ed(f.x,s),h=n(u.x),m=r(u.value),A=n(f.x),I=r(f.value);l.push({start:o?[m,h]:[h,m],end:o?[I,A]:[A,I],dash:d?f0(d):[]})}return l}function Jo(t,e){return t.config.axis_rotated?[e[1],e[0]]:[e[0],e[1]]}function nd(t,e,n=1){const r=e.map(h=>Jo(t,h)),i=r.map(([h])=>h),o=r.map(([,h])=>h),s=Math.min(...i),l=Math.min(...o),c=Math.max(...i)-s,u=Math.max(...o)-l,f=Math.max(n,c),d=Math.max(n,u);return{x:s-(f-c)/2,y:l-(d-u)/2,w:f,h:d}}function ki(t,e){var n,r;const i=(n=t.isGrouped)!=null&&n.call(t,e.id)&&t.circleY?t.circleY(e,e.index):t.getYScaleById(e.id)(t.getBaseValue(e)),o=(r=t.xx(e))!=null?r:NaN;return t.config.axis_rotated?{x:i,y:o}:{x:o,y:i}}function h0(t,e,n){return{x:t.cx(e,n),y:t.cy(e,n)}}function g0(t,e){return{body:nd(t,[e[0],e[1]]),wickStart:Jo(t,[e[2][0],e[2][1]]),wickEnd:Jo(t,[e[2][0],e[2][2]])}}function ti(t,e,n,r=!1){if(e===n)return{x:0,y:0,w:t.state.width,h:0};const{scale:{x:i,y:o}}=t,s=i(e.x0),l=o(e.y0),c=i(e.x1)-s,u=o(e.y1)-l;return{x:s,y:l,w:r?Math.max(0,c):c,h:r?Math.max(0,u):u}}function v0(t,e,n,r){const{config:i}=t,{id:o,value:s,ratio:l=0}=e,c=i.treemap_label_format,u=typeof c=="function"?c.bind(t.api)(s,l,o,{width:n,height:r}):`${o}
|
|
36
|
-
${(l*100).toFixed(2)}%`;return u==null?null:String(u)}var WR=Array.prototype.slice;function Hl(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Ze(t){return function(){return t}}function rd(t){this._context=t}rd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function Qo(t){return new rd(t)}var p0=Math.pow;const Yl=Math.PI,Kl=2*Yl,wa=1e-6,m0=Kl-wa;function ad(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function x0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ad;const n=p0(10,e);return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class _o{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?ad:x0(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,s){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,l=this._y1,c=r-e,u=i-n,f=s-e,d=l-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>wa)if(!(Math.abs(d*c-u*f)>wa)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let m=r-s,A=i-l,I=c*c+u*u,C=m*m+A*A,P=Math.sqrt(I),z=Math.sqrt(h),N=o*Math.tan((Yl-Math.acos((I+h-C)/(2*P*z)))/2),B=N/z,W=N/P;Math.abs(B-1)>wa&&this._append`L${e+B*f},${n+B*d}`,this._append`A${o},${o},0,0,${+(d*m>f*A)},${this._x1=e+W*c},${this._y1=n+W*u}`}}arc(e,n,r,i,o,s){if(e=+e,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),u=e+l,f=n+c,d=1^s,h=s?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>wa||Math.abs(this._y1-f)>wa)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%Kl+Kl),h>m0?this._append`A${r},${r},0,1,${d},${e-l},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>wa&&this._append`A${r},${r},0,${+(h>=Yl)},${d},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function y0(){return new _o}y0.prototype=_o.prototype;function VR(t=3){return new _o(+t)}function Zl(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new _o(e)}function id(t){return t[0]}function od(t){return t[1]}function Jl(t,e){var n=Ze(!0),r=null,i=Qo,o=null,s=Zl(l);t=typeof t=="function"?t:t===void 0?id:Ze(t),e=typeof e=="function"?e:e===void 0?od:Ze(e);function l(c){var u,f=(c=Hl(c)).length,d,h=!1,m;for(r==null&&(o=i(m=s())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(d,u,c),+e(d,u,c));if(m)return o=null,m+""||null}return l.x=function(c){return arguments.length?(t=typeof c=="function"?c:Ze(+c),l):t},l.y=function(c){return arguments.length?(e=typeof c=="function"?c:Ze(+c),l):e},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:Ze(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),l):r},l}function T0(t,e,n){var r=null,i=Ze(!0),o=null,s=Qo,l=null,c=Zl(u);t=typeof t=="function"?t:t===void 0?id:Ze(+t),e=typeof e=="function"?e:Ze(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?od:Ze(+n);function u(d){var h,m,A,I=(d=Hl(d)).length,C,P=!1,z,N=new Array(I),B=new Array(I);for(o==null&&(l=s(z=c())),h=0;h<=I;++h){if(!(h<I&&i(C=d[h],h,d))===P)if(P=!P)m=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),A=h-1;A>=m;--A)l.point(N[A],B[A]);l.lineEnd(),l.areaEnd()}P&&(N[h]=+t(C,h,d),B[h]=+e(C,h,d),l.point(r?+r(C,h,d):N[h],n?+n(C,h,d):B[h]))}if(z)return l=null,z+""||null}function f(){return Jl().defined(i).curve(s).context(o)}return u.x=function(d){return arguments.length?(t=typeof d=="function"?d:Ze(+d),r=null,u):t},u.x0=function(d){return arguments.length?(t=typeof d=="function"?d:Ze(+d),u):t},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:Ze(+d),u):r},u.y=function(d){return arguments.length?(e=typeof d=="function"?d:Ze(+d),n=null,u):e},u.y0=function(d){return arguments.length?(e=typeof d=="function"?d:Ze(+d),u):e},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:Ze(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(t).y(e)},u.lineY1=function(){return f().x(t).y(n)},u.lineX1=function(){return f().x(r).y(e)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:Ze(!!d),u):i},u.curve=function(d){return arguments.length?(s=d,o!=null&&(l=s(o)),u):s},u.context=function(d){return arguments.length?(d==null?o=l=null:l=s(o=d),u):o},u}var b0=Object.defineProperty,S0=Object.defineProperties,A0=Object.getOwnPropertyDescriptors,sd=Object.getOwnPropertySymbols,E0=Object.prototype.hasOwnProperty,C0=Object.prototype.propertyIsEnumerable,ld=(t,e,n)=>e in t?b0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,I0=(t,e)=>{for(var n in e||(e={}))E0.call(e,n)&&ld(t,n,e[n]);if(sd)for(var n of sd(e))C0.call(e,n)&&ld(t,n,e[n]);return t},R0=(t,e)=>S0(t,A0(e));function O0(t,e,n){return t.isStepType(e)?t.convertValuesToStep(n):n}function cd(t,e,n,r){const{config:i,scale:o}=t,s=i.line_connectNull,l=i.axis_rotated,c=t.generateGetLinePoints(e,n),u=t.getYScaleById.bind(t),f=A=>(n?t.subxx:t.xx).call(t,A),d=(A,I)=>t.isGrouped(A.id)?c(A,I)[0][1]:u(A.id,n)(t.getBaseValue(A));let h=Jl();h=l?h.x(d).y(f):h.x(f).y(d),r&&(h=h.context(r)),s||(h=h.defined(A=>t.getBaseValue(A)!==null));const m=n?o.subX:o.x;return A=>{const I=u(A.id,n);let C=s?t.filterRemoveNull(A.values):A.values,P=0,z=0,N;if(t.isLineType(A)){const B=i.data_regions[A.id];B&&!r&&t.lineWithRegions?(t.isAreaRangeType(A)&&(C=C.map(W=>R0(I0({},W),{value:t.getRangedData(W,"mid")}))),t.isStepType(A)&&(C=t.convertValuesToStep(C)),N=t.lineWithRegions(C,o.zoom||m,I,B)):N=h.curve(t.getCurve(A))(O0(t,A,C))}else C[0]&&(P=m(C[0].x),z=I(C[0].value)),N=l?`M ${z} ${P}`:`M ${P} ${z}`;return N||(r?void 0:"M 0 0")}}function ud(t,e,n,r){const{config:i}=t,o=i.line_connectNull,s=i.axis_rotated,l=t.generateGetAreaPoints(e,n),c=t.getYScaleById.bind(t),u=h=>(n?t.subxx:t.xx).call(t,h),f=(h,m)=>t.isGrouped(h.id)?l(h,m)[0][1]:c(h.id,n)(t.isAreaRangeType(h)?t.getRangedData(h,"high"):t.getShapeYMin(h.id)),d=(h,m)=>t.isGrouped(h.id)?l(h,m)[1][1]:c(h.id,n)(t.isAreaRangeType(h)?t.getRangedData(h,"low"):h.value);return h=>{let m=o?t.filterRemoveNull(h.values):h.values,A=0,I=0,C;if(t.isAreaType(h)){let P=T0();P=s?P.y(u).x0(f).x1(d):P.x(u).y0(i.area_above?0:i.area_below?t.state.height:f).y1(d),r&&(P=P.context(r)),o||(P=P.defined(z=>t.getBaseValue(z)!==null)),t.isStepType(h)&&(m=t.convertValuesToStep(m)),C=P.curve(t.getCurve(h))(m)}else m[0]&&(A=t.scale.x(m[0].x),I=t.getYScaleById(h.id)(m[0].value)),C=s?`M ${I} ${A}`:`M ${A} ${I}`;return C||(r?void 0:"M 0 0")}}let Vr;function qo(t,e){if(!ge(e)||e>=1)return t;const n=t.match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(n){const o=(n[1].length===3?n[1].split("").map(l=>l+l).join(""):n[1]).match(/.{2}/g);return o?`rgba(${o.map(l=>parseInt(l,16)).join(",")},${e})`:t}if(/^rgb\(/i.test(t))return t.replace(/^rgb\((.*)\)$/i,`rgba($1,${e})`);if(/^rgba\(/i.test(t))return t.replace(/^rgba\((.*),\s*([\d.]+)\)$/i,(i,o,s)=>`rgba(${o},${Number(s)*e})`);const r=w0(t);return r&&r!==t?qo(r,e):t}function w0(t){if(!ce.document||(Vr===void 0&&(Vr=ce.document.createElement("canvas").getContext("2d")),!Vr))return null;Vr.fillStyle="#000",Vr.fillStyle=t;const e=Vr.fillStyle;Vr.fillStyle="#fff",Vr.fillStyle=t;const n=Vr.fillStyle;return e===n?e:null}function Xi(t,e,n,r){const i=e(n,r),o=nd(t,i);return pn(o.x,o.y)&&pn(o.x+o.w,o.y+o.h)?{points:i,rect:o}:null}function Gi(t,e,n,r){const i=e(n,r),{body:o,wickStart:s,wickEnd:l}=g0(t,i);return pn(o.x,o.y)&&pn(o.x+o.w,o.y+o.h)&&pn(s[0],s[1])&&pn(l[0],l[1])?{body:o,points:i,wickStart:s,wickEnd:l}:null}const P0=1.2;function Ql(t,e){var n,r,i;let{value:o}=e;if((n=t.isBubbleZType)!=null&&n.call(t,e))o=t.getBubbleZData(o,"z");else if((r=t.isCandlestickType)!=null&&r.call(t,e)){const s=(i=t.getCandlestickData)==null?void 0:i.call(t,e);s&&(o=s.close)}return o}function fd(t,e){const n=t.dataLabelFormat(e.id)(Ql(t,e),e.id,e.index,[]);return n==null?null:String(n)}function dd(t){return`${t.id}:${t.index}`}function _l(t,e,n){var r;if(!(e!=null&&e.length))return()=>!1;if(t.config.tooltip_grouped&&e.length>1){const o=(r=e[0])==null?void 0:r.index;return s=>o!==void 0&&s.index===o&&n(t,s)}const i=new Set(e.filter(o=>o&&n(t,o)).map(dd));return o=>i.has(dd(o))}function ts(t,e,n,r){const i=t.config.data_labels_position;let o;if(le(i))o=i.bind(t.api)(n,Ql(t,e),e.id,e.index,r);else if(i){const s=e.id in i?i[e.id]:i;o=s==null?void 0:s[n]}return ge(o)?o:0}function M0(t,e){var n,r;const i=(n=t.config.data_labels)==null?void 0:n.image;if(le(i))return(r=i.call(t.api,Ql(t,e),e.id,e.index))!=null?r:null;if(i){const{url:o="",width:s=0,height:l=0,pos:c}=i;return{url:o,width:s,height:l,pos:c}}return null}function L0(t,e){return Ra(t.url,{ID:e.id})}function D0(t,e,n,r,i,o){var s,l,c;const{width:u=0,height:f=0,pos:d}=e,h=u/2,m=f/2,A=ql(t.canvasEngine.ctx,n,r,i).h,I=Tr(t.canvasEngine.ctx.font),C=r-h,P=i-m-((s=t.isTreemapType)!=null&&s.call(t,o)?I*.7:A/2);let z=r,N=i;return t.config.axis_rotated?z+=h:N+=m,{x:C+((l=d==null?void 0:d.x)!=null?l:0),y:P+((c=d==null?void 0:d.y)!=null?c:0),textX:z,textY:N}}function hd(t,e,n){var r,i,o;const s=(r=t.updateTextColor)==null?void 0:r.call(t,e);return typeof s=="string"?s:(i=t.isTreemapType)!=null&&i.call(t,e)?n:((o=t.color)==null?void 0:o.call(t,e))||n}function F0(t,e){var n;const r=t.config.data_labels_backgroundColors;if(!r)return null;if(Ke(r))return r;if(le(r)){const o=(n=t.color)==null?void 0:n.call(t,e),s=r.bind(t.api)(o,e);return s==null?null:String(s)}const i=r[e.id];return i==null?null:String(i)}function N0(t){var e,n,r;if(!t)return null;const i=je(t)?t:{};return{padding:Rf((e=i.padding)!=null?e:"3 5"),radius:ge(i.radius)?i.radius:10,stroke:(n=i.stroke)!=null?n:"#000",strokeWidth:ge(i.strokeWidth)?i.strokeWidth:1,fill:(r=i.fill)!=null?r:"none"}}function ql(t,e,n,r,i={top:0,right:0,bottom:0,left:0}){var o,s;const l=e.split(`
|
|
37
|
-
`),c=l.map(P=>t.measureText(P)),u=Math.max(...c.map(P=>P.width),0),f=Tr(t.font),d=f*P0,h=c[0]?(c[0].fontBoundingBoxAscent||0)+(c[0].fontBoundingBoxDescent||0):0,m=c[0]&&(c[0].fontBoundingBoxDescent||c[0].actualBoundingBoxDescent)||0,A=l.length>1?d*l.length:Math.max(f,h,((o=c[0])==null?void 0:o.actualBoundingBoxAscent)+((s=c[0])==null?void 0:s.actualBoundingBoxDescent)||0);let I=n,C=r;return t.textAlign==="center"?I-=u/2:(t.textAlign==="right"||t.textAlign==="end")&&(I-=u),t.textBaseline==="middle"?C-=A/2:t.textBaseline==="alphabetic"?C-=A-m:(t.textBaseline==="bottom"||t.textBaseline==="ideographic")&&(C-=A),{x:I-i.left,y:C-i.top,w:u+i.left+i.right,h:A+i.top+i.bottom}}function gd(t,e,n,r,i,o){var s,l;const c=e.context,u=F0(t,n),f=N0((s=t.config.data_labels)==null?void 0:s.border),d=(l=f==null?void 0:f.padding)!=null?l:{top:0,right:0,bottom:0,left:0},h=ql(c,r,i,o,d),m=t.config.data_labels.rotate;e.withState(A=>{var I;m&&(A.translate(i,o),A.rotate(m*Math.PI/180),h.x-=i,h.y-=o),u&&e.fillRoundRect(h,(I=f==null?void 0:f.radius)!=null?I:0,{fill:u}),f&&(f.fill!=="none"&&e.fillRoundRect(h,f.radius,{fill:f.fill}),e.strokeRoundRect(h,f.radius,{stroke:f.stroke,lineWidth:f.strokeWidth}))})}function $0(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function B0(t){return t==="start"?"left":t==="end"?"right":"center"}function z0(t,e,n,r){var i,o,s;const l=$0(t.config.data_labels.rotate),c=t.config.axis_rotated,u=t.config[`axis_${(i=t.axis)==null?void 0:i.getId(e.id)}_inverted`],f=Yn(t,e),{value:d}=e,h=ge(d)&&d<0||f&&!((s=(o=t.getCandlestickData)==null?void 0:o.call(t,e))!=null&&s._isUp),m=4,A=m*2;return c?l==="start"?(n+=h?0:A,r+=m):l==="middle"?(n+=A,r-=A):l==="end"&&(h&&(n-=A),r+=m):(l==="start"?(n+=m,h&&(r+=A*2)):l==="middle"?r-=A:l==="end"&&(n-=m,h&&(r+=A*2)),u&&(r+=h?-17:f?13:7)),{x:n,y:r,textAlign:B0(l)}}function vd(t,e,n,r,i){var o;if(t.config.axis_rotated)r+=6,e.textAlign="left",e.textBaseline="middle";else if(ca(t,n))e.textAlign="center",e.textBaseline="middle";else{const{config:s,state:l}=t,c=s[`axis_${(o=t.axis)==null?void 0:o.getId(n.id)}_inverted`],u=n.value<0||n.value===0&&!l.hasPositiveValue&&l.hasNegativeValue;let f=3;ge(s.point_r)&&s.point_r>5&&(_a(t,n)||la(t,n))&&(f+=s.point_r/2.3),e.textAlign="center",(c?!u:u)?(i+=f,e.textBaseline="top"):(i-=f*2,e.textBaseline="bottom")}return{x:r,y:i}}var U0=Object.defineProperty,pd=Object.getOwnPropertySymbols,k0=Object.prototype.hasOwnProperty,X0=Object.prototype.propertyIsEnumerable,md=(t,e,n)=>e in t?U0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jr=(t,e)=>{for(var n in e||(e={}))k0.call(e,n)&&md(t,n,e[n]);if(pd)for(var n of pd(e))X0.call(e,n)&&md(t,n,e[n]);return t};const xd={x:0,y:0,w:8,h:8},tc=new Map,yd=[1,0,0,1,0,0];function G0(t){return t==="circle"||t==="rectangle"}function Mn(t,e,n=0){const r=t.getAttribute(e),i=r===null?NaN:parseFloat(r);return Number.isFinite(i)?i:n}function W0(t){const e=(t.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi)||[]).map(Number).filter(Number.isFinite),n=[];for(let r=0;r<e.length-1;r+=2)n.push([e[r],e[r+1]]);return n}function V0(t){const e=(t==null?void 0:t.trim().split(/[\s,]+/).map(Number).filter(Number.isFinite))||[];return e.length===4?{x:e[0],y:e[1],w:e[2],h:e[3]}:null}function Td(t){const e=t.map(([o])=>o),n=t.map(([,o])=>o),r=Math.min(...e),i=Math.min(...n);return{x:r,y:i,w:Math.max(...e)-r,h:Math.max(...n)-i}}function j0(t){const e=t.filter(s=>Number.isFinite(s.x)&&Number.isFinite(s.y)&&Number.isFinite(s.w)&&Number.isFinite(s.h));if(!e.length)return jr({},xd);const n=Math.min(...e.map(s=>s.x)),r=Math.min(...e.map(s=>s.y)),i=Math.max(...e.map(s=>s.x+s.w)),o=Math.max(...e.map(s=>s.y+s.h));return{x:n,y:r,w:i-n,h:o-r}}function Wi(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function H0(t){let e=[...yd];return((t==null?void 0:t.match(/[a-z]+\([^)]*\)/gi))||[]).forEach(n=>{var r;const[,i,o]=n.match(/^([a-z]+)\(([^)]*)\)$/i)||[],s=i==null?void 0:i.toLowerCase(),l=((o==null?void 0:o.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi))||[]).map(Number).filter(Number.isFinite);let c=null;if(s==="matrix"&&l.length>=6)c=l.slice(0,6);else if(s==="translate"&&l.length)c=[1,0,0,1,l[0],l[1]||0];else if(s==="scale"&&l.length)c=[l[0],0,0,(r=l[1])!=null?r:l[0],0,0];else if(s==="rotate"&&l.length){const u=l[0]*Math.PI/180,f=Math.cos(u),d=Math.sin(u),h=[f,d,-d,f,0,0];c=l.length>=3?Wi(Wi([1,0,0,1,l[1],l[2]],h),[1,0,0,1,-l[1],-l[2]]):h}else s==="skewx"&&l.length?c=[1,0,Math.tan(l[0]*Math.PI/180),1,0,0]:s==="skewy"&&l.length&&(c=[1,Math.tan(l[0]*Math.PI/180),0,1,0,0]);c&&(e=Wi(e,c))}),e}function da(t,e){const n=t.getAttribute("style"),r=t.getAttribute(e),i=n==null?void 0:n.match(new RegExp(`(?:^|;)\\s*${e}\\s*:\\s*([^;]+)`,"i"));return((i==null?void 0:i[1])||r||"").trim()||null}function Y0(t,e){const n=jr({},e),r=da(t,"fill"),i=da(t,"stroke"),o=da(t,"stroke-width"),s=da(t,"opacity"),l=da(t,"fill-opacity"),c=da(t,"stroke-opacity");if(r&&(n.fill=r==="none"?null:r),i&&(n.stroke=i==="none"?null:i),o){const u=parseFloat(o);Number.isFinite(u)&&(n.lineWidth=u)}return[s,l,c].forEach(u=>{var f;const d=u===null?NaN:parseFloat(u);Number.isFinite(d)&&(n.alpha=((f=n.alpha)!=null?f:1)*d)}),n}function K0(t){const e=new Map;return Array.from(t.querySelectorAll("[id]")).forEach(n=>{const r=n.getAttribute("id");r&&e.set(r,n)}),e}function Or(t,e){const n=t==null?void 0:t.trim();return n?/%$/.test(n)?n:parseFloat(n):e}function wr(t,e,n,r){if(typeof t=="number")return Number.isFinite(t)?t:r;if(typeof t=="string"&&/%$/.test(t)){const o=parseFloat(t);return Number.isFinite(o)?e+n*o/100:r}const i=parseFloat(t!=null?t:"");return Number.isFinite(i)?i:r}function Z0(t){const e=(t==null?void 0:t.trim())||"0",n=parseFloat(e),r=/%$/.test(e)?n/100:n;return Math.max(0,Math.min(1,Number.isFinite(r)?r:0))}function J0(t){return Array.from(t.children||[]).filter(e=>e.tagName.toLowerCase()==="stop").map(e=>{const n=da(e,"stop-color")||"#000",r=da(e,"stop-opacity"),i=r===null?NaN:parseFloat(r);return{offset:Z0(e.getAttribute("offset")),color:n,opacity:Number.isFinite(i)?i:void 0}})}function Q0(t){const e=new Map;return t.forEach((n,r)=>{const i=n.tagName.toLowerCase(),o=J0(n);o.length&&(i==="lineargradient"?e.set(r,{type:"linearGradient",x1:Or(n.getAttribute("x1"),"0%"),y1:Or(n.getAttribute("y1"),"0%"),x2:Or(n.getAttribute("x2"),"100%"),y2:Or(n.getAttribute("y2"),"0%"),stops:o}):i==="radialgradient"&&e.set(r,{type:"radialGradient",cx:Or(n.getAttribute("cx"),"50%"),cy:Or(n.getAttribute("cy"),"50%"),r:Or(n.getAttribute("r"),"50%"),fx:Or(n.getAttribute("fx"),"50%"),fy:Or(n.getAttribute("fy"),"50%"),fr:Or(n.getAttribute("fr"),0),stops:o}))}),e}function ec(t,e,n,r=yd,i={},o=new Set){const s=t.tagName.toLowerCase(),l=Array.from(t.children||[]),c=Y0(t,i),u=Wi(r,H0(t.getAttribute("transform"))),f={matrix:u,style:c};if(s==="defs")return[];if(s==="svg"||s==="g"||s==="symbol")return l.reduce((d,h)=>d.concat(ec(h,e,n,u,c,o)),[]);if(s==="use"){const d=t.getAttribute("href")||t.getAttribute("xlink:href")||"",h=d.charAt(0)==="#"?d.slice(1):"",m=h&&n.get(h);if(!m||o.has(h))return[];const A=Mn(t,"x",0),I=Mn(t,"y",0),C=Wi(u,[1,0,0,1,A,I]);o.add(h);const P=ec(m,e,n,C,c,o);return o.delete(h),P}if(s==="polygon"||s==="polyline"){const d=W0(t.getAttribute("points")||"");return d.length?[jr({type:s,points:d,box:Td(d)},f)]:[]}if(s==="circle"){const d=Mn(t,"cx",0),h=Mn(t,"cy",0),m=Mn(t,"r",0);return m>0?[jr({type:"circle",cx:d,cy:h,r:m,box:{x:d-m,y:h-m,w:m*2,h:m*2}},f)]:[]}if(s==="ellipse"){const d=Mn(t,"cx",0),h=Mn(t,"cy",0),m=Mn(t,"rx",0),A=Mn(t,"ry",0);return m>0&&A>0?[jr({type:"ellipse",cx:d,cy:h,rx:m,ry:A,box:{x:d-m,y:h-A,w:m*2,h:A*2}},f)]:[]}if(s==="rect"){const d=Mn(t,"x",0),h=Mn(t,"y",0),m=Mn(t,"width",0),A=Mn(t,"height",0);return m>0&&A>0?[jr({type:"rect",x:d,y:h,w:m,h:A,box:{x:d,y:h,w:m,h:A}},f)]:[]}if(s==="line"){const d=Mn(t,"x1",0),h=Mn(t,"y1",0),m=Mn(t,"x2",0),A=Mn(t,"y2",0);return[jr({type:"line",x1:d,y1:h,x2:m,y2:A,box:Td([[d,h],[m,A]])},f)]}if(s==="path"){const d=t.getAttribute("d")||"";return d?[jr({type:"path",d,box:e},f)]:[]}return[]}function _0(t){if(!/^</.test(t))return null;if(tc.has(t))return tc.get(t)||null;let e=null;try{const r=new ce.DOMParser().parseFromString(Xr(t),"image/svg+xml").documentElement,i=V0(r.getAttribute("viewBox"))||xd,o=K0(r),s=ec(r,i,o);s.length&&(e={shapes:s,box:r.tagName.toLowerCase()==="svg"?i:j0(s.map(l=>l.box)),paints:Q0(o)})}catch(n){e=null}return tc.set(t,e),e}function q0(t,e){if(e.type==="polygon"||e.type==="polyline"){const[n,...r]=e.points;t.moveTo(n[0],n[1]),r.forEach(([i,o])=>t.lineTo(i,o)),e.type==="polygon"&&t.closePath()}else e.type==="circle"?(t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,Math.PI*2)):e.type==="ellipse"?(t.moveTo(e.cx+e.rx,e.cy),t.ellipse(e.cx,e.cy,e.rx,e.ry,0,0,Math.PI*2)):e.type==="rect"?t.rect(e.x,e.y,e.w,e.h):e.type==="line"&&(t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2))}function es(t){const e=t==null?void 0:t.match(/^url\(#([^)]+)\)$/);return(e==null?void 0:e[1])||null}function bd(t,e,n){const{x:r,y:i,w:o,h:s}=n,l=e.type==="linearGradient"?t.createLinearGradient(wr(e.x1,r,o,r),wr(e.y1,i,s,i),wr(e.x2,r,o,r+o),wr(e.y2,i,s,i)):t.createRadialGradient(wr(e.fx,r,o,r+o/2),wr(e.fy,i,s,i+s/2),wr(e.fr,r,Math.max(o,s),0),wr(e.cx,r,o,r+o/2),wr(e.cy,i,s,i+s/2),Math.max(.01,wr(e.r,0,Math.max(o,s),Math.max(o,s)/2)));return e.stops.forEach(({offset:c,color:u,opacity:f})=>{l.addColorStop(c,f===void 0?u:qo(u,f))}),l}function tT(t,e,n,r,i){const o=jr({},e||{});if(n.fill!==void 0)if(n.fill===null)delete o.fill;else if(es(n.fill)){const s=r.get(es(n.fill));s&&(o.fill=bd(t,s,i))}else/^url\(/.test(n.fill)||(o.fill=n.fill);if(n.stroke!==void 0)if(n.stroke===null)delete o.stroke;else if(es(n.stroke)){const s=r.get(es(n.stroke));s&&(o.stroke=bd(t,s,i))}else/^url\(/.test(n.stroke)||(o.stroke=n.stroke);return n.lineWidth!==void 0&&(o.lineWidth=n.lineWidth),{style:o,shouldFill:n.fill!==null&&(!o.stroke||o.fill!==void 0),shouldStroke:n.stroke!==null&&o.stroke!==void 0,alpha:n.alpha}}function Vi(t,e,n,r,i,o,s=i){if(G0(e)){t.point(e,n,r,i,o);return}const l=_0(e);if(!l||i<=0){t.point("circle",n,r,i,o);return}t.withState(c=>{const{box:u,paints:f,shapes:d}=l,h=s>0?i/s:1,m=A=>{const{style:I,shouldFill:C,shouldStroke:P,alpha:z}=tT(c,o,A.style,f,u);if(c.save(),t.applyStyle(I),z!==void 0&&(c.globalAlpha*=z),c.transform(...A.matrix),c.beginPath(),A.type==="path"){if(ce.Path2D){const N=A.path2D||(A.path2D=new ce.Path2D(A.d));C&&c.fill(N),P&&c.stroke(N)}}else q0(c,A),C&&c.fill(),P&&c.stroke();c.restore()};c.translate(n-(u.x+u.w/2)*h,r-(u.y+u.h/2)*h),c.scale(h,h),d.forEach(m)})}var eT=Object.defineProperty,nT=Object.defineProperties,rT=Object.getOwnPropertyDescriptors,Sd=Object.getOwnPropertySymbols,aT=Object.prototype.hasOwnProperty,iT=Object.prototype.propertyIsEnumerable,nc=(t,e,n)=>e in t?eT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ad=(t,e)=>{for(var n in e||(e={}))aT.call(e,n)&&nc(t,n,e[n]);if(Sd)for(var n of Sd(e))iT.call(e,n)&&nc(t,n,e[n]);return t},Ed=(t,e)=>nT(t,rT(e)),ei=(t,e,n)=>nc(t,typeof e!="symbol"?e+"":e,n);const oT=[Ni,nr,br,Yn],sT=1e3,Cd=new WeakMap,Id=new Map;function Rd(t,e){if(!e||e==="none")return;const n=e.match(/^matrix\(([^)]+)\)$/),r=e.match(/^matrix3d\(([^)]+)\)$/);if(n){const i=n[1].split(",").map(o=>Number(o.trim()));i.length===6&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[2],i[3],i[4],i[5])}else if(r){const i=r[1].split(",").map(o=>Number(o.trim()));i.length===16&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[4],i[5],i[12],i[13])}}function lT(t,e,n){const r=t.naturalWidth||t.width,i=t.naturalHeight||t.height;if(!r||!i||!e||!n)return{x:0,y:0,w:e,h:n};const o=Math.min(e/r,n/i),s=r*o,l=i*o;return{x:(e-s)/2,y:(n-l)/2,w:s,h:l}}function cT(t){const{state:e}=t;return e.hasFunnel||e.hasTreemap?{x:0,y:0}:{x:Za(e.margin.left),y:Za(e.margin.top)}}function Od(t,e,n,r,i=!1){r.strokePath(o=>{cd(t,n,i,o)(e)},{lineDash:[]})}function wd(t,e,n,r,i=!1){r.fillPath(o=>{ud(t,n,i,o)(e)})}function Pd(t,e){const n=Wr(t,e);return n.start===0&&n.end===e.values.length?e:Ed(Ad({},e),{values:e.values.slice(n.start,n.end)})}function rc(t,e){if(!(t!=null&&t.length)||!(e!=null&&e.id))return null;let n=Cd.get(t);if(!n){n=new Map;for(const r of t){if(!(r!=null&&r.id))continue;const i=`${r.id}:*`;n.has(i)||n.set(i,r),"index"in r&&n.set(`${r.id}:${r.index}`,r)}Cd.set(t,n)}return"index"in e?n.get(`${e.id}:${e.index}`)||null:n.get(`${e.id}:*`)||null}function uT(t,e){const n=ce.Path2D;if(!n)return null;const r=`${t}:${e}`,i=Id.get(r);if(i)return i;const o=new n(Ii[t][e]);return Id.set(r,o),o}function ji(t,e){const n=t.config.color_onover;return!n||!e?null:je(n)?e.id in n?n[e.id]:null:Ke(n)?n:le(n)?n.call(t.api,e):null}function fT(t,e,n){const r=rc(n,e);return ji(t,r)||t.color(e.id)}function Md(t){var e;return(t==null?void 0:t.id)||((e=t==null?void 0:t.data)==null?void 0:e.id)}function dT(t,e){var n;const r=Md(e);return!!r&&((n=t.state.focusedTargetIds)==null?void 0:n.has(r))}function Hi(t,e){var n;const r=Md(e);return r&&((n=t.state.defocusedTargetIds)!=null&&n.has(r))?t.canvasTheme.style.shape.targetDefocusedOpacity:1}function hT(t,e,n,r=!1){var i;const o=(i=t.generateGetAreaPoints)==null?void 0:i.call(t,n,r);if(!o)return null;const s=Wr(t,e);let l=1/0,c=1/0,u=-1/0,f=-1/0;for(let d=s.start;d<s.end;d++){const h=e.values[d];In(t,h)&&o(h,d).forEach(([m,A])=>{pn(m,A)&&(l=Math.min(l,m),c=Math.min(c,A),u=Math.max(u,m),f=Math.max(f,A))})}return Number.isFinite(l)&&Number.isFinite(c)?{x:l,y:c,w:u-l,h:f-c}:null}function ns(t,e,n){return e+n*(ge(t)?t:0)}function Ld(t,e,n,r,i,o){const s=t.config[`${r}_linearGradient`];if(!s||!i||!i.w||!i.h)return o;const l=t.config.axis_rotated,c=typeof s=="object"?s:{},u=c.x||(l?[1,0]:[0,0]),f=c.y||(l?[0,0]:[0,1]),d=Array.isArray(c.stops)?c.stops:[[0,o,1],[1,o,0]],h=e.createLinearGradient(ns(u[0],i.x,i.w),ns(f[0],i.y,i.h),ns(u[1],i.x,i.w),ns(f[1],i.y,i.h));return d.forEach(([m,A,I])=>{const C=le(A)?A.call(t.api,n.id):A,P=String(C||o),z=Number(m),N=Number.isFinite(z)?Math.max(0,Math.min(1,z)):0;h.addColorStop(N,qo(P,I))}),h}function Hr(t,e){return Qa(t,e,oT)}function rs(t,e){const n=t.config.point_opacity;return Number.isFinite(n)?n:la(t,e)||ca(t,e)?.5:1}function Yi(t,e,n){var r,i;const o=t.config.point_r;return ca(t,e)||le(o)?(i=(r=t.pointR)==null?void 0:r.call(t,n))!=null?i:2.5:o}function gT(t,e,n,r){return!r&&n==="circle"&&la(t,e)&&!le(t.config.point_r)&&e.values.length>Mf}function vT(t,e){const{bar_connectLine:n}=t.config,r=je(n)?n[e]:n;return/^(start|end)-(start|end)$/.test(r)?r:null}function pT(t,e,n){const{indexX:r,indexY:i,pos:o}=n;return t.config.axis_rotated?{x:e[0][r],y:e[0][i],width:e[0][r]-o,height:e[2][i]-e[0][i]}:{x:e[0][r],y:o,width:e[2][r]-e[0][r],height:e[3][i]-o}}function mT(t,e,n,r,i=1){if(r.length<2)return;const o=t.config.axis_rotated,s=/^start-(start|end)$/.test(n),l=/^end-(start|end)$/.test(n),c=/\w+-end$/.test(n),u=/\w+-start$/.test(n),f=m=>({x:o?l?m.x-m.width:m.x:m.x+m.width,y:o||s?m.y+m.height:m.y}),d=m=>({x:o?m.x-(c?m.width:0):m.x,y:o?m.y:m.y+(u?m.height:0)});let h=f(r[0]);e.strokePath(()=>{for(let m=1;m<r.length;m++){const A=d(r[m]);e.traceLine(h.x,h.y,A.x,A.y),m<r.length-1&&(h=f(r[m]))}},{alpha:i,stroke:t.canvasTheme.style.shape.barConnectLineColor,lineWidth:t.canvasTheme.style.shape.barConnectLineWidth,lineDash:[]})}function ac(t,e){var n;const{config:r}=t;if(ca(t,e))return"circle";const i=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],o=Array.isArray(r.point_pattern)&&r.point_pattern.length?r.point_pattern:[r.point_type],s=Math.max(0,i.indexOf(e.id)),l=o[s%o.length];return/^rect(angle)?$/i.test(l)||l==="rectangle"?"rectangle":l||"circle"}function xT(t,e,n,r,i,o,s){const l=t.config.point_radialGradient;if(!l||!o)return s;const c=je(l)?l:{},u=ge(c.cx)?c.cx:.3,f=ge(c.cy)?c.cy:.3,d=ge(c.r)?c.r:.7,h=Array.isArray(c.stops)?c.stops:[[.1,null,1],[.9,null,0]],m=r+(u-.5)*o*2,A=i+(f-.5)*o*2,I=e.createRadialGradient(m,A,0,m,A,Math.max(1,o*d*2));return h.forEach(([C,P,z])=>{let N=le(P)?P.bind(t.api)(n.id):P;N||(N=s);const B=Number(C),W=Number.isFinite(B)?Math.max(0,Math.min(1,B)):0;I.addColorStop(W,qo(N,z))}),I}function Dd(t,e,n){const r=t.config.candlestick_color_down;return(n!=null&&n._isUp?t.color(e):r&&typeof r=="object"?r[e.id]:r)||t.color(e)}function yT(t,e){return t.shouldDrawPointsForLine?t.shouldDrawPointsForLine(e):!0}function TT(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function bT(t,e,n){const{config:r,scale:i}=t,o=i.zoom||i.x,s=t.getYScaleById(e.id),l=r.line_connectNull?t.filterRemoveNull(e.values):e.values;let c=t.isAreaRangeType(e)?l.map(A=>Ed(Ad({},A),{value:t.getRangedData(A,"mid")})):l;t.isStepType(e)&&(c=t.convertValuesToStep(c));const u=d0(t,c,o,s,r.data_regions[e.id]);let f=null,d=[];const h=()=>{if(d.length<2||!f){d=[];return}n.strokePath(A=>{const[I,...C]=d;A.moveTo(I[0],I[1]),C.forEach(P=>{A.lineTo(P[0],P[1])})},{lineDash:f}),d=[]},m=(A,I,C)=>{!f||!TT(f,C)?(h(),f=C,d=[A,I]):d.push(I)};for(const{start:A,end:I,dash:C,isBreak:P}of u){if(P||!A||!I||!C){h(),f=null;continue}if(!pn(A[0],A[1])||!pn(I[0],I[1])){h(),f=null;continue}m(A,I,C)}h()}class ST{constructor(e,n){ei(this,"engine",e),ei(this,"theme",n),ei(this,"painter"),ei(this,"labelImageCache",new Map),ei(this,"backgroundImageCache",new Map),ei(this,"backgroundClassStyleCache",new Map),this.painter=new Gf(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}destroy(){const e=n=>{n.image.onload=null,n.image.onerror=null};this.labelImageCache.forEach(e),this.backgroundImageCache.forEach(e),this.labelImageCache.clear(),this.backgroundImageCache.clear(),this.backgroundClassStyleCache.clear()}getLabelImage(e,n){if(!e||!ce.Image)return null;let r=this.labelImageCache.get(e);if(!r){const i={image:new ce.Image,loaded:!1,loading:!0};r=i,this.labelImageCache.set(e,r),i.image.onload=()=>{var o;i.loaded=!0,i.loading=!1,(o=n.redraw)==null||o.call(n)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundImage(e,n){if(!e||!ce.Image)return null;let r=this.backgroundImageCache.get(e);if(!r){const i={image:new ce.Image,loaded:!1,loading:!0};r=i,this.backgroundImageCache.set(e,r),i.image.onload=()=>{var o;i.loaded=!0,i.loading=!1,(o=n.renderCanvasFrame)==null||o.call(n,void 0,null,!1)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundClassStyle(e,n){if(!n||!ce.document)return{};const r=this.backgroundClassStyleCache.get(n);if(r)return r;const i=ce.document.createElement("div");i.className=n,i.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:1px;height:1px;",e.$el.chart.node().appendChild(i);const o=ce.getComputedStyle(i),s=parseFloat(o.opacity),l={opacity:Number.isFinite(s)?s:void 0,transform:o.transform||void 0};return i.remove(),this.backgroundClassStyleCache.set(n,l),l}drawBackground(e){const n=e.config.background;if(!(n!=null&&n.imgUrl)&&!(n!=null&&n.color))return;const{ctx:r,painter:i}=this,{current:o,margin:s,width:l,height:c}=e.state,u=this.getBackgroundClassStyle(e,n.class);i.withState(()=>{if(u.opacity!==void 0&&(r.globalAlpha*=u.opacity),n.imgUrl){const f=this.getBackgroundImage(n.imgUrl,e);if(f!=null&&f.loaded){const d=cT(e),h=lT(f.image,o.width,o.height);r.translate(d.x,d.y),Rd(r,u.transform),r.drawImage(f.image,h.x,h.y,h.w,h.h)}}else n.color&&(Rd(r,u.transform),i.fillRect({x:s.left,y:s.top,w:l,h:c},{fill:n.color}))})}drawLabelImage(e,n,r,i,o){const s=M0(e,n);if(!(s!=null&&s.url))return{x:i,y:o};const l=L0(s,n),c=D0(e,s,r,i,o,n),u=this.getLabelImage(l,e);return u!=null&&u.loaded&&this.ctx.drawImage(u.image,c.x,c.y,s.width,s.height),{x:c.textX,y:c.textY}}drawDataLabel(e,n,r,i,o){const{painter:s,theme:{style:l}}=this;if({x:i,y:o}=this.drawLabelImage(e,n,r,i,o),e.config.data_labels.rotate){const c=z0(e,n,i,o);i=c.x,o=c.y,this.ctx.textAlign=c.textAlign}this.ctx.fillStyle=hd(e,n,l.label.color),gd(e,s,n,r,i,o),s.textLines(r,i,o,{angle:e.config.data_labels.rotate})}drawFocusLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,theme:{style:o}}=this,s=n.filter(c=>c&&In(e,c)&&br(e,c)&&Hr(e,{id:c.id})),l={size:()=>s.length};s.length&&(i.font=o.label.font,s.forEach(c=>{const u=fd(e,c);let{x:f,y:d}=ki(e,c);u&&({x:f,y:d}=vd(e,i,c,f,d),f+=ts(e,c,"x",l),d+=ts(e,c,"y",l),pn(f,d)&&this.drawDataLabel(e,c,u,f,d))}))}draw(e,n,r){if(e.state.hasTreemap){this.drawTreemaps(e);return}const{margin:i,width:o,height:s}=e.state,l=()=>{e.config.area_front||this.drawAreas(e,n,r),this.drawLines(e,n),e.config.area_front&&this.drawAreas(e,n,r),this.drawCircles(e,n,r)},c=()=>{e.config.bar_front||this.drawBars(e,n,r),this.drawCandlesticks(e,n,r),l(),e.config.bar_front&&this.drawBars(e,n,r),this.drawSelections(e,n),this.drawLabels(e,n)};e.config.clipPath===!1?c():this.painter.clipRect({x:i.left,y:i.top,w:o,h:s},c)}drawSubchart(e,n){const{config:r,state:i}=e;if(!r.subchart_show||!i.hasAxis||i.width2<=0||i.height2<=0)return;const{ctx:o,painter:s,theme:{style:l}}=this,{margin2:c,width2:u,height2:f}=i,d={x:c.left,y:c.top,w:u,h:f},h=e.filterTargetsToShow().filter(Hr.bind(null,e));s.withState(()=>{o.strokeStyle=l.axis.lineColor,o.lineWidth=l.axis.lineWidth,s.strokePath(()=>{r.axis_rotated?s.traceLine(d.x,d.y,d.x,d.y+d.h):s.traceLine(d.x,d.y+d.h,d.x+d.w,d.y+d.h)}),s.clipRect(d,()=>{s.withTranslation(d.x,d.y,()=>{var m,A,I,C,P,z;const N=h.filter(Ni.bind(null,e)),B=er(e,n,jt.AREA,Ni.bind(null,e));o.globalAlpha=l.shape.areaOpacity;for(const ft of N)ft.values.some(In.bind(null,e))&&(o.fillStyle=e.color(ft.id),wd(e,ft,B,s,!0));o.globalAlpha=1;const W=h.filter(nr.bind(null,e)),V=er(e,n,jt.BAR,nr.bind(null,e)),J=(m=e.generateGetBarPoints)==null?void 0:m.call(e,V,!0);if(J){o.globalAlpha=l.shape.barOpacity;for(const ft of W)o.fillStyle=e.color(ft.id),ft.values.forEach((_,dt)=>{if(!In(e,_))return;const ut=Xi(e,J,_,dt);ut&&s.fillRect(ut.rect,{fill:o.fillStyle})});o.globalAlpha=1}const q=h.filter(Yn.bind(null,e)),at=er(e,n,jt.CANDLESTICK,Yn.bind(null,e)),et=(A=e.generateGetCandlestickPoints)==null?void 0:A.call(e,at,!0);if(et){o.lineWidth=l.shape.candlestickLineWidth;for(const ft of q)ft.values.forEach((_,dt)=>{var ut;const xt=(ut=e.getCandlestickData)==null?void 0:ut.call(e,_),bt=xt&&Gi(e,et,_,dt);if(!bt)return;const Rt=Dd(e,{id:ft.id},xt);o.strokeStyle=Rt,o.fillStyle=Rt,s.strokePath(()=>{s.traceLine(bt.wickStart[0],bt.wickStart[1],bt.wickEnd[0],bt.wickEnd[1])}),s.fillRect(bt.body,{fill:o.fillStyle})})}const ot=h.filter(_a.bind(null,e)),lt=er(e,n,jt.LINE,_a.bind(null,e));o.globalAlpha=1,o.lineWidth=l.shape.lineWidth;for(const ft of ot)ft.values.some(In.bind(null,e))&&(o.strokeStyle=e.color(ft.id),Od(e,ft,lt,s,!0));if(r.point_show&&!((I=e.isPointFocusOnly)!=null&&I.call(e))){const ft=(C=e.updateCircleY)==null?void 0:C.call(e,!0),_=(P=e.subxx)==null?void 0:P.bind(e);if(_&&ft){for(const dt of h){if(!la(e,dt)&&!ca(e,dt))continue;const ut=e.color(dt.id),xt=l.shape.pointFillColor||ut,bt=l.shape.pointStrokeColor||ut,Rt=bt?(z=l.shape.pointLineWidth)!=null?z:1:0,Et=bt&&Rt>0?{fill:xt,stroke:bt,lineWidth:Rt}:{fill:xt};o.globalAlpha=rs(e,dt),dt.values.forEach((Zt,fe)=>{if(!In(e,Zt))return;const me=r.axis_rotated?ft(Zt,fe):_(Zt),xe=r.axis_rotated?_(Zt):ft(Zt,fe),Te=Math.min(Yi(e,dt,Zt),3);pn(me,xe)&&Vi(s,"circle",me,xe,Te,Et)})}o.globalAlpha=1}}})}),this.drawSubchartBrush(e)})}drawSubchartBrush(e){var n,r;const{config:i,scale:o,state:s}=e,l=s.domain;if(!i.subchart_show||!(l!=null&&l.length)||!o.subX)return;const{margin2:c,width2:u,height2:f}=s,d=o.subX(l[0]),h=o.subX(l[1]),m=i.axis_rotated?f:u,A=(r=(n=e.axis)==null?void 0:n.getExtent)==null?void 0:r.call(n),I=Array.isArray(A)&&A.length>=2&&A.every(Number.isFinite)?A.slice(0,2):[0,m],C=Math.max(0,Math.min(m,Math.min(...I))),P=Math.max(0,Math.min(m,Math.max(...I))),z=Math.max(C,Math.min(P,Math.min(d,h))),N=Math.max(C,Math.min(P,Math.max(d,h))),B=N-z;if(B<=0)return;const W=i.axis_rotated?{x:c.left,y:c.top+z,w:u,h:B}:{x:c.left+z,y:c.top,w:B,h:f};this.painter.fillRect(W,{fill:this.theme.style.subchartBrush.fill,alpha:this.theme.style.subchartBrush.opacity}),i.subchart_showHandle&&(this.drawSubchartBrushHandle(e,z,"start"),this.drawSubchartBrushHandle(e,N,"end"))}drawSubchartBrushHandle(e,n,r){const{config:i,state:{margin2:o,width2:s,height2:l}}=e,{ctx:c,painter:u,theme:{style:f}}=this,d=i.axis_rotated,h=f.subchartBrush.handleFill,m=f.subchartBrush.handleStroke,A=d?o.left+s/2:o.left+n,I=d?o.top+n:o.top+l/2,C=uT(d?"y":"x",r);C&&u.withState(()=>{c.translate(A,I),c.fillStyle=h,c.strokeStyle=m,c.lineWidth=f.subchartBrush.handleLineWidth,c.globalAlpha=f.subchartBrush.handleOpacity,c.fill(C),c.globalAlpha=1,c.stroke(C)})}drawBars(e,n,r){const{ctx:i,painter:o,theme:{style:s}}=this,l=nr.bind(null,e),c=_l(e,r,nr),u=e.filterTargetsToShow().filter(l).filter(Hr.bind(null,e)),f=e.generateGetBarPoints(er(e,n,jt.BAR,l),!1),{margin:d}=e.state,h=Wl(e),m=h?Vl(e):new Set;f&&o.withTranslation(d.left,d.top,()=>{var A;for(const I of u){const C=Wr(e,I),P=vT(e,I.id),z=Hi(e,I),N=[],B=[];for(let W=C.start;W<C.end;W++){const V=I.values[W];if(!In(e,V))continue;const J=Xi(e,f,V,W);if(!J)continue;const{points:q,rect:at}=J,et=jl(e,V,q,h,m,(A=e.isStackingRadiusData)==null?void 0:A.bind(e));B.push({d:V,points:q,rect:at,radiusInfo:et}),P&&N.push(pT(e,q,et))}P&&s.shape.barConnectLineWidth>0&&mT(e,o,P,N,z);for(const{d:W,rect:V,radiusInfo:J}of B){const q=ji(e,rc(r,W)),at=q||e.color(I.id),ot=(c(W)?s.shape.barExpandedOpacity:s.shape.barOpacity)*z;i.fillStyle=q?at:Ld(e,i,I,"bar",V,at),h?o.fillRoundRect(V,J.corners,{alpha:ot}):o.fillRect(V,{alpha:ot}),s.shape.barLineWidth>0&&(i.strokeStyle=s.shape.barStrokeColor,i.lineWidth=s.shape.barLineWidth,h?o.strokeRoundRect(V,J.corners,{alpha:s.shape.barOpacity*z}):o.strokeRect(V,{alpha:s.shape.barOpacity*z}))}}})}drawCandlesticks(e,n,r){var i;const{ctx:o,painter:s,theme:{style:l}}=this,c=Yn.bind(null,e),u=_l(e,r,Yn),f=e.filterTargetsToShow().filter(c).filter(Hr.bind(null,e)),d=(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,er(e,n,jt.CANDLESTICK,c),!1),{margin:h}=e.state;d&&s.withTranslation(h.left,h.top,()=>{var m;o.lineWidth=l.shape.candlestickLineWidth;for(const A of f){const I=Wr(e,A),C=Hi(e,A),P=l.shape.candlestickLineWidth,z=l.shape.candlestickStrokeColor||"#000";for(let N=I.start;N<I.end;N++){const B=A.values[N],W=(m=e.getCandlestickData)==null?void 0:m.call(e,B);if(!W)continue;const V=Gi(e,d,B,N);if(!V)continue;const{body:J,wickStart:q,wickEnd:at}=V;o.fillStyle=ji(e,rc(r,B))||Dd(e,B,W),o.strokeStyle=z,o.globalAlpha=C,P>0&&s.strokePath(()=>{s.traceLine(q[0],q[1],at[0],at[1])}),s.fillRect(J,{alpha:(u(B)?l.shape.candlestickExpandedOpacity:1)*C}),P>0&&s.strokeRect(J,{alpha:C,lineWidth:P,stroke:z})}}o.globalAlpha=1})}hasExpandedShapeFocus(e,n){return!!(n!=null&&n.some(r=>r&&(nr(e,r)||Yn(e,r))))}drawLines(e,n){const{ctx:r,painter:i,theme:{style:o}}=this,s=_a.bind(null,e),l=e.filterTargetsToShow().filter(s).filter(Hr.bind(null,e)),c=er(e,n,jt.LINE,s),{margin:u}=e.state;e.generateGetLinePoints&&i.withTranslation(u.left,u.top,()=>{var f;for(const d of l){const h=Pd(e,d);h.values.some(In.bind(null,e))&&(r.globalAlpha=Hi(e,d),r.lineWidth=dT(e,d)?o.shape.lineFocusedWidth:o.shape.lineWidth,r.strokeStyle=e.color(d.id),(f=e.config.data_regions)!=null&&f[h.id]?bT(e,h,i):Od(e,h,c,i))}r.globalAlpha=1})}drawAreas(e,n,r){const{ctx:i,painter:o,theme:{style:s}}=this,l=Ni.bind(null,e),c=e.filterTargetsToShow().filter(l).filter(Hr.bind(null,e)),u=er(e,n,jt.AREA,l),{margin:f}=e.state;e.generateGetAreaPoints&&o.withTranslation(f.left,f.top,()=>{for(const d of c){const h=Pd(e,d);if(!h.values.some(In.bind(null,e)))continue;const m=fT(e,h,r);i.globalAlpha=s.shape.areaOpacity*Hi(e,d),i.fillStyle=Ld(e,i,h,"area",e.config.area_linearGradient?hT(e,d,u):null,m),wd(e,h,u,o)}i.globalAlpha=1})}drawCircles(e,n,r){var i;if(!e.config.point_show||(i=e.isPointFocusOnly)!=null&&i.call(e))return;const{ctx:o,painter:s,theme:{style:l}}=this,{cx:c,cy:u}=n.pos,{margin:f}=e.state,d=_l(e,r,br),h=!!(r!=null&&r.some(m=>m&&br(e,m)));!c||!u||s.withTranslation(f.left,f.top,()=>{var m,A,I;for(const C of e.filterTargetsToShow()){if(!br(e,C)||!Hr(e,C)||_a(e,C)&&!yT(e,C))continue;const P=e.color(C.id),z=ac(e,C),N=Hi(e,C),B=!!e.config.point_radialGradient,W=gT(e,C,z,B),V=Wr(e,C),J=V.end-V.start,q=W?Df(e.state.width,e.state.height,Yi(e,C,C.values[V.start]||C.values[0])):null,at=rs(e,C)*N;o.fillStyle=P,o.globalAlpha=at;const et=l.shape.pointFillColor||P,ot=l.shape.pointStrokeColor||P,lt=ot?(m=l.shape.pointLineWidth)!=null?m:1:0,ft=!!ot&<>0,_=ft&&z==="circle"&&ge(at)&&at<1&&et===ot;if(!h&&!B&&z==="circle")if(o.fillStyle=et,ft&&!_&&(o.strokeStyle=ot,o.lineWidth=lt),J>sT)for(let dt=V.start;dt<V.end;dt++){const ut=C.values[dt];if(!In(e,ut))continue;const xt=Yi(e,C,ut),bt=_?xt+lt/2:xt,Rt=c(ut,dt),Et=u(ut,dt);pn(Rt,Et)&&(q&&!Ff(q,Rt,Et)||(o.beginPath(),o.arc(Rt,Et,bt,0,Math.PI*2),o.fill(),ft&&!_&&o.stroke()))}else{o.beginPath();for(let dt=V.start;dt<V.end;dt++){const ut=C.values[dt];if(!In(e,ut))continue;const xt=Yi(e,C,ut),bt=_?xt+lt/2:xt,Rt=c(ut,dt),Et=u(ut,dt);pn(Rt,Et)&&s.traceCircle(Rt,Et,bt)}o.fill(),ft&&!_&&o.stroke()}else for(let dt=V.start;dt<V.end;dt++){const ut=C.values[dt];if(!In(e,ut))continue;const xt=d(ut),bt=Yi(e,C,ut),Rt=xt?(I=(A=e.pointExpandedR)==null?void 0:A.call(e,ut))!=null?I:bt*1.75:bt,Et=c(ut,dt),Zt=u(ut,dt),fe=ji(e,ut),me=fe||P,xe=l.shape.pointFillColor||me,Te=l.shape.pointStrokeColor||me,Fe=xt&&(fe||l.focusPoint.fill)||xe,Ie=xt?fe||l.focusPoint.stroke||me:Te,ke=xt?l.focusPoint.lineWidth:lt,Jt=rs(e,ut)*N,Ae=!!Ie&&(ke!=null?ke:0)>0,Le=z==="circle"&&Ae&&ge(Jt)&&Jt<1&&Fe===Ie,Yt=Le?Rt+(ke||0)/2:Rt;pn(Et,Zt)&&(o.fillStyle=B?xT(e,o,ut,Et,Zt,Rt,me):Fe,o.globalAlpha=Jt,Vi(s,z,Et,Zt,Yt,Ae&&!Le?{fill:o.fillStyle,stroke:Ie,lineWidth:ke}:void 0,bt))}}})}drawSelections(e,n){var r,i;const o=(r=e.getCanvasSelectedData)==null?void 0:r.call(e);if(!e.config.data_selection_enabled||!(o!=null&&o.length)||e.state.hasTreemap)return;const{ctx:s,painter:l,theme:{style:c}}=this,{margin:u}=e.state,f=nr.bind(null,e),d=Yn.bind(null,e),h=o.some(f)?e.generateGetBarPoints(er(e,n,jt.BAR,f),!1):null,m=o.some(d)?(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,er(e,n,jt.CANDLESTICK,d),!1):null,A=h?Wl(e):null,I=A?Vl(e):new Set;l.withTranslation(u.left,u.top,()=>{o.forEach(C=>{var P,z,N,B,W,V;const J=e.color(C.id);if(f(C)&&h){const q=Xi(e,h,C,C.index);if(!q)return;const{points:at,rect:et}=q,ot=A?jl(e,C,at,A,I).corners:0;A?l.fillRoundRect(et,ot,{fill:"#fff",alpha:.3}):l.fillRect(et,{fill:"#fff",alpha:.3}),A?l.strokeRoundRect(et,ot,{stroke:J,lineWidth:2}):l.strokeRect(et,{stroke:J,lineWidth:2})}else if(d(C)&&m){if(!((P=e.getCandlestickData)==null?void 0:P.call(e,C)))return;const at=Gi(e,m,C,C.index);if(!at)return;const{body:et,wickStart:ot,wickEnd:lt}=at;l.strokePath(()=>{l.traceLine(ot[0],ot[1],lt[0],lt[1])},{stroke:J,lineWidth:3}),l.fillRect(et,{fill:"#fff",alpha:.3}),l.strokeRect(et,{stroke:J,lineWidth:2})}else if(br(e,C)){const q=ac(e,{id:C.id}),{x:at,y:et}=ki(e,C),ot=(N=(z=e.pointR)==null?void 0:z.call(e,C))!=null?N:2.5,lt=(W=(B=e.pointSelectR)==null?void 0:B.call(e,C))!=null?W:ot*2;if(!pn(at,et))return;Vi(l,"circle",at,et,lt,{fill:c.selectedPoint.fill,lineWidth:c.selectedPoint.lineWidth,stroke:c.selectedPoint.stroke||J}),Vi(l,q,at,et,ot,{fill:c.shape.pointFillColor||J,stroke:c.shape.pointStrokeColor||J,lineWidth:(V=c.shape.pointLineWidth)!=null?V:1})}}),s.globalAlpha=1})}drawLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,painter:o,theme:{style:s}}=this,{margin:l}=e.state,{cx:c,cy:u}=n.pos,f=n.indices[jt.BAR]?e.generateGetBarPoints(n.indices[jt.BAR],!1):null,d=e.generateGetCandlestickPoints?e.generateGetCandlestickPoints(er(e,n,jt.CANDLESTICK,Yn.bind(null,e)),!1):null,h=e.filterTargetsToShow().filter(C=>(nr(e,C)||br(e,C)||Ni(e,C)||Yn(e,C))&&Hr(e,C)),m=[];let A=0;h.forEach(C=>{const P=Wr(e,C),z=e.labelishData(C),N=[];for(let B=0;B<z.length;B++){const W=z[B],V=fd(e,W);V&&W.index>=P.start&&W.index<P.end&&In(e,W)&&N.push({d:W,text:V})}A+=N.length,N.length&&m.push(N)});const I={size:()=>A};o.withTranslation(l.left,l.top,()=>{i.font=s.label.font,i.textAlign="center",m.forEach(C=>{var P,z;for(const{d:N,text:B}of C){let W,V;if(nr(e,N)&&f){const J=Xi(e,f,N,N.index);if(!J)continue;const{points:q,rect:at}=J,et=e.getBaseValue(N),ot=Jo(e,q[2]),lt=et<0,ft=ql(i,B,0,0).h;W=e.config.axis_rotated&&!e.config.data_labels.centered?ot[0]+(lt?-4:4):at.x+at.w/2,V=e.config.data_labels.centered||e.config.axis_rotated?at.y+at.h/2:ot[1]+(lt?ft-3:-3),i.textAlign=e.config.axis_rotated&&!e.config.data_labels.centered?lt?"right":"left":"center",i.textBaseline=e.config.data_labels.centered||e.config.axis_rotated?"middle":"alphabetic"}else if(Yn(e,N)&&d){const J=(P=e.getCandlestickData)==null?void 0:P.call(e,N),q=Gi(e,d,N,N.index),at=J==null?void 0:J._isUp;if(!q)continue;const{wickEnd:et,wickStart:ot}=q,lt=e.config[`axis_${(z=e.axis)==null?void 0:z.getId(N.id)}_inverted`];W=e.config.axis_rotated?at?et[0]+4:ot[0]-4:ot[0],V=e.config.axis_rotated?ot[1]+3:at?et[1]-3:ot[1]+12,!e.config.axis_rotated&<&&(V+=15*(at?1:-1)),i.textAlign=e.config.axis_rotated?at?"left":"right":"center",i.textBaseline="alphabetic"}else c&&u&&({x:W,y:V}=h0(n.pos,N,N.index),{x:W,y:V}=vd(e,i,N,W,V));W+=ts(e,N,"x",I),V+=ts(e,N,"y",I),pn(W,V)&&this.drawDataLabel(e,N,B,W,V)}})})}drawEmptyLabel(e){const n=e.config.data_empty_label_text,r=e.filterTargetsToShow();if(!n||r.length)return;const{margin:i,width:o,height:s}=e.state,{style:l}=this.theme;this.painter.text(String(n),i.left+o/2,i.top+s/2,{fill:l.emptyLabel.color,font:l.emptyLabel.font,textAlign:"center",textBaseline:"middle"})}drawZoomBrush(e,n,r){const{axis_rotated:i}=e.config,{height:o,margin:s,width:l}=e.state,c=Math.min(n,r),u=Math.abs(r-n),f=i?{x:s.left,y:s.top+c,w:l,h:u}:{x:s.left+c,y:s.top,w:u,h:o};u<=0||this.painter.fillRect(f,{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawSelectionDragArea(e,n){const{margin:r,width:i,height:o}=e.state,s={x:r.left,y:r.top,w:i,h:o},l=Math.max(s.x,n.x),c=Math.max(s.y,n.y),u=Math.min(s.x+s.w,n.x+n.w),f=Math.min(s.y+s.h,n.y+n.h);u<=l||f<=c||this.painter.fillRect({x:l,y:c,w:u-l,h:f-c},{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawTreemaps(e){var n;const{ctx:r,painter:i,theme:{style:o}}=this,{config:s}=e,l=(n=e.getTreemapRoot)==null?void 0:n.call(e,e.data.targets),c=(l==null?void 0:l.children)||[];i.withState(()=>{var u;r.lineWidth=o.treemap.lineWidth,r.strokeStyle=o.treemap.stroke;for(const f of c){const{data:d}=f;if(!Il(e,d))continue;const{x:h,y:m,w:A,h:I}=ti(e,f,l,!0);if(!pn(h,m)||!pn(h+A,m+I)||A<=0||I<=0)continue;const C={x:h,y:m,w:A,h:I};if(r.fillStyle=e.color(d.name),i.fillRect(C),i.strokeRect(C),!s.treemap_label_show||(d.ratio||0)<(s.treemap_label_threshold||0))continue;const P=v0(e,d,A,I);if(!P)continue;const z=P.split(`
|
|
38
|
-
`),N=!!s.data_labels.centered;r.font=o.label.font;const B=Tr(r.font),W=r.measureText((u=z[0])!=null?u:""),V=(W.fontBoundingBoxAscent||0)+(W.fontBoundingBoxDescent||0)||(W.actualBoundingBoxAscent||0)+(W.actualBoundingBoxDescent||0),J=Math.max(B,V)+(z.length-1)*B,q=N?m+I/2:m+J+5;let at=N?h+A/2:h+5,et=q-(z.length-1)*B/(N?2:1);r.textAlign=N?"center":"left",r.textBaseline=N?"middle":"alphabetic",{x:at,y:et}=this.drawLabelImage(e,d,P,at,et),r.fillStyle=hd(e,d,o.label.color),gd(e,i,d,P,at,N?et+(z.length-1)*B/2:q),z.forEach((ot,lt)=>{i.text(ot,at,et+lt*B,{maxWidth:Math.max(0,A-8)})})}})}drawFocus(e,n){if(!(n!=null&&n.length))return;const{painter:r}=this,{style:i}=this.theme,{margin:o}=e.state,s=n.find(l=>l&&In(e,l));r.withTranslation(o.left,o.top,()=>{if(e.config.tooltip_show&&e.config.grid_focus_show!==!1&&!e.config.axis_tooltip&&s){const{x:l,y:c}=ki(e,s),u=i.axis.lineWidth,f=e.config.axis_rotated,d=Number.isFinite(f?c:l),h=Number.isFinite(f?l:c),m=C=>r.crisp(o.left+C,u)-o.left,A=C=>r.crisp(o.top+C,u)-o.top,I=e.config.grid_focus_edge&&!e.config.tooltip_grouped;d&&r.strokePath(()=>{var C,P;if(f){if(r.traceLine(m(0),c,I&&h?l:m(e.state.width),c),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const z=((C=e.axis)==null?void 0:C.getId(s.id))==="y2";r.traceLine(l,I&&!z?c:A(0),l,I&&z?c:A(e.state.height))}}else if(r.traceLine(l,I&&h?c:A(0),l,A(e.state.height)),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const z=((P=e.axis)==null?void 0:P.getId(s.id))==="y2";r.traceLine(I&&z?l:m(0),c,I&&!z?l:m(e.state.width),c)}},{lineDash:i.focusGrid.dashArray,lineWidth:i.focusGrid.lineWidth,stroke:i.focusGrid.lineColor})}e.config.point_show&&!e.state.canvasFocusMainRedraw&&n.filter(l=>l&&In(e,l)&&br(e,l)&&Hr(e,{id:l.id})).forEach(l=>{var c,u,f,d;const h=ac(e,{id:l.id}),{x:m,y:A}=ki(e,l),I=(u=(c=e.pointR)==null?void 0:c.call(e,l))!=null?u:2.5,C=(d=(f=e.pointExpandedR)==null?void 0:f.call(e,l))!=null?d:I*1.75,P=ji(e,l),z=P||e.color(l.id),N=P||i.focusPoint.fill||i.shape.pointFillColor||z,B=P||i.focusPoint.stroke||z,W=i.focusPoint.lineWidth,V=rs(e,l),J=!!B&&(W!=null?W:0)>0,q=h==="circle"&&J&&ge(V)&&V<1&&N===B;pn(m,A)&&Vi(r,h,m,A,q?C+(W||0)/2:C,J&&!q?{fill:N,lineWidth:W,stroke:B,alpha:V}:{fill:N,alpha:V},I)}),this.drawFocusLabels(e,n)})}}var AT=Object.defineProperty,Fd=Object.getOwnPropertySymbols,ET=Object.prototype.hasOwnProperty,CT=Object.prototype.propertyIsEnumerable,IT=(t,e,n)=>e in t?AT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,RT=(t,e)=>{var n={};for(var r in t)ET.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Fd)for(var r of Fd(t))e.indexOf(r)<0&&CT.call(t,r)&&(n[r]=t[r]);return n},ic=(t,e,n)=>IT(t,typeof e!="symbol"?e+"":e,n);const Pr="http://www.w3.org/2000/svg";function De(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:"");return Number.isFinite(n)?n:e}function Pa(t,e){const n=De(t.opacity,1),r=De(t["fill-opacity"],1),i=n*r;return Number.isFinite(i)?i:e}function Xe(t,e){const n=t==null?void 0:t.trim();return n&&!/^(none|transparent|rgba\(0,\s*0,\s*0,\s*0\))$/i.test(n)?n:e}function ni(t,e){const n=Xe(t,""),r=e?Xe(e,""):"";return n&&n!==r?n:void 0}function ri(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:""),r=typeof e=="number"?e:parseFloat(e!=null?e:"");return Number.isFinite(n)&&(!Number.isFinite(r)||n!==r)?n:void 0}function Ki(t){return Array.isArray(t)?t.filter(e=>Number.isFinite(e)&&e>0):(t||"").split(/[,\s]+/).map(e=>parseFloat(e)).filter(e=>Number.isFinite(e)&&e>0)}function OT(t,e){const n=t.getPropertyValue("font").trim();if(n)return n;const r=t.getPropertyValue("font-size").trim(),i=t.getPropertyValue("font-family").trim();if(!r||!i)return e;const o=t.getPropertyValue("font-style").trim(),s=t.getPropertyValue("font-variant").trim(),l=t.getPropertyValue("font-weight").trim(),c=t.getPropertyValue("line-height").trim(),u=c&&c!=="normal"?`${r}/${c}`:r;return[o&&o!=="normal"?o:"",s&&s!=="normal"?s:"",l&&!/^(normal|400)$/.test(l)?l:"",u,i].filter(Boolean).join(" ")}function Mr(t,e){var n;const r=e.replace(/-([a-z])/g,(i,o)=>o.toUpperCase());return(n=t[e])!=null?n:t[r]}function _e(t,e){const n=Mr(t,e);return(n==null?"":Xe(String(n),""))||void 0}function Ln(t,e){const n=Mr(t,e),r=typeof n=="number"?n:parseFloat(String(n!=null?n:""));return Number.isFinite(r)?r:void 0}function ha(t){const e=Ln(t,"opacity"),n=Ln(t,"fill-opacity");return e===void 0&&n===void 0?void 0:(e!=null?e:1)*(n!=null?n:1)}function Nd(t){const e=Mr(t,"stroke-dasharray"),n=e==null?[]:Ki(e);return n.length?n:void 0}function fr(t){var e,n,r,i;const o=Mr(t,"font");if(o!=null&&String(o).trim())return String(o).trim();const s=Mr(t,"font-size"),l=Mr(t,"font-family");if(s==null||l==null)return;const c=String(s).trim(),u=String(l).trim();if(!c||!u)return;const f=String((e=Mr(t,"font-style"))!=null?e:"").trim(),d=String((n=Mr(t,"font-variant"))!=null?n:"").trim(),h=String((r=Mr(t,"font-weight"))!=null?r:"").trim(),m=String((i=Mr(t,"line-height"))!=null?i:"").trim();return[f&&f!=="normal"?f:"",d&&d!=="normal"?d:"",h&&!/^(normal|400)$/.test(h)?h:"",m&&m!=="normal"?`${c}/${m}`:c,u].filter(Boolean).join(" ")}function Je(t,e,n){var r;const i=Object.keys(n).reduce((o,s)=>(n[s]!==void 0&&(o[s]=n[s]),o),{});Object.keys(i).length&&(t[e]=Gr((r=t[e])!=null?r:{},i))}function wT(t){return t.split(",").map(e=>e.trim().replace(/\s*>\s*/g," ").replace(/\s+/g," ").replace(/^(?:svg)?\.bb\s+/,"").replace(/(^|\s)(?:g|path|rect|line|text|circle)\./g,"$1.")).filter(Boolean)}function PT(t,e,n){switch(e){case".bb-axis path.domain":case".bb-axis .domain":case".bb-axis-x path.domain":case".bb-axis-x .domain":case".bb-axis-y path.domain":case".bb-axis-y .domain":case".bb-axis-y2 path.domain":case".bb-axis-y2 .domain":Je(t,"axis",{lineColor:_e(n,"stroke"),lineWidth:Ln(n,"stroke-width")});break;case".bb-axis line":case".bb-axis .tick line":case".bb-axis-x line":case".bb-axis-x .tick line":case".bb-axis-y line":case".bb-axis-y .tick line":case".bb-axis-y2 line":case".bb-axis-y2 .tick line":Je(t,"axis",{tickColor:_e(n,"stroke"),tickWidth:Ln(n,"stroke-width")});break;case".bb-axis text":case".bb-axis .tick text":{const r=fr(n);Je(t,"axis",{labelColor:_e(n,"fill"),xTickFont:r,yTickFont:r,y2TickFont:r});break}case".bb-axis-x text":case".bb-axis-x .tick text":Je(t,"axis",{labelColor:_e(n,"fill"),xTickFont:fr(n)});break;case".bb-axis-y text":case".bb-axis-y .tick text":Je(t,"axis",{labelColor:_e(n,"fill"),yTickFont:fr(n)});break;case".bb-axis-y2 text":case".bb-axis-y2 .tick text":Je(t,"axis",{labelColor:_e(n,"fill"),y2TickFont:fr(n)});break;case".tick._active_ text":case".bb-axis .tick._active_ text":case".bb-axis-x .tick._active_ text":Je(t,"axis",{activeLabelColor:_e(n,"fill")});break;case".bb-axis-x-label":case".bb-axis-x .bb-axis-x-label":Je(t,"axis",{labelFont:fr(n),xLabelColor:_e(n,"fill")});break;case".bb-axis-y-label":case".bb-axis-y .bb-axis-y-label":Je(t,"axis",{labelFont:fr(n),yLabelColor:_e(n,"fill")});break;case".bb-axis-y2-label":case".bb-axis-y2 .bb-axis-y2-label":Je(t,"axis",{labelFont:fr(n),y2LabelColor:_e(n,"fill")});break;case".bb-grid line":case".bb-grid .bb-xgrid":case".bb-grid .bb-ygrid":case".bb-xgrid":case".bb-ygrid":Je(t,"grid",{lineColor:_e(n,"stroke"),lineWidth:Ln(n,"stroke-width"),dashArray:Nd(n)});break;case".bb-grid text":Je(t,"grid",{labelColor:_e(n,"fill"),labelFont:fr(n)});break;case".bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus":Je(t,"focusGrid",{lineColor:_e(n,"stroke"),lineWidth:Ln(n,"stroke-width"),dashArray:Nd(n)});break;case".bb-region rect":case".bb-region":Je(t,"region",{fill:_e(n,"fill"),opacity:ha(n)});break;case".bb-region text":Je(t,"region",{labelColor:_e(n,"fill"),labelFont:fr(n)});break;case".bb-bar":Je(t,"shape",{barOpacity:ha(n),barStrokeColor:_e(n,"stroke"),barLineWidth:Ln(n,"stroke-width")});break;case".bb-bar._expanded_":Je(t,"shape",{barExpandedOpacity:ha(n)});break;case".bb-candlestick":Je(t,"shape",{candlestickStrokeColor:_e(n,"stroke"),candlestickLineWidth:Ln(n,"stroke-width")});break;case".bb-candlestick._expanded_":Je(t,"shape",{candlestickExpandedOpacity:ha(n)});break;case".bb-line":Je(t,"shape",{barConnectLineColor:_e(n,"stroke"),barConnectLineWidth:Ln(n,"stroke-width"),lineWidth:Ln(n,"stroke-width")});break;case".bb-target.bb-focused .bb-line":case".bb-target.bb-focused path.bb-line":Je(t,"shape",{lineFocusedWidth:Ln(n,"stroke-width")});break;case".bb-target.bb-defocused":Je(t,"shape",{targetDefocusedOpacity:Ln(n,"opacity")});break;case".bb-area":Je(t,"shape",{areaOpacity:ha(n)});break;case".bb-circle":Je(t,"shape",{pointFillColor:_e(n,"fill"),pointStrokeColor:_e(n,"stroke"),pointLineWidth:Ln(n,"stroke-width")});break;case".bb-selected-circle":Je(t,"selectedPoint",{fill:_e(n,"fill"),stroke:_e(n,"stroke"),lineWidth:Ln(n,"stroke-width")});break;case".bb-circle._expanded_":Je(t,"focusPoint",{fill:_e(n,"fill"),stroke:_e(n,"stroke"),lineWidth:Ln(n,"stroke-width")});break;case".bb-zoom-brush":Je(t,"zoomBrush",{fill:_e(n,"fill"),opacity:ha(n)});break;case".bb-brush .extent":case".bb-brush .selection":Je(t,"subchartBrush",{fill:_e(n,"fill"),opacity:ha(n)});break;case".bb-brush .handle--custom":Je(t,"subchartBrush",{handleFill:_e(n,"fill"),handleOpacity:ha(n),handleStroke:_e(n,"stroke"),handleLineWidth:Ln(n,"stroke-width")});break;case".bb-chart-treemaps rect":case".bb-chart-treemaps":Je(t,"treemap",{stroke:_e(n,"stroke"),lineWidth:Ln(n,"stroke-width")});break;case".bb-text.bb-empty":case".bb-text .bb-empty":case".bb-empty":Je(t,"emptyLabel",{color:_e(n,"fill"),font:fr(n)});break;case".bb-text":Je(t,"label",{color:_e(n,"fill"),font:fr(n)});break;case".bb-title":Je(t,"title",{color:_e(n,"fill"),font:fr(n)});break}}function MT(t){const e={};return Object.keys(t!=null?t:{}).forEach(n=>{wT(n).forEach(r=>{PT(e,r,t[n])})}),e}function LT(t){if(!t)return{};const e=t,{selectors:n}=e,r=RT(e,["selectors"]);return Gr({},MT(n),r)}function $d(t,e){try{return JSON.stringify({className:t.className,style:t.getAttribute("style")||"",override:e||null})}catch(n){return null}}class DT{constructor(){ic(this,"style"),ic(this,"cacheContainer",null),ic(this,"cacheKey",null)}load(e,n){var r,i,o,s;const l=He.createElementNS(Pr,"svg");l.setAttribute("class","bb"),l.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:0;height:0;overflow:hidden",e.appendChild(l);const c=(On,Wn)=>{const Zn=ce.getComputedStyle(On),_n={};for(const Nn of Wn)_n[Nn]=Nn==="font"?OT(Zn,""):Zn.getPropertyValue(Nn).trim();return _n},u=(On,Wn,Zn)=>{const _n=He.createElementNS(Pr,On);_n.setAttribute("class",Wn),l.appendChild(_n);const Nn=c(_n,Zn);return l.removeChild(_n),Nn},f=(On,Wn,Zn,_n)=>{const Nn=He.createElementNS(Pr,"g"),gr=He.createElementNS(Pr,Wn);Nn.setAttribute("class",On),Zn&&gr.setAttribute("class",Zn),Nn.appendChild(gr),l.appendChild(Nn);const na=c(gr,_n);return l.removeChild(Nn),na},d=(On,Wn,Zn,_n,Nn)=>{const gr=He.createElementNS(Pr,"g"),na=He.createElementNS(Pr,"g"),go=He.createElementNS(Pr,Zn);gr.setAttribute("class",On),na.setAttribute("class",Wn),_n&&go.setAttribute("class",_n),na.appendChild(go),gr.appendChild(na),l.appendChild(gr);const aR=c(go,Nn);return l.removeChild(gr),aR},h=(On,Wn,Zn,_n="")=>{const Nn=He.createElementNS(Pr,"g"),gr=He.createElementNS(Pr,"g"),na=He.createElementNS(Pr,Wn);Nn.setAttribute("class",`bb-axis ${On}`),gr.setAttribute("class",["tick",_n].filter(Boolean).join(" ")),na.textContent=Wn==="text"?"0":"",gr.appendChild(na),Nn.appendChild(gr),l.appendChild(Nn);const go=c(na,Zn);return l.removeChild(Nn),go},m="rgb(1, 2, 3)",A=(On,Wn)=>{const Zn=He.createElement("style");Zn.textContent=`
|
|
34
|
+
`):t.config.axis_x_tick_multiline?I0(u,l!=null?l:Zl(t,i,o,s),e):[u]}function Jl(t,e){const{isRotated:n,tickCount:r,tickIndex:i,tickRotate:o,tickTextDirection:s}=e,l=t.config.axis_x_tick_text_inner;let c=n?s>0?"left":"right":o?o>0?"left":"right":"center";return!n&&i===0&&(l===!0||l!=null&&l.first)?c="left":!n&&i===r-1&&(l===!0||l!=null&&l.last)&&(c="right"),c}function R0(t,e){var n,r;return((n=t==null?void 0:t.indexOf("center"))!=null?n:-1)>-1?{x:e/2,align:"center"}:((r=t==null?void 0:t.indexOf("right"))!=null?r:-1)>-1?{x:e,align:"right"}:{x:0,align:"left"}}function pa(t){return Number.isFinite(t)}function rs(t,e,n){return pa(t)&&t>=Math.min(e,n)&&t<=Math.max(e,n)}function cd(t){return t?-1:1}function w0(t,e,n){return e?n?t.axis_y2_inner?1:-1:t.axis_y_inner?-1:1:n?t.axis_y2_inner?-1:1:t.axis_y_inner?1:-1}function Ql(t,e,n=tr(t)){return n(Jr(t,e))}function O0(t,e){var n,r;return(r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&typeof e=="string"&&Number.isNaN(Number(e))?t.config.axis_x_categories.indexOf(e):Jr(t,e)}function P0(t,e){var n,r;return!!((r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&Number.isNaN(Number(e)))}function ud(t,e,n,r){var i,o;if(e===void 0)return n;let s=tr(t)(O0(t,e));if(P0(t,e)){const l=tr(t),c=((o=(i=t.axis.x)==null?void 0:i.tickOffset)==null?void 0:o.call(i))||(l(1)-l(0))/2;s+=c*(r==="start"?-1:1)}return s}function fd(t,e,n="y"){return t.scale[n||"y"](Xi(t,e,n))}function dd(t,e,n){return t==="start"?e+4:t==="middle"?(e+n)/2:n-4}function hd(t,e,n){return t==="start"?n-4:t==="middle"?(e+n)/2:e+4}function M0(t,e){const{config:n,scale:r,state:{width:i,height:o}}=t,s=e.axis||"x",l=n.axis_rotated;if(s==="x"){const h=ud(t,e.start,0,"start"),m=ud(t,e.end,l?o:i,"end"),S=Math.min(h,m),E=Math.abs(m-h);return l?{x:0,y:S,w:i,h:E}:{x:S,y:0,w:E,h:o}}if(!r[s])return null;const c=e.start===void 0?l?0:o:fd(t,e.start,s),u=e.end===void 0?l?i:0:fd(t,e.end,s),f=Math.min(c,u),d=Math.abs(u-c);return l?{x:f,y:0,w:d,h:o}:{x:0,y:f,w:i,h:d}}class L0{constructor(e,n){Wl(this,"engine",e),Wl(this,"theme",n),Wl(this,"painter"),this.painter=new ed(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}draw(e){this.drawRegions(e),this.drawGrid(e),this.drawAxis(e)}drawAxis(e){const{config:n}=e;n.axis_x_show&&this.drawXAxis(e),n.axis_y_show&&this.drawYAxis(e),n.axis_y2_show&&e.scale.y2&&this.drawYAxis(e,"y2"),this.drawAdditionalAxes(e),this.drawAxisLabels(e)}drawSubXAxis(e){var n,r,i,o;const{ctx:s,painter:l,theme:{style:{axis:c}}}=this,{config:u,format:f,scale:d,state:{current:h,margin2:m,width2:S,height2:E}}=e;if(!u.subchart_show||!u.subchart_axis_x_show||!d.subX||S<=0||E<=0)return;const C=u.axis_rotated,w=l.crisp(m.left,c.lineWidth),N=l.crisp(m.top+E,c.lineWidth),z=m.left,$=m.left+S,G=m.top,V=m.top+E,J=C?G:z,Q=C?V:$,rt=_f(e),et=n0(e,rt,c.tickWidth),st=(n=u.subchart_axis_x_tick_outer)!=null?n:u.axis_x_tick_outer,ct=C?u.axis_x_tick_inner?1:-1:u.axis_x_tick_inner?-1:1,dt=cd(C),q=Vl(C),ft=u.axis_x_tick_text_position,lt=C?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0,pt=f.subXAxisTick||((o=(i=e.axis)==null?void 0:i.getXAxisTickFormat)==null?void 0:o.call(i,!0));l.clipRect(C?Hl(m,h.width,E):ad(rd({},jl(m,S,h.height-m.top)),{y:m.top}),()=>{s.globalAlpha=1,s.strokeStyle=c.lineColor,s.lineWidth=c.lineWidth,s.setLineDash([]),l.strokePath(()=>{C?l.traceLine(w,G,w,V):l.traceLine(z,N,$,N),st&&(C?(l.traceLine(w,G,w+Dt*dt,G),l.traceLine(w,V,w+Dt*dt,V)):(l.traceLine(z,N,z,N+Dt*dt),l.traceLine($,N,$,N+Dt*dt)))});const Tt=ji(c,"x");s.font=Tt,s.fillStyle=c.labelColor,s.textAlign=C?q>0?"left":"right":"center",s.textBaseline=C?"middle":q>0?"top":"bottom",s.strokeStyle=c.tickColor,s.lineWidth=c.tickWidth;const Rt=Yl(l,Sr(Tt)),Ct=Zl(e,rt,C,d.subX);if(u.subchart_axis_x_tick_show)for(const Kt of et){const re=d.subX(Jr(e,Kt)),Ee=m.left+re,Ce=m.top+re;rs(C?Ce:Ee,J,Q)&&l.strokePath(()=>{C?l.traceLine(w,Ce,w+Dt*ct,Ce):l.traceLine(Ee,N,Ee,N+Dt*ct)})}for(const Kt of rt){const re=d.subX(Jr(e,Kt)),Ee=m.left+re,Ce=m.top+re;if(!rs(C?Ce:Ee,J,Q)||!u.subchart_axis_x_tick_text_show)continue;const Ne=ld(e,l,pt,Kt,rt,C,d.subX,Ct);let ye,De;C?(ye=w+(Dt+fn)*q+(ft.x||0),De=Ce+(ft.y||0),s.textAlign=q>0?"left":"right",s.textBaseline="middle"):(ye=Ee+(ft.x||0),De=N+(Dt+fn)*q+(ft.y||0),s.textAlign=lt?lt>0?"left":"right":"center",s.textBaseline=q>0?"top":"bottom"),l.withState(Zt=>{Zt.translate(ye,De),lt&&Zt.rotate(lt*Math.PI/180),Ne.forEach((ve,xe)=>{Zt.fillText(ve,0,xe*Rt)})})}})}drawSubYAxes(e){const{config:n,scale:r,state:{margin2:i,width2:o,height2:s}}=e;!n.subchart_show||o<=0||s<=0||["y","y2"].forEach(l=>{var c;const u=l==="y2"?r.subY2:r.subY;!n[`subchart_axis_${l}_show`]||!u||this.drawYAxis(e,l,{scale:u,ticks:Vi(e,l,void 0,!0,u,`subchart_axis_${l}`),format:m0(e,l),index:0,outerTick:(c=n[`subchart_axis_${l}_tick_outer`])!=null?c:n[`axis_${l}_tick_outer`],margin:i,width:o,height:s,prefix:`subchart_axis_${l}`,tickShow:n[`subchart_axis_${l}_tick_show`],tickTextShow:n[`subchart_axis_${l}_tick_text_show`],tickTextPosition:n[`axis_${l}_tick_text_position`]})})}drawTitle(e){var n,r;const{ctx:i,painter:o,theme:{style:{title:s}}}=this,{config:l,state:{current:c}}=e;if(!l.title_text)return;const u=String(l.title_text).split(`
|
|
35
|
+
`),f=Sr(s.font),d=f*1.5,{x:h,align:m}=R0(l.title_position,c.width),S=(r=(n=e.getCanvasTitleHeight)==null?void 0:n.call(e))!=null?r:f,E=(l.title_padding.top||0)+S;o.withState(()=>{i.font=s.font,i.fillStyle=s.color,i.textAlign=m,i.textBaseline="alphabetic",u.forEach((C,w)=>{i.fillText(C,h,E+(w?f+(w-1)*d:0))})})}drawAxisLabels(e){const{ctx:n,painter:r,theme:{style:{axis:i}}}=this,{axis:o,config:s}=e,l=Sr(i.labelFont),c=["x","y","y2"],u={x:i.xLabelColor,y:i.yLabelColor,y2:i.y2LabelColor},f={start:"left",middle:"center",end:"right"};o&&r.withState(()=>{n.font=i.labelFont,n.textBaseline="alphabetic",c.forEach(d=>{const h=o.getLabelText(d);if(!h||!s[`axis_${d}_show`]||d==="y2"&&!e.scale.y2)return;const m=d==="x"&&s.axis_rotated||d!=="x"&&!s.axis_rotated,S=S0(e,d),E=o.xForAxisLabel(d)+Kl(o.dxForAxisLabel(d),l),C=Kl(o.dyForAxisLabel(d),l),{x:w,y:N}=A0(S,E,C,m),z=o.textAnchorForAxisLabel(d);n.fillStyle=u[d]||i.labelColor,n.textAlign=f[z]||"center",r.text(String(h),w,N,{angle:m?-90:0})})})}drawGrid(e){const{ctx:n,painter:r,theme:{style:{grid:i}}}=this,{config:o,scale:s,state:{height:l,margin:c,width:u}}=e;if(!i.lineColor)return;const f=o.axis_rotated,d=c.left,h=c.left+u,m=c.top,S=c.top+l;r.withState(()=>{n.strokeStyle=i.lineColor,n.lineWidth=i.lineWidth,i.dashArray.length&&n.setLineDash(i.dashArray),o.grid_x_show&&s.x&&r.strokePath(()=>{for(const E of ts(e)){const C=Ql(e,E);pa(C)&&(f?r.traceCrispLine(d,c.top+C,h,c.top+C,i.lineWidth):r.traceCrispLine(c.left+C,m,c.left+C,S,i.lineWidth))}}),o.grid_y_show&&s.y&&r.strokePath(()=>{for(const E of s0(e)){const C=Xi(e,E),w=s.y(C);pa(w)&&(f?r.traceCrispLine(c.left+w,m,c.left+w,S,i.lineWidth):r.traceCrispLine(d,c.top+w,h,c.top+w,i.lineWidth))}}),!o.grid_lines_front&&this.drawGridLines(e)})}drawRegions(e){const{ctx:n,painter:r,theme:{style:{region:i}}}=this,{config:o,state:{height:s,margin:l,width:c}}=e,u=o.regions||[];u.length&&r.clipRect({x:l.left,y:l.top,w:c,h:s},()=>{var f;n.fillStyle=i.fill,n.font=i.labelFont,n.textBaseline="top";for(const d of u){const h=M0(e,d);if(!h||!pa(h.x)||!pa(h.y)||!h.w||!h.h)continue;const m=l.left+h.x,S=l.top+h.y,E=h.w,C=h.h;if(n.globalAlpha=Number.isFinite(d.opacity)?d.opacity:i.opacity,r.fillRect({x:m,y:S,w:E,h:C}),(f=d.label)!=null&&f.text){const w=d.label,N=w.center||"",z=String(w.text),$=r.measureText(z).width,G=parseFloat(n.font)||12;let V=m+(w.x||0),J=S+(w.y||0);N.indexOf("x")>-1&&(V+=(E-$)/2),N.indexOf("y")>-1&&(J+=(C-G)/2),r.text(z,V,J,{angle:w.rotated?-90:0,alpha:1,fill:w.color||i.labelColor})}}})}drawGridLines(e){const{ctx:n,painter:r,theme:{style:{axis:i,grid:o}}}=this,{config:s,scale:l,state:{height:c,margin:u,width:f}}=e,d=s.axis_rotated,h=u.left,m=u.left+f,S=u.top,E=u.top+c;o.lineColor&&r.withState(()=>{n.strokeStyle=o.lineColor,n.lineWidth=o.lineWidth,n.font=o.labelFont||i.labelFont,n.fillStyle=o.labelColor,n.textBaseline="middle",n.setLineDash([]);const C=(G,V,J,Q=!1,rt)=>{G&&r.text(G,V,J,ad(rd({},rt),{angle:Q?-90:0}))},w=(G,V,J)=>{const Q=x0(this.theme.getGridLineStyle(V,G,"line"));r.strokePath(J,Q)},N=(G,V)=>y0(this.theme.getGridLineStyle(G,V,"text")),z=G=>{if(G.value===void 0||!l.x)return;const V=Ql(e,G.value);if(pa(V))if(d){const J=u.top+V;w(G,"x",()=>{r.traceLine(h,J,m,J)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",C(G.text,dd(G.position,h,m),J-5,!1,N("x",G))}else{const J=u.left+V;w(G,"x",()=>{r.traceLine(J,S,J,E)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",C(G.text,J-5,hd(G.position,S,E),!0,N("x",G))}},$=G=>{const V=G.axis==="y2"?l.y2:l.y,J=G.axis==="y2"?"y2":"y";if(G.value===void 0||!V)return;const Q=Xi(e,G.value,J),rt=V(Q);if(pa(rt))if(d){const et=u.left+rt;w(G,"y",()=>{r.traceLine(et,S,et,E)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",C(G.text,et-5,hd(G.position,S,E),!0,N("y",G))}else{const et=u.top+rt;w(G,"y",()=>{r.traceLine(h,et,m,et)}),n.textAlign=G.position==="start"?"left":G.position==="middle"?"center":"right",C(G.text,dd(G.position,h,m),et-5,!1,N("y",G))}};(s.grid_x_lines||[]).forEach(z),(s.grid_y_lines||[]).forEach($)})}drawAdditionalAxes(e){["x","y","y2"].forEach(n=>{const r=e.config[`axis_${n}_axes`]||[];!r.length||!e.scale[n]||!e.config[`axis_${n}_show`]||r.forEach((i,o)=>{var s;const l=r0(e,n,i);if(!l)return;const c={scale:l,ticks:a0(e,n,l,i),format:i0(e,i),index:o+1,outerTick:((s=i.tick)==null?void 0:s.outer)!==!1};n==="x"?this.drawXAxis(e,c):this.drawYAxis(e,n,c)})})}drawXAxis(e,n){var r;const{ctx:i,painter:o,theme:{style:{axis:s}}}=this,{axis:l,config:c,state:{current:u,margin:f,width:d,height:h}}=e,m=c.axis_rotated,S=n!=null&&n.index?e.getAxisSize("x")*n.index:0,E=(n==null?void 0:n.scale)||tr(e),C=o.crisp(f.left-(m?S:0),s.lineWidth),w=o.crisp(f.top+h+(m?0:S),s.lineWidth),N=f.left,z=f.left+d,$=f.top,G=f.top+h,V=m?$:N,J=m?G:z,Q=(n==null?void 0:n.ticks)||ts(e),rt=(n==null?void 0:n.ticks)||e0(e,Q,s.tickWidth),et=(n==null?void 0:n.format)||l.getXAxisTickFormat(),st=n?n.outerTick:c.axis_x_tick_outer,ct=m?c.axis_x_tick_inner?1:-1:c.axis_x_tick_inner?-1:1,dt=cd(m),q=Vl(m),ft=c.axis_x_tick_text_position,lt=m?0:((r=e.getAxisTickRotate)==null?void 0:r.call(e,"x"))||0;o.clipRect(m?Hl(f,u.width,h):jl(f,d,u.height),()=>{if(i.strokeStyle=s.lineColor,i.lineWidth=s.lineWidth,o.strokePath(()=>{m?o.traceLine(C,$,C,G):o.traceLine(N,w,z,w),st&&(m?(o.traceLine(C,$,C+Dt*dt,$),o.traceLine(C,G,C+Dt*dt,G)):(o.traceLine(N,w,N,w+Dt*dt),o.traceLine(z,w,z,w+Dt*dt)))}),i.font=ji(s,"x"),i.fillStyle=s.labelColor,i.textAlign=m?q>0?"left":"right":"center",i.textBaseline=m?"middle":q>0?"top":"bottom",i.strokeStyle=s.tickColor,i.lineWidth=s.tickWidth,c.axis_x_tick_show&&o.strokePath(()=>{for(const Ct of rt){const Kt=Ul(e,Ct,E),re=f.left+Kt,Ee=f.top+Kt;rs(m?Ee:re,V,J)&&(m?o.traceLine(C,Ee,C+Dt*ct,Ee):o.traceLine(re,w,re,w+Dt*ct))}}),!n&&!c.axis_x_tick_text_show)return;const pt=ji(s,"x"),Tt=Yl(o,Sr(pt)),Rt=Zl(e,Q,m,E);Q.forEach((Ct,Kt)=>{this.drawXAxisTickText(e,Ct,et,s.labelColor,{isRotated:m,rangeEnd:J,rangeStart:V,tickCount:Q.length,tickFont:pt,tickIndex:Kt,tickLineHeight:Tt,tickTextDirection:q,tickTextWidth:Rt,tickRotate:lt,tickTextPosition:ft,targetScale:E,ticks:Q,x:C,y:w})})})}drawFocusedXAxisTick(e,n){var r;const{painter:i,theme:{style:{axis:o}}}=this,{axis:s,config:l,state:{current:c,margin:u,width:f,height:d}}=e,h=(r=n==null?void 0:n[0])==null?void 0:r.x;if(h===void 0||!s||!l.axis_x_show||!l.axis_x_tick_text_show||!o.activeLabelColor||o.activeLabelColor===o.labelColor)return;const m=ts(e),S=m.findIndex(J=>Wi(J,h)),E=m[S];if(E===void 0)return;const C=l.axis_rotated,w=i.crisp(u.left,o.lineWidth),N=i.crisp(u.top+d,o.lineWidth),z=C?u.top:u.left,$=C?u.top+d:u.left+f,G=s.getXAxisTickFormat(),V=Vl(C);i.clipRect(C?Hl(u,c.width,d):jl(u,f,c.height),()=>{var J;this.drawXAxisTickText(e,E,G,o.activeLabelColor,{isRotated:C,rangeEnd:$,rangeStart:z,targetScale:tr(e),tickCount:m.length,tickIndex:S,tickTextDirection:V,tickRotate:C?0:((J=e.getAxisTickRotate)==null?void 0:J.call(e,"x"))||0,tickTextPosition:l.axis_x_tick_text_position,ticks:m,x:w,y:N})})}drawAxisTooltip(e,n){const{ctx:r,painter:i,theme:{style:{axis:o,grid:s}}}=this,{config:l,state:{margin:c,width:u,height:f}}=e;if(!l.axis_tooltip||!n)return;const d=l.axis_rotated,h=n[0]-c.left,m=n[1]-c.top,S=h>=0&&h<=u,E=m>=0&&m<=f;if(!S&&!E)return;const C=c.left+h,w=c.top+m,N=Sr(o.labelFont),z=N||10,$=(G,V,J,Q,rt)=>{const et=T0(e,G),st=et&&b0(e,G,V);if(!st)return;r.font=o.labelFont,r.textAlign=rt,r.textBaseline="alphabetic";const ct=r.measureText(st),dt=ct.width,q=ct.actualBoundingBoxAscent||z*.8,ft=ct.actualBoundingBoxDescent||z*.2,lt=Math.max(2,dt*.15),pt=Math.max(3,z*.25),Tt=rt==="right"?J-dt:rt==="center"?J-dt/2:J,Rt=Q-q;r.fillStyle=et,r.fillRect(Tt-lt,Rt-pt,dt+lt*2,q+ft+pt*2),r.fillStyle="#fff",r.fillText(st,J,Q)};i.withState(()=>{r.strokeStyle=s.lineColor,r.lineWidth=s.lineWidth,r.setLineDash([]),i.strokePath(()=>{S&&i.traceLine(C,c.top,C,c.top+f),E&&i.traceLine(c.left,w,c.left+u,w)}),r.setLineDash([]),d?(E&&l.axis_x_show&&$("x",m,c.left-N*.3,w+N*.4,"right"),S&&l.axis_y_show&&$("y",h,C-N*1.3,c.top+f+N*1.15,"left"),S&&l.axis_y2_show&&e.scale.y2&&$("y2",h,C-N*1.3,c.top-N*.4,"left")):(S&&l.axis_x_show&&$("x",h,C-N,c.top+f+N*1.15,"left"),E&&l.axis_y_show&&$("y",m,c.left-N*.4,w+N*.3,"right"),E&&l.axis_y2_show&&e.scale.y2&&$("y2",m,c.left+u+N*.4,w+N*.3,"left"))})}drawXAxisTickText(e,n,r,i,o){var s,l;const{ctx:c,painter:u,theme:{style:{axis:f}}}=this,{state:{margin:d}}=e,{isRotated:h,rangeEnd:m,rangeStart:S,tickTextDirection:E,tickRotate:C,tickTextPosition:w,targetScale:N,ticks:z,x:$,y:G}=o,V=Ql(e,n,N),J=d.left+V,Q=d.top+V;if(!rs(h?Q:J,S,m))return;const et=(s=o.tickFont)!=null?s:ji(f,"x");c.font=et,c.fillStyle=i;const st=ld(e,u,r,n,z,h,N,o.tickTextWidth),ct=(l=o.tickLineHeight)!=null?l:Yl(u,Sr(et));let dt,q;if(h)dt=$+(Dt+fn)*E+(w.x||0),q=Q+(w.y||0),c.textAlign=Jl(e,o),c.textBaseline="middle";else if(C){const ft=Sr(et),lt=w.y?Kl(w.y,ft):.71*ft,pt=C0(C)+(w.x||0),Tt=E0(C)+lt;c.textAlign=Jl(e,o),c.textBaseline="alphabetic",u.withState(Rt=>{Rt.translate(J,G),Rt.rotate(C*Math.PI/180),st.forEach((Ct,Kt)=>{Rt.fillText(Ct,pt,Tt+Kt*ct)})});return}else dt=J+(w.x||0),q=G+(Dt+fn)*E+(w.y||0),c.textAlign=Jl(e,o),c.textBaseline=E>0?"top":"bottom";u.withState(ft=>{ft.translate(dt,q),C&&ft.rotate(C*Math.PI/180),st.forEach((lt,pt)=>{ft.fillText(lt,0,pt*ct)})})}drawYAxis(e,n="y",r){var i,o,s,l,c,u,f,d;const{ctx:h,painter:m,theme:{style:{axis:S}}}=this,{config:E,scale:C,state:w}=e,{margin:N,width:z,height:$}=w,G=(r==null?void 0:r.margin)||N,V=(i=r==null?void 0:r.width)!=null?i:z,J=(o=r==null?void 0:r.height)!=null?o:$,Q=(r==null?void 0:r.prefix)||`axis_${n}`,rt=(r==null?void 0:r.scale)||C[n],et=n==="y2",st=E.axis_rotated,ct=r!=null&&r.index?e.getAxisSize(n)*r.index:0,dt=m.crisp(G.left+(et?V+(st?0:ct):-ct),S.lineWidth),q=m.crisp(G.top+(st?et?-ct-1:J+ct:0),S.lineWidth),ft=G.left,lt=G.left+V,pt=G.top,Tt=G.top+J,Rt=(r==null?void 0:r.ticks)||Vi(e,n),Ct=(r==null?void 0:r.ticks)||(E[`${Q}_tick_culling`]&&E[`${Q}_tick_culling_lines`]!==!1?Vi(e,n,void 0,!1):Rt),Kt=(r==null?void 0:r.format)||((c=(l=(s=e.axis)==null?void 0:s[n])==null?void 0:l.tickFormat)==null?void 0:c.call(l))||((u=E[`${Q}_tick_format`])==null?void 0:u.bind(e.api))||(Zt=>Zt),re=r?r.outerTick:E[`${Q}_tick_outer`],Ee=st?et?E.axis_y2_tick_inner?1:-1:E.axis_y_tick_inner?-1:1:et?E.axis_y2_tick_inner?-1:1:E.axis_y_tick_inner?1:-1,Ce=w0(E,st,et),be=p0(st,et),Ne=(r==null?void 0:r.tickTextPosition)||E[`${Q}_tick_text_position`]||E[`axis_${n}_tick_text_position`],ye=(f=r==null?void 0:r.tickShow)!=null?f:r?!0:E[`${Q}_tick_show`],De=(d=r==null?void 0:r.tickTextShow)!=null?d:r?!0:E[`${Q}_tick_text_show`];m.withState(()=>{h.strokeStyle=S.lineColor,h.lineWidth=S.lineWidth,m.strokePath(()=>{st?m.traceLine(ft,q,lt,q):m.traceLine(dt,pt,dt,Tt),re&&(st?(m.traceLine(ft,q,ft,q+Dt*Ce),m.traceLine(lt,q,lt,q+Dt*Ce)):(m.traceLine(dt,pt,dt+Dt*Ce,pt),m.traceLine(dt,Tt,dt+Dt*Ce,Tt)))});const Zt=ji(S,n);h.font=Zt,h.fillStyle=S.labelColor,h.textAlign=st?"center":be>0?"left":"right",h.textBaseline=st?be>0?"top":"bottom":"middle",h.strokeStyle=S.tickColor,h.lineWidth=S.tickWidth;const ve=[],xe=[],Vt=(je,We)=>{const xn=Xi(e,je,n),wn=G.left+rt(xn),Ae=G.top+rt(xn);pa(st?wn:Ae)&&We.push({tick:je,tx:wn,ty:Ae})};for(const je of Rt)Vt(je,ve);for(const je of Ct)Vt(je,xe);if(ye&&m.strokePath(()=>{for(const{tx:je,ty:We}of xe)st?m.traceLine(je,q,je,q+Dt*Ee):m.traceLine(dt,We,dt+Dt*Ee,We)}),De)for(const{tick:je,tx:We,ty:xn}of ve)st?m.text(sd(Kt,je),We+(Ne.x||0),q+Dt*be+(Ne.y||0)):m.text(sd(Kt,je),dt+(Dt+fn)*be+(Ne.x||0),xn+(Ne.y||0))})}}const hr={canvas:"bb-canvas",overlay:"bb-canvas-overlay",legend:"bb-canvas-legend",legendBottom:"bb-canvas-legend-bottom",legendInset:"bb-canvas-legend-inset",legendItemInteractive:"bb-legend-item-interactive",legendItemTileCircle:"bb-legend-item-tile-circle",legendItemTitle:"bb-legend-item-title",legendRight:"bb-canvas-legend-right"};var bw=hr,D0=Object.defineProperty,F0=(t,e,n)=>e in t?D0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ri=(t,e,n)=>F0(t,typeof e!="symbol"?e+"":e,n);class N0{constructor(){ri(this,"canvas"),ri(this,"ctx"),ri(this,"dpr",1),ri(this,"frame",null),ri(this,"frameCtx",null),ri(this,"frameValid",!1)}init(e,n,r){this.canvas=Ze.createElement("canvas"),this.canvas.className=hr.canvas,this.canvas.style.display="block",e.appendChild(this.canvas),this.dpr=fe.devicePixelRatio||1,this.ctx=this.canvas.getContext("2d"),this.resize(n,r)}resize(e,n){const r=Math.max(0,e),i=Math.max(0,n);this.dpr=fe.devicePixelRatio||1,this.canvas.width=r*this.dpr,this.canvas.height=i*this.dpr,this.canvas.style.width=`${r}px`,this.canvas.style.height=`${i}px`,this.ctx.setTransform(this.dpr,0,0,this.dpr,0,0),this.frame=null,this.frameCtx=null,this.frameValid=!1}clearOverlay(){this.frameValid&&this.restoreFrame()}withOverlay(e){const{ctx:n}=this;this.frameValid?this.clearOverlay():this.captureFrame(),n.save(),n.setTransform(this.dpr,0,0,this.dpr,0,0);try{e(n)}finally{n.restore()}}beginFrame(e,n){const{ctx:r}=this;this.frameValid=!1,r.save(),r.setTransform(this.dpr,0,0,this.dpr,0,0),r.clearRect(0,0,e,n)}endFrame(){this.ctx.restore()}captureFrame(){const{canvas:e}=this;if(this.frameValid=!1,e.width&&e.height){let{frame:n,frameCtx:r}=this;if(!n){const i=Ze.createElement("canvas");n=i,r=i.getContext("2d"),this.frame=n,this.frameCtx=r}if(!n||!r)return;r.setTransform(1,0,0,1,0,0),n.width!==e.width||n.height!==e.height?(n.width=e.width,n.height=e.height):r.clearRect(0,0,e.width,e.height),r.drawImage(e,0,0),this.frameValid=!0}}restoreFrame(){if(!this.frameValid||!this.frame||!this.frameCtx)return;const{canvas:e,ctx:n}=this;n.save(),n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,e.width,e.height),n.drawImage(this.frame,0,0),n.restore(),n.setTransform(this.dpr,0,0,this.dpr,0,0)}destroy(){var e;(e=this.canvas)==null||e.remove(),this.frame=null,this.frameCtx=null,this.frameValid=!1}}function _l(t){const{config:e,state:n}=t;return!!(e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&e.subchart_show&&e.subchart_brush_enabled===!1&&n.width2>0&&n.height2>0)}function gd(t,e){var n;const{config:r,scale:i,state:o}=t,s=i.zoom||i.x,l=i.subX;if(!s||!l)return null;const c=r.axis_rotated?o.height2:o.width2,u=r.axis_rotated?o.height:o.width,f=(n=l.invert)==null?void 0:n.call(l,e);let d=f==null?NaN:s(f);return!Number.isFinite(d)&&c>0&&(d=Math.max(0,Math.min(1,e/c))*u),Number.isFinite(d)?Math.max(0,Math.min(u,d)):null}const ql=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,vd=/([aAcChHlLmMqQsStTvVzZ])|([-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?)/g;function $0(t){const e=new Set;let n=-1,r=0,i=!1,o;for(vd.lastIndex=0;o=vd.exec(t);)if(o[1])i=o[1]==="a"||o[1]==="A",r=0;else if(n++,i){const s=r%7;(s===2||s===3||s===4)&&e.add(n),r++}return e}function B0(t,e){const n=$0(e),r=[],i=[];let o=0,s=-1,l=-1,c,u;const f=m=>{r[s]?r[s]+=m:r[++s]=m};ql.lastIndex=0;const d=ql,h=new RegExp(ql.source,"g");for(t+="",e+="";(c=d.exec(t))&&(u=h.exec(e));){if(l++,u.index>o&&f(e.slice(o,u.index)),c[0]===u[0])f(u[0]);else{const m=+c[0],S=+u[0],E=n.has(l);r[++s]=null,i.push({index:s,fn:E?C=>Math.round(m+(S-m)*C):C=>m+(S-m)*C})}o=h.lastIndex}if(o<e.length&&f(e.slice(o)),!i.length){const m=r.join("");return()=>m}return m=>{for(let S=0,E=i.length;S<E;S++){const{index:C,fn:w}=i[S];r[C]=String(w(m))}return r.join("")}}function as(t){const{bar_radius:e,bar_radius_ratio:n}=t.config;return le(e)&&e>0?()=>e:le(n)?r=>r*n:null}function tc(t){const{config:e,data:n}=t,r=new Set;if(!e.data_groups.length)return r;const i=t.orderTargets(t.filterTargetsToShow(n.targets.filter(t.isBarType,t)));for(const o of e.data_groups){const s=new Set(o),l=new Map,c=new Map;for(const u of i)if(s.has(u.id))for(const f of u.values)f.value===null||f.value===0||(f.value>0?l:c).set(f.index,u.id);for(const[u,f]of l)r.add(`${f}:${u}`);for(const[u,f]of c)r.add(`${f}:${u}`)}return r}function z0(t,e,n){return n?t?e?{tl:n,bl:n}:{tr:n,br:n}:e?{br:n,bl:n}:{tl:n,tr:n}:0}function U0(t,e,n,r){let i="";return n?r&&t[0]<e?i=`0 ${e-t[0]}px 0 0`:!r&&t[0]>e&&(i=`0 0 0 ${t[0]-e}px`):r&&t[1]>e?i=`${t[1]-e}px 0 0 0`:!r&&t[1]<e&&(i=`0 0 ${e-t[1]}px 0`),i?`inset(${i})`:null}function ec(t,e,n,r,i,o){const{config:s,state:l}=t,c=s.axis_rotated,u=+c,f=+!u,d=e.value<0,h=s[`axis_${t.axis.getId(e.id)}_inverted`],m=!h&&d||h&&!d,S=t.isGrouped(e.id),E=r&&S&&e.value!==0?l.hiddenTargetIds.has(e.id)&&o?o(e):i.has(`${e.id}:${e.index}`):!1,C=[n[0][u],n[0][f]];let w=0;if(r){const z=c?f:u,$=Math.abs(n[2][z]-n[0][z]);w=Math.max(0,!S||E?r($):0)}const N=c?n[1][u]+(m?w:-w):n[1][f]+(m?-w:w);return{radius:w,corners:z0(c,m,w),clipPath:w?U0(C,N,c,m):null,indexX:u,indexY:f,isNegative:m,pos:N}}const pd="2 2";function md(t,e,n){const r=t.axis.isTimeSeries(),i=(o,s)=>Tn(o)?s:r?Kn.call(t,o):o;return(n||[]).map(o=>{var s,l;return{start:i(o.start,(s=e[0])==null?void 0:s.x),end:i(o.end,(l=e[e.length-1])==null?void 0:l.x),style:o.style||{dasharray:pd}}})}function xd(t,e){for(let n=0,r;r=e[n];n++)if(r.start<t&&t<=r.end)return r.style;return!1}function k0(t){const e=String((t==null?void 0:t.dasharray)||pd).split(/[\s,]+/).map(Number).filter(Number.isFinite);return e.length?e:[2,2]}function G0(t,e,n,r,i){const o=t.config.axis_rotated,s=md(t,e,i),l=[];for(let c=1;c<e.length;c++){const u=e[c-1],f=e[c];if(!Xe(u.value)||!Xe(f.value)){l.push({isBreak:!0});continue}const d=xd(f.x,s),h=n(u.x),m=r(u.value),S=n(f.x),E=r(f.value);l.push({start:o?[m,h]:[h,m],end:o?[E,S]:[S,E],dash:d?k0(d):[]})}return l}function is(t,e){return t.config.axis_rotated?[e[1],e[0]]:[e[0],e[1]]}function yd(t,e,n=1){const r=e.map(h=>is(t,h)),i=r.map(([h])=>h),o=r.map(([,h])=>h),s=Math.min(...i),l=Math.min(...o),c=Math.max(...i)-s,u=Math.max(...o)-l,f=Math.max(n,c),d=Math.max(n,u);return{x:s-(f-c)/2,y:l-(d-u)/2,w:f,h:d}}function Hi(t,e){var n,r;const i=(n=t.isGrouped)!=null&&n.call(t,e.id)&&t.circleY?t.circleY(e,e.index):t.getYScaleById(e.id)(t.getBaseValue(e)),o=(r=t.xx(e))!=null?r:NaN;return t.config.axis_rotated?{x:i,y:o}:{x:o,y:i}}function X0(t,e,n){return{x:t.cx(e,n),y:t.cy(e,n)}}function W0(t,e){return{body:yd(t,[e[0],e[1]]),wickStart:is(t,[e[2][0],e[2][1]]),wickEnd:is(t,[e[2][0],e[2][2]])}}function ai(t,e,n,r=!1){if(e===n)return{x:0,y:0,w:t.state.width,h:0};const{scale:{x:i,y:o}}=t,s=i(e.x0),l=o(e.y0),c=i(e.x1)-s,u=o(e.y1)-l;return{x:s,y:l,w:r?Math.max(0,c):c,h:r?Math.max(0,u):u}}function V0(t,e,n,r){const{config:i}=t,{id:o,value:s,ratio:l=0}=e,c=i.treemap_label_format,u=typeof c=="function"?c.bind(t.api)(s,l,o,{width:n,height:r}):`${o}
|
|
36
|
+
${(l*100).toFixed(2)}%`;return u==null?null:String(u)}var Sw=Array.prototype.slice;function nc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function _e(t){return function(){return t}}function Td(t){this._context=t}Td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function os(t){return new Td(t)}var j0=Math.pow;const rc=Math.PI,ac=2*rc,Na=1e-6,H0=ac-Na;function bd(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function Y0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return bd;const n=j0(10,e);return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class ss{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?bd:Y0(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,s){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+s}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let s=this._x1,l=this._y1,c=r-e,u=i-n,f=s-e,d=l-n,h=f*f+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>Na)if(!(Math.abs(d*c-u*f)>Na)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let m=r-s,S=i-l,E=c*c+u*u,C=m*m+S*S,w=Math.sqrt(E),N=Math.sqrt(h),z=o*Math.tan((rc-Math.acos((E+h-C)/(2*w*N)))/2),$=z/N,G=z/w;Math.abs($-1)>Na&&this._append`L${e+$*f},${n+$*d}`,this._append`A${o},${o},0,0,${+(d*m>f*S)},${this._x1=e+G*c},${this._y1=n+G*u}`}}arc(e,n,r,i,o,s){if(e=+e,n=+n,r=+r,s=!!s,r<0)throw new Error(`negative radius: ${r}`);let l=r*Math.cos(i),c=r*Math.sin(i),u=e+l,f=n+c,d=1^s,h=s?i-o:o-i;this._x1===null?this._append`M${u},${f}`:(Math.abs(this._x1-u)>Na||Math.abs(this._y1-f)>Na)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%ac+ac),h>H0?this._append`A${r},${r},0,1,${d},${e-l},${n-c}A${r},${r},0,1,${d},${this._x1=u},${this._y1=f}`:h>Na&&this._append`A${r},${r},0,${+(h>=rc)},${d},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function K0(){return new ss}K0.prototype=ss.prototype;function Aw(t=3){return new ss(+t)}function ic(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new ss(e)}function Sd(t){return t[0]}function Ad(t){return t[1]}function oc(t,e){var n=_e(!0),r=null,i=os,o=null,s=ic(l);t=typeof t=="function"?t:t===void 0?Sd:_e(t),e=typeof e=="function"?e:e===void 0?Ad:_e(e);function l(c){var u,f=(c=nc(c)).length,d,h=!1,m;for(r==null&&(o=i(m=s())),u=0;u<=f;++u)!(u<f&&n(d=c[u],u,c))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(d,u,c),+e(d,u,c));if(m)return o=null,m+""||null}return l.x=function(c){return arguments.length?(t=typeof c=="function"?c:_e(+c),l):t},l.y=function(c){return arguments.length?(e=typeof c=="function"?c:_e(+c),l):e},l.defined=function(c){return arguments.length?(n=typeof c=="function"?c:_e(!!c),l):n},l.curve=function(c){return arguments.length?(i=c,r!=null&&(o=i(r)),l):i},l.context=function(c){return arguments.length?(c==null?r=o=null:o=i(r=c),l):r},l}function Z0(t,e,n){var r=null,i=_e(!0),o=null,s=os,l=null,c=ic(u);t=typeof t=="function"?t:t===void 0?Sd:_e(+t),e=typeof e=="function"?e:_e(e===void 0?0:+e),n=typeof n=="function"?n:n===void 0?Ad:_e(+n);function u(d){var h,m,S,E=(d=nc(d)).length,C,w=!1,N,z=new Array(E),$=new Array(E);for(o==null&&(l=s(N=c())),h=0;h<=E;++h){if(!(h<E&&i(C=d[h],h,d))===w)if(w=!w)m=h,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),S=h-1;S>=m;--S)l.point(z[S],$[S]);l.lineEnd(),l.areaEnd()}w&&(z[h]=+t(C,h,d),$[h]=+e(C,h,d),l.point(r?+r(C,h,d):z[h],n?+n(C,h,d):$[h]))}if(N)return l=null,N+""||null}function f(){return oc().defined(i).curve(s).context(o)}return u.x=function(d){return arguments.length?(t=typeof d=="function"?d:_e(+d),r=null,u):t},u.x0=function(d){return arguments.length?(t=typeof d=="function"?d:_e(+d),u):t},u.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:_e(+d),u):r},u.y=function(d){return arguments.length?(e=typeof d=="function"?d:_e(+d),n=null,u):e},u.y0=function(d){return arguments.length?(e=typeof d=="function"?d:_e(+d),u):e},u.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:_e(+d),u):n},u.lineX0=u.lineY0=function(){return f().x(t).y(e)},u.lineY1=function(){return f().x(t).y(n)},u.lineX1=function(){return f().x(r).y(e)},u.defined=function(d){return arguments.length?(i=typeof d=="function"?d:_e(!!d),u):i},u.curve=function(d){return arguments.length?(s=d,o!=null&&(l=s(o)),u):s},u.context=function(d){return arguments.length?(d==null?o=l=null:l=s(o=d),u):o},u}var J0=Object.defineProperty,Q0=Object.defineProperties,_0=Object.getOwnPropertyDescriptors,Ed=Object.getOwnPropertySymbols,q0=Object.prototype.hasOwnProperty,tT=Object.prototype.propertyIsEnumerable,Cd=(t,e,n)=>e in t?J0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Id=(t,e)=>{for(var n in e||(e={}))q0.call(e,n)&&Cd(t,n,e[n]);if(Ed)for(var n of Ed(e))tT.call(e,n)&&Cd(t,n,e[n]);return t},Rd=(t,e)=>Q0(t,_0(e));function wd(t,e){return e?n=>{var r;const i=(r=t.getSubchartCandlestickShapeValue)==null?void 0:r.call(t,n,!0);return i===void 0?t.getBaseValue(n):i}:n=>t.getBaseValue(n)}function Od(t,e,n){return n?e.map(r=>{var i;const o=(i=t.getSubchartCandlestickShapeValue)==null?void 0:i.call(t,r,n);return o===void 0?r:Rd(Id({},r),{value:o})}):e}function eT(t,e,n){return t.isStepType(e)?t.convertValuesToStep(n):n}function Pd(t,e,n,r){const{config:i,scale:o}=t,s=i.line_connectNull,l=i.axis_rotated,c=t.generateGetLinePoints(e,n),u=t.getYScaleById.bind(t),f=wd(t,n),d=E=>(n?t.subxx:t.xx).call(t,E),h=(E,C)=>t.isGrouped(E.id)?c(E,C)[0][1]:u(E.id,n)(f(E));let m=oc();m=l?m.x(h).y(d):m.x(d).y(h),r&&(m=m.context(r)),s||(m=m.defined(E=>f(E)!==null));const S=n?o.subX:o.x;return E=>{const C=u(E.id,n);let w=s?t.filterRemoveNull(E.values):E.values,N=0,z=0,$;if(t.isLineType(E)){const G=i.data_regions[E.id];G&&!r&&t.lineWithRegions?(w=Od(t,w,n),t.isAreaRangeType(E)&&(w=w.map(V=>Rd(Id({},V),{value:t.getRangedData(V,"mid")}))),t.isStepType(E)&&(w=t.convertValuesToStep(w)),$=t.lineWithRegions(w,o.zoom||S,C,G)):$=m.curve(t.getCurve(E))(eT(t,E,w))}else w[0]&&(N=S(w[0].x),z=C(f(w[0]))),$=l?`M ${z} ${N}`:`M ${N} ${z}`;return $||(r?void 0:"M 0 0")}}function Md(t,e,n,r){const{config:i}=t,o=i.line_connectNull,s=i.axis_rotated,l=t.generateGetAreaPoints(e,n),c=t.getYScaleById.bind(t),u=wd(t,n),f=new Map,d=E=>{let C=f.get(E);return C===void 0&&(C=t.getShapeYMin(E,n),f.set(E,C)),C},h=E=>(n?t.subxx:t.xx).call(t,E),m=(E,C)=>t.isGrouped(E.id)?l(E,C)[0][1]:c(E.id,n)(t.isAreaRangeType(E)?t.getRangedData(E,"high"):d(E.id)),S=(E,C)=>t.isGrouped(E.id)?l(E,C)[1][1]:c(E.id,n)(t.isAreaRangeType(E)?t.getRangedData(E,"low"):u(E));return E=>{let C=o?t.filterRemoveNull(E.values):E.values,w=0,N=0,z;if(t.isAreaType(E)){let $=Z0();$=s?$.y(h).x0(m).x1(S):$.x(h).y0(i.area_above?0:i.area_below?n?t.state.height2:t.state.height:m).y1(S),r&&($=$.context(r)),o||($=$.defined(G=>u(G)!==null)),C=Od(t,C,n),t.isStepType(E)&&(C=t.convertValuesToStep(C)),z=$.curve(t.getCurve(E))(C)}else C[0]&&(w=(n?t.scale.subX:t.scale.x)(C[0].x),N=t.getYScaleById(E.id,n)(u(C[0]))),z=s?`M ${N} ${w}`:`M ${w} ${N}`;return z||(r?void 0:"M 0 0")}}let Qr;function ls(t,e){if(!le(e)||e>=1)return t;const n=t.match(/^#([\da-f]{3}|[\da-f]{6})$/i);if(n){const o=(n[1].length===3?n[1].split("").map(l=>l+l).join(""):n[1]).match(/.{2}/g);return o?`rgba(${o.map(l=>parseInt(l,16)).join(",")},${e})`:t}if(/^rgb\(/i.test(t))return t.replace(/^rgb\((.*)\)$/i,`rgba($1,${e})`);if(/^rgba\(/i.test(t))return t.replace(/^rgba\((.*),\s*([\d.]+)\)$/i,(i,o,s)=>`rgba(${o},${Number(s)*e})`);const r=nT(t);return r&&r!==t?ls(r,e):t}function nT(t){if(!fe.document||(Qr===void 0&&(Qr=fe.document.createElement("canvas").getContext("2d")),!Qr))return null;Qr.fillStyle="#000",Qr.fillStyle=t;const e=Qr.fillStyle;Qr.fillStyle="#fff",Qr.fillStyle=t;const n=Qr.fillStyle;return e===n?e:null}function Yi(t,e,n,r){const i=e(n,r),o=yd(t,i);return mn(o.x,o.y)&&mn(o.x+o.w,o.y+o.h)?{points:i,rect:o}:null}function Ki(t,e,n,r){const i=e(n,r),{body:o,wickStart:s,wickEnd:l}=W0(t,i);return mn(o.x,o.y)&&mn(o.x+o.w,o.y+o.h)&&mn(s[0],s[1])&&mn(l[0],l[1])?{body:o,points:i,wickStart:s,wickEnd:l}:null}const rT=1.2;function sc(t,e){var n,r,i;let{value:o}=e;if((n=t.isBubbleZType)!=null&&n.call(t,e))o=t.getBubbleZData(o,"z");else if((r=t.isCandlestickType)!=null&&r.call(t,e)){const s=(i=t.getCandlestickData)==null?void 0:i.call(t,e);s&&(o=s.close)}return o}function Ld(t,e){const n=t.dataLabelFormat(e.id)(sc(t,e),e.id,e.index,[]);return n==null?null:String(n)}function Dd(t){return`${t.id}:${t.index}`}function lc(t,e,n){var r;if(!(e!=null&&e.length))return()=>!1;if(t.config.tooltip_grouped&&e.length>1){const o=(r=e[0])==null?void 0:r.index;return s=>o!==void 0&&s.index===o&&n(t,s)}const i=new Set(e.filter(o=>o&&n(t,o)).map(Dd));return o=>i.has(Dd(o))}function cs(t,e,n,r){const i=t.config.data_labels_position;let o;if(ue(i))o=i.bind(t.api)(n,sc(t,e),e.id,e.index,r);else if(i){const s=e.id in i?i[e.id]:i;o=s==null?void 0:s[n]}return le(o)?o:0}function aT(t,e){var n,r;const i=(n=t.config.data_labels)==null?void 0:n.image;if(ue(i))return(r=i.call(t.api,sc(t,e),e.id,e.index))!=null?r:null;if(i){const{url:o="",width:s=0,height:l=0,pos:c}=i;return{url:o,width:s,height:l,pos:c}}return null}function iT(t,e){return Da(t.url,{ID:e.id})}function oT(t,e,n,r,i,o){var s,l,c;const{width:u=0,height:f=0,pos:d}=e,h=u/2,m=f/2,S=cc(t.canvasEngine.ctx,n,r,i).h,E=Sr(t.canvasEngine.ctx.font),C=r-h,w=i-m-((s=t.isTreemapType)!=null&&s.call(t,o)?E*.7:S/2);let N=r,z=i;return t.config.axis_rotated?N+=h:z+=m,{x:C+((l=d==null?void 0:d.x)!=null?l:0),y:w+((c=d==null?void 0:d.y)!=null?c:0),textX:N,textY:z}}function Fd(t,e,n){var r,i,o;const s=(r=t.updateTextColor)==null?void 0:r.call(t,e);return typeof s=="string"?s:(i=t.isTreemapType)!=null&&i.call(t,e)?n:((o=t.color)==null?void 0:o.call(t,e))||n}function sT(t,e){var n;const r=t.config.data_labels_backgroundColors;if(!r)return null;if(Ye(r))return r;if(ue(r)){const o=(n=t.color)==null?void 0:n.call(t,e),s=r.bind(t.api)(o,e);return s==null?null:String(s)}const i=r[e.id];return i==null?null:String(i)}function lT(t){var e,n,r;if(!t)return null;const i=Ke(t)?t:{};return{padding:Uf((e=i.padding)!=null?e:"3 5"),radius:le(i.radius)?i.radius:10,stroke:(n=i.stroke)!=null?n:"#000",strokeWidth:le(i.strokeWidth)?i.strokeWidth:1,fill:(r=i.fill)!=null?r:"none"}}function cc(t,e,n,r,i={top:0,right:0,bottom:0,left:0}){var o,s;const l=e.split(`
|
|
37
|
+
`),c=l.map(w=>t.measureText(w)),u=Math.max(...c.map(w=>w.width),0),f=Sr(t.font),d=f*rT,h=c[0]?(c[0].fontBoundingBoxAscent||0)+(c[0].fontBoundingBoxDescent||0):0,m=c[0]&&(c[0].fontBoundingBoxDescent||c[0].actualBoundingBoxDescent)||0,S=l.length>1?d*l.length:Math.max(f,h,((o=c[0])==null?void 0:o.actualBoundingBoxAscent)+((s=c[0])==null?void 0:s.actualBoundingBoxDescent)||0);let E=n,C=r;return t.textAlign==="center"?E-=u/2:(t.textAlign==="right"||t.textAlign==="end")&&(E-=u),t.textBaseline==="middle"?C-=S/2:t.textBaseline==="alphabetic"?C-=S-m:(t.textBaseline==="bottom"||t.textBaseline==="ideographic")&&(C-=S),{x:E-i.left,y:C-i.top,w:u+i.left+i.right,h:S+i.top+i.bottom}}function Nd(t,e,n,r,i,o){var s,l;const c=e.context,u=sT(t,n),f=lT((s=t.config.data_labels)==null?void 0:s.border),d=(l=f==null?void 0:f.padding)!=null?l:{top:0,right:0,bottom:0,left:0},h=cc(c,r,i,o,d),m=t.config.data_labels.rotate;e.withState(S=>{var E;m&&(S.translate(i,o),S.rotate(m*Math.PI/180),h.x-=i,h.y-=o),u&&e.fillRoundRect(h,(E=f==null?void 0:f.radius)!=null?E:0,{fill:u}),f&&(f.fill!=="none"&&e.fillRoundRect(h,f.radius,{fill:f.fill}),e.strokeRoundRect(h,f.radius,{stroke:f.stroke,lineWidth:f.strokeWidth}))})}function cT(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function uT(t){return t==="start"?"left":t==="end"?"right":"center"}function fT(t,e,n,r){var i,o,s;const l=cT(t.config.data_labels.rotate),c=t.config.axis_rotated,u=t.config[`axis_${(i=t.axis)==null?void 0:i.getId(e.id)}_inverted`],f=Zn(t,e),{value:d}=e,h=le(d)&&d<0||f&&!((s=(o=t.getCandlestickData)==null?void 0:o.call(t,e))!=null&&s._isUp),m=4,S=m*2;return c?l==="start"?(n+=h?0:S,r+=m):l==="middle"?(n+=S,r-=S):l==="end"&&(h&&(n-=S),r+=m):(l==="start"?(n+=m,h&&(r+=S*2)):l==="middle"?r-=S:l==="end"&&(n-=m,h&&(r+=S*2)),u&&(r+=h?-17:f?13:7)),{x:n,y:r,textAlign:uT(l)}}function $d(t,e,n,r,i){var o;if(t.config.axis_rotated)r+=6,e.textAlign="left",e.textBaseline="middle";else if(va(t,n))e.textAlign="center",e.textBaseline="middle";else{const{config:s,state:l}=t,c=s[`axis_${(o=t.axis)==null?void 0:o.getId(n.id)}_inverted`],u=n.value<0||n.value===0&&!l.hasPositiveValue&&l.hasNegativeValue;let f=3;le(s.point_r)&&s.point_r>5&&(ni(t,n)||ga(t,n))&&(f+=s.point_r/2.3),e.textAlign="center",(c?!u:u)?(i+=f,e.textBaseline="top"):(i-=f*2,e.textBaseline="bottom")}return{x:r,y:i}}var dT=Object.defineProperty,Bd=Object.getOwnPropertySymbols,hT=Object.prototype.hasOwnProperty,gT=Object.prototype.propertyIsEnumerable,zd=(t,e,n)=>e in t?dT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_r=(t,e)=>{for(var n in e||(e={}))hT.call(e,n)&&zd(t,n,e[n]);if(Bd)for(var n of Bd(e))gT.call(e,n)&&zd(t,n,e[n]);return t};const Ud={x:0,y:0,w:8,h:8},uc=new Map,kd=[1,0,0,1,0,0];function vT(t){return t==="circle"||t==="rectangle"}function $n(t,e,n=0){const r=t.getAttribute(e),i=r===null?NaN:parseFloat(r);return Number.isFinite(i)?i:n}function pT(t){const e=(t.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi)||[]).map(Number).filter(Number.isFinite),n=[];for(let r=0;r<e.length-1;r+=2)n.push([e[r],e[r+1]]);return n}function mT(t){const e=(t==null?void 0:t.trim().split(/[\s,]+/).map(Number).filter(Number.isFinite))||[];return e.length===4?{x:e[0],y:e[1],w:e[2],h:e[3]}:null}function Gd(t){const e=t.map(([o])=>o),n=t.map(([,o])=>o),r=Math.min(...e),i=Math.min(...n);return{x:r,y:i,w:Math.max(...e)-r,h:Math.max(...n)-i}}function xT(t){const e=t.filter(s=>Number.isFinite(s.x)&&Number.isFinite(s.y)&&Number.isFinite(s.w)&&Number.isFinite(s.h));if(!e.length)return _r({},Ud);const n=Math.min(...e.map(s=>s.x)),r=Math.min(...e.map(s=>s.y)),i=Math.max(...e.map(s=>s.x+s.w)),o=Math.max(...e.map(s=>s.y+s.h));return{x:n,y:r,w:i-n,h:o-r}}function Zi(t,e){return[t[0]*e[0]+t[2]*e[1],t[1]*e[0]+t[3]*e[1],t[0]*e[2]+t[2]*e[3],t[1]*e[2]+t[3]*e[3],t[0]*e[4]+t[2]*e[5]+t[4],t[1]*e[4]+t[3]*e[5]+t[5]]}function yT(t){let e=[...kd];return((t==null?void 0:t.match(/[a-z]+\([^)]*\)/gi))||[]).forEach(n=>{var r;const[,i,o]=n.match(/^([a-z]+)\(([^)]*)\)$/i)||[],s=i==null?void 0:i.toLowerCase(),l=((o==null?void 0:o.match(/[-+]?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi))||[]).map(Number).filter(Number.isFinite);let c=null;if(s==="matrix"&&l.length>=6)c=l.slice(0,6);else if(s==="translate"&&l.length)c=[1,0,0,1,l[0],l[1]||0];else if(s==="scale"&&l.length)c=[l[0],0,0,(r=l[1])!=null?r:l[0],0,0];else if(s==="rotate"&&l.length){const u=l[0]*Math.PI/180,f=Math.cos(u),d=Math.sin(u),h=[f,d,-d,f,0,0];c=l.length>=3?Zi(Zi([1,0,0,1,l[1],l[2]],h),[1,0,0,1,-l[1],-l[2]]):h}else s==="skewx"&&l.length?c=[1,0,Math.tan(l[0]*Math.PI/180),1,0,0]:s==="skewy"&&l.length&&(c=[1,Math.tan(l[0]*Math.PI/180),0,1,0,0]);c&&(e=Zi(e,c))}),e}function ma(t,e){const n=t.getAttribute("style"),r=t.getAttribute(e),i=n==null?void 0:n.match(new RegExp(`(?:^|;)\\s*${e}\\s*:\\s*([^;]+)`,"i"));return((i==null?void 0:i[1])||r||"").trim()||null}function TT(t,e){const n=_r({},e),r=ma(t,"fill"),i=ma(t,"stroke"),o=ma(t,"stroke-width"),s=ma(t,"opacity"),l=ma(t,"fill-opacity"),c=ma(t,"stroke-opacity");if(r&&(n.fill=r==="none"?null:r),i&&(n.stroke=i==="none"?null:i),o){const u=parseFloat(o);Number.isFinite(u)&&(n.lineWidth=u)}return[s,l,c].forEach(u=>{var f;const d=u===null?NaN:parseFloat(u);Number.isFinite(d)&&(n.alpha=((f=n.alpha)!=null?f:1)*d)}),n}function bT(t){const e=new Map;return Array.from(t.querySelectorAll("[id]")).forEach(n=>{const r=n.getAttribute("id");r&&e.set(r,n)}),e}function Mr(t,e){const n=t==null?void 0:t.trim();return n?/%$/.test(n)?n:parseFloat(n):e}function Lr(t,e,n,r){if(typeof t=="number")return Number.isFinite(t)?t:r;if(typeof t=="string"&&/%$/.test(t)){const o=parseFloat(t);return Number.isFinite(o)?e+n*o/100:r}const i=parseFloat(t!=null?t:"");return Number.isFinite(i)?i:r}function ST(t){const e=(t==null?void 0:t.trim())||"0",n=parseFloat(e),r=/%$/.test(e)?n/100:n;return Math.max(0,Math.min(1,Number.isFinite(r)?r:0))}function AT(t){return Array.from(t.children||[]).filter(e=>e.tagName.toLowerCase()==="stop").map(e=>{const n=ma(e,"stop-color")||"#000",r=ma(e,"stop-opacity"),i=r===null?NaN:parseFloat(r);return{offset:ST(e.getAttribute("offset")),color:n,opacity:Number.isFinite(i)?i:void 0}})}function ET(t){const e=new Map;return t.forEach((n,r)=>{const i=n.tagName.toLowerCase(),o=AT(n);o.length&&(i==="lineargradient"?e.set(r,{type:"linearGradient",x1:Mr(n.getAttribute("x1"),"0%"),y1:Mr(n.getAttribute("y1"),"0%"),x2:Mr(n.getAttribute("x2"),"100%"),y2:Mr(n.getAttribute("y2"),"0%"),stops:o}):i==="radialgradient"&&e.set(r,{type:"radialGradient",cx:Mr(n.getAttribute("cx"),"50%"),cy:Mr(n.getAttribute("cy"),"50%"),r:Mr(n.getAttribute("r"),"50%"),fx:Mr(n.getAttribute("fx"),"50%"),fy:Mr(n.getAttribute("fy"),"50%"),fr:Mr(n.getAttribute("fr"),0),stops:o}))}),e}function fc(t,e,n,r=kd,i={},o=new Set){const s=t.tagName.toLowerCase(),l=Array.from(t.children||[]),c=TT(t,i),u=Zi(r,yT(t.getAttribute("transform"))),f={matrix:u,style:c};if(s==="defs")return[];if(s==="svg"||s==="g"||s==="symbol")return l.reduce((d,h)=>d.concat(fc(h,e,n,u,c,o)),[]);if(s==="use"){const d=t.getAttribute("href")||t.getAttribute("xlink:href")||"",h=d.charAt(0)==="#"?d.slice(1):"",m=h&&n.get(h);if(!m||o.has(h))return[];const S=$n(t,"x",0),E=$n(t,"y",0),C=Zi(u,[1,0,0,1,S,E]);o.add(h);const w=fc(m,e,n,C,c,o);return o.delete(h),w}if(s==="polygon"||s==="polyline"){const d=pT(t.getAttribute("points")||"");return d.length?[_r({type:s,points:d,box:Gd(d)},f)]:[]}if(s==="circle"){const d=$n(t,"cx",0),h=$n(t,"cy",0),m=$n(t,"r",0);return m>0?[_r({type:"circle",cx:d,cy:h,r:m,box:{x:d-m,y:h-m,w:m*2,h:m*2}},f)]:[]}if(s==="ellipse"){const d=$n(t,"cx",0),h=$n(t,"cy",0),m=$n(t,"rx",0),S=$n(t,"ry",0);return m>0&&S>0?[_r({type:"ellipse",cx:d,cy:h,rx:m,ry:S,box:{x:d-m,y:h-S,w:m*2,h:S*2}},f)]:[]}if(s==="rect"){const d=$n(t,"x",0),h=$n(t,"y",0),m=$n(t,"width",0),S=$n(t,"height",0);return m>0&&S>0?[_r({type:"rect",x:d,y:h,w:m,h:S,box:{x:d,y:h,w:m,h:S}},f)]:[]}if(s==="line"){const d=$n(t,"x1",0),h=$n(t,"y1",0),m=$n(t,"x2",0),S=$n(t,"y2",0);return[_r({type:"line",x1:d,y1:h,x2:m,y2:S,box:Gd([[d,h],[m,S]])},f)]}if(s==="path"){const d=t.getAttribute("d")||"";return d?[_r({type:"path",d,box:e},f)]:[]}return[]}function CT(t){if(!/^</.test(t))return null;if(uc.has(t))return uc.get(t)||null;let e=null;try{const r=new fe.DOMParser().parseFromString(Yr(t),"image/svg+xml").documentElement,i=mT(r.getAttribute("viewBox"))||Ud,o=bT(r),s=fc(r,i,o);s.length&&(e={shapes:s,box:r.tagName.toLowerCase()==="svg"?i:xT(s.map(l=>l.box)),paints:ET(o)})}catch(n){e=null}return uc.set(t,e),e}function IT(t,e){if(e.type==="polygon"||e.type==="polyline"){const[n,...r]=e.points;t.moveTo(n[0],n[1]),r.forEach(([i,o])=>t.lineTo(i,o)),e.type==="polygon"&&t.closePath()}else e.type==="circle"?(t.moveTo(e.cx+e.r,e.cy),t.arc(e.cx,e.cy,e.r,0,Math.PI*2)):e.type==="ellipse"?(t.moveTo(e.cx+e.rx,e.cy),t.ellipse(e.cx,e.cy,e.rx,e.ry,0,0,Math.PI*2)):e.type==="rect"?t.rect(e.x,e.y,e.w,e.h):e.type==="line"&&(t.moveTo(e.x1,e.y1),t.lineTo(e.x2,e.y2))}function us(t){const e=t==null?void 0:t.match(/^url\(#([^)]+)\)$/);return(e==null?void 0:e[1])||null}function Xd(t,e,n){const{x:r,y:i,w:o,h:s}=n,l=e.type==="linearGradient"?t.createLinearGradient(Lr(e.x1,r,o,r),Lr(e.y1,i,s,i),Lr(e.x2,r,o,r+o),Lr(e.y2,i,s,i)):t.createRadialGradient(Lr(e.fx,r,o,r+o/2),Lr(e.fy,i,s,i+s/2),Lr(e.fr,r,Math.max(o,s),0),Lr(e.cx,r,o,r+o/2),Lr(e.cy,i,s,i+s/2),Math.max(.01,Lr(e.r,0,Math.max(o,s),Math.max(o,s)/2)));return e.stops.forEach(({offset:c,color:u,opacity:f})=>{l.addColorStop(c,f===void 0?u:ls(u,f))}),l}function RT(t,e,n,r,i){const o=_r({},e||{});if(n.fill!==void 0)if(n.fill===null)delete o.fill;else if(us(n.fill)){const s=r.get(us(n.fill));s&&(o.fill=Xd(t,s,i))}else/^url\(/.test(n.fill)||(o.fill=n.fill);if(n.stroke!==void 0)if(n.stroke===null)delete o.stroke;else if(us(n.stroke)){const s=r.get(us(n.stroke));s&&(o.stroke=Xd(t,s,i))}else/^url\(/.test(n.stroke)||(o.stroke=n.stroke);return n.lineWidth!==void 0&&(o.lineWidth=n.lineWidth),{style:o,shouldFill:n.fill!==null&&(!o.stroke||o.fill!==void 0),shouldStroke:n.stroke!==null&&o.stroke!==void 0,alpha:n.alpha}}function Ji(t,e,n,r,i,o,s=i){if(vT(e)){t.point(e,n,r,i,o);return}const l=CT(e);if(!l||i<=0){t.point("circle",n,r,i,o);return}t.withState(c=>{const{box:u,paints:f,shapes:d}=l,h=s>0?i/s:1,m=S=>{const{style:E,shouldFill:C,shouldStroke:w,alpha:N}=RT(c,o,S.style,f,u);if(c.save(),t.applyStyle(E),N!==void 0&&(c.globalAlpha*=N),c.transform(...S.matrix),c.beginPath(),S.type==="path"){if(fe.Path2D){const z=S.path2D||(S.path2D=new fe.Path2D(S.d));C&&c.fill(z),w&&c.stroke(z)}}else IT(c,S),C&&c.fill(),w&&c.stroke();c.restore()};c.translate(n-(u.x+u.w/2)*h,r-(u.y+u.h/2)*h),c.scale(h,h),d.forEach(m)})}var wT=Object.defineProperty,OT=Object.defineProperties,PT=Object.getOwnPropertyDescriptors,Wd=Object.getOwnPropertySymbols,MT=Object.prototype.hasOwnProperty,LT=Object.prototype.propertyIsEnumerable,dc=(t,e,n)=>e in t?wT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vd=(t,e)=>{for(var n in e||(e={}))MT.call(e,n)&&dc(t,n,e[n]);if(Wd)for(var n of Wd(e))LT.call(e,n)&&dc(t,n,e[n]);return t},jd=(t,e)=>OT(t,PT(e)),ii=(t,e,n)=>dc(t,typeof e!="symbol"?e+"":e,n);const DT=[Gi,or,Ar,Zn],FT=1e3,Hd=new WeakMap,Yd=new Map;function Kd(t,e){if(!e||e==="none")return;const n=e.match(/^matrix\(([^)]+)\)$/),r=e.match(/^matrix3d\(([^)]+)\)$/);if(n){const i=n[1].split(",").map(o=>Number(o.trim()));i.length===6&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[2],i[3],i[4],i[5])}else if(r){const i=r[1].split(",").map(o=>Number(o.trim()));i.length===16&&i.every(Number.isFinite)&&t.transform(i[0],i[1],i[4],i[5],i[12],i[13])}}function NT(t,e,n){const r=t.naturalWidth||t.width,i=t.naturalHeight||t.height;if(!r||!i||!e||!n)return{x:0,y:0,w:e,h:n};const o=Math.min(e/r,n/i),s=r*o,l=i*o;return{x:(e-s)/2,y:(n-l)/2,w:s,h:l}}function $T(t){const{state:e}=t;return e.hasFunnel||e.hasTreemap?{x:0,y:0}:{x:qa(e.margin.left),y:qa(e.margin.top)}}function Zd(t,e,n,r,i=!1){r.strokePath(o=>{Pd(t,n,i,o)(e)},{lineDash:[]})}function Jd(t,e,n,r,i=!1){r.fillPath(o=>{Md(t,n,i,o)(e)})}function Qd(t,e){const n=Zr(t,e);return n.start===0&&n.end===e.values.length?e:jd(Vd({},e),{values:e.values.slice(n.start,n.end)})}function hc(t,e){if(!(t!=null&&t.length)||!(e!=null&&e.id))return null;let n=Hd.get(t);if(!n){n=new Map;for(const r of t){if(!(r!=null&&r.id))continue;const i=`${r.id}:*`;n.has(i)||n.set(i,r),"index"in r&&n.set(`${r.id}:${r.index}`,r)}Hd.set(t,n)}return"index"in e?n.get(`${e.id}:${e.index}`)||null:n.get(`${e.id}:*`)||null}function BT(t,e){const n=fe.Path2D;if(!n)return null;const r=`${t}:${e}`,i=Yd.get(r);if(i)return i;const o=new n(Mi[t][e]);return Yd.set(r,o),o}function Qi(t,e){const n=t.config.color_onover;return!n||!e?null:Ke(n)?e.id in n?n[e.id]:null:Ye(n)?n:ue(n)?n.call(t.api,e):null}function zT(t,e,n){const r=hc(n,e);return Qi(t,r)||t.color(e.id)}function _d(t){var e;return(t==null?void 0:t.id)||((e=t==null?void 0:t.data)==null?void 0:e.id)}function qd(t,e){var n;const r=_d(e);return!!r&&((n=t.state.focusedTargetIds)==null?void 0:n.has(r))}function Dr(t,e){var n;const r=_d(e);return r&&((n=t.state.defocusedTargetIds)!=null&&n.has(r))?t.canvasTheme.style.shape.targetDefocusedOpacity:1}function UT(t,e,n,r=!1){var i;const o=(i=t.generateGetAreaPoints)==null?void 0:i.call(t,n,r);if(!o)return null;const s=Zr(t,e);let l=1/0,c=1/0,u=-1/0,f=-1/0;for(let d=s.start;d<s.end;d++){const h=e.values[d];In(t,h)&&o(h,d).forEach(([m,S])=>{mn(m,S)&&(l=Math.min(l,m),c=Math.min(c,S),u=Math.max(u,m),f=Math.max(f,S))})}return Number.isFinite(l)&&Number.isFinite(c)?{x:l,y:c,w:u-l,h:f-c}:null}function fs(t,e,n){return e+n*(le(t)?t:0)}function th(t,e,n,r,i,o){const s=t.config[`${r}_linearGradient`];if(!s||!i||!i.w||!i.h)return o;const l=t.config.axis_rotated,c=typeof s=="object"?s:{},u=c.x||(l?[1,0]:[0,0]),f=c.y||(l?[0,0]:[0,1]),d=Array.isArray(c.stops)?c.stops:[[0,o,1],[1,o,0]],h=e.createLinearGradient(fs(u[0],i.x,i.w),fs(f[0],i.y,i.h),fs(u[1],i.x,i.w),fs(f[1],i.y,i.h));return d.forEach(([m,S,E])=>{const C=ue(S)?S.call(t.api,n.id):S,w=String(C||o),N=Number(m),z=Number.isFinite(N)?Math.max(0,Math.min(1,N)):0;h.addColorStop(z,ls(w,E))}),h}function qr(t,e){return ei(t,e,DT)}function ds(t,e){const n=t.config.point_opacity;return Number.isFinite(n)?n:ga(t,e)||va(t,e)?.5:1}function _i(t,e,n){var r,i;const o=t.config.point_r;return va(t,e)||ue(o)?(i=(r=t.pointR)==null?void 0:r.call(t,n))!=null?i:2.5:o}function kT(t,e,n,r){return!r&&n==="circle"&&ga(t,e)&&!ue(t.config.point_r)&&e.values.length>Wf}function GT(t,e){const{bar_connectLine:n}=t.config,r=Ke(n)?n[e]:n;return/^(start|end)-(start|end)$/.test(r)?r:null}function XT(t,e,n){const{indexX:r,indexY:i,pos:o}=n;return t.config.axis_rotated?{x:e[0][r],y:e[0][i],width:e[0][r]-o,height:e[2][i]-e[0][i]}:{x:e[0][r],y:o,width:e[2][r]-e[0][r],height:e[3][i]-o}}function WT(t,e,n,r,i=1){if(r.length<2)return;const o=t.config.axis_rotated,s=/^start-(start|end)$/.test(n),l=/^end-(start|end)$/.test(n),c=/\w+-end$/.test(n),u=/\w+-start$/.test(n),f=m=>({x:o?l?m.x-m.width:m.x:m.x+m.width,y:o||s?m.y+m.height:m.y}),d=m=>({x:o?m.x-(c?m.width:0):m.x,y:o?m.y:m.y+(u?m.height:0)});let h=f(r[0]);e.strokePath(()=>{for(let m=1;m<r.length;m++){const S=d(r[m]);e.traceLine(h.x,h.y,S.x,S.y),m<r.length-1&&(h=f(r[m]))}},{alpha:i,stroke:t.canvasTheme.style.shape.barConnectLineColor,lineWidth:t.canvasTheme.style.shape.barConnectLineWidth,lineDash:[]})}function gc(t,e){var n;const{config:r}=t;if(va(t,e))return"circle";const i=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],o=Array.isArray(r.point_pattern)&&r.point_pattern.length?r.point_pattern:[r.point_type],s=Math.max(0,i.indexOf(e.id)),l=o[s%o.length];return/^rect(angle)?$/i.test(l)||l==="rectangle"?"rectangle":l||"circle"}function VT(t,e,n,r,i,o,s){const l=t.config.point_radialGradient;if(!l||!o)return s;const c=Ke(l)?l:{},u=le(c.cx)?c.cx:.3,f=le(c.cy)?c.cy:.3,d=le(c.r)?c.r:.7,h=Array.isArray(c.stops)?c.stops:[[.1,null,1],[.9,null,0]],m=r+(u-.5)*o*2,S=i+(f-.5)*o*2,E=e.createRadialGradient(m,S,0,m,S,Math.max(1,o*d*2));return h.forEach(([C,w,N])=>{let z=ue(w)?w.bind(t.api)(n.id):w;z||(z=s);const $=Number(C),G=Number.isFinite($)?Math.max(0,Math.min(1,$)):0;E.addColorStop(G,ls(z,N))}),E}function eh(t,e,n){const r=t.config.candlestick_color_down;return(n!=null&&n._isUp?t.color(e):r&&typeof r=="object"?r[e.id]:r)||t.color(e)}function jT(t,e){return t.shouldDrawPointsForLine?t.shouldDrawPointsForLine(e):!0}function HT(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function YT(t,e,n){const{config:r,scale:i}=t,o=i.zoom||i.x,s=t.getYScaleById(e.id),l=r.line_connectNull?t.filterRemoveNull(e.values):e.values;let c=t.isAreaRangeType(e)?l.map(S=>jd(Vd({},S),{value:t.getRangedData(S,"mid")})):l;t.isStepType(e)&&(c=t.convertValuesToStep(c));const u=G0(t,c,o,s,r.data_regions[e.id]);let f=null,d=[];const h=()=>{if(d.length<2||!f){d=[];return}n.strokePath(S=>{const[E,...C]=d;S.moveTo(E[0],E[1]),C.forEach(w=>{S.lineTo(w[0],w[1])})},{lineDash:f}),d=[]},m=(S,E,C)=>{!f||!HT(f,C)?(h(),f=C,d=[S,E]):d.push(E)};for(const{start:S,end:E,dash:C,isBreak:w}of u){if(w||!S||!E||!C){h(),f=null;continue}if(!mn(S[0],S[1])||!mn(E[0],E[1])){h(),f=null;continue}m(S,E,C)}h()}class KT{constructor(e,n){ii(this,"engine",e),ii(this,"theme",n),ii(this,"painter"),ii(this,"labelImageCache",new Map),ii(this,"backgroundImageCache",new Map),ii(this,"backgroundClassStyleCache",new Map),this.painter=new ed(e.ctx)}get ctx(){return this.painter.context}withContext(e,n){this.painter.withContext(e,n)}destroy(){const e=n=>{n.image.onload=null,n.image.onerror=null};this.labelImageCache.forEach(e),this.backgroundImageCache.forEach(e),this.labelImageCache.clear(),this.backgroundImageCache.clear(),this.backgroundClassStyleCache.clear()}getLabelImage(e,n){if(!e||!fe.Image)return null;let r=this.labelImageCache.get(e);if(!r){const i={image:new fe.Image,loaded:!1,loading:!0};r=i,this.labelImageCache.set(e,r),i.image.onload=()=>{var o;i.loaded=!0,i.loading=!1,(o=n.redraw)==null||o.call(n)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundImage(e,n){if(!e||!fe.Image)return null;let r=this.backgroundImageCache.get(e);if(!r){const i={image:new fe.Image,loaded:!1,loading:!0};r=i,this.backgroundImageCache.set(e,r),i.image.onload=()=>{var o;i.loaded=!0,i.loading=!1,(o=n.renderCanvasFrame)==null||o.call(n,void 0,null,!1)},i.image.onerror=()=>{i.loaded=!1,i.loading=!1},i.image.src=e}return r}getBackgroundClassStyle(e,n){if(!n||!fe.document)return{};const r=this.backgroundClassStyleCache.get(n);if(r)return r;const i=fe.document.createElement("div");i.className=n,i.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:1px;height:1px;",e.$el.chart.node().appendChild(i);const o=fe.getComputedStyle(i),s=parseFloat(o.opacity),l={opacity:Number.isFinite(s)?s:void 0,transform:o.transform||void 0};return i.remove(),this.backgroundClassStyleCache.set(n,l),l}drawBackground(e){const n=e.config.background;if(!(n!=null&&n.imgUrl)&&!(n!=null&&n.color))return;const{ctx:r,painter:i}=this,{current:o,margin:s,width:l,height:c}=e.state,u=this.getBackgroundClassStyle(e,n.class);i.withState(()=>{if(u.opacity!==void 0&&(r.globalAlpha*=u.opacity),n.imgUrl){const f=this.getBackgroundImage(n.imgUrl,e);if(f!=null&&f.loaded){const d=$T(e),h=NT(f.image,o.width,o.height);r.translate(d.x,d.y),Kd(r,u.transform),r.drawImage(f.image,h.x,h.y,h.w,h.h)}}else n.color&&(Kd(r,u.transform),i.fillRect({x:s.left,y:s.top,w:l,h:c},{fill:n.color}))})}drawLabelImage(e,n,r,i,o){const s=aT(e,n);if(!(s!=null&&s.url))return{x:i,y:o};const l=iT(s,n),c=oT(e,s,r,i,o,n),u=this.getLabelImage(l,e);return u!=null&&u.loaded&&this.ctx.drawImage(u.image,c.x,c.y,s.width,s.height),{x:c.textX,y:c.textY}}drawDataLabel(e,n,r,i,o){const{painter:s,theme:{style:l}}=this;if({x:i,y:o}=this.drawLabelImage(e,n,r,i,o),e.config.data_labels.rotate){const c=fT(e,n,i,o);i=c.x,o=c.y,this.ctx.textAlign=c.textAlign}this.ctx.fillStyle=Fd(e,n,l.label.color),Nd(e,s,n,r,i,o),s.textLines(r,i,o,{angle:e.config.data_labels.rotate})}drawFocusLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,theme:{style:o}}=this,s=n.filter(c=>c&&In(e,c)&&Ar(e,c)&&qr(e,{id:c.id})),l={size:()=>s.length};s.length&&(i.font=o.label.font,s.forEach(c=>{const u=Ld(e,c);let{x:f,y:d}=Hi(e,c);u&&({x:f,y:d}=$d(e,i,c,f,d),f+=cs(e,c,"x",l),d+=cs(e,c,"y",l),mn(f,d)&&this.drawDataLabel(e,c,u,f,d))}))}draw(e,n,r){if(e.state.hasTreemap){this.drawTreemaps(e);return}const{margin:i,width:o,height:s}=e.state,l=()=>{e.config.area_front||this.drawAreas(e,n,r),this.drawLines(e,n),e.config.area_front&&this.drawAreas(e,n,r),this.drawCircles(e,n,r)},c=()=>{e.config.bar_front||this.drawBars(e,n,r),this.drawCandlesticks(e,n,r),l(),e.config.bar_front&&this.drawBars(e,n,r),this.drawSelections(e,n),this.drawLabels(e,n)};e.config.clipPath===!1?c():this.painter.clipRect({x:i.left,y:i.top,w:o,h:s},c)}drawSubchart(e,n){const{config:r,state:i}=e;if(!r.subchart_show||!i.hasAxis||i.width2<=0||i.height2<=0)return;const{ctx:o,painter:s,theme:{style:l}}=this,{margin2:c,width2:u,height2:f}=i,d={x:c.left,y:c.top,w:u,h:f};e.withSubchartTypeContext(()=>{var h;const m=e.filterTargetsToShow().filter(qr.bind(null,e)),S=e.getDrawShape();(h=e.updateSubchartYDomain)==null||h.call(e,m),s.withState(()=>{s.clipRect(d,()=>{s.withTranslation(d.x,d.y,()=>{var E,C,w,N,z,$;const G=m.filter(Gi.bind(null,e)),V=ir(e,S,kt.AREA,Gi.bind(null,e));for(const ft of G)ft.values.some(In.bind(null,e))&&(o.globalAlpha=l.shape.areaOpacity*Dr(e,ft),o.fillStyle=e.color(ft.id),Jd(e,ft,V,s,!0));o.globalAlpha=1;const J=m.filter(or.bind(null,e)),Q=ir(e,S,kt.BAR,or.bind(null,e)),rt=(E=e.generateGetBarPoints)==null?void 0:E.call(e,Q,!0);if(rt){for(const ft of J)o.globalAlpha=l.shape.barOpacity*Dr(e,ft),o.fillStyle=e.color(ft.id),ft.values.forEach((lt,pt)=>{var Tt;if(!In(e,lt))return;const Rt=Yi(e,rt,lt,pt),Ct=((Tt=e.getSubchartCandlestickBarColor)==null?void 0:Tt.call(e,lt,!0))||o.fillStyle;Rt&&s.fillRect(Rt.rect,{fill:Ct})});o.globalAlpha=1}const et=m.filter(Zn.bind(null,e)),st=ir(e,S,kt.CANDLESTICK,Zn.bind(null,e)),ct=(C=e.generateGetCandlestickPoints)==null?void 0:C.call(e,st,!0);if(ct){o.lineWidth=l.shape.candlestickLineWidth;for(const ft of et){const lt=Dr(e,ft);o.globalAlpha=lt,ft.values.forEach((pt,Tt)=>{var Rt;const Ct=(Rt=e.getCandlestickData)==null?void 0:Rt.call(e,pt),Kt=Ct&&Ki(e,ct,pt,Tt);if(!Kt)return;const re=eh(e,{id:ft.id},Ct);o.strokeStyle=re,o.fillStyle=re,s.strokePath(()=>{s.traceLine(Kt.wickStart[0],Kt.wickStart[1],Kt.wickEnd[0],Kt.wickEnd[1])}),s.fillRect(Kt.body,{fill:o.fillStyle})})}}const dt=m.filter(ni.bind(null,e)),q=ir(e,S,kt.LINE,ni.bind(null,e));o.globalAlpha=1;for(const ft of dt)ft.values.some(In.bind(null,e))&&(o.globalAlpha=Dr(e,ft),o.lineWidth=qd(e,ft)?l.shape.lineFocusedWidth:l.shape.lineWidth,o.strokeStyle=e.color(ft.id),Zd(e,ft,q,s,!0));if(o.globalAlpha=1,r.point_show&&!((w=e.isPointFocusOnly)!=null&&w.call(e))){const ft=(N=e.updateCircleY)==null?void 0:N.call(e,!0),lt=(z=e.subxx)==null?void 0:z.bind(e);if(lt&&ft){for(const pt of m){if(!ga(e,pt)&&!va(e,pt))continue;const Tt=e.color(pt.id),Rt=l.shape.pointFillColor||Tt,Ct=l.shape.pointStrokeColor||Tt,Kt=Ct?($=l.shape.pointLineWidth)!=null?$:1:0,re=Ct&&Kt>0?{fill:Rt,stroke:Ct,lineWidth:Kt}:{fill:Rt};o.globalAlpha=ds(e,pt)*Dr(e,pt),pt.values.forEach((Ee,Ce)=>{if(!In(e,Ee))return;const be=r.axis_rotated?ft(Ee,Ce):lt(Ee),Ne=r.axis_rotated?lt(Ee):ft(Ee,Ce),ye=Math.min(_i(e,pt,Ee),3);mn(be,Ne)&&Ji(s,"circle",be,Ne,ye,re)})}o.globalAlpha=1}}})}),this.drawSubchartBrush(e)})})}drawSubchartBrush(e){var n,r;const{config:i,scale:o,state:s}=e,l=s.domain;if(!i.subchart_show||i.subchart_brush_enabled===!1||!(l!=null&&l.length)||!o.subX)return;const{margin2:c,width2:u,height2:f}=s,d=o.subX(l[0]),h=o.subX(l[1]),m=i.axis_rotated?f:u,S=(r=(n=e.axis)==null?void 0:n.getExtent)==null?void 0:r.call(n),E=Array.isArray(S)&&S.length>=2&&S.every(Number.isFinite)?S.slice(0,2):[0,m],C=Math.max(0,Math.min(m,Math.min(...E))),w=Math.max(0,Math.min(m,Math.max(...E))),N=Math.max(C,Math.min(w,Math.min(d,h))),z=Math.max(C,Math.min(w,Math.max(d,h))),$=z-N;if($<=0)return;const G=i.axis_rotated?{x:c.left,y:c.top+N,w:u,h:$}:{x:c.left+N,y:c.top,w:$,h:f};this.painter.fillRect(G,{fill:this.theme.style.subchartBrush.fill,alpha:this.theme.style.subchartBrush.opacity}),i.subchart_showHandle&&(this.drawSubchartBrushHandle(e,N,"start"),this.drawSubchartBrushHandle(e,z,"end"))}drawSubchartBrushHandle(e,n,r){const{config:i,state:{margin2:o,width2:s,height2:l}}=e,{ctx:c,painter:u,theme:{style:f}}=this,d=i.axis_rotated,h=f.subchartBrush.handleFill,m=f.subchartBrush.handleStroke,S=d?o.left+s/2:o.left+n,E=d?o.top+n:o.top+l/2,C=BT(d?"y":"x",r);C&&u.withState(()=>{c.translate(S,E),c.fillStyle=h,c.strokeStyle=m,c.lineWidth=f.subchartBrush.handleLineWidth,c.globalAlpha=f.subchartBrush.handleOpacity,c.fill(C),c.globalAlpha=1,c.stroke(C)})}drawBars(e,n,r){const{ctx:i,painter:o,theme:{style:s}}=this,l=or.bind(null,e),c=lc(e,r,or),u=e.filterTargetsToShow().filter(l).filter(qr.bind(null,e)),f=e.generateGetBarPoints(ir(e,n,kt.BAR,l),!1),{margin:d}=e.state,h=as(e),m=h?tc(e):new Set;f&&o.withTranslation(d.left,d.top,()=>{var S;for(const E of u){const C=Zr(e,E),w=GT(e,E.id),N=Dr(e,E),z=[],$=[];for(let G=C.start;G<C.end;G++){const V=E.values[G];if(!In(e,V))continue;const J=Yi(e,f,V,G);if(!J)continue;const{points:Q,rect:rt}=J,et=ec(e,V,Q,h,m,(S=e.isStackingRadiusData)==null?void 0:S.bind(e));$.push({d:V,points:Q,rect:rt,radiusInfo:et}),w&&z.push(XT(e,Q,et))}w&&s.shape.barConnectLineWidth>0&&WT(e,o,w,z,N);for(const{d:G,rect:V,radiusInfo:J}of $){const Q=Qi(e,hc(r,G)),rt=Q||e.color(E.id),st=(c(G)?s.shape.barExpandedOpacity:s.shape.barOpacity)*N;i.fillStyle=Q?rt:th(e,i,E,"bar",V,rt),h?o.fillRoundRect(V,J.corners,{alpha:st}):o.fillRect(V,{alpha:st}),s.shape.barLineWidth>0&&(i.strokeStyle=s.shape.barStrokeColor,i.lineWidth=s.shape.barLineWidth,h?o.strokeRoundRect(V,J.corners,{alpha:s.shape.barOpacity*N}):o.strokeRect(V,{alpha:s.shape.barOpacity*N}))}}})}drawCandlesticks(e,n,r){var i;const{ctx:o,painter:s,theme:{style:l}}=this,c=Zn.bind(null,e),u=lc(e,r,Zn),f=e.filterTargetsToShow().filter(c).filter(qr.bind(null,e)),d=(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,ir(e,n,kt.CANDLESTICK,c),!1),{margin:h}=e.state;d&&s.withTranslation(h.left,h.top,()=>{var m;o.lineWidth=l.shape.candlestickLineWidth;for(const S of f){const E=Zr(e,S),C=Dr(e,S),w=l.shape.candlestickLineWidth,N=l.shape.candlestickStrokeColor||"#000";for(let z=E.start;z<E.end;z++){const $=S.values[z],G=(m=e.getCandlestickData)==null?void 0:m.call(e,$);if(!G)continue;const V=Ki(e,d,$,z);if(!V)continue;const{body:J,wickStart:Q,wickEnd:rt}=V;o.fillStyle=Qi(e,hc(r,$))||eh(e,$,G),o.strokeStyle=N,o.globalAlpha=C,w>0&&s.strokePath(()=>{s.traceLine(Q[0],Q[1],rt[0],rt[1])}),s.fillRect(J,{alpha:(u($)?l.shape.candlestickExpandedOpacity:1)*C}),w>0&&s.strokeRect(J,{alpha:C,lineWidth:w,stroke:N})}}o.globalAlpha=1})}hasExpandedShapeFocus(e,n){return!!(n!=null&&n.some(r=>r&&(or(e,r)||Zn(e,r))))}drawLines(e,n){const{ctx:r,painter:i,theme:{style:o}}=this,s=ni.bind(null,e),l=e.filterTargetsToShow().filter(s).filter(qr.bind(null,e)),c=ir(e,n,kt.LINE,s),{margin:u}=e.state;e.generateGetLinePoints&&i.withTranslation(u.left,u.top,()=>{var f;for(const d of l){const h=Qd(e,d);h.values.some(In.bind(null,e))&&(r.globalAlpha=Dr(e,d),r.lineWidth=qd(e,d)?o.shape.lineFocusedWidth:o.shape.lineWidth,r.strokeStyle=e.color(d.id),(f=e.config.data_regions)!=null&&f[h.id]?YT(e,h,i):Zd(e,h,c,i))}r.globalAlpha=1})}drawAreas(e,n,r){const{ctx:i,painter:o,theme:{style:s}}=this,l=Gi.bind(null,e),c=e.filterTargetsToShow().filter(l).filter(qr.bind(null,e)),u=ir(e,n,kt.AREA,l),{margin:f}=e.state;e.generateGetAreaPoints&&o.withTranslation(f.left,f.top,()=>{for(const d of c){const h=Qd(e,d);if(!h.values.some(In.bind(null,e)))continue;const m=zT(e,h,r);i.globalAlpha=s.shape.areaOpacity*Dr(e,d),i.fillStyle=th(e,i,h,"area",e.config.area_linearGradient?UT(e,d,u):null,m),Jd(e,h,u,o)}i.globalAlpha=1})}drawCircles(e,n,r){var i;if(!e.config.point_show||(i=e.isPointFocusOnly)!=null&&i.call(e))return;const{ctx:o,painter:s,theme:{style:l}}=this,{cx:c,cy:u}=n.pos,{margin:f}=e.state,d=lc(e,r,Ar),h=!!(r!=null&&r.some(m=>m&&Ar(e,m)));!c||!u||s.withTranslation(f.left,f.top,()=>{var m,S,E;for(const C of e.filterTargetsToShow()){if(!Ar(e,C)||!qr(e,C)||ni(e,C)&&!jT(e,C))continue;const w=e.color(C.id),N=gc(e,C),z=Dr(e,C),$=!!e.config.point_radialGradient,G=kT(e,C,N,$),V=Zr(e,C),J=V.end-V.start,Q=G?jf(e.state.width,e.state.height,_i(e,C,C.values[V.start]||C.values[0])):null,rt=ds(e,C)*z;o.fillStyle=w,o.globalAlpha=rt;const et=l.shape.pointFillColor||w,st=l.shape.pointStrokeColor||w,ct=st?(m=l.shape.pointLineWidth)!=null?m:1:0,dt=!!st&&ct>0,q=dt&&N==="circle"&&le(rt)&&rt<1&&et===st;if(!h&&!$&&N==="circle")if(o.fillStyle=et,dt&&!q&&(o.strokeStyle=st,o.lineWidth=ct),J>FT)for(let ft=V.start;ft<V.end;ft++){const lt=C.values[ft];if(!In(e,lt))continue;const pt=_i(e,C,lt),Tt=q?pt+ct/2:pt,Rt=c(lt,ft),Ct=u(lt,ft);mn(Rt,Ct)&&(Q&&!Hf(Q,Rt,Ct)||(o.beginPath(),o.arc(Rt,Ct,Tt,0,Math.PI*2),o.fill(),dt&&!q&&o.stroke()))}else{o.beginPath();for(let ft=V.start;ft<V.end;ft++){const lt=C.values[ft];if(!In(e,lt))continue;const pt=_i(e,C,lt),Tt=q?pt+ct/2:pt,Rt=c(lt,ft),Ct=u(lt,ft);mn(Rt,Ct)&&s.traceCircle(Rt,Ct,Tt)}o.fill(),dt&&!q&&o.stroke()}else for(let ft=V.start;ft<V.end;ft++){const lt=C.values[ft];if(!In(e,lt))continue;const pt=d(lt),Tt=_i(e,C,lt),Rt=pt?(E=(S=e.pointExpandedR)==null?void 0:S.call(e,lt))!=null?E:Tt*1.75:Tt,Ct=c(lt,ft),Kt=u(lt,ft),re=Qi(e,lt),Ee=re||w,Ce=l.shape.pointFillColor||Ee,be=l.shape.pointStrokeColor||Ee,Ne=pt&&(re||l.focusPoint.fill)||Ce,ye=pt?re||l.focusPoint.stroke||Ee:be,De=pt?l.focusPoint.lineWidth:ct,Zt=ds(e,lt)*z,ve=!!ye&&(De!=null?De:0)>0,xe=N==="circle"&&ve&&le(Zt)&&Zt<1&&Ne===ye,Vt=xe?Rt+(De||0)/2:Rt;mn(Ct,Kt)&&(o.fillStyle=$?VT(e,o,lt,Ct,Kt,Rt,Ee):Ne,o.globalAlpha=Zt,Ji(s,N,Ct,Kt,Vt,ve&&!xe?{fill:o.fillStyle,stroke:ye,lineWidth:De}:void 0,Tt))}}})}drawSelections(e,n){var r,i;const o=(r=e.getCanvasSelectedData)==null?void 0:r.call(e);if(!e.config.data_selection_enabled||!(o!=null&&o.length)||e.state.hasTreemap)return;const{ctx:s,painter:l,theme:{style:c}}=this,{margin:u}=e.state,f=or.bind(null,e),d=Zn.bind(null,e),h=o.some(f)?e.generateGetBarPoints(ir(e,n,kt.BAR,f),!1):null,m=o.some(d)?(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,ir(e,n,kt.CANDLESTICK,d),!1):null,S=h?as(e):null,E=S?tc(e):new Set;l.withTranslation(u.left,u.top,()=>{o.forEach(C=>{var w,N,z,$,G,V,J;const Q=e.color(C.id);if(f(C)&&h){const rt=Yi(e,h,C,C.index);if(!rt)return;const{points:et,rect:st}=rt,ct=S?ec(e,C,et,S,E).corners:0;S?l.fillRoundRect(st,ct,{fill:"#fff",alpha:.3}):l.fillRect(st,{fill:"#fff",alpha:.3}),S?l.strokeRoundRect(st,ct,{stroke:Q,lineWidth:2}):l.strokeRect(st,{stroke:Q,lineWidth:2})}else if(d(C)&&m){if(!((w=e.getCandlestickData)==null?void 0:w.call(e,C)))return;const et=Ki(e,m,C,C.index);if(!et)return;const{body:st,wickStart:ct,wickEnd:dt}=et;l.strokePath(()=>{l.traceLine(ct[0],ct[1],dt[0],dt[1])},{stroke:Q,lineWidth:3}),l.fillRect(st,{fill:"#fff",alpha:.3}),l.strokeRect(st,{stroke:Q,lineWidth:2})}else if(Ar(e,C)){const rt=gc(e,{id:C.id}),{x:et,y:st}=Hi(e,C),ct=(z=(N=e.pointR)==null?void 0:N.call(e,C))!=null?z:2.5,dt=(G=($=e.pointSelectR)==null?void 0:$.call(e,C))!=null?G:ct*2;if(!mn(et,st))return;Ji(l,"circle",et,st,dt,{fill:c.selectedPoint.fill,lineWidth:c.selectedPoint.lineWidth,stroke:c.selectedPoint.stroke||Q}),(V=e.isPointFocusOnly)!=null&&V.call(e)||Ji(l,rt,et,st,ct,{fill:c.shape.pointFillColor||Q,stroke:c.shape.pointStrokeColor||Q,lineWidth:(J=c.shape.pointLineWidth)!=null?J:1})}}),s.globalAlpha=1})}drawLabels(e,n){var r;if(!((r=e.hasDataLabel)!=null&&r.call(e)))return;const{ctx:i,painter:o,theme:{style:s}}=this,{margin:l}=e.state,{cx:c,cy:u}=n.pos,f=n.indices[kt.BAR]?e.generateGetBarPoints(n.indices[kt.BAR],!1):null,d=e.generateGetCandlestickPoints?e.generateGetCandlestickPoints(ir(e,n,kt.CANDLESTICK,Zn.bind(null,e)),!1):null,h=e.filterTargetsToShow().filter(C=>(or(e,C)||Ar(e,C)||Gi(e,C)||Zn(e,C))&&qr(e,C)),m=[];let S=0;h.forEach(C=>{const w=Zr(e,C),N=e.labelishData(C),z=[];for(let $=0;$<N.length;$++){const G=N[$],V=Ld(e,G);V&&G.index>=w.start&&G.index<w.end&&In(e,G)&&z.push({d:G,text:V})}S+=z.length,z.length&&m.push(z)});const E={size:()=>S};o.withTranslation(l.left,l.top,()=>{i.font=s.label.font,i.textAlign="center",m.forEach(C=>{var w,N;for(const{d:z,text:$}of C){let G,V;if(or(e,z)&&f){const J=Yi(e,f,z,z.index);if(!J)continue;const{points:Q,rect:rt}=J,et=e.getBaseValue(z),st=is(e,Q[2]),ct=et<0,dt=cc(i,$,0,0).h;G=e.config.axis_rotated&&!e.config.data_labels.centered?st[0]+(ct?-4:4):rt.x+rt.w/2,V=e.config.data_labels.centered||e.config.axis_rotated?rt.y+rt.h/2:st[1]+(ct?dt-3:-3),i.textAlign=e.config.axis_rotated&&!e.config.data_labels.centered?ct?"right":"left":"center",i.textBaseline=e.config.data_labels.centered||e.config.axis_rotated?"middle":"alphabetic"}else if(Zn(e,z)&&d){const J=(w=e.getCandlestickData)==null?void 0:w.call(e,z),Q=Ki(e,d,z,z.index),rt=J==null?void 0:J._isUp;if(!Q)continue;const{wickEnd:et,wickStart:st}=Q,ct=e.config[`axis_${(N=e.axis)==null?void 0:N.getId(z.id)}_inverted`];G=e.config.axis_rotated?rt?et[0]+4:st[0]-4:st[0],V=e.config.axis_rotated?st[1]+3:rt?et[1]-3:st[1]+12,!e.config.axis_rotated&&ct&&(V+=15*(rt?1:-1)),i.textAlign=e.config.axis_rotated?rt?"left":"right":"center",i.textBaseline="alphabetic"}else c&&u&&({x:G,y:V}=X0(n.pos,z,z.index),{x:G,y:V}=$d(e,i,z,G,V));G+=cs(e,z,"x",E),V+=cs(e,z,"y",E),mn(G,V)&&this.drawDataLabel(e,z,$,G,V)}})})}drawEmptyLabel(e){const n=e.config.data_empty_label_text,r=e.filterTargetsToShow();if(!n||r.length)return;const{margin:i,width:o,height:s}=e.state,{style:l}=this.theme;this.painter.text(String(n),i.left+o/2,i.top+s/2,{fill:l.emptyLabel.color,font:l.emptyLabel.font,textAlign:"center",textBaseline:"middle"})}drawZoomBrush(e,n,r){const{axis_rotated:i}=e.config,{height:o,margin:s,width:l}=e.state,c=Math.min(n,r),u=Math.abs(r-n),f=i?{x:s.left,y:s.top+c,w:l,h:u}:{x:s.left+c,y:s.top,w:u,h:o};u<=0||this.painter.fillRect(f,{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawSelectionDragArea(e,n){const{margin:r,width:i,height:o}=e.state,s={x:r.left,y:r.top,w:i,h:o},l=Math.max(s.x,n.x),c=Math.max(s.y,n.y),u=Math.min(s.x+s.w,n.x+n.w),f=Math.min(s.y+s.h,n.y+n.h);u<=l||f<=c||this.painter.fillRect({x:l,y:c,w:u-l,h:f-c},{fill:this.theme.style.zoomBrush.fill,alpha:this.theme.style.zoomBrush.opacity})}drawTreemaps(e){var n;const{ctx:r,painter:i,theme:{style:o}}=this,{config:s}=e,l=(n=e.getTreemapRoot)==null?void 0:n.call(e,e.data.targets),c=(l==null?void 0:l.children)||[];i.withState(()=>{var u;r.lineWidth=o.treemap.lineWidth,r.strokeStyle=o.treemap.stroke;for(const f of c){const{data:d}=f;if(!Nl(e,d))continue;const{x:h,y:m,w:S,h:E}=ai(e,f,l,!0);if(!mn(h,m)||!mn(h+S,m+E)||S<=0||E<=0)continue;const C={x:h,y:m,w:S,h:E};if(r.fillStyle=e.color(d.name),i.fillRect(C),i.strokeRect(C),!s.treemap_label_show||(d.ratio||0)<(s.treemap_label_threshold||0))continue;const w=V0(e,d,S,E);if(!w)continue;const N=w.split(`
|
|
38
|
+
`),z=!!s.data_labels.centered;r.font=o.label.font;const $=Sr(r.font),G=r.measureText((u=N[0])!=null?u:""),V=(G.fontBoundingBoxAscent||0)+(G.fontBoundingBoxDescent||0)||(G.actualBoundingBoxAscent||0)+(G.actualBoundingBoxDescent||0),J=Math.max($,V)+(N.length-1)*$,Q=z?m+E/2:m+J+5;let rt=z?h+S/2:h+5,et=Q-(N.length-1)*$/(z?2:1);r.textAlign=z?"center":"left",r.textBaseline=z?"middle":"alphabetic",{x:rt,y:et}=this.drawLabelImage(e,d,w,rt,et),r.fillStyle=Fd(e,d,o.label.color),Nd(e,i,d,w,rt,z?et+(N.length-1)*$/2:Q),N.forEach((st,ct)=>{i.text(st,rt,et+ct*$,{maxWidth:Math.max(0,S-8)})})}})}drawSubchartFocus(e,n){const{config:r,scale:i,state:o}=e,s=n==null?void 0:n.find(C=>C&&In(e,C));if(!s||!r.subchart_show||r.subchart_grid_focus_continuous||r.subchart_brush_enabled!==!1||r.grid_focus_show===!1||r.subchart_grid_focus===!1||!r.tooltip_show||r.axis_tooltip||!i.subX||o.width2<=0||o.height2<=0)return;const{margin2:l,width2:c,height2:u}=o,f=i.subX(s.x);if(!Number.isFinite(f))return;const{painter:d,theme:{style:h}}=this,m=h.axis.lineWidth,S=d.crisp(l.left+f,m),E=d.crisp(l.top+f,m);d.strokePath(()=>{r.axis_rotated?d.traceLine(l.left,E,l.left+c,E):d.traceLine(S,l.top,S,l.top+u)},{lineDash:h.focusGrid.dashArray,lineWidth:h.focusGrid.lineWidth,stroke:h.focusGrid.lineColor})}drawFocus(e,n){if(!(n!=null&&n.length))return;const{painter:r}=this,{style:i}=this.theme,{margin:o}=e.state,s=n.find(l=>l&&In(e,l));e.config.subchart_grid_focus!==!1&&!_l(e)&&this.drawSubchartFocus(e,n),r.withTranslation(o.left,o.top,()=>{if(e.config.tooltip_show&&e.config.grid_focus_show!==!1&&!e.config.axis_tooltip&&s){const{x:l,y:c}=Hi(e,s),u=i.axis.lineWidth,f=e.config.axis_rotated,d=Number.isFinite(f?c:l),h=Number.isFinite(f?l:c),m=z=>r.crisp(o.left+z,u)-o.left,S=z=>r.crisp(o.top+z,u)-o.top,E=e.config.grid_focus_edge&&!e.config.tooltip_grouped,C=_l(e),w=C?e.state.margin2.left-o.left+e.state.width2:e.state.width,N=C?e.state.margin2.top-o.top+e.state.height2:e.state.height;d&&r.strokePath(()=>{var z,$;if(f){if(r.traceLine(m(0),c,E&&h?l:m(w),c),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const G=((z=e.axis)==null?void 0:z.getId(s.id))==="y2";r.traceLine(l,E&&!G?c:S(0),l,E&&G?c:S(e.state.height))}}else if(r.traceLine(l,E&&h?c:S(0),l,S(N)),h&&e.config.grid_focus_y&&!e.config.tooltip_grouped){const G=(($=e.axis)==null?void 0:$.getId(s.id))==="y2";r.traceLine(E&&G?l:m(0),c,E&&!G?l:m(e.state.width),c)}},{lineDash:i.focusGrid.dashArray,lineWidth:i.focusGrid.lineWidth,stroke:i.focusGrid.lineColor})}e.config.point_show&&!e.state.canvasFocusMainRedraw&&n.filter(l=>l&&In(e,l)&&Ar(e,l)&&qr(e,{id:l.id})).forEach(l=>{var c,u,f,d;const h=gc(e,{id:l.id}),{x:m,y:S}=Hi(e,l),E=(u=(c=e.pointR)==null?void 0:c.call(e,l))!=null?u:2.5,C=(d=(f=e.pointExpandedR)==null?void 0:f.call(e,l))!=null?d:E*1.75,w=Qi(e,l),N=w||e.color(l.id),z=w||i.focusPoint.fill||i.shape.pointFillColor||N,$=w||i.focusPoint.stroke||N,G=i.focusPoint.lineWidth,V=ds(e,l),J=!!$&&(G!=null?G:0)>0,Q=h==="circle"&&J&&le(V)&&V<1&&z===$;mn(m,S)&&Ji(r,h,m,S,Q?C+(G||0)/2:C,J&&!Q?{fill:z,lineWidth:G,stroke:$,alpha:V}:{fill:z,alpha:V},E)}),this.drawFocusLabels(e,n)})}}var ZT=Object.defineProperty,nh=Object.getOwnPropertySymbols,JT=Object.prototype.hasOwnProperty,QT=Object.prototype.propertyIsEnumerable,_T=(t,e,n)=>e in t?ZT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qT=(t,e)=>{var n={};for(var r in t)JT.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&nh)for(var r of nh(t))e.indexOf(r)<0&&QT.call(t,r)&&(n[r]=t[r]);return n},qi=(t,e,n)=>_T(t,typeof e!="symbol"?e+"":e,n);const Fr="http://www.w3.org/2000/svg";function Fe(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:"");return Number.isFinite(n)?n:e}function $a(t,e){const n=Fe(t.opacity,1),r=Fe(t["fill-opacity"],1),i=n*r;return Number.isFinite(i)?i:e}function Ge(t,e){const n=t==null?void 0:t.trim();return n&&!/^(none|transparent|rgba\(0,\s*0,\s*0,\s*0\))$/i.test(n)?n:e}function oi(t,e){const n=Ge(t,""),r=e?Ge(e,""):"";return n&&n!==r?n:void 0}function si(t,e){const n=typeof t=="number"?t:parseFloat(t!=null?t:""),r=typeof e=="number"?e:parseFloat(e!=null?e:"");return Number.isFinite(n)&&(!Number.isFinite(r)||n!==r)?n:void 0}function to(t){return Array.isArray(t)?t.filter(e=>Number.isFinite(e)&&e>0):(t||"").split(/[,\s]+/).map(e=>parseFloat(e)).filter(e=>Number.isFinite(e)&&e>0)}function t1(t,e){const n=t.getPropertyValue("font").trim();if(n)return n;const r=t.getPropertyValue("font-size").trim(),i=t.getPropertyValue("font-family").trim();if(!r||!i)return e;const o=t.getPropertyValue("font-style").trim(),s=t.getPropertyValue("font-variant").trim(),l=t.getPropertyValue("font-weight").trim(),c=t.getPropertyValue("line-height").trim(),u=c&&c!=="normal"?`${r}/${c}`:r;return[o&&o!=="normal"?o:"",s&&s!=="normal"?s:"",l&&!/^(normal|400)$/.test(l)?l:"",u,i].filter(Boolean).join(" ")}function Nr(t,e){var n;const r=e.replace(/-([a-z])/g,(i,o)=>o.toUpperCase());return(n=t[e])!=null?n:t[r]}function Je(t,e){const n=Nr(t,e);return(n==null?"":Ge(String(n),""))||void 0}function Dn(t,e){const n=Nr(t,e),r=typeof n=="number"?n:parseFloat(String(n!=null?n:""));return Number.isFinite(r)?r:void 0}function xa(t){const e=Dn(t,"opacity"),n=Dn(t,"fill-opacity");return e===void 0&&n===void 0?void 0:(e!=null?e:1)*(n!=null?n:1)}function vc(t){const e=Nr(t,"stroke-dasharray"),n=e==null?[]:to(e);return n.length?n:void 0}function sr(t){var e,n,r,i;const o=Nr(t,"font");if(o!=null&&String(o).trim())return String(o).trim();const s=Nr(t,"font-size"),l=Nr(t,"font-family");if(s==null||l==null)return;const c=String(s).trim(),u=String(l).trim();if(!c||!u)return;const f=String((e=Nr(t,"font-style"))!=null?e:"").trim(),d=String((n=Nr(t,"font-variant"))!=null?n:"").trim(),h=String((r=Nr(t,"font-weight"))!=null?r:"").trim(),m=String((i=Nr(t,"line-height"))!=null?i:"").trim();return[f&&f!=="normal"?f:"",d&&d!=="normal"?d:"",h&&!/^(normal|400)$/.test(h)?h:"",m&&m!=="normal"?`${c}/${m}`:c,u].filter(Boolean).join(" ")}function qe(t,e,n){var r;const i=Object.keys(n).reduce((o,s)=>(n[s]!==void 0&&(o[s]=n[s]),o),{});Object.keys(i).length&&(t[e]=Kr((r=t[e])!=null?r:{},i))}function rh(t){return t.split(",").map(e=>e.trim().replace(/\s*>\s*/g," ").replace(/\s+/g," ").replace(/^(?:svg)?\.bb\s+/,"").replace(/(^|\s)(?:g|path|rect|line|text|circle)\./g,"$1.")).filter(Boolean)}function pc(t){return Object.keys(t).filter(e=>t[e]!==void 0)}function ah(t,e,n){return pc(e).forEach(r=>{n!=null&&n.has(r)||(t[r]=e[r])}),t}function ih(t){const e=t.split(" ");return e.every((n,r)=>n==="line"||n==="text"?r===e.length-1:/^(\.[A-Za-z_-][\w-]*)+$/.test(n))}function oh(t){const e=t.split(" "),n=e[e.length-1];return n==="line"||n==="text"?n:null}function e1(t){return(t||"").split(/\s+/).filter(Boolean)}function n1(t,e){const n=e==="text"?{labelColor:Je(t,"fill"),labelFont:sr(t)}:{lineColor:Je(t,"stroke"),lineWidth:Dn(t,"stroke-width"),dashArray:vc(t)};return ah({},n)}function r1(t){const e=[];return Object.keys(t!=null?t:{}).forEach(n=>{rh(n).forEach(r=>{const i=oh(r)||"line",o=n1(t[n],i);ih(r)&&pc(o).length&&e.push({selector:r,target:i,style:o})})}),e}function a1(t,e,n,r){if(!ih(t))return!1;const i=oh(t);if(i&&i!==r)return!1;if(!i&&r==="text")return!1;const o=e1(n),s=`bb-${e}grid-line`,l=new Set(["bb-grid","bb-grid-lines",`bb-${e}grid-lines`,s,...o]),c=(t.match(/\.[A-Za-z_-][\w-]*/g)||[]).map(u=>u.slice(1));return!!c.length&&c.every(u=>l.has(u))&&(c.includes(s)||o.some(u=>c.includes(u)))}function i1(t,e,n){switch(e){case".bb-axis path.domain":case".bb-axis .domain":case".bb-axis-x path.domain":case".bb-axis-x .domain":case".bb-axis-y path.domain":case".bb-axis-y .domain":case".bb-axis-y2 path.domain":case".bb-axis-y2 .domain":qe(t,"axis",{lineColor:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width")});break;case".bb-axis line":case".bb-axis .tick line":case".bb-axis-x line":case".bb-axis-x .tick line":case".bb-axis-y line":case".bb-axis-y .tick line":case".bb-axis-y2 line":case".bb-axis-y2 .tick line":qe(t,"axis",{tickColor:Je(n,"stroke"),tickWidth:Dn(n,"stroke-width")});break;case".bb-axis text":case".bb-axis .tick text":{const r=sr(n);qe(t,"axis",{labelColor:Je(n,"fill"),xTickFont:r,yTickFont:r,y2TickFont:r});break}case".bb-axis-x text":case".bb-axis-x .tick text":qe(t,"axis",{labelColor:Je(n,"fill"),xTickFont:sr(n)});break;case".bb-axis-y text":case".bb-axis-y .tick text":qe(t,"axis",{labelColor:Je(n,"fill"),yTickFont:sr(n)});break;case".bb-axis-y2 text":case".bb-axis-y2 .tick text":qe(t,"axis",{labelColor:Je(n,"fill"),y2TickFont:sr(n)});break;case".tick._active_ text":case".bb-axis .tick._active_ text":case".bb-axis-x .tick._active_ text":qe(t,"axis",{activeLabelColor:Je(n,"fill")});break;case".bb-axis-x-label":case".bb-axis-x .bb-axis-x-label":qe(t,"axis",{labelFont:sr(n),xLabelColor:Je(n,"fill")});break;case".bb-axis-y-label":case".bb-axis-y .bb-axis-y-label":qe(t,"axis",{labelFont:sr(n),yLabelColor:Je(n,"fill")});break;case".bb-axis-y2-label":case".bb-axis-y2 .bb-axis-y2-label":qe(t,"axis",{labelFont:sr(n),y2LabelColor:Je(n,"fill")});break;case".bb-grid line":case".bb-grid .bb-xgrid":case".bb-grid .bb-ygrid":case".bb-xgrid":case".bb-ygrid":qe(t,"grid",{lineColor:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width"),dashArray:vc(n)});break;case".bb-grid text":qe(t,"grid",{labelColor:Je(n,"fill"),labelFont:sr(n)});break;case".bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus line":case".bb-grid .bb-xgrid-focus":qe(t,"focusGrid",{lineColor:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width"),dashArray:vc(n)});break;case".bb-region rect":case".bb-region":qe(t,"region",{fill:Je(n,"fill"),opacity:xa(n)});break;case".bb-region text":qe(t,"region",{labelColor:Je(n,"fill"),labelFont:sr(n)});break;case".bb-bar":qe(t,"shape",{barOpacity:xa(n),barStrokeColor:Je(n,"stroke"),barLineWidth:Dn(n,"stroke-width")});break;case".bb-bar._expanded_":qe(t,"shape",{barExpandedOpacity:xa(n)});break;case".bb-candlestick":qe(t,"shape",{candlestickStrokeColor:Je(n,"stroke"),candlestickLineWidth:Dn(n,"stroke-width")});break;case".bb-candlestick._expanded_":qe(t,"shape",{candlestickExpandedOpacity:xa(n)});break;case".bb-line":qe(t,"shape",{barConnectLineColor:Je(n,"stroke"),barConnectLineWidth:Dn(n,"stroke-width"),lineWidth:Dn(n,"stroke-width")});break;case".bb-target.bb-focused .bb-line":case".bb-target.bb-focused path.bb-line":qe(t,"shape",{lineFocusedWidth:Dn(n,"stroke-width")});break;case".bb-target.bb-defocused":qe(t,"shape",{targetDefocusedOpacity:Dn(n,"opacity")});break;case".bb-area":qe(t,"shape",{areaOpacity:xa(n)});break;case".bb-circle":qe(t,"shape",{pointFillColor:Je(n,"fill"),pointStrokeColor:Je(n,"stroke"),pointLineWidth:Dn(n,"stroke-width")});break;case".bb-selected-circle":qe(t,"selectedPoint",{fill:Je(n,"fill"),stroke:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width")});break;case".bb-circle._expanded_":qe(t,"focusPoint",{fill:Je(n,"fill"),stroke:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width")});break;case".bb-zoom-brush":qe(t,"zoomBrush",{fill:Je(n,"fill"),opacity:xa(n)});break;case".bb-brush .extent":case".bb-brush .selection":qe(t,"subchartBrush",{fill:Je(n,"fill"),opacity:xa(n)});break;case".bb-brush .handle--custom":qe(t,"subchartBrush",{handleFill:Je(n,"fill"),handleOpacity:xa(n),handleStroke:Je(n,"stroke"),handleLineWidth:Dn(n,"stroke-width")});break;case".bb-chart-treemaps rect":case".bb-chart-treemaps":qe(t,"treemap",{stroke:Je(n,"stroke"),lineWidth:Dn(n,"stroke-width")});break;case".bb-text.bb-empty":case".bb-text .bb-empty":case".bb-empty":qe(t,"emptyLabel",{color:Je(n,"fill"),font:sr(n)});break;case".bb-text":qe(t,"label",{color:Je(n,"fill"),font:sr(n)});break;case".bb-title":qe(t,"title",{color:Je(n,"fill"),font:sr(n)});break}}function o1(t){const e={};return Object.keys(t!=null?t:{}).forEach(n=>{rh(n).forEach(r=>{i1(e,r,t[n])})}),e}function s1(t){if(!t)return{};const e=t,{selectors:n}=e,r=qT(e,["selectors"]);return Kr({},o1(n),r)}function sh(t,e){try{return JSON.stringify({className:t.className,style:t.getAttribute("style")||"",override:e||null})}catch(n){return null}}class l1{constructor(){qi(this,"style"),qi(this,"cacheContainer",null),qi(this,"cacheKey",null),qi(this,"gridLineSelectorOverrides",[]),qi(this,"directGridOverrideKeys",new Set)}load(e,n){var r,i,o,s,l;const c=Ze.createElementNS(Fr,"svg");this.gridLineSelectorOverrides=r1(n==null?void 0:n.selectors),this.directGridOverrideKeys=new Set(Object.keys((r=n==null?void 0:n.grid)!=null?r:{})),c.setAttribute("class","bb"),c.style.cssText="position:absolute;visibility:hidden;pointer-events:none;width:0;height:0;overflow:hidden",e.appendChild(c);const u=(Mn,jn)=>{const Qn=fe.getComputedStyle(Mn),nr={};for(const Bn of jn)nr[Bn]=Bn==="font"?t1(Qn,""):Qn.getPropertyValue(Bn).trim();return nr},f=(Mn,jn,Qn)=>{const nr=Ze.createElementNS(Fr,Mn);nr.setAttribute("class",jn),c.appendChild(nr);const Bn=u(nr,Qn);return c.removeChild(nr),Bn},d=(Mn,jn,Qn,nr)=>{const Bn=Ze.createElementNS(Fr,"g"),pr=Ze.createElementNS(Fr,jn);Bn.setAttribute("class",Mn),Qn&&pr.setAttribute("class",Qn),Bn.appendChild(pr),c.appendChild(Bn);const la=u(pr,nr);return c.removeChild(Bn),la},h=(Mn,jn,Qn,nr,Bn)=>{const pr=Ze.createElementNS(Fr,"g"),la=Ze.createElementNS(Fr,"g"),To=Ze.createElementNS(Fr,Qn);pr.setAttribute("class",Mn),la.setAttribute("class",jn),nr&&To.setAttribute("class",nr),la.appendChild(To),pr.appendChild(la),c.appendChild(pr);const BR=u(To,Bn);return c.removeChild(pr),BR},m=(Mn,jn,Qn,nr="")=>{const Bn=Ze.createElementNS(Fr,"g"),pr=Ze.createElementNS(Fr,"g"),la=Ze.createElementNS(Fr,jn);Bn.setAttribute("class",`bb-axis ${Mn}`),pr.setAttribute("class",["tick",nr].filter(Boolean).join(" ")),la.textContent=jn==="text"?"0":"",pr.appendChild(la),Bn.appendChild(pr),c.appendChild(Bn);const To=u(la,Qn);return c.removeChild(Bn),To},S="rgb(1, 2, 3)",E=(Mn,jn)=>{const Qn=Ze.createElement("style");Qn.textContent=`
|
|
39
39
|
.bb-shapes-canvas-probe .bb-circle {
|
|
40
|
-
fill: ${
|
|
41
|
-
stroke: ${
|
|
40
|
+
fill: ${S};
|
|
41
|
+
stroke: ${S};
|
|
42
42
|
}
|
|
43
|
-
`,He.head.appendChild(Zn);try{return f("bb-shapes bb-shapes-canvas-probe","circle",On,Wn)}finally{Zn.remove()}},I=f("bb-axis bb-axis-x","path","domain",["stroke","stroke-width"]),C=h("bb-axis-x","line",["stroke","stroke-width"]),P=h("bb-axis-x","text",["fill","font"]),z=h("bb-axis-x","text",["fill"],"_active_"),N=h("bb-axis-y","text",["fill","font"]),B=h("bb-axis-y2","text",["fill","font"]),W=f("bb-axis bb-axis-x","text","bb-axis-x-label",["fill","font"]),V=f("bb-axis bb-axis-y","text","bb-axis-y-label",["fill","font"]),J=f("bb-axis bb-axis-y2","text","bb-axis-y2-label",["fill","font"]),q=u("circle","",["fill","stroke","stroke-width"]),at=f("bb-grid","line","bb-ygrid",["stroke","stroke-width","stroke-dasharray"]),et=f("bb-grid","text","",["fill","font"]),ot=d("bb-grid","bb-xgrid-focus","line","bb-xgrid-focus",["stroke","stroke-width","stroke-dasharray"]),lt=u("text","bb-text bb-empty",["fill","font"]),ft=f("bb-region","rect","",["fill","fill-opacity"]),_=f("bb-region","text","",["fill","font"]),dt=u("path","bb-bar",["opacity","fill-opacity","stroke","stroke-width"]),ut=u("path","bb-bar _expanded_",["opacity","fill-opacity"]),xt=u("path","bb-candlestick",["stroke","stroke-width"]),bt=u("path","bb-candlestick _expanded_",["opacity","fill-opacity"]),Rt=u("path","bb-line",["stroke-width"]),Et=f("bb-target bb-focused","path","bb-line",["stroke-width"]),Zt=u("g","bb-target bb-defocused",["opacity"]),fe=u("path","bb-area",["opacity","fill-opacity"]),me=u("circle","bb-circle",["fill","stroke","stroke-width"]),xe=u("circle","bb-selected-circle",["fill","stroke","stroke-width"]),Te=A("bb-circle _expanded_",["fill","stroke","stroke-width"]),Fe=u("rect","bb-zoom-brush",["fill","fill-opacity","opacity"]),Ie=f("bb-brush","rect","extent",["fill","fill-opacity","opacity"]),ke=f("bb-brush","rect","selection",["fill","fill-opacity","opacity"]),Jt=f("bb-brush","path","handle--custom",["fill","fill-opacity","opacity","stroke","stroke-width"]),Ae=f("bb-chart-treemaps","rect","",["stroke","stroke-width"]),Le=u("text","bb-text",["fill","font"]),Yt=f("","text","bb-title",["fill","font"]),dn=Xe(Fe.fill,"#000"),qe=De(Fe["fill-opacity"]||Fe.opacity,.1),Dn=Xe(ke.fill,Xe(Ie.fill,dn)),Fn=(s=(o=(i=(r=ri(ke["fill-opacity"],1))!=null?r:ri(ke.opacity,1))!=null?i:ri(Ie["fill-opacity"],1))!=null?o:ri(Ie.opacity,1))!=null?s:qe,Se=Xe(Jt.stroke,"transparent"),we={axis:{lineColor:Xe(I.stroke,"#000"),lineWidth:De(I["stroke-width"],1),tickColor:Xe(C.stroke,Xe(I.stroke,"#000")),tickWidth:De(C["stroke-width"],De(I["stroke-width"],1)),labelFont:V.font||N.font||"10px sans-serif",xTickFont:P.font||N.font||"10px sans-serif",yTickFont:N.font||"10px sans-serif",y2TickFont:B.font||N.font||"10px sans-serif",labelColor:Xe(N.fill,"#000"),xLabelColor:Xe(W.fill,Xe(P.fill,"#000")),yLabelColor:Xe(V.fill,Xe(N.fill,"#000")),y2LabelColor:Xe(J.fill,Xe(V.fill,Xe(N.fill,"#000"))),activeLabelColor:ni(z.fill,P.fill)||Xe(N.fill,"#000")},grid:{lineColor:Xe(at.stroke,"#aaa"),lineWidth:De(at["stroke-width"],1),dashArray:Ki(at["stroke-dasharray"]),labelFont:et.font||N.font||"10px sans-serif",labelColor:Xe(et.fill,"#aaa")},focusGrid:{lineColor:Xe(ot.stroke,Xe(at.stroke,"#aaa")),lineWidth:De(ot["stroke-width"],De(at["stroke-width"],1)),dashArray:Ki(ot["stroke-dasharray"]||at["stroke-dasharray"])},emptyLabel:{font:lt.font||Le.font||N.font||"20px sans-serif",color:Xe(lt.fill,"#808080")},region:{fill:Xe(ft.fill,"steelblue"),opacity:De(ft["fill-opacity"],.1),labelFont:_.font||N.font||"10px sans-serif",labelColor:Xe(_.fill,"#000")},shape:{barOpacity:Pa(dt,1),barExpandedOpacity:De(Pa(ut,Pa(dt,1)),Pa(dt,1)),barStrokeColor:Xe(dt.stroke,"#000"),barLineWidth:De(dt["stroke-width"],0),barConnectLineColor:Xe(Rt.stroke,"#000"),barConnectLineWidth:De(Rt["stroke-width"],1),candlestickStrokeColor:Xe(xt.stroke,"#000"),candlestickLineWidth:De(xt["stroke-width"],1),candlestickExpandedOpacity:De(Pa(bt,1),1),lineWidth:De(Rt["stroke-width"],1),lineFocusedWidth:De(Et["stroke-width"],2),areaOpacity:Pa(fe,.2),targetDefocusedOpacity:De(Zt.opacity,.3),pointFillColor:ni(me.fill,q.fill),pointStrokeColor:ni(me.stroke,q.stroke),pointLineWidth:ri(me["stroke-width"],q["stroke-width"])},selectedPoint:{fill:Xe(xe.fill,"#fff"),stroke:ni(xe.stroke),lineWidth:De(xe["stroke-width"],2)},focusPoint:{fill:ni(Te.fill,m),stroke:ni(Te.stroke,m),lineWidth:De(Te["stroke-width"],1)},zoomBrush:{fill:dn,opacity:qe},subchartBrush:{fill:Dn,opacity:Fn,handleFill:Xe(Jt.fill,"transparent"),handleOpacity:Pa(Jt,1),handleStroke:Se,handleLineWidth:De(Jt["stroke-width"],Se==="transparent"?0:1)},treemap:{stroke:Xe(Ae.stroke,"#fff"),lineWidth:De(Ae["stroke-width"],1)},label:{font:Le.font||N.font||"10px sans-serif",color:Xe(Le.fill,"#000")},title:{font:Yt.font||Le.font||N.font||"14px sans-serif",color:Xe(Yt.fill,"#000")}},za=LT(n),Kt=Gr(we,za),ma=n==null?void 0:n.axis,nR=!!ma&&Object.prototype.hasOwnProperty.call(ma,"labelColor"),rR=!!ma&&Object.prototype.hasOwnProperty.call(ma,"labelFont");if(Kt.axis.lineWidth=De(Kt.axis.lineWidth,we.axis.lineWidth),Kt.axis.tickWidth=De(Kt.axis.tickWidth,Kt.axis.lineWidth),rR){const On=ma,Wn=Kt.axis.labelFont;On.xTickFont===void 0&&(Kt.axis.xTickFont=Wn),On.yTickFont===void 0&&(Kt.axis.yTickFont=Wn),On.y2TickFont===void 0&&(Kt.axis.y2TickFont=Wn)}if(Kt.axis.labelFont=Kt.axis.labelFont||we.axis.labelFont,Kt.axis.xTickFont=Kt.axis.xTickFont||Kt.axis.labelFont,Kt.axis.yTickFont=Kt.axis.yTickFont||Kt.axis.labelFont,Kt.axis.y2TickFont=Kt.axis.y2TickFont||Kt.axis.yTickFont,Kt.axis.labelColor=Xe(Kt.axis.labelColor,we.axis.labelColor),nR){const On=Kt.axis.labelColor;ma.xLabelColor===void 0&&(Kt.axis.xLabelColor=On),ma.yLabelColor===void 0&&(Kt.axis.yLabelColor=On),ma.y2LabelColor===void 0&&(Kt.axis.y2LabelColor=On)}Kt.axis.xLabelColor=Xe(Kt.axis.xLabelColor,Kt.axis.labelColor),Kt.axis.yLabelColor=Xe(Kt.axis.yLabelColor,Kt.axis.labelColor),Kt.axis.y2LabelColor=Xe(Kt.axis.y2LabelColor,Kt.axis.yLabelColor),Kt.axis.activeLabelColor=Xe(Kt.axis.activeLabelColor,Kt.axis.labelColor),Kt.grid.lineWidth=De(Kt.grid.lineWidth,we.grid.lineWidth),Kt.grid.dashArray=Ki(Kt.grid.dashArray),Kt.focusGrid.lineWidth=De(Kt.focusGrid.lineWidth,we.focusGrid.lineWidth),Kt.focusGrid.dashArray=Ki(Kt.focusGrid.dashArray),Kt.region.opacity=De(Kt.region.opacity,we.region.opacity),Kt.shape.barOpacity=De(Kt.shape.barOpacity,we.shape.barOpacity),Kt.shape.barExpandedOpacity=De(Kt.shape.barExpandedOpacity,Kt.shape.barOpacity),Kt.shape.barLineWidth=De(Kt.shape.barLineWidth,we.shape.barLineWidth),Kt.shape.barConnectLineWidth=De(Kt.shape.barConnectLineWidth,we.shape.barConnectLineWidth),Kt.shape.candlestickLineWidth=De(Kt.shape.candlestickLineWidth,we.shape.candlestickLineWidth),Kt.shape.candlestickStrokeColor=Xe(Kt.shape.candlestickStrokeColor,we.shape.candlestickStrokeColor),Kt.shape.candlestickExpandedOpacity=De(Kt.shape.candlestickExpandedOpacity,we.shape.candlestickExpandedOpacity),Kt.shape.lineWidth=De(Kt.shape.lineWidth,we.shape.lineWidth),Kt.shape.lineFocusedWidth=De(Kt.shape.lineFocusedWidth,we.shape.lineFocusedWidth),Kt.shape.areaOpacity=De(Kt.shape.areaOpacity,we.shape.areaOpacity),Kt.shape.targetDefocusedOpacity=De(Kt.shape.targetDefocusedOpacity,we.shape.targetDefocusedOpacity),Kt.shape.pointLineWidth=ri(Kt.shape.pointLineWidth),Kt.selectedPoint.lineWidth=De(Kt.selectedPoint.lineWidth,we.selectedPoint.lineWidth),Kt.focusPoint.lineWidth=De(Kt.focusPoint.lineWidth,we.focusPoint.lineWidth),Kt.zoomBrush.opacity=De(Kt.zoomBrush.opacity,we.zoomBrush.opacity),Kt.subchartBrush.opacity=De(Kt.subchartBrush.opacity,we.subchartBrush.opacity),Kt.subchartBrush.handleOpacity=De(Kt.subchartBrush.handleOpacity,we.subchartBrush.handleOpacity),Kt.subchartBrush.handleLineWidth=De(Kt.subchartBrush.handleLineWidth,we.subchartBrush.handleLineWidth),Kt.treemap.lineWidth=De(Kt.treemap.lineWidth,we.treemap.lineWidth),this.style=Kt,this.cacheContainer=e,this.cacheKey=$d(e,n),l.remove()}reload(e,n){const r=$d(e,n);r!==null&&this.style&&this.cacheContainer===e&&this.cacheKey===r||this.load(e,n)}}var FT=Object.defineProperty,NT=(t,e,n)=>e in t?FT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sr=(t,e,n)=>NT(t,typeof e!="symbol"?e+"":e,n);const Ma=24,Bd=64,oc=[br,nr,Yn];function ai(t,e){return Math.floor(t/e)}function zd(t,e,n){var r,i;const o=ai(e.x,n),s=ai(e.x+((r=e.w)!=null?r:0),n),l=ai(e.y,n),c=ai(e.y+((i=e.h)!=null?i:0),n);for(let u=o;u<=s;u++)for(let f=l;f<=c;f++){const d=`${u}:${f}`,h=t.get(d);h?h.push(e):t.set(d,[e])}}function Ud(t,e,n,r,i=0){const o=ai(e,r),s=ai(n,r),l=[];for(let c=-i;c<=i;c++)for(let u=-i;u<=i;u++){const f=t.get(`${o+c}:${s+u}`);if(f!=null&&f.length)for(let d=0;d<f.length;d++)l.push(f[d])}return l}function $T(t,e){var n,r,i;const o=t.config.point_sensitivity;if(Number.isFinite(o))return o;(n=t.pointR)==null||n.call(t,e);const s=(i=(r=t.getPointSensitivity)==null?void 0:r.call(t,e))!=null?i:Ma;return Number.isFinite(s)?s:Ma}function BT(t,e){return la(t,e)&&e.values.length>Mf&&!t.config.data_selection_enabled&&Number.isFinite(t.config.point_sensitivity)&&Number.isFinite(t.config.point_r)}class zT{constructor(){Sr(this,"bars",[]),Sr(this,"points",[]),Sr(this,"indices",[]),Sr(this,"barGrid",new Map),Sr(this,"pointGrid",new Map),Sr(this,"plot",{x:0,y:0,w:0,h:0}),Sr(this,"pointCellSize",Ma),Sr(this,"maxPointSensitivity",Ma),Sr(this,"grouped",!1),Sr(this,"pointBased",!1),Sr(this,"indexAxis","x")}rebuild(e,n){var r,i,o;const{current:s,margin:l,width:c,height:u}=e.state,f=e.filterTargetsToShow();this.bars=[],this.points=[],this.indices=[],this.barGrid=new Map,this.pointGrid=new Map,this.maxPointSensitivity=Ma,this.indexAxis=e.config.axis_rotated?"y":"x",this.plot=e.state.hasTreemap?{x:0,y:0,w:s.width,h:s.height}:{x:l.left,y:l.top,w:c,h:u},this.grouped=!!e.config.tooltip_grouped&&!e.state.hasTreemap,this.pointBased=!(e.config.axis_x_forceAsSingle&&this.grouped)&&(!!((r=e.isMultipleX)!=null&&r.call(e))||f.some(C=>la(e,C)||ca(e,C)));const h=this.grouped&&(!this.pointBased||e.config.data_selection_enabled&&e.config.data_selection_grouped)?new Map:null,m=(C,P,z)=>{var N,B;if(!h)return;const W=(B=(N=e.getXCacheKey)==null?void 0:N.call(e,z.x))!=null?B:z.index;Number.isFinite(z.index)&&!h.has(W)&&pn(C,P)&&h.set(W,{x:C,y:P,data:z})};if(e.state.hasTreemap){const C=(i=e.getTreemapRoot)==null?void 0:i.call(e,e.data.targets),P=(C==null?void 0:C.children)||[];for(const z of P){const{data:N}=z;if(!Il(e,N))continue;const{x:B,y:W,w:V,h:J}=ti(e,z,C,!0);!pn(B,W)||!pn(B+V,W+J)||this.addBar({x:B,y:W,w:V,h:J,data:N})}this.indices=[];return}if(n.indices[jt.BAR]||f.some(nr.bind(null,e))){const C=nr.bind(null,e),P=er(e,n,jt.BAR,C),z=e.generateGetBarPoints(P,!1);f.filter(C).filter(N=>Qa(e,N,oc)).forEach(N=>{const B=Wr(e,N);for(let W=B.start;W<B.end;W++){const V=N.values[W];if(!In(e,V))continue;const J=Xi(e,z,V,W);if(!J)continue;const{rect:q}=J,at=l.left+q.x,et=l.top+q.y,{w:ot,h:lt}=q;this.addBar({x:at,y:et,w:ot,h:lt,data:V}),m(at+ot/2,et+lt/2,V)}})}if(n.indices[jt.CANDLESTICK]||f.some(Yn.bind(null,e))){const C=Yn.bind(null,e),P=er(e,n,jt.CANDLESTICK,C),z=(o=e.generateGetCandlestickPoints)==null?void 0:o.call(e,P,!1);z&&f.filter(C).filter(N=>Qa(e,N,oc)).forEach(N=>{var B;const W=Wr(e,N);for(let V=W.start;V<W.end;V++){const J=N.values[V];if(!((B=e.getCandlestickData)==null?void 0:B.call(e,J)))continue;const at=Gi(e,z,J,V);if(!at)continue;const{body:et}=at,ot=l.left+et.x,lt=l.top+et.y,{w:ft,h:_}=et;this.addBar({x:ot,y:lt,w:Math.max(1,ft),h:Math.max(1,_),data:J}),m(ot+ft/2,lt+_/2,J)}})}const{cx:A,cy:I}=n.pos;A&&I&&f.filter(br.bind(null,e)).filter(C=>Qa(e,C,oc)).forEach(C=>{const P=Wr(e,C),z=BT(e,C)?Df(c,u,e.config.point_r):null;for(let N=P.start;N<P.end;N++){const B=C.values[N];if(!In(e,B))continue;const W=l.left+A(B,N),V=l.top+I(B,N),J=$T(e,B);pn(W,V)&&(z&&!Ff(z,W-l.left,V-l.top)||(this.addPoint({x:W,y:V,sensitivity:J,data:B}),m(W,V,B)))}}),this.buildPointGrid(),this.indices=h?Array.from(h.values()).sort((C,P)=>C[this.indexAxis]-P[this.indexAxis]):[]}hitBar(e,n){for(const r of Ud(this.barGrid,e,n,Bd)){const{w:i=0,h:o=0}=r;if(e>=r.x&&e<=r.x+i&&n>=r.y&&n<=r.y+o)return r.data}return null}hitPoint(e,n){var r,i;let o=null,s=Number.POSITIVE_INFINITY;for(const l of Ud(this.pointGrid,e,n,this.pointCellSize,1)){const c=l.x-e,u=l.y-n,f=Math.sqrt(c*c+u*u),d=(r=l.sensitivity)!=null?r:Ma;f<=d&&f<s&&(s=f,o=l)}return(i=o==null?void 0:o.data)!=null?i:null}findNearest(e,n){const r=this.hitBar(e,n);if(r)return r;if(!this.pointBased&&this.grouped&&this.isWithinPlot(e,n)){const i=this.findNearestIndexItem(e,n);if(i)return i.data}return this.hitPoint(e,n)}findNearestShape(e,n){var r;return(r=this.hitBar(e,n))!=null?r:this.hitPoint(e,n)}findNearestIndexByCoord(e,n){var r,i;return(i=(r=this.findNearestIndexItem(e,n))==null?void 0:r.data)!=null?i:null}findInRect(e,n=!1){const r=Math.min(e.x,e.x+e.w),i=Math.max(e.x,e.x+e.w),o=Math.min(e.y,e.y+e.h),s=Math.max(e.y,e.y+e.h),l=new Set,c=[],u=f=>{const d=f.data,h=`${d.id}:${d.index}`;l.has(h)||(l.add(h),c.push(d))};if(n){const f=this.indexAxis,d=f==="y"?o:r,h=f==="y"?s:i;return this.indices.filter(m=>m[f]>=d&&m[f]<=h).forEach(u),c}return this.bars.filter(f=>{var d,h;const m=(d=f.w)!=null?d:0,A=(h=f.h)!=null?h:0;return!(i<f.x||f.x+m<r)&&!(s<f.y||f.y+A<o)}).forEach(u),this.points.filter(f=>f.x>=r&&f.x<=i&&f.y>=o&&f.y<=s).forEach(u),c}addBar(e){this.bars.push(e),zd(this.barGrid,e,Bd)}addPoint(e){var n;const r=(n=e.sensitivity)!=null?n:Ma;this.maxPointSensitivity=Math.max(this.maxPointSensitivity,r),this.points.push(e)}buildPointGrid(){this.pointCellSize=Math.max(1,this.maxPointSensitivity),this.pointGrid=new Map;for(const e of this.points)zd(this.pointGrid,e,this.pointCellSize)}isWithinPlot(e,n){const{plot:r}=this;return e>=r.x&&e<=r.x+r.w&&n>=r.y&&n<=r.y+r.h}findNearestIndexItem(e,n){const{indexAxis:r,indices:i}=this,o=r==="y"?n:e;if(!i.length)return null;let s=0,l=i.length-1;for(;s<l;){const f=s+l>>1;i[f][r]<o?s=f+1:l=f}const c=i[s],u=i[s-1];return u&&Math.abs(u[r]-o)<Math.abs(c[r]-o)?u:c}}var UT=Object.defineProperty,kd=Object.getOwnPropertySymbols,kT=Object.prototype.hasOwnProperty,XT=Object.prototype.propertyIsEnumerable,Xd=(t,e,n)=>e in t?UT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ln=(t,e)=>{for(var n in e||(e={}))kT.call(e,n)&&Xd(t,n,e[n]);if(kd)for(var n of kd(e))XT.call(e,n)&&Xd(t,n,e[n]);return t};const ze={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_",dummy:"_dummy_"},Ye={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcLabelLineText:"bb-arc-label-line-text",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"},as={area:"bb-area",areas:"bb-areas"},Rn={axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",axisXTooltip:"bb-axis-x-tooltip",axisYTooltip:"bb-axis-y-tooltip",axisY2Tooltip:"bb-axis-y2-tooltip",axisTooltipX:"bb-axis-tooltip-x",axisTooltipY:"bb-axis-tooltip-y"},rr={bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",barConnectLine:"bb-bar-connectLine"},Yr={candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"},Bn={chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"},sc={colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"},La={dragarea:"bb-dragarea",INCLUDED:"_included_"},Zi={funnel:"bb-funnel",chartFunnel:"bb-chart-funnel",chartFunnels:"bb-chart-funnels",funnelBackground:"bb-funnel-background"},ar={chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"},$e={legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"},Lr={chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"},Kr={eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"},cn={focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",ygridFocus:"bb-ygrid-focus"},Tn={grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"},Zr={level:"bb-level",levels:"bb-levels"},Gd={chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"},Ji={region:"bb-region",regions:"bb-regions"},gn={selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"},bn={shape:"bb-shape",shapes:"bb-shapes"},Wd={brush:"bb-brush",subchart:"bb-subchart"},En={chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",textBorderRect:"bb-text-border",textLabelImage:"bb-text-label-image",TextOverlapping:"text-overlapping"},is={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},Vd={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},lc={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"};var tn=ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln(ln({},ze),Ye),as),Rn),rr),Yr),Bn),sc),La),ar),$e),Lr),Kr),cn),Zi),Tn),Zr),Gd),Ji),gn),bn),Wd),En),is),Vd),lc),GT={boost_useCssRule:!1,boost_useWorker:!1},WT={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},VT={legend_contents_bindto:void 0,legend_contents_template:"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_format:void 0,legend_padding:0,legend_position:"bottom",legend_show:!0,legend_tooltip:!1,legend_usePoint:!1},jT={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},render_mode:"svg",canvas_theme:{},regions:[]},HT={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},YT={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:()=>{},tooltip_onhide:()=>{},tooltip_onshown:()=>{},tooltip_onhidden:()=>{},tooltip_order:null},KT={data_x:void 0,data_idConverter:t=>t,data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_groupsZeroAs:"positive",data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_labels_imgUrl:void 0,data_hide:!1,data_filter:void 0,data_onclick:()=>{},data_onover:()=>{},data_onout:()=>{},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:""},ZT={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},JT=Object.defineProperty,QT=(t,e,n)=>e in t?JT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,_T=(t,e,n)=>QT(t,typeof e!="symbol"?e+"":e,n);const jd=class Sp{static setOptions(e){for(let n=0;n<e.length;n++)Object.assign(this.data,e[n])}constructor(){return fy(jT,GT,KT,WT,ZT,VT,HT,YT,Sp.data)}};_T(jd,"data",{});let Da=jd;class qT{constructor(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null},axisTooltip:{x:null,y:null,y2:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null}}}class t1{constructor(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,hasFunnel:!1,hasRadar:!1,hasTreemap:!1,isCanvasMode:!1,canvasShape:null,canvasFocusKey:null,canvasSubchartBrushDragging:!1,canvasSubchartBrushMode:null,canvasSubchartBrushStart:null,canvasSubchartBrushOrigin:null,canvasSubchartBrushMoved:!1,canvasFlowFrame:null,canvasFlowFinish:null,canvasFocusMainRedraw:!1,cssRule:{},loading:void 0,domain:void 0,current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:""},y:{width:0,height:0,domain:""},y2:{width:0,height:0,domain:""}},types:[],needle:void 0,zoomDomain:null},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,canvasInlineStyle:{minHeight:""},canvasSelection:new Set,canvasSelectionDragStart:null,canvasSelectionDragIncluded:new Set,canvasSelectionDragging:!1,canvasSelectionDragMoved:!1,canvasSelectionDragMoveHandler:null,canvasSelectionDragEndHandler:null,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:"",datetimeId:"",clip:{id:"",idXAxis:"",idYAxis:"",idXAxisTickTexts:"",idGrid:"",idSubchart:"",path:"",pathXAxis:"",pathYAxis:"",pathXAxisTickTexts:"",pathGrid:""},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",orgConfig:{},hiddenTargetIds:new Set,hiddenLegendIds:new Set,focusedTargetIds:new Set,defocusedTargetIds:new Set,radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null},pendingRaf:null,rafBatchQueue:[],dirty:{data:!1,visibility:!1,size:!1},redrawGeneration:0,dataGeneration:0,_targetsToShow:null,_cachedDrawShape:null,_canvasVisibleRangeCache:null,_canvasXDataTickCache:null,_canvasXTickValuesCache:null,_eventRectFingerprint:null,_lastTooltipMouse:null,_gridFocusEl:null,generateClassCache:new Map}}}const Hd={element:qT,state:t1};class e1{constructor(){Object.keys(Hd).forEach(e=>{this[e]=new Hd[e]})}getStore(e){return this[e]}}var n1=Object.defineProperty,r1=(t,e,n)=>e in t?n1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,a1=(t,e,n)=>r1(t,typeof e!="symbol"?e+"":e,n);const Ue={bubbleBaseLength:"$baseLength",bubbleMaxValue:"$bubbleMaxValue",colorPattern:"__colorPattern__",dataMinMax:"$dataMinMax",dataTotalSum:"$dataTotalSum",dataTotalPerIndex:"$totalPerIndex",domainMinMax:"$domainMinMax",filteredTargets:"$filteredTargets",filteredNullish:"$filteredNullish",svgLeft:"$svgLeft",valuesByX:"$valuesByX",legendItemTextBox:"legendItemTextBox",legendItemMap:"$legendItemMap",radarPoints:"$radarPoints",radarTextWidth:"$radarTextWidth",setOverOut:"setOverOut",callOverOutForTouch:"callOverOutForTouch",textRect:"textRect",shapeOffset:"$shapeOffset",maxTickSize:"$maxTickSize",maxDataCountTarget:"$maxDataCountTarget",valuesXIndexMap:"$valuesXIndexMap"};class i1{constructor(){a1(this,"cache",new Map)}add(e,n,r=!1){const i=r?this.cloneTarget(n):n;return this.cache.set(e,i),i}remove(e){const n=Ke(e)?[e]:e;for(let r=0;r<n.length;r++)this.cache.delete(n[r])}get(e,n=!1){if(n&&Array.isArray(e)){const r=[];for(let i=0,o;o=e[i];i++)this.cache.has(o)&&r.push(this.cache.get(o));return r}else return this.cache.has(e)?this.cache.get(e):null}has(e){return this.cache.has(e)}getKeys(){return Array.from(this.cache.keys())}reset(e,n){e?this.cache.clear():this.cache.forEach((r,i)=>{/^\$/.test(i)&&(n!=null&&n.some(o=>i.startsWith(o))||this.cache.delete(i))})}cloneTarget(e){return{id:e.id,id_org:e.id_org,values:e.values.map(n=>({x:n.x,value:n.value,id:n.id}))}}}const Yd="https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md";function o1(t){const e=t,{config:n}=e;let r="";if(lr(n.data_type||n.data_types)&&!e[ka.LINE])r="line";else for(const i in ka){const o=jt[i];if(e.hasType(o)&&!e[ka[i]]){r=o;break}}r&&Kd(`Please, make sure if %c${uy(r)}`,"module has been imported and specified correctly.",Yd)}function jR(t){const e=An[t];e&&Kd(`Please, make sure if %c${e}`,"module has been imported and specified correctly.",Yd)}function Kd(t,e,n){var r;const i="[billboard.js]";if((r=ce.console)==null?void 0:r.error){const s=e?["background:red;color:white;display:block;font-size:15px",e]:[];console.error(`\u274C ${i} ${t}`,"background:red;color:white;display:block;font-size:15px",...s),n&&console.info("%c\u2139\uFE0F","font-size:15px",n)}throw Error(`${i} ${t.replace(/\%c([a-z-]+)/i,"'$1' ")} ${e!=null?e:""}`)}function s1(t){let e;for(;e=t.sourceEvent;)t=e;return t}function dr(t,e){if(t=s1(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const l1=/\s?(bb-)/g,c1=/\.+/g;function u1(t){return t.replace(l1,".$1").replace(c1,".")}function Zd(t,e,n=!1){const r=o=>o[t?"getBoundingClientRect":"getBBox"](),i=t?"rectClient":"rectBBox";return n?r(e):!(i in e)||e.hasAttribute("width")&&e[i].width!==+(e.getAttribute("width")||0)?e[i]=r(e):e[i]}function ii(t,e,n=[-1,1],r=!1){if(!(!t||!Ke(e)))if(e.indexOf(`
|
|
43
|
+
`,Ze.head.appendChild(Qn);try{return d("bb-shapes bb-shapes-canvas-probe","circle",Mn,jn)}finally{Qn.remove()}},C=d("bb-axis bb-axis-x","path","domain",["stroke","stroke-width"]),w=m("bb-axis-x","line",["stroke","stroke-width"]),N=m("bb-axis-x","text",["fill","font"]),z=m("bb-axis-x","text",["fill"],"_active_"),$=m("bb-axis-y","text",["fill","font"]),G=m("bb-axis-y2","text",["fill","font"]),V=d("bb-axis bb-axis-x","text","bb-axis-x-label",["fill","font"]),J=d("bb-axis bb-axis-y","text","bb-axis-y-label",["fill","font"]),Q=d("bb-axis bb-axis-y2","text","bb-axis-y2-label",["fill","font"]),rt=f("circle","",["fill","stroke","stroke-width"]),et=d("bb-grid","line","bb-ygrid",["stroke","stroke-width","stroke-dasharray"]),st=d("bb-grid","text","",["fill","font"]),ct=h("bb-grid","bb-xgrid-focus","line","bb-xgrid-focus",["stroke","stroke-width","stroke-dasharray"]),dt=f("text","bb-text bb-empty",["fill","font"]),q=d("bb-region","rect","",["fill","fill-opacity"]),ft=d("bb-region","text","",["fill","font"]),lt=f("path","bb-bar",["opacity","fill-opacity","stroke","stroke-width"]),pt=f("path","bb-bar _expanded_",["opacity","fill-opacity"]),Tt=f("path","bb-candlestick",["stroke","stroke-width"]),Rt=f("path","bb-candlestick _expanded_",["opacity","fill-opacity"]),Ct=f("path","bb-line",["stroke-width"]),Kt=d("bb-target bb-focused","path","bb-line",["stroke-width"]),re=f("g","bb-target bb-defocused",["opacity"]),Ee=f("path","bb-area",["opacity","fill-opacity"]),Ce=f("circle","bb-circle",["fill","stroke","stroke-width"]),be=f("circle","bb-selected-circle",["fill","stroke","stroke-width"]),Ne=E("bb-circle _expanded_",["fill","stroke","stroke-width"]),ye=f("rect","bb-zoom-brush",["fill","fill-opacity","opacity"]),De=d("bb-brush","rect","extent",["fill","fill-opacity","opacity"]),Zt=d("bb-brush","rect","selection",["fill","fill-opacity","opacity"]),ve=d("bb-brush","path","handle--custom",["fill","fill-opacity","opacity","stroke","stroke-width"]),xe=d("bb-chart-treemaps","rect","",["stroke","stroke-width"]),Vt=f("text","bb-text",["fill","font"]),je=d("","text","bb-title",["fill","font"]),We=Ge(ye.fill,"#000"),xn=Fe(ye["fill-opacity"]||ye.opacity,.1),wn=Ge(Zt.fill,Ge(De.fill,We)),Ae=(l=(s=(o=(i=si(Zt["fill-opacity"],1))!=null?i:si(Zt.opacity,1))!=null?o:si(De["fill-opacity"],1))!=null?s:si(De.opacity,1))!=null?l:xn,hn=Ge(ve.stroke,"transparent"),an={axis:{lineColor:Ge(C.stroke,"#000"),lineWidth:Fe(C["stroke-width"],1),tickColor:Ge(w.stroke,Ge(C.stroke,"#000")),tickWidth:Fe(w["stroke-width"],Fe(C["stroke-width"],1)),labelFont:J.font||$.font||"10px sans-serif",xTickFont:N.font||$.font||"10px sans-serif",yTickFont:$.font||"10px sans-serif",y2TickFont:G.font||$.font||"10px sans-serif",labelColor:Ge($.fill,"#000"),xLabelColor:Ge(V.fill,Ge(N.fill,"#000")),yLabelColor:Ge(J.fill,Ge($.fill,"#000")),y2LabelColor:Ge(Q.fill,Ge(J.fill,Ge($.fill,"#000"))),activeLabelColor:oi(z.fill,N.fill)||Ge($.fill,"#000")},grid:{lineColor:Ge(et.stroke,"#aaa"),lineWidth:Fe(et["stroke-width"],1),dashArray:to(et["stroke-dasharray"]),labelFont:st.font||$.font||"10px sans-serif",labelColor:Ge(st.fill,"#aaa")},focusGrid:{lineColor:Ge(ct.stroke,Ge(et.stroke,"#aaa")),lineWidth:Fe(ct["stroke-width"],Fe(et["stroke-width"],1)),dashArray:to(ct["stroke-dasharray"]||et["stroke-dasharray"])},emptyLabel:{font:dt.font||Vt.font||$.font||"20px sans-serif",color:Ge(dt.fill,"#808080")},region:{fill:Ge(q.fill,"steelblue"),opacity:Fe(q["fill-opacity"],.1),labelFont:ft.font||$.font||"10px sans-serif",labelColor:Ge(ft.fill,"#000")},shape:{barOpacity:$a(lt,1),barExpandedOpacity:Fe($a(pt,$a(lt,1)),$a(lt,1)),barStrokeColor:Ge(lt.stroke,"#000"),barLineWidth:Fe(lt["stroke-width"],0),barConnectLineColor:Ge(Ct.stroke,"#000"),barConnectLineWidth:Fe(Ct["stroke-width"],1),candlestickStrokeColor:Ge(Tt.stroke,"#000"),candlestickLineWidth:Fe(Tt["stroke-width"],1),candlestickExpandedOpacity:Fe($a(Rt,1),1),lineWidth:Fe(Ct["stroke-width"],1),lineFocusedWidth:Fe(Kt["stroke-width"],2),areaOpacity:$a(Ee,.2),targetDefocusedOpacity:Fe(re.opacity,.3),pointFillColor:oi(Ce.fill,rt.fill),pointStrokeColor:oi(Ce.stroke,rt.stroke),pointLineWidth:si(Ce["stroke-width"],rt["stroke-width"])},selectedPoint:{fill:Ge(be.fill,"#fff"),stroke:oi(be.stroke),lineWidth:Fe(be["stroke-width"],2)},focusPoint:{fill:oi(Ne.fill,S),stroke:oi(Ne.stroke,S),lineWidth:Fe(Ne["stroke-width"],1)},zoomBrush:{fill:We,opacity:xn},subchartBrush:{fill:wn,opacity:Ae,handleFill:Ge(ve.fill,"transparent"),handleOpacity:$a(ve,1),handleStroke:hn,handleLineWidth:Fe(ve["stroke-width"],hn==="transparent"?0:1)},treemap:{stroke:Ge(xe.stroke,"#fff"),lineWidth:Fe(xe["stroke-width"],1)},label:{font:Vt.font||$.font||"10px sans-serif",color:Ge(Vt.fill,"#000")},title:{font:je.font||Vt.font||$.font||"14px sans-serif",color:Ge(je.fill,"#000")}},kr=s1(n),qt=Kr(an,kr),Aa=n==null?void 0:n.axis,NR=!!Aa&&Object.prototype.hasOwnProperty.call(Aa,"labelColor"),$R=!!Aa&&Object.prototype.hasOwnProperty.call(Aa,"labelFont");if(qt.axis.lineWidth=Fe(qt.axis.lineWidth,an.axis.lineWidth),qt.axis.tickWidth=Fe(qt.axis.tickWidth,qt.axis.lineWidth),$R){const Mn=Aa,jn=qt.axis.labelFont;Mn.xTickFont===void 0&&(qt.axis.xTickFont=jn),Mn.yTickFont===void 0&&(qt.axis.yTickFont=jn),Mn.y2TickFont===void 0&&(qt.axis.y2TickFont=jn)}if(qt.axis.labelFont=qt.axis.labelFont||an.axis.labelFont,qt.axis.xTickFont=qt.axis.xTickFont||qt.axis.labelFont,qt.axis.yTickFont=qt.axis.yTickFont||qt.axis.labelFont,qt.axis.y2TickFont=qt.axis.y2TickFont||qt.axis.yTickFont,qt.axis.labelColor=Ge(qt.axis.labelColor,an.axis.labelColor),NR){const Mn=qt.axis.labelColor;Aa.xLabelColor===void 0&&(qt.axis.xLabelColor=Mn),Aa.yLabelColor===void 0&&(qt.axis.yLabelColor=Mn),Aa.y2LabelColor===void 0&&(qt.axis.y2LabelColor=Mn)}qt.axis.xLabelColor=Ge(qt.axis.xLabelColor,qt.axis.labelColor),qt.axis.yLabelColor=Ge(qt.axis.yLabelColor,qt.axis.labelColor),qt.axis.y2LabelColor=Ge(qt.axis.y2LabelColor,qt.axis.yLabelColor),qt.axis.activeLabelColor=Ge(qt.axis.activeLabelColor,qt.axis.labelColor),qt.grid.lineWidth=Fe(qt.grid.lineWidth,an.grid.lineWidth),qt.grid.dashArray=to(qt.grid.dashArray),qt.focusGrid.lineWidth=Fe(qt.focusGrid.lineWidth,an.focusGrid.lineWidth),qt.focusGrid.dashArray=to(qt.focusGrid.dashArray),qt.region.opacity=Fe(qt.region.opacity,an.region.opacity),qt.shape.barOpacity=Fe(qt.shape.barOpacity,an.shape.barOpacity),qt.shape.barExpandedOpacity=Fe(qt.shape.barExpandedOpacity,qt.shape.barOpacity),qt.shape.barLineWidth=Fe(qt.shape.barLineWidth,an.shape.barLineWidth),qt.shape.barConnectLineWidth=Fe(qt.shape.barConnectLineWidth,an.shape.barConnectLineWidth),qt.shape.candlestickLineWidth=Fe(qt.shape.candlestickLineWidth,an.shape.candlestickLineWidth),qt.shape.candlestickStrokeColor=Ge(qt.shape.candlestickStrokeColor,an.shape.candlestickStrokeColor),qt.shape.candlestickExpandedOpacity=Fe(qt.shape.candlestickExpandedOpacity,an.shape.candlestickExpandedOpacity),qt.shape.lineWidth=Fe(qt.shape.lineWidth,an.shape.lineWidth),qt.shape.lineFocusedWidth=Fe(qt.shape.lineFocusedWidth,an.shape.lineFocusedWidth),qt.shape.areaOpacity=Fe(qt.shape.areaOpacity,an.shape.areaOpacity),qt.shape.targetDefocusedOpacity=Fe(qt.shape.targetDefocusedOpacity,an.shape.targetDefocusedOpacity),qt.shape.pointLineWidth=si(qt.shape.pointLineWidth),qt.selectedPoint.lineWidth=Fe(qt.selectedPoint.lineWidth,an.selectedPoint.lineWidth),qt.focusPoint.lineWidth=Fe(qt.focusPoint.lineWidth,an.focusPoint.lineWidth),qt.zoomBrush.opacity=Fe(qt.zoomBrush.opacity,an.zoomBrush.opacity),qt.subchartBrush.opacity=Fe(qt.subchartBrush.opacity,an.subchartBrush.opacity),qt.subchartBrush.handleOpacity=Fe(qt.subchartBrush.handleOpacity,an.subchartBrush.handleOpacity),qt.subchartBrush.handleLineWidth=Fe(qt.subchartBrush.handleLineWidth,an.subchartBrush.handleLineWidth),qt.treemap.lineWidth=Fe(qt.treemap.lineWidth,an.treemap.lineWidth),this.style=qt,this.cacheContainer=e,this.cacheKey=sh(e,n),c.remove()}reload(e,n){const r=sh(e,n);r!==null&&this.style&&this.cacheContainer===e&&this.cacheKey===r||this.load(e,n)}getGridLineStyle(e,n={},r="line"){const i={};for(const o of this.gridLineSelectorOverrides)a1(o.selector,e,n.class,r)&&ah(i,o.style,this.directGridOverrideKeys);return pc(i).length?i:void 0}}var c1=Object.defineProperty,u1=(t,e,n)=>e in t?c1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Er=(t,e,n)=>u1(t,typeof e!="symbol"?e+"":e,n);const Ba=24,lh=64,mc=[Ar,or,Zn];function li(t,e){return Math.floor(t/e)}function ch(t,e,n){var r,i;const o=li(e.x,n),s=li(e.x+((r=e.w)!=null?r:0),n),l=li(e.y,n),c=li(e.y+((i=e.h)!=null?i:0),n);for(let u=o;u<=s;u++)for(let f=l;f<=c;f++){const d=`${u}:${f}`,h=t.get(d);h?h.push(e):t.set(d,[e])}}function uh(t,e,n,r,i=0){const o=li(e,r),s=li(n,r),l=[];for(let c=-i;c<=i;c++)for(let u=-i;u<=i;u++){const f=t.get(`${o+c}:${s+u}`);if(f!=null&&f.length)for(let d=0;d<f.length;d++)l.push(f[d])}return l}function f1(t,e){var n,r,i;const o=t.config.point_sensitivity;if(Number.isFinite(o))return o;(n=t.pointR)==null||n.call(t,e);const s=(i=(r=t.getPointSensitivity)==null?void 0:r.call(t,e))!=null?i:Ba;return Number.isFinite(s)?s:Ba}function d1(t,e){return ga(t,e)&&e.values.length>Wf&&!t.config.data_selection_enabled&&Number.isFinite(t.config.point_sensitivity)&&Number.isFinite(t.config.point_r)}class h1{constructor(){Er(this,"bars",[]),Er(this,"points",[]),Er(this,"indices",[]),Er(this,"barGrid",new Map),Er(this,"pointGrid",new Map),Er(this,"plot",{x:0,y:0,w:0,h:0}),Er(this,"pointCellSize",Ba),Er(this,"maxPointSensitivity",Ba),Er(this,"grouped",!1),Er(this,"pointBased",!1),Er(this,"indexAxis","x")}rebuild(e,n){var r,i,o;const{current:s,margin:l,width:c,height:u}=e.state,f=e.filterTargetsToShow();this.bars=[],this.points=[],this.indices=[],this.barGrid=new Map,this.pointGrid=new Map,this.maxPointSensitivity=Ba,this.indexAxis=e.config.axis_rotated?"y":"x",this.plot=e.state.hasTreemap?{x:0,y:0,w:s.width,h:s.height}:{x:l.left,y:l.top,w:c,h:u},this.grouped=!!e.config.tooltip_grouped&&!e.state.hasTreemap,this.pointBased=!(e.config.axis_x_forceAsSingle&&this.grouped)&&(!!((r=e.isMultipleX)!=null&&r.call(e))||f.some(C=>ga(e,C)||va(e,C)));const h=this.grouped&&(!this.pointBased||e.config.data_selection_enabled&&e.config.data_selection_grouped)?new Map:null,m=(C,w,N)=>{var z,$;if(!h)return;const G=($=(z=e.getXCacheKey)==null?void 0:z.call(e,N.x))!=null?$:N.index;Number.isFinite(N.index)&&!h.has(G)&&mn(C,w)&&h.set(G,{x:C,y:w,data:N})};if(e.state.hasTreemap){const C=(i=e.getTreemapRoot)==null?void 0:i.call(e,e.data.targets),w=(C==null?void 0:C.children)||[];for(const N of w){const{data:z}=N;if(!Nl(e,z))continue;const{x:$,y:G,w:V,h:J}=ai(e,N,C,!0);!mn($,G)||!mn($+V,G+J)||this.addBar({x:$,y:G,w:V,h:J,data:z})}this.indices=[];return}if(n.indices[kt.BAR]||f.some(or.bind(null,e))){const C=or.bind(null,e),w=ir(e,n,kt.BAR,C),N=e.generateGetBarPoints(w,!1);f.filter(C).filter(z=>ei(e,z,mc)).forEach(z=>{const $=Zr(e,z);for(let G=$.start;G<$.end;G++){const V=z.values[G];if(!In(e,V))continue;const J=Yi(e,N,V,G);if(!J)continue;const{rect:Q}=J,rt=l.left+Q.x,et=l.top+Q.y,{w:st,h:ct}=Q;this.addBar({x:rt,y:et,w:st,h:ct,data:V}),m(rt+st/2,et+ct/2,V)}})}if(n.indices[kt.CANDLESTICK]||f.some(Zn.bind(null,e))){const C=Zn.bind(null,e),w=ir(e,n,kt.CANDLESTICK,C),N=(o=e.generateGetCandlestickPoints)==null?void 0:o.call(e,w,!1);N&&f.filter(C).filter(z=>ei(e,z,mc)).forEach(z=>{var $;const G=Zr(e,z);for(let V=G.start;V<G.end;V++){const J=z.values[V];if(!(($=e.getCandlestickData)==null?void 0:$.call(e,J)))continue;const rt=Ki(e,N,J,V);if(!rt)continue;const{body:et}=rt,st=l.left+et.x,ct=l.top+et.y,{w:dt,h:q}=et;this.addBar({x:st,y:ct,w:Math.max(1,dt),h:Math.max(1,q),data:J}),m(st+dt/2,ct+q/2,J)}})}const{cx:S,cy:E}=n.pos;S&&E&&f.filter(Ar.bind(null,e)).filter(C=>ei(e,C,mc)).forEach(C=>{const w=Zr(e,C),N=d1(e,C)?jf(c,u,e.config.point_r):null;for(let z=w.start;z<w.end;z++){const $=C.values[z];if(!In(e,$))continue;const G=l.left+S($,z),V=l.top+E($,z),J=f1(e,$);mn(G,V)&&(N&&!Hf(N,G-l.left,V-l.top)||(this.addPoint({x:G,y:V,sensitivity:J,data:$}),m(G,V,$)))}}),this.buildPointGrid(),this.indices=h?Array.from(h.values()).sort((C,w)=>C[this.indexAxis]-w[this.indexAxis]):[]}hitBar(e,n){for(const r of uh(this.barGrid,e,n,lh)){const{w:i=0,h:o=0}=r;if(e>=r.x&&e<=r.x+i&&n>=r.y&&n<=r.y+o)return r.data}return null}hitPoint(e,n){var r,i;let o=null,s=Number.POSITIVE_INFINITY;for(const l of uh(this.pointGrid,e,n,this.pointCellSize,1)){const c=l.x-e,u=l.y-n,f=Math.sqrt(c*c+u*u),d=(r=l.sensitivity)!=null?r:Ba;f<=d&&f<s&&(s=f,o=l)}return(i=o==null?void 0:o.data)!=null?i:null}findNearest(e,n){const r=this.hitBar(e,n);if(r)return r;if(!this.pointBased&&this.grouped&&this.isWithinPlot(e,n)){const i=this.findNearestIndexItem(e,n);if(i)return i.data}return this.hitPoint(e,n)}findNearestShape(e,n){var r;return(r=this.hitBar(e,n))!=null?r:this.hitPoint(e,n)}findNearestIndexByCoord(e,n){var r,i;return(i=(r=this.findNearestIndexItem(e,n))==null?void 0:r.data)!=null?i:null}findInRect(e,n=!1){const r=Math.min(e.x,e.x+e.w),i=Math.max(e.x,e.x+e.w),o=Math.min(e.y,e.y+e.h),s=Math.max(e.y,e.y+e.h),l=new Set,c=[],u=f=>{const d=f.data,h=`${d.id}:${d.index}`;l.has(h)||(l.add(h),c.push(d))};if(n){const f=this.indexAxis,d=f==="y"?o:r,h=f==="y"?s:i;return this.indices.filter(m=>m[f]>=d&&m[f]<=h).forEach(u),c}return this.bars.filter(f=>{var d,h;const m=(d=f.w)!=null?d:0,S=(h=f.h)!=null?h:0;return!(i<f.x||f.x+m<r)&&!(s<f.y||f.y+S<o)}).forEach(u),this.points.filter(f=>f.x>=r&&f.x<=i&&f.y>=o&&f.y<=s).forEach(u),c}addBar(e){this.bars.push(e),ch(this.barGrid,e,lh)}addPoint(e){var n;const r=(n=e.sensitivity)!=null?n:Ba;this.maxPointSensitivity=Math.max(this.maxPointSensitivity,r),this.points.push(e)}buildPointGrid(){this.pointCellSize=Math.max(1,this.maxPointSensitivity),this.pointGrid=new Map;for(const e of this.points)ch(this.pointGrid,e,this.pointCellSize)}isWithinPlot(e,n){const{plot:r}=this;return e>=r.x&&e<=r.x+r.w&&n>=r.y&&n<=r.y+r.h}findNearestIndexItem(e,n){const{indexAxis:r,indices:i}=this,o=r==="y"?n:e;if(!i.length)return null;let s=0,l=i.length-1;for(;s<l;){const f=s+l>>1;i[f][r]<o?s=f+1:l=f}const c=i[s],u=i[s-1];return u&&Math.abs(u[r]-o)<Math.abs(c[r]-o)?u:c}}var g1=Object.defineProperty,fh=Object.getOwnPropertySymbols,v1=Object.prototype.hasOwnProperty,p1=Object.prototype.propertyIsEnumerable,dh=(t,e,n)=>e in t?g1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,dn=(t,e)=>{for(var n in e||(e={}))v1.call(e,n)&&dh(t,n,e[n]);if(fh)for(var n of fh(e))p1.call(e,n)&&dh(t,n,e[n]);return t};const Ue={button:"bb-button",chart:"bb-chart",empty:"bb-empty",main:"bb-main",target:"bb-target",EXPANDED:"_expanded_",dummy:"_dummy_"},Qe={arc:"bb-arc",arcLabelLine:"bb-arc-label-line",arcLabelLineText:"bb-arc-label-line-text",arcRange:"bb-arc-range",arcs:"bb-arcs",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsTitle:"bb-chart-arcs-title",needle:"bb-needle"},hs={area:"bb-area",areas:"bb-areas"},Pn={axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",axisXTooltip:"bb-axis-x-tooltip",axisYTooltip:"bb-axis-y-tooltip",axisY2Tooltip:"bb-axis-y2-tooltip",axisTooltipX:"bb-axis-tooltip-x",axisTooltipY:"bb-axis-tooltip-y"},lr={bar:"bb-bar",bars:"bb-bars",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",barConnectLine:"bb-bar-connectLine"},ta={candlestick:"bb-candlestick",candlesticks:"bb-candlesticks",chartCandlestick:"bb-chart-candlestick",chartCandlesticks:"bb-chart-candlesticks",valueDown:"bb-value-down",valueUp:"bb-value-up"},Un={chartCircles:"bb-chart-circles",circle:"bb-circle",circles:"bb-circles"},xc={colorPattern:"bb-color-pattern",colorScale:"bb-colorscale"},za={dragarea:"bb-dragarea",INCLUDED:"_included_"},eo={funnel:"bb-funnel",chartFunnel:"bb-chart-funnel",chartFunnels:"bb-chart-funnels",funnelBackground:"bb-funnel-background"},cr={chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",gaugeValue:"bb-gauge-value"},Be={legend:"bb-legend",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile"},$r={chartLine:"bb-chart-line",chartLines:"bb-chart-lines",line:"bb-line",lines:"bb-lines"},ea={eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single"},nn={focused:"bb-focused",defocused:"bb-defocused",legendItemFocused:"bb-legend-item-focused",xgridFocus:"bb-xgrid-focus",xgridFocusContinuous:"bb-xgrid-focus-continuous",ygridFocus:"bb-ygrid-focus"},Sn={grid:"bb-grid",gridLines:"bb-grid-lines",xgrid:"bb-xgrid",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids"},na={level:"bb-level",levels:"bb-levels"},hh={chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars"},no={region:"bb-region",regions:"bb-regions"},sn={selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",SELECTED:"_selected_"},An={shape:"bb-shape",shapes:"bb-shapes"},gh={brush:"bb-brush",subchart:"bb-subchart"},Rn={chartText:"bb-chart-text",chartTexts:"bb-chart-texts",text:"bb-text",texts:"bb-texts",title:"bb-title",textBorderRect:"bb-text-border",textLabelImage:"bb-text-label-image",TextOverlapping:"text-overlapping"},gs={tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name"},vh={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},yc={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"};var Ie=dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn(dn({},Ue),Qe),hs),Pn),lr),ta),Un),xc),za),cr),Be),$r),ea),nn),eo),Sn),na),hh),no),sn),An),gh),Rn),gs),vh),yc),m1={boost_useCssRule:!1,boost_useWorker:!1,boost_workerUrl:void 0},x1={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},y1={legend_contents_bindto:void 0,legend_contents_template:"<span style='color:#fff;padding:5px;background-color:{=COLOR}'>{=TITLE}</span>",legend_equally:!1,legend_hide:!1,legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_interaction:!0,legend_item_dblclick:!1,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_item_tile_width:10,legend_item_tile_height:10,legend_item_tile_r:5,legend_item_tile_type:"rectangle",legend_format:void 0,legend_padding:0,legend_position:"bottom",legend_show:!0,legend_tooltip:!1,legend_usePoint:!1},T1={bindto:"#chart",background:{},clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,padding:!0,padding_mode:void 0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,resize_timer:!0,onclick:void 0,onover:void 0,onout:void 0,onresize:void 0,onresized:void 0,onbeforeinit:void 0,oninit:void 0,onafterinit:void 0,onrendered:void 0,transition_duration:250,plugins:[],render:{},render_mode:"svg",canvas_theme:{},regions:[]},b1={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},S1={tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:void 0,tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:()=>{},tooltip_onhide:()=>{},tooltip_onshown:()=>{},tooltip_onhidden:()=>{},tooltip_order:null},A1={data_x:void 0,data_idConverter:t=>t,data_names:{},data_classes:{},data_type:void 0,data_types:{},data_order:"desc",data_groups:[],data_groupsZeroAs:"positive",data_color:void 0,data_colors:{},data_labels:{},data_labels_backgroundColors:void 0,data_labels_colors:void 0,data_labels_position:{},data_labels_imgUrl:void 0,data_hide:!1,data_filter:void 0,data_onclick:()=>{},data_onover:()=>{},data_onout:()=>{},data_onshown:void 0,data_onhidden:void 0,data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:"csv",data_keys:void 0,data_empty_label_text:""},E1={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},C1=Object.defineProperty,I1=(t,e,n)=>e in t?C1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,R1=(t,e,n)=>I1(t,typeof e!="symbol"?e+"":e,n);const ph=class Jp{static setOptions(e){for(let n=0;n<e.length;n++)Object.assign(this.data,e[n])}constructor(){return Uy(T1,m1,A1,x1,E1,y1,b1,S1,Jp.data)}};R1(ph,"data",{});let Ua=ph;class w1{constructor(){return{chart:null,main:null,svg:null,axis:{x:null,y:null,y2:null,subX:null,subY:null,subY2:null},axisTooltip:{x:null,y:null,y2:null},defs:null,tooltip:null,legend:null,title:null,subchart:{main:null,bar:null,line:null,area:null},arcs:null,bar:null,candlestick:null,line:null,area:null,circle:null,radar:null,text:null,grid:{main:null,x:null,y:null},gridLines:{main:null,x:null,y:null},region:{main:null,list:null},eventRect:null,zoomResetBtn:null}}}class O1{constructor(){return{width:0,width2:0,height:0,height2:0,margin:{top:0,bottom:0,left:0,right:0},margin2:{top:0,bottom:0,left:0,right:0},margin3:{top:0,bottom:0,left:0,right:0},arcWidth:0,arcHeight:0,xAxisHeight:0,hasAxis:!1,hasFunnel:!1,hasRadar:!1,hasTreemap:!1,isCanvasMode:!1,canvasShape:null,canvasFocusKey:null,canvasSubchartBrushDragging:!1,canvasSubchartBrushMode:null,canvasSubchartBrushStart:null,canvasSubchartBrushOrigin:null,canvasSubchartBrushMoved:!1,canvasFlowFrame:null,canvasFlowFinish:null,canvasFocusMainRedraw:!1,cssRule:{},loading:void 0,domain:void 0,subchartSourceTypes:void 0,current:{domain:void 0,width:0,height:0,dataMax:0,maxTickSize:{x:{width:0,height:0,ticks:[],clipPath:0,domain:""},y:{width:0,height:0,domain:""},y2:{width:0,height:0,domain:""}},types:[],needle:void 0,zoomDomain:null},isLegendRight:!1,isLegendInset:!1,isLegendTop:!1,isLegendLeft:!1,legendStep:0,legendItemWidth:0,legendItemHeight:0,legendHasRendered:!1,canvasInlineStyle:{minHeight:""},canvasSelection:new Set,canvasSelectionDragStart:null,canvasSelectionDragIncluded:new Set,canvasSelectionDragging:!1,canvasSelectionDragMoved:!1,canvasSelectionDragMoveHandler:null,canvasSelectionDragEndHandler:null,eventReceiver:{currentIdx:-1,rect:{},data:[],coords:[]},axis:{x:{padding:{left:0,right:0},tickCount:0}},rotatedPadding:{left:30,right:0,top:5},withoutFadeIn:{},inputType:"",datetimeId:"",clip:{id:"",idXAxis:"",idYAxis:"",idXAxisTickTexts:"",idGrid:"",idSubchart:"",path:"",pathXAxis:"",pathYAxis:"",pathXAxisTickTexts:"",pathGrid:""},event:null,dragStart:null,dragging:!1,flowing:!1,cancelClick:!1,mouseover:!1,rendered:!1,transiting:!1,redrawing:!1,resizing:!1,toggling:!1,zooming:!1,hasNegativeValue:!1,hasPositiveValue:!0,orgAreaOpacity:"0.2",orgConfig:{},hiddenTargetIds:new Set,hiddenLegendIds:new Set,focusedTargetIds:new Set,defocusedTargetIds:new Set,radius:0,innerRadius:0,outerRadius:void 0,innerRadiusRatio:0,gaugeArcWidth:0,radiusExpanded:0,xgridAttr:{x1:null,x2:null,y1:null,y2:null},pendingRaf:null,rafBatchQueue:[],dirty:{data:!1,visibility:!1,size:!1},redrawGeneration:0,dataGeneration:0,_targetsToShow:null,_cachedDrawShape:null,_canvasVisibleRangeCache:null,_canvasXDataTickCache:null,_canvasXTickValuesCache:null,_eventRectFingerprint:null,_lastTooltipMouse:null,_gridFocusEl:null,generateClassCache:new Map}}}const mh={element:w1,state:O1};class P1{constructor(){Object.keys(mh).forEach(e=>{this[e]=new mh[e]})}getStore(e){return this[e]}}var M1=Object.defineProperty,L1=(t,e,n)=>e in t?M1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,D1=(t,e,n)=>L1(t,typeof e!="symbol"?e+"":e,n);const ke={bubbleBaseLength:"$baseLength",bubbleMaxValue:"$bubbleMaxValue",colorPattern:"__colorPattern__",dataMinMax:"$dataMinMax",dataTotalSum:"$dataTotalSum",dataTotalPerIndex:"$totalPerIndex",domainMinMax:"$domainMinMax",filteredTargets:"$filteredTargets",filteredNullish:"$filteredNullish",svgLeft:"$svgLeft",valuesByX:"$valuesByX",legendItemTextBox:"legendItemTextBox",legendItemMap:"$legendItemMap",radarPoints:"$radarPoints",radarTextWidth:"$radarTextWidth",setOverOut:"setOverOut",callOverOutForTouch:"callOverOutForTouch",textRect:"textRect",shapeOffset:"$shapeOffset",maxTickSize:"$maxTickSize",maxDataCountTarget:"$maxDataCountTarget",valuesXIndexMap:"$valuesXIndexMap"};class F1{constructor(){D1(this,"cache",new Map)}add(e,n,r=!1){const i=r?this.cloneTarget(n):n;return this.cache.set(e,i),i}remove(e){const n=Ye(e)?[e]:e;for(let r=0;r<n.length;r++)this.cache.delete(n[r])}get(e,n=!1){if(n&&Array.isArray(e)){const r=[];for(let i=0,o;o=e[i];i++)this.cache.has(o)&&r.push(this.cache.get(o));return r}else return this.cache.has(e)?this.cache.get(e):null}has(e){return this.cache.has(e)}getKeys(){return Array.from(this.cache.keys())}reset(e,n){e?this.cache.clear():this.cache.forEach((r,i)=>{/^\$/.test(i)&&(n!=null&&n.some(o=>i.startsWith(o))||this.cache.delete(i))})}cloneTarget(e){return{id:e.id,id_org:e.id_org,values:e.values.map(n=>({x:n.x,value:n.value,id:n.id}))}}}const xh="https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md";function N1(t){const e=t,{config:n}=e;let r="";if(dr(n.data_type||n.data_types)&&!e[ja.LINE])r="line";else for(const i in ja){const o=kt[i];if(e.hasType(o)&&!e[ja[i]]){r=o;break}}r&&yh(`Please, make sure if %c${zy(r)}`,"module has been imported and specified correctly.",xh)}function Ew(t){const e=Cn[t];e&&yh(`Please, make sure if %c${e}`,"module has been imported and specified correctly.",xh)}function yh(t,e,n){var r;const i="[billboard.js]";if((r=fe.console)==null?void 0:r.error){const s=e?["background:red;color:white;display:block;font-size:15px",e]:[];console.error(`\u274C ${i} ${t}`,"background:red;color:white;display:block;font-size:15px",...s),n&&console.info("%c\u2139\uFE0F","font-size:15px",n)}throw Error(`${i} ${t.replace(/\%c([a-z-]+)/i,"'$1' ")} ${e!=null?e:""}`)}function $1(t){let e;for(;e=t.sourceEvent;)t=e;return t}function gr(t,e){if(t=$1(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}const B1=/\s?(bb-)/g,z1=/\.+/g;function U1(t){return t.replace(B1,".$1").replace(z1,".")}function Th(t,e,n=!1){const r=o=>o[t?"getBoundingClientRect":"getBBox"](),i=t?"rectClient":"rectBBox";return n?r(e):!(i in e)||e.hasAttribute("width")&&e[i].width!==+(e.getAttribute("width")||0)?e[i]=r(e):e[i]}function ci(t,e,n=[-1,1],r=!1){if(!(!t||!Ye(e)))if(e.indexOf(`
|
|
44
44
|
`)===-1)t.text(e);else{const i=[t.text(),e].map(o=>o.replace(/[\s\n]/g,""));if(i[0]!==i[1]){const o=e.split(`
|
|
45
|
-
`),s=r?o.length-1:1;t.html(""),o.forEach((l,c)=>{t.append("tspan").attr("x",0).attr("dy",`${c===0?n[0]*s:n[1]}em`).text(l)})}}}function Jd(t){const{x:e,y:n,width:r,height:i}=ga(t,!0);return[{x:e,y:n+i},{x:e,y:n},{x:e+r,y:n},{x:e+r,y:n+i}]}function Qd(t){const{width:e,height:n}=un(t),r=Jd(t),i=r[0].x,o=Math.min(r[0].y,r[1].y);return{x:i,y:o,width:e,height:n}}function ir(t,e){var n;const r=t&&((n=t.touches||t.sourceEvent&&t.sourceEvent.touches)==null?void 0:n[0]);let i=[0,0];try{i=dr(r||t,e)}catch(o){}return i.map(o=>isNaN(o)?0:o)}function un(t,e=!1){return Zd(!0,t,e)}function ga(t,e=!1){return Zd(!1,t,e)}function f1(t,e,n){const{rootSelector:r="",sheet:i}=t,o=`${r} ${u1(e)} {${n.join(";")}}`;return i[i.insertRule?"insertRule":"addRule"](o,i.cssRules.length)}function d1(t){let e=[];return t.forEach(n=>{var r;try{n.cssRules&&n.cssRules.length&&(e=e.concat(Ia(n.cssRules)))}catch(i){(r=ce.console)==null||r.warn(`Error while reading rules from ${n.href}: ${String(i)}`)}}),e}function _d(t){var e,n,r,i,o,s;return{x:((n=(e=ce.pageXOffset)!=null?e:ce.scrollX)!=null?n:0)+((r=t.scrollLeft)!=null?r:0),y:((o=(i=ce.pageYOffset)!=null?i:ce.scrollY)!=null?o:0)+((s=t.scrollTop)!=null?s:0)}}function os(t,e=0,n=0,r=!0){const i=new DOMPoint(e,n),o=t.getScreenCTM(),s=i.matrixTransform(r?o==null?void 0:o.inverse():o);if(r===!1){const l=un(t);s.x-=l.x,s.y-=l.y}return s}function cc(t){const e=t?t.transform:null,n=e&&e.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function uc(t,e){var n;const r=(n=t==null?void 0:t.getAttribute)==null?void 0:n.call(t,e);if(r)return parseFloat(r);const i=cc(t);return e==="x"?i.e:i.f}function fc(t){const e=t.attr("viewBox");return e?e.trim().split(/[\s,]+/).length===4:!1}function h1(t,e,n=!1){const r=!!t.node;let i=!1;for(const[o,s]of Object.entries(e))if(i=r?t.style(o)===s:t.style[o]===s,n?!i:i)break;return i}function Qi(){var t,e;return((t=He)==null?void 0:t.hidden)===!1||((e=He)==null?void 0:e.visibilityState)==="visible"}function g1(t,e){const{DocumentTouch:n,matchMedia:r,navigator:i}=ce,o=r==null?void 0:r("(pointer:coarse)").matches;let s=!1;if(e)if(i&&"maxTouchPoints"in i)s=i.maxTouchPoints>0;else if("ontouchmove"in ce||n&&He instanceof n)s=!0;else if(o)s=!0;else{const c=i.userAgent;s=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return t&&!o&&(r==null?void 0:r("(pointer:fine)").matches)&&"mouse"||s&&"touch"||"mouse"}function qd(t,e){t.pendingRaf!==null?(ce.cancelAnimationFrame(t.pendingRaf),t.pendingRaf=ce.requestAnimationFrame(()=>{t.pendingRaf=null,e()})):(t.pendingRaf=ce.requestAnimationFrame(()=>{t.pendingRaf=null}),e())}const v1={mouse:(()=>{const t=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(e,n,r=t())=>{e.dispatchEvent(new MouseEvent(n,r))}}catch(e){return(n,r,i=t())=>{const o=He.createEvent("MouseEvent");o.initMouseEvent(r,i.bubbles,i.cancelable,ce,0,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}}})(),touch:(t,e,n)=>{const r=new Touch(Gr({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}},{setTimeout:p1,clearTimeout:m1}=ce;function x1(t){const e=[];let n;const r=function(){r.clear(),t===!1?n=yf(()=>{n=null,e.forEach(i=>i())},{timeout:200}):n=p1(()=>{n=null,e.forEach(i=>i())},ge(t)?t:200)};return r.clear=()=>{n&&((t===!1?Vx:m1)(n),n=null)},r.add=i=>e.push(i),r.remove=i=>{const o=e.indexOf(i);o!==-1&&e.splice(o,1)},r}function th(){let t=[];const e=function(n,r){function i(){var o;let s=0;for(let l=0,c;c=t[l];l++){if(c===!0||(o=c.empty)!=null&&o.call(c)){s++;continue}if(Qi()===!1){s=t.length;break}try{c.transition()}catch(u){s++}}return s===t.length}Of(()=>{r==null||r()},i)};return e.add=function(n){nn(n)?t=t.concat(n):t.push(n)},e}const Fa={};let y1=0;function T1(t,e){var n;const r=t.toString(),i=(n=e==null?void 0:e.map(String).join(";"))!=null?n:"",o=(r+i).replace(/(function|[\s\W\n])/g,"").substring(0,30);if(!(o in Fa))try{const s=new ce.Blob([`${i}
|
|
46
|
-
|
|
47
|
-
self.onmessage=function({data}) {
|
|
48
|
-
const result = (${r}).apply(null, data.args);
|
|
49
|
-
self.postMessage({id: data.id, result});
|
|
50
|
-
};`],{type:"text/javascript"});Fa[o]={src:ce.URL.createObjectURL(s),worker:null}}catch(s){return null}return{key:o,src:Fa[o].src}}function b1(t,e){const n=Fa[t];if(!n)return null;if(!n.worker){try{n.worker=new ce.Worker(e)}catch(r){return null}n.worker&&(n.worker.onerror=function(r){console.error?console.error(r):console.log(r)})}return n.worker}function dc(t=!0,e,n,r){let i=function(...o){const s=e(...o);n(s)};if(ce.Worker&&t){const o=T1(e,r),s=o&&b1(o.key,o.src);s&&(i=function(...l){const c=++y1,u=function(f){var d;((d=f.data)==null?void 0:d.id)===c&&(s.removeEventListener("message",u),n(f.data.result))};s.addEventListener("message",u),s.postMessage({id:c,args:l})})}return i}function S1(){for(const t in Fa){const e=Fa[t];e.worker&&e.worker.terminate(),e.src&&ce.URL.revokeObjectURL(e.src),delete Fa[t]}}const hc=34,_i=10,gc=13;function eh(t){const e=t.charCodeAt(0);function n(i,o){const s=[];let l=i.length,c=0,u=0,f=l<=0,d=!1;i.charCodeAt(0)===65279&&c++,i.charCodeAt(l-1)===_i&&--l,i.charCodeAt(l-1)===gc&&--l;function h(){if(f)return null;if(d)return d=!1,null;const A=c;let I,C;if(i.charCodeAt(A)===hc){for(;++c<l;)if(i.charCodeAt(c)===hc){if(i.charCodeAt(c+1)!==hc)break;c++}return(C=c++)>=l?f=!0:(I=i.charCodeAt(c++))===_i?d=!0:I===gc&&(d=!0,i.charCodeAt(c)===_i&&++c),i.slice(A+1,C).replace(/""/g,'"')}for(;c<l;){if((I=i.charCodeAt(C=c++))===_i)d=!0;else if(I===gc)d=!0,i.charCodeAt(c)===_i&&++c;else if(I!==e)continue;return i.slice(A,C)}return f=!0,i.slice(A,l)}let m;for(;(m=h())!==null;){const A=[];for(;m!==null;)A.push(m),m=h();if(o){const I=o(A,u++);I!=null&&s.push(I)}else s.push(A)}return s}function r(i,o){let s=[];return n(i,(l,c)=>{var u;if(c===0)return s=l,null;const f={};for(let d=0;d<s.length;d++)f[s[d]]=(u=l[d])!=null?u:"";return o?o(f,c-1,s):f})}return{parse:r,parseRows:n}}const nh=eh(","),rh=eh(" "),A1=nh.parse,E1=nh.parseRows,C1=rh.parse,I1=rh.parseRows;function vc(t){const e=[];return t.forEach(function(n,r){const i=n[0];n.forEach(function(o,s){if(s>0){if(typeof e[s-1]=="undefined"&&(e[s-1]={}),typeof o=="undefined")throw new Error(`Source data is missing a component at (${r}, ${s})!`);e[s-1][i]=o}})}),e}function pc(t){const e=t[0],n=[];return t.forEach(function(r,i){if(i>0){const o={};r.forEach(function(s,l){if(typeof s=="undefined")throw new Error(`Source data is missing a component at (${i}, ${l})!`);o[e[l]]=s}),n.push(o)}}),n}function ah(t,e){const n=[];let r,i;if(Array.isArray(t)){const o=function(s,l){if(s[l]!==void 0)return s[l];const u=l.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let f=s;return u.some(function(d){return!(f=f&&typeof f=="object"&&d in f?f[d]:void 0)}),f};e.x?r=e.value.concat(e.x):r=e.value,n.push(r),t.forEach(function(s){const l=r.map(function(c){let u=o(s,c);return typeof u=="undefined"&&(u=null),u});n.push(l)}),i=pc(n)}else Object.keys(t).forEach(function(o){var s;const l=[].concat(t[o]);(s=l.unshift)==null||s.call(l,o),n.push(l)}),i=vc(n);return i}function R1(t,e="csv",n,r,i){const o=new XMLHttpRequest,s={csv:O1,tsv:w1,json:ah};o.open("GET",t),n&&Object.keys(n).forEach(function(l){o.setRequestHeader(l,n[l])}),o.onreadystatechange=function(){if(o.readyState===4)if(o.status===200){const l=o.responseText;l&&i.call(this,s[e](e==="json"?JSON.parse(l):l,r))}else throw new Error(`${t}: Something went wrong loading!`)},o.send()}function ih(t,e){const n=t.rows(e);let r;return n.length===1?(r=[{}],n[0].forEach(i=>{r[0][i]=null})):r=t.parse(e),r}function O1(t){return ih({rows:E1,parse:A1},t)}function w1(t){return ih({rows:I1,parse:C1},t)}function oh(t,e){const n=t||(e==null?void 0:e.data_keys);return n!=null&&n.x&&(e.data_x=n.x),n}function P1(t,e,n){const r=this,{config:i}=r;let o;t.forEach(s=>{const l=r.getXKey(s);if(n.customX||n.timeSeries?n.xs.indexOf(l)>=0?o=(n.appendXs&&r.data.xs[s]||[]).concat(e.map((c,u)=>{const f=c[l];return We(f)?r.generateTargetX(f,s,u):!1}).filter(c=>c!==!1)):i.data_x?o=this.getOtherTargetXs():vn(i.data_xs)&&(o=r.getXValuesOfXKey(l,r.data.targets)):o=e.map((c,u)=>u),o)r.data.xs[s]=o;else throw new Error(`x is not defined for id = "${s}".`)})}var M1={convertData(t,e){const{config:n}=this,r=o=>o!=null&&o.length&&!lr(o[0])?n.boost_useWorker:!1;let i=t;if(t.bindto&&(i={},["url","mimeType","headers","keys","json","rows","columns"].forEach(o=>{const s=`data_${o}`;s in t&&(i[o]=t[s])})),i.url&&e)R1(i.url,i.mimeType,i.headers,oh(i.keys,n),e);else if(i.json)dc(r(i.json),ah,e,[vc,pc])(i.json,oh(i.keys,n));else if(i.rows)dc(r(i.rows),pc,e)(i.rows);else if(i.columns)dc(r(i.columns),vc,e)(i.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets(t,e){const n=this,{axis:r,config:i,state:o}=n,s=i.data_type,l=Object.keys(t[0]||{}),{ids:c,xs:u}=l.length?l.reduce((A,I)=>(n.isX.call(n,I)?A.xs.push(I):A.ids.push(I),A),{ids:[],xs:[]}):{ids:[],xs:[]},f={appendXs:e,xs:u,categorized:r==null?void 0:r.isCategorized(),timeSeries:r==null?void 0:r.isTimeSeries(),customX:r==null?void 0:r.isCustomX()};P1.bind(n)(c,t,f);const d=f.customX&&f.categorized&&i.axis_x_categories.length?new Map(i.axis_x_categories.map((A,I)=>[A,I])):null,h=i.data_idConverter.bind(n.api),m=c.map((A,I)=>{const C=h(A),P=n.getXKey(A),z=f.customX&&f.categorized,N=z&&I===0&&(()=>{const V=wf(i.axis_x_categories);return t.every(J=>V.has(J[P]))})(),B=t.__append__,W=P===null&&B?n.api.data.values(A).length:0;return{id:C,id_org:A,values:t.map((V,J)=>{var q;const at=V[P];let et=V[A],ot;if(et=et!==null&&!isNaN(et)&&!je(et)?+et:nn(et)||je(et)?et:null,(z||o.hasRadar)&&I===0&&!xn(at)){!N&&J===0&&!B&&(i.axis_x_categories=[],d&&d.clear());const lt=String(at);ot=(q=d==null?void 0:d.get(lt))!=null?q:-1,ot===-1&&(ot=i.axis_x_categories.length,i.axis_x_categories.push(at),d==null||d.set(lt,ot))}else ot=n.generateTargetX(at,A,W+J);return(xn(et)||n.data.xs[A].length<=J)&&(ot=void 0),{x:ot,value:et,id:C,index:-1}}).filter(V=>sn(V.x))}});if(m.forEach(A=>{var I;i.data_xSort&&(A.values=A.values.sort((C,P)=>{const z=C.x||C.x===0?C.x:1/0,N=P.x||P.x===0?P.x:1/0;return z-N})),A.values.forEach((C,P)=>C.index=P),(I=n.data.xs[A.id])==null||I.sort((C,P)=>C-P)}),o.hasNegativeValue=m.some(A=>A.values.some(I=>I.value!==null&&I.value<0)),o.hasPositiveValue=m.some(A=>A.values.some(I=>I.value!==null&&I.value>0)),s&&n.isValidChartType(s)){const A=n.mapToIds(m).filter(I=>!(I in i.data_types)||!n.isValidChartType(i.data_types[I]));n.setTargetType(A,s)}return m.forEach(A=>n.cache.add(A.id_org,A,!0)),m}};const L1={areaRange:{high:0,mid:1,low:2},candlestick:{open:0,high:1,low:2,close:3,volume:4}};function sh(t){return nn(t)?t:[t]}var D1={isX(t){const e=this,{config:n}=e,r=n.data_x&&t===n.data_x,i=vn(n.data_xs)&&cy(n.data_xs,t);return r||i},isStackNormalized(){const{config:t}=this;return!!((t.data_stack_normalize===!0||Qn(t.data_stack_normalize))&&t.data_groups.length)},isStackNormalizedPerGroup(){var t;const{config:e}=this;return!!(Qn(e.data_stack_normalize)&&((t=e.data_stack_normalize)!=null&&t.perGroup)&&e.data_groups.length)},isGrouped(t){const e=this.config.data_groups;return t?e.some(n=>n.indexOf(t)>=0&&n.length>1):e.length>0},hasAxisGroupedData(t){const e=this,{axis:n}=e;return e.data.targets.filter(o=>n.getId(o.id)===t).map(o=>o.id).some(o=>e.isGrouped(o))},getXKey(t){const e=this,{config:n}=e;return n.data_x?n.data_x:vn(n.data_xs)?n.data_xs[t]:null},getXValuesOfXKey(t,e){const n=this,r=e&&vn(e)?n.mapToIds(e):[];let i;return r.forEach(o=>{n.getXKey(o)===t&&(i=n.data.xs[o])}),i},getIndexByX(t,e){const n=this;return e?e.indexOf(Ke(t)?t:+t):(n.filterByX(n.data.targets,t)[0]||{index:null}).index},getXValue(t,e){const n=this;return t in n.data.xs&&n.data.xs[t]&&We(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs(){const t=this,e=Object.keys(t.data.xs);return e.length?t.data.xs[e[0]]:null},getOtherTargetX(t){const e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs(t){const e=this,{config:n}=e;Object.keys(t).forEach(r=>{n.data_xs[r]=t[r]})},isMultipleX(){return!this.config.axis_x_forceAsSingle&&(vn(this.config.data_xs)||this.hasType("bubble")||this.hasType("scatter"))},addName(t){const e=this,{config:n}=e;let r;return t&&(r=n.data_names[t.id],t.name=r!==void 0?r:t.id),t},getAllValuesOnIndex(t,e=!1){const n=this;let r=n.filterTargetsToShow(n.data.targets).map(i=>n.addName(n.getValueOnIndex(i.values,t)));return e&&(r=r.filter(i=>i&&"value"in i&&We(i.value))),r},getValueOnIndex(t,e){var n;if(((n=t[e])==null?void 0:n.index)===e)return t[e];const r=t.filter(i=>i.index===e);return r.length?r[0]:null},updateTargetX(t,e){const n=this;t.forEach(r=>{r.values.forEach((i,o)=>{i.x=n.generateTargetX(e[o],r.id,o)}),n.data.xs[r.id]=e})},updateTargetXs(t,e){const n=this;t.forEach(r=>{e[r.id]&&n.updateTargetX([r],e[r.id])})},generateTargetX(t,e,n){const r=this,{axis:i}=r;let o=i!=null&&i.isCategorized()?n:t||n;if(i!=null&&i.isTimeSeries()){const s=Hn.bind(r);o=s(t||r.getXValue(e,n))}else i!=null&&i.isCustomX()&&!(i!=null&&i.isCategorized())&&(o=We(t)?+t:r.getXValue(e,n));return o},updateXs(t){t.length&&(this.axis.xs=t.map(e=>e.x))},getPrevX(t){const e=this.axis.xs[t-1];return sn(e)?e:null},getNextX(t){const e=this.axis.xs[t+1];return sn(e)?e:null},getBaseValue(t){const e=this,{hasAxis:n}=e.state;let{value:r}=t;return r&&n&&(e.isAreaRangeType(t)?r=e.getRangedData(t,"mid"):e.isBubbleZType(t)&&(r=e.getBubbleZData(r,"y"))),r},getMinMaxValue(t){const e=this.getBaseValue.bind(this);let n=1/0,r=-1/0;const i=t||this.data.targets.map(o=>o.values);for(let o=0;o<i.length;o++){const s=i[o];for(let l=0;l<s.length;l++){const c=e(s[l]);ge(c)&&(c<n&&(n=c),c>r&&(r=c))}}return{min:n,max:r}},getMinMaxData(){const t=this,e=Ue.dataMinMax;let n=t.cache.get(e);if(!n){const r=t.data.targets.map(u=>u.values),i=t.getMinMaxValue(r),o=[],s=[],{min:l,max:c}=i;r.forEach(u=>{const f=t.getFilteredDataByValue(u,l),d=t.getFilteredDataByValue(u,c);if(f.length)for(let h=0;h<f.length;h++)o.push(f[h]);if(d.length)for(let h=0;h<d.length;h++)s.push(d[h])}),t.cache.add(e,n={min:o,max:s})}return n},getTotalPerIndex(t){const e=this,{config:n}=e,r=t?`${Ue.dataTotalPerIndex}-${t}`:Ue.dataTotalPerIndex;let i=e.cache.get(r);if((e.config.data_groups.length||e.isStackNormalized())&&!i){i=[];let{targets:o}=e.data;if(e.isStackNormalizedPerGroup()&&t){const s=n.data_groups.find(l=>l.indexOf(t)>=0);if(s)o=o.filter(l=>s.indexOf(l.id)>=0);else return null}o.forEach(s=>{s.values.forEach((l,c)=>{i[c]||(i[c]=0),i[c]+=ge(l.value)?l.value:0})}),e.cache.add(r,i)}return i},getTotalDataSum(t){const e=this,n=Ue.dataTotalSum;let r=e.cache.get(n);return ge(r)||(r=e.data.targets.reduce((i,o)=>i+o.values.reduce((s,l)=>{var c;return s+((c=l.value)!=null?c:0)},0),0),e.cache.add(n,r)),t&&(r-=e.getHiddenTotalDataSum()),r},getHiddenTotalDataSum(){const t=this,{api:e,state:{hiddenTargetIds:n}}=t;let r=0;return n.size&&(r=e.data.values.bind(e)([...n]).reduce((i,o)=>i+o,0)),r},getFilteredDataByValue(t,e){return t.filter(n=>this.getBaseValue(n)===e)},getMaxDataCount(){const{targets:t}=this.data;let e=0;for(let n=0;n<t.length;n++)t[n].values.length>e&&(e=t[n].values.length);return e},getMaxDataCountTarget(){const t=this,{cache:e,state:n}=t,r=e.get(Ue.maxDataCountTarget);if(r&&r.generation===n.dataGeneration)return r.value;let i=t.filterTargetsToShow()||[];const o=i.length,s=t.config.axis_x_inverted;if(o>1){const l=[];for(let c=0;c<i.length;c++){const u=i[c].values;for(let f=0;f<u.length;f++)l.push(u[f].x)}i=l,i=Ja(El(i)).map((c,u,f)=>({x:c,index:s?f.length-u-1:u}))}else o&&(i=i[0].values.concat());return e.add(Ue.maxDataCountTarget,{value:i,generation:n.dataGeneration}),i},mapToIds(t){return t.map(e=>e.id)},mapToTargetIds(t){const e=this;return t?nn(t)?t.concat():[t]:e.mapToIds(e.data.targets)},hasTarget(t,e){const n=this.mapToIds(t);for(let r=0,i;i=n[r];r++)if(i===e)return!0;return!1},isTargetToShow(t){return!this.state.hiddenTargetIds.has(t)},isLegendToShow(t){return!this.state.hiddenLegendIds.has(t)},getTargetsToShow(){var t;const{state:e}=this;return(t=e._targetsToShow)!=null?t:this.filterTargetsToShow()},filterTargetsToShow(t){const e=this;if(!t){const{cache:n,data:r,state:i}=e,o=Ue.filteredTargets,s=n.get(o);if(s&&s.generation===i.dataGeneration)return s.value;const l=r.targets.filter(c=>e.isTargetToShow(c.id));return n.add(o,{value:l,generation:i.dataGeneration}),l}return t.filter(n=>e.isTargetToShow(n.id))},mapTargetsToUniqueXs(t){const e=this,{axis:n}=e;let r=[];return t!=null&&t.length&&(r=El(dy(t.map(i=>i.values.map(o=>+o.x)))),r=n!=null&&n.isTimeSeries()?r.map(i=>new Date(+i)):r.map(Number)),Ja(r)},addTargetIds(t,e){const{state:n}=this;sh(e).forEach(r=>n[t].add(r))},removeTargetIds(t,e){const{state:n}=this;sh(e).forEach(r=>n[t].delete(r))},addHiddenTargetIds(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed(t){const e=this,{hasAxis:n}=e.state,r={},i=e.isMultipleX();let o=null;if(i){const s=e.cache.get(Ue.valuesXIndexMap);if(s&&s.generation===e.state.dataGeneration)o=s.value;else{const l=e.mapTargetsToUniqueXs(e.data.targets).map(c=>Ke(c)?c:+c);o=new Map(l.map((c,u)=>[c,u])),e.cache.add(Ue.valuesXIndexMap,{value:o,generation:e.state.dataGeneration})}}return t.forEach(s=>{const l=[];s.values.filter(({value:c})=>We(c)||c===null).forEach(c=>{let{value:u}=c;if(u!==null&&e.isCandlestickType(c)&&(u=nn(u)?u.slice(0,4):[u.open,u.high,u.low,u.close]),nn(u))l.push(...u);else if(je(u)&&"high"in u)l.push(...Object.values(u));else if(e.isBubbleZType(c))l.push(n&&e.getBubbleZData(u,"y"));else if(i&&o){const f=Ke(c.x)?c.x:+c.x,d=o.get(f);d!==void 0&&(l[d]=u)}else l.push(u)}),r[s.id]=l}),r},hasMultiTargets(){return this.filterTargetsToShow().length>1},orderTargets(t){const e=this,n=t.slice(),r=e.getSortCompareFn();return r&&n.sort(r),n},getSortCompareFn(t=!1){const e=this,{config:n}=e,r=n.data_order,i=/asc/i.test(r),o=/desc/i.test(r);let s;if(i||o){const l=(u,f)=>u+Math.abs(f.value),c=u=>ge(u)?u:"values"in u?u.values.reduce(l,0):u.value;s=(u,f)=>{const d=c(u),h=c(f);return t?i?d-h:h-d:i?h-d:d-h}}else le(r)&&(s=r.bind(e.api));return s||null},filterByX(t,e){return this.getValuesByX(t).get(this.getXCacheKey(e))||[]},filterNullish(t){const e=n=>We(n.value);return t&&t.filter(n=>"value"in n?e(n):n.values.some(e))},filterRemoveNull(t){return t.filter(e=>We(this.getBaseValue(e)))},filterByXDomain(t,e){return t.map(n=>({id:n.id,id_org:n.id_org,values:n.values.filter(r=>e[0]<=r.x&&r.x<=e[1])}))},hasDataLabel(){const t=this.config.data_labels;return Ea(t)&&t||Qn(t)&&vn(t)},hasNullDataValue(t){return t.some(({value:e})=>e===null)},getDataIndexFromEvent(t){const e=this,{$el:n,config:r,state:{hasRadar:i,inputType:o,eventReceiver:{coords:s,rect:l}}}=e;let c;if(i){let u=t.target;/tspan/i.test(u.tagName)&&(u=u.parentNode);const f=kt(u).datum();c=f&&Object.keys(f).length===1?f.index:void 0}else{const u=r.axis_rotated,f=_d(n.chart.node()),d=o==="touch"&&t.changedTouches?t.changedTouches[0]:t;let h=u?d.clientY+f.y:d.clientX+f.x;if(fc(n.svg)){const m=[h,0];u&&m.reverse(),h=os(n.eventRect.node(),...m)[u?"y":"x"]}else h-=u?l.top:l.left;c=Cl(s,h,0,s.length-1,u)}return c},getDataLabelLength(t,e,n){var r,i,o;const s=this,l=1.3,c=[t,e].map(u=>s.dataLabelFormat()(u));if(s.config.render_mode==="canvas"&&!s.$el.svg){const u=(i=(r=s.$el.chart)==null?void 0:r.node)==null?void 0:i.call(r),f=u==null?void 0:u.ownerDocument,d=f==null?void 0:f.createElementNS("http://www.w3.org/2000/svg","svg");if(u&&d){const h=c.map(A=>{const I=f.createElementNS("http://www.w3.org/2000/svg","text");return I.textContent=A,d.appendChild(I),I});d.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",u.appendChild(d);const m=h.map(A=>A.getBoundingClientRect()[n]*l);return d.remove(),m}}return((o=s.getTextRect(c))==null?void 0:o.map(u=>u[n]*l))||[0,0]},isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues(t,e){const n=t[e].x,r=[];let i;for(i=e-1;i>=0&&n===t[i].x;i--)r.push(t[i]);for(i=e;i<t.length&&n===t[i].x;i++)r.push(t[i]);return r},getXCacheKey(t){return Ke(t)?t:+t},getValuesByX(t){const e=this,{cache:n,state:r}=e,i=t.map(l=>{const{values:c}=l,u=c[0],f=c[c.length-1];return`${l.id}:${c.length}:${u?e.getXCacheKey(u.x):""}:${f?e.getXCacheKey(f.x):""}`}).join("|"),o=n.get(Ue.valuesByX);if(o&&o.generation===r.dataGeneration&&o.targetKey===i)return o.value;const s=new Map;for(let l=0;l<t.length;l++){const c=t[l].values;for(let u=0;u<c.length;u++){const f=c[u],d=e.getXCacheKey(f.x),h=s.get(d);h?h.push(f):s.set(d,[f])}}return n.add(Ue.valuesByX,{generation:r.dataGeneration,targetKey:i,value:s}),s},getClosestCandidates(t,e,n=!0){const r=this,{config:i,scale:o}=r,s=t.length,l=t[0];if(!n||s<200||!l||!i.data_xSort)return t;const c=r.isBarType(l.id),u=r.isCandlestickType(l.id),f=i.point_sensitivity;if(!(c||u)&&!ge(f))return t;const d=o.zoom||o.x,h=e[+i.axis_rotated],m=d(t[0].x)<=d(t[s-1].x);let A=0,I=s-1;for(;A<I;){const B=A+I>>1,W=d(t[B].x);(m?W<h:W>h)?A=B+1:I=B}const C=[],P=new Set,z=B=>{B>=0&&B<s&&!P.has(B)&&(P.add(B),C.push(t[B]))},N=B=>{if(B<0||B>=s)return;const W=r.getXCacheKey(t[B].x);let V=B;for(;V>=0&&r.getXCacheKey(t[V].x)===W;)z(V--);for(V=B+1;V<s&&r.getXCacheKey(t[V].x)===W;)z(V++)};if(c||u)for(let B=A-2;B<=A+2;B++)N(B);else{const B=f,W=(V,J)=>{for(let q=V;q>=0&&q<s;q+=J){const at=t[q];if(Math.abs(d(at.x)-h)>B)break;z(q)}};W(A,1),W(A-1,-1)}return C},findClosestFromTargets(t,e){const n=this,r=[];for(let i=0;i<t.length;i++){const o=n.findClosest(t[i].values,e);o&&r.push(o)}return n.findClosest(r,e,!1)},findClosest(t,e,n=!0){const r=this,{$el:{main:i}}=r,o=r.getClosestCandidates(t,e,n);let s,l;for(let c=0;c<o.length;c++){const u=o[c];if(!u||!We(u.value))continue;const f=r.isBarType(u.id),d=r.isCandlestickType(u.id);if(f||d){const h=f?`.${rr.chartBar}.${ze.target}${r.getTargetSelectorSuffix(u.id)} .${rr.bar}-${u.index}`:`.${Yr.chartCandlestick}.${ze.target}${r.getTargetSelectorSuffix(u.id)} .${Yr.candlestick}-${u.index} path`;!l&&r.isWithinBar(i.select(h).node())&&(l=u)}else{const h=r.dist(u,e),m=r.getPointSensitivity(u);h<m&&(s===void 0||h<s)&&(s=h,l=u)}}return l},dist(t,e){const n=this,{config:{axis_rotated:r},scale:i}=n,o=+r,s=+!r,l=n.circleY(t,t.index),u=(i.zoom||i.x)(t.x)-e[o],f=l-e[s];return Math.sqrt(u*u+f*f)},convertValuesToStep(t){const e=this,{axis:n,config:r}=e,i=r.line_step_type,o=n?n.isCategorized():!1,s=nn(t)?t.concat():[t];if(!(o||/step\-(after|before)/.test(i)))return t;if(s.length){const l=s[0],c=s[s.length-1],{id:u}=l;let{x:f}=l;s.unshift({x:--f,value:l.value,id:u}),o&&i==="step-after"&&s.unshift({x:f-1,value:l.value,id:u}),f=c.x,s.push({x:++f,value:c.value,id:u}),o&&i==="step-before"&&s.push({x:f+1,value:c.value,id:u})}return s},convertValuesToRange(t){const e=nn(t)?t.concat():[t],n=[];return e.forEach(r=>{const{x:i,id:o}=r;n.push({x:i,id:o,value:r.value[0]}),n.push({x:i,id:o,value:r.value[2]})}),n},updateDataAttributes(t,e){const n=this,{config:r}=n,i=r[`data_${t}`];return xn(e)||(Object.keys(e).forEach(o=>{i[o]=e[o]}),n.redraw({withLegend:!0})),i},getRangedData(t,e="",n="areaRange"){var r,i;const o=t==null?void 0:t.value;if(nn(o)){if(n==="bar")return o.reduce((s,l)=>l-s);{const s=(i=(r=L1[n])==null?void 0:r[e])!=null?i:-1;return s>=0?o[s]:void 0}}else if(o&&e)return o[e];return o},setRatioForGroupedData(t){const e=this,{config:n}=e;if(n.data_groups.length&&t.some(r=>e.isGrouped(r.id))){const r=i=>e.getRatio("index",i,!0);t.forEach(i=>{"values"in i?i.values.forEach(r):r(i)})}},getRatio(t,e,n=!1){const r=this,{config:i,state:o}=r,s=r.api;let l=0;if(e&&s.data.shown().length)if(l=e.ratio||e.value,t==="arc")if(r.pie.padAngle()())l=e.value/r.getTotalDataSum(!0);else{const c=i.gauge_fullCircle?r.getArcLength():r.getStartingAngle()*-2,u=r.hasType("gauge")?c:Math.PI*2;l=(e.endAngle-e.startAngle)/u}else if(t==="index"){const c=s.data.values.bind(s),{hiddenTargetIds:u}=o;let f=this.getTotalPerIndex(r.isStackNormalizedPerGroup()?e.id:void 0);if(f===null)return l;if(u.size){let h=[...u];if(r.isStackNormalizedPerGroup()&&e.id){const m=i.data_groups.find(A=>A.indexOf(e.id)>=0);m&&(h=h.filter(A=>m.indexOf(A)>=0))}if(h.length){let m=c(h,!1);m.length&&(m=m.reduce((A,I)=>A.map((C,P)=>(ge(C)?C:0)+I[P])),f=f.map((A,I)=>A-m[I]))}}const d=f[e.index];e.ratio=ge(e.value)&&f&&d?e.value/d:0,l=e.ratio}else if(t==="radar")l=parseFloat(String(Math.max(e.value,0)))/o.current.dataMax*i.radar_size_ratio;else if(t==="bar"){const u=r.getYScaleById.bind(r)(e.id).domain().reduce((f,d)=>d-f);l=u===0?0:Math.abs(r.getRangedData(e,null,t)/u)}else t==="treemap"&&(l/=r.getTotalDataSum(!0));return n&&l?l*100:l},updateDataIndexByX(t){const e=this,n=t.reduce((r,i,o)=>(r[Number(i.x)]=o,r),{});e.data.targets.forEach(r=>{r.values.forEach((i,o)=>{let s=n[Number(i.x)];s===void 0&&(s=o),i.index=s})})},isBubbleZType(t){return this.isBubbleType(t)&&(je(t.value)&&("z"in t.value||"y"in t.value)||nn(t.value)&&t.value.length>=2)},isBarRangeType(t){const e=this,{value:n}=t;return e.isBarType(t)&&nn(n)&&n.length>=2&&n.every(ge)},getDataById(t){var e;const n=this.cache.get(t)||this.api.data(t);return(e=n==null?void 0:n[0])!=null?e:n}};function ss(t,e=!1){const n=this,{api:r}=n;e&&n.api.flush(!0),t==null||t.call(r)}var F1={load(t,e){const n=this,{axis:r,data:i,org:o,scale:s}=n,{append:l}=e,c={domain:null,currentDomain:null,x:null};let u=t;if(u){e.filter&&(u=u.filter(e.filter)),(e.type||e.types)&&u.forEach(d=>{var h;const m=((h=e.types)==null?void 0:h[d.id])||e.type;n.setTargetType(d.id,m)});const f=new Map(u.map(d=>[d.id,d]));i.targets.forEach(d=>{const h=f.get(d.id);if(h){if(l){const m=h.values;for(let A=0;A<m.length;A++)d.values.push(m[A])}else d.values=h.values;f.delete(d.id)}}),f.forEach(d=>i.targets.push(d))}if(n.state.isCanvasMode){n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.updateTypesElements(),ss.call(n,e.done,e.resizeAfter);return}n.updateTargets(i.targets),s.zoom&&(c.x=r.isCategorized()?s.x.orgScale():(o.xScale||s.x).copy(),c.domain=n.getXDomain(i.targets),c.x.domain(c.domain),c.currentDomain=n.zoom.getDomain(),n.withinRange(c.currentDomain,void 0,c.domain)||(s.x.domain(c.domain),s.zoom=null,n.$el.eventRect.property("__zoom",null))),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.zoom?(o.xDomain=c.domain,o.xScale=c.x,r.isCategorized()&&(c.currentDomain=n.getZoomDomainValue(c.currentDomain),o.xDomain=n.getZoomDomainValue(o.xDomain),o.xScale=c.x.domain(o.xDomain)),n.updateCurrentZoomTransform(c.x,c.currentDomain)):o.xScale&&o.xScale.domain(o.xDomain),n.updateTypesElements(),ss.call(n,e.done,e.resizeAfter)},loadFromArgs(t){const e=this;e.config&&(e.cache.reset(!1,[Ue.filteredTargets,Ue.maxDataCountTarget,Ue.valuesXIndexMap,Ue.maxTickSize]),e.convertData(t,n=>{const r=t.data||n;t.append&&(r.__append__=!0),r&&e.load(e.convertDataToTargets.call(e,r),t)}))},unload(t,e){var n;const r=this,{state:i,$el:o,$T:s}=r,l=!!((n=r.hasLegendDefsPoint)!=null&&n.call(r));let c=e,u=t;if(r.cache.reset(!1,[Ue.filteredTargets,Ue.maxDataCountTarget,Ue.valuesXIndexMap,Ue.maxTickSize]),c||(c=()=>{}),u=u.filter(h=>r.hasTarget(r.data.targets,h)),u.length===0){c();return}const f=new Set(u);if(i.isCanvasMode){u.forEach(h=>{i.withoutFadeIn[h]=!1}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),r.removeHiddenTargetIds(u),r.removeHiddenLegendIds(u),r.updateTypesElements(),c();return}u.forEach(h=>{var m;const A=r.getTargetSelectorSuffix(h);i.withoutFadeIn[h]=!1,o.legend&&o.legend.selectAll(`.${$e.legendItem}${A}`).remove(),l&&((m=o.defs)==null||m.select(`#${r.getDefsPointId(A)}`).remove())}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),i.hasFunnel&&r.updateFunnel(r.data.targets),i.hasTreemap&&r.updateTargetsForTreemap(r.data.targets),r.updateTypesElements();const d=o.svg.selectAll(u.map(h=>r.selectorTarget(h)));s(d).style("opacity","0").remove().call(Wo,c)}},N1={value:()=>{}};function lh(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new ls(n)}function ls(t){this._=t}function $1(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ls.prototype=lh.prototype={constructor:ls,on:function(t,e){var n=this._,r=$1(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=B1(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=ch(n[i],t.name,e);else if(e==null)for(i in n)n[i]=ch(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ls(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function B1(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function ch(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=N1,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var cs=lh;const z1={passive:!1},qi={capture:!0,passive:!1};function mc(t){t.stopImmediatePropagation()}function oi(t){t.preventDefault(),t.stopImmediatePropagation()}function xc(t){var e=t.document.documentElement,n=kt(t).on("dragstart.drag",oi,qi);"onselectstart"in e?n.on("selectstart.drag",oi,qi):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function yc(t,e){var n=t.document.documentElement,r=kt(t).on("dragstart.drag",null);e&&(r.on("click.drag",oi,qi),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var us=(t=>()=>t);function Tc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:s,y:l,dx:c,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Tc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function U1(t){return!t.ctrlKey&&!t.button}function k1(){return this.parentNode}function X1(t,e){return e==null?{x:t.x,y:t.y}:e}function G1(){return navigator.maxTouchPoints||"ontouchstart"in this}function uh(){var t=U1,e=k1,n=X1,r=G1,i={},o=cs("start","drag","end"),s=0,l,c,u,f,d=0;function h(B){B.on("mousedown.drag",m).filter(r).on("touchstart.drag",C).on("touchmove.drag",P,z1).on("touchend.drag touchcancel.drag",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(B,W){if(!(f||!t.call(this,B,W))){var V=N(this,e.call(this,B,W),B,W,"mouse");V&&(kt(B.view).on("mousemove.drag",A,qi).on("mouseup.drag",I,qi),xc(B.view),mc(B),u=!1,l=B.clientX,c=B.clientY,V("start",B))}}function A(B){if(oi(B),!u){var W=B.clientX-l,V=B.clientY-c;u=W*W+V*V>d}i.mouse("drag",B)}function I(B){kt(B.view).on("mousemove.drag mouseup.drag",null),yc(B.view,u),oi(B),i.mouse("end",B)}function C(B,W){if(t.call(this,B,W)){var V=B.changedTouches,J=e.call(this,B,W),q=V.length,at,et;for(at=0;at<q;++at)(et=N(this,J,B,W,V[at].identifier,V[at]))&&(mc(B),et("start",B,V[at]))}}function P(B){var W=B.changedTouches,V=W.length,J,q;for(J=0;J<V;++J)(q=i[W[J].identifier])&&(oi(B),q("drag",B,W[J]))}function z(B){var W=B.changedTouches,V=W.length,J,q;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),J=0;J<V;++J)(q=i[W[J].identifier])&&(mc(B),q("end",B,W[J]))}function N(B,W,V,J,q,at){var et=o.copy(),ot=dr(at||V,W),lt,ft,_;if((_=n.call(B,new Tc("beforestart",{sourceEvent:V,target:h,identifier:q,active:s,x:ot[0],y:ot[1],dx:0,dy:0,dispatch:et}),J))!=null)return lt=_.x-ot[0]||0,ft=_.y-ot[1]||0,function dt(ut,xt,bt){var Rt=ot,Et;switch(ut){case"start":i[q]=dt,Et=s++;break;case"end":delete i[q],--s;case"drag":ot=dr(bt||xt,W),Et=s;break}et.call(ut,B,new Tc(ut,{sourceEvent:xt,subject:_,target:h,identifier:q,active:Et,x:ot[0]+lt,y:ot[1]+ft,dx:ot[0]-Rt[0],dy:ot[1]-Rt[1],dispatch:et}),J)}}return h.filter=function(B){return arguments.length?(t=typeof B=="function"?B:us(!!B),h):t},h.container=function(B){return arguments.length?(e=typeof B=="function"?B:us(B),h):e},h.subject=function(B){return arguments.length?(n=typeof B=="function"?B:us(B),h):n},h.touchable=function(B){return arguments.length?(r=typeof B=="function"?B:us(!!B),h):r},h.on=function(){var B=o.on.apply(o,arguments);return B===o?h:B},h.clickDistance=function(B){return arguments.length?(d=(B=+B)*B,h):Math.sqrt(d)},h}var W1={setExpand(t,e,n){const r=this,{config:i,$el:{circle:o}}=r;o&&i.point_focus_expand_enabled&&r.expandCircles(t,e,n),r.expandBarTypeShapes(!0,t,e,n)},expandBarTypeShapes(t=!0,e,n,r){const i=this;["bar","candlestick"].filter(o=>i.$el[o]).forEach(o=>{r&&i.$el[o].classed(ze.EXPANDED,!1),i.getShapeByIndex(o,e,n).classed(ze.EXPANDED,t)})},setOverOut(t,e){const n=this,{config:r,state:{hasFunnel:i,hasRadar:o,hasTreemap:s},$el:{main:l}}=n,c=je(e);if(c||e!==-1){const u=r[t?"data_onover":"data_onout"].bind(n.api);if(r.color_onover&&n.setOverColor(t,e,c),c){const f=n.getTargetSelectorSuffix(e.id),d=i||s?`${ze.target+f} .${bn.shape}`:Ye.arc+f;u(e,l.select(`.${d}`).node())}else if(r.tooltip_grouped)t&&(o&&n.isPointFocusOnly()?n.showCircleFocus(n.getAllValuesOnIndex(e,!0)):n.setExpand(e,null,!0)),!n.isMultipleX()&&l.selectAll(`.${bn.shape}-${e}`).each(function(f){u(f,this)});else{const f=n.cache.get(Ue.setOverOut)||[],d=l.selectAll(`.${bn.shape}-${e}`).filter(function(m){return n.isWithinShape(this,m)}),h=d.filter(function(){return f.every(m=>m!==this)});if(!t||d.empty()||f.length===h.size()&&h.nodes().every((m,A)=>m!==f[A]))for(;f.length;){const m=f.pop();r.data_onout.bind(n.api)(kt(m).datum(),m)}h.each(function(){t&&(u(kt(this).datum(),this),f.push(this))}),n.cache.add(Ue.setOverOut,f)}}},callOverOutForTouch(t){const e=this,n=e.cache.get(Ue.callOverOutForTouch);(je(t)&&n?t.id!==n.id:t!==n)&&((n||ge(n))&&e.setOverOut(!1,n),(t||ge(t))&&e.setOverOut(!0,t),e.cache.add(Ue.callOverOutForTouch,t))},getDraggableSelection(){const t=this,{config:e,state:n}=t;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?uh().on("drag",function(r){n.event=r,t.drag(ir(r,this))}).on("start",function(r){n.event=r,t.dragstart(ir(r,this))}).on("end",r=>{n.event=r,t.dragend()}):()=>{}},dispatchEvent(t,e,n){var r,i,o;const s=this,{config:l,state:{eventReceiver:c,hasAxis:u,hasFunnel:f,hasRadar:d,hasTreemap:h},$el:{eventRect:m,funnel:A,radar:I,svg:C,treemap:P}}=s;let z=(o=(i=(f||h)&&c.rect||d&&I.axes.select(`.${Rn.axis}-${e} text`)||m||((r=s.getArcElementByIdOrIndex)==null?void 0:r.call(s,e)))==null?void 0:i.node)==null?void 0:o.call(i);if(z){const N=s.isMultipleX(),B=l.axis_rotated;let{width:W,left:V,top:J}=un(z);if(u&&!d&&!N){const ot=c.coords[e];ot?(W=ot.w,V+=ot.x,J+=ot.y):(W=0,V=0,J=0)}let q=V+(n?n[0]:0)+(N||B?0:W/2),at=J+(n?n[1]:0)+(B?4:0);if(fc(C)&&s.$el.eventRect){const ot=os(s.$el.eventRect.node(),q,at,!1);q=ot.x,at=ot.y}const et={screenX:q,screenY:at,clientX:q,clientY:at,bubbles:d};(f||h)&&(z=(A!=null?A:P).node()),v1[/^(mouse|click)/.test(t)?"mouse":"touch"](z,t,et)}},setDragStatus(t){this.state.dragging=t},unbindZoomEvent(){const t=this,{$el:{canvas:e,eventRect:n,svg:r,zoomResetBtn:i}}=t;n==null||n.on(".zoom wheel.zoom .drag",null),e==null||e.on(".zoom wheel.zoom .drag",null),r==null||r.on("wheel",null),i==null||i.on("click",null).style("display","none")},unbindAllEvents(){var t;const e=this,{$el:{arcs:n,eventRect:r,legend:i,region:o,svg:s,treemap:l},brush:c}=e,u=["wheel","click","mouseover","mousemove","mouseout","touchstart","touchmove","touchend","touchstart.eventRect","touchmove.eventRect","touchend.eventRect",".brush",".drag",".zoom","wheel.zoom","dblclick.zoom"].join(" ");[s,r,o==null?void 0:o.list,c==null?void 0:c.getSelection(),n==null?void 0:n.selectAll("path"),i==null?void 0:i.selectAll("g"),l].forEach(f=>f==null?void 0:f.on(u,null)),(t=e.unbindZoomEvent)==null||t.call(e)}},V1={categoryName(t){var e;const{axis_x_categories:n}=this.config;return(e=n==null?void 0:n[t])!=null?e:t}};const j1=/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g;var H1={generateClass(t,e){const n=this.state.generateClassCache,r=`${t}\0${e}`;let i=n.get(r);return i||(i=` ${t} ${t+this.getTargetSelectorSuffix(e)}`,n.set(r,i)),i},getClass(t,e){const n=/s$/.test(t),r=/^(area|arc|line|funnel|treemap)s?$/.test(t),i=n?"id":"index";return o=>{const s=o.data||o;return((e?this.generateClass(tn[n?"shapes":"shape"],s[i]):"")+this.generateClass(tn[t],s[r?"id":i])).trim()}},getChartClass(t){return e=>tn[`chart${t}`]+this.classTarget((e.data?e.data:e).id)},generateExtraLineClass(){const e=this.config.line_classes||[],n=[];return function(r){var i;const o=r.id||((i=r.data)==null?void 0:i.id)||r;return n.indexOf(o)<0&&n.push(o),e[n.indexOf(o)%e.length]}},classRegion(t,e){return`${this.generateClass(tn.region,e)} ${"class"in t?t.class:""}`},classTarget(t){const e=this.config.data_classes[t];let n="";return e&&(n=` ${tn.target}-${e}`),this.generateClass(tn.target,t)+n},classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused(t){return` ${this.state.focusedTargetIds.has(t.id)?tn.focused:""}`},classDefocused(t){return` ${this.state.defocusedTargetIds.has(t.id)?tn.defocused:""}`},getTargetSelectorSuffix(t){return(t||t===0?`-${t}`:"").replace(j1,"-")},selectorTarget(t,e="",n=""){const r=this.getTargetSelectorSuffix(t);return`${e}.${tn.target+r} ${n}, ${e}.${tn.circles+r} ${n}`},selectorTargets(t,e){const n=t||[];return n.length?n.map(r=>this.selectorTarget(r,e)):null},selectorLegend(t){return`.${tn.legendItem+this.getTargetSelectorSuffix(t)}`},selectorLegends(t){return t!=null&&t.length?t.map(e=>this.selectorLegend(e)):null}};class fh extends Map{constructor(e,n=gh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(bc(this,e))}has(e){return super.has(bc(this,e))}set(e,n){return super.set(dh(this,e),n)}delete(e){return super.delete(hh(this,e))}}class HR extends Set{constructor(e,n=gh){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const r of e)this.add(r)}has(e){return super.has(bc(this,e))}add(e){return super.add(dh(this,e))}delete(e){return super.delete(hh(this,e))}}function bc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function dh({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function hh({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function gh(t){return t!==null&&typeof t=="object"?t.valueOf():t}const vh=Symbol("implicit");function ph(){var t=new fh,e=[],n=[],r=vh;function i(o){let s=t.get(o);if(s===void 0){if(r!==vh)return r;t.set(o,s=e.push(o)-1)}return n[s%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new fh;for(const s of o)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return ph(e,n).unknown(r)},Va.apply(i,arguments),i}const Y1=(t,e,n)=>{const r=kt(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}};function K1(t){const e=Ue.colorPattern,{body:n}=He;let r=n[e];if(!r){const o=t.classed(sc.colorPattern,!0).style("background-image");t.classed(sc.colorPattern,!1),o.indexOf(";")>-1&&(r=o.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(s=>s.trim().replace(/[\"'\s]/g,"")).filter(Boolean),n[e]=r)}return r}const Z1=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var J1={generateColor(){const t=this,{$el:e,config:n}=t,r=[],i=n.area_linearGradient||n.bar_linearGradient||n.point_radialGradient;let o=vn(n.color_pattern)?n.color_pattern:ph(K1(e.chart)||Z1).range();const s=o;if(le(n.color_tiles)){const l=n.color_tiles.bind(t.api)(),c=o.map((u,f)=>{const d=u.replace(/[#\(\)\s,]/g,""),h=`${t.state.datetimeId}-pattern-${d}-${f}`;return Y1(l[f%l.length],u,h)});o=c.map(u=>`url(#${u.id})`),t.patterns=c}return function(l){var c;const u=n.data_colors,f=n.data_color,d=l.id||((c=l.data)==null?void 0:c.id)||l,h=t.isTypeOf(d,["line","spline","step"])||!n.data_types[d];let m;if(le(u[d]))m=u[d].bind(t.api)(l);else if(u[d])m=u[d];else{let A=r.indexOf(d);A<0&&(r.push(d),A=r.length-1),m=h?s[A%s.length]:o[A%o.length],u[d]=m}if(m=le(f)?f.call(t.api,m,l):m,i&&e.defs){const A=t.$el.defs.selectAll(`[id$='-gradient${t.getTargetSelectorSuffix(d)}'] stop`);let I;A.each(function(C,P){I=P===0?this.style.stopColor:this.style.stopColor===I}),I===!0&&A.attr("stop-color",m)}return m}},generateLevelColor(){const t=this,{config:e}=t,n=e.color_pattern,r=e.color_threshold,i=r.unit==="value",o=r.max||100,s=r.values&&r.values.length?r.values:[];return vn(r)?function(l){const c=i?l:l*100/o;let u=n[n.length-1];for(let f=0,d=s.length;f<d;f++)if(c<=s[f]){u=n[f];break}return u}:null},generateTextBGColorFilter(t,e={x:0,y:0,width:1,height:1}){const n=this,{$el:{defs:r},state:i}=n;if(t){let o=[];Ke(t)?o.push(""):je(t)?o=Object.keys(t):le(t)&&(o=n.mapToTargetIds()),o.forEach(s=>{const l=`${i.datetimeId}-labels-bg${n.getTargetSelectorSuffix(s)}${Ke(t)?n.getTargetSelectorSuffix(t):""}`,c=Xr(s===""?t:(t==null?void 0:t[s])||"");if(r.select(`#${l}`).empty()){const u=r.append("filter").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height).attr("id",l);u.append("feFlood").attr("flood-color",c),u.append("feComposite").attr("in","SourceGraphic")}})}},getGradienColortUrl(t){return`url(#${this.state.datetimeId}-gradient${this.getTargetSelectorSuffix(t)})`},updateLinearGradient(){const t=this,{config:e,data:{targets:n},state:{datetimeId:r},$el:{defs:i}}=t;n.forEach(o=>{const s=`${r}-gradient${t.getTargetSelectorSuffix(o.id)}`,l=t.hasPointType()&&e.point_radialGradient,c=t.isAreaType(o)&&"area"||t.isBarType(o)&&"bar";if((l||c)&&i.select(`#${s}`).empty()){const u=t.color(o),f={defs:null,stops:[]};if(l){const{cx:d=.3,cy:h=.3,r:m=.7,stops:A=[[.1,u,0],[.9,u,1]]}=l;f.stops=A,f.defs=i.append("radialGradient").attr("id",`${s}`).attr("cx",d).attr("cy",h).attr("r",m)}else{const d=e.axis_rotated,{x:h=d?[1,0]:[0,0],y:m=d?[0,0]:[0,1],stops:A=[[0,u,1],[1,u,0]]}=e[`${c}_linearGradient`];f.stops=A,f.defs=i.append("linearGradient").attr("id",`${s}`).attr("x1",h[0]).attr("x2",h[1]).attr("y1",m[0]).attr("y2",m[1])}f.stops.forEach(d=>{const[h,m,A]=d,I=le(m)?m.bind(t.api)(o.id):m;f.defs&&f.defs.append("stop").attr("offset",h).attr("stop-color",I||u).attr("stop-opacity",A)})}})},setOverColor(t,e){const n=this,{config:r,$el:{main:i}}=n,o=r.color_onover;let s=t?o:n.color;je(s)?s=({id:l})=>l in o?o[l]:n.color(l):Ke(s)?s=()=>o:le(o)&&(s=s.bind(n.api)),i.selectAll(je(e)?`.${Ye.arc}${n.getTargetSelectorSuffix(e.id)}`:`.${bn.shape}-${e}`).style("fill",s)}},si=0,to=0,eo=0,mh=1e3,fs,no,ds=0,Na=0,hs=0,ro=typeof performance=="object"&&performance.now?performance:Date,xh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Sc(){return Na||(xh(Q1),Na=ro.now()+hs)}function Q1(){Na=0}function gs(){this._call=this._time=this._next=null}gs.prototype=yh.prototype={constructor:gs,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Sc():+n)+(e==null?0:+e),!this._next&&no!==this&&(no?no._next=this:fs=this,no=this),this._call=t,this._time=n,Ac()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ac())}};function yh(t,e,n){var r=new gs;return r.restart(t,e,n),r}function _1(){Sc(),++si;for(var t=fs,e;t;)(e=Na-t._time)>=0&&t._call.call(void 0,e),t=t._next;--si}function Th(){Na=(ds=ro.now())+hs,si=to=0;try{_1()}finally{si=0,tb(),Na=0}}function q1(){var t=ro.now(),e=t-ds;e>mh&&(hs-=e,ds=t)}function tb(){for(var t,e=fs,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:fs=n);no=t,Ac(r)}function Ac(t){if(!si){to&&(to=clearTimeout(to));var e=t-Na;e>24?(t<1/0&&(to=setTimeout(Th,t-ro.now()-hs)),eo&&(eo=clearInterval(eo))):(eo||(ds=ro.now(),eo=setInterval(q1,mh)),si=1,xh(Th))}}function bh(t,e,n){var r=new gs;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var eb=cs("start","end","cancel","interrupt"),nb=[],Sh=0,Ah=1,Ec=2,vs=3,Eh=4,Cc=5,ps=6;function ms(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;rb(t,n,{name:e,index:r,group:i,on:eb,tween:nb,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Sh})}function Ic(t,e){var n=Ar(t,e);if(n.state>Sh)throw new Error("too late; already scheduled");return n}function Dr(t,e){var n=Ar(t,e);if(n.state>vs)throw new Error("too late; already running");return n}function Ar(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function rb(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=yh(o,0,n.time);function o(u){n.state=Ah,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var f,d,h,m;if(n.state!==Ah)return c();for(f in r)if(m=r[f],m.name===n.name){if(m.state===vs)return bh(s);m.state===Eh?(m.state=ps,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete r[f]):+f<e&&(m.state=ps,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete r[f])}if(bh(function(){n.state===vs&&(n.state=Eh,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Ec,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Ec){for(n.state=vs,i=new Array(h=n.tween.length),f=0,d=-1;f<h;++f)(m=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=m);i.length=d+1}}function l(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Cc,1),d=-1,h=i.length;++d<h;)i[d].call(t,f);n.state===Cc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=ps,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function li(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>Ec&&r.state<Cc,r.state=ps,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function ab(t){return this.each(function(){li(this,t)})}var Ch=180/Math.PI,Rc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ih(t,e,n,r,i,o){var s,l,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),t*r<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Ch,skewX:Math.atan(c)*Ch,scaleX:s,scaleY:l}}var xs;function ib(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Rc:Ih(e.a,e.b,e.c,e.d,e.e,e.f)}function ob(t){return t==null||(xs||(xs=document.createElementNS("http://www.w3.org/2000/svg","g")),xs.setAttribute("transform",t),!(t=xs.transform.baseVal.consolidate()))?Rc:(t=t.matrix,Ih(t.a,t.b,t.c,t.d,t.e,t.f))}function Rh(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,d,h,m,A){if(u!==d||f!==h){var I=m.push("translate(",null,e,null,n);A.push({i:I-4,x:xr(u,d)},{i:I-2,x:xr(f,h)})}else(d||h)&&m.push("translate("+d+e+h+n)}function s(u,f,d,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:xr(u,f)})):f&&d.push(i(d)+"rotate("+f+r)}function l(u,f,d,h){u!==f?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:xr(u,f)}):f&&d.push(i(d)+"skewX("+f+r)}function c(u,f,d,h,m,A){if(u!==d||f!==h){var I=m.push(i(m)+"scale(",null,",",null,")");A.push({i:I-4,x:xr(u,d)},{i:I-2,x:xr(f,h)})}else(d!==1||h!==1)&&m.push(i(m)+"scale("+d+","+h+")")}return function(u,f){var d=[],h=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,d,h),s(u.rotate,f.rotate,d,h),l(u.skewX,f.skewX,d,h),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,h),u=f=null,function(m){for(var A=-1,I=h.length,C;++A<I;)d[(C=h[A]).i]=C.x(m);return d.join("")}}}var sb=Rh(ib,"px, ","px)","deg)"),lb=Rh(ob,", ",")",")");function cb(t,e){var n,r;return function(){var i=Dr(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,l=r.length;s<l;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function ub(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=Dr(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var l={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=l;break}c===u&&i.push(l)}o.tween=i}}function fb(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Ar(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?cb:ub)(n,t,e))}function Oc(t,e,n){var r=t._id;return t.each(function(){var i=Dr(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Ar(i,r).value[e]}}function Oh(t,e){var n;return(typeof e=="number"?xr:e instanceof xa?wo:(n=xa(e))?(e=n,wo):Nu)(t,e)}function db(t){return function(){this.removeAttribute(t)}}function hb(t){return function(){this.removeAttributeNS(t.space,t.local)}}function gb(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function vb(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function pb(t,e,n){var r,i,o;return function(){var s,l=n(this),c;return l==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=l+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,l)))}}function mb(t,e,n){var r,i,o;return function(){var s,l=n(this),c;return l==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=l+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,l)))}}function xb(t,e){var n=wt(t),r=n==="transform"?lb:Oh;return this.attrTween(t,typeof e=="function"?(n.local?mb:pb)(n,r,Oc(this,"attr."+t,e)):e==null?(n.local?hb:db)(n):(n.local?vb:gb)(n,r,e))}function yb(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Tb(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function bb(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&Tb(t,o)),n}return i._value=e,i}function Sb(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&yb(t,o)),n}return i._value=e,i}function Ab(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=wt(t);return this.tween(n,(r.local?bb:Sb)(r,e))}function Eb(t,e){return function(){Ic(this,t).delay=+e.apply(this,arguments)}}function Cb(t,e){return e=+e,function(){Ic(this,t).delay=e}}function Ib(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Eb:Cb)(e,t)):Ar(this.node(),e).delay}function Rb(t,e){return function(){Dr(this,t).duration=+e.apply(this,arguments)}}function Ob(t,e){return e=+e,function(){Dr(this,t).duration=e}}function wb(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Rb:Ob)(e,t)):Ar(this.node(),e).duration}function Pb(t,e){if(typeof e!="function")throw new Error;return function(){Dr(this,t).ease=e}}function Mb(t){var e=this._id;return arguments.length?this.each(Pb(e,t)):Ar(this.node(),e).ease}function Lb(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Dr(this,t).ease=n}}function Db(t){if(typeof t!="function")throw new Error;return this.each(Lb(this._id,t))}function Fb(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,l=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&l.push(c);return new Jr(r,this._parents,this._name,this._id)}function Nb(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),l=0;l<o;++l)for(var c=e[l],u=n[l],f=c.length,d=s[l]=new Array(f),h,m=0;m<f;++m)(h=c[m]||u[m])&&(d[m]=h);for(;l<r;++l)s[l]=e[l];return new Jr(s,this._parents,this._name,this._id)}function $b(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Bb(t,e,n){var r,i,o=$b(e)?Ic:Dr;return function(){var s=o(this,t),l=s.on;l!==r&&(i=(r=l).copy()).on(e,n),s.on=i}}function zb(t,e){var n=this._id;return arguments.length<2?Ar(this.node(),n).on.on(t):this.each(Bb(n,t,e))}function Ub(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function kb(){return this.on("end.remove",Ub(this._id))}function Xb(t){var e=this._name,n=this._id;typeof t!="function"&&(t=x(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var l=r[s],c=l.length,u=o[s]=new Array(c),f,d,h=0;h<c;++h)(f=l[h])&&(d=t.call(f,f.__data__,h,l))&&("__data__"in f&&(d.__data__=f.__data__),u[h]=d,ms(u[h],e,n,h,u,Ar(f,n)));return new Jr(o,this._parents,e,n)}function Gb(t){var e=this._name,n=this._id;typeof t!="function"&&(t=E(t));for(var r=this._groups,i=r.length,o=[],s=[],l=0;l<i;++l)for(var c=r[l],u=c.length,f,d=0;d<u;++d)if(f=c[d]){for(var h=t.call(f,f.__data__,d,c),m,A=Ar(f,n),I=0,C=h.length;I<C;++I)(m=h[I])&&ms(m,e,n,I,h,A);o.push(h),s.push(f)}return new Jr(o,s,e,n)}var Wb=ue.prototype.constructor;function Vb(){return new Wb(this._groups,this._parents)}function jb(t,e){var n,r,i;return function(){var o=ne(this,t),s=(this.style.removeProperty(t),ne(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function wh(t){return function(){this.style.removeProperty(t)}}function Hb(t,e,n){var r,i=n+"",o;return function(){var s=ne(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function Yb(t,e,n){var r,i,o;return function(){var s=ne(this,t),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(t),ne(this,t))),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,l))}}function Kb(t,e){var n,r,i,o="style."+e,s="end."+o,l;return function(){var c=Dr(this,t),u=c.on,f=c.value[o]==null?l||(l=wh(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(s,i=f),c.on=r}}function Zb(t,e,n){var r=(t+="")=="transform"?sb:Oh;return e==null?this.styleTween(t,jb(t,r)).on("end.style."+t,wh(t)):typeof e=="function"?this.styleTween(t,Yb(t,r,Oc(this,"style."+t,e))).each(Kb(this._id,t)):this.styleTween(t,Hb(t,r,e),n).on("end.style."+t,null)}function Jb(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Qb(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&Jb(t,s,n)),r}return o._value=e,o}function _b(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,Qb(t,e,n==null?"":n))}function qb(t){return function(){this.textContent=t}}function tS(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function eS(t){return this.tween("text",typeof t=="function"?tS(Oc(this,"text",t)):qb(t==null?"":t+""))}function nS(t){return function(e){this.textContent=t.call(this,e)}}function rS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&nS(i)),e}return r._value=t,r}function aS(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,rS(t))}function iS(){for(var t=this._name,e=this._id,n=Mh(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,c,u=0;u<l;++u)if(c=s[u]){var f=Ar(c,e);ms(c,t,n,u,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Jr(r,this._parents,t,n)}function oS(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var l={value:s},c={value:function(){--i===0&&o()}};n.each(function(){var u=Dr(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(c)),u.on=e}),i===0&&o()})}var sS=0;function Jr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Ph(t){return ue().transition(t)}function Mh(){return++sS}var Qr=ue.prototype;Jr.prototype=Ph.prototype={constructor:Jr,select:Xb,selectAll:Gb,selectChild:Qr.selectChild,selectChildren:Qr.selectChildren,filter:Fb,merge:Nb,selection:Vb,transition:iS,call:Qr.call,nodes:Qr.nodes,node:Qr.node,size:Qr.size,empty:Qr.empty,each:Qr.each,on:zb,attr:xb,attrTween:Ab,style:Zb,styleTween:_b,text:eS,textTween:aS,remove:kb,tween:fb,delay:Ib,duration:wb,ease:Mb,easeVarying:Db,end:oS,[Symbol.iterator]:Qr[Symbol.iterator]};function YR(t){return t*t*t}function KR(t){return--t*t*t+1}function lS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var cS={time:null,delay:0,duration:250,ease:lS};function uS(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function fS(t){var e,n;t instanceof Jr?(e=t._id,t=t._name):(e=Mh(),(n=cS).time=Sc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,c,u=0;u<l;++u)(c=s[u])&&ms(c,t,e,u,s,n||uS(c,e));return new Jr(r,this._parents,t,e)}ue.prototype.interrupt=ab,ue.prototype.transition=fS;var wc=(t=>()=>t);function dS(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function hS(t){t.stopImmediatePropagation()}function Pc(t){t.preventDefault(),t.stopImmediatePropagation()}var Lh={name:"drag"},Mc={name:"space"},ci={name:"handle"},ui={name:"center"};const{abs:Dh,max:zn,min:Un}=Math;function Fh(t){return[+t[0],+t[1]]}function Lc(t){return[Fh(t[0]),Fh(t[1])]}var ys={name:"x",handles:["w","e"].map(ao),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ts={name:"y",handles:["n","s"].map(ao),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},gS={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(ao),input:function(t){return t==null?null:Lc(t)},output:function(t){return t}},_r={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Nh={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},$h={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},vS={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},pS={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function ao(t){return{type:t}}function mS(t){return!t.ctrlKey&&!t.button}function xS(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function yS(){return navigator.maxTouchPoints||"ontouchstart"in this}function Dc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function TS(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Bh(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function bS(){return Fc(ys)}function SS(){return Fc(Ts)}function ZR(){return Fc(gS)}function Fc(t){var e=xS,n=mS,r=yS,i=!0,o=cs("start","brush","end"),s=6,l;function c(C){var P=C.property("__brush",I).selectAll(".overlay").data([ao("overlay")]);P.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",_r.overlay).merge(P).each(function(){var N=Dc(this).extent;kt(this).attr("x",N[0][0]).attr("y",N[0][1]).attr("width",N[1][0]-N[0][0]).attr("height",N[1][1]-N[0][1])}),C.selectAll(".selection").data([ao("selection")]).enter().append("rect").attr("class","selection").attr("cursor",_r.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var z=C.selectAll(".handle").data(t.handles,function(N){return N.type});z.exit().remove(),z.enter().append("rect").attr("class",function(N){return"handle handle--"+N.type}).attr("cursor",function(N){return _r[N.type]}),C.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",m).on("touchend.brush touchcancel.brush",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(C,P,z){C.tween?C.on("start.brush",function(N){f(this,arguments).beforestart().start(N)}).on("interrupt.brush end.brush",function(N){f(this,arguments).end(N)}).tween("brush",function(){var N=this,B=N.__brush,W=f(N,arguments),V=B.selection,J=t.input(typeof P=="function"?P.apply(this,arguments):P,B.extent),q=Ga(V,J);function at(et){B.selection=et===1&&J===null?null:q(et),u.call(N),W.brush()}return V!==null&&J!==null?at:at(1)}):C.each(function(){var N=this,B=arguments,W=N.__brush,V=t.input(typeof P=="function"?P.apply(N,B):P,W.extent),J=f(N,B).beforestart();li(N),W.selection=V===null?null:V,u.call(N),J.start(z).brush(z).end(z)})},c.clear=function(C,P){c.move(C,null,P)};function u(){var C=kt(this),P=Dc(this).selection;P?(C.selectAll(".selection").style("display",null).attr("x",P[0][0]).attr("y",P[0][1]).attr("width",P[1][0]-P[0][0]).attr("height",P[1][1]-P[0][1]),C.selectAll(".handle").style("display",null).attr("x",function(z){return z.type[z.type.length-1]==="e"?P[1][0]-s/2:P[0][0]-s/2}).attr("y",function(z){return z.type[0]==="s"?P[1][1]-s/2:P[0][1]-s/2}).attr("width",function(z){return z.type==="n"||z.type==="s"?P[1][0]-P[0][0]+s:s}).attr("height",function(z){return z.type==="e"||z.type==="w"?P[1][1]-P[0][1]+s:s})):C.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(C,P,z){var N=C.__brush.emitter;return N&&(!z||!N.clean)?N:new d(C,P,z)}function d(C,P,z){this.that=C,this.args=P,this.state=C.__brush,this.active=0,this.clean=z}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(C,P){return this.starting?(this.starting=!1,this.emit("start",C,P)):this.emit("brush",C),this},brush:function(C,P){return this.emit("brush",C,P),this},end:function(C,P){return--this.active===0&&(delete this.state.emitter,this.emit("end",C,P)),this},emit:function(C,P,z){var N=kt(this.that).datum();o.call(C,this.that,new dS(C,{sourceEvent:P,target:c,selection:t.output(this.state.selection),mode:z,dispatch:o}),N)}};function h(C){if(l&&!C.touches||!n.apply(this,arguments))return;var P=this,z=C.target.__data__.type,N=(i&&C.metaKey?z="overlay":z)==="selection"?Lh:i&&C.altKey?ui:ci,B=t===Ts?null:vS[z],W=t===ys?null:pS[z],V=Dc(P),J=V.extent,q=V.selection,at=J[0][0],et,ot,lt=J[0][1],ft,_,dt=J[1][0],ut,xt,bt=J[1][1],Rt,Et,Zt=0,fe=0,me,xe=B&&W&&i&&C.shiftKey,Te,Fe,Ie=Array.from(C.touches||[C],Se=>{const we=Se.identifier;return Se=dr(Se,P),Se.point0=Se.slice(),Se.identifier=we,Se});li(P);var ke=f(P,arguments,!0).beforestart();if(z==="overlay"){q&&(me=!0);const Se=[Ie[0],Ie[1]||Ie[0]];V.selection=q=[[et=t===Ts?at:Un(Se[0][0],Se[1][0]),ft=t===ys?lt:Un(Se[0][1],Se[1][1])],[ut=t===Ts?dt:zn(Se[0][0],Se[1][0]),Rt=t===ys?bt:zn(Se[0][1],Se[1][1])]],Ie.length>1&&dn(C)}else et=q[0][0],ft=q[0][1],ut=q[1][0],Rt=q[1][1];ot=et,_=ft,xt=ut,Et=Rt;var Jt=kt(P).attr("pointer-events","none"),Ae=Jt.selectAll(".overlay").attr("cursor",_r[z]);if(C.touches)ke.moved=Yt,ke.ended=qe;else{var Le=kt(C.view).on("mousemove.brush",Yt,!0).on("mouseup.brush",qe,!0);i&&Le.on("keydown.brush",Dn,!0).on("keyup.brush",Fn,!0),xc(C.view)}u.call(P),ke.start(C,N.name);function Yt(Se){for(const we of Se.changedTouches||[Se])for(const za of Ie)za.identifier===we.identifier&&(za.cur=dr(we,P));if(xe&&!Te&&!Fe&&Ie.length===1){const we=Ie[0];Dh(we.cur[0]-we[0])>Dh(we.cur[1]-we[1])?Fe=!0:Te=!0}for(const we of Ie)we.cur&&(we[0]=we.cur[0],we[1]=we.cur[1]);me=!0,Pc(Se),dn(Se)}function dn(Se){const we=Ie[0],za=we.point0;var Kt;switch(Zt=we[0]-za[0],fe=we[1]-za[1],N){case Mc:case Lh:{B&&(Zt=zn(at-et,Un(dt-ut,Zt)),ot=et+Zt,xt=ut+Zt),W&&(fe=zn(lt-ft,Un(bt-Rt,fe)),_=ft+fe,Et=Rt+fe);break}case ci:{Ie[1]?(B&&(ot=zn(at,Un(dt,Ie[0][0])),xt=zn(at,Un(dt,Ie[1][0])),B=1),W&&(_=zn(lt,Un(bt,Ie[0][1])),Et=zn(lt,Un(bt,Ie[1][1])),W=1)):(B<0?(Zt=zn(at-et,Un(dt-et,Zt)),ot=et+Zt,xt=ut):B>0&&(Zt=zn(at-ut,Un(dt-ut,Zt)),ot=et,xt=ut+Zt),W<0?(fe=zn(lt-ft,Un(bt-ft,fe)),_=ft+fe,Et=Rt):W>0&&(fe=zn(lt-Rt,Un(bt-Rt,fe)),_=ft,Et=Rt+fe));break}case ui:{B&&(ot=zn(at,Un(dt,et-Zt*B)),xt=zn(at,Un(dt,ut+Zt*B))),W&&(_=zn(lt,Un(bt,ft-fe*W)),Et=zn(lt,Un(bt,Rt+fe*W)));break}}xt<ot&&(B*=-1,Kt=et,et=ut,ut=Kt,Kt=ot,ot=xt,xt=Kt,z in Nh&&Ae.attr("cursor",_r[z=Nh[z]])),Et<_&&(W*=-1,Kt=ft,ft=Rt,Rt=Kt,Kt=_,_=Et,Et=Kt,z in $h&&Ae.attr("cursor",_r[z=$h[z]])),V.selection&&(q=V.selection),Te&&(ot=q[0][0],xt=q[1][0]),Fe&&(_=q[0][1],Et=q[1][1]),(q[0][0]!==ot||q[0][1]!==_||q[1][0]!==xt||q[1][1]!==Et)&&(V.selection=[[ot,_],[xt,Et]],u.call(P),ke.brush(Se,N.name))}function qe(Se){if(hS(Se),Se.touches){if(Se.touches.length)return;l&&clearTimeout(l),l=setTimeout(function(){l=null},500)}else yc(Se.view,me),Le.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Jt.attr("pointer-events","all"),Ae.attr("cursor",_r.overlay),V.selection&&(q=V.selection),TS(q)&&(V.selection=null,u.call(P)),ke.end(Se,N.name)}function Dn(Se){switch(Se.keyCode){case 16:{xe=B&&W;break}case 18:{N===ci&&(B&&(ut=xt-Zt*B,et=ot+Zt*B),W&&(Rt=Et-fe*W,ft=_+fe*W),N=ui,dn(Se));break}case 32:{(N===ci||N===ui)&&(B<0?ut=xt-Zt:B>0&&(et=ot-Zt),W<0?Rt=Et-fe:W>0&&(ft=_-fe),N=Mc,Ae.attr("cursor",_r.selection),dn(Se));break}default:return}Pc(Se)}function Fn(Se){switch(Se.keyCode){case 16:{xe&&(Te=Fe=xe=!1,dn(Se));break}case 18:{N===ui&&(B<0?ut=xt:B>0&&(et=ot),W<0?Rt=Et:W>0&&(ft=_),N=ci,dn(Se));break}case 32:{N===Mc&&(Se.altKey?(B&&(ut=xt-Zt*B,et=ot+Zt*B),W&&(Rt=Et-fe*W,ft=_+fe*W),N=ui):(B<0?ut=xt:B>0&&(et=ot),W<0?Rt=Et:W>0&&(ft=_),N=ci),Ae.attr("cursor",_r[z]),dn(Se));break}default:return}Pc(Se)}}function m(C){f(this,arguments).moved(C)}function A(C){f(this,arguments).ended(C)}function I(){var C=this.__brush||{selection:null};return C.extent=Lc(e.apply(this,arguments)),C.dim=t,C}return c.extent=function(C){return arguments.length?(e=typeof C=="function"?C:wc(Lc(C)),c):e},c.filter=function(C){return arguments.length?(n=typeof C=="function"?C:wc(!!C),c):n},c.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:wc(!!C),c):r},c.handleSize=function(C){return arguments.length?(s=+C,c):s},c.keyModifiers=function(C){return arguments.length?(i=!!C,c):i},c.on=function(){var C=o.on.apply(o,arguments);return C===o?c:C},c}function zh(t){const{event:e,$el:n}=t,r=n.subchart.main||n.main;let i;return e&&e.type==="brush"?i=e.selection:r&&(i=r.select(".bb-brush").node())&&(i=Bh(i)),i}function Uh(t){const e=zh(t);return e?e[0]===e[1]:!0}function kh(t,e){return e.map(n=>{var r,i,o,s;const{values:l}=n,c=l[0],u=l[l.length-1],f=c?(i=(r=t.getXCacheKey)==null?void 0:r.call(t,c.x))!=null?i:c.x:"",d=u?(s=(o=t.getXCacheKey)==null?void 0:o.call(t,u.x))!=null?s:u.x:"";return`${n.id}:${l.length}:${f}:${d}`}).join("|")}function Xh(t,e){var n;const r=(n=t.data)==null?void 0:n.targets;if(!r)return!1;for(let i=0;i<e.length;i++){const o=e[i],s=r.find(l=>l.id===o.id);if(!s||s.values!==o.values)return!1}return!0}function Nc(t,e){vn(e)&&((t.min===void 0||e<t.min)&&(t.min=e),(t.max===void 0||e>t.max)&&(t.max=e))}function Gh(t,e){for(let n=0;n<e.length;n++)Nc(t,e[n])}function AS(t,e){var n,r;const i={min:void 0,max:void 0},o=t.state.hasAxis;for(let s=0;s<e.length;s++){const l=e[s],c=(n=t.isCandlestickType)==null?void 0:n.call(t,l),{values:u}=l;for(let f=0;f<u.length;f++){const d=u[f];let h=d.value;(We(h)||h===null)&&(h!==null&&c&&(h=Array.isArray(h)?h.slice(0,4):[h.open,h.high,h.low,h.close]),Array.isArray(h)?Gh(i,h):je(h)&&"high"in h?Gh(i,Object.values(h)):(r=t.isBubbleZType)!=null&&r.call(t,d)?Nc(i,o&&t.getBubbleZData(h,"y")):Nc(i,h))}}return[i.min,i.max]}function ES(t,e){let n;for(let r=0;r<t.length;r++){const{values:i}=t[r];for(let o=0;o<i.length;o++){const{x:s}=i[o];vn(s)&&(n===void 0||(e==="min"?s<n:s>n))&&(n=s)}}return n}var CS={getYDomainMinMaxBoth(t){const e=this,{axis:n,cache:r,config:i,state:o}=e,l=Xh(e,t)?`${Ue.domainMinMax}_y_${kh(e,t)}`:null,c=l&&r.get(l);if(c&&c.generation===o.dataGeneration)return c.value;const u=i.data_groups,f=e.mapToIds(t),d=wf(f);let h;if(u.length>0){const m=e.getValuesAsIdKeyed(t),A=t.some(W=>W.values.some(V=>V.value<0)),I=t.some(W=>W.values.some(V=>V.value>0)),C=new Map(f.map(W=>[W,n.getId(W)])),P={},z={};for(const W in m)P[W]=m[W].slice(),z[W]=m[W].slice();u.forEach(W=>{const V=W.filter(J=>d.has(J));if(V.length){const J=V[0],q=C.get(J);P[J]&&A&&(P[J]=P[J].map(at=>at<0?at:0)),z[J]&&I&&(z[J]=z[J].map(at=>at>0?at:0)),V.filter((at,et)=>et>0).forEach(at=>{if(P[at]){const et=C.get(at);P[at].forEach((ot,lt)=>{const ft=+ot;et===q&&!(A&&ft>0)&&(P[J][lt]+=ft)})}if(z[at]){const et=C.get(at);z[at].forEach((ot,lt)=>{const ft=+ot;et===q&&!(I&&ft<0)&&(z[J][lt]+=ft)})}})}});const N=[],B=[];for(const W in P)N.push(yr("min",P[W])),B.push(yr("max",z[W]));h=[yr("min",N),yr("max",B)]}else h=AS(e,t);return l&&r.add(l,{generation:o.dataGeneration,value:h}),h},isHiddenTargetWithYDomain(t){const e=this;for(const n of e.state.hiddenTargetIds)if(e.axis.getId(n)===t)return!0;return!1},getYDomain(t,e,n){const r=this,{axis:i,config:o,scale:s}=r,l=`axis_${e}`;if(r.isStackNormalized()&&t.filter(_=>i.getId(_.id)===e).map(_=>_.id).some(_=>r.isGrouped(_)))return[0,100];const c=(s==null?void 0:s[e])&&s[e].type==="log",u=t.filter(lt=>i.getId(lt.id)===e),f=n?r.filterByXDomain(u,n):u;if(f.length===0)return r.isHiddenTargetWithYDomain(e)?s[e].domain():e==="y2"?s.y.domain():r.getYDomain(t,"y2",n);const d=o[`${l}_min`],h=o[`${l}_max`],m=o[`${l}_center`],A=o[`${l}_inverted`],I=r.hasDataLabel()&&o.axis_rotated,C=r.hasDataLabel()&&!o.axis_rotated,[P,z]=r.getYDomainMinMaxBoth(f);let N=P,B=z,W=[jt.BAR,jt.BUBBLE,jt.SCATTER,...jn.Line].some(lt=>{const ft=lt.indexOf("area")>-1?"area":lt;return r.hasType(lt,f,!0)&&o[`${ft}_zerobased`]});N=We(d)?d:We(h)?N<=h?N:h-10:N,B=We(h)?h:We(d)?d<=B?B:d+10:B,isNaN(N)&&(N=0),isNaN(B)&&(B=N),N===B&&(N<0?B=0:N=0);const V=N>=0&&B>=0,J=N<=0&&B<=0;(We(d)&&V||We(h)&&J)&&(W=!1),W&&(V&&(N=0),J&&(B=0));const q=Math.abs(B-N);let at={top:q*.1,bottom:q*.1};if(sn(m)){const lt=Math.max(Math.abs(N),Math.abs(B));B=m+lt,N=m-lt}if(I){const lt=Ca(s.y.range()),ft=r.getDataLabelLength(N,B,"width").map(_=>{const dt=_/lt;return isFinite(dt)?dt:0});["bottom","top"].forEach((_,dt)=>{at[_]+=q*(ft[dt]/(1-ft[0]-ft[1]))})}else if(C){const lt=r.getDataLabelLength(N,B,"height");["bottom","top"].forEach((ft,_)=>{at[ft]+=r.convertPixelToScale("y",lt[_],q)})}at=r.getResettedPadding(at);const et=o[`${l}_padding`];vn(et)&&["bottom","top"].forEach(lt=>{at[lt]=i.getPadding(et,lt,at[lt],q)}),W&&(V&&(at.bottom=N),J&&(at.top=-B));const ot=c?[N,B].map(lt=>lt<0?0:lt):[N-at.bottom,B+at.top];return A?ot.reverse():ot},getXDomainMinMax(t,e){var n;const r=this,{cache:i,state:o}=r,s=r.config[`axis_x_${e}`],c=Xh(r,t)?`${Ue.domainMinMax}_x_${e}_${kh(r,t)}`:null,u=c&&i.get(c);let f=(u==null?void 0:u.generation)===o.dataGeneration?u.value:void 0;f===void 0&&(f=ES(t,e),c&&i.add(c,{generation:o.dataGeneration,value:f}));let d=je(s)?s.value:s;return d=sn(d)&&((n=r.axis)!=null&&n.isTimeSeries())?Hn.bind(this)(d):d,je(s)&&s.fit&&(e==="min"&&d<f||e==="max"&&d>f)&&(d=void 0),sn(d)?d:f},getXDomainPadding(t,e){const n=this,{axis:r,config:i}=n,o=i.axis_x_padding,s=r.isTimeSeries()&&e,l=Ca(t);let c;if(r.isCategorized()||s)c=0;else if(n.hasType("bar")){const d=n.getMaxDataCount();c=d>1?l/(d-1)/2:.5}else c=n.getResettedPadding(l*.01);let{left:u=c,right:f=c}=ge(o)?{left:o,right:o}:o;if(o.unit==="px"){const d=Math.abs(l+l*.2);u=r.getPadding(o,"left",c,d),f=r.getPadding(o,"right",c,d)}else{const d=l+u+f;if(s&&d){const h=l/e/d;u=u/d/h,f=f/d/h}}return{left:u,right:f}},getXDomain(t){const e=this,{axis:n,config:r,scale:{x:i}}=e,o=r.axis_x_inverted,s=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let[l=0,c=0]=s;if(i.type!=="log"){const u=n.isCategorized(),f=n.isTimeSeries(),d=e.getXDomainPadding(s);let[h,m]=s;h-m===0&&!u&&(f?(h=new Date(h.getTime()*.5),m=new Date(m.getTime()*1.5)):(h=h===0?1:h*.5,m=m===0?-1:m*1.5)),(h||h===0)&&(l=f?new Date(h.getTime()-d.left):h-d.left),(m||m===0)&&(c=f?new Date(m.getTime()+d.right):m+d.right)}return o?[c,l]:[l,c]},updateXDomain(t,e,n,r,i){var o;const s=this,{config:l,org:c,scale:{x:u,subX:f}}=s,d=l.zoom_enabled;if(n&&(u.domain(i||Ja(s.getXDomain(t),!l.axis_x_inverted)),c.xDomain=u.domain(),f.domain(u.domain()),(o=s.brush)==null||o.scale(f)),e){const h=i||!s.brush||Uh(s)?c.xDomain:zh(s).map(f.invert);u.domain(h)}return(n||e)&&d&&s.zoom.updateScaleExtent(),r&&u.domain(s.trimXDomain(u.orgDomain())),u.domain()},trimXDomain(t){const e=this,n=e.config.axis_x_inverted,r=e.getZoomDomain(),[i,o]=r;return(n?t[0]>=i:t[0]<=i)&&(t[1]=+t[1]+(i-t[0]),t[0]=i),(n?t[1]<=o:t[1]>=o)&&(t[0]=+t[0]-(t[1]-o),t[1]=o),t},getZoomDomain(t="zoom",e=!1){const n=this,{config:r,scale:i,org:o}=n;let[s,l]=e&&i[t]?i[t].domain():o.xDomain;return t==="zoom"&&(sn(r.zoom_x_min)&&(s=yr("min",[s,r.zoom_x_min])),sn(r.zoom_x_max)&&(l=yr("max",[l,r.zoom_x_max]))),[s,l]},getZoomDomainValue(t){const e=this,{config:n,axis:r}=e;if(r.isCategorized()&&Array.isArray(t)){const i=n.axis_x_inverted;return t.map((s,l)=>Number(s)+(l===0?+i:+!i))}return t},convertPixelToScale(t,e,n){const r=this,{config:i,state:o}=r,s=i.axis_rotated;let l;return t==="x"?l=s?"height":"width":l=s?"width":"height",n*(e/o[l])},withinRange(t,e=[0,0],n){const i=this.config.axis_x_inverted,[o,s]=n;if(Array.isArray(t)){const l=i?t[1]:t[0],c=i?t[0]:t[1];if(l<c)return t.every((u,f)=>(f===0?i?+u<=o:+u>=o:i?+u>=s:+u<=s)&&!t.every((d,h)=>d===e[h]))}return!1}};function Wh(t,e,n){const{config:r}=t,i=`axis_${e}_tick_format`;return(r[i]?r[i]:t.defaultValueFormat).call(t.api,n)}var IS={yFormat(t){return Wh(this,"y",t)},y2Format(t){return Wh(this,"y2",t)},getDefaultValueFormat(){const t=this,{defaultArcValueFormat:e,yFormat:n,y2Format:r}=t,i=t.hasArcType(null,["gauge","polar","radar"]);return function(o,s,l){return(i?e:t.axis&&t.axis.getId(l)==="y2"?r:n).call(t,o,s)}},defaultValueFormat(t){return nn(t)?t.join("~"):We(t)?+t:""},defaultArcValueFormat(t,e){return`${(e*100).toFixed(1)}%`},defaultPolarValueFormat(t){return`${t}`},dataLabelFormat(t){const e=this,n=e.config.data_labels,r=o=>{let l=o;return nn(o)?l=o.join("~"):je(o)&&(l=Object.values(o).join("~")),l};let i=r;return le(n.format)?i=n.format:Qn(n.format)&&(n.format[t]?i=n.format[t]===!0?r:n.format[t]:i=()=>""),i.bind(e.api)}};const Vh=10,RS=750;function bs(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}function OS(t,e=!0){var n;const{config:r}=this;let i=(n=r.data_names[t])!=null?n:t;return e&&le(r.legend_format)&&(i=r.legend_format(i,t!==i?t:void 0)),i}function wS(t,e){var n;if(!e||e.empty())return;const r=(n=t.$el.legend)==null?void 0:n.selectAll(`.${$e.legendItem}`);r&&!r.empty()&&(e=r);const i=[];e.each(function(s){i.push({id:s,node:this})});const o=Pf(i,s=>s.id,s=>s.node);t.cache.add(Ue.legendItemMap,o)}function jh(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function PS(t,e,n){const r=jh(n);t.state.legendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function Hh(t,e){const n=t.state.legendTouch,r=n&&jh(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>Vh||Math.abs(r.clientY-n.y)>Vh)}function MS(t,e,n){Hh(t,n);const r=t.state.legendTouch;return t.state.legendTouch=null,!!r&&r.id===e&&!r.moved}function LS(t,e){t.state.legendLastTouchClickId=e,t.state.legendLastTouchClickTime=Date.now()}function DS(t,e){const{state:n}=t,r=n.legendLastTouchClickId===e&&Date.now()-(n.legendLastTouchClickTime||0)<RS;return r&&(n.legendLastTouchClickId=null,n.legendLastTouchClickTime=0),r}function FS(t){var e;const n=(e=t.config.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ea(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}var NS={initLegend(){var t;const e=this,{config:n,$el:r}=e;if(e.legendItemTextBox={},e.state.legendHasRendered=!1,e.state.isCanvasMode){n.legend_show?(t=e.updateHtmlLegend)==null||t.call(e):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets));return}n.legend_show?(n.legend_contents_bindto||(r.legend=e.$el.svg.append("g").classed($e.legend,!0).attr("transform",e.getTranslate("legend"))),e.updateLegend()):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets))},updateLegend(t,e,n){var r;const i=this,{config:o,state:s,scale:l,$el:c}=i,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=ia(u,"withTransition",!0),u.withTransitionForTransform=ia(u,"withTransitionForTransform",!0),o.legend_contents_bindto&&o.legend_contents_template?i.updateLegendTemplate():s.hasTreemap||i.updateLegendElement(t||i.mapToIds(i.data.targets),u),(r=c.legend)==null||r.selectAll(`.${$e.legendItem}`).classed($e.legendItemHidden,function(f){const d=!i.isTargetToShow(f);return d&&(this.style.opacity=null),d}),i.updateScales(!1,!l.zoom),i.updateSvgSize(),i.transformAll(u.withTransitionForTransform,n),s.legendHasRendered=!0},updateLegendTemplate(){const t=this,{config:e,$el:n}=t,r=kt(e.legend_contents_bindto),i=e.legend_contents_template;if(!r.empty()){const o=t.mapToIds(t.data.targets),s=[];let l="";o.forEach(u=>{const f=le(i)?Xr(i.call(t.api,u,t.color(u),t.api.data(u)[0].values)):Ra(i,{COLOR:t.color(u),TITLE:u});f&&(s.push(u),l+=f)});const c=r.html(l).selectAll(function(){return this.childNodes}).data(s);t.setLegendItem(c),n.legend=r}},updateSizeForLegend(t){const e=this,{config:n,state:{isLegendTop:r,isLegendLeft:i,isLegendRight:o,isLegendInset:s,current:l}}=e,{width:c,height:u}=t,f={top:r?e.getCurrentPaddingByDirection("top")+n.legend_inset_y+5.5:l.height-u-e.getCurrentPaddingByDirection("bottom")-n.legend_inset_y,left:i?e.getCurrentPaddingByDirection("left")+n.legend_inset_x+.5:l.width-c-e.getCurrentPaddingByDirection("right")-n.legend_inset_x+.5};e.state.margin3={top:o?0:s?f.top:l.height-u,right:NaN,bottom:0,left:o?l.width-c:s?f.left:0}},transformLegend(t){const e=this,{$el:{legend:n},$T:r}=e;r(n,t).attr("transform",e.getTranslate("legend"))},updateLegendItemColor(t,e){const n=this,{legend:r}=n.$el;if(r){const i=n.getLegendItemById(t);i&&kt(i).select("line").style("stroke",e)}},getLegendWidth(){const t=this,{current:{width:e},isLegendRight:n,isLegendInset:r,legendItemWidth:i,legendStep:o}=t.state;return t.config.legend_show?n||r?i*(o+1):e:0},getLegendHeight(){var t;const e=this,{current:n,isLegendRight:r,legendItemHeight:i,legendStep:o}=e.state,l=((t=e.config.padding)==null?void 0:t.mode)==="fit"?10:20;return e.config.legend_show?r?n.height:Math.max(l,i)*(o+1):0},opacityForUnfocusedLegend(t){return t.classed($e.legendItemHidden)?null:"0.3"},toggleFocusLegend(t,e){const n=this,{$el:{legend:r},$T:i}=n,o=n.mapToTargetIds(t);r&&i(r.selectAll(`.${$e.legendItem}`).filter(s=>o.indexOf(s)>=0).classed(cn.legendItemFocused,e)).style("opacity",function(){return e?null:n.opacityForUnfocusedLegend.call(n,kt(this))})},revertLegend(){const t=this,{$el:{legend:e},$T:n}=t;e&&n(e.selectAll(`.${$e.legendItem}`).classed(cn.legendItemFocused,!1)).style("opacity",null)},showLegend(t){const e=this,{config:n,$el:r,$T:i}=e;n.legend_show||(n.legend_show=!0,r.legend?r.legend.style("visibility",null):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),i(r.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend(t){const e=this,{config:n,$el:{legend:r}}=e;n.legend_show&&lr(t)&&(n.legend_show=!1,r==null||r.style("visibility","hidden")),e.addHiddenLegendIds(t),r==null||r.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox(t,e){const n=this,{cache:r,state:i}=n;let o;const s=Ue.legendItemTextBox;return t&&(o=!i.redrawing&&r.get(s)||{},o[t]||(o[t]=n.getTextRect(e,$e.legendItem),r.add(s,o)),o=o[t]),o},setLegendItem(t){const e=this,{$el:n,api:r,config:i,state:o}=e,s=o.inputType==="touch",l=e.hasType("gauge"),c=i.boost_useCssRule,u=i.legend_item_interaction,f=u.dblclick?"dblclick":"click",d=u||le(i.legend_item_onclick),h=s?FS(e):void 0,m=function(A,I){var C;if(!Ne(i.legend_item_onclick,r,I,!o.hiddenTargetIds.has(I))){const{altKey:P,type:z}=A,N=kt(this);z==="dblclick"||P?o.hiddenTargetIds.size&&!N.classed($e.legendItemHidden)?r.show():(r.hide(),r.show(I)):(r.toggle(I),N.classed(cn.legendItemFocused,!1))}s&&(e.hideTooltip(),(C=e.hideGridFocus)==null||C.call(e,!0))};t.attr("class",function(A){const I=kt(this);return(!I.empty()&&I.attr("class")||"")+e.generateClass($e.legendItem,A)}).style("visibility",A=>e.isLegendToShow(A)?null:"hidden"),i.interaction_enabled&&(c&&[[`.${$e.legendItem}`,"cursor:pointer"],[`.${$e.legendItem} text`,"pointer-events:none"],[`.${$e.legendItemPoint} text`,"pointer-events:none"],[`.${$e.legendItemTile}`,"pointer-events:none"],[`.${$e.legendItemEvent}`,"fill-opacity:0"]].forEach(A=>{const[I,C]=A;e.setCssRule(!1,I,[C])(n.legend)}),t.on(f,d?function(A,I){s&&A.type==="click"&&DS(e,I)||m.call(this,A,I)}:null),s&&f==="click"&&d&&t.on("touchstart",function(A,I){PS(e,I,A)},h).on("touchmove",A=>{Hh(e,A)},h).on("touchend",function(A,I){MS(e,I,A)&&(LS(e,I),m.call(this,A,I))},h),!s&&t.on("mouseout",u||le(i.legend_item_onout)?function(A,I){Ne(i.legend_item_onout,r,I,!o.hiddenTargetIds.has(I))||(kt(this).classed(cn.legendItemFocused,!1),l&&e.undoMarkOverlapped(e,`.${ar.gaugeValue}`),e.api.revert())}:null).on("mouseover",u||le(i.legend_item_onover)?function(A,I){Ne(i.legend_item_onover,r,I,!o.hiddenTargetIds.has(I))||(kt(this).classed(cn.legendItemFocused,!0),l&&e.markOverlapped(I,e,`.${ar.gaugeValue}`),!o.transiting&&e.isTargetToShow(I)&&r.focus(I))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",e.getStylePropValue("pointer"))),wS(e,t)},getLegendItemById(t){var e;const n=this,r=n.cache.get(Ue.legendItemMap);if(r&&r instanceof Map)return r.get(t)||null;const i=(e=n.$el.legend)==null?void 0:e.selectAll(`.${$e.legendItem}`).filter(o=>o===t);return(i==null?void 0:i.node())||null},updateLegendElement(t,e){const n=this,{config:r,state:i,$el:{legend:o},$T:s}=n,c=r.legend_item_tile_type!=="circle",u=r.legend_item_tile_r,f={width:c?r.legend_item_tile_width:u*2,height:c?r.legend_item_tile_height:u*2},d={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:f.width+5,totalLength:0},h={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let m,A,I;const C=t.filter(q=>!sn(r.data_names[q])||r.data_names[q]!==null),P=e.withTransition,z=i.isLegendRight||i.isLegendInset,N=OS.bind(n),B=n.getUpdateLegendPositions(C,d,h,z);i.isLegendInset&&(d.step=r.legend_inset_step?r.legend_inset_step:C.length,i.legendStep=d.step),i.isLegendRight?(m=q=>d.max.width*h.steps[q],A=q=>h.margins[h.steps[q]]+h.offsets[q]):i.isLegendInset?(m=q=>d.max.width*h.steps[q]+10,A=q=>h.margins[h.steps[q]]+h.offsets[q]):(m=q=>h.margins[h.steps[q]]+h.offsets[q],A=q=>d.max.height*h.steps[q]);const W={xText:(q,at)=>m(q,at)+4+f.width,xRect:(q,at)=>m(q,at),x1Tile:(q,at)=>m(q,at)-2,x2Tile:(q,at)=>m(q,at)-2+f.width,yText:(q,at)=>A(q,at)+9,yRect:(q,at)=>A(q,at)-5,yTile:(q,at)=>A(q,at)+4};n.generateLegendItem(C,f,B,W,z,N),I=o.select(`.${$e.legendBackground} rect`),i.isLegendInset&&d.max.width>0&&I.size()===0&&(I=o.insert("g",`.${$e.legendItem}`).attr("class",$e.legendBackground).append("rect")),r.legend_tooltip&&o.selectAll("title").data(C).text(q=>N(q,!1));const V=o.selectAll("text").data(C).text(q=>N(q)).each(function(q,at){B(this,q,at)});s(V,P).attr("x",W.xText).attr("y",W.yText);const J=o.selectAll(`rect.${$e.legendItemEvent}`).data(C);s(J,P).attr("width",q=>h.widths[q]).attr("height",q=>h.heights[q]).attr("x",W.xRect).attr("y",W.yRect),n.updateLegendItemPos(C,P,W),I&&s(I,P).attr("height",n.getLegendHeight()-12).attr("width",d.max.width*(d.step+1)+10),i.legendItemWidth=d.max.width,i.legendItemHeight=d.max.height,i.legendStep=d.step},getUpdateLegendPositions(t,e,n,r){const i=this,{config:o,state:s}=i;return function(l,c,u){const f=u===0,d=u===t.length-1,h=i.getLegendItemTextBox(c,l),m=h.width+e.tileWidth+(d&&!r?0:e.padding.right)+o.legend_padding,A=h.height+e.padding.top,I=r?A:m,C=r?i.getLegendHeight():i.getLegendWidth();let P;const z=function(B,W){W||(P=(C-e.totalLength-I)/2,P<e.posMin&&(P=(C-I)/2,e.totalLength=0,e.step++)),n.steps[B]=e.step,n.margins[e.step]=s.isLegendInset?10:P,n.offsets[B]=e.totalLength,e.totalLength+=I};if(f&&(e.totalLength=0,e.step=0,e.max.width=0,e.max.height=0),o.legend_show&&!i.isLegendToShow(c)){n.widths[c]=0,n.heights[c]=0,n.steps[c]=0,n.offsets[c]=0;return}n.widths[c]=m,n.heights[c]=A,(!e.max.width||m>=e.max.width)&&(e.max.width=m),(!e.max.height||A>=e.max.height)&&(e.max.height=A);const N=r?e.max.height:e.max.width;if(o.legend_equally){for(const B in n.widths)n.widths[B]=e.max.width;for(const B in n.heights)n.heights[B]=e.max.height;P=(C-N*t.length)/2,P<e.posMin?(e.totalLength=0,e.step=0,t.forEach(B=>z(B))):z(c,!0)}else z(c)}},generateLegendItem(t,e,n,r,i,o){const s=this,{config:l,state:c,$el:{legend:u}}=s,f=l.legend_usePoint,d=l.legend_item_tile_r,h=l.legend_item_tile_type,m=h!=="circle",A=-200,I=u.selectAll(`.${$e.legendItem}`).data(t).enter().append("g");if(s.setLegendItem(I),l.legend_tooltip&&I.append("title").text(C=>C),I.append("text").text(C=>o(C)).each(function(C,P){n(this,C,P)}).style("pointer-events",s.getStylePropValue("none")).attr("x",i?r.xText:A).attr("y",i?A:r.yText),I.append("rect").attr("class",$e.legendItemEvent).style("fill-opacity",s.getStylePropValue("0")).attr("x",i?r.xRect:A).attr("y",i?A:r.yRect),f){const C=[],P=s.getValidPointPattern();I.append(z=>{C.indexOf(z)===-1&&C.push(z);let N=P[C.indexOf(z)%P.length];return N==="rectangle"&&(N="rect"),He.createElementNS(Qt.svg,"hasValidPointType"in s&&s.hasValidPointType(N)?N:"use")}).attr("class",$e.legendItemPoint).style("fill",bs.bind(s)).style("pointer-events",s.getStylePropValue("none")).attr("href",(z,N,B)=>{const V=B[N].nodeName.toLowerCase(),J=s.getTargetSelectorSuffix(z);return V==="use"?`#${c.datetimeId}-point${J}`:void 0})}else I.append(m?"line":h).attr("class",$e.legendItemTile).style("stroke",bs.bind(s)).style("pointer-events",s.getStylePropValue("none")).call(C=>{h==="circle"?C.attr("r",d).style("fill",bs.bind(s)).attr("cx",i?r.x2Tile:A).attr("cy",i?A:r.yTile):m&&C.attr("stroke-width",e.height).attr("x1",i?r.x1Tile:A).attr("y1",i?A:r.yTile).attr("x2",i?r.x2Tile:A).attr("y2",i?A:r.yTile)})},updateLegendItemPos(t,e,n){const r=this,{config:i,$el:{legend:o},$T:s}=r,l=i.legend_usePoint,c=i.legend_item_tile_type,u=c!=="circle";if(l){const f=o.selectAll(`.${$e.legendItemPoint}`).data(t),d=i.legend_item_tile_type!=="circle",h=d?i.legend_item_tile_width:i.legend_item_tile_r*2,m=d?i.legend_item_tile_height:i.legend_item_tile_r*2,A=h*.75,I=m*.75,C=h/8,P=m/8;s(f,e).each(function(){const z=this.nodeName.toLowerCase();let N="x",B="y",W=null,V=null,J=null;z==="circle"?(N="cx",B="cy",W=Math.min(A,I)/2):z==="rect"&&(V=A,J=I);const q=kt(this).attr("transform",null).attr("x",null).attr("y",null).attr("cx",null).attr("cy",null).attr("r",W).attr("width",V).attr("height",J);z==="use"?q.attr("transform",at=>`translate(${n.x1Tile(at)} ${n.yTile(at)-m/2}) scale(${C} ${P})`):q.attr(N,at=>n.x1Tile(at)+(h-(V||0))/2).attr(B,at=>n.yTile(at)-(J||0)/2)})}else{const f=o.selectAll(`.${$e.legendItemTile}`).data(t);s(f,e).style("stroke",bs.bind(r)).call(d=>{c==="circle"?d.attr("cx",h=>{const m=n.x2Tile(h);return m-(m-n.x1Tile(h))/2}).attr("cy",n.yTile):u&&d.attr("x1",n.x1Tile).attr("y1",n.yTile).attr("x2",n.x2Tile).attr("y2",n.yTile)})}}},$S={redraw(t={}){var e,n,r,i,o,s,l,c,u,f;const d=this,{config:h,state:m,$el:A}=d,{main:I,treemap:C}=A;m.redrawing=!0,m.redrawGeneration++,(m.dirty.data||m.dirty.visibility||t.initializing)&&m.dataGeneration++,(t.initializing||m.dirty.size||m.dirty.data||!m.rendered)&&d.cache.remove([Ue.svgLeft]);const P=d.filterTargetsToShow(d.data.targets);m._targetsToShow=P;const z={data:m.dirty.data,visibility:m.dirty.visibility,size:m.dirty.size};m.dirty.data=!1,m.dirty.visibility=!1,m.dirty.size=!1;const{flow:N,initializing:B}=t,W=d.getWithOption(t),V=W.Transition?h.transition_duration:0,J=W.TransitionForExit?V:0,q=W.TransitionForAxis?V:0,at=(e=d.axis)==null?void 0:e.generateTransitions(q),et=z.data||z.visibility||B;if(m.isCanvasMode&&(d.setContainerSize(),(n=d.updateHtmlLegend)==null||n.call(d)),d.updateSizes(B),m.isCanvasMode){const ot=d.scale.zoom,lt=ot==null?void 0:ot.domain();ot&&(d.scale.zoom=null),d.updateScales(B,W.UpdateXDomain),ot&&(ot.range(d.scale.x.range()),lt&&ot.domain(lt),d.scale.zoom=d.getCustomizedXScale(ot),d.axis.x.scale(d.scale.zoom),d.scale.x.domain(h.zoom_rescale?lt:d.org.xDomain),d.scale.subX.domain(d.org.xDomain)),m.hasAxis&&d.axis.syncAxisDomains(P,W,N),m.hasAxis&&((r=d.applyCanvasSubchartDomain)==null||r.call(d));const ft=et?d.getDrawShape():m._cachedDrawShape||d.getDrawShape();et&&(m._cachedDrawShape=ft),(i=d.updateHtmlLegend)==null||i.call(d),(o=d.resizeCanvas)==null||o.call(d),m.canvasFocusKey=null,d.renderCanvasFrame(ft,null,!0),B&&d.updateTypesElements(),d.callPluginHook("$redraw",t,0),m.redrawing=!1,m._targetsToShow=null,m._cachedDrawShape=null,d.mapToIds(d.data.targets).forEach(_=>{m.withoutFadeIn[_]=!0}),Ne(h.onrendered,d.api);return}W.Legend&&h.legend_show?(t.withTransition=!!V,!C&&d.updateLegend(d.mapToIds(d.data.targets),t,at)):W.Dimension&&d.updateDimension(!0),h.data_empty_label_text&&I.select(`text.${En.text}.${ze.empty}`).attr("x",m.width/2).attr("y",m.height/2).text(h.data_empty_label_text).style("display",P.length?"none":null),(s=d.redrawTitle)==null||s.call(d),m.hasAxis?(d.axis.redrawAxis(P,W,at,N,B),(l=d.hasGrid)!=null&&l.call(d)&&d.updateGrid(),h.regions.length&&((c=d.updateRegion)==null||c.call(d)),["bar","candlestick","line","area"].forEach(ot=>{const lt=$n(ot);(/^(line|area)$/.test(ot)&&d.hasTypeOf(lt)||d.hasType(ot))&&et&&d[`update${lt}`](W.TransitionForExit)}),A.text&&I.selectAll(`.${gn.selectedCircles}`).filter(d.isBarType.bind(d)).selectAll("circle").remove(),h.interaction_enabled&&!N&&W.EventRect&&(d.redrawEventRect(),(u=d.bindZoomEvent)==null||u.call(d))):(A.arcs&&d.redrawArc(V,J,W.Transform),A.radar&&d.redrawRadar(),A.polar&&d.redrawPolar(),A.funnel&&d.redrawFunnel(),C&&d.updateTreemap(J)),!m.resizing&&!C&&(d.hasPointType()||m.hasRadar)?et&&d.updateCircle():(f=d.hasLegendDefsPoint)!=null&&f.call(d)&&d.data.targets.forEach(d.point("create",this)),d.hasDataLabel()&&!d.hasArcType(null,["radar"])&&et&&d.updateText(),B&&d.updateTypesElements(),d.generateRedrawList(P,N,V,W.Subchart,et),d.updateTooltipOnRedraw(),d.callPluginHook("$redraw",t,V)},generateRedrawList(t,e,n,r,i=!0){const o=this,{config:s,state:l}=o,c=i?o.getDrawShape():l._cachedDrawShape||o.getDrawShape();i&&(l._cachedDrawShape=c),l.hasAxis&&s.subchart_show&&o.redrawSubchart(r,n,c);const u=e&&o.generateFlow({targets:t,flow:e,duration:e.duration,shape:c,xv:o.xv.bind(o)}),f=(n||u)&&Qi(),d=o.getRedrawList(c,e,u,f),h=()=>{u&&u(),l.redrawing=!1,l._targetsToShow=null,l._cachedDrawShape=null,Ne(s.onrendered,o.api)};if(f&&d.length){const m=th();Ph().duration(n).each(()=>{d.flatMap(A=>A).forEach(A=>m.add(A))}).call(m,h)}else l.transiting||h();o.mapToIds(o.data.targets).forEach(m=>{l.withoutFadeIn[m]=!0})},getRedrawList(t,e,n,r){const i=this,{config:o,state:{hasAxis:s,hasRadar:l,hasTreemap:c},$el:{grid:u}}=i,{cx:f,cy:d,xForText:h,yForText:m}=t.pos,A=[];if(s){i.redrawGrid&&(o.grid_x_lines.length||o.grid_y_lines.length)&&A.push(i.redrawGrid(r)),i.redrawRegion&&o.regions.length&&A.push(i.redrawRegion(r));for(const I in t.type){const C=$n(I),P=t.type[I];(/^(area|line)$/.test(I)&&i.hasTypeOf(C)||i.hasType(I))&&A.push(i[`redraw${C}`](P,r))}!e&&u.main&&i.updateGridFocus&&A.push(i.updateGridFocus())}return(!i.hasArcType()||l)&&vn(o.data_labels)&&o.data_labels!==!1&&A.push(i.redrawText(h,m,e,r)),(i.hasPointType()||l)&&!i.isPointFocusOnly()&&i.redrawCircle&&A.push(i.redrawCircle(f,d,r,n)),c&&A.push(i.redrawTreemap(r)),A},updateAndRedraw(t={}){const e=this,{config:n,state:r}=e;let i;t.withTransition=ia(t,"withTransition",!0),t.withTransform=ia(t,"withTransform",!1),t.withLegend=ia(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=ia(t,"withTransitionForTransform",t.withTransition),t.withLegend&&n.legend_show||(r.hasAxis&&(i=e.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0)),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,i)),e.redraw(t)}},BS={setContainerSize(){const t=this,{state:e}=t;e.current.width=t.getCurrentWidth(),e.current.height=t.getCurrentHeight()},getCurrentWidth(){const t=this;return t.config.size_width||t.getParentRectValue("width")},getCurrentHeight(){const t=this,{config:e}=t,n=e.size_height||t.getParentHeight();return n>0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getParentRectValue(t){const e=`offset${$n(t)}`;let n=this.$el.chart.node(),r=0;for(;r<30&&n&&n.tagName!=="BODY";){try{r=un(n,!0)[t]}catch(o){e in n&&(r=n[e])}n=n.parentNode}const i=He.body[e];return r>i&&(r=i),r},getParentHeight(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft(t){var e,n,r;const i=this,{cache:o,config:s,state:{hasAxis:l},$el:c}=i;if(t){const at=o.get(Ue.svgLeft);if(at!==null)return at}const u=s.axis_rotated,f=u||!u&&!s.axis_y_inner,d=u?Rn.axisX:Rn.axisY,h=c.main.select(`.${d}`).node(),m=l&&s[`axis_${u?"x":"y"}_label`],I=l&&(Ke(m)||Ke(m.text)||/^inner-/.test(m==null?void 0:m.position))?c.main.select(`.${d}-label`):null,C=I&&!I.empty()?I.node():null,P=!t,z={label:C?un(C,P):null,leftAxis:h&&f?un(h,P):null,chart:un(c.chart.node(),P)},N=(n=(e=z.label)==null?void 0:e.left)!=null?n:0,B=(r=z.leftAxis)!=null?r:{right:0},W=z.chart.left+N,V=i.hasArcType(),J=B.right-W-(V?0:i.getCurrentPaddingByDirection("left",t)),q=J>0?J:0;return o.add(Ue.svgLeft,q),q},updateDimension(t){var e,n;const r=this,{config:i,state:{hasAxis:o,isCanvasMode:s},$el:l}=r;if(o&&!t&&r.axis.x&&i.axis_rotated&&((e=r.axis.subX)==null||e.create(l.axis.subX)),r.updateScales(t),s){(n=r.resizeCanvas)==null||n.call(r);return}r.updateSvgSize(),r.transformAll(!1)},updateSvgSize(){var t;const e=this,{config:n,state:{clip:r,current:i,hasAxis:o,width:s,height:l},$el:{svg:c}}=e;if(!c){(t=e.resizeCanvas)==null||t.call(e);return}if(n.resize_auto==="viewBox"?c.attr("viewBox",`0 0 ${i.width} ${i.height}`):c.attr("width",i.width).attr("height",i.height),o){const u=c.select(`.${Wd.brush} .overlay`),f={width:0,height:0};u.size()&&(f.width=+u.attr("width"),f.height=+u.attr("height")),c.selectAll([`#${r.id}`,`#${r.idGrid}`]).select("rect").attr("width",s).attr("height",l),c.select(`#${r.idXAxis}`).select("rect").call(e.setXAxisClipPath.bind(e)),c.select(`#${r.idYAxis}`).select("rect").call(e.setYAxisClipPath.bind(e)),r.idSubchart&&c.select(`#${r.idSubchart}`).select("rect").attr("width",s).attr("height",f.height)}},getCurrentPaddingByDirection(t,e=!1,n=!1){var r;const i=this,{config:o,$el:s,state:{hasAxis:l,isCanvasMode:c}}=i,u=o.axis_rotated,f=((r=o.padding)==null?void 0:r.mode)==="fit",d=ge(o[`padding_${t}`])?o[`padding_${t}`]:void 0,h=l?{top:u?"y2":null,bottom:u?"y":"x",left:u?"x":"y",right:u?null:"y2"}[t]:null,m=/^(left|right)$/.test(t),A=h&&o[`axis_${h}_inner`],I=h&&o[`axis_${h}_show`],C=h?o[`axis_${h}_axes`].length:0;let P=h?m?i.getAxisWidthByAxisId(h,e):i.getHorizontalAxisHeight(h):0;const z=20;let N=0;!f&&m&&(P=Ux(P));let B=l&&m&&(A||xn(d)&&!I)?0:f?(I?P:0)+(d!=null?d:0):xn(d)?P:d;return m&&l?(h&&(f||A)&&o[`axis_${h}_label`].text&&(B+=i.axis.getAxisLabelPosition(h).isOuter?z:0),t==="right"?(B+=u?!f&&xn(d)?10:2:!I||A?f?2:1:0,B+=n?i.axis.getXAxisTickTextY2Overflow(z):0):t==="left"&&u&&xn(d)&&(B=o.axis_x_show?f?P:Math.max(P,40):1)):t==="top"?((s.title&&s.title.node()||c&&o.title_text)&&(B+=i.getTitlePadding()),N=u&&!A?C:0):t==="bottom"&&l&&u&&!I&&(B+=1),B+P*C-N},getCurrentPadding(t=!1){const e=this,[n,r,i,o]=["top","bottom","left","right"].map(s=>e.getCurrentPaddingByDirection(s,null,t));return{top:n,bottom:r,left:i,right:o}},getResettedPadding(t){const e=this,{config:n}=e,r=ge(t);let i=r?0:{};return n.padding===!1?!r&&Object.keys(t).forEach(o=>{i[o]=!lr(n.data_labels)&&n.data_labels!==!1&&o==="top"?t[o]:0}):i=t,i},updateSizes(t){var e,n,r,i,o;const s=this,{config:l,state:c,$el:{legend:u}}=s,f=l.axis_rotated,d=s.hasArcType()||c.hasFunnel||c.hasTreemap,h=((e=l.padding)==null?void 0:e.mode)==="fit";!t&&s.setContainerSize();const m=u?s.getLegendWidth():0,A=u?s.getLegendHeight():0,I={width:m,height:A};!d&&l.axis_x_show&&l.axis_x_tick_autorotate&&s.updateXAxisTickClip();const C={right:l.legend_show&&c.isLegendRight?m+(h?0:20):0,bottom:!l.legend_show||c.isLegendRight||c.isLegendInset?0:A},P=f||d?0:s.getHorizontalAxisHeight("x"),z=l.subchart_axis_x_show&&l.subchart_axis_x_tick_text_show?P:30,N=l.subchart_show&&!d?l.subchart_size_height+z:0,B=s.hasType("gauge")&&l.arc_needle_show&&!l.gauge_fullCircle&&!l.gauge_label_show?10:0,W=s.getCurrentPadding(!0);if(c.margin=!d&&f?{top:W.top,right:d?0:W.right+C.right,bottom:C.bottom+W.bottom,left:N+(d?0:W.left)}:{top:(h?0:4)+W.top,right:d?0:W.right+C.right,bottom:B+N+C.bottom+W.bottom,left:d?0:W.left},c.margin=s.getResettedPadding(c.margin),c.margin2=f?{top:c.margin.top,right:NaN,bottom:20+C.bottom,left:s.state.rotatedPadding.left}:{top:c.current.height-N-C.bottom,right:NaN,bottom:z+C.bottom,left:c.margin.left},c.margin3={top:0,right:NaN,bottom:0,left:0},(n=s.updateSizeForLegend)==null||n.call(s,I),c.width=c.current.width-c.margin.left-c.margin.right,c.height=c.current.height-c.margin.top-c.margin.bottom,c.width<0&&(c.width=0),c.height<0&&(c.height=0),c.width2=f?c.margin.left-c.rotatedPadding.left-c.rotatedPadding.right:c.width,c.height2=f?c.height:c.current.height-c.margin2.top-c.margin2.bottom,c.width2<0&&(c.width2=0),c.height2<0&&(c.height2=0),s.hasArcType()){const V=s.hasType("gauge"),J=l.legend_show&&c.isLegendRight,q=(r=c.hasRadar&&s.cache.get(Ue.radarTextWidth))!=null?r:0;c.arcWidth=c.width-(J?I.width+10:0)-q,c.arcHeight=c.height-(J&&!V?0:10),(i=l.arc_rangeText_values)!=null&&i.length&&(V?(c.arcWidth-=25,c.arcHeight-=10,c.margin.left+=10):(c.arcHeight-=20,c.margin.top+=10)),V&&!l.gauge_fullCircle&&(c.arcHeight+=c.height-s.getPaddingBottomForGauge()),(o=s.updateRadius)==null||o.call(s)}c.isLegendRight&&d&&(c.margin3.left=c.arcWidth/2+c.radiusExpanded*1.1)}},zS={setCssRule(t,e,n,r){const i=this,{config:o,state:{cssRule:s,style:l}}=i;return o.boost_useCssRule?c=>{c.each(u=>{const f=r&&(r==null?void 0:r.call(i,u)),d=`${t?`.${bn.shapes+i.getTargetSelectorSuffix(u.id)}`:""}${e}`;e in s&&l.sheet.deleteRule(s[d]),i.state.cssRule[d]=f1(l,d,n.filter(Boolean).map(h=>Ke(f)&&h.indexOf(":")===-1?`${h}: ${f}`:h||""))})}:()=>{}},getStylePropValue(t){const{config:{boost_useCssRule:e}}=this;return e?null:le(t)?t.bind(this):t}};function Yh(t){return typeof t=="string"?new vt([document.querySelectorAll(t)],[document.documentElement]):new vt([b(t)],At)}function US(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function kS(t,e,n,r,i){var o;const s=this,{value:l}=t,c=s.isCandlestickType(t),u=ge(l)&&l<0||c&&!((o=s.getCandlestickData(t))!=null&&o._isUp);let{x:f,y:d}=e;const h=4,m=h*2;return r?n==="start"?(f+=u?0:m,d+=h):n==="middle"?(f+=m,d-=m):n==="end"&&(u&&(f-=m),d+=h):(n==="start"?(f+=h,u&&(d+=m*2)):n==="middle"?d-=m:n==="end"&&(f-=h,u&&(d+=m*2)),i&&(d+=u?-17:c?13:7)),{x:f,y:d}}function Kh(t,e){var n;const r=this.config.data_labels_position,{id:i,index:o,value:s}=t;return(n=le(r)?r.bind(this.api)(e,s,i,o,this.$el.text):(i in r?r[i]:r)[e])!=null?n:0}function XS(t,e,n){var r,i;const o=this,{config:s,$T:l}=o,c=s.axis_rotated,{border:{padding:u="3 5",radius:f=10,stroke:d="#000",strokeWidth:h=1,fill:m="none"}}=s.data_labels,A=Rf(u),I=s.data_labels.border!==!0,C=ga(t);let P=kt(t.previousElementSibling);(P.empty()||((r=P.node())==null?void 0:r.tagName)!=="rect"||!((i=P.attr("class"))!=null&&i.includes(n)))&&(P=kt(t.parentNode).insert("rect",()=>t).attr("class",`${En.textBorderRect} ${n}`).attr("width",C.width+(I?A.left+A.right:0)).attr("height",C.height+(I?A.top+A.bottom:0)),I&&P.style("fill",m).style("stroke",d).style("stroke-width",`${h}px`).attr("rx",f).attr("ry",f)),l(P).attr("x",e.x-(I?A.left:0)-(c?0:C.width/2)).attr("y",e.y-(I?A.top:0)-C.height/4*3.2)}function $c(t=0,e){const n=this,{config:r}=n,i=r[`${e}_label_threshold`]||0;return t>=i}function Zh(){const t=this,{$el:{text:e},config:n}=t;(t.state.arcWidth?t.getArcLabelConfig("image"):n.data_labels.image)&&e.filter(function(){const i=this.previousElementSibling;return i?i.tagName!=="image"||!i.classList.contains(En.textLabelImage):!0}).each(function(i){var o,s,l,c;const u=GS.call(t,i);if(!u)return;const{url:f,width:d,height:h,pos:m}=u;if(f){const A=kt(this.parentNode);A==null||A.insert("image",`${(s=(o=this.getAttribute("class"))==null?void 0:o.replace(/(?:^(.)|\s)/g,".$1"))!=null?s:"text"}`).style("opacity","0").attr("href",I=>Ra(f,{ID:"id"in I?I.id:I.data.id})).attr("class",En.textLabelImage).style("pointer-events","none").attr("width",d).attr("height",h).attr("transform",m?`translate(${(l=m.x)!=null?l:0} ${(c=m.y)!=null?c:0})`:null)}})}function GS(t){var e;const n=this,{config:r,state:i}=n,o=i.arcWidth?n.getArcLabelConfig("image"):r.data_labels.image;if(le(o))return(e=o.call(n.api,t.value,t.id,t.index))!=null?e:{url:"",width:0,height:0,pos:{x:0,y:0}};if(o){const{url:s="",width:l=0,height:c=0,pos:u}=o;return{url:s,width:l,height:c,pos:u}}return null}function Jh(t,e,n){var r;const i=this,{config:o,state:{arcWidth:s,hasTreemap:l}}=i,c=o.axis_rotated,u=kt(t.previousElementSibling),f=d=>{var h;const m=d.style.opacity!=="0"&&d.style.fillOpacity!=="0";return(s?d.textContent:m)&&((h=this.previousElementSibling)==null?void 0:h.tagName)!=="image"};if(!u.empty()&&((r=u.node())==null?void 0:r.tagName)==="image"){const d=n||un(t),h=+u.attr("width")/2,m=+u.attr("height")/2;let A=e.x-h,I=e.y-m-d.height/2;c?e.x+=h:(l&&(A=-h,I=-(m*2+d.height)),i.hasType("pie")||i.hasType("polar")||(e.y+=m)),i.$T(u).style("opacity",f(t)?null:"0").attr("x",A).attr("y",I)}}function WS(t){return Pf(t,e=>e,e=>ga(e,!0))}var VS={opacityForText(t){const e=this;return e.isBarType(t)&&!$c.call(e,Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel()?null:"0"},initText(){const{$el:t}=this;t.main.select(`.${ze.chart}`).append("g").attr("class",En.chartTexts).style("pointer-events",t.funnel||t.treemap?"none":null)},updateTargetsForText(t){const e=this,n=e.getChartClass("Text"),r=e.getClass("texts","id"),i=e.classFocus.bind(e);e.$el.main.select(`.${En.chartTexts}`).selectAll(`.${En.chartText}`).data(e.filterNullish(t)).attr("class",l=>`${n(l)}${i(l)}`.trim()).enter().append("g").style("opacity","0").attr("class",n).call(e.setCssRule(!0,` .${En.text}`,["fill","pointer-events:none"],e.updateTextColor)).append("g").attr("class",r)},updateText(){const t=this,{$el:e,$T:n,config:r,axis:i}=t,o=t.getClass("text","index"),s=r.data_labels.centered,l=e.main.selectAll(`.${En.texts}`).selectAll(`.${En.text}`).data(t.labelishData.bind(t));n(l.exit()).style("fill-opacity","0").remove(),e.text=l.enter().append("text").merge(l).attr("class",o).attr("text-anchor",c=>{let f=r[`axis_${i==null?void 0:i.getId(c.id)}_inverted`]?c.value>0:c.value<0;if(t.isCandlestickType(c)){const d=t.getCandlestickData(c);f=!(d!=null&&d._isUp)}else if(t.isTreemapType(c))return s?"middle":"start";return r.axis_rotated?f?"end":"start":"middle"}).style("fill",t.getStylePropValue(t.updateTextColor)).style("fill-opacity","0").each(function(c,u,f){const d=kt(this);let{value:h}=c;if(t.isBubbleZType(c))h=t.getBubbleZData(h,"z");else if(t.isCandlestickType(c)){const m=t.getCandlestickData(c);m&&(h=m.close)}h=t.isTreemapType(c)?t.treemapDataLabelFormat(c)(d):t.dataLabelFormat(c.id)(h,c.id,c.index,f),ge(h)?this.textContent=h:ii(d,h,void 0,!0)}),Zh.call(t)},updateTextColor(t){const e=this,{config:n}=e,r=n.data_labels_colors,i=e.isArcType(t)&&!e.isRadarType(t)||e.isFunnelType(t)||e.isTreemapType(t)?null:e.color(t);let o;if(Ke(r))o=r;else if(je(r)){const{id:s}=t.data||t;o=r[s]}else le(r)&&(o=r.bind(e.api)(i,t));if(e.isCandlestickType(t)&&!le(r)){const s=e.getCandlestickData(t);if(!(s!=null&&s._isUp)){const l=n.candlestick_color_down;o=je(l)?l[t.id]:l}}return o||i},updateTextBGColor(t,e){const n=this,{$el:{defs:r}}=n;let i="";if(e){const o=Ke(e)?"":n.getTargetSelectorSuffix("id"in t?t.id:t.data.id),s=r.select(["filter[id*='labels-bg","']"].join(o));if(s.size()&&(i=`url(#${s.attr("id")})`),le(e)){n.generateTextBGColorFilter(e);const l=n.color(t),c=e.bind(n.api)(l,t);c?s.select("feFlood").attr("flood-color",c):i=""}}return i||null},redrawText(t,e,n,r){const i=this,{$T:o,axis:s,config:l,state:{hasTreemap:c}}=i,u=Rr(!0),f=l.axis_rotated,d=l.data_labels.rotate,h=US(d),m=d?`rotate(${d})`:"",A=i.$el.text.style("fill",i.getStylePropValue(i.updateTextColor)).attr("filter",P=>i.updateTextBGColor.bind(i)(P,l.data_labels_backgroundColors)).style("fill-opacity",n?0:i.opacityForText.bind(i)),I=new Map,C=[];return A.each(function(P){const z=this;I.set(z,{rect:un(z)}),l.data_labels.centered&&(i.isBarType(P)||i.isTreemapType(P))&&C.push(z)}),C.length>0&&WS(C).forEach((P,z)=>{const N=I.get(z);N&&(N.bbox=P)}),A.each(function(P,z){const N=I.get(this),B=o(c&&this.childElementCount?this.parentNode:this,!!(r&&(this.getAttribute("x")||this.getAttribute("transform"))),u),W=l[`axis_${s==null?void 0:s.getId(P.id)}_inverted`];let V={x:t.call(this,P,z,N),y:e.call(this,P,z,N)};d&&(V=kS.bind(i)(P,V,h,f,W),B.attr("text-anchor",h)),Jh.call(i,this,V,N==null?void 0:N.rect),this.childElementCount||d?B.attr("transform",`translate(${V.x} ${V.y}) ${m}`):B.attr("x",V.x).attr("y",V.y),l.data_labels.border&&XS.call(i,B.node(),V,`${En.textBorderRect}-${z}`)}),!0},getTextRect(t,e){var n,r;const i=this;let o,s,l;Array.isArray(t)?o=`${Ue.textRect}-${t.join("_")}`:(s=(r=(n=t.node)==null?void 0:n.call(t))!=null?r:t,/text/i.test(s.tagName)||(s=s.querySelector("text")),l=s.textContent,o=`${Ue.textRect}-${l.replace(/\W/g,"_")}`);const c=i.cache.get(o)||[];return c.length===0&&((i.$el.svg||i.$el.chart.select("svg")).selectAll(`.${ze.dummy}`).data(l?[l]:t).enter().append("text").style("visibility","hidden").style("font",s?kt(s).style("font"):null).classed(e||ze.dummy,!0).text(u=>u).each(function(u,f){c[f]=un(this)}).remove(),i.cache.add(o,c)),c.length>1?c:c[0]},generateXYForText(t,e){const n=this,{state:{hasRadar:r,hasFunnel:i,hasTreemap:o}}=n,s=Object.keys(t),l={},c=e?n.getXForText:n.getYForText;return i&&s.push("funnel"),r&&s.push("radar"),o&&s.push("treemap"),s.forEach(u=>{l[u]=n[`generateGet${$n(u)}Points`](t[u],!1)}),function(u,f,d){const h=n.isAreaType(u)&&"area"||n.isBarType(u)&&"bar"||n.isCandlestickType(u)&&"candlestick"||n.isFunnelType(u)&&"funnel"||n.isRadarType(u)&&"radar"||n.isTreemapType(u)&&"treemap"||"line";return c.call(n,l[h](u,f),u,this,d)}},getCenteredTextPos(t,e,n,r,i){const o=this,{config:s}=o,l=s.axis_rotated,c=o.isBarType(t),u=o.isTreemapType(t);if(s.data_labels.centered&&(c||u)){const f=(i==null?void 0:i.bbox)||ga(n);if(c){const d=o.getRangedData(t,null,"bar")>=0;if(l){const h=(d?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+f.width/2;return d?-h-3:h+2}else{const h=(d?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+f.height/2;return d?h:-h-2}}else if(u)return r==="x"?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2-f.y-f.height/2}return 0},getXForText(t,e,n,r){var i,o,s;const l=this,{config:c}=l,u=c.axis_rotated,f=l.isFunnelType(e),d=l.isTreemapType(e);let h=t?t[0][0]:0;if(l.isCandlestickType(e))u?h=(i=l.getCandlestickData(e))!=null&&i._isUp?t[2][2]+4:t[2][1]-4:h+=(t[1][0]-h)/2;else if(f)if(t)h=(s=(o=t[2])==null?void 0:o[0])!=null?s:h;else return uc(n,"x");else if(d)h+=c.data_labels.centered?0:5;else if(u){const m=c[`axis_${l.axis.getId(e.id)}_inverted`],A=l.isBarType(e)?4:6,I=e.value;h=t[2][1],h+=A*((m?I>0:I<0)?-1:1)}else h=l.hasType("bar")?(t[2][0]+t[0][0])/2:h;return(u||d||f)&&(h+=l.getCenteredTextPos(e,t,n,"x",r)),h+Kh.call(this,e,"x")},getYForText(t,e,n,r){var i,o;const s=this,{axis:l,config:c,state:u}=s,f=c.axis_rotated,d=c[`axis_${l==null?void 0:l.getId(e.id)}_inverted`],h=s.isBarType(e),m=s.isFunnelType(e),A=s.isTreemapType(e),I=c.point_r,C=(r==null?void 0:r.rect)||un(n);let{value:P}=e,z=3,N;if(s.isCandlestickType(e))P=s.getCandlestickData(e),f?(N=t[0][0],N+=(t[1][0]-N)/2+z):(N=P&&P._isUp?t[2][2]-z:t[2][1]+z*4,d&&(N+=15*(P._isUp?1:-1)));else if(m)if(t)N=((o=(i=t[2])==null?void 0:i[1])!=null?o:t[0][1])+C.height/2-3;else return uc(n,"y");else if(A)N=t[0][1]+(c.data_labels.centered?0:C.height+5);else if(f)N=(t[0][0]+t[2][0]+C.height*.6)/2;else if(N=t[2][1],ge(I)&&I>5&&(s.isLineType(e)||s.isScatterType(e))&&(z+=c.point_r/2.3),P<0||P===0&&!u.hasPositiveValue&&u.hasNegativeValue)N+=d?h?-3:-5:C.height+(h?-z:z);else{let B=-z*2;h?B=-z:s.isBubbleType(e)&&(B=z),d&&(B=h?10:15),N+=B}return(!f||A)&&(N+=s.getCenteredTextPos(e,t,n,"y",r)),N+Kh.call(this,e,"y")},markOverlapped(t,e,n){const r=e.$el.arcs.selectAll(n),i=r.filter(c=>c.data.id!==t),o=r.filter(c=>c.data.id===t),s=cc(o.node()),l=(c,u)=>Math.sqrt(c*c+u*u);o.node()&&i.each(function(){const c=cc(this),u=kt(this),f=l(s.e,s.f)>l(c.e,c.f)?o:u,d=Math.ceil(Math.abs(s.e-c.e))<Math.ceil(f.node().getComputedTextLength()),h=Math.ceil(Math.abs(s.f-c.f))<parseInt(o.style("font-size"),10);u.classed(En.TextOverlapping,d&&h)})},undoMarkOverlapped(t,e){t.$el.arcs.selectAll(e).each(function(){Yh([this,this.previousSibling]).classed(En.TextOverlapping,!1)})}};function Qh(t="left",e){const n=ge(e);return t.includes("center")?n?e/2:"middle":t.includes("right")?n?e:"end":n?0:"start"}function jS(t){var e,n,r,i,o,s,l,c;const{config:u,$el:f}=t,d=((r=(n=(e=t.canvasTheme)==null?void 0:e.style)==null?void 0:n.title)==null?void 0:r.font)||((s=(o=(i=t.canvasTheme)==null?void 0:i.style)==null?void 0:o.label)==null?void 0:s.font)||"14px sans-serif",h=(c=(l=f.chart)==null?void 0:l.node)==null?void 0:c.call(l),m=h==null?void 0:h.ownerDocument;if(h&&m&&u.title_text){const A=m.createElementNS("http://www.w3.org/2000/svg","svg"),I=m.createElementNS("http://www.w3.org/2000/svg","text");A.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",I.setAttribute("class",En.title),I.style.font=d,I.textContent=String(u.title_text),A.appendChild(I),h.appendChild(A);const C=un(I).height;if(A.remove(),C)return C}return u.title_text?parseFloat(d)||14:0}var HS={initTitle(){const t=this,{config:e,$el:n}=t;if(e.title_text){n.title=n.svg.append("g");const r=n.title.append("text").style("text-anchor",Qh(e.title_position)).attr("class",En.title);ii(r,e.title_text,[.3,1.5])}},redrawTitle(){const t=this,{config:e,state:{current:n},$el:{title:r}}=t;if(r){const i=Qh(e.title_position,n.width),o=(e.title_padding.top||0)+t.getTextRect(t.$el.title,En.title).height;r.attr("transform",`translate(${i}, ${o})`)}},getCanvasTitleHeight(){return jS(this)},getTitlePadding(){const t=this,{$el:{title:e},config:n,state:r}=t,i=n.title_padding.top||0,o=n.title_padding.bottom||0;if(r.isCanvasMode&&n.title_text)return i+t.getCanvasTitleHeight()+o;if(!(e!=null&&e.node()))return i+o;const s=e.node(),l=uc(s,"y");if(l){const c=ga(s);return l+c.y+c.height+o}return i+t.getTextRect(e,En.title).height+o}};const YS=/(\r?\n|\t)/g,KS=/{{(.*)}}/;var ZS={initTooltip(){const t=this,{config:e,$el:n}=t;n.tooltip=kt(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",is.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip(){var t;const e=this,{config:n,$el:r,state:{hasAxis:i,hasRadar:o}}=e;if(n.tooltip_init_show){const s=!(i||o);(t=e.axis)!=null&&t.isTimeSeries()&&Ke(n.tooltip_init_x)&&(n.tooltip_init_x=Hn.call(e,n.tooltip_init_x)),e.api.tooltip.show({data:{[s?"index":"x"]:n.tooltip_init_x}});const l=n.tooltip_init_position;if(!n.tooltip_contents.bindto&&!lr(l)){const{top:c=0,left:u=50}=l;r.tooltip.style("top",Ke(c)?c:`${c}px`).style("left",Ke(u)?u:`${u}px`).style("display",null)}}},getTooltipHTML(...t){const e=this,{api:n,config:r}=e;return Xr(le(r.tooltip_contents)?r.tooltip_contents.bind(n)(...t):e.getTooltipContent(...t))},getTooltipContent(t,e,n,r){var i;const o=this,{api:s,config:l,state:c,$el:u}=o,f=l.tooltip_format_title,d=l.tooltip_format_name,h=l.tooltip_format_value,m=le(f)?f.bind(s):e,A=le(d)?d.bind(s):(_=>_),I=le(h)?h.bind(s):null,C=(_,dt,ut,xt)=>{let bt=I;return bt||(c.hasTreemap||o.isStackNormalized()&&(!o.isStackNormalizedPerGroup()||o.isGrouped(ut))?bt=(Rt,Et)=>`${(Et*100).toFixed(2)}%`:bt=n),bt(_,dt,ut,xt)},P=l.tooltip_order,z=_=>o.axis&&o.isBubbleZType(_)?o.getBubbleZData(_.value,"z"):o.getBaseValue(_),N=o.levelColor?_=>o.levelColor(_.value):_=>r(_),B=l.tooltip_contents,W=B.template,V=o.mapToTargetIds();if(P===null&&l.data_groups.length){const _=o.orderTargets(o.data.targets).map(dt=>dt.id).reverse();t.sort((dt,ut)=>{let xt=dt?dt.value:null,bt=ut?ut.value:null;return xt>0&&bt>0&&(xt=dt.id?_.indexOf(dt.id):null,bt=ut.id?_.indexOf(ut.id):null),xt-bt})}else if(/^(asc|desc)$/.test(P)){const _=P==="asc";t.sort((dt,ut)=>{const xt=dt?z(dt):null,bt=ut?z(ut):null;return _?xt-bt:bt-xt})}else le(P)&&t.sort(P.bind(s));const J=o.getTooltipContentTemplate(W),q=t.length;let at,et,ot,lt,ft;for(ft=0;ft<q;ft++){et=t[ft];const _=et&&z(et);if(!(!et||!(_||_===0))){if(xn(at)){const dt=(c.hasAxis||c.hasRadar)&&m(et.x);at=Ra(J[0],{CLASS_TOOLTIP:is.tooltip,TITLE:We(dt)?W?dt:`<tr><th colspan="2">${dt}</th></tr>`:""})}if(!et.ratio&&u.arcs&&(ot=["arc",o.$el.arcs.select(`path.${Ye.arc}-${et.id}`).data()[0]],et.ratio=o.getRatio(...ot)),ot=[et.ratio,et.id,et.index],o.isAreaRangeType(et)){const[dt,ut]=["high","low"].map(bt=>C(o.getRangedData(et,bt),...ot));lt=`<b>Mid:</b> ${C(z(et),...ot)} <b>High:</b> ${dt} <b>Low:</b> ${ut}`}else if(o.isCandlestickType(et)){const[dt,ut,xt,bt,Rt]=["open","high","low","close","volume"].map(Et=>o.getRangedData(et,Et,"candlestick")?C(o.getRangedData(et,Et,"candlestick"),...ot):void 0);lt=`<b>Open:</b> ${dt} <b>High:</b> ${ut} <b>Low:</b> ${xt} <b>Close:</b> ${bt}${Rt?` <b>Volume:</b> ${Rt}`:""}`}else if(o.isBarRangeType(et)){const{value:dt,id:ut,index:xt}=et;lt=`${C(dt,void 0,ut,xt)}`}else lt=C(z(et),...ot);if(lt!==void 0){if(et.name===null)continue;const dt=A((i=et.name)!=null?i:et.id,...ot),ut=N(et),xt={CLASS_TOOLTIP_NAME:is.tooltipName+o.getTargetSelectorSuffix(et.id),COLOR:W||!o.patterns?ut:`<svg><rect style="fill:${ut}" width="10" height="10"></rect></svg>`,NAME:dt,VALUE:lt};if(W&&je(B.text)){const bt=V.indexOf(et.id);Object.keys(B.text).forEach(Rt=>{xt[Rt]=B.text[Rt][bt]})}at+=Ra(J[1],xt)}}}return`${at}</table>`},getTooltipContentTemplate(t){return(t||`<table class="{=CLASS_TOOLTIP}"><tbody>
|
|
45
|
+
`),s=r?o.length-1:1;t.html(""),o.forEach((l,c)=>{t.append("tspan").attr("x",0).attr("dy",`${c===0?n[0]*s:n[1]}em`).text(l)})}}}function bh(t){const{x:e,y:n,width:r,height:i}=ya(t,!0);return[{x:e,y:n+i},{x:e,y:n},{x:e+r,y:n},{x:e+r,y:n+i}]}function Sh(t){const{width:e,height:n}=cn(t),r=bh(t),i=r[0].x,o=Math.min(r[0].y,r[1].y);return{x:i,y:o,width:e,height:n}}function er(t,e){var n;const r=t&&((n=t.touches||t.sourceEvent&&t.sourceEvent.touches)==null?void 0:n[0]);let i=[0,0];try{i=gr(r||t,e)}catch(o){}return i.map(o=>isNaN(o)?0:o)}function cn(t,e=!1){return Th(!0,t,e)}function ya(t,e=!1){return Th(!1,t,e)}function k1(t,e,n){const{rootSelector:r="",sheet:i}=t,o=`${r} ${U1(e)} {${n.join(";")}}`;return i[i.insertRule?"insertRule":"addRule"](o,i.cssRules.length)}function G1(t){let e=[];return t.forEach(n=>{var r;try{n.cssRules&&n.cssRules.length&&(e=e.concat(La(n.cssRules)))}catch(i){(r=fe.console)==null||r.warn(`Error while reading rules from ${n.href}: ${String(i)}`)}}),e}function Ah(t){var e,n,r,i,o,s;return{x:((n=(e=fe.pageXOffset)!=null?e:fe.scrollX)!=null?n:0)+((r=t.scrollLeft)!=null?r:0),y:((o=(i=fe.pageYOffset)!=null?i:fe.scrollY)!=null?o:0)+((s=t.scrollTop)!=null?s:0)}}function vs(t,e=0,n=0,r=!0){const i=new DOMPoint(e,n),o=t.getScreenCTM(),s=i.matrixTransform(r?o==null?void 0:o.inverse():o);if(r===!1){const l=cn(t);s.x-=l.x,s.y-=l.y}return s}function Tc(t){const e=t?t.transform:null,n=e&&e.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function bc(t,e){var n;const r=(n=t==null?void 0:t.getAttribute)==null?void 0:n.call(t,e);if(r)return parseFloat(r);const i=Tc(t);return e==="x"?i.e:i.f}function Sc(t){const e=t.attr("viewBox");return e?e.trim().split(/[\s,]+/).length===4:!1}function X1(t,e,n=!1){const r=!!t.node;let i=!1;for(const[o,s]of Object.entries(e))if(i=r?t.style(o)===s:t.style[o]===s,n?!i:i)break;return i}function ro(){var t,e;return((t=Ze)==null?void 0:t.hidden)===!1||((e=Ze)==null?void 0:e.visibilityState)==="visible"}function W1(t,e){const{DocumentTouch:n,matchMedia:r,navigator:i}=fe,o=r==null?void 0:r("(pointer:coarse)").matches;let s=!1;if(e)if(i&&"maxTouchPoints"in i)s=i.maxTouchPoints>0;else if("ontouchmove"in fe||n&&Ze instanceof n)s=!0;else if(o)s=!0;else{const c=i.userAgent;s=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return t&&!o&&(r==null?void 0:r("(pointer:fine)").matches)&&"mouse"||s&&"touch"||"mouse"}function Eh(t,e){t.pendingRaf!==null?(fe.cancelAnimationFrame(t.pendingRaf),t.pendingRaf=fe.requestAnimationFrame(()=>{t.pendingRaf=null,e()})):(t.pendingRaf=fe.requestAnimationFrame(()=>{t.pendingRaf=null}),e())}const Ac={mouse:(()=>{const t=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(e,n,r=t())=>{e.dispatchEvent(new MouseEvent(n,r))}}catch(e){return(n,r,i=t())=>{const o=Ze.createEvent("MouseEvent");o.initMouseEvent(r,i.bubbles,i.cancelable,fe,0,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(o)}}})(),touch:(t,e,n)=>{const r=new Touch(Kr({identifier:Date.now(),target:t,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));t.dispatchEvent(new TouchEvent(e,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[r],targetTouches:[],changedTouches:[r]}))}},{setTimeout:V1,clearTimeout:j1}=fe;function H1(t){const e=[];let n;const r=function(){r.clear(),t===!1?n=Mf(()=>{n=null,e.forEach(i=>i())},{timeout:200}):n=V1(()=>{n=null,e.forEach(i=>i())},le(t)?t:200)};return r.clear=()=>{n&&((t===!1?xy:j1)(n),n=null)},r.add=i=>e.push(i),r.remove=i=>{const o=e.indexOf(i);o!==-1&&e.splice(o,1)},r}function Ch(){let t=[];const e=function(n,r){function i(){var o;let s=0;for(let l=0,c;c=t[l];l++){if(c===!0||(o=c.empty)!=null&&o.call(c)){s++;continue}if(ro()===!1){s=t.length;break}try{c.transition()}catch(u){s++}}return s===t.length}kf(()=>{r==null||r()},i)};return e.add=function(n){en(n)?t=t.concat(n):t.push(n)},e}const Br={},ps=new Set,ka=new Map,Y1=5e3,Ih=3;let K1=0;function Z1(){try{return"var bbWorker=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e){let t=[];return e.forEach(function(e,n){let r=e[0];e.forEach(function(e,i){if(i>0){if(t[i-1]===void 0&&(t[i-1]={}),e===void 0)throw Error(`Source data is missing a component at (${n}, ${i})!`);t[i-1][r]=e}})}),t}function n(e){let t=e[0],n=[];return e.forEach(function(e,r){if(r>0){let i={};e.forEach(function(e,n){if(e===void 0)throw Error(`Source data is missing a component at (${r}, ${n})!`);i[t[n]]=e}),n.push(i)}}),n}function r(e,r){let i=[],a,o;if(Array.isArray(e)){let t=function(e,t){if(e[t]!==void 0)return e[t];let n=t.replace(/\\[(\\w+)\\]/g,`.$1`).replace(/^\\./,``).split(`.`),r=e;return n.some(function(e){return!(r=r&&typeof r==`object`&&e in r?r[e]:void 0)}),r};a=r.x?r.value.concat(r.x):r.value,i.push(a),e.forEach(function(e){let n=a.map(function(n){let r=t(e,n);return r===void 0&&(r=null),r});i.push(n)}),o=n(i)}else Object.keys(e).forEach(function(t){let n=[].concat(e[t]);n.unshift?.(t),i.push(n)}),o=t(i);return o}let i={columns:t,json:r,rows:n},a=self;function o({data:e}){let{args:t,id:n,op:r}=e;try{let e=i[r];if(!e)throw Error(`Unknown worker op: ${r}`);a.postMessage({id:n,result:e(...t)})}catch(e){a.postMessage({id:n,error:e&&(e.message||e.name)||String(e)})}}return typeof window>`u`&&(a.onmessage=o),e.handleMessage=o,e.ops=i,e})({});"}catch(t){return""}}function Ec(){const{Blob:t,Worker:e,URL:n}=fe;return e&&t&&(n!=null&&n.createObjectURL)&&(n!=null&&n.revokeObjectURL)?{Blob:t,Worker:e,URL:n}:null}function Rh(){return fe.Worker||null}function J1(t){var e,n;return typeof t=="number"?{timeout:t,workerUrl:""}:{timeout:(e=t==null?void 0:t.timeout)!=null?e:Y1,workerUrl:(n=t==null?void 0:t.workerUrl)!=null?n:""}}function wh(t,e=!1){var n,r;const i=Br[t];e&&ps.add(t),i&&((n=i.worker)==null||n.terminate(),i.revoke&&((r=Ec())==null||r.URL.revokeObjectURL(i.src)),delete Br[t]);for(const o of ka.keys())o.startsWith(`${t}:`)&&ka.delete(o)}function Q1(t,e){if(t===e)return!0;try{return JSON.stringify(t)===JSON.stringify(e)}catch(n){return!0}}function _1(t){const[e,...n]=t;return Array.isArray(e)?[e.slice(0,Ih).map(r=>Array.isArray(r)?r.slice(0,Ih+1):r),...n]:t}function Oh(t,e,n,r){const i=++K1;let o=!1,s;const l=new Promise((c,u)=>{const f=(S,E)=>{o||(o=!0,s(),S(E))},d=function(S){var E;((E=S.data)==null?void 0:E.id)===i&&(S.data.error?f(u,new Error(S.data.error)):f(c,S.data.result))},h=function(){f(u,new Error("worker error"))},m=setTimeout(()=>f(u,new Error("worker timeout")),r);s=()=>{clearTimeout(m),t.removeEventListener("message",d),t.removeEventListener("error",h)},t.addEventListener("message",d),t.addEventListener("error",h)});try{t.postMessage({args:n,id:i,op:e})}catch(c){throw o=!0,s(),c}return l}function q1(t,e,n,r,i,o){const s=_1(i),l=Oh(t,n,s,o).then(c=>Q1(c,r(...s)),()=>!1).then(c=>(c?ka.set(e,!0):ka.delete(e),c));return ka.set(e,l),l}function tb(t,e=""){const n=!!Rh(),r=e?null:Ec(),i=e?"":Z1(),o=e||"blob";if(!n||!e&&(!r||!i)||ps.has(o))return null;if(!(o in Br))try{if(e)Br[o]={revoke:!1,src:e,worker:null};else if(r){const s=new r.Blob([i],{type:"text/javascript"});Br[o]={revoke:!0,src:r.URL.createObjectURL(s),worker:null}}}catch(s){return null}return{key:o,src:Br[o].src}}function eb(t,e){const n=Br[t],r=Rh();if(!n||!r||ps.has(t))return null;if(!n.worker)try{n.worker=new r(e)}catch(i){return wh(t,!0),null}return n.worker}function Cc(t=!0,e,n,r,i){const{timeout:o,workerUrl:s}=J1(i),l=function(...u){const f=n(...u);r(f)};let c=l;if(t){const u=tb(e,s),f=u?eb(u.key,u.src):null;if(f&&u){const{key:d}=u;c=function(...h){var m;const S=()=>{wh(d,!0),c=l,l(...h)};try{const E=`${d}:${e}`,C=(m=ka.get(E))!=null?m:q1(f,E,e,n,h,o);Oh(f,e,h,o).then(w=>{C===!0?r(w):C.then(N=>N?r(w):S())},S)}catch(E){S()}}}}return c}function nb(){const t=Ec();for(const e in Br){const n=Br[e];n.worker&&n.worker.terminate(),n.src&&n.revoke&&(t==null||t.URL.revokeObjectURL(n.src)),delete Br[e]}ps.clear(),ka.clear()}const Ic=34,ao=10,Rc=13;function Ph(t){const e=t.charCodeAt(0);function n(i,o){const s=[];let l=i.length,c=0,u=0,f=l<=0,d=!1;i.charCodeAt(0)===65279&&c++,i.charCodeAt(l-1)===ao&&--l,i.charCodeAt(l-1)===Rc&&--l;function h(){if(f)return null;if(d)return d=!1,null;const S=c;let E,C;if(i.charCodeAt(S)===Ic){for(;++c<l;)if(i.charCodeAt(c)===Ic){if(i.charCodeAt(c+1)!==Ic)break;c++}return(C=c++)>=l?f=!0:(E=i.charCodeAt(c++))===ao?d=!0:E===Rc&&(d=!0,i.charCodeAt(c)===ao&&++c),i.slice(S+1,C).replace(/""/g,'"')}for(;c<l;){if((E=i.charCodeAt(C=c++))===ao)d=!0;else if(E===Rc)d=!0,i.charCodeAt(c)===ao&&++c;else if(E!==e)continue;return i.slice(S,C)}return f=!0,i.slice(S,l)}let m;for(;(m=h())!==null;){const S=[];for(;m!==null;)S.push(m),m=h();if(o){const E=o(S,u++);E!=null&&s.push(E)}else s.push(S)}return s}function r(i,o){let s=[];return n(i,(l,c)=>{var u;if(c===0)return s=l,null;const f={};for(let d=0;d<s.length;d++)f[s[d]]=(u=l[d])!=null?u:"";return o?o(f,c-1,s):f})}return{parse:r,parseRows:n}}const Mh=Ph(","),Lh=Ph(" "),rb=Mh.parse,ab=Mh.parseRows,ib=Lh.parse,ob=Lh.parseRows;function Dh(t){const e=[];return t.forEach(function(n,r){const i=n[0];n.forEach(function(o,s){if(s>0){if(typeof e[s-1]=="undefined"&&(e[s-1]={}),typeof o=="undefined")throw new Error(`Source data is missing a component at (${r}, ${s})!`);e[s-1][i]=o}})}),e}function Fh(t){const e=t[0],n=[];return t.forEach(function(r,i){if(i>0){const o={};r.forEach(function(s,l){if(typeof s=="undefined")throw new Error(`Source data is missing a component at (${i}, ${l})!`);o[e[l]]=s}),n.push(o)}}),n}function Nh(t,e){const n=[];let r,i;if(Array.isArray(t)){const o=function(s,l){if(s[l]!==void 0)return s[l];const u=l.replace(/\[(\w+)\]/g,".$1").replace(/^\./,"").split(".");let f=s;return u.some(function(d){return!(f=f&&typeof f=="object"&&d in f?f[d]:void 0)}),f};e.x?r=e.value.concat(e.x):r=e.value,n.push(r),t.forEach(function(s){const l=r.map(function(c){let u=o(s,c);return typeof u=="undefined"&&(u=null),u});n.push(l)}),i=Fh(n)}else Object.keys(t).forEach(function(o){var s;const l=[].concat(t[o]);(s=l.unshift)==null||s.call(l,o),n.push(l)}),i=Dh(n);return i}function sb(t,e="csv",n,r,i){const o=new XMLHttpRequest,s={csv:lb,tsv:cb,json:Nh};o.open("GET",t),n&&Object.keys(n).forEach(function(l){o.setRequestHeader(l,n[l])}),o.onreadystatechange=function(){if(o.readyState===4)if(o.status===200){const l=o.responseText;l&&i.call(this,s[e](e==="json"?JSON.parse(l):l,r))}else throw new Error(`${t}: Something went wrong loading!`)},o.send()}function $h(t,e){const n=t.rows(e);let r;return n.length===1?(r=[{}],n[0].forEach(i=>{r[0][i]=null})):r=t.parse(e),r}function lb(t){return $h({rows:ab,parse:rb},t)}function cb(t){return $h({rows:ob,parse:ib},t)}const ub=5e3;function fb(t){var e,n;const r=t[0];if(en(r)){let i=0;for(let o=0,s=t.length;o<s;o++)i+=(n=(e=t[o])==null?void 0:e.length)!=null?n:0;return i}return t.length*Object.keys(r!=null?r:{}).length}function Bh(t,e){const n=t||(e==null?void 0:e.data_keys);return n!=null&&n.x&&(e.data_x=n.x),n}function db(t,e,n){const r=this,{config:i}=r;let o;t.forEach(s=>{const l=r.getXKey(s);if(n.customX||n.timeSeries?n.xs.indexOf(l)>=0?o=(n.appendXs&&r.data.xs[s]||[]).concat(e.map((c,u)=>{const f=c[l];return Xe(f)?r.generateTargetX(f,s,u):!1}).filter(c=>c!==!1)):i.data_x?o=this.getOtherTargetXs():pn(i.data_xs)&&(o=r.getXValuesOfXKey(l,r.data.targets)):o=e.map((c,u)=>u),o)r.data.xs[s]=o;else throw new Error(`x is not defined for id = "${s}".`)})}var hb={convertData(t,e){const{config:n}=this,r=s=>!(s!=null&&s.length)||dr(s[0])?!1:n.boost_useWorker==="auto"?fb(s)>=ub:!!n.boost_useWorker,i=n.boost_workerUrl?{workerUrl:n.boost_workerUrl}:void 0;let o=t;if(t.bindto&&(o={},["url","mimeType","headers","keys","json","rows","columns"].forEach(s=>{const l=`data_${s}`;l in t&&(o[s]=t[l])})),o.url&&e)sb(o.url,o.mimeType,o.headers,Bh(o.keys,n),e);else if(o.json)Cc(r(o.json),"json",Nh,e,i)(o.json,Bh(o.keys,n));else if(o.rows)Cc(r(o.rows),"rows",Fh,e,i)(o.rows);else if(o.columns)Cc(r(o.columns),"columns",Dh,e,i)(o.columns);else if(t.bindto)throw Error("url or json or rows or columns is required.")},convertDataToTargets(t,e){const n=this,{axis:r,config:i,state:o}=n,s=i.data_type,l=Object.keys(t[0]||{}),{ids:c,xs:u}=l.length?l.reduce((S,E)=>(n.isX.call(n,E)?S.xs.push(E):S.ids.push(E),S),{ids:[],xs:[]}):{ids:[],xs:[]},f={appendXs:e,xs:u,categorized:r==null?void 0:r.isCategorized(),timeSeries:r==null?void 0:r.isTimeSeries(),customX:r==null?void 0:r.isCustomX()};db.bind(n)(c,t,f);const d=f.customX&&f.categorized&&i.axis_x_categories.length?new Map(i.axis_x_categories.map((S,E)=>[S,E])):null,h=i.data_idConverter.bind(n.api),m=c.map((S,E)=>{const C=h(S),w=n.getXKey(S),N=f.customX&&f.categorized,z=N&&E===0&&(()=>{const V=Gf(i.axis_x_categories);return t.every(J=>V.has(J[w]))})(),$=t.__append__,G=w===null&&$?n.api.data.values(S).length:0;return{id:C,id_org:S,values:t.map((V,J)=>{var Q;const rt=V[w];let et=V[S],st;if(et=et!==null&&!isNaN(et)&&!Ke(et)?+et:en(et)||Ke(et)?et:null,(N||o.hasRadar)&&E===0&&!Tn(rt)){!z&&J===0&&!$&&(i.axis_x_categories=[],d&&d.clear());const ct=String(rt);st=(Q=d==null?void 0:d.get(ct))!=null?Q:-1,st===-1&&(st=i.axis_x_categories.length,i.axis_x_categories.push(rt),d==null||d.set(ct,st))}else st=n.generateTargetX(rt,S,G+J);return(Tn(et)||n.data.xs[S].length<=J)&&(st=void 0),{x:st,value:et,id:C,index:-1}}).filter(V=>on(V.x))}});if(m.forEach(S=>{var E;i.data_xSort&&(S.values=S.values.sort((C,w)=>{const N=C.x||C.x===0?C.x:1/0,z=w.x||w.x===0?w.x:1/0;return N-z})),S.values.forEach((C,w)=>C.index=w),(E=n.data.xs[S.id])==null||E.sort((C,w)=>C-w)}),o.hasNegativeValue=m.some(S=>S.values.some(E=>E.value!==null&&E.value<0)),o.hasPositiveValue=m.some(S=>S.values.some(E=>E.value!==null&&E.value>0)),s&&n.isValidChartType(s)){const S=n.mapToIds(m).filter(E=>!(E in i.data_types)||!n.isValidChartType(i.data_types[E]));n.setTargetType(S,s)}return m.forEach(S=>n.cache.add(S.id_org,S,!0)),m}};const gb={areaRange:{high:0,mid:1,low:2},candlestick:{open:0,high:1,low:2,close:3,volume:4}};function zh(t){return en(t)?t:[t]}var vb={isX(t){const e=this,{config:n}=e,r=n.data_x&&t===n.data_x,i=pn(n.data_xs)&&By(n.data_xs,t);return r||i},isStackNormalized(){const{config:t}=this;return!!((t.data_stack_normalize===!0||qn(t.data_stack_normalize))&&t.data_groups.length)},isStackNormalizedPerGroup(){var t;const{config:e}=this;return!!(qn(e.data_stack_normalize)&&((t=e.data_stack_normalize)!=null&&t.perGroup)&&e.data_groups.length)},isGrouped(t){const e=this.config.data_groups;return t?e.some(n=>n.indexOf(t)>=0&&n.length>1):e.length>0},hasAxisGroupedData(t){const e=this,{axis:n}=e;return e.data.targets.filter(o=>n.getId(o.id)===t).map(o=>o.id).some(o=>e.isGrouped(o))},getXKey(t){const e=this,{config:n}=e;return n.data_x?n.data_x:pn(n.data_xs)?n.data_xs[t]:null},getXValuesOfXKey(t,e){const n=this,r=e&&pn(e)?n.mapToIds(e):[];let i;return r.forEach(o=>{n.getXKey(o)===t&&(i=n.data.xs[o])}),i},getIndexByX(t,e){const n=this;return e?e.indexOf(Ye(t)?t:+t):(n.filterByX(n.data.targets,t)[0]||{index:null}).index},getXValue(t,e){const n=this;return t in n.data.xs&&n.data.xs[t]&&Xe(n.data.xs[t][e])?n.data.xs[t][e]:e},getOtherTargetXs(){const t=this,e=Object.keys(t.data.xs);return e.length?t.data.xs[e[0]]:null},getOtherTargetX(t){const e=this.getOtherTargetXs();return e&&t<e.length?e[t]:null},addXs(t){const e=this,{config:n}=e;Object.keys(t).forEach(r=>{n.data_xs[r]=t[r]})},isMultipleX(){return!this.config.axis_x_forceAsSingle&&(pn(this.config.data_xs)||this.hasType("bubble")||this.hasType("scatter"))},addName(t){const e=this,{config:n}=e;let r;return t&&(r=n.data_names[t.id],t.name=r!==void 0?r:t.id),t},getAllValuesOnIndex(t,e=!1){const n=this;let r=n.filterTargetsToShow(n.data.targets).map(i=>n.addName(n.getValueOnIndex(i.values,t)));return e&&(r=r.filter(i=>i&&"value"in i&&Xe(i.value))),r},getValueOnIndex(t,e){var n;if(((n=t[e])==null?void 0:n.index)===e)return t[e];const r=t.filter(i=>i.index===e);return r.length?r[0]:null},updateTargetX(t,e){const n=this;t.forEach(r=>{r.values.forEach((i,o)=>{i.x=n.generateTargetX(e[o],r.id,o)}),n.data.xs[r.id]=e})},updateTargetXs(t,e){const n=this;t.forEach(r=>{e[r.id]&&n.updateTargetX([r],e[r.id])})},generateTargetX(t,e,n){const r=this,{axis:i}=r;let o=i!=null&&i.isCategorized()?n:t||n;if(i!=null&&i.isTimeSeries()){const s=Kn.bind(r);o=s(t||r.getXValue(e,n))}else i!=null&&i.isCustomX()&&!(i!=null&&i.isCategorized())&&(o=Xe(t)?+t:r.getXValue(e,n));return o},updateXs(t){t.length&&(this.axis.xs=t.map(e=>e.x))},getPrevX(t){const e=this.axis.xs[t-1];return on(e)?e:null},getNextX(t){const e=this.axis.xs[t+1];return on(e)?e:null},getBaseValue(t){const e=this,{hasAxis:n}=e.state;let{value:r}=t;return r&&n&&(e.isAreaRangeType(t)?r=e.getRangedData(t,"mid"):e.isBubbleZType(t)&&(r=e.getBubbleZData(r,"y"))),r},getMinMaxValue(t){const e=this.getBaseValue.bind(this);let n=1/0,r=-1/0;const i=t||this.data.targets.map(o=>o.values);for(let o=0;o<i.length;o++){const s=i[o];for(let l=0;l<s.length;l++){const c=e(s[l]);le(c)&&(c<n&&(n=c),c>r&&(r=c))}}return{min:n,max:r}},getMinMaxData(){const t=this,e=ke.dataMinMax;let n=t.cache.get(e);if(!n){const r=t.data.targets.map(u=>u.values),i=t.getMinMaxValue(r),o=[],s=[],{min:l,max:c}=i;r.forEach(u=>{const f=t.getFilteredDataByValue(u,l),d=t.getFilteredDataByValue(u,c);if(f.length)for(let h=0;h<f.length;h++)o.push(f[h]);if(d.length)for(let h=0;h<d.length;h++)s.push(d[h])}),t.cache.add(e,n={min:o,max:s})}return n},getTotalPerIndex(t){const e=this,{config:n}=e,r=t?`${ke.dataTotalPerIndex}-${t}`:ke.dataTotalPerIndex;let i=e.cache.get(r);if((e.config.data_groups.length||e.isStackNormalized())&&!i){i=[];let{targets:o}=e.data;if(e.isStackNormalizedPerGroup()&&t){const s=n.data_groups.find(l=>l.indexOf(t)>=0);if(s)o=o.filter(l=>s.indexOf(l.id)>=0);else return null}o.forEach(s=>{s.values.forEach((l,c)=>{i[c]||(i[c]=0),i[c]+=le(l.value)?l.value:0})}),e.cache.add(r,i)}return i},getTotalDataSum(t){const e=this,n=ke.dataTotalSum;let r=e.cache.get(n);return le(r)||(r=e.data.targets.reduce((i,o)=>i+o.values.reduce((s,l)=>{var c;return s+((c=l.value)!=null?c:0)},0),0),e.cache.add(n,r)),t&&(r-=e.getHiddenTotalDataSum()),r},getHiddenTotalDataSum(){const t=this,{api:e,state:{hiddenTargetIds:n}}=t;let r=0;return n.size&&(r=e.data.values.bind(e)([...n]).reduce((i,o)=>i+o,0)),r},getFilteredDataByValue(t,e){return t.filter(n=>this.getBaseValue(n)===e)},getMaxDataCount(){const{targets:t}=this.data;let e=0;for(let n=0;n<t.length;n++)t[n].values.length>e&&(e=t[n].values.length);return e},getMaxDataCountTarget(){const t=this,{cache:e,state:n}=t,r=e.get(ke.maxDataCountTarget);if(r&&r.generation===n.dataGeneration)return r.value;let i=t.filterTargetsToShow()||[];const o=i.length,s=t.config.axis_x_inverted;if(o>1){const l=[];for(let c=0;c<i.length;c++){const u=i[c].values;for(let f=0;f<u.length;f++)l.push(u[f].x)}i=l,i=ti(Dl(i)).map((c,u,f)=>({x:c,index:s?f.length-u-1:u}))}else o&&(i=i[0].values.concat());return e.add(ke.maxDataCountTarget,{value:i,generation:n.dataGeneration}),i},mapToIds(t){return t.map(e=>e.id)},mapToTargetIds(t){const e=this;return t?en(t)?t.concat():[t]:e.mapToIds(e.data.targets)},hasTarget(t,e){const n=this.mapToIds(t);for(let r=0,i;i=n[r];r++)if(i===e)return!0;return!1},isTargetToShow(t){return!this.state.hiddenTargetIds.has(t)},isLegendToShow(t){return!this.state.hiddenLegendIds.has(t)},getTargetsToShow(){var t;const{state:e}=this;return(t=e._targetsToShow)!=null?t:this.filterTargetsToShow()},filterTargetsToShow(t){const e=this;if(!t){const{cache:n,data:r,state:i}=e,o=ke.filteredTargets,s=n.get(o);if(s&&s.generation===i.dataGeneration)return s.value;const l=r.targets.filter(c=>e.isTargetToShow(c.id));return n.add(o,{value:l,generation:i.dataGeneration}),l}return t.filter(n=>e.isTargetToShow(n.id))},mapTargetsToUniqueXs(t){const e=this,{axis:n}=e;let r=[];return t!=null&&t.length&&(r=Dl(ky(t.map(i=>i.values.map(o=>+o.x)))),r=n!=null&&n.isTimeSeries()?r.map(i=>new Date(+i)):r.map(Number)),ti(r)},addTargetIds(t,e){const{state:n}=this;zh(e).forEach(r=>n[t].add(r))},removeTargetIds(t,e){const{state:n}=this;zh(e).forEach(r=>n[t].delete(r))},addHiddenTargetIds(t){this.addTargetIds("hiddenTargetIds",t)},removeHiddenTargetIds(t){this.removeTargetIds("hiddenTargetIds",t)},addHiddenLegendIds(t){this.addTargetIds("hiddenLegendIds",t)},removeHiddenLegendIds(t){this.removeTargetIds("hiddenLegendIds",t)},getValuesAsIdKeyed(t){const e=this,{hasAxis:n}=e.state,r={},i=e.isMultipleX();let o=null;if(i){const s=e.cache.get(ke.valuesXIndexMap);if(s&&s.generation===e.state.dataGeneration)o=s.value;else{const l=e.mapTargetsToUniqueXs(e.data.targets).map(c=>Ye(c)?c:+c);o=new Map(l.map((c,u)=>[c,u])),e.cache.add(ke.valuesXIndexMap,{value:o,generation:e.state.dataGeneration})}}return t.forEach(s=>{const l=[];s.values.filter(({value:c})=>Xe(c)||c===null).forEach(c=>{let{value:u}=c;if(u!==null&&e.isCandlestickType(c)&&(u=en(u)?u.slice(0,4):[u.open,u.high,u.low,u.close]),en(u))l.push(...u);else if(Ke(u)&&"high"in u)l.push(...Object.values(u));else if(e.isBubbleZType(c))l.push(n&&e.getBubbleZData(u,"y"));else if(i&&o){const f=Ye(c.x)?c.x:+c.x,d=o.get(f);d!==void 0&&(l[d]=u)}else l.push(u)}),r[s.id]=l}),r},hasMultiTargets(){return this.filterTargetsToShow().length>1},orderTargets(t){const e=this,n=t.slice(),r=e.getSortCompareFn();return r&&n.sort(r),n},getSortCompareFn(t=!1){const e=this,{config:n}=e,r=n.data_order,i=/asc/i.test(r),o=/desc/i.test(r);let s;if(i||o){const l=(u,f)=>u+Math.abs(f.value),c=u=>le(u)?u:"values"in u?u.values.reduce(l,0):u.value;s=(u,f)=>{const d=c(u),h=c(f);return t?i?d-h:h-d:i?h-d:d-h}}else ue(r)&&(s=r.bind(e.api));return s||null},filterByX(t,e){return this.getValuesByX(t).get(this.getXCacheKey(e))||[]},filterNullish(t){const e=n=>Xe(n.value);return t&&t.filter(n=>"value"in n?e(n):n.values.some(e))},filterRemoveNull(t){return t.filter(e=>Xe(this.getBaseValue(e)))},filterByXDomain(t,e){return t.map(n=>({id:n.id,id_org:n.id_org,values:n.values.filter(r=>e[0]<=r.x&&r.x<=e[1])}))},hasDataLabel(){const t=this.config.data_labels;return Pa(t)&&t||qn(t)&&pn(t)},hasNullDataValue(t){return t.some(({value:e})=>e===null)},getDataIndexFromEvent(t){const e=this,{$el:n,config:r,state:{hasRadar:i,inputType:o,eventReceiver:{coords:s,rect:l}}}=e;let c;if(i){let u=t.target;/tspan/i.test(u.tagName)&&(u=u.parentNode);const f=Ut(u).datum();c=f&&Object.keys(f).length===1?f.index:void 0}else{const u=r.axis_rotated,f=Ah(n.chart.node()),d=o==="touch"&&t.changedTouches?t.changedTouches[0]:t;let h=u?d.clientY+f.y:d.clientX+f.x;if(Sc(n.svg)){const m=[h,0];u&&m.reverse(),h=vs(n.eventRect.node(),...m)[u?"y":"x"]}else h-=u?l.top:l.left;c=Fl(s,h,0,s.length-1,u)}return c},getDataLabelLength(t,e,n){var r,i,o;const s=this,l=1.3,c=[t,e].map(u=>s.dataLabelFormat()(u));if(s.config.render_mode==="canvas"&&!s.$el.svg){const u=(i=(r=s.$el.chart)==null?void 0:r.node)==null?void 0:i.call(r),f=u==null?void 0:u.ownerDocument,d=f==null?void 0:f.createElementNS("http://www.w3.org/2000/svg","svg");if(u&&d){const h=c.map(S=>{const E=f.createElementNS("http://www.w3.org/2000/svg","text");return E.textContent=S,d.appendChild(E),E});d.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",u.appendChild(d);const m=h.map(S=>S.getBoundingClientRect()[n]*l);return d.remove(),m}}return((o=s.getTextRect(c))==null?void 0:o.map(u=>u[n]*l))||[0,0]},isNoneArc(t){return this.hasTarget(this.data.targets,t.id)},isArc(t){return"data"in t&&this.hasTarget(this.data.targets,t.data.id)},findSameXOfValues(t,e){const n=t[e].x,r=[];let i;for(i=e-1;i>=0&&n===t[i].x;i--)r.push(t[i]);for(i=e;i<t.length&&n===t[i].x;i++)r.push(t[i]);return r},getXCacheKey(t){return Ye(t)?t:+t},getValuesByX(t){const e=this,{cache:n,state:r}=e,i=t.map(l=>{const{values:c}=l,u=c[0],f=c[c.length-1];return`${l.id}:${c.length}:${u?e.getXCacheKey(u.x):""}:${f?e.getXCacheKey(f.x):""}`}).join("|"),o=n.get(ke.valuesByX);if(o&&o.generation===r.dataGeneration&&o.targetKey===i)return o.value;const s=new Map;for(let l=0;l<t.length;l++){const c=t[l].values;for(let u=0;u<c.length;u++){const f=c[u],d=e.getXCacheKey(f.x),h=s.get(d);h?h.push(f):s.set(d,[f])}}return n.add(ke.valuesByX,{generation:r.dataGeneration,targetKey:i,value:s}),s},getClosestCandidates(t,e,n=!0){const r=this,{config:i,scale:o}=r,s=t.length,l=t[0];if(!n||s<200||!l||!i.data_xSort)return t;const c=r.isBarType(l.id),u=r.isCandlestickType(l.id),f=i.point_sensitivity;if(!(c||u)&&!le(f))return t;const d=o.zoom||o.x,h=e[+i.axis_rotated],m=d(t[0].x)<=d(t[s-1].x);let S=0,E=s-1;for(;S<E;){const $=S+E>>1,G=d(t[$].x);(m?G<h:G>h)?S=$+1:E=$}const C=[],w=new Set,N=$=>{$>=0&&$<s&&!w.has($)&&(w.add($),C.push(t[$]))},z=$=>{if($<0||$>=s)return;const G=r.getXCacheKey(t[$].x);let V=$;for(;V>=0&&r.getXCacheKey(t[V].x)===G;)N(V--);for(V=$+1;V<s&&r.getXCacheKey(t[V].x)===G;)N(V++)};if(c||u)for(let $=S-2;$<=S+2;$++)z($);else{const $=f,G=(V,J)=>{for(let Q=V;Q>=0&&Q<s;Q+=J){const rt=t[Q];if(Math.abs(d(rt.x)-h)>$)break;N(Q)}};G(S,1),G(S-1,-1)}return C},findClosestFromTargets(t,e){const n=this,r=[];for(let i=0;i<t.length;i++){const o=n.findClosest(t[i].values,e);o&&r.push(o)}return n.findClosest(r,e,!1)},findClosest(t,e,n=!0){const r=this,{$el:{main:i}}=r,o=r.getClosestCandidates(t,e,n);let s,l;for(let c=0;c<o.length;c++){const u=o[c];if(!u||!Xe(u.value))continue;const f=r.isBarType(u.id),d=r.isCandlestickType(u.id);if(f||d){const h=f?`.${lr.chartBar}.${Ue.target}${r.getTargetSelectorSuffix(u.id)} .${lr.bar}-${u.index}`:`.${ta.chartCandlestick}.${Ue.target}${r.getTargetSelectorSuffix(u.id)} .${ta.candlestick}-${u.index} path`;!l&&r.isWithinBar(i.select(h).node())&&(l=u)}else{const h=r.dist(u,e),m=r.getPointSensitivity(u);h<m&&(s===void 0||h<s)&&(s=h,l=u)}}return l},dist(t,e){const n=this,{config:{axis_rotated:r},scale:i}=n,o=+r,s=+!r,l=n.circleY(t,t.index),u=(i.zoom||i.x)(t.x)-e[o],f=l-e[s];return Math.sqrt(u*u+f*f)},convertValuesToStep(t){const e=this,{axis:n,config:r}=e,i=r.line_step_type,o=n?n.isCategorized():!1,s=en(t)?t.concat():[t];if(!(o||/step\-(after|before)/.test(i)))return t;if(s.length){const l=s[0],c=s[s.length-1],{id:u}=l;let{x:f}=l;s.unshift({x:--f,value:l.value,id:u}),o&&i==="step-after"&&s.unshift({x:f-1,value:l.value,id:u}),f=c.x,s.push({x:++f,value:c.value,id:u}),o&&i==="step-before"&&s.push({x:f+1,value:c.value,id:u})}return s},convertValuesToRange(t){const e=en(t)?t.concat():[t],n=[];return e.forEach(r=>{const{x:i,id:o}=r;n.push({x:i,id:o,value:r.value[0]}),n.push({x:i,id:o,value:r.value[2]})}),n},updateDataAttributes(t,e){const n=this,{config:r}=n,i=r[`data_${t}`];return Tn(e)||(Object.keys(e).forEach(o=>{i[o]=e[o]}),n.redraw({withLegend:!0})),i},getRangedData(t,e="",n="areaRange"){var r,i;const o=t==null?void 0:t.value;if(en(o)){if(n==="bar")return o.reduce((s,l)=>l-s);{const s=(i=(r=gb[n])==null?void 0:r[e])!=null?i:-1;return s>=0?o[s]:void 0}}else if(o&&e)return o[e];return o},setRatioForGroupedData(t){const e=this,{config:n}=e;if(n.data_groups.length&&t.some(r=>e.isGrouped(r.id))){const r=i=>e.getRatio("index",i,!0);t.forEach(i=>{"values"in i?i.values.forEach(r):r(i)})}},getRatio(t,e,n=!1){const r=this,{config:i,state:o}=r,s=r.api;let l=0;if(e&&s.data.shown().length)if(l=e.ratio||e.value,t==="arc")if(r.pie.padAngle()())l=e.value/r.getTotalDataSum(!0);else{const c=i.gauge_fullCircle?r.getArcLength():r.getStartingAngle()*-2,u=r.hasType("gauge")?c:Math.PI*2;l=(e.endAngle-e.startAngle)/u}else if(t==="index"){const c=s.data.values.bind(s),{hiddenTargetIds:u}=o;let f=this.getTotalPerIndex(r.isStackNormalizedPerGroup()?e.id:void 0);if(f===null)return l;if(u.size){let h=[...u];if(r.isStackNormalizedPerGroup()&&e.id){const m=i.data_groups.find(S=>S.indexOf(e.id)>=0);m&&(h=h.filter(S=>m.indexOf(S)>=0))}if(h.length){let m=c(h,!1);m.length&&(m=m.reduce((S,E)=>S.map((C,w)=>(le(C)?C:0)+E[w])),f=f.map((S,E)=>S-m[E]))}}const d=f[e.index];e.ratio=le(e.value)&&f&&d?e.value/d:0,l=e.ratio}else if(t==="radar")l=parseFloat(String(Math.max(e.value,0)))/o.current.dataMax*i.radar_size_ratio;else if(t==="bar"){const u=r.getYScaleById.bind(r)(e.id).domain().reduce((f,d)=>d-f);l=u===0?0:Math.abs(r.getRangedData(e,null,t)/u)}else t==="treemap"&&(l/=r.getTotalDataSum(!0));return n&&l?l*100:l},updateDataIndexByX(t){const e=this,n=t.reduce((r,i,o)=>(r[Number(i.x)]=o,r),{});e.data.targets.forEach(r=>{r.values.forEach((i,o)=>{let s=n[Number(i.x)];s===void 0&&(s=o),i.index=s})})},isBubbleZType(t){return this.isBubbleType(t)&&(Ke(t.value)&&("z"in t.value||"y"in t.value)||en(t.value)&&t.value.length>=2)},isBarRangeType(t){var e;const n=this,{value:r}=t;return n.isBarType(t)&&!((e=n.isSubchartSourceTypeOf)!=null&&e.call(n,t,kt.CANDLESTICK))&&en(r)&&r.length>=2&&r.every(le)},getDataById(t){var e;const n=this.cache.get(t)||this.api.data(t);return(e=n==null?void 0:n[0])!=null?e:n}};function ms(t,e=!1){const n=this,{api:r}=n;e&&n.api.flush(!0),t==null||t.call(r)}var pb={load(t,e){const n=this,{axis:r,data:i,org:o,scale:s}=n,{append:l}=e,c={domain:null,currentDomain:null,x:null};let u=t;if(u){e.filter&&(u=u.filter(e.filter)),(e.type||e.types)&&u.forEach(d=>{var h;const m=((h=e.types)==null?void 0:h[d.id])||e.type;n.setTargetType(d.id,m)});const f=new Map(u.map(d=>[d.id,d]));i.targets.forEach(d=>{const h=f.get(d.id);if(h){if(l){const m=h.values;for(let S=0;S<m.length;S++)d.values.push(m[S])}else d.values=h.values;f.delete(d.id)}}),f.forEach(d=>i.targets.push(d))}if(n.state.isCanvasMode){n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),n.updateTypesElements(),ms.call(n,e.done,e.resizeAfter);return}n.updateTargets(i.targets),s.zoom&&(c.x=r.isCategorized()?s.x.orgScale():(o.xScale||s.x).copy(),c.domain=n.getXDomain(i.targets),c.x.domain(c.domain),c.currentDomain=n.zoom.getDomain(),n.withinRange(c.currentDomain,void 0,c.domain)||(s.x.domain(c.domain),s.zoom=null,n.$el.eventRect.property("__zoom",null))),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),s.zoom?(o.xDomain=c.domain,o.xScale=c.x,r.isCategorized()&&(c.currentDomain=n.getZoomDomainValue(c.currentDomain),o.xDomain=n.getZoomDomainValue(o.xDomain),o.xScale=c.x.domain(o.xDomain)),n.updateCurrentZoomTransform(c.x,c.currentDomain)):o.xScale&&o.xScale.domain(o.xDomain),n.updateTypesElements(),ms.call(n,e.done,e.resizeAfter)},loadFromArgs(t){const e=this;e.config&&(e.cache.reset(!1,[ke.filteredTargets,ke.maxDataCountTarget,ke.valuesXIndexMap,ke.maxTickSize]),e.convertData(t,n=>{const r=t.data||n;t.append&&(r.__append__=!0),r&&e.load(e.convertDataToTargets.call(e,r),t)}))},unload(t,e){var n;const r=this,{state:i,$el:o,$T:s}=r,l=!!((n=r.hasLegendDefsPoint)!=null&&n.call(r));let c=e,u=t;if(r.cache.reset(!1,[ke.filteredTargets,ke.maxDataCountTarget,ke.valuesXIndexMap,ke.maxTickSize]),c||(c=()=>{}),u=u.filter(h=>r.hasTarget(r.data.targets,h)),u.length===0){c();return}const f=new Set(u);if(i.isCanvasMode){u.forEach(h=>{i.withoutFadeIn[h]=!1}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),r.removeHiddenTargetIds(u),r.removeHiddenLegendIds(u),r.updateTypesElements(),c();return}u.forEach(h=>{var m;const S=r.getTargetSelectorSuffix(h);i.withoutFadeIn[h]=!1,o.legend&&o.legend.selectAll(`.${Be.legendItem}${S}`).remove(),l&&((m=o.defs)==null||m.select(`#${r.getDefsPointId(S)}`).remove())}),r.data.targets=r.data.targets.filter(h=>!f.has(h.id)),i.hasFunnel&&r.updateFunnel(r.data.targets),i.hasTreemap&&r.updateTargetsForTreemap(r.data.targets),r.updateTypesElements();const d=o.svg.selectAll(u.map(h=>r.selectorTarget(h)));s(d).style("opacity","0").remove().call(Zo,c)}},mb={value:()=>{}};function Uh(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new xs(n)}function xs(t){this._=t}function xb(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}xs.prototype=Uh.prototype={constructor:xs,on:function(t,e){var n=this._,r=xb(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=yb(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<s;)if(i=(t=r[o]).type)n[i]=kh(n[i],t.name,e);else if(e==null)for(i in n)n[i]=kh(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new xs(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};function yb(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function kh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=mb,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var ys=Uh;const Tb={passive:!1},io={capture:!0,passive:!1};function wc(t){t.stopImmediatePropagation()}function ui(t){t.preventDefault(),t.stopImmediatePropagation()}function Oc(t){var e=t.document.documentElement,n=Ut(t).on("dragstart.drag",ui,io);"onselectstart"in e?n.on("selectstart.drag",ui,io):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Pc(t,e){var n=t.document.documentElement,r=Ut(t).on("dragstart.drag",null);e&&(r.on("click.drag",ui,io),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Ts=(t=>()=>t);function Mc(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:s,y:l,dx:c,dy:u,dispatch:f}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:l,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:f}})}Mc.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function bb(t){return!t.ctrlKey&&!t.button}function Sb(){return this.parentNode}function Ab(t,e){return e==null?{x:t.x,y:t.y}:e}function Eb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Gh(){var t=bb,e=Sb,n=Ab,r=Eb,i={},o=ys("start","drag","end"),s=0,l,c,u,f,d=0;function h($){$.on("mousedown.drag",m).filter(r).on("touchstart.drag",C).on("touchmove.drag",w,Tb).on("touchend.drag touchcancel.drag",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m($,G){if(!(f||!t.call(this,$,G))){var V=z(this,e.call(this,$,G),$,G,"mouse");V&&(Ut($.view).on("mousemove.drag",S,io).on("mouseup.drag",E,io),Oc($.view),wc($),u=!1,l=$.clientX,c=$.clientY,V("start",$))}}function S($){if(ui($),!u){var G=$.clientX-l,V=$.clientY-c;u=G*G+V*V>d}i.mouse("drag",$)}function E($){Ut($.view).on("mousemove.drag mouseup.drag",null),Pc($.view,u),ui($),i.mouse("end",$)}function C($,G){if(t.call(this,$,G)){var V=$.changedTouches,J=e.call(this,$,G),Q=V.length,rt,et;for(rt=0;rt<Q;++rt)(et=z(this,J,$,G,V[rt].identifier,V[rt]))&&(wc($),et("start",$,V[rt]))}}function w($){var G=$.changedTouches,V=G.length,J,Q;for(J=0;J<V;++J)(Q=i[G[J].identifier])&&(ui($),Q("drag",$,G[J]))}function N($){var G=$.changedTouches,V=G.length,J,Q;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),J=0;J<V;++J)(Q=i[G[J].identifier])&&(wc($),Q("end",$,G[J]))}function z($,G,V,J,Q,rt){var et=o.copy(),st=gr(rt||V,G),ct,dt,q;if((q=n.call($,new Mc("beforestart",{sourceEvent:V,target:h,identifier:Q,active:s,x:st[0],y:st[1],dx:0,dy:0,dispatch:et}),J))!=null)return ct=q.x-st[0]||0,dt=q.y-st[1]||0,function ft(lt,pt,Tt){var Rt=st,Ct;switch(lt){case"start":i[Q]=ft,Ct=s++;break;case"end":delete i[Q],--s;case"drag":st=gr(Tt||pt,G),Ct=s;break}et.call(lt,$,new Mc(lt,{sourceEvent:pt,subject:q,target:h,identifier:Q,active:Ct,x:st[0]+ct,y:st[1]+dt,dx:st[0]-Rt[0],dy:st[1]-Rt[1],dispatch:et}),J)}}return h.filter=function($){return arguments.length?(t=typeof $=="function"?$:Ts(!!$),h):t},h.container=function($){return arguments.length?(e=typeof $=="function"?$:Ts($),h):e},h.subject=function($){return arguments.length?(n=typeof $=="function"?$:Ts($),h):n},h.touchable=function($){return arguments.length?(r=typeof $=="function"?$:Ts(!!$),h):r},h.on=function(){var $=o.on.apply(o,arguments);return $===o?h:$},h.clickDistance=function($){return arguments.length?(d=($=+$)*$,h):Math.sqrt(d)},h}var Cb={setExpand(t,e,n){const r=this,{config:i,$el:{circle:o}}=r;o&&i.point_focus_expand_enabled&&r.expandCircles(t,e,n),r.expandBarTypeShapes(!0,t,e,n)},expandBarTypeShapes(t=!0,e,n,r){const i=this;["bar","candlestick"].filter(o=>i.$el[o]).forEach(o=>{r&&i.$el[o].classed(Ue.EXPANDED,!1),i.getShapeByIndex(o,e,n).classed(Ue.EXPANDED,t)})},setOverOut(t,e){const n=this,{config:r,state:{hasFunnel:i,hasRadar:o,hasTreemap:s},$el:{main:l}}=n,c=Ke(e);if(c||e!==-1){const u=r[t?"data_onover":"data_onout"].bind(n.api);if(r.color_onover&&n.setOverColor(t,e,c),c){const f=n.getTargetSelectorSuffix(e.id),d=i||s?`${Ue.target+f} .${An.shape}`:Qe.arc+f;u(e,l.select(`.${d}`).node())}else if(r.tooltip_grouped)t&&(o&&n.isPointFocusOnly()?n.showCircleFocus(n.getAllValuesOnIndex(e,!0)):n.setExpand(e,null,!0)),!n.isMultipleX()&&l.selectAll(`.${An.shape}-${e}`).each(function(f){u(f,this)});else{const f=n.cache.get(ke.setOverOut)||[],d=l.selectAll(`.${An.shape}-${e}`).filter(function(m){return n.isWithinShape(this,m)}),h=d.filter(function(){return f.every(m=>m!==this)});if(!t||d.empty()||f.length===h.size()&&h.nodes().every((m,S)=>m!==f[S]))for(;f.length;){const m=f.pop();r.data_onout.bind(n.api)(Ut(m).datum(),m)}h.each(function(){t&&(u(Ut(this).datum(),this),f.push(this))}),n.cache.add(ke.setOverOut,f)}}},callOverOutForTouch(t){const e=this,n=e.cache.get(ke.callOverOutForTouch);(Ke(t)&&n?t.id!==n.id:t!==n)&&((n||le(n))&&e.setOverOut(!1,n),(t||le(t))&&e.setOverOut(!0,t),e.cache.add(ke.callOverOutForTouch,t))},getDraggableSelection(){const t=this,{config:e,state:n}=t;return e.interaction_enabled&&e.data_selection_draggable&&t.drag?Gh().on("drag",function(r){n.event=r,t.drag(er(r,this))}).on("start",function(r){n.event=r,t.dragstart(er(r,this))}).on("end",r=>{n.event=r,t.dragend()}):()=>{}},dispatchEvent(t,e,n){var r,i,o;const s=this,{config:l,state:{eventReceiver:c,hasAxis:u,hasFunnel:f,hasRadar:d,hasTreemap:h},$el:{eventRect:m,funnel:S,radar:E,svg:C,treemap:w}}=s;let N=(o=(i=(f||h)&&c.rect||d&&E.axes.select(`.${Pn.axis}-${e} text`)||m||((r=s.getArcElementByIdOrIndex)==null?void 0:r.call(s,e)))==null?void 0:i.node)==null?void 0:o.call(i);if(N){const z=s.isMultipleX(),$=l.axis_rotated;let{width:G,left:V,top:J}=cn(N);if(u&&!d&&!z){const st=c.coords[e];st?(G=st.w,V+=st.x,J+=st.y):(G=0,V=0,J=0)}let Q=V+(n?n[0]:0)+(z||$?0:G/2),rt=J+(n?n[1]:0)+($?4:0);if(Sc(C)&&s.$el.eventRect){const st=vs(s.$el.eventRect.node(),Q,rt,!1);Q=st.x,rt=st.y}const et={screenX:Q,screenY:rt,clientX:Q,clientY:rt,bubbles:d};(f||h)&&(N=(S!=null?S:w).node()),Ac[/^(mouse|click)/.test(t)?"mouse":"touch"](N,t,et)}},setDragStatus(t){this.state.dragging=t},unbindZoomEvent(){const t=this,{$el:{canvas:e,eventRect:n,svg:r,zoomResetBtn:i}}=t;n==null||n.on(".zoom wheel.zoom .drag",null),e==null||e.on(".zoom wheel.zoom .drag",null),r==null||r.on("wheel",null),i==null||i.on("click",null).style("display","none")},unbindAllEvents(){var t;const e=this,{$el:{arcs:n,eventRect:r,legend:i,region:o,svg:s,treemap:l},brush:c}=e,u=["wheel","click","mouseover","mousemove","mouseout","touchstart","touchmove","touchend","touchstart.eventRect","touchmove.eventRect","touchend.eventRect",".brush",".drag",".zoom","wheel.zoom","dblclick.zoom"].join(" ");[s,r,o==null?void 0:o.list,c==null?void 0:c.getSelection(),n==null?void 0:n.selectAll("path"),i==null?void 0:i.selectAll("g"),l].forEach(f=>f==null?void 0:f.on(u,null)),(t=e.unbindZoomEvent)==null||t.call(e)}},Ib={categoryName(t){var e;const{axis_x_categories:n}=this.config;return(e=n==null?void 0:n[t])!=null?e:t}};const Rb=/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g;var wb={generateClass(t,e){const n=this.state.generateClassCache,r=`${t}\0${e}`;let i=n.get(r);return i||(i=` ${t} ${t+this.getTargetSelectorSuffix(e)}`,n.set(r,i)),i},getClass(t,e){const n=/s$/.test(t),r=/^(area|arc|line|funnel|treemap)s?$/.test(t),i=n?"id":"index";return o=>{const s=o.data||o;return((e?this.generateClass(Ie[n?"shapes":"shape"],s[i]):"")+this.generateClass(Ie[t],s[r?"id":i])).trim()}},getChartClass(t){return e=>Ie[`chart${t}`]+this.classTarget((e.data?e.data:e).id)},generateExtraLineClass(){const e=this.config.line_classes||[],n=[];return function(r){var i;const o=r.id||((i=r.data)==null?void 0:i.id)||r;return n.indexOf(o)<0&&n.push(o),e[n.indexOf(o)%e.length]}},classRegion(t,e){return`${this.generateClass(Ie.region,e)} ${"class"in t?t.class:""}`},classTarget(t){const e=this.config.data_classes[t];let n="";return e&&(n=` ${Ie.target}-${e}`),this.generateClass(Ie.target,t)+n},classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused(t){return` ${this.state.focusedTargetIds.has(t.id)?Ie.focused:""}`},classDefocused(t){return` ${this.state.defocusedTargetIds.has(t.id)?Ie.defocused:""}`},getTargetSelectorSuffix(t){return(t||t===0?`-${t}`:"").replace(Rb,"-")},selectorTarget(t,e="",n=""){const r=this.getTargetSelectorSuffix(t);return`${e}.${Ie.target+r} ${n}, ${e}.${Ie.circles+r} ${n}`},selectorTargets(t,e){const n=t||[];return n.length?n.map(r=>this.selectorTarget(r,e)):null},selectorLegend(t){return`.${Ie.legendItem+this.getTargetSelectorSuffix(t)}`},selectorLegends(t){return t!=null&&t.length?t.map(e=>this.selectorLegend(e)):null}};const Ob=(t,e,n)=>{const r=Ut(t.cloneNode(!0));return r.attr("id",n).insert("rect",":first-child").attr("width",r.attr("width")).attr("height",r.attr("height")).style("fill",e),{id:n,node:r.node()}};function Pb(t){const e=ke.colorPattern,{body:n}=Ze;let r=n[e];if(!r){const o=t.classed(xc.colorPattern,!0).style("background-image");t.classed(xc.colorPattern,!1),o.indexOf(";")>-1&&(r=o.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(s=>s.trim().replace(/[\"'\s]/g,"")).filter(Boolean),n[e]=r)}return r}const Mb=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Lb={generateColor(){const t=this,{$el:e,config:n}=t,r=[],i=n.area_linearGradient||n.bar_linearGradient||n.point_radialGradient;let o=pn(n.color_pattern)?n.color_pattern:[...Pb(e.chart)||Mb];const s=o;if(ue(n.color_tiles)){const l=n.color_tiles.bind(t.api)(),c=o.map((u,f)=>{const d=u.replace(/[#\(\)\s,]/g,""),h=`${t.state.datetimeId}-pattern-${d}-${f}`;return Ob(l[f%l.length],u,h)});o=c.map(u=>`url(#${u.id})`),t.patterns=c}return function(l){var c;const u=n.data_colors,f=n.data_color,d=l.id||((c=l.data)==null?void 0:c.id)||l,h=t.isTypeOf(d,["line","spline","step"])||!n.data_types[d];let m;if(ue(u[d]))m=u[d].bind(t.api)(l);else if(u[d])m=u[d];else{let S=r.indexOf(d);S<0&&(r.push(d),S=r.length-1),m=h?s[S%s.length]:o[S%o.length],u[d]=m}if(m=ue(f)?f.call(t.api,m,l):m,i&&e.defs){const S=t.$el.defs.selectAll(`[id$='-gradient${t.getTargetSelectorSuffix(d)}'] stop`);let E;S.each(function(C,w){E=w===0?this.style.stopColor:this.style.stopColor===E}),E===!0&&S.attr("stop-color",m)}return m}},generateLevelColor(){const t=this,{config:e}=t,n=e.color_pattern,r=e.color_threshold,i=r.unit==="value",o=r.max||100,s=r.values&&r.values.length?r.values:[];return pn(r)?function(l){const c=i?l:l*100/o;let u=n[n.length-1];for(let f=0,d=s.length;f<d;f++)if(c<=s[f]){u=n[f];break}return u}:null},generateTextBGColorFilter(t,e={x:0,y:0,width:1,height:1}){const n=this,{$el:{defs:r},state:i}=n;if(t){let o=[];Ye(t)?o.push(""):Ke(t)?o=Object.keys(t):ue(t)&&(o=n.mapToTargetIds()),o.forEach(s=>{const l=`${i.datetimeId}-labels-bg${n.getTargetSelectorSuffix(s)}${Ye(t)?n.getTargetSelectorSuffix(t):""}`,c=Yr(s===""?t:(t==null?void 0:t[s])||"");if(r.select(`#${l}`).empty()){const u=r.append("filter").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height).attr("id",l);u.append("feFlood").attr("flood-color",c),u.append("feComposite").attr("in","SourceGraphic")}})}},getGradienColortUrl(t){return`url(#${this.state.datetimeId}-gradient${this.getTargetSelectorSuffix(t)})`},updateLinearGradient(){const t=this,{config:e,data:{targets:n},state:{datetimeId:r},$el:{defs:i}}=t;n.forEach(o=>{const s=`${r}-gradient${t.getTargetSelectorSuffix(o.id)}`,l=t.hasPointType()&&e.point_radialGradient,c=t.isAreaType(o)&&"area"||t.isBarType(o)&&"bar";if((l||c)&&i.select(`#${s}`).empty()){const u=t.color(o),f={defs:null,stops:[]};if(l){const{cx:d=.3,cy:h=.3,r:m=.7,stops:S=[[.1,u,0],[.9,u,1]]}=l;f.stops=S,f.defs=i.append("radialGradient").attr("id",`${s}`).attr("cx",d).attr("cy",h).attr("r",m)}else{const d=e.axis_rotated,{x:h=d?[1,0]:[0,0],y:m=d?[0,0]:[0,1],stops:S=[[0,u,1],[1,u,0]]}=e[`${c}_linearGradient`];f.stops=S,f.defs=i.append("linearGradient").attr("id",`${s}`).attr("x1",h[0]).attr("x2",h[1]).attr("y1",m[0]).attr("y2",m[1])}f.stops.forEach(d=>{const[h,m,S]=d,E=ue(m)?m.bind(t.api)(o.id):m;f.defs&&f.defs.append("stop").attr("offset",h).attr("stop-color",E||u).attr("stop-opacity",S)})}})},setOverColor(t,e){const n=this,{config:r,$el:{main:i}}=n,o=r.color_onover;let s=t?o:n.color;Ke(s)?s=({id:l})=>l in o?o[l]:n.color(l):Ye(s)?s=()=>o:ue(o)&&(s=s.bind(n.api)),i.selectAll(Ke(e)?`.${Qe.arc}${n.getTargetSelectorSuffix(e.id)}`:`.${An.shape}-${e}`).style("fill",s)}},fi=0,oo=0,so=0,Xh=1e3,bs,lo,Ss=0,Ga=0,As=0,co=typeof performance=="object"&&performance.now?performance:Date,Wh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Lc(){return Ga||(Wh(Db),Ga=co.now()+As)}function Db(){Ga=0}function Es(){this._call=this._time=this._next=null}Es.prototype=Vh.prototype={constructor:Es,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?Lc():+n)+(e==null?0:+e),!this._next&&lo!==this&&(lo?lo._next=this:bs=this,lo=this),this._call=t,this._time=n,Dc()},stop:function(){this._call&&(this._call=null,this._time=1/0,Dc())}};function Vh(t,e,n){var r=new Es;return r.restart(t,e,n),r}function Fb(){Lc(),++fi;for(var t=bs,e;t;)(e=Ga-t._time)>=0&&t._call.call(void 0,e),t=t._next;--fi}function jh(){Ga=(Ss=co.now())+As,fi=oo=0;try{Fb()}finally{fi=0,$b(),Ga=0}}function Nb(){var t=co.now(),e=t-Ss;e>Xh&&(As-=e,Ss=t)}function $b(){for(var t,e=bs,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:bs=n);lo=t,Dc(r)}function Dc(t){if(!fi){oo&&(oo=clearTimeout(oo));var e=t-Ga;e>24?(t<1/0&&(oo=setTimeout(jh,t-co.now()-As)),so&&(so=clearInterval(so))):(so||(Ss=co.now(),so=setInterval(Nb,Xh)),fi=1,Wh(jh))}}function Hh(t,e,n){var r=new Es;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var Bb=ys("start","end","cancel","interrupt"),zb=[],Yh=0,Kh=1,Fc=2,Cs=3,Zh=4,Nc=5,Is=6;function Rs(t,e,n,r,i,o){var s=t.__transition;if(!s)t.__transition={};else if(n in s)return;Ub(t,n,{name:e,index:r,group:i,on:Bb,tween:zb,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Yh})}function $c(t,e){var n=Cr(t,e);if(n.state>Yh)throw new Error("too late; already scheduled");return n}function zr(t,e){var n=Cr(t,e);if(n.state>Cs)throw new Error("too late; already running");return n}function Cr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ub(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=Vh(o,0,n.time);function o(u){n.state=Kh,n.timer.restart(s,n.delay,n.time),n.delay<=u&&s(u-n.delay)}function s(u){var f,d,h,m;if(n.state!==Kh)return c();for(f in r)if(m=r[f],m.name===n.name){if(m.state===Cs)return Hh(s);m.state===Zh?(m.state=Is,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete r[f]):+f<e&&(m.state=Is,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete r[f])}if(Hh(function(){n.state===Cs&&(n.state=Zh,n.timer.restart(l,n.delay,n.time),l(u))}),n.state=Fc,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Fc){for(n.state=Cs,i=new Array(h=n.tween.length),f=0,d=-1;f<h;++f)(m=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++d]=m);i.length=d+1}}function l(u){for(var f=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(c),n.state=Nc,1),d=-1,h=i.length;++d<h;)i[d].call(t,f);n.state===Nc&&(n.on.call("end",t,t.__data__,n.index,n.group),c())}function c(){n.state=Is,n.timer.stop(),delete r[e];for(var u in r)return;delete t.__transition}}function di(t,e){var n=t.__transition,r,i,o=!0,s;if(n){e=e==null?null:e+"";for(s in n){if((r=n[s]).name!==e){o=!1;continue}i=r.state>Fc&&r.state<Nc,r.state=Is,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[s]}o&&delete t.__transition}}function kb(t){return this.each(function(){di(this,t)})}var Jh=180/Math.PI,Bc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Qh(t,e,n,r,i,o){var s,l,c;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,c/=l),t*r<e*n&&(t=-t,e=-e,c=-c,s=-s),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*Jh,skewX:Math.atan(c)*Jh,scaleX:s,scaleY:l}}var ws;function Gb(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Bc:Qh(e.a,e.b,e.c,e.d,e.e,e.f)}function Xb(t){return t==null||(ws||(ws=document.createElementNS("http://www.w3.org/2000/svg","g")),ws.setAttribute("transform",t),!(t=ws.transform.baseVal.consolidate()))?Bc:(t=t.matrix,Qh(t.a,t.b,t.c,t.d,t.e,t.f))}function _h(t,e,n,r){function i(u){return u.length?u.pop()+" ":""}function o(u,f,d,h,m,S){if(u!==d||f!==h){var E=m.push("translate(",null,e,null,n);S.push({i:E-4,x:Tr(u,d)},{i:E-2,x:Tr(f,h)})}else(d||h)&&m.push("translate("+d+e+h+n)}function s(u,f,d,h){u!==f?(u-f>180?f+=360:f-u>180&&(u+=360),h.push({i:d.push(i(d)+"rotate(",null,r)-2,x:Tr(u,f)})):f&&d.push(i(d)+"rotate("+f+r)}function l(u,f,d,h){u!==f?h.push({i:d.push(i(d)+"skewX(",null,r)-2,x:Tr(u,f)}):f&&d.push(i(d)+"skewX("+f+r)}function c(u,f,d,h,m,S){if(u!==d||f!==h){var E=m.push(i(m)+"scale(",null,",",null,")");S.push({i:E-4,x:Tr(u,d)},{i:E-2,x:Tr(f,h)})}else(d!==1||h!==1)&&m.push(i(m)+"scale("+d+","+h+")")}return function(u,f){var d=[],h=[];return u=t(u),f=t(f),o(u.translateX,u.translateY,f.translateX,f.translateY,d,h),s(u.rotate,f.rotate,d,h),l(u.skewX,f.skewX,d,h),c(u.scaleX,u.scaleY,f.scaleX,f.scaleY,d,h),u=f=null,function(m){for(var S=-1,E=h.length,C;++S<E;)d[(C=h[S]).i]=C.x(m);return d.join("")}}}var Wb=_h(Gb,"px, ","px)","deg)"),Vb=_h(Xb,", ",")",")");function jb(t,e){var n,r;return function(){var i=zr(this,t),o=i.tween;if(o!==n){r=n=o;for(var s=0,l=r.length;s<l;++s)if(r[s].name===e){r=r.slice(),r.splice(s,1);break}}i.tween=r}}function Hb(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=zr(this,t),s=o.tween;if(s!==r){i=(r=s).slice();for(var l={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=l;break}c===u&&i.push(l)}o.tween=i}}function Yb(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Cr(this.node(),n).tween,i=0,o=r.length,s;i<o;++i)if((s=r[i]).name===t)return s.value;return null}return this.each((e==null?jb:Hb)(n,t,e))}function zc(t,e,n){var r=t._id;return t.each(function(){var i=zr(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Cr(i,r).value[e]}}function qh(t,e){var n;return(typeof e=="number"?Tr:e instanceof Ea?No:(n=Ea(e))?(e=n,No):Yu)(t,e)}function Kb(t){return function(){this.removeAttribute(t)}}function Zb(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Jb(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttribute(t);return s===i?null:s===r?o:o=e(r=s,n)}}function Qb(t,e,n){var r,i=n+"",o;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===r?o:o=e(r=s,n)}}function _b(t,e,n){var r,i,o;return function(){var s,l=n(this),c;return l==null?void this.removeAttribute(t):(s=this.getAttribute(t),c=l+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,l)))}}function qb(t,e,n){var r,i,o;return function(){var s,l=n(this),c;return l==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),c=l+"",s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,l)))}}function tS(t,e){var n=Ot(t),r=n==="transform"?Vb:qh;return this.attrTween(t,typeof e=="function"?(n.local?qb:_b)(n,r,zc(this,"attr."+t,e)):e==null?(n.local?Zb:Kb)(n):(n.local?Qb:Jb)(n,r,e))}function eS(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function nS(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function rS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&nS(t,o)),n}return i._value=e,i}function aS(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&eS(t,o)),n}return i._value=e,i}function iS(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=Ot(t);return this.tween(n,(r.local?rS:aS)(r,e))}function oS(t,e){return function(){$c(this,t).delay=+e.apply(this,arguments)}}function sS(t,e){return e=+e,function(){$c(this,t).delay=e}}function lS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?oS:sS)(e,t)):Cr(this.node(),e).delay}function cS(t,e){return function(){zr(this,t).duration=+e.apply(this,arguments)}}function uS(t,e){return e=+e,function(){zr(this,t).duration=e}}function fS(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?cS:uS)(e,t)):Cr(this.node(),e).duration}function dS(t,e){if(typeof e!="function")throw new Error;return function(){zr(this,t).ease=e}}function hS(t){var e=this._id;return arguments.length?this.each(dS(e,t)):Cr(this.node(),e).ease}function gS(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;zr(this,t).ease=n}}function vS(t){if(typeof t!="function")throw new Error;return this.each(gS(this._id,t))}function pS(t){typeof t!="function"&&(t=M(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],s=o.length,l=r[i]=[],c,u=0;u<s;++u)(c=o[u])&&t.call(c,c.__data__,u,o)&&l.push(c);return new ra(r,this._parents,this._name,this._id)}function mS(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),s=new Array(r),l=0;l<o;++l)for(var c=e[l],u=n[l],f=c.length,d=s[l]=new Array(f),h,m=0;m<f;++m)(h=c[m]||u[m])&&(d[m]=h);for(;l<r;++l)s[l]=e[l];return new ra(s,this._parents,this._name,this._id)}function xS(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function yS(t,e,n){var r,i,o=xS(e)?$c:zr;return function(){var s=o(this,t),l=s.on;l!==r&&(i=(r=l).copy()).on(e,n),s.on=i}}function TS(t,e){var n=this._id;return arguments.length<2?Cr(this.node(),n).on.on(t):this.each(yS(n,t,e))}function bS(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function SS(){return this.on("end.remove",bS(this._id))}function AS(t){var e=this._name,n=this._id;typeof t!="function"&&(t=x(t));for(var r=this._groups,i=r.length,o=new Array(i),s=0;s<i;++s)for(var l=r[s],c=l.length,u=o[s]=new Array(c),f,d,h=0;h<c;++h)(f=l[h])&&(d=t.call(f,f.__data__,h,l))&&("__data__"in f&&(d.__data__=f.__data__),u[h]=d,Rs(u[h],e,n,h,u,Cr(f,n)));return new ra(o,this._parents,e,n)}function ES(t){var e=this._name,n=this._id;typeof t!="function"&&(t=I(t));for(var r=this._groups,i=r.length,o=[],s=[],l=0;l<i;++l)for(var c=r[l],u=c.length,f,d=0;d<u;++d)if(f=c[d]){for(var h=t.call(f,f.__data__,d,c),m,S=Cr(f,n),E=0,C=h.length;E<C;++E)(m=h[E])&&Rs(m,e,n,E,h,S);o.push(h),s.push(f)}return new ra(o,s,e,n)}var CS=de.prototype.constructor;function IS(){return new CS(this._groups,this._parents)}function RS(t,e){var n,r,i;return function(){var o=ne(this,t),s=(this.style.removeProperty(t),ne(this,t));return o===s?null:o===n&&s===r?i:i=e(n=o,r=s)}}function tg(t){return function(){this.style.removeProperty(t)}}function wS(t,e,n){var r,i=n+"",o;return function(){var s=ne(this,t);return s===i?null:s===r?o:o=e(r=s,n)}}function OS(t,e,n){var r,i,o;return function(){var s=ne(this,t),l=n(this),c=l+"";return l==null&&(c=l=(this.style.removeProperty(t),ne(this,t))),s===c?null:s===r&&c===i?o:(i=c,o=e(r=s,l))}}function PS(t,e){var n,r,i,o="style."+e,s="end."+o,l;return function(){var c=zr(this,t),u=c.on,f=c.value[o]==null?l||(l=tg(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(s,i=f),c.on=r}}function MS(t,e,n){var r=(t+="")=="transform"?Wb:qh;return e==null?this.styleTween(t,RS(t,r)).on("end.style."+t,tg(t)):typeof e=="function"?this.styleTween(t,OS(t,r,zc(this,"style."+t,e))).each(PS(this._id,t)):this.styleTween(t,wS(t,r,e),n).on("end.style."+t,null)}function LS(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function DS(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&LS(t,s,n)),r}return o._value=e,o}function FS(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,DS(t,e,n==null?"":n))}function NS(t){return function(){this.textContent=t}}function $S(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function BS(t){return this.tween("text",typeof t=="function"?$S(zc(this,"text",t)):NS(t==null?"":t+""))}function zS(t){return function(e){this.textContent=t.call(this,e)}}function US(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&zS(i)),e}return r._value=t,r}function kS(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,US(t))}function GS(){for(var t=this._name,e=this._id,n=ng(),r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,c,u=0;u<l;++u)if(c=s[u]){var f=Cr(c,e);Rs(c,t,n,u,s,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new ra(r,this._parents,t,n)}function XS(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,s){var l={value:s},c={value:function(){--i===0&&o()}};n.each(function(){var u=zr(this,r),f=u.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(l),e._.interrupt.push(l),e._.end.push(c)),u.on=e}),i===0&&o()})}var WS=0;function ra(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function eg(t){return de().transition(t)}function ng(){return++WS}var aa=de.prototype;ra.prototype=eg.prototype={constructor:ra,select:AS,selectAll:ES,selectChild:aa.selectChild,selectChildren:aa.selectChildren,filter:pS,merge:mS,selection:IS,transition:GS,call:aa.call,nodes:aa.nodes,node:aa.node,size:aa.size,empty:aa.empty,each:aa.each,on:TS,attr:tS,attrTween:iS,style:MS,styleTween:FS,text:BS,textTween:kS,remove:SS,tween:Yb,delay:lS,duration:fS,ease:hS,easeVarying:vS,end:XS,[Symbol.iterator]:aa[Symbol.iterator]};function Cw(t){return t*t*t}function Iw(t){return--t*t*t+1}function VS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var jS={time:null,delay:0,duration:250,ease:VS};function HS(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function YS(t){var e,n;t instanceof ra?(e=t._id,t=t._name):(e=ng(),(n=jS).time=Lc(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var s=r[o],l=s.length,c,u=0;u<l;++u)(c=s[u])&&Rs(c,t,e,u,s,n||HS(c,e));return new ra(r,this._parents,t,e)}de.prototype.interrupt=kb,de.prototype.transition=YS;var Uc=(t=>()=>t);function KS(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function ZS(t){t.stopImmediatePropagation()}function kc(t){t.preventDefault(),t.stopImmediatePropagation()}var rg={name:"drag"},Gc={name:"space"},hi={name:"handle"},gi={name:"center"};const{abs:ag,max:kn,min:Gn}=Math;function ig(t){return[+t[0],+t[1]]}function Xc(t){return[ig(t[0]),ig(t[1])]}var Os={name:"x",handles:["w","e"].map(uo),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ps={name:"y",handles:["n","s"].map(uo),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},JS={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(uo),input:function(t){return t==null?null:Xc(t)},output:function(t){return t}},ia={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},og={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},sg={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},QS={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},_S={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function uo(t){return{type:t}}function qS(t){return!t.ctrlKey&&!t.button}function tA(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function eA(){return navigator.maxTouchPoints||"ontouchstart"in this}function Wc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function nA(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function lg(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function rA(){return Vc(Os)}function aA(){return Vc(Ps)}function Rw(){return Vc(JS)}function Vc(t){var e=tA,n=qS,r=eA,i=!0,o=ys("start","brush","end"),s=6,l;function c(C){var w=C.property("__brush",E).selectAll(".overlay").data([uo("overlay")]);w.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ia.overlay).merge(w).each(function(){var z=Wc(this).extent;Ut(this).attr("x",z[0][0]).attr("y",z[0][1]).attr("width",z[1][0]-z[0][0]).attr("height",z[1][1]-z[0][1])}),C.selectAll(".selection").data([uo("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ia.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var N=C.selectAll(".handle").data(t.handles,function(z){return z.type});N.exit().remove(),N.enter().append("rect").attr("class",function(z){return"handle handle--"+z.type}).attr("cursor",function(z){return ia[z.type]}),C.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(r).on("touchstart.brush",h).on("touchmove.brush",m).on("touchend.brush touchcancel.brush",S).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}c.move=function(C,w,N){C.tween?C.on("start.brush",function(z){f(this,arguments).beforestart().start(z)}).on("interrupt.brush end.brush",function(z){f(this,arguments).end(z)}).tween("brush",function(){var z=this,$=z.__brush,G=f(z,arguments),V=$.selection,J=t.input(typeof w=="function"?w.apply(this,arguments):w,$.extent),Q=Ya(V,J);function rt(et){$.selection=et===1&&J===null?null:Q(et),u.call(z),G.brush()}return V!==null&&J!==null?rt:rt(1)}):C.each(function(){var z=this,$=arguments,G=z.__brush,V=t.input(typeof w=="function"?w.apply(z,$):w,G.extent),J=f(z,$).beforestart();di(z),G.selection=V===null?null:V,u.call(z),J.start(N).brush(N).end(N)})},c.clear=function(C,w){c.move(C,null,w)};function u(){var C=Ut(this),w=Wc(this).selection;w?(C.selectAll(".selection").style("display",null).attr("x",w[0][0]).attr("y",w[0][1]).attr("width",w[1][0]-w[0][0]).attr("height",w[1][1]-w[0][1]),C.selectAll(".handle").style("display",null).attr("x",function(N){return N.type[N.type.length-1]==="e"?w[1][0]-s/2:w[0][0]-s/2}).attr("y",function(N){return N.type[0]==="s"?w[1][1]-s/2:w[0][1]-s/2}).attr("width",function(N){return N.type==="n"||N.type==="s"?w[1][0]-w[0][0]+s:s}).attr("height",function(N){return N.type==="e"||N.type==="w"?w[1][1]-w[0][1]+s:s})):C.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(C,w,N){var z=C.__brush.emitter;return z&&(!N||!z.clean)?z:new d(C,w,N)}function d(C,w,N){this.that=C,this.args=w,this.state=C.__brush,this.active=0,this.clean=N}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(C,w){return this.starting?(this.starting=!1,this.emit("start",C,w)):this.emit("brush",C),this},brush:function(C,w){return this.emit("brush",C,w),this},end:function(C,w){return--this.active===0&&(delete this.state.emitter,this.emit("end",C,w)),this},emit:function(C,w,N){var z=Ut(this.that).datum();o.call(C,this.that,new KS(C,{sourceEvent:w,target:c,selection:t.output(this.state.selection),mode:N,dispatch:o}),z)}};function h(C){if(l&&!C.touches||!n.apply(this,arguments))return;var w=this,N=C.target.__data__.type,z=(i&&C.metaKey?N="overlay":N)==="selection"?rg:i&&C.altKey?gi:hi,$=t===Ps?null:QS[N],G=t===Os?null:_S[N],V=Wc(w),J=V.extent,Q=V.selection,rt=J[0][0],et,st,ct=J[0][1],dt,q,ft=J[1][0],lt,pt,Tt=J[1][1],Rt,Ct,Kt=0,re=0,Ee,Ce=$&&G&&i&&C.shiftKey,be,Ne,ye=Array.from(C.touches||[C],Ae=>{const hn=Ae.identifier;return Ae=gr(Ae,w),Ae.point0=Ae.slice(),Ae.identifier=hn,Ae});di(w);var De=f(w,arguments,!0).beforestart();if(N==="overlay"){Q&&(Ee=!0);const Ae=[ye[0],ye[1]||ye[0]];V.selection=Q=[[et=t===Ps?rt:Gn(Ae[0][0],Ae[1][0]),dt=t===Os?ct:Gn(Ae[0][1],Ae[1][1])],[lt=t===Ps?ft:kn(Ae[0][0],Ae[1][0]),Rt=t===Os?Tt:kn(Ae[0][1],Ae[1][1])]],ye.length>1&&je(C)}else et=Q[0][0],dt=Q[0][1],lt=Q[1][0],Rt=Q[1][1];st=et,q=dt,pt=lt,Ct=Rt;var Zt=Ut(w).attr("pointer-events","none"),ve=Zt.selectAll(".overlay").attr("cursor",ia[N]);if(C.touches)De.moved=Vt,De.ended=We;else{var xe=Ut(C.view).on("mousemove.brush",Vt,!0).on("mouseup.brush",We,!0);i&&xe.on("keydown.brush",xn,!0).on("keyup.brush",wn,!0),Oc(C.view)}u.call(w),De.start(C,z.name);function Vt(Ae){for(const hn of Ae.changedTouches||[Ae])for(const an of ye)an.identifier===hn.identifier&&(an.cur=gr(hn,w));if(Ce&&!be&&!Ne&&ye.length===1){const hn=ye[0];ag(hn.cur[0]-hn[0])>ag(hn.cur[1]-hn[1])?Ne=!0:be=!0}for(const hn of ye)hn.cur&&(hn[0]=hn.cur[0],hn[1]=hn.cur[1]);Ee=!0,kc(Ae),je(Ae)}function je(Ae){const hn=ye[0],an=hn.point0;var kr;switch(Kt=hn[0]-an[0],re=hn[1]-an[1],z){case Gc:case rg:{$&&(Kt=kn(rt-et,Gn(ft-lt,Kt)),st=et+Kt,pt=lt+Kt),G&&(re=kn(ct-dt,Gn(Tt-Rt,re)),q=dt+re,Ct=Rt+re);break}case hi:{ye[1]?($&&(st=kn(rt,Gn(ft,ye[0][0])),pt=kn(rt,Gn(ft,ye[1][0])),$=1),G&&(q=kn(ct,Gn(Tt,ye[0][1])),Ct=kn(ct,Gn(Tt,ye[1][1])),G=1)):($<0?(Kt=kn(rt-et,Gn(ft-et,Kt)),st=et+Kt,pt=lt):$>0&&(Kt=kn(rt-lt,Gn(ft-lt,Kt)),st=et,pt=lt+Kt),G<0?(re=kn(ct-dt,Gn(Tt-dt,re)),q=dt+re,Ct=Rt):G>0&&(re=kn(ct-Rt,Gn(Tt-Rt,re)),q=dt,Ct=Rt+re));break}case gi:{$&&(st=kn(rt,Gn(ft,et-Kt*$)),pt=kn(rt,Gn(ft,lt+Kt*$))),G&&(q=kn(ct,Gn(Tt,dt-re*G)),Ct=kn(ct,Gn(Tt,Rt+re*G)));break}}pt<st&&($*=-1,kr=et,et=lt,lt=kr,kr=st,st=pt,pt=kr,N in og&&ve.attr("cursor",ia[N=og[N]])),Ct<q&&(G*=-1,kr=dt,dt=Rt,Rt=kr,kr=q,q=Ct,Ct=kr,N in sg&&ve.attr("cursor",ia[N=sg[N]])),V.selection&&(Q=V.selection),be&&(st=Q[0][0],pt=Q[1][0]),Ne&&(q=Q[0][1],Ct=Q[1][1]),(Q[0][0]!==st||Q[0][1]!==q||Q[1][0]!==pt||Q[1][1]!==Ct)&&(V.selection=[[st,q],[pt,Ct]],u.call(w),De.brush(Ae,z.name))}function We(Ae){if(ZS(Ae),Ae.touches){if(Ae.touches.length)return;l&&clearTimeout(l),l=setTimeout(function(){l=null},500)}else Pc(Ae.view,Ee),xe.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);Zt.attr("pointer-events","all"),ve.attr("cursor",ia.overlay),V.selection&&(Q=V.selection),nA(Q)&&(V.selection=null,u.call(w)),De.end(Ae,z.name)}function xn(Ae){switch(Ae.keyCode){case 16:{Ce=$&&G;break}case 18:{z===hi&&($&&(lt=pt-Kt*$,et=st+Kt*$),G&&(Rt=Ct-re*G,dt=q+re*G),z=gi,je(Ae));break}case 32:{(z===hi||z===gi)&&($<0?lt=pt-Kt:$>0&&(et=st-Kt),G<0?Rt=Ct-re:G>0&&(dt=q-re),z=Gc,ve.attr("cursor",ia.selection),je(Ae));break}default:return}kc(Ae)}function wn(Ae){switch(Ae.keyCode){case 16:{Ce&&(be=Ne=Ce=!1,je(Ae));break}case 18:{z===gi&&($<0?lt=pt:$>0&&(et=st),G<0?Rt=Ct:G>0&&(dt=q),z=hi,je(Ae));break}case 32:{z===Gc&&(Ae.altKey?($&&(lt=pt-Kt*$,et=st+Kt*$),G&&(Rt=Ct-re*G,dt=q+re*G),z=gi):($<0?lt=pt:$>0&&(et=st),G<0?Rt=Ct:G>0&&(dt=q),z=hi),ve.attr("cursor",ia[N]),je(Ae));break}default:return}kc(Ae)}}function m(C){f(this,arguments).moved(C)}function S(C){f(this,arguments).ended(C)}function E(){var C=this.__brush||{selection:null};return C.extent=Xc(e.apply(this,arguments)),C.dim=t,C}return c.extent=function(C){return arguments.length?(e=typeof C=="function"?C:Uc(Xc(C)),c):e},c.filter=function(C){return arguments.length?(n=typeof C=="function"?C:Uc(!!C),c):n},c.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:Uc(!!C),c):r},c.handleSize=function(C){return arguments.length?(s=+C,c):s},c.keyModifiers=function(C){return arguments.length?(i=!!C,c):i},c.on=function(){var C=o.on.apply(o,arguments);return C===o?c:C},c}function cg(t){const{event:e,$el:n}=t,r=n.subchart.main||n.main;let i;return e&&e.type==="brush"?i=e.selection:r&&(i=r.select(".bb-brush").node())&&(i=lg(i)),i}function ug(t){const e=cg(t);return e?e[0]===e[1]:!0}function fg(t,e){return e.map(n=>{var r,i,o,s,l,c,u,f,d;const{values:h}=n,m=h[0],S=h[h.length-1],E=m?(i=(r=t.getXCacheKey)==null?void 0:r.call(t,m.x))!=null?i:m.x:"",C=S?(s=(o=t.getXCacheKey)==null?void 0:o.call(t,S.x))!=null?s:S.x:"",w=(c=(l=t.getTargetType)==null?void 0:l.call(t,n))!=null?c:"",N=(d=(f=(u=t.state)==null?void 0:u.subchartSourceTypes)==null?void 0:f[n.id])!=null?d:"";return`${n.id}:${w}:${N}:${h.length}:${E}:${C}`}).join("|")}function dg(t,e){var n;const r=(n=t.data)==null?void 0:n.targets;if(!r)return!1;for(let i=0;i<e.length;i++){const o=e[i],s=r.find(l=>l.id===o.id);if(!s||s.values!==o.values)return!1}return!0}function jc(t,e){pn(e)&&((t.min===void 0||e<t.min)&&(t.min=e),(t.max===void 0||e>t.max)&&(t.max=e))}function hg(t,e){for(let n=0;n<e.length;n++)jc(t,e[n])}function iA(t,e){var n,r,i,o;const s={min:void 0,max:void 0},l=t.state.hasAxis;for(let c=0;c<e.length;c++){const u=e[c],f=(n=t.isCandlestickType)==null?void 0:n.call(t,u),d=!f&&!!((r=t.isSubchartSourceTypeOf)!=null&&r.call(t,u,kt.CANDLESTICK)),{values:h}=u;for(let m=0;m<h.length;m++){const S=h[m];let E=S.value;if(!(Xe(E)||E===null))continue;const C=d?(i=t.getSubchartCandlestickShapeValue)==null?void 0:i.call(t,S,!0):void 0;le(C)?E=C:E!==null&&(f||d)&&(E=Array.isArray(E)?E.slice(0,4):[E.open,E.high,E.low,E.close]),Array.isArray(E)?hg(s,E):Ke(E)&&"high"in E?hg(s,Object.values(E)):(o=t.isBubbleZType)!=null&&o.call(t,S)?jc(s,l&&t.getBubbleZData(E,"y")):jc(s,E)}}return[s.min,s.max]}function oA(t,e){let n;for(let r=0;r<t.length;r++){const{values:i}=t[r];for(let o=0;o<i.length;o++){const{x:s}=i[o];pn(s)&&(n===void 0||(e==="min"?s<n:s>n))&&(n=s)}}return n}var sA={getYDomainMinMaxBoth(t){const e=this,{axis:n,cache:r,config:i,state:o}=e,l=dg(e,t)?`${ke.domainMinMax}_y_${fg(e,t)}`:null,c=l&&r.get(l);if(c&&c.generation===o.dataGeneration)return c.value;const u=i.data_groups,f=e.mapToIds(t),d=Gf(f);let h;if(u.length>0){const m=e.getValuesAsIdKeyed(t),S=t.some(G=>G.values.some(V=>V.value<0)),E=t.some(G=>G.values.some(V=>V.value>0)),C=new Map(f.map(G=>[G,n.getId(G)])),w={},N={};for(const G in m)w[G]=m[G].slice(),N[G]=m[G].slice();u.forEach(G=>{const V=G.filter(J=>d.has(J));if(V.length){const J=V[0],Q=C.get(J);w[J]&&S&&(w[J]=w[J].map(rt=>rt<0?rt:0)),N[J]&&E&&(N[J]=N[J].map(rt=>rt>0?rt:0)),V.filter((rt,et)=>et>0).forEach(rt=>{if(w[rt]){const et=C.get(rt);w[rt].forEach((st,ct)=>{const dt=+st;et===Q&&!(S&&dt>0)&&(w[J][ct]+=dt)})}if(N[rt]){const et=C.get(rt);N[rt].forEach((st,ct)=>{const dt=+st;et===Q&&!(E&&dt<0)&&(N[J][ct]+=dt)})}})}});const z=[],$=[];for(const G in w)z.push(br("min",w[G])),$.push(br("max",N[G]));h=[br("min",z),br("max",$)]}else h=iA(e,t);return l&&r.add(l,{generation:o.dataGeneration,value:h}),h},isHiddenTargetWithYDomain(t){const e=this;for(const n of e.state.hiddenTargetIds)if(e.axis.getId(n)===t)return!0;return!1},getYDomain(t,e,n){const r=this,{axis:i,config:o,scale:s}=r,l=`axis_${e}`;if(r.isStackNormalized()&&t.filter(q=>i.getId(q.id)===e).map(q=>q.id).some(q=>r.isGrouped(q)))return[0,100];const c=(s==null?void 0:s[e])&&s[e].type==="log",u=t.filter(ct=>i.getId(ct.id)===e),f=n?r.filterByXDomain(u,n):u;if(f.length===0)return r.isHiddenTargetWithYDomain(e)?s[e].domain():e==="y2"?s.y.domain():r.getYDomain(t,"y2",n);const d=o[`${l}_min`],h=o[`${l}_max`],m=o[`${l}_center`],S=o[`${l}_inverted`],E=r.hasDataLabel()&&o.axis_rotated,C=r.hasDataLabel()&&!o.axis_rotated,[w,N]=r.getYDomainMinMaxBoth(f);let z=w,$=N,G=[kt.BAR,kt.BUBBLE,kt.SCATTER,...Yn.Line].some(ct=>{const dt=ct.indexOf("area")>-1?"area":ct;return r.hasType(ct,f,!0)&&o[`${dt}_zerobased`]});z=Xe(d)?d:Xe(h)?z<=h?z:h-10:z,$=Xe(h)?h:Xe(d)?d<=$?$:d+10:$,isNaN(z)&&(z=0),isNaN($)&&($=z),z===$&&(z<0?$=0:z=0);const V=z>=0&&$>=0,J=z<=0&&$<=0;(Xe(d)&&V||Xe(h)&&J)&&(G=!1),G&&(V&&(z=0),J&&($=0));const Q=Math.abs($-z);let rt={top:Q*.1,bottom:Q*.1};if(on(m)){const ct=Math.max(Math.abs(z),Math.abs($));$=m+ct,z=m-ct}if(E){const ct=Ma(s.y.range()),dt=r.getDataLabelLength(z,$,"width").map(q=>{const ft=q/ct;return isFinite(ft)?ft:0});["bottom","top"].forEach((q,ft)=>{rt[q]+=Q*(dt[ft]/(1-dt[0]-dt[1]))})}else if(C){const ct=r.getDataLabelLength(z,$,"height");["bottom","top"].forEach((dt,q)=>{rt[dt]+=r.convertPixelToScale("y",ct[q],Q)})}rt=r.getResettedPadding(rt);const et=o[`${l}_padding`];pn(et)&&["bottom","top"].forEach(ct=>{rt[ct]=i.getPadding(et,ct,rt[ct],Q)}),G&&(V&&(rt.bottom=z),J&&(rt.top=-$));const st=c?[z,$].map(ct=>ct<0?0:ct):[z-rt.bottom,$+rt.top];return S?st.reverse():st},getXDomainMinMax(t,e){var n;const r=this,{cache:i,state:o}=r,s=r.config[`axis_x_${e}`],c=dg(r,t)?`${ke.domainMinMax}_x_${e}_${fg(r,t)}`:null,u=c&&i.get(c);let f=(u==null?void 0:u.generation)===o.dataGeneration?u.value:void 0;f===void 0&&(f=oA(t,e),c&&i.add(c,{generation:o.dataGeneration,value:f}));let d=Ke(s)?s.value:s;return d=on(d)&&((n=r.axis)!=null&&n.isTimeSeries())?Kn.bind(this)(d):d,Ke(s)&&s.fit&&(e==="min"&&d<f||e==="max"&&d>f)&&(d=void 0),on(d)?d:f},getXDomainPadding(t,e){const n=this,{axis:r,config:i}=n,o=i.axis_x_padding,s=r.isTimeSeries()&&e,l=Ma(t);let c;if(r.isCategorized()||s)c=0;else if(n.hasType("bar")){const d=n.getMaxDataCount();c=d>1?l/(d-1)/2:.5}else c=n.getResettedPadding(l*.01);let{left:u=c,right:f=c}=le(o)?{left:o,right:o}:o;if(o.unit==="px"){const d=Math.abs(l+l*.2);u=r.getPadding(o,"left",c,d),f=r.getPadding(o,"right",c,d)}else{const d=l+u+f;if(s&&d){const h=l/e/d;u=u/d/h,f=f/d/h}}return{left:u,right:f}},getXDomain(t){const e=this,{axis:n,config:r,scale:{x:i}}=e,o=r.axis_x_inverted,s=[e.getXDomainMinMax(t,"min"),e.getXDomainMinMax(t,"max")];let[l=0,c=0]=s;if(i.type!=="log"){const u=n.isCategorized(),f=n.isTimeSeries(),d=e.getXDomainPadding(s);let[h,m]=s;h-m===0&&!u&&(f?(h=new Date(h.getTime()*.5),m=new Date(m.getTime()*1.5)):(h=h===0?1:h*.5,m=m===0?-1:m*1.5)),(h||h===0)&&(l=f?new Date(h.getTime()-d.left):h-d.left),(m||m===0)&&(c=f?new Date(m.getTime()+d.right):m+d.right)}return o?[c,l]:[l,c]},updateXDomain(t,e,n,r,i){var o;const s=this,{config:l,org:c,scale:{x:u,subX:f}}=s,d=l.zoom_enabled;if(n&&(u.domain(i||ti(s.getXDomain(t),!l.axis_x_inverted)),c.xDomain=u.domain(),f.domain(u.domain()),(o=s.brush)==null||o.scale(f)),e){const h=i||!s.brush||ug(s)?c.xDomain:cg(s).map(f.invert);u.domain(h)}return(n||e)&&d&&s.zoom.updateScaleExtent(),r&&u.domain(s.trimXDomain(u.orgDomain())),u.domain()},trimXDomain(t){const e=this,n=e.config.axis_x_inverted,r=e.getZoomDomain(),[i,o]=r;return(n?t[0]>=i:t[0]<=i)&&(t[1]=+t[1]+(i-t[0]),t[0]=i),(n?t[1]<=o:t[1]>=o)&&(t[0]=+t[0]-(t[1]-o),t[1]=o),t},getZoomDomain(t="zoom",e=!1){const n=this,{config:r,scale:i,org:o}=n;let[s,l]=e&&i[t]?i[t].domain():o.xDomain;return t==="zoom"&&(on(r.zoom_x_min)&&(s=br("min",[s,r.zoom_x_min])),on(r.zoom_x_max)&&(l=br("max",[l,r.zoom_x_max]))),[s,l]},getZoomDomainValue(t){const e=this,{config:n,axis:r}=e;if(r.isCategorized()&&Array.isArray(t)){const i=n.axis_x_inverted;return t.map((s,l)=>Number(s)+(l===0?+i:+!i))}return t},convertPixelToScale(t,e,n){const r=this,{config:i,state:o}=r,s=i.axis_rotated;let l;return t==="x"?l=s?"height":"width":l=s?"width":"height",n*(e/o[l])},withinRange(t,e=[0,0],n){const i=this.config.axis_x_inverted,[o,s]=n;if(Array.isArray(t)){const l=i?t[1]:t[0],c=i?t[0]:t[1];if(l<c)return t.every((u,f)=>(f===0?i?+u<=o:+u>=o:i?+u>=s:+u<=s)&&!t.every((d,h)=>d===e[h]))}return!1}};function gg(t,e,n){const{config:r}=t,i=`axis_${e}_tick_format`;return(r[i]?r[i]:t.defaultValueFormat).call(t.api,n)}var lA={yFormat(t){return gg(this,"y",t)},y2Format(t){return gg(this,"y2",t)},getDefaultValueFormat(){const t=this,{defaultArcValueFormat:e,yFormat:n,y2Format:r}=t,i=t.hasArcType(null,["gauge","polar","radar"]);return function(o,s,l){return(i?e:t.axis&&t.axis.getId(l)==="y2"?r:n).call(t,o,s)}},defaultValueFormat(t){return en(t)?t.join("~"):Xe(t)?+t:""},defaultArcValueFormat(t,e){return`${(e*100).toFixed(1)}%`},defaultPolarValueFormat(t){return`${t}`},dataLabelFormat(t){const e=this,n=e.config.data_labels,r=o=>{let l=o;return en(o)?l=o.join("~"):Ke(o)&&(l=Object.values(o).join("~")),l};let i=r;return ue(n.format)?i=n.format:qn(n.format)&&(n.format[t]?i=n.format[t]===!0?r:n.format[t]:i=()=>""),i.bind(e.api)}};const vg=10,cA=750;function Ms(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}function uA(t,e=!0){var n;const{config:r}=this;let i=(n=r.data_names[t])!=null?n:t;return e&&ue(r.legend_format)&&(i=r.legend_format(i,t!==i?t:void 0)),i}function fA(t,e){var n;if(!e||e.empty())return;const r=(n=t.$el.legend)==null?void 0:n.selectAll(`.${Be.legendItem}`);r&&!r.empty()&&(e=r);const i=[];e.each(function(s){i.push({id:s,node:this})});const o=Xf(i,s=>s.id,s=>s.node);t.cache.add(ke.legendItemMap,o)}function pg(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function dA(t,e,n){const r=pg(n);t.state.legendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function mg(t,e){const n=t.state.legendTouch,r=n&&pg(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>vg||Math.abs(r.clientY-n.y)>vg)}function hA(t,e,n){mg(t,n);const r=t.state.legendTouch;return t.state.legendTouch=null,!!r&&r.id===e&&!r.moved}function gA(t,e){t.state.legendLastTouchClickId=e,t.state.legendLastTouchClickTime=Date.now()}function vA(t,e){const{state:n}=t,r=n.legendLastTouchClickId===e&&Date.now()-(n.legendLastTouchClickTime||0)<cA;return r&&(n.legendLastTouchClickId=null,n.legendLastTouchClickTime=0),r}function pA(t){var e;const n=(e=t.config.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Pa(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}var mA={initLegend(){var t;const e=this,{config:n,$el:r}=e;if(e.legendItemTextBox={},e.state.legendHasRendered=!1,e.state.isCanvasMode){n.legend_show?(t=e.updateHtmlLegend)==null||t.call(e):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets));return}n.legend_show?(n.legend_contents_bindto||(r.legend=e.$el.svg.append("g").classed(Be.legend,!0).attr("transform",e.getTranslate("legend"))),e.updateLegend()):e.state.hiddenLegendIds=new Set(e.mapToIds(e.data.targets))},updateLegend(t,e,n){var r;const i=this,{config:o,state:s,scale:l,$el:c}=i,u=e||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=fa(u,"withTransition",!0),u.withTransitionForTransform=fa(u,"withTransitionForTransform",!0),o.legend_contents_bindto&&o.legend_contents_template?i.updateLegendTemplate():s.hasTreemap||i.updateLegendElement(t||i.mapToIds(i.data.targets),u),(r=c.legend)==null||r.selectAll(`.${Be.legendItem}`).classed(Be.legendItemHidden,function(f){const d=!i.isTargetToShow(f);return d&&(this.style.opacity=null),d}),i.updateScales(!1,!l.zoom),i.updateSvgSize(),i.transformAll(u.withTransitionForTransform,n),s.legendHasRendered=!0},updateLegendTemplate(){const t=this,{config:e,$el:n}=t,r=Ut(e.legend_contents_bindto),i=e.legend_contents_template;if(!r.empty()){const o=t.mapToIds(t.data.targets),s=[];let l="";o.forEach(u=>{const f=ue(i)?Yr(i.call(t.api,u,t.color(u),t.api.data(u)[0].values)):Da(i,{COLOR:t.color(u),TITLE:u});f&&(s.push(u),l+=f)});const c=r.html(l).selectAll(function(){return this.childNodes}).data(s);t.setLegendItem(c),n.legend=r}},updateSizeForLegend(t){const e=this,{config:n,state:{isLegendTop:r,isLegendLeft:i,isLegendRight:o,isLegendInset:s,current:l}}=e,{width:c,height:u}=t,f={top:r?e.getCurrentPaddingByDirection("top")+n.legend_inset_y+5.5:l.height-u-e.getCurrentPaddingByDirection("bottom")-n.legend_inset_y,left:i?e.getCurrentPaddingByDirection("left")+n.legend_inset_x+.5:l.width-c-e.getCurrentPaddingByDirection("right")-n.legend_inset_x+.5};e.state.margin3={top:o?0:s?f.top:l.height-u,right:NaN,bottom:0,left:o?l.width-c:s?f.left:0}},transformLegend(t){const e=this,{$el:{legend:n},$T:r}=e;r(n,t).attr("transform",e.getTranslate("legend"))},updateLegendItemColor(t,e){const n=this,{legend:r}=n.$el;if(r){const i=n.getLegendItemById(t);i&&Ut(i).select("line").style("stroke",e)}},getLegendWidth(){const t=this,{current:{width:e},isLegendRight:n,isLegendInset:r,legendItemWidth:i,legendStep:o}=t.state;return t.config.legend_show?n||r?i*(o+1):e:0},getLegendHeight(){var t;const e=this,{current:n,isLegendRight:r,legendItemHeight:i,legendStep:o}=e.state,l=((t=e.config.padding)==null?void 0:t.mode)==="fit"?10:20;return e.config.legend_show?r?n.height:Math.max(l,i)*(o+1):0},opacityForUnfocusedLegend(t){return t.classed(Be.legendItemHidden)?null:"0.3"},toggleFocusLegend(t,e){const n=this,{$el:{legend:r},$T:i}=n,o=n.mapToTargetIds(t);r&&i(r.selectAll(`.${Be.legendItem}`).filter(s=>o.indexOf(s)>=0).classed(nn.legendItemFocused,e)).style("opacity",function(){return e?null:n.opacityForUnfocusedLegend.call(n,Ut(this))})},revertLegend(){const t=this,{$el:{legend:e},$T:n}=t;e&&n(e.selectAll(`.${Be.legendItem}`).classed(nn.legendItemFocused,!1)).style("opacity",null)},showLegend(t){const e=this,{config:n,$el:r,$T:i}=e;n.legend_show||(n.legend_show=!0,r.legend?r.legend.style("visibility",null):e.initLegend(),!e.state.legendHasRendered&&e.updateLegend()),e.removeHiddenLegendIds(t),i(r.legend.selectAll(e.selectorLegends(t)).style("visibility",null)).style("opacity",null)},hideLegend(t){const e=this,{config:n,$el:{legend:r}}=e;n.legend_show&&dr(t)&&(n.legend_show=!1,r==null||r.style("visibility","hidden")),e.addHiddenLegendIds(t),r==null||r.selectAll(e.selectorLegends(t)).style("opacity","0").style("visibility","hidden")},getLegendItemTextBox(t,e){const n=this,{cache:r,state:i}=n;let o;const s=ke.legendItemTextBox;return t&&(o=!i.redrawing&&r.get(s)||{},o[t]||(o[t]=n.getTextRect(e,Be.legendItem),r.add(s,o)),o=o[t]),o},setLegendItem(t){const e=this,{$el:n,api:r,config:i,state:o}=e,s=o.inputType==="touch",l=e.hasType("gauge"),c=i.boost_useCssRule,u=i.legend_item_interaction,f=u.dblclick?"dblclick":"click",d=u||ue(i.legend_item_onclick),h=s?pA(e):void 0,m=function(S,E){var C;if(!$e(i.legend_item_onclick,r,E,!o.hiddenTargetIds.has(E))){const{altKey:w,type:N}=S,z=Ut(this);N==="dblclick"||w?o.hiddenTargetIds.size&&!z.classed(Be.legendItemHidden)?r.show():(r.hide(),r.show(E)):(r.toggle(E),z.classed(nn.legendItemFocused,!1))}s&&(e.hideTooltip(),(C=e.hideGridFocus)==null||C.call(e,!0))};t.attr("class",function(S){const E=Ut(this);return(!E.empty()&&E.attr("class")||"")+e.generateClass(Be.legendItem,S)}).style("visibility",S=>e.isLegendToShow(S)?null:"hidden"),i.interaction_enabled&&(c&&[[`.${Be.legendItem}`,"cursor:pointer"],[`.${Be.legendItem} text`,"pointer-events:none"],[`.${Be.legendItemPoint} text`,"pointer-events:none"],[`.${Be.legendItemTile}`,"pointer-events:none"],[`.${Be.legendItemEvent}`,"fill-opacity:0"]].forEach(S=>{const[E,C]=S;e.setCssRule(!1,E,[C])(n.legend)}),t.on(f,d?function(S,E){s&&S.type==="click"&&vA(e,E)||m.call(this,S,E)}:null),s&&f==="click"&&d&&t.on("touchstart",function(S,E){dA(e,E,S)},h).on("touchmove",S=>{mg(e,S)},h).on("touchend",function(S,E){hA(e,E,S)&&(gA(e,E),m.call(this,S,E))},h),!s&&t.on("mouseout",u||ue(i.legend_item_onout)?function(S,E){$e(i.legend_item_onout,r,E,!o.hiddenTargetIds.has(E))||(Ut(this).classed(nn.legendItemFocused,!1),l&&e.undoMarkOverlapped(e,`.${cr.gaugeValue}`),e.api.revert())}:null).on("mouseover",u||ue(i.legend_item_onover)?function(S,E){$e(i.legend_item_onover,r,E,!o.hiddenTargetIds.has(E))||(Ut(this).classed(nn.legendItemFocused,!0),l&&e.markOverlapped(E,e,`.${cr.gaugeValue}`),!o.transiting&&e.isTargetToShow(E)&&r.focus(E))}:null),!t.empty()&&t.on("click mouseout mouseover")&&t.style("cursor",e.getStylePropValue("pointer"))),fA(e,t)},getLegendItemById(t){var e;const n=this,r=n.cache.get(ke.legendItemMap);if(r&&r instanceof Map)return r.get(t)||null;const i=(e=n.$el.legend)==null?void 0:e.selectAll(`.${Be.legendItem}`).filter(o=>o===t);return(i==null?void 0:i.node())||null},updateLegendElement(t,e){const n=this,{config:r,state:i,$el:{legend:o},$T:s}=n,c=r.legend_item_tile_type!=="circle",u=r.legend_item_tile_r,f={width:c?r.legend_item_tile_width:u*2,height:c?r.legend_item_tile_height:u*2},d={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:f.width+5,totalLength:0},h={offsets:{},widths:{},heights:{},margins:[0],steps:{}};let m,S,E;const C=t.filter(Q=>!on(r.data_names[Q])||r.data_names[Q]!==null),w=e.withTransition,N=i.isLegendRight||i.isLegendInset,z=uA.bind(n),$=n.getUpdateLegendPositions(C,d,h,N);i.isLegendInset&&(d.step=r.legend_inset_step?r.legend_inset_step:C.length,i.legendStep=d.step),i.isLegendRight?(m=Q=>d.max.width*h.steps[Q],S=Q=>h.margins[h.steps[Q]]+h.offsets[Q]):i.isLegendInset?(m=Q=>d.max.width*h.steps[Q]+10,S=Q=>h.margins[h.steps[Q]]+h.offsets[Q]):(m=Q=>h.margins[h.steps[Q]]+h.offsets[Q],S=Q=>d.max.height*h.steps[Q]);const G={xText:(Q,rt)=>m(Q,rt)+4+f.width,xRect:(Q,rt)=>m(Q,rt),x1Tile:(Q,rt)=>m(Q,rt)-2,x2Tile:(Q,rt)=>m(Q,rt)-2+f.width,yText:(Q,rt)=>S(Q,rt)+9,yRect:(Q,rt)=>S(Q,rt)-5,yTile:(Q,rt)=>S(Q,rt)+4};n.generateLegendItem(C,f,$,G,N,z),E=o.select(`.${Be.legendBackground} rect`),i.isLegendInset&&d.max.width>0&&E.size()===0&&(E=o.insert("g",`.${Be.legendItem}`).attr("class",Be.legendBackground).append("rect")),r.legend_tooltip&&o.selectAll("title").data(C).text(Q=>z(Q,!1));const V=o.selectAll("text").data(C).text(Q=>z(Q)).each(function(Q,rt){$(this,Q,rt)});s(V,w).attr("x",G.xText).attr("y",G.yText);const J=o.selectAll(`rect.${Be.legendItemEvent}`).data(C);s(J,w).attr("width",Q=>h.widths[Q]).attr("height",Q=>h.heights[Q]).attr("x",G.xRect).attr("y",G.yRect),n.updateLegendItemPos(C,w,G),E&&s(E,w).attr("height",n.getLegendHeight()-12).attr("width",d.max.width*(d.step+1)+10),i.legendItemWidth=d.max.width,i.legendItemHeight=d.max.height,i.legendStep=d.step},getUpdateLegendPositions(t,e,n,r){const i=this,{config:o,state:s}=i;return function(l,c,u){const f=u===0,d=u===t.length-1,h=i.getLegendItemTextBox(c,l),m=h.width+e.tileWidth+(d&&!r?0:e.padding.right)+o.legend_padding,S=h.height+e.padding.top,E=r?S:m,C=r?i.getLegendHeight():i.getLegendWidth();let w;const N=function($,G){G||(w=(C-e.totalLength-E)/2,w<e.posMin&&(w=(C-E)/2,e.totalLength=0,e.step++)),n.steps[$]=e.step,n.margins[e.step]=s.isLegendInset?10:w,n.offsets[$]=e.totalLength,e.totalLength+=E};if(f&&(e.totalLength=0,e.step=0,e.max.width=0,e.max.height=0),o.legend_show&&!i.isLegendToShow(c)){n.widths[c]=0,n.heights[c]=0,n.steps[c]=0,n.offsets[c]=0;return}n.widths[c]=m,n.heights[c]=S,(!e.max.width||m>=e.max.width)&&(e.max.width=m),(!e.max.height||S>=e.max.height)&&(e.max.height=S);const z=r?e.max.height:e.max.width;if(o.legend_equally){for(const $ in n.widths)n.widths[$]=e.max.width;for(const $ in n.heights)n.heights[$]=e.max.height;w=(C-z*t.length)/2,w<e.posMin?(e.totalLength=0,e.step=0,t.forEach($=>N($))):N(c,!0)}else N(c)}},generateLegendItem(t,e,n,r,i,o){const s=this,{config:l,state:c,$el:{legend:u}}=s,f=l.legend_usePoint,d=l.legend_item_tile_r,h=l.legend_item_tile_type,m=h!=="circle",S=-200,E=u.selectAll(`.${Be.legendItem}`).data(t).enter().append("g");if(s.setLegendItem(E),l.legend_tooltip&&E.append("title").text(C=>C),E.append("text").text(C=>o(C)).each(function(C,w){n(this,C,w)}).style("pointer-events",s.getStylePropValue("none")).attr("x",i?r.xText:S).attr("y",i?S:r.yText),E.append("rect").attr("class",Be.legendItemEvent).style("fill-opacity",s.getStylePropValue("0")).attr("x",i?r.xRect:S).attr("y",i?S:r.yRect),f){const C=[],w=s.getValidPointPattern();E.append(N=>{C.indexOf(N)===-1&&C.push(N);let z=w[C.indexOf(N)%w.length];return z==="rectangle"&&(z="rect"),Ze.createElementNS(Jt.svg,"hasValidPointType"in s&&s.hasValidPointType(z)?z:"use")}).attr("class",Be.legendItemPoint).style("fill",Ms.bind(s)).style("pointer-events",s.getStylePropValue("none")).attr("href",(N,z,$)=>{const V=$[z].nodeName.toLowerCase(),J=s.getTargetSelectorSuffix(N);return V==="use"?`#${c.datetimeId}-point${J}`:void 0})}else E.append(m?"line":h).attr("class",Be.legendItemTile).style("stroke",Ms.bind(s)).style("pointer-events",s.getStylePropValue("none")).call(C=>{h==="circle"?C.attr("r",d).style("fill",Ms.bind(s)).attr("cx",i?r.x2Tile:S).attr("cy",i?S:r.yTile):m&&C.attr("stroke-width",e.height).attr("x1",i?r.x1Tile:S).attr("y1",i?S:r.yTile).attr("x2",i?r.x2Tile:S).attr("y2",i?S:r.yTile)})},updateLegendItemPos(t,e,n){const r=this,{config:i,$el:{legend:o},$T:s}=r,l=i.legend_usePoint,c=i.legend_item_tile_type,u=c!=="circle";if(l){const f=o.selectAll(`.${Be.legendItemPoint}`).data(t),d=i.legend_item_tile_type!=="circle",h=d?i.legend_item_tile_width:i.legend_item_tile_r*2,m=d?i.legend_item_tile_height:i.legend_item_tile_r*2,S=h*.75,E=m*.75,C=h/8,w=m/8;s(f,e).each(function(){const N=this.nodeName.toLowerCase();let z="x",$="y",G=null,V=null,J=null;N==="circle"?(z="cx",$="cy",G=Math.min(S,E)/2):N==="rect"&&(V=S,J=E);const Q=Ut(this).attr("transform",null).attr("x",null).attr("y",null).attr("cx",null).attr("cy",null).attr("r",G).attr("width",V).attr("height",J);N==="use"?Q.attr("transform",rt=>`translate(${n.x1Tile(rt)} ${n.yTile(rt)-m/2}) scale(${C} ${w})`):Q.attr(z,rt=>n.x1Tile(rt)+(h-(V||0))/2).attr($,rt=>n.yTile(rt)-(J||0)/2)})}else{const f=o.selectAll(`.${Be.legendItemTile}`).data(t);s(f,e).style("stroke",Ms.bind(r)).call(d=>{c==="circle"?d.attr("cx",h=>{const m=n.x2Tile(h);return m-(m-n.x1Tile(h))/2}).attr("cy",n.yTile):u&&d.attr("x1",n.x1Tile).attr("y1",n.yTile).attr("x2",n.x2Tile).attr("y2",n.yTile)})}}},xA={redraw(t={}){var e,n,r,i,o,s,l,c,u,f;const d=this,{config:h,state:m,$el:S}=d,{main:E,treemap:C}=S;m.redrawing=!0,m.redrawGeneration++,(m.dirty.data||m.dirty.visibility||t.initializing)&&m.dataGeneration++,(t.initializing||m.dirty.size||m.dirty.data||!m.rendered)&&d.cache.remove([ke.svgLeft]);const w=d.filterTargetsToShow(d.data.targets);m._targetsToShow=w;const N={data:m.dirty.data,visibility:m.dirty.visibility,size:m.dirty.size};m.dirty.data=!1,m.dirty.visibility=!1,m.dirty.size=!1;const{flow:z,initializing:$}=t,G=d.getWithOption(t),V=G.Transition?h.transition_duration:0,J=G.TransitionForExit?V:0,Q=G.TransitionForAxis?V:0,rt=(e=d.axis)==null?void 0:e.generateTransitions(Q),et=N.data||N.visibility||$;if(m.isCanvasMode&&(d.setContainerSize(),(n=d.updateHtmlLegend)==null||n.call(d)),d.updateSizes($),m.isCanvasMode){const st=d.scale.zoom,ct=st==null?void 0:st.domain();st&&(d.scale.zoom=null),d.updateScales($,G.UpdateXDomain),st&&(st.range(d.scale.x.range()),ct&&st.domain(ct),d.scale.zoom=d.getCustomizedXScale(st),d.axis.x.scale(d.scale.zoom),d.scale.x.domain(h.zoom_rescale?ct:d.org.xDomain),d.scale.subX.domain(d.org.xDomain)),m.hasAxis&&d.axis.syncAxisDomains(w,G,z),m.hasAxis&&((r=d.applyCanvasSubchartDomain)==null||r.call(d));const dt=et?d.getDrawShape():m._cachedDrawShape||d.getDrawShape();et&&(m._cachedDrawShape=dt),(i=d.updateHtmlLegend)==null||i.call(d),(o=d.resizeCanvas)==null||o.call(d),m.canvasFocusKey=null,d.renderCanvasFrame(dt,null,!0),$&&d.updateTypesElements(),d.callPluginHook("$redraw",t,0),m.redrawing=!1,m._targetsToShow=null,m._cachedDrawShape=null,d.mapToIds(d.data.targets).forEach(q=>{m.withoutFadeIn[q]=!0}),$e(h.onrendered,d.api);return}G.Legend&&h.legend_show?(t.withTransition=!!V,!C&&d.updateLegend(d.mapToIds(d.data.targets),t,rt)):G.Dimension&&d.updateDimension(!0),h.data_empty_label_text&&E.select(`text.${Rn.text}.${Ue.empty}`).attr("x",m.width/2).attr("y",m.height/2).text(h.data_empty_label_text).style("display",w.length?"none":null),(s=d.redrawTitle)==null||s.call(d),m.hasAxis?(d.axis.redrawAxis(w,G,rt,z,$),(l=d.hasGrid)!=null&&l.call(d)&&d.updateGrid(),h.regions.length&&((c=d.updateRegion)==null||c.call(d)),["bar","candlestick","line","area"].forEach(st=>{const ct=Nn(st);(/^(line|area)$/.test(st)&&d.hasTypeOf(ct)||d.hasType(st))&&et&&d[`update${ct}`](G.TransitionForExit)}),S.text&&E.selectAll(`.${sn.selectedCircles}`).filter(d.isBarType.bind(d)).selectAll("circle").remove(),h.interaction_enabled&&!z&&G.EventRect&&(d.redrawEventRect(),(u=d.bindZoomEvent)==null||u.call(d))):(S.arcs&&d.redrawArc(V,J,G.Transform),S.radar&&d.redrawRadar(),S.polar&&d.redrawPolar(),S.funnel&&d.redrawFunnel(),C&&d.updateTreemap(J)),!m.resizing&&!C&&(d.hasPointType()||m.hasRadar)?et&&d.updateCircle():(f=d.hasLegendDefsPoint)!=null&&f.call(d)&&d.data.targets.forEach(d.point("create",this)),d.hasDataLabel()&&!d.hasArcType(null,["radar"])&&et&&d.updateText(),$&&d.updateTypesElements(),d.generateRedrawList(w,z,V,G.Subchart,et),d.updateTooltipOnRedraw(),d.callPluginHook("$redraw",t,V)},generateRedrawList(t,e,n,r,i=!0){const o=this,{config:s,state:l}=o,c=i?o.getDrawShape():l._cachedDrawShape||o.getDrawShape();i&&(l._cachedDrawShape=c),l.hasAxis&&s.subchart_show&&o.redrawSubchart(r,n,c);const u=e&&o.generateFlow({targets:t,flow:e,duration:e.duration,shape:c,xv:o.xv.bind(o)}),f=(n||u)&&ro(),d=o.getRedrawList(c,e,u,f),h=()=>{u&&u(),l.redrawing=!1,l._targetsToShow=null,l._cachedDrawShape=null,$e(s.onrendered,o.api)};if(f&&d.length){const m=Ch();eg().duration(n).each(()=>{d.flatMap(S=>S).forEach(S=>m.add(S))}).call(m,h)}else l.transiting||h();o.mapToIds(o.data.targets).forEach(m=>{l.withoutFadeIn[m]=!0})},getRedrawList(t,e,n,r){const i=this,{config:o,state:{hasAxis:s,hasRadar:l,hasTreemap:c},$el:{grid:u}}=i,{cx:f,cy:d,xForText:h,yForText:m}=t.pos,S=[];if(s){i.redrawGrid&&(o.grid_x_lines.length||o.grid_y_lines.length)&&S.push(i.redrawGrid(r)),i.redrawRegion&&o.regions.length&&S.push(i.redrawRegion(r));for(const E in t.type){const C=Nn(E),w=t.type[E];(/^(area|line)$/.test(E)&&i.hasTypeOf(C)||i.hasType(E))&&S.push(i[`redraw${C}`](w,r))}!e&&u.main&&i.updateGridFocus&&S.push(i.updateGridFocus())}return(!i.hasArcType()||l)&&pn(o.data_labels)&&o.data_labels!==!1&&S.push(i.redrawText(h,m,e,r)),(i.hasPointType()||l)&&!i.isPointFocusOnly()&&i.redrawCircle&&S.push(i.redrawCircle(f,d,r,n)),c&&S.push(i.redrawTreemap(r)),S},updateAndRedraw(t={}){const e=this,{config:n,state:r}=e;let i;t.withTransition=fa(t,"withTransition",!0),t.withTransform=fa(t,"withTransform",!1),t.withLegend=fa(t,"withLegend",!1),t.withUpdateXDomain=!0,t.withUpdateOrgXDomain=!0,t.withTransitionForExit=!1,t.withTransitionForTransform=fa(t,"withTransitionForTransform",t.withTransition),t.withLegend&&n.legend_show||(r.hasAxis&&(i=e.axis.generateTransitions(t.withTransitionForAxis?n.transition_duration:0)),e.updateScales(),e.updateSvgSize(),e.transformAll(t.withTransitionForTransform,i)),e.redraw(t)}},yA={setContainerSize(){const t=this,{state:e}=t;e.current.width=t.getCurrentWidth(),e.current.height=t.getCurrentHeight()},getCurrentWidth(){const t=this;return t.config.size_width||t.getParentRectValue("width")},getCurrentHeight(){const t=this,{config:e}=t,n=e.size_height||t.getParentHeight();return n>0?n:320/(t.hasType("gauge")&&!e.gauge_fullCircle?2:1)},getParentRectValue(t){const e=`offset${Nn(t)}`;let n=this.$el.chart.node(),r=0;for(;r<30&&n&&n.tagName!=="BODY";){try{r=cn(n,!0)[t]}catch(o){e in n&&(r=n[e])}n=n.parentNode}const i=Ze.body[e];return r>i&&(r=i),r},getParentHeight(){const t=this.$el.chart.style("height");let e=0;return t&&(e=/px$/.test(t)?parseInt(t,10):this.getParentRectValue("height")),e},getSvgLeft(t){var e,n,r;const i=this,{cache:o,config:s,state:{hasAxis:l},$el:c}=i;if(t){const rt=o.get(ke.svgLeft);if(rt!==null)return rt}const u=s.axis_rotated,f=u||!u&&!s.axis_y_inner,d=u?Pn.axisX:Pn.axisY,h=c.main.select(`.${d}`).node(),m=l&&s[`axis_${u?"x":"y"}_label`],E=l&&(Ye(m)||Ye(m.text)||/^inner-/.test(m==null?void 0:m.position))?c.main.select(`.${d}-label`):null,C=E&&!E.empty()?E.node():null,w=!t,N={label:C?cn(C,w):null,leftAxis:h&&f?cn(h,w):null,chart:cn(c.chart.node(),w)},z=(n=(e=N.label)==null?void 0:e.left)!=null?n:0,$=(r=N.leftAxis)!=null?r:{right:0},G=N.chart.left+z,V=i.hasArcType(),J=$.right-G-(V?0:i.getCurrentPaddingByDirection("left",t)),Q=J>0?J:0;return o.add(ke.svgLeft,Q),Q},updateDimension(t){var e,n;const r=this,{config:i,state:{hasAxis:o,isCanvasMode:s},$el:l}=r;if(o&&!t&&r.axis.x&&i.axis_rotated&&((e=r.axis.subX)==null||e.create(l.axis.subX)),r.updateScales(t),s){(n=r.resizeCanvas)==null||n.call(r);return}r.updateSvgSize(),r.transformAll(!1)},updateSvgSize(){var t;const e=this,{config:n,state:{clip:r,current:i,hasAxis:o,width:s,height:l},$el:{svg:c}}=e;if(!c){(t=e.resizeCanvas)==null||t.call(e);return}if(n.resize_auto==="viewBox"?c.attr("viewBox",`0 0 ${i.width} ${i.height}`):c.attr("width",i.width).attr("height",i.height),o){const u=c.select(`.${gh.brush} .overlay`),f={width:0,height:0};u.size()&&(f.width=+u.attr("width"),f.height=+u.attr("height")),c.selectAll([`#${r.id}`,`#${r.idGrid}`]).select("rect").attr("width",s).attr("height",l),c.select(`#${r.idXAxis}`).select("rect").call(e.setXAxisClipPath.bind(e)),c.select(`#${r.idYAxis}`).select("rect").call(e.setYAxisClipPath.bind(e)),r.idSubchart&&c.select(`#${r.idSubchart}`).select("rect").attr("width",s).attr("height",f.height)}},getCurrentPaddingByDirection(t,e=!1,n=!1){var r;const i=this,{config:o,$el:s,state:{hasAxis:l,isCanvasMode:c}}=i,u=o.axis_rotated,f=((r=o.padding)==null?void 0:r.mode)==="fit",d=le(o[`padding_${t}`])?o[`padding_${t}`]:void 0,h=l?{top:u?"y2":null,bottom:u?"y":"x",left:u?"x":"y",right:u?null:"y2"}[t]:null,m=/^(left|right)$/.test(t),S=h&&o[`axis_${h}_inner`],E=h&&o[`axis_${h}_show`],C=h?o[`axis_${h}_axes`].length:0;let w=h?m?i.getAxisWidthByAxisId(h,e):i.getHorizontalAxisHeight(h):0;const N=20;let z=0;!f&&m&&(w=hy(w));let $=l&&m&&(S||Tn(d)&&!E)?0:f?(E?w:0)+(d!=null?d:0):Tn(d)?w:d;return m&&l?(h&&(f||S)&&o[`axis_${h}_label`].text&&($+=i.axis.getAxisLabelPosition(h).isOuter?N:0),t==="right"?($+=u?!f&&Tn(d)?10:2:!E||S?f?2:1:0,$+=n?i.axis.getXAxisTickTextY2Overflow(N):0):t==="left"&&u&&Tn(d)&&($=o.axis_x_show?f?w:Math.max(w,40):1)):t==="top"?((s.title&&s.title.node()||c&&o.title_text)&&($+=i.getTitlePadding()),z=u&&!S?C:0):t==="bottom"&&l&&u&&!E&&($+=1),$+w*C-z},getCurrentPadding(t=!1){const e=this,[n,r,i,o]=["top","bottom","left","right"].map(s=>e.getCurrentPaddingByDirection(s,null,t));return{top:n,bottom:r,left:i,right:o}},getResettedPadding(t){const e=this,{config:n}=e,r=le(t);let i=r?0:{};return n.padding===!1?!r&&Object.keys(t).forEach(o=>{i[o]=!dr(n.data_labels)&&n.data_labels!==!1&&o==="top"?t[o]:0}):i=t,i},updateSizes(t){var e,n,r,i,o;const s=this,{config:l,state:c,$el:{legend:u}}=s,f=l.axis_rotated,d=s.hasArcType()||c.hasFunnel||c.hasTreemap,h=((e=l.padding)==null?void 0:e.mode)==="fit";!t&&s.setContainerSize();const m=u?s.getLegendWidth():0,S=u?s.getLegendHeight():0,E={width:m,height:S};!d&&l.axis_x_show&&l.axis_x_tick_autorotate&&s.updateXAxisTickClip();const C={right:l.legend_show&&c.isLegendRight?m+(h?0:20):0,bottom:!l.legend_show||c.isLegendRight||c.isLegendInset?0:S},w=f||d?0:s.getHorizontalAxisHeight("x"),N=l.subchart_axis_x_show&&l.subchart_axis_x_tick_text_show?w:30,z=l.subchart_show&&!d?l.subchart_size_height+N:0,$=s.hasType("gauge")&&l.arc_needle_show&&!l.gauge_fullCircle&&!l.gauge_label_show?10:0,G=s.getCurrentPadding(!0);if(c.margin=!d&&f?{top:G.top,right:d?0:G.right+C.right,bottom:C.bottom+G.bottom,left:z+(d?0:G.left)}:{top:(h?0:4)+G.top,right:d?0:G.right+C.right,bottom:$+z+C.bottom+G.bottom,left:d?0:G.left},c.margin=s.getResettedPadding(c.margin),c.margin2=f?{top:c.margin.top,right:NaN,bottom:20+C.bottom,left:s.state.rotatedPadding.left}:{top:c.current.height-z-C.bottom,right:NaN,bottom:N+C.bottom,left:c.margin.left},c.margin3={top:0,right:NaN,bottom:0,left:0},(n=s.updateSizeForLegend)==null||n.call(s,E),c.width=c.current.width-c.margin.left-c.margin.right,c.height=c.current.height-c.margin.top-c.margin.bottom,c.width<0&&(c.width=0),c.height<0&&(c.height=0),c.width2=f?c.margin.left-c.rotatedPadding.left-c.rotatedPadding.right:c.width,c.height2=f?c.height:c.current.height-c.margin2.top-c.margin2.bottom,c.width2<0&&(c.width2=0),c.height2<0&&(c.height2=0),s.hasArcType()){const V=s.hasType("gauge"),J=l.legend_show&&c.isLegendRight,Q=(r=c.hasRadar&&s.cache.get(ke.radarTextWidth))!=null?r:0;c.arcWidth=c.width-(J?E.width+10:0)-Q,c.arcHeight=c.height-(J&&!V?0:10),(i=l.arc_rangeText_values)!=null&&i.length&&(V?(c.arcWidth-=25,c.arcHeight-=10,c.margin.left+=10):(c.arcHeight-=20,c.margin.top+=10)),V&&!l.gauge_fullCircle&&(c.arcHeight+=c.height-s.getPaddingBottomForGauge()),(o=s.updateRadius)==null||o.call(s)}c.isLegendRight&&d&&(c.margin3.left=c.arcWidth/2+c.radiusExpanded*1.1)}},TA={setCssRule(t,e,n,r){const i=this,{config:o,state:{cssRule:s,style:l}}=i;return o.boost_useCssRule?c=>{c.each(u=>{const f=r&&(r==null?void 0:r.call(i,u)),d=`${t?`.${An.shapes+i.getTargetSelectorSuffix(u.id)}`:""}${e}`;e in s&&l.sheet.deleteRule(s[d]),i.state.cssRule[d]=k1(l,d,n.filter(Boolean).map(h=>Ye(f)&&h.indexOf(":")===-1?`${h}: ${f}`:h||""))})}:()=>{}},getStylePropValue(t){const{config:{boost_useCssRule:e}}=this;return e?null:ue(t)?t.bind(this):t}};function xg(t){return typeof t=="string"?new vt([document.querySelectorAll(t)],[document.documentElement]):new vt([b(t)],At)}function bA(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function SA(t,e,n,r,i){var o;const s=this,{value:l}=t,c=s.isCandlestickType(t),u=le(l)&&l<0||c&&!((o=s.getCandlestickData(t))!=null&&o._isUp);let{x:f,y:d}=e;const h=4,m=h*2;return r?n==="start"?(f+=u?0:m,d+=h):n==="middle"?(f+=m,d-=m):n==="end"&&(u&&(f-=m),d+=h):(n==="start"?(f+=h,u&&(d+=m*2)):n==="middle"?d-=m:n==="end"&&(f-=h,u&&(d+=m*2)),i&&(d+=u?-17:c?13:7)),{x:f,y:d}}function yg(t,e){var n;const r=this.config.data_labels_position,{id:i,index:o,value:s}=t;return(n=ue(r)?r.bind(this.api)(e,s,i,o,this.$el.text):(i in r?r[i]:r)[e])!=null?n:0}function AA(t,e,n){var r,i;const o=this,{config:s,$T:l}=o,c=s.axis_rotated,{border:{padding:u="3 5",radius:f=10,stroke:d="#000",strokeWidth:h=1,fill:m="none"}}=s.data_labels,S=Uf(u),E=s.data_labels.border!==!0,C=ya(t);let w=Ut(t.previousElementSibling);(w.empty()||((r=w.node())==null?void 0:r.tagName)!=="rect"||!((i=w.attr("class"))!=null&&i.includes(n)))&&(w=Ut(t.parentNode).insert("rect",()=>t).attr("class",`${Rn.textBorderRect} ${n}`).attr("width",C.width+(E?S.left+S.right:0)).attr("height",C.height+(E?S.top+S.bottom:0)),E&&w.style("fill",m).style("stroke",d).style("stroke-width",`${h}px`).attr("rx",f).attr("ry",f)),l(w).attr("x",e.x-(E?S.left:0)-(c?0:C.width/2)).attr("y",e.y-(E?S.top:0)-C.height/4*3.2)}function Hc(t=0,e){const n=this,{config:r}=n,i=r[`${e}_label_threshold`]||0;return t>=i}function Tg(){const t=this,{$el:{text:e},config:n}=t;(t.state.arcWidth?t.getArcLabelConfig("image"):n.data_labels.image)&&e.filter(function(){const i=this.previousElementSibling;return i?i.tagName!=="image"||!i.classList.contains(Rn.textLabelImage):!0}).each(function(i){var o,s,l,c;const u=EA.call(t,i);if(!u)return;const{url:f,width:d,height:h,pos:m}=u;if(f){const S=Ut(this.parentNode);S==null||S.insert("image",`${(s=(o=this.getAttribute("class"))==null?void 0:o.replace(/(?:^(.)|\s)/g,".$1"))!=null?s:"text"}`).style("opacity","0").attr("href",E=>Da(f,{ID:"id"in E?E.id:E.data.id})).attr("class",Rn.textLabelImage).style("pointer-events","none").attr("width",d).attr("height",h).attr("transform",m?`translate(${(l=m.x)!=null?l:0} ${(c=m.y)!=null?c:0})`:null)}})}function EA(t){var e;const n=this,{config:r,state:i}=n,o=i.arcWidth?n.getArcLabelConfig("image"):r.data_labels.image;if(ue(o))return(e=o.call(n.api,t.value,t.id,t.index))!=null?e:{url:"",width:0,height:0,pos:{x:0,y:0}};if(o){const{url:s="",width:l=0,height:c=0,pos:u}=o;return{url:s,width:l,height:c,pos:u}}return null}function bg(t,e,n){var r;const i=this,{config:o,state:{arcWidth:s,hasTreemap:l}}=i,c=o.axis_rotated,u=Ut(t.previousElementSibling),f=d=>{var h;const m=d.style.opacity!=="0"&&d.style.fillOpacity!=="0";return(s?d.textContent:m)&&((h=this.previousElementSibling)==null?void 0:h.tagName)!=="image"};if(!u.empty()&&((r=u.node())==null?void 0:r.tagName)==="image"){const d=n||cn(t),h=+u.attr("width")/2,m=+u.attr("height")/2;let S=e.x-h,E=e.y-m-d.height/2;c?e.x+=h:(l&&(S=-h,E=-(m*2+d.height)),i.hasType("pie")||i.hasType("polar")||(e.y+=m)),i.$T(u).style("opacity",f(t)?null:"0").attr("x",S).attr("y",E)}}function CA(t){return Xf(t,e=>e,e=>ya(e,!0))}var IA={opacityForText(t){const e=this;return e.isBarType(t)&&!Hc.call(e,Math.abs(e.getRatio("bar",t)),"bar")?"0":e.hasDataLabel()?null:"0"},initText(){const{$el:t}=this;t.main.select(`.${Ue.chart}`).append("g").attr("class",Rn.chartTexts).style("pointer-events",t.funnel||t.treemap?"none":null)},updateTargetsForText(t){const e=this,n=e.getChartClass("Text"),r=e.getClass("texts","id"),i=e.classFocus.bind(e);e.$el.main.select(`.${Rn.chartTexts}`).selectAll(`.${Rn.chartText}`).data(e.filterNullish(t)).attr("class",l=>`${n(l)}${i(l)}`.trim()).enter().append("g").style("opacity","0").attr("class",n).call(e.setCssRule(!0,` .${Rn.text}`,["fill","pointer-events:none"],e.updateTextColor)).append("g").attr("class",r)},updateText(){const t=this,{$el:e,$T:n,config:r,axis:i}=t,o=t.getClass("text","index"),s=r.data_labels.centered,l=e.main.selectAll(`.${Rn.texts}`).selectAll(`.${Rn.text}`).data(t.labelishData.bind(t));n(l.exit()).style("fill-opacity","0").remove(),e.text=l.enter().append("text").merge(l).attr("class",o).attr("text-anchor",c=>{let f=r[`axis_${i==null?void 0:i.getId(c.id)}_inverted`]?c.value>0:c.value<0;if(t.isCandlestickType(c)){const d=t.getCandlestickData(c);f=!(d!=null&&d._isUp)}else if(t.isTreemapType(c))return s?"middle":"start";return r.axis_rotated?f?"end":"start":"middle"}).style("fill",t.getStylePropValue(t.updateTextColor)).style("fill-opacity","0").each(function(c,u,f){const d=Ut(this);let{value:h}=c;if(t.isBubbleZType(c))h=t.getBubbleZData(h,"z");else if(t.isCandlestickType(c)){const m=t.getCandlestickData(c);m&&(h=m.close)}h=t.isTreemapType(c)?t.treemapDataLabelFormat(c)(d):t.dataLabelFormat(c.id)(h,c.id,c.index,f),le(h)?this.textContent=h:ci(d,h,void 0,!0)}),Tg.call(t)},updateTextColor(t){const e=this,{config:n}=e,r=n.data_labels_colors,i=e.isArcType(t)&&!e.isRadarType(t)||e.isFunnelType(t)||e.isTreemapType(t)?null:e.color(t);let o;if(Ye(r))o=r;else if(Ke(r)){const{id:s}=t.data||t;o=r[s]}else ue(r)&&(o=r.bind(e.api)(i,t));if(e.isCandlestickType(t)&&!ue(r)){const s=e.getCandlestickData(t);if(!(s!=null&&s._isUp)){const l=n.candlestick_color_down;o=Ke(l)?l[t.id]:l}}return o||i},updateTextBGColor(t,e){const n=this,{$el:{defs:r}}=n;let i="";if(e){const o=Ye(e)?"":n.getTargetSelectorSuffix("id"in t?t.id:t.data.id),s=r.select(["filter[id*='labels-bg","']"].join(o));if(s.size()&&(i=`url(#${s.attr("id")})`),ue(e)){n.generateTextBGColorFilter(e);const l=n.color(t),c=e.bind(n.api)(l,t);c?s.select("feFlood").attr("flood-color",c):i=""}}return i||null},redrawText(t,e,n,r){const i=this,{$T:o,axis:s,config:l,state:{hasTreemap:c}}=i,u=Pr(!0),f=l.axis_rotated,d=l.data_labels.rotate,h=bA(d),m=d?`rotate(${d})`:"",S=i.$el.text.style("fill",i.getStylePropValue(i.updateTextColor)).attr("filter",w=>i.updateTextBGColor.bind(i)(w,l.data_labels_backgroundColors)).style("fill-opacity",n?0:i.opacityForText.bind(i)),E=new Map,C=[];return S.each(function(w){const N=this;E.set(N,{rect:cn(N)}),l.data_labels.centered&&(i.isBarType(w)||i.isTreemapType(w))&&C.push(N)}),C.length>0&&CA(C).forEach((w,N)=>{const z=E.get(N);z&&(z.bbox=w)}),S.each(function(w,N){const z=E.get(this),$=o(c&&this.childElementCount?this.parentNode:this,!!(r&&(this.getAttribute("x")||this.getAttribute("transform"))),u),G=l[`axis_${s==null?void 0:s.getId(w.id)}_inverted`];let V={x:t.call(this,w,N,z),y:e.call(this,w,N,z)};d&&(V=SA.bind(i)(w,V,h,f,G),$.attr("text-anchor",h)),bg.call(i,this,V,z==null?void 0:z.rect),this.childElementCount||d?$.attr("transform",`translate(${V.x} ${V.y}) ${m}`):$.attr("x",V.x).attr("y",V.y),l.data_labels.border&&AA.call(i,$.node(),V,`${Rn.textBorderRect}-${N}`)}),!0},getTextRect(t,e){var n,r;const i=this;let o,s,l;Array.isArray(t)?o=`${ke.textRect}-${t.join("_")}`:(s=(r=(n=t.node)==null?void 0:n.call(t))!=null?r:t,/text/i.test(s.tagName)||(s=s.querySelector("text")),l=s.textContent,o=`${ke.textRect}-${l.replace(/\W/g,"_")}`);const c=i.cache.get(o)||[];return c.length===0&&((i.$el.svg||i.$el.chart.select("svg")).selectAll(`.${Ue.dummy}`).data(l?[l]:t).enter().append("text").style("visibility","hidden").style("font",s?Ut(s).style("font"):null).classed(e||Ue.dummy,!0).text(u=>u).each(function(u,f){c[f]=cn(this)}).remove(),i.cache.add(o,c)),c.length>1?c:c[0]},generateXYForText(t,e){const n=this,{state:{hasRadar:r,hasFunnel:i,hasTreemap:o}}=n,s=Object.keys(t),l={},c=e?n.getXForText:n.getYForText;return i&&s.push("funnel"),r&&s.push("radar"),o&&s.push("treemap"),s.forEach(u=>{l[u]=n[`generateGet${Nn(u)}Points`](t[u],!1)}),function(u,f,d){const h=n.isAreaType(u)&&"area"||n.isBarType(u)&&"bar"||n.isCandlestickType(u)&&"candlestick"||n.isFunnelType(u)&&"funnel"||n.isRadarType(u)&&"radar"||n.isTreemapType(u)&&"treemap"||"line";return c.call(n,l[h](u,f),u,this,d)}},getCenteredTextPos(t,e,n,r,i){const o=this,{config:s}=o,l=s.axis_rotated,c=o.isBarType(t),u=o.isTreemapType(t);if(s.data_labels.centered&&(c||u)){const f=(i==null?void 0:i.bbox)||ya(n);if(c){const d=o.getRangedData(t,null,"bar")>=0;if(l){const h=(d?e[1][1]-e[0][1]:e[0][1]-e[1][1])/2+f.width/2;return d?-h-3:h+2}else{const h=(d?e[0][1]-e[1][1]:e[1][1]-e[0][1])/2+f.height/2;return d?h:-h-2}}else if(u)return r==="x"?(e[1][0]-e[0][0])/2:(e[1][1]-e[0][1])/2-f.y-f.height/2}return 0},getXForText(t,e,n,r){var i,o,s;const l=this,{config:c}=l,u=c.axis_rotated,f=l.isFunnelType(e),d=l.isTreemapType(e);let h=t?t[0][0]:0;if(l.isCandlestickType(e))u?h=(i=l.getCandlestickData(e))!=null&&i._isUp?t[2][2]+4:t[2][1]-4:h+=(t[1][0]-h)/2;else if(f)if(t)h=(s=(o=t[2])==null?void 0:o[0])!=null?s:h;else return bc(n,"x");else if(d)h+=c.data_labels.centered?0:5;else if(u){const m=c[`axis_${l.axis.getId(e.id)}_inverted`],S=l.isBarType(e)?4:6,E=e.value;h=t[2][1],h+=S*((m?E>0:E<0)?-1:1)}else h=l.hasType("bar")?(t[2][0]+t[0][0])/2:h;return(u||d||f)&&(h+=l.getCenteredTextPos(e,t,n,"x",r)),h+yg.call(this,e,"x")},getYForText(t,e,n,r){var i,o;const s=this,{axis:l,config:c,state:u}=s,f=c.axis_rotated,d=c[`axis_${l==null?void 0:l.getId(e.id)}_inverted`],h=s.isBarType(e),m=s.isFunnelType(e),S=s.isTreemapType(e),E=c.point_r,C=(r==null?void 0:r.rect)||cn(n);let{value:w}=e,N=3,z;if(s.isCandlestickType(e))w=s.getCandlestickData(e),f?(z=t[0][0],z+=(t[1][0]-z)/2+N):(z=w&&w._isUp?t[2][2]-N:t[2][1]+N*4,d&&(z+=15*(w._isUp?1:-1)));else if(m)if(t)z=((o=(i=t[2])==null?void 0:i[1])!=null?o:t[0][1])+C.height/2-3;else return bc(n,"y");else if(S)z=t[0][1]+(c.data_labels.centered?0:C.height+5);else if(f)z=(t[0][0]+t[2][0]+C.height*.6)/2;else if(z=t[2][1],le(E)&&E>5&&(s.isLineType(e)||s.isScatterType(e))&&(N+=c.point_r/2.3),w<0||w===0&&!u.hasPositiveValue&&u.hasNegativeValue)z+=d?h?-3:-5:C.height+(h?-N:N);else{let $=-N*2;h?$=-N:s.isBubbleType(e)&&($=N),d&&($=h?10:15),z+=$}return(!f||S)&&(z+=s.getCenteredTextPos(e,t,n,"y",r)),z+yg.call(this,e,"y")},markOverlapped(t,e,n){const r=e.$el.arcs.selectAll(n),i=r.filter(f=>f.data.id!==t),o=r.filter(f=>f.data.id===t),s=Tc(o.node()),l=(f,d)=>Math.sqrt(f*f+d*d);if(!o.node())return;const c=parseInt(o.style("font-size"),10),u=[];i.each(function(){const f=Tc(this),d=l(s.e,s.f)>l(f.e,f.f)?o:Ut(this),h=Math.ceil(Math.abs(s.e-f.e))<Math.ceil(d.node().getComputedTextLength()),m=Math.ceil(Math.abs(s.f-f.f))<c;u.push({node:this,overlaps:h&&m})}),u.forEach(({node:f,overlaps:d})=>{Ut(f).classed(Rn.TextOverlapping,d)})},undoMarkOverlapped(t,e){t.$el.arcs.selectAll(e).each(function(){xg([this,this.previousSibling]).classed(Rn.TextOverlapping,!1)})}};function Sg(t="left",e){const n=le(e);return t.includes("center")?n?e/2:"middle":t.includes("right")?n?e:"end":n?0:"start"}function RA(t){var e,n,r,i,o,s,l,c;const{config:u,$el:f}=t,d=((r=(n=(e=t.canvasTheme)==null?void 0:e.style)==null?void 0:n.title)==null?void 0:r.font)||((s=(o=(i=t.canvasTheme)==null?void 0:i.style)==null?void 0:o.label)==null?void 0:s.font)||"14px sans-serif",h=(c=(l=f.chart)==null?void 0:l.node)==null?void 0:c.call(l),m=h==null?void 0:h.ownerDocument;if(h&&m&&u.title_text){const S=m.createElementNS("http://www.w3.org/2000/svg","svg"),E=m.createElementNS("http://www.w3.org/2000/svg","text");S.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",E.setAttribute("class",Rn.title),E.style.font=d,E.textContent=String(u.title_text),S.appendChild(E),h.appendChild(S);const C=cn(E).height;if(S.remove(),C)return C}return u.title_text?parseFloat(d)||14:0}var wA={initTitle(){const t=this,{config:e,$el:n}=t;if(e.title_text){n.title=n.svg.append("g");const r=n.title.append("text").style("text-anchor",Sg(e.title_position)).attr("class",Rn.title);ci(r,e.title_text,[.3,1.5])}},redrawTitle(){const t=this,{config:e,state:{current:n},$el:{title:r}}=t;if(r){const i=Sg(e.title_position,n.width),o=(e.title_padding.top||0)+t.getTextRect(t.$el.title,Rn.title).height;r.attr("transform",`translate(${i}, ${o})`)}},getCanvasTitleHeight(){return RA(this)},getTitlePadding(){const t=this,{$el:{title:e},config:n,state:r}=t,i=n.title_padding.top||0,o=n.title_padding.bottom||0;if(r.isCanvasMode&&n.title_text)return i+t.getCanvasTitleHeight()+o;if(!(e!=null&&e.node()))return i+o;const s=e.node(),l=bc(s,"y");if(l){const c=ya(s);return l+c.y+c.height+o}return i+t.getTextRect(e,Rn.title).height+o}};const OA=/(\r?\n|\t)/g,PA=/{{(.*)}}/;var MA={initTooltip(){const t=this,{config:e,$el:n}=t;n.tooltip=Ut(e.tooltip_contents.bindto),n.tooltip.empty()&&(n.tooltip=n.chart.append("div").attr("class",gs.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.bindTooltipResizePos()},initShowTooltip(){var t;const e=this,{config:n,$el:r,state:{hasAxis:i,hasRadar:o}}=e;if(n.tooltip_init_show){const s=!(i||o);(t=e.axis)!=null&&t.isTimeSeries()&&Ye(n.tooltip_init_x)&&(n.tooltip_init_x=Kn.call(e,n.tooltip_init_x)),e.api.tooltip.show({data:{[s?"index":"x"]:n.tooltip_init_x}});const l=n.tooltip_init_position;if(!n.tooltip_contents.bindto&&!dr(l)){const{top:c=0,left:u=50}=l;r.tooltip.style("top",Ye(c)?c:`${c}px`).style("left",Ye(u)?u:`${u}px`).style("display",null)}}},getTooltipHTML(...t){const e=this,{api:n,config:r}=e;return Yr(ue(r.tooltip_contents)?r.tooltip_contents.bind(n)(...t):e.getTooltipContent(...t))},getTooltipContent(t,e,n,r){var i;const o=this,{api:s,config:l,state:c,$el:u}=o,f=l.tooltip_format_title,d=l.tooltip_format_name,h=l.tooltip_format_value,m=ue(f)?f.bind(s):e,S=ue(d)?d.bind(s):(q=>q),E=ue(h)?h.bind(s):null,C=(q,ft,lt,pt)=>{let Tt=E;return Tt||(c.hasTreemap||o.isStackNormalized()&&(!o.isStackNormalizedPerGroup()||o.isGrouped(lt))?Tt=(Rt,Ct)=>`${(Ct*100).toFixed(2)}%`:Tt=n),Tt(q,ft,lt,pt)},w=l.tooltip_order,N=q=>o.axis&&o.isBubbleZType(q)?o.getBubbleZData(q.value,"z"):o.getBaseValue(q),z=o.levelColor?q=>o.levelColor(q.value):q=>r(q),$=l.tooltip_contents,G=$.template,V=o.mapToTargetIds();if(w===null&&l.data_groups.length){const q=o.orderTargets(o.data.targets).map(ft=>ft.id).reverse();t.sort((ft,lt)=>{let pt=ft?ft.value:null,Tt=lt?lt.value:null;return pt>0&&Tt>0&&(pt=ft.id?q.indexOf(ft.id):null,Tt=lt.id?q.indexOf(lt.id):null),pt-Tt})}else if(/^(asc|desc)$/.test(w)){const q=w==="asc";t.sort((ft,lt)=>{const pt=ft?N(ft):null,Tt=lt?N(lt):null;return q?pt-Tt:Tt-pt})}else ue(w)&&t.sort(w.bind(s));const J=o.getTooltipContentTemplate(G),Q=t.length;let rt,et,st,ct,dt;for(dt=0;dt<Q;dt++){et=t[dt];const q=et&&N(et);if(!(!et||!(q||q===0))){if(Tn(rt)){const ft=(c.hasAxis||c.hasRadar)&&m(et.x);rt=Da(J[0],{CLASS_TOOLTIP:gs.tooltip,TITLE:Xe(ft)?G?ft:`<tr><th colspan="2">${ft}</th></tr>`:""})}if(!et.ratio&&u.arcs&&(st=["arc",o.$el.arcs.select(`path.${Qe.arc}-${et.id}`).data()[0]],et.ratio=o.getRatio(...st)),st=[et.ratio,et.id,et.index],o.isAreaRangeType(et)){const[ft,lt]=["high","low"].map(Tt=>C(o.getRangedData(et,Tt),...st));ct=`<b>Mid:</b> ${C(N(et),...st)} <b>High:</b> ${ft} <b>Low:</b> ${lt}`}else if(o.isCandlestickType(et)){const[ft,lt,pt,Tt,Rt]=["open","high","low","close","volume"].map(Ct=>o.getRangedData(et,Ct,"candlestick")?C(o.getRangedData(et,Ct,"candlestick"),...st):void 0);ct=`<b>Open:</b> ${ft} <b>High:</b> ${lt} <b>Low:</b> ${pt} <b>Close:</b> ${Tt}${Rt?` <b>Volume:</b> ${Rt}`:""}`}else if(o.isBarRangeType(et)){const{value:ft,id:lt,index:pt}=et;ct=`${C(ft,void 0,lt,pt)}`}else ct=C(N(et),...st);if(ct!==void 0){if(et.name===null)continue;const ft=S((i=et.name)!=null?i:et.id,...st),lt=z(et),pt={CLASS_TOOLTIP_NAME:gs.tooltipName+o.getTargetSelectorSuffix(et.id),COLOR:G||!o.patterns?lt:`<svg><rect style="fill:${lt}" width="10" height="10"></rect></svg>`,NAME:ft,VALUE:ct};if(G&&Ke($.text)){const Tt=V.indexOf(et.id);Object.keys($.text).forEach(Rt=>{pt[Rt]=$.text[Rt][Tt]})}rt+=Da(J[1],pt)}}}return`${rt}</table>`},getTooltipContentTemplate(t){return(t||`<table class="{=CLASS_TOOLTIP}"><tbody>
|
|
51
46
|
{=TITLE}
|
|
52
47
|
{{<tr class="{=CLASS_TOOLTIP_NAME}">
|
|
53
48
|
<td class="name">${this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>'}{=NAME}</td>
|
|
54
49
|
<td class="value">{=VALUE}</td>
|
|
55
50
|
</tr>}}
|
|
56
|
-
</tbody></table>`).replace(YS,"").split(KS)},setTooltipPosition(t,e){var n,r;const i=this,{config:o,scale:s,state:l,$el:{eventRect:c,tooltip:u,svg:f}}=i,{bindto:d}=o.tooltip_contents,h=o.axis_rotated,m=u==null?void 0:u.datum();if(!d&&m){const A=t!=null?t:m.data,[I,C]=ir(l.event,e!=null?e:c==null?void 0:c.node()),P={x:I,y:C};if(l.hasAxis&&s.x&&m&&"x"in m){const W=(V=0,J,q="y")=>{var at;const et=s[J?(at=i.axis)==null?void 0:at.getId(J):q];return et?et(V)+(h?l.margin.left:l.margin.top):0};P.xAxis=s.x(m.x)+(o.tooltip_position?h?l.margin.top:l.margin.left:0),A.length===1?P.yAxis=W(A[0].value,A[0].id):P.yAxis=W}const{width:z=0,height:N=0}=m,B=(r=(n=o.tooltip_position)==null?void 0:n.bind(i.api)(A,z,N,c==null?void 0:c.node(),P))!=null?r:f&&fc(f)?i.getTooltipPositionViewBox.bind(i)(z,N,P):i.getTooltipPosition.bind(i)(z,N,P);["top","left"].forEach(W=>{const V=B[W];u.style(W,`${V}px`),W==="left"&&!m.xPosInPercent&&(m.xPosInPercent=V/l.current.width*100)})}},getTooltipPositionViewBox(t,e,n){var r,i;const o=this,{$el:{eventRect:s,svg:l},config:c,state:u}=o,f=c.axis_rotated,d=o.hasArcType()||u.hasFunnel||u.hasTreemap,h=(i=(r=d?l:s)==null?void 0:r.node())!=null?i:u.event.target;let{x:m,y:A}=n;u.hasAxis&&(m=f?m:n.xAxis,A=f?n.xAxis:A);const I=os(h,m,A,!1),C=un(h),P=os(h,20,0,!1).x;let z=I.y,N=I.x+t/2+P;return d&&(u.hasFunnel||u.hasTreemap||u.hasRadar?(N-=t/2+P,z+=e):(z+=C.height/2,N+=C.width/2-(t-P))),N+t>C.width&&(N=C.width-t-P),z+e>C.height&&(z-=e*2),{top:z,left:N}},getTooltipPosition(t,e,n){var r,i,o;const s=this,{config:l,scale:c,state:u}=s,{width:f,height:d,current:h,hasFunnel:m,hasRadar:A,hasTreemap:I,isLegendRight:C,inputType:P}=u,z=s.hasType("gauge")&&!l.gauge_fullCircle,N=l.axis_rotated,B=s.hasArcType(),W=u.isCanvasMode?0:s.getSvgLeft(!0);let V=W+h.width-s.getCurrentPaddingByDirection("right");const J=20;let{x:q,y:at}=n;if(A)q+=q>=f/2?15:-(t+15),at+=15;else if(B){if(P!=="touch"){let lt=(i=(r=s.getTitlePadding)==null?void 0:r.call(s))!=null?i:0;lt&&z&&((o=l.arc_rangeText_values)!=null&&o.length)&&(lt+=10),q+=(f-(C?s.getLegendWidth():0))/2,at+=(z?d:d/2+e)+lt}}else if(m||I)at+=e;else{const ot={top:s.getCurrentPaddingByDirection("top",!0),left:s.getCurrentPaddingByDirection("left",!0)};N?(q+=W+ot.left+J,at=ot.top+n.xAxis+J,V-=W):(q=W+ot.left+J+(c.zoom?q:n.xAxis),at+=ot.top-5)}if(q+t+15>V&&(q-=t+(m||I||B?0:N?J*2:38)),at+e>h.height){const ot=I?e+10:30;at-=z?e*1.5:e+ot}const et={top:at,left:q};return et.top<0&&(et.top=0),et.left<0&&(et.left=0),et},showTooltip(t,e){const n=this,{config:r,$el:{tooltip:i}}=n;if(!i||!r.tooltip_show)return;let o=null,s=0,l=`${n.data.targets.length}:`,c;for(let d=0;d<t.length;d++){const h=t[d];d>0&&(l+=","),l+=`${h==null?void 0:h.index}|${h==null?void 0:h.id}|${h==null?void 0:h.value}`,!c&&h&&(c=h),h&&We(n.getBaseValue(h))?(s++,o==null||o.push(h)):o||(o=t.slice(0,d))}if(s===0||!c)return;const u=i.datum();let f=o;if(!u||u.current!==l){const{index:d,x:h}=c;f||(f=t.slice()),Ne(r.tooltip_onshow,n.api,t),i.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style("display",null).style("visibility",null),i.datum({index:d,x:h,current:l,data:t,width:i.property("offsetWidth"),height:i.property("offsetHeight")}),Ne(r.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,d)}n.setTooltipPosition(f||t,e)},bindTooltipResizePos(){const t=this,{resizeFunction:e,state:n,$el:{tooltip:r}}=t;e.add(()=>{if(r.style("display")==="block"){const{current:i}=n,{width:o,xPosInPercent:s}=r.datum();let l=i.width/100*s;const c=i.width-(l+o);c<0&&(l+=c),r.style("left",`${l}px`)}})},hideTooltip(t){var e;const n=this,{api:r,config:i,$el:{tooltip:o}}=n;if(o&&o.style("display")!=="none"&&(!i.tooltip_doNotHide||t)){const s=(e=o.datum().data)!=null?e:[];Ne(i.tooltip_onhide,r,s),o.style("display","none").datum(null),Ne(i.tooltip_onhidden,r,s)}},_handleLinkedCharts(t,e){const n=this,{charts:r,config:i,state:{event:o}}=n;if(o!=null&&o.isTrusted&&i.tooltip_linked&&r.length>1){const s=i.tooltip_linked_name;r.filter(l=>l!==n.api).forEach(l=>{var c,u;const{config:f,$el:d,state:h}=l.internal,m=f.tooltip_linked,A=f.tooltip_linked_name,I=He.body.contains(d.chart.node());if(m&&s===A&&I){const C=d.tooltip.data()[0],P=e!==(C==null?void 0:C.index);try{t&&P&&h.isCanvasMode?(u=(c=l.internal).showCanvasLinkedTooltip)==null||u.call(c,e):l.tooltip[t&&P?"show":"hide"]({index:e})}catch(z){}}})}},updateTooltipOnRedraw(t,e){var n;const r=this,{config:i,$el:{eventRect:o,svg:s,tooltip:l},state:{event:c,hasAxis:u,hasRadar:f,hasTreemap:d}}=r;if(!r.state.isCanvasMode&&(l==null?void 0:l.style("display"))==="block"&&c){const h=t!=null?t:(n=f?s:o)==null?void 0:n.node();if(u||f)if(r.isMultipleX())r.selectRectForMultipleXs(h,!1);else{const m=e!=null?e:r.getDataIndexFromEvent(c);e===-1?r.api.tooltip.hide():(r.selectRectForSingle(h,m),r.setExpand(m,null,!0))}else{const{clientX:m,clientY:A}=c;setTimeout(()=>{let I=[m,A].every(Number.isFinite)&&He.elementFromPoint(m,A);const C=I&&kt(I).datum();if(C){const P=r.hasArcType()?r.convertToArcData(r.updateAngle(C)):C==null?void 0:C.data;d&&(I=s.node()),P&&r.showTooltip([P],I)}else r.api.tooltip.hide()},i.transition_duration)}}}},JS={getTranslate(t,e=0){var n;const r=this,{config:i,state:o}=r,s=i.axis_rotated;let l=0,c,u;if(e&&/^(x|y2?)$/.test(t)&&(l=r.getAxisSize(t)*e),t==="main")c=Za(o.margin.left),u=Za(o.margin.top);else if(t==="context")c=Za(o.margin2.left),u=Za(o.margin2.top);else if(t==="legend")c=o.margin3.left,u=o.margin3.top;else if(t==="x")c=s?-l:0,u=s?0:o.height+l;else if(t==="y")c=s?0:-l,u=s?o.height+l:0;else if(t==="y2")c=s?0:o.width+l,u=s?-l-1:0;else if(t==="subX")c=0,u=s?0:o.height2;else if(t==="arc")c=o.arcWidth/2,u=o.arcHeight/2,(n=i.arc_rangeText_values)!=null&&n.length&&(u+=5+(r.hasType("gauge")&&i.title_text?10:0));else if(t==="polar")c=o.arcWidth/2,u=o.arcHeight/2;else if(t==="radar"){const[f,d]=r.getRadarSize();c=o.width/2-f,u=o.height/2-d}return`translate(${c}, ${u})`},transformMain(t,e){const n=this,{$el:{main:r},$T:i}=n,o=e!=null&&e.axisX?e.axisX:i(r.select(`.${Rn.axisX}`),t),s=e!=null&&e.axisY?e.axisY:i(r.select(`.${Rn.axisY}`),t),l=e!=null&&e.axisY2?e.axisY2:i(r.select(`.${Rn.axisY2}`),t);i(r,t).attr("transform",n.getTranslate("main")),o.attr("transform",n.getTranslate("x")),s.attr("transform",n.getTranslate("y")),l.attr("transform",n.getTranslate("y2")),r.select(`.${Ye.chartArcs}`).attr("transform",n.getTranslate("arc"))},transformAll(t,e){const n=this,{config:r,state:{hasAxis:i,hasFunnel:o,hasTreemap:s,isCanvasMode:l},$el:c}=n;l||(!o&&!s&&n.transformMain(t,e),i&&r.subchart_show&&n.transformContext(t,e),c.legend&&n.transformLegend(t))}};const QS=new Set(["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"]);var _S={isValidChartType(t){return!!(t&&Object.values(jt).indexOf(t)>-1)},setTargetType(t,e){const n=this,{config:r,state:{withoutFadeIn:i}}=n;n.mapToTargetIds(t).forEach(o=>{i[o]=e===r.data_types[o],r.data_types[o]=e}),t||(r.data_type=e)},updateTypesElements(){const t=this,{state:{current:e}}=t;Object.keys(jt).forEach(n=>{const r=jt[n],i=t.hasType(r,null,!0),o=e.types.indexOf(r);o===-1&&i?e.types.push(r):o>-1&&!i&&e.types.splice(o,1)}),t.setChartElements()},hasType(t,e,n=!1){var r;const i=this,{config:o,state:{current:s}}=i,l=o.data_types,c=e||i.data.targets;return!n&&((r=s.types)==null?void 0:r.indexOf(t))>-1?!0:c!=null&&c.length?c.some(u=>{const f=l[u.id];return f===t||!f&&t==="line"}):Object.keys(l).length?Object.values(l).some(u=>u===t):o.data_type===t},hasTypeOf(t,e,n=[]){return t in jn?!jn[t].filter(r=>n.indexOf(r)===-1).every(r=>!this.hasType(r,e)):!1},isTypeOf(t,e){var n;const r=Ke(t)?t:t.id,i=this.config&&(((n=this.config.data_types)==null?void 0:n[r])||this.config.data_type);return nn(e)?e.indexOf(i)>=0:i===e},hasPointType(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge(){return this.hasType("gauge")&&this.config.gauge_type==="multi"},isLineType(t){const e=Ke(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,jn.Line)},isStepType(t){return this.isTypeOf(t,jn.Step)},isSplineType(t){return this.isTypeOf(t,jn.Spline)},isAreaType(t){return this.isTypeOf(t,jn.Area)},isAreaRangeType(t){return this.isTypeOf(t,jn.AreaRange)},isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType(t){return this.isTypeOf(t,"bubble")},isCandlestickType(t){return this.isTypeOf(t,"candlestick")},isScatterType(t){return this.isTypeOf(t,"scatter")},isTreemapType(t){return this.isTypeOf(t,"treemap")},isPieType(t){return this.isTypeOf(t,"pie")},isFunnelType(t){return this.isTypeOf(t,"funnel")},isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType(t){return this.isTypeOf(t,"donut")},isPolarType(t){return this.isTypeOf(t,"polar")},isRadarType(t){return this.isTypeOf(t,"radar")},isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint(t){const{config:e}=this,n=e.point_pattern;return(t==null?void 0:t.tagName)==="circle"||e.point_type==="circle"&&(!n||nn(n)&&n.length===0)},lineData(t){return this.isLineType(t)?[t]:[]},arcData(t){return this.isArcType(t.data)?[t]:[]},labelishData(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isFunnelType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(e=>ge(e.value)||!!e.value):[]},barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType(t){return QS.has(t)}};function Ss(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function As(t){this._context=t}As.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ss(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ss(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function qS(t){return new As(t)}function va(){}function _h(t){this._context=t}_h.prototype={areaStart:va,areaEnd:va,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Ss(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function tA(t){return new _h(t)}function qh(t){this._context=t}qh.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Ss(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function eA(t){return new qh(t)}function tg(t,e){this._basis=new As(t),this._beta=e}tg.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,s=e[n]-i,l=-1,c;++l<=n;)c=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+c*o),this._beta*e[l]+(1-this._beta)*(i+c*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var nA=(function t(e){function n(r){return e===1?new As(r):new tg(r,e)}return n.beta=function(r){return t(+r)},n})(.85);function Es(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 Bc(t,e){this._context=t,this._k=(1-e)/6}Bc.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:Es(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Es(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var rA=(function t(e){function n(r){return new Bc(r,e)}return n.tension=function(r){return t(+r)},n})(0);function zc(t,e){this._context=t,this._k=(1-e)/6}zc.prototype={areaStart:va,areaEnd:va,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Es(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var aA=(function t(e){function n(r){return new zc(r,e)}return n.tension=function(r){return t(+r)},n})(0);function Uc(t,e){this._context=t,this._k=(1-e)/6}Uc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Es(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var iA=(function t(e){function n(r){return new Uc(r,e)}return n.tension=function(r){return t(+r)},n})(0);const eg=Math.abs,kn=Math.atan2,$a=Math.cos,oA=Math.max,kc=Math.min,Fr=Math.sin,fi=Math.sqrt,Xn=1e-12,io=Math.PI,Cs=io/2,Is=2*io;function sA(t){return t>1?0:t<-1?io:Math.acos(t)}function ng(t){return t>=1?Cs:t<=-1?-Cs:Math.asin(t)}function Xc(t,e,n){var r=t._x1,i=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Xn){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Xn){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/f,s=(s*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,s,t._x2,t._y2)}function rg(t,e){this._context=t,this._alpha=e}rg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Xc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var lA=(function t(e){function n(r){return e?new rg(r,e):new Bc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function ag(t,e){this._context=t,this._alpha=e}ag.prototype={areaStart:va,areaEnd:va,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Xc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var cA=(function t(e){function n(r){return e?new ag(r,e):new zc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function ig(t,e){this._context=t,this._alpha=e}ig.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Xc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var uA=(function t(e){function n(r){return e?new ig(r,e):new Uc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function og(t){return t<0?-1:1}function sg(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),l=(o*i+s*r)/(r+i);return(og(o)+og(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(l))||0}function lg(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Gc(t,e,n){var r=t._x0,i=t._y0,o=t._x1,s=t._y1,l=(o-r)/3;t._context.bezierCurveTo(r+l,i+l*e,o-l,s-l*n,o,s)}function Rs(t){this._context=t}Rs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Gc(this,this._t0,lg(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Gc(this,lg(this,n=sg(this,t,e)),n);break;default:Gc(this,this._t0,n=sg(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function cg(t){this._context=new ug(t)}(cg.prototype=Object.create(Rs.prototype)).point=function(t,e){Rs.prototype.point.call(this,e,t)};function ug(t){this._context=t}ug.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function fA(t){return new Rs(t)}function dA(t){return new cg(t)}function fg(t){this._context=t}fg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=dg(t),i=dg(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function dg(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),s=new Array(n);for(i[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,s[e]-=r*s[e-1];for(i[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(s[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function hA(t){return new fg(t)}function hg(t){this._context=t}hg.prototype={areaStart:va,areaEnd:va,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function gA(t){return new hg(t)}function Os(t,e){this._context=t,this._t=e}Os.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function vA(t){return new Os(t,.5)}function pA(t){return new Os(t,0)}function mA(t){return new Os(t,1)}const xA={basis:qS,"basis-closed":tA,"basis-open":eA,bundle:nA,cardinal:rA,"cardinal-closed":aA,"cardinal-open":iA,"catmull-rom":lA,"catmull-rom-closed":cA,"catmull-rom-open":uA,"monotone-x":fA,"monotone-y":dA,natural:hA,"linear-closed":gA,linear:Qo,step:vA,"step-after":mA,"step-before":pA};function Wc(t,e){var n,r;return t.isLineType(e)||((n=t.isScatterType)==null?void 0:n.call(t,e))||((r=t.isBubbleType)==null?void 0:r.call(t,e))}function gg(t){return e=>Wc(t,e)}function Vc(t,e){var n,r,i;return(n=t.isCandlestickType)!=null&&n.call(t,e)?(i=(r=t.getCandlestickData)==null?void 0:r.call(t,e))==null?void 0:i.close:t.getBaseValue(e)}function yA(t){var e,n;const r=this;let i;if(Wc(r,t)){const o=gg(r);i=r.generateGetLinePoints(r.getShapeIndices(o),!1,o)}else r.isBarType(t)?i=r.generateGetBarPoints(r.getShapeIndices(r.isBarType)):(e=r.isCandlestickType)!=null&&e.call(r,t)&&(i=(n=r.generateGetCandlestickPoints)==null?void 0:n.call(r,r.getShapeIndices(r.isCandlestickType)));return i}function vg(t,e,n){return this.config[e]?this.getGradienColortUrl(t.id):n(t)}function pg(t){const{$el:e}=this,{elKey:n,className:r,cssRules:i,position:o}=t,s=e.main.select(`.${tn.chart}`);e[n]=o==="first"?s.insert("g",":first-child"):s.append("g"),e[n].attr("class",r),i!=null&&i.length&&e[n].call(this.setCssRule(!1,`.${r}`,i))}function jc(t,e){const n=this,{$el:r}=n,{type:i,elKey:o,containerClass:s,itemClass:l,initFn:c,withFocus:u=!0,withStyles:f=!0}=e;r[o]||c.call(n);const d=n.getChartClass(i),h=u?n.classFocus.bind(n):()=>"",A=r.main.select(`.${s}`).selectAll(`.${l}`).data(n.filterNullish(t)).attr("class",I=>d(I)+h(I)).enter().append("g").attr("class",d);return f&&A.style("opacity","0").style("pointer-events",n.getStylePropValue("none")),A}var TA={getDrawShape(){const t=this,e=t.config.axis_rotated,{hasRadar:n,hasTreemap:r}=t.state,i={type:{},indices:{},pos:{}};if(!r&&["bar","candlestick","line","area"].forEach(o=>{const s=$n(o);if(t.hasType(o)||t.hasTypeOf(s)||o==="line"&&(t.hasType("bubble")||t.hasType("scatter"))){const l=t.getShapeIndices(t[`is${s}Type`]),c=t[`generateDraw${s}`];i.indices[o]=l,i.type[o]=c?c.bind(t)(l,!1):void 0}}),!t.hasArcType()||n||r){let o,s,l,c;r||(o=n?t.radarCircleX:e?t.circleY:t.circleX,s=n?t.radarCircleY:e?t.circleX:t.circleY),r&&t.state.isCanvasMode?l=c=function(){}:(l=t.generateXYForText(i.indices,!0),c=t.generateXYForText(i.indices,!1)),i.pos={xForText:l,yForText:c,cx:(o||function(){}).bind(t),cy:(s||function(){}).bind(t)}}return i},getShapeIndices(t){const e=this,{config:n}=e,r=n.data_xs,i=vn(r),o={};let s=i?{}:0;return i&&El(Object.keys(r).map(l=>r[l])).forEach(l=>{s[l]=0,o[l]={}}),e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach(l=>{var c;const u=l.id in r?r[l.id]:"",f=u?o[u]:o;for(let d=0,h;h=n.data_groups[d];d++)if(!(h.indexOf(l.id)<0))for(let m=0,A;A=h[m];m++){if(A in f){f[l.id]=f[A];break}l.id!==A&&u&&(f[A]=(c=f[l.id])!=null?c:s[u])}xn(f[l.id])&&(f[l.id]=u?s[u]++:s++,f.__max__=(u?s[u]:s)-1)}),o},getIndices(t,e,n){const r=this,{data_xs:i,bar_indices_removeNull:o}=r.config,{id:s,index:l}=e;if(r.isBarType(s)&&o){const c={};return r.getAllValuesOnIndex(l,!0).forEach((u,f)=>{c[u.id]=f,c.__max__=f}),c}return vn(i)?t[i[s]]:t},getIndicesMax(t){if(!vn(this.config.data_xs))return t.__max__;let e=0;for(const n in t)e+=t[n].__max__||0;return e},getShapeX(t,e,n){const r=this,{config:i,scale:o}=r,s=n?o.subX:o.zoom||o.x,l=i.bar_overlap,c=i.bar_padding,u=(h,m)=>h+m,f=Qn(t)&&(t._$total.length?t._$total.reduce(u)/2:0),d=[];if(f&&Qn(t)&&t._$total.length){let h=0;for(const m of t._$total)h+=m,d.push(h)}return h=>{var m;const A=r.getIndices(e,h,"getShapeX"),I=h.id in A?A[h.id]:0,C=(A.__max__||0)+1;let P=0;if(vn(h.x)){const z=s(h.x,!0);if(f){const N=t[h.id]||t._$width;P=l?z-N/2:z-N+((m=d[I])!=null?m:t._$total.slice(0,I+1).reduce(u))-f}else P=z-(ge(t)?t:t._$width)*(C/2-(l?1:I))}return t&&P&&C>1&&c&&(I&&(P+=c*I),C>2?P-=(C-1)*c/2:C===2&&(P-=c/2)),P}},getShapeY(t){const e=this,n=e.isStackNormalized();return r=>{let{value:i}=r;return ge(r)?i=r:e.isAreaRangeType(r)?i=e.getBaseValue(r,"mid"):n?i=e.getRatio("index",r,!0):e.isBubbleZType(r)?i=e.getBubbleZData(r.value,"y"):e.isBarRangeType(r)&&(i=i[1]),e.getYScaleById(r.id,t)(i)}},getShapeYMin(t){const e=this,n=e.axis.getId(t),r=e.scale[n],[i]=r.domain(),o=e.config[`axis_${n}_inverted`];return!e.isGrouped(t)&&!o&&i>0?i:0},getShapeOffsetData(t){const e=this,n=e.orderTargets(e.filterTargetsToShow(e.data.targets.filter(t,e))),r=e.state.dataGeneration,i=n.map(d=>d.id).join("_"),o=`${Ue.shapeOffset}_${i}`,s=e.cache.get(o);if((s==null?void 0:s.generation)===r)return s;const l=e.isStackNormalized(),c=n.map(d=>{let h=d.values;const m={};e.isStepType(d)&&(h=e.convertValuesToStep(h));const A=h.reduce((I,C)=>{const P=Number(C.x),z=Vc(e,C);return I[P]=C,m[P]=l?e.getRatio("index",C,!0):z,I},{});return{id:d.id,rowValues:h,rowValueMapByXValue:A,values:m}}),u=n.reduce((d,{id:h},m)=>(d[h]=m,d),{}),f={generation:r,indexMapByTargetId:u,shapeOffsetTargets:c};return e.cache.add(o,f),f},getShapeOffset(t,e,n){const r=this,{shapeOffsetTargets:i,indexMapByTargetId:o}=r.getShapeOffsetData(t),s=r.config.data_groupsZeroAs;let l=null;if(!r.config.bar_indices_removeNull){l=new Map;for(const c of i){const u=r.getIndices(e,{id:c.id,index:0});l.set(c.id,i.filter(f=>f.id!==c.id&&u[f.id]===u[c.id]))}}return(c,u)=>{var f;const{id:d,value:h,x:m}=c,A=Vc(r,c),I=r.getIndices(e,c),C=r.getYScaleById(d,n);if(r.isBarRangeType(c))return C(h[0]);const P=Number(m),z=C(s==="zero"?0:r.getShapeYMin(d));let N=z;const B=(f=l==null?void 0:l.get(d))!=null?f:i.filter(W=>W.id!==d&&I[W.id]===I[d]);for(const W of B){const{id:V,rowValueMapByXValue:J,rowValues:q,values:at}=W;if(o[V]<o[d]){const et=at[P];let ot=q[u];(!ot||Number(ot.x)!==P)&&(ot=J[P]);const lt=ot&&Vc(r,ot);ge(lt)&&ge(A)&<*A>=0&&ge(et)&&(A!==0||s==="positive"&&et>0||s==="negative"&&et<0)&&(N+=C(et)-z)}}return N}},generateGetLinePoints(t,e,n){const r=this,{config:i}=r,o=r.getShapeX(0,t,e),s=r.getShapeY(e),l=r.getShapeOffset(n||r.isLineType,t,e),c=r.getYScaleById.bind(r);return(u,f)=>{const d=c.call(r,u.id,e)(r.getShapeYMin(u.id)),h=l(u,f)||d,m=o(u);let A=s(u);i.axis_rotated&&(u.value>0&&A<d||u.value<0&&d<A)&&(A=d);const I=[m,A-(d-h)];return[I,I,I,I]}},generateGetAreaPoints(t,e){const n=this,{config:r}=n,i=n.getShapeX(0,t,e),o=n.getShapeY(!!e),s=n.getShapeOffset(n.isAreaType,t,e),l=n.getYScaleById.bind(n),c=new Map;return function(u,f){let d=c.get(u.id);d===void 0&&(d=l.call(n,u.id,e)(n.getShapeYMin(u.id)),c.set(u.id,d));const h=s(u,f)||d,m=i(u),A=u.value;let I=o(u);return r.axis_rotated&&(A>0&&I<d||A<0&&d<I)&&(I=d),[[m,h],[m,I-(d-h)],[m,I-(d-h)],[m,h]]}},generateGetBarPoints(t,e){const n=this,{config:r}=n,i=e?n.axis.subX:n.axis.x,o=n.getIndicesMax(t)+1,s=n.getBarW("bar",i,o),l=n.getShapeX(s,t,!!e),c=n.getShapeY(!!e),u=n.getShapeOffset(n.isBarType,t,!!e),f=n.getYScaleById.bind(n),d=new Map;return(h,m)=>{const{id:A}=h;let I=d.get(A);I||(I={y0:f.call(n,A,e)(n.getShapeYMin(A)),isInverted:r[`axis_${n.axis.getId(A)}_inverted`]},d.set(A,I));const{y0:C,isInverted:P}=I,z=u(h,m)||C,N=ge(s)?s:s[h.id]||s._$width,B=h.value,W=l(h);let V=c(h);r.axis_rotated&&!P&&(B>0&&V<C||B<0&&C<V)&&(V=C),n.isBarRangeType(h)||(V-=C-z);const J=W+N;return[[W,z],[W,V],[J,V],[J,z]]}},circleY(t,e){const n=this,r=t.id;let i;return n.isGrouped(r)&&(i=yA.bind(n)(t)),i?i(t,e)[0][1]:n.getYScaleById(r)(n.getBaseValue(t))},circleX(t){return this.xx(t)},updateCircleY(t=!1){const e=this,n=gg(e),r=e.generateGetLinePoints(e.getShapeIndices(n),t,n);return(i,o)=>{const s=i.id;return e.isGrouped(s)&&Wc(e,i)?r(i,o)[0][1]:e.getYScaleById(s,t)(e.getBaseValue(i))}},pointR(t){const e=this,{config:n}=e,r=n.point_r;let i=r;return e.isBubbleType(t)?i=e.getBubbleR(t):le(r)&&(i=r.bind(e.api)(t)),t.r=i,i},pointExpandedR(t){const e=this,{config:n}=e,r=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*r:e.pointR(t)},pointSelectR(t){const e=this,n=e.config.point_select_r;return le(n)?n(t):n||e.pointR(t)*4},isPointFocusOnly(){const t=this;return t.config.point_focus_only&&!t.hasType("bubble")&&!t.hasType("scatter")&&!t.hasArcType(null,["radar"])},getPointSensitivity(t){const e=this;let n=e.config.point_sensitivity;if(t)le(n)?n=n.call(e.api,t):n==="radius"&&(n=t.r);else return n;return n},getBarW(t,e,n){var r,i,o,s,l;const c=this,{config:u,org:f,scale:d,state:h}=c,m=c.getMaxDataCount(),A=t==="bar"&&((r=u.data_groups)==null?void 0:r.length),I=`${t}_width`,{k:C}=(o=(i=c.getZoomTransform)==null?void 0:i.call(c))!=null?o:{k:1},P=[(s=u.axis_x_min)!=null?s:f.xDomain[0],(l=u.axis_x_max)!=null?l:f.xDomain[1]].map(W=>c.axis.isTimeSeries()?Hn.call(c,W):Number(W));let z=e.tickInterval(m);if(d.zoom&&!c.axis.isCategorized()&&C>1){const W=P.every((V,J)=>V===f.xDomain[J]);z=f.xDomain.map((V,J)=>{const q=W?V:V-Math.abs(P[J]);return d.zoom(q)}).reduce((V,J)=>Math.abs(V)+J)/m}const N=W=>{const V=W?u[I][W]:u[I],J=W?V.ratio:u[`${I}_ratio`],q=W?V.max:u[`${I}_max`],at=ge(V)?V:le(V)?V.call(c,h.width,n,m):n?z*J/n:0;return q&&at>q?q:at};let B=N();return!A&&Qn(u[I])&&(B={_$width:B,_$total:[]},c.getTargetsToShow().forEach(W=>{u[I][W.id]&&(B[W.id]=N(W.id),B._$total.push(B[W.id]||B._$width))})),B},getShapeByIndex(t,e,n){const r=this,{$el:i}=r,o=We(e)?`-${e}`:"";let s=i[t];return s&&!s.empty()?s=s.filter(l=>n?l.id===n:!0).filter(l=>We(e)?l.index===e:!0):s=(n?i.main.selectAll(`.${tn[`${t}s`]}${r.getTargetSelectorSuffix(n)}`):i.main).selectAll(`.${tn[t]}${o}`),s},isWithinShape(t,e){var n;const r=this,i=kt(t);let o;return r.isTargetToShow(e.id)?(n=r.hasValidPointType)!=null&&n.call(r,t.nodeName)?o=r.isStepType(e)?r.isWithinStep(t,r.getYScaleById(e.id)(r.getBaseValue(e))):r.isWithinCircle(t,r.isBubbleType(e)?r.pointSelectR(e)*1.5:0):t.nodeName==="path"&&(o=i.classed(tn.bar)?r.isWithinBar(t):!0):o=!1,o},getInterpolate(t){const n=this.getInterpolateType(t);return xA[n]},getCurve(t){const e=this;return e.config.axis_rotated&&e.isStepType(t)?r=>{const i=e.getInterpolate(t)(r);return i.orgPoint=i.point,i.pointRotated=function(o,s){this._point===1&&(this._point=2);const l=this._y*(1-this._t)+s*this._t;this._context.lineTo(this._x,l),this._context.lineTo(o,l),this._x=o,this._y=s},i.point=function(o,s){this._point===0?this.orgPoint(o,s):this.pointRotated(o,s)},i}:e.getInterpolate(t)},getInterpolateType(t){const e=this,{config:n}=e,r=n.spline_interpolation_type,i=e.isInterpolationType(r)?r:"cardinal";return e.isSplineType(t)?i:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar(t){const e=ir(this.state.event,t),n=Jd(t),[r,i,o]=n,s=Math.min(r.x,i.x),l=Math.min(r.y,i.y),c=this.config.bar_sensitivity,u=Math.abs(o.x-i.x),f=Math.abs(r.y-i.y),d=s-c,h=s+u+c,m=l+f+c,A=l-c;return d<e[0]&&e[0]<h&&A<e[1]&&e[1]<m}},bA=Object.defineProperty,SA=(t,e,n)=>e in t?bA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n)=>SA(t,typeof e!="symbol"?e+"":e,n);function AA(t){return t.hasArcType()?"arc charts":t.hasType("funnel")?"funnel chart":null}function EA(t){var e,n;const{config:r}=t,i=r.render_mode==="canvas"?AA(t):null;i&&((n=(e=ce.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] render.mode='canvas' is ignored for ${i}; falling back to SVG.`),r.render_mode="svg")}class Er{constructor(e){Gn(this,"api"),Gn(this,"config"),Gn(this,"cache"),Gn(this,"$el"),Gn(this,"state"),Gn(this,"charts"),Gn(this,"data",{xs:{},targets:[]}),Gn(this,"axis"),Gn(this,"scale",{x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null}),Gn(this,"org",{xScale:null,xDomain:null}),Gn(this,"color"),Gn(this,"patterns"),Gn(this,"levelColor"),Gn(this,"point"),Gn(this,"brush"),Gn(this,"format",{extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null});const n=this;n.api=e,n.config=new Da,n.cache=new i1;const r=new e1;n.$el=r.getStore("element"),n.state=r.getStore("state"),n.$T=n.$T.bind(n)}$T(e,n,r){const{config:i,state:o}=this,s=i.transition_duration,l=i.subchart_show;let c=e;return c&&("tagName"in c&&(c=kt(c)),c=(n!==!1&&s||n)&&(!o.zooming||o.dragging)&&!o.resizing&&o.rendered&&!l?c.transition(r).duration(s):c),c}beforeInit(){const e=this;e.callPluginHook("$beforeInit"),Ne(e.config.onbeforeinit,e.api)}afterInit(){const e=this;e.callPluginHook("$afterInit"),Ne(e.config.onafterinit,e.api)}init(){const e=this,{config:n,state:r,$el:i}=e,{boost_useCssRule:o,bindto:s}=n;o1(e),EA(e);const l=e.hasArcType();if(r.hasRadar=!r.hasAxis&&e.hasType("radar"),r.hasFunnel=!r.hasAxis&&e.hasType("funnel"),r.hasTreemap=!r.hasAxis&&e.hasType("treemap"),r.hasAxis=!l&&!r.hasFunnel&&!r.hasTreemap,r.datetimeId=`bb-${+new Date*Rr()}`,o){const u=He.createElement("style");u.type="text/css",He.head.appendChild(u),r.style={rootSelector:`.${r.datetimeId}`,sheet:u.sheet},i.style=u}const c={element:s,classname:"bb"};je(s)&&(c.element=s.element||"#chart",c.classname=s.classname||c.classname),i.chart=le(c.element.node)?s.element:kt(c.element||[]),i.chart.empty()&&(i.chart=kt(He.body.appendChild(He.createElement("div")))),i.chart.html("").classed(c.classname,!0).classed(r.datetimeId,o).style("position","relative"),e.initParams(),e.initToRender()}initToRender(e){const n=this,{config:r,state:i,$el:{chart:o}}=n,s=()=>h1(o,{display:"none",visibility:"hidden"}),l=r.render.lazy===!1?!1:r.render.lazy||s(),c=ce.MutationObserver;l&&c&&r.render.observe!==!1&&!e&&new c((u,f)=>{s()||(f.disconnect(),!i.rendered&&n.initToRender(!0))}).observe(o.node(),{attributes:!0,attributeFilter:["class","style"]}),(!l||e)&&n.convertData(r,u=>{n.initWithData(u),n.afterInit()})}initParams(){var e,n;const r=this,{config:i,format:o,state:s}=r;if(i.render_mode==="canvas"&&((e=r.prepareCanvasConfig)==null||e.call(r)),r.color=r.generateColor(),r.levelColor=r.generateLevelColor(),i.padding===!1&&(i.axis_x_show=!1,i.axis_y_show=!1,i.axis_y2_show=!1,i.subchart_show=!1),i.render_mode!=="canvas"&&(r.hasPointType()||(n=r.hasLegendDefsPoint)!=null&&n.call(r))&&(r.point=r.generatePoint()),s.hasAxis){r.initClip(),o.extraLineClasses=r.generateExtraLineClass(),o.dataTime=i.data_xLocaltime?mf:xf,o.axisTime=i.axis_x_localtime?yl:Tl;const f=i.zoom_enabled&&i.zoom_type==="drag";o.defaultAxisTime=d=>{const{x:h,zoom:m}=r.scale,A=f?m:m&&h.orgDomain().toString()!==m.domain().toString(),I=d.getMilliseconds()&&".%L"||d.getSeconds()&&".:%S"||d.getMinutes()&&"%I:%M"||d.getHours()&&"%I %p"||d.getDate()!==1&&"%b %d"||A&&d.getDate()===1&&"%b'%y"||d.getMonth()&&"%-m/%-d"||"%Y";return o.axisTime(I)(d)}}const{legend_position:l,legend_inset_anchor:c,axis_rotated:u}=i;s.isLegendRight=l==="right",s.isLegendInset=l==="inset",s.isLegendTop=c==="top-left"||c==="top-right",s.isLegendLeft=c==="top-left"||c==="bottom-left",s.rotatedPadding.top=r.getResettedPadding(s.rotatedPadding.top),s.rotatedPadding.right=u&&!i.axis_x_show?0:30,s.inputType=g1(i.interaction_inputType_mouse,i.interaction_inputType_touch)}initWithData(e){var n,r,i,o,s,l;const c=this,{config:u,scale:f,state:d,$el:h,org:m}=c,{hasAxis:A,hasFunnel:I,hasTreemap:C}=d,P=u.interaction_enabled,z=c.hasType("polar"),N=u.data_labels_backgroundColors;if(A&&(c.axis=c.getAxisInstance(),u.zoom_enabled&&c.initZoom()),c.data.xs={},c.data.targets=c.convertDataToTargets(e),u.data_filter&&(c.data.targets=c.data.targets.filter(u.data_filter.bind(c.api))),u.data_hide&&c.addHiddenTargetIds(u.data_hide===!0?c.mapToIds(c.data.targets):u.data_hide),u.legend_hide&&c.addHiddenLegendIds(u.legend_hide===!0?c.mapToIds(c.data.targets):u.legend_hide),c.updateSizes(),c.updateScales(!0),A){const{x:V,y:J,y2:q,subX:at,subY:et,subY2:ot}=f;V&&(V.domain(Ja(c.getXDomain(c.data.targets),!u.axis_x_inverted)),at.domain(V.domain()),m.xDomain=V.domain()),J&&(J.domain(c.getYDomain(c.data.targets,"y")),et.domain(J.domain())),q&&(q.domain(c.getYDomain(c.data.targets,"y2")),ot&&ot.domain(q.domain()))}if(u.render_mode==="canvas"){if(!c.initCanvas)throw Error("[billboard.js] Please import and call canvas() to use render.mode='canvas'.");if(c.bindResize(),c.initCanvas(),u.tooltip_show&&c.initTooltip(),c.callPluginHook("$init"),Ne(u.oninit,c.api),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const V=c.getMinMaxData();Ne(u.data_onmin,c.api,V.min),Ne(u.data_onmax,c.api,V.max)}d.rendered=!0;return}if(h.svg=h.chart.append("svg").style("overflow","hidden").style("display","block"),P&&d.inputType){const V=d.inputType==="touch",{onclick:J,onover:q,onout:at}=u,et=(n=u.interaction_inputType_touch)==null?void 0:n.preventDefault,ot=Ea(et)&&et||!1,lt=!isNaN(et)&&et||null,ft=V?{passive:!ot&<===null}:void 0;h.svg.on("click",(J==null?void 0:J.bind(c.api))||null).on(V?"touchstart":"mouseenter",(q==null?void 0:q.bind(c.api))||null,ft).on(V?"touchend":"mouseleave",(at==null?void 0:at.bind(c.api))||null)}u.svg_classname&&h.svg.attr("class",u.svg_classname);const B=le(u.color_tiles)&&c.patterns;(A||B||z||C||N||(r=c.hasLegendDefsPoint)!=null&&r.call(c))&&(h.defs=h.svg.append("defs"),A&&["id","idXAxis","idYAxis","idGrid"].forEach(V=>{c.appendClip(h.defs,d.clip[V])}),c.generateTextBGColorFilter(N),B&&c.patterns.forEach(V=>h.defs.append(()=>V.node))),c.updateSvgSize(),c.bindResize();const W=h.svg.append("g").classed(ze.main,!0).attr("transform",I||C?null:c.getTranslate("main"));if(h.main=W,u.subchart_show&&c.initSubchart(),u.tooltip_show&&c.initTooltip(),u.title_text&&c.initTitle(),!C&&u.legend_show&&c.initLegend(),u.data_empty_label_text&&W.append("text").attr("class",`${En.text} ${ze.empty}`).attr("text-anchor","middle").attr("dominant-baseline","middle"),A&&(u.regions.length&&((i=c.initRegion)==null||i.call(c)),!u.clipPath&&c.axis.init()),W.append("g").classed(ze.chart,!0).attr("clip-path",A?d.clip.path:null),c.callPluginHook("$init"),c.initChartElements(),A&&(P&&((o=c.initEventRect)==null||o.call(c)),(s=c.initGrid)==null||s.call(c),u.clipPath&&((l=c.axis)==null||l.init())),c.updateTargets(c.data.targets),c.updateDimension(),Ne(u.oninit,c.api),c.setBackground(),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const V=c.getMinMaxData();Ne(u.data_onmin,c.api,V.min),Ne(u.data_onmax,c.api,V.max)}u.tooltip_show&&c.initShowTooltip(),d.rendered=!0}initChartElements(){const e=this,{hasAxis:n,hasRadar:r,hasTreemap:i}=e.state,o=[];if(n){const s=["bar","bubble","candlestick","line"];e.config.bar_front&&s.push(s.shift());for(const l of s){const c=$n(l);(l==="line"&&e.hasTypeOf(c)||e.hasType(l))&&o.push(c)}}else if(i)o.push("Treemap");else if(e.hasType("funnel"))o.push("Funnel");else{const s=e.hasType("polar"),l=e.hasType("gauge");r||o.push("Arc","Pie"),l?o.push("Gauge"):r?o.push("Radar"):s&&o.push("Polar")}for(const s of o)e[`init${s}`]();vn(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()}setChartElements(){const e=this,{$el:{chart:n,svg:r,defs:i,main:o,tooltip:s,legend:l,title:c,canvas:u,eventOverlay:f,grid:d,needle:h,arcs:m,circle:A,bar:I,candlestick:C,line:P,area:z,text:N}}=e;e.api.$={chart:n,svg:r,canvas:u,eventOverlay:f,defs:i,main:o,tooltip:s,legend:l,title:c,grid:d,arc:m,circles:A,bar:{bars:I},candlestick:C,line:{lines:P,areas:z},needle:h,text:{texts:N}}}setBackground(){const e=this,{config:{background:n},state:r,$el:{svg:i}}=e;if(vn(n)){const o=i.select("g").insert(n.imgUrl?"image":"rect",":first-child");n.imgUrl?o.attr("href",n.imgUrl):n.color&&o.style("fill",n.color).attr("clip-path",r.clip.path),o.attr("class",n.class||null).attr("width","100%").attr("height","100%")}}updateTargets(e){var n,r;const i=this,{hasAxis:o,hasFunnel:s,hasRadar:l,hasTreemap:c}=i.state,u=d=>i[`updateTargetsFor${d}`](e.filter(i[`is${d}Type`].bind(i)));if(i.updateTargetsForText(e),o){const d=["bar","candlestick","line"];for(const h of d){const m=$n(h);(h==="line"&&i.hasTypeOf(m)||i.hasType(h))&&u(m)}(n=i.updateTargetsForSubchart)==null||n.call(i,e)}else if(i.hasArcType(e)){let d="Arc";l?d="Radar":i.hasType("polar")&&(d="Polar"),u(d)}else s?u("Funnel"):c&&u("Treemap");const f=i.hasType("bubble")||i.hasType("scatter");f&&((r=i.updateTargetForCircle)==null||r.call(i)),i.filterTargetsToShowAtInit(f)}filterTargetsToShowAtInit(e=!1){const n=this,{$el:{svg:r},$T:i}=n;let o=`.${ze.target}`;e&&(o+=`, .${Bn.chartCircles} > .${Bn.circles}`),i(r.selectAll(o).filter(s=>n.isTargetToShow(s.id))).style("opacity",null)}getWithOption(e){const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};for(const[r,i]of Object.entries(n)){const o=Ke(i)?n[i]:i;n[r]=ia(e,`with${r}`,o)}return n}initialOpacity(e){const n=this,{withoutFadeIn:r}=n.state;return n.getBaseValue(e)!==null&&r[e.id]?null:"0"}bindResize(){var e,n;const r=this,{$el:i,config:o,state:s}=r,l=x1(o.resize_timer),{resize_auto:c}=o,u=[];u.push(()=>Ne(o.onresize,r.api)),/^(true|parent)$/.test(c)&&u.push(()=>{var f;const d=s.current.width,h=s.current.height;r.setContainerSize(),!(d===s.current.width&&h===s.current.height)&&(s.resizing=!0,o.legend_show&&(r.updateSizes(),s.isCanvasMode?(f=r.updateHtmlLegend)==null||f.call(r):r.updateLegend()),r.api.flush(!1))}),u.push(()=>{Ne(o.onresized,r.api),s.resizing=!1}),u.forEach(f=>l.add(f)),r.resizeFunction=l,c==="parent"&&ce.ResizeObserver?(r.resizeFunction.resizeObserver=new ce.ResizeObserver(r.resizeFunction.bind(r))).observe(i.chart.node().parentNode):(c==="parent"&&((n=(e=ce.console)==null?void 0:e.warn)==null||n.call(e,"[billboard.js] resize.auto='parent' requires ResizeObserver; falling back to window resize.")),ce.addEventListener("resize",r.resizeFunction))}callPluginHook(e,...n){this.config.plugins.forEach(r=>{e==="$beforeInit"&&(r.$$=this,this.api.plugins.push(r)),r[e](...n)})}}yn(Er.prototype,[M1,D1,F1,V1,H1,J1,CS,W1,IS,NS,$S,gy,TA,BS,zS,VS,HS,ZS,JS,_S]);const Hc=[br,nr,Yn,Il],mg=10,CA=750,xg=6,IA=2,RA=1e5,OA={"&":"&","<":"<",">":">",'"':""","'":"'"},ws=new WeakMap;function yg(t){var e,n;(n=(e=ce.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] ${t}`)}function Ps(t,e){var n;const{config:r}=t,i=(n=r.data_names[e])!=null?n:e;return le(r.legend_format)?r.legend_format(i,e!==i?e:void 0):i}function wA(t){return`${t}`.replace(/[&<>"']/g,e=>OA[e])}function PA(t,e){var n,r;const{config:i}=t,o=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],s=((r=t.getValidPointPattern)==null?void 0:r.call(t))||(Array.isArray(i.point_pattern)&&i.point_pattern.length?i.point_pattern:[i.point_type]),l=Math.max(0,o.indexOf(e));return s[l%s.length]||"circle"}function MA(t,e){const n=wA(t.color(e)),r=PA(t,e),i='viewBox="0 0 8 8" aria-hidden="true" focusable="false" style="display:block;width:100%;height:100%;overflow:visible;pointer-events:none"',o=`fill="${n}" stroke="${n}"`;return/^rect(angle)?$/i.test(r)?`<svg ${i}><rect x="1" y="1" width="6" height="6" ${o}></rect></svg>`:!r||/^circle$/i.test(r)?`<svg ${i}><circle cx="4" cy="4" r="3" ${o}></circle></svg>`:`<svg ${i}><g ${o}>${Xr(r)}</g></svg>`}function LA(t,e){const n=new Map;e.each(function(r){n.set(r,this)}),t.cache.add(Ue.legendItemMap,n)}function Tg(t,e){const{config:n}=t;e.attr("class",function(r){const o=`${kt(this).attr("class")||""} ${t.generateClass($e.legendItem,r)}`;return Array.from(new Set(o.trim().split(/\s+/).filter(Boolean))).join(" ")}).style("visibility",r=>t.isLegendToShow(r)?null:"hidden").classed($e.legendItemHidden,r=>!t.isTargetToShow(r)).classed(ur.legendItemInteractive,!!n.interaction_enabled),LA(t,e)}function DA(t,e){var n;const{legend:r}=t.$el,i=((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e];r==null||r.selectAll(`.${$e.legendItem}`).classed(cn.legendItemFocused,o=>i.indexOf(o)>=0).style("opacity",function(o){return i.indexOf(o)>=0?null:t.opacityForUnfocusedLegend.call(t,kt(this))})}function FA(t){const{legend:e}=t.$el;e==null||e.selectAll(`.${$e.legendItem}`).classed(cn.legendItemFocused,!1).style("opacity",null)}function NA(t,e){var n,r,i;const{state:o}=t,l=(((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e]).filter(t.isTargetToShow,t),c=new Set(l),u=(((r=t.mapToTargetIds)==null?void 0:r.call(t))||[]).filter(f=>!c.has(f)&&t.isTargetToShow(f));o.focusedTargetIds=c,o.defocusedTargetIds=new Set(u),(i=t.renderCanvasFrame)==null||i.call(t,void 0,null,!1)}function bg(t){var e,n,r;const{state:i}=t,o=!!((e=i.focusedTargetIds)!=null&&e.size)||!!((n=i.defocusedTargetIds)!=null&&n.size);i.focusedTargetIds=new Set,i.defocusedTargetIds=new Set,o&&((r=t.renderCanvasFrame)==null||r.call(t,void 0,null,!1))}function Sg(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function $A(t,e,n){const r=Sg(n);t.state.canvasLegendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function Ag(t,e){const n=t.state.canvasLegendTouch,r=n&&Sg(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>mg||Math.abs(r.clientY-n.y)>mg)}function BA(t,e,n){Ag(t,n);const r=t.state.canvasLegendTouch;return t.state.canvasLegendTouch=null,!!r&&r.id===e&&!r.moved}function zA(t,e){t.state.canvasLegendLastTouchClickId=e,t.state.canvasLegendLastTouchClickTime=Date.now()}function UA(t,e){const{state:n}=t,r=n.canvasLegendLastTouchClickId===e&&Date.now()-(n.canvasLegendLastTouchClickTime||0)<CA;return r&&(n.canvasLegendLastTouchClickId=null,n.canvasLegendLastTouchClickTime=0),r}function Eg(t,e){const{api:n,config:r,state:i}=t;if(e.on("click dblclick mouseover mouseout touchstart touchmove touchend",null),!r.interaction_enabled)return;const o=r.legend_item_interaction,s=typeof o=="object"&&(o!=null&&o.dblclick)?"dblclick":"click",l=i.inputType==="touch",c=o||le(r.legend_item_onclick),u=l?Pg(r):void 0,f=function(d,h){var m;if(!Ne(r.legend_item_onclick,n,h,!i.hiddenTargetIds.has(h))){const A=kt(this);d.type==="dblclick"||d.altKey?i.hiddenTargetIds.size&&!A.classed($e.legendItemHidden)?n.show():(n.hide(),n.show(h)):(n.toggle(h),A.classed(cn.legendItemFocused,!1)),bg(t)}l&&((m=t.hideTooltip)==null||m.call(t))};e.on(s,c?function(d,h){l&&d.type==="click"&&UA(t,h)||f.call(this,d,h)}:null),l&&s==="click"&&c&&e.on("touchstart",function(d,h){$A(t,h,d)},u).on("touchmove",d=>{Ag(t,d)},u).on("touchend",function(d,h){BA(t,h,d)&&(zA(t,h),f.call(this,d,h))},u),!l&&e.on("mouseover",o||le(r.legend_item_onover)?function(d,h){Ne(r.legend_item_onover,n,h,!i.hiddenTargetIds.has(h))||!i.transiting&&t.isTargetToShow(h)&&(DA(t,h),NA(t,h))}:null).on("mouseout",o||le(r.legend_item_onout)?function(d,h){Ne(r.legend_item_onout,n,h,!i.hiddenTargetIds.has(h))||(FA(t),bg(t))}:null)}function kA(t,e){var n,r;const i=(r=(n=t.$el.chart)==null?void 0:n.node)==null?void 0:r.call(n),o=i==null?void 0:i.ownerDocument;if(!i||!o)return null;const s=o.createElementNS("http://www.w3.org/2000/svg","svg"),l=o.createElementNS("http://www.w3.org/2000/svg","g"),c=o.createElementNS("http://www.w3.org/2000/svg","text");s.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",l.setAttribute("class",$e.legendItem),c.textContent=e,l.appendChild(c),s.appendChild(l),i.appendChild(s);const u=un(c);return s.remove(),u}function Cg(t){return/^(indexed|category|log|timeseries)$/.test(t)}function Ms(t){return/^(indexed|log|timeseries)$/.test(t)}function XA(t){var e,n;const r=t;return((e=r.changedTouches)==null?void 0:e[0])||((n=r.touches)==null?void 0:n[0])||("clientX"in t?t:null)}function GA(t,e,n=!1){var r,i;const o=oo(t,e);return o?n?(i=(r=t.hitDetector).findNearestShape)==null?void 0:i.call(r,o[0],o[1]):t.hitDetector.findNearest(o[0],o[1]):null}function WA(t,e){var n;const{config:r,state:i}=t,{height:o,margin:s,width:l,xAxisHeight:c}=i,[u,f]=e,d=s.left,h=s.left+l,m=s.top,A=s.top+o,I=r.axis_x_show?Math.max(c||0,24):0;return(n=t.isMultipleX)!=null&&n.call(t)||i.hasTreemap?!1:r.axis_rotated?f>=m&&f<=A&&u>=d-I&&u<=h:u>=d&&u<=h&&f>=m&&f<=A+I}function VA(t,e){const{state:{height:n,margin:r,width:i}}=t,[o,s]=e;return o>=r.left&&o<=r.left+i&&s>=r.top&&s<=r.top+n}function jA(t,e){var n,r;return t.hitDetector.findNearest(e[0],e[1])||(WA(t,e)?(r=(n=t.hitDetector).findNearestIndexByCoord)==null?void 0:r.call(n,e[0],e[1]):null)}function Ig(t,e){var n;const{config:r,state:i}=t,o=t.filterTargetsToShow(t.data.targets),s=wg(t,e),l=r.tooltip_grouped&&!i.hasTreemap&&!s?(n=t.filterByX)==null?void 0:n.call(t,o,e.x):null;return(i.hasTreemap?[e]:s?[e]:r.tooltip_grouped?l!=null&&l.length?l:o.map(c=>c.values[e.index]).filter(Boolean):[e]).map(c=>{var u;return((u=t.addName)==null?void 0:u.call(t,c))||c})}function HA(t,e,n){var r,i;return(r=t.isMultipleX)!=null&&r.call(t)&&!wg(t,e)?[((i=t.addName)==null?void 0:i.call(t,e))||e]:n}function oo(t,e){const n=XA(e);if(!n)return null;const r=t.$el.canvas.node(),i=un(r,!0);return[n.clientX-i.left,n.clientY-i.top]}function Yc(t,e){var n,r;if(!Array.isArray(e)||e.length<2)return null;const i=e.slice(0,2);return(r=(n=t.axis)==null?void 0:n.isTimeSeries)!=null&&r.call(n)?i.map(o=>Hn.call(t,o)):i}function Ls(t){const{config:e,state:n}=t;return!e.subchart_show||!n.hasAxis||n.width2<=0||n.height2<=0?null:{x:n.margin2.left,y:n.margin2.top,w:n.width2,h:n.height2}}function YA(t,e){const n=Ls(t);return!!n&&e[0]>=n.x&&e[0]<=n.x+n.w&&e[1]>=n.y&&e[1]<=n.y+n.h}function Ds(t){var e,n;const r=Ls(t),i=r?t.config.axis_rotated?r.h:r.w:0,o=(n=(e=t.axis)==null?void 0:e.getExtent)==null?void 0:n.call(e),s=Array.isArray(o)?o.slice(0,2):[];if(s.length===2&&s.every(Number.isFinite)){const l=Math.max(0,Math.min(i,s[0])),c=Math.max(0,Math.min(i,s[1]));return[Math.min(l,c),Math.max(l,c)]}return[0,i]}function Kc(t,e,n=!1){const r=oo(t,e),i=r&&Ls(t);if(!r||!i||!YA(t,r))return null;const o=t.config.axis_rotated?r[1]-i.y:r[0]-i.x,[s,l]=Ds(t);return!n&&(o<s||o>l)?null:Math.max(s,Math.min(l,o))}function KA(t,e,n){const r=Math.min(e,n),i=Math.max(e,n);return[t.scale.subX.invert(r),t.scale.subX.invert(i)]}function Rg(t){const{scale:e,state:n}=t,r=n.domain;if(!(r!=null&&r.length)||!e.subX)return null;const i=Ls(t),o=e.subX(r[0]),s=e.subX(r[1]);if(!i||!Number.isFinite(o)||!Number.isFinite(s))return null;const[l,c]=Ds(t);return[Math.max(l,Math.min(c,Math.min(o,s))),Math.max(l,Math.min(c,Math.max(o,s)))]}function Og(t,e){const n=Rg(t);if(!n)return"select";const[r,i]=n;return Math.abs(e-r)<=xg?"resize-start":Math.abs(e-i)<=xg?"resize-end":e>r&&e<i?"move":"select"}function Zc(t,e,n){const[r,i]=Ds(t);return[Math.max(r,Math.min(i,e)),Math.max(r,Math.min(i,n))]}function ZA(t,e){return/^resize/.test(e)?t.config.axis_rotated?"ns-resize":"ew-resize":e==="move"?"move":"crosshair"}function pa(t){return t?`${t.id}:${t.index}`:null}function JA(t,e){const n=t.state.canvasSelectionDragIncluded,r=ws.get(t)||new Map,i=new Map,o=new Set,s=[];return e.filter(l=>Jc(t,l)).forEach(l=>{const c=pa(l);c&&(o.add(c),!i.has(c)&&i.set(c,l))}),i.forEach((l,c)=>{!n.has(c)&&s.push(l)}),r.forEach((l,c)=>{!o.has(c)&&s.push(l)}),ws.set(t,i),{included:o,rows:s}}function QA(t){return t?Array.isArray(t)?t:[t]:null}function Jc(t,e){return e&&In(t,e)&&Qa(t,e,Hc)&&Hc.some(n=>n(t,e))&&t.config.data_selection_isselectable.bind(t.api)(e)}function Qc(t,e){t.filterTargetsToShow(t.data.targets).filter(n=>Qa(t,n,Hc)).forEach(n=>{n.values.forEach(r=>{Jc(t,r)&&e(r)})})}function wg(t,e){return!(t.config.axis_x_forceAsSingle&&t.config.tooltip_grouped)&&(la(t,e)||ca(t,e))}function _A(t){return t.interaction_inputType_touch!==!1}function Pg(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ea(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}function qA(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Ea(n)&&n||!1,i=!isNaN(n)&&n||null;let o;return s=>{var l,c;const u=((l=s.changedTouches)==null?void 0:l[0])||((c=s.touches)==null?void 0:c[0]);if(!u)return;const f=u[`client${t.axis_rotated?"Y":"X"}`];s.type==="touchstart"?r?s.preventDefault():i!==null&&(o=f):s.type==="touchmove"&&(r||o===!0||i!==null&&Math.abs(o-f)>=i)&&(o=!0,s.preventDefault())}}function di(t,e){return e.pointerType!=="mouse"&&t.state.inputType!=="touch"}function tE(t,e){const{state:n}=t,r=pa(e),i=r&&n.canvasLastInputClickKey===r&&Date.now()-(n.canvasLastInputClickTime||0)<750;return i&&(n.canvasLastInputClickKey=null,n.canvasLastInputClickTime=0),!!i}function eE(t,e){t.state.canvasLastInputClickKey=pa(e),t.state.canvasLastInputClickTime=Date.now()}function nE(){var t,e,n;return(n=(e=(t=ce.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function Mg(t,e=!1){return Array.isArray(t)&&t.length>=2&&t.every(n=>Number.isFinite(+n)&&(!e||+n>0))}function rE(t,e,n,r=!1){return t.slice(0,2).map((i,o)=>{const s=r?Math.exp(Math.log(+i)+(Math.log(+e[o])-Math.log(+i))*n):+i+(+e[o]-+i)*n;return i instanceof Date||e[o]instanceof Date?new Date(s):s})}function aE(t){return t.data.targets.reduce((e,n)=>e+n.values.length,0)}function iE(t){var e,n;const{scale:r}=t,i=t.filterTargetsToShow(t.data.targets);["y","y2"].forEach(o=>{var s;(s=r[o])==null||s.domain(t.getYDomain(i,o))}),(e=r.subY)==null||e.domain(t.getYDomain(i,"y")),(n=r.subY2)==null||n.domain(t.getYDomain(i,"y2"))}const oE={prepareCanvasConfig(){var t,e;const{config:n,state:r}=this;this.warnUnsupportedCanvasOptions(),(t=r.orgConfig)!=null&&t.transition&&Object.prototype.hasOwnProperty.call(r.orgConfig.transition,"duration")&&r.orgConfig.transition.duration&&yg("canvas mode: transition.duration is ignored; canvas redraws synchronously."),n.transition_duration=0,Cg(n.axis_x_type)||(n.axis_x_type="indexed"),Ms(n.axis_y_type)||(n.axis_y_type="indexed"),Ms(n.axis_y2_type)||(n.axis_y2_type="indexed"),(e=this.hasType)!=null&&e.call(this,"bubble")&&(n.point_show=!0,n.point_type="circle")},applyCanvasSubchartDomain(){const t=this,{axis:e,config:n,scale:r,state:i}=t;if(!n.subchart_show||!i.hasAxis||!r.subX)return;!i.rendered&&!i.domain&&n.subchart_init_range&&(i.domain=Yc(t,n.subchart_init_range));const o=Yc(t,i.domain);!o||!t.withinRange(o,t.getZoomDomain("subX",!0),t.getZoomDomain("subX"))||(i.domain=o,r.x.domain(o),e.x.scale(r.x))},setCanvasSubchartDomain(t,e=!0,n=!1){const r=this,{config:i,scale:o,state:s}=r,l=Yc(r,t);if(!(!i.subchart_show||!l||!r.withinRange(l,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))))return s.domain=l,o.zoom=null,e&&r.redraw({withTransition:!1,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n&&i.subchart_onbrush.bind(r.api)(s.domain),s.domain},clearCanvasSubchartDomain(t=!0,e=!1){var n;const r=this,{axis:i,config:o,org:s,scale:l,state:c}=r;o.subchart_show&&(c.domain=void 0,l.zoom=null,(n=s.xDomain)!=null&&n.length&&(l.x.domain(s.xDomain),i.x.scale(l.x)),t&&r.redraw({withTransition:!1,withUpdateXDomain:!0,withUpdateOrgXDomain:!1,withY:o.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e&&o.subchart_onbrush.bind(r.api)(l.x.orgDomain()))},flushCanvasFlow(){var t,e;const{state:n}=this;n.canvasFlowFinish&&(n.canvasFlowFrame!==null&&((e=(t=ce).cancelAnimationFrame)==null||e.call(t,n.canvasFlowFrame)),n.canvasFlowFrame=null,n.canvasFlowFinish())},animateCanvasFlow(t){var e,n,r,i,o,s,l,c,u,f,d;const h=this,{axis:m,data:A,org:I,scale:C,state:P}=h,{done:z=()=>{},duration:N,length:B,orgDataCount:W}=t,V=(e=ce.requestAnimationFrame)==null?void 0:e.bind(ce),J=!!((n=m.isLog)!=null&&n.call(m,"x"));if(!V||!N||!B||!W||aE(h)>RA)return!1;const q=C.x.domain().slice(0,2),at=(i=(r=I.xDomain)==null?void 0:r.slice)==null?void 0:i.call(r),et=(c=(s=(o=C.subX)==null?void 0:o.domain)==null?void 0:(l=s.call(o)).slice)==null?void 0:c.call(l);if(!Mg(q,J))return!1;const ot=A.targets.map(bt=>bt.values.splice(0,B));h.updateXDomain(h.filterTargetsToShow(A.targets),!0,!0);const lt=C.x.domain().slice(0,2),ft=(f=(u=I.xDomain)==null?void 0:u.slice)==null?void 0:f.call(u);if(A.targets.forEach((bt,Rt)=>{bt.values.unshift(...ot[Rt])}),!Mg(lt,J))return at&&(I.xDomain=at),C.x.domain(q),et&&C.subX.domain(et),m.x.scale(C.x),!1;iE(h);let _=!1;const dt=nE(),ut=()=>{var bt,Rt;_||(_=!0,A.targets.forEach(Et=>{Et.values.splice(0,B)}),ft&&(I.xDomain=ft),C.x.domain(lt),(Rt=(bt=C.subX)==null?void 0:bt.domain)==null||Rt.call(bt,ft!=null?ft:lt),m.x.scale(C.x),P.dirty.data=!0,P._eventRectFingerprint=null,P.canvasShape=null,P._cachedDrawShape=null,h.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),h.updateTypesElements(),P.canvasFlowFrame=null,P.canvasFlowFinish=null,P.flowing=!1,z.call(h.api))},xt=bt=>{const Rt=Math.min(1,Math.max(0,(bt-dt)/N)),Et=rE(q,lt,Rt,J);C.x.domain(Et),m.x.scale(C.x),P.canvasShape=null,P._cachedDrawShape=null,P._canvasVisibleRangeCache=null,P._canvasXTickValuesCache=null,h.renderCanvasFrame(void 0,null,!1),Rt<1?P.canvasFlowFrame=V(xt):ut()};return at&&(I.xDomain=at),C.x.domain(q),et&&C.subX.domain(et),m.x.scale(C.x),P.flowing=!0,P.cancelClick=!0,(d=h.hideTooltip)==null||d.call(h),P.canvasFlowFinish=ut,P.canvasFlowFrame=V(xt),!0},initCanvas(){var t;const e=this,{config:n,state:r,$el:i}=e,o=i.chart.node();r.isCanvasMode=!0,r.canvasInlineStyle.minHeight=o.style.minHeight,ce.getComputedStyle(o).position==="static"&&i.chart.style("position","relative"),i.chart.style("min-height",`${r.current.height}px`),e.canvasEngine=new l0,e.canvasEngine.init(o,r.current.width,e.getCanvasSurfaceHeight()),i.canvas=kt(e.canvasEngine.canvas),e.canvasTheme=new DT,e.canvasTheme.load(o,n.canvas_theme),e.canvasAxisRenderer=new i0(e.canvasEngine,e.canvasTheme),e.canvasRenderer=new ST(e.canvasEngine,e.canvasTheme),e.hitDetector=new zT,e.bindCanvasEvents(),n.zoom_enabled&&((t=e.bindZoomEvent)==null||t.call(e))},warnUnsupportedCanvasOptions(){var t,e,n,r;const{config:i}=this;[[!Cg(i.axis_x_type),"axis.x.type other than indexed/category/log/timeseries"],[!Ms(i.axis_y_type),"axis.y.type other than indexed/log/timeseries"],[!Ms(i.axis_y2_type),"axis.y2.type other than indexed/log/timeseries"],[i.boost_useCssRule,"boost.useCssRule"],[(t=this.hasArcType)==null?void 0:t.call(this),"arc charts"],[(e=this.hasType)==null?void 0:e.call(this,"radar"),"radar chart"],[(n=this.hasType)==null?void 0:n.call(this,"polar"),"polar chart"],[(r=this.hasType)==null?void 0:r.call(this,"funnel"),"funnel chart"]].forEach(([s,l])=>{s&&yg(`canvas mode: ${l} is not yet supported.`)})},bindCanvasEvents(){const t=this,{config:e,state:n,$el:r}=t,i=r.canvas.node(),o=qA(e),s=Pg(e);i.addEventListener("mousemove",t.onCanvasMouseMove.bind(t)),i.addEventListener("mouseenter",l=>{var c;n.event=l,(c=e.onover)==null||c.bind(t.api)(l)}),i.addEventListener("mouseout",t.onCanvasMouseOut.bind(t)),i.addEventListener("mouseleave",l=>{var c;n.event=l,(c=e.onout)==null||c.bind(t.api)(l)}),i.addEventListener("mousedown",l=>{var c;(c=t.onCanvasSubchartBrushStart)!=null&&c.call(t,l)||t.onCanvasSelectionDragStart(l)}),i.addEventListener("click",t.onCanvasClick.bind(t)),i.addEventListener("pointerdown",t.onCanvasPointerDown.bind(t)),i.addEventListener("pointerenter",t.onCanvasPointerEnter.bind(t)),i.addEventListener("pointermove",t.onCanvasPointerMove.bind(t)),i.addEventListener("pointerup",t.onCanvasPointerUp.bind(t)),i.addEventListener("pointerleave",t.onCanvasPointerOut.bind(t)),i.addEventListener("pointercancel",t.onCanvasPointerCancel.bind(t)),_A(e)&&(i.addEventListener("touchstart",l=>{o(l),t.onCanvasTouchStart(l)},s),i.addEventListener("touchmove",l=>{o(l),t.onCanvasTouchMove(l)},s),i.addEventListener("touchend",t.onCanvasTouchEnd.bind(t),s),i.addEventListener("touchcancel",t.onCanvasTouchCancel.bind(t),s))},updateHtmlLegend(){var t,e;const n=this,{config:r,state:i,$el:o}=n,s=o.chart.node();if(!r.legend_show||i.hasTreemap){i.hasTreemap?((t=o.legend)==null||t.remove(),o.legend=null):(e=o.legend)==null||e.style("visibility","hidden"),i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0;return}const l=n.mapToIds(n.data.targets).filter(d=>r.data_names[d]!==null);if(r.legend_contents_bindto&&r.legend_contents_template){n.updateHtmlLegendTemplate(l)?(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0,i.legendHasRendered=!0):(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0);return}o.legend||(o.legend=kt(s).append("div").classed($e.legend,!0).classed(ur.legend,!0)),o.legend.style("visibility",null);const c=o.legend.selectAll(`button.${$e.legendItem}`).data(l,d=>d);c.exit().remove();const u=c.enter().append("button").attr("type","button").attr("data-id",d=>d);u.append("span").classed($e.legendItemTile,!0),u.append("span").classed(ur.legendItemTitle,!0);const f=u.merge(c).attr("class",d=>n.generateClass($e.legendItem,d).trim());Tg(n,f),f.select(`.${$e.legendItemTile}`).classed(ur.legendItemTileCircle,!r.legend_usePoint&&r.legend_item_tile_type==="circle").style("background-color",d=>r.legend_usePoint?null:n.color(d)).html(d=>r.legend_usePoint?MA(n,d):""),f.select(`.${ur.legendItemTitle}`).text(d=>Ps(n,d)),r.legend_tooltip&&f.attr("title",d=>Ps(n,d)),Eg(n,f),n.updateHtmlLegendSize(l),n.positionHtmlLegend(),i.legendHasRendered=!0},updateHtmlLegendTemplate(t){const e=this,{api:n,config:r,$el:i}=e,o=kt(r.legend_contents_bindto),s=r.legend_contents_template,l=[];let c="";if(o.empty())return!1;t.forEach(f=>{const d=le(s)?Xr(s.call(n,f,e.color(f),n.data(f)[0].values)):Ra(s,{COLOR:e.color(f),TITLE:f});d&&(l.push(f),c+=d)});const u=o.html(c).classed($e.legend,!0).classed(ur.legend,!1).style("visibility",null).selectAll(function(){return this.children}).data(l);return Tg(e,u),Eg(e,u),i.legend=o,!0},updateHtmlLegendSize(t){const e=this,{config:n,state:r,$el:i}=e,o=[],s={};let l=0,c=0,u=0;const f=n.legend_contents_bindto&&n.legend_contents_template;if(f)i.legend.selectAll(`.${$e.legendItem}`).each(function(d){const h=un(this,!0),m=`${Ps(e,d)}`,A=Math.max(32,m.length*7+24),I=20,C=Math.ceil(h.width||A),P=Math.ceil(h.height||I);o.push(C),l=Math.max(l,C),c=Math.max(c,P)});else if(t.length){const d=r.isLegendRight||r.isLegendInset,h=n.legend_item_tile_type!=="circle",m={width:h?n.legend_item_tile_width:n.legend_item_tile_r*2,height:h?n.legend_item_tile_height:n.legend_item_tile_r*2},A={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:m.width+5,totalLength:0},I={offsets:{},widths:{},heights:{},margins:[0],steps:{}},C=t.map((J,q)=>{const at=`${Ps(e,J)}`,et=kA(e,at),ot=Math.max(32,at.length*7),lt=12,ft=q===t.length-1,_=n.legend_show&&!e.isLegendToShow(J),dt=_?0:((et==null?void 0:et.width)||ot)+A.tileWidth+(ft&&!d?0:A.padding.right)+n.legend_padding,ut=_?0:((et==null?void 0:et.height)||lt)+A.padding.top;return A.max.width=Math.max(A.max.width,dt),A.max.height=Math.max(A.max.height,ut),{id:J,hidden:_,width:dt,height:ut}}),P=d?e.getLegendHeight():e.getLegendWidth(),z=(J,q,at=!1)=>{let et;at||(et=(P-A.totalLength-q)/2,et<A.posMin&&(et=(P-q)/2,A.totalLength=0,A.step++)),I.steps[J]=A.step,I.margins[A.step]=r.isLegendInset?10:et,I.offsets[J]=A.totalLength,A.totalLength+=q};r.isLegendInset&&(A.step=n.legend_inset_step?n.legend_inset_step:t.length,r.legendStep=A.step),C.forEach(({id:J,hidden:q,width:at,height:et})=>{const ot=n.legend_equally&&!q?A.max.width:at,lt=n.legend_equally&&!q?A.max.height:et,ft=d?lt:ot;if(I.widths[J]=ot,I.heights[J]=lt,o.push(ot),l=Math.max(l,ot),c=Math.max(c,lt),q){I.steps[J]=0,I.offsets[J]=0;return}z(J,ft)});const N=r.isLegendRight?J=>A.max.width*I.steps[J]:r.isLegendInset?J=>A.max.width*I.steps[J]+10:J=>I.margins[I.steps[J]]+I.offsets[J],B=r.isLegendRight||r.isLegendInset?J=>I.margins[I.steps[J]]+I.offsets[J]:J=>A.max.height*I.steps[J],W=4+m.width,V=9;C.forEach(({id:J,hidden:q})=>{const at=q?0:N(J),et=q?0:B(J);s[J]={item:{x:at,y:et-5,width:I.widths[J],height:I.heights[J]},title:{x:W,y:0,height:I.heights[J]},tile:{x:-2,y:V-m.height/2,width:m.width,height:m.height}}}),u=A.step}if(!t.length){r.legendItemWidth=0,r.legendItemHeight=0,r.legendStep=0;return}if(f){const d=Math.max(1,r.current.width),h=10;let m=1,A=0;o.forEach(I=>{A&&A+h+I>d?(m++,A=I):A+=(A?h:0)+I}),r.legendStep=Math.max(0,m-1)}else r.legendStep=u;r.legendItemWidth=l,r.legendItemHeight=Math.max(12,c),f||i.legend.selectAll(`button.${$e.legendItem}`).each(function(d){const h=s[d],m=kt(this);h&&(m.style("left",`${h.item.x}px`).style("top",`${h.item.y}px`).style("width",`${h.item.width}px`).style("height",`${h.item.height}px`),m.select(`.${ur.legendItemTitle}`).style("left",`${h.title.x}px`).style("top",`${h.title.y}px`).style("height",`${h.title.height}px`).style("line-height",`${h.title.height}px`),m.select(`.${$e.legendItemTile}`).style("left",`${h.tile.x}px`).style("top",`${h.tile.y}px`).style("width",`${h.tile.width}px`).style("height",`${h.tile.height}px`))})},getCanvasBottomLegendHeight(){var t;const e=this,{config:n,state:r,$el:i}=e;if(!n.legend_show||r.isLegendRight||r.isLegendInset||r.hasTreemap||!i.legend||!r.legendItemHeight)return 0;const o=un(i.legend.node(),!0).height,s=r.legendItemHeight*(r.legendStep+1);return Math.ceil(Math.max(((t=e.getLegendHeight)==null?void 0:t.call(e))||0,o||s))},getCanvasSurfaceHeight(){const t=this;return Math.max(0,t.state.current.height-t.getCanvasBottomLegendHeight())},positionHtmlLegend(){var t;const e=this,{config:n,state:r,$el:i}=e,o=i.legend;if(o.classed(ur.legendBottom,!r.isLegendRight&&!r.isLegendInset).classed(ur.legendRight,r.isLegendRight).classed(ur.legendInset,r.isLegendInset).style("top",null).style("right",null).style("bottom",null).style("left",null).style("width",null).style("height",null).style("min-height",null),r.isLegendRight)o.style("top",`${r.margin3.top}px`).style("right","0").style("bottom",`${r.margin3.bottom}px`).style("width",`${Math.max(0,e.getLegendWidth())}px`);else if(r.isLegendInset){if(r.isLegendInset){const s=r.isLegendTop,l=r.isLegendLeft;o.style(s?"top":"bottom",`${n.legend_inset_y}px`).style(l?"left":"right",`${n.legend_inset_x}px`).style("width",`${Math.max(0,r.legendItemWidth*(r.legendStep+1)+20)}px`)}}else{const s=((t=e.getLegendHeight)==null?void 0:t.call(e))||0;o.style("top",`${Math.max(0,r.current.height-s)}px`).style("right","0").style("bottom","auto").style("left","0")}},getCanvasSelectedData(t){const e=this,n=e.state.canvasSelection,r=[];return!e.config.data_selection_enabled||!(n!=null&&n.size)||Qc(e,i=>{(!t||i.id===t)&&n.has(pa(i))&&r.push(i)}),r},setCanvasSelection(t=!1,e,n,r){var i;const o=this,{config:s,state:l}=o,c=l.canvasSelection,u=s.data_selection_grouped,f=QA(e);let d=!1;s.data_selection_enabled&&(Qc(o,h=>{const m=pa(h),A=u||!f||f.indexOf(h.id)>=0,I=!n||n.indexOf(h.index)>=0,C=c.has(m);t?A&&I&&!C?(c.add(m),Ne(s.data_onselected,o.api,h,o.canvasEngine.canvas),d=!0):r&&C&&(c.delete(m),Ne(s.data_onunselected,o.api,h,o.canvasEngine.canvas),d=!0):A&&I&&C&&(c.delete(m),Ne(s.data_onunselected,o.api,h,o.canvasEngine.canvas),d=!0)}),d&&((i=o.renderCanvasFrame)==null||i.call(o,void 0,null,!1)))},toggleCanvasSelection(t){var e;const n=this,{config:r,state:i}=n,o=i.canvasSelection;let s=!1;r.data_selection_enabled&&(t.filter(l=>Jc(n,l)).forEach(l=>{const c=pa(l),u=o.has(c);r.data_selection_multiple||Qc(n,f=>{const d=pa(f);(r.data_selection_grouped?f.id===l.id:d!==c)&&o.has(d)&&(o.delete(d),Ne(r.data_onunselected,n.api,f,n.canvasEngine.canvas),s=!0)}),u&&o.has(c)?(o.delete(c),Ne(r.data_onunselected,n.api,l,n.canvasEngine.canvas)):(o.add(c),Ne(r.data_onselected,n.api,l,n.canvasEngine.canvas)),s=!0}),s&&((e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1)))},canStartCanvasSelectionDrag(t){const e=this,{config:n}=e,r=t;return!!(n.interaction_enabled&&n.data_selection_enabled&&n.data_selection_draggable&&n.data_selection_multiple&&!n.zoom_enabled&&(r.button===void 0||r.button===0))},getCanvasSelectionDragData(t){const e=this,{config:n}=e,r=e.hitDetector.findInRect(t,n.data_selection_grouped);if(!n.data_selection_grouped)return r;const i=new Set(r.map(o=>o.index));return e.filterTargetsToShow(e.data.targets).flatMap(o=>o.values.filter(s=>i.has(s.index)))},startCanvasSelectionDrag(t){var e,n;const r=this,{state:i}=r,o=oo(r,t);return!o||!r.canStartCanvasSelectionDrag(t)?!1:(i.dragStart=o,i.canvasSelectionDragStart=o,i.canvasSelectionDragIncluded=new Set,i.canvasSelectionDragging=!0,i.canvasSelectionDragMoved=!1,ws.set(r,new Map),r.setDragStatus(!0),(e=r.hideTooltip)==null||e.call(r),(n=t.preventDefault)==null||n.call(t),!0)},updateCanvasSelectionDrag(t){var e;const n=this,{config:r,state:i}=n,o=i.canvasSelectionDragStart,s=oo(n,t);if(!i.canvasSelectionDragging||!o||!s)return!1;const[l,c]=o,[u,f]=s,d=Math.min(l,u),h=Math.max(l,u),m=r.data_selection_grouped?i.margin.top:Math.min(c,f),A=r.data_selection_grouped?i.margin.top+i.height:Math.max(c,f),I={x:d,y:m,w:h-d,h:A-m},C=Math.abs(u-l)>4||Math.abs(f-c)>4;if(i.canvasSelectionDragMoved=i.canvasSelectionDragMoved||C,C){const{included:P,rows:z}=JA(n,n.getCanvasSelectionDragData(I));z.length&&n.toggleCanvasSelection(z),i.canvasSelectionDragIncluded=P,i.cancelClick=!0}return n.renderCanvasSelectionDrag(I),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSelectionDrag(t){var e;const n=this,{state:r}=n;return r.canvasSelectionDragging?(n.updateCanvasSelectionDrag(t),r.cancelClick=r.cancelClick||r.canvasSelectionDragMoved,r.dragStart=null,r.canvasSelectionDragStart=null,r.canvasSelectionDragIncluded=new Set,r.canvasSelectionDragging=!1,r.canvasSelectionDragMoved=!1,ws.delete(n),n.setDragStatus(!1),n.clearCanvasFocus(),(e=t.preventDefault)==null||e.call(t),!0):!1},dispatchCanvasDataOut(t){const e=this,{config:n,state:r}=e,i=r.canvasDataHover;i&&(r.canvasDataHover=null,r.canvasDataHoverKey=null,n.interaction_enabled&&Ne(n.data_onout,e.api,i,t))},dispatchCanvasDataOver(t,e){const n=this,{config:r,state:i}=n,o=pa(t);i.canvasDataHoverKey!==o&&(n.dispatchCanvasDataOut(e),i.canvasDataHover=t,i.canvasDataHoverKey=o,r.interaction_enabled&&t&&Ne(r.data_onover,n.api,t,e))},dispatchCanvasDataClick(t,e=!1){var n;const r=this,{config:i,$el:o}=r,s=o.canvas.node(),l=GA(r,t,!0);if(!l||tE(r,l))return l;if(i.interaction_enabled){const c=i.data_selection_grouped?r.filterTargetsToShow(r.data.targets).map(u=>u.values[l.index]).filter(Boolean):[l];(n=r.toggleCanvasSelection)==null||n.call(r,c),c.forEach(u=>Ne(i.data_onclick,r.api,u,s)),e&&eE(r,l)}return l},updateCanvasSubchartBrush(t){var e,n;const r=this,{state:i}=r,o=i.canvasSubchartBrushStart,s=i.canvasSubchartBrushOrigin,l=i.canvasSubchartBrushMode,c=Kc(r,t,!0);if(!i.canvasSubchartBrushDragging||o===null||c===null||!l)return!1;const u=c-o;if(Math.abs(u)>IA&&(i.canvasSubchartBrushMoved=!0),!i.canvasSubchartBrushMoved)return(e=t.preventDefault)==null||e.call(t),!0;let f;if(l==="move"&&s){const[h,m]=Ds(r),A=s[1]-s[0];let I=s[0]+u,C=s[1]+u;I<h&&(C+=h-I,I=h),C>m&&(I-=C-m,C=m),f=[Math.max(h,Math.min(m-A,I)),Math.min(m,Math.max(h+A,C))]}else l==="resize-start"&&s?f=Zc(r,c,s[1]):l==="resize-end"&&s?f=Zc(r,s[0],c):f=Zc(r,o,c);const d=KA(r,f[0],f[1]);return r.setCanvasSubchartDomain(d,!0),i.cancelClick=!0,(n=t.preventDefault)==null||n.call(t),!0},updateCanvasSubchartCursor(t){const e=this,n=e.$el.canvas.node(),r=Kc(e,t);if(r===null)return n.style.cursor="",!1;const i=Og(e,r);return n.style.cursor=ZA(e,i),!0},startCanvasSubchartBrush(t){var e;const n=this,{state:r}=n,i=Kc(n,t);if(i===null)return!1;const o=Og(n,i);return r.event=t,r.canvasSubchartBrushDragging=!0,r.canvasSubchartBrushMode=o,r.canvasSubchartBrushStart=i,r.canvasSubchartBrushOrigin=Rg(n),r.canvasSubchartBrushMoved=!1,r.cancelClick=!0,n.setDragStatus(!0),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSubchartBrush(t){var e,n,r;const i=this,{state:o}=i;if(!o.canvasSubchartBrushDragging)return!1;i.updateCanvasSubchartBrush(t);const s=o.canvasSubchartBrushMode==="select"&&!o.canvasSubchartBrushMoved,l=o.canvasSubchartBrushMoved||s;return s?(e=i.clearCanvasSubchartDomain)==null||e.call(i,!0,!0):l&&i.config.subchart_onbrush.bind(i.api)((n=o.domain)!=null?n:i.scale.x.orgDomain()),o.canvasSubchartBrushDragging=!1,o.canvasSubchartBrushMode=null,o.canvasSubchartBrushStart=null,o.canvasSubchartBrushOrigin=null,o.canvasSubchartBrushMoved=!1,i.setDragStatus(!1),(r=t.preventDefault)==null||r.call(t),!0},cancelCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;return r.canvasSubchartBrushDragging?(r.canvasSubchartBrushDragging=!1,r.canvasSubchartBrushMode=null,r.canvasSubchartBrushStart=null,r.canvasSubchartBrushOrigin=null,r.canvasSubchartBrushMoved=!1,n.setDragStatus(!1),(e=t.preventDefault)==null||e.call(t),!0):!1},onCanvasSubchartBrushStart(t){const e=this;if(!e.startCanvasSubchartBrush(t))return!1;const n=i=>{e.updateCanvasSubchartBrush(i)},r=i=>{e.endCanvasSubchartBrush(i),ce.removeEventListener("mousemove",n),ce.removeEventListener("mouseup",r)};return ce.addEventListener("mousemove",n),ce.addEventListener("mouseup",r),!0},onCanvasClick(t){var e;const n=this,{config:r,state:i}=n;if(i.event=t,i.flowing||i.cancelClick){i.cancelClick=!1;return}n.dispatchCanvasDataClick(t),(e=r.onclick)==null||e.bind(n.api)(t)},onCanvasSelectionDragStart(t){const e=this,{state:n}=e;if(!e.startCanvasSelectionDrag(t))return;const r=o=>{e.updateCanvasSelectionDrag(o)},i=o=>{e.endCanvasSelectionDrag(o),ce.removeEventListener("mousemove",r),ce.removeEventListener("mouseup",i),n.canvasSelectionDragMoveHandler=null,n.canvasSelectionDragEndHandler=null};n.canvasSelectionDragMoveHandler=r,n.canvasSelectionDragEndHandler=i,ce.addEventListener("mousemove",r),ce.addEventListener("mouseup",i)},onCanvasPointerDown(t){var e;if(!di(this,t))return;const n=this,r=n.$el.canvas.node();if(!n.startCanvasSubchartBrush(t))return;const i=t.pointerId,o=f=>f.pointerId===i,s=f=>{o(f)&&n.updateCanvasSubchartBrush(f)},l=f=>{o(f)&&(n.endCanvasSubchartBrush(f),u())},c=f=>{o(f)&&(n.cancelCanvasSubchartBrush(f),u())};function u(){var f;ce.removeEventListener("pointermove",s),ce.removeEventListener("pointerup",l),ce.removeEventListener("pointercancel",c);try{(f=r.releasePointerCapture)==null||f.call(r,i)}catch(d){}}try{(e=r.setPointerCapture)==null||e.call(r,i)}catch(f){}ce.addEventListener("pointermove",s),ce.addEventListener("pointerup",l),ce.addEventListener("pointercancel",c)},onCanvasPointerEnter(t){var e;di(this,t)&&(this.state.event=t,(e=this.config.onover)==null||e.bind(this.api)(t))},onCanvasPointerMove(t){di(this,t)&&(this.updateCanvasSubchartBrush(t)||this.onCanvasMouseMove(t))},onCanvasPointerUp(t){var e;if(di(this,t)){if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node())}},onCanvasPointerOut(t){var e;di(this,t)&&(this.state.canvasSubchartBrushDragging||(this.state.event=t,this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)))},onCanvasPointerCancel(t){var e;if(di(this,t)){if(this.state.event=t,this.cancelCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.onCanvasPointerOut(t)}},onCanvasTouchStart(t){var e;t.touches.length>1||(this.state.event=t,!this.startCanvasSubchartBrush(t)&&(this.startCanvasSelectionDrag(t)||((e=this.config.onover)==null||e.bind(this.api)(t),this.onCanvasMouseMove(t))))},onCanvasTouchMove(t){t.touches.length>1||this.updateCanvasSubchartBrush(t)||this.updateCanvasSelectionDrag(t)||this.onCanvasMouseMove(t)},onCanvasTouchEnd(t){var e,n,r;if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}if(this.endCanvasSelectionDrag(t)){(n=this.config.onout)==null||n.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node()),(r=this.config.onout)==null||r.bind(this.api)(t)},onCanvasTouchCancel(t){var e;this.state.event=t,this.cancelCanvasSubchartBrush(t),this.endCanvasSelectionDrag(t),this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)},onCanvasMouseMove(t){var e,n,r,i,o;const s=this,{config:l,state:c,$el:u}=s,f=u.canvas.node();if(c.event=t,c.flowing||c.canvasSelectionDragging)return;if((e=s.updateCanvasSubchartCursor)!=null&&e.call(s,t)){s.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,s.clearCanvasFocus()),(n=s.hideTooltip)==null||n.call(s);return}const d=oo(s,t),h=d?jA(s,d):null;if(!h){if(s.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,s.clearCanvasFocus()),d&&l.axis_tooltip&&VA(s,d)){s.renderCanvasAxisTooltip(d),(r=s.hideTooltip)==null||r.call(s);return}(i=s.hideTooltip)==null||i.call(s);return}s.dispatchCanvasDataOver(h,f);const m=Ig(s,h),A=HA(s,h,m),I=A.map(C=>`${C.id}:${C.index}`).join("|");(c.canvasFocusKey!==I||l.axis_tooltip)&&(c.canvasFocusKey=I,s.renderCanvasFocus(A,d)),(o=s.showTooltip)==null||o.call(s,m,f)},onCanvasMouseOut(){var t;const e=this.$el.canvas.node();e.style.cursor="",this.dispatchCanvasDataOut(e),this.state.canvasFocusKey?(this.state.canvasFocusKey=null,this.clearCanvasFocus()):this.config.axis_tooltip&&this.clearCanvasFocus(),(t=this.hideTooltip)==null||t.call(this)},showCanvasLinkedTooltip(t){var e,n,r,i;const o=this,{$el:s,state:l}=o,c=(e=s.canvas)==null?void 0:e.node(),f=o.filterTargetsToShow(o.data.targets).map(P=>P.values[t]).find(Boolean);if(!c||!f)return(n=o.hideTooltip)==null||n.call(o),!1;const d=Ig(o,f),h=d.find(P=>P&&In(o,P))||d[0];if(!d.length||!h)return(r=o.hideTooltip)==null||r.call(o),!1;const{left:m,top:A}=un(c,!0),I=ki(o,h),C=[l.margin.left+I.x,l.margin.top+I.y];return l.event={clientX:m+C[0],clientY:A+C[1],currentTarget:c,target:c},l.canvasFocusKey=d.map(P=>`${P.id}:${P.index}`).join("|"),o.renderCanvasFocus(d,C),(i=o.showTooltip)==null||i.call(o,d,c),!0},renderCanvasZoomBrush(t,e){const n=this;n.canvasEngine.withOverlay(r=>{n.canvasRenderer.withContext(r,()=>{n.canvasRenderer.drawZoomBrush(n,t,e)})})},clearCanvasZoomBrush(){this.canvasEngine.clearOverlay()},renderCanvasSelectionDrag(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasRenderer.withContext(n,()=>{e.canvasRenderer.drawSelectionDragArea(e,t)})})},renderCanvasFrame(t,e,n=!1){const r=this,{state:i}=r,o=t||i.canvasShape||r.getDrawShape();i.canvasShape=o,i._canvasVisibleRangeCache=null,i._canvasXTickValuesCache=null,r.canvasEngine.beginFrame(i.current.width,r.getCanvasSurfaceHeight());try{r.canvasRenderer.drawBackground(r),r.canvasAxisRenderer.drawTitle(r),i.hasAxis&&r.canvasAxisRenderer.draw(r),r.canvasRenderer.draw(r,o),i.hasAxis&&r.config.grid_lines_front&&r.canvasAxisRenderer.drawGridLines(r),r.canvasRenderer.drawSubchart(r,o),i.hasAxis&&r.canvasAxisRenderer.drawSubXAxis(r),r.canvasRenderer.drawEmptyLabel(r),n&&r.hitDetector.rebuild(r,o)}finally{r.canvasEngine.endFrame()}r.canvasEngine.clearOverlay(),i.canvasFocusMainRedraw=!1,e&&r.renderCanvasFocus(e)},renderCanvasFocus(t,e){var n,r;const i=this,{state:o}=i,s=(r=(n=i.canvasRenderer).hasExpandedShapeFocus)==null?void 0:r.call(n,i,t);if(s){const l=o.canvasShape||i.getDrawShape();i.canvasEngine.beginFrame(o.current.width,i.getCanvasSurfaceHeight());try{i.canvasRenderer.drawBackground(i),i.canvasAxisRenderer.drawTitle(i),o.hasAxis&&i.canvasAxisRenderer.draw(i),i.canvasRenderer.draw(i,l,t),o.hasAxis&&i.config.grid_lines_front&&i.canvasAxisRenderer.drawGridLines(i),i.canvasRenderer.drawSubchart(i,l),o.hasAxis&&i.canvasAxisRenderer.drawSubXAxis(i),i.canvasRenderer.drawEmptyLabel(i)}finally{i.canvasEngine.endFrame()}}o.canvasFocusMainRedraw=!!s,i.canvasEngine.withOverlay(l=>{i.canvasRenderer.withContext(l,()=>{i.canvasRenderer.drawFocus(i,t)}),i.canvasAxisRenderer.withContext(l,()=>{i.canvasAxisRenderer.drawFocusedXAxisTick(i,t),e&&i.canvasAxisRenderer.drawAxisTooltip(i,e)})})},renderCanvasAxisTooltip(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasAxisRenderer.withContext(n,()=>{e.canvasAxisRenderer.drawAxisTooltip(e,t)})})},clearCanvasFocus(){var t;const e=this;e.state.canvasFocusMainRedraw?(e.state.canvasFocusMainRedraw=!1,e.renderCanvasFrame(void 0,null,!1)):(t=e.canvasEngine)==null||t.clearOverlay()},resizeCanvas(){var t,e;const n=this,{config:r,state:i,$el:o}=n,s=o.chart.node();o.chart.style("min-height",`${i.current.height}px`),(t=n.canvasEngine)==null||t.resize(i.current.width,n.getCanvasSurfaceHeight()),(e=n.canvasTheme)==null||e.reload(s,r.canvas_theme)}};let Lg=()=>(yn(Er.prototype,oE),(Lg=()=>"canvas")());var Dg={category(t,e){const n=this.internal,{config:r}=n;return arguments.length>1&&(r.axis_x_categories[t]=e,n.state.dirty.data=!0,n.redraw()),r.axis_x_categories[t]},categories(t){const e=this.internal,{config:n}=e;if(!t||!Array.isArray(t)){const r=n.axis_x_categories;return lr(r)?Object.values(e.data.xs)[0]:r}return n.axis_x_categories=t,e.state.dirty.data=!0,e.redraw(),n.axis_x_categories}};function sE(t){const e=this.config;let n,r,i;const o=()=>{const s=r.shift();if(s&&n&&Qn(n)&&s in n)return n=n[s],o();if(!s)return n};Object.keys(e).forEach(s=>{n=t,r=s.split("_"),i=o(),sn(i)&&(e[s]=i)}),this.api&&(this.state.orgConfig=t)}var lE={resize(t){const e=this.internal,{config:n,state:r}=e;r.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,r.resizing=!0,r.dirty.size=!0,this.flush(!1),e.resizeFunction())},flush(t){var e,n;const r=this.internal,{state:i,$el:{zoomResetBtn:o}}=r;i.rendered?(i.resizing?(e=r.brush)==null||e.updateResize():(n=r.axis)==null||n.setOrient(),o==null||o.style("display","none"),r.scale.zoom&&(i.current.zoomDomain=r.scale.zoom.domain()),r.scale.zoom=null,i.resizing||(i.dirty.data=!0),t?r.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):r.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!i.resizing&&r.brush&&(r.brush.getSelection().call(r.brush.move),r.unselectRect()),i.current.zoomDomain&&(r.api.zoom(i.current.zoomDomain),i.current.zoomDomain=null)):r.initToRender(!0)},destroy(){var t,e,n,r,i,o,s,l,c,u;const f=this.internal,{state:d,$el:{chart:h,style:m,svg:A}}=f;if(vn(f)){f.callPluginHook("$willDestroy"),(t=f.cache)==null||t.remove(["setOverOut","callOverOutForTouch"]),f.charts.splice(f.charts.indexOf(this),1),f.charts.length===0&&S1(),f.unbindAllEvents(),A==null||A.select("*").interrupt(),d.canvasFlowFrame!==null&&((n=(e=ce).cancelAnimationFrame)==null||n.call(e,d.canvasFlowFrame)),d.canvasFlowFrame=null,d.canvasFlowFinish=null,d.pendingRaf!==null&&((i=(r=ce).cancelAnimationFrame)==null||i.call(r,d.pendingRaf)),d.pendingRaf=null,(o=f.canvasRenderer)==null||o.destroy(),(s=f.canvasEngine)==null||s.destroy(),(l=f.resizeFunction)==null||l.clear(),(u=(c=f.resizeFunction)==null?void 0:c.resizeObserver)==null||u.disconnect(),f.resizeFunction&&ce.removeEventListener("resize",f.resizeFunction),h.classed("bb",!1).style("position",null),d.isCanvasMode&&h.style("min-height",d.canvasInlineStyle.minHeight||null),h.selectChildren().remove(),m&&m.parentNode.removeChild(m),Object.keys(this).forEach(I=>{I==="internal"&&Object.keys(f).forEach(C=>{f[C]=null}),this[I]=null,delete this[I]});for(const I in this)this[I]=()=>{}}return null},config(t,e,n){const r=this.internal,{config:i,state:o}=r,s=t==null?void 0:t.replace(/\./g,"_");let l;return t&&s in i?sn(e)?(i[s]=e,l=e,n&&this.flush()):l=i[s]:(arguments.length===0||lr(t))&&(l=o.orgConfig),l}},cE={color(t){return this.internal.color(t)}};const Fg=function(t){const{targets:e}=this.internal.data;if(!xn(t)){const n=nn(t)?t:[t];return e.filter(r=>n.some(i=>i===r.id))}return e};yn(Fg,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t,e=!0){let n=null;if(t){const r=this.data(t);nn(r)&&(n=[],r.forEach(i=>{const o=i.values.map(s=>s.value);e?n=n.concat(o):n.push(o)}))}return n},names:function(t){return this.internal.updateDataAttributes("names",t)},colors:function(t){return this.internal.updateDataAttributes("colors",t)},axes:function(t){return this.internal.updateDataAttributes("axes",t)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}});var uE={data:Fg},fE={focus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const s=i.filter(n.isTargetToShow,n),l=new Set(s),c=n.mapToTargetIds().filter(u=>!l.has(u)&&n.isTargetToShow(u));n.revertLegend(),n.toggleFocusLegend(c,!1),n.toggleFocusLegend(s,!0),r.focusedTargetIds=l,r.defocusedTargetIds=new Set(c),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}const o=n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),o.classed(cn.focused,!0).classed(cn.defocused,!1),n.hasArcType()&&!r.hasRadar&&(n.expandArc(i),n.hasType("gauge")&&n.markOverlapped(t,n,`.${ar.gaugeValue}`)),n.toggleFocusLegend(i,!0),r.focusedTargetIds=new Set(i),i.forEach(s=>r.defocusedTargetIds.delete(s))},defocus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const s=i.filter(n.isTargetToShow,n);n.toggleFocusLegend(s,!1),s.forEach(l=>r.focusedTargetIds.delete(l)),r.defocusedTargetIds=new Set(s),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n))).classed(cn.focused,!1).classed(cn.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(i),n.hasType("gauge")&&n.undoMarkOverlapped(n,`.${ar.gaugeValue}`)),n.toggleFocusLegend(i,!1),i.forEach(s=>r.focusedTargetIds.delete(s)),r.defocusedTargetIds=new Set(i)},revert(t){var e,n,r;const i=this.internal,{config:o,state:s,$el:l}=i,c=i.mapToTargetIds(t),u=()=>{o.legend_show&&(i.showLegend(c.filter(i.isLegendToShow.bind(i))),l.legend.selectAll(i.selectorLegends(c)).filter(function(){return kt(this).classed(cn.legendItemFocused)}).classed(cn.legendItemFocused,!1))};if(s.isCanvasMode){const d=!!((e=s.focusedTargetIds)!=null&&e.size)||!!((n=s.defocusedTargetIds)!=null&&n.size);u(),s.focusedTargetIds=new Set,s.defocusedTargetIds=new Set,d&&((r=i.renderCanvasFrame)==null||r.call(i,void 0,null,!1));return}l.svg.selectAll(i.selectorTargets(c)).classed(cn.focused,!1).classed(cn.defocused,!1),i.hasArcType(null,["polar"])&&i.unexpandArc(c),u(),s.focusedTargetIds=new Set,s.defocusedTargetIds=new Set}},dE={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},hE={load(t){const e=this.internal,{config:n}=e;e.state.dirty.data=!0,e.state._eventRectFingerprint=null,t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(o=>{n.data_classes[o]=t.classes[o]}),"categories"in t&&e.axis.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(o=>{n.data_axes[o]=t.axes[o]}),"colors"in t&&Object.keys(t.colors).forEach(o=>{n.data_colors[o]=t.colors[o]}),"regions"in t&&(n.data_regions=t.regions||{});const r=["data","columns","rows","json","url"].some(o=>o in t),i="unload"in t&&t.unload!==!1;if("regions"in t&&!r&&!i){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),ss.call(e,t.done,t.resizeAfter);return}if(i){const o=e.mapToTargetIds(t.unload===!0?null:t.unload);e.unload(o,()=>{!e.config||!e.cache||(e.cache.remove(o),yf(()=>e.loadFromArgs(t)))})}else e.loadFromArgs(t)},unload(t){const e=this.internal;let n=t||{};lr(n)&&this.tooltip.hide(),nn(n)?n={ids:n}:Ke(n)&&(n={ids:[n]});const r=e.mapToTargetIds(n.ids);e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.unload(r,()=>{!e.config||!e.cache||(e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.cache.remove(r),ss.call(e,n.done,n.resizeAfter))})}};function Fs(t,e,n,r=!1){var i;const o=this.internal,s=o.mapToTargetIds(e),l=new Set(s),c=[...o.state.hiddenTargetIds].filter(d=>l.has(d));if(o.state.toggling=!0,o.state.dirty.visibility=!0,o[`${t?"remove":"add"}HiddenTargetIds`](s),o.state.isCanvasMode){t&&c.length?Ne(o.config.data_onshown,this,c):!t&&c.length===0&&Ne((i=o.config)==null?void 0:i.data_onhidden,this,s),r||o.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.state.toggling=!1;return}const u=o.$el.svg.selectAll(o.selectorTargets(s)),f=t?null:"0";t&&c.length&&(u.style("display",null),Ne(o.config.data_onshown,this,c)),o.$T(u).style("opacity",f,"important").call(Wo,()=>{var d;!t&&c.length===0&&(u.style("display","none"),Ne((d=o.config)==null?void 0:d.data_onhidden,this,s)),u.style("opacity",f)}),n.withLegend&&o[`${t?"show":"hide"}Legend`](s),r||o.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.state.toggling=!1}var gE={show(t,e={}){Fs.call(this,!0,t,e)},hide(t,e={}){Fs.call(this,!1,t,e)},toggle(t,e={}){const n=this.internal,r={show:[],hide:[]};n.mapToTargetIds(t).forEach(i=>r[n.isTargetToShow(i)?"hide":"show"].push(i)),r.show.length&&r.hide.length?(Fs.call(this,!0,r.show,e,!0),Fs.call(this,!1,r.hide,e)):(r.show.length&&this.show(r.show,e),r.hide.length&&this.hide(r.hide,e))}},vE={tooltip:{show:function(t){var e,n,r,i,o,s,l,c,u,f,d,h;const m=this.internal,{$el:A,config:I,state:{eventReceiver:C,hasFunnel:P,hasTreemap:z,inputType:N}}=m;let B,W;if(t.mouse&&(W=t.mouse),t.data){const{data:V}=t,J=(e=m.getYScaleById(V.id))==null?void 0:e(V.value);if((P||z)&&V.id){const q=m.selectorTarget(V.id,void 0,`.${bn.shape}`);C.rect=A.main.select(q)}else m.isMultipleX()?W=[m.xx(V),J]:(I.tooltip_grouped||(W=[0,J]),B=(r=V.index)!=null?r:m.hasArcType()&&V.id?(n=m.getArcElementByIdOrIndex(V.id))==null?void 0:n.datum().index:m.getIndexByX(V.x))}else sn(t.x)?B=m.getIndexByX(t.x):sn(t.index)&&(B=t.index);if(m.state.isCanvasMode){const V=((i=m.filterTargetsToShow)==null?void 0:i.call(m))||m.data.targets,J=(o=t.data)!=null&&o.id&&!I.tooltip_grouped?V.filter(lt=>lt.id===t.data.id).map(lt=>lt.values[B!=null?B:t.data.index]).filter(Boolean):V.map(lt=>lt.values[B]).filter(Boolean),q=(l=(s=A.canvas)==null?void 0:s.node)==null?void 0:l.call(s),at=m.state.canvasShape||((c=m.getDrawShape)==null?void 0:c.call(m)),et=J[0],ot=W||(et&&((u=at==null?void 0:at.pos)!=null&&u.cx)&&((f=at==null?void 0:at.pos)!=null&&f.cy)?[m.state.margin.left+at.pos.cx(et),m.state.margin.top+at.pos.cy(et)]:void 0);if(!J.length||!q)return;m.state.canvasFocusKey=J.map(lt=>`${lt.id}:${lt.index}`).join("|"),(d=m.renderCanvasFocus)==null||d.call(m,J,ot),(h=m.showTooltip)==null||h.call(m,J,q);return}(N==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(V=>{m.dispatchEvent(V,B,W)})},hide:function(){var t,e,n,r,i;const o=this.internal,{state:{inputType:s,isCanvasMode:l},$el:{tooltip:c}}=o,u=c==null?void 0:c.datum();if(l){o.state.canvasFocusKey=null,o.hideTooltip(!0),(t=o.clearCanvasFocus)==null||t.call(o);return}if((e=u==null?void 0:u.data)!=null&&e[0]){const{index:f}=u.data[0];(s==="mouse"?["mouseout"]:["touchend"]).forEach(d=>{o.dispatchEvent(d,f)})}s==="touch"&&o.callOverOutForTouch(),o.hideTooltip(!0),(n=o.hideGridFocus)==null||n.call(o),(r=o.unexpandCircles)==null||r.call(o),(i=o.expandBarTypeShapes)==null||i.call(o,!1)}}},pE=Object.defineProperty,mE=(t,e,n)=>e in t?pE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ng=(t,e,n)=>mE(t,typeof e!="symbol"?e+"":e,n);class Kn{constructor(e){Ng(this,"plugins",[]),Ng(this,"internal");const n=new Er(this);this.internal=n,(function r(i,o,s){Object.keys(i).forEach(l=>{const c=le(i[l]),u=o!==s,f=vn(i[l]),d=f&&Object.keys(i[l]).length>0;c&&(!u&&d||u)?o[l]=i[l].bind(s):f&&!c?o[l]={}:o[l]=i[l],d&&r(i[l],o[l],s)})})(Kn.prototype,this,this),sE.call(n,e),n.beforeInit(),n.init()}}yn(Kn.prototype,[lE,cE,uE,fE,dE,hE,gE,vE]);let $g=()=>(Kn.prototype.category=Dg.category,Kn.prototype.categories=Dg.categories,($g=()=>({}))());const xE=t=>{var e,n;return(n=(e=ce).btoa)==null?void 0:n.call(e,encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(r,i)=>String.fromCharCode(+`0x${i}`)))};function yE(t,e,n){const{width:r,height:i}=e||n,o=new XMLSerializer,s=t.cloneNode(!0),l=d1(Ia(He.styleSheets)).filter(h=>h.cssText).map(h=>h.cssText);s.setAttribute("xmlns",Qt.xhtml),s.style.margin="0",s.style.padding="0",e.preserveFontStyle&&s.querySelectorAll("text").forEach(h=>{h.innerHTML=""});const c=o.serializeToString(s),u=He.createElement("style");u.appendChild(He.createTextNode(l.join(`
|
|
57
|
-
`)));const f=o.serializeToString(u),d=`<svg xmlns="${
|
|
51
|
+
</tbody></table>`).replace(OA,"").split(PA)},setTooltipPosition(t,e){var n,r;const i=this,{config:o,scale:s,state:l,$el:{eventRect:c,tooltip:u,svg:f}}=i,{bindto:d}=o.tooltip_contents,h=o.axis_rotated,m=u==null?void 0:u.datum();if(!d&&m){const S=t!=null?t:m.data,[E,C]=er(l.event,e!=null?e:c==null?void 0:c.node()),w={x:E,y:C};if(l.hasAxis&&s.x&&m&&"x"in m){const G=(V=0,J,Q="y")=>{var rt;const et=s[J?(rt=i.axis)==null?void 0:rt.getId(J):Q];return et?et(V)+(h?l.margin.left:l.margin.top):0};w.xAxis=s.x(m.x)+(o.tooltip_position?h?l.margin.top:l.margin.left:0),S.length===1?w.yAxis=G(S[0].value,S[0].id):w.yAxis=G}const{width:N=0,height:z=0}=m,$=(r=(n=o.tooltip_position)==null?void 0:n.bind(i.api)(S,N,z,c==null?void 0:c.node(),w))!=null?r:f&&Sc(f)?i.getTooltipPositionViewBox.bind(i)(N,z,w):i.getTooltipPosition.bind(i)(N,z,w);["top","left"].forEach(G=>{const V=$[G];u.style(G,`${V}px`),G==="left"&&!m.xPosInPercent&&(m.xPosInPercent=V/l.current.width*100)})}},getTooltipPositionViewBox(t,e,n){var r,i;const o=this,{$el:{eventRect:s,svg:l},config:c,state:u}=o,f=c.axis_rotated,d=o.hasArcType()||u.hasFunnel||u.hasTreemap,h=(i=(r=d?l:s)==null?void 0:r.node())!=null?i:u.event.target;let{x:m,y:S}=n;u.hasAxis&&(m=f?m:n.xAxis,S=f?n.xAxis:S);const E=vs(h,m,S,!1),C=cn(h),w=vs(h,20,0,!1).x;let N=E.y,z=E.x+t/2+w;return d&&(u.hasFunnel||u.hasTreemap||u.hasRadar?(z-=t/2+w,N+=e):(N+=C.height/2,z+=C.width/2-(t-w))),z+t>C.width&&(z=C.width-t-w),N+e>C.height&&(N-=e*2),{top:N,left:z}},getTooltipPosition(t,e,n){var r,i,o;const s=this,{config:l,scale:c,state:u}=s,{width:f,height:d,current:h,hasFunnel:m,hasRadar:S,hasTreemap:E,isLegendRight:C,inputType:w}=u,N=s.hasType("gauge")&&!l.gauge_fullCircle,z=l.axis_rotated,$=s.hasArcType(),G=u.isCanvasMode?0:s.getSvgLeft(!0);let V=G+h.width-s.getCurrentPaddingByDirection("right");const J=20;let{x:Q,y:rt}=n;if(S)Q+=Q>=f/2?15:-(t+15),rt+=15;else if($){if(w!=="touch"){let ct=(i=(r=s.getTitlePadding)==null?void 0:r.call(s))!=null?i:0;ct&&N&&((o=l.arc_rangeText_values)!=null&&o.length)&&(ct+=10),Q+=(f-(C?s.getLegendWidth():0))/2,rt+=(N?d:d/2+e)+ct}}else if(m||E)rt+=e;else{const st={top:s.getCurrentPaddingByDirection("top",!0),left:s.getCurrentPaddingByDirection("left",!0)};z?(Q+=G+st.left+J,rt=st.top+n.xAxis+J,V-=G):(Q=G+st.left+J+(c.zoom?Q:n.xAxis),rt+=st.top-5)}if(Q+t+15>V&&(Q-=t+(m||E||$?0:z?J*2:38)),rt+e>h.height){const st=E?e+10:30;rt-=N?e*1.5:e+st}const et={top:rt,left:Q};return et.top<0&&(et.top=0),et.left<0&&(et.left=0),et},showTooltip(t,e){const n=this,{config:r,$el:{tooltip:i}}=n;if(!i||!r.tooltip_show)return;let o=null,s=0,l=`${n.data.targets.length}:`,c;for(let d=0;d<t.length;d++){const h=t[d];d>0&&(l+=","),l+=`${h==null?void 0:h.index}|${h==null?void 0:h.id}|${h==null?void 0:h.value}`,!c&&h&&(c=h),h&&Xe(n.getBaseValue(h))?(s++,o==null||o.push(h)):o||(o=t.slice(0,d))}if(s===0||!c)return;const u=i.datum();let f=o;if(!u||u.current!==l){const{index:d,x:h}=c;f||(f=t.slice()),$e(r.tooltip_onshow,n.api,t),i.html(n.getTooltipHTML(t,n.axis?n.axis.getXAxisTickFormat():n.categoryName.bind(n),n.getDefaultValueFormat(),n.color)).style("display",null).style("visibility",null),i.datum({index:d,x:h,current:l,data:t,width:i.property("offsetWidth"),height:i.property("offsetHeight")}),$e(r.tooltip_onshown,n.api,t),n._handleLinkedCharts(!0,d)}n.setTooltipPosition(f||t,e)},bindTooltipResizePos(){const t=this,{resizeFunction:e,state:n,$el:{tooltip:r}}=t;e.add(()=>{if(r.style("display")==="block"){const{current:i}=n,{width:o,xPosInPercent:s}=r.datum();let l=i.width/100*s;const c=i.width-(l+o);c<0&&(l+=c),r.style("left",`${l}px`)}})},hideTooltip(t){var e;const n=this,{api:r,config:i,$el:{tooltip:o}}=n;if(o&&o.style("display")!=="none"&&(!i.tooltip_doNotHide||t)){const s=(e=o.datum().data)!=null?e:[];$e(i.tooltip_onhide,r,s),o.style("display","none").datum(null),$e(i.tooltip_onhidden,r,s)}},_handleLinkedCharts(t,e){const n=this,{charts:r,config:i,state:{event:o}}=n;if(o!=null&&o.isTrusted&&i.tooltip_linked&&r.length>1){const s=i.tooltip_linked_name;r.filter(l=>l!==n.api).forEach(l=>{var c,u;const{config:f,$el:d,state:h}=l.internal,m=f.tooltip_linked,S=f.tooltip_linked_name,E=Ze.body.contains(d.chart.node());if(m&&s===S&&E){const C=d.tooltip.data()[0],w=e!==(C==null?void 0:C.index);try{t&&w&&h.isCanvasMode?(u=(c=l.internal).showCanvasLinkedTooltip)==null||u.call(c,e):l.tooltip[t&&w?"show":"hide"]({index:e})}catch(N){}}})}},updateTooltipOnRedraw(t,e){var n;const r=this,{config:i,$el:{eventRect:o,svg:s,tooltip:l},state:{event:c,hasAxis:u,hasRadar:f,hasTreemap:d}}=r;if(!r.state.isCanvasMode&&(l==null?void 0:l.style("display"))==="block"&&c){const h=t!=null?t:(n=f?s:o)==null?void 0:n.node();if(u||f)if(r.isMultipleX())r.selectRectForMultipleXs(h,!1);else{const m=e!=null?e:r.getDataIndexFromEvent(c);e===-1?r.api.tooltip.hide():(r.selectRectForSingle(h,m),r.setExpand(m,null,!0))}else{const{clientX:m,clientY:S}=c;setTimeout(()=>{let E=[m,S].every(Number.isFinite)&&Ze.elementFromPoint(m,S);const C=E&&Ut(E).datum();if(C){const w=r.hasArcType()?r.convertToArcData(r.updateAngle(C)):C==null?void 0:C.data;d&&(E=s.node()),w&&r.showTooltip([w],E)}else r.api.tooltip.hide()},i.transition_duration)}}}},LA={getTranslate(t,e=0){var n;const r=this,{config:i,state:o}=r,s=i.axis_rotated;let l=0,c,u;if(e&&/^(x|y2?)$/.test(t)&&(l=r.getAxisSize(t)*e),t==="main")c=qa(o.margin.left),u=qa(o.margin.top);else if(t==="context")c=qa(o.margin2.left),u=qa(o.margin2.top);else if(t==="legend")c=o.margin3.left,u=o.margin3.top;else if(t==="x")c=s?-l:0,u=s?0:o.height+l;else if(t==="y")c=s?0:-l,u=s?o.height+l:0;else if(t==="y2")c=s?0:o.width+l,u=s?-l-1:0;else if(t==="subX")c=0,u=s?0:o.height2;else if(t==="subY")c=0,u=s?o.height2:0;else if(t==="subY2")c=s?0:o.width2,u=s?-1:0;else if(t==="arc")c=o.arcWidth/2,u=o.arcHeight/2,(n=i.arc_rangeText_values)!=null&&n.length&&(u+=5+(r.hasType("gauge")&&i.title_text?10:0));else if(t==="polar")c=o.arcWidth/2,u=o.arcHeight/2;else if(t==="radar"){const[f,d]=r.getRadarSize();c=o.width/2-f,u=o.height/2-d}return`translate(${c}, ${u})`},transformMain(t,e){const n=this,{$el:{main:r},$T:i}=n,o=e!=null&&e.axisX?e.axisX:i(r.select(`.${Pn.axisX}`),t),s=e!=null&&e.axisY?e.axisY:i(r.select(`.${Pn.axisY}`),t),l=e!=null&&e.axisY2?e.axisY2:i(r.select(`.${Pn.axisY2}`),t);i(r,t).attr("transform",n.getTranslate("main")),o.attr("transform",n.getTranslate("x")),s.attr("transform",n.getTranslate("y")),l.attr("transform",n.getTranslate("y2")),r.select(`.${Qe.chartArcs}`).attr("transform",n.getTranslate("arc"))},transformAll(t,e){const n=this,{config:r,state:{hasAxis:i,hasFunnel:o,hasTreemap:s,isCanvasMode:l},$el:c}=n;l||(!o&&!s&&n.transformMain(t,e),i&&r.subchart_show&&n.transformContext(t,e),c.legend&&n.transformLegend(t))}};const DA=new Set(["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"]);var FA={isValidChartType(t){return!!(t&&Object.values(kt).indexOf(t)>-1)},getSubchartTargetType(t){const e=this,{config:n}=e,r=Ye(t)?t:t==null?void 0:t.id,i=n.subchart_types||{},o=n.subchart_type,s=n.data_types||{},l=r&&i[r];return l&&e.isValidChartType(l)?l:o&&e.isValidChartType(o)?o:r&&s[r]||n.data_type||kt.LINE},getTargetType(t){var e;const{config:n}=this,r=Ye(t)?t:t==null?void 0:t.id;return r&&((e=n.data_types)==null?void 0:e[r])||n.data_type||kt.LINE},getSubchartSourceTargetType(t){const{state:e}=this,n=Ye(t)?t:t==null?void 0:t.id,r=e.subchartSourceTypes;return n&&(r==null?void 0:r[n])||this.getTargetType(t)},isSubchartSourceTypeOf(t,e){const n=this.getSubchartSourceTargetType(t);return en(e)?e.indexOf(n)>=0:n===e},withSubchartTypeContext(t){const e=this,{config:n,data:r,state:i}=e,o=n.data_type,s=n.data_types,l=i.current.types,c=i.subchartSourceTypes,u={},f={},d=n.subchart_type;e.mapToIds(r.targets).forEach(h=>{f[h]=e.getTargetType(h),u[h]=e.getSubchartTargetType(h)}),n.data_type=d&&e.isValidChartType(d)?d:o,n.data_types=u,i.current.types=[],i.subchartSourceTypes=f;try{return t()}finally{n.data_type=o,n.data_types=s,i.current.types=l,i.subchartSourceTypes=c}},setTargetType(t,e){const n=this,{config:r,state:{withoutFadeIn:i}}=n;n.mapToTargetIds(t).forEach(o=>{i[o]=e===r.data_types[o],r.data_types[o]=e}),t||(r.data_type=e)},updateTypesElements(){const t=this,{state:{current:e}}=t;Object.keys(kt).forEach(n=>{const r=kt[n],i=t.hasType(r,null,!0),o=e.types.indexOf(r);o===-1&&i?e.types.push(r):o>-1&&!i&&e.types.splice(o,1)}),t.setChartElements()},hasType(t,e,n=!1){var r;const i=this,{config:o,state:{current:s}}=i,l=o.data_types,c=e||i.data.targets;return!n&&((r=s.types)==null?void 0:r.indexOf(t))>-1?!0:c!=null&&c.length?c.some(u=>{const f=l[u.id];return f===t||!f&&t==="line"}):Object.keys(l).length?Object.values(l).some(u=>u===t):o.data_type===t},hasTypeOf(t,e,n=[]){return t in Yn?!Yn[t].filter(r=>n.indexOf(r)===-1).every(r=>!this.hasType(r,e)):!1},isTypeOf(t,e){const n=Ye(t)?t:t.id,r=this.config&&this.getTargetType(n);return en(e)?e.indexOf(r)>=0:r===e},hasPointType(){const t=this;return t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")},hasArcType(t,e){return this.hasTypeOf("Arc",t,e)},hasMultiArcGauge(){return this.hasType("gauge")&&this.config.gauge_type==="multi"},isLineType(t){const e=Ye(t)?t:t.id;return!this.config.data_types[e]||this.isTypeOf(e,Yn.Line)},isStepType(t){return this.isTypeOf(t,Yn.Step)},isSplineType(t){return this.isTypeOf(t,Yn.Spline)},isAreaType(t){return this.isTypeOf(t,Yn.Area)},isAreaRangeType(t){return this.isTypeOf(t,Yn.AreaRange)},isBarType(t){return this.isTypeOf(t,"bar")},isBubbleType(t){return this.isTypeOf(t,"bubble")},isCandlestickType(t){return this.isTypeOf(t,"candlestick")},isScatterType(t){return this.isTypeOf(t,"scatter")},isTreemapType(t){return this.isTypeOf(t,"treemap")},isPieType(t){return this.isTypeOf(t,"pie")},isFunnelType(t){return this.isTypeOf(t,"funnel")},isGaugeType(t){return this.isTypeOf(t,"gauge")},isDonutType(t){return this.isTypeOf(t,"donut")},isPolarType(t){return this.isTypeOf(t,"polar")},isRadarType(t){return this.isTypeOf(t,"radar")},isArcType(t){return this.isPieType(t)||this.isDonutType(t)||this.isGaugeType(t)||this.isPolarType(t)||this.isRadarType(t)},isCirclePoint(t){const{config:e}=this,n=e.point_pattern;return(t==null?void 0:t.tagName)==="circle"||e.point_type==="circle"&&(!n||en(n)&&n.length===0)},lineData(t){return this.isLineType(t)?[t]:[]},arcData(t){return this.isArcType(t.data)?[t]:[]},labelishData(t){return this.isBarType(t)||this.isLineType(t)||this.isScatterType(t)||this.isBubbleType(t)||this.isCandlestickType(t)||this.isFunnelType(t)||this.isRadarType(t)||this.isTreemapType(t)?t.values.filter(e=>le(e.value)||!!e.value):[]},barLineBubbleData(t){return this.isBarType(t)||this.isLineType(t)||this.isBubbleType(t)?t.values:[]},isInterpolationType(t){return DA.has(t)}};function Ls(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function Ds(t){this._context=t}Ds.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ls(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ls(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function NA(t){return new Ds(t)}function Ta(){}function Ag(t){this._context=t}Ag.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:Ls(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function $A(t){return new Ag(t)}function Eg(t){this._context=t}Eg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Ls(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function BA(t){return new Eg(t)}function Cg(t,e){this._basis=new Ds(t),this._beta=e}Cg.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r=t[0],i=e[0],o=t[n]-r,s=e[n]-i,l=-1,c;++l<=n;)c=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+c*o),this._beta*e[l]+(1-this._beta)*(i+c*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var zA=(function t(e){function n(r){return e===1?new Ds(r):new Cg(r,e)}return n.beta=function(r){return t(+r)},n})(.85);function Fs(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 Yc(t,e){this._context=t,this._k=(1-e)/6}Yc.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:Fs(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Fs(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var UA=(function t(e){function n(r){return new Yc(r,e)}return n.tension=function(r){return t(+r)},n})(0);function Kc(t,e){this._context=t,this._k=(1-e)/6}Kc.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Fs(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var kA=(function t(e){function n(r){return new Kc(r,e)}return n.tension=function(r){return t(+r)},n})(0);function Zc(t,e){this._context=t,this._k=(1-e)/6}Zc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fs(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var GA=(function t(e){function n(r){return new Zc(r,e)}return n.tension=function(r){return t(+r)},n})(0);const Ig=Math.abs,Xn=Math.atan2,Xa=Math.cos,XA=Math.max,Jc=Math.min,Ur=Math.sin,vi=Math.sqrt,Wn=1e-12,fo=Math.PI,Ns=fo/2,$s=2*fo;function WA(t){return t>1?0:t<-1?fo:Math.acos(t)}function Rg(t){return t>=1?Ns:t<=-1?-Ns:Math.asin(t)}function Qc(t,e,n){var r=t._x1,i=t._y1,o=t._x2,s=t._y2;if(t._l01_a>Wn){var l=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*l-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*l-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Wn){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*u+t._x1*t._l23_2a-e*t._l12_2a)/f,s=(s*u+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,s,t._x2,t._y2)}function wg(t,e){this._context=t,this._alpha=e}wg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Qc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var VA=(function t(e){function n(r){return e?new wg(r,e):new Yc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Og(t,e){this._context=t,this._alpha=e}Og.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Qc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var jA=(function t(e){function n(r){return e?new Og(r,e):new Kc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Pg(t,e){this._context=t,this._alpha=e}Pg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Qc(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var HA=(function t(e){function n(r){return e?new Pg(r,e):new Zc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function Mg(t){return t<0?-1:1}function Lg(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),s=(n-t._y1)/(i||r<0&&-0),l=(o*i+s*r)/(r+i);return(Mg(o)+Mg(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(l))||0}function Dg(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function _c(t,e,n){var r=t._x0,i=t._y0,o=t._x1,s=t._y1,l=(o-r)/3;t._context.bezierCurveTo(r+l,i+l*e,o-l,s-l*n,o,s)}function Bs(t){this._context=t}Bs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:_c(this,this._t0,Dg(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,_c(this,Dg(this,n=Lg(this,t,e)),n);break;default:_c(this,this._t0,n=Lg(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function Fg(t){this._context=new Ng(t)}(Fg.prototype=Object.create(Bs.prototype)).point=function(t,e){Bs.prototype.point.call(this,e,t)};function Ng(t){this._context=t}Ng.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}};function YA(t){return new Bs(t)}function KA(t){return new Fg(t)}function $g(t){this._context=t}$g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),n===2)this._context.lineTo(t[1],e[1]);else for(var r=Bg(t),i=Bg(e),o=0,s=1;s<n;++o,++s)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[s],e[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function Bg(t){var e,n=t.length-1,r,i=new Array(n),o=new Array(n),s=new Array(n);for(i[0]=0,o[0]=2,s[0]=t[0]+2*t[1],e=1;e<n-1;++e)i[e]=1,o[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[n-1]=2,o[n-1]=7,s[n-1]=8*t[n-1]+t[n],e=1;e<n;++e)r=i[e]/o[e-1],o[e]-=r,s[e]-=r*s[e-1];for(i[n-1]=s[n-1]/o[n-1],e=n-2;e>=0;--e)i[e]=(s[e]-i[e+1])/o[e];for(o[n-1]=(t[n]+i[n-1])/2,e=0;e<n-1;++e)o[e]=2*t[e+1]-i[e+1];return[i,o]}function ZA(t){return new $g(t)}function zg(t){this._context=t}zg.prototype={areaStart:Ta,areaEnd:Ta,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function JA(t){return new zg(t)}function zs(t,e){this._context=t,this._t=e}zs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}break}}this._x=t,this._y=e}};function QA(t){return new zs(t,.5)}function _A(t){return new zs(t,0)}function qA(t){return new zs(t,1)}const tE={basis:NA,"basis-closed":$A,"basis-open":BA,bundle:zA,cardinal:UA,"cardinal-closed":kA,"cardinal-open":GA,"catmull-rom":VA,"catmull-rom-closed":jA,"catmull-rom-open":HA,"monotone-x":YA,"monotone-y":KA,natural:ZA,"linear-closed":JA,linear:os,step:QA,"step-after":qA,"step-before":_A};function qc(t,e){var n,r;return t.isLineType(e)||((n=t.isScatterType)==null?void 0:n.call(t,e))||((r=t.isBubbleType)==null?void 0:r.call(t,e))}function Ug(t){return e=>qc(t,e)}function tu(t,e,n){var r,i,o;const s=n?Us(t,e,n):void 0;return le(s)?s:(r=t.isCandlestickType)!=null&&r.call(t,e)?(o=(i=t.getCandlestickData)==null?void 0:i.call(t,e))==null?void 0:o.close:t.getBaseValue(e)}function Us(t,e,n){var r,i,o;if(!n||(r=t.isCandlestickType)!=null&&r.call(t,e)||!((i=t.isSubchartSourceTypeOf)!=null&&i.call(t,e,kt.CANDLESTICK)))return;const s=(o=t.getCandlestickData)==null?void 0:o.call(t,e);if(s)return t.isBarType(e)?le(s.open)&&le(s.close)?s._isUp?s.close:s.open:void 0:le(s.close)?s.close:void 0}function kg(t,e,n){const r=Us(t,e,n);return le(r)&&t.isBarType(e)}function eE(t,e,n){var r;if(!kg(t,e,n))return null;const i=(r=t.getCandlestickData)==null?void 0:r.call(t,e);if(i!=null&&i._isUp)return t.color(e);const o=t.config.candlestick_color_down;return(o&&typeof o=="object"?o[e.id]:o)||t.color(e)}function nE(t){var e,n;const r=this;let i;if(qc(r,t)){const o=Ug(r);i=r.generateGetLinePoints(r.getShapeIndices(o),!1,o)}else r.isBarType(t)?i=r.generateGetBarPoints(r.getShapeIndices(r.isBarType)):(e=r.isCandlestickType)!=null&&e.call(r,t)&&(i=(n=r.generateGetCandlestickPoints)==null?void 0:n.call(r,r.getShapeIndices(r.isCandlestickType)));return i}function Gg(t,e,n){return this.config[e]?this.getGradienColortUrl(t.id):n(t)}function Xg(t){const{$el:e}=this,{elKey:n,className:r,cssRules:i,position:o}=t,s=e.main.select(`.${Ie.chart}`);e[n]=o==="first"?s.insert("g",":first-child"):s.append("g"),e[n].attr("class",r),i!=null&&i.length&&e[n].call(this.setCssRule(!1,`.${r}`,i))}function eu(t,e){const n=this,{$el:r}=n,{type:i,elKey:o,containerClass:s,itemClass:l,initFn:c,withFocus:u=!0,withStyles:f=!0}=e;r[o]||c.call(n);const d=n.getChartClass(i),h=u?n.classFocus.bind(n):()=>"",S=r.main.select(`.${s}`).selectAll(`.${l}`).data(n.filterNullish(t)).attr("class",E=>d(E)+h(E)).enter().append("g").attr("class",d);return f&&S.style("opacity","0").style("pointer-events",n.getStylePropValue("none")),S}var rE={getDrawShape(){const t=this,e=t.config.axis_rotated,{hasRadar:n,hasTreemap:r}=t.state,i={type:{},indices:{},pos:{}};if(!r&&["bar","candlestick","line","area"].forEach(o=>{const s=Nn(o);if(t.hasType(o)||t.hasTypeOf(s)||o==="line"&&(t.hasType("bubble")||t.hasType("scatter"))){const l=t.getShapeIndices(t[`is${s}Type`]),c=t[`generateDraw${s}`];i.indices[o]=l,i.type[o]=c?c.bind(t)(l,!1):void 0}}),!t.hasArcType()||n||r){let o,s,l,c;r||(o=n?t.radarCircleX:e?t.circleY:t.circleX,s=n?t.radarCircleY:e?t.circleX:t.circleY),r&&t.state.isCanvasMode?l=c=function(){}:(l=t.generateXYForText(i.indices,!0),c=t.generateXYForText(i.indices,!1)),i.pos={xForText:l,yForText:c,cx:(o||function(){}).bind(t),cy:(s||function(){}).bind(t)}}return i},getShapeIndices(t){const e=this,{config:n}=e,r=n.data_xs,i=pn(r),o={};let s=i?{}:0;return i&&Dl(Object.keys(r).map(l=>r[l])).forEach(l=>{s[l]=0,o[l]={}}),e.filterTargetsToShow(e.data.targets.filter(t,e)).forEach(l=>{var c;const u=l.id in r?r[l.id]:"",f=u?o[u]:o;for(let d=0,h;h=n.data_groups[d];d++)if(!(h.indexOf(l.id)<0))for(let m=0,S;S=h[m];m++){if(S in f){f[l.id]=f[S];break}l.id!==S&&u&&(f[S]=(c=f[l.id])!=null?c:s[u])}Tn(f[l.id])&&(f[l.id]=u?s[u]++:s++,f.__max__=(u?s[u]:s)-1)}),o},getIndices(t,e,n){const r=this,{data_xs:i,bar_indices_removeNull:o}=r.config,{id:s,index:l}=e;if(r.isBarType(s)&&o){const c={};return r.getAllValuesOnIndex(l,!0).forEach((u,f)=>{c[u.id]=f,c.__max__=f}),c}return pn(i)?t[i[s]]:t},getIndicesMax(t){if(!pn(this.config.data_xs))return t.__max__;let e=0;for(const n in t)e+=t[n].__max__||0;return e},getShapeX(t,e,n){const r=this,{config:i,scale:o}=r,s=n?o.subX:o.zoom||o.x,l=i.bar_overlap,c=i.bar_padding,u=(h,m)=>h+m,f=qn(t)&&(t._$total.length?t._$total.reduce(u)/2:0),d=[];if(f&&qn(t)&&t._$total.length){let h=0;for(const m of t._$total)h+=m,d.push(h)}return h=>{var m;const S=r.getIndices(e,h,"getShapeX"),E=h.id in S?S[h.id]:0,C=(S.__max__||0)+1;let w=0;if(pn(h.x)){const N=s(h.x,!0);if(f){const z=t[h.id]||t._$width;w=l?N-z/2:N-z+((m=d[E])!=null?m:t._$total.slice(0,E+1).reduce(u))-f}else w=N-(le(t)?t:t._$width)*(C/2-(l?1:E))}return t&&w&&C>1&&c&&(E&&(w+=c*E),C>2?w-=(C-1)*c/2:C===2&&(w-=c/2)),w}},getShapeY(t){const e=this,n=e.isStackNormalized();return r=>{let{value:i}=r;const o=t?Us(e,r,t):void 0;return le(r)?i=r:le(o)?i=o:e.isAreaRangeType(r)?i=e.getBaseValue(r,"mid"):n?i=e.getRatio("index",r,!0):e.isBubbleZType(r)?i=e.getBubbleZData(r.value,"y"):e.isBarRangeType(r)&&(i=i[1]),e.getYScaleById(r.id,t)(i)}},getShapeYMin(t,e=!1){const n=this,r=n.axis.getId(t),i=n.getYScaleById(t,e),[o]=i.domain(),s=n.config[`axis_${r}_inverted`];return!n.isGrouped(t)&&!s&&o>0?o:0},getShapeOffsetData(t,e){const n=this,r=n.orderTargets(n.filterTargetsToShow(n.data.targets.filter(t,n))),i=n.state.dataGeneration,o=r.map(h=>h.id).join("_"),s=`${ke.shapeOffset}_${e?"sub":"main"}_${o}`,l=n.cache.get(s);if((l==null?void 0:l.generation)===i)return l;const c=n.isStackNormalized(),u=r.map(h=>{let m=h.values;const S={};n.isStepType(h)&&(m=n.convertValuesToStep(m));const E=m.reduce((C,w)=>{const N=Number(w.x),z=tu(n,w,e);return C[N]=w,S[N]=c?n.getRatio("index",w,!0):z,C},{});return{id:h.id,rowValues:m,rowValueMapByXValue:E,values:S}}),f=r.reduce((h,{id:m},S)=>(h[m]=S,h),{}),d={generation:i,indexMapByTargetId:f,shapeOffsetTargets:u};return n.cache.add(s,d),d},getShapeOffset(t,e,n){const r=this,{shapeOffsetTargets:i,indexMapByTargetId:o}=r.getShapeOffsetData(t,n),s=r.config.data_groupsZeroAs;let l=null;if(!r.config.bar_indices_removeNull){l=new Map;for(const c of i){const u=r.getIndices(e,{id:c.id,index:0});l.set(c.id,i.filter(f=>f.id!==c.id&&u[f.id]===u[c.id]))}}return(c,u)=>{var f;const{id:d,value:h,x:m}=c,S=tu(r,c,n),E=r.getIndices(e,c),C=r.getYScaleById(d,n);if(r.isBarRangeType(c))return C(h[0]);const w=Number(m),N=C(s==="zero"?0:r.getShapeYMin(d,n));let z=N;const $=(f=l==null?void 0:l.get(d))!=null?f:i.filter(G=>G.id!==d&&E[G.id]===E[d]);for(const G of $){const{id:V,rowValueMapByXValue:J,rowValues:Q,values:rt}=G;if(o[V]<o[d]){const et=rt[w];let st=Q[u];(!st||Number(st.x)!==w)&&(st=J[w]);const ct=st&&tu(r,st,n);le(ct)&&le(S)&&ct*S>=0&&le(et)&&(S!==0||s==="positive"&&et>0||s==="negative"&&et<0)&&(z+=C(et)-N)}}return z}},generateGetLinePoints(t,e,n){const r=this,{config:i}=r,o=r.getShapeX(0,t,e),s=r.getShapeY(e),l=r.getShapeOffset(n||r.isLineType,t,e),c=r.getYScaleById.bind(r),u=new Map;return(f,d)=>{let h=u.get(f.id);h===void 0&&(h=c.call(r,f.id,e)(r.getShapeYMin(f.id,e)),u.set(f.id,h));const m=l(f,d)||h,S=o(f);let E=s(f);i.axis_rotated&&(f.value>0&&E<h||f.value<0&&h<E)&&(E=h);const C=[S,E-(h-m)];return[C,C,C,C]}},generateGetAreaPoints(t,e){const n=this,{config:r}=n,i=n.getShapeX(0,t,e),o=n.getShapeY(!!e),s=n.getShapeOffset(n.isAreaType,t,e),l=n.getYScaleById.bind(n),c=new Map;return function(u,f){let d=c.get(u.id);d===void 0&&(d=l.call(n,u.id,e)(n.getShapeYMin(u.id,e)),c.set(u.id,d));const h=s(u,f)||d,m=i(u),S=u.value;let E=o(u);return r.axis_rotated&&(S>0&&E<d||S<0&&d<E)&&(E=d),[[m,h],[m,E-(d-h)],[m,E-(d-h)],[m,h]]}},generateGetBarPoints(t,e){const n=this,{config:r}=n,i=e?n.axis.subX:n.axis.x,o=n.getIndicesMax(t)+1,s=n.getBarW("bar",i,o),l=n.getShapeX(s,t,!!e),c=n.getShapeY(!!e),u=n.getShapeOffset(n.isBarType,t,!!e),f=n.getYScaleById.bind(n),d=new Map;return(h,m)=>{const{id:S}=h;let E=d.get(S);E||(E={y0:f.call(n,S,e)(n.getShapeYMin(S,e)),isInverted:r[`axis_${n.axis.getId(S)}_inverted`]},d.set(S,E));const{y0:C,isInverted:w}=E,N=u(h,m)||C,z=le(s)?s:s[h.id]||s._$width,$=h.value,G=l(h);let V=c(h);r.axis_rotated&&!w&&($>0&&V<C||$<0&&C<V)&&(V=C),n.isBarRangeType(h)||(V-=C-N);const J=G+z;return[[G,N],[G,V],[J,V],[J,N]]}},circleY(t,e){const n=this,r=t.id;let i;return n.isGrouped(r)&&(i=nE.bind(n)(t)),i?i(t,e)[0][1]:n.getYScaleById(r)(n.getBaseValue(t))},circleX(t){return this.xx(t)},updateCircleY(t=!1){const e=this,n=Ug(e),r=e.generateGetLinePoints(e.getShapeIndices(n),t,n),i=e.getShapeY(t);return(o,s)=>{const l=o.id;return e.isGrouped(l)&&qc(e,o)?r(o,s)[0][1]:i(o)}},getSubchartCandlestickShapeValue(t,e){return Us(this,t,e)},isSubchartCandlestickBarValue(t,e){return kg(this,t,e)},getSubchartCandlestickBarColor(t,e){return eE(this,t,e)},pointR(t){const e=this,{config:n}=e,r=n.point_r;let i=r;return e.isBubbleType(t)?i=e.getBubbleR(t):ue(r)&&(i=r.bind(e.api)(t)),t.r=i,i},pointExpandedR(t){const e=this,{config:n}=e,r=e.isBubbleType(t)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||e.pointR(t)*r:e.pointR(t)},pointSelectR(t){const e=this,n=e.config.point_select_r;return ue(n)?n(t):n||e.pointR(t)*4},isPointFocusOnly(){const t=this;return t.config.point_focus_only&&!t.hasType("bubble")&&!t.hasType("scatter")&&!t.hasArcType(null,["radar"])},getPointSensitivity(t){const e=this;let n=e.config.point_sensitivity;if(t)ue(n)?n=n.call(e.api,t):n==="radius"&&(n=t.r);else return n;return n},getBarW(t,e,n){var r,i,o,s,l;const c=this,{config:u,org:f,scale:d,state:h}=c,m=c.getMaxDataCount(),S=t==="bar"&&((r=u.data_groups)==null?void 0:r.length),E=`${t}_width`,{k:C}=(o=(i=c.getZoomTransform)==null?void 0:i.call(c))!=null?o:{k:1},w=[(s=u.axis_x_min)!=null?s:f.xDomain[0],(l=u.axis_x_max)!=null?l:f.xDomain[1]].map(G=>c.axis.isTimeSeries()?Kn.call(c,G):Number(G));let N=e.tickInterval(m);if(d.zoom&&!c.axis.isCategorized()&&C>1){const G=w.every((V,J)=>V===f.xDomain[J]);N=f.xDomain.map((V,J)=>{const Q=G?V:V-Math.abs(w[J]);return d.zoom(Q)}).reduce((V,J)=>Math.abs(V)+J)/m}const z=G=>{const V=G?u[E][G]:u[E],J=G?V.ratio:u[`${E}_ratio`],Q=G?V.max:u[`${E}_max`],rt=le(V)?V:ue(V)?V.call(c,h.width,n,m):n?N*J/n:0;return Q&&rt>Q?Q:rt};let $=z();return!S&&qn(u[E])&&($={_$width:$,_$total:[]},c.getTargetsToShow().forEach(G=>{u[E][G.id]&&($[G.id]=z(G.id),$._$total.push($[G.id]||$._$width))})),$},getShapeByIndex(t,e,n){const r=this,{$el:i}=r,o=Xe(e)?`-${e}`:"";let s=i[t];return s&&!s.empty()?s=s.filter(l=>n?l.id===n:!0).filter(l=>Xe(e)?l.index===e:!0):s=(n?i.main.selectAll(`.${Ie[`${t}s`]}${r.getTargetSelectorSuffix(n)}`):i.main).selectAll(`.${Ie[t]}${o}`),s},isWithinShape(t,e){var n;const r=this,i=Ut(t);let o;return r.isTargetToShow(e.id)?(n=r.hasValidPointType)!=null&&n.call(r,t.nodeName)?o=r.isStepType(e)?r.isWithinStep(t,r.getYScaleById(e.id)(r.getBaseValue(e))):r.isWithinCircle(t,r.isBubbleType(e)?r.pointSelectR(e)*1.5:0):t.nodeName==="path"&&(o=i.classed(Ie.bar)?r.isWithinBar(t):!0):o=!1,o},getInterpolate(t){const n=this.getInterpolateType(t);return tE[n]},getCurve(t){const e=this;return e.config.axis_rotated&&e.isStepType(t)?r=>{const i=e.getInterpolate(t)(r);return i.orgPoint=i.point,i.pointRotated=function(o,s){this._point===1&&(this._point=2);const l=this._y*(1-this._t)+s*this._t;this._context.lineTo(this._x,l),this._context.lineTo(o,l),this._x=o,this._y=s},i.point=function(o,s){this._point===0?this.orgPoint(o,s):this.pointRotated(o,s)},i}:e.getInterpolate(t)},getInterpolateType(t){const e=this,{config:n}=e,r=n.spline_interpolation_type,i=e.isInterpolationType(r)?r:"cardinal";return e.isSplineType(t)?i:e.isStepType(t)?n.line_step_type:"linear"},isWithinBar(t){const e=er(this.state.event,t),n=bh(t),[r,i,o]=n,s=Math.min(r.x,i.x),l=Math.min(r.y,i.y),c=this.config.bar_sensitivity,u=Math.abs(o.x-i.x),f=Math.abs(r.y-i.y),d=s-c,h=s+u+c,m=l+f+c,S=l-c;return d<e[0]&&e[0]<h&&S<e[1]&&e[1]<m}},aE=Object.defineProperty,iE=(t,e,n)=>e in t?aE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Vn=(t,e,n)=>iE(t,typeof e!="symbol"?e+"":e,n);function oE(t){return t.hasArcType()?"arc charts":t.hasType("funnel")?"funnel chart":null}function sE(t){var e,n;const{config:r}=t,i=r.render_mode==="canvas"?oE(t):null;i&&((n=(e=fe.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] render.mode='canvas' is ignored for ${i}; falling back to SVG.`),r.render_mode="svg")}class Ir{constructor(e){Vn(this,"api"),Vn(this,"config"),Vn(this,"cache"),Vn(this,"$el"),Vn(this,"state"),Vn(this,"charts"),Vn(this,"data",{xs:{},targets:[]}),Vn(this,"axis"),Vn(this,"scale",{x:null,y:null,y2:null,subX:null,subY:null,subY2:null,zoom:null}),Vn(this,"org",{xScale:null,xDomain:null}),Vn(this,"color"),Vn(this,"patterns"),Vn(this,"levelColor"),Vn(this,"point"),Vn(this,"brush"),Vn(this,"format",{extraLineClasses:null,xAxisTick:null,dataTime:null,defaultAxisTime:null,axisTime:null});const n=this;n.api=e,n.config=new Ua,n.cache=new F1;const r=new P1;n.$el=r.getStore("element"),n.state=r.getStore("state"),n.$T=n.$T.bind(n)}$T(e,n,r){const{config:i,state:o}=this,s=i.transition_duration,l=i.subchart_show;let c=e;return c&&("tagName"in c&&(c=Ut(c)),c=(n!==!1&&s||n)&&(!o.zooming||o.dragging)&&!o.resizing&&o.rendered&&!l?c.transition(r).duration(s):c),c}beforeInit(){const e=this;e.callPluginHook("$beforeInit"),$e(e.config.onbeforeinit,e.api)}afterInit(){const e=this;e.callPluginHook("$afterInit"),$e(e.config.onafterinit,e.api)}init(){const e=this,{config:n,state:r,$el:i}=e,{boost_useCssRule:o,bindto:s}=n;N1(e),sE(e);const l=e.hasArcType();if(r.hasRadar=!r.hasAxis&&e.hasType("radar"),r.hasFunnel=!r.hasAxis&&e.hasType("funnel"),r.hasTreemap=!r.hasAxis&&e.hasType("treemap"),r.hasAxis=!l&&!r.hasFunnel&&!r.hasTreemap,r.datetimeId=`bb-${+new Date*Pr()}`,o){const u=Ze.createElement("style");u.type="text/css",Ze.head.appendChild(u),r.style={rootSelector:`.${r.datetimeId}`,sheet:u.sheet},i.style=u}const c={element:s,classname:"bb"};Ke(s)&&(c.element=s.element||"#chart",c.classname=s.classname||c.classname),i.chart=ue(c.element.node)?s.element:Ut(c.element||[]),i.chart.empty()&&(i.chart=Ut(Ze.body.appendChild(Ze.createElement("div")))),i.chart.html("").classed(c.classname,!0).classed(r.datetimeId,o).style("position","relative"),e.initParams(),e.initToRender()}initToRender(e){const n=this,{config:r,state:i,$el:{chart:o}}=n,s=()=>X1(o,{display:"none",visibility:"hidden"}),l=r.render.lazy===!1?!1:r.render.lazy||s(),c=fe.MutationObserver;l&&c&&r.render.observe!==!1&&!e&&new c((u,f)=>{s()||(f.disconnect(),!i.rendered&&n.initToRender(!0))}).observe(o.node(),{attributes:!0,attributeFilter:["class","style"]}),(!l||e)&&n.convertData(r,u=>{n.initWithData(u),n.afterInit()})}initParams(){var e,n;const r=this,{config:i,format:o,state:s}=r;if(i.render_mode==="canvas"&&((e=r.prepareCanvasConfig)==null||e.call(r)),r.color=r.generateColor(),r.levelColor=r.generateLevelColor(),i.padding===!1&&(i.axis_x_show=!1,i.axis_y_show=!1,i.axis_y2_show=!1,i.subchart_show=!1),i.render_mode!=="canvas"&&(r.hasPointType()||(n=r.hasLegendDefsPoint)!=null&&n.call(r))&&(r.point=r.generatePoint()),s.hasAxis){r.initClip(),o.extraLineClasses=r.generateExtraLineClass(),o.dataTime=i.data_xLocaltime?Of:Pf,o.axisTime=i.axis_x_localtime?wl:Ol;const f=i.zoom_enabled&&i.zoom_type==="drag";o.defaultAxisTime=d=>{const{x:h,zoom:m}=r.scale,S=f?m:m&&h.orgDomain().toString()!==m.domain().toString(),E=d.getMilliseconds()&&".%L"||d.getSeconds()&&".:%S"||d.getMinutes()&&"%I:%M"||d.getHours()&&"%I %p"||d.getDate()!==1&&"%b %d"||S&&d.getDate()===1&&"%b'%y"||d.getMonth()&&"%-m/%-d"||"%Y";return o.axisTime(E)(d)}}const{legend_position:l,legend_inset_anchor:c,axis_rotated:u}=i;s.isLegendRight=l==="right",s.isLegendInset=l==="inset",s.isLegendTop=c==="top-left"||c==="top-right",s.isLegendLeft=c==="top-left"||c==="bottom-left",s.rotatedPadding.top=r.getResettedPadding(s.rotatedPadding.top),s.rotatedPadding.right=u&&!i.axis_x_show?0:30,s.inputType=W1(i.interaction_inputType_mouse,i.interaction_inputType_touch)}initWithData(e){var n,r,i,o,s,l;const c=this,{config:u,scale:f,state:d,$el:h,org:m}=c,{hasAxis:S,hasFunnel:E,hasTreemap:C}=d,w=u.interaction_enabled,N=c.hasType("polar"),z=u.data_labels_backgroundColors;if(S&&(c.axis=c.getAxisInstance(),u.zoom_enabled&&c.initZoom()),c.data.xs={},c.data.targets=c.convertDataToTargets(e),u.data_filter&&(c.data.targets=c.data.targets.filter(u.data_filter.bind(c.api))),u.data_hide&&c.addHiddenTargetIds(u.data_hide===!0?c.mapToIds(c.data.targets):u.data_hide),u.legend_hide&&c.addHiddenLegendIds(u.legend_hide===!0?c.mapToIds(c.data.targets):u.legend_hide),c.updateSizes(),c.updateScales(!0),S){const{x:V,y:J,y2:Q,subX:rt,subY:et,subY2:st}=f;V&&(V.domain(ti(c.getXDomain(c.data.targets),!u.axis_x_inverted)),rt.domain(V.domain()),m.xDomain=V.domain()),J&&(J.domain(c.getYDomain(c.data.targets,"y")),et.domain(J.domain())),Q&&(Q.domain(c.getYDomain(c.data.targets,"y2")),st&&st.domain(Q.domain()))}if(u.render_mode==="canvas"){if(!c.initCanvas)throw Error("[billboard.js] Please import and call canvas() to use render.mode='canvas'.");if(c.bindResize(),c.initCanvas(),u.tooltip_show&&c.initTooltip(),c.callPluginHook("$init"),$e(u.oninit,c.api),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const V=c.getMinMaxData();$e(u.data_onmin,c.api,V.min),$e(u.data_onmax,c.api,V.max)}d.rendered=!0;return}if(h.svg=h.chart.append("svg").style("overflow","hidden").style("display","block"),w&&d.inputType){const V=d.inputType==="touch",{onclick:J,onover:Q,onout:rt}=u,et=(n=u.interaction_inputType_touch)==null?void 0:n.preventDefault,st=Pa(et)&&et||!1,ct=!isNaN(et)&&et||null,dt=V?{passive:!st&&ct===null}:void 0;h.svg.on("click",(J==null?void 0:J.bind(c.api))||null).on(V?"touchstart":"mouseenter",(Q==null?void 0:Q.bind(c.api))||null,dt).on(V?"touchend":"mouseleave",(rt==null?void 0:rt.bind(c.api))||null)}u.svg_classname&&h.svg.attr("class",u.svg_classname);const $=ue(u.color_tiles)&&c.patterns;(S||$||N||C||z||(r=c.hasLegendDefsPoint)!=null&&r.call(c))&&(h.defs=h.svg.append("defs"),S&&["id","idXAxis","idYAxis","idY2Axis","idGrid"].forEach(V=>{c.appendClip(h.defs,d.clip[V])}),c.generateTextBGColorFilter(z),$&&c.patterns.forEach(V=>h.defs.append(()=>V.node))),c.updateSvgSize(),c.bindResize();const G=h.svg.append("g").classed(Ue.main,!0).attr("transform",E||C?null:c.getTranslate("main"));if(h.main=G,u.subchart_show&&c.initSubchart(),u.tooltip_show&&c.initTooltip(),u.title_text&&c.initTitle(),!C&&u.legend_show&&c.initLegend(),u.data_empty_label_text&&G.append("text").attr("class",`${Rn.text} ${Ue.empty}`).attr("text-anchor","middle").attr("dominant-baseline","middle"),S&&(u.regions.length&&((i=c.initRegion)==null||i.call(c)),!u.clipPath&&c.axis.init()),G.append("g").classed(Ue.chart,!0).attr("clip-path",S?d.clip.path:null),c.callPluginHook("$init"),c.initChartElements(),S&&(w&&((o=c.initEventRect)==null||o.call(c)),(s=c.initGrid)==null||s.call(c),u.clipPath&&((l=c.axis)==null||l.init())),c.updateTargets(c.data.targets),c.updateDimension(),$e(u.oninit,c.api),c.setBackground(),c.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),u.data_onmin||u.data_onmax){const V=c.getMinMaxData();$e(u.data_onmin,c.api,V.min),$e(u.data_onmax,c.api,V.max)}u.tooltip_show&&c.initShowTooltip(),d.rendered=!0}initChartElements(){const e=this,{hasAxis:n,hasRadar:r,hasTreemap:i}=e.state,o=[];if(n){const s=["bar","bubble","candlestick","line"];e.config.bar_front&&s.push(s.shift());for(const l of s){const c=Nn(l);(l==="line"&&e.hasTypeOf(c)||e.hasType(l))&&o.push(c)}}else if(i)o.push("Treemap");else if(e.hasType("funnel"))o.push("Funnel");else{const s=e.hasType("polar"),l=e.hasType("gauge");r||o.push("Arc","Pie"),l?o.push("Gauge"):r?o.push("Radar"):s&&o.push("Polar")}for(const s of o)e[`init${s}`]();pn(e.config.data_labels)&&!e.hasArcType(null,["radar"])&&e.initText()}setChartElements(){const e=this,{$el:{chart:n,svg:r,defs:i,main:o,tooltip:s,legend:l,title:c,canvas:u,eventOverlay:f,grid:d,needle:h,arcs:m,circle:S,bar:E,candlestick:C,line:w,area:N,text:z}}=e;e.api.$={chart:n,svg:r,canvas:u,eventOverlay:f,defs:i,main:o,tooltip:s,legend:l,title:c,grid:d,arc:m,circles:S,bar:{bars:E},candlestick:C,line:{lines:w,areas:N},needle:h,text:{texts:z}}}setBackground(){const e=this,{config:{background:n},state:r,$el:{svg:i}}=e;if(pn(n)){const o=i.select("g").insert(n.imgUrl?"image":"rect",":first-child");n.imgUrl?o.attr("href",n.imgUrl):n.color&&o.style("fill",n.color).attr("clip-path",r.clip.path),o.attr("class",n.class||null).attr("width","100%").attr("height","100%")}}updateTargets(e){var n,r;const i=this,{hasAxis:o,hasFunnel:s,hasRadar:l,hasTreemap:c}=i.state,u=d=>i[`updateTargetsFor${d}`](e.filter(i[`is${d}Type`].bind(i)));if(i.updateTargetsForText(e),o){const d=["bar","candlestick","line"];for(const h of d){const m=Nn(h);(h==="line"&&i.hasTypeOf(m)||i.hasType(h))&&u(m)}(n=i.updateTargetsForSubchart)==null||n.call(i,e)}else if(i.hasArcType(e)){let d="Arc";l?d="Radar":i.hasType("polar")&&(d="Polar"),u(d)}else s?u("Funnel"):c&&u("Treemap");const f=i.hasType("bubble")||i.hasType("scatter");f&&((r=i.updateTargetForCircle)==null||r.call(i)),i.filterTargetsToShowAtInit(f)}filterTargetsToShowAtInit(e=!1){const n=this,{$el:{svg:r},$T:i}=n;let o=`.${Ue.target}`;e&&(o+=`, .${Un.chartCircles} > .${Un.circles}`),i(r.selectAll(o).filter(s=>n.isTargetToShow(s.id))).style("opacity",null)}getWithOption(e){const n={Dimension:!0,EventRect:!0,Legend:!1,Subchart:!0,Transform:!1,Transition:!0,TrimXDomain:!0,UpdateXAxis:"UpdateXDomain",UpdateXDomain:!1,UpdateOrgXDomain:!1,TransitionForExit:"Transition",TransitionForAxis:"Transition",Y:!0};for(const[r,i]of Object.entries(n)){const o=Ye(i)?n[i]:i;n[r]=fa(e,`with${r}`,o)}return n}initialOpacity(e){const n=this,{withoutFadeIn:r}=n.state;return n.getBaseValue(e)!==null&&r[e.id]?null:"0"}bindResize(){var e,n;const r=this,{$el:i,config:o,state:s}=r,l=H1(o.resize_timer),{resize_auto:c}=o,u=[];u.push(()=>$e(o.onresize,r.api)),/^(true|parent)$/.test(c)&&u.push(()=>{var f;const d=s.current.width,h=s.current.height;r.setContainerSize(),!(d===s.current.width&&h===s.current.height)&&(s.resizing=!0,o.legend_show&&(r.updateSizes(),s.isCanvasMode?(f=r.updateHtmlLegend)==null||f.call(r):r.updateLegend()),r.api.flush(!1))}),u.push(()=>{$e(o.onresized,r.api),s.resizing=!1}),u.forEach(f=>l.add(f)),r.resizeFunction=l,c==="parent"&&fe.ResizeObserver?(r.resizeFunction.resizeObserver=new fe.ResizeObserver(r.resizeFunction.bind(r))).observe(i.chart.node().parentNode):(c==="parent"&&((n=(e=fe.console)==null?void 0:e.warn)==null||n.call(e,"[billboard.js] resize.auto='parent' requires ResizeObserver; falling back to window resize.")),fe.addEventListener("resize",r.resizeFunction))}callPluginHook(e,...n){this.config.plugins.forEach(r=>{e==="$beforeInit"&&(r.$$=this,this.api.plugins.push(r)),r[e](...n)})}}bn(Ir.prototype,[hb,vb,pb,Ib,wb,Lb,sA,Cb,lA,mA,xA,Xy,rE,yA,TA,IA,wA,MA,LA,FA]);const nu=[Ar,or,Zn,Nl],Wg=10,lE=750,Vg=6,cE=2,uE=1e5,fE={"&":"&","<":"<",">":">",'"':""","'":"'"},ks=new WeakMap;function jg(t){var e,n;(n=(e=fe.console)==null?void 0:e.warn)==null||n.call(e,`[billboard.js] ${t}`)}function Gs(t,e){var n;const{config:r}=t,i=(n=r.data_names[e])!=null?n:e;return ue(r.legend_format)?r.legend_format(i,e!==i?e:void 0):i}function dE(t){return`${t}`.replace(/[&<>"']/g,e=>fE[e])}function hE(t,e){var n,r;const{config:i}=t,o=((n=t.mapToIds)==null?void 0:n.call(t,t.data.targets))||[],s=((r=t.getValidPointPattern)==null?void 0:r.call(t))||(Array.isArray(i.point_pattern)&&i.point_pattern.length?i.point_pattern:[i.point_type]),l=Math.max(0,o.indexOf(e));return s[l%s.length]||"circle"}function gE(t,e){const n=dE(t.color(e)),r=hE(t,e),i='viewBox="0 0 8 8" aria-hidden="true" focusable="false" style="display:block;width:100%;height:100%;overflow:visible;pointer-events:none"',o=`fill="${n}" stroke="${n}"`;return/^rect(angle)?$/i.test(r)?`<svg ${i}><rect x="1" y="1" width="6" height="6" ${o}></rect></svg>`:!r||/^circle$/i.test(r)?`<svg ${i}><circle cx="4" cy="4" r="3" ${o}></circle></svg>`:`<svg ${i}><g ${o}>${Yr(r)}</g></svg>`}function vE(t,e){const n=new Map;e.each(function(r){n.set(r,this)}),t.cache.add(ke.legendItemMap,n)}function Hg(t,e){const{config:n}=t;e.attr("class",function(r){const o=`${Ut(this).attr("class")||""} ${t.generateClass(Be.legendItem,r)}`;return Array.from(new Set(o.trim().split(/\s+/).filter(Boolean))).join(" ")}).style("visibility",r=>t.isLegendToShow(r)?null:"hidden").classed(Be.legendItemHidden,r=>!t.isTargetToShow(r)).classed(hr.legendItemInteractive,!!n.interaction_enabled),vE(t,e)}function pE(t,e){var n;const{legend:r}=t.$el,i=((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e];r==null||r.selectAll(`.${Be.legendItem}`).classed(nn.legendItemFocused,o=>i.indexOf(o)>=0).style("opacity",function(o){return i.indexOf(o)>=0?null:t.opacityForUnfocusedLegend.call(t,Ut(this))})}function mE(t){const{legend:e}=t.$el;e==null||e.selectAll(`.${Be.legendItem}`).classed(nn.legendItemFocused,!1).style("opacity",null)}function xE(t,e){var n,r,i;const{state:o}=t,l=(((n=t.mapToTargetIds)==null?void 0:n.call(t,[e]))||[e]).filter(t.isTargetToShow,t),c=new Set(l),u=(((r=t.mapToTargetIds)==null?void 0:r.call(t))||[]).filter(f=>!c.has(f)&&t.isTargetToShow(f));o.focusedTargetIds=c,o.defocusedTargetIds=new Set(u),(i=t.renderCanvasFrame)==null||i.call(t,void 0,null,!1)}function Yg(t){var e,n,r;const{state:i}=t,o=!!((e=i.focusedTargetIds)!=null&&e.size)||!!((n=i.defocusedTargetIds)!=null&&n.size);i.focusedTargetIds=new Set,i.defocusedTargetIds=new Set,o&&((r=t.renderCanvasFrame)==null||r.call(t,void 0,null,!1))}function Kg(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function yE(t,e,n){const r=Kg(n);t.state.canvasLegendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function Zg(t,e){const n=t.state.canvasLegendTouch,r=n&&Kg(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>Wg||Math.abs(r.clientY-n.y)>Wg)}function TE(t,e,n){Zg(t,n);const r=t.state.canvasLegendTouch;return t.state.canvasLegendTouch=null,!!r&&r.id===e&&!r.moved}function bE(t,e){t.state.canvasLegendLastTouchClickId=e,t.state.canvasLegendLastTouchClickTime=Date.now()}function SE(t,e){const{state:n}=t,r=n.canvasLegendLastTouchClickId===e&&Date.now()-(n.canvasLegendLastTouchClickTime||0)<lE;return r&&(n.canvasLegendLastTouchClickId=null,n.canvasLegendLastTouchClickTime=0),r}function Jg(t,e){const{api:n,config:r,state:i}=t;if(e.on("click dblclick mouseover mouseout touchstart touchmove touchend",null),!r.interaction_enabled)return;const o=r.legend_item_interaction,s=typeof o=="object"&&(o!=null&&o.dblclick)?"dblclick":"click",l=i.inputType==="touch",c=o||ue(r.legend_item_onclick),u=l?rv(r):void 0,f=function(d,h){var m;if(!$e(r.legend_item_onclick,n,h,!i.hiddenTargetIds.has(h))){const S=Ut(this);d.type==="dblclick"||d.altKey?i.hiddenTargetIds.size&&!S.classed(Be.legendItemHidden)?n.show():(n.hide(),n.show(h)):(n.toggle(h),S.classed(nn.legendItemFocused,!1)),Yg(t)}l&&((m=t.hideTooltip)==null||m.call(t))};e.on(s,c?function(d,h){l&&d.type==="click"&&SE(t,h)||f.call(this,d,h)}:null),l&&s==="click"&&c&&e.on("touchstart",function(d,h){yE(t,h,d)},u).on("touchmove",d=>{Zg(t,d)},u).on("touchend",function(d,h){TE(t,h,d)&&(bE(t,h),f.call(this,d,h))},u),!l&&e.on("mouseover",o||ue(r.legend_item_onover)?function(d,h){$e(r.legend_item_onover,n,h,!i.hiddenTargetIds.has(h))||!i.transiting&&t.isTargetToShow(h)&&(pE(t,h),xE(t,h))}:null).on("mouseout",o||ue(r.legend_item_onout)?function(d,h){$e(r.legend_item_onout,n,h,!i.hiddenTargetIds.has(h))||(mE(t),Yg(t))}:null)}function AE(t,e){var n,r;const i=(r=(n=t.$el.chart)==null?void 0:n.node)==null?void 0:r.call(n),o=i==null?void 0:i.ownerDocument;if(!i||!o)return null;const s=o.createElementNS("http://www.w3.org/2000/svg","svg"),l=o.createElementNS("http://www.w3.org/2000/svg","g"),c=o.createElementNS("http://www.w3.org/2000/svg","text");s.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",l.setAttribute("class",Be.legendItem),c.textContent=e,l.appendChild(c),s.appendChild(l),i.appendChild(s);const u=cn(c);return s.remove(),u}function Qg(t){return/^(indexed|category|log|timeseries)$/.test(t)}function Xs(t){return/^(indexed|log|timeseries)$/.test(t)}function EE(t){var e,n;const r=t;return((e=r.changedTouches)==null?void 0:e[0])||((n=r.touches)==null?void 0:n[0])||("clientX"in t?t:null)}function CE(t,e,n=!1){var r,i;const o=ho(t,e);return o?n?(i=(r=t.hitDetector).findNearestShape)==null?void 0:i.call(r,o[0],o[1]):t.hitDetector.findNearest(o[0],o[1]):null}function IE(t,e){var n;const{config:r,state:i}=t,{height:o,margin:s,width:l,xAxisHeight:c}=i,[u,f]=e,d=s.left,h=s.left+l,m=s.top,S=s.top+o,E=r.axis_x_show?Math.max(c||0,24):0;return(n=t.isMultipleX)!=null&&n.call(t)||i.hasTreemap?!1:r.axis_rotated?f>=m&&f<=S&&u>=d-E&&u<=h:u>=d&&u<=h&&f>=m&&f<=S+E}function RE(t,e){const{state:{height:n,margin:r,width:i}}=t,[o,s]=e;return o>=r.left&&o<=r.left+i&&s>=r.top&&s<=r.top+n}function wE(t,e){var n,r;return t.hitDetector.findNearest(e[0],e[1])||(IE(t,e)?(r=(n=t.hitDetector).findNearestIndexByCoord)==null?void 0:r.call(n,e[0],e[1]):null)}function _g(t,e){var n;const{config:r,state:i}=t,o=t.filterTargetsToShow(t.data.targets),s=nv(t,e),l=r.tooltip_grouped&&!i.hasTreemap&&!s?(n=t.filterByX)==null?void 0:n.call(t,o,e.x):null;return(i.hasTreemap?[e]:s?[e]:r.tooltip_grouped?l!=null&&l.length?l:o.map(c=>c.values[e.index]).filter(Boolean):[e]).map(c=>{var u;return((u=t.addName)==null?void 0:u.call(t,c))||c})}function OE(t,e,n){var r,i;return(r=t.isMultipleX)!=null&&r.call(t)&&!nv(t,e)?[((i=t.addName)==null?void 0:i.call(t,e))||e]:n}function ho(t,e){const n=EE(e);if(!n)return null;const r=t.$el.canvas.node(),i=cn(r,!0);return[n.clientX-i.left,n.clientY-i.top]}function ru(t,e){var n,r;if(!Array.isArray(e)||e.length<2)return null;const i=e.slice(0,2);return(r=(n=t.axis)==null?void 0:n.isTimeSeries)!=null&&r.call(n)?i.map(o=>Kn.call(t,o)):i}function go(t){const{config:e,state:n}=t;return!e.subchart_show||!n.hasAxis||n.width2<=0||n.height2<=0?null:{x:n.margin2.left,y:n.margin2.top,w:n.width2,h:n.height2}}function qg(t,e){const n=go(t);return!!n&&e[0]>=n.x&&e[0]<=n.x+n.w&&e[1]>=n.y&&e[1]<=n.y+n.h}function PE(t,e){const{config:n,state:r}=t,i=go(t);if(n.subchart_brush_enabled!==!1||!i||!qg(t,e))return null;const o=gd(t,n.axis_rotated?e[1]-i.y:e[0]-i.x);return o===null?null:n.axis_rotated?[r.margin.left+r.width/2,r.margin.top+o]:[r.margin.left+o,r.margin.top+r.height/2]}function Ws(t){var e,n;const r=go(t),i=r?t.config.axis_rotated?r.h:r.w:0,o=(n=(e=t.axis)==null?void 0:e.getExtent)==null?void 0:n.call(e),s=Array.isArray(o)?o.slice(0,2):[];if(s.length===2&&s.every(Number.isFinite)){const l=Math.max(0,Math.min(i,s[0])),c=Math.max(0,Math.min(i,s[1]));return[Math.min(l,c),Math.max(l,c)]}return[0,i]}function au(t,e,n=!1){const r=ho(t,e),i=r&&go(t);if(!r||!i||!qg(t,r))return null;const o=t.config.axis_rotated?r[1]-i.y:r[0]-i.x,[s,l]=Ws(t);return!n&&(o<s||o>l)?null:Math.max(s,Math.min(l,o))}function ME(t,e,n){const r=Math.min(e,n),i=Math.max(e,n);return[t.scale.subX.invert(r),t.scale.subX.invert(i)]}function tv(t){const{scale:e,state:n}=t,r=n.domain;if(!(r!=null&&r.length)||!e.subX)return null;const i=go(t),o=e.subX(r[0]),s=e.subX(r[1]);if(!i||!Number.isFinite(o)||!Number.isFinite(s))return null;const[l,c]=Ws(t);return[Math.max(l,Math.min(c,Math.min(o,s))),Math.max(l,Math.min(c,Math.max(o,s)))]}function ev(t,e){const n=tv(t);if(!n)return"select";const[r,i]=n;return Math.abs(e-r)<=Vg?"resize-start":Math.abs(e-i)<=Vg?"resize-end":e>r&&e<i?"move":"select"}function iu(t,e,n){const[r,i]=Ws(t);return[Math.max(r,Math.min(i,e)),Math.max(r,Math.min(i,n))]}function LE(t,e){return/^resize/.test(e)?t.config.axis_rotated?"ns-resize":"ew-resize":e==="move"?"move":"crosshair"}function ba(t){return t?`${t.id}:${t.index}`:null}function DE(t,e){const n=t.state.canvasSelectionDragIncluded,r=ks.get(t)||new Map,i=new Map,o=new Set,s=[];return e.filter(l=>ou(t,l)).forEach(l=>{const c=ba(l);c&&(o.add(c),!i.has(c)&&i.set(c,l))}),i.forEach((l,c)=>{!n.has(c)&&s.push(l)}),r.forEach((l,c)=>{!o.has(c)&&s.push(l)}),ks.set(t,i),{included:o,rows:s}}function FE(t){return t?Array.isArray(t)?t:[t]:null}function ou(t,e){return e&&In(t,e)&&ei(t,e,nu)&&nu.some(n=>n(t,e))&&t.config.data_selection_isselectable.bind(t.api)(e)}function su(t,e){t.filterTargetsToShow(t.data.targets).filter(n=>ei(t,n,nu)).forEach(n=>{n.values.forEach(r=>{ou(t,r)&&e(r)})})}function nv(t,e){return!(t.config.axis_x_forceAsSingle&&t.config.tooltip_grouped)&&(ga(t,e)||va(t,e))}function NE(t){return t.interaction_inputType_touch!==!1}function rv(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Pa(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}function $E(t){var e;const n=(e=t.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Pa(n)&&n||!1,i=!isNaN(n)&&n||null;let o;return s=>{var l,c;const u=((l=s.changedTouches)==null?void 0:l[0])||((c=s.touches)==null?void 0:c[0]);if(!u)return;const f=u[`client${t.axis_rotated?"Y":"X"}`];s.type==="touchstart"?r?s.preventDefault():i!==null&&(o=f):s.type==="touchmove"&&(r||o===!0||i!==null&&Math.abs(o-f)>=i)&&(o=!0,s.preventDefault())}}function pi(t,e){return e.pointerType!=="mouse"&&t.state.inputType!=="touch"}function BE(t,e){const{state:n}=t,r=ba(e),i=r&&n.canvasLastInputClickKey===r&&Date.now()-(n.canvasLastInputClickTime||0)<750;return i&&(n.canvasLastInputClickKey=null,n.canvasLastInputClickTime=0),!!i}function zE(t,e){t.state.canvasLastInputClickKey=ba(e),t.state.canvasLastInputClickTime=Date.now()}function UE(){var t,e,n;return(n=(e=(t=fe.performance)==null?void 0:t.now)==null?void 0:e.call(t))!=null?n:Date.now()}function av(t,e=!1){return Array.isArray(t)&&t.length>=2&&t.every(n=>Number.isFinite(+n)&&(!e||+n>0))}function kE(t,e,n,r=!1){return t.slice(0,2).map((i,o)=>{const s=r?Math.exp(Math.log(+i)+(Math.log(+e[o])-Math.log(+i))*n):+i+(+e[o]-+i)*n;return i instanceof Date||e[o]instanceof Date?new Date(s):s})}function GE(t){return t.data.targets.reduce((e,n)=>e+n.values.length,0)}function XE(t){const{scale:e}=t,n=t.filterTargetsToShow(t.data.targets);["y","y2"].forEach(r=>{var i;(i=e[r])==null||i.domain(t.getYDomain(n,r))}),t.withSubchartTypeContext(()=>{var r,i;(r=e.subY)==null||r.domain(t.getYDomain(n,"y")),(i=e.subY2)==null||i.domain(t.getYDomain(n,"y2"))})}const WE={prepareCanvasConfig(){var t,e;const{config:n,state:r}=this;this.warnUnsupportedCanvasOptions(),(t=r.orgConfig)!=null&&t.transition&&Object.prototype.hasOwnProperty.call(r.orgConfig.transition,"duration")&&r.orgConfig.transition.duration&&jg("canvas mode: transition.duration is ignored; canvas redraws synchronously."),n.transition_duration=0,Qg(n.axis_x_type)||(n.axis_x_type="indexed"),Xs(n.axis_y_type)||(n.axis_y_type="indexed"),Xs(n.axis_y2_type)||(n.axis_y2_type="indexed"),(e=this.hasType)!=null&&e.call(this,"bubble")&&(n.point_show=!0,n.point_type="circle")},applyCanvasSubchartDomain(){const t=this,{axis:e,config:n,scale:r,state:i}=t;if(!n.subchart_show||!i.hasAxis||!r.subX)return;!i.rendered&&!i.domain&&n.subchart_init_range&&(i.domain=ru(t,n.subchart_init_range));const o=ru(t,i.domain);!o||!t.withinRange(o,t.getZoomDomain("subX",!0),t.getZoomDomain("subX"))||(i.domain=o,r.x.domain(o),e.x.scale(r.x))},setCanvasSubchartDomain(t,e=!0,n=!1){const r=this,{config:i,scale:o,state:s}=r,l=ru(r,t);if(!(!i.subchart_show||!l||!r.withinRange(l,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))))return s.domain=l,o.zoom=null,e&&r.redraw({withTransition:!1,withY:i.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),n&&i.subchart_onbrush.bind(r.api)(s.domain),s.domain},clearCanvasSubchartDomain(t=!0,e=!1){var n;const r=this,{axis:i,config:o,org:s,scale:l,state:c}=r;o.subchart_show&&(c.domain=void 0,l.zoom=null,(n=s.xDomain)!=null&&n.length&&(l.x.domain(s.xDomain),i.x.scale(l.x)),t&&r.redraw({withTransition:!1,withUpdateXDomain:!0,withUpdateOrgXDomain:!1,withY:o.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e&&o.subchart_onbrush.bind(r.api)(l.x.orgDomain()))},flushCanvasFlow(){var t,e;const{state:n}=this;n.canvasFlowFinish&&(n.canvasFlowFrame!==null&&((e=(t=fe).cancelAnimationFrame)==null||e.call(t,n.canvasFlowFrame)),n.canvasFlowFrame=null,n.canvasFlowFinish())},animateCanvasFlow(t){var e,n,r,i,o,s,l,c,u,f,d;const h=this,{axis:m,data:S,org:E,scale:C,state:w}=h,{done:N=()=>{},duration:z,length:$,orgDataCount:G}=t,V=(e=fe.requestAnimationFrame)==null?void 0:e.bind(fe),J=!!((n=m.isLog)!=null&&n.call(m,"x"));if(!V||!z||!$||!G||GE(h)>uE)return!1;const Q=C.x.domain().slice(0,2),rt=(i=(r=E.xDomain)==null?void 0:r.slice)==null?void 0:i.call(r),et=(c=(s=(o=C.subX)==null?void 0:o.domain)==null?void 0:(l=s.call(o)).slice)==null?void 0:c.call(l);if(!av(Q,J))return!1;const st=S.targets.map(Tt=>Tt.values.splice(0,$));h.updateXDomain(h.filterTargetsToShow(S.targets),!0,!0);const ct=C.x.domain().slice(0,2),dt=(f=(u=E.xDomain)==null?void 0:u.slice)==null?void 0:f.call(u);if(S.targets.forEach((Tt,Rt)=>{Tt.values.unshift(...st[Rt])}),!av(ct,J))return rt&&(E.xDomain=rt),C.x.domain(Q),et&&C.subX.domain(et),m.x.scale(C.x),!1;XE(h);let q=!1;const ft=UE(),lt=()=>{var Tt,Rt;q||(q=!0,S.targets.forEach(Ct=>{Ct.values.splice(0,$)}),dt&&(E.xDomain=dt),C.x.domain(ct),(Rt=(Tt=C.subX)==null?void 0:Tt.domain)==null||Rt.call(Tt,dt!=null?dt:ct),m.x.scale(C.x),w.dirty.data=!0,w._eventRectFingerprint=null,w.canvasShape=null,w._cachedDrawShape=null,h.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),h.updateTypesElements(),w.canvasFlowFrame=null,w.canvasFlowFinish=null,w.flowing=!1,N.call(h.api))},pt=Tt=>{const Rt=Math.min(1,Math.max(0,(Tt-ft)/z)),Ct=kE(Q,ct,Rt,J);C.x.domain(Ct),m.x.scale(C.x),w.canvasShape=null,w._cachedDrawShape=null,w._canvasVisibleRangeCache=null,w._canvasXTickValuesCache=null,h.renderCanvasFrame(void 0,null,!1),Rt<1?w.canvasFlowFrame=V(pt):lt()};return rt&&(E.xDomain=rt),C.x.domain(Q),et&&C.subX.domain(et),m.x.scale(C.x),w.flowing=!0,w.cancelClick=!0,(d=h.hideTooltip)==null||d.call(h),w.canvasFlowFinish=lt,w.canvasFlowFrame=V(pt),!0},initCanvas(){var t;const e=this,{config:n,state:r,$el:i}=e,o=i.chart.node();r.isCanvasMode=!0,r.canvasInlineStyle.minHeight=o.style.minHeight,fe.getComputedStyle(o).position==="static"&&i.chart.style("position","relative"),i.chart.style("min-height",`${r.current.height}px`),e.canvasEngine=new N0,e.canvasEngine.init(o,r.current.width,e.getCanvasSurfaceHeight()),i.canvas=Ut(e.canvasEngine.canvas),e.canvasTheme=new l1,e.canvasTheme.load(o,n.canvas_theme),e.canvasAxisRenderer=new L0(e.canvasEngine,e.canvasTheme),e.canvasRenderer=new KT(e.canvasEngine,e.canvasTheme),e.hitDetector=new h1,e.bindCanvasEvents(),n.zoom_enabled&&((t=e.bindZoomEvent)==null||t.call(e))},warnUnsupportedCanvasOptions(){var t,e,n,r;const{config:i}=this;[[!Qg(i.axis_x_type),"axis.x.type other than indexed/category/log/timeseries"],[!Xs(i.axis_y_type),"axis.y.type other than indexed/log/timeseries"],[!Xs(i.axis_y2_type),"axis.y2.type other than indexed/log/timeseries"],[i.boost_useCssRule,"boost.useCssRule"],[(t=this.hasArcType)==null?void 0:t.call(this),"arc charts"],[(e=this.hasType)==null?void 0:e.call(this,"radar"),"radar chart"],[(n=this.hasType)==null?void 0:n.call(this,"polar"),"polar chart"],[(r=this.hasType)==null?void 0:r.call(this,"funnel"),"funnel chart"]].forEach(([s,l])=>{s&&jg(`canvas mode: ${l} is not yet supported.`)})},bindCanvasEvents(){const t=this,{config:e,state:n,$el:r}=t,i=r.canvas.node(),o=$E(e),s=rv(e);i.addEventListener("mousemove",t.onCanvasMouseMove.bind(t)),i.addEventListener("mouseenter",l=>{var c;n.event=l,(c=e.onover)==null||c.bind(t.api)(l)}),i.addEventListener("mouseout",t.onCanvasMouseOut.bind(t)),i.addEventListener("mouseleave",l=>{var c;n.event=l,(c=e.onout)==null||c.bind(t.api)(l)}),i.addEventListener("mousedown",l=>{var c;(c=t.onCanvasSubchartBrushStart)!=null&&c.call(t,l)||t.onCanvasSelectionDragStart(l)}),i.addEventListener("click",t.onCanvasClick.bind(t)),i.addEventListener("pointerdown",t.onCanvasPointerDown.bind(t)),i.addEventListener("pointerenter",t.onCanvasPointerEnter.bind(t)),i.addEventListener("pointermove",t.onCanvasPointerMove.bind(t)),i.addEventListener("pointerup",t.onCanvasPointerUp.bind(t)),i.addEventListener("pointerleave",t.onCanvasPointerOut.bind(t)),i.addEventListener("pointercancel",t.onCanvasPointerCancel.bind(t)),NE(e)&&(i.addEventListener("touchstart",l=>{o(l),t.onCanvasTouchStart(l)},s),i.addEventListener("touchmove",l=>{o(l),t.onCanvasTouchMove(l)},s),i.addEventListener("touchend",t.onCanvasTouchEnd.bind(t),s),i.addEventListener("touchcancel",t.onCanvasTouchCancel.bind(t),s))},updateHtmlLegend(){var t,e;const n=this,{config:r,state:i,$el:o}=n,s=o.chart.node();if(!r.legend_show||i.hasTreemap){i.hasTreemap?((t=o.legend)==null||t.remove(),o.legend=null):(e=o.legend)==null||e.style("visibility","hidden"),i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0;return}const l=n.mapToIds(n.data.targets).filter(d=>r.data_names[d]!==null);if(r.legend_contents_bindto&&r.legend_contents_template){n.updateHtmlLegendTemplate(l)?(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0,i.legendHasRendered=!0):(i.legendItemWidth=0,i.legendItemHeight=0,i.legendStep=0);return}o.legend||(o.legend=Ut(s).append("div").classed(Be.legend,!0).classed(hr.legend,!0)),o.legend.style("visibility",null);const c=o.legend.selectAll(`button.${Be.legendItem}`).data(l,d=>d);c.exit().remove();const u=c.enter().append("button").attr("type","button").attr("data-id",d=>d);u.append("span").classed(Be.legendItemTile,!0),u.append("span").classed(hr.legendItemTitle,!0);const f=u.merge(c).attr("class",d=>n.generateClass(Be.legendItem,d).trim());Hg(n,f),f.select(`.${Be.legendItemTile}`).classed(hr.legendItemTileCircle,!r.legend_usePoint&&r.legend_item_tile_type==="circle").style("background-color",d=>r.legend_usePoint?null:n.color(d)).html(d=>r.legend_usePoint?gE(n,d):""),f.select(`.${hr.legendItemTitle}`).text(d=>Gs(n,d)),r.legend_tooltip&&f.attr("title",d=>Gs(n,d)),Jg(n,f),n.updateHtmlLegendSize(l),n.positionHtmlLegend(),i.legendHasRendered=!0},updateHtmlLegendTemplate(t){const e=this,{api:n,config:r,$el:i}=e,o=Ut(r.legend_contents_bindto),s=r.legend_contents_template,l=[];let c="";if(o.empty())return!1;t.forEach(f=>{const d=ue(s)?Yr(s.call(n,f,e.color(f),n.data(f)[0].values)):Da(s,{COLOR:e.color(f),TITLE:f});d&&(l.push(f),c+=d)});const u=o.html(c).classed(Be.legend,!0).classed(hr.legend,!1).style("visibility",null).selectAll(function(){return this.children}).data(l);return Hg(e,u),Jg(e,u),i.legend=o,!0},updateHtmlLegendSize(t){const e=this,{config:n,state:r,$el:i}=e,o=[],s={};let l=0,c=0,u=0;const f=n.legend_contents_bindto&&n.legend_contents_template;if(f)i.legend.selectAll(`.${Be.legendItem}`).each(function(d){const h=cn(this,!0),m=`${Gs(e,d)}`,S=Math.max(32,m.length*7+24),E=20,C=Math.ceil(h.width||S),w=Math.ceil(h.height||E);o.push(C),l=Math.max(l,C),c=Math.max(c,w)});else if(t.length){const d=r.isLegendRight||r.isLegendInset,h=n.legend_item_tile_type!=="circle",m={width:h?n.legend_item_tile_width:n.legend_item_tile_r*2,height:h?n.legend_item_tile_height:n.legend_item_tile_r*2},S={padding:{top:4,right:10},max:{width:0,height:0},posMin:10,step:0,tileWidth:m.width+5,totalLength:0},E={offsets:{},widths:{},heights:{},margins:[0],steps:{}},C=t.map((J,Q)=>{const rt=`${Gs(e,J)}`,et=AE(e,rt),st=Math.max(32,rt.length*7),ct=12,dt=Q===t.length-1,q=n.legend_show&&!e.isLegendToShow(J),ft=q?0:((et==null?void 0:et.width)||st)+S.tileWidth+(dt&&!d?0:S.padding.right)+n.legend_padding,lt=q?0:((et==null?void 0:et.height)||ct)+S.padding.top;return S.max.width=Math.max(S.max.width,ft),S.max.height=Math.max(S.max.height,lt),{id:J,hidden:q,width:ft,height:lt}}),w=d?e.getLegendHeight():e.getLegendWidth(),N=(J,Q,rt=!1)=>{let et;rt||(et=(w-S.totalLength-Q)/2,et<S.posMin&&(et=(w-Q)/2,S.totalLength=0,S.step++)),E.steps[J]=S.step,E.margins[S.step]=r.isLegendInset?10:et,E.offsets[J]=S.totalLength,S.totalLength+=Q};r.isLegendInset&&(S.step=n.legend_inset_step?n.legend_inset_step:t.length,r.legendStep=S.step),C.forEach(({id:J,hidden:Q,width:rt,height:et})=>{const st=n.legend_equally&&!Q?S.max.width:rt,ct=n.legend_equally&&!Q?S.max.height:et,dt=d?ct:st;if(E.widths[J]=st,E.heights[J]=ct,o.push(st),l=Math.max(l,st),c=Math.max(c,ct),Q){E.steps[J]=0,E.offsets[J]=0;return}N(J,dt)});const z=r.isLegendRight?J=>S.max.width*E.steps[J]:r.isLegendInset?J=>S.max.width*E.steps[J]+10:J=>E.margins[E.steps[J]]+E.offsets[J],$=r.isLegendRight||r.isLegendInset?J=>E.margins[E.steps[J]]+E.offsets[J]:J=>S.max.height*E.steps[J],G=4+m.width,V=9;C.forEach(({id:J,hidden:Q})=>{const rt=Q?0:z(J),et=Q?0:$(J);s[J]={item:{x:rt,y:et-5,width:E.widths[J],height:E.heights[J]},title:{x:G,y:0,height:E.heights[J]},tile:{x:-2,y:V-m.height/2,width:m.width,height:m.height}}}),u=S.step}if(!t.length){r.legendItemWidth=0,r.legendItemHeight=0,r.legendStep=0;return}if(f){const d=Math.max(1,r.current.width),h=10;let m=1,S=0;o.forEach(E=>{S&&S+h+E>d?(m++,S=E):S+=(S?h:0)+E}),r.legendStep=Math.max(0,m-1)}else r.legendStep=u;r.legendItemWidth=l,r.legendItemHeight=Math.max(12,c),f||i.legend.selectAll(`button.${Be.legendItem}`).each(function(d){const h=s[d],m=Ut(this);h&&(m.style("left",`${h.item.x}px`).style("top",`${h.item.y}px`).style("width",`${h.item.width}px`).style("height",`${h.item.height}px`),m.select(`.${hr.legendItemTitle}`).style("left",`${h.title.x}px`).style("top",`${h.title.y}px`).style("height",`${h.title.height}px`).style("line-height",`${h.title.height}px`),m.select(`.${Be.legendItemTile}`).style("left",`${h.tile.x}px`).style("top",`${h.tile.y}px`).style("width",`${h.tile.width}px`).style("height",`${h.tile.height}px`))})},getCanvasBottomLegendHeight(){var t;const e=this,{config:n,state:r,$el:i}=e;if(!n.legend_show||r.isLegendRight||r.isLegendInset||r.hasTreemap||!i.legend||!r.legendItemHeight)return 0;const o=cn(i.legend.node(),!0).height,s=r.legendItemHeight*(r.legendStep+1);return Math.ceil(Math.max(((t=e.getLegendHeight)==null?void 0:t.call(e))||0,o||s))},getCanvasSurfaceHeight(){const t=this;return Math.max(0,t.state.current.height-t.getCanvasBottomLegendHeight())},positionHtmlLegend(){var t;const e=this,{config:n,state:r,$el:i}=e,o=i.legend;if(o.classed(hr.legendBottom,!r.isLegendRight&&!r.isLegendInset).classed(hr.legendRight,r.isLegendRight).classed(hr.legendInset,r.isLegendInset).style("top",null).style("right",null).style("bottom",null).style("left",null).style("width",null).style("height",null).style("min-height",null),r.isLegendRight)o.style("top",`${r.margin3.top}px`).style("right","0").style("bottom",`${r.margin3.bottom}px`).style("width",`${Math.max(0,e.getLegendWidth())}px`);else if(r.isLegendInset){if(r.isLegendInset){const s=r.isLegendTop,l=r.isLegendLeft;o.style(s?"top":"bottom",`${n.legend_inset_y}px`).style(l?"left":"right",`${n.legend_inset_x}px`).style("width",`${Math.max(0,r.legendItemWidth*(r.legendStep+1)+20)}px`)}}else{const s=((t=e.getLegendHeight)==null?void 0:t.call(e))||0;o.style("top",`${Math.max(0,r.current.height-s)}px`).style("right","0").style("bottom","auto").style("left","0")}},getCanvasSelectedData(t){const e=this,n=e.state.canvasSelection,r=[];return!e.config.data_selection_enabled||!(n!=null&&n.size)||su(e,i=>{(!t||i.id===t)&&n.has(ba(i))&&r.push(i)}),r},setCanvasSelection(t=!1,e,n,r){var i;const o=this,{config:s,state:l}=o,c=l.canvasSelection,u=s.data_selection_grouped;let f=FE(e),d=!1;const h=t&&!s.data_selection_multiple;let m=!h;if(s.data_selection_enabled){if(h&&(n=n!=null&&n.length?[n[0]]:[0],!u))if(f)f=f.slice(0,1);else{const[S]=o.filterTargetsToShow(o.data.targets);f=S?[S.id]:[]}su(o,S=>{const E=ba(S),C=u||!f||f.indexOf(S.id)>=0,w=!n||n.indexOf(S.index)>=0,N=c.has(E);if(t)if(C&&w&&(!N||h)){if(m||(o.setCanvasSelection(!1),m=!0),c.has(E))return;c.add(E),$e(s.data_onselected,o.api,S,o.canvasEngine.canvas),d=!0}else(!h||m)&&r&&N&&(c.delete(E),$e(s.data_onunselected,o.api,S,o.canvasEngine.canvas),d=!0);else C&&w&&N&&(c.delete(E),$e(s.data_onunselected,o.api,S,o.canvasEngine.canvas),d=!0)}),d&&((i=o.renderCanvasFrame)==null||i.call(o,void 0,null,!1))}},toggleCanvasSelection(t){var e;const n=this,{config:r,state:i}=n,o=i.canvasSelection;let s=!1;r.data_selection_enabled&&(t.filter(l=>ou(n,l)).forEach(l=>{const c=ba(l),u=o.has(c);r.data_selection_multiple||su(n,f=>{const d=ba(f);(r.data_selection_grouped?f.id===l.id:d!==c)&&o.has(d)&&(o.delete(d),$e(r.data_onunselected,n.api,f,n.canvasEngine.canvas),s=!0)}),u&&o.has(c)?(o.delete(c),$e(r.data_onunselected,n.api,l,n.canvasEngine.canvas)):(o.add(c),$e(r.data_onselected,n.api,l,n.canvasEngine.canvas)),s=!0}),s&&((e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1)))},canStartCanvasSelectionDrag(t){const e=this,{config:n}=e,r=t;return!!(n.interaction_enabled&&n.data_selection_enabled&&n.data_selection_draggable&&n.data_selection_multiple&&!n.zoom_enabled&&(r.button===void 0||r.button===0))},getCanvasSelectionDragData(t){const e=this,{config:n}=e,r=e.hitDetector.findInRect(t,n.data_selection_grouped);if(!n.data_selection_grouped)return r;const i=new Set(r.map(o=>o.index));return e.filterTargetsToShow(e.data.targets).flatMap(o=>o.values.filter(s=>i.has(s.index)))},startCanvasSelectionDrag(t){var e,n;const r=this,{state:i}=r,o=ho(r,t);return!o||!r.canStartCanvasSelectionDrag(t)?!1:(i.dragStart=o,i.canvasSelectionDragStart=o,i.canvasSelectionDragIncluded=new Set,i.canvasSelectionDragging=!0,i.canvasSelectionDragMoved=!1,ks.set(r,new Map),r.setDragStatus(!0),(e=r.hideTooltip)==null||e.call(r),(n=t.preventDefault)==null||n.call(t),!0)},updateCanvasSelectionDrag(t){var e;const n=this,{config:r,state:i}=n,o=i.canvasSelectionDragStart,s=ho(n,t);if(!i.canvasSelectionDragging||!o||!s)return!1;const[l,c]=o,[u,f]=s,d=Math.min(l,u),h=Math.max(l,u),m=r.data_selection_grouped?i.margin.top:Math.min(c,f),S=r.data_selection_grouped?i.margin.top+i.height:Math.max(c,f),E={x:d,y:m,w:h-d,h:S-m},C=Math.abs(u-l)>4||Math.abs(f-c)>4;if(i.canvasSelectionDragMoved=i.canvasSelectionDragMoved||C,C){const{included:w,rows:N}=DE(n,n.getCanvasSelectionDragData(E));N.length&&n.toggleCanvasSelection(N),i.canvasSelectionDragIncluded=w,i.cancelClick=!0}return n.renderCanvasSelectionDrag(E),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSelectionDrag(t){var e;const n=this,{state:r}=n;return r.canvasSelectionDragging?(n.updateCanvasSelectionDrag(t),r.cancelClick=r.cancelClick||r.canvasSelectionDragMoved,r.dragStart=null,r.canvasSelectionDragStart=null,r.canvasSelectionDragIncluded=new Set,r.canvasSelectionDragging=!1,r.canvasSelectionDragMoved=!1,ks.delete(n),n.setDragStatus(!1),n.clearCanvasFocus(),(e=t.preventDefault)==null||e.call(t),!0):!1},dispatchCanvasDataOut(t){const e=this,{config:n,state:r}=e,i=r.canvasDataHover;i&&(r.canvasDataHover=null,r.canvasDataHoverKey=null,n.interaction_enabled&&$e(n.data_onout,e.api,i,t))},dispatchCanvasDataOver(t,e){const n=this,{config:r,state:i}=n,o=ba(t);i.canvasDataHoverKey!==o&&(n.dispatchCanvasDataOut(e),i.canvasDataHover=t,i.canvasDataHoverKey=o,r.interaction_enabled&&t&&$e(r.data_onover,n.api,t,e))},dispatchCanvasDataClick(t,e=!1){var n;const r=this,{config:i,$el:o}=r,s=o.canvas.node(),l=CE(r,t,!0);if(!l||BE(r,l))return l;if(i.interaction_enabled){const c=i.data_selection_grouped?r.filterTargetsToShow(r.data.targets).map(u=>u.values[l.index]).filter(Boolean):[l];(n=r.toggleCanvasSelection)==null||n.call(r,c),c.forEach(u=>$e(i.data_onclick,r.api,u,s)),e&&zE(r,l)}return l},updateCanvasSubchartBrush(t){var e,n;const r=this,{config:i,state:o}=r,s=o.canvasSubchartBrushStart,l=o.canvasSubchartBrushOrigin,c=o.canvasSubchartBrushMode,u=au(r,t,!0);if(i.subchart_brush_enabled===!1||!o.canvasSubchartBrushDragging||s===null||u===null||!c)return!1;const f=u-s;if(Math.abs(f)>cE&&(o.canvasSubchartBrushMoved=!0),!o.canvasSubchartBrushMoved)return(e=t.preventDefault)==null||e.call(t),!0;let d;if(c==="move"&&l){const[m,S]=Ws(r),E=l[1]-l[0];let C=l[0]+f,w=l[1]+f;C<m&&(w+=m-C,C=m),w>S&&(C-=w-S,w=S),d=[Math.max(m,Math.min(S-E,C)),Math.min(S,Math.max(m+E,w))]}else c==="resize-start"&&l?d=iu(r,u,l[1]):c==="resize-end"&&l?d=iu(r,l[0],u):d=iu(r,s,u);const h=ME(r,d[0],d[1]);return r.setCanvasSubchartDomain(h,!0),o.cancelClick=!0,(n=t.preventDefault)==null||n.call(t),!0},updateCanvasSubchartCursor(t){const e=this,n=e.$el.canvas.node();if(e.config.subchart_brush_enabled===!1)return n.style.cursor="",!1;const r=au(e,t);if(r===null)return n.style.cursor="",!1;const i=ev(e,r);return n.style.cursor=LE(e,i),!0},startCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;if(n.config.subchart_brush_enabled===!1)return!1;const i=au(n,t);if(i===null)return!1;const o=ev(n,i);return r.event=t,r.canvasSubchartBrushDragging=!0,r.canvasSubchartBrushMode=o,r.canvasSubchartBrushStart=i,r.canvasSubchartBrushOrigin=tv(n),r.canvasSubchartBrushMoved=!1,r.cancelClick=!0,n.setDragStatus(!0),(e=t.preventDefault)==null||e.call(t),!0},endCanvasSubchartBrush(t){var e,n,r;const i=this,{state:o}=i;if(!o.canvasSubchartBrushDragging)return!1;i.updateCanvasSubchartBrush(t);const s=o.canvasSubchartBrushMode==="select"&&!o.canvasSubchartBrushMoved,l=o.canvasSubchartBrushMoved||s;return s?(e=i.clearCanvasSubchartDomain)==null||e.call(i,!0,!0):l&&i.config.subchart_onbrush.bind(i.api)((n=o.domain)!=null?n:i.scale.x.orgDomain()),o.canvasSubchartBrushDragging=!1,o.canvasSubchartBrushMode=null,o.canvasSubchartBrushStart=null,o.canvasSubchartBrushOrigin=null,o.canvasSubchartBrushMoved=!1,i.setDragStatus(!1),(r=t.preventDefault)==null||r.call(t),!0},cancelCanvasSubchartBrush(t){var e;const n=this,{state:r}=n;return r.canvasSubchartBrushDragging?(r.canvasSubchartBrushDragging=!1,r.canvasSubchartBrushMode=null,r.canvasSubchartBrushStart=null,r.canvasSubchartBrushOrigin=null,r.canvasSubchartBrushMoved=!1,n.setDragStatus(!1),(e=t.preventDefault)==null||e.call(t),!0):!1},onCanvasSubchartBrushStart(t){const e=this;if(!e.startCanvasSubchartBrush(t))return!1;const n=i=>{e.updateCanvasSubchartBrush(i)},r=i=>{e.endCanvasSubchartBrush(i),fe.removeEventListener("mousemove",n),fe.removeEventListener("mouseup",r)};return fe.addEventListener("mousemove",n),fe.addEventListener("mouseup",r),!0},onCanvasClick(t){var e;const n=this,{config:r,state:i}=n;if(i.event=t,i.flowing||i.cancelClick){i.cancelClick=!1;return}n.dispatchCanvasDataClick(t),(e=r.onclick)==null||e.bind(n.api)(t)},onCanvasSelectionDragStart(t){const e=this,{state:n}=e;if(!e.startCanvasSelectionDrag(t))return;const r=o=>{e.updateCanvasSelectionDrag(o)},i=o=>{e.endCanvasSelectionDrag(o),fe.removeEventListener("mousemove",r),fe.removeEventListener("mouseup",i),n.canvasSelectionDragMoveHandler=null,n.canvasSelectionDragEndHandler=null};n.canvasSelectionDragMoveHandler=r,n.canvasSelectionDragEndHandler=i,fe.addEventListener("mousemove",r),fe.addEventListener("mouseup",i)},onCanvasPointerDown(t){var e;if(!pi(this,t))return;const n=this,r=n.$el.canvas.node();if(!n.startCanvasSubchartBrush(t))return;const i=t.pointerId,o=f=>f.pointerId===i,s=f=>{o(f)&&n.updateCanvasSubchartBrush(f)},l=f=>{o(f)&&(n.endCanvasSubchartBrush(f),u())},c=f=>{o(f)&&(n.cancelCanvasSubchartBrush(f),u())};function u(){var f;fe.removeEventListener("pointermove",s),fe.removeEventListener("pointerup",l),fe.removeEventListener("pointercancel",c);try{(f=r.releasePointerCapture)==null||f.call(r,i)}catch(d){}}try{(e=r.setPointerCapture)==null||e.call(r,i)}catch(f){}fe.addEventListener("pointermove",s),fe.addEventListener("pointerup",l),fe.addEventListener("pointercancel",c)},onCanvasPointerEnter(t){var e;pi(this,t)&&(this.state.event=t,(e=this.config.onover)==null||e.bind(this.api)(t))},onCanvasPointerMove(t){pi(this,t)&&(this.updateCanvasSubchartBrush(t)||this.onCanvasMouseMove(t))},onCanvasPointerUp(t){var e;if(pi(this,t)){if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node())}},onCanvasPointerOut(t){var e;pi(this,t)&&(this.state.canvasSubchartBrushDragging||(this.state.event=t,this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)))},onCanvasPointerCancel(t){var e;if(pi(this,t)){if(this.state.event=t,this.cancelCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}this.onCanvasPointerOut(t)}},onCanvasTouchStart(t){var e;t.touches.length>1||(this.state.event=t,!this.startCanvasSubchartBrush(t)&&(this.startCanvasSelectionDrag(t)||((e=this.config.onover)==null||e.bind(this.api)(t),this.onCanvasMouseMove(t))))},onCanvasTouchMove(t){t.touches.length>1||this.updateCanvasSubchartBrush(t)||this.updateCanvasSelectionDrag(t)||this.onCanvasMouseMove(t)},onCanvasTouchEnd(t){var e,n,r;if(this.state.event=t,this.endCanvasSubchartBrush(t)){(e=this.config.onout)==null||e.bind(this.api)(t);return}if(this.endCanvasSelectionDrag(t)){(n=this.config.onout)==null||n.bind(this.api)(t);return}this.dispatchCanvasDataClick(t,!0),this.dispatchCanvasDataOut(this.$el.canvas.node()),(r=this.config.onout)==null||r.bind(this.api)(t)},onCanvasTouchCancel(t){var e;this.state.event=t,this.cancelCanvasSubchartBrush(t),this.endCanvasSelectionDrag(t),this.onCanvasMouseOut(),(e=this.config.onout)==null||e.bind(this.api)(t)},onCanvasMouseMove(t){var e,n,r,i,o;const s=this,{config:l,state:c,$el:u}=s,f=u.canvas.node();if(c.event=t,c.flowing||c.canvasSelectionDragging)return;if((e=s.updateCanvasSubchartCursor)!=null&&e.call(s,t)){s.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,s.clearCanvasFocus()),(n=s.hideTooltip)==null||n.call(s);return}const d=ho(s,t),h=d&&(PE(s,d)||d),m=h?wE(s,h):null;if(!m){if(s.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,s.clearCanvasFocus()),d&&l.axis_tooltip&&RE(s,d)){s.renderCanvasAxisTooltip(d),(r=s.hideTooltip)==null||r.call(s);return}(i=s.hideTooltip)==null||i.call(s);return}s.dispatchCanvasDataOver(m,f);const S=_g(s,m),E=OE(s,m,S),C=E.map(w=>`${w.id}:${w.index}`).join("|");(c.canvasFocusKey!==C||l.axis_tooltip)&&(c.canvasFocusKey=C,s.renderCanvasFocus(E,h)),(o=s.showTooltip)==null||o.call(s,S,f)},onCanvasMouseOut(){var t;const e=this.$el.canvas.node();e.style.cursor="",this.dispatchCanvasDataOut(e),this.state.canvasFocusKey?(this.state.canvasFocusKey=null,this.clearCanvasFocus()):this.config.axis_tooltip&&this.clearCanvasFocus(),(t=this.hideTooltip)==null||t.call(this)},showCanvasLinkedTooltip(t){var e,n,r,i;const o=this,{$el:s,state:l}=o,c=(e=s.canvas)==null?void 0:e.node(),f=o.filterTargetsToShow(o.data.targets).map(w=>w.values[t]).find(Boolean);if(!c||!f)return(n=o.hideTooltip)==null||n.call(o),!1;const d=_g(o,f),h=d.find(w=>w&&In(o,w))||d[0];if(!d.length||!h)return(r=o.hideTooltip)==null||r.call(o),!1;const{left:m,top:S}=cn(c,!0),E=Hi(o,h),C=[l.margin.left+E.x,l.margin.top+E.y];return l.event={clientX:m+C[0],clientY:S+C[1],currentTarget:c,target:c},l.canvasFocusKey=d.map(w=>`${w.id}:${w.index}`).join("|"),o.renderCanvasFocus(d,C),(i=o.showTooltip)==null||i.call(o,d,c),!0},renderCanvasZoomBrush(t,e){const n=this;n.canvasEngine.withOverlay(r=>{n.canvasRenderer.withContext(r,()=>{n.canvasRenderer.drawZoomBrush(n,t,e)})})},clearCanvasZoomBrush(){this.canvasEngine.clearOverlay()},renderCanvasSelectionDrag(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasRenderer.withContext(n,()=>{e.canvasRenderer.drawSelectionDragArea(e,t)})})},renderCanvasFrame(t,e,n=!1){const r=this,{state:i}=r,o=t||i.canvasShape||r.getDrawShape();i.canvasShape=o,i._canvasVisibleRangeCache=null,i._canvasXTickValuesCache=null,r.canvasEngine.beginFrame(i.current.width,r.getCanvasSurfaceHeight());try{r.canvasRenderer.drawBackground(r),r.canvasAxisRenderer.drawTitle(r),i.hasAxis&&r.canvasAxisRenderer.draw(r),r.canvasRenderer.draw(r,o),i.hasAxis&&r.config.grid_lines_front&&r.canvasAxisRenderer.drawGridLines(r),r.canvasRenderer.drawSubchart(r,o),i.hasAxis&&r.canvasAxisRenderer.drawSubXAxis(r),i.hasAxis&&r.canvasAxisRenderer.drawSubYAxes(r),r.canvasRenderer.drawEmptyLabel(r),n&&r.hitDetector.rebuild(r,o)}finally{r.canvasEngine.endFrame()}r.canvasEngine.clearOverlay(),i.canvasFocusMainRedraw=!1,e&&r.renderCanvasFocus(e)},renderCanvasFocus(t,e){var n,r;const i=this,{state:o}=i,s=(r=(n=i.canvasRenderer).hasExpandedShapeFocus)==null?void 0:r.call(n,i,t);if(s){const l=o.canvasShape||i.getDrawShape();i.canvasEngine.beginFrame(o.current.width,i.getCanvasSurfaceHeight());try{i.canvasRenderer.drawBackground(i),i.canvasAxisRenderer.drawTitle(i),o.hasAxis&&i.canvasAxisRenderer.draw(i),i.canvasRenderer.draw(i,l,t),o.hasAxis&&i.config.grid_lines_front&&i.canvasAxisRenderer.drawGridLines(i),i.canvasRenderer.drawSubchart(i,l),o.hasAxis&&i.canvasAxisRenderer.drawSubXAxis(i),o.hasAxis&&i.canvasAxisRenderer.drawSubYAxes(i),i.canvasRenderer.drawEmptyLabel(i)}finally{i.canvasEngine.endFrame()}}o.canvasFocusMainRedraw=!!s,i.canvasEngine.withOverlay(l=>{i.canvasRenderer.withContext(l,()=>{i.canvasRenderer.drawFocus(i,t)}),i.canvasAxisRenderer.withContext(l,()=>{i.canvasAxisRenderer.drawFocusedXAxisTick(i,t),e&&i.canvasAxisRenderer.drawAxisTooltip(i,e)})})},renderCanvasAxisTooltip(t){const e=this;e.canvasEngine.withOverlay(n=>{e.canvasAxisRenderer.withContext(n,()=>{e.canvasAxisRenderer.drawAxisTooltip(e,t)})})},clearCanvasFocus(){var t;const e=this;e.state.canvasFocusMainRedraw?(e.state.canvasFocusMainRedraw=!1,e.renderCanvasFrame(void 0,null,!1)):(t=e.canvasEngine)==null||t.clearOverlay()},resizeCanvas(){var t,e;const n=this,{config:r,state:i,$el:o}=n,s=o.chart.node();o.chart.style("min-height",`${i.current.height}px`),(t=n.canvasEngine)==null||t.resize(i.current.width,n.getCanvasSurfaceHeight()),(e=n.canvasTheme)==null||e.reload(s,r.canvas_theme)}};let iv=()=>(bn(Ir.prototype,WE),(iv=()=>"canvas")());var ov={category(t,e){const n=this.internal,{config:r}=n;return arguments.length>1&&(r.axis_x_categories[t]=e,n.state.dirty.data=!0,n.redraw()),r.axis_x_categories[t]},categories(t){const e=this.internal,{config:n}=e;if(!t||!Array.isArray(t)){const r=n.axis_x_categories;return dr(r)?Object.values(e.data.xs)[0]:r}return n.axis_x_categories=t,e.state.dirty.data=!0,e.redraw(),n.axis_x_categories}};function VE(t){const e=this.config;let n,r,i;const o=()=>{const s=r.shift();if(s&&n&&qn(n)&&s in n)return n=n[s],o();if(!s)return n};Object.keys(e).forEach(s=>{n=t,r=s.split("_"),i=o(),on(i)&&(e[s]=i)}),this.api&&(this.state.orgConfig=t)}var jE={resize(t){const e=this.internal,{config:n,state:r}=e;r.rendered&&(n.size_width=t?t.width:null,n.size_height=t?t.height:null,r.resizing=!0,r.dirty.size=!0,this.flush(!1),e.resizeFunction())},flush(t){var e,n;const r=this.internal,{state:i,$el:{zoomResetBtn:o}}=r;i.rendered?(i.resizing?(e=r.brush)==null||e.updateResize():(n=r.axis)==null||n.setOrient(),o==null||o.style("display","none"),r.scale.zoom&&(i.current.zoomDomain=r.scale.zoom.domain()),r.scale.zoom=null,i.resizing||(i.dirty.data=!0),t?r.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):r.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1}),!i.resizing&&r.brush&&(r.brush.getSelection().call(r.brush.move),r.unselectRect()),i.current.zoomDomain&&(r.api.zoom(i.current.zoomDomain),i.current.zoomDomain=null)):r.initToRender(!0)},destroy(){var t,e,n,r,i,o,s,l,c,u;const f=this.internal,{state:d,$el:{chart:h,style:m,svg:S}}=f;if(pn(f)){f.callPluginHook("$willDestroy"),(t=f.cache)==null||t.remove(["setOverOut","callOverOutForTouch"]),f.charts.splice(f.charts.indexOf(this),1),f.charts.length===0&&nb(),f.unbindAllEvents(),S==null||S.select("*").interrupt(),d.canvasFlowFrame!==null&&((n=(e=fe).cancelAnimationFrame)==null||n.call(e,d.canvasFlowFrame)),d.canvasFlowFrame=null,d.canvasFlowFinish=null,d.pendingRaf!==null&&((i=(r=fe).cancelAnimationFrame)==null||i.call(r,d.pendingRaf)),d.pendingRaf=null,(o=f.canvasRenderer)==null||o.destroy(),(s=f.canvasEngine)==null||s.destroy(),(l=f.resizeFunction)==null||l.clear(),(u=(c=f.resizeFunction)==null?void 0:c.resizeObserver)==null||u.disconnect(),f.resizeFunction&&fe.removeEventListener("resize",f.resizeFunction),h.classed("bb",!1).style("position",null),d.isCanvasMode&&h.style("min-height",d.canvasInlineStyle.minHeight||null),h.selectChildren().remove(),m&&m.parentNode.removeChild(m),Object.keys(this).forEach(E=>{E==="internal"&&Object.keys(f).forEach(C=>{f[C]=null}),this[E]=null,delete this[E]});for(const E in this)this[E]=()=>{}}return null},config(t,e,n){const r=this.internal,{config:i,state:o}=r,s=t==null?void 0:t.replace(/\./g,"_");let l;return t&&s in i?on(e)?(i[s]=e,l=e,n&&this.flush()):l=i[s]:(arguments.length===0||dr(t))&&(l=o.orgConfig),l}},HE={color(t){return this.internal.color(t)}};const sv=function(t){const{targets:e}=this.internal.data;if(!Tn(t)){const n=en(t)?t:[t];return e.filter(r=>n.some(i=>i===r.id))}return e};bn(sv,{shown:function(t){return this.internal.filterTargetsToShow(this.data(t))},values:function(t,e=!0){let n=null;if(t){const r=this.data(t);en(r)&&(n=[],r.forEach(i=>{const o=i.values.map(s=>s.value);e?n=n.concat(o):n.push(o)}))}return n},names:function(t){return this.internal.updateDataAttributes("names",t)},colors:function(t){return this.internal.updateDataAttributes("colors",t)},axes:function(t){return this.internal.updateDataAttributes("axes",t)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}});var YE={data:sv},KE={focus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const s=i.filter(n.isTargetToShow,n),l=new Set(s),c=n.mapToTargetIds().filter(u=>!l.has(u)&&n.isTargetToShow(u));n.revertLegend(),n.toggleFocusLegend(c,!1),n.toggleFocusLegend(s,!0),r.focusedTargetIds=l,r.defocusedTargetIds=new Set(c),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}const o=n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n)));this.revert(),this.defocus(),o.classed(nn.focused,!0).classed(nn.defocused,!1),n.hasArcType()&&!r.hasRadar&&(n.expandArc(i),n.hasType("gauge")&&n.markOverlapped(t,n,`.${cr.gaugeValue}`)),n.toggleFocusLegend(i,!0),r.focusedTargetIds=new Set(i),i.forEach(s=>r.defocusedTargetIds.delete(s))},defocus(t){var e;const n=this.internal,{state:r}=n,i=n.mapToTargetIds(t);if(r.isCanvasMode){const s=i.filter(n.isTargetToShow,n);n.toggleFocusLegend(s,!1),s.forEach(l=>r.focusedTargetIds.delete(l)),r.defocusedTargetIds=new Set(s),(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1);return}n.$el.svg.selectAll(n.selectorTargets(i.filter(n.isTargetToShow,n))).classed(nn.focused,!1).classed(nn.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(i),n.hasType("gauge")&&n.undoMarkOverlapped(n,`.${cr.gaugeValue}`)),n.toggleFocusLegend(i,!1),i.forEach(s=>r.focusedTargetIds.delete(s)),r.defocusedTargetIds=new Set(i)},revert(t){var e,n,r;const i=this.internal,{config:o,state:s,$el:l}=i,c=i.mapToTargetIds(t),u=()=>{o.legend_show&&(i.showLegend(c.filter(i.isLegendToShow.bind(i))),l.legend.selectAll(i.selectorLegends(c)).filter(function(){return Ut(this).classed(nn.legendItemFocused)}).classed(nn.legendItemFocused,!1))};if(s.isCanvasMode){const d=!!((e=s.focusedTargetIds)!=null&&e.size)||!!((n=s.defocusedTargetIds)!=null&&n.size);u(),s.focusedTargetIds=new Set,s.defocusedTargetIds=new Set,d&&((r=i.renderCanvasFrame)==null||r.call(i,void 0,null,!1));return}l.svg.selectAll(i.selectorTargets(c)).classed(nn.focused,!1).classed(nn.defocused,!1),i.hasArcType(null,["polar"])&&i.unexpandArc(c),u(),s.focusedTargetIds=new Set,s.defocusedTargetIds=new Set}},ZE={legend:{show:function(t){const e=this.internal;e.showLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})},hide:function(t){const e=this.internal;e.hideLegend(e.mapToTargetIds(t)),e.updateAndRedraw({withLegend:!0})}}},JE={load(t){const e=this.internal,{config:n}=e;e.state.dirty.data=!0,e.state._eventRectFingerprint=null,t.xs&&e.addXs(t.xs),"names"in t&&this.data.names(t.names),"classes"in t&&Object.keys(t.classes).forEach(o=>{n.data_classes[o]=t.classes[o]}),"categories"in t&&e.axis.isCategorized()&&(n.axis_x_categories=t.categories),"axes"in t&&Object.keys(t.axes).forEach(o=>{n.data_axes[o]=t.axes[o]}),"colors"in t&&Object.keys(t.colors).forEach(o=>{n.data_colors[o]=t.colors[o]}),"regions"in t&&(n.data_regions=t.regions||{});const r=["data","columns","rows","json","url"].some(o=>o in t),i="unload"in t&&t.unload!==!1;if("regions"in t&&!r&&!i){e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),ms.call(e,t.done,t.resizeAfter);return}if(i){const o=e.mapToTargetIds(t.unload===!0?null:t.unload);e.unload(o,()=>{!e.config||!e.cache||(e.cache.remove(o),Mf(()=>e.loadFromArgs(t)))})}else e.loadFromArgs(t)},unload(t){const e=this.internal;let n=t||{};dr(n)&&this.tooltip.hide(),en(n)?n={ids:n}:Ye(n)&&(n={ids:[n]});const r=e.mapToTargetIds(n.ids);e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.unload(r,()=>{!e.config||!e.cache||(e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),e.cache.remove(r),ms.call(e,n.done,n.resizeAfter))})}};function Vs(t,e,n,r=!1){var i;const o=this.internal,s=o.mapToTargetIds(e),l=new Set(s),c=[...o.state.hiddenTargetIds].filter(d=>l.has(d));if(o.state.toggling=!0,o.state.dirty.visibility=!0,o[`${t?"remove":"add"}HiddenTargetIds`](s),o.state.isCanvasMode){t&&c.length?$e(o.config.data_onshown,this,c):!t&&c.length===0&&$e((i=o.config)==null?void 0:i.data_onhidden,this,s),r||o.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.state.toggling=!1;return}const u=o.$el.svg.selectAll(o.selectorTargets(s)),f=t?null:"0";t&&c.length&&(u.style("display",null),$e(o.config.data_onshown,this,c)),o.$T(u).style("opacity",f,"important").call(Zo,()=>{var d;!t&&c.length===0&&(u.style("display","none"),$e((d=o.config)==null?void 0:d.data_onhidden,this,s)),u.style("opacity",f)}),n.withLegend&&o[`${t?"show":"hide"}Legend`](s),r||o.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),o.state.toggling=!1}var QE={show(t,e={}){Vs.call(this,!0,t,e)},hide(t,e={}){Vs.call(this,!1,t,e)},toggle(t,e={}){const n=this.internal,r={show:[],hide:[]};n.mapToTargetIds(t).forEach(i=>r[n.isTargetToShow(i)?"hide":"show"].push(i)),r.show.length&&r.hide.length?(Vs.call(this,!0,r.show,e,!0),Vs.call(this,!1,r.hide,e)):(r.show.length&&this.show(r.show,e),r.hide.length&&this.hide(r.hide,e))}},_E={tooltip:{show:function(t){var e,n,r,i,o,s,l,c,u,f,d,h;const m=this.internal,{$el:S,config:E,state:{eventReceiver:C,hasFunnel:w,hasTreemap:N,inputType:z}}=m;let $,G;if(t.mouse&&(G=t.mouse),t.data){const{data:V}=t,J=(e=m.getYScaleById(V.id))==null?void 0:e(V.value);if((w||N)&&V.id){const Q=m.selectorTarget(V.id,void 0,`.${An.shape}`);C.rect=S.main.select(Q)}else m.isMultipleX()?G=[m.xx(V),J]:(E.tooltip_grouped||(G=[0,J]),$=(r=V.index)!=null?r:m.hasArcType()&&V.id?(n=m.getArcElementByIdOrIndex(V.id))==null?void 0:n.datum().index:m.getIndexByX(V.x))}else on(t.x)?$=m.getIndexByX(t.x):on(t.index)&&($=t.index);if(m.state.isCanvasMode){const V=((i=m.filterTargetsToShow)==null?void 0:i.call(m))||m.data.targets,J=(o=t.data)!=null&&o.id&&!E.tooltip_grouped?V.filter(ct=>ct.id===t.data.id).map(ct=>ct.values[$!=null?$:t.data.index]).filter(Boolean):V.map(ct=>ct.values[$]).filter(Boolean),Q=(l=(s=S.canvas)==null?void 0:s.node)==null?void 0:l.call(s),rt=m.state.canvasShape||((c=m.getDrawShape)==null?void 0:c.call(m)),et=J[0],st=G||(et&&((u=rt==null?void 0:rt.pos)!=null&&u.cx)&&((f=rt==null?void 0:rt.pos)!=null&&f.cy)?[m.state.margin.left+rt.pos.cx(et),m.state.margin.top+rt.pos.cy(et)]:void 0);if(!J.length||!Q)return;m.state.canvasFocusKey=J.map(ct=>`${ct.id}:${ct.index}`).join("|"),(d=m.renderCanvasFocus)==null||d.call(m,J,st),(h=m.showTooltip)==null||h.call(m,J,Q);return}(z==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(V=>{m.dispatchEvent(V,$,G)})},hide:function(){var t,e,n,r,i;const o=this.internal,{state:{inputType:s,isCanvasMode:l},$el:{tooltip:c}}=o,u=c==null?void 0:c.datum();if(l){o.state.canvasFocusKey=null,o.hideTooltip(!0),(t=o.clearCanvasFocus)==null||t.call(o);return}if((e=u==null?void 0:u.data)!=null&&e[0]){const{index:f}=u.data[0];(s==="mouse"?["mouseout"]:["touchend"]).forEach(d=>{o.dispatchEvent(d,f)})}s==="touch"&&o.callOverOutForTouch(),o.hideTooltip(!0),(n=o.hideGridFocus)==null||n.call(o),(r=o.unexpandCircles)==null||r.call(o),(i=o.expandBarTypeShapes)==null||i.call(o,!1)}}},qE=Object.defineProperty,tC=(t,e,n)=>e in t?qE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lv=(t,e,n)=>tC(t,typeof e!="symbol"?e+"":e,n);class Jn{constructor(e){lv(this,"plugins",[]),lv(this,"internal");const n=new Ir(this);this.internal=n,(function r(i,o,s){Object.keys(i).forEach(l=>{const c=ue(i[l]),u=o!==s,f=pn(i[l]),d=f&&Object.keys(i[l]).length>0;c&&(!u&&d||u)?o[l]=i[l].bind(s):f&&!c?o[l]={}:o[l]=i[l],d&&r(i[l],o[l],s)})})(Jn.prototype,this,this),VE.call(n,e),n.beforeInit(),n.init()}}bn(Jn.prototype,[jE,HE,YE,KE,ZE,JE,QE,_E]);let cv=()=>(Jn.prototype.category=ov.category,Jn.prototype.categories=ov.categories,(cv=()=>({}))());const eC=t=>{var e,n;return(n=(e=fe).btoa)==null?void 0:n.call(e,encodeURIComponent(t).replace(/%([0-9A-F]{2})/g,(r,i)=>String.fromCharCode(+`0x${i}`)))};function nC(t,e,n){const{width:r,height:i}=e||n,o=new XMLSerializer,s=t.cloneNode(!0),l=G1(La(Ze.styleSheets)).filter(h=>h.cssText).map(h=>h.cssText);s.setAttribute("xmlns",Jt.xhtml),s.style.margin="0",s.style.padding="0",e.preserveFontStyle&&s.querySelectorAll("text").forEach(h=>{h.innerHTML=""});const c=o.serializeToString(s),u=Ze.createElement("style");u.appendChild(Ze.createTextNode(l.join(`
|
|
52
|
+
`)));const f=o.serializeToString(u),d=`<svg xmlns="${Jt.svg}" width="${r}" height="${i}"
|
|
58
53
|
viewBox="0 0 ${n.width} ${n.height}"
|
|
59
54
|
preserveAspectRatio="${(e==null?void 0:e.preserveAspectRatio)===!1?"none":"xMinYMid meet"}">
|
|
60
55
|
<foreignObject width="100%" height="100%">
|
|
61
56
|
${f}
|
|
62
57
|
${c.replace(/(url\()[^#]+/g,"$1")}
|
|
63
|
-
</foreignObject></svg>`;return`data:image/svg+xml;base64,${xE(d)}`}function TE(t,e){const{top:n,left:r}=e,{x:i,y:o}=ga(t,!0),{a:s,b:l,c,d:u,e:f,f:d}=t.getScreenCTM(),{width:h,height:m}=un(t,!0);return{x:s*i+c*o+f-r,y:l*i+u*o+d-n+(m-Math.round(m/4)),width:h,height:m}}function bE(t){const{left:e,top:n}=un(t),r=o=>o.textContent||o.childElementCount,i=[];return Ia(t.querySelectorAll("text")).filter(r).forEach(o=>{const s=l=>{const{fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}=ce.getComputedStyle(l),{x:m,y:A,width:I,height:C}=TE(l,{left:e,top:n});return{[l.textContent]:{x:m,y:A,width:I,height:C,fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}}};o.childElementCount>1?Ia(o.querySelectorAll("tspan")).filter(r).forEach(l=>{i.push(s(l))}):i.push(s(o))}),i}function SE(t,e){e.forEach(n=>{Object.keys(n).forEach(r=>{const{x:i,y:o,width:s,height:l,fill:c,fontFamily:u,fontSize:f,transform:d}=n[r];if(t.save(),t.font=`${f} ${u}`,t.fillStyle=c,d==="none")t.fillText(r,i,o);else{const h=d.replace(/(matrix|\(|\))/g,"").split(",");h.splice(4).every(m=>+m==0)?(h.push(i+s-s/4),h.push(o-l+l/3)):(h.push(i),h.push(o)),t.transform(...h),t.fillText(r,0,0)}t.restore()})})}function AE(t,e,n){const{width:r,height:i}=e||n,o=He.createElement("canvas"),s=o.getContext("2d");if(o.width=r,o.height=i,s){let c=0,u=r,f=i;if((e==null?void 0:e.preserveAspectRatio)!==!1){const d=Math.min(r/n.width,i/n.height);u=n.width*d,f=n.height*d,c=(i-f)/2}s.drawImage(t,0,0,t.width,t.height,0,c,u,f)}return o.toDataURL(e.mimeType)}var EE={export(t,e){var n;const r=this.internal,{state:i,$el:{chart:o,svg:s}}=r,l=(n=r.canvasEngine)==null?void 0:n.canvas,c=i.isCanvasMode&&l?un(l,!0):null,{width:u,height:f}=c&&c.width&&c.height?{width:c.width,height:c.height}:i.current,d=Gr(Object.create(null),{width:u,height:f,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t);if(i.isCanvasMode&&l){const A=AE(l,d,{width:u,height:f});return e==null||e.bind(this)(A),A}const h=yE(o.node(),d,{width:u,height:f}),m=d.preserveFontStyle?bE(s.node()):[];if(e&&le(e)){const A=new Image;A.crossOrigin="Anonymous",A.onload=()=>{const I=He.createElement("canvas"),C=I.getContext("2d");I.width=d.width||u,I.height=d.height||f,C.drawImage(A,0,0),m.length&&(SE(C,m),m.length=0),e.bind(this)(I.toDataURL(d.mimeType))},A.src=h}return h}};let Bg=()=>(Kn.prototype.export=EE.export,(Bg=()=>({}))());var CE={flow(t){const e=this.internal;let n;(t.json||t.rows||t.columns)&&e.convertData(t,i=>{n=i,r()});function r(){var i,o,s;let l,c=0,u=0,f,d;if(e.state.redrawing||!n||!Qi())return;(i=e.flushCanvasFlow)==null||i.call(e);const h=[],m=e.getMaxDataCount(),A=e.convertDataToTargets(n,!0),I=e.axis.isTimeSeries();e.data.targets.forEach(z=>{let N=!1;for(let B=0;B<A.length;B++)if(z.id===A[B].id){N=!0,z.values[z.values.length-1]&&(u=z.values[z.values.length-1].index+1);const W=A[B].values;c=W.length;for(let V=0;V<c;V++)W[V].index=u+V,I||(W[V].x=u+V),z.values.push(W[V]);A.splice(B,1);break}!N&&h.push(z.id)}),e.data.targets.forEach(z=>{for(let N=0;N<h.length;N++)if(z.id===h[N]){if(!z.values[z.values.length-1])continue;u=z.values[z.values.length-1].index+1;for(let B=0;B<c;B++)z.values.push({id:z.id,index:u+B,x:I?e.getOtherTargetX(u+B):u+B,value:null})}}),e.data.targets.length&&A.forEach(z=>{const N=e.data.targets[0].values[0].index,B=z.values,W=B.length,V=Math.max(u-N,0);if(V){B.length=W+V;for(let J=W-1;J>=0;J--)B[J+V]=B[J];for(let J=0;J<V;J++){const q=N+J;B[J]={id:z.id,index:q,x:I?e.getOtherTargetX(q):q,value:null}}}for(let J=V;J<B.length;J++){const q=B[J];q.index+=u,I||(q.x+=u)}});for(let z=0;z<A.length;z++)e.data.targets.push(A[z]);const C=e.data.targets[0],P=C.values[0];if(sn(t.to)?(c=0,d=I?Hn.call(e,t.to):t.to,C.values.forEach(z=>{z.x<d&&c++})):sn(t.length)&&(c=t.length),m?m===1&&I&&(f=(C.values[C.values.length-1].x-P.x)/2,l=[new Date(+P.x-f),new Date(+P.x+f)]):(I?f=C.values.length>1?C.values[C.values.length-1].x-P.x:P.x-e.getXDomain(e.data.targets)[0]:f=1,l=[P.x-f,P.x]),l&&e.updateXDomain(null,!0,!0,!1,l),e.state.isCanvasMode){const z=We(t.duration)?t.duration:e.config.transition_duration;if((o=e.animateCanvasFlow)==null?void 0:o.call(e,{done:t.done,duration:z,length:c,orgDataCount:m}))return;c&&m&&e.data.targets.forEach(B=>{B.values.splice(0,c)}),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),e.updateTypesElements(),(s=t.done)==null||s.call(e.api);return}e.updateTargets(e.data.targets),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({flow:{index:P.index,length:c,duration:We(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:m},withLegend:!0,withTransition:m>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}},IE={generateFlow(t){const e=this,{data:n,state:r,$el:i}=e;return function(){var o;const s=t.flow.length;r.flowing=!0,n.targets.forEach(c=>{c.values.splice(0,s)}),r.dataGeneration++,e.updateXGrid&&e.updateXGrid(!0);const l={};["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach(c=>{const u=c.split(".");let f=i[u[0]];f&&u.length>1&&(f=f[u[1]]),f!=null&&f.size()&&(l[c]=f)}),(o=e.hideGridFocus)==null||o.call(e),e.setFlowList(l,t)}},setFlowList(t,e){const n=this,{flow:r,targets:i}=e,{duration:o=e.duration,index:s,length:l,orgDataCount:c}=r,u=n.getFlowTransform(i,c,s,l),f=th();let d;f.add(Object.keys(t).map(h=>(d=t[h].transition().ease(m=>+m).duration(o),h==="axis.x"?d=d.call(m=>{n.axis.x.setTransition(m).create(m)}):h==="region.list"?d=d.filter(n.isRegionOnX).attr("transform",u):d=d.attr("transform",u),d))),d.call(f,()=>{n.cleanUpFlow(t,e)})},cleanUpFlow(t,e){const n=this,{config:r,state:i,$el:{svg:o}}=n,s=r.axis_rotated,{flow:l,shape:c,xv:u}=e,{cx:f,cy:d,xForText:h,yForText:m}=c.pos,{done:A=()=>{},length:I}=l;I&&(["circle","text","shape","eventRect"].forEach(C=>{const P=[];for(let z=0;z<I;z++)P.push(`.${tn[C]}-${z}`);o.selectAll(`.${tn[`${C}s`]}`).selectAll(P).remove()}),o.select(`.${tn.xgrid}`).remove()),Object.keys(t).forEach(C=>{const P=t[C];if(C!=="axis.x"&&P.attr("transform",null),C==="grid.x")P.attr(i.xgridAttr);else if(C==="gridLines.x")P.attr("x1",s?0:u).attr("x2",s?i.width:u),P.select("text").attr("x",s?i.width:0).attr("y",u);else if(/^(area|bar|line)$/.test(C))P.attr("d",c.type[C]);else if(C==="text")P.attr("x",h).attr("y",m).style("fill-opacity",n.opacityForText.bind(n));else if(C==="circle")if(n.isCirclePoint())P.attr("cx",f).attr("cy",d);else{const z=B=>f(B)-r.point_r,N=B=>d(B)-r.point_r;P.attr("x",z).attr("y",N)}else C==="region.list"&&P.select("rect").filter(n.isRegionOnX).attr("x",n.regionX.bind(n)).attr("width",n.regionWidth.bind(n))}),r.interaction_enabled&&n.redrawEventRect(),A.call(n.api),i.flowing=!1},getFlowTransform(t,e,n,r){const i=this,{data:o,scale:{x:s}}=i,l=o.targets[0].values;let c=i.getValueOnIndex(l,n),u=i.getValueOnIndex(l,n+r),f;const d=s.domain(),h=i.updateXDomain(t,!0,!0);e?e===1||(c==null?void 0:c.x)===(u==null?void 0:u.x)?f=s(d[0])-s(h[0]):f=i.axis.isTimeSeries()?s(d[0])-s(h[0]):s((c==null?void 0:c.x)||0)-s(u.x):l.length!==1?f=s(d[0])-s(h[0]):i.axis.isTimeSeries()?(c=i.getValueOnIndex(l,0),u=i.getValueOnIndex(l,l.length-1),f=s(c.x)-s(u.x)):f=Ca(h)/2;const m=Ca(d)/Ca(h);return`translate(${f},0) scale(${m},1)`}};let zg=()=>(yn(Er.prototype,IE),Kn.prototype.flow=CE.flow,(zg=()=>({}))());function Ug(t){return Array.isArray(t)?t:[t]}function kg(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function _c(t,e){const n=this.internal,{config:r}=n,i=r.transition_duration&&Qi(),o=`grid_${e}_lines`;return t?(r[o]=Ug(t),n.state.isCanvasMode?(kg(n),r[o]):(n.updateGrid(),n.redrawGrid(i),r[o])):r[o]}function Xg(t,e){const n=`grid_${e}_lines`;return _c.bind(this)(this.internal.config[n].concat(t?Ug(t):[]),e)}function Gg(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){const i=((n=r.getGridFilterToRemove)==null?void 0:n.call(r,t))||(()=>!0),o=`grid_${e?"x":"y"}_lines`;r.config[o]=r.config[o].filter(s=>!i(s)),kg(r);return}r.removeGridLines(t,e)}const Wg=function(t){return _c.bind(this)(t,"x")};yn(Wg,{add(t){return Xg.bind(this)(t,"x")},remove(t){return Gg.bind(this)(t,!0)}});const Vg=function(t){return _c.bind(this)(t,"y")};yn(Vg,{add(t){return Xg.bind(this)(t,"y")},remove(t){return Gg.bind(this)(t,!1)}});var jg={xgrids:Wg,ygrids:Vg};const RE=`line.${cn.xgridFocus}, line.${cn.ygridFocus}`,OE=t=>We(t.position)||"end",wE=t=>t.position==="start"?4:t.position==="middle"?0:-4;function Hg(t){var e;const{state:n,$el:{main:r}}=t,i=n._gridFocusEl,o=r.node(),s=((e=i==null?void 0:i.nodes)==null?void 0:e.call(i))||[];return s.length&&s.every(l=>o==null?void 0:o.contains(l))?i:n._gridFocusEl=r.selectAll(RE)}function Yg(t,e,n){return r=>{let i=t?0:e;return r.position==="start"?i=t?-n:0:r.position==="middle"&&(i=(t?-n:e)/2),i}}function Kg(t,e){e==="grid"&&t.each(function(){const n=kt(this);["x1","x2","y1","y2"].forEach(r=>n.attr(r,+n.attr(r)))})}var PE={hasGrid(){const{config:t}=this;return["x","y"].some(e=>t[`grid_${e}_show`]||t[`grid_${e}_lines`].length)},initGrid(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines(){const t=this,{config:e,state:{clip:n},$el:r}=t;(e.grid_x_lines.length||e.grid_y_lines.length)&&(r.gridLines.main=r.main.insert("g",`.${ze.chart}${e.grid_lines_front?" + *":""}`).attr("clip-path",n.pathGrid).attr("class",`${Tn.grid} ${Tn.gridLines}`),r.gridLines.main.append("g").attr("class",Tn.xgridLines),r.gridLines.main.append("g").attr("class",Tn.ygridLines),r.gridLines.x=Yh([]))},updateXGrid(t){const e=this,{config:n,scale:r,state:i,$el:{main:o,grid:s}}=e,l=n.axis_rotated,c=e.generateGridData(n.grid_x_type,r.x),u=e.axis.isCategorized()?e.axis.x.tickOffset():0,f=d=>(r.zoom||r.x)(d)+u*(l?-1:1);i.xgridAttr=l?{x1:0,x2:i.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:i.height},s.x=o.select(`.${Tn.xgrids}`).selectAll(`.${Tn.xgrid}`).data(c),s.x.exit().remove(),s.x=s.x.enter().append("line").attr("class",Tn.xgrid).merge(s.x),t||s.x.each(function(){const d=kt(this);Object.keys(i.xgridAttr).forEach(h=>{d.attr(h,i.xgridAttr[h])}),d.style("opacity",()=>+d.attr(l?"y1":"x1")===(l?i.height:0)?"0":null)})},updateYGrid(){const t=this,{axis:e,config:n,scale:r,state:i,$el:{grid:o,main:s}}=t,l=n.axis_rotated,c=f=>r.y(f),u=e.y.getGeneratedTicks(n.grid_y_ticks)||t.scale.y.ticks(n.grid_y_ticks);o.y=s.select(`.${Tn.ygrids}`).selectAll(`.${Tn.ygrid}`).data(u),o.y.exit().remove(),o.y=o.y.enter().append("line").attr("class",Tn.ygrid).merge(o.y),o.y.attr("x1",l?c:0).attr("x2",l?c:i.width).attr("y1",l?0:c).attr("y2",l?i.height:c),Kg(o.y,"grid")},updateGrid(){const t=this,{$el:{grid:e,gridLines:n}}=t;!n.main&&t.initGridLines(),e.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines(t){const e=this,{config:n,$el:{gridLines:r,main:i},$T:o}=e,s=n.axis_rotated,l=t==="x";n[`grid_${t}_show`]&&e[`update${t.toUpperCase()}Grid`]();let c=i.select(`.${Tn[`${t}gridLines`]}`).selectAll(`.${Tn[`${t}gridLine`]}`).data(n[`grid_${t}_lines`]);o(c.exit()).style("opacity","0").remove();const u=c.enter().append("g");u.append("line").style("opacity","0"),c=u.merge(c),c.each(function(f){const d=kt(this);d.select("text").empty()&&f.text&&d.append("text").style("opacity","0")}),o(c.attr("class",f=>`${Tn[`${t}gridLine`]} ${f.class||""}`.trim()).select("text").attr("text-anchor",OE).attr("transform",()=>l?s?null:"rotate(-90)":s?"rotate(-90)":null).attr("dx",wE).attr("dy",-5)).text(function(f){var d;return(d=f.text)!=null?d:this.remove()}),r[t]=c},redrawGrid(t){const e=this,{config:{axis_rotated:n},state:{width:r,height:i},$el:{gridLines:o},$T:s}=e,l=e.xv.bind(e),c=e.yv.bind(e);let u=o.x.select("line"),f=o.x.select("text"),d=o.y.select("line"),h=o.y.select("text");return u=s(u,t).attr("x1",n?0:l).attr("x2",n?r:l).attr("y1",n?l:0).attr("y2",n?l:i),f=s(f,t).attr("x",Yg(!n,r,i)).attr("y",l),d=s(d,t).attr("x1",n?c:0).attr("x2",n?c:r).attr("y1",n?0:c).attr("y2",n?i:c),h=s(h,t).attr("x",Yg(n,r,i)).attr("y",c),[u.style("opacity",null),f.style("opacity",null),d.style("opacity",null),h.style("opacity",null)]},initFocusGrid(){const t=this,{config:e,state:n,state:{clip:r},$el:i}=t;n._gridFocusEl=null;const o=e.grid_front,s=`.${o&&i.gridLines.main?Tn.gridLines:ze.chart}${o?" + *":""}`,l=i.main.insert("g",s).attr("clip-path",r.pathGrid).attr("class",Tn.grid);if(i.grid.main=l,e.grid_x_show&&l.append("g").attr("class",Tn.xgrids),e.grid_y_show&&l.append("g").attr("class",Tn.ygrids),e.axis_tooltip){const c=l.append("g").attr("class","bb-axis-tooltip");c.append("line").attr("class","bb-axis-tooltip-x"),c.append("line").attr("class","bb-axis-tooltip-y")}e.interaction_enabled&&e.grid_focus_show&&!e.axis_tooltip&&(l.append("g").attr("class",cn.xgridFocus).append("line").attr("class",cn.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&l.append("g").attr("class",cn.ygridFocus).append("line").attr("class",cn.ygridFocus))},showAxisGridFocus(){var t,e;const n=this,{config:r,format:i,state:{event:o,width:s,height:l}}=n,c=r.axis_rotated,[u,f]=ir(o,(t=n.$el.eventRect)==null?void 0:t.node()),d={x:u,y:f};for(const[h,m]of Object.entries(n.$el.axisTooltip)){const A=h==="x"&&!c||h!=="x"&&c?"x":"y",I=d[A];let C=(e=n.scale[h])==null?void 0:e.invert(I);C&&(C=h==="x"&&n.axis.isTimeSeries()?i.xAxisTick(C):C==null?void 0:C.toFixed(2),m==null||m.attr(A,I).text(C))}n.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility",null).each(function(h,m){const A=kt(this);m===0?A.attr("x1",u).attr("x2",u).attr("y1",m?0:l).attr("y2",m?l:0):A.attr("x1",m?0:s).attr("x2",m?s:0).attr("y1",f).attr("y2",f)})},hideAxisGridFocus(){const t=this;t.$el.main.selectAll(`line.${Rn.axisTooltipX}, line.${Rn.axisTooltipY}`).style("visibility","hidden"),Object.values(t.$el.axisTooltip).forEach(e=>e==null?void 0:e.style("display","none"))},showGridFocus(t){var e;const n=this,{config:r,state:{width:i,height:o}}=n,s=r.axis_rotated,l=Hg(n),c=(t||[l.datum()]).filter(d=>d&&We(n.getBaseValue(d)));if(!r.tooltip_show||c.length===0||!r.axis_x_forceAsSingle&&n.hasType("bubble")||n.hasArcType())return;const u=r.grid_focus_edge&&!r.tooltip_grouped,f=n.xx.bind(n);l.style("visibility",null).data(c.concat(c)).each(function(d){const h=kt(this),m={x:f(d),y:n.getYScaleById(d.id)(d.value)};let A;if(h.classed(cn.xgridFocus))A=s?[null,m.x,u?m.y:i,m.x]:[m.x,u?m.y:null,m.x,o];else{const I=n.axis.getId(d.id)==="y2";A=s?[m.y,u&&!I?m.x:null,m.y,u&&I?m.x:o]:[u&&I?m.x:null,m.y,u&&!I?m.x:i,m.y]}["x1","y1","x2","y2"].forEach((I,C)=>h.attr(I,A[C]))}),Kg(l,"grid"),(e=n.showCircleFocus)==null||e.call(n,t)},hideGridFocus(t=!1){var e;const n=this,{state:{inputType:r,resizing:i}}=n;(t||r==="mouse"||!i)&&(Hg(n).style("visibility","hidden"),(e=n.hideCircleFocus)==null||e.call(n))},updateGridFocus(){var t;const e=this,{state:{inputType:n,width:r,height:i,resizing:o},$el:{grid:s}}=e,l=s.main.select(`line.${cn.xgridFocus}`);if(n==="touch")l.empty()?o&&((t=e.showCircleFocus)==null||t.call(e)):e.showGridFocus();else{const c=e.config.axis_rotated;l.attr("x1",c?0:-10).attr("x2",c?r:-10).attr("y1",c?-10:0).attr("y2",c?-10:i)}return!0},generateGridData(t,e){const n=this,r=n.$el.main.select(`.${Rn.axisX}`).selectAll(".tick").size();let i=[];if(t==="year"){const o=n.getXDomain(n.data.targets),[s,l]=o.map(c=>c.getFullYear());for(let c=s;c<=l;c++)i.push(new Date(`${c}-01-01 00:00:00`))}else i=e.ticks(hn),i.length>r&&(i=i.filter(o=>String(o).indexOf(".")<0));return i},getGridFilterToRemove(t){return t?e=>{let n=!1;return(nn(t)?t.concat():[t]).forEach(r=>{("value"in r&&e.value===r.value||"class"in r&&e.class===r.class)&&(n=!0)}),n}:()=>!0},removeGridLines(t,e){const n=this,{config:r,$T:i}=n,o=n.getGridFilterToRemove(t),s=f=>!o(f),l=e?Tn.xgridLines:Tn.ygridLines,c=e?Tn.xgridLine:Tn.ygridLine;i(n.$el.main.select(`.${l}`).selectAll(`.${c}`).filter(o)).style("opacity","0").remove();const u=`grid_${e?"x":"y"}_lines`;r[u]=r[u].filter(s)}},ME={grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0};let Zg=()=>(yn(Er.prototype,PE),Kn.prototype.xgrids=jg.xgrids,Kn.prototype.ygrids=jg.ygrids,Da.setOptions([ME]),(Zg=()=>({}))());function Jg(t=!1,e,n,r){const i=this,{config:o,$el:{main:s}}=i,l=o.data_selection_grouped,c=o.data_selection_isselectable.bind(i.api);o.data_selection_enabled&&s.selectAll(`.${bn.shapes}`).selectAll(`.${bn.shape}`).each(function(u){const f=kt(this),{id:d,index:h}=u.data?u.data:u,m=i.getToggle(this,u).bind(i),A=l||!e||e.indexOf(d)>=0,I=!n||n.indexOf(h)>=0,C=f.classed(gn.SELECTED);f.classed(Lr.line)||f.classed(as.area)||(t?A&&I&&c(u)&&!C?m(!0,f.classed(gn.SELECTED,!0),u,h):sn(r)&&r&&C&&m(!1,f.classed(gn.SELECTED,!1),u,h):A&&I&&c(u)&&C&&m(!1,f.classed(gn.SELECTED,!1),u,h))})}var LE={selected(t){var e;const n=this.internal,r=[];return n.state.isCanvasMode?((e=n.getCanvasSelectedData)==null?void 0:e.call(n,t))||r:(n.$el.main.selectAll(`.${bn.shapes+n.getTargetSelectorSuffix(t)}`).selectAll(`.${bn.shape}`).filter(function(){return kt(this).classed(gn.SELECTED)}).each(i=>r.push(i)),r)},select(t,e,n){var r;const i=this.internal;if(i.state.isCanvasMode){(r=i.setCanvasSelection)==null||r.call(i,!0,t,e,n);return}Jg.bind(i)(!0,t,e,n)},unselect(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){(n=r.setCanvasSelection)==null||n.call(r,!1,t,e);return}Jg.bind(r)(!1,t,e)}},DE={drag(t){const e=this,{config:n,state:r,$el:{main:i}}=e,o=n.data_selection_grouped,s=n.interaction_enabled&&n.data_selection_isselectable;if(e.hasArcType()||!n.data_selection_enabled||n.zoom_enabled&&!e.zoom.altDomain||!n.data_selection_multiple)return;const[l,c]=r.dragStart||[0,0],[u,f]=t,d=Math.min(l,u),h=Math.max(l,u),m=o?r.margin.top:Math.min(c,f),A=o?r.height:Math.max(c,f),I=()=>{!e||!e.$el||!e.$el.main||(i.select(`.${La.dragarea}`).attr("x",d).attr("y",m).attr("width",h-d).attr("height",A-m),i.selectAll(`.${bn.shapes}`).selectAll(`.${bn.shape}`).filter(C=>s==null?void 0:s.bind(e.api)(C)).each(function(C,P){const z=kt(this),N=z.classed(gn.SELECTED),B=z.classed(La.INCLUDED);let W,V;if(z.classed(Bn.circle)){const J=+z.attr("cx"),q=+z.attr("cy");V=e.togglePoint,W=d<J&&J<h&&m<q&&q<A}else if(z.classed(rr.bar)){const{x:J,y:q,width:at,height:et}=Qd(this);V=e.togglePath,W=!(h<J||J+at<d)&&!(A<q||q+et<m)}else return;W^B&&(z.classed(La.INCLUDED,!B),z.classed(gn.SELECTED,!N),V.call(e,!N,z,C,P))}))};qd(e.state,I)},dragstart(t){const e=this,{config:n,state:r,$el:{main:i}}=e;e.hasArcType()||!n.data_selection_enabled||(r.dragStart=t,i.select(`.${ze.chart}`).append("rect").attr("class",La.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend(){const t=this,{config:e,$el:{main:n},$T:r}=t;t.hasArcType()||!e.data_selection_enabled||(r(n.select(`.${La.dragarea}`)).style("opacity","0").remove(),n.selectAll(`.${bn.shape}`).classed(La.INCLUDED,!1),t.setDragStatus(!1))}},FE=Object.defineProperty,NE=Object.defineProperties,$E=Object.getOwnPropertyDescriptors,Qg=Object.getOwnPropertySymbols,BE=Object.prototype.hasOwnProperty,zE=Object.prototype.propertyIsEnumerable,_g=(t,e,n)=>e in t?FE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,UE=(t,e)=>{for(var n in e||(e={}))BE.call(e,n)&&_g(t,n,e[n]);if(Qg)for(var n of Qg(e))zE.call(e,n)&&_g(t,n,e[n]);return t},kE=(t,e)=>NE(t,$E(e)),XE=kE(UE({},DE),{selectPoint(t,e,n){const r=this,{config:i,$el:{main:o},$T:s}=r,l=i.axis_rotated,c=(l?r.circleY:r.circleX).bind(r),u=(l?r.circleX:r.circleY).bind(r),f=r.pointSelectR.bind(r);Ne(i.data_onselected,r.api,e,t.node()),s(o.select(`.${gn.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${gn.selectedCircle}-${n}`).data([e]).enter().append("circle").attr("class",()=>r.generateClass(gn.selectedCircle,n)).attr("cx",c).attr("cy",u).attr("stroke",r.color).attr("r",d=>r.pointSelectR(d)*1.4)).attr("r",f)},unselectPoint(t,e,n){const r=this,{config:i,$el:{main:o},$T:s}=r;Ne(i.data_onunselected,r.api,e,t==null?void 0:t.node()),s(o.select(`.${gn.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${gn.selectedCircle}-${n}`)).attr("r",0).remove()},togglePoint(t,e,n,r){this[`${t?"":"un"}selectPoint`](e,n,r)},selectPath(t,e){const n=this,{config:r}=n;Ne(r.data_onselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter","brightness(1.25)")},unselectPath(t,e){const n=this,{config:r}=n;Ne(r.data_onunselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter",null)},togglePath(t,e,n,r){this[`${t?"":"un"}selectPath`](e,n,r)},getToggle(t,e){const n=this;return t.nodeName==="path"?n.togglePath:n.isStepType(e)?()=>{}:n.togglePoint},toggleShape(t,e,n){var r;const i=this,{config:o,$el:{main:s}}=i;if(o.data_selection_enabled&&o.data_selection_isselectable.bind(i.api)(e)){const l=kt(t),c=l.classed(gn.SELECTED),u=i.getToggle(t,e).bind(i);let f;if(!o.data_selection_multiple){const d=(r=i.isPointFocusOnly)==null?void 0:r.call(i);let h=`.${d?gn.selectedCircles:bn.shapes}`;o.data_selection_grouped&&(h+=i.getTargetSelectorSuffix(e.id)),s.selectAll(h).selectAll(d?`.${gn.selectedCircle}`:`.${bn.shape}.${gn.SELECTED}`).classed(gn.SELECTED,!1).each(function(m){const A=kt(this);f=A,u(!1,A,m,m.index)})}(!f||f.node()!==l.node())&&(l.classed(gn.SELECTED,!c),u(!c,l,e,n))}}}),GE={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:()=>!0,data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:()=>{},data_onunselected:()=>{}};let qg=()=>(yn(Er.prototype,XE),yn(Kn.prototype,LE),Da.setOptions([GE]),(qg=()=>!0)());const tv=function(t){var e,n;const r=this.internal,{axis:i,brush:o,config:s,scale:{x:l,subX:c},state:u}=r;let f;return u.isCanvasMode?(s.subchart_show&&(f=t,Array.isArray(f)?(f=i.isTimeSeries()?f.map(d=>Hn.bind(r)(d)):f,f=r.setCanvasSubchartDomain(f)||u.domain):f=(e=u.domain)!=null?e:l.orgDomain()),f):(s.subchart_show&&(f=t,Array.isArray(f)?(i.isTimeSeries()&&(f=f.map(h=>Hn.bind(r)(h))),r.withinRange(f,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))&&(u.domain=f.slice(),o.move(o.getSelection(),f.map(c)))):f=(n=u.domain)!=null?n:l.orgDomain()),f)};yn(tv,{show(){var t,e,n;const r=this.internal,{$el:{subchart:i},config:o}=r,s=o.subchart_show;if(!s){if(r.state.isCanvasMode){(t=r.unbindZoomEvent)==null||t.call(r),o.subchart_show=!0,this.resize();return}r.unbindZoomEvent(),o.subchart_show=!s,!i.main&&r.initSubchart();let l=i.main.selectAll(`.${ze.target}`);r.data.targets.length!==l.size()&&(r.updateSizes(),r.updateTargetsForSubchart(r.data.targets),l=(e=i.main)==null?void 0:e.selectAll(`.${ze.target}`)),l==null||l.style("opacity",null),(n=i.main)==null||n.style("display",null),this.resize()}},hide(){var t;const e=this.internal,{$el:{subchart:{main:n}},config:r}=e;if(e.state.isCanvasMode){r.subchart_show&&(r.subchart_show=!1,this.resize(),(t=e.bindZoomEvent)==null||t.call(e));return}r.subchart_show&&(n==null?void 0:n.style("display"))!=="none"&&(r.subchart_show=!1,n.style("display","none"),this.resize())},toggle(){const t=this.internal,{config:e}=t;this.subchart[e.subchart_show?"hide":"show"]()},reset(){var t;const e=this.internal,{brush:n}=e;if(e.state.isCanvasMode){(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1);return}n.clear(n.getSelection())}});var WE={subchart:tv},VE={initBrush(){const t=this,{config:e,scale:n,$el:{subchart:r},state:i}=t,o=e.axis_rotated,s=e.subchart_size_height;let l,c,u;t.brush=(o?SS():bS()).handleSize(5),t.brush.on("start brush end",f=>{const{selection:d,sourceEvent:h,target:m,type:A}=f;A==="start"&&(t.state.inputType==="touch"&&t.hideTooltip(),c=h?d:null),/(start|brush)/.test(A)&&(A==="brush"&&h&&i.domain&&(c==null||c.forEach((I,C)=>{I!==d[C]&&(i.domain[C]=n.x.orgDomain()[C])})),t.redrawForBrush(A!=="start")),A==="end"&&(l=n.x.orgDomain()),m!=null&&m.handle&&(d===null?t.brush.handle.attr("display","none"):t.brush.handle.attr("display",null).attr("transform",(I,C)=>{const P=[d[C],s/2];return`translate(${o?P.reverse():P})`}))}),t.brush.updateResize=function(){u&&clearTimeout(u),u=setTimeout(()=>{const f=this.getSelection();l&&Bh(f.node())&&this.move(f,l.map(n.subX.orgScale()))},0)},t.brush.update=function(){var f;return this.extent()()[1].filter(h=>isNaN(h)).length===0&&((f=r.main)==null||f.select(`.${tn.brush}`).call(this)),this},t.brush.scale=function(f){const d=e.subchart_size_height;let h=t.axis.getExtent();!h&&f.range?h=[[0,0],[f.range()[1],d]]:nn(h)&&(h=h.map((m,A)=>[m,A>0?d:A])),o&&h[1].reverse(),this.extent(h),this.update()},t.brush.getSelection=()=>r.main?r.main.select(`.${tn.brush}`):kt([])},initSubchart(){const t=this,{config:e,state:{clip:n,hasAxis:r},$el:{defs:i,svg:o,subchart:s,axis:l}}=t;if(!r)return;const c=e.subchart_show?null:"hidden",u=`${n.id}-subchart`,f=t.getClipPath(u);n.idSubchart=u,t.appendClip(i,u),t.initBrush(),s.main=o.append("g").classed(tn.subchart,!0).attr("transform",t.getTranslate("context"));const{main:d}=s;d.style("visibility",c),d.append("g").attr("clip-path",f).attr("class",tn.chart),["bar","line","bubble","candlestick","scatter"].forEach(m=>{const A=$n(/^(bubble|scatter)$/.test(m)?"circle":m);if(t.hasType(m)||t.hasTypeOf(A)){const I=d.select(`.${tn.chart}`),C=tn[`chart${A}s`];I.select(`.${C}`).empty()&&I.append("g").attr("class",C)}});const h=d.append("g").attr("clip-path",f).attr("class",tn.brush).call(t.brush);e.subchart_showHandle&&t.addBrushHandle(h),l.subX=d.append("g").attr("class",tn.axisX).attr("transform",t.getTranslate("subX")).attr("clip-path",e.axis_rotated?"":n.pathXAxis).style("visibility",e.subchart_axis_x_show?c:"hidden")},addBrushHandle(t){const e=this,{config:n}=e,r=n.axis_rotated,i=n.subchart_init_range,o="handle--custom",s=Ii[r?"y":"x"];e.brush.handle=t.selectAll(`.${o}`).data(r?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class",o).attr("cursor",`${r?"ns":"ew"}-resize`).attr("d",l=>s[/[se]/.test(l.type)?"end":"start"]).attr("display",i?null:"none")},updateTargetsForSubchart(t){const e=this,{config:n,state:r,$el:{subchart:{main:i}}}=e;n.subchart_show&&(["bar","line","bubble","candlestick","scatter"].filter(o=>e.hasType(o)||e.hasTypeOf($n(o))).forEach(o=>{const s=/^(bubble|scatter)$/.test(o),l=$n(s?"circle":o),c=e.getChartClass(l,!0),u=e.getClass(s?"circles":`${o}s`,!0),f=i.select(`.${tn[`chart${`${l}s`}`]}`);if(s){const d=f.selectAll(`.${tn.circles}`).data(t.filter(e[`is${$n(o)}Type`].bind(e))).attr("class",u);d.exit().remove(),d.enter().append("g").attr("class",u)}else{const d=f.selectAll(`.${tn[`chart${l}`]}`).attr("class",c).data(t.filter(e[`is${l}Type`].bind(e))),h=d.enter().append("g").style("opacity","0").attr("class",c).append("g").attr("class",u);d.exit().remove(),o==="line"&&e.hasTypeOf("Area")&&h.append("g").attr("class",e.getClass("areas",!0))}}),i.selectAll(`.${tn.brush} rect`).attr(n.axis_rotated?"width":"height",n.axis_rotated?r.width2:r.height2))},redrawSubchart(t,e,n){var r;const i=this,{config:o,$el:{subchart:{main:s}},state:l}=i,c=!!e;if(s.style("visibility",o.subchart_show?null:"hidden"),o.subchart_show&&(((r=l.event)==null?void 0:r.type)==="zoom"&&i.brush.update(),t)){const u=o.subchart_init_range;if(!Uh(i)&&i.brush.update(),Object.keys(n.type).forEach(f=>{const d=$n(f),h=i[`generateDraw${d}`](n.indices[f],!0);i[`update${d}`](c,!0),i[`redraw${d}`](h,c,!0)}),i.hasType("bubble")||i.hasType("scatter")){const{cx:f}=n.pos,d=i.updateCircleY(!0);i.updateCircle(!0),i.redrawCircle(f,d,c,void 0,!0)}!l.rendered&&u&&(l.domain=u,i.brush.move(i.brush.getSelection(),u.map(i.scale.x)))}},redrawForBrush(t=!0){var e;const n=this,{config:{subchart_onbrush:r,zoom_rescale:i},scale:o,state:s}=n;n.redraw({withTransition:!1,withY:i,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&s.rendered&&r.bind(n.api)((e=s.domain)!=null?e:o.x.orgDomain())},transformContext(t,e){const n=this,{$el:{subchart:r},$T:i}=n,o=e!=null&&e.axisSubX?e.axisSubX:i(r.main.select(`.${tn.axisX}`),t);r.main.attr("transform",n.getTranslate("context")),o.attr("transform",n.getTranslate("subX"))}},jE={subchart_show:!1,subchart_showHandle:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:()=>{}};let ev=()=>(yn(Er.prototype,VE),yn(Kn.prototype,WE),Da.setOptions([jE]),(ev=()=>!0)());var HE=1e-12;function nv(t){return((t=Math.exp(t))+1/t)/2}function YE(t){return((t=Math.exp(t))-1/t)/2}function KE(t){return((t=Math.exp(2*t))-1)/(t+1)}var ZE=(function t(e,n,r){function i(o,s){var l=o[0],c=o[1],u=o[2],f=s[0],d=s[1],h=s[2],m=f-l,A=d-c,I=m*m+A*A,C,P;if(I<HE)P=Math.log(h/u)/e,C=function(J){return[l+J*m,c+J*A,u*Math.exp(e*J*P)]};else{var z=Math.sqrt(I),N=(h*h-u*u+r*I)/(2*u*n*z),B=(h*h-u*u-r*I)/(2*h*n*z),W=Math.log(Math.sqrt(N*N+1)-N),V=Math.log(Math.sqrt(B*B+1)-B);P=(V-W)/e,C=function(J){var q=J*P,at=nv(W),et=u/(n*z)*(at*KE(e*q+W)-YE(W));return[l+et*m,c+et*A,u*at/nv(e*q+W)]}}return C.duration=P*1e3*e/Math.SQRT2,C}return i.rho=function(o){var s=Math.max(.001,+o),l=s*s,c=l*l;return t(s,l,c)},i})(Math.SQRT2,2,4),Ns=(t=>()=>t);function JE(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function qr(t,e,n){this.k=t,this.x=e,this.y=n}qr.prototype={constructor:qr,scale:function(t){return t===1?this:new qr(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new qr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var hr=new qr(1,0,0);qc.prototype=qr.prototype;function qc(t){for(;!t.__zoom;)if(!(t=t.parentNode))return hr;return t.__zoom}function tu(t){t.stopImmediatePropagation()}function so(t){t.preventDefault(),t.stopImmediatePropagation()}function QE(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function _E(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function rv(){return this.__zoom||hr}function qE(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function tC(){return navigator.maxTouchPoints||"ontouchstart"in this}function eC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function nC(){var t=QE,e=_E,n=eC,r=qE,i=tC,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=ZE,u=cs("start","zoom","end"),f,d,h,m=500,A=150,I=0,C=10;function P(_){_.property("__zoom",rv).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",at).on("dblclick.zoom",et).filter(i).on("touchstart.zoom",ot).on("touchmove.zoom",lt).on("touchend.zoom touchcancel.zoom",ft).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}P.transform=function(_,dt,ut,xt){var bt=_.selection?_.selection():_;bt.property("__zoom",rv),_!==bt?W(_,dt,ut,xt):bt.interrupt().each(function(){V(this,arguments).event(xt).start().zoom(null,typeof dt=="function"?dt.apply(this,arguments):dt).end()})},P.scaleBy=function(_,dt,ut,xt){P.scaleTo(_,function(){var bt=this.__zoom.k,Rt=typeof dt=="function"?dt.apply(this,arguments):dt;return bt*Rt},ut,xt)},P.scaleTo=function(_,dt,ut,xt){P.transform(_,function(){var bt=e.apply(this,arguments),Rt=this.__zoom,Et=ut==null?B(bt):typeof ut=="function"?ut.apply(this,arguments):ut,Zt=Rt.invert(Et),fe=typeof dt=="function"?dt.apply(this,arguments):dt;return n(N(z(Rt,fe),Et,Zt),bt,s)},ut,xt)},P.translateBy=function(_,dt,ut,xt){P.transform(_,function(){return n(this.__zoom.translate(typeof dt=="function"?dt.apply(this,arguments):dt,typeof ut=="function"?ut.apply(this,arguments):ut),e.apply(this,arguments),s)},null,xt)},P.translateTo=function(_,dt,ut,xt,bt){P.transform(_,function(){var Rt=e.apply(this,arguments),Et=this.__zoom,Zt=xt==null?B(Rt):typeof xt=="function"?xt.apply(this,arguments):xt;return n(hr.translate(Zt[0],Zt[1]).scale(Et.k).translate(typeof dt=="function"?-dt.apply(this,arguments):-dt,typeof ut=="function"?-ut.apply(this,arguments):-ut),Rt,s)},xt,bt)};function z(_,dt){return dt=Math.max(o[0],Math.min(o[1],dt)),dt===_.k?_:new qr(dt,_.x,_.y)}function N(_,dt,ut){var xt=dt[0]-ut[0]*_.k,bt=dt[1]-ut[1]*_.k;return xt===_.x&&bt===_.y?_:new qr(_.k,xt,bt)}function B(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function W(_,dt,ut,xt){_.on("start.zoom",function(){V(this,arguments).event(xt).start()}).on("interrupt.zoom end.zoom",function(){V(this,arguments).event(xt).end()}).tween("zoom",function(){var bt=this,Rt=arguments,Et=V(bt,Rt).event(xt),Zt=e.apply(bt,Rt),fe=ut==null?B(Zt):typeof ut=="function"?ut.apply(bt,Rt):ut,me=Math.max(Zt[1][0]-Zt[0][0],Zt[1][1]-Zt[0][1]),xe=bt.__zoom,Te=typeof dt=="function"?dt.apply(bt,Rt):dt,Fe=c(xe.invert(fe).concat(me/xe.k),Te.invert(fe).concat(me/Te.k));return function(Ie){if(Ie===1)Ie=Te;else{var ke=Fe(Ie),Jt=me/ke[2];Ie=new qr(Jt,fe[0]-ke[0]*Jt,fe[1]-ke[1]*Jt)}Et.zoom(null,Ie)}})}function V(_,dt,ut){return!ut&&_.__zooming||new J(_,dt)}function J(_,dt){this.that=_,this.args=dt,this.active=0,this.sourceEvent=null,this.extent=e.apply(_,dt),this.taps=0}J.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,dt){return this.mouse&&_!=="mouse"&&(this.mouse[1]=dt.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=dt.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=dt.invert(this.touch1[0])),this.that.__zoom=dt,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var dt=kt(this.that).datum();u.call(_,this.that,new JE(_,{sourceEvent:this.sourceEvent,target:P,type:_,transform:this.that.__zoom,dispatch:u}),dt)}};function q(_,...dt){if(!t.apply(this,arguments))return;var ut=V(this,dt).event(_),xt=this.__zoom,bt=Math.max(o[0],Math.min(o[1],xt.k*Math.pow(2,r.apply(this,arguments)))),Rt=dr(_);if(ut.wheel)(ut.mouse[0][0]!==Rt[0]||ut.mouse[0][1]!==Rt[1])&&(ut.mouse[1]=xt.invert(ut.mouse[0]=Rt)),clearTimeout(ut.wheel);else{if(xt.k===bt)return;ut.mouse=[Rt,xt.invert(Rt)],li(this),ut.start()}so(_),ut.wheel=setTimeout(Et,A),ut.zoom("mouse",n(N(z(xt,bt),ut.mouse[0],ut.mouse[1]),ut.extent,s));function Et(){ut.wheel=null,ut.end()}}function at(_,...dt){if(h||!t.apply(this,arguments))return;var ut=_.currentTarget,xt=V(this,dt,!0).event(_),bt=kt(_.view).on("mousemove.zoom",fe,!0).on("mouseup.zoom",me,!0),Rt=dr(_,ut),Et=_.clientX,Zt=_.clientY;xc(_.view),tu(_),xt.mouse=[Rt,this.__zoom.invert(Rt)],li(this),xt.start();function fe(xe){if(so(xe),!xt.moved){var Te=xe.clientX-Et,Fe=xe.clientY-Zt;xt.moved=Te*Te+Fe*Fe>I}xt.event(xe).zoom("mouse",n(N(xt.that.__zoom,xt.mouse[0]=dr(xe,ut),xt.mouse[1]),xt.extent,s))}function me(xe){bt.on("mousemove.zoom mouseup.zoom",null),yc(xe.view,xt.moved),so(xe),xt.event(xe).end()}}function et(_,...dt){if(t.apply(this,arguments)){var ut=this.__zoom,xt=dr(_.changedTouches?_.changedTouches[0]:_,this),bt=ut.invert(xt),Rt=ut.k*(_.shiftKey?.5:2),Et=n(N(z(ut,Rt),xt,bt),e.apply(this,dt),s);so(_),l>0?kt(this).transition().duration(l).call(W,Et,xt,_):kt(this).call(P.transform,Et,xt,_)}}function ot(_,...dt){if(t.apply(this,arguments)){var ut=_.touches,xt=ut.length,bt=V(this,dt,_.changedTouches.length===xt).event(_),Rt,Et,Zt,fe;for(tu(_),Et=0;Et<xt;++Et)Zt=ut[Et],fe=dr(Zt,this),fe=[fe,this.__zoom.invert(fe),Zt.identifier],bt.touch0?!bt.touch1&&bt.touch0[2]!==fe[2]&&(bt.touch1=fe,bt.taps=0):(bt.touch0=fe,Rt=!0,bt.taps=1+!!f);f&&(f=clearTimeout(f)),Rt&&(bt.taps<2&&(d=fe[0],f=setTimeout(function(){f=null},m)),li(this),bt.start())}}function lt(_,...dt){if(this.__zooming){var ut=V(this,dt).event(_),xt=_.changedTouches,bt=xt.length,Rt,Et,Zt,fe;for(so(_),Rt=0;Rt<bt;++Rt)Et=xt[Rt],Zt=dr(Et,this),ut.touch0&&ut.touch0[2]===Et.identifier?ut.touch0[0]=Zt:ut.touch1&&ut.touch1[2]===Et.identifier&&(ut.touch1[0]=Zt);if(Et=ut.that.__zoom,ut.touch1){var me=ut.touch0[0],xe=ut.touch0[1],Te=ut.touch1[0],Fe=ut.touch1[1],Ie=(Ie=Te[0]-me[0])*Ie+(Ie=Te[1]-me[1])*Ie,ke=(ke=Fe[0]-xe[0])*ke+(ke=Fe[1]-xe[1])*ke;Et=z(Et,Math.sqrt(Ie/ke)),Zt=[(me[0]+Te[0])/2,(me[1]+Te[1])/2],fe=[(xe[0]+Fe[0])/2,(xe[1]+Fe[1])/2]}else if(ut.touch0)Zt=ut.touch0[0],fe=ut.touch0[1];else return;ut.zoom("touch",n(N(Et,Zt,fe),ut.extent,s))}}function ft(_,...dt){if(this.__zooming){var ut=V(this,dt).event(_),xt=_.changedTouches,bt=xt.length,Rt,Et;for(tu(_),h&&clearTimeout(h),h=setTimeout(function(){h=null},m),Rt=0;Rt<bt;++Rt)Et=xt[Rt],ut.touch0&&ut.touch0[2]===Et.identifier?delete ut.touch0:ut.touch1&&ut.touch1[2]===Et.identifier&&delete ut.touch1;if(ut.touch1&&!ut.touch0&&(ut.touch0=ut.touch1,delete ut.touch1),ut.touch0)ut.touch0[1]=this.__zoom.invert(ut.touch0[0]);else if(ut.end(),ut.taps===2&&(Et=dr(Et,this),Math.hypot(d[0]-Et[0],d[1]-Et[1])<C)){var Zt=kt(this).on("dblclick.zoom");Zt&&Zt.apply(this,arguments)}}}return P.wheelDelta=function(_){return arguments.length?(r=typeof _=="function"?_:Ns(+_),P):r},P.filter=function(_){return arguments.length?(t=typeof _=="function"?_:Ns(!!_),P):t},P.touchable=function(_){return arguments.length?(i=typeof _=="function"?_:Ns(!!_),P):i},P.extent=function(_){return arguments.length?(e=typeof _=="function"?_:Ns([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),P):e},P.scaleExtent=function(_){return arguments.length?(o[0]=+_[0],o[1]=+_[1],P):[o[0],o[1]]},P.translateExtent=function(_){return arguments.length?(s[0][0]=+_[0][0],s[1][0]=+_[1][0],s[0][1]=+_[0][1],s[1][1]=+_[1][1],P):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},P.constrain=function(_){return arguments.length?(n=_,P):n},P.duration=function(_){return arguments.length?(l=+_,P):l},P.interpolate=function(_){return arguments.length?(c=_,P):c},P.on=function(){var _=u.on.apply(u,arguments);return _===u?P:_},P.clickDistance=function(_){return arguments.length?(I=(_=+_)*_,P):Math.sqrt(I)},P.tapDistance=function(_){return arguments.length?(C=+_,P):C},P}const av=function(t){var e,n;const r=this.internal,{axis:i,config:o,org:s,scale:l,state:c}=r;let u;if(!i)return;const f=i.isCategorized();if(o.zoom_enabled)if(u=t,Array.isArray(u)){if(i.isTimeSeries()&&(u=u.map(h=>Hn.bind(r)(h))),r.withinRange(u,r.getZoomDomain("zoom",!0),r.getZoomDomain("zoom"))){if(c.domain=u.slice(),u=r.getZoomDomainValue(u),r.api.tooltip.hide(),o.subchart_show)if(c.isCanvasMode)(e=r.setCanvasSubchartDomain)==null||e.call(r,u,!0,!1);else{const h=l.zoom||l.x;r.brush.getSelection().call(r.brush.move,u.map(h))}else{const h=f?l.x.orgScale():s.xScale||l.x;r.updateCurrentZoomTransform(h,u)}r.setZoomResetButton()}}else u=r.zoom.getDomain();return(n=c.domain)!=null?n:u};yn(av,{enable(t){var e;const n=this.internal,{axis:r,config:i}=n;if(!r){i.zoom_enabled=!1;return}/^(drag|wheel)$/.test(t)&&(i.zoom_type=t),i.zoom_enabled=!!t,n.zoom?t===!1&&n.bindZoomEvent(!1):n.initZoom(),t!==!1&&(i.zoom_type==="drag"&&!n.zoomBehaviour&&((e=n.initZoomBehaviour)==null||e.call(n)),n.bindZoomEvent()),n.updateAndRedraw()},max(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_max=yr("max",[r[1],t])),n.zoom_x_max},min(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_min=yr("min",[r[0],t])),n.zoom_x_min},range(t){const e=this.zoom;if(je(t)){const{min:n,max:r}=t;sn(n)&&e.min(n),sn(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var rC={zoom:av,unzoom(){var t;const e=this.internal,{config:n,$el:{canvas:r,eventRect:i,zoomResetBtn:o},scale:{zoom:s},state:l}=e,c=l.isCanvasMode?r:i;(s||l.isCanvasMode&&n.subchart_show&&l.domain)&&(n.subchart_show?l.isCanvasMode?(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1):e.brush.getSelection().call(e.brush.move,null):e.zoom.updateTransformScale(hr),e.updateZoom(!0),o==null||o.style("display","none"),c!=null&&c.node()&&qc(c.node())!==hr&&e.zoom.transform(c,hr),l.domain=void 0)}};function $s(t){return t.state.isCanvasMode?t.$el.canvas:t.$el.eventRect}function iv(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return hr.translate(e.x+(e.k-1)*n.left,e.y+(e.k-1)*n.top).scale(e.k)}function ov(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return hr.translate(e.x-(e.k-1)*n.left,e.y-(e.k-1)*n.top).scale(e.k)}function sv(t,e,n){const r=ir(e,n);if(t.state.isCanvasMode){const{margin:i}=t.state;r[0]-=i.left,r[1]-=i.top}return r}var aC={initZoom(){const t=this;t.scale.zoom=null,t.generateZoom(),t.config.zoom_type==="drag"&&t.initZoomBehaviour()},bindZoomEvent(t=!0){const e=this,{config:n}=e;n.zoom_enabled&&t?!n.subchart_show&&e.bindZoomOnEventRect():t===!1&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom(){const t=this,{config:e,org:n,scale:r}=t,i=nC().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));i.orgScaleExtent=()=>{const o=e.zoom_extent||[1,10];return[o[0],Math.max(t.getMaxDataCount()/o[1],o[1])]},i.updateScaleExtent=function(){const o=Ca(t.scale.x.orgDomain())/Ca(t.getZoomDomain()),s=this.orgScaleExtent();return this.scaleExtent([s[0]*o,s[1]*o]),this},i.updateTransformScale=(o,s)=>{var l,c;const u=e.axis_rotated,f=iv(t,o);(l=n.xScale)==null||l.range(r.x.range());const d=f[u?"rescaleY":"rescaleX"](n.xScale||r.x);if(d.domain().some(A=>/(Invalid Date|NaN)/.test(A.toString())))return;const h=t.trimXDomain(d.domain()),m=e.zoom_rescale;if(d.domain(h,n.xDomain),s){const A=d(r.x.domain()[0]),I=u?f.x:A,C=u?A:f.y,P=ov(t,hr.translate(I,C).scale(o.k));(c=$s(t))==null||c.property("__zoom",P)}r.zoom=t.getCustomizedXScale(d),t.axis.x.scale(r.zoom),m?(!n.xScale&&(n.xScale=r.x.copy()),r.x.domain(h)):n.xScale&&(r.x.domain(n.xScale.domain()),n.xScale=null)},i.getDomain=()=>{const o=r[r.zoom?"zoom":"subX"].domain();return t.axis.isCategorized()&&(o[1]-=2),o},t.zoom=i},onZoomStart(t){const e=this,{sourceEvent:n}=t;n&&(e.zoom.startEvent=n,e.state.zooming=!0,Ne(e.config.zoom_onzoomstart,e.api,t))},onZoom(t){const e=this,{config:n,scale:r,state:i,org:o}=e,{sourceEvent:s}=t,l=(t==null?void 0:t.transform)===hr;if(!n.zoom_enabled||e.filterTargetsToShow(e.data.targets).length===0||!r.zoom&&(s==null?void 0:s.type.indexOf("touch"))>-1&&(s==null?void 0:s.touches.length)===1)return;t.sourceEvent&&(i.zooming=!0,i.domain=void 0);const c=(s==null?void 0:s.type)==="mousemove",u=(s==null?void 0:s.wheelDelta)<0,{transform:f}=t;!c&&u&&r.x.domain().every((A,I)=>A!==o.xDomain[I])&&r.x.domain(o.xDomain),e.zoom.updateTransformScale(f,n.zoom_type==="wheel"&&s);const d=n.transition_duration>0&&!n.subchart_show&&(i.dragging||l||!t.sourceEvent),h=s&&c&&n.zoom_type!=="wheel",m=()=>{var A;e.config&&(e.redraw({withTransition:d,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.state.cancelClick=c,!l&&Ne(n.zoom_onzoom,e.api,(A=e.state.domain)!=null?A:e.zoom.getDomain()))};h?qd(e.state,m):m()},onZoomEnd(t){var e,n;const r=this,{config:i,state:o}=r,s=r.zoom;if(!s)return;let{startEvent:l}=s,c=t==null?void 0:t.sourceEvent;const u=(t==null?void 0:t.transform)===hr;(l==null?void 0:l.type.indexOf("touch"))>-1&&(l=l.changedTouches[0],c=(e=c==null?void 0:c.changedTouches)==null?void 0:e[0]),!(i.zoom_type==="drag"&&c&&l.clientX===c.clientX&&l.clientY===c.clientY)&&(o.zooming=!1,!o.isCanvasMode&&r.redrawEventRect(),r.updateZoom(),!u&&(c||o.dragging)&&Ne(i.zoom_onzoomend,r.api,(n=r.state.domain)!=null?n:r.zoom.getDomain()))},updateZoom(t){const e=this,{subX:n,x:r,zoom:i}=e.scale;if(i){const o=i.domain(),s=n.domain(),l=.015,c=e.config.axis_x_inverted?(o[0]>=s[0]||o[0]+l>=s[0])&&(s[1]>=o[1]||s[1]>=o[1]+l):(o[0]<=s[0]||o[0]-l<=s[0])&&(s[1]<=o[1]||s[1]<=o[1]-l);(t||c)&&(e.axis.x.scale(n),r.domain(n.orgDomain()),e.scale.zoom=null)}},updateCurrentZoomTransform(t,e){var n;const r=this,{config:i}=r,o=i.axis_rotated,s=[-t(e[0]),0],l=hr.scale(t.range()[1]/(t(e[1])-t(e[0]))).translate(...o?s.reverse():s);(n=$s(r))==null||n.call(r.zoom.transform,ov(r,l))},bindZoomOnEventRect(){var t,e;const n=this,{config:r,$el:{svg:i}}=n,o=$s(n),s=r.zoom_type==="drag"?n.zoomBehaviour:n.zoom;n.state.isCanvasMode&&((t=s==null?void 0:s.touchable)==null||t.call(s,()=>r.interaction_inputType_touch!==!1)),!n.state.isCanvasMode&&ce.GestureEvent&&/^((?!chrome|android|mobile).)*safari/i.test((e=ce.navigator)==null?void 0:e.userAgent)&&i.on("wheel",()=>{}),o==null||o.call(s).on("dblclick.zoom",null)},initZoomBehaviour(){const t=this,{config:e,state:n}=t,r=e.axis_rotated;let i=0,o=0,s,l;const c={axis:r?"y":"x",attr:r?"height":"width",index:r?1:0},u=f=>{const[d,h]=l!=null?l:[0,r?n.height:n.width];return Math.min(Math.max(f,d),h)};t.zoomBehaviour=uh().touchable(()=>!n.isCanvasMode||e.interaction_inputType_touch!==!1).clickDistance(4).on("start",function(f){var d;l=t.scale.zoom?null:t.axis.getExtent(),n.event=f,t.setDragStatus(!0),t.unselectRect(),!n.isCanvasMode&&!s&&(s=t.$el.main.append("rect").attr("clip-path",n.clip.path).attr("class",lc.zoomBrush).attr("width",r?n.width:0).attr("height",r?0:n.height)),s==null||s.attr(r?"width":"height",r?n.width:n.height),i=u(sv(t,f,this)[c.index]),o=i,n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,o):s.attr(c.axis,i).attr(c.attr,0),t.onZoomStart(f)}).on("drag",function(f){var d;o=u(sv(t,f,this)[c.index]),n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,o):s.attr(c.axis,Math.min(i,o)).attr(c.attr,Math.abs(o-i))}).on("end",f=>{var d;const h=t.scale.zoom||t.scale.x;n.event=f,o=u(o),n.isCanvasMode?(d=t.clearCanvasZoomBrush)==null||d.call(t):s.attr(c.axis,0).attr(c.attr,0),i>o&&([i,o]=[o,i]),i<0&&(o+=Math.abs(i),i=0),i!==o&&t.api.zoom([i,o].map(m=>h.invert(m))),t.setDragStatus(!1)})},setZoomResetButton(){const t=this,{config:e,$el:n}=t,r=e.zoom_resetButton;r&&e.zoom_type==="drag"&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(ze.button,!0).append("span").on("click",function(){le(r.onclick)&&r.onclick.bind(t.api)(this),t.api.unzoom()}).classed(lc.buttonZoomReset,!0).text(r.text||"Reset Zoom"))},getZoomTransform(){const t=this,e=$s(t),n=e==null?void 0:e.node();return n?iv(t,qc(n)):{k:1}}},iC={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0};let lv=()=>(yn(Er.prototype,aC),yn(Kn.prototype,rC),Da.setOptions([iC]),(lv=()=>!0)());function cv(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function uv(t,e=!1){const n=this.internal,{config:r}=n,i=r.transition_duration&&Qi();return t?(r.regions=e?r.regions.concat(t):t,n.state.isCanvasMode?(cv(n),r.regions):(n.updateRegion(),n.redrawRegion(i),r.regions)):r.regions}const fv=function(t){return uv.bind(this)(t)};yn(fv,{add:function(t){return uv.bind(this)(t,!0)},remove:function(t){const e=this.internal,{config:n,$T:r}=e,i=t||{},o=ia(i,"classes",[Ji.region]);let s=n.regions;if(e.state.isCanvasMode)return Object.keys(i).length?(s=s.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{o.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=s):n.regions=[],cv(e),n.regions;const l=e.$el.main.select(`.${Ji.regions}`).selectAll(o.map(c=>`.${c}`));return r(l).style("opacity","0").remove(),Object.keys(i).length?(s=s.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{o.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=s):n.regions=[],s}});var oC={regions:fv},sC={initRegion(){const t=this,{$el:e}=t;e.region.main=e.main.insert("g",":first-child").attr("clip-path",t.state.clip.path).attr("class",Ji.regions)},updateRegion(){const t=this,{config:e,$el:{region:n},$T:r}=t;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);const i=n.main.selectAll(`.${Ji.region}`).data(e.regions);r(i.exit()).style("opacity","0").remove();const o=i.enter().append("g");o.append("rect").style("fill-opacity","0"),n.list=o.merge(i).attr("class",t.classRegion.bind(t)),n.list.each(function(s){var l;kt(this).select("text").empty()&&((l=s.label)!=null&&l.text)&&kt(this).append("text").style("opacity","0")})},redrawRegion(t){const e=this,{$el:{region:n},$T:r}=e,i=e.regionX.bind(e),o=e.regionY.bind(e),s=["width","height"];let l=n.list.select("rect"),c=n.list.selectAll("text");return l=r(l,t).attr("x",i).attr("y",o).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),c=r(c,t).text(u=>{var f;return(f=u.label)==null?void 0:f.text}).attr("transform",({label:u})=>u.rotated?" rotate(-90)":null).attr("transform",function(u){var f;const{x:d=0,y:h=0,center:m=!1,rotated:A=!1}=(f=u.label)!=null?f:{},I=this.previousElementSibling,C={x:0,y:0};return Ke(m)&&["x","y"].forEach((P,z)=>{m.indexOf(P)>-1&&(C[P]=(+I.getAttribute(s[z])-un(this)[s[z]])/2)}),`translate(${i(u)+C.x+d}, ${o(u)+C.y+h})${A?" rotate(-90)":""}`}).attr("text-anchor",({label:u})=>u!=null&&u.rotated?"end":null).attr("dy","1em").style("fill",({label:u})=>{var f;return(f=u==null?void 0:u.color)!=null?f:null}),[l.style("fill-opacity",u=>We(u.opacity)?u.opacity:null).on("end",function(){kt(this.parentNode).selectAll("rect:not([x])").remove()}),c.style("opacity",null)]},regionX(t){return this.getRegionSize("x",t)},regionY(t){return this.getRegionSize("y",t)},regionWidth(t){return this.getRegionSize("width",t)},regionHeight(t){return this.getRegionSize("height",t)},getRegionSize(t,e){const n=this,{config:r,scale:i,state:o}=n,s=r.axis_rotated,l=/(x|y|y2)/.test(t),c=l?t==="x":t==="width",u=!l&&n[c?"regionX":"regionY"](e);let f=l?"start":"end",d=l?0:o[t],h;if(e.axis==="y"||e.axis==="y2"?(!l&&!c?f="start":l&&!c&&(f="end"),(c?s:!s)&&f in e&&(h=i[e.axis])):(c?!s:s)&&f in e&&(h=i.zoom||i.x),h){let m=0;d=e[f],n.axis.isTimeSeries(e.axis)?d=Hn.call(n,d):/(x|width)/.test(t)&&n.axis.isCategorized()&&isNaN(d)&&(d=r.axis_x_categories.indexOf(d),m=n.axis.x.tickOffset()*(f==="start"?-1:1)),d=h(d)+m}return l?d:d<u?0:d-u},isRegionOnX(t){return!t.axis||t.axis==="x"}};let dv=()=>(yn(Er.prototype,sC),Kn.prototype.regions=oC.regions,(dv=()=>({}))());var hi={initArea(t){const e=this,{config:n}=e;t.insert("g",`.${n.area_front?Bn.circles:Lr.lines}`).attr("class",e.getClass("areas",!0))},updateAreaColor(t){const e=this;return vg.call(e,t,"area_linearGradient",e.color)},updateArea(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,state:i,$el:o,$T:s}=n,l=e?o.subchart:o;r.area_linearGradient&&n.updateLinearGradient();const c=l.main.selectAll(`.${as.areas}`).selectAll(`.${as.area}`).data(n.lineData.bind(n));s(c.exit(),t).style("opacity","0").remove(),l.area=c.enter().append("path").attr("class",n.getClass("area",!0)).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(){return i.orgAreaOpacity=kt(this).style("opacity"),"0"}).merge(c),c.style("opacity",i.orgAreaOpacity),n.setRatioForGroupedData(l.area.data())},redrawArea(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{area:i}=n?this.$el.subchart:this.$el,{orgAreaOpacity:o}=r.state;return[r.$T(i,e,Rr()).attr("d",t).style("fill",r.updateAreaColor.bind(r)).style("opacity",s=>String(r.isAreaRangeType(s)?o/1.75:o))]},generateDrawArea(t,e){return ud(this,t,e)}},gi={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},eu={spline_interpolation_type:"cardinal"};function lC(t){return Qn(t)&&le(t.create)&&le(t.update)}function cC(t,e){var n;const r=this,i=(c,u)=>{const f=c.attributes;for(let d=0,h;h=f[d];d++)h=h.name,u.setAttribute(h,c.getAttribute(h))},s=new DOMParser().parseFromString(Xr(t),"image/svg+xml").documentElement,l=He.createElementNS(Qt.svg,s.nodeName.toLowerCase());if(l.id=e,l.style.fill="inherit",l.style.stroke="inherit",i(s,l),(n=s.childNodes)!=null&&n.length){const c=kt(l);"innerHTML"in l?c.html(Xr(s.innerHTML)):Ia(s.childNodes).forEach(u=>{i(u,c.append(u.tagName).node())})}r.$el.defs.node().appendChild(l)}var vi={hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasLegendDefsPoint(){var t;const{config:e}=this;return e.legend_show&&((t=e.point_pattern)==null?void 0:t.length)&&e.legend_usePoint},getDefsPointId(t){const{state:{datetimeId:e}}=this;return`${e}-point${t}`},getValidPointPattern(){const{config:t}=this,e=/^(circle|rect(angle)?)$/i.test(t.point_type)?t.point_type:"circle";return vn(t.point_pattern)?t.point_pattern:[e]},generatePoint(){const t=this,{$el:e,config:n}=t,r=[],i=t.getValidPointPattern();return function(o,s,...l){return function(c){var u,f,d,h;const m=t.getTargetSelectorSuffix(c.id||((u=c.data)==null?void 0:u.id)||c),A=kt(this);r.indexOf(m)<0&&r.push(m);let I=i[r.indexOf(m)%i.length];if(t.hasValidPointType(I))I=t[I];else if(!lC(I||n.point_type)){const C=t.getDefsPointId(m);if(e.defs.select(`#${C}`).size()<1&&cC.call(t,I,C),o==="create")return(f=t.custom)==null?void 0:f.create.bind(s)(A,C,...l);if(o==="update")return(d=t.custom)==null?void 0:d.update.bind(s)(A,...l)}return(h=I[o])==null?void 0:h.bind(s)(A,...l)}}}};function uC(t,e,n,r=!1){const i=t?[t,0]:n;for(let o=t||n.reduce((s,l)=>s+l);o<=e;)n.forEach(s=>{o+s<=e&&i.push(s),o+=s});return i.length%2!==0&&i.push(r?n[1]:0),{dash:i.join(" "),length:i.reduce((o,s)=>o+s,0)}}var fC={initLine(){pg.call(this,{elKey:"line",className:Lr.chartLines,cssRules:["pointer-events:none"]})},updateTargetsForLine(t){const e=this,{$el:{area:n,main:r}}=e,i=e.getClass("lines",!0),o=t.filter(l=>!(e.isScatterType(l)||e.isBubbleType(l))),s=jc.call(e,o,{type:"Line",elKey:"line",containerClass:Lr.chartLines,itemClass:Lr.chartLine,initFn:e.initLine});if(s.append("g").attr("class",i),e.hasTypeOf("Area")){const l=r.select(`.${Lr.chartLines}`).selectAll(`.${Lr.chartLine}`),c=(!n&&s.empty()?l:s).filter(e.isAreaType.bind(e));e.initArea(c)}e.updateTargetForCircle(o,s)},updateLine(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{format:{extraLineClasses:r},$el:i,$T:o}=n,s=e?i.subchart:i,l=s.main.selectAll(`.${Lr.lines}`).selectAll(`.${Lr.line}`).data(n.lineData.bind(n));o(l.exit(),t).style("opacity","0").remove(),s.line=l.enter().append("path").attr("class",c=>`${n.getClass("line",!0)(c)} ${r(c)||""}`).style("stroke",n.color).merge(l).style("opacity",n.initialOpacity.bind(n)).attr("transform",null)},redrawLine(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{$el:i,$T:o}=r,{line:s}=n?i.subchart:i;return[o(s,e,Rr()).attr("d",t).style("stroke",this.color).style("opacity",null)]},generateDrawLine(t,e){return cd(this,t,e)},lineWithRegions(t,e,n,r){const i=this,{config:o}=i,s=o.axis_rotated,l=i.axis.isTimeSeries(),c="2 2",u=td(i,t,r),f=i.hasNullDataValue(t);let d,h,m,A;const I=s?et=>n(et.value):et=>e(et.x),C=s?et=>e(et.x):et=>n(et.value),P=et=>`M${et[0][0]},${et[0][1]}L${et[1][0]},${et[1][1]}`,z=l?(et,ot,lt,ft)=>{const _=et.x.getTime(),dt=ot.x-et.x,ut=new Date(_+dt*lt),xt=new Date(_+dt*(lt+ft)),bt=s?[[n(h(lt)),e(ut)],[n(h(lt+m)),e(xt)]]:[[e(ut),n(h(lt))],[e(xt),n(h(lt+m))]];return P(bt)}:(et,ot,lt,ft)=>{const _=e(ot.x,!s),dt=n(ot.value,s),ut=lt+ft,xt=e(d(lt),!s),bt=n(h(lt),s);let Rt=e(d(ut),!s),Et=n(h(ut),s);Rt>_&&(Rt=_),et.value>ot.value&&(s?Et<dt:Et>dt)&&(Et=dt);const Zt=[[xt,bt],[Rt,Et]];return s&&Zt.forEach(fe=>fe.reverse()),P(Zt)},N={x:i.axis.getAxisType("x"),y:i.axis.getAxisType("y")};let B="";if(!t.length)return B;const W=i.$el.line.filter(({id:et})=>et===t[0].id),V=W.clone().style("display","none"),J=(et,ot)=>et.attr("d",ot).node().getTotalLength(),q={dash:[],lastLength:0};let at=!1;for(let et=0,ot;ot=t[et];et++){const lt=t[et-1],ft=lt&&We(lt.value);let _=i.isWithinRegions(ot.x,u);if(We(ot.value)){if(xn(u)||!_||!ft)B+=`${et&&ft?"L":"M"}${I(ot)},${C(ot)}`;else if(ft)if(_=((_==null?void 0:_.dasharray)||c).split(" ").map(Number),d=oa(N.x,lt.x,ot.x),h=oa(N.y,lt.value,ot.value),f){const dt=e(ot.x)-e(lt.x),ut=n(ot.value)-n(lt.value),xt=Math.sqrt(dt*dt+ut*ut);m=_[0]/xt,A=m*_[1];for(let bt=m;bt<=1;bt+=A)B+=z(lt,ot,bt,m),bt+A>=1&&(B+=z(lt,ot,1,0))}else{let dt;if(at=ot.x===t[t.length-1].x,l){const Rt=+lt.x,Et=new Date(Rt),Zt=new Date(Rt+(+ot.x-Rt));dt=[[e(Et),n(h(0))],[e(Zt),n(h(1))]]}else dt=[[e(d(0)),n(h(0))],[e(d(1)),n(h(1))]];s&&dt.forEach(Rt=>Rt.reverse());const ut=J(V,B),xt=J(V,B+=`L${dt[1].join(",")}`),bt=uC(ut-q.lastLength,xt-q.lastLength,_,at);q.lastLength+=bt.length,q.dash.push(bt.dash)}}}return q.dash.length&&(!at&&q.dash.push(J(V,B)),W.attr("stroke-dasharray",q.dash.join(" "))),V.remove(),B},isWithinRegions(t,e){return ed(t,e)},isWithinStep(t,e){return Math.abs(e-ir(this.state.event,t)[1])<30},shouldDrawPointsForLine(t){const e=this.config.line_point;return e===!0||nn(e)&&e.indexOf(t.id)!==-1}};const pi=()=>Rr(),hv=new WeakMap;function gv(t){const e=t.getAttribute("height"),n=t.getAttribute("width"),r=t.getAttribute("href")||t.getAttribute("xlink:href"),i=hv.get(t);if(i&&i.attrHeight===e&&i.attrWidth===n&&i.href===r)return i;const{width:o,height:s}=ga(t),l={attrHeight:e,attrWidth:n,height:s,href:r,width:o};return hv.set(t,l),l}var Bs={initialOpacityForCircle(t){const{config:e,state:{withoutFadeIn:n}}=this;let r=e.point_opacity;return xn(r)&&(r=this.getBaseValue(t)!==null&&n[t.id]?this.opacityForCircle(t):"0"),r},opacityForCircle(t){var e;const{config:n}=this;let r=n.point_opacity;return xn(r)&&(r=n.point_show&&!((e=this.isPointFocusOnly)!=null&&e.call(this))?null:"0",r=We(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":r:"0"),r},initCircle(){const t=this,{$el:{main:e}}=t;!t.point&&(t.point=t.generatePoint()),(t.hasType("bubble")||t.hasType("scatter"))&&e.select(`.${ze.chart} > .${Bn.chartCircles}`).empty()&&e.select(`.${ze.chart}`).append("g").attr("class",Bn.chartCircles)},updateTargetForCircle(t,e){const n=this,{config:r,data:i,$el:o}=n,s=r.interaction_enabled&&r.data_selection_enabled,l=s&&r.data_selection_isselectable,c=n.getClass("circles",!0);if(!r.point_show)return;n.initCircle();let u=t,f=e;if(!u){u=n.filterNullish(i.targets).filter(h=>this.isScatterType(h)||this.isBubbleType(h));const d=o.main.select(`.${Bn.chartCircles}`).style("pointer-events","none").selectAll(`.${Bn.circles}`).data(u);d.exit().remove(),f=d.enter()}s&&f.append("g").attr("class",d=>n.generateClass(gn.selectedCircles,d.id)),f.append("g").attr("class",c).call(d=>{n.setCssRule(!0,`.${Bn.circles}`,["cursor:pointer"],l)(d),n.setCssRule(!0,` .${Bn.circle}`,["fill","stroke"],n.color)(d)}).style("opacity",function(){return kt(this.parentNode).classed(Bn.chartCircles)?"0":null}),s&&u.forEach(d=>{o.main.selectAll(`.${gn.selectedCircles}${n.getTargetSelectorSuffix(d.id)}`).selectAll(`${gn.selectedCircle}`).each(h=>{h.value=d.values[h.index].value})})},updateCircle(t=!1){const e=this,{config:n,state:r,$el:i}=e,o=e.isPointFocusOnly(),s=t?i.subchart:i;if(n.point_show&&!r.toggling){n.point_radialGradient&&e.updateLinearGradient();const l=s.main.selectAll(`.${Bn.circles}`).selectAll(`.${Bn.circle}`).data(d=>{const h=e.isLineType(d)&&e.shouldDrawPointsForLine(d)||e.isBubbleType(d)||e.isRadarType(d)||e.isScatterType(d)?o?[d.values[0]]:d.values:[];return e.filterNullish(h)});l.exit().remove();const c=e.pointR.bind(e),u=e.generateUpdateCircleColor(),f=e.initialOpacityForCircle.bind(e);l.enter().filter(Boolean).append(e.point("create",this,c,u)),s.circle=s.main.selectAll(`.${Bn.circles} .${Bn.circle}`).style("stroke",e.getStylePropValue(e.color)).style("opacity",f)}},generateUpdateCircleColor(){const t=this,e=t.getStylePropValue(t.color);return n=>t.config.point_radialGradient?t.getGradienColortUrl(n.id):e?e(n):null},updateCircleColor(t){return this.generateUpdateCircleColor()(t)},redrawCircle(t,e,n,r,i=!1){const o=this,{state:{rendered:s},$el:l,$T:c}=o,u=i?l.subchart:l,f=u.main.selectAll(`.${gn.selectedCircle}`);if(!o.config.point_show)return[];const d=o.isCirclePoint()?"c":"",h=Rr(),m=o.opacityForCircle.bind(o),A=o.generateUpdateCircleColor();if(o.isCirclePoint()){const P=u.circle;return o.hasType("bubble")&&P.attr("r",o.pointR.bind(o)),n?(r&&P.attr("cx",t),c(P.filter(function(){return!!this.getAttribute("cx")}),!0,`${h}-pos`).attr("cx",t).attr("cy",e).style("fill",A),P.filter(function(){return!this.getAttribute("cx")}).attr("cx",t).attr("cy",e).style("fill",A)):P.attr("cx",t).attr("cy",e).style("fill",A),[[c(P,n||!s,h).style("opacity",m)],c(f,n).attr("cx",t).attr("cy",e)]}const I=o.point("update",o,t,e,A,n,r,f),C=[];return u.circle.each(function(P){let z=I.bind(this)(P);z=c(z,n||!s,h).style("opacity",m),C.push(z)}),[C,c(f,n).attr(`${d}x`,t).attr(`${d}y`,e)]},showCircleFocus(t){const e=this,{state:{hasRadar:n,resizing:r,toggling:i,transiting:o},$el:s}=e;let{circle:l}=s;if(o===!1&&l&&e.isPointFocusOnly()){const c=(n?e.radarCircleX:e.circleX).bind(e),u=(n?e.radarCircleY:e.circleY).bind(e),f=i||xn(t),d=e.point("update",e,c,u,e.getStylePropValue(e.color),r?!1:f);t&&(l=l.filter(function(h){var m;const A=(m=t.filter)==null?void 0:m.call(t,I=>I.id===h.id);return A.length?kt(this).datum(A[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(h){const{id:m,index:A,value:I}=h;let C="hidden";We(I)&&(d.bind(this)(h),e.expandCircles(A,m),C=""),this.style.visibility=C})}},hideCircleFocus(){const t=this,{$el:{circle:e}}=t;t.isPointFocusOnly()&&e&&(t.unexpandCircles(),e.style("visibility","hidden"))},expandCircles(t,e,n){const r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles();const o=r.getShapeByIndex("circle",t,e).classed(ze.EXPANDED,!0),s=i(o)/r.config.point_r,l=1-s;r.isCirclePoint()?o.attr("r",i):o.each(function(){const c=kt(this);if(this.tagName==="circle")c.attr("r",i);else{const{width:u,height:f}=gv(this),d=l*(+c.attr("x")+u/2),h=l*(+c.attr("y")+f/2);c.attr("transform",`translate(${d} ${h}) scale(${s})`)}})},unexpandCircles(t){const e=this,n=e.pointR.bind(e),r=e.getShapeByIndex("circle",t).filter(function(){return kt(this).classed(ze.EXPANDED)}).classed(ze.EXPANDED,!1);if(r.attr("r",n),!e.isCirclePoint()){const i=n(r)/e.config.point_r;r.attr("transform",i!==1?`scale(${i})`:null)}},isWithinCircle(t,e){const{state:n}=this,r=ir(n.event,t),i=kt(t),o=this.isCirclePoint(t)?"c":"",s=this.getPointSensitivity(i==null?void 0:i.datum());let l=+i.attr(`${o}x`),c=+i.attr(`${o}y`);if(!(l||c)&&t.nodeType===1){const{x:d,y:h}=un(t);l=d,c=h}const u=l-r[0],f=c-r[1];return Math.sqrt(u*u+f*f)<(e||s)},updatePointClass(t){const e=this,{circle:n}=e.$el;let r=!1;return(je(t)||n)&&(r=t===!0?n.each(function(i){let o=e.getClass("circle",!0)(i);this.getAttribute("class").indexOf(ze.EXPANDED)>-1&&(o+=` ${ze.EXPANDED}`),this.setAttribute("class",o)}):e.getClass("circle",!0)(t)),r},custom:{create(t,e,n){return t.append("use").attr("xlink:href",`#${e}`).attr("class",this.updatePointClass.bind(this)).style("fill",n).node()},update(t,e,n,r,i,o,s){const l=this,{width:c,height:u}=gv(t.node()),f=m=>We(m.value)?e(m)-c/2:0,d=m=>We(m.value)?n(m)-u/2:0;let h=t;return i&&(o&&h.attr("x",f),h=l.$T(h,i,pi()),s&&l.$T(s,i,pi())),h.attr("x",f).attr("y",d).style("fill",r)}},circle:{create(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update(t,e,n,r,i,o,s){const l=this;let c=t;return l.hasType("bubble")&&c.attr("r",l.pointR.bind(l)),i&&(o&&c.attr("cx",e),c.attr("cx")&&(c=l.$T(c,i,pi())),s&&l.$T(s,i,pi())),c.attr("cx",e).attr("cy",n).style("fill",r)}},rectangle:{create(t,e,n){const r=i=>e(i)*2;return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",r).attr("height",r).style("fill",n).node()},update(t,e,n,r,i,o,s){const l=this,c=l.config.point_r,u=h=>e(h)-c,f=h=>n(h)-c;let d=t;return i&&(o&&d.attr("x",u),d=l.$T(d,i,pi()),s&&l.$T(s,i,pi())),d.attr("x",u).attr("y",f).style("fill",r)}}},Ba={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle"},dC={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0};function vv(t,e,n){const{config:r}=t,i=(o,s)=>{const l=ge(s)?s:s===!1?void 0:null;l!==null&&(r[`axis_${o}_${e}`]=l)};sn(n)&&(Qn(n)?Object.keys(n).forEach(o=>{i(o,n[o])}):(ge(n)||n===!1)&&["y","y2"].forEach(o=>{i(o,n)}),t.state.dirty.data=!0,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function pv(t,e){const{config:n}=t;return{x:n[`axis_x_${e}`],y:n[`axis_y_${e}`],y2:n[`axis_y2_${e}`]}}var hC={axis:{labels:function(t){var e;const n=this.internal;let r;return t&&(Object.keys(t).forEach(i=>{n.axis.setLabelText(i,t[i])}),n.state.isCanvasMode?(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1):n.axis.updateLabels()),["x","y","y2"].forEach(i=>{const o=n.axis.getLabelText(i);o&&(!r&&(r={}),r[i]=o)}),r},min:function(t){const e=this.internal;return We(t)||t===!1?vv(e,"min",t):pv(e,"min")},max:function(t){const e=this.internal;return We(t)||t===!1?vv(e,"max",t):pv(e,"max")},range:function(t){const{axis:e}=this;if(arguments.length){const{min:n,max:r}=t;sn(r)&&e.max(r),sn(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}}},gC={groups(t){const e=this.internal,{config:n}=e;return xn(t)||(n.data_groups=t,e.state.dirty.data=!0,e.redraw()),n.data_groups}},vC={x(t){const e=this.internal,{axis:n,data:r}=e,i=n.isCustomX()&&n.isCategorized();return nn(t)&&(i?this.categories(t):(e.updateTargetX(r.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),i?this.categories():r.xs},xs(t){const e=this.internal;return je(t)&&(e.updateTargetXs(e.data.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}};function pC(t){return t}var zs=1,Us=2,nu=3,lo=4,mv=1e-6;function mC(t){return"translate("+t+",0)"}function xC(t){return"translate(0,"+t+")"}function yC(t){return e=>+t(e)}function TC(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function bC(){return!this.__axis}function ks(t,e){var n=[],r=null,i=null,o=6,s=6,l=3,c=typeof window!="undefined"&&window.devicePixelRatio>1?0:.5,u=t===zs||t===lo?-1:1,f=t===lo||t===Us?"x":"y",d=t===zs||t===nu?mC:xC;function h(m){var A=r==null?e.ticks?e.ticks.apply(e,n):e.domain():r,I=i==null?e.tickFormat?e.tickFormat.apply(e,n):pC:i,C=Math.max(o,0)+l,P=e.range(),z=+P[0]+c,N=+P[P.length-1]+c,B=(e.bandwidth?TC:yC)(e.copy(),c),W=m.selection?m.selection():m,V=W.selectAll(".domain").data([null]),J=W.selectAll(".tick").data(A,e).order(),q=J.exit(),at=J.enter().append("g").attr("class","tick"),et=J.select("line"),ot=J.select("text");V=V.merge(V.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),J=J.merge(at),et=et.merge(at.append("line").attr("stroke","currentColor").attr(f+"2",u*o)),ot=ot.merge(at.append("text").attr("fill","currentColor").attr(f,u*C).attr("dy",t===zs?"0em":t===nu?"0.71em":"0.32em")),m!==W&&(V=V.transition(m),J=J.transition(m),et=et.transition(m),ot=ot.transition(m),q=q.transition(m).attr("opacity",mv).attr("transform",function(lt){return isFinite(lt=B(lt))?d(lt+c):this.getAttribute("transform")}),at.attr("opacity",mv).attr("transform",function(lt){var ft=this.parentNode.__axis;return d((ft&&isFinite(ft=ft(lt))?ft:B(lt))+c)})),q.remove(),V.attr("d",t===lo||t===Us?s?"M"+u*s+","+z+"H"+c+"V"+N+"H"+u*s:"M"+c+","+z+"V"+N:s?"M"+z+","+u*s+"V"+c+"H"+N+"V"+u*s:"M"+z+","+c+"H"+N),J.attr("opacity",1).attr("transform",function(lt){return d(B(lt)+c)}),et.attr(f+"2",u*o),ot.attr(f,u*C).text(I),W.filter(bC).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Us?"start":t===lo?"end":"middle"),W.each(function(){this.__axis=B})}return h.scale=function(m){return arguments.length?(e=m,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(m){return arguments.length?(n=m==null?[]:Array.from(m),h):n.slice()},h.tickValues=function(m){return arguments.length?(r=m==null?null:Array.from(m),h):r&&r.slice()},h.tickFormat=function(m){return arguments.length?(i=m,h):i},h.tickSize=function(m){return arguments.length?(o=s=+m,h):o},h.tickSizeInner=function(m){return arguments.length?(o=+m,h):o},h.tickSizeOuter=function(m){return arguments.length?(s=+m,h):s},h.tickPadding=function(m){return arguments.length?(l=+m,h):l},h.offset=function(m){return arguments.length?(c=+m,h):c},h}function SC(t){return ks(zs,t)}function AC(t){return ks(Us,t)}function xv(t){return ks(nu,t)}function yv(t){return ks(lo,t)}var EC=Object.defineProperty,CC=(t,e,n)=>e in t?EC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xs=(t,e,n)=>CC(t,typeof e!="symbol"?e+"":e,n);class IC{constructor(e){Xs(this,"owner"),Xs(this,"config"),Xs(this,"scale"),Xs(this,"charSize",{});const n=oa(),{config:r,params:i}=e;this.owner=e,this.config=r,this.scale=n,(r.noTransition||!i.config.transition_duration)&&(r.withoutTransition=!0),r.range=this.scaleExtent((i.orgXScale||n).range())}getSizeFor1Char(e,n,r=!0){const i={w:5.5,h:11.5};return this.charSize[e]&&r?this.charSize[e]:(!n.empty()&&n.text("0").call(o=>{try{const{width:s,height:l}=ga(o.node(),!0);s&&l&&(i.w=s,i.h=l)}finally{o.text("")}}),this.charSize[e]=i,i)}getTickTransformSetter(e){const{config:n}=this,r=e==="x"?i=>`translate(${i+n.tickOffset},0)`:i=>`translate(0,${i})`;return(i,o)=>{i.attr("transform",s=>{const l=o(s);return We(s)?r(l):null})}}scaleExtent(e){const n=e[0],r=e[e.length-1];return n<r?[n,r]:[r,n]}generateTicks(e,n){const{tickStepSize:r}=this.owner.params,[i,o]=e.domain();let s=[];if(n&&r){let l=Math.round(i);for(;l<=o;)s.push(l),l+=r}else if(e.ticks){const{tickArguments:l}=this.config;if(e.type==="log"&&!l){const c=oa("_log").domain([i>0?i:1,o]).range(e.range());s=c.ticks();for(let u=o.toFixed().length;s.length>15;u--)s=c.ticks(u);s.splice(0,1,i),s.splice(s.length-1,1,o)}else s=e.ticks(...this.config.tickArguments||[])}return s}copyScale(){const e=this.scale.copy();return e.domain().length||e.domain(this.scale.domain()),e.type=this.scale.type,e}textFormatted(e){const n=this.config.tickFormat,r=/\d+\.\d+0{5,}\d$/.test(e)?+String(e).replace(/0+\d$/,""):e,i=n?n(r):r;return sn(i)?i:""}transitionise(e){const{config:n}=this;let r=e;if(n.withoutTransition)r=e.interrupt();else if(n.transition||!this.owner.params.noTransition)try{r=e.transition(n.transition)}catch(i){}return r}}var RC=Object.defineProperty,OC=(t,e,n)=>e in t?RC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,co=(t,e,n)=>OC(t,typeof e!="symbol"?e+"":e,n);class wC{constructor(e={}){co(this,"helper"),co(this,"config"),co(this,"params"),co(this,"g"),co(this,"generatedTicks",[]);const n={innerTickSize:Dt,outerTickSize:e.outerTick?Dt:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:pr,tickOffset:0,tickPadding:on,tickValues:null,transition:null,noTransition:e.noTransition};n.tickLength=Math.max(n.innerTickSize,0)+n.tickPadding,this.config=n,this.params=e,this.helper=new IC(this)}canReuseTickTextOnResize(e){const{config:n,params:r}=this,{config:i,id:o,owner:s}=r,l=/^(x|subX)$/.test(o),u=o==="subX"?i.subchart_axis_x_tick_format||i.axis_x_tick_format:i[`axis_${o==="subX"?"x":o}_tick_format`],f=r.tickMultiline&&r.isCategory&&!e&&!(r.tickWidth>0);return!!(s.state.resizing&&!s.state.flowing&&!le(i.axis_evalTextSize)&&!u&&!r.tickTitle&&!(l&&i.axis_x_tick_autorotate)&&!f&&n.withoutTransition)}canReuseTickNodesOnResize(e,n,r,i){if(i.tick||!i.text||!this.canReuseTickTextOnResize(r)||e.size()!==n.length)return!1;const o=e.nodes();for(let s=0;s<n.length;s++){const l=o[s].__data__,c=n[s];if(l instanceof Date||c instanceof Date){if(+l!=+c)return!1}else if(l!==c)return!1}return!0}create(e){const n=this,{config:r,helper:i,params:o}=n,{scale:s}=i,{orient:l}=r,c=this.splitTickText.bind(n),u=/^(left|right)$/.test(l),f=/^(top|bottom)$/.test(l),d=i.getTickTransformSetter(f?"x":"y"),h=d===i.axisX?"y":"x",m=/^(top|left)$/.test(l)?-1:1,A=o.tickTextRotate;this.config.range=s.rangeExtent?s.rangeExtent():i.scaleExtent((o.orgXScale||s).range());const{innerTickSize:I,tickLength:C,range:P}=r,z=o.id,N=z&&/^(x|y|y2)$/.test(z)?o.config[`axis_${z}_tick_text_position`]:{x:0,y:0},B=z==="subX"?"subchart_axis_x":`axis_${z}`,W=o.config[`${B}_show`],V={tick:W?o.config[`${B}_tick_show`]:!1,text:W?o.config[`${B}_tick_text_show`]:!1},J=o.config.axis_evalTextSize;let q;e.each(function(){const at=kt(this);let et=this.__chart__||s,ot=i.copyScale();q=at,this.__chart__=ot,r.tickOffset=o.isCategory?(ot(1)-ot(0))/2:0;const lt=at.selectAll(".domain").data([0]);if(lt.enter().append("path").attr("class","domain").merge(lt).attr("d",()=>{const ft=r.outerTickSize*m;return f?`M${P[0]},${ft}V0H${P[1]}V${ft}`:`M${ft},${P[0]}H0V${P[1]}H${ft}`}),V.tick||V.text){const ft=r.tickValues||i.generateTicks(ot,u||o.config.axis_rotated);n.generatedTicks=ft;let _=at.selectAll(".tick");if(n.canReuseTickNodesOnResize(_,ft,u||o.config.axis_rotated,V))d(_,ot);else{_=_.data(ft,ot);const ut=_.enter().insert("g",".domain").attr("class","tick"),xt=_.exit().remove();_=ut.merge(_),V.tick&&ut.append("line"),V.text&&ut.append("text");const bt=!ut.empty()||!xt.empty(),Rt=V.text&&!bt&&n.canReuseTickTextOnResize(u||o.config.axis_rotated);let Et={w:0,h:0},Zt=_.selectAll("text.__bb-empty");if(V.text&&!Rt){const me=_.select("text"),xe=[];Zt=me,le(J)&&(Et=J.bind(n.params.owner.api)(me.node(),z),this.classList.contains(ze.dummy)&&(this.sizeFor1Char=Et)),(!Et||Et.w===0||Et.h===0)&&(Et=n.helper.getSizeFor1Char(l,me,!!J));let Te=me.selectAll("tspan").data((Fe,Ie)=>{let ke;if(o.tickMultiline)ke=c(Fe,ot,ft,u,Et.w);else{const Jt=i.textFormatted(Fe);ke=nn(Jt)?Jt.concat():[Jt]}return xe[Ie]=ke.length,ke.map(Jt=>({index:Ie,splitted:Jt}))});Te.exit().remove(),Te=Te.enter().append("tspan").merge(Te).text(Fe=>Fe.splitted),Te.attr("x",f?0:C*m).attr("dx",(()=>{let Fe=0;return/(top|bottom)/.test(l)&&A&&(Fe=8*Math.sin(Math.PI*(A/180))*(l==="top"?-1:1)),Fe+(N.x||0)})()).attr("dy",(Fe,Ie)=>{const ke=".71em";let Jt=0;return l!=="top"&&(Jt=Et.h,Ie===0&&(Jt=u?-((xe[Fe.index]-1)*(Et.h/2)-3):N.y===0?ke:0)),ge(Jt)&&N.y?Jt+N.y:Jt||ke})}const fe=_.select("line");if(ut.select("line").attr(`${h}2`,I*m),ut.select("text").attr(h,C*m),n.setTickLineTextPosition(fe,Zt,Et),o.tickTitle){const me=Zt.select("title"),xe=o.tickTitle;(me.empty()?Zt.append("title"):me).text(Te=>xe[Number(Te)])}if(ot.bandwidth){const me=ot,xe=me.bandwidth()/2;et=Te=>me(Te)+xe,ot=et}else et.bandwidth?et=ot:d(xt,ot);_=o.owner.state.flowing?i.transitionise(_):o.owner.$T(_),d(ut,et),d(_.style("opacity",null),ot)}}}),this.g=q}getGeneratedTicks(e){var n;const r=((n=this.generatedTicks)==null?void 0:n.length)-1;let i=this.generatedTicks;if(r>e){const o=Math.round(r/e+.1);i=this.generatedTicks.map((s,l)=>l%o===0?s:null).filter(s=>s!==null).splice(0,e)}return i}getTickXY(){const{config:e}=this,n={x:0,y:0};return this.params.isCategory&&(n.x=e.tickCentered?0:e.tickOffset,n.y=e.tickCentered?e.tickOffset:0),n}getTickSize(e){const{scale:n}=this.helper,{config:r}=this,{innerTickSize:i,range:o}=r,s=n(e)+(r.tickCentered?0:r.tickOffset);return o[0]<s&&s<o[1]?i:0}setTickLineTextPosition(e,n,r){const i=this.getTickXY(),{innerTickSize:o,orient:s,tickLength:l,tickOffset:c}=this.config,u=this.params.id,f=this.params.tickTextRotate,d=6,h=r.h/2-d,m=N=>{const B=["start","end"];return s==="top"&&B.reverse(),N?B[N>0?0:1]:"middle"},A=N=>N?`rotate(${N})`:null,I=N=>{const B=N/(s==="bottom"?15:23);return N?11.5-2.5*B*(N>0?1:-1):l},{config:{axis_rotated:C,axis_x_tick_text_inner:P}}=this.params.owner,z=this.params.config[`axis_${u}_tick_inner`];switch(s){case"bottom":e.attr("x1",i.x).attr("x2",i.x).attr("y2",N=>this.getTickSize.bind(this)(N)*(z?-1:1)),n.attr("x",0).attr("y",I(f)).style("text-anchor",(N,B,{length:W})=>!C&&B===0&&(P===!0||P.first)?"start":!C&&B===W-1&&(P===!0||P.last)?"end":m(f)).attr("transform",A(f));break;case"top":e.attr("x2",0).attr("y2",z?o:-o),n.attr("x",0).attr("y",-(I(f)+h+d)).style("text-anchor",m(f)).attr("transform",A(f));break;case"left":e.attr("x2",z?o:-o).attr("y1",i.y).attr("y2",i.y),n.attr("x",-l).attr("y",c+(C?h/4:h)).style("text-anchor","end");break;case"right":e.attr("x2",z?-o:o).attr("y2",0),n.attr("x",l).attr("y",h).style("text-anchor","start")}}splitTickText(e,n,r,i,o){const{params:s}=this,l=this.helper.textFormatted(e),c=Ke(l)&&l.indexOf(`
|
|
58
|
+
</foreignObject></svg>`;return`data:image/svg+xml;base64,${eC(d)}`}function rC(t,e){const{top:n,left:r}=e,{x:i,y:o}=ya(t,!0),{a:s,b:l,c,d:u,e:f,f:d}=t.getScreenCTM(),{width:h,height:m}=cn(t,!0);return{x:s*i+c*o+f-r,y:l*i+u*o+d-n+(m-Math.round(m/4)),width:h,height:m}}function aC(t){const{left:e,top:n}=cn(t),r=o=>o.textContent||o.childElementCount,i=[];return La(t.querySelectorAll("text")).filter(r).forEach(o=>{const s=l=>{const{fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}=fe.getComputedStyle(l),{x:m,y:S,width:E,height:C}=rC(l,{left:e,top:n});return{[l.textContent]:{x:m,y:S,width:E,height:C,fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}}};o.childElementCount>1?La(o.querySelectorAll("tspan")).filter(r).forEach(l=>{i.push(s(l))}):i.push(s(o))}),i}function iC(t,e){e.forEach(n=>{Object.keys(n).forEach(r=>{const{x:i,y:o,width:s,height:l,fill:c,fontFamily:u,fontSize:f,transform:d}=n[r];if(t.save(),t.font=`${f} ${u}`,t.fillStyle=c,d==="none")t.fillText(r,i,o);else{const h=d.replace(/(matrix|\(|\))/g,"").split(",");h.splice(4).every(m=>+m==0)?(h.push(i+s-s/4),h.push(o-l+l/3)):(h.push(i),h.push(o)),t.transform(...h),t.fillText(r,0,0)}t.restore()})})}function oC(t,e,n){const{width:r,height:i}=e||n,o=Ze.createElement("canvas"),s=o.getContext("2d");if(o.width=r,o.height=i,s){let c=0,u=r,f=i;if((e==null?void 0:e.preserveAspectRatio)!==!1){const d=Math.min(r/n.width,i/n.height);u=n.width*d,f=n.height*d,c=(i-f)/2}s.drawImage(t,0,0,t.width,t.height,0,c,u,f)}return o.toDataURL(e.mimeType)}var sC={export(t,e){var n;const r=this.internal,{state:i,$el:{chart:o,svg:s}}=r,l=(n=r.canvasEngine)==null?void 0:n.canvas,c=i.isCanvasMode&&l?cn(l,!0):null,{width:u,height:f}=c&&c.width&&c.height?{width:c.width,height:c.height}:i.current,d=Kr(Object.create(null),{width:u,height:f,preserveAspectRatio:!0,preserveFontStyle:!1,mimeType:"image/png"},t);if(i.isCanvasMode&&l){const S=oC(l,d,{width:u,height:f});return e==null||e.bind(this)(S),S}const h=nC(o.node(),d,{width:u,height:f}),m=d.preserveFontStyle?aC(s.node()):[];if(e&&ue(e)){const S=new Image;S.crossOrigin="Anonymous",S.onload=()=>{const E=Ze.createElement("canvas"),C=E.getContext("2d");E.width=d.width||u,E.height=d.height||f,C.drawImage(S,0,0),m.length&&(iC(C,m),m.length=0),e.bind(this)(E.toDataURL(d.mimeType))},S.src=h}return h}};let uv=()=>(Jn.prototype.export=sC.export,(uv=()=>({}))());var lC={flow(t){const e=this.internal;let n;(t.json||t.rows||t.columns)&&e.convertData(t,i=>{n=i,r()});function r(){var i,o,s;let l,c=0,u=0,f,d;if(e.state.redrawing||!n||!ro())return;(i=e.flushCanvasFlow)==null||i.call(e);const h=[],m=e.getMaxDataCount(),S=e.convertDataToTargets(n,!0),E=e.axis.isTimeSeries();e.data.targets.forEach(N=>{let z=!1;for(let $=0;$<S.length;$++)if(N.id===S[$].id){z=!0,N.values[N.values.length-1]&&(u=N.values[N.values.length-1].index+1);const G=S[$].values;c=G.length;for(let V=0;V<c;V++)G[V].index=u+V,E||(G[V].x=u+V),N.values.push(G[V]);S.splice($,1);break}!z&&h.push(N.id)}),e.data.targets.forEach(N=>{for(let z=0;z<h.length;z++)if(N.id===h[z]){if(!N.values[N.values.length-1])continue;u=N.values[N.values.length-1].index+1;for(let $=0;$<c;$++)N.values.push({id:N.id,index:u+$,x:E?e.getOtherTargetX(u+$):u+$,value:null})}}),e.data.targets.length&&S.forEach(N=>{const z=e.data.targets[0].values[0].index,$=N.values,G=$.length,V=Math.max(u-z,0);if(V){$.length=G+V;for(let J=G-1;J>=0;J--)$[J+V]=$[J];for(let J=0;J<V;J++){const Q=z+J;$[J]={id:N.id,index:Q,x:E?e.getOtherTargetX(Q):Q,value:null}}}for(let J=V;J<$.length;J++){const Q=$[J];Q.index+=u,E||(Q.x+=u)}});for(let N=0;N<S.length;N++)e.data.targets.push(S[N]);const C=e.data.targets[0],w=C.values[0];if(on(t.to)?(c=0,d=E?Kn.call(e,t.to):t.to,C.values.forEach(N=>{N.x<d&&c++})):on(t.length)&&(c=t.length),m?m===1&&E&&(f=(C.values[C.values.length-1].x-w.x)/2,l=[new Date(+w.x-f),new Date(+w.x+f)]):(E?f=C.values.length>1?C.values[C.values.length-1].x-w.x:w.x-e.getXDomain(e.data.targets)[0]:f=1,l=[w.x-f,w.x]),l&&e.updateXDomain(null,!0,!0,!1,l),e.state.isCanvasMode){const N=Xe(t.duration)?t.duration:e.config.transition_duration;if((o=e.animateCanvasFlow)==null?void 0:o.call(e,{done:t.done,duration:N,length:c,orgDataCount:m}))return;c&&m&&e.data.targets.forEach($=>{$.values.splice(0,c)}),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({withLegend:!0,withTransition:!1,withTrimXDomain:!1,withUpdateOrgXDomain:!0,withUpdateXAxis:!0,withUpdateXDomain:!0}),e.updateTypesElements(),(s=t.done)==null||s.call(e.api);return}e.updateTargets(e.data.targets),e.state.dirty.data=!0,e.state._eventRectFingerprint=null,e.redraw({flow:{index:w.index,length:c,duration:Xe(t.duration)?t.duration:e.config.transition_duration,done:t.done,orgDataCount:m},withLegend:!0,withTransition:m>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}},cC={generateFlow(t){const e=this,{data:n,state:r,$el:i}=e;return function(){var o;const s=t.flow.length;r.flowing=!0,n.targets.forEach(c=>{c.values.splice(0,s)}),r.dataGeneration++,e.updateXGrid&&e.updateXGrid(!0);const l={};["axis.x","grid.x","gridLines.x","region.list","text","bar","line","area","circle"].forEach(c=>{const u=c.split(".");let f=i[u[0]];f&&u.length>1&&(f=f[u[1]]),f!=null&&f.size()&&(l[c]=f)}),(o=e.hideGridFocus)==null||o.call(e),e.setFlowList(l,t)}},setFlowList(t,e){const n=this,{flow:r,targets:i}=e,{duration:o=e.duration,index:s,length:l,orgDataCount:c}=r,u=n.getFlowTransform(i,c,s,l),f=Ch();let d;f.add(Object.keys(t).map(h=>(d=t[h].transition().ease(m=>+m).duration(o),h==="axis.x"?d=d.call(m=>{n.axis.x.setTransition(m).create(m)}):h==="region.list"?d=d.filter(n.isRegionOnX).attr("transform",u):d=d.attr("transform",u),d))),d.call(f,()=>{n.cleanUpFlow(t,e)})},cleanUpFlow(t,e){const n=this,{config:r,state:i,$el:{svg:o}}=n,s=r.axis_rotated,{flow:l,shape:c,xv:u}=e,{cx:f,cy:d,xForText:h,yForText:m}=c.pos,{done:S=()=>{},length:E}=l;E&&(["circle","text","shape","eventRect"].forEach(C=>{const w=[];for(let N=0;N<E;N++)w.push(`.${Ie[C]}-${N}`);o.selectAll(`.${Ie[`${C}s`]}`).selectAll(w).remove()}),o.select(`.${Ie.xgrid}`).remove()),Object.keys(t).forEach(C=>{const w=t[C];if(C!=="axis.x"&&w.attr("transform",null),C==="grid.x")w.attr(i.xgridAttr);else if(C==="gridLines.x")w.attr("x1",s?0:u).attr("x2",s?i.width:u),w.select("text").attr("x",s?i.width:0).attr("y",u);else if(/^(area|bar|line)$/.test(C))w.attr("d",c.type[C]);else if(C==="text")w.attr("x",h).attr("y",m).style("fill-opacity",n.opacityForText.bind(n));else if(C==="circle")if(n.isCirclePoint())w.attr("cx",f).attr("cy",d);else{const N=$=>f($)-r.point_r,z=$=>d($)-r.point_r;w.attr("x",N).attr("y",z)}else C==="region.list"&&w.select("rect").filter(n.isRegionOnX).attr("x",n.regionX.bind(n)).attr("width",n.regionWidth.bind(n))}),r.interaction_enabled&&n.redrawEventRect(),S.call(n.api),i.flowing=!1},getFlowTransform(t,e,n,r){const i=this,{data:o,scale:{x:s}}=i,l=o.targets[0].values;let c=i.getValueOnIndex(l,n),u=i.getValueOnIndex(l,n+r),f;const d=s.domain(),h=i.updateXDomain(t,!0,!0);e?e===1||(c==null?void 0:c.x)===(u==null?void 0:u.x)?f=s(d[0])-s(h[0]):f=i.axis.isTimeSeries()?s(d[0])-s(h[0]):s((c==null?void 0:c.x)||0)-s(u.x):l.length!==1?f=s(d[0])-s(h[0]):i.axis.isTimeSeries()?(c=i.getValueOnIndex(l,0),u=i.getValueOnIndex(l,l.length-1),f=s(c.x)-s(u.x)):f=Ma(h)/2;const m=Ma(d)/Ma(h);return`translate(${f},0) scale(${m},1)`}};let fv=()=>(bn(Ir.prototype,cC),Jn.prototype.flow=lC.flow,(fv=()=>({}))());function dv(t){return Array.isArray(t)?t:[t]}function hv(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function lu(t,e){const n=this.internal,{config:r}=n,i=r.transition_duration&&ro(),o=`grid_${e}_lines`;return t?(r[o]=dv(t),n.state.isCanvasMode?(hv(n),r[o]):(n.updateGrid(),n.redrawGrid(i),r[o])):r[o]}function gv(t,e){const n=`grid_${e}_lines`;return lu.bind(this)(this.internal.config[n].concat(t?dv(t):[]),e)}function vv(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){const i=((n=r.getGridFilterToRemove)==null?void 0:n.call(r,t))||(()=>!0),o=`grid_${e?"x":"y"}_lines`;r.config[o]=r.config[o].filter(s=>!i(s)),hv(r);return}r.removeGridLines(t,e)}const pv=function(t){return lu.bind(this)(t,"x")};bn(pv,{add(t){return gv.bind(this)(t,"x")},remove(t){return vv.bind(this)(t,!0)}});const mv=function(t){return lu.bind(this)(t,"y")};bn(mv,{add(t){return gv.bind(this)(t,"y")},remove(t){return vv.bind(this)(t,!1)}});var xv={xgrids:pv,ygrids:mv};const uC=`line.${nn.xgridFocus}:not(.${nn.xgridFocusContinuous}), line.${nn.ygridFocus}`,fC=t=>Xe(t.position)||"end",dC=t=>t.position==="start"?4:t.position==="middle"?0:-4;function yv(t){var e;const{state:n,$el:{main:r}}=t,i=n._gridFocusEl,o=r.node(),s=((e=i==null?void 0:i.nodes)==null?void 0:e.call(i))||[];return s.length&&s.every(l=>o==null?void 0:o.contains(l))?i:n._gridFocusEl=r.selectAll(uC)}function Tv(t){t.$el.main.select(`line.${nn.xgridFocusContinuous}`).style("visibility","hidden")}function bv(t,e,n){return r=>{let i=t?0:e;return r.position==="start"?i=t?-n:0:r.position==="middle"&&(i=(t?-n:e)/2),i}}function Sv(t,e){e==="grid"&&t.each(function(){const n=Ut(this);["x1","x2","y1","y2"].forEach(r=>n.attr(r,+n.attr(r)))})}var hC={hasGrid(){const{config:t}=this;return["x","y"].some(e=>t[`grid_${e}_show`]||t[`grid_${e}_lines`].length)},initGrid(){const t=this;t.hasGrid()&&t.initGridLines(),t.initFocusGrid()},initGridLines(){const t=this,{config:e,state:{clip:n},$el:r}=t;(e.grid_x_lines.length||e.grid_y_lines.length)&&(r.gridLines.main=r.main.insert("g",`.${Ue.chart}${e.grid_lines_front?" + *":""}`).attr("clip-path",n.pathGrid).attr("class",`${Sn.grid} ${Sn.gridLines}`),r.gridLines.main.append("g").attr("class",Sn.xgridLines),r.gridLines.main.append("g").attr("class",Sn.ygridLines),r.gridLines.x=xg([]))},updateXGrid(t){const e=this,{config:n,scale:r,state:i,$el:{main:o,grid:s}}=e,l=n.axis_rotated,c=e.generateGridData(n.grid_x_type,r.x),u=e.axis.isCategorized()?e.axis.x.tickOffset():0,f=d=>(r.zoom||r.x)(d)+u*(l?-1:1);i.xgridAttr=l?{x1:0,x2:i.width,y1:f,y2:f}:{x1:f,x2:f,y1:0,y2:i.height},s.x=o.select(`.${Sn.xgrids}`).selectAll(`.${Sn.xgrid}`).data(c),s.x.exit().remove(),s.x=s.x.enter().append("line").attr("class",Sn.xgrid).merge(s.x),t||s.x.each(function(){const d=Ut(this);Object.keys(i.xgridAttr).forEach(h=>{d.attr(h,i.xgridAttr[h])}),d.style("opacity",()=>+d.attr(l?"y1":"x1")===(l?i.height:0)?"0":null)})},updateYGrid(){const t=this,{axis:e,config:n,scale:r,state:i,$el:{grid:o,main:s}}=t,l=n.axis_rotated,c=f=>r.y(f),u=e.y.getGeneratedTicks(n.grid_y_ticks)||t.scale.y.ticks(n.grid_y_ticks);o.y=s.select(`.${Sn.ygrids}`).selectAll(`.${Sn.ygrid}`).data(u),o.y.exit().remove(),o.y=o.y.enter().append("line").attr("class",Sn.ygrid).merge(o.y),o.y.attr("x1",l?c:0).attr("x2",l?c:i.width).attr("y1",l?0:c).attr("y2",l?i.height:c),Sv(o.y,"grid")},updateGrid(){const t=this,{$el:{grid:e,gridLines:n}}=t;!n.main&&t.initGridLines(),e.main.style("visibility",t.hasArcType()?"hidden":null),t.hideGridFocus(),t.updateGridLines("x"),t.updateGridLines("y")},updateGridLines(t){const e=this,{config:n,$el:{gridLines:r,main:i},$T:o}=e,s=n.axis_rotated,l=t==="x";n[`grid_${t}_show`]&&e[`update${t.toUpperCase()}Grid`]();let c=i.select(`.${Sn[`${t}gridLines`]}`).selectAll(`.${Sn[`${t}gridLine`]}`).data(n[`grid_${t}_lines`]);o(c.exit()).style("opacity","0").remove();const u=c.enter().append("g");u.append("line").style("opacity","0"),c=u.merge(c),c.each(function(f){const d=Ut(this);d.select("text").empty()&&f.text&&d.append("text").style("opacity","0")}),o(c.attr("class",f=>`${Sn[`${t}gridLine`]} ${f.class||""}`.trim()).select("text").attr("text-anchor",fC).attr("transform",()=>l?s?null:"rotate(-90)":s?"rotate(-90)":null).attr("dx",dC).attr("dy",-5)).text(function(f){var d;return(d=f.text)!=null?d:this.remove()}),r[t]=c},redrawGrid(t){const e=this,{config:{axis_rotated:n},state:{width:r,height:i},$el:{gridLines:o},$T:s}=e,l=e.xv.bind(e),c=e.yv.bind(e);let u=o.x.select("line"),f=o.x.select("text"),d=o.y.select("line"),h=o.y.select("text");return u=s(u,t).attr("x1",n?0:l).attr("x2",n?r:l).attr("y1",n?l:0).attr("y2",n?l:i),f=s(f,t).attr("x",bv(!n,r,i)).attr("y",l),d=s(d,t).attr("x1",n?c:0).attr("x2",n?c:r).attr("y1",n?0:c).attr("y2",n?i:c),h=s(h,t).attr("x",bv(n,r,i)).attr("y",c),[u.style("opacity",null),f.style("opacity",null),d.style("opacity",null),h.style("opacity",null)]},initFocusGrid(){const t=this,{config:e,state:n,state:{clip:r},$el:i}=t;n._gridFocusEl=null;const o=e.grid_front,s=`.${o&&i.gridLines.main?Sn.gridLines:Ue.chart}${o?" + *":""}`,l=i.main.insert("g",s).attr("clip-path",r.pathGrid).attr("class",Sn.grid);if(i.grid.main=l,e.grid_x_show&&l.append("g").attr("class",Sn.xgrids),e.grid_y_show&&l.append("g").attr("class",Sn.ygrids),e.axis_tooltip){const c=l.append("g").attr("class","bb-axis-tooltip");c.append("line").attr("class","bb-axis-tooltip-x"),c.append("line").attr("class","bb-axis-tooltip-y")}e.interaction_enabled&&e.grid_focus_show&&!e.axis_tooltip&&(l.append("g").attr("class",nn.xgridFocus).append("line").attr("class",nn.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&l.append("g").attr("class",nn.ygridFocus).append("line").attr("class",nn.ygridFocus),e.subchart_grid_focus_continuous&&e.subchart_grid_focus!==!1&&i.main.insert("g",s).attr("class",nn.xgridFocusContinuous).append("line").attr("class",`${nn.xgridFocus} ${nn.xgridFocusContinuous}`).style("visibility","hidden"))},showAxisGridFocus(){var t,e;const n=this,{config:r,format:i,state:{event:o,width:s,height:l}}=n,c=r.axis_rotated,[u,f]=er(o,(t=n.$el.eventRect)==null?void 0:t.node()),d={x:u,y:f};for(const[h,m]of Object.entries(n.$el.axisTooltip)){const S=h==="x"&&!c||h!=="x"&&c?"x":"y",E=d[S];let C=(e=n.scale[h])==null?void 0:e.invert(E);C&&(C=h==="x"&&n.axis.isTimeSeries()?i.xAxisTick(C):C==null?void 0:C.toFixed(2),m==null||m.attr(S,E).text(C))}n.$el.main.selectAll("line.bb-axis-tooltip-x, line.bb-axis-tooltip-y").style("visibility",null).each(function(h,m){const S=Ut(this);m===0?S.attr("x1",u).attr("x2",u).attr("y1",m?0:l).attr("y2",m?l:0):S.attr("x1",m?0:s).attr("x2",m?s:0).attr("y1",f).attr("y2",f)})},hideAxisGridFocus(){const t=this;t.$el.main.selectAll(`line.${Pn.axisTooltipX}, line.${Pn.axisTooltipY}`).style("visibility","hidden"),Object.values(t.$el.axisTooltip).forEach(e=>e==null?void 0:e.style("display","none"))},showGridFocus(t){var e;const n=this,{config:r,state:{width:i,height:o}}=n,s=r.axis_rotated,l=yv(n),c=(t||[l.datum()]).filter(d=>d&&Xe(n.getBaseValue(d)));if(!r.tooltip_show||c.length===0||!r.axis_x_forceAsSingle&&n.hasType("bubble")||n.hasArcType())return;const u=r.grid_focus_edge&&!r.tooltip_grouped,f=n.xx.bind(n);l.style("visibility",null).data(c.concat(c)).each(function(d){const h=Ut(this),m={x:f(d),y:n.getYScaleById(d.id)(d.value)};let S;if(h.classed(nn.xgridFocus))S=s?[null,m.x,u?m.y:i,m.x]:[m.x,u?m.y:null,m.x,o];else{const E=n.axis.getId(d.id)==="y2";S=s?[m.y,u&&!E?m.x:null,m.y,u&&E?m.x:o]:[u&&E?m.x:null,m.y,u&&!E?m.x:i,m.y]}["x1","y1","x2","y2"].forEach((E,C)=>h.attr(E,S[C]))}),Sv(l,"grid"),(e=n.showCircleFocus)==null||e.call(n,t)},hideGridFocus(t=!1){var e;const n=this,{state:{inputType:r,resizing:i}}=n;(t||r==="mouse"||!i)&&(yv(n).style("visibility","hidden"),Tv(n),(e=n.hideCircleFocus)==null||e.call(n))},updateGridFocus(){var t;const e=this,{state:{inputType:n,width:r,height:i,resizing:o},$el:{grid:s}}=e,l=s.main.select(`line.${nn.xgridFocus}`);if(n==="touch")l.empty()?o&&((t=e.showCircleFocus)==null||t.call(e)):e.showGridFocus();else{const c=e.config.axis_rotated;l.attr("x1",c?0:-10).attr("x2",c?r:-10).attr("y1",c?-10:0).attr("y2",c?-10:i),Tv(e)}return!0},generateGridData(t,e){const n=this,r=n.$el.main.select(`.${Pn.axisX}`).selectAll(".tick").size();let i=[];if(t==="year"){const o=n.getXDomain(n.data.targets),[s,l]=o.map(c=>c.getFullYear());for(let c=s;c<=l;c++)i.push(new Date(`${c}-01-01 00:00:00`))}else i=e.ticks(vn),i.length>r&&(i=i.filter(o=>String(o).indexOf(".")<0));return i},getGridFilterToRemove(t){return t?e=>{let n=!1;return(en(t)?t.concat():[t]).forEach(r=>{("value"in r&&e.value===r.value||"class"in r&&e.class===r.class)&&(n=!0)}),n}:()=>!0},removeGridLines(t,e){const n=this,{config:r,$T:i}=n,o=n.getGridFilterToRemove(t),s=f=>!o(f),l=e?Sn.xgridLines:Sn.ygridLines,c=e?Sn.xgridLine:Sn.ygridLine;i(n.$el.main.select(`.${l}`).selectAll(`.${c}`).filter(o)).style("opacity","0").remove();const u=`grid_${e?"x":"y"}_lines`;r[u]=r[u].filter(s)}},gC={grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:void 0,grid_focus_edge:!1,grid_focus_show:!0,grid_focus_y:!1,grid_front:!1,grid_lines_front:!0};let Av=()=>(bn(Ir.prototype,hC),Jn.prototype.xgrids=xv.xgrids,Jn.prototype.ygrids=xv.ygrids,Ua.setOptions([gC]),(Av=()=>({}))());function Ev(t,e,n,r){const i=this,{config:o,$el:{main:s}}=i,l=o.data_selection_grouped,c=o.data_selection_isselectable.bind(i.api),u=on(e)?[].concat(e):null,f=t&&!o.data_selection_multiple;let d=!f;const h=(m,S,E)=>{i.unselectPoint(m,S,E),m.interrupt().remove()};i.getTargetsToShow().forEach(m=>{const{id:S}=m,E=l||!u||u.indexOf(S)>=0,C=s.select(`.${sn.selectedCircles}${i.getTargetSelectorSuffix(S)}`);m.values.forEach(w=>{const{index:N}=w,z=!n||n.indexOf(N)>=0,$=C.selectAll(`.${sn.selectedCircle}-${N}`),G=!$.empty();t?E&&z&&c(w)&&(!G||f)?(d||(Ev.call(i,!1),d=!0),i.selectPoint(null,w,N)):(!f||d)&&on(r)&&r&&G&&h($,w,N):E&&z&&G&&h($,w,N)})})}function cu(t=!1,e,n,r){var i;const o=this,{config:s,$el:{main:l}}=o,c=s.data_selection_grouped,u=s.data_selection_isselectable.bind(o.api),f=t&&!s.data_selection_multiple;let d=!f;if(s.data_selection_enabled){if(f&&(n=n!=null&&n.length?[n[0]]:[0],c||(e=(on(e)?[].concat(e):o.getTargetsToShow().map(m=>m.id)).slice(0,1))),(i=o.isPointFocusOnly)!=null&&i.call(o)){Ev.call(o,t,e,n,r);return}l.selectAll(`.${An.shapes}`).selectAll(`.${An.shape}`).each(function(h){const m=Ut(this),{id:S,index:E}=h.data?h.data:h,C=c||!e||e.indexOf(S)>=0,w=!n||n.indexOf(E)>=0;if(m.classed($r.line)||m.classed(hs.area))return;const N=o.getToggle(this,h).bind(o),z=m.classed(sn.SELECTED);t?C&&w&&u(h)&&(!z||f)?(d||(cu.call(o,!1),d=!0),!m.classed(sn.SELECTED)&&N(!0,m.classed(sn.SELECTED,!0),h,E)):(!f||d)&&on(r)&&r&&z&&N(!1,m.classed(sn.SELECTED,!1),h,E):C&&w&&u(h)&&z&&N(!1,m.classed(sn.SELECTED,!1),h,E)})}}var vC={selected(t){var e,n;const r=this.internal,i=[];return r.state.isCanvasMode?((e=r.getCanvasSelectedData)==null?void 0:e.call(r,t))||i:(n=r.isPointFocusOnly)!=null&&n.call(r)?(r.$el.main.selectAll(`.${sn.selectedCircles+r.getTargetSelectorSuffix(t)}`).selectAll(`.${sn.selectedCircle}`).each(o=>i.push(o)),i):(r.$el.main.selectAll(`.${An.shapes+r.getTargetSelectorSuffix(t)}`).selectAll(`.${An.shape}`).filter(function(){return Ut(this).classed(sn.SELECTED)}).each(o=>i.push(o)),i)},select(t,e,n){var r;const i=this.internal;if(i.state.isCanvasMode){(r=i.setCanvasSelection)==null||r.call(i,!0,t,e,n);return}cu.bind(i)(!0,t,e,n)},unselect(t,e){var n;const r=this.internal;if(r.state.isCanvasMode){(n=r.setCanvasSelection)==null||n.call(r,!1,t,e);return}cu.bind(r)(!1,t,e)}},pC={drag(t){const e=this,{config:n,state:r,$el:{main:i}}=e,o=n.data_selection_grouped,s=n.interaction_enabled&&n.data_selection_isselectable;if(e.hasArcType()||!n.data_selection_enabled||n.zoom_enabled&&!e.zoom.altDomain||!n.data_selection_multiple)return;const[l,c]=r.dragStart||[0,0],[u,f]=t,d=Math.min(l,u),h=Math.max(l,u),m=o?r.margin.top:Math.min(c,f),S=o?r.height:Math.max(c,f),E=()=>{!e||!e.$el||!e.$el.main||(i.select(`.${za.dragarea}`).attr("x",d).attr("y",m).attr("width",h-d).attr("height",S-m),i.selectAll(`.${An.shapes}`).selectAll(`.${An.shape}`).filter(C=>s==null?void 0:s.bind(e.api)(C)).each(function(C,w){const N=Ut(this),z=N.classed(sn.SELECTED),$=N.classed(za.INCLUDED);let G,V;if(N.classed(Un.circle)){const J=+N.attr("cx"),Q=+N.attr("cy");V=e.togglePoint,G=d<J&&J<h&&m<Q&&Q<S}else if(N.classed(lr.bar)){const{x:J,y:Q,width:rt,height:et}=Sh(this);V=e.togglePath,G=!(h<J||J+rt<d)&&!(S<Q||Q+et<m)}else return;G^$&&(N.classed(za.INCLUDED,!$),N.classed(sn.SELECTED,!z),V.call(e,!z,N,C,w))}))};Eh(e.state,E)},dragstart(t){const e=this,{config:n,state:r,$el:{main:i}}=e;e.hasArcType()||!n.data_selection_enabled||(r.dragStart=t,i.select(`.${Ue.chart}`).append("rect").attr("class",za.dragarea).style("opacity","0.1"),e.setDragStatus(!0))},dragend(){const t=this,{config:e,$el:{main:n},$T:r}=t;t.hasArcType()||!e.data_selection_enabled||(r(n.select(`.${za.dragarea}`)).style("opacity","0").remove(),n.selectAll(`.${An.shape}`).classed(za.INCLUDED,!1),t.setDragStatus(!1))}},mC=Object.defineProperty,xC=Object.defineProperties,yC=Object.getOwnPropertyDescriptors,Cv=Object.getOwnPropertySymbols,TC=Object.prototype.hasOwnProperty,bC=Object.prototype.propertyIsEnumerable,Iv=(t,e,n)=>e in t?mC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,SC=(t,e)=>{for(var n in e||(e={}))TC.call(e,n)&&Iv(t,n,e[n]);if(Cv)for(var n of Cv(e))bC.call(e,n)&&Iv(t,n,e[n]);return t},AC=(t,e)=>xC(t,yC(e)),EC=AC(SC({},pC),{selectPoint(t,e,n){const r=this,{config:i,$el:{main:o},$T:s}=r,l=i.axis_rotated,c=(l?r.circleY:r.circleX).bind(r),u=(l?r.circleX:r.circleY).bind(r),f=r.pointSelectR.bind(r);$e(i.data_onselected,r.api,e,t==null?void 0:t.node()),s(o.select(`.${sn.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${sn.selectedCircle}-${n}`).data([e]).enter().append("circle").attr("class",()=>r.generateClass(sn.selectedCircle,n)).attr("cx",c).attr("cy",u).attr("stroke",r.color).attr("r",d=>r.pointSelectR(d)*1.4)).attr("r",f)},unselectPoint(t,e,n){const r=this,{config:i,$el:{main:o},$T:s}=r;$e(i.data_onunselected,r.api,e,t==null?void 0:t.node()),s(o.select(`.${sn.selectedCircles}${r.getTargetSelectorSuffix(e.id)}`).selectAll(`.${sn.selectedCircle}-${n}`)).attr("r",0).remove()},togglePoint(t,e,n,r){this[`${t?"":"un"}selectPoint`](e,n,r)},selectPath(t,e){const n=this,{config:r}=n;$e(r.data_onselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter","brightness(1.25)")},unselectPath(t,e){const n=this,{config:r}=n;$e(r.data_onunselected,n.api,e,t.node()),r.interaction_brighten&&t.style("filter",null)},togglePath(t,e,n,r){this[`${t?"":"un"}selectPath`](e,n,r)},getToggle(t,e){const n=this;return t.nodeName==="path"?n.togglePath:n.isStepType(e)?()=>{}:n.togglePoint},toggleShape(t,e,n){var r;const i=this,{config:o,$el:{main:s}}=i;if(o.data_selection_enabled&&o.data_selection_isselectable.bind(i.api)(e)){const l=Ut(t),c=l.classed(sn.SELECTED),u=i.getToggle(t,e).bind(i);let f;if(!o.data_selection_multiple){const d=(r=i.isPointFocusOnly)==null?void 0:r.call(i);let h=`.${d?sn.selectedCircles:An.shapes}`;o.data_selection_grouped&&(h+=i.getTargetSelectorSuffix(e.id)),s.selectAll(h).selectAll(d?`.${sn.selectedCircle}`:`.${An.shape}.${sn.SELECTED}`).classed(sn.SELECTED,!1).each(function(m){const S=Ut(this);f=S,u(!1,S,m,m.index)})}(!f||f.node()!==l.node())&&(l.classed(sn.SELECTED,!c),u(!c,l,e,n))}}}),CC={data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:()=>!0,data_selection_multiple:!0,data_selection_draggable:!1,data_onselected:()=>{},data_onunselected:()=>{}};let Rv=()=>(bn(Ir.prototype,EC),bn(Jn.prototype,vC),Ua.setOptions([CC]),(Rv=()=>!0)());const wv=function(t){var e,n;const r=this.internal,{axis:i,brush:o,config:s,scale:{x:l,subX:c},state:u}=r;let f;return u.isCanvasMode?(s.subchart_show&&(f=t,Array.isArray(f)?(f=i.isTimeSeries()?f.map(d=>Kn.bind(r)(d)):f,f=r.setCanvasSubchartDomain(f)||u.domain):f=(e=u.domain)!=null?e:l.orgDomain()),f):(s.subchart_show&&(f=t,Array.isArray(f)?(i.isTimeSeries()&&(f=f.map(h=>Kn.bind(r)(h))),r.withinRange(f,r.getZoomDomain("subX",!0),r.getZoomDomain("subX"))&&(u.domain=f.slice(),o.move(o.getSelection(),f.map(c)))):f=(n=u.domain)!=null?n:l.orgDomain()),f)};bn(wv,{show(){var t,e,n;const r=this.internal,{$el:{subchart:i},config:o}=r,s=o.subchart_show;if(!s){if(r.state.isCanvasMode){(t=r.unbindZoomEvent)==null||t.call(r),o.subchart_show=!0,this.resize();return}r.unbindZoomEvent(),o.subchart_show=!s,!i.main&&r.initSubchart();let l=i.main.selectAll(`.${Ue.target}`);r.data.targets.length!==l.size()&&(r.updateSizes(),r.updateTargetsForSubchart(r.data.targets),l=(e=i.main)==null?void 0:e.selectAll(`.${Ue.target}`)),l==null||l.style("opacity",null),(n=i.main)==null||n.style("display",null),this.resize()}},hide(){var t;const e=this.internal,{$el:{subchart:{main:n}},config:r}=e;if(e.state.isCanvasMode){r.subchart_show&&(r.subchart_show=!1,this.resize(),(t=e.bindZoomEvent)==null||t.call(e));return}r.subchart_show&&(n==null?void 0:n.style("display"))!=="none"&&(r.subchart_show=!1,n.style("display","none"),this.resize())},toggle(){const t=this.internal,{config:e}=t;this.subchart[e.subchart_show?"hide":"show"]()},reset(){var t;const e=this.internal,{brush:n}=e;if(e.state.isCanvasMode){(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1);return}n.clear(n.getSelection())}});var IC={subchart:wv};const Ov=["bar","line","bubble","candlestick","scatter"],RC=["opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width"];function Pv(t,e){var n,r;const i=(r=(n=t.$el.grid)==null?void 0:n.main)==null?void 0:r.select(`line.${Ie.xgridFocus}`).node();if(!i||!fe.getComputedStyle)return;const o=fe.getComputedStyle(i);RC.forEach(s=>{const l=o.getPropertyValue(s);l&&e.style(s,l)})}function mi(t,e){const n=Number(t);return Number.isFinite(n)?n:e}function wC(t){var e,n;if(!_l(t))return!1;const{config:r,state:i,$el:o}=t,s=(n=(e=o.grid)==null?void 0:e.main)==null?void 0:n.select(`line.${Ie.xgridFocus}:not(.${Ie.xgridFocusContinuous})`),l=o.main.select(`line.${Ie.xgridFocusContinuous}`);if(!(s!=null&&s.node())||!l.node())return!1;const c=i.margin2.left-i.margin.left+i.width2,u=i.margin2.top-i.margin.top+i.height2;return Pv(t,l),r.axis_rotated?l.attr("x1",mi(s.attr("x1"),0)).attr("x2",c).attr("y1",mi(s.attr("y1"),-10)).attr("y2",mi(s.attr("y2"),-10)):l.attr("x1",mi(s.attr("x1"),-10)).attr("x2",mi(s.attr("x2"),-10)).attr("y1",mi(s.attr("y1"),0)).attr("y2",u),l.style("visibility",null),s.style("visibility","hidden"),!0}function OC(t){var e;(e=t.$el.main)==null||e.select(`line.${Ie.xgridFocusContinuous}`).style("visibility","hidden")}function PC(t,e,n){const{config:r,state:i}=t,[o,s]=er(e,n),l=gd(t,r.axis_rotated?s:o);return l===null?null:r.axis_rotated?[i.width/2,l]:[l,i.height/2]}function uu(t,e,n,r){var i,o;const s=(o=(i=t.$el.eventRect)==null?void 0:i.node)==null?void 0:o.call(i);if(!s)return;const l=PC(t,n,r)||[0,0],c=cn(s,!0),u=c.left+l[0],f=c.top+l[1],d={bubbles:!0,cancelable:!0,screenX:u,screenY:f,clientX:u,clientY:f};/^touch/.test(e)?Ac.touch(s,e,d):Ac.mouse(s,e,d)}var MC={isSubchartBrushEnabled(){const{config:t}=this;return t.subchart_show&&t.subchart_brush_enabled!==!1},bindSubchartEventRect(t){const e=this,{config:n,state:r}=e;t.on("mouseover mousemove mouseout touchstart touchmove touchend",null),n.interaction_enabled&&(r.inputType==="mouse"?t.on("mouseover mousemove",function(i){e.isSubchartBrushEnabled()||uu(e,i.type,i,this)}).on("mouseout",function(i){e.isSubchartBrushEnabled()||uu(e,"mouseout",i,this)}):r.inputType==="touch"&&t.on("touchstart touchmove touchend",function(i){var o;e.isSubchartBrushEnabled()||((o=i.touches)==null?void 0:o.length)>1||uu(e,i.type,i,this)}))},initBrush(){const t=this,{config:e,scale:n,$el:{subchart:r},state:i}=t,o=e.axis_rotated,s=e.subchart_size_height;let l,c,u;t.brush=(o?aA():rA()).handleSize(5),t.brush.on("start brush end",f=>{const{selection:d,sourceEvent:h,target:m,type:S}=f;S==="start"&&(t.state.inputType==="touch"&&t.hideTooltip(),c=h?d:null),/(start|brush)/.test(S)&&(S==="brush"&&h&&i.domain&&(c==null||c.forEach((E,C)=>{E!==d[C]&&(i.domain[C]=n.x.orgDomain()[C])})),t.redrawForBrush(S!=="start")),S==="end"&&(l=n.x.orgDomain()),m!=null&&m.handle&&(d===null?t.brush.handle.attr("display","none"):t.brush.handle.attr("display",null).attr("transform",(E,C)=>{const w=[d[C],s/2];return`translate(${o?w.reverse():w})`}))}),t.brush.updateResize=function(){u&&clearTimeout(u),u=setTimeout(()=>{const f=this.getSelection();l&&lg(f.node())&&this.move(f,l.map(n.subX.orgScale()))},0)},t.brush.update=function(){var f;return this.extent()()[1].filter(h=>isNaN(h)).length===0&&((f=r.main)==null||f.select(`.${Ie.brush}`).call(this)),this},t.brush.scale=function(f){const d=e.subchart_size_height;let h=t.axis.getExtent();!h&&f.range?h=[[0,0],[f.range()[1],d]]:en(h)&&(h=h.map((m,S)=>[m,S>0?d:S])),o&&h[1].reverse(),this.extent(h),this.update()},t.brush.getSelection=()=>r.main?r.main.select(`.${Ie.brush}`):Ut([])},initSubchart(){const t=this,{config:e,state:{clip:n,hasAxis:r},$el:{defs:i,svg:o,subchart:s,axis:l}}=t;if(!r)return;const c=e.subchart_show?null:"hidden",u=`${n.id}-subchart`,f=t.getClipPath(u);n.idSubchart=u,t.appendClip(i,u),t.initBrush(),s.main=o.append("g").classed(Ie.subchart,!0).attr("transform",t.getTranslate("context"));const{main:d}=s;d.style("visibility",c),d.append("g").attr("clip-path",f).attr("class",Ie.chart),t.withSubchartTypeContext(()=>{Ov.forEach(m=>{const S=Nn(/^(bubble|scatter)$/.test(m)?"circle":m);if(t.hasType(m)||t.hasTypeOf(S)){const E=d.select(`.${Ie.chart}`),C=Ie[`chart${S}s`];E.select(`.${C}`).empty()&&E.append("g").attr("class",C)}})});const h=d.append("g").attr("clip-path",f).attr("class",Ie.brush).style("pointer-events",t.isSubchartBrushEnabled()?null:"none").call(t.brush);e.subchart_showHandle&&t.addBrushHandle(h),s.eventRect=d.append("g").attr("clip-path",f).attr("class",`${Ie.eventRects} ${Ie.eventRects}-subchart`).style("fill-opacity","0").style("pointer-events",t.isSubchartBrushEnabled()?"none":"all").append("rect").attr("class",`${Ie.eventRect} ${Ie.eventRect}-subchart`).attr("width",t.state.width2).attr("height",t.state.height2),t.bindSubchartEventRect(s.eventRect),d.append("g").attr("clip-path",f).attr("class",Ie.xgridFocus).append("line").attr("class",Ie.xgridFocus).style("visibility","hidden"),l.subX=d.append("g").attr("class",Ie.axisX).attr("transform",t.getTranslate("subX")).attr("clip-path",e.axis_rotated?"":n.pathXAxis).style("visibility",e.subchart_axis_x_show?c:"hidden"),l.subY=d.append("g").attr("class",Ie.axisY).attr("transform",t.getTranslate("subY")).style("visibility",e.subchart_axis_y_show?c:"hidden"),l.subY2=d.append("g").attr("class",Ie.axisY2).attr("transform",t.getTranslate("subY2")).style("visibility",e.subchart_axis_y2_show?c:"hidden")},addBrushHandle(t){const e=this,{config:n}=e,r=n.axis_rotated,i=n.subchart_init_range,o="handle--custom",s=Mi[r?"y":"x"];e.brush.handle=t.selectAll(`.${o}`).data(r?[{type:"n"},{type:"s"}]:[{type:"w"},{type:"e"}]).enter().append("path").attr("class",o).attr("cursor",`${r?"ns":"ew"}-resize`).attr("d",l=>s[/[se]/.test(l.type)?"end":"start"]).attr("display",i?null:"none")},updateTargetsForSubchart(t){var e;const n=this,{config:r,state:i,$el:{subchart:{main:o}}}=n;r.subchart_show&&(n.withSubchartTypeContext(()=>{Ov.filter(s=>n.hasType(s)||n.hasTypeOf(Nn(s))).forEach(s=>{const l=/^(bubble|scatter)$/.test(s),c=Nn(l?"circle":s),u=n.getChartClass(c,!0),f=n.getClass(l?"circles":`${s}s`,!0),d=o.select(`.${Ie[`chart${`${c}s`}`]}`);if(l){const h=d.selectAll(`.${Ie.circles}`).data(t.filter(n[`is${Nn(s)}Type`].bind(n))).attr("class",f);h.exit().remove(),h.enter().append("g").attr("class",f)}else{const h=d.selectAll(`.${Ie[`chart${c}`]}`).attr("class",u).data(t.filter(n[`is${c}Type`].bind(n))),m=h.enter().append("g").style("opacity","0").attr("class",u).append("g").attr("class",f);h.exit().remove(),s==="line"&&n.hasTypeOf("Area")&&m.append("g").attr("class",n.getClass("areas",!0))}})}),o.selectAll(`.${Ie.brush} rect`).attr(r.axis_rotated?"width":"height",r.axis_rotated?i.width2:i.height2),(e=n.$el.subchart.eventRect)==null||e.attr("width",i.width2).attr("height",i.height2).style("pointer-events",n.isSubchartBrushEnabled()?"none":"all"))},updateSubchartYDomain(t){var e,n;const r=this,{scale:i}=r,o=t||r.filterTargetsToShow(r.data.targets);(e=i.subY)==null||e.domain(r.getYDomain(o,"y")),(n=i.subY2)==null||n.domain(r.getYDomain(o,"y2"))},redrawSubchart(t,e){var n,r,i,o;const s=this,{config:l,$el:{subchart:{main:c}},state:u}=s,f=!!e;if(c.style("visibility",l.subchart_show?null:"hidden"),c.select(`.${Ie.brush}`).style("pointer-events",s.isSubchartBrushEnabled()?null:"none"),(n=s.$el.subchart.eventRect)==null||n.style("pointer-events",s.isSubchartBrushEnabled()?"none":"all"),(r=s.$el.axis.subY)==null||r.style("visibility",l.subchart_axis_y_show?null:"hidden"),(i=s.$el.axis.subY2)==null||i.style("visibility",l.subchart_axis_y2_show?null:"hidden"),l.subchart_show&&(((o=u.event)==null?void 0:o.type)==="zoom"&&s.brush.update(),t)){const d=l.subchart_init_range;!ug(s)&&s.brush.update(),s.withSubchartTypeContext(()=>{const h=u._targetsToShow||s.filterTargetsToShow(s.data.targets);s.updateSubchartYDomain(h);const m=s.getDrawShape();if(Object.keys(m.type).forEach(S=>{const E=Nn(S),C=s[`generateDraw${E}`](m.indices[S],!0);s[`update${E}`](f,!0),s[`redraw${E}`](C,f,!0)}),s.hasType("bubble")||s.hasType("scatter")){const{cx:S}=m.pos,E=s.updateCircleY(!0);s.updateCircle(!0),s.redrawCircle(S,E,f,void 0,!0)}}),!u.rendered&&d&&(u.domain=d,s.brush.move(s.brush.getSelection(),d.map(s.scale.x)))}},showSubchartGridFocus(t){const e=this,{config:n,state:r,$el:{subchart:{main:i}}}=e;if(!i||!n.subchart_show||e.isSubchartBrushEnabled()||n.grid_focus_show===!1||n.subchart_grid_focus===!1||!n.tooltip_show||n.axis_tooltip)return;const s=(Array.isArray(t)?t:[t]).find(u=>u&&e.getBaseValue(u)!=null);if(!s){e.hideSubchartGridFocus();return}const l=e.scale.subX(s.x);if(!Number.isFinite(l)){e.hideSubchartGridFocus();return}const c=i.select(`g.${Ie.xgridFocus} line.${Ie.xgridFocus}`);if(wC(e)){c.style("visibility","hidden");return}Pv(e,c),n.axis_rotated?c.attr("x1",0).attr("x2",r.width2).attr("y1",l).attr("y2",l):c.attr("x1",l).attr("x2",l).attr("y1",0).attr("y2",r.height2),c.style("visibility",null)},hideSubchartGridFocus(){var t;OC(this),(t=this.$el.subchart.main)==null||t.select(`g.${Ie.xgridFocus} line.${Ie.xgridFocus}`).style("visibility","hidden")},redrawForBrush(t=!0){var e;const n=this,{config:{subchart_onbrush:r,zoom_rescale:i},scale:o,state:s}=n;n.redraw({withTransition:!1,withY:i,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),t&&s.rendered&&r.bind(n.api)((e=s.domain)!=null?e:o.x.orgDomain())},transformContext(t,e){const n=this,{$el:{subchart:r},$T:i}=n,o=e!=null&&e.axisSubX?e.axisSubX:i(r.main.select(`.${Ie.axisX}`),t),s=e!=null&&e.axisSubY?e.axisSubY:i(r.main.select(`.${Ie.axisY}`),t),l=e!=null&&e.axisSubY2?e.axisSubY2:i(r.main.select(`.${Ie.axisY2}`),t);r.main.attr("transform",n.getTranslate("context")),o.attr("transform",n.getTranslate("subX")),s.attr("transform",n.getTranslate("subY")),l.attr("transform",n.getTranslate("subY2"))}},LC={subchart_show:!1,subchart_type:void 0,subchart_types:{},subchart_brush_enabled:!0,subchart_showHandle:!1,subchart_size_height:60,subchart_grid_focus:!0,subchart_grid_focus_continuous:!1,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_count:void 0,subchart_axis_x_tick_values:void 0,subchart_axis_x_tick_culling:void 0,subchart_axis_x_tick_culling_max:void 0,subchart_axis_x_tick_culling_lines:void 0,subchart_axis_x_tick_culling_reverse:void 0,subchart_axis_x_tick_outer:void 0,subchart_axis_x_tick_format:void 0,subchart_axis_x_tick_text_show:!0,subchart_axis_y_show:!1,subchart_axis_y_tick_show:!0,subchart_axis_y_tick_count:void 0,subchart_axis_y_tick_values:void 0,subchart_axis_y_tick_culling:void 0,subchart_axis_y_tick_culling_max:void 0,subchart_axis_y_tick_culling_lines:void 0,subchart_axis_y_tick_culling_reverse:void 0,subchart_axis_y_tick_outer:void 0,subchart_axis_y_tick_format:void 0,subchart_axis_y_tick_text_show:!0,subchart_axis_y2_show:!1,subchart_axis_y2_tick_show:!0,subchart_axis_y2_tick_count:void 0,subchart_axis_y2_tick_values:void 0,subchart_axis_y2_tick_culling:void 0,subchart_axis_y2_tick_culling_max:void 0,subchart_axis_y2_tick_culling_lines:void 0,subchart_axis_y2_tick_culling_reverse:void 0,subchart_axis_y2_tick_outer:void 0,subchart_axis_y2_tick_format:void 0,subchart_axis_y2_tick_text_show:!0,subchart_init_range:void 0,subchart_onbrush:()=>{}};let Mv=()=>(bn(Ir.prototype,MC),bn(Jn.prototype,IC),Ua.setOptions([LC]),(Mv=()=>!0)());var DC=1e-12;function Lv(t){return((t=Math.exp(t))+1/t)/2}function FC(t){return((t=Math.exp(t))-1/t)/2}function NC(t){return((t=Math.exp(2*t))-1)/(t+1)}var $C=(function t(e,n,r){function i(o,s){var l=o[0],c=o[1],u=o[2],f=s[0],d=s[1],h=s[2],m=f-l,S=d-c,E=m*m+S*S,C,w;if(E<DC)w=Math.log(h/u)/e,C=function(J){return[l+J*m,c+J*S,u*Math.exp(e*J*w)]};else{var N=Math.sqrt(E),z=(h*h-u*u+r*E)/(2*u*n*N),$=(h*h-u*u-r*E)/(2*h*n*N),G=Math.log(Math.sqrt(z*z+1)-z),V=Math.log(Math.sqrt($*$+1)-$);w=(V-G)/e,C=function(J){var Q=J*w,rt=Lv(G),et=u/(n*N)*(rt*NC(e*Q+G)-FC(G));return[l+et*m,c+et*S,u*rt/Lv(e*Q+G)]}}return C.duration=w*1e3*e/Math.SQRT2,C}return i.rho=function(o){var s=Math.max(.001,+o),l=s*s,c=l*l;return t(s,l,c)},i})(Math.SQRT2,2,4),js=(t=>()=>t);function BC(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function oa(t,e,n){this.k=t,this.x=e,this.y=n}oa.prototype={constructor:oa,scale:function(t){return t===1?this:new oa(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new oa(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var vr=new oa(1,0,0);fu.prototype=oa.prototype;function fu(t){for(;!t.__zoom;)if(!(t=t.parentNode))return vr;return t.__zoom}function du(t){t.stopImmediatePropagation()}function vo(t){t.preventDefault(),t.stopImmediatePropagation()}function zC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function UC(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Dv(){return this.__zoom||vr}function kC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function GC(){return navigator.maxTouchPoints||"ontouchstart"in this}function XC(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],s=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function WC(){var t=zC,e=UC,n=XC,r=kC,i=GC,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=$C,u=ys("start","zoom","end"),f,d,h,m=500,S=150,E=0,C=10;function w(q){q.property("__zoom",Dv).on("wheel.zoom",Q,{passive:!1}).on("mousedown.zoom",rt).on("dblclick.zoom",et).filter(i).on("touchstart.zoom",st).on("touchmove.zoom",ct).on("touchend.zoom touchcancel.zoom",dt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}w.transform=function(q,ft,lt,pt){var Tt=q.selection?q.selection():q;Tt.property("__zoom",Dv),q!==Tt?G(q,ft,lt,pt):Tt.interrupt().each(function(){V(this,arguments).event(pt).start().zoom(null,typeof ft=="function"?ft.apply(this,arguments):ft).end()})},w.scaleBy=function(q,ft,lt,pt){w.scaleTo(q,function(){var Tt=this.__zoom.k,Rt=typeof ft=="function"?ft.apply(this,arguments):ft;return Tt*Rt},lt,pt)},w.scaleTo=function(q,ft,lt,pt){w.transform(q,function(){var Tt=e.apply(this,arguments),Rt=this.__zoom,Ct=lt==null?$(Tt):typeof lt=="function"?lt.apply(this,arguments):lt,Kt=Rt.invert(Ct),re=typeof ft=="function"?ft.apply(this,arguments):ft;return n(z(N(Rt,re),Ct,Kt),Tt,s)},lt,pt)},w.translateBy=function(q,ft,lt,pt){w.transform(q,function(){return n(this.__zoom.translate(typeof ft=="function"?ft.apply(this,arguments):ft,typeof lt=="function"?lt.apply(this,arguments):lt),e.apply(this,arguments),s)},null,pt)},w.translateTo=function(q,ft,lt,pt,Tt){w.transform(q,function(){var Rt=e.apply(this,arguments),Ct=this.__zoom,Kt=pt==null?$(Rt):typeof pt=="function"?pt.apply(this,arguments):pt;return n(vr.translate(Kt[0],Kt[1]).scale(Ct.k).translate(typeof ft=="function"?-ft.apply(this,arguments):-ft,typeof lt=="function"?-lt.apply(this,arguments):-lt),Rt,s)},pt,Tt)};function N(q,ft){return ft=Math.max(o[0],Math.min(o[1],ft)),ft===q.k?q:new oa(ft,q.x,q.y)}function z(q,ft,lt){var pt=ft[0]-lt[0]*q.k,Tt=ft[1]-lt[1]*q.k;return pt===q.x&&Tt===q.y?q:new oa(q.k,pt,Tt)}function $(q){return[(+q[0][0]+ +q[1][0])/2,(+q[0][1]+ +q[1][1])/2]}function G(q,ft,lt,pt){q.on("start.zoom",function(){V(this,arguments).event(pt).start()}).on("interrupt.zoom end.zoom",function(){V(this,arguments).event(pt).end()}).tween("zoom",function(){var Tt=this,Rt=arguments,Ct=V(Tt,Rt).event(pt),Kt=e.apply(Tt,Rt),re=lt==null?$(Kt):typeof lt=="function"?lt.apply(Tt,Rt):lt,Ee=Math.max(Kt[1][0]-Kt[0][0],Kt[1][1]-Kt[0][1]),Ce=Tt.__zoom,be=typeof ft=="function"?ft.apply(Tt,Rt):ft,Ne=c(Ce.invert(re).concat(Ee/Ce.k),be.invert(re).concat(Ee/be.k));return function(ye){if(ye===1)ye=be;else{var De=Ne(ye),Zt=Ee/De[2];ye=new oa(Zt,re[0]-De[0]*Zt,re[1]-De[1]*Zt)}Ct.zoom(null,ye)}})}function V(q,ft,lt){return!lt&&q.__zooming||new J(q,ft)}function J(q,ft){this.that=q,this.args=ft,this.active=0,this.sourceEvent=null,this.extent=e.apply(q,ft),this.taps=0}J.prototype={event:function(q){return q&&(this.sourceEvent=q),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(q,ft){return this.mouse&&q!=="mouse"&&(this.mouse[1]=ft.invert(this.mouse[0])),this.touch0&&q!=="touch"&&(this.touch0[1]=ft.invert(this.touch0[0])),this.touch1&&q!=="touch"&&(this.touch1[1]=ft.invert(this.touch1[0])),this.that.__zoom=ft,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(q){var ft=Ut(this.that).datum();u.call(q,this.that,new BC(q,{sourceEvent:this.sourceEvent,target:w,type:q,transform:this.that.__zoom,dispatch:u}),ft)}};function Q(q,...ft){if(!t.apply(this,arguments))return;var lt=V(this,ft).event(q),pt=this.__zoom,Tt=Math.max(o[0],Math.min(o[1],pt.k*Math.pow(2,r.apply(this,arguments)))),Rt=gr(q);if(lt.wheel)(lt.mouse[0][0]!==Rt[0]||lt.mouse[0][1]!==Rt[1])&&(lt.mouse[1]=pt.invert(lt.mouse[0]=Rt)),clearTimeout(lt.wheel);else{if(pt.k===Tt)return;lt.mouse=[Rt,pt.invert(Rt)],di(this),lt.start()}vo(q),lt.wheel=setTimeout(Ct,S),lt.zoom("mouse",n(z(N(pt,Tt),lt.mouse[0],lt.mouse[1]),lt.extent,s));function Ct(){lt.wheel=null,lt.end()}}function rt(q,...ft){if(h||!t.apply(this,arguments))return;var lt=q.currentTarget,pt=V(this,ft,!0).event(q),Tt=Ut(q.view).on("mousemove.zoom",re,!0).on("mouseup.zoom",Ee,!0),Rt=gr(q,lt),Ct=q.clientX,Kt=q.clientY;Oc(q.view),du(q),pt.mouse=[Rt,this.__zoom.invert(Rt)],di(this),pt.start();function re(Ce){if(vo(Ce),!pt.moved){var be=Ce.clientX-Ct,Ne=Ce.clientY-Kt;pt.moved=be*be+Ne*Ne>E}pt.event(Ce).zoom("mouse",n(z(pt.that.__zoom,pt.mouse[0]=gr(Ce,lt),pt.mouse[1]),pt.extent,s))}function Ee(Ce){Tt.on("mousemove.zoom mouseup.zoom",null),Pc(Ce.view,pt.moved),vo(Ce),pt.event(Ce).end()}}function et(q,...ft){if(t.apply(this,arguments)){var lt=this.__zoom,pt=gr(q.changedTouches?q.changedTouches[0]:q,this),Tt=lt.invert(pt),Rt=lt.k*(q.shiftKey?.5:2),Ct=n(z(N(lt,Rt),pt,Tt),e.apply(this,ft),s);vo(q),l>0?Ut(this).transition().duration(l).call(G,Ct,pt,q):Ut(this).call(w.transform,Ct,pt,q)}}function st(q,...ft){if(t.apply(this,arguments)){var lt=q.touches,pt=lt.length,Tt=V(this,ft,q.changedTouches.length===pt).event(q),Rt,Ct,Kt,re;for(du(q),Ct=0;Ct<pt;++Ct)Kt=lt[Ct],re=gr(Kt,this),re=[re,this.__zoom.invert(re),Kt.identifier],Tt.touch0?!Tt.touch1&&Tt.touch0[2]!==re[2]&&(Tt.touch1=re,Tt.taps=0):(Tt.touch0=re,Rt=!0,Tt.taps=1+!!f);f&&(f=clearTimeout(f)),Rt&&(Tt.taps<2&&(d=re[0],f=setTimeout(function(){f=null},m)),di(this),Tt.start())}}function ct(q,...ft){if(this.__zooming){var lt=V(this,ft).event(q),pt=q.changedTouches,Tt=pt.length,Rt,Ct,Kt,re;for(vo(q),Rt=0;Rt<Tt;++Rt)Ct=pt[Rt],Kt=gr(Ct,this),lt.touch0&<.touch0[2]===Ct.identifier?lt.touch0[0]=Kt:lt.touch1&<.touch1[2]===Ct.identifier&&(lt.touch1[0]=Kt);if(Ct=lt.that.__zoom,lt.touch1){var Ee=lt.touch0[0],Ce=lt.touch0[1],be=lt.touch1[0],Ne=lt.touch1[1],ye=(ye=be[0]-Ee[0])*ye+(ye=be[1]-Ee[1])*ye,De=(De=Ne[0]-Ce[0])*De+(De=Ne[1]-Ce[1])*De;Ct=N(Ct,Math.sqrt(ye/De)),Kt=[(Ee[0]+be[0])/2,(Ee[1]+be[1])/2],re=[(Ce[0]+Ne[0])/2,(Ce[1]+Ne[1])/2]}else if(lt.touch0)Kt=lt.touch0[0],re=lt.touch0[1];else return;lt.zoom("touch",n(z(Ct,Kt,re),lt.extent,s))}}function dt(q,...ft){if(this.__zooming){var lt=V(this,ft).event(q),pt=q.changedTouches,Tt=pt.length,Rt,Ct;for(du(q),h&&clearTimeout(h),h=setTimeout(function(){h=null},m),Rt=0;Rt<Tt;++Rt)Ct=pt[Rt],lt.touch0&<.touch0[2]===Ct.identifier?delete lt.touch0:lt.touch1&<.touch1[2]===Ct.identifier&&delete lt.touch1;if(lt.touch1&&!lt.touch0&&(lt.touch0=lt.touch1,delete lt.touch1),lt.touch0)lt.touch0[1]=this.__zoom.invert(lt.touch0[0]);else if(lt.end(),lt.taps===2&&(Ct=gr(Ct,this),Math.hypot(d[0]-Ct[0],d[1]-Ct[1])<C)){var Kt=Ut(this).on("dblclick.zoom");Kt&&Kt.apply(this,arguments)}}}return w.wheelDelta=function(q){return arguments.length?(r=typeof q=="function"?q:js(+q),w):r},w.filter=function(q){return arguments.length?(t=typeof q=="function"?q:js(!!q),w):t},w.touchable=function(q){return arguments.length?(i=typeof q=="function"?q:js(!!q),w):i},w.extent=function(q){return arguments.length?(e=typeof q=="function"?q:js([[+q[0][0],+q[0][1]],[+q[1][0],+q[1][1]]]),w):e},w.scaleExtent=function(q){return arguments.length?(o[0]=+q[0],o[1]=+q[1],w):[o[0],o[1]]},w.translateExtent=function(q){return arguments.length?(s[0][0]=+q[0][0],s[1][0]=+q[1][0],s[0][1]=+q[0][1],s[1][1]=+q[1][1],w):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},w.constrain=function(q){return arguments.length?(n=q,w):n},w.duration=function(q){return arguments.length?(l=+q,w):l},w.interpolate=function(q){return arguments.length?(c=q,w):c},w.on=function(){var q=u.on.apply(u,arguments);return q===u?w:q},w.clickDistance=function(q){return arguments.length?(E=(q=+q)*q,w):Math.sqrt(E)},w.tapDistance=function(q){return arguments.length?(C=+q,w):C},w}const Fv=function(t){var e,n;const r=this.internal,{axis:i,config:o,org:s,scale:l,state:c}=r;let u;if(!i)return;const f=i.isCategorized();if(o.zoom_enabled)if(u=t,Array.isArray(u)){if(i.isTimeSeries()&&(u=u.map(h=>Kn.bind(r)(h))),r.withinRange(u,r.getZoomDomain("zoom",!0),r.getZoomDomain("zoom"))){if(c.domain=u.slice(),u=r.getZoomDomainValue(u),r.api.tooltip.hide(),o.subchart_show)if(c.isCanvasMode)(e=r.setCanvasSubchartDomain)==null||e.call(r,u,!0,!1);else{const h=l.zoom||l.x;r.brush.getSelection().call(r.brush.move,u.map(h))}else{const h=f?l.x.orgScale():s.xScale||l.x;r.updateCurrentZoomTransform(h,u)}r.setZoomResetButton()}}else u=r.zoom.getDomain();return(n=c.domain)!=null?n:u};bn(Fv,{enable(t){var e;const n=this.internal,{axis:r,config:i}=n;if(!r){i.zoom_enabled=!1;return}/^(drag|wheel)$/.test(t)&&(i.zoom_type=t),i.zoom_enabled=!!t,n.zoom?t===!1&&n.bindZoomEvent(!1):n.initZoom(),t!==!1&&(i.zoom_type==="drag"&&!n.zoomBehaviour&&((e=n.initZoomBehaviour)==null||e.call(n)),n.bindZoomEvent()),n.updateAndRedraw()},max(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_max=br("max",[r[1],t])),n.zoom_x_max},min(t){const e=this.internal,{config:n,org:{xDomain:r}}=e;return(t===0||t)&&(n.zoom_x_min=br("min",[r[0],t])),n.zoom_x_min},range(t){const e=this.zoom;if(Ke(t)){const{min:n,max:r}=t;on(n)&&e.min(n),on(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var VC={zoom:Fv,unzoom(){var t;const e=this.internal,{config:n,$el:{canvas:r,eventRect:i,zoomResetBtn:o},scale:{zoom:s},state:l}=e,c=l.isCanvasMode?r:i;(s||l.isCanvasMode&&n.subchart_show&&l.domain)&&(n.subchart_show?l.isCanvasMode?(t=e.clearCanvasSubchartDomain)==null||t.call(e,!0,!1):e.brush.getSelection().call(e.brush.move,null):e.zoom.updateTransformScale(vr),e.updateZoom(!0),o==null||o.style("display","none"),c!=null&&c.node()&&fu(c.node())!==vr&&e.zoom.transform(c,vr),l.domain=void 0)}};function Hs(t){return t.state.isCanvasMode?t.$el.canvas:t.$el.eventRect}function Nv(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return vr.translate(e.x+(e.k-1)*n.left,e.y+(e.k-1)*n.top).scale(e.k)}function $v(t,e){if(!t.state.isCanvasMode)return e;const{margin:n}=t.state;return vr.translate(e.x-(e.k-1)*n.left,e.y-(e.k-1)*n.top).scale(e.k)}function Bv(t,e,n){const r=er(e,n);if(t.state.isCanvasMode){const{margin:i}=t.state;r[0]-=i.left,r[1]-=i.top}return r}var jC={initZoom(){const t=this;t.scale.zoom=null,t.generateZoom(),t.config.zoom_type==="drag"&&t.initZoomBehaviour()},bindZoomEvent(t=!0){const e=this,{config:n}=e;n.zoom_enabled&&t?!n.subchart_show&&e.bindZoomOnEventRect():t===!1&&(e.api.unzoom(),e.unbindZoomEvent())},generateZoom(){const t=this,{config:e,org:n,scale:r}=t,i=WC().duration(0).on("start",t.onZoomStart.bind(t)).on("zoom",t.onZoom.bind(t)).on("end",t.onZoomEnd.bind(t));i.orgScaleExtent=()=>{const o=e.zoom_extent||[1,10];return[o[0],Math.max(t.getMaxDataCount()/o[1],o[1])]},i.updateScaleExtent=function(){const o=Ma(t.scale.x.orgDomain())/Ma(t.getZoomDomain()),s=this.orgScaleExtent();return this.scaleExtent([s[0]*o,s[1]*o]),this},i.updateTransformScale=(o,s)=>{var l,c;const u=e.axis_rotated,f=Nv(t,o);(l=n.xScale)==null||l.range(r.x.range());const d=f[u?"rescaleY":"rescaleX"](n.xScale||r.x);if(d.domain().some(S=>/(Invalid Date|NaN)/.test(S.toString())))return;const h=t.trimXDomain(d.domain()),m=e.zoom_rescale;if(d.domain(h,n.xDomain),s){const S=d(r.x.domain()[0]),E=u?f.x:S,C=u?S:f.y,w=$v(t,vr.translate(E,C).scale(o.k));(c=Hs(t))==null||c.property("__zoom",w)}r.zoom=t.getCustomizedXScale(d),t.axis.x.scale(r.zoom),m?(!n.xScale&&(n.xScale=r.x.copy()),r.x.domain(h)):n.xScale&&(r.x.domain(n.xScale.domain()),n.xScale=null)},i.getDomain=()=>{const o=r[r.zoom?"zoom":"subX"].domain();return t.axis.isCategorized()&&(o[1]-=2),o},t.zoom=i},onZoomStart(t){const e=this,{sourceEvent:n}=t;n&&(e.zoom.startEvent=n,e.state.zooming=!0,$e(e.config.zoom_onzoomstart,e.api,t))},onZoom(t){const e=this,{config:n,scale:r,state:i,org:o}=e,{sourceEvent:s}=t,l=(t==null?void 0:t.transform)===vr;if(!n.zoom_enabled||e.filterTargetsToShow(e.data.targets).length===0||!r.zoom&&(s==null?void 0:s.type.indexOf("touch"))>-1&&(s==null?void 0:s.touches.length)===1)return;t.sourceEvent&&(i.zooming=!0,i.domain=void 0);const c=(s==null?void 0:s.type)==="mousemove",u=(s==null?void 0:s.wheelDelta)<0,{transform:f}=t;!c&&u&&r.x.domain().every((S,E)=>S!==o.xDomain[E])&&r.x.domain(o.xDomain),e.zoom.updateTransformScale(f,n.zoom_type==="wheel"&&s);const d=n.transition_duration>0&&!n.subchart_show&&(i.dragging||l||!t.sourceEvent),h=s&&c&&n.zoom_type!=="wheel",m=()=>{var S;e.config&&(e.redraw({withTransition:d,withY:n.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.state.cancelClick=c,!l&&$e(n.zoom_onzoom,e.api,(S=e.state.domain)!=null?S:e.zoom.getDomain()))};h?Eh(e.state,m):m()},onZoomEnd(t){var e,n;const r=this,{config:i,state:o}=r,s=r.zoom;if(!s)return;let{startEvent:l}=s,c=t==null?void 0:t.sourceEvent;const u=(t==null?void 0:t.transform)===vr;(l==null?void 0:l.type.indexOf("touch"))>-1&&(l=l.changedTouches[0],c=(e=c==null?void 0:c.changedTouches)==null?void 0:e[0]),!(i.zoom_type==="drag"&&c&&l.clientX===c.clientX&&l.clientY===c.clientY)&&(o.zooming=!1,!o.isCanvasMode&&r.redrawEventRect(),r.updateZoom(),!u&&(c||o.dragging)&&$e(i.zoom_onzoomend,r.api,(n=r.state.domain)!=null?n:r.zoom.getDomain()))},updateZoom(t){const e=this,{subX:n,x:r,zoom:i}=e.scale;if(i){const o=i.domain(),s=n.domain(),l=.015,c=e.config.axis_x_inverted?(o[0]>=s[0]||o[0]+l>=s[0])&&(s[1]>=o[1]||s[1]>=o[1]+l):(o[0]<=s[0]||o[0]-l<=s[0])&&(s[1]<=o[1]||s[1]<=o[1]-l);(t||c)&&(e.axis.x.scale(n),r.domain(n.orgDomain()),e.scale.zoom=null)}},updateCurrentZoomTransform(t,e){var n;const r=this,{config:i}=r,o=i.axis_rotated,s=[-t(e[0]),0],l=vr.scale(t.range()[1]/(t(e[1])-t(e[0]))).translate(...o?s.reverse():s);(n=Hs(r))==null||n.call(r.zoom.transform,$v(r,l))},bindZoomOnEventRect(){var t,e;const n=this,{config:r,$el:{svg:i}}=n,o=Hs(n),s=r.zoom_type==="drag"?n.zoomBehaviour:n.zoom;n.state.isCanvasMode&&((t=s==null?void 0:s.touchable)==null||t.call(s,()=>r.interaction_inputType_touch!==!1)),!n.state.isCanvasMode&&fe.GestureEvent&&/^((?!chrome|android|mobile).)*safari/i.test((e=fe.navigator)==null?void 0:e.userAgent)&&i.on("wheel",()=>{}),o==null||o.call(s).on("dblclick.zoom",null)},initZoomBehaviour(){const t=this,{config:e,state:n}=t,r=e.axis_rotated;let i=0,o=0,s,l;const c={axis:r?"y":"x",attr:r?"height":"width",index:r?1:0},u=f=>{const[d,h]=l!=null?l:[0,r?n.height:n.width];return Math.min(Math.max(f,d),h)};t.zoomBehaviour=Gh().touchable(()=>!n.isCanvasMode||e.interaction_inputType_touch!==!1).clickDistance(4).on("start",function(f){var d;l=t.scale.zoom?null:t.axis.getExtent(),n.event=f,t.setDragStatus(!0),t.unselectRect(),!n.isCanvasMode&&!s&&(s=t.$el.main.append("rect").attr("clip-path",n.clip.path).attr("class",yc.zoomBrush).attr("width",r?n.width:0).attr("height",r?0:n.height)),s==null||s.attr(r?"width":"height",r?n.width:n.height),i=u(Bv(t,f,this)[c.index]),o=i,n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,o):s.attr(c.axis,i).attr(c.attr,0),t.onZoomStart(f)}).on("drag",function(f){var d;o=u(Bv(t,f,this)[c.index]),n.isCanvasMode?(d=t.renderCanvasZoomBrush)==null||d.call(t,i,o):s.attr(c.axis,Math.min(i,o)).attr(c.attr,Math.abs(o-i))}).on("end",f=>{var d;const h=t.scale.zoom||t.scale.x;n.event=f,o=u(o),n.isCanvasMode?(d=t.clearCanvasZoomBrush)==null||d.call(t):s.attr(c.axis,0).attr(c.attr,0),i>o&&([i,o]=[o,i]),i<0&&(o+=Math.abs(i),i=0),i!==o&&t.api.zoom([i,o].map(m=>h.invert(m))),t.setDragStatus(!1)})},setZoomResetButton(){const t=this,{config:e,$el:n}=t,r=e.zoom_resetButton;r&&e.zoom_type==="drag"&&(n.zoomResetBtn?n.zoomResetBtn.style("display",null):n.zoomResetBtn=t.$el.chart.append("div").classed(Ue.button,!0).append("span").on("click",function(){ue(r.onclick)&&r.onclick.bind(t.api)(this),t.api.unzoom()}).classed(yc.buttonZoomReset,!0).text(r.text||"Reset Zoom"))},getZoomTransform(){const t=this,e=Hs(t),n=e==null?void 0:e.node();return n?Nv(t,fu(n)):{k:1}}},HC={zoom_enabled:!1,zoom_type:"wheel",zoom_extent:void 0,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0};let zv=()=>(bn(Ir.prototype,jC),bn(Jn.prototype,VC),Ua.setOptions([HC]),(zv=()=>!0)());function Uv(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function kv(t,e=!1){const n=this.internal,{config:r}=n,i=r.transition_duration&&ro();return t?(r.regions=e?r.regions.concat(t):t,n.state.isCanvasMode?(Uv(n),r.regions):(n.updateRegion(),n.redrawRegion(i),r.regions)):r.regions}const Gv=function(t){return kv.bind(this)(t)};bn(Gv,{add:function(t){return kv.bind(this)(t,!0)},remove:function(t){const e=this.internal,{config:n,$T:r}=e,i=t||{},o=fa(i,"classes",[no.region]);let s=n.regions;if(e.state.isCanvasMode)return Object.keys(i).length?(s=s.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{o.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=s):n.regions=[],Uv(e),n.regions;const l=e.$el.main.select(`.${no.regions}`).selectAll(o.map(c=>`.${c}`));return r(l).style("opacity","0").remove(),Object.keys(i).length?(s=s.filter(c=>{let u=!1;return c.class?(c.class.split(" ").forEach(f=>{o.indexOf(f)>=0&&(u=!0)}),!u):!0}),n.regions=s):n.regions=[],s}});var YC={regions:Gv},KC={initRegion(){const t=this,{$el:e}=t;e.region.main=e.main.insert("g",":first-child").attr("clip-path",t.state.clip.path).attr("class",no.regions)},updateRegion(){const t=this,{config:e,$el:{region:n},$T:r}=t;n.main||t.initRegion(),n.main.style("visibility",t.hasArcType()?"hidden":null);const i=n.main.selectAll(`.${no.region}`).data(e.regions);r(i.exit()).style("opacity","0").remove();const o=i.enter().append("g");o.append("rect").style("fill-opacity","0"),n.list=o.merge(i).attr("class",t.classRegion.bind(t)),n.list.each(function(s){var l;Ut(this).select("text").empty()&&((l=s.label)!=null&&l.text)&&Ut(this).append("text").style("opacity","0")})},redrawRegion(t){const e=this,{$el:{region:n},$T:r}=e,i=e.regionX.bind(e),o=e.regionY.bind(e),s=["width","height"];let l=n.list.select("rect"),c=n.list.selectAll("text");return l=r(l,t).attr("x",i).attr("y",o).attr("width",e.regionWidth.bind(e)).attr("height",e.regionHeight.bind(e)),c=r(c,t).text(u=>{var f;return(f=u.label)==null?void 0:f.text}).attr("transform",({label:u})=>u.rotated?" rotate(-90)":null).attr("transform",function(u){var f;const{x:d=0,y:h=0,center:m=!1,rotated:S=!1}=(f=u.label)!=null?f:{},E=this.previousElementSibling,C={x:0,y:0};return Ye(m)&&["x","y"].forEach((w,N)=>{m.indexOf(w)>-1&&(C[w]=(+E.getAttribute(s[N])-cn(this)[s[N]])/2)}),`translate(${i(u)+C.x+d}, ${o(u)+C.y+h})${S?" rotate(-90)":""}`}).attr("text-anchor",({label:u})=>u!=null&&u.rotated?"end":null).attr("dy","1em").style("fill",({label:u})=>{var f;return(f=u==null?void 0:u.color)!=null?f:null}),[l.style("fill-opacity",u=>Xe(u.opacity)?u.opacity:null).on("end",function(){Ut(this.parentNode).selectAll("rect:not([x])").remove()}),c.style("opacity",null)]},regionX(t){return this.getRegionSize("x",t)},regionY(t){return this.getRegionSize("y",t)},regionWidth(t){return this.getRegionSize("width",t)},regionHeight(t){return this.getRegionSize("height",t)},getRegionSize(t,e){const n=this,{config:r,scale:i,state:o}=n,s=r.axis_rotated,l=/(x|y|y2)/.test(t),c=l?t==="x":t==="width",u=!l&&n[c?"regionX":"regionY"](e);let f=l?"start":"end",d=l?0:o[t],h;if(e.axis==="y"||e.axis==="y2"?(!l&&!c?f="start":l&&!c&&(f="end"),(c?s:!s)&&f in e&&(h=i[e.axis])):(c?!s:s)&&f in e&&(h=i.zoom||i.x),h){let m=0;d=e[f],n.axis.isTimeSeries(e.axis)?d=Kn.call(n,d):/(x|width)/.test(t)&&n.axis.isCategorized()&&isNaN(d)&&(d=r.axis_x_categories.indexOf(d),m=n.axis.x.tickOffset()*(f==="start"?-1:1)),d=h(d)+m}return l?d:d<u?0:d-u},isRegionOnX(t){return!t.axis||t.axis==="x"}};let Xv=()=>(bn(Ir.prototype,KC),Jn.prototype.regions=YC.regions,(Xv=()=>({}))());var xi={initArea(t){const e=this,{config:n}=e;t.insert("g",`.${n.area_front?Un.circles:$r.lines}`).attr("class",e.getClass("areas",!0))},updateAreaColor(t){const e=this;return Gg.call(e,t,"area_linearGradient",e.color)},updateArea(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,state:i,$el:o,$T:s}=n,l=e?o.subchart:o;r.area_linearGradient&&n.updateLinearGradient();const c=l.main.selectAll(`.${hs.areas}`).selectAll(`.${hs.area}`).data(n.lineData.bind(n));s(c.exit(),t).style("opacity","0").remove(),l.area=c.enter().append("path").attr("class",n.getClass("area",!0)).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(){return i.orgAreaOpacity=Ut(this).style("opacity"),"0"}).merge(c),c.style("opacity",i.orgAreaOpacity),n.setRatioForGroupedData(l.area.data())},redrawArea(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{area:i}=n?this.$el.subchart:this.$el,{orgAreaOpacity:o}=r.state;return[r.$T(i,e,Pr()).attr("d",t).style("fill",r.updateAreaColor.bind(r)).style("opacity",s=>String(r.isAreaRangeType(s)?o/1.75:o))]},generateDrawArea(t,e){return Md(this,t,e)}},yi={area_above:!1,area_below:!1,area_front:!0,area_linearGradient:!1,area_zerobased:!0},hu={spline_interpolation_type:"cardinal"};function ZC(t){return qn(t)&&ue(t.create)&&ue(t.update)}function JC(t,e){var n;const r=this,i=(c,u)=>{const f=c.attributes;for(let d=0,h;h=f[d];d++)h=h.name,u.setAttribute(h,c.getAttribute(h))},s=new DOMParser().parseFromString(Yr(t),"image/svg+xml").documentElement,l=Ze.createElementNS(Jt.svg,s.nodeName.toLowerCase());if(l.id=e,l.style.fill="inherit",l.style.stroke="inherit",i(s,l),(n=s.childNodes)!=null&&n.length){const c=Ut(l);"innerHTML"in l?c.html(Yr(s.innerHTML)):La(s.childNodes).forEach(u=>{i(u,c.append(u.tagName).node())})}r.$el.defs.node().appendChild(l)}var Ti={hasValidPointType(t){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(t||this.config.point_type)},hasLegendDefsPoint(){var t;const{config:e}=this;return e.legend_show&&((t=e.point_pattern)==null?void 0:t.length)&&e.legend_usePoint},getDefsPointId(t){const{state:{datetimeId:e}}=this;return`${e}-point${t}`},getValidPointPattern(){const{config:t}=this,e=/^(circle|rect(angle)?)$/i.test(t.point_type)?t.point_type:"circle";return pn(t.point_pattern)?t.point_pattern:[e]},generatePoint(){const t=this,{$el:e,config:n}=t,r=[],i=t.getValidPointPattern();return function(o,s,...l){return function(c){var u,f,d,h;const m=t.getTargetSelectorSuffix(c.id||((u=c.data)==null?void 0:u.id)||c),S=Ut(this);r.indexOf(m)<0&&r.push(m);let E=i[r.indexOf(m)%i.length];if(t.hasValidPointType(E))E=t[E];else if(!ZC(E||n.point_type)){const C=t.getDefsPointId(m);if(e.defs.select(`#${C}`).size()<1&&JC.call(t,E,C),o==="create")return(f=t.custom)==null?void 0:f.create.bind(s)(S,C,...l);if(o==="update")return(d=t.custom)==null?void 0:d.update.bind(s)(S,...l)}return(h=E[o])==null?void 0:h.bind(s)(S,...l)}}}};function QC(t,e,n,r=!1){const i=t?[t,0]:n;for(let o=t||n.reduce((s,l)=>s+l);o<=e;)n.forEach(s=>{o+s<=e&&i.push(s),o+=s});return i.length%2!==0&&i.push(r?n[1]:0),{dash:i.join(" "),length:i.reduce((o,s)=>o+s,0)}}var _C={initLine(){Xg.call(this,{elKey:"line",className:$r.chartLines,cssRules:["pointer-events:none"]})},updateTargetsForLine(t){const e=this,{$el:{area:n,main:r}}=e,i=e.getClass("lines",!0),o=t.filter(l=>!(e.isScatterType(l)||e.isBubbleType(l))),s=eu.call(e,o,{type:"Line",elKey:"line",containerClass:$r.chartLines,itemClass:$r.chartLine,initFn:e.initLine});if(s.append("g").attr("class",i),e.hasTypeOf("Area")){const l=r.select(`.${$r.chartLines}`).selectAll(`.${$r.chartLine}`),c=(!n&&s.empty()?l:s).filter(e.isAreaType.bind(e));e.initArea(c)}e.updateTargetForCircle(o,s)},updateLine(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{format:{extraLineClasses:r},$el:i,$T:o}=n,s=e?i.subchart:i,l=s.main.selectAll(`.${$r.lines}`).selectAll(`.${$r.line}`).data(n.lineData.bind(n));o(l.exit(),t).style("opacity","0").remove(),s.line=l.enter().append("path").attr("class",c=>`${n.getClass("line",!0)(c)} ${r(c)||""}`).style("stroke",n.color).merge(l).style("opacity",n.initialOpacity.bind(n)).attr("transform",null)},redrawLine(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{$el:i,$T:o}=r,{line:s}=n?i.subchart:i;return[o(s,e,Pr()).attr("d",t).style("stroke",this.color).style("opacity",null)]},generateDrawLine(t,e){return Pd(this,t,e)},lineWithRegions(t,e,n,r){const i=this,{config:o}=i,s=o.axis_rotated,l=i.axis.isTimeSeries(),c="2 2",u=md(i,t,r),f=i.hasNullDataValue(t);let d,h,m,S;const E=s?et=>n(et.value):et=>e(et.x),C=s?et=>e(et.x):et=>n(et.value),w=et=>`M${et[0][0]},${et[0][1]}L${et[1][0]},${et[1][1]}`,N=l?(et,st,ct,dt)=>{const q=et.x.getTime(),ft=st.x-et.x,lt=new Date(q+ft*ct),pt=new Date(q+ft*(ct+dt)),Tt=s?[[n(h(ct)),e(lt)],[n(h(ct+m)),e(pt)]]:[[e(lt),n(h(ct))],[e(pt),n(h(ct+m))]];return w(Tt)}:(et,st,ct,dt)=>{const q=e(st.x,!s),ft=n(st.value,s),lt=ct+dt,pt=e(d(ct),!s),Tt=n(h(ct),s);let Rt=e(d(lt),!s),Ct=n(h(lt),s);Rt>q&&(Rt=q),et.value>st.value&&(s?Ct<ft:Ct>ft)&&(Ct=ft);const Kt=[[pt,Tt],[Rt,Ct]];return s&&Kt.forEach(re=>re.reverse()),w(Kt)},z={x:i.axis.getAxisType("x"),y:i.axis.getAxisType("y")};let $="";if(!t.length)return $;const G=i.$el.line.filter(({id:et})=>et===t[0].id),V=G.clone().style("display","none"),J=(et,st)=>et.attr("d",st).node().getTotalLength(),Q={dash:[],lastLength:0};let rt=!1;for(let et=0,st;st=t[et];et++){const ct=t[et-1],dt=ct&&Xe(ct.value);let q=i.isWithinRegions(st.x,u);if(Xe(st.value)){if(Tn(u)||!q||!dt)$+=`${et&&dt?"L":"M"}${E(st)},${C(st)}`;else if(dt)if(q=((q==null?void 0:q.dasharray)||c).split(" ").map(Number),d=da(z.x,ct.x,st.x),h=da(z.y,ct.value,st.value),f){const ft=e(st.x)-e(ct.x),lt=n(st.value)-n(ct.value),pt=Math.sqrt(ft*ft+lt*lt);m=q[0]/pt,S=m*q[1];for(let Tt=m;Tt<=1;Tt+=S)$+=N(ct,st,Tt,m),Tt+S>=1&&($+=N(ct,st,1,0))}else{let ft;if(rt=st.x===t[t.length-1].x,l){const Rt=+ct.x,Ct=new Date(Rt),Kt=new Date(Rt+(+st.x-Rt));ft=[[e(Ct),n(h(0))],[e(Kt),n(h(1))]]}else ft=[[e(d(0)),n(h(0))],[e(d(1)),n(h(1))]];s&&ft.forEach(Rt=>Rt.reverse());const lt=J(V,$),pt=J(V,$+=`L${ft[1].join(",")}`),Tt=QC(lt-Q.lastLength,pt-Q.lastLength,q,rt);Q.lastLength+=Tt.length,Q.dash.push(Tt.dash)}}}return Q.dash.length&&(!rt&&Q.dash.push(J(V,$)),G.attr("stroke-dasharray",Q.dash.join(" "))),V.remove(),$},isWithinRegions(t,e){return xd(t,e)},isWithinStep(t,e){return Math.abs(e-er(this.state.event,t)[1])<30},shouldDrawPointsForLine(t){const e=this.config.line_point;return e===!0||en(e)&&e.indexOf(t.id)!==-1}};const bi=()=>Pr(),Wv=new WeakMap;function Vv(t){const e=t.getAttribute("height"),n=t.getAttribute("width"),r=t.getAttribute("href")||t.getAttribute("xlink:href"),i=Wv.get(t);if(i&&i.attrHeight===e&&i.attrWidth===n&&i.href===r)return i;const{width:o,height:s}=ya(t),l={attrHeight:e,attrWidth:n,height:s,href:r,width:o};return Wv.set(t,l),l}var Ys={initialOpacityForCircle(t){const{config:e,state:{withoutFadeIn:n}}=this;let r=e.point_opacity;return Tn(r)&&(r=this.getBaseValue(t)!==null&&n[t.id]?this.opacityForCircle(t):"0"),r},opacityForCircle(t){var e;const{config:n}=this;let r=n.point_opacity;return Tn(r)&&(r=n.point_show&&!((e=this.isPointFocusOnly)!=null&&e.call(this))?null:"0",r=Xe(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":r:"0"),r},initCircle(){const t=this,{$el:{main:e}}=t;!t.point&&(t.point=t.generatePoint()),(t.hasType("bubble")||t.hasType("scatter"))&&e.select(`.${Ue.chart} > .${Un.chartCircles}`).empty()&&e.select(`.${Ue.chart}`).append("g").attr("class",Un.chartCircles)},updateTargetForCircle(t,e){const n=this,{config:r,data:i,$el:o}=n,s=r.interaction_enabled&&r.data_selection_enabled,l=s&&r.data_selection_isselectable,c=n.getClass("circles",!0);if(!r.point_show)return;n.initCircle();let u=t,f=e;if(!u){u=n.filterNullish(i.targets).filter(h=>this.isScatterType(h)||this.isBubbleType(h));const d=o.main.select(`.${Un.chartCircles}`).style("pointer-events","none").selectAll(`.${Un.circles}`).data(u);d.exit().remove(),f=d.enter()}s&&f.append("g").attr("class",d=>n.generateClass(sn.selectedCircles,d.id)),f.append("g").attr("class",c).call(d=>{n.setCssRule(!0,`.${Un.circles}`,["cursor:pointer"],l)(d),n.setCssRule(!0,` .${Un.circle}`,["fill","stroke"],n.color)(d)}).style("opacity",function(){return Ut(this.parentNode).classed(Un.chartCircles)?"0":null}),s&&u.forEach(d=>{o.main.selectAll(`.${sn.selectedCircles}${n.getTargetSelectorSuffix(d.id)}`).selectAll(`${sn.selectedCircle}`).each(h=>{h.value=d.values[h.index].value})})},updateCircle(t=!1){const e=this,{config:n,state:r,$el:i}=e,o=e.isPointFocusOnly(),s=t?i.subchart:i;if(n.point_show&&!r.toggling){n.point_radialGradient&&e.updateLinearGradient();const l=s.main.selectAll(`.${Un.circles}`).selectAll(`.${Un.circle}`).data(d=>{const h=e.isLineType(d)&&e.shouldDrawPointsForLine(d)||e.isBubbleType(d)||e.isRadarType(d)||e.isScatterType(d)?o?[d.values[0]]:d.values:[];return e.filterNullish(h)});l.exit().remove();const c=e.pointR.bind(e),u=e.generateUpdateCircleColor(),f=e.initialOpacityForCircle.bind(e);l.enter().filter(Boolean).append(e.point("create",this,c,u)),s.circle=s.main.selectAll(`.${Un.circles} .${Un.circle}`).style("stroke",e.getStylePropValue(e.color)).style("opacity",f)}},generateUpdateCircleColor(){const t=this,e=t.getStylePropValue(t.color);return n=>t.config.point_radialGradient?t.getGradienColortUrl(n.id):e?e(n):null},updateCircleColor(t){return this.generateUpdateCircleColor()(t)},redrawCircle(t,e,n,r,i=!1){const o=this,{state:{rendered:s},$el:l,$T:c}=o,u=i?l.subchart:l,f=u.main.selectAll(`.${sn.selectedCircle}`);if(!o.config.point_show)return[];const d=o.isCirclePoint()?"c":"",h=Pr(),m=o.opacityForCircle.bind(o),S=o.generateUpdateCircleColor();if(o.isCirclePoint()){const w=u.circle;return o.hasType("bubble")&&w.attr("r",o.pointR.bind(o)),n?(r&&w.attr("cx",t),c(w.filter(function(){return!!this.getAttribute("cx")}),!0,`${h}-pos`).attr("cx",t).attr("cy",e).style("fill",S),w.filter(function(){return!this.getAttribute("cx")}).attr("cx",t).attr("cy",e).style("fill",S)):w.attr("cx",t).attr("cy",e).style("fill",S),[[c(w,n||!s,h).style("opacity",m)],c(f,n).attr("cx",t).attr("cy",e)]}const E=o.point("update",o,t,e,S,n,r,f),C=[];return u.circle.each(function(w){let N=E.bind(this)(w);N=c(N,n||!s,h).style("opacity",m),C.push(N)}),[C,c(f,n).attr(`${d}x`,t).attr(`${d}y`,e)]},showCircleFocus(t){const e=this,{state:{hasRadar:n,resizing:r,toggling:i,transiting:o},$el:s}=e;let{circle:l}=s;if(o===!1&&l&&e.isPointFocusOnly()){const c=(n?e.radarCircleX:e.circleX).bind(e),u=(n?e.radarCircleY:e.circleY).bind(e),f=i||Tn(t),d=e.point("update",e,c,u,e.getStylePropValue(e.color),r?!1:f);t&&(l=l.filter(function(h){var m;const S=(m=t.filter)==null?void 0:m.call(t,E=>E.id===h.id);return S.length?Ut(this).datum(S[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(h){const{id:m,index:S,value:E}=h;let C="hidden";Xe(E)&&(d.bind(this)(h),e.expandCircles(S,m),C=""),this.style.visibility=C})}},hideCircleFocus(){const t=this,{$el:{circle:e}}=t;t.isPointFocusOnly()&&e&&(t.unexpandCircles(),e.style("visibility","hidden"))},expandCircles(t,e,n){const r=this,i=r.pointExpandedR.bind(r);n&&r.unexpandCircles();const o=r.getShapeByIndex("circle",t,e).classed(Ue.EXPANDED,!0),s=i(o)/r.config.point_r,l=1-s;r.isCirclePoint()?o.attr("r",i):o.each(function(){const c=Ut(this);if(this.tagName==="circle")c.attr("r",i);else{const{width:u,height:f}=Vv(this),d=l*(+c.attr("x")+u/2),h=l*(+c.attr("y")+f/2);c.attr("transform",`translate(${d} ${h}) scale(${s})`)}})},unexpandCircles(t){const e=this,n=e.pointR.bind(e),r=e.getShapeByIndex("circle",t).filter(function(){return Ut(this).classed(Ue.EXPANDED)}).classed(Ue.EXPANDED,!1);if(r.attr("r",n),!e.isCirclePoint()){const i=n(r)/e.config.point_r;r.attr("transform",i!==1?`scale(${i})`:null)}},isWithinCircle(t,e){const{state:n}=this,r=er(n.event,t),i=Ut(t),o=this.isCirclePoint(t)?"c":"",s=this.getPointSensitivity(i==null?void 0:i.datum());let l=+i.attr(`${o}x`),c=+i.attr(`${o}y`);if(!(l||c)&&t.nodeType===1){const{x:d,y:h}=cn(t);l=d,c=h}const u=l-r[0],f=c-r[1];return Math.sqrt(u*u+f*f)<(e||s)},updatePointClass(t){const e=this,{circle:n}=e.$el;let r=!1;return(Ke(t)||n)&&(r=t===!0?n.each(function(i){let o=e.getClass("circle",!0)(i);this.getAttribute("class").indexOf(Ue.EXPANDED)>-1&&(o+=` ${Ue.EXPANDED}`),this.setAttribute("class",o)}):e.getClass("circle",!0)(t)),r},custom:{create(t,e,n){return t.append("use").attr("xlink:href",`#${e}`).attr("class",this.updatePointClass.bind(this)).style("fill",n).node()},update(t,e,n,r,i,o,s){const l=this,{width:c,height:u}=Vv(t.node()),f=m=>Xe(m.value)?e(m)-c/2:0,d=m=>Xe(m.value)?n(m)-u/2:0;let h=t;return i&&(o&&h.attr("x",f),h=l.$T(h,i,bi()),s&&l.$T(s,i,bi())),h.attr("x",f).attr("y",d).style("fill",r)}},circle:{create(t,e,n){return t.append("circle").attr("class",this.updatePointClass.bind(this)).attr("r",e).style("fill",n).node()},update(t,e,n,r,i,o,s){const l=this;let c=t;return l.hasType("bubble")&&c.attr("r",l.pointR.bind(l)),i&&(o&&c.attr("cx",e),c.attr("cx")&&(c=l.$T(c,i,bi())),s&&l.$T(s,i,bi())),c.attr("cx",e).attr("cy",n).style("fill",r)}},rectangle:{create(t,e,n){const r=i=>e(i)*2;return t.append("rect").attr("class",this.updatePointClass.bind(this)).attr("width",r).attr("height",r).style("fill",n).node()},update(t,e,n,r,i,o,s){const l=this,c=l.config.point_r,u=h=>e(h)-c,f=h=>n(h)-c;let d=t;return i&&(o&&d.attr("x",u),d=l.$T(d,i,bi()),s&&l.$T(s,i,bi())),d.attr("x",u).attr("y",f).style("fill",r)}}},Wa={point_show:!0,point_r:2.5,point_radialGradient:!1,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_focus_only:!1,point_opacity:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle"},qC={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0};function jv(t,e,n){const{config:r}=t,i=(o,s)=>{const l=le(s)?s:s===!1?void 0:null;l!==null&&(r[`axis_${o}_${e}`]=l)};on(n)&&(qn(n)?Object.keys(n).forEach(o=>{i(o,n[o])}):(le(n)||n===!1)&&["y","y2"].forEach(o=>{i(o,n)}),t.state.dirty.data=!0,t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))}function Hv(t,e){const{config:n}=t;return{x:n[`axis_x_${e}`],y:n[`axis_y_${e}`],y2:n[`axis_y2_${e}`]}}var t2={axis:{labels:function(t){var e;const n=this.internal;let r;return t&&(Object.keys(t).forEach(i=>{n.axis.setLabelText(i,t[i])}),n.state.isCanvasMode?(e=n.renderCanvasFrame)==null||e.call(n,void 0,null,!1):n.axis.updateLabels()),["x","y","y2"].forEach(i=>{const o=n.axis.getLabelText(i);o&&(!r&&(r={}),r[i]=o)}),r},min:function(t){const e=this.internal;return Xe(t)||t===!1?jv(e,"min",t):Hv(e,"min")},max:function(t){const e=this.internal;return Xe(t)||t===!1?jv(e,"max",t):Hv(e,"max")},range:function(t){const{axis:e}=this;if(arguments.length){const{min:n,max:r}=t;on(r)&&e.max(r),on(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}}},e2={groups(t){const e=this.internal,{config:n}=e;return Tn(t)||(n.data_groups=t,e.state.dirty.data=!0,e.redraw()),n.data_groups}},n2={x(t){const e=this.internal,{axis:n,data:r}=e,i=n.isCustomX()&&n.isCategorized();return en(t)&&(i?this.categories(t):(e.updateTargetX(r.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),i?this.categories():r.xs},xs(t){const e=this.internal;return Ke(t)&&(e.updateTargetXs(e.data.targets,t),e.state.dirty.data=!0,e.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),e.data.xs}},r2=Object.defineProperty,a2=(t,e,n)=>e in t?r2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ks=(t,e,n)=>a2(t,typeof e!="symbol"?e+"":e,n);class i2{constructor(e){Ks(this,"owner"),Ks(this,"config"),Ks(this,"scale"),Ks(this,"charSize",{});const n=da(),{config:r,params:i}=e;this.owner=e,this.config=r,this.scale=n,(r.noTransition||!i.config.transition_duration)&&(r.withoutTransition=!0),r.range=this.scaleExtent((i.orgXScale||n).range())}getSizeFor1Char(e,n,r=!0){const i={w:5.5,h:11.5};return this.charSize[e]&&r?this.charSize[e]:(!n.empty()&&n.text("0").call(o=>{try{const{width:s,height:l}=ya(o.node(),!0);s&&l&&(i.w=s,i.h=l)}finally{o.text("")}}),this.charSize[e]=i,i)}getTickTransformSetter(e){const{config:n}=this,r=e==="x"?i=>`translate(${i+n.tickOffset},0)`:i=>`translate(0,${i})`;return(i,o)=>{i.attr("transform",s=>{const l=o(s);return Xe(s)?r(l):null})}}scaleExtent(e){const n=e[0],r=e[e.length-1];return n<r?[n,r]:[r,n]}generateTicks(e,n){const{tickStepSize:r}=this.owner.params,[i,o]=e.domain();let s=[];if(n&&r){let l=Math.round(i);for(;l<=o;)s.push(l),l+=r}else if(e.ticks){const{tickArguments:l}=this.config;if(e.type==="log"&&!l){const c=da("_log").domain([i>0?i:1,o]).range(e.range());s=c.ticks();for(let u=o.toFixed().length;s.length>15;u--)s=c.ticks(u);s.splice(0,1,i),s.splice(s.length-1,1,o)}else s=e.ticks(...this.config.tickArguments||[])}return s}copyScale(){const e=this.scale.copy();return e.domain().length||e.domain(this.scale.domain()),e.type=this.scale.type,e}textFormatted(e){const n=this.config.tickFormat,r=/\d+\.\d+0{5,}\d$/.test(e)?+String(e).replace(/0+\d$/,""):e,i=n?n(r):r;return on(i)?i:""}transitionise(e){const{config:n}=this;let r=e;if(n.withoutTransition)r=e.interrupt();else if(n.transition||!this.owner.params.noTransition)try{r=e.transition(n.transition)}catch(i){}return r}}var o2=Object.defineProperty,s2=(t,e,n)=>e in t?o2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,po=(t,e,n)=>s2(t,typeof e!="symbol"?e+"":e,n);function Zs(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function l2(t){const e=Zs(t);return/^sub/.test(t)?`subchart_axis_${e}`:`axis_${e}`}class Yv{constructor(e={}){po(this,"helper"),po(this,"config"),po(this,"params"),po(this,"g"),po(this,"generatedTicks",[]);const n={innerTickSize:Dt,outerTickSize:e.outerTick?Dt:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:xr,tickOffset:0,tickPadding:fn,tickValues:null,transition:null,noTransition:e.noTransition};n.tickLength=Math.max(n.innerTickSize,0)+n.tickPadding,this.config=n,this.params=e,this.helper=new i2(this)}canReuseTickTextOnResize(e){const{config:n,params:r}=this,{config:i,id:o,owner:s}=r,l=/^(x|subX)$/.test(o),c=Zs(o),u=/^sub/.test(o)?i[`subchart_axis_${c}_tick_format`]||i[`axis_${c}_tick_format`]:i[`axis_${c}_tick_format`],f=r.tickMultiline&&r.isCategory&&!e&&!(r.tickWidth>0);return!!(s.state.resizing&&!s.state.flowing&&!ue(i.axis_evalTextSize)&&!u&&!r.tickTitle&&!(l&&i.axis_x_tick_autorotate)&&!f&&n.withoutTransition)}canReuseTickNodesOnResize(e,n,r,i){if(i.tick||!i.text||!this.canReuseTickTextOnResize(r)||e.size()!==n.length)return!1;const o=e.nodes();for(let s=0;s<n.length;s++){const l=o[s].__data__,c=n[s];if(l instanceof Date||c instanceof Date){if(+l!=+c)return!1}else if(l!==c)return!1}return!0}create(e){const n=this,{config:r,helper:i,params:o}=n,{scale:s}=i,{orient:l}=r,c=this.splitTickText.bind(n),u=/^(left|right)$/.test(l),f=/^(top|bottom)$/.test(l),d=i.getTickTransformSetter(f?"x":"y"),h=d===i.axisX?"y":"x",m=/^(top|left)$/.test(l)?-1:1,S=o.tickTextRotate;this.config.range=s.rangeExtent?s.rangeExtent():i.scaleExtent((o.orgXScale||s).range());const{innerTickSize:E,tickLength:C,range:w}=r,N=o.id,z=Zs(N),{isSubAxes:$}=o,G=!$&&z&&/^(x|y|y2)$/.test(z)?o.config[`axis_${z}_tick_text_position`]:{x:0,y:0},V=l2(N),J=o.config[`${V}_show`],Q=$?{tick:!0,text:!0}:{tick:J?o.config[`${V}_tick_show`]:!1,text:J?o.config[`${V}_tick_text_show`]:!1},rt=o.config.axis_evalTextSize;let et;e.each(function(){const st=Ut(this);let ct=this.__chart__||s,dt=i.copyScale();et=st,this.__chart__=dt,r.tickOffset=o.isCategory?(dt(1)-dt(0))/2:0;const q=st.selectAll(".domain").data([0]);if(q.enter().append("path").attr("class","domain").merge(q).attr("d",()=>{const ft=r.outerTickSize*m;return f?`M${w[0]},${ft}V0H${w[1]}V${ft}`:`M${ft},${w[0]}H0V${w[1]}H${ft}`}),Q.tick||Q.text){const ft=r.tickValues||i.generateTicks(dt,u||o.config.axis_rotated);n.generatedTicks=ft;let lt=st.selectAll(".tick");if(n.canReuseTickNodesOnResize(lt,ft,u||o.config.axis_rotated,Q))d(lt,dt);else{lt=lt.data(ft,dt);const Tt=lt.enter().insert("g",".domain").attr("class","tick"),Rt=lt.exit().remove();lt=Tt.merge(lt),Q.tick&&Tt.append("line"),Q.text&&Tt.append("text");const Ct=!Tt.empty()||!Rt.empty(),Kt=Q.text&&!Ct&&n.canReuseTickTextOnResize(u||o.config.axis_rotated);let re={w:0,h:0},Ee=lt.selectAll("text.__bb-empty");if(Q.text&&!Kt){const be=lt.select("text"),Ne=[];Ee=be,ue(rt)&&(re=rt.bind(n.params.owner.api)(be.node(),N),this.classList.contains(Ue.dummy)&&(this.sizeFor1Char=re)),(!re||re.w===0||re.h===0)&&(re=n.helper.getSizeFor1Char(l,be,!!rt));let ye=be.selectAll("tspan").data((De,Zt)=>{let ve;if(o.tickMultiline)ve=c(De,dt,ft,u,re.w);else{const xe=i.textFormatted(De);ve=en(xe)?xe.concat():[xe]}return Ne[Zt]=ve.length,ve.map(xe=>({index:Zt,splitted:xe}))});ye.exit().remove(),ye=ye.enter().append("tspan").merge(ye).text(De=>De.splitted),ye.attr("x",f?0:C*m).attr("dx",(()=>{let De=0;return/(top|bottom)/.test(l)&&S&&(De=8*Math.sin(Math.PI*(S/180))*(l==="top"?-1:1)),De+(G.x||0)})()).attr("dy",(De,Zt)=>{const ve=".71em";let xe=0;return l!=="top"&&(xe=re.h,Zt===0&&(xe=u?-((Ne[De.index]-1)*(re.h/2)-3):G.y===0?ve:0)),le(xe)&&G.y?xe+G.y:xe||ve})}const Ce=lt.select("line");if(Tt.select("line").attr(`${h}2`,E*m),Tt.select("text").attr(h,C*m),n.setTickLineTextPosition(Ce,Ee,re),o.tickTitle){const be=Ee.select("title"),Ne=o.tickTitle;(be.empty()?Ee.append("title"):be).text(ye=>Ne[Number(ye)])}if(dt.bandwidth){const be=dt,Ne=be.bandwidth()/2;ct=ye=>be(ye)+Ne,dt=ct}else ct.bandwidth?ct=dt:d(Rt,dt);lt=o.owner.state.flowing?i.transitionise(lt):o.owner.$T(lt),d(Tt,ct),d(lt.style("opacity",null),dt)}}}),this.g=et}getGeneratedTicks(e){var n;const r=((n=this.generatedTicks)==null?void 0:n.length)-1;let i=this.generatedTicks;if(r>e){const o=Math.round(r/e+.1);i=this.generatedTicks.map((s,l)=>l%o===0?s:null).filter(s=>s!==null).splice(0,e)}return i}getTickXY(){const{config:e}=this,n={x:0,y:0};return this.params.isCategory&&(n.x=e.tickCentered?0:e.tickOffset,n.y=e.tickCentered?e.tickOffset:0),n}getTickSize(e){const{scale:n}=this.helper,{config:r}=this,{innerTickSize:i,range:o}=r,s=n(e)+(r.tickCentered?0:r.tickOffset);return o[0]<s&&s<o[1]?i:0}setTickLineTextPosition(e,n,r){const i=this.getTickXY(),{innerTickSize:o,orient:s,tickLength:l,tickOffset:c}=this.config,u=this.params.id,f=this.params.tickTextRotate,d=6,h=r.h/2-d,m=z=>{const $=["start","end"];return s==="top"&&$.reverse(),z?$[z>0?0:1]:"middle"},S=z=>z?`rotate(${z})`:null,E=z=>{const $=z/(s==="bottom"?15:23);return z?11.5-2.5*$*(z>0?1:-1):l},{config:{axis_rotated:C,axis_x_tick_text_inner:w}}=this.params.owner,N=this.params.config[`axis_${Zs(u)}_tick_inner`];switch(s){case"bottom":e.attr("x1",i.x).attr("x2",i.x).attr("y2",z=>this.getTickSize.bind(this)(z)*(N?-1:1)),n.attr("x",0).attr("y",E(f)).style("text-anchor",(z,$,{length:G})=>!C&&$===0&&(w===!0||w.first)?"start":!C&&$===G-1&&(w===!0||w.last)?"end":m(f)).attr("transform",S(f));break;case"top":e.attr("x2",0).attr("y2",N?o:-o),n.attr("x",0).attr("y",-(E(f)+h+d)).style("text-anchor",m(f)).attr("transform",S(f));break;case"left":e.attr("x2",N?o:-o).attr("y1",i.y).attr("y2",i.y),n.attr("x",-l).attr("y",c+(C?h/4:h)).style("text-anchor","end");break;case"right":e.attr("x2",N?-o:o).attr("y2",0),n.attr("x",l).attr("y",h).style("text-anchor","start")}}splitTickText(e,n,r,i,o){const{params:s}=this,l=this.helper.textFormatted(e),c=Ye(l)&&l.indexOf(`
|
|
64
59
|
`)>-1?l.split(`
|
|
65
|
-
`):[];if(c.length)return c;if(nn(l))return l;let u=s.tickWidth;(!u||u<=0)&&(u=i?95:s.isCategory?(s.isInverted?n(r[0])-n(r[1]):n(r[1])-n(r[0]))-12:110);function f(d,h){let m,A,I;for(let C=1;C<h.length;C++)if(h.charAt(C)===" "&&(A=C),m=h.substr(0,C+1),I=o*m.length,u<I)return f(d.concat(h.substr(0,A||C)),h.slice(A?A+1:C));return d.concat(h)}return f(c,String(l))}scale(e){return arguments.length?(this.helper.scale=e,this):this.helper.scale}orient(e){return arguments.length?(this.config.orient=e in{top:1,right:1,bottom:1,left:1}?String(e):"bottom",this):this.config.orient}tickFormat(e){const{config:n}=this;return arguments.length?(n.tickFormat=e,this):n.tickFormat}tickCentered(e){const{config:n}=this;return arguments.length?(n.tickCentered=e,this):n.tickCentered}tickOffset(){return this.config.tickOffset}tickInterval(e){var n,r,i;const{outerTickSize:o,tickOffset:s,tickValues:l}=this.config;let c;if(this.params.isCategory){const u=(n=this.params.owner.scale.zoom)!=null?n:this.helper.scale;c=s*2||Math.abs(u(1)-u(0))}else{const u=(r=this.params.owner.scale.zoom)!=null?r:this.helper.scale;if(c=(this.g?this.g.select("path.domain").node().getTotalLength()-o*2:Math.abs(u.range()[1]-u.range()[0]))/(e||((i=this.g)==null?void 0:i.selectAll("line").size())||1),l)for(let d=0;d<l.length-1;d++){const h=u(l[d+1])-u(l[d]);h&&h<c&&(c=h)}}return c===1/0?0:c}ticks(...e){const{config:n}=this;return e.length?(n.tickArguments=Ia(e),this):n.tickArguments}tickCulling(e){const{config:n}=this;return arguments.length?(n.tickCulling=e,this):n.tickCulling}tickValues(e){const{config:n}=this;if(le(e))n.tickValues=()=>e(this.helper.scale.domain());else{if(!arguments.length)return n.tickValues;n.tickValues=e}return this}setTransition(e){return this.config.transition=e,this}}var PC=Object.defineProperty,MC=Object.defineProperties,LC=Object.getOwnPropertyDescriptors,Tv=Object.getOwnPropertySymbols,DC=Object.prototype.hasOwnProperty,FC=Object.prototype.propertyIsEnumerable,ru=(t,e,n)=>e in t?PC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,NC=(t,e)=>{for(var n in e||(e={}))DC.call(e,n)&&ru(t,n,e[n]);if(Tv)for(var n of Tv(e))FC.call(e,n)&&ru(t,n,e[n]);return t},$C=(t,e)=>MC(t,LC(e)),ta=(t,e,n)=>ru(t,typeof e!="symbol"?e+"":e,n);function BC(t){var e,n;const r=[t[0],t[t.length-1]];let i=0,o=null;for(const l of t){const c=(n=(e=l.textContent)==null?void 0:e.length)!=null?n:0;c>i&&(i=c,o=l)}o&&!r.includes(o)&&r.push(o);const s=t[Math.floor(t.length/2)];return r.includes(s)||r.push(s),r}const Gs=50,au=Symbol("tickWidthFallback");function zC(t){var e,n,r;const i=t.select("line").node(),o=(n=(e=i==null?void 0:i.ownerDocument)==null?void 0:e.defaultView)!=null&&n.getComputedStyle?parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).strokeWidth):parseFloat((r=i==null?void 0:i.getAttribute)==null?void 0:r.call(i,"stroke-width"));return Number.isFinite(o)&&o>0?o:1}function UC(t,e,n){var r;const i=(r=t==null?void 0:t.scale)==null?void 0:r.call(t);if(!i||e.length<2)return!1;const o=Math.max(1,n)/2,s=e.map(c=>+i(c)).filter(Number.isFinite).sort((c,u)=>c-u);if(s.length<2)return!1;let l=s[0]+o;for(let c=1;c<s.length;c++){const u=s[c]-o,f=s[c]+o;if(u<=l+Ua)return!0;l=Math.max(l,f)}return!1}function kC(t,e){if(t.length<=Gs)return t;const n=new Map,r=l=>{l>=0&&l<t.length&&n.set(l,t[l])};r(0),r(t.length-1),r(Math.floor(t.length/2));const i=Math.max(1,Math.floor(t.length/(Gs-3)));let o=-1,s=0;for(let l=0;l<t.length;l+=i){r(l);const c=t[l],u=e?e(c):c,f=Array.isArray(u)?u.join("").length:String(u!=null?u:"").length;f>o&&(o=f,s=l)}return r(s),Array.from(n.keys()).sort((l,c)=>l-c).map(l=>n.get(l))}function XC(t){return le(t)?Sv(t):!Array.isArray(t)||t.length<=Gs?t:{length:t.length,first:t[0],middle:t[Math.floor(t.length/2)],last:t[t.length-1]}}function iu(t){return t[au]}function Ws(t,e){ge(e)?Object.defineProperty(t,au,{configurable:!0,value:e,writable:!0}):delete t[au]}function ou(t){t.length=0,Ws(t)}function GC(t,e,n){ou(t),t.length=e,Ws(t,n)}function WC(t){const e=[];return e.length=t.length,Object.keys(t).forEach(n=>{const r=+n;e[r]=t[r]}),Ws(e,iu(t)),e}function VC(t,e){ou(t),t.length=e.length,Object.keys(e).forEach(n=>{const r=+n;t[r]=e[r]}),Ws(t,iu(e))}function jC(t,e,n){const r=t[e];if(ge(r))return r;const i=Number(r);return Number.isFinite(i)?i:n}const bv=new WeakMap;let HC=0;function Sv(t){if(!t||!/^(function|object)$/.test(typeof t))return`${typeof t}:${String(t)}`;let e=bv.get(t);return e||(e=++HC,bv.set(t,e)),`${typeof t}:${e}`}function su(t){return t instanceof Date?`date:${+t}`:Array.isArray(t)?`[${t.map(e=>su(e)).join(",")}]`:t&&typeof t=="object"?`{${Object.keys(t).sort().map(e=>`${e}:${su(t[e])}`).join(",")}}`:typeof t=="function"?Sv(t):`${typeof t}:${String(t)}`}function lu(t){return t instanceof Date?new Date(+t):Array.isArray(t)?t.map(e=>lu(e)):t}function YC(t){return{width:t.width,height:t.height,ticks:t.ticks&&WC(t.ticks),clipPath:t.clipPath,domain:lu(t.domain)}}function KC(t,e){return t.width=e.width,t.height=e.height,t.clipPath=e.clipPath,t.domain=lu(e.domain),t.ticks&&e.ticks&&VC(t.ticks,e.ticks),t}var ZC={getAxisInstance:function(){return this.axis||new JC(this)}};class JC{constructor(e){ta(this,"owner"),ta(this,"x"),ta(this,"subX"),ta(this,"y"),ta(this,"y2"),ta(this,"axesList",{}),ta(this,"tick",{x:null,y:null,y2:null}),ta(this,"xs",[]),ta(this,"orient",{x:"bottom",y:"left",y2:"right",subX:"bottom"}),this.owner=e,this.setOrient()}getAxisClassName(e){return`${Rn.axis} ${Rn[`axis${$n(e)}`]}`}isHorizontal(e,n){const r=e.config.axis_rotated;return n?r:!r}isCategorized(){const{config:e,state:n}=this.owner;return e.axis_x_type.indexOf("category")>=0||n.hasRadar}isCustomX(){const{config:e}=this.owner;return!this.isTimeSeries()&&(e.data_x||vn(e.data_xs))}isTimeSeries(e="x"){return this.owner.config[`axis_${e}_type`]==="timeseries"}isLog(e="x"){return this.owner.config[`axis_${e}_type`]==="log"}isTimeSeriesY(){return this.isTimeSeries("y")}getAxisType(e="x"){let n="linear";return this.isTimeSeries(e)?n=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(e)&&(n="log"),n}getExtent(){const e=this.owner,{config:n,scale:r}=e;let i=n.axis_x_extent;if(i){if(le(i))i=i.bind(e.api)(e.getXDomain(e.data.targets),r.subX);else if(this.isTimeSeries()&&i.every(isNaN)){const o=Hn.bind(e);i=i.map(s=>r.subX(o(s)))}}return i}init(){const e=this.owner,{config:n,$el:{main:r,axis:i},state:{clip:o}}=e,s=["x","y"];n.axis_y2_show&&s.push("y2"),s.forEach(l=>{const c=this.getAxisClassName(l);i[l]=r.append("g").attr("class",c).attr("clip-path",()=>{let u=null;return l==="x"?u=o.pathXAxis:l==="y"&&(u=o.pathYAxis),u}).attr("transform",e.getTranslate(l)).style("visibility",n[`axis_${l}_show`]?null:"hidden"),this.generateAxes(l)})}setOrient(){const e=this.owner,{axis_rotated:n,axis_y_inner:r,axis_y2_inner:i}=e.config;this.orient={x:n?"left":"bottom",y:n?r?"top":"bottom":r?"right":"left",y2:n?i?"bottom":"top":i?"left":"right",subX:n?"left":"bottom"}}generateAxes(e){const n=this.owner,{config:r}=n,i=[],o=r[`axis_${e}_axes`],s=r.axis_rotated;let l;e==="x"?l=s?yv:xv:e==="y"?l=s?xv:yv:e==="y2"&&(l=s?SC:AC),o.length&&o.forEach(c=>{const u=c.tick||{},f=n.scale[e].copy();c.domain&&f.domain(c.domain),i.push(l(f).ticks(u.count).tickFormat(le(u.format)?u.format.bind(n.api):(d=>d)).tickValues(u.values).tickSizeOuter(u.outer===!1?0:Dt))}),this.axesList[e]=i}updateAxes(){const e=this.owner,{config:n,$el:{main:r},$T:i}=e;Object.keys(this.axesList).forEach(o=>{const s=n[`axis_${o}_axes`],l=e.scale[o].copy(),c=l.range();this.axesList[o].forEach((u,f)=>{const d=u.scale().range();c.every((A,I)=>A===d[I])||u.scale().range(c);const h=`${this.getAxisClassName(o)}-${f+1}`;let m=r.select(`.${h.replace(/\s/,".")}`);m.empty()?m=r.append("g").attr("class",h).style("visibility",n[`axis_${o}_show`]?null:"hidden").call(u):(s[f].domain&&l.domain(s[f].domain),i(m).call(u.scale(l))),m.attr("transform",e.getTranslate(o,f+1))})})}setAxis(e,n,r,i){const o=this.owner;e!=="subX"&&(this.tick[e]=this.getTickValues(e)),this[e]=this.getAxis(e,n,r,e==="x"&&(o.scale.zoom||o.config.subchart_show||o.state.resizing)?!0:i)}getAxis(e,n,r,i,o){const s=this.owner,{config:l}=s,c=/^(x|subX)$/.test(e),u=c?"x":e,f=c&&this.isCategorized(),d=this.orient[e],h=o?0:s.getAxisTickRotate(u);let m;if(c)m=e==="subX"?s.format.subXAxisTick:s.format.xAxisTick;else{const z=l[`axis_${e}_tick_format`];le(z)&&(m=z.bind(s.api))}let A=this.tick[u];const I=Gr({outerTick:r,noTransition:i,config:l,id:e,tickTextRotate:h,owner:s},c&&{isCategory:f,isInverted:l.axis_x_inverted,tickMultiline:l.axis_x_tick_multiline,tickWidth:l.axis_x_tick_width,tickTitle:f&&l.axis_x_tick_tooltip&&s.api.categories(),orgXScale:s.scale.x});c||(I.tickStepSize=l[`axis_${u}_tick_stepSize`]);const C=new wC(I).scale(c&&s.scale.zoom||n).orient(d);if(c&&this.isTimeSeries()&&A&&!le(A)){const z=Hn.bind(s);A=A.map(N=>z(N))}else!c&&this.isTimeSeriesY()&&(C.ticks(l.axis_y_tick_time_value),A=null);A&&C.tickValues(A),C.tickFormat(m||!c&&s.isStackNormalized()&&s.hasAxisGroupedData(e)&&(z=>`${z}%`)),f&&(C.tickCentered(l.axis_x_tick_centered),lr(l.axis_x_tick_culling)&&(l.axis_x_tick_culling=!1));const P=l[`axis_${u}_tick_count`];return P&&C.ticks(P),C}updateXAxisTickValues(e,n){var r;const i=this.owner,{config:o}=i,s=o.axis_x_tick_fit;let l=o.axis_x_tick_count,c;return s&&(c=i.mapTargetsToUniqueXs(e),this.isCategorized()&&l>c.length&&(l=c.length),c=this.generateTickValues(c,l,this.isTimeSeries())),n?n.tickValues(c):this.x&&(this.x.tickValues(c),(r=this.subX)==null||r.tickValues(c)),c}getId(e){const{config:n,scale:r}=this.owner;let i=n.data_axes[e];return(!i||!r[i])&&(i="y"),i}getXAxisTickFormat(e){const n=this.owner,{config:r,format:i}=n,o=e&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,s=this.isTimeSeries(),l=this.isCategorized();let c;return o?le(o)?c=o.bind(n.api):s&&(c=u=>u?i.axisTime(o)(u):""):c=s?i.defaultAxisTime:l?n.categoryName:u=>u<0?u.toFixed(0):u,le(c)?u=>c.apply(n,l?[u,n.categoryName(u)]:[u]):c}getTickValues(e){const n=this.owner,r=n.config[`axis_${e}_tick_values`],i=n[`${e}Axis`];return(le(r)?r.call(n.api):r)||(i?i.tickValues():void 0)}getLabelOptionByAxisId(e){return this.owner.config[`axis_${e}_label`]}getLabelText(e){const n=this.getLabelOptionByAxisId(e);return Ke(n)?n:n?n.text:null}setLabelText(e,n){const r=this.owner,{config:i}=r,o=this.getLabelOptionByAxisId(e);Ke(o)?i[`axis_${e}_label`]=n:o&&(o.text=n)}getLabelPosition(e,n){const r=this.owner.config.axis_rotated,i=this.getLabelOptionByAxisId(e),o=Qn(i)&&i.position?i.position:n[+!r],s=l=>!!~o.indexOf(l);return{isInner:s("inner"),isOuter:s("outer"),isLeft:s("left"),isCenter:s("center"),isRight:s("right"),isTop:s("top"),isMiddle:s("middle"),isBottom:s("bottom")}}getAxisLabelPosition(e){return this.getLabelPosition(e,e==="x"?["inner-top","inner-right"]:["inner-right","inner-top"])}xForAxisLabel(e){const n=this.owner,{state:{width:r,height:i}}=n,o=this.getAxisLabelPosition(e);let s=o.isMiddle?-i/2:0;return this.isHorizontal(n,e!=="x")?s=o.isLeft?0:o.isCenter?r/2:r:o.isBottom&&(s=-i),s}textAnchorForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isMiddle?"middle":"end";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"start":r.isCenter?"middle":"end":r.isBottom&&(i="start"),i}dxForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isBottom?"0.5em":"0";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"0.5em":r.isRight?"-0.5em":"0":r.isTop&&(i="-0.5em"),i}dyForAxisLabel(e){const n=this.owner,{config:r}=n,i=r.axis_rotated,o=this.getAxisLabelPosition(e).isInner,s=r[`axis_${e}_tick_rotate`]?n.getHorizontalAxisHeight(e):0,{width:l}=this.getMaxTickSize(e);let c;if(e==="x"){const u=r.axis_x_height;i?c=o?"1.2em":-25-l:o?c="-0.5em":u?c=u-10:s?c=s-10:c="3em"}else c={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[e],i?o?c=c[0]:s?c=s*(e==="y2"?-1:1)-c[1]:c=c[2]:c=o?c[3]:(c[4]+(r[`axis_${e}_inner`]?0:l+c[4]))*(e==="y"?-1:1);return c}getTickFormatCacheValue(e){const n=this.owner,{config:r}=n;return e==="x"?{format:r.axis_x_tick_format,type:r.axis_x_type,localtime:r.axis_x_localtime,categories:r.axis_x_categories}:{format:r[`axis_${e}_tick_format`],normalized:n.isStackNormalized(),grouped:n.hasAxisGroupedData(e),type:r[`axis_${e}_type`]}}getMaxTickSizeFingerprint(e,n,r,i,o,s){var l;const c=this.owner,{config:u,state:f}=c,d=e==="x",h=d?"axis_x":`axis_${e}`,m=i.tickValues();return su({id:e,withoutRecompute:!!s,dataGeneration:f.dataGeneration,size:[f.current.width,f.current.height],range:(l=n.range)==null?void 0:l.call(n),domain:r,type:n.type,orient:this.orient[e],axisRotated:u.axis_rotated,evalTextSize:u.axis_evalTextSize,format:this.getTickFormatCacheValue(e),ticks:{values:XC(m),rawValues:u[`${h}_tick_values`],arguments:i.ticks(),count:u[`${h}_tick_count`],rotate:o,show:u[`${h}_tick_show`],textShow:u[`${h}_tick_text_show`],textPosition:u[`${h}_tick_text_position`],inner:u[`${h}_tick_inner`],culling:u[`${h}_tick_culling`],cullingMax:u[`${h}_tick_culling_max`],cullingLines:u[`${h}_tick_culling_lines`],cullingReverse:u[`${h}_tick_culling_reverse`],stepSize:!d&&u[`${h}_tick_stepSize`],timeValue:!d&&u[`${h}_tick_time_value`],fit:d&&u.axis_x_tick_fit,autorotate:d&&u.axis_x_tick_autorotate,centered:d&&u.axis_x_tick_centered,inverted:d&&u.axis_x_inverted,multiline:d&&u.axis_x_tick_multiline,width:d&&u.axis_x_tick_width}})}getMaxTickSize(e,n){var r;const i=this.owner,{config:o,state:s,$el:{svg:l,chart:c}}=i,{current:u,resizing:f}=s,d=u.maxTickSize[e],h=`${Ue.maxTickSize}_${e}_${!!n}`,m=i.cache.get(h);if(m&&m.generation===s.redrawGeneration)return d;const A=`axis_${e}`,I={width:0,height:0};let C;if(f||n||!o[`${A}_show`]||d.width>0&&i.filterTargetsToShow().length===0)return d;if((l||o.render_mode==="canvas")&&((r=i.scale[e])!=null&&r.copy)){const P=/^y2?$/.test(e),z=i.getTargetsToShow(),N=i.scale[e].copy().domain(i[`get${P?"Y":"X"}Domain`](z,e)),B=N.domain(),W=B[0]===B[1]&&B.every(bt=>bt>0),V=nn(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(bt=>bt>0);if(W||V)return d;d.domain=B,P||ou(d.ticks);const J=this.getAxis(e,N,!1,!1,!0),q=o[`${A}_tick_rotate`],at=o[`${A}_tick_count`];if(!o[`${A}_tick_values`]&&at&&J.tickValues(this.generateTickValues(B,at,P?this.isTimeSeriesY():this.isTimeSeries())),!P&&this.updateXAxisTickValues(z,J),C=this.getMaxTickSizeFingerprint(e,N,B,J,q,n),(m==null?void 0:m.fingerprint)===C)return i.cache.add(h,$C(NC({},m),{generation:s.redrawGeneration})),KC(d,m.value);const ot=J.tickValues(),lt=!P&&Array.isArray(ot)&&ot.length>Gs;lt&&J.tickValues(kC(ot,J.tickFormat()));const ft=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0"),_=ft.append("g").attr("class",`${Rn[`axis${$n(e)}`]} ${ze.dummy}`);J.create(_);const{sizeFor1Char:dt}=_.node(),ut=ft.selectAll("text").attr("transform",ge(q)?`rotate(${q})`:null),xt=lt?ot.length:ut.size();if(dt)ut.each(function(bt,Rt){const Et=this.textContent.length*dt.w,Zt=dt.h;I.width=Math.max(I.width,Et),I.height=Math.max(I.height,Zt),P||(d.ticks[Rt]=Et)});else{const bt=[];if(ut.each(function(){bt.push(this)}),(bt.length<=5?bt:BC(bt)).map(Et=>un(Et,!0)).forEach(Et=>{I.width=Math.max(I.width,Et.width),I.height=Math.max(I.height,Et.height)}),!P)for(let Et=0;Et<bt.length;Et++)d.ticks[Et]=I.width}!P&<&&GC(d.ticks,xt,I.width),ft.remove()}return Object.keys(I).forEach(P=>{I[P]>0&&(d[P]=I[P])}),i.cache.add(h,{fingerprint:C,generation:s.redrawGeneration,value:YC(d)}),d}getXAxisTickTextY2Overflow(e){const n=this.owner,{axis:r,config:i,state:{current:o,isLegendRight:s,legendItemWidth:l}}=n,c=n.getAxisTickRotate("x"),u=c>0&&c<90;if((r.isCategorized()||r.isTimeSeries())&&i.axis_x_tick_fit&&(!i.axis_x_tick_culling||lr(i.axis_x_tick_culling))&&!i.axis_x_tick_multiline&&u){const f=i.axis_y2_show&&o.maxTickSize.y2.width||0,d=s&&l||0,h=o.width-n.getCurrentPaddingByDirection("left"),m=this.getXAxisTickMaxOverflow(c,h-e)-f-d,A=Math.max(0,m)+e;return Math.min(A,h/2)}return 0}getXAxisTickMaxOverflow(e,n){var r;const i=this.owner,{axis:o,config:s,state:l}=i,c=o.isTimeSeries(),u=l.current.maxTickSize.x.ticks,f=u.length,d=(r=iu(u))!=null?r:l.current.maxTickSize.x.width,{left:h,right:m}=l.axis.x.padding;let A=0;const I=f-(c&&s.axis_x_tick_fit?.5:0);for(let z=0;z<f;z++){const N=z+1,B=Math.cos(Math.PI*e/180)*jC(u,z,d),W=N-(c?1:.5)+h;if(W<=0)continue;const J=(n-B)/W,q=I-N,at=m*J,et=q*J+at,ot=B-J/2-et;A=Math.max(A,ot)}const C=i.getTargetsToShow();let P=0;if(!c&&s.axis_x_tick_count<=C.length&&C[0].values.length){const z=oa(i.axis.getAxisType("x"),0,n-A).domain([h*-1,i.getXDomainMax(i.data.targets)+1+m]);P=(z(1)-z(0))/2}return A+P}updateLabels(e){const n=this.owner,{config:r,$el:{main:i},$T:o}=n,s=r.axis_rotated;["x","y","y2"].forEach(l=>{const c=this.getLabelText(l),u=`axis${$n(l)}`,f=Rn[`${u}Label`];if(c){let d=i.select(`text.${f}`);d.empty()&&(d=i.select(`g.${Rn[u]}`).insert("text",":first-child").attr("class",f).attr("transform",["rotate(-90)",null][l==="x"?+!s:+s]).style("text-anchor",()=>this.textAnchorForAxisLabel(l))),o(d,e).attr("x",()=>this.xForAxisLabel(l)).attr("dx",()=>this.dxForAxisLabel(l)).attr("dy",()=>this.dyForAxisLabel(l)).text(c)}})}getPadding(e,n,r,i){const o=ge(e)?e:e[n];return We(o)?this.owner.convertPixelToScale(/(bottom|top)/.test(n)?"y":"x",o,i):r}generateTickValues(e,n,r){let i=e;if(n){const o=le(n)?n():n;if(o===1)i=[e[0]];else if(o===2)i=[e[0],e[e.length-1]];else if(o>2){const s=this.isCategorized(),l=o-2,c=e[0],u=e[e.length-1],f=(u-c)/(l+1);let d;i=[c];for(let h=0;h<l;h++)d=+c+f*(h+1),i.push(r?new Date(d):s?Math.round(d):d);i.push(u)}}return r||(i=i.sort((o,s)=>o-s)),i}generateTransitions(e){const n=this.owner,{$el:{axis:r},$T:i}=n,[o,s,l,c]=["x","y","y2","subX"].map(u=>i(r[u],e));return{axisX:o,axisY:s,axisY2:l,axisSubX:c}}redraw(e,n,r){const i=this.owner,{config:o,state:s,$el:l}=i,c=n?"0":null;["x","y","y2","subX"].forEach(u=>{const f=this[u],d=l.axis[u];f&&d&&(!r&&!o.transition_duration&&(f.config.withoutTransition=!0),d.style("opacity",c),f.create(e[`axis${$n(u)}`]))}),this.updateAxes(),!s.rendered&&o.axis_tooltip&&this.setAxisTooltip()}syncAxisDomains(e,n,r){var i,o,s;const l=this.owner,{config:c,scale:u,$el:f}=l,d=!!u.zoom;let h;!d&&this.isCategorized()&&e.length===0&&f.axis.x&&u.x.domain([0,f.axis.x.selectAll(".tick").size()]),u.x&&e.length?(!d&&l.updateXDomain(e,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),c.axis_x_tick_values||this.updateXAxisTickValues(e)):this.x&&(this.x.tickValues([]),(i=this.subX)==null||i.tickValues([])),c.zoom_rescale&&!r&&(h=u.x.orgDomain()),["y","y2"].forEach(m=>{const A=`axis_${m}_`,I=u[m];if(I){const C=c[`${A}tick_values`],P=c[`${A}tick_count`];if(I.domain(l.getYDomain(e,m,h)),!C&&P){const z=l.axis[m],N=I.domain();z.tickValues(this.generateTickValues(N,N.every(B=>B===0)?1:P,this.isTimeSeriesY()))}}}),n.Y&&((o=u.subY)==null||o.domain(l.getYDomain(e,"y")),(s=u.subY2)==null||s.domain(l.getYDomain(e,"y2")))}redrawAxis(e,n,r,i,o){const s=this.owner;this.syncAxisDomains(e,n,i),this.redraw(r,s.hasArcType(),o),this.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis||n.Y)&&e.length&&this.setCulling()}setCulling(){const e=this.owner,{config:n,state:{clip:r,current:i},$el:o}=e;["subX","x","y","y2"].forEach(s=>{const l=o.axis[s],u=`axis_${s==="subX"?"x":s}_tick_culling`,f=n[u];if(l&&f){const d=l.selectAll(".tick"),h=Ja(d.data(),!n[`${u}_reverse`]),m=h.length,A=n[`${u}_max`],C=!n[`${u}_lines`]||UC(this[s],h,zC(d));let P;if(m){for(let N=1;N<m;N++)if(m/N<A){P=N;break}P=P!=null?P:m;const z=new Map;for(let N=0;N<h.length;N++)z.set(h[N],N);d.each(function(N){var B;const W=C?this:this.querySelector("text");W&&(W.style.display=((B=z.get(N))!=null?B:0)%P?"none":null)})}else d.style("display",null);if(s==="x"){const z=i.maxTickSize.x.clipPath?r.pathXAxisTickTexts:null;o.svg.selectAll(`.${Rn.axisX} .tick text`).attr("clip-path",z)}}})}setAxisTooltip(){var e;const n=this.owner,{config:{axis_rotated:r,axis_tooltip:i},$el:{axis:o,axisTooltip:s}}=n,l=(e=i.backgroundColor)!=null?e:"black";n.generateTextBGColorFilter(l,{x:-.15,y:-.2,width:1.3,height:1.3}),["x","y","y2"].forEach(c=>{var u,f,d;if(Ke(l)||l[c])if(s[c]=(u=o[c])==null?void 0:u.append("text").classed(Rn[`axis${c.toUpperCase()}Tooltip`],!0).attr("filter",n.updateTextBGColor({id:c},l)),r){const h=c==="x"?"x":"y",m=c==="y"?"1.15em":c==="x"?"-0.3em":"-0.4em";(f=s[c])==null||f.attr(h,m).attr(`d${c==="x"?"y":"x"}`,c==="x"?"0.4em":"-1.3em").style("text-anchor",c==="x"?"end":null)}else{const h=c==="x"?"y":"x",m=c==="x"?"1.15em":`${c==="y"?"-":""}0.4em`;(d=s[c])==null||d.attr(h,m).attr(`d${c==="x"?"x":"y"}`,c==="x"?"-1em":"0.3em").style("text-anchor",c==="y"?"end":null)}})}}var Av=Math.pow,QC={initEventRect(){this.$el.main.select(`.${ze.chart}`).append("g").attr("class",Kr.eventRects).style("fill-opacity","0")},redrawEventRect(){var t;const e=this,{config:n,state:r,$el:i}=e,o=e.isMultipleX(),s=n.axis_x_inverted;if(i.eventRect)e.updateEventRect(i.eventRect,!0);else if(e.data.targets.length){const c=e.$el.main.select(`.${Kr.eventRects}`).style("cursor",n.zoom_enabled&&n.zoom_type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(Kr.eventRectsMultiple,o).classed(Kr.eventRectsSingle,!o).selectAll(`.${Kr.eventRect}`).data([0]).enter().append("rect");e.updateEventRect(c),e.updateEventType(c),c.call(e.getDraggableSelection()),i.eventRect=c,e.state.inputType==="touch"&&!i.svg.on("touchstart.eventRect")&&!e.hasArcType()&&e.bindTouchOnEventRect(),r.rendered&&e.updateEventRect(i.eventRect,!0)}if(!o){const l=e.getMaxDataCountTarget();(!n.data_xSort||s)&&l.sort((c,u)=>s?u.x-c.x:c.x-u.x),e.updateDataIndexByX(l),e.updateXs(l),(t=e.updatePointClass)==null||t.call(e,!0),r.eventReceiver.data=l}e.updateEventRectData()},bindTouchOnEventRect(){const t=this,{config:e,state:n,$el:{eventRect:r,svg:i}}=t,o=m=>{if(t.isMultipleX())t.selectRectForMultipleXs(m);else{const A=t.getDataIndexFromEvent(n.event);t.callOverOutForTouch(A),A===-1?t.unselectRect():t.selectRectForSingle(m,A)}},s=()=>{t.unselectRect(),t.callOverOutForTouch()},l=e.interaction_inputType_touch.preventDefault,c=Ea(l)&&l||!1,u=!isNaN(l)&&l||null;let f;const d=!c&&u===null,h=m=>{const A=m.type,C=m.changedTouches[0][`client${e.axis_rotated?"Y":"X"}`];A==="touchstart"?c?m.preventDefault():u!==null&&(f=C):A==="touchmove"&&(c||f===!0||u!==null&&Math.abs(f-C)>=u)&&(f=!0,m.preventDefault())};r.on("touchstart",m=>{n.event=m,t.updateEventRect()},{passive:d}).on("touchstart.eventRect touchmove.eventRect",m=>{if(n.event=m,!r.empty()&&r.classed(Kr.eventRect)){if(n.dragging||n.flowing||t.hasArcType()||m.touches.length>1)return;h(m),o(r.node())}else s()},{passive:d}).on("touchend.eventRect",m=>{n.event=m,!r.empty()&&r.classed(Kr.eventRect)&&(t.hasArcType()||!t.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)},{passive:d}),i.on("touchstart",m=>{n.event=m;const{target:A}=m;A&&A!==r.node()&&s()},{passive:d})},updateEventRect(t,e=!1){const n=this,{state:r,$el:i}=n,{eventReceiver:o,width:s,height:l,rendered:c,resizing:u}=r,f=t||i.eventRect,d=()=>{if(o){const h=_d(i.chart.node());o.rect=un(f.node(),!0).toJSON(),o.rect.top+=h.y,o.rect.left+=h.x}};(!c||u||e)&&(f.attr("x",0).attr("y",0).attr("width",s).attr("height",l),(!c||e)&&f.classed(Kr.eventRect,!0)),d()},updateEventType(t){const e=this,n=Ea(t),r=n?e.$el.eventRect:t,i=n?t!==(r==null?void 0:r.datum().multipleX):!1;r&&(i&&(r==null||r.on("mouseover mousemove mouseout click",null)),e.isMultipleX()?e.generateEventRectsForMultipleXs(r):e.generateEventRectsForSingleX(r))},updateEventRectData(){const t=this,{config:e,scale:n,state:r}=t,i=n.zoom||n.x,o=e.axis_rotated,s=t.isMultipleX(),l=i==null?void 0:i.domain(),c=l?`${l[0]}_${l[1]}_${r.width}_${r.height}_${t.data.targets.length}_${r.dataGeneration}_${[...r.hiddenTargetIds].join(",")}`:null;if(c&&c===r._eventRectFingerprint)return;r._eventRectFingerprint=c;let u,f,d,h;if(t.updateEventType(s),s)u=0,f=0,d=r.width,h=r.height;else{let I,C;if(t.axis.isCategorized())I=t.getEventRectWidth(),C=P=>i(P.x)-I/2;else{const P=({index:z})=>({prev:t.getPrevX(z),next:t.getNextX(z)});I=z=>{const N=P(z),B=i.domain();let W;return N.prev===null&&N.next===null?W=o?r.height:r.width:N.prev===null?W=(i(N.next)+i(z.x))/2:N.next===null?W=i(B[1])-(i(N.prev)+i(z.x))/2:W=Math.max(0,(i(N.next)-i(N.prev))/2),W},C=z=>{const N=P(z);let B;return N.prev===null&&N.next===null?B=0:N.prev===null?B=i(i.domain()[0]):B=(i(z.x)+i(N.prev))/2,B}}u=o?0:C,f=o?C:0,d=o?r.width:I,h=o?I:r.height}const{eventReceiver:m}=r,A=(I,C)=>le(I)?I(C):I;m.coords.splice(m.data.length),m.data.forEach((I,C)=>{m.coords[C]={x:A(u,I),y:A(f,I),w:A(d,I),h:A(h,I)}})},selectRectForSingle(t,e){var n,r,i,o;const s=this,{config:l,state:c,$el:{main:u,circle:f}}=s,d=l.data_selection_enabled,h=l.data_selection_grouped,m=l.data_selection_isselectable,A=l.tooltip_grouped,I=s.getAllValuesOnIndex(e);if(A&&(s.showTooltip(I,t),(n=s.showGridFocus)==null||n.call(s,I),!d||h))return;!f&&u.selectAll(`.${ze.EXPANDED}:not(.${bn.shape}-${e})`).classed(ze.EXPANDED,!1);const C=u.selectAll(`.${bn.shape}-${e}`).classed(ze.EXPANDED,!0).style("cursor",m?"pointer":null).filter(function(P){return s.isWithinShape(this,P)});if(C.call(P=>{var z,N;const B=P.data();d&&(h||m!=null&&m.bind(s.api)(B))&&(t.style.cursor="pointer"),A||(s.showTooltip(B,t),(z=s.showGridFocus)==null||z.call(s,B),(N=s.unexpandCircles)==null||N.call(s),P.each(W=>s.setExpand(e,W.id)))}),!A&&C.empty()){const P=ir(c.event,t),z=I.filter(N=>s.isTargetToShow(N.id)?s.dist(N,P)<s.getPointSensitivity(N):!1);if(z.length>0){let N=z[0],B=s.dist(N,P);for(let W=1;W<z.length;W++){const V=z[W],J=s.dist(V,P);J<B&&(B=J,N=V)}s.showTooltip([N],t),(r=s.showGridFocus)==null||r.call(s,[N]),(i=s.unexpandCircles)==null||i.call(s),s.setExpand(e,N.id,!0),d&&(h||m!=null&&m.bind(s.api)(N))&&(t.style.cursor="pointer")}else l.interaction_onout&&((o=s.hideGridFocus)==null||o.call(s),s.hideTooltip(),!h&&s.setExpand(e))}},selectRectForMultipleXs(t,e=!0){var n;const r=this,{config:i,state:o}=r,s=r.getTargetsToShow();if(o.dragging||r.hasArcType(s))return;const l=ir(o.event,t),c=r.findClosestFromTargets(s,l);if(e&&o.mouseover&&(!c||c.id!==o.mouseover.id)&&(i.data_onout.call(r.api,o.mouseover),o.mouseover=void 0),!c){r.unselectRect();return}const f=(r.isBubbleType(c)||r.isScatterType(c)||!i.tooltip_grouped?[c]:r.filterByX(s,c.x)).map(h=>r.addName(h));r.showTooltip(f,t),r.setExpand(c.index,c.id,!0),(n=r.showGridFocus)==null||n.call(r,f);const d=r.dist(c,l);(r.isBarType(c.id)||d<r.getPointSensitivity(c))&&(r.$el.eventRect.style("cursor","pointer"),e&&(!o.mouseover||o.mouseover.x!==c.x||o.mouseover.id!==c.id)&&(i.data_onover.call(r.api,c),o.mouseover=c))},unselectRect(){var t,e,n;const r=this,{state:i,$el:{circle:o,tooltip:s}}=r;if(i._lastTooltipMouse=null,i.isCanvasMode){(t=r.clearCanvasFocus)==null||t.call(r),s&&r.hideTooltip();return}(e=r.$el.eventRect)==null||e.style("cursor",null),(n=r.hideGridFocus)==null||n.call(r),s&&(r.hideTooltip(),r._handleLinkedCharts(!1)),o&&!r.isPointFocusOnly()&&r.unexpandCircles(),r.expandBarTypeShapes(!1)},generateEventRectsForSingleX(t){const e=this,{config:n,state:r}=e,{eventReceiver:i}=r,o=t.style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(s){r.event=s;const{currentIdx:l,data:c}=i,u=c[l===-1?e.getDataIndexFromEvent(s):l];e.clickHandlerForSingleX.bind(this)(u,e)}).datum({multipleX:!1});if(r.inputType==="mouse"){const s=l=>{const c=l?e.getDataIndexFromEvent(l):i.currentIdx;return c>-1?i.data[c]:null};o.on("mouseover",l=>{r.event=l,e.updateEventRect(),Object.values(e.$el.axisTooltip).forEach(c=>c==null?void 0:c.style("display",null))}).on("mousemove",function(l){const c=s(l);if(r.event=l,!c)return;let{index:u}=c;const f=n.line_step_type;if(n.line_step_tooltipMatch&&e.hasType("step")&&/^step\-(before|after)$/.test(f)){const h=e.scale.zoom||e.scale.x,m=e.axis.xs[u],A=h.invert(ir(l,this)[0]);f==="step-after"&&A<m?u-=1:f==="step-before"&&A>m&&(u+=1)}e.showAxisGridFocus();const d=n.tooltip_grouped&&u===i.currentIdx;if(r.dragging||r.flowing||e.hasArcType()||d){if(n.tooltip_show&&d){const[h,m]=ir(l,this),A=r._lastTooltipMouse;(!A||Av(h-A[0],2)+Av(m-A[1],2)>=9)&&(r._lastTooltipMouse=[h,m],e.setTooltipPosition())}return}u!==i.currentIdx&&(e.setOverOut(!1,i.currentIdx),i.currentIdx=u),u===-1?e.unselectRect():e.selectRectForSingle(this,u),e.setOverOut(u!==-1,u)}).on("mouseout",l=>{r.event=l,!(!e.config||e.hasArcType()||i.currentIdx===-1||!n.interaction_onout)&&(e.hideAxisGridFocus(),e.unselectRect(),e.setOverOut(!1,i.currentIdx),i.currentIdx=-1)})}return o},clickHandlerForSingleX(t,e){const n=e,{config:r,state:i,$el:{main:o}}=n;if(!t||n.hasArcType()||i.cancelClick){i.cancelClick&&(i.cancelClick=!1);return}const{index:s}=t;o.selectAll(`.${bn.shape}-${s}`).each(function(l){var c;(r.data_selection_grouped||n.isWithinShape(this,l))&&((c=n.toggleShape)==null||c.call(n,this,l,s),r.data_onclick.bind(n.api)(l,this))})},generateEventRectsForMultipleXs(t){const e=this,{config:n,state:r}=e;t.on("click",function(i){r.event=i,e.clickHandlerForMultipleXS.bind(this)(e)}).datum({multipleX:!0}),r.inputType==="mouse"&&t.on("mouseover mousemove",function(i){r.event=i,e.selectRectForMultipleXs(this)}).on("mouseout",i=>{r.event=i,!(!e.config||e.hasArcType()||!n.interaction_onout)&&e.unselectRect()})},clickHandlerForMultipleXS(t){const e=t,{config:n,state:r}=e,i=e.getTargetsToShow();if(e.hasArcType(i))return;const o=ir(r.event,this),s=e.findClosestFromTargets(i,o);if(!s)return;const l=e.getPointSensitivity(s);(e.isBarType(s.id)||e.dist(s,o)<l)&&e.$el.main.selectAll(`.${bn.shapes}${e.getTargetSelectorSuffix(s.id)}`).selectAll(`.${bn.shape}-${s.index}`).each(function(){var c;(n.data_selection_grouped||e.isWithinShape(this,s))&&((c=e.toggleShape)==null||c.call(e,this,s,s.index),n.data_onclick.bind(e.api)(s,this))})}},_C={initClip(){const t=this,{clip:e,datetimeId:n}=t.state;e.id=`${n}-clip`,e.idXAxis=`${e.id}-xaxis`,e.idYAxis=`${e.id}-yaxis`,e.idGrid=`${e.id}-grid`,e.path=t.getClipPath(e.id),e.pathXAxis=t.getClipPath(e.idXAxis),e.pathYAxis=t.getClipPath(e.idYAxis),e.pathGrid=t.getClipPath(e.idGrid)},getClipPath(t){const e=this,{config:n}=e;return!n.clipPath&&/-clip$/.test(t)||!n.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!n.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:`url(#${t})`},appendClip(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:o}}=e,s=n.axis_rotated,l=Math.max(30,r.left)-(s?0:20),c=(s?r.top+o+10:r.bottom)+20,u=s?-(1+l):-(l-1),f=-15,d=s?r.left+20:i+10+l;t.attr("x",u).attr("y",f).attr("width",d).attr("height",c)},setYAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:o}}=e,s=n.axis_rotated,l=Math.max(30,r.left)-(s?20:0),c=n.axis_y_inner,u=c&&!s?n.axis_y_label.text?-20:-1:s?-(1+l):-(l-1),f=-(s?20:r.top),d=(s?i+15+l:r.left+20)+(c?20:0),h=(s?r.bottom+10:r.top+o)+10;t.attr("x",u).attr("y",f).attr("width",d).attr("height",h)},updateXAxisTickClip(){const t=this,{config:e,state:{clip:n,xAxisHeight:r},$el:{defs:i}}=t,o=t.getHorizontalAxisHeight("x");if(i&&!n.idXAxisTickTexts){const s=`${n.id}-xaxisticktexts`;t.appendClip(i,s),n.idXAxisTickTexts=s,n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts)}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&o!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=o},setXAxisTickClipWidth(){const t=this,{config:e,state:{current:{maxTickSize:n}}}=t,r=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&r){const i=Math.sin(Math.PI/180*Math.abs(r));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/i}else n.x.clipPath=null},setXAxisTickTextClipPathWidth(){const t=this,{state:{clip:e,current:n},$el:{svg:r}}=t;r&&r.select(`#${e.idXAxisTickTexts} rect`).attr("width",n.maxTickSize.x.clipPath).attr("height",30)}},qC={getAxisSize(t){const e=this,n=e.config.axis_rotated;return n&&t==="x"||!n&&/y2?/.test(t)?e.getAxisWidthByAxisId(t,!0):e.getHorizontalAxisHeight(t)},getAxisWidthByAxisId(t,e){var n,r;const i=this;if(i.axis){const o=(n=i.axis)==null?void 0:n.getAxisLabelPosition(t),{width:s}=i.axis.getMaxTickSize(t,e),l=s===0?.5:0;return s+(((r=i.config.padding)==null?void 0:r.mode)==="fit"?o.isInner?10+l:10:o.isInner?20+l:40)}else return 40},getHorizontalAxisHeight(t){var e,n;const r=this,{config:i,state:o}=r,{rotatedPadding:s,isLegendRight:l,isLegendInset:c}=o,u=i.axis_rotated,f=((e=i.padding)==null?void 0:e.mode)==="fit",d=i[`axis_${t}_inner`],h=i[`axis_${t}_label`].text,m=13;let A=((n=i.padding)==null?void 0:n.mode)==="fit"?d&&!h?t==="y"?1:0:20:30;if(t==="x"&&!i.axis_x_show)return 8;if(t==="x"&&ge(i.axis_x_height))return i.axis_x_height;if(t==="y"&&!i.axis_y_show)return i.legend_show&&!l&&!c?10:1;if(t==="y2"&&!i.axis_y2_show)return f?0:s.top;const I=r.axis.getMaxTickSize(t),C=Math.abs(i.axis_x_tick_rotate)>0&&(!i.axis_x_tick_autorotate||r.needToRotateXAxisTickTexts());return(i.axis_x_tick_multiline||C)&&I.height>m&&(A+=I.height-m),A+(r.axis.getAxisLabelPosition(t).isInner?0:10)+(t==="y2"&&!u?-10:0)},getEventRectWidth(){const t=this,{config:e,axis:n}=t,r=e.axis_x_inverted,i=n.x.tickInterval();return Math.max(0,r?Math.abs(i):i)},getAxisTickRotate(t){const e=this,{axis:n,config:r,state:i,$el:o}=e;let s=r[`axis_${t}_tick_rotate`];if(t==="x"){const l=n.isCategorized()||n.isTimeSeries();if(r.axis_x_tick_fit&&l){const c=r.axis_x_tick_count,u=i.current.maxTickSize.x.ticks.length;let f=0;if(c?f=c>u?u:c:u&&(f=u),f!==i.axis.x.tickCount){const{targets:d}=e.data;i.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(d,"min"),e.getXDomainMinMax(d,"max")],f)}i.axis.x.tickCount=f}(o.svg||i.isCanvasMode)&&r.axis_x_tick_autorotate&&r.axis_x_tick_fit&&!r.axis_x_tick_multiline&&!r.axis_x_tick_culling&&l&&(s=e.needToRotateXAxisTickTexts()?r.axis_x_tick_rotate:0)}return s},needToRotateXAxisTickTexts(){const t=this,{state:{axis:e,current:n,isLegendRight:r,legendItemWidth:i}}=t,o=r&&i,s=n.width-o-t.getCurrentPaddingByDirection("left")-t.getCurrentPaddingByDirection("right"),l=e.x.tickCount+e.x.padding.left+e.x.padding.right,{width:c}=t.axis.getMaxTickSize("x"),u=l?s/l:0;return c>u}},tI={axis_x_clipPath:!0,axis_x_show:!0,axis_x_forceAsSingle:!1,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_culling_reverse:!1,axis_x_tick_count:void 0,axis_x_tick_inner:!1,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_inner:!1,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]},eI={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_culling_reverse:!1,axis_y_tick_inner:!1,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},nI={axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_culling_reverse:!1,axis_y2_tick_inner:!1,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]},rI=Object.defineProperty,Ev=Object.getOwnPropertySymbols,aI=Object.prototype.hasOwnProperty,iI=Object.prototype.propertyIsEnumerable,Cv=(t,e,n)=>e in t?rI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cu=(t,e)=>{for(var n in e||(e={}))aI.call(e,n)&&Cv(t,n,e[n]);if(Ev)for(var n of Ev(e))iI.call(e,n)&&Cv(t,n,e[n]);return t},oI=cu(cu(cu({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},tI),eI),nI),sI={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1};const lI=[hC,gC,vC],Iv={axis:ZC,clip:_C,eventrect:QC,sizeAxis:qC},Rv={optDataAxis:sI,optAxis:oI};function Ov(t){return Object.keys(t).map(e=>t[e])}function wv(t=[],e=[]){yn(Er.prototype,Ov(Iv).concat(t)),yn(Kn.prototype,lI),Da.setOptions(Ov(Rv).concat(e))}function uo(t=[],e=[]){wv(t,e)}function ea(t,e=[]){const n=Array.isArray(t)?t:t?[t]:[];wv([vi,Bs,fC].concat(n),[Ba,dC].concat(e))}let Pv=()=>(ea(hi,[gi]),(Pv=()=>jt.AREA)()),Mv=()=>(ea(hi,[gi]),(Mv=()=>jt.AREA_LINE_RANGE)()),Lv=()=>(ea(hi,[gi]),(Lv=()=>jt.AREA_STEP_RANGE)()),Dv=()=>(ea(hi,[gi,eu]),(Dv=()=>jt.AREA_SPLINE)()),Fv=()=>(ea(hi,[gi,eu]),(Fv=()=>jt.AREA_SPLINE_RANGE)()),Nv=()=>(ea(hi,[gi]),(Nv=()=>jt.AREA_STEP)());function uu(t){const e=this.config.bar_connectLine,n=(e==null?void 0:e[t])||e;return/^(start|end)\-(start|end)$/.test(n)?n:null}var cI={initBar(){const{$el:t,config:e,state:{clip:n}}=this;t.bar=t.main.select(`.${ze.chart}`),t.bar=e.bar_front?t.bar.append("g"):t.bar.insert("g",":first-child"),t.bar.attr("class",rr.chartBars).call(this.setCssRule(!1,`.${rr.chartBars}`,["pointer-events:none"])),e.clipPath===!1&&(e.bar_radius||e.bar_radius_ratio)&&t.bar.attr("clip-path",n.pathXAxis.replace(/#[^)]*/,`#${n.id}`))},updateTargetsForBar(t){const e=this,{config:n}=e,r=e.getClass("bars",!0),i=n.interaction_enabled&&n.data_selection_isselectable;jc.call(e,t,{type:"Bar",elKey:"bar",containerClass:rr.chartBars,itemClass:rr.chartBar,initFn:e.initBar}).append("g").attr("class",r).style("cursor",s=>{var l;return(l=i==null?void 0:i.bind)!=null&&l.call(i,e.api)(s)?"pointer":null}).call(s=>{e.setCssRule(!0,` .${rr.bar}`,["fill"],e.color)(s),s.each(function(l){uu.call(e,l.id)&&kt(this).append("path").attr("class",rr.barConnectLine)})})},updateBar(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,$el:i,$T:o}=n,s=e?i.subchart:i,l=n.getClass("bar",!0),c=n.initialOpacity.bind(n);r.bar_linearGradient&&n.updateLinearGradient();const u=s.main.selectAll(`.${rr.bars}`).selectAll(`.${rr.bar}`).data(n.labelishData.bind(n));o(u.exit(),t).style("opacity","0").remove(),s.bar=u.enter().append("path").attr("class",l).style("fill",n.generateUpdateBarColor()).merge(u).style("opacity",c),n.setRatioForGroupedData(s.bar.data())},generateUpdateBarColor(){const t=this,e=t.getStylePropValue(t.color)||(()=>null);return n=>vg.call(t,n,"bar_linearGradient",e)},updateBarColor(t){return this.generateUpdateBarColor()(t)},redrawBar(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{bar:i}=n?r.$el.subchart:r.$el,o=[],s=new Map;return[r.$T(i,e,Rr()).attr("d",function(l,c,u){const f=(ge(l.value)||r.isBarRangeType(l))&&t(l,c);let d=s.get(l.id);if(d===void 0&&(d=uu.call(r,l.id),s.set(l.id,d)),f.length>1&&o.push(f[1]),c===u.length-1&&o.length){const h=r.$T(kt(this.parentNode.querySelector(`.${rr.barConnectLine}`)),e,Rr());r.updateConnectLine(h,d,o),o.splice(0)}return f[0]}).style("fill",r.generateUpdateBarColor()).style("clip-path",l=>l.clipPath).style("opacity",null)]},generateDrawBar(t,e){const n=this,{config:r}=n,i=n.generateGetBarPoints(t,e),o=Wl(n),s=o?Vl(n):new Set,l=new Map;return(c,u)=>{const f=i(c,u),{indexX:d,indexY:h,isNegative:m,pos:A,radius:I,clipPath:C}=jl(n,c,f,o,s,n.isStackingRadiusData.bind(n)),P=["",""];if(c.clipPath=C,o){const W=`a${I} ${I} ${m?"1 0 0":"0 0 1"} `;P[h]=`${W}${I},${I}`,P[d]=`${W}${[-I,I][r.axis_rotated?"sort":"reverse"]()}`,m&&P.reverse()}const z=r.axis_rotated?`H${A} ${P[0]}V${f[2][h]-I} ${P[1]}H${f[3][d]}`:`V${A} ${P[0]}H${f[2][d]-I} ${P[1]}V${f[3][h]}`,N=[`M${f[0][d]},${f[0][h]}${z}z`];let B=l.get(c.id);return B===void 0&&(B=uu.call(n,c.id),l.set(c.id,B)),B&&N.push(r.axis_rotated?{x:f[0][d],y:f[0][h],width:f[0][d]-A,height:f[2][h]-f[0][h]}:{x:f[0][d],y:A,width:f[2][d]-f[0][d],height:f[3][h]-A}),N}},isStackingRadiusData(t){const e=this,{$el:n,config:r,data:i,state:o}=e,{id:s,index:l,value:c}=t;if(o.hiddenTargetIds.has(s)){const h=n.bar.filter(m=>m.id===s&&m.value===c);return!h.empty()&&/a\d+/i.test(h.attr("d"))}const u=r.data_groups.find(h=>h.indexOf(s)>-1),d=e.orderTargets(e.filterTargetsToShow(i.targets.filter(e.isBarType,e))).filter(h=>u.indexOf(h.id)>-1).map(h=>{const m=h.values[l];if(m&&(ge(c)&&c>0?m.value>0:m.value<0))return m}).filter(Boolean).map(h=>h.id);return c!==0&&d.indexOf(s)===d.length-1},updateConnectLine(t,e,n){const r=n.map((i,o,s)=>{const l=this.config.axis_rotated,c=/^start-(start|end)$/.test(e),u=/^end-(start|end)$/.test(e),f=[],d=l?u?i.x-i.width:i.x:i.x+i.width,h=l||c?i.y+i.height:i.y;return o===0?f.push(`${d},${h}`):(f.push(l?`L${i.x-(/\w+-end$/.test(e)?i.width:0)},${i.y}`:`L${i.x},${i.y+(/\w+-start$/.test(e)?i.height:0)}`),o<s.length-1&&f.push(`M${d},${h}`)),f.join(" ")});t.attr("d",`M${r.join("")}z`)}},uI={bar_connectLine:!1,bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0};let $v=()=>(uo([cI,vi],[uI,Ba]),($v=()=>jt.BAR)());var fI={initBubble(){const t=this,{config:e}=t;t.hasType("bubble")&&(e.point_show=!0,e.point_type="circle")},getBaseLength(){const t=this,{width:e,height:n}=t.state,r=Ue.bubbleBaseLength;let i=t.cache.get(r);return i||t.cache.add(r,i=yr("min",[e,n])),i},getBubbleR(t){const e=this;let n=e.config.bubble_maxR;le(n)?n=n.bind(e.api)(t):ge(n)||(n=e.getBaseLength()/(e.getMaxDataCount()*2)+12);const r=Ue.bubbleMaxValue;let i=e.cache.get(r);i===null&&e.cache.add(r,i=yr("max",e.getMinMaxData().max.map(l=>e.isBubbleZType(l)?e.getBubbleZData(l.value,"y"):je(l.value)?l.value.mid:l.value)));const o=n*n*Math.PI,s=(e.isBubbleZType(t)?e.getBubbleZData(t.value,"z"):t.value)*(o/i);return Math.sqrt(s/Math.PI)},getBubbleZData(t,e){return je(t)?t[e]:t[e==="y"?0:1]}},dI=fI,hI={bubble_maxR:35,bubble_zerobased:!1};let Bv=()=>(uo([vi,Bs,dI],[hI,Ba]),(Bv=()=>jt.BUBBLE)());var gI=Object.defineProperty,zv=Object.getOwnPropertySymbols,vI=Object.prototype.hasOwnProperty,pI=Object.prototype.propertyIsEnumerable,Uv=(t,e,n)=>e in t?gI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,mI=(t,e)=>{for(var n in e||(e={}))vI.call(e,n)&&Uv(t,n,e[n]);if(zv)for(var n of zv(e))pI.call(e,n)&&Uv(t,n,e[n]);return t},xI={generateGetCandlestickPoints(t,e=!1){const n=this,r=e?n.axis.subX:n.axis.x,i=n.getIndicesMax(t)+1,o=n.getBarW("candlestick",r,i),s=n.getShapeX(o,t,!!e),l=n.getShapeY(!!e),c=n.getShapeOffset(n.isCandlestickType,t,!!e),u=n.getYScaleById.bind(n);return(f,d)=>{const h=u.call(n,f.id,e)(n.getShapeYMin(f.id)),m=c(f,d)||h,A=ge(o)?o:o[f.id]||o._$width,I=n.getCandlestickData(f);let C;if(I&&ge(I.open)&&ge(I.close)){const P={start:s(f),end:0};P.end=P.start+A;const z={start:l(I.open),end:l(I.close)},N={x:P.start+A/2,high:l(I.high),low:l(I.low)},B=h-m;z.start-=B,z.end-=B,N.high-=B,N.low-=B,C=[[P.start,z.start],[P.end,z.end],[N.x,N.low,N.high]]}else C=[[0,0],[0,0],[0,0,0]];return C}},getCandlestickData({value:t}){let e;if(nn(t)){const[n,r,i,o,s=!1]=t;e={open:n,high:r,low:i,close:o},s!==!1&&(e.volume=s)}else je(t)&&(e=mI({},t));return e&&(e._isUp=e.close>=e.open),e||null}},yI=Object.defineProperty,TI=Object.defineProperties,bI=Object.getOwnPropertyDescriptors,kv=Object.getOwnPropertySymbols,SI=Object.prototype.hasOwnProperty,AI=Object.prototype.propertyIsEnumerable,Xv=(t,e,n)=>e in t?yI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,EI=(t,e)=>{for(var n in e||(e={}))SI.call(e,n)&&Xv(t,n,e[n]);if(kv)for(var n of kv(e))AI.call(e,n)&&Xv(t,n,e[n]);return t},CI=(t,e)=>TI(t,bI(e)),II=CI(EI({},xI),{initCandlestick(){pg.call(this,{elKey:"candlestick",className:Yr.chartCandlesticks})},updateTargetsForCandlestick(t){jc.call(this,t,{type:"Candlestick",elKey:"candlestick",containerClass:Yr.chartCandlesticks,itemClass:Yr.chartCandlestick,initFn:this.initCandlestick,withFocus:!1,withStyles:!1}).style("pointer-events","none")},updateCandlestick(t,e=!1){const n=this,{$el:r,$T:i}=n,o=e?r.subchart:r,s=n.getClass("candlestick",!0),l=n.initialOpacity.bind(n),c=o.main.selectAll(`.${Yr.chartCandlestick}`).selectAll(`.${Yr.candlestick}`).data(n.labelishData.bind(n));i(c.exit(),t).style("opacity","0").remove();const u=c.enter().filter(f=>f.value).append("g").attr("class",s);u.append("line"),u.append("path"),o.candlestick=c.merge(u).style("opacity",l)},generateDrawCandlestick(t,e){const n=this,{config:r}=n,i=n.generateGetCandlestickPoints(t,e),o=r.axis_rotated,s=r.candlestick_color_down;return(l,c,u)=>{const f=i(l,c),d=n.getCandlestickData(l),h=d==null?void 0:d._isUp,m=+o,A=+!m;u.classed&&u.classed(Yr[h?"valueUp":"valueDown"],!0);const I=o?`H${f[1][1]} V${f[1][0]} H${f[0][1]}`:`V${f[1][1]} H${f[1][0]} V${f[0][1]}`;u.select("path").attr("d",`M${f[0][m]},${f[0][A]}${I}z`).style("fill",z=>(h?n.color(z):je(s)?s[z.id]:s)||n.color(z));const C=u.select("line"),P=o?{x1:f[2][1],x2:f[2][2],y1:f[2][0],y2:f[2][0]}:{x1:f[2][0],x2:f[2][0],y1:f[2][1],y2:f[2][2]};for(const z in P)C.attr(z,P[z])}},redrawCandlestick(t,e,n=!1){const r=this,{$el:i,$T:o}=r,{candlestick:s}=n?i.subchart:i,l=Rr(!0);return[s.each(function(c,u){const f=o(kt(this),e,l);t(c,u,f)}).style("opacity",null)]}}),RI={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"};let Gv=()=>(uo([II,vi],[RI,Ba]),(Gv=()=>jt.CANDLESTICK)());var Vs={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0,arc_rangeText_values:void 0,arc_rangeText_unit:"absolute",arc_rangeText_fixed:!1,arc_rangeText_format:void 0,arc_rangeText_position:void 0},OI={donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_line:!1,donut_label_image:void 0,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_rate:.98,donut_expand_duration:50,donut_padAngle:0,donut_startingAngle:0};function wI(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function PI(t){return t}function MI(){var t=PI,e=wI,n=null,r=Ze(0),i=Ze(Is),o=Ze(0);function s(l){var c,u=(l=Hl(l)).length,f,d,h=0,m=new Array(u),A=new Array(u),I=+r.apply(this,arguments),C=Math.min(Is,Math.max(-Is,i.apply(this,arguments)-I)),P,z=Math.min(Math.abs(C)/u,o.apply(this,arguments)),N=z*(C<0?-1:1),B;for(c=0;c<u;++c)(B=A[m[c]=c]=+t(l[c],c,l))>0&&(h+=B);for(e!=null?m.sort(function(W,V){return e(A[W],A[V])}):n!=null&&m.sort(function(W,V){return n(l[W],l[V])}),c=0,d=h?(C-u*N)/h:0;c<u;++c,I=P)f=m[c],B=A[f],P=I+(B>0?B*d:0)+N,A[f]={data:l[f],index:c,value:B,startAngle:I,endAngle:P,padAngle:z};return A}return s.value=function(l){return arguments.length?(t=typeof l=="function"?l:Ze(+l),s):t},s.sortValues=function(l){return arguments.length?(e=l,n=null,s):e},s.sort=function(l){return arguments.length?(n=l,e=null,s):n},s.startAngle=function(l){return arguments.length?(r=typeof l=="function"?l:Ze(+l),s):r},s.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:Ze(+l),s):i},s.padAngle=function(l){return arguments.length?(o=typeof l=="function"?l:Ze(+l),s):o},s}function LI(t){return t.innerRadius}function DI(t){return t.outerRadius}function FI(t){return t.startAngle}function NI(t){return t.endAngle}function $I(t){return t&&t.padAngle}function BI(t,e,n,r,i,o,s,l){var c=n-t,u=r-e,f=s-i,d=l-o,h=d*c-f*u;if(!(h*h<Xn))return h=(f*(e-o)-d*(t-i))/h,[t+h*c,e+h*u]}function js(t,e,n,r,i,o,s){var l=t-n,c=e-r,u=(s?o:-o)/fi(l*l+c*c),f=u*c,d=-u*l,h=t+f,m=e+d,A=n+f,I=r+d,C=(h+A)/2,P=(m+I)/2,z=A-h,N=I-m,B=z*z+N*N,W=i-o,V=h*I-A*m,J=(N<0?-1:1)*fi(oA(0,W*W*B-V*V)),q=(V*N-z*J)/B,at=(-V*z-N*J)/B,et=(V*N+z*J)/B,ot=(-V*z+N*J)/B,lt=q-C,ft=at-P,_=et-C,dt=ot-P;return lt*lt+ft*ft>_*_+dt*dt&&(q=et,at=ot),{cx:q,cy:at,x01:-f,y01:-d,x11:q*(i/W-1),y11:at*(i/W-1)}}function Wv(){var t=LI,e=DI,n=Ze(0),r=null,i=FI,o=NI,s=$I,l=null,c=Zl(u);function u(){var f,d,h=+t.apply(this,arguments),m=+e.apply(this,arguments),A=i.apply(this,arguments)-Cs,I=o.apply(this,arguments)-Cs,C=eg(I-A),P=I>A;if(l||(l=f=c()),m<h&&(d=m,m=h,h=d),!(m>Xn))l.moveTo(0,0);else if(C>Is-Xn)l.moveTo(m*$a(A),m*Fr(A)),l.arc(0,0,m,A,I,!P),h>Xn&&(l.moveTo(h*$a(I),h*Fr(I)),l.arc(0,0,h,I,A,P));else{var z=A,N=I,B=A,W=I,V=C,J=C,q=s.apply(this,arguments)/2,at=q>Xn&&(r?+r.apply(this,arguments):fi(h*h+m*m)),et=kc(eg(m-h)/2,+n.apply(this,arguments)),ot=et,lt=et,ft,_;if(at>Xn){var dt=ng(at/h*Fr(q)),ut=ng(at/m*Fr(q));(V-=dt*2)>Xn?(dt*=P?1:-1,B+=dt,W-=dt):(V=0,B=W=(A+I)/2),(J-=ut*2)>Xn?(ut*=P?1:-1,z+=ut,N-=ut):(J=0,z=N=(A+I)/2)}var xt=m*$a(z),bt=m*Fr(z),Rt=h*$a(W),Et=h*Fr(W);if(et>Xn){var Zt=m*$a(N),fe=m*Fr(N),me=h*$a(B),xe=h*Fr(B),Te;if(C<io)if(Te=BI(xt,bt,me,xe,Zt,fe,Rt,Et)){var Fe=xt-Te[0],Ie=bt-Te[1],ke=Zt-Te[0],Jt=fe-Te[1],Ae=1/Fr(sA((Fe*ke+Ie*Jt)/(fi(Fe*Fe+Ie*Ie)*fi(ke*ke+Jt*Jt)))/2),Le=fi(Te[0]*Te[0]+Te[1]*Te[1]);ot=kc(et,(h-Le)/(Ae-1)),lt=kc(et,(m-Le)/(Ae+1))}else ot=lt=0}J>Xn?lt>Xn?(ft=js(me,xe,xt,bt,m,lt,P),_=js(Zt,fe,Rt,Et,m,lt,P),l.moveTo(ft.cx+ft.x01,ft.cy+ft.y01),lt<et?l.arc(ft.cx,ft.cy,lt,kn(ft.y01,ft.x01),kn(_.y01,_.x01),!P):(l.arc(ft.cx,ft.cy,lt,kn(ft.y01,ft.x01),kn(ft.y11,ft.x11),!P),l.arc(0,0,m,kn(ft.cy+ft.y11,ft.cx+ft.x11),kn(_.cy+_.y11,_.cx+_.x11),!P),l.arc(_.cx,_.cy,lt,kn(_.y11,_.x11),kn(_.y01,_.x01),!P))):(l.moveTo(xt,bt),l.arc(0,0,m,z,N,!P)):l.moveTo(xt,bt),!(h>Xn)||!(V>Xn)?l.lineTo(Rt,Et):ot>Xn?(ft=js(Rt,Et,Zt,fe,h,-ot,P),_=js(xt,bt,me,xe,h,-ot,P),l.lineTo(ft.cx+ft.x01,ft.cy+ft.y01),ot<et?l.arc(ft.cx,ft.cy,ot,kn(ft.y01,ft.x01),kn(_.y01,_.x01),!P):(l.arc(ft.cx,ft.cy,ot,kn(ft.y01,ft.x01),kn(ft.y11,ft.x11),!P),l.arc(0,0,h,kn(ft.cy+ft.y11,ft.cx+ft.x11),kn(_.cy+_.y11,_.cx+_.x11),P),l.arc(_.cx,_.cy,ot,kn(_.y11,_.x11),kn(_.y01,_.x01),!P))):l.arc(0,0,h,W,B,P)}if(l.closePath(),f)return l=null,f+""||null}return u.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-io/2;return[$a(d)*f,Fr(d)*f]},u.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:Ze(+f),u):t},u.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:Ze(+f),u):e},u.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:Ze(+f),u):n},u.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ze(+f),u):r},u.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:Ze(+f),u):i},u.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:Ze(+f),u):o},u.padAngle=function(f){return arguments.length?(s=typeof f=="function"?f:Ze(+f),u):s},u.context=function(f){return arguments.length?(l=f==null?null:f,u):l},u}const zI=15,Vv=20,jv=.35;function UI(t=!1){const e=this;return["donut","pie","polar","gauge"].find(n=>e.hasType(n)&&!(n==="gauge"&&t&&e.hasMultiArcGauge()))}function Hv(){const t=this,{config:e}=t,n=UI.call(t,!0),r=n&&e[`${n}_label_line`],i=Qn(r),o=(c,u,f)=>f,s={show:r===!0||i&&(r==null?void 0:r.show)!==!1,distance:i&&(r==null?void 0:r.distance)||Vv};if(r===!0)return{chartType:n,line:s,text:{formatter:o}};if(!i)return{chartType:n,line:{show:!1,distance:Vv},text:{formatter:null}};let l=o;return le(r.text)?l=r.text:r.text===!1&&(l=null),{chartType:n,line:s,text:{formatter:l}}}function kI(t,e){const n=this,{state:r}=n,i=n.updateAngle(t);if(!i)return null;let{outerRadius:o}=n.getRadius(t),s=o;n.hasType("polar")&&(s=n.getPolarOuterRadius(t,o),o=r.radius);let l=(i.startAngle+i.endAngle)/2;Math.abs(i.endAngle-i.startAngle-2*Math.PI)<.01&&(l=Math.PI/2);const u=Math.sin(l),f=-Math.cos(l),d={x:u*s,y:f*s},h=o+zI,m={x:u*h,y:f*h},A=u>=0,I={x:m.x+e*(A?1:-1),y:m.y};return{startPoint:d,breakPoint:m,endPoint:I,isRight:A,midAngle:l}}function Yv(){return Hv.call(this).line.show}function XI(t){const e=this,{$el:{arcs:n},$T:r}=e,{line:i,text:o}=Hv.call(e),s=i.distance;let l=null;n.selectAll(`.${Ye.chartArc}`).each(function(c){var u,f,d;const h=kt(this),m=kI.call(e,c,s),{ratio:A,meetsThreshold:I,updated:C}=(u=c._cache)!=null?u:{};if(!C||!m)return;const P=e.isTargetToShow(c.data.id)&&I,{startPoint:z,breakPoint:N,endPoint:B,isRight:W}=m,V=`${z.x},${z.y} ${N.x},${N.y} ${B.x},${B.y}`;if(i.show){let q=h.select(`.${Ye.arcLabelLine}`);q.empty()&&(q=h.append("polyline").attr("class",Ye.arcLabelLine)),r(q,t).attr("points",V).style("stroke",e.color(c.data)).style("opacity",P?null:"0")}let J=h.select(`.${Ye.arcLabelLineText}`);if(J.empty()&&(J=h.append("text").attr("class",Ye.arcLabelLineText).style("pointer-events","none")),P){const{value:q}=C,{id:at}=c.data,et=((d=(f=o.formatter)!=null?f:e.getArcLabelConfig("format"))!=null?d:e.defaultArcValueFormat)(q,A,at).toString();ii(J,et,[-1,1],!1);const ot={x:B.x+5*(W?1:-1),y:B.y};J.style("text-anchor",W?"start":"end");const lt=J.node(),ft=lt==null?void 0:lt.querySelectorAll("tspan");if(l===null&&(l=parseFloat(ce.getComputedStyle(lt).fontSize)||12),ft&&ft.length>1){const dt=(ft.length-3)/2;ot.y+=(-dt+jv)*l}else ot.y+=jv*l;r(J,t).attr("transform",`translate(${ot.x},${ot.y})`).style("opacity",null).style("fill",e.updateTextColor.bind(e)(c))}else r(J,t).style("opacity","0")})}var GI=Object.defineProperty,WI=Object.defineProperties,VI=Object.getOwnPropertyDescriptors,Kv=Object.getOwnPropertySymbols,jI=Object.prototype.hasOwnProperty,HI=Object.prototype.propertyIsEnumerable,Zv=(t,e,n)=>e in t?GI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,YI=(t,e)=>{for(var n in e||(e={}))jI.call(e,n)&&Zv(t,n,e[n]);if(Kv)for(var n of Kv(e))HI.call(e,n)&&Zv(t,n,e[n]);return t},KI=(t,e)=>WI(t,VI(e));const fu=["donut","gauge","pie","polar"];function ZI(t){return["donut","pie","polar","gauge"].find(e=>t.hasType(e))}function JI(t,e,n,r){var i,o;const{config:s,state:{radiusExpanded:l}}=t,c=n.endAngle-Math.PI/2,u=Math.sin(c),f={x:Math.cos(c)*(l+(r?5:25)),y:u*(l+15-Math.abs(u*10))+3};if(r){const d=s.arc_rangeText_position;if(d){const h=s.arc_rangeText_values,m=le(d)?d(h[e.index]):d;f.x+=(i=m==null?void 0:m.x)!=null?i:0,f.y+=(o=m==null?void 0:m.y)!=null?o:0}}return f}function QI(t,e,n,r){const{config:i}=t,o=ZI(t);let s=o?i[`${o}_label_ratio`]:void 0;if(s)s=le(s)?s.bind(t.api)(e,n,r):s;else{const d=36/n,h=d>.375;s=n&&r?(h?1.175-d:.8)*n/r:0}return s}function _I(t,e,n){let{outerRadius:r}=t.getRadius(e);t.hasType("polar")&&(r=t.getPolarOuterRadius(e,r));const[i,o]=t.svgArc.centroid(n).map(c=>isNaN(c)?0:c),s=Math.sqrt(i*i+o*o),l=QI(t,e,r,s);return{pos:{x:i,y:o},ratio:l}}function Jv(t=0){const e=this,{config:n,state:r}=e,i=e.hasMultiArcGauge(),o=r.gaugeArcWidth/e.getTargetsToShow().length,s=t?Math.min(r.radiusExpanded*t-r.radius,o*.8-(1-t)*100):0;return{inner(l){const{innerRadius:c}=e.getRadius(l);return i?r.radius-o*(l.index+1):ge(c)?c:0},outer(l){const{outerRadius:c}=e.getRadius(l);let u;if(i)u=r.radius-o*l.index+s;else if(e.hasType("polar")&&!t)u=e.getPolarOuterRadius(l,c);else if(u=c,t){let{radiusExpanded:f}=r;r.radius!==c&&(f-=Math.abs(r.radius-c)),u=f*t}return u},corner(l,c){const{arc_cornerRadius_ratio:u=0,arc_cornerRadius:f=0}=n,{data:{id:d},value:h}=l;let m;return u?m=u*c:m=ge(f)?f:f.call(e.api,d,h,c),m}}}function du(t){return function(e){const n=({startAngle:i=0,endAngle:o=0,padAngle:s=0})=>({startAngle:i,endAngle:o,padAngle:s}),r=Ga(n(this._current),n(e));return this._current=e,function(i){const o=r(i),{data:s,index:l,value:c}=e;return t(KI(YI({},o),{data:s,index:l,value:c}))}}}var qI={initPie(){const t=this,{config:e}=t,n=e.data_type,r=e[`${n}_padding`],i=e[`${n}_startingAngle`]||0,o=(r?r*.01:e[`${n}_padAngle`])||0;t.pie=MI().startAngle(i).endAngle(i+2*Math.PI).padAngle(o).value(s=>{var l,c;return(c=(l=s.values)==null?void 0:l.reduce((u,f)=>u+f.value,0))!=null?c:s}).sort(t.getSortCompareFn.bind(t)(!0))},updateRadius(){const t=this,{config:e,state:n}=t,r=e.data_type,i=e[`${r}_padding`],o=e.gauge_width||e.donut_width,s=t.getTargetsToShow().length*e.gauge_arcs_minWidth,l=.85,c=Yv.call(t)?l:1;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?l:c),n.radius=n.radiusExpanded*.95,n.innerRadiusRatio=o?(n.radius-o)/n.radius:.6,n.gaugeArcWidth=o||(s<=n.radius-n.innerRadius?n.radius-n.innerRadius:s<=n.radius?s:n.radius);const u=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:u},getRadius(t){const e=this,n=t==null?void 0:t.data;let{innerRadius:r,outerRadius:i}=e.state;return!ge(r)&&n&&(r=r[n.id]||0),je(i)&&n&&n.id in i?i=i[n.id]:ge(i)||(i=e.state.radius),{innerRadius:r,outerRadius:i}},updateArc(){const t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength(){const t=this,{config:e}=t,n=e.gauge_arcLength*3.6;let r=2*(n/360);return n<-360?r=-2:n>360&&(r=2),r*Math.PI},getStartingAngle(){const t=this,{config:e}=t,n=e.data_type,r=t.hasType("gauge")?e.gauge_fullCircle:!1,i=-1*Math.PI/2,o=Math.PI/2;let s=e[`${n}_startingAngle`]||0;return!r&&s<=i?s=i:!r&&s>=o?s=o:(s>Math.PI||s<-1*Math.PI)&&(s=Math.PI),s},updateAngle(t,e=!1){var n;const r=this,{config:i,state:o}=r,s=e&&r.hasType("gauge");let{pie:l}=r,c=t,u=!1;if(!i)return null;const f=r.getStartingAngle(),d=i.gauge_fullCircle||e&&!s?r.getArcLength():f*-2,h=c.data&&r.isGaugeType(c.data)&&!r.hasMultiArcGauge();if(h){const{gauge_min:m,gauge_max:A}=i,I=r.getTotalDataSum(o.rendered),C=d*((I-m)/(A-m));l=l.startAngle(f).endAngle(C+f)}if(e===!1){let m;if(h)m=l(r.filterTargetsToShow());else{const A="$arcPieLayout";let I=r.cache.get(A);(!I||I.generation!==o.redrawGeneration)&&(I={generation:o.redrawGeneration,layout:l(r.filterTargetsToShow())},r.cache.add(A,I)),m=I.layout}m.forEach((A,I)=>{var C;!u&&A.data.id===((C=c.data)==null?void 0:C.id)&&(u=!0,c=A,c.index=I)})}if(isNaN(c.startAngle)&&(c.startAngle=0),isNaN(c.endAngle)&&(c.endAngle=c.startAngle),e||c.data&&(i.gauge_enforceMinMax||r.hasMultiArcGauge())){const{gauge_min:m,gauge_max:A}=i,I=e&&!s?r.getTotalDataSum(o.rendered):A,C=d/(I-m),P=(n=c.value)!=null?n:0,z=P<m?0:P<I?P-m:I-m;c.startAngle=f,c.endAngle=f+C*z}return u||e?c:null},getSvgArc(){const t=this,{inner:e,outer:n,corner:r}=Jv.call(t),i=Wv().innerRadius(e).outerRadius(n),o=function(s,l){var c;let u="M 0 0";if(s.value||s.data){const f=l?s:(c=t.updateAngle(s))!=null?c:null;f&&(u=i.cornerRadius(r(f,n(f)))(f))}return u};return o.centroid=i.centroid,o},getSvgArcExpanded(t=1){const e=this,{inner:n,outer:r,corner:i}=Jv.call(e,t),o=Wv().innerRadius(n).outerRadius(r);return s=>{const l=e.updateAngle(s),c=r(l);let u=0;return l&&(u=i(l,c)),l&&o.cornerRadius(u)(l)||"M 0 0"}},getArc(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},redrawArcRangeText(){const t=this,{config:e,$el:{arcs:n},state:r,$T:i}=t,o=e.arc_rangeText_format,s=t.hasType("gauge")&&e.arc_rangeText_fixed;let l=e.arc_rangeText_values;if(l!=null&&l.length){const c=e.arc_rangeText_unit==="%",u=t.getTotalDataSum(r.rendered);c&&(l=l.map(h=>u/100*h));const f=t.pie(l).map((h,m)=>(h.index=m,h));let d=n.selectAll(`.${Ye.arcRange}`).data(l);d.exit().remove(),d=i(d.enter().append("text").attr("class",Ye.arcRange).style("text-anchor","middle").style("pointer-events","none").style("opacity","0").text(h=>{const m=c?h/u*100:h;return le(o)?o(m):`${m}${c?"%":""}`}).merge(d)),(!r.rendered||r.rendered&&!s)&&u>0&&d.attr("transform",function(h,m){return t.transformForArcLabel(this,f[m],!0)}),d.style("opacity",h=>!s&&(h>u||u===0)?"0":null)}},transformForArcLabel(t,e,n=!1){const r=this,i=r.updateAngle(e,n);if(!i)return"";let o,s=1;if(n||r.hasMultiArcGauge())o=JI(r,e,i,n);else if(!r.hasType("gauge")||r.data.targets.length>1){const l=_I(r,e,i);o=l.pos,s=l.ratio}else return"";return Jh.call(r,t,o),`translate(${o.x*s},${o.y*s})`},convertToArcData(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel(t){var e;const n=this,r=n.hasType("gauge"),i=(e=fu.filter(n.hasType.bind(n)))==null?void 0:e[0];n.shouldShowArcLabel()&&t.style("fill",n.updateTextColor.bind(n)).attr("filter",o=>n.updateTextBGColor.bind(n)(o,n.config.data_labels_backgroundColors)).each(function(o){const s=kt(this),l=n.updateAngle(o),c=n.getRatio("arc",l),u=$c.call(n,c,i);if(o._cache={updated:l,ratio:c,meetsThreshold:u},u){const{value:f}=l||o,d=(n.getArcLabelConfig("format")||n.defaultArcValueFormat)(f,c,o.data.id).toString();ii(s,d,[-1,1],r)}else s.text("")})},expandArc(t){const e=this,{state:{transiting:n},$el:r}=e;if(n){const o=setInterval(()=>{e.state.transiting||(clearInterval(o),r.legend.selectAll(`.${cn.legendItemFocused}`).size()>0&&e.expandArc(t))},10);return}const i=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(i,`.${Ye.chartArc}`)).each(function(o){if(!e.shouldExpand(o.data.id))return;const s=e.getExpandConfig(o.data.id,"duration"),l=e.getSvgArcExpanded(e.getExpandConfig(o.data.id,"rate"));kt(this).selectAll("path").transition().duration(s).attrTween("d",du(e.svgArcExpanded.bind(e))).transition().duration(s*2).attrTween("d",du(l.bind(e)))})},unexpandArc(t){const e=this,{state:{transiting:n},$el:{svg:r}}=e;if(n)return;const i=e.mapToTargetIds(t);r.selectAll(e.selectorTargets(i,`.${Ye.chartArc}`)).selectAll("path").transition().duration(o=>e.getExpandConfig(o.data.id,"duration")).attrTween("d",du(e.svgArc.bind(e))),r.selectAll(`${Ye.arc}`).style("opacity",null)},getExpandConfig(t,e){const n=this,{config:r}=n,i={duration:50,rate:.98};let o;return n.isDonutType(t)?o="donut":n.isGaugeType(t)?o="gauge":n.isPieType(t)&&(o="pie"),o?r[`${o}_expand_${e}`]:i[e]},shouldExpand(t){const e=this,{config:n}=e,r=e.isDonutType(t)?"donut":e.isGaugeType(t)?"gauge":e.isPieType(t)?"pie":null;return r?!!n[`${r}_expand`]:!1},shouldShowArcLabel(){const t=this,{config:e}=t;return fu.some(n=>t.hasType(n)&&e[`${n}_label_show`])},getArcLabelConfig(t="format"){const e=this,{config:n}=e;let r=i=>i;return fu.filter(e.hasType.bind(e)).forEach(i=>{r=n[`${i}_label_${t}`]}),t==="format"&&le(r)?r.bind(e.api):r},updateTargetsForArc(t){const e=this,{$el:n}=e,r=e.hasType("gauge"),i=e.getChartClass("Arc"),o=e.getClass("arcs",!0),s=e.classFocus.bind(e),l=n.main.select(`.${Ye.chartArcs}`),c=l.selectAll(`.${Ye.chartArc}`).data(e.pie(t)).attr("class",f=>i(f)+s(f.data)),u=c.enter().append("g").attr("class",i).call(this.setCssRule(!1,`.${Ye.chartArcs} text`,["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",o).merge(c),u.append("text").attr("dy",r&&!e.hasMultiTargets()?"-.1em":null).style("opacity","0").style("text-anchor",e.getStylePropValue("middle")).style("pointer-events",e.getStylePropValue("none")),n.text=l.selectAll(`.${ze.target} text`)},initArc(){const t=this,{$el:e}=t;e.arcs=e.main.select(`.${ze.chart}`).append("g").attr("class",Ye.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle(t){const e=this,n=t||e.getArcTitle(),r=e.hasType("gauge");if(n){const i=r?ar.chartArcsGaugeTitle:Ye.chartArcsTitle;let o=e.$el.arcs.select(`.${i}`);o.empty()&&(o=e.$el.arcs.append("text").attr("class",i).style("text-anchor","middle")),r&&o.attr("dy","-0.3em"),ii(o,n,r?void 0:[-.6,1.35],!0)}},getArcTitle(){const t=this,e=t.hasType("donut")&&"donut"||t.hasType("gauge")&&"gauge";return e?t.config[`${e}_title`]:""},getArcTitleWithNeedleValue(){const t=this,{config:e,state:n}=t,r=t.getArcTitle();if(r&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(r)){let i=n.current.needle;return ge(i)||(i=e.arc_needle_value),Ra(r,{NEEDLE_VALUE:~~i})}return!1},redrawArc(t,e,n){const r=this,{config:i,state:o,$el:{main:s}}=r,l=i.interaction_enabled,c=l&&i.data_selection_isselectable;let u=s.selectAll(`.${Ye.arcs}`).selectAll(`.${Ye.arc}`).data(r.arcData.bind(r));u.exit().transition().duration(e).style("opacity","0").remove(),u=u.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",f=>r.color(f.data)).style("cursor",f=>{var d;return(d=c==null?void 0:c.bind)!=null&&d.call(c,r.api)(f)?"pointer":null}).style("opacity","0").each(function(f){r.isGaugeType(f.data)&&(f.startAngle=i.gauge_startingAngle,f.endAngle=i.gauge_startingAngle),this._current=f}).merge(u),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawArcGaugeLine()),u.attr("transform",f=>!r.isGaugeType(f.data)&&n?"scale(0)":"").style("opacity",function(f){return f===this._current?"0":null}).each(()=>{o.transiting=!0}).transition().duration(t).attrTween("d",function(f){const d=r.updateAngle(f);if(!d)return()=>"M 0 0";isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const h=Ga(this._current,d);return this._current=h(0),function(m){const A=h(m);return A.data=f.data,r.getArc(A,!0)}}).attr("transform",n?"scale(1)":"").style("fill",f=>{let d;return r.levelColor?(d=r.levelColor(f.data.values[0].value),i.data_colors[f.data.id]=d):d=r.color(f.data),d}).style("opacity",null).call(Wo,function(){if(r.levelColor){const f=kt(this),d=f.datum(this._current);r.updateLegendItemColor(d.data.id,f.style("fill"))}o.transiting=!1,o.redrawing&&(o.redrawing=!1,o._targetsToShow=null,o._cachedDrawShape=null),Ne(i.onrendered,r.api)}),l&&r.bindArcEvent(u),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),i.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t),r.redrawArcRangeText()},redrawNeedle(){const t=this,{$el:e,config:n,state:{hiddenTargetIds:r,radius:i}}=t,o=(i-1)/100*n.arc_needle_length,s=r.size!==t.data.targets.length;let l=t.$el.arcs.select(`.${Ye.needle}`);const c=n.arc_needle_path,u=n.arc_needle_bottom_width/2,f=n.arc_needle_top_width/2,d=n.arc_needle_top_rx,h=n.arc_needle_top_ry,m=n.arc_needle_bottom_len,A=n.arc_needle_bottom_rx,I=n.arc_needle_bottom_ry,C=t.getNeedleAngle(),P=()=>{const z=t.getArcTitleWithNeedleValue();z&&t.setArcTitle(z)};if(P(),l.empty()&&(l=e.arcs.append("path").classed(Ye.needle,!0),e.needle=l,e.needle.updateHelper=(z,N=!1)=>{e.needle.style("display")!=="none"&&t.$T(e.needle).style("transform",`rotate(${t.getNeedleAngle(z)}deg)`).call(Wo,()=>{N&&(n.arc_needle_value=z),P()})}),s){const z=le(c)?c.call(t,o):`M-${u} ${m} A${A} ${I} 0 0 0 ${u} ${m} L${f} -${o} A${d} ${h} 0 0 0 -${f} -${o} L-${u} ${m} Z`;t.$T(l).attr("d",z).style("fill",n.arc_needle_color).style("display",null).style("transform",`rotate(${C}deg)`)}else l.style("display","none")},getNeedleAngle(t){const e=this,{config:n,state:r}=e,i=e.getArcLength(),o=e.hasType("gauge"),s=e.getTotalDataSum(!0);let l=sn(t)?t:n.arc_needle_value,c=n[`${n.data_type}_startingAngle`]||0,u;if(ge(l)||(l=o&&e.data.targets.length===1?s:0),r.current.needle=l,o){c=e.getStartingAngle();const f=n.gauge_fullCircle?i:c*-2,{gauge_min:d,gauge_max:h}=n;u=f*((l-d)/(h-d))}else u=s?i*(l/s):0;return(c+u)*(180/Math.PI)},redrawBackgroundArcs(){const t=this,{config:e,state:n}=t,r=t.hasMultiArcGauge(),i=e.gauge_fullCircle,o=t.getTargetsToShow().length===0&&!!e.data_empty_label_text,s=t.getStartingAngle(),l=i?s+t.getArcLength():s*-1;let c=t.$el.arcs.select(`${r?"g":""}.${Ye.chartArcsBackground}`);if(r){let u=0;c=c.selectAll(`path.${Ye.chartArcsBackground}`).data(t.data.targets),c.enter().append("path").attr("class",(f,d)=>`${Ye.chartArcsBackground} ${Ye.chartArcsBackground}-${d}`).merge(c).style("fill",e.gauge_background||null).attr("d",({id:f})=>{if(o||n.hiddenTargetIds.has(f))return"M 0 0";const d={data:[{value:e.gauge_max}],startAngle:s,endAngle:l,index:u++};return t.getArc(d,!0,!0)}),c.exit().remove()}else c.attr("d",o?"M 0 0":()=>{const u={data:[{value:e.gauge_max}],startAngle:s,endAngle:l};return t.getArc(u,!0,!0)})},bindArcEvent(t){const e=this,{config:n,state:r}=e,i=r.inputType==="touch",o=r.inputType==="mouse",s=u=>{const f=e.updateAngle(u);return f?e.convertToArcData(f):null};function l(u,f,d){e.expandArc(d),e.api.focus(d),e.toggleFocusLegend(d,!0),e.showTooltip([f],u)}function c(u){const f=(u==null?void 0:u.id)||void 0;e.unexpandArc(f),e.api.revert(),e.revertLegend(),e.hideTooltip()}if(t.on("click",function(u,f,d){var h;const m=s(f);m&&((h=e.toggleShape)==null||h.call(e,this,m,d),n.data_onclick.bind(e.api)(m,this))}),o&&t.on("mouseover",function(u,f){if(r.transiting)return;r.event=u;const d=s(f),h=(d==null?void 0:d.id)||void 0;l(this,d,h),e.setOverOut(!0,d)}).on("mouseout",(u,f)=>{if(r.transiting||!n.interaction_onout)return;r.event=u;const d=s(f);c(),e.setOverOut(!1,d)}).on("mousemove",function(u,f){const d=s(f);r.event=u,e.showTooltip([d],this)}),i&&e.hasArcType()&&!e.radars){const u=f=>{var d,h;const{clientX:m,clientY:A}=(h=(d=f.changedTouches)==null?void 0:d[0])!=null?h:{clientX:0,clientY:0};return kt(He.elementFromPoint(m,A))};e.$el.svg.on("touchstart touchmove",function(f){if(r.transiting)return;r.event=f;const h=u(f).datum(),m=h!=null&&h.data&&h.data.id?e.updateAngle(h):null,A=m?e.convertToArcData(m):null,I=(A==null?void 0:A.id)||void 0;e.callOverOutForTouch(A),xn(I)?c():l(this,A,I)},{passive:!0})}},redrawArcText(t){const e=this,{config:n,state:r,$el:{main:i,arcs:o}}=e,s=e.hasType("gauge"),l=e.hasMultiArcGauge();let c;if(s&&e.data.targets.length===1&&n.gauge_title||(c=i.selectAll(`.${Ye.chartArc}`).select("text").style("opacity","0").attr("class",u=>e.isGaugeType(u.data)?ar.gaugeValue:null).call(e.textForArcLabel.bind(e)).style("font-size",u=>e.isGaugeType(u.data)&&e.data.targets.length===1&&!l?`${Math.round(r.radius/5)}px`:null),Zh.call(e),c.attr("transform",function(u){return e.transformForArcLabel.bind(e)(this,u)}).transition().duration(t).style("opacity",u=>e.isTargetToShow(u.data.id)&&e.isArcType(u.data)?null:"0"),l&&c.attr("dy","-.1em")),i.select(`.${Ye.chartArcsTitle}`).style("opacity",e.hasType("donut")||s?null:"0"),s){const u=n.gauge_fullCircle;u&&(c==null||c.attr("dy",`${l?0:Math.round(r.radius/14)}`)),n.gauge_label_show&&(o.select(`.${ar.chartArcsGaugeUnit}`).attr("dy",`${u?1.5:.75}em`).text(n.gauge_units),o.select(`.${ar.chartArcsGaugeMin}`).attr("dx",`${-1*(r.innerRadius+(r.radius-r.innerRadius)/(u?1:2))}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_min,!1)),!u&&o.select(`.${ar.chartArcsGaugeMax}`).attr("dx",`${r.innerRadius+(r.radius-r.innerRadius)/2}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_max,!0)))}Yv.call(e)&&XI.call(e,t)},getArcElementByIdOrIndex(t){const e=this,{$el:{arcs:n}}=e,r=ge(t)?i=>i.index===t:i=>i.data.id===t;return n==null?void 0:n.selectAll(`.${ze.target} path`).filter(r)}};function mi(t,e){yn(Er.prototype,[qI,vi].concat(t||[])),Da.setOptions([Ba].concat(e||[]))}let Qv=()=>(mi(void 0,[Vs,OI]),(Qv=()=>jt.DONUT)());var t2=Object.defineProperty,_v=Object.getOwnPropertySymbols,e2=Object.prototype.hasOwnProperty,n2=Object.prototype.propertyIsEnumerable,qv=(t,e,n)=>e in t?t2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,r2=(t,e)=>{for(var n in e||(e={}))e2.call(e,n)&&qv(t,n,e[n]);if(_v)for(var n of _v(e))n2.call(e,n)&&qv(t,n,e[n]);return t};function xi(t=!1){const e=this,{config:n,state:{current:{width:r,height:i}}}=e,o=e.getCurrentPadding(),s=r2({width:r-o.left-o.right,height:i-(n.legend_show?e.getLegendHeight()+10:0)-o.top-o.bottom},o);if(t){const l=hu.call(e,s),c=n.funnel_rotated;s.width=Math.max(s.width,c?l.height:l.width),s.height=Math.max(s.height,c?l.width:l.height)}return s}function hu(t){const e=this,{config:n}=e,r=n.funnel_rotated,[i,o]=[n.funnel_neck_width,n.funnel_neck_height].map((s,l)=>je(s)?t[r!==!l?"width":"height"]*s.ratio:s);return{width:i,height:o}}function a2(t){const e=this,n=e.config.funnel_rotated,{width:r,height:i}=xi.call(e,!0),o=[];return t.forEach((s,l)=>{const{ratio:c=0}=s,u=l>0?o[l-1][2][n?0:1]:0,f=c+u;o.push(s.coords=n?[[u,0],[f,0],[f,i],[u,i],[u,0]]:[[0,u],[r,u],[r,f],[0,f],[0,u]])}),o}function i2(){const t=this,e=t.config.funnel_rotated,{width:n,height:r}=xi.call(t,!0),i=hu.call(t,{width:n,height:r});let o;if(e){const s=(r-i.width)/2,l=n-i.height;o=[[l,s],[n,s],[n,r-s],[l,r-s],[0,r]]}else{const s=(n-i.width)/2,l=r-i.height;o=[[n,0],[n-s,l],[n-s,r],[s,r],[s,l]]}return`M${[[0,0],...o,[0,0]].join("L")}z`}function o2(t){const e=this,{config:n}=e,r=t.map(i=>({id:i.id,value:i.values.reduce((o,s)=>o+s.value,0)}));return n.data_order&&r.sort(e.getSortCompareFn.bind(e)(!0)),tp.call(e,r)}function tp(t){const e=this,{width:n,height:r}=xi.call(e),i=e.getTotalDataSum(!0),o=e.config.funnel_rotated?n:r;return t.forEach(s=>{s.ratio=s.value/i*o}),t}function s2(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function ep(t,e,n,r,i){const o=[];for(let l=0;l<=20;l++){const c=l/20,u=t+(e-t)*c,f=n+(r-n)*s2(c);o.push(i?[u,f]:[f,u])}return o}function l2(){var t;const e=this,n=e.config.funnel_rotated,{width:r,height:i}=xi.call(e,!0),o=hu.call(e,{width:r,height:i}),s=Jl().x(m=>m[0]).y(m=>m[1]).curve(Qo),l=(n?i-o.width:r-o.width)/2,c=n?r-o.height:i-o.height,u=ep(0,c,n?0:r,n?l:r-l,n),f=[];if(o.height>0&&(u.push(n?[r,l]:[r-l,i]),f.push(n?[r,i-l]:[l,i])),f.push(...ep(c,0,n?i-l:l,n?i:0,n)),u.length>1){const[m,A]=n?[1,0]:[0,1];u.splice(1,0,[u[m][0],u[A][1]]);const I=f.length-1;I>0&&f.splice(I,0,[f[I-m][0],f[I-A][1]])}const d=s(u)||"",h=((t=s(f))==null?void 0:t.replace(/^M/,"L"))||"";return n?`${d}${h}z`:`M0,0${d.replace(/^M/,"L")}${h}z`}var c2={initFunnel(){const t=this,{$el:e}=t;e.funnel=e.main.select(`.${ze.chart}`).append("g").classed(Zi.chartFunnels,!0),e.funnel.background=e.funnel.append("path").classed(Zi.funnelBackground,!0),t.bindFunnelEvent()},bindFunnelEvent(){const t=this,{$el:{funnel:e},config:n,state:r}=t;if(!n.interaction_enabled)return;const i=s=>{var l;const c=s.isTrusted?s.target:(l=r.eventReceiver.rect)==null?void 0:l.node();if(c&&/^path$/i.test(c.tagName))return r.event=s,kt(c).datum()},o=r.inputType==="touch";e.on(o?"touchstart":"mouseover mousemove",s=>{const l=i(s);l&&(t.showTooltip([l],s.target),/^(touchstart|mouseover)$/.test(s.type)&&t.setOverOut(!0,l))},o?{passive:!0}:void 0).on(o?"touchend":"mouseout",s=>{const l=i(s);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})},updateTargetsForFunnel(t){const e=this,{$el:{funnel:n}}=e;n||e.initFunnel();const r=e.getChartClass("Funnel"),i=e.getClass("funnel",!0),o=o2.call(e,t.filter(e.isFunnelType.bind(e))),s=e.filterNullish(o),l=n.selectAll(`.${Zi.chartFunnel}`).data(s);l.exit().remove();const c=l.enter().insert("g",`.${Zi.funnelBackground}`);c.append("path"),n.path=c.merge(l).attr("class",r).select("path").attr("class",i).style("opacity","0").style("fill",e.color)},updateFunnel(t){const e=this,{$el:{funnel:n}}=e,r=t.map(({id:i})=>i);n.path=n.path.filter(i=>r.includes(i.id))},generateGetFunnelPoints(){const t=this,{config:e,$el:{funnel:n}}=t,r=e.funnel_rotated,i=t.filterTargetsToShow(n.path),{top:o,left:s,width:l,height:c}=xi.call(t),u={};let f=0;return i.each(d=>{const h=f,{ratio:m}=d;f+=m;const A=r?s:o,I=A+h,C=A+f,P=(I+C)/2,z=r?o+c/2:s+l/2;u[d.id]=r?[[I,z],[C,z],[P,z]]:[[z,I],[z,C],[z,P]]}),d=>u[d.id]},redrawFunnel(){const t=this,{config:e,$T:n,$el:{funnel:r}}=t,i=t.filterTargetsToShow(r.path),o=a2.call(t,tp.call(t,i.data())),{top:s,left:l}=xi.call(t),c=(e.funnel_spline?l2:i2).call(t);r.attr("transform",`translate(${l}, ${s})`).attr("clip-path",`path('${c}')`),r.background.attr("d",c),n(i).attr("d",(u,f)=>`M${o[f].join("L")}z`).style("opacity","1"),r.selectAll("g").style("opacity",null)}},u2={funnel_neck_width:0,funnel_neck_height:0,funnel_rotated:!1,funnel_spline:!1};let np=()=>(mi([c2],[u2]),(np=()=>jt.FUNNEL)());var f2={initGauge(){const t=this,{config:e,$el:{arcs:n}}=t,r=(i=null,o="")=>{n.append("text").attr("class",i).style("text-anchor","middle").style("pointer-events","none").text(o)};if(t.hasType("gauge")){const i=t.hasMultiArcGauge();n.append(i?"g":"path").attr("class",Ye.chartArcsBackground).style("fill",!i&&e.gauge_background||null),e.gauge_units&&r(ar.chartArcsGaugeUnit),e.gauge_label_show&&(r(ar.chartArcsGaugeMin),!e.gauge_fullCircle&&r(ar.chartArcsGaugeMax))}},updateGaugeMax(){const t=this,{config:e,state:n}=t,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);!e.gauge_enforceMinMax&&i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawArcGaugeLine(){const t=this,{config:e,state:n,$el:r}=t,{hiddenTargetIds:i}=t.state,o=r.main.selectAll(`.${Ye.arcs}`).selectAll(`.${Ye.arcLabelLine}`).data(t.arcData.bind(t));o.enter().append("rect").attr("class",l=>`${Ye.arcLabelLine} ${ze.target} ${ze.target}-${l.data.id}`).merge(o).style("fill",l=>t.levelColor?t.levelColor(l.data.values[0].value):t.color(l.data)).style("display",e.gauge_label_show?null:"none").each(function(l){let c=0;const u=2;let f=0,d=0,h="";if(!i.has(l.data.id)){const m=t.updateAngle(l),A=n.gaugeArcWidth/t.getTargetsToShow().length*(m.index+1),I=m.endAngle-Math.PI/2,C=n.radius-A,P=I-(C===0?0:1/C);c=n.radiusExpanded-n.radius+A,f=Math.cos(P)*C,d=Math.sin(P)*C,h=`rotate(${I*180/Math.PI}, ${f}, ${d})`}kt(this).attr("x",f).attr("y",d).attr("width",c).attr("height",u).attr("transform",h).style("stroke-dasharray",`0, ${c+u}, 0`)})},textForGaugeMinMax(t,e){const n=this,{config:r}=n,i=r.gauge_label_extents;return le(i)?i.bind(n.api)(t,e):t},getGaugeLabelHeight(){const{config:t}=this;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge(){return this.getGaugeLabelHeight()*2}},d2={gauge_background:"",gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_extents:void 0,gauge_label_format:void 0,gauge_label_ratio:void 0,gauge_label_threshold:0,gauge_label_line:!1,gauge_label_image:void 0,gauge_enforceMinMax:!1,gauge_min:0,gauge_max:100,gauge_type:"single",gauge_startingAngle:-1*Math.PI/2,gauge_arcLength:100,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_rate:.98,gauge_expand_duration:50};let rp=()=>(mi([f2],[Vs,d2]),(rp=()=>jt.GAUGE)()),ap=()=>(ea(),(ap=()=>jt.LINE)()),ip=()=>(ea(void 0,[eu]),(ip=()=>jt.SPLINE)()),op=()=>(ea(),(op=()=>jt.STEP)());var h2={pie_label_show:!0,pie_label_format:void 0,pie_label_ratio:void 0,pie_label_threshold:.05,pie_label_line:!1,pie_label_image:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0};let sp=()=>(mi(void 0,[Vs,h2]),(sp=()=>jt.PIE)());function lp(t){const e=t.config.polar_level_max;let n=t.getMinMaxData().max[0].value;return e&&e>n&&(n=e),n}var g2={initPolar(){const t=this,{$el:{arcs:e},config:n}=t,r=n.polar_level_text_show,i=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",Zr.levels),r&&i&&t.generateTextBGColorFilter(i)},getPolarOuterRadius(t,e){var n;const r=lp(this);return((n=t==null?void 0:t.data.values[0].value)!=null?n:0)/r*e},updateTargetsForPolar(t){this.updateTargetsForArc(t)},redrawPolar(){const t=this,{config:e}=t;e.polar_level_show&&t.updatePolarLevel()},updatePolarLevel(){const t=this,{config:e,state:n,$el:{arcs:{levels:r}}}=t,i=e.polar_level_depth,o=lp(t),s=Vo(0,i),l=n.radius,c=s.map(h=>l*((h+1)/i)),u=(e.polar_level_text_format||function(){}).bind(t.api),f=r.selectAll(`.${Zr.level}`).data(s);f.exit().remove();const d=f.enter().append("g").attr("class",(h,m)=>`${Zr.level} ${Zr.level}-${m}`);if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",e.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",h=>c[h]),e.polar_level_text_show){const h=e.polar_level_text_backgroundColor,m=`#${n.datetimeId}-labels-bg${t.getTargetSelectorSuffix(h)}`;d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",A=>-c[A]+5).attr("filter",h?`url(${m})`:null).text(A=>u(o/s.length*(A+1)))}}},v2={polar_label_show:!0,polar_label_format:void 0,polar_label_threshold:.05,polar_label_line:!1,polar_label_image:void 0,polar_label_ratio:void 0,polar_level_depth:3,polar_level_max:void 0,polar_level_show:!0,polar_level_text_backgroundColor:"#fff",polar_level_text_format:t=>t%1===0?t:t.toFixed(2),polar_level_text_show:!0,polar_padAngle:0,polar_padding:0,polar_startingAngle:0};let cp=()=>(mi([g2],[Vs,v2]),(cp=()=>jt.POLAR)());function p2(t,e,n,r,i,o){const s=t&&r>0?n-r:r,l=2*Math.PI;return i*(1-o*(e==="x"?Math.sin:Math.cos)(s*l/n))}const yi=Ue.radarPoints,up=Ue.radarTextWidth;var m2={initRadar(){const t=this,{config:e,state:{current:n},$el:r}=t;t.hasType("radar")&&(r.radar=r.main.select(`.${ze.chart}`).append("g").attr("class",Gd.chartRadars),r.radar.levels=r.radar.append("g").attr("class",Zr.levels),r.radar.axes=r.radar.append("g").attr("class",Rn.axis),r.radar.shapes=r.radar.append("g").attr("class",bn.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value,e.radar_axis_text_show&&(e.interaction_enabled&&t.bindRadarEvent(),t.updateRadarLevel(),t.updateRadarAxes()))},getRadarSize(){const t=this,{config:e,state:{arcWidth:n,arcHeight:r}}=t,i=e.axis_x_categories.length<4?-20:10,o=(Math.min(n,r)-i)/2;return[o,o]},updateTargetsForRadar(t){const e=this,{config:n}=e;lr(n.axis_x_categories)&&(n.axis_x_categories=Vo(0,yr("max",t.map(r=>r.values.length)))),e.generateRadarPoints()},getRadarPosition(t,e,n,r){const i=this,{config:o}=i,[s,l]=i.getRadarSize(),c=o.axis_x_categories.length,u=o.radar_direction_clockwise,f=Ia(t).map(d=>p2(u,d,c,e,sn(n)?n:t==="x"?s:l,ge(r)?r:o.radar_size_ratio));return f.length===1?f[0]:f},generateRadarPoints(){const t=this,e=t.data.targets,[n,r]=t.getRadarSize(),i=t.cache.get(yi)||{},o=i._size;(!o||o.width!==n&&o.height!==r)&&(e.forEach(s=>{i[s.id]=s.values.map((l,c)=>t.getRadarPosition(["x","y"],c,void 0,t.getRatio("radar",l)))}),i._size={width:n,height:r},t.cache.add(yi,i))},redrawRadar(){const t=this,{radar:e,main:n}=t.$el,r=t.getTranslate("radar");r&&(e.attr("transform",r),n.select(`.${En.chartTexts}`).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints(){const t=this.cache.get(yi);return(e,n)=>{const r=t[e.id][n];return[r,r,r,r]}},updateRadarLevel(){const t=this,{config:e,state:n,$el:{radar:r}}=t,[i,o]=t.getRadarSize(),s=e.radar_level_depth,l=e.axis_x_categories.length,c=e.radar_level_text_show,u=r.levels,f=Vo(0,s),d=e.radar_size_ratio*Math.min(i,o),h=f.map(P=>d*((P+1)/s)),m=(e.radar_level_text_format||function(){}).bind(t.api),A=f.map(P=>{const z=h[P];return Vo(0,l).map(B=>t.getRadarPosition(["x","y"],B,z,1).join(",")).join(" ")}),I=u.selectAll(`.${Zr.level}`).data(f);I.exit().remove();const C=I.enter().append("g").attr("class",(P,z)=>`${Zr.level} ${Zr.level}-${z}`);C.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(u.select("text").empty()&&u.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(()=>m(0)),C.append("text").attr("dx","-.5em").style("text-anchor","end").text(P=>m(n.current.dataMax/f.length*(P+1)))),C.merge(I).attr("transform",P=>`translate(${i-h[P]}, ${o-h[P]})`).selectAll("polygon").attr("points",P=>A[P]),c&&u.selectAll("text").attr("x",P=>xn(P)?i:A[P].split(",")[0]).attr("y",P=>xn(P)?o:0)},updateRadarAxes(){const t=this,{config:e,$el:{radar:n}}=t,[r,i]=t.getRadarSize(),o=e.axis_x_categories;let s=n.axes.selectAll("g").data(o);s.exit().remove();const l=s.enter().append("g").attr("class",(c,u)=>`${Rn.axis}-${u}`);if(e.radar_axis_line_show&&l.append("line"),e.radar_axis_text_show&&l.append("text"),s=l.merge(s),e.radar_axis_line_show&&s.select("line").attr("x1",r).attr("y1",i).attr("x2",(c,u)=>t.getRadarPosition("x",u)).attr("y2",(c,u)=>t.getRadarPosition("y",u)),e.radar_axis_text_show){const{x:c=0,y:u=0}=e.radar_axis_text_position,f=t.cache.get(up)||0;if(s.select("text").style("text-anchor","middle").attr("dy",".5em").call(d=>{d.each(function(h){ii(kt(this),String(h),[-.6,1.2])})}).datum((d,h)=>({index:h})).attr("transform",function(d){xn(this.width)&&(this.width=un(this,!0).width/2);let h=t.getRadarPosition("x",d.index,void 0,1),m=Math.round(t.getRadarPosition("y",d.index,void 0,1));return h>r?h+=this.width+c:Math.round(h)<r&&(h-=this.width+c),m>i?(m/2===i&&this.firstChild.tagName==="tspan"&&this.firstChild.setAttribute("dy","0em"),m+=u):m<i&&(m-=u),`translate(${h} ${m})`}),!f){const d=[n.axes,n.levels].map(h=>Qd(h.node()).width);d.every(h=>h>0)&&t.cache.add(up,d[0]-d[1])}}},bindRadarEvent(){const t=this,{config:e,state:n,$el:{radar:r,svg:i}}=t,o=t.isPointFocusOnly(),{inputType:s,transiting:l}=n,c=s==="mouse",u=f=>{if(n.event=f,!e.interaction_onout)return;const d=t.getDataIndexFromEvent(f),h=xn(d);(c||h)&&(t.hideTooltip(),o?t.hideCircleFocus():t.unexpandCircles(),c?t.setOverOut(!1,d):h&&t.callOverOutForTouch())};r.axes.on(c?"mouseover ":"touchstart",f=>{if(l)return;n.event=f;const d=t.getDataIndexFromEvent(f);t.selectRectForSingle(i.node(),d),c?t.setOverOut(!0,d):t.callOverOutForTouch(d)},c?void 0:{passive:!0}).on("mouseout",c?u:null),c||i.on("touchstart",u,{passive:!0})},updateRadarShape(){const t=this,e=t.data.targets.filter(o=>t.isRadarType(o)),n=t.cache.get(yi),r=t.$el.radar.shapes.selectAll("polygon").data(t.filterNullish(e)),i=r.enter().append("g").attr("class",t.getChartClass("Radar"));t.$T(r.exit()).remove(),i.append("polygon").merge(r).style("fill",t.color).style("stroke",t.color).attr("points",o=>n[o.id].join(" ")),t.updateTargetForCircle(e,i)},radarCircleX(t){return this.cache.get(yi)[t.id][t.index][0]},radarCircleY(t){return this.cache.get(yi)[t.id][t.index][1]}},x2={radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_axis_text_position:{},radar_level_depth:3,radar_level_show:!0,radar_level_text_format:t=>t%1===0?t:t.toFixed(2),radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1};let fp=()=>(mi([Iv.eventrect,Bs,m2],[Ba,x2,{axis_x_categories:Rv.optAxis.axis_x_categories}]),(fp=()=>jt.RADAR)());var y2={scatter_zerobased:!1};let dp=()=>(uo([vi,Bs],[Ba,y2]),(dp=()=>jt.SCATTER)());function T2(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 Hs(t,e,n,r,i){for(var o=t.children,s,l=-1,c=o.length,u=t.value&&(r-e)/t.value;++l<c;)s=o[l],s.y0=n,s.y1=i,s.x0=e,s.x1=e+=s.value*u}function Ys(t,e,n,r,i){for(var o=t.children,s,l=-1,c=o.length,u=t.value&&(i-n)/t.value;++l<c;)s=o[l],s.x0=e,s.x1=r,s.y0=n,s.y1=n+=s.value*u}var hp=(1+Math.sqrt(5))/2;function gp(t,e,n,r,i,o){for(var s=[],l=e.children,c,u,f=0,d=0,h=l.length,m,A,I=e.value,C,P,z,N,B,W,V;f<h;){m=i-n,A=o-r;do C=l[d++].value;while(!C&&d<h);for(P=z=C,W=Math.max(A/m,m/A)/(I*t),V=C*C*W,B=Math.max(z/V,V/P);d<h;++d){if(C+=u=l[d].value,u<P&&(P=u),u>z&&(z=u),V=C*C*W,N=Math.max(z/V,V/P),N>B){C-=u;break}B=N}s.push(c={value:C,dice:m<A,children:l.slice(f,d)}),c.dice?Hs(c,n,r,i,I?r+=A*C/I:o):Ys(c,n,r,I?n+=m*C/I:i,o),I-=C,f=d}return s}var vp=(function t(e){function n(r,i,o,s,l){gp(e,r,i,o,s,l)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(hp);function qR(t){return t==null?null:pp(t)}function pp(t){if(typeof t!="function")throw new Error;return t}function fo(){return 0}function ho(t){return function(){return t}}function b2(){var t=vp,e=!1,n=1,r=1,i=[0],o=fo,s=fo,l=fo,c=fo,u=fo;function f(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],e&&h.eachBefore(T2),h}function d(h){var m=i[h.depth],A=h.x0+m,I=h.y0+m,C=h.x1-m,P=h.y1-m;C<A&&(A=C=(A+C)/2),P<I&&(I=P=(I+P)/2),h.x0=A,h.y0=I,h.x1=C,h.y1=P,h.children&&(m=i[h.depth+1]=o(h)/2,A+=u(h)-m,I+=s(h)-m,C-=l(h)-m,P-=c(h)-m,C<A&&(A=C=(A+C)/2),P<I&&(I=P=(I+P)/2),t(h,A,I,C,P))}return f.round=function(h){return arguments.length?(e=!!h,f):e},f.size=function(h){return arguments.length?(n=+h[0],r=+h[1],f):[n,r]},f.tile=function(h){return arguments.length?(t=pp(h),f):t},f.padding=function(h){return arguments.length?f.paddingInner(h).paddingOuter(h):f.paddingInner()},f.paddingInner=function(h){return arguments.length?(o=typeof h=="function"?h:ho(+h),f):o},f.paddingOuter=function(h){return arguments.length?f.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):f.paddingTop()},f.paddingTop=function(h){return arguments.length?(s=typeof h=="function"?h:ho(+h),f):s},f.paddingRight=function(h){return arguments.length?(l=typeof h=="function"?h:ho(+h),f):l},f.paddingBottom=function(h){return arguments.length?(c=typeof h=="function"?h:ho(+h),f):c},f.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:ho(+h),f):u},f}function mp(t,e,n,r,i){var o=t.children,s,l=o.length,c,u=new Array(l+1);for(u[0]=c=s=0;s<l;++s)u[s+1]=c+=o[s].value;f(0,l,t.value,e,n,r,i);function f(d,h,m,A,I,C,P){if(d>=h-1){var z=o[d];z.x0=A,z.y0=I,z.x1=C,z.y1=P;return}for(var N=u[d],B=m/2+N,W=d+1,V=h-1;W<V;){var J=W+V>>>1;u[J]<B?W=J+1:V=J}B-u[W-1]<u[W]-B&&d+1<W&&--W;var q=u[W]-N,at=m-q;if(C-A>P-I){var et=m?(A*at+C*q)/m:C;f(d,W,q,A,I,et,P),f(W,h,at,et,I,C,P)}else{var ot=m?(I*at+P*q)/m:P;f(d,W,q,A,I,C,ot),f(W,h,at,A,ot,C,P)}}}function S2(t,e,n,r,i){(t.depth&1?Ys:Hs)(t,e,n,r,i)}var A2=(function t(e){function n(r,i,o,s,l){if((c=r._squarify)&&c.ratio===e)for(var c,u,f,d,h=-1,m,A=c.length,I=r.value;++h<A;){for(u=c[h],f=u.children,d=u.value=0,m=f.length;d<m;++d)u.value+=f[d].value;u.dice?Hs(u,i,o,s,I?o+=(l-o)*u.value/I:l):Ys(u,i,o,I?i+=(s-i)*u.value/I:s,l),I-=u.value}else r._squarify=c=gp(e,r,i,o,s,l),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(hp);function E2(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function C2(){return this.eachAfter(E2)}function I2(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function R2(t,e){for(var n=this,r=[n],i,o,s=-1;n=r.pop();)if(t.call(e,n,++s,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function O2(t,e){for(var n=this,r=[n],i=[],o,s,l,c=-1;n=r.pop();)if(i.push(n),o=n.children)for(s=0,l=o.length;s<l;++s)r.push(o[s]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function w2(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function P2(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function M2(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function L2(t){for(var e=this,n=D2(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function D2(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function F2(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function N2(){return Array.from(this)}function $2(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function B2(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*z2(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function gu(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=X2)):e===void 0&&(e=k2);for(var n=new Ks(t),r,i=[n],o,s,l,c;r=i.pop();)if((s=e(r.data))&&(c=(s=Array.from(s)).length))for(r.children=s,l=c-1;l>=0;--l)i.push(o=s[l]=new Ks(s[l])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(W2)}function U2(){return gu(this).eachBefore(G2)}function k2(t){return t.children}function X2(t){return Array.isArray(t)?t[1]:null}function G2(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function W2(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Ks(t){this.data=t,this.depth=this.height=0,this.parent=null}Ks.prototype=gu.prototype={constructor:Ks,count:C2,each:I2,eachAfter:O2,eachBefore:R2,find:w2,sum:P2,sort:M2,path:L2,ancestors:F2,descendants:N2,leaves:$2,links:B2,copy:U2,[Symbol.iterator]:z2};function V2(t){const e=this;return t.map(n=>{const{id:r,values:i}=n,{value:o}=i[0];return{name:r,id:r,value:o,ratio:e.getRatio("treemap",i[0])}})}var j2={initTreemapLayout(){this.treemap=b2().tile(this.getTreemapTile())},getTreemapTile(){var t,e;const n=this,{config:r,state:{current:{width:i,height:o}}}=n,s=(e={binary:mp,dice:Hs,slice:Ys,sliceDice:S2,squarify:vp,resquarify:A2}[(t=r.treemap_tile)!=null?t:"binary"])!=null?e:mp;return(l,c,u,f,d)=>{s(l,0,0,i,o);for(const h of l.children)h.x0=c+h.x0/i*(f-c),h.x1=c+h.x1/i*(f-c),h.y0=u+h.y0/o*(d-u),h.y1=u+h.y1/o*(d-u)}},getTreemapData(t){const e=this;return{name:"root",children:V2.bind(e)(e.filterTargetsToShow(t.filter(e.isTreemapType,e)))}},getTreemapRoot(t){const e=this,n=e.getTreemapData(t!=null?t:e.data.targets),r=gu(n).sum(o=>o.value),i=e.getSortCompareFn(!0);return e.treemap||e.initTreemapLayout(),e.treemap(i?r.sort(i):r)}},H2=Object.defineProperty,Y2=Object.defineProperties,K2=Object.getOwnPropertyDescriptors,xp=Object.getOwnPropertySymbols,Z2=Object.prototype.hasOwnProperty,J2=Object.prototype.propertyIsEnumerable,yp=(t,e,n)=>e in t?H2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Q2=(t,e)=>{for(var n in e||(e={}))Z2.call(e,n)&&yp(t,n,e[n]);if(xp)for(var n of xp(e))J2.call(e,n)&&yp(t,n,e[n]);return t},_2=(t,e)=>Y2(t,K2(e));function q2(t,e){const n=this;t.selectAll("g").attr("transform",r=>{const i=ti(n,r,e);return`translate(${i.x},${i.y})`}).select("rect").attr("width",r=>ti(n,r,e).w).attr("height",r=>ti(n,r,e).h)}var tR=_2(Q2({},j2),{initTreemap(){const t=this,{$el:e,state:{current:{width:n,height:r},clip:i,datetimeId:o}}=t;i.id=`${o}-clip`,t.initTreemapLayout(),e.defs.append("clipPath").attr("id",i.id).append("rect").attr("width",n).attr("height",r),e.treemap=e.main.select(`.${ze.chart}`).attr("clip-path",`url(#${i.id})`).append("g").classed(Vd.chartTreemaps,!0),t.bindTreemapEvent()},bindTreemapEvent(){const t=this,{$el:e,config:n,state:r}=t,i=o=>{var s;const l=o.isTrusted?o.target:(s=r.eventReceiver.rect)==null?void 0:s.node();let c;return l&&/^rect$/i.test(l.tagName)&&(r.event=o,c=kt(l).datum()),c==null?void 0:c.data};if(n.interaction_enabled){const o=r.inputType==="touch";e.treemap.on(o?"touchstart":"mouseover mousemove",s=>{const l=i(s);l&&(t.showTooltip([l],s.currentTarget),/^(touchstart|mouseover)$/.test(s.type)&&t.setOverOut(!0,l))},o?{passive:!0}:void 0).on(o?"touchend":"mouseout",s=>{const l=i(s);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})}},updateTargetsForTreemap(t){const e=this,{$el:{treemap:n}}=e,r=[e.getTreemapRoot(t!=null?t:e.data.targets)];n.data(e.filterNullish(r))},updateTreemap(t){const e=this,{$el:n,$T:r}=e,i=n.treemap.datum(),o=e.getChartClass("Treemap"),s=e.getClass("treemap",!0),l=n.treemap.selectAll("g").data(i.children);r(l.exit(),t).style("opacity","0").remove(),l.enter().append("g").append("rect"),n.treemap.selectAll("g").attr("class",o).select("rect").attr("class",s).attr("fill",c=>e.color(c.data.name))},generateGetTreemapPoints(){const t=this,{$el:e}=t,n={};return e.treemap.selectAll("g").each(r=>{const i=ti(t,r);n[r.data.name]=[[i.x,i.y],[i.x+i.w,i.y+i.h]]}),r=>n[r.id]},redrawTreemap(t){const e=this,{$el:n,state:{current:{width:r,height:i}}}=e;return n.defs.select("rect").attr("width",r).attr("height",i),[e.$T(n.treemap,t,Rr()).call(q2.bind(e),n.treemap.datum())]},treemapDataLabelFormat(t){const e=this,{$el:{treemap:n},config:r,scale:{x:i,y:o}}=e,{id:s,value:l}=t,c=r.treemap_label_format,u=e.getRatio("treemap",t),f=(u*100).toFixed(2),d=r.treemap_label_show&&$c.call(e,u,"treemap")?null:"0",h=n.selectAll("g").filter(I=>I.data.id===s).datum();let m=0,A=0;if(h){const{x0:I,x1:C,y0:P,y1:z}=h;m=i(C)-i(I),A=o(z)-o(P)}return function(I){return I.style("opacity",d),le(c)?c.bind(e.api)(l,u,s,{width:m,height:A}):`${s}
|
|
66
|
-
${f}%`}}}),
|
|
60
|
+
`):[];if(c.length)return c;if(en(l))return l;let u=s.tickWidth;(!u||u<=0)&&(u=i?95:s.isCategory?(s.isInverted?n(r[0])-n(r[1]):n(r[1])-n(r[0]))-12:110);function f(d,h){let m,S,E;for(let C=1;C<h.length;C++)if(h.charAt(C)===" "&&(S=C),m=h.substr(0,C+1),E=o*m.length,u<E)return f(d.concat(h.substr(0,S||C)),h.slice(S?S+1:C));return d.concat(h)}return f(c,String(l))}scale(e){return arguments.length?(this.helper.scale=e,this):this.helper.scale}orient(e){return arguments.length?(this.config.orient=e in{top:1,right:1,bottom:1,left:1}?String(e):"bottom",this):this.config.orient}tickFormat(e){const{config:n}=this;return arguments.length?(n.tickFormat=e,this):n.tickFormat}tickCentered(e){const{config:n}=this;return arguments.length?(n.tickCentered=e,this):n.tickCentered}tickOffset(){return this.config.tickOffset}tickInterval(e){var n,r,i;const{outerTickSize:o,tickOffset:s,tickValues:l}=this.config;let c;if(this.params.isCategory){const u=(n=this.params.owner.scale.zoom)!=null?n:this.helper.scale;c=s*2||Math.abs(u(1)-u(0))}else{const u=(r=this.params.owner.scale.zoom)!=null?r:this.helper.scale;if(c=(this.g?this.g.select("path.domain").node().getTotalLength()-o*2:Math.abs(u.range()[1]-u.range()[0]))/(e||((i=this.g)==null?void 0:i.selectAll("line").size())||1),l)for(let d=0;d<l.length-1;d++){const h=u(l[d+1])-u(l[d]);h&&h<c&&(c=h)}}return c===1/0?0:c}ticks(...e){const{config:n}=this;return e.length?(n.tickArguments=La(e),this):n.tickArguments}tickCulling(e){const{config:n}=this;return arguments.length?(n.tickCulling=e,this):n.tickCulling}tickValues(e){const{config:n}=this;if(ue(e))n.tickValues=()=>e(this.helper.scale.domain());else{if(!arguments.length)return n.tickValues;n.tickValues=e}return this}setTransition(e){return this.config.transition=e,this}}var c2=Object.defineProperty,u2=Object.defineProperties,f2=Object.getOwnPropertyDescriptors,Kv=Object.getOwnPropertySymbols,d2=Object.prototype.hasOwnProperty,h2=Object.prototype.propertyIsEnumerable,gu=(t,e,n)=>e in t?c2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,g2=(t,e)=>{for(var n in e||(e={}))d2.call(e,n)&&gu(t,n,e[n]);if(Kv)for(var n of Kv(e))h2.call(e,n)&&gu(t,n,e[n]);return t},v2=(t,e)=>u2(t,f2(e)),Rr=(t,e,n)=>gu(t,typeof e!="symbol"?e+"":e,n);function vu(t){return t==="subX"?"x":t==="subY"?"y":t==="subY2"?"y2":t}function Js(t){return/^sub/.test(t)}function Sa(t,e,n){const r=vu(e),i=t[`subchart_axis_${r}_tick_${n}`];return Js(e)&&i!==void 0?i:t[`axis_${r}_tick_${n}`]}function p2(t){var e,n;const r=[t[0],t[t.length-1]];let i=0,o=null;for(const l of t){const c=(n=(e=l.textContent)==null?void 0:e.length)!=null?n:0;c>i&&(i=c,o=l)}o&&!r.includes(o)&&r.push(o);const s=t[Math.floor(t.length/2)];return r.includes(s)||r.push(s),r}const Qs=50,pu=Symbol("tickWidthFallback");function m2(t){var e,n,r;const i=t.select("line").node(),o=(n=(e=i==null?void 0:i.ownerDocument)==null?void 0:e.defaultView)!=null&&n.getComputedStyle?parseFloat(i.ownerDocument.defaultView.getComputedStyle(i).strokeWidth):parseFloat((r=i==null?void 0:i.getAttribute)==null?void 0:r.call(i,"stroke-width"));return Number.isFinite(o)&&o>0?o:1}function x2(t,e,n){var r;const i=(r=t==null?void 0:t.scale)==null?void 0:r.call(t);if(!i||e.length<2)return!1;const o=Math.max(1,n)/2,s=e.map(c=>+i(c)).filter(Number.isFinite).sort((c,u)=>c-u);if(s.length<2)return!1;let l=s[0]+o;for(let c=1;c<s.length;c++){const u=s[c]-o,f=s[c]+o;if(u<=l+Va)return!0;l=Math.max(l,f)}return!1}function y2(t,e){if(t.length<=Qs)return t;const n=new Map,r=l=>{l>=0&&l<t.length&&n.set(l,t[l])};r(0),r(t.length-1),r(Math.floor(t.length/2));const i=Math.max(1,Math.floor(t.length/(Qs-3)));let o=-1,s=0;for(let l=0;l<t.length;l+=i){r(l);const c=t[l],u=e?e(c):c,f=Array.isArray(u)?u.join("").length:String(u!=null?u:"").length;f>o&&(o=f,s=l)}return r(s),Array.from(n.keys()).sort((l,c)=>l-c).map(l=>n.get(l))}function T2(t){return ue(t)?Jv(t):!Array.isArray(t)||t.length<=Qs?t:{length:t.length,first:t[0],middle:t[Math.floor(t.length/2)],last:t[t.length-1]}}function mu(t){return t[pu]}function _s(t,e){le(e)?Object.defineProperty(t,pu,{configurable:!0,value:e,writable:!0}):delete t[pu]}function xu(t){t.length=0,_s(t)}function b2(t,e,n){xu(t),t.length=e,_s(t,n)}function S2(t){const e=[];return e.length=t.length,Object.keys(t).forEach(n=>{const r=+n;e[r]=t[r]}),_s(e,mu(t)),e}function A2(t,e){xu(t),t.length=e.length,Object.keys(e).forEach(n=>{const r=+n;t[r]=e[r]}),_s(t,mu(e))}function E2(t,e,n){const r=t[e];if(le(r))return r;const i=Number(r);return Number.isFinite(i)?i:n}const Zv=new WeakMap;let C2=0;function Jv(t){if(!t||!/^(function|object)$/.test(typeof t))return`${typeof t}:${String(t)}`;let e=Zv.get(t);return e||(e=++C2,Zv.set(t,e)),`${typeof t}:${e}`}function yu(t){return t instanceof Date?`date:${+t}`:Array.isArray(t)?`[${t.map(e=>yu(e)).join(",")}]`:t&&typeof t=="object"?`{${Object.keys(t).sort().map(e=>`${e}:${yu(t[e])}`).join(",")}}`:typeof t=="function"?Jv(t):`${typeof t}:${String(t)}`}function Tu(t){return t instanceof Date?new Date(+t):Array.isArray(t)?t.map(e=>Tu(e)):t}function I2(t){return{width:t.width,height:t.height,ticks:t.ticks&&S2(t.ticks),clipPath:t.clipPath,domain:Tu(t.domain)}}function R2(t,e){return t.width=e.width,t.height=e.height,t.clipPath=e.clipPath,t.domain=Tu(e.domain),t.ticks&&e.ticks&&A2(t.ticks,e.ticks),t}var w2={getAxisInstance:function(){return this.axis||new O2(this)}};class O2{constructor(e){Rr(this,"owner"),Rr(this,"x"),Rr(this,"subX"),Rr(this,"subY"),Rr(this,"subY2"),Rr(this,"y"),Rr(this,"y2"),Rr(this,"axesList",{}),Rr(this,"tick",{x:null,y:null,y2:null}),Rr(this,"xs",[]),Rr(this,"orient",{x:"bottom",y:"left",y2:"right",subX:"bottom",subY:"left",subY2:"right"}),this.owner=e,this.setOrient()}getAxisClassName(e){return`${Pn.axis} ${Pn[`axis${Nn(e)}`]}`}isHorizontal(e,n){const r=e.config.axis_rotated;return n?r:!r}isCategorized(){const{config:e,state:n}=this.owner;return e.axis_x_type.indexOf("category")>=0||n.hasRadar}isCustomX(){const{config:e}=this.owner;return!this.isTimeSeries()&&(e.data_x||pn(e.data_xs))}isTimeSeries(e="x"){return this.owner.config[`axis_${e}_type`]==="timeseries"}isLog(e="x"){return this.owner.config[`axis_${e}_type`]==="log"}isTimeSeriesY(){return this.isTimeSeries("y")}getAxisType(e="x"){let n="linear";return this.isTimeSeries(e)?n=this.owner.config.axis_x_localtime?"time":"utc":this.isLog(e)&&(n="log"),n}getExtent(){const e=this.owner,{config:n,scale:r}=e;let i=n.axis_x_extent;if(i){if(ue(i))i=i.bind(e.api)(e.getXDomain(e.data.targets),r.subX);else if(this.isTimeSeries()&&i.every(isNaN)){const o=Kn.bind(e);i=i.map(s=>r.subX(o(s)))}}return i}init(){const e=this.owner,{config:n,$el:{main:r,axis:i},state:{clip:o}}=e,s=["x","y"];n.axis_y2_show&&s.push("y2"),s.forEach(l=>{const c=this.getAxisClassName(l);i[l]=r.append("g").attr("class",c).attr("clip-path",()=>{let u=null;return l==="x"?u=o.pathXAxis:l==="y"&&(u=o.pathYAxis),u}).attr("transform",e.getTranslate(l)).style("visibility",n[`axis_${l}_show`]?null:"hidden"),this.generateAxes(l)})}setOrient(){const e=this.owner,{axis_rotated:n,axis_y_inner:r,axis_y2_inner:i}=e.config;this.orient={x:n?"left":"bottom",y:n?r?"top":"bottom":r?"right":"left",y2:n?i?"bottom":"top":i?"left":"right",subX:n?"left":"bottom",subY:n?r?"top":"bottom":r?"right":"left",subY2:n?i?"bottom":"top":i?"left":"right"}}generateAxes(e){const n=this.owner,{config:r}=n,i=[],o=r[`axis_${e}_axes`],s=r.axis_rotated;let l;e==="x"?l=s?"left":"bottom":e==="y"?l=s?"bottom":"left":e==="y2"&&(l=s?"top":"right"),o.length&&o.forEach(c=>{const u=c.tick||{},f=n.scale[e].copy();c.domain&&f.domain(c.domain);const d=new Yv({outerTick:u.outer!==!1,noTransition:!1,config:r,id:e,isSubAxes:!0,owner:n}).scale(f).orient(l).tickFormat(ue(u.format)?u.format.bind(n.api):(h=>h));Xe(u.count)&&d.ticks(u.count),u.values&&d.tickValues(u.values),i.push(d)}),this.axesList[e]=i}updateAxes(){const e=this.owner,{config:n,$el:{main:r},$T:i}=e;Object.keys(this.axesList).forEach(o=>{const s=n[`axis_${o}_axes`],l=e.scale[o].copy(),c=l.range();this.axesList[o].forEach((u,f)=>{const d=u.scale().range();c.every((S,E)=>S===d[E])||u.scale().range(c);const h=`${this.getAxisClassName(o)}-${f+1}`;let m=r.select(`.${h.replace(/\s/,".")}`);m.empty()?(m=r.append("g").attr("class",h).style("visibility",n[`axis_${o}_show`]?null:"hidden"),u.create(m)):(s[f].domain&&l.domain(s[f].domain),u.scale(l).create(i(m))),m.attr("transform",e.getTranslate(o,f+1))})})}setAxis(e,n,r,i){const o=this.owner,s=vu(e);Js(e)||(this.tick[s]=this.getTickValues(s)),this[e]=this.getAxis(e,n,r,e==="x"&&(o.scale.zoom||o.config.subchart_show||o.state.resizing)?!0:i)}getAxis(e,n,r,i,o){const s=this.owner,{config:l}=s,c=/^(x|subX)$/.test(e),u=vu(e),f=c&&this.isCategorized(),d=this.orient[e],h=o?0:s.getAxisTickRotate(u);let m;if(c)m=e==="subX"?s.format.subXAxisTick:s.format.xAxisTick;else{const N=Js(e)?l[`subchart_axis_${u}_tick_format`]||l[`axis_${u}_tick_format`]:l[`axis_${u}_tick_format`];ue(N)&&(m=N.bind(s.api))}let S=Js(e)?this.getTickValues(u,!0):this.tick[u];const E=Kr({outerTick:r,noTransition:i,config:l,id:e,tickTextRotate:h,owner:s},c&&{isCategory:f,isInverted:l.axis_x_inverted,tickMultiline:l.axis_x_tick_multiline,tickWidth:l.axis_x_tick_width,tickTitle:f&&l.axis_x_tick_tooltip&&s.api.categories(),orgXScale:s.scale.x});c||(E.tickStepSize=l[`axis_${u}_tick_stepSize`]);const C=new Yv(E).scale(c&&s.scale.zoom||n).orient(d);if(c&&this.isTimeSeries()&&S&&!ue(S)){const N=Kn.bind(s);S=S.map(z=>N(z))}else!c&&this.isTimeSeriesY()&&(C.ticks(l.axis_y_tick_time_value),S=null);S&&C.tickValues(S),C.tickFormat(m||!c&&s.isStackNormalized()&&s.hasAxisGroupedData(u)&&(N=>`${N}%`)),f&&(C.tickCentered(l.axis_x_tick_centered),dr(l.axis_x_tick_culling)&&(l.axis_x_tick_culling=!1));const w=Sa(l,e,"count");return w&&C.ticks(w),C}updateXAxisTickValues(e,n){var r;const i=this.owner,{config:o}=i,s=o.axis_x_tick_fit,l=(u=o.axis_x_tick_count)=>{let f=u,d;return s&&(d=i.mapTargetsToUniqueXs(e),this.isCategorized()&&f>d.length&&(f=d.length),d=this.generateTickValues(d,f,this.isTimeSeries())),d},c=l();if(n)n.tickValues(c);else if(this.x){const u=this.getTickValues("x",!0),f=Sa(o,"subX","count"),d=u!=null?u:f!==o.axis_x_tick_count?l(f):c;this.x.tickValues(c),(r=this.subX)==null||r.tickValues(d)}return c}getId(e){const{config:n,scale:r}=this.owner;let i=n.data_axes[e];return(!i||!r[i])&&(i="y"),i}getXAxisTickFormat(e){const n=this.owner,{config:r,format:i}=n,o=e&&r.subchart_axis_x_tick_format||r.axis_x_tick_format,s=this.isTimeSeries(),l=this.isCategorized();let c;return o?ue(o)?c=o.bind(n.api):s&&(c=u=>u?i.axisTime(o)(u):""):c=s?i.defaultAxisTime:l?n.categoryName:u=>u<0?u.toFixed(0):u,ue(c)?u=>c.apply(n,l?[u,n.categoryName(u)]:[u]):c}getTickValues(e,n=!1){const r=this.owner,i=n?Sa(r.config,`sub${Nn(e)}`,"values"):r.config[`axis_${e}_tick_values`],o=ue(i)?i.call(r.api):i,s=r[`${e}Axis`];return n?o!=null?o:void 0:o||(s?s.tickValues():void 0)}getLabelOptionByAxisId(e){return this.owner.config[`axis_${e}_label`]}getLabelText(e){const n=this.getLabelOptionByAxisId(e);return Ye(n)?n:n?n.text:null}setLabelText(e,n){const r=this.owner,{config:i}=r,o=this.getLabelOptionByAxisId(e);Ye(o)?i[`axis_${e}_label`]=n:o&&(o.text=n)}getLabelPosition(e,n){const r=this.owner.config.axis_rotated,i=this.getLabelOptionByAxisId(e),o=qn(i)&&i.position?i.position:n[+!r],s=l=>!!~o.indexOf(l);return{isInner:s("inner"),isOuter:s("outer"),isLeft:s("left"),isCenter:s("center"),isRight:s("right"),isTop:s("top"),isMiddle:s("middle"),isBottom:s("bottom")}}getAxisLabelPosition(e){return this.getLabelPosition(e,e==="x"?["inner-top","inner-right"]:["inner-right","inner-top"])}xForAxisLabel(e){const n=this.owner,{state:{width:r,height:i}}=n,o=this.getAxisLabelPosition(e);let s=o.isMiddle?-i/2:0;return this.isHorizontal(n,e!=="x")?s=o.isLeft?0:o.isCenter?r/2:r:o.isBottom&&(s=-i),s}textAnchorForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isMiddle?"middle":"end";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"start":r.isCenter?"middle":"end":r.isBottom&&(i="start"),i}dxForAxisLabel(e){const n=this.owner,r=this.getAxisLabelPosition(e);let i=r.isBottom?"0.5em":"0";return this.isHorizontal(n,e!=="x")?i=r.isLeft?"0.5em":r.isRight?"-0.5em":"0":r.isTop&&(i="-0.5em"),i}dyForAxisLabel(e){const n=this.owner,{config:r}=n,i=r.axis_rotated,o=this.getAxisLabelPosition(e).isInner,s=r[`axis_${e}_tick_rotate`]?n.getHorizontalAxisHeight(e):0,{width:l}=this.getMaxTickSize(e);let c;if(e==="x"){const u=r.axis_x_height;i?c=o?"1.2em":-25-l:o?c="-0.5em":u?c=u-10:s?c=s-10:c="3em"}else c={y:["-0.5em",10,"3em","1.2em",10],y2:["1.2em",-20,"-2.2em","-0.5em",15]}[e],i?o?c=c[0]:s?c=s*(e==="y2"?-1:1)-c[1]:c=c[2]:c=o?c[3]:(c[4]+(r[`axis_${e}_inner`]?0:l+c[4]))*(e==="y"?-1:1);return c}getTickFormatCacheValue(e){const n=this.owner,{config:r}=n;return e==="x"?{format:r.axis_x_tick_format,type:r.axis_x_type,localtime:r.axis_x_localtime,categories:r.axis_x_categories}:{format:r[`axis_${e}_tick_format`],normalized:n.isStackNormalized(),grouped:n.hasAxisGroupedData(e),type:r[`axis_${e}_type`]}}getMaxTickSizeFingerprint(e,n,r,i,o,s){var l;const c=this.owner,{config:u,state:f}=c,d=e==="x",h=d?"axis_x":`axis_${e}`,m=i.tickValues();return yu({id:e,withoutRecompute:!!s,dataGeneration:f.dataGeneration,size:[f.current.width,f.current.height],range:(l=n.range)==null?void 0:l.call(n),domain:r,type:n.type,orient:this.orient[e],axisRotated:u.axis_rotated,evalTextSize:u.axis_evalTextSize,format:this.getTickFormatCacheValue(e),ticks:{values:T2(m),rawValues:u[`${h}_tick_values`],arguments:i.ticks(),count:u[`${h}_tick_count`],rotate:o,show:u[`${h}_tick_show`],textShow:u[`${h}_tick_text_show`],textPosition:u[`${h}_tick_text_position`],inner:u[`${h}_tick_inner`],culling:u[`${h}_tick_culling`],cullingMax:u[`${h}_tick_culling_max`],cullingLines:u[`${h}_tick_culling_lines`],cullingReverse:u[`${h}_tick_culling_reverse`],stepSize:!d&&u[`${h}_tick_stepSize`],timeValue:!d&&u[`${h}_tick_time_value`],fit:d&&u.axis_x_tick_fit,autorotate:d&&u.axis_x_tick_autorotate,centered:d&&u.axis_x_tick_centered,inverted:d&&u.axis_x_inverted,multiline:d&&u.axis_x_tick_multiline,width:d&&u.axis_x_tick_width}})}getMaxTickSize(e,n){var r;const i=this.owner,{config:o,state:s,$el:{svg:l,chart:c}}=i,{current:u,resizing:f}=s,d=u.maxTickSize[e],h=`${ke.maxTickSize}_${e}_${!!n}`,m=i.cache.get(h);if(m&&m.generation===s.redrawGeneration)return d;const S=`axis_${e}`,E={width:0,height:0};let C;if(f||n||!o[`${S}_show`]||d.width>0&&i.filterTargetsToShow().length===0)return d;if((l||o.render_mode==="canvas")&&((r=i.scale[e])!=null&&r.copy)){const w=/^y2?$/.test(e),N=i.getTargetsToShow(),z=i.scale[e].copy().domain(i[`get${w?"Y":"X"}Domain`](N,e)),$=z.domain(),G=$[0]===$[1]&&$.every(Tt=>Tt>0),V=en(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(Tt=>Tt>0);if(G||V)return d;d.domain=$,w||xu(d.ticks);const J=this.getAxis(e,z,!1,!1,!0),Q=o[`${S}_tick_rotate`],rt=o[`${S}_tick_count`];if(!o[`${S}_tick_values`]&&rt&&J.tickValues(this.generateTickValues($,rt,w?this.isTimeSeriesY():this.isTimeSeries())),!w&&this.updateXAxisTickValues(N,J),C=this.getMaxTickSizeFingerprint(e,z,$,J,Q,n),(m==null?void 0:m.fingerprint)===C)return i.cache.add(h,v2(g2({},m),{generation:s.redrawGeneration})),R2(d,m.value);const st=J.tickValues(),ct=!w&&Array.isArray(st)&&st.length>Qs;ct&&J.tickValues(y2(st,J.tickFormat()));const dt=c.append("svg").style("visibility","hidden").style("position","fixed").style("top","0").style("left","0"),q=dt.append("g").attr("class",`${Pn[`axis${Nn(e)}`]} ${Ue.dummy}`);J.create(q);const{sizeFor1Char:ft}=q.node(),lt=dt.selectAll("text").attr("transform",le(Q)?`rotate(${Q})`:null),pt=ct?st.length:lt.size();if(ft)lt.each(function(Tt,Rt){const Ct=this.textContent.length*ft.w,Kt=ft.h;E.width=Math.max(E.width,Ct),E.height=Math.max(E.height,Kt),w||(d.ticks[Rt]=Ct)});else{const Tt=[];if(lt.each(function(){Tt.push(this)}),(Tt.length<=5?Tt:p2(Tt)).map(Ct=>cn(Ct,!0)).forEach(Ct=>{E.width=Math.max(E.width,Ct.width),E.height=Math.max(E.height,Ct.height)}),!w)for(let Ct=0;Ct<Tt.length;Ct++)d.ticks[Ct]=E.width}!w&&ct&&b2(d.ticks,pt,E.width),dt.remove()}return Object.keys(E).forEach(w=>{E[w]>0&&(d[w]=E[w])}),i.cache.add(h,{fingerprint:C,generation:s.redrawGeneration,value:I2(d)}),d}getXAxisTickTextY2Overflow(e){const n=this.owner,{axis:r,config:i,state:{current:o,isLegendRight:s,legendItemWidth:l}}=n,c=n.getAxisTickRotate("x"),u=c>0&&c<90;if((r.isCategorized()||r.isTimeSeries())&&i.axis_x_tick_fit&&(!i.axis_x_tick_culling||dr(i.axis_x_tick_culling))&&!i.axis_x_tick_multiline&&u){const f=i.axis_y2_show&&o.maxTickSize.y2.width||0,d=s&&l||0,h=o.width-n.getCurrentPaddingByDirection("left"),m=this.getXAxisTickMaxOverflow(c,h-e)-f-d,S=Math.max(0,m)+e;return Math.min(S,h/2)}return 0}getXAxisTickMaxOverflow(e,n){var r;const i=this.owner,{axis:o,config:s,state:l}=i,c=o.isTimeSeries(),u=l.current.maxTickSize.x.ticks,f=u.length,d=(r=mu(u))!=null?r:l.current.maxTickSize.x.width,{left:h,right:m}=l.axis.x.padding;let S=0;const E=f-(c&&s.axis_x_tick_fit?.5:0);for(let N=0;N<f;N++){const z=N+1,$=Math.cos(Math.PI*e/180)*E2(u,N,d),G=z-(c?1:.5)+h;if(G<=0)continue;const J=(n-$)/G,Q=E-z,rt=m*J,et=Q*J+rt,st=$-J/2-et;S=Math.max(S,st)}const C=i.getTargetsToShow();let w=0;if(!c&&s.axis_x_tick_count<=C.length&&C[0].values.length){const N=da(i.axis.getAxisType("x"),0,n-S).domain([h*-1,i.getXDomainMax(i.data.targets)+1+m]);w=(N(1)-N(0))/2}return S+w}updateLabels(e){const n=this.owner,{config:r,$el:{main:i},$T:o}=n,s=r.axis_rotated;["x","y","y2"].forEach(l=>{const c=this.getLabelText(l),u=`axis${Nn(l)}`,f=Pn[`${u}Label`];if(c){let d=i.select(`text.${f}`);d.empty()&&(d=i.select(`g.${Pn[u]}`).insert("text",":first-child").attr("class",f).attr("transform",["rotate(-90)",null][l==="x"?+!s:+s]).style("text-anchor",()=>this.textAnchorForAxisLabel(l))),o(d,e).attr("x",()=>this.xForAxisLabel(l)).attr("dx",()=>this.dxForAxisLabel(l)).attr("dy",()=>this.dyForAxisLabel(l)).text(c)}})}getPadding(e,n,r,i){const o=le(e)?e:e[n];return Xe(o)?this.owner.convertPixelToScale(/(bottom|top)/.test(n)?"y":"x",o,i):r}generateTickValues(e,n,r){let i=e;if(n){const o=ue(n)?n():n;if(o===1)i=[e[0]];else if(o===2)i=[e[0],e[e.length-1]];else if(o>2){const s=this.isCategorized(),l=o-2,c=e[0],u=e[e.length-1],f=(u-c)/(l+1);let d;i=[c];for(let h=0;h<l;h++)d=+c+f*(h+1),i.push(r?new Date(d):s?Math.round(d):d);i.push(u)}}return r||(i=i.sort((o,s)=>o-s)),i}generateTransitions(e){const n=this.owner,{$el:{axis:r},$T:i}=n,[o,s,l,c,u,f]=["x","y","y2","subX","subY","subY2"].map(d=>i(r[d],e));return{axisX:o,axisY:s,axisY2:l,axisSubX:c,axisSubY:u,axisSubY2:f}}redraw(e,n,r){const i=this.owner,{config:o,state:s,$el:l}=i,c=n?"0":null;["x","y","y2","subX","subY","subY2"].forEach(u=>{const f=this[u],d=l.axis[u];f&&d&&(!r&&!o.transition_duration&&(f.config.withoutTransition=!0),d.style("opacity",c),f.create(e[`axis${Nn(u)}`]))}),this.updateAxes(),!s.rendered&&o.axis_tooltip&&this.setAxisTooltip()}syncAxisDomains(e,n,r){var i;const o=this.owner,{config:s,scale:l,$el:c}=o,u=!!l.zoom;let f;if(!u&&this.isCategorized()&&e.length===0&&c.axis.x&&l.x.domain([0,c.axis.x.selectAll(".tick").size()]),l.x&&e.length?(!u&&o.updateXDomain(e,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),s.axis_x_tick_values||this.updateXAxisTickValues(e)):this.x&&(this.x.tickValues([]),(i=this.subX)==null||i.tickValues([])),s.zoom_rescale&&!r&&(f=l.x.orgDomain()),["y","y2"].forEach(d=>{const h=`axis_${d}_`,m=l[d];if(m){const S=s[`${h}tick_values`],E=s[`${h}tick_count`];if(m.domain(o.getYDomain(e,d,f)),!S&&E){const C=o.axis[d],w=m.domain();C.tickValues(this.generateTickValues(w,w.every(N=>N===0)?1:E,this.isTimeSeriesY()))}}}),n.Y){const d=()=>{var h,m;(h=l.subY)==null||h.domain(o.getYDomain(e,"y")),(m=l.subY2)==null||m.domain(o.getYDomain(e,"y2")),["y","y2"].forEach(S=>{const E=S==="y2"?"subY2":"subY",C=l[E],w=o.axis[E],N=this.getTickValues(S,!0),z=Sa(s,E,"count");if(!C||!w||N||!z)return;const $=C.domain();w.tickValues(this.generateTickValues($,$.every(G=>G===0)?1:z,this.isTimeSeriesY()))})};s.subchart_show?o.withSubchartTypeContext(d):d()}}redrawAxis(e,n,r,i,o){const s=this.owner;this.syncAxisDomains(e,n,i),this.redraw(r,s.hasArcType(),o),this.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis||n.Y)&&e.length&&this.setCulling()}setCulling(){const e=this.owner,{config:n,state:{clip:r,current:i},$el:o}=e;["subX","x","y","y2","subY","subY2"].forEach(s=>{const l=o.axis[s],c=Sa(n,s,"culling");if(l&&c){const u=l.selectAll(".tick"),f=ti(u.data(),!Sa(n,s,"culling_reverse")),d=f.length,h=Sa(n,s,"culling_max"),S=!Sa(n,s,"culling_lines")||x2(this[s],f,m2(u));let E;if(d){for(let w=1;w<d;w++)if(d/w<h){E=w;break}E=E!=null?E:d;const C=new Map;for(let w=0;w<f.length;w++)C.set(f[w],w);u.each(function(w){var N;const z=S?this:this.querySelector("text");z&&(z.style.display=((N=C.get(w))!=null?N:0)%E?"none":null)})}else u.style("display",null);if(s==="x"){const C=i.maxTickSize.x.clipPath?r.pathXAxisTickTexts:null;o.svg.selectAll(`.${Pn.axisX} .tick text`).attr("clip-path",C)}}})}setAxisTooltip(){var e;const n=this.owner,{config:{axis_rotated:r,axis_tooltip:i},$el:{axis:o,axisTooltip:s}}=n,l=(e=i.backgroundColor)!=null?e:"black";n.generateTextBGColorFilter(l,{x:-.15,y:-.2,width:1.3,height:1.3}),["x","y","y2"].forEach(c=>{var u,f,d;if(Ye(l)||l[c])if(s[c]=(u=o[c])==null?void 0:u.append("text").classed(Pn[`axis${c.toUpperCase()}Tooltip`],!0).attr("filter",n.updateTextBGColor({id:c},l)),r){const h=c==="x"?"x":"y",m=c==="y"?"1.15em":c==="x"?"-0.3em":"-0.4em";(f=s[c])==null||f.attr(h,m).attr(`d${c==="x"?"y":"x"}`,c==="x"?"0.4em":"-1.3em").style("text-anchor",c==="x"?"end":null)}else{const h=c==="x"?"y":"x",m=c==="x"?"1.15em":`${c==="y"?"-":""}0.4em`;(d=s[c])==null||d.attr(h,m).attr(`d${c==="x"?"x":"y"}`,c==="x"?"-1em":"0.3em").style("text-anchor",c==="y"?"end":null)}})}}var Qv=Math.pow,P2={initEventRect(){this.$el.main.select(`.${Ue.chart}`).append("g").attr("class",ea.eventRects).style("fill-opacity","0")},redrawEventRect(){var t;const e=this,{config:n,state:r,$el:i}=e,o=e.isMultipleX(),s=n.axis_x_inverted;if(i.eventRect)e.updateEventRect(i.eventRect,!0);else if(e.data.targets.length){const c=e.$el.main.select(`.${ea.eventRects}`).style("cursor",n.zoom_enabled&&n.zoom_type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(ea.eventRectsMultiple,o).classed(ea.eventRectsSingle,!o).selectAll(`.${ea.eventRect}`).data([0]).enter().append("rect");e.updateEventRect(c),e.updateEventType(c),c.call(e.getDraggableSelection()),i.eventRect=c,e.state.inputType==="touch"&&!i.svg.on("touchstart.eventRect")&&!e.hasArcType()&&e.bindTouchOnEventRect(),r.rendered&&e.updateEventRect(i.eventRect,!0)}if(!o){const l=e.getMaxDataCountTarget();(!n.data_xSort||s)&&l.sort((c,u)=>s?u.x-c.x:c.x-u.x),e.updateDataIndexByX(l),e.updateXs(l),(t=e.updatePointClass)==null||t.call(e,!0),r.eventReceiver.data=l}e.updateEventRectData()},bindTouchOnEventRect(){const t=this,{config:e,state:n,$el:{eventRect:r,svg:i}}=t,o=m=>{if(t.isMultipleX())t.selectRectForMultipleXs(m);else{const S=t.getDataIndexFromEvent(n.event);t.callOverOutForTouch(S),S===-1?t.unselectRect():t.selectRectForSingle(m,S)}},s=()=>{t.unselectRect(),t.callOverOutForTouch()},l=e.interaction_inputType_touch.preventDefault,c=Pa(l)&&l||!1,u=!isNaN(l)&&l||null;let f;const d=!c&&u===null,h=m=>{const S=m.type,C=m.changedTouches[0][`client${e.axis_rotated?"Y":"X"}`];S==="touchstart"?c?m.preventDefault():u!==null&&(f=C):S==="touchmove"&&(c||f===!0||u!==null&&Math.abs(f-C)>=u)&&(f=!0,m.preventDefault())};r.on("touchstart",m=>{n.event=m,t.updateEventRect()},{passive:d}).on("touchstart.eventRect touchmove.eventRect",m=>{if(n.event=m,!r.empty()&&r.classed(ea.eventRect)){if(n.dragging||n.flowing||t.hasArcType()||m.touches.length>1)return;h(m),o(r.node())}else s()},{passive:d}).on("touchend.eventRect",m=>{n.event=m,!r.empty()&&r.classed(ea.eventRect)&&(t.hasArcType()||!t.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)},{passive:d}),i.on("touchstart",m=>{n.event=m;const{target:S}=m;S&&S!==r.node()&&s()},{passive:d})},updateEventRect(t,e=!1){const n=this,{state:r,$el:i}=n,{eventReceiver:o,width:s,height:l,rendered:c,resizing:u}=r,f=t||i.eventRect,d=()=>{if(o){const h=Ah(i.chart.node());o.rect=cn(f.node(),!0).toJSON(),o.rect.top+=h.y,o.rect.left+=h.x}};(!c||u||e)&&(f.attr("x",0).attr("y",0).attr("width",s).attr("height",l),(!c||e)&&f.classed(ea.eventRect,!0)),d()},updateEventType(t){const e=this,n=Pa(t),r=n?e.$el.eventRect:t,i=n?t!==(r==null?void 0:r.datum().multipleX):!1;r&&(i&&(r==null||r.on("mouseover mousemove mouseout click",null)),e.isMultipleX()?e.generateEventRectsForMultipleXs(r):e.generateEventRectsForSingleX(r))},updateEventRectData(){const t=this,{config:e,scale:n,state:r}=t,i=n.zoom||n.x,o=e.axis_rotated,s=t.isMultipleX(),l=i==null?void 0:i.domain(),c=l?`${l[0]}_${l[1]}_${r.width}_${r.height}_${t.data.targets.length}_${r.dataGeneration}_${[...r.hiddenTargetIds].join(",")}`:null;if(c&&c===r._eventRectFingerprint)return;r._eventRectFingerprint=c;let u,f,d,h;if(t.updateEventType(s),s)u=0,f=0,d=r.width,h=r.height;else{let E,C;if(t.axis.isCategorized())E=t.getEventRectWidth(),C=w=>i(w.x)-E/2;else{const w=({index:N})=>({prev:t.getPrevX(N),next:t.getNextX(N)});E=N=>{const z=w(N),$=i.domain();let G;return z.prev===null&&z.next===null?G=o?r.height:r.width:z.prev===null?G=(i(z.next)+i(N.x))/2:z.next===null?G=i($[1])-(i(z.prev)+i(N.x))/2:G=Math.max(0,(i(z.next)-i(z.prev))/2),G},C=N=>{const z=w(N);let $;return z.prev===null&&z.next===null?$=0:z.prev===null?$=i(i.domain()[0]):$=(i(N.x)+i(z.prev))/2,$}}u=o?0:C,f=o?C:0,d=o?r.width:E,h=o?E:r.height}const{eventReceiver:m}=r,S=(E,C)=>ue(E)?E(C):E;m.coords.splice(m.data.length),m.data.forEach((E,C)=>{m.coords[C]={x:S(u,E),y:S(f,E),w:S(d,E),h:S(h,E)}})},selectRectForSingle(t,e){var n,r,i,o,s,l,c;const u=this,{config:f,state:d,$el:{main:h,circle:m}}=u,S=f.data_selection_enabled,E=f.data_selection_grouped,C=f.data_selection_isselectable,w=f.tooltip_grouped,N=u.getAllValuesOnIndex(e);if(w&&(u.showTooltip(N,t),(n=u.showGridFocus)==null||n.call(u,N),(r=u.showSubchartGridFocus)==null||r.call(u,N),!S||E))return;!m&&h.selectAll(`.${Ue.EXPANDED}:not(.${An.shape}-${e})`).classed(Ue.EXPANDED,!1);const z=h.selectAll(`.${An.shape}-${e}`).classed(Ue.EXPANDED,!0).style("cursor",C?"pointer":null).filter(function($){return u.isWithinShape(this,$)});if(z.call($=>{var G,V,J;const Q=$.data();S&&(E||C!=null&&C.bind(u.api)(Q))&&(t.style.cursor="pointer"),w||(u.showTooltip(Q,t),(G=u.showGridFocus)==null||G.call(u,Q),(V=u.showSubchartGridFocus)==null||V.call(u,Q),(J=u.unexpandCircles)==null||J.call(u),$.each(rt=>u.setExpand(e,rt.id)))}),!w&&z.empty()){const $=er(d.event,t),G=N.filter(V=>u.isTargetToShow(V.id)?u.dist(V,$)<u.getPointSensitivity(V):!1);if(G.length>0){let V=G[0],J=u.dist(V,$);for(let Q=1;Q<G.length;Q++){const rt=G[Q],et=u.dist(rt,$);et<J&&(J=et,V=rt)}u.showTooltip([V],t),(i=u.showGridFocus)==null||i.call(u,[V]),(o=u.showSubchartGridFocus)==null||o.call(u,[V]),(s=u.unexpandCircles)==null||s.call(u),u.setExpand(e,V.id,!0),S&&(E||C!=null&&C.bind(u.api)(V))&&(t.style.cursor="pointer")}else f.interaction_onout&&((l=u.hideGridFocus)==null||l.call(u),(c=u.hideSubchartGridFocus)==null||c.call(u),u.hideTooltip(),!E&&u.setExpand(e))}},selectRectForMultipleXs(t,e=!0){var n,r;const i=this,{config:o,state:s}=i,l=i.getTargetsToShow();if(s.dragging||i.hasArcType(l))return;const c=er(s.event,t),u=i.findClosestFromTargets(l,c);if(e&&s.mouseover&&(!u||u.id!==s.mouseover.id)&&(o.data_onout.call(i.api,s.mouseover),s.mouseover=void 0),!u){i.unselectRect();return}const d=(i.isBubbleType(u)||i.isScatterType(u)||!o.tooltip_grouped?[u]:i.filterByX(l,u.x)).map(m=>i.addName(m));i.showTooltip(d,t),i.setExpand(u.index,u.id,!0),(n=i.showGridFocus)==null||n.call(i,d),(r=i.showSubchartGridFocus)==null||r.call(i,d);const h=i.dist(u,c);(i.isBarType(u.id)||h<i.getPointSensitivity(u))&&(i.$el.eventRect.style("cursor","pointer"),e&&(!s.mouseover||s.mouseover.x!==u.x||s.mouseover.id!==u.id)&&(o.data_onover.call(i.api,u),s.mouseover=u))},unselectRect(){var t,e,n,r;const i=this,{state:o,$el:{circle:s,tooltip:l}}=i;if(o._lastTooltipMouse=null,o.isCanvasMode){(t=i.clearCanvasFocus)==null||t.call(i),l&&i.hideTooltip();return}(e=i.$el.eventRect)==null||e.style("cursor",null),(n=i.hideGridFocus)==null||n.call(i),(r=i.hideSubchartGridFocus)==null||r.call(i),l&&(i.hideTooltip(),i._handleLinkedCharts(!1)),s&&!i.isPointFocusOnly()&&i.unexpandCircles(),i.expandBarTypeShapes(!1)},generateEventRectsForSingleX(t){const e=this,{config:n,state:r}=e,{eventReceiver:i}=r,o=t.style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(s){r.event=s;const{currentIdx:l,data:c}=i,u=c[l===-1?e.getDataIndexFromEvent(s):l];e.clickHandlerForSingleX.bind(this)(u,e)}).datum({multipleX:!1});if(r.inputType==="mouse"){const s=l=>{const c=l?e.getDataIndexFromEvent(l):i.currentIdx;return c>-1?i.data[c]:null};o.on("mouseover",l=>{r.event=l,e.updateEventRect(),Object.values(e.$el.axisTooltip).forEach(c=>c==null?void 0:c.style("display",null))}).on("mousemove",function(l){var c;const u=s(l);if(r.event=l,!u)return;let{index:f}=u;const d=n.line_step_type;if(n.line_step_tooltipMatch&&e.hasType("step")&&/^step\-(before|after)$/.test(d)){const m=e.scale.zoom||e.scale.x,S=e.axis.xs[f],E=m.invert(er(l,this)[0]);d==="step-after"&&E<S?f-=1:d==="step-before"&&E>S&&(f+=1)}(c=e.showAxisGridFocus)==null||c.call(e);const h=n.tooltip_grouped&&f===i.currentIdx;if(r.dragging||r.flowing||e.hasArcType()||h){if(n.tooltip_show&&h){const[m,S]=er(l,this),E=r._lastTooltipMouse;(!E||Qv(m-E[0],2)+Qv(S-E[1],2)>=9)&&(r._lastTooltipMouse=[m,S],e.setTooltipPosition())}return}f!==i.currentIdx&&(e.setOverOut(!1,i.currentIdx),i.currentIdx=f),f===-1?e.unselectRect():e.selectRectForSingle(this,f),e.setOverOut(f!==-1,f)}).on("mouseout",l=>{var c;r.event=l,!(!e.config||e.hasArcType()||i.currentIdx===-1||!n.interaction_onout)&&((c=e.hideAxisGridFocus)==null||c.call(e),e.unselectRect(),e.setOverOut(!1,i.currentIdx),i.currentIdx=-1)})}return o},clickHandlerForSingleX(t,e){const n=e,{config:r,state:i,$el:{main:o}}=n;if(!t||n.hasArcType()||i.cancelClick){i.cancelClick&&(i.cancelClick=!1);return}const{index:s}=t;o.selectAll(`.${An.shape}-${s}`).each(function(l){var c;(r.data_selection_grouped||n.isWithinShape(this,l))&&((c=n.toggleShape)==null||c.call(n,this,l,s),r.data_onclick.bind(n.api)(l,this))})},generateEventRectsForMultipleXs(t){const e=this,{config:n,state:r}=e;t.on("click",function(i){r.event=i,e.clickHandlerForMultipleXS.bind(this)(e)}).datum({multipleX:!0}),r.inputType==="mouse"&&t.on("mouseover mousemove",function(i){r.event=i,e.selectRectForMultipleXs(this)}).on("mouseout",i=>{r.event=i,!(!e.config||e.hasArcType()||!n.interaction_onout)&&e.unselectRect()})},clickHandlerForMultipleXS(t){const e=t,{config:n,state:r}=e,i=e.getTargetsToShow();if(e.hasArcType(i))return;const o=er(r.event,this),s=e.findClosestFromTargets(i,o);if(!s)return;const l=e.getPointSensitivity(s);(e.isBarType(s.id)||e.dist(s,o)<l)&&e.$el.main.selectAll(`.${An.shapes}${e.getTargetSelectorSuffix(s.id)}`).selectAll(`.${An.shape}-${s.index}`).each(function(){var c;(n.data_selection_grouped||e.isWithinShape(this,s))&&((c=e.toggleShape)==null||c.call(e,this,s,s.index),n.data_onclick.bind(e.api)(s,this))})}},M2={initClip(){const t=this,{clip:e,datetimeId:n}=t.state;e.id=`${n}-clip`,e.idXAxis=`${e.id}-xaxis`,e.idYAxis=`${e.id}-yaxis`,e.idGrid=`${e.id}-grid`,e.path=t.getClipPath(e.id),e.pathXAxis=t.getClipPath(e.idXAxis),e.pathYAxis=t.getClipPath(e.idYAxis),e.pathGrid=t.getClipPath(e.idGrid)},getClipPath(t){const e=this,{config:n}=e;return!n.clipPath&&/-clip$/.test(t)||!n.axis_x_clipPath&&/-clip-xaxis$/.test(t)||!n.axis_y_clipPath&&/-clip-yaxis$/.test(t)?null:`url(#${t})`},appendClip(t,e){e&&t.append("clipPath").attr("id",e).append("rect")},setXAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:o}}=e,s=n.axis_rotated,l=Math.max(30,r.left)-(s?0:20),c=(s?r.top+o+10:r.bottom)+20,u=s?-(1+l):-(l-1),f=-15,d=s?r.left+20:i+10+l;t.attr("x",u).attr("y",f).attr("width",d).attr("height",c)},setYAxisClipPath(t){const e=this,{config:n,state:{margin:r,width:i,height:o}}=e,s=n.axis_rotated,l=Math.max(30,r.left)-(s?20:0),c=n.axis_y_inner,u=c&&!s?n.axis_y_label.text?-20:-1:s?-(1+l):-(l-1),f=-(s?20:r.top),d=(s?i+15+l:r.left+20)+(c?20:0),h=(s?r.bottom+10:r.top+o)+10;t.attr("x",u).attr("y",f).attr("width",d).attr("height",h)},updateXAxisTickClip(){const t=this,{config:e,state:{clip:n,xAxisHeight:r},$el:{defs:i}}=t,o=t.getHorizontalAxisHeight("x");if(i&&!n.idXAxisTickTexts){const s=`${n.id}-xaxisticktexts`;t.appendClip(i,s),n.idXAxisTickTexts=s,n.pathXAxisTickTexts=t.getClipPath(n.idXAxisTickTexts)}!e.axis_x_tick_multiline&&t.getAxisTickRotate("x")&&o!==r&&(t.setXAxisTickClipWidth(),t.setXAxisTickTextClipPathWidth()),t.state.xAxisHeight=o},setXAxisTickClipWidth(){const t=this,{config:e,state:{current:{maxTickSize:n}}}=t,r=t.getAxisTickRotate("x");if(!e.axis_x_tick_multiline&&r){const i=Math.sin(Math.PI/180*Math.abs(r));n.x.clipPath=(t.getHorizontalAxisHeight("x")-20)/i}else n.x.clipPath=null},setXAxisTickTextClipPathWidth(){const t=this,{state:{clip:e,current:n},$el:{svg:r}}=t;r&&r.select(`#${e.idXAxisTickTexts} rect`).attr("width",n.maxTickSize.x.clipPath).attr("height",30)}},L2={getAxisSize(t){const e=this,n=e.config.axis_rotated;return n&&t==="x"||!n&&/y2?/.test(t)?e.getAxisWidthByAxisId(t,!0):e.getHorizontalAxisHeight(t)},getAxisWidthByAxisId(t,e){var n,r;const i=this;if(i.axis){const o=(n=i.axis)==null?void 0:n.getAxisLabelPosition(t),{width:s}=i.axis.getMaxTickSize(t,e),l=s===0?.5:0;return s+(((r=i.config.padding)==null?void 0:r.mode)==="fit"?o.isInner?10+l:10:o.isInner?20+l:40)}else return 40},getHorizontalAxisHeight(t){var e,n;const r=this,{config:i,state:o}=r,{rotatedPadding:s,isLegendRight:l,isLegendInset:c}=o,u=i.axis_rotated,f=((e=i.padding)==null?void 0:e.mode)==="fit",d=i[`axis_${t}_inner`],h=i[`axis_${t}_label`].text,m=13;let S=((n=i.padding)==null?void 0:n.mode)==="fit"?d&&!h?t==="y"?1:0:20:30;if(t==="x"&&!i.axis_x_show)return 8;if(t==="x"&&le(i.axis_x_height))return i.axis_x_height;if(t==="y"&&!i.axis_y_show)return i.legend_show&&!l&&!c?10:1;if(t==="y2"&&!i.axis_y2_show)return f?0:s.top;const E=r.axis.getMaxTickSize(t),C=Math.abs(i.axis_x_tick_rotate)>0&&(!i.axis_x_tick_autorotate||r.needToRotateXAxisTickTexts());return(i.axis_x_tick_multiline||C)&&E.height>m&&(S+=E.height-m),S+(r.axis.getAxisLabelPosition(t).isInner?0:10)+(t==="y2"&&!u?-10:0)},getEventRectWidth(){const t=this,{config:e,axis:n}=t,r=e.axis_x_inverted,i=n.x.tickInterval();return Math.max(0,r?Math.abs(i):i)},getAxisTickRotate(t){const e=this,{axis:n,config:r,state:i,$el:o}=e;let s=r[`axis_${t}_tick_rotate`];if(t==="x"){const l=n.isCategorized()||n.isTimeSeries();if(r.axis_x_tick_fit&&l){const c=r.axis_x_tick_count,u=i.current.maxTickSize.x.ticks.length;let f=0;if(c?f=c>u?u:c:u&&(f=u),f!==i.axis.x.tickCount){const{targets:d}=e.data;i.axis.x.padding=e.getXDomainPadding([e.getXDomainMinMax(d,"min"),e.getXDomainMinMax(d,"max")],f)}i.axis.x.tickCount=f}(o.svg||i.isCanvasMode)&&r.axis_x_tick_autorotate&&r.axis_x_tick_fit&&!r.axis_x_tick_multiline&&!r.axis_x_tick_culling&&l&&(s=e.needToRotateXAxisTickTexts()?r.axis_x_tick_rotate:0)}return s},needToRotateXAxisTickTexts(){const t=this,{state:{axis:e,current:n,isLegendRight:r,legendItemWidth:i}}=t,o=r&&i,s=n.width-o-t.getCurrentPaddingByDirection("left")-t.getCurrentPaddingByDirection("right"),l=e.x.tickCount+e.x.padding.left+e.x.padding.right,{width:c}=t.axis.getMaxTickSize("x"),u=l?s/l:0;return c>u}},D2={axis_x_clipPath:!0,axis_x_show:!0,axis_x_forceAsSingle:!1,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_culling_lines:!0,axis_x_tick_culling_reverse:!1,axis_x_tick_count:void 0,axis_x_tick_inner:!1,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_inner:!1,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_autorotate:!1,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_inverted:!1,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[]},F2={axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:"indexed",axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_culling:!1,axis_y_tick_culling_max:5,axis_y_tick_culling_lines:!0,axis_y_tick_culling_reverse:!1,axis_y_tick_inner:!1,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_stepSize:null,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[]},N2={axis_y2_clipPath:!0,axis_y2_show:!1,axis_y2_type:"indexed",axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_culling:!1,axis_y2_tick_culling_max:5,axis_y2_tick_culling_lines:!0,axis_y2_tick_culling_reverse:!1,axis_y2_tick_inner:!1,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_rotate:0,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_stepSize:null,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[]},$2=Object.defineProperty,_v=Object.getOwnPropertySymbols,B2=Object.prototype.hasOwnProperty,z2=Object.prototype.propertyIsEnumerable,qv=(t,e,n)=>e in t?$2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,bu=(t,e)=>{for(var n in e||(e={}))B2.call(e,n)&&qv(t,n,e[n]);if(_v)for(var n of _v(e))z2.call(e,n)&&qv(t,n,e[n]);return t},U2=bu(bu(bu({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},D2),F2),N2),k2={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1};const G2=[t2,e2,n2],tp={axis:w2,clip:M2,eventrect:P2,sizeAxis:L2},ep={optDataAxis:k2,optAxis:U2};function np(t){return Object.keys(t).map(e=>t[e])}function rp(t=[],e=[]){bn(Ir.prototype,np(tp).concat(t)),bn(Jn.prototype,G2),Ua.setOptions(np(ep).concat(e))}function mo(t=[],e=[]){rp(t,e)}function sa(t,e=[]){const n=Array.isArray(t)?t:t?[t]:[];rp([Ti,Ys,_C].concat(n),[Wa,qC].concat(e))}let ap=()=>(sa(xi,[yi]),(ap=()=>kt.AREA)()),ip=()=>(sa(xi,[yi]),(ip=()=>kt.AREA_LINE_RANGE)()),op=()=>(sa(xi,[yi]),(op=()=>kt.AREA_STEP_RANGE)()),sp=()=>(sa(xi,[yi,hu]),(sp=()=>kt.AREA_SPLINE)()),lp=()=>(sa(xi,[yi,hu]),(lp=()=>kt.AREA_SPLINE_RANGE)()),cp=()=>(sa(xi,[yi]),(cp=()=>kt.AREA_STEP)());function Su(t){const e=this.config.bar_connectLine,n=(e==null?void 0:e[t])||e;return/^(start|end)\-(start|end)$/.test(n)?n:null}var X2={initBar(){const{$el:t,config:e,state:{clip:n}}=this;t.bar=t.main.select(`.${Ue.chart}`),t.bar=e.bar_front?t.bar.append("g"):t.bar.insert("g",":first-child"),t.bar.attr("class",lr.chartBars).call(this.setCssRule(!1,`.${lr.chartBars}`,["pointer-events:none"])),e.clipPath===!1&&(e.bar_radius||e.bar_radius_ratio)&&t.bar.attr("clip-path",n.pathXAxis.replace(/#[^)]*/,`#${n.id}`))},updateTargetsForBar(t){const e=this,{config:n}=e,r=e.getClass("bars",!0),i=n.interaction_enabled&&n.data_selection_isselectable;eu.call(e,t,{type:"Bar",elKey:"bar",containerClass:lr.chartBars,itemClass:lr.chartBar,initFn:e.initBar}).append("g").attr("class",r).style("cursor",s=>{var l;return(l=i==null?void 0:i.bind)!=null&&l.call(i,e.api)(s)?"pointer":null}).call(s=>{e.setCssRule(!0,` .${lr.bar}`,["fill"],e.color)(s),s.each(function(l){Su.call(e,l.id)&&Ut(this).append("path").attr("class",lr.barConnectLine)})})},updateBar(t,e=!1){const n=this;if(n.state.isCanvasMode)return;const{config:r,$el:i,$T:o}=n,s=e?i.subchart:i,l=n.getClass("bar",!0),c=n.initialOpacity.bind(n);r.bar_linearGradient&&n.updateLinearGradient();const u=s.main.selectAll(`.${lr.bars}`).selectAll(`.${lr.bar}`).data(n.labelishData.bind(n));o(u.exit(),t).style("opacity","0").remove(),s.bar=u.enter().append("path").attr("class",l).style("fill",n.generateUpdateBarColor()).merge(u).style("opacity",c),n.setRatioForGroupedData(s.bar.data())},generateUpdateBarColor(){const t=this,e=t.getStylePropValue(t.color)||(()=>null);return n=>Gg.call(t,n,"bar_linearGradient",e)},updateBarColor(t){return this.generateUpdateBarColor()(t)},redrawBar(t,e,n=!1){const r=this;if(r.state.isCanvasMode)return[];const{bar:i}=n?r.$el.subchart:r.$el,o=[],s=new Map,l=as(r),c=r.generateUpdateBarColor(),u=function(d,h,m){var S;const C=le(d.value)||r.isBarRangeType(d)||((S=r.isSubchartCandlestickBarValue)==null?void 0:S.call(r,d,n))?t(d,h):[""];let w=s.get(d.id);if(w===void 0&&(w=Su.call(r,d.id),s.set(d.id,w)),C.length>1&&o.push(C[1]),h===m.length-1&&o.length){const N=r.$T(Ut(this.parentNode.querySelector(`.${lr.barConnectLine}`)),e,Pr());r.updateConnectLine(N,w,o),o.splice(0)}return C[0]},f=r.$T(i,e,Pr());return l&&typeof f.attrTween=="function"?f.attrTween("d",function(d,h,m){var S;const E=u.call(this,d,h,m);return B0((S=this.getAttribute("d"))!=null?S:"",E)}):f.attr("d",u),[f.style("fill",d=>{var h;return((h=r.getSubchartCandlestickBarColor)==null?void 0:h.call(r,d,n))||c(d)}).style("clip-path",d=>d.clipPath).style("opacity",null)]},generateDrawBar(t,e){const n=this,{config:r}=n,i=n.generateGetBarPoints(t,e),o=as(n),s=o?tc(n):new Set,l=new Map;return(c,u)=>{const f=i(c,u),{indexX:d,indexY:h,isNegative:m,pos:S,radius:E,clipPath:C}=ec(n,c,f,o,s,n.isStackingRadiusData.bind(n)),w=["",""];if(c.clipPath=C,o){const G=`a${E} ${E} ${m?"1 0 0":"0 0 1"} `;w[h]=`${G}${E},${E}`,w[d]=`${G}${[-E,E][r.axis_rotated?"sort":"reverse"]()}`,m&&w.reverse()}const N=r.axis_rotated?`H${S} ${w[0]}V${f[2][h]-E} ${w[1]}H${f[3][d]}`:`V${S} ${w[0]}H${f[2][d]-E} ${w[1]}V${f[3][h]}`,z=[`M${f[0][d]},${f[0][h]}${N}z`];let $=l.get(c.id);return $===void 0&&($=Su.call(n,c.id),l.set(c.id,$)),$&&z.push(r.axis_rotated?{x:f[0][d],y:f[0][h],width:f[0][d]-S,height:f[2][h]-f[0][h]}:{x:f[0][d],y:S,width:f[2][d]-f[0][d],height:f[3][h]-S}),z}},isStackingRadiusData(t){const e=this,{$el:n,config:r,data:i,state:o}=e,{id:s,index:l,value:c}=t;if(o.hiddenTargetIds.has(s)){const h=n.bar.filter(m=>m.id===s&&m.value===c);return!h.empty()&&/a\d+/i.test(h.attr("d"))}const u=r.data_groups.find(h=>h.indexOf(s)>-1),d=e.orderTargets(e.filterTargetsToShow(i.targets.filter(e.isBarType,e))).filter(h=>u.indexOf(h.id)>-1).map(h=>{const m=h.values[l];if(m&&(le(c)&&c>0?m.value>0:m.value<0))return m}).filter(Boolean).map(h=>h.id);return c!==0&&d.indexOf(s)===d.length-1},updateConnectLine(t,e,n){const r=n.map((i,o,s)=>{const l=this.config.axis_rotated,c=/^start-(start|end)$/.test(e),u=/^end-(start|end)$/.test(e),f=[],d=l?u?i.x-i.width:i.x:i.x+i.width,h=l||c?i.y+i.height:i.y;return o===0?f.push(`${d},${h}`):(f.push(l?`L${i.x-(/\w+-end$/.test(e)?i.width:0)},${i.y}`:`L${i.x},${i.y+(/\w+-start$/.test(e)?i.height:0)}`),o<s.length-1&&f.push(`M${d},${h}`)),f.join(" ")});t.attr("d",`M${r.join("")}z`)}},W2={bar_connectLine:!1,bar_front:!1,bar_indices_removeNull:!1,bar_label_threshold:0,bar_linearGradient:!1,bar_overlap:!1,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0};let up=()=>(mo([X2,Ti],[W2,Wa]),(up=()=>kt.BAR)());var V2={initBubble(){const t=this,{config:e}=t;t.hasType("bubble")&&(e.point_show=!0,e.point_type="circle")},getBaseLength(){const t=this,{width:e,height:n}=t.state,r=ke.bubbleBaseLength;let i=t.cache.get(r);return i||t.cache.add(r,i=br("min",[e,n])),i},getBubbleR(t){const e=this;let n=e.config.bubble_maxR;ue(n)?n=n.bind(e.api)(t):le(n)||(n=e.getBaseLength()/(e.getMaxDataCount()*2)+12);const r=ke.bubbleMaxValue;let i=e.cache.get(r);i===null&&e.cache.add(r,i=br("max",e.getMinMaxData().max.map(l=>e.isBubbleZType(l)?e.getBubbleZData(l.value,"y"):Ke(l.value)?l.value.mid:l.value)));const o=n*n*Math.PI,s=(e.isBubbleZType(t)?e.getBubbleZData(t.value,"z"):t.value)*(o/i);return Math.sqrt(s/Math.PI)},getBubbleZData(t,e){return Ke(t)?t[e]:t[e==="y"?0:1]}},j2=V2,H2={bubble_maxR:35,bubble_zerobased:!1};let fp=()=>(mo([Ti,Ys,j2],[H2,Wa]),(fp=()=>kt.BUBBLE)());var Y2=Object.defineProperty,dp=Object.getOwnPropertySymbols,K2=Object.prototype.hasOwnProperty,Z2=Object.prototype.propertyIsEnumerable,hp=(t,e,n)=>e in t?Y2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,J2=(t,e)=>{for(var n in e||(e={}))K2.call(e,n)&&hp(t,n,e[n]);if(dp)for(var n of dp(e))Z2.call(e,n)&&hp(t,n,e[n]);return t},Q2={generateGetCandlestickPoints(t,e=!1){const n=this,r=e?n.axis.subX:n.axis.x,i=n.getIndicesMax(t)+1,o=n.getBarW("candlestick",r,i),s=n.getShapeX(o,t,!!e),l=n.getShapeY(!!e),c=n.getShapeOffset(n.isCandlestickType,t,!!e),u=n.getYScaleById.bind(n);return(f,d)=>{const h=u.call(n,f.id,e)(n.getShapeYMin(f.id,e)),m=c(f,d)||h,S=le(o)?o:o[f.id]||o._$width,E=n.getCandlestickData(f);let C;if(E&&le(E.open)&&le(E.close)){const w={start:s(f),end:0};w.end=w.start+S;const N={start:l(E.open),end:l(E.close)},z={x:w.start+S/2,high:l(E.high),low:l(E.low)},$=h-m;N.start-=$,N.end-=$,z.high-=$,z.low-=$,C=[[w.start,N.start],[w.end,N.end],[z.x,z.low,z.high]]}else C=[[0,0],[0,0],[0,0,0]];return C}},getCandlestickData({value:t}){let e;if(en(t)){const[n,r,i,o,s=!1]=t;e={open:n,high:r,low:i,close:o},s!==!1&&(e.volume=s)}else Ke(t)&&(e=J2({},t));return e&&(e._isUp=e.close>=e.open),e||null}},_2=Object.defineProperty,q2=Object.defineProperties,tI=Object.getOwnPropertyDescriptors,gp=Object.getOwnPropertySymbols,eI=Object.prototype.hasOwnProperty,nI=Object.prototype.propertyIsEnumerable,vp=(t,e,n)=>e in t?_2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,rI=(t,e)=>{for(var n in e||(e={}))eI.call(e,n)&&vp(t,n,e[n]);if(gp)for(var n of gp(e))nI.call(e,n)&&vp(t,n,e[n]);return t},aI=(t,e)=>q2(t,tI(e)),iI=aI(rI({},Q2),{initCandlestick(){Xg.call(this,{elKey:"candlestick",className:ta.chartCandlesticks})},updateTargetsForCandlestick(t){eu.call(this,t,{type:"Candlestick",elKey:"candlestick",containerClass:ta.chartCandlesticks,itemClass:ta.chartCandlestick,initFn:this.initCandlestick,withFocus:!1,withStyles:!1}).style("pointer-events","none")},updateCandlestick(t,e=!1){const n=this,{$el:r,$T:i}=n,o=e?r.subchart:r,s=n.getClass("candlestick",!0),l=n.initialOpacity.bind(n),c=o.main.selectAll(`.${ta.chartCandlestick}`).selectAll(`.${ta.candlestick}`).data(n.labelishData.bind(n));i(c.exit(),t).style("opacity","0").remove();const u=c.enter().filter(f=>f.value).append("g").attr("class",s);u.append("line"),u.append("path"),o.candlestick=c.merge(u).style("opacity",l)},generateDrawCandlestick(t,e){const n=this,{config:r}=n,i=n.generateGetCandlestickPoints(t,e),o=r.axis_rotated,s=r.candlestick_color_down;return(l,c,u)=>{const f=i(l,c),d=n.getCandlestickData(l),h=d==null?void 0:d._isUp,m=+o,S=+!m;u.classed&&u.classed(ta[h?"valueUp":"valueDown"],!0);const E=o?`H${f[1][1]} V${f[1][0]} H${f[0][1]}`:`V${f[1][1]} H${f[1][0]} V${f[0][1]}`;u.select("path").attr("d",`M${f[0][m]},${f[0][S]}${E}z`).style("fill",N=>(h?n.color(N):Ke(s)?s[N.id]:s)||n.color(N));const C=u.select("line"),w=o?{x1:f[2][1],x2:f[2][2],y1:f[2][0],y2:f[2][0]}:{x1:f[2][0],x2:f[2][0],y1:f[2][1],y2:f[2][2]};for(const N in w)C.attr(N,w[N])}},redrawCandlestick(t,e,n=!1){const r=this,{$el:i,$T:o}=r,{candlestick:s}=n?i.subchart:i,l=Pr(!0);return[s.each(function(c,u){const f=o(Ut(this),e,l);t(c,u,f)}).style("opacity",null)]}}),oI={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"};let pp=()=>(mo([iI,Ti],[oI,Wa]),(pp=()=>kt.CANDLESTICK)());var qs={arc_cornerRadius:0,arc_cornerRadius_ratio:0,arc_needle_show:!1,arc_needle_color:void 0,arc_needle_value:void 0,arc_needle_path:void 0,arc_needle_length:100,arc_needle_top_rx:0,arc_needle_top_ry:0,arc_needle_top_width:0,arc_needle_bottom_rx:1,arc_needle_bottom_ry:1,arc_needle_bottom_width:15,arc_needle_bottom_len:0,arc_rangeText_values:void 0,arc_rangeText_unit:"absolute",arc_rangeText_fixed:!1,arc_rangeText_format:void 0,arc_rangeText_position:void 0},sI={donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_line:!1,donut_label_image:void 0,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_rate:.98,donut_expand_duration:50,donut_padAngle:0,donut_startingAngle:0};function lI(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function cI(t){return t}function uI(){var t=cI,e=lI,n=null,r=_e(0),i=_e($s),o=_e(0);function s(l){var c,u=(l=nc(l)).length,f,d,h=0,m=new Array(u),S=new Array(u),E=+r.apply(this,arguments),C=Math.min($s,Math.max(-$s,i.apply(this,arguments)-E)),w,N=Math.min(Math.abs(C)/u,o.apply(this,arguments)),z=N*(C<0?-1:1),$;for(c=0;c<u;++c)($=S[m[c]=c]=+t(l[c],c,l))>0&&(h+=$);for(e!=null?m.sort(function(G,V){return e(S[G],S[V])}):n!=null&&m.sort(function(G,V){return n(l[G],l[V])}),c=0,d=h?(C-u*z)/h:0;c<u;++c,E=w)f=m[c],$=S[f],w=E+($>0?$*d:0)+z,S[f]={data:l[f],index:c,value:$,startAngle:E,endAngle:w,padAngle:N};return S}return s.value=function(l){return arguments.length?(t=typeof l=="function"?l:_e(+l),s):t},s.sortValues=function(l){return arguments.length?(e=l,n=null,s):e},s.sort=function(l){return arguments.length?(n=l,e=null,s):n},s.startAngle=function(l){return arguments.length?(r=typeof l=="function"?l:_e(+l),s):r},s.endAngle=function(l){return arguments.length?(i=typeof l=="function"?l:_e(+l),s):i},s.padAngle=function(l){return arguments.length?(o=typeof l=="function"?l:_e(+l),s):o},s}function fI(t){return t.innerRadius}function dI(t){return t.outerRadius}function hI(t){return t.startAngle}function gI(t){return t.endAngle}function vI(t){return t&&t.padAngle}function pI(t,e,n,r,i,o,s,l){var c=n-t,u=r-e,f=s-i,d=l-o,h=d*c-f*u;if(!(h*h<Wn))return h=(f*(e-o)-d*(t-i))/h,[t+h*c,e+h*u]}function tl(t,e,n,r,i,o,s){var l=t-n,c=e-r,u=(s?o:-o)/vi(l*l+c*c),f=u*c,d=-u*l,h=t+f,m=e+d,S=n+f,E=r+d,C=(h+S)/2,w=(m+E)/2,N=S-h,z=E-m,$=N*N+z*z,G=i-o,V=h*E-S*m,J=(z<0?-1:1)*vi(XA(0,G*G*$-V*V)),Q=(V*z-N*J)/$,rt=(-V*N-z*J)/$,et=(V*z+N*J)/$,st=(-V*N+z*J)/$,ct=Q-C,dt=rt-w,q=et-C,ft=st-w;return ct*ct+dt*dt>q*q+ft*ft&&(Q=et,rt=st),{cx:Q,cy:rt,x01:-f,y01:-d,x11:Q*(i/G-1),y11:rt*(i/G-1)}}function mp(){var t=fI,e=dI,n=_e(0),r=null,i=hI,o=gI,s=vI,l=null,c=ic(u);function u(){var f,d,h=+t.apply(this,arguments),m=+e.apply(this,arguments),S=i.apply(this,arguments)-Ns,E=o.apply(this,arguments)-Ns,C=Ig(E-S),w=E>S;if(l||(l=f=c()),m<h&&(d=m,m=h,h=d),!(m>Wn))l.moveTo(0,0);else if(C>$s-Wn)l.moveTo(m*Xa(S),m*Ur(S)),l.arc(0,0,m,S,E,!w),h>Wn&&(l.moveTo(h*Xa(E),h*Ur(E)),l.arc(0,0,h,E,S,w));else{var N=S,z=E,$=S,G=E,V=C,J=C,Q=s.apply(this,arguments)/2,rt=Q>Wn&&(r?+r.apply(this,arguments):vi(h*h+m*m)),et=Jc(Ig(m-h)/2,+n.apply(this,arguments)),st=et,ct=et,dt,q;if(rt>Wn){var ft=Rg(rt/h*Ur(Q)),lt=Rg(rt/m*Ur(Q));(V-=ft*2)>Wn?(ft*=w?1:-1,$+=ft,G-=ft):(V=0,$=G=(S+E)/2),(J-=lt*2)>Wn?(lt*=w?1:-1,N+=lt,z-=lt):(J=0,N=z=(S+E)/2)}var pt=m*Xa(N),Tt=m*Ur(N),Rt=h*Xa(G),Ct=h*Ur(G);if(et>Wn){var Kt=m*Xa(z),re=m*Ur(z),Ee=h*Xa($),Ce=h*Ur($),be;if(C<fo)if(be=pI(pt,Tt,Ee,Ce,Kt,re,Rt,Ct)){var Ne=pt-be[0],ye=Tt-be[1],De=Kt-be[0],Zt=re-be[1],ve=1/Ur(WA((Ne*De+ye*Zt)/(vi(Ne*Ne+ye*ye)*vi(De*De+Zt*Zt)))/2),xe=vi(be[0]*be[0]+be[1]*be[1]);st=Jc(et,(h-xe)/(ve-1)),ct=Jc(et,(m-xe)/(ve+1))}else st=ct=0}J>Wn?ct>Wn?(dt=tl(Ee,Ce,pt,Tt,m,ct,w),q=tl(Kt,re,Rt,Ct,m,ct,w),l.moveTo(dt.cx+dt.x01,dt.cy+dt.y01),ct<et?l.arc(dt.cx,dt.cy,ct,Xn(dt.y01,dt.x01),Xn(q.y01,q.x01),!w):(l.arc(dt.cx,dt.cy,ct,Xn(dt.y01,dt.x01),Xn(dt.y11,dt.x11),!w),l.arc(0,0,m,Xn(dt.cy+dt.y11,dt.cx+dt.x11),Xn(q.cy+q.y11,q.cx+q.x11),!w),l.arc(q.cx,q.cy,ct,Xn(q.y11,q.x11),Xn(q.y01,q.x01),!w))):(l.moveTo(pt,Tt),l.arc(0,0,m,N,z,!w)):l.moveTo(pt,Tt),!(h>Wn)||!(V>Wn)?l.lineTo(Rt,Ct):st>Wn?(dt=tl(Rt,Ct,Kt,re,h,-st,w),q=tl(pt,Tt,Ee,Ce,h,-st,w),l.lineTo(dt.cx+dt.x01,dt.cy+dt.y01),st<et?l.arc(dt.cx,dt.cy,st,Xn(dt.y01,dt.x01),Xn(q.y01,q.x01),!w):(l.arc(dt.cx,dt.cy,st,Xn(dt.y01,dt.x01),Xn(dt.y11,dt.x11),!w),l.arc(0,0,h,Xn(dt.cy+dt.y11,dt.cx+dt.x11),Xn(q.cy+q.y11,q.cx+q.x11),w),l.arc(q.cx,q.cy,st,Xn(q.y11,q.x11),Xn(q.y01,q.x01),!w))):l.arc(0,0,h,G,$,w)}if(l.closePath(),f)return l=null,f+""||null}return u.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,d=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-fo/2;return[Xa(d)*f,Ur(d)*f]},u.innerRadius=function(f){return arguments.length?(t=typeof f=="function"?f:_e(+f),u):t},u.outerRadius=function(f){return arguments.length?(e=typeof f=="function"?f:_e(+f),u):e},u.cornerRadius=function(f){return arguments.length?(n=typeof f=="function"?f:_e(+f),u):n},u.padRadius=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:_e(+f),u):r},u.startAngle=function(f){return arguments.length?(i=typeof f=="function"?f:_e(+f),u):i},u.endAngle=function(f){return arguments.length?(o=typeof f=="function"?f:_e(+f),u):o},u.padAngle=function(f){return arguments.length?(s=typeof f=="function"?f:_e(+f),u):s},u.context=function(f){return arguments.length?(l=f==null?null:f,u):l},u}const mI=15,xp=20,yp=.35;function xI(t=!1){const e=this;return["donut","pie","polar","gauge"].find(n=>e.hasType(n)&&!(n==="gauge"&&t&&e.hasMultiArcGauge()))}function Tp(){const t=this,{config:e}=t,n=xI.call(t,!0),r=n&&e[`${n}_label_line`],i=qn(r),o=(c,u,f)=>f,s={show:r===!0||i&&(r==null?void 0:r.show)!==!1,distance:i&&(r==null?void 0:r.distance)||xp};if(r===!0)return{chartType:n,line:s,text:{formatter:o}};if(!i)return{chartType:n,line:{show:!1,distance:xp},text:{formatter:null}};let l=o;return ue(r.text)?l=r.text:r.text===!1&&(l=null),{chartType:n,line:s,text:{formatter:l}}}function yI(t,e){const n=this,{state:r}=n,i=n.updateAngle(t);if(!i)return null;let{outerRadius:o}=n.getRadius(t),s=o;n.hasType("polar")&&(s=n.getPolarOuterRadius(t,o),o=r.radius);let l=(i.startAngle+i.endAngle)/2;Math.abs(i.endAngle-i.startAngle-2*Math.PI)<.01&&(l=Math.PI/2);const u=Math.sin(l),f=-Math.cos(l),d={x:u*s,y:f*s},h=o+mI,m={x:u*h,y:f*h},S=u>=0,E={x:m.x+e*(S?1:-1),y:m.y};return{startPoint:d,breakPoint:m,endPoint:E,isRight:S,midAngle:l}}function bp(){return Tp.call(this).line.show}function TI(t){const e=this,{$el:{arcs:n},$T:r}=e,{line:i,text:o}=Tp.call(e),s=i.distance;let l=null;n.selectAll(`.${Qe.chartArc}`).each(function(c){var u,f,d;const h=Ut(this),m=yI.call(e,c,s),{ratio:S,meetsThreshold:E,updated:C}=(u=c._cache)!=null?u:{};if(!C||!m)return;const w=e.isTargetToShow(c.data.id)&&E,{startPoint:N,breakPoint:z,endPoint:$,isRight:G}=m,V=`${N.x},${N.y} ${z.x},${z.y} ${$.x},${$.y}`;if(i.show){let Q=h.select(`.${Qe.arcLabelLine}`);Q.empty()&&(Q=h.append("polyline").attr("class",Qe.arcLabelLine)),r(Q,t).attr("points",V).style("stroke",e.color(c.data)).style("opacity",w?null:"0")}let J=h.select(`.${Qe.arcLabelLineText}`);if(J.empty()&&(J=h.append("text").attr("class",Qe.arcLabelLineText).style("pointer-events","none")),w){const{value:Q}=C,{id:rt}=c.data,et=((d=(f=o.formatter)!=null?f:e.getArcLabelConfig("format"))!=null?d:e.defaultArcValueFormat)(Q,S,rt).toString();ci(J,et,[-1,1],!1);const st={x:$.x+5*(G?1:-1),y:$.y};J.style("text-anchor",G?"start":"end");const ct=J.node(),dt=ct==null?void 0:ct.querySelectorAll("tspan");if(l===null&&(l=parseFloat(fe.getComputedStyle(ct).fontSize)||12),dt&&dt.length>1){const ft=(dt.length-3)/2;st.y+=(-ft+yp)*l}else st.y+=yp*l;r(J,t).attr("transform",`translate(${st.x},${st.y})`).style("opacity",null).style("fill",e.updateTextColor.bind(e)(c))}else r(J,t).style("opacity","0")})}var bI=Object.defineProperty,SI=Object.defineProperties,AI=Object.getOwnPropertyDescriptors,Sp=Object.getOwnPropertySymbols,EI=Object.prototype.hasOwnProperty,CI=Object.prototype.propertyIsEnumerable,Ap=(t,e,n)=>e in t?bI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,II=(t,e)=>{for(var n in e||(e={}))EI.call(e,n)&&Ap(t,n,e[n]);if(Sp)for(var n of Sp(e))CI.call(e,n)&&Ap(t,n,e[n]);return t},RI=(t,e)=>SI(t,AI(e));const Au=["donut","gauge","pie","polar"];function wI(t){return["donut","pie","polar","gauge"].find(e=>t.hasType(e))}function OI(t,e,n,r){var i,o;const{config:s,state:{radiusExpanded:l}}=t,c=n.endAngle-Math.PI/2,u=Math.sin(c),f={x:Math.cos(c)*(l+(r?5:25)),y:u*(l+15-Math.abs(u*10))+3};if(r){const d=s.arc_rangeText_position;if(d){const h=s.arc_rangeText_values,m=ue(d)?d(h[e.index]):d;f.x+=(i=m==null?void 0:m.x)!=null?i:0,f.y+=(o=m==null?void 0:m.y)!=null?o:0}}return f}function PI(t,e,n,r){const{config:i}=t,o=wI(t);let s=o?i[`${o}_label_ratio`]:void 0;if(s)s=ue(s)?s.bind(t.api)(e,n,r):s;else{const d=36/n,h=d>.375;s=n&&r?(h?1.175-d:.8)*n/r:0}return s}function MI(t,e,n){let{outerRadius:r}=t.getRadius(e);t.hasType("polar")&&(r=t.getPolarOuterRadius(e,r));const[i,o]=t.svgArc.centroid(n).map(c=>isNaN(c)?0:c),s=Math.sqrt(i*i+o*o),l=PI(t,e,r,s);return{pos:{x:i,y:o},ratio:l}}function Ep(t=0){const e=this,{config:n,state:r}=e,i=e.hasMultiArcGauge(),o=r.gaugeArcWidth/e.getTargetsToShow().length,s=t?Math.min(r.radiusExpanded*t-r.radius,o*.8-(1-t)*100):0;return{inner(l){const{innerRadius:c}=e.getRadius(l);return i?r.radius-o*(l.index+1):le(c)?c:0},outer(l){const{outerRadius:c}=e.getRadius(l);let u;if(i)u=r.radius-o*l.index+s;else if(e.hasType("polar")&&!t)u=e.getPolarOuterRadius(l,c);else if(u=c,t){let{radiusExpanded:f}=r;r.radius!==c&&(f-=Math.abs(r.radius-c)),u=f*t}return u},corner(l,c){const{arc_cornerRadius_ratio:u=0,arc_cornerRadius:f=0}=n,{data:{id:d},value:h}=l;let m;return u?m=u*c:m=le(f)?f:f.call(e.api,d,h,c),m}}}function Eu(t){return function(e){const n=({startAngle:i=0,endAngle:o=0,padAngle:s=0})=>({startAngle:i,endAngle:o,padAngle:s}),r=Ya(n(this._current),n(e));return this._current=e,function(i){const o=r(i),{data:s,index:l,value:c}=e;return t(RI(II({},o),{data:s,index:l,value:c}))}}}var LI={initPie(){const t=this,{config:e}=t,n=e.data_type,r=e[`${n}_padding`],i=e[`${n}_startingAngle`]||0,o=(r?r*.01:e[`${n}_padAngle`])||0;t.pie=uI().startAngle(i).endAngle(i+2*Math.PI).padAngle(o).value(s=>{var l,c;return(c=(l=s.values)==null?void 0:l.reduce((u,f)=>u+f.value,0))!=null?c:s}).sort(t.getSortCompareFn.bind(t)(!0))},updateRadius(){const t=this,{config:e,state:n}=t,r=e.data_type,i=e[`${r}_padding`],o=e.gauge_width||e.donut_width,s=t.getTargetsToShow().length*e.gauge_arcs_minWidth,l=.85,c=bp.call(t)?l:1;n.radiusExpanded=Math.min(n.arcWidth,n.arcHeight)/2*(t.hasMultiArcGauge()&&e.gauge_label_show?l:c),n.radius=n.radiusExpanded*.95,n.innerRadiusRatio=o?(n.radius-o)/n.radius:.6,n.gaugeArcWidth=o||(s<=n.radius-n.innerRadius?n.radius-n.innerRadius:s<=n.radius?s:n.radius);const u=e.pie_innerRadius||(i?i*(n.innerRadiusRatio+.1):0);n.outerRadius=e.pie_outerRadius,n.innerRadius=t.hasType("donut")||t.hasType("gauge")?n.radius*n.innerRadiusRatio:u},getRadius(t){const e=this,n=t==null?void 0:t.data;let{innerRadius:r,outerRadius:i}=e.state;return!le(r)&&n&&(r=r[n.id]||0),Ke(i)&&n&&n.id in i?i=i[n.id]:le(i)||(i=e.state.radius),{innerRadius:r,outerRadius:i}},updateArc(){const t=this;t.updateRadius(),t.svgArc=t.getSvgArc(),t.svgArcExpanded=t.getSvgArcExpanded()},getArcLength(){const t=this,{config:e}=t,n=e.gauge_arcLength*3.6;let r=2*(n/360);return n<-360?r=-2:n>360&&(r=2),r*Math.PI},getStartingAngle(){const t=this,{config:e}=t,n=e.data_type,r=t.hasType("gauge")?e.gauge_fullCircle:!1,i=-1*Math.PI/2,o=Math.PI/2;let s=e[`${n}_startingAngle`]||0;return!r&&s<=i?s=i:!r&&s>=o?s=o:(s>Math.PI||s<-1*Math.PI)&&(s=Math.PI),s},updateAngle(t,e=!1){var n;const r=this,{config:i,state:o}=r,s=e&&r.hasType("gauge");let{pie:l}=r,c=t,u=!1;if(!i)return null;const f=r.getStartingAngle(),d=i.gauge_fullCircle||e&&!s?r.getArcLength():f*-2,h=c.data&&r.isGaugeType(c.data)&&!r.hasMultiArcGauge();if(h){const{gauge_min:m,gauge_max:S}=i,E=r.getTotalDataSum(o.rendered),C=d*((E-m)/(S-m));l=l.startAngle(f).endAngle(C+f)}if(e===!1){let m;if(h)m=l(r.filterTargetsToShow());else{const S="$arcPieLayout";let E=r.cache.get(S);(!E||E.generation!==o.redrawGeneration)&&(E={generation:o.redrawGeneration,layout:l(r.filterTargetsToShow())},r.cache.add(S,E)),m=E.layout}m.forEach((S,E)=>{var C;!u&&S.data.id===((C=c.data)==null?void 0:C.id)&&(u=!0,c=S,c.index=E)})}if(isNaN(c.startAngle)&&(c.startAngle=0),isNaN(c.endAngle)&&(c.endAngle=c.startAngle),e||c.data&&(i.gauge_enforceMinMax||r.hasMultiArcGauge())){const{gauge_min:m,gauge_max:S}=i,E=e&&!s?r.getTotalDataSum(o.rendered):S,C=d/(E-m),w=(n=c.value)!=null?n:0,N=w<m?0:w<E?w-m:E-m;c.startAngle=f,c.endAngle=f+C*N}return u||e?c:null},getSvgArc(){const t=this,{inner:e,outer:n,corner:r}=Ep.call(t),i=mp().innerRadius(e).outerRadius(n),o=function(s,l){var c;let u="M 0 0";if(s.value||s.data){const f=l?s:(c=t.updateAngle(s))!=null?c:null;f&&(u=i.cornerRadius(r(f,n(f)))(f))}return u};return o.centroid=i.centroid,o},getSvgArcExpanded(t=1){const e=this,{inner:n,outer:r,corner:i}=Ep.call(e,t),o=mp().innerRadius(n).outerRadius(r);return s=>{const l=e.updateAngle(s),c=r(l);let u=0;return l&&(u=i(l,c)),l&&o.cornerRadius(u)(l)||"M 0 0"}},getArc(t,e,n){return n||this.isArcType(t.data)?this.svgArc(t,e):"M 0 0"},redrawArcRangeText(){const t=this,{config:e,$el:{arcs:n},state:r,$T:i}=t,o=e.arc_rangeText_format,s=t.hasType("gauge")&&e.arc_rangeText_fixed;let l=e.arc_rangeText_values;if(l!=null&&l.length){const c=e.arc_rangeText_unit==="%",u=t.getTotalDataSum(r.rendered);c&&(l=l.map(h=>u/100*h));const f=t.pie(l).map((h,m)=>(h.index=m,h));let d=n.selectAll(`.${Qe.arcRange}`).data(l);d.exit().remove(),d=i(d.enter().append("text").attr("class",Qe.arcRange).style("text-anchor","middle").style("pointer-events","none").style("opacity","0").text(h=>{const m=c?h/u*100:h;return ue(o)?o(m):`${m}${c?"%":""}`}).merge(d)),(!r.rendered||r.rendered&&!s)&&u>0&&d.attr("transform",function(h,m){return t.transformForArcLabel(this,f[m],!0)}),d.style("opacity",h=>!s&&(h>u||u===0)?"0":null)}},transformForArcLabel(t,e,n=!1){const r=this,i=r.updateAngle(e,n);if(!i)return"";let o,s=1;if(n||r.hasMultiArcGauge())o=OI(r,e,i,n);else if(!r.hasType("gauge")||r.data.targets.length>1){const l=MI(r,e,i);o=l.pos,s=l.ratio}else return"";return bg.call(r,t,o),`translate(${o.x*s},${o.y*s})`},convertToArcData(t){return this.addName({id:"data"in t?t.data.id:t.id,value:t.value,ratio:this.getRatio("arc",t),index:t.index})},textForArcLabel(t){var e;const n=this,r=n.hasType("gauge"),i=(e=Au.filter(n.hasType.bind(n)))==null?void 0:e[0];n.shouldShowArcLabel()&&t.style("fill",n.updateTextColor.bind(n)).attr("filter",o=>n.updateTextBGColor.bind(n)(o,n.config.data_labels_backgroundColors)).each(function(o){const s=Ut(this),l=n.updateAngle(o),c=n.getRatio("arc",l),u=Hc.call(n,c,i);if(o._cache={updated:l,ratio:c,meetsThreshold:u},u){const{value:f}=l||o,d=(n.getArcLabelConfig("format")||n.defaultArcValueFormat)(f,c,o.data.id).toString();ci(s,d,[-1,1],r)}else s.text("")})},expandArc(t){const e=this,{state:{transiting:n},$el:r}=e;if(n){const o=setInterval(()=>{e.state.transiting||(clearInterval(o),r.legend.selectAll(`.${nn.legendItemFocused}`).size()>0&&e.expandArc(t))},10);return}const i=e.mapToTargetIds(t);r.svg.selectAll(e.selectorTargets(i,`.${Qe.chartArc}`)).each(function(o){if(!e.shouldExpand(o.data.id))return;const s=e.getExpandConfig(o.data.id,"duration"),l=e.getSvgArcExpanded(e.getExpandConfig(o.data.id,"rate"));Ut(this).selectAll("path").transition().duration(s).attrTween("d",Eu(e.svgArcExpanded.bind(e))).transition().duration(s*2).attrTween("d",Eu(l.bind(e)))})},unexpandArc(t){const e=this,{state:{transiting:n},$el:{svg:r}}=e;if(n)return;const i=e.mapToTargetIds(t);r.selectAll(e.selectorTargets(i,`.${Qe.chartArc}`)).selectAll("path").transition().duration(o=>e.getExpandConfig(o.data.id,"duration")).attrTween("d",Eu(e.svgArc.bind(e))),r.selectAll(`${Qe.arc}`).style("opacity",null)},getExpandConfig(t,e){const n=this,{config:r}=n,i={duration:50,rate:.98};let o;return n.isDonutType(t)?o="donut":n.isGaugeType(t)?o="gauge":n.isPieType(t)&&(o="pie"),o?r[`${o}_expand_${e}`]:i[e]},shouldExpand(t){const e=this,{config:n}=e,r=e.isDonutType(t)?"donut":e.isGaugeType(t)?"gauge":e.isPieType(t)?"pie":null;return r?!!n[`${r}_expand`]:!1},shouldShowArcLabel(){const t=this,{config:e}=t;return Au.some(n=>t.hasType(n)&&e[`${n}_label_show`])},getArcLabelConfig(t="format"){const e=this,{config:n}=e;let r=i=>i;return Au.filter(e.hasType.bind(e)).forEach(i=>{r=n[`${i}_label_${t}`]}),t==="format"&&ue(r)?r.bind(e.api):r},updateTargetsForArc(t){const e=this,{$el:n}=e,r=e.hasType("gauge"),i=e.getChartClass("Arc"),o=e.getClass("arcs",!0),s=e.classFocus.bind(e),l=n.main.select(`.${Qe.chartArcs}`),c=l.selectAll(`.${Qe.chartArc}`).data(e.pie(t)).attr("class",f=>i(f)+s(f.data)),u=c.enter().append("g").attr("class",i).call(this.setCssRule(!1,`.${Qe.chartArcs} text`,["pointer-events:none","text-anchor:middle"]));u.append("g").attr("class",o).merge(c),u.append("text").attr("dy",r&&!e.hasMultiTargets()?"-.1em":null).style("opacity","0").style("text-anchor",e.getStylePropValue("middle")).style("pointer-events",e.getStylePropValue("none")),n.text=l.selectAll(`.${Ue.target} text`)},initArc(){const t=this,{$el:e}=t;e.arcs=e.main.select(`.${Ue.chart}`).append("g").attr("class",Qe.chartArcs).attr("transform",t.getTranslate("arc")),t.setArcTitle()},setArcTitle(t){const e=this,n=t||e.getArcTitle(),r=e.hasType("gauge");if(n){const i=r?cr.chartArcsGaugeTitle:Qe.chartArcsTitle;let o=e.$el.arcs.select(`.${i}`);o.empty()&&(o=e.$el.arcs.append("text").attr("class",i).style("text-anchor","middle")),r&&o.attr("dy","-0.3em"),ci(o,n,r?void 0:[-.6,1.35],!0)}},getArcTitle(){const t=this,e=t.hasType("donut")&&"donut"||t.hasType("gauge")&&"gauge";return e?t.config[`${e}_title`]:""},getArcTitleWithNeedleValue(){const t=this,{config:e,state:n}=t,r=t.getArcTitle();if(r&&t.config.arc_needle_show&&/{=[A-Z_]+}/.test(r)){let i=n.current.needle;return le(i)||(i=e.arc_needle_value),Da(r,{NEEDLE_VALUE:~~i})}return!1},redrawArc(t,e,n){const r=this,{config:i,state:o,$el:{main:s}}=r,l=i.interaction_enabled,c=l&&i.data_selection_isselectable;let u=s.selectAll(`.${Qe.arcs}`).selectAll(`.${Qe.arc}`).data(r.arcData.bind(r));u.exit().transition().duration(e).style("opacity","0").remove(),u=u.enter().append("path").attr("class",r.getClass("arc",!0)).style("fill",f=>r.color(f.data)).style("cursor",f=>{var d;return(d=c==null?void 0:c.bind)!=null&&d.call(c,r.api)(f)?"pointer":null}).style("opacity","0").each(function(f){r.isGaugeType(f.data)&&(f.startAngle=i.gauge_startingAngle,f.endAngle=i.gauge_startingAngle),this._current=f}).merge(u),r.hasType("gauge")&&(r.updateGaugeMax(),r.hasMultiArcGauge()&&r.redrawArcGaugeLine()),u.attr("transform",f=>!r.isGaugeType(f.data)&&n?"scale(0)":"").style("opacity",function(f){return f===this._current?"0":null}).each(()=>{o.transiting=!0}).transition().duration(t).attrTween("d",function(f){const d=r.updateAngle(f);if(!d)return()=>"M 0 0";isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);const h=Ya(this._current,d);return this._current=h(0),function(m){const S=h(m);return S.data=f.data,r.getArc(S,!0)}}).attr("transform",n?"scale(1)":"").style("fill",f=>{let d;return r.levelColor?(d=r.levelColor(f.data.values[0].value),i.data_colors[f.data.id]=d):d=r.color(f.data),d}).style("opacity",null).call(Zo,function(){if(r.levelColor){const f=Ut(this),d=f.datum(this._current);r.updateLegendItemColor(d.data.id,f.style("fill"))}o.transiting=!1,o.redrawing&&(o.redrawing=!1,o._targetsToShow=null,o._cachedDrawShape=null),$e(i.onrendered,r.api)}),l&&r.bindArcEvent(u),r.hasType("polar")&&r.redrawPolar(),r.hasType("gauge")&&r.redrawBackgroundArcs(),i.arc_needle_show&&r.redrawNeedle(),r.redrawArcText(t),r.redrawArcRangeText()},redrawNeedle(){const t=this,{$el:e,config:n,state:{hiddenTargetIds:r,radius:i}}=t,o=(i-1)/100*n.arc_needle_length,s=r.size!==t.data.targets.length;let l=t.$el.arcs.select(`.${Qe.needle}`);const c=n.arc_needle_path,u=n.arc_needle_bottom_width/2,f=n.arc_needle_top_width/2,d=n.arc_needle_top_rx,h=n.arc_needle_top_ry,m=n.arc_needle_bottom_len,S=n.arc_needle_bottom_rx,E=n.arc_needle_bottom_ry,C=t.getNeedleAngle(),w=()=>{const N=t.getArcTitleWithNeedleValue();N&&t.setArcTitle(N)};if(w(),l.empty()&&(l=e.arcs.append("path").classed(Qe.needle,!0),e.needle=l,e.needle.updateHelper=(N,z=!1)=>{e.needle.style("display")!=="none"&&t.$T(e.needle).style("transform",`rotate(${t.getNeedleAngle(N)}deg)`).call(Zo,()=>{z&&(n.arc_needle_value=N),w()})}),s){const N=ue(c)?c.call(t,o):`M-${u} ${m} A${S} ${E} 0 0 0 ${u} ${m} L${f} -${o} A${d} ${h} 0 0 0 -${f} -${o} L-${u} ${m} Z`;t.$T(l).attr("d",N).style("fill",n.arc_needle_color).style("display",null).style("transform",`rotate(${C}deg)`)}else l.style("display","none")},getNeedleAngle(t){const e=this,{config:n,state:r}=e,i=e.getArcLength(),o=e.hasType("gauge"),s=e.getTotalDataSum(!0);let l=on(t)?t:n.arc_needle_value,c=n[`${n.data_type}_startingAngle`]||0,u;if(le(l)||(l=o&&e.data.targets.length===1?s:0),r.current.needle=l,o){c=e.getStartingAngle();const f=n.gauge_fullCircle?i:c*-2,{gauge_min:d,gauge_max:h}=n;u=f*((l-d)/(h-d))}else u=s?i*(l/s):0;return(c+u)*(180/Math.PI)},redrawBackgroundArcs(){const t=this,{config:e,state:n}=t,r=t.hasMultiArcGauge(),i=e.gauge_fullCircle,o=t.getTargetsToShow().length===0&&!!e.data_empty_label_text,s=t.getStartingAngle(),l=i?s+t.getArcLength():s*-1;let c=t.$el.arcs.select(`${r?"g":""}.${Qe.chartArcsBackground}`);if(r){let u=0;c=c.selectAll(`path.${Qe.chartArcsBackground}`).data(t.data.targets),c.enter().append("path").attr("class",(f,d)=>`${Qe.chartArcsBackground} ${Qe.chartArcsBackground}-${d}`).merge(c).style("fill",e.gauge_background||null).attr("d",({id:f})=>{if(o||n.hiddenTargetIds.has(f))return"M 0 0";const d={data:[{value:e.gauge_max}],startAngle:s,endAngle:l,index:u++};return t.getArc(d,!0,!0)}),c.exit().remove()}else c.attr("d",o?"M 0 0":()=>{const u={data:[{value:e.gauge_max}],startAngle:s,endAngle:l};return t.getArc(u,!0,!0)})},bindArcEvent(t){const e=this,{config:n,state:r}=e,i=r.inputType==="touch",o=r.inputType==="mouse",s=u=>{const f=e.updateAngle(u);return f?e.convertToArcData(f):null};function l(u,f,d){e.expandArc(d),e.api.focus(d),e.toggleFocusLegend(d,!0),e.showTooltip([f],u)}function c(u){const f=(u==null?void 0:u.id)||void 0;e.unexpandArc(f),e.api.revert(),e.revertLegend(),e.hideTooltip()}if(t.on("click",function(u,f,d){var h;const m=s(f);m&&((h=e.toggleShape)==null||h.call(e,this,m,d),n.data_onclick.bind(e.api)(m,this))}),o&&t.on("mouseover",function(u,f){if(r.transiting)return;r.event=u;const d=s(f),h=(d==null?void 0:d.id)||void 0;l(this,d,h),e.setOverOut(!0,d)}).on("mouseout",(u,f)=>{if(r.transiting||!n.interaction_onout)return;r.event=u;const d=s(f);c(),e.setOverOut(!1,d)}).on("mousemove",function(u,f){const d=s(f);r.event=u,e.showTooltip([d],this)}),i&&e.hasArcType()&&!e.radars){const u=f=>{var d,h;const{clientX:m,clientY:S}=(h=(d=f.changedTouches)==null?void 0:d[0])!=null?h:{clientX:0,clientY:0};return Ut(Ze.elementFromPoint(m,S))};e.$el.svg.on("touchstart touchmove",function(f){if(r.transiting)return;r.event=f;const h=u(f).datum(),m=h!=null&&h.data&&h.data.id?e.updateAngle(h):null,S=m?e.convertToArcData(m):null,E=(S==null?void 0:S.id)||void 0;e.callOverOutForTouch(S),Tn(E)?c():l(this,S,E)},{passive:!0})}},redrawArcText(t){const e=this,{config:n,state:r,$el:{main:i,arcs:o}}=e,s=e.hasType("gauge"),l=e.hasMultiArcGauge();let c;if(s&&e.data.targets.length===1&&n.gauge_title||(c=i.selectAll(`.${Qe.chartArc}`).select("text").style("opacity","0").attr("class",u=>e.isGaugeType(u.data)?cr.gaugeValue:null).call(e.textForArcLabel.bind(e)).style("font-size",u=>e.isGaugeType(u.data)&&e.data.targets.length===1&&!l?`${Math.round(r.radius/5)}px`:null),Tg.call(e),c.attr("transform",function(u){return e.transformForArcLabel.bind(e)(this,u)}).transition().duration(t).style("opacity",u=>e.isTargetToShow(u.data.id)&&e.isArcType(u.data)?null:"0"),l&&c.attr("dy","-.1em")),i.select(`.${Qe.chartArcsTitle}`).style("opacity",e.hasType("donut")||s?null:"0"),s){const u=n.gauge_fullCircle;u&&(c==null||c.attr("dy",`${l?0:Math.round(r.radius/14)}`)),n.gauge_label_show&&(o.select(`.${cr.chartArcsGaugeUnit}`).attr("dy",`${u?1.5:.75}em`).text(n.gauge_units),o.select(`.${cr.chartArcsGaugeMin}`).attr("dx",`${-1*(r.innerRadius+(r.radius-r.innerRadius)/(u?1:2))}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_min,!1)),!u&&o.select(`.${cr.chartArcsGaugeMax}`).attr("dx",`${r.innerRadius+(r.radius-r.innerRadius)/2}px`).attr("dy","1.2em").text(e.textForGaugeMinMax(n.gauge_max,!0)))}bp.call(e)&&TI.call(e,t)},getArcElementByIdOrIndex(t){const e=this,{$el:{arcs:n}}=e,r=le(t)?i=>i.index===t:i=>i.data.id===t;return n==null?void 0:n.selectAll(`.${Ue.target} path`).filter(r)}};function Si(t,e){bn(Ir.prototype,[LI,Ti].concat(t||[])),Ua.setOptions([Wa].concat(e||[]))}let Cp=()=>(Si(void 0,[qs,sI]),(Cp=()=>kt.DONUT)());var DI=Object.defineProperty,Ip=Object.getOwnPropertySymbols,FI=Object.prototype.hasOwnProperty,NI=Object.prototype.propertyIsEnumerable,Rp=(t,e,n)=>e in t?DI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,$I=(t,e)=>{for(var n in e||(e={}))FI.call(e,n)&&Rp(t,n,e[n]);if(Ip)for(var n of Ip(e))NI.call(e,n)&&Rp(t,n,e[n]);return t};function Ai(t=!1){const e=this,{config:n,state:{current:{width:r,height:i}}}=e,o=e.getCurrentPadding(),s=$I({width:r-o.left-o.right,height:i-(n.legend_show?e.getLegendHeight()+10:0)-o.top-o.bottom},o);if(t){const l=Cu.call(e,s),c=n.funnel_rotated;s.width=Math.max(s.width,c?l.height:l.width),s.height=Math.max(s.height,c?l.width:l.height)}return s}function Cu(t){const e=this,{config:n}=e,r=n.funnel_rotated,[i,o]=[n.funnel_neck_width,n.funnel_neck_height].map((s,l)=>Ke(s)?t[r!==!l?"width":"height"]*s.ratio:s);return{width:i,height:o}}function BI(t){const e=this,n=e.config.funnel_rotated,{width:r,height:i}=Ai.call(e,!0),o=[];return t.forEach((s,l)=>{const{ratio:c=0}=s,u=l>0?o[l-1][2][n?0:1]:0,f=c+u;o.push(s.coords=n?[[u,0],[f,0],[f,i],[u,i],[u,0]]:[[0,u],[r,u],[r,f],[0,f],[0,u]])}),o}function zI(){const t=this,e=t.config.funnel_rotated,{width:n,height:r}=Ai.call(t,!0),i=Cu.call(t,{width:n,height:r});let o;if(e){const s=(r-i.width)/2,l=n-i.height;o=[[l,s],[n,s],[n,r-s],[l,r-s],[0,r]]}else{const s=(n-i.width)/2,l=r-i.height;o=[[n,0],[n-s,l],[n-s,r],[s,r],[s,l]]}return`M${[[0,0],...o,[0,0]].join("L")}z`}function UI(t){const e=this,{config:n}=e,r=t.map(i=>({id:i.id,value:i.values.reduce((o,s)=>o+s.value,0)}));return n.data_order&&r.sort(e.getSortCompareFn.bind(e)(!0)),wp.call(e,r)}function wp(t){const e=this,{width:n,height:r}=Ai.call(e),i=e.getTotalDataSum(!0),o=e.config.funnel_rotated?n:r;return t.forEach(s=>{s.ratio=s.value/i*o}),t}function kI(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function Op(t,e,n,r,i){const o=[];for(let l=0;l<=20;l++){const c=l/20,u=t+(e-t)*c,f=n+(r-n)*kI(c);o.push(i?[u,f]:[f,u])}return o}function GI(){var t;const e=this,n=e.config.funnel_rotated,{width:r,height:i}=Ai.call(e,!0),o=Cu.call(e,{width:r,height:i}),s=oc().x(m=>m[0]).y(m=>m[1]).curve(os),l=(n?i-o.width:r-o.width)/2,c=n?r-o.height:i-o.height,u=Op(0,c,n?0:r,n?l:r-l,n),f=[];if(o.height>0&&(u.push(n?[r,l]:[r-l,i]),f.push(n?[r,i-l]:[l,i])),f.push(...Op(c,0,n?i-l:l,n?i:0,n)),u.length>1){const[m,S]=n?[1,0]:[0,1];u.splice(1,0,[u[m][0],u[S][1]]);const E=f.length-1;E>0&&f.splice(E,0,[f[E-m][0],f[E-S][1]])}const d=s(u)||"",h=((t=s(f))==null?void 0:t.replace(/^M/,"L"))||"";return n?`${d}${h}z`:`M0,0${d.replace(/^M/,"L")}${h}z`}var XI={initFunnel(){const t=this,{$el:e}=t;e.funnel=e.main.select(`.${Ue.chart}`).append("g").classed(eo.chartFunnels,!0),e.funnel.background=e.funnel.append("path").classed(eo.funnelBackground,!0),t.bindFunnelEvent()},bindFunnelEvent(){const t=this,{$el:{funnel:e},config:n,state:r}=t;if(!n.interaction_enabled)return;const i=s=>{var l;const c=s.isTrusted?s.target:(l=r.eventReceiver.rect)==null?void 0:l.node();if(c&&/^path$/i.test(c.tagName))return r.event=s,Ut(c).datum()},o=r.inputType==="touch";e.on(o?"touchstart":"mouseover mousemove",s=>{const l=i(s);l&&(t.showTooltip([l],s.target),/^(touchstart|mouseover)$/.test(s.type)&&t.setOverOut(!0,l))},o?{passive:!0}:void 0).on(o?"touchend":"mouseout",s=>{const l=i(s);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})},updateTargetsForFunnel(t){const e=this,{$el:{funnel:n}}=e;n||e.initFunnel();const r=e.getChartClass("Funnel"),i=e.getClass("funnel",!0),o=UI.call(e,t.filter(e.isFunnelType.bind(e))),s=e.filterNullish(o),l=n.selectAll(`.${eo.chartFunnel}`).data(s);l.exit().remove();const c=l.enter().insert("g",`.${eo.funnelBackground}`);c.append("path"),n.path=c.merge(l).attr("class",r).select("path").attr("class",i).style("opacity","0").style("fill",e.color)},updateFunnel(t){const e=this,{$el:{funnel:n}}=e,r=t.map(({id:i})=>i);n.path=n.path.filter(i=>r.includes(i.id))},generateGetFunnelPoints(){const t=this,{config:e,$el:{funnel:n}}=t,r=e.funnel_rotated,i=t.filterTargetsToShow(n.path),{top:o,left:s,width:l,height:c}=Ai.call(t),u={};let f=0;return i.each(d=>{const h=f,{ratio:m}=d;f+=m;const S=r?s:o,E=S+h,C=S+f,w=(E+C)/2,N=r?o+c/2:s+l/2;u[d.id]=r?[[E,N],[C,N],[w,N]]:[[N,E],[N,C],[N,w]]}),d=>u[d.id]},redrawFunnel(){const t=this,{config:e,$T:n,$el:{funnel:r}}=t,i=t.filterTargetsToShow(r.path),o=BI.call(t,wp.call(t,i.data())),{top:s,left:l}=Ai.call(t),c=(e.funnel_spline?GI:zI).call(t);r.attr("transform",`translate(${l}, ${s})`).attr("clip-path",`path('${c}')`),r.background.attr("d",c),n(i).attr("d",(u,f)=>`M${o[f].join("L")}z`).style("opacity","1"),r.selectAll("g").style("opacity",null)}},WI={funnel_neck_width:0,funnel_neck_height:0,funnel_rotated:!1,funnel_spline:!1};let Pp=()=>(Si([XI],[WI]),(Pp=()=>kt.FUNNEL)());var VI={initGauge(){const t=this,{config:e,$el:{arcs:n}}=t,r=(i=null,o="")=>{n.append("text").attr("class",i).style("text-anchor","middle").style("pointer-events","none").text(o)};if(t.hasType("gauge")){const i=t.hasMultiArcGauge();n.append(i?"g":"path").attr("class",Qe.chartArcsBackground).style("fill",!i&&e.gauge_background||null),e.gauge_units&&r(cr.chartArcsGaugeUnit),e.gauge_label_show&&(r(cr.chartArcsGaugeMin),!e.gauge_fullCircle&&r(cr.chartArcsGaugeMax))}},updateGaugeMax(){const t=this,{config:e,state:n}=t,i=t.hasMultiArcGauge()?t.getMinMaxData().max[0].value:t.getTotalDataSum(n.rendered);!e.gauge_enforceMinMax&&i+e.gauge_min*(e.gauge_min>0?-1:1)>e.gauge_max&&(e.gauge_max=i-e.gauge_min)},redrawArcGaugeLine(){const t=this,{config:e,state:n,$el:r}=t,{hiddenTargetIds:i}=t.state,o=r.main.selectAll(`.${Qe.arcs}`).selectAll(`.${Qe.arcLabelLine}`).data(t.arcData.bind(t));o.enter().append("rect").attr("class",l=>`${Qe.arcLabelLine} ${Ue.target} ${Ue.target}-${l.data.id}`).merge(o).style("fill",l=>t.levelColor?t.levelColor(l.data.values[0].value):t.color(l.data)).style("display",e.gauge_label_show?null:"none").each(function(l){let c=0;const u=2;let f=0,d=0,h="";if(!i.has(l.data.id)){const m=t.updateAngle(l),S=n.gaugeArcWidth/t.getTargetsToShow().length*(m.index+1),E=m.endAngle-Math.PI/2,C=n.radius-S,w=E-(C===0?0:1/C);c=n.radiusExpanded-n.radius+S,f=Math.cos(w)*C,d=Math.sin(w)*C,h=`rotate(${E*180/Math.PI}, ${f}, ${d})`}Ut(this).attr("x",f).attr("y",d).attr("width",c).attr("height",u).attr("transform",h).style("stroke-dasharray",`0, ${c+u}, 0`)})},textForGaugeMinMax(t,e){const n=this,{config:r}=n,i=r.gauge_label_extents;return ue(i)?i.bind(n.api)(t,e):t},getGaugeLabelHeight(){const{config:t}=this;return this.config.gauge_label_show&&!t.gauge_fullCircle?20:0},getPaddingBottomForGauge(){return this.getGaugeLabelHeight()*2}},jI={gauge_background:"",gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_extents:void 0,gauge_label_format:void 0,gauge_label_ratio:void 0,gauge_label_threshold:0,gauge_label_line:!1,gauge_label_image:void 0,gauge_enforceMinMax:!1,gauge_min:0,gauge_max:100,gauge_type:"single",gauge_startingAngle:-1*Math.PI/2,gauge_arcLength:100,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_arcs_minWidth:5,gauge_expand:{},gauge_expand_rate:.98,gauge_expand_duration:50};let Mp=()=>(Si([VI],[qs,jI]),(Mp=()=>kt.GAUGE)()),Lp=()=>(sa(),(Lp=()=>kt.LINE)()),Dp=()=>(sa(void 0,[hu]),(Dp=()=>kt.SPLINE)()),Fp=()=>(sa(),(Fp=()=>kt.STEP)());var HI={pie_label_show:!0,pie_label_format:void 0,pie_label_ratio:void 0,pie_label_threshold:.05,pie_label_line:!1,pie_label_image:void 0,pie_expand:{},pie_expand_rate:.98,pie_expand_duration:50,pie_innerRadius:0,pie_outerRadius:void 0,pie_padAngle:0,pie_padding:0,pie_startingAngle:0};let Np=()=>(Si(void 0,[qs,HI]),(Np=()=>kt.PIE)());function $p(t){const e=t.config.polar_level_max;let n=t.getMinMaxData().max[0].value;return e&&e>n&&(n=e),n}var YI={initPolar(){const t=this,{$el:{arcs:e},config:n}=t,r=n.polar_level_text_show,i=n.polar_level_text_backgroundColor;e.levels=e.append("g").attr("class",na.levels),r&&i&&t.generateTextBGColorFilter(i)},getPolarOuterRadius(t,e){var n;const r=$p(this);return((n=t==null?void 0:t.data.values[0].value)!=null?n:0)/r*e},updateTargetsForPolar(t){this.updateTargetsForArc(t)},redrawPolar(){const t=this,{config:e}=t;e.polar_level_show&&t.updatePolarLevel()},updatePolarLevel(){const t=this,{config:e,state:n,$el:{arcs:{levels:r}}}=t,i=e.polar_level_depth,o=$p(t),s=Jo(0,i),l=n.radius,c=s.map(h=>l*((h+1)/i)),u=(e.polar_level_text_format||function(){}).bind(t.api),f=r.selectAll(`.${na.level}`).data(s);f.exit().remove();const d=f.enter().append("g").attr("class",(h,m)=>`${na.level} ${na.level}-${m}`);if(d.append("circle"),d.merge(f).selectAll("circle").style("visibility",e.polar_level_show?null:"hidden").attr("cx",0).attr("cy",0).attr("r",h=>c[h]),e.polar_level_text_show){const h=e.polar_level_text_backgroundColor,m=`#${n.datetimeId}-labels-bg${t.getTargetSelectorSuffix(h)}`;d.append("text").style("text-anchor","middle"),d.merge(f).selectAll("text").attr("dy",S=>-c[S]+5).attr("filter",h?`url(${m})`:null).text(S=>u(o/s.length*(S+1)))}}},KI={polar_label_show:!0,polar_label_format:void 0,polar_label_threshold:.05,polar_label_line:!1,polar_label_image:void 0,polar_label_ratio:void 0,polar_level_depth:3,polar_level_max:void 0,polar_level_show:!0,polar_level_text_backgroundColor:"#fff",polar_level_text_format:t=>t%1===0?t:t.toFixed(2),polar_level_text_show:!0,polar_padAngle:0,polar_padding:0,polar_startingAngle:0};let Bp=()=>(Si([YI],[qs,KI]),(Bp=()=>kt.POLAR)());function ZI(t,e,n,r,i,o){const s=t&&r>0?n-r:r,l=2*Math.PI;return i*(1-o*(e==="x"?Math.sin:Math.cos)(s*l/n))}const Ei=ke.radarPoints,zp=ke.radarTextWidth;var JI={initRadar(){const t=this,{config:e,state:{current:n},$el:r}=t;t.hasType("radar")&&(r.radar=r.main.select(`.${Ue.chart}`).append("g").attr("class",hh.chartRadars),r.radar.levels=r.radar.append("g").attr("class",na.levels),r.radar.axes=r.radar.append("g").attr("class",Pn.axis),r.radar.shapes=r.radar.append("g").attr("class",An.shapes),n.dataMax=e.radar_axis_max||t.getMinMaxData().max[0].value,e.radar_axis_text_show&&(e.interaction_enabled&&t.bindRadarEvent(),t.updateRadarLevel(),t.updateRadarAxes()))},getRadarSize(){const t=this,{config:e,state:{arcWidth:n,arcHeight:r}}=t,i=e.axis_x_categories.length<4?-20:10,o=(Math.min(n,r)-i)/2;return[o,o]},updateTargetsForRadar(t){const e=this,{config:n}=e;dr(n.axis_x_categories)&&(n.axis_x_categories=Jo(0,br("max",t.map(r=>r.values.length)))),e.generateRadarPoints()},getRadarPosition(t,e,n,r){const i=this,{config:o}=i,[s,l]=i.getRadarSize(),c=o.axis_x_categories.length,u=o.radar_direction_clockwise,f=La(t).map(d=>ZI(u,d,c,e,on(n)?n:t==="x"?s:l,le(r)?r:o.radar_size_ratio));return f.length===1?f[0]:f},generateRadarPoints(){const t=this,e=t.data.targets,[n,r]=t.getRadarSize(),i=t.cache.get(Ei)||{},o=i._size;(!o||o.width!==n&&o.height!==r)&&(e.forEach(s=>{i[s.id]=s.values.map((l,c)=>t.getRadarPosition(["x","y"],c,void 0,t.getRatio("radar",l)))}),i._size={width:n,height:r},t.cache.add(Ei,i))},redrawRadar(){const t=this,{radar:e,main:n}=t.$el,r=t.getTranslate("radar");r&&(e.attr("transform",r),n.select(`.${Rn.chartTexts}`).attr("transform",r),t.generateRadarPoints(),t.updateRadarLevel(),t.updateRadarAxes(),t.updateRadarShape())},generateGetRadarPoints(){const t=this.cache.get(Ei);return(e,n)=>{const r=t[e.id][n];return[r,r,r,r]}},updateRadarLevel(){const t=this,{config:e,state:n,$el:{radar:r}}=t,[i,o]=t.getRadarSize(),s=e.radar_level_depth,l=e.axis_x_categories.length,c=e.radar_level_text_show,u=r.levels,f=Jo(0,s),d=e.radar_size_ratio*Math.min(i,o),h=f.map(w=>d*((w+1)/s)),m=(e.radar_level_text_format||function(){}).bind(t.api),S=f.map(w=>{const N=h[w];return Jo(0,l).map($=>t.getRadarPosition(["x","y"],$,N,1).join(",")).join(" ")}),E=u.selectAll(`.${na.level}`).data(f);E.exit().remove();const C=E.enter().append("g").attr("class",(w,N)=>`${na.level} ${na.level}-${N}`);C.append("polygon").style("visibility",e.radar_level_show?null:"hidden"),c&&(u.select("text").empty()&&u.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(()=>m(0)),C.append("text").attr("dx","-.5em").style("text-anchor","end").text(w=>m(n.current.dataMax/f.length*(w+1)))),C.merge(E).attr("transform",w=>`translate(${i-h[w]}, ${o-h[w]})`).selectAll("polygon").attr("points",w=>S[w]),c&&u.selectAll("text").attr("x",w=>Tn(w)?i:S[w].split(",")[0]).attr("y",w=>Tn(w)?o:0)},updateRadarAxes(){const t=this,{config:e,$el:{radar:n}}=t,[r,i]=t.getRadarSize(),o=e.axis_x_categories;let s=n.axes.selectAll("g").data(o);s.exit().remove();const l=s.enter().append("g").attr("class",(c,u)=>`${Pn.axis}-${u}`);if(e.radar_axis_line_show&&l.append("line"),e.radar_axis_text_show&&l.append("text"),s=l.merge(s),e.radar_axis_line_show&&s.select("line").attr("x1",r).attr("y1",i).attr("x2",(c,u)=>t.getRadarPosition("x",u)).attr("y2",(c,u)=>t.getRadarPosition("y",u)),e.radar_axis_text_show){const{x:c=0,y:u=0}=e.radar_axis_text_position,f=t.cache.get(zp)||0;if(s.select("text").style("text-anchor","middle").attr("dy",".5em").call(d=>{d.each(function(h){ci(Ut(this),String(h),[-.6,1.2])})}).datum((d,h)=>({index:h})).attr("transform",function(d){Tn(this.width)&&(this.width=cn(this,!0).width/2);let h=t.getRadarPosition("x",d.index,void 0,1),m=Math.round(t.getRadarPosition("y",d.index,void 0,1));return h>r?h+=this.width+c:Math.round(h)<r&&(h-=this.width+c),m>i?(m/2===i&&this.firstChild.tagName==="tspan"&&this.firstChild.setAttribute("dy","0em"),m+=u):m<i&&(m-=u),`translate(${h} ${m})`}),!f){const d=[n.axes,n.levels].map(h=>Sh(h.node()).width);d.every(h=>h>0)&&t.cache.add(zp,d[0]-d[1])}}},bindRadarEvent(){const t=this,{config:e,state:n,$el:{radar:r,svg:i}}=t,o=t.isPointFocusOnly(),{inputType:s,transiting:l}=n,c=s==="mouse",u=f=>{if(n.event=f,!e.interaction_onout)return;const d=t.getDataIndexFromEvent(f),h=Tn(d);(c||h)&&(t.hideTooltip(),o?t.hideCircleFocus():t.unexpandCircles(),c?t.setOverOut(!1,d):h&&t.callOverOutForTouch())};r.axes.on(c?"mouseover ":"touchstart",f=>{if(l)return;n.event=f;const d=t.getDataIndexFromEvent(f);t.selectRectForSingle(i.node(),d),c?t.setOverOut(!0,d):t.callOverOutForTouch(d)},c?void 0:{passive:!0}).on("mouseout",c?u:null),c||i.on("touchstart",u,{passive:!0})},updateRadarShape(){const t=this,e=t.data.targets.filter(o=>t.isRadarType(o)),n=t.cache.get(Ei),r=t.$el.radar.shapes.selectAll("polygon").data(t.filterNullish(e)),i=r.enter().append("g").attr("class",t.getChartClass("Radar"));t.$T(r.exit()).remove(),i.append("polygon").merge(r).style("fill",t.color).style("stroke",t.color).attr("points",o=>n[o.id].join(" ")),t.updateTargetForCircle(e,i)},radarCircleX(t){return this.cache.get(Ei)[t.id][t.index][0]},radarCircleY(t){return this.cache.get(Ei)[t.id][t.index][1]}},QI={radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_axis_text_position:{},radar_level_depth:3,radar_level_show:!0,radar_level_text_format:t=>t%1===0?t:t.toFixed(2),radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1};let Up=()=>(Si([tp.eventrect,Ys,JI],[Wa,QI,{axis_x_categories:ep.optAxis.axis_x_categories}]),(Up=()=>kt.RADAR)());var _I={scatter_zerobased:!1};let kp=()=>(mo([Ti,Ys],[Wa,_I]),(kp=()=>kt.SCATTER)());function qI(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 el(t,e,n,r,i){for(var o=t.children,s,l=-1,c=o.length,u=t.value&&(r-e)/t.value;++l<c;)s=o[l],s.y0=n,s.y1=i,s.x0=e,s.x1=e+=s.value*u}function nl(t,e,n,r,i){for(var o=t.children,s,l=-1,c=o.length,u=t.value&&(i-n)/t.value;++l<c;)s=o[l],s.x0=e,s.x1=r,s.y0=n,s.y1=n+=s.value*u}var Gp=(1+Math.sqrt(5))/2;function Xp(t,e,n,r,i,o){for(var s=[],l=e.children,c,u,f=0,d=0,h=l.length,m,S,E=e.value,C,w,N,z,$,G,V;f<h;){m=i-n,S=o-r;do C=l[d++].value;while(!C&&d<h);for(w=N=C,G=Math.max(S/m,m/S)/(E*t),V=C*C*G,$=Math.max(N/V,V/w);d<h;++d){if(C+=u=l[d].value,u<w&&(w=u),u>N&&(N=u),V=C*C*G,z=Math.max(N/V,V/w),z>$){C-=u;break}$=z}s.push(c={value:C,dice:m<S,children:l.slice(f,d)}),c.dice?el(c,n,r,i,E?r+=S*C/E:o):nl(c,n,r,E?n+=m*C/E:i,o),E-=C,f=d}return s}var Wp=(function t(e){function n(r,i,o,s,l){Xp(e,r,i,o,s,l)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Gp);function Mw(t){return t==null?null:Vp(t)}function Vp(t){if(typeof t!="function")throw new Error;return t}function xo(){return 0}function yo(t){return function(){return t}}function tR(){var t=Wp,e=!1,n=1,r=1,i=[0],o=xo,s=xo,l=xo,c=xo,u=xo;function f(h){return h.x0=h.y0=0,h.x1=n,h.y1=r,h.eachBefore(d),i=[0],e&&h.eachBefore(qI),h}function d(h){var m=i[h.depth],S=h.x0+m,E=h.y0+m,C=h.x1-m,w=h.y1-m;C<S&&(S=C=(S+C)/2),w<E&&(E=w=(E+w)/2),h.x0=S,h.y0=E,h.x1=C,h.y1=w,h.children&&(m=i[h.depth+1]=o(h)/2,S+=u(h)-m,E+=s(h)-m,C-=l(h)-m,w-=c(h)-m,C<S&&(S=C=(S+C)/2),w<E&&(E=w=(E+w)/2),t(h,S,E,C,w))}return f.round=function(h){return arguments.length?(e=!!h,f):e},f.size=function(h){return arguments.length?(n=+h[0],r=+h[1],f):[n,r]},f.tile=function(h){return arguments.length?(t=Vp(h),f):t},f.padding=function(h){return arguments.length?f.paddingInner(h).paddingOuter(h):f.paddingInner()},f.paddingInner=function(h){return arguments.length?(o=typeof h=="function"?h:yo(+h),f):o},f.paddingOuter=function(h){return arguments.length?f.paddingTop(h).paddingRight(h).paddingBottom(h).paddingLeft(h):f.paddingTop()},f.paddingTop=function(h){return arguments.length?(s=typeof h=="function"?h:yo(+h),f):s},f.paddingRight=function(h){return arguments.length?(l=typeof h=="function"?h:yo(+h),f):l},f.paddingBottom=function(h){return arguments.length?(c=typeof h=="function"?h:yo(+h),f):c},f.paddingLeft=function(h){return arguments.length?(u=typeof h=="function"?h:yo(+h),f):u},f}function jp(t,e,n,r,i){var o=t.children,s,l=o.length,c,u=new Array(l+1);for(u[0]=c=s=0;s<l;++s)u[s+1]=c+=o[s].value;f(0,l,t.value,e,n,r,i);function f(d,h,m,S,E,C,w){if(d>=h-1){var N=o[d];N.x0=S,N.y0=E,N.x1=C,N.y1=w;return}for(var z=u[d],$=m/2+z,G=d+1,V=h-1;G<V;){var J=G+V>>>1;u[J]<$?G=J+1:V=J}$-u[G-1]<u[G]-$&&d+1<G&&--G;var Q=u[G]-z,rt=m-Q;if(C-S>w-E){var et=m?(S*rt+C*Q)/m:C;f(d,G,Q,S,E,et,w),f(G,h,rt,et,E,C,w)}else{var st=m?(E*rt+w*Q)/m:w;f(d,G,Q,S,E,C,st),f(G,h,rt,S,st,C,w)}}}function eR(t,e,n,r,i){(t.depth&1?nl:el)(t,e,n,r,i)}var nR=(function t(e){function n(r,i,o,s,l){if((c=r._squarify)&&c.ratio===e)for(var c,u,f,d,h=-1,m,S=c.length,E=r.value;++h<S;){for(u=c[h],f=u.children,d=u.value=0,m=f.length;d<m;++d)u.value+=f[d].value;u.dice?el(u,i,o,s,E?o+=(l-o)*u.value/E:l):nl(u,i,o,E?i+=(s-i)*u.value/E:s,l),E-=u.value}else r._squarify=c=Xp(e,r,i,o,s,l),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(Gp);function rR(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function aR(){return this.eachAfter(rR)}function iR(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function oR(t,e){for(var n=this,r=[n],i,o,s=-1;n=r.pop();)if(t.call(e,n,++s,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function sR(t,e){for(var n=this,r=[n],i=[],o,s,l,c=-1;n=r.pop();)if(i.push(n),o=n.children)for(s=0,l=o.length;s<l;++s)r.push(o[s]);for(;n=i.pop();)t.call(e,n,++c,this);return this}function lR(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function cR(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})}function uR(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function fR(t){for(var e=this,n=dR(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r}function dR(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function hR(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function gR(){return Array.from(this)}function vR(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function pR(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*mR(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function Iu(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=TR)):e===void 0&&(e=yR);for(var n=new rl(t),r,i=[n],o,s,l,c;r=i.pop();)if((s=e(r.data))&&(c=(s=Array.from(s)).length))for(r.children=s,l=c-1;l>=0;--l)i.push(o=s[l]=new rl(s[l])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(SR)}function xR(){return Iu(this).eachBefore(bR)}function yR(t){return t.children}function TR(t){return Array.isArray(t)?t[1]:null}function bR(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function SR(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function rl(t){this.data=t,this.depth=this.height=0,this.parent=null}rl.prototype=Iu.prototype={constructor:rl,count:aR,each:iR,eachAfter:sR,eachBefore:oR,find:lR,sum:cR,sort:uR,path:fR,ancestors:hR,descendants:gR,leaves:vR,links:pR,copy:xR,[Symbol.iterator]:mR};function AR(t){const e=this;return t.map(n=>{const{id:r,values:i}=n,{value:o}=i[0];return{name:r,id:r,value:o,ratio:e.getRatio("treemap",i[0])}})}var ER={initTreemapLayout(){this.treemap=tR().tile(this.getTreemapTile())},getTreemapTile(){var t,e;const n=this,{config:r,state:{current:{width:i,height:o}}}=n,s=(e={binary:jp,dice:el,slice:nl,sliceDice:eR,squarify:Wp,resquarify:nR}[(t=r.treemap_tile)!=null?t:"binary"])!=null?e:jp;return(l,c,u,f,d)=>{s(l,0,0,i,o);for(const h of l.children)h.x0=c+h.x0/i*(f-c),h.x1=c+h.x1/i*(f-c),h.y0=u+h.y0/o*(d-u),h.y1=u+h.y1/o*(d-u)}},getTreemapData(t){const e=this;return{name:"root",children:AR.bind(e)(e.filterTargetsToShow(t.filter(e.isTreemapType,e)))}},getTreemapRoot(t){const e=this,n=e.getTreemapData(t!=null?t:e.data.targets),r=Iu(n).sum(o=>o.value),i=e.getSortCompareFn(!0);return e.treemap||e.initTreemapLayout(),e.treemap(i?r.sort(i):r)}},CR=Object.defineProperty,IR=Object.defineProperties,RR=Object.getOwnPropertyDescriptors,Hp=Object.getOwnPropertySymbols,wR=Object.prototype.hasOwnProperty,OR=Object.prototype.propertyIsEnumerable,Yp=(t,e,n)=>e in t?CR(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,PR=(t,e)=>{for(var n in e||(e={}))wR.call(e,n)&&Yp(t,n,e[n]);if(Hp)for(var n of Hp(e))OR.call(e,n)&&Yp(t,n,e[n]);return t},MR=(t,e)=>IR(t,RR(e));function LR(t,e){const n=this;t.selectAll("g").attr("transform",r=>{const i=ai(n,r,e);return`translate(${i.x},${i.y})`}).select("rect").attr("width",r=>ai(n,r,e).w).attr("height",r=>ai(n,r,e).h)}var DR=MR(PR({},ER),{initTreemap(){const t=this,{$el:e,state:{current:{width:n,height:r},clip:i,datetimeId:o}}=t;i.id=`${o}-clip`,t.initTreemapLayout(),e.defs.append("clipPath").attr("id",i.id).append("rect").attr("width",n).attr("height",r),e.treemap=e.main.select(`.${Ue.chart}`).attr("clip-path",`url(#${i.id})`).append("g").classed(vh.chartTreemaps,!0),t.bindTreemapEvent()},bindTreemapEvent(){const t=this,{$el:e,config:n,state:r}=t,i=o=>{var s;const l=o.isTrusted?o.target:(s=r.eventReceiver.rect)==null?void 0:s.node();let c;return l&&/^rect$/i.test(l.tagName)&&(r.event=o,c=Ut(l).datum()),c==null?void 0:c.data};if(n.interaction_enabled){const o=r.inputType==="touch";e.treemap.on(o?"touchstart":"mouseover mousemove",s=>{const l=i(s);l&&(t.showTooltip([l],s.currentTarget),/^(touchstart|mouseover)$/.test(s.type)&&t.setOverOut(!0,l))},o?{passive:!0}:void 0).on(o?"touchend":"mouseout",s=>{const l=i(s);n.interaction_onout&&(t.hideTooltip(),t.setOverOut(!1,l))})}},updateTargetsForTreemap(t){const e=this,{$el:{treemap:n}}=e,r=[e.getTreemapRoot(t!=null?t:e.data.targets)];n.data(e.filterNullish(r))},updateTreemap(t){const e=this,{$el:n,$T:r}=e,i=n.treemap.datum(),o=e.getChartClass("Treemap"),s=e.getClass("treemap",!0),l=n.treemap.selectAll("g").data(i.children);r(l.exit(),t).style("opacity","0").remove(),l.enter().append("g").append("rect"),n.treemap.selectAll("g").attr("class",o).select("rect").attr("class",s).attr("fill",c=>e.color(c.data.name))},generateGetTreemapPoints(){const t=this,{$el:e}=t,n={};return e.treemap.selectAll("g").each(r=>{const i=ai(t,r);n[r.data.name]=[[i.x,i.y],[i.x+i.w,i.y+i.h]]}),r=>n[r.id]},redrawTreemap(t){const e=this,{$el:n,state:{current:{width:r,height:i}}}=e;return n.defs.select("rect").attr("width",r).attr("height",i),[e.$T(n.treemap,t,Pr()).call(LR.bind(e),n.treemap.datum())]},treemapDataLabelFormat(t){const e=this,{$el:{treemap:n},config:r,scale:{x:i,y:o}}=e,{id:s,value:l}=t,c=r.treemap_label_format,u=e.getRatio("treemap",t),f=(u*100).toFixed(2),d=r.treemap_label_show&&Hc.call(e,u,"treemap")?null:"0",h=n.selectAll("g").filter(E=>E.data.id===s).datum();let m=0,S=0;if(h){const{x0:E,x1:C,y0:w,y1:N}=h;m=i(C)-i(E),S=o(N)-o(w)}return function(E){return E.style("opacity",d),ue(c)?c.bind(e.api)(l,u,s,{width:m,height:S}):`${s}
|
|
61
|
+
${f}%`}}}),FR={treemap_tile:"binary",treemap_label_format:void 0,treemap_label_threshold:.05,treemap_label_show:!0};let Kp=()=>(mo([DR],[FR]),(Kp=()=>kt.TREEMAP)()),Ru=Object.create(null);const Zp={version:"4.1.0-next.2",generate(t){const e=Kr(Object.create(null),Ru,t),n=new Jn(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults(t){return Ke(t)&&(Ru=t),Ru},instance:[],plugin:{}};Object.keys(v).forEach(t=>v[t]()),Object.keys(g).forEach(t=>g[t]()),uv(),fv(),Av(),Xv(),cv(),iv()})],bo={};function rr(T){var P=bo[T];if(P!==void 0)return P.exports;var a=bo[T]={exports:{}};return wu[T].call(a.exports,a,a.exports,rr),a.exports}(function(){rr.d=function(T,P){if(Array.isArray(P))for(var a=0;a<P.length;){var g=P[a++],v=P[a++];rr.o(T,g)?v===0&&a++:v===0?Object.defineProperty(T,g,{enumerable:!0,value:P[a++]}):Object.defineProperty(T,g,{enumerable:!0,get:v})}else for(var g in P)rr.o(P,g)&&!rr.o(T,g)&&Object.defineProperty(T,g,{enumerable:!0,get:P[g]})}})(),(function(){rr.o=function(T,P){return Object.prototype.hasOwnProperty.call(T,P)}})(),(function(){rr.r=function(T){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(T,"__esModule",{value:!0})}})(),rr(0);var So=rr(627);return So})()});
|