@marimo-team/frontend 0.21.2-dev43 → 0.21.2-dev47

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 (283) hide show
  1. package/dist/assets/{CellStatus-IHJk0CT8.js → CellStatus-DX8MnBMk.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-Buaffg3u.js → ConnectedDataExplorerComponent-7yXYooWG.js} +1 -1
  3. package/dist/assets/{DeferredRequestRegistry-O6RDJKs0.js → DeferredRequestRegistry-B8jPCuU1.js} +1 -1
  4. package/dist/assets/{ImperativeModal-qEtcJ95s.js → ImperativeModal-C3CD5-Aq.js} +1 -1
  5. package/dist/assets/{JsonOutput-BIbkaOuk.js → JsonOutput-DqjAyzM8.js} +3 -3
  6. package/dist/assets/{LazyAnyLanguageCodeMirror-Dmh6kfiy.js → LazyAnyLanguageCodeMirror-CcCHIX38.js} +2 -2
  7. package/dist/assets/{MarimoErrorOutput-hYOXA8Ml.js → MarimoErrorOutput-Dat_S09q.js} +1 -1
  8. package/dist/assets/RenderHTML-C7XM39M2.js +1 -0
  9. package/dist/assets/{add-cell-with-ai-Cbktc1B0.js → add-cell-with-ai-y2xroEGf.js} +1 -1
  10. package/dist/assets/{add-connection-dialog-BewAq3li.js → add-connection-dialog-QDBOmil3.js} +1 -1
  11. package/dist/assets/{agent-panel-CtAqa-P9.js → agent-panel-DziFrEjJ.js} +1 -1
  12. package/dist/assets/{ai-model-dropdown-DgMZ5T_L.js → ai-model-dropdown-CiJpv5wN.js} +1 -1
  13. package/dist/assets/{alert-dialog-9WfvUF7e.js → alert-dialog-ebk_-wsU.js} +1 -1
  14. package/dist/assets/{any-language-editor-C4OP3txB.js → any-language-editor-DZYnKlJB.js} +1 -1
  15. package/dist/assets/{app-config-button-BLGBmcfT.js → app-config-button-CpAv9Tiu.js} +1 -1
  16. package/dist/assets/{architectureDiagram-VXUJARFQ-DfMHHFZ3.js → architectureDiagram-VXUJARFQ-DKmk99ac.js} +1 -1
  17. package/dist/assets/{azure-BeB26UeM.js → azure-Dw5gKmUz.js} +1 -1
  18. package/dist/assets/{blockDiagram-VD42YOAC-CuEDwbg7.js → blockDiagram-VD42YOAC-TpAhP5OQ.js} +1 -1
  19. package/dist/assets/{c4Diagram-YG6GDRKO-CD9uz7WG.js → c4Diagram-YG6GDRKO-Dg8hCyKf.js} +1 -1
  20. package/dist/assets/{cache-panel-qIxnndwr.js → cache-panel-D0OsHk_D.js} +1 -1
  21. package/dist/assets/{cell-editor-Ti3F6axu.js → cell-editor-RbAVpSFb.js} +1 -1
  22. package/dist/assets/{cell-link-BEnixmCb.js → cell-link-CNgO3c-T.js} +1 -1
  23. package/dist/assets/{cells-DqKJsMUm.js → cells-39RE4UzS.js} +3 -3
  24. package/dist/assets/channel-D1wPYhc9.js +1 -0
  25. package/dist/assets/{chat-display-B0hV2K6L.js → chat-display-BPUVrlA6.js} +1 -1
  26. package/dist/assets/{chat-panel-CNGIGWIs.js → chat-panel-esz5TfF-.js} +1 -1
  27. package/dist/assets/{chunk-5FQGJX7Z-CM1a_K7I.js → chunk-5FQGJX7Z-sGWxL7Ey.js} +3 -3
  28. package/dist/assets/{chunk-ABZYJK2D-D_Wumzom.js → chunk-ABZYJK2D-DXJ7hnjx.js} +1 -1
  29. package/dist/assets/{chunk-ATLVNIR6-BZ0lTgIn.js → chunk-ATLVNIR6-CTEqcLEc.js} +1 -1
  30. package/dist/assets/{chunk-B4BG7PRW-Dw1S6osV.js → chunk-B4BG7PRW-CkAIqtPf.js} +1 -1
  31. package/dist/assets/{chunk-DI55MBZ5-Q63FTCPP.js → chunk-DI55MBZ5-C4F9vu8o.js} +1 -1
  32. package/dist/assets/{chunk-EXTU4WIE-CfkJ_R7W.js → chunk-EXTU4WIE-BT0Py-4P.js} +1 -1
  33. package/dist/assets/{chunk-JA3XYJ7Z-B41fGeoj.js → chunk-JA3XYJ7Z-CGd7jja_.js} +1 -1
  34. package/dist/assets/{chunk-JZLCHNYA-D43EJxQw.js → chunk-JZLCHNYA-CqY-RYTj.js} +1 -1
  35. package/dist/assets/{chunk-N4CR4FBY-DCtw0-ni.js → chunk-N4CR4FBY-aUDjVzN7.js} +2 -2
  36. package/dist/assets/{chunk-QN33PNHL-CLA2rsaS.js → chunk-QN33PNHL-DHnCb5-U.js} +1 -1
  37. package/dist/assets/{chunk-QXUST7PY-De1DpbnL.js → chunk-QXUST7PY-CRO5kYCE.js} +1 -1
  38. package/dist/assets/{chunk-S3R3BYOJ-qrwvlUdq.js → chunk-S3R3BYOJ-CSHQgcuP.js} +1 -1
  39. package/dist/assets/{chunk-TZMSLE5B-C4KcThb0.js → chunk-TZMSLE5B-CE7o9asH.js} +1 -1
  40. package/dist/assets/classDiagram-2ON5EDUG-BDIQSKYv.js +1 -0
  41. package/dist/assets/classDiagram-v2-WZHVMYZB-Cdh4cVOB.js +1 -0
  42. package/dist/assets/{code-block-37QAKDTI-D4FF4cnN.js → code-block-37QAKDTI-DMpe1jNG.js} +1 -1
  43. package/dist/assets/{column-preview-CVqBaB8R.js → column-preview-BUKHsglA.js} +1 -1
  44. package/dist/assets/{command-DpusMohg.js → command-DmzEbs6L.js} +1 -1
  45. package/dist/assets/{command-palette-BfuIslSf.js → command-palette-BX5gNpUr.js} +1 -1
  46. package/dist/assets/{common-CYWtZYKm.js → common-B4yshY-H.js} +1 -1
  47. package/dist/assets/{components-DZQ7ndNS.js → components-DCqJqyys.js} +1 -1
  48. package/dist/assets/{components-C4dDqD7U.js → components-oKCjx6cN.js} +1 -1
  49. package/dist/assets/{config-3Aq84phF.js → config-DqxNMQDN.js} +1 -1
  50. package/dist/assets/{context-CIAP2NOh.js → context-CRmPPhx9.js} +1 -1
  51. package/dist/assets/{context-aware-panel-DEVrXLoa.js → context-aware-panel-DC0Te9Hj.js} +1 -1
  52. package/dist/assets/{copy-icon-C6n2vWSW.js → copy-icon-P0kzz1Pr.js} +1 -1
  53. package/dist/assets/{dagre-6UL2VRFP-BhMnPhuU.js → dagre-6UL2VRFP-XqoNLMQ3.js} +1 -1
  54. package/dist/assets/{data-grid-overlay-editor-kbv73SQ7.js → data-grid-overlay-editor-Cus1-BFN.js} +1 -1
  55. package/dist/assets/{datasource-Bo8w993m.js → datasource-DKHG39NV.js} +1 -1
  56. package/dist/assets/{dates-CHaNfieI.js → dates-CTqMeMGY.js} +1 -1
  57. package/dist/assets/{dependency-graph-panel-u9oPy09H.js → dependency-graph-panel-7GKT3dyD.js} +1 -1
  58. package/dist/assets/{diagram-PSM6KHXK-Cr2t4zul.js → diagram-PSM6KHXK-BuzKNNcN.js} +1 -1
  59. package/dist/assets/{diagram-QEK2KX5R-DLU_hSO4.js → diagram-QEK2KX5R-A5LBQS11.js} +1 -1
  60. package/dist/assets/{diagram-S2PKOQOG-C7EkNAO3.js → diagram-S2PKOQOG-dkJE8SA0.js} +1 -1
  61. package/dist/assets/{dialog-CVN1lcMF.js → dialog-1_jIyAb_.js} +1 -1
  62. package/dist/assets/{dist-DJBpXGro.js → dist-6P6vjf93.js} +1 -1
  63. package/dist/assets/dist-BWGxTsTP.js +1 -0
  64. package/dist/assets/{dist-CblX3KGI.js → dist-B_buFm3B.js} +1 -1
  65. package/dist/assets/{dist-CXLJUPFl.js → dist-BatEf-0f.js} +1 -1
  66. package/dist/assets/dist-C3AnARPE.js +1 -0
  67. package/dist/assets/{dist-BNC_tnlW.js → dist-C6ohaMKU.js} +1 -1
  68. package/dist/assets/{dist-BoDHthoc.js → dist-CO9Pg2Rc.js} +1 -1
  69. package/dist/assets/{dist-By6zhkxZ.js → dist-CSV6H5w_.js} +1 -1
  70. package/dist/assets/{dist-6FIAeDIu.js → dist-CYs1oP7g.js} +1 -1
  71. package/dist/assets/{dist-DbK_4_qo.js → dist-DD9ZJMK5.js} +1 -1
  72. package/dist/assets/{dist-DlTbNRBn.js → dist-DReDpc2z.js} +1 -1
  73. package/dist/assets/dist-DSlq5ZeQ.js +1 -0
  74. package/dist/assets/{dist-DrceDAhM.js → dist-DXyIIB32.js} +1 -1
  75. package/dist/assets/{dist-CcGcwrUD.js → dist-DkaderFA.js} +1 -1
  76. package/dist/assets/{dist-BiZQlfhr.js → dist-Dq3BlK4R.js} +1 -1
  77. package/dist/assets/{dist-ClzRAVN-.js → dist-Dxov2ltb.js} +1 -1
  78. package/dist/assets/{dist-BXXPfIam.js → dist-EtGG9C1A.js} +1 -1
  79. package/dist/assets/{dist-C3MmXcLA.js → dist-NjId5Gdz.js} +1 -1
  80. package/dist/assets/dist-ZM59OWYL.js +1 -0
  81. package/dist/assets/dist-_TwZ4tIe.js +1 -0
  82. package/dist/assets/dist-f9b2H4q_.js +1 -0
  83. package/dist/assets/{dist-mxGLXOFm.js → dist-feWVQ4dq.js} +1 -1
  84. package/dist/assets/{documentation-panel-BQRmNRb_.js → documentation-panel-D5d_BbHV.js} +1 -1
  85. package/dist/assets/{download-DtyAt8iO.js → download-B1vXaivj.js} +1 -1
  86. package/dist/assets/{dropdown-menu-DdPu5Kfu.js → dropdown-menu-BehqiLFL.js} +1 -1
  87. package/dist/assets/{edit-page-Cqvk7zWH.js → edit-page-B5cAZdO7.js} +3 -3
  88. package/dist/assets/{en-US-BO8E69bZ.js → en-US-f8tajDx1.js} +1 -1
  89. package/dist/assets/{erDiagram-Q2GNP2WA-DqlEo_Us.js → erDiagram-Q2GNP2WA-CgH6udOW.js} +1 -1
  90. package/dist/assets/{error-banner-BRG6IPhC.js → error-banner-J5F3weEj.js} +1 -1
  91. package/dist/assets/{error-panel-DclemF57.js → error-panel-DnhKJ5Ou.js} +1 -1
  92. package/dist/assets/{es-CzkousWe.js → es-DYI7U61K.js} +1 -1
  93. package/dist/assets/{esm-CBkHtTOV.js → esm-BC1J92im.js} +1 -1
  94. package/dist/assets/{esm-DhTsVMLM.js → esm-DKLLCu3N.js} +1 -1
  95. package/dist/assets/{field-B1jGbQlH.js → field-B08lvxnl.js} +1 -1
  96. package/dist/assets/file-explorer-panel-BUk69TND.js +26 -0
  97. package/dist/assets/{file-icons-D4HcGlr_.js → file-icons-3DTS8ZM7.js} +1 -1
  98. package/dist/assets/{floating-outline-B86gVj23.js → floating-outline-DmugATcB.js} +1 -1
  99. package/dist/assets/{flowDiagram-NV44I4VS-CQlIJ12H.js → flowDiagram-NV44I4VS-D85BL4rA.js} +1 -1
  100. package/dist/assets/{focus-B85PAbhR.js → focus-DlJH7sfh.js} +1 -1
  101. package/dist/assets/{form--K3o18rQ.js → form-760_EqmF.js} +1 -1
  102. package/dist/assets/{formats-rhOJovGE.js → formats-wYuh1bqp.js} +1 -1
  103. package/dist/assets/{formatting-B4ZCH3ol.js → formatting-CraOPe94.js} +1 -1
  104. package/dist/assets/{gallery-page-eRea0yic.js → gallery-page--paiPvYX.js} +1 -1
  105. package/dist/assets/{ganttDiagram-JELNMOA3-B3EGIuZL.js → ganttDiagram-JELNMOA3-DzCOXWlF.js} +1 -1
  106. package/dist/assets/{gitGraphDiagram-V2S2FVAM-h5SlguJK.js → gitGraphDiagram-V2S2FVAM-BUHURX6t.js} +1 -1
  107. package/dist/assets/{glide-data-editor-CoE8cs_o.js → glide-data-editor-DYdoQTO5.js} +4 -4
  108. package/dist/assets/{globals-C_t1YYpc.js → globals-7M5DRsIb.js} +1 -1
  109. package/dist/assets/home-page-CxQ1e98h.js +4 -0
  110. package/dist/assets/{hooks-W-qT5c6l.js → hooks-C3jEff2O.js} +1 -1
  111. package/dist/assets/{html-to-image-CoMmxXBd.js → html-to-image-DTFXm6_Z.js} +1 -1
  112. package/dist/assets/{index-D3rIJiKM.css → index-BmoocKR0.css} +1 -1
  113. package/dist/assets/{index-BSzIstPK.js → index-DNchElHl.js} +6 -6
  114. package/dist/assets/{infoDiagram-HS3SLOUP-pzpClObZ.js → infoDiagram-HS3SLOUP-GG5r0Y5G.js} +1 -1
  115. package/dist/assets/{input-CUwqpKjd.js → input-CN1ZeRYm.js} +1 -1
  116. package/dist/assets/{isValid-BGe7pJXT.js → isValid-DY4Mgbr7.js} +1 -1
  117. package/dist/assets/{journeyDiagram-XKPGCS4Q-BrdRi92v.js → journeyDiagram-XKPGCS4Q-B1dvnV4D.js} +1 -1
  118. package/dist/assets/{kanban-definition-3W4ZIXB7-B6WqgFqh.js → kanban-definition-3W4ZIXB7-CefbrXQv.js} +1 -1
  119. package/dist/assets/{kiosk-mode-zv0zIGqw.js → kiosk-mode-CyTnrzwK.js} +1 -1
  120. package/dist/assets/{layout-C_JVKYrz.js → layout-3b3tzmbb.js} +1 -1
  121. package/dist/assets/{linear-BP9rwmWK.js → linear-BDnrHGYO.js} +1 -1
  122. package/dist/assets/{links-CIQwYQ48.js → links-CptYD1FP.js} +1 -1
  123. package/dist/assets/{logs-panel-DowtOCA5.js → logs-panel-C4k_2IHW.js} +1 -1
  124. package/dist/assets/{markdown-renderer-CNaYgTOF.js → markdown-renderer-DSy5IuAx.js} +1 -1
  125. package/dist/assets/{menu-items-UxKrm8hS.js → menu-items-BpHXKv51.js} +1 -1
  126. package/dist/assets/mermaid-4DMBBIKO-g7AL4SLJ.js +1 -0
  127. package/dist/assets/{mermaid-Djr3jUAB.js → mermaid-C43VbdrM.js} +3 -3
  128. package/dist/assets/{mermaid-parser.core-DR82IMb2.js → mermaid-parser.core-CdM8D_p_.js} +1 -1
  129. package/dist/assets/{mindmap-definition-VGOIOE7T-DAmJpbPM.js → mindmap-definition-VGOIOE7T-CcV7D-wF.js} +1 -1
  130. package/dist/assets/{mode-Bn_XF6AW.js → mode-D-iRbN9x.js} +1 -1
  131. package/dist/assets/{multi-map-Pp1P2DOX.js → multi-map-C8RbwBrw.js} +1 -1
  132. package/dist/assets/{name-cell-input-CVt9kv6F.js → name-cell-input-Dyb0ZO4X.js} +1 -1
  133. package/dist/assets/{number-overlay-editor-D__AflXQ.js → number-overlay-editor-BBJO1mf8.js} +1 -1
  134. package/dist/assets/{outline-panel-ClI23gcy.js → outline-panel-D7CJwO8u.js} +1 -1
  135. package/dist/assets/{packages-panel-BW2m-sNe.js → packages-panel-Bp1SYjgc.js} +1 -1
  136. package/dist/assets/{panels-B2DAaT1E.js → panels-D0aw6jdc.js} +1 -1
  137. package/dist/assets/{pieDiagram-ADFJNKIX-DbGIFRoq.js → pieDiagram-ADFJNKIX-C1fBf15W.js} +1 -1
  138. package/dist/assets/{popover-BPGG2gPG.js → popover-Bvoif-Mg.js} +1 -1
  139. package/dist/assets/{precisionRound-BOmLQIKI.js → precisionRound-CCOoIlcP.js} +1 -1
  140. package/dist/assets/{process-output-BewZuQwI.js → process-output-BxPWHcIi.js} +1 -1
  141. package/dist/assets/{quadrantDiagram-AYHSOK5B-CLAtyple.js → quadrantDiagram-AYHSOK5B-RVooN-fX.js} +1 -1
  142. package/dist/assets/{react-vega-BZav_-2n.js → react-vega-BKRQSy0g.js} +1 -1
  143. package/dist/assets/react-vega-DXESF7qN.js +1 -0
  144. package/dist/assets/{readonly-python-code-BgTK_w0H.js → readonly-python-code-D95oshJa.js} +1 -1
  145. package/dist/assets/{renderShortcut-CnD1Dah5.js → renderShortcut-BYvKm38e.js} +1 -1
  146. package/dist/assets/{request-registry-B-7cIM_I.js → request-registry-XB2EzJHm.js} +1 -1
  147. package/dist/assets/{requirementDiagram-UZGBJVZJ-DDDTB1LD.js → requirementDiagram-UZGBJVZJ-DtqOYJpH.js} +1 -1
  148. package/dist/assets/{run-page-DMpRvHgf.js → run-page-B7CASued.js} +1 -1
  149. package/dist/assets/{sankeyDiagram-TZEHDZUN-DAWPOfBw.js → sankeyDiagram-TZEHDZUN-DmcooLA8.js} +1 -1
  150. package/dist/assets/{scratchpad-panel-ClDi2sdV.js → scratchpad-panel-BIVRgYOU.js} +1 -1
  151. package/dist/assets/{secrets-panel-CfWyTaso.js → secrets-panel-C24hZEiO.js} +1 -1
  152. package/dist/assets/{select-CxT2Geqr.js → select-Cnd3vm9n.js} +1 -1
  153. package/dist/assets/{sequenceDiagram-WL72ISMW-D_qAidD2.js → sequenceDiagram-WL72ISMW-S2qeLb7J.js} +1 -1
  154. package/dist/assets/{session-panel-C-RbWN-G.js → session-panel-CNabBHQm.js} +1 -1
  155. package/dist/assets/{share-BdH_5I58.js → share-NjpZ54PJ.js} +1 -1
  156. package/dist/assets/{snippets-panel-DCdeI2hB.js → snippets-panel-D1JAeJj1.js} +1 -1
  157. package/dist/assets/{spec-DbmSqx09.js → spec-DnVBmJUh.js} +1 -1
  158. package/dist/assets/{state-Ce7CVShi.js → state-BagvlaEz.js} +1 -1
  159. package/dist/assets/{state-CJ2HIW-e.js → state-Cz_wrzCz.js} +1 -1
  160. package/dist/assets/{state-CBmCYWFH.js → state-DMQXxemS.js} +1 -1
  161. package/dist/assets/{stateDiagram-FKZM4ZOC-C7qgDrGA.js → stateDiagram-FKZM4ZOC-uuQ60pIl.js} +1 -1
  162. package/dist/assets/stateDiagram-v2-4FDKWEC3-D-GWhQTG.js +1 -0
  163. package/dist/assets/stex-CruVQx-P.js +1 -0
  164. package/dist/assets/{switch-O_7alg7G.js → switch-Bwpd2AFq.js} +1 -1
  165. package/dist/assets/{terminal-BZZqbl0D.js → terminal-Gl8Fi44y.js} +1 -1
  166. package/dist/assets/{time-D2GKc0U6.js → time-Bw8f15NM.js} +1 -1
  167. package/dist/assets/{timeline-definition-IT6M3QCI-hd6uJKGs.js → timeline-definition-IT6M3QCI-TKWeDnSQ.js} +1 -1
  168. package/dist/assets/{toggle-RCwU-rnE.js → toggle-C_gNjXg8.js} +1 -1
  169. package/dist/assets/{tooltip-D9723Brr.js → tooltip-CR_izE8Q.js} +1 -1
  170. package/dist/assets/{tracing-BxcUfhUv.js → tracing-DwAC7DWN.js} +1 -1
  171. package/dist/assets/tracing-panel-D1iNgclL.js +2 -0
  172. package/dist/assets/{tree-Ch2-GuhG.js → tree-WVrWjdwv.js} +3 -3
  173. package/dist/assets/{useAddCell-BpBkEpP6.js → useAddCell-D6Q7JziZ.js} +1 -1
  174. package/dist/assets/{useBoolean-Cb23qnhy.js → useBoolean-CrltYVhE.js} +1 -1
  175. package/dist/assets/{useCellActionButton-fJ6SGX-Z.js → useCellActionButton-B2G9OaX9.js} +1 -1
  176. package/dist/assets/{useDateFormatter-CpE7XQLs.js → useDateFormatter-DOoVZUts.js} +1 -1
  177. package/dist/assets/{useDeleteCell-B4nKRnTM.js → useDeleteCell-d8veThW7.js} +1 -1
  178. package/dist/assets/{useDependencyPanelTab-BUjZxWnG.js → useDependencyPanelTab-B3iIj3MO.js} +1 -1
  179. package/dist/assets/{useInstallPackage-C9V-on2J.js → useInstallPackage-CQEr5429.js} +1 -1
  180. package/dist/assets/{useNotebookActions-CooxVonM.js → useNotebookActions-SAEOWcBo.js} +1 -1
  181. package/dist/assets/{useNumberFormatter-DbDKSvEd.js → useNumberFormatter-BXZcbTzH.js} +1 -1
  182. package/dist/assets/{usePress-BHGkpw8X.js → usePress-alQ5Crny.js} +1 -1
  183. package/dist/assets/{useRunCells-D5wCIJdU.js → useRunCells-Dhl8ZTGh.js} +1 -1
  184. package/dist/assets/{useSplitCell-D8kqiCTS.js → useSplitCell-BSnFazbH.js} +1 -1
  185. package/dist/assets/{utils-CdjCA1J8.js → utils-C24l2A1T.js} +1 -1
  186. package/dist/assets/{vega-component-CRbeDmeM.js → vega-component-9Pf4pVZL.js} +1 -1
  187. package/dist/assets/{vega-loader.browser-CZV6_g2i.js → vega-loader.browser-BJ9oKrvH.js} +1 -1
  188. package/dist/assets/{write-secret-modal-BCvuRAFb.js → write-secret-modal-BFCsWMoW.js} +1 -1
  189. package/dist/assets/{xychartDiagram-PRI3JC2R-CXlUBSbQ.js → xychartDiagram-PRI3JC2R-CIp-yeSa.js} +1 -1
  190. package/dist/index.html +125 -125
  191. package/package.json +1 -1
  192. package/src/components/storage/storage-file-viewer.tsx +35 -1
  193. package/src/components/storage/storage-inspector.tsx +8 -2
  194. package/src/components/storage/storage-snippets.ts +3 -3
  195. package/src/css/md-tooltip.css +4 -39
  196. package/src/plugins/core/RenderHTML.tsx +17 -0
  197. package/src/plugins/core/__test__/RenderHTML.test.ts +45 -0
  198. package/dist/assets/RenderHTML-DduaBOBv.js +0 -1
  199. package/dist/assets/channel-CkT8Qdo2.js +0 -1
  200. package/dist/assets/classDiagram-2ON5EDUG-BhMT_rTz.js +0 -1
  201. package/dist/assets/classDiagram-v2-WZHVMYZB-D-F4WEyb.js +0 -1
  202. package/dist/assets/dist-BTqMkf4j.js +0 -1
  203. package/dist/assets/dist-DHw9sXeN.js +0 -1
  204. package/dist/assets/dist-Du0qZeXz.js +0 -1
  205. package/dist/assets/dist-a0FfbvMD.js +0 -1
  206. package/dist/assets/dist-cfkfP0ni.js +0 -1
  207. package/dist/assets/dist-pzQ9JG-p.js +0 -1
  208. package/dist/assets/file-explorer-panel-D706RRJ-.js +0 -26
  209. package/dist/assets/home-page-C5LO1JXE.js +0 -4
  210. package/dist/assets/mermaid-4DMBBIKO-PoHnhmy8.js +0 -1
  211. package/dist/assets/react-vega-Da-Ps9UW.js +0 -1
  212. package/dist/assets/stateDiagram-v2-4FDKWEC3-CEqeIlM0.js +0 -1
  213. package/dist/assets/stex-BBWVYm-R.js +0 -1
  214. package/dist/assets/tracing-panel-DK4YfdoZ.js +0 -2
  215. /package/dist/assets/{Combination-Cs9nbinQ.js → Combination-CSPK4t6z.js} +0 -0
  216. /package/dist/assets/{Deferred-BMfCOLaw.js → Deferred-CfyqLOPG.js} +0 -0
  217. /package/dist/assets/{SSRProvider-DC7ElCZZ.js → SSRProvider-CwqN9FWV.js} +0 -0
  218. /package/dist/assets/{badge-hTpPIsMT.js → badge-DImLVznf.js} +0 -0
  219. /package/dist/assets/{blob-CObhN-9g.js → blob-DgooIGjS.js} +0 -0
  220. /package/dist/assets/{bot-message-square-CK6eoGWy.js → bot-message-square-Dw41U6lL.js} +0 -0
  221. /package/dist/assets/{chart-no-axes-column-DV8gdCvH.js → chart-no-axes-column-a9XtWmzk.js} +0 -0
  222. /package/dist/assets/{check-BE0hEwVo.js → check-DZA_bRpw.js} +0 -0
  223. /package/dist/assets/{chevron-right-D0GQBpTb.js → chevron-right-CvVxySQk.js} +0 -0
  224. /package/dist/assets/{circle-check-gLIOLu8x.js → circle-check-CbaVeozR.js} +0 -0
  225. /package/dist/assets/{circle-play-DYGULlKZ.js → circle-play-DYn5nR6N.js} +0 -0
  226. /package/dist/assets/{circle-plus-CGG-gArM.js → circle-plus-nCze0-py.js} +0 -0
  227. /package/dist/assets/{clipboard-paste-DoYSN8Sv.js → clipboard-paste-EHXeKq9D.js} +0 -0
  228. /package/dist/assets/{code-xml-DwHPF_nL.js → code-xml-BlrJCgNZ.js} +0 -0
  229. /package/dist/assets/{copy-CkudG0Ej.js → copy-D6N1-xc1.js} +0 -0
  230. /package/dist/assets/{copy-CA4fP28I.js → copy-KjcPgPw9.js} +0 -0
  231. /package/dist/assets/{database-zap-DTWCDKdn.js → database-zap-BIGMFOfP.js} +0 -0
  232. /package/dist/assets/{defaultLocale-DK1MWd7f.js → defaultLocale-CGfP-Ye3.js} +0 -0
  233. /package/dist/assets/{defaultLocale-OkOxlkkM.js → defaultLocale-CuYNS33t.js} +0 -0
  234. /package/dist/assets/{dist-8UD0A5sU.js → dist-BF9S272t.js} +0 -0
  235. /package/dist/assets/{dist-apDpadc4.js → dist-Bk1itfBD.js} +0 -0
  236. /package/dist/assets/{dist-CQqv2gQL.js → dist-Dm11d0_A.js} +0 -0
  237. /package/dist/assets/{download-DBW9RXtT.js → download-nLboiTtW.js} +0 -0
  238. /package/dist/assets/{ellipsis-0_zJdF6H.js → ellipsis-d7eaKIFn.js} +0 -0
  239. /package/dist/assets/{ellipsis-vertical-CAB7tdza.js → ellipsis-vertical-DBQ5kWTo.js} +0 -0
  240. /package/dist/assets/{emotion-is-prop-valid.esm-D1keIaYa.js → emotion-is-prop-valid.esm-D7FeWASw.js} +0 -0
  241. /package/dist/assets/{errors-Bfogio62.js → errors-0IrrdfSG.js} +0 -0
  242. /package/dist/assets/{extends-DRbCSry7.js → extends-aq1t6BkR.js} +0 -0
  243. /package/dist/assets/{eye-off-vwi9L975.js → eye-off-CF3GmvXV.js} +0 -0
  244. /package/dist/assets/{file-DzHkbIdO.js → file-C-yMeaec.js} +0 -0
  245. /package/dist/assets/{file-headphone-B5q2Ow55.js → file-headphone-CPAP8asn.js} +0 -0
  246. /package/dist/assets/{file-plus-corner-lLQw9OnR.js → file-plus-corner-ks__N1mr.js} +0 -0
  247. /package/dist/assets/{github-BVtI-3F1.js → github-CRD4USKm.js} +0 -0
  248. /package/dist/assets/{image-DXfkah9d.js → image-CfyJzBP9.js} +0 -0
  249. /package/dist/assets/{link-Cf10mh3t.js → link-_dbp0XNB.js} +0 -0
  250. /package/dist/assets/{maps-OKerBHH8.js → maps-DQsjfyTy.js} +0 -0
  251. /package/dist/assets/{numbers-CYnquDho.js → numbers-Cno6K0UF.js} +0 -0
  252. /package/dist/assets/{objectWithoutPropertiesLoose-DP4vAkvg.js → objectWithoutPropertiesLoose-Dxmp_Bd_.js} +0 -0
  253. /package/dist/assets/{ordinal-BjO5SoTk.js → ordinal-CMAUv8ku.js} +0 -0
  254. /package/dist/assets/{paths-D2lG83Oh.js → paths-BVwhPRFT.js} +0 -0
  255. /package/dist/assets/{play-DKSqmedg.js → play-Bu_0ogGD.js} +0 -0
  256. /package/dist/assets/{plus-dVmh0yTy.js → plus-DJ99CUbx.js} +0 -0
  257. /package/dist/assets/{preload-helper-BW0IMuFq.js → preload-helper-y72bE5iF.js} +0 -0
  258. /package/dist/assets/{prop-types-RrUi-pOT.js → prop-types-DRf51_gT.js} +0 -0
  259. /package/dist/assets/{purify.es-BBn8CPhf.js → purify.es-Cf8RQecB.js} +0 -0
  260. /package/dist/assets/{range-DNqFcYmr.js → range-ClqUI25v.js} +0 -0
  261. /package/dist/assets/{refresh-ccw-DLpfIr8v.js → refresh-ccw-DQ6SJ8UC.js} +0 -0
  262. /package/dist/assets/{refresh-cw-CHAHPgkx.js → refresh-cw-Dg9tCj4k.js} +0 -0
  263. /package/dist/assets/{rotate-ccw-hLlF_82X.js → rotate-ccw-BCkZViUZ.js} +0 -0
  264. /package/dist/assets/{save-8fSvKYJT.js → save-CUdcv5qm.js} +0 -0
  265. /package/dist/assets/{session-BrEm7qNv.js → session-CByuQ-M-.js} +0 -0
  266. /package/dist/assets/{settings-CzQUw9rV.js → settings-B7nhfCat.js} +0 -0
  267. /package/dist/assets/{spinner-C5JoisA7.js → spinner-pCogyRyo.js} +0 -0
  268. /package/dist/assets/{square-CxAsQQ77.js → square-KVNDGpgy.js} +0 -0
  269. /package/dist/assets/{square-function-B006EYFX.js → square-function-BMNCw7Qb.js} +0 -0
  270. /package/dist/assets/{stex-0ac7Aukl.js → stex-C6JeW1YI.js} +0 -0
  271. /package/dist/assets/{table-BCnp9gKC.js → table-Od8PbuV-.js} +0 -0
  272. /package/dist/assets/{toDate-BqKH-Jd9.js → toDate-Cfp9W_O9.js} +0 -0
  273. /package/dist/assets/{trash-2-CAoNMkjq.js → trash-2-Bc_J7TQO.js} +0 -0
  274. /package/dist/assets/{trash-BZMAQneW.js → trash-Cxd189Vw.js} +0 -0
  275. /package/dist/assets/{triangle-alert-qZo1ox6x.js → triangle-alert-CzLrbLGN.js} +0 -0
  276. /package/dist/assets/{types-C1RN112u.js → types-CLOMZuqU.js} +0 -0
  277. /package/dist/assets/{use-toast-Hc8CXlvz.js → use-toast-BtZldTi5.js} +0 -0
  278. /package/dist/assets/{useDebounce-B0dx2Gp0.js → useDebounce-DwTO_rGp.js} +0 -0
  279. /package/dist/assets/{useTheme-BYXBU1of.js → useTheme-KDW4sktg.js} +0 -0
  280. /package/dist/assets/{uuid-ClFZlR7U.js → uuid-BukULOeS.js} +0 -0
  281. /package/dist/assets/{workflow-BmeqNuSH.js → workflow-BqHyyStM.js} +0 -0
  282. /package/dist/assets/{x-BI1M8X_v.js → x-CdLP7-v3.js} +0 -0
  283. /package/dist/assets/{youtube-DE-Ej6FR.js → youtube-CfU-SnDw.js} +0 -0
@@ -1,3 +1,3 @@
1
- import{r as Ve,s as ue,t as Or}from"./chunk-LvLJmgfZ.js";import{t as Ir}from"./react-Bj1aDYRI.js";import{t as br}from"./jsx-runtime-icT_Ltz2.js";import{t as Sr}from"./createLucideIcon-Cm-Z7dYr.js";import{d as Dr}from"./popover-BPGG2gPG.js";import{t as Tr}from"./extends-DRbCSry7.js";var Er=Sr("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},he(e,t)}function wr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,he(e,t)}function Ke(e){if(e===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var xr=Or(((e,t)=>{t.exports=function r(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var s,o,a;if(Array.isArray(n)){if(s=n.length,s!=i.length)return!1;for(o=s;o--!==0;)if(!r(n[o],i[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(a=Object.keys(n),s=a.length,s!==Object.keys(i).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(i,a[o]))return!1;for(o=s;o--!==0;){var d=a[o];if(!r(n[d],i[d]))return!1}return!0}return n!==n&&i!==i}})),f=ue(Ir(),1);const Ye=(0,f.createContext)({dragDropManager:void 0});function R(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var qe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),fe=function(){return Math.random().toString(36).substring(7).split("").join(".")},$e={INIT:"@@redux/INIT"+fe(),REPLACE:"@@redux/REPLACE"+fe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fe()}};function Cr(e){if(typeof e!="object"||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xe(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw Error(R(0));if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),r!==void 0){if(typeof r!="function")throw Error(R(1));return r(Xe)(e,t)}if(typeof e!="function")throw Error(R(2));var i=e,s=t,o=[],a=o,d=!1;function h(){a===o&&(a=o.slice())}function p(){if(d)throw Error(R(3));return s}function b(l){if(typeof l!="function")throw Error(R(4));if(d)throw Error(R(5));var u=!0;return h(),a.push(l),function(){if(u){if(d)throw Error(R(6));u=!1,h();var g=a.indexOf(l);a.splice(g,1),o=null}}}function I(l){if(!Cr(l))throw Error(R(7));if(l.type===void 0)throw Error(R(8));if(d)throw Error(R(9));try{d=!0,s=i(s,l)}finally{d=!1}for(var u=o=a,g=0;g<u.length;g++){var O=u[g];O()}return l}function v(l){if(typeof l!="function")throw Error(R(10));i=l,I({type:$e.REPLACE})}function c(){var l,u=b;return l={subscribe:function(g){if(typeof g!="object"||!g)throw Error(R(11));function O(){g.next&&g.next(p())}return O(),{unsubscribe:u(O)}}},l[qe]=function(){return this},l}return I({type:$e.INIT}),n={dispatch:I,subscribe:b,getState:p,replaceReducer:v},n[qe]=c,n}function y(e,t,...r){if(Nr()&&t===void 0)throw Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=Error(t.replace(/%s/g,function(){return r[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function Nr(){return typeof process<"u"&&!0}function Rr(e,t,r){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,e)}function Pr(e,t){return e.filter(r=>r!==t)}function Je(e){return typeof e=="object"}function jr(e,t){let r=new Map,n=s=>{r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);let i=[];return r.forEach((s,o)=>{s===1&&i.push(o)}),i}function _r(e,t){return e.filter(r=>t.indexOf(r)>-1)}const ge="dnd-core/INIT_COORDS",J="dnd-core/BEGIN_DRAG",pe="dnd-core/PUBLISH_DRAG_SOURCE",Q="dnd-core/HOVER",Z="dnd-core/DROP",ee="dnd-core/END_DRAG";function Qe(e,t){return{type:ge,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var Mr={type:ge,payload:{clientOffset:null,sourceClientOffset:null}};function Ar(e){return function(t=[],r={publishSource:!0}){let{publishSource:n=!0,clientOffset:i,getSourceClientOffset:s}=r,o=e.getMonitor(),a=e.getRegistry();e.dispatch(Qe(i)),Lr(t,o,a);let d=Fr(t,o);if(d==null){e.dispatch(Mr);return}let h=null;if(i){if(!s)throw Error("getSourceClientOffset must be defined");kr(s),h=s(d)}e.dispatch(Qe(i,h));let p=a.getSource(d).beginDrag(o,d);if(p!=null)return Hr(p),a.pinSource(d),{type:J,payload:{itemType:a.getSourceType(d),item:p,sourceId:d,clientOffset:i||null,sourceClientOffset:h||null,isSourcePublic:!!n}}}}function Lr(e,t,r){y(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){y(r.getSource(n),"Expected sourceIds to be registered.")})}function kr(e){y(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Hr(e){y(Je(e),"Item must be an object.")}function Fr(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Ur(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Br(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ur(e,i,r[i])})}return e}function zr(e){return function(t={}){let r=e.getMonitor(),n=e.getRegistry();Wr(r),Kr(r).forEach((i,s)=>{let o={type:Z,payload:{dropResult:Br({},t,Gr(i,s,n,r))}};e.dispatch(o)})}}function Wr(e){y(e.isDragging(),"Cannot call drop while not dragging."),y(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function Gr(e,t,r,n){let i=r.getTarget(e),s=i?i.drop(n,e):void 0;return Vr(s),s===void 0&&(s=t===0?{}:n.getDropResult()),s}function Vr(e){y(e===void 0||Je(e),"Drop result must either be an object or undefined.")}function Kr(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Yr(e){return function(){let t=e.getMonitor(),r=e.getRegistry();qr(t);let n=t.getSourceId();return n!=null&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:ee}}}function qr(e){y(e.isDragging(),"Cannot call endDrag while not dragging.")}function ve(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function $r(e){return function(t,{clientOffset:r}={}){Xr(t);let n=t.slice(0),i=e.getMonitor(),s=e.getRegistry();return Qr(n,s,i.getItemType()),Jr(n,i,s),Zr(n,i,s),{type:Q,payload:{targetIds:n,clientOffset:r||null}}}}function Xr(e){y(Array.isArray(e),"Expected targetIds to be an array.")}function Jr(e,t,r){y(t.isDragging(),"Cannot call hover while not dragging."),y(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){let i=e[n];y(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array."),y(r.getTarget(i),"Expected targetIds to be registered.")}}function Qr(e,t,r){for(let n=e.length-1;n>=0;n--){let i=e[n];ve(t.getTargetType(i),r)||e.splice(n,1)}}function Zr(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function en(e){return function(){if(e.getMonitor().isDragging())return{type:pe}}}function tn(e){return{beginDrag:Ar(e),publishDragSource:en(e),hover:$r(e),drop:zr(e),endDrag:Yr(e)}}var rn=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function r(i){return(...s)=>{let o=i.apply(e,s);o!==void 0&&t(o)}}let n=tn(this);return Object.keys(n).reduce((i,s)=>{let o=n[s];return i[s]=r(o),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function nn(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ze(e,t){return{x:e.x-t.x,y:e.y-t.y}}function sn(e){let{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:Ze(nn(t,n),r)}function on(e){let{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:Ze(t,r)}const K=[],me=[];K.__IS_NONE__=!0,me.__IS_ALL__=!0;function an(e,t){return e===K?!1:e===me||t===void 0?!0:_r(t,e).length>0}var ln=class{subscribeToStateChange(e,t={}){let{handlerIds:r}=t;y(typeof e=="function","listener must be a function."),y(r===void 0||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe(()=>{let i=this.store.getState(),s=i.stateId;try{s===n||s===n+1&&!an(i.dirtyHandlerIds,r)||e()}finally{n=s}})}subscribeToOffsetChange(e){y(typeof e=="function","listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let r=this.store.getState().dragOffset;r!==t&&(t=r,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return y(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return y(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:ve(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return y(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:r}=t;if(!this.isDragging())return!1;let n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ve(n,i))return!1;let s=this.getTargetIds();if(!s.length)return!1;let o=s.indexOf(e);return r?o===s.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return sn(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return on(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},et=typeof global<"u"?global:self,tt=et.MutationObserver||et.WebKitMutationObserver;function rt(e){return function(){let t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}function dn(e){let t=1,r=new tt(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const cn=typeof tt=="function"?dn:rt;var un=class{enqueueTask(e){let{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let r=0,n=e.length-this.index;r<n;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=cn(this.flush),this.requestErrorThrow=rt(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},hn=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},fn=class{create(e){let t=this.freeTasks,r=t.length?t.pop():new hn(this.onError,n=>t[t.length]=n);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}},nt=new un,gn=new fn(nt.registerPendingError);function pn(e){nt.enqueueTask(gn.create(e))}const ye="dnd-core/ADD_SOURCE",Oe="dnd-core/ADD_TARGET",Ie="dnd-core/REMOVE_SOURCE",te="dnd-core/REMOVE_TARGET";function vn(e){return{type:ye,payload:{sourceId:e}}}function mn(e){return{type:Oe,payload:{targetId:e}}}function yn(e){return{type:Ie,payload:{sourceId:e}}}function On(e){return{type:te,payload:{targetId:e}}}function In(e){y(typeof e.canDrag=="function","Expected canDrag to be a function."),y(typeof e.beginDrag=="function","Expected beginDrag to be a function."),y(typeof e.endDrag=="function","Expected endDrag to be a function.")}function bn(e){y(typeof e.canDrop=="function","Expected canDrop to be a function."),y(typeof e.hover=="function","Expected hover to be a function."),y(typeof e.drop=="function","Expected beginDrag to be a function.")}function be(e,t){if(t&&Array.isArray(e)){e.forEach(r=>be(r,!1));return}y(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var P;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(P||(P={}));var Sn=0;function Dn(){return Sn++}function Tn(e){let t=Dn().toString();switch(e){case P.SOURCE:return`S${t}`;case P.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function it(e){switch(e[0]){case"S":return P.SOURCE;case"T":return P.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function st(e,t){let r=e.entries(),n=!1;do{let{done:i,value:[,s]}=r.next();if(s===t)return!0;n=!!i}while(!n);return!1}var En=class{addSource(e,t){be(e),In(t);let r=this.addHandler(P.SOURCE,e,t);return this.store.dispatch(vn(r)),r}addTarget(e,t){be(e,!0),bn(t);let r=this.addHandler(P.TARGET,e,t);return this.store.dispatch(mn(r)),r}containsHandler(e){return st(this.dragSources,e)||st(this.dropTargets,e)}getSource(e,t=!1){return y(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return y(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return it(e)===P.SOURCE}isTargetId(e){return it(e)===P.TARGET}removeSource(e){y(this.getSource(e),"Expected an existing source."),this.store.dispatch(yn(e)),pn(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){y(this.getTarget(e),"Expected an existing target."),this.store.dispatch(On(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);y(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){y(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){let n=Tn(e);return this.types.set(n,t),e===P.SOURCE?this.dragSources.set(n,r):e===P.TARGET&&this.dropTargets.set(n,r),n}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}};const wn=(e,t)=>e===t;function xn(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function Cn(e,t,r=wn){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function Nn(e=K,t){switch(t.type){case Q:break;case ye:case Oe:case te:case Ie:return K;case J:case pe:case ee:case Z:default:return me}let{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=jr(r,n);if(!(i.length>0||!Cn(r,n)))return K;let s=n[n.length-1],o=r[r.length-1];return s!==o&&(s&&i.push(s),o&&i.push(o)),i}function Rn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Rn(e,i,r[i])})}return e}var ot={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function jn(e=ot,t){let{payload:r}=t;switch(t.type){case ge:case J:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Q:return xn(e.clientOffset,r.clientOffset)?e:Pn({},e,{clientOffset:r.clientOffset});case ee:case Z:return ot;default:return e}}function _n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){_n(e,i,r[i])})}return e}var Mn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function An(e=Mn,t){let{payload:r}=t;switch(t.type){case J:return U({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case pe:return U({},e,{isSourcePublic:!0});case Q:return U({},e,{targetIds:r.targetIds});case te:return e.targetIds.indexOf(r.targetId)===-1?e:U({},e,{targetIds:Pr(e.targetIds,r.targetId)});case Z:return U({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ee:return U({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Ln(e=0,t){switch(t.type){case ye:case Oe:return e+1;case Ie:case te:return e-1;default:return e}}function kn(e=0){return e+1}function Hn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Hn(e,i,r[i])})}return e}function Un(e={},t){return{dirtyHandlerIds:Nn(e.dirtyHandlerIds,{type:t.type,payload:Fn({},t.payload,{prevTargetIds:Rr(e,"dragOperation.targetIds",[])})}),dragOffset:jn(e.dragOffset,t),refCount:Ln(e.refCount,t),dragOperation:An(e.dragOperation,t),stateId:kn(e.stateId)}}function Bn(e,t=void 0,r={},n=!1){let i=zn(n),s=new rn(i,new ln(i,new En(i))),o=e(s,t,r);return s.receiveBackend(o),s}function zn(e){let t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Xe(Un,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var m=ue(br(),1);function Wn(e,t){if(e==null)return{};var r=Gn(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Gn(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var at=0,re=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),lt=(0,f.memo)(function(e){var{children:t}=e;let[r,n]=Vn(Wn(e,["children"]));return(0,f.useEffect)(()=>{if(n){let i=dt();return++at,()=>{--at===0&&(i[re]=null)}}},[]),(0,m.jsx)(Ye.Provider,{value:r,children:t})});function Vn(e){return"manager"in e?[{dragDropManager:e.manager},!1]:[Kn(e.backend,e.context,e.options,e.debugMode),!e.context]}function Kn(e,t=dt(),r,n){let i=t;return i[re]||(i[re]={dragDropManager:Bn(e,t,r,n)}),i[re]}function dt(){return typeof global<"u"?global:window}const k=typeof window<"u"?f.useLayoutEffect:f.useEffect;var Yn=ue(xr(),1);function ct(e,t,r){let[n,i]=(0,f.useState)(()=>t(e)),s=(0,f.useCallback)(()=>{let o=t(e);(0,Yn.default)(n,o)||(i(o),r&&r())},[n,e,r]);return k(s),[n,s]}function qn(e,t,r){let[n,i]=ct(e,t,r);return k(function(){let s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),n}function ut(e,t,r){return qn(t,e||(()=>({})),()=>r.reconnect())}function ht(e,t){let r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),(0,f.useMemo)(()=>typeof e=="function"?e():e,r)}function $n(e){return(0,f.useMemo)(()=>e.hooks.dragSource(),[e])}function Xn(e){return(0,f.useMemo)(()=>e.hooks.dragPreview(),[e])}var Se=!1,De=!1,Jn=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){y(!Se,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Se=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Se=!1}}isDragging(){if(!this.sourceId)return!1;y(!De,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return De=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{De=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},Te=!1,Qn=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;y(!Te,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Te=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Te=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function Zn(e,t,r){let n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function ei(e,t,r){let n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function Ee(e,t,r,n){let i=r?r.call(n,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;let s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;let a=Object.prototype.hasOwnProperty.bind(t);for(let d=0;d<s.length;d++){let h=s[d];if(!a(h))return!1;let p=e[h],b=t[h];if(i=r?r.call(n,p,b,h):void 0,i===!1||i===void 0&&p!==b)return!1}return!0}function we(e){return typeof e=="object"&&!!e&&Object.prototype.hasOwnProperty.call(e,"current")}function ti(e){if(typeof e.type=="string")return;let t=e.type.displayName||e.type.name||"the component";throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function ri(e){return(t=null,r=null)=>{if(!(0,f.isValidElement)(t)){let i=t;return e(i,r),i}let n=t;return ti(n),ni(n,r?i=>e(i,r):e)}}function ft(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{let i=ri(n);t[r]=()=>i}}),t}function gt(e,t){typeof e=="function"?e(t):e.current=t}function ni(e,t){let r=e.ref;return y(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,f.cloneElement)(e,{ref:n=>{gt(r,n),gt(t,n)}}):(0,f.cloneElement)(e,{ref:t})}var ii=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),this.handlerId){if(!t){this.lastConnectedDragPreview=t;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Ee(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Ee(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe=(this.dragSourceUnsubscribe(),void 0))}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=ft({dragSource:(t,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,we(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,we(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},si=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Ee(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget=(this.unsubscribeDropTarget(),void 0))}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=ft({dropTarget:(t,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,we(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function A(){let{dragDropManager:e}=(0,f.useContext)(Ye);return y(e!=null,"Expected drag drop context"),e}function oi(e,t){let r=A(),n=(0,f.useMemo)(()=>new ii(r.getBackend()),[r]);return k(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),k(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function ai(){let e=A();return(0,f.useMemo)(()=>new Jn(e),[e])}var li=class{beginDrag(){let e=this.spec,t=this.monitor,r=null;return r=typeof e.item=="object"?e.item:typeof e.item=="function"?e.item(t):{},r??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(t):!0}isDragging(e,t){let r=this.spec,n=this.monitor,{isDragging:i}=r;return i?i(n):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,r=this.connector,{end:n}=e;n&&n(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}};function di(e,t,r){let n=(0,f.useMemo)(()=>new li(e,t,r),[t,r]);return(0,f.useEffect)(()=>{n.spec=e},[e]),n}function ci(e){return(0,f.useMemo)(()=>{let t=e.type;return y(t!=null,"spec.type must be defined"),t},[e])}function ui(e,t,r){let n=A(),i=di(e,t,r),s=ci(e);k(function(){if(s!=null){let[o,a]=ei(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a}},[n,t,r,i,s])}function hi(e,t){let r=ht(e,t);y(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");let n=ai(),i=oi(r.options,r.previewOptions);return ui(r,n,i),[ut(r.collect,n,i),$n(i),Xn(i)]}function fi(e){let t=A().getMonitor(),[r,n]=ct(t,e);return(0,f.useEffect)(()=>t.subscribeToOffsetChange(n)),(0,f.useEffect)(()=>t.subscribeToStateChange(n)),r}function gi(e){return(0,f.useMemo)(()=>e.hooks.dropTarget(),[e])}function pi(e){let t=A(),r=(0,f.useMemo)(()=>new si(t.getBackend()),[t]);return k(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function vi(){let e=A();return(0,f.useMemo)(()=>new Qn(e),[e])}function mi(e){let{accept:t}=e;return(0,f.useMemo)(()=>(y(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}var yi=class{canDrop(){let e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function Oi(e,t){let r=(0,f.useMemo)(()=>new yi(e,t),[t]);return(0,f.useEffect)(()=>{r.spec=e},[e]),r}function Ii(e,t,r){let n=A(),i=Oi(e,t),s=mi(e);k(function(){let[o,a]=Zn(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a},[n,t,i,r,s.map(o=>o.toString()).join("|")])}function pt(e,t){let r=ht(e,t),n=vi(),i=pi(r.options);return Ii(r,n,i),[ut(r.collect,n,i),gi(i)]}function vt(e){let t=null;return()=>(t??(t=e()),t)}function bi(e,t){return e.filter(r=>r!==t)}function Si(e,t){let r=new Set,n=s=>r.add(s);e.forEach(n),t.forEach(n);let i=[];return r.forEach(s=>i.push(s)),i}var Di=class{enter(e){let t=this.entered.length;return this.entered=Si(this.entered.filter(r=>this.isNodeInDocument(r)&&(!r.contains||r.contains(e))),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=bi(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},Ti=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(r=>{let n=this.config.exposeProperties[r];n!=null&&(t[r]={value:n(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},mt=Ve({FILE:()=>yt,HTML:()=>bt,TEXT:()=>It,URL:()=>Ot},1);const yt="__NATIVE_FILE__",Ot="__NATIVE_URL__",It="__NATIVE_TEXT__",bt="__NATIVE_HTML__";function xe(e,t,r){return t.reduce((n,i)=>n||e.getData(i),"")??r}const Ce={[yt]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[bt]:{exposeProperties:{html:(e,t)=>xe(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Ot]:{exposeProperties:{urls:(e,t)=>xe(e,t,"").split(`
2
- `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[It]:{exposeProperties:{text:(e,t)=>xe(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Ei(e,t){let r=Ce[e];if(!r)throw Error(`native type ${e} has no configuration`);let n=new Ti(r);return n.loadDataTransfer(t),n}function Ne(e){if(!e)return null;let t=Array.prototype.slice.call(e.types||[]);return Object.keys(Ce).filter(r=>{let n=Ce[r];return n!=null&&n.matchesTypes?n.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const wi=vt(()=>/firefox/i.test(navigator.userAgent)),St=vt(()=>!!window.safari);var Dt=class{interpolate(e){let{xs:t,ys:r,c1s:n,c2s:i,c3s:s}=this,o=t.length-1;if(e===t[o])return r[o];let a=0,d=s.length-1,h;for(;a<=d;){h=Math.floor(.5*(a+d));let I=t[h];if(I<e)a=h+1;else if(I>e)d=h-1;else return r[h]}o=Math.max(0,d);let p=e-t[o],b=p*p;return r[o]+n[o]*p+i[o]*b+s[o]*p*b}constructor(e,t){let{length:r}=e,n=[];for(let v=0;v<r;v++)n.push(v);n.sort((v,c)=>e[v]<e[c]?-1:1);let i=[],s=[],o=[],a,d;for(let v=0;v<r-1;v++)a=e[v+1]-e[v],d=t[v+1]-t[v],s.push(a),i.push(d),o.push(d/a);let h=[o[0]];for(let v=0;v<s.length-1;v++){let c=o[v],l=o[v+1];if(c*l<=0)h.push(0);else{a=s[v];let u=s[v+1],g=a+u;h.push(3*g/((g+u)/c+(g+a)/l))}}h.push(o[o.length-1]);let p=[],b=[],I;for(let v=0;v<h.length-1;v++){I=o[v];let c=h[v],l=1/s[v],u=c+h[v+1]-I-I;p.push((I-c-u)*l),b.push(u*l*l)}this.xs=e,this.ys=t,this.c1s=h,this.c2s=p,this.c3s=b}},xi=1;function Tt(e){let t=e.nodeType===xi?e:e.parentElement;if(!t)return null;let{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function ne(e){return{x:e.clientX,y:e.clientY}}function Ci(e){var t;return e.nodeName==="IMG"&&(wi()||!((t=document.documentElement)!=null&&t.contains(e)))}function Ni(e,t,r,n){let i=e?t.width:r,s=e?t.height:n;return St()&&e&&(s/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:s}}function Ri(e,t,r,n,i){let s=Ci(t),o=Tt(s?e:t),a={x:r.x-o.x,y:r.y-o.y},{offsetWidth:d,offsetHeight:h}=e,{anchorX:p,anchorY:b}=n,{dragPreviewWidth:I,dragPreviewHeight:v}=Ni(s,t,d,h),c=()=>{let D=new Dt([0,.5,1],[a.y,a.y/h*v,a.y+v-h]).interpolate(b);return St()&&s&&(D+=(window.devicePixelRatio-1)*v),D},l=()=>new Dt([0,.5,1],[a.x,a.x/d*I,a.x+I-d]).interpolate(p),{offsetX:u,offsetY:g}=i,O=u===0||u,S=g===0||g;return{x:O?u:l(),y:S?g:c()}}var Pi=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;if((e=this.globalContext)!=null&&e.document)return this.globalContext.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.optionsArgs)==null?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function ji(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){ji(e,i,r[i])})}return e}var _i=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)==null?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((t=this.dragOverTargetIds)==null?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){let e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){let e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)==null||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,r){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);let n=s=>this.handleDragStart(s,e),i=s=>this.handleSelectStart(s);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",n),t.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",n),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}connectDropTarget(e,t){let r=s=>this.handleDragEnter(s,e),n=s=>this.handleDragOver(s,e),i=s=>this.handleDrop(s,e);return t.addEventListener("dragenter",r),t.addEventListener("dragover",n),t.addEventListener("drop",i),()=>{t.removeEventListener("dragenter",r),t.removeEventListener("dragover",n),t.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Et({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){let e=this.monitor.getSourceId();return Et({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){let e=this.monitor.getItemType();return Object.keys(mt).some(t=>mt[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=Ei(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var t;return(t=this.rootElement)==null?void 0:t.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=n=>{let i=this.sourceNodes.get(n);return i&&Tt(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=n=>!!(n&&this.document&&this.document.body&&this.document.body.contains(n)),this.endDragIfSourceWasRemovedFromDOM=()=>{let n=this.currentDragSourceNode;n==null||this.isNodeInDocument(n)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=n=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(n||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=n=>{if(n.defaultPrevented)return;let{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;let s=ne(n);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});let{dataTransfer:o}=n,a=Ne(o);if(this.monitor.isDragging()){if(o&&typeof o.setDragImage=="function"){let h=this.monitor.getSourceId(),p=this.sourceNodes.get(h),b=this.sourcePreviewNodes.get(h)||p;if(b){let{anchorX:I,anchorY:v,offsetX:c,offsetY:l}=this.getCurrentSourcePreviewNodeOptions(),u=Ri(p,b,s,{anchorX:I,anchorY:v},{offsetX:c,offsetY:l});o.setDragImage(b,u.x,u.y)}}try{o==null||o.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(n.target);let{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(a)this.beginDragNativeItem(a);else{if(o&&!o.types&&(n.target&&!n.target.hasAttribute||!n.target.hasAttribute("draggable")))return;n.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=n=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}if(!this.enterLeaveCounter.enter(n.target)||this.monitor.isDragging())return;let{dataTransfer:s}=n,o=Ne(s);o&&this.beginDragNativeItem(o,s)},this.handleTopDragEnter=n=>{let{dragEnterTargetIds:i}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=n.altKey,i.length>0&&this.actions.hover(i,{clientOffset:ne(n)}),i.some(s=>this.monitor.canDropOnTarget(s))&&(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=n=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}},this.handleTopDragOver=n=>{let{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none");return}this.altKeyPressed=n.altKey,this.lastClientOffset=ne(n),this.scheduleHover(i),(i||[]).some(s=>this.monitor.canDropOnTarget(s))?(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?n.preventDefault():(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=n=>{this.isDraggingNativeItem()&&n.preventDefault(),this.enterLeaveCounter.leave(n.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=n=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;n.preventDefault(),(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}else Ne(n.dataTransfer)&&n.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=n=>{let{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:ne(n)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=n=>{let i=n.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(n.preventDefault(),i.dragDrop()))},this.options=new Pi(t,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new Di(this.isNodeInDocument)}},ie;function Mi(){return ie||(ie=new Image,ie.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ie}const wt=function(e,t,r){return new _i(e,t,r)},xt=(0,f.createContext)(null);function N(){let e=(0,f.useContext)(xt);if(e===null)throw Error("No Tree Api Provided");return e}const Ct=(0,f.createContext)(null);function Ai(){let e=(0,f.useContext)(Ct);if(e===null)throw Error("Provide a NodesContext");return e}const Nt=(0,f.createContext)(null);function Li(){let e=(0,f.useContext)(Nt);if(e===null)throw Error("Provide a DnDContext");return e}const Rt=(0,f.createContext)(0);function Pt(){(0,f.useContext)(Rt)}var ki=Ve({access:()=>Y,bound:()=>se,dfs:()=>Re,focusNextElement:()=>kt,focusPrevElement:()=>Ht,getInsertIndex:()=>Wt,getInsertParentId:()=>Gt,identify:()=>H,identifyNull:()=>Ut,indexOf:()=>Lt,isClosed:()=>_t,isDescendant:()=>At,isItem:()=>jt,isOpenWithEmptyChildren:()=>Mt,mergeRefs:()=>Bi,noop:()=>Hi,safeRun:()=>Bt,waitFor:()=>zt,walk:()=>oe},1);function se(e,t,r){return Math.max(Math.min(e,r),t)}function jt(e){return e&&e.isLeaf}function _t(e){return e&&e.isInternal&&!e.isOpen}function Mt(e){var t;return e&&e.isOpen&&!((t=e.children)!=null&&t.length)}const At=(e,t)=>{let r=e;for(;r;){if(r.id===t.id)return!0;r=r.parent}return!1},Lt=e=>{if(!e.parent)throw Error("Node does not have a parent");return e.parent.children.findIndex(t=>t.id===e.id)};function Hi(){}function Re(e,t){if(!e)return null;if(e.id===t)return e;if(e.children)for(let r of e.children){let n=Re(r,t);if(n)return n}return null}function oe(e,t){if(t(e),e.children)for(let r of e.children)oe(r,t)}function kt(e){let t=Ft(e),r;for(let n=0;n<t.length;++n)if(t[n]===e){r=Fi(t,n);break}r==null||r.focus()}function Ht(e){let t=Ft(e),r;for(let n=0;n<t.length;++n)if(t[n]===e){r=Ui(t,n);break}r==null||r.focus()}function Fi(e,t){return t+1<e.length?e[t+1]:e[0]}function Ui(e,t){return t-1>=0?e[t-1]:e[e.length-1]}function Ft(e){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(t=>t===e||!e.contains(t))}function Y(e,t){return typeof t=="boolean"?t:typeof t=="string"?e[t]:t(e)}function Ut(e){return e===null?null:H(e)}function H(e){return typeof e=="string"?e:e.id}function Bi(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}function Bt(e,...t){if(e)return e(...t)}function zt(e){return new Promise((t,r)=>{let n=0;function i(){n+=1,n===100&&r(),e()?t():setTimeout(i,10)}i()})}function Wt(e){var r;let t=e.focusedNode;return t?t.isOpen?0:t.parent?t.childIndex+1:0:((r=e.root.children)==null?void 0:r.length)??0}function Gt(e){let t=e.focusedNode;return t?t.isOpen?t.id:t.parent&&!t.parent.isRoot?t.parent.id:null:null}var zi={display:"flex",alignItems:"center",zIndex:1},Wi={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},Gi={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"};const Vi=f.memo(function({top:e,left:t,indent:r}){let n={position:"absolute",pointerEvents:"none",top:e-2+"px",left:t+"px",right:r+"px"};return(0,m.jsxs)("div",{style:Object.assign(Object.assign({},zi),n),children:[(0,m.jsx)("div",{style:Object.assign({},Gi)}),(0,m.jsx)("div",{style:Object.assign({},Wi)})]})});function Ki({node:e,attrs:t,innerRef:r,children:n}){return(0,m.jsx)("div",Object.assign({},t,{ref:r,onFocus:i=>i.stopPropagation(),onClick:e.handleClick,children:n}))}function Yi(e){return(0,m.jsxs)("div",{ref:e.dragHandle,style:e.style,children:[(0,m.jsx)("span",{onClick:t=>{t.stopPropagation(),e.node.toggle()},children:e.node.isLeaf?"\u{1F333}":e.node.isOpen?"\u{1F5C1}":"\u{1F5C0}"})," ",e.node.isEditing?(0,m.jsx)($i,Object.assign({},e)):(0,m.jsx)(qi,Object.assign({},e))]})}function qi(e){return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("span",{children:e.node.data.name})})}function $i({node:e}){let t=(0,f.useRef)();return(0,f.useEffect)(()=>{var r,n;(r=t.current)==null||r.focus(),(n=t.current)==null||n.select()},[]),(0,m.jsx)("input",{ref:t,defaultValue:e.data.name,onBlur:()=>e.reset(),onKeyDown:r=>{var n;r.key==="Escape"&&e.reset(),r.key==="Enter"&&e.submit(((n=t.current)==null?void 0:n.value)||"")}})}function Pe(e){return{type:"EDIT",id:e}}function Xi(e={id:null},t){return t.type==="EDIT"?Object.assign(Object.assign({},e),{id:t.id}):e}function B(e){return{type:"FOCUS",id:e}}function Ji(){return{type:"TREE_BLUR"}}function Qi(e={id:null,treeFocused:!1},t){return t.type==="FOCUS"?Object.assign(Object.assign({},e),{id:t.id,treeFocused:!0}):t.type==="TREE_BLUR"?Object.assign(Object.assign({},e),{treeFocused:!1}):e}var Vt=class ur{constructor(t){this.handleClick=r=>{r.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():r.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=t.tree,this.id=t.id,this.data=t.data,this.level=t.level,this.children=t.children,this.parent=t.parent,this.isDraggable=t.isDraggable,this.rowIndex=t.rowIndex}get isRoot(){return this.id===je}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var t;return this.isSelected&&!((t=this.prev)!=null&&t.isSelected)}get isSelectedEnd(){var t;return this.isSelected&&!((t=this.next)!=null&&t.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(t=>t.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var r;let t=this.childIndex;return((r=this.parent)==null?void 0:r.children[t+1])??null}isAncestorOf(t){if(!t)return!1;let r=t;for(;r;){if(r.id===this.id)return!0;r=r.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(t){this.tree.submit(this,t)}reset(){this.tree.reset()}clone(){return new ur(Object.assign({},this))}edit(){return this.tree.edit(this)}};const je="__REACT_ARBORIST_INTERNAL_ROOT__";function Kt(e){function t(n,i,s){let o=new Vt({tree:e,data:n,level:i,parent:s,id:e.accessId(n),children:null,isDraggable:e.isDraggable(n),rowIndex:null}),a=e.accessChildren(n);return a&&(o.children=a.map(d=>t(d,i+1,o))),o}let r=new Vt({tree:e,id:je,data:{id:je},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null});return r.children=(e.props.data??[]).map(n=>t(n,0,r)),r}const _e={open(e,t){return{type:"VISIBILITY_OPEN",id:e,filtered:t}},close(e,t){return{type:"VISIBILITY_CLOSE",id:e,filtered:t}},toggle(e,t){return{type:"VISIBILITY_TOGGLE",id:e,filtered:t}},clear(e){return{type:"VISIBILITY_CLEAR",filtered:e}}};function Yt(e={},t){if(t.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},e),{[t.id]:!0});if(t.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},e),{[t.id]:!1});if(t.type==="VISIBILITY_TOGGLE"){let r=e[t.id];return Object.assign(Object.assign({},e),{[t.id]:!r})}else return t.type==="VISIBILITY_CLEAR"?{}:e}function Zi(e={filtered:{},unfiltered:{}},t){return t.type.startsWith("VISIBILITY")?t.filtered?Object.assign(Object.assign({},e),{filtered:Yt(e.filtered,t)}):Object.assign(Object.assign({},e),{unfiltered:Yt(e.unfiltered,t)}):e}const z=e=>({nodes:{open:{filtered:{},unfiltered:(e==null?void 0:e.initialOpenState)??{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}),j={clear:()=>({type:"SELECTION_CLEAR"}),only:e=>({type:"SELECTION_ONLY",id:H(e)}),add:e=>({type:"SELECTION_ADD",ids:(Array.isArray(e)?e:[e]).map(H)}),remove:e=>({type:"SELECTION_REMOVE",ids:(Array.isArray(e)?e:[e]).map(H)}),set:e=>Object.assign({type:"SELECTION_SET"},e),mostRecent:e=>({type:"SELECTION_MOST_RECENT",id:e===null?null:H(e)}),anchor:e=>({type:"SELECTION_ANCHOR",id:e===null?null:H(e)})};function es(e=z().nodes.selection,t){let r=e.ids;switch(t.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},e),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},e),{ids:new Set([t.id])});case"SELECTION_ADD":return t.ids.length===0?e:(t.ids.forEach(n=>r.add(n)),Object.assign(Object.assign({},e),{ids:new Set(r)}));case"SELECTION_REMOVE":return t.ids.length===0?e:(t.ids.forEach(n=>r.delete(n)),Object.assign(Object.assign({},e),{ids:new Set(r)}));case"SELECTION_SET":return Object.assign(Object.assign({},e),{ids:t.ids,mostRecent:t.mostRecent,anchor:t.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},e),{mostRecent:t.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},e),{anchor:t.id});default:return e}}const W={cursor(e){return{type:"DND_CURSOR",cursor:e}},dragStart(e,t){return{type:"DND_DRAG_START",id:e,dragIds:t}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(e,t){return{type:"DND_HOVERING",parentId:e,index:t}}};function ts(e=z().dnd,t){switch(t.type){case"DND_CURSOR":return Object.assign(Object.assign({},e),{cursor:t.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},e),{dragId:t.id,dragIds:t.dragIds});case"DND_DRAG_END":return z().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},e),{parentId:t.parentId,index:t.index});default:return e}}var rs={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},ns=e=>{if(!e)return{display:"none"};let{x:t,y:r}=e;return{transform:`translate(${t}px, ${r}px)`}},is=e=>{if(!e)return{display:"none"};let{x:t,y:r}=e;return{transform:`translate(${t+10}px, ${r+10}px)`}};function qt({offset:e,mouse:t,id:r,dragIds:n,isDragging:i}){return(0,m.jsxs)(ss,{isDragging:i,children:[(0,m.jsx)(os,{offset:e,children:(0,m.jsx)(ls,{id:r,dragIds:n})}),(0,m.jsx)(as,{mouse:t,count:n.length})]})}var ss=(0,f.memo)(function(e){return e.isDragging?(0,m.jsx)("div",{style:rs,children:e.children}):null});function os(e){return(0,m.jsx)("div",{className:"row preview",style:ns(e.offset),children:e.children})}function as(e){let{count:t,mouse:r}=e;return t>1?(0,m.jsx)("div",{className:"selected-count",style:is(r),children:t}):null}var ls=(0,f.memo)(function(e){let t=N(),r=t.get(e.id);return r?(0,m.jsx)(t.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*t.indent,opacity:.2,background:"transparent"},tree:t}):null}),$t=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function ds(e,t){return!!(e===t||$t(e)&&$t(t))}function cs(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!ds(e[r],t[r]))return!1;return!0}function us(e,t){t===void 0&&(t=cs);var r,n=[],i,s=!1;function o(){var a=[...arguments];return s&&r===this&&t(a,n)||(i=e.apply(this,a),s=!0,r=this,n=a),i}return o}var Me=us,Xt=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()};function Jt(e){cancelAnimationFrame(e.id)}function hs(e,t){var r=Xt();function n(){Xt()-r>=t?e.call(null):i.id=requestAnimationFrame(n)}var i={id:requestAnimationFrame(n)};return i}var Ae=-1;function Qt(e){if(e===void 0&&(e=!1),Ae===-1||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),Ae=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ae}var q=null;function Zt(e){if(e===void 0&&(e=!1),q===null||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?q="positive-descending":(t.scrollLeft=1,q=t.scrollLeft===0?"negative":"positive-ascending"),document.body.removeChild(t),q}return q}var fs=150,gs=function(e,t){return e};function ps(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,i=e.getItemSize,s=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,a=e.getStopIndexForStartIndex,d=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,p=e.validateProps;return t=(function(b){wr(I,b);function I(c){var l=b.call(this,c)||this;return l._instanceProps=d(l.props,Ke(l)),l._outerRef=void 0,l._resetIsScrollingTimeoutId=null,l.state={instance:Ke(l),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof l.props.initialScrollOffset=="number"?l.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},l._callOnItemsRendered=void 0,l._callOnItemsRendered=Me(function(u,g,O,S){return l.props.onItemsRendered({overscanStartIndex:u,overscanStopIndex:g,visibleStartIndex:O,visibleStopIndex:S})}),l._callOnScroll=void 0,l._callOnScroll=Me(function(u,g,O){return l.props.onScroll({scrollDirection:u,scrollOffset:g,scrollUpdateWasRequested:O})}),l._getItemStyle=void 0,l._getItemStyle=function(u){var g=l.props,O=g.direction,S=g.itemSize,D=g.layout,T=l._getItemStyleCache(h&&S,h&&D,h&&O),x;if(T.hasOwnProperty(u))x=T[u];else{var C=r(l.props,u,l._instanceProps),L=i(l.props,u,l._instanceProps),F=O==="horizontal"||D==="horizontal",$=O==="rtl",X=F?C:0;T[u]=x={position:"absolute",left:$?void 0:X,right:$?X:void 0,top:F?0:C,height:F?"100%":L,width:F?L:"100%"}}return x},l._getItemStyleCache=void 0,l._getItemStyleCache=Me(function(u,g,O){return{}}),l._onScrollHorizontal=function(u){var g=u.currentTarget,O=g.clientWidth,S=g.scrollLeft,D=g.scrollWidth;l.setState(function(T){if(T.scrollOffset===S)return null;var x=l.props.direction,C=S;if(x==="rtl")switch(Zt()){case"negative":C=-S;break;case"positive-descending":C=D-O-S;break}return C=Math.max(0,Math.min(C,D-O)),{isScrolling:!0,scrollDirection:T.scrollOffset<C?"forward":"backward",scrollOffset:C,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._onScrollVertical=function(u){var g=u.currentTarget,O=g.clientHeight,S=g.scrollHeight,D=g.scrollTop;l.setState(function(T){if(T.scrollOffset===D)return null;var x=Math.max(0,Math.min(D,S-O));return{isScrolling:!0,scrollDirection:T.scrollOffset<x?"forward":"backward",scrollOffset:x,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._outerRefSetter=function(u){var g=l.props.outerRef;l._outerRef=u,typeof g=="function"?g(u):typeof g=="object"&&g&&g.hasOwnProperty("current")&&(g.current=u)},l._resetIsScrollingDebounced=function(){l._resetIsScrollingTimeoutId!==null&&Jt(l._resetIsScrollingTimeoutId),l._resetIsScrollingTimeoutId=hs(l._resetIsScrolling,fs)},l._resetIsScrolling=function(){l._resetIsScrollingTimeoutId=null,l.setState({isScrolling:!1},function(){l._getItemStyleCache(-1,null)})},l}I.getDerivedStateFromProps=function(c,l){return vs(c,l),p(c),null};var v=I.prototype;return v.scrollTo=function(c){c=Math.max(0,c),this.setState(function(l){return l.scrollOffset===c?null:{scrollDirection:l.scrollOffset<c?"forward":"backward",scrollOffset:c,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},v.scrollToItem=function(c,l){l===void 0&&(l="auto");var u=this.props,g=u.itemCount,O=u.layout,S=this.state.scrollOffset;c=Math.max(0,Math.min(c,g-1));var D=0;if(this._outerRef){var T=this._outerRef;D=O==="vertical"?T.scrollWidth>T.clientWidth?Qt():0:T.scrollHeight>T.clientHeight?Qt():0}this.scrollTo(s(this.props,c,l,S,this._instanceProps,D))},v.componentDidMount=function(){var c=this.props,l=c.direction,u=c.initialScrollOffset,g=c.layout;if(typeof u=="number"&&this._outerRef!=null){var O=this._outerRef;l==="horizontal"||g==="horizontal"?O.scrollLeft=u:O.scrollTop=u}this._callPropsCallbacks()},v.componentDidUpdate=function(){var c=this.props,l=c.direction,u=c.layout,g=this.state,O=g.scrollOffset;if(g.scrollUpdateWasRequested&&this._outerRef!=null){var S=this._outerRef;if(l==="horizontal"||u==="horizontal")if(l==="rtl")switch(Zt()){case"negative":S.scrollLeft=-O;break;case"positive-ascending":S.scrollLeft=O;break;default:var D=S.clientWidth;S.scrollLeft=S.scrollWidth-D-O;break}else S.scrollLeft=O;else S.scrollTop=O}this._callPropsCallbacks()},v.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Jt(this._resetIsScrollingTimeoutId)},v.render=function(){var c=this.props,l=c.children,u=c.className,g=c.direction,O=c.height,S=c.innerRef,D=c.innerElementType,T=c.innerTagName,x=c.itemCount,C=c.itemData,L=c.itemKey,F=L===void 0?gs:L,$=c.layout,X=c.outerElementType,hr=c.outerTagName,fr=c.style,gr=c.useIsScrolling,pr=c.width,Be=this.state.isScrolling,ce=g==="horizontal"||$==="horizontal",vr=ce?this._onScrollHorizontal:this._onScrollVertical,ze=this._getRangeToRender(),mr=ze[0],yr=ze[1],We=[];if(x>0)for(var V=mr;V<=yr;V++)We.push((0,f.createElement)(l,{data:C,key:F(V,C),index:V,isScrolling:gr?Be:void 0,style:this._getItemStyle(V)}));var Ge=n(this.props,this._instanceProps);return(0,f.createElement)(X||hr||"div",{className:u,onScroll:vr,ref:this._outerRefSetter,style:Tr({position:"relative",height:O,width:pr,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:g},fr)},(0,f.createElement)(D||T||"div",{children:We,ref:S,style:{height:ce?"100%":Ge,pointerEvents:Be?"none":void 0,width:ce?Ge:"100%"}}))},v._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"&&this.props.itemCount>0){var c=this._getRangeToRender(),l=c[0],u=c[1],g=c[2],O=c[3];this._callOnItemsRendered(l,u,g,O)}if(typeof this.props.onScroll=="function"){var S=this.state,D=S.scrollDirection,T=S.scrollOffset,x=S.scrollUpdateWasRequested;this._callOnScroll(D,T,x)}},v._getRangeToRender=function(){var c=this.props,l=c.itemCount,u=c.overscanCount,g=this.state,O=g.isScrolling,S=g.scrollDirection,D=g.scrollOffset;if(l===0)return[0,0,0,0];var T=o(this.props,D,this._instanceProps),x=a(this.props,T,D,this._instanceProps),C=!O||S==="backward"?Math.max(1,u):1,L=!O||S==="forward"?Math.max(1,u):1;return[Math.max(0,T-C),Math.max(0,Math.min(l-1,x+L)),T,x]},I})(f.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var vs=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ms=ps({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,r,n,i,s){var o=e.direction,a=e.height,d=e.itemCount,h=e.itemSize,p=e.layout,b=e.width,I=o==="horizontal"||p==="horizontal"?b:a,v=Math.max(0,d*h-I),c=Math.min(v,t*h),l=Math.max(0,t*h-I+h+s);switch(r==="smart"&&(r=n>=l-I&&n<=c+I?"auto":"center"),r){case"start":return c;case"end":return l;case"center":var u=Math.round(l+(c-l)/2);return u<Math.ceil(I/2)?0:u>v+Math.floor(I/2)?v:u;default:return n>=l&&n<=c?n:n<l?l:c}},getStartIndexForOffset:function(e,t){var r=e.itemCount,n=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getStopIndexForStartIndex:function(e,t,r){var n=e.direction,i=e.height,s=e.itemCount,o=e.itemSize,a=e.layout,d=e.width,h=n==="horizontal"||a==="horizontal",p=t*o,b=h?d:i,I=Math.ceil((b+r-p)/o);return Math.max(0,Math.min(s-1,t+I-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function ys(){let e=N(),t=Li().cursor;if(!t||t.type!=="line")return null;let r=e.indent,n=e.rowHeight*t.index+(e.props.padding??e.props.paddingTop??0),i=r*t.level,s=e.renderCursor;return(0,m.jsx)(s,{top:n,left:i,indent:r})}var Os=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const Is=(0,f.forwardRef)(function(e,t){let{children:r}=e,n=Os(e,["children"]),i=N();return(0,m.jsxs)("div",Object.assign({ref:t},n,{onClick:s=>{s.currentTarget===s.target&&i.deselectAll()},children:[(0,m.jsx)(bs,{}),r]}))});var bs=()=>{let e=N();return(0,m.jsx)("div",{style:{height:e.visibleNodes.length*e.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:(0,m.jsx)(ys,{})})},Ss=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const Ds=(0,f.forwardRef)(function(e,t){var{style:r}=e,n=Ss(e,["style"]);let i=N(),s=i.props.padding??i.props.paddingTop??0,o=i.props.padding??i.props.paddingBottom??0;return(0,m.jsx)("div",Object.assign({ref:t,style:Object.assign(Object.assign({},r),{height:`${parseFloat(r.height)+s+o}px`})},n))});function Ts(e){let t=N(),r=t.selectedIds,[n,i,s]=hi(()=>({canDrag:()=>e.isDraggable,type:"NODE",item:()=>{let o=t.isSelected(e.id)?Array.from(r):[e.id];return t.dispatch(W.dragStart(e.id,o)),{id:e.id,dragIds:o}},end:()=>{t.hideCursor(),t.dispatch(W.dragEnd())}}),[r,e]);return(0,f.useEffect)(()=>{s(Mi())},[s]),i}function Es(e,t){let r=e.getBoundingClientRect(),n=t.x-Math.round(r.x),i=t.y-Math.round(r.y),s=r.height,o=i<s/2,a=!o,d=s/4,h=i>d&&i<s-d;return{x:n,inTopHalf:o,inBottomHalf:a,inMiddle:h,atTop:!h&&o,atBottom:!h&&a}}function ws(e,t,r,n){return e?e.isInternal?n.atTop?[t,e]:n.inMiddle?[e,e]:[e,r]:n.inTopHalf?[t,e]:[e,r]:[t,null]}function ae(e,t){return{parentId:e||null,index:t}}function G(e,t){return{type:"line",index:e,level:t}}function xs(e){return{type:"highlight",id:e}}function Le(e,t){var n;let r=e;for(;r.parent&&r.level>t;)r=r.parent;return{parentId:((n=r.parent)==null?void 0:n.id)||null,index:Lt(r)+1}}function er(e){var h;let t=Es(e.element,e.offset),r=e.indent,n=Math.round(Math.max(0,t.x-r)/r),{node:i,nextNode:s,prevNode:o}=e,[a,d]=ws(i,o,s,t);if(i&&i.isInternal&&t.inMiddle)return{drop:ae(i.id,null),cursor:xs(i.id)};if(!a)return{drop:ae((h=d==null?void 0:d.parent)==null?void 0:h.id,0),cursor:G(0,0)};if(jt(a)){let p=se(n,(d==null?void 0:d.level)||0,a.level);return{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}if(_t(a)){let p=se(n,(d==null?void 0:d.level)||0,a.level);return{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}if(Mt(a)){let p=se(n,0,a.level+1);return p>a.level?{drop:ae(a.id,0),cursor:G(a.rowIndex+1,p)}:{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}return{drop:ae(a==null?void 0:a.id,0),cursor:G(a.rowIndex+1,a.level+1)}}function Cs(e,t){let r=N(),[n,i]=pt(()=>({accept:"NODE",canDrop:()=>r.canDrop(),hover:(s,o)=>{let a=o.getClientOffset();if(!e.current||!a)return;let{cursor:d,drop:h}=er({element:e.current,offset:a,indent:r.indent,node:t,prevNode:t.prev,nextNode:t.next});h&&r.dispatch(W.hovering(h.parentId,h.index)),o.canDrop()?d&&r.showCursor(d):r.hideCursor()},drop:(s,o)=>{if(!o.canDrop())return null;let{parentId:a,index:d,dragIds:h}=r.state.dnd;Bt(r.props.onMove,{dragIds:h,parentId:a==="__REACT_ARBORIST_INTERNAL_ROOT__"?null:a,index:d===null?0:d,dragNodes:r.dragNodes,parentNode:r.get(a)}),r.open(a)}}),[t,e.current,r.props]);return i}function Ns(e){let t=N(),r=t.at(e);if(!r)throw Error(`Could not find node for index: ${e}`);return(0,f.useMemo)(()=>{let n=r.clone();return t.visibleNodes[e]=n,n},[...Object.values(r.state),r])}const Rs=f.memo(function({index:e,style:t}){Pt(),Ai();let r=N(),n=Ns(e),i=(0,f.useRef)(null),s=Ts(n),o=Cs(i,n),a=(0,f.useCallback)(c=>{i.current=c,o(c)},[o]),d=r.indent*n.level,h=(0,f.useMemo)(()=>({paddingLeft:d}),[d]),p=(0,f.useMemo)(()=>Object.assign(Object.assign({},t),{top:parseFloat(t.top)+(r.props.padding??r.props.paddingTop??0)}),[t,r.props.padding,r.props.paddingTop]),b={role:"treeitem","aria-level":n.level+1,"aria-selected":n.isSelected,"aria-expanded":n.isOpen,style:p,tabIndex:-1,className:r.props.rowClassName};(0,f.useEffect)(()=>{var c;!n.isEditing&&n.isFocused&&((c=i.current)==null||c.focus({preventScroll:!0}))},[n.isEditing,n.isFocused,i.current]);let I=r.renderNode,v=r.renderRow;return(0,m.jsx)(v,{node:n,innerRef:a,attrs:b,children:(0,m.jsx)(I,{node:n,tree:r,style:h,dragHandle:s})})});var ke="",tr=null;function rr(){Pt();let e=N();return(0,m.jsx)("div",{role:"tree",style:{height:e.height,width:e.width,minHeight:0,minWidth:0},onContextMenu:e.props.onContextMenu,onClick:e.props.onClick,tabIndex:0,onFocus:t=>{t.currentTarget.contains(t.relatedTarget)||e.onFocus()},onBlur:t=>{t.currentTarget.contains(t.relatedTarget)||e.onBlur()},onKeyDown:t=>{var n;if(e.isEditing)return;if(t.key==="Backspace"){if(!e.props.onDelete)return;let i=Array.from(e.selectedIds);if(i.length>1){let s=e.mostRecentNode;for(;s&&s.isSelected;)s=s.nextSibling;s||(s=e.lastNode),e.focus(s,{scroll:!1}),e.delete(Array.from(i))}else{let s=e.focusedNode;if(s){let o=s.nextSibling,a=s.parent;e.focus(o||a,{scroll:!1}),e.delete(s)}}return}if(t.key==="Tab"&&!t.shiftKey){t.preventDefault(),kt(t.currentTarget);return}if(t.key==="Tab"&&t.shiftKey){t.preventDefault(),Ht(t.currentTarget);return}if(t.key==="ArrowDown"){t.preventDefault();let i=e.nextNode;if(t.metaKey){e.select(e.focusedNode),e.activate(e.focusedNode);return}else if(!t.shiftKey||e.props.disableMultiSelection){e.focus(i);return}else{if(!i)return;let s=e.focusedNode;s?s.isSelected?e.selectContiguous(i):e.selectMulti(i):e.focus(e.firstNode);return}}if(t.key==="ArrowUp"){t.preventDefault();let i=e.prevNode;if(!t.shiftKey||e.props.disableMultiSelection){e.focus(i);return}else{if(!i)return;let s=e.focusedNode;s?s.isSelected?e.selectContiguous(i):e.selectMulti(i):e.focus(e.lastNode);return}}if(t.key==="ArrowRight"){let i=e.focusedNode;if(!i)return;i.isInternal&&i.isOpen?e.focus(e.nextNode):i.isInternal&&e.open(i.id);return}if(t.key==="ArrowLeft"){let i=e.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?e.close(i.id):(n=i.parent)!=null&&n.isRoot||e.focus(i.parent);return}if(t.key==="a"&&t.metaKey&&!e.props.disableMultiSelection){t.preventDefault(),e.selectAll();return}if(t.key==="a"&&!t.metaKey&&e.props.onCreate){e.createLeaf();return}if(t.key==="A"&&!t.metaKey){if(!e.props.onCreate)return;e.createInternal();return}if(t.key==="Home"){t.preventDefault(),e.focus(e.firstNode);return}if(t.key==="End"){t.preventDefault(),e.focus(e.lastNode);return}if(t.key==="Enter"){let i=e.focusedNode;if(!i||!i.isEditable||!e.props.onRename)return;setTimeout(()=>{i&&e.edit(i)});return}if(t.key===" "){t.preventDefault();let i=e.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(t.key==="*"){let i=e.focusedNode;if(!i)return;e.openSiblings(i);return}if(t.key==="PageUp"){t.preventDefault(),e.pageUp();return}t.key==="PageDown"&&(t.preventDefault(),e.pageDown()),clearTimeout(tr),ke+=t.key,tr=setTimeout(()=>{ke=""},600);let r=e.visibleNodes.find(i=>{let s=i.data.name;return typeof s=="string"?s.toLowerCase().startsWith(ke):!1});r&&e.focus(r.id)},children:(0,m.jsx)(ms,{className:e.props.className,outerRef:e.listEl,itemCount:e.visibleNodes.length,height:e.height,width:e.width,itemSize:e.rowHeight,overscanCount:e.overscanCount,itemKey:t=>{var r;return((r=e.visibleNodes[t])==null?void 0:r.id)||t},outerElementType:Is,innerElementType:Ds,onScroll:e.props.onScroll,onItemsRendered:e.onItemsRendered.bind(e),ref:e.list,children:Rs})})}function nr(e){return e.isFiltered?js(e.root,e.isMatch.bind(e)):Ps(e.root)}function Ps(e){let t=[];function r(n){var i;n.level>=0&&t.push(n),n.isOpen&&((i=n.children)==null||i.forEach(r))}return r(e),t.forEach(ir),t}function js(e,t){let r={},n=[];function i(o){if(!o.isRoot&&t(o)){r[o.id]=!0;let a=o.parent;for(;a;)r[a.id]=!0,a=a.parent}if(o.children)for(let a of o.children)i(a)}function s(o){var a;o.level>=0&&r[o.id]&&n.push(o),o.isOpen&&((a=o.children)==null||a.forEach(s))}return i(e),s(e),n.forEach(ir),n}function ir(e,t){e.rowIndex=t}const sr=e=>e.reduce((t,r,n)=>(t[r.id]=n,t),{});var He=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(p){try{h(n.next(p))}catch(b){o(b)}}function d(p){try{h(n.throw(p))}catch(b){o(b)}}function h(p){p.done?s(p.value):i(p.value).then(a,d)}h((n=n.apply(e,t||[])).next())})},{safeRun:E,identify:M,identifyNull:_}=ki,_s=class de{constructor(t,r,n,i){this.store=t,this.props=r,this.list=n,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=Kt(this),this.visibleNodes=nr(this),this.idToIndex=sr(this.visibleNodes)}update(t){this.props=t,this.root=Kt(this),this.visibleNodes=nr(this),this.idToIndex=sr(this.visibleNodes)}dispatch(t){return this.store.dispatch(t)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){return this.props.width??300}get height(){return this.props.height??500}get indent(){return this.props.indent??24}get rowHeight(){return this.props.rowHeight??24}get overscanCount(){return this.props.overscanCount??1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){let t=this.props.searchMatch??((r,n)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(n.toLocaleLowerCase()));return r=>t(r,this.searchTerm)}accessChildren(t){return Y(t,this.props.childrenAccessor||"children")??null}accessId(t){let r=Y(t,this.props.idAccessor||"id");if(!r)throw Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){return this.visibleNodes[0]??null}get lastNode(){return this.visibleNodes[this.visibleNodes.length-1]??null}get focusedNode(){return this.get(this.state.nodes.focus.id)??null}get mostRecentNode(){return this.get(this.state.nodes.selection.mostRecent)??null}get nextNode(){let t=this.indexOf(this.focusedNode);return t===null?null:this.at(t+1)}get prevNode(){let t=this.indexOf(this.focusedNode);return t===null?null:this.at(t-1)}get(t){return t&&t in this.idToIndex&&this.visibleNodes[this.idToIndex[t]]||null}at(t){return this.visibleNodes[t]||null}nodesBetween(t,r){if(t===null||r===null)return[];let n=this.indexOf(t)??0,i=this.indexOf(r);if(i===null)return[];let s=Math.min(n,i),o=Math.max(n,i);return this.visibleNodes.slice(s,o+1)}indexOf(t){let r=Ut(t);return r?this.idToIndex[r]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return He(this,arguments,void 0,function*(t={}){let r=t.parentId===void 0?Gt(this):t.parentId,n=t.index??Wt(this),i=t.type??"leaf",s=yield E(this.props.onCreate,{type:i,parentId:r,index:n,parentNode:this.get(r)});s&&(this.focus(s),setTimeout(()=>{this.edit(s).then(()=>{this.select(s),this.activate(s)})}))})}delete(t){return He(this,void 0,void 0,function*(){if(!t)return;let r=(Array.isArray(t)?t:[t]).map(M),n=r.map(i=>this.get(i)).filter(i=>!!i);yield E(this.props.onDelete,{nodes:n,ids:r})})}edit(t){let r=M(t);return this.resolveEdit({cancelled:!0}),this.scrollTo(r),this.dispatch(Pe(r)),new Promise(n=>{de.editPromise=n})}submit(t,r){return He(this,void 0,void 0,function*(){if(!t)return;let n=M(t);yield E(this.props.onRename,{id:n,name:r,node:this.get(n)}),this.dispatch(Pe(null)),this.resolveEdit({cancelled:!1,value:r}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(Pe(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(t){let r=this.get(_(t));r&&E(this.props.onActivate,r)}resolveEdit(t){let r=de.editPromise;r&&r(t),de.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let t=[];for(let r of Array.from(this.selectedIds)){let n=this.get(r);n&&t.push(n)}return t}focus(t,r={}){t&&(this.props.selectionFollowsFocus?this.select(t):(this.dispatch(B(M(t))),r.scroll!==!1&&this.scrollTo(t),this.focusedNode&&E(this.props.onFocus,this.focusedNode)))}pageUp(){var i;let t=this.visibleStartIndex,r=this.visibleStopIndex-t,n=((i=this.focusedNode)==null?void 0:i.rowIndex)??0;n=n>t?t:Math.max(t-r,0),this.focus(this.at(n))}pageDown(){var s;let t=this.visibleStartIndex,r=this.visibleStopIndex,n=r-t,i=((s=this.focusedNode)==null?void 0:s.rowIndex)??0;i=i<r?r:Math.min(i+n,this.visibleNodes.length-1),this.focus(this.at(i))}select(t,r={}){if(!t)return;let n=r.focus!==!1,i=M(t);n&&this.dispatch(B(i)),this.dispatch(j.only(i)),this.dispatch(j.anchor(i)),this.dispatch(j.mostRecent(i)),this.scrollTo(i,r.align),this.focusedNode&&n&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}deselect(t){if(!t)return;let r=M(t);this.dispatch(j.remove(r)),E(this.props.onSelect,this.selectedNodes)}selectMulti(t){let r=this.get(_(t));r&&(this.dispatch(B(r.id)),this.dispatch(j.add(r.id)),this.dispatch(j.anchor(r.id)),this.dispatch(j.mostRecent(r.id)),this.scrollTo(r),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes))}selectContiguous(t){if(!t)return;let r=M(t),{anchor:n,mostRecent:i}=this.state.nodes.selection;this.dispatch(B(r)),this.dispatch(j.remove(this.nodesBetween(n,i))),this.dispatch(j.add(this.nodesBetween(n,_(r)))),this.dispatch(j.mostRecent(r)),this.scrollTo(r),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),E(this.props.onSelect,this.selectedNodes)}selectAll(){var t;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(B((t=this.lastNode)==null?void 0:t.id)),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}setSelection(t){var s;let r=new Set((s=t.ids)==null?void 0:s.map(M)),n=_(t.anchor),i=_(t.mostRecent);this.dispatch(j.set({ids:r,anchor:n,mostRecent:i})),E(this.props.onSelect,this.selectedNodes)}get cursorParentId(){let{cursor:t}=this.state.dnd;return t.type==="highlight"?t.id:null}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(t=>this.get(t)).filter(t=>!!t)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){if(this.isFiltered)return!1;let t=this.get(this.state.dnd.parentId)??this.root,r=this.dragNodes,n=this.props.disableDrop;for(let i of r)if(!i||!t||i.isInternal&&At(t,i))return!1;return typeof n=="function"?!n({parentNode:t,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof n=="string"?!t.data[n]:typeof n=="boolean"?!n:!0}hideCursor(){this.dispatch(W.cursor({type:"none"}))}showCursor(t){this.dispatch(W.cursor(t))}open(t){let r=_(t);r&&(this.isOpen(r)||(this.dispatch(_e.open(r,this.isFiltered)),E(this.props.onToggle,r)))}close(t){let r=_(t);r&&this.isOpen(r)&&(this.dispatch(_e.close(r,this.isFiltered)),E(this.props.onToggle,r))}toggle(t){let r=_(t);if(r)return this.isOpen(r)?this.close(r):this.open(r)}openParents(t){var i;let r=_(t);if(!r)return;let n=(i=Re(this.root,r))==null?void 0:i.parent;for(;n;)this.open(n.id),n=n.parent}openSiblings(t){let r=t.parent;if(!r)this.toggle(t.id);else if(r.children){let n=t.isOpen;for(let i of r.children)i.isInternal&&(n?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){oe(this.root,t=>{t.isInternal&&t.open()})}closeAll(){oe(this.root,t=>{t.isInternal&&t.close()})}scrollTo(t,r="smart"){if(!t)return;let n=M(t);return this.openParents(n),zt(()=>n in this.idToIndex).then(()=>{var i;let s=this.idToIndex[n];s!==void 0&&((i=this.list.current)==null||i.scrollToItem(s,r))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var t;return!!((t=this.props.searchTerm)!=null&&t.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(t){return t?this.state.nodes.selection.ids.has(t):!1}isOpen(t){if(!t)return!1;if(t==="__REACT_ARBORIST_INTERNAL_ROOT__")return!0;let r=this.props.openByDefault??!0;return this.isFiltered?this.state.nodes.open.filtered[t]??!0:this.state.nodes.open.unfiltered[t]??r}isEditable(t){return!Y(t,this.props.disableEdit||(()=>!1))}isDraggable(t){return!Y(t,this.props.disableDrag||(()=>!1))}isDragging(t){let r=_(t);return r?this.state.nodes.drag.id===r:!1}isFocused(t){return this.hasFocus&&this.state.nodes.focus.id===t}isMatch(t){return this.matchFn(t)}willReceiveDrop(t){let r=_(t);if(!r)return!1;let{destinationParentId:n,destinationIndex:i}=this.state.nodes.drag;return r===n&&i===null}onFocus(){let t=this.focusedNode||this.firstNode;t&&this.dispatch(B(t.id))}onBlur(){this.dispatch(Ji())}onItemsRendered(t){this.visibleStartIndex=t.visibleStartIndex,this.visibleStopIndex=t.visibleStopIndex}get renderContainer(){return this.props.renderContainer||rr}get renderRow(){return this.props.renderRow||Ki}get renderNode(){return this.props.children||Yi}get renderDragPreview(){return this.props.renderDragPreview||qt}get renderCursor(){return this.props.renderCursor||Vi}};function w(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var or=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fe=()=>Math.random().toString(36).substring(7).split("").join("."),le={INIT:`@@redux/INIT${Fe()}`,REPLACE:`@@redux/REPLACE${Fe()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fe()}`};function Ms(e){if(typeof e!="object"||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ar(e,t,r){if(typeof e!="function")throw Error(w(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw Error(w(0));if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),r!==void 0){if(typeof r!="function")throw Error(w(1));return r(ar)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,d=!1;function h(){o===s&&(o=new Map,s.forEach((l,u)=>{o.set(u,l)}))}function p(){if(d)throw Error(w(3));return i}function b(l){if(typeof l!="function")throw Error(w(4));if(d)throw Error(w(5));let u=!0;h();let g=a++;return o.set(g,l),function(){if(u){if(d)throw Error(w(6));u=!1,h(),o.delete(g),s=null}}}function I(l){if(!Ms(l))throw Error(w(7));if(l.type===void 0)throw Error(w(8));if(typeof l.type!="string")throw Error(w(17));if(d)throw Error(w(9));try{d=!0,i=n(i,l)}finally{d=!1}return(s=o).forEach(u=>{u()}),l}function v(l){if(typeof l!="function")throw Error(w(10));n=l,I({type:le.REPLACE})}function c(){let l=b;return{subscribe(u){if(typeof u!="object"||!u)throw Error(w(11));function g(){let O=u;O.next&&O.next(p())}return g(),{unsubscribe:l(g)}},[or](){return this}}}return I({type:le.INIT}),{dispatch:I,subscribe:b,getState:p,replaceReducer:v,[or]:c}}function As(e){Object.keys(e).forEach(t=>{let r=e[t];if(r(void 0,{type:le.INIT})===void 0)throw Error(w(12));if(r(void 0,{type:le.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(w(13))})}function lr(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let o=t[s];typeof e[o]=="function"&&(r[o]=e[o])}let n=Object.keys(r),i;try{As(r)}catch(s){i=s}return function(s={},o){if(i)throw i;let a=!1,d={};for(let h=0;h<n.length;h++){let p=n[h],b=r[p],I=s[p],v=b(I,o);if(v===void 0)throw o&&o.type,Error(w(14));d[p]=v,a||(a=v!==I)}return a||(a=n.length!==Object.keys(s).length),a?d:s}}function Ls(e=z().nodes.drag,t){switch(t.type){case"DND_DRAG_START":return Object.assign(Object.assign({},e),{id:t.id,selectedIds:t.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},e),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return t.parentId!==e.destinationParentId||t.index!=e.destinationIndex?Object.assign(Object.assign({},e),{destinationParentId:t.parentId,destinationIndex:t.index}):e;default:return e}}const ks=lr({nodes:lr({focus:Qi,edit:Xi,open:Zi,selection:es,drag:Ls}),dnd:ts});var Hs=Dr(),Fs=z();function Us({treeProps:e,imperativeHandle:t,children:r}){let n=(0,f.useRef)(null),i=(0,f.useRef)(null),s=(0,f.useRef)(ar(ks,z(e))),o=(0,Hs.useSyncExternalStore)(s.current.subscribe,s.current.getState,()=>Fs),a=(0,f.useMemo)(()=>new _s(s.current,e,n,i),[]),d=(0,f.useRef)(0);return(0,f.useMemo)(()=>{d.current+=1,a.update(e)},[...Object.values(e),o.nodes.open]),(0,f.useImperativeHandle)(t,()=>a),(0,f.useEffect)(()=>{a.props.selection?a.select(a.props.selection,{focus:!1}):a.deselectAll()},[a.props.selection]),(0,f.useEffect)(()=>{a.props.searchTerm||s.current.dispatch(_e.clear(!0))},[a.props.searchTerm]),(0,m.jsx)(xt.Provider,{value:a,children:(0,m.jsx)(Rt.Provider,{value:d.current,children:(0,m.jsx)(Ct.Provider,{value:o.nodes,children:(0,m.jsx)(Nt.Provider,{value:o.dnd,children:(0,m.jsx)(lt,Object.assign({backend:wt,options:{rootElement:a.props.dndRootElement||void 0}},e.dndManager&&{manager:e.dndManager},{children:r}))})})})})}function Bs(){let e=N(),[,t]=pt(()=>({accept:"NODE",canDrop:(r,n)=>n.isOver({shallow:!0})?e.canDrop():!1,hover:(r,n)=>{if(!n.isOver({shallow:!0}))return;let i=n.getClientOffset();if(!e.listEl.current||!i)return;let{cursor:s,drop:o}=er({element:e.listEl.current,offset:i,indent:e.indent,node:null,prevNode:e.visibleNodes[e.visibleNodes.length-1],nextNode:null});o&&e.dispatch(W.hovering(o.parentId,o.index)),n.canDrop()?s&&e.showCursor(s):e.hideCursor()}}),[e]);t(e.listEl)}function zs(e){return Bs(),e.children}function Ws(){return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(N().props.renderContainer||rr,{})})}function Gs(){let e=N(),{offset:t,mouse:r,item:n,isDragging:i}=fi(s=>({offset:s.getSourceClientOffset(),mouse:s.getClientOffset(),item:s.getItem(),isDragging:s.isDragging()}));return(0,m.jsx)(e.props.renderDragPreview||qt,{offset:t,mouse:r,id:(n==null?void 0:n.id)||null,dragIds:(n==null?void 0:n.dragIds)||[],isDragging:i})}var dr=class{constructor(e){this.root=Vs(e)}get data(){var e;return((e=this.root.children)==null?void 0:e.map(t=>t.data))??[]}create(e){let t=e.parentId?this.find(e.parentId):this.root;if(!t)return null;t.addChild(e.data,e.index)}move(e){let t=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!t||!r||(r.addChild(t.data,e.index),t.drop())}update(e){let t=this.find(e.id);t&&t.update(e.changes)}drop(e){let t=this.find(e.id);t&&t.drop()}find(e,t=this.root){if(!t)return null;if(t.id===e)return t;if(t.children){for(let r of t.children){let n=this.find(e,r);if(n)return n}return null}return null}};function Vs(e){let t=new cr({id:"ROOT"},null);return t.children=e.map(r=>Ue(r,t)),t}function Ue(e,t){let r=new cr(e,t);return e.children&&(r.children=e.children.map(n=>Ue(n,r))),r}var cr=class{constructor(e,t){this.data=e,this.parent=t,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,t){let r=Ue(e,this);this.children=this.children??[],this.children.splice(t,0,r),this.data.children=this.data.children??[],this.data.children.splice(t,0,e)}removeChild(e){var t,r;(t=this.children)==null||t.splice(e,1),(r=this.data.children)==null||r.splice(e,1)}update(e){if(this.hasParent()){let t=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),t),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}},Ks=0;function Ys(e){let[t,r]=(0,f.useState)(e),n=(0,f.useMemo)(()=>new dr(t),[t]);return[t,{onMove:i=>{for(let s of i.dragIds)n.move({id:s,parentId:i.parentId,index:i.index});r(n.data)},onRename:({name:i,id:s})=>{n.update({id:s,changes:{name:i}}),r(n.data)},onCreate:({parentId:i,index:s,type:o})=>{let a={id:`simple-tree-id-${Ks++}`,name:""};return o==="internal"&&(a.children=[]),n.create({parentId:i,index:s,data:a}),r(n.data),a},onDelete:i=>{i.ids.forEach(s=>n.drop({id:s})),r(n.data)}}]}function qs(e){if(e.initialData&&e.data)throw Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(e.initialData&&(e.onCreate||e.onDelete||e.onMove||e.onRename))throw Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
3
- Use the data prop if you want to provide your own handlers.`);if(e.initialData){let[t,r]=Ys(e.initialData);return Object.assign(Object.assign(Object.assign({},e),r),{data:t})}else return e}function $s(e,t){return(0,m.jsxs)(Us,{treeProps:qs(e),imperativeHandle:t,children:[(0,m.jsx)(zs,{children:(0,m.jsx)(Ws,{})}),(0,m.jsx)(Gs,{})]})}const Xs=(0,f.forwardRef)($s);export{lt as a,A as i,dr as n,Er as o,wt as r,Xs as t};
1
+ import{r as Ke,s as ue,t as Or}from"./chunk-LvLJmgfZ.js";import{t as Ir}from"./react-Bj1aDYRI.js";import{t as br}from"./jsx-runtime-icT_Ltz2.js";import{d as Sr}from"./popover-Bvoif-Mg.js";import{t as Dr}from"./extends-aq1t6BkR.js";function he(e,t){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,n){return r.__proto__=n,r},he(e,t)}function Tr(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,he(e,t)}function Ve(e){if(e===void 0)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Er=Or(((e,t)=>{t.exports=function r(n,i){if(n===i)return!0;if(n&&i&&typeof n=="object"&&typeof i=="object"){if(n.constructor!==i.constructor)return!1;var s,o,a;if(Array.isArray(n)){if(s=n.length,s!=i.length)return!1;for(o=s;o--!==0;)if(!r(n[o],i[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===i.source&&n.flags===i.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===i.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===i.toString();if(a=Object.keys(n),s=a.length,s!==Object.keys(i).length)return!1;for(o=s;o--!==0;)if(!Object.prototype.hasOwnProperty.call(i,a[o]))return!1;for(o=s;o--!==0;){var d=a[o];if(!r(n[d],i[d]))return!1}return!0}return n!==n&&i!==i}})),f=ue(Ir(),1);const Ye=(0,f.createContext)({dragDropManager:void 0});function R(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var qe=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})(),fe=function(){return Math.random().toString(36).substring(7).split("").join(".")},$e={INIT:"@@redux/INIT"+fe(),REPLACE:"@@redux/REPLACE"+fe(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+fe()}};function wr(e){if(typeof e!="object"||!e)return!1;for(var t=e;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Xe(e,t,r){var n;if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw Error(R(0));if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),r!==void 0){if(typeof r!="function")throw Error(R(1));return r(Xe)(e,t)}if(typeof e!="function")throw Error(R(2));var i=e,s=t,o=[],a=o,d=!1;function h(){a===o&&(a=o.slice())}function p(){if(d)throw Error(R(3));return s}function b(l){if(typeof l!="function")throw Error(R(4));if(d)throw Error(R(5));var u=!0;return h(),a.push(l),function(){if(u){if(d)throw Error(R(6));u=!1,h();var g=a.indexOf(l);a.splice(g,1),o=null}}}function I(l){if(!wr(l))throw Error(R(7));if(l.type===void 0)throw Error(R(8));if(d)throw Error(R(9));try{d=!0,s=i(s,l)}finally{d=!1}for(var u=o=a,g=0;g<u.length;g++){var O=u[g];O()}return l}function v(l){if(typeof l!="function")throw Error(R(10));i=l,I({type:$e.REPLACE})}function c(){var l,u=b;return l={subscribe:function(g){if(typeof g!="object"||!g)throw Error(R(11));function O(){g.next&&g.next(p())}return O(),{unsubscribe:u(O)}}},l[qe]=function(){return this},l}return I({type:$e.INIT}),n={dispatch:I,subscribe:b,getState:p,replaceReducer:v},n[qe]=c,n}function y(e,t,...r){if(xr()&&t===void 0)throw Error("invariant requires an error message argument");if(!e){let n;if(t===void 0)n=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{let i=0;n=Error(t.replace(/%s/g,function(){return r[i++]})),n.name="Invariant Violation"}throw n.framesToPop=1,n}}function xr(){return typeof process<"u"&&!0}function Cr(e,t,r){return t.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,e)}function Nr(e,t){return e.filter(r=>r!==t)}function Je(e){return typeof e=="object"}function Rr(e,t){let r=new Map,n=s=>{r.set(s,r.has(s)?r.get(s)+1:1)};e.forEach(n),t.forEach(n);let i=[];return r.forEach((s,o)=>{s===1&&i.push(o)}),i}function Pr(e,t){return e.filter(r=>t.indexOf(r)>-1)}const ge="dnd-core/INIT_COORDS",J="dnd-core/BEGIN_DRAG",pe="dnd-core/PUBLISH_DRAG_SOURCE",Q="dnd-core/HOVER",Z="dnd-core/DROP",ee="dnd-core/END_DRAG";function Qe(e,t){return{type:ge,payload:{sourceClientOffset:t||null,clientOffset:e||null}}}var jr={type:ge,payload:{clientOffset:null,sourceClientOffset:null}};function _r(e){return function(t=[],r={publishSource:!0}){let{publishSource:n=!0,clientOffset:i,getSourceClientOffset:s}=r,o=e.getMonitor(),a=e.getRegistry();e.dispatch(Qe(i)),Mr(t,o,a);let d=kr(t,o);if(d==null){e.dispatch(jr);return}let h=null;if(i){if(!s)throw Error("getSourceClientOffset must be defined");Ar(s),h=s(d)}e.dispatch(Qe(i,h));let p=a.getSource(d).beginDrag(o,d);if(p!=null)return Lr(p),a.pinSource(d),{type:J,payload:{itemType:a.getSourceType(d),item:p,sourceId:d,clientOffset:i||null,sourceClientOffset:h||null,isSourcePublic:!!n}}}}function Mr(e,t,r){y(!t.isDragging(),"Cannot call beginDrag while dragging."),e.forEach(function(n){y(r.getSource(n),"Expected sourceIds to be registered.")})}function Ar(e){y(typeof e=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function Lr(e){y(Je(e),"Item must be an object.")}function kr(e,t){let r=null;for(let n=e.length-1;n>=0;n--)if(t.canDragSource(e[n])){r=e[n];break}return r}function Hr(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Hr(e,i,r[i])})}return e}function Ur(e){return function(t={}){let r=e.getMonitor(),n=e.getRegistry();Br(r),Gr(r).forEach((i,s)=>{let o={type:Z,payload:{dropResult:Fr({},t,zr(i,s,n,r))}};e.dispatch(o)})}}function Br(e){y(e.isDragging(),"Cannot call drop while not dragging."),y(!e.didDrop(),"Cannot call drop twice during one drag operation.")}function zr(e,t,r,n){let i=r.getTarget(e),s=i?i.drop(n,e):void 0;return Wr(s),s===void 0&&(s=t===0?{}:n.getDropResult()),s}function Wr(e){y(e===void 0||Je(e),"Drop result must either be an object or undefined.")}function Gr(e){let t=e.getTargetIds().filter(e.canDropOnTarget,e);return t.reverse(),t}function Kr(e){return function(){let t=e.getMonitor(),r=e.getRegistry();Vr(t);let n=t.getSourceId();return n!=null&&(r.getSource(n,!0).endDrag(t,n),r.unpinSource()),{type:ee}}}function Vr(e){y(e.isDragging(),"Cannot call endDrag while not dragging.")}function ve(e,t){return t===null?e===null:Array.isArray(e)?e.some(r=>r===t):e===t}function Yr(e){return function(t,{clientOffset:r}={}){qr(t);let n=t.slice(0),i=e.getMonitor(),s=e.getRegistry();return Xr(n,s,i.getItemType()),$r(n,i,s),Jr(n,i,s),{type:Q,payload:{targetIds:n,clientOffset:r||null}}}}function qr(e){y(Array.isArray(e),"Expected targetIds to be an array.")}function $r(e,t,r){y(t.isDragging(),"Cannot call hover while not dragging."),y(!t.didDrop(),"Cannot call hover after drop.");for(let n=0;n<e.length;n++){let i=e[n];y(e.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array."),y(r.getTarget(i),"Expected targetIds to be registered.")}}function Xr(e,t,r){for(let n=e.length-1;n>=0;n--){let i=e[n];ve(t.getTargetType(i),r)||e.splice(n,1)}}function Jr(e,t,r){e.forEach(function(n){r.getTarget(n).hover(t,n)})}function Qr(e){return function(){if(e.getMonitor().isDragging())return{type:pe}}}function Zr(e){return{beginDrag:_r(e),publishDragSource:Qr(e),hover:Yr(e),drop:Ur(e),endDrag:Kr(e)}}var en=class{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){let e=this,{dispatch:t}=this.store;function r(i){return(...s)=>{let o=i.apply(e,s);o!==void 0&&t(o)}}let n=Zr(this);return Object.keys(n).reduce((i,s)=>{let o=n[s];return i[s]=r(o),i},{})}dispatch(e){this.store.dispatch(e)}constructor(e,t){this.isSetUp=!1,this.handleRefCountChange=()=>{let r=this.store.getState().refCount>0;this.backend&&(r&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!r&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=t,e.subscribe(this.handleRefCountChange)}};function tn(e,t){return{x:e.x+t.x,y:e.y+t.y}}function Ze(e,t){return{x:e.x-t.x,y:e.y-t.y}}function rn(e){let{clientOffset:t,initialClientOffset:r,initialSourceClientOffset:n}=e;return!t||!r||!n?null:Ze(tn(t,n),r)}function nn(e){let{clientOffset:t,initialClientOffset:r}=e;return!t||!r?null:Ze(t,r)}const V=[],me=[];V.__IS_NONE__=!0,me.__IS_ALL__=!0;function sn(e,t){return e===V?!1:e===me||t===void 0?!0:Pr(t,e).length>0}var on=class{subscribeToStateChange(e,t={}){let{handlerIds:r}=t;y(typeof e=="function","listener must be a function."),y(r===void 0||Array.isArray(r),"handlerIds, when specified, must be an array of strings.");let n=this.store.getState().stateId;return this.store.subscribe(()=>{let i=this.store.getState(),s=i.stateId;try{s===n||s===n+1&&!sn(i.dirtyHandlerIds,r)||e()}finally{n=s}})}subscribeToOffsetChange(e){y(typeof e=="function","listener must be a function.");let t=this.store.getState().dragOffset;return this.store.subscribe(()=>{let r=this.store.getState().dragOffset;r!==t&&(t=r,e())})}canDragSource(e){if(!e)return!1;let t=this.registry.getSource(e);return y(t,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:t.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;let t=this.registry.getTarget(e);return y(t,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop()?!1:ve(this.registry.getTargetType(e),this.getItemType())&&t.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;let t=this.registry.getSource(e,!0);return y(t,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic()||this.registry.getSourceType(e)!==this.getItemType()?!1:t.isDragging(this,e)}isOverTarget(e,t={shallow:!1}){if(!e)return!1;let{shallow:r}=t;if(!this.isDragging())return!1;let n=this.registry.getTargetType(e),i=this.getItemType();if(i&&!ve(n,i))return!1;let s=this.getTargetIds();if(!s.length)return!1;let o=s.indexOf(e);return r?o===s.length-1:o>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return rn(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return nn(this.store.getState().dragOffset)}constructor(e,t){this.store=e,this.registry=t}},et=typeof global<"u"?global:self,tt=et.MutationObserver||et.WebKitMutationObserver;function rt(e){return function(){let t=setTimeout(n,0),r=setInterval(n,50);function n(){clearTimeout(t),clearInterval(r),e()}}}function an(e){let t=1,r=new tt(e),n=document.createTextNode("");return r.observe(n,{characterData:!0}),function(){t=-t,n.data=t}}const ln=typeof tt=="function"?an:rt;var dn=class{enqueueTask(e){let{queue:t,requestFlush:r}=this;t.length||(r(),this.flushing=!0),t[t.length]=e}constructor(){this.queue=[],this.pendingErrors=[],this.flushing=!1,this.index=0,this.capacity=1024,this.flush=()=>{let{queue:e}=this;for(;this.index<e.length;){let t=this.index;if(this.index++,e[t].call(),this.index>this.capacity){for(let r=0,n=e.length-this.index;r<n;r++)e[r]=e[r+this.index];e.length-=this.index,this.index=0}}e.length=0,this.index=0,this.flushing=!1},this.registerPendingError=e=>{this.pendingErrors.push(e),this.requestErrorThrow()},this.requestFlush=ln(this.flush),this.requestErrorThrow=rt(()=>{if(this.pendingErrors.length)throw this.pendingErrors.shift()})}},cn=class{call(){try{this.task&&this.task()}catch(e){this.onError(e)}finally{this.task=null,this.release(this)}}constructor(e,t){this.onError=e,this.release=t,this.task=null}},un=class{create(e){let t=this.freeTasks,r=t.length?t.pop():new cn(this.onError,n=>t[t.length]=n);return r.task=e,r}constructor(e){this.onError=e,this.freeTasks=[]}},nt=new dn,hn=new un(nt.registerPendingError);function fn(e){nt.enqueueTask(hn.create(e))}const ye="dnd-core/ADD_SOURCE",Oe="dnd-core/ADD_TARGET",Ie="dnd-core/REMOVE_SOURCE",te="dnd-core/REMOVE_TARGET";function gn(e){return{type:ye,payload:{sourceId:e}}}function pn(e){return{type:Oe,payload:{targetId:e}}}function vn(e){return{type:Ie,payload:{sourceId:e}}}function mn(e){return{type:te,payload:{targetId:e}}}function yn(e){y(typeof e.canDrag=="function","Expected canDrag to be a function."),y(typeof e.beginDrag=="function","Expected beginDrag to be a function."),y(typeof e.endDrag=="function","Expected endDrag to be a function.")}function On(e){y(typeof e.canDrop=="function","Expected canDrop to be a function."),y(typeof e.hover=="function","Expected hover to be a function."),y(typeof e.drop=="function","Expected beginDrag to be a function.")}function be(e,t){if(t&&Array.isArray(e)){e.forEach(r=>be(r,!1));return}y(typeof e=="string"||typeof e=="symbol",t?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var P;(function(e){e.SOURCE="SOURCE",e.TARGET="TARGET"})(P||(P={}));var In=0;function bn(){return In++}function Sn(e){let t=bn().toString();switch(e){case P.SOURCE:return`S${t}`;case P.TARGET:return`T${t}`;default:throw Error(`Unknown Handler Role: ${e}`)}}function it(e){switch(e[0]){case"S":return P.SOURCE;case"T":return P.TARGET;default:throw Error(`Cannot parse handler ID: ${e}`)}}function st(e,t){let r=e.entries(),n=!1;do{let{done:i,value:[,s]}=r.next();if(s===t)return!0;n=!!i}while(!n);return!1}var Dn=class{addSource(e,t){be(e),yn(t);let r=this.addHandler(P.SOURCE,e,t);return this.store.dispatch(gn(r)),r}addTarget(e,t){be(e,!0),On(t);let r=this.addHandler(P.TARGET,e,t);return this.store.dispatch(pn(r)),r}containsHandler(e){return st(this.dragSources,e)||st(this.dropTargets,e)}getSource(e,t=!1){return y(this.isSourceId(e),"Expected a valid source ID."),t&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return y(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return y(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return it(e)===P.SOURCE}isTargetId(e){return it(e)===P.TARGET}removeSource(e){y(this.getSource(e),"Expected an existing source."),this.store.dispatch(vn(e)),fn(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){y(this.getTarget(e),"Expected an existing target."),this.store.dispatch(mn(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){let t=this.getSource(e);y(t,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=t}unpinSource(){y(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,t,r){let n=Sn(e);return this.types.set(n,t),e===P.SOURCE?this.dragSources.set(n,r):e===P.TARGET&&this.dropTargets.set(n,r),n}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}};const Tn=(e,t)=>e===t;function En(e,t){return!e&&!t?!0:!e||!t?!1:e.x===t.x&&e.y===t.y}function wn(e,t,r=Tn){if(e.length!==t.length)return!1;for(let n=0;n<e.length;++n)if(!r(e[n],t[n]))return!1;return!0}function xn(e=V,t){switch(t.type){case Q:break;case ye:case Oe:case te:case Ie:return V;case J:case pe:case ee:case Z:default:return me}let{targetIds:r=[],prevTargetIds:n=[]}=t.payload,i=Rr(r,n);if(!(i.length>0||!wn(r,n)))return V;let s=n[n.length-1],o=r[r.length-1];return s!==o&&(s&&i.push(s),o&&i.push(o)),i}function Cn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Nn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Cn(e,i,r[i])})}return e}var ot={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Rn(e=ot,t){let{payload:r}=t;switch(t.type){case ge:case J:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case Q:return En(e.clientOffset,r.clientOffset)?e:Nn({},e,{clientOffset:r.clientOffset});case ee:case Z:return ot;default:return e}}function Pn(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function U(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Pn(e,i,r[i])})}return e}var jn={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function _n(e=jn,t){let{payload:r}=t;switch(t.type){case J:return U({},e,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case pe:return U({},e,{isSourcePublic:!0});case Q:return U({},e,{targetIds:r.targetIds});case te:return e.targetIds.indexOf(r.targetId)===-1?e:U({},e,{targetIds:Nr(e.targetIds,r.targetId)});case Z:return U({},e,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case ee:return U({},e,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return e}}function Mn(e=0,t){switch(t.type){case ye:case Oe:return e+1;case Ie:case te:return e-1;default:return e}}function An(e=0){return e+1}function Ln(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ln(e,i,r[i])})}return e}function Hn(e={},t){return{dirtyHandlerIds:xn(e.dirtyHandlerIds,{type:t.type,payload:kn({},t.payload,{prevTargetIds:Cr(e,"dragOperation.targetIds",[])})}),dragOffset:Rn(e.dragOffset,t),refCount:Mn(e.refCount,t),dragOperation:_n(e.dragOperation,t),stateId:An(e.stateId)}}function Fn(e,t=void 0,r={},n=!1){let i=Un(n),s=new en(i,new on(i,new Dn(i))),o=e(s,t,r);return s.receiveBackend(o),s}function Un(e){let t=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return Xe(Hn,e&&t&&t({name:"dnd-core",instanceId:"dnd-core"}))}var m=ue(br(),1);function Bn(e,t){if(e==null)return{};var r=zn(e,t),n,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)n=s[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function zn(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,s;for(s=0;s<n.length;s++)i=n[s],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var at=0,re=Symbol.for("__REACT_DND_CONTEXT_INSTANCE__"),lt=(0,f.memo)(function(e){var{children:t}=e;let[r,n]=Wn(Bn(e,["children"]));return(0,f.useEffect)(()=>{if(n){let i=dt();return++at,()=>{--at===0&&(i[re]=null)}}},[]),(0,m.jsx)(Ye.Provider,{value:r,children:t})});function Wn(e){return"manager"in e?[{dragDropManager:e.manager},!1]:[Gn(e.backend,e.context,e.options,e.debugMode),!e.context]}function Gn(e,t=dt(),r,n){let i=t;return i[re]||(i[re]={dragDropManager:Fn(e,t,r,n)}),i[re]}function dt(){return typeof global<"u"?global:window}const k=typeof window<"u"?f.useLayoutEffect:f.useEffect;var Kn=ue(Er(),1);function ct(e,t,r){let[n,i]=(0,f.useState)(()=>t(e)),s=(0,f.useCallback)(()=>{let o=t(e);(0,Kn.default)(n,o)||(i(o),r&&r())},[n,e,r]);return k(s),[n,s]}function Vn(e,t,r){let[n,i]=ct(e,t,r);return k(function(){let s=e.getHandlerId();if(s!=null)return e.subscribeToStateChange(i,{handlerIds:[s]})},[e,i]),n}function ut(e,t,r){return Vn(t,e||(()=>({})),()=>r.reconnect())}function ht(e,t){let r=[...t||[]];return t==null&&typeof e!="function"&&r.push(e),(0,f.useMemo)(()=>typeof e=="function"?e():e,r)}function Yn(e){return(0,f.useMemo)(()=>e.hooks.dragSource(),[e])}function qn(e){return(0,f.useMemo)(()=>e.hooks.dragPreview(),[e])}var Se=!1,De=!1,$n=class{receiveHandlerId(e){this.sourceId=e}getHandlerId(){return this.sourceId}canDrag(){y(!Se,"You may not call monitor.canDrag() inside your canDrag() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return Se=!0,this.internalMonitor.canDragSource(this.sourceId)}finally{Se=!1}}isDragging(){if(!this.sourceId)return!1;y(!De,"You may not call monitor.isDragging() inside your isDragging() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drag-source-monitor");try{return De=!0,this.internalMonitor.isDraggingSource(this.sourceId)}finally{De=!1}}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}isDraggingSource(e){return this.internalMonitor.isDraggingSource(e)}isOverTarget(e,t){return this.internalMonitor.isOverTarget(e,t)}getTargetIds(){return this.internalMonitor.getTargetIds()}isSourcePublic(){return this.internalMonitor.isSourcePublic()}getSourceId(){return this.internalMonitor.getSourceId()}subscribeToOffsetChange(e){return this.internalMonitor.subscribeToOffsetChange(e)}canDragSource(e){return this.internalMonitor.canDragSource(e)}canDropOnTarget(e){return this.internalMonitor.canDropOnTarget(e)}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.sourceId=null,this.internalMonitor=e.getMonitor()}},Te=!1,Xn=class{receiveHandlerId(e){this.targetId=e}getHandlerId(){return this.targetId}subscribeToStateChange(e,t){return this.internalMonitor.subscribeToStateChange(e,t)}canDrop(){if(!this.targetId)return!1;y(!Te,"You may not call monitor.canDrop() inside your canDrop() implementation. Read more: http://react-dnd.github.io/react-dnd/docs/api/drop-target-monitor");try{return Te=!0,this.internalMonitor.canDropOnTarget(this.targetId)}finally{Te=!1}}isOver(e){return this.targetId?this.internalMonitor.isOverTarget(this.targetId,e):!1}getItemType(){return this.internalMonitor.getItemType()}getItem(){return this.internalMonitor.getItem()}getDropResult(){return this.internalMonitor.getDropResult()}didDrop(){return this.internalMonitor.didDrop()}getInitialClientOffset(){return this.internalMonitor.getInitialClientOffset()}getInitialSourceClientOffset(){return this.internalMonitor.getInitialSourceClientOffset()}getSourceClientOffset(){return this.internalMonitor.getSourceClientOffset()}getClientOffset(){return this.internalMonitor.getClientOffset()}getDifferenceFromInitialOffset(){return this.internalMonitor.getDifferenceFromInitialOffset()}constructor(e){this.targetId=null,this.internalMonitor=e.getMonitor()}};function Jn(e,t,r){let n=r.getRegistry(),i=n.addTarget(e,t);return[i,()=>n.removeTarget(i)]}function Qn(e,t,r){let n=r.getRegistry(),i=n.addSource(e,t);return[i,()=>n.removeSource(i)]}function Ee(e,t,r,n){let i=r?r.call(n,e,t):void 0;if(i!==void 0)return!!i;if(e===t)return!0;if(typeof e!="object"||!e||typeof t!="object"||!t)return!1;let s=Object.keys(e),o=Object.keys(t);if(s.length!==o.length)return!1;let a=Object.prototype.hasOwnProperty.bind(t);for(let d=0;d<s.length;d++){let h=s[d];if(!a(h))return!1;let p=e[h],b=t[h];if(i=r?r.call(n,p,b,h):void 0,i===!1||i===void 0&&p!==b)return!1}return!0}function we(e){return typeof e=="object"&&!!e&&Object.prototype.hasOwnProperty.call(e,"current")}function Zn(e){if(typeof e.type=="string")return;let t=e.type.displayName||e.type.name||"the component";throw Error(`Only native element nodes can now be passed to React DnD connectors.You can either wrap ${t} into a <div>, or turn it into a drag source or a drop target itself.`)}function ei(e){return(t=null,r=null)=>{if(!(0,f.isValidElement)(t)){let i=t;return e(i,r),i}let n=t;return Zn(n),ti(n,r?i=>e(i,r):e)}}function ft(e){let t={};return Object.keys(e).forEach(r=>{let n=e[r];if(r.endsWith("Ref"))t[r]=e[r];else{let i=ei(n);t[r]=()=>i}}),t}function gt(e,t){typeof e=="function"?e(t):e.current=t}function ti(e,t){let r=e.ref;return y(typeof r!="string","Cannot connect React DnD to an element with an existing string ref. Please convert it to use a callback ref instead, or wrap it into a <span> or <div>. Read more: https://reactjs.org/docs/refs-and-the-dom.html#callback-refs"),r?(0,f.cloneElement)(e,{ref:n=>{gt(r,n),gt(t,n)}}):(0,f.cloneElement)(e,{ref:t})}var ri=class{receiveHandlerId(e){this.handlerId!==e&&(this.handlerId=e,this.reconnect())}get connectTarget(){return this.dragSource}get dragSourceOptions(){return this.dragSourceOptionsInternal}set dragSourceOptions(e){this.dragSourceOptionsInternal=e}get dragPreviewOptions(){return this.dragPreviewOptionsInternal}set dragPreviewOptions(e){this.dragPreviewOptionsInternal=e}reconnect(){let e=this.reconnectDragSource();this.reconnectDragPreview(e)}reconnectDragSource(){let e=this.dragSource,t=this.didHandlerIdChange()||this.didConnectedDragSourceChange()||this.didDragSourceOptionsChange();return t&&this.disconnectDragSource(),this.handlerId?e?(t&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragSource=e,this.lastConnectedDragSourceOptions=this.dragSourceOptions,this.dragSourceUnsubscribe=this.backend.connectDragSource(this.handlerId,e,this.dragSourceOptions)),t):(this.lastConnectedDragSource=e,t):t}reconnectDragPreview(e=!1){let t=this.dragPreview,r=e||this.didHandlerIdChange()||this.didConnectedDragPreviewChange()||this.didDragPreviewOptionsChange();if(r&&this.disconnectDragPreview(),this.handlerId){if(!t){this.lastConnectedDragPreview=t;return}r&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDragPreview=t,this.lastConnectedDragPreviewOptions=this.dragPreviewOptions,this.dragPreviewUnsubscribe=this.backend.connectDragPreview(this.handlerId,t,this.dragPreviewOptions))}}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didConnectedDragSourceChange(){return this.lastConnectedDragSource!==this.dragSource}didConnectedDragPreviewChange(){return this.lastConnectedDragPreview!==this.dragPreview}didDragSourceOptionsChange(){return!Ee(this.lastConnectedDragSourceOptions,this.dragSourceOptions)}didDragPreviewOptionsChange(){return!Ee(this.lastConnectedDragPreviewOptions,this.dragPreviewOptions)}disconnectDragSource(){this.dragSourceUnsubscribe&&(this.dragSourceUnsubscribe=(this.dragSourceUnsubscribe(),void 0))}disconnectDragPreview(){this.dragPreviewUnsubscribe&&(this.dragPreviewUnsubscribe(),this.dragPreviewUnsubscribe=void 0,this.dragPreviewNode=null,this.dragPreviewRef=null)}get dragSource(){return this.dragSourceNode||this.dragSourceRef&&this.dragSourceRef.current}get dragPreview(){return this.dragPreviewNode||this.dragPreviewRef&&this.dragPreviewRef.current}clearDragSource(){this.dragSourceNode=null,this.dragSourceRef=null}clearDragPreview(){this.dragPreviewNode=null,this.dragPreviewRef=null}constructor(e){this.hooks=ft({dragSource:(t,r)=>{this.clearDragSource(),this.dragSourceOptions=r||null,we(t)?this.dragSourceRef=t:this.dragSourceNode=t,this.reconnectDragSource()},dragPreview:(t,r)=>{this.clearDragPreview(),this.dragPreviewOptions=r||null,we(t)?this.dragPreviewRef=t:this.dragPreviewNode=t,this.reconnectDragPreview()}}),this.handlerId=null,this.dragSourceRef=null,this.dragSourceOptionsInternal=null,this.dragPreviewRef=null,this.dragPreviewOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDragSource=null,this.lastConnectedDragSourceOptions=null,this.lastConnectedDragPreview=null,this.lastConnectedDragPreviewOptions=null,this.backend=e}},ni=class{get connectTarget(){return this.dropTarget}reconnect(){let e=this.didHandlerIdChange()||this.didDropTargetChange()||this.didOptionsChange();e&&this.disconnectDropTarget();let t=this.dropTarget;if(this.handlerId){if(!t){this.lastConnectedDropTarget=t;return}e&&(this.lastConnectedHandlerId=this.handlerId,this.lastConnectedDropTarget=t,this.lastConnectedDropTargetOptions=this.dropTargetOptions,this.unsubscribeDropTarget=this.backend.connectDropTarget(this.handlerId,t,this.dropTargetOptions))}}receiveHandlerId(e){e!==this.handlerId&&(this.handlerId=e,this.reconnect())}get dropTargetOptions(){return this.dropTargetOptionsInternal}set dropTargetOptions(e){this.dropTargetOptionsInternal=e}didHandlerIdChange(){return this.lastConnectedHandlerId!==this.handlerId}didDropTargetChange(){return this.lastConnectedDropTarget!==this.dropTarget}didOptionsChange(){return!Ee(this.lastConnectedDropTargetOptions,this.dropTargetOptions)}disconnectDropTarget(){this.unsubscribeDropTarget&&(this.unsubscribeDropTarget=(this.unsubscribeDropTarget(),void 0))}get dropTarget(){return this.dropTargetNode||this.dropTargetRef&&this.dropTargetRef.current}clearDropTarget(){this.dropTargetRef=null,this.dropTargetNode=null}constructor(e){this.hooks=ft({dropTarget:(t,r)=>{this.clearDropTarget(),this.dropTargetOptions=r,we(t)?this.dropTargetRef=t:this.dropTargetNode=t,this.reconnect()}}),this.handlerId=null,this.dropTargetRef=null,this.dropTargetOptionsInternal=null,this.lastConnectedHandlerId=null,this.lastConnectedDropTarget=null,this.lastConnectedDropTargetOptions=null,this.backend=e}};function A(){let{dragDropManager:e}=(0,f.useContext)(Ye);return y(e!=null,"Expected drag drop context"),e}function ii(e,t){let r=A(),n=(0,f.useMemo)(()=>new ri(r.getBackend()),[r]);return k(()=>(n.dragSourceOptions=e||null,n.reconnect(),()=>n.disconnectDragSource()),[n,e]),k(()=>(n.dragPreviewOptions=t||null,n.reconnect(),()=>n.disconnectDragPreview()),[n,t]),n}function si(){let e=A();return(0,f.useMemo)(()=>new $n(e),[e])}var oi=class{beginDrag(){let e=this.spec,t=this.monitor,r=null;return r=typeof e.item=="object"?e.item:typeof e.item=="function"?e.item(t):{},r??null}canDrag(){let e=this.spec,t=this.monitor;return typeof e.canDrag=="boolean"?e.canDrag:typeof e.canDrag=="function"?e.canDrag(t):!0}isDragging(e,t){let r=this.spec,n=this.monitor,{isDragging:i}=r;return i?i(n):t===e.getSourceId()}endDrag(){let e=this.spec,t=this.monitor,r=this.connector,{end:n}=e;n&&n(t.getItem(),t),r.reconnect()}constructor(e,t,r){this.spec=e,this.monitor=t,this.connector=r}};function ai(e,t,r){let n=(0,f.useMemo)(()=>new oi(e,t,r),[t,r]);return(0,f.useEffect)(()=>{n.spec=e},[e]),n}function li(e){return(0,f.useMemo)(()=>{let t=e.type;return y(t!=null,"spec.type must be defined"),t},[e])}function di(e,t,r){let n=A(),i=ai(e,t,r),s=li(e);k(function(){if(s!=null){let[o,a]=Qn(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a}},[n,t,r,i,s])}function ci(e,t){let r=ht(e,t);y(!r.begin,"useDrag::spec.begin was deprecated in v14. Replace spec.begin() with spec.item(). (see more here - https://react-dnd.github.io/react-dnd/docs/api/use-drag)");let n=si(),i=ii(r.options,r.previewOptions);return di(r,n,i),[ut(r.collect,n,i),Yn(i),qn(i)]}function ui(e){let t=A().getMonitor(),[r,n]=ct(t,e);return(0,f.useEffect)(()=>t.subscribeToOffsetChange(n)),(0,f.useEffect)(()=>t.subscribeToStateChange(n)),r}function hi(e){return(0,f.useMemo)(()=>e.hooks.dropTarget(),[e])}function fi(e){let t=A(),r=(0,f.useMemo)(()=>new ni(t.getBackend()),[t]);return k(()=>(r.dropTargetOptions=e||null,r.reconnect(),()=>r.disconnectDropTarget()),[e]),r}function gi(){let e=A();return(0,f.useMemo)(()=>new Xn(e),[e])}function pi(e){let{accept:t}=e;return(0,f.useMemo)(()=>(y(e.accept!=null,"accept must be defined"),Array.isArray(t)?t:[t]),[t])}var vi=class{canDrop(){let e=this.spec,t=this.monitor;return e.canDrop?e.canDrop(t.getItem(),t):!0}hover(){let e=this.spec,t=this.monitor;e.hover&&e.hover(t.getItem(),t)}drop(){let e=this.spec,t=this.monitor;if(e.drop)return e.drop(t.getItem(),t)}constructor(e,t){this.spec=e,this.monitor=t}};function mi(e,t){let r=(0,f.useMemo)(()=>new vi(e,t),[t]);return(0,f.useEffect)(()=>{r.spec=e},[e]),r}function yi(e,t,r){let n=A(),i=mi(e,t),s=pi(e);k(function(){let[o,a]=Jn(s,i,n);return t.receiveHandlerId(o),r.receiveHandlerId(o),a},[n,t,i,r,s.map(o=>o.toString()).join("|")])}function pt(e,t){let r=ht(e,t),n=gi(),i=fi(r.options);return yi(r,n,i),[ut(r.collect,n,i),hi(i)]}function vt(e){let t=null;return()=>(t??(t=e()),t)}function Oi(e,t){return e.filter(r=>r!==t)}function Ii(e,t){let r=new Set,n=s=>r.add(s);e.forEach(n),t.forEach(n);let i=[];return r.forEach(s=>i.push(s)),i}var bi=class{enter(e){let t=this.entered.length;return this.entered=Ii(this.entered.filter(r=>this.isNodeInDocument(r)&&(!r.contains||r.contains(e))),[e]),t===0&&this.entered.length>0}leave(e){let t=this.entered.length;return this.entered=Oi(this.entered.filter(this.isNodeInDocument),e),t>0&&this.entered.length===0}reset(){this.entered=[]}constructor(e){this.entered=[],this.isNodeInDocument=e}},Si=class{initializeExposedProperties(){Object.keys(this.config.exposeProperties).forEach(e=>{Object.defineProperty(this.item,e,{configurable:!0,enumerable:!0,get(){return console.warn(`Browser doesn't allow reading "${e}" until the drop event.`),null}})})}loadDataTransfer(e){if(e){let t={};Object.keys(this.config.exposeProperties).forEach(r=>{let n=this.config.exposeProperties[r];n!=null&&(t[r]={value:n(e,this.config.matchesTypes),configurable:!0,enumerable:!0})}),Object.defineProperties(this.item,t)}}canDrag(){return!0}beginDrag(){return this.item}isDragging(e,t){return t===e.getSourceId()}endDrag(){}constructor(e){this.config=e,this.item={},this.initializeExposedProperties()}},mt=Ke({FILE:()=>yt,HTML:()=>bt,TEXT:()=>It,URL:()=>Ot},1);const yt="__NATIVE_FILE__",Ot="__NATIVE_URL__",It="__NATIVE_TEXT__",bt="__NATIVE_HTML__";function xe(e,t,r){return t.reduce((n,i)=>n||e.getData(i),"")??r}const Ce={[yt]:{exposeProperties:{files:e=>Array.prototype.slice.call(e.files),items:e=>e.items,dataTransfer:e=>e},matchesTypes:["Files"]},[bt]:{exposeProperties:{html:(e,t)=>xe(e,t,""),dataTransfer:e=>e},matchesTypes:["Html","text/html"]},[Ot]:{exposeProperties:{urls:(e,t)=>xe(e,t,"").split(`
2
+ `),dataTransfer:e=>e},matchesTypes:["Url","text/uri-list"]},[It]:{exposeProperties:{text:(e,t)=>xe(e,t,""),dataTransfer:e=>e},matchesTypes:["Text","text/plain"]}};function Di(e,t){let r=Ce[e];if(!r)throw Error(`native type ${e} has no configuration`);let n=new Si(r);return n.loadDataTransfer(t),n}function Ne(e){if(!e)return null;let t=Array.prototype.slice.call(e.types||[]);return Object.keys(Ce).filter(r=>{let n=Ce[r];return n!=null&&n.matchesTypes?n.matchesTypes.some(i=>t.indexOf(i)>-1):!1})[0]||null}const Ti=vt(()=>/firefox/i.test(navigator.userAgent)),St=vt(()=>!!window.safari);var Dt=class{interpolate(e){let{xs:t,ys:r,c1s:n,c2s:i,c3s:s}=this,o=t.length-1;if(e===t[o])return r[o];let a=0,d=s.length-1,h;for(;a<=d;){h=Math.floor(.5*(a+d));let I=t[h];if(I<e)a=h+1;else if(I>e)d=h-1;else return r[h]}o=Math.max(0,d);let p=e-t[o],b=p*p;return r[o]+n[o]*p+i[o]*b+s[o]*p*b}constructor(e,t){let{length:r}=e,n=[];for(let v=0;v<r;v++)n.push(v);n.sort((v,c)=>e[v]<e[c]?-1:1);let i=[],s=[],o=[],a,d;for(let v=0;v<r-1;v++)a=e[v+1]-e[v],d=t[v+1]-t[v],s.push(a),i.push(d),o.push(d/a);let h=[o[0]];for(let v=0;v<s.length-1;v++){let c=o[v],l=o[v+1];if(c*l<=0)h.push(0);else{a=s[v];let u=s[v+1],g=a+u;h.push(3*g/((g+u)/c+(g+a)/l))}}h.push(o[o.length-1]);let p=[],b=[],I;for(let v=0;v<h.length-1;v++){I=o[v];let c=h[v],l=1/s[v],u=c+h[v+1]-I-I;p.push((I-c-u)*l),b.push(u*l*l)}this.xs=e,this.ys=t,this.c1s=h,this.c2s=p,this.c3s=b}},Ei=1;function Tt(e){let t=e.nodeType===Ei?e:e.parentElement;if(!t)return null;let{top:r,left:n}=t.getBoundingClientRect();return{x:n,y:r}}function ne(e){return{x:e.clientX,y:e.clientY}}function wi(e){var t;return e.nodeName==="IMG"&&(Ti()||!((t=document.documentElement)!=null&&t.contains(e)))}function xi(e,t,r,n){let i=e?t.width:r,s=e?t.height:n;return St()&&e&&(s/=window.devicePixelRatio,i/=window.devicePixelRatio),{dragPreviewWidth:i,dragPreviewHeight:s}}function Ci(e,t,r,n,i){let s=wi(t),o=Tt(s?e:t),a={x:r.x-o.x,y:r.y-o.y},{offsetWidth:d,offsetHeight:h}=e,{anchorX:p,anchorY:b}=n,{dragPreviewWidth:I,dragPreviewHeight:v}=xi(s,t,d,h),c=()=>{let D=new Dt([0,.5,1],[a.y,a.y/h*v,a.y+v-h]).interpolate(b);return St()&&s&&(D+=(window.devicePixelRatio-1)*v),D},l=()=>new Dt([0,.5,1],[a.x,a.x/d*I,a.x+I-d]).interpolate(p),{offsetX:u,offsetY:g}=i,O=u===0||u,S=g===0||g;return{x:O?u:l(),y:S?g:c()}}var Ni=class{get window(){if(this.globalContext)return this.globalContext;if(typeof window<"u")return window}get document(){var e;if((e=this.globalContext)!=null&&e.document)return this.globalContext.document;if(this.window)return this.window.document}get rootElement(){var e;return((e=this.optionsArgs)==null?void 0:e.rootElement)||this.window}constructor(e,t){this.ownerDocument=null,this.globalContext=e,this.optionsArgs=t}};function Ri(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]==null?{}:arguments[t],n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ri(e,i,r[i])})}return e}var Pi=class{profile(){var e,t;return{sourcePreviewNodes:this.sourcePreviewNodes.size,sourcePreviewNodeOptions:this.sourcePreviewNodeOptions.size,sourceNodeOptions:this.sourceNodeOptions.size,sourceNodes:this.sourceNodes.size,dragStartSourceIds:((e=this.dragStartSourceIds)==null?void 0:e.length)||0,dropTargetIds:this.dropTargetIds.length,dragEnterTargetIds:this.dragEnterTargetIds.length,dragOverTargetIds:((t=this.dragOverTargetIds)==null?void 0:t.length)||0}}get window(){return this.options.window}get document(){return this.options.document}get rootElement(){return this.options.rootElement}setup(){let e=this.rootElement;if(e!==void 0){if(e.__isReactDndBackendSetUp)throw Error("Cannot have two HTML5 backends at the same time.");e.__isReactDndBackendSetUp=!0,this.addEventListeners(e)}}teardown(){let e=this.rootElement;if(e!==void 0&&(e.__isReactDndBackendSetUp=!1,this.removeEventListeners(this.rootElement),this.clearCurrentDragSourceNode(),this.asyncEndDragFrameId)){var t;(t=this.window)==null||t.cancelAnimationFrame(this.asyncEndDragFrameId)}}connectDragPreview(e,t,r){return this.sourcePreviewNodeOptions.set(e,r),this.sourcePreviewNodes.set(e,t),()=>{this.sourcePreviewNodes.delete(e),this.sourcePreviewNodeOptions.delete(e)}}connectDragSource(e,t,r){this.sourceNodes.set(e,t),this.sourceNodeOptions.set(e,r);let n=s=>this.handleDragStart(s,e),i=s=>this.handleSelectStart(s);return t.setAttribute("draggable","true"),t.addEventListener("dragstart",n),t.addEventListener("selectstart",i),()=>{this.sourceNodes.delete(e),this.sourceNodeOptions.delete(e),t.removeEventListener("dragstart",n),t.removeEventListener("selectstart",i),t.setAttribute("draggable","false")}}connectDropTarget(e,t){let r=s=>this.handleDragEnter(s,e),n=s=>this.handleDragOver(s,e),i=s=>this.handleDrop(s,e);return t.addEventListener("dragenter",r),t.addEventListener("dragover",n),t.addEventListener("drop",i),()=>{t.removeEventListener("dragenter",r),t.removeEventListener("dragover",n),t.removeEventListener("drop",i)}}addEventListeners(e){e.addEventListener&&(e.addEventListener("dragstart",this.handleTopDragStart),e.addEventListener("dragstart",this.handleTopDragStartCapture,!0),e.addEventListener("dragend",this.handleTopDragEndCapture,!0),e.addEventListener("dragenter",this.handleTopDragEnter),e.addEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.addEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.addEventListener("dragover",this.handleTopDragOver),e.addEventListener("dragover",this.handleTopDragOverCapture,!0),e.addEventListener("drop",this.handleTopDrop),e.addEventListener("drop",this.handleTopDropCapture,!0))}removeEventListeners(e){e.removeEventListener&&(e.removeEventListener("dragstart",this.handleTopDragStart),e.removeEventListener("dragstart",this.handleTopDragStartCapture,!0),e.removeEventListener("dragend",this.handleTopDragEndCapture,!0),e.removeEventListener("dragenter",this.handleTopDragEnter),e.removeEventListener("dragenter",this.handleTopDragEnterCapture,!0),e.removeEventListener("dragleave",this.handleTopDragLeaveCapture,!0),e.removeEventListener("dragover",this.handleTopDragOver),e.removeEventListener("dragover",this.handleTopDragOverCapture,!0),e.removeEventListener("drop",this.handleTopDrop),e.removeEventListener("drop",this.handleTopDropCapture,!0))}getCurrentSourceNodeOptions(){let e=this.monitor.getSourceId(),t=this.sourceNodeOptions.get(e);return Et({dropEffect:this.altKeyPressed?"copy":"move"},t||{})}getCurrentDropEffect(){return this.isDraggingNativeItem()?"copy":this.getCurrentSourceNodeOptions().dropEffect}getCurrentSourcePreviewNodeOptions(){let e=this.monitor.getSourceId();return Et({anchorX:.5,anchorY:.5,captureDraggingState:!1},this.sourcePreviewNodeOptions.get(e)||{})}isDraggingNativeItem(){let e=this.monitor.getItemType();return Object.keys(mt).some(t=>mt[t]===e)}beginDragNativeItem(e,t){this.clearCurrentDragSourceNode(),this.currentNativeSource=Di(e,t),this.currentNativeHandle=this.registry.addSource(e,this.currentNativeSource),this.actions.beginDrag([this.currentNativeHandle])}setCurrentDragSourceNode(e){this.clearCurrentDragSourceNode(),this.currentDragSourceNode=e,this.mouseMoveTimeoutTimer=setTimeout(()=>{var t;return(t=this.rootElement)==null?void 0:t.addEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)},1e3)}clearCurrentDragSourceNode(){if(this.currentDragSourceNode){if(this.currentDragSourceNode=null,this.rootElement){var e;(e=this.window)==null||e.clearTimeout(this.mouseMoveTimeoutTimer||void 0),this.rootElement.removeEventListener("mousemove",this.endDragIfSourceWasRemovedFromDOM,!0)}return this.mouseMoveTimeoutTimer=null,!0}return!1}handleDragStart(e,t){e.defaultPrevented||(this.dragStartSourceIds||(this.dragStartSourceIds=[]),this.dragStartSourceIds.unshift(t))}handleDragEnter(e,t){this.dragEnterTargetIds.unshift(t)}handleDragOver(e,t){this.dragOverTargetIds===null&&(this.dragOverTargetIds=[]),this.dragOverTargetIds.unshift(t)}handleDrop(e,t){this.dropTargetIds.unshift(t)}constructor(e,t,r){this.sourcePreviewNodes=new Map,this.sourcePreviewNodeOptions=new Map,this.sourceNodes=new Map,this.sourceNodeOptions=new Map,this.dragStartSourceIds=null,this.dropTargetIds=[],this.dragEnterTargetIds=[],this.currentNativeSource=null,this.currentNativeHandle=null,this.currentDragSourceNode=null,this.altKeyPressed=!1,this.mouseMoveTimeoutTimer=null,this.asyncEndDragFrameId=null,this.dragOverTargetIds=null,this.lastClientOffset=null,this.hoverRafId=null,this.getSourceClientOffset=n=>{let i=this.sourceNodes.get(n);return i&&Tt(i)||null},this.endDragNativeItem=()=>{this.isDraggingNativeItem()&&(this.actions.endDrag(),this.currentNativeHandle&&this.registry.removeSource(this.currentNativeHandle),this.currentNativeHandle=null,this.currentNativeSource=null)},this.isNodeInDocument=n=>!!(n&&this.document&&this.document.body&&this.document.body.contains(n)),this.endDragIfSourceWasRemovedFromDOM=()=>{let n=this.currentDragSourceNode;n==null||this.isNodeInDocument(n)||(this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover())},this.scheduleHover=n=>{this.hoverRafId===null&&typeof requestAnimationFrame<"u"&&(this.hoverRafId=requestAnimationFrame(()=>{this.monitor.isDragging()&&this.actions.hover(n||[],{clientOffset:this.lastClientOffset}),this.hoverRafId=null}))},this.cancelHover=()=>{this.hoverRafId!==null&&typeof cancelAnimationFrame<"u"&&(cancelAnimationFrame(this.hoverRafId),this.hoverRafId=null)},this.handleTopDragStartCapture=()=>{this.clearCurrentDragSourceNode(),this.dragStartSourceIds=[]},this.handleTopDragStart=n=>{if(n.defaultPrevented)return;let{dragStartSourceIds:i}=this;this.dragStartSourceIds=null;let s=ne(n);this.monitor.isDragging()&&(this.actions.endDrag(),this.cancelHover()),this.actions.beginDrag(i||[],{publishSource:!1,getSourceClientOffset:this.getSourceClientOffset,clientOffset:s});let{dataTransfer:o}=n,a=Ne(o);if(this.monitor.isDragging()){if(o&&typeof o.setDragImage=="function"){let h=this.monitor.getSourceId(),p=this.sourceNodes.get(h),b=this.sourcePreviewNodes.get(h)||p;if(b){let{anchorX:I,anchorY:v,offsetX:c,offsetY:l}=this.getCurrentSourcePreviewNodeOptions(),u=Ci(p,b,s,{anchorX:I,anchorY:v},{offsetX:c,offsetY:l});o.setDragImage(b,u.x,u.y)}}try{o==null||o.setData("application/json",{})}catch{}this.setCurrentDragSourceNode(n.target);let{captureDraggingState:d}=this.getCurrentSourcePreviewNodeOptions();d?this.actions.publishDragSource():setTimeout(()=>this.actions.publishDragSource(),0)}else if(a)this.beginDragNativeItem(a);else{if(o&&!o.types&&(n.target&&!n.target.hasAttribute||!n.target.hasAttribute("draggable")))return;n.preventDefault()}},this.handleTopDragEndCapture=()=>{this.clearCurrentDragSourceNode()&&this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleTopDragEnterCapture=n=>{if(this.dragEnterTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}if(!this.enterLeaveCounter.enter(n.target)||this.monitor.isDragging())return;let{dataTransfer:s}=n,o=Ne(s);o&&this.beginDragNativeItem(o,s)},this.handleTopDragEnter=n=>{let{dragEnterTargetIds:i}=this;this.dragEnterTargetIds=[],this.monitor.isDragging()&&(this.altKeyPressed=n.altKey,i.length>0&&this.actions.hover(i,{clientOffset:ne(n)}),i.some(s=>this.monitor.canDropOnTarget(s))&&(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())))},this.handleTopDragOverCapture=n=>{if(this.dragOverTargetIds=[],this.isDraggingNativeItem()){var i;(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}},this.handleTopDragOver=n=>{let{dragOverTargetIds:i}=this;if(this.dragOverTargetIds=[],!this.monitor.isDragging()){n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none");return}this.altKeyPressed=n.altKey,this.lastClientOffset=ne(n),this.scheduleHover(i),(i||[]).some(s=>this.monitor.canDropOnTarget(s))?(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=this.getCurrentDropEffect())):this.isDraggingNativeItem()?n.preventDefault():(n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect="none"))},this.handleTopDragLeaveCapture=n=>{this.isDraggingNativeItem()&&n.preventDefault(),this.enterLeaveCounter.leave(n.target)&&(this.isDraggingNativeItem()&&setTimeout(()=>this.endDragNativeItem(),0),this.cancelHover())},this.handleTopDropCapture=n=>{if(this.dropTargetIds=[],this.isDraggingNativeItem()){var i;n.preventDefault(),(i=this.currentNativeSource)==null||i.loadDataTransfer(n.dataTransfer)}else Ne(n.dataTransfer)&&n.preventDefault();this.enterLeaveCounter.reset()},this.handleTopDrop=n=>{let{dropTargetIds:i}=this;this.dropTargetIds=[],this.actions.hover(i,{clientOffset:ne(n)}),this.actions.drop({dropEffect:this.getCurrentDropEffect()}),this.isDraggingNativeItem()?this.endDragNativeItem():this.monitor.isDragging()&&this.actions.endDrag(),this.cancelHover()},this.handleSelectStart=n=>{let i=n.target;typeof i.dragDrop=="function"&&(i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.isContentEditable||(n.preventDefault(),i.dragDrop()))},this.options=new Ni(t,r),this.actions=e.getActions(),this.monitor=e.getMonitor(),this.registry=e.getRegistry(),this.enterLeaveCounter=new bi(this.isNodeInDocument)}},ie;function ji(){return ie||(ie=new Image,ie.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="),ie}const wt=function(e,t,r){return new Pi(e,t,r)},xt=(0,f.createContext)(null);function N(){let e=(0,f.useContext)(xt);if(e===null)throw Error("No Tree Api Provided");return e}const Ct=(0,f.createContext)(null);function _i(){let e=(0,f.useContext)(Ct);if(e===null)throw Error("Provide a NodesContext");return e}const Nt=(0,f.createContext)(null);function Mi(){let e=(0,f.useContext)(Nt);if(e===null)throw Error("Provide a DnDContext");return e}const Rt=(0,f.createContext)(0);function Pt(){(0,f.useContext)(Rt)}var Ai=Ke({access:()=>Y,bound:()=>se,dfs:()=>Re,focusNextElement:()=>kt,focusPrevElement:()=>Ht,getInsertIndex:()=>Wt,getInsertParentId:()=>Gt,identify:()=>H,identifyNull:()=>Ut,indexOf:()=>Lt,isClosed:()=>_t,isDescendant:()=>At,isItem:()=>jt,isOpenWithEmptyChildren:()=>Mt,mergeRefs:()=>Fi,noop:()=>Li,safeRun:()=>Bt,waitFor:()=>zt,walk:()=>oe},1);function se(e,t,r){return Math.max(Math.min(e,r),t)}function jt(e){return e&&e.isLeaf}function _t(e){return e&&e.isInternal&&!e.isOpen}function Mt(e){var t;return e&&e.isOpen&&!((t=e.children)!=null&&t.length)}const At=(e,t)=>{let r=e;for(;r;){if(r.id===t.id)return!0;r=r.parent}return!1},Lt=e=>{if(!e.parent)throw Error("Node does not have a parent");return e.parent.children.findIndex(t=>t.id===e.id)};function Li(){}function Re(e,t){if(!e)return null;if(e.id===t)return e;if(e.children)for(let r of e.children){let n=Re(r,t);if(n)return n}return null}function oe(e,t){if(t(e),e.children)for(let r of e.children)oe(r,t)}function kt(e){let t=Ft(e),r;for(let n=0;n<t.length;++n)if(t[n]===e){r=ki(t,n);break}r==null||r.focus()}function Ht(e){let t=Ft(e),r;for(let n=0;n<t.length;++n)if(t[n]===e){r=Hi(t,n);break}r==null||r.focus()}function ki(e,t){return t+1<e.length?e[t+1]:e[0]}function Hi(e,t){return t-1>=0?e[t-1]:e[e.length-1]}function Ft(e){return Array.from(document.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), details:not([disabled]), summary:not(:disabled)')).filter(t=>t===e||!e.contains(t))}function Y(e,t){return typeof t=="boolean"?t:typeof t=="string"?e[t]:t(e)}function Ut(e){return e===null?null:H(e)}function H(e){return typeof e=="string"?e:e.id}function Fi(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}function Bt(e,...t){if(e)return e(...t)}function zt(e){return new Promise((t,r)=>{let n=0;function i(){n+=1,n===100&&r(),e()?t():setTimeout(i,10)}i()})}function Wt(e){var r;let t=e.focusedNode;return t?t.isOpen?0:t.parent?t.childIndex+1:0:((r=e.root.children)==null?void 0:r.length)??0}function Gt(e){let t=e.focusedNode;return t?t.isOpen?t.id:t.parent&&!t.parent.isRoot?t.parent.id:null:null}var Ui={display:"flex",alignItems:"center",zIndex:1},Bi={flex:1,height:"2px",background:"#4B91E2",borderRadius:"1px"},zi={width:"4px",height:"4px",boxShadow:"0 0 0 3px #4B91E2",borderRadius:"50%"};const Wi=f.memo(function({top:e,left:t,indent:r}){let n={position:"absolute",pointerEvents:"none",top:e-2+"px",left:t+"px",right:r+"px"};return(0,m.jsxs)("div",{style:Object.assign(Object.assign({},Ui),n),children:[(0,m.jsx)("div",{style:Object.assign({},zi)}),(0,m.jsx)("div",{style:Object.assign({},Bi)})]})});function Gi({node:e,attrs:t,innerRef:r,children:n}){return(0,m.jsx)("div",Object.assign({},t,{ref:r,onFocus:i=>i.stopPropagation(),onClick:e.handleClick,children:n}))}function Ki(e){return(0,m.jsxs)("div",{ref:e.dragHandle,style:e.style,children:[(0,m.jsx)("span",{onClick:t=>{t.stopPropagation(),e.node.toggle()},children:e.node.isLeaf?"\u{1F333}":e.node.isOpen?"\u{1F5C1}":"\u{1F5C0}"})," ",e.node.isEditing?(0,m.jsx)(Yi,Object.assign({},e)):(0,m.jsx)(Vi,Object.assign({},e))]})}function Vi(e){return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("span",{children:e.node.data.name})})}function Yi({node:e}){let t=(0,f.useRef)();return(0,f.useEffect)(()=>{var r,n;(r=t.current)==null||r.focus(),(n=t.current)==null||n.select()},[]),(0,m.jsx)("input",{ref:t,defaultValue:e.data.name,onBlur:()=>e.reset(),onKeyDown:r=>{var n;r.key==="Escape"&&e.reset(),r.key==="Enter"&&e.submit(((n=t.current)==null?void 0:n.value)||"")}})}function Pe(e){return{type:"EDIT",id:e}}function qi(e={id:null},t){return t.type==="EDIT"?Object.assign(Object.assign({},e),{id:t.id}):e}function B(e){return{type:"FOCUS",id:e}}function $i(){return{type:"TREE_BLUR"}}function Xi(e={id:null,treeFocused:!1},t){return t.type==="FOCUS"?Object.assign(Object.assign({},e),{id:t.id,treeFocused:!0}):t.type==="TREE_BLUR"?Object.assign(Object.assign({},e),{treeFocused:!1}):e}var Kt=class ur{constructor(t){this.handleClick=r=>{r.metaKey&&!this.tree.props.disableMultiSelection?this.isSelected?this.deselect():this.selectMulti():r.shiftKey&&!this.tree.props.disableMultiSelection?this.selectContiguous():(this.select(),this.activate())},this.tree=t.tree,this.id=t.id,this.data=t.data,this.level=t.level,this.children=t.children,this.parent=t.parent,this.isDraggable=t.isDraggable,this.rowIndex=t.rowIndex}get isRoot(){return this.id===je}get isLeaf(){return!Array.isArray(this.children)}get isInternal(){return!this.isLeaf}get isOpen(){return this.isLeaf?!1:this.tree.isOpen(this.id)}get isClosed(){return this.isLeaf?!1:!this.tree.isOpen(this.id)}get isEditable(){return this.tree.isEditable(this.data)}get isEditing(){return this.tree.editingId===this.id}get isSelected(){return this.tree.isSelected(this.id)}get isOnlySelection(){return this.isSelected&&this.tree.hasOneSelection}get isSelectedStart(){var t;return this.isSelected&&!((t=this.prev)!=null&&t.isSelected)}get isSelectedEnd(){var t;return this.isSelected&&!((t=this.next)!=null&&t.isSelected)}get isFocused(){return this.tree.isFocused(this.id)}get isDragging(){return this.tree.isDragging(this.id)}get willReceiveDrop(){return this.tree.willReceiveDrop(this.id)}get state(){return{isClosed:this.isClosed,isDragging:this.isDragging,isEditing:this.isEditing,isFocused:this.isFocused,isInternal:this.isInternal,isLeaf:this.isLeaf,isOpen:this.isOpen,isSelected:this.isSelected,isSelectedEnd:this.isSelectedEnd,isSelectedStart:this.isSelectedStart,willReceiveDrop:this.willReceiveDrop}}get childIndex(){return this.parent&&this.parent.children?this.parent.children.findIndex(t=>t.id===this.id):-1}get next(){return this.rowIndex===null?null:this.tree.at(this.rowIndex+1)}get prev(){return this.rowIndex===null?null:this.tree.at(this.rowIndex-1)}get nextSibling(){var r;let t=this.childIndex;return((r=this.parent)==null?void 0:r.children[t+1])??null}isAncestorOf(t){if(!t)return!1;let r=t;for(;r;){if(r.id===this.id)return!0;r=r.parent}return!1}select(){this.tree.select(this)}deselect(){this.tree.deselect(this)}selectMulti(){this.tree.selectMulti(this)}selectContiguous(){this.tree.selectContiguous(this)}activate(){this.tree.activate(this)}focus(){this.tree.focus(this)}toggle(){this.tree.toggle(this)}open(){this.tree.open(this)}openParents(){this.tree.openParents(this)}close(){this.tree.close(this)}submit(t){this.tree.submit(this,t)}reset(){this.tree.reset()}clone(){return new ur(Object.assign({},this))}edit(){return this.tree.edit(this)}};const je="__REACT_ARBORIST_INTERNAL_ROOT__";function Vt(e){function t(n,i,s){let o=new Kt({tree:e,data:n,level:i,parent:s,id:e.accessId(n),children:null,isDraggable:e.isDraggable(n),rowIndex:null}),a=e.accessChildren(n);return a&&(o.children=a.map(d=>t(d,i+1,o))),o}let r=new Kt({tree:e,id:je,data:{id:je},level:-1,parent:null,children:null,isDraggable:!0,rowIndex:null});return r.children=(e.props.data??[]).map(n=>t(n,0,r)),r}const _e={open(e,t){return{type:"VISIBILITY_OPEN",id:e,filtered:t}},close(e,t){return{type:"VISIBILITY_CLOSE",id:e,filtered:t}},toggle(e,t){return{type:"VISIBILITY_TOGGLE",id:e,filtered:t}},clear(e){return{type:"VISIBILITY_CLEAR",filtered:e}}};function Yt(e={},t){if(t.type==="VISIBILITY_OPEN")return Object.assign(Object.assign({},e),{[t.id]:!0});if(t.type==="VISIBILITY_CLOSE")return Object.assign(Object.assign({},e),{[t.id]:!1});if(t.type==="VISIBILITY_TOGGLE"){let r=e[t.id];return Object.assign(Object.assign({},e),{[t.id]:!r})}else return t.type==="VISIBILITY_CLEAR"?{}:e}function Ji(e={filtered:{},unfiltered:{}},t){return t.type.startsWith("VISIBILITY")?t.filtered?Object.assign(Object.assign({},e),{filtered:Yt(e.filtered,t)}):Object.assign(Object.assign({},e),{unfiltered:Yt(e.unfiltered,t)}):e}const z=e=>({nodes:{open:{filtered:{},unfiltered:(e==null?void 0:e.initialOpenState)??{}},focus:{id:null,treeFocused:!1},edit:{id:null},drag:{id:null,selectedIds:[],destinationParentId:null,destinationIndex:null},selection:{ids:new Set,anchor:null,mostRecent:null}},dnd:{cursor:{type:"none"},dragId:null,dragIds:[],parentId:null,index:-1}}),j={clear:()=>({type:"SELECTION_CLEAR"}),only:e=>({type:"SELECTION_ONLY",id:H(e)}),add:e=>({type:"SELECTION_ADD",ids:(Array.isArray(e)?e:[e]).map(H)}),remove:e=>({type:"SELECTION_REMOVE",ids:(Array.isArray(e)?e:[e]).map(H)}),set:e=>Object.assign({type:"SELECTION_SET"},e),mostRecent:e=>({type:"SELECTION_MOST_RECENT",id:e===null?null:H(e)}),anchor:e=>({type:"SELECTION_ANCHOR",id:e===null?null:H(e)})};function Qi(e=z().nodes.selection,t){let r=e.ids;switch(t.type){case"SELECTION_CLEAR":return Object.assign(Object.assign({},e),{ids:new Set});case"SELECTION_ONLY":return Object.assign(Object.assign({},e),{ids:new Set([t.id])});case"SELECTION_ADD":return t.ids.length===0?e:(t.ids.forEach(n=>r.add(n)),Object.assign(Object.assign({},e),{ids:new Set(r)}));case"SELECTION_REMOVE":return t.ids.length===0?e:(t.ids.forEach(n=>r.delete(n)),Object.assign(Object.assign({},e),{ids:new Set(r)}));case"SELECTION_SET":return Object.assign(Object.assign({},e),{ids:t.ids,mostRecent:t.mostRecent,anchor:t.anchor});case"SELECTION_MOST_RECENT":return Object.assign(Object.assign({},e),{mostRecent:t.id});case"SELECTION_ANCHOR":return Object.assign(Object.assign({},e),{anchor:t.id});default:return e}}const W={cursor(e){return{type:"DND_CURSOR",cursor:e}},dragStart(e,t){return{type:"DND_DRAG_START",id:e,dragIds:t}},dragEnd(){return{type:"DND_DRAG_END"}},hovering(e,t){return{type:"DND_HOVERING",parentId:e,index:t}}};function Zi(e=z().dnd,t){switch(t.type){case"DND_CURSOR":return Object.assign(Object.assign({},e),{cursor:t.cursor});case"DND_DRAG_START":return Object.assign(Object.assign({},e),{dragId:t.id,dragIds:t.dragIds});case"DND_DRAG_END":return z().dnd;case"DND_HOVERING":return Object.assign(Object.assign({},e),{parentId:t.parentId,index:t.index});default:return e}}var es={position:"fixed",pointerEvents:"none",zIndex:100,left:0,top:0,width:"100%",height:"100%"},ts=e=>{if(!e)return{display:"none"};let{x:t,y:r}=e;return{transform:`translate(${t}px, ${r}px)`}},rs=e=>{if(!e)return{display:"none"};let{x:t,y:r}=e;return{transform:`translate(${t+10}px, ${r+10}px)`}};function qt({offset:e,mouse:t,id:r,dragIds:n,isDragging:i}){return(0,m.jsxs)(ns,{isDragging:i,children:[(0,m.jsx)(is,{offset:e,children:(0,m.jsx)(os,{id:r,dragIds:n})}),(0,m.jsx)(ss,{mouse:t,count:n.length})]})}var ns=(0,f.memo)(function(e){return e.isDragging?(0,m.jsx)("div",{style:es,children:e.children}):null});function is(e){return(0,m.jsx)("div",{className:"row preview",style:ts(e.offset),children:e.children})}function ss(e){let{count:t,mouse:r}=e;return t>1?(0,m.jsx)("div",{className:"selected-count",style:rs(r),children:t}):null}var os=(0,f.memo)(function(e){let t=N(),r=t.get(e.id);return r?(0,m.jsx)(t.renderNode,{preview:!0,node:r,style:{paddingLeft:r.level*t.indent,opacity:.2,background:"transparent"},tree:t}):null}),$t=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function as(e,t){return!!(e===t||$t(e)&&$t(t))}function ls(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!as(e[r],t[r]))return!1;return!0}function ds(e,t){t===void 0&&(t=ls);var r,n=[],i,s=!1;function o(){var a=[...arguments];return s&&r===this&&t(a,n)||(i=e.apply(this,a),s=!0,r=this,n=a),i}return o}var Me=ds,Xt=typeof performance=="object"&&typeof performance.now=="function"?function(){return performance.now()}:function(){return Date.now()};function Jt(e){cancelAnimationFrame(e.id)}function cs(e,t){var r=Xt();function n(){Xt()-r>=t?e.call(null):i.id=requestAnimationFrame(n)}var i={id:requestAnimationFrame(n)};return i}var Ae=-1;function Qt(e){if(e===void 0&&(e=!1),Ae===-1||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",document.body.appendChild(t),Ae=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return Ae}var q=null;function Zt(e){if(e===void 0&&(e=!1),q===null||e){var t=document.createElement("div"),r=t.style;r.width="50px",r.height="50px",r.overflow="scroll",r.direction="rtl";var n=document.createElement("div"),i=n.style;return i.width="100px",i.height="100px",t.appendChild(n),document.body.appendChild(t),t.scrollLeft>0?q="positive-descending":(t.scrollLeft=1,q=t.scrollLeft===0?"negative":"positive-ascending"),document.body.removeChild(t),q}return q}var us=150,hs=function(e,t){return e};function fs(e){var t,r=e.getItemOffset,n=e.getEstimatedTotalSize,i=e.getItemSize,s=e.getOffsetForIndexAndAlignment,o=e.getStartIndexForOffset,a=e.getStopIndexForStartIndex,d=e.initInstanceProps,h=e.shouldResetStyleCacheOnItemSizeChange,p=e.validateProps;return t=(function(b){Tr(I,b);function I(c){var l=b.call(this,c)||this;return l._instanceProps=d(l.props,Ve(l)),l._outerRef=void 0,l._resetIsScrollingTimeoutId=null,l.state={instance:Ve(l),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof l.props.initialScrollOffset=="number"?l.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},l._callOnItemsRendered=void 0,l._callOnItemsRendered=Me(function(u,g,O,S){return l.props.onItemsRendered({overscanStartIndex:u,overscanStopIndex:g,visibleStartIndex:O,visibleStopIndex:S})}),l._callOnScroll=void 0,l._callOnScroll=Me(function(u,g,O){return l.props.onScroll({scrollDirection:u,scrollOffset:g,scrollUpdateWasRequested:O})}),l._getItemStyle=void 0,l._getItemStyle=function(u){var g=l.props,O=g.direction,S=g.itemSize,D=g.layout,T=l._getItemStyleCache(h&&S,h&&D,h&&O),x;if(T.hasOwnProperty(u))x=T[u];else{var C=r(l.props,u,l._instanceProps),L=i(l.props,u,l._instanceProps),F=O==="horizontal"||D==="horizontal",$=O==="rtl",X=F?C:0;T[u]=x={position:"absolute",left:$?void 0:X,right:$?X:void 0,top:F?0:C,height:F?"100%":L,width:F?L:"100%"}}return x},l._getItemStyleCache=void 0,l._getItemStyleCache=Me(function(u,g,O){return{}}),l._onScrollHorizontal=function(u){var g=u.currentTarget,O=g.clientWidth,S=g.scrollLeft,D=g.scrollWidth;l.setState(function(T){if(T.scrollOffset===S)return null;var x=l.props.direction,C=S;if(x==="rtl")switch(Zt()){case"negative":C=-S;break;case"positive-descending":C=D-O-S;break}return C=Math.max(0,Math.min(C,D-O)),{isScrolling:!0,scrollDirection:T.scrollOffset<C?"forward":"backward",scrollOffset:C,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._onScrollVertical=function(u){var g=u.currentTarget,O=g.clientHeight,S=g.scrollHeight,D=g.scrollTop;l.setState(function(T){if(T.scrollOffset===D)return null;var x=Math.max(0,Math.min(D,S-O));return{isScrolling:!0,scrollDirection:T.scrollOffset<x?"forward":"backward",scrollOffset:x,scrollUpdateWasRequested:!1}},l._resetIsScrollingDebounced)},l._outerRefSetter=function(u){var g=l.props.outerRef;l._outerRef=u,typeof g=="function"?g(u):typeof g=="object"&&g&&g.hasOwnProperty("current")&&(g.current=u)},l._resetIsScrollingDebounced=function(){l._resetIsScrollingTimeoutId!==null&&Jt(l._resetIsScrollingTimeoutId),l._resetIsScrollingTimeoutId=cs(l._resetIsScrolling,us)},l._resetIsScrolling=function(){l._resetIsScrollingTimeoutId=null,l.setState({isScrolling:!1},function(){l._getItemStyleCache(-1,null)})},l}I.getDerivedStateFromProps=function(c,l){return gs(c,l),p(c),null};var v=I.prototype;return v.scrollTo=function(c){c=Math.max(0,c),this.setState(function(l){return l.scrollOffset===c?null:{scrollDirection:l.scrollOffset<c?"forward":"backward",scrollOffset:c,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},v.scrollToItem=function(c,l){l===void 0&&(l="auto");var u=this.props,g=u.itemCount,O=u.layout,S=this.state.scrollOffset;c=Math.max(0,Math.min(c,g-1));var D=0;if(this._outerRef){var T=this._outerRef;D=O==="vertical"?T.scrollWidth>T.clientWidth?Qt():0:T.scrollHeight>T.clientHeight?Qt():0}this.scrollTo(s(this.props,c,l,S,this._instanceProps,D))},v.componentDidMount=function(){var c=this.props,l=c.direction,u=c.initialScrollOffset,g=c.layout;if(typeof u=="number"&&this._outerRef!=null){var O=this._outerRef;l==="horizontal"||g==="horizontal"?O.scrollLeft=u:O.scrollTop=u}this._callPropsCallbacks()},v.componentDidUpdate=function(){var c=this.props,l=c.direction,u=c.layout,g=this.state,O=g.scrollOffset;if(g.scrollUpdateWasRequested&&this._outerRef!=null){var S=this._outerRef;if(l==="horizontal"||u==="horizontal")if(l==="rtl")switch(Zt()){case"negative":S.scrollLeft=-O;break;case"positive-ascending":S.scrollLeft=O;break;default:var D=S.clientWidth;S.scrollLeft=S.scrollWidth-D-O;break}else S.scrollLeft=O;else S.scrollTop=O}this._callPropsCallbacks()},v.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Jt(this._resetIsScrollingTimeoutId)},v.render=function(){var c=this.props,l=c.children,u=c.className,g=c.direction,O=c.height,S=c.innerRef,D=c.innerElementType,T=c.innerTagName,x=c.itemCount,C=c.itemData,L=c.itemKey,F=L===void 0?hs:L,$=c.layout,X=c.outerElementType,hr=c.outerTagName,fr=c.style,gr=c.useIsScrolling,pr=c.width,Be=this.state.isScrolling,ce=g==="horizontal"||$==="horizontal",vr=ce?this._onScrollHorizontal:this._onScrollVertical,ze=this._getRangeToRender(),mr=ze[0],yr=ze[1],We=[];if(x>0)for(var K=mr;K<=yr;K++)We.push((0,f.createElement)(l,{data:C,key:F(K,C),index:K,isScrolling:gr?Be:void 0,style:this._getItemStyle(K)}));var Ge=n(this.props,this._instanceProps);return(0,f.createElement)(X||hr||"div",{className:u,onScroll:vr,ref:this._outerRefSetter,style:Dr({position:"relative",height:O,width:pr,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:g},fr)},(0,f.createElement)(D||T||"div",{children:We,ref:S,style:{height:ce?"100%":Ge,pointerEvents:Be?"none":void 0,width:ce?Ge:"100%"}}))},v._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"&&this.props.itemCount>0){var c=this._getRangeToRender(),l=c[0],u=c[1],g=c[2],O=c[3];this._callOnItemsRendered(l,u,g,O)}if(typeof this.props.onScroll=="function"){var S=this.state,D=S.scrollDirection,T=S.scrollOffset,x=S.scrollUpdateWasRequested;this._callOnScroll(D,T,x)}},v._getRangeToRender=function(){var c=this.props,l=c.itemCount,u=c.overscanCount,g=this.state,O=g.isScrolling,S=g.scrollDirection,D=g.scrollOffset;if(l===0)return[0,0,0,0];var T=o(this.props,D,this._instanceProps),x=a(this.props,T,D,this._instanceProps),C=!O||S==="backward"?Math.max(1,u):1,L=!O||S==="forward"?Math.max(1,u):1;return[Math.max(0,T-C),Math.max(0,Math.min(l-1,x+L)),T,x]},I})(f.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var gs=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},ps=fs({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,r,n,i,s){var o=e.direction,a=e.height,d=e.itemCount,h=e.itemSize,p=e.layout,b=e.width,I=o==="horizontal"||p==="horizontal"?b:a,v=Math.max(0,d*h-I),c=Math.min(v,t*h),l=Math.max(0,t*h-I+h+s);switch(r==="smart"&&(r=n>=l-I&&n<=c+I?"auto":"center"),r){case"start":return c;case"end":return l;case"center":var u=Math.round(l+(c-l)/2);return u<Math.ceil(I/2)?0:u>v+Math.floor(I/2)?v:u;default:return n>=l&&n<=c?n:n<l?l:c}},getStartIndexForOffset:function(e,t){var r=e.itemCount,n=e.itemSize;return Math.max(0,Math.min(r-1,Math.floor(t/n)))},getStopIndexForStartIndex:function(e,t,r){var n=e.direction,i=e.height,s=e.itemCount,o=e.itemSize,a=e.layout,d=e.width,h=n==="horizontal"||a==="horizontal",p=t*o,b=h?d:i,I=Math.ceil((b+r-p)/o);return Math.max(0,Math.min(s-1,t+I-1))},initInstanceProps:function(e){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(e){e.itemSize}});function vs(){let e=N(),t=Mi().cursor;if(!t||t.type!=="line")return null;let r=e.indent,n=e.rowHeight*t.index+(e.props.padding??e.props.paddingTop??0),i=r*t.level,s=e.renderCursor;return(0,m.jsx)(s,{top:n,left:i,indent:r})}var ms=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const ys=(0,f.forwardRef)(function(e,t){let{children:r}=e,n=ms(e,["children"]),i=N();return(0,m.jsxs)("div",Object.assign({ref:t},n,{onClick:s=>{s.currentTarget===s.target&&i.deselectAll()},children:[(0,m.jsx)(Os,{}),r]}))});var Os=()=>{let e=N();return(0,m.jsx)("div",{style:{height:e.visibleNodes.length*e.rowHeight,width:"100%",position:"absolute",left:"0",right:"0"},children:(0,m.jsx)(vs,{})})},Is=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]]);return r};const bs=(0,f.forwardRef)(function(e,t){var{style:r}=e,n=Is(e,["style"]);let i=N(),s=i.props.padding??i.props.paddingTop??0,o=i.props.padding??i.props.paddingBottom??0;return(0,m.jsx)("div",Object.assign({ref:t,style:Object.assign(Object.assign({},r),{height:`${parseFloat(r.height)+s+o}px`})},n))});function Ss(e){let t=N(),r=t.selectedIds,[n,i,s]=ci(()=>({canDrag:()=>e.isDraggable,type:"NODE",item:()=>{let o=t.isSelected(e.id)?Array.from(r):[e.id];return t.dispatch(W.dragStart(e.id,o)),{id:e.id,dragIds:o}},end:()=>{t.hideCursor(),t.dispatch(W.dragEnd())}}),[r,e]);return(0,f.useEffect)(()=>{s(ji())},[s]),i}function Ds(e,t){let r=e.getBoundingClientRect(),n=t.x-Math.round(r.x),i=t.y-Math.round(r.y),s=r.height,o=i<s/2,a=!o,d=s/4,h=i>d&&i<s-d;return{x:n,inTopHalf:o,inBottomHalf:a,inMiddle:h,atTop:!h&&o,atBottom:!h&&a}}function Ts(e,t,r,n){return e?e.isInternal?n.atTop?[t,e]:n.inMiddle?[e,e]:[e,r]:n.inTopHalf?[t,e]:[e,r]:[t,null]}function ae(e,t){return{parentId:e||null,index:t}}function G(e,t){return{type:"line",index:e,level:t}}function Es(e){return{type:"highlight",id:e}}function Le(e,t){var n;let r=e;for(;r.parent&&r.level>t;)r=r.parent;return{parentId:((n=r.parent)==null?void 0:n.id)||null,index:Lt(r)+1}}function er(e){var h;let t=Ds(e.element,e.offset),r=e.indent,n=Math.round(Math.max(0,t.x-r)/r),{node:i,nextNode:s,prevNode:o}=e,[a,d]=Ts(i,o,s,t);if(i&&i.isInternal&&t.inMiddle)return{drop:ae(i.id,null),cursor:Es(i.id)};if(!a)return{drop:ae((h=d==null?void 0:d.parent)==null?void 0:h.id,0),cursor:G(0,0)};if(jt(a)){let p=se(n,(d==null?void 0:d.level)||0,a.level);return{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}if(_t(a)){let p=se(n,(d==null?void 0:d.level)||0,a.level);return{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}if(Mt(a)){let p=se(n,0,a.level+1);return p>a.level?{drop:ae(a.id,0),cursor:G(a.rowIndex+1,p)}:{drop:Le(a,p),cursor:G(a.rowIndex+1,p)}}return{drop:ae(a==null?void 0:a.id,0),cursor:G(a.rowIndex+1,a.level+1)}}function ws(e,t){let r=N(),[n,i]=pt(()=>({accept:"NODE",canDrop:()=>r.canDrop(),hover:(s,o)=>{let a=o.getClientOffset();if(!e.current||!a)return;let{cursor:d,drop:h}=er({element:e.current,offset:a,indent:r.indent,node:t,prevNode:t.prev,nextNode:t.next});h&&r.dispatch(W.hovering(h.parentId,h.index)),o.canDrop()?d&&r.showCursor(d):r.hideCursor()},drop:(s,o)=>{if(!o.canDrop())return null;let{parentId:a,index:d,dragIds:h}=r.state.dnd;Bt(r.props.onMove,{dragIds:h,parentId:a==="__REACT_ARBORIST_INTERNAL_ROOT__"?null:a,index:d===null?0:d,dragNodes:r.dragNodes,parentNode:r.get(a)}),r.open(a)}}),[t,e.current,r.props]);return i}function xs(e){let t=N(),r=t.at(e);if(!r)throw Error(`Could not find node for index: ${e}`);return(0,f.useMemo)(()=>{let n=r.clone();return t.visibleNodes[e]=n,n},[...Object.values(r.state),r])}const Cs=f.memo(function({index:e,style:t}){Pt(),_i();let r=N(),n=xs(e),i=(0,f.useRef)(null),s=Ss(n),o=ws(i,n),a=(0,f.useCallback)(c=>{i.current=c,o(c)},[o]),d=r.indent*n.level,h=(0,f.useMemo)(()=>({paddingLeft:d}),[d]),p=(0,f.useMemo)(()=>Object.assign(Object.assign({},t),{top:parseFloat(t.top)+(r.props.padding??r.props.paddingTop??0)}),[t,r.props.padding,r.props.paddingTop]),b={role:"treeitem","aria-level":n.level+1,"aria-selected":n.isSelected,"aria-expanded":n.isOpen,style:p,tabIndex:-1,className:r.props.rowClassName};(0,f.useEffect)(()=>{var c;!n.isEditing&&n.isFocused&&((c=i.current)==null||c.focus({preventScroll:!0}))},[n.isEditing,n.isFocused,i.current]);let I=r.renderNode,v=r.renderRow;return(0,m.jsx)(v,{node:n,innerRef:a,attrs:b,children:(0,m.jsx)(I,{node:n,tree:r,style:h,dragHandle:s})})});var ke="",tr=null;function rr(){Pt();let e=N();return(0,m.jsx)("div",{role:"tree",style:{height:e.height,width:e.width,minHeight:0,minWidth:0},onContextMenu:e.props.onContextMenu,onClick:e.props.onClick,tabIndex:0,onFocus:t=>{t.currentTarget.contains(t.relatedTarget)||e.onFocus()},onBlur:t=>{t.currentTarget.contains(t.relatedTarget)||e.onBlur()},onKeyDown:t=>{var n;if(e.isEditing)return;if(t.key==="Backspace"){if(!e.props.onDelete)return;let i=Array.from(e.selectedIds);if(i.length>1){let s=e.mostRecentNode;for(;s&&s.isSelected;)s=s.nextSibling;s||(s=e.lastNode),e.focus(s,{scroll:!1}),e.delete(Array.from(i))}else{let s=e.focusedNode;if(s){let o=s.nextSibling,a=s.parent;e.focus(o||a,{scroll:!1}),e.delete(s)}}return}if(t.key==="Tab"&&!t.shiftKey){t.preventDefault(),kt(t.currentTarget);return}if(t.key==="Tab"&&t.shiftKey){t.preventDefault(),Ht(t.currentTarget);return}if(t.key==="ArrowDown"){t.preventDefault();let i=e.nextNode;if(t.metaKey){e.select(e.focusedNode),e.activate(e.focusedNode);return}else if(!t.shiftKey||e.props.disableMultiSelection){e.focus(i);return}else{if(!i)return;let s=e.focusedNode;s?s.isSelected?e.selectContiguous(i):e.selectMulti(i):e.focus(e.firstNode);return}}if(t.key==="ArrowUp"){t.preventDefault();let i=e.prevNode;if(!t.shiftKey||e.props.disableMultiSelection){e.focus(i);return}else{if(!i)return;let s=e.focusedNode;s?s.isSelected?e.selectContiguous(i):e.selectMulti(i):e.focus(e.lastNode);return}}if(t.key==="ArrowRight"){let i=e.focusedNode;if(!i)return;i.isInternal&&i.isOpen?e.focus(e.nextNode):i.isInternal&&e.open(i.id);return}if(t.key==="ArrowLeft"){let i=e.focusedNode;if(!i||i.isRoot)return;i.isInternal&&i.isOpen?e.close(i.id):(n=i.parent)!=null&&n.isRoot||e.focus(i.parent);return}if(t.key==="a"&&t.metaKey&&!e.props.disableMultiSelection){t.preventDefault(),e.selectAll();return}if(t.key==="a"&&!t.metaKey&&e.props.onCreate){e.createLeaf();return}if(t.key==="A"&&!t.metaKey){if(!e.props.onCreate)return;e.createInternal();return}if(t.key==="Home"){t.preventDefault(),e.focus(e.firstNode);return}if(t.key==="End"){t.preventDefault(),e.focus(e.lastNode);return}if(t.key==="Enter"){let i=e.focusedNode;if(!i||!i.isEditable||!e.props.onRename)return;setTimeout(()=>{i&&e.edit(i)});return}if(t.key===" "){t.preventDefault();let i=e.focusedNode;if(!i)return;i.isLeaf?(i.select(),i.activate()):i.toggle();return}if(t.key==="*"){let i=e.focusedNode;if(!i)return;e.openSiblings(i);return}if(t.key==="PageUp"){t.preventDefault(),e.pageUp();return}t.key==="PageDown"&&(t.preventDefault(),e.pageDown()),clearTimeout(tr),ke+=t.key,tr=setTimeout(()=>{ke=""},600);let r=e.visibleNodes.find(i=>{let s=i.data.name;return typeof s=="string"?s.toLowerCase().startsWith(ke):!1});r&&e.focus(r.id)},children:(0,m.jsx)(ps,{className:e.props.className,outerRef:e.listEl,itemCount:e.visibleNodes.length,height:e.height,width:e.width,itemSize:e.rowHeight,overscanCount:e.overscanCount,itemKey:t=>{var r;return((r=e.visibleNodes[t])==null?void 0:r.id)||t},outerElementType:ys,innerElementType:bs,onScroll:e.props.onScroll,onItemsRendered:e.onItemsRendered.bind(e),ref:e.list,children:Cs})})}function nr(e){return e.isFiltered?Rs(e.root,e.isMatch.bind(e)):Ns(e.root)}function Ns(e){let t=[];function r(n){var i;n.level>=0&&t.push(n),n.isOpen&&((i=n.children)==null||i.forEach(r))}return r(e),t.forEach(ir),t}function Rs(e,t){let r={},n=[];function i(o){if(!o.isRoot&&t(o)){r[o.id]=!0;let a=o.parent;for(;a;)r[a.id]=!0,a=a.parent}if(o.children)for(let a of o.children)i(a)}function s(o){var a;o.level>=0&&r[o.id]&&n.push(o),o.isOpen&&((a=o.children)==null||a.forEach(s))}return i(e),s(e),n.forEach(ir),n}function ir(e,t){e.rowIndex=t}const sr=e=>e.reduce((t,r,n)=>(t[r.id]=n,t),{});var He=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(p){try{h(n.next(p))}catch(b){o(b)}}function d(p){try{h(n.throw(p))}catch(b){o(b)}}function h(p){p.done?s(p.value):i(p.value).then(a,d)}h((n=n.apply(e,t||[])).next())})},{safeRun:E,identify:M,identifyNull:_}=Ai,Ps=class de{constructor(t,r,n,i){this.store=t,this.props=r,this.list=n,this.listEl=i,this.visibleStartIndex=0,this.visibleStopIndex=0,this.root=Vt(this),this.visibleNodes=nr(this),this.idToIndex=sr(this.visibleNodes)}update(t){this.props=t,this.root=Vt(this),this.visibleNodes=nr(this),this.idToIndex=sr(this.visibleNodes)}dispatch(t){return this.store.dispatch(t)}get state(){return this.store.getState()}get openState(){return this.state.nodes.open.unfiltered}get width(){return this.props.width??300}get height(){return this.props.height??500}get indent(){return this.props.indent??24}get rowHeight(){return this.props.rowHeight??24}get overscanCount(){return this.props.overscanCount??1}get searchTerm(){return(this.props.searchTerm||"").trim()}get matchFn(){let t=this.props.searchMatch??((r,n)=>JSON.stringify(Object.values(r.data)).toLocaleLowerCase().includes(n.toLocaleLowerCase()));return r=>t(r,this.searchTerm)}accessChildren(t){return Y(t,this.props.childrenAccessor||"children")??null}accessId(t){let r=Y(t,this.props.idAccessor||"id");if(!r)throw Error("Data must contain an 'id' property or props.idAccessor must return a string");return r}get firstNode(){return this.visibleNodes[0]??null}get lastNode(){return this.visibleNodes[this.visibleNodes.length-1]??null}get focusedNode(){return this.get(this.state.nodes.focus.id)??null}get mostRecentNode(){return this.get(this.state.nodes.selection.mostRecent)??null}get nextNode(){let t=this.indexOf(this.focusedNode);return t===null?null:this.at(t+1)}get prevNode(){let t=this.indexOf(this.focusedNode);return t===null?null:this.at(t-1)}get(t){return t&&t in this.idToIndex&&this.visibleNodes[this.idToIndex[t]]||null}at(t){return this.visibleNodes[t]||null}nodesBetween(t,r){if(t===null||r===null)return[];let n=this.indexOf(t)??0,i=this.indexOf(r);if(i===null)return[];let s=Math.min(n,i),o=Math.max(n,i);return this.visibleNodes.slice(s,o+1)}indexOf(t){let r=Ut(t);return r?this.idToIndex[r]:null}get editingId(){return this.state.nodes.edit.id}createInternal(){return this.create({type:"internal"})}createLeaf(){return this.create({type:"leaf"})}create(){return He(this,arguments,void 0,function*(t={}){let r=t.parentId===void 0?Gt(this):t.parentId,n=t.index??Wt(this),i=t.type??"leaf",s=yield E(this.props.onCreate,{type:i,parentId:r,index:n,parentNode:this.get(r)});s&&(this.focus(s),setTimeout(()=>{this.edit(s).then(()=>{this.select(s),this.activate(s)})}))})}delete(t){return He(this,void 0,void 0,function*(){if(!t)return;let r=(Array.isArray(t)?t:[t]).map(M),n=r.map(i=>this.get(i)).filter(i=>!!i);yield E(this.props.onDelete,{nodes:n,ids:r})})}edit(t){let r=M(t);return this.resolveEdit({cancelled:!0}),this.scrollTo(r),this.dispatch(Pe(r)),new Promise(n=>{de.editPromise=n})}submit(t,r){return He(this,void 0,void 0,function*(){if(!t)return;let n=M(t);yield E(this.props.onRename,{id:n,name:r,node:this.get(n)}),this.dispatch(Pe(null)),this.resolveEdit({cancelled:!1,value:r}),setTimeout(()=>this.onFocus())})}reset(){this.dispatch(Pe(null)),this.resolveEdit({cancelled:!0}),setTimeout(()=>this.onFocus())}activate(t){let r=this.get(_(t));r&&E(this.props.onActivate,r)}resolveEdit(t){let r=de.editPromise;r&&r(t),de.editPromise=null}get selectedIds(){return this.state.nodes.selection.ids}get selectedNodes(){let t=[];for(let r of Array.from(this.selectedIds)){let n=this.get(r);n&&t.push(n)}return t}focus(t,r={}){t&&(this.props.selectionFollowsFocus?this.select(t):(this.dispatch(B(M(t))),r.scroll!==!1&&this.scrollTo(t),this.focusedNode&&E(this.props.onFocus,this.focusedNode)))}pageUp(){var i;let t=this.visibleStartIndex,r=this.visibleStopIndex-t,n=((i=this.focusedNode)==null?void 0:i.rowIndex)??0;n=n>t?t:Math.max(t-r,0),this.focus(this.at(n))}pageDown(){var s;let t=this.visibleStartIndex,r=this.visibleStopIndex,n=r-t,i=((s=this.focusedNode)==null?void 0:s.rowIndex)??0;i=i<r?r:Math.min(i+n,this.visibleNodes.length-1),this.focus(this.at(i))}select(t,r={}){if(!t)return;let n=r.focus!==!1,i=M(t);n&&this.dispatch(B(i)),this.dispatch(j.only(i)),this.dispatch(j.anchor(i)),this.dispatch(j.mostRecent(i)),this.scrollTo(i,r.align),this.focusedNode&&n&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}deselect(t){if(!t)return;let r=M(t);this.dispatch(j.remove(r)),E(this.props.onSelect,this.selectedNodes)}selectMulti(t){let r=this.get(_(t));r&&(this.dispatch(B(r.id)),this.dispatch(j.add(r.id)),this.dispatch(j.anchor(r.id)),this.dispatch(j.mostRecent(r.id)),this.scrollTo(r),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes))}selectContiguous(t){if(!t)return;let r=M(t),{anchor:n,mostRecent:i}=this.state.nodes.selection;this.dispatch(B(r)),this.dispatch(j.remove(this.nodesBetween(n,i))),this.dispatch(j.add(this.nodesBetween(n,_(r)))),this.dispatch(j.mostRecent(r)),this.scrollTo(r),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}deselectAll(){this.setSelection({ids:[],anchor:null,mostRecent:null}),E(this.props.onSelect,this.selectedNodes)}selectAll(){var t;this.setSelection({ids:Object.keys(this.idToIndex),anchor:this.firstNode,mostRecent:this.lastNode}),this.dispatch(B((t=this.lastNode)==null?void 0:t.id)),this.focusedNode&&E(this.props.onFocus,this.focusedNode),E(this.props.onSelect,this.selectedNodes)}setSelection(t){var s;let r=new Set((s=t.ids)==null?void 0:s.map(M)),n=_(t.anchor),i=_(t.mostRecent);this.dispatch(j.set({ids:r,anchor:n,mostRecent:i})),E(this.props.onSelect,this.selectedNodes)}get cursorParentId(){let{cursor:t}=this.state.dnd;return t.type==="highlight"?t.id:null}get cursorOverFolder(){return this.state.dnd.cursor.type==="highlight"}get dragNodes(){return this.state.dnd.dragIds.map(t=>this.get(t)).filter(t=>!!t)}get dragNode(){return this.get(this.state.nodes.drag.id)}get dragDestinationParent(){return this.get(this.state.nodes.drag.destinationParentId)}get dragDestinationIndex(){return this.state.nodes.drag.destinationIndex}canDrop(){if(this.isFiltered)return!1;let t=this.get(this.state.dnd.parentId)??this.root,r=this.dragNodes,n=this.props.disableDrop;for(let i of r)if(!i||!t||i.isInternal&&At(t,i))return!1;return typeof n=="function"?!n({parentNode:t,dragNodes:this.dragNodes,index:this.state.dnd.index||0}):typeof n=="string"?!t.data[n]:typeof n=="boolean"?!n:!0}hideCursor(){this.dispatch(W.cursor({type:"none"}))}showCursor(t){this.dispatch(W.cursor(t))}open(t){let r=_(t);r&&(this.isOpen(r)||(this.dispatch(_e.open(r,this.isFiltered)),E(this.props.onToggle,r)))}close(t){let r=_(t);r&&this.isOpen(r)&&(this.dispatch(_e.close(r,this.isFiltered)),E(this.props.onToggle,r))}toggle(t){let r=_(t);if(r)return this.isOpen(r)?this.close(r):this.open(r)}openParents(t){var i;let r=_(t);if(!r)return;let n=(i=Re(this.root,r))==null?void 0:i.parent;for(;n;)this.open(n.id),n=n.parent}openSiblings(t){let r=t.parent;if(!r)this.toggle(t.id);else if(r.children){let n=t.isOpen;for(let i of r.children)i.isInternal&&(n?this.close(i.id):this.open(i.id));this.scrollTo(this.focusedNode)}}openAll(){oe(this.root,t=>{t.isInternal&&t.open()})}closeAll(){oe(this.root,t=>{t.isInternal&&t.close()})}scrollTo(t,r="smart"){if(!t)return;let n=M(t);return this.openParents(n),zt(()=>n in this.idToIndex).then(()=>{var i;let s=this.idToIndex[n];s!==void 0&&((i=this.list.current)==null||i.scrollToItem(s,r))}).catch(()=>{})}get isEditing(){return this.state.nodes.edit.id!==null}get isFiltered(){var t;return!!((t=this.props.searchTerm)!=null&&t.trim())}get hasFocus(){return this.state.nodes.focus.treeFocused}get hasNoSelection(){return this.state.nodes.selection.ids.size===0}get hasOneSelection(){return this.state.nodes.selection.ids.size===1}get hasMultipleSelections(){return this.state.nodes.selection.ids.size>1}isSelected(t){return t?this.state.nodes.selection.ids.has(t):!1}isOpen(t){if(!t)return!1;if(t==="__REACT_ARBORIST_INTERNAL_ROOT__")return!0;let r=this.props.openByDefault??!0;return this.isFiltered?this.state.nodes.open.filtered[t]??!0:this.state.nodes.open.unfiltered[t]??r}isEditable(t){return!Y(t,this.props.disableEdit||(()=>!1))}isDraggable(t){return!Y(t,this.props.disableDrag||(()=>!1))}isDragging(t){let r=_(t);return r?this.state.nodes.drag.id===r:!1}isFocused(t){return this.hasFocus&&this.state.nodes.focus.id===t}isMatch(t){return this.matchFn(t)}willReceiveDrop(t){let r=_(t);if(!r)return!1;let{destinationParentId:n,destinationIndex:i}=this.state.nodes.drag;return r===n&&i===null}onFocus(){let t=this.focusedNode||this.firstNode;t&&this.dispatch(B(t.id))}onBlur(){this.dispatch($i())}onItemsRendered(t){this.visibleStartIndex=t.visibleStartIndex,this.visibleStopIndex=t.visibleStopIndex}get renderContainer(){return this.props.renderContainer||rr}get renderRow(){return this.props.renderRow||Gi}get renderNode(){return this.props.children||Ki}get renderDragPreview(){return this.props.renderDragPreview||qt}get renderCursor(){return this.props.renderCursor||Wi}};function w(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var or=typeof Symbol=="function"&&Symbol.observable||"@@observable",Fe=()=>Math.random().toString(36).substring(7).split("").join("."),le={INIT:`@@redux/INIT${Fe()}`,REPLACE:`@@redux/REPLACE${Fe()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Fe()}`};function js(e){if(typeof e!="object"||!e)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function ar(e,t,r){if(typeof e!="function")throw Error(w(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw Error(w(0));if(typeof t=="function"&&r===void 0&&(r=t,t=void 0),r!==void 0){if(typeof r!="function")throw Error(w(1));return r(ar)(e,t)}let n=e,i=t,s=new Map,o=s,a=0,d=!1;function h(){o===s&&(o=new Map,s.forEach((l,u)=>{o.set(u,l)}))}function p(){if(d)throw Error(w(3));return i}function b(l){if(typeof l!="function")throw Error(w(4));if(d)throw Error(w(5));let u=!0;h();let g=a++;return o.set(g,l),function(){if(u){if(d)throw Error(w(6));u=!1,h(),o.delete(g),s=null}}}function I(l){if(!js(l))throw Error(w(7));if(l.type===void 0)throw Error(w(8));if(typeof l.type!="string")throw Error(w(17));if(d)throw Error(w(9));try{d=!0,i=n(i,l)}finally{d=!1}return(s=o).forEach(u=>{u()}),l}function v(l){if(typeof l!="function")throw Error(w(10));n=l,I({type:le.REPLACE})}function c(){let l=b;return{subscribe(u){if(typeof u!="object"||!u)throw Error(w(11));function g(){let O=u;O.next&&O.next(p())}return g(),{unsubscribe:l(g)}},[or](){return this}}}return I({type:le.INIT}),{dispatch:I,subscribe:b,getState:p,replaceReducer:v,[or]:c}}function _s(e){Object.keys(e).forEach(t=>{let r=e[t];if(r(void 0,{type:le.INIT})===void 0)throw Error(w(12));if(r(void 0,{type:le.PROBE_UNKNOWN_ACTION()})===void 0)throw Error(w(13))})}function lr(e){let t=Object.keys(e),r={};for(let s=0;s<t.length;s++){let o=t[s];typeof e[o]=="function"&&(r[o]=e[o])}let n=Object.keys(r),i;try{_s(r)}catch(s){i=s}return function(s={},o){if(i)throw i;let a=!1,d={};for(let h=0;h<n.length;h++){let p=n[h],b=r[p],I=s[p],v=b(I,o);if(v===void 0)throw o&&o.type,Error(w(14));d[p]=v,a||(a=v!==I)}return a||(a=n.length!==Object.keys(s).length),a?d:s}}function Ms(e=z().nodes.drag,t){switch(t.type){case"DND_DRAG_START":return Object.assign(Object.assign({},e),{id:t.id,selectedIds:t.dragIds});case"DND_DRAG_END":return Object.assign(Object.assign({},e),{id:null,destinationParentId:null,destinationIndex:null,selectedIds:[]});case"DND_HOVERING":return t.parentId!==e.destinationParentId||t.index!=e.destinationIndex?Object.assign(Object.assign({},e),{destinationParentId:t.parentId,destinationIndex:t.index}):e;default:return e}}const As=lr({nodes:lr({focus:Xi,edit:qi,open:Ji,selection:Qi,drag:Ms}),dnd:Zi});var Ls=Sr(),ks=z();function Hs({treeProps:e,imperativeHandle:t,children:r}){let n=(0,f.useRef)(null),i=(0,f.useRef)(null),s=(0,f.useRef)(ar(As,z(e))),o=(0,Ls.useSyncExternalStore)(s.current.subscribe,s.current.getState,()=>ks),a=(0,f.useMemo)(()=>new Ps(s.current,e,n,i),[]),d=(0,f.useRef)(0);return(0,f.useMemo)(()=>{d.current+=1,a.update(e)},[...Object.values(e),o.nodes.open]),(0,f.useImperativeHandle)(t,()=>a),(0,f.useEffect)(()=>{a.props.selection?a.select(a.props.selection,{focus:!1}):a.deselectAll()},[a.props.selection]),(0,f.useEffect)(()=>{a.props.searchTerm||s.current.dispatch(_e.clear(!0))},[a.props.searchTerm]),(0,m.jsx)(xt.Provider,{value:a,children:(0,m.jsx)(Rt.Provider,{value:d.current,children:(0,m.jsx)(Ct.Provider,{value:o.nodes,children:(0,m.jsx)(Nt.Provider,{value:o.dnd,children:(0,m.jsx)(lt,Object.assign({backend:wt,options:{rootElement:a.props.dndRootElement||void 0}},e.dndManager&&{manager:e.dndManager},{children:r}))})})})})}function Fs(){let e=N(),[,t]=pt(()=>({accept:"NODE",canDrop:(r,n)=>n.isOver({shallow:!0})?e.canDrop():!1,hover:(r,n)=>{if(!n.isOver({shallow:!0}))return;let i=n.getClientOffset();if(!e.listEl.current||!i)return;let{cursor:s,drop:o}=er({element:e.listEl.current,offset:i,indent:e.indent,node:null,prevNode:e.visibleNodes[e.visibleNodes.length-1],nextNode:null});o&&e.dispatch(W.hovering(o.parentId,o.index)),n.canDrop()?s&&e.showCursor(s):e.hideCursor()}}),[e]);t(e.listEl)}function Us(e){return Fs(),e.children}function Bs(){return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(N().props.renderContainer||rr,{})})}function zs(){let e=N(),{offset:t,mouse:r,item:n,isDragging:i}=ui(s=>({offset:s.getSourceClientOffset(),mouse:s.getClientOffset(),item:s.getItem(),isDragging:s.isDragging()}));return(0,m.jsx)(e.props.renderDragPreview||qt,{offset:t,mouse:r,id:(n==null?void 0:n.id)||null,dragIds:(n==null?void 0:n.dragIds)||[],isDragging:i})}var dr=class{constructor(e){this.root=Ws(e)}get data(){var e;return((e=this.root.children)==null?void 0:e.map(t=>t.data))??[]}create(e){let t=e.parentId?this.find(e.parentId):this.root;if(!t)return null;t.addChild(e.data,e.index)}move(e){let t=this.find(e.id),r=e.parentId?this.find(e.parentId):this.root;!t||!r||(r.addChild(t.data,e.index),t.drop())}update(e){let t=this.find(e.id);t&&t.update(e.changes)}drop(e){let t=this.find(e.id);t&&t.drop()}find(e,t=this.root){if(!t)return null;if(t.id===e)return t;if(t.children){for(let r of t.children){let n=this.find(e,r);if(n)return n}return null}return null}};function Ws(e){let t=new cr({id:"ROOT"},null);return t.children=e.map(r=>Ue(r,t)),t}function Ue(e,t){let r=new cr(e,t);return e.children&&(r.children=e.children.map(n=>Ue(n,r))),r}var cr=class{constructor(e,t){this.data=e,this.parent=t,this.id=e.id}hasParent(){return!!this.parent}get childIndex(){return this.hasParent()?this.parent.children.indexOf(this):-1}addChild(e,t){let r=Ue(e,this);this.children=this.children??[],this.children.splice(t,0,r),this.data.children=this.data.children??[],this.data.children.splice(t,0,e)}removeChild(e){var t,r;(t=this.children)==null||t.splice(e,1),(r=this.data.children)==null||r.splice(e,1)}update(e){if(this.hasParent()){let t=this.childIndex;this.parent.addChild(Object.assign(Object.assign({},this.data),e),t),this.drop()}}drop(){this.hasParent()&&this.parent.removeChild(this.childIndex)}},Gs=0;function Ks(e){let[t,r]=(0,f.useState)(e),n=(0,f.useMemo)(()=>new dr(t),[t]);return[t,{onMove:i=>{for(let s of i.dragIds)n.move({id:s,parentId:i.parentId,index:i.index});r(n.data)},onRename:({name:i,id:s})=>{n.update({id:s,changes:{name:i}}),r(n.data)},onCreate:({parentId:i,index:s,type:o})=>{let a={id:`simple-tree-id-${Gs++}`,name:""};return o==="internal"&&(a.children=[]),n.create({parentId:i,index:s,data:a}),r(n.data),a},onDelete:i=>{i.ids.forEach(s=>n.drop({id:s})),r(n.data)}}]}function Vs(e){if(e.initialData&&e.data)throw Error("React Arborist Tree => Provide either a data or initialData prop, but not both.");if(e.initialData&&(e.onCreate||e.onDelete||e.onMove||e.onRename))throw Error(`React Arborist Tree => You passed the initialData prop along with a data handler.
3
+ Use the data prop if you want to provide your own handlers.`);if(e.initialData){let[t,r]=Ks(e.initialData);return Object.assign(Object.assign(Object.assign({},e),r),{data:t})}else return e}function Ys(e,t){return(0,m.jsxs)(Hs,{treeProps:Vs(e),imperativeHandle:t,children:[(0,m.jsx)(Us,{children:(0,m.jsx)(Bs,{})}),(0,m.jsx)(zs,{})]})}const qs=(0,f.forwardRef)(Ys);export{lt as a,A as i,dr as n,wt as r,qs as t};
@@ -1 +1 @@
1
- import{u as l}from"./useEvent-O0nX5vok.js";import{E as s}from"./cells-DqKJsMUm.js";import{t as i}from"./compiler-runtime-B3qBwwSJ.js";import{o as n}from"./utils-tNbLd14P.js";import{n as f}from"./html-to-image-CoMmxXBd.js";import{o as c}from"./focus-B85PAbhR.js";var p=i();function u(){let o=(0,p.c)(4),a=l(n),r=c(),{createNewCell:t}=s(),e;return o[0]!==a||o[1]!==t||o[2]!==r?(e=m=>{m.includes("alt")&&f({autoInstantiate:a,createNewCell:t,fromCellId:r}),t({code:m,before:!1,cellId:r??"__end__"})},o[0]=a,o[1]=t,o[2]=r,o[3]=e):e=o[3],e}export{u as t};
1
+ import{u as l}from"./useEvent-O0nX5vok.js";import{E as s}from"./cells-39RE4UzS.js";import{t as i}from"./compiler-runtime-B3qBwwSJ.js";import{o as n}from"./utils-tNbLd14P.js";import{n as f}from"./html-to-image-DTFXm6_Z.js";import{o as c}from"./focus-DlJH7sfh.js";var p=i();function u(){let o=(0,p.c)(4),a=l(n),r=c(),{createNewCell:t}=s(),e;return o[0]!==a||o[1]!==t||o[2]!==r?(e=m=>{m.includes("alt")&&f({autoInstantiate:a,createNewCell:t,fromCellId:r}),t({code:m,before:!1,cellId:r??"__end__"})},o[0]=a,o[1]=t,o[2]=r,o[3]=e):e=o[3],e}export{u as t};
@@ -1 +1 @@
1
- import{s as k}from"./chunk-LvLJmgfZ.js";import{t as M}from"./react-Bj1aDYRI.js";import{t as A}from"./compiler-runtime-B3qBwwSJ.js";import{ot as F}from"./ai-model-dropdown-DgMZ5T_L.js";import{m as p,u as x}from"./useEventListener-Dy81QR4n.js";import{r as R}from"./constants-Rz_lD4HK.js";import{S as H}from"./config-3Aq84phF.js";import{t as I}from"./createLucideIcon-Cm-Z7dYr.js";import{F as y,I as K,L as P,j as T}from"./usePress-BHGkpw8X.js";var D=I("case-sensitive",[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]]),O=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,b=new WeakMap,c=[];function W(t,e){let s=P(t==null?void 0:t[0]),d=e instanceof s.Element?{root:e}:e,f=(d==null?void 0:d.root)??document.body,v=(d==null?void 0:d.shouldUseInert)&&O,l=new Set(t),u=new Set,w=n=>v&&n instanceof s.HTMLElement?n.inert:n.getAttribute("aria-hidden")==="true",a=(n,o)=>{v&&n instanceof s.HTMLElement?n.inert=o:o?n.setAttribute("aria-hidden","true"):(n.removeAttribute("aria-hidden"),n instanceof s.HTMLElement&&(n.inert=!1))},m=new Set;if(y())for(let n of t){let o=n;for(;o&&o!==f;){let i=o.getRootNode();"shadowRoot"in i&&m.add(i.shadowRoot),o=i.parentNode}}let S=n=>{for(let r of n.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(r);let o=r=>{if(u.has(r)||l.has(r)||r.parentElement&&u.has(r.parentElement)&&r.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let C of l)if(T(r,C))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},i=F(K(n),n,NodeFilter.SHOW_ELEMENT,{acceptNode:o}),h=o(n);if(h===NodeFilter.FILTER_ACCEPT&&N(n),h!==NodeFilter.FILTER_REJECT){let r=i.nextNode();for(;r!=null;)N(r),r=i.nextNode()}},N=n=>{let o=b.get(n)??0;w(n)&&o===0||(o===0&&a(n,!0),u.add(n),b.set(n,o+1))};c.length&&c[c.length-1].disconnect(),S(f);let E=new MutationObserver(n=>{for(let o of n)if(o.type==="childList"){if(o.target.isConnected&&![...l,...u].some(i=>T(i,o.target)))for(let i of o.addedNodes)(i instanceof HTMLElement||i instanceof SVGElement)&&(i.dataset.liveAnnouncer==="true"||i.dataset.reactAriaTopLayer==="true")?l.add(i):i instanceof Element&&S(i);if(y()){for(let i of m)if(!i.isConnected){E.disconnect();break}}}});E.observe(f,{childList:!0,subtree:!0});let _=new Set;if(y())for(let n of m){let o=new MutationObserver(i=>{for(let h of i)if(h.type==="childList"){if(h.target.isConnected&&![...l,...u].some(r=>T(r,h.target)))for(let r of h.addedNodes)(r instanceof HTMLElement||r instanceof SVGElement)&&(r.dataset.liveAnnouncer==="true"||r.dataset.reactAriaTopLayer==="true")?l.add(r):r instanceof Element&&S(r);if(y()){for(let r of m)if(!r.isConnected){E.disconnect();break}}}});o.observe(n,{childList:!0,subtree:!0}),_.add(o)}let L={visibleNodes:l,hiddenNodes:u,observe(){E.observe(f,{childList:!0,subtree:!0})},disconnect(){E.disconnect()}};return c.push(L),()=>{if(E.disconnect(),y())for(let n of _)n.disconnect();for(let n of u){let o=b.get(n);o!=null&&(o===1?(a(n,!1),b.delete(n)):b.set(n,o-1))}L===c[c.length-1]?(c.pop(),c.length&&c[c.length-1].observe()):c.splice(c.indexOf(L),1)}}function q(t){let e=c[c.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const z=typeof window<"u"&&window.parent!==window;function V(){new URLSearchParams(window.location.search).has(R.vscode)&&(!z||H()||(p.log("[vscode] Registering VS Code bindings"),J(),G(),U(),j()))}function G(){window.addEventListener("copy",()=>{var t;g({command:"copy",text:((t=window.getSelection())==null?void 0:t.toString())??""})}),window.addEventListener("cut",()=>{var e;let t=((e=window.getSelection())==null?void 0:e.toString())??"";x()&&document.execCommand("insertText",!1,""),g({command:"cut",text:t})}),window.addEventListener("message",async t=>{try{let e=t.data,s=x();switch(e.command){case"paste":if(p.log(`[vscode] Received paste mac=${s}`,e),s){let d=document.activeElement;if(!d){p.warn("[vscode] No active element to paste into"),document.execCommand("insertText",!1,e.text);return}let f=new DataTransfer;f.setData("text/plain",e.text),d.dispatchEvent(new ClipboardEvent("paste",{clipboardData:f}))}else p.log("[vscode] Not pasting on mac");return}}catch(e){p.error("Error in paste message handler",e)}})}function J(){document.addEventListener("keydown",t=>{var e,s;if((t.ctrlKey||t.metaKey)&&t.key==="c"){let d=((e=window.getSelection())==null?void 0:e.toString())??"";p.log("[vscode] Sending copy",d),g({command:"copy",text:d});return}if((t.ctrlKey||t.metaKey)&&t.key==="x"){let d=((s=window.getSelection())==null?void 0:s.toString())??"";x()&&document.execCommand("insertText",!1,""),p.log("[vscode] Sending cut",d),g({command:"cut",text:d});return}if((t.ctrlKey||t.metaKey)&&t.key==="v"){p.log("[vscode] Sending paste"),g({command:"paste"});return}})}function U(){document.addEventListener("click",t=>{let e=t.target;if(e.tagName!=="A")return;let s=e.getAttribute("href");s&&(s.startsWith("http://")||s.startsWith("https://"))&&(t.preventDefault(),g({command:"external_link",url:s}))})}function j(){document.addEventListener("contextmenu",t=>{t.preventDefault(),g({command:"context_menu"})})}function g(t){var e;(e=window.parent)==null||e.postMessage(t,"*")}var $=A(),B=k(M(),1);function Q(t){let e=(0,$.c)(6),[s,d]=(0,B.useState)(t),f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=a=>{var m;(m=a==null?void 0:a.stopPropagation)==null||m.call(a),d(!0)},e[0]=f):f=e[0];let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=a=>{var m;(m=a==null?void 0:a.stopPropagation)==null||m.call(a),d(!1)},e[1]=v):v=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=a=>{var m;(m=a==null?void 0:a.stopPropagation)==null||m.call(a),d(X)},e[2]=l):l=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={setTrue:f,setFalse:v,toggle:l},e[3]=u):u=e[3];let w;return e[4]===s?w=e[5]:(w=[s,u],e[4]=s,e[5]=w),w}function X(t){return!t}export{W as a,q as i,V as n,D as o,g as r,Q as t};
1
+ import{s as k}from"./chunk-LvLJmgfZ.js";import{t as M}from"./react-Bj1aDYRI.js";import{t as A}from"./compiler-runtime-B3qBwwSJ.js";import{ot as F}from"./ai-model-dropdown-CiJpv5wN.js";import{m as p,u as x}from"./useEventListener-Dy81QR4n.js";import{r as R}from"./constants-Rz_lD4HK.js";import{S as H}from"./config-DqxNMQDN.js";import{t as I}from"./createLucideIcon-Cm-Z7dYr.js";import{F as y,I as K,L as P,j as T}from"./usePress-alQ5Crny.js";var D=I("case-sensitive",[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]]),O=typeof HTMLElement<"u"&&"inert"in HTMLElement.prototype,b=new WeakMap,c=[];function W(t,e){let s=P(t==null?void 0:t[0]),d=e instanceof s.Element?{root:e}:e,f=(d==null?void 0:d.root)??document.body,v=(d==null?void 0:d.shouldUseInert)&&O,l=new Set(t),u=new Set,w=n=>v&&n instanceof s.HTMLElement?n.inert:n.getAttribute("aria-hidden")==="true",a=(n,o)=>{v&&n instanceof s.HTMLElement?n.inert=o:o?n.setAttribute("aria-hidden","true"):(n.removeAttribute("aria-hidden"),n instanceof s.HTMLElement&&(n.inert=!1))},m=new Set;if(y())for(let n of t){let o=n;for(;o&&o!==f;){let i=o.getRootNode();"shadowRoot"in i&&m.add(i.shadowRoot),o=i.parentNode}}let S=n=>{for(let r of n.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(r);let o=r=>{if(u.has(r)||l.has(r)||r.parentElement&&u.has(r.parentElement)&&r.parentElement.getAttribute("role")!=="row")return NodeFilter.FILTER_REJECT;for(let C of l)if(T(r,C))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},i=F(K(n),n,NodeFilter.SHOW_ELEMENT,{acceptNode:o}),h=o(n);if(h===NodeFilter.FILTER_ACCEPT&&N(n),h!==NodeFilter.FILTER_REJECT){let r=i.nextNode();for(;r!=null;)N(r),r=i.nextNode()}},N=n=>{let o=b.get(n)??0;w(n)&&o===0||(o===0&&a(n,!0),u.add(n),b.set(n,o+1))};c.length&&c[c.length-1].disconnect(),S(f);let E=new MutationObserver(n=>{for(let o of n)if(o.type==="childList"){if(o.target.isConnected&&![...l,...u].some(i=>T(i,o.target)))for(let i of o.addedNodes)(i instanceof HTMLElement||i instanceof SVGElement)&&(i.dataset.liveAnnouncer==="true"||i.dataset.reactAriaTopLayer==="true")?l.add(i):i instanceof Element&&S(i);if(y()){for(let i of m)if(!i.isConnected){E.disconnect();break}}}});E.observe(f,{childList:!0,subtree:!0});let _=new Set;if(y())for(let n of m){let o=new MutationObserver(i=>{for(let h of i)if(h.type==="childList"){if(h.target.isConnected&&![...l,...u].some(r=>T(r,h.target)))for(let r of h.addedNodes)(r instanceof HTMLElement||r instanceof SVGElement)&&(r.dataset.liveAnnouncer==="true"||r.dataset.reactAriaTopLayer==="true")?l.add(r):r instanceof Element&&S(r);if(y()){for(let r of m)if(!r.isConnected){E.disconnect();break}}}});o.observe(n,{childList:!0,subtree:!0}),_.add(o)}let L={visibleNodes:l,hiddenNodes:u,observe(){E.observe(f,{childList:!0,subtree:!0})},disconnect(){E.disconnect()}};return c.push(L),()=>{if(E.disconnect(),y())for(let n of _)n.disconnect();for(let n of u){let o=b.get(n);o!=null&&(o===1?(a(n,!1),b.delete(n)):b.set(n,o-1))}L===c[c.length-1]?(c.pop(),c.length&&c[c.length-1].observe()):c.splice(c.indexOf(L),1)}}function q(t){let e=c[c.length-1];if(e&&!e.visibleNodes.has(t))return e.visibleNodes.add(t),()=>{e.visibleNodes.delete(t)}}const z=typeof window<"u"&&window.parent!==window;function V(){new URLSearchParams(window.location.search).has(R.vscode)&&(!z||H()||(p.log("[vscode] Registering VS Code bindings"),J(),G(),U(),j()))}function G(){window.addEventListener("copy",()=>{var t;g({command:"copy",text:((t=window.getSelection())==null?void 0:t.toString())??""})}),window.addEventListener("cut",()=>{var e;let t=((e=window.getSelection())==null?void 0:e.toString())??"";x()&&document.execCommand("insertText",!1,""),g({command:"cut",text:t})}),window.addEventListener("message",async t=>{try{let e=t.data,s=x();switch(e.command){case"paste":if(p.log(`[vscode] Received paste mac=${s}`,e),s){let d=document.activeElement;if(!d){p.warn("[vscode] No active element to paste into"),document.execCommand("insertText",!1,e.text);return}let f=new DataTransfer;f.setData("text/plain",e.text),d.dispatchEvent(new ClipboardEvent("paste",{clipboardData:f}))}else p.log("[vscode] Not pasting on mac");return}}catch(e){p.error("Error in paste message handler",e)}})}function J(){document.addEventListener("keydown",t=>{var e,s;if((t.ctrlKey||t.metaKey)&&t.key==="c"){let d=((e=window.getSelection())==null?void 0:e.toString())??"";p.log("[vscode] Sending copy",d),g({command:"copy",text:d});return}if((t.ctrlKey||t.metaKey)&&t.key==="x"){let d=((s=window.getSelection())==null?void 0:s.toString())??"";x()&&document.execCommand("insertText",!1,""),p.log("[vscode] Sending cut",d),g({command:"cut",text:d});return}if((t.ctrlKey||t.metaKey)&&t.key==="v"){p.log("[vscode] Sending paste"),g({command:"paste"});return}})}function U(){document.addEventListener("click",t=>{let e=t.target;if(e.tagName!=="A")return;let s=e.getAttribute("href");s&&(s.startsWith("http://")||s.startsWith("https://"))&&(t.preventDefault(),g({command:"external_link",url:s}))})}function j(){document.addEventListener("contextmenu",t=>{t.preventDefault(),g({command:"context_menu"})})}function g(t){var e;(e=window.parent)==null||e.postMessage(t,"*")}var $=A(),B=k(M(),1);function Q(t){let e=(0,$.c)(6),[s,d]=(0,B.useState)(t),f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=a=>{var m;(m=a==null?void 0:a.stopPropagation)==null||m.call(a),d(!0)},e[0]=f):f=e[0];let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=a=>{var m;(m=a==null?void 0:a.stopPropagation)==null||m.call(a),d(!1)},e[1]=v):v=e[1];let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=a=>{var m;(m=a==null?void 0:a.stopPropagation)==null||m.call(a),d(X)},e[2]=l):l=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u={setTrue:f,setFalse:v,toggle:l},e[3]=u):u=e[3];let w;return e[4]===s?w=e[5]:(w=[s,u],e[4]=s,e[5]=w),w}function X(t){return!t}export{W as a,q as i,V as n,D as o,g as r,Q as t};
@@ -1 +1 @@
1
- import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as b}from"./useEvent-O0nX5vok.js";import{E as ne,Mn as de,Qn as se,Tn as re,Xn as ce,Zn as he,er as me,mt as Q,pi as pe,v as ke,wn as fe}from"./cells-DqKJsMUm.js";import{t as ue}from"./compiler-runtime-B3qBwwSJ.js";import{a as ye,o as be,r as xe}from"./utils-tNbLd14P.js";import{t as je}from"./jsx-runtime-icT_Ltz2.js";import{r as ve}from"./requests-Bgjtqo_1.js";import{t as f}from"./createLucideIcon-Cm-Z7dYr.js";import{n as F,r as V}from"./x-BI1M8X_v.js";import{a as we,h as Ce}from"./download-DtyAt8iO.js";import{t as ge}from"./chevron-right-D0GQBpTb.js";import{t as G}from"./circle-plus-CGG-gArM.js";import{t as Ie}from"./code-xml-DwHPF_nL.js";import{t as ze}from"./eye-off-vwi9L975.js";import{t as We}from"./image-DXfkah9d.js";import{t as Me}from"./link-Cf10mh3t.js";import{t as _e}from"./play-DKSqmedg.js";import{a as Se,n as Ae}from"./state-CJ2HIW-e.js";import{t as Te}from"./trash-2-CAoNMkjq.js";import{t as De}from"./use-toast-Hc8CXlvz.js";import{r as Ee}from"./mode-Bn_XF6AW.js";import{a as Ne,c as Re,n as Be}from"./dialog-CVN1lcMF.js";import{n as He}from"./ImperativeModal-qEtcJ95s.js";import{n as Le}from"./copy-CA4fP28I.js";import{i as Pe}from"./useRunCells-D5wCIJdU.js";import{r as K}from"./html-to-image-CoMmxXBd.js";import{t as qe}from"./label-TNNaT1M9.js";import{t as Oe}from"./useDeleteCell-B4nKRnTM.js";import{n as Ue,t as Qe}from"./icons-CrUXojcA.js";import{n as X}from"./name-cell-input-CVt9kv6F.js";import{t as Z}from"./multi-icon-DEWnuZs2.js";import{t as Fe}from"./useSplitCell-D8kqiCTS.js";var $=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),J=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),Y=f("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]),Ve=f("text-cursor-input",[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]]),ee=f("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),le=f("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Ge(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ke(a){var c;let e=(c=a.match(/scrollTo=([^&]+)/))==null?void 0:c[1];return e?decodeURIComponent(e.split("&")[0]):null}function oe(a){return a==="_"?!1:!!(a&&a.trim().length>0)}var Xe=ue(),l=ae(je(),1);function Ze(a){let e=(0,Xe.c)(47),{cell:c,closePopover:u}=a,{createNewCell:m,updateCellConfig:s,updateCellName:x,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:S,markUntouched:A}=ne(),T=Fe(),D=Pe(c==null?void 0:c.cellId),E=!b(ke),N=Oe(),{openModal:j}=He(),R=ie(Ae),B=b(xe),v=b(be),te=b(Ee),y=b(ye),{saveCellConfig:r}=ve();if(!c||te){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[0]=o):o=e[0],o}let{cellId:t,config:i,getEditorView:d,name:h,hasOutput:w,hasConsoleOutput:H,status:L}=c,C;e[1]!==t||e[2]!==i.disabled||e[3]!==r||e[4]!==s?(C=async()=>{let o={disabled:!i.disabled};await r({configs:{[t]:o}}),s({cellId:t,config:o})},e[1]=t,e[2]=i.disabled,e[3]=r,e[4]=s,e[5]=C):C=e[5];let P=C,g;e[6]!==t||e[7]!==i.hide_code||e[8]!==d||e[9]!==r||e[10]!==s?(g=async()=>{let o={hide_code:!i.hide_code};await r({configs:{[t]:o}}),s({cellId:t,config:o});let U=d();U&&(o.hide_code?U.contentDOM.blur():U.focus())},e[6]=t,e[7]=i.hide_code,e[8]=d,e[9]=r,e[10]=s,e[11]=g):g=e[11];let q=g,n=t===pe,I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),e[12]=I):I=e[12];let O=L==="running"||L==="queued"||L==="disabled-transitively"||i.disabled,k;e[13]===D?k=e[14]:(k=()=>D(),e[13]=D,e[14]=k);let z;return e[15]!==_||e[16]!==B||e[17]!==y||e[18]!==v||e[19]!==E||e[20]!==t||e[21]!==S||e[22]!==u||e[23]!==i.disabled||e[24]!==i.hide_code||e[25]!==m||e[26]!==N||e[27]!==d||e[28]!==H||e[29]!==w||e[30]!==n||e[31]!==A||e[32]!==p||e[33]!==h||e[34]!==j||e[35]!==r||e[36]!==M||e[37]!==W||e[38]!==R||e[39]!==T||e[40]!==O||e[41]!==k||e[42]!==P||e[43]!==q||e[44]!==s||e[45]!==x?(z=[[{icon:I,label:"Run cell",hotkey:"cell.run",hidden:O,redundant:!0,handle:k},{icon:(0,l.jsx)(Se,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!B,handle:()=>{R(o=>(o==null?void 0:o.cellId)===t?null:{cellId:t})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(Y,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>T({cellId:t})},{icon:(0,l.jsx)(Ie,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let o=d();o&&de({[t]:o})}},{icon:i.hide_code?(0,l.jsx)(ce,{size:13,strokeWidth:1.5}):(0,l.jsx)(ze,{size:13,strokeWidth:1.5}),label:i.hide_code?"Show code":"Hide code",handle:q,hotkey:"cell.hideCode"},{icon:i.disabled?(0,l.jsx)(ee,{size:13,strokeWidth:1.5}):(0,l.jsx)(le,{size:13,strokeWidth:1.5}),label:i.disabled?"Enable execution":"Disable execution",handle:P,hidden:n}],[{icon:(0,l.jsx)(Qe,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let o=d();o&&(K({autoInstantiate:v,createNewCell:m}),Q(o,{language:"markdown",keepCodeAsIs:!1}),i.hide_code||(await r({configs:{[t]:{hide_code:!0}}}),s({cellId:t,config:{hide_code:!0}}),A({cellId:t})))},hidden:n},fe(d())==="sql"?{icon:(0,l.jsx)(Ue,{}),label:"View as Python",hotkey:"cell.viewAsSQL",handle:()=>{let o=d();o&&re(o,"python",{force:!0})},hidden:n}:{icon:(0,l.jsx)(he,{size:13,strokeWidth:1.5}),label:"Convert to SQL",hotkey:"cell.viewAsSQL",handle:()=>{let o=d();o&&(K({autoInstantiate:v,createNewCell:m}),Q(o,{language:"sql",keepCodeAsIs:!1}))},hidden:n}],[{icon:(0,l.jsxs)(Z,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(F,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>m({cellId:t,before:!0}),hidden:n,redundant:!0},{icon:(0,l.jsxs)(Z,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(V,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>m({cellId:t,before:!1}),redundant:!0},{icon:(0,l.jsx)(F,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>p({cellId:t,before:!0}),hidden:n},{icon:(0,l.jsx)(V,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>p({cellId:t,before:!1}),hidden:n},{icon:(0,l.jsx)(Ce,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>p({cellId:t,direction:"left"}),hidden:y!=="columns"||n},{icon:(0,l.jsx)(ge,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>p({cellId:t,direction:"right"}),hidden:y!=="columns"||n},{icon:(0,l.jsx)(J,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:t,scroll:!1}),hidden:n},{icon:(0,l.jsx)($,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:t,scroll:!1}),hidden:n},{icon:(0,l.jsx)(se,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:t}),hidden:y!=="columns"||n}],[{icon:(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!w,handle:()=>we(t,"result")},{icon:(0,l.jsx)(me,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(w||H),handle:()=>{S({cellId:t})}}],[{icon:(0,l.jsx)(Ve,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:el,handleHeadless:()=>{j((0,l.jsxs)(Be,{children:[(0,l.jsx)(Ne,{children:(0,l.jsx)(Re,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(qe,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)(X,{placeholder:"cell name",value:h,onKeyDown:o=>{o.key==="Enter"&&(o.preventDefault(),o.stopPropagation(),j(null))},onChange:o=>x({cellId:t,name:o})})]})]}))},rightElement:(0,l.jsx)(X,{placeholder:"cell name",value:h,onChange:o=>x({cellId:t,name:o}),onEnterKey:()=>u==null?void 0:u()}),hidden:n},{icon:(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!oe(h),tooltip:oe(h)?void 0:"Only named cells can be linked to",handle:async()=>{await Le(Ge(h)),De({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!E,variant:"danger",icon:(0,l.jsx)(Te,{size:13,strokeWidth:1.5}),handle:()=>{N({cellId:t})}}]].map(Je).filter($e),e[15]=_,e[16]=B,e[17]=y,e[18]=v,e[19]=E,e[20]=t,e[21]=S,e[22]=u,e[23]=i.disabled,e[24]=i.hide_code,e[25]=m,e[26]=N,e[27]=d,e[28]=H,e[29]=w,e[30]=n,e[31]=A,e[32]=p,e[33]=h,e[34]=j,e[35]=r,e[36]=M,e[37]=W,e[38]=R,e[39]=T,e[40]=O,e[41]=k,e[42]=P,e[43]=q,e[44]=s,e[45]=x,e[46]=z):z=e[46],z}function $e(a){return a.length>0}function Je(a){return a.filter(Ye)}function Ye(a){return!a.hidden}function el(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{Y as a,ee as i,Ke as n,J as o,le as r,$ as s,Ze as t};
1
+ import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as b}from"./useEvent-O0nX5vok.js";import{E as ne,Mn as de,Qn as se,Tn as re,Xn as ce,Zn as he,er as me,mt as Q,pi as pe,v as ke,wn as fe}from"./cells-39RE4UzS.js";import{t as ue}from"./compiler-runtime-B3qBwwSJ.js";import{a as ye,o as be,r as xe}from"./utils-tNbLd14P.js";import{t as je}from"./jsx-runtime-icT_Ltz2.js";import{r as ve}from"./requests-Bgjtqo_1.js";import{t as f}from"./createLucideIcon-Cm-Z7dYr.js";import{n as F,r as V}from"./x-CdLP7-v3.js";import{a as we,h as Ce}from"./download-B1vXaivj.js";import{t as ge}from"./chevron-right-CvVxySQk.js";import{t as G}from"./circle-plus-nCze0-py.js";import{t as Ie}from"./code-xml-BlrJCgNZ.js";import{t as ze}from"./eye-off-CF3GmvXV.js";import{t as We}from"./image-CfyJzBP9.js";import{t as Me}from"./link-_dbp0XNB.js";import{t as _e}from"./play-Bu_0ogGD.js";import{a as Se,n as Ae}from"./state-Cz_wrzCz.js";import{t as Te}from"./trash-2-Bc_J7TQO.js";import{t as De}from"./use-toast-BtZldTi5.js";import{r as Ee}from"./mode-D-iRbN9x.js";import{a as Ne,c as Re,n as Be}from"./dialog-1_jIyAb_.js";import{n as He}from"./ImperativeModal-C3CD5-Aq.js";import{n as Le}from"./copy-KjcPgPw9.js";import{i as Pe}from"./useRunCells-Dhl8ZTGh.js";import{r as K}from"./html-to-image-DTFXm6_Z.js";import{t as qe}from"./label-TNNaT1M9.js";import{t as Oe}from"./useDeleteCell-d8veThW7.js";import{n as Ue,t as Qe}from"./icons-CrUXojcA.js";import{n as X}from"./name-cell-input-Dyb0ZO4X.js";import{t as Z}from"./multi-icon-DEWnuZs2.js";import{t as Fe}from"./useSplitCell-BSnFazbH.js";var $=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),J=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),Y=f("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]),Ve=f("text-cursor-input",[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]]),ee=f("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),le=f("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Ge(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ke(a){var c;let e=(c=a.match(/scrollTo=([^&]+)/))==null?void 0:c[1];return e?decodeURIComponent(e.split("&")[0]):null}function oe(a){return a==="_"?!1:!!(a&&a.trim().length>0)}var Xe=ue(),l=ae(je(),1);function Ze(a){let e=(0,Xe.c)(47),{cell:c,closePopover:u}=a,{createNewCell:m,updateCellConfig:s,updateCellName:x,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:S,markUntouched:A}=ne(),T=Fe(),D=Pe(c==null?void 0:c.cellId),E=!b(ke),N=Oe(),{openModal:j}=He(),R=ie(Ae),B=b(xe),v=b(be),te=b(Ee),y=b(ye),{saveCellConfig:r}=ve();if(!c||te){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[0]=o):o=e[0],o}let{cellId:t,config:i,getEditorView:d,name:h,hasOutput:w,hasConsoleOutput:H,status:L}=c,C;e[1]!==t||e[2]!==i.disabled||e[3]!==r||e[4]!==s?(C=async()=>{let o={disabled:!i.disabled};await r({configs:{[t]:o}}),s({cellId:t,config:o})},e[1]=t,e[2]=i.disabled,e[3]=r,e[4]=s,e[5]=C):C=e[5];let P=C,g;e[6]!==t||e[7]!==i.hide_code||e[8]!==d||e[9]!==r||e[10]!==s?(g=async()=>{let o={hide_code:!i.hide_code};await r({configs:{[t]:o}}),s({cellId:t,config:o});let U=d();U&&(o.hide_code?U.contentDOM.blur():U.focus())},e[6]=t,e[7]=i.hide_code,e[8]=d,e[9]=r,e[10]=s,e[11]=g):g=e[11];let q=g,n=t===pe,I;e[12]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),e[12]=I):I=e[12];let O=L==="running"||L==="queued"||L==="disabled-transitively"||i.disabled,k;e[13]===D?k=e[14]:(k=()=>D(),e[13]=D,e[14]=k);let z;return e[15]!==_||e[16]!==B||e[17]!==y||e[18]!==v||e[19]!==E||e[20]!==t||e[21]!==S||e[22]!==u||e[23]!==i.disabled||e[24]!==i.hide_code||e[25]!==m||e[26]!==N||e[27]!==d||e[28]!==H||e[29]!==w||e[30]!==n||e[31]!==A||e[32]!==p||e[33]!==h||e[34]!==j||e[35]!==r||e[36]!==M||e[37]!==W||e[38]!==R||e[39]!==T||e[40]!==O||e[41]!==k||e[42]!==P||e[43]!==q||e[44]!==s||e[45]!==x?(z=[[{icon:I,label:"Run cell",hotkey:"cell.run",hidden:O,redundant:!0,handle:k},{icon:(0,l.jsx)(Se,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!B,handle:()=>{R(o=>(o==null?void 0:o.cellId)===t?null:{cellId:t})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(Y,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>T({cellId:t})},{icon:(0,l.jsx)(Ie,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let o=d();o&&de({[t]:o})}},{icon:i.hide_code?(0,l.jsx)(ce,{size:13,strokeWidth:1.5}):(0,l.jsx)(ze,{size:13,strokeWidth:1.5}),label:i.hide_code?"Show code":"Hide code",handle:q,hotkey:"cell.hideCode"},{icon:i.disabled?(0,l.jsx)(ee,{size:13,strokeWidth:1.5}):(0,l.jsx)(le,{size:13,strokeWidth:1.5}),label:i.disabled?"Enable execution":"Disable execution",handle:P,hidden:n}],[{icon:(0,l.jsx)(Qe,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let o=d();o&&(K({autoInstantiate:v,createNewCell:m}),Q(o,{language:"markdown",keepCodeAsIs:!1}),i.hide_code||(await r({configs:{[t]:{hide_code:!0}}}),s({cellId:t,config:{hide_code:!0}}),A({cellId:t})))},hidden:n},fe(d())==="sql"?{icon:(0,l.jsx)(Ue,{}),label:"View as Python",hotkey:"cell.viewAsSQL",handle:()=>{let o=d();o&&re(o,"python",{force:!0})},hidden:n}:{icon:(0,l.jsx)(he,{size:13,strokeWidth:1.5}),label:"Convert to SQL",hotkey:"cell.viewAsSQL",handle:()=>{let o=d();o&&(K({autoInstantiate:v,createNewCell:m}),Q(o,{language:"sql",keepCodeAsIs:!1}))},hidden:n}],[{icon:(0,l.jsxs)(Z,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(F,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>m({cellId:t,before:!0}),hidden:n,redundant:!0},{icon:(0,l.jsxs)(Z,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(V,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>m({cellId:t,before:!1}),redundant:!0},{icon:(0,l.jsx)(F,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>p({cellId:t,before:!0}),hidden:n},{icon:(0,l.jsx)(V,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>p({cellId:t,before:!1}),hidden:n},{icon:(0,l.jsx)(Ce,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>p({cellId:t,direction:"left"}),hidden:y!=="columns"||n},{icon:(0,l.jsx)(ge,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>p({cellId:t,direction:"right"}),hidden:y!=="columns"||n},{icon:(0,l.jsx)(J,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:t,scroll:!1}),hidden:n},{icon:(0,l.jsx)($,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:t,scroll:!1}),hidden:n},{icon:(0,l.jsx)(se,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:t}),hidden:y!=="columns"||n}],[{icon:(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!w,handle:()=>we(t,"result")},{icon:(0,l.jsx)(me,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(w||H),handle:()=>{S({cellId:t})}}],[{icon:(0,l.jsx)(Ve,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:el,handleHeadless:()=>{j((0,l.jsxs)(Be,{children:[(0,l.jsx)(Ne,{children:(0,l.jsx)(Re,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(qe,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)(X,{placeholder:"cell name",value:h,onKeyDown:o=>{o.key==="Enter"&&(o.preventDefault(),o.stopPropagation(),j(null))},onChange:o=>x({cellId:t,name:o})})]})]}))},rightElement:(0,l.jsx)(X,{placeholder:"cell name",value:h,onChange:o=>x({cellId:t,name:o}),onEnterKey:()=>u==null?void 0:u()}),hidden:n},{icon:(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!oe(h),tooltip:oe(h)?void 0:"Only named cells can be linked to",handle:async()=>{await Le(Ge(h)),De({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!E,variant:"danger",icon:(0,l.jsx)(Te,{size:13,strokeWidth:1.5}),handle:()=>{N({cellId:t})}}]].map(Je).filter($e),e[15]=_,e[16]=B,e[17]=y,e[18]=v,e[19]=E,e[20]=t,e[21]=S,e[22]=u,e[23]=i.disabled,e[24]=i.hide_code,e[25]=m,e[26]=N,e[27]=d,e[28]=H,e[29]=w,e[30]=n,e[31]=A,e[32]=p,e[33]=h,e[34]=j,e[35]=r,e[36]=M,e[37]=W,e[38]=R,e[39]=T,e[40]=O,e[41]=k,e[42]=P,e[43]=q,e[44]=s,e[45]=x,e[46]=z):z=e[46],z}function $e(a){return a.length>0}function Je(a){return a.filter(Ye)}function Ye(a){return!a.hidden}function el(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{Y as a,ee as i,Ke as n,J as o,le as r,$ as s,Ze as t};