billboard.js 4.0.1 → 4.0.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/CONTRIBUTING.md +2 -2
- package/README.md +6 -6
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +71 -26
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +18 -18
- package/dist/billboard.pkgd.js +288 -243
- package/dist/billboard.pkgd.min.js +23 -23
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +21 -6
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +21 -6
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-stanford.js +21 -6
- package/dist/plugin/billboardjs-plugin-stanford.min.js +5 -5
- package/dist/plugin/billboardjs-plugin-tableview.js +21 -6
- package/dist/plugin/billboardjs-plugin-tableview.min.js +3 -3
- package/dist/plugin/billboardjs-plugin-textoverlap.js +21 -6
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +2 -2
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +67 -52
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +8 -8
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +23 -8
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +9 -9
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +73 -58
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +9 -9
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +21 -6
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +32 -17
- 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 +1 -1
- package/dist-esm/Chart/api/axis.js +1 -1
- package/dist-esm/Chart/api/category.js +1 -1
- package/dist-esm/Chart/api/chart.js +1 -1
- package/dist-esm/Chart/api/color.js +1 -1
- package/dist-esm/Chart/api/data.js +1 -1
- package/dist-esm/Chart/api/export.js +1 -1
- package/dist-esm/Chart/api/flow.js +1 -1
- package/dist-esm/Chart/api/focus.js +1 -1
- package/dist-esm/Chart/api/grid.js +1 -1
- package/dist-esm/Chart/api/group.js +1 -1
- package/dist-esm/Chart/api/legend.js +1 -1
- package/dist-esm/Chart/api/load.js +1 -1
- package/dist-esm/Chart/api/regions.js +1 -1
- package/dist-esm/Chart/api/selection.js +1 -1
- package/dist-esm/Chart/api/show.js +1 -1
- package/dist-esm/Chart/api/stubs.js +1 -1
- package/dist-esm/Chart/api/subchart.js +1 -1
- package/dist-esm/Chart/api/tooltip.js +1 -1
- package/dist-esm/Chart/api/x.js +1 -1
- package/dist-esm/Chart/api/zoom.js +1 -1
- package/dist-esm/ChartInternal/Axis/Axis.js +1 -1
- package/dist-esm/ChartInternal/Axis/AxisRenderer.js +1 -1
- package/dist-esm/ChartInternal/Axis/AxisRendererHelper.js +1 -1
- package/dist-esm/ChartInternal/ChartInternal.js +1 -1
- package/dist-esm/ChartInternal/data/convert.helper.js +1 -1
- package/dist-esm/ChartInternal/data/convert.js +1 -1
- package/dist-esm/ChartInternal/data/data.js +1 -1
- package/dist-esm/ChartInternal/data/load.js +1 -1
- package/dist-esm/ChartInternal/interactions/drag.js +1 -1
- package/dist-esm/ChartInternal/interactions/eventrect.js +39 -7
- package/dist-esm/ChartInternal/interactions/flow.js +1 -1
- package/dist-esm/ChartInternal/interactions/interaction.js +1 -1
- package/dist-esm/ChartInternal/interactions/subchart.js +1 -1
- package/dist-esm/ChartInternal/interactions/zoom.js +1 -1
- package/dist-esm/ChartInternal/internals/category.js +1 -1
- package/dist-esm/ChartInternal/internals/class.js +1 -1
- package/dist-esm/ChartInternal/internals/clip.js +1 -1
- package/dist-esm/ChartInternal/internals/color.js +1 -1
- package/dist-esm/ChartInternal/internals/domain.js +1 -1
- package/dist-esm/ChartInternal/internals/format.js +1 -1
- package/dist-esm/ChartInternal/internals/grid.js +1 -1
- package/dist-esm/ChartInternal/internals/legend.js +1 -1
- package/dist-esm/ChartInternal/internals/redraw.js +1 -1
- package/dist-esm/ChartInternal/internals/region.js +1 -1
- package/dist-esm/ChartInternal/internals/scale.js +1 -1
- package/dist-esm/ChartInternal/internals/selection.js +1 -1
- package/dist-esm/ChartInternal/internals/size.axis.js +1 -1
- package/dist-esm/ChartInternal/internals/size.js +1 -1
- package/dist-esm/ChartInternal/internals/style.js +1 -1
- package/dist-esm/ChartInternal/internals/text.arc.js +1 -1
- package/dist-esm/ChartInternal/internals/text.js +1 -1
- package/dist-esm/ChartInternal/internals/text.util.js +1 -1
- package/dist-esm/ChartInternal/internals/title.js +1 -1
- package/dist-esm/ChartInternal/internals/tooltip.js +1 -1
- package/dist-esm/ChartInternal/internals/transform.js +1 -1
- package/dist-esm/ChartInternal/internals/type.js +1 -1
- package/dist-esm/ChartInternal/shape/arc.js +1 -1
- package/dist-esm/ChartInternal/shape/area.js +1 -1
- package/dist-esm/ChartInternal/shape/bar.js +1 -1
- package/dist-esm/ChartInternal/shape/bubble.js +1 -1
- package/dist-esm/ChartInternal/shape/candlestick.js +1 -1
- package/dist-esm/ChartInternal/shape/core/barRadius.js +1 -1
- package/dist-esm/ChartInternal/shape/core/bubble.js +1 -1
- package/dist-esm/ChartInternal/shape/core/candlestick.js +1 -1
- package/dist-esm/ChartInternal/shape/core/dataRegion.js +1 -1
- package/dist-esm/ChartInternal/shape/core/geometry.js +1 -1
- package/dist-esm/ChartInternal/shape/core/path.js +1 -1
- package/dist-esm/ChartInternal/shape/core/point.js +1 -1
- package/dist-esm/ChartInternal/shape/core/treemap.js +1 -1
- package/dist-esm/ChartInternal/shape/funnel.js +1 -1
- package/dist-esm/ChartInternal/shape/gauge.js +1 -1
- package/dist-esm/ChartInternal/shape/line.js +1 -1
- package/dist-esm/ChartInternal/shape/point.js +1 -1
- package/dist-esm/ChartInternal/shape/polar.js +1 -1
- package/dist-esm/ChartInternal/shape/radar.js +1 -1
- package/dist-esm/ChartInternal/shape/shape.js +1 -1
- package/dist-esm/ChartInternal/shape/treemap.js +1 -1
- package/dist-esm/canvas/CanvasAxisRenderer.js +1 -1
- package/dist-esm/canvas/CanvasEngine.js +1 -1
- package/dist-esm/canvas/CanvasPainter.js +1 -1
- package/dist-esm/canvas/CanvasRenderer.js +4 -4
- package/dist-esm/canvas/CanvasTheme.js +1 -1
- package/dist-esm/canvas/HitDetector.js +1 -1
- package/dist-esm/canvas/axisTicks.js +1 -1
- package/dist-esm/canvas/classes.js +1 -1
- package/dist-esm/canvas/color.js +1 -1
- package/dist-esm/canvas/geometry.js +1 -1
- package/dist-esm/canvas/labels.js +1 -1
- package/dist-esm/canvas/pointPattern.js +1 -1
- package/dist-esm/canvas/util.js +1 -1
- package/dist-esm/config/Options/Options.js +1 -1
- package/dist-esm/config/Options/axis/axis.js +1 -1
- package/dist-esm/config/Options/axis/x.js +1 -1
- package/dist-esm/config/Options/axis/y.js +1 -1
- package/dist-esm/config/Options/axis/y2.js +1 -1
- package/dist-esm/config/Options/common/boost.js +1 -1
- package/dist-esm/config/Options/common/color.js +1 -1
- package/dist-esm/config/Options/common/grid.js +1 -1
- package/dist-esm/config/Options/common/legend.js +1 -1
- package/dist-esm/config/Options/common/main.js +1 -1
- package/dist-esm/config/Options/common/point.js +1 -1
- package/dist-esm/config/Options/common/title.js +1 -1
- package/dist-esm/config/Options/common/tooltip.js +1 -1
- package/dist-esm/config/Options/data/axis.js +1 -1
- package/dist-esm/config/Options/data/data.js +1 -1
- package/dist-esm/config/Options/data/selection.js +1 -1
- package/dist-esm/config/Options/interaction/interaction.js +1 -1
- package/dist-esm/config/Options/interaction/subchart.js +1 -1
- package/dist-esm/config/Options/interaction/zoom.js +1 -1
- package/dist-esm/config/Options/shape/arc.js +1 -1
- package/dist-esm/config/Options/shape/area.js +1 -1
- package/dist-esm/config/Options/shape/bar.js +1 -1
- package/dist-esm/config/Options/shape/bubble.js +1 -1
- package/dist-esm/config/Options/shape/candlestick.js +1 -1
- package/dist-esm/config/Options/shape/donut.js +1 -1
- package/dist-esm/config/Options/shape/funnel.js +1 -1
- package/dist-esm/config/Options/shape/gauge.js +1 -1
- package/dist-esm/config/Options/shape/line.js +1 -1
- package/dist-esm/config/Options/shape/pie.js +1 -1
- package/dist-esm/config/Options/shape/polar.js +1 -1
- package/dist-esm/config/Options/shape/radar.js +1 -1
- package/dist-esm/config/Options/shape/scatter.js +1 -1
- package/dist-esm/config/Options/shape/spline.js +1 -1
- package/dist-esm/config/Options/shape/treemap.js +1 -1
- package/dist-esm/config/Store/Element.js +1 -1
- package/dist-esm/config/Store/State.js +1 -1
- package/dist-esm/config/Store/Store.js +1 -1
- package/dist-esm/config/classes.js +1 -1
- package/dist-esm/config/config.js +1 -1
- package/dist-esm/config/const.js +1 -1
- package/dist-esm/config/resolver/axis.core.js +1 -1
- package/dist-esm/config/resolver/axis.js +1 -1
- package/dist-esm/config/resolver/canvas.js +5 -4
- package/dist-esm/config/resolver/canvasShape.js +1 -1
- package/dist-esm/config/resolver/category.js +1 -1
- package/dist-esm/config/resolver/export.js +1 -1
- package/dist-esm/config/resolver/flow.js +1 -1
- package/dist-esm/config/resolver/grid.js +1 -1
- package/dist-esm/config/resolver/interaction/selection.js +1 -1
- package/dist-esm/config/resolver/interaction/subchart.js +1 -1
- package/dist-esm/config/resolver/interaction/zoom.js +1 -1
- package/dist-esm/config/resolver/regions.js +1 -1
- package/dist-esm/config/resolver/shape/arc.helpers.js +1 -1
- package/dist-esm/config/resolver/shape/area.js +1 -1
- package/dist-esm/config/resolver/shape/axis.helpers.js +1 -1
- package/dist-esm/config/resolver/shape/bar.js +1 -1
- package/dist-esm/config/resolver/shape/bubble.js +1 -1
- package/dist-esm/config/resolver/shape/candlestick.js +1 -1
- package/dist-esm/config/resolver/shape/donut.js +1 -1
- package/dist-esm/config/resolver/shape/funnel.js +1 -1
- package/dist-esm/config/resolver/shape/gauge.js +1 -1
- package/dist-esm/config/resolver/shape/line.js +1 -1
- package/dist-esm/config/resolver/shape/pie.js +1 -1
- package/dist-esm/config/resolver/shape/polar.js +1 -1
- package/dist-esm/config/resolver/shape/radar.js +1 -1
- package/dist-esm/config/resolver/shape/scatter.js +1 -1
- package/dist-esm/config/resolver/shape/treemap.js +1 -1
- package/dist-esm/core.js +3 -3
- package/dist-esm/index.canvas.js +1 -1
- package/dist-esm/index.esm.js +1 -1
- package/dist-esm/module/Cache.js +1 -1
- package/dist-esm/module/browser.js +1 -1
- package/dist-esm/module/dsv.js +1 -1
- package/dist-esm/module/error.js +1 -1
- package/dist-esm/module/generator.js +1 -1
- package/dist-esm/module/sanitize.js +1 -1
- package/dist-esm/module/util/brush.js +1 -1
- package/dist-esm/module/util/dom.js +1 -1
- package/dist-esm/module/util/object.js +1 -1
- package/dist-esm/module/util/type-checks.js +1 -1
- package/dist-esm/module/worker.js +1 -1
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +34 -59
- package/src/ChartInternal/interactions/eventrect.ts +47 -8
- package/src/canvas/CanvasRenderer.ts +2 -2
- package/src/config/resolver/canvas.ts +4 -3
|
@@ -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.0.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,47 +21,47 @@
|
|
|
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,ar){if(typeof exports=="object"&&typeof module=="object")module.exports=ar();else if(typeof define=="function"&&define.amd)define([],ar);else{var po=ar();for(var b in po)(typeof exports=="object"?exports:vo)[b]=po[b]}})(this,function(){return(function(){"use strict";var pu=[(function(b,O,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(b,O,a){a(2),a(91),a(93),a(94),a(99)}),(function(b,O,a){var g=a(3),v=a(4),p=a(8),x=a(14),y=a(36),T=a(6),S=a(26),E=a(7),I=a(38),w=a(24),M=a(46),D=a(12),L=a(18),N=a(68),F=a(11),k=a(71),G=a(73),U=a(57),X=a(75),V=a(66),j=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,wt=Tt.getterFor(Pt),Bt=Object[pt],Qt=v.Symbol,Ot=Qt&&Qt[pt],Wt=v.RangeError,ae=v.TypeError,pe=v.QObject,oe=j.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=T&&E(function(){return k(de({},"a",{get:function(){return de(this,"a",{value:7}).a}})).a!==7})?ne:de,nn=function(Xt,Mt){var $t=he[Xt]=k(Ot);return mt($t,{type:Pt,tag:Xt,description:Mt}),T||($t.description=Mt),$t},Ht=function(Mt,$t,qt){Mt===Bt&&Ht(ye,$t,qt),M(Mt);var Nt=L($t);return M(qt),I(he,Nt)?(("enumerable"in qt?!qt.enumerable:!I(Mt,Nt)||I(Mt,Lt)&&Mt[Lt][Nt])?(I(Mt,Lt)||de(Mt,Lt,F(1,k(null))),Mt[Lt][Nt]=!0):(I(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){(!T||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&&I(he,$t)&&!I(ye,$t)?!1:qt||!I(this,$t)||!I(he,$t)||I(this,Lt)&&this[Lt][$t]?qt:!0},we=function(Mt,$t){var qt=D(Mt),Nt=L($t);if(!(qt===Bt&&I(he,Nt)&&!I(ye,Nt))){var be=oe(qt,Nt);return be&&I(he,Nt)&&!(I(qt,Lt)&&qt[Lt][Nt])&&(be.enumerable=!0),be}},an=function(Mt){var $t=Re(D(Mt)),qt=[];return Ft($t,function(Nt){!I(he,Nt)&&!I(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){I(he,Nt)&&(!Mt||I(Bt,Nt))&&Ee(qt,he[Nt])}),qt};S||(Qt=function(){if(w(Ot,this))throw new ae("Symbol is not a constructor");var Mt=!arguments.length||arguments[0]===void 0?void 0:N(arguments[0]),$t=st(Mt),qt=function(Nt){var be=this===void 0?v:this;be===Bt&&p(qt,ye,Nt),I(be,Lt)&&I(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 T&&Vt&&re(Bt,$t,{configurable:!0,set:qt}),nn($t,Mt)},Ot=Qt[pt],K(Ot,"toString",function(){return wt(this).tag}),K(Qt,"withoutSetter",function(Xt){return nn(st(Xt),Xt)}),Q.f=se,Y.f=Ht,Z.f=ee,j.f=we,U.f=X.f=an,V.f=It,ht.f=function(Xt){return nn(ct(Xt),Xt)},T&&(tt(Ot,"description",{configurable:!0,get:function(){return wt(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:!T},{create:ve,defineProperty:Ht,defineProperties:ee,getOwnPropertyDescriptor:we}),g({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:an}),yt(),Ct(Qt,Pt),it[Lt]=!0}),(function(b,O,a){var g=a(4),v=a(5).f,p=a(43),x=a(47),y=a(37),T=a(55),S=a(67);b.exports=function(E,I){var w=E.target,M=E.global,D=E.stat,L,N,F,k,G,U;if(M?N=g:D?N=g[w]||y(w,{}):N=g[w]&&g[w].prototype,N)for(F in I){if(G=I[F],E.dontCallGetSet?(U=v(N,F),k=U&&U.value):k=N[F],L=S(M?F:w+(D?".":"#")+F,E.forced),!L&&k!==void 0){if(typeof G==typeof k)continue;T(G,k)}(E.sham||k&&k.sham)&&p(G,"sham",!0),x(N,F,G,E)}}}),(function(b){var O=function(a){return a&&a.Math===Math&&a};b.exports=O(typeof globalThis=="object"&&globalThis)||O(typeof window=="object"&&window)||O(typeof self=="object"&&self)||O(typeof global=="object"&&global)||O(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()}),(function(b,O,a){var g=a(6),v=a(8),p=a(10),x=a(11),y=a(12),T=a(18),S=a(38),E=a(41),I=Object.getOwnPropertyDescriptor;O.f=g?I:function(M,D){if(M=y(M),D=T(D),E)try{return I(M,D)}catch(L){}if(S(M,D))return x(!v(p.f,M,D),M[D])}}),(function(b,O,a){var g=a(7);b.exports=!g(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),(function(b){b.exports=function(O){try{return!!O()}catch(a){return!0}}}),(function(b,O,a){var g=a(9),v=Function.prototype.call;b.exports=g?v.bind(v):function(){return v.apply(v,arguments)}}),(function(b,O,a){var g=a(7);b.exports=!g(function(){var v=function(){}.bind();return typeof v!="function"||v.hasOwnProperty("prototype")})}),(function(b,O){var a={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,v=g&&!a.call({1:2},1);O.f=v?function(x){var y=g(this,x);return!!y&&y.enumerable}:a}),(function(b){b.exports=function(O,a){return{enumerable:!(O&1),configurable:!(O&2),writable:!(O&4),value:a}}}),(function(b,O,a){var g=a(13),v=a(16);b.exports=function(p){return g(v(p))}}),(function(b,O,a){var g=a(14),v=a(7),p=a(15),x=Object,y=g("".split);b.exports=v(function(){return!x("z").propertyIsEnumerable(0)})?function(T){return p(T)==="String"?y(T,""):x(T)}:x}),(function(b,O,a){var g=a(9),v=Function.prototype,p=v.call,x=g&&v.bind.bind(p,p);b.exports=g?x:function(y){return function(){return p.apply(y,arguments)}}}),(function(b,O,a){var g=a(14),v=g({}.toString),p=g("".slice);b.exports=function(x){return p(v(x),8,-1)}}),(function(b,O,a){var g=a(17),v=TypeError;b.exports=function(p){if(g(p))throw new v("Can't call method on "+p);return p}}),(function(b){b.exports=function(O){return O==null}}),(function(b,O,a){var g=a(19),v=a(22);b.exports=function(p){var x=g(p,"string");return v(x)?x:x+""}}),(function(b,O,a){var g=a(8),v=a(20),p=a(22),x=a(29),y=a(32),T=a(33),S=TypeError,E=T("toPrimitive");b.exports=function(I,w){if(!v(I)||p(I))return I;var M=x(I,E),D;if(M){if(w===void 0&&(w="default"),D=g(M,I,w),!v(D)||p(D))return D;throw new S("Can't convert object to primitive value")}return w===void 0&&(w="number"),y(I,w)}}),(function(b,O,a){var g=a(21);b.exports=function(v){return typeof v=="object"?v!==null:g(v)}}),(function(b){var O=typeof document=="object"&&document.all;b.exports=typeof O=="undefined"&&O!==void 0?function(a){return typeof a=="function"||a===O}:function(a){return typeof a=="function"}}),(function(b,O,a){var g=a(23),v=a(21),p=a(24),x=a(25),y=Object;b.exports=x?function(T){return typeof T=="symbol"}:function(T){var S=g("Symbol");return v(S)&&p(S.prototype,y(T))}}),(function(b,O,a){var g=a(4),v=a(21),p=function(x){return v(x)?x:void 0};b.exports=function(x,y){return arguments.length<2?p(g[x]):g[x]&&g[x][y]}}),(function(b,O,a){var g=a(14);b.exports=g({}.isPrototypeOf)}),(function(b,O,a){var g=a(26);b.exports=g&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),(function(b,O,a){var g=a(27),v=a(7),p=a(4),x=p.String;b.exports=!!Object.getOwnPropertySymbols&&!v(function(){var y=Symbol("symbol detection");return!x(y)||!(Object(y)instanceof Symbol)||!Symbol.sham&&g&&g<41})}),(function(b,O,a){var g=a(4),v=a(28),p=g.process,x=g.Deno,y=p&&p.versions||x&&x.version,T=y&&y.v8,S,E;T&&(S=T.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]))),b.exports=E}),(function(b,O,a){var g=a(4),v=g.navigator,p=v&&v.userAgent;b.exports=p?String(p):""}),(function(b,O,a){var g=a(30),v=a(17);b.exports=function(p,x){var y=p[x];return v(y)?void 0:g(y)}}),(function(b,O,a){var g=a(21),v=a(31),p=TypeError;b.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not a function")}}),(function(b){var O=String;b.exports=function(a){try{return O(a)}catch(g){return"Object"}}}),(function(b,O,a){var g=a(8),v=a(21),p=a(20),x=TypeError;b.exports=function(y,T){var S,E;if(T==="string"&&v(S=y.toString)&&!p(E=g(S,y))||v(S=y.valueOf)&&!p(E=g(S,y))||T!=="string"&&v(S=y.toString)&&!p(E=g(S,y)))return E;throw new x("Can't convert object to primitive value")}}),(function(b,O,a){var g=a(4),v=a(34),p=a(38),x=a(40),y=a(26),T=a(25),S=g.Symbol,E=v("wks"),I=T?S.for||S:S&&S.withoutSetter||x;b.exports=function(w){return p(E,w)||(E[w]=y&&p(S,w)?S[w]:I("Symbol."+w)),E[w]}}),(function(b,O,a){var g=a(35);b.exports=function(v,p){return g[v]||(g[v]=p||{})}}),(function(b,O,a){var g=a(36),v=a(4),p=a(37),x="__core-js_shared__",y=b.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(b){b.exports=!1}),(function(b,O,a){var g=a(4),v=Object.defineProperty;b.exports=function(p,x){try{v(g,p,{value:x,configurable:!0,writable:!0})}catch(y){g[p]=x}return x}}),(function(b,O,a){var g=a(14),v=a(39),p=g({}.hasOwnProperty);b.exports=Object.hasOwn||function(y,T){return p(v(y),T)}}),(function(b,O,a){var g=a(16),v=Object;b.exports=function(p){return v(g(p))}}),(function(b,O,a){var g=a(14),v=0,p=Math.random(),x=g(1.1.toString);b.exports=function(y){return"Symbol("+(y===void 0?"":y)+")_"+x(++v+p,36)}}),(function(b,O,a){var g=a(6),v=a(7),p=a(42);b.exports=!g&&!v(function(){return Object.defineProperty(p("div"),"a",{get:function(){return 7}}).a!==7})}),(function(b,O,a){var g=a(4),v=a(20),p=g.document,x=v(p)&&v(p.createElement);b.exports=function(y){return x?p.createElement(y):{}}}),(function(b,O,a){var g=a(6),v=a(44),p=a(11);b.exports=g?function(x,y,T){return v.f(x,y,p(1,T))}:function(x,y,T){return x[y]=T,x}}),(function(b,O,a){var g=a(6),v=a(41),p=a(45),x=a(46),y=a(18),T=TypeError,S=Object.defineProperty,E=Object.getOwnPropertyDescriptor,I="enumerable",w="configurable",M="writable";O.f=g?p?function(L,N,F){if(x(L),N=y(N),x(F),typeof L=="function"&&N==="prototype"&&"value"in F&&M in F&&!F[M]){var k=E(L,N);k&&k[M]&&(L[N]=F.value,F={configurable:w in F?F[w]:k[w],enumerable:I in F?F[I]:k[I],writable:!1})}return S(L,N,F)}:S:function(L,N,F){if(x(L),N=y(N),x(F),v)try{return S(L,N,F)}catch(k){}if("get"in F||"set"in F)throw new T("Accessors not supported");return"value"in F&&(L[N]=F.value),L}}),(function(b,O,a){var g=a(6),v=a(7);b.exports=g&&v(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}),(function(b,O,a){var g=a(20),v=String,p=TypeError;b.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not an object")}}),(function(b,O,a){var g=a(21),v=a(44),p=a(48),x=a(37);b.exports=function(y,T,S,E){E||(E={});var I=E.enumerable,w=E.name!==void 0?E.name:T;if(g(S)&&p(S,w,E),E.global)I?y[T]=S:x(T,S);else{try{E.unsafe?y[T]&&(I=!0):delete y[T]}catch(M){}I?y[T]=S:v.f(y,T,{value:S,enumerable:!1,configurable:!E.nonConfigurable,writable:!E.nonWritable})}return y}}),(function(b,O,a){var g=a(14),v=a(7),p=a(21),x=a(38),y=a(6),T=a(49).CONFIGURABLE,S=a(50),E=a(51),I=E.enforce,w=E.get,M=String,D=Object.defineProperty,L=g("".slice),N=g("".replace),F=g([].join),k=y&&!v(function(){return D(function(){},"length",{value:8}).length!==8}),G=String(String).split("String"),U=b.exports=function(X,V,j){L(M(V),0,7)==="Symbol("&&(V="["+N(M(V),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),j&&j.getter&&(V="get "+V),j&&j.setter&&(V="set "+V),(!x(X,"name")||T&&X.name!==V)&&(y?D(X,"name",{value:V,configurable:!0}):X.name=V),k&&j&&x(j,"arity")&&X.length!==j.arity&&D(X,"length",{value:j.arity});try{j&&x(j,"constructor")&&j.constructor?y&&D(X,"prototype",{writable:!1}):X.prototype&&(X.prototype=void 0)}catch(Z){}var Y=I(X);return x(Y,"source")||(Y.source=F(G,typeof V=="string"?V:"")),X};Function.prototype.toString=U(function(){return p(this)&&w(this).source||S(this)},"toString")}),(function(b,O,a){var g=a(6),v=a(38),p=Function.prototype,x=g&&Object.getOwnPropertyDescriptor,y=v(p,"name"),T=y&&function(){}.name==="something",S=y&&(!g||g&&x(p,"name").configurable);b.exports={EXISTS:y,PROPER:T,CONFIGURABLE:S}}),(function(b,O,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)}),b.exports=p.inspectSource}),(function(b,O,a){var g=a(52),v=a(4),p=a(20),x=a(43),y=a(38),T=a(35),S=a(53),E=a(54),I="Object already initialized",w=v.TypeError,M=v.WeakMap,D,L,N,F=function(X){return N(X)?L(X):D(X,{})},k=function(X){return function(V){var j;if(!p(V)||(j=L(V)).type!==X)throw new w("Incompatible receiver, "+X+" required");return j}};if(g||T.state){var G=T.state||(T.state=new M);G.get=G.get,G.has=G.has,G.set=G.set,D=function(X,V){if(G.has(X))throw new w(I);return V.facade=X,G.set(X,V),V},L=function(X){return G.get(X)||{}},N=function(X){return G.has(X)}}else{var U=S("state");E[U]=!0,D=function(X,V){if(y(X,U))throw new w(I);return V.facade=X,x(X,U,V),V},L=function(X){return y(X,U)?X[U]:{}},N=function(X){return y(X,U)}}b.exports={set:D,get:L,has:N,enforce:F,getterFor:k}}),(function(b,O,a){var g=a(4),v=a(21),p=g.WeakMap;b.exports=v(p)&&/native code/.test(String(p))}),(function(b,O,a){var g=a(34),v=a(40),p=g("keys");b.exports=function(x){return p[x]||(p[x]=v(x))}}),(function(b){b.exports={}}),(function(b,O,a){var g=a(38),v=a(56),p=a(5),x=a(44);b.exports=function(y,T,S){for(var E=v(T),I=x.f,w=p.f,M=0;M<E.length;M++){var D=E[M];!g(y,D)&&!(S&&g(S,D))&&I(y,D,w(T,D))}}}),(function(b,O,a){var g=a(23),v=a(14),p=a(57),x=a(66),y=a(46),T=v([].concat);b.exports=g("Reflect","ownKeys")||function(E){var I=p.f(y(E)),w=x.f;return w?T(I,w(E)):I}}),(function(b,O,a){var g=a(58),v=a(65),p=v.concat("length","prototype");O.f=Object.getOwnPropertyNames||function(y){return g(y,p)}}),(function(b,O,a){var g=a(14),v=a(38),p=a(12),x=a(59).indexOf,y=a(54),T=g([].push);b.exports=function(S,E){var I=p(S),w=0,M=[],D;for(D in I)!v(y,D)&&v(I,D)&&T(M,D);for(;E.length>w;)v(I,D=E[w++])&&(~x(M,D)||T(M,D));return M}}),(function(b,O,a){var g=a(12),v=a(60),p=a(63),x=function(y){return function(T,S,E){var I=g(T),w=p(I);if(w===0)return!y&&-1;var M=v(E,w),D;if(y&&S!==S){for(;w>M;)if(D=I[M++],D!==D)return!0}else for(;w>M;M++)if((y||M in I)&&I[M]===S)return y||M||0;return!y&&-1}};b.exports={includes:x(!0),indexOf:x(!1)}}),(function(b,O,a){var g=a(61),v=Math.max,p=Math.min;b.exports=function(x,y){var T=g(x);return T<0?v(T+y,0):p(T,y)}}),(function(b,O,a){var g=a(62);b.exports=function(v){var p=+v;return p!==p||p===0?0:g(p)}}),(function(b){var O=Math.ceil,a=Math.floor;b.exports=Math.trunc||function(v){var p=+v;return(p>0?a:O)(p)}}),(function(b,O,a){var g=a(64);b.exports=function(v){return g(v.length)}}),(function(b,O,a){var g=a(61),v=Math.min;b.exports=function(p){var x=g(p);return x>0?v(x,9007199254740991):0}}),(function(b){b.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}),(function(b,O){O.f=Object.getOwnPropertySymbols}),(function(b,O,a){var g=a(7),v=a(21),p=/#|\.prototype\./,x=function(I,w){var M=T[y(I)];return M===E?!0:M===S?!1:v(w)?g(w):!!w},y=x.normalize=function(I){return String(I).replace(p,".").toLowerCase()},T=x.data={},S=x.NATIVE="N",E=x.POLYFILL="P";b.exports=x}),(function(b,O,a){var g=a(69),v=String;b.exports=function(p){if(g(p)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return v(p)}}),(function(b,O,a){var g=a(70),v=a(21),p=a(15),x=a(33),y=x("toStringTag"),T=Object,S=p((function(){return arguments})())==="Arguments",E=function(I,w){try{return I[w]}catch(M){}};b.exports=g?p:function(I){var w,M,D;return I===void 0?"Undefined":I===null?"Null":typeof(M=E(w=T(I),y))=="string"?M:S?p(w):(D=p(w))==="Object"&&v(w.callee)?"Arguments":D}}),(function(b,O,a){var g=a(33),v=g("toStringTag"),p={};p[v]="z",b.exports=String(p)==="[object z]"}),(function(b,O,a){var g=a(46),v=a(72),p=a(65),x=a(54),y=a(74),T=a(42),S=a(53),E=">",I="<",w="prototype",M="script",D=S("IE_PROTO"),L=function(){},N=function(X){return I+M+E+X+I+"/"+M+E},F=function(X){X.write(N("")),X.close();var V=X.parentWindow.Object;return X=null,V},k=function(){var X=T("iframe"),V="java"+M+":",j;return X.style.display="none",y.appendChild(X),X.src=String(V),j=X.contentWindow.document,j.open(),j.write(N("document.F=Object")),j.close(),j.F},G,U=function(){try{G=new ActiveXObject("htmlfile")}catch(V){}U=typeof document!="undefined"?document.domain&&G?F(G):k():F(G);for(var X=p.length;X--;)delete U[w][p[X]];return U()};x[D]=!0,b.exports=Object.create||function(V,j){var Y;return V!==null?(L[w]=g(V),Y=new L,L[w]=null,Y[D]=V):Y=U(),j===void 0?Y:v.f(Y,j)}}),(function(b,O,a){var g=a(6),v=a(45),p=a(44),x=a(46),y=a(12),T=a(73);O.f=g&&!v?Object.defineProperties:function(E,I){x(E);for(var w=y(I),M=T(I),D=M.length,L=0,N;D>L;)p.f(E,N=M[L++],w[N]);return E}}),(function(b,O,a){var g=a(58),v=a(65);b.exports=Object.keys||function(x){return g(x,v)}}),(function(b,O,a){var g=a(23);b.exports=g("document","documentElement")}),(function(b,O,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):[],T=function(S){try{return p(S)}catch(E){return x(y)}};b.exports.f=function(E){return y&&g(E)==="Window"?T(E):p(v(E))}}),(function(b,O,a){var g=a(14);b.exports=g([].slice)}),(function(b,O,a){var g=a(48),v=a(44);b.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(b,O,a){var g=a(33);O.f=g}),(function(b,O,a){var g=a(80),v=a(38),p=a(78),x=a(44).f;b.exports=function(y){var T=g.Symbol||(g.Symbol={});v(T,y)||x(T,y,{value:p.f(y)})}}),(function(b,O,a){var g=a(4);b.exports=g}),(function(b,O,a){var g=a(8),v=a(23),p=a(33),x=a(47);b.exports=function(){var y=v("Symbol"),T=y&&y.prototype,S=T&&T.valueOf,E=p("toPrimitive");T&&!T[E]&&x(T,E,function(I){return g(S,this)},{arity:1})}}),(function(b,O,a){var g=a(44).f,v=a(38),p=a(33),x=p("toStringTag");b.exports=function(y,T,S){y&&!S&&(y=y.prototype),y&&!v(y,x)&&g(y,x,{configurable:!0,value:T})}}),(function(b,O,a){var g=a(84),v=a(13),p=a(39),x=a(63),y=a(86),T=a(90),S=function(E){var I=E===1,w=E===2,M=E===3,D=E===4,L=E===6,N=E===7,F=E===5||L;return function(k,G,U){for(var X=p(k),V=v(X),j=x(V),Y=g(G,U),Z=0,Q=0,K=I?y(k,j):w||N?y(k,0):void 0,tt,nt;j>Z;Z++)if((F||Z in V)&&(tt=V[Z],nt=Y(tt,Z,X),E))if(I)T(K,Z,nt);else if(nt)switch(E){case 3:return!0;case 5:return tt;case 6:return Z;case 2:T(K,Q++,tt)}else switch(E){case 4:return!1;case 7:T(K,Q++,tt)}return L?-1:M||D?D:K}};b.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(b,O,a){var g=a(85),v=a(30),p=a(9),x=g(g.bind);b.exports=function(y,T){return v(y),T===void 0?y:p?x(y,T):function(){return y.apply(T,arguments)}}}),(function(b,O,a){var g=a(15),v=a(14);b.exports=function(p){if(g(p)==="Function")return v(p)}}),(function(b,O,a){var g=a(87);b.exports=function(v,p){return new(g(v))(p===0?0:p)}}),(function(b,O,a){var g=a(88),v=a(89),p=a(20),x=a(33),y=x("species"),T=Array;b.exports=function(S){var E;return g(S)&&(E=S.constructor,v(E)&&(E===T||g(E.prototype))?E=void 0:p(E)&&(E=E[y],E===null&&(E=void 0))),E===void 0?T:E}}),(function(b,O,a){var g=a(15);b.exports=Array.isArray||function(p){return g(p)==="Array"}}),(function(b,O,a){var g=a(14),v=a(7),p=a(21),x=a(69),y=a(23),T=a(50),S=function(){},E=y("Reflect","construct"),I=/^\s*(?:class|function)\b/,w=g(I.exec),M=!I.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||!!w(I,T(F))}catch(k){return!0}};L.sham=!0,b.exports=!E||v(function(){var N;return D(D.call)||!D(Object)||!D(function(){N=!0})||N})?L:D}),(function(b,O,a){var g=a(6),v=a(44),p=a(11);b.exports=function(x,y,T){g?v.f(x,y,p(0,T)):x[y]=T}}),(function(b,O,a){var g=a(3),v=a(23),p=a(38),x=a(68),y=a(34),T=a(92),S=y("string-to-symbol-registry"),E=y("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!T},{for:function(I){var w=x(I);if(p(S,w))return S[w];var M=v("Symbol")(w);return S[w]=M,E[M]=w,M}})}),(function(b,O,a){var g=a(26);b.exports=g&&!!Symbol.for&&!!Symbol.keyFor}),(function(b,O,a){var g=a(3),v=a(38),p=a(22),x=a(31),y=a(34),T=a(92),S=y("symbol-to-string-registry");g({target:"Symbol",stat:!0,forced:!T},{keyFor:function(I){if(!p(I))throw new TypeError(x(I)+" is not a symbol");if(v(S,I))return S[I]}})}),(function(b,O,a){var g=a(3),v=a(23),p=a(95),x=a(8),y=a(14),T=a(7),S=a(88),E=a(21),I=a(96),w=a(22),M=a(15),D=a(68),L=a(76),N=a(97),F=a(40),k=a(26),G=a(98),U=String,X=v("JSON","stringify"),V=y(/./.exec),j=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||T(function(){var Ft=v("Symbol")("stringify detection");return X([Ft])!=="[null]"||X({a:Ft})!=="{}"||X(Object(Ft))!=="{}"}),gt=T(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||w(Ft))))return Pt[1]=function(mt,wt){if(E(pt)&&(wt=x(pt,this,U(mt),wt)),!w(wt))return wt},p(X,null,Pt)}:X,Ct=function(Ft,Lt,Pt){var pt=j(Pt,Lt-1),mt=j(Pt,Lt+1);return V(rt,Ft)&&!V(it,mt)||V(it,Ft)&&!V(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 wt=Pt.length,Bt=!0;return function(Qt,Ot){if(Bt)return Bt=!1,Ot;if(S(this))return Ot;for(var Wt=0;Wt<wt;Wt++)if(Pt[Wt]===Qt)return Ot}}};X&&g({target:"JSON",stat:!0,arity:3,forced:ht||gt||!G},{stringify:function(Lt,Pt,pt){var mt=Tt(Pt),wt=[],Bt=yt(Lt,function(de,Re){var Pe=E(mt)?x(mt,this,U(de),Re):Re;return!G&&I(Pe)?st+(K(wt,Pe.rawJSON)-1):Pe},pt);if(typeof Bt!="string"||(gt&&(Bt=Z(Bt,nt,Ct)),G))return Bt;for(var Qt="",Ot=Bt.length,Wt=0;Wt<Ot;Wt++){var ae=j(Bt,Wt);if(ae==='"'){var pe=N(Bt,++Wt).end-1,oe=Q(Bt,Wt,pe);Qt+=Q(oe,0,ct)===st?wt[Q(oe,ct)]:'"'+oe+'"',Wt=pe}else Qt+=ae}return Qt}})}),(function(b,O,a){var g=a(9),v=Function.prototype,p=v.apply,x=v.call;b.exports=typeof Reflect=="object"&&Reflect.apply||(g?x.bind(p):function(){return x.apply(p,arguments)})}),(function(b,O,a){var g=a(20),v=a(51).get;b.exports=function(x){if(!g(x))return!1;var y=v(x);return!!y&&y.type==="RawJSON"}}),(function(b,O,a){var g=a(14),v=a(38),p=SyntaxError,x=parseInt,y=String.fromCharCode,T=g("".charAt),S=g("".slice),E=g(/./.exec),I={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
|
|
25
|
-
`,"\\r":"\r","\\t":" "},w=/^[\da-f]{4}$/i,M=/^[\u0000-\u001F]$/;b.exports=function(D,L){for(var N=!0,F="";L<D.length;){var k=T(D,L);if(k==="\\"){var G=S(D,L,L+2);if(v(I,G))F+=I[G],L+=2;else if(G==="\\u"){L+=2;var U=S(D,L,L+4);if(!E(w,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==='"'){N=!1,L++;break}else{if(E(M,k))throw new p("Bad control character in string literal at: "+L);F+=k,L++}}if(N)throw new p("Unterminated string at: "+L);return{value:F,end:L}}}),(function(b,O,a){var g=a(7);b.exports=!g(function(){var v="9007199254740993",p=JSON.rawJSON(v);return!JSON.isRawJSON(p)||JSON.stringify(p)!==v})}),(function(b,O,a){var g=a(3),v=a(26),p=a(7),x=a(66),y=a(39),T=!v||p(function(){x.f(1)});g({target:"Object",stat:!0,forced:T},{getOwnPropertySymbols:function(E){var I=x.f;return I?I(y(E)):[]}})}),(function(b,O,a){var g=a(3),v=a(6),p=a(4),x=a(8),y=a(14),T=a(38),S=a(21),E=a(24),I=a(68),w=a(77),M=a(55),D=p.Symbol,L=D&&D.prototype;if(v&&S(D)&&(!("description"in L)||D().description!==void 0)){var N={},F=function(){var Q=arguments.length<1||arguments[0]===void 0?void 0:I(arguments[0]),K=E(L,this)?new D(Q):Q===void 0?D():D(Q);return Q===""&&(N[K]=!0),K};M(F,D);var k=F.for;F.for=function(Z){var Q=I(Z),K=x(k,this,Q);return Q===""&&(N[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),V=/^Symbol\((.*)\)[^)]+$/,j=y("".replace),Y=y("".slice);w(L,"description",{configurable:!0,get:function(){var Q=U(this);if(T(N,Q))return"";var K=X(Q),tt=G?Y(K,7,-1):j(K,V,"$1");return tt===""?void 0:tt}}),g({global:!0,constructor:!0,forced:!0},{Symbol:F})}}),(function(b,O,a){var g=a(4),v=a(79),p=a(44).f,x=a(5).f,y=g.Symbol;if(v("asyncDispose"),y){var T=x(y,"asyncDispose");T.enumerable&&T.configurable&&T.writable&&p(y,"asyncDispose",{value:T.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(b,O,a){var g=a(79);g("asyncIterator")}),(function(b,O,a){var g=a(4),v=a(79),p=a(44).f,x=a(5).f,y=g.Symbol;if(v("dispose"),y){var T=x(y,"dispose");T.enumerable&&T.configurable&&T.writable&&p(y,"dispose",{value:T.value,enumerable:!1,configurable:!1,writable:!1})}}),(function(b,O,a){var g=a(79);g("hasInstance")}),(function(b,O,a){var g=a(79);g("isConcatSpreadable")}),(function(b,O,a){var g=a(79);g("iterator")}),(function(b,O,a){var g=a(79);g("match")}),(function(b,O,a){var g=a(79);g("matchAll")}),(function(b,O,a){var g=a(79);g("replace")}),(function(b,O,a){var g=a(79);g("search")}),(function(b,O,a){var g=a(79);g("species")}),(function(b,O,a){var g=a(79);g("split")}),(function(b,O,a){var g=a(79),v=a(81);g("toPrimitive"),v()}),(function(b,O,a){var g=a(23),v=a(79),p=a(82);v("toStringTag"),p(g("Symbol"),"Symbol")}),(function(b,O,a){var g=a(79);g("unscopables")}),(function(b,O,a){var g=a(3),v=a(4),p=a(95),x=a(117),y="WebAssembly",T=v[y],S=new Error("e",{cause:7}).cause!==7,E=function(w,M){var D={};D[w]=x(w,M,S),g({global:!0,constructor:!0,arity:1,forced:S},D)},I=function(w,M){if(T&&T[w]){var D={};D[w]=x(y+"."+w,M,S),g({target:y,stat:!0,constructor:!0,arity:1,forced:S},D)}};E("Error",function(w){return function(D){return p(w,this,arguments)}}),E("EvalError",function(w){return function(D){return p(w,this,arguments)}}),E("RangeError",function(w){return function(D){return p(w,this,arguments)}}),E("ReferenceError",function(w){return function(D){return p(w,this,arguments)}}),E("SyntaxError",function(w){return function(D){return p(w,this,arguments)}}),E("TypeError",function(w){return function(D){return p(w,this,arguments)}}),E("URIError",function(w){return function(D){return p(w,this,arguments)}}),I("CompileError",function(w){return function(D){return p(w,this,arguments)}}),I("LinkError",function(w){return function(D){return p(w,this,arguments)}}),I("RuntimeError",function(w){return function(D){return p(w,this,arguments)}})}),(function(b,O,a){var g=a(23),v=a(38),p=a(43),x=a(24),y=a(118),T=a(55),S=a(122),E=a(123),I=a(124),w=a(125),M=a(126),D=a(6),L=a(36);b.exports=function(N,F,k,G){var U="stackTraceLimit",X=G?2:1,V=N.split("."),j=V[V.length-1],Y=g.apply(null,V);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=I(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&&w(it,arguments[X]),it});if(K.prototype=Z,j!=="Error"?y?y(K,Q):T(K,Q,{name:!0}):D&&U in Y&&(S(K,Y,U),S(K,Y,"prepareStackTrace")),T(K,Y),!L)try{Z.name!==j&&p(Z,"name",j),Z.constructor=K}catch(tt){}return K}}}),(function(b,O,a){var g=a(119),v=a(20),p=a(16),x=a(120);b.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var y=!1,T={},S;try{S=g(Object.prototype,"__proto__","set"),S(T,[]),y=T instanceof Array}catch(E){}return function(I,w){return p(I),x(w),v(I)&&(y?S(I,w):I.__proto__=w),I}})():void 0)}),(function(b,O,a){var g=a(14),v=a(30);b.exports=function(p,x,y){try{return g(v(Object.getOwnPropertyDescriptor(p,x)[y]))}catch(T){}}}),(function(b,O,a){var g=a(121),v=String,p=TypeError;b.exports=function(x){if(g(x))return x;throw new p("Can't set "+v(x)+" as a prototype")}}),(function(b,O,a){var g=a(20);b.exports=function(v){return g(v)||v===null}}),(function(b,O,a){var g=a(44).f;b.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(b,O,a){var g=a(21),v=a(20),p=a(118);b.exports=function(x,y,T){var S,E;return p&&g(S=y.constructor)&&S!==T&&v(E=S.prototype)&&E!==T.prototype&&p(x,E),x}}),(function(b,O,a){var g=a(68);b.exports=function(v,p){return v===void 0?arguments.length<2?"":p:g(v)}}),(function(b,O,a){var g=a(20),v=a(43);b.exports=function(p,x){g(x)&&"cause"in x&&v(p,"cause",x.cause)}}),(function(b,O,a){var g=a(43),v=a(127),p=a(128),x=Error.captureStackTrace;b.exports=function(y,T,S,E){p&&(x?x(y,T):g(y,"stack",v(S,E)))}}),(function(b,O,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]*/,T=y.test(x);b.exports=function(S,E){if(T&&typeof S=="string"&&!v.prepareStackTrace)for(;E--;)S=p(S,y,"");return S}}),(function(b,O,a){var g=a(7),v=a(11);b.exports=!g(function(){var p=new Error("a");return"stack"in p?(Object.defineProperty(p,"stack",v(1,7)),p.stack!==7):!0})}),(function(b,O,a){var g=a(3),v=a(23),p=a(20),x=a(69),y=a(7),T="Error",S="DOMException",E=Object.setPrototypeOf||{}.__proto__,I=v(S),w=Error,M=w.isError,D=!M||!E||y(function(){return I&&!M(new I(S))||!M(new w(T,{cause:function(){}}))||M(v("Object","create")(w.prototype))});g({target:"Error",stat:!0,sham:!0,forced:D},{isError:function(N){if(!p(N))return!1;var F=x(N);return F===T||F===S}})}),(function(b,O,a){var g=a(47),v=a(131),p=Error.prototype;p.toString!==v&&g(p,"toString",v)}),(function(b,O,a){var g=a(6),v=a(7),p=a(46),x=a(124),y=Error.prototype.toString,T=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"});b.exports=T?function(){var E=p(this),I=x(E.name,"Error"),w=x(E.message);return I?w?I+": "+w:I:w}:y}),(function(b,O,a){a(133)}),(function(b,O,a){var g=a(3),v=a(24),p=a(134),x=a(118),y=a(55),T=a(71),S=a(43),E=a(11),I=a(125),w=a(126),M=a(136),D=a(124),L=a(33),N=L("toStringTag"),F=Error,k=[].push,G=function(V,j){var Y=v(U,this),Z;x?Z=x(new F,Y?p(this):U):(Z=Y?this:T(U),S(Z,N,"Error")),j!==void 0&&S(Z,"message",D(j)),w(Z,G,Z.stack,1),arguments.length>2&&I(Z,arguments[2]);var Q=[];return M(V,k,{that:Q}),S(Z,"errors",Q),Z};x?x(G,F):y(G,F,{name:!0});var U=G.prototype=T(F.prototype,{constructor:E(1,G),message:E(1,""),name:E(1,"AggregateError")});g({global:!0,constructor:!0,arity:2},{AggregateError:G})}),(function(b,O,a){var g=a(38),v=a(21),p=a(39),x=a(53),y=a(135),T=x("IE_PROTO"),S=Object,E=S.prototype;b.exports=y?S.getPrototypeOf:function(I){var w=p(I);if(g(w,T))return w[T];var M=w.constructor;return v(M)&&w instanceof M?M.prototype:w instanceof S?E:null}}),(function(b,O,a){var g=a(7);b.exports=!g(function(){function v(){}return v.prototype.constructor=null,Object.getPrototypeOf(new v)!==v.prototype})}),(function(b,O,a){var g=a(84),v=a(8),p=a(46),x=a(31),y=a(137),T=a(63),S=a(24),E=a(139),I=a(140),w=a(141),M=TypeError,D=function(N,F){this.stopped=N,this.result=F},L=D.prototype;b.exports=function(N,F,k){var G=k&&k.that,U=!!(k&&k.AS_ENTRIES),X=!!(k&&k.IS_RECORD),V=!!(k&&k.IS_ITERATOR),j=!!(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&&w(yt,"normal"),new D(!0,gt)},ct=function(gt){return U?(p(gt),j?Y(gt[0],gt[1],st):Y(gt[0],gt[1])):j?Y(gt,st):Y(gt)};if(X)Z=N.iterator;else if(V)Z=N;else{if(Q=I(N),!Q)throw new M(x(N)+" is not iterable");if(y(Q)){for(K=0,tt=T(N);tt>K;K++)if(nt=ct(N[K]),nt&&S(L,nt))return nt;return new D(!1)}Z=E(N,Q)}for(rt=X?N.next:Z.next;!(it=v(rt,Z)).done;){var ht=it.value;try{nt=ct(ht)}catch(gt){if(Z)w(Z,"throw",gt);else throw gt}if(typeof nt=="object"&&nt&&S(L,nt))return nt}return new D(!1)}}),(function(b,O,a){var g=a(33),v=a(138),p=g("iterator"),x=Array.prototype;b.exports=function(y){return y!==void 0&&(v.Array===y||x[p]===y)}}),(function(b){b.exports={}}),(function(b,O,a){var g=a(8),v=a(30),p=a(46),x=a(31),y=a(140),T=TypeError;b.exports=function(S,E){var I=arguments.length<2?y(S):E;if(v(I))return p(g(I,S));throw new T(x(S)+" is not iterable")}}),(function(b,O,a){var g=a(69),v=a(29),p=a(17),x=a(138),y=a(33),T=y("iterator");b.exports=function(S){if(!p(S))return v(S,T)||v(S,"@@iterator")||x[g(S)]}}),(function(b,O,a){var g=a(8),v=a(46),p=a(29);b.exports=function(x,y,T){var S,E;v(x);try{if(S=p(x,"return"),!S){if(y==="throw")throw T;return T}S=g(S,x)}catch(I){E=!0,S=I}if(y==="throw")throw T;if(E)throw S;return v(S),T}}),(function(b,O,a){var g=a(3),v=a(23),p=a(95),x=a(7),y=a(117),T="AggregateError",S=v(T),E=!x(function(){return S([1]).errors[0]!==1})&&x(function(){return S([1],T,{cause:7}).cause!==7});g({global:!0,constructor:!0,arity:2,forced:E},{AggregateError:y(T,function(I){return function(M,D){return p(I,this,arguments)}},E,!0)})}),(function(b,O,a){var g=a(3),v=a(4),p=a(24),x=a(134),y=a(118),T=a(55),S=a(71),E=a(43),I=a(11),w=a(126),M=a(124),D=a(33),L=a(7),N=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}),V=U||X,j=function(Q,K,tt){var nt=p(Y,this),rt;return y?rt=V&&(!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)),w(rt,j,rt.stack,1),E(rt,"error",Q),E(rt,"suppressed",K),rt};y?y(j,G):T(j,G,{name:!0});var Y=j.prototype=V?F.prototype:S(G.prototype,{constructor:I(1,j),message:I(1,""),name:I(1,"SuppressedError")});V&&!N&&(Y.constructor=j),g({global:!0,constructor:!0,arity:3,forced:V},{SuppressedError:j})}),(function(b,O,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),I=p(E),w=x(S),M=w>=0?w:I+w;return M<0||M>=I?void 0:E[M]}}),y("at")}),(function(b,O,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)}),b.exports=function(T){y[x][T]=!0}}),(function(b,O,a){var g=a(3),v=a(7),p=a(88),x=a(20),y=a(39),T=a(63),S=a(147),E=a(90),I=a(148),w=a(86),M=a(149),D=a(33),L=a(27),N=D("isConcatSpreadable"),F=L>=51||!v(function(){var U=[];return U[N]=!1,U.concat()[0]!==U}),k=function(U){if(!x(U))return!1;var X=U[N];return X!==void 0?!!X:p(U)},G=!F||!M("concat");g({target:"Array",proto:!0,arity:1,forced:G},{concat:function(X){var V=y(this),j=w(V,0),Y=0,Z,Q,K,tt,nt;for(Z=-1,K=arguments.length;Z<K;Z++)if(nt=Z===-1?V:arguments[Z],k(nt))for(tt=T(nt),S(Y+tt),Q=0;Q<tt;Q++,Y++)Q in nt&&E(j,Y,nt[Q]);else S(Y+1),E(j,Y++,nt);return I(j,Y),j}})}),(function(b){var O=TypeError,a=9007199254740991;b.exports=function(g){if(g>a)throw new O("Maximum allowed index exceeded");return g}}),(function(b,O,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(T){return T instanceof TypeError}})();b.exports=y?function(T,S){if(v(T)&&!x(T,"length").writable)throw new p("Cannot set read only .length");return T.length=S}:function(T,S){return T.length=S}}),(function(b,O,a){var g=a(7),v=a(33),p=a(27),x=v("species");b.exports=function(y){return p>=51||!g(function(){var T=[],S=T.constructor={};return S[x]=function(){return{foo:1}},T[y](Boolean).foo!==1})}}),(function(b,O,a){var g=a(3),v=a(151),p=a(145);g({target:"Array",proto:!0},{copyWithin:v}),p("copyWithin")}),(function(b,O,a){var g=a(39),v=a(60),p=a(63),x=a(152),y=Math.min;b.exports=[].copyWithin||function(S,E){var I=g(this),w=p(I),M=v(S,w),D=v(E,w),L=arguments.length>2?arguments[2]:void 0,N=y((L===void 0?w:v(L,w))-D,w-M),F=1;for(D<M&&M<D+N&&(F=-1,D+=N-1,M+=N-1);N-- >0;)D in I?I[M]=I[D]:x(I,M),M+=F,D+=F;return I}}),(function(b,O,a){var g=a(31),v=TypeError;b.exports=function(p,x){if(!delete p[x])throw new v("Cannot delete property "+g(x)+" of "+g(p))}}),(function(b,O,a){var g=a(3),v=a(83).every,p=a(154),x=p("every");g({target:"Array",proto:!0,forced:!x},{every:function(T){return v(this,T,arguments.length>1?arguments[1]:void 0)}})}),(function(b,O,a){var g=a(7);b.exports=function(v,p){var x=[][v];return!!x&&g(function(){x.call(null,p||function(){return 1},1)})}}),(function(b,O,a){var g=a(3),v=a(156),p=a(145);g({target:"Array",proto:!0},{fill:v}),p("fill")}),(function(b,O,a){var g=a(39),v=a(60),p=a(63);b.exports=function(y){for(var T=g(this),S=p(T),E=arguments.length,I=v(E>1?arguments[1]:void 0,S),w=E>2?arguments[2]:void 0,M=w===void 0?S:v(w,S);M>I;)T[I++]=y;return T}}),(function(b,O,a){var g=a(3),v=a(83).filter,p=a(149),x=p("filter");g({target:"Array",proto:!0,forced:!x},{filter:function(T){return v(this,T,arguments.length>1?arguments[1]:void 0)}})}),(function(b,O,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(b,O,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(b,O,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(b,O,a){var g=a(84),v=a(13),p=a(39),x=a(63),y=function(T){var S=T===1;return function(E,I,w){for(var M=p(E),D=v(M),L=x(D),N=g(I,w),F,k;L-- >0;)if(F=D[L],k=N(F,L,M),k)switch(T){case 0:return F;case 1:return L}return S?-1:void 0}};b.exports={findLast:y(0),findLastIndex:y(1)}}),(function(b,O,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(b,O,a){var g=a(3),v=a(164),p=a(39),x=a(63),y=a(61),T=a(86);g({target:"Array",proto:!0},{flat:function(){var E=arguments.length?arguments[0]:void 0,I=p(this),w=x(I),M=E===void 0?1:y(E),D=T(I,0);return v(D,I,I,w,0,M),D}})}),(function(b,O,a){var g=a(88),v=a(63),p=a(147),x=a(84),y=a(90),T=function(S,E,I,w,M,D,L,N){for(var F=M,k=0,G=L?x(L,N):!1,U,X;k<w;)k in I&&(U=G?G(I[k],k,E):I[k],D>0&&g(U)?(X=v(U),F=T(S,E,U,X,F,D-1)-1):(p(F+1),y(S,F,U)),F++),k++;return F};b.exports=T}),(function(b,O,a){var g=a(3),v=a(164),p=a(30),x=a(39),y=a(63),T=a(86);g({target:"Array",proto:!0},{flatMap:function(E){var I=x(this),w=y(I),M;return p(E),M=T(I,0),v(M,I,I,w,0,1,E,arguments.length>1?arguments[1]:void 0),M}})}),(function(b,O,a){var g=a(3),v=a(167);g({target:"Array",proto:!0,forced:[].forEach!==v},{forEach:v})}),(function(b,O,a){var g=a(83).forEach,v=a(154),p=v("forEach");b.exports=p?[].forEach:function(y){return g(this,y,arguments.length>1?arguments[1]:void 0)}}),(function(b,O,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(b,O,a){var g=a(84),v=a(8),p=a(39),x=a(170),y=a(137),T=a(89),S=a(63),E=a(90),I=a(148),w=a(139),M=a(140),D=a(141),L=Array;b.exports=function(F){var k=T(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 V=p(F),j=M(V),Y=0,Z,Q,K,tt,nt,rt;if(j&&!(this===L&&y(j)))for(Q=k?new this:[],tt=w(V,j),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(V),Q=k?new this(Z):L(Z);Z>Y;Y++)rt=X?U(V[Y],Y):V[Y],E(Q,Y,rt);return I(Q,Y),Q}}),(function(b,O,a){var g=a(46),v=a(141);b.exports=function(p,x,y,T){try{return T?x(g(y)[0],y[1]):x(y)}catch(S){v(p,"throw",S)}}}),(function(b,O,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(T){}b.exports=function(T,S){try{if(!S&&!p)return!1}catch(w){return!1}var E=!1;try{var I={};I[v]=function(){return{next:function(){return{done:E=!0}}}},T(I)}catch(w){}return E}}),(function(b,O,a){var g=a(3),v=a(59).includes,p=a(7),x=a(145),y=p(function(){return!Array(1).includes()}),T=p(function(){return[,1].includes(void 0,1)});g({target:"Array",proto:!0,forced:y||T},{includes:function(E){return v(this,E,arguments.length>1?arguments[1]:void 0)}}),x("includes")}),(function(b,O,a){var g=a(3),v=a(85),p=a(59).indexOf,x=a(154),y=v([].indexOf),T=!!y&&1/y([1],1,-0)<0,S=T||!x("indexOf");g({target:"Array",proto:!0,forced:S},{indexOf:function(I){var w=arguments.length>1?arguments[1]:void 0;return T?y(this,I,w)||0:p(this,I,w)}})}),(function(b,O,a){var g=a(3),v=a(88);g({target:"Array",stat:!0},{isArray:v})}),(function(b,O,a){var g=a(12),v=a(145),p=a(138),x=a(51),y=a(44).f,T=a(176),S=a(179),E=a(36),I=a(6),w="Array Iterator",M=x.set,D=x.getterFor(w);b.exports=T(Array,"Array",function(N,F){M(this,{type:w,target:g(N),index:0,kind:F})},function(){var N=D(this),F=N.target,k=N.index++;if(!F||k>=F.length)return N.target=null,S(void 0,!0);switch(N.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&&I&&L.name!=="values")try{y(L,"name",{value:"values"})}catch(N){}}),(function(b,O,a){var g=a(3),v=a(8),p=a(36),x=a(49),y=a(21),T=a(177),S=a(134),E=a(118),I=a(82),w=a(43),M=a(47),D=a(33),L=a(138),N=a(178),F=x.PROPER,k=x.CONFIGURABLE,G=N.IteratorPrototype,U=N.BUGGY_SAFARI_ITERATORS,X=D("iterator"),V="keys",j="values",Y="entries",Z=function(){return this};b.exports=function(Q,K,tt,nt,rt,it,st){T(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 V:return function(){return new tt(this,mt)};case j: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)),I(Lt,ht,!0,!0),p&&(L[ht]=Z))),F&&rt===j&&Ct&&Ct.name!==j&&(!p&&k?w(yt,"name",j):(gt=!0,Tt=function(){return v(Ct,this)})),rt)if(Pt={values:ct(j),keys:it?Tt:ct(V),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(b,O,a){var g=a(178).IteratorPrototype,v=a(71),p=a(11),x=a(82),y=a(138),T=function(){return this};b.exports=function(S,E,I,w){var M=E+" Iterator";return S.prototype=v(g,{next:p(+!w,I)}),x(S,M,!1,!0),y[M]=T,S}}),(function(b,O,a){var g=a(7),v=a(21),p=a(20),x=a(71),y=a(134),T=a(47),S=a(33),E=a(36),I=S("iterator"),w=!1,M,D,L;[].keys&&(L=[].keys(),"next"in L?(D=y(y(L)),D!==Object.prototype&&(M=D)):w=!0);var N=!p(M)||g(function(){var F={};return M[I].call(F)!==F});N?M={}:E&&(M=x(M)),v(M[I])||T(M,I,function(){return this}),b.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:w}}),(function(b){b.exports=function(O,a){return{value:O,done:a}}}),(function(b,O,a){var g=a(3),v=a(14),p=a(13),x=a(12),y=a(154),T=v([].join),S=p!==Object,E=S||!y("join",",");g({target:"Array",proto:!0,forced:E},{join:function(w){return T(x(this),w===void 0?",":w)}})}),(function(b,O,a){var g=a(3),v=a(182);g({target:"Array",proto:!0,forced:v!==[].lastIndexOf},{lastIndexOf:v})}),(function(b,O,a){var g=a(95),v=a(12),p=a(61),x=a(63),y=a(154),T=Math.min,S=[].lastIndexOf,E=!!S&&1/[1].lastIndexOf(1,-0)<0,I=y("lastIndexOf"),w=E||!I;b.exports=w?function(D){if(E)return g(S,this,arguments)||0;var L=v(this),N=x(L);if(N===0)return-1;var F=N-1;for(arguments.length>1&&(F=T(F,p(arguments[1]))),F<0&&(F=N+F);F>=0;F--)if(F in L&&L[F]===D)return F||0;return-1}:S}),(function(b,O,a){var g=a(3),v=a(83).map,p=a(149),x=p("map");g({target:"Array",proto:!0,forced:!x},{map:function(T){return v(this,T,arguments.length>1?arguments[1]:void 0)}})}),(function(b,O,a){var g=a(3),v=a(7),p=a(89),x=a(90),y=a(148),T=Array,S=v(function(){function E(){}return!(T.of.call(E)instanceof E)});g({target:"Array",stat:!0,forced:S},{of:function(){for(var I=0,w=arguments.length,M=new(p(this)?this:T)(w);w>I;)x(M,I,arguments[I++]);return y(M,w),M}})}),(function(b,O,a){var g=a(3),v=a(39),p=a(63),x=a(148),y=a(147),T=a(7),S=T(function(){return[].push.call({length:4294967296},1)!==4294967297}),E=function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(w){return w instanceof TypeError}},I=S||!E();g({target:"Array",proto:!0,arity:1,forced:I},{push:function(M){var D=v(this),L=p(D),N=arguments.length;y(L+N);for(var F=0;F<N;F++)D[L]=arguments[F],L++;return x(D,L),L}})}),(function(b,O,a){var g=a(3),v=a(187).left,p=a(154),x=a(27),y=a(188),T=!y&&x>79&&x<83,S=T||!p("reduce");g({target:"Array",proto:!0,forced:S},{reduce:function(I){var w=arguments.length;return v(this,I,w,w>1?arguments[1]:void 0)}})}),(function(b,O,a){var g=a(30),v=a(39),p=a(13),x=a(63),y=TypeError,T="Reduce of empty array with no initial value",S=function(E){return function(I,w,M,D){var L=v(I),N=p(L),F=x(L);if(g(w),F===0&&M<2)throw new y(T);var k=E?F-1:0,G=E?-1:1;if(M<2)for(;;){if(k in N){D=N[k],k+=G;break}if(k+=G,E?k<0:F<=k)throw new y(T)}for(;E?k>=0:F>k;k+=G)k in N&&(D=w(D,N[k],k,L));return D}};b.exports={left:S(!1),right:S(!0)}}),(function(b,O,a){var g=a(189);b.exports=g==="NODE"}),(function(b,O,a){var g=a(4),v=a(28),p=a(15),x=function(y){return v.slice(0,y.length)===y};b.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(b,O,a){var g=a(3),v=a(187).right,p=a(154),x=a(27),y=a(188),T=!y&&x>79&&x<83,S=T||!p("reduceRight");g({target:"Array",proto:!0,forced:S},{reduceRight:function(I){return v(this,I,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),(function(b,O,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(b,O,a){var g=a(3),v=a(88),p=a(89),x=a(20),y=a(60),T=a(63),S=a(12),E=a(90),I=a(148),w=a(33),M=a(149),D=a(76),L=M("slice"),N=w("species"),F=Array,k=Math.max;g({target:"Array",proto:!0,forced:!L},{slice:function(U,X){var V=S(this),j=T(V),Y=y(U,j),Z=y(X===void 0?j:X,j),Q,K,tt;if(v(V)&&(Q=V.constructor,p(Q)&&(Q===F||v(Q.prototype))?Q=void 0:x(Q)&&(Q=Q[N],Q===null&&(Q=void 0)),Q===F||Q===void 0))return D(V,Y,Z);for(K=new(Q===void 0?F:Q)(k(Z-Y,0)),tt=0;Y<Z;Y++,tt++)Y in V&&E(K,tt,V[Y]);return I(K,tt),K}})}),(function(b,O,a){var g=a(3),v=a(83).some,p=a(154),x=p("some");g({target:"Array",proto:!0,forced:!x},{some:function(T){return v(this,T,arguments.length>1?arguments[1]:void 0)}})}),(function(b,O,a){var g=a(3),v=a(14),p=a(30),x=a(39),y=a(63),T=a(152),S=a(68),E=a(7),I=a(195),w=a(154),M=a(196),D=a(197),L=a(27),N=a(198),F=[],k=v(F.sort),G=v(F.push),U=E(function(){F.sort(void 0)}),X=E(function(){F.sort(null)}),V=w("sort"),j=!E(function(){if(L)return L<70;if(!(M&&M>3)){if(D)return!0;if(N)return N<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||!V||!j,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(j)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(I(nt,Z(K)),it=y(nt),st=0;st<it;)tt[st]=nt[st++];for(;st<rt;)T(tt,st++);return tt}})}),(function(b,O,a){var g=a(76),v=Math.floor,p=function(x,y){var T=x.length;if(T<8)for(var S=1,E,I;S<T;){for(I=S,E=x[S];I&&y(x[I-1],E)>0;)x[I]=x[--I];I!==S++&&(x[I]=E)}else for(var w=v(T/2),M=p(g(x,0,w),y),D=p(g(x,w),y),L=M.length,N=D.length,F=0,k=0;F<L||k<N;)x[F+k]=F<L&&k<N?y(M[F],D[k])<=0?M[F++]:D[k++]:F<L?M[F++]:D[k++];return x};b.exports=p}),(function(b,O,a){var g=a(28),v=g.match(/firefox\/(\d+)/i);b.exports=!!v&&+v[1]}),(function(b,O,a){var g=a(28);b.exports=/MSIE|Trident/.test(g)}),(function(b,O,a){var g=a(28),v=g.match(/AppleWebKit\/(\d+)\./);b.exports=!!v&&+v[1]}),(function(b,O,a){var g=a(200);g("Array")}),(function(b,O,a){var g=a(23),v=a(77),p=a(33),x=a(6),y=p("species");b.exports=function(T){var S=g(T);x&&S&&!S[y]&&v(S,y,{configurable:!0,get:function(){return this}})}}),(function(b,O,a){var g=a(3),v=a(39),p=a(60),x=a(61),y=a(63),T=a(148),S=a(147),E=a(86),I=a(90),w=a(152),M=a(149),D=M("splice"),L=Math.max,N=Math.min;g({target:"Array",proto:!0,forced:!D},{splice:function(k,G){var U=v(this),X=y(U),V=p(k,X),j=arguments.length,Y,Z,Q,K,tt,nt;for(j===0?Y=Z=0:j===1?(Y=0,Z=X-V):(Y=j-2,Z=N(L(x(G),0),X-V)),S(X+Y-Z),Q=E(U,Z),K=0;K<Z;K++)tt=V+K,tt in U&&I(Q,K,U[tt]);if(T(Q,Z),Y<Z){for(K=V;K<X-Z;K++)tt=K+Z,nt=K+Y,tt in U?U[nt]=U[tt]:w(U,nt);for(K=X;K>X-Z+Y;K--)w(U,K-1)}else if(Y>Z)for(K=X-Z;K>V;K--)tt=K+Z-1,nt=K+Y-1,tt in U?U[nt]=U[tt]:w(U,nt);for(K=0;K<Y;K++)U[K+V]=arguments[K+2];return T(U,X-Z+Y),Q}})}),(function(b,O,a){var g=a(3),v=a(63),p=a(12),x=a(90),y=a(145),T=Array;g({target:"Array",proto:!0},{toReversed:function(){for(var E=p(this),I=v(E),w=new T(I),M=0;M<I;M++)x(w,M,E[I-M-1]);return w}}),y("toReversed")}),(function(b,O,a){var g=a(3),v=a(14),p=a(30),x=a(12),y=a(204),T=a(205),S=a(145),E=Array,I=v(T("Array","sort"));g({target:"Array",proto:!0},{toSorted:function(M){M!==void 0&&p(M);var D=x(this),L=y(E,D);return I(L,M)}}),S("toSorted")}),(function(b,O,a){var g=a(63);b.exports=function(v,p,x){for(var y=0,T=arguments.length>2?x:g(p),S=new v(T);T>y;)S[y]=p[y++];return S}}),(function(b,O,a){var g=a(4);b.exports=function(v,p){var x=g[v],y=x&&x.prototype;return y&&y[p]}}),(function(b,O,a){var g=a(3),v=a(145),p=a(147),x=a(63),y=a(60),T=a(12),S=a(61),E=a(90),I=Array,w=Math.max,M=Math.min;g({target:"Array",proto:!0},{toSpliced:function(L,N){var F=T(this),k=x(F),G=y(L,k),U=arguments.length,X=0,V,j,Y,Z;for(U===0?V=j=0:U===1?(V=0,j=k-G):(V=U-2,j=M(w(S(N),0),k-G)),Y=p(k+V-j),Z=I(Y);X<G;X++)E(Z,X,F[X]);for(;X<G+V;X++)E(Z,X,arguments[X-G+2]);for(;X<Y;X++)E(Z,X,F[X+j-V]);return Z}}),v("toSpliced")}),(function(b,O,a){var g=a(145);g("flat")}),(function(b,O,a){var g=a(145);g("flatMap")}),(function(b,O,a){var g=a(3),v=a(39),p=a(63),x=a(148),y=a(152),T=a(147),S=[].unshift(0)!==1,E=function(){try{Object.defineProperty([],"length",{writable:!1}).unshift()}catch(w){return w instanceof TypeError}},I=S||!E();g({target:"Array",proto:!0,arity:1,forced:I},{unshift:function(M){var D=v(this),L=p(D),N=arguments.length;if(N){T(L+N);for(var F=L;F--;){var k=F+N;F in D?D[k]=D[F]:y(D,k)}for(var G=0;G<N;G++)D[G]=arguments[G]}return x(D,L+N)}})}),(function(b,O,a){var g=a(3),v=a(63),p=a(61),x=a(12),y=a(90),T=Array,S=RangeError,E=(function(){try{[].with({valueOf:function(){throw 4}},null)}catch(I){return I!==4}})();g({target:"Array",proto:!0,forced:E},{with:function(I,w){var M=x(this),D=v(M),L=p(I),N=L<0?D+L:L;if(N>=D||N<0)throw new S("Incorrect index");for(var F=new T(D),k=0;k<D;k++)y(F,k,k===N?w:M[k]);return F}})}),(function(b,O,a){var g=a(3),v=a(4),p=a(212),x=a(200),y="ArrayBuffer",T=p[y],S=v[y];g({global:!0,constructor:!0,forced:S!==T},{ArrayBuffer:T}),x(y)}),(function(b,O,a){var g=a(4),v=a(14),p=a(6),x=a(213),y=a(49),T=a(43),S=a(77),E=a(214),I=a(7),w=a(215),M=a(61),D=a(216),L=a(217),N=a(221),F=a(134),k=a(118),G=a(156),U=a(76),X=a(123),V=a(55),j=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),wt=v([].reverse),Bt=N.pack,Qt=N.unpack,Ot=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,nn){var Ht=ct(Vt),ee=D(re),ve=!!nn;if(ee+ne>Ht.byteLength)throw new pt(it);var se=Ht.bytes,we=ee+Ht.byteOffset,an=U(se,we,we+ne);return ve?an:wt(an)},Ee=function(Vt,ne,re,nn,Ht,ee){var ve=ct(Vt),se=D(re),we=nn(+Ht),an=!!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]=we[an?Mt:ne-Mt-1]};if(!x)yt=function(ne){w(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,nn){w(this,Ft),w(ne,Ct);var Ht=st(ne),ee=Ht.byteLength,ve=M(re);if(ve<0||ve>ee)throw new pt("Wrong offset");if(nn=nn===void 0?ee-ve:D(nn),ve+nn>ee)throw new pt(rt);ht(this,{type:tt,buffer:ne,byteLength:nn,byteOffset:ve,bytes:Ht.bytes}),p||(this.buffer=ne,this.byteLength=nn,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,Ot,re)},setUint8:function(ne,re){Ee(this,1,ne,Ot,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;!I(function(){gt(1)})||!I(function(){new gt(-1)})||I(function(){return new gt,new gt(1.5),new gt(NaN),gt.length!==1||he&&!Q})?(yt=function(ne){return w(this,Ct),X(new gt(D(ne)),this,yt)},yt[nt]=Ct,Ct.constructor=yt,V(yt,gt)):he&&Q&&T(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})}j(yt,K),j(Tt,tt),b.exports={ArrayBuffer:yt,DataView:Tt}}),(function(b){b.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"}),(function(b,O,a){var g=a(47);b.exports=function(v,p,x){for(var y in p)g(v,y,p[y],x);return v}}),(function(b,O,a){var g=a(24),v=TypeError;b.exports=function(p,x){if(g(x,p))return p;throw new v("Incorrect invocation")}}),(function(b,O,a){var g=a(61),v=a(64),p=RangeError;b.exports=function(x){if(x===void 0)return 0;var y=g(x),T=v(y);if(y!==T)throw new p("Wrong length or index");return T}}),(function(b,O,a){var g=a(218),v=11920928955078125e-23,p=34028234663852886e22,x=11754943508222875e-54;b.exports=Math.fround||function(T){return g(T,v,p,x)}}),(function(b,O,a){var g=a(219),v=a(220),p=Math.abs,x=2220446049250313e-31;b.exports=function(y,T,S,E){var I=+y,w=p(I),M=g(I);if(w<E)return M*v(w/E/T)*E*T;var D=(1+T/x)*w,L=D-(D-w);return L>S||L!==L?M*(1/0):M*L}}),(function(b){b.exports=Math.sign||function(a){var g=+a;return g===0||g!==g?g:g<0?-1:1}}),(function(b){var O=2220446049250313e-31,a=1/O;b.exports=function(g){return g+a-a}}),(function(b){var O=Array,a=Math.abs,g=Math.pow,v=Math.floor,p=Math.log,x=Math.LN2,y=function(S,E,I){var w=O(I),M=I*8-E-1,D=(1<<M)-1,L=D>>1,N=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+=N/X:S+=N*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;)w[k++]=U&255,U/=256,E-=8;for(G=G<<E|U,M+=E;M>0;)w[k++]=G&255,G/=256,M-=8;return w[k-1]|=F*128,w},T=function(S,E){var I=S.length,w=I*8-E-1,M=(1<<w)-1,D=M>>1,L=w-7,N=I-1,F=S[N--],k=F&127,G;for(F>>=7;L>0;)k=k*256+S[N--],L-=8;for(G=k&(1<<-L)-1,k>>=-L,L+=E;L>0;)G=G*256+S[N--],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)};b.exports={pack:y,unpack:T}}),(function(b,O,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(b,O,a){var g=a(213),v=a(6),p=a(4),x=a(21),y=a(20),T=a(38),S=a(69),E=a(31),I=a(43),w=a(47),M=a(77),D=a(24),L=a(134),N=a(118),F=a(33),k=a(40),G=a(51),U=G.enforce,X=G.get,V=p.Int8Array,j=V&&V.prototype,Y=p.Uint8ClampedArray,Z=Y&&Y.prototype,Q=V&&L(V),K=j&&L(j),tt=Object.prototype,nt=p.TypeError,rt=F("toStringTag"),it=k("TYPED_ARRAY_TAG"),st="TypedArrayConstructor",ct=g&&!!N&&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"||T(Tt,ae)||T(Ft,ae)},Pt=function(Ot){var Wt=L(Ot);if(y(Wt)){var ae=X(Wt);return ae&&T(ae,st)?ae[st]:Pt(Wt)}},pt=function(Ot){if(!y(Ot))return!1;var Wt=S(Ot);return T(Tt,Wt)||T(Ft,Wt)},mt=function(Ot){if(pt(Ot))return Ot;throw new nt("Target is not a typed array")},wt=function(Ot){if(x(Ot)&&(!N||D(Q,Ot)))return Ot;throw new nt(E(Ot)+" is not a typed array constructor")},Bt=function(Ot,Wt,ae,pe){if(v){if(ae)for(var oe in Tt){var de=p[oe];if(de&&T(de.prototype,Ot))try{delete de.prototype[Ot]}catch(Re){try{de.prototype[Ot]=Wt}catch(Pe){}}}(!K[Ot]||ae)&&w(K,Ot,ae?Wt:ct&&j[Ot]||Wt,pe)}},Qt=function(Ot,Wt,ae){var pe,oe;if(v){if(N){if(ae){for(pe in Tt)if(oe=p[pe],oe&&T(oe,Ot))try{delete oe[Ot]}catch(de){}}if(!Q[Ot]||ae)try{return w(Q,Ot,ae?Wt:ct&&Q[Ot]||Wt)}catch(de){}else return}for(pe in Tt)oe=p[pe],oe&&(!oe[Ot]||ae)&&w(oe,Ot,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]&&N(p[gt],Q);if((!ct||!K||K===tt)&&(K=Q.prototype,ct))for(gt in Tt)p[gt]&&N(p[gt].prototype,K);if(ct&&L(Z)!==K&&N(Z,K),v&&!T(K,rt)){ht=!0,M(K,rt,{configurable:!0,get:function(){return y(this)?this[it]:void 0}});for(gt in Tt)p[gt]&&I(p[gt].prototype,it,gt)}b.exports={NATIVE_ARRAY_BUFFER_VIEWS:ct,TYPED_ARRAY_TAG:ht&&it,aTypedArray:mt,aTypedArrayConstructor:wt,exportTypedArrayMethod:Bt,exportTypedArrayStaticMethod:Qt,getTypedArrayConstructor:Pt,isView:Lt,isTypedArray:pt,TypedArray:Q,TypedArrayPrototype:K}}),(function(b,O,a){var g=a(3),v=a(85),p=a(7),x=a(212),y=a(46),T=a(60),S=a(64),E=x.ArrayBuffer,I=x.DataView,w=I.prototype,M=v(E.prototype.slice),D=v(w.getUint8),L=v(w.setUint8),N=p(function(){return!new E(2).slice(1,void 0).byteLength});g({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:N},{slice:function(k,G){if(M&&G===void 0)return M(y(this),k);for(var U=y(this).byteLength,X=T(k,U),V=T(G===void 0?U:G,U),j=new E(S(V-X)),Y=new I(this),Z=new I(j),Q=0;X<V;)L(Z,Q++,D(Y,X++));return j}})}),(function(b,O,a){a(226)}),(function(b,O,a){var g=a(3),v=a(212),p=a(213);g({global:!0,constructor:!0,forced:!p},{DataView:v.DataView})}),(function(b,O,a){var g=a(3),v=a(14),p=Math.pow,x=31,y=1023,T=p(2,-24),S=.0009765625,E=function(w){var M=w>>>15,D=w>>>10&x,L=w&y;return D===x?L===0?M===0?1/0:-1/0:NaN:D===0?L*(M===0?T:-T):p(2,D-15)*(M===0?1+L*S:-1-L*S)},I=v(DataView.prototype.getUint16);g({target:"DataView",proto:!0},{getFloat16:function(M){return E(I(this,M,arguments.length>1?arguments[1]:!1))}})}),(function(b,O,a){var g=a(3),v=a(14),p=a(229),x=a(216),y=a(230),T=a(220),S=Math.floor,E=Math.pow,I=65520,w=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>=I)return k<<15|31744;if(F<w)return k<<15|T(F*M);var G=S(y(F));if(G===-15)return k<<15|D;var U=T((F*E(2,-G)-1)*D);return U===D?k<<15|G+16<<10:k<<15|G+15<<10|U},N=v(DataView.prototype.setUint16);g({target:"DataView",proto:!0},{setFloat16:function(k,G){N(p(this),x(k),L(+G),arguments.length>2?arguments[2]:!1)}})}),(function(b,O,a){var g=a(69),v=TypeError;b.exports=function(p){if(g(p)==="DataView")return p;throw new v("Argument is not a DataView")}}),(function(b){var O=Math.log,a=Math.LN2;b.exports=Math.log2||function(v){return O(v)/a}}),(function(b,O,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(b,O,a){var g=a(4),v=a(213),p=a(233),x=g.DataView;b.exports=function(y){if(!v||p(y)!==0)return!1;try{return new x(y),!1}catch(T){return!0}}}),(function(b,O,a){var g=a(4),v=a(119),p=a(15),x=g.ArrayBuffer,y=g.TypeError;b.exports=x&&v(x.prototype,"byteLength","get")||function(T){if(p(T)!=="ArrayBuffer")throw new y("ArrayBuffer expected");return T.byteLength}}),(function(b,O,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(b,O,a){var g=a(4),v=a(14),p=a(119),x=a(216),y=a(236),T=a(233),S=a(237),E=a(239),I=g.structuredClone,w=g.ArrayBuffer,M=g.DataView,D=Math.max,L=Math.min,N=w.prototype,F=M.prototype,k=v(N.slice),G=p(N,"resizable","get"),U=p(N,"maxByteLength","get"),X=v(F.getInt8),V=v(F.setInt8);b.exports=(E||S)&&function(j,Y,Z){var Q=T(j),K=Y===void 0?Q:x(Y),tt=!G||!G(j),nt;if(y(j),E&&(j=I(j,{transfer:[j]}),Q===K&&(Z||tt)))return j;if(Q>=K&&(!Z||tt))nt=k(j,0,K);else{var rt=Z&&!tt&&U?{maxByteLength:D(K,U(j))}:void 0;nt=new w(K,rt);for(var it=new M(j),st=new M(nt),ct=L(K,Q),ht=0;ht<ct;ht++)V(st,ht,X(it,ht))}return E||S(j),nt}}),(function(b,O,a){var g=a(232),v=TypeError;b.exports=function(p){if(g(p))throw new v("ArrayBuffer is detached");return p}}),(function(b,O,a){var g=a(4),v=a(238),p=a(239),x=g.structuredClone,y=g.ArrayBuffer,T=g.MessageChannel,S=!1,E,I,w,M;if(p)S=function(D){x(D,{transfer:[D]})};else if(y)try{T||(E=v("worker_threads"),E&&(T=E.MessageChannel)),T&&(I=new T,w=new y(2),M=function(D){I.port1.postMessage(null,[D])},w.byteLength===2&&(M(w),w.byteLength===0&&(S=M)))}catch(D){}b.exports=S}),(function(b,O,a){var g=a(4),v=a(188);b.exports=function(p){if(v){try{return g.process.getBuiltinModule(p)}catch(x){}try{return Function('return require("'+p+'")')()}catch(x){}}}}),(function(b,O,a){var g=a(4),v=a(7),p=a(27),x=a(189),y=g.structuredClone;b.exports=!!y&&!v(function(){if(x==="DENO"&&p>92||x==="NODE"&&p>94||x==="BROWSER"&&p>97)return!1;var T=new ArrayBuffer(8),S=y(T,{transfer:[T]});return T.byteLength!==0||S.byteLength!==8})}),(function(b,O,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(b,O,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(b,O,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(b,O,a){var g=a(3),v=a(14),p=a(61),x=Date.prototype,y=v(x.getTime),T=v(x.setFullYear);g({target:"Date",proto:!0},{setYear:function(E){y(this);var I=+E;if(I!==I)return T(this,I);var w=p(I),M=w>=0&&w<=99?w+1900:w;return T(this,M)}})}),(function(b,O,a){var g=a(3);g({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})}),(function(b,O,a){var g=a(3),v=a(246);g({target:"Date",proto:!0,forced:Date.prototype.toISOString!==v},{toISOString:v})}),(function(b,O,a){var g=a(14),v=a(7),p=a(247).start,x=RangeError,y=isFinite,T=Math.abs,S=Date.prototype,E=S.toISOString,I=g(S.getTime),w=g(S.getUTCDate),M=g(S.getUTCFullYear),D=g(S.getUTCHours),L=g(S.getUTCMilliseconds),N=g(S.getUTCMinutes),F=g(S.getUTCMonth),k=g(S.getUTCSeconds);b.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(I(this)))throw new x("Invalid time value");var U=this,X=M(U),V=L(U),j=X<0?"-":X>9999?"+":"";return j+p(T(X),j?6:4,0)+"-"+p(F(U)+1,2,0)+"-"+p(w(U),2,0)+"T"+p(D(U),2,0)+":"+p(N(U),2,0)+":"+p(k(U),2,0)+"."+p(V,3,0)+"Z"}:E}),(function(b,O,a){var g=a(14),v=a(64),p=a(68),x=a(248),y=a(16),T=g(x),S=g("".slice),E=Math.ceil,I=function(w){return function(M,D,L){var N=p(y(M)),F=v(D),k=N.length;if(F<=k)return N;var G=L===void 0?" ":p(L),U,X;return G===""?N:(U=F-k,X=T(G,E(U/G.length)),X.length>U&&(X=S(X,0,U)),w?N+X:X+N)}};b.exports={start:I(!1),end:I(!0)}}),(function(b,O,a){var g=a(61),v=a(68),p=a(16),x=RangeError,y=Math.floor;b.exports=function(S){var E=v(p(this)),I="",w=g(S);if(w<0||w===1/0)throw new x("Wrong number of repetitions");for(;w>0;(w=y(w/2))&&(E+=E))w%2&&(I+=E);return I}}),(function(b,O,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),I=x(E,"number");return typeof I=="number"&&!isFinite(I)?null:E.toISOString()}})}),(function(b,O,a){var g=a(38),v=a(47),p=a(251),x=a(33),y=x("toPrimitive"),T=Date.prototype;g(T,y)||v(T,y,p)}),(function(b,O,a){var g=a(46),v=a(32),p=TypeError;b.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(b,O,a){var g=a(14),v=a(47),p=Date.prototype,x="Invalid Date",y="toString",T=g(p[y]),S=g(p.getTime);String(new Date(NaN))!==x&&v(p,y,function(){var I=S(this);return I===I?T(this):x})}),(function(b,O,a){var g=a(3),v=a(6),p=a(23),x=a(30),y=a(215),T=a(47),S=a(214),E=a(77),I=a(33),w=a(51),M=a(254),D=p("SuppressedError"),L=ReferenceError,N=I("dispose"),F=I("toStringTag"),k="DisposableStack",G=w.set,U=w.getterFor(k),X="sync-dispose",V="disposed",j="pending",Y=function(K){var tt=U(K);if(tt.state===V)throw new L(k+" already disposed");return tt},Z=function(){G(y(this,Q),{type:k,state:j,stack:[]}),v||(this.disposed=!1)},Q=Z.prototype;S(Q,{dispose:function(){var tt=U(this);if(tt.state!==V){tt.state=V,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=V,v||(this.disposed=!0),nt}}),v&&E(Q,"disposed",{configurable:!0,get:function(){return U(this).state===V}}),T(Q,N,Q.dispose,{name:"dispose"}),T(Q,F,k,{nonWritable:!0}),g({global:!0,constructor:!0},{DisposableStack:Z})}),(function(b,O,a){var g=a(23),v=a(8),p=a(14),x=a(84),y=a(46),T=a(30),S=a(17),E=a(29),I=a(33),w=I("asyncDispose"),M=I("dispose"),D=p([].push),L=function(F,k){if(k==="async-dispose"){var G=E(F,w);return G!==void 0||(G=E(F,M),G===void 0)?G:function(){var U=this,X=g("Promise");return new X(function(V){v(G,U),V(void 0)})}}return E(F,M)},N=function(F,k,G){return arguments.length<3&&!S(F)&&(G=T(L(y(F),k))),G===void 0?function(){}:x(G,F)};b.exports=function(F,k,G,U){var X;if(arguments.length<4){if(S(k)&&G==="sync-dispose")return;X=N(k,G)}else X=N(void 0,G,U);D(F.stack,X)}}),(function(b,O,a){var g=a(3),v=a(14),p=a(68),x=v("".charAt),y=v("".charCodeAt),T=v(/./.exec),S=v(1.1.toString),E=v("".toUpperCase),I=/[\w*+\-./@]/,w=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),N="",F=L.length,k=0,G,U;k<F;)G=x(L,k++),T(I,G)?N+=G:(U=y(G,0),U<256?N+="%"+E(w(U,2)):N+="%u"+E(w(U,4)));return N}})}),(function(b,O,a){var g=a(3),v=a(257);g({target:"Function",proto:!0,forced:Function.bind!==v},{bind:v})}),(function(b,O,a){var g=a(14),v=a(30),p=a(20),x=a(38),y=a(76),T=a(9),S=Function,E=g([].concat),I=g([].join),w={},M=function(D,L,N){if(!x(w,L)){for(var F=[],k=0;k<L;k++)F[k]="a["+k+"]";w[L]=S("C,a","return new C("+I(F,",")+")")}return w[L](D,N)};b.exports=T?S.bind:function(L){var N=v(this),F=N.prototype,k=y(arguments,1),G=function(){var X=E(k,y(arguments));return this instanceof G?M(N,X.length,X):N.apply(L,X)};return p(F)&&(G.prototype=F),G}}),(function(b,O,a){var g=a(21),v=a(20),p=a(44),x=a(24),y=a(33),T=a(48),S=y("hasInstance"),E=Function.prototype;S in E||p.f(E,S,{value:T(function(I){if(!g(this)||!v(I))return!1;var w=this.prototype;return v(w)?x(w,I):I instanceof this},S)})}),(function(b,O,a){var g=a(6),v=a(49).EXISTS,p=a(14),x=a(77),y=Function.prototype,T=p(y.toString),S=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,E=p(S.exec),I="name";g&&!v&&x(y,I,{configurable:!0,get:function(){try{return E(S,T(this))[1]}catch(w){return""}}})}),(function(b,O,a){var g=a(3),v=a(4);g({global:!0,forced:v.globalThis!==v},{globalThis:v})}),(function(b,O,a){var g=a(3),v=a(4),p=a(215),x=a(46),y=a(21),T=a(134),S=a(77),E=a(90),I=a(7),w=a(38),M=a(33),D=a(178).IteratorPrototype,L=a(6),N=a(36),F="constructor",k="Iterator",G=M("toStringTag"),U=TypeError,X=v[k],V=N||!y(X)||X.prototype!==D||!I(function(){X({})}),j=function(){if(p(this,D),T(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");w(this,Z)?this[Z]=K:E(this,Z,K)}}):D[Z]=Q};w(D,G)||Y(G,k),(V||!w(D,F)||D[F]===Object)&&Y(F,j),j.prototype=D,g({global:!0,constructor:!0,forced:V},{Iterator:j})}),(function(b,O,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(140),T=a(263),S=a(36),E=Array,I=T(function(){for(;;){var w=this.iterator;if(!w){var M=this.nextIterableIndex++,D=this.iterables;if(M>=D.length){this.done=!0;return}var L=D[M];this.iterables[M]=null,w=this.iterator=x(v(L.method,L.iterable)),this.next=w.next}var N=x(v(this.next,w));if(N.done){this.iterator=null,this.next=null;continue}return N.value}});g({target:"Iterator",stat:!0,forced:S},{concat:function(){for(var M=arguments.length,D=E(M),L=0;L<M;L++){var N=x(arguments[L]);D[L]={iterable:N,method:p(y(N))}}return new I({iterables:D,nextIterableIndex:0,iterator:null,next:null})}})}),(function(b,O,a){var g=a(8),v=a(71),p=a(43),x=a(214),y=a(33),T=a(51),S=a(29),E=a(178).IteratorPrototype,I=a(179),w=a(141),M=a(264),D=y("toStringTag"),L="IteratorHelper",N="WrapForValidIterator",F="normal",k="throw",G=T.set,U=function(j){var Y=T.getterFor(j?N:L);return x(v(E),{next:function(){var Q=Y(this);if(j)return Q.nextHandler();if(Q.done)return I(void 0,!0);try{var K=Q.nextHandler();return Q.returnHandlerResult?K:I(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,j){var tt=S(Q,"return");return tt?g(tt,Q):I(void 0,!0)}if(K)return I(void 0,!0);if(Z.inner)try{w(Z.inner.iterator,F)}catch(nt){return w(Q,k,nt)}if(Z.openIters)try{M(Z.openIters,F)}catch(nt){if(Q)return w(Q,k,nt);throw nt}return Q&&w(Q,F),I(void 0,!0)}})},X=U(!0),V=U(!1);p(V,D,"Iterator Helper"),b.exports=function(j,Y,Z){var Q=function(tt,nt){nt?(nt.iterator=tt.iterator,nt.next=tt.next):nt=tt,nt.type=Y?N:L,nt.returnHandlerResult=!!Z,nt.nextHandler=j,nt.counter=0,nt.done=!1,G(this,nt)};return Q.prototype=Y?X:V,Q}}),(function(b,O,a){var g=a(141);b.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(T){p="throw",x=T}if(p==="throw")throw x;return x}}),(function(b,O,a){var g=a(8),v=a(47),p=a(29),x=a(38),y=a(33),T=a(178).IteratorPrototype,S=y("dispose");x(T,S)||v(T,S,function(){var E=p(this,"return");E&&g(E,this)})}),(function(b,O,a){var g=a(3),v=a(8),p=a(46),x=a(267),y=a(268),T=a(269),S=a(141),E=a(263),I=a(270),w=a(271),M=a(36),D=!M&&!I("drop",0),L=!M&&!D&&w("drop",RangeError),N=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:N},{drop:function(G){p(this);var U;try{U=T(y(+G))}catch(X){S(this,"throw",X)}return L?v(L,this,U):new F(x(this),{remaining:U})}})}),(function(b){b.exports=function(O){return{iterator:O,next:O.next,done:!1}}}),(function(b){var O=RangeError;b.exports=function(a){if(a===a)return a;throw new O("NaN is not allowed")}}),(function(b,O,a){var g=a(61),v=RangeError;b.exports=function(p){var x=g(p);if(x<0)throw new v("The argument can't be less than 0");return x}}),(function(b){b.exports=function(O,a){var g=typeof Iterator=="function"&&Iterator.prototype[O];if(g)try{g.call({next:null},a).next()}catch(v){return!0}}}),(function(b,O,a){var g=a(4);b.exports=function(v,p){var x=g.Iterator,y=x&&x.prototype,T=y&&y[v],S=!1;if(T)try{T.call({next:function(){return{done:!0}},return:function(){S=!0}},-1)}catch(E){E instanceof p||(S=!1)}if(!S)return T}}),(function(b,O,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),T=a(267),S=a(141),E=a(271),I=E("every",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:I},{every:function(M){y(this);try{x(M)}catch(N){S(this,"throw",N)}if(I)return v(I,this,M);var D=T(this),L=0;return!p(D,function(N,F){if(!M(N,L++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),T=a(263),S=a(170),E=a(36),I=a(141),w=a(270),M=a(271),D=!E&&!w("filter",function(){}),L=!E&&!D&&M("filter",TypeError),N=E||D||L,F=T(function(){for(var k=this.iterator,G=this.predicate,U=this.next,X,V,j;;){if(X=x(v(U,k)),V=this.done=!!X.done,V)return;if(j=X.value,S(k,G,[j,this.counter++],!0))return j}});g({target:"Iterator",proto:!0,real:!0,forced:N},{filter:function(G){x(this);try{p(G)}catch(U){I(this,"throw",U)}return L?v(L,this,G):new F(y(this),{predicate:G})}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),T=a(267),S=a(141),E=a(271),I=E("find",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:I},{find:function(M){y(this);try{x(M)}catch(N){S(this,"throw",N)}if(I)return v(I,this,M);var D=T(this),L=0;return p(D,function(N,F){if(M(N,L++))return F(N)},{IS_RECORD:!0,INTERRUPTED:!0}).result}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),T=a(276),S=a(263),E=a(141),I=a(36),w=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=!I&&!w("flatMap",function(){}),N=!I&&!L&&M("flatMap",TypeError),F=I||L||N||D(),k=S(function(){for(var G=this.iterator,U=this.mapper,X,V;;){if(V=this.inner)try{if(X=x(v(V.next,V.iterator)),!X.done)return X.value;this.inner=null}catch(j){E(G,"throw",j)}if(X=x(v(this.next,G)),this.done=!!X.done)return;try{this.inner=T(U(X.value,this.counter++),!1)}catch(j){E(G,"throw",j)}}});g({target:"Iterator",proto:!0,real:!0,forced:F},{flatMap:function(U){x(this);try{p(U)}catch(X){E(this,"throw",X)}return N?v(N,this,U):new k(y(this),{mapper:U,inner:null})}})}),(function(b,O,a){var g=a(8),v=a(46),p=a(267),x=a(140);b.exports=function(y,T){(!T||typeof y!="string")&&v(y);var S=x(y);return p(v(S!==void 0?g(S,y):y))}}),(function(b,O,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),T=a(267),S=a(141),E=a(271),I=E("forEach",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:I},{forEach:function(M){y(this);try{x(M)}catch(N){S(this,"throw",N)}if(I)return v(I,this,M);var D=T(this),L=0;p(D,function(N){M(N,L++)},{IS_RECORD:!0})}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(39),x=a(24),y=a(178).IteratorPrototype,T=a(263),S=a(276),E=a(36),I=E||(function(){try{Iterator.from({return:null}).return()}catch(M){return!0}})(),w=T(function(){return v(this.next,this.iterator)},!0);g({target:"Iterator",stat:!0,forced:I},{from:function(D){var L=S(typeof D=="string"?p(D):D,!0);return x(y,L.iterator)?L.iterator:new w(L)}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(30),x=a(46),y=a(267),T=a(263),S=a(170),E=a(141),I=a(270),w=a(271),M=a(36),D=!M&&!I("map",function(){}),L=!M&&!D&&w("map",TypeError),N=M||D||L,F=T(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:N},{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(b,O,a){var g=a(3),v=a(136),p=a(30),x=a(46),y=a(267),T=a(141),S=a(271),E=a(95),I=a(7),w=TypeError,M=I(function(){[].keys().reduce(function(){},void 0)}),D=!M&&S("reduce",w);g({target:"Iterator",proto:!0,real:!0,forced:M||D},{reduce:function(N){x(this);try{p(N)}catch(X){T(this,"throw",X)}var F=arguments.length<2,k=F?void 0:arguments[1];if(D)return E(D,this,F?[N]:[N,k]);var G=y(this),U=0;if(v(G,function(X){F?(F=!1,k=X):k=N(k,X,U),U++},{IS_RECORD:!0}),F)throw new w("Reduce of empty iterator with no initial value");return k}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(136),x=a(30),y=a(46),T=a(267),S=a(141),E=a(271),I=E("some",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:I},{some:function(M){y(this);try{x(M)}catch(N){S(this,"throw",N)}if(I)return v(I,this,M);var D=T(this),L=0;return p(D,function(N,F){if(M(N,L++))return F()},{IS_RECORD:!0,INTERRUPTED:!0}).stopped}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(46),x=a(267),y=a(268),T=a(269),S=a(263),E=a(141),I=a(270),w=a(271),M=a(36),D=!M&&!I("take",1),L=!M&&!D&&w("take",RangeError),N=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:N},{take:function(G){p(this);var U;try{U=T(y(+G))}catch(X){E(this,"throw",X)}return L?v(L,this,U):new F(x(this),{remaining:U})}})}),(function(b,O,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(I){p(S,E++,I)},{IS_RECORD:!0}),S}})}),(function(b,O,a){var g=a(3),v=a(98),p=a(96);g({target:"JSON",stat:!0,forced:!v},{isRawJSON:p})}),(function(b,O,a){var g=a(3),v=a(6),p=a(4),x=a(23),y=a(14),T=a(8),S=a(21),E=a(20),I=a(88),w=a(38),M=a(68),D=a(63),L=a(90),N=a(7),F=a(97),k=a(26),G=p.JSON,U=p.Number,X=p.SyntaxError,V=G&&G.parse,j=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 wt=new Ft(pt,0,""),Bt=wt.parse(),Qt=Bt.value,Ot=wt.skip(st,Bt.end);if(Ot<pt.length)throw new X('Unexpected extra character: "'+Z(pt,Ot)+'" after the parsed data at: '+Ot);return S(mt)?yt({"":Qt},"",mt,Bt):Qt},yt=function(pt,mt,wt,Bt){var Qt=pt[mt],Ot=Bt&&Qt===Bt.value,Wt=Ot&&typeof Bt.source=="string"?{source:Bt.source}:{},ae,pe,oe,de,Re;if(E(Qt)){var Pe=I(Qt),Ee=Ot?Bt.nodes:Pe?[]:{};if(Pe)for(ae=Ee.length,oe=D(Qt),de=0;de<oe;de++)Ct(Qt,de,yt(Qt,""+de,wt,de<ae?Ee[de]:void 0));else for(pe=j(Qt),oe=D(pe),de=0;de<oe;de++)Re=pe[de],Ct(Qt,Re,yt(Qt,Re,wt,w(Ee,Re)?Ee[Re]:void 0))}return T(wt,pt,mt,Qt,Wt)},Ct=function(pt,mt,wt){if(v){var Bt=Y(pt,mt);if(Bt&&!Bt.configurable)return}wt===void 0?delete pt[mt]:L(pt,mt,wt)},Tt=function(pt,mt,wt,Bt){this.value=pt,this.end=mt,this.source=wt,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),wt=this.fork(mt),Bt=Z(pt,mt);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: '+mt)},node:function(pt,mt,wt,Bt,Qt){return new Tt(mt,Bt,pt?null:Q(this.source,wt,Bt),Qt)},object:function(){for(var pt=this.source,mt=this.index+1,wt=!1,Bt={},Qt={},Ot=!1;mt<pt.length;){if(mt=this.until(['"',"}"],mt),Z(pt,mt)==="}"&&!wt){mt++,Ot=!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===",")wt=!0,mt++;else if(pe==="}"){mt++,Ot=!0;break}}if(!Ot)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,wt=!1,Bt=[],Qt=[],Ot=!1;mt<pt.length;){if(mt=this.skip(st,mt),Z(pt,mt)==="]"&&!wt){mt++,Ot=!0;break}var Wt=this.fork(mt).parse();if(tt(Qt,Wt),tt(Bt,Wt.value),mt=this.until([",","]"],Wt.end),Z(pt,mt)===",")wt=!0,mt++;else if(Z(pt,mt)==="]"){mt++,Ot=!0;break}}if(!Ot)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,wt=mt;if(Z(pt,wt)==="-"&&wt++,Z(pt,wt)==="0")wt++;else if(K(rt,Z(pt,wt)))wt=this.skip(nt,wt+1);else throw new X("Failed to parse number at: "+wt);if(Z(pt,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(pt,wt)==="e"||Z(pt,wt)==="E"){wt++,(Z(pt,wt)==="+"||Z(pt,wt)==="-")&&wt++;var Qt=wt;if(wt=this.skip(nt,wt),Qt===wt)throw new X("Failed to parse number's exponent value at: "+wt)}return this.node(ct,U(Q(pt,mt,wt)),mt,wt)},keyword:function(pt){var mt=""+pt,wt=this.index,Bt=wt+mt.length;if(Q(this.source,wt,Bt)!==mt)throw new X("Failed to parse value at: "+wt);return this.node(ct,pt,wt,Bt)},skip:function(pt,mt){for(var wt=this.source;mt<wt.length&&K(pt,Z(wt,mt));mt++);return mt},until:function(pt,mt){mt=this.skip(st,mt);for(var wt=Z(this.source,mt),Bt=0;Bt<pt.length;Bt++)if(pt[Bt]===wt)return mt;throw new X('Unexpected character: "'+wt+'" at: '+mt)}};var Lt=N(function(){var pt="9007199254740993",mt;return V(pt,function(wt,Bt,Qt){mt=Qt.source}),mt!==pt}),Pt=k&&!N(function(){return 1/V("-0 ")!==-1/0});g({target:"JSON",stat:!0,forced:Lt},{parse:function(mt,wt){return Pt&&!S(wt)?V(mt):gt(mt,wt)}})}),(function(b,O,a){var g=a(3),v=a(287),p=a(98),x=a(23),y=a(14),T=a(68),S=a(90),E=a(51).set,I=SyntaxError,w=x("JSON","parse"),M=x("Object","create"),D=x("Object","freeze"),L=y("".charAt),N="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=T(G);if(U===""||F(L(U,0))||F(L(U,U.length-1)))throw new I(N);var X=w(U);if(typeof X=="object"&&X!==null)throw new I(N);var V=M(null);return E(V,{type:"RawJSON"}),S(V,"rawJSON",U),v?D(V):V}})}),(function(b,O,a){var g=a(7);b.exports=!g(function(){return Object.isExtensible(Object.preventExtensions({}))})}),(function(b,O,a){var g=a(4),v=a(82);v(g.JSON,"JSON",!0)}),(function(b,O,a){a(290)}),(function(b,O,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(b,O,a){var g=a(3),v=a(4),p=a(14),x=a(67),y=a(47),T=a(292),S=a(136),E=a(215),I=a(21),w=a(17),M=a(20),D=a(7),L=a(171),N=a(82),F=a(123);b.exports=function(k,G,U){var X=k.indexOf("Map")!==-1,V=k.indexOf("Weak")!==-1,j=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 V&&!M(Ct)?!1:yt(this,Ct===0?0:Ct)}:gt==="get"?function(Tt){return V&&!M(Tt)?void 0:yt(this,Tt===0?0:Tt)}:gt==="has"?function(Tt){return V&&!M(Tt)?!1:yt(this,Tt===0?0:Tt)}:function(Tt,Ft){return yt(this,Tt===0?0:Tt,Ft),this})},nt=x(k,!I(Y)||!(V||Z.forEach&&!D(function(){new Y().entries().next()})));if(nt)Q=U.getConstructor(G,k,X,j),T.enable();else if(x(k,!0)){var rt=new Q,it=rt[j](V?{}:-0,1)!==rt,st=D(function(){rt.has(1)}),ct=L(function(gt){new Y(gt)}),ht=!V&&D(function(){for(var gt=new Y,yt=5;yt--;)gt[j](yt,yt);return!gt.has(-0)});ct||(Q=G(function(gt,yt){E(gt,Z);var Ct=F(new Y,gt,Q);return w(yt)||S(yt,Ct[j],{that:Ct,AS_ENTRIES:X}),Ct}),Q.prototype=Z,Z.constructor=Q),(st||ht)&&(tt("delete"),tt("has"),X&&tt("get")),(ht||it)&&tt(j),V&&Z.clear&&delete Z.clear}return K[k]=Q,g({global:!0,constructor:!0,forced:Q!==Y},K),N(Q,k),V||U.setStrong(Q,k,X),Q}}),(function(b,O,a){var g=a(3),v=a(14),p=a(54),x=a(20),y=a(38),T=a(44).f,S=a(57),E=a(75),I=a(293),w=a(40),M=a(287),D=!1,L=w("meta"),N=0,F=function(j){T(j,L,{value:{objectID:"O"+N++,weakData:{}}})},k=function(j,Y){if(!x(j))return typeof j=="symbol"?j:(typeof j=="string"?"S":"P")+j;if(!y(j,L)){if(!I(j))return"F";if(!Y)return"E";F(j)}return j[L].objectID},G=function(j,Y){if(!y(j,L)){if(!I(j))return!0;if(!Y)return!1;F(j)}return j[L].weakData},U=function(j){return M&&D&&I(j)&&!y(j,L)&&F(j),j},X=function(){V.enable=function(){},D=!0;var j=S.f,Y=v([].splice),Z={};Z[L]=1,j(Z).length&&(S.f=function(Q){for(var K=j(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}))},V=b.exports={enable:X,fastKey:k,getWeakData:G,onFreeze:U};p[L]=!0}),(function(b,O,a){var g=a(7),v=a(20),p=a(15),x=a(294),y=Object.isExtensible,T=g(function(){y(1)});b.exports=T||x?function(E){return!v(E)||x&&p(E)==="ArrayBuffer"?!1:y?y(E):!0}:y}),(function(b,O,a){var g=a(7);b.exports=g(function(){if(typeof ArrayBuffer=="function"){var v=new ArrayBuffer(8);Object.isExtensible(v)&&Object.defineProperty(v,"a",{value:8})}})}),(function(b,O,a){var g=a(71),v=a(77),p=a(214),x=a(84),y=a(215),T=a(17),S=a(136),E=a(176),I=a(179),w=a(200),M=a(6),D=a(292).fastKey,L=a(51),N=L.set,F=L.getterFor;b.exports={getConstructor:function(k,G,U,X){var V=k(function(K,tt){y(K,j),N(K,{type:G,index:g(null),first:null,last:null,size:0}),M||(K.size=0),T(tt)||S(tt,K[X],{that:K,AS_ENTRIES:U})}),j=V.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(j,{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(j,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(j,"size",{configurable:!0,get:function(){return Y(this).size}}),V},setStrong:function(k,G,U){var X=G+" Iterator",V=F(G),j=F(X);E(k,G,function(Y,Z){N(this,{type:X,target:Y,state:V(Y),kind:Z,last:null})},function(){for(var Y=j(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,I(void 0,!0)):I(Z==="keys"?Q.key:Z==="values"?Q.value:[Q.key,Q.value],!1)},U?"entries":"values",!U,!0),w(G)}}}),(function(b,O,a){var g=a(3),v=a(14),p=a(30),x=a(16),y=a(136),T=a(297),S=a(36),E=a(7),I=T.Map,w=T.has,M=T.get,D=T.set,L=v([].push),N=S||E(function(){return I.groupBy("ab",function(F){return F}).get("a").length!==1});g({target:"Map",stat:!0,forced:S||N},{groupBy:function(k,G){x(k),p(G);var U=new I,X=0;return y(k,function(V){var j=G(V,X++);w(U,j)?L(M(U,j),V):D(U,j,[V])}),U}})}),(function(b,O,a){var g=a(14),v=Map.prototype;b.exports={Map,set:g(v.set),get:g(v.get),has:g(v.has),remove:g(v.delete),proto:v}}),(function(b,O,a){var g=a(3),v=a(297),p=a(36),x=v.get,y=v.has,T=v.set;g({target:"Map",proto:!0,real:!0,forced:p},{getOrInsert:function(E,I){return y(this,E)?x(this,E):(T(this,E,I),I)}})}),(function(b,O,a){var g=a(3),v=a(30),p=a(297),x=a(36),y=p.get,T=p.has,S=p.set;g({target:"Map",proto:!0,real:!0,forced:x},{getOrInsertComputed:function(I,w){var M=T(this,I);if(v(w),M)return y(this,I);I===0&&1/I===-1/0&&(I=0);var D=w(I);return S(this,I,D),D}})}),(function(b,O,a){var g=a(3),v=a(301),p=Math.acosh,x=Math.log,y=Math.sqrt,T=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(I){var w=+I;return w<1?NaN:w>9490626562425156e-8?x(w)+T:v(w-1+y(w-1)*y(w+1))}})}),(function(b){var O=Math.log;b.exports=Math.log1p||function(g){var v=+g;return v>-1e-8&&v<1e-8?v-v*v/2:O(1+v)}}),(function(b,O,a){var g=a(3),v=Math.asinh,p=Math.log,x=Math.sqrt,y=Math.LN2,T=9490626562425156e-8;function S(I){var w=+I;return!isFinite(w)||w===0?w:w<0?-S(-w):w>T?p(w)+y:p(w+x(w*w+1))}var E=!(v&&1/v(0)>0);g({target:"Math",stat:!0,forced:E},{asinh:S})}),(function(b,O,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(T){var S=+T;return S===0?S:v(2*S/(1-S))/2}})}),(function(b,O,a){var g=a(3),v=a(219),p=Math.abs,x=Math.pow;g({target:"Math",stat:!0},{cbrt:function(T){var S=+T;return v(S)*x(p(S),.3333333333333333)}})}),(function(b,O,a){var g=a(3),v=Math.floor,p=Math.log,x=Math.LOG2E;g({target:"Math",stat:!0},{clz32:function(T){var S=T>>>0;return S?31-v(p(S+.5)*x):32}})}),(function(b,O,a){var g=a(3),v=a(307),p=Math.cosh,x=Math.abs,y=Math.E,T=!p||p(710)===1/0;g({target:"Math",stat:!0,forced:T},{cosh:function(E){var I=v(x(E)-1)+1;return(I+1/(I*y*y))*(y/2)}})}),(function(b){var O=Math.expm1,a=Math.exp;b.exports=!O||O(10)>22025.465794806718||O(10)<22025.465794806718||O(-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}:O}),(function(b,O,a){var g=a(3),v=a(307);g({target:"Math",stat:!0,forced:v!==Math.expm1},{expm1:v})}),(function(b,O,a){var g=a(3),v=a(217);g({target:"Math",stat:!0},{fround:v})}),(function(b,O,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(b,O,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 I=0,w=0,M=arguments.length,D=0,L,N;w<M;)L=p(arguments[w++]),D<L?(N=D/L,I=I*N*N+1,D=L):L>0?(N=L/D,I+=N*N):I+=L;return D===1/0?1/0:D*x(I)}})}),(function(b,O,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(T,S){var E=65535,I=+T,w=+S,M=E&I,D=E&w;return 0|M*D+((E&I>>>16)*D+M*(E&w>>>16)<<16>>>0)}})}),(function(b,O,a){var g=a(3),v=a(314);g({target:"Math",stat:!0},{log10:v})}),(function(b){var O=Math.log,a=Math.LOG10E;b.exports=Math.log10||function(v){return O(v)*a}}),(function(b,O,a){var g=a(3),v=a(301);g({target:"Math",stat:!0},{log1p:v})}),(function(b,O,a){var g=a(3),v=a(230);g({target:"Math",stat:!0},{log2:v})}),(function(b,O,a){var g=a(3),v=a(219);g({target:"Math",stat:!0},{sign:v})}),(function(b,O,a){var g=a(3),v=a(7),p=a(307),x=Math.abs,y=Math.exp,T=Math.E,S=v(function(){return Math.sinh(-2e-17)!==-2e-17});g({target:"Math",stat:!0,forced:S},{sinh:function(I){var w=+I;return x(w)<1?(p(w)-p(-w))/2:(y(w-1)-y(-w-1))*(T/2)}})}),(function(b,O,a){var g=a(3),v=a(14),p=a(136),x=RangeError,y=TypeError,T=1/0,S=NaN,E=Math.abs,I=Math.pow,w=v([].push),M=I(2,1023),D=I(2,53)-1,L=Number.MAX_VALUE,N=I(2,971),F={},k={},G={},U={},X={},V=function(j,Y){var Z=j+Y,Q=Y-(Z-j);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===T?K=K===k?F:G:pt===-T?K=K===G?F:k:(pt!==0||1/pt===T)&&(K===U||K===X)&&(K=X,w(Z,pt)))}),K){case F:return S;case k:return-T;case G:return T;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=V(rt,it),ct=st.hi,ht=st.lo,E(ct)===T){var Ft=ct===T?1:-1;nt+=Ft,rt=rt-Ft*M-Ft*M,E(rt)<E(it)&&(gt=rt,rt=it,it=gt),st=V(rt,it),ct=st.hi,ht=st.lo}ht!==0&&(tt[Ct++]=ht),rt=ct}tt.length=Ct,rt!==0&&w(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?T:-T;if(st=V(nt*M,Pt/2),ct=st.hi,ht=st.lo,ht*=2,E(2*ct)===T)return ct>0?ct===M&&ht===-(N/2)&&Lt>=0&&tt[Lt]<0?L:T:ct===-M&&ht===N/2&&Lt>=0&&tt[Lt]>0?-L:-T;ht!==0&&(tt[++Lt]=ht,ht=0),ct*=2}for(;Lt>=0&&(st=V(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(b,O,a){var g=a(3),v=a(307),p=Math.exp;g({target:"Math",stat:!0},{tanh:function(y){var T=+y,S=v(T),E=v(-T);return S===1/0?1:E===1/0?-1:(S-E)/(p(T)+p(-T))}})}),(function(b,O,a){var g=a(82);g(Math,"Math",!0)}),(function(b,O,a){var g=a(3),v=a(62);g({target:"Math",stat:!0},{trunc:v})}),(function(b,O,a){var g=a(3),v=a(36),p=a(6),x=a(4),y=a(80),T=a(14),S=a(67),E=a(38),I=a(123),w=a(24),M=a(22),D=a(19),L=a(7),N=a(57).f,F=a(5).f,k=a(44).f,G=a(324),U=a(325).trim,X="Number",V=x[X],j=y[X],Y=V.prototype,Z=x.TypeError,Q=T("".slice),K=T("".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,!V(" 0o1")||!V("0b1")||V("+0x1")),it=function(ht){return w(Y,ht)&&L(function(){G(ht)})},st=function(gt){var yt=arguments.length<1?0:V(tt(gt));return it(this)?I(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?N(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&&j&&ct(y[X],j),(rt||v)&&ct(y[X],V)}),(function(b,O,a){var g=a(14);b.exports=g(1.1.valueOf)}),(function(b,O,a){var g=a(14),v=a(16),p=a(68),x=a(326),y=g("".replace),T=RegExp("^["+x+"]+"),S=RegExp("(^|[^"+x+"])["+x+"]+$"),E=function(I){return function(w){var M=p(v(w));return I&1&&(M=y(M,T,"")),I&2&&(M=y(M,S,"$1")),M}};b.exports={start:E(1),end:E(2),trim:E(3)}}),(function(b){b.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(b,O,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})}),(function(b,O,a){var g=a(3),v=a(329);g({target:"Number",stat:!0},{isFinite:v})}),(function(b,O,a){var g=a(4),v=g.isFinite;b.exports=Number.isFinite||function(x){return typeof x=="number"&&v(x)}}),(function(b,O,a){var g=a(3),v=a(331);g({target:"Number",stat:!0},{isInteger:v})}),(function(b,O,a){var g=a(20),v=Math.floor;b.exports=Number.isInteger||function(x){return!g(x)&&isFinite(x)&&v(x)===x}}),(function(b,O,a){var g=a(3);g({target:"Number",stat:!0},{isNaN:function(p){return p!==p}})}),(function(b,O,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(b,O,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})}),(function(b,O,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})}),(function(b,O,a){var g=a(3),v=a(337);g({target:"Number",stat:!0,forced:Number.parseFloat!==v},{parseFloat:v})}),(function(b,O,a){var g=a(4),v=a(7),p=a(14),x=a(68),y=a(325).trim,T=a(326),S=p("".charAt),E=g.parseFloat,I=g.Symbol,w=I&&I.iterator,M=1/E(T+"-0")!==-1/0||w&&!v(function(){E(Object(w))});b.exports=M?function(L){var N=y(x(L)),F=E(N);return F===0&&S(N,0)==="-"?-0:F}:E}),(function(b,O,a){var g=a(3),v=a(339);g({target:"Number",stat:!0,forced:Number.parseInt!==v},{parseInt:v})}),(function(b,O,a){var g=a(4),v=a(7),p=a(14),x=a(68),y=a(325).trim,T=a(326),S=g.parseInt,E=g.Symbol,I=E&&E.iterator,w=/^[+-]?0x/i,M=p(w.exec),D=S(T+"08")!==8||S(T+"0x16")!==22||I&&!v(function(){S(Object(I))});b.exports=D?function(N,F){var k=y(x(N));return S(k,F>>>0||(M(w,k)?16:10))}:S}),(function(b,O,a){var g=a(3),v=a(14),p=a(61),x=a(324),y=a(248),T=a(314),S=a(7),E=RangeError,I=String,w=isFinite,M=Math.abs,D=Math.floor,L=Math.pow,N=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",V=function(){return S(function(){F(1,1/0)})&&S(function(){F(1,-1/0)})},j=function(){return!S(function(){F(1/0,1/0),F(NaN,1/0)})},Y=!X||!V()||!j();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(!w(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=T(K),it=D(ht),tt-it>=308?yt=K*U*L(10,tt-it-308):yt=K/L(10,it-tt),gt=N(yt),yt-gt>=.5&&(gt+=1),gt>=L(10,tt+1)&&(gt/=10,it+=1),rt=I(gt)),tt!==0&&(rt=G(rt,0,1)+"."+G(rt,1)),it===0?(st="+",ct="0"):(st=it>0?"+":"-",ct=I(M(it))),rt+="e"+st+ct,nt+rt}})}),(function(b,O,a){var g=a(3),v=a(14),p=a(61),x=a(324),y=a(248),T=a(7),S=RangeError,E=String,I=Math.floor,w=v(y),M=v("".slice),D=v(1.1.toFixed),L=function(X,V,j){return V===0?j:V%2===1?L(X,V-1,j*X):L(X*X,V/2,j)},N=function(X){for(var V=0,j=X;j>=4096;)V+=12,j/=4096;for(;j>=2;)V+=1,j/=2;return V},F=function(X,V,j){for(var Y=-1,Z=j;++Y<6;)Z+=V*X[Y],X[Y]=Z%1e7,Z=I(Z/1e7)},k=function(X,V){for(var j=6,Y=0;--j>=0;)Y+=X[j],X[j]=I(Y/V),Y=Y%V*1e7},G=function(X){for(var V=6,j="";--V>=0;)if(j!==""||V===0||X[V]!==0){var Y=E(X[V]);j=j===""?Y:j+w("0",7-Y.length)+Y}return j},U=T(function(){return D(8e-5,3)!=="0.000"||D(.9,0)!=="1"||D(1.255,2)!=="1.25"||D(0xde0b6b3a7640080,0)!=="1000000000000000128"})||!T(function(){D({})});g({target:"Number",proto:!0,forced:U},{toFixed:function(V){var j=x(this),Y=p(V),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(j!==j)return"NaN";if(j<=-1e21||j>=1e21)return E(j);if(j<0&&(Q="-",j=-j),j>1e-21)if(tt=N(j*L(2,69,1))-69,nt=tt<0?j*L(2,-tt,1):j/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)+w("0",Y);return Y>0?(it=K.length,K=Q+(it<=Y?"0."+w("0",Y-it)+K:M(K,0,it-Y)+"."+M(K,it-Y))):K=Q+K,K}})}),(function(b,O,a){var g=a(3),v=a(14),p=a(7),x=a(324),y=v(1.1.toPrecision),T=p(function(){return y(1,void 0)!=="1"})||!p(function(){y({})});g({target:"Number",proto:!0,forced:T},{toPrecision:function(E){return E===void 0?y(x(this)):y(x(this),E)}})}),(function(b,O,a){var g=a(3),v=a(344);g({target:"Object",stat:!0,arity:2,forced:Object.assign!==v},{assign:v})}),(function(b,O,a){var g=a(6),v=a(14),p=a(8),x=a(7),y=a(73),T=a(66),S=a(10),E=a(39),I=a(13),w=Object.assign,M=Object.defineProperty,D=v([].concat);b.exports=!w||x(function(){if(g&&w({b:1},w(M({},"a",{enumerable:!0,get:function(){M(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var L={},N={},F=Symbol("assign detection"),k="abcdefghijklmnopqrst";return L[F]=7,k.split("").forEach(function(G){N[G]=G}),w({},L)[F]!==7||y(w({},N)).join("")!==k})?function(N,F){for(var k=E(N),G=arguments.length,U=1,X=T.f,V=S.f;G>U;)for(var j=I(arguments[U++]),Y=X?D(y(j),X(j)):y(j),Z=Y.length,Q=0,K;Z>Q;)K=Y[Q++],(!g||p(V,j,K))&&(k[K]=j[K]);return k}:w}),(function(b,O,a){var g=a(3),v=a(6),p=a(71);g({target:"Object",stat:!0,sham:!v},{create:p})}),(function(b,O,a){var g=a(3),v=a(6),p=a(347),x=a(30),y=a(39),T=a(44);v&&g({target:"Object",proto:!0,forced:p},{__defineGetter__:function(E,I){T.f(y(this),E,{get:x(I),enumerable:!0,configurable:!0})}})}),(function(b,O,a){var g=a(36),v=a(4),p=a(7),x=a(198);b.exports=g||!p(function(){if(!(x&&x<535)){var y=Math.random();__defineSetter__.call(null,y,function(){}),delete v[y]}})}),(function(b,O,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(b,O,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(b,O,a){var g=a(3),v=a(6),p=a(347),x=a(30),y=a(39),T=a(44);v&&g({target:"Object",proto:!0,forced:p},{__defineSetter__:function(E,I){T.f(y(this),E,{set:x(I),enumerable:!0,configurable:!0})}})}),(function(b,O,a){var g=a(3),v=a(352).entries;g({target:"Object",stat:!0},{entries:function(x){return v(x)}})}),(function(b,O,a){var g=a(6),v=a(7),p=a(14),x=a(134),y=a(73),T=a(12),S=a(10).f,E=p(S),I=p([].push),w=g&&v(function(){var D=Object.create(null);return D[2]=2,!E(D,2)}),M=function(D){return function(L){for(var N=T(L),F=y(N),k=w&&x(N)===null,G=F.length,U=0,X=[],V;G>U;)V=F[U++],(!g||(k?V in N:E(N,V)))&&I(X,D?[V,N[V]]:N[V]);return X}};b.exports={entries:M(!0),values:M(!1)}}),(function(b,O,a){var g=a(3),v=a(287),p=a(7),x=a(20),y=a(292).onFreeze,T=Object.freeze,S=p(function(){T(1)});g({target:"Object",stat:!0,forced:S,sham:!v},{freeze:function(I){return T&&x(I)?T(y(I)):I}})}),(function(b,O,a){var g=a(3),v=a(136),p=a(90);g({target:"Object",stat:!0},{fromEntries:function(y){var T={};return v(y,function(S,E){p(T,S,E)},{AS_ENTRIES:!0}),T}})}),(function(b,O,a){var g=a(3),v=a(7),p=a(12),x=a(5).f,y=a(6),T=!y||v(function(){x(1)});g({target:"Object",stat:!0,forced:T,sham:!y},{getOwnPropertyDescriptor:function(E,I){return x(p(E),I)}})}),(function(b,O,a){var g=a(3),v=a(6),p=a(56),x=a(12),y=a(5),T=a(90);g({target:"Object",stat:!0,sham:!v},{getOwnPropertyDescriptors:function(E){for(var I=x(E),w=y.f,M=p(I),D={},L=0,N,F;M.length>L;)F=w(I,N=M[L++]),F!==void 0&&T(D,N,F);return D}})}),(function(b,O,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(b,O,a){var g=a(3),v=a(7),p=a(39),x=a(134),y=a(135),T=v(function(){x(1)});g({target:"Object",stat:!0,forced:T,sham:!y},{getPrototypeOf:function(E){return x(p(E))}})}),(function(b,O,a){var g=a(3),v=a(90),p=a(23),x=a(14),y=a(30),T=a(16),S=a(18),E=a(136),I=a(7),w=Object.groupBy,M=p("Object","create"),D=x([].push),L=!w||I(function(){return w("ab",function(N){return N}).a.length!==1});g({target:"Object",stat:!0,forced:L},{groupBy:function(F,k){T(F),y(k);var G=M(null),U=0;return E(F,function(X){var V=S(k(X,U++));V in G?D(G[V],X):v(G,V,[X])}),G}})}),(function(b,O,a){var g=a(3),v=a(38);g({target:"Object",stat:!0},{hasOwn:v})}),(function(b,O,a){var g=a(3),v=a(362);g({target:"Object",stat:!0},{is:v})}),(function(b){b.exports=Object.is||function(a,g){return a===g?a!==0||1/a===1/g:a!==a&&g!==g}}),(function(b,O,a){var g=a(3),v=a(293);g({target:"Object",stat:!0,forced:Object.isExtensible!==v},{isExtensible:v})}),(function(b,O,a){var g=a(3),v=a(7),p=a(20),x=a(15),y=a(294),T=Object.isFrozen,S=y||v(function(){T(1)});g({target:"Object",stat:!0,forced:S},{isFrozen:function(I){return!p(I)||y&&x(I)==="ArrayBuffer"?!0:T?T(I):!1}})}),(function(b,O,a){var g=a(3),v=a(7),p=a(20),x=a(15),y=a(294),T=Object.isSealed,S=y||v(function(){T(1)});g({target:"Object",stat:!0,forced:S},{isSealed:function(I){return!p(I)||y&&x(I)==="ArrayBuffer"?!0:T?T(I):!1}})}),(function(b,O,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(b,O,a){var g=a(3),v=a(6),p=a(347),x=a(39),y=a(18),T=a(134),S=a(5).f;v&&g({target:"Object",proto:!0,forced:p},{__lookupGetter__:function(I){var w=x(this),M=y(I),D;do if(D=S(w,M))return D.get;while(w=T(w))}})}),(function(b,O,a){var g=a(3),v=a(6),p=a(347),x=a(39),y=a(18),T=a(134),S=a(5).f;v&&g({target:"Object",proto:!0,forced:p},{__lookupSetter__:function(I){var w=x(this),M=y(I),D;do if(D=S(w,M))return D.set;while(w=T(w))}})}),(function(b,O,a){var g=a(3),v=a(20),p=a(292).onFreeze,x=a(287),y=a(7),T=Object.preventExtensions,S=y(function(){T(1)});g({target:"Object",stat:!0,forced:S,sham:!x},{preventExtensions:function(I){return T&&v(I)?T(p(I)):I}})}),(function(b,O,a){var g=a(6),v=a(77),p=a(20),x=a(121),y=a(39),T=a(16),S=Object.getPrototypeOf,E=Object.setPrototypeOf,I=Object.prototype,w="__proto__";if(g&&S&&E&&!(w in I))try{v(I,w,{configurable:!0,get:function(){return S(y(this))},set:function(D){var L=T(this);x(D)&&p(L)&&E(L,D)}})}catch(M){}}),(function(b,O,a){var g=a(3),v=a(20),p=a(292).onFreeze,x=a(287),y=a(7),T=Object.seal,S=y(function(){T(1)});g({target:"Object",stat:!0,forced:S,sham:!x},{seal:function(I){return T&&v(I)?T(p(I)):I}})}),(function(b,O,a){var g=a(3),v=a(118);g({target:"Object",stat:!0},{setPrototypeOf:v})}),(function(b,O,a){var g=a(70),v=a(47),p=a(374);g||v(Object.prototype,"toString",p,{unsafe:!0})}),(function(b,O,a){var g=a(70),v=a(69);b.exports=g?{}.toString:function(){return"[object "+v(this)+"]"}}),(function(b,O,a){var g=a(3),v=a(352).values;g({target:"Object",stat:!0},{values:function(x){return v(x)}})}),(function(b,O,a){var g=a(3),v=a(337);g({global:!0,forced:parseFloat!==v},{parseFloat:v})}),(function(b,O,a){var g=a(3),v=a(339);g({global:!0,forced:parseInt!==v},{parseInt:v})}),(function(b,O,a){a(379),a(395),a(397),a(398),a(399),a(400)}),(function(b,O,a){var g=a(3),v=a(36),p=a(188),x=a(4),y=a(80),T=a(8),S=a(47),E=a(118),I=a(82),w=a(200),M=a(30),D=a(21),L=a(20),N=a(215),F=a(380),k=a(382).set,G=a(385),U=a(390),X=a(391),V=a(387),j=a(51),Y=a(392),Z=a(393),Q=a(394),K="Promise",tt=Z.CONSTRUCTOR,nt=Z.REJECTION_EVENT,rt=Z.SUBCLASSING,it=j.getterFor(K),st=j.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",wt=0,Bt=1,Qt=2,Ot=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,we=se?Ht.ok:Ht.fail,an=Ht.resolve,It=Ht.reject,Xt=Ht.domain,Mt,$t,qt;try{we?(se||(ee.rejection===Wt&&Vt(ee),ee.rejection=Ot),we===!0?Mt=ve:(Xt&&Xt.enter(),Mt=we(ve),Xt&&(Xt.exit(),qt=!0)),Mt===Ht.promise?It(new yt("Promise-chain cycle")):($t=Re(Mt))?T($t,Mt,an,It):an(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,we;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&&(we=x["on"+Ht])?we(se):Ht===pt&&U("Unhandled promise rejection",ve)},ye=function(Ht){T(k,x,function(){var ee=Ht.facade,ve=Ht.value,se=Ge(Ht),we;if(se&&(we=X(function(){p?Tt.emit("unhandledRejection",ve,ee):he(pt,ee,ve)}),Ht.rejection=p||Ge(Ht)?Wt:Ot,we.error))throw we.value})},Ge=function(Ht){return Ht.rejection!==Ot&&!Ht.parent},Vt=function(Ht){T(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))},nn=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 we={done:!1};try{T(se,ee,ne(nn,we,Ht),ne(re,we,Ht))}catch(an){re(we,an,Ht)}}):(Ht.value=ee,Ht.state=Bt,Ee(Ht,!1))}catch(we){re({done:!1},we,Ht)}}};if(tt&&(ht=function(ee){N(this,gt),M(ee),T(ae,this);var ve=it(this);try{ee(ne(nn,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 V,rejection:!1,state:wt,value:null})},ae.prototype=S(gt,"then",function(ee,ve){var se=it(this),we=Ft(F(this,ht));return se.parent=!0,we.ok=D(ee)?ee:!0,we.fail=D(ve)&&ve,we.domain=p?Tt.domain:void 0,se.state===wt?se.reactions.add(we):G(function(){Pe(we,se)}),we.promise}),pe=function(){var Ht=new ae,ee=it(Ht);this.promise=Ht,this.resolve=ne(nn,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(we,an){T(de,se,we,an)}).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,I(ht,K,!1,!0),w(K)}),(function(b,O,a){var g=a(46),v=a(381),p=a(17),x=a(33),y=x("species");b.exports=function(T,S){var E=g(T).constructor,I;return E===void 0||p(I=g(E)[y])?S:v(I)}}),(function(b,O,a){var g=a(89),v=a(31),p=TypeError;b.exports=function(x){if(g(x))return x;throw new p(v(x)+" is not a constructor")}}),(function(b,O,a){var g=a(4),v=a(95),p=a(84),x=a(21),y=a(38),T=a(7),S=a(74),E=a(76),I=a(42),w=a(383),M=a(384),D=a(188),L=g.setImmediate,N=g.clearImmediate,F=g.process,k=g.Dispatch,G=g.Function,U=g.MessageChannel,X=g.String,V=0,j={},Y="onreadystatechange",Z,Q,K,tt;T(function(){Z=g.location});var nt=function(ct){if(y(j,ct)){var ht=j[ct];delete j[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||!N)&&(L=function(ht){w(arguments.length,1);var gt=x(ht)?ht:G(ht),yt=E(arguments,1);return j[++V]=function(){v(gt,void 0,yt)},Q(V),V},N=function(ht){delete j[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:"&&!T(st)?(Q=st,g.addEventListener("message",it,!1)):Y in I("script")?Q=function(ct){S.appendChild(I("script"))[Y]=function(){S.removeChild(this),nt(ct)}}:Q=function(ct){setTimeout(rt(ct),0)}),b.exports={set:L,clear:N}}),(function(b){var O=TypeError;b.exports=function(a,g){if(a<g)throw new O("Not enough arguments");return a}}),(function(b,O,a){var g=a(28);b.exports=/ipad|iphone|ipod/i.test(g)&&/applewebkit/i.test(g)}),(function(b,O,a){var g=a(4),v=a(386),p=a(84),x=a(382).set,y=a(387),T=a(384),S=a(388),E=a(389),I=a(188),w=g.MutationObserver||g.WebKitMutationObserver,M=g.document,D=g.process,L=g.Promise,N=v("queueMicrotask"),F,k,G,U,X;if(!N){var V=new y,j=function(){var Y,Z;for(I&&(Y=D.domain)&&Y.exit();Z=V.get();)try{Z()}catch(Q){throw V.head&&F(),Q}Y&&Y.enter()};!T&&!I&&!E&&w&&M?(k=!0,G=M.createTextNode(""),new w(j).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(j)}):I?F=function(){D.nextTick(j)}:(x=p(x,g),F=function(){x(j)}),N=function(Y){V.head||F(),V.add(Y)}}b.exports=N}),(function(b,O,a){var g=a(4),v=a(6),p=Object.getOwnPropertyDescriptor;b.exports=function(x){if(!v)return g[x];var y=p(g,x);return y&&y.value}}),(function(b){var O=function(){this.head=null,this.tail=null};O.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}}},b.exports=O}),(function(b,O,a){var g=a(28);b.exports=/ipad|iphone|ipod/i.test(g)&&typeof Pebble!="undefined"}),(function(b,O,a){var g=a(28);b.exports=/web0s(?!.*chrome)/i.test(g)}),(function(b){b.exports=function(O,a){try{arguments.length===1?console.error(O):console.error(O,a)}catch(g){}}}),(function(b){b.exports=function(O){try{return{error:!1,value:O()}}catch(a){return{error:!0,value:a}}}}),(function(b,O,a){var g=a(4);b.exports=g.Promise}),(function(b,O,a){var g=a(4),v=a(392),p=a(21),x=a(67),y=a(50),T=a(33),S=a(189),E=a(36),I=a(27),w=v&&v.prototype,M=T("species"),D=!1,L=p(g.PromiseRejectionEvent),N=x("Promise",function(){var F=y(v),k=F!==String(v);if(!k&&I===66||E&&!(w.catch&&w.finally))return!0;if(!I||I<51||!/native code/.test(F)){var G=new v(function(V){V(1)}),U=function(V){V(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});b.exports={CONSTRUCTOR:N,REJECTION_EVENT:L,SUBCLASSING:D}}),(function(b,O,a){var g=a(30),v=TypeError,p=function(x){var y,T;this.promise=new x(function(S,E){if(y!==void 0||T!==void 0)throw new v("Bad Promise constructor");y=S,T=E}),this.resolve=g(y),this.reject=g(T)};b.exports.f=function(x){return new p(x)}}),(function(b,O,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),T=a(136),S=a(396);g({target:"Promise",stat:!0,forced:S},{all:function(I){var w=this,M=x.f(w),D=M.resolve,L=M.reject,N=y(function(){var F=p(w.resolve),k=[],G=0,U=1;T(I,function(X){var V=G++,j=!1;U++,v(F,w,X).then(function(Y){j||(j=!0,k[V]=Y,--U||D(k))},L)}),--U||D(k)});return N.error&&L(N.value),M.promise}})}),(function(b,O,a){var g=a(392),v=a(171),p=a(393).CONSTRUCTOR;b.exports=p||!v(function(x){g.all(x).then(void 0,function(){})})}),(function(b,O,a){var g=a(3),v=a(36),p=a(393).CONSTRUCTOR,x=a(392),y=a(23),T=a(21),S=a(47),E=x&&x.prototype;if(g({target:"Promise",proto:!0,forced:p,real:!0},{catch:function(w){return this.then(void 0,w)}}),!v&&T(x)){var I=y("Promise").prototype.catch;E.catch!==I&&S(E,"catch",I,{unsafe:!0})}}),(function(b,O,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),T=a(136),S=a(396);g({target:"Promise",stat:!0,forced:S},{race:function(I){var w=this,M=x.f(w),D=M.reject,L=y(function(){var N=p(w.resolve);T(I,function(F){v(N,w,F).then(M.resolve,D)})});return L.error&&D(L.value),M.promise}})}),(function(b,O,a){var g=a(3),v=a(394),p=a(393).CONSTRUCTOR;g({target:"Promise",stat:!0,forced:p},{reject:function(y){var T=v.f(this),S=T.reject;return S(y),T.promise}})}),(function(b,O,a){var g=a(3),v=a(23),p=a(36),x=a(392),y=a(393).CONSTRUCTOR,T=a(401),S=v("Promise"),E=p&&!y;g({target:"Promise",stat:!0,forced:p||y},{resolve:function(w){return T(E&&this===S?x:this,w)}})}),(function(b,O,a){var g=a(46),v=a(20),p=a(394);b.exports=function(x,y){if(g(x),v(y)&&y.constructor===x)return y;var T=p.f(x),S=T.resolve;return S(y),T.promise}}),(function(b,O,a){var g=a(3),v=a(8),p=a(30),x=a(394),y=a(391),T=a(136),S=a(396);g({target:"Promise",stat:!0,forced:S},{allSettled:function(I){var w=this,M=x.f(w),D=M.resolve,L=M.reject,N=y(function(){var F=p(w.resolve),k=[],G=0,U=1;T(I,function(X){var V=G++,j=!1;U++,v(F,w,X).then(function(Y){j||(j=!0,k[V]={status:"fulfilled",value:Y},--U||D(k))},function(Y){j||(j=!0,k[V]={status:"rejected",reason:Y},--U||D(k))})}),--U||D(k)});return N.error&&L(N.value),M.promise}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(30),x=a(23),y=a(394),T=a(391),S=a(136),E=a(396),I="No one promise resolved";g({target:"Promise",stat:!0,forced:E},{any:function(M){var D=this,L=x("AggregateError"),N=y.f(D),F=N.resolve,k=N.reject,G=T(function(){var U=p(D.resolve),X=[],V=0,j=1,Y=!1;S(M,function(Z){var Q=V++,K=!1;j++,v(U,D,Z).then(function(tt){K||Y||(Y=!0,F(tt))},function(tt){K||Y||(K=!0,X[Q]=tt,--j||k(new L(X,I)))})}),--j||k(new L(X,I))});return G.error&&k(G.value),N.promise}})}),(function(b,O,a){var g=a(3),v=a(36),p=a(392),x=a(7),y=a(23),T=a(21),S=a(380),E=a(401),I=a(47),w=p&&p.prototype,M=!!p&&x(function(){w.finally.call({then:function(){}},function(){})});if(g({target:"Promise",proto:!0,real:!0,forced:M},{finally:function(L){var N=S(this,y("Promise")),F=T(L);return this.then(F?function(k){return E(N,L()).then(function(){return k})}:L,F?function(k){return E(N,L()).then(function(){throw k})}:L)}}),!v&&T(p)){var D=y("Promise").prototype.finally;w.finally!==D&&I(w,"finally",D,{unsafe:!0})}}),(function(b,O,a){var g=a(3),v=a(4),p=a(95),x=a(76),y=a(394),T=a(30),S=a(391),E=v.Promise,I=!1,w=!E||!E.try||S(function(){E.try(function(M){I=M===8},8)}).error||!I;g({target:"Promise",stat:!0,forced:w},{try:function(M){var D=arguments.length>1?x(arguments,1):[],L=y.f(this),N=S(function(){return p(T(M),void 0,D)});return(N.error?L.reject:L.resolve)(N.value),L.promise}})}),(function(b,O,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(b,O,a){var g=a(3),v=a(408),p=a(7),x=Array.fromAsync,y=!x||p(function(){var T=0;return x.call(function(){return T++,[]},{length:0}),T!==1});g({target:"Array",stat:!0,forced:y},{fromAsync:v})}),(function(b,O,a){var g=a(84),v=a(14),p=a(89),x=a(409),y=a(139),T=a(267),S=a(140),E=a(29),I=a(23),w=a(205),M=a(33),D=a(410),L=a(412).toArray,N=M("asyncIterator"),F=v(w("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)},b.exports=function(V){var j=this,Y=arguments.length,Z=Y>1?arguments[1]:void 0,Q=Y>2?arguments[2]:void 0;return new(I("Promise"))(function(K){Z!==void 0&&(Z=g(Z,Q));var tt=E(V,N),nt=tt?void 0:S(V)||G,rt=p(j)?new j:[],it=tt?x(V,tt):new D(T(y(V,nt)));K(L(it,Z,rt))})}}),(function(b,O,a){var g=a(8),v=a(410),p=a(46),x=a(139),y=a(267),T=a(29),S=a(33),E=S("asyncIterator");b.exports=function(I,w){var M=arguments.length<2?T(I,E):w;return M?p(g(M,I)):new v(y(x(I)))}}),(function(b,O,a){var g=a(8),v=a(46),p=a(71),x=a(29),y=a(214),T=a(51),S=a(141),E=a(23),I=a(411),w=a(179),M=E("Promise"),D="AsyncFromSyncIterator",L=T.set,N=T.getterFor(D),F=function(G,U,X,V,j){var Y=G.done;M.resolve(G.value).then(function(Z){U(w(Z,Y))},function(Z){if(!Y&&j)try{S(V,"throw",Z)}catch(Q){Z=Q}X(Z)})},k=function(U){U.type=D,L(this,U)};k.prototype=y(p(I),{next:function(){var U=N(this),X=arguments.length>0,V=X?arguments[0]:void 0;return new M(function(j,Y){var Z=v(X?g(U.next,U.iterator,V):g(U.next,U.iterator));F(Z,j,Y,U.iterator,!0)})},return:function(){var G=N(this),U=G.iterator,X=arguments.length>0,V=X?arguments[0]:void 0;return new M(function(j,Y){var Z=x(U,"return");if(Z===void 0)return j(w(V,!0));var Q=v(X?g(Z,U,V):g(Z,U));F(Q,j,Y,U)})},throw:function(){var G=N(this),U=G.iterator,X=arguments.length>0,V=X?arguments[0]:void 0;return new M(function(j,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,V):g(Z,U));F(Q,j,Y,U,!0)})}}),b.exports=k}),(function(b,O,a){var g=a(4),v=a(35),p=a(21),x=a(71),y=a(134),T=a(47),S=a(33),E=a(36),I="USE_FUNCTION_CONSTRUCTOR",w=S("asyncIterator"),M=g.AsyncIterator,D=v.AsyncIteratorPrototype,L,N;if(D)L=D;else if(p(M))L=M.prototype;else if(v[I]||g[I])try{N=y(y(y(Function("return async function*(){}()")()))),y(N)===Object.prototype&&(L=N)}catch(F){}L?E&&(L=x(L)):L={},p(L[w])||T(L,w,function(){return this}),b.exports=L}),(function(b,O,a){var g=a(8),v=a(30),p=a(46),x=a(20),y=a(147),T=a(23),S=a(90),E=a(148),I=a(267),w=a(413),M=function(D){var L=D===0,N=D===1,F=D===2,k=D===3;return function(G,U,X){p(G);var V=U!==void 0;(V||!L)&&v(U);var j=I(G),Y=T("Promise"),Z=j.iterator,Q=j.next,K=0;return new Y(function(tt,nt){var rt=function(st){w(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(V){var ht=K++,gt=U(ct,ht),yt=function(Ct){if(N)it();else if(F)Ct?it():w(Z,tt,!1,nt);else if(L)try{S(X,ht,Ct),it()}catch(Tt){rt(Tt)}else Ct?w(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()})}};b.exports={toArray:M(0),forEach:M(1),every:M(2),some:M(3),find:M(4)}}),(function(b,O,a){var g=a(8),v=a(46),p=a(23),x=a(29);b.exports=function(y,T,S,E){try{var I=x(y,"return");if(I)return p("Promise").resolve(g(I,y)).then(function(w){try{T!==E&&v(w)}catch(M){E(M);return}T(S)},function(w){T===E?T(S):E(w)})}catch(w){return E(T===E?S:w)}T(S)}}),(function(b,O,a){var g=a(3),v=a(6),p=a(23),x=a(30),y=a(215),T=a(47),S=a(214),E=a(77),I=a(33),w=a(51),M=a(254),D=a(27),L=p("Promise"),N=p("SuppressedError"),F=ReferenceError,k=I("asyncDispose"),G=I("toStringTag"),U="AsyncDisposableStack",X=w.set,V=w.getterFor(U),j="async-dispose",Y="disposed",Z="pending",Q=function(rt){var it=V(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=V(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 N(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,j),it},adopt:function(it,st){var ct=Q(this);return x(st),M(ct,void 0,j,function(){return st(it)}),it},defer:function(it){var st=Q(this);x(it),M(st,void 0,j,it)},move:function(){var it=Q(this),st=new K;return V(st).stack=it.stack,it.stack=[],it.state=Y,v||(this.disposed=!0),st}}),v&&E(tt,"disposed",{configurable:!0,get:function(){return V(this).state===Y}}),T(tt,k,tt.disposeAsync,{name:"disposeAsync"}),T(tt,G,U,{nonWritable:!0});var nt=D&&D<136;g({global:!0,constructor:!0,forced:nt},{AsyncDisposableStack:K})}),(function(b,O,a){var g=a(8),v=a(47),p=a(23),x=a(29),y=a(38),T=a(33),S=a(411),E=T("asyncDispose"),I=p("Promise");y(S,E)||v(S,E,function(){var w=this;return new I(function(M,D){var L=x(w,"return");L?I.resolve(g(L,w)).then(function(){M(void 0)},D):M(void 0)})})}),(function(b,O,a){var g=a(3),v=a(95),p=a(30),x=a(46),y=a(7),T=!y(function(){Reflect.apply(function(){})});g({target:"Reflect",stat:!0,forced:T},{apply:function(E,I,w){return v(p(E),I,x(w))}})}),(function(b,O,a){var g=a(3),v=a(23),p=a(95),x=a(257),y=a(381),T=a(46),S=a(20),E=a(71),I=a(7),w=v("Reflect","construct"),M=Object.prototype,D=[].push,L=I(function(){function k(){}return!(w(function(){},[],k)instanceof k)}),N=!I(function(){w(function(){})}),F=L||N;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(T(U),N&&!L)return w(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 V=[null];return p(D,V,U),new(p(x,G,V))}var j=X.prototype,Y=E(S(j)?j:M),Z=p(G,Y,U);return S(Z)?Z:Y}})}),(function(b,O,a){var g=a(3),v=a(6),p=a(46),x=a(18),y=a(44),T=a(21),S=a(7),E=TypeError,I=S(function(){Reflect.defineProperty(y.f({},1,{value:1}),1,{value:2})});g({target:"Reflect",stat:!0,forced:I,sham:!v},{defineProperty:function(M,D,L){p(M);var N=x(D),F,k;if(p(L),("get"in L||"set"in L)&&("get"in L&&!T(F=L.get)&&F!==void 0||"set"in L&&!T(k=L.set)&&k!==void 0||"value"in L||"writable"in L))throw new E("Invalid property descriptor");try{return y.f(M,N,L),!0}catch(G){return!1}}})}),(function(b,O,a){var g=a(3),v=a(46),p=a(5).f,x=a(18);g({target:"Reflect",stat:!0},{deleteProperty:function(T,S){v(T);var E=x(S),I=p(T,E);return I&&!I.configurable?!1:delete T[E]}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(20),x=a(46),y=a(421),T=a(5),S=a(134),E=a(18),I=function(w,M,D){if(x(w)===D)return w[M];var L=T.f(w,M);if(L)return y(L)?L.value:L.get===void 0?void 0:v(L.get,D);var N=S(w);if(p(N))return I(N,M,D)};g({target:"Reflect",stat:!0},{get:function(M,D){return I(x(M),E(D),arguments.length<3?M:arguments[2])}})}),(function(b,O,a){var g=a(38);b.exports=function(v){return v!==void 0&&(g(v,"value")||g(v,"writable"))}}),(function(b,O,a){var g=a(3),v=a(6),p=a(46),x=a(5);g({target:"Reflect",stat:!0,sham:!v},{getOwnPropertyDescriptor:function(T,S){return x.f(p(T),S)}})}),(function(b,O,a){var g=a(3),v=a(46),p=a(134),x=a(135);g({target:"Reflect",stat:!0,sham:!x},{getPrototypeOf:function(T){return p(v(T))}})}),(function(b,O,a){var g=a(3);g({target:"Reflect",stat:!0},{has:function(p,x){return x in p}})}),(function(b,O,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(b,O,a){var g=a(3),v=a(56);g({target:"Reflect",stat:!0},{ownKeys:v})}),(function(b,O,a){var g=a(3),v=a(23),p=a(46),x=a(287);g({target:"Reflect",stat:!0,sham:!x},{preventExtensions:function(T){p(T);try{var S=v("Object","preventExtensions");return S&&S(T),!0}catch(E){return!1}}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(46),x=a(20),y=a(421),T=a(7),S=a(44),E=a(5),I=a(134),w=a(11),M=a(18),D=function(N,F,k,G){var U=E.f(p(N),F),X,V,j;if(!U){if(x(V=I(N)))return D(V,F,k,G);U=w(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,w(0,k))}catch(Y){return!1}}else{if(j=U.set,j===void 0)return!1;v(j,G,k)}return!0},L=T(function(){var N=function(){},F=S.f(new N,"a",{configurable:!0});return Reflect.set(N.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(b,O,a){var g=a(3),v=a(46),p=a(120),x=a(118);x&&g({target:"Reflect",stat:!0},{setPrototypeOf:function(T,S){v(T),p(S);try{return x(T,S),!0}catch(E){return!1}}})}),(function(b,O,a){var g=a(3),v=a(4),p=a(82);g({global:!0},{Reflect:{}}),p(v.Reflect,"Reflect",!0)}),(function(b,O,a){var g=a(6),v=a(4),p=a(14),x=a(67),y=a(123),T=a(43),S=a(71),E=a(57).f,I=a(24),w=a(432),M=a(68),D=a(433),L=a(436),N=a(122),F=a(47),k=a(7),G=a(38),U=a(51).enforce,X=a(200),V=a(33),j=a(437),Y=a(438),Z=V("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||j||Y||k(function(){return yt[Z]=!1,Q(gt)!==gt||Q(yt)===yt||String(Q(gt,"i"))!=="/a/i"})),Pt=function(Qt){for(var Ot=Qt.length,Wt=0,ae="",pe=!1,oe;Wt<Ot;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 Ot=Qt.length,Wt=0,ae="",pe=[],oe=S(null),de=!1,Re=!1,Pe=0,Ee="",he;Wt<Ot;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(Ot,Wt){var ae=I(K,this),pe=w(Ot),oe=Wt===void 0,de=[],Re=Ot,Pe,Ee,he,ye,Ge,Vt;if(!ae&&pe&&oe&&Ot.constructor===mt)return Ot;if((pe||I(K,Ot))&&(Ot=Ot.source,oe&&(Wt=D(Re))),Ot=Ot===void 0?"":M(Ot),Wt=Wt===void 0?"":M(Wt),Re=Ot,j&&"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(Ot),Ot=ye[0],de=ye[1]),Ge=y(Q(Ot,Wt),ae?this:K,mt),(Ee||he||de.length)&&(Vt=U(Ge),Ee&&(Vt.dotAll=!0,Vt.raw=mt(Pt(Ot),Pe)),he&&(Vt.sticky=!0),de.length&&(Vt.groups=de)),Ot!==Re)try{T(Ge,"source",Re===""?"(?:)":Re)}catch(ne){}return Ge},wt=E(Q),Bt=0;wt.length>Bt;)N(mt,Q,wt[Bt++]);K.constructor=mt,mt.prototype=K,F(v,"RegExp",mt,{constructor:!0})}X("RegExp")}),(function(b,O,a){var g=a(20),v=a(15),p=a(33),x=p("match");b.exports=function(y){var T;return g(y)&&((T=y[x])!==void 0?!!T:v(y)==="RegExp")}}),(function(b,O,a){var g=a(8),v=a(38),p=a(24),x=a(434),y=a(435),T=RegExp.prototype;b.exports=x.correct?function(S){return S.flags}:function(S){return!x.correct&&p(T,S)&&!v(S,"flags")?g(y,S):S.flags}}),(function(b,O,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 T={},S="",E=y?"dgimsy":"gimsy",I=function(L,N){Object.defineProperty(T,L,{get:function(){return S+=N,!0}})},w={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};y&&(w.hasIndices="d");for(var M in w)I(M,w[M]);var D=Object.getOwnPropertyDescriptor(p.prototype,"flags").get.call(T);return D!==E||S!==E});b.exports={correct:x}}),(function(b,O,a){var g=a(46);b.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(b,O,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}),T=x||g(function(){var S=p("^r","gy");return S.lastIndex=2,S.exec("str")!==null});b.exports={BROKEN_CARET:T,MISSED_STICKY:y,UNSUPPORTED_Y:x}}),(function(b,O,a){var g=a(7),v=a(4),p=v.RegExp;b.exports=g(function(){var x=p(".","s");return!(x.dotAll&&x.test(`
|
|
28
|
-
`)&&x.flags==="s")})}),(function(
|
|
29
|
-
`&&Lt!=="\r"&&Lt!=="\u2028"&&Lt!=="\u2029")&&(Ct="(?: (?:"+Ct+"))",Ft=" "+Ft,Tt++),st=new RegExp("^(?:"+Ct+")",yt)}V&&(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),V&&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}),b.exports=L}),(function(b,O,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(b,O,a){var g=a(6),v=a(436).MISSED_STICKY,p=a(15),x=a(77),y=a(51).get,T=RegExp.prototype,S=TypeError;g&&v&&x(T,"sticky",{configurable:!0,get:function(){if(this!==T){if(p(this)==="RegExp")return!!y(this).sticky;throw new S("Incompatible receiver, RegExp required")}}})}),(function(b,O,a){a(442);var g=a(3),v=a(8),p=a(21),x=a(46),y=a(68),T=(function(){var E=!1,I=/[ac]/;return I.exec=function(){return E=!0,/./.exec.apply(this,arguments)},I.test("abc")===!0&&E})(),S=/./.test;g({target:"RegExp",proto:!0,forced:!T},{test:function(E){var I=x(this),w=y(E),M=I.exec;if(!p(M))return v(S,I,w);var D=v(M,I,w);return D===null?!1:(x(D),!0)}})}),(function(b,O,a){var g=a(49).PROPER,v=a(47),p=a(46),x=a(68),y=a(7),T=a(433),S="toString",E=RegExp.prototype,I=E[S],w=y(function(){return I.call({source:"a",flags:"b"})!=="/a/b"}),M=g&&I.name!==S;(w||M)&&v(E,S,function(){var L=p(this),N=x(L.source),F=x(T(L));return"/"+N+"/"+F},{unsafe:!0})}),(function(b,O,a){a(449)}),(function(b,O,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(b,O,a){var g=a(3),v=a(451),p=a(7),x=a(459),y=!x("difference",function(S){return S.size===0}),T=y||p(function(){var S={size:1,has:function(){return!0},keys:function(){var I=0;return{next:function(){var w=I++>1;return E.has(1)&&E.clear(),{done:w,value:2}}}}},E=new Set([1,2,3,4]);return E.difference(S).size!==3});g({target:"Set",proto:!0,real:!0,forced:T},{difference:v})}),(function(b,O,a){var g=a(452),v=a(453),p=a(454),x=a(457),y=a(458),T=a(455),S=a(456),E=v.has,I=v.remove;b.exports=function(M){var D=g(this),L=y(M),N=p(D);return x(N)<=L.size?T(N,function(F){L.includes(F)&&I(N,F)}):S(L.getIterator(),function(F){E(N,F)&&I(N,F)}),N}}),(function(b,O,a){var g=a(453).has;b.exports=function(v){return g(v),v}}),(function(b,O,a){var g=a(14),v=Set.prototype;b.exports={Set,add:g(v.add),has:g(v.has),remove:g(v.delete),proto:v}}),(function(b,O,a){var g=a(453),v=a(455),p=g.Set,x=g.add;b.exports=function(y){var T=new p;return v(y,function(S){x(T,S)}),T}}),(function(b,O,a){var g=a(14),v=a(456),p=a(453),x=p.Set,y=p.proto,T=g(y.forEach),S=g(y.keys),E=S(new x).next;b.exports=function(I,w,M){return M?v({iterator:S(I),next:E},w):T(I,w)}}),(function(b,O,a){var g=a(8);b.exports=function(v,p,x){for(var y=x?v:v.iterator,T=v.next,S,E;!(S=g(T,y)).done;)if(E=p(S.value),E!==void 0)return E}}),(function(b,O,a){var g=a(119),v=a(453);b.exports=g(v.proto,"size","get")||function(p){return p.size}}),(function(b,O,a){var g=a(30),v=a(46),p=a(8),x=a(61),y=a(267),T="Invalid size",S=RangeError,E=TypeError,I=Math.max,w=function(M,D){this.set=M,this.size=I(D,0),this.has=g(M.has),this.keys=g(M.keys)};w.prototype={getIterator:function(){return y(v(p(this.keys,this.set)))},includes:function(M){return p(this.has,this.set,M)}},b.exports=function(M){v(M);var D=+M.size;if(D!==D)throw new E(T);var L=x(D);if(L<0)throw new S(T);return new w(M,L)}}),(function(b,O,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")}}};b.exports=function(x,y){var T=g("Set");try{new T()[x](v(0));try{return new T()[x](v(-1)),!1}catch(E){if(!y)return!0;try{return new T()[x](p(-1/0)),!1}catch(I){var S=new T([1,2]);return y(S[x](p(1/0)))}}}catch(E){return!1}}}),(function(b,O,a){var g=a(3),v=a(7),p=a(461),x=a(459),y=!x("intersection",function(T){return T.size===2&&T.has(1)&&T.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(b,O,a){var g=a(452),v=a(453),p=a(457),x=a(458),y=a(455),T=a(456),S=v.Set,E=v.add,I=v.has;b.exports=function(M){var D=g(this),L=x(M),N=new S;return p(D)>L.size?T(L.getIterator(),function(F){I(D,F)&&E(N,F)}):y(D,function(F){L.includes(F)&&E(N,F)}),N}}),(function(b,O,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(b,O,a){var g=a(452),v=a(453).has,p=a(457),x=a(458),y=a(455),T=a(456),S=a(141);b.exports=function(I){var w=g(this),M=x(I);if(p(w)<=M.size)return y(w,function(L){if(M.includes(L))return!1},!0)!==!1;var D=M.getIterator();return T(D,function(L){if(v(w,L))return S(D.iterator,"normal",!1)})!==!1}}),(function(b,O,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(b,O,a){var g=a(452),v=a(457),p=a(455),x=a(458);b.exports=function(T){var S=g(this),E=x(T);return v(S)>E.size?!1:p(S,function(I){if(!E.includes(I))return!1},!0)!==!1}}),(function(b,O,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(b,O,a){var g=a(452),v=a(453).has,p=a(457),x=a(458),y=a(456),T=a(141);b.exports=function(E){var I=g(this),w=x(E);if(p(I)<w.size)return!1;var M=w.getIterator();return y(M,function(D){if(!v(I,D))return T(M.iterator,"normal",!1)})!==!1}}),(function(b,O,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(b,O,a){var g=a(452),v=a(453),p=a(454),x=a(458),y=a(456),T=v.add,S=v.has,E=v.remove;b.exports=function(w){var M=g(this),D=x(w).getIterator(),L=p(M);return y(D,function(N){S(M,N)?E(L,N):T(L,N)}),L}}),(function(b){b.exports=function(O){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[O](g);return v.size===1&&v.values().next().value===4}catch(p){return!1}}}),(function(b,O,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(b,O,a){var g=a(452),v=a(453).add,p=a(454),x=a(458),y=a(456);b.exports=function(S){var E=g(this),I=x(S).getIterator(),w=p(E);return y(I,function(M){v(w,M)}),w}}),(function(b,O,a){var g=a(3),v=a(14),p=a(16),x=a(61),y=a(68),T=a(7),S=v("".charAt),E=T(function(){return"\u{20BB7}".at(-2)!=="\uD842"});g({target:"String",proto:!0,forced:E},{at:function(w){var M=y(p(this)),D=M.length,L=x(w),N=L>=0?L:D+L;return N<0||N>=D?void 0:S(M,N)}})}),(function(b,O,a){var g=a(3),v=a(475).codeAt;g({target:"String",proto:!0},{codePointAt:function(x){return v(this,x)}})}),(function(b,O,a){var g=a(14),v=a(61),p=a(68),x=a(16),y=g("".charAt),T=g("".charCodeAt),S=g("".slice),E=function(I){return function(w,M){var D=p(x(w)),L=v(M),N=D.length,F,k;return L<0||L>=N?I?"":void 0:(F=T(D,L),F<55296||F>56319||L+1===N||(k=T(D,L+1))<56320||k>57343?I?y(D,L):F:I?S(D,L,L+2):(F-55296<<10)+(k-56320)+65536)}};b.exports={codeAt:E(!1),charAt:E(!0)}}),(function(b,O,a){var g=a(3),v=a(85),p=a(5).f,x=a(64),y=a(68),T=a(477),S=a(16),E=a(478),I=a(36),w=v("".slice),M=Math.min,D=E("endsWith"),L=!I&&!D&&!!(function(){var N=p(String.prototype,"endsWith");return N&&!N.writable})();g({target:"String",proto:!0,forced:!L&&!D},{endsWith:function(F){var k=y(S(this));T(F);var G=y(F),U=arguments.length>1?arguments[1]:void 0,X=k.length,V=U===void 0?X:M(x(U),X);return w(k,V-G.length,V)===G}})}),(function(b,O,a){var g=a(432),v=TypeError;b.exports=function(p){if(g(p))throw new v("The method doesn't accept regular expressions");return p}}),(function(b,O,a){var g=a(33),v=g("match");b.exports=function(p){var x=/./;try{"/./"[p](x)}catch(y){try{return x[v]=!1,"/./"[p](x)}catch(T){}}return!1}}),(function(b,O,a){var g=a(3),v=a(14),p=a(60),x=RangeError,y=String.fromCharCode,T=String.fromCodePoint,S=v([].join),E=!!T&&T.length!==1;g({target:"String",stat:!0,arity:1,forced:E},{fromCodePoint:function(w){for(var M=[],D=arguments.length,L=0,N;D>L;){if(N=+arguments[L],p(N,1114111)!==N)throw new x(N+" is not a valid code point");M[L++]=N<65536?y(N):y(((N-=65536)>>10)+55296,N%1024+56320)}return S(M,"")}})}),(function(b,O,a){var g=a(3),v=a(14),p=a(477),x=a(16),y=a(68),T=a(478),S=v("".indexOf);g({target:"String",proto:!0,forced:!T("includes")},{includes:function(I){return!!~S(y(x(this)),y(p(I)),arguments.length>1?arguments[1]:void 0)}})}),(function(b,O,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,I=0;I<E;I++){var w=y(S,I);if((w&63488)===55296&&(w>=56320||++I>=E||(y(S,I)&64512)!==56320))return!1}return!0}})}),(function(b,O,a){var g=a(475).charAt,v=a(68),p=a(51),x=a(176),y=a(179),T="String Iterator",S=p.set,E=p.getterFor(T);x(String,"String",function(I){S(this,{type:T,string:v(I),index:0})},function(){var w=E(this),M=w.string,D=w.index,L;return D>=M.length?y(void 0,!0):(L=g(M,D),w.index+=L.length,y(L,!1))})}),(function(b,O,a){var g=a(8),v=a(14),p=a(484),x=a(46),y=a(20),T=a(64),S=a(68),E=a(16),I=a(29),w=a(485),M=a(433),D=a(486),L=v("".indexOf);p("match",function(N,F,k){return[function(U){var X=E(this),V=y(U)?I(U,N):void 0;return V?g(V,U,X):new RegExp(U)[N](S(X))},function(G){var U=x(this),X=S(G),V=k(F,U,X);if(V.done)return V.value;var j=S(M(U));if(!~L(j,"g"))return D(U,X);var Y=!!~L(j,"u")||!!~L(j,"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=w(X,T(U.lastIndex),Y)),Q++}return Q===0?null:Z}]})}),(function(b,O,a){a(442);var g=a(8),v=a(47),p=a(443),x=a(7),y=a(33),T=a(43),S=y("species"),E=RegExp.prototype;b.exports=function(I,w,M,D){var L=y(I),N=!x(function(){var U={};return U[L]=function(){return 7},""[I](U)!==7}),F=N&&!x(function(){var U=!1,X=/a/;if(I==="split"){var V={};V[S]=function(){return X},X={constructor:V,flags:""},X[L]=/./[L]}return X.exec=function(){return U=!0,null},X[L](""),!U});if(!N||!F||M){var k=/./[L],G=w(L,""[I],function(U,X,V,j,Y){var Z=X.exec;return Z===p||Z===E.exec?N&&!Y?{done:!0,value:g(k,X,V,j)}:{done:!0,value:g(U,V,X,j)}:{done:!1}});v(String.prototype,I,G[0]),v(E,L,G[1])}D&&T(E[L],"sham",!0)}}),(function(b,O,a){var g=a(475).charAt;b.exports=function(v,p,x){return p+(x&&g(v,p).length||1)}}),(function(b,O,a){var g=a(8),v=a(46),p=a(21),x=a(15),y=a(443),T=TypeError;b.exports=function(S,E){var I=S.exec;if(p(I)){var w=g(I,S,E);return w!==null&&v(w),w}if(x(S)==="RegExp")return g(y,S,E);throw new T("RegExp#exec called on incompatible receiver")}}),(function(b,O,a){var g=a(3),v=a(8),p=a(85),x=a(177),y=a(179),T=a(16),S=a(64),E=a(68),I=a(46),w=a(20),M=a(15),D=a(432),L=a(433),N=a(29),F=a(47),k=a(7),G=a(33),U=a(380),X=a(485),V=a(486),j=a(51),Y=a(36),Z=G("matchAll"),Q="RegExp String",K=Q+" Iterator",tt=j.set,nt=j.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=V(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=I(this),Ft=E(Ct),Lt=U(Tt,RegExp),Pt=E(L(Tt)),pt,mt,wt;return pt=new Lt(Lt===RegExp?Tt.source:Tt,Pt),mt=!!~st(Pt,"g"),wt=!!~st(Pt,"u")||!!~st(Pt,"v"),pt.lastIndex=S(Tt.lastIndex),new gt(pt,Ft,mt,wt)};g({target:"String",proto:!0,forced:ht},{matchAll:function(Tt){var Ft=T(this),Lt,Pt,pt,mt;if(w(Tt)){if(D(Tt)&&(Lt=E(T(L(Tt))),!~st(Lt,"g")))throw new it("`.matchAll` does not allow non-global regexes");if(ht)return ct(Ft,Tt);if(pt=N(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(b,O,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(b,O,a){var g=a(28);b.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(g)}),(function(b,O,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(b,O,a){var g=a(3),v=a(14),p=a(12),x=a(39),y=a(68),T=a(63),S=v([].push),E=v([].join);g({target:"String",stat:!0},{raw:function(w){var M=p(x(w).raw),D=T(M);if(!D)return"";for(var L=arguments.length,N=[],F=0;;){if(S(N,y(M[F++])),F===D)return E(N,"");F<L&&S(N,y(arguments[F]))}}})}),(function(b,O,a){var g=a(3),v=a(248);g({target:"String",proto:!0},{repeat:v})}),(function(b,O,a){var g=a(95),v=a(8),p=a(14),x=a(484),y=a(7),T=a(46),S=a(21),E=a(20),I=a(61),w=a(64),M=a(68),D=a(16),L=a(485),N=a(29),F=a(494),k=a(433),G=a(486),U=a(33),X=U("replace"),V=Math.max,j=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)?N(Ct,X):void 0;return Lt?v(Lt,Ct,Ft,Tt):v(ct,M(Ft),Ct,Tt)},function(yt,Ct){var Tt=T(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"),wt;mt&&(wt=!!~Q(Pt,"u")||!!~Q(Pt,"v"),Tt.lastIndex=0);for(var Bt=[],Qt;Qt=G(Tt,Ft),!(Qt===null||(Z(Bt,Qt),!mt));){var Ot=M(Qt[0]);Ot===""&&(Tt.lastIndex=L(Ft,w(Tt.lastIndex),wt))}for(var Wt="",ae=0,pe=0;pe<Bt.length;pe++){Qt=Bt[pe];for(var oe=M(Qt[0]),de=V(j(I(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(b,O,a){var g=a(14),v=a(39),p=Math.floor,x=g("".charAt),y=g("".replace),T=g("".slice),S=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,E=/\$([$&'`]|\d{1,2})/g;b.exports=function(I,w,M,D,L,N){var F=M+I.length,k=D.length,G=E;return L!==void 0&&(L=v(L),G=S),y(N,G,function(U,X){var V;switch(x(X,0)){case"$":return"$";case"&":return I;case"`":return T(w,0,M);case"'":return T(w,F);case"<":V=L[T(X,1,-1)];break;default:var j=+X;if(j===0)return U;if(j>k){var Y=p(j/10);return Y===0?U:Y<=k?D[Y-1]===void 0?x(X,1):D[Y-1]+x(X,1):U}V=D[j-1]}return V===void 0?"":V})}}),(function(b,O,a){var g=a(3),v=a(8),p=a(14),x=a(16),y=a(21),T=a(20),S=a(432),E=a(68),I=a(29),w=a(433),M=a(494),D=a(33),L=a(36),N=D("replace"),F=TypeError,k=p("".indexOf),G=p("".replace),U=p("".slice),X=Math.max;g({target:"String",proto:!0},{replaceAll:function(j,Y){var Z=x(this),Q,K,tt,nt,rt,it,st,ct,ht,gt,yt=0,Ct="";if(T(j)){if(Q=S(j),Q&&(K=E(x(w(j))),!~k(K,"g")))throw new F("`.replaceAll` does not allow non-global regexes");if(tt=I(j,N),tt)return v(tt,j,Z,Y);if(L&&Q)return G(E(Z),j,Y)}for(nt=E(Z),rt=E(j),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(b,O,a){var g=a(8),v=a(484),p=a(46),x=a(20),y=a(16),T=a(362),S=a(68),E=a(29),I=a(486);v("search",function(w,M,D){return[function(N){var F=y(this),k=x(N)?E(N,w):void 0;return k?g(k,N,F):new RegExp(N)[w](S(F))},function(L){var N=p(this),F=S(L),k=D(M,N,F);if(k.done)return k.value;var G=N.lastIndex;T(G,0)||(N.lastIndex=0);var U=I(N,F);return T(N.lastIndex,G)||(N.lastIndex=G),U===null?-1:U.index}]})}),(function(b,O,a){var g=a(8),v=a(14),p=a(484),x=a(46),y=a(20),T=a(16),S=a(380),E=a(485),I=a(64),w=a(68),M=a(29),D=a(433),L=a(486),N=a(436),F=a(7),k=N.UNSUPPORTED_Y,G=4294967295,U=Math.min,X=v([].push),V=v("".slice),j=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=T(this),ht=y(it)?M(it,Q):void 0;return ht?g(ht,it,ct,st):g(nt,w(ct),it,st)},function(rt,it){var st=x(this),ct=w(rt);if(!Z){var ht=tt(nt,st,ct,it,nt!==K);if(ht.done)return ht.value}var gt=S(st,RegExp),yt=w(D(st)),Ct=!!~j(yt,"u")||!!~j(yt,"v");k?~j(yt,"g")||(yt+="g"):~j(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?V(ct,Pt):ct),wt;if(mt===null||(wt=U(I(Tt.lastIndex+(k?Pt:0)),ct.length))===Lt)Pt=E(ct,Pt,Ct);else{if(X(pt,V(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=wt}}return X(pt,V(ct,Lt)),pt}]},Z||!Y,k)}),(function(b,O,a){var g=a(3),v=a(85),p=a(5).f,x=a(64),y=a(68),T=a(477),S=a(16),E=a(478),I=a(36),w=v("".slice),M=Math.min,D=E("startsWith"),L=!I&&!D&&!!(function(){var N=p(String.prototype,"startsWith");return N&&!N.writable})();g({target:"String",proto:!0,forced:!L&&!D},{startsWith:function(F){var k=y(S(this));T(F);var G=y(F),U=x(M(arguments.length>1?arguments[1]:void 0,k.length));return w(k,U,U+G.length)===G}})}),(function(b,O,a){var g=a(3),v=a(14),p=a(16),x=a(61),y=a(68),T=v("".slice),S=Math.max,E=Math.min,I=!"".substr||"ab".substr(-1)!=="b";g({target:"String",proto:!0,forced:I},{substr:function(M,D){var L=y(p(this)),N=L.length,F=x(M),k=F<0?S(N+F,0):E(F,N),G=D===void 0?N:x(D);if(G<=0)return"";var U=E(k+G,N);return k>=U?"":T(L,k,U)}})}),(function(b,O,a){var g=a(3),v=a(8),p=a(14),x=a(16),y=a(68),T=a(7),S=Array,E=p("".charAt),I=p("".charCodeAt),w=p([].join),M="".toWellFormed,D="\uFFFD",L=M&&T(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=I(F,U);(X&63488)!==55296?G[U]=E(F,U):X>=56320||U+1>=k||(I(F,U+1)&64512)!==56320?G[U]=D:(G[U]=E(F,U),G[++U]=E(F,U))}return w(G,"")}})}),(function(b,O,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(b,O,a){var g=a(49).PROPER,v=a(7),p=a(326),x="\u200B\x85\u180E";b.exports=function(y){return v(function(){return!!p[y]()||x[y]()!==x||g&&p[y].name!==y})}}),(function(b,O,a){a(504);var g=a(3),v=a(505);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==v},{trimEnd:v})}),(function(b,O,a){var g=a(3),v=a(505);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==v},{trimRight:v})}),(function(b,O,a){var g=a(325).end,v=a(502);b.exports=v("trimEnd")?function(){return g(this)}:"".trimEnd}),(function(b,O,a){a(507);var g=a(3),v=a(508);g({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==v},{trimStart:v})}),(function(b,O,a){var g=a(3),v=a(508);g({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==v},{trimLeft:v})}),(function(b,O,a){var g=a(325).start,v=a(502);b.exports=v("trimStart")?function(){return g(this)}:"".trimStart}),(function(b,O,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(b,O,a){var g=a(14),v=a(16),p=a(68),x=/"/g,y=g("".replace);b.exports=function(T,S,E,I){var w=p(v(T)),M="<"+S;return E!==""&&(M+=" "+E+'="'+y(p(I),x,""")+'"'),M+">"+w+"</"+S+">"}}),(function(b,O,a){var g=a(7);b.exports=function(v){return g(function(){var p=""[v]('"');return p!==p.toLowerCase()||p.split('"').length>3})}}),(function(b,O,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(b,O,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(b,O,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(b,O,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(b,O,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(b,O,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(b,O,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(b,O,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(b,O,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(b,O,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(b,O,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(b,O,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(b,O,a){var g=a(525);g("Float32",function(v){return function(x,y,T){return v(this,x,y,T)}})}),(function(b,O,a){var g=a(3),v=a(4),p=a(8),x=a(6),y=a(526),T=a(223),S=a(212),E=a(215),I=a(11),w=a(43),M=a(331),D=a(216),L=a(527),N=a(528),F=a(18),k=a(38),G=a(69),U=a(20),X=a(22),V=a(71),j=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,wt=T.NATIVE_ARRAY_BUFFER_VIEWS,Bt=T.TYPED_ARRAY_TAG,Qt=T.TypedArray,Ot=T.TypedArrayPrototype,Wt=T.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 j(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)?I(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?(wt||(it.f=Pe,rt.f=Ee,oe(Ot,"buffer"),oe(Ot,"byteOffset"),oe(Ot,"byteLength"),oe(Ot,"length")),g({target:"Object",stat:!0,forced:!wt},{getOwnPropertyDescriptor:Pe,defineProperty:Ee}),b.exports=function(he,ye,Ge){var Vt=he.match(/\d+/)[0]/8,ne=he+(Ge?"Clamped":"")+"Array",re="get"+he,nn="set"+he,Ht=v[ne],ee=Ht,ve=ee&&ee.prototype,se={},we=function(Mt,$t){var qt=gt(Mt);return qt.view[re]($t*Vt+qt.byteOffset,!0)},an=function(Mt,$t,qt){var Nt=gt(Mt);Nt.view[nn]($t*Vt+Nt.byteOffset,Ge?N(qt):qt,!0)},It=function(Mt,$t){Tt(Mt,$t,{get:function(){return we(this,$t)},set:function(qt){return an(this,$t,qt)},enumerable:!0})};wt?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||w(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=V(Ot)),ve.constructor!==ee&&w(ve,"constructor",ee),Ct(ve).TypedArrayConstructor=ee,Bt&&w(ve,Bt,ne);var Xt=ee!==Ht;se[ne]=ee,g({global:!0,constructor:!0,forced:Xt,sham:!wt},se),ae in ee||w(ee,ae,Vt),ae in ve||w(ve,ae,Vt),tt(ne)}):b.exports=function(){}}),(function(b,O,a){var g=a(4),v=a(7),p=a(171),x=a(223).NATIVE_ARRAY_BUFFER_VIEWS,y=g.ArrayBuffer,T=g.Int8Array;b.exports=!x||!v(function(){T(1)})||!v(function(){new T(-1)})||!p(function(S){new T,new T(null),new T(1.5),new T(S)},!0)||v(function(){return new T(new y(2),1,void 0).length!==1})}),(function(b,O,a){var g=a(269),v=RangeError;b.exports=function(p,x){var y=g(p);if(y%x)throw new v("Wrong offset");return y}}),(function(b){var O=Math.floor;b.exports=function(a){var g=+a;if(g!==g||g<=0)return 0;if(g>=255)return 255;var v=O(g);return v+.5<g?v+1:g<v+.5||v%2===0?v:v+1}}),(function(b,O,a){var g=a(84),v=a(8),p=a(30),x=a(381),y=a(39),T=a(63),S=a(139),E=a(140),I=a(137),w=a(530),M=a(223).aTypedArrayConstructor,D=a(531);b.exports=function(N){var F=x(this),k=arguments.length,G=k>1?arguments[1]:void 0,U=G!==void 0;U&&p(G);var X=y(N),V=E(X),j,Y,Z,Q,K,tt,nt,rt;if(V&&!I(V))for(nt=S(X,V),rt=nt.next,X=[];!(tt=v(rt,nt)).done;)X.push(tt.value);for(U&&k>2&&(G=g(G,arguments[2])),Y=T(X),Z=new(M(F))(Y),Q=w(Z),j=0;Y>j;j++)K=U?G(X[j],j):X[j],Z[j]=Q?D(K):+K;return Z}}),(function(b,O,a){var g=a(69);b.exports=function(v){var p=g(v);return p==="BigInt64Array"||p==="BigUint64Array"}}),(function(b,O,a){var g=a(19),v=TypeError;b.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(b,O,a){var g=a(525);g("Float64",function(v){return function(x,y,T){return v(this,x,y,T)}})}),(function(b,O,a){var g=a(525);g("Int8",function(v){return function(x,y,T){return v(this,x,y,T)}})}),(function(b,O,a){var g=a(525);g("Int16",function(v){return function(x,y,T){return v(this,x,y,T)}})}),(function(b,O,a){var g=a(525);g("Int32",function(v){return function(x,y,T){return v(this,x,y,T)}})}),(function(b,O,a){var g=a(525);g("Uint8",function(v){return function(x,y,T){return v(this,x,y,T)}})}),(function(b,O,a){var g=a(525);g("Uint8",function(v){return function(x,y,T){return v(this,x,y,T)}},!0)}),(function(b,O,a){var g=a(525);g("Uint16",function(v){return function(x,y,T){return v(this,x,y,T)}})}),(function(b,O,a){var g=a(525);g("Uint32",function(v){return function(x,y,T){return v(this,x,y,T)}})}),(function(b,O,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),I=v(E),w=p(S),M=w>=0?w:I+w;return M<0||M>=I?void 0:E[M]})}),(function(b,O,a){var g=a(14),v=a(223),p=a(151),x=g(p),y=v.aTypedArray,T=v.exportTypedArrayMethod;T("copyWithin",function(E,I){return x(y(this),E,I,arguments.length>2?arguments[2]:void 0)})}),(function(b,O,a){var g=a(223),v=a(83).every,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("every",function(T){return v(p(this),T,arguments.length>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(223),v=a(156),p=a(531),x=a(69),y=a(8),T=a(14),S=a(7),E=g.aTypedArray,I=g.exportTypedArrayMethod,w=T("".slice),M=S(function(){var D=0;return new Int8Array(2).fill({valueOf:function(){return D++}}),D!==1});I("fill",function(L){var N=arguments.length;E(this);var F=w(x(this),0,3)==="Big"?p(L):+L;return y(v,this,F,N>1?arguments[1]:void 0,N>2?arguments[2]:void 0)},M)}),(function(b,O,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(b,O,a){var g=a(204),v=a(223).getTypedArrayConstructor;b.exports=function(p,x){return g(v(p),x)}}),(function(b,O,a){var g=a(223),v=a(83).find,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("find",function(T){return v(p(this),T,arguments.length>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(223),v=a(83).findIndex,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findIndex",function(T){return v(p(this),T,arguments.length>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(223),v=a(161).findLast,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findLast",function(T){return v(p(this),T,arguments.length>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(223),v=a(161).findLastIndex,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("findLastIndex",function(T){return v(p(this),T,arguments.length>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(223),v=a(83).forEach,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("forEach",function(T){v(p(this),T,arguments.length>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(526),v=a(223).exportTypedArrayStaticMethod,p=a(529);v("from",p,g)}),(function(b,O,a){var g=a(223),v=a(59).includes,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("includes",function(T){return v(p(this),T,arguments.length>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(223),v=a(59).indexOf,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("indexOf",function(T){return v(p(this),T,arguments.length>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(4),v=a(7),p=a(14),x=a(223),y=a(175),T=a(33),S=T("iterator"),E=g.Uint8Array,I=p(y.values),w=p(y.keys),M=p(y.entries),D=x.aTypedArray,L=x.exportTypedArrayMethod,N=E&&E.prototype,F=!v(function(){N[S].call([1])}),k=!!N&&N.values&&N[S]===N.values&&N.values.name==="values",G=function(){return I(D(this))};L("entries",function(){return M(D(this))},F),L("keys",function(){return w(D(this))},F),L("values",G,F||!k,{name:"values"}),L(S,G,F||!k,{name:"values"})}),(function(b,O,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(b,O,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(b,O,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(b,O,a){var g=a(223),v=a(526),p=g.aTypedArrayConstructor,x=g.exportTypedArrayStaticMethod;x("of",function(){for(var T=0,S=arguments.length,E=new(p(this))(S);S>T;)E[T]=arguments[T++];return E},v)}),(function(b,O,a){var g=a(223),v=a(187).left,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("reduce",function(T){var S=arguments.length;return v(p(this),T,S,S>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(223),v=a(187).right,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("reduceRight",function(T){var S=arguments.length;return v(p(this),T,S,S>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(223),v=g.aTypedArray,p=g.exportTypedArrayMethod,x=Math.floor;p("reverse",function(){for(var T=this,S=v(T).length,E=x(S/2),I=0,w;I<E;)w=T[I],T[I++]=T[--S],T[S]=w;return T})}),(function(b,O,a){var g=a(4),v=a(8),p=a(223),x=a(63),y=a(527),T=a(39),S=a(7),E=g.RangeError,I=g.Int8Array,w=I&&I.prototype,M=w&&w.set,D=p.aTypedArray,L=p.exportTypedArrayMethod,N=!S(function(){var k=new Uint8ClampedArray(2);return v(M,k,{length:1,0:3},1),k[1]!==3}),F=N&&p.NATIVE_ARRAY_BUFFER_VIEWS&&S(function(){var k=new I(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=T(G);if(N)return v(M,this,X,U);var V=this.length,j=x(X),Y=0;if(j+U>V)throw new E("Wrong length");for(;Y<j;)this[U+Y]=X[Y++]},!N||F)}),(function(b,O,a){var g=a(223),v=a(7),p=a(76),x=g.aTypedArray,y=g.getTypedArrayConstructor,T=g.exportTypedArrayMethod,S=v(function(){new Int8Array(1).slice()});T("slice",function(I,w){for(var M=p(x(this),I,w),D=y(this),L=0,N=M.length,F=new D(N);N>L;)F[L]=M[L++];return F},S)}),(function(b,O,a){var g=a(223),v=a(83).some,p=g.aTypedArray,x=g.exportTypedArrayMethod;x("some",function(T){return v(p(this),T,arguments.length>1?arguments[1]:void 0)})}),(function(b,O,a){var g=a(4),v=a(85),p=a(7),x=a(30),y=a(195),T=a(223),S=a(196),E=a(197),I=a(27),w=a(198),M=T.aTypedArray,D=T.exportTypedArrayMethod,L=g.Uint16Array,N=L&&v(L.prototype.sort),F=!!N&&!(p(function(){N(new L(2),null)})&&p(function(){N(new L(2),{})})),k=!!N&&!p(function(){if(I)return I<74;if(S)return S<67;if(E)return!0;if(w)return w<602;var U=new L(516),X=Array(516),V,j;for(V=0;V<516;V++)j=V%4,U[V]=515-V,X[V]=V-2*j+3;for(N(U,function(Y,Z){return(Y/4|0)-(Z/4|0)}),V=0;V<516;V++)if(U[V]!==X[V])return!0}),G=function(U){return function(X,V){return U!==void 0?+U(X,V)||0:V!==V?X!==X?0:-1:X!==X?1:X===0&&V===0?1/X>0?1/V>0?0:1:1/V>0?-1:0:X>V?1:X<V?-1:0}};D("sort",function(X){return X!==void 0&&x(X),k?N(this,X):y(M(this),G(X))},!k||F)}),(function(b,O,a){var g=a(223),v=a(64),p=a(60),x=g.aTypedArray,y=g.getTypedArrayConstructor,T=g.exportTypedArrayMethod;T("subarray",function(E,I){var w=x(this),M=w.length,D=p(E,M),L=y(w);return new L(w.buffer,w.byteOffset+D*w.BYTES_PER_ELEMENT,v((I===void 0?M:p(I,M))-D))})}),(function(b,O,a){var g=a(4),v=a(95),p=a(223),x=a(7),y=a(76),T=g.Int8Array,S=p.aTypedArray,E=p.exportTypedArrayMethod,I=[].toLocaleString,w=!!T&&x(function(){I.call(new T(1))}),M=x(function(){return[1,2].toLocaleString()!==new T([1,2]).toLocaleString()})||!x(function(){T.prototype.toLocaleString.call([1,2])});E("toLocaleString",function(){return v(I,w?y(S(this)):S(this),y(arguments))},M)}),(function(b,O,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),I=new(y(S))(E),w=0;w<E;w++)I[w]=S[E-w-1];return I})}),(function(b,O,a){var g=a(223),v=a(14),p=a(30),x=a(204),y=g.aTypedArray,T=g.getTypedArrayConstructor,S=g.exportTypedArrayMethod,E=v(g.TypedArrayPrototype.sort);S("toSorted",function(w){w!==void 0&&p(w);var M=y(this),D=x(T(M),M);return E(D,w)})}),(function(b,O,a){var g=a(223).exportTypedArrayMethod,v=a(7),p=a(4),x=a(14),y=p.Uint8Array,T=y&&y.prototype||{},S=[].toString,E=x([].join);v(function(){S.call({})})&&(S=function(){return E(this)});var I=T.toString!==S;g("toString",S,I)}),(function(b,O,a){var g=a(223),v=a(530),p=a(63),x=a(61),y=a(531),T=g.aTypedArray,S=g.getTypedArrayConstructor,E=g.exportTypedArrayMethod,I=RangeError,w=(function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(D){return D===8}})(),M=w&&(function(){try{new Int8Array(1).with(-.5,1)}catch(D){return!0}})();E("with",function(D,L){var N=T(this),F=p(N),k=x(D),G=k<0?F+k:k,U=v(N)?y(L):+L;if(G>=F||G<0)throw new I("Incorrect index");for(var X=new(S(N))(F),V=0;V<F;V++)X[V]=V===G?U:N[V];return X},!w||M)}),(function(b,O,a){var g=a(3),v=a(4),p=a(204),x=a(573),y=v.Uint8Array,T=!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:T},{fromBase64:function(E){var I=x(E,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return p(y,I.bytes)}})}),(function(b,O,a){var g=a(4),v=a(14),p=a(574),x=a(440),y=a(38),T=a(575),S=a(576),E=a(236),I=T.c2i,w=T.c2iUrl,M=g.SyntaxError,D=g.TypeError,L=v("".charAt),N=function(G,U){for(var X=G.length;U<X;U++){var V=L(G,U);if(V!==" "&&V!==" "&&V!==`
|
|
30
|
-
`&&V!=="\f"&&V!=="\r")break}return U},F=function(G,U,X){var V=G.length;V<4&&(G+=V===2?"AA":"A");var j=(U[L(G,0)]<<18)+(U[L(G,1)]<<12)+(U[L(G,2)]<<6)+U[L(G,3)],Y=[j>>16&255,j>>8&255,j&255];if(V===2){if(X&&Y[1]!==0)throw new M("Extra bits");return[Y[0]]}if(V===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 V=U.length,j=0;j<V;j++)G[X+j]=U[j];return X+V};b.exports=function(G,U,X,V){x(G),p(U);var j=S(U)==="base64"?I:w,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(V)for(;;){if(rt=N(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,j,!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=N(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=N(G,rt))}if(rt<Z)throw new M("Unexpected character after padding");K=k(Q,F(nt,j,Y==="strict"),K),tt=Z;break}if(!y(j,it))throw new M("Unexpected character");var st=V-K;if(st===1&&nt.length===2||st===2&&nt.length===3||(nt+=it,nt.length===4&&(K=k(Q,F(nt,j,!1),K),nt="",tt=rt,K===V)))break}return{bytes:Q,read:tt,written:K}}}),(function(b,O,a){var g=a(20),v=String,p=TypeError;b.exports=function(x){if(x===void 0||g(x))return x;throw new p(v(x)+" is not an object or undefined")}}),(function(b){var O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=O+"+/",g=O+"-_",v=function(p){for(var x={},y=0;y<64;y++)x[p.charAt(y)]=y;return x};b.exports={i2c:a,c2i:v(a),i2cUrl:g,c2iUrl:v(g)}}),(function(b){var O=TypeError;b.exports=function(a){var g=a&&a.alphabet;if(g===void 0||g==="base64"||g==="base64url")return g||"base64";throw new O("Incorrect `alphabet` option")}}),(function(b,O,a){var g=a(3),v=a(4),p=a(440),x=a(578);v.Uint8Array&&g({target:"Uint8Array",stat:!0},{fromHex:function(T){return x(p(T)).bytes}})}),(function(b,O,a){var g=a(4),v=a(14),p=g.Uint8Array,x=g.SyntaxError,y=Math.min,T=v("".match);b.exports=function(S,E){var I=S.length;if(I%2!==0)throw new x("String should be an even number of characters");for(var w=E?y(E.length,I/2):I/2,M=E||new p(w),D=T(S,/.{2}/g),L=0;L<w;L++){var N=+("0x"+D[L]+"0");if(N!==N)throw new x("String should only contain hex characters");M[L]=N>>4}return{bytes:M,read:L<<1}}}),(function(b,O,a){var g=a(3),v=a(4),p=a(573),x=a(580),y=v.Uint8Array,T=!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:T},{setFromBase64:function(E){x(this);var I=p(E,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:I.read,written:I.written}}})}),(function(b,O,a){var g=a(69),v=TypeError;b.exports=function(p){if(g(p)==="Uint8Array")return p;throw new v("Argument is not an Uint8Array")}}),(function(b,O,a){var g=a(3),v=a(4),p=a(440),x=a(580),y=a(236),T=a(578);function S(){try{var E=new ArrayBuffer(16,{maxByteLength:1024});new Uint8Array(E).setFromHex("cafed00d")}catch(I){return!0}}v.Uint8Array&&g({target:"Uint8Array",proto:!0,forced:S()},{setFromHex:function(I){x(this),p(I),y(this.buffer);var w=T(I,this).read;return{read:w,written:w/2}}})}),(function(b,O,a){var g=a(3),v=a(4),p=a(14),x=a(574),y=a(580),T=a(236),S=a(575),E=a(576),I=S.i2c,w=S.i2cUrl,M=p("".charAt),D=v.Uint8Array,L=!D||!D.prototype.toBase64||!(function(){try{var N=new D;N.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"?I:w,U=!!k&&!!k.omitPadding;T(this.buffer);for(var X="",V=0,j=F.length,Y,Z=function(Q){return M(G,Y>>6*Q&63)};V+2<j;V+=3)Y=(F[V]<<16)+(F[V+1]<<8)+F[V+2],X+=Z(3)+Z(2)+Z(1)+Z(0);return V+2===j?(Y=(F[V]<<16)+(F[V+1]<<8),X+=Z(3)+Z(2)+Z(1)+(U?"":"=")):V+1===j&&(Y=F[V]<<16,X+=Z(3)+Z(2)+(U?"":"==")),X}})}),(function(b,O,a){var g=a(3),v=a(4),p=a(14),x=a(580),y=a(236),T=p(1.1.toString),S=p([].join),E=Array,I=v.Uint8Array,w=!I||!I.prototype.toHex||!(function(){try{var M=new I([255,255,255,255,255,255,255,255]);return M.toHex()==="ffffffffffffffff"}catch(D){return!1}})();I&&g({target:"Uint8Array",proto:!0,forced:w},{toHex:function(){x(this),y(this.buffer);for(var D=E(this.length),L=0,N=this.length;L<N;L++){var F=T(this[L],16);D[L]=F.length===1?"0"+F:F}return S(D,"")}})}),(function(b,O,a){var g=a(3),v=a(14),p=a(68),x=String.fromCharCode,y=v("".charAt),T=v(/./.exec),S=v("".slice),E=/^[\da-f]{2}$/i,I=/^[\da-f]{4}$/i;g({global:!0},{unescape:function(M){for(var D=p(M),L="",N=D.length,F=0,k,G;F<N;){if(k=y(D,F++),k==="%"){if(y(D,F)==="u"){if(G=S(D,F+1,F+5),T(I,G)){L+=x(parseInt(G,16)),F+=5;continue}}else if(G=S(D,F,F+2),T(E,G)){L+=x(parseInt(G,16)),F+=2;continue}}L+=k}return L}})}),(function(b,O,a){a(586)}),(function(b,O,a){var g=a(287),v=a(4),p=a(14),x=a(214),y=a(292),T=a(291),S=a(587),E=a(20),I=a(51).enforce,w=a(7),M=a(52),D=Object,L=Array.isArray,N=D.isExtensible,F=D.isFrozen,k=D.isSealed,G=D.freeze,U=D.seal,X=!v.ActiveXObject&&"ActiveXObject"in v,V,j=function(it){return function(){return it(this,arguments.length?arguments[0]:void 0)}},Y=T("WeakMap",j,S),Z=Y.prototype,Q=p(Z.set),K=function(){return g&&w(function(){var it=G([]);return Q(new Y,it,1),!F(it)})};if(M)if(X){V=S.getConstructor(j,"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)&&!N(it)){var st=I(this);return st.frozen||(st.frozen=new V),tt(this,it)||st.frozen.delete(it)}return tt(this,it)},has:function(st){if(E(st)&&!N(st)){var ct=I(this);return ct.frozen||(ct.frozen=new V),nt(this,st)||ct.frozen.has(st)}return nt(this,st)},get:function(st){if(E(st)&&!N(st)){var ct=I(this);return ct.frozen||(ct.frozen=new V),nt(this,st)?rt(this,st):ct.frozen.get(st)}return rt(this,st)},set:function(st,ct){if(E(st)&&!N(st)){var ht=I(this);ht.frozen||(ht.frozen=new V),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(b,O,a){var g=a(14),v=a(214),p=a(292).getWeakData,x=a(215),y=a(46),T=a(17),S=a(20),E=a(136),I=a(83),w=a(38),M=a(51),D=M.set,L=M.getterFor,N=I.find,F=I.findIndex,k=g([].splice),G=0,U=function(j){return j.frozen||(j.frozen=new X)},X=function(){this.entries=[]},V=function(j,Y){return N(j.entries,function(Z){return Z[0]===Y})};X.prototype={get:function(j){var Y=V(this,j);if(Y)return Y[1]},has:function(j){return!!V(this,j)},set:function(j,Y){var Z=V(this,j);Z?Z[1]=Y:this.entries.push([j,Y])},delete:function(j){var Y=F(this.entries,function(Z){return Z[0]===j});return~Y&&k(this.entries,Y,1),!!~Y}},b.exports={getConstructor:function(j,Y,Z,Q){var K=j(function(it,st){x(it,tt),D(it,{type:Y,id:G++,frozen:null}),T(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&&w(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&&w(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(b,O,a){var g=a(3),v=a(589),p=a(36),x=v.get,y=v.has,T=v.set;g({target:"WeakMap",proto:!0,real:!0,forced:p},{getOrInsert:function(E,I){return y(this,E)?x(this,E):(T(this,E,I),I)}})}),(function(b,O,a){var g=a(14),v=WeakMap.prototype;b.exports={WeakMap,set:g(v.set),get:g(v.get),has:g(v.has),remove:g(v.delete)}}),(function(b,O,a){var g=a(3),v=a(30),p=a(591),x=a(592),y=a(589),T=a(36),S=y.get,E=y.has,I=y.set,w=T||!(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:w},{getOrInsertComputed:function(D,L){if(T||p(this),x(D),v(L),E(this,D))return S(this,D);var N=L(D);return I(this,D,N),N}})}),(function(b,O,a){var g=a(589).has;b.exports=function(v){return g(v),v}}),(function(b,O,a){var g=a(589),v=new g.WeakMap,p=g.set,x=g.remove;b.exports=function(y){return p(v,y,1),x(v,y),y}}),(function(b,O,a){a(594)}),(function(b,O,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(b,O,a){var g=a(3),v=a(4),p=a(23),x=a(14),y=a(8),T=a(7),S=a(68),E=a(383),I=a(575).c2i,w=/[^\d+/a-z]/i,M=/[\t\n\f\r ]+/g,D=/[=]{1,2}$/,L=p("atob"),N=Array,F=String.fromCharCode,k=x("".charAt),G=x("".replace),U=x([].join),X=x(w.exec),V=!!L&&!T(function(){return L("aGk=")!=="hi"}),j=V&&T(function(){return L(" ")!==""}),Y=V&&!T(function(){L("a")}),Z=V&&!T(function(){L()}),Q=V&&L.length!==1,K=!V||j||Y||Z||Q;g({global:!0,bind:!0,enumerable:!0,forced:K},{atob:function(nt){if(E(arguments.length,1),V&&!j&&!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(w,rt))throw new(p("DOMException"))("The string is not correctly encoded","InvalidCharacterError");for(var Ct=new N((ct>>2)*3+(yt?yt-1:0)),Tt=0;it<ct;)ht=k(rt,it++),gt=st&3?(gt<<6)+I[ht]:I[ht],st++&3&&(Ct[Tt++]=F(255>>>(-2*st&6)));return U(Ct,"")}})}),(function(b,O,a){var g=a(3),v=a(4),p=a(23),x=a(14),y=a(8),T=a(7),S=a(68),E=a(383),I=a(575).i2c,w=p("btoa"),M=Array,D=x([].join),L=x("".charAt),N=x("".charCodeAt),F=!!w&&!T(function(){return w("hi")!=="aGk="}),k=F&&!T(function(){w()}),G=F&&T(function(){return w(null)!=="bnVsbA=="}),U=F&&w.length!==1;g({global:!0,bind:!0,enumerable:!0,forced:!F||k||G||U},{btoa:function(V){if(E(arguments.length,1),F)return y(w,v,S(V));for(var j=S(V),Y=new M((j.length+2)/3<<2),Z=0,Q=0,K=I,tt,nt;L(j,Q)||(K="=",Q%1);){if(nt=N(j,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(b,O,a){var g=a(4),v=a(598),p=a(599),x=a(167),y=a(43),T=function(E){if(E&&E.forEach!==x)try{y(E,"forEach",x)}catch(I){E.forEach=x}};for(var S in v)v[S]&&T(g[S]&&g[S].prototype);T(p)}),(function(b){b.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(b,O,a){var g=a(42),v=g("span").classList,p=v&&v.constructor&&v.constructor.prototype;b.exports=p===Object.prototype?void 0:p}),(function(b,O,a){var g=a(4),v=a(598),p=a(599),x=a(175),y=a(43),T=a(82),S=a(33),E=S("iterator"),I=x.values,w=function(D,L){if(D){if(D[E]!==I)try{y(D,E,I)}catch(F){D[E]=I}if(T(D,L,!0),v[L]){for(var N in x)if(D[N]!==x[N])try{y(D,N,x[N])}catch(F){D[N]=x[N]}}}};for(var M in v)w(g[M]&&g[M].prototype,M);w(p,"DOMTokenList")}),(function(b,O,a){var g=a(3),v=a(23),p=a(238),x=a(7),y=a(71),T=a(11),S=a(44).f,E=a(47),I=a(77),w=a(38),M=a(215),D=a(46),L=a(131),N=a(124),F=a(602),k=a(127),G=a(51),U=a(6),X=a(36),V="DOMException",j="DATA_CLONE_ERR",Y=v("Error"),Z=v(V)||(function(){try{var Ot=v("MessageChannel")||p("worker_threads").MessageChannel;new Ot().port1.postMessage(new WeakMap)}catch(Wt){if(Wt.name===j&&Wt.code===25)return Wt.constructor}})(),Q=Z&&Z.prototype,K=Y.prototype,tt=G.set,nt=G.getterFor(V),rt="stack"in new Y(V),it=function(Ot){return w(F,Ot)&&F[Ot].m?F[Ot].c:0},st=function(){M(this,ct);var Wt=arguments.length,ae=N(Wt<1?void 0:arguments[0]),pe=N(Wt<2?void 0:arguments[1],"Error"),oe=it(pe);if(tt(this,{type:V,name:pe,message:ae,code:oe}),U||(this.name=pe,this.message=ae,this.code=oe),rt){var de=new Y(ae);de.name=V,S(this,"stack",T(1,k(de.stack,1)))}},ct=st.prototype=y(K),ht=function(Ot){return{enumerable:!0,configurable:!0,get:Ot}},gt=function(Ot){return ht(function(){return nt(this)[Ot]})};U&&(I(ct,"code",gt("code")),I(ct,"message",gt("message")),I(ct,"name",gt("name"))),S(ct,"constructor",T(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[j]!==25||Q[j]!==25,Lt=X?Ct||Tt||Ft:yt;g({global:!0,constructor:!0,forced:Lt},{DOMException:Lt?st:Z});var Pt=v(V),pt=Pt.prototype;Ct&&(X||Z===Pt)&&E(pt,"toString",L),Tt&&U&&Z===Pt&&I(pt,"code",ht(function(){return it(D(this).name)}));for(var mt in F)if(w(F,mt)){var wt=F[mt],Bt=wt.s,Qt=T(6,wt.c);w(Pt,Bt)||S(Pt,Bt,Qt),w(pt,Bt)||S(pt,Bt,Qt)}}),(function(b){b.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(b,O,a){var g=a(3),v=a(4),p=a(23),x=a(11),y=a(44).f,T=a(38),S=a(215),E=a(123),I=a(124),w=a(602),M=a(127),D=a(6),L=a(36),N="DOMException",F=p("Error"),k=p(N),G=function(){S(this,U);var st=arguments.length,ct=I(st<1?void 0:arguments[0]),ht=I(st<2?void 0:arguments[1],"Error"),gt=new k(ct,ht),yt=new F(ct);return yt.name=N,y(gt,"stack",x(1,M(yt.stack,1))),E(gt,this,G),gt},U=G.prototype=k.prototype,X="stack"in new F(N),V="stack"in new k(1,2),j=k&&D&&Object.getOwnPropertyDescriptor(v,N),Y=!!j&&!(j.writable&&j.configurable),Z=X&&!Y&&!V;g({global:!0,constructor:!0,forced:L||Z},{DOMException:Z?G:k});var Q=p(N),K=Q.prototype;if(K.constructor!==Q){L||y(K,"constructor",x(1,Q));for(var tt in w)if(T(w,tt)){var nt=w[tt],rt=nt.s;T(Q,rt)||y(Q,rt,x(6,nt.c))}}}),(function(b,O,a){var g=a(23),v=a(82),p="DOMException";v(g(p),p)}),(function(b,O,a){a(606),a(607)}),(function(b,O,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(b,O,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(b,O,a){var g=a(4),v=a(95),p=a(21),x=a(189),y=a(28),T=a(76),S=a(383),E=g.Function,I=/MSIE .\./.test(y)||x==="BUN"&&(function(){var w=g.Bun.version.split(".");return w.length<3||w[0]==="0"&&(w[1]<3||w[1]==="3"&&w[2]==="0")})();b.exports=function(w,M){var D=M?2:1;return I?function(L,N){var F=S(arguments.length,1)>D,k=p(L)?L:E(L),G=F?T(arguments,D):[],U=F?function(){v(k,this,G)}:k;return M?w(U,N):w(U)}:w}}),(function(b,O,a){var g=a(3),v=a(4),p=a(385),x=a(30),y=a(383),T=a(7),S=a(6),E=T(function(){return S&&Object.getOwnPropertyDescriptor(v,"queueMicrotask").value.length!==1});g({global:!0,enumerable:!0,dontCallGetSet:!0,forced:E},{queueMicrotask:function(w){y(arguments.length,1),p(x(w))}})}),(function(b,O,a){var g=a(3),v=a(4),p=a(77),x=a(6),y=TypeError,T=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(w){if(this!==v)throw new y("Illegal invocation");T(v,"self",{value:w,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else g({global:!0,simple:!0,forced:S},{self:v})}catch(I){}}),(function(b,O,a){var g=a(36),v=a(3),p=a(4),x=a(23),y=a(14),T=a(7),S=a(40),E=a(21),I=a(89),w=a(17),M=a(20),D=a(22),L=a(136),N=a(46),F=a(69),k=a(38),G=a(90),U=a(43),X=a(63),V=a(383),j=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,wt=x("Object","keys"),Bt=y([].push),Qt=y((!0).valueOf),Ot=y(1.1.valueOf),Wt=y("".valueOf),ae=y(st.prototype.getTime),pe=S("structuredClone"),oe="DataCloneError",de="Transferring",Re=function(It){return!T(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!T(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!T(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)},nn=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,j(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=nn(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=nn(It,Mt);break;case"ImageData":try{Nt=new ImageData(se(It.data,Xt),It.width,It.height,{colorSpace:It.colorSpace})}catch(ie){Nt=nn(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(Ot(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=wt(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},we=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,N(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,I(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},an=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=V(arguments.length,1)>1&&!w(arguments[1])?N(arguments[1]):void 0,$t=Mt?Mt.transfer:void 0,qt,Nt;$t!==void 0&&(qt=new Ct,Nt=we($t,qt));var be=se(Xt,qt);return Nt&&an(Nt),be}})}),(function(b,O,a){a(613),a(614)}),(function(b,O,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(b,O,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(b,O,a){a(616)}),(function(b,O,a){a(482);var g=a(3),v=a(6),p=a(617),x=a(4),y=a(84),T=a(14),S=a(47),E=a(77),I=a(215),w=a(38),M=a(344),D=a(169),L=a(76),N=a(475).codeAt,F=a(618),k=a(68),G=a(82),U=a(383),X=a(619),V=a(51),j=V.set,Y=V.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=T("".charAt),ht=T(/./.exec),gt=T([].join),yt=T(1.1.toString),Ct=T([].pop),Tt=T([].push),Ft=T("".replace),Lt=T([].shift),Pt=T("".split),pt=T("".slice),mt=T("".toLowerCase),wt=T([].unshift),Bt="Invalid authority",Qt="Invalid scheme",Ot="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,nn=function(St){var kt=Pt(St,"."),At,vt;if(kt[kt.length-1]===""){if(kt.length===1)return!1;kt.length--}return At=kt[kt.length-1],ht(Pe,At)?!0:ht(de,At)?(vt=pt(At,2),vt===""||!!ht(Ee,vt)):!1},Ht=function(St){var kt=Pt(St,"."),At,vt,zt,Me,ue,Ut,jt;if(kt.length&&kt[kt.length-1]===""&&kt.length--,At=kt.length,At>4)return null;for(vt=[],zt=0;zt<At;zt++){if(Me=kt[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==="")Ut=0;else{if(!ht(ue===10?Pe:ue===8?Re:Ee,Me))return null;Ut=rt(Me,ue)}Tt(vt,Ut)}for(zt=0;zt<At;zt++)if(Ut=vt[zt],zt===At-1){if(Ut>=st(256,5-At))return null}else if(Ut>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 kt=[0,0,0,0,0,0,0,0],At=0,vt=null,zt=0,Me,ue,Ut,jt,An,hn,Dt,sn=function(){return ct(St,zt)};if(sn()===":"){if(ct(St,1)!==":")return;zt+=2,At++,vt=At}for(;sn();){if(At===8)return;if(sn()===":"){if(vt!==null)return;zt++,At++,vt=At;continue}for(Me=ue=0;ue<4&&ht(Ee,sn());)Me=Me*16+rt(sn(),16),zt++,ue++;if(sn()==="."){if(ue===0||(zt-=ue,At>6))return;for(Ut=0;sn();){if(jt=null,Ut>0)if(sn()==="."&&Ut<4)zt++;else return;if(!ht(oe,sn()))return;for(;ht(oe,sn());){if(An=rt(sn(),10),jt===null)jt=An;else{if(jt===0)return;jt=jt*10+An}if(jt>255)return;zt++}kt[At]=kt[At]*256+jt,Ut++,(Ut===2||Ut===4)&&At++}if(Ut!==4)return;break}else if(sn()===":"){if(zt++,!sn())return}else if(sn())return;kt[At++]=Me}if(vt!==null)for(hn=At-vt,At=7;At!==0&&hn>0;)Dt=kt[At],kt[At--]=kt[vt+hn-1],kt[vt+--hn]=Dt;else if(At!==8)return;return kt},ve=function(St){for(var kt=null,At=1,vt=null,zt=0,Me=0;Me<8;Me++)St[Me]!==0?(zt>At&&(kt=vt,At=zt),vt=null,zt=0):(vt===null&&(vt=Me),++zt);return zt>At?vt:kt},se=function(St){var kt,At,vt,zt;if(typeof St=="number"){for(kt=[],At=0;At<4;At++)wt(kt,St%256),St=it(St/256);return gt(kt,".")}if(typeof St=="object"){for(kt="",vt=ve(St),At=0;At<8;At++)zt&&St[At]===0||(zt&&(zt=!1),vt===At?(kt+=At?":":"::",zt=!0):(kt+=yt(St[At],16),At<7&&(kt+=":")));return"["+kt+"]"}return St},we={},an=M({},we,{" ":1,'"':1,"#":1,"<":1,">":1}),It=M({},an,{"'":1}),Xt=M({},we,{" ":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,kt){var At=N(St,0);return At>=32&&At<127&&!w(kt,St)?St:St==="'"&&w(kt,St)?"%27":nt(St)},Nt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},be=function(St,kt){var At;return St.length===2&&ht(ae,ct(St,0))&&((At=ct(St,1))===":"||!kt&&At==="|")},Ve=function(St){var kt;return St.length>1&&be(pt(St,0,2))&&(St.length===2||(kt=ct(St,2))==="/"||kt==="\\"||kt==="?"||kt==="#")},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={},on={},fn={},mn={},Sn={},qn={},Cr={},Ti={},bi={},Si={},Ai={},mo={},Ei={},ra={},ir={},xo={},Nr={},pr={},Ci=function(St,kt,At){var vt=k(St),zt,Me,ue;if(kt){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,kt,At){var vt=this,zt=kt||te,Me=0,ue="",Ut=!1,jt=!1,An=!1,hn,Dt,sn,mr;for(St=k(St),kt||(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(kt)return Qt;zt=Ce;continue}break;case ie:if(Dt&&ht(pe,Dt))ue+=mt(Dt);else if(Dt===":"){if(kt&&(vt.isSpecial()!==w(Nt,ue)||ue==="file"&&(vt.includesCredentials()||vt.port!==null)||vt.scheme==="file"&&vt.host===""))return;if(vt.scheme=ue,kt){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=on,Me++):(vt.cannotBeABaseURL=!0,Tt(vt.path,""),zt=xo)}else{if(kt)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=pr;break}zt=At.scheme==="file"?Ai:fn;continue;case Be:if(Dt==="/"&&hn[Me+1]==="/")zt=qn,Me++;else{zt=fn;continue}break;case on:if(Dt==="/"){zt=Cr;break}else{zt=ir;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=pr;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=ir;continue}break;case mn:if(vt.isSpecial()&&(Dt==="/"||Dt==="\\"))zt=qn;else if(Dt==="/")zt=Cr;else{vt.username=At.username,vt.password=At.password,vt.host=At.host,vt.port=At.port,zt=ir;continue}break;case Sn:if(zt=qn,Dt!=="/"||hn[Me+1]!=="/")continue;Me++;break;case qn:if(Dt!=="/"&&Dt!=="\\"){zt=Cr;continue}break;case Cr:if(Dt==="@"){Ut&&(ue="%40"+ue),Ut=!0,sn=D(ue);for(var ka=0;ka<sn.length;ka++){var Ii=sn[ka];if(Ii===":"&&!An){An=!0;continue}var Xa=qt(Ii,$t);An?vt.password+=Xa:vt.username+=Xa}ue=""}else if(Dt===re||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()){if(Ut&&ue==="")return Bt;Me-=D(ue).length+1,ue="",zt=Ti}else ue+=Dt;break;case Ti:case bi:if(kt&&vt.scheme==="file"){zt=Ei;continue}else if(Dt===":"&&!jt){if(ue==="")return Ot;if(kt===bi)return;if(mr=vt.parseHost(ue),mr)return mr;ue="",zt=Si}else if(Dt===re||Dt==="/"||Dt==="?"||Dt==="#"||Dt==="\\"&&vt.isSpecial()){if(vt.isSpecial()&&ue==="")return Ot;if(kt&&ue===""&&(vt.includesCredentials()||vt.port!==null))return;if(mr=vt.parseHost(ue),mr)return mr;if(ue="",zt=ra,kt)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()||kt){if(ue!==""){var jn=rt(ue,10);if(jn>65535)return Wt;vt.port=vt.isSpecial()&&jn===Nt[vt.scheme]?null:jn,ue=""}if(kt)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=pr;break;default:vt.host=At.host,Ve(gt(L(hn,Me),""))||(vt.path=L(At.path),vt.shortenPath()),zt=ir;continue}else{zt=ir;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=ir;continue;case Ei:if(Dt===re||Dt==="/"||Dt==="\\"||Dt==="?"||Dt==="#"){if(!kt&&be(ue))zt=ir;else if(ue===""){if(vt.host="",kt)return;zt=ra}else{if(mr=vt.parseHost(ue),mr)return mr;if(vt.host==="localhost"&&(vt.host=""),kt)return;ue="",zt=ra}continue}else ue+=Dt;break;case ra:if(vt.isSpecial()){if(zt=ir,Dt!=="/"&&Dt!=="\\")continue}else if(!kt&&Dt==="?")vt.query="",zt=Nr;else if(!kt&&Dt==="#")vt.fragment="",zt=pr;else if(Dt!==re&&(zt=ir,Dt!=="/"))continue;break;case ir:if(Dt===re||Dt==="/"||Dt==="\\"&&vt.isSpecial()||!kt&&(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=pr)}else ue+=qt(Dt,Mt);break;case xo:Dt==="?"?(vt.query="",zt=Nr):Dt==="#"?(vt.fragment="",zt=pr):Dt!==re&&(vt.path[0]+=qt(Dt,we));break;case Nr:!kt&&Dt==="#"?(vt.fragment="",zt=pr):Dt!==re&&(vt.query+=qt(Dt,vt.isSpecial()?It:an));break;case pr:Dt!==re&&(vt.fragment+=qt(Dt,Xt));break}Me++}},parseHost:function(St){var kt,At,vt;if(ct(St,0)==="["){if(ct(St,St.length-1)!=="]"||(kt=ee(pt(St,1,-1)),!kt))return Ot;this.host=kt}else if(this.isSpecial()){if(St=F(St),ht(he,St))return Ot;if(nn(St)){if(kt=Ht(St),kt===null)return Ot;this.host=kt}else this.host=St}else{if(ht(ye,St))return Ot;for(kt="",At=D(St),vt=0;vt<At.length;vt++)kt+=qt(At[vt],we);this.host=kt}},cannotHaveUsernamePasswordPort:function(){return this.host===null||this.host===""||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return w(Nt,this.scheme)},shortenPath:function(){var St=this.path,kt=St.length;kt&&(this.scheme!=="file"||kt!==1||!be(St[0],!0))&&St.length--},serialize:function(){var St=this,kt=St.scheme,At=St.username,vt=St.password,zt=St.host,Me=St.port,ue=St.path,Ut=St.query,jt=St.fragment,An=kt+":";return zt!==null?(An+="//",St.includesCredentials()&&(An+=At+(vt?":"+vt:"")+"@"),An+=se(zt),Me!==null&&(An+=":"+Me)):kt==="file"&&(An+="//"),zt===null&&!St.cannotBeABaseURL&&ue.length>1&&ue[0]===""&&(An+="/."),An+=St.cannotBeABaseURL?ue[0]:ue.length?"/"+gt(ue,"/"):"",Ut!==null&&(An+="?"+Ut),jt!==null&&(An+="#"+jt),An},setHref:function(St){var kt=this.parse(St);if(kt)throw new tt(kt);this.searchParams.update()},getOrigin:function(){var St=this.scheme,kt=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)+(kt!==null?":"+kt:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(St){this.parse(k(St)+":",te)},getUsername:function(){return this.username},setUsername:function(St){var kt=D(k(St));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var At=0;At<kt.length;At++)this.username+=qt(kt[At],$t)}},getPassword:function(){return this.password},setPassword:function(St){var kt=D(k(St));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var At=0;At<kt.length;At++)this.password+=qt(kt[At],$t)}},getHost:function(){var St=this.host,kt=this.port;return St===null?"":kt===null?se(St):se(St)+":"+kt},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,pr)},update:function(){this.query=this.searchParams.serialize()||null}};var aa=function(kt){var At=I(this,Pn),vt=U(arguments.length,1)>1?arguments[1]:void 0,zt=j(At,new Ci(kt,!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,kt){return{get:function(){return Y(this)[St]()},set:kt&&function(At){return Y(this)[kt](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(b,O,a){var g=a(7),v=a(33),p=a(6),x=a(36),y=v("iterator");b.exports=!g(function(){var T=new URL("b?a=1&b=2&c=3","https://a"),S=T.searchParams,E=new URLSearchParams("a=1&a=2&b=3"),I="";return T.pathname="c%20d",S.forEach(function(w,M){S.delete("b"),I+=M+w}),E.delete("a",2),E.delete("b",void 0),x&&(!T.toJSON||!E.has("a",1)||E.has("a",2)||!E.has("a",void 0)||E.has("b"))||!S.size&&(x||!p)||!S.sort||T.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"||I!=="a1c3"||new URL("https://x",void 0).host!=="x"})}),(function(b,O,a){var g=a(14),v=2147483647,p=36,x=1,y=26,T=38,S=700,E=72,I=128,w="-",M=/[^\0-\u007E]/,D=/[.\u3002\uFF0E\uFF61]/g,L="Overflow: input needs wider integers to process",N=p-x,F=RangeError,k=g(D.exec),G=Math.floor,U=String.fromCharCode,X=g("".charCodeAt),V=g([].join),j=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?j(st,((gt&1023)<<10)+(yt&1023)+65536):(j(st,gt),ct--)}else j(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>N*y>>1;)it=G(it/N),ht+=p;return G(ht+(N+1)*it/(it+T))},rt=function(it){var st=[];it=K(it);var ct=it.length,ht=I,gt=0,yt=E,Ct,Tt;for(Ct=0;Ct<it.length;Ct++)Tt=it[Ct],Tt<128&&j(st,U(Tt));var Ft=st.length,Lt=Ft;for(Ft&&j(st,w);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,wt=p;;){var Bt=wt<=yt?x:wt>=yt+y?y:wt-yt;if(mt<Bt)break;var Qt=mt-Bt,Ot=p-Bt;j(st,U(tt(Bt+Qt%Ot))),mt=G(Qt/Ot),wt+=p}j(st,U(tt(mt))),yt=nt(gt,pt,Lt===Ft),gt=0,Lt++}}gt++,ht++}return V(st,"")};b.exports=function(it){var st=[],ct=Z(Y(Q(it),D,"."),"."),ht,gt;for(ht=0;ht<ct.length;ht++)gt=ct[ht],j(st,k(M,gt)?"xn--"+rt(gt):gt);return V(st,".")}}),(function(b,O,a){a(175),a(479);var g=a(3),v=a(4),p=a(386),x=a(23),y=a(8),T=a(14),S=a(6),E=a(617),I=a(47),w=a(77),M=a(214),D=a(82),L=a(177),N=a(51),F=a(215),k=a(21),G=a(38),U=a(84),X=a(69),V=a(46),j=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=N.set,Ct=N.getterFor(ht),Tt=N.getterFor(gt),Ft=p("fetch"),Lt=p("Request"),Pt=p("Headers"),pt=Lt&&Lt.prototype,mt=Pt&&Pt.prototype,wt=v.TypeError,Bt=v.encodeURIComponent,Qt=String.fromCharCode,Ot=x("String","fromCodePoint"),Wt=parseInt,ae=T("".charAt),pe=T([].join),oe=T([].push),de=T("".replace),Re=T([].shift),Pe=T([].splice),Ee=T("".split),he=T("".slice),ye=T(/./.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},nn=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 on=nn(Be);if(on===0)Ce=Qt(Be);else{if(on===1||on>4){te+=Vt,ie++;continue}for(var fn=[Be],mn=1;mn<on&&(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!==on){te+=Vt;continue}var qn=Ht(fn);if(qn===null){for(var Cr=0;Cr<on;Cr++)te+=Vt;ie++;continue}else Ce=Ot(qn)}}te+=Ce,ie++}return te},ve=/[!'()~]|%20/g,se={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},we=function(Gt){return se[Gt]},an=function(Gt){return de(Bt(Gt),ve,we)},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&&(j(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,on,fn,mn,Sn;if(te)for(ie=K(Gt,te),Ce=ie.next;!(Be=y(Ce,ie)).done;){if(on=K(V(Be.value)),fn=on.next,(mn=y(fn,on)).done||(Sn=y(fn,on)).done||!y(fn,on).done)throw new wt("Expected sequence with length 2");oe(_t,{key:Y(mn.value),value:Y(Sn.value)})}else for(var qn in Gt)G(Gt,qn)&&oe(_t,{key:qn,value:Y(Gt[qn])})},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,an(ie.key)+"="+an(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],on=Be===void 0?Be:Y(Be),fn=0;fn<ie.length;){var mn=ie[fn];mn.key===Ce&&(on===void 0||mn.value===on)?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],on=Be===void 0?Be:Y(Be),fn=0;fn<te.length;){var mn=te[fn++];if(mn.key===Ce&&(on===void 0||mn.value===on))return!0}return!1},set:function(_t,te){var ie=Ct(this);rt(arguments.length,2);for(var Ce=ie.entries,Be=!1,on=Y(_t),fn=Y(te),mn=0,Sn;mn<Ce.length;mn++)Sn=Ce[mn],Sn.key===on&&(Be?Pe(Ce,mn--,1):(Be=!0,Sn.value=fn));Be||oe(Ce,{key:on,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}),I($t,ct,$t.entries,{name:"entries"}),I($t,"toString",function(){return Ct(this).serialize()},{enumerable:!0}),S&&w($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=T(mt.has),Nt=T(mt.set),be=function(Gt){if(j(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})}}b.exports={URLSearchParams:Mt,getState:Ct}}),(function(b,O,a){var g=a(3),v=a(23),p=a(7),x=a(383),y=a(68),T=a(617),S=v("URL"),E=T&&p(function(){S.canParse()}),I=p(function(){return S.canParse.length!==1});g({target:"URL",stat:!0,forced:!E||I},{canParse:function(M){var D=x(arguments.length,1),L=y(M),N=D<2||arguments[1]===void 0?void 0:y(arguments[1]);try{return!!new S(L,N)}catch(F){return!1}}})}),(function(b,O,a){var g=a(3),v=a(23),p=a(383),x=a(68),y=a(617),T=v("URL");g({target:"URL",stat:!0,forced:!y},{parse:function(E){var I=p(arguments.length,1),w=x(E),M=I<2||arguments[1]===void 0?void 0:x(arguments[1]);try{return new T(w,M)}catch(D){return null}}})}),(function(b,O,a){var g=a(3),v=a(8);g({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return v(URL.prototype.toString,this)}})}),(function(b,O,a){a(619)}),(function(b,O,a){var g=a(47),v=a(14),p=a(68),x=a(383),y=URLSearchParams,T=y.prototype,S=v(T.append),E=v(T.delete),I=v(T.forEach),w=v([].push),M=new y("a=1&a=2&b=3");M.delete("a",1),M.delete("b",void 0),M+""!="a=2"&&g(T,"delete",function(D){var L=arguments.length,N=L<2?void 0:arguments[1];if(L&&N===void 0)return E(this,D);var F=[];I(this,function(j,Y){w(F,{key:Y,value:j})}),x(L,1);for(var k=p(D),G=p(N),U=0,X=F.length,V;U<X;)V=F[U],E(this,V.key),U++;for(U=0;U<X;)V=F[U++],V.key===k&&V.value===G||S(this,V.key,V.value)},{enumerable:!0,unsafe:!0})}),(function(b,O,a){var g=a(47),v=a(14),p=a(68),x=a(383),y=URLSearchParams,T=y.prototype,S=v(T.getAll),E=v(T.has),I=new y("a=1");(I.has("a",2)||!I.has("a",void 0))&&g(T,"has",function(M){var D=arguments.length,L=D<2?void 0:arguments[1];if(D&&L===void 0)return E(this,M);var N=S(this,M);x(D,1);for(var F=p(L),k=0;k<N.length;)if(N[k++]===F)return!0;return!1},{enumerable:!0,unsafe:!0})}),(function(b,O,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(b,O,a){a.r(O),a.d(O,{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 T(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 I(t){return function(){return T(t.apply(this,arguments))}}function w(t){typeof t=="function"?t=I(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 N(t){return function(){return L.call(this.children,t)}}function F(){return this.firstElementChild}function k(t){return this.select(t==null?F:N(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 V(t){return this.selectAll(t==null?U:X(typeof t=="function"?t:D(t)))}function j(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,R=l[u]=new Array(A),C=s[u]=new Array(A),P=c[u]=new Array(h);n(f,d,R,C,P,m,e);for(var z=0,$=0,B,W;z<A;++z)if(B=R[z]){for(z>=$&&($=z+1);!(W=C[$])&&++$<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 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",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 Ot(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=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?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 nn(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:nn)(t,e)):this.node()[t]}function ve(t){return t.trim().split(/^|\s+/)}function se(t){return t.classList||new we(t)}function we(t){this._node=t,this._names=ve(t.getAttribute("class")||"")}we.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 an(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(){an(this,t)}}function Mt(t){return function(){It(this,t)}}function $t(t,e){return function(){(e.apply(this,arguments)?an: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 on(){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 qn(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Cr(t){var e=Ot(t);return(e.local?qn: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 ir(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 pr(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=pr(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*kt(){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:w,selectChild:k,selectChildren:V,filter:j,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:wt,attr:Pe,style:Vt,property:ee,classed:qt,text:Gt,html:Ce,raise:on,lower:mn,append:Ti,insert:Si,remove:mo,clone:ir,datum:xo,on:Pn,dispatch:St,[Symbol.iterator]:kt};var ue=zt;function Ut(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,sn=3,mr=Dt+sn,ka=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"}},Xa={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 wp(t){return t===null?NaN:+t}function*rR(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),Op=mu.right,aR=mu.left,iR=_s(wp).center;var Pp=Op;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 wi=.7,Ao=1/wi,Ga="\\s*([+-]?\\d+)\\s*",Oi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ir="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Mp=/^#([0-9a-f]{3,8})$/,Lp=new RegExp(`^rgb\\(${Ga},${Ga},${Ga}\\)$`),Dp=new RegExp(`^rgb\\(${Ir},${Ir},${Ir}\\)$`),Fp=new RegExp(`^rgba\\(${Ga},${Ga},${Ga},${Oi}\\)$`),Np=new RegExp(`^rgba\\(${Ir},${Ir},${Ir},${Oi}\\)$`),$p=new RegExp(`^hsl\\(${Oi},${Ir},${Ir}\\)$`),Bp=new RegExp(`^hsla\\(${Oi},${Ir},${Ir},${Oi}\\)$`),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,pa,{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 pa(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=pa(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?wi:Math.pow(wi,t),new Jn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Jn(ma(this.r),ma(this.g),ma(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`#${xa(this.r)}${xa(this.g)}${xa(this.b)}`}function Xp(){return`#${xa(this.r)}${xa(this.g)}${xa(this.b)}${xa((isNaN(this.opacity)?1:this.opacity)*255)}`}function Eu(){const t=Io(this.opacity);return`${t===1?"rgb(":"rgba("}${ma(this.r)}, ${ma(this.g)}, ${ma(this.b)}${t===1?")":`, ${t})`}`}function Io(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ma(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function xa(t){return t=ma(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 xr(t,e,n,r)}function Iu(t){if(t instanceof xr)return new xr(t.h,t.s,t.l,t.opacity);if(t instanceof Ri||(t=pa(t)),!t)return new xr;if(t instanceof xr)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 xr(s,l,c,t.opacity)}function Gp(t,e,n,r){return arguments.length===1?Iu(t):new xr(t,e,n,r==null?1:r)}function xr(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}qs(xr,Gp,xu(Ri,{brighter(t){return t=t==null?Ao:Math.pow(Ao,t),new xr(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?wi:Math.pow(wi,t),new xr(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 xr(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 wu(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 wu((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 wu((n-r/e)*e,i,o,s,l)}}var wo=(t=>()=>t);function Ou(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 oR(t,e){var n=e-t;return n?Ou(t,n>180||n<-180?n-360*Math.round(n/360):n):wo(isNaN(t)?e:t)}function Hp(t){return(t=+t)==1?Pu:function(e,n){return n-e?jp(e,n,t):wo(isNaN(e)?n:e)}}function Pu(t,e){var n=e-t;return n?Ou(t,n):wo(isNaN(t)?e:t)}var Oo=(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 sR=Mu(Wp),lR=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 cR(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]=Wa(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 yr(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]=Wa(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:yr(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 Wa(t,e){var n=typeof e,r;return e==null||n==="boolean"?wo(e):(n==="number"?yr:n==="string"?(r=pa(e))?(e=r,Oo):Nu:e instanceof pa?Oo:e instanceof Date?Yp:Du(e)?Lu:Array.isArray(e)?Fu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Kp:yr)(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 Va(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=Wa,r,i,o,s=Va,l,c,u;function f(){var h=Math.min(t.length,e.length);return s!==Va&&(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),yr)))(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:Va,f()):s!==Va},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()(Va,Va)}function ja(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function uR(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 Ha(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(Ha(e)/3)))*3-Ha(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,R=d.sign,C=d.symbol,P=d.zero,z=d.width,$=d.comma,B=d.precision,W=d.trim,H=d.type;H==="n"?($=!0,H="g"):Uu[H]||(B===void 0&&(B=12),W=!0,H="g"),(P||m==="0"&&A==="=")&&(P=!0,m="0",A="=");var J=(h&&h.prefix!==void 0?h.prefix:"")+(C==="$"?n:C==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():""),q=(C==="$"?r:/[%p]/.test(H)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),at=Uu[H],et=/[defgprs%]/.test(H);B=B===void 0?6:/[gprs]/.test(H)?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(H==="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&&R!=="+"&&(bt=!1),ft=(bt?R==="("?R:l:R==="-"||R==="("?"":R)+ft,_=(H==="s"&&!isNaN(lt)&&Lo!==void 0?Gu[8+Lo/3]:"")+_+(bt&&R==="("?")":""),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}}}$&&!P&&(lt=e(lt,1/0));var Rt=ft.length+lt.length+_.length,Et=Rt<z?new Array(z-Rt+1).join(m):"";switch($&&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(Ha(h)/3)))*3,A=Math.pow(10,-m),R=u((d=Pi(d),d.type="f",d),{suffix:Gu[8+m/3]});return function(C){return R(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,Ha(e)-Ha(t))+1}function hm(t){return Math.max(0,-Ha(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())},ja.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())},ja.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,R;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(R=h<0?A/o(-h):A*o(h),!(R<u)){if(R>f)break;P.push(R)}}else for(;h<=m;++h)for(A=r-1;A>=1;--A)if(R=h>0?A/o(-h):A*o(h),!(R<u)){if(R>f)break;P.push(R)}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()),ja.apply(t,arguments),t}const $r=1e3,or=$r*60,Br=or*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 fR=No.range,ya=Cn(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*$r)},(t,e)=>(e-t)/$r,t=>t.getUTCSeconds()),dR=ya.range,fl=Cn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*$r)},(t,e)=>{t.setTime(+t+e*or)},(t,e)=>(e-t)/or,t=>t.getMinutes()),hR=fl.range,dl=Cn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*or)},(t,e)=>(e-t)/or,t=>t.getUTCMinutes()),gR=dl.range,hl=Cn(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*$r-t.getMinutes()*or)},(t,e)=>{t.setTime(+t+e*Br)},(t,e)=>(e-t)/Br,t=>t.getHours()),vR=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()),pR=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())*or)/zr,t=>t.getDate()-1),mR=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),xR=$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)),yR=tf.range;function Ta(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())*or)/sl)}const Bo=Ta(0),zo=Ta(1),Sm=Ta(2),Am=Ta(3),Ya=Ta(4),Em=Ta(5),Cm=Ta(6),TR=Bo.range,bR=zo.range,SR=Sm.range,AR=Am.range,ER=Ya.range,CR=Em.range,IR=Cm.range;function ba(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=ba(0),ko=ba(1),Im=ba(2),Rm=ba(3),Ka=ba(4),wm=ba(5),Om=ba(6),RR=Uo.range,wR=ko.range,OR=Im.range,PR=Rm.range,MR=Ka.range,LR=wm.range,DR=Om.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()),FR=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()),NR=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 $R=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 BR=kr.range;function ef(t,e,n,r,i,o){const s=[[ya,1,$r],[ya,5,5*$r],[ya,15,15*$r],[ya,30,30*$r],[o,1,or],[o,5,5*or],[o,15,15*or],[o,30,30*or],[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,R]=s[h/s[m-1][2]<s[m][2]/h?m-1:m];return A.every(R)}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),R=Di(l),C=Fi(l),P=Di(c),z=Fi(c),$={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:wx,x:null,X:null,y:Ox,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};$.x=H(n,$),$.X=H(r,$),$.c=H(e,$),B.x=H(n,B),B.X=H(r,B),B.c=H(e,B);function H(Jt,Ae){return function(Le){var Yt=[],dn=-1,qe=0,Dn=Jt.length,Fn,Se,Oe;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",(Oe=Ae[Fn])&&(Fn=Oe(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=R.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=H(Jt+="",$);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=H(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"},On=/^\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=On.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Um(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function km(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Xm(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Gm(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function rf(t,e,n){var r=On.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function af(t,e,n){var r=On.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=On.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=On.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=On.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Hm(t,e,n){var r=On.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=On.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ym(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Km(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Zm(t,e,n){var r=On.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Jm(t,e,n){var r=On.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=On.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function qm(t,e,n){var r=On.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?Ya(t):Ya.ceil(t)}function cx(t,e){return t=uf(t),Qe(Ya.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?Ya(t):Ya.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?Ka(t):Ka.ceil(t)}function Ix(t,e){return t=hf(t),Qe(Ka.count(kr(t),t)+(kr(t).getUTCDay()===4),e,2)}function Rx(t){return t.getUTCDay()}function wx(t,e){return Qe(ko.count(kr(t)-1,t),e,2)}function Ox(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?Ka(t):Ka.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 Za,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 Za=Fm(t),yl=Za.format,mf=Za.parse,Tl=Za.utcFormat,xf=Za.utcParse,Za}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"),R=u("%I:%M"),C=u("%I %p"),P=u("%a %d"),z=u("%b %d"),$=u("%B"),B=u("%Y");function W(H){return(c(H)<H?m:l(H)<H?A:s(H)<H?R:o(H)<H?C:r(H)<H?i(H)<H?P:z:n(H)<H?$:B)(H)}return f.invert=function(H){return new Date(d(H))},f.domain=function(H){return arguments.length?h(Array.from(H,$x)):h().map(Nx)},f.ticks=function(H){var J=h();return t(J[0],J[J.length-1],H==null?10:H)},f.tickFormat=function(H,J){return J==null?W:u(J)},f.nice=function(H){var J=h();return(!H||typeof H.range!="function")&&(H=e(J[0],J[J.length-1],H==null?10:H)),H?h(Ku(J,H)):f},f.copy=function(){return Po(f,bl(t,e,n,r,i,o,s,l,c,u))},f}function Bx(){return ja.apply(bl(Lm,Dm,Ur,vl,Bo,Mi,hl,fl,ya,yl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function zx(){return ja.apply(bl(Pm,Mm,kr,pl,Uo,$o,gl,dl,ya,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",ln=t=>typeof t!="undefined",Sa=t=>typeof t=="boolean",Ux=t=>Math.ceil(t/10)*10,Ja=t=>Math.ceil(t)+.5,Aa=t=>t[1]-t[0],Qn=t=>typeof t=="object",kx=t=>{for(const e in t)return!1;return!0},sr=t=>xn(t)||t===null||Ke(t)&&t.length===0||Qn(t)&&!(t instanceof Date)&&kx(t)||ge(t)&&isNaN(t),vn=t=>!sr(t),tn=t=>Array.isArray(t),je=t=>t&&!(t!=null&&t.nodeType)&&Qn(t)&&!tn(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,zR,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 R=i[1].toLowerCase();return`</${(e=Xo.get(R))!=null?e:R}>`}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 R=h[1].toLowerCase(),C=h[2],P=h[3],z=h[4];if(R.startsWith("on"))continue;const $=(r=Go.get(R))!=null?r:R;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(R)&&d.push($);continue}if(Go.has(R)){const J=ny(R,B,z!==void 0);J!==null&&d.push(`${$}=${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&&ln(r)&&e(r,n)}}function ia(t,e,n){return ln(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 Ea=t=>[].slice.call(t);function fy(...t){const e=n=>{if(tn(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){tn(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]=tn(i)?i.concat():i}}),Gr(t,...e)}function Qa(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 Tr(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=Qa(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 Ca(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 wf(t,e){e()===!1?Wx(()=>wf(t,e)):t()}function Of(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:R,height:C,width2:P,height2:z,hasAxis:$,hasTreemap:B}}=c;if($){const W=f.axis_rotated,H=c.getResettedPadding(1),J={x:W?H:0,y:W?0:C,subX:W?1:0,subY:W?0:z},q={x:W?C:R,y:W?R:H,subX:W?C:R,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 br(t){const e=/(\d+(?:\.\d+)?)px/.exec(t),n=parseFloat(e?e[1]:t);return Number.isFinite(n)?n:12}function tr(t,e,n,r){return e.indices[n]||t.getShapeIndices(r)}function _a(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),R={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:R}),R}function er(t,e){return sa(t.config,e)===jt.BAR}function Ni(t,e){return jn.Area.indexOf(sa(t.config,e))>-1}function Ia(t,e){const n=sa(t.config,e);return jn.Line.indexOf(n)>-1}function Ra(t,e){return sa(t.config,e)===jt.SCATTER}function wa(t,e){return sa(t.config,e)===jt.BUBBLE}function lr(t,e){return Ia(t,e)||Ra(t,e)||wa(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 UR(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 la(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=>la(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=la(t,e);return jo(n)}function wl(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 wl(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(!wl(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 R=r[A],C=Math.abs(R-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 Ol(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),R=m.get(A);if(R)return R;const C=$=>(m.set(A,$),$);if(!(h!=null&&h.length))return C([]);const P=Yo(f.axis_x_tick_values,t.api);if(P){const $=Rl(t,P);return C(e?Xf(t,$):$)}if(f.axis_x_tick_fit&&(h!=null&&h.length)&&t.mapTargetsToUniqueXs){const $=by(t,h),B=Sy(t,$),W=Ol(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(wl(t)&&!((i=u==null?void 0:u.isCategorized)!=null&&i.call(u))){const $=((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),$);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 $=f.axis_x_categories.map((B,W)=>W);return C(e?zi($,Ml(t)):$)}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=Ol(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,R)=>R));const m=Oa(c,s.axis_x_tick_count||hn);return d(m)}function wy(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=la(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 Oy(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+ka)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=wy(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 Oy(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 R=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,R));if(R){const C=d.domain();return m(Ol(t,C,C.every(P=>P===0)?1:R,(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(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,O,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,O,a){a(2),a(91),a(93),a(94),a(99)}),(function(T,O,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),I=a(38),w=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),V=a(66),j=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,wt=Tt.getterFor(Pt),Bt=Object[pt],Qt=v.Symbol,Ot=Qt&&Qt[pt],Wt=v.RangeError,ae=v.TypeError,pe=v.QObject,oe=j.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,nn=function(Xt,Mt){var $t=he[Xt]=k(Ot);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),I(he,Nt)?(("enumerable"in qt?!qt.enumerable:!I(Mt,Nt)||I(Mt,Lt)&&Mt[Lt][Nt])?(I(Mt,Lt)||de(Mt,Lt,F(1,k(null))),Mt[Lt][Nt]=!0):(I(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&&I(he,$t)&&!I(ye,$t)?!1:qt||!I(this,$t)||!I(he,$t)||I(this,Lt)&&this[Lt][$t]?qt:!0},we=function(Mt,$t){var qt=D(Mt),Nt=L($t);if(!(qt===Bt&&I(he,Nt)&&!I(ye,Nt))){var be=oe(qt,Nt);return be&&I(he,Nt)&&!(I(qt,Lt)&&qt[Lt][Nt])&&(be.enumerable=!0),be}},an=function(Mt){var $t=Re(D(Mt)),qt=[];return Ft($t,function(Nt){!I(he,Nt)&&!I(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){I(he,Nt)&&(!Mt||I(Bt,Nt))&&Ee(qt,he[Nt])}),qt};S||(Qt=function(){if(w(Ot,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),I(be,Lt)&&I(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}),nn($t,Mt)},Ot=Qt[pt],K(Ot,"toString",function(){return wt(this).tag}),K(Qt,"withoutSetter",function(Xt){return nn(st(Xt),Xt)}),Q.f=se,Y.f=Ht,Z.f=ee,j.f=we,U.f=X.f=an,V.f=It,ht.f=function(Xt){return nn(ct(Xt),Xt)},b&&(tt(Ot,"description",{configurable:!0,get:function(){return wt(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:we}),g({target:"Object",stat:!0,forced:!S},{getOwnPropertyNames:an}),yt(),Ct(Qt,Pt),it[Lt]=!0}),(function(T,O,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,I){var w=E.target,M=E.global,D=E.stat,L,$,F,k,G,U;if(M?$=g:D?$=g[w]||y(w,{}):$=g[w]&&g[w].prototype,$)for(F in I){if(G=I[F],E.dontCallGetSet?(U=v($,F),k=U&&U.value):k=$[F],L=S(M?F:w+(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 O=function(a){return a&&a.Math===Math&&a};T.exports=O(typeof globalThis=="object"&&globalThis)||O(typeof window=="object"&&window)||O(typeof self=="object"&&self)||O(typeof global=="object"&&global)||O(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()}),(function(T,O,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),I=Object.getOwnPropertyDescriptor;O.f=g?I:function(M,D){if(M=y(M),D=b(D),E)try{return I(M,D)}catch(L){}if(S(M,D))return x(!v(p.f,M,D),M[D])}}),(function(T,O,a){var g=a(7);T.exports=!g(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}),(function(T){T.exports=function(O){try{return!!O()}catch(a){return!0}}}),(function(T,O,a){var g=a(9),v=Function.prototype.call;T.exports=g?v.bind(v):function(){return v.apply(v,arguments)}}),(function(T,O,a){var g=a(7);T.exports=!g(function(){var v=function(){}.bind();return typeof v!="function"||v.hasOwnProperty("prototype")})}),(function(T,O){var a={}.propertyIsEnumerable,g=Object.getOwnPropertyDescriptor,v=g&&!a.call({1:2},1);O.f=v?function(x){var y=g(this,x);return!!y&&y.enumerable}:a}),(function(T){T.exports=function(O,a){return{enumerable:!(O&1),configurable:!(O&2),writable:!(O&4),value:a}}}),(function(T,O,a){var g=a(13),v=a(16);T.exports=function(p){return g(v(p))}}),(function(T,O,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,O,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,O,a){var g=a(14),v=g({}.toString),p=g("".slice);T.exports=function(x){return p(v(x),8,-1)}}),(function(T,O,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(O){return O==null}}),(function(T,O,a){var g=a(19),v=a(22);T.exports=function(p){var x=g(p,"string");return v(x)?x:x+""}}),(function(T,O,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(I,w){if(!v(I)||p(I))return I;var M=x(I,E),D;if(M){if(w===void 0&&(w="default"),D=g(M,I,w),!v(D)||p(D))return D;throw new S("Can't convert object to primitive value")}return w===void 0&&(w="number"),y(I,w)}}),(function(T,O,a){var g=a(21);T.exports=function(v){return typeof v=="object"?v!==null:g(v)}}),(function(T){var O=typeof document=="object"&&document.all;T.exports=typeof O=="undefined"&&O!==void 0?function(a){return typeof a=="function"||a===O}:function(a){return typeof a=="function"}}),(function(T,O,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,O,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,O,a){var g=a(14);T.exports=g({}.isPrototypeOf)}),(function(T,O,a){var g=a(26);T.exports=g&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}),(function(T,O,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,O,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,O,a){var g=a(4),v=g.navigator,p=v&&v.userAgent;T.exports=p?String(p):""}),(function(T,O,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,O,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 O=String;T.exports=function(a){try{return O(a)}catch(g){return"Object"}}}),(function(T,O,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,O,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"),I=b?S.for||S:S&&S.withoutSetter||x;T.exports=function(w){return p(E,w)||(E[w]=y&&p(S,w)?S[w]:I("Symbol."+w)),E[w]}}),(function(T,O,a){var g=a(35);T.exports=function(v,p){return g[v]||(g[v]=p||{})}}),(function(T,O,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,O,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,O,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,O,a){var g=a(16),v=Object;T.exports=function(p){return v(g(p))}}),(function(T,O,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,O,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,O,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,O,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,O,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,I="enumerable",w="configurable",M="writable";O.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:w in F?F[w]:k[w],enumerable:I in F?F[I]:k[I],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,O,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,O,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,O,a){var g=a(21),v=a(44),p=a(48),x=a(37);T.exports=function(y,b,S,E){E||(E={});var I=E.enumerable,w=E.name!==void 0?E.name:b;if(g(S)&&p(S,w,E),E.global)I?y[b]=S:x(b,S);else{try{E.unsafe?y[b]&&(I=!0):delete y[b]}catch(M){}I?y[b]=S:v.f(y,b,{value:S,enumerable:!1,configurable:!E.nonConfigurable,writable:!E.nonWritable})}return y}}),(function(T,O,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),I=E.enforce,w=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,V,j){L(M(V),0,7)==="Symbol("&&(V="["+$(M(V),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),j&&j.getter&&(V="get "+V),j&&j.setter&&(V="set "+V),(!x(X,"name")||b&&X.name!==V)&&(y?D(X,"name",{value:V,configurable:!0}):X.name=V),k&&j&&x(j,"arity")&&X.length!==j.arity&&D(X,"length",{value:j.arity});try{j&&x(j,"constructor")&&j.constructor?y&&D(X,"prototype",{writable:!1}):X.prototype&&(X.prototype=void 0)}catch(Z){}var Y=I(X);return x(Y,"source")||(Y.source=F(G,typeof V=="string"?V:"")),X};Function.prototype.toString=U(function(){return p(this)&&w(this).source||S(this)},"toString")}),(function(T,O,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,O,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,O,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),I="Object already initialized",w=v.TypeError,M=v.WeakMap,D,L,$,F=function(X){return $(X)?L(X):D(X,{})},k=function(X){return function(V){var j;if(!p(V)||(j=L(V)).type!==X)throw new w("Incompatible receiver, "+X+" required");return j}};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,V){if(G.has(X))throw new w(I);return V.facade=X,G.set(X,V),V},L=function(X){return G.get(X)||{}},$=function(X){return G.has(X)}}else{var U=S("state");E[U]=!0,D=function(X,V){if(y(X,U))throw new w(I);return V.facade=X,x(X,U,V),V},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,O,a){var g=a(4),v=a(21),p=g.WeakMap;T.exports=v(p)&&/native code/.test(String(p))}),(function(T,O,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,O,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),I=x.f,w=p.f,M=0;M<E.length;M++){var D=E[M];!g(y,D)&&!(S&&g(S,D))&&I(y,D,w(b,D))}}}),(function(T,O,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 I=p.f(y(E)),w=x.f;return w?b(I,w(E)):I}}),(function(T,O,a){var g=a(58),v=a(65),p=v.concat("length","prototype");O.f=Object.getOwnPropertyNames||function(y){return g(y,p)}}),(function(T,O,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 I=p(S),w=0,M=[],D;for(D in I)!v(y,D)&&v(I,D)&&b(M,D);for(;E.length>w;)v(I,D=E[w++])&&(~x(M,D)||b(M,D));return M}}),(function(T,O,a){var g=a(12),v=a(60),p=a(63),x=function(y){return function(b,S,E){var I=g(b),w=p(I);if(w===0)return!y&&-1;var M=v(E,w),D;if(y&&S!==S){for(;w>M;)if(D=I[M++],D!==D)return!0}else for(;w>M;M++)if((y||M in I)&&I[M]===S)return y||M||0;return!y&&-1}};T.exports={includes:x(!0),indexOf:x(!1)}}),(function(T,O,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,O,a){var g=a(62);T.exports=function(v){var p=+v;return p!==p||p===0?0:g(p)}}),(function(T){var O=Math.ceil,a=Math.floor;T.exports=Math.trunc||function(v){var p=+v;return(p>0?a:O)(p)}}),(function(T,O,a){var g=a(64);T.exports=function(v){return g(v.length)}}),(function(T,O,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,O){O.f=Object.getOwnPropertySymbols}),(function(T,O,a){var g=a(7),v=a(21),p=/#|\.prototype\./,x=function(I,w){var M=b[y(I)];return M===E?!0:M===S?!1:v(w)?g(w):!!w},y=x.normalize=function(I){return String(I).replace(p,".").toLowerCase()},b=x.data={},S=x.NATIVE="N",E=x.POLYFILL="P";T.exports=x}),(function(T,O,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,O,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(I,w){try{return I[w]}catch(M){}};T.exports=g?p:function(I){var w,M,D;return I===void 0?"Undefined":I===null?"Null":typeof(M=E(w=b(I),y))=="string"?M:S?p(w):(D=p(w))==="Object"&&v(w.callee)?"Arguments":D}}),(function(T,O,a){var g=a(33),v=g("toStringTag"),p={};p[v]="z",T.exports=String(p)==="[object z]"}),(function(T,O,a){var g=a(46),v=a(72),p=a(65),x=a(54),y=a(74),b=a(42),S=a(53),E=">",I="<",w="prototype",M="script",D=S("IE_PROTO"),L=function(){},$=function(X){return I+M+E+X+I+"/"+M+E},F=function(X){X.write($("")),X.close();var V=X.parentWindow.Object;return X=null,V},k=function(){var X=b("iframe"),V="java"+M+":",j;return X.style.display="none",y.appendChild(X),X.src=String(V),j=X.contentWindow.document,j.open(),j.write($("document.F=Object")),j.close(),j.F},G,U=function(){try{G=new ActiveXObject("htmlfile")}catch(V){}U=typeof document!="undefined"?document.domain&&G?F(G):k():F(G);for(var X=p.length;X--;)delete U[w][p[X]];return U()};x[D]=!0,T.exports=Object.create||function(V,j){var Y;return V!==null?(L[w]=g(V),Y=new L,L[w]=null,Y[D]=V):Y=U(),j===void 0?Y:v.f(Y,j)}}),(function(T,O,a){var g=a(6),v=a(45),p=a(44),x=a(46),y=a(12),b=a(73);O.f=g&&!v?Object.defineProperties:function(E,I){x(E);for(var w=y(I),M=b(I),D=M.length,L=0,$;D>L;)p.f(E,$=M[L++],w[$]);return E}}),(function(T,O,a){var g=a(58),v=a(65);T.exports=Object.keys||function(x){return g(x,v)}}),(function(T,O,a){var g=a(23);T.exports=g("document","documentElement")}),(function(T,O,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,O,a){var g=a(14);T.exports=g([].slice)}),(function(T,O,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,O,a){var g=a(33);O.f=g}),(function(T,O,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,O,a){var g=a(4);T.exports=g}),(function(T,O,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(I){return g(S,this)},{arity:1})}}),(function(T,O,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,O,a){var g=a(84),v=a(13),p=a(39),x=a(63),y=a(86),b=a(90),S=function(E){var I=E===1,w=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),V=v(X),j=x(V),Y=g(G,U),Z=0,Q=0,K=I?y(k,j):w||$?y(k,0):void 0,tt,nt;j>Z;Z++)if((F||Z in V)&&(tt=V[Z],nt=Y(tt,Z,X),E))if(I)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,O,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,O,a){var g=a(15),v=a(14);T.exports=function(p){if(g(p)==="Function")return v(p)}}),(function(T,O,a){var g=a(87);T.exports=function(v,p){return new(g(v))(p===0?0:p)}}),(function(T,O,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,O,a){var g=a(15);T.exports=Array.isArray||function(p){return g(p)==="Array"}}),(function(T,O,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"),I=/^\s*(?:class|function)\b/,w=g(I.exec),M=!I.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||!!w(I,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,O,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,O,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(I){var w=x(I);if(p(S,w))return S[w];var M=v("Symbol")(w);return S[w]=M,E[M]=w,M}})}),(function(T,O,a){var g=a(26);T.exports=g&&!!Symbol.for&&!!Symbol.keyFor}),(function(T,O,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(I){if(!p(I))throw new TypeError(x(I)+" is not a symbol");if(v(S,I))return S[I]}})}),(function(T,O,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),I=a(96),w=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"),V=y(/./.exec),j=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||w(Ft))))return Pt[1]=function(mt,wt){if(E(pt)&&(wt=x(pt,this,U(mt),wt)),!w(wt))return wt},p(X,null,Pt)}:X,Ct=function(Ft,Lt,Pt){var pt=j(Pt,Lt-1),mt=j(Pt,Lt+1);return V(rt,Ft)&&!V(it,mt)||V(it,Ft)&&!V(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 wt=Pt.length,Bt=!0;return function(Qt,Ot){if(Bt)return Bt=!1,Ot;if(S(this))return Ot;for(var Wt=0;Wt<wt;Wt++)if(Pt[Wt]===Qt)return Ot}}};X&&g({target:"JSON",stat:!0,arity:3,forced:ht||gt||!G},{stringify:function(Lt,Pt,pt){var mt=Tt(Pt),wt=[],Bt=yt(Lt,function(de,Re){var Pe=E(mt)?x(mt,this,U(de),Re):Re;return!G&&I(Pe)?st+(K(wt,Pe.rawJSON)-1):Pe},pt);if(typeof Bt!="string"||(gt&&(Bt=Z(Bt,nt,Ct)),G))return Bt;for(var Qt="",Ot=Bt.length,Wt=0;Wt<Ot;Wt++){var ae=j(Bt,Wt);if(ae==='"'){var pe=$(Bt,++Wt).end-1,oe=Q(Bt,Wt,pe);Qt+=Q(oe,0,ct)===st?wt[Q(oe,ct)]:'"'+oe+'"',Wt=pe}else Qt+=ae}return Qt}})}),(function(T,O,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,O,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,O,a){var g=a(14),v=a(38),p=SyntaxError,x=parseInt,y=String.fromCharCode,b=g("".charAt),S=g("".slice),E=g(/./.exec),I={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":`
|
|
25
|
+
`,"\\r":"\r","\\t":" "},w=/^[\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(I,G))F+=I[G],L+=2;else if(G==="\\u"){L+=2;var U=S(D,L,L+4);if(!E(w,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,O,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,O,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 I=x.f;return I?I(y(E)):[]}})}),(function(T,O,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),I=a(68),w=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:I(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=I(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),V=/^Symbol\((.*)\)[^)]+$/,j=y("".replace),Y=y("".slice);w(L,"description",{configurable:!0,get:function(){var Q=U(this);if(b($,Q))return"";var K=X(Q),tt=G?Y(K,7,-1):j(K,V,"$1");return tt===""?void 0:tt}}),g({global:!0,constructor:!0,forced:!0},{Symbol:F})}}),(function(T,O,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,O,a){var g=a(79);g("asyncIterator")}),(function(T,O,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,O,a){var g=a(79);g("hasInstance")}),(function(T,O,a){var g=a(79);g("isConcatSpreadable")}),(function(T,O,a){var g=a(79);g("iterator")}),(function(T,O,a){var g=a(79);g("match")}),(function(T,O,a){var g=a(79);g("matchAll")}),(function(T,O,a){var g=a(79);g("replace")}),(function(T,O,a){var g=a(79);g("search")}),(function(T,O,a){var g=a(79);g("species")}),(function(T,O,a){var g=a(79);g("split")}),(function(T,O,a){var g=a(79),v=a(81);g("toPrimitive"),v()}),(function(T,O,a){var g=a(23),v=a(79),p=a(82);v("toStringTag"),p(g("Symbol"),"Symbol")}),(function(T,O,a){var g=a(79);g("unscopables")}),(function(T,O,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(w,M){var D={};D[w]=x(w,M,S),g({global:!0,constructor:!0,arity:1,forced:S},D)},I=function(w,M){if(b&&b[w]){var D={};D[w]=x(y+"."+w,M,S),g({target:y,stat:!0,constructor:!0,arity:1,forced:S},D)}};E("Error",function(w){return function(D){return p(w,this,arguments)}}),E("EvalError",function(w){return function(D){return p(w,this,arguments)}}),E("RangeError",function(w){return function(D){return p(w,this,arguments)}}),E("ReferenceError",function(w){return function(D){return p(w,this,arguments)}}),E("SyntaxError",function(w){return function(D){return p(w,this,arguments)}}),E("TypeError",function(w){return function(D){return p(w,this,arguments)}}),E("URIError",function(w){return function(D){return p(w,this,arguments)}}),I("CompileError",function(w){return function(D){return p(w,this,arguments)}}),I("LinkError",function(w){return function(D){return p(w,this,arguments)}}),I("RuntimeError",function(w){return function(D){return p(w,this,arguments)}})}),(function(T,O,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),I=a(124),w=a(125),M=a(126),D=a(6),L=a(36);T.exports=function($,F,k,G){var U="stackTraceLimit",X=G?2:1,V=$.split("."),j=V[V.length-1],Y=g.apply(null,V);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=I(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&&w(it,arguments[X]),it});if(K.prototype=Z,j!=="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!==j&&p(Z,"name",j),Z.constructor=K}catch(tt){}return K}}}),(function(T,O,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(I,w){return p(I),x(w),v(I)&&(y?S(I,w):I.__proto__=w),I}})():void 0)}),(function(T,O,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,O,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,O,a){var g=a(20);T.exports=function(v){return g(v)||v===null}}),(function(T,O,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,O,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,O,a){var g=a(68);T.exports=function(v,p){return v===void 0?arguments.length<2?"":p:g(v)}}),(function(T,O,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,O,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,O,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,O,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,O,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__,I=v(S),w=Error,M=w.isError,D=!M||!E||y(function(){return I&&!M(new I(S))||!M(new w(b,{cause:function(){}}))||M(v("Object","create")(w.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,O,a){var g=a(47),v=a(131),p=Error.prototype;p.toString!==v&&g(p,"toString",v)}),(function(T,O,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),I=x(E.name,"Error"),w=x(E.message);return I?w?I+": "+w:I:w}:y}),(function(T,O,a){a(133)}),(function(T,O,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),I=a(125),w=a(126),M=a(136),D=a(124),L=a(33),$=L("toStringTag"),F=Error,k=[].push,G=function(V,j){var Y=v(U,this),Z;x?Z=x(new F,Y?p(this):U):(Z=Y?this:b(U),S(Z,$,"Error")),j!==void 0&&S(Z,"message",D(j)),w(Z,G,Z.stack,1),arguments.length>2&&I(Z,arguments[2]);var Q=[];return M(V,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,O,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(I){var w=p(I);if(g(w,b))return w[b];var M=w.constructor;return v(M)&&w instanceof M?M.prototype:w instanceof S?E:null}}),(function(T,O,a){var g=a(7);T.exports=!g(function(){function v(){}return v.prototype.constructor=null,Object.getPrototypeOf(new v)!==v.prototype})}),(function(T,O,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),I=a(140),w=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),V=!!(k&&k.IS_ITERATOR),j=!!(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&&w(yt,"normal"),new D(!0,gt)},ct=function(gt){return U?(p(gt),j?Y(gt[0],gt[1],st):Y(gt[0],gt[1])):j?Y(gt,st):Y(gt)};if(X)Z=$.iterator;else if(V)Z=$;else{if(Q=I($),!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)w(Z,"throw",gt);else throw gt}if(typeof nt=="object"&&nt&&S(L,nt))return nt}return new D(!1)}}),(function(T,O,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,O,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 I=arguments.length<2?y(S):E;if(v(I))return p(g(I,S));throw new b(x(S)+" is not iterable")}}),(function(T,O,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,O,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(I){E=!0,S=I}if(y==="throw")throw b;if(E)throw S;return v(S),b}}),(function(T,O,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(I){return function(M,D){return p(I,this,arguments)}},E,!0)})}),(function(T,O,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),I=a(11),w=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}),V=U||X,j=function(Q,K,tt){var nt=p(Y,this),rt;return y?rt=V&&(!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)),w(rt,j,rt.stack,1),E(rt,"error",Q),E(rt,"suppressed",K),rt};y?y(j,G):b(j,G,{name:!0});var Y=j.prototype=V?F.prototype:S(G.prototype,{constructor:I(1,j),message:I(1,""),name:I(1,"SuppressedError")});V&&!$&&(Y.constructor=j),g({global:!0,constructor:!0,arity:3,forced:V},{SuppressedError:j})}),(function(T,O,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),I=p(E),w=x(S),M=w>=0?w:I+w;return M<0||M>=I?void 0:E[M]}}),y("at")}),(function(T,O,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,O,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),I=a(148),w=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 V=y(this),j=w(V,0),Y=0,Z,Q,K,tt,nt;for(Z=-1,K=arguments.length;Z<K;Z++)if(nt=Z===-1?V:arguments[Z],k(nt))for(tt=b(nt),S(Y+tt),Q=0;Q<tt;Q++,Y++)Q in nt&&E(j,Y,nt[Q]);else S(Y+1),E(j,Y++,nt);return I(j,Y),j}})}),(function(T){var O=TypeError,a=9007199254740991;T.exports=function(g){if(g>a)throw new O("Maximum allowed index exceeded");return g}}),(function(T,O,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,O,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,O,a){var g=a(3),v=a(151),p=a(145);g({target:"Array",proto:!0},{copyWithin:v}),p("copyWithin")}),(function(T,O,a){var g=a(39),v=a(60),p=a(63),x=a(152),y=Math.min;T.exports=[].copyWithin||function(S,E){var I=g(this),w=p(I),M=v(S,w),D=v(E,w),L=arguments.length>2?arguments[2]:void 0,$=y((L===void 0?w:v(L,w))-D,w-M),F=1;for(D<M&&M<D+$&&(F=-1,D+=$-1,M+=$-1);$-- >0;)D in I?I[M]=I[D]:x(I,M),M+=F,D+=F;return I}}),(function(T,O,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,O,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,O,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,O,a){var g=a(3),v=a(156),p=a(145);g({target:"Array",proto:!0},{fill:v}),p("fill")}),(function(T,O,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,I=v(E>1?arguments[1]:void 0,S),w=E>2?arguments[2]:void 0,M=w===void 0?S:v(w,S);M>I;)b[I++]=y;return b}}),(function(T,O,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,O,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,O,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,O,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,O,a){var g=a(84),v=a(13),p=a(39),x=a(63),y=function(b){var S=b===1;return function(E,I,w){for(var M=p(E),D=v(M),L=x(D),$=g(I,w),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,O,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,O,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,I=p(this),w=x(I),M=E===void 0?1:y(E),D=b(I,0);return v(D,I,I,w,0,M),D}})}),(function(T,O,a){var g=a(88),v=a(63),p=a(147),x=a(84),y=a(90),b=function(S,E,I,w,M,D,L,$){for(var F=M,k=0,G=L?x(L,$):!1,U,X;k<w;)k in I&&(U=G?G(I[k],k,E):I[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,O,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 I=x(this),w=y(I),M;return p(E),M=b(I,0),v(M,I,I,w,0,1,E,arguments.length>1?arguments[1]:void 0),M}})}),(function(T,O,a){var g=a(3),v=a(167);g({target:"Array",proto:!0,forced:[].forEach!==v},{forEach:v})}),(function(T,O,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,O,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,O,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),I=a(148),w=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 V=p(F),j=M(V),Y=0,Z,Q,K,tt,nt,rt;if(j&&!(this===L&&y(j)))for(Q=k?new this:[],tt=w(V,j),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(V),Q=k?new this(Z):L(Z);Z>Y;Y++)rt=X?U(V[Y],Y):V[Y],E(Q,Y,rt);return I(Q,Y),Q}}),(function(T,O,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,O,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(w){return!1}var E=!1;try{var I={};I[v]=function(){return{next:function(){return{done:E=!0}}}},b(I)}catch(w){}return E}}),(function(T,O,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,O,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(I){var w=arguments.length>1?arguments[1]:void 0;return b?y(this,I,w)||0:p(this,I,w)}})}),(function(T,O,a){var g=a(3),v=a(88);g({target:"Array",stat:!0},{isArray:v})}),(function(T,O,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),I=a(6),w="Array Iterator",M=x.set,D=x.getterFor(w);T.exports=b(Array,"Array",function($,F){M(this,{type:w,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&&I&&L.name!=="values")try{y(L,"name",{value:"values"})}catch($){}}),(function(T,O,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),I=a(82),w=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"),V="keys",j="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 V:return function(){return new tt(this,mt)};case j: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)),I(Lt,ht,!0,!0),p&&(L[ht]=Z))),F&&rt===j&&Ct&&Ct.name!==j&&(!p&&k?w(yt,"name",j):(gt=!0,Tt=function(){return v(Ct,this)})),rt)if(Pt={values:ct(j),keys:it?Tt:ct(V),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,O,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,I,w){var M=E+" Iterator";return S.prototype=v(g,{next:p(+!w,I)}),x(S,M,!1,!0),y[M]=b,S}}),(function(T,O,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),I=S("iterator"),w=!1,M,D,L;[].keys&&(L=[].keys(),"next"in L?(D=y(y(L)),D!==Object.prototype&&(M=D)):w=!0);var $=!p(M)||g(function(){var F={};return M[I].call(F)!==F});$?M={}:E&&(M=x(M)),v(M[I])||b(M,I,function(){return this}),T.exports={IteratorPrototype:M,BUGGY_SAFARI_ITERATORS:w}}),(function(T){T.exports=function(O,a){return{value:O,done:a}}}),(function(T,O,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(w){return b(x(this),w===void 0?",":w)}})}),(function(T,O,a){var g=a(3),v=a(182);g({target:"Array",proto:!0,forced:v!==[].lastIndexOf},{lastIndexOf:v})}),(function(T,O,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,I=y("lastIndexOf"),w=E||!I;T.exports=w?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,O,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,O,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 I=0,w=arguments.length,M=new(p(this)?this:b)(w);w>I;)x(M,I,arguments[I++]);return y(M,w),M}})}),(function(T,O,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(w){return w instanceof TypeError}},I=S||!E();g({target:"Array",proto:!0,arity:1,forced:I},{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,O,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(I){var w=arguments.length;return v(this,I,w,w>1?arguments[1]:void 0)}})}),(function(T,O,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(I,w,M,D){var L=v(I),$=p(L),F=x(L);if(g(w),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=w(D,$[k],k,L));return D}};T.exports={left:S(!1),right:S(!0)}}),(function(T,O,a){var g=a(189);T.exports=g==="NODE"}),(function(T,O,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,O,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(I){return v(this,I,arguments.length,arguments.length>1?arguments[1]:void 0)}})}),(function(T,O,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,O,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),I=a(148),w=a(33),M=a(149),D=a(76),L=M("slice"),$=w("species"),F=Array,k=Math.max;g({target:"Array",proto:!0,forced:!L},{slice:function(U,X){var V=S(this),j=b(V),Y=y(U,j),Z=y(X===void 0?j:X,j),Q,K,tt;if(v(V)&&(Q=V.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(V,Y,Z);for(K=new(Q===void 0?F:Q)(k(Z-Y,0)),tt=0;Y<Z;Y++,tt++)Y in V&&E(K,tt,V[Y]);return I(K,tt),K}})}),(function(T,O,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,O,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),I=a(195),w=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)}),V=w("sort"),j=!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||!V||!j,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(j)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(I(nt,Z(K)),it=y(nt),st=0;st<it;)tt[st]=nt[st++];for(;st<rt;)b(tt,st++);return tt}})}),(function(T,O,a){var g=a(76),v=Math.floor,p=function(x,y){var b=x.length;if(b<8)for(var S=1,E,I;S<b;){for(I=S,E=x[S];I&&y(x[I-1],E)>0;)x[I]=x[--I];I!==S++&&(x[I]=E)}else for(var w=v(b/2),M=p(g(x,0,w),y),D=p(g(x,w),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,O,a){var g=a(28),v=g.match(/firefox\/(\d+)/i);T.exports=!!v&&+v[1]}),(function(T,O,a){var g=a(28);T.exports=/MSIE|Trident/.test(g)}),(function(T,O,a){var g=a(28),v=g.match(/AppleWebKit\/(\d+)\./);T.exports=!!v&&+v[1]}),(function(T,O,a){var g=a(200);g("Array")}),(function(T,O,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,O,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),I=a(90),w=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),V=p(k,X),j=arguments.length,Y,Z,Q,K,tt,nt;for(j===0?Y=Z=0:j===1?(Y=0,Z=X-V):(Y=j-2,Z=$(L(x(G),0),X-V)),S(X+Y-Z),Q=E(U,Z),K=0;K<Z;K++)tt=V+K,tt in U&&I(Q,K,U[tt]);if(b(Q,Z),Y<Z){for(K=V;K<X-Z;K++)tt=K+Z,nt=K+Y,tt in U?U[nt]=U[tt]:w(U,nt);for(K=X;K>X-Z+Y;K--)w(U,K-1)}else if(Y>Z)for(K=X-Z;K>V;K--)tt=K+Z-1,nt=K+Y-1,tt in U?U[nt]=U[tt]:w(U,nt);for(K=0;K<Y;K++)U[K+V]=arguments[K+2];return b(U,X-Z+Y),Q}})}),(function(T,O,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),I=v(E),w=new b(I),M=0;M<I;M++)x(w,M,E[I-M-1]);return w}}),y("toReversed")}),(function(T,O,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,I=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 I(L,M)}}),S("toSorted")}),(function(T,O,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,O,a){var g=a(4);T.exports=function(v,p){var x=g[v],y=x&&x.prototype;return y&&y[p]}}),(function(T,O,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),I=Array,w=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,V,j,Y,Z;for(U===0?V=j=0:U===1?(V=0,j=k-G):(V=U-2,j=M(w(S($),0),k-G)),Y=p(k+V-j),Z=I(Y);X<G;X++)E(Z,X,F[X]);for(;X<G+V;X++)E(Z,X,arguments[X-G+2]);for(;X<Y;X++)E(Z,X,F[X+j-V]);return Z}}),v("toSpliced")}),(function(T,O,a){var g=a(145);g("flat")}),(function(T,O,a){var g=a(145);g("flatMap")}),(function(T,O,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(w){return w instanceof TypeError}},I=S||!E();g({target:"Array",proto:!0,arity:1,forced:I},{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,O,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(I){return I!==4}})();g({target:"Array",proto:!0,forced:E},{with:function(I,w){var M=x(this),D=v(M),L=p(I),$=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===$?w:M[k]);return F}})}),(function(T,O,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,O,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),I=a(7),w=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),V=a(55),j=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),wt=v([].reverse),Bt=$.pack,Qt=$.unpack,Ot=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,nn){var Ht=ct(Vt),ee=D(re),ve=!!nn;if(ee+ne>Ht.byteLength)throw new pt(it);var se=Ht.bytes,we=ee+Ht.byteOffset,an=U(se,we,we+ne);return ve?an:wt(an)},Ee=function(Vt,ne,re,nn,Ht,ee){var ve=ct(Vt),se=D(re),we=nn(+Ht),an=!!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]=we[an?Mt:ne-Mt-1]};if(!x)yt=function(ne){w(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,nn){w(this,Ft),w(ne,Ct);var Ht=st(ne),ee=Ht.byteLength,ve=M(re);if(ve<0||ve>ee)throw new pt("Wrong offset");if(nn=nn===void 0?ee-ve:D(nn),ve+nn>ee)throw new pt(rt);ht(this,{type:tt,buffer:ne,byteLength:nn,byteOffset:ve,bytes:Ht.bytes}),p||(this.buffer=ne,this.byteLength=nn,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,Ot,re)},setUint8:function(ne,re){Ee(this,1,ne,Ot,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;!I(function(){gt(1)})||!I(function(){new gt(-1)})||I(function(){return new gt,new gt(1.5),new gt(NaN),gt.length!==1||he&&!Q})?(yt=function(ne){return w(this,Ct),X(new gt(D(ne)),this,yt)},yt[nt]=Ct,Ct.constructor=yt,V(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})}j(yt,K),j(Tt,tt),T.exports={ArrayBuffer:yt,DataView:Tt}}),(function(T){T.exports=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"}),(function(T,O,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,O,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,O,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,O,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,O,a){var g=a(219),v=a(220),p=Math.abs,x=2220446049250313e-31;T.exports=function(y,b,S,E){var I=+y,w=p(I),M=g(I);if(w<E)return M*v(w/E/b)*E*b;var D=(1+b/x)*w,L=D-(D-w);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 O=2220446049250313e-31,a=1/O;T.exports=function(g){return g+a-a}}),(function(T){var O=Array,a=Math.abs,g=Math.pow,v=Math.floor,p=Math.log,x=Math.LN2,y=function(S,E,I){var w=O(I),M=I*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;)w[k++]=U&255,U/=256,E-=8;for(G=G<<E|U,M+=E;M>0;)w[k++]=G&255,G/=256,M-=8;return w[k-1]|=F*128,w},b=function(S,E){var I=S.length,w=I*8-E-1,M=(1<<w)-1,D=M>>1,L=w-7,$=I-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,O,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,O,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),I=a(43),w=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,V=p.Int8Array,j=V&&V.prototype,Y=p.Uint8ClampedArray,Z=Y&&Y.prototype,Q=V&&L(V),K=j&&L(j),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(Ot){var Wt=L(Ot);if(y(Wt)){var ae=X(Wt);return ae&&b(ae,st)?ae[st]:Pt(Wt)}},pt=function(Ot){if(!y(Ot))return!1;var Wt=S(Ot);return b(Tt,Wt)||b(Ft,Wt)},mt=function(Ot){if(pt(Ot))return Ot;throw new nt("Target is not a typed array")},wt=function(Ot){if(x(Ot)&&(!$||D(Q,Ot)))return Ot;throw new nt(E(Ot)+" is not a typed array constructor")},Bt=function(Ot,Wt,ae,pe){if(v){if(ae)for(var oe in Tt){var de=p[oe];if(de&&b(de.prototype,Ot))try{delete de.prototype[Ot]}catch(Re){try{de.prototype[Ot]=Wt}catch(Pe){}}}(!K[Ot]||ae)&&w(K,Ot,ae?Wt:ct&&j[Ot]||Wt,pe)}},Qt=function(Ot,Wt,ae){var pe,oe;if(v){if($){if(ae){for(pe in Tt)if(oe=p[pe],oe&&b(oe,Ot))try{delete oe[Ot]}catch(de){}}if(!Q[Ot]||ae)try{return w(Q,Ot,ae?Wt:ct&&Q[Ot]||Wt)}catch(de){}else return}for(pe in Tt)oe=p[pe],oe&&(!oe[Ot]||ae)&&w(oe,Ot,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]&&I(p[gt].prototype,it,gt)}T.exports={NATIVE_ARRAY_BUFFER_VIEWS:ct,TYPED_ARRAY_TAG:ht&&it,aTypedArray:mt,aTypedArrayConstructor:wt,exportTypedArrayMethod:Bt,exportTypedArrayStaticMethod:Qt,getTypedArrayConstructor:Pt,isView:Lt,isTypedArray:pt,TypedArray:Q,TypedArrayPrototype:K}}),(function(T,O,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,I=x.DataView,w=I.prototype,M=v(E.prototype.slice),D=v(w.getUint8),L=v(w.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),V=b(G===void 0?U:G,U),j=new E(S(V-X)),Y=new I(this),Z=new I(j),Q=0;X<V;)L(Z,Q++,D(Y,X++));return j}})}),(function(T,O,a){a(226)}),(function(T,O,a){var g=a(3),v=a(212),p=a(213);g({global:!0,constructor:!0,forced:!p},{DataView:v.DataView})}),(function(T,O,a){var g=a(3),v=a(14),p=Math.pow,x=31,y=1023,b=p(2,-24),S=.0009765625,E=function(w){var M=w>>>15,D=w>>>10&x,L=w&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)},I=v(DataView.prototype.getUint16);g({target:"DataView",proto:!0},{getFloat16:function(M){return E(I(this,M,arguments.length>1?arguments[1]:!1))}})}),(function(T,O,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,I=65520,w=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>=I)return k<<15|31744;if(F<w)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,O,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 O=Math.log,a=Math.LN2;T.exports=Math.log2||function(v){return O(v)/a}}),(function(T,O,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,O,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,O,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,O,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,O,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),I=g.structuredClone,w=g.ArrayBuffer,M=g.DataView,D=Math.max,L=Math.min,$=w.prototype,F=M.prototype,k=v($.slice),G=p($,"resizable","get"),U=p($,"maxByteLength","get"),X=v(F.getInt8),V=v(F.setInt8);T.exports=(E||S)&&function(j,Y,Z){var Q=b(j),K=Y===void 0?Q:x(Y),tt=!G||!G(j),nt;if(y(j),E&&(j=I(j,{transfer:[j]}),Q===K&&(Z||tt)))return j;if(Q>=K&&(!Z||tt))nt=k(j,0,K);else{var rt=Z&&!tt&&U?{maxByteLength:D(K,U(j))}:void 0;nt=new w(K,rt);for(var it=new M(j),st=new M(nt),ct=L(K,Q),ht=0;ht<ct;ht++)V(st,ht,X(it,ht))}return E||S(j),nt}}),(function(T,O,a){var g=a(232),v=TypeError;T.exports=function(p){if(g(p))throw new v("ArrayBuffer is detached");return p}}),(function(T,O,a){var g=a(4),v=a(238),p=a(239),x=g.structuredClone,y=g.ArrayBuffer,b=g.MessageChannel,S=!1,E,I,w,M;if(p)S=function(D){x(D,{transfer:[D]})};else if(y)try{b||(E=v("worker_threads"),E&&(b=E.MessageChannel)),b&&(I=new b,w=new y(2),M=function(D){I.port1.postMessage(null,[D])},w.byteLength===2&&(M(w),w.byteLength===0&&(S=M)))}catch(D){}T.exports=S}),(function(T,O,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,O,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,O,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,O,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,O,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,O,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 I=+E;if(I!==I)return b(this,I);var w=p(I),M=w>=0&&w<=99?w+1900:w;return b(this,M)}})}),(function(T,O,a){var g=a(3);g({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString})}),(function(T,O,a){var g=a(3),v=a(246);g({target:"Date",proto:!0,forced:Date.prototype.toISOString!==v},{toISOString:v})}),(function(T,O,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,I=g(S.getTime),w=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(I(this)))throw new x("Invalid time value");var U=this,X=M(U),V=L(U),j=X<0?"-":X>9999?"+":"";return j+p(b(X),j?6:4,0)+"-"+p(F(U)+1,2,0)+"-"+p(w(U),2,0)+"T"+p(D(U),2,0)+":"+p($(U),2,0)+":"+p(k(U),2,0)+"."+p(V,3,0)+"Z"}:E}),(function(T,O,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,I=function(w){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)),w?$+X:X+$)}};T.exports={start:I(!1),end:I(!0)}}),(function(T,O,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)),I="",w=g(S);if(w<0||w===1/0)throw new x("Wrong number of repetitions");for(;w>0;(w=y(w/2))&&(E+=E))w%2&&(I+=E);return I}}),(function(T,O,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),I=x(E,"number");return typeof I=="number"&&!isFinite(I)?null:E.toISOString()}})}),(function(T,O,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,O,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,O,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 I=S(this);return I===I?b(this):x})}),(function(T,O,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),I=a(33),w=a(51),M=a(254),D=p("SuppressedError"),L=ReferenceError,$=I("dispose"),F=I("toStringTag"),k="DisposableStack",G=w.set,U=w.getterFor(k),X="sync-dispose",V="disposed",j="pending",Y=function(K){var tt=U(K);if(tt.state===V)throw new L(k+" already disposed");return tt},Z=function(){G(y(this,Q),{type:k,state:j,stack:[]}),v||(this.disposed=!1)},Q=Z.prototype;S(Q,{dispose:function(){var tt=U(this);if(tt.state!==V){tt.state=V,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=V,v||(this.disposed=!0),nt}}),v&&E(Q,"disposed",{configurable:!0,get:function(){return U(this).state===V}}),b(Q,$,Q.dispose,{name:"dispose"}),b(Q,F,k,{nonWritable:!0}),g({global:!0,constructor:!0},{DisposableStack:Z})}),(function(T,O,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),I=a(33),w=I("asyncDispose"),M=I("dispose"),D=p([].push),L=function(F,k){if(k==="async-dispose"){var G=E(F,w);return G!==void 0||(G=E(F,M),G===void 0)?G:function(){var U=this,X=g("Promise");return new X(function(V){v(G,U),V(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,O,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),I=/[\w*+\-./@]/,w=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(I,G)?$+=G:(U=y(G,0),U<256?$+="%"+E(w(U,2)):$+="%u"+E(w(U,4)));return $}})}),(function(T,O,a){var g=a(3),v=a(257);g({target:"Function",proto:!0,forced:Function.bind!==v},{bind:v})}),(function(T,O,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),I=g([].join),w={},M=function(D,L,$){if(!x(w,L)){for(var F=[],k=0;k<L;k++)F[k]="a["+k+"]";w[L]=S("C,a","return new C("+I(F,",")+")")}return w[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,O,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(I){if(!g(this)||!v(I))return!1;var w=this.prototype;return v(w)?x(w,I):I instanceof this},S)})}),(function(T,O,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),I="name";g&&!v&&x(y,I,{configurable:!0,get:function(){try{return E(S,b(this))[1]}catch(w){return""}}})}),(function(T,O,a){var g=a(3),v=a(4);g({global:!0,forced:v.globalThis!==v},{globalThis:v})}),(function(T,O,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),I=a(7),w=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],V=$||!y(X)||X.prototype!==D||!I(function(){X({})}),j=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");w(this,Z)?this[Z]=K:E(this,Z,K)}}):D[Z]=Q};w(D,G)||Y(G,k),(V||!w(D,F)||D[F]===Object)&&Y(F,j),j.prototype=D,g({global:!0,constructor:!0,forced:V},{Iterator:j})}),(function(T,O,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,I=b(function(){for(;;){var w=this.iterator;if(!w){var M=this.nextIterableIndex++,D=this.iterables;if(M>=D.length){this.done=!0;return}var L=D[M];this.iterables[M]=null,w=this.iterator=x(v(L.method,L.iterable)),this.next=w.next}var $=x(v(this.next,w));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 I({iterables:D,nextIterableIndex:0,iterator:null,next:null})}})}),(function(T,O,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,I=a(179),w=a(141),M=a(264),D=y("toStringTag"),L="IteratorHelper",$="WrapForValidIterator",F="normal",k="throw",G=b.set,U=function(j){var Y=b.getterFor(j?$:L);return x(v(E),{next:function(){var Q=Y(this);if(j)return Q.nextHandler();if(Q.done)return I(void 0,!0);try{var K=Q.nextHandler();return Q.returnHandlerResult?K:I(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,j){var tt=S(Q,"return");return tt?g(tt,Q):I(void 0,!0)}if(K)return I(void 0,!0);if(Z.inner)try{w(Z.inner.iterator,F)}catch(nt){return w(Q,k,nt)}if(Z.openIters)try{M(Z.openIters,F)}catch(nt){if(Q)return w(Q,k,nt);throw nt}return Q&&w(Q,F),I(void 0,!0)}})},X=U(!0),V=U(!1);p(V,D,"Iterator Helper"),T.exports=function(j,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=j,nt.counter=0,nt.done=!1,G(this,nt)};return Q.prototype=Y?X:V,Q}}),(function(T,O,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,O,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,O,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),I=a(270),w=a(271),M=a(36),D=!M&&!I("drop",0),L=!M&&!D&&w("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(O){return{iterator:O,next:O.next,done:!1}}}),(function(T){var O=RangeError;T.exports=function(a){if(a===a)return a;throw new O("NaN is not allowed")}}),(function(T,O,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(O,a){var g=typeof Iterator=="function"&&Iterator.prototype[O];if(g)try{g.call({next:null},a).next()}catch(v){return!0}}}),(function(T,O,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,O,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),I=E("every",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:I},{every:function(M){y(this);try{x(M)}catch($){S(this,"throw",$)}if(I)return v(I,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,O,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),I=a(141),w=a(270),M=a(271),D=!E&&!w("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,V,j;;){if(X=x(v(U,k)),V=this.done=!!X.done,V)return;if(j=X.value,S(k,G,[j,this.counter++],!0))return j}});g({target:"Iterator",proto:!0,real:!0,forced:$},{filter:function(G){x(this);try{p(G)}catch(U){I(this,"throw",U)}return L?v(L,this,G):new F(y(this),{predicate:G})}})}),(function(T,O,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),I=E("find",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:I},{find:function(M){y(this);try{x(M)}catch($){S(this,"throw",$)}if(I)return v(I,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,O,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),I=a(36),w=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=!I&&!w("flatMap",function(){}),$=!I&&!L&&M("flatMap",TypeError),F=I||L||$||D(),k=S(function(){for(var G=this.iterator,U=this.mapper,X,V;;){if(V=this.inner)try{if(X=x(v(V.next,V.iterator)),!X.done)return X.value;this.inner=null}catch(j){E(G,"throw",j)}if(X=x(v(this.next,G)),this.done=!!X.done)return;try{this.inner=b(U(X.value,this.counter++),!1)}catch(j){E(G,"throw",j)}}});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,O,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,O,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),I=E("forEach",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:I},{forEach:function(M){y(this);try{x(M)}catch($){S(this,"throw",$)}if(I)return v(I,this,M);var D=b(this),L=0;p(D,function($){M($,L++)},{IS_RECORD:!0})}})}),(function(T,O,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),I=E||(function(){try{Iterator.from({return:null}).return()}catch(M){return!0}})(),w=b(function(){return v(this.next,this.iterator)},!0);g({target:"Iterator",stat:!0,forced:I},{from:function(D){var L=S(typeof D=="string"?p(D):D,!0);return x(y,L.iterator)?L.iterator:new w(L)}})}),(function(T,O,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),I=a(270),w=a(271),M=a(36),D=!M&&!I("map",function(){}),L=!M&&!D&&w("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,O,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),I=a(7),w=TypeError,M=I(function(){[].keys().reduce(function(){},void 0)}),D=!M&&S("reduce",w);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 w("Reduce of empty iterator with no initial value");return k}})}),(function(T,O,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),I=E("some",TypeError);g({target:"Iterator",proto:!0,real:!0,forced:I},{some:function(M){y(this);try{x(M)}catch($){S(this,"throw",$)}if(I)return v(I,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,O,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),I=a(270),w=a(271),M=a(36),D=!M&&!I("take",1),L=!M&&!D&&w("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,O,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(I){p(S,E++,I)},{IS_RECORD:!0}),S}})}),(function(T,O,a){var g=a(3),v=a(98),p=a(96);g({target:"JSON",stat:!0,forced:!v},{isRawJSON:p})}),(function(T,O,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),I=a(88),w=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,V=G&&G.parse,j=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 wt=new Ft(pt,0,""),Bt=wt.parse(),Qt=Bt.value,Ot=wt.skip(st,Bt.end);if(Ot<pt.length)throw new X('Unexpected extra character: "'+Z(pt,Ot)+'" after the parsed data at: '+Ot);return S(mt)?yt({"":Qt},"",mt,Bt):Qt},yt=function(pt,mt,wt,Bt){var Qt=pt[mt],Ot=Bt&&Qt===Bt.value,Wt=Ot&&typeof Bt.source=="string"?{source:Bt.source}:{},ae,pe,oe,de,Re;if(E(Qt)){var Pe=I(Qt),Ee=Ot?Bt.nodes:Pe?[]:{};if(Pe)for(ae=Ee.length,oe=D(Qt),de=0;de<oe;de++)Ct(Qt,de,yt(Qt,""+de,wt,de<ae?Ee[de]:void 0));else for(pe=j(Qt),oe=D(pe),de=0;de<oe;de++)Re=pe[de],Ct(Qt,Re,yt(Qt,Re,wt,w(Ee,Re)?Ee[Re]:void 0))}return b(wt,pt,mt,Qt,Wt)},Ct=function(pt,mt,wt){if(v){var Bt=Y(pt,mt);if(Bt&&!Bt.configurable)return}wt===void 0?delete pt[mt]:L(pt,mt,wt)},Tt=function(pt,mt,wt,Bt){this.value=pt,this.end=mt,this.source=wt,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),wt=this.fork(mt),Bt=Z(pt,mt);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: '+mt)},node:function(pt,mt,wt,Bt,Qt){return new Tt(mt,Bt,pt?null:Q(this.source,wt,Bt),Qt)},object:function(){for(var pt=this.source,mt=this.index+1,wt=!1,Bt={},Qt={},Ot=!1;mt<pt.length;){if(mt=this.until(['"',"}"],mt),Z(pt,mt)==="}"&&!wt){mt++,Ot=!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===",")wt=!0,mt++;else if(pe==="}"){mt++,Ot=!0;break}}if(!Ot)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,wt=!1,Bt=[],Qt=[],Ot=!1;mt<pt.length;){if(mt=this.skip(st,mt),Z(pt,mt)==="]"&&!wt){mt++,Ot=!0;break}var Wt=this.fork(mt).parse();if(tt(Qt,Wt),tt(Bt,Wt.value),mt=this.until([",","]"],Wt.end),Z(pt,mt)===",")wt=!0,mt++;else if(Z(pt,mt)==="]"){mt++,Ot=!0;break}}if(!Ot)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,wt=mt;if(Z(pt,wt)==="-"&&wt++,Z(pt,wt)==="0")wt++;else if(K(rt,Z(pt,wt)))wt=this.skip(nt,wt+1);else throw new X("Failed to parse number at: "+wt);if(Z(pt,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(pt,wt)==="e"||Z(pt,wt)==="E"){wt++,(Z(pt,wt)==="+"||Z(pt,wt)==="-")&&wt++;var Qt=wt;if(wt=this.skip(nt,wt),Qt===wt)throw new X("Failed to parse number's exponent value at: "+wt)}return this.node(ct,U(Q(pt,mt,wt)),mt,wt)},keyword:function(pt){var mt=""+pt,wt=this.index,Bt=wt+mt.length;if(Q(this.source,wt,Bt)!==mt)throw new X("Failed to parse value at: "+wt);return this.node(ct,pt,wt,Bt)},skip:function(pt,mt){for(var wt=this.source;mt<wt.length&&K(pt,Z(wt,mt));mt++);return mt},until:function(pt,mt){mt=this.skip(st,mt);for(var wt=Z(this.source,mt),Bt=0;Bt<pt.length;Bt++)if(pt[Bt]===wt)return mt;throw new X('Unexpected character: "'+wt+'" at: '+mt)}};var Lt=$(function(){var pt="9007199254740993",mt;return V(pt,function(wt,Bt,Qt){mt=Qt.source}),mt!==pt}),Pt=k&&!$(function(){return 1/V("-0 ")!==-1/0});g({target:"JSON",stat:!0,forced:Lt},{parse:function(mt,wt){return Pt&&!S(wt)?V(mt):gt(mt,wt)}})}),(function(T,O,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,I=SyntaxError,w=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 I($);var X=w(U);if(typeof X=="object"&&X!==null)throw new I($);var V=M(null);return E(V,{type:"RawJSON"}),S(V,"rawJSON",U),v?D(V):V}})}),(function(T,O,a){var g=a(7);T.exports=!g(function(){return Object.isExtensible(Object.preventExtensions({}))})}),(function(T,O,a){var g=a(4),v=a(82);v(g.JSON,"JSON",!0)}),(function(T,O,a){a(290)}),(function(T,O,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,O,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),I=a(21),w=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,V=k.indexOf("Weak")!==-1,j=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 V&&!M(Ct)?!1:yt(this,Ct===0?0:Ct)}:gt==="get"?function(Tt){return V&&!M(Tt)?void 0:yt(this,Tt===0?0:Tt)}:gt==="has"?function(Tt){return V&&!M(Tt)?!1:yt(this,Tt===0?0:Tt)}:function(Tt,Ft){return yt(this,Tt===0?0:Tt,Ft),this})},nt=x(k,!I(Y)||!(V||Z.forEach&&!D(function(){new Y().entries().next()})));if(nt)Q=U.getConstructor(G,k,X,j),b.enable();else if(x(k,!0)){var rt=new Q,it=rt[j](V?{}:-0,1)!==rt,st=D(function(){rt.has(1)}),ct=L(function(gt){new Y(gt)}),ht=!V&&D(function(){for(var gt=new Y,yt=5;yt--;)gt[j](yt,yt);return!gt.has(-0)});ct||(Q=G(function(gt,yt){E(gt,Z);var Ct=F(new Y,gt,Q);return w(yt)||S(yt,Ct[j],{that:Ct,AS_ENTRIES:X}),Ct}),Q.prototype=Z,Z.constructor=Q),(st||ht)&&(tt("delete"),tt("has"),X&&tt("get")),(ht||it)&&tt(j),V&&Z.clear&&delete Z.clear}return K[k]=Q,g({global:!0,constructor:!0,forced:Q!==Y},K),$(Q,k),V||U.setStrong(Q,k,X),Q}}),(function(T,O,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),I=a(293),w=a(40),M=a(287),D=!1,L=w("meta"),$=0,F=function(j){b(j,L,{value:{objectID:"O"+$++,weakData:{}}})},k=function(j,Y){if(!x(j))return typeof j=="symbol"?j:(typeof j=="string"?"S":"P")+j;if(!y(j,L)){if(!I(j))return"F";if(!Y)return"E";F(j)}return j[L].objectID},G=function(j,Y){if(!y(j,L)){if(!I(j))return!0;if(!Y)return!1;F(j)}return j[L].weakData},U=function(j){return M&&D&&I(j)&&!y(j,L)&&F(j),j},X=function(){V.enable=function(){},D=!0;var j=S.f,Y=v([].splice),Z={};Z[L]=1,j(Z).length&&(S.f=function(Q){for(var K=j(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}))},V=T.exports={enable:X,fastKey:k,getWeakData:G,onFreeze:U};p[L]=!0}),(function(T,O,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,O,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,O,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),I=a(179),w=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 V=k(function(K,tt){y(K,j),$(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})}),j=V.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(j,{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(j,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(j,"size",{configurable:!0,get:function(){return Y(this).size}}),V},setStrong:function(k,G,U){var X=G+" Iterator",V=F(G),j=F(X);E(k,G,function(Y,Z){$(this,{type:X,target:Y,state:V(Y),kind:Z,last:null})},function(){for(var Y=j(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,I(void 0,!0)):I(Z==="keys"?Q.key:Z==="values"?Q.value:[Q.key,Q.value],!1)},U?"entries":"values",!U,!0),w(G)}}}),(function(T,O,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),I=b.Map,w=b.has,M=b.get,D=b.set,L=v([].push),$=S||E(function(){return I.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 I,X=0;return y(k,function(V){var j=G(V,X++);w(U,j)?L(M(U,j),V):D(U,j,[V])}),U}})}),(function(T,O,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,O,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,I){return y(this,E)?x(this,E):(b(this,E,I),I)}})}),(function(T,O,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(I,w){var M=b(this,I);if(v(w),M)return y(this,I);I===0&&1/I===-1/0&&(I=0);var D=w(I);return S(this,I,D),D}})}),(function(T,O,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(I){var w=+I;return w<1?NaN:w>9490626562425156e-8?x(w)+b:v(w-1+y(w-1)*y(w+1))}})}),(function(T){var O=Math.log;T.exports=Math.log1p||function(g){var v=+g;return v>-1e-8&&v<1e-8?v-v*v/2:O(1+v)}}),(function(T,O,a){var g=a(3),v=Math.asinh,p=Math.log,x=Math.sqrt,y=Math.LN2,b=9490626562425156e-8;function S(I){var w=+I;return!isFinite(w)||w===0?w:w<0?-S(-w):w>b?p(w)+y:p(w+x(w*w+1))}var E=!(v&&1/v(0)>0);g({target:"Math",stat:!0,forced:E},{asinh:S})}),(function(T,O,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,O,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,O,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,O,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 I=v(x(E)-1)+1;return(I+1/(I*y*y))*(y/2)}})}),(function(T){var O=Math.expm1,a=Math.exp;T.exports=!O||O(10)>22025.465794806718||O(10)<22025.465794806718||O(-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}:O}),(function(T,O,a){var g=a(3),v=a(307);g({target:"Math",stat:!0,forced:v!==Math.expm1},{expm1:v})}),(function(T,O,a){var g=a(3),v=a(217);g({target:"Math",stat:!0},{fround:v})}),(function(T,O,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,O,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 I=0,w=0,M=arguments.length,D=0,L,$;w<M;)L=p(arguments[w++]),D<L?($=D/L,I=I*$*$+1,D=L):L>0?($=L/D,I+=$*$):I+=L;return D===1/0?1/0:D*x(I)}})}),(function(T,O,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,I=+b,w=+S,M=E&I,D=E&w;return 0|M*D+((E&I>>>16)*D+M*(E&w>>>16)<<16>>>0)}})}),(function(T,O,a){var g=a(3),v=a(314);g({target:"Math",stat:!0},{log10:v})}),(function(T){var O=Math.log,a=Math.LOG10E;T.exports=Math.log10||function(v){return O(v)*a}}),(function(T,O,a){var g=a(3),v=a(301);g({target:"Math",stat:!0},{log1p:v})}),(function(T,O,a){var g=a(3),v=a(230);g({target:"Math",stat:!0},{log2:v})}),(function(T,O,a){var g=a(3),v=a(219);g({target:"Math",stat:!0},{sign:v})}),(function(T,O,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(I){var w=+I;return x(w)<1?(p(w)-p(-w))/2:(y(w-1)-y(-w-1))*(b/2)}})}),(function(T,O,a){var g=a(3),v=a(14),p=a(136),x=RangeError,y=TypeError,b=1/0,S=NaN,E=Math.abs,I=Math.pow,w=v([].push),M=I(2,1023),D=I(2,53)-1,L=Number.MAX_VALUE,$=I(2,971),F={},k={},G={},U={},X={},V=function(j,Y){var Z=j+Y,Q=Y-(Z-j);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,w(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=V(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=V(rt,it),ct=st.hi,ht=st.lo}ht!==0&&(tt[Ct++]=ht),rt=ct}tt.length=Ct,rt!==0&&w(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=V(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=V(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,O,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,O,a){var g=a(82);g(Math,"Math",!0)}),(function(T,O,a){var g=a(3),v=a(62);g({target:"Math",stat:!0},{trunc:v})}),(function(T,O,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),I=a(123),w=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",V=x[X],j=y[X],Y=V.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,!V(" 0o1")||!V("0b1")||V("+0x1")),it=function(ht){return w(Y,ht)&&L(function(){G(ht)})},st=function(gt){var yt=arguments.length<1?0:V(tt(gt));return it(this)?I(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&&j&&ct(y[X],j),(rt||v)&&ct(y[X],V)}),(function(T,O,a){var g=a(14);T.exports=g(1.1.valueOf)}),(function(T,O,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(I){return function(w){var M=p(v(w));return I&1&&(M=y(M,b,"")),I&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,O,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)})}),(function(T,O,a){var g=a(3),v=a(329);g({target:"Number",stat:!0},{isFinite:v})}),(function(T,O,a){var g=a(4),v=g.isFinite;T.exports=Number.isFinite||function(x){return typeof x=="number"&&v(x)}}),(function(T,O,a){var g=a(3),v=a(331);g({target:"Number",stat:!0},{isInteger:v})}),(function(T,O,a){var g=a(20),v=Math.floor;T.exports=Number.isInteger||function(x){return!g(x)&&isFinite(x)&&v(x)===x}}),(function(T,O,a){var g=a(3);g({target:"Number",stat:!0},{isNaN:function(p){return p!==p}})}),(function(T,O,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,O,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991})}),(function(T,O,a){var g=a(3);g({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991})}),(function(T,O,a){var g=a(3),v=a(337);g({target:"Number",stat:!0,forced:Number.parseFloat!==v},{parseFloat:v})}),(function(T,O,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,I=g.Symbol,w=I&&I.iterator,M=1/E(b+"-0")!==-1/0||w&&!v(function(){E(Object(w))});T.exports=M?function(L){var $=y(x(L)),F=E($);return F===0&&S($,0)==="-"?-0:F}:E}),(function(T,O,a){var g=a(3),v=a(339);g({target:"Number",stat:!0,forced:Number.parseInt!==v},{parseInt:v})}),(function(T,O,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,I=E&&E.iterator,w=/^[+-]?0x/i,M=p(w.exec),D=S(b+"08")!==8||S(b+"0x16")!==22||I&&!v(function(){S(Object(I))});T.exports=D?function($,F){var k=y(x($));return S(k,F>>>0||(M(w,k)?16:10))}:S}),(function(T,O,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,I=String,w=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",V=function(){return S(function(){F(1,1/0)})&&S(function(){F(1,-1/0)})},j=function(){return!S(function(){F(1/0,1/0),F(NaN,1/0)})},Y=!X||!V()||!j();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(!w(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=I(gt)),tt!==0&&(rt=G(rt,0,1)+"."+G(rt,1)),it===0?(st="+",ct="0"):(st=it>0?"+":"-",ct=I(M(it))),rt+="e"+st+ct,nt+rt}})}),(function(T,O,a){var g=a(3),v=a(14),p=a(61),x=a(324),y=a(248),b=a(7),S=RangeError,E=String,I=Math.floor,w=v(y),M=v("".slice),D=v(1.1.toFixed),L=function(X,V,j){return V===0?j:V%2===1?L(X,V-1,j*X):L(X*X,V/2,j)},$=function(X){for(var V=0,j=X;j>=4096;)V+=12,j/=4096;for(;j>=2;)V+=1,j/=2;return V},F=function(X,V,j){for(var Y=-1,Z=j;++Y<6;)Z+=V*X[Y],X[Y]=Z%1e7,Z=I(Z/1e7)},k=function(X,V){for(var j=6,Y=0;--j>=0;)Y+=X[j],X[j]=I(Y/V),Y=Y%V*1e7},G=function(X){for(var V=6,j="";--V>=0;)if(j!==""||V===0||X[V]!==0){var Y=E(X[V]);j=j===""?Y:j+w("0",7-Y.length)+Y}return j},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(V){var j=x(this),Y=p(V),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(j!==j)return"NaN";if(j<=-1e21||j>=1e21)return E(j);if(j<0&&(Q="-",j=-j),j>1e-21)if(tt=$(j*L(2,69,1))-69,nt=tt<0?j*L(2,-tt,1):j/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)+w("0",Y);return Y>0?(it=K.length,K=Q+(it<=Y?"0."+w("0",Y-it)+K:M(K,0,it-Y)+"."+M(K,it-Y))):K=Q+K,K}})}),(function(T,O,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,O,a){var g=a(3),v=a(344);g({target:"Object",stat:!0,arity:2,forced:Object.assign!==v},{assign:v})}),(function(T,O,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),I=a(13),w=Object.assign,M=Object.defineProperty,D=v([].concat);T.exports=!w||x(function(){if(g&&w({b:1},w(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}),w({},L)[F]!==7||y(w({},$)).join("")!==k})?function($,F){for(var k=E($),G=arguments.length,U=1,X=b.f,V=S.f;G>U;)for(var j=I(arguments[U++]),Y=X?D(y(j),X(j)):y(j),Z=Y.length,Q=0,K;Z>Q;)K=Y[Q++],(!g||p(V,j,K))&&(k[K]=j[K]);return k}:w}),(function(T,O,a){var g=a(3),v=a(6),p=a(71);g({target:"Object",stat:!0,sham:!v},{create:p})}),(function(T,O,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,I){b.f(y(this),E,{get:x(I),enumerable:!0,configurable:!0})}})}),(function(T,O,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,O,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,O,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,O,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,I){b.f(y(this),E,{set:x(I),enumerable:!0,configurable:!0})}})}),(function(T,O,a){var g=a(3),v=a(352).entries;g({target:"Object",stat:!0},{entries:function(x){return v(x)}})}),(function(T,O,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),I=p([].push),w=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=w&&x($)===null,G=F.length,U=0,X=[],V;G>U;)V=F[U++],(!g||(k?V in $:E($,V)))&&I(X,D?[V,$[V]]:$[V]);return X}};T.exports={entries:M(!0),values:M(!1)}}),(function(T,O,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(I){return b&&x(I)?b(y(I)):I}})}),(function(T,O,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,O,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,I){return x(p(E),I)}})}),(function(T,O,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 I=x(E),w=y.f,M=p(I),D={},L=0,$,F;M.length>L;)F=w(I,$=M[L++]),F!==void 0&&b(D,$,F);return D}})}),(function(T,O,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,O,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,O,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),I=a(7),w=Object.groupBy,M=p("Object","create"),D=x([].push),L=!w||I(function(){return w("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 V=S(k(X,U++));V in G?D(G[V],X):v(G,V,[X])}),G}})}),(function(T,O,a){var g=a(3),v=a(38);g({target:"Object",stat:!0},{hasOwn:v})}),(function(T,O,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,O,a){var g=a(3),v=a(293);g({target:"Object",stat:!0,forced:Object.isExtensible!==v},{isExtensible:v})}),(function(T,O,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(I){return!p(I)||y&&x(I)==="ArrayBuffer"?!0:b?b(I):!1}})}),(function(T,O,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(I){return!p(I)||y&&x(I)==="ArrayBuffer"?!0:b?b(I):!1}})}),(function(T,O,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,O,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(I){var w=x(this),M=y(I),D;do if(D=S(w,M))return D.get;while(w=b(w))}})}),(function(T,O,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(I){var w=x(this),M=y(I),D;do if(D=S(w,M))return D.set;while(w=b(w))}})}),(function(T,O,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(I){return b&&v(I)?b(p(I)):I}})}),(function(T,O,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,I=Object.prototype,w="__proto__";if(g&&S&&E&&!(w in I))try{v(I,w,{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,O,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(I){return b&&v(I)?b(p(I)):I}})}),(function(T,O,a){var g=a(3),v=a(118);g({target:"Object",stat:!0},{setPrototypeOf:v})}),(function(T,O,a){var g=a(70),v=a(47),p=a(374);g||v(Object.prototype,"toString",p,{unsafe:!0})}),(function(T,O,a){var g=a(70),v=a(69);T.exports=g?{}.toString:function(){return"[object "+v(this)+"]"}}),(function(T,O,a){var g=a(3),v=a(352).values;g({target:"Object",stat:!0},{values:function(x){return v(x)}})}),(function(T,O,a){var g=a(3),v=a(337);g({global:!0,forced:parseFloat!==v},{parseFloat:v})}),(function(T,O,a){var g=a(3),v=a(339);g({global:!0,forced:parseInt!==v},{parseInt:v})}),(function(T,O,a){a(379),a(395),a(397),a(398),a(399),a(400)}),(function(T,O,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),I=a(82),w=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),V=a(387),j=a(51),Y=a(392),Z=a(393),Q=a(394),K="Promise",tt=Z.CONSTRUCTOR,nt=Z.REJECTION_EVENT,rt=Z.SUBCLASSING,it=j.getterFor(K),st=j.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",wt=0,Bt=1,Qt=2,Ot=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,we=se?Ht.ok:Ht.fail,an=Ht.resolve,It=Ht.reject,Xt=Ht.domain,Mt,$t,qt;try{we?(se||(ee.rejection===Wt&&Vt(ee),ee.rejection=Ot),we===!0?Mt=ve:(Xt&&Xt.enter(),Mt=we(ve),Xt&&(Xt.exit(),qt=!0)),Mt===Ht.promise?It(new yt("Promise-chain cycle")):($t=Re(Mt))?b($t,Mt,an,It):an(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,we;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&&(we=x["on"+Ht])?we(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),we;if(se&&(we=X(function(){p?Tt.emit("unhandledRejection",ve,ee):he(pt,ee,ve)}),Ht.rejection=p||Ge(Ht)?Wt:Ot,we.error))throw we.value})},Ge=function(Ht){return Ht.rejection!==Ot&&!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))},nn=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 we={done:!1};try{b(se,ee,ne(nn,we,Ht),ne(re,we,Ht))}catch(an){re(we,an,Ht)}}):(Ht.value=ee,Ht.state=Bt,Ee(Ht,!1))}catch(we){re({done:!1},we,Ht)}}};if(tt&&(ht=function(ee){$(this,gt),M(ee),b(ae,this);var ve=it(this);try{ee(ne(nn,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 V,rejection:!1,state:wt,value:null})},ae.prototype=S(gt,"then",function(ee,ve){var se=it(this),we=Ft(F(this,ht));return se.parent=!0,we.ok=D(ee)?ee:!0,we.fail=D(ve)&&ve,we.domain=p?Tt.domain:void 0,se.state===wt?se.reactions.add(we):G(function(){Pe(we,se)}),we.promise}),pe=function(){var Ht=new ae,ee=it(Ht);this.promise=Ht,this.resolve=ne(nn,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(we,an){b(de,se,we,an)}).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,I(ht,K,!1,!0),w(K)}),(function(T,O,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,I;return E===void 0||p(I=g(E)[y])?S:v(I)}}),(function(T,O,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,O,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),I=a(42),w=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,V=0,j={},Y="onreadystatechange",Z,Q,K,tt;b(function(){Z=g.location});var nt=function(ct){if(y(j,ct)){var ht=j[ct];delete j[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){w(arguments.length,1);var gt=x(ht)?ht:G(ht),yt=E(arguments,1);return j[++V]=function(){v(gt,void 0,yt)},Q(V),V},$=function(ht){delete j[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 I("script")?Q=function(ct){S.appendChild(I("script"))[Y]=function(){S.removeChild(this),nt(ct)}}:Q=function(ct){setTimeout(rt(ct),0)}),T.exports={set:L,clear:$}}),(function(T){var O=TypeError;T.exports=function(a,g){if(a<g)throw new O("Not enough arguments");return a}}),(function(T,O,a){var g=a(28);T.exports=/ipad|iphone|ipod/i.test(g)&&/applewebkit/i.test(g)}),(function(T,O,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),I=a(188),w=g.MutationObserver||g.WebKitMutationObserver,M=g.document,D=g.process,L=g.Promise,$=v("queueMicrotask"),F,k,G,U,X;if(!$){var V=new y,j=function(){var Y,Z;for(I&&(Y=D.domain)&&Y.exit();Z=V.get();)try{Z()}catch(Q){throw V.head&&F(),Q}Y&&Y.enter()};!b&&!I&&!E&&w&&M?(k=!0,G=M.createTextNode(""),new w(j).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(j)}):I?F=function(){D.nextTick(j)}:(x=p(x,g),F=function(){x(j)}),$=function(Y){V.head||F(),V.add(Y)}}T.exports=$}),(function(T,O,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 O=function(){this.head=null,this.tail=null};O.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=O}),(function(T,O,a){var g=a(28);T.exports=/ipad|iphone|ipod/i.test(g)&&typeof Pebble!="undefined"}),(function(T,O,a){var g=a(28);T.exports=/web0s(?!.*chrome)/i.test(g)}),(function(T){T.exports=function(O,a){try{arguments.length===1?console.error(O):console.error(O,a)}catch(g){}}}),(function(T){T.exports=function(O){try{return{error:!1,value:O()}}catch(a){return{error:!0,value:a}}}}),(function(T,O,a){var g=a(4);T.exports=g.Promise}),(function(T,O,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),I=a(27),w=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&&I===66||E&&!(w.catch&&w.finally))return!0;if(!I||I<51||!/native code/.test(F)){var G=new v(function(V){V(1)}),U=function(V){V(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,O,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,O,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(I){var w=this,M=x.f(w),D=M.resolve,L=M.reject,$=y(function(){var F=p(w.resolve),k=[],G=0,U=1;b(I,function(X){var V=G++,j=!1;U++,v(F,w,X).then(function(Y){j||(j=!0,k[V]=Y,--U||D(k))},L)}),--U||D(k)});return $.error&&L($.value),M.promise}})}),(function(T,O,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,O,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(w){return this.then(void 0,w)}}),!v&&b(x)){var I=y("Promise").prototype.catch;E.catch!==I&&S(E,"catch",I,{unsafe:!0})}}),(function(T,O,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(I){var w=this,M=x.f(w),D=M.reject,L=y(function(){var $=p(w.resolve);b(I,function(F){v($,w,F).then(M.resolve,D)})});return L.error&&D(L.value),M.promise}})}),(function(T,O,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,O,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(w){return b(E&&this===S?x:this,w)}})}),(function(T,O,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,O,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(I){var w=this,M=x.f(w),D=M.resolve,L=M.reject,$=y(function(){var F=p(w.resolve),k=[],G=0,U=1;b(I,function(X){var V=G++,j=!1;U++,v(F,w,X).then(function(Y){j||(j=!0,k[V]={status:"fulfilled",value:Y},--U||D(k))},function(Y){j||(j=!0,k[V]={status:"rejected",reason:Y},--U||D(k))})}),--U||D(k)});return $.error&&L($.value),M.promise}})}),(function(T,O,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),I="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=[],V=0,j=1,Y=!1;S(M,function(Z){var Q=V++,K=!1;j++,v(U,D,Z).then(function(tt){K||Y||(Y=!0,F(tt))},function(tt){K||Y||(K=!0,X[Q]=tt,--j||k(new L(X,I)))})}),--j||k(new L(X,I))});return G.error&&k(G.value),$.promise}})}),(function(T,O,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),I=a(47),w=p&&p.prototype,M=!!p&&x(function(){w.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;w.finally!==D&&I(w,"finally",D,{unsafe:!0})}}),(function(T,O,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,I=!1,w=!E||!E.try||S(function(){E.try(function(M){I=M===8},8)}).error||!I;g({target:"Promise",stat:!0,forced:w},{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,O,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,O,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,O,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),I=a(23),w=a(205),M=a(33),D=a(410),L=a(412).toArray,$=M("asyncIterator"),F=v(w("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(V){var j=this,Y=arguments.length,Z=Y>1?arguments[1]:void 0,Q=Y>2?arguments[2]:void 0;return new(I("Promise"))(function(K){Z!==void 0&&(Z=g(Z,Q));var tt=E(V,$),nt=tt?void 0:S(V)||G,rt=p(j)?new j:[],it=tt?x(V,tt):new D(b(y(V,nt)));K(L(it,Z,rt))})}}),(function(T,O,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(I,w){var M=arguments.length<2?b(I,E):w;return M?p(g(M,I)):new v(y(x(I)))}}),(function(T,O,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),I=a(411),w=a(179),M=E("Promise"),D="AsyncFromSyncIterator",L=b.set,$=b.getterFor(D),F=function(G,U,X,V,j){var Y=G.done;M.resolve(G.value).then(function(Z){U(w(Z,Y))},function(Z){if(!Y&&j)try{S(V,"throw",Z)}catch(Q){Z=Q}X(Z)})},k=function(U){U.type=D,L(this,U)};k.prototype=y(p(I),{next:function(){var U=$(this),X=arguments.length>0,V=X?arguments[0]:void 0;return new M(function(j,Y){var Z=v(X?g(U.next,U.iterator,V):g(U.next,U.iterator));F(Z,j,Y,U.iterator,!0)})},return:function(){var G=$(this),U=G.iterator,X=arguments.length>0,V=X?arguments[0]:void 0;return new M(function(j,Y){var Z=x(U,"return");if(Z===void 0)return j(w(V,!0));var Q=v(X?g(Z,U,V):g(Z,U));F(Q,j,Y,U)})},throw:function(){var G=$(this),U=G.iterator,X=arguments.length>0,V=X?arguments[0]:void 0;return new M(function(j,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,V):g(Z,U));F(Q,j,Y,U,!0)})}}),T.exports=k}),(function(T,O,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),I="USE_FUNCTION_CONSTRUCTOR",w=S("asyncIterator"),M=g.AsyncIterator,D=v.AsyncIteratorPrototype,L,$;if(D)L=D;else if(p(M))L=M.prototype;else if(v[I]||g[I])try{$=y(y(y(Function("return async function*(){}()")()))),y($)===Object.prototype&&(L=$)}catch(F){}L?E&&(L=x(L)):L={},p(L[w])||b(L,w,function(){return this}),T.exports=L}),(function(T,O,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),I=a(267),w=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 V=U!==void 0;(V||!L)&&v(U);var j=I(G),Y=b("Promise"),Z=j.iterator,Q=j.next,K=0;return new Y(function(tt,nt){var rt=function(st){w(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(V){var ht=K++,gt=U(ct,ht),yt=function(Ct){if($)it();else if(F)Ct?it():w(Z,tt,!1,nt);else if(L)try{S(X,ht,Ct),it()}catch(Tt){rt(Tt)}else Ct?w(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,O,a){var g=a(8),v=a(46),p=a(23),x=a(29);T.exports=function(y,b,S,E){try{var I=x(y,"return");if(I)return p("Promise").resolve(g(I,y)).then(function(w){try{b!==E&&v(w)}catch(M){E(M);return}b(S)},function(w){b===E?b(S):E(w)})}catch(w){return E(b===E?S:w)}b(S)}}),(function(T,O,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),I=a(33),w=a(51),M=a(254),D=a(27),L=p("Promise"),$=p("SuppressedError"),F=ReferenceError,k=I("asyncDispose"),G=I("toStringTag"),U="AsyncDisposableStack",X=w.set,V=w.getterFor(U),j="async-dispose",Y="disposed",Z="pending",Q=function(rt){var it=V(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=V(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,j),it},adopt:function(it,st){var ct=Q(this);return x(st),M(ct,void 0,j,function(){return st(it)}),it},defer:function(it){var st=Q(this);x(it),M(st,void 0,j,it)},move:function(){var it=Q(this),st=new K;return V(st).stack=it.stack,it.stack=[],it.state=Y,v||(this.disposed=!0),st}}),v&&E(tt,"disposed",{configurable:!0,get:function(){return V(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,O,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"),I=p("Promise");y(S,E)||v(S,E,function(){var w=this;return new I(function(M,D){var L=x(w,"return");L?I.resolve(g(L,w)).then(function(){M(void 0)},D):M(void 0)})})}),(function(T,O,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,I,w){return v(p(E),I,x(w))}})}),(function(T,O,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),I=a(7),w=v("Reflect","construct"),M=Object.prototype,D=[].push,L=I(function(){function k(){}return!(w(function(){},[],k)instanceof k)}),$=!I(function(){w(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 w(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 V=[null];return p(D,V,U),new(p(x,G,V))}var j=X.prototype,Y=E(S(j)?j:M),Z=p(G,Y,U);return S(Z)?Z:Y}})}),(function(T,O,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,I=S(function(){Reflect.defineProperty(y.f({},1,{value:1}),1,{value:2})});g({target:"Reflect",stat:!0,forced:I,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,O,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),I=p(b,E);return I&&!I.configurable?!1:delete b[E]}})}),(function(T,O,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),I=function(w,M,D){if(x(w)===D)return w[M];var L=b.f(w,M);if(L)return y(L)?L.value:L.get===void 0?void 0:v(L.get,D);var $=S(w);if(p($))return I($,M,D)};g({target:"Reflect",stat:!0},{get:function(M,D){return I(x(M),E(D),arguments.length<3?M:arguments[2])}})}),(function(T,O,a){var g=a(38);T.exports=function(v){return v!==void 0&&(g(v,"value")||g(v,"writable"))}}),(function(T,O,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,O,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,O,a){var g=a(3);g({target:"Reflect",stat:!0},{has:function(p,x){return x in p}})}),(function(T,O,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,O,a){var g=a(3),v=a(56);g({target:"Reflect",stat:!0},{ownKeys:v})}),(function(T,O,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,O,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),I=a(134),w=a(11),M=a(18),D=function($,F,k,G){var U=E.f(p($),F),X,V,j;if(!U){if(x(V=I($)))return D(V,F,k,G);U=w(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,w(0,k))}catch(Y){return!1}}else{if(j=U.set,j===void 0)return!1;v(j,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,O,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,O,a){var g=a(3),v=a(4),p=a(82);g({global:!0},{Reflect:{}}),p(v.Reflect,"Reflect",!0)}),(function(T,O,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,I=a(24),w=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),V=a(33),j=a(437),Y=a(438),Z=V("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||j||Y||k(function(){return yt[Z]=!1,Q(gt)!==gt||Q(yt)===yt||String(Q(gt,"i"))!=="/a/i"})),Pt=function(Qt){for(var Ot=Qt.length,Wt=0,ae="",pe=!1,oe;Wt<Ot;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 Ot=Qt.length,Wt=0,ae="",pe=[],oe=S(null),de=!1,Re=!1,Pe=0,Ee="",he;Wt<Ot;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(Ot,Wt){var ae=I(K,this),pe=w(Ot),oe=Wt===void 0,de=[],Re=Ot,Pe,Ee,he,ye,Ge,Vt;if(!ae&&pe&&oe&&Ot.constructor===mt)return Ot;if((pe||I(K,Ot))&&(Ot=Ot.source,oe&&(Wt=D(Re))),Ot=Ot===void 0?"":M(Ot),Wt=Wt===void 0?"":M(Wt),Re=Ot,j&&"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(Ot),Ot=ye[0],de=ye[1]),Ge=y(Q(Ot,Wt),ae?this:K,mt),(Ee||he||de.length)&&(Vt=U(Ge),Ee&&(Vt.dotAll=!0,Vt.raw=mt(Pt(Ot),Pe)),he&&(Vt.sticky=!0),de.length&&(Vt.groups=de)),Ot!==Re)try{b(Ge,"source",Re===""?"(?:)":Re)}catch(ne){}return Ge},wt=E(Q),Bt=0;wt.length>Bt;)$(mt,Q,wt[Bt++]);K.constructor=mt,mt.prototype=K,F(v,"RegExp",mt,{constructor:!0})}X("RegExp")}),(function(T,O,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,O,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,O,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",I=function(L,$){Object.defineProperty(b,L,{get:function(){return S+=$,!0}})},w={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};y&&(w.hasIndices="d");for(var M in w)I(M,w[M]);var D=Object.getOwnPropertyDescriptor(p.prototype,"flags").get.call(b);return D!==E||S!==E});T.exports={correct:x}}),(function(T,O,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,O,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,O,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,O,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,O,a){var g=a(3),v=a(14),p=a(440),x=a(38),y=a(247).start,b=a(326),S=Array,E=RegExp.escape,I=v("".charAt),w=v("".charCodeAt),M=v(1.1.toString),D=v([].join),L=/^[0-9a-z]/i,$=/^[$()*+./?[\\\]^{|}]/,F=RegExp("^[!\"#%&',\\-:;<=>@`~"+b+"]"),k=v(L.exec),G={" ":"t","\n":"n","\v":"v","\f":"f","\r":"r"},U=function(V){var j=M(w(V,0),16);return j.length<3?"\\x"+y(j,2,"0"):"\\u"+y(j,4,"0")},X=!E||E("ab")!=="\\x61b";g({target:"RegExp",stat:!0,forced:X},{escape:function(j){p(j);for(var Y=j.length,Z=S(Y),Q=0;Q<Y;Q++){var K=I(j,Q);if(Q===0&&k(L,K))Z[Q]=U(K);else if(x(G,K))Z[Q]="\\"+G[K];else if(k($,K))Z[Q]="\\"+K;else if(k(F,K))Z[Q]=U(K);else{var tt=w(K,0);(tt&63488)!==55296?Z[Q]=K:tt>=56320||Q+1>=Y||(w(j,Q+1)&64512)!==56320?Z[Q]=U(K):(Z[Q]=K,Z[++Q]=I(j,Q))}}return D(Z,"")}})}),(function(T){var O=TypeError;T.exports=function(a){if(typeof a=="string")return a;throw new O("Argument is not a string")}}),(function(T,O,a){var g=a(6),v=a(437),p=a(15),x=a(77),y=a(51).get,b=RegExp.prototype,S=TypeError;g&&v&&x(b,"dotAll",{configurable:!0,get:function(){if(this!==b){if(p(this)==="RegExp")return!!y(this).dotAll;throw new S("Incompatible receiver, RegExp required")}}})}),(function(T,O,a){var g=a(3),v=a(443);g({target:"RegExp",proto:!0,forced:/./.exec!==v},{exec:v})}),(function(T,O,a){var g=a(8),v=a(14),p=a(68),x=a(435),y=a(436),b=a(34),S=a(71),E=a(51).get,I=a(437),w=a(438),M=b("native-string-replace",String.prototype.replace),D=RegExp.prototype.exec,L=D,$=v("".charAt),F=v("".indexOf),k=v("".replace),G=v("".slice),U=(function(){var Z=/a/,Q=/b*/g;return g(D,Z,"a"),g(D,Q,"a"),Z.lastIndex!==0||Q.lastIndex!==0})(),X=y.BROKEN_CARET,V=/()??/.exec("")[1]!==void 0,j=U||V||X||I||w,Y=function(Z,Q){for(var K=Z.groups=S(null),tt=0;tt<Q.length;tt++){var nt=Q[tt];K[nt[0]]=Z[nt[1]]}};j&&(L=function(Q){var K=this,tt=E(K),nt=p(Q),rt=tt.raw,it,st,ct;if(rt)return rt.lastIndex=K.lastIndex,it=g(L,rt,nt),K.lastIndex=rt.lastIndex,it&&tt.groups&&Y(it,tt.groups),it;var ht=tt.groups,gt=X&&K.sticky,yt=g(x,K),Ct=K.source,Tt=0,Ft=nt;if(gt){yt=k(yt,"y",""),F(yt,"g")===-1&&(yt+="g"),Ft=G(nt,K.lastIndex);var Lt=K.lastIndex>0&&$(nt,K.lastIndex-1);K.lastIndex>0&&(!K.multiline||K.multiline&&Lt!==`
|
|
29
|
+
`&&Lt!=="\r"&&Lt!=="\u2028"&&Lt!=="\u2029")&&(Ct="(?: (?:"+Ct+"))",Ft=" "+Ft,Tt++),st=new RegExp("^(?:"+Ct+")",yt)}V&&(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),V&&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,O,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,O,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,O,a){a(442);var g=a(3),v=a(8),p=a(21),x=a(46),y=a(68),b=(function(){var E=!1,I=/[ac]/;return I.exec=function(){return E=!0,/./.exec.apply(this,arguments)},I.test("abc")===!0&&E})(),S=/./.test;g({target:"RegExp",proto:!0,forced:!b},{test:function(E){var I=x(this),w=y(E),M=I.exec;if(!p(M))return v(S,I,w);var D=v(M,I,w);return D===null?!1:(x(D),!0)}})}),(function(T,O,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,I=E[S],w=y(function(){return I.call({source:"a",flags:"b"})!=="/a/b"}),M=g&&I.name!==S;(w||M)&&v(E,S,function(){var L=p(this),$=x(L.source),F=x(b(L));return"/"+$+"/"+F},{unsafe:!0})}),(function(T,O,a){a(449)}),(function(T,O,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,O,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 I=0;return{next:function(){var w=I++>1;return E.has(1)&&E.clear(),{done:w,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,O,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,I=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)&&I($,F)}):S(L.getIterator(),function(F){E($,F)&&I($,F)}),$}}),(function(T,O,a){var g=a(453).has;T.exports=function(v){return g(v),v}}),(function(T,O,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,O,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,O,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(I,w,M){return M?v({iterator:S(I),next:E},w):b(I,w)}}),(function(T,O,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,O,a){var g=a(119),v=a(453);T.exports=g(v.proto,"size","get")||function(p){return p.size}}),(function(T,O,a){var g=a(30),v=a(46),p=a(8),x=a(61),y=a(267),b="Invalid size",S=RangeError,E=TypeError,I=Math.max,w=function(M,D){this.set=M,this.size=I(D,0),this.has=g(M.has),this.keys=g(M.keys)};w.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 w(M,L)}}),(function(T,O,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(I){var S=new b([1,2]);return y(S[x](p(1/0)))}}}catch(E){return!1}}}),(function(T,O,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,O,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,I=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){I(D,F)&&E($,F)}):y(D,function(F){L.includes(F)&&E($,F)}),$}}),(function(T,O,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,O,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(I){var w=g(this),M=x(I);if(p(w)<=M.size)return y(w,function(L){if(M.includes(L))return!1},!0)!==!1;var D=M.getIterator();return b(D,function(L){if(v(w,L))return S(D.iterator,"normal",!1)})!==!1}}),(function(T,O,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,O,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(I){if(!E.includes(I))return!1},!0)!==!1}}),(function(T,O,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,O,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 I=g(this),w=x(E);if(p(I)<w.size)return!1;var M=w.getIterator();return y(M,function(D){if(!v(I,D))return b(M.iterator,"normal",!1)})!==!1}}),(function(T,O,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,O,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(w){var M=g(this),D=x(w).getIterator(),L=p(M);return y(D,function($){S(M,$)?E(L,$):b(L,$)}),L}}),(function(T){T.exports=function(O){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[O](g);return v.size===1&&v.values().next().value===4}catch(p){return!1}}}),(function(T,O,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,O,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),I=x(S).getIterator(),w=p(E);return y(I,function(M){v(w,M)}),w}}),(function(T,O,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(w){var M=y(p(this)),D=M.length,L=x(w),$=L>=0?L:D+L;return $<0||$>=D?void 0:S(M,$)}})}),(function(T,O,a){var g=a(3),v=a(475).codeAt;g({target:"String",proto:!0},{codePointAt:function(x){return v(this,x)}})}),(function(T,O,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(I){return function(w,M){var D=p(x(w)),L=v(M),$=D.length,F,k;return L<0||L>=$?I?"":void 0:(F=b(D,L),F<55296||F>56319||L+1===$||(k=b(D,L+1))<56320||k>57343?I?y(D,L):F:I?S(D,L,L+2):(F-55296<<10)+(k-56320)+65536)}};T.exports={codeAt:E(!1),charAt:E(!0)}}),(function(T,O,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),I=a(36),w=v("".slice),M=Math.min,D=E("endsWith"),L=!I&&!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,V=U===void 0?X:M(x(U),X);return w(k,V-G.length,V)===G}})}),(function(T,O,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,O,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,O,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(w){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,O,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(I){return!!~S(y(x(this)),y(p(I)),arguments.length>1?arguments[1]:void 0)}})}),(function(T,O,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,I=0;I<E;I++){var w=y(S,I);if((w&63488)===55296&&(w>=56320||++I>=E||(y(S,I)&64512)!==56320))return!1}return!0}})}),(function(T,O,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(I){S(this,{type:b,string:v(I),index:0})},function(){var w=E(this),M=w.string,D=w.index,L;return D>=M.length?y(void 0,!0):(L=g(M,D),w.index+=L.length,y(L,!1))})}),(function(T,O,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),I=a(29),w=a(485),M=a(433),D=a(486),L=v("".indexOf);p("match",function($,F,k){return[function(U){var X=E(this),V=y(U)?I(U,$):void 0;return V?g(V,U,X):new RegExp(U)[$](S(X))},function(G){var U=x(this),X=S(G),V=k(F,U,X);if(V.done)return V.value;var j=S(M(U));if(!~L(j,"g"))return D(U,X);var Y=!!~L(j,"u")||!!~L(j,"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=w(X,b(U.lastIndex),Y)),Q++}return Q===0?null:Z}]})}),(function(T,O,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(I,w,M,D){var L=y(I),$=!x(function(){var U={};return U[L]=function(){return 7},""[I](U)!==7}),F=$&&!x(function(){var U=!1,X=/a/;if(I==="split"){var V={};V[S]=function(){return X},X={constructor:V,flags:""},X[L]=/./[L]}return X.exec=function(){return U=!0,null},X[L](""),!U});if(!$||!F||M){var k=/./[L],G=w(L,""[I],function(U,X,V,j,Y){var Z=X.exec;return Z===p||Z===E.exec?$&&!Y?{done:!0,value:g(k,X,V,j)}:{done:!0,value:g(U,V,X,j)}:{done:!1}});v(String.prototype,I,G[0]),v(E,L,G[1])}D&&b(E[L],"sham",!0)}}),(function(T,O,a){var g=a(475).charAt;T.exports=function(v,p,x){return p+(x&&g(v,p).length||1)}}),(function(T,O,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 I=S.exec;if(p(I)){var w=g(I,S,E);return w!==null&&v(w),w}if(x(S)==="RegExp")return g(y,S,E);throw new b("RegExp#exec called on incompatible receiver")}}),(function(T,O,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),I=a(46),w=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),V=a(486),j=a(51),Y=a(36),Z=G("matchAll"),Q="RegExp String",K=Q+" Iterator",tt=j.set,nt=j.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=V(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=I(this),Ft=E(Ct),Lt=U(Tt,RegExp),Pt=E(L(Tt)),pt,mt,wt;return pt=new Lt(Lt===RegExp?Tt.source:Tt,Pt),mt=!!~st(Pt,"g"),wt=!!~st(Pt,"u")||!!~st(Pt,"v"),pt.lastIndex=S(Tt.lastIndex),new gt(pt,Ft,mt,wt)};g({target:"String",proto:!0,forced:ht},{matchAll:function(Tt){var Ft=b(this),Lt,Pt,pt,mt;if(w(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,O,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,O,a){var g=a(28);T.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(g)}),(function(T,O,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,O,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(w){var M=p(x(w).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,O,a){var g=a(3),v=a(248);g({target:"String",proto:!0},{repeat:v})}),(function(T,O,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),I=a(61),w=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"),V=Math.max,j=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"),wt;mt&&(wt=!!~Q(Pt,"u")||!!~Q(Pt,"v"),Tt.lastIndex=0);for(var Bt=[],Qt;Qt=G(Tt,Ft),!(Qt===null||(Z(Bt,Qt),!mt));){var Ot=M(Qt[0]);Ot===""&&(Tt.lastIndex=L(Ft,w(Tt.lastIndex),wt))}for(var Wt="",ae=0,pe=0;pe<Bt.length;pe++){Qt=Bt[pe];for(var oe=M(Qt[0]),de=V(j(I(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,O,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(I,w,M,D,L,$){var F=M+I.length,k=D.length,G=E;return L!==void 0&&(L=v(L),G=S),y($,G,function(U,X){var V;switch(x(X,0)){case"$":return"$";case"&":return I;case"`":return b(w,0,M);case"'":return b(w,F);case"<":V=L[b(X,1,-1)];break;default:var j=+X;if(j===0)return U;if(j>k){var Y=p(j/10);return Y===0?U:Y<=k?D[Y-1]===void 0?x(X,1):D[Y-1]+x(X,1):U}V=D[j-1]}return V===void 0?"":V})}}),(function(T,O,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),I=a(29),w=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(j,Y){var Z=x(this),Q,K,tt,nt,rt,it,st,ct,ht,gt,yt=0,Ct="";if(b(j)){if(Q=S(j),Q&&(K=E(x(w(j))),!~k(K,"g")))throw new F("`.replaceAll` does not allow non-global regexes");if(tt=I(j,$),tt)return v(tt,j,Z,Y);if(L&&Q)return G(E(Z),j,Y)}for(nt=E(Z),rt=E(j),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,O,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),I=a(486);v("search",function(w,M,D){return[function($){var F=y(this),k=x($)?E($,w):void 0;return k?g(k,$,F):new RegExp($)[w](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=I($,F);return b($.lastIndex,G)||($.lastIndex=G),U===null?-1:U.index}]})}),(function(T,O,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),I=a(64),w=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),V=v("".slice),j=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,w(ct),it,st)},function(rt,it){var st=x(this),ct=w(rt);if(!Z){var ht=tt(nt,st,ct,it,nt!==K);if(ht.done)return ht.value}var gt=S(st,RegExp),yt=w(D(st)),Ct=!!~j(yt,"u")||!!~j(yt,"v");k?~j(yt,"g")||(yt+="g"):~j(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?V(ct,Pt):ct),wt;if(mt===null||(wt=U(I(Tt.lastIndex+(k?Pt:0)),ct.length))===Lt)Pt=E(ct,Pt,Ct);else{if(X(pt,V(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=wt}}return X(pt,V(ct,Lt)),pt}]},Z||!Y,k)}),(function(T,O,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),I=a(36),w=v("".slice),M=Math.min,D=E("startsWith"),L=!I&&!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 w(k,U,U+G.length)===G}})}),(function(T,O,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,I=!"".substr||"ab".substr(-1)!=="b";g({target:"String",proto:!0,forced:I},{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,O,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),I=p("".charCodeAt),w=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=I(F,U);(X&63488)!==55296?G[U]=E(F,U):X>=56320||U+1>=k||(I(F,U+1)&64512)!==56320?G[U]=D:(G[U]=E(F,U),G[++U]=E(F,U))}return w(G,"")}})}),(function(T,O,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,O,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,O,a){a(504);var g=a(3),v=a(505);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==v},{trimEnd:v})}),(function(T,O,a){var g=a(3),v=a(505);g({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==v},{trimRight:v})}),(function(T,O,a){var g=a(325).end,v=a(502);T.exports=v("trimEnd")?function(){return g(this)}:"".trimEnd}),(function(T,O,a){a(507);var g=a(3),v=a(508);g({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==v},{trimStart:v})}),(function(T,O,a){var g=a(3),v=a(508);g({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==v},{trimLeft:v})}),(function(T,O,a){var g=a(325).start,v=a(502);T.exports=v("trimStart")?function(){return g(this)}:"".trimStart}),(function(T,O,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,O,a){var g=a(14),v=a(16),p=a(68),x=/"/g,y=g("".replace);T.exports=function(b,S,E,I){var w=p(v(b)),M="<"+S;return E!==""&&(M+=" "+E+'="'+y(p(I),x,""")+'"'),M+">"+w+"</"+S+">"}}),(function(T,O,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,O,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,O,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,O,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,O,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,O,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,O,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,O,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,O,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,O,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,O,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,O,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,O,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,O,a){var g=a(525);g("Float32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,O,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),I=a(11),w=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),V=a(71),j=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,wt=b.NATIVE_ARRAY_BUFFER_VIEWS,Bt=b.TYPED_ARRAY_TAG,Qt=b.TypedArray,Ot=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 j(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)?I(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?(wt||(it.f=Pe,rt.f=Ee,oe(Ot,"buffer"),oe(Ot,"byteOffset"),oe(Ot,"byteLength"),oe(Ot,"length")),g({target:"Object",stat:!0,forced:!wt},{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,nn="set"+he,Ht=v[ne],ee=Ht,ve=ee&&ee.prototype,se={},we=function(Mt,$t){var qt=gt(Mt);return qt.view[re]($t*Vt+qt.byteOffset,!0)},an=function(Mt,$t,qt){var Nt=gt(Mt);Nt.view[nn]($t*Vt+Nt.byteOffset,Ge?$(qt):qt,!0)},It=function(Mt,$t){Tt(Mt,$t,{get:function(){return we(this,$t)},set:function(qt){return an(this,$t,qt)},enumerable:!0})};wt?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||w(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=V(Ot)),ve.constructor!==ee&&w(ve,"constructor",ee),Ct(ve).TypedArrayConstructor=ee,Bt&&w(ve,Bt,ne);var Xt=ee!==Ht;se[ne]=ee,g({global:!0,constructor:!0,forced:Xt,sham:!wt},se),ae in ee||w(ee,ae,Vt),ae in ve||w(ve,ae,Vt),tt(ne)}):T.exports=function(){}}),(function(T,O,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,O,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 O=Math.floor;T.exports=function(a){var g=+a;if(g!==g||g<=0)return 0;if(g>=255)return 255;var v=O(g);return v+.5<g?v+1:g<v+.5||v%2===0?v:v+1}}),(function(T,O,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),I=a(137),w=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($),V=E(X),j,Y,Z,Q,K,tt,nt,rt;if(V&&!I(V))for(nt=S(X,V),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=w(Z),j=0;Y>j;j++)K=U?G(X[j],j):X[j],Z[j]=Q?D(K):+K;return Z}}),(function(T,O,a){var g=a(69);T.exports=function(v){var p=g(v);return p==="BigInt64Array"||p==="BigUint64Array"}}),(function(T,O,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,O,a){var g=a(525);g("Float64",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,O,a){var g=a(525);g("Int8",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,O,a){var g=a(525);g("Int16",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,O,a){var g=a(525);g("Int32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,O,a){var g=a(525);g("Uint8",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,O,a){var g=a(525);g("Uint8",function(v){return function(x,y,b){return v(this,x,y,b)}},!0)}),(function(T,O,a){var g=a(525);g("Uint16",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,O,a){var g=a(525);g("Uint32",function(v){return function(x,y,b){return v(this,x,y,b)}})}),(function(T,O,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),I=v(E),w=p(S),M=w>=0?w:I+w;return M<0||M>=I?void 0:E[M]})}),(function(T,O,a){var g=a(14),v=a(223),p=a(151),x=g(p),y=v.aTypedArray,b=v.exportTypedArrayMethod;b("copyWithin",function(E,I){return x(y(this),E,I,arguments.length>2?arguments[2]:void 0)})}),(function(T,O,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,O,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,I=g.exportTypedArrayMethod,w=b("".slice),M=S(function(){var D=0;return new Int8Array(2).fill({valueOf:function(){return D++}}),D!==1});I("fill",function(L){var $=arguments.length;E(this);var F=w(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,O,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,O,a){var g=a(204),v=a(223).getTypedArrayConstructor;T.exports=function(p,x){return g(v(p),x)}}),(function(T,O,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,O,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,O,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,O,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,O,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,O,a){var g=a(526),v=a(223).exportTypedArrayStaticMethod,p=a(529);v("from",p,g)}),(function(T,O,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,O,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,O,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,I=p(y.values),w=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 I(D(this))};L("entries",function(){return M(D(this))},F),L("keys",function(){return w(D(this))},F),L("values",G,F||!k,{name:"values"}),L(S,G,F||!k,{name:"values"})}),(function(T,O,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,O,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,O,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,O,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,O,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,O,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,O,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),I=0,w;I<E;)w=b[I],b[I++]=b[--S],b[S]=w;return b})}),(function(T,O,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,I=g.Int8Array,w=I&&I.prototype,M=w&&w.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 I(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 V=this.length,j=x(X),Y=0;if(j+U>V)throw new E("Wrong length");for(;Y<j;)this[U+Y]=X[Y++]},!$||F)}),(function(T,O,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(I,w){for(var M=p(x(this),I,w),D=y(this),L=0,$=M.length,F=new D($);$>L;)F[L]=M[L++];return F},S)}),(function(T,O,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,O,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),I=a(27),w=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(I)return I<74;if(S)return S<67;if(E)return!0;if(w)return w<602;var U=new L(516),X=Array(516),V,j;for(V=0;V<516;V++)j=V%4,U[V]=515-V,X[V]=V-2*j+3;for($(U,function(Y,Z){return(Y/4|0)-(Z/4|0)}),V=0;V<516;V++)if(U[V]!==X[V])return!0}),G=function(U){return function(X,V){return U!==void 0?+U(X,V)||0:V!==V?X!==X?0:-1:X!==X?1:X===0&&V===0?1/X>0?1/V>0?0:1:1/V>0?-1:0:X>V?1:X<V?-1:0}};D("sort",function(X){return X!==void 0&&x(X),k?$(this,X):y(M(this),G(X))},!k||F)}),(function(T,O,a){var g=a(223),v=a(64),p=a(60),x=g.aTypedArray,y=g.getTypedArrayConstructor,b=g.exportTypedArrayMethod;b("subarray",function(E,I){var w=x(this),M=w.length,D=p(E,M),L=y(w);return new L(w.buffer,w.byteOffset+D*w.BYTES_PER_ELEMENT,v((I===void 0?M:p(I,M))-D))})}),(function(T,O,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,I=[].toLocaleString,w=!!b&&x(function(){I.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(I,w?y(S(this)):S(this),y(arguments))},M)}),(function(T,O,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),I=new(y(S))(E),w=0;w<E;w++)I[w]=S[E-w-1];return I})}),(function(T,O,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(w){w!==void 0&&p(w);var M=y(this),D=x(b(M),M);return E(D,w)})}),(function(T,O,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 I=b.toString!==S;g("toString",S,I)}),(function(T,O,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,I=RangeError,w=(function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(D){return D===8}})(),M=w&&(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 I("Incorrect index");for(var X=new(S($))(F),V=0;V<F;V++)X[V]=V===G?U:$[V];return X},!w||M)}),(function(T,O,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 I=x(E,arguments.length>1?arguments[1]:void 0,null,9007199254740991);return p(y,I.bytes)}})}),(function(T,O,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),I=b.c2i,w=b.c2iUrl,M=g.SyntaxError,D=g.TypeError,L=v("".charAt),$=function(G,U){for(var X=G.length;U<X;U++){var V=L(G,U);if(V!==" "&&V!==" "&&V!==`
|
|
30
|
+
`&&V!=="\f"&&V!=="\r")break}return U},F=function(G,U,X){var V=G.length;V<4&&(G+=V===2?"AA":"A");var j=(U[L(G,0)]<<18)+(U[L(G,1)]<<12)+(U[L(G,2)]<<6)+U[L(G,3)],Y=[j>>16&255,j>>8&255,j&255];if(V===2){if(X&&Y[1]!==0)throw new M("Extra bits");return[Y[0]]}if(V===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 V=U.length,j=0;j<V;j++)G[X+j]=U[j];return X+V};T.exports=function(G,U,X,V){x(G),p(U);var j=S(U)==="base64"?I:w,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(V)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,j,!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,j,Y==="strict"),K),tt=Z;break}if(!y(j,it))throw new M("Unexpected character");var st=V-K;if(st===1&&nt.length===2||st===2&&nt.length===3||(nt+=it,nt.length===4&&(K=k(Q,F(nt,j,!1),K),nt="",tt=rt,K===V)))break}return{bytes:Q,read:tt,written:K}}}),(function(T,O,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 O="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",a=O+"+/",g=O+"-_",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 O=TypeError;T.exports=function(a){var g=a&&a.alphabet;if(g===void 0||g==="base64"||g==="base64url")return g||"base64";throw new O("Incorrect `alphabet` option")}}),(function(T,O,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,O,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 I=S.length;if(I%2!==0)throw new x("String should be an even number of characters");for(var w=E?y(E.length,I/2):I/2,M=E||new p(w),D=b(S,/.{2}/g),L=0;L<w;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,O,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 I=p(E,arguments.length>1?arguments[1]:void 0,this,this.length);return{read:I.read,written:I.written}}})}),(function(T,O,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,O,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(I){return!0}}v.Uint8Array&&g({target:"Uint8Array",proto:!0,forced:S()},{setFromHex:function(I){x(this),p(I),y(this.buffer);var w=b(I,this).read;return{read:w,written:w/2}}})}),(function(T,O,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),I=S.i2c,w=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"?I:w,U=!!k&&!!k.omitPadding;b(this.buffer);for(var X="",V=0,j=F.length,Y,Z=function(Q){return M(G,Y>>6*Q&63)};V+2<j;V+=3)Y=(F[V]<<16)+(F[V+1]<<8)+F[V+2],X+=Z(3)+Z(2)+Z(1)+Z(0);return V+2===j?(Y=(F[V]<<16)+(F[V+1]<<8),X+=Z(3)+Z(2)+Z(1)+(U?"":"=")):V+1===j&&(Y=F[V]<<16,X+=Z(3)+Z(2)+(U?"":"==")),X}})}),(function(T,O,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,I=v.Uint8Array,w=!I||!I.prototype.toHex||!(function(){try{var M=new I([255,255,255,255,255,255,255,255]);return M.toHex()==="ffffffffffffffff"}catch(D){return!1}})();I&&g({target:"Uint8Array",proto:!0,forced:w},{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,O,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,I=/^[\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(I,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,O,a){a(586)}),(function(T,O,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),I=a(51).enforce,w=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,V,j=function(it){return function(){return it(this,arguments.length?arguments[0]:void 0)}},Y=b("WeakMap",j,S),Z=Y.prototype,Q=p(Z.set),K=function(){return g&&w(function(){var it=G([]);return Q(new Y,it,1),!F(it)})};if(M)if(X){V=S.getConstructor(j,"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=I(this);return st.frozen||(st.frozen=new V),tt(this,it)||st.frozen.delete(it)}return tt(this,it)},has:function(st){if(E(st)&&!$(st)){var ct=I(this);return ct.frozen||(ct.frozen=new V),nt(this,st)||ct.frozen.has(st)}return nt(this,st)},get:function(st){if(E(st)&&!$(st)){var ct=I(this);return ct.frozen||(ct.frozen=new V),nt(this,st)?rt(this,st):ct.frozen.get(st)}return rt(this,st)},set:function(st,ct){if(E(st)&&!$(st)){var ht=I(this);ht.frozen||(ht.frozen=new V),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,O,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),I=a(83),w=a(38),M=a(51),D=M.set,L=M.getterFor,$=I.find,F=I.findIndex,k=g([].splice),G=0,U=function(j){return j.frozen||(j.frozen=new X)},X=function(){this.entries=[]},V=function(j,Y){return $(j.entries,function(Z){return Z[0]===Y})};X.prototype={get:function(j){var Y=V(this,j);if(Y)return Y[1]},has:function(j){return!!V(this,j)},set:function(j,Y){var Z=V(this,j);Z?Z[1]=Y:this.entries.push([j,Y])},delete:function(j){var Y=F(this.entries,function(Z){return Z[0]===j});return~Y&&k(this.entries,Y,1),!!~Y}},T.exports={getConstructor:function(j,Y,Z,Q){var K=j(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&&w(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&&w(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,O,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,I){return y(this,E)?x(this,E):(b(this,E,I),I)}})}),(function(T,O,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,O,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,I=y.set,w=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:w},{getOrInsertComputed:function(D,L){if(b||p(this),x(D),v(L),E(this,D))return S(this,D);var $=L(D);return I(this,D,$),$}})}),(function(T,O,a){var g=a(589).has;T.exports=function(v){return g(v),v}}),(function(T,O,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,O,a){a(594)}),(function(T,O,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,O,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),I=a(575).c2i,w=/[^\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(w.exec),V=!!L&&!b(function(){return L("aGk=")!=="hi"}),j=V&&b(function(){return L(" ")!==""}),Y=V&&!b(function(){L("a")}),Z=V&&!b(function(){L()}),Q=V&&L.length!==1,K=!V||j||Y||Z||Q;g({global:!0,bind:!0,enumerable:!0,forced:K},{atob:function(nt){if(E(arguments.length,1),V&&!j&&!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(w,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)+I[ht]:I[ht],st++&3&&(Ct[Tt++]=F(255>>>(-2*st&6)));return U(Ct,"")}})}),(function(T,O,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),I=a(575).i2c,w=p("btoa"),M=Array,D=x([].join),L=x("".charAt),$=x("".charCodeAt),F=!!w&&!b(function(){return w("hi")!=="aGk="}),k=F&&!b(function(){w()}),G=F&&b(function(){return w(null)!=="bnVsbA=="}),U=F&&w.length!==1;g({global:!0,bind:!0,enumerable:!0,forced:!F||k||G||U},{btoa:function(V){if(E(arguments.length,1),F)return y(w,v,S(V));for(var j=S(V),Y=new M((j.length+2)/3<<2),Z=0,Q=0,K=I,tt,nt;L(j,Q)||(K="=",Q%1);){if(nt=$(j,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,O,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(I){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,O,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,O,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"),I=x.values,w=function(D,L){if(D){if(D[E]!==I)try{y(D,E,I)}catch(F){D[E]=I}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)w(g[M]&&g[M].prototype,M);w(p,"DOMTokenList")}),(function(T,O,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),I=a(77),w=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),V="DOMException",j="DATA_CLONE_ERR",Y=v("Error"),Z=v(V)||(function(){try{var Ot=v("MessageChannel")||p("worker_threads").MessageChannel;new Ot().port1.postMessage(new WeakMap)}catch(Wt){if(Wt.name===j&&Wt.code===25)return Wt.constructor}})(),Q=Z&&Z.prototype,K=Y.prototype,tt=G.set,nt=G.getterFor(V),rt="stack"in new Y(V),it=function(Ot){return w(F,Ot)&&F[Ot].m?F[Ot].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:V,name:pe,message:ae,code:oe}),U||(this.name=pe,this.message=ae,this.code=oe),rt){var de=new Y(ae);de.name=V,S(this,"stack",b(1,k(de.stack,1)))}},ct=st.prototype=y(K),ht=function(Ot){return{enumerable:!0,configurable:!0,get:Ot}},gt=function(Ot){return ht(function(){return nt(this)[Ot]})};U&&(I(ct,"code",gt("code")),I(ct,"message",gt("message")),I(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[j]!==25||Q[j]!==25,Lt=X?Ct||Tt||Ft:yt;g({global:!0,constructor:!0,forced:Lt},{DOMException:Lt?st:Z});var Pt=v(V),pt=Pt.prototype;Ct&&(X||Z===Pt)&&E(pt,"toString",L),Tt&&U&&Z===Pt&&I(pt,"code",ht(function(){return it(D(this).name)}));for(var mt in F)if(w(F,mt)){var wt=F[mt],Bt=wt.s,Qt=b(6,wt.c);w(Pt,Bt)||S(Pt,Bt,Qt),w(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,O,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),I=a(124),w=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=I(st<1?void 0:arguments[0]),ht=I(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($),V="stack"in new k(1,2),j=k&&D&&Object.getOwnPropertyDescriptor(v,$),Y=!!j&&!(j.writable&&j.configurable),Z=X&&!Y&&!V;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 w)if(b(w,tt)){var nt=w[tt],rt=nt.s;b(Q,rt)||y(Q,rt,x(6,nt.c))}}}),(function(T,O,a){var g=a(23),v=a(82),p="DOMException";v(g(p),p)}),(function(T,O,a){a(606),a(607)}),(function(T,O,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,O,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,O,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,I=/MSIE .\./.test(y)||x==="BUN"&&(function(){var w=g.Bun.version.split(".");return w.length<3||w[0]==="0"&&(w[1]<3||w[1]==="3"&&w[2]==="0")})();T.exports=function(w,M){var D=M?2:1;return I?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?w(U,$):w(U)}:w}}),(function(T,O,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(w){y(arguments.length,1),p(x(w))}})}),(function(T,O,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(w){if(this!==v)throw new y("Illegal invocation");b(v,"self",{value:w,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else g({global:!0,simple:!0,forced:S},{self:v})}catch(I){}}),(function(T,O,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),I=a(89),w=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),V=a(383),j=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,wt=x("Object","keys"),Bt=y([].push),Qt=y((!0).valueOf),Ot=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)},nn=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,j(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=nn(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=nn(It,Mt);break;case"ImageData":try{Nt=new ImageData(se(It.data,Xt),It.width,It.height,{colorSpace:It.colorSpace})}catch(ie){Nt=nn(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(Ot(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=wt(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},we=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,I(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},an=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=V(arguments.length,1)>1&&!w(arguments[1])?$(arguments[1]):void 0,$t=Mt?Mt.transfer:void 0,qt,Nt;$t!==void 0&&(qt=new Ct,Nt=we($t,qt));var be=se(Xt,qt);return Nt&&an(Nt),be}})}),(function(T,O,a){a(613),a(614)}),(function(T,O,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,O,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,O,a){a(616)}),(function(T,O,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),I=a(215),w=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),V=a(51),j=V.set,Y=V.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),wt=b([].unshift),Bt="Invalid authority",Qt="Invalid scheme",Ot="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,nn=function(St){var kt=Pt(St,"."),At,vt;if(kt[kt.length-1]===""){if(kt.length===1)return!1;kt.length--}return At=kt[kt.length-1],ht(Pe,At)?!0:ht(de,At)?(vt=pt(At,2),vt===""||!!ht(Ee,vt)):!1},Ht=function(St){var kt=Pt(St,"."),At,vt,zt,Me,ue,Ut,jt;if(kt.length&&kt[kt.length-1]===""&&kt.length--,At=kt.length,At>4)return null;for(vt=[],zt=0;zt<At;zt++){if(Me=kt[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==="")Ut=0;else{if(!ht(ue===10?Pe:ue===8?Re:Ee,Me))return null;Ut=rt(Me,ue)}Tt(vt,Ut)}for(zt=0;zt<At;zt++)if(Ut=vt[zt],zt===At-1){if(Ut>=st(256,5-At))return null}else if(Ut>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 kt=[0,0,0,0,0,0,0,0],At=0,vt=null,zt=0,Me,ue,Ut,jt,An,hn,Dt,sn=function(){return ct(St,zt)};if(sn()===":"){if(ct(St,1)!==":")return;zt+=2,At++,vt=At}for(;sn();){if(At===8)return;if(sn()===":"){if(vt!==null)return;zt++,At++,vt=At;continue}for(Me=ue=0;ue<4&&ht(Ee,sn());)Me=Me*16+rt(sn(),16),zt++,ue++;if(sn()==="."){if(ue===0||(zt-=ue,At>6))return;for(Ut=0;sn();){if(jt=null,Ut>0)if(sn()==="."&&Ut<4)zt++;else return;if(!ht(oe,sn()))return;for(;ht(oe,sn());){if(An=rt(sn(),10),jt===null)jt=An;else{if(jt===0)return;jt=jt*10+An}if(jt>255)return;zt++}kt[At]=kt[At]*256+jt,Ut++,(Ut===2||Ut===4)&&At++}if(Ut!==4)return;break}else if(sn()===":"){if(zt++,!sn())return}else if(sn())return;kt[At++]=Me}if(vt!==null)for(hn=At-vt,At=7;At!==0&&hn>0;)Dt=kt[At],kt[At--]=kt[vt+hn-1],kt[vt+--hn]=Dt;else if(At!==8)return;return kt},ve=function(St){for(var kt=null,At=1,vt=null,zt=0,Me=0;Me<8;Me++)St[Me]!==0?(zt>At&&(kt=vt,At=zt),vt=null,zt=0):(vt===null&&(vt=Me),++zt);return zt>At?vt:kt},se=function(St){var kt,At,vt,zt;if(typeof St=="number"){for(kt=[],At=0;At<4;At++)wt(kt,St%256),St=it(St/256);return gt(kt,".")}if(typeof St=="object"){for(kt="",vt=ve(St),At=0;At<8;At++)zt&&St[At]===0||(zt&&(zt=!1),vt===At?(kt+=At?":":"::",zt=!0):(kt+=yt(St[At],16),At<7&&(kt+=":")));return"["+kt+"]"}return St},we={},an=M({},we,{" ":1,'"':1,"#":1,"<":1,">":1}),It=M({},an,{"'":1}),Xt=M({},we,{" ":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,kt){var At=$(St,0);return At>=32&&At<127&&!w(kt,St)?St:St==="'"&&w(kt,St)?"%27":nt(St)},Nt={ftp:21,file:null,http:80,https:443,ws:80,wss:443},be=function(St,kt){var At;return St.length===2&&ht(ae,ct(St,0))&&((At=ct(St,1))===":"||!kt&&At==="|")},Ve=function(St){var kt;return St.length>1&&be(pt(St,0,2))&&(St.length===2||(kt=ct(St,2))==="/"||kt==="\\"||kt==="?"||kt==="#")},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={},on={},fn={},mn={},Sn={},tr={},Cr={},Ti={},bi={},Si={},Ai={},mo={},Ei={},ra={},or={},xo={},Nr={},vr={},Ci=function(St,kt,At){var vt=k(St),zt,Me,ue;if(kt){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,kt,At){var vt=this,zt=kt||te,Me=0,ue="",Ut=!1,jt=!1,An=!1,hn,Dt,sn,pr;for(St=k(St),kt||(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(kt)return Qt;zt=Ce;continue}break;case ie:if(Dt&&ht(pe,Dt))ue+=mt(Dt);else if(Dt===":"){if(kt&&(vt.isSpecial()!==w(Nt,ue)||ue==="file"&&(vt.includesCredentials()||vt.port!==null)||vt.scheme==="file"&&vt.host===""))return;if(vt.scheme=ue,kt){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=on,Me++):(vt.cannotBeABaseURL=!0,Tt(vt.path,""),zt=xo)}else{if(kt)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 on: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==="@"){Ut&&(ue="%40"+ue),Ut=!0,sn=D(ue);for(var Ua=0;Ua<sn.length;Ua++){var Ii=sn[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(Ut&&ue==="")return Bt;Me-=D(ue).length+1,ue="",zt=Ti}else ue+=Dt;break;case Ti:case bi:if(kt&&vt.scheme==="file"){zt=Ei;continue}else if(Dt===":"&&!jt){if(ue==="")return Ot;if(kt===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 Ot;if(kt&&ue===""&&(vt.includesCredentials()||vt.port!==null))return;if(pr=vt.parseHost(ue),pr)return pr;if(ue="",zt=ra,kt)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()||kt){if(ue!==""){var jn=rt(ue,10);if(jn>65535)return Wt;vt.port=vt.isSpecial()&&jn===Nt[vt.scheme]?null:jn,ue=""}if(kt)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(!kt&&be(ue))zt=or;else if(ue===""){if(vt.host="",kt)return;zt=ra}else{if(pr=vt.parseHost(ue),pr)return pr;if(vt.host==="localhost"&&(vt.host=""),kt)return;ue="",zt=ra}continue}else ue+=Dt;break;case ra:if(vt.isSpecial()){if(zt=or,Dt!=="/"&&Dt!=="\\")continue}else if(!kt&&Dt==="?")vt.query="",zt=Nr;else if(!kt&&Dt==="#")vt.fragment="",zt=vr;else if(Dt!==re&&(zt=or,Dt!=="/"))continue;break;case or:if(Dt===re||Dt==="/"||Dt==="\\"&&vt.isSpecial()||!kt&&(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,we));break;case Nr:!kt&&Dt==="#"?(vt.fragment="",zt=vr):Dt!==re&&(vt.query+=qt(Dt,vt.isSpecial()?It:an));break;case vr:Dt!==re&&(vt.fragment+=qt(Dt,Xt));break}Me++}},parseHost:function(St){var kt,At,vt;if(ct(St,0)==="["){if(ct(St,St.length-1)!=="]"||(kt=ee(pt(St,1,-1)),!kt))return Ot;this.host=kt}else if(this.isSpecial()){if(St=F(St),ht(he,St))return Ot;if(nn(St)){if(kt=Ht(St),kt===null)return Ot;this.host=kt}else this.host=St}else{if(ht(ye,St))return Ot;for(kt="",At=D(St),vt=0;vt<At.length;vt++)kt+=qt(At[vt],we);this.host=kt}},cannotHaveUsernamePasswordPort:function(){return this.host===null||this.host===""||this.cannotBeABaseURL||this.scheme==="file"},includesCredentials:function(){return this.username!==""||this.password!==""},isSpecial:function(){return w(Nt,this.scheme)},shortenPath:function(){var St=this.path,kt=St.length;kt&&(this.scheme!=="file"||kt!==1||!be(St[0],!0))&&St.length--},serialize:function(){var St=this,kt=St.scheme,At=St.username,vt=St.password,zt=St.host,Me=St.port,ue=St.path,Ut=St.query,jt=St.fragment,An=kt+":";return zt!==null?(An+="//",St.includesCredentials()&&(An+=At+(vt?":"+vt:"")+"@"),An+=se(zt),Me!==null&&(An+=":"+Me)):kt==="file"&&(An+="//"),zt===null&&!St.cannotBeABaseURL&&ue.length>1&&ue[0]===""&&(An+="/."),An+=St.cannotBeABaseURL?ue[0]:ue.length?"/"+gt(ue,"/"):"",Ut!==null&&(An+="?"+Ut),jt!==null&&(An+="#"+jt),An},setHref:function(St){var kt=this.parse(St);if(kt)throw new tt(kt);this.searchParams.update()},getOrigin:function(){var St=this.scheme,kt=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)+(kt!==null?":"+kt:"")},getProtocol:function(){return this.scheme+":"},setProtocol:function(St){this.parse(k(St)+":",te)},getUsername:function(){return this.username},setUsername:function(St){var kt=D(k(St));if(!this.cannotHaveUsernamePasswordPort()){this.username="";for(var At=0;At<kt.length;At++)this.username+=qt(kt[At],$t)}},getPassword:function(){return this.password},setPassword:function(St){var kt=D(k(St));if(!this.cannotHaveUsernamePasswordPort()){this.password="";for(var At=0;At<kt.length;At++)this.password+=qt(kt[At],$t)}},getHost:function(){var St=this.host,kt=this.port;return St===null?"":kt===null?se(St):se(St)+":"+kt},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(kt){var At=I(this,Pn),vt=U(arguments.length,1)>1?arguments[1]:void 0,zt=j(At,new Ci(kt,!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,kt){return{get:function(){return Y(this)[St]()},set:kt&&function(At){return Y(this)[kt](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,O,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"),I="";return b.pathname="c%20d",S.forEach(function(w,M){S.delete("b"),I+=M+w}),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"||I!=="a1c3"||new URL("https://x",void 0).host!=="x"})}),(function(T,O,a){var g=a(14),v=2147483647,p=36,x=1,y=26,b=38,S=700,E=72,I=128,w="-",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),V=g([].join),j=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?j(st,((gt&1023)<<10)+(yt&1023)+65536):(j(st,gt),ct--)}else j(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=I,gt=0,yt=E,Ct,Tt;for(Ct=0;Ct<it.length;Ct++)Tt=it[Ct],Tt<128&&j(st,U(Tt));var Ft=st.length,Lt=Ft;for(Ft&&j(st,w);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,wt=p;;){var Bt=wt<=yt?x:wt>=yt+y?y:wt-yt;if(mt<Bt)break;var Qt=mt-Bt,Ot=p-Bt;j(st,U(tt(Bt+Qt%Ot))),mt=G(Qt/Ot),wt+=p}j(st,U(tt(mt))),yt=nt(gt,pt,Lt===Ft),gt=0,Lt++}}gt++,ht++}return V(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],j(st,k(M,gt)?"xn--"+rt(gt):gt);return V(st,".")}}),(function(T,O,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),I=a(47),w=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),V=a(46),j=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,wt=v.TypeError,Bt=v.encodeURIComponent,Qt=String.fromCharCode,Ot=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},nn=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 on=nn(Be);if(on===0)Ce=Qt(Be);else{if(on===1||on>4){te+=Vt,ie++;continue}for(var fn=[Be],mn=1;mn<on&&(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!==on){te+=Vt;continue}var tr=Ht(fn);if(tr===null){for(var Cr=0;Cr<on;Cr++)te+=Vt;ie++;continue}else Ce=Ot(tr)}}te+=Ce,ie++}return te},ve=/[!'()~]|%20/g,se={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},we=function(Gt){return se[Gt]},an=function(Gt){return de(Bt(Gt),ve,we)},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&&(j(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,on,fn,mn,Sn;if(te)for(ie=K(Gt,te),Ce=ie.next;!(Be=y(Ce,ie)).done;){if(on=K(V(Be.value)),fn=on.next,(mn=y(fn,on)).done||(Sn=y(fn,on)).done||!y(fn,on).done)throw new wt("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,an(ie.key)+"="+an(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],on=Be===void 0?Be:Y(Be),fn=0;fn<ie.length;){var mn=ie[fn];mn.key===Ce&&(on===void 0||mn.value===on)?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],on=Be===void 0?Be:Y(Be),fn=0;fn<te.length;){var mn=te[fn++];if(mn.key===Ce&&(on===void 0||mn.value===on))return!0}return!1},set:function(_t,te){var ie=Ct(this);rt(arguments.length,2);for(var Ce=ie.entries,Be=!1,on=Y(_t),fn=Y(te),mn=0,Sn;mn<Ce.length;mn++)Sn=Ce[mn],Sn.key===on&&(Be?Pe(Ce,mn--,1):(Be=!0,Sn.value=fn));Be||oe(Ce,{key:on,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}),I($t,ct,$t.entries,{name:"entries"}),I($t,"toString",function(){return Ct(this).serialize()},{enumerable:!0}),S&&w($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(j(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,O,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()}),I=p(function(){return S.canParse.length!==1});g({target:"URL",stat:!0,forced:!E||I},{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,O,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 I=p(arguments.length,1),w=x(E),M=I<2||arguments[1]===void 0?void 0:x(arguments[1]);try{return new b(w,M)}catch(D){return null}}})}),(function(T,O,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,O,a){a(619)}),(function(T,O,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),I=v(b.forEach),w=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=[];I(this,function(j,Y){w(F,{key:Y,value:j})}),x(L,1);for(var k=p(D),G=p($),U=0,X=F.length,V;U<X;)V=F[U],E(this,V.key),U++;for(U=0;U<X;)V=F[U++],V.key===k&&V.value===G||S(this,V.key,V.value)},{enumerable:!0,unsafe:!0})}),(function(T,O,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),I=new y("a=1");(I.has("a",2)||!I.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,O,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,O,a){a.r(O),a.d(O,{bb:function(){return Tp},default:function(){return Tp}});var g={};a.r(g),a.d(g,{selection:function(){return _g},subchart:function(){return tv},zoom:function(){return sv}});var v={};a.r(v),a.d(v,{area:function(){return Ov},areaLineRange:function(){return Pv},areaSpline:function(){return Lv},areaSplineRange:function(){return Dv},areaStep:function(){return Fv},areaStepRange:function(){return Mv},bar:function(){return Nv},bubble:function(){return $v},candlestick:function(){return Xv},donut:function(){return Jv},funnel:function(){return ep},gauge:function(){return np},line:function(){return rp},pie:function(){return op},polar:function(){return lp},radar:function(){return up},scatter:function(){return fp},spline:function(){return ap},step:function(){return ip},treemap:function(){return yp}});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 I(t){return function(){return b(t.apply(this,arguments))}}function w(t){typeof t=="function"?t=I(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 V(t){return this.selectAll(t==null?U:X(typeof t=="function"?t:D(t)))}function j(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,R=l[u]=new Array(A),C=s[u]=new Array(A),P=c[u]=new Array(h);n(f,d,R,C,P,m,e);for(var z=0,N=0,B,W;z<A;++z)if(B=R[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 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",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 Ot(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=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?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 nn(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:nn)(t,e)):this.node()[t]}function ve(t){return t.trim().split(/^|\s+/)}function se(t){return t.classList||new we(t)}function we(t){this._node=t,this._names=ve(t.getAttribute("class")||"")}we.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 an(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(){an(this,t)}}function Mt(t){return function(){It(this,t)}}function $t(t,e){return function(){(e.apply(this,arguments)?an: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 on(){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=Ot(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*kt(){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:w,selectChild:k,selectChildren:V,filter:j,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:wt,attr:Pe,style:Vt,property:ee,classed:qt,text:Gt,html:Ce,raise:on,lower:mn,append:Ti,insert:Si,remove:mo,clone:or,datum:xo,on:Pn,dispatch:St,[Symbol.iterator]:kt};var ue=zt;function Ut(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,sn=3,pr=Dt+sn,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]},Sp=Math.sqrt(50),Ap=Math.sqrt(10),Ep=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>=Sp?10:o>=Ap?5:o>=Ep?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 Cp(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===Cp?t:Ip,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 Ip(){return 0}function Rp(t){return t===null?NaN:+t}function*rR(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,aR=mu.left,iR=_s(Rp).center;var Op=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 wi=.7,Ao=1/wi,Xa="\\s*([+-]?\\d+)\\s*",Oi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ir="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Pp=/^#([0-9a-f]{3,8})$/,Mp=new RegExp(`^rgb\\(${Xa},${Xa},${Xa}\\)$`),Lp=new RegExp(`^rgb\\(${Ir},${Ir},${Ir}\\)$`),Dp=new RegExp(`^rgba\\(${Xa},${Xa},${Xa},${Oi}\\)$`),Fp=new RegExp(`^rgba\\(${Ir},${Ir},${Ir},${Oi}\\)$`),Np=new RegExp(`^hsl\\(${Oi},${Ir},${Ir}\\)$`),$p=new RegExp(`^hsla\\(${Oi},${Ir},${Ir},${Oi}\\)$`),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:Bp,formatHsl:zp,formatRgb:bu,toString:bu});function Tu(){return this.rgb().formatHex()}function Bp(){return this.rgb().formatHex8()}function zp(){return Iu(this).formatHsl()}function bu(){return this.rgb().formatRgb()}function xa(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Pp.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=Mp.exec(t))?new Jn(e[1],e[2],e[3],1):(e=Lp.exec(t))?new Jn(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=Dp.exec(t))?Eo(e[1],e[2],e[3],e[4]):(e=Fp.exec(t))?Eo(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Np.exec(t))?Cu(e[1],e[2]/100,e[3]/100,1):(e=$p.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 Up(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?Up(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?wi:Math.pow(wi,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:kp,formatRgb:Eu,toString:Eu}));function Au(){return`#${Ta(this.r)}${Ta(this.g)}${Ta(this.b)}`}function kp(){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 Xp(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,Xp,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?wi:Math.pow(wi,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 wu(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 Gp(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 wu((n-r/e)*e,s,i,o,l)}}function Wp(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 wu((n-r/e)*e,i,o,s,l)}}var wo=(t=>()=>t);function Ou(t,e){return function(n){return t+n*e}}function Vp(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 oR(t,e){var n=e-t;return n?Ou(t,n>180||n<-180?n-360*Math.round(n/360):n):wo(isNaN(t)?e:t)}function jp(t){return(t=+t)==1?Pu:function(e,n){return n-e?Vp(e,n,t):wo(isNaN(e)?n:e)}}function Pu(t,e){var n=e-t;return n?Ou(t,n):wo(isNaN(t)?e:t)}var Oo=(function t(e){var n=jp(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 sR=Mu(Gp),lR=Mu(Wp);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 cR(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 Hp(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 Yp(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 Kp(t){return function(){return t}}function Zp(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]?Zp(c[0].x):Kp(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"?wo(e):(n==="number"?xr:n==="string"?(r=xa(e))?(e=r,Oo):Nu:e instanceof xa?Oo:e instanceof Date?Hp:Du(e)?Lu:Array.isArray(e)?Fu:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Yp:xr)(t,e)}function Jp(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Qp(t){return function(){return t}}function _p(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}:Qp(isNaN(e)?NaN:.5)}function qp(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function tm(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 em(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=Op(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=qp(t[0],t[h-1])),l=h>2?em:tm,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,_p),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=Jp,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 uR(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 nm=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Pi(t){if(!(e=nm.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 rm(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 am(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(ja(e)/3)))*3-ja(Math.abs(t)))}function im(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 om(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}function sm(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 lm(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:rm,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:lm,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 cm(t){var e=t.grouping===void 0||t.thousands===void 0?ku:im(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:om(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,R=d.sign,C=d.symbol,P=d.zero,z=d.width,N=d.comma,B=d.precision,W=d.trim,H=d.type;H==="n"?(N=!0,H="g"):Uu[H]||(B===void 0&&(B=12),W=!0,H="g"),(P||m==="0"&&A==="=")&&(P=!0,m="0",A="=");var J=(h&&h.prefix!==void 0?h.prefix:"")+(C==="$"?n:C==="#"&&/[boxX]/.test(H)?"0"+H.toLowerCase():""),q=(C==="$"?r:/[%p]/.test(H)?s:"")+(h&&h.suffix!==void 0?h.suffix:""),at=Uu[H],et=/[defgprs%]/.test(H);B=B===void 0?6:/[gprs]/.test(H)?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(H==="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=sm(lt)),bt&&+lt==0&&R!=="+"&&(bt=!1),ft=(bt?R==="("?R:l:R==="-"||R==="("?"":R)+ft,_=(H==="s"&&!isNaN(lt)&&Lo!==void 0?Gu[8+Lo/3]:"")+_+(bt&&R==="("?")":""),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),R=u((d=Pi(d),d.type="f",d),{suffix:Gu[8+m/3]});return function(C){return R(A*C)}}return{format:u,formatPrefix:f}}var Do,ol,Wu;um({thousands:",",grouping:[3],currency:["$",""]});function um(t){return Do=cm(t),ol=Do.format,Wu=Do.formatPrefix,Do}function fm(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,ja(e)-ja(t))+1}function dm(t){return Math.max(0,-ja(Math.abs(t)))}function hm(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=am(i,s))&&(r.precision=o),Wu(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=fm(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=dm(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 hm(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 gm(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=gm(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 vm(t){return-Math.log(-t)}function pm(t){return-Math.exp(-t)}function mm(t){return isFinite(t)?+("1e"+t):t<0?0:t}function xm(t){return t===10?mm:t===Math.E?Math.exp:e=>Math.pow(t,e)}function ym(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 Tm(t){const e=t(Zu,Ju),n=e.domain;let r=10,i,o;function s(){return i=ym(r),o=xm(r),n()[0]<0?(i=Qu(i),o=Qu(o),t(vm,pm)):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,R;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(R=h<0?A/o(-h):A*o(h),!(R<u)){if(R>f)break;P.push(R)}}else for(;h<=m;++h)for(A=r-1;A>=1;--A)if(R=h>0?A/o(-h):A*o(h),!(R<u)){if(R>f)break;P.push(R)}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=Tm(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 fR=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()),dR=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()),hR=fl.range,dl=Cn(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*sr)},(t,e)=>(e-t)/sr,t=>t.getUTCMinutes()),gR=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()),vR=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()),pR=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),mR=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),xR=$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)),yR=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),bm=Sa(2),Sm=Sa(3),Ha=Sa(4),Am=Sa(5),Em=Sa(6),TR=Bo.range,bR=zo.range,SR=bm.range,AR=Sm.range,ER=Ha.range,CR=Am.range,IR=Em.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),Cm=Aa(2),Im=Aa(3),Ya=Aa(4),Rm=Aa(5),wm=Aa(6),RR=Uo.range,wR=ko.range,OR=Cm.range,PR=Im.range,MR=Ya.range,LR=Rm.range,DR=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()),FR=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()),NR=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 $R=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 BR=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,R]=s[h/s[m-1][2]<s[m][2]/h?m-1:m];return A.every(R)}return[l,c]}const[Om,Pm]=ef(kr,pl,Uo,tf,gl,dl),[Mm,Lm]=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 Dm(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),R=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:nx,g:dx,G:gx,H:qm,I:tx,j:ex,L:cf,m:rx,M:ax,p:Zt,q:fe,Q:vf,s:pf,S:ix,u:ox,U:sx,V:lx,w:cx,W:ux,x:null,X:null,y:fx,Y:hx,Z:vx,"%":gf},B={a:me,A:xe,b:Te,B:Fe,c:null,d:ff,e:ff,f:yx,g:Ox,G:Mx,H:px,I:mx,j:xx,L:df,m:Tx,M:bx,p:Ie,q:ke,Q:vf,s:pf,S:Sx,u:Ax,U:Ex,V:Cx,w:Ix,W:Rx,x:null,X:null,y:wx,Y:Px,Z:Lx,"%":gf},W={a:et,A:ot,b:lt,B:ft,c:_,d:of,e:of,f:Zm,g:af,G:rf,H:sf,I:sf,j:jm,L:Km,m:Vm,M:Hm,p:at,q:Wm,Q:Qm,s:_m,S:Ym,u:zm,U:Um,V:km,w:Bm,W:Xm,x:dt,X:ut,y:af,Y:rf,Z:Gm,"%":Jm};N.x=H(n,N),N.X=H(r,N),N.c=H(e,N),B.x=H(n,B),B.X=H(r,B),B.c=H(e,B);function H(Jt,Ae){return function(Le){var Yt=[],dn=-1,qe=0,Dn=Jt.length,Fn,Se,Oe;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",(Oe=Ae[Fn])&&(Fn=Oe(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=R.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=H(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=H(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"},On=/^\s*\d+/,Fm=/^%/,Nm=/[\\^$*+?|[\]().{}]/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 $m(t){return t.replace(Nm,"\\$&")}function Di(t){return new RegExp("^(?:"+t.map($m).join("|")+")","i")}function Fi(t){return new Map(t.map((e,n)=>[e.toLowerCase(),n]))}function Bm(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function zm(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Um(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function km(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Xm(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function rf(t,e,n){var r=On.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function af(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Gm(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 Wm(t,e,n){var r=On.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Vm(t,e,n){var r=On.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=On.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function jm(t,e,n){var r=On.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=On.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Hm(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ym(t,e,n){var r=On.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Km(t,e,n){var r=On.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Zm(t,e,n){var r=On.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Jm(t,e,n){var r=Fm.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Qm(t,e,n){var r=On.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function _m(t,e,n){var r=On.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 qm(t,e){return Qe(t.getHours(),e,2)}function tx(t,e){return Qe(t.getHours()%12||12,e,2)}function ex(t,e){return Qe(1+Mi.count(Ur(t),t),e,3)}function cf(t,e){return Qe(t.getMilliseconds(),e,3)}function nx(t,e){return cf(t,e)+"000"}function rx(t,e){return Qe(t.getMonth()+1,e,2)}function ax(t,e){return Qe(t.getMinutes(),e,2)}function ix(t,e){return Qe(t.getSeconds(),e,2)}function ox(t){var e=t.getDay();return e===0?7:e}function sx(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 lx(t,e){return t=uf(t),Qe(Ha.count(Ur(t),t)+(Ur(t).getDay()===4),e,2)}function cx(t){return t.getDay()}function ux(t,e){return Qe(zo.count(Ur(t)-1,t),e,2)}function fx(t,e){return Qe(t.getFullYear()%100,e,2)}function dx(t,e){return t=uf(t),Qe(t.getFullYear()%100,e,2)}function hx(t,e){return Qe(t.getFullYear()%1e4,e,4)}function gx(t,e){var n=t.getDay();return t=n>=4||n===0?Ha(t):Ha.ceil(t),Qe(t.getFullYear()%1e4,e,4)}function vx(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 px(t,e){return Qe(t.getUTCHours(),e,2)}function mx(t,e){return Qe(t.getUTCHours()%12||12,e,2)}function xx(t,e){return Qe(1+$o.count(kr(t),t),e,3)}function df(t,e){return Qe(t.getUTCMilliseconds(),e,3)}function yx(t,e){return df(t,e)+"000"}function Tx(t,e){return Qe(t.getUTCMonth()+1,e,2)}function bx(t,e){return Qe(t.getUTCMinutes(),e,2)}function Sx(t,e){return Qe(t.getUTCSeconds(),e,2)}function Ax(t){var e=t.getUTCDay();return e===0?7:e}function Ex(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 Cx(t,e){return t=hf(t),Qe(Ya.count(kr(t),t)+(kr(t).getUTCDay()===4),e,2)}function Ix(t){return t.getUTCDay()}function Rx(t,e){return Qe(ko.count(kr(t)-1,t),e,2)}function wx(t,e){return Qe(t.getUTCFullYear()%100,e,2)}function Ox(t,e){return t=hf(t),Qe(t.getUTCFullYear()%100,e,2)}function Px(t,e){return Qe(t.getUTCFullYear()%1e4,e,4)}function Mx(t,e){var n=t.getUTCDay();return t=n>=4||n===0?Ya(t):Ya.ceil(t),Qe(t.getUTCFullYear()%1e4,e,4)}function Lx(){return"+0000"}function gf(){return"%"}function vf(t){return+t}function pf(t){return Math.floor(+t/1e3)}var Ka,yl,mf,Tl,xf;Dx({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 Dx(t){return Ka=Dm(t),yl=Ka.format,mf=Ka.parse,Tl=Ka.utcFormat,xf=Ka.utcParse,Ka}function Fx(t){return new Date(t)}function Nx(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"),R=u("%I:%M"),C=u("%I %p"),P=u("%a %d"),z=u("%b %d"),N=u("%B"),B=u("%Y");function W(H){return(c(H)<H?m:l(H)<H?A:s(H)<H?R:o(H)<H?C:r(H)<H?i(H)<H?P:z:n(H)<H?N:B)(H)}return f.invert=function(H){return new Date(d(H))},f.domain=function(H){return arguments.length?h(Array.from(H,Nx)):h().map(Fx)},f.ticks=function(H){var J=h();return t(J[0],J[J.length-1],H==null?10:H)},f.tickFormat=function(H,J){return J==null?W:u(J)},f.nice=function(H){var J=h();return(!H||typeof H.range!="function")&&(H=e(J[0],J[J.length-1],H==null?10:H)),H?h(Ku(J,H)):f},f.copy=function(){return Po(f,bl(t,e,n,r,i,o,s,l,c,u))},f}function $x(){return Va.apply(bl(Mm,Lm,Ur,vl,Bo,Mi,hl,fl,ba,yl).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Bx(){return Va.apply(bl(Om,Pm,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",ln=t=>typeof t!="undefined",Ea=t=>typeof t=="boolean",zx=t=>Math.ceil(t/10)*10,Za=t=>Math.ceil(t)+.5,Ca=t=>t[1]-t[0],Qn=t=>typeof t=="object",Ux=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)&&Ux(t)||ge(t)&&isNaN(t),vn=t=>!lr(t),tn=t=>Array.isArray(t),je=t=>t&&!(t!=null&&t.nodeType)&&Qn(t)&&!tn(t);function kx(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function Xx(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=kx(),He=ce==null?void 0:ce.document,[Gx,zR,yf,Wx]=Xx(ce),Vx=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"]),jx=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;Vx.forEach(t=>Xo.set(t.toLowerCase(),t));const Go=new Map;jx.forEach(t=>Go.set(t.toLowerCase(),t));const Hx=new Set(["http:","https:","mailto:"]),Yx=new Set(["href","src","xlink:href"]),Kx=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,Zx=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,Jx=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,Tf=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,bf=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,Qx=["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?Hx.has(r[0]):!0}function _x(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 Qx)if(i.includes(o))return null;return t}const qx={'"':""","'":"'","`":"`"},ty=/["'`]/g;function Al(t){return t.replace(ty,e=>qx[e])}function ey(t,e,n=!1){if(Yx.has(t))return Sf(e)?n?Al(e):e:null;if(t==="style"){const i=_x(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 ny(t){const e=t.match(Kx);return e?e[1].toLowerCase():null}function ry(t){const e=ny(t);return e!==null&&Xo.has(e)}function ay(t){var e,n,r;const i=t.match(Zx);if(i){const R=i[1].toLowerCase();return`</${(e=Xo.get(R))!=null?e:R}>`}const o=t.match(Jx);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 R=h[1].toLowerCase(),C=h[2],P=h[3],z=h[4];if(R.startsWith("on"))continue;const N=(r=Go.get(R))!=null?r:R;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(R)&&d.push(N);continue}if(Go.has(R)){const J=ey(R,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("<")?ry(e)?ay(e):e.replace(/</g,"<"):e.slice(0,-1)+">")}var iy=Object.defineProperty,Af=Object.getOwnPropertySymbols,oy=Object.prototype.hasOwnProperty,sy=Object.prototype.propertyIsEnumerable,Ef=(t,e,n)=>e in t?iy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Cf=(t,e)=>{for(var n in e||(e={}))oy.call(e,n)&&Ef(t,n,e[n]);if(Af)for(var n of Af(e))sy.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&&ln(r)&&e(r,n)}}function ia(t,e,n){return ln(t[e])?t[e]:n}function ly(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 cy(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 uy(...t){const e=n=>{if(tn(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){tn(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 fy(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]=tn(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 dy=0;function Rr(t=!0){const e=++dy;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 wf(t,e){e()===!1?Gx(()=>wf(t,e)):t()}function Of(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:$x,utc:Bx}[t]();return r.type=t,/_?log/.test(t)&&r.clamp(!0),r.range([e!=null?e:0,n!=null?n:1])}var hy={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:R,height:C,width2:P,height2:z,hasAxis:N,hasTreemap:B}}=c;if(N){const W=f.axis_rotated,H=c.getResettedPadding(1),J={x:W?H:0,y:W?0:C,subX:W?1:0,subY:W?0:z},q={x:W?C:R,y:W?R:H,subX:W?C:R,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 gy(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 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 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=gy(r,o[0],h),A=vy(r,o[1],h),R={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:R}),R}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 UR(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 wa(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 wa(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 py(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 wl(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 wl(t)?t.scale.zoom:t.scale.x}function my(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 xy(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 yy(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){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 by(t,e){const{values:n,comparable:r}=e;if(!wl(t))return n;const i=Lf(t);if(!i||r.length!==n.length||!Number.isFinite(r[0]))return n.filter(f=>my(t,f));const[o,s]=i;let l=Uf(r,o),c=yy(r,s);const u=f=>{const d=Uf(r,f);let h=-1,m=1/0;for(const A of[d-1,d]){const R=r[A],C=Math.abs(R-f);C<m&&(m=C,h=A)}h>-1&&h<r.length&&m<=xy(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 Sy(t,e){return typeof t=="function"?`fn:${e}`:Array.isArray(t)?t.map(n=>n instanceof Date?+n:String(n)).join(","):""}function Ay(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,Sy(o.axis_x_tick_values,s.redrawGeneration)].join("|")}function Ol(t,e,n,r=!1){var i;return(i=t.axis)!=null&&i.generateTickValues?t.axis.generateTickValues(e,n,r):e}function Ey(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=Ay(t,e),R=m.get(A);if(R)return R;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=Ty(t,h),B=by(t,N),W=Ol(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(wl(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=py(wa(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=wa(d,f.axis_x_tick_count||hn);return C(e?zi(z,Ml(t)):z)}function Cy(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 Iy(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=Cy(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=Ol(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,R)=>R));const m=wa(c,s.axis_x_tick_count||hn);return d(m)}function Ry(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 Oy(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=Ry(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?Dy(t,e,C):C;if(h)return m($f(t,h,e));const A=Ey(d.domain(),c[`${f}_tick_stepSize`]);if(A.length)return m(A);const R=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(wa(d,c[`${f}_tick_time_value`]));if((o=l==null?void 0:l.isLog)!=null&&o.call(l,e))return m(Bf(d,R));if(R){const C=d.domain();return m(Ol(t,C,C.every(P=>P===0)?1:R,(s=l==null?void 0:l.isTimeSeries)==null?void 0:s.call(l,e)))}return m(wa(d,hn))}function Py(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 My(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):wa(n,(s=l.count)!=null?s:hn)}function Ly(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 Dy(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 Fy(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 Ny=Object.defineProperty,$y=(t,e,n)=>e in t?Ny(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,By=(t,e,n)=>$y(t,typeof e!="symbol"?e+"":e,n);class Gf{constructor(e){By(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=Tr((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 zy=Object.defineProperty,Uy=Object.defineProperties,ky=Object.getOwnPropertyDescriptors,Wf=Object.getOwnPropertySymbols,Xy=Object.prototype.hasOwnProperty,Gy=Object.prototype.propertyIsEnumerable,Ll=(t,e,n)=>e in t?zy(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Wy=(t,e)=>{for(var n in e||(e={}))Xy.call(e,n)&&Ll(t,n,e[n]);if(Wf)for(var n of Wf(e))Gy.call(e,n)&&Ll(t,n,e[n]);return t},Vy=(t,e)=>Uy(t,ky(e)),Dl=(t,e,n)=>Ll(t,typeof e!="symbol"?e+"":e,n);const Vf=20,jf=15;function Fl(t){return t?-1:1}function jy(t,e){return t?e?-1:1:e?1:-1}function Nl(t,e,n){return{x:t.left-Vf,y:0,w:e+Vf*2,h:n}}function $l(t,e,n){return{x:0,y:t.top-jf,w:e,h:n+jf*2}}function Hy(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 Yy(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 Ky(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 Zy(t,e,n,r){return r?{x:t.x+n,y:t.y-e}:{x:t.x+e,y:t.y+n}}function Hf(t,e){const n=t?t(e):e;return n==null?"":String(n)}function Ui(t,e){return t[`${e}TickFont`]||t.labelFont}function Bl(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 Jy(t){return 11.5-2.5*(t/15)*(t>0?1:-1)}function Qy(t){return 8*Math.sin(Math.PI*(t/180))}function zl(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 _y(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 Ul(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(ua(t,e[0])),c=r(ua(t,e[1]));return Math.max(0,Math.abs(c-l)-12)}return 110}function Yf(t,e,n,r,i=[],o=!1,s=cr(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=br(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,R=(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,R+(P?f+(P-1)*d:0))})})}drawAxisLabels(e){const{ctx:n,painter:r,theme:{style:{axis:i}}}=this,{axis:o,config:s}=e,l=br(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),R=o.xForAxisLabel(d)+zl(o.dxForAxisLabel(d),l),C=zl(o.dyForAxisLabel(d),l),{x:P,y:z}=Jy(A,R,C,m),$=o.textAnchorForAxisLabel(d);n.fillStyle=u[d]||i.labelColor,n.textAlign=f[$]||"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 R of Ko(e)){const C=Gl(e,R);ca(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 R of Ny(e)){const C=$i(e,R),P=s.y(C);ca(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||!ca(h.x)||!ca(h.y)||!h.w||!h.h)continue;const m=l.left+h.x,A=l.top+h.y,R=h.w,C=h.h;if(n.globalAlpha=Number.isFinite(d.opacity)?d.opacity:i.opacity,r.fillRect({x:m,y:A,w:R,h:C}),(f=d.label)!=null&&f.text){const P=d.label,z=P.center||"",$=String(P.text),B=r.measureText($).width,W=parseFloat(n.font)||12;let H=m+(P.x||0),J=A+(P.y||0);z.indexOf("x")>-1&&(H+=(R-B)/2),z.indexOf("y")>-1&&(J+=(C-W)/2),r.text($,H,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,R=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=($,B,W,H=!1)=>{$&&r.text($,B,W,{angle:H?-90:0})},P=$=>{if($.value===void 0||!l.x)return;const B=Gl(e,$.value);if(ca(B))if(d){const W=u.top+B;r.strokePath(()=>{r.traceLine(h,W,m,W)}),n.textAlign=$.position==="start"?"left":$.position==="middle"?"center":"right",C($.text,Qf($.position,h,m),W-5)}else{const W=u.left+B;r.strokePath(()=>{r.traceLine(W,A,W,R)}),n.textAlign=$.position==="start"?"left":$.position==="middle"?"center":"right",C($.text,W-5,_f($.position,A,R),!0)}},z=$=>{const B=$.axis==="y2"?l.y2:l.y,W=$.axis==="y2"?"y2":"y";if($.value===void 0||!B)return;const H=$i(e,$.value,W),J=B(H);if(ca(J))if(d){const q=u.left+J;r.strokePath(()=>{r.traceLine(q,A,q,R)}),n.textAlign=$.position==="start"?"left":$.position==="middle"?"center":"right",C($.text,q-5,_f($.position,A,R),!0)}else{const q=u.top+J;r.strokePath(()=>{r.traceLine(h,q,m,q)}),n.textAlign=$.position==="start"?"left":$.position==="middle"?"center":"right",C($.text,Qf($.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,R=(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,$=f.left+d,B=f.top,W=f.top+h,H=m?B:z,J=m?W:$,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,$,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($,P,$,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,R),fe=f.left+Zt,me=f.top+Zt;Xl(m?me:fe,H,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,br(xt)),Rt=Ul(e,q,m,R);q.forEach((Et,Zt)=>{this.drawXAxisTickText(e,Et,et,s.labelColor,{isRotated:m,rangeEnd:J,rangeStart:H,tickCount:q.length,tickFont:xt,tickIndex:Zt,tickLineHeight:bt,tickTextDirection:_,tickTextWidth:Rt,tickRotate:ut,tickTextPosition:dt,targetScale:R,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)),R=m[A];if(R===void 0)return;const C=l.axis_rotated,P=i.crisp(u.left,o.lineWidth),z=i.crisp(u.top+d,o.lineWidth),$=C?u.top:u.left,B=C?u.top+d:u.left+f,W=s.getXAxisTickFormat(),H=Fl(C);i.clipRect(C?$l(u,c.width,d):Nl(u,f,c.height),()=>{var J;this.drawXAxisTickText(e,R,W,o.activeLabelColor,{isRotated:C,rangeEnd:B,rangeStart:$,targetScale:cr(e),tickCount:m.length,tickIndex:A,tickTextDirection:H,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,R=m>=0&&m<=f;if(!A&&!R)return;const C=c.left+h,P=c.top+m,z=br(o.labelFont),$=z||10,B=(W,H,J,q,at)=>{const et=Yy(e,W),ot=et&&Ky(e,W,H);if(!ot)return;r.font=o.labelFont,r.textAlign=at,r.textBaseline="alphabetic";const lt=r.measureText(ot),ft=lt.width,_=lt.actualBoundingBoxAscent||$*.8,dt=lt.actualBoundingBoxDescent||$*.2,ut=Math.max(2,ft*.15),xt=Math.max(3,$*.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),R&&i.traceLine(c.left,P,c.left+u,P)}),r.setLineDash([]),d?(R&&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"),R&&l.axis_y_show&&B("y",m,c.left-z*.4,P+z*.3,"right"),R&&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:R,tickRotate:C,tickTextPosition:P,targetScale:z,ticks:$,x:B,y:W}=o,H=Gl(e,n,z),J=d.left+H,q=d.top+H;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,$,h,z,o.tickTextWidth),lt=(l=o.tickLineHeight)!=null?l:Bl(u,br(et));let ft,_;if(h)ft=B+(Dt+sn)*R+(P.x||0),_=q+(P.y||0),c.textAlign=kl(e,o),c.textBaseline="middle";else if(C){const dt=br(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+sn)*R+(P.y||0),c.textAlign=kl(e,o),c.textBaseline=R>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:R}}=e,C=`axis_${n}`,P=(r==null?void 0:r.scale)||h[n],z=n==="y2",$=d.axis_rotated,B=r!=null&&r.index?e.getAxisSize(n)*r.index:0,W=u.crisp(m.left+(z?A+($?0:B):-B),f.lineWidth),H=u.crisp(m.top+($?z?-B-1:R+B:0),f.lineWidth),J=m.left,q=m.left+A,at=m.top,et=m.top+R,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=$?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,$,z),xt=Hy($,z),bt=d[`${C}_tick_text_position`];u.withState(()=>{c.strokeStyle=f.lineColor,c.lineWidth=f.lineWidth,u.strokePath(()=>{$?u.traceLine(J,H,q,H):u.traceLine(W,at,W,et),_&&($?(u.traceLine(J,H,J,H+Dt*ut),u.traceLine(q,H,q,H+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=$?"center":xt>0?"left":"right",c.textBaseline=$?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);ca($?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)$?u.traceLine(me,H,me,H+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)$?u.text(Hf(ft,me),xe+(bt.x||0),H+Dt*xt+(bt.y||0)):u.text(Hf(ft,me),W+(Dt+sn)*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 kR=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),R=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 $=c?f:u,B=Math.abs(n[2][$]-n[0][$]);P=Math.max(0,!A||R?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),R=r(f.value);l.push({start:o?[m,h]:[h,m],end:o?[R,A]:[A,R],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 XR=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,Pa=1e-6,m0=Kl-Pa;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>Pa)if(!(Math.abs(d*c-u*f)>Pa)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let m=r-s,A=i-l,R=c*c+u*u,C=m*m+A*A,P=Math.sqrt(R),z=Math.sqrt(h),$=o*Math.tan((Yl-Math.acos((R+h-C)/(2*P*z)))/2),B=$/z,W=$/P;Math.abs(B-1)>Pa&&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)>Pa||Math.abs(this._y1-f)>Pa)&&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>Pa&&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 GR(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,R=(d=Hl(d)).length,C,P=!1,z,$=new Array(R),B=new Array(R);for(o==null&&(l=s(z=c())),h=0;h<=R;++h){if(!(h<R&&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($[A],B[A]);l.lineEnd(),l.areaEnd()}P&&($[h]=+t(C,h,d),B[h]=+e(C,h,d),l.point(r?+r(C,h,d):$[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 w0(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,R)=>t.isGrouped(A.id)?c(A,R)[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 R=u(A.id,n);let C=s?t.filterRemoveNull(A.values):A.values,P=0,z=0,$;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)),$=t.lineWithRegions(C,o.zoom||m,R,B)):$=h.curve(t.getCurve(A))(w0(t,A,C))}else C[0]&&(P=m(C[0].x),z=R(C[0].value)),$=l?`M ${z} ${P}`:`M ${P} ${z}`;return $||(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,R=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),R=t.getYScaleById(h.id)(m[0].value)),C=s?`M ${R} ${A}`:`M ${A} ${R}`;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=O0(t);return r&&r!==t?qo(r,e):t}function O0(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 Ca(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,R=br(t.canvasEngine.ctx.font),C=r-h,P=i-m-((s=t.isTreemapType)!=null&&s.call(t,o)?R*.7:A/2);let z=r,$=i;return t.config.axis_rotated?z+=h:$+=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:$}}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=br(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 R=n,C=r;return t.textAlign==="center"?R-=u/2:(t.textAlign==="right"||t.textAlign==="end")&&(R-=u),t.textBaseline==="middle"?C-=A/2:t.textBaseline==="alphabetic"?C-=A-m:(t.textBaseline==="bottom"||t.textBaseline==="ideographic")&&(C-=A),{x:R-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 R;m&&(A.translate(i,o),A.rotate(m*Math.PI/180),h.x-=i,h.y-=o),u&&e.fillRoundRect(h,(R=f==null?void 0:f.radius)!=null?R: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(wa(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&&(Ia(t,n)||Ra(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 ua(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=ua(t,"fill"),i=ua(t,"stroke"),o=ua(t,"stroke-width"),s=ua(t,"opacity"),l=ua(t,"fill-opacity"),c=ua(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 wr(t,e){const n=t==null?void 0:t.trim();return n?/%$/.test(n)?n:parseFloat(n):e}function Or(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=ua(e,"stop-color")||"#000",r=ua(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:wr(n.getAttribute("x1"),"0%"),y1:wr(n.getAttribute("y1"),"0%"),x2:wr(n.getAttribute("x2"),"100%"),y2:wr(n.getAttribute("y2"),"0%"),stops:o}):i==="radialgradient"&&e.set(r,{type:"radialGradient",cx:wr(n.getAttribute("cx"),"50%"),cy:wr(n.getAttribute("cy"),"50%"),r:wr(n.getAttribute("r"),"50%"),fx:wr(n.getAttribute("fx"),"50%"),fy:wr(n.getAttribute("fy"),"50%"),fr:wr(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),R=Mn(t,"y",0),C=Wi(u,[1,0,0,1,A,R]);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(Or(e.x1,r,o,r),Or(e.y1,i,s,i),Or(e.x2,r,o,r+o),Or(e.y2,i,s,i)):t.createRadialGradient(Or(e.fx,r,o,r+o/2),Or(e.fy,i,s,i+s/2),Or(e.fr,r,Math.max(o,s),0),Or(e.cx,r,o,r+o/2),Or(e.cy,i,s,i+s/2),Math.max(.01,Or(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:R,shouldFill:C,shouldStroke:P,alpha:z}=tT(c,o,A.style,f,u);if(c.save(),t.applyStyle(R),z!==void 0&&(c.globalAlpha*=z),c.transform(...A.matrix),c.beginPath(),A.type==="path"){if(ce.Path2D){const $=A.path2D||(A.path2D=new ce.Path2D(A.d));C&&c.fill($),P&&c.stroke($)}}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,er,lr,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:Ja(e.margin.left),y:Ja(e.margin.top)}}function wd(t,e,n,r,i=!1){r.strokePath(o=>{cd(t,n,i,o)(e)},{lineDash:[]})}function Od(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,R])=>{const C=le(A)?A.call(t.api,n.id):A,P=String(C||o),z=Number(m),$=Number.isFinite(z)?Math.max(0,Math.min(1,z)):0;h.addColorStop($,qo(P,R))}),h}function Hr(t,e){return _a(t,e,oT)}function rs(t,e){const n=t.config.point_opacity;return Number.isFinite(n)?n:Ra(t,e)||wa(t,e)?.5:1}function Yi(t,e,n){var r,i;const o=t.config.point_r;return wa(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"&&Ra(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(wa(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,R=e.createRadialGradient(m,A,0,m,A,Math.max(1,o*d*2));return h.forEach(([C,P,z])=>{let $=le(P)?P.bind(t.api)(n.id):P;$||($=s);const B=Number(C),W=Number.isFinite(B)?Math.max(0,Math.min(1,B)):0;R.addColorStop(W,qo($,z))}),R}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 Fd(t,e){return t.shouldDrawPointsForLine?t.shouldDrawPointsForLine(e):!0}function yT(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function TT(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[R,...C]=d;A.moveTo(R[0],R[1]),C.forEach(P=>{A.lineTo(P[0],P[1])})},{lineDash:f}),d=[]},m=(A,R,C)=>{!f||!yT(f,C)?(h(),f=C,d=[A,R]):d.push(R)};for(const{start:A,end:R,dash:C,isBreak:P}of u){if(P||!A||!R||!C){h(),f=null;continue}if(!pn(A[0],A[1])||!pn(R[0],R[1])){h(),f=null;continue}m(A,R,C)}h()}class bT{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)&&lr(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,R,C,P,z;const $=h.filter(Ni.bind(null,e)),B=tr(e,n,jt.AREA,Ni.bind(null,e));o.globalAlpha=l.shape.areaOpacity;for(const ft of $)ft.values.some(In.bind(null,e))&&(o.fillStyle=e.color(ft.id),Od(e,ft,B,s,!0));o.globalAlpha=1;const W=h.filter(er.bind(null,e)),H=tr(e,n,jt.BAR,er.bind(null,e)),J=(m=e.generateGetBarPoints)==null?void 0:m.call(e,H,!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=tr(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(Ia.bind(null,e)),lt=tr(e,n,jt.LINE,Ia.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),wd(e,ft,lt,s,!0));if(r.point_show&&!((R=e.isPointFocusOnly)!=null&&R.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(!lr(e,dt)||Ia(e,dt)&&!Fd(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),R=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(...R))),P=Math.max(0,Math.min(m,Math.max(...R))),z=Math.max(C,Math.min(P,Math.min(d,h))),$=Math.max(C,Math.min(P,Math.max(d,h))),B=$-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,$,"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,R=d?o.top+n:o.top+l/2,C=uT(d?"y":"x",r);C&&u.withState(()=>{c.translate(A,R),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=er.bind(null,e),c=_l(e,r,er),u=e.filterTargetsToShow().filter(l).filter(Hr.bind(null,e)),f=e.generateGetBarPoints(tr(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 R of u){const C=Wr(e,R),P=vT(e,R.id),z=Hi(e,R),$=[],B=[];for(let W=C.start;W<C.end;W++){const H=R.values[W];if(!In(e,H))continue;const J=Xi(e,f,H,W);if(!J)continue;const{points:q,rect:at}=J,et=jl(e,H,q,h,m,(A=e.isStackingRadiusData)==null?void 0:A.bind(e));B.push({d:H,points:q,rect:at,radiusInfo:et}),P&&$.push(pT(e,q,et))}P&&s.shape.barConnectLineWidth>0&&mT(e,o,P,$,z);for(const{d:W,rect:H,radiusInfo:J}of B){const q=ji(e,rc(r,W)),at=q||e.color(R.id),ot=(c(W)?s.shape.barExpandedOpacity:s.shape.barOpacity)*z;i.fillStyle=q?at:Ld(e,i,R,"bar",H,at),h?o.fillRoundRect(H,J.corners,{alpha:ot}):o.fillRect(H,{alpha:ot}),s.shape.barLineWidth>0&&(i.strokeStyle=s.shape.barStrokeColor,i.lineWidth=s.shape.barLineWidth,h?o.strokeRoundRect(H,J.corners,{alpha:s.shape.barOpacity*z}):o.strokeRect(H,{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,tr(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 R=Wr(e,A),C=Hi(e,A),P=l.shape.candlestickLineWidth,z=l.shape.candlestickStrokeColor||"#000";for(let $=R.start;$<R.end;$++){const B=A.values[$],W=(m=e.getCandlestickData)==null?void 0:m.call(e,B);if(!W)continue;const H=Gi(e,d,B,$);if(!H)continue;const{body:J,wickStart:q,wickEnd:at}=H;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&&(er(e,r)||Yn(e,r))))}drawLines(e,n){const{ctx:r,painter:i,theme:{style:o}}=this,s=Ia.bind(null,e),l=e.filterTargetsToShow().filter(s).filter(Hr.bind(null,e)),c=tr(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]?TT(e,h,i):wd(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=tr(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),Od(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,lr),h=!!(r!=null&&r.some(m=>m&&lr(e,m)));!c||!u||s.withTranslation(f.left,f.top,()=>{var m,A,R;for(const C of e.filterTargetsToShow()){if(!lr(e,C)||!Hr(e,C)||Ia(e,C)&&!Fd(e,C))continue;const P=e.color(C.id),z=ac(e,C),$=Hi(e,C),B=!!e.config.point_radialGradient,W=gT(e,C,z,B),H=Wr(e,C),J=H.end-H.start,q=W?Df(e.state.width,e.state.height,Yi(e,C,C.values[H.start]||C.values[0])):null,at=rs(e,C)*$;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=H.start;dt<H.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=H.start;dt<H.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=H.start;dt<H.end;dt++){const ut=C.values[dt];if(!In(e,ut))continue;const xt=d(ut),bt=Yi(e,C,ut),Rt=xt?(R=(A=e.pointExpandedR)==null?void 0:A.call(e,ut))!=null?R: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)*$,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=er.bind(null,e),d=Yn.bind(null,e),h=o.some(f)?e.generateGetBarPoints(tr(e,n,jt.BAR,f),!1):null,m=o.some(d)?(i=e.generateGetCandlestickPoints)==null?void 0:i.call(e,tr(e,n,jt.CANDLESTICK,d),!1):null,A=h?Wl(e):null,R=A?Vl(e):new Set;l.withTranslation(u.left,u.top,()=>{o.forEach(C=>{var P,z,$,B,W,H;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,R).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(lr(e,C)){const q=ac(e,{id:C.id}),{x:at,y:et}=ki(e,C),ot=($=(z=e.pointR)==null?void 0:z.call(e,C))!=null?$: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:(H=c.shape.pointLineWidth)!=null?H: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(tr(e,n,jt.CANDLESTICK,Yn.bind(null,e)),!1):null,h=e.filterTargetsToShow().filter(C=>(er(e,C)||lr(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),$=[];for(let B=0;B<z.length;B++){const W=z[B],H=fd(e,W);H&&W.index>=P.start&&W.index<P.end&&In(e,W)&&$.push({d:W,text:H})}A+=$.length,$.length&&m.push($)});const R={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:$,text:B}of C){let W,H;if(er(e,$)&&f){const J=Xi(e,f,$,$.index);if(!J)continue;const{points:q,rect:at}=J,et=e.getBaseValue($),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,H=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,$)&&d){const J=(P=e.getCandlestickData)==null?void 0:P.call(e,$),q=Gi(e,d,$,$.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($.id)}_inverted`];W=e.config.axis_rotated?at?et[0]+4:ot[0]-4:ot[0],H=e.config.axis_rotated?ot[1]+3:at?et[1]-3:ot[1]+12,!e.config.axis_rotated&<&&(H+=15*(at?1:-1)),i.textAlign=e.config.axis_rotated?at?"left":"right":"center",i.textBaseline="alphabetic"}else c&&u&&({x:W,y:H}=h0(n.pos,$,$.index),{x:W,y:H}=vd(e,i,$,W,H));W+=ts(e,$,"x",R),H+=ts(e,$,"y",R),pn(W,H)&&this.drawDataLabel(e,$,B,W,H)}})})}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:R}=ti(e,f,l,!0);if(!pn(h,m)||!pn(h+A,m+R)||A<=0||R<=0)continue;const C={x:h,y:m,w:A,h:R};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,R);if(!P)continue;const z=P.split(`
|
|
38
|
-
`),$=!!s.data_labels.centered;r.font=o.label.font;const B=br(r.font),W=r.measureText((u=z[0])!=null?u:""),H=(W.fontBoundingBoxAscent||0)+(W.fontBoundingBoxDescent||0)||(W.actualBoundingBoxAscent||0)+(W.actualBoundingBoxDescent||0),J=Math.max(B,H)+(z.length-1)*B,q=$?m+R/2:m+J+5;let at=$?h+A/2:h+5,et=q-(z.length-1)*B/($?2:1);r.textAlign=$?"center":"left",r.textBaseline=$?"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,$?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,R=e.config.grid_focus_edge&&!e.config.tooltip_grouped;d&&r.strokePath(()=>{var C,P;if(f){if(r.traceLine(m(0),c,R&&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,R&&!z?c:A(0),l,R&&z?c:A(e.state.height))}}else if(r.traceLine(l,R&&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(R&&z?l:m(0),c,R&&!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)&&lr(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),R=(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:R*1.75,P=ji(e,l),z=P||e.color(l.id),$=P||i.focusPoint.fill||i.shape.pointFillColor||z,B=P||i.focusPoint.stroke||z,W=i.focusPoint.lineWidth,H=rs(e,l),J=!!B&&(W!=null?W:0)>0,q=h==="circle"&&J&&ge(H)&&H<1&&$===B;pn(m,A)&&Vi(r,h,m,A,q?C+(W||0)/2:C,J&&!q?{fill:$,lineWidth:W,stroke:B,alpha:H}:{fill:$,alpha:H},R)}),this.drawFocusLabels(e,n)})}}var ST=Object.defineProperty,Nd=Object.getOwnPropertySymbols,AT=Object.prototype.hasOwnProperty,ET=Object.prototype.propertyIsEnumerable,CT=(t,e,n)=>e in t?ST(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,IT=(t,e)=>{var n={};for(var r in t)AT.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&Nd)for(var r of Nd(t))e.indexOf(r)<0&&ET.call(t,r)&&(n[r]=t[r]);return n},ic=(t,e,n)=>CT(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 Ma(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 RT(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 fa(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 $d(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 OT(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:$d(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:$d(n)});break;case".bb-region rect":case".bb-region":Je(t,"region",{fill:_e(n,"fill"),opacity:fa(n)});break;case".bb-region text":Je(t,"region",{labelColor:_e(n,"fill"),labelFont:fr(n)});break;case".bb-bar":Je(t,"shape",{barOpacity:fa(n),barStrokeColor:_e(n,"stroke"),barLineWidth:Ln(n,"stroke-width")});break;case".bb-bar._expanded_":Je(t,"shape",{barExpandedOpacity:fa(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:fa(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:fa(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:fa(n)});break;case".bb-brush .extent":case".bb-brush .selection":Je(t,"subchartBrush",{fill:_e(n,"fill"),opacity:fa(n)});break;case".bb-brush .handle--custom":Je(t,"subchartBrush",{handleFill:_e(n,"fill"),handleOpacity:fa(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 PT(t){const e={};return Object.keys(t!=null?t:{}).forEach(n=>{wT(n).forEach(r=>{OT(e,r,t[n])})}),e}function MT(t){if(!t)return{};const e=t,{selectors:n}=e,r=IT(e,["selectors"]);return Gr({},PT(n),r)}function Bd(t,e){try{return JSON.stringify({className:t.className,style:t.getAttribute("style")||"",override:e||null})}catch(n){return null}}class LT{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=(wn,Wn)=>{const Zn=ce.getComputedStyle(wn),_n={};for(const Nn of Wn)_n[Nn]=Nn==="font"?RT(Zn,""):Zn.getPropertyValue(Nn).trim();return _n},u=(wn,Wn,Zn)=>{const _n=He.createElementNS(Pr,wn);_n.setAttribute("class",Wn),l.appendChild(_n);const Nn=c(_n,Zn);return l.removeChild(_n),Nn},f=(wn,Wn,Zn,_n)=>{const Nn=He.createElementNS(Pr,"g"),vr=He.createElementNS(Pr,Wn);Nn.setAttribute("class",wn),Zn&&vr.setAttribute("class",Zn),Nn.appendChild(vr),l.appendChild(Nn);const na=c(vr,_n);return l.removeChild(Nn),na},d=(wn,Wn,Zn,_n,Nn)=>{const vr=He.createElementNS(Pr,"g"),na=He.createElementNS(Pr,"g"),go=He.createElementNS(Pr,Zn);vr.setAttribute("class",wn),na.setAttribute("class",Wn),_n&&go.setAttribute("class",_n),na.appendChild(go),vr.appendChild(na),l.appendChild(vr);const nR=c(go,Nn);return l.removeChild(vr),nR},h=(wn,Wn,Zn,_n="")=>{const Nn=He.createElementNS(Pr,"g"),vr=He.createElementNS(Pr,"g"),na=He.createElementNS(Pr,Wn);Nn.setAttribute("class",`bb-axis ${wn}`),vr.setAttribute("class",["tick",_n].filter(Boolean).join(" ")),na.textContent=Wn==="text"?"0":"",vr.appendChild(na),Nn.appendChild(vr),l.appendChild(Nn);const go=c(na,Zn);return l.removeChild(Nn),go},m="rgb(1, 2, 3)",A=(wn,Wn)=>{const Zn=He.createElement("style");Zn.textContent=`
|
|
34
|
+
`):t.config.axis_x_tick_multiline?_y(u,l!=null?l:Ul(t,i,o,s),e):[u]}function kl(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 qy(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 fa(t){return Number.isFinite(t)}function Xl(t,e,n){return fa(t)&&t>=Math.min(e,n)&&t<=Math.max(e,n)}function Kf(t){return t?-1:1}function t0(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 Gl(t,e,n=cr(t)){return n(ua(t,e))}function e0(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):ua(t,e)}function n0(t,e){var n,r;return!!((r=(n=t.axis)==null?void 0:n.isCategorized)!=null&&r.call(n)&&Number.isNaN(Number(e)))}function Zf(t,e,n,r){var i,o;if(e===void 0)return n;let s=cr(t)(e0(t,e));if(n0(t,e)){const l=cr(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 Jf(t,e,n="y"){return t.scale[n||"y"]($i(t,e,n))}function Qf(t,e,n){return t==="start"?e+4:t==="middle"?(e+n)/2:n-4}function _f(t,e,n){return t==="start"?n-4:t==="middle"?(e+n)/2:e+4}function r0(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=Zf(t,e.start,0,"start"),m=Zf(t,e.end,l?o:i,"end"),A=Math.min(h,m),R=Math.abs(m-h);return l?{x:0,y:A,w:i,h:R}:{x:A,y:0,w:R,h:o}}if(!r[s])return null;const c=e.start===void 0?l?0:o:Jf(t,e.start,s),u=e.end===void 0?l?i:0:Jf(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 a0{constructor(e,n){Dl(this,"engine",e),Dl(this,"theme",n),Dl(this,"painter"),this.painter=new Gf(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;const{ctx:o,painter:s,theme:{style:{axis:l}}}=this,{config:c,format:u,scale:f,state:{current:d,margin2:h,width2:m,height2:A}}=e;if(!c.subchart_show||!c.subchart_axis_x_show||!f.subX||m<=0||A<=0)return;const R=c.axis_rotated,C=s.crisp(h.left,l.lineWidth),P=s.crisp(h.top+A,l.lineWidth),z=h.left,N=h.left+m,B=h.top,W=h.top+A,H=R?B:z,J=R?W:N,q=Iy(e),at=R?c.axis_x_tick_inner?1:-1:c.axis_x_tick_inner?-1:1,et=Kf(R),ot=Fl(R),lt=c.axis_x_tick_text_position,ft=R?0:((n=e.getAxisTickRotate)==null?void 0:n.call(e,"x"))||0,_=u.subXAxisTick||((i=(r=e.axis)==null?void 0:r.getXAxisTickFormat)==null?void 0:i.call(r,!0));s.clipRect(R?$l(h,d.width,A):Vy(Wy({},Nl(h,m,d.height-h.top)),{y:h.top}),()=>{o.strokeStyle=l.lineColor,o.lineWidth=l.lineWidth,s.strokePath(()=>{R?s.traceLine(C,B,C,W):s.traceLine(z,P,N,P),c.axis_x_tick_outer&&(R?(s.traceLine(C,B,C+Dt*et,B),s.traceLine(C,W,C+Dt*et,W)):(s.traceLine(z,P,z,P+Dt*et),s.traceLine(N,P,N,P+Dt*et)))});const dt=Ui(l,"x");o.font=dt,o.fillStyle=l.labelColor,o.textAlign=R?ot>0?"left":"right":"center",o.textBaseline=R?"middle":ot>0?"top":"bottom",o.strokeStyle=l.tickColor,o.lineWidth=l.tickWidth;const ut=Bl(s,Tr(dt)),xt=Ul(e,q,R,f.subX);for(const bt of q){const Rt=f.subX(ua(e,bt)),Et=h.left+Rt,Zt=h.top+Rt;if(!Xl(R?Zt:Et,H,J)||(c.subchart_axis_x_tick_show&&s.strokePath(()=>{R?s.traceLine(C,Zt,C+Dt*at,Zt):s.traceLine(Et,P,Et,P+Dt*at)}),!c.subchart_axis_x_tick_text_show))continue;const me=Yf(e,s,_,bt,q,R,f.subX,xt);let xe,Te;R?(xe=C+(Dt+sn)*ot+(lt.x||0),Te=Zt+(lt.y||0),o.textAlign=ot>0?"left":"right",o.textBaseline="middle"):(xe=Et+(lt.x||0),Te=P+(Dt+sn)*ot+(lt.y||0),o.textAlign=ft?ft>0?"left":"right":"center",o.textBaseline=ot>0?"top":"bottom"),s.withState(Fe=>{Fe.translate(xe,Te),ft&&Fe.rotate(ft*Math.PI/180),me.forEach((Ie,ke)=>{Fe.fillText(Ie,0,ke*ut)})})}})}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=Tr(s.font),d=f*1.5,{x:h,align:m}=qy(l.title_position,c.width),A=(r=(n=e.getCanvasTitleHeight)==null?void 0:n.call(e))!=null?r:f,R=(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,R+(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=Ky(e,d),R=o.xForAxisLabel(d)+zl(o.dxForAxisLabel(d),l),C=zl(o.dyForAxisLabel(d),l),{x:P,y:z}=Zy(A,R,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 R of Ko(e)){const C=Gl(e,R);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 R of Fy(e)){const C=$i(e,R),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=r0(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,R=h.w,C=h.h;if(n.globalAlpha=Number.isFinite(d.opacity)?d.opacity:i.opacity,r.fillRect({x:m,y:A,w:R,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 H=m+(P.x||0),J=A+(P.y||0);z.indexOf("x")>-1&&(H+=(R-B)/2),z.indexOf("y")>-1&&(J+=(C-W)/2),r.text(N,H,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,R=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,H=!1)=>{N&&r.text(N,B,W,{angle:H?-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,R)}),n.textAlign=N.position==="start"?"left":N.position==="middle"?"center":"right",C(N.text,W-5,_f(N.position,A,R),!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 H=$i(e,N.value,W),J=B(H);if(fa(J))if(d){const q=u.left+J;r.strokePath(()=>{r.traceLine(q,A,q,R)}),n.textAlign=N.position==="start"?"left":N.position==="middle"?"center":"right",C(N.text,q-5,_f(N.position,A,R),!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=Py(e,n,i);if(!l)return;const c={scale:l,ticks:My(e,n,l,i),format:Ly(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,R=(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,H=m?B:z,J=m?W:N,q=(n==null?void 0:n.ticks)||Ko(e),at=(n==null?void 0:n.ticks)||Oy(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,R),fe=f.left+Zt,me=f.top+Zt;Xl(m?me:fe,H,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,R);q.forEach((Et,Zt)=>{this.drawXAxisTickText(e,Et,et,s.labelColor,{isRotated:m,rangeEnd:J,rangeStart:H,tickCount:q.length,tickFont:xt,tickIndex:Zt,tickLineHeight:bt,tickTextDirection:_,tickTextWidth:Rt,tickRotate:ut,tickTextPosition:dt,targetScale:R,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)),R=m[A];if(R===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(),H=Fl(C);i.clipRect(C?$l(u,c.width,d):Nl(u,f,c.height),()=>{var J;this.drawXAxisTickText(e,R,W,o.activeLabelColor,{isRotated:C,rangeEnd:B,rangeStart:N,targetScale:cr(e),tickCount:m.length,tickIndex:A,tickTextDirection:H,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,R=m>=0&&m<=f;if(!A&&!R)return;const C=c.left+h,P=c.top+m,z=Tr(o.labelFont),N=z||10,B=(W,H,J,q,at)=>{const et=Hy(e,W),ot=et&&Yy(e,W,H);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),R&&i.traceLine(c.left,P,c.left+u,P)}),r.setLineDash([]),d?(R&&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"),R&&l.axis_y_show&&B("y",m,c.left-z*.4,P+z*.3,"right"),R&&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:R,tickRotate:C,tickTextPosition:P,targetScale:z,ticks:N,x:B,y:W}=o,H=Gl(e,n,z),J=d.left+H,q=d.top+H;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+sn)*R+(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=Qy(C)+(P.x||0),bt=Jy(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+sn)*R+(P.y||0),c.textAlign=kl(e,o),c.textBaseline=R>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:R}}=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),H=u.crisp(m.top+(N?z?-B-1:R+B:0),f.lineWidth),J=m.left,q=m.left+A,at=m.top,et=m.top+R,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=t0(d,N,z),xt=jy(N,z),bt=d[`${C}_tick_text_position`];u.withState(()=>{c.strokeStyle=f.lineColor,c.lineWidth=f.lineWidth,u.strokePath(()=>{N?u.traceLine(J,H,q,H):u.traceLine(W,at,W,et),_&&(N?(u.traceLine(J,H,J,H+Dt*ut),u.traceLine(q,H,q,H+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,H,me,H+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),H+Dt*xt+(bt.y||0)):u.text(Hf(ft,me),W+(Dt+sn)*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 kR=ur,i0=Object.defineProperty,o0=(t,e,n)=>e in t?i0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,qa=(t,e,n)=>o0(t,typeof e!="symbol"?e+"":e,n);class s0{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 l0(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 c0(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),R=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||R?r(B):0)}const z=c?n[1][u]+(m?P:-P):n[1][f]+(m?-P:P);return{radius:P,corners:l0(c,m,P),clipPath:P?c0(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 u0(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 f0(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),R=r(f.value);l.push({start:o?[m,h]:[h,m],end:o?[R,A]:[A,R],dash:d?u0(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 d0(t,e,n){return{x:t.cx(e,n),y:t.cy(e,n)}}function h0(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 g0(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 XR=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 v0=Math.pow;const Yl=Math.PI,Kl=2*Yl,Oa=1e-6,p0=Kl-Oa;function ad(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function m0(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return ad;const n=v0(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:m0(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>Oa)if(!(Math.abs(d*c-u*f)>Oa)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let m=r-s,A=i-l,R=c*c+u*u,C=m*m+A*A,P=Math.sqrt(R),z=Math.sqrt(h),N=o*Math.tan((Yl-Math.acos((R+h-C)/(2*P*z)))/2),B=N/z,W=N/P;Math.abs(B-1)>Oa&&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)>Oa||Math.abs(this._y1-f)>Oa)&&this._append`L${u},${f}`,r&&(h<0&&(h=h%Kl+Kl),h>p0?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>Oa&&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 x0(){return new _o}x0.prototype=_o.prototype;function GR(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 y0(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,R=(d=Hl(d)).length,C,P=!1,z,N=new Array(R),B=new Array(R);for(o==null&&(l=s(z=c())),h=0;h<=R;++h){if(!(h<R&&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 T0=Object.defineProperty,b0=Object.defineProperties,S0=Object.getOwnPropertyDescriptors,sd=Object.getOwnPropertySymbols,A0=Object.prototype.hasOwnProperty,E0=Object.prototype.propertyIsEnumerable,ld=(t,e,n)=>e in t?T0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,C0=(t,e)=>{for(var n in e||(e={}))A0.call(e,n)&&ld(t,n,e[n]);if(sd)for(var n of sd(e))E0.call(e,n)&&ld(t,n,e[n]);return t},I0=(t,e)=>b0(t,S0(e));function R0(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,R)=>t.isGrouped(A.id)?c(A,R)[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 R=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=>I0(C0({},W),{value:t.getRangedData(W,"mid")}))),t.isStepType(A)&&(C=t.convertValuesToStep(C)),N=t.lineWithRegions(C,o.zoom||m,R,B)):N=h.curve(t.getCurve(A))(R0(t,A,C))}else C[0]&&(P=m(C[0].x),z=R(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,R=0,C;if(t.isAreaType(h)){let P=y0();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),R=t.getYScaleById(h.id)(m[0].value)),C=s?`M ${R} ${A}`:`M ${A} ${R}`;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}=h0(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 O0=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 P0(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 M0(t,e){return Ra(t.url,{ID:e.id})}function L0(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,R=Tr(t.canvasEngine.ctx.font),C=r-h,P=i-m-((s=t.isTreemapType)!=null&&s.call(t,o)?R*.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 D0(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 F0(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*O0,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 R=n,C=r;return t.textAlign==="center"?R-=u/2:(t.textAlign==="right"||t.textAlign==="end")&&(R-=u),t.textBaseline==="middle"?C-=A/2:t.textBaseline==="alphabetic"?C-=A-m:(t.textBaseline==="bottom"||t.textBaseline==="ideographic")&&(C-=A),{x:R-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=D0(t,n),f=F0((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 R;m&&(A.translate(i,o),A.rotate(m*Math.PI/180),h.x-=i,h.y-=o),u&&e.fillRoundRect(h,(R=f==null?void 0:f.radius)!=null?R: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 N0(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function $0(t){return t==="start"?"left":t==="end"?"right":"center"}function B0(t,e,n,r){var i,o,s;const l=N0(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:$0(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 z0=Object.defineProperty,pd=Object.getOwnPropertySymbols,U0=Object.prototype.hasOwnProperty,k0=Object.prototype.propertyIsEnumerable,md=(t,e,n)=>e in t?z0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,jr=(t,e)=>{for(var n in e||(e={}))U0.call(e,n)&&md(t,n,e[n]);if(pd)for(var n of pd(e))k0.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 X0(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 G0(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 W0(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 V0(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 j0(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 H0(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 Y0(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 wr(t,e){const n=t==null?void 0:t.trim();return n?/%$/.test(n)?n:parseFloat(n):e}function Or(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 K0(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 Z0(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:K0(e.getAttribute("offset")),color:n,opacity:Number.isFinite(i)?i:void 0}})}function J0(t){const e=new Map;return t.forEach((n,r)=>{const i=n.tagName.toLowerCase(),o=Z0(n);o.length&&(i==="lineargradient"?e.set(r,{type:"linearGradient",x1:wr(n.getAttribute("x1"),"0%"),y1:wr(n.getAttribute("y1"),"0%"),x2:wr(n.getAttribute("x2"),"100%"),y2:wr(n.getAttribute("y2"),"0%"),stops:o}):i==="radialgradient"&&e.set(r,{type:"radialGradient",cx:wr(n.getAttribute("cx"),"50%"),cy:wr(n.getAttribute("cy"),"50%"),r:wr(n.getAttribute("r"),"50%"),fx:wr(n.getAttribute("fx"),"50%"),fy:wr(n.getAttribute("fy"),"50%"),fr:wr(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=H0(t,i),u=Wi(r,j0(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),R=Mn(t,"y",0),C=Wi(u,[1,0,0,1,A,R]);o.add(h);const P=ec(m,e,n,C,c,o);return o.delete(h),P}if(s==="polygon"||s==="polyline"){const d=G0(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 Q0(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=W0(r.getAttribute("viewBox"))||xd,o=Y0(r),s=ec(r,i,o);s.length&&(e={shapes:s,box:r.tagName.toLowerCase()==="svg"?i:V0(s.map(l=>l.box)),paints:J0(o)})}catch(n){e=null}return tc.set(t,e),e}function _0(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(Or(e.x1,r,o,r),Or(e.y1,i,s,i),Or(e.x2,r,o,r+o),Or(e.y2,i,s,i)):t.createRadialGradient(Or(e.fx,r,o,r+o/2),Or(e.fy,i,s,i+s/2),Or(e.fr,r,Math.max(o,s),0),Or(e.cx,r,o,r+o/2),Or(e.cy,i,s,i+s/2),Math.max(.01,Or(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 q0(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(X0(e)){t.point(e,n,r,i,o);return}const l=Q0(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:R,shouldFill:C,shouldStroke:P,alpha:z}=q0(c,o,A.style,f,u);if(c.save(),t.applyStyle(R),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 _0(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 tT=Object.defineProperty,eT=Object.defineProperties,nT=Object.getOwnPropertyDescriptors,Sd=Object.getOwnPropertySymbols,rT=Object.prototype.hasOwnProperty,aT=Object.prototype.propertyIsEnumerable,nc=(t,e,n)=>e in t?tT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ad=(t,e)=>{for(var n in e||(e={}))rT.call(e,n)&&nc(t,n,e[n]);if(Sd)for(var n of Sd(e))aT.call(e,n)&&nc(t,n,e[n]);return t},Ed=(t,e)=>eT(t,nT(e)),ei=(t,e,n)=>nc(t,typeof e!="symbol"?e+"":e,n);const iT=[Ni,nr,br,Yn],oT=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 sT(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 lT(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 wd(t,e,n,r,i=!1){r.strokePath(o=>{cd(t,n,i,o)(e)},{lineDash:[]})}function Od(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 cT(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 uT(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 fT(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 dT(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,R])=>{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,R))}),h}function Hr(t,e){return Qa(t,e,iT)}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 hT(t,e,n,r){return!r&&n==="circle"&&la(t,e)&&!le(t.config.point_r)&&e.values.length>Mf}function gT(t,e){const{bar_connectLine:n}=t.config,r=je(n)?n[e]:n;return/^(start|end)-(start|end)$/.test(r)?r:null}function vT(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 pT(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 mT(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,R=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;R.addColorStop(W,qo(N,z))}),R}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 xT(t,e){return t.shouldDrawPointsForLine?t.shouldDrawPointsForLine(e):!0}function yT(t,e){return t.length===e.length&&t.every((n,r)=>n===e[r])}function TT(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=f0(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[R,...C]=d;A.moveTo(R[0],R[1]),C.forEach(P=>{A.lineTo(P[0],P[1])})},{lineDash:f}),d=[]},m=(A,R,C)=>{!f||!yT(f,C)?(h(),f=C,d=[A,R]):d.push(R)};for(const{start:A,end:R,dash:C,isBreak:P}of u){if(P||!A||!R||!C){h(),f=null;continue}if(!pn(A[0],A[1])||!pn(R[0],R[1])){h(),f=null;continue}m(A,R,C)}h()}class bT{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=lT(e),h=sT(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=P0(e,n);if(!(s!=null&&s.url))return{x:i,y:o};const l=M0(s,n),c=L0(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=B0(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,R,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),Od(e,ft,B,s,!0));o.globalAlpha=1;const W=h.filter(nr.bind(null,e)),H=er(e,n,jt.BAR,nr.bind(null,e)),J=(m=e.generateGetBarPoints)==null?void 0:m.call(e,H,!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),wd(e,ft,lt,s,!0));if(r.point_show&&!((R=e.isPointFocusOnly)!=null&&R.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),R=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(...R))),P=Math.max(0,Math.min(m,Math.max(...R))),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,R=d?o.top+n:o.top+l/2,C=cT(d?"y":"x",r);C&&u.withState(()=>{c.translate(A,R),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 R of u){const C=Wr(e,R),P=gT(e,R.id),z=Hi(e,R),N=[],B=[];for(let W=C.start;W<C.end;W++){const H=R.values[W];if(!In(e,H))continue;const J=Xi(e,f,H,W);if(!J)continue;const{points:q,rect:at}=J,et=jl(e,H,q,h,m,(A=e.isStackingRadiusData)==null?void 0:A.bind(e));B.push({d:H,points:q,rect:at,radiusInfo:et}),P&&N.push(vT(e,q,et))}P&&s.shape.barConnectLineWidth>0&&pT(e,o,P,N,z);for(const{d:W,rect:H,radiusInfo:J}of B){const q=ji(e,rc(r,W)),at=q||e.color(R.id),ot=(c(W)?s.shape.barExpandedOpacity:s.shape.barOpacity)*z;i.fillStyle=q?at:Ld(e,i,R,"bar",H,at),h?o.fillRoundRect(H,J.corners,{alpha:ot}):o.fillRect(H,{alpha:ot}),s.shape.barLineWidth>0&&(i.strokeStyle=s.shape.barStrokeColor,i.lineWidth=s.shape.barLineWidth,h?o.strokeRoundRect(H,J.corners,{alpha:s.shape.barOpacity*z}):o.strokeRect(H,{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 R=Wr(e,A),C=Hi(e,A),P=l.shape.candlestickLineWidth,z=l.shape.candlestickStrokeColor||"#000";for(let N=R.start;N<R.end;N++){const B=A.values[N],W=(m=e.getCandlestickData)==null?void 0:m.call(e,B);if(!W)continue;const H=Gi(e,d,B,N);if(!H)continue;const{body:J,wickStart:q,wickEnd:at}=H;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=fT(e,d)?o.shape.lineFocusedWidth:o.shape.lineWidth,r.strokeStyle=e.color(d.id),(f=e.config.data_regions)!=null&&f[h.id]?TT(e,h,i):wd(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=uT(e,h,r);i.globalAlpha=s.shape.areaOpacity*Hi(e,d),i.fillStyle=Ld(e,i,h,"area",e.config.area_linearGradient?dT(e,d,u):null,m),Od(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,R;for(const C of e.filterTargetsToShow()){if(!br(e,C)||!Hr(e,C)||_a(e,C)&&!xT(e,C))continue;const P=e.color(C.id),z=ac(e,C),N=Hi(e,C),B=!!e.config.point_radialGradient,W=hT(e,C,z,B),H=Wr(e,C),J=H.end-H.start,q=W?Df(e.state.width,e.state.height,Yi(e,C,C.values[H.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>oT)for(let dt=H.start;dt<H.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=H.start;dt<H.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=H.start;dt<H.end;dt++){const ut=C.values[dt];if(!In(e,ut))continue;const xt=d(ut),bt=Yi(e,C,ut),Rt=xt?(R=(A=e.pointExpandedR)==null?void 0:A.call(e,ut))!=null?R: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?mT(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,R=A?Vl(e):new Set;l.withTranslation(u.left,u.top,()=>{o.forEach(C=>{var P,z,N,B,W,H;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,R).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:(H=c.shape.pointLineWidth)!=null?H: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],H=fd(e,W);H&&W.index>=P.start&&W.index<P.end&&In(e,W)&&N.push({d:W,text:H})}A+=N.length,N.length&&m.push(N)});const R={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,H;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,H=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],H=e.config.axis_rotated?ot[1]+3:at?et[1]-3:ot[1]+12,!e.config.axis_rotated&<&&(H+=15*(at?1:-1)),i.textAlign=e.config.axis_rotated?at?"left":"right":"center",i.textBaseline="alphabetic"}else c&&u&&({x:W,y:H}=d0(n.pos,N,N.index),{x:W,y:H}=vd(e,i,N,W,H));W+=ts(e,N,"x",R),H+=ts(e,N,"y",R),pn(W,H)&&this.drawDataLabel(e,N,B,W,H)}})})}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:R}=ti(e,f,l,!0);if(!pn(h,m)||!pn(h+A,m+R)||A<=0||R<=0)continue;const C={x:h,y:m,w:A,h:R};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=g0(e,d,A,R);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:""),H=(W.fontBoundingBoxAscent||0)+(W.fontBoundingBoxDescent||0)||(W.actualBoundingBoxAscent||0)+(W.actualBoundingBoxDescent||0),J=Math.max(B,H)+(z.length-1)*B,q=N?m+R/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,R=e.config.grid_focus_edge&&!e.config.tooltip_grouped;d&&r.strokePath(()=>{var C,P;if(f){if(r.traceLine(m(0),c,R&&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,R&&!z?c:A(0),l,R&&z?c:A(e.state.height))}}else if(r.traceLine(l,R&&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(R&&z?l:m(0),c,R&&!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),R=(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:R*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,H=rs(e,l),J=!!B&&(W!=null?W:0)>0,q=h==="circle"&&J&&ge(H)&&H<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:H}:{fill:N,alpha:H},R)}),this.drawFocusLabels(e,n)})}}var ST=Object.defineProperty,Fd=Object.getOwnPropertySymbols,AT=Object.prototype.hasOwnProperty,ET=Object.prototype.propertyIsEnumerable,CT=(t,e,n)=>e in t?ST(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,IT=(t,e)=>{var n={};for(var r in t)AT.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&&ET.call(t,r)&&(n[r]=t[r]);return n},ic=(t,e,n)=>CT(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 RT(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 OT(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 PT(t){const e={};return Object.keys(t!=null?t:{}).forEach(n=>{wT(n).forEach(r=>{OT(e,r,t[n])})}),e}function MT(t){if(!t)return{};const e=t,{selectors:n}=e,r=IT(e,["selectors"]);return Gr({},PT(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 LT{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=(wn,Wn)=>{const Zn=ce.getComputedStyle(wn),_n={};for(const Nn of Wn)_n[Nn]=Nn==="font"?RT(Zn,""):Zn.getPropertyValue(Nn).trim();return _n},u=(wn,Wn,Zn)=>{const _n=He.createElementNS(Pr,wn);_n.setAttribute("class",Wn),l.appendChild(_n);const Nn=c(_n,Zn);return l.removeChild(_n),Nn},f=(wn,Wn,Zn,_n)=>{const Nn=He.createElementNS(Pr,"g"),gr=He.createElementNS(Pr,Wn);Nn.setAttribute("class",wn),Zn&&gr.setAttribute("class",Zn),Nn.appendChild(gr),l.appendChild(Nn);const na=c(gr,_n);return l.removeChild(Nn),na},d=(wn,Wn,Zn,_n,Nn)=>{const gr=He.createElementNS(Pr,"g"),na=He.createElementNS(Pr,"g"),go=He.createElementNS(Pr,Zn);gr.setAttribute("class",wn),na.setAttribute("class",Wn),_n&&go.setAttribute("class",_n),na.appendChild(go),gr.appendChild(na),l.appendChild(gr);const nR=c(go,Nn);return l.removeChild(gr),nR},h=(wn,Wn,Zn,_n="")=>{const Nn=He.createElementNS(Pr,"g"),gr=He.createElementNS(Pr,"g"),na=He.createElementNS(Pr,Wn);Nn.setAttribute("class",`bb-axis ${wn}`),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=(wn,Wn)=>{const Zn=He.createElement("style");Zn.textContent=`
|
|
39
39
|
.bb-shapes-canvas-probe .bb-circle {
|
|
40
40
|
fill: ${m};
|
|
41
41
|
stroke: ${m};
|
|
42
42
|
}
|
|
43
|
-
`,He.head.appendChild(Zn);try{return f("bb-shapes bb-shapes-canvas-probe","circle",wn,Wn)}finally{Zn.remove()}},R=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_"),$=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"]),H=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"),Oe={axis:{lineColor:Xe(R.stroke,"#000"),lineWidth:De(R["stroke-width"],1),tickColor:Xe(C.stroke,Xe(R.stroke,"#000")),tickWidth:De(C["stroke-width"],De(R["stroke-width"],1)),labelFont:H.font||$.font||"10px sans-serif",xTickFont:P.font||$.font||"10px sans-serif",yTickFont:$.font||"10px sans-serif",y2TickFont:B.font||$.font||"10px sans-serif",labelColor:Xe($.fill,"#000"),xLabelColor:Xe(W.fill,Xe(P.fill,"#000")),yLabelColor:Xe(H.fill,Xe($.fill,"#000")),y2LabelColor:Xe(J.fill,Xe(H.fill,Xe($.fill,"#000"))),activeLabelColor:ni(z.fill,P.fill)||Xe($.fill,"#000")},grid:{lineColor:Xe(at.stroke,"#aaa"),lineWidth:De(at["stroke-width"],1),dashArray:Ki(at["stroke-dasharray"]),labelFont:et.font||$.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||$.font||"20px sans-serif",color:Xe(lt.fill,"#808080")},region:{fill:Xe(ft.fill,"steelblue"),opacity:De(ft["fill-opacity"],.1),labelFont:_.font||$.font||"10px sans-serif",labelColor:Xe(_.fill,"#000")},shape:{barOpacity:Ma(dt,1),barExpandedOpacity:De(Ma(ut,Ma(dt,1)),Ma(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(Ma(bt,1),1),lineWidth:De(Rt["stroke-width"],1),lineFocusedWidth:De(Et["stroke-width"],2),areaOpacity:Ma(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:Ma(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||$.font||"10px sans-serif",color:Xe(Le.fill,"#000")},title:{font:Yt.font||Le.font||$.font||"14px sans-serif",color:Xe(Yt.fill,"#000")}},Ua=MT(n),Kt=Gr(Oe,Ua),va=n==null?void 0:n.axis,tR=!!va&&Object.prototype.hasOwnProperty.call(va,"labelColor"),eR=!!va&&Object.prototype.hasOwnProperty.call(va,"labelFont");if(Kt.axis.lineWidth=De(Kt.axis.lineWidth,Oe.axis.lineWidth),Kt.axis.tickWidth=De(Kt.axis.tickWidth,Kt.axis.lineWidth),eR){const wn=va,Wn=Kt.axis.labelFont;wn.xTickFont===void 0&&(Kt.axis.xTickFont=Wn),wn.yTickFont===void 0&&(Kt.axis.yTickFont=Wn),wn.y2TickFont===void 0&&(Kt.axis.y2TickFont=Wn)}if(Kt.axis.labelFont=Kt.axis.labelFont||Oe.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,Oe.axis.labelColor),tR){const wn=Kt.axis.labelColor;va.xLabelColor===void 0&&(Kt.axis.xLabelColor=wn),va.yLabelColor===void 0&&(Kt.axis.yLabelColor=wn),va.y2LabelColor===void 0&&(Kt.axis.y2LabelColor=wn)}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,Oe.grid.lineWidth),Kt.grid.dashArray=Ki(Kt.grid.dashArray),Kt.focusGrid.lineWidth=De(Kt.focusGrid.lineWidth,Oe.focusGrid.lineWidth),Kt.focusGrid.dashArray=Ki(Kt.focusGrid.dashArray),Kt.region.opacity=De(Kt.region.opacity,Oe.region.opacity),Kt.shape.barOpacity=De(Kt.shape.barOpacity,Oe.shape.barOpacity),Kt.shape.barExpandedOpacity=De(Kt.shape.barExpandedOpacity,Kt.shape.barOpacity),Kt.shape.barLineWidth=De(Kt.shape.barLineWidth,Oe.shape.barLineWidth),Kt.shape.barConnectLineWidth=De(Kt.shape.barConnectLineWidth,Oe.shape.barConnectLineWidth),Kt.shape.candlestickLineWidth=De(Kt.shape.candlestickLineWidth,Oe.shape.candlestickLineWidth),Kt.shape.candlestickStrokeColor=Xe(Kt.shape.candlestickStrokeColor,Oe.shape.candlestickStrokeColor),Kt.shape.candlestickExpandedOpacity=De(Kt.shape.candlestickExpandedOpacity,Oe.shape.candlestickExpandedOpacity),Kt.shape.lineWidth=De(Kt.shape.lineWidth,Oe.shape.lineWidth),Kt.shape.lineFocusedWidth=De(Kt.shape.lineFocusedWidth,Oe.shape.lineFocusedWidth),Kt.shape.areaOpacity=De(Kt.shape.areaOpacity,Oe.shape.areaOpacity),Kt.shape.targetDefocusedOpacity=De(Kt.shape.targetDefocusedOpacity,Oe.shape.targetDefocusedOpacity),Kt.shape.pointLineWidth=ri(Kt.shape.pointLineWidth),Kt.selectedPoint.lineWidth=De(Kt.selectedPoint.lineWidth,Oe.selectedPoint.lineWidth),Kt.focusPoint.lineWidth=De(Kt.focusPoint.lineWidth,Oe.focusPoint.lineWidth),Kt.zoomBrush.opacity=De(Kt.zoomBrush.opacity,Oe.zoomBrush.opacity),Kt.subchartBrush.opacity=De(Kt.subchartBrush.opacity,Oe.subchartBrush.opacity),Kt.subchartBrush.handleOpacity=De(Kt.subchartBrush.handleOpacity,Oe.subchartBrush.handleOpacity),Kt.subchartBrush.handleLineWidth=De(Kt.subchartBrush.handleLineWidth,Oe.subchartBrush.handleLineWidth),Kt.treemap.lineWidth=De(Kt.treemap.lineWidth,Oe.treemap.lineWidth),this.style=Kt,this.cacheContainer=e,this.cacheKey=Bd(e,n),l.remove()}reload(e,n){const r=Bd(e,n);r!==null&&this.style&&this.cacheContainer===e&&this.cacheKey===r||this.load(e,n)}}var DT=Object.defineProperty,FT=(t,e,n)=>e in t?DT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sr=(t,e,n)=>FT(t,typeof e!="symbol"?e+"":e,n);const La=24,zd=64,oc=[lr,er,Yn];function ai(t,e){return Math.floor(t/e)}function Ud(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 kd(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 NT(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:La;return Number.isFinite(s)?s:La}function $T(t,e){return Ra(t,e)&&e.values.length>Mf&&!t.config.data_selection_enabled&&Number.isFinite(t.config.point_sensitivity)&&Number.isFinite(t.config.point_r)}class BT{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",La),Sr(this,"maxPointSensitivity",La),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=La,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=>Ra(e,C)||wa(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 $,B;if(!h)return;const W=(B=($=e.getXCacheKey)==null?void 0:$.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:$}=z;if(!Il(e,$))continue;const{x:B,y:W,w:H,h:J}=ti(e,z,C,!0);!pn(B,W)||!pn(B+H,W+J)||this.addBar({x:B,y:W,w:H,h:J,data:$})}this.indices=[];return}if(n.indices[jt.BAR]||f.some(er.bind(null,e))){const C=er.bind(null,e),P=tr(e,n,jt.BAR,C),z=e.generateGetBarPoints(P,!1);f.filter(C).filter($=>_a(e,$,oc)).forEach($=>{const B=Wr(e,$);for(let W=B.start;W<B.end;W++){const H=$.values[W];if(!In(e,H))continue;const J=Xi(e,z,H,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:H}),m(at+ot/2,et+lt/2,H)}})}if(n.indices[jt.CANDLESTICK]||f.some(Yn.bind(null,e))){const C=Yn.bind(null,e),P=tr(e,n,jt.CANDLESTICK,C),z=(o=e.generateGetCandlestickPoints)==null?void 0:o.call(e,P,!1);z&&f.filter(C).filter($=>_a(e,$,oc)).forEach($=>{var B;const W=Wr(e,$);for(let H=W.start;H<W.end;H++){const J=$.values[H];if(!((B=e.getCandlestickData)==null?void 0:B.call(e,J)))continue;const at=Gi(e,z,J,H);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:R}=n.pos;A&&R&&f.filter(lr.bind(null,e)).filter(C=>_a(e,C,oc)).forEach(C=>{const P=Wr(e,C),z=$T(e,C)?Df(c,u,e.config.point_r):null;for(let $=P.start;$<P.end;$++){const B=C.values[$];if(!In(e,B))continue;const W=l.left+A(B,$),H=l.top+R(B,$),J=NT(e,B);pn(W,H)&&(z&&!Ff(z,W-l.left,H-l.top)||(this.addPoint({x:W,y:H,sensitivity:J,data:B}),m(W,H,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 kd(this.barGrid,e,n,zd)){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 kd(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:La;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),Ud(this.barGrid,e,zd)}addPoint(e){var n;const r=(n=e.sensitivity)!=null?n:La;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)Ud(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 zT=Object.defineProperty,Xd=Object.getOwnPropertySymbols,UT=Object.prototype.hasOwnProperty,kT=Object.prototype.propertyIsEnumerable,Gd=(t,e,n)=>e in t?zT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cn=(t,e)=>{for(var n in e||(e={}))UT.call(e,n)&&Gd(t,n,e[n]);if(Xd)for(var n of Xd(e))kT.call(e,n)&&Gd(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"},nr={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"},Da={dragarea:"bb-dragarea",INCLUDED:"_included_"},Zi={funnel:"bb-funnel",chartFunnel:"bb-chart-funnel",chartFunnels:"bb-chart-funnels",funnelBackground:"bb-funnel-background"},rr={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"},rn={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"},Wd={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"},Vd={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"},jd={treemap:"bb-treemap",chartTreemap:"bb-chart-treemap",chartTreemaps:"bb-chart-treemaps"},lc={buttonZoomReset:"bb-zoom-reset",zoomBrush:"bb-zoom-brush"};var en=cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn({},ze),Ye),as),Rn),nr),Yr),Bn),sc),Da),rr),$e),Lr),Kr),rn),Zi),Tn),Zr),Wd),Ji),gn),bn),Vd),En),is),jd),lc),XT={boost_useCssRule:!1,boost_useWorker:!1},GT={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},WT={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},VT={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:[]},jT={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},HT={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},YT={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:""},KT={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},ZT=Object.defineProperty,JT=(t,e,n)=>e in t?ZT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QT=(t,e,n)=>JT(t,typeof e!="symbol"?e+"":e,n);const Hd=class Sp{static setOptions(e){for(let n=0;n<e.length;n++)Object.assign(this.data,e[n])}constructor(){return fy(VT,XT,YT,GT,KT,WT,jT,HT,Sp.data)}};QT(Hd,"data",{});let Fa=Hd;class _T{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 qT{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 Yd={element:_T,state:qT};class t1{constructor(){Object.keys(Yd).forEach(e=>{this[e]=new Yd[e]})}getStore(e){return this[e]}}var e1=Object.defineProperty,n1=(t,e,n)=>e in t?e1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,r1=(t,e,n)=>n1(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 a1{constructor(){r1(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 Kd="https://github.com/naver/billboard.js/blob/master/MODULE_IMPORTS.md";function i1(t){const e=t,{config:n}=e;let r="";if(sr(n.data_type||n.data_types)&&!e[Xa.LINE])r="line";else for(const i in Xa){const o=jt[i];if(e.hasType(o)&&!e[Xa[i]]){r=o;break}}r&&Zd(`Please, make sure if %c${uy(r)}`,"module has been imported and specified correctly.",Kd)}function WR(t){const e=An[t];e&&Zd(`Please, make sure if %c${e}`,"module has been imported and specified correctly.",Kd)}function Zd(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 o1(t){let e;for(;e=t.sourceEvent;)t=e;return t}function dr(t,e){if(t=o1(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 s1=/\s?(bb-)/g,l1=/\.+/g;function c1(t){return t.replace(s1,".$1").replace(l1,".")}function Jd(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
|
+
`,He.head.appendChild(Zn);try{return f("bb-shapes bb-shapes-canvas-probe","circle",wn,Wn)}finally{Zn.remove()}},R=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"]),H=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"),Oe={axis:{lineColor:Xe(R.stroke,"#000"),lineWidth:De(R["stroke-width"],1),tickColor:Xe(C.stroke,Xe(R.stroke,"#000")),tickWidth:De(C["stroke-width"],De(R["stroke-width"],1)),labelFont:H.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(H.fill,Xe(N.fill,"#000")),y2LabelColor:Xe(J.fill,Xe(H.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=MT(n),Kt=Gr(Oe,za),ma=n==null?void 0:n.axis,tR=!!ma&&Object.prototype.hasOwnProperty.call(ma,"labelColor"),eR=!!ma&&Object.prototype.hasOwnProperty.call(ma,"labelFont");if(Kt.axis.lineWidth=De(Kt.axis.lineWidth,Oe.axis.lineWidth),Kt.axis.tickWidth=De(Kt.axis.tickWidth,Kt.axis.lineWidth),eR){const wn=ma,Wn=Kt.axis.labelFont;wn.xTickFont===void 0&&(Kt.axis.xTickFont=Wn),wn.yTickFont===void 0&&(Kt.axis.yTickFont=Wn),wn.y2TickFont===void 0&&(Kt.axis.y2TickFont=Wn)}if(Kt.axis.labelFont=Kt.axis.labelFont||Oe.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,Oe.axis.labelColor),tR){const wn=Kt.axis.labelColor;ma.xLabelColor===void 0&&(Kt.axis.xLabelColor=wn),ma.yLabelColor===void 0&&(Kt.axis.yLabelColor=wn),ma.y2LabelColor===void 0&&(Kt.axis.y2LabelColor=wn)}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,Oe.grid.lineWidth),Kt.grid.dashArray=Ki(Kt.grid.dashArray),Kt.focusGrid.lineWidth=De(Kt.focusGrid.lineWidth,Oe.focusGrid.lineWidth),Kt.focusGrid.dashArray=Ki(Kt.focusGrid.dashArray),Kt.region.opacity=De(Kt.region.opacity,Oe.region.opacity),Kt.shape.barOpacity=De(Kt.shape.barOpacity,Oe.shape.barOpacity),Kt.shape.barExpandedOpacity=De(Kt.shape.barExpandedOpacity,Kt.shape.barOpacity),Kt.shape.barLineWidth=De(Kt.shape.barLineWidth,Oe.shape.barLineWidth),Kt.shape.barConnectLineWidth=De(Kt.shape.barConnectLineWidth,Oe.shape.barConnectLineWidth),Kt.shape.candlestickLineWidth=De(Kt.shape.candlestickLineWidth,Oe.shape.candlestickLineWidth),Kt.shape.candlestickStrokeColor=Xe(Kt.shape.candlestickStrokeColor,Oe.shape.candlestickStrokeColor),Kt.shape.candlestickExpandedOpacity=De(Kt.shape.candlestickExpandedOpacity,Oe.shape.candlestickExpandedOpacity),Kt.shape.lineWidth=De(Kt.shape.lineWidth,Oe.shape.lineWidth),Kt.shape.lineFocusedWidth=De(Kt.shape.lineFocusedWidth,Oe.shape.lineFocusedWidth),Kt.shape.areaOpacity=De(Kt.shape.areaOpacity,Oe.shape.areaOpacity),Kt.shape.targetDefocusedOpacity=De(Kt.shape.targetDefocusedOpacity,Oe.shape.targetDefocusedOpacity),Kt.shape.pointLineWidth=ri(Kt.shape.pointLineWidth),Kt.selectedPoint.lineWidth=De(Kt.selectedPoint.lineWidth,Oe.selectedPoint.lineWidth),Kt.focusPoint.lineWidth=De(Kt.focusPoint.lineWidth,Oe.focusPoint.lineWidth),Kt.zoomBrush.opacity=De(Kt.zoomBrush.opacity,Oe.zoomBrush.opacity),Kt.subchartBrush.opacity=De(Kt.subchartBrush.opacity,Oe.subchartBrush.opacity),Kt.subchartBrush.handleOpacity=De(Kt.subchartBrush.handleOpacity,Oe.subchartBrush.handleOpacity),Kt.subchartBrush.handleLineWidth=De(Kt.subchartBrush.handleLineWidth,Oe.subchartBrush.handleLineWidth),Kt.treemap.lineWidth=De(Kt.treemap.lineWidth,Oe.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 DT=Object.defineProperty,FT=(t,e,n)=>e in t?DT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Sr=(t,e,n)=>FT(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 NT(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 $T(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 BT{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:H,h:J}=ti(e,z,C,!0);!pn(B,W)||!pn(B+H,W+J)||this.addBar({x:B,y:W,w:H,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 H=N.values[W];if(!In(e,H))continue;const J=Xi(e,z,H,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:H}),m(at+ot/2,et+lt/2,H)}})}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 H=W.start;H<W.end;H++){const J=N.values[H];if(!((B=e.getCandlestickData)==null?void 0:B.call(e,J)))continue;const at=Gi(e,z,J,H);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:R}=n.pos;A&&R&&f.filter(br.bind(null,e)).filter(C=>Qa(e,C,oc)).forEach(C=>{const P=Wr(e,C),z=$T(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),H=l.top+R(B,N),J=NT(e,B);pn(W,H)&&(z&&!Ff(z,W-l.left,H-l.top)||(this.addPoint({x:W,y:H,sensitivity:J,data:B}),m(W,H,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 zT=Object.defineProperty,kd=Object.getOwnPropertySymbols,UT=Object.prototype.hasOwnProperty,kT=Object.prototype.propertyIsEnumerable,Xd=(t,e,n)=>e in t?zT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cn=(t,e)=>{for(var n in e||(e={}))UT.call(e,n)&&Xd(t,n,e[n]);if(kd)for(var n of kd(e))kT.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"},rn={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 en=cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn(cn({},ze),Ye),as),Rn),rr),Yr),Bn),sc),La),ar),$e),Lr),Kr),rn),Zi),Tn),Zr),Gd),Ji),gn),bn),Wd),En),is),Vd),lc),XT={boost_useCssRule:!1,boost_useWorker:!1},GT={color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0},WT={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},VT={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:[]},jT={title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"},HT={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},YT={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:""},KT={interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},interaction_onout:!0},ZT=Object.defineProperty,JT=(t,e,n)=>e in t?ZT(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,QT=(t,e,n)=>JT(t,typeof e!="symbol"?e+"":e,n);const jd=class bp{static setOptions(e){for(let n=0;n<e.length;n++)Object.assign(this.data,e[n])}constructor(){return uy(VT,XT,YT,GT,KT,WT,jT,HT,bp.data)}};QT(jd,"data",{});let Da=jd;class _T{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 qT{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:_T,state:qT};class t1{constructor(){Object.keys(Hd).forEach(e=>{this[e]=new Hd[e]})}getStore(e){return this[e]}}var e1=Object.defineProperty,n1=(t,e,n)=>e in t?e1(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,r1=(t,e,n)=>n1(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 a1{constructor(){r1(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 i1(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${cy(r)}`,"module has been imported and specified correctly.",Yd)}function WR(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 o1(t){let e;for(;e=t.sourceEvent;)t=e;return t}function dr(t,e){if(t=o1(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 s1=/\s?(bb-)/g,l1=/\.+/g;function c1(t){return t.replace(s1,".$1").replace(l1,".")}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(`
|
|
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
|
|
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 u1(t,e,n){const{rootSelector:r="",sheet:i}=t,o=`${r} ${c1(e)} {${n.join(";")}}`;return i[i.insertRule?"insertRule":"addRule"](o,i.cssRules.length)}function f1(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 d1(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 h1(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 g1={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:v1,clearTimeout:p1}=ce;function m1(t){const e=[];let n;const r=function(){r.clear(),t===!1?n=yf(()=>{n=null,e.forEach(i=>i())},{timeout:200}):n=v1(()=>{n=null,e.forEach(i=>i())},ge(t)?t:200)};return r.clear=()=>{n&&((t===!1?Wx:p1)(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}wf(()=>{r==null||r()},i)};return e.add=function(n){tn(n)?t=t.concat(n):t.push(n)},e}const Fa={};let x1=0;function y1(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
46
|
|
|
47
47
|
self.onmessage=function({data}) {
|
|
48
48
|
const result = (${r}).apply(null, data.args);
|
|
49
49
|
self.postMessage({id: data.id, result});
|
|
50
|
-
};`],{type:"text/javascript"});Na[o]={src:ce.URL.createObjectURL(s),worker:null}}catch(s){return null}return{key:o,src:Na[o].src}}function T1(t,e){const n=Na[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=y1(e,r),s=o&&T1(o.key,o.src);s&&(i=function(...l){const c=++x1,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 b1(){for(const t in Na){const e=Na[t];e.worker&&e.worker.terminate(),e.src&&ce.URL.revokeObjectURL(e.src),delete Na[t]}}const hc=34,_i=10,gc=13;function nh(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 R,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:(R=i.charCodeAt(c++))===_i?d=!0:R===gc&&(d=!0,i.charCodeAt(c)===_i&&++c),i.slice(A+1,C).replace(/""/g,'"')}for(;c<l;){if((R=i.charCodeAt(C=c++))===_i)d=!0;else if(R===gc)d=!0,i.charCodeAt(c)===_i&&++c;else if(R!==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 R=o(A,u++);R!=null&&s.push(R)}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 rh=nh(","),ah=nh(" "),S1=rh.parse,A1=rh.parseRows,E1=ah.parse,C1=ah.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 ih(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 I1(t,e="csv",n,r,i){const o=new XMLHttpRequest,s={csv:R1,tsv:w1,json:ih};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 oh(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 R1(t){return oh({rows:A1,parse:S1},t)}function w1(t){return oh({rows:C1,parse:E1},t)}function sh(t,e){const n=t||(e==null?void 0:e.data_keys);return n!=null&&n.x&&(e.data_x=n.x),n}function O1(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 P1={convertData(t,e){const{config:n}=this,r=o=>o!=null&&o.length&&!sr(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)I1(i.url,i.mimeType,i.headers,sh(i.keys,n),e);else if(i.json)dc(r(i.json),ih,e,[vc,pc])(i.json,sh(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,R)=>(n.isX.call(n,R)?A.xs.push(R):A.ids.push(R),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()};O1.bind(n)(c,t,f);const d=f.customX&&f.categorized&&i.axis_x_categories.length?new Map(i.axis_x_categories.map((A,R)=>[A,R])):null,h=i.data_idConverter.bind(n.api),m=c.map((A,R)=>{const C=h(A),P=n.getXKey(A),z=f.customX&&f.categorized,$=z&&R===0&&(()=>{const H=Of(i.axis_x_categories);return t.every(J=>H.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((H,J)=>{var q;const at=H[P];let et=H[A],ot;if(et=et!==null&&!isNaN(et)&&!je(et)?+et:tn(et)||je(et)?et:null,(z||o.hasRadar)&&R===0&&!xn(at)){!$&&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(H=>ln(H.x))}});if(m.forEach(A=>{var R;i.data_xSort&&(A.values=A.values.sort((C,P)=>{const z=C.x||C.x===0?C.x:1/0,$=P.x||P.x===0?P.x:1/0;return z-$})),A.values.forEach((C,P)=>C.index=P),(R=n.data.xs[A.id])==null||R.sort((C,P)=>C-P)}),o.hasNegativeValue=m.some(A=>A.values.some(R=>R.value!==null&&R.value<0)),o.hasPositiveValue=m.some(A=>A.values.some(R=>R.value!==null&&R.value>0)),s&&n.isValidChartType(s)){const A=n.mapToIds(m).filter(R=>!(R in i.data_types)||!n.isValidChartType(i.data_types[R]));n.setTargetType(A,s)}return m.forEach(A=>n.cache.add(A.id_org,A,!0)),m}};const M1={areaRange:{high:0,mid:1,low:2},candlestick:{open:0,high:1,low:2,close:3,volume:4}};var L1={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 ln(e)?e:null},getNextX(t){const e=this.axis.xs[t+1];return ln(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=Qa(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?tn(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)),Qa(r)},addTargetIds(t,e){const{state:n}=this;(tn(e)?e:[e]).forEach(i=>n[t].add(i))},removeTargetIds(t,e){const{state:n}=this;(tn(e)?e:[e]).forEach(i=>n[t].delete(i))},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=tn(u)?u.slice(0,4):[u.open,u.high,u.low,u.close]),tn(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 Sa(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=Ut(u).datum();c=f&&Object.keys(f).length===1?f.index:void 0}else{const u=r.axis_rotated,f=qd(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 R=f.createElementNS("http://www.w3.org/2000/svg","text");return R.textContent=A,d.appendChild(R),R});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,R=s-1;for(;A<R;){const B=A+R>>1,W=d(t[B].x);(m?W<h:W>h)?A=B+1:R=B}const C=[],P=new Set,z=B=>{B>=0&&B<s&&!P.has(B)&&(P.add(B),C.push(t[B]))},$=B=>{if(B<0||B>=s)return;const W=r.getXCacheKey(t[B].x);let H=B;for(;H>=0&&r.getXCacheKey(t[H].x)===W;)z(H--);for(H=B+1;H<s&&r.getXCacheKey(t[H].x)===W;)z(H++)};if(c||u)for(let B=A-2;B<=A+2;B++)$(B);else{const B=f,W=(H,J)=>{for(let q=H;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?`.${nr.chartBar}.${ze.target}${r.getTargetSelectorSuffix(u.id)} .${nr.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),c=(i.zoom||i.x)(t.x);return Math.sqrt(Math.pow(c-e[o],2)+Math.pow(l-e[s],2))},convertValuesToStep(t){const e=this,{axis:n,config:r}=e,i=r.line_step_type,o=n?n.isCategorized():!1,s=tn(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=tn(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(tn(o)){if(n==="bar")return o.reduce((s,l)=>l-s);{const s=(i=(r=M1[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,R)=>A.map((C,P)=>(ge(C)?C:0)+R[P])),f=f.map((A,R)=>A-m[R]))}}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)||tn(t.value)&&t.value.length>=2)},isBarRangeType(t){const e=this,{value:n}=t;return e.isBarType(t)&&tn(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 D1={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)}},F1={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 N1(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=N1(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=$1(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 $1(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]=F1,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 B1={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=Ut(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=Ut(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 z1(t){return!t.ctrlKey&&!t.button}function U1(){return this.parentNode}function k1(t,e){return e==null?{x:t.x,y:t.y}:e}function X1(){return navigator.maxTouchPoints||"ontouchstart"in this}function uh(){var t=z1,e=U1,n=k1,r=X1,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,B1).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 H=$(this,e.call(this,B,W),B,W,"mouse");H&&(Ut(B.view).on("mousemove.drag",A,qi).on("mouseup.drag",R,qi),xc(B.view),mc(B),u=!1,l=B.clientX,c=B.clientY,H("start",B))}}function A(B){if(oi(B),!u){var W=B.clientX-l,H=B.clientY-c;u=W*W+H*H>d}i.mouse("drag",B)}function R(B){Ut(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 H=B.changedTouches,J=e.call(this,B,W),q=H.length,at,et;for(at=0;at<q;++at)(et=$(this,J,B,W,H[at].identifier,H[at]))&&(mc(B),et("start",B,H[at]))}}function P(B){var W=B.changedTouches,H=W.length,J,q;for(J=0;J<H;++J)(q=i[W[J].identifier])&&(oi(B),q("drag",B,W[J]))}function z(B){var W=B.changedTouches,H=W.length,J,q;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),J=0;J<H;++J)(q=i[W[J].identifier])&&(mc(B),q("end",B,W[J]))}function $(B,W,H,J,q,at){var et=o.copy(),ot=dr(at||H,W),lt,ft,_;if((_=n.call(B,new Tc("beforestart",{sourceEvent:H,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 G1={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)(Ut(m).datum(),m)}h.each(function(){t&&(u(Ut(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(hr(r,this))}).on("start",function(r){n.event=r,t.dragstart(hr(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:R,svg:C,treemap:P}}=s;let z=(o=(i=(f||h)&&c.rect||d&&R.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 $=s.isMultipleX(),B=l.axis_rotated;let{width:W,left:H,top:J}=un(z);if(u&&!d&&!$){const ot=c.coords[e];ot?(W=ot.w,H+=ot.x,J+=ot.y):(W=0,H=0,J=0)}let q=H+(n?n[0]:0)+($||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()),g1[/^(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)}},W1={categoryName(t){var e;const{axis_x_categories:n}=this.config;return(e=n==null?void 0:n[t])!=null?e:t}};const V1=/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g;var j1={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(en[n?"shapes":"shape"],s[i]):"")+this.generateClass(en[t],s[r?"id":i])).trim()}},getChartClass(t){return e=>en[`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(en.region,e)} ${"class"in t?t.class:""}`},classTarget(t){const e=this.config.data_classes[t];let n="";return e&&(n=` ${en.target}-${e}`),this.generateClass(en.target,t)+n},classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused(t){return` ${this.state.focusedTargetIds.has(t.id)?en.focused:""}`},classDefocused(t){return` ${this.state.defocusedTargetIds.has(t.id)?en.defocused:""}`},getTargetSelectorSuffix(t){return(t||t===0?`-${t}`:"").replace(V1,"-")},selectorTarget(t,e="",n=""){const r=this.getTargetSelectorSuffix(t);return`${e}.${en.target+r} ${n}, ${e}.${en.circles+r} ${n}`},selectorTargets(t,e){const n=t||[];return n.length?n.map(r=>this.selectorTarget(r,e)):null},selectorLegend(t){return`.${en.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 VR 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)},ja.apply(i,arguments),i}const H1=(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 Y1(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 K1=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Z1={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(Y1(e.chart)||K1).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 H1(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 R;A.each(function(C,P){R=P===0?this.style.stopColor:this.style.stopColor===R}),R===!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])||"");r.select(`#${l}`).empty()&&r.append("filter").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height).attr("id",l).html(`<feFlood flood-color="${c}" />
|
|
51
|
-
<feComposite 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,R=le(m)?m.bind(t.api)(o.id):m;f.defs&&f.defs.append("stop").attr("offset",h).attr("stop-color",R||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,$a=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 $a||(xh(J1),$a=ro.now()+hs)}function J1(){$a=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 Q1(){Sc(),++si;for(var t=fs,e;t;)(e=$a-t._time)>=0&&t._call.call(void 0,e),t=t._next;--si}function Th(){$a=(ds=ro.now())+hs,si=to=0;try{Q1()}finally{si=0,q1(),$a=0}}function _1(){var t=ro.now(),e=t-ds;e>mh&&(hs-=e,ds=t)}function q1(){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-$a;e>24?(t<1/0&&(to=setTimeout(Th,t-ro.now()-hs)),eo&&(eo=clearInterval(eo))):(eo||(ds=ro.now(),eo=setInterval(_1,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 tb=cs("start","end","cancel","interrupt"),eb=[],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;nb(t,n,{name:e,index:r,group:i,on:tb,tween:eb,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 nb(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 rb(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 ab(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 ib(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 R=m.push("translate(",null,e,null,n);A.push({i:R-4,x:yr(u,d)},{i:R-2,x:yr(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:yr(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:yr(u,f)}):f&&d.push(i(d)+"skewX("+f+r)}function c(u,f,d,h,m,A){if(u!==d||f!==h){var R=m.push(i(m)+"scale(",null,",",null,")");A.push({i:R-4,x:yr(u,d)},{i:R-2,x:yr(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,R=h.length,C;++A<R;)d[(C=h[A]).i]=C.x(m);return d.join("")}}}var ob=Rh(ab,"px, ","px)","deg)"),sb=Rh(ib,", ",")",")");function lb(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 cb(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 ub(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?lb:cb)(n,t,e))}function wc(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 wh(t,e){var n;return(typeof e=="number"?yr:e instanceof pa?Oo:(n=pa(e))?(e=n,Oo):Nu)(t,e)}function fb(t){return function(){this.removeAttribute(t)}}function db(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hb(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 gb(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 vb(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 pb(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 mb(t,e){var n=Ot(t),r=n==="transform"?sb:wh;return this.attrTween(t,typeof e=="function"?(n.local?pb:vb)(n,r,wc(this,"attr."+t,e)):e==null?(n.local?db:fb)(n):(n.local?gb:hb)(n,r,e))}function xb(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yb(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Tb(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 bb(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&xb(t,o)),n}return i._value=e,i}function Sb(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?Tb:bb)(r,e))}function Ab(t,e){return function(){Ic(this,t).delay=+e.apply(this,arguments)}}function Eb(t,e){return e=+e,function(){Ic(this,t).delay=e}}function Cb(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ab:Eb)(e,t)):Ar(this.node(),e).delay}function Ib(t,e){return function(){Dr(this,t).duration=+e.apply(this,arguments)}}function Rb(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"?Ib:Rb)(e,t)):Ar(this.node(),e).duration}function Ob(t,e){if(typeof e!="function")throw new Error;return function(){Dr(this,t).ease=e}}function Pb(t){var e=this._id;return arguments.length?this.each(Ob(e,t)):Ar(this.node(),e).ease}function Mb(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Dr(this,t).ease=n}}function Lb(t){if(typeof t!="function")throw new Error;return this.each(Mb(this._id,t))}function Db(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 Fb(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 Nb(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 $b(t,e,n){var r,i,o=Nb(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 Bb(t,e){var n=this._id;return arguments.length<2?Ar(this.node(),n).on.on(t):this.each($b(n,t,e))}function zb(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ub(){return this.on("end.remove",zb(this._id))}function kb(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 Xb(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),R=0,C=h.length;R<C;++R)(m=h[R])&&ms(m,e,n,R,h,A);o.push(h),s.push(f)}return new Jr(o,s,e,n)}var Gb=ue.prototype.constructor;function Wb(){return new Gb(this._groups,this._parents)}function Vb(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 Oh(t){return function(){this.style.removeProperty(t)}}function jb(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 Hb(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 Yb(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=Oh(e)):void 0;(u!==n||i!==f)&&(r=(n=u).copy()).on(s,i=f),c.on=r}}function Kb(t,e,n){var r=(t+="")=="transform"?ob:wh;return e==null?this.styleTween(t,Vb(t,r)).on("end.style."+t,Oh(t)):typeof e=="function"?this.styleTween(t,Hb(t,r,wc(this,"style."+t,e))).each(Yb(this._id,t)):this.styleTween(t,jb(t,r,e),n).on("end.style."+t,null)}function Zb(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Jb(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&Zb(t,s,n)),r}return o._value=e,o}function Qb(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,Jb(t,e,n==null?"":n))}function _b(t){return function(){this.textContent=t}}function qb(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function tS(t){return this.tween("text",typeof t=="function"?qb(wc(this,"text",t)):_b(t==null?"":t+""))}function eS(t){return function(e){this.textContent=t.call(this,e)}}function nS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&eS(i)),e}return r._value=t,r}function rS(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,nS(t))}function aS(){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 iS(){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 oS=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++oS}var Qr=ue.prototype;Jr.prototype=Ph.prototype={constructor:Jr,select:kb,selectAll:Xb,selectChild:Qr.selectChild,selectChildren:Qr.selectChildren,filter:Db,merge:Fb,selection:Wb,transition:aS,call:Qr.call,nodes:Qr.nodes,node:Qr.node,size:Qr.size,empty:Qr.empty,each:Qr.each,on:Bb,attr:mb,attrTween:Sb,style:Kb,styleTween:Qb,text:tS,textTween:rS,remove:Ub,tween:ub,delay:Cb,duration:wb,ease:Pb,easeVarying:Lb,end:iS,[Symbol.iterator]:Qr[Symbol.iterator]};function jR(t){return t*t*t}function HR(t){return--t*t*t+1}function sS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var lS={time:null,delay:0,duration:250,ease:sS};function cS(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 uS(t){var e,n;t instanceof Jr?(e=t._id,t=t._name):(e=Mh(),(n=lS).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||cS(c,e));return new Jr(r,this._parents,t,e)}ue.prototype.interrupt=rb,ue.prototype.transition=uS;var Oc=(t=>()=>t);function fS(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 dS(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]]}},hS={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"},gS={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},vS={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 pS(t){return!t.ctrlKey&&!t.button}function mS(){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 xS(){return navigator.maxTouchPoints||"ontouchstart"in this}function Dc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function yS(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 TS(){return Fc(ys)}function bS(){return Fc(Ts)}function YR(){return Fc(hS)}function Fc(t){var e=mS,n=pS,r=xS,i=!0,o=cs("start","brush","end"),s=6,l;function c(C){var P=C.property("__brush",R).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 $=Dc(this).extent;Ut(this).attr("x",$[0][0]).attr("y",$[0][1]).attr("width",$[1][0]-$[0][0]).attr("height",$[1][1]-$[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($){return $.type});z.exit().remove(),z.enter().append("rect").attr("class",function($){return"handle handle--"+$.type}).attr("cursor",function($){return _r[$.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($){f(this,arguments).beforestart().start($)}).on("interrupt.brush end.brush",function($){f(this,arguments).end($)}).tween("brush",function(){var $=this,B=$.__brush,W=f($,arguments),H=B.selection,J=t.input(typeof P=="function"?P.apply(this,arguments):P,B.extent),q=Wa(H,J);function at(et){B.selection=et===1&&J===null?null:q(et),u.call($),W.brush()}return H!==null&&J!==null?at:at(1)}):C.each(function(){var $=this,B=arguments,W=$.__brush,H=t.input(typeof P=="function"?P.apply($,B):P,W.extent),J=f($,B).beforestart();li($),W.selection=H===null?null:H,u.call($),J.start(z).brush(z).end(z)})},c.clear=function(C,P){c.move(C,null,P)};function u(){var C=Ut(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 $=C.__brush.emitter;return $&&(!z||!$.clean)?$: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 $=Ut(this.that).datum();o.call(C,this.that,new fS(C,{sourceEvent:P,target:c,selection:t.output(this.state.selection),mode:z,dispatch:o}),$)}};function h(C){if(l&&!C.touches||!n.apply(this,arguments))return;var P=this,z=C.target.__data__.type,$=(i&&C.metaKey?z="overlay":z)==="selection"?Lh:i&&C.altKey?ui:ci,B=t===Ts?null:gS[z],W=t===ys?null:vS[z],H=Dc(P),J=H.extent,q=H.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 Oe=Se.identifier;return Se=dr(Se,P),Se.point0=Se.slice(),Se.identifier=Oe,Se});li(P);var ke=f(P,arguments,!0).beforestart();if(z==="overlay"){q&&(me=!0);const Se=[Ie[0],Ie[1]||Ie[0]];H.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=Ut(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=Ut(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,$.name);function Yt(Se){for(const Oe of Se.changedTouches||[Se])for(const Ua of Ie)Ua.identifier===Oe.identifier&&(Ua.cur=dr(Oe,P));if(xe&&!Te&&!Fe&&Ie.length===1){const Oe=Ie[0];Dh(Oe.cur[0]-Oe[0])>Dh(Oe.cur[1]-Oe[1])?Fe=!0:Te=!0}for(const Oe of Ie)Oe.cur&&(Oe[0]=Oe.cur[0],Oe[1]=Oe.cur[1]);me=!0,Pc(Se),dn(Se)}function dn(Se){const Oe=Ie[0],Ua=Oe.point0;var Kt;switch(Zt=Oe[0]-Ua[0],fe=Oe[1]-Ua[1],$){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]])),H.selection&&(q=H.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)&&(H.selection=[[ot,_],[xt,Et]],u.call(P),ke.brush(Se,$.name))}function qe(Se){if(dS(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),H.selection&&(q=H.selection),yS(q)&&(H.selection=null,u.call(P)),ke.end(Se,$.name)}function Dn(Se){switch(Se.keyCode){case 16:{xe=B&&W;break}case 18:{$===ci&&(B&&(ut=xt-Zt*B,et=ot+Zt*B),W&&(Rt=Et-fe*W,ft=_+fe*W),$=ui,dn(Se));break}case 32:{($===ci||$===ui)&&(B<0?ut=xt-Zt:B>0&&(et=ot-Zt),W<0?Rt=Et-fe:W>0&&(ft=_-fe),$=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:{$===ui&&(B<0?ut=xt:B>0&&(et=ot),W<0?Rt=Et:W>0&&(ft=_),$=ci,dn(Se));break}case 32:{$===Mc&&(Se.altKey?(B&&(ut=xt-Zt*B,et=ot+Zt*B),W&&(Rt=Et-fe*W,ft=_+fe*W),$=ui):(B<0?ut=xt:B>0&&(et=ot),W<0?Rt=Et:W>0&&(ft=_),$=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 R(){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:Oc(Lc(C)),c):e},c.filter=function(C){return arguments.length?(n=typeof C=="function"?C:Oc(!!C),c):n},c.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:Oc(!!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 SS(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 AS(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 ES={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=Of(f);let h;if(u.length>0){const m=e.getValuesAsIdKeyed(t),A=t.some(W=>W.values.some(H=>H.value<0)),R=t.some(W=>W.values.some(H=>H.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 H=W.filter(J=>d.has(J));if(H.length){const J=H[0],q=C.get(J);P[J]&&A&&(P[J]=P[J].map(at=>at<0?at:0)),z[J]&&R&&(z[J]=z[J].map(at=>at>0?at:0)),H.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&&!(R&&ft<0)&&(z[J][lt]+=ft)})}})}});const $=[],B=[];for(const W in P)$.push(Tr("min",P[W])),B.push(Tr("max",z[W]));h=[Tr("min",$),Tr("max",B)]}else h=SS(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`],R=r.hasDataLabel()&&o.axis_rotated,C=r.hasDataLabel()&&!o.axis_rotated,[P,z]=r.getYDomainMinMaxBoth(f);let $=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`]});$=We(d)?d:We(h)?$<=h?$:h-10:$,B=We(h)?h:We(d)?d<=B?B:d+10:B,isNaN($)&&($=0),isNaN(B)&&(B=$),$===B&&($<0?B=0:$=0);const H=$>=0&&B>=0,J=$<=0&&B<=0;(We(d)&&H||We(h)&&J)&&(W=!1),W&&(H&&($=0),J&&(B=0));const q=Math.abs(B-$);let at={top:q*.1,bottom:q*.1};if(ln(m)){const lt=Math.max(Math.abs($),Math.abs(B));B=m+lt,$=m-lt}if(R){const lt=Aa(s.y.range()),ft=r.getDataLabelLength($,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($,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&&(H&&(at.bottom=$),J&&(at.top=-B));const ot=c?[$,B].map(lt=>lt<0?0:lt):[$-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=AS(t,e),c&&i.add(c,{generation:o.dataGeneration,value:f}));let d=je(s)?s.value:s;return d=ln(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),ln(d)?d:f},getXDomainPadding(t,e){const n=this,{axis:r,config:i}=n,o=i.axis_x_padding,s=r.isTimeSeries()&&e,l=Aa(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||Qa(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"&&(ln(r.zoom_x_min)&&(s=Tr("min",[s,r.zoom_x_min])),ln(r.zoom_x_max)&&(l=Tr("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 CS={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 tn(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 tn(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,IS=750;function bs(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}function RS(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 OS(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 PS(t,e,n){Hh(t,n);const r=t.state.legendTouch;return t.state.legendTouch=null,!!r&&r.id===e&&!r.moved}function MS(t,e){t.state.legendLastTouchClickId=e,t.state.legendLastTouchClickTime=Date.now()}function LS(t,e){const{state:n}=t,r=n.legendLastTouchClickId===e&&Date.now()-(n.legendLastTouchClickTime||0)<IS;return r&&(n.legendLastTouchClickId=null,n.legendLastTouchClickTime=0),r}function DS(t){var e;const n=(e=t.config.interaction_inputType_touch)==null?void 0:e.preventDefault,r=Sa(n)&&n||!1,i=!isNaN(n)&&n||null;return{passive:!r&&i===null}}var FS={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=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=le(i)?Xr(i.call(t.api,u,t.color(u),t.api.data(u)[0].values)):Ca(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($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(rn.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(`.${$e.legendItem}`).classed(rn.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&&sr(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?DS(e):void 0,m=function(A,R){var C;if(!Ne(i.legend_item_onclick,r,R,!o.hiddenTargetIds.has(R))){const{altKey:P,type:z}=A,$=Ut(this);z==="dblclick"||P?o.hiddenTargetIds.size&&!$.classed($e.legendItemHidden)?r.show():(r.hide(),r.show(R)):(r.toggle(R),$.classed(rn.legendItemFocused,!1))}s&&(e.hideTooltip(),(C=e.hideGridFocus)==null||C.call(e,!0))};t.attr("class",function(A){const R=Ut(this);return(!R.empty()&&R.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[R,C]=A;e.setCssRule(!1,R,[C])(n.legend)}),t.on(f,d?function(A,R){s&&A.type==="click"&&LS(e,R)||m.call(this,A,R)}:null),s&&f==="click"&&d&&t.on("touchstart",function(A,R){OS(e,R,A)},h).on("touchmove",A=>{Hh(e,A)},h).on("touchend",function(A,R){PS(e,R,A)&&(MS(e,R),m.call(this,A,R))},h),!s&&t.on("mouseout",u||le(i.legend_item_onout)?function(A,R){Ne(i.legend_item_onout,r,R,!o.hiddenTargetIds.has(R))||(Ut(this).classed(rn.legendItemFocused,!1),l&&e.undoMarkOverlapped(e,`.${rr.gaugeValue}`),e.api.revert())}:null).on("mouseover",u||le(i.legend_item_onover)?function(A,R){Ne(i.legend_item_onover,r,R,!o.hiddenTargetIds.has(R))||(Ut(this).classed(rn.legendItemFocused,!0),l&&e.markOverlapped(R,e,`.${rr.gaugeValue}`),!o.transiting&&e.isTargetToShow(R)&&r.focus(R))}: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,R;const C=t.filter(q=>!ln(r.data_names[q])||r.data_names[q]!==null),P=e.withTransition,z=i.isLegendRight||i.isLegendInset,$=RS.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,$),R=o.select(`.${$e.legendBackground} rect`),i.isLegendInset&&d.max.width>0&&R.size()===0&&(R=o.insert("g",`.${$e.legendItem}`).attr("class",$e.legendBackground).append("rect")),r.legend_tooltip&&o.selectAll("title").data(C).text(q=>$(q,!1));const H=o.selectAll("text").data(C).text(q=>$(q)).each(function(q,at){B(this,q,at)});s(H,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),R&&s(R,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,R=r?A:m,C=r?i.getLegendHeight():i.getLegendWidth();let P;const z=function(B,W){W||(P=(C-e.totalLength-R)/2,P<e.posMin&&(P=(C-R)/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+=R};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 $=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-$*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,R=u.selectAll(`.${$e.legendItem}`).data(t).enter().append("g");if(s.setLegendItem(R),l.legend_tooltip&&R.append("title").text(C=>C),R.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),R.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();R.append(z=>{C.indexOf(z)===-1&&C.push(z);let $=P[C.indexOf(z)%P.length];return $==="rectangle"&&($="rect"),He.createElementNS(Qt.svg,"hasValidPointType"in s&&s.hasValidPointType($)?$:"use")}).attr("class",$e.legendItemPoint).style("fill",bs.bind(s)).style("pointer-events",s.getStylePropValue("none")).attr("href",(z,$,B)=>{const H=B[$].nodeName.toLowerCase(),J=s.getTargetSelectorSuffix(z);return H==="use"?`#${c.datetimeId}-point${J}`:void 0})}else R.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,R=m*.75,C=h/8,P=m/8;s(f,e).each(function(){const z=this.nodeName.toLowerCase();let $="x",B="y",W=null,H=null,J=null;z==="circle"?($="cx",B="cy",W=Math.min(A,R)/2):z==="rect"&&(H=A,J=R);const q=Ut(this).attr("transform",null).attr("x",null).attr("y",null).attr("cx",null).attr("cy",null).attr("r",W).attr("width",H).attr("height",J);z==="use"?q.attr("transform",at=>`translate(${n.x1Tile(at)} ${n.yTile(at)-m/2}) scale(${C} ${P})`):q.attr($,at=>n.x1Tile(at)+(h-(H||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)})}}},NS={redraw(t={}){var e,n,r,i,o,s,l,c,u,f;const d=this,{config:h,state:m,$el:A}=d,{main:R,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:$,initializing:B}=t,W=d.getWithOption(t),H=W.Transition?h.transition_duration:0,J=W.TransitionForExit?H:0,q=W.TransitionForAxis?H: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,$),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=!!H,!C&&d.updateLegend(d.mapToIds(d.data.targets),t,at)):W.Dimension&&d.updateDimension(!0),h.data_empty_label_text&&R.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,$,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&&R.selectAll(`.${gn.selectedCircles}`).filter(d.isBarType.bind(d)).selectAll("circle").remove(),h.interaction_enabled&&!$&&W.EventRect&&(d.redrawEventRect(),(u=d.bindZoomEvent)==null||u.call(d))):(A.arcs&&d.redrawArc(H,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,$,H,W.Subchart,et),d.updateTooltipOnRedraw(),d.callPluginHook("$redraw",t,H)},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=eh();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 R in t.type){const C=$n(R),P=t.type[R];(/^(area|line)$/.test(R)&&i.hasTypeOf(C)||i.hasType(R))&&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)}},$S={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`],R=l&&(Ke(m)||Ke(m.text)||/^inner-/.test(m==null?void 0:m.position))?c.main.select(`.${d}-label`):null,C=R&&!R.empty()?R.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=(e=z.label)==null?void 0:e.left)!=null?n:0,B=(r=z.leftAxis)!=null?r:{right:0},W=z.chart.left+$,H=i.hasArcType(),J=B.right-W-(H?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(`.${Vd.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`],R=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 $=0;!f&&m&&(P=Ux(P));let B=l&&m&&(A||xn(d)&&!R)?0:f?(R?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:!R||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()),$=u&&!A?C:0):t==="bottom"&&l&&u&&!R&&(B+=1),B+P*C-$},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]=!sr(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,R={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,$=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:$+(d?0:W.left)}:{top:(h?0:4)+W.top,right:d?0:W.right+C.right,bottom:B+$+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-$-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,R),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 H=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?R.width+10:0)-q,c.arcHeight=c.height-(J&&!H?0:10),(i=l.arc_rangeText_values)!=null&&i.length&&(H?(c.arcWidth-=25,c.arcHeight-=10,c.margin.left+=10):(c.arcHeight-=20,c.margin.top+=10)),H&&!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)}},BS={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]=u1(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([T(t)],At)}function zS(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function US(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 kS(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),R=s.data_labels.border!==!0,C=da(t);let P=Ut(t.previousElementSibling);(P.empty()||((r=P.node())==null?void 0:r.tagName)!=="rect"||!((i=P.attr("class"))!=null&&i.includes(n)))&&(P=Ut(t.parentNode).insert("rect",()=>t).attr("class",`${En.textBorderRect} ${n}`).attr("width",C.width+(R?A.left+A.right:0)).attr("height",C.height+(R?A.top+A.bottom:0)),R&&P.style("fill",m).style("stroke",d).style("stroke-width",`${h}px`).attr("rx",f).attr("ry",f)),l(P).attr("x",e.x-(R?A.left:0)-(c?0:C.width/2)).attr("y",e.y-(R?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=XS.call(t,i);if(!u)return;const{url:f,width:d,height:h,pos:m}=u;if(f){const A=Ut(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",R=>Ca(f,{ID:"id"in R?R.id:R.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 XS(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=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||un(t),h=+u.attr("width")/2,m=+u.attr("height")/2;let A=e.x-h,R=e.y-m-d.height/2;c?e.x+=h:(l&&(A=-h,R=-(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",R)}}function GS(t){return Pf(t,e=>e,e=>da(e,!0))}var WS={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=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),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=zS(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)),R=new Map,C=[];return A.each(function(P){const z=this;R.set(z,{rect:un(z)}),l.data_labels.centered&&(i.isBarType(P)||i.isTreemapType(P))&&C.push(z)}),C.length>0&&GS(C).forEach((P,z)=>{const $=R.get(z);$&&($.bbox=P)}),A.each(function(P,z){const $=R.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 H={x:t.call(this,P,z,$),y:e.call(this,P,z,$)};d&&(H=US.bind(i)(P,H,h,f,W),B.attr("text-anchor",h)),Jh.call(i,this,H,$==null?void 0:$.rect),this.childElementCount||d?B.attr("transform",`translate(${H.x} ${H.y}) ${m}`):B.attr("x",H.x).attr("y",H.y),l.data_labels.border&&kS.call(i,B.node(),H,`${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?Ut(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)||da(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,R=e.value;h=t[2][1],h+=A*((m?R>0:R<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),R=c.point_r,C=(r==null?void 0:r.rect)||un(n);let{value:P}=e,z=3,$;if(s.isCandlestickType(e))P=s.getCandlestickData(e),f?($=t[0][0],$+=(t[1][0]-$)/2+z):($=P&&P._isUp?t[2][2]-z:t[2][1]+z*4,d&&($+=15*(P._isUp?1:-1)));else if(m)if(t)$=((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)$=t[0][1]+(c.data_labels.centered?0:C.height+5);else if(f)$=(t[0][0]+t[2][0]+C.height*.6)/2;else if($=t[2][1],ge(R)&&R>5&&(s.isLineType(e)||s.isScatterType(e))&&(z+=c.point_r/2.3),P<0||P===0&&!u.hasPositiveValue&&u.hasNegativeValue)$+=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),$+=B}return(!f||A)&&($+=s.getCenteredTextPos(e,t,n,"y",r)),$+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(Math.pow(c,2)+Math.pow(u,2));o.node()&&i.each(function(){const c=cc(this),u=Ut(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 VS(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"),R=m.createElementNS("http://www.w3.org/2000/svg","text");A.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",R.setAttribute("class",En.title),R.style.font=d,R.textContent=String(u.title_text),A.appendChild(R),h.appendChild(A);const C=un(R).height;if(A.remove(),C)return C}return u.title_text?parseFloat(d)||14:0}var jS={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 VS(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=da(s);return l+c.y+c.height+o}return i+t.getTextRect(e,En.title).height+o}};const HS=/(\r?\n|\t)/g,YS=/{{(.*)}}/;var KS={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",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&&!sr(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):(_=>_),R=le(h)?h.bind(s):null,C=(_,dt,ut,xt)=>{let bt=R;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(_),$=o.levelColor?_=>o.levelColor(_.value):_=>r(_),B=l.tooltip_contents,W=B.template,H=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=Ca(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=$(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=H.indexOf(et.id);Object.keys(B.text).forEach(Rt=>{xt[Rt]=B.text[Rt][bt]})}at+=Ca(J[1],xt)}}}return`${at}</table>`},getTooltipContentTemplate(t){return(t||`<table class="{=CLASS_TOOLTIP}"><tbody>
|
|
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 T1(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=y1(e,r),s=o&&T1(o.key,o.src);s&&(i=function(...l){const c=++x1,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 b1(){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 R,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:(R=i.charCodeAt(c++))===_i?d=!0:R===gc&&(d=!0,i.charCodeAt(c)===_i&&++c),i.slice(A+1,C).replace(/""/g,'"')}for(;c<l;){if((R=i.charCodeAt(C=c++))===_i)d=!0;else if(R===gc)d=!0,i.charCodeAt(c)===_i&&++c;else if(R!==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 R=o(A,u++);R!=null&&s.push(R)}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(" "),S1=nh.parse,A1=nh.parseRows,E1=rh.parse,C1=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 I1(t,e="csv",n,r,i){const o=new XMLHttpRequest,s={csv:R1,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 R1(t){return ih({rows:A1,parse:S1},t)}function w1(t){return ih({rows:C1,parse:E1},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 O1(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 P1={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)I1(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,R)=>(n.isX.call(n,R)?A.xs.push(R):A.ids.push(R),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()};O1.bind(n)(c,t,f);const d=f.customX&&f.categorized&&i.axis_x_categories.length?new Map(i.axis_x_categories.map((A,R)=>[A,R])):null,h=i.data_idConverter.bind(n.api),m=c.map((A,R)=>{const C=h(A),P=n.getXKey(A),z=f.customX&&f.categorized,N=z&&R===0&&(()=>{const H=Of(i.axis_x_categories);return t.every(J=>H.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((H,J)=>{var q;const at=H[P];let et=H[A],ot;if(et=et!==null&&!isNaN(et)&&!je(et)?+et:tn(et)||je(et)?et:null,(z||o.hasRadar)&&R===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(H=>ln(H.x))}});if(m.forEach(A=>{var R;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),(R=n.data.xs[A.id])==null||R.sort((C,P)=>C-P)}),o.hasNegativeValue=m.some(A=>A.values.some(R=>R.value!==null&&R.value<0)),o.hasPositiveValue=m.some(A=>A.values.some(R=>R.value!==null&&R.value>0)),s&&n.isValidChartType(s)){const A=n.mapToIds(m).filter(R=>!(R in i.data_types)||!n.isValidChartType(i.data_types[R]));n.setTargetType(A,s)}return m.forEach(A=>n.cache.add(A.id_org,A,!0)),m}};const M1={areaRange:{high:0,mid:1,low:2},candlestick:{open:0,high:1,low:2,close:3,volume:4}};var L1={isX(t){const e=this,{config:n}=e,r=n.data_x&&t===n.data_x,i=vn(n.data_xs)&&ly(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 ln(e)?e:null},getNextX(t){const e=this.axis.xs[t+1];return ln(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?tn(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(fy(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;(tn(e)?e:[e]).forEach(i=>n[t].add(i))},removeTargetIds(t,e){const{state:n}=this;(tn(e)?e:[e]).forEach(i=>n[t].delete(i))},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=tn(u)?u.slice(0,4):[u.open,u.high,u.low,u.close]),tn(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=Ut(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 R=f.createElementNS("http://www.w3.org/2000/svg","text");return R.textContent=A,d.appendChild(R),R});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,R=s-1;for(;A<R;){const B=A+R>>1,W=d(t[B].x);(m?W<h:W>h)?A=B+1:R=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 H=B;for(;H>=0&&r.getXCacheKey(t[H].x)===W;)z(H--);for(H=B+1;H<s&&r.getXCacheKey(t[H].x)===W;)z(H++)};if(c||u)for(let B=A-2;B<=A+2;B++)N(B);else{const B=f,W=(H,J)=>{for(let q=H;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),c=(i.zoom||i.x)(t.x);return Math.sqrt(Math.pow(c-e[o],2)+Math.pow(l-e[s],2))},convertValuesToStep(t){const e=this,{axis:n,config:r}=e,i=r.line_step_type,o=n?n.isCategorized():!1,s=tn(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=tn(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(tn(o)){if(n==="bar")return o.reduce((s,l)=>l-s);{const s=(i=(r=M1[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,R)=>A.map((C,P)=>(ge(C)?C:0)+R[P])),f=f.map((A,R)=>A-m[R]))}}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)||tn(t.value)&&t.value.length>=2)},isBarRangeType(t){const e=this,{value:n}=t;return e.isBarType(t)&&tn(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 D1={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)}},F1={value:()=>{}};function sh(){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 N1(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=sh.prototype={constructor:ls,on:function(t,e){var n=this._,r=N1(t+"",n),i,o=-1,s=r.length;if(arguments.length<2){for(;++o<s;)if((i=(t=r[o]).type)&&(i=$1(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]=lh(n[i],t.name,e);else if(e==null)for(i in n)n[i]=lh(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 $1(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function lh(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=F1,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var cs=sh;const B1={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=Ut(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=Ut(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 z1(t){return!t.ctrlKey&&!t.button}function U1(){return this.parentNode}function k1(t,e){return e==null?{x:t.x,y:t.y}:e}function X1(){return navigator.maxTouchPoints||"ontouchstart"in this}function ch(){var t=z1,e=U1,n=k1,r=X1,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,B1).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 H=N(this,e.call(this,B,W),B,W,"mouse");H&&(Ut(B.view).on("mousemove.drag",A,qi).on("mouseup.drag",R,qi),xc(B.view),mc(B),u=!1,l=B.clientX,c=B.clientY,H("start",B))}}function A(B){if(oi(B),!u){var W=B.clientX-l,H=B.clientY-c;u=W*W+H*H>d}i.mouse("drag",B)}function R(B){Ut(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 H=B.changedTouches,J=e.call(this,B,W),q=H.length,at,et;for(at=0;at<q;++at)(et=N(this,J,B,W,H[at].identifier,H[at]))&&(mc(B),et("start",B,H[at]))}}function P(B){var W=B.changedTouches,H=W.length,J,q;for(J=0;J<H;++J)(q=i[W[J].identifier])&&(oi(B),q("drag",B,W[J]))}function z(B){var W=B.changedTouches,H=W.length,J,q;for(f&&clearTimeout(f),f=setTimeout(function(){f=null},500),J=0;J<H;++J)(q=i[W[J].identifier])&&(mc(B),q("end",B,W[J]))}function N(B,W,H,J,q,at){var et=o.copy(),ot=dr(at||H,W),lt,ft,_;if((_=n.call(B,new Tc("beforestart",{sourceEvent:H,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 G1={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)(Ut(m).datum(),m)}h.each(function(){t&&(u(Ut(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?ch().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:R,svg:C,treemap:P}}=s;let z=(o=(i=(f||h)&&c.rect||d&&R.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:H,top:J}=un(z);if(u&&!d&&!N){const ot=c.coords[e];ot?(W=ot.w,H+=ot.x,J+=ot.y):(W=0,H=0,J=0)}let q=H+(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()),g1[/^(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)}},W1={categoryName(t){var e;const{axis_x_categories:n}=this.config;return(e=n==null?void 0:n[t])!=null?e:t}};const V1=/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g;var j1={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(en[n?"shapes":"shape"],s[i]):"")+this.generateClass(en[t],s[r?"id":i])).trim()}},getChartClass(t){return e=>en[`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(en.region,e)} ${"class"in t?t.class:""}`},classTarget(t){const e=this.config.data_classes[t];let n="";return e&&(n=` ${en.target}-${e}`),this.generateClass(en.target,t)+n},classFocus(t){return this.classFocused(t)+this.classDefocused(t)},classFocused(t){return` ${this.state.focusedTargetIds.has(t.id)?en.focused:""}`},classDefocused(t){return` ${this.state.defocusedTargetIds.has(t.id)?en.defocused:""}`},getTargetSelectorSuffix(t){return(t||t===0?`-${t}`:"").replace(V1,"-")},selectorTarget(t,e="",n=""){const r=this.getTargetSelectorSuffix(t);return`${e}.${en.target+r} ${n}, ${e}.${en.circles+r} ${n}`},selectorTargets(t,e){const n=t||[];return n.length?n.map(r=>this.selectorTarget(r,e)):null},selectorLegend(t){return`.${en.legendItem+this.getTargetSelectorSuffix(t)}`},selectorLegends(t){return t!=null&&t.length?t.map(e=>this.selectorLegend(e)):null}};class uh extends Map{constructor(e,n=hh){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(fh(this,e),n)}delete(e){return super.delete(dh(this,e))}}class VR extends Set{constructor(e,n=hh){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(fh(this,e))}delete(e){return super.delete(dh(this,e))}}function bc({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function fh({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function dh({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function hh(t){return t!==null&&typeof t=="object"?t.valueOf():t}const gh=Symbol("implicit");function vh(){var t=new uh,e=[],n=[],r=gh;function i(o){let s=t.get(o);if(s===void 0){if(r!==gh)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 uh;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 vh(e,n).unknown(r)},Va.apply(i,arguments),i}const H1=(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 Y1(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 K1=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];var Z1={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:vh(Y1(e.chart)||K1).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 H1(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 R;A.each(function(C,P){R=P===0?this.style.stopColor:this.style.stopColor===R}),R===!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])||"");r.select(`#${l}`).empty()&&r.append("filter").attr("x",e.x).attr("y",e.y).attr("width",e.width).attr("height",e.height).attr("id",l).html(`<feFlood flood-color="${c}" />
|
|
51
|
+
<feComposite 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,R=le(m)?m.bind(t.api)(o.id):m;f.defs&&f.defs.append("stop").attr("offset",h).attr("stop-color",R||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,ph=1e3,fs,no,ds=0,Na=0,hs=0,ro=typeof performance=="object"&&performance.now?performance:Date,mh=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Sc(){return Na||(mh(J1),Na=ro.now()+hs)}function J1(){Na=0}function gs(){this._call=this._time=this._next=null}gs.prototype=xh.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 xh(t,e,n){var r=new gs;return r.restart(t,e,n),r}function Q1(){Sc(),++si;for(var t=fs,e;t;)(e=Na-t._time)>=0&&t._call.call(void 0,e),t=t._next;--si}function yh(){Na=(ds=ro.now())+hs,si=to=0;try{Q1()}finally{si=0,q1(),Na=0}}function _1(){var t=ro.now(),e=t-ds;e>ph&&(hs-=e,ds=t)}function q1(){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(yh,t-ro.now()-hs)),eo&&(eo=clearInterval(eo))):(eo||(ds=ro.now(),eo=setInterval(_1,ph)),si=1,mh(yh))}}function Th(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 tb=cs("start","end","cancel","interrupt"),eb=[],bh=0,Sh=1,Ec=2,vs=3,Ah=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;nb(t,n,{name:e,index:r,group:i,on:tb,tween:eb,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:bh})}function Ic(t,e){var n=Ar(t,e);if(n.state>bh)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 nb(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=xh(o,0,n.time);function o(u){n.state=Sh,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!==Sh)return c();for(f in r)if(m=r[f],m.name===n.name){if(m.state===vs)return Th(s);m.state===Ah?(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(Th(function(){n.state===vs&&(n.state=Ah,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 rb(t){return this.each(function(){li(this,t)})}var Eh=180/Math.PI,Rc={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ch(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)*Eh,skewX:Math.atan(c)*Eh,scaleX:s,scaleY:l}}var xs;function ab(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Rc:Ch(e.a,e.b,e.c,e.d,e.e,e.f)}function ib(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,Ch(t.a,t.b,t.c,t.d,t.e,t.f))}function Ih(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 R=m.push("translate(",null,e,null,n);A.push({i:R-4,x:xr(u,d)},{i:R-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 R=m.push(i(m)+"scale(",null,",",null,")");A.push({i:R-4,x:xr(u,d)},{i:R-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,R=h.length,C;++A<R;)d[(C=h[A]).i]=C.x(m);return d.join("")}}}var ob=Ih(ab,"px, ","px)","deg)"),sb=Ih(ib,", ",")",")");function lb(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 cb(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 ub(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?lb:cb)(n,t,e))}function wc(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 Rh(t,e){var n;return(typeof e=="number"?xr:e instanceof xa?Oo:(n=xa(e))?(e=n,Oo):Nu)(t,e)}function fb(t){return function(){this.removeAttribute(t)}}function db(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hb(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 gb(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 vb(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 pb(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 mb(t,e){var n=Ot(t),r=n==="transform"?sb:Rh;return this.attrTween(t,typeof e=="function"?(n.local?pb:vb)(n,r,wc(this,"attr."+t,e)):e==null?(n.local?db:fb)(n):(n.local?gb:hb)(n,r,e))}function xb(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yb(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Tb(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 bb(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&xb(t,o)),n}return i._value=e,i}function Sb(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?Tb:bb)(r,e))}function Ab(t,e){return function(){Ic(this,t).delay=+e.apply(this,arguments)}}function Eb(t,e){return e=+e,function(){Ic(this,t).delay=e}}function Cb(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ab:Eb)(e,t)):Ar(this.node(),e).delay}function Ib(t,e){return function(){Dr(this,t).duration=+e.apply(this,arguments)}}function Rb(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"?Ib:Rb)(e,t)):Ar(this.node(),e).duration}function Ob(t,e){if(typeof e!="function")throw new Error;return function(){Dr(this,t).ease=e}}function Pb(t){var e=this._id;return arguments.length?this.each(Ob(e,t)):Ar(this.node(),e).ease}function Mb(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;Dr(this,t).ease=n}}function Lb(t){if(typeof t!="function")throw new Error;return this.each(Mb(this._id,t))}function Db(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 Fb(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 Nb(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 $b(t,e,n){var r,i,o=Nb(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 Bb(t,e){var n=this._id;return arguments.length<2?Ar(this.node(),n).on.on(t):this.each($b(n,t,e))}function zb(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Ub(){return this.on("end.remove",zb(this._id))}function kb(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 Xb(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),R=0,C=h.length;R<C;++R)(m=h[R])&&ms(m,e,n,R,h,A);o.push(h),s.push(f)}return new Jr(o,s,e,n)}var Gb=ue.prototype.constructor;function Wb(){return new Gb(this._groups,this._parents)}function Vb(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 jb(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 Hb(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 Yb(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 Kb(t,e,n){var r=(t+="")=="transform"?ob:Rh;return e==null?this.styleTween(t,Vb(t,r)).on("end.style."+t,wh(t)):typeof e=="function"?this.styleTween(t,Hb(t,r,wc(this,"style."+t,e))).each(Yb(this._id,t)):this.styleTween(t,jb(t,r,e),n).on("end.style."+t,null)}function Zb(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Jb(t,e,n){var r,i;function o(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&Zb(t,s,n)),r}return o._value=e,o}function Qb(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,Jb(t,e,n==null?"":n))}function _b(t){return function(){this.textContent=t}}function qb(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function tS(t){return this.tween("text",typeof t=="function"?qb(wc(this,"text",t)):_b(t==null?"":t+""))}function eS(t){return function(e){this.textContent=t.call(this,e)}}function nS(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&eS(i)),e}return r._value=t,r}function rS(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,nS(t))}function aS(){for(var t=this._name,e=this._id,n=Ph(),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 iS(){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 oS=0;function Jr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Oh(t){return ue().transition(t)}function Ph(){return++oS}var Qr=ue.prototype;Jr.prototype=Oh.prototype={constructor:Jr,select:kb,selectAll:Xb,selectChild:Qr.selectChild,selectChildren:Qr.selectChildren,filter:Db,merge:Fb,selection:Wb,transition:aS,call:Qr.call,nodes:Qr.nodes,node:Qr.node,size:Qr.size,empty:Qr.empty,each:Qr.each,on:Bb,attr:mb,attrTween:Sb,style:Kb,styleTween:Qb,text:tS,textTween:rS,remove:Ub,tween:ub,delay:Cb,duration:wb,ease:Pb,easeVarying:Lb,end:iS,[Symbol.iterator]:Qr[Symbol.iterator]};function jR(t){return t*t*t}function HR(t){return--t*t*t+1}function sS(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var lS={time:null,delay:0,duration:250,ease:sS};function cS(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 uS(t){var e,n;t instanceof Jr?(e=t._id,t=t._name):(e=Ph(),(n=lS).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||cS(c,e));return new Jr(r,this._parents,t,e)}ue.prototype.interrupt=rb,ue.prototype.transition=uS;var Oc=(t=>()=>t);function fS(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 dS(t){t.stopImmediatePropagation()}function Pc(t){t.preventDefault(),t.stopImmediatePropagation()}var Mh={name:"drag"},Mc={name:"space"},ci={name:"handle"},ui={name:"center"};const{abs:Lh,max:zn,min:Un}=Math;function Dh(t){return[+t[0],+t[1]]}function Lc(t){return[Dh(t[0]),Dh(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]]}},hS={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"},Fh={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Nh={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},gS={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},vS={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 pS(t){return!t.ctrlKey&&!t.button}function mS(){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 xS(){return navigator.maxTouchPoints||"ontouchstart"in this}function Dc(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function yS(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function $h(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function TS(){return Fc(ys)}function bS(){return Fc(Ts)}function YR(){return Fc(hS)}function Fc(t){var e=mS,n=pS,r=xS,i=!0,o=cs("start","brush","end"),s=6,l;function c(C){var P=C.property("__brush",R).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;Ut(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),H=B.selection,J=t.input(typeof P=="function"?P.apply(this,arguments):P,B.extent),q=Ga(H,J);function at(et){B.selection=et===1&&J===null?null:q(et),u.call(N),W.brush()}return H!==null&&J!==null?at:at(1)}):C.each(function(){var N=this,B=arguments,W=N.__brush,H=t.input(typeof P=="function"?P.apply(N,B):P,W.extent),J=f(N,B).beforestart();li(N),W.selection=H===null?null:H,u.call(N),J.start(z).brush(z).end(z)})},c.clear=function(C,P){c.move(C,null,P)};function u(){var C=Ut(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=Ut(this.that).datum();o.call(C,this.that,new fS(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"?Mh:i&&C.altKey?ui:ci,B=t===Ts?null:gS[z],W=t===ys?null:vS[z],H=Dc(P),J=H.extent,q=H.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 Oe=Se.identifier;return Se=dr(Se,P),Se.point0=Se.slice(),Se.identifier=Oe,Se});li(P);var ke=f(P,arguments,!0).beforestart();if(z==="overlay"){q&&(me=!0);const Se=[Ie[0],Ie[1]||Ie[0]];H.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=Ut(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=Ut(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 Oe of Se.changedTouches||[Se])for(const za of Ie)za.identifier===Oe.identifier&&(za.cur=dr(Oe,P));if(xe&&!Te&&!Fe&&Ie.length===1){const Oe=Ie[0];Lh(Oe.cur[0]-Oe[0])>Lh(Oe.cur[1]-Oe[1])?Fe=!0:Te=!0}for(const Oe of Ie)Oe.cur&&(Oe[0]=Oe.cur[0],Oe[1]=Oe.cur[1]);me=!0,Pc(Se),dn(Se)}function dn(Se){const Oe=Ie[0],za=Oe.point0;var Kt;switch(Zt=Oe[0]-za[0],fe=Oe[1]-za[1],N){case Mc:case Mh:{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 Fh&&Ae.attr("cursor",_r[z=Fh[z]])),Et<_&&(W*=-1,Kt=ft,ft=Rt,Rt=Kt,Kt=_,_=Et,Et=Kt,z in Nh&&Ae.attr("cursor",_r[z=Nh[z]])),H.selection&&(q=H.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)&&(H.selection=[[ot,_],[xt,Et]],u.call(P),ke.brush(Se,N.name))}function qe(Se){if(dS(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),H.selection&&(q=H.selection),yS(q)&&(H.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 R(){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:Oc(Lc(C)),c):e},c.filter=function(C){return arguments.length?(n=typeof C=="function"?C:Oc(!!C),c):n},c.touchable=function(C){return arguments.length?(r=typeof C=="function"?C:Oc(!!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 Bh(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=$h(i)),i}function zh(t){const e=Bh(t);return e?e[0]===e[1]:!0}function Uh(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 kh(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 Xh(t,e){for(let n=0;n<e.length;n++)Nc(t,e[n])}function SS(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)?Xh(i,h):je(h)&&"high"in h?Xh(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 AS(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 ES={getYDomainMinMaxBoth(t){const e=this,{axis:n,cache:r,config:i,state:o}=e,l=kh(e,t)?`${Ue.domainMinMax}_y_${Uh(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=Of(f);let h;if(u.length>0){const m=e.getValuesAsIdKeyed(t),A=t.some(W=>W.values.some(H=>H.value<0)),R=t.some(W=>W.values.some(H=>H.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 H=W.filter(J=>d.has(J));if(H.length){const J=H[0],q=C.get(J);P[J]&&A&&(P[J]=P[J].map(at=>at<0?at:0)),z[J]&&R&&(z[J]=z[J].map(at=>at>0?at:0)),H.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&&!(R&&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=SS(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`],R=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 H=N>=0&&B>=0,J=N<=0&&B<=0;(We(d)&&H||We(h)&&J)&&(W=!1),W&&(H&&(N=0),J&&(B=0));const q=Math.abs(B-N);let at={top:q*.1,bottom:q*.1};if(ln(m)){const lt=Math.max(Math.abs(N),Math.abs(B));B=m+lt,N=m-lt}if(R){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&&(H&&(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=kh(r,t)?`${Ue.domainMinMax}_x_${e}_${Uh(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=AS(t,e),c&&i.add(c,{generation:o.dataGeneration,value:f}));let d=je(s)?s.value:s;return d=ln(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),ln(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||zh(s)?c.xDomain:Bh(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"&&(ln(r.zoom_x_min)&&(s=yr("min",[s,r.zoom_x_min])),ln(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 Gh(t,e,n){const{config:r}=t,i=`axis_${e}_tick_format`;return(r[i]?r[i]:t.defaultValueFormat).call(t.api,n)}var CS={yFormat(t){return Gh(this,"y",t)},y2Format(t){return Gh(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 tn(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 tn(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 Wh=10,IS=750;function bs(t){const e=this,n=e.getDataById(t);return e.levelColor?e.levelColor(n.values[0].value):e.color(n)}function RS(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 Vh(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function OS(t,e,n){const r=Vh(n);t.state.legendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function jh(t,e){const n=t.state.legendTouch,r=n&&Vh(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>Wh||Math.abs(r.clientY-n.y)>Wh)}function PS(t,e,n){jh(t,n);const r=t.state.legendTouch;return t.state.legendTouch=null,!!r&&r.id===e&&!r.moved}function MS(t,e){t.state.legendLastTouchClickId=e,t.state.legendLastTouchClickTime=Date.now()}function LS(t,e){const{state:n}=t,r=n.legendLastTouchClickId===e&&Date.now()-(n.legendLastTouchClickTime||0)<IS;return r&&(n.legendLastTouchClickId=null,n.legendLastTouchClickTime=0),r}function DS(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 FS={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=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=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&&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($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(rn.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(`.${$e.legendItem}`).classed(rn.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?DS(e):void 0,m=function(A,R){var C;if(!Ne(i.legend_item_onclick,r,R,!o.hiddenTargetIds.has(R))){const{altKey:P,type:z}=A,N=Ut(this);z==="dblclick"||P?o.hiddenTargetIds.size&&!N.classed($e.legendItemHidden)?r.show():(r.hide(),r.show(R)):(r.toggle(R),N.classed(rn.legendItemFocused,!1))}s&&(e.hideTooltip(),(C=e.hideGridFocus)==null||C.call(e,!0))};t.attr("class",function(A){const R=Ut(this);return(!R.empty()&&R.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[R,C]=A;e.setCssRule(!1,R,[C])(n.legend)}),t.on(f,d?function(A,R){s&&A.type==="click"&&LS(e,R)||m.call(this,A,R)}:null),s&&f==="click"&&d&&t.on("touchstart",function(A,R){OS(e,R,A)},h).on("touchmove",A=>{jh(e,A)},h).on("touchend",function(A,R){PS(e,R,A)&&(MS(e,R),m.call(this,A,R))},h),!s&&t.on("mouseout",u||le(i.legend_item_onout)?function(A,R){Ne(i.legend_item_onout,r,R,!o.hiddenTargetIds.has(R))||(Ut(this).classed(rn.legendItemFocused,!1),l&&e.undoMarkOverlapped(e,`.${ar.gaugeValue}`),e.api.revert())}:null).on("mouseover",u||le(i.legend_item_onover)?function(A,R){Ne(i.legend_item_onover,r,R,!o.hiddenTargetIds.has(R))||(Ut(this).classed(rn.legendItemFocused,!0),l&&e.markOverlapped(R,e,`.${ar.gaugeValue}`),!o.transiting&&e.isTargetToShow(R)&&r.focus(R))}: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,R;const C=t.filter(q=>!ln(r.data_names[q])||r.data_names[q]!==null),P=e.withTransition,z=i.isLegendRight||i.isLegendInset,N=RS.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),R=o.select(`.${$e.legendBackground} rect`),i.isLegendInset&&d.max.width>0&&R.size()===0&&(R=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 H=o.selectAll("text").data(C).text(q=>N(q)).each(function(q,at){B(this,q,at)});s(H,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),R&&s(R,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,R=r?A:m,C=r?i.getLegendHeight():i.getLegendWidth();let P;const z=function(B,W){W||(P=(C-e.totalLength-R)/2,P<e.posMin&&(P=(C-R)/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+=R};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,R=u.selectAll(`.${$e.legendItem}`).data(t).enter().append("g");if(s.setLegendItem(R),l.legend_tooltip&&R.append("title").text(C=>C),R.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),R.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();R.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 H=B[N].nodeName.toLowerCase(),J=s.getTargetSelectorSuffix(z);return H==="use"?`#${c.datetimeId}-point${J}`:void 0})}else R.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,R=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,H=null,J=null;z==="circle"?(N="cx",B="cy",W=Math.min(A,R)/2):z==="rect"&&(H=A,J=R);const q=Ut(this).attr("transform",null).attr("x",null).attr("y",null).attr("cx",null).attr("cy",null).attr("r",W).attr("width",H).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-(H||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)})}}},NS={redraw(t={}){var e,n,r,i,o,s,l,c,u,f;const d=this,{config:h,state:m,$el:A}=d,{main:R,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),H=W.Transition?h.transition_duration:0,J=W.TransitionForExit?H:0,q=W.TransitionForAxis?H: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=!!H,!C&&d.updateLegend(d.mapToIds(d.data.targets),t,at)):W.Dimension&&d.updateDimension(!0),h.data_empty_label_text&&R.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&&R.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(H,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,H,W.Subchart,et),d.updateTooltipOnRedraw(),d.callPluginHook("$redraw",t,H)},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();Oh().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 R in t.type){const C=$n(R),P=t.type[R];(/^(area|line)$/.test(R)&&i.hasTypeOf(C)||i.hasType(R))&&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)}},$S={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`],R=l&&(Ke(m)||Ke(m.text)||/^inner-/.test(m==null?void 0:m.position))?c.main.select(`.${d}-label`):null,C=R&&!R.empty()?R.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,H=i.hasArcType(),J=B.right-W-(H?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`],R=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=zx(P));let B=l&&m&&(A||xn(d)&&!R)?0:f?(R?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:!R||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&&!R&&(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,R={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,R),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 H=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?R.width+10:0)-q,c.arcHeight=c.height-(J&&!H?0:10),(i=l.arc_rangeText_values)!=null&&i.length&&(H?(c.arcWidth-=25,c.arcHeight-=10,c.margin.left+=10):(c.arcHeight-=20,c.margin.top+=10)),H&&!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)}},BS={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]=u1(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 Hh(t){return typeof t=="string"?new vt([document.querySelectorAll(t)],[document.documentElement]):new vt([b(t)],At)}function zS(t){let e="middle";return t>0&&t<=170?e="end":t>190&&t<=360&&(e="start"),e}function US(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 Yh(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 kS(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),R=s.data_labels.border!==!0,C=ga(t);let P=Ut(t.previousElementSibling);(P.empty()||((r=P.node())==null?void 0:r.tagName)!=="rect"||!((i=P.attr("class"))!=null&&i.includes(n)))&&(P=Ut(t.parentNode).insert("rect",()=>t).attr("class",`${En.textBorderRect} ${n}`).attr("width",C.width+(R?A.left+A.right:0)).attr("height",C.height+(R?A.top+A.bottom:0)),R&&P.style("fill",m).style("stroke",d).style("stroke-width",`${h}px`).attr("rx",f).attr("ry",f)),l(P).attr("x",e.x-(R?A.left:0)-(c?0:C.width/2)).attr("y",e.y-(R?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 Kh(){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=XS.call(t,i);if(!u)return;const{url:f,width:d,height:h,pos:m}=u;if(f){const A=Ut(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",R=>Ra(f,{ID:"id"in R?R.id:R.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 XS(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 Zh(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||un(t),h=+u.attr("width")/2,m=+u.attr("height")/2;let A=e.x-h,R=e.y-m-d.height/2;c?e.x+=h:(l&&(A=-h,R=-(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",R)}}function GS(t){return Pf(t,e=>e,e=>ga(e,!0))}var WS={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=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),ge(h)?this.textContent=h:ii(d,h,void 0,!0)}),Kh.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=zS(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)),R=new Map,C=[];return A.each(function(P){const z=this;R.set(z,{rect:un(z)}),l.data_labels.centered&&(i.isBarType(P)||i.isTreemapType(P))&&C.push(z)}),C.length>0&&GS(C).forEach((P,z)=>{const N=R.get(z);N&&(N.bbox=P)}),A.each(function(P,z){const N=R.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 H={x:t.call(this,P,z,N),y:e.call(this,P,z,N)};d&&(H=US.bind(i)(P,H,h,f,W),B.attr("text-anchor",h)),Zh.call(i,this,H,N==null?void 0:N.rect),this.childElementCount||d?B.attr("transform",`translate(${H.x} ${H.y}) ${m}`):B.attr("x",H.x).attr("y",H.y),l.data_labels.border&&kS.call(i,B.node(),H,`${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?Ut(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,R=e.value;h=t[2][1],h+=A*((m?R>0:R<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+Yh.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),R=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(R)&&R>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+Yh.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(Math.pow(c,2)+Math.pow(u,2));o.node()&&i.each(function(){const c=cc(this),u=Ut(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(){Hh([this,this.previousSibling]).classed(En.TextOverlapping,!1)})}};function Jh(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 VS(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"),R=m.createElementNS("http://www.w3.org/2000/svg","text");A.style.cssText="position:absolute;visibility:hidden;left:-10000px;top:-10000px;",R.setAttribute("class",En.title),R.style.font=d,R.textContent=String(u.title_text),A.appendChild(R),h.appendChild(A);const C=un(R).height;if(A.remove(),C)return C}return u.title_text?parseFloat(d)||14:0}var jS={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",Jh(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=Jh(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 VS(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 HS=/(\r?\n|\t)/g,YS=/{{(.*)}}/;var KS={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",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):(_=>_),R=le(h)?h.bind(s):null,C=(_,dt,ut,xt)=>{let bt=R;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,H=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=H.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>
|
|
52
52
|
{=TITLE}
|
|
53
53
|
{{<tr class="{=CLASS_TOOLTIP_NAME}">
|
|
54
54
|
<td class="name">${this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>'}{=NAME}</td>
|
|
55
55
|
<td class="value">{=VALUE}</td>
|
|
56
56
|
</tr>}}
|
|
57
|
-
</tbody></table>`).replace(HS,"").split(YS)},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,[R,C]=hr(l.event,e!=null?e:c==null?void 0:c.node()),P={x:R,y:C};if(l.hasAxis&&s.x&&m&&"x"in m){const W=(H=0,J,q="y")=>{var at;const et=s[J?(at=i.axis)==null?void 0:at.getId(J):q];return et?et(H)+(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:$=0}=m,B=(r=(n=o.tooltip_position)==null?void 0:n.bind(i.api)(A,z,$,c==null?void 0:c.node(),P))!=null?r:f&&fc(f)?i.getTooltipPositionViewBox.bind(i)(z,$,P):i.getTooltipPosition.bind(i)(z,$,P);["top","left"].forEach(W=>{const H=B[W];u.style(W,`${H}px`),W==="left"&&!m.xPosInPercent&&(m.xPosInPercent=H/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 R=os(h,m,A,!1),C=un(h),P=os(h,20,0,!1).x;let z=R.y,$=R.x+t/2+P;return d&&(u.hasFunnel||u.hasTreemap||u.hasRadar?($-=t/2+P,z+=e):(z+=C.height/2,$+=C.width/2-(t-P))),$+t>C.width&&($=C.width-t-P),z+e>C.height&&(z-=e*2),{top:z,left:$}},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:R,isLegendRight:C,inputType:P}=u,z=s.hasType("gauge")&&!l.gauge_fullCircle,$=l.axis_rotated,B=s.hasArcType(),W=u.isCanvasMode?0:s.getSvgLeft(!0);let H=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||R)at+=e;else{const ot={top:s.getCurrentPaddingByDirection("top",!0),left:s.getCurrentPaddingByDirection("left",!0)};$?(q+=W+ot.left+J,at=ot.top+n.xAxis+J,H-=W):(q=W+ot.left+J+(c.zoom?q:n.xAxis),at+=ot.top-5)}if(q+t+15>H&&(q-=t+(m||R||B?0:$?J*2:38)),at+e>h.height){const ot=R?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,R=He.body.contains(d.chart.node());if(m&&s===A&&R){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 R=[m,A].every(Number.isFinite)&&He.elementFromPoint(m,A);const C=R&&Ut(R).datum();if(C){const P=r.hasArcType()?r.convertToArcData(r.updateAngle(C)):C==null?void 0:C.data;d&&(R=s.node()),P&&r.showTooltip([P],R)}else r.api.tooltip.hide()},i.transition_duration)}}}},ZS={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=Ja(o.margin.left),u=Ja(o.margin.top);else if(t==="context")c=Ja(o.margin2.left),u=Ja(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))}},JS={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;let u=!1;return!n&&((r=s.types)==null?void 0:r.indexOf(t))>-1?u=!0:c!=null&&c.length?c.forEach(f=>{const d=l[f.id];(d===t||!d&&t==="line")&&(u=!0)}):Object.keys(l).length?Object.keys(l).forEach(f=>{l[f]===t&&(u=!0)}):u=o.data_type===t,u},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 tn(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||tn(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["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"].indexOf(t)>=0}};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 ha(){}function _h(t){this._context=t}_h.prototype={areaStart:ha,areaEnd:ha,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 _S(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 qS(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 tA=(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 eA=(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:ha,areaEnd:ha,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 nA=(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 rA=(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,Ba=Math.cos,aA=Math.max,kc=Math.min,Fr=Math.sin,fi=Math.sqrt,Xn=1e-12,io=Math.PI,Cs=io/2,Is=2*io;function iA(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 oA=(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:ha,areaEnd:ha,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 sA=(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 lA=(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 cA(t){return new Rs(t)}function uA(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 fA(t){return new fg(t)}function hg(t){this._context=t}hg.prototype={areaStart:ha,areaEnd:ha,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 dA(t){return new hg(t)}function ws(t,e){this._context=t,this._t=e}ws.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 hA(t){return new ws(t,.5)}function gA(t){return new ws(t,0)}function vA(t){return new ws(t,1)}const pA={basis:QS,"basis-closed":_S,"basis-open":qS,bundle:tA,cardinal:eA,"cardinal-closed":nA,"cardinal-open":rA,"catmull-rom":oA,"catmull-rom-closed":sA,"catmull-rom-open":lA,"monotone-x":cA,"monotone-y":uA,natural:fA,"linear-closed":dA,linear:Qo,step:hA,"step-after":vA,"step-before":gA};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 mA(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(`.${en.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",R=>d(R)+h(R)).enter().append("g").attr("class",d);return f&&A.style("opacity","0").style("pointer-events",n.getStylePropValue("none")),A}var xA={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"),R=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 $=t[h.id]||t._$width;P=l?z-$/2:z-$+((m=d[R])!=null?m:t._$total.slice(0,R+1).reduce(u))-f}else P=z-(ge(t)?t:t._$width)*(C/2-(l?1:R))}return t&&P&&C>1&&c&&(R&&(P+=c*R),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((R,C)=>{const P=Number(C.x),z=Vc(e,C);return R[P]=C,m[P]=l?e.getRatio("index",C,!0):z,R},{});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),R=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 $=z;const B=(f=l==null?void 0:l.get(d))!=null?f:i.filter(W=>W.id!==d&&R[W.id]===R[d]);for(const W of B){const{id:H,rowValueMapByXValue:J,rowValues:q,values:at}=W;if(o[H]<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)&&($+=C(et)-z)}}return $}},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 R=[m,A-(d-h)];return[R,R,R,R]}},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);return function(c,u){const f=l.call(n,c.id,e)(n.getShapeYMin(c.id)),d=s(c,u)||f,h=i(c),m=c.value;let A=o(c);return r.axis_rotated&&(m>0&&A<f||m<0&&f<A)&&(A=f),[[h,d],[h,A-(f-d)],[h,A-(f-d)],[h,d]]}},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);return(d,h)=>{const{id:m}=d,A=f.call(n,m,e)(n.getShapeYMin(m)),R=u(d,h)||A,C=ge(s)?s:s[d.id]||s._$width,P=r[`axis_${n.axis.getId(m)}_inverted`],z=d.value,$=l(d);let B=c(d);r.axis_rotated&&!P&&(z>0&&B<A||z<0&&A<B)&&(B=A),n.isBarRangeType(d)||(B-=A-R);const W=$+C;return[[$,R],[$,B],[W,B],[W,R]]}},circleY(t,e){const n=this,r=t.id;let i;return n.isGrouped(r)&&(i=mA.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),R=`${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((H,J)=>H===f.xDomain[J]);z=f.xDomain.map((H,J)=>{const q=W?H:H-Math.abs(P[J]);return d.zoom(q)}).reduce((H,J)=>Math.abs(H)+J)/m}const $=W=>{const H=W?u[R][W]:u[R],J=W?H.ratio:u[`${R}_ratio`],q=W?H.max:u[`${R}_max`],at=ge(H)?H:le(H)?H.call(c,h.width,n,m):n?z*J/n:0;return q&&at>q?q:at};let B=$();return!A&&Qn(u[R])&&(B={_$width:B,_$total:[]},c.getTargetsToShow().forEach(W=>{u[R][W.id]&&(B[W.id]=$(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(`.${en[`${t}s`]}${r.getTargetSelectorSuffix(n)}`):i.main).selectAll(`.${en[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(en.bar)?r.isWithinBar(t):!0):o=!1,o},getInterpolate(t){const n=this.getInterpolateType(t);return pA[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=hr(this.state.event,t),n=Qd(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}},yA=Object.defineProperty,TA=(t,e,n)=>e in t?yA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n)=>TA(t,typeof e!="symbol"?e+"":e,n);function bA(t){return t.hasArcType()?"arc charts":t.hasType("funnel")?"funnel chart":null}function SA(t){var e,n;const{config:r}=t,i=r.render_mode==="canvas"?bA(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 Fa,n.cache=new a1;const r=new t1;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"),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;i1(e),SA(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:Ut(c.element||[]),i.chart.empty()&&(i.chart=Ut(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=()=>d1(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(),R=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(R)(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=h1(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:R,hasTreemap:C}=d,P=u.interaction_enabled,z=c.hasType("polar"),$=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:H,y:J,y2:q,subX:at,subY:et,subY2:ot}=f;H&&(H.domain(Qa(c.getXDomain(c.data.targets),!u.axis_x_inverted)),at.domain(H.domain()),m.xDomain=H.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 H=c.getMinMaxData();Ne(u.data_onmin,c.api,H.min),Ne(u.data_onmax,c.api,H.max)}d.rendered=!0;return}if(h.svg=h.chart.append("svg").style("overflow","hidden").style("display","block"),P&&d.inputType){const H=d.inputType==="touch",{onclick:J,onover:q,onout:at}=u,et=(n=u.interaction_inputType_touch)==null?void 0:n.preventDefault,ot=Sa(et)&&et||!1,lt=!isNaN(et)&&et||null,ft=H?{passive:!ot&<===null}:void 0;h.svg.on("click",(J==null?void 0:J.bind(c.api))||null).on(H?"touchstart":"mouseenter",(q==null?void 0:q.bind(c.api))||null,ft).on(H?"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||$||(r=c.hasLegendDefsPoint)!=null&&r.call(c))&&(h.defs=h.svg.append("defs"),A&&["id","idXAxis","idYAxis","idGrid"].forEach(H=>{c.appendClip(h.defs,d.clip[H])}),c.generateTextBGColorFilter($),B&&c.patterns.forEach(H=>h.defs.append(()=>H.node))),c.updateSvgSize(),c.bindResize();const W=h.svg.append("g").classed(ze.main,!0).attr("transform",R||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 H=c.getMinMaxData();Ne(u.data_onmin,c.api,H.min),Ne(u.data_onmax,c.api,H.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:R,candlestick:C,line:P,area:z,text:$}}=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:R},candlestick:C,line:{lines:P,areas:z},needle:h,text:{texts:$}}}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=m1(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,[P1,L1,D1,W1,j1,Z1,ES,G1,CS,FS,NS,gy,xA,$S,BS,WS,jS,KS,ZS,JS]);const Hc=[lr,er,Yn,Il],mg=10,AA=750,xg=6,EA=2,CA=1e5,IA={"&":"&","<":"<",">":">",'"':""","'":"'"},Os=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 RA(t){return`${t}`.replace(/[&<>"']/g,e=>IA[e])}function wA(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 OA(t,e){const n=RA(t.color(e)),r=wA(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 PA(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=`${Ut(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),PA(t,e)}function MA(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(rn.legendItemFocused,o=>i.indexOf(o)>=0).style("opacity",function(o){return i.indexOf(o)>=0?null:t.opacityForUnfocusedLegend.call(t,Ut(this))})}function LA(t){const{legend:e}=t.$el;e==null||e.selectAll(`.${$e.legendItem}`).classed(rn.legendItemFocused,!1).style("opacity",null)}function DA(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 FA(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 NA(t,e,n){Ag(t,n);const r=t.state.canvasLegendTouch;return t.state.canvasLegendTouch=null,!!r&&r.id===e&&!r.moved}function $A(t,e){t.state.canvasLegendLastTouchClickId=e,t.state.canvasLegendLastTouchClickTime=Date.now()}function BA(t,e){const{state:n}=t,r=n.canvasLegendLastTouchClickId===e&&Date.now()-(n.canvasLegendLastTouchClickTime||0)<AA;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=Ut(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(rn.legendItemFocused,!1)),bg(t)}l&&((m=t.hideTooltip)==null||m.call(t))};e.on(s,c?function(d,h){l&&d.type==="click"&&BA(t,h)||f.call(this,d,h)}:null),l&&s==="click"&&c&&e.on("touchstart",function(d,h){FA(t,h,d)},u).on("touchmove",d=>{Ag(t,d)},u).on("touchend",function(d,h){NA(t,h,d)&&($A(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))||(MA(t,h),!i.transiting&&t.isTargetToShow(h)&&DA(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))||(LA(t),bg(t))}:null)}function zA(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 UA(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 kA(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 XA(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,R=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-R&&u<=h:u>=d&&u<=h&&f>=m&&f<=A+R}function GA(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 WA(t,e){var n,r;return t.hitDetector.findNearest(e[0],e[1])||(XA(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=Og(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 VA(t,e,n){var r,i;return(r=t.isMultipleX)!=null&&r.call(t)&&!Og(t,e)?[((i=t.addName)==null?void 0:i.call(t,e))||e]:n}function oo(t,e){const n=UA(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 jA(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||!jA(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 HA(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 wg(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 YA(t,e){return/^resize/.test(e)?t.config.axis_rotated?"ns-resize":"ew-resize":e==="move"?"move":"crosshair"}function ga(t){return t?`${t.id}:${t.index}`:null}function KA(t,e){const n=t.state.canvasSelectionDragIncluded,r=Os.get(t)||new Map,i=new Map,o=new Set,s=[];return e.filter(l=>Jc(t,l)).forEach(l=>{const c=ga(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)}),Os.set(t,i),{included:o,rows:s}}function ZA(t){return t?Array.isArray(t)?t:[t]:null}function Jc(t,e){return e&&In(t,e)&&_a(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=>_a(t,n,Hc)).forEach(n=>{n.values.forEach(r=>{Jc(t,r)&&e(r)})})}function Og(t,e){return!(t.config.axis_x_forceAsSingle&&t.config.tooltip_grouped)&&(Ra(t,e)||wa(t,e))}function JA(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=Sa(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=Sa(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 _A(t,e){const{state:n}=t,r=ga(e),i=r&&n.canvasLastInputClickKey===r&&Date.now()-(n.canvasLastInputClickTime||0)<750;return i&&(n.canvasLastInputClickKey=null,n.canvasLastInputClickTime=0),!!i}function qA(t,e){t.state.canvasLastInputClickKey=ga(e),t.state.canvasLastInputClickTime=Date.now()}function tE(){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 eE(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 nE(t){return t.data.targets.reduce((e,n)=>e+n.values.length,0)}function rE(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 aE={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:R,scale:C,state:P}=h,{done:z=()=>{},duration:$,length:B,orgDataCount:W}=t,H=(e=ce.requestAnimationFrame)==null?void 0:e.bind(ce),J=!!((n=m.isLog)!=null&&n.call(m,"x"));if(!H||!$||!B||!W||nE(h)>CA)return!1;const q=C.x.domain().slice(0,2),at=(i=(r=R.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=R.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&&(R.xDomain=at),C.x.domain(q),et&&C.subX.domain(et),m.x.scale(C.x),!1;rE(h);let _=!1;const dt=tE(),ut=()=>{var bt,Rt;_||(_=!0,A.targets.forEach(Et=>{Et.values.splice(0,B)}),ft&&(R.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)/$)),Et=eE(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=H(xt):ut()};return at&&(R.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=H(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=Ut(e.canvasEngine.canvas),e.canvasTheme=new LT,e.canvasTheme.load(o,n.canvas_theme),e.canvasAxisRenderer=new i0(e.canvasEngine,e.canvasTheme),e.canvasRenderer=new bT(e.canvasEngine,e.canvasTheme),e.hitDetector=new BT,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)),JA(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($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?OA(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=Ut(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)):Ca(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),R=20,C=Math.ceil(h.width||A),P=Math.ceil(h.height||R);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},R={offsets:{},widths:{},heights:{},margins:[0],steps:{}},C=t.map((J,q)=>{const at=`${Ps(e,J)}`,et=zA(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++)),R.steps[J]=A.step,R.margins[A.step]=r.isLegendInset?10:et,R.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(R.widths[J]=ot,R.heights[J]=lt,o.push(ot),l=Math.max(l,ot),c=Math.max(c,lt),q){R.steps[J]=0,R.offsets[J]=0;return}z(J,ft)});const $=r.isLegendRight?J=>A.max.width*R.steps[J]:r.isLegendInset?J=>A.max.width*R.steps[J]+10:J=>R.margins[R.steps[J]]+R.offsets[J],B=r.isLegendRight||r.isLegendInset?J=>R.margins[R.steps[J]]+R.offsets[J]:J=>A.max.height*R.steps[J],W=4+m.width,H=9;C.forEach(({id:J,hidden:q})=>{const at=q?0:$(J),et=q?0:B(J);s[J]={item:{x:at,y:et-5,width:R.widths[J],height:R.heights[J]},title:{x:W,y:0,height:R.heights[J]},tile:{x:-2,y:H-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(R=>{A&&A+h+R>d?(m++,A=R):A+=(A?h:0)+R}),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=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(`.${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(ga(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=ZA(e);let d=!1;s.data_selection_enabled&&(Qc(o,h=>{const m=ga(h),A=u||!f||f.indexOf(h.id)>=0,R=!n||n.indexOf(h.index)>=0,C=c.has(m);t?A&&R&&!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&&R&&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=ga(l),u=o.has(c);r.data_selection_multiple||Qc(n,f=>{const d=ga(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,Os.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),R={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}=KA(n,n.getCanvasSelectionDragData(R));z.length&&n.toggleCanvasSelection(z),i.canvasSelectionDragIncluded=P,i.cancelClick=!0}return n.renderCanvasSelectionDrag(R),(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,Os.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=ga(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=kA(r,t,!0);if(!l||_A(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&&qA(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)>EA&&(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 R=s[0]+u,C=s[1]+u;R<h&&(C+=h-R,R=h),C>m&&(R-=C-m,C=m),f=[Math.max(h,Math.min(m-A,R)),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=HA(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=wg(e,r);return n.style.cursor=YA(e,i),!0},startCanvasSubchartBrush(t){var e;const n=this,{state:r}=n,i=Kc(n,t);if(i===null)return!1;const o=wg(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?WA(s,d):null;if(!h){if(s.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,s.clearCanvasFocus()),d&&l.axis_tooltip&&GA(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=VA(s,h,m),R=A.map(C=>`${C.id}:${C.index}`).join("|");(c.canvasFocusKey!==R||l.axis_tooltip)&&(c.canvasFocusKey=R,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),R=ki(o,h),C=[l.margin.left+R.x,l.margin.top+R.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,aE),(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 sr(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 iE(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(),ln(i)&&(e[s]=i)}),this.api&&(this.state.orgConfig=t)}var oE={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&&b1(),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(R=>{R==="internal"&&Object.keys(f).forEach(C=>{f[C]=null}),this[R]=null,delete this[R]});for(const R in this)this[R]=()=>{}}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?ln(e)?(i[s]=e,l=e,n&&this.flush()):l=i[s]:(arguments.length===0||sr(t))&&(l=o.orgConfig),l}},sE={color(t){return this.internal.color(t)}};const Fg=function(t){const{targets:e}=this.internal.data;if(!xn(t)){const n=tn(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);tn(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 lE={data:Fg},cE={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(rn.focused,!0).classed(rn.defocused,!1),n.hasArcType()&&!r.hasRadar&&(n.expandArc(i),n.hasType("gauge")&&n.markOverlapped(t,n,`.${rr.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(rn.focused,!1).classed(rn.defocused,!0),n.hasArcType(null,["polar"])&&(n.unexpandArc(i),n.hasType("gauge")&&n.undoMarkOverlapped(n,`.${rr.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);if(s.isCanvasMode){const f=!!((e=s.focusedTargetIds)!=null&&e.size)||!!((n=s.defocusedTargetIds)!=null&&n.size);o.legend_show&&(i.showLegend(c.filter(i.isLegendToShow.bind(i))),l.legend.selectAll(i.selectorLegends(c)).filter(function(){return Ut(this).classed(rn.legendItemFocused)}).classed(rn.legendItemFocused,!1)),s.focusedTargetIds=new Set,s.defocusedTargetIds=new Set,f&&((r=i.renderCanvasFrame)==null||r.call(i,void 0,null,!1));return}l.svg.selectAll(i.selectorTargets(c)).classed(rn.focused,!1).classed(rn.defocused,!1),i.hasArcType(null,["polar"])&&i.unexpandArc(c),o.legend_show&&(i.showLegend(c.filter(i.isLegendToShow.bind(i))),l.legend.selectAll(i.selectorLegends(c)).filter(function(){return Ut(this).classed(rn.legendItemFocused)}).classed(rn.legendItemFocused,!1)),s.focusedTargetIds=new Set,s.defocusedTargetIds=new Set}},uE={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})}}},fE={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||{};sr(n)&&this.tooltip.hide(),tn(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 dE={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))}},hE={tooltip:{show:function(t){var e,n,r,i,o,s,l,c,u,f,d,h;const m=this.internal,{$el:A,config:R,state:{eventReceiver:C,hasFunnel:P,hasTreemap:z,inputType:$}}=m;let B,W;if(t.mouse&&(W=t.mouse),t.data){const{data:H}=t,J=(e=m.getYScaleById(H.id))==null?void 0:e(H.value);if((P||z)&&H.id){const q=m.selectorTarget(H.id,void 0,`.${bn.shape}`);C.rect=A.main.select(q)}else m.isMultipleX()?W=[m.xx(H),J]:(R.tooltip_grouped||(W=[0,J]),B=(r=H.index)!=null?r:m.hasArcType()&&H.id?(n=m.getArcElementByIdOrIndex(H.id))==null?void 0:n.datum().index:m.getIndexByX(H.x))}else ln(t.x)?B=m.getIndexByX(t.x):ln(t.index)&&(B=t.index);if(m.state.isCanvasMode){const H=((i=m.filterTargetsToShow)==null?void 0:i.call(m))||m.data.targets,J=(o=t.data)!=null&&o.id&&!R.tooltip_grouped?H.filter(lt=>lt.id===t.data.id).map(lt=>lt.values[B!=null?B:t.data.index]).filter(Boolean):H.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}($==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(H=>{m.dispatchEvent(H,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)}}},gE=Object.defineProperty,vE=(t,e,n)=>e in t?gE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Ng=(t,e,n)=>vE(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),iE.call(n,e),n.beforeInit(),n.init()}}yn(Kn.prototype,[oE,sE,lE,cE,uE,fE,dE,hE]);let $g=()=>(Kn.prototype.category=Dg.category,Kn.prototype.categories=Dg.categories,($g=()=>({}))());const pE=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 mE(t,e,n){const{width:r,height:i}=e||n,o=new XMLSerializer,s=t.cloneNode(!0),l=f1(Ea(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
|
+
</tbody></table>`).replace(HS,"").split(YS)},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,[R,C]=ir(l.event,e!=null?e:c==null?void 0:c.node()),P={x:R,y:C};if(l.hasAxis&&s.x&&m&&"x"in m){const W=(H=0,J,q="y")=>{var at;const et=s[J?(at=i.axis)==null?void 0:at.getId(J):q];return et?et(H)+(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 H=B[W];u.style(W,`${H}px`),W==="left"&&!m.xPosInPercent&&(m.xPosInPercent=H/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 R=os(h,m,A,!1),C=un(h),P=os(h,20,0,!1).x;let z=R.y,N=R.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:R,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 H=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||R)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,H-=W):(q=W+ot.left+J+(c.zoom?q:n.xAxis),at+=ot.top-5)}if(q+t+15>H&&(q-=t+(m||R||B?0:N?J*2:38)),at+e>h.height){const ot=R?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,R=He.body.contains(d.chart.node());if(m&&s===A&&R){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 R=[m,A].every(Number.isFinite)&&He.elementFromPoint(m,A);const C=R&&Ut(R).datum();if(C){const P=r.hasArcType()?r.convertToArcData(r.updateAngle(C)):C==null?void 0:C.data;d&&(R=s.node()),P&&r.showTooltip([P],R)}else r.api.tooltip.hide()},i.transition_duration)}}}},ZS={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))}},JS={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;let u=!1;return!n&&((r=s.types)==null?void 0:r.indexOf(t))>-1?u=!0:c!=null&&c.length?c.forEach(f=>{const d=l[f.id];(d===t||!d&&t==="line")&&(u=!0)}):Object.keys(l).length?Object.keys(l).forEach(f=>{l[f]===t&&(u=!0)}):u=o.data_type===t,u},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 tn(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||tn(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["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"].indexOf(t)>=0}};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 Qh(t){this._context=t}Qh.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 _S(t){return new Qh(t)}function _h(t){this._context=t}_h.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 qS(t){return new _h(t)}function qh(t,e){this._basis=new As(t),this._beta=e}qh.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 tA=(function t(e){function n(r){return e===1?new As(r):new qh(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 eA=(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 nA=(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 rA=(function t(e){function n(r){return new Uc(r,e)}return n.tension=function(r){return t(+r)},n})(0);const tg=Math.abs,kn=Math.atan2,$a=Math.cos,aA=Math.max,kc=Math.min,Fr=Math.sin,fi=Math.sqrt,Xn=1e-12,io=Math.PI,Cs=io/2,Is=2*io;function iA(t){return t>1?0:t<-1?io:Math.acos(t)}function eg(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 ng(t,e){this._context=t,this._alpha=e}ng.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 oA=(function t(e){function n(r){return e?new ng(r,e):new Bc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function rg(t,e){this._context=t,this._alpha=e}rg.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 sA=(function t(e){function n(r){return e?new rg(r,e):new zc(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: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 lA=(function t(e){function n(r){return e?new ag(r,e):new Uc(r,0)}return n.alpha=function(r){return t(+r)},n})(.5);function ig(t){return t<0?-1:1}function og(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(ig(o)+ig(s))*Math.min(Math.abs(o),Math.abs(s),.5*Math.abs(l))||0}function sg(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,sg(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,sg(this,n=og(this,t,e)),n);break;default:Gc(this,this._t0,n=og(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}};function lg(t){this._context=new cg(t)}(lg.prototype=Object.create(Rs.prototype)).point=function(t,e){Rs.prototype.point.call(this,e,t)};function cg(t){this._context=t}cg.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 cA(t){return new Rs(t)}function uA(t){return new lg(t)}function ug(t){this._context=t}ug.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=fg(t),i=fg(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 fg(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 fA(t){return new ug(t)}function dg(t){this._context=t}dg.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 dA(t){return new dg(t)}function ws(t,e){this._context=t,this._t=e}ws.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 hA(t){return new ws(t,.5)}function gA(t){return new ws(t,0)}function vA(t){return new ws(t,1)}const pA={basis:QS,"basis-closed":_S,"basis-open":qS,bundle:tA,cardinal:eA,"cardinal-closed":nA,"cardinal-open":rA,"catmull-rom":oA,"catmull-rom-closed":sA,"catmull-rom-open":lA,"monotone-x":cA,"monotone-y":uA,natural:fA,"linear-closed":dA,linear:Qo,step:hA,"step-after":vA,"step-before":gA};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 hg(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 mA(t){var e,n;const r=this;let i;if(Wc(r,t)){const o=hg(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 vg(t){const{$el:e}=this,{elKey:n,className:r,cssRules:i,position:o}=t,s=e.main.select(`.${en.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",R=>d(R)+h(R)).enter().append("g").attr("class",d);return f&&A.style("opacity","0").style("pointer-events",n.getStylePropValue("none")),A}var xA={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"),R=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[R])!=null?m:t._$total.slice(0,R+1).reduce(u))-f}else P=z-(ge(t)?t:t._$width)*(C/2-(l?1:R))}return t&&P&&C>1&&c&&(R&&(P+=c*R),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((R,C)=>{const P=Number(C.x),z=Vc(e,C);return R[P]=C,m[P]=l?e.getRatio("index",C,!0):z,R},{});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),R=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&&R[W.id]===R[d]);for(const W of B){const{id:H,rowValueMapByXValue:J,rowValues:q,values:at}=W;if(o[H]<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 R=[m,A-(d-h)];return[R,R,R,R]}},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);return function(c,u){const f=l.call(n,c.id,e)(n.getShapeYMin(c.id)),d=s(c,u)||f,h=i(c),m=c.value;let A=o(c);return r.axis_rotated&&(m>0&&A<f||m<0&&f<A)&&(A=f),[[h,d],[h,A-(f-d)],[h,A-(f-d)],[h,d]]}},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);return(d,h)=>{const{id:m}=d,A=f.call(n,m,e)(n.getShapeYMin(m)),R=u(d,h)||A,C=ge(s)?s:s[d.id]||s._$width,P=r[`axis_${n.axis.getId(m)}_inverted`],z=d.value,N=l(d);let B=c(d);r.axis_rotated&&!P&&(z>0&&B<A||z<0&&A<B)&&(B=A),n.isBarRangeType(d)||(B-=A-R);const W=N+C;return[[N,R],[N,B],[W,B],[W,R]]}},circleY(t,e){const n=this,r=t.id;let i;return n.isGrouped(r)&&(i=mA.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=hg(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),R=`${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((H,J)=>H===f.xDomain[J]);z=f.xDomain.map((H,J)=>{const q=W?H:H-Math.abs(P[J]);return d.zoom(q)}).reduce((H,J)=>Math.abs(H)+J)/m}const N=W=>{const H=W?u[R][W]:u[R],J=W?H.ratio:u[`${R}_ratio`],q=W?H.max:u[`${R}_max`],at=ge(H)?H:le(H)?H.call(c,h.width,n,m):n?z*J/n:0;return q&&at>q?q:at};let B=N();return!A&&Qn(u[R])&&(B={_$width:B,_$total:[]},c.getTargetsToShow().forEach(W=>{u[R][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(`.${en[`${t}s`]}${r.getTargetSelectorSuffix(n)}`):i.main).selectAll(`.${en[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(en.bar)?r.isWithinBar(t):!0):o=!1,o},getInterpolate(t){const n=this.getInterpolateType(t);return pA[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}},yA=Object.defineProperty,TA=(t,e,n)=>e in t?yA(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Gn=(t,e,n)=>TA(t,typeof e!="symbol"?e+"":e,n);function bA(t){return t.hasArcType()?"arc charts":t.hasType("funnel")?"funnel chart":null}function SA(t){var e,n;const{config:r}=t,i=r.render_mode==="canvas"?bA(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 a1;const r=new t1;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"),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;i1(e),SA(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:Ut(c.element||[]),i.chart.empty()&&(i.chart=Ut(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=()=>d1(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(),R=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(R)(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=h1(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:R,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:H,y:J,y2:q,subX:at,subY:et,subY2:ot}=f;H&&(H.domain(Ja(c.getXDomain(c.data.targets),!u.axis_x_inverted)),at.domain(H.domain()),m.xDomain=H.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 H=c.getMinMaxData();Ne(u.data_onmin,c.api,H.min),Ne(u.data_onmax,c.api,H.max)}d.rendered=!0;return}if(h.svg=h.chart.append("svg").style("overflow","hidden").style("display","block"),P&&d.inputType){const H=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=H?{passive:!ot&<===null}:void 0;h.svg.on("click",(J==null?void 0:J.bind(c.api))||null).on(H?"touchstart":"mouseenter",(q==null?void 0:q.bind(c.api))||null,ft).on(H?"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(H=>{c.appendClip(h.defs,d.clip[H])}),c.generateTextBGColorFilter(N),B&&c.patterns.forEach(H=>h.defs.append(()=>H.node))),c.updateSvgSize(),c.bindResize();const W=h.svg.append("g").classed(ze.main,!0).attr("transform",R||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 H=c.getMinMaxData();Ne(u.data_onmin,c.api,H.min),Ne(u.data_onmax,c.api,H.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:R,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:R},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=m1(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,[P1,L1,D1,W1,j1,Z1,ES,G1,CS,FS,NS,hy,xA,$S,BS,WS,jS,KS,ZS,JS]);const Hc=[br,nr,Yn,Il],pg=10,AA=750,mg=6,EA=2,CA=1e5,IA={"&":"&","<":"<",">":">",'"':""","'":"'"},Os=new WeakMap;function xg(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 RA(t){return`${t}`.replace(/[&<>"']/g,e=>IA[e])}function wA(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 OA(t,e){const n=RA(t.color(e)),r=wA(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 PA(t,e){const n=new Map;e.each(function(r){n.set(r,this)}),t.cache.add(Ue.legendItemMap,n)}function yg(t,e){const{config:n}=t;e.attr("class",function(r){const o=`${Ut(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),PA(t,e)}function MA(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(rn.legendItemFocused,o=>i.indexOf(o)>=0).style("opacity",function(o){return i.indexOf(o)>=0?null:t.opacityForUnfocusedLegend.call(t,Ut(this))})}function LA(t){const{legend:e}=t.$el;e==null||e.selectAll(`.${$e.legendItem}`).classed(rn.legendItemFocused,!1).style("opacity",null)}function DA(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 Tg(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 bg(t){var e,n;return((e=t.changedTouches)==null?void 0:e[0])||((n=t.touches)==null?void 0:n[0])}function FA(t,e,n){const r=bg(n);t.state.canvasLegendTouch=r?{id:e,x:r.clientX,y:r.clientY,moved:!1}:null}function Sg(t,e){const n=t.state.canvasLegendTouch,r=n&&bg(e);r&&(n.moved=n.moved||Math.abs(r.clientX-n.x)>pg||Math.abs(r.clientY-n.y)>pg)}function NA(t,e,n){Sg(t,n);const r=t.state.canvasLegendTouch;return t.state.canvasLegendTouch=null,!!r&&r.id===e&&!r.moved}function $A(t,e){t.state.canvasLegendLastTouchClickId=e,t.state.canvasLegendLastTouchClickTime=Date.now()}function BA(t,e){const{state:n}=t,r=n.canvasLegendLastTouchClickId===e&&Date.now()-(n.canvasLegendLastTouchClickTime||0)<AA;return r&&(n.canvasLegendLastTouchClickId=null,n.canvasLegendLastTouchClickTime=0),r}function Ag(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?Og(r):void 0,f=function(d,h){var m;if(!Ne(r.legend_item_onclick,n,h,!i.hiddenTargetIds.has(h))){const A=Ut(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(rn.legendItemFocused,!1)),Tg(t)}l&&((m=t.hideTooltip)==null||m.call(t))};e.on(s,c?function(d,h){l&&d.type==="click"&&BA(t,h)||f.call(this,d,h)}:null),l&&s==="click"&&c&&e.on("touchstart",function(d,h){FA(t,h,d)},u).on("touchmove",d=>{Sg(t,d)},u).on("touchend",function(d,h){NA(t,h,d)&&($A(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)&&(MA(t,h),DA(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))||(LA(t),Tg(t))}:null)}function zA(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 Eg(t){return/^(indexed|category|log|timeseries)$/.test(t)}function Ms(t){return/^(indexed|log|timeseries)$/.test(t)}function UA(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 kA(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 XA(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,R=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-R&&u<=h:u>=d&&u<=h&&f>=m&&f<=A+R}function GA(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 WA(t,e){var n,r;return t.hitDetector.findNearest(e[0],e[1])||(XA(t,e)?(r=(n=t.hitDetector).findNearestIndexByCoord)==null?void 0:r.call(n,e[0],e[1]):null)}function Cg(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 VA(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=UA(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 jA(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||!jA(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 HA(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 Ig(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 Rg(t,e){const n=Ig(t);if(!n)return"select";const[r,i]=n;return Math.abs(e-r)<=mg?"resize-start":Math.abs(e-i)<=mg?"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 YA(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 KA(t,e){const n=t.state.canvasSelectionDragIncluded,r=Os.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)}),Os.set(t,i),{included:o,rows:s}}function ZA(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 JA(t){return t.interaction_inputType_touch!==!1}function Og(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 _A(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 qA(t,e){t.state.canvasLastInputClickKey=pa(e),t.state.canvasLastInputClickTime=Date.now()}function tE(){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 Pg(t,e=!1){return Array.isArray(t)&&t.length>=2&&t.every(n=>Number.isFinite(+n)&&(!e||+n>0))}function eE(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 nE(t){return t.data.targets.reduce((e,n)=>e+n.values.length,0)}function rE(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 aE={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&&xg("canvas mode: transition.duration is ignored; canvas redraws synchronously."),n.transition_duration=0,Eg(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:R,scale:C,state:P}=h,{done:z=()=>{},duration:N,length:B,orgDataCount:W}=t,H=(e=ce.requestAnimationFrame)==null?void 0:e.bind(ce),J=!!((n=m.isLog)!=null&&n.call(m,"x"));if(!H||!N||!B||!W||nE(h)>CA)return!1;const q=C.x.domain().slice(0,2),at=(i=(r=R.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(!Pg(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=R.xDomain)==null?void 0:u.slice)==null?void 0:f.call(u);if(A.targets.forEach((bt,Rt)=>{bt.values.unshift(...ot[Rt])}),!Pg(lt,J))return at&&(R.xDomain=at),C.x.domain(q),et&&C.subX.domain(et),m.x.scale(C.x),!1;rE(h);let _=!1;const dt=tE(),ut=()=>{var bt,Rt;_||(_=!0,A.targets.forEach(Et=>{Et.values.splice(0,B)}),ft&&(R.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=eE(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=H(xt):ut()};return at&&(R.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=H(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 s0,e.canvasEngine.init(o,r.current.width,e.getCanvasSurfaceHeight()),i.canvas=Ut(e.canvasEngine.canvas),e.canvasTheme=new LT,e.canvasTheme.load(o,n.canvas_theme),e.canvasAxisRenderer=new a0(e.canvasEngine,e.canvasTheme),e.canvasRenderer=new bT(e.canvasEngine,e.canvasTheme),e.hitDetector=new BT,e.bindCanvasEvents(),n.zoom_enabled&&((t=e.bindZoomEvent)==null||t.call(e))},warnUnsupportedCanvasOptions(){var t,e,n,r;const{config:i}=this;[[!Eg(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&&xg(`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=Og(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)),JA(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($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());yg(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?OA(n,d):""),f.select(`.${ur.legendItemTitle}`).text(d=>Ps(n,d)),r.legend_tooltip&&f.attr("title",d=>Ps(n,d)),Ag(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=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 yg(e,u),Ag(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),R=20,C=Math.ceil(h.width||A),P=Math.ceil(h.height||R);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},R={offsets:{},widths:{},heights:{},margins:[0],steps:{}},C=t.map((J,q)=>{const at=`${Ps(e,J)}`,et=zA(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++)),R.steps[J]=A.step,R.margins[A.step]=r.isLegendInset?10:et,R.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(R.widths[J]=ot,R.heights[J]=lt,o.push(ot),l=Math.max(l,ot),c=Math.max(c,lt),q){R.steps[J]=0,R.offsets[J]=0;return}z(J,ft)});const N=r.isLegendRight?J=>A.max.width*R.steps[J]:r.isLegendInset?J=>A.max.width*R.steps[J]+10:J=>R.margins[R.steps[J]]+R.offsets[J],B=r.isLegendRight||r.isLegendInset?J=>R.margins[R.steps[J]]+R.offsets[J]:J=>A.max.height*R.steps[J],W=4+m.width,H=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:R.widths[J],height:R.heights[J]},title:{x:W,y:0,height:R.heights[J]},tile:{x:-2,y:H-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(R=>{A&&A+h+R>d?(m++,A=R):A+=(A?h:0)+R}),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=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(`.${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=ZA(e);let d=!1;s.data_selection_enabled&&(Qc(o,h=>{const m=pa(h),A=u||!f||f.indexOf(h.id)>=0,R=!n||n.indexOf(h.index)>=0,C=c.has(m);t?A&&R&&!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&&R&&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,Os.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),R={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}=KA(n,n.getCanvasSelectionDragData(R));z.length&&n.toggleCanvasSelection(z),i.canvasSelectionDragIncluded=P,i.cancelClick=!0}return n.renderCanvasSelectionDrag(R),(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,Os.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=kA(r,t,!0);if(!l||_A(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&&qA(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)>EA&&(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 R=s[0]+u,C=s[1]+u;R<h&&(C+=h-R,R=h),C>m&&(R-=C-m,C=m),f=[Math.max(h,Math.min(m-A,R)),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=HA(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=Rg(e,r);return n.style.cursor=YA(e,i),!0},startCanvasSubchartBrush(t){var e;const n=this,{state:r}=n,i=Kc(n,t);if(i===null)return!1;const o=Rg(n,i);return r.event=t,r.canvasSubchartBrushDragging=!0,r.canvasSubchartBrushMode=o,r.canvasSubchartBrushStart=i,r.canvasSubchartBrushOrigin=Ig(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?WA(s,d):null;if(!h){if(s.dispatchCanvasDataOut(f),c.canvasFocusKey&&(c.canvasFocusKey=null,s.clearCanvasFocus()),d&&l.axis_tooltip&&GA(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=Cg(s,h),A=VA(s,h,m),R=A.map(C=>`${C.id}:${C.index}`).join("|");(c.canvasFocusKey!==R||l.axis_tooltip)&&(c.canvasFocusKey=R,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=Cg(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),R=ki(o,h),C=[l.margin.left+R.x,l.margin.top+R.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 Mg=()=>(yn(Er.prototype,aE),(Mg=()=>"canvas")());var Lg={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 iE(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(),ln(i)&&(e[s]=i)}),this.api&&(this.state.orgConfig=t)}var oE={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&&b1(),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(R=>{R==="internal"&&Object.keys(f).forEach(C=>{f[C]=null}),this[R]=null,delete this[R]});for(const R in this)this[R]=()=>{}}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?ln(e)?(i[s]=e,l=e,n&&this.flush()):l=i[s]:(arguments.length===0||lr(t))&&(l=o.orgConfig),l}},sE={color(t){return this.internal.color(t)}};const Dg=function(t){const{targets:e}=this.internal.data;if(!xn(t)){const n=tn(t)?t:[t];return e.filter(r=>n.some(i=>i===r.id))}return e};yn(Dg,{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);tn(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 lE={data:Dg},cE={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(rn.focused,!0).classed(rn.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(rn.focused,!1).classed(rn.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);if(s.isCanvasMode){const f=!!((e=s.focusedTargetIds)!=null&&e.size)||!!((n=s.defocusedTargetIds)!=null&&n.size);o.legend_show&&(i.showLegend(c.filter(i.isLegendToShow.bind(i))),l.legend.selectAll(i.selectorLegends(c)).filter(function(){return Ut(this).classed(rn.legendItemFocused)}).classed(rn.legendItemFocused,!1)),s.focusedTargetIds=new Set,s.defocusedTargetIds=new Set,f&&((r=i.renderCanvasFrame)==null||r.call(i,void 0,null,!1));return}l.svg.selectAll(i.selectorTargets(c)).classed(rn.focused,!1).classed(rn.defocused,!1),i.hasArcType(null,["polar"])&&i.unexpandArc(c),o.legend_show&&(i.showLegend(c.filter(i.isLegendToShow.bind(i))),l.legend.selectAll(i.selectorLegends(c)).filter(function(){return Ut(this).classed(rn.legendItemFocused)}).classed(rn.legendItemFocused,!1)),s.focusedTargetIds=new Set,s.defocusedTargetIds=new Set}},uE={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})}}},fE={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(),tn(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 dE={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))}},hE={tooltip:{show:function(t){var e,n,r,i,o,s,l,c,u,f,d,h;const m=this.internal,{$el:A,config:R,state:{eventReceiver:C,hasFunnel:P,hasTreemap:z,inputType:N}}=m;let B,W;if(t.mouse&&(W=t.mouse),t.data){const{data:H}=t,J=(e=m.getYScaleById(H.id))==null?void 0:e(H.value);if((P||z)&&H.id){const q=m.selectorTarget(H.id,void 0,`.${bn.shape}`);C.rect=A.main.select(q)}else m.isMultipleX()?W=[m.xx(H),J]:(R.tooltip_grouped||(W=[0,J]),B=(r=H.index)!=null?r:m.hasArcType()&&H.id?(n=m.getArcElementByIdOrIndex(H.id))==null?void 0:n.datum().index:m.getIndexByX(H.x))}else ln(t.x)?B=m.getIndexByX(t.x):ln(t.index)&&(B=t.index);if(m.state.isCanvasMode){const H=((i=m.filterTargetsToShow)==null?void 0:i.call(m))||m.data.targets,J=(o=t.data)!=null&&o.id&&!R.tooltip_grouped?H.filter(lt=>lt.id===t.data.id).map(lt=>lt.values[B!=null?B:t.data.index]).filter(Boolean):H.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(H=>{m.dispatchEvent(H,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)}}},gE=Object.defineProperty,vE=(t,e,n)=>e in t?gE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Fg=(t,e,n)=>vE(t,typeof e!="symbol"?e+"":e,n);class Kn{constructor(e){Fg(this,"plugins",[]),Fg(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),iE.call(n,e),n.beforeInit(),n.init()}}yn(Kn.prototype,[oE,sE,lE,cE,uE,fE,dE,hE]);let Ng=()=>(Kn.prototype.category=Lg.category,Kn.prototype.categories=Lg.categories,(Ng=()=>({}))());const pE=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 mE(t,e,n){const{width:r,height:i}=e||n,o=new XMLSerializer,s=t.cloneNode(!0),l=f1(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(`
|
|
58
58
|
`)));const f=o.serializeToString(u),d=`<svg xmlns="${Qt.svg}" width="${r}" height="${i}"
|
|
59
59
|
viewBox="0 0 ${n.width} ${n.height}"
|
|
60
60
|
preserveAspectRatio="${(e==null?void 0:e.preserveAspectRatio)===!1?"none":"xMinYMid meet"}">
|
|
61
61
|
<foreignObject width="100%" height="100%">
|
|
62
62
|
${f}
|
|
63
63
|
${c.replace(/(url\()[^#]+/g,"$1")}
|
|
64
|
-
</foreignObject></svg>`;return`data:image/svg+xml;base64,${pE(d)}`}function xE(t,e){const{top:n,left:r}=e,{x:i,y:o}=da(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 yE(t){const{left:e,top:n}=un(t),r=o=>o.textContent||o.childElementCount,i=[];return Ea(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:R,height:C}=xE(l,{left:e,top:n});return{[l.textContent]:{x:m,y:A,width:R,height:C,fill:c,fontFamily:u,fontSize:f,textAnchor:d,transform:h}}};o.childElementCount>1?Ea(o.querySelectorAll("tspan")).filter(r).forEach(l=>{i.push(s(l))}):i.push(s(o))}),i}function TE(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 bE(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 SE={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=bE(l,d,{width:u,height:f});return e==null||e.bind(this)(A),A}const h=mE(o.node(),d,{width:u,height:f}),m=d.preserveFontStyle?yE(s.node()):[];if(e&&le(e)){const A=new Image;A.crossOrigin="Anonymous",A.onload=()=>{const R=He.createElement("canvas"),C=R.getContext("2d");R.width=d.width||u,R.height=d.height||f,C.drawImage(A,0,0),m.length&&(TE(C,m),m.length=0),e.bind(this)(R.toDataURL(d.mimeType))},A.src=h}return h}};let Bg=()=>(Kn.prototype.export=SE.export,(Bg=()=>({}))());var AE={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),R=e.axis.isTimeSeries();e.data.targets.forEach(z=>{let $=!1;for(let B=0;B<A.length;B++)if(z.id===A[B].id){$=!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 H=0;H<c;H++)W[H].index=u+H,R||(W[H].x=u+H),z.values.push(W[H]);A.splice(B,1);break}!$&&h.push(z.id)}),e.data.targets.forEach(z=>{for(let $=0;$<h.length;$++)if(z.id===h[$]){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:R?e.getOtherTargetX(u+B):u+B,value:null})}}),e.data.targets.length&&A.forEach(z=>{const $=e.data.targets[0].values[0].index,B=z.values,W=B.length,H=Math.max(u-$,0);if(H){B.length=W+H;for(let J=W-1;J>=0;J--)B[J+H]=B[J];for(let J=0;J<H;J++){const q=$+J;B[J]={id:z.id,index:q,x:R?e.getOtherTargetX(q):q,value:null}}}for(let J=H;J<B.length;J++){const q=B[J];q.index+=u,R||(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(ln(t.to)?(c=0,d=R?Hn.call(e,t.to):t.to,C.values.forEach(z=>{z.x<d&&c++})):ln(t.length)&&(c=t.length),m?m===1&&R&&(f=(C.values[C.values.length-1].x-P.x)/2,l=[new Date(+P.x-f),new Date(+P.x+f)]):(R?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})}}},EE={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=eh();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:R}=l;R&&(["circle","text","shape","eventRect"].forEach(C=>{const P=[];for(let z=0;z<R;z++)P.push(`.${en[C]}-${z}`);o.selectAll(`.${en[`${C}s`]}`).selectAll(P).remove()}),o.select(`.${en.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,$=B=>d(B)-r.point_r;P.attr("x",z).attr("y",$)}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=Aa(h)/2;const m=Aa(d)/Aa(h);return`translate(${f},0) scale(${m},1)`}};let zg=()=>(yn(Er.prototype,EE),Kn.prototype.flow=AE.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 CE=`line.${rn.xgridFocus}, line.${rn.ygridFocus}`,IE=t=>We(t.position)||"end",RE=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(CE)}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=Ut(this);["x1","x2","y1","y2"].forEach(r=>n.attr(r,+n.attr(r)))})}var wE={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=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(`.${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=Ut(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",IE).attr("transform",()=>l?s?null:"rotate(-90)":s?"rotate(-90)":null).attr("dx",RE).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",rn.xgridFocus).append("line").attr("class",rn.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&l.append("g").attr("class",rn.ygridFocus).append("line").attr("class",rn.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]=hr(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",R=d[A];let C=(e=n.scale[h])==null?void 0:e.invert(R);C&&(C=h==="x"&&n.axis.isTimeSeries()?i.xAxisTick(C):C==null?void 0:C.toFixed(2),m==null||m.attr(A,R).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=Ut(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=Ut(this),m={x:f(d),y:n.getYScaleById(d.id)(d.value)};let A;if(h.classed(rn.xgridFocus))A=s?[null,m.x,u?m.y:i,m.x]:[m.x,u?m.y:null,m.x,o];else{const R=n.axis.getId(d.id)==="y2";A=s?[m.y,u&&!R?m.x:null,m.y,u&&R?m.x:o]:[u&&R?m.x:null,m.y,u&&!R?m.x:i,m.y]}["x1","y1","x2","y2"].forEach((R,C)=>h.attr(R,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.${rn.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(tn(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)}},OE={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,wE),Kn.prototype.xgrids=jg.xgrids,Kn.prototype.ygrids=jg.ygrids,Fa.setOptions([OE]),(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=Ut(this),{id:d,index:h}=u.data?u.data:u,m=i.getToggle(this,u).bind(i),A=l||!e||e.indexOf(d)>=0,R=!n||n.indexOf(h)>=0,C=f.classed(gn.SELECTED);f.classed(Lr.line)||f.classed(as.area)||(t?A&&R&&c(u)&&!C?m(!0,f.classed(gn.SELECTED,!0),u,h):ln(r)&&r&&C&&m(!1,f.classed(gn.SELECTED,!1),u,h):A&&R&&c(u)&&C&&m(!1,f.classed(gn.SELECTED,!1),u,h))})}var PE={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 Ut(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)}},ME={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),R=()=>{!e||!e.$el||!e.$el.main||(i.select(`.${Da.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=Ut(this),$=z.classed(gn.SELECTED),B=z.classed(Da.INCLUDED);let W,H;if(z.classed(Bn.circle)){const J=+z.attr("cx"),q=+z.attr("cy");H=e.togglePoint,W=d<J&&J<h&&m<q&&q<A}else if(z.classed(nr.bar)){const{x:J,y:q,width:at,height:et}=_d(this);H=e.togglePath,W=!(h<J||J+at<d)&&!(A<q||q+et<m)}else return;W^B&&(z.classed(Da.INCLUDED,!B),z.classed(gn.SELECTED,!$),H.call(e,!$,z,C,P))}))};th(e.state,R)},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",Da.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(`.${Da.dragarea}`)).style("opacity","0").remove(),n.selectAll(`.${bn.shape}`).classed(Da.INCLUDED,!1),t.setDragStatus(!1))}},LE=Object.defineProperty,DE=Object.defineProperties,FE=Object.getOwnPropertyDescriptors,Qg=Object.getOwnPropertySymbols,NE=Object.prototype.hasOwnProperty,$E=Object.prototype.propertyIsEnumerable,_g=(t,e,n)=>e in t?LE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,BE=(t,e)=>{for(var n in e||(e={}))NE.call(e,n)&&_g(t,n,e[n]);if(Qg)for(var n of Qg(e))$E.call(e,n)&&_g(t,n,e[n]);return t},zE=(t,e)=>DE(t,FE(e)),UE=zE(BE({},ME),{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=Ut(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=Ut(this);f=A,u(!1,A,m,m.index)})}(!f||f.node()!==l.node())&&(l.classed(gn.SELECTED,!c),u(!c,l,e,n))}}}),kE={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,UE),yn(Kn.prototype,PE),Fa.setOptions([kE]),(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 XE={subchart:tv},GE={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?bS():TS()).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((R,C)=>{R!==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",(R,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(`.${en.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]]:tn(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(`.${en.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(en.subchart,!0).attr("transform",t.getTranslate("context"));const{main:d}=s;d.style("visibility",c),d.append("g").attr("clip-path",f).attr("class",en.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 R=d.select(`.${en.chart}`),C=en[`chart${A}s`];R.select(`.${C}`).empty()&&R.append("g").attr("class",C)}});const h=d.append("g").attr("clip-path",f).attr("class",en.brush).call(t.brush);e.subchart_showHandle&&t.addBrushHandle(h),l.subX=d.append("g").attr("class",en.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(`.${en[`chart${`${l}s`}`]}`);if(s){const d=f.selectAll(`.${en.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(`.${en[`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(`.${en.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(`.${en.axisX}`),t);r.main.attr("transform",n.getTranslate("context")),o.attr("transform",n.getTranslate("subX"))}},WE={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,GE),yn(Kn.prototype,XE),Fa.setOptions([WE]),(ev=()=>!0)());var VE=1e-12;function nv(t){return((t=Math.exp(t))+1/t)/2}function jE(t){return((t=Math.exp(t))-1/t)/2}function HE(t){return((t=Math.exp(2*t))-1)/(t+1)}var YE=(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,R=m*m+A*A,C,P;if(R<VE)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(R),$=(h*h-u*u+r*R)/(2*u*n*z),B=(h*h-u*u-r*R)/(2*h*n*z),W=Math.log(Math.sqrt($*$+1)-$),H=Math.log(Math.sqrt(B*B+1)-B);P=(H-W)/e,C=function(J){var q=J*P,at=nv(W),et=u/(n*z)*(at*HE(e*q+W)-jE(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 KE(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 gr=new qr(1,0,0);qc.prototype=qr.prototype;function qc(t){for(;!t.__zoom;)if(!(t=t.parentNode))return gr;return t.__zoom}function tu(t){t.stopImmediatePropagation()}function so(t){t.preventDefault(),t.stopImmediatePropagation()}function ZE(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function JE(){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||gr}function QE(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function _E(){return navigator.maxTouchPoints||"ontouchstart"in this}function qE(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 tC(){var t=ZE,e=JE,n=qE,r=QE,i=_E,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=YE,u=cs("start","zoom","end"),f,d,h,m=500,A=150,R=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(){H(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($(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(gr.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 $(_,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(){H(this,arguments).event(xt).start()}).on("interrupt.zoom end.zoom",function(){H(this,arguments).event(xt).end()}).tween("zoom",function(){var bt=this,Rt=arguments,Et=H(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 H(_,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=Ut(this.that).datum();u.call(_,this.that,new KE(_,{sourceEvent:this.sourceEvent,target:P,type:_,transform:this.that.__zoom,dispatch:u}),dt)}};function q(_,...dt){if(!t.apply(this,arguments))return;var ut=H(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($(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=H(this,dt,!0).event(_),bt=Ut(_.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>R}xt.event(xe).zoom("mouse",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($(z(ut,Rt),xt,bt),e.apply(this,dt),s);so(_),l>0?Ut(this).transition().duration(l).call(W,Et,xt,_):Ut(this).call(P.transform,Et,xt,_)}}function ot(_,...dt){if(t.apply(this,arguments)){var ut=_.touches,xt=ut.length,bt=H(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=H(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($(Et,Zt,fe),ut.extent,s))}}function ft(_,...dt){if(this.__zooming){var ut=H(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=Ut(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?(R=(_=+_)*_,P):Math.sqrt(R)},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=Tr("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=Tr("min",[r[0],t])),n.zoom_x_min},range(t){const e=this.zoom;if(je(t)){const{min:n,max:r}=t;ln(n)&&e.min(n),ln(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var eC={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(gr),e.updateZoom(!0),o==null||o.style("display","none"),c!=null&&c.node()&&qc(c.node())!==gr&&e.zoom.transform(c,gr),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 gr.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 gr.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=hr(e,n);if(t.state.isCanvasMode){const{margin:i}=t.state;r[0]-=i.left,r[1]-=i.top}return r}var nC={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=tC().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=Aa(t.scale.x.orgDomain())/Aa(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]),R=u?f.x:A,C=u?A:f.y,P=ov(t,gr.translate(R,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)===gr;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,R)=>A!==o.xDomain[R])&&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?th(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)===gr;(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=gr.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}}},rC={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,nC),yn(Kn.prototype,eC),Fa.setOptions([rC]),(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 aC={regions:fv},iC={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;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:A=!1}=(f=u.label)!=null?f:{},R=this.previousElementSibling,C={x:0,y:0};return Ke(m)&&["x","y"].forEach((P,z)=>{m.indexOf(P)>-1&&(C[P]=(+R.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(){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=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,iC),Kn.prototype.regions=aC.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=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,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 oC(t){return Qn(t)&&le(t.create)&&le(t.update)}function sC(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=Ut(l);"innerHTML"in l?c.html(Xr(s.innerHTML)):Ea(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=Ut(this);r.indexOf(m)<0&&r.push(m);let R=i[r.indexOf(m)%i.length];if(t.hasValidPointType(R))R=t[R];else if(!oC(R||n.point_type)){const C=t.getDefsPointId(m);if(e.defs.select(`#${C}`).size()<1&&sC.call(t,R,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=R[o])==null?void 0:h.bind(s)(A,...l)}}}};function lC(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 cC={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 R=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)},$={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),H=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"}${R(ot)},${C(ot)}`;else if(ft)if(_=((_==null?void 0:_.dasharray)||c).split(" ").map(Number),d=oa($.x,lt.x,ot.x),h=oa($.y,lt.value,ot.value),f){const dt=e(ot.x)-e(lt.x),ut=n(ot.value)-n(lt.value),xt=Math.sqrt(Math.pow(dt,2)+Math.pow(ut,2));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(H,B),xt=J(H,B+=`L${dt[1].join(",")}`),bt=lC(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(H,B)),W.attr("stroke-dasharray",q.dash.join(" "))),H.remove(),B},isWithinRegions(t,e){return ed(t,e)},isWithinStep(t,e){return Math.abs(e-hr(this.state.event,t)[1])<30},shouldDrawPointsForLine(t){const e=this.config.line_point;return e===!0||tn(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}=da(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 Ut(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.updateCircleColor.bind(e),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)}},updateCircleColor(t){const e=this,n=e.getStylePropValue(e.color);return e.config.point_radialGradient?e.getGradienColortUrl(t.id):n?n(t):null},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);if(o.isCirclePoint()){const C=u.circle;return o.hasType("bubble")&&C.attr("r",o.pointR.bind(o)),n?(r&&C.attr("cx",t),c(C.filter(function(){return!!this.getAttribute("cx")}),!0,`${h}-pos`).attr("cx",t).attr("cy",e).style("fill",o.updateCircleColor.bind(o)),C.filter(function(){return!this.getAttribute("cx")}).attr("cx",t).attr("cy",e).style("fill",o.updateCircleColor.bind(o))):C.attr("cx",t).attr("cy",e).style("fill",o.updateCircleColor.bind(o)),[[c(C,n||!s,h).style("opacity",m)],c(f,n).attr("cx",t).attr("cy",e)]}const A=o.point("update",o,t,e,o.updateCircleColor.bind(o),n,r,f),R=[];return u.circle.each(function(C){let P=A.bind(this)(C);P=c(P,n||!s,h).style("opacity",m),R.push(P)}),[R,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,R=>R.id===h.id);return A.length?Ut(this).datum(A[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(h){const{id:m,index:A,value:R}=h;let C="hidden";We(R)&&(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=Ut(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 Ut(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=hr(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:u,y:f}=un(t);l=u,c=f}return Math.sqrt(Math.pow(l-r[0],2)+Math.pow(c-r[1],2))<(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)}}},za={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"},uC={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)};ln(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 fC={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;ln(r)&&e.max(r),ln(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}}},dC={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}},hC={x(t){const e=this.internal,{axis:n,data:r}=e,i=n.isCustomX()&&n.isCategorized();return tn(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 gC(t){return t}var zs=1,Us=2,nu=3,lo=4,mv=1e-6;function vC(t){return"translate("+t+",0)"}function pC(t){return"translate(0,"+t+")"}function mC(t){return e=>+t(e)}function xC(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function yC(){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?vC:pC;function h(m){var A=r==null?e.ticks?e.ticks.apply(e,n):e.domain():r,R=i==null?e.tickFormat?e.tickFormat.apply(e,n):gC:i,C=Math.max(o,0)+l,P=e.range(),z=+P[0]+c,$=+P[P.length-1]+c,B=(e.bandwidth?xC:mC)(e.copy(),c),W=m.selection?m.selection():m,H=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");H=H.merge(H.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&&(H=H.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(),H.attr("d",t===lo||t===Us?s?"M"+u*s+","+z+"H"+c+"V"+$+"H"+u*s:"M"+c+","+z+"V"+$:s?"M"+z+","+u*s+"V"+c+"H"+$+"V"+u*s:"M"+z+","+c+"H"+$),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(R),W.filter(yC).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 TC(t){return ks(zs,t)}function bC(t){return ks(Us,t)}function xv(t){return ks(nu,t)}function yv(t){return ks(lo,t)}var SC=Object.defineProperty,AC=(t,e,n)=>e in t?SC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xs=(t,e,n)=>AC(t,typeof e!="symbol"?e+"":e,n);class EC{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}=da(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 ln(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 CC=Object.defineProperty,IC=(t,e,n)=>e in t?CC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,co=(t,e,n)=>IC(t,typeof e!="symbol"?e+"":e,n);class RC{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:mr,tickOffset:0,tickPadding:sn,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 EC(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:R,tickLength:C,range:P}=r,z=o.id,$=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`],H={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=Ut(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}`}),H.tick||H.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,H))d(_,ot);else{_=_.data(ft,ot);const ut=_.enter().insert("g",".domain").attr("class","tick"),xt=_.exit().remove();_=ut.merge(_),H.tick&&ut.append("line"),H.text&&ut.append("text");const bt=!ut.empty()||!xt.empty(),Rt=H.text&&!bt&&n.canReuseTickTextOnResize(u||o.config.axis_rotated);let Et={w:0,h:0},Zt=_.selectAll("text.__bb-empty");if(H.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=tn(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+($.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):$.y===0?ke:0)),ge(Jt)&&$.y?Jt+$.y:Jt||ke})}const fe=_.select("line");if(ut.select("line").attr(`${h}2`,R*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=$=>{const B=["start","end"];return s==="top"&&B.reverse(),$?B[$>0?0:1]:"middle"},A=$=>$?`rotate(${$})`:null,R=$=>{const B=$/(s==="bottom"?15:23);return $?11.5-2.5*B*($>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",$=>this.getTickSize.bind(this)($)*(z?-1:1)),n.attr("x",0).attr("y",R(f)).style("text-anchor",($,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",-(R(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(`
|
|
64
|
+
</foreignObject></svg>`;return`data:image/svg+xml;base64,${pE(d)}`}function xE(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 yE(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:R,height:C}=xE(l,{left:e,top:n});return{[l.textContent]:{x:m,y:A,width:R,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 TE(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 bE(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 SE={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=bE(l,d,{width:u,height:f});return e==null||e.bind(this)(A),A}const h=mE(o.node(),d,{width:u,height:f}),m=d.preserveFontStyle?yE(s.node()):[];if(e&&le(e)){const A=new Image;A.crossOrigin="Anonymous",A.onload=()=>{const R=He.createElement("canvas"),C=R.getContext("2d");R.width=d.width||u,R.height=d.height||f,C.drawImage(A,0,0),m.length&&(TE(C,m),m.length=0),e.bind(this)(R.toDataURL(d.mimeType))},A.src=h}return h}};let $g=()=>(Kn.prototype.export=SE.export,($g=()=>({}))());var AE={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),R=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 H=0;H<c;H++)W[H].index=u+H,R||(W[H].x=u+H),z.values.push(W[H]);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:R?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,H=Math.max(u-N,0);if(H){B.length=W+H;for(let J=W-1;J>=0;J--)B[J+H]=B[J];for(let J=0;J<H;J++){const q=N+J;B[J]={id:z.id,index:q,x:R?e.getOtherTargetX(q):q,value:null}}}for(let J=H;J<B.length;J++){const q=B[J];q.index+=u,R||(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(ln(t.to)?(c=0,d=R?Hn.call(e,t.to):t.to,C.values.forEach(z=>{z.x<d&&c++})):ln(t.length)&&(c=t.length),m?m===1&&R&&(f=(C.values[C.values.length-1].x-P.x)/2,l=[new Date(+P.x-f),new Date(+P.x+f)]):(R?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})}}},EE={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:R}=l;R&&(["circle","text","shape","eventRect"].forEach(C=>{const P=[];for(let z=0;z<R;z++)P.push(`.${en[C]}-${z}`);o.selectAll(`.${en[`${C}s`]}`).selectAll(P).remove()}),o.select(`.${en.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 Bg=()=>(yn(Er.prototype,EE),Kn.prototype.flow=AE.flow,(Bg=()=>({}))());function zg(t){return Array.isArray(t)?t:[t]}function Ug(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]=zg(t),n.state.isCanvasMode?(Ug(n),r[o]):(n.updateGrid(),n.redrawGrid(i),r[o])):r[o]}function kg(t,e){const n=`grid_${e}_lines`;return _c.bind(this)(this.internal.config[n].concat(t?zg(t):[]),e)}function Xg(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)),Ug(r);return}r.removeGridLines(t,e)}const Gg=function(t){return _c.bind(this)(t,"x")};yn(Gg,{add(t){return kg.bind(this)(t,"x")},remove(t){return Xg.bind(this)(t,!0)}});const Wg=function(t){return _c.bind(this)(t,"y")};yn(Wg,{add(t){return kg.bind(this)(t,"y")},remove(t){return Xg.bind(this)(t,!1)}});var Vg={xgrids:Gg,ygrids:Wg};const CE=`line.${rn.xgridFocus}, line.${rn.ygridFocus}`,IE=t=>We(t.position)||"end",RE=t=>t.position==="start"?4:t.position==="middle"?0:-4;function jg(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(CE)}function Hg(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 Yg(t,e){e==="grid"&&t.each(function(){const n=Ut(this);["x1","x2","y1","y2"].forEach(r=>n.attr(r,+n.attr(r)))})}var wE={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=Hh([]))},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=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(`.${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),Yg(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=Ut(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",IE).attr("transform",()=>l?s?null:"rotate(-90)":s?"rotate(-90)":null).attr("dx",RE).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",Hg(!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",Hg(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",rn.xgridFocus).append("line").attr("class",rn.xgridFocus),e.grid_focus_y&&!e.tooltip_grouped&&l.append("g").attr("class",rn.ygridFocus).append("line").attr("class",rn.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",R=d[A];let C=(e=n.scale[h])==null?void 0:e.invert(R);C&&(C=h==="x"&&n.axis.isTimeSeries()?i.xAxisTick(C):C==null?void 0:C.toFixed(2),m==null||m.attr(A,R).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=Ut(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=jg(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=Ut(this),m={x:f(d),y:n.getYScaleById(d.id)(d.value)};let A;if(h.classed(rn.xgridFocus))A=s?[null,m.x,u?m.y:i,m.x]:[m.x,u?m.y:null,m.x,o];else{const R=n.axis.getId(d.id)==="y2";A=s?[m.y,u&&!R?m.x:null,m.y,u&&R?m.x:o]:[u&&R?m.x:null,m.y,u&&!R?m.x:i,m.y]}["x1","y1","x2","y2"].forEach((R,C)=>h.attr(R,A[C]))}),Yg(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)&&(jg(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.${rn.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(tn(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)}},OE={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 Kg=()=>(yn(Er.prototype,wE),Kn.prototype.xgrids=Vg.xgrids,Kn.prototype.ygrids=Vg.ygrids,Da.setOptions([OE]),(Kg=()=>({}))());function Zg(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=Ut(this),{id:d,index:h}=u.data?u.data:u,m=i.getToggle(this,u).bind(i),A=l||!e||e.indexOf(d)>=0,R=!n||n.indexOf(h)>=0,C=f.classed(gn.SELECTED);f.classed(Lr.line)||f.classed(as.area)||(t?A&&R&&c(u)&&!C?m(!0,f.classed(gn.SELECTED,!0),u,h):ln(r)&&r&&C&&m(!1,f.classed(gn.SELECTED,!1),u,h):A&&R&&c(u)&&C&&m(!1,f.classed(gn.SELECTED,!1),u,h))})}var PE={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 Ut(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}Zg.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}Zg.bind(r)(!1,t,e)}},ME={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),R=()=>{!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=Ut(this),N=z.classed(gn.SELECTED),B=z.classed(La.INCLUDED);let W,H;if(z.classed(Bn.circle)){const J=+z.attr("cx"),q=+z.attr("cy");H=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);H=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),H.call(e,!N,z,C,P))}))};qd(e.state,R)},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))}},LE=Object.defineProperty,DE=Object.defineProperties,FE=Object.getOwnPropertyDescriptors,Jg=Object.getOwnPropertySymbols,NE=Object.prototype.hasOwnProperty,$E=Object.prototype.propertyIsEnumerable,Qg=(t,e,n)=>e in t?LE(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,BE=(t,e)=>{for(var n in e||(e={}))NE.call(e,n)&&Qg(t,n,e[n]);if(Jg)for(var n of Jg(e))$E.call(e,n)&&Qg(t,n,e[n]);return t},zE=(t,e)=>DE(t,FE(e)),UE=zE(BE({},ME),{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=Ut(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=Ut(this);f=A,u(!1,A,m,m.index)})}(!f||f.node()!==l.node())&&(l.classed(gn.SELECTED,!c),u(!c,l,e,n))}}}),kE={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 _g=()=>(yn(Er.prototype,UE),yn(Kn.prototype,PE),Da.setOptions([kE]),(_g=()=>!0)());const qg=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(qg,{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 XE={subchart:qg},GE={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?bS():TS()).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((R,C)=>{R!==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",(R,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&&$h(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(`.${en.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]]:tn(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(`.${en.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(en.subchart,!0).attr("transform",t.getTranslate("context"));const{main:d}=s;d.style("visibility",c),d.append("g").attr("clip-path",f).attr("class",en.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 R=d.select(`.${en.chart}`),C=en[`chart${A}s`];R.select(`.${C}`).empty()&&R.append("g").attr("class",C)}});const h=d.append("g").attr("clip-path",f).attr("class",en.brush).call(t.brush);e.subchart_showHandle&&t.addBrushHandle(h),l.subX=d.append("g").attr("class",en.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(`.${en[`chart${`${l}s`}`]}`);if(s){const d=f.selectAll(`.${en.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(`.${en[`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(`.${en.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(!zh(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(`.${en.axisX}`),t);r.main.attr("transform",n.getTranslate("context")),o.attr("transform",n.getTranslate("subX"))}},WE={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 tv=()=>(yn(Er.prototype,GE),yn(Kn.prototype,XE),Da.setOptions([WE]),(tv=()=>!0)());var VE=1e-12;function ev(t){return((t=Math.exp(t))+1/t)/2}function jE(t){return((t=Math.exp(t))-1/t)/2}function HE(t){return((t=Math.exp(2*t))-1)/(t+1)}var YE=(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,R=m*m+A*A,C,P;if(R<VE)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(R),N=(h*h-u*u+r*R)/(2*u*n*z),B=(h*h-u*u-r*R)/(2*h*n*z),W=Math.log(Math.sqrt(N*N+1)-N),H=Math.log(Math.sqrt(B*B+1)-B);P=(H-W)/e,C=function(J){var q=J*P,at=ev(W),et=u/(n*z)*(at*HE(e*q+W)-jE(W));return[l+et*m,c+et*A,u*at/ev(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 KE(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 ZE(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function JE(){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 nv(){return this.__zoom||hr}function QE(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function _E(){return navigator.maxTouchPoints||"ontouchstart"in this}function qE(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 tC(){var t=ZE,e=JE,n=qE,r=QE,i=_E,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],l=250,c=YE,u=cs("start","zoom","end"),f,d,h,m=500,A=150,R=0,C=10;function P(_){_.property("__zoom",nv).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",nv),_!==bt?W(_,dt,ut,xt):bt.interrupt().each(function(){H(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(){H(this,arguments).event(xt).start()}).on("interrupt.zoom end.zoom",function(){H(this,arguments).event(xt).end()}).tween("zoom",function(){var bt=this,Rt=arguments,Et=H(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 H(_,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=Ut(this.that).datum();u.call(_,this.that,new KE(_,{sourceEvent:this.sourceEvent,target:P,type:_,transform:this.that.__zoom,dispatch:u}),dt)}};function q(_,...dt){if(!t.apply(this,arguments))return;var ut=H(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=H(this,dt,!0).event(_),bt=Ut(_.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>R}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?Ut(this).transition().duration(l).call(W,Et,xt,_):Ut(this).call(P.transform,Et,xt,_)}}function ot(_,...dt){if(t.apply(this,arguments)){var ut=_.touches,xt=ut.length,bt=H(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=H(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=H(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=Ut(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?(R=(_=+_)*_,P):Math.sqrt(R)},P.tapDistance=function(_){return arguments.length?(C=+_,P):C},P}const rv=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(rv,{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;ln(n)&&e.min(n),ln(r)&&e.max(r)}return{min:e.min(),max:e.max()}}});var eC={zoom:rv,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 av(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 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,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 nC={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=tC().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=av(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]),R=u?f.x:A,C=u?A:f.y,P=iv(t,hr.translate(R,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,R)=>A!==o.xDomain[R])&&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,iv(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=ch().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(ov(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(ov(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?av(t,qc(n)):{k:1}}},rC={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 sv=()=>(yn(Er.prototype,nC),yn(Kn.prototype,eC),Da.setOptions([rC]),(sv=()=>!0)());function lv(t){var e;t.state.canvasShape=null,(e=t.renderCanvasFrame)==null||e.call(t,void 0,null,!1)}function cv(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?(lv(n),r.regions):(n.updateRegion(),n.redrawRegion(i),r.regions)):r.regions}const uv=function(t){return cv.bind(this)(t)};yn(uv,{add:function(t){return cv.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=[],lv(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 aC={regions:uv},iC={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;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:A=!1}=(f=u.label)!=null?f:{},R=this.previousElementSibling,C={x:0,y:0};return Ke(m)&&["x","y"].forEach((P,z)=>{m.indexOf(P)>-1&&(C[P]=(+R.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(){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=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 fv=()=>(yn(Er.prototype,iC),Kn.prototype.regions=aC.regions,(fv=()=>({}))());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 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(`.${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=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,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 oC(t){return Qn(t)&&le(t.create)&&le(t.update)}function sC(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=Ut(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=Ut(this);r.indexOf(m)<0&&r.push(m);let R=i[r.indexOf(m)%i.length];if(t.hasValidPointType(R))R=t[R];else if(!oC(R||n.point_type)){const C=t.getDefsPointId(m);if(e.defs.select(`#${C}`).size()<1&&sC.call(t,R,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=R[o])==null?void 0:h.bind(s)(A,...l)}}}};function lC(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 cC={initLine(){vg.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 R=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),H=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"}${R(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(Math.pow(dt,2)+Math.pow(ut,2));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(H,B),xt=J(H,B+=`L${dt[1].join(",")}`),bt=lC(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(H,B)),W.attr("stroke-dasharray",q.dash.join(" "))),H.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||tn(e)&&e.indexOf(t.id)!==-1}};const pi=()=>Rr(),dv=new WeakMap;function hv(t){const e=t.getAttribute("height"),n=t.getAttribute("width"),r=t.getAttribute("href")||t.getAttribute("xlink:href"),i=dv.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 dv.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 Ut(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.updateCircleColor.bind(e),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)}},updateCircleColor(t){const e=this,n=e.getStylePropValue(e.color);return e.config.point_radialGradient?e.getGradienColortUrl(t.id):n?n(t):null},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);if(o.isCirclePoint()){const C=u.circle;return o.hasType("bubble")&&C.attr("r",o.pointR.bind(o)),n?(r&&C.attr("cx",t),c(C.filter(function(){return!!this.getAttribute("cx")}),!0,`${h}-pos`).attr("cx",t).attr("cy",e).style("fill",o.updateCircleColor.bind(o)),C.filter(function(){return!this.getAttribute("cx")}).attr("cx",t).attr("cy",e).style("fill",o.updateCircleColor.bind(o))):C.attr("cx",t).attr("cy",e).style("fill",o.updateCircleColor.bind(o)),[[c(C,n||!s,h).style("opacity",m)],c(f,n).attr("cx",t).attr("cy",e)]}const A=o.point("update",o,t,e,o.updateCircleColor.bind(o),n,r,f),R=[];return u.circle.each(function(C){let P=A.bind(this)(C);P=c(P,n||!s,h).style("opacity",m),R.push(P)}),[R,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,R=>R.id===h.id);return A.length?Ut(this).datum(A[0]):!1})),l.attr("class",this.updatePointClass.bind(this)).style("opacity",null).each(function(h){const{id:m,index:A,value:R}=h;let C="hidden";We(R)&&(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=Ut(this);if(this.tagName==="circle")c.attr("r",i);else{const{width:u,height:f}=hv(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(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=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:u,y:f}=un(t);l=u,c=f}return Math.sqrt(Math.pow(l-r[0],2)+Math.pow(c-r[1],2))<(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}=hv(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"},uC={line_connectNull:!1,line_step_type:"step",line_step_tooltipMatch:!1,line_zerobased:!1,line_classes:void 0,line_point:!0};function gv(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)};ln(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 vv(t,e){const{config:n}=t;return{x:n[`axis_x_${e}`],y:n[`axis_y_${e}`],y2:n[`axis_y2_${e}`]}}var fC={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?gv(e,"min",t):vv(e,"min")},max:function(t){const e=this.internal;return We(t)||t===!1?gv(e,"max",t):vv(e,"max")},range:function(t){const{axis:e}=this;if(arguments.length){const{min:n,max:r}=t;ln(r)&&e.max(r),ln(n)&&e.min(n)}else return{max:e.max(),min:e.min()}}}},dC={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}},hC={x(t){const e=this.internal,{axis:n,data:r}=e,i=n.isCustomX()&&n.isCategorized();return tn(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 gC(t){return t}var zs=1,Us=2,nu=3,lo=4,pv=1e-6;function vC(t){return"translate("+t+",0)"}function pC(t){return"translate(0,"+t+")"}function mC(t){return e=>+t(e)}function xC(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function yC(){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?vC:pC;function h(m){var A=r==null?e.ticks?e.ticks.apply(e,n):e.domain():r,R=i==null?e.tickFormat?e.tickFormat.apply(e,n):gC:i,C=Math.max(o,0)+l,P=e.range(),z=+P[0]+c,N=+P[P.length-1]+c,B=(e.bandwidth?xC:mC)(e.copy(),c),W=m.selection?m.selection():m,H=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");H=H.merge(H.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&&(H=H.transition(m),J=J.transition(m),et=et.transition(m),ot=ot.transition(m),q=q.transition(m).attr("opacity",pv).attr("transform",function(lt){return isFinite(lt=B(lt))?d(lt+c):this.getAttribute("transform")}),at.attr("opacity",pv).attr("transform",function(lt){var ft=this.parentNode.__axis;return d((ft&&isFinite(ft=ft(lt))?ft:B(lt))+c)})),q.remove(),H.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(R),W.filter(yC).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 TC(t){return ks(zs,t)}function bC(t){return ks(Us,t)}function mv(t){return ks(nu,t)}function xv(t){return ks(lo,t)}var SC=Object.defineProperty,AC=(t,e,n)=>e in t?SC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Xs=(t,e,n)=>AC(t,typeof e!="symbol"?e+"":e,n);class EC{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 ln(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 CC=Object.defineProperty,IC=(t,e,n)=>e in t?CC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,co=(t,e,n)=>IC(t,typeof e!="symbol"?e+"":e,n);class RC{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:sn,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 EC(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:R,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`],H={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=Ut(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}`}),H.tick||H.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,H))d(_,ot);else{_=_.data(ft,ot);const ut=_.enter().insert("g",".domain").attr("class","tick"),xt=_.exit().remove();_=ut.merge(_),H.tick&&ut.append("line"),H.text&&ut.append("text");const bt=!ut.empty()||!xt.empty(),Rt=H.text&&!bt&&n.canReuseTickTextOnResize(u||o.config.axis_rotated);let Et={w:0,h:0},Zt=_.selectAll("text.__bb-empty");if(H.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=tn(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`,R*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,R=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",R(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",-(R(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(`
|
|
65
65
|
`)>-1?l.split(`
|
|
66
|
-
`):[];if(c.length)return c;if(tn(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,R;for(let C=1;C<h.length;C++)if(h.charAt(C)===" "&&(A=C),m=h.substr(0,C+1),R=o*m.length,u<R)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=Ea(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 wC=Object.defineProperty,OC=Object.defineProperties,PC=Object.getOwnPropertyDescriptors,Tv=Object.getOwnPropertySymbols,MC=Object.prototype.hasOwnProperty,LC=Object.prototype.propertyIsEnumerable,ru=(t,e,n)=>e in t?wC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DC=(t,e)=>{for(var n in e||(e={}))MC.call(e,n)&&ru(t,n,e[n]);if(Tv)for(var n of Tv(e))LC.call(e,n)&&ru(t,n,e[n]);return t},FC=(t,e)=>OC(t,PC(e)),ta=(t,e,n)=>ru(t,typeof e!="symbol"?e+"":e,n);function NC(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 $C(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 BC(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+ka)return!0;l=Math.max(l,f)}return!1}function zC(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 UC(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 kC(t,e,n){ou(t),t.length=e,Ws(t,n)}function XC(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 GC(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 WC(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 VC=0;function Sv(t){if(!t||!/^(function|object)$/.test(typeof t))return`${typeof t}:${String(t)}`;let e=bv.get(t);return e||(e=++VC,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 jC(t){return{width:t.width,height:t.height,ticks:t.ticks&&XC(t.ticks),clipPath:t.clipPath,domain:lu(t.domain)}}function HC(t,e){return t.width=e.width,t.height=e.height,t.clipPath=e.clipPath,t.domain=lu(e.domain),t.ticks&&e.ticks&&GC(t.ticks,e.ticks),t}var YC={getAxisInstance:function(){return this.axis||new KC(this)}};class KC{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?TC:bC),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,R)=>A===d[R])||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 R=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||(R.tickStepSize=l[`axis_${u}_tick_stepSize`]);const C=new RC(R).scale(c&&s.scale.zoom||n).orient(d);if(c&&this.isTimeSeries()&&A&&!le(A)){const z=Hn.bind(s);A=A.map($=>z($))}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),sr(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:UC(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}`,R={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(),$=i.scale[e].copy().domain(i[`get${P?"Y":"X"}Domain`](z,e)),B=$.domain(),W=B[0]===B[1]&&B.every(bt=>bt>0),H=tn(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(bt=>bt>0);if(W||H)return d;d.domain=B,P||ou(d.ticks);const J=this.getAxis(e,$,!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,$,B,J,q,n),(m==null?void 0:m.fingerprint)===C)return i.cache.add(h,FC(DC({},m),{generation:s.redrawGeneration})),HC(d,m.value);const ot=J.tickValues(),lt=!P&&Array.isArray(ot)&&ot.length>Gs;lt&&J.tickValues(zC(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;R.width=Math.max(R.width,Et),R.height=Math.max(R.height,Zt),P||(d.ticks[Rt]=Et)});else{const bt=[];if(ut.each(function(){bt.push(this)}),(bt.length<=5?bt:NC(bt)).map(Et=>un(Et,!0)).forEach(Et=>{R.width=Math.max(R.width,Et.width),R.height=Math.max(R.height,Et.height)}),!P)for(let Et=0;Et<bt.length;Et++)d.ticks[Et]=R.width}!P&<&&kC(d.ticks,xt,R.width),ft.remove()}return Object.keys(R).forEach(P=>{R[P]>0&&(d[P]=R[P])}),i.cache.add(h,{fingerprint:C,generation:s.redrawGeneration,value:jC(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||sr(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 R=f-(c&&s.axis_x_tick_fit?.5:0);for(let z=0;z<f;z++){const $=z+1,B=Math.cos(Math.PI*e/180)*WC(u,z,d),W=$-(c?1:.5)+h;if(W<=0)continue;const J=(n-B)/W,q=R-$,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}_`,R=u[m];if(R){const C=c[`${A}tick_values`],P=c[`${A}tick_count`];if(R.domain(l.getYDomain(e,m,h)),!C&&P){const z=l.axis[m],$=R.domain();z.tickValues(this.generateTickValues($,$.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=Qa(d.data(),!n[`${u}_reverse`]),m=h.length,A=n[`${u}_max`],C=!n[`${u}_lines`]||BC(this[s],h,$C(d));let P;if(m){for(let $=1;$<m;$++)if(m/$<A){P=$;break}P=P!=null?P:m;const z=new Map;for(let $=0;$<h.length;$++)z.set(h[$],$);d.each(function($){var B;const W=C?this:this.querySelector("text");W&&(W.style.display=((B=z.get($))!=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,ZC={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=Sa(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=qd(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=Sa(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 R,C;if(t.axis.isCategorized())R=t.getEventRectWidth(),C=P=>i(P.x)-R/2;else{const P=({index:z})=>({prev:t.getPrevX(z),next:t.getNextX(z)});R=z=>{const $=P(z),B=i.domain();let W;return $.prev===null&&$.next===null?W=o?r.height:r.width:$.prev===null?W=(i($.next)+i(z.x))/2:$.next===null?W=i(B[1])-(i($.prev)+i(z.x))/2:W=Math.max(0,(i($.next)-i($.prev))/2),W},C=z=>{const $=P(z);let B;return $.prev===null&&$.next===null?B=0:$.prev===null?B=i(i.domain()[0]):B=(i(z.x)+i($.prev))/2,B}}u=o?0:C,f=o?C:0,d=o?r.width:R,h=o?R:r.height}const{eventReceiver:m}=r,A=(R,C)=>le(R)?R(C):R;m.coords.splice(m.data.length),m.data.forEach((R,C)=>{m.coords[C]={x:A(u,R),y:A(f,R),w:A(d,R),h:A(h,R)}})},selectRectForSingle(t,e){var n,r;const i=this,{config:o,$el:{main:s,circle:l}}=i,c=o.data_selection_enabled,u=o.data_selection_grouped,f=o.data_selection_isselectable,d=o.tooltip_grouped,h=i.getAllValuesOnIndex(e);if(d&&(i.showTooltip(h,t),(n=i.showGridFocus)==null||n.call(i,h),!c||u))return;!l&&s.selectAll(`.${ze.EXPANDED}:not(.${bn.shape}-${e})`).classed(ze.EXPANDED,!1);const m=s.selectAll(`.${bn.shape}-${e}`).classed(ze.EXPANDED,!0).style("cursor",f?"pointer":null).filter(function(A){return i.isWithinShape(this,A)});m.empty()&&!d&&o.interaction_onout&&((r=i.hideGridFocus)==null||r.call(i),i.hideTooltip(),!u&&i.setExpand(e)),m.call(A=>{var R,C;const P=A.data();c&&(u||f!=null&&f.bind(i.api)(P))&&(t.style.cursor="pointer"),d||(i.showTooltip(P,t),(R=i.showGridFocus)==null||R.call(i,P),(C=i.unexpandCircles)==null||C.call(i),A.each(z=>i.setExpand(e,z.id)))})},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=hr(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(hr(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]=hr(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=hr(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))})}},JC={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 R=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)&&R.height>m&&(A+=R.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}},_C={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:[]},qC={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:[]},t2={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:[]},e2=Object.defineProperty,Ev=Object.getOwnPropertySymbols,n2=Object.prototype.hasOwnProperty,r2=Object.prototype.propertyIsEnumerable,Cv=(t,e,n)=>e in t?e2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cu=(t,e)=>{for(var n in e||(e={}))n2.call(e,n)&&Cv(t,n,e[n]);if(Ev)for(var n of Ev(e))r2.call(e,n)&&Cv(t,n,e[n]);return t},a2=cu(cu(cu({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},_C),qC),t2),i2={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1};const o2=[fC,dC,hC],Iv={axis:YC,clip:JC,eventrect:ZC,sizeAxis:QC},Rv={optDataAxis:i2,optAxis:a2};function wv(t){return Object.keys(t).map(e=>t[e])}function Ov(t=[],e=[]){yn(Er.prototype,wv(Iv).concat(t)),yn(Kn.prototype,o2),Fa.setOptions(wv(Rv).concat(e))}function uo(t=[],e=[]){Ov(t,e)}function ea(t,e=[]){const n=Array.isArray(t)?t:t?[t]:[];Ov([vi,Bs,cC].concat(n),[za,uC].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 s2={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",nr.chartBars).call(this.setCssRule(!1,`.${nr.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:nr.chartBars,itemClass:nr.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,` .${nr.bar}`,["fill"],e.color)(s),s.each(function(l){uu.call(e,l.id)&&Ut(this).append("path").attr("class",nr.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(`.${nr.bars}`).selectAll(`.${nr.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.updateBarColor.bind(n)).merge(u).style("opacity",c),n.setRatioForGroupedData(s.bar.data())},updateBarColor(t){const e=this,n=e.getStylePropValue(e.color);return vg.call(e,t,"bar_linearGradient",n||(()=>null))},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(Ut(this.parentNode.querySelector(`.${nr.barConnectLine}`)),e,Rr());r.updateConnectLine(h,d,o),o.splice(0)}return f[0]}).style("fill",r.updateBarColor.bind(r)).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;return(l,c)=>{const u=i(l,c),{indexX:f,indexY:d,isNegative:h,pos:m,radius:A,clipPath:R}=jl(n,l,u,o,s,n.isStackingRadiusData.bind(n)),C=["",""];if(l.clipPath=R,o){const $=`a${A} ${A} ${h?"1 0 0":"0 0 1"} `;C[d]=`${$}${A},${A}`,C[f]=`${$}${[-A,A][r.axis_rotated?"sort":"reverse"]()}`,h&&C.reverse()}const P=r.axis_rotated?`H${m} ${C[0]}V${u[2][d]-A} ${C[1]}H${u[3][f]}`:`V${m} ${C[0]}H${u[2][f]-A} ${C[1]}V${u[3][d]}`,z=[`M${u[0][f]},${u[0][d]}${P}z`];return uu.call(n,l.id)&&z.push(r.axis_rotated?{x:u[0][f],y:u[0][d],width:u[0][f]-m,height:u[2][d]-u[0][d]}:{x:u[0][f],y:m,width:u[2][f]-u[0][f],height:u[3][d]-m}),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&&(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`)}},l2={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([s2,vi],[l2,za]),($v=()=>jt.BAR)());var c2={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=Tr("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=Tr("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]}},u2=c2,f2={bubble_maxR:35,bubble_zerobased:!1};let Bv=()=>(uo([vi,Bs,u2],[f2,za]),(Bv=()=>jt.BUBBLE)());var d2=Object.defineProperty,zv=Object.getOwnPropertySymbols,h2=Object.prototype.hasOwnProperty,g2=Object.prototype.propertyIsEnumerable,Uv=(t,e,n)=>e in t?d2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,v2=(t,e)=>{for(var n in e||(e={}))h2.call(e,n)&&Uv(t,n,e[n]);if(zv)for(var n of zv(e))g2.call(e,n)&&Uv(t,n,e[n]);return t},p2={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,R=n.getCandlestickData(f);let C;if(R&&ge(R.open)&&ge(R.close)){const P={start:s(f),end:0};P.end=P.start+A;const z={start:l(R.open),end:l(R.close)},$={x:P.start+A/2,high:l(R.high),low:l(R.low)},B=h-m;z.start-=B,z.end-=B,$.high-=B,$.low-=B,C=[[P.start,z.start],[P.end,z.end],[$.x,$.low,$.high]]}else C=[[0,0],[0,0],[0,0,0]];return C}},getCandlestickData({value:t}){let e;if(tn(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=v2({},t));return e&&(e._isUp=e.close>=e.open),e||null}},m2=Object.defineProperty,x2=Object.defineProperties,y2=Object.getOwnPropertyDescriptors,kv=Object.getOwnPropertySymbols,T2=Object.prototype.hasOwnProperty,b2=Object.prototype.propertyIsEnumerable,Xv=(t,e,n)=>e in t?m2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,S2=(t,e)=>{for(var n in e||(e={}))T2.call(e,n)&&Xv(t,n,e[n]);if(kv)for(var n of kv(e))b2.call(e,n)&&Xv(t,n,e[n]);return t},A2=(t,e)=>x2(t,y2(e)),E2=A2(S2({},p2),{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 R=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]}${R}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(Ut(this),e,l);t(c,u,f)}).style("opacity",null)]}}),C2={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"};let Gv=()=>(uo([E2,vi],[C2,za]),(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},I2={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 R2(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function w2(t){return t}function O2(){var t=w2,e=R2,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),R=+r.apply(this,arguments),C=Math.min(Is,Math.max(-Is,i.apply(this,arguments)-R)),P,z=Math.min(Math.abs(C)/u,o.apply(this,arguments)),$=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,H){return e(A[W],A[H])}):n!=null&&m.sort(function(W,H){return n(l[W],l[H])}),c=0,d=h?(C-u*$)/h:0;c<u;++c,R=P)f=m[c],B=A[f],P=R+(B>0?B*d:0)+$,A[f]={data:l[f],index:c,value:B,startAngle:R,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 P2(t){return t.innerRadius}function M2(t){return t.outerRadius}function L2(t){return t.startAngle}function D2(t){return t.endAngle}function F2(t){return t&&t.padAngle}function N2(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,R=r+d,C=(h+A)/2,P=(m+R)/2,z=A-h,$=R-m,B=z*z+$*$,W=i-o,H=h*R-A*m,J=($<0?-1:1)*fi(aA(0,W*W*B-H*H)),q=(H*$-z*J)/B,at=(-H*z-$*J)/B,et=(H*$+z*J)/B,ot=(-H*z+$*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=P2,e=M2,n=Ze(0),r=null,i=L2,o=D2,s=F2,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,R=o.apply(this,arguments)-Cs,C=eg(R-A),P=R>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*Ba(A),m*Fr(A)),l.arc(0,0,m,A,R,!P),h>Xn&&(l.moveTo(h*Ba(R),h*Fr(R)),l.arc(0,0,h,R,A,P));else{var z=A,$=R,B=A,W=R,H=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));(H-=dt*2)>Xn?(dt*=P?1:-1,B+=dt,W-=dt):(H=0,B=W=(A+R)/2),(J-=ut*2)>Xn?(ut*=P?1:-1,z+=ut,$-=ut):(J=0,z=$=(A+R)/2)}var xt=m*Ba(z),bt=m*Fr(z),Rt=h*Ba(W),Et=h*Fr(W);if(et>Xn){var Zt=m*Ba($),fe=m*Fr($),me=h*Ba(B),xe=h*Fr(B),Te;if(C<io)if(Te=N2(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(iA((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,$,!P)):l.moveTo(xt,bt),!(h>Xn)||!(H>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[Ba(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 $2=15,Vv=20,jv=.35;function B2(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=B2.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 z2(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+$2,m={x:u*h,y:f*h},A=u>=0,R={x:m.x+e*(A?1:-1),y:m.y};return{startPoint:d,breakPoint:m,endPoint:R,isRight:A,midAngle:l}}function Yv(){return Hv.call(this).line.show}function U2(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=Ut(this),m=z2.call(e,c,s),{ratio:A,meetsThreshold:R,updated:C}=(u=c._cache)!=null?u:{};if(!C||!m)return;const P=e.isTargetToShow(c.data.id)&&R,{startPoint:z,breakPoint:$,endPoint:B,isRight:W}=m,H=`${z.x},${z.y} ${$.x},${$.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",H).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 k2=Object.defineProperty,X2=Object.defineProperties,G2=Object.getOwnPropertyDescriptors,Kv=Object.getOwnPropertySymbols,W2=Object.prototype.hasOwnProperty,V2=Object.prototype.propertyIsEnumerable,Zv=(t,e,n)=>e in t?k2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j2=(t,e)=>{for(var n in e||(e={}))W2.call(e,n)&&Zv(t,n,e[n]);if(Kv)for(var n of Kv(e))V2.call(e,n)&&Zv(t,n,e[n]);return t},H2=(t,e)=>X2(t,G2(e));const fu=["donut","gauge","pie","polar"];function Y2(t){return["donut","pie","polar","gauge"].find(e=>t.hasType(e))}function K2(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 Z2(t,e,n,r){const{config:i}=t,o=Y2(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 J2(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=Z2(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=Wa(n(this._current),n(e));return this._current=e,function(i){const o=r(i),{data:s,index:l,value:c}=e;return t(H2(j2({},o),{data:s,index:l,value:c}))}}}var Q2={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=O2().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,R=r.getTotalDataSum(o.rendered),C=d*((R-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 R=r.cache.get(A);(!R||R.generation!==o.redrawGeneration)&&(R={generation:o.redrawGeneration,layout:l(r.filterTargetsToShow())},r.cache.add(A,R)),m=R.layout}m.forEach((A,R)=>{var C;!u&&A.data.id===((C=c.data)==null?void 0:C.id)&&(u=!0,c=A,c.index=R)})}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,R=e&&!s?r.getTotalDataSum(o.rendered):A,C=d/(R-m),P=(n=c.value)!=null?n:0,z=P<m?0:P<R?P-m:R-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=K2(r,e,i,n);else if(!r.hasType("gauge")||r.data.targets.length>1){const l=J2(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=Ut(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(`.${rn.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"));Ut(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?rr.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),Ca(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=Wa(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=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),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,R=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,$=!1)=>{e.needle.style("display")!=="none"&&t.$T(e.needle).style("transform",`rotate(${t.getNeedleAngle(z)}deg)`).call(Wo,()=>{$&&(n.arc_needle_value=z),P()})}),s){const z=le(c)?c.call(t,o):`M-${u} ${m} A${A} ${R} 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=ln(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 Ut(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,R=(A==null?void 0:A.id)||void 0;e.callOverOutForTouch(A),xn(R)?c():l(this,A,R)},{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)?rr.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(`.${rr.chartArcsGaugeUnit}`).attr("dy",`${u?1.5:.75}em`).text(n.gauge_units),o.select(`.${rr.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(`.${rr.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)&&U2.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,[Q2,vi].concat(t||[])),Fa.setOptions([za].concat(e||[]))}let Qv=()=>(mi(void 0,[Vs,I2]),(Qv=()=>jt.DONUT)());var _2=Object.defineProperty,_v=Object.getOwnPropertySymbols,q2=Object.prototype.hasOwnProperty,tI=Object.prototype.propertyIsEnumerable,qv=(t,e,n)=>e in t?_2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eI=(t,e)=>{for(var n in e||(e={}))q2.call(e,n)&&qv(t,n,e[n]);if(_v)for(var n of _v(e))tI.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=eI({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 nI(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 rI(){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 aI(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 iI(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)*iI(c);o.push(i?[u,f]:[f,u])}return o}function oI(){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 R=f.length-1;R>0&&f.splice(R,0,[f[R-m][0],f[R-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 sI={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,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=aI.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,R=A+h,C=A+f,P=(R+C)/2,z=r?o+c/2:s+l/2;u[d.id]=r?[[R,z],[C,z],[P,z]]:[[z,R],[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=nI.call(t,tp.call(t,i.data())),{top:s,left:l}=xi.call(t),c=(e.funnel_spline?oI:rI).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)}},lI={funnel_neck_width:0,funnel_neck_height:0,funnel_rotated:!1,funnel_spline:!1};let np=()=>(mi([sI],[lI]),(np=()=>jt.FUNNEL)());var cI={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(rr.chartArcsGaugeUnit),e.gauge_label_show&&(r(rr.chartArcsGaugeMin),!e.gauge_fullCircle&&r(rr.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),R=m.endAngle-Math.PI/2,C=n.radius-A,P=R-(C===0?0:1/C);c=n.radiusExpanded-n.radius+A,f=Math.cos(P)*C,d=Math.sin(P)*C,h=`rotate(${R*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 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}},uI={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([cI],[Vs,uI]),(rp=()=>jt.GAUGE)()),ap=()=>(ea(),(ap=()=>jt.LINE)()),ip=()=>(ea(void 0,[eu]),(ip=()=>jt.SPLINE)()),op=()=>(ea(),(op=()=>jt.STEP)());var fI={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,fI]),(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 dI={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)))}}},hI={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([dI],[Vs,hI]),(cp=()=>jt.POLAR)());function gI(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 vI={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",Wd.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;sr(n.axis_x_categories)&&(n.axis_x_categories=Vo(0,Tr("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=Ea(t).map(d=>gI(u,d,c,e,ln(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(" ")}),R=u.selectAll(`.${Zr.level}`).data(f);R.exit().remove();const C=R.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(R).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(Ut(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=>_d(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]}},pI={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,vI],[za,pI,{axis_x_categories:Rv.optAxis.axis_x_categories}]),(fp=()=>jt.RADAR)());var mI={scatter_zerobased:!1};let dp=()=>(uo([vi,Bs],[za,mI]),(dp=()=>jt.SCATTER)());function xI(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,R=e.value,C,P,z,$,B,W,H;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)/(R*t),H=C*C*W,B=Math.max(z/H,H/P);d<h;++d){if(C+=u=l[d].value,u<P&&(P=u),u>z&&(z=u),H=C*C*W,$=Math.max(z/H,H/P),$>B){C-=u;break}B=$}s.push(c={value:C,dice:m<A,children:l.slice(f,d)}),c.dice?Hs(c,n,r,i,R?r+=A*C/R:o):Ys(c,n,r,R?n+=m*C/R:i,o),R-=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 yI(){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(xI),h}function d(h){var m=i[h.depth],A=h.x0+m,R=h.y0+m,C=h.x1-m,P=h.y1-m;C<A&&(A=C=(A+C)/2),P<R&&(R=P=(R+P)/2),h.x0=A,h.y0=R,h.x1=C,h.y1=P,h.children&&(m=i[h.depth+1]=o(h)/2,A+=u(h)-m,R+=s(h)-m,C-=l(h)-m,P-=c(h)-m,C<A&&(A=C=(A+C)/2),P<R&&(R=P=(R+P)/2),t(h,A,R,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,R,C,P){if(d>=h-1){var z=o[d];z.x0=A,z.y0=R,z.x1=C,z.y1=P;return}for(var $=u[d],B=m/2+$,W=d+1,H=h-1;W<H;){var J=W+H>>>1;u[J]<B?W=J+1:H=J}B-u[W-1]<u[W]-B&&d+1<W&&--W;var q=u[W]-$,at=m-q;if(C-A>P-R){var et=m?(A*at+C*q)/m:C;f(d,W,q,A,R,et,P),f(W,h,at,et,R,C,P)}else{var ot=m?(R*at+P*q)/m:P;f(d,W,q,A,R,C,ot),f(W,h,at,A,ot,C,P)}}}function TI(t,e,n,r,i){(t.depth&1?Ys:Hs)(t,e,n,r,i)}var bI=(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,R=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,R?o+=(l-o)*u.value/R:l):Ys(u,i,o,R?i+=(s-i)*u.value/R:s,l),R-=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 SI(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 AI(){return this.eachAfter(SI)}function EI(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function CI(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 II(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 RI(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function wI(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 OI(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function PI(t){for(var e=this,n=MI(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 MI(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 LI(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function DI(){return Array.from(this)}function FI(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function NI(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*$I(){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=UI)):e===void 0&&(e=zI);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(XI)}function BI(){return gu(this).eachBefore(kI)}function zI(t){return t.children}function UI(t){return Array.isArray(t)?t[1]:null}function kI(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function XI(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:AI,each:EI,eachAfter:II,eachBefore:CI,find:RI,sum:wI,sort:OI,path:PI,ancestors:LI,descendants:DI,leaves:FI,links:NI,copy:BI,[Symbol.iterator]:$I};function GI(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 WI={initTreemapLayout(){this.treemap=yI().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:TI,squarify:vp,resquarify:bI}[(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:GI.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)}},VI=Object.defineProperty,jI=Object.defineProperties,HI=Object.getOwnPropertyDescriptors,xp=Object.getOwnPropertySymbols,YI=Object.prototype.hasOwnProperty,KI=Object.prototype.propertyIsEnumerable,yp=(t,e,n)=>e in t?VI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZI=(t,e)=>{for(var n in e||(e={}))YI.call(e,n)&&yp(t,n,e[n]);if(xp)for(var n of xp(e))KI.call(e,n)&&yp(t,n,e[n]);return t},JI=(t,e)=>jI(t,HI(e));function QI(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 _I=JI(ZI({},WI),{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(jd.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=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(QI.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(R=>R.data.id===s).datum();let m=0,A=0;if(h){const{x0:R,x1:C,y0:P,y1:z}=h;m=i(C)-i(R),A=o(z)-o(P)}return function(R){return R.style("opacity",d),le(c)?c.bind(e.api)(l,u,s,{width:m,height:A}):`${s}
|
|
67
|
-
${f}%`}}}),qI={treemap_tile:"binary",treemap_label_format:void 0,treemap_label_threshold:.05,treemap_label_show:!0};let
|
|
66
|
+
`):[];if(c.length)return c;if(tn(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,R;for(let C=1;C<h.length;C++)if(h.charAt(C)===" "&&(A=C),m=h.substr(0,C+1),R=o*m.length,u<R)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 wC=Object.defineProperty,OC=Object.defineProperties,PC=Object.getOwnPropertyDescriptors,yv=Object.getOwnPropertySymbols,MC=Object.prototype.hasOwnProperty,LC=Object.prototype.propertyIsEnumerable,ru=(t,e,n)=>e in t?wC(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,DC=(t,e)=>{for(var n in e||(e={}))MC.call(e,n)&&ru(t,n,e[n]);if(yv)for(var n of yv(e))LC.call(e,n)&&ru(t,n,e[n]);return t},FC=(t,e)=>OC(t,PC(e)),ta=(t,e,n)=>ru(t,typeof e!="symbol"?e+"":e,n);function NC(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 $C(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 BC(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 zC(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 UC(t){return le(t)?bv(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 kC(t,e,n){ou(t),t.length=e,Ws(t,n)}function XC(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 GC(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 WC(t,e,n){const r=t[e];if(ge(r))return r;const i=Number(r);return Number.isFinite(i)?i:n}const Tv=new WeakMap;let VC=0;function bv(t){if(!t||!/^(function|object)$/.test(typeof t))return`${typeof t}:${String(t)}`;let e=Tv.get(t);return e||(e=++VC,Tv.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"?bv(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 jC(t){return{width:t.width,height:t.height,ticks:t.ticks&&XC(t.ticks),clipPath:t.clipPath,domain:lu(t.domain)}}function HC(t,e){return t.width=e.width,t.height=e.height,t.clipPath=e.clipPath,t.domain=lu(e.domain),t.ticks&&e.ticks&&GC(t.ticks,e.ticks),t}var YC={getAxisInstance:function(){return this.axis||new KC(this)}};class KC{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?xv:mv:e==="y"?l=s?mv:xv:e==="y2"&&(l=s?TC:bC),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,R)=>A===d[R])||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 R=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||(R.tickStepSize=l[`axis_${u}_tick_stepSize`]);const C=new RC(R).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:UC(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}`,R={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),H=tn(d.domain)&&d.domain[0]===d.domain[1]&&d.domain.every(bt=>bt>0);if(W||H)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,FC(DC({},m),{generation:s.redrawGeneration})),HC(d,m.value);const ot=J.tickValues(),lt=!P&&Array.isArray(ot)&&ot.length>Gs;lt&&J.tickValues(zC(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;R.width=Math.max(R.width,Et),R.height=Math.max(R.height,Zt),P||(d.ticks[Rt]=Et)});else{const bt=[];if(ut.each(function(){bt.push(this)}),(bt.length<=5?bt:NC(bt)).map(Et=>un(Et,!0)).forEach(Et=>{R.width=Math.max(R.width,Et.width),R.height=Math.max(R.height,Et.height)}),!P)for(let Et=0;Et<bt.length;Et++)d.ticks[Et]=R.width}!P&<&&kC(d.ticks,xt,R.width),ft.remove()}return Object.keys(R).forEach(P=>{R[P]>0&&(d[P]=R[P])}),i.cache.add(h,{fingerprint:C,generation:s.redrawGeneration,value:jC(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 R=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)*WC(u,z,d),W=N-(c?1:.5)+h;if(W<=0)continue;const J=(n-B)/W,q=R-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}_`,R=u[m];if(R){const C=c[`${A}tick_values`],P=c[`${A}tick_count`];if(R.domain(l.getYDomain(e,m,h)),!C&&P){const z=l.axis[m],N=R.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`]||BC(this[s],h,$C(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 Sv=Math.pow,ZC={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 R,C;if(t.axis.isCategorized())R=t.getEventRectWidth(),C=P=>i(P.x)-R/2;else{const P=({index:z})=>({prev:t.getPrevX(z),next:t.getNextX(z)});R=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:R,h=o?R:r.height}const{eventReceiver:m}=r,A=(R,C)=>le(R)?R(C):R;m.coords.splice(m.data.length),m.data.forEach((R,C)=>{m.coords[C]={x:A(u,R),y:A(f,R),w:A(d,R),h:A(h,R)}})},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,R=s.getAllValuesOnIndex(e);if(A&&(s.showTooltip(R,t),(n=s.showGridFocus)==null||n.call(s,R),!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=R.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 H=z[W],J=s.dist(H,P);J<B&&(B=J,N=H)}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||Sv(h-A[0],2)+Sv(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))})}},JC={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 R=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)&&R.height>m&&(A+=R.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}},_C={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:[]},qC={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:[]},t2={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:[]},e2=Object.defineProperty,Av=Object.getOwnPropertySymbols,n2=Object.prototype.hasOwnProperty,r2=Object.prototype.propertyIsEnumerable,Ev=(t,e,n)=>e in t?e2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,cu=(t,e)=>{for(var n in e||(e={}))n2.call(e,n)&&Ev(t,n,e[n]);if(Av)for(var n of Av(e))r2.call(e,n)&&Ev(t,n,e[n]);return t},a2=cu(cu(cu({axis_evalTextSize:!0,axis_rotated:!1,axis_tooltip:!1},_C),qC),t2),i2={data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_axes:{},data_regions:{},data_stack_normalize:!1};const o2=[fC,dC,hC],Cv={axis:YC,clip:JC,eventrect:ZC,sizeAxis:QC},Iv={optDataAxis:i2,optAxis:a2};function Rv(t){return Object.keys(t).map(e=>t[e])}function wv(t=[],e=[]){yn(Er.prototype,Rv(Cv).concat(t)),yn(Kn.prototype,o2),Da.setOptions(Rv(Iv).concat(e))}function uo(t=[],e=[]){wv(t,e)}function ea(t,e=[]){const n=Array.isArray(t)?t:t?[t]:[];wv([vi,Bs,cC].concat(n),[Ba,uC].concat(e))}let Ov=()=>(ea(hi,[gi]),(Ov=()=>jt.AREA)()),Pv=()=>(ea(hi,[gi]),(Pv=()=>jt.AREA_LINE_RANGE)()),Mv=()=>(ea(hi,[gi]),(Mv=()=>jt.AREA_STEP_RANGE)()),Lv=()=>(ea(hi,[gi,eu]),(Lv=()=>jt.AREA_SPLINE)()),Dv=()=>(ea(hi,[gi,eu]),(Dv=()=>jt.AREA_SPLINE_RANGE)()),Fv=()=>(ea(hi,[gi]),(Fv=()=>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 s2={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)&&Ut(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.updateBarColor.bind(n)).merge(u).style("opacity",c),n.setRatioForGroupedData(s.bar.data())},updateBarColor(t){const e=this,n=e.getStylePropValue(e.color);return gg.call(e,t,"bar_linearGradient",n||(()=>null))},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(Ut(this.parentNode.querySelector(`.${rr.barConnectLine}`)),e,Rr());r.updateConnectLine(h,d,o),o.splice(0)}return f[0]}).style("fill",r.updateBarColor.bind(r)).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;return(l,c)=>{const u=i(l,c),{indexX:f,indexY:d,isNegative:h,pos:m,radius:A,clipPath:R}=jl(n,l,u,o,s,n.isStackingRadiusData.bind(n)),C=["",""];if(l.clipPath=R,o){const N=`a${A} ${A} ${h?"1 0 0":"0 0 1"} `;C[d]=`${N}${A},${A}`,C[f]=`${N}${[-A,A][r.axis_rotated?"sort":"reverse"]()}`,h&&C.reverse()}const P=r.axis_rotated?`H${m} ${C[0]}V${u[2][d]-A} ${C[1]}H${u[3][f]}`:`V${m} ${C[0]}H${u[2][f]-A} ${C[1]}V${u[3][d]}`,z=[`M${u[0][f]},${u[0][d]}${P}z`];return uu.call(n,l.id)&&z.push(r.axis_rotated?{x:u[0][f],y:u[0][d],width:u[0][f]-m,height:u[2][d]-u[0][d]}:{x:u[0][f],y:m,width:u[2][f]-u[0][f],height:u[3][d]-m}),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&&(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`)}},l2={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 Nv=()=>(uo([s2,vi],[l2,Ba]),(Nv=()=>jt.BAR)());var c2={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]}},u2=c2,f2={bubble_maxR:35,bubble_zerobased:!1};let $v=()=>(uo([vi,Bs,u2],[f2,Ba]),($v=()=>jt.BUBBLE)());var d2=Object.defineProperty,Bv=Object.getOwnPropertySymbols,h2=Object.prototype.hasOwnProperty,g2=Object.prototype.propertyIsEnumerable,zv=(t,e,n)=>e in t?d2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,v2=(t,e)=>{for(var n in e||(e={}))h2.call(e,n)&&zv(t,n,e[n]);if(Bv)for(var n of Bv(e))g2.call(e,n)&&zv(t,n,e[n]);return t},p2={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,R=n.getCandlestickData(f);let C;if(R&&ge(R.open)&&ge(R.close)){const P={start:s(f),end:0};P.end=P.start+A;const z={start:l(R.open),end:l(R.close)},N={x:P.start+A/2,high:l(R.high),low:l(R.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(tn(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=v2({},t));return e&&(e._isUp=e.close>=e.open),e||null}},m2=Object.defineProperty,x2=Object.defineProperties,y2=Object.getOwnPropertyDescriptors,Uv=Object.getOwnPropertySymbols,T2=Object.prototype.hasOwnProperty,b2=Object.prototype.propertyIsEnumerable,kv=(t,e,n)=>e in t?m2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,S2=(t,e)=>{for(var n in e||(e={}))T2.call(e,n)&&kv(t,n,e[n]);if(Uv)for(var n of Uv(e))b2.call(e,n)&&kv(t,n,e[n]);return t},A2=(t,e)=>x2(t,y2(e)),E2=A2(S2({},p2),{initCandlestick(){vg.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 R=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]}${R}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(Ut(this),e,l);t(c,u,f)}).style("opacity",null)]}}),C2={candlestick_width:void 0,candlestick_width_ratio:.6,candlestick_width_max:void 0,candlestick_color_down:"red"};let Xv=()=>(uo([E2,vi],[C2,Ba]),(Xv=()=>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},I2={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 R2(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function w2(t){return t}function O2(){var t=w2,e=R2,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),R=+r.apply(this,arguments),C=Math.min(Is,Math.max(-Is,i.apply(this,arguments)-R)),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,H){return e(A[W],A[H])}):n!=null&&m.sort(function(W,H){return n(l[W],l[H])}),c=0,d=h?(C-u*N)/h:0;c<u;++c,R=P)f=m[c],B=A[f],P=R+(B>0?B*d:0)+N,A[f]={data:l[f],index:c,value:B,startAngle:R,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 P2(t){return t.innerRadius}function M2(t){return t.outerRadius}function L2(t){return t.startAngle}function D2(t){return t.endAngle}function F2(t){return t&&t.padAngle}function N2(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,R=r+d,C=(h+A)/2,P=(m+R)/2,z=A-h,N=R-m,B=z*z+N*N,W=i-o,H=h*R-A*m,J=(N<0?-1:1)*fi(aA(0,W*W*B-H*H)),q=(H*N-z*J)/B,at=(-H*z-N*J)/B,et=(H*N+z*J)/B,ot=(-H*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 Gv(){var t=P2,e=M2,n=Ze(0),r=null,i=L2,o=D2,s=F2,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,R=o.apply(this,arguments)-Cs,C=tg(R-A),P=R>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,R,!P),h>Xn&&(l.moveTo(h*$a(R),h*Fr(R)),l.arc(0,0,h,R,A,P));else{var z=A,N=R,B=A,W=R,H=C,J=C,q=s.apply(this,arguments)/2,at=q>Xn&&(r?+r.apply(this,arguments):fi(h*h+m*m)),et=kc(tg(m-h)/2,+n.apply(this,arguments)),ot=et,lt=et,ft,_;if(at>Xn){var dt=eg(at/h*Fr(q)),ut=eg(at/m*Fr(q));(H-=dt*2)>Xn?(dt*=P?1:-1,B+=dt,W-=dt):(H=0,B=W=(A+R)/2),(J-=ut*2)>Xn?(ut*=P?1:-1,z+=ut,N-=ut):(J=0,z=N=(A+R)/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=N2(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(iA((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)||!(H>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 $2=15,Wv=20,Vv=.35;function B2(t=!1){const e=this;return["donut","pie","polar","gauge"].find(n=>e.hasType(n)&&!(n==="gauge"&&t&&e.hasMultiArcGauge()))}function jv(){const t=this,{config:e}=t,n=B2.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)||Wv};if(r===!0)return{chartType:n,line:s,text:{formatter:o}};if(!i)return{chartType:n,line:{show:!1,distance:Wv},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 z2(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+$2,m={x:u*h,y:f*h},A=u>=0,R={x:m.x+e*(A?1:-1),y:m.y};return{startPoint:d,breakPoint:m,endPoint:R,isRight:A,midAngle:l}}function Hv(){return jv.call(this).line.show}function U2(t){const e=this,{$el:{arcs:n},$T:r}=e,{line:i,text:o}=jv.call(e),s=i.distance;let l=null;n.selectAll(`.${Ye.chartArc}`).each(function(c){var u,f,d;const h=Ut(this),m=z2.call(e,c,s),{ratio:A,meetsThreshold:R,updated:C}=(u=c._cache)!=null?u:{};if(!C||!m)return;const P=e.isTargetToShow(c.data.id)&&R,{startPoint:z,breakPoint:N,endPoint:B,isRight:W}=m,H=`${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",H).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+Vv)*l}else ot.y+=Vv*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 k2=Object.defineProperty,X2=Object.defineProperties,G2=Object.getOwnPropertyDescriptors,Yv=Object.getOwnPropertySymbols,W2=Object.prototype.hasOwnProperty,V2=Object.prototype.propertyIsEnumerable,Kv=(t,e,n)=>e in t?k2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,j2=(t,e)=>{for(var n in e||(e={}))W2.call(e,n)&&Kv(t,n,e[n]);if(Yv)for(var n of Yv(e))V2.call(e,n)&&Kv(t,n,e[n]);return t},H2=(t,e)=>X2(t,G2(e));const fu=["donut","gauge","pie","polar"];function Y2(t){return["donut","pie","polar","gauge"].find(e=>t.hasType(e))}function K2(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 Z2(t,e,n,r){const{config:i}=t,o=Y2(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 J2(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=Z2(t,e,r,s);return{pos:{x:i,y:o},ratio:l}}function Zv(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(H2(j2({},o),{data:s,index:l,value:c}))}}}var Q2={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=O2().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=Hv.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,R=r.getTotalDataSum(o.rendered),C=d*((R-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 R=r.cache.get(A);(!R||R.generation!==o.redrawGeneration)&&(R={generation:o.redrawGeneration,layout:l(r.filterTargetsToShow())},r.cache.add(A,R)),m=R.layout}m.forEach((A,R)=>{var C;!u&&A.data.id===((C=c.data)==null?void 0:C.id)&&(u=!0,c=A,c.index=R)})}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,R=e&&!s?r.getTotalDataSum(o.rendered):A,C=d/(R-m),P=(n=c.value)!=null?n:0,z=P<m?0:P<R?P-m:R-m;c.startAngle=f,c.endAngle=f+C*z}return u||e?c:null},getSvgArc(){const t=this,{inner:e,outer:n,corner:r}=Zv.call(t),i=Gv().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}=Zv.call(e,t),o=Gv().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=K2(r,e,i,n);else if(!r.hasType("gauge")||r.data.targets.length>1){const l=J2(r,e,i);o=l.pos,s=l.ratio}else return"";return Zh.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=Ut(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(`.${rn.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"));Ut(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=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),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,R=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} ${R} 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=ln(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 Ut(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,R=(A==null?void 0:A.id)||void 0;e.callOverOutForTouch(A),xn(R)?c():l(this,A,R)},{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),Kh.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)))}Hv.call(e)&&U2.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,[Q2,vi].concat(t||[])),Da.setOptions([Ba].concat(e||[]))}let Jv=()=>(mi(void 0,[Vs,I2]),(Jv=()=>jt.DONUT)());var _2=Object.defineProperty,Qv=Object.getOwnPropertySymbols,q2=Object.prototype.hasOwnProperty,tI=Object.prototype.propertyIsEnumerable,_v=(t,e,n)=>e in t?_2(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eI=(t,e)=>{for(var n in e||(e={}))q2.call(e,n)&&_v(t,n,e[n]);if(Qv)for(var n of Qv(e))tI.call(e,n)&&_v(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=eI({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 nI(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 rI(){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 aI(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)),qv.call(e,r)}function qv(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 iI(t){return t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2}function tp(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)*iI(c);o.push(i?[u,f]:[f,u])}return o}function oI(){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=tp(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(...tp(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 R=f.length-1;R>0&&f.splice(R,0,[f[R-m][0],f[R-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 sI={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,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=aI.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,R=A+h,C=A+f,P=(R+C)/2,z=r?o+c/2:s+l/2;u[d.id]=r?[[R,z],[C,z],[P,z]]:[[z,R],[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=nI.call(t,qv.call(t,i.data())),{top:s,left:l}=xi.call(t),c=(e.funnel_spline?oI:rI).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)}},lI={funnel_neck_width:0,funnel_neck_height:0,funnel_rotated:!1,funnel_spline:!1};let ep=()=>(mi([sI],[lI]),(ep=()=>jt.FUNNEL)());var cI={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),R=m.endAngle-Math.PI/2,C=n.radius-A,P=R-(C===0?0:1/C);c=n.radiusExpanded-n.radius+A,f=Math.cos(P)*C,d=Math.sin(P)*C,h=`rotate(${R*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 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}},uI={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 np=()=>(mi([cI],[Vs,uI]),(np=()=>jt.GAUGE)()),rp=()=>(ea(),(rp=()=>jt.LINE)()),ap=()=>(ea(void 0,[eu]),(ap=()=>jt.SPLINE)()),ip=()=>(ea(),(ip=()=>jt.STEP)());var fI={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 op=()=>(mi(void 0,[Vs,fI]),(op=()=>jt.PIE)());function sp(t){const e=t.config.polar_level_max;let n=t.getMinMaxData().max[0].value;return e&&e>n&&(n=e),n}var dI={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=sp(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=sp(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)))}}},hI={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 lp=()=>(mi([dI],[Vs,hI]),(lp=()=>jt.POLAR)());function gI(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,cp=Ue.radarTextWidth;var vI={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=>gI(u,d,c,e,ln(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(" ")}),R=u.selectAll(`.${Zr.level}`).data(f);R.exit().remove();const C=R.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(R).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(cp)||0;if(s.select("text").style("text-anchor","middle").attr("dy",".5em").call(d=>{d.each(function(h){ii(Ut(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(cp,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]}},pI={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=()=>(mi([Cv.eventrect,Bs,vI],[Ba,pI,{axis_x_categories:Iv.optAxis.axis_x_categories}]),(up=()=>jt.RADAR)());var mI={scatter_zerobased:!1};let fp=()=>(uo([vi,Bs],[Ba,mI]),(fp=()=>jt.SCATTER)());function xI(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 dp=(1+Math.sqrt(5))/2;function hp(t,e,n,r,i,o){for(var s=[],l=e.children,c,u,f=0,d=0,h=l.length,m,A,R=e.value,C,P,z,N,B,W,H;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)/(R*t),H=C*C*W,B=Math.max(z/H,H/P);d<h;++d){if(C+=u=l[d].value,u<P&&(P=u),u>z&&(z=u),H=C*C*W,N=Math.max(z/H,H/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,R?r+=A*C/R:o):Ys(c,n,r,R?n+=m*C/R:i,o),R-=C,f=d}return s}var gp=(function t(e){function n(r,i,o,s,l){hp(e,r,i,o,s,l)}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(dp);function QR(t){return t==null?null:vp(t)}function vp(t){if(typeof t!="function")throw new Error;return t}function fo(){return 0}function ho(t){return function(){return t}}function yI(){var t=gp,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(xI),h}function d(h){var m=i[h.depth],A=h.x0+m,R=h.y0+m,C=h.x1-m,P=h.y1-m;C<A&&(A=C=(A+C)/2),P<R&&(R=P=(R+P)/2),h.x0=A,h.y0=R,h.x1=C,h.y1=P,h.children&&(m=i[h.depth+1]=o(h)/2,A+=u(h)-m,R+=s(h)-m,C-=l(h)-m,P-=c(h)-m,C<A&&(A=C=(A+C)/2),P<R&&(R=P=(R+P)/2),t(h,A,R,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=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: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 pp(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,R,C,P){if(d>=h-1){var z=o[d];z.x0=A,z.y0=R,z.x1=C,z.y1=P;return}for(var N=u[d],B=m/2+N,W=d+1,H=h-1;W<H;){var J=W+H>>>1;u[J]<B?W=J+1:H=J}B-u[W-1]<u[W]-B&&d+1<W&&--W;var q=u[W]-N,at=m-q;if(C-A>P-R){var et=m?(A*at+C*q)/m:C;f(d,W,q,A,R,et,P),f(W,h,at,et,R,C,P)}else{var ot=m?(R*at+P*q)/m:P;f(d,W,q,A,R,C,ot),f(W,h,at,A,ot,C,P)}}}function TI(t,e,n,r,i){(t.depth&1?Ys:Hs)(t,e,n,r,i)}var bI=(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,R=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,R?o+=(l-o)*u.value/R:l):Ys(u,i,o,R?i+=(s-i)*u.value/R:s,l),R-=u.value}else r._squarify=c=hp(e,r,i,o,s,l),c.ratio=e}return n.ratio=function(r){return t((r=+r)>1?r:1)},n})(dp);function SI(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 AI(){return this.eachAfter(SI)}function EI(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function CI(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 II(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 RI(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function wI(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 OI(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function PI(t){for(var e=this,n=MI(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 MI(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 LI(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function DI(){return Array.from(this)}function FI(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function NI(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*$I(){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=UI)):e===void 0&&(e=zI);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(XI)}function BI(){return gu(this).eachBefore(kI)}function zI(t){return t.children}function UI(t){return Array.isArray(t)?t[1]:null}function kI(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function XI(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:AI,each:EI,eachAfter:II,eachBefore:CI,find:RI,sum:wI,sort:OI,path:PI,ancestors:LI,descendants:DI,leaves:FI,links:NI,copy:BI,[Symbol.iterator]:$I};function GI(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 WI={initTreemapLayout(){this.treemap=yI().tile(this.getTreemapTile())},getTreemapTile(){var t,e;const n=this,{config:r,state:{current:{width:i,height:o}}}=n,s=(e={binary:pp,dice:Hs,slice:Ys,sliceDice:TI,squarify:gp,resquarify:bI}[(t=r.treemap_tile)!=null?t:"binary"])!=null?e:pp;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:GI.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)}},VI=Object.defineProperty,jI=Object.defineProperties,HI=Object.getOwnPropertyDescriptors,mp=Object.getOwnPropertySymbols,YI=Object.prototype.hasOwnProperty,KI=Object.prototype.propertyIsEnumerable,xp=(t,e,n)=>e in t?VI(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ZI=(t,e)=>{for(var n in e||(e={}))YI.call(e,n)&&xp(t,n,e[n]);if(mp)for(var n of mp(e))KI.call(e,n)&&xp(t,n,e[n]);return t},JI=(t,e)=>jI(t,HI(e));function QI(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 _I=JI(ZI({},WI),{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=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=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(QI.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(R=>R.data.id===s).datum();let m=0,A=0;if(h){const{x0:R,x1:C,y0:P,y1:z}=h;m=i(C)-i(R),A=o(z)-o(P)}return function(R){return R.style("opacity",d),le(c)?c.bind(e.api)(l,u,s,{width:m,height:A}):`${s}
|
|
67
|
+
${f}%`}}}),qI={treemap_tile:"binary",treemap_label_format:void 0,treemap_label_threshold:.05,treemap_label_show:!0};let yp=()=>(uo([_I],[qI]),(yp=()=>jt.TREEMAP)()),vu=Object.create(null);const Tp={version:"4.0.2",generate(t){const e=Gr(Object.create(null),vu,t),n=new Kn(e);return n.internal.charts=this.instance,this.instance.push(n),n},defaults(t){return je(t)&&(vu=t),vu},instance:[],plugin:{}};Object.keys(v).forEach(t=>v[t]()),Object.keys(g).forEach(t=>g[t]()),$g(),Bg(),Kg(),fv(),Ng(),Mg()})],vo={};function qn(T){var O=vo[T];if(O!==void 0)return O.exports;var a=vo[T]={exports:{}};return pu[T].call(a.exports,a,a.exports,qn),a.exports}(function(){qn.d=function(T,O){if(Array.isArray(O))for(var a=0;a<O.length;){var g=O[a++],v=O[a++];qn.o(T,g)?v===0&&a++:v===0?Object.defineProperty(T,g,{enumerable:!0,value:O[a++]}):Object.defineProperty(T,g,{enumerable:!0,get:v})}else for(var g in O)qn.o(O,g)&&!qn.o(T,g)&&Object.defineProperty(T,g,{enumerable:!0,get:O[g]})}})(),(function(){qn.o=function(T,O){return Object.prototype.hasOwnProperty.call(T,O)}})(),(function(){qn.r=function(T){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(T,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(T,"__esModule",{value:!0})}})(),qn(0);var po=qn(627);return po})()});
|