zigbee2mqtt-windfront 2.4.3 → 2.6.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/dist/assets/{About-D3d4IC0H.js → About-ZTihYbyu.js} +2 -2
- package/dist/assets/About-ZTihYbyu.js.br +0 -0
- package/dist/assets/ActivityPage-bbClQpZV.js +1 -0
- package/dist/assets/ActivityPage-bbClQpZV.js.br +0 -0
- package/dist/assets/{Availability-DxWJ6d50.js → Availability-DMgEcrpI.js} +1 -1
- package/dist/assets/Availability-DMgEcrpI.js.br +0 -0
- package/dist/assets/Bind-Bw00iF3V.js +1 -0
- package/dist/assets/Bind-Bw00iF3V.js.br +0 -0
- package/dist/assets/BindRow-Cqb2dOWr.js +1 -0
- package/dist/assets/BindRow-Cqb2dOWr.js.br +0 -0
- package/dist/assets/BindingsPage-XWvJqKeA.js +1 -0
- package/dist/assets/BindingsPage-XWvJqKeA.js.br +0 -0
- package/dist/assets/Bridge-C4PBtT5N.js +1 -0
- package/dist/assets/Bridge-C4PBtT5N.js.br +0 -0
- package/dist/assets/{CheckboxField-UCq4TGr9.js → CheckboxField-VUm-0hft.js} +1 -1
- package/dist/assets/CheckboxField-VUm-0hft.js.br +0 -0
- package/dist/assets/ClusterSinglePicker-B-he_crF.js +1 -0
- package/dist/assets/ClusterSinglePicker-B-he_crF.js.br +0 -0
- package/dist/assets/{Clusters-BwghG7iZ.js → Clusters-DXWNWsJu.js} +1 -1
- package/dist/assets/Clusters-DXWNWsJu.js.br +0 -0
- package/dist/assets/{ContributePage-JRQtUmfw.js → ContributePage-DUQYHsWS.js} +1 -1
- package/dist/assets/ContributePage-DUQYHsWS.js.br +0 -0
- package/dist/assets/Dashboard-B-NOlhzR.js +1 -0
- package/dist/assets/Dashboard-B-NOlhzR.js.br +0 -0
- package/dist/assets/{DashboardFeatureWrapper-wdyylkTN.js → DashboardFeatureWrapper-B3lAVBjM.js} +1 -1
- package/dist/assets/DashboardFeatureWrapper-B3lAVBjM.js.br +0 -0
- package/dist/assets/{DebouncedInput-MoX2IwNR.js → DebouncedInput-dOweMuV9.js} +1 -1
- package/dist/assets/DebouncedInput-dOweMuV9.js.br +0 -0
- package/dist/assets/DevConsole-CApS179g.js +7 -0
- package/dist/assets/DevConsole-CApS179g.js.br +0 -0
- package/dist/assets/{DevConsole-DOwFhc3H.js → DevConsole-h2vdYRbh.js} +1 -1
- package/dist/assets/DevConsole-h2vdYRbh.js.br +0 -0
- package/dist/assets/{DeviceCard-C1nA7P_Z.js → DeviceCard-6wkIXy3n.js} +1 -1
- package/dist/assets/DeviceCard-6wkIXy3n.js.br +0 -0
- package/dist/assets/DeviceImage-DyYFIRjz.js +1 -0
- package/dist/assets/DeviceImage-DyYFIRjz.js.br +0 -0
- package/dist/assets/{DeviceInfo-Bl4i0ZP7.js → DeviceInfo-k6u06K2f.js} +2 -2
- package/dist/assets/DeviceInfo-k6u06K2f.js.br +0 -0
- package/dist/assets/DevicePage-B7nAn1iO.js +2 -0
- package/dist/assets/DevicePage-B7nAn1iO.js.br +0 -0
- package/dist/assets/DevicePicker-BfBbyuS8.js +1 -0
- package/dist/assets/DevicePicker-BfBbyuS8.js.br +0 -0
- package/dist/assets/DeviceSettings-1iuu0tJ7.js +1 -0
- package/dist/assets/DeviceSettings-1iuu0tJ7.js.br +0 -0
- package/dist/assets/{DeviceSpecificSettings-DiP7CAM1.js → DeviceSpecificSettings-Cm4xvfzJ.js} +1 -1
- package/dist/assets/DeviceSpecificSettings-Cm4xvfzJ.js.br +1 -0
- package/dist/assets/Devices-nN5Vdq46.js +1 -0
- package/dist/assets/Devices-nN5Vdq46.js.br +0 -0
- package/dist/assets/DevicesPage-BV-Ijsev.js +1 -0
- package/dist/assets/DevicesPage-BV-Ijsev.js.br +0 -0
- package/dist/assets/{DisplayValue-Dji9W3st.js → DisplayValue-DLP2mg_V.js} +1 -1
- package/dist/assets/DisplayValue-DLP2mg_V.js.br +0 -0
- package/dist/assets/{Duration-Dx8X3Jcu.js → Duration-DzRD0grs.js} +1 -1
- package/dist/assets/Duration-DzRD0grs.js.br +0 -0
- package/dist/assets/{EndpointPicker-DQIVbRGj.js → EndpointPicker-Ck1CULcK.js} +1 -1
- package/dist/assets/EndpointPicker-Ck1CULcK.js.br +0 -0
- package/dist/assets/{Exposes-DZGZN1cS.js → Exposes-BPSB0xC5.js} +1 -1
- package/dist/assets/Exposes-BPSB0xC5.js.br +0 -0
- package/dist/assets/Feature-CZ82llrY.js +1 -0
- package/dist/assets/Feature-CZ82llrY.js.br +0 -0
- package/dist/assets/FrontendSettingsPage-SIfuHMNE.js +1 -0
- package/dist/assets/FrontendSettingsPage-SIfuHMNE.js.br +0 -0
- package/dist/assets/GroupPage-CrU_oF2n.js +2 -0
- package/dist/assets/GroupPage-CrU_oF2n.js.br +0 -0
- package/dist/assets/{GroupSettings-BO4fhmeC.js → GroupSettings-B4eB1ZDP.js} +1 -1
- package/dist/assets/GroupSettings-B4eB1ZDP.js.br +0 -0
- package/dist/assets/Groups-ClkUi4Az.js +1 -0
- package/dist/assets/Groups-ClkUi4Az.js.br +0 -0
- package/dist/assets/{GroupsPage-uFWQBx94.js → GroupsPage-DPkJb1fr.js} +1 -1
- package/dist/assets/GroupsPage-DPkJb1fr.js.br +0 -0
- package/dist/assets/Health-B6Q28am3.js +1 -0
- package/dist/assets/Health-B6Q28am3.js.br +0 -0
- package/dist/assets/HomePage-Dk_sBoEb.js +1 -0
- package/dist/assets/HomePage-Dk_sBoEb.js.br +0 -0
- package/dist/assets/{IndeterminateCheckbox-DUK2aZrT.js → IndeterminateCheckbox-C_ecvCeC.js} +1 -1
- package/dist/assets/IndeterminateCheckbox-C_ecvCeC.js.br +1 -0
- package/dist/assets/InfoAlert-Duqe1W84.js +1 -0
- package/dist/assets/InfoAlert-Duqe1W84.js.br +0 -0
- package/dist/assets/{InputField-DAPHc2sm.js → InputField-ClGszlbJ.js} +1 -1
- package/dist/assets/InputField-ClGszlbJ.js.br +0 -0
- package/dist/assets/{Json-UHwQykVU.js → Json-DEpnDDlz.js} +1 -1
- package/dist/assets/Json-DEpnDDlz.js.br +0 -0
- package/dist/assets/{LastSeen-0CXNPzhR.js → LastSeen-Ch5q_qaC.js} +1 -1
- package/dist/assets/LastSeen-Ch5q_qaC.js.br +0 -0
- package/dist/assets/LogsPage-BRzBMY4H.js +1 -0
- package/dist/assets/LogsPage-BRzBMY4H.js.br +0 -0
- package/dist/assets/Lqi-VJh_Noo2.js +1 -0
- package/dist/assets/Lqi-VJh_Noo2.js.br +0 -0
- package/dist/assets/NetworkPage-Ba3EmhQT.js +2 -0
- package/dist/assets/NetworkPage-Ba3EmhQT.js.br +0 -0
- package/dist/assets/{NumberField-KpQHKAWy.js → NumberField-BjCMByny.js} +1 -1
- package/dist/assets/NumberField-BjCMByny.js.br +0 -0
- package/dist/assets/OtaPage-DUvmm6At.js +1 -0
- package/dist/assets/OtaPage-DUvmm6At.js.br +0 -0
- package/dist/assets/{PowerSource-BqvbEJAW.js → PowerSource-CgR95qOm.js} +1 -1
- package/dist/assets/PowerSource-CgR95qOm.js.br +0 -0
- package/dist/assets/RawNetworkData-Bbaa-PvD.js +20 -0
- package/dist/assets/RawNetworkData-Bbaa-PvD.js.br +0 -0
- package/dist/assets/{RawNetworkMap-auMtayZa.js → RawNetworkMap-CdocP6HT.js} +29 -29
- package/dist/assets/RawNetworkMap-CdocP6HT.js.br +0 -0
- package/dist/assets/RecallRemove-Bg_AJVfE.js +1 -0
- package/dist/assets/RecallRemove-Bg_AJVfE.js.br +0 -0
- package/dist/assets/{RemoveDeviceModal-B2AvJ3P5.js → RemoveDeviceModal-B_L_rBvK.js} +1 -1
- package/dist/assets/RemoveDeviceModal-B_L_rBvK.js.br +0 -0
- package/dist/assets/Reporting-CEj72PxA.js +1 -0
- package/dist/assets/Reporting-CEj72PxA.js.br +0 -0
- package/dist/assets/ReportingPage-CooLISus.js +1 -0
- package/dist/assets/ReportingPage-CooLISus.js.br +0 -0
- package/dist/assets/{ReportingRow-DT5OZraF.js → ReportingRow-BBoyE6oF.js} +1 -1
- package/dist/assets/ReportingRow-BBoyE6oF.js.br +0 -0
- package/dist/assets/Scene-KSSvws8r.js +1 -0
- package/dist/assets/Scene-KSSvws8r.js.br +0 -0
- package/dist/assets/{SelectField-Ds79Cvtx.js → SelectField-D8d6iiLj.js} +1 -1
- package/dist/assets/SelectField-D8d6iiLj.js.br +0 -0
- package/dist/assets/{Settings-cNwKH0wq.js → Settings-amzT9Wy4.js} +1 -1
- package/dist/assets/Settings-amzT9Wy4.js.br +0 -0
- package/dist/assets/{SettingsList-BfAMzMbW.js → SettingsList-Dk4_bVrB.js} +1 -1
- package/dist/assets/SettingsList-Dk4_bVrB.js.br +0 -0
- package/dist/assets/SettingsPage-ENZ7Owke.js +2 -0
- package/dist/assets/SettingsPage-ENZ7Owke.js.br +0 -0
- package/dist/assets/State-Csk9AgRC.js +1 -0
- package/dist/assets/State-Csk9AgRC.js.br +0 -0
- package/dist/assets/{Table-C-4QtH2Q.js → Table-a9jksZ8Q.js} +1 -1
- package/dist/assets/Table-a9jksZ8Q.js.br +0 -0
- package/dist/assets/{TextareaField-x2D75Jbc.js → TextareaField-KWfoNm-T.js} +1 -1
- package/dist/assets/TextareaField-KWfoNm-T.js.br +0 -0
- package/dist/assets/{TimeAgo-CKB01sUA.js → TimeAgo-CLxEA7lv.js} +1 -1
- package/dist/assets/TimeAgo-CLxEA7lv.js.br +0 -0
- package/dist/assets/{Tools-CZxv4qNo.js → Tools-BId-rvzb.js} +1 -1
- package/dist/assets/Tools-BId-rvzb.js.br +0 -0
- package/dist/assets/TouchlinkPage-FLPyRTXZ.js +1 -0
- package/dist/assets/TouchlinkPage-FLPyRTXZ.js.br +0 -0
- package/dist/assets/{VendorLink-CfRj085o.js → VendorLink-B6MaQn5Z.js} +1 -1
- package/dist/assets/VendorLink-B6MaQn5Z.js.br +0 -0
- package/dist/assets/{_createCompounder-BpKg8UVZ.js → _createCompounder-DUhfPC_B.js} +1 -1
- package/dist/assets/_createCompounder-DUhfPC_B.js.br +0 -0
- package/dist/assets/defineProperty-CegpTSss.js +1 -0
- package/dist/assets/defineProperty-CegpTSss.js.br +0 -0
- package/dist/assets/extends-CF3RwP-h.js +1 -0
- package/dist/assets/extends-CF3RwP-h.js.br +0 -0
- package/dist/assets/floating-ui.dom-I8hrORoS.js +1 -0
- package/dist/assets/floating-ui.dom-I8hrORoS.js.br +0 -0
- package/dist/assets/floating-ui.react-SUquiuNj.js +1 -0
- package/dist/assets/floating-ui.react-SUquiuNj.js.br +0 -0
- package/dist/assets/index-COCbPj4S.css +1 -0
- package/dist/assets/index-COCbPj4S.css.br +0 -0
- package/dist/assets/index-DiJ--4jy.js +581 -0
- package/dist/assets/index-DiJ--4jy.js.br +0 -0
- package/dist/assets/{index-BCHSMWmb.js → index-Ylx8hT_m.js} +1 -1
- package/dist/assets/index-Ylx8hT_m.js.br +0 -0
- package/dist/assets/{index-C6ZZXciQ.js → index-w9H6LvRA.js} +1 -1
- package/dist/assets/index-w9H6LvRA.js.br +0 -0
- package/dist/assets/{isObjectLike-CIRqZSg4.js → isObjectLike-DD38kuct.js} +1 -1
- package/dist/assets/isObjectLike-DD38kuct.js.br +0 -0
- package/dist/assets/{jszip.min-Dq6zo75v.js → jszip.min-BK4G48pu.js} +1 -1
- package/dist/assets/jszip.min-BK4G48pu.js.br +0 -0
- package/dist/assets/{merge-BP_GrOr0.js → merge-i-jf8qHe.js} +1 -1
- package/dist/assets/merge-i-jf8qHe.js.br +0 -0
- package/dist/assets/react-select.esm-DWfnJubF.js +6 -0
- package/dist/assets/react-select.esm-DWfnJubF.js.br +0 -0
- package/dist/assets/snakeCase-BGM3IOtN.js +1 -0
- package/dist/assets/snakeCase-BGM3IOtN.js.br +0 -0
- package/dist/assets/{useColumnCount-dr4xa6jz.js → useColumnCount-2yLGUSvE.js} +1 -1
- package/dist/assets/useColumnCount-2yLGUSvE.js.br +0 -0
- package/dist/assets/{useSearch-mJ4U1aZj.js → useSearch-_GwMY3HX.js} +1 -1
- package/dist/assets/useSearch-_GwMY3HX.js.br +0 -0
- package/dist/assets/{useTable-B7OaP5Ly.js → useTable-DQ_SXEUl.js} +1 -1
- package/dist/assets/useTable-DQ_SXEUl.js.br +0 -0
- package/dist/index.html +2 -2
- package/dist/index.html.br +0 -0
- package/package.json +17 -16
- package/dist/assets/About-D3d4IC0H.js.br +0 -0
- package/dist/assets/ActivityPage-CaSrg_SL.js +0 -1
- package/dist/assets/ActivityPage-CaSrg_SL.js.br +0 -0
- package/dist/assets/Availability-DxWJ6d50.js.br +0 -0
- package/dist/assets/Bind-Dly_fm7o.js +0 -1
- package/dist/assets/Bind-Dly_fm7o.js.br +0 -0
- package/dist/assets/BindRow-DT8hIN-_.js +0 -1
- package/dist/assets/BindRow-DT8hIN-_.js.br +0 -0
- package/dist/assets/BindingsPage-BVkxErqx.js +0 -1
- package/dist/assets/BindingsPage-BVkxErqx.js.br +0 -0
- package/dist/assets/Bridge-DJbZpMiz.js +0 -1
- package/dist/assets/Bridge-DJbZpMiz.js.br +0 -0
- package/dist/assets/CheckboxField-UCq4TGr9.js.br +0 -1
- package/dist/assets/ClusterSinglePicker-3ibi39tG.js +0 -1
- package/dist/assets/ClusterSinglePicker-3ibi39tG.js.br +0 -0
- package/dist/assets/Clusters-BwghG7iZ.js.br +0 -0
- package/dist/assets/ContributePage-JRQtUmfw.js.br +0 -0
- package/dist/assets/Dashboard-CAMwWas2.js +0 -1
- package/dist/assets/Dashboard-CAMwWas2.js.br +0 -0
- package/dist/assets/DashboardFeatureWrapper-wdyylkTN.js.br +0 -0
- package/dist/assets/DebouncedInput-MoX2IwNR.js.br +0 -0
- package/dist/assets/DevConsole-B0xoECF9.js +0 -7
- package/dist/assets/DevConsole-B0xoECF9.js.br +0 -0
- package/dist/assets/DevConsole-DOwFhc3H.js.br +0 -0
- package/dist/assets/DeviceCard-C1nA7P_Z.js.br +0 -0
- package/dist/assets/DeviceImage-wGqnu0Op.js +0 -1
- package/dist/assets/DeviceImage-wGqnu0Op.js.br +0 -0
- package/dist/assets/DeviceInfo-Bl4i0ZP7.js.br +0 -0
- package/dist/assets/DevicePage-Bz1-LXfU.js +0 -2
- package/dist/assets/DevicePage-Bz1-LXfU.js.br +0 -0
- package/dist/assets/DevicePicker-fhvsZNnj.js +0 -1
- package/dist/assets/DevicePicker-fhvsZNnj.js.br +0 -0
- package/dist/assets/DeviceSettings-CDe1I10M.js +0 -1
- package/dist/assets/DeviceSettings-CDe1I10M.js.br +0 -0
- package/dist/assets/DeviceSpecificSettings-DiP7CAM1.js.br +0 -3
- package/dist/assets/Devices-XkNZN7sG.js +0 -1
- package/dist/assets/Devices-XkNZN7sG.js.br +0 -0
- package/dist/assets/DevicesPage-sAHaQ5_d.js +0 -1
- package/dist/assets/DevicesPage-sAHaQ5_d.js.br +0 -0
- package/dist/assets/DisplayValue-Dji9W3st.js.br +0 -0
- package/dist/assets/Duration-Dx8X3Jcu.js.br +0 -0
- package/dist/assets/EndpointPicker-DQIVbRGj.js.br +0 -0
- package/dist/assets/Exposes-DZGZN1cS.js.br +0 -0
- package/dist/assets/Feature-CTcJIwG4.js +0 -1
- package/dist/assets/Feature-CTcJIwG4.js.br +0 -0
- package/dist/assets/FrontendSettingsPage-BkyzY1An.js +0 -1
- package/dist/assets/FrontendSettingsPage-BkyzY1An.js.br +0 -0
- package/dist/assets/GroupPage-BiAlzXUW.js +0 -2
- package/dist/assets/GroupPage-BiAlzXUW.js.br +0 -0
- package/dist/assets/GroupSettings-BO4fhmeC.js.br +0 -0
- package/dist/assets/Groups-D6TUVTzA.js +0 -1
- package/dist/assets/Groups-D6TUVTzA.js.br +0 -0
- package/dist/assets/GroupsPage-uFWQBx94.js.br +0 -0
- package/dist/assets/Health-BSb0bsL_.js +0 -1
- package/dist/assets/Health-BSb0bsL_.js.br +0 -0
- package/dist/assets/HomePage-hUajaKXJ.js +0 -1
- package/dist/assets/HomePage-hUajaKXJ.js.br +0 -0
- package/dist/assets/IndeterminateCheckbox-DUK2aZrT.js.br +0 -2
- package/dist/assets/InfoAlert-Dnfn7NdQ.js +0 -1
- package/dist/assets/InfoAlert-Dnfn7NdQ.js.br +0 -0
- package/dist/assets/InputField-DAPHc2sm.js.br +0 -0
- package/dist/assets/Json-UHwQykVU.js.br +0 -0
- package/dist/assets/LastSeen-0CXNPzhR.js.br +0 -1
- package/dist/assets/LogsPage-BDDHQ9Jq.js +0 -1
- package/dist/assets/LogsPage-BDDHQ9Jq.js.br +0 -0
- package/dist/assets/Lqi-Bt9decNl.js +0 -1
- package/dist/assets/Lqi-Bt9decNl.js.br +0 -0
- package/dist/assets/NetworkPage-DBHzsEmA.js +0 -2
- package/dist/assets/NetworkPage-DBHzsEmA.js.br +0 -11
- package/dist/assets/NumberField-KpQHKAWy.js.br +0 -0
- package/dist/assets/OtaPage-xajiG6zo.js +0 -1
- package/dist/assets/OtaPage-xajiG6zo.js.br +0 -0
- package/dist/assets/PowerSource-BqvbEJAW.js.br +0 -0
- package/dist/assets/RawNetworkData-CU5eLCfT.js +0 -20
- package/dist/assets/RawNetworkData-CU5eLCfT.js.br +0 -0
- package/dist/assets/RawNetworkMap-auMtayZa.js.br +0 -0
- package/dist/assets/RecallRemove-Dga9_VqG.js +0 -1
- package/dist/assets/RecallRemove-Dga9_VqG.js.br +0 -0
- package/dist/assets/RemoveDeviceModal-B2AvJ3P5.js.br +0 -0
- package/dist/assets/Reporting-Cy3X1le1.js +0 -1
- package/dist/assets/Reporting-Cy3X1le1.js.br +0 -0
- package/dist/assets/ReportingPage-CCV3Upvj.js +0 -1
- package/dist/assets/ReportingPage-CCV3Upvj.js.br +0 -0
- package/dist/assets/ReportingRow-DT5OZraF.js.br +0 -0
- package/dist/assets/Scene-DzUnad47.js +0 -1
- package/dist/assets/Scene-DzUnad47.js.br +0 -0
- package/dist/assets/SelectField-Ds79Cvtx.js.br +0 -0
- package/dist/assets/Settings-cNwKH0wq.js.br +0 -0
- package/dist/assets/SettingsList-BfAMzMbW.js.br +0 -0
- package/dist/assets/SettingsPage-BFM6-Ej5.js +0 -2
- package/dist/assets/SettingsPage-BFM6-Ej5.js.br +0 -0
- package/dist/assets/State-gt5H9I_c.js +0 -1
- package/dist/assets/State-gt5H9I_c.js.br +0 -0
- package/dist/assets/Table-C-4QtH2Q.js.br +0 -0
- package/dist/assets/TextareaField-x2D75Jbc.js.br +0 -0
- package/dist/assets/TimeAgo-CKB01sUA.js.br +0 -0
- package/dist/assets/Tools-CZxv4qNo.js.br +0 -0
- package/dist/assets/TouchlinkPage-CRl08NnD.js +0 -1
- package/dist/assets/TouchlinkPage-CRl08NnD.js.br +0 -0
- package/dist/assets/VendorLink-CfRj085o.js.br +0 -0
- package/dist/assets/_createCompounder-BpKg8UVZ.js.br +0 -0
- package/dist/assets/floating-ui.react-DOHEdPgt.js +0 -1
- package/dist/assets/floating-ui.react-DOHEdPgt.js.br +0 -0
- package/dist/assets/index-BCHSMWmb.js.br +0 -0
- package/dist/assets/index-BpYGCU7a.js +0 -581
- package/dist/assets/index-BpYGCU7a.js.br +0 -0
- package/dist/assets/index-C6ZZXciQ.js.br +0 -0
- package/dist/assets/index-CIc7Tw8n.css +0 -1
- package/dist/assets/index-CIc7Tw8n.css.br +0 -0
- package/dist/assets/isObjectLike-CIRqZSg4.js.br +0 -0
- package/dist/assets/jszip.min-Dq6zo75v.js.br +0 -0
- package/dist/assets/merge-BP_GrOr0.js.br +0 -0
- package/dist/assets/snakeCase-BQjWpiq6.js +0 -1
- package/dist/assets/snakeCase-BQjWpiq6.js.br +0 -0
- package/dist/assets/useColumnCount-dr4xa6jz.js.br +0 -0
- package/dist/assets/useSearch-mJ4U1aZj.js.br +0 -0
- package/dist/assets/useTable-B7OaP5Ly.js.br +0 -0
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,u as L,g as B,a as G,D as H,aR as J,s as _,j as l,B as q,y as Q,a5 as R}from"./index-DiJ--4jy.js";import{D as X}from"./DashboardFeatureWrapper-B3lAVBjM.js";import{F as Y}from"./Feature-CZ82llrY.js";import{g as Z}from"./index-w9H6LvRA.js";import{I as M}from"./InputField-ClGszlbJ.js";import{_ as I}from"./extends-CF3RwP-h.js";import{_ as ee,c as E,g as ae,a as ne,b as w,v as te,d as W,u as oe,e as se}from"./react-select.esm-DWfnJubF.js";const ge=c.memo(({sourceIdx:a,target:e,deviceState:s})=>{const{t:i}=L("scene"),[r,o]=c.useState(0),[m,f]=c.useState(""),b=c.useMemo(()=>B(e),[e]),v=G(H(t=>J(e)?t.deviceScenesFeatures[a][e.ieee_address]??[]:[])),n=c.useCallback(async t=>{await _(a,`${e.friendly_name}/set`,t)},[a,e]),d=c.useCallback(async()=>{const t={ID:r,name:m||`Scene ${r}`};await _(a,`${e.friendly_name}/set`,{scene_store:t})},[a,e,r,m]),C=c.useMemo(()=>r>=0&&r<=255&&!b.find(t=>t.id===r),[r,b]);return l.jsxs(l.Fragment,{children:[l.jsx("h2",{className:"text-lg font-semibold",children:i(t=>t.add_update_header)}),l.jsxs("div",{className:"mb-3",children:[l.jsx(M,{name:"scene_id",label:i(t=>t.scene_id),type:"number",value:r,onChange:t=>!!t.target.value&&o(t.target.valueAsNumber),min:0,max:255,required:!0}),l.jsx(M,{name:"scene_name",label:i(t=>t.scene_name),type:"text",value:m,placeholder:`Scene ${r}`,onChange:t=>f(t.target.value),required:!0}),v.length>0&&l.jsx("div",{className:"card card-border bg-base-100 shadow my-2",children:l.jsx("div",{className:"card-body p-4",children:v.map(t=>l.jsx(Y,{feature:t,device:e,deviceState:s,onChange:n,featureWrapperClass:X,minimal:!0,parentFeatures:[]},Z(t)))})})]}),l.jsx(q,{disabled:!C,onClick:d,className:"btn btn-primary",children:i(t=>t.store)})]})});var ie=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],T=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",s=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0,r=String(e).toLowerCase(),o=String(i.getOptionValue(s)).toLowerCase(),m=String(i.getOptionLabel(s)).toLowerCase();return o===r||m===r},y={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,s,i,r){return!(!e||s.some(function(o){return T(e,o,r)})||i.some(function(o){return T(e,o,r)}))},getNewOptionData:function(e,s){return{label:s,value:e,__isNew__:!0}}};function re(a){var e=a.allowCreateWhileLoading,s=e===void 0?!1:e,i=a.createOptionPosition,r=i===void 0?"last":i,o=a.formatCreateLabel,m=o===void 0?y.formatCreateLabel:o,f=a.isValidNewOption,b=f===void 0?y.isValidNewOption:f,v=a.getNewOptionData,n=v===void 0?y.getNewOptionData:v,d=a.onCreateOption,C=a.options,t=C===void 0?[]:C,S=a.onChange,u=ee(a,ie),$=u.getOptionValue,x=$===void 0?ne:$,k=u.getOptionLabel,D=k===void 0?ae:k,p=u.inputValue,A=u.isLoading,V=u.isMulti,O=u.value,F=u.name,g=c.useMemo(function(){return b(p,E(O),t,{getOptionValue:x,getOptionLabel:D})?n(p,m(p)):void 0},[m,n,D,x,p,b,t,O]),z=c.useMemo(function(){return(s||!A)&&g?r==="first"?[g].concat(w(t)):[].concat(w(t),[g]):t},[s,r,A,g,t]),K=c.useCallback(function(h,N){if(N.action!=="select-option")return S(h,N);var P=Array.isArray(h)?h:[h];if(P[P.length-1]===g){if(d)d(p);else{var j=n(p,p),U={action:"create-option",name:F,option:j};S(te(V,[].concat(w(E(O)),[j]),j),U)}return}S(h,N)},[n,p,V,F,g,d,S,O]);return W(W({},u),{},{options:z,onChange:K})}var le=c.forwardRef(function(a,e){var s=oe(a),i=re(s);return c.createElement(se,I({ref:e},i))}),ce=le;const me=c.memo(({onSceneSelected:a,scenes:e=[],disabled:s})=>{const{t:i}=L("scene"),r=c.useMemo(()=>e.map(o=>({value:`${o.id}`,label:`${o.id}: ${o.name}`})).sort((o,m)=>o.label.localeCompare(m.label)),[e]);return l.jsx("fieldset",{className:"fieldset",children:l.jsx(ce,{unstyled:!0,placeholder:i(o=>o.scene_name),"aria-label":i(o=>o.scene_name),options:r,isSearchable:!0,isDisabled:s,onChange:o=>{o!=null&&a(Number.parseInt(o.value,10))},className:"min-w-64",classNames:Q})})}),he=c.memo(({sourceIdx:a,target:e})=>{const{t:s}=L(["scene","common"]),[i,r]=c.useState({id:0,name:"Scene 0"}),o=c.useMemo(()=>B(e),[e]),m=c.useCallback(n=>{const d=o.find(C=>C.id===n);r(d!==void 0?d:{id:n,name:`Scene ${n}`})},[o]),f=c.useCallback(async()=>await _(a,`${e.friendly_name}/set`,{scene_recall:i.id}),[a,e.friendly_name,i.id]),b=c.useCallback(async()=>await _(a,`${e.friendly_name}/set`,{scene_remove:i.id}),[a,e.friendly_name,i.id]),v=c.useCallback(async()=>await _(a,`${e.friendly_name}/set`,{scene_remove_all:""}),[a,e.friendly_name]);return l.jsxs(l.Fragment,{children:[l.jsx("h2",{className:"text-lg font-semibold",children:s(n=>n.manage_scenes_header)}),l.jsx("div",{className:"mb-3",children:l.jsx(me,{onSceneSelected:m,scenes:o})}),l.jsxs("div",{className:"join join-horizontal w-full",children:[l.jsx(q,{disabled:!i,onClick:f,className:"btn btn-success join-item flex-1",children:s(n=>n.recall)}),l.jsx(R,{disabled:!i,onClick:b,className:"btn btn-error join-item flex-1",title:s(n=>n.remove,{ns:"common"}),modalDescription:s(n=>n.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:s(n=>n.cancel,{ns:"common"}),children:s(n=>n.remove,{ns:"common"})}),l.jsx(R,{onClick:v,className:"btn btn-error btn-outline join-item flex-1",title:s(n=>n.remove_all),modalDescription:s(n=>n.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:s(n=>n.cancel,{ns:"common"}),children:s(n=>n.remove_all)})]})]})});export{ge as A,he as R};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{X as h,a2 as u,u as j,r,j as o,a3 as p,B as d}from"./index-DiJ--4jy.js";import{C as f}from"./CheckboxField-VUm-0hft.js";const g=h.create(({sourceIdx:l,device:t,removeDevice:m})=>{const a=u(),{t:s}=j(["zigbee","common"]),[n,k]=r.useState({block:!1,force:!1}),i=r.useCallback(e=>{const{checked:c,name:v}=e.target;k(x=>({...x,[v]:c}))},[]),b=r.useCallback(async()=>{a.remove(),await m(l,t.ieee_address,n.force,n.block)},[l,a,m,t.ieee_address,n]);return r.useEffect(()=>{const e=c=>{c.key==="Escape"&&(c.preventDefault(),a.remove())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a]),o.jsx(p,{isOpen:a.visible,title:`${s(e=>e.remove_device)} ${t.friendly_name}`,footer:o.jsxs(o.Fragment,{children:[o.jsx(d,{className:"btn btn-neutral",onClick:a.remove,children:s(e=>e.cancel,{ns:"common"})}),o.jsx(d,{className:"btn btn-error ms-1",onClick:b,children:s(e=>e.delete,{ns:"common"})})]}),children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsx(f,{label:s(e=>e.force_remove),name:"force",onChange:i,checked:n.force}),o.jsx("span",{className:"text-xs opacity-50",children:s(e=>e.force_remove_notice)}),o.jsx(f,{label:s(e=>e.block_join),name:"block",onChange:i,checked:n.block})]})})});export{g as R};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as E,D as $,r as o,s as R,j as e,u as P,F as y,a6 as B,B as O,f as q}from"./index-DiJ--4jy.js";import{u as z,o as M,s as T,b as K,g as G,d as H,c as J,e as L,F as Q,f as U}from"./floating-ui.react-SUquiuNj.js";import{b as V,g as W,a as X,m as Y}from"./ClusterSinglePicker-B-he_crF.js";import{R as w}from"./ReportingRow-BBoyE6oF.js";import"./envs-CSqIi4cL.js";import"./floating-ui.dom-I8hrORoS.js";import"./react-select.esm-DWfnJubF.js";import"./defineProperty-CegpTSss.js";import"./extends-CF3RwP-h.js";import"./InputField-ClGszlbJ.js";const Z=t=>`${t.endpoint}-${t.cluster}-${t.attribute}-${t.minimum_report_interval}-${t.maximum_report_interval}`,I=o.memo(({endpointId:t,rules:a,device:r,sourceIdx:d,onApply:f,bridgeDefinitions:n})=>{const{t:i}=P(["zigbee","common"]),u=o.useRef(null),[l,m]=o.useState(!1),[g,b]=o.useState(null),{refs:p,floatingStyles:h,context:c}=z({open:l,onOpenChange:m,placement:"bottom-end",middleware:[M(8),T({padding:16,crossAxis:!0}),K({element:u})]}),_=G(c,{event:"click"}),A=H(c),N=J(c),{getReferenceProps:k,getFloatingProps:D}=L([_,A,N]);o.useEffect(()=>{b(l?Y(r.ieee_address,t):null)},[l,r.ieee_address,t]);const j=o.useCallback(async s=>{await f(s),s.isNew&&m(!1)},[f]),v=o.useCallback(async([s,x,C,F,S])=>{await R(s,"bridge/request/device/reporting/read",{id:x,endpoint:C,cluster:F,configs:[{attribute:S}]})},[]);return e.jsx("section",{className:"card bg-base-100 card-border border-base-200 shadow-sm",children:e.jsxs("div",{className:"card-body p-3",children:[e.jsxs("div",{className:"card-title flex flex-wrap gap-2 items-center justify-between",children:[i(s=>s.endpoint)," ",t,e.jsxs("button",{ref:p.setReference,type:"button",className:"btn btn-primary btn-outline btn-sm",...k(),children:[e.jsx(y,{icon:B}),e.jsx("span",{children:i(s=>s.add,{ns:"common"})})]})]}),a.length>0?a.map((s,x)=>e.jsx(w,{sourceIdx:d,rule:s,bridgeDefinitions:n,device:r,onApply:j,onSync:v,showDivider:x<a.length-1},Z(s))):e.jsx("p",{className:"text-sm opacity-70",children:i(s=>s.none,{ns:"common"})}),l&&g?e.jsx(Q,{children:e.jsxs("aside",{ref:p.setFloating,style:h,...D({className:"card bg-base-200 shadow-lg border border-base-300 w-[min(32rem,calc(100vw-2.5rem))] max-h-[80vh] z-11"}),children:[e.jsxs("div",{className:"card-body p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("h4",{className:"card-title",children:[i(s=>s.add,{ns:"common"}),": ",i(s=>s.endpoint)," ",t]}),e.jsx(O,{onClick:()=>m(!1),className:"btn btn-ghost btn-sm",children:e.jsx(y,{icon:q})})]}),e.jsx(w,{sourceIdx:d,rule:g,bridgeDefinitions:n,device:r,onApply:j,showDivider:!1})]}),e.jsx(U,{ref:u,context:c,className:"fill-base-200 [&>path:first-of-type]:stroke-base-300 [&>path:last-of-type]:stroke-base-300"})]})}):null]})})});function me({sourceIdx:t,device:a}){const r=E($(n=>n.bridgeDefinitions[t])),d=o.useMemo(()=>V(a),[a]),f=o.useCallback(async n=>{const{cluster:i,endpoint:u,attribute:l,minimum_report_interval:m,maximum_report_interval:g,reportable_change:b}=n,p=W(r,a.ieee_address,i,l),h=p==null||X(p),c={id:a.ieee_address,endpoint:u,cluster:i,attribute:l,minimum_report_interval:m,maximum_report_interval:g,option:{}};h&&(c.reportable_change=b),await R(t,"bridge/request/device/reporting/configure",c)},[t,a.ieee_address,r]);return e.jsx("div",{className:"flex flex-col w-full gap-3",children:d.map(n=>e.jsx(I,{...n,device:a,sourceIdx:t,onApply:f,bridgeDefinitions:r},n.endpointId))})}export{me as default};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{X as k,a2 as G,u as V,r as s,j as t,a3 as H,B as C,a as P,A as Y,s as E,a7 as Z,q as B,S as ee,F,v as te,L as ne,a8 as ae,a5 as I,a9 as ie,c as se,N as re,M as O}from"./index-DiJ--4jy.js";import{D as le}from"./DeviceImage-DyYFIRjz.js";import{R as U}from"./ReportingRow-BBoyE6oF.js";import{S as oe}from"./SelectField-D8d6iiLj.js";import{I as M}from"./InputField-ClGszlbJ.js";import{i as ce,g as z,a as $,m as de}from"./ClusterSinglePicker-B-he_crF.js";import{I as me}from"./IndeterminateCheckbox-C_ecvCeC.js";import{D as ue}from"./DevicePicker-BfBbyuS8.js";import{E as pe}from"./EndpointPicker-Ck1CULcK.js";import{T as be}from"./Table-a9jksZ8Q.js";import{u as ge,T as fe}from"./useTable-DQ_SXEUl.js";import"./envs-CSqIi4cL.js";import"./index-Ylx8hT_m.js";import"./defineProperty-CegpTSss.js";import"./react-select.esm-DWfnJubF.js";import"./extends-CF3RwP-h.js";import"./floating-ui.dom-I8hrORoS.js";import"./DebouncedInput-dOweMuV9.js";const ve=k.create(({onApply:f})=>{const o=G(),{t:n}=V(["zigbee","common","devicePage"]),[c,j]=s.useState(""),[r,m]=s.useState(""),[u,x]=s.useState(null),p=s.useCallback(async()=>{await f([c,r,u??0,!1]),o.remove()},[f,o,c,r,u]);s.useEffect(()=>{const i=y=>{y.key==="Escape"&&(y.preventDefault(),o.remove())};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[o]);const h=s.useMemo(()=>ce(c,r,u),[c,r,u]);return t.jsxs(H,{isOpen:o.visible,title:n(i=>i.reporting,{ns:"devicePage"}),footer:t.jsxs(t.Fragment,{children:[t.jsx(C,{className:"btn btn-neutral",onClick:o.remove,children:n(i=>i.cancel,{ns:"common"})}),t.jsx(C,{title:n(i=>i.apply,{ns:"common"}),className:"btn btn-primary ms-1",onClick:p,disabled:!h,children:n(i=>i.apply,{ns:"common"})})]}),children:[t.jsx(M,{name:"minimum_report_interval",label:n(i=>i.min_rep_interval),type:"number",defaultValue:c??"",onChange:i=>j(i.target.value?i.target.valueAsNumber:""),required:!0,className:"input validator",min:0,max:65535}),t.jsx(M,{name:"maximum_report_interval",label:n(i=>i.max_rep_interval),type:"number",defaultValue:r??"",onChange:i=>m(i.target.value?i.target.valueAsNumber:""),required:!0,className:"input validator",min:0,max:65535}),t.jsx(M,{name:"reportable_change",label:n(i=>i.min_rep_change),type:"number",defaultValue:u??"",onChange:i=>x(i.target.value?i.target.valueAsNumber:null),className:"input validator"})]})}),xe=k.create(({sourceIdx:f,device:o,rule:n,onApply:c,bridgeDefinitions:j,isAnalogAttribute:r})=>{const m=G(),{t:u}=V(["common","devicePage"]),x=s.useCallback(async p=>{await c(f,o,p,r),m.remove()},[f,o,r,c,m]);return s.useEffect(()=>{const p=h=>{h.key==="Escape"&&(h.preventDefault(),m.remove())};return window.addEventListener("keydown",p),()=>window.removeEventListener("keydown",p)},[m]),t.jsx(H,{isOpen:m.visible,title:`${u(p=>p.reporting,{ns:"devicePage"})}: ${o.friendly_name} (${n.endpoint})`,footer:t.jsx(C,{className:"btn btn-neutral",onClick:m.remove,children:u(p=>p.cancel)}),children:t.jsx(U,{sourceIdx:f,rule:n,bridgeDefinitions:j,device:o,onApply:x,showDivider:!1,showOnlyApply:!0})})});function Ve(){const f=P(e=>e.bridgeDefinitions),o=P(e=>e.devices),{t:n}=V(["zigbee","common"]),[c,j]=s.useState(0),[r,m]=s.useState(null),[u,x]=s.useState(""),[p,h]=s.useState(null),[i,y]=s.useState({});s.useEffect(()=>{y({})},[o]);const X=s.useMemo(()=>{const e=[];for(let a=0;a<Y.length;a++){const d=f[a];for(const b of o[a])for(const g in b.endpoints){const l=b.endpoints[g];for(const _ of l.configured_reportings){const w=z(d,b.ieee_address,_.cluster,_.attribute),v=w==null||$(w);e.push({sourceIdx:a,device:b,rule:{..._,endpoint:g},bridgeDefinitions:d,isAnalogAttribute:v})}}}return e},[o,f]),R=s.useMemo(()=>Object.keys(i).length,[i]),q=s.useCallback(async([e,a,d,b])=>{const g=[];for(const l of D.table.getFilteredRowModel().rows)if(l.getIsSelected()){const{sourceIdx:_,device:w,rule:v,bridgeDefinitions:A}=l.original,S=z(A,w.ieee_address,v.cluster,v.attribute),W=S==null||$(S),L={id:w.ieee_address,endpoint:v.endpoint,cluster:v.cluster,attribute:v.attribute,minimum_report_interval:e===void 0?v.minimum_report_interval:e,maximum_report_interval:b?65535:a===void 0?v.maximum_report_interval:a,option:{}};W&&(L.reportable_change=b?0:d===void 0?v.reportable_change:d),g.push(E(_,"bridge/request/device/reporting/configure",L))}y({}),g.length>0&&await Promise.allSettled(g)},[]);s.useEffect(()=>{h(r&&u?de(r.ieee_address,u):null)},[r,u]);const J=s.useMemo(()=>Z(r),[r]),N=s.useCallback(async(e,a,d,b)=>{const{cluster:g,endpoint:l,attribute:_,minimum_report_interval:w,maximum_report_interval:v,reportable_change:A}=d,S={id:a.ieee_address,endpoint:l,cluster:g,attribute:_,minimum_report_interval:w,maximum_report_interval:v,option:{}};b&&(S.reportable_change=A),await E(e,"bridge/request/device/reporting/configure",S)},[]),K=s.useCallback(async e=>{if(!r)return;const a=z(f[c],r.ieee_address,e.cluster,e.attribute),d=a==null||$(a);await N(c,r,e,d),j(0),m(null),x("")},[N,c,r,f]),T=s.useCallback(async([e,a,d,b,g])=>{await E(e,"bridge/request/device/reporting/read",{id:a,endpoint:d,cluster:b,configs:[{attribute:g}]})},[]),Q=s.useMemo(()=>[{id:"select",size:45,header:({table:e})=>t.jsx(me,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),accessorFn:()=>"",cell:({row:e})=>t.jsx("input",{type:"checkbox",className:"checkbox",checked:e.getIsSelected(),disabled:!e.getCanSelect(),onChange:e.getToggleSelectedHandler()}),enableGlobalFilter:!1,enableColumnFilter:!1,enableSorting:!1},{id:"source",size:60,header:()=>t.jsx("span",{title:n(e=>e.source,{ns:"common"}),children:t.jsx(F,{icon:te})}),accessorFn:({sourceIdx:e})=>B[e],cell:({row:{original:{sourceIdx:e}}})=>t.jsx(ee,{idx:e,nameClassName:"hidden md:inline-block"}),filterFn:"equals",meta:{filterVariant:"select",showFacetedOccurrences:!0}},{id:"friendly_name",size:250,minSize:175,header:n(e=>e.friendly_name,{ns:"common"}),accessorFn:({device:e})=>`${e.friendly_name} ${e.ieee_address} ${e.definition?.model??""}`,cell:({row:{original:{sourceIdx:e,device:a}}})=>t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("div",{className:"avatar",children:t.jsx("div",{className:"h-11 w-11",style:{overflow:"visible"},children:t.jsx(le,{device:a,disabled:a.disabled})})}),t.jsxs("div",{className:"flex-grow flex flex-col min-w-0",children:[t.jsx(ne,{to:`/device/${e}/${a.ieee_address}/reporting`,className:"link link-hover truncate",children:a.friendly_name}),a.description&&t.jsx("div",{className:"max-w-3xs text-xs opacity-50 truncate",title:a.description,children:a.description})]})]}),sortingFn:(e,a)=>e.original.device.friendly_name.localeCompare(a.original.device.friendly_name),filterFn:"includesString",meta:{filterVariant:"text",textFaceted:!0}},{id:"endpoint",size:85,header:n(e=>e.endpoint),accessorFn:({rule:e})=>e.endpoint,filterFn:"equals",meta:{filterVariant:"text"}},{id:"cluster",minSize:150,header:n(e=>e.cluster),accessorFn:({rule:e})=>e.cluster,filterFn:"includesString",meta:{filterVariant:"text",textFaceted:!0}},{id:"attribute",minSize:150,header:n(e=>e.attribute),accessorFn:({rule:e})=>e.attribute,cell:({row:{original:{rule:e}}})=>t.jsx("div",{className:"min-w-0",title:`${e.attribute}`,children:t.jsx("div",{className:"truncate",children:e.attribute})}),filterFn:"includesString",meta:{filterVariant:"text",textFaceted:!0}},{id:"min_rep_interval",size:120,header:n(e=>e.min_rep_interval),accessorFn:({rule:e})=>e.minimum_report_interval,filterFn:"inNumberRange",meta:{filterVariant:"range"}},{id:"max_rep_interval",size:120,header:n(e=>e.max_rep_interval),accessorFn:({rule:e})=>e.maximum_report_interval,filterFn:"inNumberRange",meta:{filterVariant:"range"}},{id:"min_rep_change",size:120,header:n(e=>e.min_rep_change),accessorFn:({rule:e,isAnalogAttribute:a})=>a?e.reportable_change:"N/A",filterFn:"inNumberRange",meta:{filterVariant:"range"}},{id:"actions",size:110,cell:({row:{original:{sourceIdx:e,device:a,rule:d,bridgeDefinitions:b,isAnalogAttribute:g}}})=>t.jsxs("div",{className:"join join-horizontal",children:[t.jsx(C,{className:"btn btn-sm btn-square btn-outline btn-primary join-item",title:n(l=>l.edit,{ns:"common"}),onClick:async()=>await k.show(xe,{sourceIdx:e,device:a,rule:d,bridgeDefinitions:b,isAnalogAttribute:g,onApply:N}),children:t.jsx(F,{icon:ae})}),t.jsx(I,{className:"btn btn-sm btn-square btn-outline btn-accent join-item",item:[e,a.ieee_address,d.endpoint,d.cluster,d.attribute],onClick:T,title:n(l=>l.sync,{ns:"common"}),modalDescription:n(l=>l.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:n(l=>l.cancel,{ns:"common"}),children:t.jsx(F,{icon:ie})}),t.jsx(I,{title:n(l=>l.disable,{ns:"common"}),className:"btn btn-sm btn-square btn-error btn-outline join-item",onClick:async()=>await N(e,a,{...d,maximum_report_interval:65535,reportable_change:0},g),modalDescription:n(l=>l.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:n(l=>l.cancel,{ns:"common"}),children:t.jsx(F,{icon:se})})]}),enableSorting:!1,enableColumnFilter:!1,enableGlobalFilter:!1}],[N,T,n]),D=ge({id:"all-reportings",columns:Q,data:X,visibleColumns:{source:O},sorting:[{id:"friendly_name",desc:!1},{id:"endpoint",desc:!1}],rowSelection:i,onRowSelectionChange:y});return t.jsxs(t.Fragment,{children:[t.jsx(re,{children:t.jsx(fe,{...D})}),t.jsxs("div",{className:"flex flex-row flex-wrap justify-center gap-2 mb-2",children:[O?t.jsx(oe,{name:"source",label:n(e=>e.source,{ns:"common"}),value:c,onChange:e=>{e.target.validationMessage||(j(Number.parseInt(e.target.value,10)),m(null),x(""))},className:"select",children:B.map((e,a)=>t.jsx("option",{value:a,children:e},`${a}-${e}`))}):null,t.jsx(ue,{label:n(e=>e.device,{ns:"zigbee"}),devices:o[c]??[],value:r?.ieee_address??"",onChange:e=>{e&&"ieee_address"in e?(m(e),x("")):m(null)},disabled:(o[c]??[]).length===0}),t.jsx(pe,{label:n(e=>e.source_endpoint,{ns:"common"}),values:J,value:u,disabled:!r,onChange:e=>x(String(e))}),r&&p?t.jsx(U,{sourceIdx:c,rule:p,bridgeDefinitions:f[c],device:r,onApply:K,showDivider:!1}):null]}),t.jsx("div",{className:"mb-5",children:t.jsxs("div",{className:"flex flex-row flex-wrap gap-2 px-2 pb-3",children:[t.jsx(C,{className:"btn btn-outline btn-error btn-sm",title:n(e=>e.edit_selected,{ns:"common"}),onClick:async()=>await k.show(ve,{onApply:q}),disabled:R===0,children:`${n(e=>e.edit_selected,{ns:"common"})} (${R})`}),t.jsx(I,{item:[void 0,void 0,void 0,!0],className:"btn btn-outline btn-error btn-sm",onClick:q,title:n(e=>e.disable_selected,{ns:"common"}),disabled:R===0,modalDescription:n(e=>e.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:n(e=>e.cancel,{ns:"common"}),children:`${n(e=>e.disable_selected,{ns:"common"})} (${R})`})]})}),t.jsx("div",{className:"mb-5",children:t.jsx(be,{id:"all-reportings",...D})})]})}export{Ve as default};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,u as q,j as a,B as y,F as p,
|
|
1
|
+
import{r as l,u as q,j as a,B as y,F as p,ah as S,a5 as C,a9 as B,c as D}from"./index-DiJ--4jy.js";import{I as b}from"./InputField-ClGszlbJ.js";import{c as F,a as E,d as I,C as M,A as z}from"./ClusterSinglePicker-B-he_crF.js";const V=l.memo(({sourceIdx:x,rule:i,bridgeDefinitions:g,device:r,onApply:f,onSync:_,showDivider:N,showOnlyApply:h=!1})=>{const[t,m]=l.useState(i),[u,j]=l.useState(null),{t:s}=q(["zigbee","common"]);l.useEffect(()=>{m(i);const e=F(g,r.ieee_address,i.cluster);j(e[i.attribute]??null)},[i,g,r.ieee_address]);const v=l.useCallback(e=>{m(n=>({...n,cluster:e}))},[]),w=l.useCallback((e,n)=>{m(o=>({...o,attribute:e})),j(n)},[]),d=l.useCallback(e=>{m(n=>({...n,[e.target.name]:e.target.value?e.target.valueAsNumber:""}))},[]),A=l.useMemo(()=>{const e=new Set,n=new Set;t.cluster&&n.add(t.cluster);const o=r.endpoints[Number.parseInt(t.endpoint,10)];if(o){for(const c of o.clusters.output)n.add(c);for(const c of o.clusters.input)n.has(c)||e.add(c)}return[{name:"available",clusters:n},{name:"possible",clusters:e}]},[r.endpoints,t.endpoint,t.cluster]),R=l.useMemo(()=>u==null||E(u),[u]),k=l.useMemo(()=>I(t),[t]);return a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"flex flex-row flex-wrap gap-2",children:[a.jsx(M,{label:s(e=>e.cluster),disabled:!t.endpoint||!t.isNew,clusters:A,value:t.cluster,onChange:v,required:!0}),a.jsx(z,{sourceIdx:x,label:s(e=>e.attribute),disabled:!t.cluster||!t.isNew,value:t.attribute,cluster:t.cluster,device:r,onChange:w,required:!0}),a.jsx(b,{name:"minimum_report_interval",label:s(e=>e.min_rep_interval),type:"number",value:t.minimum_report_interval??"",onChange:d,required:!0,className:"input validator w-48",min:0,max:65535}),a.jsx(b,{name:"maximum_report_interval",label:s(e=>e.max_rep_interval),type:"number",value:t.maximum_report_interval??"",onChange:d,required:!0,className:"input validator w-48",min:0,max:65535}),R?a.jsx(b,{name:"reportable_change",label:s(e=>e.min_rep_change),type:"number",value:t.reportable_change??"",onChange:d,className:"input validator w-48",required:!0}):a.jsxs("fieldset",{className:"fieldset",children:[a.jsx("legend",{className:"fieldset-legend",children:s(e=>e.min_rep_change)}),a.jsx("p",{className:"label w-48",children:"N/A"})]}),a.jsxs("fieldset",{className:"fieldset ml-auto",children:[a.jsx("legend",{className:"fieldset-legend",children:s(e=>e.actions)}),a.jsxs("div",{className:"join join-horizontal",children:[a.jsx(y,{title:s(e=>e.apply,{ns:"common"}),className:"btn btn-square btn-primary btn-outline join-item",item:t,onClick:f,disabled:!k,children:a.jsx(p,{icon:S})}),!h&&_!==void 0&&!t.isNew?a.jsx(C,{className:"btn btn-square btn-outline btn-accent join-item",item:[x,r.ieee_address,i.endpoint,i.cluster,i.attribute],onClick:_,title:s(e=>e.sync,{ns:"common"}),modalDescription:s(e=>e.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:s(e=>e.cancel,{ns:"common"}),children:a.jsx(p,{icon:B})}):null,!h&&!t.isNew?a.jsx(C,{title:s(e=>e.disable,{ns:"common"}),className:"btn btn-square btn-error btn-outline join-item",onClick:async()=>{await f({...t,maximum_report_interval:65535,reportable_change:0})},modalDescription:s(e=>e.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:s(e=>e.cancel,{ns:"common"}),children:a.jsx(p,{icon:D})}):null]})]})]}),N?a.jsx("div",{className:"divider my-0"}):null]})});export{V as R};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d,D as t,j as e}from"./index-DiJ--4jy.js";import{A as i,R as m}from"./RecallRemove-Bg_AJVfE.js";import"./envs-CSqIi4cL.js";import"./DashboardFeatureWrapper-B3lAVBjM.js";import"./Feature-CZ82llrY.js";import"./DisplayValue-DLP2mg_V.js";import"./isObject--vsEa_js.js";import"./_createCompounder-DUhfPC_B.js";import"./isObjectLike-DD38kuct.js";import"./index-w9H6LvRA.js";import"./InputField-ClGszlbJ.js";import"./extends-CF3RwP-h.js";import"./react-select.esm-DWfnJubF.js";import"./defineProperty-CegpTSss.js";import"./floating-ui.dom-I8hrORoS.js";function R({sourceIdx:r,device:a}){const o=d(t(s=>s.deviceStates[r][a.friendly_name]));return e.jsxs("div",{className:"flex flex-row flex-wrap gap-4 w-full",children:[e.jsx("div",{className:"card card-border bg-base-200 border-base-300 rounded-box shadow-md flex-1",children:e.jsx("div",{className:"card-body p-4",children:e.jsx(i,{sourceIdx:r,target:a,deviceState:o??{}})})}),e.jsx("div",{className:"card card-border bg-base-200 border-base-300 rounded-box shadow-md flex-1",children:e.jsx("div",{className:"card-body p-4",children:e.jsx(m,{sourceIdx:r,target:a})})})]})}export{R as default};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as e}from"./index-
|
|
1
|
+
import{r as d,j as e}from"./index-DiJ--4jy.js";const n=d.memo(s=>{const{label:l,detail:a,onChange:t,children:r,...c}=s;return e.jsxs("fieldset",{className:"fieldset",children:[l&&e.jsxs("legend",{className:"fieldset-legend",children:[l,s.required?" *":""]}),e.jsx("select",{className:`select${s.required?" validator":""}`,onChange:t,...c,children:r}),a&&e.jsx("span",{className:"label",children:a})]})});export{n as S};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as g,
|
|
1
|
+
import{a as g,D as h,u as d,r as p,s as m,j as t,dg as f,E as n}from"./index-DiJ--4jy.js";import{I as j}from"./InfoAlert-Duqe1W84.js";import{S as c}from"./SettingsList-Dk4_bVrB.js";import"./envs-CSqIi4cL.js";import"./CheckboxField-VUm-0hft.js";import"./InputField-ClGszlbJ.js";import"./NumberField-BjCMByny.js";import"./SelectField-D8d6iiLj.js";const o=({isActive:e})=>e?"tab tab-active":"tab";function q({sourceIdx:e,tab:i}){const r=g(h(s=>s.bridgeInfo[e])),{t:a}=d(["settings","common"]),l=p.useCallback(async s=>{i==="main"?await m(e,"bridge/request/options",{options:s}):await m(e,"bridge/request/options",{options:{[i]:s}})},[e,i]);return t.jsxs(t.Fragment,{children:[t.jsx(j,{children:t.jsx("a",{href:f,target:"_blank",rel:"noreferrer",className:"link link-hover",children:a(s=>s.read_the_docs_info,{ns:"common"})})}),t.jsxs("div",{className:"tabs tabs-border",children:[t.jsx(n,{to:`/settings/${e}/settings/main`,className:o,children:a(s=>s.main)}),t.jsx(n,{to:`/settings/${e}/settings/frontend`,className:o,children:a(s=>s.frontend)}),t.jsx(n,{to:`/settings/${e}/settings/mqtt`,className:o,children:a(s=>s.mqtt)}),t.jsx(n,{to:`/settings/${e}/settings/serial`,className:o,children:a(s=>s.serial)}),t.jsx(n,{to:`/settings/${e}/settings/availability`,className:o,children:a(s=>s.availability)}),t.jsx(n,{to:`/settings/${e}/settings/ota`,className:o,children:a(s=>s.ota)}),t.jsx(n,{to:`/settings/${e}/settings/advanced`,className:o,children:a(s=>s.advanced)}),t.jsx(n,{to:`/settings/${e}/settings/homeassistant`,className:o,children:a(s=>s.homeassistant)}),t.jsx("div",{className:"tab-content block h-full bg-base-100 p-3",children:i==="main"?t.jsx(c,{schema:r.config_schema,data:r.config,set:l,rootOnly:!0,namespace:""}):r.config_schema.properties[i]?t.jsx(c,{schema:r.config_schema.properties[i],data:r.config[i],set:l,namespace:i}):null})]})]})}export{q as default};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as g,j as s,B as j,F as h,
|
|
1
|
+
import{r as g,j as s,B as j,F as h,Y as v,a6 as V,ah as w,u as S}from"./index-DiJ--4jy.js";import{C as A}from"./CheckboxField-VUm-0hft.js";import{I as F}from"./InputField-ClGszlbJ.js";import{N as E}from"./NumberField-BjCMByny.js";import{S as $}from"./SelectField-D8d6iiLj.js";const I=g.memo(l=>{const{defaultValues:n,label:c,detail:o,type:i,onSubmit:u,...x}=l,[f,m]=g.useState(n||[]);g.useEffect(()=>{m(n||[])},[n]);const e=g.useCallback((r,d)=>{m(b=>{const C=Array.from(b);return C[r]=i==="number"?d.target.value?d.target.valueAsNumber:"":d.target.value,C})},[i]),t=g.useCallback(()=>{m(r=>[...r,""])},[]),a=g.useCallback(r=>{m(d=>{const b=Array.from(d);return b.splice(r,1),b})},[]),p=g.useCallback(()=>u(i==="number"?f.filter(r=>typeof r=="number"):f.filter(r=>!!r)),[i,f,u]);return s.jsxs("fieldset",{className:"fieldset gap-2",children:[c&&s.jsxs("legend",{className:"fieldset-legend",children:[c,l.required?" *":""]}),s.jsx("div",{className:"flex flex-row flex-wrap gap-2",children:f.map((r,d)=>s.jsxs("div",{className:"join min-w-xs",children:[s.jsx("input",{className:"input join-item",onBlur:b=>{e(d,b)},type:i,defaultValue:Number.isNaN(r)?"":r,...x}),s.jsx(j,{className:"btn btn-error btn-outline join-item",onClick:()=>a(d),children:s.jsx(h,{icon:v})})]},`${r}-${d}`))}),s.jsxs("div",{className:"flex flex-row flex-wrap gap-2 items-center mt-1",children:[s.jsx(j,{onClick:t,className:"btn btn-sm btn-square btn-success ms-2",children:s.jsx(h,{icon:V})}),s.jsx(j,{onClick:p,className:"btn btn-sm btn-square btn-primary",children:s.jsx(h,{icon:w})}),o&&s.jsx("p",{className:"label text-wrap",children:o})]})]})}),O=g.memo(l=>{const{names:n,label:c,detail:o,defaultsChecked:i,onSubmit:u,...x}=l,[f,m]=g.useState(i||[]);g.useEffect(()=>{m(i||[])},[i]);const e=g.useCallback(a=>{m(p=>a.target.checked?[...p,a.target.name]:p.filter(r=>r!==a.target.name))},[]),t=g.useCallback(()=>u(f),[f,u]);return s.jsxs("fieldset",{className:"fieldset gap-2",children:[c&&s.jsxs("legend",{className:"fieldset-legend",children:[c,l.required?" *":""]}),s.jsx("div",{className:"flex flex-row flex-wrap gap-2",children:n.map(a=>s.jsxs("label",{className:"label",children:[s.jsx("input",{name:a,className:"checkbox",type:"checkbox",onChange:e,checked:f.includes(a),...x}),a]},a))}),s.jsxs("div",{className:"flex flex-row flex-wrap gap-2 items-center mt-1",children:[s.jsx(j,{onClick:t,className:"btn btn-sm btn-square btn-primary",children:s.jsx(h,{icon:w})}),o&&s.jsx("p",{className:"label text-wrap",children:o})]})]})}),B={autoComplete:"off","data-bwignore":"true","data-lpignore":"true","data-1p-ignore":"true"},T=(l,n,c,o,i,u,x)=>{let f=n.type;if(Array.isArray(f))f=f.find(e=>e!=="null");else if(n.oneOf)return;const m=`${i}-${l}-${n.type}-${n.title}`;switch(f){case"boolean":return s.jsx(A,{name:l,label:l,detail:x,onChange:e=>!e.target.validationMessage&&o({[l]:e.target.checked}),required:u,defaultChecked:c??!1},m);case"integer":case"number":return n.enum?s.jsxs($,{name:l,label:l,detail:x,onChange:e=>!e.target.validationMessage&&o({[l]:e.target.value===""?null:Number.parseInt(e.target.value,10)}),required:u,defaultValue:c??"",children:[s.jsx("option",{value:"",disabled:u,children:"-"}),n.enum.map(e=>s.jsx("option",{value:e,children:e},e))]},m):s.jsx(E,{name:l,label:l,detail:x,onSubmit:(e,t)=>t&&o({[l]:e===""?null:e}),min:n.minimum,max:n.maximum,required:u,initialValue:c??""},m);case"string":return n.enum?s.jsxs($,{name:l,label:l,detail:x,onChange:e=>!e.target.validationMessage&&o({[l]:e.target.value===""?null:e.target.value}),required:u,defaultValue:c??"",children:[s.jsx("option",{value:"",disabled:u,children:"-"}),n.enum.map(e=>s.jsx("option",{value:e,children:e},e))]},m):s.jsx(F,{name:l,label:l,detail:x,type:"text",onBlur:e=>!e.target.validationMessage&&o({[l]:e.target.value===""?null:e.target.value}),required:u,defaultValue:c??"",...l==="password"?B:void 0},m);case"array":{const e=n.items;if(e&&typeof e=="object"&&"type"in e){if(e.enum)return s.jsx(O,{names:e.enum,label:l,detail:x,onSubmit:t=>o({[l]:t}),defaultsChecked:c??[]});if(e.type==="string"||e.type==="number")return s.jsx(I,{defaultValues:c??[],label:l,detail:x,onSubmit:t=>o({[l]:t}),type:e.type})}}}},N=(l,n,c,o,i,u=[],x=!1,f="")=>{const m=[],e=[];for(const t in n){const a=n[t];if(typeof a=="boolean"||a.readOnly)continue;const p=f?`${f}-${t}`:t;if(a.properties)x||e.push(s.jsxs("div",{className:"list",children:[s.jsx("h3",{className:"list-row p-3 text-lg",children:a.title||t}),N(l,a.properties,c[t]||{},async r=>o({[t]:r}),i+1,a.required,!1,p)]},`${i}-${t}`));else{const r=a.oneOf?.find(d=>typeof d=="object"&&d.properties);if(r)(t!=="log_syslog"||c.log_output.includes("syslog"))&&e.push(s.jsxs("div",{className:"list",children:[s.jsx("h3",{className:"list-row p-3 text-lg",children:r.title||a.title||t}),N(l,r.properties,c[t]||{},async d=>o({[t]:d}),i+1,r.required,!1,p)]},`${i}-${t}`));else{const d=T(t,a,c[t]??a.default,o,i,u.includes(t),a.description?`${l(b=>b[p],{defaultValue:a.description})}${a.default!=null?` (${l(b=>b.default,{ns:"common"})}: ${a.default})`:""}`:a.default!=null?`${l(b=>b.default,{ns:"common"})}: ${a.default}}`:void 0);d&&m.push(s.jsx("div",{className:`list-row p-3 ${i!==0?` ps-${4+i*4}`:""}`,children:d},`${i}-${t}`))}}}return e.length>0?m.concat(e):m};function R({schema:l,data:n,set:c,rootOnly:o,namespace:i}){const{t:u}=S(["settingsSchemaDescriptions","common"]);return s.jsx("div",{className:"list bg-base-100",children:l.properties&&N(u,l.properties,n,c,0,l.required,o,i)})}export{R as S};
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./About-ZTihYbyu.js","./index-DiJ--4jy.js","./envs-CSqIi4cL.js","./index-COCbPj4S.css","./snakeCase-BGM3IOtN.js","./_createCompounder-DUhfPC_B.js","./isObjectLike-DD38kuct.js","./Health-B6Q28am3.js","./useTable-DQ_SXEUl.js","./DebouncedInput-dOweMuV9.js","./DeviceImage-DyYFIRjz.js","./index-Ylx8hT_m.js","./defineProperty-CegpTSss.js","./InfoAlert-Duqe1W84.js","./Table-a9jksZ8Q.js","./Duration-DzRD0grs.js","./TimeAgo-CLxEA7lv.js","./Settings-amzT9Wy4.js","./SettingsList-Dk4_bVrB.js","./CheckboxField-VUm-0hft.js","./InputField-ClGszlbJ.js","./NumberField-BjCMByny.js","./SelectField-D8d6iiLj.js","./Tools-BId-rvzb.js","./Bridge-C4PBtT5N.js","./Json-DEpnDDlz.js","./DevConsole-h2vdYRbh.js","./TextareaField-KWfoNm-T.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{u as v,x as b,z as f,C as h,r as o,G as x,b as j,O as T,au as E,av as N,W as $,j as s,E as _,F as y,N as A,M as P,A as w,S as z,_ as l}from"./index-DiJ--4jy.js";import"./envs-CSqIi4cL.js";const S=o.lazy(async()=>await l(()=>import("./About-ZTihYbyu.js"),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url)),L=o.lazy(async()=>await l(()=>import("./Health-B6Q28am3.js"),__vite__mapDeps([7,1,2,3,8,9,10,11,12,13,14,15,16]),import.meta.url)),D=o.lazy(async()=>await l(()=>import("./Settings-amzT9Wy4.js"),__vite__mapDeps([17,1,2,3,13,18,19,20,21,22]),import.meta.url)),R=o.lazy(async()=>await l(()=>import("./Tools-BId-rvzb.js"),__vite__mapDeps([23,1,2,3,20,11]),import.meta.url)),O=o.lazy(async()=>await l(()=>import("./Bridge-C4PBtT5N.js"),__vite__mapDeps([24,1,2,3,25]),import.meta.url)),V=o.lazy(async()=>await l(()=>import("./DevConsole-h2vdYRbh.js"),__vite__mapDeps([26,1,2,3,20,22,27,13]),import.meta.url));function C(t,n,a){switch(n){case"about":return s.jsx(S,{sourceIdx:t},t);case"health":return s.jsx(L,{sourceIdx:t},t);case"settings":return s.jsx(D,{sourceIdx:t,tab:a??"main"},t);case"tools":return s.jsx(R,{sourceIdx:t},t);case"bridge":return s.jsx(O,{sourceIdx:t},t);case"dev-console":return s.jsx(V,{sourceIdx:t,tab:a??"mqtt"},t)}}const g=({isActive:t})=>t?"menu-active":void 0;function F(){const{t}=v("settings"),n=b(),{sourceIdx:a,tab:i,subTab:r}=f(),[d,c]=h(a);o.useEffect(()=>{!a||!c?n(`/settings/0/${i||"about"}`,{replace:!0}):i?r||(i==="settings"?n(`/settings/${a}/settings/main`,{replace:!0}):i==="dev-console"&&n(`/settings/${a}/dev-console/mqtt`,{replace:!0})):n(`/settings/${a}/about`,{replace:!0})},[a,c,i,r,n]);const p=o.useMemo(()=>[{to:`/settings/${a}/about`,icon:x,title:t(e=>e.about)},{to:`/settings/${a}/health`,icon:j,title:t(e=>e.health)},{to:`/settings/${a}/settings`,icon:T,title:t(e=>e.settings)},{to:`/settings/${a}/tools`,icon:E,title:t(e=>e.tools)},{to:`/settings/${a}/bridge`,icon:N,title:t(e=>e.bridge)},{to:`/settings/${a}/dev-console`,icon:$,title:t(e=>e.dev_console)}],[a,t]),m=s.jsx("div",{className:"menu menu-horizontal flex-1",children:p.map(e=>s.jsx("li",{className:"tooltip tooltip-bottom","data-tip":e.title,children:s.jsxs(_,{to:e.to,className:g,children:[s.jsx(y,{icon:e.icon,size:"lg"}),s.jsx("span",{className:"hidden lg:inline",children:e.title})]})},e.to))});return s.jsxs(s.Fragment,{children:[s.jsx(A,{children:P?s.jsxs("div",{className:"flex-1 flex flex-col",children:[s.jsx("div",{className:"menu menu-horizontal flex-1 pb-0",children:w.map((e,u)=>s.jsx("li",{children:s.jsx(_,{to:`/settings/${u}/${i||"about"}${r?`/${r}`:""}`,className:g,children:s.jsx(z,{idx:u,alwaysShowName:!0})})},e))}),m]}):m}),i&&C(d,i,r)]})}export{F as default};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,D as r,j as i}from"./index-DiJ--4jy.js";import{J as p}from"./Json-DEpnDDlz.js";import"./envs-CSqIi4cL.js";function S({sourceIdx:t,friendlyName:e}){const o=a(r(s=>s.deviceStates[t][e]));return i.jsx(p,{obj:o??{}})}export{S as default};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b7 as k,j as O,r as ht,d3 as en,u as tn}from"./index-BpYGCU7a.js";import{f as To}from"./useTable-B7OaP5Ly.js";const It=0,Pe=1,$e=2,wo=4;function Qt(e){return()=>e}function on(e){e()}function pt(e,t){return o=>e(t(o))}function eo(e,t){return()=>e(t)}function nn(e,t){return o=>e(t,o)}function Mt(e){return e!==void 0}function rn(...e){return()=>{e.map(on)}}function lt(){}function Tt(e,t){return t(e),e}function ln(e,t){return t(e)}function Q(...e){return e}function K(e,t){return e(Pe,t)}function L(e,t){e(It,t)}function Wt(e){e($e)}function ne(e){return e(wo)}function B(e,t){return K(e,nn(t,It))}function Re(e,t){const o=e(Pe,n=>{o(),t(n)});return o}function to(e){let t,o;return n=>r=>{t=r,o&&clearTimeout(o),o=setTimeout(()=>{n(t)},e)}}function So(e,t){return e===t}function J(e=So){let t;return o=>n=>{e(t,n)||(t=n,o(n))}}function W(e){return t=>o=>{e(o)&&t(o)}}function y(e){return t=>pt(t,e)}function Be(e){return t=>()=>{t(e)}}function p(e,...t){const o=sn(...t);return(n,r)=>{switch(n){case $e:Wt(e);return;case Pe:return K(e,o(r))}}}function ke(e,t){return o=>n=>{o(t=e(t,n))}}function Ne(e){return t=>o=>{e>0?e--:t(o)}}function je(e){let t=null,o;return n=>r=>{t=r,!o&&(o=setTimeout(()=>{o=void 0,n(t)},e))}}function A(...e){const t=new Array(e.length);let o=0,n=null;const r=Math.pow(2,e.length)-1;return e.forEach((i,l)=>{const s=Math.pow(2,l);K(i,a=>{const d=o;o=o|s,t[l]=a,d!==r&&o===r&&n&&(n(),n=null)})}),i=>l=>{const s=()=>{i([l].concat(t))};o===r?s():n=s}}function sn(...e){return t=>e.reduceRight(ln,t)}function cn(e){let t,o;const n=()=>t?.();return function(r,i){switch(r){case Pe:return i?o===i?void 0:(n(),o=i,t=K(e,i),t):(n(),lt);case $e:n(),o=null;return}}}function w(e){let t=e;const o=N();return(n,r)=>{switch(n){case It:t=r;break;case Pe:{r(t);break}case wo:return t}return o(n,r)}}function he(e,t){return Tt(w(t),o=>B(e,o))}function N(){const e=[];return(t,o)=>{switch(t){case It:e.slice().forEach(n=>{n(o)});return;case $e:e.splice(0,e.length);return;case Pe:return e.push(o),()=>{const n=e.indexOf(o);n>-1&&e.splice(n,1)}}}}function Te(e){return Tt(N(),t=>B(e,t))}function _(e,t=[],{singleton:o}={singleton:!0}){return{constructor:e,dependencies:t,id:an(),singleton:o}}const an=()=>Symbol();function un(e){const t=new Map,o=({constructor:n,dependencies:r,id:i,singleton:l})=>{if(l&&t.has(i))return t.get(i);const s=n(r.map(a=>o(a)));return l&&t.set(i,s),s};return o(e)}function le(...e){const t=N(),o=new Array(e.length);let n=0;const r=Math.pow(2,e.length)-1;return e.forEach((i,l)=>{const s=Math.pow(2,l);K(i,a=>{o[l]=a,n=n|s,n===r&&L(t,o)})}),function(i,l){switch(i){case $e:{Wt(t);return}case Pe:return n===r&&l(o),K(t,l)}}}function M(e,t=So){return p(e,J(t))}function Et(...e){return function(t,o){switch(t){case $e:return;case Pe:return rn(...e.map(n=>K(n,o)))}}}var we=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(we||{});const dn={0:"debug",3:"error",1:"log",2:"warn"},fn=()=>typeof globalThis>"u"?window:globalThis,Le=_(()=>{const e=w(3);return{log:w((t,o,n=1)=>{var r;const i=(r=fn().VIRTUOSO_LOG_LEVEL)!=null?r:ne(e);n>=i&&console[dn[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,o)}),logLevel:e}},[],{singleton:!0});function Ge(e,t,o){return Pt(e,t,o).callbackRef}function Pt(e,t,o){const n=k.useRef(null);let r=l=>{};const i=k.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(l=>{const s=()=>{const a=l[0].target;a.offsetParent!==null&&e(a)};o?s():requestAnimationFrame(s)}):null,[e,o]);return r=l=>{l&&t?(i?.observe(l),n.current=l):(n.current&&i?.unobserve(n.current),n.current=null)},{callbackRef:r,ref:n}}function hn(e,t,o,n,r,i,l,s,a){const d=k.useCallback(h=>{const I=mn(h.children,t,"offsetHeight",r);let g=h.parentElement;for(;!g.dataset.virtuosoScroller;)g=g.parentElement;const v=g.lastElementChild.dataset.viewportType==="window";let b;v&&(b=g.ownerDocument.defaultView);const T=l?l.scrollTop:v?b.scrollY||b.document.documentElement.scrollTop:g.scrollTop,m=l?l.scrollHeight:v?b.document.documentElement.scrollHeight:g.scrollHeight,u=l?l.offsetHeight:v?b.innerHeight:g.offsetHeight;n({scrollHeight:m,scrollTop:Math.max(T,0),viewportHeight:u}),I!==null&&e(I)},[e,t,r,i,l,n,s]);return Pt(d,o,a)}function mn(e,t,o,n){const r=e.length;if(r===0)return null;const i=[];for(let l=0;l<r;l++){const s=e.item(l);if(s.dataset.index===void 0)continue;const a=parseInt(s.dataset.index),d=parseFloat(s.dataset.knownSize),h=t(s,o);if(h===0&&n("Zero-sized element, this should not happen",{child:s},we.ERROR),h===d)continue;const I=i[i.length-1];i.length===0||I.size!==h||I.endIndex!==a-1?i.push({endIndex:a,size:h,startIndex:a}):i[i.length-1].endIndex++}return i}function Co(e,t,o){const n=k.useRef(null),r=k.useCallback(a=>{if(!(a!=null&&a.offsetParent))return;const d=a.getBoundingClientRect(),h=d.width;let I,g;if(t){const v=t.getBoundingClientRect(),b=d.top-v.top;g=v.height-Math.max(0,b),I=b+t.scrollTop}else{const v=l.current.ownerDocument.defaultView;g=v.innerHeight-Math.max(0,d.top),I=d.top+v.scrollY}n.current={offsetTop:I,visibleHeight:g,visibleWidth:h},e(n.current)},[e,t]),{callbackRef:i,ref:l}=Pt(r,!0,o),s=k.useCallback(()=>{r(l.current)},[r,l]);return k.useEffect(()=>{var a;if(t){t.addEventListener("scroll",s);const d=new ResizeObserver(()=>{requestAnimationFrame(s)});return d.observe(t),()=>{t.removeEventListener("scroll",s),d.unobserve(t)}}else{const d=(a=l.current)==null?void 0:a.ownerDocument.defaultView;return d?.addEventListener("scroll",s),d?.addEventListener("resize",s),()=>{d?.removeEventListener("scroll",s),d?.removeEventListener("resize",s)}}},[s,t,l]),i}const me=_(()=>{const e=N(),t=N(),o=w(0),n=N(),r=w(0),i=N(),l=N(),s=w(0),a=w(0),d=w(0),h=w(0),I=N(),g=N(),v=w(!1),b=w(!1),T=w(!1);return B(p(e,y(({scrollTop:m})=>m)),t),B(p(e,y(({scrollHeight:m})=>m)),l),B(t,r),{deviation:o,fixedFooterHeight:d,fixedHeaderHeight:a,footerHeight:h,headerHeight:s,horizontalDirection:b,scrollBy:g,scrollContainerState:e,scrollHeight:l,scrollingInProgress:v,scrollTo:I,scrollTop:t,skipAnimationFrameInResizeObserver:T,smoothScrollTargetReached:n,statefulScrollTop:r,viewportHeight:i}},[],{singleton:!0}),Qe={lvl:0};function bo(e,t){const o=e.length;if(o===0)return[];let{index:n,value:r}=t(e[0]);const i=[];for(let l=1;l<o;l++){const{index:s,value:a}=t(e[l]);i.push({end:s-1,start:n,value:r}),n=s,r=a}return i.push({end:1/0,start:n,value:r}),i}function Z(e){return e===Qe}function et(e,t){if(!Z(e))return t===e.k?e.v:t<e.k?et(e.l,t):et(e.r,t)}function He(e,t,o="k"){if(Z(e))return[-1/0,void 0];if(Number(e[o])===t)return[e.k,e.v];if(Number(e[o])<t){const n=He(e.r,t,o);return n[0]===-1/0?[e.k,e.v]:n}return He(e.l,t,o)}function Ie(e,t,o){return Z(e)?yo(t,o,1):t===e.k?ce(e,{k:t,v:o}):t<e.k?oo(ce(e,{l:Ie(e.l,t,o)})):oo(ce(e,{r:Ie(e.r,t,o)}))}function qe(){return Qe}function Ze(e,t,o){if(Z(e))return[];const n=He(e,t)[0];return gn(kt(e,n,o))}function Bt(e,t){if(Z(e))return Qe;const{k:o,l:n,r}=e;if(t===o){if(Z(n))return r;if(Z(r))return n;{const[i,l]=Ro(n);return mt(ce(e,{k:i,l:zo(n),v:l}))}}else return t<o?mt(ce(e,{l:Bt(n,t)})):mt(ce(e,{r:Bt(r,t)}))}function Ve(e){return Z(e)?[]:[...Ve(e.l),{k:e.k,v:e.v},...Ve(e.r)]}function kt(e,t,o){if(Z(e))return[];const{k:n,l:r,r:i,v:l}=e;let s=[];return n>t&&(s=s.concat(kt(r,t,o))),n>=t&&n<=o&&s.push({k:n,v:l}),n<=o&&(s=s.concat(kt(i,t,o))),s}function mt(e){const{l:t,lvl:o,r:n}=e;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(bt(t))return Ho(ce(e,{lvl:o-1}));if(!Z(t)&&!Z(t.r))return ce(t.r,{l:ce(t,{r:t.r.l}),lvl:o,r:ce(e,{l:t.r.r,lvl:o-1})});throw new Error("Unexpected empty nodes")}else{if(bt(e))return Ot(ce(e,{lvl:o-1}));if(!Z(n)&&!Z(n.l)){const r=n.l,i=bt(r)?n.lvl-1:n.lvl;return ce(r,{l:ce(e,{lvl:o-1,r:r.l}),lvl:r.lvl+1,r:Ot(ce(n,{l:r.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function ce(e,t){return yo(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function zo(e){return Z(e.r)?e.l:mt(ce(e,{r:zo(e.r)}))}function bt(e){return Z(e)||e.lvl>e.r.lvl}function Ro(e){return Z(e.r)?[e.k,e.v]:Ro(e.r)}function yo(e,t,o,n=Qe,r=Qe){return{k:e,l:n,lvl:o,r,v:t}}function oo(e){return Ot(Ho(e))}function Ho(e){const{l:t}=e;return!Z(t)&&t.lvl===e.lvl?ce(t,{r:ce(e,{l:t.r})}):e}function Ot(e){const{lvl:t,r:o}=e;return!Z(o)&&!Z(o.r)&&o.lvl===t&&o.r.lvl===t?ce(o,{l:ce(e,{r:o.l}),lvl:t+1}):e}function gn(e){return bo(e,({k:t,v:o})=>({index:t,value:o}))}function Eo(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function tt(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Lt=_(()=>({recalcInProgress:w(!1)}),[],{singleton:!0});function Bo(e,t,o){return e[xt(e,t,o)]}function xt(e,t,o,n=0){let r=e.length-1;for(;n<=r;){const i=Math.floor((n+r)/2),l=e[i],s=o(l,t);if(s===0)return i;if(s===-1){if(r-n<2)return i-1;r=i-1}else{if(r===n)return i;n=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function pn(e,t,o,n){const r=xt(e,t,n),i=xt(e,o,n,r);return e.slice(r,i+1)}function We(e,t){return Math.round(e.getBoundingClientRect()[t])}function wt(e){return!Z(e.groupOffsetTree)}function At({index:e},t){return t===e?0:t<e?-1:1}function xn(){return{groupIndices:[],groupOffsetTree:qe(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:qe()}}function vn(e,t){let o=Z(e)?0:1/0;for(const n of t){const{endIndex:r,size:i,startIndex:l}=n;if(o=Math.min(o,l),Z(e)){e=Ie(e,0,i);continue}const s=Ze(e,l-1,r+1);if(s.some(zn(n)))continue;let a=!1,d=!1;for(const{end:h,start:I,value:g}of s)a?(r>=I||i===g)&&(e=Bt(e,I)):(d=g!==i,a=!0),h>r&&r>=I&&g!==i&&(e=Ie(e,r+1,g));d&&(e=Ie(e,l,i))}return[e,o]}function In(e){return typeof e.groupIndex<"u"}function Tn({offset:e},t){return t===e?0:t<e?-1:1}function ot(e,t,o){if(t.length===0)return 0;const{index:n,offset:r,size:i}=Bo(t,e,At),l=e-n,s=i*l+(l-1)*o+r;return s>0?s+o:s}function ko(e,t){if(!wt(t))return e;let o=0;for(;t.groupIndices[o]<=e+o;)o++;return e+o}function Oo(e,t,o){if(In(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?o:e.index;let r=ko(n,t);return r=Math.max(0,r,Math.min(o,r)),r}}function wn(e,t,o,n=0){return n>0&&(t=Math.max(t,Bo(e,n,At).offset)),bo(pn(e,t,o,Tn),bn)}function Sn(e,[t,o,n,r]){t.length>0&&n("received item sizes",t,we.DEBUG);const i=e.sizeTree;let l=i,s=0;if(o.length>0&&Z(i)&&t.length===2){const g=t[0].size,v=t[1].size;l=o.reduce((b,T)=>Ie(Ie(b,T,g),T+1,v),l)}else[l,s]=vn(l,t);if(l===i)return e;const{lastIndex:a,lastOffset:d,lastSize:h,offsetTree:I}=jt(e.offsetTree,s,l,r);return{groupIndices:o,groupOffsetTree:o.reduce((g,v)=>Ie(g,v,ot(v,I,r)),qe()),lastIndex:a,lastOffset:d,lastSize:h,offsetTree:I,sizeTree:l}}function Cn(e){return Ve(e).map(({k:t,v:o},n,r)=>{const i=r[n+1];return{endIndex:i?i.k-1:1/0,size:o,startIndex:t}})}function no(e,t){let o=0,n=0;for(;o<e;)o+=t[n+1]-t[n]-1,n++;return n-(o===e?0:1)}function jt(e,t,o,n){let r=e,i=0,l=0,s=0,a=0;if(t!==0){a=xt(r,t-1,At),s=r[a].offset;const d=He(o,t-1);i=d[0],l=d[1],r.length&&r[a].size===He(o,t)[1]&&(a-=1),r=r.slice(0,a+1)}else r=[];for(const{start:d,value:h}of Ze(o,t,1/0)){const I=d-i,g=I*l+s+I*n;r.push({index:d,offset:g,size:h}),i=d,s=g,l=h}return{lastIndex:i,lastOffset:s,lastSize:l,offsetTree:r}}function bn(e){return{index:e.index,value:e}}function zn(e){const{endIndex:t,size:o,startIndex:n}=e;return r=>r.start===n&&(r.end===t||r.end===1/0)&&r.value===o}const Rn={offsetHeight:"height",offsetWidth:"width"},Oe=_(([{log:e},{recalcInProgress:t}])=>{const o=N(),n=N(),r=he(n,0),i=N(),l=N(),s=w(0),a=w([]),d=w(void 0),h=w(void 0),I=w(void 0),g=w(void 0),v=w((c,x)=>We(c,Rn[x])),b=w(void 0),T=w(0),m=xn(),u=he(p(o,A(a,e,T),ke(Sn,m),J()),m),f=he(p(a,J(),ke((c,x)=>({current:x,prev:c.current}),{current:[],prev:[]}),y(({prev:c})=>c)),[]);B(p(a,W(c=>c.length>0),A(u,T),y(([c,x,C])=>{const z=c.reduce((j,D,V)=>Ie(j,D,ot(D,x.offsetTree,C)||V),qe());return{...x,groupIndices:c,groupOffsetTree:z}})),u),B(p(n,A(u),W(([c,{lastIndex:x}])=>c<x),y(([c,{lastIndex:x,lastSize:C}])=>[{endIndex:x,size:C,startIndex:c}])),o),B(d,h);const S=he(p(d,y(c=>c===void 0)),!0);B(p(h,W(c=>c!==void 0&&Z(ne(u).sizeTree)),y(c=>{const x=ne(I),C=ne(a).length>0;return x?C?[{endIndex:0,size:x,startIndex:0},{endIndex:1,size:c,startIndex:1}]:[]:[{endIndex:0,size:c,startIndex:0}]})),o),B(p(g,W(c=>c!==void 0&&c.length>0&&Z(ne(u).sizeTree)),y(c=>{const x=[];let C=c[0],z=0;for(let j=1;j<c.length;j++){const D=c[j];D!==C&&(x.push({endIndex:j-1,size:C,startIndex:z}),C=D,z=j)}return x.push({endIndex:c.length-1,size:C,startIndex:z}),x})),o),B(p(a,A(I,h),W(([,c,x])=>c!==void 0&&x!==void 0),y(([c,x,C])=>{const z=[];for(let j=0;j<c.length;j++){const D=c[j],V=c[j+1];z.push({startIndex:D,endIndex:D,size:x}),V!==void 0&&z.push({startIndex:D+1,endIndex:V-1,size:C})}return z})),o);const E=Te(p(o,A(u),ke(({sizes:c},[x,C])=>({changed:C!==c,sizes:C}),{changed:!1,sizes:m}),y(c=>c.changed)));K(p(s,ke((c,x)=>({diff:c.prev-x,prev:x}),{diff:0,prev:0}),y(c=>c.diff)),c=>{const{groupIndices:x}=ne(u);if(c>0)L(t,!0),L(i,c+no(c,x));else if(c<0){const C=ne(f);C.length>0&&(c-=no(-c,C)),L(l,c)}}),K(p(s,A(e)),([c,x])=>{c<0&&x("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},we.ERROR)});const H=Te(i);B(p(i,A(u),y(([c,x])=>{const C=x.groupIndices.length>0,z=[],j=x.lastSize;if(C){const D=et(x.sizeTree,0);let V=0,$=0;for(;V<c;){const ee=x.groupIndices[$],Y=x.groupIndices.length===$+1?1/0:x.groupIndices[$+1]-ee-1;z.push({endIndex:ee,size:D,startIndex:ee}),z.push({endIndex:ee+1+Y-1,size:j,startIndex:ee+1}),$++,V+=Y+1}const G=Ve(x.sizeTree);return V!==c&&G.shift(),G.reduce((ee,{k:Y,v:ge})=>{let pe=ee.ranges;return ee.prevSize!==0&&(pe=[...ee.ranges,{endIndex:Y+c-1,size:ee.prevSize,startIndex:ee.prevIndex}]),{prevIndex:Y+c,prevSize:ge,ranges:pe}},{prevIndex:c,prevSize:0,ranges:z}).ranges}return Ve(x.sizeTree).reduce((D,{k:V,v:$})=>({prevIndex:V+c,prevSize:$,ranges:[...D.ranges,{endIndex:V+c-1,size:D.prevSize,startIndex:D.prevIndex}]}),{prevIndex:0,prevSize:j,ranges:[]}).ranges})),o);const F=Te(p(l,A(u,T),y(([c,{offsetTree:x},C])=>{const z=-c;return ot(z,x,C)})));return B(p(l,A(u,T),y(([c,x,C])=>{if(x.groupIndices.length>0){if(Z(x.sizeTree))return x;let z=qe();const j=ne(f);let D=0,V=0,$=0;for(;D<-c;){$=j[V];const G=j[V+1]-$-1;V++,D+=G+1}if(z=Ve(x.sizeTree).reduce((G,{k:ee,v:Y})=>Ie(G,Math.max(0,ee+c),Y),z),D!==-c){const G=et(x.sizeTree,$);z=Ie(z,0,G);const ee=He(x.sizeTree,-c+1)[1];z=Ie(z,1,ee)}return{...x,sizeTree:z,...jt(x.offsetTree,0,z,C)}}else{const z=Ve(x.sizeTree).reduce((j,{k:D,v:V})=>Ie(j,Math.max(0,D+c),V),qe());return{...x,sizeTree:z,...jt(x.offsetTree,0,z,C)}}})),u),{beforeUnshiftWith:H,data:b,defaultItemSize:h,firstItemIndex:s,fixedItemSize:d,fixedGroupSize:I,gap:T,groupIndices:a,heightEstimates:g,itemSize:v,listRefresh:E,shiftWith:l,shiftWithOffset:F,sizeRanges:o,sizes:u,statefulTotalCount:r,totalCount:n,trackItemSizes:S,unshiftWith:i}},Q(Le,Lt),{singleton:!0});function yn(e){return e.reduce((t,o)=>(t.groupIndices.push(t.totalCount),t.totalCount+=o+1,t),{groupIndices:[],totalCount:0})}const jo=_(([{groupIndices:e,sizes:t,totalCount:o},{headerHeight:n,scrollTop:r}])=>{const i=N(),l=N(),s=Te(p(i,y(yn)));return B(p(s,y(a=>a.totalCount)),o),B(p(s,y(a=>a.groupIndices)),e),B(p(le(r,t,n),W(([a,d])=>wt(d)),y(([a,d,h])=>He(d.groupOffsetTree,Math.max(a-h,0),"v")[0]),J(),y(a=>[a])),l),{groupCounts:i,topItemsIndexes:l}},Q(Oe,me)),Ae=_(([{log:e}])=>{const t=w(!1),o=Te(p(t,W(n=>n),J()));return K(t,n=>{n&&ne(e)("props updated",{},we.DEBUG)}),{didMount:o,propsReady:t}},Q(Le),{singleton:!0}),Hn=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Fo(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Hn)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const st=_(([{gap:e,listRefresh:t,sizes:o,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,footerHeight:l,headerHeight:s,scrollingInProgress:a,scrollTo:d,smoothScrollTargetReached:h,viewportHeight:I},{log:g}])=>{const v=N(),b=N(),T=w(0);let m=null,u=null,f=null;function S(){m&&(m(),m=null),f&&(f(),f=null),u&&(clearTimeout(u),u=null),L(a,!1)}return B(p(v,A(o,I,n,T,s,l,g),A(e,i,r),y(([[E,H,F,c,x,C,z,j],D,V,$])=>{const G=Fo(E),{align:ee,behavior:Y,offset:ge}=G,pe=c-1,xe=Oo(G,H,pe);let ve=ot(xe,H.offsetTree,D)+C;ee==="end"?(ve+=V+He(H.sizeTree,xe)[1]-F+$,xe===pe&&(ve+=z)):ee==="center"?ve+=(V+He(H.sizeTree,xe)[1]-F+$)/2:ve-=x,ge&&(ve+=ge);const Ee=ze=>{S(),ze?(j("retrying to scroll to",{location:E},we.DEBUG),L(v,E)):(L(b,!0),j("list did not change, scroll successful",{},we.DEBUG))};if(S(),Y==="smooth"){let ze=!1;f=K(t,Fe=>{ze=ze||Fe}),m=Re(h,()=>{Ee(ze)})}else m=Re(p(t,En(150)),Ee);return u=setTimeout(()=>{S()},1200),L(a,!0),j("scrolling from index to",{behavior:Y,index:xe,top:ve},we.DEBUG),{behavior:Y,top:ve}})),d),{scrollTargetReached:b,scrollToIndex:v,topListHeight:T}},Q(Oe,me,Le),{singleton:!0});function En(e){return t=>{const o=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(o))}}}function Dt(e,t){e==0?t():requestAnimationFrame(()=>{Dt(e-1,t)})}function Vt(e,t){const o=t-1;return typeof e=="number"?e:e.index==="LAST"?o:e.index}const ct=_(([{defaultItemSize:e,listRefresh:t,sizes:o},{scrollTop:n},{scrollTargetReached:r,scrollToIndex:i},{didMount:l}])=>{const s=w(!0),a=w(0),d=w(!0);return B(p(l,A(a),W(([h,I])=>!!I),Be(!1)),s),B(p(l,A(a),W(([h,I])=>!!I),Be(!1)),d),K(p(le(t,l),A(s,o,e,d),W(([[,h],I,{sizeTree:g},v,b])=>h&&(!Z(g)||Mt(v))&&!I&&!b),A(a)),([,h])=>{Re(r,()=>{L(d,!0)}),Dt(4,()=>{Re(n,()=>{L(s,!0)}),L(i,h)})}),{initialItemFinalLocationReached:d,initialTopMostItemIndex:a,scrolledToInitialItem:s}},Q(Oe,me,st,Ae),{singleton:!0});function Mo(e,t){return Math.abs(e-t)<1.01}const nt="up",Xe="down",Bn="none",kn={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},On=0,at=_(([{footerHeight:e,headerHeight:t,scrollBy:o,scrollContainerState:n,scrollTop:r,viewportHeight:i}])=>{const l=w(!1),s=w(!0),a=N(),d=N(),h=w(4),I=w(On),g=he(p(Et(p(M(r),Ne(1),Be(!0)),p(M(r),Ne(1),Be(!1),to(100))),J()),!1),v=he(p(Et(p(o,Be(!0)),p(o,Be(!1),to(200))),J()),!1);B(p(le(M(r),M(I)),y(([f,S])=>f<=S),J()),s),B(p(s,je(50)),d);const b=Te(p(le(n,M(i),M(t),M(e),M(h)),ke((f,[{scrollHeight:S,scrollTop:E},H,F,c,x])=>{const C=E+H-S>-x,z={scrollHeight:S,scrollTop:E,viewportHeight:H};if(C){let D,V;return E>f.state.scrollTop?(D="SCROLLED_DOWN",V=f.state.scrollTop-E):(D="SIZE_DECREASED",V=f.state.scrollTop-E||f.scrollTopDelta),{atBottom:!0,atBottomBecause:D,scrollTopDelta:V,state:z}}let j;return z.scrollHeight>f.state.scrollHeight?j="SIZE_INCREASED":H<f.state.viewportHeight?j="VIEWPORT_HEIGHT_DECREASING":E<f.state.scrollTop?j="SCROLLING_UPWARDS":j="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:j,state:z}},kn),J((f,S)=>f&&f.atBottom===S.atBottom))),T=he(p(n,ke((f,{scrollHeight:S,scrollTop:E,viewportHeight:H})=>{if(Mo(f.scrollHeight,S))return{changed:!1,jump:0,scrollHeight:S,scrollTop:E};{const F=S-(E+H)<1;return f.scrollTop!==E&&F?{changed:!0,jump:f.scrollTop-E,scrollHeight:S,scrollTop:E}:{changed:!0,jump:0,scrollHeight:S,scrollTop:E}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),W(f=>f.changed),y(f=>f.jump)),0);B(p(b,y(f=>f.atBottom)),l),B(p(l,je(50)),a);const m=w(Xe);B(p(n,y(({scrollTop:f})=>f),J(),ke((f,S)=>ne(v)?{direction:f.direction,prevScrollTop:S}:{direction:S<f.prevScrollTop?nt:Xe,prevScrollTop:S},{direction:Xe,prevScrollTop:0}),y(f=>f.direction)),m),B(p(n,je(50),Be(Bn)),m);const u=w(0);return B(p(g,W(f=>!f),Be(0)),u),B(p(r,je(100),A(g),W(([f,S])=>!!S),ke(([f,S],[E])=>[S,E],[0,0]),y(([f,S])=>S-f)),u),{atBottomState:b,atBottomStateChange:a,atBottomThreshold:h,atTopStateChange:d,atTopThreshold:I,isAtBottom:l,isAtTop:s,isScrolling:g,lastJumpDueToItemResize:T,scrollDirection:m,scrollVelocity:u}},Q(me)),rt="top",it="bottom",ro="none";function io(e,t,o){return typeof e=="number"?o===nt&&t===rt||o===Xe&&t===it?e:0:o===nt?t===rt?e.main:e.reverse:t===it?e.main:e.reverse}function lo(e,t){var o;return typeof e=="number"?e:(o=e[t])!=null?o:0}const Nt=_(([{deviation:e,fixedHeaderHeight:t,headerHeight:o,scrollTop:n,viewportHeight:r}])=>{const i=N(),l=w(0),s=w(0),a=w(0),d=he(p(le(M(n),M(r),M(o),M(i,tt),M(a),M(l),M(t),M(e),M(s)),y(([h,I,g,[v,b],T,m,u,f,S])=>{const E=h-f,H=m+u,F=Math.max(g-E,0);let c=ro;const x=lo(S,rt),C=lo(S,it);return v-=f,v+=g+u,b+=g+u,b-=f,v>h+H-x&&(c=nt),b<h-F+I+C&&(c=Xe),c!==ro?[Math.max(E-g-io(T,rt,c)-x,0),E-F-u+I+io(T,it,c)+C]:null}),W(h=>h!=null),J(tt)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:a,topListHeight:l,visibleRange:d}},Q(me),{singleton:!0});function jn(e,t,o){if(wt(t)){const n=ko(e,t);return[{index:He(t.groupOffsetTree,n)[0],offset:0,size:0},{data:o?.[0],index:n,offset:0,size:0}]}return[{data:o?.[0],index:e,offset:0,size:0}]}const zt={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function gt(e,t,o,n,r,i){const{lastIndex:l,lastOffset:s,lastSize:a}=r;let d=0,h=0;if(e.length>0){d=e[0].offset;const T=e[e.length-1];h=T.offset+T.size}const I=o-l,g=s+I*a+(I-1)*n,v=d,b=g-h;return{bottom:h,firstItemIndex:i,items:so(e,r,i),offsetBottom:b,offsetTop:d,top:v,topItems:so(t,r,i),topListHeight:t.reduce((T,m)=>m.size+T,0),totalCount:o}}function Wo(e,t,o,n,r,i){let l=0;if(o.groupIndices.length>0)for(const h of o.groupIndices){if(h-l>=e)break;l++}const s=e+l,a=Vt(t,s),d=Array.from({length:s}).map((h,I)=>({data:i[I+a],index:I+a,offset:0,size:0}));return gt(d,[],s,r,o,n)}function so(e,t,o){if(e.length===0)return[];if(!wt(t))return e.map(d=>({...d,index:d.index+o,originalIndex:d.index}));const n=e[0].index,r=e[e.length-1].index,i=[],l=Ze(t.groupOffsetTree,n,r);let s,a=0;for(const d of e){(!s||s.end<d.index)&&(s=l.shift(),a=t.groupIndices.indexOf(s.start));let h;d.index===s.start?h={index:a,type:"group"}:h={groupIndex:a,index:d.index-(a+1)+o},i.push({...h,data:d.data,offset:d.offset,originalIndex:d.index,size:d.size})}return i}function co(e,t){var o;return e===void 0?0:typeof e=="number"?e:(o=e[t])!=null?o:0}const _e=_(([{data:e,firstItemIndex:t,gap:o,sizes:n,totalCount:r},i,{listBoundary:l,topListHeight:s,visibleRange:a},{initialTopMostItemIndex:d,scrolledToInitialItem:h},{topListHeight:I},g,{didMount:v},{recalcInProgress:b}])=>{const T=w([]),m=w(0),u=N(),f=w(0);B(i.topItemsIndexes,T);const S=he(p(le(v,b,M(a,tt),M(r),M(n),M(d),h,M(T),M(t),M(o),M(f),e),W(([c,x,,C,,,,,,,,z])=>{const j=z&&z.length!==C;return c&&!x&&!j}),y(([,,[c,x],C,z,j,D,V,$,G,ee,Y])=>{var ge,pe,xe,ve;const Ee=z,{offsetTree:ze,sizeTree:Fe}=Ee,Ye=ne(m);if(C===0)return{...zt,totalCount:C};if(c===0&&x===0)return Ye===0?{...zt,totalCount:C}:Wo(Ye,j,z,$,G,Y||[]);if(Z(Fe))return Ye>0?null:gt(jn(Vt(j,C),Ee,Y),[],C,G,Ee,$);const Ue=[];if(V.length>0){const se=V[0],re=V[V.length-1];let ae=0;for(const ie of Ze(Fe,se,re)){const q=ie.value,X=Math.max(ie.start,se),Ce=Math.min(ie.end,re);for(let de=X;de<=Ce;de++)Ue.push({data:Y?.[de],index:de,offset:ae,size:q}),ae+=q}}if(!D)return gt([],Ue,C,G,Ee,$);const Me=V.length>0?V[V.length-1]+1:0,R=wn(ze,c,x,Me);if(R.length===0)return null;const U=C-1,te=Tt([],se=>{for(const re of R){const ae=re.value;let ie=ae.offset,q=re.start;const X=ae.size;if(ae.offset<c){q+=Math.floor((c-ae.offset+G)/(X+G));const de=q-re.start;ie+=de*X+de*G}q<Me&&(ie+=(Me-q)*X,q=Me);const Ce=Math.min(re.end,U);for(let de=q;de<=Ce&&!(ie>=x);de++)se.push({data:Y?.[de],index:de,offset:ie,size:X}),ie+=X+G}}),ue=co(ee,rt),Se=co(ee,it);if(te.length>0&&(ue>0||Se>0)){const se=te[0],re=te[te.length-1];if(ue>0&&se.index>Me){const ae=Math.min(ue,se.index-Me),ie=[];let q=se.offset;for(let X=se.index-1;X>=se.index-ae;X--){const Ce=(pe=(ge=Ze(Fe,X,X)[0])==null?void 0:ge.value)!=null?pe:se.size;q-=Ce+G,ie.unshift({data:Y?.[X],index:X,offset:q,size:Ce})}te.unshift(...ie)}if(Se>0&&re.index<U){const ae=Math.min(Se,U-re.index);let ie=re.offset+re.size+G;for(let q=re.index+1;q<=re.index+ae;q++){const X=(ve=(xe=Ze(Fe,q,q)[0])==null?void 0:xe.value)!=null?ve:re.size;te.push({data:Y?.[q],index:q,offset:ie,size:X}),ie+=X+G}}}return gt(te,Ue,C,G,Ee,$)}),W(c=>c!==null),J()),zt);B(p(e,W(Mt),y(c=>c?.length)),r),B(p(S,y(c=>c.topListHeight)),I),B(I,s),B(p(S,y(c=>[c.top,c.bottom])),l),B(p(S,y(c=>c.items)),u);const E=Te(p(S,W(({items:c})=>c.length>0),A(r,e),W(([{items:c},x])=>c[c.length-1].originalIndex===x-1),y(([,c,x])=>[c-1,x]),J(tt),y(([c])=>c))),H=Te(p(S,je(200),W(({items:c,topItems:x})=>c.length>0&&c[0].originalIndex===x.length),y(({items:c})=>c[0].index),J())),F=Te(p(S,W(({items:c})=>c.length>0),y(({items:c})=>{let x=0,C=c.length-1;for(;c[x].type==="group"&&x<C;)x++;for(;c[C].type==="group"&&C>x;)C--;return{endIndex:c[C].index,startIndex:c[x].index}}),J(Eo)));return{endReached:E,initialItemCount:m,itemsRendered:u,listState:S,minOverscanItemCount:f,rangeChanged:F,startReached:H,topItemsIndexes:T,...g}},Q(Oe,jo,Nt,ct,st,at,Ae,Lt),{singleton:!0}),Po=_(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:o,headerHeight:n},{listState:r}])=>{const i=N(),l=he(p(le(o,e,n,t,r),y(([s,a,d,h,I])=>s+a+d+h+I.offsetBottom+I.bottom)),0);return B(M(l),i),{totalListHeight:l,totalListHeightChanged:i}},Q(me,_e),{singleton:!0}),Fn=_(([{viewportHeight:e},{totalListHeight:t}])=>{const o=w(!1),n=he(p(le(o,e,t),W(([r])=>r),y(([,r,i])=>Math.max(0,r-i)),je(0),J()),0);return{alignToBottom:o,paddingTopAddition:n}},Q(me,Po),{singleton:!0}),Lo=_(()=>({context:w(null)})),Mn=({itemBottom:e,itemTop:t,locationParams:{align:o,behavior:n,...r},viewportBottom:i,viewportTop:l})=>t<l?{...r,align:o??"start",behavior:n}:e>i?{...r,align:o??"end",behavior:n}:null,Ao=_(([{gap:e,sizes:t,totalCount:o},{fixedFooterHeight:n,fixedHeaderHeight:r,headerHeight:i,scrollingInProgress:l,scrollTop:s,viewportHeight:a},{scrollToIndex:d}])=>{const h=N();return B(p(h,A(t,a,o,i,r,n,s),A(e),y(([[I,g,v,b,T,m,u,f],S])=>{const{align:E,behavior:H,calculateViewLocation:F=Mn,done:c,...x}=I,C=Oo(I,g,b-1),z=ot(C,g.offsetTree,S)+T+m,j=z+He(g.sizeTree,C)[1],D=f+m,V=f+v-u,$=F({itemBottom:j,itemTop:z,locationParams:{align:E,behavior:H,...x},viewportBottom:V,viewportTop:D});return $?c&&Re(p(l,W(G=>!G),Ne(ne(l)?1:2)),c):c&&c(),$}),W(I=>I!==null)),d),{scrollIntoView:h}},Q(Oe,me,st,_e,Le),{singleton:!0});function ao(e){return e?e==="smooth"?"smooth":"auto":!1}const Wn=(e,t)=>typeof e=="function"?ao(e(t)):t&&ao(e),Pn=_(([{listRefresh:e,totalCount:t,fixedItemSize:o,data:n},{atBottomState:r,isAtBottom:i},{scrollToIndex:l},{scrolledToInitialItem:s},{didMount:a,propsReady:d},{log:h},{scrollingInProgress:I},{context:g},{scrollIntoView:v}])=>{const b=w(!1),T=N();let m=null;function u(H){L(l,{align:"end",behavior:H,index:"LAST"})}K(p(le(p(M(t),Ne(1)),a),A(M(b),i,s,I),y(([[H,F],c,x,C,z])=>{let j=F&&C,D="auto";return j&&(D=Wn(c,x||z),j=j&&!!D),{followOutputBehavior:D,shouldFollow:j,totalCount:H}}),W(({shouldFollow:H})=>H)),({followOutputBehavior:H,totalCount:F})=>{m&&(m(),m=null),ne(o)?requestAnimationFrame(()=>{ne(h)("following output to ",{totalCount:F},we.DEBUG),u(H)}):m=Re(e,()=>{ne(h)("following output to ",{totalCount:F},we.DEBUG),u(H),m=null})});function f(H){const F=Re(r,c=>{H&&!c.atBottom&&c.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(ne(h)("scrolling to bottom due to increased size",{},we.DEBUG),u("auto"))});setTimeout(F,100)}K(p(le(M(b),t,d),W(([H,,F])=>H&&F),ke(({value:H},[,F])=>({refreshed:H===F,value:F}),{refreshed:!1,value:0}),W(({refreshed:H})=>H),A(b,t)),([,H])=>{ne(s)&&f(H!==!1)}),K(T,()=>{f(ne(b)!==!1)}),K(le(M(b),r),([H,F])=>{H&&!F.atBottom&&F.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&u("auto")});const S=w(null),E=N();return B(Et(p(M(n),y(H=>{var F;return(F=H?.length)!=null?F:0})),p(M(t))),E),K(p(le(p(E,Ne(1)),a),A(M(S),s,I,g),y(([[H,F],c,x,C,z])=>F&&x&&c?.({context:z,totalCount:H,scrollingInProgress:C})),W(H=>!!H),je(0)),H=>{m&&(m(),m=null),ne(o)?requestAnimationFrame(()=>{ne(h)("scrolling into view",{}),L(v,H)}):m=Re(e,()=>{ne(h)("scrolling into view",{}),L(v,H),m=null})}),{autoscrollToBottom:T,followOutput:b,scrollIntoViewOnChange:S}},Q(Oe,at,st,ct,Ae,Le,me,Lo,Ao)),Ln=_(([{data:e,firstItemIndex:t,gap:o,sizes:n},{initialTopMostItemIndex:r},{initialItemCount:i,listState:l},{didMount:s}])=>(B(p(s,A(i),W(([,a])=>a!==0),A(r,n,t,o,e),y(([[,a],d,h,I,g,v=[]])=>Wo(a,d,h,I,g,v))),l),{}),Q(Oe,ct,_e,Ae),{singleton:!0}),An=_(([{didMount:e},{scrollTo:t},{listState:o}])=>{const n=w(0);return K(p(e,A(n),W(([,r])=>r!==0),y(([,r])=>({top:r}))),r=>{Re(p(o,Ne(1),W(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{L(t,r)})})}),{initialScrollTop:n}},Q(Ae,me,_e),{singleton:!0}),Do=_(([{scrollVelocity:e}])=>{const t=w(!1),o=N(),n=w(!1);return B(p(e,A(n,t,o),W(([r,i])=>!!i),y(([r,i,l,s])=>{const{enter:a,exit:d}=i;if(l){if(d(r,s))return!1}else if(a(r,s))return!0;return l}),J()),t),K(p(le(t,e,o),A(n)),([[r,i,l],s])=>{r&&s&&s.change&&s.change(i,l)}),{isSeeking:t,scrollSeekConfiguration:n,scrollSeekRangeChanged:o,scrollVelocity:e}},Q(at),{singleton:!0}),Gt=_(([{scrollContainerState:e,scrollTo:t}])=>{const o=N(),n=N(),r=N(),i=w(!1),l=w(void 0);return B(p(le(o,n),y(([{scrollHeight:s,scrollTop:a,viewportHeight:d},{offsetTop:h}])=>({scrollHeight:s,scrollTop:Math.max(0,a-h),viewportHeight:d}))),e),B(p(t,A(n),y(([s,{offsetTop:a}])=>({...s,top:s.top+a}))),r),{customScrollParent:l,useWindowScroll:i,windowScrollContainerState:o,windowScrollTo:r,windowViewportRect:n}},Q(me)),Dn=_(([{sizeRanges:e,sizes:t},{headerHeight:o,scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:l,windowScrollContainerState:s,windowViewportRect:a}])=>{const d=N(),h=w(void 0),I=w(null),g=w(null);return B(s,I),B(a,g),K(p(d,A(t,n,l,I,g,o)),([v,b,T,m,u,f,S])=>{const E=Cn(b.sizeTree);m&&u!==null&&f!==null&&(T=u.scrollTop-f.offsetTop),T-=S,v({ranges:E,scrollTop:T})}),B(p(h,W(Mt),y(Vn)),r),B(p(i,A(h),W(([,v])=>v!==void 0),J(),y(([,v])=>v.ranges)),e),{getState:d,restoreStateFrom:h}},Q(Oe,me,ct,Ae,Gt));function Vn(e){return{align:"start",index:0,offset:e.scrollTop}}const Nn=_(([{topItemsIndexes:e}])=>{const t=w(0);return B(p(t,W(o=>o>=0),y(o=>Array.from({length:o}).map((n,r)=>r))),e),{topItemCount:t}},Q(_e));function Vo(e){let t=!1,o;return()=>(t||(t=!0,o=e()),o)}const Gn=Vo(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),_n=_(([{deviation:e,scrollBy:t,scrollingInProgress:o,scrollTop:n},{isAtBottom:r,isScrolling:i,lastJumpDueToItemResize:l,scrollDirection:s},{listState:a},{beforeUnshiftWith:d,gap:h,shiftWithOffset:I,sizes:g},{log:v},{recalcInProgress:b}])=>{const T=Te(p(a,A(l),ke(([,u,f,S],[{bottom:E,items:H,offsetBottom:F,totalCount:c},x])=>{const C=E+F;let z=0;return f===c&&u.length>0&&H.length>0&&(H[0].originalIndex===0&&u[0].originalIndex===0||(z=C-S,z!==0&&(z+=x))),[z,H,c,C]},[0,[],0,0]),W(([u])=>u!==0),A(n,s,o,r,v,b),W(([,u,f,S,,,E])=>!E&&!S&&u!==0&&f===nt),y(([[u],,,,,f])=>(f("Upward scrolling compensation",{amount:u},we.DEBUG),u))));function m(u){u>0?(L(t,{behavior:"auto",top:-u}),L(e,0)):(L(e,0),L(t,{behavior:"auto",top:-u}))}return K(p(T,A(e,i)),([u,f,S])=>{S&&Gn()?L(e,f-u):m(-u)}),K(p(le(he(i,!1),e,b),W(([u,f,S])=>!u&&!S&&f!==0),y(([u,f])=>f),je(1)),m),B(p(I,y(u=>({top:-u}))),t),K(p(d,A(g,h),y(([u,{groupIndices:f,lastSize:S,sizeTree:E},H])=>{function F(c){return c*(S+H)}if(f.length===0)return F(u);{let c=0;const x=et(E,0);let C=0,z=0;for(;C<u;){C++,c+=x;let j=f.length===z+1?1/0:f[z+1]-f[z]-1;C+j>u&&(c-=x,j=u-C+1),C+=j,c+=F(j),z++}return c}})),u=>{L(e,u),requestAnimationFrame(()=>{L(t,{top:u}),requestAnimationFrame(()=>{L(e,0),L(b,!1)})})}),{deviation:e}},Q(me,at,_e,Oe,Le,Lt)),Un=_(([e,t,o,n,r,i,l,s,a,d,h])=>({...e,...t,...o,...n,...r,...i,...l,...s,...a,...d,...h}),Q(Nt,Ln,Ae,Do,Po,An,Fn,Gt,Ao,Le,Lo)),No=_(([{data:e,defaultItemSize:t,firstItemIndex:o,fixedItemSize:n,fixedGroupSize:r,gap:i,groupIndices:l,heightEstimates:s,itemSize:a,sizeRanges:d,sizes:h,statefulTotalCount:I,totalCount:g,trackItemSizes:v},{initialItemFinalLocationReached:b,initialTopMostItemIndex:T,scrolledToInitialItem:m},u,f,S,E,{scrollToIndex:H},F,{topItemCount:c},{groupCounts:x},C])=>{const{listState:z,minOverscanItemCount:j,topItemsIndexes:D,rangeChanged:V,...$}=E;return B(V,C.scrollSeekRangeChanged),B(p(C.windowViewportRect,y(G=>G.visibleHeight)),u.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:o,fixedItemHeight:n,fixedGroupHeight:r,gap:i,groupCounts:x,heightEstimates:s,initialItemFinalLocationReached:b,initialTopMostItemIndex:T,scrolledToInitialItem:m,sizeRanges:d,topItemCount:c,topItemsIndexes:D,totalCount:g,...S,groupIndices:l,itemSize:a,listState:z,minOverscanItemCount:j,scrollToIndex:H,statefulTotalCount:I,trackItemSizes:v,rangeChanged:V,...$,...C,...u,sizes:h,...f}},Q(Oe,ct,me,Dn,Pn,_e,st,_n,Nn,jo,Un));function Kn(e,t){const o={},n={};let r=0;const i=e.length;for(;r<i;)n[e[r]]=1,r+=1;for(const l in t)Object.hasOwn(n,l)||(o[l]=t[l]);return o}const dt=typeof document<"u"?k.useLayoutEffect:k.useEffect;function Go(e,t,o){const n=Object.keys(t.required||{}),r=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),l=Object.keys(t.events||{}),s=k.createContext({});function a(m,u){m.propsReady&&L(m.propsReady,!1);for(const f of n){const S=m[t.required[f]];L(S,u[f])}for(const f of r)if(f in u){const S=m[t.optional[f]];L(S,u[f])}m.propsReady&&L(m.propsReady,!0)}function d(m){return i.reduce((u,f)=>(u[f]=S=>{const E=m[t.methods[f]];L(E,S)},u),{})}function h(m){return l.reduce((u,f)=>(u[f]=cn(m[t.events[f]]),u),{})}const I=k.forwardRef((m,u)=>{const{children:f,...S}=m,[E]=k.useState(()=>Tt(un(e),c=>{a(c,S)})),[H]=k.useState(eo(h,E));dt(()=>{for(const c of l)c in S&&K(H[c],S[c]);return()=>{Object.values(H).map(Wt)}},[S,H,E]),dt(()=>{a(E,S)}),k.useImperativeHandle(u,Qt(d(E)));const F=o;return O.jsx(s.Provider,{value:E,children:o?O.jsx(F,{...Kn([...n,...r,...l],S),children:f}):f})}),g=m=>{const u=k.useContext(s);return k.useCallback(f=>{L(u[m],f)},[u,m])},v=m=>{const u=k.useContext(s)[m],f=k.useCallback(S=>K(u,S),[u]);return k.useSyncExternalStore(f,()=>ne(u),()=>ne(u))},b=m=>{const u=k.useContext(s)[m],[f,S]=k.useState(eo(ne,u));return dt(()=>K(u,E=>{E!==f&&S(Qt(E))}),[u,f]),f},T=k.version.startsWith("18")?v:b;return{Component:I,useEmitter:(m,u)=>{const f=k.useContext(s)[m];dt(()=>K(f,u),[u,f])},useEmitterValue:T,usePublisher:g}}const _o=k.createContext(void 0),Uo=k.createContext(void 0),Ko=typeof document<"u"?k.useLayoutEffect:k.useEffect;function Rt(e){return"self"in e}function qn(e){return"body"in e}function qo(e,t,o,n=lt,r,i){const l=k.useRef(null),s=k.useRef(null),a=k.useRef(null),d=k.useCallback(g=>{let v,b,T;const m=g.target;if(qn(m)||Rt(m)){const f=Rt(m)?m:m.defaultView;T=i?f.scrollX:f.scrollY,v=i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight,b=i?f.innerWidth:f.innerHeight}else T=i?m.scrollLeft:m.scrollTop,v=i?m.scrollWidth:m.scrollHeight,b=i?m.offsetWidth:m.offsetHeight;const u=()=>{e({scrollHeight:v,scrollTop:Math.max(T,0),viewportHeight:b})};g.suppressFlushSync?u():en.flushSync(u),s.current!==null&&(T===s.current||T<=0||T===v-b)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t,i]);k.useEffect(()=>{const g=r||l.current;return n(r||l.current),d({suppressFlushSync:!0,target:g}),g.addEventListener("scroll",d,{passive:!0}),()=>{n(null),g.removeEventListener("scroll",d)}},[l,d,o,n,r]);function h(g){const v=l.current;if(!v||(i?"offsetWidth"in v&&v.offsetWidth===0:"offsetHeight"in v&&v.offsetHeight===0))return;const b=g.behavior==="smooth";let T,m,u;Rt(v)?(m=Math.max(We(v.document.documentElement,i?"width":"height"),i?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight),T=i?v.innerWidth:v.innerHeight,u=i?window.scrollX:window.scrollY):(m=v[i?"scrollWidth":"scrollHeight"],T=We(v,i?"width":"height"),u=v[i?"scrollLeft":"scrollTop"]);const f=m-T;if(g.top=Math.ceil(Math.max(Math.min(f,g.top),0)),Mo(T,m)||g.top===u){e({scrollHeight:m,scrollTop:u,viewportHeight:T}),b&&t(!0);return}b?(s.current=g.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(g={behavior:g.behavior,left:g.top}),v.scrollTo(g)}function I(g){i&&(g={behavior:g.behavior,left:g.top}),l.current.scrollBy(g)}return{scrollByCallback:I,scrollerRef:l,scrollToCallback:h}}const yt="-webkit-sticky",uo="sticky",_t=Vo(()=>{if(typeof document>"u")return uo;const e=document.createElement("div");return e.style.position=yt,e.style.position===yt?yt:uo});function Ut(e){return e}const Zn=_(()=>{const e=w(s=>`Item ${s}`),t=w(s=>`Group ${s}`),o=w({}),n=w(Ut),r=w("div"),i=w(lt),l=(s,a=null)=>he(p(o,y(d=>d[s]),J()),a);return{components:o,computeItemKey:n,EmptyPlaceholder:l("EmptyPlaceholder"),FooterComponent:l("Footer"),GroupComponent:l("Group","div"),groupContent:t,HeaderComponent:l("Header"),HeaderFooterTag:r,ItemComponent:l("Item","div"),itemContent:e,ListComponent:l("List","div"),ScrollerComponent:l("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TopItemListComponent:l("TopItemList")}});Q(No,Zn);_t();const $n={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Yn={outline:"none",overflowX:"auto",position:"relative"},St=e=>({height:"100%",position:"absolute",top:0,width:"100%"});_t();function fe(e,t){if(typeof e!="string")return{context:t}}function Xn(e,t){return{item:typeof e=="string"?void 0:t}}function Zo({useEmitter:e,useEmitterValue:t,usePublisher:o}){return k.memo(function({children:n,style:r,context:i,...l}){const s=o("scrollContainerState"),a=t("ScrollerComponent"),d=o("smoothScrollTargetReached"),h=t("scrollerRef"),I=t("horizontalDirection")||!1,{scrollByCallback:g,scrollerRef:v,scrollToCallback:b}=qo(s,d,a,h,void 0,I);return e("scrollTo",b),e("scrollBy",g),O.jsx(a,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:v,style:{...I?Yn:$n,...r},tabIndex:0,...l,...fe(a,i),children:n})})}function $o({useEmitter:e,useEmitterValue:t,usePublisher:o}){return k.memo(function({children:n,style:r,context:i,...l}){const s=o("windowScrollContainerState"),a=t("ScrollerComponent"),d=o("smoothScrollTargetReached"),h=t("totalListHeight"),I=t("deviation"),g=t("customScrollParent"),v=k.useRef(null),b=t("scrollerRef"),{scrollByCallback:T,scrollerRef:m,scrollToCallback:u}=qo(s,d,a,b,g);return Ko(()=>{var f;return m.current=g||((f=v.current)==null?void 0:f.ownerDocument.defaultView),()=>{m.current=null}},[m,g]),e("windowScrollTo",u),e("scrollBy",T),O.jsx(a,{ref:v,"data-virtuoso-scroller":!0,style:{position:"relative",...r,...h!==0?{height:h+I}:{}},...l,...fe(a,i),children:n})})}const Jn=_(()=>{const e=w(d=>O.jsxs("td",{children:["Item $",d]})),t=w(null),o=w(d=>O.jsxs("td",{colSpan:1e3,children:["Group ",d]})),n=w(null),r=w(null),i=w({}),l=w(Ut),s=w(lt),a=(d,h=null)=>he(p(i,y(I=>I[d]),J()),h);return{components:i,computeItemKey:l,context:t,EmptyPlaceholder:a("EmptyPlaceholder"),FillerRow:a("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,groupContent:o,ScrollerComponent:a("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TableBodyComponent:a("TableBody","tbody"),TableComponent:a("Table","table"),TableFooterComponent:a("TableFoot","tfoot"),TableHeadComponent:a("TableHead","thead"),TableRowComponent:a("TableRow","tr"),GroupComponent:a("Group","tr")}}),Qn=_(([e,t])=>({...e,...t}),Q(No,Jn)),er=({height:e})=>O.jsx("tr",{children:O.jsx("td",{style:{height:e}})}),tr=({height:e})=>O.jsx("tr",{children:O.jsx("td",{style:{border:0,height:e,padding:0}})}),or={overflowAnchor:"none"},fo={position:_t(),zIndex:2,overflowAnchor:"none"},ho=k.memo(function({showTopList:e=!1}){const t=P("listState"),o=P("computeItemKey"),n=P("firstItemIndex"),r=P("context"),i=P("isSeeking"),l=P("fixedHeaderHeight"),s=P("groupIndices").length>0,a=P("itemContent"),d=P("groupContent"),h=P("ScrollSeekPlaceholder")||er,I=P("GroupComponent"),g=P("TableRowComponent"),v=(e?t.topItems:[]).reduce((T,m,u)=>(u===0?T.push(m.size):T.push(T[u-1]+m.size),T),[]),b=(e?t.topItems:t.items).map(T=>{const m=T.originalIndex,u=o(m+n,T.data,r),f=e?m===0?0:v[m-1]:0;return i?ht.createElement(h,{...fe(h,r),height:T.size,index:T.index,key:u,type:T.type||"item"}):T.type==="group"?ht.createElement(I,{...fe(I,r),"data-index":m,"data-item-index":T.index,"data-known-size":T.size,key:u,style:{...fo,top:l}},d(T.index,r)):ht.createElement(g,{...fe(g,r),...Xn(g,T.data),"data-index":m,"data-item-index":T.index,"data-known-size":T.size,"data-item-group-index":T.groupIndex,key:u,style:e?{...fo,top:l+f}:or},s?a(T.index,T.groupIndex,T.data,r):a(T.index,T.data,r))});return O.jsx(O.Fragment,{children:b})}),nr=k.memo(function(){const e=P("listState"),t=P("topItemsIndexes").length>0,o=ye("sizeRanges"),n=P("useWindowScroll"),r=P("customScrollParent"),i=ye("windowScrollContainerState"),l=ye("scrollContainerState"),s=r||n?i:l,a=P("trackItemSizes"),d=P("itemSize"),h=P("log"),{callbackRef:I,ref:g}=hn(o,d,a,s,h,void 0,r,!1,P("skipAnimationFrameInResizeObserver")),[v,b]=k.useState(0);Kt("deviation",z=>{v!==z&&(g.current.style.marginTop=`${z}px`,b(z))});const T=P("EmptyPlaceholder"),m=P("FillerRow")||tr,u=P("TableBodyComponent"),f=P("paddingTopAddition"),S=P("statefulTotalCount"),E=P("context");if(S===0&&T)return O.jsx(T,{...fe(T,E)});const H=(t?e.topItems:[]).reduce((z,j)=>z+j.size,0),F=e.offsetTop+f+v-H,c=e.offsetBottom,x=F>0?O.jsx(m,{context:E,height:F},"padding-top"):null,C=c>0?O.jsx(m,{context:E,height:c},"padding-bottom"):null;return O.jsxs(u,{"data-testid":"virtuoso-item-list",ref:I,...fe(u,E),children:[x,t&&O.jsx(ho,{showTopList:!0}),O.jsx(ho,{}),C]})}),rr=({children:e})=>{const t=k.useContext(_o),o=ye("viewportHeight"),n=ye("fixedItemHeight"),r=Ge(k.useMemo(()=>pt(o,i=>We(i,"height")),[o]),!0,P("skipAnimationFrameInResizeObserver"));return k.useEffect(()=>{t&&(o(t.viewportHeight),n(t.itemHeight))},[t,o,n]),O.jsx("div",{"data-viewport-type":"element",ref:r,style:St(),children:e})},ir=({children:e})=>{const t=k.useContext(_o),o=ye("windowViewportRect"),n=ye("fixedItemHeight"),r=P("customScrollParent"),i=Co(o,r,P("skipAnimationFrameInResizeObserver"));return k.useEffect(()=>{t&&(n(t.itemHeight),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,o,n]),O.jsx("div",{"data-viewport-type":"window",ref:i,style:St(),children:e})},lr=k.memo(function(e){const t=P("useWindowScroll"),o=P("customScrollParent"),n=ye("fixedHeaderHeight"),r=ye("fixedFooterHeight"),i=P("fixedHeaderContent"),l=P("fixedFooterContent"),s=P("context"),a=Ge(k.useMemo(()=>pt(n,u=>We(u,"height")),[n]),!0,P("skipAnimationFrameInResizeObserver")),d=Ge(k.useMemo(()=>pt(r,u=>We(u,"height")),[r]),!0,P("skipAnimationFrameInResizeObserver")),h=o||t?ar:cr,I=o||t?ir:rr,g=P("TableComponent"),v=P("TableHeadComponent"),b=P("TableFooterComponent"),T=i?O.jsx(v,{ref:a,style:{position:"sticky",top:0,zIndex:2},...fe(v,s),children:i()},"TableHead"):null,m=l?O.jsx(b,{ref:d,style:{bottom:0,position:"sticky",zIndex:1},...fe(b,s),children:l()},"TableFoot"):null;return O.jsx(h,{...e,...fe(h,s),children:O.jsx(I,{children:O.jsxs(g,{style:{borderSpacing:0,overflowAnchor:"none"},...fe(g,s),children:[T,O.jsx(nr,{},"TableBody"),m]})})})}),{Component:sr,useEmitter:Kt,useEmitterValue:P,usePublisher:ye}=Go(Qn,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},lr),cr=Zo({useEmitter:Kt,useEmitterValue:P,usePublisher:ye}),ar=$o({useEmitter:Kt,useEmitterValue:P,usePublisher:ye}),ur=sr,mo={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},dr={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:go,floor:vt,max:Je,min:Ht,round:po}=Math;function xo(e,t,o){return Array.from({length:t-e+1}).map((n,r)=>({data:o===null?null:o[r+e],index:r+e}))}function fr(e){return{...dr,items:e}}function ft(e,t){return e&&e.width===t.width&&e.height===t.height}function hr(e,t){return e&&e.column===t.column&&e.row===t.row}const mr=_(([{increaseViewportBy:e,listBoundary:t,overscan:o,visibleRange:n},{footerHeight:r,headerHeight:i,scrollBy:l,scrollContainerState:s,scrollTo:a,scrollTop:d,smoothScrollTargetReached:h,viewportHeight:I},g,v,{didMount:b,propsReady:T},{customScrollParent:m,useWindowScroll:u,windowScrollContainerState:f,windowScrollTo:S,windowViewportRect:E},H])=>{const F=w(0),c=w(0),x=w(mo),C=w({height:0,width:0}),z=w({height:0,width:0}),j=N(),D=N(),V=w(0),$=w(null),G=w({column:0,row:0}),ee=N(),Y=N(),ge=w(!1),pe=w(0),xe=w(!0),ve=w(!1),Ee=w(!1);K(p(b,A(pe),W(([R,U])=>!!U)),()=>{L(xe,!1)}),K(p(le(b,xe,z,C,pe,ve),W(([R,U,te,ue,,Se])=>R&&!U&&te.height!==0&&ue.height!==0&&!Se)),([,,,,R])=>{L(ve,!0),Dt(1,()=>{L(j,R)}),Re(p(d),()=>{L(t,[0,0]),L(xe,!0)})}),B(p(Y,W(R=>R!=null&&R.scrollTop>0),Be(0)),c),K(p(b,A(Y),W(([,R])=>R!=null)),([,R])=>{R&&(L(C,R.viewport),L(z,R.item),L(G,R.gap),R.scrollTop>0&&(L(ge,!0),Re(p(d,Ne(1)),U=>{L(ge,!1)}),L(a,{top:R.scrollTop})))}),B(p(C,y(({height:R})=>R)),I),B(p(le(M(C,ft),M(z,ft),M(G,(R,U)=>R&&R.column===U.column&&R.row===U.row),M(d)),y(([R,U,te,ue])=>({gap:te,item:U,scrollTop:ue,viewport:R}))),ee),B(p(le(M(F),n,M(G,hr),M(z,ft),M(C,ft),M($),M(c),M(ge),M(xe),M(pe)),W(([,,,,,,,R])=>!R),y(([R,[U,te],ue,Se,se,re,ae,,ie,q])=>{const{column:X,row:Ce}=ue,{height:de,width:Ct}=Se,{width:qt}=se;if(ae===0&&(R===0||qt===0))return mo;if(Ct===0){const Jt=Vt(q,R),Qo=Jt+Math.max(ae-1,0);return fr(xo(Jt,Qo,re))}const ut=Yo(qt,Ct,X);let Ke,De;ie?U===0&&te===0&&ae>0?(Ke=0,De=ae-1):(Ke=ut*vt((U+Ce)/(de+Ce)),De=ut*go((te+Ce)/(de+Ce))-1,De=Ht(R-1,Je(De,ut-1)),Ke=Ht(De,Je(0,Ke))):(Ke=0,De=-1);const Zt=xo(Ke,De,re),{bottom:$t,top:Yt}=vo(se,ue,Se,Zt),Xt=go(R/ut),Jo=Xt*de+(Xt-1)*Ce-$t;return{bottom:$t,itemHeight:de,items:Zt,itemWidth:Ct,offsetBottom:Jo,offsetTop:Yt,top:Yt}})),x),B(p($,W(R=>R!==null),y(R=>R.length)),F),B(p(le(C,z,x,G),W(([R,U,{items:te}])=>te.length>0&&U.height!==0&&R.height!==0),y(([R,U,{items:te},ue])=>{const{bottom:Se,top:se}=vo(R,ue,U,te);return[se,Se]}),J(tt)),t);const ze=w(!1);B(p(d,A(ze),y(([R,U])=>U||R!==0)),ze);const Fe=Te(p(le(x,F),W(([{items:R}])=>R.length>0),A(ze),W(([[R,U],te])=>{const ue=R.items[R.items.length-1].index===U-1;return(te||R.bottom>0&&R.itemHeight>0&&R.offsetBottom===0&&R.items.length===U)&&ue}),y(([[,R]])=>R-1),J())),Ye=Te(p(M(x),W(({items:R})=>R.length>0&&R[0].index===0),Be(0),J())),Ue=Te(p(M(x),A(ge),W(([{items:R},U])=>R.length>0&&!U),y(([{items:R}])=>({endIndex:R[R.length-1].index,startIndex:R[0].index})),J(Eo),je(0)));B(Ue,v.scrollSeekRangeChanged),B(p(j,A(C,z,F,G),y(([R,U,te,ue,Se])=>{const se=Fo(R),{align:re,behavior:ae,offset:ie}=se;let q=se.index;q==="LAST"&&(q=ue-1),q=Je(0,q,Ht(ue-1,q));let X=Ft(U,Se,te,q);return re==="end"?X=po(X-U.height+te.height):re==="center"&&(X=po(X-U.height/2+te.height/2)),ie&&(X+=ie),{behavior:ae,top:X}})),a);const Me=he(p(x,y(R=>R.offsetBottom+R.bottom)),0);return B(p(E,y(R=>({height:R.visibleHeight,width:R.visibleWidth}))),C),{customScrollParent:m,data:$,deviation:V,footerHeight:r,gap:G,headerHeight:i,increaseViewportBy:e,initialItemCount:c,itemDimensions:z,overscan:o,restoreStateFrom:Y,scrollBy:l,scrollContainerState:s,scrollHeight:D,scrollTo:a,scrollToIndex:j,scrollTop:d,smoothScrollTargetReached:h,totalCount:F,useWindowScroll:u,viewportDimensions:C,windowScrollContainerState:f,windowScrollTo:S,windowViewportRect:E,...v,gridState:x,horizontalDirection:Ee,initialTopMostItemIndex:pe,totalListHeight:Me,...g,endReached:Fe,propsReady:T,rangeChanged:Ue,startReached:Ye,stateChanged:ee,stateRestoreInProgress:ge,...H}},Q(Nt,me,at,Do,Ae,Gt,Le));function Yo(e,t,o){return Je(1,vt((e+o)/(vt(t)+o)))}function vo(e,t,o,n){const{height:r}=o;if(r===void 0||n.length===0)return{bottom:0,top:0};const i=Ft(e,t,o,n[0].index);return{bottom:Ft(e,t,o,n[n.length-1].index)+r,top:i}}function Ft(e,t,o,n){const r=Yo(e.width,o.width,t.column),i=vt(n/r),l=i*o.height+Je(0,i-1)*t.row;return l>0?l+t.row:l}const gr=_(()=>{const e=w(I=>`Item ${I}`),t=w({}),o=w(null),n=w("virtuoso-grid-item"),r=w("virtuoso-grid-list"),i=w(Ut),l=w("div"),s=w(lt),a=(I,g=null)=>he(p(t,y(v=>v[I]),J()),g),d=w(!1),h=w(!1);return B(M(h),d),{components:t,computeItemKey:i,context:o,FooterComponent:a("Footer"),HeaderComponent:a("Header"),headerFooterTag:l,itemClassName:n,ItemComponent:a("Item","div"),itemContent:e,listClassName:r,ListComponent:a("List","div"),readyStateChanged:d,reportReadyState:h,ScrollerComponent:a("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder","div")}}),pr=_(([e,t])=>({...e,...t}),Q(mr,gr)),xr=k.memo(function(){const e=oe("gridState"),t=oe("listClassName"),o=oe("itemClassName"),n=oe("itemContent"),r=oe("computeItemKey"),i=oe("isSeeking"),l=be("scrollHeight"),s=oe("ItemComponent"),a=oe("ListComponent"),d=oe("ScrollSeekPlaceholder"),h=oe("context"),I=be("itemDimensions"),g=be("gap"),v=oe("log"),b=oe("stateRestoreInProgress"),T=be("reportReadyState"),m=Ge(k.useMemo(()=>u=>{const f=u.parentElement.parentElement.scrollHeight;l(f);const S=u.firstChild;if(S){const{height:E,width:H}=S.getBoundingClientRect();I({height:E,width:H})}g({column:Io("column-gap",getComputedStyle(u).columnGap,v),row:Io("row-gap",getComputedStyle(u).rowGap,v)})},[l,I,g,v]),!0,!1);return Ko(()=>{e.itemHeight>0&&e.itemWidth>0&&T(!0)},[e]),b?null:O.jsx(a,{className:t,ref:m,...fe(a,h),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(u=>{const f=r(u.index,u.data,h);return i?O.jsx(d,{...fe(d,h),height:e.itemHeight,index:u.index,width:e.itemWidth},f):ht.createElement(s,{...fe(s,h),className:o,"data-index":u.index,key:f},n(u.index,u.data,h))})})}),vr=k.memo(function(){const e=oe("HeaderComponent"),t=be("headerHeight"),o=oe("headerFooterTag"),n=Ge(k.useMemo(()=>i=>{t(We(i,"height"))},[t]),!0,!1),r=oe("context");return e?O.jsx(o,{ref:n,children:O.jsx(e,{...fe(e,r)})}):null}),Ir=k.memo(function(){const e=oe("FooterComponent"),t=be("footerHeight"),o=oe("headerFooterTag"),n=Ge(k.useMemo(()=>i=>{t(We(i,"height"))},[t]),!0,!1),r=oe("context");return e?O.jsx(o,{ref:n,children:O.jsx(e,{...fe(e,r)})}):null}),Tr=({children:e})=>{const t=k.useContext(Uo),o=be("itemDimensions"),n=be("viewportDimensions"),r=Ge(k.useMemo(()=>i=>{n(i.getBoundingClientRect())},[n]),!0,!1);return k.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),o({height:t.itemHeight,width:t.itemWidth}))},[t,n,o]),O.jsx("div",{ref:r,style:St(),children:e})},wr=({children:e})=>{const t=k.useContext(Uo),o=be("windowViewportRect"),n=be("itemDimensions"),r=oe("customScrollParent"),i=Co(o,r,!1);return k.useEffect(()=>{t&&(n({height:t.itemHeight,width:t.itemWidth}),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,o,n]),O.jsx("div",{ref:i,style:St(),children:e})},Sr=k.memo(function({...e}){const t=oe("useWindowScroll"),o=oe("customScrollParent"),n=o||t?br:Cr,r=o||t?wr:Tr,i=oe("context");return O.jsx(n,{...e,...fe(n,i),children:O.jsxs(r,{children:[O.jsx(vr,{}),O.jsx(xr,{}),O.jsx(Ir,{})]})})}),{useEmitter:Xo,useEmitterValue:oe,usePublisher:be}=Go(pr,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},Sr),Cr=Zo({useEmitter:Xo,useEmitterValue:oe,usePublisher:be}),br=$o({useEmitter:Xo,useEmitterValue:oe,usePublisher:be});function Io(e,t,o){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&o(`${e} was not resolved to pixel value correctly`,t,we.WARN),t==="normal"?0:parseInt(t??"0",10)}function zr({table:e}){const{t}=tn("common");return O.jsxs("div",{className:"flex flex-row flex-wrap gap-2 text-xs px-2",children:[O.jsxs("span",{className:"label",children:[t(o=>o.columns),": "]}),e.getAllLeafColumns().map(o=>o.id==="select"?null:O.jsxs("label",{className:"label",children:[O.jsx("input",{checked:o.getIsVisible(),disabled:!o.getCanHide(),onChange:o.getToggleVisibilityHandler(),type:"checkbox",className:"checkbox checkbox-xs"}),typeof o.columnDef.header=="string"&&o.columnDef.header?o.columnDef.header:t(n=>n[o.id])]},o.id))]})}const Rr={Table:({style:e,context:t,...o})=>O.jsx("div",{className:"overflow-x-auto overflow-y-hidden",children:O.jsx("table",{...o,className:"table table-sm mb-5 min-w-full",style:{...e,tableLayout:"fixed"}})}),TableHead:({context:e,children:t,style:o,...n})=>O.jsx("thead",{...n,children:t}),TableRow:({item:e,context:t,...o})=>O.jsx("tr",{...o,children:e.getVisibleCells().map(n=>O.jsx("td",{children:To(n.column.columnDef.cell,n.getContext())},n.id))})};function Er({id:e,table:t}){return O.jsxs(O.Fragment,{children:[O.jsx(zr,{table:t}),O.jsx(ur,{useWindowScroll:!0,id:e,className:"mt-1.5",data:t.getRowModel().rows,components:Rr,defaultItemHeight:73,increaseViewportBy:{top:100,bottom:100},fixedHeaderContent:()=>t.getHeaderGroups().map(o=>O.jsx("tr",{className:"bg-base-200",children:o.headers.map(n=>{const r=n.column.getIsSorted(),i=r==="asc"?" ↑":r==="desc"?" ↓":null;return O.jsx("th",{colSpan:n.colSpan,style:{width:n.getSize()},children:n.isPlaceholder?null:O.jsx(O.Fragment,{children:O.jsxs("div",{className:n.column.getCanSort()?"cursor-pointer select-none whitespace-normal":"whitespace-normal",onClick:n.column.getToggleSortingHandler(),children:[To(n.column.columnDef.header,n.getContext()),i]})})},n.id)})},o.id))})]})}export{Er as T};
|
|
1
|
+
import{b7 as k,j as O,r as ht,d3 as en,u as tn}from"./index-DiJ--4jy.js";import{f as To}from"./useTable-DQ_SXEUl.js";const It=0,Pe=1,$e=2,wo=4;function Qt(e){return()=>e}function on(e){e()}function pt(e,t){return o=>e(t(o))}function eo(e,t){return()=>e(t)}function nn(e,t){return o=>e(t,o)}function Mt(e){return e!==void 0}function rn(...e){return()=>{e.map(on)}}function lt(){}function Tt(e,t){return t(e),e}function ln(e,t){return t(e)}function Q(...e){return e}function K(e,t){return e(Pe,t)}function L(e,t){e(It,t)}function Wt(e){e($e)}function ne(e){return e(wo)}function B(e,t){return K(e,nn(t,It))}function Re(e,t){const o=e(Pe,n=>{o(),t(n)});return o}function to(e){let t,o;return n=>r=>{t=r,o&&clearTimeout(o),o=setTimeout(()=>{n(t)},e)}}function So(e,t){return e===t}function J(e=So){let t;return o=>n=>{e(t,n)||(t=n,o(n))}}function W(e){return t=>o=>{e(o)&&t(o)}}function y(e){return t=>pt(t,e)}function Be(e){return t=>()=>{t(e)}}function p(e,...t){const o=sn(...t);return(n,r)=>{switch(n){case $e:Wt(e);return;case Pe:return K(e,o(r))}}}function ke(e,t){return o=>n=>{o(t=e(t,n))}}function Ne(e){return t=>o=>{e>0?e--:t(o)}}function je(e){let t=null,o;return n=>r=>{t=r,!o&&(o=setTimeout(()=>{o=void 0,n(t)},e))}}function A(...e){const t=new Array(e.length);let o=0,n=null;const r=Math.pow(2,e.length)-1;return e.forEach((i,l)=>{const s=Math.pow(2,l);K(i,a=>{const d=o;o=o|s,t[l]=a,d!==r&&o===r&&n&&(n(),n=null)})}),i=>l=>{const s=()=>{i([l].concat(t))};o===r?s():n=s}}function sn(...e){return t=>e.reduceRight(ln,t)}function cn(e){let t,o;const n=()=>t?.();return function(r,i){switch(r){case Pe:return i?o===i?void 0:(n(),o=i,t=K(e,i),t):(n(),lt);case $e:n(),o=null;return}}}function w(e){let t=e;const o=N();return(n,r)=>{switch(n){case It:t=r;break;case Pe:{r(t);break}case wo:return t}return o(n,r)}}function he(e,t){return Tt(w(t),o=>B(e,o))}function N(){const e=[];return(t,o)=>{switch(t){case It:e.slice().forEach(n=>{n(o)});return;case $e:e.splice(0,e.length);return;case Pe:return e.push(o),()=>{const n=e.indexOf(o);n>-1&&e.splice(n,1)}}}}function Te(e){return Tt(N(),t=>B(e,t))}function _(e,t=[],{singleton:o}={singleton:!0}){return{constructor:e,dependencies:t,id:an(),singleton:o}}const an=()=>Symbol();function un(e){const t=new Map,o=({constructor:n,dependencies:r,id:i,singleton:l})=>{if(l&&t.has(i))return t.get(i);const s=n(r.map(a=>o(a)));return l&&t.set(i,s),s};return o(e)}function le(...e){const t=N(),o=new Array(e.length);let n=0;const r=Math.pow(2,e.length)-1;return e.forEach((i,l)=>{const s=Math.pow(2,l);K(i,a=>{o[l]=a,n=n|s,n===r&&L(t,o)})}),function(i,l){switch(i){case $e:{Wt(t);return}case Pe:return n===r&&l(o),K(t,l)}}}function M(e,t=So){return p(e,J(t))}function Et(...e){return function(t,o){switch(t){case $e:return;case Pe:return rn(...e.map(n=>K(n,o)))}}}var we=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(we||{});const dn={0:"debug",3:"error",1:"log",2:"warn"},fn=()=>typeof globalThis>"u"?window:globalThis,Le=_(()=>{const e=w(3);return{log:w((t,o,n=1)=>{var r;const i=(r=fn().VIRTUOSO_LOG_LEVEL)!=null?r:ne(e);n>=i&&console[dn[n]]("%creact-virtuoso: %c%s %o","color: #0253b3; font-weight: bold","color: initial",t,o)}),logLevel:e}},[],{singleton:!0});function Ge(e,t,o){return Pt(e,t,o).callbackRef}function Pt(e,t,o){const n=k.useRef(null);let r=l=>{};const i=k.useMemo(()=>typeof ResizeObserver<"u"?new ResizeObserver(l=>{const s=()=>{const a=l[0].target;a.offsetParent!==null&&e(a)};o?s():requestAnimationFrame(s)}):null,[e,o]);return r=l=>{l&&t?(i?.observe(l),n.current=l):(n.current&&i?.unobserve(n.current),n.current=null)},{callbackRef:r,ref:n}}function hn(e,t,o,n,r,i,l,s,a){const d=k.useCallback(h=>{const I=mn(h.children,t,"offsetHeight",r);let g=h.parentElement;for(;!g.dataset.virtuosoScroller;)g=g.parentElement;const v=g.lastElementChild.dataset.viewportType==="window";let b;v&&(b=g.ownerDocument.defaultView);const T=l?l.scrollTop:v?b.scrollY||b.document.documentElement.scrollTop:g.scrollTop,m=l?l.scrollHeight:v?b.document.documentElement.scrollHeight:g.scrollHeight,u=l?l.offsetHeight:v?b.innerHeight:g.offsetHeight;n({scrollHeight:m,scrollTop:Math.max(T,0),viewportHeight:u}),I!==null&&e(I)},[e,t,r,i,l,n,s]);return Pt(d,o,a)}function mn(e,t,o,n){const r=e.length;if(r===0)return null;const i=[];for(let l=0;l<r;l++){const s=e.item(l);if(s.dataset.index===void 0)continue;const a=parseInt(s.dataset.index),d=parseFloat(s.dataset.knownSize),h=t(s,o);if(h===0&&n("Zero-sized element, this should not happen",{child:s},we.ERROR),h===d)continue;const I=i[i.length-1];i.length===0||I.size!==h||I.endIndex!==a-1?i.push({endIndex:a,size:h,startIndex:a}):i[i.length-1].endIndex++}return i}function Co(e,t,o){const n=k.useRef(null),r=k.useCallback(a=>{if(!(a!=null&&a.offsetParent))return;const d=a.getBoundingClientRect(),h=d.width;let I,g;if(t){const v=t.getBoundingClientRect(),b=d.top-v.top;g=v.height-Math.max(0,b),I=b+t.scrollTop}else{const v=l.current.ownerDocument.defaultView;g=v.innerHeight-Math.max(0,d.top),I=d.top+v.scrollY}n.current={offsetTop:I,visibleHeight:g,visibleWidth:h},e(n.current)},[e,t]),{callbackRef:i,ref:l}=Pt(r,!0,o),s=k.useCallback(()=>{r(l.current)},[r,l]);return k.useEffect(()=>{var a;if(t){t.addEventListener("scroll",s);const d=new ResizeObserver(()=>{requestAnimationFrame(s)});return d.observe(t),()=>{t.removeEventListener("scroll",s),d.unobserve(t)}}else{const d=(a=l.current)==null?void 0:a.ownerDocument.defaultView;return d?.addEventListener("scroll",s),d?.addEventListener("resize",s),()=>{d?.removeEventListener("scroll",s),d?.removeEventListener("resize",s)}}},[s,t,l]),i}const me=_(()=>{const e=N(),t=N(),o=w(0),n=N(),r=w(0),i=N(),l=N(),s=w(0),a=w(0),d=w(0),h=w(0),I=N(),g=N(),v=w(!1),b=w(!1),T=w(!1);return B(p(e,y(({scrollTop:m})=>m)),t),B(p(e,y(({scrollHeight:m})=>m)),l),B(t,r),{deviation:o,fixedFooterHeight:d,fixedHeaderHeight:a,footerHeight:h,headerHeight:s,horizontalDirection:b,scrollBy:g,scrollContainerState:e,scrollHeight:l,scrollingInProgress:v,scrollTo:I,scrollTop:t,skipAnimationFrameInResizeObserver:T,smoothScrollTargetReached:n,statefulScrollTop:r,viewportHeight:i}},[],{singleton:!0}),Qe={lvl:0};function bo(e,t){const o=e.length;if(o===0)return[];let{index:n,value:r}=t(e[0]);const i=[];for(let l=1;l<o;l++){const{index:s,value:a}=t(e[l]);i.push({end:s-1,start:n,value:r}),n=s,r=a}return i.push({end:1/0,start:n,value:r}),i}function Z(e){return e===Qe}function et(e,t){if(!Z(e))return t===e.k?e.v:t<e.k?et(e.l,t):et(e.r,t)}function He(e,t,o="k"){if(Z(e))return[-1/0,void 0];if(Number(e[o])===t)return[e.k,e.v];if(Number(e[o])<t){const n=He(e.r,t,o);return n[0]===-1/0?[e.k,e.v]:n}return He(e.l,t,o)}function Ie(e,t,o){return Z(e)?yo(t,o,1):t===e.k?ce(e,{k:t,v:o}):t<e.k?oo(ce(e,{l:Ie(e.l,t,o)})):oo(ce(e,{r:Ie(e.r,t,o)}))}function qe(){return Qe}function Ze(e,t,o){if(Z(e))return[];const n=He(e,t)[0];return gn(kt(e,n,o))}function Bt(e,t){if(Z(e))return Qe;const{k:o,l:n,r}=e;if(t===o){if(Z(n))return r;if(Z(r))return n;{const[i,l]=Ro(n);return mt(ce(e,{k:i,l:zo(n),v:l}))}}else return t<o?mt(ce(e,{l:Bt(n,t)})):mt(ce(e,{r:Bt(r,t)}))}function Ve(e){return Z(e)?[]:[...Ve(e.l),{k:e.k,v:e.v},...Ve(e.r)]}function kt(e,t,o){if(Z(e))return[];const{k:n,l:r,r:i,v:l}=e;let s=[];return n>t&&(s=s.concat(kt(r,t,o))),n>=t&&n<=o&&s.push({k:n,v:l}),n<=o&&(s=s.concat(kt(i,t,o))),s}function mt(e){const{l:t,lvl:o,r:n}=e;if(n.lvl>=o-1&&t.lvl>=o-1)return e;if(o>n.lvl+1){if(bt(t))return Ho(ce(e,{lvl:o-1}));if(!Z(t)&&!Z(t.r))return ce(t.r,{l:ce(t,{r:t.r.l}),lvl:o,r:ce(e,{l:t.r.r,lvl:o-1})});throw new Error("Unexpected empty nodes")}else{if(bt(e))return Ot(ce(e,{lvl:o-1}));if(!Z(n)&&!Z(n.l)){const r=n.l,i=bt(r)?n.lvl-1:n.lvl;return ce(r,{l:ce(e,{lvl:o-1,r:r.l}),lvl:r.lvl+1,r:Ot(ce(n,{l:r.r,lvl:i}))})}else throw new Error("Unexpected empty nodes")}}function ce(e,t){return yo(t.k!==void 0?t.k:e.k,t.v!==void 0?t.v:e.v,t.lvl!==void 0?t.lvl:e.lvl,t.l!==void 0?t.l:e.l,t.r!==void 0?t.r:e.r)}function zo(e){return Z(e.r)?e.l:mt(ce(e,{r:zo(e.r)}))}function bt(e){return Z(e)||e.lvl>e.r.lvl}function Ro(e){return Z(e.r)?[e.k,e.v]:Ro(e.r)}function yo(e,t,o,n=Qe,r=Qe){return{k:e,l:n,lvl:o,r,v:t}}function oo(e){return Ot(Ho(e))}function Ho(e){const{l:t}=e;return!Z(t)&&t.lvl===e.lvl?ce(t,{r:ce(e,{l:t.r})}):e}function Ot(e){const{lvl:t,r:o}=e;return!Z(o)&&!Z(o.r)&&o.lvl===t&&o.r.lvl===t?ce(o,{l:ce(e,{r:o.l}),lvl:t+1}):e}function gn(e){return bo(e,({k:t,v:o})=>({index:t,value:o}))}function Eo(e,t){return!!(e&&e.startIndex===t.startIndex&&e.endIndex===t.endIndex)}function tt(e,t){return!!(e&&e[0]===t[0]&&e[1]===t[1])}const Lt=_(()=>({recalcInProgress:w(!1)}),[],{singleton:!0});function Bo(e,t,o){return e[xt(e,t,o)]}function xt(e,t,o,n=0){let r=e.length-1;for(;n<=r;){const i=Math.floor((n+r)/2),l=e[i],s=o(l,t);if(s===0)return i;if(s===-1){if(r-n<2)return i-1;r=i-1}else{if(r===n)return i;n=i+1}}throw new Error(`Failed binary finding record in array - ${e.join(",")}, searched for ${t}`)}function pn(e,t,o,n){const r=xt(e,t,n),i=xt(e,o,n,r);return e.slice(r,i+1)}function We(e,t){return Math.round(e.getBoundingClientRect()[t])}function wt(e){return!Z(e.groupOffsetTree)}function At({index:e},t){return t===e?0:t<e?-1:1}function xn(){return{groupIndices:[],groupOffsetTree:qe(),lastIndex:0,lastOffset:0,lastSize:0,offsetTree:[],sizeTree:qe()}}function vn(e,t){let o=Z(e)?0:1/0;for(const n of t){const{endIndex:r,size:i,startIndex:l}=n;if(o=Math.min(o,l),Z(e)){e=Ie(e,0,i);continue}const s=Ze(e,l-1,r+1);if(s.some(zn(n)))continue;let a=!1,d=!1;for(const{end:h,start:I,value:g}of s)a?(r>=I||i===g)&&(e=Bt(e,I)):(d=g!==i,a=!0),h>r&&r>=I&&g!==i&&(e=Ie(e,r+1,g));d&&(e=Ie(e,l,i))}return[e,o]}function In(e){return typeof e.groupIndex<"u"}function Tn({offset:e},t){return t===e?0:t<e?-1:1}function ot(e,t,o){if(t.length===0)return 0;const{index:n,offset:r,size:i}=Bo(t,e,At),l=e-n,s=i*l+(l-1)*o+r;return s>0?s+o:s}function ko(e,t){if(!wt(t))return e;let o=0;for(;t.groupIndices[o]<=e+o;)o++;return e+o}function Oo(e,t,o){if(In(e))return t.groupIndices[e.groupIndex]+1;{const n=e.index==="LAST"?o:e.index;let r=ko(n,t);return r=Math.max(0,r,Math.min(o,r)),r}}function wn(e,t,o,n=0){return n>0&&(t=Math.max(t,Bo(e,n,At).offset)),bo(pn(e,t,o,Tn),bn)}function Sn(e,[t,o,n,r]){t.length>0&&n("received item sizes",t,we.DEBUG);const i=e.sizeTree;let l=i,s=0;if(o.length>0&&Z(i)&&t.length===2){const g=t[0].size,v=t[1].size;l=o.reduce((b,T)=>Ie(Ie(b,T,g),T+1,v),l)}else[l,s]=vn(l,t);if(l===i)return e;const{lastIndex:a,lastOffset:d,lastSize:h,offsetTree:I}=jt(e.offsetTree,s,l,r);return{groupIndices:o,groupOffsetTree:o.reduce((g,v)=>Ie(g,v,ot(v,I,r)),qe()),lastIndex:a,lastOffset:d,lastSize:h,offsetTree:I,sizeTree:l}}function Cn(e){return Ve(e).map(({k:t,v:o},n,r)=>{const i=r[n+1];return{endIndex:i?i.k-1:1/0,size:o,startIndex:t}})}function no(e,t){let o=0,n=0;for(;o<e;)o+=t[n+1]-t[n]-1,n++;return n-(o===e?0:1)}function jt(e,t,o,n){let r=e,i=0,l=0,s=0,a=0;if(t!==0){a=xt(r,t-1,At),s=r[a].offset;const d=He(o,t-1);i=d[0],l=d[1],r.length&&r[a].size===He(o,t)[1]&&(a-=1),r=r.slice(0,a+1)}else r=[];for(const{start:d,value:h}of Ze(o,t,1/0)){const I=d-i,g=I*l+s+I*n;r.push({index:d,offset:g,size:h}),i=d,s=g,l=h}return{lastIndex:i,lastOffset:s,lastSize:l,offsetTree:r}}function bn(e){return{index:e.index,value:e}}function zn(e){const{endIndex:t,size:o,startIndex:n}=e;return r=>r.start===n&&(r.end===t||r.end===1/0)&&r.value===o}const Rn={offsetHeight:"height",offsetWidth:"width"},Oe=_(([{log:e},{recalcInProgress:t}])=>{const o=N(),n=N(),r=he(n,0),i=N(),l=N(),s=w(0),a=w([]),d=w(void 0),h=w(void 0),I=w(void 0),g=w(void 0),v=w((c,x)=>We(c,Rn[x])),b=w(void 0),T=w(0),m=xn(),u=he(p(o,A(a,e,T),ke(Sn,m),J()),m),f=he(p(a,J(),ke((c,x)=>({current:x,prev:c.current}),{current:[],prev:[]}),y(({prev:c})=>c)),[]);B(p(a,W(c=>c.length>0),A(u,T),y(([c,x,C])=>{const z=c.reduce((j,D,V)=>Ie(j,D,ot(D,x.offsetTree,C)||V),qe());return{...x,groupIndices:c,groupOffsetTree:z}})),u),B(p(n,A(u),W(([c,{lastIndex:x}])=>c<x),y(([c,{lastIndex:x,lastSize:C}])=>[{endIndex:x,size:C,startIndex:c}])),o),B(d,h);const S=he(p(d,y(c=>c===void 0)),!0);B(p(h,W(c=>c!==void 0&&Z(ne(u).sizeTree)),y(c=>{const x=ne(I),C=ne(a).length>0;return x?C?[{endIndex:0,size:x,startIndex:0},{endIndex:1,size:c,startIndex:1}]:[]:[{endIndex:0,size:c,startIndex:0}]})),o),B(p(g,W(c=>c!==void 0&&c.length>0&&Z(ne(u).sizeTree)),y(c=>{const x=[];let C=c[0],z=0;for(let j=1;j<c.length;j++){const D=c[j];D!==C&&(x.push({endIndex:j-1,size:C,startIndex:z}),C=D,z=j)}return x.push({endIndex:c.length-1,size:C,startIndex:z}),x})),o),B(p(a,A(I,h),W(([,c,x])=>c!==void 0&&x!==void 0),y(([c,x,C])=>{const z=[];for(let j=0;j<c.length;j++){const D=c[j],V=c[j+1];z.push({startIndex:D,endIndex:D,size:x}),V!==void 0&&z.push({startIndex:D+1,endIndex:V-1,size:C})}return z})),o);const E=Te(p(o,A(u),ke(({sizes:c},[x,C])=>({changed:C!==c,sizes:C}),{changed:!1,sizes:m}),y(c=>c.changed)));K(p(s,ke((c,x)=>({diff:c.prev-x,prev:x}),{diff:0,prev:0}),y(c=>c.diff)),c=>{const{groupIndices:x}=ne(u);if(c>0)L(t,!0),L(i,c+no(c,x));else if(c<0){const C=ne(f);C.length>0&&(c-=no(-c,C)),L(l,c)}}),K(p(s,A(e)),([c,x])=>{c<0&&x("`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",{firstItemIndex:s},we.ERROR)});const H=Te(i);B(p(i,A(u),y(([c,x])=>{const C=x.groupIndices.length>0,z=[],j=x.lastSize;if(C){const D=et(x.sizeTree,0);let V=0,$=0;for(;V<c;){const ee=x.groupIndices[$],Y=x.groupIndices.length===$+1?1/0:x.groupIndices[$+1]-ee-1;z.push({endIndex:ee,size:D,startIndex:ee}),z.push({endIndex:ee+1+Y-1,size:j,startIndex:ee+1}),$++,V+=Y+1}const G=Ve(x.sizeTree);return V!==c&&G.shift(),G.reduce((ee,{k:Y,v:ge})=>{let pe=ee.ranges;return ee.prevSize!==0&&(pe=[...ee.ranges,{endIndex:Y+c-1,size:ee.prevSize,startIndex:ee.prevIndex}]),{prevIndex:Y+c,prevSize:ge,ranges:pe}},{prevIndex:c,prevSize:0,ranges:z}).ranges}return Ve(x.sizeTree).reduce((D,{k:V,v:$})=>({prevIndex:V+c,prevSize:$,ranges:[...D.ranges,{endIndex:V+c-1,size:D.prevSize,startIndex:D.prevIndex}]}),{prevIndex:0,prevSize:j,ranges:[]}).ranges})),o);const F=Te(p(l,A(u,T),y(([c,{offsetTree:x},C])=>{const z=-c;return ot(z,x,C)})));return B(p(l,A(u,T),y(([c,x,C])=>{if(x.groupIndices.length>0){if(Z(x.sizeTree))return x;let z=qe();const j=ne(f);let D=0,V=0,$=0;for(;D<-c;){$=j[V];const G=j[V+1]-$-1;V++,D+=G+1}if(z=Ve(x.sizeTree).reduce((G,{k:ee,v:Y})=>Ie(G,Math.max(0,ee+c),Y),z),D!==-c){const G=et(x.sizeTree,$);z=Ie(z,0,G);const ee=He(x.sizeTree,-c+1)[1];z=Ie(z,1,ee)}return{...x,sizeTree:z,...jt(x.offsetTree,0,z,C)}}else{const z=Ve(x.sizeTree).reduce((j,{k:D,v:V})=>Ie(j,Math.max(0,D+c),V),qe());return{...x,sizeTree:z,...jt(x.offsetTree,0,z,C)}}})),u),{beforeUnshiftWith:H,data:b,defaultItemSize:h,firstItemIndex:s,fixedItemSize:d,fixedGroupSize:I,gap:T,groupIndices:a,heightEstimates:g,itemSize:v,listRefresh:E,shiftWith:l,shiftWithOffset:F,sizeRanges:o,sizes:u,statefulTotalCount:r,totalCount:n,trackItemSizes:S,unshiftWith:i}},Q(Le,Lt),{singleton:!0});function yn(e){return e.reduce((t,o)=>(t.groupIndices.push(t.totalCount),t.totalCount+=o+1,t),{groupIndices:[],totalCount:0})}const jo=_(([{groupIndices:e,sizes:t,totalCount:o},{headerHeight:n,scrollTop:r}])=>{const i=N(),l=N(),s=Te(p(i,y(yn)));return B(p(s,y(a=>a.totalCount)),o),B(p(s,y(a=>a.groupIndices)),e),B(p(le(r,t,n),W(([a,d])=>wt(d)),y(([a,d,h])=>He(d.groupOffsetTree,Math.max(a-h,0),"v")[0]),J(),y(a=>[a])),l),{groupCounts:i,topItemsIndexes:l}},Q(Oe,me)),Ae=_(([{log:e}])=>{const t=w(!1),o=Te(p(t,W(n=>n),J()));return K(t,n=>{n&&ne(e)("props updated",{},we.DEBUG)}),{didMount:o,propsReady:t}},Q(Le),{singleton:!0}),Hn=typeof document<"u"&&"scrollBehavior"in document.documentElement.style;function Fo(e){const t=typeof e=="number"?{index:e}:e;return t.align||(t.align="start"),(!t.behavior||!Hn)&&(t.behavior="auto"),t.offset||(t.offset=0),t}const st=_(([{gap:e,listRefresh:t,sizes:o,totalCount:n},{fixedFooterHeight:r,fixedHeaderHeight:i,footerHeight:l,headerHeight:s,scrollingInProgress:a,scrollTo:d,smoothScrollTargetReached:h,viewportHeight:I},{log:g}])=>{const v=N(),b=N(),T=w(0);let m=null,u=null,f=null;function S(){m&&(m(),m=null),f&&(f(),f=null),u&&(clearTimeout(u),u=null),L(a,!1)}return B(p(v,A(o,I,n,T,s,l,g),A(e,i,r),y(([[E,H,F,c,x,C,z,j],D,V,$])=>{const G=Fo(E),{align:ee,behavior:Y,offset:ge}=G,pe=c-1,xe=Oo(G,H,pe);let ve=ot(xe,H.offsetTree,D)+C;ee==="end"?(ve+=V+He(H.sizeTree,xe)[1]-F+$,xe===pe&&(ve+=z)):ee==="center"?ve+=(V+He(H.sizeTree,xe)[1]-F+$)/2:ve-=x,ge&&(ve+=ge);const Ee=ze=>{S(),ze?(j("retrying to scroll to",{location:E},we.DEBUG),L(v,E)):(L(b,!0),j("list did not change, scroll successful",{},we.DEBUG))};if(S(),Y==="smooth"){let ze=!1;f=K(t,Fe=>{ze=ze||Fe}),m=Re(h,()=>{Ee(ze)})}else m=Re(p(t,En(150)),Ee);return u=setTimeout(()=>{S()},1200),L(a,!0),j("scrolling from index to",{behavior:Y,index:xe,top:ve},we.DEBUG),{behavior:Y,top:ve}})),d),{scrollTargetReached:b,scrollToIndex:v,topListHeight:T}},Q(Oe,me,Le),{singleton:!0});function En(e){return t=>{const o=setTimeout(()=>{t(!1)},e);return n=>{n&&(t(!0),clearTimeout(o))}}}function Dt(e,t){e==0?t():requestAnimationFrame(()=>{Dt(e-1,t)})}function Vt(e,t){const o=t-1;return typeof e=="number"?e:e.index==="LAST"?o:e.index}const ct=_(([{defaultItemSize:e,listRefresh:t,sizes:o},{scrollTop:n},{scrollTargetReached:r,scrollToIndex:i},{didMount:l}])=>{const s=w(!0),a=w(0),d=w(!0);return B(p(l,A(a),W(([h,I])=>!!I),Be(!1)),s),B(p(l,A(a),W(([h,I])=>!!I),Be(!1)),d),K(p(le(t,l),A(s,o,e,d),W(([[,h],I,{sizeTree:g},v,b])=>h&&(!Z(g)||Mt(v))&&!I&&!b),A(a)),([,h])=>{Re(r,()=>{L(d,!0)}),Dt(4,()=>{Re(n,()=>{L(s,!0)}),L(i,h)})}),{initialItemFinalLocationReached:d,initialTopMostItemIndex:a,scrolledToInitialItem:s}},Q(Oe,me,st,Ae),{singleton:!0});function Mo(e,t){return Math.abs(e-t)<1.01}const nt="up",Xe="down",Bn="none",kn={atBottom:!1,notAtBottomBecause:"NOT_SHOWING_LAST_ITEM",state:{offsetBottom:0,scrollHeight:0,scrollTop:0,viewportHeight:0}},On=0,at=_(([{footerHeight:e,headerHeight:t,scrollBy:o,scrollContainerState:n,scrollTop:r,viewportHeight:i}])=>{const l=w(!1),s=w(!0),a=N(),d=N(),h=w(4),I=w(On),g=he(p(Et(p(M(r),Ne(1),Be(!0)),p(M(r),Ne(1),Be(!1),to(100))),J()),!1),v=he(p(Et(p(o,Be(!0)),p(o,Be(!1),to(200))),J()),!1);B(p(le(M(r),M(I)),y(([f,S])=>f<=S),J()),s),B(p(s,je(50)),d);const b=Te(p(le(n,M(i),M(t),M(e),M(h)),ke((f,[{scrollHeight:S,scrollTop:E},H,F,c,x])=>{const C=E+H-S>-x,z={scrollHeight:S,scrollTop:E,viewportHeight:H};if(C){let D,V;return E>f.state.scrollTop?(D="SCROLLED_DOWN",V=f.state.scrollTop-E):(D="SIZE_DECREASED",V=f.state.scrollTop-E||f.scrollTopDelta),{atBottom:!0,atBottomBecause:D,scrollTopDelta:V,state:z}}let j;return z.scrollHeight>f.state.scrollHeight?j="SIZE_INCREASED":H<f.state.viewportHeight?j="VIEWPORT_HEIGHT_DECREASING":E<f.state.scrollTop?j="SCROLLING_UPWARDS":j="NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM",{atBottom:!1,notAtBottomBecause:j,state:z}},kn),J((f,S)=>f&&f.atBottom===S.atBottom))),T=he(p(n,ke((f,{scrollHeight:S,scrollTop:E,viewportHeight:H})=>{if(Mo(f.scrollHeight,S))return{changed:!1,jump:0,scrollHeight:S,scrollTop:E};{const F=S-(E+H)<1;return f.scrollTop!==E&&F?{changed:!0,jump:f.scrollTop-E,scrollHeight:S,scrollTop:E}:{changed:!0,jump:0,scrollHeight:S,scrollTop:E}}},{changed:!1,jump:0,scrollHeight:0,scrollTop:0}),W(f=>f.changed),y(f=>f.jump)),0);B(p(b,y(f=>f.atBottom)),l),B(p(l,je(50)),a);const m=w(Xe);B(p(n,y(({scrollTop:f})=>f),J(),ke((f,S)=>ne(v)?{direction:f.direction,prevScrollTop:S}:{direction:S<f.prevScrollTop?nt:Xe,prevScrollTop:S},{direction:Xe,prevScrollTop:0}),y(f=>f.direction)),m),B(p(n,je(50),Be(Bn)),m);const u=w(0);return B(p(g,W(f=>!f),Be(0)),u),B(p(r,je(100),A(g),W(([f,S])=>!!S),ke(([f,S],[E])=>[S,E],[0,0]),y(([f,S])=>S-f)),u),{atBottomState:b,atBottomStateChange:a,atBottomThreshold:h,atTopStateChange:d,atTopThreshold:I,isAtBottom:l,isAtTop:s,isScrolling:g,lastJumpDueToItemResize:T,scrollDirection:m,scrollVelocity:u}},Q(me)),rt="top",it="bottom",ro="none";function io(e,t,o){return typeof e=="number"?o===nt&&t===rt||o===Xe&&t===it?e:0:o===nt?t===rt?e.main:e.reverse:t===it?e.main:e.reverse}function lo(e,t){var o;return typeof e=="number"?e:(o=e[t])!=null?o:0}const Nt=_(([{deviation:e,fixedHeaderHeight:t,headerHeight:o,scrollTop:n,viewportHeight:r}])=>{const i=N(),l=w(0),s=w(0),a=w(0),d=he(p(le(M(n),M(r),M(o),M(i,tt),M(a),M(l),M(t),M(e),M(s)),y(([h,I,g,[v,b],T,m,u,f,S])=>{const E=h-f,H=m+u,F=Math.max(g-E,0);let c=ro;const x=lo(S,rt),C=lo(S,it);return v-=f,v+=g+u,b+=g+u,b-=f,v>h+H-x&&(c=nt),b<h-F+I+C&&(c=Xe),c!==ro?[Math.max(E-g-io(T,rt,c)-x,0),E-F-u+I+io(T,it,c)+C]:null}),W(h=>h!=null),J(tt)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:a,topListHeight:l,visibleRange:d}},Q(me),{singleton:!0});function jn(e,t,o){if(wt(t)){const n=ko(e,t);return[{index:He(t.groupOffsetTree,n)[0],offset:0,size:0},{data:o?.[0],index:n,offset:0,size:0}]}return[{data:o?.[0],index:e,offset:0,size:0}]}const zt={bottom:0,firstItemIndex:0,items:[],offsetBottom:0,offsetTop:0,top:0,topItems:[],topListHeight:0,totalCount:0};function gt(e,t,o,n,r,i){const{lastIndex:l,lastOffset:s,lastSize:a}=r;let d=0,h=0;if(e.length>0){d=e[0].offset;const T=e[e.length-1];h=T.offset+T.size}const I=o-l,g=s+I*a+(I-1)*n,v=d,b=g-h;return{bottom:h,firstItemIndex:i,items:so(e,r,i),offsetBottom:b,offsetTop:d,top:v,topItems:so(t,r,i),topListHeight:t.reduce((T,m)=>m.size+T,0),totalCount:o}}function Wo(e,t,o,n,r,i){let l=0;if(o.groupIndices.length>0)for(const h of o.groupIndices){if(h-l>=e)break;l++}const s=e+l,a=Vt(t,s),d=Array.from({length:s}).map((h,I)=>({data:i[I+a],index:I+a,offset:0,size:0}));return gt(d,[],s,r,o,n)}function so(e,t,o){if(e.length===0)return[];if(!wt(t))return e.map(d=>({...d,index:d.index+o,originalIndex:d.index}));const n=e[0].index,r=e[e.length-1].index,i=[],l=Ze(t.groupOffsetTree,n,r);let s,a=0;for(const d of e){(!s||s.end<d.index)&&(s=l.shift(),a=t.groupIndices.indexOf(s.start));let h;d.index===s.start?h={index:a,type:"group"}:h={groupIndex:a,index:d.index-(a+1)+o},i.push({...h,data:d.data,offset:d.offset,originalIndex:d.index,size:d.size})}return i}function co(e,t){var o;return e===void 0?0:typeof e=="number"?e:(o=e[t])!=null?o:0}const _e=_(([{data:e,firstItemIndex:t,gap:o,sizes:n,totalCount:r},i,{listBoundary:l,topListHeight:s,visibleRange:a},{initialTopMostItemIndex:d,scrolledToInitialItem:h},{topListHeight:I},g,{didMount:v},{recalcInProgress:b}])=>{const T=w([]),m=w(0),u=N(),f=w(0);B(i.topItemsIndexes,T);const S=he(p(le(v,b,M(a,tt),M(r),M(n),M(d),h,M(T),M(t),M(o),M(f),e),W(([c,x,,C,,,,,,,,z])=>{const j=z&&z.length!==C;return c&&!x&&!j}),y(([,,[c,x],C,z,j,D,V,$,G,ee,Y])=>{var ge,pe,xe,ve;const Ee=z,{offsetTree:ze,sizeTree:Fe}=Ee,Ye=ne(m);if(C===0)return{...zt,totalCount:C};if(c===0&&x===0)return Ye===0?{...zt,totalCount:C}:Wo(Ye,j,z,$,G,Y||[]);if(Z(Fe))return Ye>0?null:gt(jn(Vt(j,C),Ee,Y),[],C,G,Ee,$);const Ue=[];if(V.length>0){const se=V[0],re=V[V.length-1];let ae=0;for(const ie of Ze(Fe,se,re)){const q=ie.value,X=Math.max(ie.start,se),Ce=Math.min(ie.end,re);for(let de=X;de<=Ce;de++)Ue.push({data:Y?.[de],index:de,offset:ae,size:q}),ae+=q}}if(!D)return gt([],Ue,C,G,Ee,$);const Me=V.length>0?V[V.length-1]+1:0,R=wn(ze,c,x,Me);if(R.length===0)return null;const U=C-1,te=Tt([],se=>{for(const re of R){const ae=re.value;let ie=ae.offset,q=re.start;const X=ae.size;if(ae.offset<c){q+=Math.floor((c-ae.offset+G)/(X+G));const de=q-re.start;ie+=de*X+de*G}q<Me&&(ie+=(Me-q)*X,q=Me);const Ce=Math.min(re.end,U);for(let de=q;de<=Ce&&!(ie>=x);de++)se.push({data:Y?.[de],index:de,offset:ie,size:X}),ie+=X+G}}),ue=co(ee,rt),Se=co(ee,it);if(te.length>0&&(ue>0||Se>0)){const se=te[0],re=te[te.length-1];if(ue>0&&se.index>Me){const ae=Math.min(ue,se.index-Me),ie=[];let q=se.offset;for(let X=se.index-1;X>=se.index-ae;X--){const Ce=(pe=(ge=Ze(Fe,X,X)[0])==null?void 0:ge.value)!=null?pe:se.size;q-=Ce+G,ie.unshift({data:Y?.[X],index:X,offset:q,size:Ce})}te.unshift(...ie)}if(Se>0&&re.index<U){const ae=Math.min(Se,U-re.index);let ie=re.offset+re.size+G;for(let q=re.index+1;q<=re.index+ae;q++){const X=(ve=(xe=Ze(Fe,q,q)[0])==null?void 0:xe.value)!=null?ve:re.size;te.push({data:Y?.[q],index:q,offset:ie,size:X}),ie+=X+G}}}return gt(te,Ue,C,G,Ee,$)}),W(c=>c!==null),J()),zt);B(p(e,W(Mt),y(c=>c?.length)),r),B(p(S,y(c=>c.topListHeight)),I),B(I,s),B(p(S,y(c=>[c.top,c.bottom])),l),B(p(S,y(c=>c.items)),u);const E=Te(p(S,W(({items:c})=>c.length>0),A(r,e),W(([{items:c},x])=>c[c.length-1].originalIndex===x-1),y(([,c,x])=>[c-1,x]),J(tt),y(([c])=>c))),H=Te(p(S,je(200),W(({items:c,topItems:x})=>c.length>0&&c[0].originalIndex===x.length),y(({items:c})=>c[0].index),J())),F=Te(p(S,W(({items:c})=>c.length>0),y(({items:c})=>{let x=0,C=c.length-1;for(;c[x].type==="group"&&x<C;)x++;for(;c[C].type==="group"&&C>x;)C--;return{endIndex:c[C].index,startIndex:c[x].index}}),J(Eo)));return{endReached:E,initialItemCount:m,itemsRendered:u,listState:S,minOverscanItemCount:f,rangeChanged:F,startReached:H,topItemsIndexes:T,...g}},Q(Oe,jo,Nt,ct,st,at,Ae,Lt),{singleton:!0}),Po=_(([{fixedFooterHeight:e,fixedHeaderHeight:t,footerHeight:o,headerHeight:n},{listState:r}])=>{const i=N(),l=he(p(le(o,e,n,t,r),y(([s,a,d,h,I])=>s+a+d+h+I.offsetBottom+I.bottom)),0);return B(M(l),i),{totalListHeight:l,totalListHeightChanged:i}},Q(me,_e),{singleton:!0}),Fn=_(([{viewportHeight:e},{totalListHeight:t}])=>{const o=w(!1),n=he(p(le(o,e,t),W(([r])=>r),y(([,r,i])=>Math.max(0,r-i)),je(0),J()),0);return{alignToBottom:o,paddingTopAddition:n}},Q(me,Po),{singleton:!0}),Lo=_(()=>({context:w(null)})),Mn=({itemBottom:e,itemTop:t,locationParams:{align:o,behavior:n,...r},viewportBottom:i,viewportTop:l})=>t<l?{...r,align:o??"start",behavior:n}:e>i?{...r,align:o??"end",behavior:n}:null,Ao=_(([{gap:e,sizes:t,totalCount:o},{fixedFooterHeight:n,fixedHeaderHeight:r,headerHeight:i,scrollingInProgress:l,scrollTop:s,viewportHeight:a},{scrollToIndex:d}])=>{const h=N();return B(p(h,A(t,a,o,i,r,n,s),A(e),y(([[I,g,v,b,T,m,u,f],S])=>{const{align:E,behavior:H,calculateViewLocation:F=Mn,done:c,...x}=I,C=Oo(I,g,b-1),z=ot(C,g.offsetTree,S)+T+m,j=z+He(g.sizeTree,C)[1],D=f+m,V=f+v-u,$=F({itemBottom:j,itemTop:z,locationParams:{align:E,behavior:H,...x},viewportBottom:V,viewportTop:D});return $?c&&Re(p(l,W(G=>!G),Ne(ne(l)?1:2)),c):c&&c(),$}),W(I=>I!==null)),d),{scrollIntoView:h}},Q(Oe,me,st,_e,Le),{singleton:!0});function ao(e){return e?e==="smooth"?"smooth":"auto":!1}const Wn=(e,t)=>typeof e=="function"?ao(e(t)):t&&ao(e),Pn=_(([{listRefresh:e,totalCount:t,fixedItemSize:o,data:n},{atBottomState:r,isAtBottom:i},{scrollToIndex:l},{scrolledToInitialItem:s},{didMount:a,propsReady:d},{log:h},{scrollingInProgress:I},{context:g},{scrollIntoView:v}])=>{const b=w(!1),T=N();let m=null;function u(H){L(l,{align:"end",behavior:H,index:"LAST"})}K(p(le(p(M(t),Ne(1)),a),A(M(b),i,s,I),y(([[H,F],c,x,C,z])=>{let j=F&&C,D="auto";return j&&(D=Wn(c,x||z),j=j&&!!D),{followOutputBehavior:D,shouldFollow:j,totalCount:H}}),W(({shouldFollow:H})=>H)),({followOutputBehavior:H,totalCount:F})=>{m&&(m(),m=null),ne(o)?requestAnimationFrame(()=>{ne(h)("following output to ",{totalCount:F},we.DEBUG),u(H)}):m=Re(e,()=>{ne(h)("following output to ",{totalCount:F},we.DEBUG),u(H),m=null})});function f(H){const F=Re(r,c=>{H&&!c.atBottom&&c.notAtBottomBecause==="SIZE_INCREASED"&&!m&&(ne(h)("scrolling to bottom due to increased size",{},we.DEBUG),u("auto"))});setTimeout(F,100)}K(p(le(M(b),t,d),W(([H,,F])=>H&&F),ke(({value:H},[,F])=>({refreshed:H===F,value:F}),{refreshed:!1,value:0}),W(({refreshed:H})=>H),A(b,t)),([,H])=>{ne(s)&&f(H!==!1)}),K(T,()=>{f(ne(b)!==!1)}),K(le(M(b),r),([H,F])=>{H&&!F.atBottom&&F.notAtBottomBecause==="VIEWPORT_HEIGHT_DECREASING"&&u("auto")});const S=w(null),E=N();return B(Et(p(M(n),y(H=>{var F;return(F=H?.length)!=null?F:0})),p(M(t))),E),K(p(le(p(E,Ne(1)),a),A(M(S),s,I,g),y(([[H,F],c,x,C,z])=>F&&x&&c?.({context:z,totalCount:H,scrollingInProgress:C})),W(H=>!!H),je(0)),H=>{m&&(m(),m=null),ne(o)?requestAnimationFrame(()=>{ne(h)("scrolling into view",{}),L(v,H)}):m=Re(e,()=>{ne(h)("scrolling into view",{}),L(v,H),m=null})}),{autoscrollToBottom:T,followOutput:b,scrollIntoViewOnChange:S}},Q(Oe,at,st,ct,Ae,Le,me,Lo,Ao)),Ln=_(([{data:e,firstItemIndex:t,gap:o,sizes:n},{initialTopMostItemIndex:r},{initialItemCount:i,listState:l},{didMount:s}])=>(B(p(s,A(i),W(([,a])=>a!==0),A(r,n,t,o,e),y(([[,a],d,h,I,g,v=[]])=>Wo(a,d,h,I,g,v))),l),{}),Q(Oe,ct,_e,Ae),{singleton:!0}),An=_(([{didMount:e},{scrollTo:t},{listState:o}])=>{const n=w(0);return K(p(e,A(n),W(([,r])=>r!==0),y(([,r])=>({top:r}))),r=>{Re(p(o,Ne(1),W(i=>i.items.length>1)),()=>{requestAnimationFrame(()=>{L(t,r)})})}),{initialScrollTop:n}},Q(Ae,me,_e),{singleton:!0}),Do=_(([{scrollVelocity:e}])=>{const t=w(!1),o=N(),n=w(!1);return B(p(e,A(n,t,o),W(([r,i])=>!!i),y(([r,i,l,s])=>{const{enter:a,exit:d}=i;if(l){if(d(r,s))return!1}else if(a(r,s))return!0;return l}),J()),t),K(p(le(t,e,o),A(n)),([[r,i,l],s])=>{r&&s&&s.change&&s.change(i,l)}),{isSeeking:t,scrollSeekConfiguration:n,scrollSeekRangeChanged:o,scrollVelocity:e}},Q(at),{singleton:!0}),Gt=_(([{scrollContainerState:e,scrollTo:t}])=>{const o=N(),n=N(),r=N(),i=w(!1),l=w(void 0);return B(p(le(o,n),y(([{scrollHeight:s,scrollTop:a,viewportHeight:d},{offsetTop:h}])=>({scrollHeight:s,scrollTop:Math.max(0,a-h),viewportHeight:d}))),e),B(p(t,A(n),y(([s,{offsetTop:a}])=>({...s,top:s.top+a}))),r),{customScrollParent:l,useWindowScroll:i,windowScrollContainerState:o,windowScrollTo:r,windowViewportRect:n}},Q(me)),Dn=_(([{sizeRanges:e,sizes:t},{headerHeight:o,scrollTop:n},{initialTopMostItemIndex:r},{didMount:i},{useWindowScroll:l,windowScrollContainerState:s,windowViewportRect:a}])=>{const d=N(),h=w(void 0),I=w(null),g=w(null);return B(s,I),B(a,g),K(p(d,A(t,n,l,I,g,o)),([v,b,T,m,u,f,S])=>{const E=Cn(b.sizeTree);m&&u!==null&&f!==null&&(T=u.scrollTop-f.offsetTop),T-=S,v({ranges:E,scrollTop:T})}),B(p(h,W(Mt),y(Vn)),r),B(p(i,A(h),W(([,v])=>v!==void 0),J(),y(([,v])=>v.ranges)),e),{getState:d,restoreStateFrom:h}},Q(Oe,me,ct,Ae,Gt));function Vn(e){return{align:"start",index:0,offset:e.scrollTop}}const Nn=_(([{topItemsIndexes:e}])=>{const t=w(0);return B(p(t,W(o=>o>=0),y(o=>Array.from({length:o}).map((n,r)=>r))),e),{topItemCount:t}},Q(_e));function Vo(e){let t=!1,o;return()=>(t||(t=!0,o=e()),o)}const Gn=Vo(()=>/iP(ad|od|hone)/i.test(navigator.userAgent)&&/WebKit/i.test(navigator.userAgent)),_n=_(([{deviation:e,scrollBy:t,scrollingInProgress:o,scrollTop:n},{isAtBottom:r,isScrolling:i,lastJumpDueToItemResize:l,scrollDirection:s},{listState:a},{beforeUnshiftWith:d,gap:h,shiftWithOffset:I,sizes:g},{log:v},{recalcInProgress:b}])=>{const T=Te(p(a,A(l),ke(([,u,f,S],[{bottom:E,items:H,offsetBottom:F,totalCount:c},x])=>{const C=E+F;let z=0;return f===c&&u.length>0&&H.length>0&&(H[0].originalIndex===0&&u[0].originalIndex===0||(z=C-S,z!==0&&(z+=x))),[z,H,c,C]},[0,[],0,0]),W(([u])=>u!==0),A(n,s,o,r,v,b),W(([,u,f,S,,,E])=>!E&&!S&&u!==0&&f===nt),y(([[u],,,,,f])=>(f("Upward scrolling compensation",{amount:u},we.DEBUG),u))));function m(u){u>0?(L(t,{behavior:"auto",top:-u}),L(e,0)):(L(e,0),L(t,{behavior:"auto",top:-u}))}return K(p(T,A(e,i)),([u,f,S])=>{S&&Gn()?L(e,f-u):m(-u)}),K(p(le(he(i,!1),e,b),W(([u,f,S])=>!u&&!S&&f!==0),y(([u,f])=>f),je(1)),m),B(p(I,y(u=>({top:-u}))),t),K(p(d,A(g,h),y(([u,{groupIndices:f,lastSize:S,sizeTree:E},H])=>{function F(c){return c*(S+H)}if(f.length===0)return F(u);{let c=0;const x=et(E,0);let C=0,z=0;for(;C<u;){C++,c+=x;let j=f.length===z+1?1/0:f[z+1]-f[z]-1;C+j>u&&(c-=x,j=u-C+1),C+=j,c+=F(j),z++}return c}})),u=>{L(e,u),requestAnimationFrame(()=>{L(t,{top:u}),requestAnimationFrame(()=>{L(e,0),L(b,!1)})})}),{deviation:e}},Q(me,at,_e,Oe,Le,Lt)),Un=_(([e,t,o,n,r,i,l,s,a,d,h])=>({...e,...t,...o,...n,...r,...i,...l,...s,...a,...d,...h}),Q(Nt,Ln,Ae,Do,Po,An,Fn,Gt,Ao,Le,Lo)),No=_(([{data:e,defaultItemSize:t,firstItemIndex:o,fixedItemSize:n,fixedGroupSize:r,gap:i,groupIndices:l,heightEstimates:s,itemSize:a,sizeRanges:d,sizes:h,statefulTotalCount:I,totalCount:g,trackItemSizes:v},{initialItemFinalLocationReached:b,initialTopMostItemIndex:T,scrolledToInitialItem:m},u,f,S,E,{scrollToIndex:H},F,{topItemCount:c},{groupCounts:x},C])=>{const{listState:z,minOverscanItemCount:j,topItemsIndexes:D,rangeChanged:V,...$}=E;return B(V,C.scrollSeekRangeChanged),B(p(C.windowViewportRect,y(G=>G.visibleHeight)),u.viewportHeight),{data:e,defaultItemHeight:t,firstItemIndex:o,fixedItemHeight:n,fixedGroupHeight:r,gap:i,groupCounts:x,heightEstimates:s,initialItemFinalLocationReached:b,initialTopMostItemIndex:T,scrolledToInitialItem:m,sizeRanges:d,topItemCount:c,topItemsIndexes:D,totalCount:g,...S,groupIndices:l,itemSize:a,listState:z,minOverscanItemCount:j,scrollToIndex:H,statefulTotalCount:I,trackItemSizes:v,rangeChanged:V,...$,...C,...u,sizes:h,...f}},Q(Oe,ct,me,Dn,Pn,_e,st,_n,Nn,jo,Un));function Kn(e,t){const o={},n={};let r=0;const i=e.length;for(;r<i;)n[e[r]]=1,r+=1;for(const l in t)Object.hasOwn(n,l)||(o[l]=t[l]);return o}const dt=typeof document<"u"?k.useLayoutEffect:k.useEffect;function Go(e,t,o){const n=Object.keys(t.required||{}),r=Object.keys(t.optional||{}),i=Object.keys(t.methods||{}),l=Object.keys(t.events||{}),s=k.createContext({});function a(m,u){m.propsReady&&L(m.propsReady,!1);for(const f of n){const S=m[t.required[f]];L(S,u[f])}for(const f of r)if(f in u){const S=m[t.optional[f]];L(S,u[f])}m.propsReady&&L(m.propsReady,!0)}function d(m){return i.reduce((u,f)=>(u[f]=S=>{const E=m[t.methods[f]];L(E,S)},u),{})}function h(m){return l.reduce((u,f)=>(u[f]=cn(m[t.events[f]]),u),{})}const I=k.forwardRef((m,u)=>{const{children:f,...S}=m,[E]=k.useState(()=>Tt(un(e),c=>{a(c,S)})),[H]=k.useState(eo(h,E));dt(()=>{for(const c of l)c in S&&K(H[c],S[c]);return()=>{Object.values(H).map(Wt)}},[S,H,E]),dt(()=>{a(E,S)}),k.useImperativeHandle(u,Qt(d(E)));const F=o;return O.jsx(s.Provider,{value:E,children:o?O.jsx(F,{...Kn([...n,...r,...l],S),children:f}):f})}),g=m=>{const u=k.useContext(s);return k.useCallback(f=>{L(u[m],f)},[u,m])},v=m=>{const u=k.useContext(s)[m],f=k.useCallback(S=>K(u,S),[u]);return k.useSyncExternalStore(f,()=>ne(u),()=>ne(u))},b=m=>{const u=k.useContext(s)[m],[f,S]=k.useState(eo(ne,u));return dt(()=>K(u,E=>{E!==f&&S(Qt(E))}),[u,f]),f},T=k.version.startsWith("18")?v:b;return{Component:I,useEmitter:(m,u)=>{const f=k.useContext(s)[m];dt(()=>K(f,u),[u,f])},useEmitterValue:T,usePublisher:g}}const _o=k.createContext(void 0),Uo=k.createContext(void 0),Ko=typeof document<"u"?k.useLayoutEffect:k.useEffect;function Rt(e){return"self"in e}function qn(e){return"body"in e}function qo(e,t,o,n=lt,r,i){const l=k.useRef(null),s=k.useRef(null),a=k.useRef(null),d=k.useCallback(g=>{let v,b,T;const m=g.target;if(qn(m)||Rt(m)){const f=Rt(m)?m:m.defaultView;T=i?f.scrollX:f.scrollY,v=i?f.document.documentElement.scrollWidth:f.document.documentElement.scrollHeight,b=i?f.innerWidth:f.innerHeight}else T=i?m.scrollLeft:m.scrollTop,v=i?m.scrollWidth:m.scrollHeight,b=i?m.offsetWidth:m.offsetHeight;const u=()=>{e({scrollHeight:v,scrollTop:Math.max(T,0),viewportHeight:b})};g.suppressFlushSync?u():en.flushSync(u),s.current!==null&&(T===s.current||T<=0||T===v-b)&&(s.current=null,t(!0),a.current&&(clearTimeout(a.current),a.current=null))},[e,t,i]);k.useEffect(()=>{const g=r||l.current;return n(r||l.current),d({suppressFlushSync:!0,target:g}),g.addEventListener("scroll",d,{passive:!0}),()=>{n(null),g.removeEventListener("scroll",d)}},[l,d,o,n,r]);function h(g){const v=l.current;if(!v||(i?"offsetWidth"in v&&v.offsetWidth===0:"offsetHeight"in v&&v.offsetHeight===0))return;const b=g.behavior==="smooth";let T,m,u;Rt(v)?(m=Math.max(We(v.document.documentElement,i?"width":"height"),i?v.document.documentElement.scrollWidth:v.document.documentElement.scrollHeight),T=i?v.innerWidth:v.innerHeight,u=i?window.scrollX:window.scrollY):(m=v[i?"scrollWidth":"scrollHeight"],T=We(v,i?"width":"height"),u=v[i?"scrollLeft":"scrollTop"]);const f=m-T;if(g.top=Math.ceil(Math.max(Math.min(f,g.top),0)),Mo(T,m)||g.top===u){e({scrollHeight:m,scrollTop:u,viewportHeight:T}),b&&t(!0);return}b?(s.current=g.top,a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{a.current=null,s.current=null,t(!0)},1e3)):s.current=null,i&&(g={behavior:g.behavior,left:g.top}),v.scrollTo(g)}function I(g){i&&(g={behavior:g.behavior,left:g.top}),l.current.scrollBy(g)}return{scrollByCallback:I,scrollerRef:l,scrollToCallback:h}}const yt="-webkit-sticky",uo="sticky",_t=Vo(()=>{if(typeof document>"u")return uo;const e=document.createElement("div");return e.style.position=yt,e.style.position===yt?yt:uo});function Ut(e){return e}const Zn=_(()=>{const e=w(s=>`Item ${s}`),t=w(s=>`Group ${s}`),o=w({}),n=w(Ut),r=w("div"),i=w(lt),l=(s,a=null)=>he(p(o,y(d=>d[s]),J()),a);return{components:o,computeItemKey:n,EmptyPlaceholder:l("EmptyPlaceholder"),FooterComponent:l("Footer"),GroupComponent:l("Group","div"),groupContent:t,HeaderComponent:l("Header"),HeaderFooterTag:r,ItemComponent:l("Item","div"),itemContent:e,ListComponent:l("List","div"),ScrollerComponent:l("Scroller","div"),scrollerRef:i,ScrollSeekPlaceholder:l("ScrollSeekPlaceholder"),TopItemListComponent:l("TopItemList")}});Q(No,Zn);_t();const $n={height:"100%",outline:"none",overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},Yn={outline:"none",overflowX:"auto",position:"relative"},St=e=>({height:"100%",position:"absolute",top:0,width:"100%"});_t();function fe(e,t){if(typeof e!="string")return{context:t}}function Xn(e,t){return{item:typeof e=="string"?void 0:t}}function Zo({useEmitter:e,useEmitterValue:t,usePublisher:o}){return k.memo(function({children:n,style:r,context:i,...l}){const s=o("scrollContainerState"),a=t("ScrollerComponent"),d=o("smoothScrollTargetReached"),h=t("scrollerRef"),I=t("horizontalDirection")||!1,{scrollByCallback:g,scrollerRef:v,scrollToCallback:b}=qo(s,d,a,h,void 0,I);return e("scrollTo",b),e("scrollBy",g),O.jsx(a,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:v,style:{...I?Yn:$n,...r},tabIndex:0,...l,...fe(a,i),children:n})})}function $o({useEmitter:e,useEmitterValue:t,usePublisher:o}){return k.memo(function({children:n,style:r,context:i,...l}){const s=o("windowScrollContainerState"),a=t("ScrollerComponent"),d=o("smoothScrollTargetReached"),h=t("totalListHeight"),I=t("deviation"),g=t("customScrollParent"),v=k.useRef(null),b=t("scrollerRef"),{scrollByCallback:T,scrollerRef:m,scrollToCallback:u}=qo(s,d,a,b,g);return Ko(()=>{var f;return m.current=g||((f=v.current)==null?void 0:f.ownerDocument.defaultView),()=>{m.current=null}},[m,g]),e("windowScrollTo",u),e("scrollBy",T),O.jsx(a,{ref:v,"data-virtuoso-scroller":!0,style:{position:"relative",...r,...h!==0?{height:h+I}:{}},...l,...fe(a,i),children:n})})}const Jn=_(()=>{const e=w(d=>O.jsxs("td",{children:["Item $",d]})),t=w(null),o=w(d=>O.jsxs("td",{colSpan:1e3,children:["Group ",d]})),n=w(null),r=w(null),i=w({}),l=w(Ut),s=w(lt),a=(d,h=null)=>he(p(i,y(I=>I[d]),J()),h);return{components:i,computeItemKey:l,context:t,EmptyPlaceholder:a("EmptyPlaceholder"),FillerRow:a("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,groupContent:o,ScrollerComponent:a("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder"),TableBodyComponent:a("TableBody","tbody"),TableComponent:a("Table","table"),TableFooterComponent:a("TableFoot","tfoot"),TableHeadComponent:a("TableHead","thead"),TableRowComponent:a("TableRow","tr"),GroupComponent:a("Group","tr")}}),Qn=_(([e,t])=>({...e,...t}),Q(No,Jn)),er=({height:e})=>O.jsx("tr",{children:O.jsx("td",{style:{height:e}})}),tr=({height:e})=>O.jsx("tr",{children:O.jsx("td",{style:{border:0,height:e,padding:0}})}),or={overflowAnchor:"none"},fo={position:_t(),zIndex:2,overflowAnchor:"none"},ho=k.memo(function({showTopList:e=!1}){const t=P("listState"),o=P("computeItemKey"),n=P("firstItemIndex"),r=P("context"),i=P("isSeeking"),l=P("fixedHeaderHeight"),s=P("groupIndices").length>0,a=P("itemContent"),d=P("groupContent"),h=P("ScrollSeekPlaceholder")||er,I=P("GroupComponent"),g=P("TableRowComponent"),v=(e?t.topItems:[]).reduce((T,m,u)=>(u===0?T.push(m.size):T.push(T[u-1]+m.size),T),[]),b=(e?t.topItems:t.items).map(T=>{const m=T.originalIndex,u=o(m+n,T.data,r),f=e?m===0?0:v[m-1]:0;return i?ht.createElement(h,{...fe(h,r),height:T.size,index:T.index,key:u,type:T.type||"item"}):T.type==="group"?ht.createElement(I,{...fe(I,r),"data-index":m,"data-item-index":T.index,"data-known-size":T.size,key:u,style:{...fo,top:l}},d(T.index,r)):ht.createElement(g,{...fe(g,r),...Xn(g,T.data),"data-index":m,"data-item-index":T.index,"data-known-size":T.size,"data-item-group-index":T.groupIndex,key:u,style:e?{...fo,top:l+f}:or},s?a(T.index,T.groupIndex,T.data,r):a(T.index,T.data,r))});return O.jsx(O.Fragment,{children:b})}),nr=k.memo(function(){const e=P("listState"),t=P("topItemsIndexes").length>0,o=ye("sizeRanges"),n=P("useWindowScroll"),r=P("customScrollParent"),i=ye("windowScrollContainerState"),l=ye("scrollContainerState"),s=r||n?i:l,a=P("trackItemSizes"),d=P("itemSize"),h=P("log"),{callbackRef:I,ref:g}=hn(o,d,a,s,h,void 0,r,!1,P("skipAnimationFrameInResizeObserver")),[v,b]=k.useState(0);Kt("deviation",z=>{v!==z&&(g.current.style.marginTop=`${z}px`,b(z))});const T=P("EmptyPlaceholder"),m=P("FillerRow")||tr,u=P("TableBodyComponent"),f=P("paddingTopAddition"),S=P("statefulTotalCount"),E=P("context");if(S===0&&T)return O.jsx(T,{...fe(T,E)});const H=(t?e.topItems:[]).reduce((z,j)=>z+j.size,0),F=e.offsetTop+f+v-H,c=e.offsetBottom,x=F>0?O.jsx(m,{context:E,height:F},"padding-top"):null,C=c>0?O.jsx(m,{context:E,height:c},"padding-bottom"):null;return O.jsxs(u,{"data-testid":"virtuoso-item-list",ref:I,...fe(u,E),children:[x,t&&O.jsx(ho,{showTopList:!0}),O.jsx(ho,{}),C]})}),rr=({children:e})=>{const t=k.useContext(_o),o=ye("viewportHeight"),n=ye("fixedItemHeight"),r=Ge(k.useMemo(()=>pt(o,i=>We(i,"height")),[o]),!0,P("skipAnimationFrameInResizeObserver"));return k.useEffect(()=>{t&&(o(t.viewportHeight),n(t.itemHeight))},[t,o,n]),O.jsx("div",{"data-viewport-type":"element",ref:r,style:St(),children:e})},ir=({children:e})=>{const t=k.useContext(_o),o=ye("windowViewportRect"),n=ye("fixedItemHeight"),r=P("customScrollParent"),i=Co(o,r,P("skipAnimationFrameInResizeObserver"));return k.useEffect(()=>{t&&(n(t.itemHeight),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:100}))},[t,o,n]),O.jsx("div",{"data-viewport-type":"window",ref:i,style:St(),children:e})},lr=k.memo(function(e){const t=P("useWindowScroll"),o=P("customScrollParent"),n=ye("fixedHeaderHeight"),r=ye("fixedFooterHeight"),i=P("fixedHeaderContent"),l=P("fixedFooterContent"),s=P("context"),a=Ge(k.useMemo(()=>pt(n,u=>We(u,"height")),[n]),!0,P("skipAnimationFrameInResizeObserver")),d=Ge(k.useMemo(()=>pt(r,u=>We(u,"height")),[r]),!0,P("skipAnimationFrameInResizeObserver")),h=o||t?ar:cr,I=o||t?ir:rr,g=P("TableComponent"),v=P("TableHeadComponent"),b=P("TableFooterComponent"),T=i?O.jsx(v,{ref:a,style:{position:"sticky",top:0,zIndex:2},...fe(v,s),children:i()},"TableHead"):null,m=l?O.jsx(b,{ref:d,style:{bottom:0,position:"sticky",zIndex:1},...fe(b,s),children:l()},"TableFoot"):null;return O.jsx(h,{...e,...fe(h,s),children:O.jsx(I,{children:O.jsxs(g,{style:{borderSpacing:0,overflowAnchor:"none"},...fe(g,s),children:[T,O.jsx(nr,{},"TableBody"),m]})})})}),{Component:sr,useEmitter:Kt,useEmitterValue:P,usePublisher:ye}=Go(Qn,{required:{},optional:{restoreStateFrom:"restoreStateFrom",context:"context",followOutput:"followOutput",firstItemIndex:"firstItemIndex",itemContent:"itemContent",groupContent:"groupContent",fixedHeaderContent:"fixedHeaderContent",fixedFooterContent:"fixedFooterContent",overscan:"overscan",increaseViewportBy:"increaseViewportBy",minOverscanItemCount:"minOverscanItemCount",totalCount:"totalCount",topItemCount:"topItemCount",initialTopMostItemIndex:"initialTopMostItemIndex",components:"components",groupCounts:"groupCounts",atBottomThreshold:"atBottomThreshold",atTopThreshold:"atTopThreshold",computeItemKey:"computeItemKey",defaultItemHeight:"defaultItemHeight",fixedGroupHeight:"fixedGroupHeight",fixedItemHeight:"fixedItemHeight",itemSize:"itemSize",scrollSeekConfiguration:"scrollSeekConfiguration",data:"data",initialItemCount:"initialItemCount",initialScrollTop:"initialScrollTop",alignToBottom:"alignToBottom",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel"},methods:{scrollToIndex:"scrollToIndex",scrollIntoView:"scrollIntoView",scrollTo:"scrollTo",scrollBy:"scrollBy",getState:"getState"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",totalListHeightChanged:"totalListHeightChanged",itemsRendered:"itemsRendered",groupIndices:"groupIndices"}},lr),cr=Zo({useEmitter:Kt,useEmitterValue:P,usePublisher:ye}),ar=$o({useEmitter:Kt,useEmitterValue:P,usePublisher:ye}),ur=sr,mo={bottom:0,itemHeight:0,items:[],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},dr={bottom:0,itemHeight:0,items:[{index:0}],itemWidth:0,offsetBottom:0,offsetTop:0,top:0},{ceil:go,floor:vt,max:Je,min:Ht,round:po}=Math;function xo(e,t,o){return Array.from({length:t-e+1}).map((n,r)=>({data:o===null?null:o[r+e],index:r+e}))}function fr(e){return{...dr,items:e}}function ft(e,t){return e&&e.width===t.width&&e.height===t.height}function hr(e,t){return e&&e.column===t.column&&e.row===t.row}const mr=_(([{increaseViewportBy:e,listBoundary:t,overscan:o,visibleRange:n},{footerHeight:r,headerHeight:i,scrollBy:l,scrollContainerState:s,scrollTo:a,scrollTop:d,smoothScrollTargetReached:h,viewportHeight:I},g,v,{didMount:b,propsReady:T},{customScrollParent:m,useWindowScroll:u,windowScrollContainerState:f,windowScrollTo:S,windowViewportRect:E},H])=>{const F=w(0),c=w(0),x=w(mo),C=w({height:0,width:0}),z=w({height:0,width:0}),j=N(),D=N(),V=w(0),$=w(null),G=w({column:0,row:0}),ee=N(),Y=N(),ge=w(!1),pe=w(0),xe=w(!0),ve=w(!1),Ee=w(!1);K(p(b,A(pe),W(([R,U])=>!!U)),()=>{L(xe,!1)}),K(p(le(b,xe,z,C,pe,ve),W(([R,U,te,ue,,Se])=>R&&!U&&te.height!==0&&ue.height!==0&&!Se)),([,,,,R])=>{L(ve,!0),Dt(1,()=>{L(j,R)}),Re(p(d),()=>{L(t,[0,0]),L(xe,!0)})}),B(p(Y,W(R=>R!=null&&R.scrollTop>0),Be(0)),c),K(p(b,A(Y),W(([,R])=>R!=null)),([,R])=>{R&&(L(C,R.viewport),L(z,R.item),L(G,R.gap),R.scrollTop>0&&(L(ge,!0),Re(p(d,Ne(1)),U=>{L(ge,!1)}),L(a,{top:R.scrollTop})))}),B(p(C,y(({height:R})=>R)),I),B(p(le(M(C,ft),M(z,ft),M(G,(R,U)=>R&&R.column===U.column&&R.row===U.row),M(d)),y(([R,U,te,ue])=>({gap:te,item:U,scrollTop:ue,viewport:R}))),ee),B(p(le(M(F),n,M(G,hr),M(z,ft),M(C,ft),M($),M(c),M(ge),M(xe),M(pe)),W(([,,,,,,,R])=>!R),y(([R,[U,te],ue,Se,se,re,ae,,ie,q])=>{const{column:X,row:Ce}=ue,{height:de,width:Ct}=Se,{width:qt}=se;if(ae===0&&(R===0||qt===0))return mo;if(Ct===0){const Jt=Vt(q,R),Qo=Jt+Math.max(ae-1,0);return fr(xo(Jt,Qo,re))}const ut=Yo(qt,Ct,X);let Ke,De;ie?U===0&&te===0&&ae>0?(Ke=0,De=ae-1):(Ke=ut*vt((U+Ce)/(de+Ce)),De=ut*go((te+Ce)/(de+Ce))-1,De=Ht(R-1,Je(De,ut-1)),Ke=Ht(De,Je(0,Ke))):(Ke=0,De=-1);const Zt=xo(Ke,De,re),{bottom:$t,top:Yt}=vo(se,ue,Se,Zt),Xt=go(R/ut),Jo=Xt*de+(Xt-1)*Ce-$t;return{bottom:$t,itemHeight:de,items:Zt,itemWidth:Ct,offsetBottom:Jo,offsetTop:Yt,top:Yt}})),x),B(p($,W(R=>R!==null),y(R=>R.length)),F),B(p(le(C,z,x,G),W(([R,U,{items:te}])=>te.length>0&&U.height!==0&&R.height!==0),y(([R,U,{items:te},ue])=>{const{bottom:Se,top:se}=vo(R,ue,U,te);return[se,Se]}),J(tt)),t);const ze=w(!1);B(p(d,A(ze),y(([R,U])=>U||R!==0)),ze);const Fe=Te(p(le(x,F),W(([{items:R}])=>R.length>0),A(ze),W(([[R,U],te])=>{const ue=R.items[R.items.length-1].index===U-1;return(te||R.bottom>0&&R.itemHeight>0&&R.offsetBottom===0&&R.items.length===U)&&ue}),y(([[,R]])=>R-1),J())),Ye=Te(p(M(x),W(({items:R})=>R.length>0&&R[0].index===0),Be(0),J())),Ue=Te(p(M(x),A(ge),W(([{items:R},U])=>R.length>0&&!U),y(([{items:R}])=>({endIndex:R[R.length-1].index,startIndex:R[0].index})),J(Eo),je(0)));B(Ue,v.scrollSeekRangeChanged),B(p(j,A(C,z,F,G),y(([R,U,te,ue,Se])=>{const se=Fo(R),{align:re,behavior:ae,offset:ie}=se;let q=se.index;q==="LAST"&&(q=ue-1),q=Je(0,q,Ht(ue-1,q));let X=Ft(U,Se,te,q);return re==="end"?X=po(X-U.height+te.height):re==="center"&&(X=po(X-U.height/2+te.height/2)),ie&&(X+=ie),{behavior:ae,top:X}})),a);const Me=he(p(x,y(R=>R.offsetBottom+R.bottom)),0);return B(p(E,y(R=>({height:R.visibleHeight,width:R.visibleWidth}))),C),{customScrollParent:m,data:$,deviation:V,footerHeight:r,gap:G,headerHeight:i,increaseViewportBy:e,initialItemCount:c,itemDimensions:z,overscan:o,restoreStateFrom:Y,scrollBy:l,scrollContainerState:s,scrollHeight:D,scrollTo:a,scrollToIndex:j,scrollTop:d,smoothScrollTargetReached:h,totalCount:F,useWindowScroll:u,viewportDimensions:C,windowScrollContainerState:f,windowScrollTo:S,windowViewportRect:E,...v,gridState:x,horizontalDirection:Ee,initialTopMostItemIndex:pe,totalListHeight:Me,...g,endReached:Fe,propsReady:T,rangeChanged:Ue,startReached:Ye,stateChanged:ee,stateRestoreInProgress:ge,...H}},Q(Nt,me,at,Do,Ae,Gt,Le));function Yo(e,t,o){return Je(1,vt((e+o)/(vt(t)+o)))}function vo(e,t,o,n){const{height:r}=o;if(r===void 0||n.length===0)return{bottom:0,top:0};const i=Ft(e,t,o,n[0].index);return{bottom:Ft(e,t,o,n[n.length-1].index)+r,top:i}}function Ft(e,t,o,n){const r=Yo(e.width,o.width,t.column),i=vt(n/r),l=i*o.height+Je(0,i-1)*t.row;return l>0?l+t.row:l}const gr=_(()=>{const e=w(I=>`Item ${I}`),t=w({}),o=w(null),n=w("virtuoso-grid-item"),r=w("virtuoso-grid-list"),i=w(Ut),l=w("div"),s=w(lt),a=(I,g=null)=>he(p(t,y(v=>v[I]),J()),g),d=w(!1),h=w(!1);return B(M(h),d),{components:t,computeItemKey:i,context:o,FooterComponent:a("Footer"),HeaderComponent:a("Header"),headerFooterTag:l,itemClassName:n,ItemComponent:a("Item","div"),itemContent:e,listClassName:r,ListComponent:a("List","div"),readyStateChanged:d,reportReadyState:h,ScrollerComponent:a("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:a("ScrollSeekPlaceholder","div")}}),pr=_(([e,t])=>({...e,...t}),Q(mr,gr)),xr=k.memo(function(){const e=oe("gridState"),t=oe("listClassName"),o=oe("itemClassName"),n=oe("itemContent"),r=oe("computeItemKey"),i=oe("isSeeking"),l=be("scrollHeight"),s=oe("ItemComponent"),a=oe("ListComponent"),d=oe("ScrollSeekPlaceholder"),h=oe("context"),I=be("itemDimensions"),g=be("gap"),v=oe("log"),b=oe("stateRestoreInProgress"),T=be("reportReadyState"),m=Ge(k.useMemo(()=>u=>{const f=u.parentElement.parentElement.scrollHeight;l(f);const S=u.firstChild;if(S){const{height:E,width:H}=S.getBoundingClientRect();I({height:E,width:H})}g({column:Io("column-gap",getComputedStyle(u).columnGap,v),row:Io("row-gap",getComputedStyle(u).rowGap,v)})},[l,I,g,v]),!0,!1);return Ko(()=>{e.itemHeight>0&&e.itemWidth>0&&T(!0)},[e]),b?null:O.jsx(a,{className:t,ref:m,...fe(a,h),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(u=>{const f=r(u.index,u.data,h);return i?O.jsx(d,{...fe(d,h),height:e.itemHeight,index:u.index,width:e.itemWidth},f):ht.createElement(s,{...fe(s,h),className:o,"data-index":u.index,key:f},n(u.index,u.data,h))})})}),vr=k.memo(function(){const e=oe("HeaderComponent"),t=be("headerHeight"),o=oe("headerFooterTag"),n=Ge(k.useMemo(()=>i=>{t(We(i,"height"))},[t]),!0,!1),r=oe("context");return e?O.jsx(o,{ref:n,children:O.jsx(e,{...fe(e,r)})}):null}),Ir=k.memo(function(){const e=oe("FooterComponent"),t=be("footerHeight"),o=oe("headerFooterTag"),n=Ge(k.useMemo(()=>i=>{t(We(i,"height"))},[t]),!0,!1),r=oe("context");return e?O.jsx(o,{ref:n,children:O.jsx(e,{...fe(e,r)})}):null}),Tr=({children:e})=>{const t=k.useContext(Uo),o=be("itemDimensions"),n=be("viewportDimensions"),r=Ge(k.useMemo(()=>i=>{n(i.getBoundingClientRect())},[n]),!0,!1);return k.useEffect(()=>{t&&(n({height:t.viewportHeight,width:t.viewportWidth}),o({height:t.itemHeight,width:t.itemWidth}))},[t,n,o]),O.jsx("div",{ref:r,style:St(),children:e})},wr=({children:e})=>{const t=k.useContext(Uo),o=be("windowViewportRect"),n=be("itemDimensions"),r=oe("customScrollParent"),i=Co(o,r,!1);return k.useEffect(()=>{t&&(n({height:t.itemHeight,width:t.itemWidth}),o({offsetTop:0,visibleHeight:t.viewportHeight,visibleWidth:t.viewportWidth}))},[t,o,n]),O.jsx("div",{ref:i,style:St(),children:e})},Sr=k.memo(function({...e}){const t=oe("useWindowScroll"),o=oe("customScrollParent"),n=o||t?br:Cr,r=o||t?wr:Tr,i=oe("context");return O.jsx(n,{...e,...fe(n,i),children:O.jsxs(r,{children:[O.jsx(vr,{}),O.jsx(xr,{}),O.jsx(Ir,{})]})})}),{useEmitter:Xo,useEmitterValue:oe,usePublisher:be}=Go(pr,{optional:{context:"context",totalCount:"totalCount",overscan:"overscan",itemContent:"itemContent",components:"components",computeItemKey:"computeItemKey",data:"data",initialItemCount:"initialItemCount",scrollSeekConfiguration:"scrollSeekConfiguration",headerFooterTag:"headerFooterTag",listClassName:"listClassName",itemClassName:"itemClassName",useWindowScroll:"useWindowScroll",customScrollParent:"customScrollParent",scrollerRef:"scrollerRef",logLevel:"logLevel",restoreStateFrom:"restoreStateFrom",initialTopMostItemIndex:"initialTopMostItemIndex",increaseViewportBy:"increaseViewportBy"},methods:{scrollTo:"scrollTo",scrollBy:"scrollBy",scrollToIndex:"scrollToIndex"},events:{isScrolling:"isScrolling",endReached:"endReached",startReached:"startReached",rangeChanged:"rangeChanged",atBottomStateChange:"atBottomStateChange",atTopStateChange:"atTopStateChange",stateChanged:"stateChanged",readyStateChanged:"readyStateChanged"}},Sr),Cr=Zo({useEmitter:Xo,useEmitterValue:oe,usePublisher:be}),br=$o({useEmitter:Xo,useEmitterValue:oe,usePublisher:be});function Io(e,t,o){return t!=="normal"&&!(t!=null&&t.endsWith("px"))&&o(`${e} was not resolved to pixel value correctly`,t,we.WARN),t==="normal"?0:parseInt(t??"0",10)}function zr({table:e}){const{t}=tn("common");return O.jsxs("div",{className:"flex flex-row flex-wrap gap-2 text-xs px-2",children:[O.jsxs("span",{className:"label",children:[t(o=>o.columns),": "]}),e.getAllLeafColumns().map(o=>o.id==="select"?null:O.jsxs("label",{className:"label",children:[O.jsx("input",{checked:o.getIsVisible(),disabled:!o.getCanHide(),onChange:o.getToggleVisibilityHandler(),type:"checkbox",className:"checkbox checkbox-xs"}),typeof o.columnDef.header=="string"&&o.columnDef.header?o.columnDef.header:t(n=>n[o.id])]},o.id))]})}const Rr={Table:({style:e,context:t,...o})=>O.jsx("div",{className:"overflow-x-auto overflow-y-hidden",children:O.jsx("table",{...o,className:"table table-sm mb-5 min-w-full",style:{...e,tableLayout:"fixed"}})}),TableHead:({context:e,children:t,style:o,...n})=>O.jsx("thead",{...n,children:t}),TableRow:({item:e,context:t,...o})=>O.jsx("tr",{...o,children:e.getVisibleCells().map(n=>O.jsx("td",{children:To(n.column.columnDef.cell,n.getContext())},n.id))})};function Er({id:e,table:t}){return O.jsxs(O.Fragment,{children:[O.jsx(zr,{table:t}),O.jsx(ur,{useWindowScroll:!0,id:e,className:"mt-1.5",data:t.getRowModel().rows,components:Rr,defaultItemHeight:73,increaseViewportBy:{top:100,bottom:100},fixedHeaderContent:()=>t.getHeaderGroups().map(o=>O.jsx("tr",{className:"bg-base-200",children:o.headers.map(n=>{const r=n.column.getIsSorted(),i=r==="asc"?" ↑":r==="desc"?" ↓":null;return O.jsx("th",{colSpan:n.colSpan,style:{width:n.getSize()},children:n.isPlaceholder?null:O.jsx(O.Fragment,{children:O.jsxs("div",{className:n.column.getCanSort()?"cursor-pointer select-none whitespace-normal":"whitespace-normal",onClick:n.column.getToggleSortingHandler(),children:[To(n.column.columnDef.header,n.getContext()),i]})})},n.id)})},o.id))})]})}export{Er as T};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-
|
|
1
|
+
import{r as i,j as e}from"./index-DiJ--4jy.js";const x=i.memo(a=>{const{label:s,detail:l,onChange:r,onBlur:t,...d}=a;return e.jsxs("fieldset",{className:"fieldset",children:[s&&e.jsxs("legend",{className:"fieldset-legend",children:[s,a.required?" *":""]}),e.jsx("textarea",{className:`textarea${a.required?" validator":""}`,onChange:r,onBlur:t,...d}),l&&e.jsx("div",{className:"label",children:l})]})});export{x as T};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d1 as m,r as s,j as A}from"./index-
|
|
1
|
+
import{d1 as m,r as s,j as A}from"./index-DiJ--4jy.js";var c=[60,60,24,7,365/7/12,12];function l(e){return e instanceof Date?e:!isNaN(e)||/^\d+$/.test(e)?new Date(parseInt(e)):(e=(e||"").trim().replace(/\.\d+/,"").replace(/-/,"/").replace(/-/,"/").replace(/(\d)T(\d)/,"$1 $2").replace(/Z/," UTC").replace(/([+-]\d\d):?(\d\d)/," $1$2"),new Date(e))}function T(e,r){var n=e<0?1:0;e=Math.abs(e);for(var t=e,a=0;e>=c[a]&&a<c.length;a++)e/=c[a];return e=Math.floor(e),a*=2,e>(a===0?9:1)&&(a+=1),r(e,a,t)[n].replace("%s",e.toString())}function g(e,r){var n=r?l(r):new Date;return(+n-+l(e))/1e3}function b(e){for(var r=1,n=0,t=Math.abs(e);e>=c[n]&&n<c.length;n++)e/=c[n],r*=c[n];return t=t%r,t=t?r-t:r,Math.ceil(t)}var E=function(e,r,n){var t=g(e,n&&n.relativeDate);return T(t,m(r))},D="timeago-id";function M(e){return e.getAttribute("datetime")}function R(e,r){e.setAttribute(D,r)}function h(e){return parseInt(e.getAttribute(D))}var i={},u=function(e){clearTimeout(e),delete i[e]};function I(e,r,n,t){u(h(e));var a=t.relativeDate,x=t.minInterval,o=g(r,a);e.innerText=T(o,n);var f=setTimeout(function(){I(e,r,n,t)},Math.min(Math.max(b(o),x||1)*1e3,2147483647));i[f]=0,R(e,f)}function v(e){e?u(h(e)):Object.keys(i).forEach(u)}function $(e,r,n){var t=e.length?e:[e];return t.forEach(function(a){I(a,M(a),m(r),n||{})}),t}const S=e=>e instanceof Date?`${e.toISOString()}`:`${e}`,j=({datetime:e,locale:r,opts:n})=>{const t=s.useRef(null);return s.useEffect(()=>{if(t.current)return v(t.current),t.current.setAttribute("datetime",S(e)),$(t.current,r,n),()=>{t.current&&v(t.current)}},[e,r,n]),A.jsx("time",{ref:t,children:E(e,r,n)})};export{j as T};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{X as k,a2 as _,u as f,r as m,j as n,a3 as h,B as l,s as g,a as u,D as p,bb as y,a5 as x,dh as C}from"./index-DiJ--4jy.js";import{I as N}from"./InputField-ClGszlbJ.js";import{g as v}from"./index-Ylx8hT_m.js";import"./envs-CSqIi4cL.js";const z=k.create(t=>{const{addInstallCode:o}=t,s=_(),{t:i}=f(["settings","common"]),[r,c]=m.useState("");return m.useEffect(()=>{const a=d=>{d.key==="Escape"&&(d.preventDefault(),s.remove())};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[s]),n.jsx(h,{isOpen:s.visible,title:i(a=>a.add_install_code),footer:n.jsxs(n.Fragment,{children:[n.jsx(l,{className:"btn btn-neutral",onClick:s.remove,children:i(a=>a.cancel,{ns:"common"})}),n.jsx(l,{className:"btn btn-primary ms-1",onClick:async()=>{r&&(s.remove(),await o(r))},children:i(a=>a.add_install_code)})]}),children:n.jsx("div",{className:"flex flex-col gap-2",children:n.jsx(N,{name:"install_code",label:i(a=>a.install_code),onChange:a=>c(a.target.value),value:r,type:"text",required:!0})})})});async function S(t){return await new Promise((o,s)=>{const i=new FileReader;i.onloadend=()=>o(i.result),i.onerror=r=>s(r),i.readAsDataURL(t)})}async function B(t){const o=await fetch(t);if(o.ok){const s=await o.blob();return await S(s)}return Promise.reject(o.status)}function q({sourceIdx:t,devices:o}){const[s,i]=m.useState("none"),[r,c]=m.useState({}),{t:a}=f(["settings","common","zigbee"]),d=m.useCallback(async e=>{c(w=>({...w,[e.ieee_address]:"init"}));const b=v(e),j=await B(b);return await g(t,"bridge/request/device/options",{id:e.ieee_address,options:{icon:j}}),c(w=>({...w,[e.ieee_address]:"done"})),!0},[t]);switch(m.useEffect(()=>{if(s==="start"){for(const e of o)e.type!=="Coordinator"&&d(e).catch(b=>{console.error("Error localising image",b),c(j=>({...j,[e.ieee_address]:"error"}))}).then();i("inprogress")}},[s,o,d]),s){case"none":return n.jsx(l,{className:"btn btn-outline btn-primary join-item",onClick:()=>i("start"),children:a(e=>e.localise_images)});case"inprogress":return n.jsx("ul",{className:"menu menu-xs bg-base-200 max-w-xs w-full join-item",children:o.map(e=>n.jsxs("li",{className:"flex-row justify-between items-center border-b py-0.5",children:[e.friendly_name,n.jsx("span",{className:"badge badge-xs",children:a(b=>b[r[e.ieee_address]],{ns:"common"})})]},`${t}-${e.ieee_address}-${e.friendly_name}`))});case"done":return n.jsx("div",{children:a(e=>e.unknown,{ns:"zigbee"})})}return n.jsx("div",{children:a(e=>e.unknown,{ns:"zigbee"})})}function $({sourceIdx:t}){const o=u(e=>e.setBackupPreparing),s=u(p(e=>e.bridgeInfo[t])),i=u(p(e=>e.backup[t])),r=u(p(e=>e.preparingBackup[t])),c=u(p(e=>e.devices[t])),{t:a}=f(["settings","common"]),d=m.useCallback(()=>{const e=`z2m-backup.${s.version}.${Date.now()}.zip`;y(`data:application/zip;base64,${i}`,e)},[i,s.version]);return n.jsxs("div",{className:"join join-vertical",children:[n.jsx(x,{className:"btn btn-outline btn-error join-item mb-2",onClick:async()=>await g(t,"bridge/request/restart",""),title:a(e=>e.restart_zigbee2mqtt),modalDescription:a(e=>e.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:a(e=>e.cancel,{ns:"common"}),children:a(e=>e.restart_zigbee2mqtt)}),n.jsx(l,{className:"btn btn-outline btn-primary join-item",onClick:async()=>await C(u.getState(),"state.json"),children:a(e=>e.download_state)}),r?n.jsx(l,{className:"btn btn-primary join-item disabled",children:n.jsx("span",{className:"loading loading-dots loading-xl"})}):i?n.jsx(l,{className:"btn btn-outline btn-primary join-item",onClick:d,children:a(e=>e.download_z2m_backup)}):n.jsx(l,{className:"btn btn-outline btn-primary join-item",onClick:async()=>{o(t),await g(t,"bridge/request/backup","")},children:a(e=>e.request_z2m_backup)}),n.jsx(l,{className:"btn btn-outline btn-primary join-item",onClick:async()=>await k.show(z,{addInstallCode:async e=>await g(t,"bridge/request/install_code/add",{value:e})}),children:a(e=>e.add_install_code)}),n.jsx(q,{sourceIdx:t,devices:c})]})}export{$ as default};
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,j as s,F as m,B as v,f as G,ah as U,u as J,a as l,A as K,s as F,q as T,S as Q,v as W,L as X,ai as q,aj as Y,ak as Z,N as ee,M as R,al as se,am as ae}from"./index-DiJ--4jy.js";import{u as ne,g as te,d as ie,c as le,e as re,F as ce,f as oe,o as E,a as de,s as D,b as H}from"./floating-ui.react-SUquiuNj.js";import{I as O}from"./InputField-ClGszlbJ.js";import{S as V}from"./SelectField-D8d6iiLj.js";import{T as ue}from"./Table-a9jksZ8Q.js";import{u as me,T as he}from"./useTable-DQ_SXEUl.js";import"./envs-CSqIi4cL.js";import"./floating-ui.dom-I8hrORoS.js";import"./DebouncedInput-dOweMuV9.js";function fe({placement:n,buttonClassName:w,buttonIcon:b,buttonTitle:x,title:_,onApply:p,canApply:y,children:N}){const h=t.useRef(null),[g,i]=t.useState(!1),{refs:j,floatingStyles:r,context:d}=ne({open:g,onOpenChange:i,placement:n,middleware:n?[E(8),D({padding:16,crossAxis:!0}),H({element:h})]:[E(8),de({padding:16,crossAxis:!0}),D({padding:16,crossAxis:!0}),H({element:h})]}),f=te(d,{event:"click"}),S=ie(d),c=le(d),{getReferenceProps:I,getFloatingProps:A}=re([f,S,c]),P=t.useCallback(async(...C)=>{await p?.(...C),i(!1)},[p]);return s.jsxs(s.Fragment,{children:[s.jsxs("button",{ref:j.setReference,type:"button",className:w,...I(),children:[b?s.jsx(m,{icon:b}):null,x?s.jsx("span",{children:x}):null]}),g?s.jsx(ce,{children:s.jsxs("aside",{ref:j.setFloating,style:r,...A({className:"card bg-base-200 shadow-lg border border-base-300 w-[min(32rem,calc(100vw-2.5rem))] max-h-[80vh] z-11"}),children:[s.jsxs("div",{className:"card-body px-4 py-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx("h4",{className:"card-title",children:_}),s.jsx(v,{onClick:()=>i(!1),className:"btn btn-ghost btn-sm",children:s.jsx(m,{icon:G})})]}),N,s.jsx("div",{className:"card-actions justify-end",children:s.jsx(v,{onClick:P,className:"btn btn-outline btn-primary btn-square btn-sm",disabled:!y,children:s.jsx(m,{icon:U})})})]}),s.jsx(oe,{ref:h,context:d,className:"fill-base-200 [&>path:first-of-type]:stroke-base-300 [&>path:last-of-type]:stroke-base-300"})]})}):null]})}function Ne(){const{t:n}=J(["touchlink","common","zigbee","settings"]),w=l(e=>e.bridgeInfo),b=l(e=>e.touchlinkDevices),x=l(e=>e.devices),_=l(e=>e.touchlinkIdentifyInProgress),p=l(e=>e.touchlinkResetInProgress),y=l(e=>Object.values(e.touchlinkScanInProgress).some(a=>a)),N=l(e=>e.setTouchlinkIdentifyInProgress),h=l(e=>e.setTouchlinkResetInProgress),g=l(e=>e.setTouchlinkScan),[i,j]=t.useState(0),[r,d]=t.useState(""),[f,S]=t.useState(""),[c,I]=t.useState([]);t.useEffect(()=>{d(w[i].network?.extended_pan_id??"")},[i]),t.useEffect(()=>{I(f?f.replaceAll(" ","").split(","):[])},[f]);const A=t.useMemo(()=>{const e=[];for(let a=0;a<K.length;a++){const o=x[a];for(const u of b[a])e.push({sourceIdx:a,touchlinkDevice:u,friendlyName:o.find(k=>k.ieee_address===u.ieee_address)?.friendly_name,identifyInProgress:_[a],resetInProgress:p[a]})}return e},[x,b,_,p]),P=t.useCallback(async e=>{g(e,{inProgress:!0,devices:[]}),await F(e,"bridge/request/touchlink/scan","")},[g]),C=t.useCallback(async([e,a])=>{N(e,!0),await F(e,"bridge/request/touchlink/identify",a)},[N]),M=t.useCallback(async([e,a])=>{h(e,!0),await F(e,"bridge/request/touchlink/factory_reset",a)},[h]),B=t.useCallback(async()=>{await F(i,"bridge/request/action",{action:"philips_hue_factory_reset",params:{extended_pan_id:r,serial_numbers:c}}),S("")},[i,r,c]),L=t.useMemo(()=>(!r||/^0x[a-fA-F0-9]{16}$/.test(r))&&Array.isArray(c)&&c.length>0?c.every(e=>/^[a-fA-F0-9]{6}$/.test(e)):!1,[r,c]),$=t.useMemo(()=>[{id:"source",size:60,header:()=>s.jsx("span",{title:n(e=>e.source,{ns:"common"}),children:s.jsx(m,{icon:W})}),accessorFn:({sourceIdx:e})=>T[e],cell:({row:{original:{sourceIdx:e}}})=>s.jsx(Q,{idx:e,nameClassName:"hidden md:inline-block"}),filterFn:"equals",meta:{filterVariant:"select",showFacetedOccurrences:!0}},{id:"ieee_address",minSize:175,header:n(e=>e.ieee_address,{ns:"zigbee"}),accessorFn:({touchlinkDevice:e})=>e.ieee_address,cell:({row:{original:{sourceIdx:e,touchlinkDevice:a,friendlyName:o}}})=>o?s.jsx("div",{className:"min-w-0",children:s.jsx(X,{to:`/device/${e}/${a.ieee_address}/info`,className:"link link-hover truncate",children:a.ieee_address})}):a.ieee_address,sortingFn:(e,a)=>e.original.touchlinkDevice.ieee_address.localeCompare(a.original.touchlinkDevice.ieee_address),filterFn:"includesString",meta:{filterVariant:"text"}},{id:"friendly_name",minSize:175,header:n(e=>e.friendly_name,{ns:"common"}),accessorFn:({friendlyName:e})=>e,filterFn:"includesString",sortingFn:(e,a)=>(e.original.friendlyName??e.original.touchlinkDevice.ieee_address).localeCompare(a.original.friendlyName??a.original.touchlinkDevice.ieee_address),meta:{filterVariant:"text",textFaceted:!0}},{id:"channel",minSize:175,header:n(e=>e.channel,{ns:"zigbee"}),accessorFn:({touchlinkDevice:e})=>e.channel,filterFn:"weakEquals",meta:{filterVariant:"select"}},{id:"actions",minSize:130,cell:({row:{original:{sourceIdx:e,touchlinkDevice:a,resetInProgress:o,identifyInProgress:u}}})=>s.jsxs("div",{className:"join join-horizontal",children:[s.jsx(v,{disabled:o||u,item:[e,a],title:n(k=>k.identify),className:"btn btn-sm btn-square btn-outline btn-primary join-item",onClick:C,children:s.jsx(m,{icon:u?q:Y,spin:u})}),s.jsx(v,{disabled:o||u,item:[e,a],title:n(k=>k.factory_reset),className:"btn btn-sm btn-square btn-outline btn-error join-item",onClick:M,children:s.jsx(m,{icon:o?q:Z,spin:o})})]}),enableSorting:!1,enableColumnFilter:!1,enableGlobalFilter:!1}],[n,C,M]),z=me({id:"touchlink-devices",columns:$,data:A,visibleColumns:{source:R},sorting:[{id:"friendly_name",desc:!1}]});return y?s.jsx("div",{className:"flex flex-row justify-center items-center gap-2",children:s.jsx("span",{className:"loading loading-infinity loading-xl"})}):s.jsxs(s.Fragment,{children:[s.jsx(ee,{children:s.jsx(he,{...z})}),s.jsxs("div",{className:"flex flex-row flex-wrap justify-center items-center gap-2 mb-3",children:[R&&s.jsxs(V,{name:"scan_idx_picker",label:n(e=>e.scan_source),value:i,onChange:e=>!e.target.validationMessage&&!!e.target.value&&j(Number.parseInt(e.target.value,10)),className:"select",children:[s.jsx("option",{value:"",disabled:!0,children:n(e=>e.select_scan_source)}),T.map((e,a)=>s.jsx("option",{value:a,children:e},e))]}),s.jsx("fieldset",{className:"fieldset self-end",children:s.jsxs(v,{className:"btn btn-outline btn-primary",item:i,onClick:P,disabled:y,children:[s.jsx(m,{icon:se}),n(e=>e.scan)]})}),s.jsx("fieldset",{className:"fieldset self-end ml-auto",children:s.jsxs(fe,{placement:"bottom-end",canApply:L,onApply:B,buttonClassName:"btn btn-outline btn-error",buttonIcon:ae,buttonTitle:n(e=>e.philips_hue_reset),title:n(e=>e.philips_hue_reset),children:[R&&s.jsxs(V,{name:"scan_idx_picker",label:n(e=>e.source,{ns:"common"}),value:i,onChange:e=>!e.target.validationMessage&&!!e.target.value&&j(Number.parseInt(e.target.value,10)),className:"select",children:[s.jsx("option",{value:"",disabled:!0,children:n(e=>e.source,{ns:"common"})}),T.map((e,a)=>s.jsx("option",{value:a,children:e},e))]}),s.jsx(O,{name:"serial_numbers",label:n(e=>e.serial_numbers),type:"text",value:f,onChange:e=>!e.target.validationMessage&&S(e.target.value)}),s.jsxs("div",{className:"collapse collapse-arrow",children:[s.jsx("input",{type:"checkbox"}),s.jsx("div",{className:"collapse-title font-semibold px-0",children:n(e=>e.advanced,{ns:"settings"})}),s.jsx("div",{className:"collapse-content text-sm pb-2 px-2",children:s.jsx(O,{name:"extended_pan_id",label:n(e=>e.extended_pan_id,{ns:"zigbee"}),type:"text",value:r,onChange:e=>!e.target.validationMessage&&d(e.target.value)})})]})]})})]}),s.jsx("div",{className:"mb-5",children:s.jsx(ue,{id:"touchlink-devices",...z})})]})}export{Ne as default};
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,u as l,j as a,L as d,
|
|
1
|
+
import{r as s,u as l,j as a,L as d,aV as p}from"./index-DiJ--4jy.js";const i=e=>{const o="[/| |:]",n=new RegExp(o,"g");return e.replace(n,"_")},f=s.memo(({device:e})=>{const{t:o}=l("zigbee");let n=e.model_id||o(r=>r.unknown),t=p;if(e.supported&&e.definition){const r=[encodeURIComponent(e.definition.vendor.toLowerCase()),encodeURIComponent(e.definition.model.toLowerCase())].join("-");t=`https://www.zigbee2mqtt.io/devices/${encodeURIComponent(i(e.definition.model))}.html#${encodeURIComponent(i(r))}`,n=e.definition.model}return a.jsx(d,{target:"_blank",rel:"noopener noreferrer",to:t,className:"link link-hover",children:n})}),u=s.memo(({device:e})=>{const{t:o}=l("zigbee");let n=o(r=>r.unsupported),t=p;return e.supported&&e.definition&&(t=`https://www.zigbee2mqtt.io/supported-devices/#v=${encodeURIComponent(e.definition.vendor)}`,n=e.definition.vendor),a.jsx(d,{target:"_blank",rel:"noopener noreferrer",to:t,className:"link link-hover",children:n})});export{f as M,u as V};
|