@ngrok/mantle 0.94.0 → 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 +11 -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 +8 -359
- package/dist/accordion.js +1 -1
- package/dist/agent.json +464 -92
- package/dist/alert-DCGSrVTa.js +1 -0
- package/dist/{alert-HffaioZM.d.ts → alert-Dz541Ve9.d.ts} +10 -196
- 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 +9 -590
- 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 +3 -1054
- 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 +6 -6
- 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 +6 -581
- 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 +5 -277
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +10 -9
- 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 +65 -555
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CokCtIvB.js +1 -0
- package/dist/browser-only-ymFoM3Ya.js +1 -0
- package/dist/browser-only.js +1 -1
- package/dist/button-Bqm7U0OC.js +1 -0
- package/dist/{button-K0pKc3GN.d.ts → button-C6-6TecO.d.ts} +5 -5
- package/dist/{button-BGwOPjGV.d.ts → button-CL17Dxza.d.ts} +28 -25
- package/dist/button-CRCiBPEF.js +1 -0
- package/dist/{button-Cgf2IcEC.d.ts → button-CRMoQyum.d.ts} +27 -28
- 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 +3 -300
- 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-jitNqimS.d.ts → chart-XvStK-oM.d.ts} +23 -99
- 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 +60 -9
- package/dist/checkbox.js +1 -1
- package/dist/choice-BekuLm-b.d.ts +217 -0
- 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-W3kWPxCJ.js → code-block-B-xD4_RW.js} +1 -1
- 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-BGdV4Yty.d.ts → code-block-Cs1Lcmdr.d.ts} +82 -253
- 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 -693
- 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 +4 -4
- 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 +5 -468
- 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 +91 -1135
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdRUneoc.js +1 -0
- 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 +23 -17
- package/dist/cx.js +1 -1
- package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
- 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 +21 -1217
- 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 +3 -3
- 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-BeLOGKwE.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 +126 -17
- 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 +9 -281
- package/dist/hover-card.js +1 -1
- package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +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-DXDyhy2N.d.ts → icon-Dqn_LLrR.d.ts} +2 -2
- package/dist/{icon-NYvyyRMG.d.ts → icon-KTcDR4--.d.ts} +2 -2
- package/dist/icon.d.ts +3 -3
- 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.d.ts +2 -2
- package/dist/icons.js +1 -1
- package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
- 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-q8o5uMhW.d.ts → input-Bvpu3ruQ.d.ts} +2 -2
- package/dist/input.d.ts +5 -5
- package/dist/input.js +1 -1
- package/dist/kbd-Bz_Rbpv8.js +1 -0
- package/dist/kbd.d.ts +5 -5
- package/dist/kbd.js +1 -1
- package/dist/{label-r2sJcSQ4.d.ts → label-DZpKu3Pu.d.ts} +8 -8
- 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 +11 -3
- 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 +5 -569
- 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 +9 -406
- package/dist/list.js +1 -1
- package/dist/live-region-78gbKwlB.js +1 -0
- package/dist/live-region.d.ts +2 -2
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +50 -26
- package/dist/main-9d96oUPG.js +1 -0
- package/dist/main.d.ts +1 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +1304 -910
- package/dist/media-object-parts.d.ts +65 -0
- package/dist/media-object-parts.js +1 -0
- package/dist/media-object.d.ts +5 -121
- 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 +39 -304
- 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.d.ts +6 -6
- 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 +5 -634
- package/dist/query.js +1 -1
- package/dist/radio-group-B9jtIbV1.d.ts +39 -0
- package/dist/radio-group-BliblUqe.js +1 -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 +6 -441
- 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 +5 -575
- 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 +7 -647
- package/dist/selectable-list.js +1 -1
- package/dist/separator-BB1ohsjn.js +1 -0
- package/dist/{separator-QfH0ot5K.d.ts → separator-BzHNVyyv.d.ts} +2 -2
- 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 -1208
- package/dist/sheet.js +1 -1
- package/dist/sidebar-CsC9fyPL.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 +5 -5
- 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 +150 -16
- 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-tuk2J6bY.d.ts +50 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/source-all.css +5 -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 +6 -495
- package/dist/strata.js +1 -1
- package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
- package/dist/switch-DajWYrq3.js +1 -0
- package/dist/switch.d.ts +37 -5
- package/dist/switch.js +1 -1
- package/dist/{table-rWiVWEgB.d.ts → table-C2KnE83u.d.ts} +6 -445
- 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 +2 -2
- 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 +26 -22
- package/dist/theme-switcher.js +1 -1
- package/dist/theme-xoFnLba6.js +1 -0
- package/dist/theme.d.ts +84 -77
- 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 +3026 -0
- package/dist/tokens.json +4867 -0
- package/dist/tokens.resolver.json +37 -0
- 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 +4 -6
- 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/{copy-to-clipboard-DInu78k_.js → utils-Dd83caRw.js} +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +2 -2
- 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 +30 -19
- package/dist/alert-CH99Rw-R.js +0 -1
- package/dist/anchor-CgcbWEUs.js +0 -1
- package/dist/browser-only-BTSrYWLj.js +0 -1
- package/dist/button-69InNC_m.js +0 -1
- package/dist/button-BQZ6eoD3.js +0 -1
- package/dist/button-BWGUuWnu.js +0 -1
- package/dist/button-Cu9e3SM7.js +0 -1
- package/dist/chart-BO9EwQ60.js +0 -1
- package/dist/chart-CE5Uaqz9.js +0 -1
- package/dist/chart-DCTGGlWL.js +0 -1
- package/dist/chart-DudCw24t.js +0 -2
- package/dist/checkbox-CS504fKk.js +0 -1
- package/dist/choice-BwfmbepO.d.ts +0 -405
- package/dist/choice-uyYccm0A.js +0 -1
- package/dist/clsx-DUGZgXfJ.js +0 -1
- package/dist/clsx-Dj3RWZ2l.js +0 -1
- package/dist/code-DUJzSl4K.js +0 -1
- package/dist/compose-refs-sFdxsL7k.js +0 -1
- package/dist/cx-CK7o_rVv.js +0 -1
- package/dist/dialog-B9JAGy_x.d.ts +0 -28
- package/dist/dialog-CsugEt2A.js +0 -1
- package/dist/dialog-DD5H3EH1.d.ts +0 -942
- package/dist/dropdown-menu-DHdgaw4P.js +0 -1
- package/dist/dropdown-menu-DmDxYPde.d.ts +0 -775
- package/dist/field-Bihblt8U.js +0 -1
- package/dist/field-CPvjazWN.js +0 -1
- package/dist/icon-BudQMD2S.js +0 -1
- package/dist/icon-kK0c-POG.js +0 -1
- package/dist/icons-4JA-SGfv.js +0 -1
- package/dist/icons-CDLz5lpI.js +0 -1
- package/dist/icons-CSwTVV2m.js +0 -1
- package/dist/input-DHovzBjS.js +0 -1
- package/dist/input-DQyN6gN0.js +0 -1
- package/dist/interactive-target-BXScNeOr.js +0 -1
- package/dist/kbd-CLHsJ99p.js +0 -1
- package/dist/label-DmDwzPD8.js +0 -1
- package/dist/layer-container-kEQiE4zV.js +0 -1
- package/dist/list-CO_yLdln.js +0 -1
- package/dist/live-region-DQ1QLv3L.js +0 -1
- package/dist/main-CC1L9IsH.js +0 -1
- package/dist/popover-BhTFutCz.d.ts +0 -1
- package/dist/popover-DxOqLKxy.js +0 -1
- package/dist/popover-lwkwWcRW.d.ts +0 -291
- package/dist/primitive-Dz9Al-us.js +0 -1
- package/dist/radio-group-jj2abc0t.js +0 -1
- package/dist/radio-group-sLz5AA9I.d.ts +0 -27
- package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
- package/dist/select-BqmpVJJT.d.ts +0 -890
- package/dist/select-C6Su0dU0.js +0 -1
- package/dist/separator-DfzxVutO.js +0 -1
- package/dist/shake-DL6WhMXM.js +0 -1
- package/dist/sheet-Bd2LIhzF.js +0 -1
- package/dist/skeleton-DBpI-ko5.js +0 -1
- package/dist/slot-D12N_fZJ.d.ts +0 -67
- package/dist/slot-DdYN1L1C.js +0 -1
- package/dist/table-CFHiDBW8.js +0 -1
- package/dist/theme-DdZgLvKH.js +0 -1
- package/dist/tooltip-CpK3XTor.d.ts +0 -283
- package/dist/tooltip-b6oiTaWq.js +0 -1
- package/dist/use-breakpoint--mo7kr9d.js +0 -1
- package/dist/use-callback-ref-BvVyI5K1.js +0 -1
- package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
- package/dist/use-inert-siblings-CNmNuS2h.js +0 -1
- package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
- package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
- package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
- package/dist/use-matches-media-query-m860lols.js +0 -1
- package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
- package/dist/use-swipe-to-dismiss-i__cTF2v.js +0 -1
- /package/dist/{suggestions-Ciz2vaJO.js → query-filter-Ciz2vaJO.js} +0 -0
- /package/dist/{radio-group-HDVxTNPi.js → sidebar-HDVxTNPi.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/{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
|
@@ -3,173 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
5
5
|
*/
|
|
6
|
-
import
|
|
7
|
-
import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
|
|
8
|
-
import { ComponentProps } from "react";
|
|
9
|
-
/**
|
|
10
|
-
* The outer frame of a centered page flow. Renders a `<div>` with
|
|
11
|
-
* `flex min-h-full flex-col` so it fills its nearest sized ancestor and stacks
|
|
12
|
-
* `CenteredLayout.Notice` and `CenteredLayout.Header` (pinned top),
|
|
13
|
-
* `CenteredLayout.Body` (which grows), and `CenteredLayout.Footer` (pinned
|
|
14
|
-
* bottom). Consumers whose host requires an exact height can merge `h-full`
|
|
15
|
-
* via `className` — `cx` is tailwind-merge-backed, so the override is
|
|
16
|
-
* deterministic.
|
|
17
|
-
*
|
|
18
|
-
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```tsx
|
|
22
|
-
* <CenteredLayout.Root>
|
|
23
|
-
* <SkipToMainLink />
|
|
24
|
-
* <CenteredLayout.Body>
|
|
25
|
-
* <a href="https://ngrok.com">
|
|
26
|
-
* <NgrokWordmarkIcon className="h-auto w-24" />
|
|
27
|
-
* </a>
|
|
28
|
-
* <Main>
|
|
29
|
-
* <SignInCard />
|
|
30
|
-
* </Main>
|
|
31
|
-
* </CenteredLayout.Body>
|
|
32
|
-
* <CenteredLayout.Footer>
|
|
33
|
-
* <ThemeSwitcher />
|
|
34
|
-
* </CenteredLayout.Footer>
|
|
35
|
-
* </CenteredLayout.Root>
|
|
36
|
-
* ```
|
|
37
|
-
*/
|
|
38
|
-
declare const Root: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
39
|
-
/**
|
|
40
|
-
* A full-window-width strip pinned above everything else in the layout —
|
|
41
|
-
* including `CenteredLayout.Header` — for maintenance notices, environment
|
|
42
|
-
* warnings, and similar app-wide messaging. Renders an unstyled `<div>`
|
|
43
|
-
* (`w-full shrink-0`): the notice content brings its own colors and layout,
|
|
44
|
-
* and the part collapses to nothing when empty, so it can stay mounted and
|
|
45
|
-
* conditionally render its contents. The same slot contract as
|
|
46
|
-
* `AppLayout.Notice`, so an app-wide banner composes identically across
|
|
47
|
-
* mantle's layouts. Deliberately
|
|
48
|
-
* not named Banner — `CenteredLayout.Header` renders the page's `<header>`
|
|
49
|
-
* (the ARIA `banner` landmark), and this part is not that. Optional: omitting
|
|
50
|
-
* it is fine.
|
|
51
|
-
*
|
|
52
|
-
* On flows that scroll (checkout, plan pickers), the strip scrolls away with
|
|
53
|
-
* the page by default; merge `sticky top-0 z-20` via `className` to pin it to
|
|
54
|
-
* the window. To pin it alongside a sticky `Header`, wrap the two strips in
|
|
55
|
-
* a single `sticky top-0` container instead — two elements pinned at `top-0`
|
|
56
|
-
* overlap each other once the page scrolls.
|
|
57
|
-
*
|
|
58
|
-
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```tsx
|
|
62
|
-
* <CenteredLayout.Root>
|
|
63
|
-
* <CenteredLayout.Notice>
|
|
64
|
-
* {isUnderMaintenance && <MaintenanceBanner />}
|
|
65
|
-
* </CenteredLayout.Notice>
|
|
66
|
-
* <CenteredLayout.Body>
|
|
67
|
-
* <Main>
|
|
68
|
-
* <SignInCard />
|
|
69
|
-
* </Main>
|
|
70
|
-
* </CenteredLayout.Body>
|
|
71
|
-
* </CenteredLayout.Root>
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
declare const Notice: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
75
|
-
/**
|
|
76
|
-
* A utility strip at the top of the layout — an account chip, a close/dismiss
|
|
77
|
-
* button, and similar page furniture for focused flows (checkout, plan
|
|
78
|
-
* pickers). Renders a semantic `<header>` (a page-level frame, so it is
|
|
79
|
-
* exposed as a `banner` landmark when not nested inside a sectioning element)
|
|
80
|
-
* with `flex shrink-0 items-center px-4 py-4`. It sits **outside** the
|
|
81
|
-
* centered `flex-1` region, mirroring `CenteredLayout.Footer`. Optional:
|
|
82
|
-
* omitting it is fine.
|
|
83
|
-
*
|
|
84
|
-
* To pin it to the window while the page scrolls (e.g. a close button that
|
|
85
|
-
* stays reachable), merge `sticky top-0 z-10` via `className` — prefer
|
|
86
|
-
* `sticky` over `fixed`, which removes the strip from flow and underlaps the
|
|
87
|
-
* content below it.
|
|
88
|
-
*
|
|
89
|
-
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
90
|
-
*
|
|
91
|
-
* @example
|
|
92
|
-
* ```tsx
|
|
93
|
-
* <CenteredLayout.Root>
|
|
94
|
-
* <CenteredLayout.Header className="sticky top-0 z-10 justify-between">
|
|
95
|
-
* <AccountChip />
|
|
96
|
-
* <IconButton appearance="ghost" intent="neutral" type="button" label="Close" icon={<XIcon />} />
|
|
97
|
-
* </CenteredLayout.Header>
|
|
98
|
-
* <CenteredLayout.Body>
|
|
99
|
-
* <div className="w-full max-w-5xl">
|
|
100
|
-
* <PlanPicker />
|
|
101
|
-
* </div>
|
|
102
|
-
* </CenteredLayout.Body>
|
|
103
|
-
* </CenteredLayout.Root>
|
|
104
|
-
* ```
|
|
105
|
-
*/
|
|
106
|
-
declare const Header: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"header"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
107
|
-
/**
|
|
108
|
-
* The growing, centered region of the layout. Renders a `<div>` with
|
|
109
|
-
* `flex flex-1 flex-col items-center justify-center gap-6 py-4` so its
|
|
110
|
-
* children are centered in the space left over by `CenteredLayout.Header`
|
|
111
|
-
* and `CenteredLayout.Footer`. Content taller than the viewport top-flows
|
|
112
|
-
* and the page scrolls, because `Root` grows (`min-h-full`) instead of
|
|
113
|
-
* clipping.
|
|
114
|
-
*
|
|
115
|
-
* By convention the brand mark (a fully-styled logo/wordmark anchor) is the
|
|
116
|
-
* **first child** of `Body` — there is deliberately no `Logo` part because it
|
|
117
|
-
* would own nothing: vertical spacing comes from `Body`'s `gap-6`, and the
|
|
118
|
-
* mark arrives as already-styled JSX.
|
|
119
|
-
*
|
|
120
|
-
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
121
|
-
*
|
|
122
|
-
* @example
|
|
123
|
-
* ```tsx
|
|
124
|
-
* <CenteredLayout.Root>
|
|
125
|
-
* <SkipToMainLink />
|
|
126
|
-
* <CenteredLayout.Body>
|
|
127
|
-
* <a href="https://ngrok.com">
|
|
128
|
-
* <NgrokWordmarkIcon className="h-auto w-24" />
|
|
129
|
-
* </a>
|
|
130
|
-
* <Main>
|
|
131
|
-
* <SignInCard />
|
|
132
|
-
* </Main>
|
|
133
|
-
* </CenteredLayout.Body>
|
|
134
|
-
* <CenteredLayout.Footer>
|
|
135
|
-
* <ThemeSwitcher />
|
|
136
|
-
* </CenteredLayout.Footer>
|
|
137
|
-
* </CenteredLayout.Root>
|
|
138
|
-
* ```
|
|
139
|
-
*/
|
|
140
|
-
declare const Body: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
141
|
-
/**
|
|
142
|
-
* A pinned utility strip at the bottom of the layout — a theme switcher,
|
|
143
|
-
* legal links, and similar page furniture. Renders a semantic `<footer>`
|
|
144
|
-
* (a page-level frame, so it is exposed as a `contentinfo` landmark — unlike
|
|
145
|
-
* `Card.Footer`'s generic div) with `flex shrink-0 items-center px-4 py-4`.
|
|
146
|
-
* It sits **outside** the centered `flex-1` region — which is exactly why
|
|
147
|
-
* `Body` exists as a separate part. Optional: omitting it is fine.
|
|
148
|
-
*
|
|
149
|
-
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
150
|
-
*
|
|
151
|
-
* @example
|
|
152
|
-
* ```tsx
|
|
153
|
-
* <CenteredLayout.Root>
|
|
154
|
-
* <SkipToMainLink />
|
|
155
|
-
* <CenteredLayout.Body>
|
|
156
|
-
* <a href="https://ngrok.com">
|
|
157
|
-
* <NgrokWordmarkIcon className="h-auto w-24" />
|
|
158
|
-
* </a>
|
|
159
|
-
* <Main>
|
|
160
|
-
* <SignInCard />
|
|
161
|
-
* </Main>
|
|
162
|
-
* </CenteredLayout.Body>
|
|
163
|
-
* <CenteredLayout.Footer>
|
|
164
|
-
* <ThemeSwitcher />
|
|
165
|
-
* </CenteredLayout.Footer>
|
|
166
|
-
* </CenteredLayout.Root>
|
|
167
|
-
* ```
|
|
168
|
-
*/
|
|
169
|
-
declare const Footer: ({ asChild, children, className, "data-slot": dataSlot, ...props }: ComponentProps<"footer"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
|
|
6
|
+
import * as CenteredLayoutParts from "./centered-layout-parts.js";
|
|
170
7
|
/**
|
|
171
8
|
* A viewport-filling centered page flow for sign-in, sign-up, onboarding,
|
|
172
|
-
* 404, checkout, and other focused full-page states. It owns structure only
|
|
9
|
+
* 404, checkout, and other focused full-page states. It owns structure only:
|
|
173
10
|
* the flex/overflow skeleton and region ordering. App state (routing,
|
|
174
11
|
* sessions) never enters it, and landmark semantics stay compositional:
|
|
175
12
|
* brand marks, links, and the `Main` landmark arrive as composed JSX.
|
|
@@ -210,139 +47,5 @@ declare const Footer: ({ asChild, children, className, "data-slot": dataSlot, ..
|
|
|
210
47
|
* </CenteredLayout.Root>
|
|
211
48
|
* ```
|
|
212
49
|
*/
|
|
213
|
-
declare const CenteredLayout:
|
|
214
|
-
/**
|
|
215
|
-
* The outer frame of a centered page flow. Fills its nearest sized ancestor
|
|
216
|
-
* (`min-h-full`) and stacks `Notice` and `Header` (pinned top), `Body`
|
|
217
|
-
* (which grows), and `Footer` (pinned bottom). Merge `h-full` via
|
|
218
|
-
* `className` when the host requires an exact height.
|
|
219
|
-
*
|
|
220
|
-
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
221
|
-
*
|
|
222
|
-
* @example
|
|
223
|
-
* ```tsx
|
|
224
|
-
* <CenteredLayout.Root>
|
|
225
|
-
* <SkipToMainLink />
|
|
226
|
-
* <CenteredLayout.Body>
|
|
227
|
-
* <a href="https://ngrok.com">
|
|
228
|
-
* <NgrokWordmarkIcon className="h-auto w-24" />
|
|
229
|
-
* </a>
|
|
230
|
-
* <Main>
|
|
231
|
-
* <SignInCard />
|
|
232
|
-
* </Main>
|
|
233
|
-
* </CenteredLayout.Body>
|
|
234
|
-
* <CenteredLayout.Footer>
|
|
235
|
-
* <ThemeSwitcher />
|
|
236
|
-
* </CenteredLayout.Footer>
|
|
237
|
-
* </CenteredLayout.Root>
|
|
238
|
-
* ```
|
|
239
|
-
*/
|
|
240
|
-
readonly Root: typeof Root;
|
|
241
|
-
/**
|
|
242
|
-
* A full-window-width strip pinned above everything else in the layout —
|
|
243
|
-
* including `Header` — for maintenance notices and environment warnings.
|
|
244
|
-
* Renders an unstyled `<div>` (`w-full shrink-0`): the notice content
|
|
245
|
-
* brings its own colors, and the part collapses to nothing when empty. The
|
|
246
|
-
* same slot contract as `AppLayout.Notice`, so an app-wide banner
|
|
247
|
-
* composes identically across mantle's layouts. Merge
|
|
248
|
-
* `sticky top-0 z-20` via `className` to pin it while a long flow scrolls
|
|
249
|
-
* (to pin it alongside a sticky `Header`, wrap the two strips in a single
|
|
250
|
-
* `sticky top-0` container instead — two elements pinned at `top-0`
|
|
251
|
-
* overlap once the page scrolls). Optional — omitting it is fine.
|
|
252
|
-
*
|
|
253
|
-
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
254
|
-
*
|
|
255
|
-
* @example
|
|
256
|
-
* ```tsx
|
|
257
|
-
* <CenteredLayout.Root>
|
|
258
|
-
* <CenteredLayout.Notice>
|
|
259
|
-
* {isUnderMaintenance && <MaintenanceBanner />}
|
|
260
|
-
* </CenteredLayout.Notice>
|
|
261
|
-
* <CenteredLayout.Body>
|
|
262
|
-
* <Main>
|
|
263
|
-
* <SignInCard />
|
|
264
|
-
* </Main>
|
|
265
|
-
* </CenteredLayout.Body>
|
|
266
|
-
* </CenteredLayout.Root>
|
|
267
|
-
* ```
|
|
268
|
-
*/
|
|
269
|
-
readonly Notice: typeof Notice;
|
|
270
|
-
/**
|
|
271
|
-
* A utility strip at the top of the layout (account chip, close button)
|
|
272
|
-
* rendered as a semantic `<header>` (`banner` landmark) outside the
|
|
273
|
-
* centered `flex-1` region — the mirror of `Footer`. Merge
|
|
274
|
-
* `sticky top-0 z-10` via `className` to pin it to the window while the
|
|
275
|
-
* page scrolls. Optional — omitting it is fine.
|
|
276
|
-
*
|
|
277
|
-
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
278
|
-
*
|
|
279
|
-
* @example
|
|
280
|
-
* ```tsx
|
|
281
|
-
* <CenteredLayout.Root>
|
|
282
|
-
* <CenteredLayout.Header className="sticky top-0 z-10 justify-between">
|
|
283
|
-
* <AccountChip />
|
|
284
|
-
* <IconButton appearance="ghost" intent="neutral" type="button" label="Close" icon={<XIcon />} />
|
|
285
|
-
* </CenteredLayout.Header>
|
|
286
|
-
* <CenteredLayout.Body>
|
|
287
|
-
* <div className="w-full max-w-5xl">
|
|
288
|
-
* <PlanPicker />
|
|
289
|
-
* </div>
|
|
290
|
-
* </CenteredLayout.Body>
|
|
291
|
-
* </CenteredLayout.Root>
|
|
292
|
-
* ```
|
|
293
|
-
*/
|
|
294
|
-
readonly Header: typeof Header;
|
|
295
|
-
/**
|
|
296
|
-
* The growing, centered region of the layout. By convention the brand mark
|
|
297
|
-
* (a fully-styled logo/wordmark anchor) is its **first child** — spacing
|
|
298
|
-
* comes from `Body`'s `gap-6`, so no dedicated `Logo` part exists.
|
|
299
|
-
*
|
|
300
|
-
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
301
|
-
*
|
|
302
|
-
* @example
|
|
303
|
-
* ```tsx
|
|
304
|
-
* <CenteredLayout.Root>
|
|
305
|
-
* <SkipToMainLink />
|
|
306
|
-
* <CenteredLayout.Body>
|
|
307
|
-
* <a href="https://ngrok.com">
|
|
308
|
-
* <NgrokWordmarkIcon className="h-auto w-24" />
|
|
309
|
-
* </a>
|
|
310
|
-
* <Main>
|
|
311
|
-
* <SignInCard />
|
|
312
|
-
* </Main>
|
|
313
|
-
* </CenteredLayout.Body>
|
|
314
|
-
* <CenteredLayout.Footer>
|
|
315
|
-
* <ThemeSwitcher />
|
|
316
|
-
* </CenteredLayout.Footer>
|
|
317
|
-
* </CenteredLayout.Root>
|
|
318
|
-
* ```
|
|
319
|
-
*/
|
|
320
|
-
readonly Body: typeof Body;
|
|
321
|
-
/**
|
|
322
|
-
* A pinned utility strip (theme switcher, legal links) rendered as a
|
|
323
|
-
* semantic `<footer>` (`contentinfo` landmark) outside the centered
|
|
324
|
-
* `flex-1` region. Optional — omitting it is fine.
|
|
325
|
-
*
|
|
326
|
-
* @see https://mantle.ngrok.com/layouts/centered-layout
|
|
327
|
-
*
|
|
328
|
-
* @example
|
|
329
|
-
* ```tsx
|
|
330
|
-
* <CenteredLayout.Root>
|
|
331
|
-
* <SkipToMainLink />
|
|
332
|
-
* <CenteredLayout.Body>
|
|
333
|
-
* <a href="https://ngrok.com">
|
|
334
|
-
* <NgrokWordmarkIcon className="h-auto w-24" />
|
|
335
|
-
* </a>
|
|
336
|
-
* <Main>
|
|
337
|
-
* <SignInCard />
|
|
338
|
-
* </Main>
|
|
339
|
-
* </CenteredLayout.Body>
|
|
340
|
-
* <CenteredLayout.Footer>
|
|
341
|
-
* <ThemeSwitcher />
|
|
342
|
-
* </CenteredLayout.Footer>
|
|
343
|
-
* </CenteredLayout.Root>
|
|
344
|
-
* ```
|
|
345
|
-
*/
|
|
346
|
-
readonly Footer: typeof Footer;
|
|
347
|
-
};
|
|
50
|
+
declare const CenteredLayout: typeof CenteredLayoutParts;
|
|
348
51
|
export { CenteredLayout };
|
package/dist/centered-layout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export*as CenteredLayout from"./centered-layout-parts.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{n as e}from"./cx-CfAFHj5_.js";import{t}from"./utils-EM6s2WEU.js";import{t as n}from"./compose-refs-BdRUneoc.js";import{t as r}from"./compose-refs-Ce1vWUz0.js";import{t as i}from"./hooks-C9b-2wGy.js";import{t as a}from"./hooks-BeLOGKwE.js";import{D as o,T as s,a as c,b as l,c as u,d,h as f,l as ee,m as p,n as te,o as ne,p as m,s as re,t as h,u as ie,v as g,w as ae,x as _,y as v}from"./chart-BmZoTjRu.js";import{createContext as y,useCallback as oe,useContext as se,useEffect as b,useId as ce,useLayoutEffect as x,useMemo as le,useRef as S,useState as C,useSyncExternalStore as w}from"react";import ue from"tiny-invariant";import{Fragment as de,jsx as T,jsxs as E}from"react/jsx-runtime";const fe=y(null),D=e=>{let t=se(fe);return ue(t,()=>`${e} must be composed inside ${e.split(`.`)[0]}.Root. It registers into the chart it belongs to and renders nothing on its own.`),t},O=e=>w(e.subscribe,()=>e.getSnapshot().series,()=>e.getSnapshot().series),k=(e,t)=>{let n=Object.keys(e);return n.length===Object.keys(t).length&&n.every(n=>Object.hasOwn(t,n)&&Object.is(Reflect.get(e,n),Reflect.get(t,n)))},pe=e=>{let[t,n]=C(e);return k(t,e)?t:(n(e),e)},me=e=>w(e.subscribe,()=>e.getSnapshot().orientation,()=>e.getSnapshot().orientation),A=(e,t,n=3)=>`repeating-linear-gradient(${e}, ${t} 0, ${t} 1px, transparent 1px, transparent ${n}px)`,j=`forced-color-adjust-none [print-color-adjust:exact] [-webkit-print-color-adjust:exact]`,he={hatch:({ink:e})=>({backgroundImage:A(`135deg`,e)}),"hatch-reverse":({ink:e})=>({backgroundImage:A(`45deg`,e)}),crosshatch:({ink:e})=>({backgroundImage:`${A(`135deg`,e,4)}, ${A(`45deg`,e,4)}`}),perpendicular:({ink:e,orientation:t})=>({backgroundImage:A(t===`horizontal`?`90deg`:`0deg`,e)}),parallel:({ink:e,orientation:t})=>({backgroundImage:A(t===`horizontal`?`0deg`:`90deg`,e)}),grid:({ink:e})=>({backgroundImage:`${A(`0deg`,e,4)}, ${A(`90deg`,e,4)}`}),dots:({ink:e})=>({backgroundImage:`radial-gradient(circle at 1px 1px, ${e} 0.75px, transparent 0.8px)`,backgroundSize:`3px 3px`})},ge=(e,t,n)=>e===`solid`?{}:{backgroundColor:m(t),...he[e]({ink:t,orientation:n})},_e=({series:t,orientation:n})=>t.mark===`bar`?/* @__PURE__ */ T(`span`,{"aria-hidden":!0,"data-texture":t.texture,className:e(`size-2 shrink-0 rounded-[2px]`,j),style:{backgroundColor:t.color,...ge(t.texture,t.color,n)}}):t.mark===`line`?/* @__PURE__ */ E(`span`,{"aria-hidden":!0,className:`relative flex h-2 w-3 shrink-0 items-center justify-center`,children:[/* @__PURE__ */ T(`span`,{className:e(`absolute inset-x-0 top-1/2 h-0.5 -translate-y-1/2 rounded-full`,j),style:{backgroundColor:t.color}}),/* @__PURE__ */ T(`span`,{"data-shape":t.shape,className:e(`relative size-2`,j),style:{backgroundColor:t.color,clipPath:f[t.shape]}})]}):/* @__PURE__ */ T(`span`,{"aria-hidden":!0,"data-shape":t.shape,className:e(`size-2 shrink-0`,j),style:{backgroundColor:t.color,clipPath:f[t.shape]}}),M=({partName:t,slotName:n,className:i,children:a,ref:o,...s})=>{let c=D(t),u=O(c.store),d=me(c.store),f=S(null),ee=r(f,o),[p,te]=C(!1);return b(()=>{let e=f.current;if(!(e==null||u.length<2))return l(e,()=>{te(e.scrollHeight>e.clientHeight)})},[u]),u.length<2?null:/* @__PURE__ */ T(`div`,{ref:ee,"data-slot":`${n}-legend`,className:e(`text-muted focus-visible:focus-ring flex max-h-16 shrink-0 flex-wrap items-center gap-x-4 gap-y-1 overflow-y-auto rounded-sm pt-3 text-xs focus-visible:ring-2`,i),...p&&{role:`group`,"aria-label":`Legend`,tabIndex:0},...s,children:a==null?u.map(e=>/* @__PURE__ */ E(`div`,{className:`flex items-center gap-1.5`,children:[/* @__PURE__ */ T(_e,{series:e,orientation:d}),e.label]},e.dataKey)):/* @__PURE__ */ T(`div`,{"data-slot":`${n}-legend-label`,className:`contents`,children:a(u)})})},ve=y(null),N=({slotName:e,"data-slot":n,children:r,...i})=>{let[a,o]=C({id:``,text:``}),[s]=C(()=>({announce:(e,t)=>{o(n=>t===``&&n.id!==e||n.id===e&&n.text===t?n:{id:e,text:t})}}));return/* @__PURE__ */ E(`div`,{"data-slot":t(n,e),...i,children:[/* @__PURE__ */ T(ve.Provider,{value:s,children:/* @__PURE__ */ T(`div`,{"data-slot":`${e}-items`,className:`contents`,children:r})}),/* @__PURE__ */ T(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:a.text})]})},ye=(e,t,n)=>{let r=D(e);ue(r.kind===t,()=>`${e} cannot be composed inside ${r.componentName}.Root. Compose ${r.componentName} series parts instead.`);let{dataKey:i,label:a,color:o,curve:s=`linear`,markers:c=!1,connectNulls:l=!1,shape:u=`circle`,texture:d=`solid`}=n;return x(()=>r.store.registerSeries({dataKey:i,label:a??i,color:o,mark:t,curve:s,markers:c,connectNulls:l,shape:u,texture:d}),[r.store,i,a,o,t,s,c,l,u,d]),null},be=(e,t)=>{let n=D(e),{lines:r}=t;return x(()=>n.store.registerGrid(r),[n.store,r]),null},xe=(e,t)=>{let n=D(e),{tickFormat:r,tickCount:i}=t;return x(()=>n.store.registerXAxis({tickFormat:r,tickCount:i}),[n.store,r,i]),null},Se=(e,t)=>{let n=D(e),{tickFormat:r,tickCount:i}=t;return x(()=>n.store.registerYAxis({tickFormat:r,tickCount:i}),[n.store,r,i]),null},Ce=(e,t)=>{let n=D(e),r=ce(),{y:i,label:a,color:o}=t;return x(()=>n.store.registerReferenceLine(r,{y:i,label:a,color:o}),[n.store,r,i,a,o]),null},we=e=>{let t=e.getSnapshot().hover;return t?.viaKeyboard===!0?t:null},P=e=>we(e)?.index??null,F=({store:e,xHasTimeOfDay:t,announce:n,readout:r})=>{let a=w(e.subscribe,()=>P(e),()=>P(e)),o=i(i=>{n(i==null?``:r?.announce(i)??R(i,{xHasTimeOfDay:t,tooltip:e.getSnapshot().tooltip}))});b(()=>{if(o(null),a==null)return;let t=setTimeout(()=>o(we(e)),I);return()=>clearTimeout(t)},[a,e,o])},Te=({id:e,kind:t,slotName:n,seriesRef:r,summary:i,instructions:o,readout:s})=>{let l=a(),u=s?.describe(i,l)??c({kind:t,summary:i,hydrated:l});return/* @__PURE__ */ E(`span`,{id:e,"data-slot":`${n}-description`,className:`sr-only`,children:[/* @__PURE__ */ T(`span`,{children:u.sentence}),/* @__PURE__ */ T(`span`,{ref:r}),o&&/* @__PURE__ */ T(`span`,{children:u.instructions})]})},Ee=({store:e,xHasTimeOfDay:t,readout:n})=>{let[r,i]=C(``);return F({store:e,xHasTimeOfDay:t,announce:i,readout:n}),/* @__PURE__ */ T(`span`,{role:`status`,"aria-live":`polite`,className:`sr-only`,children:r})},I=120,L=e=>typeof e==`string`?e:typeof e==`number`?String(e):null,R=(e,{xHasTimeOfDay:t,tooltip:n})=>{let r=(e,t)=>L(n?.valueFormat?.(e,t))??g(e);return`${L(n?.labelFormat?.(e.xValue))??v(e.xValue,{datasetHasTimeOfDay:t})}. ${[...e.total==null?[]:[`Total: ${r(e.total,`total`)}`],...e.points.map(e=>`${e.label}: ${e.value==null?`no data`:r(e.value,e.dataKey)}`)].join(`, `)}${e.zValue===void 0?``:`, z: ${e.zValue==null?`no data`:g(e.zValue)}`}`},De=({id:e,list:t,store:n,xHasTimeOfDay:r,readout:i})=>(b(()=>()=>t.announce(e,``),[e,t]),F({store:n,xHasTimeOfDay:r,announce:n=>t.announce(e,n),readout:i}),null);function z(){return()=>{}}const B=(e,t)=>{let n=w(z,()=>V(t),()=>void 0);return e??n},Oe=`[data-slot$="-data-table"]`;function V(e){if(e!=null)return e.split(/\s+/).map(e=>H(document.getElementById(e))).filter(Boolean).join(` `)||void 0}function H(e){if(e==null)return``;if(e.querySelector(Oe)==null)return e.textContent?.trim()??``;let t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_TEXT,{acceptNode:e=>e instanceof Element?e.matches(Oe)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT}),n=``;for(let e=t.nextNode();e!=null;e=t.nextNode())n+=e.textContent??``;return n.trim()}const U=e=>e==null||typeof e==`number`&&!Number.isFinite(e),W=(e,{xScale:t,xHasTimeOfDay:n})=>{let r=t===`time`?new Date(o(e,!0)):e;return r instanceof Date?{text:v(r,{datasetHasTimeOfDay:n}),date:Number.isNaN(r.getTime())?null:r}:t===`linear`&&U(r)?{text:`—`,date:null}:{text:typeof r==`number`?g(r):String(r),date:null}},ke=({data:e,label:t,labelledBy:n,slotName:r,store:i,xHasTimeOfDay:a,xKey:o,xScale:c,zKey:l})=>{let u=O(i),d=B(t,n);if(e.length===0||u.length===0)return null;let f=e.slice(0,150);return/* @__PURE__ */ T(`div`,{className:`sr-only`,"data-slot":`${r}-data-table`,children:/* @__PURE__ */ E(`table`,{children:[/* @__PURE__ */ T(`caption`,{children:`${d==null?`Chart data`:`${d}: chart data`}${e.length>150?`. Showing the first 150 of ${e.length} rows.`:`.`}`}),/* @__PURE__ */ T(`thead`,{children:/* @__PURE__ */ E(`tr`,{children:[/* @__PURE__ */ T(`th`,{scope:`col`,children:o}),u.map(e=>/* @__PURE__ */ T(`th`,{scope:`col`,children:e.label},e.dataKey)),l!=null&&/* @__PURE__ */ T(`th`,{scope:`col`,children:l})]})}),/* @__PURE__ */ T(`tbody`,{children:f.map((e,t)=>{let n=s(e,o),r=W(n,{xScale:c,xHasTimeOfDay:a});return/* @__PURE__ */ E(`tr`,{children:[/* @__PURE__ */ T(`th`,{scope:`row`,"data-value":typeof n==`number`&&Number.isFinite(n)?n:void 0,children:r.date==null?r.text:/* @__PURE__ */ T(`time`,{dateTime:r.date.toISOString(),children:r.text})}),u.map(t=>{let n=s(e,t.dataKey),r=typeof n==`number`&&Number.isFinite(n);return/* @__PURE__ */ T(`td`,{"data-value":r?n:void 0,children:r?g(n):`—`},t.dataKey)}),l!=null&&(()=>{let t=s(e,l),n=typeof t==`number`&&Number.isFinite(t);return/* @__PURE__ */ T(`td`,{"data-value":n?t:void 0,children:n?g(t):`—`})})()]},t)})})]})})},G=e=>({hover:w(e.subscribe,()=>e.getSnapshot().hover,()=>e.getSnapshot().hover),config:w(e.subscribe,()=>e.getSnapshot().tooltip,()=>e.getSnapshot().tooltip)}),K=(e,t)=>{let n=D(e),{labelFormat:r,valueFormat:i,indicator:a=`line`,footer:o,children:s,...c}=t,l=pe(c);return x(()=>n.store.registerTooltip({labelFormat:r,valueFormat:i,indicator:a,footer:o,children:s,divProps:l}),[n.store,r,i,a,o,s,l]),null},Ae=(e,t,n)=>e==null?`—`:n==null?g(e):n(e,t),je=({slotName:t,store:i,tooltipRef:a,xHasTimeOfDay:o,readout:s})=>{let{hover:c,config:l}=G(i),{className:u,ref:d,style:f,...ee}=l?.divProps??{},p=S(null),te=r(a,p);return x(()=>{if(d==null)return;let e=n(d),t=e(p.current);return()=>{typeof t==`function`?t():e(null)}},[d]),/* @__PURE__ */ T(`div`,{"data-slot":`${t}-tooltip`,ref:te,className:e(`bg-popover border-popover text-strong pointer-events-none absolute left-0 top-0 z-10 min-w-32 rounded-md border px-2.5 py-1.5 text-xs shadow-md`,u),style:{opacity:0,...f},...ee,children:c!=null&&/* @__PURE__ */ T(Me,{slotName:t,config:l,hover:c,xHasTimeOfDay:o,readout:s})})},Me=({slotName:e,config:t,hover:n,xHasTimeOfDay:r,readout:i})=>{if(t?.children!=null)return/* @__PURE__ */ T(`div`,{"data-slot":`${e}-tooltip-label`,className:`contents`,children:t.children(n)});if(i!=null)return/* @__PURE__ */ T(i.Tooltip,{hover:n,config:t});let a=t?.footer;return/* @__PURE__ */ E(de,{children:[/* @__PURE__ */ T(`div`,{className:`text-muted font-medium`,children:t?.labelFormat==null?v(n.xValue,{datasetHasTimeOfDay:r}):t.labelFormat(n.xValue)}),/* @__PURE__ */ E(`div`,{className:`mt-1 grid gap-1`,children:[n.total!==void 0&&/* @__PURE__ */ E(`div`,{className:`flex items-center gap-1.5`,children:[t?.indicator!==`none`&&/* @__PURE__ */ T(`span`,{"aria-hidden":!0,className:`invisible h-2.5 w-0.5 shrink-0`}),/* @__PURE__ */ T(`span`,{className:`text-muted`,children:`Total`}),/* @__PURE__ */ T(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:t?.valueFormat==null?g(n.total):t.valueFormat(n.total,`total`)})]}),n.points.map(e=>/* @__PURE__ */ E(`div`,{className:`flex items-center gap-1.5`,children:[t?.indicator!==`none`&&/* @__PURE__ */ T(`span`,{"aria-hidden":!0,className:`forced-color-adjust-none h-2.5 w-0.5 shrink-0 rounded-full`,style:{backgroundColor:e.color}}),/* @__PURE__ */ T(`span`,{className:`text-muted`,children:e.label}),/* @__PURE__ */ T(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:Ae(e.value,e.dataKey,t?.valueFormat)})]},e.dataKey))]}),n.zValue!==void 0&&/* @__PURE__ */ E(`div`,{className:`mt-1 flex items-center gap-1.5`,children:[/* @__PURE__ */ T(`span`,{className:`text-muted`,children:`z`}),/* @__PURE__ */ T(`span`,{className:`text-strong ml-auto pl-3 font-medium tabular-nums`,children:n.zValue==null?`—`:g(n.zValue)})]}),a!=null&&/* @__PURE__ */ T(`div`,{className:`text-muted mt-1`,children:typeof a==`function`?a(n):a})]})},Ne={},Pe={x:`xKey`,series:`dataKey`},Fe=(e,t)=>{for(let n of e){let e=s(n,t);if(e!=null)return e instanceof Date?`time`:typeof e==`number`?`linear`:`point`}return`point`},Ie=[`auto`,`auto`],Le=(e,t)=>{let n=(n,r)=>{let i=e.createElement(`div`);return i.setAttribute(`data-slot`,`${t}-${n}`),i.setAttribute(`aria-hidden`,`true`),i.className=r,i};return{crosshair:n(`crosshair`,`bg-neutral-500 pointer-events-none absolute left-0 top-0 w-px opacity-0 forced-colors:bg-[Highlight]`),band:n(`hover-band`,`bg-neutral-500/10 pointer-events-none absolute left-0 top-0 rounded-sm opacity-0 forced-colors:outline forced-colors:outline-[Highlight]`),markers:n(`markers`,`pointer-events-none absolute inset-0 opacity-0`)}},Re={bar:`Bar`,line:`Line`,area:`Area`,scatter:`Point`},ze=({plotRef:e,engineRef:t,activateRef:n,visibilityRef:r,holdsBitmap:i})=>{x(()=>{let a=e.current;if(a!=null)return h(a,{far:i,onChange:({band:e,inView:i,rect:o})=>{let s=t.current,c=r.current;e===`near`?(c.near=i,s==null?i?d(a,{rect:o,run:e=>n.current?.(e)}):u(a):s.setInView(i||c.focused)):e===`visible`?(c.visible=i,s?.setOnScreen(i),i&&(c.seen=!0,s==null?ie(a):s.markSeen())):e===`far`&&(c.withinFar=i,!i&&!c.focused&&s?.releaseBackingStores())}})},[e,t,n,r,i])},Be=({rootRef:e,engineRef:t,activateRef:n})=>{x(()=>{let r=e.current?.ownerDocument.defaultView;if(r!=null)return _(r,{before:()=>{n.current?.(null),t.current?.paintForPrint()},after:()=>{t.current?.afterPrint()}})},[e,t,n])},Ve=({store:e,decorative:t,targetRef:n})=>{x(()=>{let r=n.current;if(t||r==null)return;let i=null,a=()=>{let t=ne(e.getSnapshot().series.map(e=>e.label));t!==i&&(i=t,r.textContent=t)};return a(),e.subscribe(a)},[e,t,n])},q=({kind:n,componentName:i,slotName:a,paintBackend:o,scatterView:s,readout:c,longitudeKey:l,labelKey:d,bounds:f,sizeKey:ne,data:m,xKey:h,xScale:ie,zKey:g,dimensions:_=3,yDomain:v=Ie,stacked:y=!1,orientation:b=`vertical`,animate:de,pending:D=!1,mode:O=`interactive`,activeIndex:k,onActiveIndexChange:me,onDatumActivate:A,className:j,children:he,ref:ge,"data-slot":_e,"aria-label":M,"aria-labelledby":N,"aria-hidden":ye,tabIndex:be,onFocus:xe,onBlur:Se,style:Ce,...we})=>{let P=O===`interactive`,F=c?.keyNames??Pe,I=le(()=>({root:`${i}.Root`,part:`${i}.${Re[n]}`,keys:F}),[i,n,F]),L=O===`decorative`,R=de??O!==`static`,[z]=C(()=>new te),[B,Oe]=C(!1),V=S(null),H=S(!1),U=S(null),W=S(null);x(()=>()=>W.current?.(),[]);let G=S(null),K=S({near:!1,withinFar:!0,visible:null,seen:!1,focused:!1}),Ae=S(null),Me=w(z.subscribe,()=>z.hoverEver,()=>!1),q=n===`bar`?`band`:ie??Fe(m,h),He=S({data:m,xKey:h,xScale:q,zKey:g}),[Ue]=C(()=>({kind:n,componentName:i,store:z,engineRef:V,dataRef:He}));x(()=>{He.current={data:m,xKey:h,xScale:q,zKey:g}},[m,h,q,g]);let We=S(null),Ge=r(We,ge),J=S(null),Ke=S(null),qe=se(ve),Je=oe(e=>{Ke.current=e,V.current?.attachTooltip(e)},[]),Y=ce();ue(n!==`scatter`||m.length===0||q!==`point`,()=>`${i}.Root requires numeric or Date x values: the "${h}" values are not numbers or dates, so they have no position on a continuous scatter axis.`);let[X,Z]=v,Ye=le(()=>re(m,h,q),[m,h,q]),Q=Ye.hasTimeOfDay,$=c==null?null:ne??null,Xe=S({options:{xKey:h,xScale:q,yDomain:[X,Z],zKey:g??null,sizeKey:$,dimensions:_,stacked:y,orientation:b,animate:R},callbacks:{onDatumActivate:null,onActiveIndexChange:null},controlledActiveIndex:void 0});x(()=>{Xe.current={options:{xKey:h,xScale:q,yDomain:[X,Z],zKey:g??null,sizeKey:$,dimensions:_,stacked:y,orientation:b,animate:R},callbacks:P?{onDatumActivate:A??null,onActiveIndexChange:me??null}:{onDatumActivate:null,onActiveIndexChange:null},controlledActiveIndex:P?k:void 0}}),x(()=>(U.current=e=>{let t=We.current,r=J.current;if(V.current!=null||t==null||r==null)return;u(r);let i=e!=null&&e.width>0&&e.height>0?{width:e.width,height:e.height}:void 0,c=new p({kind:n,store:z,backend:o,scatter:s,names:I,slotName:a,elements:{root:t,plot:r,tooltip:Ke.current},createHoverLayers:P?()=>Le(r.ownerDocument,a):void 0,inView:!1,onScreen:K.current.visible??(e!=null&&ee(r,e)),size:i}),l=Xe.current;c.setOptions(l.options),c.setRows(He.current.data),c.setCallbacks(l.callbacks),c.setControlledActiveIndex(l.controlledActiveIndex),V.current=c,c.flushIngest(),c.setInView(K.current.near||K.current.focused),K.current.seen&&c.markSeen(),c.commitNow()},H.current&&(H.current=!1,U.current(null)),()=>{H.current=V.current!=null,U.current=null,V.current?.destroy(),V.current=null}),[n,I,z,a,P,o,s]),ze({plotRef:J,engineRef:V,activateRef:U,visibilityRef:K,holdsBitmap:o.kind===`canvas`}),Be({rootRef:We,engineRef:V,activateRef:U}),x(()=>{V.current?.setOptions({xKey:h,xScale:q,yDomain:[X,Z],zKey:g??null,sizeKey:$,dimensions:_,stacked:y,orientation:b,animate:R}),z.setOrientation(b),z.setDecorative(L)},[z,L,h,q,X,Z,g,$,_,y,b,R]),x(()=>{V.current?.setRows(m)},[m]),x(()=>{V.current?.setCallbacks(P?{onDatumActivate:A??null,onActiveIndexChange:me??null}:{onDatumActivate:null,onActiveIndexChange:null})}),x(()=>{V.current?.setControlledActiveIndex(P?k:void 0)},[P,k]);let Ze=pe(Ce??Ne);x(()=>{V.current?.setColorScope(j,Ze)},[j,Ze]),Ve({store:z,decorative:L,targetRef:Ae});let Qe=S(null);x(()=>{let e=V.current;if(e!=null){e.flushIngest();return}let t=z.seriesSpecs().map(e=>e.dataKey),n=JSON.stringify([h,q,g??null,$,t]),r=Qe.current;(r==null||r.data!==m||r.signature!==n)&&(ae({names:I,rows:m,xKey:h,xScale:q,dataKeys:t,zKey:g??null,sizeKey:$}),Qe.current={data:m,signature:n})});let $e=c?.DataTable??ke;return/* @__PURE__ */ T(`div`,{"data-slot":t(_e,a),className:e(`relative flex aspect-video w-full flex-col`,j),"aria-hidden":L?!0:ye,tabIndex:L?void 0:be,inert:L?!0:void 0,ref:Ge,onFocus:e=>{xe?.(e),P&&Oe(!0),K.current.focused=!0,U.current?.(null),V.current?.setInView(!0)},onBlur:e=>{if(Se?.(e),e.relatedTarget instanceof Node&&e.currentTarget.contains(e.relatedTarget))return;let t=K.current;t.focused=!1;let n=V.current;n!=null&&(n.setInView(t.near),t.withinFar||n.releaseBackingStores())},style:Ce,...we,"data-engaged":P&&B?``:void 0,children:/* @__PURE__ */ E(fe.Provider,{value:Ue,children:[/* @__PURE__ */ E(`div`,{"data-slot":`${a}-plot`,className:D?`relative min-h-0 w-full flex-1 select-none transition-opacity duration-300 ease-out-strong motion-reduce:transition-none [-webkit-touch-callout:none] opacity-60`:`relative min-h-0 w-full flex-1 select-none transition-opacity duration-300 ease-out-strong motion-reduce:transition-none [-webkit-touch-callout:none]`,role:O===`static`?`img`:void 0,"aria-label":O===`static`?M:void 0,"aria-labelledby":O===`static`?N:void 0,"aria-describedby":O===`static`?Y:void 0,ref:J,children:[P&&/* @__PURE__ */ T(`div`,{role:`application`,"aria-label":M,"aria-labelledby":N,"aria-describedby":Y,tabIndex:0,className:n===`line`||n===`area`?n===`scatter`&&g!=null?`focus-visible:focus-ring absolute inset-0 rounded-sm focus-visible:ring-2 touch-none cursor-grab active:cursor-grabbing`:`focus-visible:focus-ring absolute inset-0 rounded-sm focus-visible:ring-2 cursor-crosshair touch-pan-y touch-pinch-zoom`:n===`scatter`&&g!=null?`focus-visible:focus-ring absolute inset-0 rounded-sm focus-visible:ring-2 touch-none cursor-grab active:cursor-grabbing`:`focus-visible:focus-ring absolute inset-0 rounded-sm focus-visible:ring-2 touch-pan-y touch-pinch-zoom`,onPointerDown:e=>{if(e.button===0){if(e.isTrusted&&n===`scatter`&&g!=null&&e.currentTarget.setPointerCapture(e.pointerId),e.pointerType===`touch`&&W.current==null){let t=e.currentTarget,n=t.ownerDocument,r=e=>{e.composedPath().includes(t)||(W.current?.(),V.current?.handlePointerLeave())};n.addEventListener(`pointerdown`,r,!0),W.current=()=>{n.removeEventListener(`pointerdown`,r,!0),W.current=null}}G.current=e.pointerType===`touch`?{x:e.nativeEvent.offsetX,y:e.nativeEvent.offsetY,scrubbed:!1}:null,V.current??U.current?.(J.current?.getBoundingClientRect()??null),V.current?.handlePointerDown(e.nativeEvent.offsetX,e.nativeEvent.offsetY)}},onPointerMove:e=>{let t=G.current;t!=null&&Math.hypot(e.nativeEvent.offsetX-t.x,e.nativeEvent.offsetY-t.y)>10&&(t.scrubbed=!0),V.current?.handlePointerMove(e.nativeEvent.offsetX,e.nativeEvent.offsetY)},onPointerUp:e=>{let t=G.current?.scrubbed===!0;G.current=null,V.current?.handlePointerUp(e.nativeEvent.offsetX,e.nativeEvent.offsetY,{activate:e.button===0&&!t})},onPointerLeave:e=>{e.pointerType!==`touch`&&V.current?.handlePointerLeave()},onPointerCancel:()=>{V.current?.handlePointerLeave()},onBlur:()=>{V.current?.handlePointerLeave()},onKeyDown:e=>{e.altKey||e.ctrlKey||e.metaKey||V.current?.handleKeyDown(e.key,{repeat:e.repeat})&&e.preventDefault()}}),!L&&/* @__PURE__ */ T(Te,{id:Y,kind:n,slotName:a,seriesRef:Ae,summary:Ye,instructions:P,readout:c}),Me&&P&&/* @__PURE__ */ T(je,{slotName:a,store:z,tooltipRef:Je,xHasTimeOfDay:Q,readout:c})]}),he,P&&qe==null&&/* @__PURE__ */ T(Ee,{store:z,xHasTimeOfDay:Q,readout:c}),P&&qe!=null&&/* @__PURE__ */ T(De,{id:Y,list:qe,store:z,xHasTimeOfDay:Q,readout:c}),P&&B&&/* @__PURE__ */ T($e,{data:m,label:M,labelledBy:N,slotName:a,store:z,xHasTimeOfDay:Q,xKey:h,xScale:q,zKey:g})]})})};export{Ce as a,Se as c,D as d,O as f,be as i,N as l,K as n,ye as o,B as r,xe as s,q as t,M as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"tiny-invariant";import{f as t,i as n,p as r,r as i}from"./chart-BmZoTjRu.js";const a=`http://www.w3.org/2000/svg`,o=e=>e?.namespaceURI===a,s=[`underlay`,`marks`,`overlay`],c={fillStyle:`#000`,strokeStyle:`#000`,lineWidth:1,globalAlpha:1,lineJoin:`miter`,lineCap:`butt`,dash:``,font:`10px sans-serif`,textAlign:`start`,textBaseline:`alphabetic`,clip:null},l=e=>String(Math.round(e*100)/100),u={start:`start`,left:`start`,center:`middle`,right:`end`,end:`end`},d={top:`text-before-edge`,hanging:`hanging`,middle:`central`,alphabetic:`alphabetic`,ideographic:`ideographic`,bottom:`text-after-edge`},f=/* @__PURE__ */ new WeakMap,p=e=>(f.has(e)||f.set(e,e.createElement(`canvas`).getContext(`2d`)),f.get(e)??null),m=e=>Number.parseFloat(e)||10,h=e=>e==null?``:`${l(e.x)},${l(e.y)},${l(e.width)},${l(e.height)}`,g=(e,t)=>{if(e==null)return t;let n=Math.max(e.x,t.x),r=Math.max(e.y,t.y);return{x:n,y:r,width:Math.max(0,Math.min(e.x+e.width,t.x+t.width)-n),height:Math.max(0,Math.min(e.y+e.height,t.y+t.height)-r)}};var _=class{#e={...c};#t=[];#n=[];#r=null;#i=0;#a=!1;#o;layer=`overlay`;marks={underlay:[],marks:[],overlay:[]};constructor(e){this.#o=e}get fillStyle(){return this.#e.fillStyle}set fillStyle(t){e(typeof t==`string`,`The SVG chart backend fills with color strings only.`),this.#e.fillStyle=t}get strokeStyle(){return this.#e.strokeStyle}set strokeStyle(t){e(typeof t==`string`,`The SVG chart backend strokes with color strings only.`),this.#e.strokeStyle=t}get lineWidth(){return this.#e.lineWidth}set lineWidth(e){this.#e.lineWidth=e}get globalAlpha(){return this.#e.globalAlpha}set globalAlpha(e){this.#e.globalAlpha=e}get lineJoin(){return this.#e.lineJoin}set lineJoin(e){this.#e.lineJoin=e}get lineCap(){return this.#e.lineCap}set lineCap(e){this.#e.lineCap=e}get font(){return this.#e.font}set font(e){this.#e.font=e}get textAlign(){return this.#e.textAlign}set textAlign(e){this.#e.textAlign=e}get textBaseline(){return this.#e.textBaseline}set textBaseline(e){this.#e.textBaseline=e}reset(){this.#e={...c},this.#t=[],this.beginPath();for(let e of s)this.marks[e]=[];this.layer=`overlay`}save(){this.#t.push({...this.#e})}restore(){let e=this.#t.pop();e!=null&&(this.#e=e)}beginPath(){this.#n=[],this.#r=null,this.#i=0,this.#a=!1}closePath(){this.#n.push(`Z`)}moveTo(e,t){this.#n.push(`M${l(e)} ${l(t)}`),this.#i+=1,this.#r=null,this.#a=!0}lineTo(e,t){let n=this.#a?`L`:`M`;this.#n.push(`${n}${l(e)} ${l(t)}`),this.#r=null,this.#a=!0}bezierCurveTo(e,t,n,r,i,a){this.#n.push(`C${l(e)} ${l(t)} ${l(n)} ${l(r)} ${l(i)} ${l(a)}`),this.#r=null,this.#a=!0}rect(e,t,n,r){this.#n.push(`M${l(e)} ${l(t)}h${l(n)}v${l(r)}h${l(-n)}Z`),this.#i+=1,this.#r=this.#i===1?{x:e,y:t,width:n,height:r}:null,this.#a=!0}roundRect(e,t,n,r,i){let[a=0,o=0,s=0,c=0]=i,u=e+n,d=t+r,f=(e,t,n)=>e>0?`A${l(e)} ${l(e)} 0 0 1 ${l(t)} ${l(n)}`:`L${l(t)} ${l(n)}`;this.#n.push(`M${l(e+a)} ${l(t)}`,`L${l(u-o)} ${l(t)}`,f(o,u,t+o),`L${l(u)} ${l(d-s)}`,f(s,u-s,d),`L${l(e+c)} ${l(d)}`,f(c,e,d-c),`L${l(e)} ${l(t+a)}`,f(a,e+a,t),`Z`),this.#i+=1,this.#r=null,this.#a=!0}arc(e,t,n,r,i){let a=e+n*Math.cos(r),o=t+n*Math.sin(r);this.#n.push(`${this.#a?`L`:`M`}${l(a)} ${l(o)}`);let s=i-r,c=l(n);if(s>=Math.PI*2){let i=e-n*Math.cos(r),s=t-n*Math.sin(r);this.#n.push(`A${c} ${c} 0 1 1 ${l(i)} ${l(s)}`,`A${c} ${c} 0 1 1 ${l(a)} ${l(o)}`)}else{let r=e+n*Math.cos(i),a=t+n*Math.sin(i),o=+(s>Math.PI);this.#n.push(`A${c} ${c} 0 ${o} 1 ${l(r)} ${l(a)}`)}this.#r=null,this.#a=!0}fill(){this.#s(`fill`,this.#n.join(``))}stroke(){this.#s(`stroke`,this.#n.join(``))}fillRect(e,t,n,r){this.#s(`fill`,`M${l(e)} ${l(t)}h${l(n)}v${l(r)}h${l(-n)}Z`)}clip(){let t=this.#r;e(t!=null,`The SVG chart backend clips to one rectangle only.`),this.#e.clip=g(this.#e.clip,t)}setLineDash(e){this.#e.dash=e.join(` `)}fillText(e,t,n){this.marks[this.layer].push({type:`text`,text:e,x:t,y:n,state:{...this.#e}})}measureText(e){let t=p(this.#o);return t==null?{width:e.length*m(this.#e.font)*.6}:(t.font=this.#e.font,{width:t.measureText(e).width})}#s(e,t){if(t===``)return;let n=this.#e,r=e===`fill`?`f|${n.fillStyle}|${n.globalAlpha}|${h(n.clip)}`:`s|${n.strokeStyle}|${n.globalAlpha}|${n.lineWidth}|${n.lineJoin}|${n.lineCap}|${n.dash}|${h(n.clip)}`,i=this.marks[this.layer],a=i.at(-1);a?.type===`path`&&a.key===r?a.data+=t:i.push({type:`path`,key:r,data:t,paint:e,state:{...n}})}};const v=/* @__PURE__ */ new WeakMap,y=(e,t,n)=>{let r=v.get(e);r??(r=/* @__PURE__ */ new Map,v.set(e,r)),r.get(t)!==n&&(r.set(t,n),n===``?e.style.removeProperty(t):e.style.setProperty(t,n))},b=(e,t,n)=>{n==null?e.hasAttribute(t)&&e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)};let x=0;var S=class{svg;#e;#t;#n;#r;#i=/* @__PURE__ */ new Map;#a=0;#o=null;constructor(e,t){this.#e=e,x+=1,this.#r=`mantle-chart-${x}`;let n=this.#s(`svg`);n.setAttribute(`data-slot`,`${t}-svg`),n.setAttribute(`aria-hidden`,`true`),n.setAttribute(`focusable`,`false`),n.style.position=`absolute`,n.style.inset=`0`,n.style.width=`100%`,n.style.height=`100%`,n.style.overflow=`hidden`,n.style.direction=`ltr`,this.#t=this.#s(`defs`),n.append(this.#t),this.#n={underlay:this.#s(`g`),marks:this.#s(`g`),overlay:this.#s(`g`)};for(let e of s)n.append(this.#n[e]);this.svg=n}#s(e){return this.#e.createElementNS(a,e)}id(e){return`${this.#r}-${e}`}define(e){let t=e.id===``?null:this.#t.querySelector(`#${e.id}`);t==null?this.#t.append(e):t.replaceWith(e)}undefine(e){for(let t of Array.from(this.#t.children))t.id.startsWith(e)&&t.remove()}write(e,t){let n=/* @__PURE__ */ new Set;for(let t of s)this.#c(this.#n[t],e.marks[t],n);for(let[e,t]of this.#i)n.has(e)||(t.remove(),this.#i.delete(e));this.#u(t)}#c(e,t,n){for(t.forEach((t,r)=>{let i=t.type===`path`?`path`:`text`,a=e.children[r],s;o(a)&&a.localName===i?s=a:(s=this.#s(i),a==null?e.append(s):a.replaceWith(s));let{state:c}=t,f=h(c.clip);b(s,`clip-path`,f===``?null:`url(#${this.#l(f,c.clip)})`),f!==``&&n.add(f),y(s,`opacity`,c.globalAlpha===1?``:String(c.globalAlpha)),t.type===`path`?(b(s,`d`,t.data),t.paint===`fill`?(y(s,`fill`,c.fillStyle),y(s,`stroke`,`none`),y(s,`stroke-width`,``),y(s,`stroke-linejoin`,``),y(s,`stroke-linecap`,``),y(s,`stroke-dasharray`,``)):(y(s,`fill`,`none`),y(s,`stroke`,c.strokeStyle),y(s,`stroke-width`,String(c.lineWidth)),y(s,`stroke-linejoin`,c.lineJoin),y(s,`stroke-linecap`,c.lineCap),y(s,`stroke-dasharray`,c.dash))):(b(s,`x`,l(t.x)),b(s,`y`,l(t.y)),y(s,`font`,c.font),y(s,`fill`,c.fillStyle),y(s,`text-anchor`,u[c.textAlign]),y(s,`dominant-baseline`,d[c.textBaseline]),s.textContent!==t.text&&(s.textContent=t.text))});e.children.length>t.length;)e.lastElementChild?.remove()}#l(e,t){let n=this.#i.get(e);if(n==null&&t!=null){n=this.#s(`clipPath`),this.#a+=1,n.id=this.id(`clip-${this.#a}`);let r=this.#s(`rect`);r.setAttribute(`x`,l(t.x)),r.setAttribute(`y`,l(t.y)),r.setAttribute(`width`,l(t.width)),r.setAttribute(`height`,l(t.height)),n.append(r),this.#t.append(n),this.#i.set(e,n)}return n?.id??``}#u(e){let t=this.#n.marks;if(e==null){b(t,`mask`,null);return}if(this.#o==null){let e=this.#s(`mask`);e.id=this.id(`fade`),e.setAttribute(`maskUnits`,`userSpaceOnUse`);let t=this.#s(`linearGradient`);t.id=this.id(`fade-ramp`),t.setAttribute(`gradientUnits`,`userSpaceOnUse`);let n=this.#s(`stop`);n.setAttribute(`offset`,`0`),n.setAttribute(`stop-color`,`white`);let r=this.#s(`stop`);r.setAttribute(`offset`,`1`),r.setAttribute(`stop-color`,`white`),t.append(n,r);let i=this.#s(`rect`);i.setAttribute(`x`,`0`),i.setAttribute(`y`,`0`),i.setAttribute(`width`,`100%`),i.setAttribute(`height`,`100%`),i.setAttribute(`fill`,`url(#${t.id})`),e.append(i),this.#t.append(t,e),this.#o={mask:e,gradient:t,rect:i}}let{gradient:n}=this.#o;b(n,`x1`,l(e.left)),b(n,`x2`,l(e.left+e.width)),n.firstElementChild?.setAttribute(`stop-opacity`,String(1-e.alpha)),b(t,`mask`,`url(#${this.#o.mask.id})`)}},C=class{kind=`svg`;element;#e;#t;#n;#r=null;#i=null;constructor({root:e,slotName:t}){this.#e=e;let n=e.ownerDocument;this.#t=new S(n,t),this.#n=new _(n),this.element=this.#t.svg}paintSignature({orientation:e}){return e}resolvePaint({series:e,orientation:t,signature:r}){this.#i=null;let a=/* @__PURE__ */ new Map,o=/* @__PURE__ */ new Map,s=/* @__PURE__ */ new Map,c=this.#t.id(`texture-`);return this.#t.undefine(c),e.forEach((e,n)=>{if(a.set(e.dataKey,e.color),o.set(e.dataKey,`${e.colorInput}|${e.texture}`),e.mark!==`bar`||e.texture===`solid`)return;let r=`${c}${n}`;this.#t.define(this.#o(r,e.texture,e.color,t)),s.set(e.dataKey,`url(#${r})`)}),{signature:r,series:a,inputs:o,barFills:s,chrome:i,fontFamily:this.#a,resolve:n}}#a=()=>{if(this.#i==null){let e=this.#e.ownerDocument.defaultView;this.#i=e?.getComputedStyle(this.#e).fontFamily||`sans-serif`}return this.#i};#o(e,n,i,o){let s=this.#e.ownerDocument,c=s.createElementNS(a,`pattern`);c.id=e,c.setAttribute(`patternUnits`,`userSpaceOnUse`),c.setAttribute(`width`,`8`),c.setAttribute(`height`,`8`);let l=new _(s);t(l,{texture:n,ground:r(i),ink:i,orientation:o});let u=s.createElementNS(a,`g`);for(let e of l.marks.overlay){if(e.type!==`path`)continue;let t=s.createElementNS(a,`path`);t.setAttribute(`d`,e.data),e.paint===`fill`?t.style.setProperty(`fill`,e.state.fillStyle):(t.style.setProperty(`fill`,`none`),t.style.setProperty(`stroke`,e.state.strokeStyle),t.style.setProperty(`stroke-width`,String(e.state.lineWidth)),t.style.setProperty(`stroke-linecap`,e.state.lineCap)),u.append(t)}return c.append(u),c}measureContext(){return this.#n}begin(){return this.#n.reset(),this.#r=null,this.#n}composite(e,t){let n=this.#n;n.layer=`underlay`,t.underlay(),n.layer=`marks`,t.marks(),n.layer=`overlay`,this.#r=t.fade}end(){this.#t.write(this.#n,this.#r),this.#n.reset()}release(){}destroy(){}};const w=Object.assign(e=>new C(e),{kind:`svg`});export{w as t};
|
|
@@ -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};
|