zigbee2mqtt-windfront 2.9.1 → 2.9.3

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.
Files changed (281) hide show
  1. package/dist/assets/{About-DbrGK6mO.js → About-TlqF3GuF.js} +1 -1
  2. package/dist/assets/About-TlqF3GuF.js.br +0 -0
  3. package/dist/assets/{ActivityPage-DNt13SBq.js → ActivityPage-rX73rdxT.js} +1 -1
  4. package/dist/assets/ActivityPage-rX73rdxT.js.br +0 -0
  5. package/dist/assets/{Bind-yEmoaBwj.js → Bind-BDIbZwWR.js} +1 -1
  6. package/dist/assets/Bind-BDIbZwWR.js.br +0 -0
  7. package/dist/assets/{BindRow-VCnVcSBy.js → BindRow-WkWMDs3x.js} +1 -1
  8. package/dist/assets/BindRow-WkWMDs3x.js.br +0 -0
  9. package/dist/assets/{BindingsPage-Db5SRv-u.js → BindingsPage-CfcKVo3i.js} +1 -1
  10. package/dist/assets/BindingsPage-CfcKVo3i.js.br +0 -0
  11. package/dist/assets/Bridge-Bv5BtA5L.js +1 -0
  12. package/dist/assets/Bridge-Bv5BtA5L.js.br +0 -0
  13. package/dist/assets/{CheckboxField-DyzOsGYP.js → CheckboxField-BYu20qY2.js} +1 -1
  14. package/dist/assets/CheckboxField-BYu20qY2.js.br +0 -0
  15. package/dist/assets/{ClusterSinglePicker-Cr6COjS7.js → ClusterSinglePicker-BFzMrjEI.js} +1 -1
  16. package/dist/assets/ClusterSinglePicker-BFzMrjEI.js.br +0 -0
  17. package/dist/assets/{Clusters-DupPMEcC.js → Clusters-DwehMl3f.js} +1 -1
  18. package/dist/assets/Clusters-DwehMl3f.js.br +0 -0
  19. package/dist/assets/{ContributePage-Djbmq1Vo.js → ContributePage-qg1CEYKO.js} +1 -1
  20. package/dist/assets/ContributePage-qg1CEYKO.js.br +0 -0
  21. package/dist/assets/{Dashboard-DBNBwc23.js → Dashboard-CGkL3jh-.js} +1 -1
  22. package/dist/assets/Dashboard-CGkL3jh-.js.br +0 -0
  23. package/dist/assets/{DashboardFeatureWrapper-DyXk614q.js → DashboardFeatureWrapper-Da-7H6mJ.js} +1 -1
  24. package/dist/assets/DashboardFeatureWrapper-Da-7H6mJ.js.br +0 -0
  25. package/dist/assets/{DebouncedInput-B13ZAtjv.js → DebouncedInput-BMm2g2gA.js} +1 -1
  26. package/dist/assets/DebouncedInput-BMm2g2gA.js.br +0 -0
  27. package/dist/assets/{DevConsole-Db0OHQUe.js → DevConsole-BEZqX9YY.js} +1 -1
  28. package/dist/assets/DevConsole-BEZqX9YY.js.br +0 -0
  29. package/dist/assets/{DevConsole-D0t4i5S-.js → DevConsole-DGpWznsw.js} +1 -1
  30. package/dist/assets/DevConsole-DGpWznsw.js.br +0 -0
  31. package/dist/assets/{DeviceCard-B36D69y8.js → DeviceCard-DhI3XHiT.js} +1 -1
  32. package/dist/assets/DeviceCard-DhI3XHiT.js.br +0 -0
  33. package/dist/assets/{DeviceImage-BaY9GEM_.js → DeviceImage-Vk9TacUL.js} +1 -1
  34. package/dist/assets/DeviceImage-Vk9TacUL.js.br +0 -0
  35. package/dist/assets/DeviceInfo-BwRBFkpj.js +26 -0
  36. package/dist/assets/DeviceInfo-BwRBFkpj.js.br +0 -0
  37. package/dist/assets/{DevicePage-B3GhCr59.js → DevicePage-CIRdgoD4.js} +2 -2
  38. package/dist/assets/DevicePage-CIRdgoD4.js.br +0 -0
  39. package/dist/assets/{DevicePicker-DtnyVi9x.js → DevicePicker-DAEKDWgf.js} +1 -1
  40. package/dist/assets/DevicePicker-DAEKDWgf.js.br +0 -0
  41. package/dist/assets/{DeviceSettings-DarE0147.js → DeviceSettings-BpqMi9xE.js} +1 -1
  42. package/dist/assets/DeviceSettings-BpqMi9xE.js.br +0 -0
  43. package/dist/assets/{DeviceSpecificSettings-vaV9iCz2.js → DeviceSpecificSettings-D0e5Nc-F.js} +1 -1
  44. package/dist/assets/DeviceSpecificSettings-D0e5Nc-F.js.br +0 -0
  45. package/dist/assets/{Devices-CozXzYvi.js → Devices-B8yDqnvz.js} +1 -1
  46. package/dist/assets/Devices-B8yDqnvz.js.br +0 -0
  47. package/dist/assets/DevicesPage-Dm7pgGxZ.js +1 -0
  48. package/dist/assets/DevicesPage-Dm7pgGxZ.js.br +0 -0
  49. package/dist/assets/{DisplayValue-BOShM4qX.js → DisplayValue-SWg0guj0.js} +1 -1
  50. package/dist/assets/DisplayValue-SWg0guj0.js.br +0 -0
  51. package/dist/assets/{Duration-D2G18Z7O.js → Duration--BbAQnLR.js} +1 -1
  52. package/dist/assets/Duration--BbAQnLR.js.br +0 -0
  53. package/dist/assets/{EndpointPicker-dO2wEUZz.js → EndpointPicker-CYCCMY-Z.js} +1 -1
  54. package/dist/assets/EndpointPicker-CYCCMY-Z.js.br +0 -0
  55. package/dist/assets/{Exposes-zfyUGTul.js → Exposes-CXfEiCNB.js} +1 -1
  56. package/dist/assets/Exposes-CXfEiCNB.js.br +0 -0
  57. package/dist/assets/{Exposes-DE5LVq8B.js → Exposes-In5a4UAM.js} +1 -1
  58. package/dist/assets/Exposes-In5a4UAM.js.br +0 -0
  59. package/dist/assets/{FeatureWrapper-CB91Ehj0.js → FeatureWrapper-Cxxv_sRE.js} +1 -1
  60. package/dist/assets/FeatureWrapper-Cxxv_sRE.js.br +0 -0
  61. package/dist/assets/{FrontendSettingsPage-Dvbh-3Uw.js → FrontendSettingsPage-CXD3UMe9.js} +1 -1
  62. package/dist/assets/FrontendSettingsPage-CXD3UMe9.js.br +0 -0
  63. package/dist/assets/{GroupPage-BQttr84Q.js → GroupPage-B_o7xJJu.js} +2 -2
  64. package/dist/assets/GroupPage-B_o7xJJu.js.br +0 -0
  65. package/dist/assets/{GroupSettings-B6qCOX97.js → GroupSettings-DRfDlHZU.js} +1 -1
  66. package/dist/assets/GroupSettings-DRfDlHZU.js.br +0 -0
  67. package/dist/assets/{Groups-C9Yt7LYj.js → Groups-hVPF7mtV.js} +1 -1
  68. package/dist/assets/Groups-hVPF7mtV.js.br +0 -0
  69. package/dist/assets/{GroupsPage-ClaYivbM.js → GroupsPage-DQ0vxv3R.js} +1 -1
  70. package/dist/assets/GroupsPage-DQ0vxv3R.js.br +0 -0
  71. package/dist/assets/Health-GHsVF1Ld.js +1 -0
  72. package/dist/assets/Health-GHsVF1Ld.js.br +0 -0
  73. package/dist/assets/HomePage-D7zvhbJX.js +1 -0
  74. package/dist/assets/HomePage-D7zvhbJX.js.br +0 -0
  75. package/dist/assets/{IndeterminateCheckbox-96blLWW6.js → IndeterminateCheckbox-B0dn2MbK.js} +1 -1
  76. package/dist/assets/IndeterminateCheckbox-B0dn2MbK.js.br +2 -0
  77. package/dist/assets/InfoAlert-GQgTMP5x.js +1 -0
  78. package/dist/assets/InfoAlert-GQgTMP5x.js.br +0 -0
  79. package/dist/assets/{InputField-UOrr09c1.js → InputField-ikhV5k9q.js} +1 -1
  80. package/dist/assets/InputField-ikhV5k9q.js.br +0 -0
  81. package/dist/assets/{Json-BKgTLV5A.js → Json-B8eekdXV.js} +1 -1
  82. package/dist/assets/Json-B8eekdXV.js.br +0 -0
  83. package/dist/assets/{LastSeen-DvkA47I8.js → LastSeen-C6UtkUtr.js} +1 -1
  84. package/dist/assets/LastSeen-C6UtkUtr.js.br +0 -0
  85. package/dist/assets/{LogsPage-CTBduvRM.js → LogsPage-Ca2laV9S.js} +1 -1
  86. package/dist/assets/LogsPage-Ca2laV9S.js.br +0 -0
  87. package/dist/assets/Lqi-BGvDaG4P.js +1 -0
  88. package/dist/assets/Lqi-BGvDaG4P.js.br +0 -0
  89. package/dist/assets/{NetworkPage-tQfR9U78.js → NetworkPage-RAL-bKrl.js} +2 -2
  90. package/dist/assets/NetworkPage-RAL-bKrl.js.br +0 -0
  91. package/dist/assets/{NumberField-CIZBiWC4.js → NumberField-Dz_wXIHM.js} +1 -1
  92. package/dist/assets/NumberField-Dz_wXIHM.js.br +0 -0
  93. package/dist/assets/{OtaControlGroup-CBPplM6s.js → OtaControlGroup-DVXF2tOG.js} +1 -1
  94. package/dist/assets/OtaControlGroup-DVXF2tOG.js.br +0 -0
  95. package/dist/assets/OtaPage-BRYFA__-.js +1 -0
  96. package/dist/assets/OtaPage-BRYFA__-.js.br +0 -0
  97. package/dist/assets/{PowerSource-4WrPesie.js → PowerSource-Bdiu20e7.js} +1 -1
  98. package/dist/assets/PowerSource-Bdiu20e7.js.br +0 -0
  99. package/dist/assets/{RawNetworkData-CrLGTIIX.js → RawNetworkData-Dl-2MazQ.js} +5 -5
  100. package/dist/assets/RawNetworkData-Dl-2MazQ.js.br +0 -0
  101. package/dist/assets/{RawNetworkMap-DyrUxL38.js → RawNetworkMap-CGCoxbV_.js} +1 -1
  102. package/dist/assets/RawNetworkMap-CGCoxbV_.js.br +0 -0
  103. package/dist/assets/{RecallRemove-fxh0oICe.js → RecallRemove-DREEd2iQ.js} +1 -1
  104. package/dist/assets/RecallRemove-DREEd2iQ.js.br +0 -0
  105. package/dist/assets/{RemoveDeviceModal-dYZ_jwFH.js → RemoveDeviceModal-BDF1FwkE.js} +1 -1
  106. package/dist/assets/RemoveDeviceModal-BDF1FwkE.js.br +0 -0
  107. package/dist/assets/{Reporting-BSYKo5QY.js → Reporting-Dttg7mmh.js} +1 -1
  108. package/dist/assets/Reporting-Dttg7mmh.js.br +0 -0
  109. package/dist/assets/{ReportingPage-1zljNWsD.js → ReportingPage-DiIIcn2Q.js} +1 -1
  110. package/dist/assets/ReportingPage-DiIIcn2Q.js.br +0 -0
  111. package/dist/assets/{ReportingRow-AavL3hTB.js → ReportingRow-B6ztVlRP.js} +1 -1
  112. package/dist/assets/ReportingRow-B6ztVlRP.js.br +0 -0
  113. package/dist/assets/{Scene-BW7rAKmU.js → Scene-DFeSCFXd.js} +1 -1
  114. package/dist/assets/Scene-DFeSCFXd.js.br +0 -0
  115. package/dist/assets/{SelectField-Cwqszwkn.js → SelectField-ChkxzLb2.js} +1 -1
  116. package/dist/assets/SelectField-ChkxzLb2.js.br +0 -0
  117. package/dist/assets/{Settings-CBqyihHl.js → Settings-H0B21TB1.js} +1 -1
  118. package/dist/assets/Settings-H0B21TB1.js.br +0 -0
  119. package/dist/assets/{SettingsList-DHk8WVBC.js → SettingsList-BEDIGVmm.js} +1 -1
  120. package/dist/assets/SettingsList-BEDIGVmm.js.br +0 -0
  121. package/dist/assets/{SettingsPage-B5YfT-EB.js → SettingsPage-C25KbYaE.js} +2 -2
  122. package/dist/assets/SettingsPage-C25KbYaE.js.br +0 -0
  123. package/dist/assets/State-DF5LIA50.js +1 -0
  124. package/dist/assets/State-DF5LIA50.js.br +0 -0
  125. package/dist/assets/Table-BRR638L6.js +1 -0
  126. package/dist/assets/Table-BRR638L6.js.br +0 -0
  127. package/dist/assets/{TextareaField-C0YZrgWz.js → TextareaField-D7Tgbtla.js} +1 -1
  128. package/dist/assets/TextareaField-D7Tgbtla.js.br +0 -0
  129. package/dist/assets/{TimeAgo-DDsvNSJm.js → TimeAgo-DBAhRn8V.js} +1 -1
  130. package/dist/assets/TimeAgo-DBAhRn8V.js.br +0 -0
  131. package/dist/assets/{Tools-y-Rx2eWa.js → Tools-CeutqsKa.js} +1 -1
  132. package/dist/assets/Tools-CeutqsKa.js.br +0 -0
  133. package/dist/assets/TouchlinkPage-CtW89okC.js +1 -0
  134. package/dist/assets/TouchlinkPage-CtW89okC.js.br +0 -0
  135. package/dist/assets/VendorLink-Dc9puayp.js +1 -0
  136. package/dist/assets/VendorLink-Dc9puayp.js.br +0 -0
  137. package/dist/assets/{_createCompounder-mZmklMyi.js → _createCompounder-CQgEyaxr.js} +1 -1
  138. package/dist/assets/_createCompounder-CQgEyaxr.js.br +0 -0
  139. package/dist/assets/floating-ui.dom-DbzrgdRQ.js +1 -0
  140. package/dist/assets/floating-ui.dom-DbzrgdRQ.js.br +0 -0
  141. package/dist/assets/floating-ui.react-CXXdsME_.js +1 -0
  142. package/dist/assets/floating-ui.react-CXXdsME_.js.br +0 -0
  143. package/dist/assets/{index-DlxarZdr.js → index-BtLGoNwX.js} +5 -5
  144. package/dist/assets/index-BtLGoNwX.js.br +0 -0
  145. package/dist/assets/{index-C6OxEdGH.css → index-BxJpiI84.css} +1 -1
  146. package/dist/assets/index-BxJpiI84.css.br +0 -0
  147. package/dist/assets/index-CJiQGpsz.js +1 -0
  148. package/dist/assets/index-CJiQGpsz.js.br +0 -0
  149. package/dist/assets/{index-Bcr6d7hQ.js → index-DaJ2Nn9F.js} +1 -1
  150. package/dist/assets/index-DaJ2Nn9F.js.br +0 -0
  151. package/dist/assets/{isObjectLike-kGVml2Lw.js → isObjectLike-Df1CHLAH.js} +1 -1
  152. package/dist/assets/isObjectLike-Df1CHLAH.js.br +0 -0
  153. package/dist/assets/{jszip.min-bMIagv-O.js → jszip.min-DeDUMwns.js} +1 -1
  154. package/dist/assets/jszip.min-DeDUMwns.js.br +0 -0
  155. package/dist/assets/{merge-CrPafBdn.js → merge-CWZIW8ac.js} +1 -1
  156. package/dist/assets/merge-CWZIW8ac.js.br +0 -0
  157. package/dist/assets/oui-Cs4i_TTu.js +1 -0
  158. package/dist/assets/oui-Cs4i_TTu.js.br +0 -0
  159. package/dist/assets/{react-select.esm-DiK6dTG9.js → react-select.esm-BCwf9M9B.js} +1 -1
  160. package/dist/assets/react-select.esm-BCwf9M9B.js.br +0 -0
  161. package/dist/assets/snakeCase-DwD-G6zi.js +1 -0
  162. package/dist/assets/snakeCase-DwD-G6zi.js.br +0 -0
  163. package/dist/assets/{startCase-Dvtqvsu-.js → startCase-Qq38hBYL.js} +1 -1
  164. package/dist/assets/startCase-Qq38hBYL.js.br +0 -0
  165. package/dist/assets/useColumnCount-ApqeNg9D.js +1 -0
  166. package/dist/assets/useColumnCount-ApqeNg9D.js.br +0 -0
  167. package/dist/assets/{useSearch-xmhhmda2.js → useSearch-B3KF7gUg.js} +1 -1
  168. package/dist/assets/useSearch-B3KF7gUg.js.br +0 -0
  169. package/dist/assets/{useTable-TipnaiSD.js → useTable-STlqCddu.js} +1 -1
  170. package/dist/assets/useTable-STlqCddu.js.br +0 -0
  171. package/dist/index.html +2 -2
  172. package/dist/index.html.br +0 -0
  173. package/dist/onboarding/assets/{index-CsqCXLDa.js → index-D_7hoAR4.js} +1 -1
  174. package/dist/onboarding/assets/index-D_7hoAR4.js.br +0 -0
  175. package/dist/onboarding/index.html +1 -1
  176. package/dist/onboarding/index.html.br +0 -0
  177. package/package.json +12 -12
  178. package/dist/assets/About-DbrGK6mO.js.br +0 -0
  179. package/dist/assets/ActivityPage-DNt13SBq.js.br +0 -0
  180. package/dist/assets/Bind-yEmoaBwj.js.br +0 -0
  181. package/dist/assets/BindRow-VCnVcSBy.js.br +0 -0
  182. package/dist/assets/BindingsPage-Db5SRv-u.js.br +0 -0
  183. package/dist/assets/Bridge-CmJT8SGr.js +0 -1
  184. package/dist/assets/Bridge-CmJT8SGr.js.br +0 -0
  185. package/dist/assets/CheckboxField-DyzOsGYP.js.br +0 -0
  186. package/dist/assets/ClusterSinglePicker-Cr6COjS7.js.br +0 -0
  187. package/dist/assets/Clusters-DupPMEcC.js.br +0 -0
  188. package/dist/assets/ContributePage-Djbmq1Vo.js.br +0 -0
  189. package/dist/assets/Dashboard-DBNBwc23.js.br +0 -0
  190. package/dist/assets/DashboardFeatureWrapper-DyXk614q.js.br +0 -0
  191. package/dist/assets/DebouncedInput-B13ZAtjv.js.br +0 -0
  192. package/dist/assets/DevConsole-D0t4i5S-.js.br +0 -0
  193. package/dist/assets/DevConsole-Db0OHQUe.js.br +0 -0
  194. package/dist/assets/DeviceCard-B36D69y8.js.br +0 -0
  195. package/dist/assets/DeviceImage-BaY9GEM_.js.br +0 -0
  196. package/dist/assets/DeviceInfo-CxAUAed2.js +0 -26
  197. package/dist/assets/DeviceInfo-CxAUAed2.js.br +0 -0
  198. package/dist/assets/DevicePage-B3GhCr59.js.br +0 -0
  199. package/dist/assets/DevicePicker-DtnyVi9x.js.br +0 -0
  200. package/dist/assets/DeviceSettings-DarE0147.js.br +0 -0
  201. package/dist/assets/DeviceSpecificSettings-vaV9iCz2.js.br +0 -0
  202. package/dist/assets/Devices-CozXzYvi.js.br +0 -0
  203. package/dist/assets/DevicesPage-D_SwLfb4.js +0 -1
  204. package/dist/assets/DevicesPage-D_SwLfb4.js.br +0 -0
  205. package/dist/assets/DisplayValue-BOShM4qX.js.br +0 -0
  206. package/dist/assets/Duration-D2G18Z7O.js.br +0 -0
  207. package/dist/assets/EndpointPicker-dO2wEUZz.js.br +0 -0
  208. package/dist/assets/Exposes-DE5LVq8B.js.br +0 -0
  209. package/dist/assets/Exposes-zfyUGTul.js.br +0 -0
  210. package/dist/assets/FeatureWrapper-CB91Ehj0.js.br +0 -0
  211. package/dist/assets/FrontendSettingsPage-Dvbh-3Uw.js.br +0 -0
  212. package/dist/assets/GroupPage-BQttr84Q.js.br +0 -0
  213. package/dist/assets/GroupSettings-B6qCOX97.js.br +0 -0
  214. package/dist/assets/Groups-C9Yt7LYj.js.br +0 -0
  215. package/dist/assets/GroupsPage-ClaYivbM.js.br +0 -0
  216. package/dist/assets/Health-Bn-05WCA.js +0 -1
  217. package/dist/assets/Health-Bn-05WCA.js.br +0 -0
  218. package/dist/assets/HomePage-CHrzUV0v.js +0 -1
  219. package/dist/assets/HomePage-CHrzUV0v.js.br +0 -0
  220. package/dist/assets/IndeterminateCheckbox-96blLWW6.js.br +0 -0
  221. package/dist/assets/InfoAlert--HGy4oj1.js +0 -1
  222. package/dist/assets/InfoAlert--HGy4oj1.js.br +0 -0
  223. package/dist/assets/InputField-UOrr09c1.js.br +0 -0
  224. package/dist/assets/Json-BKgTLV5A.js.br +0 -0
  225. package/dist/assets/LastSeen-DvkA47I8.js.br +0 -0
  226. package/dist/assets/LogsPage-CTBduvRM.js.br +0 -0
  227. package/dist/assets/Lqi-BhJiQfYf.js +0 -1
  228. package/dist/assets/Lqi-BhJiQfYf.js.br +0 -0
  229. package/dist/assets/NetworkPage-tQfR9U78.js.br +0 -0
  230. package/dist/assets/NumberField-CIZBiWC4.js.br +0 -0
  231. package/dist/assets/OtaControlGroup-CBPplM6s.js.br +0 -0
  232. package/dist/assets/OtaPage-CHApJkUS.js +0 -1
  233. package/dist/assets/OtaPage-CHApJkUS.js.br +0 -0
  234. package/dist/assets/PowerSource-4WrPesie.js.br +0 -0
  235. package/dist/assets/RawNetworkData-CrLGTIIX.js.br +0 -0
  236. package/dist/assets/RawNetworkMap-DyrUxL38.js.br +0 -0
  237. package/dist/assets/RecallRemove-fxh0oICe.js.br +0 -0
  238. package/dist/assets/RemoveDeviceModal-dYZ_jwFH.js.br +0 -0
  239. package/dist/assets/Reporting-BSYKo5QY.js.br +0 -0
  240. package/dist/assets/ReportingPage-1zljNWsD.js.br +0 -0
  241. package/dist/assets/ReportingRow-AavL3hTB.js.br +0 -0
  242. package/dist/assets/Scene-BW7rAKmU.js.br +0 -0
  243. package/dist/assets/SelectField-Cwqszwkn.js.br +0 -0
  244. package/dist/assets/Settings-CBqyihHl.js.br +0 -0
  245. package/dist/assets/SettingsList-DHk8WVBC.js.br +0 -0
  246. package/dist/assets/SettingsPage-B5YfT-EB.js.br +0 -0
  247. package/dist/assets/State-CPkNsvhk.js +0 -1
  248. package/dist/assets/State-CPkNsvhk.js.br +0 -0
  249. package/dist/assets/Table-DTYGOYln.js +0 -1
  250. package/dist/assets/Table-DTYGOYln.js.br +0 -0
  251. package/dist/assets/TextareaField-C0YZrgWz.js.br +0 -0
  252. package/dist/assets/TimeAgo-DDsvNSJm.js.br +0 -0
  253. package/dist/assets/Tools-y-Rx2eWa.js.br +0 -0
  254. package/dist/assets/TouchlinkPage-12UaEF99.js +0 -1
  255. package/dist/assets/TouchlinkPage-12UaEF99.js.br +0 -0
  256. package/dist/assets/VendorLink-DQUmpAAT.js +0 -1
  257. package/dist/assets/VendorLink-DQUmpAAT.js.br +0 -2
  258. package/dist/assets/_createCompounder-mZmklMyi.js.br +0 -0
  259. package/dist/assets/floating-ui.dom-BSrWR8Gl.js +0 -1
  260. package/dist/assets/floating-ui.dom-BSrWR8Gl.js.br +0 -0
  261. package/dist/assets/floating-ui.react-C_yiZGKg.js +0 -1
  262. package/dist/assets/floating-ui.react-C_yiZGKg.js.br +0 -0
  263. package/dist/assets/index-Bcr6d7hQ.js.br +0 -1
  264. package/dist/assets/index-C6OxEdGH.css.br +0 -0
  265. package/dist/assets/index-DgvdHzJO.js +0 -1
  266. package/dist/assets/index-DgvdHzJO.js.br +0 -0
  267. package/dist/assets/index-DlxarZdr.js.br +0 -0
  268. package/dist/assets/isObjectLike-kGVml2Lw.js.br +0 -0
  269. package/dist/assets/jszip.min-bMIagv-O.js.br +0 -0
  270. package/dist/assets/merge-CrPafBdn.js.br +0 -0
  271. package/dist/assets/oui-BSGzCa23.js +0 -1
  272. package/dist/assets/oui-BSGzCa23.js.br +0 -0
  273. package/dist/assets/react-select.esm-DiK6dTG9.js.br +0 -0
  274. package/dist/assets/snakeCase-CyOkORUE.js +0 -1
  275. package/dist/assets/snakeCase-CyOkORUE.js.br +0 -0
  276. package/dist/assets/startCase-Dvtqvsu-.js.br +0 -0
  277. package/dist/assets/useColumnCount-D9MmKKjf.js +0 -1
  278. package/dist/assets/useColumnCount-D9MmKKjf.js.br +0 -0
  279. package/dist/assets/useSearch-xmhhmda2.js.br +0 -0
  280. package/dist/assets/useTable-TipnaiSD.js.br +0 -0
  281. package/dist/onboarding/assets/index-CsqCXLDa.js.br +0 -0
@@ -1 +0,0 @@
1
- import{a as c,u as N,r as n,A as k,s as m,q,j as i,S as z,F as C,v as V,L as y,t as F,w as f,N as D,M as $}from"./index-DlxarZdr.js";import{O as I,A,D as L}from"./oui-BSGzCa23.js";import{D as M}from"./DeviceImage-BaY9GEM_.js";import{T as O}from"./Table-DTYGOYln.js";import{u as T,T as E}from"./useTable-TipnaiSD.js";import{L as R}from"./LastSeen-DvkA47I8.js";import{L as U}from"./Lqi-BhJiQfYf.js";import{M as B,V as G}from"./VendorLink-DQUmpAAT.js";import"./envs-CRUy-_iG.js";import"./RemoveDeviceModal-dYZ_jwFH.js";import"./CheckboxField-DyzOsGYP.js";import"./InputField-UOrr09c1.js";import"./index-Bcr6d7hQ.js";import"./defineProperty-CegpTSss.js";import"./DebouncedInput-B13ZAtjv.js";import"./TimeAgo-DDsvNSJm.js";import"./index-DgvdHzJO.js";import"./DisplayValue-BOShM4qX.js";function de(){const u=c(e=>e.devices),b=c(e=>e.deviceStates),l=c(e=>e.bridgeInfo),g=c(e=>e.availability),{t}=N(["zigbee","common","availability"]),w=n.useMemo(()=>{const e=[];for(let a=0;a<k.length;a++)for(const s of u[a])if(s.type!=="Coordinator"){const r=b[a][s.friendly_name]??{},d=l[a].config.devices[s.ieee_address]?.availability,S=I.get(s.ieee_address.slice(2,8))??"?";let o;s.power_source==="Battery"&&(o=!1,"battery"in r?r.battery<20&&(o=!0):"battery_state"in r?r.battery_state==="low"&&(o=!0):"battery_low"in r&&(o=!!r.battery_low)),e.push({sourceIdx:a,device:s,state:r,availabilityState:g[a][s.friendly_name]?.state??"offline",availabilityEnabledForDevice:d!=null?!!d:void 0,batteryLow:o,oui:S})}return e},[u,b,l,g]),v=n.useCallback(async(e,a,s,r)=>{await m(e,"bridge/request/device/rename",{from:a,to:s,homeassistant_rename:r,last:void 0})},[]),x=n.useCallback(async([e,a])=>{await m(e,"bridge/request/device/configure",{id:a})},[]),_=n.useCallback(async([e,a])=>{await m(e,"bridge/request/device/interview",{id:a})},[]),p=n.useCallback(async(e,a,s,r)=>{await m(e,"bridge/request/device/remove",{id:a,force:s,block:r})},[]),j=n.useMemo(()=>[{id:"source",size:60,header:()=>i.jsx("span",{title:t(e=>e.source,{ns:"common"}),children:i.jsx(C,{icon:V})}),accessorFn:({sourceIdx:e})=>q[e],cell:({row:{original:{sourceIdx:e}}})=>i.jsx(z,{idx:e,nameClassName:"hidden md:inline-block"}),filterFn:"equals",meta:{filterVariant:"select",showFacetedOccurrences:!0}},{id:"friendly_name",size:250,minSize:175,header:t(e=>e.friendly_name,{ns:"common"}),accessorFn:({device:e})=>`${e.friendly_name} ${e.description??""}`,cell:({row:{original:{sourceIdx:e,device:a,state:s}}})=>i.jsxs("div",{className:"flex items-center gap-3",children:[i.jsx("div",{className:"avatar",children:i.jsx("div",{className:"h-11 w-11",style:{overflow:"visible"},children:i.jsx(M,{device:a,otaState:s.update?.state,disabled:a.disabled})})}),i.jsxs("div",{className:"flex-grow flex flex-col min-w-0",children:[i.jsx(y,{to:`/device/${e}/${a.ieee_address}/info`,className:"link link-hover truncate",children:a.friendly_name}),a.description&&i.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:"ieee_address",minSize:175,header:t(e=>e.ieee_address),accessorFn:({device:e})=>`${e.ieee_address} ${F(e.network_address,4)} ${e.network_address}`,cell:({row:{original:{sourceIdx:e,device:a}}})=>i.jsxs(i.Fragment,{children:[i.jsx("div",{children:i.jsx(y,{to:`/device/${e}/${a.ieee_address}/info`,className:"link link-hover",children:a.ieee_address})}),i.jsxs("div",{className:"flex flex-row gap-1",children:[i.jsx("span",{className:"badge badge-ghost badge-sm cursor-default",title:t(s=>s.network_address_hex),children:F(a.network_address,4)}),i.jsx("span",{className:"badge badge-ghost badge-sm cursor-default",title:t(s=>s.network_address_dec),children:a.network_address})]})]}),sortingFn:(e,a)=>e.original.device.ieee_address.localeCompare(a.original.device.ieee_address),filterFn:"includesString",meta:{filterVariant:"text"}},{id:"oui",minSize:125,header:"OUI",accessorFn:({oui:e})=>e,filterFn:"includesString",meta:{filterVariant:"text",textFaceted:!0,showFacetedOccurrences:!0}},{id:"model",minSize:175,header:t(e=>e.model),accessorFn:({device:e})=>`${e.definition?.model??""} ${e.model_id??""} ${e.definition?.vendor??e.manufacturer??""}`,cell:({row:{original:{device:e}}})=>i.jsxs(i.Fragment,{children:[i.jsx(B,{device:e}),i.jsx("div",{className:"flex flex-row gap-1",children:i.jsx("span",{className:"badge badge-ghost badge-sm tooltip tooltip-bottom","data-tip":t(a=>a.manufacturer),children:i.jsx(G,{device:e})})})]}),filterFn:"includesString",meta:{filterVariant:"text",textFaceted:!0,showFacetedOccurrences:!0}},{id:"type",size:100,header:t(e=>e.type),accessorFn:({device:e})=>t(a=>a[e.type]),cell:({row:{original:{device:e}}})=>t(a=>a[e.type]),filterFn:"equals",meta:{filterVariant:"select",showFacetedOccurrences:!0}},{id:"lqi",size:70,header:t(e=>e.lqi),accessorFn:({state:e})=>e.linkquality,cell:({row:{original:{state:e}}})=>i.jsx(U,{value:e.linkquality}),filterFn:"inNumberRange",meta:{filterVariant:"range"}},{id:"last_seen",size:120,header:t(e=>e.last_seen),accessorFn:({sourceIdx:e,state:a})=>{const s=f(a.last_seen,l[e].config.advanced.last_seen);return s?Math.round((Date.now()-s)/1e3/60):void 0},cell:({row:{original:{sourceIdx:e,state:a}}})=>i.jsx(R,{lastSeen:a.last_seen,config:l[e].config.advanced.last_seen,fallback:t(s=>s.disabled,{ns:"common"})}),sortingFn:(e,a)=>{const s=f(e.original.state.last_seen,l[e.original.sourceIdx].config.advanced.last_seen),r=f(a.original.state.last_seen,l[a.original.sourceIdx].config.advanced.last_seen);return s>r?-1:s<r?1:0},enableGlobalFilter:!1,filterFn:"inNumberRange",meta:{filterVariant:"range",tooltip:t(e=>e.last_seen_filter_info,{ns:"common"})}},{id:"availability",size:125,header:t(e=>e.availability,{ns:"availability"}),accessorFn:({sourceIdx:e,availabilityState:a,availabilityEnabledForDevice:s,device:r})=>t(d=>d[r.disabled?"disabled":s??l[e].config.availability.enabled?a:"disabled"],{ns:"availability"}),cell:({row:{original:{sourceIdx:e,device:a,availabilityState:s,availabilityEnabledForDevice:r}}})=>i.jsx(A,{disabled:a.disabled,availability:s,availabilityEnabledForDevice:r,availabilityFeatureEnabled:l[e].config.availability.enabled}),filterFn:"equals",meta:{filterVariant:"select",showFacetedOccurrences:!0}},{id:"power_source",size:100,header:t(e=>e.power_source),accessorFn:({device:e})=>e.power_source,filterFn:"equals",meta:{filterVariant:"select",showFacetedOccurrences:!0}},{id:"battery_level",size:100,header:t(e=>e.battery_level),accessorFn:({state:e})=>e.battery??void 0,cell:({row:{original:{state:e,batteryLow:a}}})=>e.battery==null?"N/A":i.jsxs("span",{className:a?"text-error":void 0,children:[String(e.battery),"%"]}),filterFn:"inNumberRange",meta:{filterVariant:"range"}},{id:"battery_low",size:100,header:t(e=>e.battery_low),accessorFn:({batteryLow:e})=>e,cell:({row:{original:{batteryLow:e}}})=>e===void 0?"N/A":i.jsx("span",{className:e?"text-error":void 0,children:String(e)}),filterFn:"equals",meta:{filterVariant:"boolean"}},{id:"disabled",size:100,header:t(e=>e.disabled,{ns:"common"}),accessorFn:({device:e})=>`${!!e.disabled}`,filterFn:"equals",meta:{filterVariant:"select"}},{id:"actions",minSize:130,cell:({row:{original:{sourceIdx:e,device:a,state:s}}})=>i.jsx(L,{sourceIdx:e,device:a,otaState:s.update?.state,homeassistantEnabled:l[e].config.homeassistant.enabled,renameDevice:v,removeDevice:p,configureDevice:x,interviewDevice:_,btnClassName:"btn-sm"}),enableSorting:!1,enableColumnFilter:!1,enableGlobalFilter:!1}],[l,v,p,x,_,t]),h=T({id:"all-devices",columns:j,data:w,visibleColumns:{source:$,type:!1,power_source:!1,battery_level:!1,battery_low:!1,disabled:!1,oui:!1},sorting:[{id:"friendly_name",desc:!1}]});return i.jsxs(i.Fragment,{children:[i.jsx(D,{children:i.jsx(E,{...h})}),i.jsx("div",{className:"mb-5",children:i.jsx(O,{id:"all-devices",...h})})]})}export{de as default};
Binary file
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{u as k,a as r,D as n,r as N,j as s,L as p,t as _,F as d,a0 as y,dl as F,dm as T,M,S as D,dn as z,v as R}from"./index-DlxarZdr.js";import{u as q,T as A}from"./useTable-TipnaiSD.js";import{D as $}from"./DeviceImage-BaY9GEM_.js";import{I as C}from"./InfoAlert--HGy4oj1.js";import{T as L}from"./Table-DTYGOYln.js";import{D as V}from"./Duration-D2G18Z7O.js";import{T as u}from"./TimeAgo-DDsvNSJm.js";import"./envs-CRUy-_iG.js";import"./DebouncedInput-B13ZAtjv.js";import"./index-Bcr6d7hQ.js";import"./defineProperty-CegpTSss.js";function P({sourceIdx:c}){const{t:a,i18n:m}=k(["health","settings","common","zigbee"]),t=r(n(e=>e.bridgeHealth[c])),o=r(n(e=>e.devices[c])),i=r(n(e=>e.webSocketMetrics[c])),f=r(n(e=>e.readyStates[c])),x=z[f],b=N.useMemo(()=>{const e=[];if(t)for(const l in t.devices){const j=o.find(S=>S.ieee_address===l);j&&e.push({device:j,health:t.devices[l]})}return e},[t,o]),w=N.useMemo(()=>[{id:"friendly_name",minSize:175,header:a(e=>e.friendly_name,{ns:"common"}),accessorFn:({device:e})=>`${e.friendly_name} ${e.description??""}`,cell:({row:{original:{device:e}}})=>s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"avatar",children:s.jsx("div",{className:"h-11 w-11",style:{overflow:"visible"},children:s.jsx($,{device:e,disabled:!1})})}),s.jsxs("div",{className:"flex flex-col min-w-0",children:[s.jsx(p,{to:`/device/${c}/${e.ieee_address}/info`,className:"link link-hover truncate",children:e.friendly_name}),e.friendly_name!==e.ieee_address?e.ieee_address:null]})]}),sortingFn:(e,l)=>e.original.device.friendly_name.localeCompare(l.original.device.friendly_name),filterFn:"includesString",meta:{filterVariant:"text",textFaceted:!0}},{id:"ieee_address",minSize:175,header:a(e=>e.ieee_address,{ns:"zigbee"}),accessorFn:({device:e})=>`${e.ieee_address} ${_(e.network_address,4)} ${e.network_address}`,cell:({row:{original:{device:e}}})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{children:s.jsx(p,{to:`/device/${c}/${e.ieee_address}/info`,className:"link link-hover",children:e.ieee_address})}),s.jsxs("div",{className:"flex flex-row gap-1",children:[s.jsx("span",{className:"badge badge-ghost badge-sm cursor-default",title:a(l=>l.network_address_hex,{ns:"zigbee"}),children:_(e.network_address,4)}),s.jsx("span",{className:"badge badge-ghost badge-sm cursor-default",title:a(l=>l.network_address_dec,{ns:"zigbee"}),children:e.network_address})]})]}),sortingFn:(e,l)=>e.original.device.ieee_address.localeCompare(l.original.device.ieee_address),filterFn:"includesString",meta:{filterVariant:"text"}},{id:"messages",header:a(e=>e.messages),accessorFn:({health:e})=>e.messages,filterFn:"inNumberRange",meta:{filterVariant:"range"}},{id:"messages_per_sec",header:a(e=>e.messages_per_sec),accessorFn:({health:e})=>e.messages_per_sec,cell:({row:{original:{health:e}}})=>s.jsx("span",{className:e.messages_per_sec>1?e.messages_per_sec>3?"text-error":"text-warning":e.messages_per_sec<.2?"text-success":"",children:e.messages_per_sec<=.001?a(l=>l.very_low):e.messages_per_sec}),filterFn:"inNumberRange",meta:{filterVariant:"range"}},{id:"leave_count",header:a(e=>e.leave_count),accessorFn:({health:e})=>e.leave_count,filterFn:"inNumberRange",meta:{filterVariant:"range"}},{id:"network_address_changes",header:a(e=>e.network_address_changes),accessorFn:({health:e})=>e.network_address_changes,filterFn:"inNumberRange",meta:{filterVariant:"range"}}],[c,a]),h=q({id:"health-devices",columns:w,data:b,sorting:[{id:"friendly_name",desc:!1}]});if(t.response_time===0)return s.jsxs("div",{className:"alert alert-info alert-soft",role:"alert",children:[s.jsx(d,{icon:y,size:"2xl"}),a(e=>e.awaiting_next_check)]});const v=new Date(t.response_time),g=new Date(i.lastMessageTs);return s.jsxs(s.Fragment,{children:[s.jsx(C,{children:a(e=>e.interview_info)}),s.jsxs("div",{className:"collapse collapse-arrow bg-base-100 shadow mb-3",children:[s.jsx("input",{type:"checkbox"}),s.jsxs("div",{className:"collapse-title text-lg font-semibold text-center w-full",children:[a(e=>e.os)," / ",a(e=>e.process)," / MQTT"]}),s.jsx("div",{className:"collapse-content",children:s.jsxs("div",{className:"flex flex-col gap-3 items-center mb-2 w-full",children:[s.jsxs("p",{className:"text-sm",title:v.toLocaleString(),children:[a(e=>e.last_check),": ",s.jsx(u,{datetime:v,locale:m.language})]}),s.jsxs("div",{className:"stats stats-vertical lg:stats-horizontal shadow",children:[s.jsx("div",{className:"stat place-items-center",children:s.jsx("div",{className:"stat-value text-xl",children:a(e=>e.os)})}),t.os.load_average.some(e=>e!==0)&&s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.load_average)}),s.jsx("div",{className:"stat-value text-lg",children:t.os.load_average.join(", ")}),s.jsx("div",{className:"stat-desc",children:s.jsx("a",{href:F,target:"_blank",rel:"noreferrer",className:"link link-hover",children:"1min, 5min, 15min"})})]}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.ram_usage)}),s.jsxs("div",{className:"stat-value text-lg",children:[t.os.memory_percent," %"]}),s.jsxs("div",{className:"stat-desc",children:[t.os.memory_used_mb," MB"]})]})]}),s.jsxs("div",{className:"stats stats-vertical lg:stats-horizontal shadow",children:[s.jsx("div",{className:"stat place-items-center",children:s.jsx("div",{className:"stat-value text-xl",children:a(e=>e.process)})}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.uptime)}),s.jsx("div",{className:"stat-value text-lg",children:s.jsx(V,{durationSec:t.process.uptime_sec})})]}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.ram_usage)}),s.jsxs("div",{className:"stat-value text-lg",children:[t.process.memory_percent," %"]}),s.jsxs("div",{className:"stat-desc",children:[t.process.memory_used_mb," MB"]})]})]}),s.jsxs("div",{className:"stats stats-vertical lg:stats-horizontal shadow",children:[s.jsx("div",{className:"stat place-items-center",children:s.jsx("div",{className:"stat-value text-xl",children:a(e=>e.mqtt,{ns:"settings"})})}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-value text-lg",children:s.jsx(d,{icon:T,className:t.mqtt.connected?"text-success":"text-error"})}),s.jsxs("div",{className:"stat-desc",children:[a(e=>e.queued),": ",t.mqtt.queued]})]}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.published)}),s.jsx("div",{className:"stat-value text-lg",children:t.mqtt.published})]}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.received)}),s.jsx("div",{className:"stat-value text-lg",children:t.mqtt.received})]})]})]})})]}),s.jsxs("div",{className:"collapse collapse-arrow bg-base-100 shadow mb-3",children:[s.jsx("input",{type:"checkbox"}),s.jsx("div",{className:"collapse-title text-lg font-semibold text-center w-full",children:"WebSocket"}),s.jsx("div",{className:"collapse-content",children:s.jsxs("div",{className:"flex flex-col gap-3 items-center mb-2 w-full",children:[s.jsxs("div",{className:"stats stats-vertical lg:stats-horizontal shadow",children:[M&&s.jsx("div",{className:"stat place-items-center",children:s.jsx("div",{className:"stat-value text-lg",children:s.jsx(D,{idx:c,alwaysShowName:!0})})}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-value text-lg",children:s.jsx(d,{icon:R,className:x?.[1]})}),s.jsx("div",{className:"stat-desc",children:x?.[0]})]}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.reconnects)}),s.jsx("div",{className:"stat-value text-lg",children:i.reconnects})]}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.pending_requests)}),s.jsx("div",{className:"stat-value text-lg",children:i.pendingRequests})]})]}),s.jsxs("div",{className:"stats stats-vertical lg:stats-horizontal shadow",children:[s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.last_message)}),s.jsx("div",{className:"stat-value text-lg",children:s.jsx(u,{datetime:g,locale:m.language})}),s.jsx("div",{className:"stat-desc",children:g.toLocaleString()})]}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.sent)}),s.jsx("div",{className:"stat-value text-lg",children:i.messagesSent}),s.jsxs("div",{className:"stat-desc",children:[Math.round(i.bytesSent/1024/1024*100)/100," MB"]})]}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsx("div",{className:"stat-title",children:a(e=>e.received)}),s.jsx("div",{className:"stat-value text-lg",children:i.messagesReceived}),s.jsxs("div",{className:"stat-desc",children:[Math.round(i.bytesReceived/1024/1024*100)/100," MB"]})]}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsxs("div",{className:"stat-title",children:[a(e=>e.received),": ",a(e=>e.bridge,{ns:"settings"})]}),s.jsx("div",{className:"stat-value text-lg",children:i.messagesBridge})]}),s.jsxs("div",{className:"stat place-items-center",children:[s.jsxs("div",{className:"stat-title",children:[a(e=>e.received),": ",a(e=>e.devices,{ns:"common"})]}),s.jsx("div",{className:"stat-value text-lg",children:i.messagesDevice})]})]})]})})]}),s.jsx("div",{className:"mb-3",children:s.jsx(A,{...h})}),s.jsx("div",{className:"mb-5",children:s.jsx(L,{id:"health-devices",...h})})]})}export{P as default};
Binary file
@@ -1 +0,0 @@
1
- import{j as e,r as m,u as $,L as A,S as q,s as ne,B as N,a as k,g as oe,t as ce,F as g,f as de,M as me,b as xe,c as fe,d as se,e as be,h as pe,i as he,k as ue,l as je,m as E,H as z,n as te,o as ae,A as ie,R as ve,N as Ne,p as H}from"./index-DlxarZdr.js";import{u as ye,p as ge}from"./useColumnCount-D9MmKKjf.js";import{L as we}from"./LastSeen-DvkA47I8.js";import{L as _e}from"./Lqi-BhJiQfYf.js";import{P as Ee}from"./PowerSource-4WrPesie.js";import{D as ke}from"./DeviceImage-BaY9GEM_.js";import{u as Ce,o as Se,a as $e,s as Ae,b as De,c as Te,d as Re,e as Le,F as Pe,f as ze}from"./floating-ui.react-C_yiZGKg.js";import He from"./Exposes-DE5LVq8B.js";import"./envs-CRUy-_iG.js";import"./TimeAgo-DDsvNSJm.js";import"./index-DgvdHzJO.js";import"./DisplayValue-BOShM4qX.js";import"./snakeCase-CyOkORUE.js";import"./_createCompounder-mZmklMyi.js";import"./isObjectLike-kGVml2Lw.js";import"./index-Bcr6d7hQ.js";import"./defineProperty-CegpTSss.js";import"./floating-ui.dom-BSrWR8Gl.js";import"./startCase-Dvtqvsu-.js";import"./isObject--vsEa_js.js";import"./FeatureWrapper-CB91Ehj0.js";const Ie=m.memo(({sourceIdx:i,device:r,deviceState:l,deviceAvailability:f,lastSeenConfig:c,onClick:a})=>{const{t:p}=$("zigbee"),o=r.description??r.definition?.description;return e.jsxs("article",{className:`mb-2 card h-[95px] bg-base-200 rounded-box shadow-md ${f==="disabled"?"card-dash border-warning/40":f==="offline"?"card-border border-error/50":"card-border border-base-300"} cursor-pointer will-change-transform transition-transform hover:-translate-y-1`,onClick:b=>{b.target.nodeName!=="A"&&a(i,r,b.currentTarget)},children:[e.jsx("div",{className:"card-body p-1",children:e.jsxs("div",{className:"flex flex-row items-center gap-3 w-full",children:[e.jsx("div",{className:"flex-none h-11 w-11 overflow-visible",children:e.jsx(ke,{disabled:r.disabled,device:r,otaState:l.update?.state})}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate",children:e.jsx(A,{to:`/device/${i}/${r.ieee_address}/info`,className:"truncate link link-hover font-semibold",children:r.friendly_name})}),o&&e.jsx("div",{className:"text-xs opacity-50 truncate",title:o,children:o}),e.jsx("div",{className:"text-xs opacity-50",children:e.jsx(we,{lastSeen:l.last_seen,config:c})}),e.jsx("span",{className:"absolute top-2 right-2",children:e.jsx(q,{idx:i,autoHide:!0})})]})]})}),e.jsxs("div",{className:"flex flex-row flex-wrap gap-1 mx-2 mb-2 justify-end items-center",children:[e.jsx("span",{className:"badge badge-soft badge-ghost cursor-default tooltip","data-tip":p(b=>b.lqi),children:e.jsx(_e,{value:l.linkquality})}),e.jsx("span",{className:"badge badge-soft badge-ghost cursor-default tooltip","data-tip":p(b=>b.power),children:e.jsx(Ee,{device:r,batteryPercent:l.battery,batteryState:l.battery_state,batteryLow:l.battery_low,showLevel:!0})})]})]})}),Me=i=>i?.data?e.jsx(Ie,{...i.data}):null,Oe=m.memo(({sourceIdx:i,group:r})=>{const{t:l}=$("zigbee"),f=m.useCallback(async c=>await ne(i,`${r.friendly_name}/set`,{scene_recall:c}),[i,r.friendly_name]);return e.jsx("article",{className:"card bg-base-200 rounded-box shadow-md",children:e.jsxs("div",{className:"card-body p-3",children:[e.jsx("div",{className:"flex flex-row items-center gap-3 w-full",children:e.jsxs("div",{className:"min-w-0",children:[e.jsxs("div",{className:"truncate",children:[l(c=>c.scenes),":"," ",e.jsx(A,{to:`/group/${i}/${r.id}/devices`,className:"link link-hover font-semibold",children:r.friendly_name})]}),e.jsx("span",{className:"absolute top-2 right-2",children:e.jsx(q,{idx:i,autoHide:!0})})]})}),e.jsx("div",{className:"flex flex-row flex-wrap gap-1 justify-around items-center",children:r.scenes.map(c=>e.jsx(N,{className:"btn btn-outline btn-primary btn-sm",onClick:f,item:c.id,children:c.name},c.id))})]})})}),Ge=m.memo(({devices:i,maxRows:r})=>{const{t:l}=$(["common","availability"]),f=k(a=>a.recentActivityFeed),c=m.useMemo(()=>[...new Array(Math.max(0,r-f.length))],[r,f.length]);return e.jsx("section",{className:"card bg-base-100",children:e.jsxs("div",{className:"card-body py-3",children:[e.jsx("h2",{className:"card-title",children:l(a=>a.recent_activity)}),e.jsxs("ul",{className:`grid grid-rows-${r} gap-1 w-full`,children:[f.map((a,p)=>{let o=a.ieeeAddress;return o||(o=i[a.sourceIdx].find(h=>h.friendly_name===a.friendlyName)?.ieee_address),e.jsxs("li",{className:"flex flex-row gap-1 items-center w-full px-1 rounded-field hover:bg-base-200",children:[e.jsxs("div",{className:"text-xs font-semibold opacity-60 min-w-0 flex-1",children:[e.jsx(q,{idx:a.sourceIdx,autoHide:!0,namePostfix:" –",className:"me-1"}),o?e.jsx(A,{to:`/device/${a.sourceIdx}/${o}/info`,className:"link link-hover font-semibold truncate",children:a.friendlyName}):e.jsx("span",{className:"font-semibold truncate",children:a.friendlyName}),e.jsxs("span",{className:"text-xs text-base-content/60 truncate",children:["— ",a.activity]})]}),e.jsx("div",{children:e.jsx("p",{className:"text-xs text-base-content/60",children:a.time})})]},`${a.friendlyName}-${a.sourceIdx}-${a.activity}-${a.time}-${p}`)}),c.map((a,p)=>e.jsx("li",{className:"flex flex-row gap-3 items-center",children:e.jsx("div",{className:"w-full font-semibold text-xs text-base-content/0",children:"-"})},`placeholder-${p}`))]})]})})}),Ye=m.memo(({selection:{anchor:i,sourceIdx:r,device:l},onClose:f})=>{const{t:c}=$("zigbee"),a=m.useRef(null),{refs:p,floatingStyles:o,context:b}=Ce({elements:{reference:i},open:!0,onOpenChange:s=>{s||f()},middleware:[Se(4),$e({padding:16,crossAxis:!0}),Ae({padding:16,crossAxis:!0}),De({element:a})]}),h=Te(b),C=Re(b,{outsidePress:!0,escapeKey:!0}),{getFloatingProps:u}=Le([h,C]),x=m.useMemo(()=>oe(l),[l]),n=m.useCallback(async s=>await ne(r,`${l.friendly_name}/set`,{scene_recall:s}),[r,l.friendly_name]),v=l.description??l.definition?.description;return e.jsx(Pe,{children:e.jsxs("aside",{ref:p.setFloating,style:o,...u({className:"card bg-base-200 shadow-lg border border-base-300 w-[min(32rem,calc(100vw-2.5rem))] max-h-[90vh] z-11"}),children:[e.jsxs("div",{className:"card-body p-3 gap-2 w-full h-full overflow-hidden",children:[e.jsxs("header",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx(A,{to:`/device/${r}/${l.ieee_address}/info`,className:"truncate link link-hover font-semibold text-lg",children:l.friendly_name}),e.jsx("p",{className:"truncate text-sm opacity-60",children:v}),e.jsx("span",{className:"badge cursor-default tooltip tooltip-bottom","data-tip":c(s=>s.ieee_address),children:l.ieee_address}),e.jsx("span",{className:"badge cursor-default tooltip tooltip-bottom","data-tip":c(s=>s.network_address_hex),children:ce(l.network_address,4)}),e.jsx("span",{className:"badge cursor-default tooltip tooltip-bottom","data-tip":c(s=>s.network_address_dec),children:l.network_address})]}),e.jsx(N,{onClick:f,className:"btn btn-ghost btn-square",children:e.jsx(g,{icon:de})})]}),x.length>0&&e.jsxs("div",{className:"flex flex-row flex-wrap items-center gap-2",children:[c(s=>s.scenes),":",x.map(s=>e.jsx(N,{className:"btn btn-outline btn-primary btn-sm",onClick:n,item:s.id,children:s.name},s.id))]}),e.jsx("div",{className:"w-full h-full overflow-y-auto rounded-box",style:{scrollbarWidth:"thin"},children:e.jsx(He,{sourceIdx:r,device:l})})]}),e.jsx(ze,{ref:a,context:b,className:"fill-base-200 [&>path:first-of-type]:stroke-base-300 [&>path:last-of-type]:stroke-base-300"})]})})});var j=(i=>(i[i.Availability=0]="Availability",i[i.Type=1]="Type",i[i.Lqi=2]="Lqi",i[i.Disabled=3]="Disabled",i))(j||{});const le=[j.Disabled,!0],I=[j.Availability,"offline"],M=[j.Type,"Router"],O=[j.Type,"EndDevice"],G=[j.Type,"GreenPower"],Y=[j.Lqi,50],qe=m.memo(({totalDevices:i,onlineDevices:r,maybeOnlineDevices:l,disabledDevices:f,anyAvailabilityEnabled:c,totalInstances:a,onlineInstances:p,routers:o,endDevices:b,gpDevices:h,lowLqiDevices:C,setQuickFilter:u,quickFilter:x})=>{const{t:n}=$(["common","availability","zigbee","settings"]),v=m.useCallback(s=>{s[0]===j.Type?u(x?.[0]===s[0]&&x?.[1]===s[1]?null:s):u(x?.[0]===s[0]?null:s)},[u,x]);return e.jsx("section",{className:"card bg-base-100 w-full",children:e.jsxs("div",{className:"card-body py-3",children:[e.jsx("h2",{className:"card-title",children:n(s=>s.overview)}),e.jsxs("div",{className:"flex flex-row flex-wrap justify-center gap-y-3",children:[me?e.jsxs("div",{className:"flex flex-row w-48 px-3 py-1 gap-4 justify-center justify-center border-dashed border-s border-e border-current/25",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-base-content/70",children:n(s=>s.instances)}),e.jsxs("div",{className:`font-semibold text-xl ${p===a?"":"text-error"}`,children:[p," / ",a]}),a>0&&e.jsxs("div",{className:"text-xs text-base-content/50",children:[Math.round(p/a*100),"% ",n(s=>s.online,{ns:"availability"})]})]}),e.jsx("div",{className:"self-center",children:e.jsx(A,{to:"/settings/0/health",className:"link text-primary tooltip tooltip-bottom","data-tip":n(s=>s.health,{ns:"settings"}),children:e.jsx(g,{icon:xe,size:"xl"})})})]}):null,e.jsxs("div",{className:"flex flex-row w-48 px-3 py-1 gap-4 justify-center border-dashed border-s border-e border-current/25",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-base-content/70",children:n(s=>s.devices)}),e.jsx("div",{className:"font-semibold text-xl",children:i}),f>0&&e.jsxs("span",{className:"text-sm text-xs text-base-content/50",children:["+",f," ",n(s=>s.disabled)]})]}),e.jsx("div",{className:"self-center",children:e.jsx(N,{className:`link tooltip tooltip-bottom ${x?.[0]===le[0]?"text-accent/80":"text-primary/80"}`,"data-tip":`${n(s=>s.quick_search)}: ${n(s=>s.disabled,{ns:"common"})}`,onClick:v,item:le,children:e.jsx(g,{icon:fe,size:"xl"})})})]}),c?e.jsxs("div",{className:"flex flex-row w-48 px-3 py-1 gap-4 justify-center border-dashed border-s border-e border-current/25",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-base-content/70",children:n(s=>s.online,{ns:"availability"})}),e.jsx("div",{className:"font-semibold text-xl",children:e.jsx("span",{className:r===i?void 0:"text-error",children:r})}),l>0&&f>0&&e.jsxs("span",{className:"text-sm text-xs text-base-content/50",children:["+",l," ",n(s=>s.unknown,{ns:"zigbee"})]})]}),e.jsx("div",{className:"self-center",children:e.jsx(N,{className:`link tooltip tooltip-bottom ${x?.[0]===I[0]?"text-accent":"text-primary"}`,"data-tip":`${n(s=>s.quick_search)}: ${n(s=>s.offline,{ns:"availability"})}`,onClick:v,item:I,children:e.jsxs("span",{className:"fa-layers fa-xl",children:[e.jsx(g,{icon:se,className:`${x?.[0]===I[0]?"text-accent/70":"text-primary/70"}`}),e.jsx(g,{icon:be,transform:"shrink-5 down-2 right-1"})]})})})]}):null,e.jsxs("div",{className:"flex flex-row w-48 px-3 py-1 gap-4 justify-center border-dashed border-s border-e border-current/25",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-base-content/70",children:n(s=>s.Router,{ns:"zigbee"})}),e.jsx("div",{className:"font-semibold text-xl",children:o})]}),e.jsx("div",{className:"self-center",children:e.jsx(N,{className:`link tooltip tooltip-bottom ${x?.[0]===M[0]&&x[1]===M[1]?"text-accent/80":"text-primary/80"}`,"data-tip":`${n(s=>s.quick_search)}: ${n(s=>s.Router,{ns:"zigbee"})}`,onClick:v,item:M,children:e.jsx(g,{icon:pe,size:"xl"})})})]}),e.jsxs("div",{className:"flex flex-row w-48 px-3 py-1 gap-4 justify-center border-dashed border-s border-e border-current/25",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-base-content/70",children:n(s=>s.EndDevice,{ns:"zigbee"})}),e.jsx("div",{className:"font-semibold text-xl",children:b})]}),e.jsx("div",{className:"self-center",children:e.jsx(N,{className:`link tooltip tooltip-bottom ${x?.[0]===O[0]&&x[1]===O[1]?"text-accent/80":"text-primary/80"}`,"data-tip":`${n(s=>s.quick_search)}: ${n(s=>s.EndDevice,{ns:"zigbee"})}`,onClick:v,item:O,children:e.jsx(g,{icon:he,size:"xl"})})})]}),h>0&&e.jsxs("div",{className:"flex flex-row w-48 px-3 py-1 gap-4 justify-center border-dashed border-s border-e border-current/25",children:[e.jsx("div",{children:e.jsxs("div",{className:"text-sm text-base-content/70",children:[n(s=>s.Router,{ns:"zigbee"})," - ",n(s=>s.GreenPower,{ns:"zigbee"})]})}),e.jsx("div",{className:"font-semibold text-xl",children:h}),e.jsx("div",{className:"self-center",children:e.jsx(N,{className:`link tooltip tooltip-bottom ${x?.[0]===G[0]&&x[1]===G[1]?"text-accent":"text-primary"}`,"data-tip":`${n(s=>s.quick_search)}: ${n(s=>s.GreenPower,{ns:"zigbee"})}`,onClick:v,item:G,children:e.jsx(g,{icon:ue,size:"xl"})})})]}),C>0&&e.jsxs("div",{className:"flex flex-row w-48 px-3 py-1 gap-4 justify-center border-dashed border-s border-e border-current/25",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm text-base-content/70",children:n(s=>s.low_lqi,{ns:"zigbee"})}),e.jsx("div",{className:"font-semibold text-xl text-error",children:C}),e.jsx("div",{className:"text-xs text-base-content/50",children:"< 50"})]}),e.jsx("div",{className:"self-center",children:e.jsx(N,{className:`link tooltip tooltip-bottom ${x?.[0]===Y[0]?"text-accent":"text-primary"}`,"data-tip":`${n(s=>s.quick_search)}: ${n(s=>s.low_lqi,{ns:"zigbee"})}`,onClick:v,item:Y,children:e.jsxs("span",{className:"fa-layers fa-xl",children:[e.jsx(g,{icon:se,className:`${x?.[0]===Y[0]?"text-accent/70":"text-primary/70"}`}),e.jsx(g,{icon:je,transform:"shrink-4 down-2"})]})})})]})]})]})})});function xs(){const i=k(t=>t.readyStates),r=k(t=>t.groups),l=k(t=>t.devices),f=k(t=>t.deviceStates),c=k(t=>t.availability),a=k(t=>t.bridgeInfo),p=ye(),[o,b]=m.useState(E.get(z,null)),[h,C]=m.useState(E.get(te,!0)),[u,x]=m.useState(E.get(ae,!0)),[n,v]=m.useState(void 0);m.useEffect(()=>{o==null?E.remove(z):E.set(z,o)},[o]),m.useEffect(()=>{E.set(te,h)},[h]),m.useEffect(()=>{E.set(ae,u)},[u]);const s=m.useCallback((t,y,w)=>{v(D=>D?.device.ieee_address===y.ieee_address?void 0:{anchor:w,sourceIdx:t,device:y})},[]),R=m.useMemo(()=>{const t=[];let y=0,w=0,D=0,W=0,K=0,U=0,V=0,J=0,X=0,Z=0,F=0;for(let d=0;d<ie.length;d++){K+=1,i[d]===WebSocket.OPEN&&(U+=1);const L=a[d].config.advanced.last_seen,Q=a[d].config.availability.enabled;Q&&(F+=1);for(const _ of l[d]){if(_.type==="Coordinator")continue;switch(_.type){case"Router":V+=1;break;case"EndDevice":J+=1;break;case"GreenPower":X+=1;break}const P=f[d][_.friendly_name]??{};let T="disabled";if(_.disabled)W+=1;else{y+=1;const ee=a[d].config.devices[_.ieee_address]?.availability;T=(ee!=null?!!ee:void 0)??Q?c[d][_.friendly_name]?.state??"offline":"disabled",T==="online"?w+=1:T==="disabled"&&(w+=1,D+=1)}typeof P.linkquality=="number"&&P.linkquality<50&&(Z+=1),t.push({sourceIdx:d,device:_,deviceState:P,deviceAvailability:T,lastSeenConfig:L,onClick:s})}}t.sort((d,L)=>d.device.friendly_name.localeCompare(L.device.friendly_name));let S=[];if(o!=null)switch(o[0]){case j.Disabled:{S=t.filter(d=>d.device.disabled===o[1]);break}case j.Availability:{S=t.filter(d=>d.deviceAvailability===o[1]);break}case j.Type:{S=t.filter(d=>d.device.type===o[1]);break}case j.Lqi:{S=t.filter(d=>typeof d.deviceState.linkquality=="number"&&d.deviceState.linkquality<o[1]);break}}else S=t;return{counters:{totalDevices:y,onlineDevices:w,maybeOnlineDevices:D,disabledDevices:W,anyAvailabilityEnabled:F>0,totalInstances:K,onlineInstances:U,routers:V,endDevices:J,gpDevices:X,lowLqiDevices:Z},deviceData:t,filteredDeviceData:S}},[l,f,a,c,i,o,s]),B=m.useMemo(()=>{const t=[];if(!u)return t;for(let y=0;y<ie.length;y++)for(const w of r[y])w.scenes.length!==0&&t.push({sourceIdx:y,group:w});return t},[u,r]),re=Math.min(ve,R.counters.totalDevices);return e.jsxs(e.Fragment,{children:[e.jsxs(Ne,{children:[e.jsxs("span",{className:"text-sm",children:[H(t=>t.show),": "]}),e.jsx(N,{className:`btn btn-outline btn-sm ${h?"btn-active":""}`,onClick:C,item:!h,children:H(t=>t.recent_activity)}),e.jsx(N,{className:`btn btn-outline btn-sm ${u?"btn-active":""}`,onClick:x,item:!u,children:H(t=>t.group_scenes)})]}),e.jsxs("div",{className:"flex flex-col mb-5",children:[e.jsx(qe,{...R.counters,setQuickFilter:b,quickFilter:o}),h&&e.jsx(Ge,{devices:l,maxRows:re}),e.jsx("div",{className:"divider m-0 mb-1"}),B.length>0&&e.jsx("section",{className:"mb-4 flex flex-row flex-wrap justify-center gap-2",children:B.map(t=>e.jsx(Oe,{...t},t.group.id))}),e.jsx(ge,{useWindowScroll:!0,columnCount:p,data:R.filteredDeviceData,ItemContent:Me,className:"gap-2 select-none"},`device-tiles-${o?.[0]}-${o?.[1]}`),n&&e.jsx(Ye,{selection:n,onClose:()=>v(void 0)})]})]})}export{xs as default};
Binary file
@@ -1 +0,0 @@
1
- import{m as e,ay as t,j as o,F as a,a0 as r}from"./index-DlxarZdr.js";function i({children:s}){return e.get(t,!1)?null:o.jsxs("div",{className:"alert alert-info alert-soft mb-2",role:"alert",children:[o.jsx(a,{icon:r,size:"2xl"}),s]})}export{i as I};
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{r as a,j as s,F as m}from"./index-DlxarZdr.js";import{b as n}from"./index-DgvdHzJO.js";import{D as e}from"./DisplayValue-BOShM4qX.js";const x=a.memo(({value:o})=>{const[t,r]=n(o);return s.jsxs(s.Fragment,{children:[s.jsx(m,{icon:t,className:r})," ",s.jsx(e,{value:o,name:"linkquality"})]})});export{x as L};
Binary file
@@ -1 +0,0 @@
1
- import{r as l,u as O,ad as L,j as s,F as N,ae as P,B as q,f as M,af as U,a as I,A as E,s as F,q as B,S as G,v as H,L as D,t as T,N as K,a5 as $,M as J}from"./index-DlxarZdr.js";import{D as Q}from"./DeviceImage-BaY9GEM_.js";import{I as W}from"./IndeterminateCheckbox-96blLWW6.js";import{O as w,a as X,f as V,b as Y}from"./OtaControlGroup-CBPplM6s.js";import{u as Z,g as ee,d as se,c as te,e as ae,F as ie,f as ne,o as re,a as le,s as oe,b as ce}from"./floating-ui.react-C_yiZGKg.js";import{C as de}from"./CheckboxField-DyzOsGYP.js";import{D as me}from"./Duration-D2G18Z7O.js";import{T as ue}from"./Table-DTYGOYln.js";import{u as fe,T as pe}from"./useTable-TipnaiSD.js";import{M as he,V as ge}from"./VendorLink-DQUmpAAT.js";import{P as be}from"./PowerSource-4WrPesie.js";import"./envs-CRUy-_iG.js";import"./index-Bcr6d7hQ.js";import"./defineProperty-CegpTSss.js";import"./InputField-UOrr09c1.js";import"./SelectField-Cwqszwkn.js";import"./floating-ui.dom-BSrWR8Gl.js";import"./DebouncedInput-B13ZAtjv.js";import"./snakeCase-CyOkORUE.js";import"./_createCompounder-mZmklMyi.js";import"./isObjectLike-kGVml2Lw.js";const xe=l.memo(({sourceIdx:d,device:o,state:i,otaSettings:a,onUpdateClick:m,onScheduleClick:x})=>{const{t:h}=O(["ota","common"]),f=o.interview_state===L.InProgress||o.interview_state===L.Pending||i.state==="updating",[_,y]=l.useState(!1),[u,j]=l.useState({}),v=l.useRef(null),[C,g]=l.useState(!1),{refs:k,floatingStyles:S,context:b}=Z({open:C,onOpenChange:g,middleware:[re(4),le({padding:16,crossAxis:!0}),oe({padding:16,crossAxis:!0}),ce({element:v})]}),e=ee(b,{event:"click"}),t=se(b),n=te(b),{getReferenceProps:r,getFloatingProps:p}=ae([e,t,n]),R=l.useCallback(async c=>{if(i.latest_version&&i.installed_version&&i.latest_source){g(!1);const A=i.latest_version<i.installed_version;switch(c){case"update":{const z={sourceIdx:d,ieee:o.ieee_address,downgrade:A,url:i.latest_source};u.image_block_request_timeout&&(z.image_block_request_timeout=u.image_block_request_timeout),u.image_block_response_delay&&(z.image_block_response_delay=u.image_block_response_delay),u.default_maximum_data_size&&(z.default_maximum_data_size=u.default_maximum_data_size),await m(z);break}case"schedule":{await x({sourceIdx:d,ieee:o.ieee_address,downgrade:A,url:i.latest_source});break}}}},[d,o.ieee_address,u,i,m,x]);return s.jsxs(s.Fragment,{children:[s.jsx("button",{ref:k.setReference,type:"button",className:`btn btn-sm btn-square btn-outline ${i.latest_version>i.installed_version?"btn-accent":"btn-error"} join-item tooltip tooltip-top`,...r(),"data-tip":h(c=>c.update),disabled:f,children:s.jsx(N,{icon:P})}),C?s.jsx(ie,{children:s.jsxs("aside",{ref:k.setFloating,style:S,...p({className:"card bg-base-200 shadow-lg border border-base-300 w-[min(32rem,calc(100vw-2.5rem))] max-h-[90vh] z-11"}),children:[s.jsxs("div",{className:"card-body py-2 w-full h-full overflow-hidden",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsxs("h4",{className:"card-title",children:["OTA: ",o.friendly_name]}),s.jsx(q,{onClick:()=>g(!1),className:"btn btn-ghost btn-square",children:s.jsx(N,{icon:M})})]}),s.jsxs("div",{className:"flex flex-col gap-2 w-full h-full overflow-y-auto",children:[s.jsxs("div",{className:"flex flex-col w-full gap-2",children:[s.jsx("ul",{className:"steps steps-horizontal w-full mb-2",children:i.latest_version>i.installed_version?s.jsxs(s.Fragment,{children:[s.jsx("li",{className:"step step-neutral","data-content":"●",children:s.jsx(w,{version:i.installed_version,showRaw:!0})}),s.jsx("li",{className:"step step-accent","data-content":"★",children:s.jsx(w,{version:i.latest_version,showRaw:!0})})]}):s.jsxs(s.Fragment,{children:[s.jsx("li",{className:"step step-error","data-content":"★",children:s.jsx(w,{version:i.latest_version,showRaw:!0})}),s.jsx("li",{className:"step step-neutral","data-content":"●",children:s.jsx(w,{version:i.installed_version,showRaw:!0})})]})}),s.jsxs("p",{children:[h(c=>c.source),": "]}),s.jsx("div",{className:"wrap-anywhere",children:s.jsx("p",{className:"text-base-content/65",children:i.latest_source})}),s.jsxs("p",{children:[h(c=>c.release_notes),": "]}),s.jsx("div",{className:"wrap-anywhere",children:s.jsx("p",{className:"text-base-content/65",children:i.latest_release_notes??"N/A"})})]}),s.jsx(de,{name:"show_update_settings",label:h(c=>c.show_update_settings),checked:_,onChange:c=>y(c.target.checked)}),_?s.jsx(X,{settings:u,setSettings:j,defaultSettings:a}):null]}),s.jsxs("div",{className:"card-actions justify-end py-2",children:[s.jsx(q,{className:"btn btn-square btn-outline btn-error join-item",onClick:R,item:"update",title:h(c=>c.update),children:s.jsx(N,{icon:P})}),s.jsx(q,{className:"btn btn-square btn-outline btn-info join-item",onClick:R,item:"schedule",title:h(c=>c.schedule),children:s.jsx(N,{icon:U})})]})]}),s.jsx(ne,{ref:v,context:b,className:"fill-base-200 [&>path:first-of-type]:stroke-base-300 [&>path:last-of-type]:stroke-base-300"})]})}):null]})}),_e=({label:d,remaining:o,progress:i})=>o&&o>0?s.jsxs(s.Fragment,{children:[s.jsx("progress",{className:"progress",value:i,max:"100"}),s.jsxs("div",{children:[d," ",s.jsx(me,{durationSec:o})]})]}):s.jsx("progress",{className:"progress",value:i,max:"100"}),we=l.memo(({device:d})=>{const{t:o}=O("zigbee");let i="https://github.com/Koenkk/zigbee-OTA/releases";const a=d.software_build_id||o(m=>m.unknown);switch(d?.definition?.vendor){case"IKEA":i="https://ww8.ikea.com/ikeahomesmart/releasenotes/releasenotes.html";break;case"Inovelli":i="https://help.inovelli.com/en/articles/8503774-what-is-the-latest-firmware-version-for-your-device#h_b74c1e7dc6";break;case"Philips":i=`https://www.philips-hue.com/en-us/support/release-notes/${d.definition?.exposes.find(m=>m.type==="light")?"lamps":"accessories"}`;break;case"Ubisys":i=`https://www.ubisys.de/en/support/firmware/change-logs-${d.definition?.model?.replace(/[-]/g,"").toLowerCase()}/`;break}return s.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:i,className:"link link-hover",children:a})});function Ue(){const d=I(e=>e.devices),o=I(e=>e.deviceStates),i=I(e=>e.bridgeInfo),{t:a}=O(["ota","zigbee","common"]),[m,x]=l.useState({});l.useEffect(()=>{x({})},[d]);const h=l.useMemo(()=>{const e=[];for(let t=0;t<E.length;t++){const n=i[t].config.ota;for(const r of d[t])if(r.definition?.supports_ota&&!r.disabled){const p=o[t][r.friendly_name]??{};e.push({sourceIdx:t,device:r,state:p.update,batteryState:r.power_source==="Battery"?{batteryPercent:p.battery,batteryState:p.battery_state,batteryLow:p.battery_low}:void 0,otaSettings:n})}}return e},[o,d,i]),f=l.useMemo(()=>Object.keys(m).length,[m]),_=l.useCallback(async e=>{const t=[];for(const n of g.getFilteredRowModel().rows)if(n.getIsSelected()){const{sourceIdx:r,device:p}=n.original;t.push(F(r,e,{id:p.ieee_address}))}x({}),t.length>0&&await Promise.allSettled(t)},[]),y=l.useCallback(async({sourceIdx:e,ieee:t,downgrade:n,...r})=>await F(e,n?"bridge/request/device/ota_update/check/downgrade":"bridge/request/device/ota_update/check",{id:t,...r}),[]),u=l.useCallback(async({sourceIdx:e,ieee:t,downgrade:n,...r})=>await F(e,n?"bridge/request/device/ota_update/update/downgrade":"bridge/request/device/ota_update/update",{id:t,...r}),[]),j=l.useCallback(async({sourceIdx:e,ieee:t,downgrade:n,...r})=>await F(e,n?"bridge/request/device/ota_update/schedule/downgrade":"bridge/request/device/ota_update/schedule",{id:t,...r}),[]),v=l.useCallback(async({sourceIdx:e,ieee:t})=>await F(e,"bridge/request/device/ota_update/unschedule",{id:t}),[]),C=l.useMemo(()=>[{id:"select",size:45,header:({table:e})=>s.jsx(W,{checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),accessorFn:()=>"",cell:({row:e})=>s.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:()=>s.jsx("span",{title:a(e=>e.source,{ns:"common"}),children:s.jsx(N,{icon:H})}),accessorFn:({sourceIdx:e})=>B[e],cell:({row:{original:{sourceIdx:e}}})=>s.jsx(G,{idx:e,nameClassName:"hidden md:inline-block"}),filterFn:"equals",meta:{filterVariant:"select",showFacetedOccurrences:!0}},{id:"friendly_name",size:250,minSize:175,header:a(e=>e.friendly_name,{ns:"common"}),accessorFn:({device:e})=>`${e.friendly_name} ${e.description??""} ${e.ieee_address}`,cell:({row:{original:{sourceIdx:e,device:t,state:n,batteryState:r}}})=>s.jsxs("div",{className:"flex items-center gap-3",children:[s.jsx("div",{className:"avatar",children:s.jsx("div",{className:"h-11 w-11",style:{overflow:"visible"},children:s.jsx(Q,{device:t,otaState:n?.state,disabled:!1})})}),s.jsxs("div",{className:"flex-grow flex flex-col min-w-0",children:[s.jsx(D,{to:`/device/${e}/${t.ieee_address}/info`,className:"link link-hover truncate",children:t.friendly_name}),t.description&&s.jsx("div",{className:"max-w-3xs text-xs opacity-50 truncate",title:t.description,children:t.description}),s.jsx("div",{className:"flex flex-row gap-1 mt-0.5 items-center",children:r&&s.jsx("span",{className:"badge badge-sm badge-soft badge-ghost cursor-default",children:s.jsx(be,{device:t,...r,showLevel:!0})})})]})]}),sortingFn:(e,t)=>e.original.device.friendly_name.localeCompare(t.original.device.friendly_name),filterFn:"includesString",meta:{filterVariant:"text",textFaceted:!0}},{id:"ieee_address",minSize:175,header:a(e=>e.ieee_address,{ns:"zigbee"}),accessorFn:({device:e})=>`${e.ieee_address} ${T(e.network_address,4)} ${e.network_address}`,cell:({row:{original:{sourceIdx:e,device:t}}})=>s.jsxs(s.Fragment,{children:[s.jsx("div",{children:s.jsx(D,{to:`/device/${e}/${t.ieee_address}/info`,className:"link link-hover",children:t.ieee_address})}),s.jsxs("div",{className:"flex flex-row gap-1",children:[s.jsx("span",{className:"badge badge-ghost badge-sm cursor-default",title:a(n=>n.network_address_hex,{ns:"zigbee"}),children:T(t.network_address,4)}),s.jsx("span",{className:"badge badge-ghost badge-sm cursor-default",title:a(n=>n.network_address_dec,{ns:"zigbee"}),children:t.network_address})]})]}),sortingFn:(e,t)=>e.original.device.ieee_address.localeCompare(t.original.device.ieee_address),filterFn:"includesString",meta:{filterVariant:"text"}},{id:"model",minSize:175,header:a(e=>e.model,{ns:"zigbee"}),accessorFn:({device:e})=>`${e.definition?.model??""} ${e.model_id??""} ${e.definition?.vendor??e.manufacturer??""}`,cell:({row:{original:{device:e}}})=>s.jsxs(s.Fragment,{children:[s.jsx(he,{device:e}),s.jsx("div",{children:s.jsx("span",{className:"badge badge-sm badge-ghost tooltip tooltip-bottom","data-tip":a(t=>t.manufacturer,{ns:"zigbee"}),children:s.jsx(ge,{device:e})})})]}),filterFn:"includesString",meta:{filterVariant:"text",textFaceted:!0,showFacetedOccurrences:!0}},{id:"firmware_id",minSize:175,header:a(e=>e.firmware_id,{ns:"zigbee"}),accessorFn:({device:e})=>`${e.software_build_id??""} ${e.date_code??""}`,cell:({row:{original:{device:e}}})=>s.jsxs(s.Fragment,{children:[s.jsx(we,{device:e}),e.date_code&&s.jsx("div",{children:s.jsx("span",{className:"badge badge-sm badge-ghost tooltip tooltip-bottom","data-tip":a(t=>t.firmware_build_date,{ns:"zigbee"}),children:e.date_code})})]}),filterFn:"includesString",meta:{filterVariant:"text"}},{id:"firmware_version",minSize:175,header:a(e=>e.firmware_version),accessorFn:({state:e})=>V(e?.installed_version)?.join(" "),cell:({row:{original:{state:e}}})=>s.jsx(w,{version:e?.installed_version}),filterFn:"includesString",meta:{filterVariant:"text"}},{id:"available_firmware_version",minSize:175,header:a(e=>e.available_firmware_version),accessorFn:({state:e})=>V(e?.latest_version)?.join(" "),cell:({row:{original:{state:e}}})=>s.jsx(w,{version:e?.latest_version}),filterFn:"includesString",meta:{filterVariant:"text"}},{id:"state",header:a(e=>e.state,{ns:"common"}),accessorFn:({state:e})=>e?.state?a(t=>t[e.state]):a(t=>t.unknown,{ns:"zigbee"}),filterFn:"equals",meta:{filterVariant:"select"}},{id:"actions",header:"",minSize:130,accessorFn:({state:e})=>e?.state,cell:({row:{original:{sourceIdx:e,device:t,state:n,otaSettings:r}}})=>n?.state==="updating"?s.jsx(_e,{label:a(p=>p.remaining_time),remaining:n.remaining,progress:n.progress}):s.jsxs("div",{className:"join join-horizontal",children:[s.jsx(Y,{sourceIdx:e,device:t,state:n,otaSettings:r,onCheckClick:y,onUpdateClick:u,onScheduleClick:j,onUnscheduleClick:v}),n?.state==="available"?s.jsx(xe,{sourceIdx:e,device:t,state:n,otaSettings:r,onUpdateClick:u,onScheduleClick:j}):null]}),enableSorting:!1,enableColumnFilter:!1,enableGlobalFilter:!1}],[y,u,j,v,a]),{table:g,resetFilters:k,globalFilter:S,columnFilters:b}=fe({id:"ota-devices",columns:C,data:h,visibleColumns:{source:J,state:!1},sorting:[{id:"friendly_name",desc:!1}],rowSelection:m,onRowSelectionChange:x});return l.useEffect(()=>{const e=new Set;for(const r of g.getFilteredRowModel().rows)e.add(r.id);let t=!1;const n={};for(const r in m)e.has(r)?n[r]=!0:t=!0;t&&x(n)},[g,m,h,S,b]),s.jsxs(s.Fragment,{children:[s.jsx(K,{children:s.jsx(pe,{table:g,resetFilters:k,globalFilter:S,columnFilters:b})}),s.jsxs("div",{className:"mb-5",children:[s.jsxs("div",{className:"flex flex-row flex-wrap gap-2 px-2 pb-3",children:[s.jsx($,{className:"btn btn-outline btn-error btn-sm",item:"bridge/request/device/ota_update/check",onClick:_,title:a(e=>e.check_selected),modalDescription:a(e=>e.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:a(e=>e.cancel,{ns:"common"}),disabled:f===0,children:`${a(e=>e.check_selected)} (${f})`}),s.jsx($,{className:"btn btn-outline btn-error btn-sm",item:"bridge/request/device/ota_update/update",onClick:_,title:a(e=>e.update_selected),modalDescription:a(e=>e.update_selected_info),modalCancelLabel:a(e=>e.cancel,{ns:"common"}),disabled:f===0,children:`${a(e=>e.update_selected)} (${f})`}),s.jsx($,{className:"btn btn-outline btn-error btn-sm",item:"bridge/request/device/ota_update/schedule",onClick:_,title:a(e=>e.schedule_selected),modalDescription:a(e=>e.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:a(e=>e.cancel,{ns:"common"}),disabled:f===0,children:`${a(e=>e.schedule_selected)} (${f})`}),s.jsx($,{className:"btn btn-outline btn-error btn-sm",item:"bridge/request/device/ota_update/unschedule",onClick:_,title:a(e=>e.unschedule_selected),modalDescription:a(e=>e.dialog_confirmation_prompt,{ns:"common"}),modalCancelLabel:a(e=>e.cancel,{ns:"common"}),disabled:f===0,children:`${a(e=>e.unschedule_selected)} (${f})`})]}),s.jsx(ue,{id:"ota-devices",table:g,resetFilters:k,globalFilter:S,columnFilters:b})]})]})}export{Ue as default};
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{a,D as r,j as i}from"./index-DlxarZdr.js";import{J as p}from"./Json-BKgTLV5A.js";import"./envs-CRUy-_iG.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 +0,0 @@
1
- import{bc as k,j as O,r as ht,db as en,u as tn}from"./index-DlxarZdr.js";import{f as To}from"./useTable-TipnaiSD.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,u=>{const d=o;o=o|s,t[l]=u,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:un(),singleton:o}}const un=()=>Symbol();function an(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(u=>o(u)));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,u=>{o[l]=u,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 u=l[0].target;u.offsetParent!==null&&e(u)};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,u){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,a=l?l.offsetHeight:v?b.innerHeight:g.offsetHeight;n({scrollHeight:m,scrollTop:Math.max(T,0),viewportHeight:a}),I!==null&&e(I)},[e,t,r,i,l,n,s]);return Pt(d,o,u)}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 u=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!==u-1?i.push({endIndex:u,size:h,startIndex:u}):i[i.length-1].endIndex++}return i}function Co(e,t,o){const n=k.useRef(null),r=k.useCallback(u=>{if(!(u!=null&&u.offsetParent))return;const d=u.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 u;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=(u=l.current)==null?void 0:u.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),u=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:u,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:u}=t(e[l]);i.push({end:s-1,start:n,value:r}),n=s,r=u}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 u=!1,d=!1;for(const{end:h,start:I,value:g}of s)u?(r>=I||i===g)&&(e=Bt(e,I)):(d=g!==i,u=!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:u,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:u,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,u=0;if(t!==0){u=xt(r,t-1,At),s=r[u].offset;const d=He(o,t-1);i=d[0],l=d[1],r.length&&r[u].size===He(o,t)[1]&&(u-=1),r=r.slice(0,u+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),u=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(),a=he(p(o,A(u,e,T),ke(Sn,m),J()),m),f=he(p(u,J(),ke((c,x)=>({current:x,prev:c.current}),{current:[],prev:[]}),y(({prev:c})=>c)),[]);B(p(u,W(c=>c.length>0),A(a,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}})),a),B(p(n,A(a),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(a).sizeTree)),y(c=>{const x=ne(I),C=ne(u).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(a).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(u,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(a),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(a);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(a),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(a,T),y(([c,{offsetTree:x},C])=>{const z=-c;return ot(z,x,C)})));return B(p(l,A(a,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)}}})),a),{beforeUnshiftWith:H,data:b,defaultItemSize:h,firstItemIndex:s,fixedItemSize:d,fixedGroupSize:I,gap:T,groupIndices:u,heightEstimates:g,itemSize:v,listRefresh:E,shiftWith:l,shiftWithOffset:F,sizeRanges:o,sizes:a,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(u=>u.totalCount)),o),B(p(s,y(u=>u.groupIndices)),e),B(p(le(r,t,n),W(([u,d])=>wt(d)),y(([u,d,h])=>He(d.groupOffsetTree,Math.max(u-h,0),"v")[0]),J(),y(u=>[u])),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:u,scrollTo:d,smoothScrollTargetReached:h,viewportHeight:I},{log:g}])=>{const v=N(),b=N(),T=w(0);let m=null,a=null,f=null;function S(){m&&(m(),m=null),f&&(f(),f=null),a&&(clearTimeout(a),a=null),L(u,!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 a=setTimeout(()=>{S()},1200),L(u,!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),u=w(0),d=w(!0);return B(p(l,A(u),W(([h,I])=>!!I),Be(!1)),s),B(p(l,A(u),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(u)),([,h])=>{Re(r,()=>{L(d,!0)}),Dt(4,()=>{Re(n,()=>{L(s,!0)}),L(i,h)})}),{initialItemFinalLocationReached:d,initialTopMostItemIndex:u,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,ut=_(([{footerHeight:e,headerHeight:t,scrollBy:o,scrollContainerState:n,scrollTop:r,viewportHeight:i}])=>{const l=w(!1),s=w(!0),u=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)),u);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 a=w(0);return B(p(g,W(f=>!f),Be(0)),a),B(p(r,je(100),A(g),W(([f,S])=>S),ke(([f,S],[E])=>[S,E],[0,0]),y(([f,S])=>S-f)),a),{atBottomState:b,atBottomStateChange:u,atBottomThreshold:h,atTopStateChange:d,atTopThreshold:I,isAtBottom:l,isAtTop:s,isScrolling:g,lastJumpDueToItemResize:T,scrollDirection:m,scrollVelocity:a}},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),u=w(0),d=he(p(le(M(n),M(r),M(o),M(i,tt),M(u),M(l),M(t),M(e),M(s)),y(([h,I,g,[v,b],T,m,a,f,S])=>{const E=h-f,H=m+a,F=Math.max(g-E,0);let c=ro;const x=lo(S,rt),C=lo(S,it);return v-=f,v+=g+a,b+=g+a,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-a+I+io(T,it,c)+C]:null}),W(h=>h!=null),J(tt)),[0,0]);return{increaseViewportBy:s,listBoundary:i,overscan:u,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:u}=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*u+(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,u=Vt(t,s),d=Array.from({length:s}).map((h,I)=>({data:i[I+u],index:I+u,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,u=0;for(const d of e){(!s||s.end<d.index)&&(s=l.shift(),u=t.groupIndices.indexOf(s.start));let h;d.index===s.start?h={index:u,type:"group"}:h={groupIndex:u,index:d.index-(u+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:u},{initialTopMostItemIndex:d,scrolledToInitialItem:h},{topListHeight:I},g,{didMount:v},{recalcInProgress:b}])=>{const T=w([]),m=w(0),a=N(),f=w(0);B(i.topItemsIndexes,T);const S=he(p(le(v,b,M(u,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 ue=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:ue,size:q}),ue+=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 ue=re.value;let ie=ue.offset,q=re.start;const X=ue.size;if(ue.offset<c){q+=Math.floor((c-ue.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}}),ae=co(ee,rt),Se=co(ee,it);if(te.length>0&&(ae>0||Se>0)){const se=te[0],re=te[te.length-1];if(ae>0&&se.index>Me){const ue=Math.min(ae,se.index-Me),ie=[];let q=se.offset;for(let X=se.index-1;X>=se.index-ue;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 ue=Math.min(Se,U-re.index);let ie=re.offset+re.size+G;for(let q=re.index+1;q<=re.index+ue;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)),a);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:a,listState:S,minOverscanItemCount:f,rangeChanged:F,startReached:H,topItemsIndexes:T,...g}},Q(Oe,jo,Nt,ct,st,ut,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,u,d,h,I])=>s+u+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:u},{scrollToIndex:d}])=>{const h=N();return B(p(h,A(t,u,o,i,r,n,s),A(e),y(([[I,g,v,b,T,m,a,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-a,$=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?.(),$}),W(I=>I!==null)),d),{scrollIntoView:h}},Q(Oe,me,st,_e,Le),{singleton:!0});function uo(e){return e?e==="smooth"?"smooth":"auto":!1}const Wn=(e,t)=>typeof e=="function"?uo(e(t)):t&&uo(e),Pn=_(([{listRefresh:e,totalCount:t,fixedItemSize:o,data:n},{atBottomState:r,isAtBottom:i},{scrollToIndex:l},{scrolledToInitialItem:s},{didMount:u,propsReady:d},{log:h},{scrollingInProgress:I},{context:g},{scrollIntoView:v}])=>{const b=w(!1),T=N();let m=null;function a(H){L(l,{align:"end",behavior:H,index:"LAST"})}K(p(le(p(M(t),Ne(1)),u),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),a(H)}):m=Re(e,()=>{ne(h)("following output to ",{totalCount:F},we.DEBUG),a(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),a("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"&&a("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)),u),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,ut,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(([,u])=>u!==0),A(r,n,t,o,e),y(([[,u],d,h,I,g,v=[]])=>Wo(u,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:u,exit:d}=i;if(l){if(d(r,s))return!1}else if(u(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(ut),{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:u,viewportHeight:d},{offsetTop:h}])=>({scrollHeight:s,scrollTop:Math.max(0,u-h),viewportHeight:d}))),e),B(p(t,A(n),y(([s,{offsetTop:u}])=>({...s,top:s.top+u}))),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:u}])=>{const d=N(),h=w(void 0),I=w(null),g=w(null);return B(s,I),B(u,g),K(p(d,A(t,n,l,I,g,o)),([v,b,T,m,a,f,S])=>{const E=Cn(b.sizeTree);m&&a!==null&&f!==null&&(T=a.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:u},{beforeUnshiftWith:d,gap:h,shiftWithOffset:I,sizes:g},{log:v},{recalcInProgress:b}])=>{const T=Te(p(u,A(l),ke(([,a,f,S],[{bottom:E,items:H,offsetBottom:F,totalCount:c},x])=>{const C=E+F;let z=0;return f===c&&a.length>0&&H.length>0&&(H[0].originalIndex===0&&a[0].originalIndex===0||(z=C-S,z!==0&&(z+=x))),[z,H,c,C]},[0,[],0,0]),W(([a])=>a!==0),A(n,s,o,r,v,b),W(([,a,f,S,,,E])=>!E&&!S&&a!==0&&f===nt),y(([[a],,,,,f])=>(f("Upward scrolling compensation",{amount:a},we.DEBUG),a))));function m(a){a>0?(L(t,{behavior:"auto",top:-a}),L(e,0)):(L(e,0),L(t,{behavior:"auto",top:-a}))}return K(p(T,A(e,i)),([a,f,S])=>{S&&Gn()?L(e,f-a):m(-a)}),K(p(le(he(i,!1),e,b),W(([a,f,S])=>!a&&!S&&f!==0),y(([a,f])=>f),je(1)),m),B(p(I,y(a=>({top:-a}))),t),K(p(d,A(g,h),y(([a,{groupIndices:f,lastSize:S,sizeTree:E},H])=>{function F(c){return c*(S+H)}if(f.length===0)return F(a);{let c=0;const x=et(E,0);let C=0,z=0;for(;C<a;){C++,c+=x;let j=f.length===z+1?1/0:f[z+1]-f[z]-1;C+j>a&&(c-=x,j=a-C+1),C+=j,c+=F(j),z++}return c}})),a=>{L(e,a),requestAnimationFrame(()=>{L(t,{top:a}),requestAnimationFrame(()=>{L(e,0),L(b,!1)})})}),{deviation:e}},Q(me,ut,_e,Oe,Le,Lt)),Un=_(([e,t,o,n,r,i,l,s,u,d,h])=>({...e,...t,...o,...n,...r,...i,...l,...s,...u,...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:u,sizeRanges:d,sizes:h,statefulTotalCount:I,totalCount:g,trackItemSizes:v},{initialItemFinalLocationReached:b,initialTopMostItemIndex:T,scrolledToInitialItem:m},a,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)),a.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:u,listState:z,minOverscanItemCount:j,scrollToIndex:H,statefulTotalCount:I,trackItemSizes:v,rangeChanged:V,...$,...C,...a,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 u(m,a){m.propsReady&&L(m.propsReady,!1);for(const f of n){const S=m[t.required[f]];L(S,a[f])}for(const f of r)if(f in a){const S=m[t.optional[f]];L(S,a[f])}m.propsReady&&L(m.propsReady,!0)}function d(m){return i.reduce((a,f)=>(a[f]=S=>{const E=m[t.methods[f]];L(E,S)},a),{})}function h(m){return l.reduce((a,f)=>(a[f]=cn(m[t.events[f]]),a),{})}const I=k.forwardRef((m,a)=>{const{children:f,...S}=m,[E]=k.useState(()=>Tt(an(e),c=>{u(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(()=>{u(E,S)}),k.useImperativeHandle(a,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 a=k.useContext(s);return k.useCallback(f=>{L(a[m],f)},[a,m])},v=m=>{const a=k.useContext(s)[m],f=k.useCallback(S=>K(a,S),[a]);return k.useSyncExternalStore(f,()=>ne(a),()=>ne(a))},b=m=>{const a=k.useContext(s)[m],[f,S]=k.useState(eo(ne,a));return dt(()=>K(a,E=>{E!==f&&S(Qt(E))}),[a,f]),f},T=k.version.startsWith("18")?v:b;return{Component:I,useEmitter:(m,a)=>{const f=k.useContext(s)[m];dt(()=>K(f,a),[a,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),u=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 a=()=>{e({scrollHeight:v,scrollTop:Math.max(T,0),viewportHeight:b})};g.suppressFlushSync?a():en.flushSync(a),s.current!==null&&(T===s.current||T<=0||T===v-b)&&(s.current=null,t(!0),u.current&&(clearTimeout(u.current),u.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,a;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,a=i?window.scrollX:window.scrollY):(m=v[i?"scrollWidth":"scrollHeight"],T=We(v,i?"width":"height"),a=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===a){e({scrollHeight:m,scrollTop:a,viewportHeight:T}),b&&t(!0);return}b?(s.current=g.top,u.current&&clearTimeout(u.current),u.current=setTimeout(()=>{u.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",ao="sticky",_t=Vo(()=>{if(typeof document>"u")return ao;const e=document.createElement("div");return e.style.position=yt,e.style.position===yt?yt:ao});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,u=null)=>he(p(o,y(d=>d[s]),J()),u);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"),u=t("ScrollerComponent"),d=o("smoothScrollTargetReached"),h=t("scrollerRef"),I=t("horizontalDirection")||!1,{scrollByCallback:g,scrollerRef:v,scrollToCallback:b}=qo(s,d,u,h,void 0,I);return e("scrollTo",b),e("scrollBy",g),O.jsx(u,{"data-testid":"virtuoso-scroller","data-virtuoso-scroller":!0,ref:v,style:{...I?Yn:$n,...r},tabIndex:0,...l,...fe(u,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"),u=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:a}=qo(s,d,u,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",a),e("scrollBy",T),O.jsx(u,{ref:v,"data-virtuoso-scroller":!0,style:{position:"relative",...r,...h!==0?{height:h+I}:{}},...l,...fe(u,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),u=(d,h=null)=>he(p(i,y(I=>I[d]),J()),h);return{components:i,computeItemKey:l,context:t,EmptyPlaceholder:u("EmptyPlaceholder"),FillerRow:u("FillerRow"),fixedFooterContent:r,fixedHeaderContent:n,itemContent:e,groupContent:o,ScrollerComponent:u("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:u("ScrollSeekPlaceholder"),TableBodyComponent:u("TableBody","tbody"),TableComponent:u("Table","table"),TableFooterComponent:u("TableFoot","tfoot"),TableHeadComponent:u("TableHead","thead"),TableRowComponent:u("TableRow","tr"),GroupComponent:u("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,u=P("itemContent"),d=P("groupContent"),h=P("ScrollSeekPlaceholder")||er,I=P("GroupComponent"),g=P("TableRowComponent"),v=(e?t.topItems:[]).reduce((T,m,a)=>(a===0?T.push(m.size):T.push(T[a-1]+m.size),T),[]),b=(e?t.topItems:t.items).map(T=>{const m=T.originalIndex,a=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:a,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:a,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:a,style:e?{...fo,top:l+f}:or},s?u(T.index,T.groupIndex,T.data,r):u(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,u=P("trackItemSizes"),d=P("itemSize"),h=P("log"),{callbackRef:I,ref:g}=hn(o,d,u,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,a=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(a,{"data-testid":"virtuoso-item-list",ref:I,...fe(a,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"),u=Ge(k.useMemo(()=>pt(n,a=>We(a,"height")),[n]),!0,P("skipAnimationFrameInResizeObserver")),d=Ge(k.useMemo(()=>pt(r,a=>We(a,"height")),[r]),!0,P("skipAnimationFrameInResizeObserver")),h=o||t?ur:cr,I=o||t?ir:rr,g=P("TableComponent"),v=P("TableHeadComponent"),b=P("TableFooterComponent"),T=i?O.jsx(v,{ref:u,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}),ur=$o({useEmitter:Kt,useEmitterValue:P,usePublisher:ye}),ar=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:u,scrollTop:d,smoothScrollTargetReached:h,viewportHeight:I},g,v,{didMount:b,propsReady:T},{customScrollParent:m,useWindowScroll:a,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,ae,,Se])=>R&&!U&&te.height!==0&&ae.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(u,{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,ae])=>({gap:te,item:U,scrollTop:ae,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],ae,Se,se,re,ue,,ie,q])=>{const{column:X,row:Ce}=ae,{height:de,width:Ct}=Se,{width:qt}=se;if(ue===0&&(R===0||qt===0))return mo;if(Ct===0){const Jt=Vt(q,R),Qo=Jt+Math.max(ue-1,0);return fr(xo(Jt,Qo,re))}const at=Yo(qt,Ct,X);let Ke,De;ie?U===0&&te===0&&ue>0?(Ke=0,De=ue-1):(Ke=at*vt((U+Ce)/(de+Ce)),De=at*go((te+Ce)/(de+Ce))-1,De=Ht(R-1,Je(De,at-1)),Ke=Ht(De,Je(0,Ke))):(Ke=0,De=-1);const Zt=xo(Ke,De,re),{bottom:$t,top:Yt}=vo(se,ae,Se,Zt),Xt=go(R/at),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},ae])=>{const{bottom:Se,top:se}=vo(R,ae,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 ae=R.items[R.items.length-1].index===U-1;return(te||R.bottom>0&&R.itemHeight>0&&R.offsetBottom===0&&R.items.length===U)&&ae}),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,ae,Se])=>{const se=Fo(R),{align:re,behavior:ue,offset:ie}=se;let q=se.index;q==="LAST"&&(q=ae-1),q=Je(0,q,Ht(ae-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:ue,top:X}})),u);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:u,scrollToIndex:j,scrollTop:d,smoothScrollTargetReached:h,totalCount:F,useWindowScroll:a,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,ut,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),u=(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:u("Footer"),HeaderComponent:u("Header"),headerFooterTag:l,itemClassName:n,ItemComponent:u("Item","div"),itemContent:e,listClassName:r,ListComponent:u("List","div"),readyStateChanged:d,reportReadyState:h,ScrollerComponent:u("Scroller","div"),scrollerRef:s,ScrollSeekPlaceholder:u("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"),u=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(()=>a=>{const f=a.parentElement.parentElement.scrollHeight;l(f);const S=a.firstChild;if(S){const{height:E,width:H}=S.getBoundingClientRect();I({height:E,width:H})}g({column:Io("column-gap",getComputedStyle(a).columnGap,v),row:Io("row-gap",getComputedStyle(a).rowGap,v)})},[l,I,g,v]),!0,!1);return Ko(()=>{e.itemHeight>0&&e.itemWidth>0&&T(!0)},[e]),b?null:O.jsx(u,{className:t,ref:m,...fe(u,h),"data-testid":"virtuoso-item-list",style:{paddingBottom:e.offsetBottom,paddingTop:e.offsetTop},children:e.items.map(a=>{const f=r(a.index,a.data,h);return i?O.jsx(d,{...fe(d,h),height:e.itemHeight,index:a.index,width:e.itemWidth},f):ht.createElement(s,{...fe(s,h),className:o,"data-index":a.index,key:f},n(a.index,a.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(ar,{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
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{r as t,j as s,F as m,B as v,f as G,ag 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,ah as z,ai as Y,aj as Z,N as ee,M as R,ak as se,al as ae}from"./index-DlxarZdr.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-C_yiZGKg.js";import{I as O}from"./InputField-UOrr09c1.js";import{S as V}from"./SelectField-Cwqszwkn.js";import{T as ue}from"./Table-DTYGOYln.js";import{u as me,T as he}from"./useTable-TipnaiSD.js";import"./envs-CRUy-_iG.js";import"./floating-ui.dom-BSrWR8Gl.js";import"./DebouncedInput-B13ZAtjv.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-[90vh] 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-square",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-square",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]),q=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?z: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:q,children:s.jsx(m,{icon:o?z:Z,spin:o})})]}),enableSorting:!1,enableColumnFilter:!1,enableGlobalFilter:!1}],[n,C,q]),M=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,{...M})}),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",...M})})]})}export{Ne as default};
@@ -1 +0,0 @@
1
- import{r as s,u as l,j as a,L as d,aY as p}from"./index-DlxarZdr.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};
@@ -1,2 +0,0 @@
1
- �`䜚�/�4��X���2&k-gwpk �SW@���ݻ�"��"�~@8|߶A�Z�s�]�vRK�N����1���G���&4����!��������E�ϻ~91����'x�q�@G��oY�I��5���\�u9`B����R�H2�A���>�����/3([� ���կ��8������S8Pc�D�Vl���5+Y
2
- ƞ�"��jl�FG�rP��G�"�q��m�*��W�������� �O,@�,Fw�S�rgn\PA�(3+-+%%/k�N$���ZBf�wx1Q��ζ%�$C�����!z �
@@ -1 +0,0 @@
1
- function J(){return typeof window<"u"}function H(t){return Ot(t)?(t.nodeName||"").toLowerCase():"#document"}function S(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function P(t){var e;return(e=(Ot(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ot(t){return J()?t instanceof Node||t instanceof S(t).Node:!1}function C(t){return J()?t instanceof Element||t instanceof S(t).Element:!1}function L(t){return J()?t instanceof HTMLElement||t instanceof S(t).HTMLElement:!1}function gt(t){return!J()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof S(t).ShadowRoot}const Ft=new Set(["inline","contents"]);function X(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Ft.has(i)}const Mt=new Set(["table","td","th"]);function Bt(t){return Mt.has(H(t))}const Wt=[":popover-open",":modal"];function Q(t){return Wt.some(e=>{try{return t.matches(e)}catch{return!1}})}const Nt=["transform","translate","scale","rotate","perspective"],Vt=["transform","translate","scale","rotate","perspective","filter"],$t=["paint","layout","strict","content"];function lt(t){const e=at(),n=C(t)?T(t):t;return Nt.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||Vt.some(o=>(n.willChange||"").includes(o))||$t.some(o=>(n.contain||"").includes(o))}function kt(t){let e=M(t);for(;L(e)&&!k(e);){if(lt(e))return e;if(Q(e))return null;e=M(e)}return null}function at(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const _t=new Set(["html","body","#document"]);function k(t){return _t.has(H(t))}function T(t){return S(t).getComputedStyle(t)}function Z(t){return C(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function M(t){if(H(t)==="html")return t;const e=t.assignedSlot||t.parentNode||gt(t)&&t.host||P(t);return gt(e)?e.host:e}function Rt(t){const e=M(t);return k(e)?t.ownerDocument?t.ownerDocument.body:t.body:L(e)&&X(e)?e:Rt(e)}function j(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Rt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=S(i);if(r){const c=rt(s);return e.concat(s,s.visualViewport||[],X(i)?i:[],c&&n?j(c):[])}return e.concat(i,j(i,[],n))}function rt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Ht=["top","right","bottom","left"],ht=["start","end"],pt=Ht.reduce((t,e)=>t.concat(e,e+"-"+ht[0],e+"-"+ht[1]),[]),_=Math.min,W=Math.max,K=Math.round,U=Math.floor,E=t=>({x:t,y:t}),zt={left:"right",right:"left",bottom:"top",top:"bottom"},It={start:"end",end:"start"};function ct(t,e,n){return W(t,_(e,n))}function Y(t,e){return typeof t=="function"?t(e):t}function z(t){return t.split("-")[0]}function D(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function ft(t){return t==="y"?"height":"width"}const jt=new Set(["top","bottom"]);function tt(t){return jt.has(z(t))?"y":"x"}function ut(t){return At(tt(t))}function Xt(t,e,n){n===void 0&&(n=!1);const o=D(t),i=ut(t),r=ft(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=wt(s)),[s,wt(s)]}function Yt(t){return t.replace(/start|end/g,e=>It[e])}function wt(t){return t.replace(/left|right|bottom|top/g,e=>zt[e])}function qt(t){return{top:0,right:0,bottom:0,left:0,...t}}function St(t){return typeof t!="number"?qt(t):{top:t,right:t,bottom:t,left:t}}function G(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function xt(t,e,n){let{reference:o,floating:i}=t;const r=tt(e),s=ut(e),c=ft(s),l=z(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(D(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}async function Ut(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=Y(e,t),g=St(f),w=c[m?u==="floating"?"reference":"floating":u],h=G(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(w)))==null||n?w:w.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),v=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},O=G(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(h.top-O.top+g.top)/v.y,bottom:(O.bottom-h.bottom+g.bottom)/v.y,left:(h.left-O.left+g.left)/v.x,right:(O.right-h.right+g.right)/v.x}}const Kt=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e));let a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=xt(a,o,l),m=o,f={},g=0;for(let w=0;w<c.length;w++){var p;const{name:h,fn:x}=c[w],{x:y,y:v,data:O,reset:b}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:{...s,detectOverflow:(p=s.detectOverflow)!=null?p:Ut},elements:{reference:t,floating:e}});d=y??d,u=v??u,f={...f,[h]:{...f[h],...O}},b&&g<=50&&(g++,typeof b=="object"&&(b.placement&&(m=b.placement),b.rects&&(a=b.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:d,y:u}=xt(a,m,l)),w=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}},Gt=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=Y(t,e)||{};if(a==null)return{};const u=St(d),m={x:n,y:o},f=ut(i),g=ft(f),p=await s.getDimensions(a),w=f==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",v=r.reference[g]+r.reference[f]-m[f]-r.floating[g],O=m[f]-r.reference[f],b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a));let R=b?b[y]:0;(!R||!await(s.isElement==null?void 0:s.isElement(b)))&&(R=c.floating[y]||r.floating[g]);const mt=v/2-O/2,I=R/2-p[g]/2-1,A=_(u[h],I),F=_(u[x],I),V=A,q=R-p[g]-F,B=R/2-p[g]/2+mt,nt=ct(V,B,q),ot=!l.arrow&&D(i)!=null&&B!==nt&&r.reference[g]/2-(B<V?A:F)-p[g]/2<0,it=ot?B<V?B-V:B-q:0;return{[f]:m[f]+it,data:{[f]:nt,centerOffset:B-nt-it,...ot&&{alignmentOffset:it}},reset:ot}}});function Jt(t,e,n){return(t?[...n.filter(i=>D(i)===t),...n.filter(i=>D(i)!==t)]:n.filter(i=>z(i)===i)).filter(i=>t?D(i)===t||(e?Yt(i)!==i:!1):!0)}const Qt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=pt,autoAlignment:f=!0,...g}=Y(t,e),p=u!==void 0||m===pt?Jt(u||null,f,m):m,w=await l.detectOverflow(e,g),h=((n=s.autoPlacement)==null?void 0:n.index)||0,x=p[h];if(x==null)return{};const y=Xt(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:p[0]}};const v=[w[z(x)],w[y[0]],w[y[1]]],O=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:v}],b=p[h+1];if(b)return{data:{index:h+1,overflows:O},reset:{placement:b}};const R=O.map(A=>{const F=D(A.placement);return[A.placement,F&&d?A.overflows.slice(0,2).reduce((V,q)=>V+q,0):A.overflows[0],A.overflows]}).sort((A,F)=>A[1]-F[1]),I=((i=R.filter(A=>A[2].slice(0,D(A[0])?2:3).every(F=>F<=0))[0])==null?void 0:i[0])||R[0][0];return I!==c?{data:{index:h+1,overflows:O},reset:{placement:I}}:{}}}},Zt=new Set(["left","top"]);async function te(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=z(n),c=D(n),l=tt(n)==="y",a=Zt.has(s)?-1:1,d=r&&l?-1:1,u=Y(e,t);let{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}const ee=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:c}=e,l=await te(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},ne=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:h=>{let{x,y}=h;return{x,y}}},...a}=Y(t,e),d={x:n,y:o},u=await r.detectOverflow(e,a),m=tt(z(i)),f=At(m);let g=d[f],p=d[m];if(s){const h=f==="y"?"top":"left",x=f==="y"?"bottom":"right",y=g+u[h],v=g-u[x];g=ct(y,g,v)}if(c){const h=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=p+u[h],v=p-u[x];p=ct(y,p,v)}const w=l.fn({...e,[f]:g,[m]:p});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[f]:s,[m]:c}}}}}};function Ct(t){const e=T(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=L(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=K(n)!==r||K(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function dt(t){return C(t)?t:t.contextElement}function $(t){const e=dt(t);if(!L(e))return E(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Ct(e);let s=(r?K(n.width):n.width)/o,c=(r?K(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const oe=E(0);function Tt(t){const e=S(t);return!at()||!e.visualViewport?oe:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ie(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==S(t)?!1:e}function N(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=dt(t);let s=E(1);e&&(o?C(o)&&(s=$(o)):s=$(t));const c=ie(r,n,o)?Tt(r):E(0);let l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){const m=S(r),f=o&&C(o)?S(o):o;let g=m,p=rt(g);for(;p&&o&&f!==g;){const w=$(p),h=p.getBoundingClientRect(),x=T(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,v=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;l*=w.x,a*=w.y,d*=w.x,u*=w.y,l+=y,a+=v,g=S(p),p=rt(g)}}return G({width:d,height:u,x:l,y:a})}function et(t,e){const n=Z(t).scrollLeft;return e?e.left+n:N(P(t)).left+n}function Et(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-et(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function se(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=P(o),c=e?Q(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=E(1);const d=E(0),u=L(o);if((u||!u&&!r)&&((H(o)!=="body"||X(s))&&(l=Z(o)),L(o))){const f=N(o);a=$(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}const m=s&&!u&&!r?Et(s,l):E(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function re(t){return Array.from(t.getClientRects())}function ce(t){const e=P(t),n=Z(t),o=t.ownerDocument.body,i=W(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=W(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+et(t);const c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=W(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}const yt=25;function le(t,e){const n=S(t),o=P(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;const d=at();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}const a=et(o);if(a<=0){const d=o.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-f);g<=yt&&(r-=g)}else a<=yt&&(r+=a);return{width:r,height:s,x:c,y:l}}const ae=new Set(["absolute","fixed"]);function fe(t,e){const n=N(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=L(t)?$(t):E(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function vt(t,e,n){let o;if(e==="viewport")o=le(t,n);else if(e==="document")o=ce(P(t));else if(C(e))o=fe(e,n);else{const i=Tt(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return G(o)}function Lt(t,e){const n=M(t);return n===e||!C(n)||k(n)?!1:T(n).position==="fixed"||Lt(n,e)}function ue(t,e){const n=e.get(t);if(n)return n;let o=j(t,[],!1).filter(c=>C(c)&&H(c)!=="body"),i=null;const r=T(t).position==="fixed";let s=r?M(t):t;for(;C(s)&&!k(s);){const c=T(s),l=lt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&ae.has(i.position)||X(s)&&!l&&Lt(t,s))?o=o.filter(d=>d!==s):i=c,s=M(s)}return e.set(t,o),o}function de(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?Q(e)?[]:ue(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{const u=vt(e,d,i);return a.top=W(u.top,a.top),a.right=_(u.right,a.right),a.bottom=_(u.bottom,a.bottom),a.left=W(u.left,a.left),a},vt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function me(t){const{width:e,height:n}=Ct(t);return{width:e,height:n}}function ge(t,e,n){const o=L(e),i=P(e),r=n==="fixed",s=N(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const l=E(0);function a(){l.x=et(i)}if(o||!o&&!r)if((H(e)!=="body"||X(i))&&(c=Z(e)),o){const f=N(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();const d=i&&!o&&!r?Et(i,c):E(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function st(t){return T(t).position==="static"}function bt(t,e){if(!L(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return P(t)===n&&(n=n.ownerDocument.body),n}function Pt(t,e){const n=S(t);if(Q(t))return n;if(!L(t)){let i=M(t);for(;i&&!k(i);){if(C(i)&&!st(i))return i;i=M(i)}return n}let o=bt(t,e);for(;o&&Bt(o)&&st(o);)o=bt(o,e);return o&&k(o)&&st(o)&&!lt(o)?n:o||kt(t)||n}const he=async function(t){const e=this.getOffsetParent||Pt,n=this.getDimensions,o=await n(t.floating);return{reference:ge(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function pe(t){return T(t).direction==="rtl"}const we={convertOffsetParentRelativeRectToViewportRelativeRect:se,getDocumentElement:P,getClippingRect:de,getOffsetParent:Pt,getElementRects:he,getClientRects:re,getDimensions:me,getScale:$,isElement:C,isRTL:pe};function Dt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xe(t,e){let n=null,o;const i=P(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();const a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;const g=U(u),p=U(i.clientWidth-(d+m)),w=U(i.clientHeight-(u+f)),h=U(d),y={rootMargin:-g+"px "+-p+"px "+-w+"px "+-h+"px",threshold:W(0,_(1,l))||1};let v=!0;function O(b){const R=b[0].intersectionRatio;if(R!==l){if(!v)return s();R?s(!1,R):o=setTimeout(()=>{s(!1,1e-7)},1e3)}R===1&&!Dt(a,t.getBoundingClientRect())&&s(),v=!1}try{n=new IntersectionObserver(O,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,y)}n.observe(t)}return s(!0),r}function ye(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=dt(t),d=i||r?[...a?j(a):[],...j(e)]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n,{passive:!0}),r&&h.addEventListener("resize",n)});const u=a&&c?xe(a,n):null;let m=-1,f=null;s&&(f=new ResizeObserver(h=>{let[x]=h;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,p=l?N(t):null;l&&w();function w(){const h=N(t);p&&!Dt(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,l&&cancelAnimationFrame(g)}}const ve=ee,be=Qt,Oe=ne,Re=Gt,Ae=(t,e,n)=>{const o=new Map,i={platform:we,...n},r={...i.platform,_c:o};return Kt(t,e,{...i,platform:r})};export{ye as a,gt as b,Ae as c,be as d,Re as e,C as f,j as g,T as h,L as i,at as j,k,M as l,Ot as m,ve as o,Oe as s};
@@ -1 +0,0 @@
1
- import{r as c,ab as Me,ac as Oe,j as B}from"./index-DlxarZdr.js";import{i as ee,b as Je,c as et,o as tt,d as nt,s as rt,e as ge,f as $,g as ne,h as Ae,j as ot,k as re,l as it,m as st}from"./floating-ui.dom-BSrWR8Gl.js";var at=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],ce=at.join(","),De=typeof Element>"u",H=De?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Q=!De&&Element.prototype.getRootNode?function(t){var e;return t==null||(e=t.getRootNode)===null||e===void 0?void 0:e.call(t)}:function(t){return t?.ownerDocument},z=function(e,n){var r;n===void 0&&(n=!0);var o=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),i=o===""||o==="true",s=i||n&&e&&(typeof e.closest=="function"?e.closest("[inert]"):z(e.parentNode));return s},ct=function(e){var n,r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"contenteditable");return r===""||r==="true"},ut=function(e,n,r){if(z(e))return[];var o=Array.prototype.slice.apply(e.querySelectorAll(ce));return n&&H.call(e,ce)&&o.unshift(e),o=o.filter(r),o},ue=function(e,n,r){for(var o=[],i=Array.from(e);i.length;){var s=i.shift();if(!z(s,!1))if(s.tagName==="SLOT"){var a=s.assignedElements(),u=a.length?a:s.children,l=ue(u,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:s,candidates:l})}else{var d=H.call(s,ce);d&&r.filter(s)&&(n||!e.includes(s))&&o.push(s);var g=s.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(s),p=!z(g,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(g&&p){var m=ue(g===!0?s.children:g.children,!0,r);r.flatten?o.push.apply(o,m):o.push({scopeParent:s,candidates:m})}else i.unshift.apply(i,s.children)}}return o},Ne=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},Fe=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||ct(e))&&!Ne(e)?0:e.tabIndex},lt=function(e,n){var r=Fe(e);return r<0&&n&&!Ne(e)?0:r},ft=function(e,n){return e.tabIndex===n.tabIndex?e.documentOrder-n.documentOrder:e.tabIndex-n.tabIndex},Le=function(e){return e.tagName==="INPUT"},dt=function(e){return Le(e)&&e.type==="hidden"},vt=function(e){var n=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return n},gt=function(e,n){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===n)return e[r]},pt=function(e){if(!e.name)return!0;var n=e.form||Q(e),r=function(a){return n.querySelectorAll('input[type="radio"][name="'+a+'"]')},o;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")o=r(window.CSS.escape(e.name));else try{o=r(e.name)}catch(s){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",s.message),!1}var i=gt(o,e.form);return!i||i===e},mt=function(e){return Le(e)&&e.type==="radio"},bt=function(e){return mt(e)&&!pt(e)},ht=function(e){var n,r=e&&Q(e),o=(n=r)===null||n===void 0?void 0:n.host,i=!1;if(r&&r!==e){var s,a,u;for(i=!!((s=o)!==null&&s!==void 0&&(a=s.ownerDocument)!==null&&a!==void 0&&a.contains(o)||e!=null&&(u=e.ownerDocument)!==null&&u!==void 0&&u.contains(e));!i&&o;){var l,d,g;r=Q(o),o=(l=r)===null||l===void 0?void 0:l.host,i=!!((d=o)!==null&&d!==void 0&&(g=d.ownerDocument)!==null&&g!==void 0&&g.contains(o))}}return i},pe=function(e){var n=e.getBoundingClientRect(),r=n.width,o=n.height;return r===0&&o===0},Rt=function(e,n){var r=n.displayCheck,o=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in e){var i=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(e).visibility==="hidden")return!0;var s=H.call(e,"details>summary:first-of-type"),a=s?e.parentElement:e;if(H.call(a,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof o=="function"){for(var u=e;e;){var l=e.parentElement,d=Q(e);if(l&&!l.shadowRoot&&o(l)===!0)return pe(e);e.assignedSlot?e=e.assignedSlot:!l&&d!==e.ownerDocument?e=d.host:e=l}e=u}if(ht(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return pe(e);return!1},yt=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var n=e.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var o=n.children.item(r);if(o.tagName==="LEGEND")return H.call(n,"fieldset[disabled] *")?!0:!o.contains(e)}return!0}n=n.parentElement}return!1},Et=function(e,n){return!(n.disabled||dt(n)||Rt(n,e)||vt(n)||yt(n))},me=function(e,n){return!(bt(n)||Fe(n)<0||!Et(e,n))},xt=function(e){var n=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},_e=function(e){var n=[],r=[];return e.forEach(function(o,i){var s=!!o.scopeParent,a=s?o.scopeParent:o,u=lt(a,s),l=s?_e(o.candidates):a;u===0?s?n.push.apply(n,l):n.push(a):r.push({documentOrder:i,tabIndex:u,item:o,isScope:s,content:l})}),r.sort(ft).reduce(function(o,i){return i.isScope?o.push.apply(o,i.content):o.push(i.content),o},[]).concat(n)},$e=function(e,n){n=n||{};var r;return n.getShadowRoot?r=ue([e],n.includeContainer,{filter:me.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:xt}):r=ut(e,n.includeContainer,me.bind(null,n)),_e(r)};function wt(){return/apple/i.test(navigator.vendor)}const be="data-floating-ui-focusable",St="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Ct(t){let e=t.activeElement;for(;((n=e)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;e=e.shadowRoot.activeElement}return e}function le(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&Je(n)){let r=e;for(;r;){if(t===r)return!0;r=r.parentNode||r.host}}return!1}function q(t){return"composedPath"in t?t.composedPath()[0]:t.target}function oe(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function Tt(t){return t.matches("html,body")}function X(t){return t?.ownerDocument||document}function It(t){return ee(t)&&t.matches(St)}function Pt(t){return t?t.hasAttribute(be)?t:t.querySelector("["+be+"]")||t:null}function G(t,e,n){return n===void 0&&(n=!0),t.filter(o=>{var i;return o.parentId===e&&(!n||((i=o.context)==null?void 0:i.open))}).flatMap(o=>[o,...G(t,o.id,n)])}function kt(t){return"nativeEvent"in t}function he(t,e){return["mouse","pen"].includes(t)}var Mt=typeof document<"u",Ot=function(){},V=Mt?c.useLayoutEffect:Ot;const At={...Me},Dt=At.useInsertionEffect,Nt=Dt||(t=>t());function U(t){const e=c.useRef(()=>{});return Nt(()=>{e.current=t}),c.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return e.current==null?void 0:e.current(...r)},[])}const Be=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function Ke(t,e){const n=$e(t,Be()),r=n.length;if(r===0)return;const o=Ct(X(t)),i=n.indexOf(o),s=i===-1?e===1?0:r-1:i+e;return n[s]}function Ft(t){return Ke(X(t).body,1)||t}function Lt(t){return Ke(X(t).body,-1)||t}function ie(t,e){const n=e||t.currentTarget,r=t.relatedTarget;return!r||!le(n,r)}function _t(t){$e(t,Be()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Re(t){t.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}var $t=typeof document<"u",Bt=function(){},Z=$t?c.useLayoutEffect:Bt;function J(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,o;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!J(t[r],e[r]))return!1;return!0}if(o=Object.keys(t),n=o.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,o[r]))return!1;for(r=n;r--!==0;){const i=o[r];if(!(i==="_owner"&&t.$$typeof)&&!J(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function je(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ye(t,e){const n=je(t);return Math.round(e*n)/n}function se(t){const e=c.useRef(t);return Z(()=>{e.current=t}),e}function Kt(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:s}={},transform:a=!0,whileElementsMounted:u,open:l}=t,[d,g]=c.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[p,m]=c.useState(r);J(p,r)||m(r);const[E,f]=c.useState(null),[h,x]=c.useState(null),R=c.useCallback(v=>{v!==A.current&&(A.current=v,f(v))},[]),y=c.useCallback(v=>{v!==O.current&&(O.current=v,x(v))},[]),w=i||E,P=s||h,A=c.useRef(null),O=c.useRef(null),T=c.useRef(d),j=u!=null,F=se(u),_=se(o),D=se(l),L=c.useCallback(()=>{if(!A.current||!O.current)return;const v={placement:e,strategy:n,middleware:p};_.current&&(v.platform=_.current),et(A.current,O.current,v).then(C=>{const I={...C,isPositioned:D.current!==!1};b.current&&!J(T.current,I)&&(T.current=I,Oe.flushSync(()=>{g(I)}))})},[p,e,n,_,D]);Z(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,g(v=>({...v,isPositioned:!1})))},[l]);const b=c.useRef(!1);Z(()=>(b.current=!0,()=>{b.current=!1}),[]),Z(()=>{if(w&&(A.current=w),P&&(O.current=P),w&&P){if(F.current)return F.current(w,P,L);L()}},[w,P,L,F,j]);const k=c.useMemo(()=>({reference:A,floating:O,setReference:R,setFloating:y}),[R,y]),S=c.useMemo(()=>({reference:w,floating:P}),[w,P]),M=c.useMemo(()=>{const v={position:n,left:0,top:0};if(!S.floating)return v;const C=ye(S.floating,d.x),I=ye(S.floating,d.y);return a?{...v,transform:"translate("+C+"px, "+I+"px)",...je(S.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:C,top:I}},[n,a,S.floating,d.x,d.y]);return c.useMemo(()=>({...d,update:L,refs:k,elements:S,floatingStyles:M}),[d,L,k,S,M])}const jt=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:o}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?ge({element:r.current,padding:o}).fn(n):{}:r?ge({element:r,padding:o}).fn(n):{}}}},cn=(t,e)=>({...tt(t),options:[t,e]}),un=(t,e)=>({...rt(t),options:[t,e]}),ln=(t,e)=>({...nt(t),options:[t,e]}),fn=(t,e)=>({...jt(t),options:[t,e]}),Wt="data-floating-ui-focusable",Ee="active",xe="selected",Vt={...Me};let we=!1,Ut=0;const Se=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ut++;function Yt(){const[t,e]=c.useState(()=>we?Se():void 0);return V(()=>{t==null&&e(Se())},[]),c.useEffect(()=>{we=!0},[]),t}const qt=Vt.useId,te=qt||Yt,dn=c.forwardRef(function(e,n){const{context:{placement:r,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:u=7,tipRadius:l=0,strokeWidth:d=0,staticOffset:g,stroke:p,d:m,style:{transform:E,...f}={},...h}=e,x=te(),[R,y]=c.useState(!1);if(V(()=>{if(!o)return;Ae(o).direction==="rtl"&&y(!0)},[o]),!o)return null;const[w,P]=r.split("-"),A=w==="top"||w==="bottom";let O=g;(A&&s!=null&&s.x||!A&&s!=null&&s.y)&&(O=null);const T=d*2,j=T/2,F=a/2*(l/-8+1),_=u/2*l/4,D=!!m,L=O&&P==="end"?"bottom":"top";let b=O&&P==="end"?"right":"left";O&&R&&(b=P==="end"?"left":"right");const k=i?.x!=null?O||i.x:"",S=i?.y!=null?O||i.y:"",M=m||"M0,0"+(" H"+a)+(" L"+(a-F)+","+(u-_))+(" Q"+a/2+","+u+" "+F+","+(u-_))+" Z",v={top:D?"rotate(180deg)":"",left:D?"rotate(90deg)":"rotate(-90deg)",bottom:D?"":"rotate(180deg)",right:D?"rotate(-90deg)":"rotate(90deg)"}[w];return B.jsxs("svg",{...h,"aria-hidden":!0,ref:n,width:D?a:a+T,height:a,viewBox:"0 0 "+a+" "+(u>a?u:a),style:{position:"absolute",pointerEvents:"none",[b]:k,[L]:S,[w]:A||D?"100%":"calc(100% - "+T/2+"px)",transform:[v,E].filter(C=>!!C).join(" "),...f},children:[T>0&&B.jsx("path",{clipPath:"url(#"+x+")",fill:"none",stroke:p,strokeWidth:T+(m?0:1),d:M}),B.jsx("path",{stroke:T&&!m?h.fill:"none",d:M}),B.jsx("clipPath",{id:x,children:B.jsx("rect",{x:-j,y:j*(D?-1:1),width:a+T,height:a})})]})});function Ht(){const t=new Map;return{emit(e,n){var r;(r=t.get(e))==null||r.forEach(o=>o(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var r;(r=t.get(e))==null||r.delete(n)}}}const Xt=c.createContext(null),Gt=c.createContext(null),We=()=>{var t;return((t=c.useContext(Xt))==null?void 0:t.id)||null},Ve=()=>c.useContext(Gt);function fe(t){return"data-floating-ui-"+t}const Zt={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0},Ce=c.forwardRef(function(e,n){const[r,o]=c.useState();V(()=>{wt()&&o("button")},[]);const i={ref:n,tabIndex:0,role:r,"aria-hidden":r?void 0:!0,[fe("focus-guard")]:"",style:Zt};return B.jsx("span",{...e,...i})}),Qt={clipPath:"inset(50%)",position:"fixed",top:0,left:0},Ue=c.createContext(null),Te=fe("portal");function zt(t){t===void 0&&(t={});const{id:e,root:n}=t,r=te(),o=Jt(),[i,s]=c.useState(null),a=c.useRef(null);return V(()=>()=>{i?.remove(),queueMicrotask(()=>{a.current=null})},[i]),V(()=>{if(!r||a.current)return;const u=e?document.getElementById(e):null;if(!u)return;const l=document.createElement("div");l.id=r,l.setAttribute(Te,""),u.appendChild(l),a.current=l,s(l)},[e,r]),V(()=>{if(n===null||!r||a.current)return;let u=n||o?.portalNode;u&&!st(u)&&(u=u.current),u=u||document.body;let l=null;e&&(l=document.createElement("div"),l.id=e,u.appendChild(l));const d=document.createElement("div");d.id=r,d.setAttribute(Te,""),u=l||u,u.appendChild(d),a.current=d,s(d)},[e,n,r,o]),i}function vn(t){const{children:e,id:n,root:r,preserveTabOrder:o=!0}=t,i=zt({id:n,root:r}),[s,a]=c.useState(null),u=c.useRef(null),l=c.useRef(null),d=c.useRef(null),g=c.useRef(null),p=s?.modal,m=s?.open,E=!!s&&!s.modal&&s.open&&o&&!!(r||i);return c.useEffect(()=>{if(!i||!o||p)return;function f(h){i&&ie(h)&&(h.type==="focusin"?Re:_t)(i)}return i.addEventListener("focusin",f,!0),i.addEventListener("focusout",f,!0),()=>{i.removeEventListener("focusin",f,!0),i.removeEventListener("focusout",f,!0)}},[i,o,p]),c.useEffect(()=>{i&&(m||Re(i))},[m,i]),B.jsxs(Ue.Provider,{value:c.useMemo(()=>({preserveTabOrder:o,beforeOutsideRef:u,afterOutsideRef:l,beforeInsideRef:d,afterInsideRef:g,portalNode:i,setFocusManagerState:a}),[o,i]),children:[E&&i&&B.jsx(Ce,{"data-type":"outside",ref:u,onFocus:f=>{if(ie(f,i)){var h;(h=d.current)==null||h.focus()}else{const x=s?s.domReference:null,R=Lt(x);R?.focus()}}}),E&&i&&B.jsx("span",{"aria-owns":i.id,style:Qt}),i&&Oe.createPortal(e,i),E&&i&&B.jsx(Ce,{"data-type":"outside",ref:l,onFocus:f=>{if(ie(f,i)){var h;(h=g.current)==null||h.focus()}else{const x=s?s.domReference:null,R=Ft(x);R?.focus(),s?.closeOnFocusOut&&s?.onOpenChange(!1,f.nativeEvent,"focus-out")}}})]})}const Jt=()=>c.useContext(Ue);function Ie(t){return ee(t.target)&&t.target.tagName==="BUTTON"}function en(t){return ee(t.target)&&t.target.tagName==="A"}function Pe(t){return It(t)}function gn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,dataRef:o,elements:{domReference:i}}=t,{enabled:s=!0,event:a="click",toggle:u=!0,ignoreMouse:l=!1,keyboardHandlers:d=!0,stickIfOpen:g=!0}=e,p=c.useRef(),m=c.useRef(!1),E=c.useMemo(()=>({onPointerDown(f){p.current=f.pointerType},onMouseDown(f){const h=p.current;f.button===0&&a!=="click"&&(he(h)&&l||(n&&u&&(!(o.current.openEvent&&g)||o.current.openEvent.type==="mousedown")?r(!1,f.nativeEvent,"click"):(f.preventDefault(),r(!0,f.nativeEvent,"click"))))},onClick(f){const h=p.current;if(a==="mousedown"&&p.current){p.current=void 0;return}he(h)&&l||(n&&u&&(!(o.current.openEvent&&g)||o.current.openEvent.type==="click")?r(!1,f.nativeEvent,"click"):r(!0,f.nativeEvent,"click"))},onKeyDown(f){p.current=void 0,!(f.defaultPrevented||!d||Ie(f))&&(f.key===" "&&!Pe(i)&&(f.preventDefault(),m.current=!0),!en(f)&&f.key==="Enter"&&r(!(n&&u),f.nativeEvent,"click"))},onKeyUp(f){f.defaultPrevented||!d||Ie(f)||Pe(i)||f.key===" "&&m.current&&(m.current=!1,r(!(n&&u),f.nativeEvent,"click"))}}),[o,i,a,l,d,r,n,g,u]);return c.useMemo(()=>s?{reference:E}:{},[s,E])}const tn={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},nn={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},ke=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t?.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t?.outsidePress)!=null?n:!0}};function pn(t,e){e===void 0&&(e={});const{open:n,onOpenChange:r,elements:o,dataRef:i}=t,{enabled:s=!0,escapeKey:a=!0,outsidePress:u=!0,outsidePressEvent:l="pointerdown",referencePress:d=!1,referencePressEvent:g="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:E}=e,f=Ve(),h=U(typeof u=="function"?u:()=>!1),x=typeof u=="function"?h:u,R=c.useRef(!1),{escapeKey:y,outsidePress:w}=ke(m),{escapeKey:P,outsidePress:A}=ke(E),O=c.useRef(!1),T=U(b=>{var k;if(!n||!s||!a||b.key!=="Escape"||O.current)return;const S=(k=i.current.floatingContext)==null?void 0:k.nodeId,M=f?G(f.nodesRef.current,S):[];if(!y&&(b.stopPropagation(),M.length>0)){let v=!0;if(M.forEach(C=>{var I;if((I=C.context)!=null&&I.open&&!C.context.dataRef.current.__escapeKeyBubbles){v=!1;return}}),!v)return}r(!1,kt(b)?b.nativeEvent:b,"escape-key")}),j=U(b=>{var k;const S=()=>{var M;T(b),(M=q(b))==null||M.removeEventListener("keydown",S)};(k=q(b))==null||k.addEventListener("keydown",S)}),F=U(b=>{var k;const S=i.current.insideReactTree;i.current.insideReactTree=!1;const M=R.current;if(R.current=!1,l==="click"&&M||S||typeof x=="function"&&!x(b))return;const v=q(b),C="["+fe("inert")+"]",I=X(o.floating).querySelectorAll(C);let W=$(v)?v:null;for(;W&&!re(W);){const N=it(W);if(re(N)||!$(N))break;W=N}if(I.length&&$(v)&&!Tt(v)&&!le(v,o.floating)&&Array.from(I).every(N=>!le(W,N)))return;if(ee(v)&&L){const N=re(v),K=Ae(v),Y=/auto|scroll/,qe=N||Y.test(K.overflowX),He=N||Y.test(K.overflowY),Xe=qe&&v.clientWidth>0&&v.scrollWidth>v.clientWidth,Ge=He&&v.clientHeight>0&&v.scrollHeight>v.clientHeight,Ze=K.direction==="rtl",Qe=Ge&&(Ze?b.offsetX<=v.offsetWidth-v.clientWidth:b.offsetX>v.clientWidth),ze=Xe&&b.offsetY>v.clientHeight;if(Qe||ze)return}const de=(k=i.current.floatingContext)==null?void 0:k.nodeId,Ye=f&&G(f.nodesRef.current,de).some(N=>{var K;return oe(b,(K=N.context)==null?void 0:K.elements.floating)});if(oe(b,o.floating)||oe(b,o.domReference)||Ye)return;const ve=f?G(f.nodesRef.current,de):[];if(ve.length>0){let N=!0;if(ve.forEach(K=>{var Y;if((Y=K.context)!=null&&Y.open&&!K.context.dataRef.current.__outsidePressBubbles){N=!1;return}}),!N)return}r(!1,b,"outside-press")}),_=U(b=>{var k;const S=()=>{var M;F(b),(M=q(b))==null||M.removeEventListener(l,S)};(k=q(b))==null||k.addEventListener(l,S)});c.useEffect(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=y,i.current.__outsidePressBubbles=w;let b=-1;function k(I){r(!1,I,"ancestor-scroll")}function S(){window.clearTimeout(b),O.current=!0}function M(){b=window.setTimeout(()=>{O.current=!1},ot()?5:0)}const v=X(o.floating);a&&(v.addEventListener("keydown",P?j:T,P),v.addEventListener("compositionstart",S),v.addEventListener("compositionend",M)),x&&v.addEventListener(l,A?_:F,A);let C=[];return p&&($(o.domReference)&&(C=ne(o.domReference)),$(o.floating)&&(C=C.concat(ne(o.floating))),!$(o.reference)&&o.reference&&o.reference.contextElement&&(C=C.concat(ne(o.reference.contextElement)))),C=C.filter(I=>{var W;return I!==((W=v.defaultView)==null?void 0:W.visualViewport)}),C.forEach(I=>{I.addEventListener("scroll",k,{passive:!0})}),()=>{a&&(v.removeEventListener("keydown",P?j:T,P),v.removeEventListener("compositionstart",S),v.removeEventListener("compositionend",M)),x&&v.removeEventListener(l,A?_:F,A),C.forEach(I=>{I.removeEventListener("scroll",k)}),window.clearTimeout(b)}},[i,o,a,x,l,n,r,p,s,y,w,T,P,j,F,A,_]),c.useEffect(()=>{i.current.insideReactTree=!1},[i,x,l]);const D=c.useMemo(()=>({onKeyDown:T,...d&&{[tn[g]]:b=>{r(!1,b.nativeEvent,"reference-press")},...g!=="click"&&{onClick(b){r(!1,b.nativeEvent,"reference-press")}}}}),[T,r,d,g]),L=c.useMemo(()=>({onKeyDown:T,onMouseDown(){R.current=!0},onMouseUp(){R.current=!0},[nn[l]]:()=>{i.current.insideReactTree=!0}}),[T,l,i]);return c.useMemo(()=>s?{reference:D,floating:L}:{},[s,D,L])}function rn(t){const{open:e=!1,onOpenChange:n,elements:r}=t,o=te(),i=c.useRef({}),[s]=c.useState(()=>Ht()),a=We()!=null,[u,l]=c.useState(r.reference),d=U((m,E,f)=>{i.current.openEvent=m?E:void 0,s.emit("openchange",{open:m,event:E,reason:f,nested:a}),n?.(m,E,f)}),g=c.useMemo(()=>({setPositionReference:l}),[]),p=c.useMemo(()=>({reference:u||r.reference||null,floating:r.floating||null,domReference:r.reference}),[u,r.reference,r.floating]);return c.useMemo(()=>({dataRef:i,open:e,onOpenChange:d,elements:p,events:s,floatingId:o,refs:g}),[e,d,p,s,o,g])}function mn(t){t===void 0&&(t={});const{nodeId:e}=t,n=rn({...t,elements:{reference:null,floating:null,...t.elements}}),r=t.rootContext||n,o=r.elements,[i,s]=c.useState(null),[a,u]=c.useState(null),d=o?.domReference||i,g=c.useRef(null),p=Ve();V(()=>{d&&(g.current=d)},[d]);const m=Kt({...t,elements:{...o,...a&&{reference:a}}}),E=c.useCallback(y=>{const w=$(y)?{getBoundingClientRect:()=>y.getBoundingClientRect(),getClientRects:()=>y.getClientRects(),contextElement:y}:y;u(w),m.refs.setReference(w)},[m.refs]),f=c.useCallback(y=>{($(y)||y===null)&&(g.current=y,s(y)),($(m.refs.reference.current)||m.refs.reference.current===null||y!==null&&!$(y))&&m.refs.setReference(y)},[m.refs]),h=c.useMemo(()=>({...m.refs,setReference:f,setPositionReference:E,domReference:g}),[m.refs,f,E]),x=c.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),R=c.useMemo(()=>({...m,...r,refs:h,elements:x,nodeId:e}),[m,h,x,e,r]);return V(()=>{r.dataRef.current.floatingContext=R;const y=p?.nodesRef.current.find(w=>w.id===e);y&&(y.context=R)}),c.useMemo(()=>({...m,context:R,refs:h,elements:x}),[m,h,x,R])}function ae(t,e,n){const r=new Map,o=n==="item";let i=t;if(o&&t){const{[Ee]:s,[xe]:a,...u}=t;i=u}return{...n==="floating"&&{tabIndex:-1,[Wt]:""},...i,...e.map(s=>{const a=s?s[n]:null;return typeof a=="function"?t?a(t):null:a}).concat(t).reduce((s,a)=>(a&&Object.entries(a).forEach(u=>{let[l,d]=u;if(!(o&&[Ee,xe].includes(l)))if(l.indexOf("on")===0){if(r.has(l)||r.set(l,[]),typeof d=="function"){var g;(g=r.get(l))==null||g.push(d),s[l]=function(){for(var p,m=arguments.length,E=new Array(m),f=0;f<m;f++)E[f]=arguments[f];return(p=r.get(l))==null?void 0:p.map(h=>h(...E)).find(h=>h!==void 0)}}}else s[l]=d}),s),{})}}function bn(t){t===void 0&&(t=[]);const e=t.map(a=>a?.reference),n=t.map(a=>a?.floating),r=t.map(a=>a?.item),o=c.useCallback(a=>ae(a,t,"reference"),e),i=c.useCallback(a=>ae(a,t,"floating"),n),s=c.useCallback(a=>ae(a,t,"item"),r);return c.useMemo(()=>({getReferenceProps:o,getFloatingProps:i,getItemProps:s}),[o,i,s])}const on=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hn(t,e){var n,r;e===void 0&&(e={});const{open:o,elements:i,floatingId:s}=t,{enabled:a=!0,role:u="dialog"}=e,l=te(),d=((n=i.domReference)==null?void 0:n.id)||l,g=c.useMemo(()=>{var R;return((R=Pt(i.floating))==null?void 0:R.id)||s},[i.floating,s]),p=(r=on.get(u))!=null?r:u,E=We()!=null,f=c.useMemo(()=>p==="tooltip"||u==="label"?{["aria-"+(u==="label"?"labelledby":"describedby")]:o?g:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":p==="alertdialog"?"dialog":p,"aria-controls":o?g:void 0,...p==="listbox"&&{role:"combobox"},...p==="menu"&&{id:d},...p==="menu"&&E&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,g,E,o,d,u]),h=c.useMemo(()=>{const R={id:g,...p&&{role:p}};return p==="tooltip"||u==="label"?R:{...R,...p==="menu"&&{"aria-labelledby":d}}},[p,g,d,u]),x=c.useCallback(R=>{let{active:y,selected:w}=R;const P={role:"option",...y&&{id:g+"-fui-option"}};switch(u){case"select":case"combobox":return{...P,"aria-selected":w}}return{}},[g,u]);return c.useMemo(()=>a?{reference:f,floating:h,item:x}:{},[a,f,h,x])}export{vn as F,ln as a,fn as b,hn as c,pn as d,bn as e,dn as f,gn as g,cn as o,un as s,mn as u};
@@ -1 +0,0 @@
1
- s�dѶv���6ȤEt��MNg��z =�g3�n�=��� MȒ�9��
Binary file