@baseline-ui/core 3.4.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (296) hide show
  1. package/dist/Accordion.mjs +1 -1
  2. package/dist/ActionButton.mjs +1 -1
  3. package/dist/ActionGroup.mjs +1 -1
  4. package/dist/ActionIconButton.mjs +1 -1
  5. package/dist/Actionable.mjs +1 -1
  6. package/dist/AlertDialog.css +1 -1
  7. package/dist/AlertDialog.mjs +1 -1
  8. package/dist/AudioPlayer.css +1 -1
  9. package/dist/AudioPlayer.mjs +1 -1
  10. package/dist/Avatar.mjs +1 -1
  11. package/dist/Breadcrumbs.css +10 -0
  12. package/dist/Breadcrumbs.mjs +1 -0
  13. package/dist/ButtonSelect.mjs +1 -1
  14. package/dist/Calendar.mjs +1 -1
  15. package/dist/Checkbox.mjs +1 -1
  16. package/dist/ColorInput.css +1 -1
  17. package/dist/ColorInput.mjs +1 -1
  18. package/dist/ColorSwatch.mjs +1 -1
  19. package/dist/ColorSwatchPicker.mjs +1 -1
  20. package/dist/ComboBox.mjs +1 -1
  21. package/dist/DateField.mjs +1 -1
  22. package/dist/Dialog.css +1 -1
  23. package/dist/Dialog.mjs +1 -1
  24. package/dist/Disclosure.mjs +1 -1
  25. package/dist/DomNodeRenderer.mjs +1 -1
  26. package/dist/Drawer.css +1 -1
  27. package/dist/Drawer.mjs +1 -1
  28. package/dist/Editor.css +1 -1
  29. package/dist/Editor.mjs +1 -1
  30. package/dist/FileInput.mjs +1 -1
  31. package/dist/FileList.mjs +1 -1
  32. package/dist/FileUploader.mjs +1 -1
  33. package/dist/FrameProvider.mjs +1 -1
  34. package/dist/FreehandCanvas.mjs +1 -1
  35. package/dist/GridList.mjs +1 -1
  36. package/dist/I18nProvider.mjs +1 -1
  37. package/dist/Icon.mjs +1 -1
  38. package/dist/ImageDropZone.mjs +1 -1
  39. package/dist/ImageGallery.css +1 -1
  40. package/dist/ImageGallery.mjs +1 -1
  41. package/dist/InlineAlert.mjs +1 -1
  42. package/dist/InlineToolbar.mjs +1 -1
  43. package/dist/Kbd.mjs +1 -1
  44. package/dist/Link.mjs +1 -1
  45. package/dist/ListBox.mjs +1 -1
  46. package/dist/Menu.mjs +1 -1
  47. package/dist/MessageFormat.mjs +1 -1
  48. package/dist/Modal.mjs +1 -1
  49. package/dist/NumberInput.mjs +1 -1
  50. package/dist/Pagination.mjs +1 -1
  51. package/dist/Panel.mjs +1 -1
  52. package/dist/PointPicker.mjs +1 -1
  53. package/dist/Popover.mjs +1 -1
  54. package/dist/Portal.mjs +1 -1
  55. package/dist/Preview.mjs +1 -1
  56. package/dist/ProgressBar.mjs +1 -1
  57. package/dist/RadioGroup.mjs +1 -1
  58. package/dist/Reaction.mjs +1 -1
  59. package/dist/ScrollControlButton.mjs +1 -1
  60. package/dist/SearchInput.mjs +1 -1
  61. package/dist/Select.mjs +1 -1
  62. package/dist/Slider.css +1 -1
  63. package/dist/Slider.mjs +1 -1
  64. package/dist/Stepper.mjs +1 -1
  65. package/dist/Switch.mjs +1 -1
  66. package/dist/Table.css +1 -1
  67. package/dist/Table.mjs +1 -1
  68. package/dist/Tabs.mjs +1 -1
  69. package/dist/Tag.mjs +1 -1
  70. package/dist/TagGroup.mjs +1 -1
  71. package/dist/TaggedPagination.mjs +1 -1
  72. package/dist/Text.mjs +1 -1
  73. package/dist/TextInput.mjs +1 -1
  74. package/dist/ThemeProvider.mjs +1 -1
  75. package/dist/TimeField.mjs +1 -1
  76. package/dist/Toast.mjs +1 -1
  77. package/dist/ToggleButton.mjs +1 -1
  78. package/dist/ToggleIconButton.mjs +1 -1
  79. package/dist/Toolbar.mjs +1 -1
  80. package/dist/Tooltip.mjs +1 -1
  81. package/dist/TreeView.mjs +1 -1
  82. package/dist/UNSAFE_ListBox.mjs +1 -1
  83. package/dist/Virtualizer.mjs +1 -1
  84. package/dist/chunk-23WMOYTQ.mjs +10 -0
  85. package/dist/chunk-266F6F4Y.mjs +10 -0
  86. package/dist/{chunk-BYDJXA5A.mjs → chunk-2CXZQGP5.mjs} +1 -1
  87. package/dist/chunk-2KX2HY2H.mjs +10 -0
  88. package/dist/{chunk-4AG2RUAZ.mjs → chunk-3PU6C5US.mjs} +2 -2
  89. package/dist/{chunk-UNGYVWKZ.mjs → chunk-3RWM6E56.mjs} +2 -2
  90. package/dist/{chunk-SVTTHYTR.mjs → chunk-3YVVIFY7.mjs} +1 -1
  91. package/dist/chunk-42SQX2EB.mjs +10 -0
  92. package/dist/{chunk-AM5FU4Y7.mjs → chunk-4T7P66ZA.mjs} +1 -1
  93. package/dist/{chunk-AELTF2DE.mjs → chunk-4WVW4KEK.mjs} +1 -1
  94. package/dist/{chunk-UO75BAPM.mjs → chunk-4Y4WKIL5.mjs} +1 -1
  95. package/dist/chunk-6DETJFO2.mjs +10 -0
  96. package/dist/chunk-6DYTFYPO.mjs +10 -0
  97. package/dist/{chunk-3DWFAHR2.mjs → chunk-6GV3YWV7.mjs} +1 -1
  98. package/dist/chunk-6LP7UKPC.mjs +10 -0
  99. package/dist/chunk-6M77HEKA.mjs +10 -0
  100. package/dist/chunk-6Q5PNIYZ.mjs +10 -0
  101. package/dist/chunk-6Z3GYFG5.mjs +10 -0
  102. package/dist/{chunk-7XGNJE7J.mjs → chunk-7DCQF3EP.mjs} +1 -1
  103. package/dist/chunk-7EQIV4GX.mjs +10 -0
  104. package/dist/{chunk-C2VP5IEB.mjs → chunk-7HVUCDKZ.mjs} +1 -1
  105. package/dist/{chunk-KGS3UWPG.mjs → chunk-7KZEJYIU.mjs} +1 -1
  106. package/dist/{chunk-AD3MLX6G.mjs → chunk-7OUGARUO.mjs} +1 -1
  107. package/dist/{chunk-QU34XSML.mjs → chunk-AMLFQDKI.mjs} +2 -2
  108. package/dist/{chunk-CTSDHAAV.mjs → chunk-ARCCPNHM.mjs} +2 -2
  109. package/dist/{chunk-OYSOPCTA.mjs → chunk-BA5OA5DY.mjs} +1 -1
  110. package/dist/{chunk-7L5UOGZA.mjs → chunk-BPW4QRPV.mjs} +2 -2
  111. package/dist/chunk-BSSLS6MF.mjs +10 -0
  112. package/dist/{chunk-YPEAGD2G.mjs → chunk-C2B7L5CL.mjs} +1 -1
  113. package/dist/{chunk-COHK4QQW.mjs → chunk-EGLD5KVP.mjs} +2 -2
  114. package/dist/chunk-EIB7MPRA.mjs +10 -0
  115. package/dist/{chunk-QJYPCVSD.mjs → chunk-F67SYAEW.mjs} +1 -1
  116. package/dist/{chunk-CLGLEEFO.mjs → chunk-FCKJCFMD.mjs} +1 -1
  117. package/dist/{chunk-LPI2NIDI.mjs → chunk-FF7H33Z5.mjs} +1 -1
  118. package/dist/{chunk-GL5GUKT7.mjs → chunk-FX3THTOK.mjs} +1 -1
  119. package/dist/chunk-G2T6UJ66.mjs +11 -0
  120. package/dist/chunk-GAT5QH2M.mjs +10 -0
  121. package/dist/chunk-GDIKHTP3.mjs +10 -0
  122. package/dist/chunk-GFBRKKX4.mjs +10 -0
  123. package/dist/{chunk-ZZIQF6XD.mjs → chunk-GJTOYWLJ.mjs} +1 -1
  124. package/dist/chunk-GTHN5ZCZ.mjs +10 -0
  125. package/dist/{chunk-TSHZ7JSR.mjs → chunk-GYKBMDSJ.mjs} +1 -1
  126. package/dist/{chunk-NRQSR3G7.mjs → chunk-HABKIEKC.mjs} +1 -1
  127. package/dist/{chunk-QUQ4VYCN.mjs → chunk-HCQI7MNN.mjs} +1 -1
  128. package/dist/{chunk-EUVUJQ2Z.mjs → chunk-HJGMXLKN.mjs} +1 -1
  129. package/dist/{chunk-HI44JQA7.mjs → chunk-HPUUQKKH.mjs} +2 -2
  130. package/dist/chunk-HZM2XZP4.mjs +10 -0
  131. package/dist/{chunk-ZFGTKLCU.mjs → chunk-I7SMG6PT.mjs} +1 -1
  132. package/dist/{chunk-YU5NRJT6.mjs → chunk-IC5SBDP3.mjs} +1 -1
  133. package/dist/{chunk-DZDZZRWE.mjs → chunk-IDIZSV2Y.mjs} +1 -1
  134. package/dist/chunk-IGM72PUL.mjs +0 -0
  135. package/dist/{chunk-TH4XPZEO.mjs → chunk-IM3E5JL4.mjs} +1 -1
  136. package/dist/{chunk-TUJLNJPJ.mjs → chunk-INFMXVHD.mjs} +2 -2
  137. package/dist/chunk-IROFSPEN.mjs +10 -0
  138. package/dist/{chunk-WTAJLO6E.mjs → chunk-J2KZM2I2.mjs} +1 -1
  139. package/dist/{chunk-R3HHMCE5.mjs → chunk-JHA7DIPG.mjs} +1 -1
  140. package/dist/chunk-JKOCFSBH.mjs +10 -0
  141. package/dist/chunk-JTKDC2CM.mjs +10 -0
  142. package/dist/{chunk-4EANTENO.mjs → chunk-K4N2ADJO.mjs} +1 -1
  143. package/dist/{chunk-WHN2SEWO.mjs → chunk-KHDWTXGG.mjs} +2 -2
  144. package/dist/{chunk-TFSBTGTQ.mjs → chunk-KQOXSF4J.mjs} +1 -1
  145. package/dist/{chunk-RXSX2RKA.mjs → chunk-KX2GDQKJ.mjs} +1 -1
  146. package/dist/chunk-LQHFBXCW.mjs +10 -0
  147. package/dist/{chunk-R7R7JDA3.mjs → chunk-LRF3YZWU.mjs} +2 -2
  148. package/dist/{chunk-MIF6BAPG.mjs → chunk-LSPDPDB6.mjs} +1 -1
  149. package/dist/{chunk-K4TTZX4T.mjs → chunk-LV5AUNI2.mjs} +1 -1
  150. package/dist/chunk-MHAPHPNN.mjs +10 -0
  151. package/dist/{chunk-7P7VZMTO.mjs → chunk-NWWH62TU.mjs} +1 -1
  152. package/dist/chunk-O23QVPUT.mjs +10 -0
  153. package/dist/{chunk-P7BN7QDF.mjs → chunk-O4YMXTNR.mjs} +1 -1
  154. package/dist/{chunk-XD43CVDT.mjs → chunk-OVJT5F2R.mjs} +1 -1
  155. package/dist/chunk-PCR5FD43.mjs +10 -0
  156. package/dist/{chunk-Q6PGYMYI.mjs → chunk-PR3CD3UC.mjs} +2 -2
  157. package/dist/chunk-Q6R75IOP.mjs +10 -0
  158. package/dist/chunk-QC76UPJB.mjs +29 -0
  159. package/dist/{chunk-PD5ZXNGT.mjs → chunk-QMV2O57M.mjs} +2 -2
  160. package/dist/{chunk-NYCG264A.mjs → chunk-QUWRO3HT.mjs} +2 -2
  161. package/dist/{chunk-5KJF7IQN.mjs → chunk-RE7ZGPOY.mjs} +1 -1
  162. package/dist/chunk-RFVLSR2P.mjs +10 -0
  163. package/dist/{chunk-4RSUKS23.mjs → chunk-RFVPGD6N.mjs} +2 -2
  164. package/dist/chunk-RINS2TBF.mjs +10 -0
  165. package/dist/chunk-RITIRWKN.mjs +10 -0
  166. package/dist/chunk-RUHZRYDJ.mjs +10 -0
  167. package/dist/{chunk-IVGNOQSQ.mjs → chunk-RXVMJVRX.mjs} +1 -1
  168. package/dist/chunk-SH7ZI4CA.mjs +10 -0
  169. package/dist/chunk-TDRN6VLD.mjs +10 -0
  170. package/dist/chunk-TTJTZLW5.mjs +10 -0
  171. package/dist/chunk-TYKMNZJ4.mjs +11 -0
  172. package/dist/chunk-TZGK36KC.mjs +10 -0
  173. package/dist/chunk-UBLCUHRL.mjs +10 -0
  174. package/dist/chunk-UY76QEJC.mjs +10 -0
  175. package/dist/chunk-VFO35ZLL.mjs +10 -0
  176. package/dist/{chunk-BHJCYKFJ.mjs → chunk-VJUSOXPW.mjs} +1 -1
  177. package/dist/{chunk-IUXXTORQ.mjs → chunk-VZ5CLAIL.mjs} +2 -2
  178. package/dist/chunk-WB7EFOP7.mjs +10 -0
  179. package/dist/chunk-WDWBYTJG.mjs +10 -0
  180. package/dist/{chunk-6G7EUNZW.mjs → chunk-XAM3AXXK.mjs} +1 -1
  181. package/dist/{chunk-KJ6ZSO3I.mjs → chunk-XDTZXNGJ.mjs} +1 -1
  182. package/dist/chunk-XG6JJCCJ.mjs +10 -0
  183. package/dist/{chunk-4W5VP4NV.mjs → chunk-XKUZVQ2A.mjs} +1 -1
  184. package/dist/chunk-XO7MAUFC.mjs +10 -0
  185. package/dist/{chunk-24R46WQW.mjs → chunk-XOS3JIQX.mjs} +1 -1
  186. package/dist/{chunk-W7OTSFZS.mjs → chunk-XSORBGUU.mjs} +1 -1
  187. package/dist/{chunk-7TE4MFKC.mjs → chunk-XYK5KKOH.mjs} +1 -1
  188. package/dist/chunk-YDUKC7QS.mjs +10 -0
  189. package/dist/chunk-Z4QTH4TB.mjs +10 -0
  190. package/dist/{chunk-UUTMZQQA.mjs → chunk-ZC5WXVNV.mjs} +3 -3
  191. package/dist/{chunk-E22TWF63.mjs → chunk-ZI7HJRJA.mjs} +2 -2
  192. package/dist/chunk-ZNLIC44U.mjs +10 -0
  193. package/dist/chunk-ZP6QG5FX.mjs +10 -0
  194. package/dist/{chunk-BXNNVZOQ.mjs → chunk-ZXEWW3E7.mjs} +1 -1
  195. package/dist/{chunk-OZMADP4Z.mjs → chunk-ZZ7YJ2FN.mjs} +2 -2
  196. package/dist/hooks/useContainerScopedRef.mjs +1 -1
  197. package/dist/hooks/useDevice.mjs +1 -1
  198. package/dist/hooks/useI18n.mjs +1 -1
  199. package/dist/hooks/useIntersectionObserver.mjs +1 -1
  200. package/dist/hooks/useLiveInteractionModality.mjs +1 -1
  201. package/dist/hooks/useMedia.mjs +1 -1
  202. package/dist/hooks/useMutationObserver.mjs +1 -1
  203. package/dist/hooks/usePortalContainer.mjs +1 -1
  204. package/dist/hooks/usePreventFocus.mjs +1 -1
  205. package/dist/hooks/useResizeObserver.mjs +1 -1
  206. package/dist/hooks/useTextSelection.mjs +1 -1
  207. package/dist/index.css +1 -1
  208. package/dist/index.d.ts +150 -33
  209. package/dist/index.js +21 -21
  210. package/dist/index.mjs +1 -1
  211. package/dist/messageIds.mjs +1 -1
  212. package/dist/utils/colors.mjs +1 -1
  213. package/dist/utils/dom.mjs +1 -1
  214. package/dist/utils/isInShadowDOM.mjs +1 -1
  215. package/dist/utils/keyboards.mjs +1 -1
  216. package/dist/utils/strings.mjs +1 -1
  217. package/intl/ar.json +3 -0
  218. package/intl/cs.json +3 -0
  219. package/intl/cy.json +3 -0
  220. package/intl/da.json +3 -0
  221. package/intl/de.json +3 -0
  222. package/intl/el.json +3 -0
  223. package/intl/en-GB.json +3 -0
  224. package/intl/en.json +3 -0
  225. package/intl/es.json +3 -0
  226. package/intl/fi.json +3 -0
  227. package/intl/fr-CA.json +3 -0
  228. package/intl/fr.json +3 -0
  229. package/intl/he.json +3 -0
  230. package/intl/hr.json +3 -0
  231. package/intl/id.json +3 -0
  232. package/intl/it.json +3 -0
  233. package/intl/ja.json +3 -0
  234. package/intl/ko.json +3 -0
  235. package/intl/ms.json +3 -0
  236. package/intl/nb-NO.json +3 -0
  237. package/intl/nl.json +3 -0
  238. package/intl/pl.json +3 -0
  239. package/intl/pt-PT.json +3 -0
  240. package/intl/pt.json +3 -0
  241. package/intl/ru.json +3 -0
  242. package/intl/sk.json +3 -0
  243. package/intl/sl.json +3 -0
  244. package/intl/sv.json +3 -0
  245. package/intl/th.json +3 -0
  246. package/intl/tr.json +3 -0
  247. package/intl/uk.json +3 -0
  248. package/intl/zh-Hans.json +3 -0
  249. package/intl/zh-Hant.json +3 -0
  250. package/messages.json +12 -0
  251. package/package.json +4 -4
  252. package/sbom.json +6 -6
  253. package/dist/chunk-2F3CFR22.mjs +0 -10
  254. package/dist/chunk-2LFMBQKQ.mjs +0 -10
  255. package/dist/chunk-36ZMHBG5.mjs +0 -10
  256. package/dist/chunk-3BEG3MEX.mjs +0 -10
  257. package/dist/chunk-3BG6K2G2.mjs +0 -10
  258. package/dist/chunk-3KCSUNRV.mjs +0 -10
  259. package/dist/chunk-4JQUB53Q.mjs +0 -10
  260. package/dist/chunk-4MHBLLHV.mjs +0 -11
  261. package/dist/chunk-5BKC373Y.mjs +0 -10
  262. package/dist/chunk-5FK5AJ7A.mjs +0 -10
  263. package/dist/chunk-5SHHWKFM.mjs +0 -10
  264. package/dist/chunk-76DKF2SK.mjs +0 -10
  265. package/dist/chunk-7MMO7S3R.mjs +0 -10
  266. package/dist/chunk-AK7XHUQW.mjs +0 -10
  267. package/dist/chunk-AYQN3OH2.mjs +0 -10
  268. package/dist/chunk-BBYODNBO.mjs +0 -10
  269. package/dist/chunk-DAS5QGJX.mjs +0 -10
  270. package/dist/chunk-DSV6CCI6.mjs +0 -10
  271. package/dist/chunk-F7PGMOQF.mjs +0 -10
  272. package/dist/chunk-FOKMDEP7.mjs +0 -10
  273. package/dist/chunk-FPFGTGUC.mjs +0 -10
  274. package/dist/chunk-IEOHIOGL.mjs +0 -10
  275. package/dist/chunk-IWZXZ5LU.mjs +0 -10
  276. package/dist/chunk-IXRSSEHQ.mjs +0 -10
  277. package/dist/chunk-J4OPD7OL.mjs +0 -10
  278. package/dist/chunk-K7VOXFSK.mjs +0 -10
  279. package/dist/chunk-MDE2FQHX.mjs +0 -10
  280. package/dist/chunk-MFB3SWO7.mjs +0 -29
  281. package/dist/chunk-MYJ733MN.mjs +0 -10
  282. package/dist/chunk-NJKSUI2F.mjs +0 -10
  283. package/dist/chunk-O4DA3TPW.mjs +0 -11
  284. package/dist/chunk-ONEE6UCM.mjs +0 -10
  285. package/dist/chunk-Q4SEEMIX.mjs +0 -10
  286. package/dist/chunk-R4MOUAJW.mjs +0 -10
  287. package/dist/chunk-SZN2J2ER.mjs +0 -10
  288. package/dist/chunk-U3T5JTZ7.mjs +0 -10
  289. package/dist/chunk-UDMNDUBO.mjs +0 -10
  290. package/dist/chunk-VETO7WNN.mjs +0 -10
  291. package/dist/chunk-VGFPT43C.mjs +0 -10
  292. package/dist/chunk-VJUBKX3W.mjs +0 -10
  293. package/dist/chunk-XWJJ4V3O.mjs +0 -10
  294. package/dist/chunk-YMYMFVW4.mjs +0 -10
  295. package/dist/chunk-YQHHE5AT.mjs +0 -10
  296. /package/dist/{chunk-DAN62T2M.mjs → chunk-TIGGKOJQ.mjs} +0 -0
@@ -1,4 +1,4 @@
1
- import {b as b$3,a as a$4}from'./chunk-5BKC373Y.mjs';import {p,o}from'./chunk-YQHHE5AT.mjs';import {b as b$2}from'./chunk-ZQOR4LCM.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {e as e$1}from'./chunk-J4OPD7OL.mjs';import {a as a$1}from'./chunk-AI6WQPRX.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {u,b as b$4}from'./chunk-PPHSLODC.mjs';import {a as a$2}from'./chunk-ETM4MNG4.mjs';import {j,h,b as b$1,e,l,a as a$3}from'./chunk-SD43KVTU.mjs';import yt,{createContext,useRef,useCallback,useState,useEffect,useMemo,useContext}from'react';import {flushSync}from'react-dom';import {jsx,jsxs}from'react/jsx-runtime';/**
1
+ import {b as b$3,a as a$3}from'./chunk-23WMOYTQ.mjs';import {p,o}from'./chunk-6Z3GYFG5.mjs';import {b as b$2}from'./chunk-ZQOR4LCM.mjs';import {b}from'./chunk-N2XGJKZG.mjs';import {e as e$1}from'./chunk-TZGK36KC.mjs';import {a}from'./chunk-RT4LMB6X.mjs';import {u,b as b$4}from'./chunk-PPHSLODC.mjs';import {a as a$2}from'./chunk-ETM4MNG4.mjs';import {j,h,b as b$1,e,l,a as a$1}from'./chunk-SD43KVTU.mjs';import ct,{createContext,useRef,useCallback,useState,useEffect,useMemo,useContext}from'react';import {flushSync}from'react-dom';import {jsx,jsxs}from'react/jsx-runtime';/**
2
2
  * Copyright (c) 2023-2024 PSPDFKit GmbH. All rights reserved.
3
3
  *
4
4
  * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW
@@ -7,4 +7,4 @@ import {b as b$3,a as a$4}from'./chunk-5BKC373Y.mjs';import {p,o}from'./chunk-YQ
7
7
  * This notice may not be removed from this file.
8
8
  *
9
9
  */
10
- var C=class h{x;y;constructor(e=0,t=0){this.x=e,this.y=t;}copy(){return new h(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return this.x===0&&this.y===0}};var y=class h{x;y;width;height;constructor(e=0,t=0,i=0,o=0){this.x=e,this.y=t,this.width=i,this.height=o;}get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new C(this.x,this.y)}get topRight(){return new C(this.maxX,this.y)}get bottomLeft(){return new C(this.x,this.maxY)}get bottomRight(){return new C(this.maxX,this.maxY)}intersects(e){return (process.env.NODE_ENV==="test"&&!process.env.VIRT_ON||this.area>0&&e.area>0)&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of ["topLeft","topRight","bottomLeft","bottomRight"])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(e){let t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),o=Math.max(this.maxX,e.maxX)-t,r=Math.max(this.maxY,e.maxY)-i;return new h(t,i,o,r)}intersection(e){if(!this.intersects(e))return new h(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new h(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new h(this.x,this.y,this.width,this.height)}};var m=class h{width;height;constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0);}copy(){return new h(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}};var at=0,ce=class{virtualizer;layoutInfo;content;rendered;viewType;key;children;reusableViews;constructor(e,t){this.virtualizer=e,this.key=++at,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null;}prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null;}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new ve(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e);}},ye=class extends ce{constructor(e){super(e,"root");}},ve=class extends ce{parent;constructor(e,t,i){super(e,i),this.parent=t;}};function Xe(h,e){if(h===e)return true;if(h.size!==e.size)return false;for(let t of h)if(!e.has(t))return false;return true}var fe=class{startTime=0;velocity=new C(0,0);visibleRect=new y;setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e;}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;e.height+=t,this.velocity.y<0&&(e.y-=t);let i=this.visibleRect.width/3;return e.width+=i,this.velocity.x<0&&(e.x-=i),e}};var st=4;function pe(h){return h==="x"?"width":"height"}function ht(h,e,t,i,o){let r=t(h.key);if(!r)return null;let l=r.rect[h.corner][e]-i[e]-h.offset;if(l===0)return null;let n=i[e]+l,a=pe(e),s=Math.max(0,o[a]-i[a]),u=Math.max(0,Math.min(s,n));return u!==i[e]?u:null}function ut(h,e,t,i,o=()=>true){let r=pe(e),l=null;for(let[n,a]of i){if(!a||!o(a))continue;let s=a.rect.intersection(t)[r];if(a.rect.area>0&&s>=st){let u=a.rect.getCornerInRect(t)??"topLeft",c=a.rect[u][e]-t[e];(!l||(h==="end"?c<l.offset:c>l.offset))&&(l={key:n,corner:u,offset:c});}}return l}function dt(h,e,t,i){if(h==="start")return 0;let o=pe(e);return Math.max(0,t[o]-i[o])}function Ge(h,e,t,i,o){if(t==="start")return h[i]<=o;let r=pe(i);return e[r]-(h[i]+h[r])<=o}function ct(h,e,t,i,o,r,l,n,a,s){let u=c=>e==="x"?new y(c,a.y,a.width,a.height):new y(a.x,c,a.width,a.height);if(t){let c=ht(t,e,n,a,s);if(c!=null)return u(c)}if(i&&!o&&(!r||l>0)){let c=u(dt(h,e,s,a));return c.equals(a)?null:c}return null}var me=class{hasSnappedToEdge=false;hadEstimatedVisibleItems=false;wasNearAnchorEdge=false;reset(){this.hasSnappedToEdge=false,this.hadEstimatedVisibleItems=false,this.wasNearAnchorEdge=false;}captureBeforeLayout(e,t,i){return e?ut(e.edge,e.axis,i,t,e.isAnchorable):null}resolveAfterLayout(e){let{anchorInfo:t,anchor:i,postLayoutInfos:o,previousVisibleRect:r,previousContentSize:l,contentSize:n,itemSizeChanged:a,isScrolling:s,getLayoutInfo:u}=e;if(!t)return null;let c=this.hadEstimatedVisibleItems,d=this.wasNearAnchorEdge,f=false;for(let T of o.values())if(T.estimatedSize){f=true;break}if(this.hadEstimatedVisibleItems=f,c||(this.wasNearAnchorEdge=Ge(r,l,t.edge,t.axis,t.threshold)),r.area===0)return null;let g=t.axis==="x"?"width":"height",p=n[g]-l[g],L=!this.hasSnappedToEdge;if(this.hasSnappedToEdge=true,!(L||p!==0||a))return null;let v=L||c&&d||Ge(r,l,t.edge,t.axis,t.threshold);c||(this.wasNearAnchorEdge=v);let N=L||c&&d?null:i;return ct(t.edge,t.axis,N,v,s,a,p,u,r,n)}};var ge=class{delegate;collection;layout;contentSize;visibleRect;size;persistedKeys;_visibleViews;_renderedContent;_rootView;_isScrolling;_invalidationContext;_overscanManager;_scrollAnchor;constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new m,this.visibleRect=new y,this.size=new m,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new ye(this),this._isScrolling=false,this._invalidationContext={},this._overscanManager=new fe,this._scrollAnchor=new me;}isPersistedKey(e){if(this.persistedKeys.has(e))return true;for(let t of this.persistedKeys)for(;t!=null;){let i=this.layout.getLayoutInfo(t);if(!i||i.parentKey==null)break;if(t=i.parentKey,t===e)return true}return false}getParentView(e){return e.parentKey!=null?this._visibleViews.get(e.parentKey):this._rootView}getReusableView(e){let i=this.getParentView(e).getReusableView(e.type);return i.layoutInfo=e,this._renderView(i),i}_renderView(e){if(e.layoutInfo){let{type:t,key:i,content:o}=e.layoutInfo;e.content=o||this.collection.getItem(i),e.rendered=this._renderContent(t,e.content);}}_renderContent(e,t){let i=t!=null?this._renderedContent.get(t):null;if(i!=null)return i;let o=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,o),o}keyAtPoint(e){let t=new y(e.x,e.y,1,1),i=t.area===0?[]:this.layout.getVisibleLayoutInfos(t);for(let o of i)if(o.rect.intersects(t))return o.key;return null}relayout(e={}){let t=this.layout.UNSTABLE_getScrollAnchorInfo?.(e.layoutOptions)??null,i=null;if(t){let c=[];for(let[d,f]of this._visibleViews){let g=this.layout.getLayoutInfo(d)??f.layoutInfo;g&&c.push([d,g]);}i=this._scrollAnchor.captureBeforeLayout(t,c,this.visibleRect);}let o=this.contentSize,r=this.visibleRect;this.layout.update(e);let l=this.layout.getContentSize();this.contentSize=new m(l.width,l.height);let n=this._scrollAnchor.resolveAfterLayout({anchorInfo:t,anchor:i,postLayoutInfos:t?this.getVisibleLayoutInfos():new Map,previousVisibleRect:r,previousContentSize:o,contentSize:this.contentSize,itemSizeChanged:e.itemSizeChanged??false,isScrolling:this._isScrolling,getLayoutInfo:c=>this.layout.getLayoutInfo(c)});if(n){this.delegate.setVisibleRect(n);return}let a=this.visibleRect,s=e.contentChanged?0:a.x,u=e.contentChanged?0:a.y;if(s=Math.max(0,Math.min(this.contentSize.width-a.width,s)),u=Math.max(0,Math.min(this.contentSize.height-a.height,u)),s!==a.x||u!==a.y){let c=new y(s,u,a.width,a.height);this.delegate.setVisibleRect(c);}else this.updateSubviews();}getVisibleLayoutInfos(){let e=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,t=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth"),i=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight"),o;e&&!(t&&i)?o=new y(0,0,this.contentSize.width,this.contentSize.height):o=this._overscanManager.getOverscannedRect();let r=this.layout.getVisibleLayoutInfos(o),l=new Map;for(let n of r)l.set(n.key,n);return l}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[i,o]of this._visibleViews){let r=e.get(i);(!r||o.parent!==this.getParentView(r))&&(this._visibleViews.delete(i),o.parent.reuseChild(o),t.add(o));}for(let[i,o]of e){let r=this._visibleViews.get(i);if(!r)r=this.getReusableView(o),r.parent.children.add(r),this._visibleViews.set(i,r),t.delete(r);else {r.layoutInfo=o;let l=this.collection.getItem(o.key);r.content!==l&&(r.content!=null&&this._renderedContent.delete(r.content),this._renderView(r));}}for(let i of t)i.parent.children.delete(i),i.parent.reusableViews.clear();if(!this._isScrolling)for(let i of e.keys()){let o=this._visibleViews.get(i);o.parent.children.delete(o),o.parent.children.add(o);}}render(e){let t=this,i=false,o=false,r=false,l=false,n=false,a=false,s=false,u=false;if(e.collection!==this.collection&&(t.collection=e.collection,i=true),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,t.layout=e.layout,this._scrollAnchor.reset(),i=true),e.persistedKeys&&!Xe(e.persistedKeys,this.persistedKeys)&&(t.persistedKeys=e.persistedKeys,u=true),!this.visibleRect.equals(e.visibleRect)||!this.size.equals(e.size)){this._overscanManager.setVisibleRect(e.visibleRect);let c=new y(this.visibleRect.x,this.visibleRect.y,this.size.width,this.size.height),d=new y(e.visibleRect.x,e.visibleRect.y,e.size.width,e.size.height);this.layout.shouldInvalidate(d,c)?(o=!e.visibleRect.pointEquals(this.visibleRect),r=!this.size.equals(e.size),l=this.size.width!==e.size.width,n=this.size.height!==e.size.height,i=true):u=true,t.visibleRect=e.visibleRect,t.size=e.size;}return e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(r||=e.invalidationContext.sizeChanged||false,l||=e.invalidationContext.widthChanged||false,n||=e.invalidationContext.heightChanged||false,o||=e.invalidationContext.offsetChanged||false,a||=e.invalidationContext.itemSizeChanged||false,s||=e.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions),i||=a||r||o||s),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(u=true)),i?this.relayout({offsetChanged:o,sizeChanged:r,widthChanged:l,heightChanged:n,itemSizeChanged:a,layoutOptionsChanged:s,layoutOptions:this._invalidationContext.layoutOptions}):u&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e);}updateItemSize(e,t){if(!this.layout.updateItemSize)return;this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:true});}};var mt=typeof document<"u"?yt.useLayoutEffect:()=>{};function xe(h){let[e,t]=useState(new y(0,0,0,0)),[i,o]=useState(new m),[r,l]=useState(false),[n,a]=useState({}),s=useRef(false),[u]=useState(()=>new ge({collection:h.collection,layout:h.layout,delegate:{setVisibleRect(v){t(v),s.current=true;},renderView:h.renderView,invalidate:a}}));mt(()=>{s.current&&(s.current=false,h.onVisibleRectChange(e));});let c=useMemo(()=>h.layoutOptions!=null?{...n,layoutOptions:h.layoutOptions}:n,[n,h.layoutOptions]),d=u.render({layout:h.layout,collection:h.collection,persistedKeys:h.persistedKeys,layoutOptions:h.layoutOptions,visibleRect:e,size:i,invalidationContext:c,isScrolling:r}),f=u.contentSize,g=useCallback(()=>{l(true);},[]),p=useCallback(()=>{l(false);},[]);return useMemo(()=>({virtualizer:u,visibleViews:d,setVisibleRect:t,size:i,setSize:o,contentSize:f,isScrolling:r,startScrolling:g,endScrolling:p}),[u,d,t,i,o,f,r,g,p])}var F=class{virtualizer=null;shouldInvalidate(e,t){return e.width!==t.width||e.height!==t.height}shouldInvalidateLayoutOptions(e,t){return e!==t}update(e){}getItemRect(e){return this.getLayoutInfo(e)?.rect??null}getVisibleRect(){return this.virtualizer.visibleRect}};var x=class h{type;key;parentKey;content;rect;estimatedSize;isSticky;opacity;transform;zIndex;allowOverflow;constructor(e,t,i){this.type=e,this.key=t,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=false,this.isSticky=false,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=false;}copy(){let e=new h(this.type,this.key,this.rect.copy());return e.estimatedSize=this.estimatedSize,e.opacity=this.opacity,e.transform=this.transform,e.parentKey=this.parentKey,e.content=this.content,e.isSticky=this.isSticky,e.zIndex=this.zIndex,e.allowOverflow=this.allowOverflow,e}};var V={minItemSize:new m(200,200),maxItemSize:new m(1/0,1/0),preserveAspectRatio:false,minSpace:new m(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48},re=class extends F{gap=V.minSpace;dropIndicatorThickness=2;numColumns=0;direction="ltr";contentSize=new m;layoutInfos=new Map;margin=0;shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.preserveAspectRatio!==t.preserveAspectRatio||!(e.minItemSize||V.minItemSize).equals(t.minItemSize||V.minItemSize)||!(e.maxItemSize||V.maxItemSize).equals(t.maxItemSize||V.maxItemSize)||!(e.minSpace||V.minSpace).equals(t.minSpace||V.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight||e.direction!==t.direction}update(e){let{minItemSize:t=V.minItemSize,maxItemSize:i=V.maxItemSize,preserveAspectRatio:o=V.preserveAspectRatio,minSpace:r=V.minSpace,maxHorizontalSpace:l=V.maxSpace,maxColumns:n=V.maxColumns,dropIndicatorThickness:a=V.dropIndicatorThickness,loaderHeight:s=V.loaderHeight,direction:u="ltr"}=e.layoutOptions||{};this.dropIndicatorThickness=a,this.direction=u;let c=this.virtualizer.size.width,d=Math.min(i.width,c),f=Number.isFinite(i.height)?i.height:Math.floor(t.height/t.width*d),g=Math.floor(c/(t.width+r.width)),p=Math.max(1,Math.min(n,g));this.numColumns=p;let L=c-r.width*Math.max(0,p),v=Math.floor(L/p);v=Math.max(t.width,Math.min(d,v));let N=(v-t.width)/Math.max(1,d-t.width),T=t.height+Math.floor((f-t.height)*N);T=Math.max(t.height,Math.min(f,T));let O=Math.min(Math.max(l,r.width),Math.floor((c-p*v)/(p+1)));this.gap=new m(O,r.height),this.margin=Math.floor((c-p*v-O*(p+1))/2);let k=this.virtualizer.collection,j=k.size,M=k.getLastKey();for(let R=0;R<2&&M!=null;R++){if(k.getItem(M)?.type==="skeleton"){j++;break}M=k.getKeyBefore(M);}let q=Math.ceil(j/p),X=k[Symbol.iterator](),z=q>0?r.height:0,w=new Map,I=null,S=0;for(let R=0;R<q;R++){let P=0,G=[];for(let E=0;E<p;E++){let A=I||X.next().value;if(!A)break;if(A.type==="loader")continue;A.type==="skeleton"&&(I=A);let _=I?`${I.key}-${S++}`:A.key,D=this.layoutInfos.get(_),H=A;I&&(H=D&&D.content.key===_?D.content:{...I,key:_});let he=O+E*(v+O)+this.margin,ue=T,te=!o;D&&te&&(ue=D.rect.height,te=e.layoutOptionsChanged||e.sizeChanged||D.estimatedSize||D.content!==H);let nt=new y(he,z,v,ue),$=new x(A.type,_,nt);$.estimatedSize=te,$.allowOverflow=true,$.content=H,w.set(_,$),G.push($),P=Math.max(P,$.rect.height);}for(let E of G)E.rect.height=P;z+=P+r.height,I&&R===q-1&&z<this.virtualizer.size.height&&q++;}let b=k.getItem(k.getLastKey());if(b?.type==="loader"){(S>0||!b.props.isLoading)&&(s=0);let R=c-O*2,P=new y(O,z,R,s),G=new x("loader",b.key,P);w.set(b.key,G),z=G.rect.maxY;}this.layoutInfos=w,this.contentSize=new m(this.virtualizer.size.width,z);}getLayoutInfo(e){return this.layoutInfos.get(e)||null}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let i of this.layoutInfos.values())(i.rect.intersects(e)||this.virtualizer.isPersistedKey(i.key)||i.type==="loader")&&t.push(i);return t}updateItemSize(e,t){let i=this.layoutInfos.get(e);if(!t||!i)return false;if(t.height!==i.rect.height){let o=i.copy();return o.rect.height=t.height,o.estimatedSize=false,this.layoutInfos.set(e,o),true}return false}getDropTargetFromPoint(e,t,i){if(this.layoutInfos.size===0)return {type:"root"};e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y,this.direction==="rtl"&&this.numColumns>1&&(e=this.contentSize.width-e);let o=null;if(this.numColumns===1){let u=new y(e,Math.max(0,t-this.gap.height),1,Math.max(1,this.gap.height*2)),c=this.getVisibleLayoutInfos(u),d=1/0;for(let f of c){if(!f.rect.intersects(u))continue;let g=Math.abs(f.rect.y-t),p=Math.abs(f.rect.maxY-t),L=Math.min(g,p);L<d&&(d=L,o=f.key);}}else {let u=new y(Math.max(0,e-this.gap.width),t,this.gap.width*2,1),c=this.getVisibleLayoutInfos(u),d=1/0;for(let f of c){if(!f.rect.intersects(u))continue;let g=Math.abs(f.rect.x-e),p=Math.abs(f.rect.maxX-e),L=Math.min(g,p);L<d&&(d=L,o=f.key);}}let r=o!=null?this.getLayoutInfo(o):null;if(!r)return {type:"root"};let l={type:"item",key:r.key,dropPosition:"on"},n=this.numColumns===1?t:e,a=this.numColumns===1?r.rect.y:r.rect.x,s=this.numColumns===1?r.rect.height:r.rect.width;if(i(l))n<a+5?l.dropPosition="before":n>a+s-5&&(l.dropPosition="after");else {let u=a+s/2;n<=u&&i({...l,dropPosition:"before"})?l.dropPosition="before":n>=u&&i({...l,dropPosition:"after"})&&(l.dropPosition="after");}return l}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;return this.numColumns===1?i=new y(t.rect.x,e.dropPosition==="before"?t.rect.y-this.gap.height/2-this.dropIndicatorThickness/2:t.rect.maxY+this.gap.height/2-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness):i=new y(e.dropPosition==="before"?t.rect.x-this.gap.width/2-this.dropIndicatorThickness/2:t.rect.maxX+this.gap.width/2-this.dropIndicatorThickness/2,t.rect.y,this.dropIndicatorThickness,t.rect.height),new x("dropIndicator",e.key+":"+e.dropPosition,i)}};var J=48,Y=class extends F{rowSize;orientation;estimatedRowSize;headingSize;estimatedHeadingSize;loaderSize;dropIndicatorThickness;gap;padding;layoutNodes;contentSize;lastCollection;rootNodes;invalidateEverything;validRect;requestedRect;constructor(e={}){super(),this.rowSize=e?.rowSize??e?.rowHeight??null,this.orientation=e.orientation??"vertical",this.estimatedRowSize=e?.estimatedRowSize??e?.estimatedRowHeight??null,this.headingSize=e?.headingSize??e?.headingHeight??null,this.estimatedHeadingSize=e?.estimatedHeadingSize??e?.estimatedHeadingHeight??null,this.loaderSize=e?.loaderSize??e?.loaderHeight??null,this.dropIndicatorThickness=e.dropIndicatorThickness||2,this.gap=e.gap||0,this.padding=e.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=false,this.validRect=new y,this.requestedRect=new y,this.contentSize=new m;}get collection(){return this.virtualizer.collection}get rowHeight(){return this.rowSize}get estimatedRowHeight(){return this.estimatedRowSize}get headingHeight(){return this.headingSize}get estimatedHeadingHeight(){return this.estimatedHeadingSize}get loaderHeight(){return this.loaderSize}getLayoutInfo(e){return this.ensureLayoutInfo(e),this.layoutNodes.get(e)?.layoutInfo||null}getVisibleLayoutInfos(e){let t=this.orientation==="horizontal"?"x":"y",i=this.orientation==="horizontal"?"width":"height";if(e[i]>1){let l=(this.rowSize??this.estimatedRowSize??J)+this.gap;e=e.copy();let n=Math.floor(e[t]/l)*l,a=e[i]+e[t]-n;e[t]=n,e[i]=Math.ceil(a/l)*l;}this.layoutIfNeeded(e);let o=[],r=l=>{for(let n of l)this.isVisible(n,e)&&(o.push(n.layoutInfo),n.children&&r(n.children));};return r(this.rootNodes),o}layoutIfNeeded(e){if(this.lastCollection){this.requestedRect.containsRect(e)||(this.requestedRect=this.requestedRect.union(e),this.rootNodes=this.buildCollection());for(let t of this.virtualizer.persistedKeys)if(this.ensureLayoutInfo(t))return}}ensureLayoutInfo(e){return !this.layoutNodes.has(e)&&this.requestedRect.area<this.contentSize.area&&this.lastCollection?(this.requestedRect=new y(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new y(0,0,this.contentSize.width,this.contentSize.height),true):false}isVisible(e,t){return e.layoutInfo.rect.intersects(t)||e.layoutInfo.isSticky||e.layoutInfo.type==="header"||e.layoutInfo.type==="loader"||this.virtualizer.isPersistedKey(e.layoutInfo.key)}shouldInvalidateEverything(e){let t=e.layoutOptions;return e.sizeChanged||this.rowSize!==(t?.rowSize??t?.rowHeight??this.rowSize)||this.orientation!==(t?.orientation??this.orientation)||this.headingSize!==(t?.headingSize??t?.headingHeight??this.headingSize)||this.loaderSize!==(t?.loaderSize??t?.loaderHeight??this.loaderSize)||this.gap!==(t?.gap??this.gap)||this.padding!==(t?.padding??this.padding)}shouldInvalidateLayoutOptions(e,t){return (e?.rowSize??e?.rowHeight)!==(t?.rowSize??t?.rowHeight)||e.orientation!==t.orientation||(e?.estimatedRowSize??e?.estimatedRowHeight)!==(t?.estimatedRowSize??t?.estimatedRowHeight)||(e?.headingSize??e?.headingHeight)!==(t?.headingSize??t?.headingHeight)||(e?.estimatedHeadingSize??e?.estimatedHeadingHeight)!==(t?.estimatedHeadingSize??t?.estimatedHeadingHeight)||(e?.loaderSize??e?.loaderHeight)!==(t?.loaderSize??t?.loaderHeight)||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.gap!==t.gap||e.padding!==t.padding}update(e){let t=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(e),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=e.layoutOptions;if(this.rowSize=i?.rowSize??i?.rowHeight??this.rowSize,this.orientation=i?.orientation??this.orientation,this.estimatedRowSize=i?.estimatedRowSize??i?.estimatedRowHeight??this.estimatedRowSize,this.headingSize=i?.headingSize??i?.headingHeight??this.headingSize,this.estimatedHeadingSize=i?.estimatedHeadingSize??i?.estimatedHeadingHeight??this.estimatedHeadingSize,this.loaderSize=i?.loaderSize??i?.loaderHeight??this.loaderSize,this.dropIndicatorThickness=i?.dropIndicatorThickness??this.dropIndicatorThickness,this.gap=i?.gap??this.gap,this.padding=i?.padding??this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&t!==this.lastCollection)for(let o of this.lastCollection.getKeys())t.getItem(o)||this.layoutNodes.get(o)&&this.layoutNodes.delete(o);this.lastCollection=t,this.invalidateEverything=false,this.validRect=this.requestedRect.copy();}buildCollection(e=this.padding){let t=this.virtualizer.collection,i=this.orientation==="horizontal"?"x":"y",o=this.orientation==="horizontal"?"maxX":"maxY",r=pt(t,s=>s.type!=="content"),l=r.filter(s=>s.type==="loader"),n=[],a=t?.size===0;a&&(e=0);for(let s of r){let u=(this.rowSize??this.estimatedRowSize??J)+this.gap;if(s.type==="item"&&e+u<this.requestedRect[i]&&!this.isValid(s,e)){e+=u;continue}let c=this.orientation==="horizontal"?this.buildChild(s,e,this.padding,null):this.buildChild(s,this.padding,e,null);if(e=c.layoutInfo.rect[o]+this.gap,n.push(c),s.type==="loader"){let d=l.indexOf(s);l.splice(d,1);}if((s.type==="item"||s.type==="loader")&&e>this.requestedRect[o]){let d=r.indexOf(s);for(let f of l){let g=r.indexOf(f);e+=(g-d-1)*u;let p=this.orientation==="horizontal"?this.buildChild(f,e,this.padding,null):this.buildChild(f,this.padding,e,null);n.push(p),e=p.layoutInfo.rect[o],d=g;}e+=(r.length-d-1)*u;break}}return e=Math.max(e-this.gap,0),e+=a?0:this.padding,this.contentSize=this.orientation==="horizontal"?new m(e,this.virtualizer.size.height):new m(this.virtualizer.size.width,e),n}isValid(e,t){let i=this.layoutNodes.get(e.key),o=this.orientation==="horizontal"?"x":"y";return !this.invalidateEverything&&!!i&&i.node===e&&t===i.layoutInfo.rect[o]&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(e,t,i,o){if(this.isValid(e,this.orientation==="horizontal"?t:i))return this.layoutNodes.get(e.key);let r=this.buildNode(e,t,i);return r.layoutInfo.parentKey=o??null,r.layoutInfo.allowOverflow=true,this.layoutNodes.set(e.key,r),r}buildNode(e,t,i){switch(e.type){case "section":return this.buildSection(e,t,i);case "item":return this.buildItem(e,t,i);case "header":return this.buildSectionHeader(e,t,i);case "loader":return this.buildLoader(e,t,i);case "separator":return this.buildItem(e,t,i);case "submenutrigger":return this.buildSection(e,t,i);default:throw new Error("Unsupported node type: "+e.type)}}buildLoader(e,t,i){let o=new y(t,i,this.padding,0),r=new x(e.type,e.key,o);return this.orientation==="horizontal"?(o.height=this.virtualizer.contentSize.height-this.padding-i,o.width=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??J:0):(o.width=this.virtualizer.contentSize.width-this.padding-t,o.height=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??J:0),{layoutInfo:r,validRect:o.intersection(this.requestedRect)}}buildSection(e,t,i){let o=this.virtualizer.collection,r=this.virtualizer.size.width-this.padding-t,l=this.virtualizer.size.height-this.padding-i,n=this.orientation==="horizontal"?new y(t,i,0,l):new y(t,i,r,0),a=new x(e.type,e.key,n),s=this.orientation==="horizontal"?t:i,u=this.orientation==="horizontal"?"x":"y",c=this.orientation==="horizontal"?"maxX":"maxY",d=this.orientation==="horizontal"?"width":"height",f=0,g=[];for(let p of b$2(e,o)){if(p.type==="content")continue;let L=(this.rowSize??this.estimatedRowSize??J)+this.gap;if(s+L<this.requestedRect[u]&&!this.isValid(e,s)){s+=L,f++;continue}let v=this.orientation==="horizontal"?this.buildChild(p,s,i,a.key):this.buildChild(p,t,s,a.key);if(s=v.layoutInfo.rect[c]+this.gap,g.push(v),s>this.requestedRect[c]){s+=([...b$2(e,o)].length-(g.length+f))*L;break}}return s-=this.gap,n[d]=s-(this.orientation==="horizontal"?t:i),{layoutInfo:a,children:g,validRect:a.rect.intersection(this.requestedRect),node:e}}buildSectionHeader(e,t,i){let o=this.orientation==="horizontal"?"height":"width",r=this.orientation==="horizontal"?"width":"height",l=this.virtualizer.size[o]-this.padding-(this.orientation==="horizontal"?i:t),n=this.headingSize,a=false;if(n==null){let c=this.layoutNodes.get(e.key),d=c?.layoutInfo;if(d){let f=this.virtualizer.collection.getItem(e.key),g=this.lastCollection?this.lastCollection.getItem(e.key):null;n=c.layoutInfo.rect[r],a=l!==d.rect[o]||f!==g||d.estimatedSize;}else n=e.rendered?this.estimatedHeadingSize:0,a=true;}n==null&&(n=J);let s=this.orientation==="horizontal"?new y(t,i,n,l-i):new y(t,i,l-t,n),u=new x("header",e.key,s);return u.estimatedSize=a,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}buildItem(e,t,i){let o=this.orientation==="horizontal"?"height":"width",r=this.orientation==="horizontal"?"width":"height",l=this.virtualizer.size[o]-this.padding-(this.orientation==="horizontal"?i:t),n=this.rowSize,a=false;if(n==null){let c=this.layoutNodes.get(e.key);c?(n=c.layoutInfo.rect[r],a=l!==c.layoutInfo.rect[o]||e!==c.node||c.layoutInfo.estimatedSize):(n=this.estimatedRowSize,a=true);}n==null&&(n=J);let s=this.orientation==="horizontal"?new y(t,i,n,l):new y(t,i,l,n),u=new x(e.type,e.key,s);return u.estimatedSize=a,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}updateItemSize(e,t){let i=this.layoutNodes.get(e);if(!i)return false;let o=this.virtualizer.collection,r=i.layoutInfo,l=this.orientation==="horizontal"?"x":"y",n=this.orientation==="horizontal"?"width":"height";if(r.estimatedSize=false,r.rect[n]!==t[n]){let a=r.copy();a.rect[n]=t[n],i.layoutInfo=a,this.validRect[n]=Math.min(this.validRect[n],r.rect[l]-this.validRect[l]),i.node?.type==="item"&&(this.requestedRect[n]+=a.rect[n]-r.rect[n]),this.updateLayoutNode(e,r,a);let s=r.parentKey!=null?o.getItem(r.parentKey):null;for(;s;)this.updateLayoutNode(s.key,r,a),s=s.parentKey!=null?o.getItem(s.parentKey):null;return true}return false}updateLayoutNode(e,t,i){let o=this.layoutNodes.get(e);o&&(o.validRect=o.validRect.intersection(this.validRect),o.layoutInfo===t&&(o.layoutInfo=i));}getContentSize(){return this.contentSize}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let o=new y(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(o),l=null,n=1/0;for(let c of r){if(!c.rect.intersects(o))continue;let d=Math.abs(c.rect.y-t),f=Math.abs(c.rect.maxY-t),g=Math.min(d,f);g<n&&(n=g,l=c.key);}if(l==null||this.virtualizer.collection.size===0)return {type:"root"};let a=this.getLayoutInfo(l);if(!a)return null;let s=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=s.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=s.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=s.y+s.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;if(e.dropPosition==="before")i=this.orientation==="horizontal"?new y(Math.max(0,t.rect.x-this.dropIndicatorThickness/2),t.rect.y,this.dropIndicatorThickness,t.rect.height):new y(t.rect.x,Math.max(0,t.rect.y-this.dropIndicatorThickness/2),t.rect.width,this.dropIndicatorThickness);else if(e.dropPosition==="after"){let o=this.collection.getItem(e.key);if(o){let r=o.level??0,l=this.collection.getKeyAfter(e.key);for(;l!=null;){let n=this.collection.getItem(l);if(!n||n.level<=r)break;t=this.getLayoutInfo(l)||t,l=this.collection.getKeyAfter(l);}}i=this.orientation==="horizontal"?new y(t.rect.maxX-this.dropIndicatorThickness/2,t.rect.y,this.dropIndicatorThickness,t.rect.height):new y(t.rect.x,t.rect.maxY-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness);}else i=t.rect;return new x("dropIndicator",e.key+":"+e.dropPosition,i)}};function pt(h,e){let t=[];for(let i of h)e(i)&&t.push(i);return t}var Be=48,le=class extends Y{lastCollection=null;columnWidths=new Map;stickyColumnIndices;lastPersistedKeys=null;persistedIndices=new Map;constructor(e){super(e),this.stickyColumnIndices=[];}get collection(){return this.virtualizer.collection}get rowHeight(){return super.rowHeight}get estimatedRowHeight(){return super.estimatedRowHeight}get headingHeight(){return super.headingHeight}get estimatedHeadingHeight(){return super.estimatedHeadingHeight}get loaderHeight(){return super.loaderHeight}columnsChanged(e,t){return !t||e.columns!==t.columns&&e.columns.length!==t.columns.length||e.columns.some((i,o)=>i.key!==t.columns[o].key||i.props.width!==t.columns[o].props.width||i.props.minWidth!==t.columns[o].props.minWidth||i.props.maxWidth!==t.columns[o].props.maxWidth)}shouldInvalidateLayoutOptions(e,t){return e.columnWidths!==t.columnWidths||super.shouldInvalidateLayoutOptions(e,t)}update(e){let t=this.virtualizer.collection;if(e.layoutOptions?.columnWidths){for(let[i,o]of e.layoutOptions.columnWidths)if(this.columnWidths.get(i)!==o){this.columnWidths=e.layoutOptions.columnWidths,e.sizeChanged=true;break}}else if(e.sizeChanged||this.columnsChanged(t,this.lastCollection)){let i=new a$4({});this.columnWidths=i.buildColumnWidths(this.virtualizer.size.width-this.padding*2,t,new Map),e.sizeChanged=true;}super.update(e);}buildCollection(){this.stickyColumnIndices=[];let e=this.virtualizer.collection;for(let r of e.columns)(this.isStickyColumn(r)||e.rowHeaderColumnKeys.has(r.key))&&this.stickyColumnIndices.push(r.index);let t=[],i=0,o=0;if(e.head){for(let r of e)switch(r.type){case "tableheader":{let l=this.buildTableHeader();i=l.layoutInfo.rect.maxY+this.gap,o=Math.max(o,l.layoutInfo.rect.width),this.layoutNodes.set(l.layoutInfo.key,l),t.push(l);break}case "tablebody":case "tablefooter":{let l=this.buildRowGroup(i,r);i=l.layoutInfo.rect.maxY+this.gap,o=Math.max(o,l.layoutInfo.rect.width),this.layoutNodes.set(l.layoutInfo.key,l),t.push(l);break}}i>0&&(i-=this.gap);for(let r of t)r.layoutInfo.rect.width=o;}else {let r=this.buildTableHeader();this.layoutNodes.set(r.layoutInfo.key,r);let l=this.buildBody(r.layoutInfo.rect.maxY+this.gap);l.layoutInfo.rect.width=Math.max(r.layoutInfo.rect.width,l.layoutInfo.rect.width),i=l.layoutInfo.rect.maxY,o=l.layoutInfo.rect.width,t=[r,l];}return this.lastPersistedKeys=null,this.contentSize=new m(o+this.padding*2,i+this.padding),t}buildTableHeader(){let e=this.virtualizer.collection,t=new y(this.padding,this.padding,0,0),i=new x("header",e.head?.key??"header",t);i.isSticky=true,i.zIndex=1;let o=this.padding,r=0,l=[];for(let n of e.headerRows){let a=this.buildChild(n,this.padding,o,i.key);a.layoutInfo.parentKey=i.key,o=a.layoutInfo.rect.maxY,r=Math.max(r,a.layoutInfo.rect.width),a.index=l.length,l.push(a);}return t.width=r,t.height=o-this.padding,{layoutInfo:i,children:l,validRect:i.rect,node:e.head}}buildHeaderRow(e,t,i){let o=new y(t,i,0,0),r=new x("headerrow",e.key,o),l=0,n=[];for(let a of b$2(e,this.virtualizer.collection)){let s=this.buildChild(a,t,i,r.key);s.layoutInfo.parentKey=r.key,t=s.layoutInfo.rect.maxX,l=Math.max(l,s.layoutInfo.rect.height),s.index=n.length,n.push(s);}for(let[a,s]of n.entries())s.layoutInfo.zIndex=n.length-a+1;return this.setChildHeights(n,l),o.height=l,o.width=t-o.x,{layoutInfo:r,children:n,validRect:o,node:e}}setChildHeights(e,t){for(let i of e)i.layoutInfo.rect.height!==t&&(i.layoutInfo=i.layoutInfo.copy(),i.layoutInfo.rect.height=t);}getRenderedColumnWidth(e){let t=this.virtualizer.collection,i=e.colSpan??1,o=e.colIndex??e.index,r=0;for(let l=o;l<o+i;l++){let n=t.columns[l];n?.key!=null&&(r+=this.columnWidths.get(n.key)??0);}return r}getEstimatedHeight(e,t,i,o){let r=false;if(i==null){let l=this.layoutNodes.get(e.key);l?(i=l.layoutInfo.rect.height,r=e!==l.node||t!==l.layoutInfo.rect.width||l.layoutInfo.estimatedSize):(i=o??Be,r=true);}return {height:i,isEstimated:r}}getEstimatedRowHeight(){return this.rowHeight??this.estimatedRowHeight??Be}buildColumn(e,t,i){let o=this.getRenderedColumnWidth(e),{height:r,isEstimated:l}=this.getEstimatedHeight(e,o,this.headingHeight??this.rowHeight,this.estimatedHeadingHeight??this.estimatedRowHeight),n=new y(t,i,o,r),a=new x(e.type,e.key,n);return a.isSticky=this.isStickyColumn(e),a.zIndex=a.isSticky?2:1,a.estimatedSize=l,{layoutInfo:a,children:[],validRect:a.rect,node:e}}isStickyColumn(e){return false}buildBody(e){let t=this.virtualizer.collection;return this.buildRowGroup(e,t.body)}buildRowGroup(e,t){let i=this.virtualizer.collection,o=new y(this.padding,e,0,0),r=new x("rowgroup",t.key,o),l=e,n=0,a=[],s=this.getEstimatedRowHeight()+this.gap,u=b$2(t,i);for(let d of u){if(e+s<this.requestedRect.y&&!this.isValid(d,e)||e>this.requestedRect.maxY&&d.type!=="loader"){e+=s;continue}let f=this.buildChild(d,this.padding,e,r.key);f.layoutInfo.parentKey=r.key,f.index=a.length,e=f.layoutInfo.rect.maxY+this.gap,n=Math.max(n,f.layoutInfo.rect.width),a.push(f);}return i?.size===0?e=this.virtualizer.size.height:e-=this.gap,o.width=n,o.height=e-l,{layoutInfo:r,children:a,validRect:r.rect.intersection(this.requestedRect),node:t}}buildLoader(e,t,i){let o=super.buildLoader(e,t,i),r=this.virtualizer.collection;return o.layoutInfo.rect.width=this.layoutNodes.get(r.head?.key??"header").layoutInfo.rect.width,o.validRect=o.layoutInfo.rect.intersection(this.requestedRect),o}buildNode(e,t,i){switch(e.type){case "headerrow":return this.buildHeaderRow(e,t,i);case "item":return this.buildRow(e,t,i);case "column":case "placeholder":return this.buildColumn(e,t,i);case "cell":return this.buildCell(e,t,i);case "loader":return this.buildLoader(e,t,i);default:throw new Error("Unknown node type "+e.type)}}buildRow(e,t,i){let o=this.virtualizer.collection,r=new y(t,i,0,0),l=new x("row",e.key,r),n=[],a=0;for(let s of b$2(e,o))if(s.type==="cell")if(t>this.requestedRect.maxX){let u=this.layoutNodes.get(s.key);if(u)u.layoutInfo.rect.x=t,t+=u.layoutInfo.rect.width;else break}else {let u=this.buildChild(s,t,i,l.key);t=u.layoutInfo.rect.maxX,a=Math.max(a,u.layoutInfo.rect.height),u.index=n.length,n.push(u);}return this.setChildHeights(n,a),r.width=this.layoutNodes.get(o.head?.key??"header").layoutInfo.rect.width,r.height=a,{layoutInfo:l,children:n,validRect:r.intersection(this.requestedRect),node:e}}buildCell(e,t,i){let o=this.getRenderedColumnWidth(e),{height:r,isEstimated:l}=this.getEstimatedHeight(e,o,this.rowHeight,this.estimatedRowHeight),n=new y(t,i,o,r),a=new x(e.type,e.key,n);return a.isSticky=this.isStickyColumn(e),a.zIndex=a.isSticky?2:1,a.estimatedSize=l,{layoutInfo:a,children:[],validRect:n,node:e}}getVisibleLayoutInfos(e){if(e.height>1){let i=this.getEstimatedRowHeight();e.y=Math.floor(e.y/i)*i,e.height=Math.ceil(e.height/i)*i;}this.layoutIfNeeded(e);let t=[];this.buildPersistedIndices();for(let i of this.rootNodes)t.push(i.layoutInfo),this.addVisibleLayoutInfos(t,i,e);return t}addVisibleLayoutInfos(e,t,i){if(!(!t.children||t.children.length===0))switch(t.layoutInfo.type){case "header":{for(let o of t.children)e.push(o.layoutInfo),this.addVisibleLayoutInfos(e,o,i);break}case "rowgroup":{let o=this.binarySearch(t.children,i.topLeft,"y"),r=this.binarySearch(t.children,i.bottomRight,"y"),l=this.persistedIndices.get(t.layoutInfo.key),n=0;for(;l&&n<l.length&&l[n]<o;){let s=l[n];s<t.children.length&&(e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i)),n++;}for(let s=o;s<=r;s++){for(;l&&n<l.length&&l[n]<s;)n++;e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i);}for(;l&&n<l.length;){let s=l[n++];s<t.children.length&&(e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i));}let a=t.children.at(-1);a?.layoutInfo.type==="loader"&&e.push(a.layoutInfo);break}case "headerrow":case "row":{let o=this.binarySearch(t.children,i.topLeft,"x"),r=this.binarySearch(t.children,i.topRight,"x"),l=0,n=this.persistedIndices.get(t.layoutInfo.key)||this.stickyColumnIndices;for(;l<n.length&&n[l]<o;){let a=n[l];a<t.children.length&&e.push(t.children[a].layoutInfo),l++;}for(let a=o;a<=r;a++){for(;l<n.length&&n[l]<a;)l++;e.push(t.children[a].layoutInfo);}for(;l<n.length;){let a=n[l++];a<t.children.length&&e.push(t.children[a].layoutInfo);}break}default:throw new Error("Unknown node type "+t.layoutInfo.type)}}binarySearch(e,t,i){let o=0,r=e.length-1;for(;o<=r;){let l=o+r>>1,n=e[l];if(i==="x"&&n.layoutInfo.rect.maxX<=t.x||i==="y"&&n.layoutInfo.rect.maxY<=t.y)o=l+1;else if(i==="x"&&n.layoutInfo.rect.x>t.x||i==="y"&&n.layoutInfo.rect.y>t.y)r=l-1;else return l}return Math.max(0,Math.min(e.length-1,o))}buildPersistedIndices(){if(this.virtualizer.persistedKeys!==this.lastPersistedKeys){this.lastPersistedKeys=this.virtualizer.persistedKeys,this.persistedIndices.clear();for(let e of this.virtualizer.persistedKeys){let t=this.layoutNodes.get(e)?.layoutInfo;for(;t&&t.parentKey;){let i=this.virtualizer.collection.getItem(t.key),o=this.persistedIndices.get(t.parentKey);o||(o=i?.type==="cell"||i?.type==="column"?[...this.stickyColumnIndices]:[],this.persistedIndices.set(t.parentKey,o));let r=this.layoutNodes.get(t.key)?.index;r!=null&&!o.includes(r)&&o.push(r),t=this.layoutNodes.get(t.parentKey)?.layoutInfo;}}for(let e of this.persistedIndices.values())e.sort((t,i)=>t-i);}}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let o=new y(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(o),l=null,n=1/0;for(let c of r){if(c.type!=="row"||!c.rect.intersects(o))continue;let d=Math.abs(c.rect.y-t),f=Math.abs(c.rect.maxY-t),g=Math.min(d,f);g<n&&(n=g,l=c.key);}if(l==null||this.virtualizer.collection.size===0)return {type:"root"};let a=this.getLayoutInfo(l);if(!a)return null;let s=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=s.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=s.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=s.y+s.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t=super.getDropTargetLayoutInfo(e);return t.parentKey=this.virtualizer.collection.getItem(e.key)?.parentKey??null,t}};var Le=class extends x{column=0;index=0;copy(){let e=super.copy();return e.column=this.column,e.index=this.index,e}},K={minItemSize:new m(200,200),maxItemSize:new m(1/0,1/0),minSpace:new m(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48},ne=class extends F{contentSize=new m;layoutInfos=new Map;numColumns=0;dropIndicatorThickness=2;margin=0;shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||!(e.minItemSize||K.minItemSize).equals(t.minItemSize||K.minItemSize)||!(e.maxItemSize||K.maxItemSize).equals(t.maxItemSize||K.maxItemSize)||!(e.minSpace||K.minSpace).equals(t.minSpace||K.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight}update(e){let{minItemSize:t=K.minItemSize,maxItemSize:i=K.maxItemSize,minSpace:o=K.minSpace,maxHorizontalSpace:r=K.maxSpace,maxColumns:l=K.maxColumns,dropIndicatorThickness:n=K.dropIndicatorThickness,loaderHeight:a=K.loaderHeight}=e.layoutOptions||{};this.dropIndicatorThickness=n;let s=this.virtualizer.size.width,u=Math.min(i.width,s),c=Number.isFinite(i.height)?i.height:Math.floor(t.height/t.width*u),d=Math.floor(s/(t.width+o.width)),f=Math.max(1,Math.min(l,d)),g=s-o.width*Math.max(0,f),p=Math.floor(g/f);p=Math.max(t.width,Math.min(u,p));let L=(p-t.width)/Math.max(1,u-t.width),v=t.height+Math.floor((c-t.height)*L);v=Math.max(t.height,Math.min(c,v));let N=Math.min(Math.max(r,o.width),Math.floor((s-f*p)/(f+1)));this.margin=Math.floor((s-f*p-N*(f+1))/2);let T=Array(f).fill(o.height),O=new Map,k=0,j=(I,S)=>{let b=this.layoutInfos.get(I),R=v,P=true;b&&(R=b.rect.height/b.rect.width*p,P=e.sizeChanged||b.estimatedSize||b.content!==S);let E=(f===this.numColumns&&b&&b.index===k&&b.rect.y<this.virtualizer.visibleRect.maxY?b.column:void 0)??T.reduce((he,ue,te)=>ue<T[he]?te:he,0),A=N+E*(p+N)+this.margin,_=T[E],D=new y(A,_,p,R),H=new Le(S.type,I,D);H.estimatedSize=P,H.allowOverflow=true,H.content=S,H.column=E,H.index=k++,O.set(I,H),T[E]+=H.rect.height+o.height;},M=this.virtualizer.collection,q=0;for(let I of M)if(I.type==="skeleton"){let S=[...T];for(;!T.every((b,R)=>b!==S[R])||Math.min(...T)<this.virtualizer.size.height;){let b=`${I.key}-${q++}`,R=this.layoutInfos.get(b)?.content||{...I};j(b,R);}break}else I.type!=="loader"&&j(I.key,I);let z=M?.size===0&&M.getItem(M.getFirstKey())?.type!=="skeleton"?0:Math.max(...T),w=M.getItem(M.getLastKey());if(w?.type==="loader"){(q>0||!w.props.isLoading)&&(a=0);let I=s-N*2,S=new y(N,z,I,a),b=new x("loader",w.key,S);O.set(w.key,b),z=b.rect.maxY;}this.contentSize=new m(this.virtualizer.size.width,z),this.layoutInfos=O,this.numColumns=f;}getLayoutInfo(e){return this.layoutInfos.get(e)}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let i of this.layoutInfos.values())(i.rect.intersects(e)||this.virtualizer.isPersistedKey(i.key)||i.type==="loader")&&t.push(i);return t}updateItemSize(e,t){let i=this.layoutInfos.get(e);if(!t||!i)return false;if(t.height!==i.rect.height){let o=i.copy();return o.rect.height=t.height,o.estimatedSize=false,this.layoutInfos.set(e,o),true}return false}getKeyRightOf(e){let t=this.getLayoutInfo(e);if(!t)return null;let i=new y(t.rect.maxX,t.rect.y,this.virtualizer.visibleRect.maxX-t.rect.maxX,t.rect.height),o=this.getVisibleLayoutInfos(i),r=null,l=1/0;for(let n of o){if(n.key===e)continue;let a=n.rect.x-i.x,s=Math.min(n.rect.maxY,i.maxY)-Math.max(n.rect.y,i.y),u=a-s;u<l&&(l=u,r=n.key);}return r}getKeyLeftOf(e){let t=this.getLayoutInfo(e);if(!t)return null;let i=new y(0,t.rect.y,t.rect.x,t.rect.height),o=this.getVisibleLayoutInfos(i),r=null,l=1/0;for(let n of o){if(n.key===e)continue;let a=i.maxX-n.rect.maxX,s=Math.min(n.rect.maxY,i.maxY)-Math.max(n.rect.y,i.y),u=a-s;u<l&&(l=u,r=n.key);}return r}getKeyRange(e,t){let i=this.getLayoutInfo(e),o=this.getLayoutInfo(t);if(!i||!o)return [];let r=i.rect.union(o.rect),l=[];for(let n of this.layoutInfos.values())r.intersection(n.rect).area>n.rect.area/2&&l.push(n.key);return l}getDropTargetFromPoint(e,t){if(this.layoutInfos.size===0)return {type:"root"};e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let i=this.virtualizer.keyAtPoint(new C(e,t));return i==null?{type:"root"}:{type:"item",key:i,dropPosition:"on"}}};var Re=new WeakMap;function Ue(h=false,e=document){if(!Re.has(e)||h){let t=e.createElement("div"),i=t.style;i.width="50px",i.height="50px",i.overflow="scroll",i.direction="rtl";let o=e.createElement("div"),r=o.style;r.width="100px",r.height="100px",t.appendChild(o),e.body.appendChild(t);let l;t.scrollLeft>0?l="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?l="negative":l="positive-ascending"),e.body.removeChild(t),Re.set(e,l);}return Re.get(e)}function ae(h,e){let{scrollLeft:t}=h;if(e==="rtl"){let{scrollWidth:i,clientWidth:o}=h;switch(Ue(false,a$3(h))){case "negative":t=-t;break;case "positive-descending":t=i-o-t;break}}return t}function zt(h,e){e=a(e);let{scrollViewProps:t,contentProps:i}=Ie(h,e);return jsx("div",{role:"presentation",...t,ref:e,children:jsx("div",{...i,children:h.children})})}yt.forwardRef(zt);function Ie(h$1,e$2){let{contentSize:t,onVisibleRectChange:i,onSizeChange:o,innerStyle:r,onScrollStart:l$1,onScrollEnd:n,scrollDirection:a="both",onScroll:s,allowsWindowScrolling:u$1,...c}=h$1,d=useRef({scrollPosition:new C,size:new m,viewportOffset:new C,viewportSize:new m,scrollEndTime:0,scrollTimeout:null,isScrolling:false,lastVisibleRect:new y}).current,{direction:f}=b(),g=useCallback(()=>{let z=u$1?new y(d.viewportOffset.x+d.scrollPosition.x,d.viewportOffset.y+d.scrollPosition.y,Math.max(0,Math.min(d.size.width-d.viewportOffset.x,d.viewportSize.width)),Math.max(0,Math.min(d.size.height-d.viewportOffset.y,d.viewportSize.height))):new y(d.scrollPosition.x,d.scrollPosition.y,d.size.width,d.size.height);(z.area>0||d.lastVisibleRect.area>0)&&(i(z),d.lastVisibleRect=z);},[d,u$1,i]),[p,L]=useState(false),v=useCallback(z=>{let w=j(z);if(!h(w,e$2.current))return;if(s&&w===e$2.current&&s(z),w!==e$2.current){let S=e$2.current.getBoundingClientRect(),b=S.x<0?-S.x:0,R=S.y<0?-S.y:0;if(b===d.viewportOffset.x&&R===d.viewportOffset.y)return;d.viewportOffset=new C(b,R);}else {let S=w.scrollTop,b=ae(w,f);d.scrollPosition=new C(Math.max(0,Math.min(b,t.width-d.size.width)),Math.max(0,Math.min(S,t.height-d.size.height)));}let I=b$1(z.currentTarget);flushSync(()=>{g(),d.isScrolling||(d.isScrolling=true,L(true),I.dispatchEvent(new I.Event("tk.disconnect-observer")),l$1&&l$1());let S=Date.now();d.scrollEndTime<=S+50&&(d.scrollEndTime=S+300,d.scrollTimeout!=null&&clearTimeout(d.scrollTimeout),d.scrollTimeout=setTimeout(()=>{d.isScrolling=false,L(false),d.scrollTimeout=null,I.dispatchEvent(new I.Event("tk.connect-observer")),n&&n();},300));});},[s,e$2,f,d,t,g,l$1,n]);a$1(e$2,"scroll",v),useEffect(()=>{let z=e$2.current;if(z)return e(l(z),"scroll",w=>{j(w)!==z&&v(w);},true)},[e$2,v]),useEffect(()=>()=>{if(d.scrollTimeout!=null&&clearTimeout(d.scrollTimeout),d.isScrolling){let z=b$1(e$2.current);z.dispatchEvent(new z.Event("tk.connect-observer"));}},[]);let N=useRef(false),T=useCallback(z=>{let w=e$2.current;if(!w||N.current)return;N.current=true;let I=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,S=b$1(w),b=Object.getOwnPropertyNames(S.HTMLElement.prototype).includes("clientWidth"),R=Object.getOwnPropertyNames(S.HTMLElement.prototype).includes("clientHeight"),P=w.clientWidth,G=w.clientHeight,E=I&&!b?1/0:P,A=I&&!R?1/0:G,_=S.innerWidth,D=S.innerHeight,H=d.viewportSize.width!==_||d.viewportSize.height!==D;H&&(d.viewportSize=new m(_,D)),(d.size.width!==E||d.size.height!==A||H)&&(d.size=new m(E,A),z(()=>{g(),o?.(d.size);}),(!I&&P!==w.clientWidth||G!==w.clientHeight)&&(d.size=new m(w.clientWidth,w.clientHeight),z(()=>{g(),o?.(d.size);}))),N.current=false;},[e$2,d,g,o]),O=u(T);useEffect(()=>{let z=b$1(e$2.current);d.viewportSize=new m(z.innerWidth,z.innerHeight);let w=()=>{O(flushSync);};return z.addEventListener("resize",w),()=>z.removeEventListener("resize",w)},[d,e$2]);let k=useRef(null),[j$1,M]=useState({});a$2(()=>{if(!N.current&&(k.current==null||!t.equals(k.current)))if(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"){M({}),k.current=t;return}else queueMicrotask(()=>O(flushSync));k.current=t;}),a$2(()=>{O(z=>z());},[j$1]);let q=useCallback(()=>{T(flushSync);},[T]);e$1({ref:e$2,box:"border-box",onResize:q});let X={padding:0,...c.style};return a==="horizontal"?(X.overflowX="auto",X.overflowY="hidden"):a==="vertical"||t.width===d.size.width?(X.overflowY="auto",X.overflowX="hidden"):X.overflow="auto",r={width:Number.isFinite(t.width)?t.width:void 0,height:Number.isFinite(t.height)?t.height:void 0,pointerEvents:p?"none":"auto",position:"relative",...r},{isScrolling:p,scrollViewProps:{...c,style:X},contentProps:{role:"presentation",style:r}}}function Ze(h){let{layoutInfo:e,virtualizer:t,ref:i,shouldObserveItemSize:o}=h,r=e?.key,l=useCallback(()=>{if(r!=null&&i.current){if(!b$4(i.current))return;let a=St(i.current);t.updateItemSize(r,a);}},[t,r,i]),n=u(l);return a$2(()=>{e?.estimatedSize&&n();}),useEffect(()=>{if(!o)return;let a=i.current;if(!a||typeof ResizeObserver>"u")return;let s=new ResizeObserver(u=>{u.length&&n();});for(let u of a.children)s.observe(u);return ()=>{s.disconnect();}},[o,i,r]),{updateSize:l}}function St(h){let e=h.style.height;h.style.height="";let t=new m(h.scrollWidth,h.scrollHeight);return h.style.height=e,t}function be(h){let{style:e,className:t,layoutInfo:i,virtualizer:o,parent:r,children:l,shouldObserveItemSize:n}=h,{direction:a}=b(),s=useRef(null);return Ze({layoutInfo:i,virtualizer:o,ref:s,shouldObserveItemSize:n}),jsx("div",{role:"presentation",ref:s,className:t,style:{...et(i,a,r),...e},children:l})}var Qe=new WeakMap;function et(h,e,t){let i=e==="rtl"?"right":"left",o=Qe.get(h);if(o&&o[i]!=null){if(!t)return o;let n=h.rect.y-t.rect.y,a=h.rect.x-t.rect.x;if(o.top===n&&o[i]===a)return o}let r={top:h.rect.y-(t&&!(t.allowOverflow&&h.isSticky)?t.rect.y:0),[i]:h.rect.x-(t&&!(t.allowOverflow&&h.isSticky)?t.rect.x:0),width:h.rect.width,height:h.rect.height};Object.entries(r).forEach(([n,a])=>{Number.isFinite(a)||(r[n]=void 0);});let l={position:h.isSticky?"sticky":"absolute",display:h.isSticky?"inline-block":void 0,overflow:h.allowOverflow?"visible":"hidden",opacity:h.opacity,zIndex:h.zIndex,transform:h.transform??void 0,contain:"size layout style",...r};return Qe.set(h,l),l}var ot=createContext(null),Ne=createContext(null);function rt(h){let{children:e,layout:t,layoutOptions:i,shouldObserveItemSize:o}=h,r=useMemo(()=>typeof t=="function"?new t:t,[t]),l=useRef(null),{direction:n}=b(),a=useMemo(()=>({isVirtualized:true,layoutDelegate:r,dropTargetDelegate:r.getDropTargetFromPoint?{getDropTargetFromPoint(s,u,c){let d=l.current?.current;if(d&&r.virtualizer){let{visibleRect:f}=r.virtualizer;s-=f.x-ae(d,n),u-=f.y-d.scrollTop;}return r.getDropTargetFromPoint(s,u,c)}}:void 0,CollectionRoot:Tt,CollectionBranch:Ct}),[r,n]);return jsx(p.Provider,{value:a,children:jsx(Ne.Provider,{value:{layout:r,layoutOptions:i,shouldObserveItemSize:o,scrollRefHolder:l},children:e})})}function Tt({collection:h,persistedKeys:e,scrollRef:t,renderDropIndicator:i}){let{layout:o,layoutOptions:r,shouldObserveItemSize:l,scrollRefHolder:n}=useContext(Ne);a$2(()=>{n.current=t??null;},[n,t]);let a=o.useLayoutOptions?.(),s=xe({allowsWindowScrolling:true,layout:o,collection:h,renderView:(c,d)=>d?.render?.(d),onVisibleRectChange(c){let d=t?.current;d&&(d.scrollLeft=c.x,d.scrollTop=c.y);},persistedKeys:e,layoutOptions:useMemo(()=>r&&a?{...r,...a}:r||a,[r,a])}),{contentProps:u}=Ie({onVisibleRectChange:s.setVisibleRect,onSizeChange:s.setSize,contentSize:s.contentSize,onScrollStart:s.startScrolling,onScrollEnd:s.endScrolling,allowsWindowScrolling:true},t);return jsx("div",{...u,children:jsx(ot.Provider,{value:s,children:lt(null,s.visibleViews,i,l)})})}function Ct({parent:h,renderDropIndicator:e}){let i=useContext(ot).virtualizer.getVisibleView(h.key),{shouldObserveItemSize:o}=useContext(Ne);return lt(i,Array.from(i.children),e,o)}function lt(h,e,t,i){return e.map(o=>kt(h,o,t,i))}function kt(h,e,t,i){let o$1=jsx(be,{layoutInfo:e.layoutInfo,virtualizer:e.virtualizer,parent:h?.layoutInfo,shouldObserveItemSize:i,children:e.rendered},e.key),{collection:r,layout:l}=e.virtualizer,n=e.content;return n?.type==="item"&&t&&l.getDropTargetLayoutInfo&&(o$1=jsxs(yt.Fragment,{children:[tt(h,e,{type:"item",key:e.content.key,dropPosition:"before"},t),o$1,o(r,n,a=>tt(h,e,a,t))]},e.key)),o$1}function tt(h,e,t,i){let o=i(t);if(o){let r=e.virtualizer.layout.getDropTargetLayoutInfo(t);o=jsx(be,{layoutInfo:r,virtualizer:e.virtualizer,parent:h?.layoutInfo,children:o});}return o}var Q=class extends re{useLayoutOptions(){let{direction:e}=b();return useMemo(()=>({direction:e}),[e])}};var ee=class extends le{useLayoutOptions(){let e=useContext(b$3);return useMemo(()=>({columnWidths:e?.columnWidths}),[e?.columnWidths])}};var se=class extends Q{useLayoutOptions(){let{direction:e}=b();return {direction:e}}};var Rr={LIST_BOX:{layout:Y,layoutOptions:{rowHeight:36}},TREE_VIEW:{layout:Y,layoutOptions:{rowHeight:44}},IMAGE_GALLERY:{layout:se,layoutOptions:{minItemSize:new m(114,167),maxItemSize:new m(114,167),dropIndicatorThickness:2,maxHorizontalSpace:0,minSpace:new m(4,16),preserveAspectRatio:true}},TABLE:{layout:ee,layoutOptions:{rowHeight:48,headingHeight:48}}};export{m as a,Y as b,ne as c,rt as d,Q as e,ee as f,se as g,Rr as h};
10
+ var C=class h{x;y;constructor(e=0,t=0){this.x=e,this.y=t;}copy(){return new h(this.x,this.y)}equals(e){return this.x===e.x&&this.y===e.y}isOrigin(){return this.x===0&&this.y===0}};var y=class h{x;y;width;height;constructor(e=0,t=0,i=0,o=0){this.x=e,this.y=t,this.width=i,this.height=o;}get maxX(){return this.x+this.width}get maxY(){return this.y+this.height}get area(){return this.width*this.height}get topLeft(){return new C(this.x,this.y)}get topRight(){return new C(this.maxX,this.y)}get bottomLeft(){return new C(this.x,this.maxY)}get bottomRight(){return new C(this.maxX,this.maxY)}intersects(e){return (process.env.NODE_ENV==="test"&&!process.env.VIRT_ON||this.area>0&&e.area>0)&&this.x<=e.x+e.width&&e.x<=this.x+this.width&&this.y<=e.y+e.height&&e.y<=this.y+this.height}containsRect(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.maxX&&this.maxY>=e.maxY}containsPoint(e){return this.x<=e.x&&this.y<=e.y&&this.maxX>=e.x&&this.maxY>=e.y}getCornerInRect(e){for(let t of ["topLeft","topRight","bottomLeft","bottomRight"])if(e.containsPoint(this[t]))return t;return null}equals(e){return e.x===this.x&&e.y===this.y&&e.width===this.width&&e.height===this.height}pointEquals(e){return this.x===e.x&&this.y===e.y}sizeEquals(e){return this.width===e.width&&this.height===e.height}union(e){let t=Math.min(this.x,e.x),i=Math.min(this.y,e.y),o=Math.max(this.maxX,e.maxX)-t,r=Math.max(this.maxY,e.maxY)-i;return new h(t,i,o,r)}intersection(e){if(!this.intersects(e))return new h(0,0,0,0);let t=Math.max(this.x,e.x),i=Math.max(this.y,e.y);return new h(t,i,Math.min(this.maxX,e.maxX)-t,Math.min(this.maxY,e.maxY)-i)}copy(){return new h(this.x,this.y,this.width,this.height)}};var m=class h{width;height;constructor(e=0,t=0){this.width=Math.max(e,0),this.height=Math.max(t,0);}copy(){return new h(this.width,this.height)}equals(e){return this.width===e.width&&this.height===e.height}get area(){return this.width*this.height}};var nt=0,ye=class{virtualizer;layoutInfo;content;rendered;viewType;key;children;reusableViews;constructor(e,t){this.virtualizer=e,this.key=++nt,this.viewType=t,this.children=new Set,this.reusableViews=new Map,this.layoutInfo=null,this.content=null,this.rendered=null;}prepareForReuse(){this.content=null,this.rendered=null,this.layoutInfo=null;}getReusableView(e){let t=this.reusableViews.get(e);return t&&t.length>0?t.shift():new ve(this.virtualizer,this,e)}reuseChild(e){e.prepareForReuse();let t=this.reusableViews.get(e.viewType);t||(t=[],this.reusableViews.set(e.viewType,t)),t.push(e);}},fe=class extends ye{constructor(e){super(e,"root");}},ve=class extends ye{parent;constructor(e,t,i){super(e,i),this.parent=t;}};function qe(h,e){if(h===e)return true;if(h.size!==e.size)return false;for(let t of h)if(!e.has(t))return false;return true}var me=class{startTime=0;velocity=new C(0,0);visibleRect=new y;setVisibleRect(e){let t=performance.now()-this.startTime;t<500&&(e.x!==this.visibleRect.x&&t>0&&(this.velocity.x=(e.x-this.visibleRect.x)/t),e.y!==this.visibleRect.y&&t>0&&(this.velocity.y=(e.y-this.visibleRect.y)/t)),this.startTime=performance.now(),this.visibleRect=e;}getOverscannedRect(){let e=this.visibleRect.copy(),t=this.visibleRect.height/3;e.height+=t,this.velocity.y<0&&(e.y-=t);let i=this.visibleRect.width/3;return e.width+=i,this.velocity.x<0&&(e.x-=i),e}};var at=4;function ge(h){return h==="x"?"width":"height"}function st(h,e,t,i,o){let r=t(h.key);if(!r)return null;let l=r.rect[h.corner][e]-i[e]-h.offset;if(l===0)return null;let n=i[e]+l,a=ge(e),s=Math.max(0,o[a]-i[a]),u=Math.max(0,Math.min(s,n));return u!==i[e]?u:null}function ht(h,e,t,i,o=()=>true){let r=ge(e),l=null;for(let[n,a]of i){if(!a||!o(a))continue;let s=a.rect.intersection(t)[r];if(a.rect.area>0&&s>=at){let u=a.rect.getCornerInRect(t)??"topLeft",c=a.rect[u][e]-t[e];(!l||(h==="end"?c<l.offset:c>l.offset))&&(l={key:n,corner:u,offset:c});}}return l}function ut(h,e,t,i){if(h==="start")return 0;let o=ge(e);return Math.max(0,t[o]-i[o])}function Xe(h,e,t,i,o){if(t==="start")return h[i]<=o;let r=ge(i);return e[r]-(h[i]+h[r])<=o}function dt(h,e,t,i,o,r,l,n,a,s){let u=c=>e==="x"?new y(c,a.y,a.width,a.height):new y(a.x,c,a.width,a.height);if(t){let c=st(t,e,n,a,s);if(c!=null)return u(c)}if(i&&!o&&(!r||l>0)){let c=u(ut(h,e,s,a));return c.equals(a)?null:c}return null}var pe=class{hasSnappedToEdge=false;hadEstimatedVisibleItems=false;wasNearAnchorEdge=false;reset(){this.hasSnappedToEdge=false,this.hadEstimatedVisibleItems=false,this.wasNearAnchorEdge=false;}captureBeforeLayout(e,t,i){return e?ht(e.edge,e.axis,i,t,e.isAnchorable):null}resolveAfterLayout(e){let{anchorInfo:t,anchor:i,postLayoutInfos:o,previousVisibleRect:r,previousContentSize:l,contentSize:n,itemSizeChanged:a,isScrolling:s,getLayoutInfo:u}=e;if(!t)return null;let c=this.hadEstimatedVisibleItems,d=this.wasNearAnchorEdge,f=false;for(let T of o.values())if(T.estimatedSize){f=true;break}if(this.hadEstimatedVisibleItems=f,c||(this.wasNearAnchorEdge=Xe(r,l,t.edge,t.axis,t.threshold)),r.area===0)return null;let g=t.axis==="x"?"width":"height",p=n[g]-l[g],L=!this.hasSnappedToEdge;if(this.hasSnappedToEdge=true,!(L||p!==0||a))return null;let x=L||c&&d||Xe(r,l,t.edge,t.axis,t.threshold);c||(this.wasNearAnchorEdge=x);let N=L||c&&d?null:i;return dt(t.edge,t.axis,N,x,s,a,p,u,r,n)}};var ze=class{delegate;collection;layout;contentSize;visibleRect;size;persistedKeys;_visibleViews;_renderedContent;_rootView;_isScrolling;_invalidationContext;_overscanManager;_scrollAnchor;constructor(e){this.delegate=e.delegate,this.collection=e.collection,this.layout=e.layout,this.contentSize=new m,this.visibleRect=new y,this.size=new m,this.persistedKeys=new Set,this._visibleViews=new Map,this._renderedContent=new WeakMap,this._rootView=new fe(this),this._isScrolling=false,this._invalidationContext={},this._overscanManager=new me,this._scrollAnchor=new pe;}isPersistedKey(e){if(this.persistedKeys.has(e))return true;for(let t of this.persistedKeys)for(;t!=null;){let i=this.layout.getLayoutInfo(t);if(!i||i.parentKey==null)break;if(t=i.parentKey,t===e)return true}return false}getParentView(e){return e.parentKey!=null?this._visibleViews.get(e.parentKey):this._rootView}getReusableView(e){let i=this.getParentView(e).getReusableView(e.type);return i.layoutInfo=e,this._renderView(i),i}_renderView(e){if(e.layoutInfo){let{type:t,key:i,content:o}=e.layoutInfo;e.content=o||this.collection.getItem(i),e.rendered=this._renderContent(t,e.content);}}_renderContent(e,t){let i=t!=null?this._renderedContent.get(t):null;if(i!=null)return i;let o=this.delegate.renderView(e,t);return t&&this._renderedContent.set(t,o),o}keyAtPoint(e){let t=new y(e.x,e.y,1,1),i=t.area===0?[]:this.layout.getVisibleLayoutInfos(t);for(let o of i)if(o.rect.intersects(t))return o.key;return null}relayout(e={}){let t=this.layout.UNSTABLE_getScrollAnchorInfo?.(e.layoutOptions)??null,i=null;if(t){let c=[];for(let[d,f]of this._visibleViews){let g=this.layout.getLayoutInfo(d)??f.layoutInfo;g&&c.push([d,g]);}i=this._scrollAnchor.captureBeforeLayout(t,c,this.visibleRect);}let o=this.contentSize,r=this.visibleRect;this.layout.update(e);let l=this.layout.getContentSize();this.contentSize=new m(l.width,l.height);let n=this._scrollAnchor.resolveAfterLayout({anchorInfo:t,anchor:i,postLayoutInfos:t?this.getVisibleLayoutInfos():new Map,previousVisibleRect:r,previousContentSize:o,contentSize:this.contentSize,itemSizeChanged:e.itemSizeChanged??false,isScrolling:this._isScrolling,getLayoutInfo:c=>this.layout.getLayoutInfo(c)});if(n){this.delegate.setVisibleRect(n);return}let a=this.visibleRect,s=e.contentChanged?0:a.x,u=e.contentChanged?0:a.y;if(s=Math.max(0,Math.min(this.contentSize.width-a.width,s)),u=Math.max(0,Math.min(this.contentSize.height-a.height,u)),s!==a.x||u!==a.y){let c=new y(s,u,a.width,a.height);this.delegate.setVisibleRect(c);}else this.updateSubviews();}getVisibleLayoutInfos(){let e=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,t=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientWidth"),i=e&&typeof HTMLElement<"u"&&Object.getOwnPropertyNames(HTMLElement.prototype).includes("clientHeight"),o;e&&!(t&&i)?o=new y(0,0,this.contentSize.width,this.contentSize.height):o=this._overscanManager.getOverscannedRect();let r=this.layout.getVisibleLayoutInfos(o),l=new Map;for(let n of r)l.set(n.key,n);return l}updateSubviews(){let e=this.getVisibleLayoutInfos(),t=new Set;for(let[i,o]of this._visibleViews){let r=e.get(i);(!r||o.parent!==this.getParentView(r))&&(this._visibleViews.delete(i),o.parent.reuseChild(o),t.add(o));}for(let[i,o]of e){let r=this._visibleViews.get(i);if(!r)r=this.getReusableView(o),r.parent.children.add(r),this._visibleViews.set(i,r),t.delete(r);else {r.layoutInfo=o;let l=this.collection.getItem(o.key);r.content!==l&&(r.content!=null&&this._renderedContent.delete(r.content),this._renderView(r));}}for(let i of t)i.parent.children.delete(i),i.parent.reusableViews.clear();if(!this._isScrolling)for(let i of e.keys()){let o=this._visibleViews.get(i);o.parent.children.delete(o),o.parent.children.add(o);}}render(e){let t=this,i=false,o=false,r=false,l=false,n=false,a=false,s=false,u=false;if(e.collection!==this.collection&&(t.collection=e.collection,i=true),(e.layout!==this.layout||this.layout.virtualizer!==this)&&(this.layout&&(this.layout.virtualizer=null),e.layout.virtualizer=this,t.layout=e.layout,this._scrollAnchor.reset(),i=true),e.persistedKeys&&!qe(e.persistedKeys,this.persistedKeys)&&(t.persistedKeys=e.persistedKeys,u=true),!this.visibleRect.equals(e.visibleRect)||!this.size.equals(e.size)){this._overscanManager.setVisibleRect(e.visibleRect);let c=new y(this.visibleRect.x,this.visibleRect.y,this.size.width,this.size.height),d=new y(e.visibleRect.x,e.visibleRect.y,e.size.width,e.size.height);this.layout.shouldInvalidate(d,c)?(o=!e.visibleRect.pointEquals(this.visibleRect),r=!this.size.equals(e.size),l=this.size.width!==e.size.width,n=this.size.height!==e.size.height,i=true):u=true,t.visibleRect=e.visibleRect,t.size=e.size;}return e.invalidationContext!==this._invalidationContext&&(e.invalidationContext&&(r||=e.invalidationContext.sizeChanged||false,l||=e.invalidationContext.widthChanged||false,n||=e.invalidationContext.heightChanged||false,o||=e.invalidationContext.offsetChanged||false,a||=e.invalidationContext.itemSizeChanged||false,s||=e.invalidationContext.layoutOptions!=null&&this._invalidationContext.layoutOptions!=null&&e.invalidationContext.layoutOptions!==this._invalidationContext.layoutOptions&&this.layout.shouldInvalidateLayoutOptions(e.invalidationContext.layoutOptions,this._invalidationContext.layoutOptions),i||=a||r||o||s),this._invalidationContext=e.invalidationContext),e.isScrolling!==this._isScrolling&&(this._isScrolling=e.isScrolling,e.isScrolling||(u=true)),i?this.relayout({offsetChanged:o,sizeChanged:r,widthChanged:l,heightChanged:n,itemSizeChanged:a,layoutOptionsChanged:s,layoutOptions:this._invalidationContext.layoutOptions}):u&&this.updateSubviews(),Array.from(this._rootView.children)}getVisibleView(e){return this._visibleViews.get(e)}invalidate(e){this.delegate.invalidate(e);}updateItemSize(e,t){if(!this.layout.updateItemSize)return;this.layout.updateItemSize(e,t)&&this.invalidate({itemSizeChanged:true});}};var ft=typeof document<"u"?ct.useLayoutEffect:()=>{};function xe(h){let[e,t]=useState(new y(0,0,0,0)),[i,o]=useState(new m),[r,l]=useState(false),[n,a]=useState({}),s=useRef(false),[u]=useState(()=>new ze({collection:h.collection,layout:h.layout,delegate:{setVisibleRect(x){t(x),s.current=true;},renderView:h.renderView,invalidate:a}}));ft(()=>{s.current&&(s.current=false,h.onVisibleRectChange(e));});let c=useMemo(()=>h.layoutOptions!=null?{...n,layoutOptions:h.layoutOptions}:n,[n,h.layoutOptions]),d=u.render({layout:h.layout,collection:h.collection,persistedKeys:h.persistedKeys,layoutOptions:h.layoutOptions,visibleRect:e,size:i,invalidationContext:c,isScrolling:r}),f=u.contentSize,g=useCallback(()=>{l(true);},[]),p=useCallback(()=>{l(false);},[]);return useMemo(()=>({virtualizer:u,visibleViews:d,setVisibleRect:t,size:i,setSize:o,contentSize:f,isScrolling:r,startScrolling:g,endScrolling:p}),[u,d,t,i,o,f,r,g,p])}var F=class{virtualizer=null;shouldInvalidate(e,t){return e.width!==t.width||e.height!==t.height}shouldInvalidateLayoutOptions(e,t){return e!==t}update(e){}getItemRect(e){return this.getLayoutInfo(e)?.rect??null}getVisibleRect(){return this.virtualizer.visibleRect}};var v=class h{type;key;parentKey;content;rect;estimatedSize;isSticky;opacity;transform;zIndex;allowOverflow;constructor(e,t,i){this.type=e,this.key=t,this.parentKey=null,this.content=null,this.rect=i,this.estimatedSize=false,this.isSticky=false,this.opacity=1,this.transform=null,this.zIndex=0,this.allowOverflow=false;}copy(){let e=new h(this.type,this.key,this.rect.copy());return e.estimatedSize=this.estimatedSize,e.opacity=this.opacity,e.transform=this.transform,e.parentKey=this.parentKey,e.content=this.content,e.isSticky=this.isSticky,e.zIndex=this.zIndex,e.allowOverflow=this.allowOverflow,e}};var V={minItemSize:new m(200,200),maxItemSize:new m(1/0,1/0),preserveAspectRatio:false,minSpace:new m(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48},re=class extends F{gap=V.minSpace;dropIndicatorThickness=2;numColumns=0;direction="ltr";contentSize=new m;layoutInfos=new Map;margin=0;shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.preserveAspectRatio!==t.preserveAspectRatio||!(e.minItemSize||V.minItemSize).equals(t.minItemSize||V.minItemSize)||!(e.maxItemSize||V.maxItemSize).equals(t.maxItemSize||V.maxItemSize)||!(e.minSpace||V.minSpace).equals(t.minSpace||V.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight||e.direction!==t.direction}update(e){let{minItemSize:t=V.minItemSize,maxItemSize:i=V.maxItemSize,preserveAspectRatio:o=V.preserveAspectRatio,minSpace:r=V.minSpace,maxHorizontalSpace:l=V.maxSpace,maxColumns:n=V.maxColumns,dropIndicatorThickness:a=V.dropIndicatorThickness,loaderHeight:s=V.loaderHeight,direction:u="ltr"}=e.layoutOptions||{};this.dropIndicatorThickness=a,this.direction=u;let c=this.virtualizer.size.width,d=Math.min(i.width,c),f=Number.isFinite(i.height)?i.height:Math.floor(t.height/t.width*d),g=Math.floor(c/(t.width+r.width)),p=Math.max(1,Math.min(n,g));this.numColumns=p;let L=c-r.width*Math.max(0,p),x=Math.floor(L/p);x=Math.max(t.width,Math.min(d,x));let N=(x-t.width)/Math.max(1,d-t.width),T=t.height+Math.floor((f-t.height)*N);T=Math.max(t.height,Math.min(f,T));let O=Math.min(Math.max(l,r.width),Math.floor((c-p*x)/(p+1)));this.gap=new m(O,r.height),this.margin=Math.floor((c-p*x-O*(p+1))/2);let k=this.virtualizer.collection,j=k.size,M=k.getLastKey();for(let R=0;R<2&&M!=null;R++){if(k.getItem(M)?.type==="skeleton"){j++;break}M=k.getKeyBefore(M);}let q=Math.ceil(j/p),X=k[Symbol.iterator](),z=q>0?r.height:0,b=new Map,w=null,S=0;for(let R=0;R<q;R++){let P=0,G=[];for(let E=0;E<p;E++){let A=w||X.next().value;if(!A)break;if(A.type==="loader")continue;A.type==="skeleton"&&(w=A);let _=w?`${w.key}-${S++}`:A.key,D=this.layoutInfos.get(_),H=A;w&&(H=D&&D.content.key===_?D.content:{...w,key:_});let he=O+E*(x+O)+this.margin,ue=T,te=!o;D&&te&&(ue=D.rect.height,te=e.layoutOptionsChanged||e.sizeChanged||D.estimatedSize||D.content!==H);let lt=new y(he,z,x,ue),$=new v(A.type,_,lt);$.estimatedSize=te,$.allowOverflow=true,$.content=H,b.set(_,$),G.push($),P=Math.max(P,$.rect.height);}for(let E of G)E.rect.height=P;z+=P+r.height,w&&R===q-1&&z<this.virtualizer.size.height&&q++;}let I=k.getItem(k.getLastKey());if(I?.type==="loader"){(S>0||!I.props.isLoading)&&(s=0);let R=c-O*2,P=new y(O,z,R,s),G=new v("loader",I.key,P);b.set(I.key,G),z=G.rect.maxY;}this.layoutInfos=b,this.contentSize=new m(this.virtualizer.size.width,z);}getLayoutInfo(e){return this.layoutInfos.get(e)||null}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let i of this.layoutInfos.values())(i.rect.intersects(e)||this.virtualizer.isPersistedKey(i.key)||i.type==="loader")&&t.push(i);return t}updateItemSize(e,t){let i=this.layoutInfos.get(e);if(!t||!i)return false;if(t.height!==i.rect.height){let o=i.copy();return o.rect.height=t.height,o.estimatedSize=false,this.layoutInfos.set(e,o),true}return false}getDropTargetFromPoint(e,t,i){if(this.layoutInfos.size===0)return {type:"root"};e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y,this.direction==="rtl"&&this.numColumns>1&&(e=this.contentSize.width-e);let o=null;if(this.numColumns===1){let u=new y(e,Math.max(0,t-this.gap.height),1,Math.max(1,this.gap.height*2)),c=this.getVisibleLayoutInfos(u),d=1/0;for(let f of c){if(!f.rect.intersects(u))continue;let g=Math.abs(f.rect.y-t),p=Math.abs(f.rect.maxY-t),L=Math.min(g,p);L<d&&(d=L,o=f.key);}}else {let u=new y(Math.max(0,e-this.gap.width),t,this.gap.width*2,1),c=this.getVisibleLayoutInfos(u),d=1/0;for(let f of c){if(!f.rect.intersects(u))continue;let g=Math.abs(f.rect.x-e),p=Math.abs(f.rect.maxX-e),L=Math.min(g,p);L<d&&(d=L,o=f.key);}}let r=o!=null?this.getLayoutInfo(o):null;if(!r)return {type:"root"};let l={type:"item",key:r.key,dropPosition:"on"},n=this.numColumns===1?t:e,a=this.numColumns===1?r.rect.y:r.rect.x,s=this.numColumns===1?r.rect.height:r.rect.width;if(i(l))n<a+5?l.dropPosition="before":n>a+s-5&&(l.dropPosition="after");else {let u=a+s/2;n<=u&&i({...l,dropPosition:"before"})?l.dropPosition="before":n>=u&&i({...l,dropPosition:"after"})&&(l.dropPosition="after");}return l}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;return this.numColumns===1?i=new y(t.rect.x,e.dropPosition==="before"?t.rect.y-this.gap.height/2-this.dropIndicatorThickness/2:t.rect.maxY+this.gap.height/2-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness):i=new y(e.dropPosition==="before"?t.rect.x-this.gap.width/2-this.dropIndicatorThickness/2:t.rect.maxX+this.gap.width/2-this.dropIndicatorThickness/2,t.rect.y,this.dropIndicatorThickness,t.rect.height),new v("dropIndicator",e.key+":"+e.dropPosition,i)}};var J=48,Y=class extends F{rowSize;orientation;estimatedRowSize;headingSize;estimatedHeadingSize;loaderSize;dropIndicatorThickness;gap;padding;layoutNodes;contentSize;lastCollection;rootNodes;invalidateEverything;validRect;requestedRect;constructor(e={}){super(),this.rowSize=e?.rowSize??e?.rowHeight??null,this.orientation=e.orientation??"vertical",this.estimatedRowSize=e?.estimatedRowSize??e?.estimatedRowHeight??null,this.headingSize=e?.headingSize??e?.headingHeight??null,this.estimatedHeadingSize=e?.estimatedHeadingSize??e?.estimatedHeadingHeight??null,this.loaderSize=e?.loaderSize??e?.loaderHeight??null,this.dropIndicatorThickness=e.dropIndicatorThickness||2,this.gap=e.gap||0,this.padding=e.padding||0,this.layoutNodes=new Map,this.rootNodes=[],this.lastCollection=null,this.invalidateEverything=false,this.validRect=new y,this.requestedRect=new y,this.contentSize=new m;}get collection(){return this.virtualizer.collection}get rowHeight(){return this.rowSize}get estimatedRowHeight(){return this.estimatedRowSize}get headingHeight(){return this.headingSize}get estimatedHeadingHeight(){return this.estimatedHeadingSize}get loaderHeight(){return this.loaderSize}getLayoutInfo(e){return this.ensureLayoutInfo(e),this.layoutNodes.get(e)?.layoutInfo||null}getVisibleLayoutInfos(e){let t=this.orientation==="horizontal"?"x":"y",i=this.orientation==="horizontal"?"width":"height";if(e[i]>1){let l=(this.rowSize??this.estimatedRowSize??J)+this.gap;e=e.copy();let n=Math.floor(e[t]/l)*l,a=e[i]+e[t]-n;e[t]=n,e[i]=Math.ceil(a/l)*l;}this.layoutIfNeeded(e);let o=[],r=l=>{for(let n of l)this.isVisible(n,e)&&(o.push(n.layoutInfo),n.children&&r(n.children));};return r(this.rootNodes),o}layoutIfNeeded(e){if(this.lastCollection){this.requestedRect.containsRect(e)||(this.requestedRect=this.requestedRect.union(e),this.rootNodes=this.buildCollection());for(let t of this.virtualizer.persistedKeys)if(this.ensureLayoutInfo(t))return}}ensureLayoutInfo(e){return !this.layoutNodes.has(e)&&this.requestedRect.area<this.contentSize.area&&this.lastCollection?(this.requestedRect=new y(0,0,1/0,1/0),this.rootNodes=this.buildCollection(),this.requestedRect=new y(0,0,this.contentSize.width,this.contentSize.height),true):false}isVisible(e,t){return e.layoutInfo.rect.intersects(t)||e.layoutInfo.isSticky||e.layoutInfo.type==="header"||e.layoutInfo.type==="loader"||this.virtualizer.isPersistedKey(e.layoutInfo.key)}shouldInvalidateEverything(e){let t=e.layoutOptions;return e.sizeChanged||this.rowSize!==(t?.rowSize??t?.rowHeight??this.rowSize)||this.orientation!==(t?.orientation??this.orientation)||this.headingSize!==(t?.headingSize??t?.headingHeight??this.headingSize)||this.loaderSize!==(t?.loaderSize??t?.loaderHeight??this.loaderSize)||this.gap!==(t?.gap??this.gap)||this.padding!==(t?.padding??this.padding)}shouldInvalidateLayoutOptions(e,t){return (e?.rowSize??e?.rowHeight)!==(t?.rowSize??t?.rowHeight)||e.orientation!==t.orientation||(e?.estimatedRowSize??e?.estimatedRowHeight)!==(t?.estimatedRowSize??t?.estimatedRowHeight)||(e?.headingSize??e?.headingHeight)!==(t?.headingSize??t?.headingHeight)||(e?.estimatedHeadingSize??e?.estimatedHeadingHeight)!==(t?.estimatedHeadingSize??t?.estimatedHeadingHeight)||(e?.loaderSize??e?.loaderHeight)!==(t?.loaderSize??t?.loaderHeight)||e.dropIndicatorThickness!==t.dropIndicatorThickness||e.gap!==t.gap||e.padding!==t.padding}update(e){let t=this.virtualizer.collection;this.invalidateEverything=this.shouldInvalidateEverything(e),this.invalidateEverything&&(this.requestedRect=this.virtualizer.visibleRect.copy(),this.layoutNodes.clear());let i=e.layoutOptions;if(this.rowSize=i?.rowSize??i?.rowHeight??this.rowSize,this.orientation=i?.orientation??this.orientation,this.estimatedRowSize=i?.estimatedRowSize??i?.estimatedRowHeight??this.estimatedRowSize,this.headingSize=i?.headingSize??i?.headingHeight??this.headingSize,this.estimatedHeadingSize=i?.estimatedHeadingSize??i?.estimatedHeadingHeight??this.estimatedHeadingSize,this.loaderSize=i?.loaderSize??i?.loaderHeight??this.loaderSize,this.dropIndicatorThickness=i?.dropIndicatorThickness??this.dropIndicatorThickness,this.gap=i?.gap??this.gap,this.padding=i?.padding??this.padding,this.rootNodes=this.buildCollection(),this.lastCollection&&t!==this.lastCollection)for(let o of this.lastCollection.getKeys())t.getItem(o)||this.layoutNodes.get(o)&&this.layoutNodes.delete(o);this.lastCollection=t,this.invalidateEverything=false,this.validRect=this.requestedRect.copy();}buildCollection(e=this.padding){let t=this.virtualizer.collection,i=this.orientation==="horizontal"?"x":"y",o=this.orientation==="horizontal"?"maxX":"maxY",r=mt(t,s=>s.type!=="content"),l=r.filter(s=>s.type==="loader"),n=[],a=t?.size===0;a&&(e=0);for(let s of r){let u=(this.rowSize??this.estimatedRowSize??J)+this.gap;if(s.type==="item"&&e+u<this.requestedRect[i]&&!this.isValid(s,e)){e+=u;continue}let c=this.orientation==="horizontal"?this.buildChild(s,e,this.padding,null):this.buildChild(s,this.padding,e,null);if(e=c.layoutInfo.rect[o]+this.gap,n.push(c),s.type==="loader"){let d=l.indexOf(s);l.splice(d,1);}if((s.type==="item"||s.type==="loader")&&e>this.requestedRect[o]){let d=r.indexOf(s);for(let f of l){let g=r.indexOf(f);e+=(g-d-1)*u;let p=this.orientation==="horizontal"?this.buildChild(f,e,this.padding,null):this.buildChild(f,this.padding,e,null);n.push(p),e=p.layoutInfo.rect[o],d=g;}e+=(r.length-d-1)*u;break}}return e=Math.max(e-this.gap,0),e+=a?0:this.padding,this.contentSize=this.orientation==="horizontal"?new m(e,this.virtualizer.size.height):new m(this.virtualizer.size.width,e),n}isValid(e,t){let i=this.layoutNodes.get(e.key),o=this.orientation==="horizontal"?"x":"y";return !this.invalidateEverything&&!!i&&i.node===e&&t===i.layoutInfo.rect[o]&&i.layoutInfo.rect.intersects(this.validRect)&&i.validRect.containsRect(i.layoutInfo.rect.intersection(this.requestedRect))}buildChild(e,t,i,o){if(this.isValid(e,this.orientation==="horizontal"?t:i))return this.layoutNodes.get(e.key);let r=this.buildNode(e,t,i);return r.layoutInfo.parentKey=o??null,r.layoutInfo.allowOverflow=true,this.layoutNodes.set(e.key,r),r}buildNode(e,t,i){switch(e.type){case "section":return this.buildSection(e,t,i);case "item":return this.buildItem(e,t,i);case "header":return this.buildSectionHeader(e,t,i);case "loader":return this.buildLoader(e,t,i);case "separator":return this.buildItem(e,t,i);case "submenutrigger":return this.buildSection(e,t,i);default:throw new Error("Unsupported node type: "+e.type)}}buildLoader(e,t,i){let o=new y(t,i,this.padding,0),r=new v(e.type,e.key,o);return this.orientation==="horizontal"?(o.height=this.virtualizer.contentSize.height-this.padding-i,o.width=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??J:0):(o.width=this.virtualizer.contentSize.width-this.padding-t,o.height=e.props.isLoading?this.loaderSize??this.rowSize??this.estimatedRowSize??J:0),{layoutInfo:r,validRect:o.intersection(this.requestedRect)}}buildSection(e,t,i){let o=this.virtualizer.collection,r=this.virtualizer.size.width-this.padding-t,l=this.virtualizer.size.height-this.padding-i,n=this.orientation==="horizontal"?new y(t,i,0,l):new y(t,i,r,0),a=new v(e.type,e.key,n),s=this.orientation==="horizontal"?t:i,u=this.orientation==="horizontal"?"x":"y",c=this.orientation==="horizontal"?"maxX":"maxY",d=this.orientation==="horizontal"?"width":"height",f=0,g=[];for(let p of b$2(e,o)){if(p.type==="content")continue;let L=(this.rowSize??this.estimatedRowSize??J)+this.gap;if(s+L<this.requestedRect[u]&&!this.isValid(e,s)){s+=L,f++;continue}let x=this.orientation==="horizontal"?this.buildChild(p,s,i,a.key):this.buildChild(p,t,s,a.key);if(s=x.layoutInfo.rect[c]+this.gap,g.push(x),s>this.requestedRect[c]){s+=([...b$2(e,o)].length-(g.length+f))*L;break}}return s-=this.gap,n[d]=s-(this.orientation==="horizontal"?t:i),{layoutInfo:a,children:g,validRect:a.rect.intersection(this.requestedRect),node:e}}buildSectionHeader(e,t,i){let o=this.orientation==="horizontal"?"height":"width",r=this.orientation==="horizontal"?"width":"height",l=this.virtualizer.size[o]-this.padding-(this.orientation==="horizontal"?i:t),n=this.headingSize,a=false;if(n==null){let c=this.layoutNodes.get(e.key),d=c?.layoutInfo;if(d){let f=this.virtualizer.collection.getItem(e.key),g=this.lastCollection?this.lastCollection.getItem(e.key):null;n=c.layoutInfo.rect[r],a=l!==d.rect[o]||f!==g||d.estimatedSize;}else n=e.rendered?this.estimatedHeadingSize:0,a=true;}n==null&&(n=J);let s=this.orientation==="horizontal"?new y(t,i,n,l-i):new y(t,i,l-t,n),u=new v("header",e.key,s);return u.estimatedSize=a,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}buildItem(e,t,i){let o=this.orientation==="horizontal"?"height":"width",r=this.orientation==="horizontal"?"width":"height",l=this.virtualizer.size[o]-this.padding-(this.orientation==="horizontal"?i:t),n=this.rowSize,a=false;if(n==null){let c=this.layoutNodes.get(e.key);c?(n=c.layoutInfo.rect[r],a=l!==c.layoutInfo.rect[o]||e!==c.node||c.layoutInfo.estimatedSize):(n=this.estimatedRowSize,a=true);}n==null&&(n=J);let s=this.orientation==="horizontal"?new y(t,i,n,l):new y(t,i,l,n),u=new v(e.type,e.key,s);return u.estimatedSize=a,{layoutInfo:u,children:[],validRect:u.rect.intersection(this.requestedRect),node:e}}updateItemSize(e,t){let i=this.layoutNodes.get(e);if(!i)return false;let o=this.virtualizer.collection,r=i.layoutInfo,l=this.orientation==="horizontal"?"x":"y",n=this.orientation==="horizontal"?"width":"height";if(r.estimatedSize=false,r.rect[n]!==t[n]){let a=r.copy();a.rect[n]=t[n],i.layoutInfo=a,this.validRect[n]=Math.min(this.validRect[n],r.rect[l]-this.validRect[l]),i.node?.type==="item"&&(this.requestedRect[n]+=a.rect[n]-r.rect[n]),this.updateLayoutNode(e,r,a);let s=r.parentKey!=null?o.getItem(r.parentKey):null;for(;s;)this.updateLayoutNode(s.key,r,a),s=s.parentKey!=null?o.getItem(s.parentKey):null;return true}return false}updateLayoutNode(e,t,i){let o=this.layoutNodes.get(e);o&&(o.validRect=o.validRect.intersection(this.validRect),o.layoutInfo===t&&(o.layoutInfo=i));}getContentSize(){return this.contentSize}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let o=new y(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(o),l=null,n=1/0;for(let c of r){if(!c.rect.intersects(o))continue;let d=Math.abs(c.rect.y-t),f=Math.abs(c.rect.maxY-t),g=Math.min(d,f);g<n&&(n=g,l=c.key);}if(l==null||this.virtualizer.collection.size===0)return {type:"root"};let a=this.getLayoutInfo(l);if(!a)return null;let s=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=s.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=s.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=s.y+s.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t=this.getLayoutInfo(e.key),i;if(e.dropPosition==="before")i=this.orientation==="horizontal"?new y(Math.max(0,t.rect.x-this.dropIndicatorThickness/2),t.rect.y,this.dropIndicatorThickness,t.rect.height):new y(t.rect.x,Math.max(0,t.rect.y-this.dropIndicatorThickness/2),t.rect.width,this.dropIndicatorThickness);else if(e.dropPosition==="after"){let o=this.collection.getItem(e.key);if(o){let r=o.level??0,l=this.collection.getKeyAfter(e.key);for(;l!=null;){let n=this.collection.getItem(l);if(!n||n.level<=r)break;t=this.getLayoutInfo(l)||t,l=this.collection.getKeyAfter(l);}}i=this.orientation==="horizontal"?new y(t.rect.maxX-this.dropIndicatorThickness/2,t.rect.y,this.dropIndicatorThickness,t.rect.height):new y(t.rect.x,t.rect.maxY-this.dropIndicatorThickness/2,t.rect.width,this.dropIndicatorThickness);}else i=t.rect;return new v("dropIndicator",e.key+":"+e.dropPosition,i)}};function mt(h,e){let t=[];for(let i of h)e(i)&&t.push(i);return t}var je=48,le=class extends Y{lastCollection=null;columnWidths=new Map;stickyColumnIndices;lastPersistedKeys=null;persistedIndices=new Map;constructor(e){super(e),this.stickyColumnIndices=[];}get collection(){return this.virtualizer.collection}get rowHeight(){return super.rowHeight}get estimatedRowHeight(){return super.estimatedRowHeight}get headingHeight(){return super.headingHeight}get estimatedHeadingHeight(){return super.estimatedHeadingHeight}get loaderHeight(){return super.loaderHeight}columnsChanged(e,t){return !t||e.columns!==t.columns&&e.columns.length!==t.columns.length||e.columns.some((i,o)=>i.key!==t.columns[o].key||i.props.width!==t.columns[o].props.width||i.props.minWidth!==t.columns[o].props.minWidth||i.props.maxWidth!==t.columns[o].props.maxWidth)}shouldInvalidateLayoutOptions(e,t){return e.columnWidths!==t.columnWidths||super.shouldInvalidateLayoutOptions(e,t)}update(e){let t=this.virtualizer.collection;if(e.layoutOptions?.columnWidths){for(let[i,o]of e.layoutOptions.columnWidths)if(this.columnWidths.get(i)!==o){this.columnWidths=e.layoutOptions.columnWidths,e.sizeChanged=true;break}}else if(e.sizeChanged||this.columnsChanged(t,this.lastCollection)){let i=new a$3({});this.columnWidths=i.buildColumnWidths(this.virtualizer.size.width-this.padding*2,t,new Map),e.sizeChanged=true;}super.update(e);}buildCollection(){this.stickyColumnIndices=[];let e=this.virtualizer.collection;for(let r of e.columns)(this.isStickyColumn(r)||e.rowHeaderColumnKeys.has(r.key))&&this.stickyColumnIndices.push(r.index);let t=[],i=0,o=0;if(e.head){for(let r of e)switch(r.type){case "tableheader":{let l=this.buildTableHeader();i=l.layoutInfo.rect.maxY+this.gap,o=Math.max(o,l.layoutInfo.rect.width),this.layoutNodes.set(l.layoutInfo.key,l),t.push(l);break}case "tablebody":case "tablefooter":{let l=this.buildRowGroup(i,r);i=l.layoutInfo.rect.maxY+this.gap,o=Math.max(o,l.layoutInfo.rect.width),this.layoutNodes.set(l.layoutInfo.key,l),t.push(l);break}}i>0&&(i-=this.gap);for(let r of t)r.layoutInfo.rect.width=o;}else {let r=this.buildTableHeader();this.layoutNodes.set(r.layoutInfo.key,r);let l=this.buildBody(r.layoutInfo.rect.maxY+this.gap);l.layoutInfo.rect.width=Math.max(r.layoutInfo.rect.width,l.layoutInfo.rect.width),i=l.layoutInfo.rect.maxY,o=l.layoutInfo.rect.width,t=[r,l];}return this.lastPersistedKeys=null,this.contentSize=new m(o+this.padding*2,i+this.padding),t}buildTableHeader(){let e=this.virtualizer.collection,t=new y(this.padding,this.padding,0,0),i=new v("header",e.head?.key??"header",t);i.isSticky=true,i.zIndex=1;let o=this.padding,r=0,l=[];for(let n of e.headerRows){let a=this.buildChild(n,this.padding,o,i.key);a.layoutInfo.parentKey=i.key,o=a.layoutInfo.rect.maxY,r=Math.max(r,a.layoutInfo.rect.width),a.index=l.length,l.push(a);}return t.width=r,t.height=o-this.padding,{layoutInfo:i,children:l,validRect:i.rect,node:e.head}}buildHeaderRow(e,t,i){let o=new y(t,i,0,0),r=new v("headerrow",e.key,o),l=0,n=[];for(let a of b$2(e,this.virtualizer.collection)){let s=this.buildChild(a,t,i,r.key);s.layoutInfo.parentKey=r.key,t=s.layoutInfo.rect.maxX,l=Math.max(l,s.layoutInfo.rect.height),s.index=n.length,n.push(s);}for(let[a,s]of n.entries())s.layoutInfo.zIndex=n.length-a+1;return this.setChildHeights(n,l),o.height=l,o.width=t-o.x,{layoutInfo:r,children:n,validRect:o,node:e}}setChildHeights(e,t){for(let i of e)i.layoutInfo.rect.height!==t&&(i.layoutInfo=i.layoutInfo.copy(),i.layoutInfo.rect.height=t);}getRenderedColumnWidth(e){let t=this.virtualizer.collection,i=e.colSpan??1,o=e.colIndex??e.index,r=0;for(let l=o;l<o+i;l++){let n=t.columns[l];n?.key!=null&&(r+=this.columnWidths.get(n.key)??0);}return r}getEstimatedHeight(e,t,i,o){let r=false;if(i==null){let l=this.layoutNodes.get(e.key);l?(i=l.layoutInfo.rect.height,r=e!==l.node||t!==l.layoutInfo.rect.width||l.layoutInfo.estimatedSize):(i=o??je,r=true);}return {height:i,isEstimated:r}}getEstimatedRowHeight(){return this.rowHeight??this.estimatedRowHeight??je}buildColumn(e,t,i){let o=this.getRenderedColumnWidth(e),{height:r,isEstimated:l}=this.getEstimatedHeight(e,o,this.headingHeight??this.rowHeight,this.estimatedHeadingHeight??this.estimatedRowHeight),n=new y(t,i,o,r),a=new v(e.type,e.key,n);return a.isSticky=this.isStickyColumn(e),a.zIndex=a.isSticky?2:1,a.estimatedSize=l,{layoutInfo:a,children:[],validRect:a.rect,node:e}}isStickyColumn(e){return false}buildBody(e){let t=this.virtualizer.collection;return this.buildRowGroup(e,t.body)}buildRowGroup(e,t){let i=this.virtualizer.collection,o=new y(this.padding,e,0,0),r=new v("rowgroup",t.key,o),l=e,n=0,a=[],s=this.getEstimatedRowHeight()+this.gap,u=b$2(t,i);for(let d of u){if(e+s<this.requestedRect.y&&!this.isValid(d,e)||e>this.requestedRect.maxY&&d.type!=="loader"){e+=s;continue}let f=this.buildChild(d,this.padding,e,r.key);f.layoutInfo.parentKey=r.key,f.index=a.length,e=f.layoutInfo.rect.maxY+this.gap,n=Math.max(n,f.layoutInfo.rect.width),a.push(f);}return i?.size===0?e=this.virtualizer.size.height:e-=this.gap,o.width=n,o.height=e-l,{layoutInfo:r,children:a,validRect:r.rect.intersection(this.requestedRect),node:t}}buildLoader(e,t,i){let o=super.buildLoader(e,t,i),r=this.virtualizer.collection;return o.layoutInfo.rect.width=this.layoutNodes.get(r.head?.key??"header").layoutInfo.rect.width,o.validRect=o.layoutInfo.rect.intersection(this.requestedRect),o}buildNode(e,t,i){switch(e.type){case "headerrow":return this.buildHeaderRow(e,t,i);case "item":return this.buildRow(e,t,i);case "column":case "placeholder":return this.buildColumn(e,t,i);case "cell":return this.buildCell(e,t,i);case "loader":return this.buildLoader(e,t,i);default:throw new Error("Unknown node type "+e.type)}}buildRow(e,t,i){let o=this.virtualizer.collection,r=new y(t,i,0,0),l=new v("row",e.key,r),n=[],a=0;for(let s of b$2(e,o))if(s.type==="cell")if(t>this.requestedRect.maxX){let u=this.layoutNodes.get(s.key);if(u)u.layoutInfo.rect.x=t,t+=u.layoutInfo.rect.width;else break}else {let u=this.buildChild(s,t,i,l.key);t=u.layoutInfo.rect.maxX,a=Math.max(a,u.layoutInfo.rect.height),u.index=n.length,n.push(u);}return this.setChildHeights(n,a),r.width=this.layoutNodes.get(o.head?.key??"header").layoutInfo.rect.width,r.height=a,{layoutInfo:l,children:n,validRect:r.intersection(this.requestedRect),node:e}}buildCell(e,t,i){let o=this.getRenderedColumnWidth(e),{height:r,isEstimated:l}=this.getEstimatedHeight(e,o,this.rowHeight,this.estimatedRowHeight),n=new y(t,i,o,r),a=new v(e.type,e.key,n);return a.isSticky=this.isStickyColumn(e),a.zIndex=a.isSticky?2:1,a.estimatedSize=l,{layoutInfo:a,children:[],validRect:n,node:e}}getVisibleLayoutInfos(e){if(e.height>1){let i=this.getEstimatedRowHeight();e.y=Math.floor(e.y/i)*i,e.height=Math.ceil(e.height/i)*i;}this.layoutIfNeeded(e);let t=[];this.buildPersistedIndices();for(let i of this.rootNodes)t.push(i.layoutInfo),this.addVisibleLayoutInfos(t,i,e);return t}addVisibleLayoutInfos(e,t,i){if(!(!t.children||t.children.length===0))switch(t.layoutInfo.type){case "header":{for(let o of t.children)e.push(o.layoutInfo),this.addVisibleLayoutInfos(e,o,i);break}case "rowgroup":{let o=this.binarySearch(t.children,i.topLeft,"y"),r=this.binarySearch(t.children,i.bottomRight,"y"),l=this.persistedIndices.get(t.layoutInfo.key),n=0;for(;l&&n<l.length&&l[n]<o;){let s=l[n];s<t.children.length&&(e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i)),n++;}for(let s=o;s<=r;s++){for(;l&&n<l.length&&l[n]<s;)n++;e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i);}for(;l&&n<l.length;){let s=l[n++];s<t.children.length&&(e.push(t.children[s].layoutInfo),this.addVisibleLayoutInfos(e,t.children[s],i));}let a=t.children.at(-1);a?.layoutInfo.type==="loader"&&e.push(a.layoutInfo);break}case "headerrow":case "row":{let o=this.binarySearch(t.children,i.topLeft,"x"),r=this.binarySearch(t.children,i.topRight,"x"),l=0,n=this.persistedIndices.get(t.layoutInfo.key)||this.stickyColumnIndices;for(;l<n.length&&n[l]<o;){let a=n[l];a<t.children.length&&e.push(t.children[a].layoutInfo),l++;}for(let a=o;a<=r;a++){for(;l<n.length&&n[l]<a;)l++;e.push(t.children[a].layoutInfo);}for(;l<n.length;){let a=n[l++];a<t.children.length&&e.push(t.children[a].layoutInfo);}break}default:throw new Error("Unknown node type "+t.layoutInfo.type)}}binarySearch(e,t,i){let o=0,r=e.length-1;for(;o<=r;){let l=o+r>>1,n=e[l];if(i==="x"&&n.layoutInfo.rect.maxX<=t.x||i==="y"&&n.layoutInfo.rect.maxY<=t.y)o=l+1;else if(i==="x"&&n.layoutInfo.rect.x>t.x||i==="y"&&n.layoutInfo.rect.y>t.y)r=l-1;else return l}return Math.max(0,Math.min(e.length-1,o))}buildPersistedIndices(){if(this.virtualizer.persistedKeys!==this.lastPersistedKeys){this.lastPersistedKeys=this.virtualizer.persistedKeys,this.persistedIndices.clear();for(let e of this.virtualizer.persistedKeys){let t=this.layoutNodes.get(e)?.layoutInfo;for(;t&&t.parentKey;){let i=this.virtualizer.collection.getItem(t.key),o=this.persistedIndices.get(t.parentKey);o||(o=i?.type==="cell"||i?.type==="column"?[...this.stickyColumnIndices]:[],this.persistedIndices.set(t.parentKey,o));let r=this.layoutNodes.get(t.key)?.index;r!=null&&!o.includes(r)&&o.push(r),t=this.layoutNodes.get(t.parentKey)?.layoutInfo;}}for(let e of this.persistedIndices.values())e.sort((t,i)=>t-i);}}getDropTargetFromPoint(e,t,i){e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let o=new y(e,Math.max(0,t-this.gap),1,Math.max(1,this.gap*2)),r=this.getVisibleLayoutInfos(o),l=null,n=1/0;for(let c of r){if(c.type!=="row"||!c.rect.intersects(o))continue;let d=Math.abs(c.rect.y-t),f=Math.abs(c.rect.maxY-t),g=Math.min(d,f);g<n&&(n=g,l=c.key);}if(l==null||this.virtualizer.collection.size===0)return {type:"root"};let a=this.getLayoutInfo(l);if(!a)return null;let s=a.rect,u={type:"item",key:a.key,dropPosition:"on"};return i(u)?t<=s.y+10&&i({...u,dropPosition:"before"})?u.dropPosition="before":t>=s.maxY-10&&i({...u,dropPosition:"after"})&&(u.dropPosition="after"):t<=s.y+s.height/2&&i({...u,dropPosition:"before"})?u.dropPosition="before":i({...u,dropPosition:"after"})&&(u.dropPosition="after"),u}getDropTargetLayoutInfo(e){let t=super.getDropTargetLayoutInfo(e);return t.parentKey=this.virtualizer.collection.getItem(e.key)?.parentKey??null,t}};var Le=class extends v{column=0;index=0;copy(){let e=super.copy();return e.column=this.column,e.index=this.index,e}},K={minItemSize:new m(200,200),maxItemSize:new m(1/0,1/0),minSpace:new m(18,18),maxSpace:1/0,maxColumns:1/0,dropIndicatorThickness:2,loaderHeight:48},ne=class extends F{contentSize=new m;layoutInfos=new Map;numColumns=0;dropIndicatorThickness=2;margin=0;shouldInvalidateLayoutOptions(e,t){return e.maxColumns!==t.maxColumns||e.dropIndicatorThickness!==t.dropIndicatorThickness||!(e.minItemSize||K.minItemSize).equals(t.minItemSize||K.minItemSize)||!(e.maxItemSize||K.maxItemSize).equals(t.maxItemSize||K.maxItemSize)||!(e.minSpace||K.minSpace).equals(t.minSpace||K.minSpace)||e.maxHorizontalSpace!==t.maxHorizontalSpace||e.loaderHeight!==t.loaderHeight}update(e){let{minItemSize:t=K.minItemSize,maxItemSize:i=K.maxItemSize,minSpace:o=K.minSpace,maxHorizontalSpace:r=K.maxSpace,maxColumns:l=K.maxColumns,dropIndicatorThickness:n=K.dropIndicatorThickness,loaderHeight:a=K.loaderHeight}=e.layoutOptions||{};this.dropIndicatorThickness=n;let s=this.virtualizer.size.width,u=Math.min(i.width,s),c=Number.isFinite(i.height)?i.height:Math.floor(t.height/t.width*u),d=Math.floor(s/(t.width+o.width)),f=Math.max(1,Math.min(l,d)),g=s-o.width*Math.max(0,f),p=Math.floor(g/f);p=Math.max(t.width,Math.min(u,p));let L=(p-t.width)/Math.max(1,u-t.width),x=t.height+Math.floor((c-t.height)*L);x=Math.max(t.height,Math.min(c,x));let N=Math.min(Math.max(r,o.width),Math.floor((s-f*p)/(f+1)));this.margin=Math.floor((s-f*p-N*(f+1))/2);let T=Array(f).fill(o.height),O=new Map,k=0,j=(w,S)=>{let I=this.layoutInfos.get(w),R=x,P=true;I&&(R=I.rect.height/I.rect.width*p,P=e.sizeChanged||I.estimatedSize||I.content!==S);let E=(f===this.numColumns&&I&&I.index===k&&I.rect.y<this.virtualizer.visibleRect.maxY?I.column:void 0)??T.reduce((he,ue,te)=>ue<T[he]?te:he,0),A=N+E*(p+N)+this.margin,_=T[E],D=new y(A,_,p,R),H=new Le(S.type,w,D);H.estimatedSize=P,H.allowOverflow=true,H.content=S,H.column=E,H.index=k++,O.set(w,H),T[E]+=H.rect.height+o.height;},M=this.virtualizer.collection,q=0;for(let w of M)if(w.type==="skeleton"){let S=[...T];for(;!T.every((I,R)=>I!==S[R])||Math.min(...T)<this.virtualizer.size.height;){let I=`${w.key}-${q++}`,R=this.layoutInfos.get(I)?.content||{...w};j(I,R);}break}else w.type!=="loader"&&j(w.key,w);let z=M?.size===0&&M.getItem(M.getFirstKey())?.type!=="skeleton"?0:Math.max(...T),b=M.getItem(M.getLastKey());if(b?.type==="loader"){(q>0||!b.props.isLoading)&&(a=0);let w=s-N*2,S=new y(N,z,w,a),I=new v("loader",b.key,S);O.set(b.key,I),z=I.rect.maxY;}this.contentSize=new m(this.virtualizer.size.width,z),this.layoutInfos=O,this.numColumns=f;}getLayoutInfo(e){return this.layoutInfos.get(e)}getContentSize(){return this.contentSize}getVisibleLayoutInfos(e){let t=[];for(let i of this.layoutInfos.values())(i.rect.intersects(e)||this.virtualizer.isPersistedKey(i.key)||i.type==="loader")&&t.push(i);return t}updateItemSize(e,t){let i=this.layoutInfos.get(e);if(!t||!i)return false;if(t.height!==i.rect.height){let o=i.copy();return o.rect.height=t.height,o.estimatedSize=false,this.layoutInfos.set(e,o),true}return false}getKeyRightOf(e){let t=this.getLayoutInfo(e);if(!t)return null;let i=new y(t.rect.maxX,t.rect.y,this.virtualizer.visibleRect.maxX-t.rect.maxX,t.rect.height),o=this.getVisibleLayoutInfos(i),r=null,l=1/0;for(let n of o){if(n.key===e)continue;let a=n.rect.x-i.x,s=Math.min(n.rect.maxY,i.maxY)-Math.max(n.rect.y,i.y),u=a-s;u<l&&(l=u,r=n.key);}return r}getKeyLeftOf(e){let t=this.getLayoutInfo(e);if(!t)return null;let i=new y(0,t.rect.y,t.rect.x,t.rect.height),o=this.getVisibleLayoutInfos(i),r=null,l=1/0;for(let n of o){if(n.key===e)continue;let a=i.maxX-n.rect.maxX,s=Math.min(n.rect.maxY,i.maxY)-Math.max(n.rect.y,i.y),u=a-s;u<l&&(l=u,r=n.key);}return r}getKeyRange(e,t){let i=this.getLayoutInfo(e),o=this.getLayoutInfo(t);if(!i||!o)return [];let r=i.rect.union(o.rect),l=[];for(let n of this.layoutInfos.values())r.intersection(n.rect).area>n.rect.area/2&&l.push(n.key);return l}getDropTargetFromPoint(e,t){if(this.layoutInfos.size===0)return {type:"root"};e+=this.virtualizer.visibleRect.x,t+=this.virtualizer.visibleRect.y;let i=this.virtualizer.keyAtPoint(new C(e,t));return i==null?{type:"root"}:{type:"item",key:i,dropPosition:"on"}}};var Re=new WeakMap;function Be(h=false,e=document){if(!Re.has(e)||h){let t=e.createElement("div"),i=t.style;i.width="50px",i.height="50px",i.overflow="scroll",i.direction="rtl";let o=e.createElement("div"),r=o.style;r.width="100px",r.height="100px",t.appendChild(o),e.body.appendChild(t);let l;t.scrollLeft>0?l="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?l="negative":l="positive-ascending"),e.body.removeChild(t),Re.set(e,l);}return Re.get(e)}function ae(h,e){let{scrollLeft:t}=h;if(e==="rtl"){let{scrollWidth:i,clientWidth:o}=h;switch(Be(false,a$1(h))){case "negative":t=-t;break;case "positive-descending":t=i-o-t;break}}return t}function gt(h,e){e=a(e);let{scrollViewProps:t,contentProps:i}=be(h,e);return jsx("div",{role:"presentation",...t,ref:e,children:jsx("div",{...i,children:h.children})})}ct.forwardRef(gt);function be(h$1,e$2){let{contentSize:t,onVisibleRectChange:i,onSizeChange:o,innerStyle:r,onScrollStart:l$1,onScrollEnd:n,scrollDirection:a="both",onScroll:s,allowsWindowScrolling:u$1,...c}=h$1,d=useRef({scrollPosition:new C,size:new m,viewportOffset:new C,viewportSize:new m,scrollEndTime:0,scrollTimeout:null,isScrolling:false,lastVisibleRect:new y}).current,{direction:f}=b(),g=useCallback(()=>{let z=u$1?new y(d.viewportOffset.x+d.scrollPosition.x,d.viewportOffset.y+d.scrollPosition.y,Math.max(0,Math.min(d.size.width-d.viewportOffset.x,d.viewportSize.width)),Math.max(0,Math.min(d.size.height-d.viewportOffset.y,d.viewportSize.height))):new y(d.scrollPosition.x,d.scrollPosition.y,d.size.width,d.size.height);(z.area>0||d.lastVisibleRect.area>0)&&(i(z),d.lastVisibleRect=z);},[d,u$1,i]),[p,L]=useState(false),x=useCallback(z=>{let b=j(z);if(!h(b,e$2.current))return;if(s&&b===e$2.current&&s(z),b!==e$2.current){let S=e$2.current.getBoundingClientRect(),I=S.x<0?-S.x:0,R=S.y<0?-S.y:0;if(I===d.viewportOffset.x&&R===d.viewportOffset.y)return;d.viewportOffset=new C(I,R);}else {let S=b.scrollTop,I=ae(b,f);d.scrollPosition=new C(Math.max(0,Math.min(I,t.width-d.size.width)),Math.max(0,Math.min(S,t.height-d.size.height)));}let w=b$1(z.currentTarget);flushSync(()=>{g(),d.isScrolling||(d.isScrolling=true,L(true),w.dispatchEvent(new w.Event("tk.disconnect-observer")),l$1&&l$1());let S=Date.now();d.scrollEndTime<=S+50&&(d.scrollEndTime=S+300,d.scrollTimeout!=null&&clearTimeout(d.scrollTimeout),d.scrollTimeout=setTimeout(()=>{d.isScrolling=false,L(false),d.scrollTimeout=null,w.dispatchEvent(new w.Event("tk.connect-observer")),n&&n();},300));});},[s,e$2,f,d,t,g,l$1,n]);useEffect(()=>e(l(e$2.current,a$1(e$2.current)),"scroll",x,true),[x,e$2]),useEffect(()=>()=>{if(d.scrollTimeout!=null&&clearTimeout(d.scrollTimeout),d.isScrolling){let z=b$1(e$2.current);z.dispatchEvent(new z.Event("tk.connect-observer"));}},[]);let N=useRef(false),T=useCallback(z=>{let b=e$2.current;if(!b||N.current)return;N.current=true;let w=process.env.NODE_ENV==="test"&&!process.env.VIRT_ON,S=b$1(b),I=Object.getOwnPropertyNames(S.HTMLElement.prototype).includes("clientWidth"),R=Object.getOwnPropertyNames(S.HTMLElement.prototype).includes("clientHeight"),P=b.clientWidth,G=b.clientHeight,E=w&&!I?1/0:P,A=w&&!R?1/0:G,_=S.innerWidth,D=S.innerHeight,H=d.viewportSize.width!==_||d.viewportSize.height!==D;H&&(d.viewportSize=new m(_,D)),(d.size.width!==E||d.size.height!==A||H)&&(d.size=new m(E,A),z(()=>{g(),o?.(d.size);}),(!w&&P!==b.clientWidth||G!==b.clientHeight)&&(d.size=new m(b.clientWidth,b.clientHeight),z(()=>{g(),o?.(d.size);}))),N.current=false;},[e$2,d,g,o]),O=u(T);useEffect(()=>{let z=b$1(e$2.current);d.viewportSize=new m(z.innerWidth,z.innerHeight);let b=()=>{O(flushSync);};return z.addEventListener("resize",b),()=>z.removeEventListener("resize",b)},[d,e$2]);let k=useRef(null),[j$1,M]=useState({});a$2(()=>{if(!N.current&&(k.current==null||!t.equals(k.current)))if(typeof IS_REACT_ACT_ENVIRONMENT=="boolean"?IS_REACT_ACT_ENVIRONMENT:typeof jest<"u"){M({}),k.current=t;return}else queueMicrotask(()=>O(flushSync));k.current=t;}),a$2(()=>{O(z=>z());},[j$1]);let q=useCallback(()=>{T(flushSync);},[T]);e$1({ref:e$2,box:"border-box",onResize:q});let X={padding:0,...c.style};return a==="horizontal"?(X.overflowX="auto",X.overflowY="hidden"):a==="vertical"||t.width===d.size.width?(X.overflowY="auto",X.overflowX="hidden"):X.overflow="auto",r={width:Number.isFinite(t.width)?t.width:void 0,height:Number.isFinite(t.height)?t.height:void 0,pointerEvents:p?"none":"auto",position:"relative",...r},{isScrolling:p,scrollViewProps:{...c,style:X},contentProps:{role:"presentation",style:r}}}function $e(h){let{layoutInfo:e,virtualizer:t,ref:i,shouldObserveItemSize:o}=h,r=e?.key,l=useCallback(()=>{if(r!=null&&i.current){if(!b$4(i.current))return;let a=bt(i.current);t.updateItemSize(r,a);}},[t,r,i]),n=u(l);return a$2(()=>{e?.estimatedSize&&n();}),useEffect(()=>{if(!o)return;let a=i.current;if(!a||typeof ResizeObserver>"u")return;let s=new ResizeObserver(u=>{u.length&&n();});for(let u of a.children)s.observe(u);return ()=>{s.disconnect();}},[o,i,r]),{updateSize:l}}function bt(h){let e=h.style.height;h.style.height="";let t=new m(h.scrollWidth,h.scrollHeight);return h.style.height=e,t}function Se(h){let{style:e,className:t,layoutInfo:i,virtualizer:o,parent:r,children:l,shouldObserveItemSize:n}=h,{direction:a}=b(),s=useRef(null);return $e({layoutInfo:i,virtualizer:o,ref:s,shouldObserveItemSize:n}),jsx("div",{role:"presentation",ref:s,className:t,style:{...Qe(i,a,r),...e},children:l})}var Ze=new WeakMap;function Qe(h,e,t){let i=e==="rtl"?"right":"left",o=Ze.get(h);if(o&&o[i]!=null){if(!t)return o;let n=h.rect.y-t.rect.y,a=h.rect.x-t.rect.x;if(o.top===n&&o[i]===a)return o}let r={top:h.rect.y-(t&&!(t.allowOverflow&&h.isSticky)?t.rect.y:0),[i]:h.rect.x-(t&&!(t.allowOverflow&&h.isSticky)?t.rect.x:0),width:h.rect.width,height:h.rect.height};Object.entries(r).forEach(([n,a])=>{Number.isFinite(a)||(r[n]=void 0);});let l={position:h.isSticky?"sticky":"absolute",display:h.isSticky?"inline-block":void 0,overflow:h.allowOverflow?"visible":"hidden",opacity:h.opacity,zIndex:h.zIndex,transform:h.transform??void 0,contain:"size layout style",...r};return Ze.set(h,l),l}var it=createContext(null),Ne=createContext(null);function ot(h){let{children:e,layout:t,layoutOptions:i,shouldObserveItemSize:o}=h,r=useMemo(()=>typeof t=="function"?new t:t,[t]),l=useRef(null),{direction:n}=b(),a=useMemo(()=>({isVirtualized:true,layoutDelegate:r,dropTargetDelegate:r.getDropTargetFromPoint?{getDropTargetFromPoint(s,u,c){let d=l.current?.current;if(d&&r.virtualizer){let{visibleRect:f}=r.virtualizer;s-=f.x-ae(d,n),u-=f.y-d.scrollTop;}return r.getDropTargetFromPoint(s,u,c)}}:void 0,CollectionRoot:Rt,CollectionBranch:Tt}),[r,n]);return jsx(p.Provider,{value:a,children:jsx(Ne.Provider,{value:{layout:r,layoutOptions:i,shouldObserveItemSize:o,scrollRefHolder:l},children:e})})}function Rt({collection:h,persistedKeys:e,scrollRef:t,renderDropIndicator:i}){let{layout:o,layoutOptions:r,shouldObserveItemSize:l,scrollRefHolder:n}=useContext(Ne);a$2(()=>{n.current=t??null;},[n,t]);let a=o.useLayoutOptions?.(),s=xe({allowsWindowScrolling:true,layout:o,collection:h,renderView:(c,d)=>d?.render?.(d),onVisibleRectChange(c){let d=t?.current;d&&(d.scrollLeft=c.x,d.scrollTop=c.y);},persistedKeys:e,layoutOptions:useMemo(()=>r&&a?{...r,...a}:r||a,[r,a])}),{contentProps:u}=be({onVisibleRectChange:s.setVisibleRect,onSizeChange:s.setSize,contentSize:s.contentSize,onScrollStart:s.startScrolling,onScrollEnd:s.endScrolling,allowsWindowScrolling:true},t);return jsx("div",{...u,children:jsx(it.Provider,{value:s,children:rt(null,s.visibleViews,i,l)})})}function Tt({parent:h,renderDropIndicator:e}){let i=useContext(it).virtualizer.getVisibleView(h.key),{shouldObserveItemSize:o}=useContext(Ne);return rt(i,Array.from(i.children),e,o)}function rt(h,e,t,i){return e.map(o=>Ct(h,o,t,i))}function Ct(h,e,t,i){let o$1=jsx(Se,{layoutInfo:e.layoutInfo,virtualizer:e.virtualizer,parent:h?.layoutInfo,shouldObserveItemSize:i,children:e.rendered},e.key),{collection:r,layout:l}=e.virtualizer,n=e.content;return n?.type==="item"&&t&&l.getDropTargetLayoutInfo&&(o$1=jsxs(ct.Fragment,{children:[et(h,e,{type:"item",key:e.content.key,dropPosition:"before"},t),o$1,o(r,n,a=>et(h,e,a,t))]},e.key)),o$1}function et(h,e,t,i){let o=i(t);if(o){let r=e.virtualizer.layout.getDropTargetLayoutInfo(t);o=jsx(Se,{layoutInfo:r,virtualizer:e.virtualizer,parent:h?.layoutInfo,children:o});}return o}var Q=class extends re{useLayoutOptions(){let{direction:e}=b();return useMemo(()=>({direction:e}),[e])}};var ee=class extends le{useLayoutOptions(){let e=useContext(b$3);return useMemo(()=>({columnWidths:e?.columnWidths}),[e?.columnWidths])}};var se=class extends Q{useLayoutOptions(){let{direction:e}=b();return {direction:e}}};var xr={LIST_BOX:{layout:Y,layoutOptions:{rowHeight:36}},TREE_VIEW:{layout:Y,layoutOptions:{rowHeight:44}},IMAGE_GALLERY:{layout:se,layoutOptions:{minItemSize:new m(114,167),maxItemSize:new m(114,167),dropIndicatorThickness:2,maxHorizontalSpace:0,minSpace:new m(4,16),preserveAspectRatio:true}},TABLE:{layout:ee,layoutOptions:{rowHeight:48,headingHeight:48}}};export{m as a,Y as b,ne as c,ot as d,Q as e,ee as f,se as g,xr as h};
@@ -1 +1 @@
1
- export{a as useContainerScopedRef}from'../chunk-7L5UOGZA.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{a as useContainerScopedRef}from'../chunk-O23QVPUT.mjs';import'../chunk-GUPSQSPC.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
@@ -1 +1 @@
1
- export{a as useDevice}from'../chunk-KX7WG3L4.mjs';import'../chunk-22BJMDCA.mjs';import'../chunk-MDE2FQHX.mjs';import'../chunk-J4OPD7OL.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{a as useDevice}from'../chunk-KX7WG3L4.mjs';import'../chunk-22BJMDCA.mjs';import'../chunk-XO7MAUFC.mjs';import'../chunk-TZGK36KC.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
@@ -1 +1 @@
1
- export{a as createMessageFormatter,c as defineMessages,b as useI18n}from'../chunk-DZDZZRWE.mjs';import'../chunk-XXANV3FM.mjs';import'../chunk-F7PGMOQF.mjs';import'../chunk-LJZ7ZS4C.mjs';import'../chunk-NHM3H5JU.mjs';import'../chunk-N2XGJKZG.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{a as createMessageFormatter,c as defineMessages,b as useI18n}from'../chunk-IDIZSV2Y.mjs';import'../chunk-XXANV3FM.mjs';import'../chunk-TDRN6VLD.mjs';import'../chunk-LJZ7ZS4C.mjs';import'../chunk-NHM3H5JU.mjs';import'../chunk-N2XGJKZG.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
@@ -1 +1 @@
1
- export{a as useIntersectionObserver}from'../chunk-GCBMNOA6.mjs';import'../chunk-MDE2FQHX.mjs';import'../chunk-J4OPD7OL.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{a as useIntersectionObserver}from'../chunk-GCBMNOA6.mjs';import'../chunk-XO7MAUFC.mjs';import'../chunk-TZGK36KC.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
@@ -1 +1 @@
1
- export{a as useLiveInteractionModality}from'../chunk-YS3Z53YT.mjs';import'../chunk-NUCSMH4S.mjs';import'../chunk-CIPPPD6E.mjs';import'../chunk-XBBPWSJI.mjs';import'../chunk-UFN2OAM2.mjs';import'../chunk-OQPYPKZV.mjs';import'../chunk-5FK5AJ7A.mjs';import'../chunk-6IX6BM7C.mjs';import'../chunk-MDE2FQHX.mjs';import'../chunk-J4OPD7OL.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-HH4VLTF3.mjs';import'../chunk-4S4GGUSH.mjs';import'../chunk-KUDCYGII.mjs';import'../chunk-B3EZOXNU.mjs';import'../chunk-F7WPMQ3P.mjs';import'../chunk-235S3EB7.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{a as useLiveInteractionModality}from'../chunk-YS3Z53YT.mjs';import'../chunk-NUCSMH4S.mjs';import'../chunk-CIPPPD6E.mjs';import'../chunk-XBBPWSJI.mjs';import'../chunk-UFN2OAM2.mjs';import'../chunk-OQPYPKZV.mjs';import'../chunk-Z4QTH4TB.mjs';import'../chunk-6IX6BM7C.mjs';import'../chunk-XO7MAUFC.mjs';import'../chunk-TZGK36KC.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-HH4VLTF3.mjs';import'../chunk-4S4GGUSH.mjs';import'../chunk-B3EZOXNU.mjs';import'../chunk-KUDCYGII.mjs';import'../chunk-F7WPMQ3P.mjs';import'../chunk-235S3EB7.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
@@ -1 +1 @@
1
- export{b as formattedDuration,a as useMedia}from'../chunk-P7BN7QDF.mjs';import'../chunk-DZDZZRWE.mjs';import'../chunk-XXANV3FM.mjs';import'../chunk-F7PGMOQF.mjs';import'../chunk-LJZ7ZS4C.mjs';import'../chunk-NHM3H5JU.mjs';import'../chunk-N2XGJKZG.mjs';import'../chunk-5YHNHEDK.mjs';import'../chunk-JJG67M2S.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{b as formattedDuration,a as useMedia}from'../chunk-O4YMXTNR.mjs';import'../chunk-IDIZSV2Y.mjs';import'../chunk-XXANV3FM.mjs';import'../chunk-TDRN6VLD.mjs';import'../chunk-LJZ7ZS4C.mjs';import'../chunk-NHM3H5JU.mjs';import'../chunk-N2XGJKZG.mjs';import'../chunk-5YHNHEDK.mjs';import'../chunk-JJG67M2S.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
@@ -1 +1 @@
1
- export{a as useMutationObserver}from'../chunk-UI2VBG26.mjs';import'../chunk-MDE2FQHX.mjs';import'../chunk-J4OPD7OL.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{a as useMutationObserver}from'../chunk-UI2VBG26.mjs';import'../chunk-XO7MAUFC.mjs';import'../chunk-TZGK36KC.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
@@ -1 +1 @@
1
- export{a as usePortalContainer}from'../chunk-OYSOPCTA.mjs';import'../chunk-4JQUB53Q.mjs';import'../chunk-KX7WG3L4.mjs';import'../chunk-NUCSMH4S.mjs';import'../chunk-CIPPPD6E.mjs';import'../chunk-XBBPWSJI.mjs';import'../chunk-UFN2OAM2.mjs';import'../chunk-OO7BXL2N.mjs';import'../chunk-OQPYPKZV.mjs';import'../chunk-5FK5AJ7A.mjs';import'../chunk-22BJMDCA.mjs';import'../chunk-6IX6BM7C.mjs';import'../chunk-MDE2FQHX.mjs';import'../chunk-J4OPD7OL.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-HH4VLTF3.mjs';import'../chunk-4S4GGUSH.mjs';import'../chunk-KUDCYGII.mjs';import'../chunk-B3EZOXNU.mjs';import'../chunk-F7WPMQ3P.mjs';import'../chunk-235S3EB7.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{a as usePortalContainer}from'../chunk-BA5OA5DY.mjs';import'../chunk-YDUKC7QS.mjs';import'../chunk-KX7WG3L4.mjs';import'../chunk-NUCSMH4S.mjs';import'../chunk-CIPPPD6E.mjs';import'../chunk-XBBPWSJI.mjs';import'../chunk-UFN2OAM2.mjs';import'../chunk-OO7BXL2N.mjs';import'../chunk-OQPYPKZV.mjs';import'../chunk-Z4QTH4TB.mjs';import'../chunk-22BJMDCA.mjs';import'../chunk-6IX6BM7C.mjs';import'../chunk-XO7MAUFC.mjs';import'../chunk-TZGK36KC.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-HH4VLTF3.mjs';import'../chunk-4S4GGUSH.mjs';import'../chunk-B3EZOXNU.mjs';import'../chunk-KUDCYGII.mjs';import'../chunk-F7WPMQ3P.mjs';import'../chunk-235S3EB7.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
@@ -1 +1 @@
1
- export{a as usePreventFocus}from'../chunk-SZCVQU55.mjs';import'../chunk-UZ672WDX.mjs';import'../chunk-MDE2FQHX.mjs';import'../chunk-J4OPD7OL.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{a as usePreventFocus}from'../chunk-SZCVQU55.mjs';import'../chunk-UZ672WDX.mjs';import'../chunk-XO7MAUFC.mjs';import'../chunk-TZGK36KC.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
@@ -1 +1 @@
1
- export{a as useResizeObserver}from'../chunk-2VOWBYNS.mjs';import'../chunk-MDE2FQHX.mjs';import'../chunk-J4OPD7OL.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{a as useResizeObserver}from'../chunk-2VOWBYNS.mjs';import'../chunk-XO7MAUFC.mjs';import'../chunk-TZGK36KC.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
@@ -1 +1 @@
1
- export{a as useTextSelection}from'../chunk-335C37NB.mjs';import'../chunk-6IX6BM7C.mjs';import'../chunk-MDE2FQHX.mjs';import'../chunk-J4OPD7OL.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-F7WPMQ3P.mjs';import'../chunk-235S3EB7.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';
1
+ export{a as useTextSelection}from'../chunk-335C37NB.mjs';import'../chunk-6IX6BM7C.mjs';import'../chunk-XO7MAUFC.mjs';import'../chunk-TZGK36KC.mjs';import'../chunk-GQIS4QBN.mjs';import'../chunk-4P247R4V.mjs';import'../chunk-CFRTAJP2.mjs';import'../chunk-2VY4FAOY.mjs';import'../chunk-Y2MIU76N.mjs';import'../chunk-I3RGYL4B.mjs';import'../chunk-AI6WQPRX.mjs';import'../chunk-GOSLHCDP.mjs';import'../chunk-4QBHQCCK.mjs';import'../chunk-5PQHOVGX.mjs';import'../chunk-AGUSZG6K.mjs';import'../chunk-F7WPMQ3P.mjs';import'../chunk-235S3EB7.mjs';import'../chunk-4WW2MVQN.mjs';import'../chunk-RT4LMB6X.mjs';import'../chunk-S4HLMIFK.mjs';import'../chunk-PPHSLODC.mjs';import'../chunk-54IAJ3RI.mjs';import'../chunk-3WKDIXCM.mjs';import'../chunk-SVIYLH7R.mjs';import'../chunk-ETM4MNG4.mjs';import'../chunk-6ZQE5SHE.mjs';import'../chunk-SD43KVTU.mjs';import'../chunk-RMUV6NJJ.mjs';import'../chunk-XPISSX5R.mjs';