@ngrok/mantle 0.94.1 → 0.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/CaretDown-MgTrjdYK.js +1 -0
- package/dist/CaretLeft-CZIqCyEF.js +1 -0
- package/dist/CaretRight-BKz4JHCI.js +1 -0
- package/dist/Check-C5a1hX4x.js +1 -0
- package/dist/CheckCircle-Bi4tSau6.js +1 -0
- package/dist/CircleNotch-BKE0NAIr.js +1 -0
- package/dist/Copy-BYWMO6PW.js +1 -0
- package/dist/Desktop-BaSlSeg2.js +1 -0
- package/dist/Eye-C38LQkZ_.js +1 -0
- package/dist/EyeClosed-BvOq-W8o.js +1 -0
- package/dist/FileText-CqAezJDn.js +1 -0
- package/dist/Info-weHV1B4q.js +1 -0
- package/dist/MagnifyingGlass-DCAoDH5_.js +1 -0
- package/dist/Megaphone-Cir2KHXa.js +1 -0
- package/dist/Minus-KBzmC4_K.js +1 -0
- package/dist/Moon-hn_oivM6.js +1 -0
- package/dist/Plus-D90-H9Ei.js +1 -0
- package/dist/Question-BhvEyO0K.js +1 -0
- package/dist/SidebarSimple-BXKgNz4l.js +1 -0
- package/dist/SortAscending-CEk4rgu_.js +1 -0
- package/dist/SortDescending-C0cE7hpU.js +1 -0
- package/dist/Sun-C3SaXdLl.js +1 -0
- package/dist/Terminal-aKZ6Y9Lk.js +1 -0
- package/dist/Warning-DTwF27_O.js +1 -0
- package/dist/WarningDiamond-BwpdVJ34.js +1 -0
- package/dist/X-BPGjP4b6.js +1 -0
- package/dist/accordion-BmDXs1-q.js +1 -0
- package/dist/accordion-NpJz3Uer.js +1 -0
- package/dist/accordion-parts.d.ts +268 -0
- package/dist/accordion-parts.js +1 -0
- package/dist/accordion.d.ts +4 -395
- package/dist/accordion.js +1 -1
- package/dist/agent.json +409 -42
- package/dist/alert-DCGSrVTa.js +1 -0
- package/dist/{alert-D0zRRUHV.d.ts → alert-Dz541Ve9.d.ts} +7 -193
- package/dist/alert-center-Bb39SBqJ.js +1 -0
- package/dist/alert-center-CGBbqO-y.d.ts +391 -0
- package/dist/alert-center-parts.d.ts +6 -0
- package/dist/alert-center-parts.js +1 -0
- package/dist/alert-center.d.ts +6 -587
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog-CtKnvX5N.js +1 -0
- package/dist/alert-dialog-parts.d.ts +569 -0
- package/dist/alert-dialog-parts.js +1 -0
- package/dist/alert-dialog.d.ts +2 -1065
- package/dist/alert-dialog.js +1 -1
- package/dist/alert-parts.d.ts +6 -0
- package/dist/alert-parts.js +1 -0
- package/dist/alert.d.ts +43 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-DW5_Gb-1.js +1 -0
- package/dist/anchor.d.ts +1 -1
- package/dist/anchor.js +1 -1
- package/dist/app-layout-D7kwv9su.js +1 -0
- package/dist/app-layout-k6UjK30v.d.ts +1167 -0
- package/dist/app-layout-parts.d.ts +6 -0
- package/dist/app-layout-parts.js +1 -0
- package/dist/app-layout.d.ts +98 -1883
- package/dist/app-layout.js +1 -1
- package/dist/area-chart-C6lKu7Un.d.ts +390 -0
- package/dist/area-chart-SAaGaZFD.js +1 -0
- package/dist/area-chart-parts.d.ts +6 -0
- package/dist/area-chart-parts.js +1 -0
- package/dist/area-chart.d.ts +4 -579
- package/dist/area-chart.js +1 -1
- package/dist/avatar-BMZ81f_5.js +1 -0
- package/dist/avatar-Ti8GKSnS.d.ts +201 -0
- package/dist/avatar-parts.d.ts +6 -0
- package/dist/avatar-parts.js +1 -0
- package/dist/avatar.d.ts +3 -275
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +3 -2
- package/dist/badge.js +1 -1
- package/dist/bar-chart-C0Ra1ZpG.js +1 -0
- package/dist/bar-chart-Cb5fA8V7.d.ts +386 -0
- package/dist/bar-chart-parts.d.ts +6 -0
- package/dist/bar-chart-parts.js +1 -0
- package/dist/bar-chart.d.ts +4 -583
- package/dist/bar-chart.js +1 -1
- package/dist/behaviors-BW8RjkkS.js +1 -0
- package/dist/behaviors-BbOq5SFv.js +1 -0
- package/dist/behaviors-C7R7ZIoN.js +1 -0
- package/dist/behaviors-CHF5PT3C.js +1 -0
- package/dist/behaviors-CSZQSSfL.js +1 -0
- package/dist/behaviors-CcjvGa0d.js +1 -0
- package/dist/behaviors-CnarRd47.js +1 -0
- package/dist/behaviors-CoNi6Rd-.js +1 -0
- package/dist/behaviors-D9VIyDk1.js +1 -0
- package/dist/behaviors-DHVC34f9.js +1 -0
- package/dist/behaviors-DkCIgQ8w.js +1 -0
- package/dist/behaviors-Mkc_HjTB.js +1 -0
- package/dist/breadcrumb-CAzq3SlR.js +1 -0
- package/dist/breadcrumb-parts.d.ts +287 -0
- package/dist/breadcrumb-parts.js +1 -0
- package/dist/breadcrumb.d.ts +53 -543
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CokCtIvB.js +1 -0
- package/dist/browser-only.js +1 -1
- package/dist/button-Bqm7U0OC.js +1 -0
- package/dist/{button-5Pc7Mby_.d.ts → button-C6-6TecO.d.ts} +4 -4
- package/dist/{button-DnYv7IOT.d.ts → button-CL17Dxza.d.ts} +7 -5
- package/dist/button-CRCiBPEF.js +1 -0
- package/dist/{button-Ddj6yr10.d.ts → button-CRMoQyum.d.ts} +2 -3
- package/dist/button-Cr2iY2cI.js +1 -0
- package/dist/button-DhoE-BbZ.js +1 -0
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar-DQtapcSC.js +1 -0
- package/dist/calendar.d.ts +1 -1
- package/dist/calendar.js +1 -1
- package/dist/card-DbtGVKyo.d.ts +129 -0
- package/dist/card-parts.d.ts +6 -0
- package/dist/card-parts.js +1 -0
- package/dist/card.d.ts +3 -228
- package/dist/card.js +1 -1
- package/dist/centered-layout-parts.d.ts +169 -0
- package/dist/centered-layout-parts.js +1 -0
- package/dist/centered-layout.d.ts +2 -299
- package/dist/centered-layout.js +1 -1
- package/dist/chart-B0n2xyYi.js +1 -0
- package/dist/chart-BPsMxs1f.js +1 -0
- package/dist/chart-BmZoTjRu.js +1 -0
- package/dist/chart-Bybyh2Dc.js +1 -0
- package/dist/chart-CACfdGlp.d.ts +86 -0
- package/dist/chart-CBQJUTIX.js +1 -0
- package/dist/chart-Cb0MBaZx.js +1 -0
- package/dist/chart-CmMcfDmv.js +1 -0
- package/dist/chart-Dlp9FidW.js +2 -0
- package/dist/{chart-Dl8gFo_D.d.ts → chart-XvStK-oM.d.ts} +3 -79
- package/dist/chart-wTwYzUMJ.js +1 -0
- package/dist/checkbox-DH7WFfuR.js +1 -0
- package/dist/checkbox-DsVXD96X.js +1 -0
- package/dist/checkbox-TX74-Iep.js +1 -0
- package/dist/checkbox-group-parts.d.ts +197 -0
- package/dist/checkbox-group-parts.js +1 -0
- package/dist/checkbox.d.ts +59 -8
- package/dist/checkbox.js +1 -1
- package/dist/{choice-CNiOSzqV.d.ts → choice-BekuLm-b.d.ts} +16 -204
- package/dist/choice-DGI8VNR9.d.ts +1 -0
- package/dist/choice-PDT386cc.js +1 -0
- package/dist/choice-parts.d.ts +7 -0
- package/dist/choice-parts.js +1 -0
- package/dist/choice.d.ts +63 -1
- package/dist/choice.js +1 -1
- package/dist/code-UKPv6LVP.js +1 -0
- package/dist/{code-block-CKzsAMzj.js → code-block-B-xD4_RW.js} +3 -3
- package/dist/code-block-B7XPzZnp.js +1 -0
- package/dist/code-block-BXXceNVo.js +1 -0
- package/dist/code-block-C7uzLs8t.js +1 -0
- package/dist/{code-block-BDw6MEwH.d.ts → code-block-Cs1Lcmdr.d.ts} +81 -252
- package/dist/code-block-Erv7wuWW.d.ts +173 -0
- package/dist/code-block-parts.d.ts +380 -0
- package/dist/code-block-parts.js +1 -0
- package/dist/code-block.d.ts +66 -691
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.d.ts +2 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +1 -1
- package/dist/code.js +1 -1
- package/dist/combobox-6LXe1cLx.js +1 -0
- package/dist/combobox-parts.d.ts +303 -0
- package/dist/combobox-parts.js +1 -0
- package/dist/combobox.d.ts +2 -465
- package/dist/combobox.js +1 -1
- package/dist/command-B8L-zjGt.js +1 -0
- package/dist/command-CCMWCjAK.js +1 -0
- package/dist/command-VKj84zAX.d.ts +859 -0
- package/dist/command-cbgO9CiG.js +1 -0
- package/dist/command-parts.d.ts +6 -0
- package/dist/command-parts.js +1 -0
- package/dist/command.d.ts +71 -1115
- package/dist/command.js +1 -1
- package/dist/compose-refs-Ce1vWUz0.js +1 -0
- package/dist/cx-CfAFHj5_.js +73 -0
- package/dist/cx-DhYnQ07J.js +1 -0
- package/dist/cx.d.ts +20 -14
- package/dist/cx.js +1 -1
- package/dist/data-table-C-FgaN3_.js +1 -0
- package/dist/data-table-Cw9dUo1w.js +1 -0
- package/dist/data-table-CwqrMtp0.js +1 -0
- package/dist/data-table-GUbt8mzo.d.ts +38 -0
- package/dist/data-table-parts.d.ts +763 -0
- package/dist/data-table-parts.js +1 -0
- package/dist/data-table.d.ts +12 -1208
- package/dist/data-table.js +1 -1
- package/dist/description-list-CjcKOOnr.d.ts +110 -0
- package/dist/description-list-parts.d.ts +6 -0
- package/dist/description-list-parts.js +1 -0
- package/dist/description-list.d.ts +3 -183
- package/dist/description-list.js +1 -1
- package/dist/dialog-4Ed3U7hz.js +1 -0
- package/dist/dialog-BDb_obii.d.ts +166 -0
- package/dist/dialog-BaR9D58J.js +1 -0
- package/dist/dialog-BkNxAcol.d.ts +467 -0
- package/dist/dialog-DSYuhFD5.js +1 -0
- package/dist/dialog-fXMCxM9W.js +1 -0
- package/dist/dialog-parts.d.ts +6 -0
- package/dist/dialog-parts.js +1 -0
- package/dist/dialog.d.ts +88 -2
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-BuluRn0Z.js +1 -0
- package/dist/dropdown-menu-CDXlp0QT.d.ts +507 -0
- package/dist/dropdown-menu-parts.d.ts +6 -0
- package/dist/dropdown-menu-parts.js +1 -0
- package/dist/dropdown-menu.d.ts +57 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty-parts.d.ts +120 -0
- package/dist/empty-parts.js +1 -0
- package/dist/empty.d.ts +2 -216
- package/dist/empty.js +1 -1
- package/dist/field-BRYypbjO.js +1 -0
- package/dist/field-BVMx7HoG.js +1 -0
- package/dist/field-BwCq1b9R.js +1 -0
- package/dist/field-CYAaNexp.js +1 -0
- package/dist/field-DRHAcM1s.js +1 -0
- package/dist/field-parts.d.ts +767 -0
- package/dist/field-parts.js +1 -0
- package/dist/field.d.ts +21 -1201
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +1 -1
- package/dist/flag.js +1 -1
- package/dist/float-C_vwTtzU.js +1 -0
- package/dist/float-JmSzKDHd.js +1 -0
- package/dist/float-OhVY3cf4.js +1 -0
- package/dist/hooks-B-Cd15iL.js +1 -0
- package/dist/hooks-BP_uqBsI.js +1 -0
- package/dist/hooks-BsOjpTgs.js +1 -0
- package/dist/hooks-BybaGF7O.js +1 -0
- package/dist/hooks-C9b-2wGy.js +1 -0
- package/dist/hooks-CMmpICCH.js +1 -0
- package/dist/hooks-CUYIUcp6.js +1 -0
- package/dist/hooks-DKbOd_pQ.js +1 -0
- package/dist/hooks-DejuqCNF.js +1 -0
- package/dist/hooks-GsDfo7Zl.js +1 -0
- package/dist/hooks-PsYFJkz2.js +1 -0
- package/dist/hooks-lDz_S9UG.js +1 -0
- package/dist/hooks.d.ts +96 -7
- package/dist/hooks.js +1 -1
- package/dist/hover-card-BEC5EQiH.js +1 -0
- package/dist/hover-card-parts.d.ts +160 -0
- package/dist/hover-card-parts.js +1 -0
- package/dist/hover-card.d.ts +8 -280
- package/dist/hover-card.js +1 -1
- package/dist/icon-0RoVrpGj.js +1 -0
- package/dist/icon-BSGMvJ0W.js +1 -0
- package/dist/icon-DIiKxRTh.js +1 -0
- package/dist/{icon-QCm1ui29.d.ts → icon-Dqn_LLrR.d.ts} +1 -1
- package/dist/{icon-DuIYoyft.d.ts → icon-KTcDR4--.d.ts} +1 -1
- package/dist/icon.d.ts +2 -2
- package/dist/icon.js +1 -1
- package/dist/icons-CVgj9Whd.js +1 -0
- package/dist/icons-D_4cZaL1.js +1 -0
- package/dist/icons-DucrvIOa.js +1 -0
- package/dist/icons.js +1 -1
- package/dist/{index-KJ06KK6t.d.ts → index-CCkilmv8.d.ts} +1 -1
- package/dist/input-83xaPZWK.js +1 -0
- package/dist/input-B78ah4AB.js +1 -0
- package/dist/{input-DC4nW0Sr.d.ts → input-Bvpu3ruQ.d.ts} +1 -1
- package/dist/input.d.ts +2 -2
- package/dist/input.js +1 -1
- package/dist/kbd-Bz_Rbpv8.js +1 -0
- package/dist/kbd.d.ts +1 -1
- package/dist/kbd.js +1 -1
- package/dist/{label-epgtywRz.d.ts → label-DZpKu3Pu.d.ts} +1 -1
- package/dist/label-DmkAp9xI.js +1 -0
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/layer-container-DDOZJ0fn.js +1 -0
- package/dist/layer-container.d.ts +9 -1
- package/dist/layer-container.js +1 -1
- package/dist/line-chart-CBL7eCqF.js +1 -0
- package/dist/line-chart-CIDFDkyb.d.ts +380 -0
- package/dist/line-chart-parts.d.ts +6 -0
- package/dist/line-chart-parts.js +1 -0
- package/dist/line-chart.d.ts +4 -568
- package/dist/line-chart.js +1 -1
- package/dist/list-CC3Pi__V.js +1 -0
- package/dist/list-Cx4KNfgC.d.ts +286 -0
- package/dist/list-FiFQJ0BU.js +1 -0
- package/dist/list-parts.d.ts +6 -0
- package/dist/list-parts.js +1 -0
- package/dist/list.d.ts +3 -400
- package/dist/list.js +1 -1
- package/dist/live-region-78gbKwlB.js +1 -0
- package/dist/live-region.d.ts +1 -1
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +33 -10
- package/dist/main-9d96oUPG.js +1 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +1287 -893
- package/dist/media-object-parts.d.ts +65 -0
- package/dist/media-object-parts.js +1 -0
- package/dist/media-object.d.ts +2 -118
- package/dist/media-object.js +1 -1
- package/dist/migrations/0017-select-owned-behavior.yml +117 -0
- package/dist/migrations/0018-combobox-owned-behavior.yml +1661 -0
- package/dist/migrations/0019-multi-select-owned-behavior.yml +1414 -0
- package/dist/migrations/0020-native-floats.yml +823 -0
- package/dist/migrations/0021-native-radio-group.yml +397 -0
- package/dist/migrations/0024-command-owned-behavior.yml +66 -0
- package/dist/migrations/0026-native-dropdown-menu.yml +351 -0
- package/dist/migrations/0029-data-attribute-contract.yml +1707 -0
- package/dist/migrations/0030-between-variant.yml +1954 -0
- package/dist/multi-select-parts.d.ts +487 -0
- package/dist/multi-select-parts.js +1 -0
- package/dist/multi-select-qC0BuYKD.js +1 -0
- package/dist/multi-select.d.ts +6 -803
- package/dist/multi-select.js +1 -1
- package/dist/otp-input-LPdkb_Fg.js +1 -0
- package/dist/otp-input-parts.d.ts +211 -0
- package/dist/otp-input-parts.js +1 -0
- package/dist/otp-input-zl6MVio6.js +1 -0
- package/dist/otp-input.d.ts +11 -252
- package/dist/otp-input.js +1 -1
- package/dist/overlay-prompt-BIzMQvx7.js +1 -0
- package/dist/overlay-prompt-CDnhSoPJ.js +1 -0
- package/dist/overlay-prompt.d.ts +57 -0
- package/dist/overlay-prompt.js +1 -0
- package/dist/pagination-B2ESEbMI.d.ts +171 -0
- package/dist/pagination-CxaLKZcE.js +1 -0
- package/dist/pagination-Df1gTCN-.js +1 -0
- package/dist/pagination-cursor-pagination-parts.d.ts +6 -0
- package/dist/pagination-cursor-pagination-parts.js +1 -0
- package/dist/pagination.d.ts +38 -303
- package/dist/pagination.js +1 -1
- package/dist/popover-DOd6zLvE.d.ts +226 -0
- package/dist/popover-DWvHbepV.js +1 -0
- package/dist/popover-parts.d.ts +6 -0
- package/dist/popover-parts.js +1 -0
- package/dist/popover.d.ts +60 -2
- package/dist/popover.js +1 -1
- package/dist/position-Cv3XpSur.d.ts +5 -0
- package/dist/progress-BE0c8GW8.js +1 -0
- package/dist/progress-ZhFJhv9u.js +1 -0
- package/dist/progress-bar-parts.d.ts +86 -0
- package/dist/progress-bar-parts.js +1 -0
- package/dist/progress-donut-parts.d.ts +94 -0
- package/dist/progress-donut-parts.js +1 -0
- package/dist/progress-mJQMhxMX.js +1 -0
- package/dist/progress-zDpT3TY4.d.ts +2 -0
- package/dist/progress.d.ts +4 -268
- package/dist/progress.js +1 -1
- package/dist/qr-code-0zh10iIE.d.ts +148 -0
- package/dist/qr-code-BOOubA9x.js +1 -0
- package/dist/qr-code-D8tBKtjP.js +1 -0
- package/dist/qr-code-DzJjumoc.d.ts +46 -0
- package/dist/qr-code-encoder.browser.d.ts +15 -0
- package/dist/qr-code-encoder.browser.js +1 -0
- package/dist/qr-code-encoder.d.ts +15 -0
- package/dist/qr-code-encoder.js +1 -0
- package/dist/qr-code-parts.d.ts +6 -0
- package/dist/qr-code-parts.js +1 -0
- package/dist/qr-code.d.ts +4 -227
- package/dist/qr-code.js +1 -1
- package/dist/query-C0e5VYNp.d.ts +440 -0
- package/dist/query-V5NifJGs.js +1 -0
- package/dist/query-filter.js +1 -1
- package/dist/query-parts.d.ts +6 -0
- package/dist/query-parts.js +1 -0
- package/dist/query.d.ts +3 -637
- package/dist/query.js +1 -1
- package/dist/radio-group-B9jtIbV1.d.ts +39 -0
- package/dist/radio-group-f3ThXQCx.js +1 -0
- package/dist/radio-group-parts.d.ts +249 -0
- package/dist/radio-group-parts.js +1 -0
- package/dist/radio-group-zA5DjlLg.js +1 -0
- package/dist/radio-group.d.ts +7 -399
- package/dist/radio-group.js +1 -1
- package/dist/sandbar-Cm2yMjEZ.js +1 -0
- package/dist/sandbar-DU4wpKRc.d.ts +345 -0
- package/dist/sandbar-parts.d.ts +6 -0
- package/dist/sandbar-parts.js +1 -0
- package/dist/sandbar.d.ts +3 -438
- package/dist/sandbar.js +1 -1
- package/dist/sandboxed-on-click-Cg3lewoG.js +1 -0
- package/dist/sandboxed-on-click-DOw_Jkhk.js +1 -0
- package/dist/sandboxed-on-click.d.ts +1 -1
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot-1vFxkpjT.js +1 -0
- package/dist/scatter-plot-D25jLIVw.d.ts +388 -0
- package/dist/scatter-plot-parts.d.ts +6 -0
- package/dist/scatter-plot-parts.js +1 -0
- package/dist/scatter-plot.d.ts +4 -573
- package/dist/scatter-plot.js +1 -1
- package/dist/segmented-control-DuiDPKDZ.js +1 -0
- package/dist/segmented-control-parts.d.ts +72 -0
- package/dist/segmented-control-parts.js +1 -0
- package/dist/segmented-control.d.ts +4 -100
- package/dist/segmented-control.js +1 -1
- package/dist/select-08IEtypH.js +1 -0
- package/dist/select-DM2wWfOO.d.ts +478 -0
- package/dist/select-parts.d.ts +6 -0
- package/dist/select-parts.js +1 -0
- package/dist/select.d.ts +63 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list-Ax5F2Gz1.js +1 -0
- package/dist/selectable-list-CyLc3EEt.d.ts +407 -0
- package/dist/selectable-list-GcpbbRM1.js +1 -0
- package/dist/selectable-list-parts.d.ts +6 -0
- package/dist/selectable-list-parts.js +1 -0
- package/dist/selectable-list.d.ts +3 -643
- package/dist/selectable-list.js +1 -1
- package/dist/separator-BB1ohsjn.js +1 -0
- package/dist/{separator-Ck4sPrdN.d.ts → separator-BzHNVyyv.d.ts} +1 -1
- package/dist/separator.d.ts +1 -1
- package/dist/separator.js +1 -1
- package/dist/sheet-5JgxVaWC.js +1 -0
- package/dist/sheet-parts.d.ts +732 -0
- package/dist/sheet-parts.js +1 -0
- package/dist/sheet-qYPi5MP8.js +1 -0
- package/dist/sheet.d.ts +11 -1224
- package/dist/sheet.js +1 -1
- package/dist/sidebar-CsC9fyPL.js +1 -0
- package/dist/sidebar-HDVxTNPi.js +1 -0
- package/dist/sidebar-OBA7L42d.d.ts +1480 -0
- package/dist/sidebar-parts.d.ts +6 -0
- package/dist/sidebar-parts.js +1 -0
- package/dist/sidebar.d.ts +108 -2518
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-DB0oQyAx.js +1 -0
- package/dist/skeleton.d.ts +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link-BGhAWSqB.js +1 -0
- package/dist/skip-to-main-link.d.ts +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider-YlBozcPQ.js +1 -0
- package/dist/slider.d.ts +149 -15
- package/dist/slider.js +1 -1
- package/dist/slot-5ZSmrISx.d.ts +19 -0
- package/dist/slot-BxngGBJ2.js +1 -0
- package/dist/slot-CBcGhRdV.js +1 -0
- package/dist/{slot-BEMQMbk3.d.ts → slot-tuk2J6bY.d.ts} +6 -23
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button-DvJHD7cZ.js +1 -0
- package/dist/split-button-parts.d.ts +178 -0
- package/dist/split-button-parts.js +1 -0
- package/dist/split-button.d.ts +2 -314
- package/dist/split-button.js +1 -1
- package/dist/strata-parts.d.ts +256 -0
- package/dist/strata-parts.js +1 -0
- package/dist/strata.d.ts +4 -493
- package/dist/strata.js +1 -1
- package/dist/switch-DajWYrq3.js +1 -0
- package/dist/switch.d.ts +36 -4
- package/dist/switch.js +1 -1
- package/dist/{table-Ii9hHUWN.d.ts → table-C2KnE83u.d.ts} +5 -444
- package/dist/table-DJHK48-8.js +1 -0
- package/dist/table-parts.d.ts +6 -0
- package/dist/table-parts.js +1 -0
- package/dist/table.d.ts +81 -1
- package/dist/table.js +1 -1
- package/dist/tabs-36-4SlRo.js +1 -0
- package/dist/tabs-CC_HAqr4.d.ts +193 -0
- package/dist/tabs-DayeszXP.js +1 -0
- package/dist/tabs-headless-tabs-parts.d.ts +6 -0
- package/dist/tabs-headless-tabs-parts.js +1 -0
- package/dist/tabs-parts.d.ts +237 -0
- package/dist/tabs-parts.js +1 -0
- package/dist/tabs.d.ts +43 -420
- package/dist/tabs.js +1 -1
- package/dist/text-area-D29JTaZg.js +1 -0
- package/dist/text-area.d.ts +1 -1
- package/dist/text-area.js +1 -1
- package/dist/theme-D6rP5Fy8.js +1 -0
- package/dist/theme-switcher-PKMCyJxT.js +1 -0
- package/dist/theme-switcher.d.ts +23 -19
- package/dist/theme-switcher.js +1 -1
- package/dist/theme-xoFnLba6.js +1 -0
- package/dist/theme.d.ts +70 -65
- package/dist/theme.js +1 -1
- package/dist/time-zone-CpWYKHdp.js +1 -0
- package/dist/time-zone-DZ4hUJ8K.js +1 -0
- package/dist/time-zone.d.ts +190 -0
- package/dist/time-zone.js +1 -0
- package/dist/toast-BJZ__22c.js +1 -0
- package/dist/toast-Cb9IN-6e.d.ts +185 -0
- package/dist/toast-DM_oq-3E.js +1 -0
- package/dist/toast-parts.d.ts +6 -0
- package/dist/toast-parts.js +1 -0
- package/dist/toast.d.ts +7 -256
- package/dist/toast.js +1 -1
- package/dist/tokens.dark.json +31 -266
- package/dist/tokens.json +139 -205
- package/dist/tooltip-D4HZn19B.js +1 -0
- package/dist/tooltip-DP6Lz6jv.d.ts +180 -0
- package/dist/tooltip-Uy-kz0rK.d.ts +1 -0
- package/dist/tooltip-parts.d.ts +7 -0
- package/dist/tooltip-parts.js +1 -0
- package/dist/tooltip.d.ts +57 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text-B5u2AlNg.js +1 -0
- package/dist/truncated-text-BoXHP-cD.js +1 -0
- package/dist/truncated-text.d.ts +3 -5
- package/dist/truncated-text.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/typography-C2BmSH12.d.ts +148 -0
- package/dist/typography-parts.d.ts +6 -0
- package/dist/typography-parts.js +1 -0
- package/dist/typography.d.ts +52 -0
- package/dist/typography.js +1 -0
- package/dist/use-combobox-OhIEVioc.d.ts +23 -0
- package/dist/use-float-WEqqhXBE.d.ts +18 -0
- package/dist/use-listbox-D4uIonSN.d.ts +1 -0
- package/dist/utils-BN3rwHzz.js +1 -0
- package/dist/utils-BlLYcYik.js +1 -0
- package/dist/utils-C4astHJG.js +1 -0
- package/dist/utils-CPSttKPD.js +1 -0
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +1 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +2 -2
- package/dist/well.js +1 -1
- package/dist/world-map-BDd3N_Ap.d.ts +424 -0
- package/dist/world-map-D3c8Pq-h.js +1 -0
- package/dist/world-map-parts.d.ts +6 -0
- package/dist/world-map-parts.js +1 -0
- package/dist/world-map-t9U-IMKS.js +1 -0
- package/dist/world-map.d.ts +80 -0
- package/dist/world-map.js +1 -0
- package/package.json +15 -18
- package/dist/alert-BkJHDx9X.js +0 -1
- package/dist/anchor-Dc6IgvXV.js +0 -1
- package/dist/browser-only-CZfkNw5A.js +0 -1
- package/dist/button-B9bChDgl.js +0 -1
- package/dist/button-BQZ6eoD3.js +0 -1
- package/dist/button-D8jixIbH.js +0 -1
- package/dist/button-DNLTJ32M.js +0 -1
- package/dist/chart-BLCqzt56.js +0 -1
- package/dist/chart-CChZiCrt.js +0 -1
- package/dist/chart-CUmSu9d7.js +0 -1
- package/dist/chart-DtgZBAas.js +0 -2
- package/dist/checkbox-Cu5cgZmk.js +0 -1
- package/dist/choice-CCVG2hb9.js +0 -1
- package/dist/clsx-DUGZgXfJ.js +0 -1
- package/dist/clsx-Dj3RWZ2l.js +0 -1
- package/dist/code-BPKNY1_w.js +0 -1
- package/dist/cx-CK7o_rVv.js +0 -1
- package/dist/dialog-CIEuwNys.d.ts +0 -958
- package/dist/dialog-CbEEA0fl.d.ts +0 -32
- package/dist/dialog-DmzoDfY3.js +0 -1
- package/dist/dropdown-menu-CeY498yk.d.ts +0 -775
- package/dist/dropdown-menu-uheL0prz.js +0 -1
- package/dist/field-Bpvn4tQp.js +0 -1
- package/dist/field-Cai_4c1l.js +0 -1
- package/dist/icon-BudQMD2S.js +0 -1
- package/dist/icon-xb7d9M7X.js +0 -1
- package/dist/icons-DEDCLZ8B.js +0 -1
- package/dist/icons-DXadFwpo.js +0 -1
- package/dist/icons-DcesO4Ng.js +0 -1
- package/dist/input-DQyN6gN0.js +0 -1
- package/dist/input-fW8QSZEO.js +0 -1
- package/dist/interactive-target-BXScNeOr.js +0 -1
- package/dist/kbd-P1nQshWo.js +0 -1
- package/dist/label-DO1RlMKl.js +0 -1
- package/dist/layer-container-DL4yclOu.js +0 -1
- package/dist/list-cQZPSjfz.js +0 -1
- package/dist/live-region-Dhapu8a5.js +0 -1
- package/dist/main-CHyWYDak.js +0 -1
- package/dist/popover-Bei0jyfH.d.ts +0 -357
- package/dist/popover-DhgunktK.js +0 -1
- package/dist/popover-T2EyaqGK.d.ts +0 -1
- package/dist/primitive-D8CzV_Ft.js +0 -1
- package/dist/radio-group-BJQ6EOqh.d.ts +0 -27
- package/dist/radio-group-ggEkCi0V.js +0 -1
- package/dist/sandboxed-on-click-D4PL5_GR.js +0 -1
- package/dist/select-1xuUx_os.js +0 -1
- package/dist/select-BpaXHxJm.d.ts +0 -890
- package/dist/separator-DnvhwY2J.js +0 -1
- package/dist/shake-CAUpKBHe.js +0 -1
- package/dist/sheet-DHy_vlme.js +0 -1
- package/dist/skeleton-DHfyjuQi.js +0 -1
- package/dist/slot-B7rwscwd.js +0 -1
- package/dist/table-BnLdXUai.js +0 -1
- package/dist/theme-BNdZl352.js +0 -1
- package/dist/tooltip-CstGDKwy.d.ts +0 -283
- package/dist/tooltip-DQO40Mrq.js +0 -1
- package/dist/use-breakpoint-B4Kh0xE6.js +0 -1
- package/dist/use-callback-ref-DiOXFQzM.js +0 -1
- package/dist/use-composed-refs-DPYmLDSe.js +0 -1
- package/dist/use-copy-to-clipboard-hBL6_65i.js +0 -1
- package/dist/use-inert-siblings-C4RHXrZc.js +0 -1
- package/dist/use-is-apple-platform-Bq6_KbVX.js +0 -1
- package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +0 -1
- package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +0 -1
- package/dist/use-matches-media-query-FfvtNKQe.js +0 -1
- package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +0 -1
- package/dist/use-swipe-to-dismiss-BYdlca8r.js +0 -1
- /package/dist/{use-is-hydrated-BeLOGKwE.js → hooks-BeLOGKwE.js} +0 -0
- /package/dist/{suggestions-Ciz2vaJO.js → query-filter-Ciz2vaJO.js} +0 -0
- /package/dist/{direction-CvDpql3O.js → sorting-CvDpql3O.js} +0 -0
- /package/dist/{booleanish-BfvnW6vy.js → types-BfvnW6vy.js} +0 -0
- /package/dist/{css-properties-D85fCNV3.js → types-D85fCNV3.js} +0 -0
- /package/dist/{alternate-announcement-BkH4bOKp.js → utils-BkH4bOKp.js} +0 -0
- /package/dist/{copy-to-clipboard-Dd83caRw.js → utils-Dd83caRw.js} +0 -0
- /package/dist/{in-view-Dxv_GrUU.js → utils-Dxv_GrUU.js} +0 -0
- /package/dist/{data-slot-EM6s2WEU.js → utils-EM6s2WEU.js} +0 -0
- /package/dist/{cookie-ca4g5CKp.js → utils-ca4g5CKp.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./color-CHZbU1Ww.js";import t from"tiny-invariant";const n=(e,t)=>Reflect.get(e,t),r=(e,t)=>e instanceof Date?e.getTime():typeof e==`number`?e:t&&typeof e==`string`?new Date(e).getTime():NaN,i=(e,t,n,r)=>{let i=/* @__PURE__ */ new Set;for(let e of r)for(let t of Object.keys(e))i.add(t);return`${e} ${t} "${n}" does not match any key in the provided data. Available keys: ${[...i].join(`, `)}.`},a=(e,t,n)=>`${e} could not read any "${t}" values as ${n===`time`?`dates`:`numbers`} for the "${n}" x scale. Check the xScale and the data types.`,o=(e,t)=>e.some(e=>n(e,t)!==void 0),s=({names:e,rows:t,xKey:s,xScale:c,dataKeys:l,zKey:u,sizeKey:d})=>{if(t.length===0)return;if(!o(t,s))throw Error(i(e.root,e.keys.x,s,t));let f=t;if(c===`linear`||c===`time`){let i=!1;if(f=t.filter(e=>{let t=n(e,s);return t!=null&&(i=!0),Number.isFinite(r(t,c===`time`))}),i&&f.length===0)throw Error(a(e.root,s,c))}if(f.length!==0){for(let n of l)if(!o(f,n))throw Error(i(e.part,e.keys.series,n,t));if(u!=null&&!o(f,u))throw Error(i(e.root,`zKey`,u,t));if(d!=null&&!o(f,d))throw Error(i(e.root,`sizeKey`,d,t))}},c=e=>1-(1-e)**3,l=(e,t,n)=>3*(1-n)**2*n*e+3*(1-n)*n**2*t+n**3,u=e=>{if(e<=0||e>=1)return e<=0?0:1;let t=0,n=1;for(let r=0;r<24;r++){let r=(t+n)/2;l(.23,.32,r)<e?t=r:n=r}return l(1,1,(t+n)/2)};var d=class{#e;#t=/* @__PURE__ */ new Float64Array;#n=/* @__PURE__ */ new Float64Array;#r=/* @__PURE__ */ new Float64Array;#i=0;#a=0;#o=!1;constructor(e={}){this.#e=e.ease??c}get active(){return this.#o}values(){return this.#r}retarget(e,t){let{duration:n,now:r}=t,i=e.length,a=this.#r.length!==i;if(a&&(this.#t=new Float64Array(i),this.#n=new Float64Array(i),this.#r=new Float64Array(i)),a||n<=0){for(let t=0;t<i;t++){let n=e[t]??NaN;this.#t[t]=n,this.#n[t]=n,this.#r[t]=n}this.#o=!1;return}let o=!1;for(let t=0;t<i;t++){let n=e[t]??NaN,r=this.#r[t]??NaN;if(r!==n&&!(Number.isNaN(r)&&Number.isNaN(n))){o=!0;break}}if(o){for(let t=0;t<i;t++)this.#t[t]=this.#r[t]??NaN,this.#n[t]=e[t]??NaN;this.#i=r,this.#a=n,this.#o=!0}else{for(let t=0;t<i;t++)this.#n[t]=e[t]??NaN;this.#o=!1}}snap(){this.#r.set(this.#n),this.#o=!1}tick(e){if(!this.#o)return!1;let t=Math.min(1,(e-this.#i)/this.#a),n=this.#e(t);for(let e=0;e<this.#r.length;e++){let t=this.#t[e]??NaN,r=this.#n[e]??NaN;Number.isNaN(t)||Number.isNaN(r)?this.#r[e]=r:this.#r[e]=t+(r-t)*n}return t>=1&&this.snap(),this.#o}},f=class{#e=/* @__PURE__ */ new Float64Array;#t=/* @__PURE__ */ new Float64Array;#n=0;#r=!1;#i;#a;#o=0;#s=null;constructor(e={}){this.#i=e.speed??.14,this.#a=e.epsilon??.001}get active(){return this.#r}values(){return this.#t}jump(e){this.#s=null,this.#t.length!==e.length&&(this.#e=new Float64Array(e.length),this.#t=new Float64Array(e.length));for(let t=0;t<e.length;t++){let n=e[t]??NaN;this.#e[t]=n,this.#t[t]=n}this.#r=!1}aim(e,t){if(this.#t.length!==e.length){this.jump(e);return}if(this.#c(e))return;this.#s!=null&&(this.#l(t),this.#s=null,this.#r=!1);let n=0;for(let t=0;t<e.length;t++){let r=e[t]??NaN;this.#e[t]=r;let i=Math.abs(r-(this.#t[t]??NaN));Number.isFinite(i)&&i>n&&(n=i)}this.#o=n,this.#r||(this.#r=!0,this.#n=t)}glide(e,t){let{now:n,duration:r}=t;if(this.#t.length!==e.length||r<=0)this.jump(e);else if(!this.#c(e)){this.#s!=null&&this.#l(n);for(let t=0;t<e.length;t++)this.#e[t]=e[t]??NaN;this.#s={from:Float64Array.from(this.#t),start:n,duration:r},this.#r=!0,this.#n=n}}#c(e){for(let t=0;t<e.length;t++){let n=e[t]??NaN,r=this.#e[t]??NaN;if(r!==n&&!(Number.isNaN(r)&&Number.isNaN(n)))return!1}return!0}#l(e){let t=this.#s;if(t==null)return;let n=Math.min(1,Math.max(0,(e-t.start)/t.duration));for(let e=0;e<this.#t.length;e++){let r=t.from[e]??NaN,i=this.#e[e]??NaN;this.#t[e]=Number.isNaN(r)||Number.isNaN(i)?i:r+(i-r)*n}n>=1&&(this.#s=null,this.#r=!1)}tick(e,t=0){if(!this.#r)return!1;if(this.#s!=null)return this.#n=e,this.#l(e),this.#r;let n=Math.min(50,Math.max(0,e-this.#n));this.#n=e;let r=1-(1-this.#i)**(n/16.67),i=Math.max(this.#o*this.#a,t,2**-52),a=!0;for(let e=0;e<this.#t.length;e++){let t=this.#e[e]??NaN,n=this.#t[e]??NaN;if(Number.isNaN(t)||Number.isNaN(n)){this.#t[e]=t;continue}let o=n+(t-n)*r;r>0&&o===n||Math.abs(t-o)<=i?this.#t[e]=t:(this.#t[e]=o,a=!1)}return this.#r=!a,this.#r}};const p=e=>{let{step:t,slot:n}=e,r=Math.min(64,Math.max(24,t*.6));return Math.min(n,r)},m=.5,h=(e,t)=>e<0?e:t,g=e=>{let{lower:t,upper:n,toPixel:r,reveal:i,gap:a}=e,o=r(t<0?n:t),s=o+(r(h(t,n))-o)*i;if(Math.abs(o-r(0))<m)return{baseline:o,value:s};let c=Math.min(a,Math.abs(o-s)/2);return{baseline:o-Math.sign(o-s)*c,value:s}},_=e=>{let{lower:t,upper:n,pileOuter:r,toPixel:i}=e;if(Number.isNaN(r))return!1;let a=i(h(t,n));return Math.abs(a-i(r))<m},v=e=>Math.abs(e.baseline-e.toPixel(0))<m,y=e=>{let{progress:t,index:n,count:r}=e;if(t>=1)return 1;let i=r>1?.5:1,a=r>1?n/(r-1)*(1-i):0,o=Math.min(1,Math.max(0,(t-a)/i));return u(o)},b=e=>{let{lower:t,upper:n,reveal:r,count:i}=e,a=n.map(()=>new Float64Array(i)),o=n.map(()=>new Float64Array(i));for(let e=0;e<i;e++){let i=0,s=0;for(let c=0;c<n.length;c++){let l=n[c]?.[e]??NaN,u=t[c]?.[e]??NaN,d=r(c,e),f=a[c],p=o[c];if(f==null||p==null)continue;if(Number.isNaN(l)){f[e]=NaN,p[e]=NaN;continue}let m=Number.isNaN(u)?0:u;m<0?(p[e]=s,s+=(m-l)*d,f[e]=s):(f[e]=i,i+=(l-m)*d,p[e]=i)}}return{lower:a,upper:o}},x=/* @__PURE__ */ new WeakMap,S=e=>{if(typeof e.matchMedia!=`function`)return!1;let t=e.matchMedia,n=x.get(t);return n??(n=e.matchMedia(`(prefers-reduced-motion: reduce)`),x.set(t,n)),n.matches},C=/* @__PURE__ */ new WeakMap,ee=(e,t)=>{let n=e.matchMedia(`(resolution: ${e.devicePixelRatio}dppx)`),r=()=>{if(n.removeEventListener(`change`,r),t.listeners.size!==0){ee(e,t);for(let e of t.listeners)e()}};n.addEventListener(`change`,r),t.disarm=()=>n.removeEventListener(`change`,r)},w=(e,t)=>{if(typeof e.matchMedia!=`function`)return()=>{};let n=C.get(e);if(n==null){let t={listeners:/* @__PURE__ */ new Set,disarm:()=>{}};ee(e,t),C.set(e,t),n=t}return n.listeners.add(t),()=>{n.listeners.delete(t),n.listeners.size===0&&(n.disarm(),C.delete(e))}},T=/* @__PURE__ */ new WeakMap,te=(e,t)=>{let n=T.get(e);if(n==null){let t={listeners:/* @__PURE__ */ new Set,onBefore:()=>{for(let e of t.listeners)e.before()},onAfter:()=>{for(let e of t.listeners)e.after()}};e.addEventListener(`beforeprint`,t.onBefore),e.addEventListener(`afterprint`,t.onAfter),T.set(e,t),n=t}return n.listeners.add(t),()=>{n.listeners.delete(t),n.listeners.size===0&&(e.removeEventListener(`beforeprint`,n.onBefore),e.removeEventListener(`afterprint`,n.onAfter),T.delete(e))}},E=/* @__PURE__ */ new WeakMap,ne=(e,t)=>{let n=e.fonts;if(n==null||typeof n.addEventListener!=`function`)return()=>{};let r=E.get(n);if(r==null){let e={listeners:/* @__PURE__ */ new Set,onLoad:()=>{for(let t of e.listeners)t()}};n.addEventListener(`loadingdone`,e.onLoad),E.set(n,e),r=e}return r.listeners.add(t),()=>{r.listeners.delete(t),r.listeners.size===0&&(n.removeEventListener(`loadingdone`,r.onLoad),E.delete(n))}},D=/* @__PURE__ */ new WeakMap,re=(e,t,n)=>{if(typeof ResizeObserver>`u`)return()=>{};let r=e.ownerDocument,i=D.get(r);if(i==null){let e=/* @__PURE__ */ new Map;i={handlers:e,observer:new ResizeObserver(t=>{for(let n of t)e.get(n.target)?.(n)})},D.set(r,i)}let a=i;return a.handlers.set(e,t),a.observer.observe(e,n),()=>{a.handlers.get(e)===t&&(a.handlers.delete(e),a.observer.unobserve(e),a.handlers.size===0&&(a.observer.disconnect(),D.get(r)===a&&D.delete(r)))}},O=/* @__PURE__ */ new WeakMap,ie=(e,t)=>{t.handle=0;let n=t.callbacks;t.callbacks=/* @__PURE__ */ new Set;let r=[];for(let e of n)try{e()}catch(e){r.push(e)}if(t.callbacks.size===0&&O.get(e)===t&&O.delete(e),r.length===1)throw r[0];if(r.length>1)throw AggregateError(r,`More than one chart failed to commit a frame.`)},ae=(e,t)=>{let n=O.get(e);n??(n={callbacks:/* @__PURE__ */ new Set,handle:0},O.set(e,n));let r=n,i=r.callbacks;return i.add(t),r.handle===0&&(r.handle=e.requestAnimationFrame(()=>ie(e,r))),()=>{i.delete(t),i===r.callbacks&&i.size===0&&r.handle!==0&&(e.cancelAnimationFrame(r.handle),r.handle=0,O.delete(e))}},oe=e=>{let{pointCount:t,columnCount:n,wasDecimated:r}=e;return n<=0?!1:r?t>=n*3:t>=n*4},se=e=>{let{xs:t,values:n,startIndex:r,endIndex:i,positionK:a,positionB:o,columnCount:s}=e,c=new Uint8Array(s),l=new Float64Array(s),u=new Float64Array(s),d=new Float64Array(s),f=new Float64Array(s);for(let e=r;e<=i;e++){let r=n[e]??NaN;if(Number.isNaN(r))continue;let i=t[e]??NaN,p=Math.floor(i*a+o);p===s&&(p=s-1),p<0||p>=s||(c[p]===0?(c[p]=1,l[p]=r,u[p]=r,d[p]=r,f[p]=r):(r<(l[p]??1/0)&&(l[p]=r),r>(u[p]??-1/0)&&(u[p]=r),f[p]=r))}return{columnCount:s,hasData:c,minValue:l,maxValue:u,inValue:d,outValue:f}};let ce=null;const le=()=>ce??=new Intl.NumberFormat;let ue=null;const de=()=>ue??=new Intl.NumberFormat(void 0,{maximumSignificantDigits:4}),fe=/* @__PURE__ */ new Map,k=(e,t)=>{let n=Object.is(e,-0)?0:e,r=t?.maximumFractionDigits;if(r!=null){let e=fe.get(r);return e??(e=new Intl.NumberFormat(void 0,{maximumFractionDigits:r}),fe.set(r,e)),e.format(n)}return n!==0&&Math.abs(n)<1?de().format(n):le().format(n)},pe=e=>!Number.isFinite(e)||e<=0?0:Math.min(20,Math.max(0,-Math.floor(Math.log10(e))));let me=null;const he=()=>me??=new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`});let ge=null;const _e=()=>ge??=new Intl.DateTimeFormat(void 0,{year:`numeric`,month:`short`,day:`numeric`}),A=e=>e.getHours()!==0||e.getMinutes()!==0||e.getSeconds()!==0||e.getMilliseconds()!==0,j=(e,t)=>typeof e==`string`?e:typeof e==`number`?k(e):Number.isNaN(e.getTime())?`—`:t?.datasetHasTimeOfDay??A(e)?he().format(e):_e().format(e),ve=({rows:e,xKey:r,names:a})=>{let o=e.length,s=new Float64Array(o),c=Array.from({length:o},()=>``),l=!1;for(let t=0;t<o;t++){let i=e[t],a=i==null?void 0:n(i,r);a!==void 0&&(l=!0),c[t]=typeof a==`string`||typeof a==`number`||a instanceof Date?a:String(a),s[t]=t}return t(o===0||l,()=>i(a.root,a.keys.x,r,e)),{rowCount:o,xs:s,xValues:c,order:null,orderInverse:null,xsAllIntegers:!0}},ye=({rows:e,xKey:o,xScale:s,names:c})=>{let l=new Float64Array(e.length),u=new Int32Array(e.length),d=0,f=!0,p=!1,m=!1;for(let t=0;t<e.length;t++){let i=e[t],a=i==null?void 0:n(i,o);a!==void 0&&(p=!0),a!=null&&(m=!0);let c=r(a,s===`time`);Number.isFinite(c)&&(d>0&&c<(l[d-1]??0)&&(f=!1),l[d]=c,u[d]=t,d+=1)}t(e.length===0||p,()=>i(c.root,c.keys.x,o,e)),t(!m||d>0,()=>a(c.root,o,s));let h=d,g=h===e.length?l:l.slice(0,h),_=h===e.length?u:u.slice(0,h);if(!f){let e=g,t=_,n=Array.from({length:h},(e,t)=>t).toSorted((t,n)=>(e[t]??0)-(e[n]??0)||t-n);g=new Float64Array(h),_=new Int32Array(h);for(let r=0;r<h;r++){let i=n[r]??r;g[r]=e[i]??0,_[r]=t[i]??0}}let v=!0;for(let e=0;e<h;e++)if(!Number.isInteger(g[e])){v=!1;break}if(h===e.length&&f)return{rowCount:h,xs:g,xValues:[],order:null,orderInverse:null,xsAllIntegers:v};let y=new Int32Array(e.length).fill(-1);for(let e=0;e<h;e++){let t=_[e];t!=null&&(y[t]=e)}return{rowCount:h,xs:g,xValues:[],order:_,orderInverse:y,xsAllIntegers:v}},be=e=>{let{rows:r,specs:a,zKey:o}=e,s=e.xScale===`band`||e.xScale===`point`?ve(e):ye(e),{rowCount:c,order:l}=s,u=e=>l==null?e:l[e]??e,d=!1;for(let e of s.xValues)if(e instanceof Date&&A(e)){d=!0;break}let f=1/0,p=-1/0,m=!0,h=a.map(a=>{let o=new Float64Array(c),s=!1;for(let e=0;e<c;e++){let t=r[u(e)],i=t==null?void 0:n(t,a.dataKey);if(i===void 0){o[e]=NaN;continue}s=!0;let c=typeof i==`number`&&Number.isFinite(i)?i:NaN;o[e]=c,Number.isNaN(c)||(f=Math.min(f,c),p=Math.max(p,c),Number.isInteger(c)||(m=!1))}return t(c===0||s,()=>i(e.names.part,e.names.keys.series,a.dataKey,r)),o}),g=/* @__PURE__ */ new Float64Array,_=null;if(o!=null){g=new Float64Array(c);let e=1/0,a=-1/0,s=!1;for(let t=0;t<c;t++){let i=r[u(t)],c=i==null?void 0:n(i,o);c!==void 0&&(s=!0);let l=typeof c==`number`&&Number.isFinite(c)?c:NaN;g[t]=l,Number.isNaN(l)||(e=Math.min(e,l),a=Math.max(a,l))}t(c===0||s,()=>i(`ScatterPlot.Root`,`zKey`,o,r)),_=e===1/0?null:[e,a]}return{...s,xHasTimeOfDay:d,columns:h,valueMin:f===1/0?0:f,valueMax:p===-1/0?0:p,valuesAllIntegers:m,zs:g,zExtent:_}},xe=(e,t,n)=>{if(t<=0)return null;let r=0,i=t-1,a=e[0]??0,o=e[i]??0;if(n<=a)return 0;if(n>=o)return i;for(;i-r>1;){let t=r+i>>1;(e[t]??0)<=n?r=t:i=t}let s=n-(e[r]??0);return(e[i]??0)-n<s?i:r},Se=(e,t)=>{let n=0,r=e;for(;n<r;){let e=n+r>>1;t(e)?n=e+1:r=e}return n},Ce=Math.sqrt(50),we=Math.sqrt(10),Te=Math.sqrt(2),Ee=e=>e>=Ce?10:e>=we?5:e>=Te?2:1,M=(e,t,n,r)=>{let i=(t-e)/Math.max(0,n),a=r?.integer?Math.max(1,i):i,o=Math.floor(Math.log10(a)),s=a/10**o,c=Ee(s),l,u,d;return o<0?(d=10**-o/c,l=Math.round(e*d),u=Math.round(t*d),l/d<e&&(l+=1),u/d>t&&--u,d=-d):(d=10**o*c,l=Math.round(e/d),u=Math.round(t/d),l*d<e&&(l+=1),u*d>t&&--u),u<l&&.5<=n&&n<2?M(e,t,n*2,r):[l,u,d]},De=(e,t,n,r)=>{if(!(n>0))return[];if(e===t)return r?.integer&&!Number.isInteger(e)?[]:[e];let i=t<e,[a,o,s]=i?M(t,e,n,r):M(e,t,n,r);if(!(o>=a))return[];let c=o-a+1,l=[];for(let e=0;e<c;e+=1){let t=i?o-e:a+e;l.push(s<0?t/-s:t*s)}return l},Oe=(e,t,n,r)=>{if(!(n>0))return 0;if(e===t)return r?.integer&&!Number.isInteger(e)?0:1;let[i,a]=t<e?M(t,e,n,r):M(e,t,n,r);return a>=i?a-i+1:0},ke=(e,t,n)=>M(e,t,n)[2],Ae=(e,t)=>{let n=e[1]-e[0];if(n===0)return{k:0,b:(t[0]+t[1])/2};let r=(t[1]-t[0])/n;return{k:r,b:t[0]-e[0]*r}},je=e=>{let{count:t,rangeStart:n,rangeEnd:r,paddingInner:i,paddingOuter:a}=e,o=r-n;if(t<=0||o<=0)return{count:Math.max(0,t),rangeStart:n,step:0,bandwidth:0,offset:0};let s=o/Math.max(1,t-i+a*2);return{count:t,rangeStart:n,step:s,bandwidth:s*(1-i),offset:s*a}},N=(e,t)=>e.rangeStart+e.offset+t*e.step,P=(e,t)=>N(e,t)+e.bandwidth/2,Me=(e,t)=>({start:N(e,t)-(e.step-e.bandwidth)/2,size:e.step}),Ne=(e,t)=>{if(e.count===0||e.step===0)return null;let n=Math.floor((t-e.rangeStart-e.offset+e.step/2-e.bandwidth/2)/e.step);return Math.min(e.count-1,Math.max(0,n))},Pe=(e,t,n)=>De(e[0],e[1],t,n),Fe=(e,t,n)=>{let r=Math.floor(Math.min(n?.count??t,t));for(;r>1&&Oe(e[0],e[1],r,n)>t;)--r;return Pe(e,r,n).slice(0,Math.max(0,Math.floor(t)))},F=(e,t)=>{if(e[0]>e[1])return F([e[1],e[0]],t);if(e[0]===e[1]){let n=e[0],r=n===0?1:Math.abs(n)*.5;return F([n-r,n+r],t)}let n=e[0],r=e[1],i=NaN;for(let e=0;e<10;e++){let e=ke(n,r,t);if(e===i||e===0||!Number.isFinite(e))break;if(e>0)n=Math.floor(n/e)*e,r=Math.ceil(r/e)*e;else{let t=-e;n=Math.floor(n*t)/t,r=Math.ceil(r*t)/t}i=e}return[n,r]},Ie=(e,t)=>{let n=F(e,t);return e[0]===0?[0,n[1]]:n},I=1e3,L=I*60,R=L*60,z=R*24,Le=z*30,Re=z*365,B={floor:e=>{e.setTime(e.getTime()-e.getMilliseconds())},offset:e=>{e.setTime(e.getTime()+I)},field:e=>e.getUTCSeconds()},V={floor:e=>{e.setTime(e.getTime()-e.getMilliseconds()-e.getSeconds()*I)},offset:e=>{e.setTime(e.getTime()+L)},field:e=>e.getMinutes()},H={floor:e=>{e.setTime(e.getTime()-e.getMilliseconds()-e.getSeconds()*I-e.getMinutes()*L)},offset:e=>{e.setTime(e.getTime()+R)},field:e=>e.getHours()},ze={floor:e=>{e.setHours(0,0,0,0)},offset:e=>{e.setDate(e.getDate()+1)},field:e=>e.getDate()-1},Be={floor:e=>{e.setDate(e.getDate()-e.getDay()),e.setHours(0,0,0,0)},offset:e=>{e.setDate(e.getDate()+7)}},Ve={floor:e=>{e.setDate(1),e.setHours(0,0,0,0)},offset:e=>{e.setMonth(e.getMonth()+1)},field:e=>e.getMonth()},He=e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},U=(e,t)=>{let n=n=>e.field(n)%t===0;return{floor:t=>{if(!Number.isNaN(t.getTime()))for(e.floor(t);!n(t);)t.setTime(t.getTime()-1),e.floor(t)},offset:t=>{if(!Number.isNaN(t.getTime()))do e.offset(t);while(!n(t))}}},Ue=e=>({floor:t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),He(t)},offset:t=>{t.setFullYear(t.getFullYear()+e)}}),We=e=>({floor:t=>{t.setTime(Math.floor(t.getTime()/e)*e)},offset:t=>{t.setTime(t.getTime()+e)}}),Ge=(e,t)=>{let n=Math.floor(e);return Number.isFinite(n)&&n>0?t(n):null},Ke=[[I,B],[5*I,U(B,5)],[15*I,U(B,15)],[30*I,U(B,30)],[L,V],[5*L,U(V,5)],[15*L,U(V,15)],[30*L,U(V,30)],[R,H],[3*R,U(H,3)],[6*R,U(H,6)],[12*R,U(H,12)],[z,ze],[2*z,U(ze,2)],[6048e5,Be],[Le,Ve],[3*Le,U(Ve,3)],[Re,Ue(1)]],qe=(e,t,n)=>{let r=ke(e,t,n);return r<0?1/-r:r},Je=(e,t,n)=>{let r=(t-e)/n,i=Ke.findLast(([e])=>e<=r),a=Ke.find(([e])=>e>r);if(a==null)return Ge(qe(e/Re,t/Re,n),Ue);if(i==null)return Ge(Math.max(qe(e,t,n),1),We);let[o,s]=i,[c,l]=a;return r/o<c/r?s:l},Ye=(e,t,n)=>{let r=/* @__PURE__ */ new Date(t-1);e.floor(r),e.offset(r),e.floor(r);let i=[];if(!(r.getTime()<n))return i;let a;do a=r.getTime(),i.push(a),e.offset(r),e.floor(r);while(a<r.getTime()&&r.getTime()<n);return i},Xe=(e,t)=>{let n=new Date(e[0]).getTime(),r=new Date(e[1]).getTime(),i=r<n,a=i?r:n,o=i?n:r,s=Je(a,o,t);if(s==null)return[];let c=Ye(s,a,o+1);return i?c.toReversed():c},Ze=[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],Qe=[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],W=(e,t)=>e<0?`-${String(-e).padStart(t,`0`)}`:String(e).padStart(t,`0`),$e=e=>W(e.getHours()%12||12,2),G=(e,t)=>{let n=new Date(t);return e(n),n.getTime()<t.getTime()},et=e=>{let t=new Date(e);return G(B.floor,t)?`.${W(t.getMilliseconds(),3)}`:G(V.floor,t)?`:${W(t.getSeconds(),2)}`:G(H.floor,t)?`${$e(t)}:${W(t.getMinutes(),2)}`:G(ze.floor,t)?`${$e(t)} ${t.getHours()>=12?`PM`:`AM`}`:G(Ve.floor,t)?`${(G(Be.floor,t)?Qe[t.getDay()]:Ze[t.getMonth()]?.slice(0,3))??``} ${W(t.getDate(),2)}`:G(He,t)?Ze[t.getMonth()]??``:W(t.getFullYear()%1e4,4)},tt=(e,t,n,r)=>{r?e.lineTo(t,n):e.moveTo(t,n)},nt=(e,{indexes:t,from:n,to:r,xAt:i,yAt:a,joined:o})=>{let s=r<n?-1:1,c=0;for(let l=n;l!==r+s;l+=s){let n=t[l];n!=null&&(c===0?tt(e,i(n),a(n),o):e.lineTo(i(n),a(n)),c+=1)}return c},rt=(e,{indexes:t,from:n,to:r,xAt:i,yAt:a,joined:o})=>{let s=r<n?-1:1,c=0,l=NaN,u=NaN;for(let d=n;d!==r+s;d+=s){let n=t[d];if(n==null)continue;let r=i(n),s=a(n);if(c===0)tt(e,r,s,o);else{let t=l*.5+r*.5;e.lineTo(t,u),e.lineTo(t,s)}c+=1,l=r,u=s}return c>1&&e.lineTo(l,u),c},it=e=>e<0?-1:1,at=(e,t,n,r,i,a)=>{let o=n-e,s=i-n,c=(r-t)/(o||(s<0?-0:0)),l=(a-r)/(s||(o<0?-0:0)),u=(c*s+l*o)/(o+s);return(it(c)+it(l))*Math.min(Math.abs(c),Math.abs(l),.5*Math.abs(u))||0},ot=(e,t,n,r,i)=>{let a=n-e;return a?(3*(r-t)/a-i)/2:i},st=(e,t,n,r,i,a,o)=>{let s=(r-t)/3;e.bezierCurveTo(t+s,n+s*a,r-s,i-s*o,r,i)},ct=(e,{indexes:t,from:n,to:r,xAt:i,yAt:a,joined:o})=>{let s=r<n?-1:1,c=0,l=NaN,u=NaN,d=NaN,f=NaN,p=NaN;for(let m=n;m!==r+s;m+=s){let n=t[m];if(n==null)continue;let r=i(n),s=a(n);if(r!==d||s!==f){if(c===0)tt(e,r,s,o);else if(c>1){let t=at(l,u,d,f,r,s);st(e,l,u,d,f,c===2?ot(l,u,d,f,t):p,t),p=t}c+=1,l=d,u=f,d=r,f=s}}return c===2?e.lineTo(d,f):c>2&&st(e,l,u,d,f,p,ot(l,u,d,f,p)),c},lt=e=>e===`monotone`?ct:e===`step`?rt:nt,ut=(e,t,n)=>{let r=null;for(let i=0;i<=e.length;i++){let a=e[i];a!=null&&t(a)?r??=i:r!=null&&(n(r,i-1),r=null)}},dt=(e,t)=>{let{curve:n,indexes:r,xAt:i,yAt:a,definedAt:o}=t,s=lt(n);ut(r,o,(t,n)=>{s(e,{indexes:r,from:t,to:n,xAt:i,yAt:a,joined:!1})===1&&e.closePath()})},ft=(e,t)=>{let{curve:n,indexes:r,xAt:i,y0At:a,y1At:o,definedAt:s}=t,c=lt(n);ut(r,s,(t,n)=>{c(e,{indexes:r,from:t,to:n,xAt:i,yAt:o,joined:!1}),c(e,{indexes:r,from:n,to:t,xAt:i,yAt:a,joined:!0}),e.closePath()})},K=e=>Math.round(e)+.5,pt=(e,t)=>{let{plot:n,color:r,xLines:i,yLines:a}=t;e.save(),e.strokeStyle=r,e.lineWidth=1,mt(e,i,t=>{e.moveTo(K(t),n.top),e.lineTo(K(t),n.top+n.height)}),mt(e,a,t=>{e.moveTo(n.left,K(t)),e.lineTo(n.left+n.width,K(t))}),e.restore()},mt=(e,t,n)=>{let r=NaN;for(let i of t)i.alpha!==r&&(Number.isNaN(r)||e.stroke(),r=i.alpha,e.globalAlpha=r,e.beginPath()),n(i.position);Number.isNaN(r)||e.stroke()},ht=(e,t)=>{let{plot:n,color:r,y:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(n.left,K(i)),e.lineTo(n.left+n.width,K(i)),e.stroke()},gt=(e,t)=>{let{plot:n,color:r,x:i}=t;e.strokeStyle=r,e.lineWidth=1,e.beginPath(),e.moveTo(K(i),n.top),e.lineTo(K(i),n.top+n.height),e.stroke()},_t=e=>e.thickness>=e.radius*2?Math.min(e.radius,e.thickness/2,e.length):0,vt=(e,t)=>{let{fill:n,rects:r,count:i=r.length}=t;e.fillStyle=n,e.beginPath();for(let t=0;t<i;t++){let n=r[t];if(n==null)continue;let i=Math.max(.5,n.width),a=Math.min(n.valueY,n.baselineY),o=Math.abs(n.baselineY-n.valueY);if(o===0)continue;let s=n.rounded&&n.roundedBase?2:1,c=_t({radius:2,thickness:i,length:o/s}),l=n.rounded?c:0,u=n.roundedBase?c:0;l===0&&u===0?e.rect(n.x,a,i,o):n.valueY<=n.baselineY?e.roundRect(n.x,a,i,o,[l,l,u,u]):e.roundRect(n.x,a,i,o,[u,u,l,l])}e.fill()},yt=(e,t)=>{let{fill:n,rects:r,count:i=r.length}=t;e.fillStyle=n,e.beginPath();for(let t=0;t<i;t++){let n=r[t];if(n==null)continue;let i=Math.max(.5,n.height),a=Math.min(n.valueX,n.baselineX),o=Math.abs(n.valueX-n.baselineX);if(o===0)continue;let s=n.rounded&&n.roundedBase?2:1,c=_t({radius:2,thickness:i,length:o/s}),l=n.rounded?c:0,u=n.roundedBase?c:0;l===0&&u===0?e.rect(a,n.y,o,i):n.valueX>=n.baselineX?e.roundRect(a,n.y,o,i,[u,l,l,u]):e.roundRect(a,n.y,o,i,[l,u,u,l])}e.fill()},bt=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,yAt:o,definedAt:s}=t;e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),dt(e,{curve:r,indexes:i,xAt:a,yAt:o,definedAt:s}),e.stroke()},xt=(e,t)=>{let{color:n,curve:r,indexes:i,xAt:a,y0At:o,y1At:s,definedAt:c}=t;e.beginPath(),ft(e,{curve:r,indexes:i,xAt:a,y0At:o,y1At:s,definedAt:c}),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore(),e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath(),dt(e,{curve:r,indexes:i,xAt:a,yAt:s,definedAt:c}),e.stroke()},St=(e,t)=>{let{color:n,columns:r,columnToX:i,valueK:a,valueB:o}=t;e.strokeStyle=n,e.lineWidth=2,e.lineJoin=`round`,e.lineCap=`round`,e.beginPath();let s=!1;for(let t=0;t<r.columnCount;t++){if(r.hasData[t]===0){s=!1;continue}let n=i(t),c=(r.inValue[t]??0)*a+o,l=(r.minValue[t]??0)*a+o,u=(r.maxValue[t]??0)*a+o,d=(r.outValue[t]??0)*a+o;s?e.lineTo(n,c):(e.moveTo(n,c),s=!0),(l!==c||u!==c)&&(e.lineTo(n,l),e.lineTo(n,u)),d!==u&&e.lineTo(n,d)}e.stroke()},Ct=(e,t)=>{let{color:n,lowerColumns:r,upperColumns:i,columnToX:a,valueK:o,valueB:s}=t;e.beginPath();let c=-1,l=t=>{if(c<0)return;let n=!1;for(let r=c;r<=t;r++){let t=a(r),c=(i.maxValue[r]??0)*o+s;n?e.lineTo(t,c):(e.moveTo(t,c),n=!0)}for(let n=t;n>=c;n--){let t=a(n),i=(r.minValue[n]??0)*o+s;e.lineTo(t,i)}e.closePath(),c=-1};for(let e=0;e<i.columnCount;e++)i.hasData[e]===0?l(e-1):c<0&&(c=e);l(i.columnCount-1),e.save(),e.globalAlpha=.1,e.fillStyle=n,e.fill(),e.restore(),St(e,{color:n,columns:i,columnToX:a,valueK:o,valueB:s})},wt=(e,t,n,r,i)=>{let a=!1;for(let[o,s]of i)a?e.lineTo(t+o*r,n+s*r):(e.moveTo(t+o*r,n+s*r),a=!0);e.closePath()},Tt=[[-1/3,-1],[1/3,-1],[1/3,-1/3],[1,-1/3],[1,1/3],[1/3,1/3],[1/3,1],[-1/3,1],[-1/3,1/3],[-1,1/3],[-1,-1/3],[-1/3,-1/3]],Et=Tt.map(([e,t])=>[(e-t)/Math.SQRT2,(e+t)/Math.SQRT2]),Dt=Array.from({length:10},(e,t)=>{let n=-Math.PI/2+t*Math.PI/5,r=t%2==0?1:.382;return[Math.cos(n)*r,Math.sin(n)*r]}),Ot={circle:(e,t,n,r)=>{e.moveTo(t+r,n),e.arc(t,n,r,0,Math.PI*2)},square:(e,t,n,r)=>{let i=r*.886;e.moveTo(t-i,n-i),e.lineTo(t+i,n-i),e.lineTo(t+i,n+i),e.lineTo(t-i,n+i),e.closePath()},triangle:(e,t,n,r)=>{let i=r*1.55;e.moveTo(t,n-i),e.lineTo(t+i*.866,n+i*.5),e.lineTo(t-i*.866,n+i*.5),e.closePath()},diamond:(e,t,n,r)=>{let i=r*1.253;e.moveTo(t,n-i),e.lineTo(t+i,n),e.lineTo(t,n+i),e.lineTo(t-i,n),e.closePath()},"triangle-down":(e,t,n,r)=>{let i=r*1.55;e.moveTo(t,n+i),e.lineTo(t+i*.866,n-i*.5),e.lineTo(t-i*.866,n-i*.5),e.closePath()},plus:(e,t,n,r)=>{wt(e,t,n,r*1.189,Tt)},cross:(e,t,n,r)=>{wt(e,t,n,r*1.189,Et)},star:(e,t,n,r)=>{wt(e,t,n,r*1.673,Dt)}},kt=(e,t,n,r,i)=>{Ot[i](e,t,n,r)},At=(e,t)=>{let{color:n,surface:r,shape:i,indexes:a,xAt:o,yAt:s,definedAt:c}=t;e.fillStyle=n,e.strokeStyle=r,e.lineWidth=2,e.beginPath();for(let t of a)c(t)&&kt(e,o(t),s(t),4,i);e.fill(),e.stroke()},jt=(e,t)=>{let{plot:n,color:r,textColor:i,y:a,label:o,fontFamily:s}=t;e.strokeStyle=r,e.lineWidth=1,e.setLineDash([4,4]),e.beginPath(),e.moveTo(n.left,K(a)),e.lineTo(n.left+n.width,K(a)),e.stroke(),e.setLineDash([]),o!=null&&o.length>0&&(e.font=`11px ${s}`,e.fillStyle=i,e.textAlign=`right`,e.textBaseline=`bottom`,e.fillText(o,n.left+n.width-4,a-3))},Mt=(e,t)=>{let{plot:n,color:r,textColor:i,x:a,label:o,fontFamily:s}=t;if(e.strokeStyle=r,e.lineWidth=1,e.setLineDash([4,4]),e.beginPath(),e.moveTo(K(a),n.top),e.lineTo(K(a),n.top+n.height),e.stroke(),e.setLineDash([]),o!=null&&o.length>0){e.font=`11px ${s}`,e.fillStyle=i;let t=e.measureText(o).width,r=a+4+t<=n.left+n.width;e.textAlign=r?`left`:`right`,e.textBaseline=`top`,e.fillText(o,r?a+4:a-4,n.top+3)}},Nt=(e,t)=>{let{plot:n,color:r,fontFamily:i,xLabels:a,yLabels:o}=t;e.save(),e.font=`11px ${i}`,e.fillStyle=r,e.textAlign=`right`,e.textBaseline=`middle`;for(let t of o)e.globalAlpha=t.alpha,e.fillText(t.text,n.left-8,t.position);e.textAlign=`center`,e.textBaseline=`top`;for(let t of a)e.globalAlpha=t.alpha,e.fillText(t.text,t.position,n.top+n.height+8);e.restore()},Pt=e=>{let t=e.length,n=e[0]?.length??0,r=[],i=[];for(let e=0;e<t;e++)r.push(new Float64Array(n)),i.push(new Float64Array(n));let a=0,o=0,s=new Float64Array(n),c=new Float64Array(n),l=new Int32Array(n).fill(-1),u=new Int32Array(n).fill(-1);for(let d=0;d<t;d++){let t=e[d],f=r[d],p=i[d];if(t!=null&&f!=null&&p!=null)for(let e=0;e<n;e++){let n=t[e]??NaN;if(Number.isNaN(n))f[e]=NaN,p[e]=NaN;else if(n>=0){let t=s[e]??0,r=t+n;s[e]=r,f[e]=t,p[e]=r,r>o&&(o=r),n>0&&(l[e]=d)}else{let t=c[e]??0,r=t+n;c[e]=r,f[e]=r,p[e]=t,r<a&&(a=r),u[e]=d}}}return{lower:r,upper:i,min:a,max:o,positiveEnd:l,negativeEnd:u}},Ft=e=>`${e.colorInput}|${e.texture}`,It=1e3,Lt=[{minStep:6,gap:2},{minStep:3,gap:1}],Rt={lower:null,upper:/* @__PURE__ */ new Float64Array,progress:1},zt=1.12,Bt=/* @__PURE__ */ new Map([[`ArrowDown`,`ArrowRight`],[`ArrowUp`,`ArrowLeft`],[`PageDown`,`PageUp`],[`PageUp`,`PageDown`]]),Vt=/* @__PURE__ */ new Set([`ArrowLeft`,`PageDown`,`End`]),Ht=e=>{let t=Lt.find(t=>e>=t.minStep)?.gap??0;return e>0?t/e:0},Ut=({bandwidth:e,groupCount:t})=>e>=8*t?2:+(e>=3*t);var Wt=class{#e;#t;#n;#r;#i={xKey:``,xScale:`linear`,yDomain:[`auto`,`auto`],orientation:`vertical`,zKey:null,sizeKey:null,dimensions:3,stacked:!1,animate:!0};#a={onDatumActivate:null,onActiveIndexChange:null};#o;#s=null;#c=null;#l=null;#u=null;#d=null;#f;#p;#m=!1;#h;#g=!1;#_=0;#v=0;#y=1;#b=[];#x=0;#S=/* @__PURE__ */ new Float64Array;#C=[];#w=null;#T=null;#E=!1;#D=!1;#O=[];#k=/* @__PURE__ */ new Map;#A=0;#j=0;#M=!0;#N=!0;#P=null;#F=new f({speed:.16});#I=new f({speed:.2});#L=/* @__PURE__ */ new Map;#R=/* @__PURE__ */ new Map;#z=!1;#B=/* @__PURE__ */ new Map;#V=/* @__PURE__ */ new Map;#H=0;#U=null;#W=null;#G=/* @__PURE__ */ new Map;#K=!1;#q=/* @__PURE__ */ new Map;#J={alpha:0,target:0};#Y=-1/0;#X=!1;#Z=null;#Q=null;#$=null;#ee=null;#te={left:0,top:0,width:0,height:0};#ne=null;#re=/* @__PURE__ */ new Float64Array;#ie=[0,1];#ae=null;#oe;#se=null;#ce=!1;#le=[];#ue=[];#de=[];#fe=null;#pe=null;#me=null;#he=null;#ge=void 0;#_e=null;#ve=!1;#ye=null;#be=null;#xe={width:0,height:0};#Se=!1;#Ce=!1;#we=null;#Te=!1;constructor(e){this.#e=e.kind,this.#t=e.names,this.#n=e.elements,this.#oe=e.createHoverLayers??null,this.#r=e.store,this.#f=e.inView??!0,this.#p=e.onScreen??!0,this.#h=this.#f,e.size!=null&&(this.#_=e.size.width,this.#v=e.size.height),this.#y=this.#et(),this.#o=e.backend({root:e.elements.root,plot:e.elements.plot,slotName:e.slotName,onColorsChange:this.#De}),e.elements.plot.prepend(this.#o.element),this.#r.onSeriesChange=()=>{this.#D=!0,this.#Je()},this.#r.onPresentationChange=()=>{this.#ke(),this.#Je()},this.#s=re(e.elements.plot,e=>{let t=this.#et();(e.contentRect.width!==this.#_||e.contentRect.height!==this.#v||t!==this.#y)&&(this.#_=e.contentRect.width,this.#v=e.contentRect.height,this.#y=t,this.#pe=null,this.#Je())}),this.#f&&this.#Oe(),this.#u=ne(e.elements.root.ownerDocument,()=>{this.#G.clear(),this.#Ge()&&this.#Je()}),this.#d=e.elements.root.ownerDocument.defaultView;let n=this.#d;this.#c=n==null?null:w(n,this.#Ee),this.#e===`scatter`&&(t(e.scatter!=null,"A scatter ChartEngine needs a `scatter` view factory."),this.#ae=e.scatter({plot:()=>this.#te,colors:()=>this.#$,specs:()=>this.#r.seriesSpecs(),rowCount:()=>this.#x,xs:()=>this.#S,zs:()=>this.#re,columns:()=>this.#O,columnOf:e=>this.#_t(e),paintedValues:(e,t)=>this.#gt(e,`value`,t),definedIndexes:e=>this.#vt(e),reveal:e=>u(this.#bt(e)),shape:e=>this.#r.seriesShape(e),xCoefficients:()=>this.#at(),yCoefficients:()=>this.#rt(),domains:()=>{let e=this.#I.values(),t=this.#F.values();return{x:[e[0]??0,e[1]??1],y:[t[0]??0,t[1]??1],z:this.#ie}},xKey:()=>this.#i.xKey,zKey:()=>this.#i.zKey,sizeKey:()=>this.#i.sizeKey,is3d:()=>this.#He(),requestPaint:()=>this.#Je(),sourceRow:e=>this.#b[this.#At(e)],animates:()=>this.#h&&this.#Ie()>0,grid:()=>this.#r.getSnapshot().grid!=null,plotOffset:()=>({left:this.#n.plot.offsetLeft,top:this.#n.plot.offsetTop})}))}#Ee=()=>{this.#y=this.#et(),this.#Je()};#De=()=>{this.#$=null,this.#Je()};destroy(){this.#Te=!0,this.#s?.(),this.#c?.(),this.#l?.(),this.#o.destroy(),this.#o.element.remove(),this.#u?.(),this.#r.onSeriesChange=null,this.#r.onPresentationChange=null,this.#Q!=null&&(clearTimeout(this.#Q),this.#Q=null),this.#we?.(),this.#we=null,this.#se!=null&&(this.#se.crosshair.remove(),this.#se.band.remove(),this.#se.markers.remove(),this.#se=null)}setInView(e){e===this.#f||this.#Te||(this.#f=e,e&&(this.#Oe(),(this.#Ce||this.#D)&&this.#Xe()))}setOnScreen(e){e===this.#p||this.#Te||(this.#p=e,!e&&this.#Ce&&(this.#Ne(),this.#Je()))}markSeen(){if(this.#h||this.#Te)return;this.#h=!0;let e=performance.now(),t=this.#Le();for(let n of this.#R.values())n.retarget([1],{duration:t,now:e});this.#Je()}releaseBackingStores(){this.#Te||this.#o.kind===`svg`||(this.#o.release(),this.#Ce=!0)}commitNow(){this.#Te||(this.#we?.(),this.#we=null,this.#Se=!1,this.#Qe())}attachTooltip(e){this.#n.tooltip===e||this.#Te||(this.#l?.(),this.#l=null,this.#xe={width:0,height:0},this.#n.tooltip=e,e!=null&&this.#f&&this.#Oe(),this.#Ye())}paintForPrint(){if(!(this.#Te||this.#m)){if(this.#m=!0,this.#_===0||this.#v===0){let e=this.#n.plot.getBoundingClientRect();this.#_=e.width,this.#v=e.height}if(!this.#h){this.#h=!0;let e=performance.now();for(let t of this.#R.values())t.retarget([1],{duration:0,now:e})}this.flushIngest(),this.#Ne(),this.#Ce=!0,this.#Qe()}}afterPrint(){this.#Te||!this.#m||(this.#m=!1,this.#f||this.releaseBackingStores())}#Oe(){let e=this.#n.tooltip;e!=null&&this.#l==null&&(this.#l=re(e,()=>{this.#kt()!=null&&(this.#xe={width:e.offsetWidth,height:e.offsetHeight},this.#Ye())}))}setOptions(e){let t=this.#i;this.#i=e,t.xScale!==e.xScale&&this.#B.clear(),t.animate&&!e.animate&&this.#Ne(),t.dimensions!==e.dimensions&&this.#ae?.setDimensions?.(e.dimensions,{glide:this.#Ie()>0&&this.#z}),(t.xKey!==e.xKey||t.xScale!==e.xScale||t.zKey!==e.zKey||t.sizeKey!==e.sizeKey||t.stacked!==e.stacked)&&(this.#D=!0),(t.yDomain[0]!==e.yDomain[0]||t.yDomain[1]!==e.yDomain[1])&&(this.#pe=null,this.#ke()),this.#Je()}#ke(){this.#z&&(this.#Ie()===0?this.#F.jump(this.#Be()):this.#F.aim(this.#Be(),performance.now()))}setCallbacks(e){this.#a=e}setRows(e){e!==this.#b&&(this.#b=e,this.#D=!0,this.#Je())}flushIngest(){!this.#D||this.#Te||(this.#D=!1,this.#Pe())}setControlledActiveIndex(e){let t=this.#_e;this.#_e=null;let n=this.#ge!==void 0;if(this.#ge=e,e!==void 0){let n=t!=null&&t.index===e&&t.viaKeyboard;this.#Ft(e==null?null:this.#jt(e),{viaKeyboard:n,notify:!1})}else n&&this.#Ft(null,{viaKeyboard:!1,notify:!1});this.#Ye()}handlePointerMove(e,t){let n=this.#ae,r=n?.dragTo?.(e,t)??`none`;if(r!==`none`){r===`rotated`&&(this.#Ft(null,{viaKeyboard:!1,notify:!1}),this.#Je());return}if(this.#ye=e,this.#be=t,n!=null){let r=n.hitAt(e,t);this.#me=r?.seriesKey??null,this.#pe=r==null?null:{x:r.screenX,y:r.screenY},this.#Ft(r?.index??null,{viaKeyboard:!1,notify:!0});return}let i=this.#Nt(e,t);this.#Ft(i,{viaKeyboard:!1,notify:!0})}handlePointerDown(e,t){this.#ce=!0,this.#ae?.pressAt?.(e,t)!==!0&&this.handlePointerMove(e,t)}handlePointerUp(e,t,{activate:n=!0}={}){let r=this.#ae?.release?.()??`none`,i=this.#ce;this.#ce=!1,r!==`rotated`&&(r===`tap`&&this.handlePointerMove(e,t),i&&n&&this.handleActivate(e,t))}handlePointerLeave(){this.#ye=null,this.#be=null,this.#ae?.release?.(),this.#ce=!1,this.#me=null,this.#pe=null,this.#Ft(null,{viaKeyboard:!1,notify:!0})}handleActivate(e,t){let n=this.#Ae(e,t);if(n==null)return;let r=this.#At(n.index),i=this.#b[r];i!=null&&this.#a.onDatumActivate?.({index:r,xValue:this.#Mt(n.index),datum:i,dataKey:n.dataKey})}#Ae(e,t){if(e==null||t==null){let e=this.#kt();return e==null?null:{index:e,dataKey:this.#e===`scatter`?this.#me:null}}if(this.#ae!=null){let n=this.#ae.hitAt(e,t);return n==null?null:{index:n.index,dataKey:n.seriesKey}}let n=this.#Nt(e,t);return n==null?null:{index:n,dataKey:this.#Pt(n,e,t)}}handleKeyDown(e,{repeat:t=!1}={}){if(this.#x===0)return!1;let n=this.#x-1,r=this.#kt(),i=this.#K?Math.max(1,Math.floor(this.#x/Math.max(1,this.#te.width*this.#y))):1,a=Math.max(1,Math.floor(this.#x/10)),o=this.#Ke()?Bt.get(e)??e:e,s=(()=>{switch(o){case`ArrowLeft`:return Math.max(0,(r??this.#x)-i);case`ArrowRight`:return Math.min(n,(r??-1)+i);case`PageUp`:return Math.min(n,(r??0)+a);case`PageDown`:return Math.max(0,(r??n)-a);case`Home`:return 0;case`End`:return n;case`Escape`:return r==null?void 0:null;default:return}})();if(s===void 0)return e!==`Enter`&&e!==` `||r==null?!1:(t||this.handleActivate(null,null),!0);let c=s==null?null:this.#je(s,Vt.has(o)?-1:1);return s!=null&&c==null||(this.#ye=null,this.#be=null,this.#me=null,this.#pe=null,this.#Ft(c,{viaKeyboard:!0,notify:!0})),!0}#je(e,t){let n=this.#Me(e,t);if(n!=null)return n;let r=this.#Me(e,t===1?-1:1),i=this.#kt()??(t===1?-1:this.#x);return r!=null&&(r-i)*t>0?r:null}#Me(e,t){let n=this.#ae;for(let r=e;r>=0&&r<this.#x;r+=t)if(n?.plots?.(r)??!0)return r;return null}invalidateColors(){this.#$!=null&&(this.#$=null,this.#Je())}setColorScope(e,t){let n=this.#ee;(n==null||n.className!==e||n.style!==t)&&(this.#ee={className:e,style:t},this.invalidateColors())}#Ne(){this.#F.jump(this.#Be()),this.#I.jump(this.#Ve()),this.#ae?.settle(this.#i.dimensions);for(let e of this.#L.values())e.snap();for(let e of this.#R.values())e.snap();this.#J.alpha=this.#J.target}#Pe(){let e=this.#b,{xScale:t}=this.#i,n=this.#r.seriesSpecs();this.#q.clear();let r=this.#S,i=this.#C,a=be({rows:e,xKey:this.#i.xKey,xScale:t,specs:n,zKey:this.#e===`scatter`?this.#i.zKey:null,names:this.#t});this.#x=a.rowCount,this.#S=a.xs,this.#C=a.xValues,this.#w=a.order,this.#T=a.orderInverse,this.#N=a.xsAllIntegers,this.#E=a.xHasTimeOfDay;let o=this.#S[0],s=this.#S[this.#x-1],c=r[0],l=r[r.length-1];if(this.#Ue()&&(t===`linear`||t===`time`)&&o!=null&&s!=null&&c!=null&&l!=null&&o>c&&o<=l&&s>=l){this.#J.target=1;let e=performance.now(),t=e-this.#Y;this.#Z=t>2e3?null:this.#Z==null?t:this.#Z*.7+t*.3,this.#Y=e,this.#X=!0}else(o!==c||s!==l)&&(this.#J.target=0,this.#Z=null),this.#X=!1;let u=this.#x,d=t===`band`||t===`point`,f=r.length===u&&u<=2500;if(f){for(let e=0;e<u;e++)if(!(d?Gt(i[e],this.#C[e]):r[e]===this.#S[e])){f=!1;break}}let p=this.#k;this.#O=a.columns,this.#k=new Map(n.map((e,t)=>[e.dataKey,t])),this.#A=a.valueMin,this.#j=a.valueMax,this.#M=a.valuesAllIntegers,this.#re=a.zs,this.#ie=a.zExtent==null?[0,1]:F(a.zExtent,5),this.#ae?.resetProjection(),this.#pe=null,this.#P=this.#i.stacked?Pt(this.#O):null,this.#K=this.#e!==`scatter`&&oe({pointCount:u,columnCount:Math.max(1,Math.round(this.#te.width*this.#y)),wasDecimated:this.#K});let m=this.#$;if(m!=null){for(let e of this.#r.seriesMeta())if(m.inputs.get(e.dataKey)!==Ft(e)){this.#$=null;break}}this.#Fe(n,p,f);let h=this.#kt();h!=null&&this.#Ft(Math.min(h,Math.max(0,u-1)),{viaKeyboard:this.#ve,notify:!1}),this.#zt({force:!0})}#Fe(e,t,n){let r=performance.now(),i=this.#Ie(),a=!this.#z;this.#z=this.#z||this.#x>0,a||i===0?(this.#F.jump(this.#Be()),this.#I.jump(this.#Ve())):(this.#F.aim(this.#Be(),r),this.#e===`bar`||this.#lt()&&!this.#K?this.#I.jump(this.#Ve()):this.#X&&this.#Z!=null?this.#I.glide(this.#Ve(),{now:r,duration:this.#Z}):this.#I.aim(this.#Ve(),r));let o=this.#x>0&&this.#x<=2500&&n&&!this.#K,s=this.#x<=2500;if(this.#e===`bar`&&!n)for(let e of this.#R.values())e.snap();let c=/* @__PURE__ */ new Set,l=/* @__PURE__ */ new Set,u=(e,t,n)=>{c.add(e);let a=this.#L.get(e);a??(a=new d,this.#L.set(e,a));let s=o&&n&&a.values().length===t.length;a.retarget(t,{duration:s?i:0,now:r})};e.forEach((e,n)=>{l.add(e.dataKey);let i=t.has(e.dataKey);if(s&&this.#P!=null?(u(`${e.dataKey}:lower`,this.#P.lower[n]??/* @__PURE__ */ new Float64Array,i),u(`${e.dataKey}:upper`,this.#P.upper[n]??/* @__PURE__ */ new Float64Array,i)):s&&this.#ae?.kind!==`geo`&&u(e.dataKey,this.#O[n]??/* @__PURE__ */ new Float64Array,i),!this.#R.has(e.dataKey)&&this.#x>0){let t=new d({ease:e=>e}),n=this.#Re();t.retarget([0],{duration:0,now:r}),(this.#h||n===0)&&t.retarget([1],{duration:this.#h?this.#Le():0,now:r}),this.#R.set(e.dataKey,t)}});for(let e of this.#L.keys())c.has(e)||this.#L.delete(e);for(let e of this.#R.keys())l.has(e)||this.#R.delete(e)}#Ie(){return!this.#f||!this.#p?0:this.#Re()}#Le(){return this.#Ie()>0?600:0}#Re(){return!this.#i.animate||this.#ze()?0:280}#ze(){return this.#d!=null&&S(this.#d)}#Be(){if(this.#ae?.kind===`geo`)return[-90,90];let[e,t]=this.#i.yDomain,n,r;if(this.#P==null?this.#e===`line`||this.#e===`scatter`?(n=this.#A,r=this.#j):(n=Math.min(0,this.#A),r=Math.max(0,this.#j)):(n=Math.min(0,this.#P.min),r=Math.max(0,this.#P.max)),typeof e==`number`&&(n=e),typeof t==`number`&&(r=t),this.#x===0)return[0,1];if(this.#e===`bar`&&!this.#We())return[typeof e==`number`?e:n*zt,typeof t==`number`?t:r*zt||(n<0?0:1)];let i=this.#e===`bar`||this.#e===`area`?Ie([n,r],5):F([n,r],5);return[typeof e==`number`?e:i[0],typeof t==`number`?t:i[1]]}#Ve(){if(this.#ae?.kind===`geo`)return[-180,180];if(this.#x===0)return[0,1];let e=this.#S[0]??0,t=this.#S[this.#x-1]??0;return e===t?[e-.5,t+.5]:this.#e===`scatter`?F([e,t],5):[e,t]}#He(){return this.#e===`scatter`&&this.#i.zKey!=null}#Ue(){return!this.#He()&&this.#ae?.kind!==`geo`}#We(){let e=this.#r.getSnapshot();return e.xAxis!=null||e.yAxis!=null||e.grid!=null}#Ge(){return this.#We()||this.#He()||this.#r.getSnapshot().referenceLines.some(e=>e.label!=null&&e.label.length>0)}#Ke(){return this.#e===`bar`&&this.#i.orientation===`horizontal`}#qe(e,t){let n=this.#G.get(t);return n??(this.#G.size>=512&&this.#G.clear(),n=e.measureText(t).width,this.#G.set(t,n)),n}#Je(){this.#Ce=!0,this.#g=!0,this.#Xe()}#Ye(){this.#Xe()}#Xe(){let e=this.#d;this.#Se||this.#Te||e==null||(this.#Se=!0,this.#we=ae(e,this.#Ze))}#Ze=()=>{this.#Se=!1,this.#we=null,this.#Qe()};#Qe(){if(!this.#Te){if(this.flushIngest(),this.#Ce&&!this.#f&&!this.#m)this.#g&&(this.#g=!1,this.#nt());else if(this.#Ce){this.#Ce=!1,this.#g=!1;let e=performance.now(),t=!1,n=this.#Ke()?this.#te.width:this.#te.height;t=this.#F.tick(e,this.#$e(this.#F,n))||t,t=this.#I.tick(e,this.#$e(this.#I,this.#te.width))||t;for(let n of this.#L.values())t=n.tick(e)||t;for(let n of this.#R.values())t=n.tick(e)||t;t=(this.#ae?.tick(e)??!1)||t,this.#_>0&&this.#v>0&&this.#tt(),this.#nt(),t=this.#ft(e)||t,t&&this.#Je()}this.#Bt()}}#$e(e,t){let n=e.values(),r=Math.abs((n[1]??0)-(n[0]??0));return t>0&&Number.isFinite(r)?r*.5/(t*this.#y):0}#et(){return typeof devicePixelRatio==`number`&&devicePixelRatio>0?Math.min(devicePixelRatio,3):1}#tt(){let e=this.#o.paintSignature({devicePixelRatio:this.#y,orientation:this.#i.orientation});if(this.#$?.signature===e)return;let t=this.#o.resolvePaint({series:this.#r.seriesMeta(),devicePixelRatio:this.#y,orientation:this.#i.orientation,signature:e});t!=null&&(this.#G.clear(),this.#$=t)}#nt(){let e=this.#r.getSnapshot(),t=!this.#Ue(),n=this.#Ke(),r=!t&&e.xAxis!=null,i=!t&&e.yAxis!=null,a=n?r:i,o=n?i:r,s=this.#e===`bar`&&!this.#We()||this.#ae?.kind===`geo`?0:8,c=s,l=o?24:s,u=Math.max(0,this.#v-c-l);this.#te={left:s,top:c,width:Math.max(0,this.#_-s*2),height:u};let d=s;if(a){d=40;let e=this.#$==null?null:this.#o.measureContext();if(e!=null&&this.#$!=null){e.font=`11px ${this.#$.fontFamily()}`;let t=0,r=n?this.#ct().map(e=>e.text):this.#st().map(e=>e.text);for(let n of r){let r=this.#qe(e,n);r>t&&(t=r)}d=Math.ceil(t)+14}}this.#te={left:d,top:c,width:Math.max(0,this.#_-d-s),height:u};let f=n?this.#te.top:this.#te.left,p=n?this.#te.top+this.#te.height:this.#te.left+this.#te.width;if(this.#i.xScale===`band`){let e=Ht((p-f)/Math.max(1,this.#x));this.#ne=je({count:this.#x,rangeStart:f,rangeEnd:p,paddingInner:e,paddingOuter:e/2})}else this.#ne=this.#i.xScale===`point`?je({count:this.#x,rangeStart:f,rangeEnd:p,paddingInner:1,paddingOuter:.5}):null;this.#K=this.#e!==`scatter`&&oe({pointCount:this.#x,columnCount:Math.max(1,Math.round(this.#te.width*this.#y)),wasDecimated:this.#K})}#rt(){let e=this.#F.values();return Ae([e[0]??0,e[1]??1],[this.#te.top+this.#te.height,this.#te.top])}#it(){let e=this.#F.values(),t=this.#Ke()?[this.#te.left,this.#te.left+this.#te.width]:[this.#te.top+this.#te.height,this.#te.top];return Ae([e[0]??0,e[1]??1],t)}#at(){let e=this.#I.values();return Ae([e[0]??0,e[1]??1],[this.#te.left,this.#te.left+this.#te.width])}#ot(e){let t=this.#ne;if(t!=null)return P(t,e);let{k:n,b:r}=this.#at();return(this.#S[e]??0)*n+r}#st(){let e=this.#r.getSnapshot(),t=this.#F.values(),n=e.yAxis?.tickCount,r=this.#Ke()?1/0:Math.max(2,Math.floor(this.#te.height/28)),i=Math.min(n??1/0,r),a=n??5,o=e.yAxis?.tickFormat,s=`${t[0]}|${t[1]}|${i}|${a}|${this.#M}`,c=this.#U;if(c!=null&&c.key===s&&c.format===o)return c.ticks;let l=Fe([t[0]??0,t[1]??1],i,{count:a,integer:this.#M}),u=l.length>1?Math.abs((l[1]??0)-(l[0]??0)):0,d=Math.abs((t[1]??1)-(t[0]??0)),f=l.length>1?u:d,p=f>0?pe(f):void 0,m=l.map(e=>{let t=k(e,p==null?void 0:{maximumFractionDigits:p});return{value:e,text:o==null?t:o(e,{defaultLabel:t,step:u})}});return this.#U={key:s,format:o,ticks:m},m}#ct(){let e=this.#r.getSnapshot().xAxis?.tickFormat,t=this.#ut(),n=this.#W;if(n!=null&&n.key===t&&n.format===e&&n.xValues===this.#C)return n.ticks;let r=this.#dt();return this.#W={key:t,format:e,xValues:this.#C,ticks:r},r}#lt(){let{xScale:e}=this.#i;return e===`band`||e===`point`}#ut(){if(this.#lt()){let e=this.#Ke();return`band|${e}|${e?this.#te.height:this.#te.width}|${this.#x}|${this.#E}`}let e=this.#I.values(),t=this.#r.getSnapshot().xAxis?.tickCount;return`${this.#i.xScale}|${e[0]}|${e[1]}|${t}|${this.#te.width}|${this.#N}`}#dt(){let e=this.#r.getSnapshot(),t=e.xAxis?.tickFormat;if(this.#lt()){let e=this.#Ke(),n=e?this.#te.height:this.#te.width,r=Math.max(1,Math.floor(n/(e?15:60))),i=Math.max(1,Math.ceil(this.#x/r)),a=[];for(let e=0;e<this.#x;e+=i){let n=this.#C[e]??``,r=j(n,{datasetHasTimeOfDay:this.#E});a.push({index:e,value:e,text:t==null?r:t(n,{defaultLabel:r})})}return a}let n=this.#I.values(),r=[n[0]??0,n[1]??1],i=e.xAxis?.tickCount??Math.max(2,Math.floor(this.#te.width/90));if(this.#i.xScale===`time`)return Xe(r,i).map(e=>{let n=et(e);return{index:null,value:e,text:t==null?n:t(new Date(e),{defaultLabel:n})}});let a=Pe(r,i,{integer:this.#N}),o=a.length>1?pe(Math.abs((a[1]??0)-(a[0]??0))):void 0;return a.map(e=>{let n=k(e,o==null?void 0:{maximumFractionDigits:o});return{index:null,value:e,text:t==null?n:t(e,{defaultLabel:n})}})}#ft(e){let t=this.#$;if(t==null||this.#_<=0||this.#v<=0)return!1;let n=this.#o.begin({cssWidth:this.#_,cssHeight:this.#v,devicePixelRatio:this.#y});if(n==null)return!1;let r=this.#pt(n,t,e);return this.#o.end(),r}#pt(e,t,n){let r=Math.min(50,Math.max(0,n-this.#H));this.#H=n;let i=this.#r.getSnapshot(),a=this.#te;if(a.width<=0||a.height<=0)return!1;let o=this.#rt(),s=this.#at(),c=this.#r.seriesSpecs(),l=!this.#Ue(),u=this.#m||this.#Ie()===0,d=this.#We(),f=l||!d?[]:this.#mt(e,t.fontFamily()),p=l||!d?[]:this.#ht(e,t.fontFamily()),m=Kt(this.#B,f,r,u);m=Kt(this.#V,p,r,u)||m;let h=this.#J;if(h.target===1){if(n-this.#Y>It)h.target=0;else if(this.#Q==null){let e=It-(n-this.#Y)+17;this.#Q=setTimeout(()=>{this.#Q=null,this.#Je()},e)}}if(u)h.alpha=h.target;else{let e=1-(1-(h.target>h.alpha?.16:.08))**(r/16.67);h.alpha+=(h.target-h.alpha)*e,Math.abs(h.target-h.alpha)<.02&&(h.alpha=h.target)}h.alpha!==h.target&&(m=!0);let g=this.#Ke(),_=g?this.#it():o,v=e=>this.#ne==null?e*s.k+s.b:P(this.#ne,e),y=e=>e*_.k+_.b,b=[...this.#B.entries()].map(([e,t])=>({position:v(e),alpha:t.alpha})),x=[...this.#V.entries()].map(([e,t])=>({position:y(e),alpha:t.alpha})),S=()=>{if(i.grid==null||l)return;let n=i.grid.lines??(g?`vertical`:`horizontal`),r=g?b:x,o=g?x:b;pt(e,{plot:a,color:t.chrome.grid,xLines:n===`horizontal`?[]:o,yLines:n===`vertical`?[]:r})},C=Math.min(40,a.width*.25),ee=h.alpha>.01&&C>1,w={labels:null};this.#o.composite(e,{underlay:S,marks:()=>{e.save(),e.beginPath(),e.rect(a.left,a.top,a.width,a.height+1),e.clip(),this.#e===`bar`?g?this.#Tt(e,c):this.#wt(e,c,o):this.#e===`scatter`?w.labels=this.#ae?.paint(e)??null:this.#Et(e,c,o),e.restore()},fade:ee?{left:a.left,top:a.top,width:C,height:a.height+1,alpha:h.alpha}:null}),w.labels!=null&&this.#ae?.paintLabels?.(e,w.labels),this.#e===`bar`&&this.#x>0&&this.#We()&&(g?gt(e,{plot:a,color:t.chrome.baseline,x:y(0)}):ht(e,{plot:a,color:t.chrome.baseline,y:y(0)}));for(let n of l?[]:i.referenceLines){let r=y(n.y);if(g?r<a.left||r>a.left+a.width:r<a.top||r>a.top+a.height)continue;let i=n.color==null?t.chrome.reference:t.resolve(n.color);g?Mt(e,{plot:a,color:i,textColor:t.chrome.tickText,x:r,label:n.label,fontFamily:t.fontFamily()}):jt(e,{plot:a,color:i,textColor:t.chrome.tickText,y:r,label:n.label,fontFamily:t.fontFamily()})}let T=i.xAxis==null||l?[]:[...this.#B.entries()].map(([e,t])=>({position:v(e),text:t.text,alpha:t.alpha})),te=i.yAxis==null||l?[]:[...this.#V.entries()].map(([e,t])=>({position:y(e),text:t.text,alpha:t.alpha})),E=g?te:T,ne=g?T:te;return(E.length>0||ne.length>0)&&Nt(e,{plot:a,color:t.chrome.tickText,fontFamily:t.fontFamily(),xLabels:E,yLabels:ne}),m}#mt(e,t){e.font=`11px ${t}`;let n=this.#Ke(),r=this.#at(),i=[],a=-1/0;for(let t of this.#ct()){let o=t.index!=null&&this.#ne!=null,s=o&&this.#ne!=null?P(this.#ne,t.index??0):t.value*r.k+r.b,c=n?15/2:this.#qe(e,t.text)/2,l=n?2:8;s-c<a+l||(a=s+c,i.push({key:o?t.index??0:t.value,text:t.text}))}return i}#ht(e,t){let n=this.#st(),r=this.#it();if(!this.#Ke()){let e=[],t=NaN;for(let i of n){let n=i.value*r.k+r.b;Math.abs(n-t)<13||(t=n,e.push({key:i.value,text:i.text}))}return e}e.font=`11px ${t}`;let i=[],a=-1/0;for(let t of n){let n=t.value*r.k+r.b,o=this.#qe(e,t.text)/2;n-o<a+8||(a=n+o,i.push({key:t.value,text:t.text}))}return i}#gt(e,t,n){let r=t===`value`?e.dataKey:`${e.dataKey}:${t}`;if(!this.#K&&this.#x<=2500){let e=this.#L.get(r);if(e!=null&&e.values().length===this.#x)return e.values()}return t===`value`?this.#O[n]??/* @__PURE__ */ new Float64Array:(t===`lower`?this.#P?.lower:this.#P?.upper)?.[n]??/* @__PURE__ */ new Float64Array}#_t(e){let t=this.#k.get(e);return t==null?void 0:this.#O[t]}#vt(e){let t=[];for(let n=0;n<this.#x;n++)Number.isNaN(e[n]??NaN)||t.push(n);return t}#yt(e){return this.#de.length!==e&&(this.#de=Array.from({length:e},(e,t)=>t)),this.#de}#bt(e){return this.#R.get(e)?.values()[0]??1}#xt(e){let t=e.map(e=>this.#bt(e.dataKey));if(this.#P==null)return e.map((e,n)=>({lower:null,upper:this.#gt(e,`value`,n),progress:t[n]??1}));let n=e.map((e,t)=>this.#gt(e,`lower`,t)),r=e.map((e,t)=>this.#gt(e,`upper`,t));if(t.every(e=>e>=1))return e.map((e,t)=>({lower:n[t]??null,upper:r[t]??/* @__PURE__ */ new Float64Array,progress:1}));let i=this.#x,a=b({lower:n,upper:r,reveal:(e,n)=>y({progress:t[e]??1,index:n,count:i}),count:i});return e.map((e,t)=>({lower:a.lower[t]??null,upper:a.upper[t]??/* @__PURE__ */ new Float64Array,progress:1}))}#St(e,t){if(e==null)return 0;let n=e[t]??0;return Number.isNaN(n)?0:n}#Ct(e,t,n){let r=this.#P;if(r==null)return!0;let i=r.lower[e]?.[t]??NaN,a=r.upper[e]?.[t]??NaN;if(Number.isNaN(i)||Number.isNaN(a))return!1;let o=i<0,s=(o?r.negativeEnd:r.positiveEnd)[t]??-1;if(s<0)return!1;let c=(o?r.lower:r.upper)[s]?.[t]??NaN;return _({lower:i,upper:a,pileOuter:c,toPixel:n})}#wt(e,t,n){let r=this.#ne,i=this.#$;if(r==null||i==null||this.#x===0||t.length===0)return;let a=this.#P!=null,o=a?1:t.length,s=Ut({bandwidth:r.bandwidth,groupCount:o}),c=(r.bandwidth-s*(o-1))/o,l=p({step:r.step,slot:c}),u=e=>e*n.k+n.b,d=+!!a,f=this.#le,m=this.#xt(t);t.forEach((t,n)=>{let{lower:p,upper:h,progress:_}=m[n]??Rt,b=0;for(let e=0;e<this.#x;e++){let t=h[e]??NaN;if(Number.isNaN(t))continue;let i=this.#St(p,e),m=a?N(r,e)+(r.bandwidth-l)/2:N(r,e)+(r.bandwidth-(c*o+s*(o-1)))/2+n*(c+s)+(c-l)/2,x=g({lower:i,upper:t,toPixel:u,reveal:y({progress:_,index:e,count:this.#x}),gap:d}),S=f[b]??Zt();f[b]=S,b+=1,S.x=m,S.width=l,S.baselineY=x.baseline,S.valueY=x.value,S.rounded=this.#Ct(n,e,u),S.roundedBase=v({baseline:x.baseline,toPixel:u})}vt(e,{fill:i.barFills.get(t.dataKey)??i.series.get(t.dataKey)??`currentColor`,rects:f,count:b})})}#Tt(e,t){let n=this.#ne,r=this.#$;if(n==null||r==null||this.#x===0||t.length===0)return;let i=this.#it(),a=this.#P!=null,o=a?1:t.length,s=Ut({bandwidth:n.bandwidth,groupCount:o}),c=(n.bandwidth-s*(o-1))/o,l=p({step:n.step,slot:c}),u=e=>e*i.k+i.b,d=+!!a,f=this.#ue,m=this.#xt(t);t.forEach((t,i)=>{let{lower:p,upper:h,progress:_}=m[i]??Rt,b=0;for(let e=0;e<this.#x;e++){let t=h[e]??NaN;if(Number.isNaN(t))continue;let r=this.#St(p,e),m=a?N(n,e)+(n.bandwidth-l)/2:N(n,e)+(n.bandwidth-(c*o+s*(o-1)))/2+i*(c+s)+(c-l)/2,x=g({lower:r,upper:t,toPixel:u,reveal:y({progress:_,index:e,count:this.#x}),gap:d}),S=f[b]??Qt();f[b]=S,b+=1,S.y=m,S.height=l,S.baselineX=x.baseline,S.valueX=x.value,S.rounded=this.#Ct(i,e,u),S.roundedBase=v({baseline:x.baseline,toPixel:u})}yt(e,{fill:r.barFills.get(t.dataKey)??r.series.get(t.dataKey)??`currentColor`,rects:f,count:b})})}#Et(e,t,n){let r=this.#$;if(r==null||this.#x===0)return;let i=this.#at(),a=this.#ne,o=e=>a==null?(this.#S[e]??0)*i.k+i.b:P(a,e);t.forEach((t,i)=>{let a=r.series.get(t.dataKey)??`currentColor`,s=u(this.#bt(t.dataKey));if(e.save(),s<1&&(e.beginPath(),e.rect(this.#te.left,0,this.#te.width*s,this.#v),e.clip()),this.#K){this.#Dt(e,t,i,a,n),e.restore();return}let c=t.mark===`area`,l=this.#gt(t,this.#P==null?`value`:`upper`,i),d=this.#P==null?null:this.#gt(t,`lower`,i),f=e=>!Number.isNaN(l[e]??NaN),p=t.connectNulls?this.#vt(l):this.#yt(this.#x),m=e=>(l[e]??0)*n.k+n.b;if(c){let r=d==null?()=>0*n.k+n.b:e=>(d[e]??0)*n.k+n.b;xt(e,{color:a,curve:t.curve,indexes:p,xAt:o,y0At:r,y1At:m,definedAt:f})}else bt(e,{color:a,curve:t.curve,indexes:p,xAt:o,yAt:m,definedAt:f}),t.markers&&this.#te.width/this.#x>=12&&At(e,{color:a,surface:r.chrome.surface,shape:t.shape,indexes:p,xAt:o,yAt:m,definedAt:f});e.restore()})}#Dt(e,t,n,r,i){let a=Math.max(1,Math.round(this.#te.width*this.#y)),o=e=>this.#te.left+(e+.5)/this.#y;if(t.mark===`area`){let s=this.#Ot(`${t.dataKey}:upper`,this.#gt(t,this.#P==null?`value`:`upper`,n),a),c=this.#P==null?null:this.#Ot(`${t.dataKey}:lower`,this.#gt(t,`lower`,n),a);if(c==null){let t=this.#fe;t?.columnCount!==a&&(t=$t(a),this.#fe=t),Ct(e,{color:r,lowerColumns:t,upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b})}else Ct(e,{color:r,lowerColumns:c,upperColumns:s,columnToX:o,valueK:i.k,valueB:i.b});return}let s=this.#Ot(t.dataKey,this.#gt(t,`value`,n),a);St(e,{color:r,columns:s,columnToX:o,valueK:i.k,valueB:i.b})}#Ot(e,t,n){let r=this.#I.values(),i=`${r[0]??0}:${r[1]??1}:${n}`,a=this.#q.get(e);if(a!=null&&a.key===i)return a.columns;let o=[r[0]??0,r[1]??1],s=Ae(o,[0,n]),c=se({xs:this.#S,values:t,startIndex:0,endIndex:this.#x-1,positionK:s.k,positionB:s.b,columnCount:n});return this.#q.set(e,{key:i,columns:c}),c}#kt(){if(this.#x===0)return null;let e;return e=this.#ge===void 0?this.#he:this.#ge==null?null:this.#jt(this.#ge),e==null?null:Math.min(Math.max(0,e),this.#x-1)}#At(e){return this.#w==null?e:this.#w[e]??e}#jt(e){if(this.#b.length===0)return null;let t=Math.min(Math.max(0,e),this.#b.length-1);if(this.#T==null)return t;let n=this.#T[t]??-1;return n===-1?null:n}#Mt(e){if(e<0||e>=this.#x)return``;let{xScale:t}=this.#i;if(t===`band`||t===`point`)return this.#C[e]??``;let n=this.#S[e]??0;return t===`time`?new Date(n):n}#Nt(e,t){if(this.#x===0)return null;let n=this.#ne;if(n!=null)return Ne(n,this.#Ke()?t:e);let{k:r,b:i}=this.#at();if(r===0)return 0;let a=e;if(this.#K){let t=Math.floor((e-this.#te.left)*this.#y);a=this.#te.left+(t+.5)/this.#y}return xe(this.#S,this.#x,(a-i)/r)}#Pt(e,t,n){let r=this.#r.seriesSpecs(),i=this.#Ke(),a=this.#ne;if(this.#e===`bar`&&this.#P==null&&a!=null&&r.length>1){let o=(i?n:t)-N(a,e),s=Math.floor(o/Math.max(1,a.bandwidth)*r.length);return r[Math.min(r.length-1,Math.max(0,s))]?.dataKey??null}let{k:o,b:s}=i?this.#it():this.#rt(),c=i?t:n,l=this.#P;if(this.#e===`bar`&&l!=null)for(let t=0;t<r.length;t++){let n=l.lower[t]?.[e]??NaN,i=l.upper[t]?.[e]??NaN;if(Number.isNaN(n)||Number.isNaN(i)||n===i)continue;let a=n*o+s,u=i*o+s;if(c>=Math.min(a,u)&&c<=Math.max(a,u))return r[t]?.dataKey??null}let u=null,d=1/0;return r.forEach((t,n)=>{let r=(this.#P==null?this.#_t(t.dataKey):this.#P.upper[n])?.[e]??NaN;if(Number.isNaN(r))return;let i=Math.abs(r*o+s-c);i<d&&(d=i,u=t.dataKey)}),u}#Ft(e,t){let n=e==null||this.#x===0?null:Math.min(Math.max(0,e),this.#x-1),r=this.#ge!==void 0;if(t.notify&&n!==this.#kt()){let e=n==null?null:this.#At(n);if(this.#a.onActiveIndexChange?.(e),r){this.#_e={index:e,viaKeyboard:t.viaKeyboard};return}}this.#ve=t.viaKeyboard,r||(this.#he=n),this.#zt(),this.#Ye()}#It=null;#Lt=!1;#Rt=null;#zt(e={force:!1}){let t=this.#kt();if(!e.force&&t===this.#It&&this.#ve===this.#Lt&&this.#me===this.#Rt)return;if(this.#It=t,this.#Lt=this.#ve,this.#Rt=this.#me,t==null||this.#x===0){this.#r.publishHover(null);return}let n=this.#At(t),r=this.#b[n]??{},i=this.#r.getSnapshot().series.map(e=>{let n=this.#_t(e.dataKey)?.[t]??NaN;return{dataKey:e.dataKey,label:e.label,value:Number.isNaN(n)?null:n,color:e.color}});this.#i.stacked&&i.reverse(),this.#e===`scatter`&&(i=this.#me==null?i.filter(e=>e.value!=null):i.filter(e=>e.dataKey===this.#me));let a={index:n,xValue:this.#Mt(t),datum:r,points:i,viaKeyboard:this.#ve};if(this.#i.stacked&&i.length>1&&(a.total=i.reduce((e,t)=>e+(t.value??0),0)),this.#He()){let e=this.#re[t]??NaN;a.zValue=Number.isNaN(e)?null:e}this.#r.publishHover(a)}#Bt(){let e=this.#kt(),t=e!=null&&this.#x>0,n=this.#se??(t?this.#Vt():null);if(n==null)return;let{tooltip:r}=this.#n,{crosshair:i,band:a,markers:o}=n,s=this.#e===`bar`,c=this.#e===`scatter`;if(i.style.opacity=t&&!s&&!c?`1`:`0`,a.style.opacity=t&&s?`1`:`0`,o.style.opacity=t&&!s?`1`:`0`,r!=null&&(r.style.opacity=t?`1`:`0`),!t)return;let l=this.#te;if(c){let t=(this.#ae?.kind===`geo`?null:this.#pe)??this.#ae?.screenFor(e,this.#me)??null;if(t==null){o.style.opacity=`0`,r!=null&&(r.style.opacity=`0`);return}for(;o.children.length>1;)o.lastElementChild?.remove();o.children.length===0&&o.appendChild(Jt(o.ownerDocument));let n=this.#ae?.radiusAt?.(e)??4,i=o.children[0];if(i instanceof HTMLElement){let r=this.#r.getSnapshot().series,a=this.#me==null?r.find(t=>{let n=this.#_t(t.dataKey)?.[e]??NaN;return!Number.isNaN(n)}):r.find(e=>e.dataKey===this.#me);i.style.opacity=`1`,Xt(i,a?.shape??`circle`,a?.color??`currentColor`);let o=`${2*(n+2)}px`;i.style.width!==o&&(i.style.width=o,i.style.height=o,i.style.left=`calc(${o} / -2)`,i.style.top=`calc(${o} / -2)`),i.style.transform=`translate(${t.x}px, ${t.y}px)`}this.#Ht(t.x,t.y,Math.max(12,n+8));return}let u=this.#ot(e),d=this.#Ke();if(s){let t=this.#ne;if(t!=null){let n=Me(t,e),r=Math.max(1,n.size),i=n.start-(r-n.size)/2;d?(a.style.transform=`translate(${l.left}px, ${i}px)`,a.style.width=`${l.width}px`,a.style.height=`${r}px`):(a.style.transform=`translate(${i}px, ${l.top}px)`,a.style.width=`${r}px`,a.style.height=`${l.height}px`)}}else{i.style.transform=`translate(${u}px, ${l.top}px)`,i.style.height=`${l.height}px`;let t=this.#r.getSnapshot().series;for(;o.children.length>t.length;)o.lastElementChild?.remove();for(;o.children.length<t.length;)o.appendChild(Jt(o.ownerDocument));let n=this.#rt();t.forEach((t,r)=>{let i=o.children[r];if(!(i instanceof HTMLElement))return;let a=this.#_t(t.dataKey)?.[e]??NaN,s=this.#gt(t,this.#P==null?`value`:`upper`,r)[e]??NaN;Number.isNaN(a)||Number.isNaN(s)?i.style.opacity=`0`:(i.style.opacity=`1`,Xt(i,t.shape,t.color),i.style.transform=`translate(${u}px, ${s*n.k+n.b}px)`)})}s&&d&&this.#ne!=null?this.#Ht(this.#ye??l.left+l.width/2,P(this.#ne,e)):this.#Ht(u,this.#be??l.top+8)}#Vt(){if(this.#oe==null)return null;let e=this.#oe();return this.#n.plot.append(e.crosshair,e.band,e.markers),this.#se=e,e}#Ht(e,t,n=12){let r=this.#te,i=this.#n.tooltip;if(i==null)return;this.#f&&this.#xe.width===0&&this.#xe.height===0&&(this.#xe={width:i.offsetWidth,height:i.offsetHeight});let a=this.#xe,o=e+n;o+a.width>r.left+r.width&&e-n-a.width>=r.left&&(o=e-n-a.width),o=Math.max(0,Math.min(o,r.left+r.width-a.width));let s=Math.max(0,Math.min(t-a.height/2,r.top+r.height-a.height));i.style.transform=`translate(${o}px, ${s}px)`}};const Gt=(e,t)=>e instanceof Date&&t instanceof Date?Object.is(e.getTime(),t.getTime()):Object.is(e,t),Kt=(e,t,n,r)=>{for(let t of e.values())t.target=0;for(let n of t){let t=e.get(n.key);t==null?e.set(n.key,{alpha:+!!r,target:1,text:n.text}):(t.target=1,t.text=n.text)}let i=1-.84**(n/16.67),a=1-.88**(n/16.67),o=!1;for(let[t,n]of e){if(r)n.alpha=n.target;else{let e=n.target>n.alpha?i:a;n.alpha+=(n.target-n.alpha)*e}n.target===1&&n.alpha>.98&&(n.alpha=1),n.target===0&&n.alpha<.03?e.delete(t):n.alpha!==n.target&&(o=!0)}return o},qt={circle:`circle(50%)`,square:`inset(8%)`,triangle:`polygon(50% 0%, 100% 100%, 0% 100%)`,diamond:`polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%)`,"triangle-down":`polygon(0% 0%, 100% 0%, 50% 100%)`,plus:`polygon(33.33% 0%, 66.67% 0%, 66.67% 33.33%, 100% 33.33%, 100% 66.67%, 66.67% 66.67%, 66.67% 100%, 33.33% 100%, 33.33% 66.67%, 0% 66.67%, 0% 33.33%, 33.33% 33.33%)`,cross:`polygon(73.57% 2.86%, 97.14% 26.43%, 73.57% 50%, 97.14% 73.57%, 73.57% 97.14%, 50% 73.57%, 26.43% 97.14%, 2.86% 73.57%, 26.43% 50%, 2.86% 26.43%, 26.43% 2.86%, 50% 26.43%)`,star:`polygon(50% 2.45%, 61.8% 38.77%, 100% 38.77%, 69.1% 61.23%, 80.9% 97.55%, 50% 75.1%, 19.1% 97.55%, 30.9% 61.23%, 0% 38.77%, 38.2% 38.77%)`},Jt=e=>{let t=e.createElement(`div`);t.setAttribute(`data-slot`,`chart-active-point`),t.style.position=`absolute`,t.style.width=`12px`,t.style.height=`12px`,t.style.left=`-6px`,t.style.top=`-6px`,t.style.forcedColorAdjust=`none`;let n=e.createElement(`div`);n.style.position=`absolute`,n.style.inset=`0`,n.style.backgroundColor=`var(--background-color-card)`;let r=e.createElement(`div`);return r.style.position=`absolute`,r.style.inset=`2px`,t.appendChild(n),t.appendChild(r),t},Yt=/* @__PURE__ */ new WeakMap,Xt=(e,t,n)=>{let r=Yt.get(e);if(r?.shape===t&&r.color===n)return;Yt.set(e,{shape:t,color:n});let i=qt[t];e.setAttribute(`data-shape`,t);let[a,o]=e.children;a instanceof HTMLElement&&(a.style.clipPath=i),o instanceof HTMLElement&&(o.style.clipPath=i,o.style.backgroundColor=n)},Zt=()=>({x:0,width:0,baselineY:0,valueY:0,rounded:!1,roundedBase:!1}),Qt=()=>({y:0,height:0,baselineX:0,valueX:0,rounded:!1,roundedBase:!1}),$t=e=>{let t=new Float64Array(e);return{columnCount:e,hasData:new Uint8Array(e).fill(1),minValue:t,maxValue:t,inValue:t,outValue:t}},en=1.5,tn=1.1,nn=1.6,rn=e=>`color-mix(in oklab, ${e} 25%, var(--background-color-card))`,q=(e,t,n)=>{let r=en;n===`up`?(e.moveTo(-1.5,t+r),e.lineTo(t+r,-1.5),e.moveTo(-1.5,r),e.lineTo(r,-1.5),e.moveTo(t-r,t+r),e.lineTo(t+r,t-r)):(e.moveTo(-1.5,-1.5),e.lineTo(t+r,t+r),e.moveTo(t-r,-1.5),e.lineTo(t+r,r),e.moveTo(-1.5,t-r),e.lineTo(r,t+r))},an=(e,t)=>{let{size:n,width:r}=t;e.fillRect(0,n/2-r/2,n,r)},on=(e,t)=>{let{size:n,width:r}=t;e.fillRect(n/2-r/2,0,r,n)},sn={hatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=en,e.beginPath(),q(e,t,`up`),e.stroke()},"hatch-reverse":(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=en,e.beginPath(),q(e,t,`down`),e.stroke()},crosshatch:(e,{size:t,ink:n})=>{e.strokeStyle=n,e.lineWidth=1,e.beginPath(),q(e,t,`up`),q(e,t,`down`),e.stroke()},perpendicular:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?on(e,{size:t,width:2}):an(e,{size:t,width:2})},parallel:(e,{size:t,ink:n,orientation:r})=>{e.fillStyle=n,r===`horizontal`?an(e,{size:t,width:2}):on(e,{size:t,width:2})},grid:(e,{size:t,ink:n})=>{e.fillStyle=n,an(e,{size:t,width:tn}),on(e,{size:t,width:tn})},dots:(e,{size:t,ink:n})=>{e.fillStyle=n,e.beginPath(),e.arc(t/4,t/4,nn,0,Math.PI*2),e.moveTo(3*t/4+nn,3*t/4),e.arc(3*t/4,3*t/4,nn,0,Math.PI*2),e.fill()}},cn=(e,t)=>{let{texture:n,ground:r,ink:i,orientation:a}=t;e.fillStyle=r,e.fillRect(0,0,8,8),sn[n](e,{size:8,ink:i,orientation:a})},J=/* @__PURE__ */ new Map;let ln=!1,Y=!1;const un=e=>typeof e==`object`&&!!e&&`yield`in e&&typeof Reflect.get(e,`yield`)==`function`,dn=()=>{let e=Reflect.get(globalThis,`scheduler`);return un(e)?e.yield():new Promise(e=>{if(typeof MessageChannel<`u`){let t=new MessageChannel;t.port1.addEventListener(`message`,()=>{t.port1.close(),e()},{once:!0}),t.port1.start(),t.port2.postMessage(null)}else setTimeout(e,0)})},fn=(e,t)=>{let n=e.ownerDocument.defaultView;return t==null||n==null||t.bottom>0&&t.top<n.innerHeight&&t.right>0&&t.left<n.innerWidth},pn=()=>{Y=!1;let e=performance.now(),t=[...J.entries()].toSorted(([,e],[,t])=>Number(t.onScreen)-Number(e.onScreen)||e.top-t.top);try{for(let[n,r]of t)if(J.get(n)===r&&(J.delete(n),r.run(r.rect),J.size>0&&performance.now()-e>=4))break}finally{J.size>0&&!ln&&(ln=!0,mn())}},mn=async()=>{await dn(),ln=!1;try{pn()}catch(e){reportError(e)}},hn=(e,t)=>{J.set(e,{run:t.run,rect:t.rect,onScreen:fn(e,t.rect),top:t.rect?.top??0}),Y=!0},gn=e=>{let t=J.get(e);t!=null&&!t.onScreen&&(t.onScreen=!0,Y=!0)},X=e=>{J.delete(e)},_n=()=>{J.size!==0&&Y&&pn()},vn=e=>typeof e==`string`||typeof e==`number`||e instanceof Date?e:String(e),yn=({raw:e,epoch:t,isTime:n})=>e instanceof Date?e:n?new Date(t):null,bn=(e,t,i)=>{let a=!1;if(i===`band`||i===`point`){let r=null,i=null;for(let o of e){let e=vn(n(o,t));e instanceof Date&&A(e)&&(a=!0),r??=e,i=e}return{count:e.length,first:r,last:i,hasTimeOfDay:a}}let o=i===`time`,s=0,c=1/0,l=-1/0;for(let i of e){let e=n(i,t),u=r(e,o);if(Number.isFinite(u)){if(!a){let t=yn({raw:e,epoch:u,isTime:o});t!=null&&A(t)&&(a=!0)}s+=1,c=Math.min(c,u),l=Math.max(l,u)}}return s===0?{count:s,first:null,last:null,hasTimeOfDay:a}:{count:s,first:o?new Date(c):c,last:o?new Date(l):l,hasTimeOfDay:a}},xn={line:`Line chart`,bar:`Bar chart`,area:`Area chart`,scatter:`Scatter plot`},Sn=(e,t)=>e===`bar`?t?`category`:`categories`:t?`data point`:`data points`,Cn=e=>e.length>0?` Series: ${e.join(`, `)}.`:``,wn=({kind:e,summary:t,hydrated:n})=>{let r;if(t.count===0)r=`${xn[e]} with no data.`;else{let i=t.count===1,a=Sn(e,i),o=n?k(t.count):String(t.count),s=``;if(n&&t.first!=null&&t.last!=null){let e={datasetHasTimeOfDay:t.hasTimeOfDay};s=i?` at ${j(t.first,e)}`:` from ${j(t.first,e)} to ${j(t.last,e)}`}r=`${xn[e]} with ${o} ${a}${s}.`}return{sentence:r,instructions:` Use the left and right arrow keys to move between data points, Page Up and Page Down to jump by a tenth of the data, Home and End to jump to the first and last, Enter or Space to activate the current point, and Escape to dismiss the readout.`}},Tn=`var(--color-chart-decorative)`,En={grid:`var(--border-color-card-muted)`,baseline:`var(--border-color-card)`,tickText:`var(--text-color-muted)`,reference:`var(--color-neutral-500)`,surface:`var(--background-color-card)`},Dn=t=>e(t)?`var(--color-chart-${t})`:t;var On=class{#e=/* @__PURE__ */ new Set;#t={series:[],hover:null,grid:null,xAxis:null,yAxis:null,referenceLines:[],tooltip:null,orientation:`vertical`};#n=/* @__PURE__ */ new Map;#r=null;#i=/* @__PURE__ */ new Map;#a=0;#o=null;#s=!1;#c=`vertical`;#l=null;#u=null;#d=/* @__PURE__ */ new Map;#f=/* @__PURE__ */ new Map;#p=null;#m=null;#h=!1;get hoverEver(){return this.#h}onSeriesChange=null;onPresentationChange=null;subscribe=e=>(this.#e.add(e),()=>{this.#e.delete(e)});getSnapshot=()=>this.#t;seriesSpecs(){return this.#r??=[...this.#n.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec),this.#r}seriesShape(e){return this.#n.get(e)?.spec.shape??`circle`}registerSeries(e){let t=this.#i.get(e.dataKey)??this.#a++;return this.#i.set(e.dataKey,t),this.#n.set(e.dataKey,{spec:e,sequence:t}),this.#r=null,this.#g(`series`),()=>{this.#n.get(e.dataKey)?.spec===e&&(this.#n.delete(e.dataKey),this.#r=null,this.#g(`series`))}}setDecorative(e){this.#s!==e&&(this.#s=e,this.#g(`series`))}setOrientation(e){this.#c!==e&&(this.#c=e,this.#g())}registerGrid(e){let t={lines:e};return this.#o=t,this.#g(),()=>{this.#o===t&&(this.#o=null,this.#g())}}registerXAxis(e){return this.#l=e,this.#g(),()=>{this.#l===e&&(this.#l=null,this.#g())}}registerYAxis(e){return this.#u=e,this.#g(),()=>{this.#u===e&&(this.#u=null,this.#g())}}registerReferenceLine(e,t){let n=this.#f.get(e)??this.#a++;return this.#f.set(e,n),this.#d.set(e,{spec:t,sequence:n}),this.#g(),()=>{this.#d.get(e)?.spec===t&&(this.#d.delete(e),this.#g())}}registerTooltip(e){return this.#p=e,this.#g(`tooltip`),()=>{this.#p===e&&(this.#p=null,this.#g(`tooltip`))}}publishHover(e){this.#m!==e&&(this.#m=e,e!=null&&(this.#h=!0),this.#t={...this.#t,hover:e},this.#_())}seriesMeta(){return this.seriesSpecs().map(e=>{let t=this.#s?Tn:Dn(e.color),n=this.#s?Tn:e.color;return{dataKey:e.dataKey,label:e.label,mark:e.mark,color:t,colorInput:n,shape:e.shape,texture:e.texture}})}#g(e=`presentation`){this.#t={series:e===`series`?this.seriesMeta():this.#t.series,hover:this.#m,grid:this.#o,xAxis:this.#l,yAxis:this.#u,referenceLines:[...this.#d.values()].toSorted((e,t)=>e.sequence-t.sequence).map(e=>e.spec),tooltip:this.#p,orientation:this.#c},this.#_(),e===`series`?this.onSeriesChange?.():e===`presentation`&&this.onPresentationChange?.()}#_(){for(let e of this.#e)e()}};const kn=`100%`,An=`300%`,jn=[`near`,`far`],Mn=/* @__PURE__ */ new WeakMap,Z=/* @__PURE__ */ new WeakMap,Q=/* @__PURE__ */ new WeakMap;let Nn=null;const Pn=()=>{if(Nn==null){let e=new IntersectionObserver(()=>{},{scrollMargin:`0px`});Nn=`scrollMargin`in e,e.disconnect()}return Nn},Fn=/auto|scroll/,In=e=>{let t=e.ownerDocument,n=t.defaultView;if(n==null)return null;for(let r=e.parentElement;r!=null&&r!==t.documentElement&&r!==t.body;r=r.parentElement)if(Fn.test(n.getComputedStyle(r).overflowY))return r;return null},$=(e,t,n)=>new IntersectionObserver(t=>{for(let n of t)Q.get(n.target)?.({band:e,inView:n.isIntersecting,rect:n.boundingClientRect});_n()},{root:n,rootMargin:Pn()?`0px`:t,scrollMargin:t,threshold:0}),Ln=e=>{let t=Mn.get(e);return t??(t={near:$(`near`,kn,null),far:$(`far`,An,null),visible:$(`visible`,`0px`,null),count:0},Mn.set(e,t)),t.count+=1,t},Rn=(e,t)=>{--t.count,t.count>0||(t.near.disconnect(),t.far.disconnect(),t.visible.disconnect(),Mn.get(e)===t&&Mn.delete(e))},zn=(e,t)=>{let n=Z.get(e);if(n!=null)return n;let r={near:$(`near`,kn,e),far:$(`far`,An,e),open:{near:!1,far:!1},elements:{near:/* @__PURE__ */ new Set,far:/* @__PURE__ */ new Set}};return Q.set(e,({band:e,inView:t})=>{if(e!==`visible`&&r.open[e]!==t){r.open[e]=t;for(let n of r.elements[e])t?r[e].observe(n):(r[e].unobserve(n),Q.get(n)?.({band:e,inView:!1,rect:null}))}}),t.near.observe(e),t.far.observe(e),t.count+=1,Z.set(e,r),r},Bn=(e,t,n,r)=>{t.elements.near.size>0||(t.near.disconnect(),t.far.disconnect(),n.near.unobserve(e),n.far.unobserve(e),Q.delete(e),Z.get(e)===t&&Z.delete(e),Rn(r,n))},Vn=(e,{onChange:t,far:n=!0})=>{if(typeof IntersectionObserver>`u`)return t({band:`near`,inView:!0,rect:null}),n&&t({band:`far`,inView:!0,rect:null}),t({band:`visible`,inView:!0,rect:null}),_n(),()=>{X(e)};let r=e.ownerDocument,i=Ln(r);Q.set(e,t),i.visible.observe(e);let a=Pn()?null:In(e);if(a==null)return i.near.observe(e),n&&i.far.observe(e),()=>{Q.get(e)===t&&(Q.delete(e),X(e),i.near.unobserve(e),i.far.unobserve(e),i.visible.unobserve(e),Rn(r,i))};let o=zn(a,i);for(let t of jn)(t!==`far`||n)&&(o.elements[t].add(e),o.open[t]&&o[t].observe(e));return()=>{if(Q.get(e)===t){Q.delete(e),X(e);for(let t of jn)o.elements[t].delete(e),o[t].unobserve(e);i.visible.unobserve(e),Rn(r,i),Bn(a,o,i,r)}}};export{c as C,r as D,i as E,f as S,n as T,Se as _,wn as a,re as b,X as c,hn as d,cn as f,kt as g,qt as h,Dn as i,fn as l,Wt as m,On as n,Cn as o,rn as p,En as r,bn as s,Vn as t,gn as u,k as v,s as w,te as x,j as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e,i as t,r as n}from"./chart-BmZoTjRu.js";const r=/* @__PURE__ */ new WeakMap,i=e=>{let t=r.get(e);return(t==null||t.parentNode!==e)&&(t=e.ownerDocument.createElement(`span`),t.style.display=`none`,t.style.forcedColorAdjust=`none`,t.setAttribute(`aria-hidden`,`true`),e.appendChild(t),r.set(e,t)),t},a=(e,t)=>{let n=i(e);return n.style.color=t,e.ownerDocument.defaultView?.getComputedStyle(n).color??``},o=/* @__PURE__ */ new WeakMap,s=e=>{let t=o.get(e);if(t!==void 0)return t;let n=e.createElement(`canvas`);n.width=1,n.height=1;let r=n.getContext(`2d`);return o.set(e,r),r},c=[`#010203`,`#030201`],l=/* @__PURE__ */ new WeakMap,u=(e,t)=>{let n=l.get(e);n??(n=/* @__PURE__ */ new Map,l.set(e,n));let r=n.get(t);if(r!=null)return r;let i=!1;for(let n of c)if(e.fillStyle=n,e.fillStyle=t,e.fillStyle!==n){i=!0;break}return n.set(t,i),i},d=/^var\(\s*(--[\w-]+)\s*\)$/i,f=/var\(|currentcolor|light-dark\(/i,p=(e,t)=>{let{computed:n,parseContext:r}=t,i=/* @__PURE__ */ new Map;return{resolve:t=>{let o=i.get(t);if(o!=null)return o;let s=t.trim(),c=d.exec(s),l;l=c?.[1]==null?s.toLowerCase()===`currentcolor`?n.color:s:n.getPropertyValue(c[1]).trim();let p;return p=l===``||f.test(l)?a(e,s):r==null||u(r,l)?l:a(e,s),i.set(t,p),p},fontFamily:n.fontFamily||`sans-serif`}},m=(e,n)=>e.resolve(t(n)),h=e=>({grid:e.resolve(n.grid),baseline:e.resolve(n.baseline),tickText:e.resolve(n.tickText),reference:e.resolve(n.reference),surface:e.resolve(n.surface)}),g=e=>`${e.className}|${e.getAttribute(`data-applied-theme`)??``}|${e.getAttribute(`data-theme`)??``}`,_=/* @__PURE__ */ new WeakMap,v=(e,t)=>{let n=_.get(e);if(n==null){let t=/* @__PURE__ */ new Set,r={observer:new MutationObserver(()=>{let n=g(e);if(n!==r.signature){r.signature=n;for(let e of t)e()}}),listeners:t,signature:g(e)};r.observer.observe(e,{attributes:!0,attributeFilter:[`class`,`data-applied-theme`,`data-theme`]}),_.set(e,r),n=r}return n.listeners.add(t),()=>{n.listeners.delete(t),n.listeners.size===0&&(n.observer.disconnect(),_.delete(e))}};var y=class{kind=`canvas`;element;#e;#t;#n=null;#r=!1;#i;constructor({root:e,plot:t,slotName:n,onColorsChange:r}){this.#e=e,this.#t=t;let i=e.ownerDocument.createElement(`canvas`);i.setAttribute(`data-slot`,`${n}-canvas`),i.setAttribute(`aria-hidden`,`true`),i.style.position=`absolute`,i.style.inset=`0`,i.style.width=`100%`,i.style.height=`100%`,this.element=i,this.#i=v(e.ownerDocument.documentElement,r)}#a(){return this.#r||(this.#r=!0,this.#n=this.element.getContext(`2d`)),this.#n}paintSignature(){return g(this.#e.ownerDocument.documentElement)}resolvePaint({series:e,signature:t}){let n=this.#e.ownerDocument.defaultView;if(n==null)return null;let r=p(this.#t,{computed:n.getComputedStyle(this.#e),parseContext:s(this.#e.ownerDocument)}),i=/* @__PURE__ */ new Map,a=/* @__PURE__ */ new Map;for(let t of e)i.set(t.dataKey,m(r,t.colorInput)),a.set(t.dataKey,`${t.colorInput}|${t.texture}`);return{signature:t,series:i,inputs:a,barFills:/* @__PURE__ */ new Map,chrome:h(r),fontFamily:()=>r.fontFamily,resolve:e=>m(r,e)}}measureContext(){return this.#a()}begin({cssWidth:e,cssHeight:t,devicePixelRatio:n}){let r=this.#a();if(r==null)return null;let i=this.element,a=Math.round(e*n),o=Math.round(t*n);return(i.width!==a||i.height!==o)&&(i.width=a,i.height=o),r.setTransform(n,0,0,n,0,0),r.clearRect(0,0,e,t),r}composite(e,t){let{underlay:n,marks:r,fade:i}=t,a=this.#n;if(i==null||a==null){n(),r();return}r(),a.save(),a.globalCompositeOperation=`destination-out`;let o=a.createLinearGradient(i.left,0,i.left+i.width,0);o.addColorStop(0,`rgba(0, 0, 0, ${i.alpha})`),o.addColorStop(1,`rgba(0, 0, 0, 0)`),a.fillStyle=o,a.fillRect(i.left,i.top,i.width,i.height),a.globalCompositeOperation=`destination-over`,n(),a.restore()}end(){}release(){let e=this.element;(e.width!==0||e.height!==0)&&(e.width=0,e.height=0)}destroy(){this.#i()}};const b=Object.assign(e=>new y(e),{kind:`canvas`}),x=5e3,S=2e4,C=(t,n)=>{let{color:r,surface:i,shape:a,totalPointCount:o,indexes:s,xAt:c,yAt:l,radiusAt:u}=n;if(t.fillStyle=r,o>2e4){t.beginPath();for(let e of s)u(e)<=0||t.rect(c(e)-1,l(e)-1,2,2);t.fill();return}let d=o<=x;t.strokeStyle=i,t.lineWidth=2;for(let n of s){let r=u(n);r<=0||(t.beginPath(),a===`circle`?t.arc(c(n),l(n),r,0,Math.PI*2):e(t,c(n),l(n),r,a),t.fill(),d&&t.stroke())}};export{b as i,x as n,C as r,S as t};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { t as SelfClosingWithAsChild } from "./as-child-DFxX3U2i.js";
|
|
2
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
3
|
+
import { _ as XValue, g as XTickContext, h as SeriesColor, p as GridLines, v as YTickContext } from "./chart-XvStK-oM.js";
|
|
4
|
+
import { ComponentProps } from "react";
|
|
5
|
+
/**
|
|
6
|
+
* The copy button part: copies the chart's data as a Markdown table.
|
|
7
|
+
*
|
|
8
|
+
* This module is internal shared implementation, not exported from the package.
|
|
9
|
+
*/
|
|
10
|
+
type CopyButtonPrimitiveProps = Omit<ComponentProps<"button">, "aria-label" | "children" | "type" | "onCopy"> & SelfClosingWithAsChild & WithDataSlot & {
|
|
11
|
+
/**
|
|
12
|
+
* Not part of the API: `label` is the single way to name the button.
|
|
13
|
+
* Typed `never` rather than only omitted because TypeScript skips
|
|
14
|
+
* excess-attribute checks for hyphenated JSX attributes; the `never`
|
|
15
|
+
* type makes the JSX call site a compile error.
|
|
16
|
+
*/
|
|
17
|
+
"aria-label"?: never;
|
|
18
|
+
/**
|
|
19
|
+
* The accessible name for the copy button, rendered as its `aria-label`
|
|
20
|
+
* (like the `alt` text on an `<img>`).
|
|
21
|
+
*
|
|
22
|
+
* @default "Copy data as Markdown"
|
|
23
|
+
*/
|
|
24
|
+
label?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Callback fired after a successful copy, passes the serialized markdown.
|
|
27
|
+
*/
|
|
28
|
+
onCopy?: (value: string) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Callback fired when an error occurs during copying.
|
|
31
|
+
*/
|
|
32
|
+
onCopyError?: (error: unknown) => void;
|
|
33
|
+
};
|
|
34
|
+
type GridPrimitiveProps = {
|
|
35
|
+
/** Which gridlines to draw. */
|
|
36
|
+
lines?: GridLines;
|
|
37
|
+
};
|
|
38
|
+
type XAxisPrimitiveProps = {
|
|
39
|
+
/**
|
|
40
|
+
* Format a tick label. Receives the chart's x values: the category value on
|
|
41
|
+
* band/point scales, a `Date` on time scales, and a number on linear scales.
|
|
42
|
+
* The second argument carries the `defaultLabel` the axis paints without a
|
|
43
|
+
* formatter, so a formatter can decorate it. The chart compares the function
|
|
44
|
+
* by identity, so a new function paints the chart again. The React Compiler
|
|
45
|
+
* in your build keeps an inline function stable. Without it, define the
|
|
46
|
+
* function outside the component.
|
|
47
|
+
*/
|
|
48
|
+
tickFormat?: (value: XValue, context: XTickContext) => string;
|
|
49
|
+
/**
|
|
50
|
+
* Target tick count (continuous scales only; a density-derived default
|
|
51
|
+
* otherwise). Approximate: ticks land on human-friendly steps, and a linear
|
|
52
|
+
* axis whose x values are all integers never renders fractional ticks:
|
|
53
|
+
* the integer step wins over the requested count.
|
|
54
|
+
*/
|
|
55
|
+
tickCount?: number;
|
|
56
|
+
};
|
|
57
|
+
type YAxisPrimitiveProps = {
|
|
58
|
+
/**
|
|
59
|
+
* Format a tick label. Defaults to thousands-separated numbers. The second
|
|
60
|
+
* argument carries the tick `step` and the `defaultLabel`, whose precision
|
|
61
|
+
* follows the step. A formatter that adds a unit can decorate
|
|
62
|
+
* `defaultLabel` and needs no precision of its own. The chart compares the
|
|
63
|
+
* function by identity, so a new function paints the chart again. The React
|
|
64
|
+
* Compiler in your build keeps an inline function stable. Without it, define
|
|
65
|
+
* the function outside the component.
|
|
66
|
+
*/
|
|
67
|
+
tickFormat?: (value: number, context: YTickContext) => string;
|
|
68
|
+
/**
|
|
69
|
+
* Maximum tick count. When omitted, the axis aims for about 5 ticks. Ticks
|
|
70
|
+
* land on human-friendly steps, so the axis can render fewer. The plot
|
|
71
|
+
* height also limits the count: a vertical axis keeps about 28px for each
|
|
72
|
+
* tick, and it drops a label that would overlap its neighbor. When every
|
|
73
|
+
* series value is an integer (counts), the axis never renders fractional
|
|
74
|
+
* ticks.
|
|
75
|
+
*/
|
|
76
|
+
tickCount?: number;
|
|
77
|
+
};
|
|
78
|
+
type ReferenceLinePrimitiveProps = {
|
|
79
|
+
/** The y value the line marks (an SLO threshold, a budget, a limit). */
|
|
80
|
+
y: number;
|
|
81
|
+
/** A short label painted above the line's right end. */
|
|
82
|
+
label?: string;
|
|
83
|
+
/** Line color; defaults to the neutral reference color. */
|
|
84
|
+
color?: SeriesColor;
|
|
85
|
+
};
|
|
86
|
+
export { CopyButtonPrimitiveProps as a, YAxisPrimitiveProps as i, ReferenceLinePrimitiveProps as n, XAxisPrimitiveProps as r, GridPrimitiveProps as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./Check-C5a1hX4x.js";import{t}from"./Copy-BYWMO6PW.js";import{useEffect as n,useRef as r,useState as i}from"react";import{t as a}from"./hooks-BybaGF7O.js";import{t as o}from"./utils-BkH4bOKp.js";import{t as s}from"./utils-EM6s2WEU.js";import{t as c}from"./button-Bqm7U0OC.js";import{t as l}from"./icon-0RoVrpGj.js";import{t as u}from"./live-region-78gbKwlB.js";import{t as d}from"./chart-Dlp9FidW.js";import{d as f}from"./chart-B0n2xyYi.js";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";const g=({partName:g,slotName:_,label:v=`Copy data as Markdown`,onCopy:y,onCopyError:b,onClick:x,ref:S,"data-slot":C,...w})=>{let T=f(g),E=a(),[D,O]=i(``),k=D!==``,A=r(!1),j=r(void 0);return n(()=>()=>{j.current!=null&&clearTimeout(j.current)},[]),/* @__PURE__ */ h(p,{children:[/* @__PURE__ */ m(c,{type:`button`,appearance:`ghost`,intent:`neutral`,size:`sm`,"data-slot":s(C,`${_}-copy-button`),label:v,icon:/* @__PURE__ */ m(l,{active:k?`check`:`copy`,icons:{check:/* @__PURE__ */ m(e,{}),copy:/* @__PURE__ */ m(t,{})}}),ref:S,onClick:async e=>{try{if(x?.(e),e.defaultPrevented){j.current!=null&&(clearTimeout(j.current),j.current=void 0),O(``);return}let{data:t,xKey:n,xScale:r,zKey:i}=T.dataRef.current,a=d({data:t,xKey:n,xScale:r,zKey:i,series:T.store.getSnapshot().series});await E(a),y?.(a),O(o(`Copied`,A)),j.current!=null&&clearTimeout(j.current),j.current=setTimeout(()=>{O(``)},2e3)}catch(e){b?.(e)}},...w}),/* @__PURE__ */ m(u,{children:D})]})};export{g as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{S as e,g as t}from"./chart-BmZoTjRu.js";import"./chart-CmMcfDmv.js";import{n}from"./chart-Bybyh2Dc.js";const r=Math.PI/2-.05,i=e=>({cosYaw:Math.cos(e.yaw),sinYaw:Math.sin(e.yaw),cosPitch:Math.cos(e.pitch),sinPitch:Math.sin(e.pitch)}),a=(e,t,n,r)=>{let i=e*r.cosYaw+n*r.sinYaw,a=-e*r.sinYaw+n*r.cosYaw,o=t*r.cosPitch-a*r.sinPitch,s=t*r.sinPitch+a*r.cosPitch,c=4/(4+s);return{x:i*c,y:o*c,depth:s,scale:c}},o=e=>Math.min(r,Math.max(-r,e)),s=(e,t)=>{let n=t[1]-t[0];return n===0?0:(e-t[0])/n*2-1},c=[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1],[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],l=[[0,1],[1,2],[2,3],[3,0],[4,5],[5,6],[6,7],[7,4],[0,4],[1,5],[2,6],[3,7]],u=(e,r)=>{let{count:i,order:a,screenX:o,screenY:s,radius:c,colorAt:l,shapeAt:u,alphaAt:d,surface:f}=r;if(e.save(),i>2e4){let t=``,n=-1;for(let r of a){let i=l(r);i!==t&&(e.fillStyle=i,t=i);let a=d(r);a!==n&&(e.globalAlpha=a,n=a);let u=Math.max(1,(c[r]??0)/2);e.fillRect((o[r]??0)-u/2,(s[r]??0)-u/2,u,u)}e.restore();return}let p=i<=n;e.strokeStyle=f,e.lineWidth=2;let m=``,h=-1;for(let n of a){let r=l(n);r!==m&&(e.fillStyle=r,m=r);let i=d(n);i!==h&&(e.globalAlpha=i,h=i);let a=u(n);e.beginPath(),a===`circle`?e.arc(o[n]??0,s[n]??0,c[n]??0,0,Math.PI*2):t(e,o[n]??0,s[n]??0,c[n]??0,a),e.fill(),p&&e.stroke()}e.restore()},d=(e,t)=>{let{gridColor:n,axisColor:r,corners:i,edges:a,cubeAlpha:o,axes:s}=t;if(e.save(),o>.01){e.globalAlpha=o,e.strokeStyle=n,e.lineWidth=1,e.beginPath();for(let[t,n]of a){let r=i[t],a=i[n];r!=null&&a!=null&&(e.moveTo(r.x,r.y),e.lineTo(a.x,a.y))}e.stroke()}e.strokeStyle=r;for(let{alpha:t,from:n,to:r}of s)t<=.01||(e.globalAlpha=t,e.beginPath(),e.moveTo(n.x,n.y),e.lineTo(r.x,r.y),e.stroke());e.restore()},f=(e,t)=>{let{textColor:n,fontFamily:r,plot:i,center:a,axes:o}=t;e.save(),e.fillStyle=n,e.font=`11px ${r}`,e.textAlign=`center`,e.textBaseline=`middle`;for(let{label:t,alpha:n,from:r,to:s}of o){if(n<=.01)continue;let o=Math.hypot(r.x-a.x,r.y-a.y),c=Math.hypot(s.x-a.x,s.y-a.y),l=c>=o?s:r,u=c>=o?r:s,d=Math.max(1,Math.hypot(l.x-u.x,l.y-u.y)),f=(l.x-u.x)/d*16,p=(l.y-u.y)/d*16,m=Math.min(i.left+i.width-8,Math.max(i.left+8,l.x+f)),h=Math.min(i.top+i.height-6,Math.max(i.top+6,l.y+p));e.globalAlpha=n,e.fillText(t,m,h)}e.restore()},p=e=>e===3?{yaw:.65,pitch:-.35}:{yaw:0,pitch:0},m=e=>[+(e>=2),+(e>=3)];var h=class{#e;#t=p(3);#n=new e({speed:.12});#r=new e({speed:.16});#i=null;#a=null;#o=/* @__PURE__ */ new Int32Array;constructor(e,t){this.#e=e,this.snap(t)}setDimensions(e,t){let n=p(e);if(!t.glide){this.snap(e);return}let r=n.yaw+Math.round((this.#t.yaw-n.yaw)/(Math.PI*2))*Math.PI*2,i=performance.now();this.#r.aim(m(e),i),this.#n.jump([this.#t.yaw,this.#t.pitch]),this.#n.aim([r,n.pitch],i)}snap(e){let t=p(e);this.#r.jump(m(e)),this.#t=t,this.#n.jump([t.yaw,t.pitch])}settle(e){this.#r.jump(m(e)),this.#n.active&&this.snap(e)}tick(e){let t=this.#r.tick(e);if(this.#n.tick(e)){t=!0;let e=this.#n.values();this.#t={yaw:e[0]??this.#t.yaw,pitch:e[1]??this.#t.pitch}}return t}resetProjection(){this.#a=null}press({x:e,y:t,moved:n}){this.#i={lastX:e,lastY:t,moved:n}}dragTo(e,t){let n=this.#i;if(n==null)return`none`;let r=e-n.lastX,i=t-n.lastY;return!n.moved&&Math.abs(r)+Math.abs(i)<=3?`held`:(n.moved=!0,this.#t={yaw:this.#t.yaw+r*.008,pitch:o(this.#t.pitch+i*.008)},this.#n.jump([this.#t.yaw,this.#t.pitch]),n.lastX=e,n.lastY=t,`rotated`)}release(){let e=this.#i;return this.#i=null,e==null?`none`:e.moved?`rotated`:`tap`}paintLabels(e,t){let n=this.#e.colors();n!=null&&f(e,{textColor:n.chrome.tickText,fontFamily:n.fontFamily(),plot:this.#e.plot(),center:t.center,axes:t.axes})}paint(e,t,n){let r=this.#e,o=r.plot(),f=r.rowCount(),p=r.xs(),m=r.zs(),h=i(this.#t),g=o.left+o.width/2,_=o.top+o.height/2,v=this.#r.values(),y=v[0]??1,b=v[1]??1,x=.85-.22*y-.11*b,S=Math.min(o.width,o.height)/2*x,C=r.domains(),w=n.map(e=>r.reveal(e.dataKey)),T=(e,t,n)=>{let r=a(e,t,n,h);return{x:g+r.x*S,y:_-r.y*S}},E=c.map(([e,t,n])=>T(e,t,n)),D=n[0],O=n.length===1&&D!=null?D.dataKey:`y`,k=[{label:r.xKey(),alpha:1,from:T(-1,-y,-b),to:T(1,-y,-b)},{label:O,alpha:y,from:T(-1,-1,-b),to:T(-1,1,-b)},{label:r.zKey()??`z`,alpha:b,from:T(-1,-y,-1),to:T(-1,-y,1)}];d(e,{gridColor:t.chrome.grid,axisColor:t.chrome.baseline,corners:E,edges:l,cubeAlpha:b,axes:k});let A=f*n.length,j=this.#a;(j==null||j.screenX.length<A)&&(j={screenX:new Float64Array(A),screenY:new Float64Array(A),radius:new Float64Array(A),seriesIndex:new Int32Array(A),pointIndex:new Int32Array(A),depths:new Float64Array(A),count:0});let M=j.depths,N=0;n.forEach((e,t)=>{let n=r.paintedValues(e,t);for(let e=0;e<f;e++){let r=n[e]??NaN,i=m[e]??NaN;if(Number.isNaN(r)||Number.isNaN(i))continue;let o=a(s(p[e]??0,C.x),s(r,C.y)*y,s(i,C.z)*b,h);j.screenX[N]=g+o.x*S,j.screenY[N]=_-o.y*S,j.radius[N]=4*o.scale,j.seriesIndex[N]=t,j.pointIndex[N]=e,M[N]=o.depth,N+=1}}),j.count=N,this.#a=j;let P={center:{x:g,y:_},axes:k};if(w.every(e=>e<.00196078431372549))return P;this.#o.length<N&&(this.#o=new Int32Array(A));let F=this.#o.subarray(0,N);for(let e=0;e<N;e++)F[e]=e;F.sort((e,t)=>(M[t]??0)-(M[e]??0));let I=n.map(e=>r.shape(e.dataKey));return u(e,{count:N,order:F,screenX:j.screenX,screenY:j.screenY,radius:j.radius,colorAt:e=>{let r=n[j.seriesIndex[e]??0];return r==null?`currentColor`:t.series.get(r.dataKey)??`currentColor`},shapeAt:e=>I[j.seriesIndex[e]??0]??`circle`,alphaAt:e=>w[j.seriesIndex[e]??0]??1,surface:t.chrome.surface}),P}hitAt(e,t,n){let r=this.#e.specs(),i=n*n,a=null,o=this.#a;if(o==null)return null;for(let n=0;n<o.count;n++){let s=(o.screenX[n]??0)-e,c=(o.screenY[n]??0)-t,l=s*s+c*c;if(l<i){let e=r[o.seriesIndex[n]??0];if(e==null)continue;i=l,a={seriesKey:e.dataKey,index:o.pointIndex[n]??0,screenX:o.screenX[n]??0,screenY:o.screenY[n]??0}}}return a}screenFor(e){let t=this.#a;if(t==null)return null;for(let n=0;n<t.count;n++)if((t.pointIndex[n]??-1)===e)return{x:t.screenX[n]??0,y:t.screenY[n]??0};return null}};export{h as Scatter3d};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as e}from"./chart-BmZoTjRu.js";import{r as t}from"./chart-Bybyh2Dc.js";const n=1/510,r=[1e3,4e3,16e3];let i=null,a=null;const o=()=>(a??=import(`./chart-Cb0MBaZx.js`).then(e=>(i=e.Scatter3d,e.Scatter3d),e=>{throw a=null,reportError(e),e}),a);var s=class{kind=`scatter`;#e;#t=null;#n=!1;#r=0;#i=null;#a=null;#o=3;#s=null;constructor(e){this.#e=e}#c(){if(this.#t==null&&i!=null){this.#t=new i(this.#e,this.#o),this.#d();let e=this.#a;this.#a=null,e!=null&&this.#t.press(e)}return this.#t!=null||this.#n?this.#t:(this.#n=!0,this.#l(),null)}async#l(){try{await o()}catch{this.#n=!1,this.#u();return}this.#n=!1,this.#c(),this.#e.requestPaint()}#u(){let e=r[this.#r];e!=null&&this.#i==null&&(this.#r+=1,this.#i=setTimeout(()=>{this.#i=null,this.#e.requestPaint()},e))}#d(){this.#i!=null&&(clearTimeout(this.#i),this.#i=null),this.#r=0}setDimensions(e,t){this.#o=e,this.#t?.setDimensions(e,t)}settle(e){this.#o=e,this.#t?.settle(e)}tick(e){return this.#t?.tick(e)??!1}resetProjection(){this.#d(),this.#t?.resetProjection()}pressAt(e,t){if(!this.#e.is3d())return!1;this.#d();let n=this.#c();return n==null?this.#a={x:e,y:t,moved:!1}:n.press({x:e,y:t,moved:!1}),!0}dragTo(e,t){let n=this.#a;return n==null?this.#t?.dragTo(e,t)??`none`:(n.moved||=Math.abs(e-n.x)+Math.abs(t-n.y)>3,`held`)}release(){let e=this.#a;return e==null?this.#t?.release()??`none`:(this.#a=null,e.moved?`rotated`:`tap`)}paint(e){let n=this.#e,r=n.colors(),i=n.specs();if(r==null||n.rowCount()===0||i.length===0)return null;if(n.is3d())return this.#c()?.paint(e,r,i)??null;let a=n.xCoefficients(),o=n.yCoefficients(),s=n.xs(),c=n.columns(),l=this.#s;if(l==null||l.columns!==c||l.specs!==i){let e=i.map((e,t)=>n.definedIndexes(c[t]??/* @__PURE__ */ new Float64Array));l={columns:c,specs:i,indexes:e,total:e.reduce((e,t)=>e+t.length,0)},this.#s=l}let u=l.indexes,d=l.total;return i.forEach((i,c)=>{let l=n.reveal(i.dataKey);if(l<.00196078431372549)return;let f=n.paintedValues(i,c);e.save(),e.globalAlpha=l,t(e,{color:r.series.get(i.dataKey)??`currentColor`,surface:r.chrome.surface,shape:n.shape(i.dataKey),totalPointCount:d,indexes:u[c]??[],xAt:e=>(s[e]??0)*a.k+a.b,yAt:e=>(f[e]??0)*o.k+o.b,radiusAt:()=>4}),e.restore()}),null}paintLabels(e,t){this.#t?.paintLabels(e,t)}hitAt(t,n){let r=this.#e;if(r.is3d())return this.#t?.hitAt(t,n,24)??null;let i=r.specs(),a=576,o=null,s=r.xCoefficients(),c=r.yCoefficients(),l=r.xs(),u=r.rowCount(),d=e=>(l[e]??0)*s.k+s.b,f=s.k>0,p=f?e(u,e=>d(e)-t<=-24):0,m=f?e(u,e=>d(e)-t<24):u;for(let e of i){let i=r.columnOf(e.dataKey);if(i!=null)for(let r=p;r<m;r++){let s=i[r]??NaN;if(Number.isNaN(s))continue;let l=d(r),u=s*c.k+c.b,f=l-t,p=u-n,m=f*f+p*p;m<a&&(a=m,o={seriesKey:e.dataKey,index:r,screenX:l,screenY:u})}}return o}screenFor(e){let t=this.#e;if(t.is3d())return this.#t?.screenFor(e)??null;let n=t.xCoefficients(),r=t.yCoefficients();for(let i of t.specs()){let a=t.columnOf(i.dataKey)?.[e]??NaN;if(!Number.isNaN(a))return{x:(t.xs()[e]??0)*n.k+n.b,y:a*r.k+r.b}}return null}};const c=e=>new s(e);export{c as n,o as r,n as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{D as e,T as t}from"./chart-BmZoTjRu.js";const n=e=>e.replaceAll(`|`,`\\|`).replaceAll(/\s*\n\s*/g,` `),r=(t,r)=>{let i=r===`time`?new Date(e(t,!0)):t;return i instanceof Date?Number.isNaN(i.getTime())?`—`:i.toISOString():typeof i==`number`?Number.isFinite(i)?String(i):`—`:typeof i==`string`?n(i):`—`},i=e=>typeof e==`number`&&Number.isFinite(e)?String(e):`—`,a=e=>`| ${e.join(` | `)} |`,o=({data:e,xKey:o,xScale:s,series:c,zKey:l})=>{let u=[n(o),...c.map(e=>n(e.label)),...l==null?[]:[n(l)]],d=e.map(e=>[r(t(e,o),s),...c.map(n=>i(t(e,n.dataKey))),...l==null?[]:[i(t(e,l))]]);return[a(u),a(u.map(()=>`---`)),...d.map(e=>a(e))].join(`
|
|
2
|
+
`)};export{o as t};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { t as SelfClosingWithAsChild } from "./as-child-DFxX3U2i.js";
|
|
2
1
|
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
3
2
|
import { t as Color } from "./index-BZhHLrBi.js";
|
|
4
3
|
import { ComponentProps, ReactNode } from "react";
|
|
@@ -209,9 +208,10 @@ type ChartDatumEvent<TDatum extends ChartDatum = ChartDatum> = {
|
|
|
209
208
|
* zero, so their minimum is fixed at `0`; line charts may override both ends.
|
|
210
209
|
*/
|
|
211
210
|
type YDomain = [number | "auto", number | "auto"];
|
|
211
|
+
type ChartListPrimitiveProps = ComponentProps<"div"> & WithDataSlot;
|
|
212
212
|
/**
|
|
213
213
|
* The shared React layer of the chart family. `BarChart`, `LineChart`,
|
|
214
|
-
* `AreaChart`, and `
|
|
214
|
+
* `AreaChart`, `ScatterPlot`, and `WorldMap` are thin public wrappers over these
|
|
215
215
|
* primitives, mirroring how `dialog/primitive` backs the dialog family and
|
|
216
216
|
* `list/primitive` backs the list family.
|
|
217
217
|
*
|
|
@@ -407,35 +407,6 @@ type ChartAccessibilityProps<TMode extends ChartMode = ChartMode> = {
|
|
|
407
407
|
} & ChartAccessibleName & ChartNoInteractionProps : {
|
|
408
408
|
mode?: "interactive";
|
|
409
409
|
} & ChartAccessibleName & ChartInteractionProps);
|
|
410
|
-
/**
|
|
411
|
-
* The copy button part: copies the chart's data as a Markdown table.
|
|
412
|
-
*
|
|
413
|
-
* This module is internal shared implementation, not exported from the package.
|
|
414
|
-
*/
|
|
415
|
-
type CopyButtonPrimitiveProps = Omit<ComponentProps<"button">, "aria-label" | "children" | "type" | "onCopy"> & SelfClosingWithAsChild & WithDataSlot & {
|
|
416
|
-
/**
|
|
417
|
-
* Not part of the API: `label` is the single way to name the button.
|
|
418
|
-
* Typed `never` rather than only omitted because TypeScript skips
|
|
419
|
-
* excess-attribute checks for hyphenated JSX attributes; the `never`
|
|
420
|
-
* type makes the JSX call site a compile error.
|
|
421
|
-
*/
|
|
422
|
-
"aria-label"?: never;
|
|
423
|
-
/**
|
|
424
|
-
* The accessible name for the copy button, rendered as its `aria-label`
|
|
425
|
-
* (like the `alt` text on an `<img>`).
|
|
426
|
-
*
|
|
427
|
-
* @default "Copy data as Markdown"
|
|
428
|
-
*/
|
|
429
|
-
label?: string;
|
|
430
|
-
/**
|
|
431
|
-
* Callback fired after a successful copy, passes the serialized markdown.
|
|
432
|
-
*/
|
|
433
|
-
onCopy?: (value: string) => void;
|
|
434
|
-
/**
|
|
435
|
-
* Callback fired when an error occurs during copying.
|
|
436
|
-
*/
|
|
437
|
-
onCopyError?: (error: unknown) => void;
|
|
438
|
-
};
|
|
439
410
|
type LegendPrimitiveProps = Omit<ComponentProps<"div">, "children"> & {
|
|
440
411
|
/**
|
|
441
412
|
* Classes for the legend. The legend wraps its items and does not shrink.
|
|
@@ -445,53 +416,6 @@ type LegendPrimitiveProps = Omit<ComponentProps<"div">, "children"> & {
|
|
|
445
416
|
/** Replace the default legend items; receives the registered series. */
|
|
446
417
|
children?: (series: SeriesMeta[]) => ReactNode;
|
|
447
418
|
};
|
|
448
|
-
type ChartListPrimitiveProps = ComponentProps<"div"> & WithDataSlot;
|
|
449
|
-
type GridPrimitiveProps = {
|
|
450
|
-
/** Which gridlines to draw. */
|
|
451
|
-
lines?: GridLines;
|
|
452
|
-
};
|
|
453
|
-
type XAxisPrimitiveProps = {
|
|
454
|
-
/**
|
|
455
|
-
* Format a tick label. Receives the chart's x values: the category value on
|
|
456
|
-
* band/point scales, a `Date` on time scales, and a number on linear scales.
|
|
457
|
-
* The second argument carries the `defaultLabel` the axis paints without a
|
|
458
|
-
* formatter, so a formatter can decorate it.
|
|
459
|
-
*/
|
|
460
|
-
tickFormat?: (value: XValue, context: XTickContext) => string;
|
|
461
|
-
/**
|
|
462
|
-
* Target tick count (continuous scales only; a density-derived default
|
|
463
|
-
* otherwise). Approximate: ticks land on human-friendly steps, and a linear
|
|
464
|
-
* axis whose x values are all integers never renders fractional ticks:
|
|
465
|
-
* the integer step wins over the requested count.
|
|
466
|
-
*/
|
|
467
|
-
tickCount?: number;
|
|
468
|
-
};
|
|
469
|
-
type YAxisPrimitiveProps = {
|
|
470
|
-
/**
|
|
471
|
-
* Format a tick label. Defaults to thousands-separated numbers. The second
|
|
472
|
-
* argument carries the tick `step` and the `defaultLabel`, whose precision
|
|
473
|
-
* follows the step. A formatter that adds a unit can decorate
|
|
474
|
-
* `defaultLabel` and needs no precision of its own.
|
|
475
|
-
*/
|
|
476
|
-
tickFormat?: (value: number, context: YTickContext) => string;
|
|
477
|
-
/**
|
|
478
|
-
* Maximum tick count. When omitted, the axis aims for about 5 ticks. Ticks
|
|
479
|
-
* land on human-friendly steps, so the axis can render fewer. The plot
|
|
480
|
-
* height also limits the count: a vertical axis keeps about 28px for each
|
|
481
|
-
* tick, and it drops a label that would overlap its neighbor. When every
|
|
482
|
-
* series value is an integer (counts), the axis never renders fractional
|
|
483
|
-
* ticks.
|
|
484
|
-
*/
|
|
485
|
-
tickCount?: number;
|
|
486
|
-
};
|
|
487
|
-
type ReferenceLinePrimitiveProps = {
|
|
488
|
-
/** The y value the line marks (an SLO threshold, a budget, a limit). */
|
|
489
|
-
y: number;
|
|
490
|
-
/** A short label painted above the line's right end. */
|
|
491
|
-
label?: string;
|
|
492
|
-
/** Line color; defaults to the neutral reference color. */
|
|
493
|
-
color?: SeriesColor;
|
|
494
|
-
};
|
|
495
419
|
/**
|
|
496
420
|
* Root props shared by every chart kind, WITHOUT the accessibility/interaction
|
|
497
421
|
* union or the data/x props. Public wrappers `Omit` from this base and
|
|
@@ -529,4 +453,4 @@ type TooltipPrimitiveProps = Omit<ComponentProps<"div">, "children"> & {
|
|
|
529
453
|
/** Replace the entire readout. */
|
|
530
454
|
children?: (snapshot: HoverSnapshot) => ReactNode;
|
|
531
455
|
};
|
|
532
|
-
export {
|
|
456
|
+
export { XValue as _, ChartMode as a, BarTexture as c, ContinuousXScale as d, CurveKind as f, XTickContext as g, SeriesColor as h, ChartAccessibilityProps as i, ChartDatum as l, PointShape as m, ChartRootBaseProps as n, ChartListPrimitiveProps as o, GridLines as p, LegendPrimitiveProps as r, BarOrientation as s, TooltipPrimitiveProps as t, ChartDatumEvent as u, YTickContext as v };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"tiny-invariant";import{C as t,E as n,T as r}from"./chart-BmZoTjRu.js";import{r as i,t as a}from"./chart-Bybyh2Dc.js";const o={west:-180,south:-90,east:180,north:90},s=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]],c=Math.PI/2*1.0144,l=Math.PI/180,u=(e,t)=>{let n=(Math.abs(e)<=180?e:((e+180)%360+360)%360-180)*l,r=Math.min(18,Math.abs(t)/5),i=Math.floor(r),a=r-i,o=s[i]??[1,0],u=s[i+1]??[1,0],d=s[i+2]??u,f=e=>u[e]+a*(d[e]-o[e])/2+a*a*(d[e]-2*u[e]+o[e])/2,p=c*f(1);return[n*f(0),t<0?-p:p]},d=(e,t,{inset:n})=>{let r=t.west>=180||t.east<=-180?-360*Math.floor((t.west+180)/360):0,i=Math.max(-180,t.west+r),a=Math.min(180,t.east+r),{south:o,north:s}=t,c=(o*s<0?[o,0,s]:[o,s]).flatMap(e=>[u(i,e)[0],u(a,e)[0]]),l=[u(0,o)[1],u(0,s)[1]],d=Math.min(...c),f=Math.max(...c),p=Math.min(...l),m=Math.max(...l),h=Math.max(0,e.width-n*2),g=Math.max(0,e.height-n*2),_=Math.min(h/Math.max(f-d,1e-9),g/Math.max(m-p,1e-9));return{scale:_,centerX:e.left+e.width/2-(d+f)/2*_,centerY:e.top+e.height/2+(p+m)/2*_}},f=(e,t,n)=>{let[r,i]=u(t,n);return[e.centerX+r*e.scale,e.centerY-i*e.scale]},p=(e,t)=>{let n=[],r=[0,0],i=0,a=0;for(;i<e.length;){let o=0,s=0,c;do c=e.charCodeAt(i)-63,i+=1,s|=(c&31)<<o,o+=5;while(c>=32);let l=s&1?~(s>>1):s>>1,u=(r[a]??0)+l;r[a]=u,n.push(u/t),a=1-a}return n},m=e=>{let t=[];for(let n=0;n<e.length;n+=2)t.push(...u(e[n]??0,e[n+1]??0));return t},h=(e,t,n)=>{for(let n=0;n<t.length;n+=2){let r=t[n]??0,i=t[n+1]??0;n===0?e.moveTo(r,i):e.lineTo(r,i)}n&&e.closePath()},g=e=>{let t=[];for(let n=90;n>=-90;n-=2.5)t.push(...u(e,n));return t},_=/* @__PURE__ */ new WeakMap,v=e=>{let t=_.get(e);if(t!=null)return t;let n={land:new Path2D,outline:new Path2D,graticule:new Path2D};for(let t of e.rings)h(n.land,m(p(t,e.precision)),!0);let r=g(180),i=g(-180);for(let e=i.length-2;e>=0;e-=2)r.push(i[e]??0,i[e+1]??0);h(n.outline,r,!0);for(let e=-150;e<180;e+=30)h(n.graticule,g(e),!1);for(let e=-60;e<90;e+=30)h(n.graticule,m([-180,e,180,e]),!1);return _.set(e,n),n},y=(e,t)=>{let n=new Path2D;return n.addPath(e,{a:t.scale,d:-t.scale,e:t.centerX,f:t.centerY}),n},b=(e,t)=>{let n=e*l,r=t*l;return[Math.cos(r)*Math.cos(n),Math.cos(r)*Math.sin(n),Math.sin(r)]},x=(e,t)=>{let n=b(e.longitude,e.latitude),r=b(t.longitude,t.latitude),i=Math.min(1,Math.max(-1,n[0]*r[0]+n[1]*r[1]+n[2]*r[2])),a=Math.acos(i),o=Math.max(1,Math.ceil(a/(2*l))),s=Math.sin(a),c=[],u=[c];for(let e=0;e<=o;e++){let t=e/o,i=s<1e-9?1-t:Math.sin((1-t)*a)/s,d=s<1e-9?t:Math.sin(t*a)/s,f=i*n[0]+d*r[0],p=i*n[1]+d*r[1],m=i*n[2]+d*r[2],h=Math.atan2(p,f)/l,g=Math.atan2(m,Math.hypot(f,p))/l,_=c.at(-2),v=c.at(-1);if(_!=null&&v!=null&&Math.abs(h-_)>180){let e=_>0?180:-180,t=v+(e-_)/(h+2*e-_)*(g-v);_!==e&&c.push(e,t),c=h===-e?[]:[-e,t],u.push(c)}c.push(h,g)}return u},S=(e,t)=>{let n=new Path2D;for(let r of x(e,t))h(n,m(r),!1);return n},C=(e,[t,n])=>{let r=Math.round(Math.abs(e)*10)/10;return r===0?`0.0°`:`${r.toFixed(1)}° ${e<0?n:t}`},w=(e,t)=>`${C(t,[`N`,`S`])}, ${C(e,[`E`,`W`])}`,T=.6,E=1/510,D=e=>t(Math.max(0,e)/900);var O=class{land;bounds;connectors=/* @__PURE__ */ new Map;callouts=/* @__PURE__ */ new Map;version=0;#e=null;constructor(e,t){this.land=e,this.bounds=t}createView=e=>new j(e,this);setBounds(e){this.bounds=e,this.changed()}listen(e){this.#e=e}changed(){this.version+=1,this.#e?.paint()}calloutsChanged(){this.#e?.place()}};const k=e=>`isPointInPath`in e,A=(e,t)=>e.scale===t.scale&&e.centerX===t.centerX&&e.centerY===t.centerY;var j=class{kind=`geo`;#e;#t;#n=0;#r=/* @__PURE__ */ new Float64Array;#i=null;#a=null;#o=null;#s=null;#c=null;#l=[];#u=!1;constructor(e,t){this.#e=e,this.#t=t,t.listen({paint:e.requestPaint,place:()=>{this.#u=!0,e.requestPaint()}})}settle(){this.#l=[]}tick(e){return this.#n=e,this.#l=this.#e.animates()?this.#l.filter(t=>T*(1-D(e-t.start))>=E):[],this.#l.length>0}resetProjection(){this.#h(),this.#y(),this.#b()}paint(t){let n=this.#e.colors();if(n==null)return null;e(k(t),`WorldMap paints on the canvas backend only.`);let r=this.#f();this.#u&&this.#b();let o=this.#p(r);t.fillStyle=n.resolve(`var(--world-map-ocean-color, var(--color-neutral-50))`),t.fill(o.outline),this.#e.grid()&&(t.save(),t.clip(o.outline),t.strokeStyle=n.chrome.grid,t.lineWidth=1,t.stroke(o.graticule),t.restore()),t.fillStyle=n.resolve(`var(--world-map-land-color, var(--color-neutral-200))`),t.fill(o.land),t.strokeStyle=n.chrome.grid,t.lineWidth=1,t.stroke(o.outline);for(let e of this.#m(r))t.save(),t.strokeStyle=n.resolve(e.color),t.lineWidth=1.5,t.lineCap=`round`,t.setLineDash(e.dashed?[4,4]:[]),t.stroke(e.path),t.restore();let s=this.#e.specs();if(this.#e.rowCount()===0||s.length===0)return this.#l=[],null;let c=this.#g(),l=this.#r.length>0?Math.min(c.total,a):c.total,{scale:u,centerX:d,centerY:p}=r,m=this.#r;t.save();for(let{seriesIndex:e,indexes:r}of c.runs){let a=s[e],o=c.x[e],f=c.y[e];if(a==null||o==null||f==null)continue;let h=this.#e.reveal(a.dataKey);h<E||(t.globalAlpha=h,i(t,{color:n.series.get(a.dataKey)??`currentColor`,surface:n.chrome.surface,shape:this.#e.shape(a.dataKey),totalPointCount:l,indexes:r,xAt:e=>d+(o[e]??0)*u,yAt:e=>p-(f[e]??0)*u,radiusAt:e=>m[e]??4}))}t.restore();for(let e of this.#l){let i=D(this.#n-e.start),[a,o]=f(r,e.longitude,e.latitude),c=s[e.seriesIndex];t.save(),t.globalAlpha=T*(1-i),t.strokeStyle=c==null?`currentColor`:n.series.get(c.dataKey)??`currentColor`,t.lineWidth=2,t.beginPath(),t.arc(a,o,e.radius+14*i,0,Math.PI*2),t.stroke(),t.restore()}return null}hitAt(e,t){if(!this.#d(e,t))return null;let{scale:n,centerX:r,centerY:i}=this.#f(),a=this.#g(),o=this.#e.specs(),s=this.#r,c=(e-r)/n,l=(i-t)/n,u=1/n**2,d=576*u,f=null;for(let{seriesIndex:e,indexes:t}of a.runs.toReversed()){let p=o[e],m=a.x[e],h=a.y[e];if(p!=null&&m!=null&&h!=null)for(let e=t.length-1;e>=0;e--){let a=t[e]??0,o=m[a]??0,g=h[a]??0,_=(o-c)**2+(g-l)**2,v=s.length>0&&_<=(s[a]??0)**2*u;if(!v&&_>=d)continue;let y=r+o*n,b=i-g*n;if(this.#d(y,b)&&(d=_,f={seriesKey:p.dataKey,index:a,screenX:y,screenY:b},v))return f}}return f}screenFor(e,t){let n=this.#f(),r=this.#g(),i=this.#e.columns(),a=this.#e.specs();for(let o=0;o<i.length;o++)if((t==null||a[o]?.dataKey===t)&&!Number.isNaN(i[o]?.[e]??NaN)){let t=n.centerX+(r.x[o]?.[e]??0)*n.scale,i=n.centerY-(r.y[o]?.[e]??0)*n.scale;return this.#d(t,i)?{x:t,y:i}:null}return null}plots(e){return this.screenFor(e,null)!=null}radiusAt(e){return this.#r[e]??4}#d(e,t){let n=this.#e.plot();return e>=n.left-.5&&e<=n.left+n.width+.5&&t>=n.top-.5&&t<=n.top+n.height+.5}#f(){let e=this.#e.plot(),t=this.#t.bounds,n=d(e,t??o,{inset:t==null?.5:0}),r=this.#i;return r!=null&&A(r,n)?r:(this.#i=n,this.#b(),n)}#p(e){let t=this.#a;if(t?.fit===e)return t;let n=v(this.#t.land),r={fit:e,land:y(n.land,e),outline:y(n.outline,e),graticule:y(n.graticule,e)};return this.#a=r,r}#m(e){let t=this.#t,n=this.#o;if(n!=null&&n.fit===e&&n.version===t.version)return n.lines;let r=[...t.connectors.values()].map(t=>({path:y(S(t.from,t.to),e),color:t.color,dashed:t.lineStyle===`dashed`}));return this.#o={fit:e,version:t.version,lines:r},r}#h(){let t=this.#e,i=t.sizeKey();if(i==null){this.#r=/* @__PURE__ */ new Float64Array;return}let a=t.rowCount(),o=new Float64Array(a),s=0,c=!1;for(let e=0;e<a;e++){let n=t.sourceRow(e),a=n==null?void 0:r(n,i);c||=a!==void 0;let l=typeof a==`number`&&Number.isFinite(a)&&a>0?a:0;o[e]=l,s=Math.max(s,l)}e(a===0||c,()=>n(`WorldMap.Root`,`sizeKey`,i,Array.from({length:a},(e,n)=>t.sourceRow(n)??{})));for(let e=0;e<a;e++)o[e]=Math.max(4,16*Math.sqrt((o[e]??0)/(s||1)));this.#r=o}#g(){let e=this.#e.columns(),t=this.#s;if(t?.columns===e)return t;let n=this.#_(e),r={columns:e,...this.#v(e),runs:n,total:n.reduce((e,t)=>e+t.indexes.length,0)};return this.#s=r,r}#_(e){let t=e.map(e=>this.#e.definedIndexes(e));if(this.#r.length===0)return t.map((e,t)=>({seriesIndex:t,indexes:e}));let n=t.flatMap((e,t)=>e.map(e=>({seriesIndex:t,index:e}))).toSorted((e,t)=>this.radiusAt(t.index)-this.radiusAt(e.index)),r=[];for(let{seriesIndex:e,index:t}of n){let n=r.at(-1);n?.seriesIndex===e?n.indexes.push(t):r.push({seriesIndex:e,indexes:[t]})}return r}#v(e){let t=this.#e.xs(),n=this.#e.rowCount(),r=[],i=[];for(let a of e){let e=new Float64Array(n),o=new Float64Array(n);for(let r=0;r<n;r++){let n=a[r]??NaN;if(Number.isNaN(n))continue;let[i,s]=u(t[r]??0,n);e[r]=i,o[r]=s}r.push(e),i.push(o)}return{x:r,y:i}}#y(){let e=this.#e,t=e.rowCount(),n=this.#c;if(t>5e3||t===0&&n==null){this.#c=null,this.#l=[];return}let r=n!=null&&e.animates(),i=performance.now(),a=e.xs(),o=/* @__PURE__ */ new Set,s=/* @__PURE__ */ new Map;e.columns().forEach((c,l)=>{let u=e.specs()[l]?.dataKey??``;for(let e=0;e<t;e++){let t=c[e]??NaN;if(Number.isNaN(t))continue;let d=a[e]??NaN,f=`${u}|${d}|${t}`;if(o.add(f),r&&!n.has(f)){let n=Math.max(this.radiusAt(e),s.get(f)?.radius??0);s.set(f,{seriesIndex:l,longitude:d,latitude:t,radius:n,start:i})}}}),s.size<=48&&(this.#l=[...this.#l,...s.values()].slice(-48)),this.#c=o}#b(){this.#u=!1;let e=this.#i,t=this.#t.callouts;if(e==null||t.size===0)return;let n=this.#e.plot(),r=this.#e.plotOffset();for(let{element:i,place:a,side:o,size:s}of t.values()){if(s==null)continue;let[t,c]=f(e,a.longitude,a.latitude);if(!this.#d(t,c)){i.style.visibility=`hidden`;continue}let{width:l,height:u}=s,d=this.#x(a)+8,p=Math.min(Math.max(t-l/2,n.left),Math.max(n.left,n.left+n.width-l)),m=c-d-u,h=c+d,g=m>=n.top,_=h+u<=n.top+n.height,v=o===`top`?g||!_:!_&&g,y=v?Math.max(n.top,m):Math.min(h,Math.max(n.top,n.top+n.height-u));i.dataset.side=v?`top`:`bottom`,i.style.transform=`translate(${Math.round(r.left+p)}px, ${Math.round(r.top+y)}px)`,i.style.visibility=`visible`}}#x(e){if(this.#r.length===0)return 4;let t=this.#e.xs(),n=4;for(let r of this.#e.columns())for(let i=0;i<r.length;i++)t[i]===e.longitude&&r[i]===e.latitude&&(n=Math.max(n,this.radiusAt(i)));return n}};export{w as n,O as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{createContext as e,useContext as t,useEffect as n,useId as r,useMemo as i,useRef as a}from"react";import o from"tiny-invariant";import{t as s}from"./behaviors-DHVC34f9.js";import{t as c}from"./hooks-C9b-2wGy.js";import{t as l}from"./compose-refs-Ce1vWUz0.js";import{t as u}from"./cx-DhYnQ07J.js";import{n as d}from"./cx-CfAFHj5_.js";import{t as f}from"./utils-EM6s2WEU.js";import{t as p}from"./utils-CPSttKPD.js";import{t as m}from"./radio-group-BliblUqe.js";import{t as h}from"./slot-CBcGhRdV.js";import{t as g}from"./checkbox-TX74-Iep.js";import{jsx as _,jsxs as v}from"react/jsx-runtime";const y=[],b=`[data-slot~="checkbox-group-card"] > input[type="checkbox"]`,x=e(null),S=({"data-slot":e,children:t,defaultValue:r=y,disabled:o=!1,form:u,name:d,onValueChange:p,ref:m,value:h,...g})=>{let[v,S]=s({value:h,defaultValue:r,onChange:e=>p?.([...e])}),C=a(null),w=c(e=>{let t=Array.from(e?.querySelectorAll(b)??[]),n=new Set(t.filter(e=>!e.checked).map(e=>e.value)),r=v.filter(e=>!n.has(e)),i=t.filter(e=>e.checked&&!r.includes(e.value)).map(e=>e.value);(r.length!==v.length||i.length>0)&&S([...r,...i])}),T=a(null),E=l(m,C,w),D=()=>C.current?.querySelectorAll(b)??[],O=c(()=>{for(let e of D())e.defaultChecked=e.checked}),k=c(()=>{S(r);let e=h??r;for(let t of D())t.checked=e.includes(t.value)});n(()=>{let e=C.current,t=u==null?e?.closest(`form`):e?.ownerDocument.getElementById(u),n,r=e=>{O(),n=window.setTimeout(()=>{e.defaultPrevented||k()})};return t?.addEventListener(`reset`,r),()=>{t?.removeEventListener(`reset`,r),window.clearTimeout(n)}},[k,u,O]);let A=i(()=>({value:v,setChecked:({value:e,checked:t})=>{let n=T.current,r=n!=null&&n.from===v?n.value:v;if(r.includes(e)===t)return;let i=t?[...r,e]:r.filter(t=>t!==e);T.current={from:v,value:i},queueMicrotask(()=>{T.current=null}),S(i)},disabled:o,name:d||void 0,form:d?u:void 0}),[v,S,o,d,u]);return/* @__PURE__ */ _(x.Provider,{value:A,children:/* @__PURE__ */ _(`div`,{role:`group`,"data-slot":f(e,`checkbox-group`),...g,ref:E,children:t})})},C=({"aria-describedby":e,"aria-label":n,"aria-labelledby":s,autoFocus:c,children:l,className:u,"data-slot":h,disabled:y=!1,id:b,onClick:S,value:C,...w})=>{let T=t(x);o(T,`CheckboxGroup.Card must be rendered inside CheckboxGroup.Root.`);let E=r(),D=b??E,O=`${E}-title`,k=`${E}-description`,A=`${E}-content`,j=a(null),M=a(!1),N=T.value.includes(C),P=T.disabled||y,F=i(()=>({titleId:O,descriptionId:k,radioId:D,contentId:A,checked:N,disabled:P}),[O,k,D,A,N,P]);return/* @__PURE__ */ _(m.Provider,{value:F,children:/* @__PURE__ */ v(`div`,{"data-slot":f(h,`checkbox-group-card`),className:d(`group/checkbox border-card bg-card [&_label]:cursor-inherit relative isolate block rounded-md border p-4 text-sm cursor-pointer has-[>input:disabled]:cursor-default has-[>input:focus-visible]:focus-ring has-[>input:disabled]:border-form/50 not-has-[>input:disabled]:hover:bg-card-hover has-[>input:checked]:border-accent-500/50 has-[>input:checked]:bg-selected-menu-item not-has-[>input:disabled]:hover:has-[>input:checked]:bg-active-selected-menu-item`,u),...w,onClick:e=>{if(M.current)return;S?.(e);let t=j.current;if(t==null)return;if(e.target===t){e.detail>0&&!e.defaultPrevented&&t.focus({preventScroll:!0});return}let n=e.target instanceof Element?e.target.closest(p):null;e.defaultPrevented||n!=null&&e.currentTarget.contains(n)||(t.focus({preventScroll:!0}),M.current=!0,t.click(),M.current=!1)},children:[/* @__PURE__ */ _(g,{"aria-describedby":e?`${e} ${k}`:k,"aria-label":n,"aria-labelledby":s??(n==null?A:void 0),autoFocus:c,checked:N,className:`absolute inset-0 z-1 m-0 size-full cursor-inherit opacity-0! disabled:pointer-events-none`,defaultValue:C,disabled:P,form:T.form,id:D,name:T.name,onCheckedChange:e=>T.setChecked({value:C,checked:e}),ref:e=>{if(j.current=e,e==null)return;e.getAttribute(`aria-labelledby`)===A&&Array.from(e.parentElement?.getElementsByTagName(`label`)??[]).some(e=>e.htmlFor===D)&&e.removeAttribute(`aria-labelledby`);let t=e.nextElementSibling;Array.from(t?.querySelectorAll(`a[href], button, details, input, select, textarea, label, [role="button"], [role="link"], [role="menuitem"], [tabindex]:not([tabindex="-1"]), [contenteditable="true"]`)??[]).some(e=>!(e instanceof HTMLLabelElement&&e.htmlFor===D))?t?.removeAttribute(`aria-hidden`):t?.setAttribute(`aria-hidden`,`true`)}}),/* @__PURE__ */ _(`div`,{id:A,"data-slot":`checkbox-group-card-label`,className:`covered-item-content contents`,children:l})]})})},w=/* @__PURE__ */ _(`span`,{className:u(`block size-4 shrink-0 rounded border bg-center bg-no-repeat`,`bg-form border-form`,`group-has-[>input:checked]/checkbox:border-accent-600 group-has-[>input:checked]/checkbox:bg-accent-600 group-has-[>input:checked]/checkbox:bg-checked-icon`,`group-hover/checkbox:group-has-[>input:enabled:not(:checked)]/checkbox:border-neutral-400`,`group-has-[>input:disabled]/checkbox:opacity-50`)}),T=({"data-slot":e,children:n,className:r,...i})=>{let a=t(m),o=typeof n==`function`?n({checked:a?.checked??!1,disabled:a?.disabled??!1}):n;return/* @__PURE__ */ _(`span`,{"data-slot":f(e,`checkbox-group-indicator`),className:d(`inline-flex size-5 select-none items-center justify-center shrink-0`,r),...i,children:n==null?w:o})},E=({"data-slot":e,asChild:t=!1,className:n,...r})=>/* @__PURE__ */ _(t?h:`div`,{"data-slot":f(e,`checkbox-group-item-content`),className:d(`min-w-0 flex-1 group-has-[>input:disabled]/checkbox:opacity-50`,n),...r});export{S as i,T as n,E as r,C as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e({allSelected:e,someSelected:t}){return e?!0:t?`indeterminate`:!1}export{e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{useRef as e,useState as t}from"react";import{t as n}from"./hooks-DejuqCNF.js";import{t as r}from"./compose-refs-Ce1vWUz0.js";import{t as i}from"./cx-DhYnQ07J.js";import{t as a}from"./utils-EM6s2WEU.js";import{n as o}from"./field-BRYypbjO.js";import{n as s}from"./field-CYAaNexp.js";import{jsx as c}from"react/jsx-runtime";const l=e=>e===`indeterminate`,u=({"data-slot":u,"aria-invalid":d,className:f,checked:p,defaultChecked:m,defaultValue:h=`on`,onChange:g,onCheckedChange:_,onClick:v,readOnly:y,ref:b,validation:x,...S})=>{let C=e(null),w=r(C,b),[T]=t(m),E=s(),{ariaInvalid:D,validation:O}=o({"aria-invalid":d,validation:x??E}),k=p??T;n(()=>{C.current&&(C.current.indeterminate=l(k))},[k]);let A=p==null?{defaultChecked:l(T)?void 0:T}:{checked:!l(p)&&p};return/* @__PURE__ */ c(`input`,{"aria-checked":l(p)?`mixed`:p,"aria-invalid":D,"aria-readonly":y||void 0,"data-slot":a(u,`checkbox`),className:i(`border-form bg-form shrink-0 cursor-pointer select-none appearance-none rounded border disabled:cursor-default disabled:opacity-50`,`bg-center bg-no-repeat focus:outline-hidden`,`focus-visible:border-accent-600 focus-visible:focus-ring`,`checked:border-accent-600 checked:bg-accent-600 checked:bg-checked-icon`,`indeterminate:border-accent-600 indeterminate:bg-accent-600 indeterminate:bg-indeterminate-icon`,`data-[validation=success]:border-success-600 data-[validation=success]:checked:bg-success-600 data-[validation=success]:indeterminate:bg-success-600 focus-visible:data-[validation=success]:border-success-600 focus-visible:data-[validation=success]:ring-focus-success`,`data-[validation=warning]:border-warning-600 data-[validation=warning]:checked:bg-warning-600 data-[validation=warning]:indeterminate:bg-warning-600 focus-visible:data-[validation=warning]:border-warning-600 focus-visible:data-[validation=warning]:ring-focus-warning`,`data-[validation=error]:border-danger-600 data-[validation=error]:checked:bg-danger-600 data-[validation=error]:indeterminate:bg-danger-600 focus-visible:data-[validation=error]:border-danger-600 focus-visible:data-[validation=error]:ring-focus-danger`,`where:block where:size-4 where:p-0`,f),...A,"data-validation":O||void 0,defaultValue:h,onChange:g==null&&_==null?void 0:e=>{g?.(e),y||_?.(e.currentTarget.checked)},onClick:e=>{y?e.preventDefault():v?.(e)},readOnly:y,ref:w,type:`checkbox`,...S})};export{u as t};
|