@marimo-team/frontend 0.20.5-dev4 → 0.20.5-dev41

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 (382) hide show
  1. package/dist/assets/{CellStatus-DRjSVmK4.js → CellStatus-rawm41sF.js} +1 -1
  2. package/dist/assets/{Combination-tjZP3FH6.js → Combination-lAuBMOg4.js} +1 -1
  3. package/dist/assets/{ConnectedDataExplorerComponent-BmYLGaEV.js → ConnectedDataExplorerComponent-BmrDShEI.js} +1 -1
  4. package/dist/assets/{DeferredRequestRegistry-CMZsNx4R.js → DeferredRequestRegistry-TekxUirp.js} +1 -1
  5. package/dist/assets/{ErrorBoundary-dVj6GVNE.js → ErrorBoundary-BfF3Lb5I.js} +1 -1
  6. package/dist/assets/{ImperativeModal-CRNJOvqT.js → ImperativeModal-BvRpI5NU.js} +1 -1
  7. package/dist/assets/{JsonOutput-GlMQ3aLA.js → JsonOutput-D8vxudTc.js} +11 -11
  8. package/dist/assets/{LazyAnyLanguageCodeMirror-BdX_Y5NA.js → LazyAnyLanguageCodeMirror-BpSKccWW.js} +2 -2
  9. package/dist/assets/{MarimoErrorOutput-B0ZtYqUC.js → MarimoErrorOutput-ThxhEC9x.js} +1 -1
  10. package/dist/assets/{RenderHTML-qh-NzTWO.js → RenderHTML-Ci0Pb1aU.js} +1 -1
  11. package/dist/assets/{add-cell-with-ai--4VOMvH8.js → add-cell-with-ai-BO7kWP2P.js} +28 -26
  12. package/dist/assets/add-connection-dialog-C0_z2T_b.js +138 -0
  13. package/dist/assets/{agent-panel-BX_iKZeN.js → agent-panel-C-OkUkue.js} +15 -15
  14. package/dist/assets/ai-model-dropdown-DJoBltN-.js +5 -0
  15. package/dist/assets/{alert-dialog-DsNfSYaw.js → alert-dialog-CfirwkMl.js} +1 -1
  16. package/dist/assets/{any-language-editor-Drlg63ge.js → any-language-editor-C_73jLC-.js} +1 -1
  17. package/dist/assets/{app-config-button-bnipxY5L.js → app-config-button-Cw2wXNR2.js} +1 -1
  18. package/dist/assets/{architectureDiagram-VXUJARFQ-KOgWVxSC.js → architectureDiagram-VXUJARFQ-PitjPG8V.js} +1 -1
  19. package/dist/assets/{assertNever-Dw9aFN4h.js → assertNever-Dg4AnA3p.js} +1 -1
  20. package/dist/assets/{azure-Ddr1pZpW.js → azure-V83ZU8Sp.js} +1 -1
  21. package/dist/assets/{blockDiagram-VD42YOAC-DjazSe-Z.js → blockDiagram-VD42YOAC-BIJ4EhZR.js} +1 -1
  22. package/dist/assets/{button-BmOH9agK.js → button-BwamPDJi.js} +1 -1
  23. package/dist/assets/{c4Diagram-YG6GDRKO-CkwpyaIV.js → c4Diagram-YG6GDRKO-DM49Cvfe.js} +1 -1
  24. package/dist/assets/{cache-panel-DRhH4wqG.js → cache-panel-B4TWdLE9.js} +1 -1
  25. package/dist/assets/{capabilities-CeYo4YI0.js → capabilities-yFZOze7r.js} +1 -1
  26. package/dist/assets/{capitalize-irHJCpFh.js → capitalize-DeCS9UqV.js} +1 -1
  27. package/dist/assets/{cell-editor-B1x4zkBp.js → cell-editor-DFeqwbDq.js} +6 -6
  28. package/dist/assets/{cell-link-B59Kn5nL.js → cell-link-TWNu2IkO.js} +1 -1
  29. package/dist/assets/{cells-CCtxWKxf.js → cells-DJj8ja0V.js} +4 -4
  30. package/dist/assets/channel-DNdp-eCE.js +1 -0
  31. package/dist/assets/{chat-display-Co6iGNSx.js → chat-display-COL62Kpv.js} +1 -1
  32. package/dist/assets/{chat-panel-70sjqZuy.js → chat-panel-CxYclPR7.js} +1 -1
  33. package/dist/assets/{chunk-5FQGJX7Z-BJDu6jwt.js → chunk-5FQGJX7Z-Cyze_Wbx.js} +3 -3
  34. package/dist/assets/{chunk-ABZYJK2D-B4uBM2QW.js → chunk-ABZYJK2D-CIP2m5SK.js} +3 -3
  35. package/dist/assets/{chunk-ATLVNIR6-Du2yaFpm.js → chunk-ATLVNIR6-dCnEfemD.js} +1 -1
  36. package/dist/assets/{chunk-B4BG7PRW-CyuK4uRN.js → chunk-B4BG7PRW-sXSaKV4v.js} +1 -1
  37. package/dist/assets/{chunk-DI55MBZ5-BwWd5dH1.js → chunk-DI55MBZ5-DjV-ScSc.js} +1 -1
  38. package/dist/assets/{chunk-EXTU4WIE-KqUhNQvn.js → chunk-EXTU4WIE-PLvknOI8.js} +1 -1
  39. package/dist/assets/{chunk-JA3XYJ7Z-C-v9pa_-.js → chunk-JA3XYJ7Z-BM9i2UKq.js} +1 -1
  40. package/dist/assets/{chunk-JZLCHNYA-DNCs8LM0.js → chunk-JZLCHNYA-m6YUUy9x.js} +1 -1
  41. package/dist/assets/{chunk-N4CR4FBY-CT58_cui.js → chunk-N4CR4FBY-C1lKPnWl.js} +2 -2
  42. package/dist/assets/{chunk-QN33PNHL-BboxAxJa.js → chunk-QN33PNHL-Czx-c7tW.js} +1 -1
  43. package/dist/assets/{chunk-QXUST7PY-BlINr7uS.js → chunk-QXUST7PY-CcYtOR78.js} +1 -1
  44. package/dist/assets/{chunk-S3R3BYOJ-DI9xzpBm.js → chunk-S3R3BYOJ-JNQMgAH6.js} +1 -1
  45. package/dist/assets/{chunk-TZMSLE5B-C4sxb3v-.js → chunk-TZMSLE5B-C9T1sILA.js} +1 -1
  46. package/dist/assets/classDiagram-2ON5EDUG-BqtRsi1m.js +1 -0
  47. package/dist/assets/classDiagram-v2-WZHVMYZB-CVoqYiM8.js +1 -0
  48. package/dist/assets/{code-block-37QAKDTI-Cl0NTdrS.js → code-block-37QAKDTI-BeUkwW5f.js} +1 -1
  49. package/dist/assets/{column-preview-BhU5Ow0e.js → column-preview-CPJFpq_q.js} +1 -1
  50. package/dist/assets/command-DQqPawJf.js +1 -0
  51. package/dist/assets/command-palette-BM1QAZTW.js +1 -0
  52. package/dist/assets/{common-CKAiz8xx.js → common-Df9UcCs1.js} +1 -1
  53. package/dist/assets/components-CwZhf0Ag.js +1 -0
  54. package/dist/assets/{components-BZCdnYSp.js → components-D8LTuNe_.js} +1 -1
  55. package/dist/assets/{config-D9X9QKiL.js → config-BH98g9qk.js} +1 -1
  56. package/dist/assets/context-CRmPPhx9.js +1 -0
  57. package/dist/assets/context-aware-panel-Bs4Vepkp.js +3 -0
  58. package/dist/assets/{copy-DMCkK2TI.js → copy-ICN7wGy0.js} +1 -1
  59. package/dist/assets/{copy-icon-6RnnFDPt.js → copy-icon-DNppAsmd.js} +1 -1
  60. package/dist/assets/{createReducer-BcTiTw8T.js → createReducer-BrKCfm9t.js} +1 -1
  61. package/dist/assets/{dagre-6UL2VRFP-BrBSRtN5.js → dagre-6UL2VRFP-D-I1QR9s.js} +1 -1
  62. package/dist/assets/{data-grid-overlay-editor-NBBEPhQq.js → data-grid-overlay-editor-DXzdnLZF.js} +1 -1
  63. package/dist/assets/{datasource-B2Fl6iYU.js → datasource-MEu_GjcC.js} +1 -1
  64. package/dist/assets/{dates-CzBDvj6R.js → dates-BFWtdOCb.js} +1 -1
  65. package/dist/assets/{dependency-graph-panel-Dk4iQGft.js → dependency-graph-panel-DddysMUS.js} +1 -1
  66. package/dist/assets/{diagram-PSM6KHXK-DPC85L-O.js → diagram-PSM6KHXK-DcjdxOTC.js} +1 -1
  67. package/dist/assets/{diagram-QEK2KX5R-CRPLkmdi.js → diagram-QEK2KX5R-Dx1WtjkT.js} +1 -1
  68. package/dist/assets/{diagram-S2PKOQOG-Bsc6mZUW.js → diagram-S2PKOQOG-CXJzGs3_.js} +1 -1
  69. package/dist/assets/{dialog-BXzvlof-.js → dialog-ChkDhlMQ.js} +1 -1
  70. package/dist/assets/{dist-i0ilBbwP.js → dist-0PMxXIr6.js} +1 -1
  71. package/dist/assets/{dist-DGPCoel5.js → dist-6HEOc3hy.js} +1 -1
  72. package/dist/assets/{dist-CEQIJ2pn.js → dist-B7Qj0ClH.js} +1 -1
  73. package/dist/assets/{dist-C30-xTdI.js → dist-BIYYQefO.js} +1 -1
  74. package/dist/assets/{dist-Dg61kQNR.js → dist-BQ7MrVoG.js} +1 -1
  75. package/dist/assets/{dist-CU-Ty5ht.js → dist-BUr9VSV4.js} +1 -1
  76. package/dist/assets/{dist-BjtLy-VA.js → dist-Bagw3W9X.js} +1 -1
  77. package/dist/assets/dist-BbkZJt99.js +1 -0
  78. package/dist/assets/{dist-BTEPE6IB.js → dist-BosZYCjH.js} +1 -1
  79. package/dist/assets/{dist-Q0--6AMp.js → dist-BrDOLuMx.js} +1 -1
  80. package/dist/assets/dist-BvqRyXNf.js +1 -0
  81. package/dist/assets/{dist-DFv45CtW.js → dist-C1g0ZQqM.js} +1 -1
  82. package/dist/assets/dist-C88PeA-j.js +1 -0
  83. package/dist/assets/{dist-DQgu-tmt.js → dist-C8DU7LS7.js} +1 -1
  84. package/dist/assets/dist-CT29HpLU.js +1 -0
  85. package/dist/assets/dist-CaN3pnGY.js +1 -0
  86. package/dist/assets/dist-CdZrtzmM.js +1 -0
  87. package/dist/assets/{dist-Dq_iQ08e.js → dist-Cf47zp7b.js} +1 -1
  88. package/dist/assets/dist-CiBv1uBX.js +1 -0
  89. package/dist/assets/dist-Cn-s3n4_.js +1 -0
  90. package/dist/assets/{dist-DVh79TGS.js → dist-CrFxmtyb.js} +1 -1
  91. package/dist/assets/{dist-y6DTGoUH.js → dist-CsQrBXB1.js} +1 -1
  92. package/dist/assets/{dist-BjnzbwCx.js → dist-D-tCQoCo.js} +1 -1
  93. package/dist/assets/{dist-51xFOPFs.js → dist-D3OoaVQX.js} +1 -1
  94. package/dist/assets/dist-DHmVMXm2.js +1 -0
  95. package/dist/assets/dist-DHn8amAr.js +1 -0
  96. package/dist/assets/dist-DK2oA8K0.js +1 -0
  97. package/dist/assets/{dist-Bq1BhBMA.js → dist-DKPpxz2S.js} +1 -1
  98. package/dist/assets/{dist-DwtQnQ8D.js → dist-DPW-YadP.js} +1 -1
  99. package/dist/assets/{dist-Bbmd3uCi.js → dist-D_4TSZPK.js} +1 -1
  100. package/dist/assets/dist-Ddx3eonB.js +1 -0
  101. package/dist/assets/dist-DnPN36vC.js +1 -0
  102. package/dist/assets/dist-Doi_61Lm.js +1 -0
  103. package/dist/assets/{dist-Dy5EHuDu.js → dist-Dq1aTs7B.js} +1 -1
  104. package/dist/assets/dist-Dr9qtoId.js +13 -0
  105. package/dist/assets/dist-EtvDr9lo.js +1 -0
  106. package/dist/assets/dist-JYMkroTn.js +1 -0
  107. package/dist/assets/{dist-DfBASypd.js → dist-Jp_4M-Ei.js} +1 -1
  108. package/dist/assets/dist-QoV0fohO.js +1 -0
  109. package/dist/assets/dist-SDO5K7hA.js +3 -0
  110. package/dist/assets/dist-TtVOJU5I.js +1 -0
  111. package/dist/assets/dist-doJt8agZ.js +1 -0
  112. package/dist/assets/{dist-CIuh_TIk.js → dist-etSPFHi_.js} +1 -1
  113. package/dist/assets/{dist-CqnPIH_S.js → dist-f-ru44Xm.js} +1 -1
  114. package/dist/assets/{dist-CIU0Lack.js → dist-qkIhd7iG.js} +1 -1
  115. package/dist/assets/{dist-odxAaH5Z.js → dist-t1vdhOX_.js} +1 -1
  116. package/dist/assets/{dist-6QbI72oM.js → dist-wBVaU_K6.js} +1 -1
  117. package/dist/assets/{dist-C-_581uo.js → dist-ykiUNgjx.js} +1 -1
  118. package/dist/assets/{documentation-panel-DSqxsEBu.js → documentation-panel-Bs1zlxdM.js} +1 -1
  119. package/dist/assets/download-C06P9lnP.js +9 -0
  120. package/dist/assets/{dropdown-menu-CKhrfxsx.js → dropdown-menu-Bc2d7Nej.js} +1 -1
  121. package/dist/assets/edit-page-Bld_fe39.js +13 -0
  122. package/dist/assets/{erDiagram-Q2GNP2WA-B7kZxL-n.js → erDiagram-Q2GNP2WA-BQUYpiEQ.js} +1 -1
  123. package/dist/assets/{error-banner-R2OkQKR0.js → error-banner-C2nW22mN.js} +1 -1
  124. package/dist/assets/{error-panel-CtyexAW6.js → error-panel-B_vII0VN.js} +1 -1
  125. package/dist/assets/{es-1hBRXVlM.js → es-EPBuIa5m.js} +1 -1
  126. package/dist/assets/{esm-BQUzYly2.js → esm-Hlfcqnf0.js} +1 -1
  127. package/dist/assets/{esm-BTyesPLl.js → esm-MvMf2P5n.js} +1 -1
  128. package/dist/assets/{field-DGtw6Lae.js → field-D-izY3ud.js} +1 -1
  129. package/dist/assets/file-explorer-panel-BIzyNOVs.js +17 -0
  130. package/dist/assets/{file-video-camera-Fa5c_iPb.js → file-headphone-daOQzJg0.js} +1 -1
  131. package/dist/assets/file-icons-C-oatBuk.js +1 -0
  132. package/dist/assets/{floating-outline-BWK_nLJy.js → floating-outline-BPmtgKWs.js} +1 -1
  133. package/dist/assets/{flowDiagram-NV44I4VS-DR-64sse.js → flowDiagram-NV44I4VS-xMIxed1s.js} +1 -1
  134. package/dist/assets/{focus-ShrwcKIv.js → focus-j9zawi1p.js} +1 -1
  135. package/dist/assets/{form-B7_NRa34.js → form-DrpSpDea.js} +1 -1
  136. package/dist/assets/{formats-C3K3rlAZ.js → formats-CkafgGfe.js} +1 -1
  137. package/dist/assets/{formatting-8bP-RDnl.js → formatting-By3b5Lx8.js} +1 -1
  138. package/dist/assets/{gallery-page-DRBZRnaN.js → gallery-page-BrljeBFe.js} +1 -1
  139. package/dist/assets/{ganttDiagram-JELNMOA3-BWuQMrGd.js → ganttDiagram-JELNMOA3-Be16Pv8U.js} +1 -1
  140. package/dist/assets/{gitGraphDiagram-V2S2FVAM-Mr5-PYgM.js → gitGraphDiagram-V2S2FVAM-DQ4scp6S.js} +1 -1
  141. package/dist/assets/{glide-data-editor-BurnHmgR.js → glide-data-editor-8kdd_nPE.js} +4 -4
  142. package/dist/assets/{globals-BlB0Ba6E.js → globals-D2ulvntX.js} +1 -1
  143. package/dist/assets/home-page-O_c6IiAp.js +4 -0
  144. package/dist/assets/{hooks-BY6oGAlX.js → hooks-Z1j4FmRH.js} +1 -1
  145. package/dist/assets/html-to-image-D-FY7miL.js +2 -0
  146. package/dist/assets/image-CBwHq93J.js +1 -0
  147. package/dist/assets/index-BMdbqayP.js +38 -0
  148. package/dist/assets/{index-Dzwe9vKA.css → index-fYvRsNGP.css} +1 -1
  149. package/dist/assets/{infoDiagram-HS3SLOUP-Bs8aKpuZ.js → infoDiagram-HS3SLOUP-DzsICEl9.js} +1 -1
  150. package/dist/assets/input-GLbHj4DF.js +1 -0
  151. package/dist/assets/{journeyDiagram-XKPGCS4Q-aCZRxOHn.js → journeyDiagram-XKPGCS4Q-Dt4UItaM.js} +1 -1
  152. package/dist/assets/{kanban-definition-3W4ZIXB7-BlOJJ-5B.js → kanban-definition-3W4ZIXB7-Do_8fQeU.js} +1 -1
  153. package/dist/assets/katex-BalO4WMU.js +1 -0
  154. package/dist/assets/{kiosk-mode-BBqwMND1.js → kiosk-mode-BuLLP9k3.js} +1 -1
  155. package/dist/assets/{label-DmqkEXI4.js → label-CDwJXweF.js} +1 -1
  156. package/dist/assets/layout-DQhzfSJn.js +5 -0
  157. package/dist/assets/{linear-2A1iDmqT.js → linear-c4WCYuol.js} +1 -1
  158. package/dist/assets/{links-syPBpTLO.js → links-C9QsxOBC.js} +1 -1
  159. package/dist/assets/{logs-panel-BHFI-jG1.js → logs-panel-BKhNdCxG.js} +1 -1
  160. package/dist/assets/{maps-8VTEe-0T.js → maps-CTMzJkSk.js} +1 -1
  161. package/dist/assets/{marimo-icons-BDAuIiW5.js → marimo-icons-BmYE_Rrf.js} +1 -1
  162. package/dist/assets/{markdown-renderer-B6a5ZAwT.js → markdown-renderer-D02U2W2X.js} +4 -4
  163. package/dist/assets/{menu-items-Bs2e3wuf.js → menu-items-CRjHRaiu.js} +1 -1
  164. package/dist/assets/mermaid-4DMBBIKO-C2MO8Ayk.js +1 -0
  165. package/dist/assets/{mermaid-Cq8ttjss.js → mermaid-DJfb-vZs.js} +3 -3
  166. package/dist/assets/{mermaid-parser.core-DbGD2gKa.js → mermaid-parser.core-C-MdXFgl.js} +1 -1
  167. package/dist/assets/{mhchem-BJZpIgRF.js → mhchem-DqNBdKjC.js} +1 -1
  168. package/dist/assets/{mindmap-definition-VGOIOE7T-Dt6ZRws3.js → mindmap-definition-VGOIOE7T-YOE4okXd.js} +1 -1
  169. package/dist/assets/{multi-map-kCmlVJ-5.js → multi-map-BubyGH4K.js} +1 -1
  170. package/dist/assets/{name-cell-input-BRHlWy2Y.js → name-cell-input-DOyCua0o.js} +1 -1
  171. package/dist/assets/{number-overlay-editor-BDnI-mwa.js → number-overlay-editor-zZDGu9D2.js} +1 -1
  172. package/dist/assets/{numbers-44Cj1Me-.js → numbers-Eb1pfDec.js} +1 -1
  173. package/dist/assets/{outline-panel-uyRmU3NX.js → outline-panel-CgQ2GmbX.js} +1 -1
  174. package/dist/assets/{packages-panel-D8d46YWc.js → packages-panel-n8Ssm9M8.js} +1 -1
  175. package/dist/assets/{panels-Do1_ry1k.js → panels-B4wExe_l.js} +1 -1
  176. package/dist/assets/{pieDiagram-ADFJNKIX-3GEmpmfg.js → pieDiagram-ADFJNKIX-CjRyNR5b.js} +1 -1
  177. package/dist/assets/{popover-Cvl9xY6R.js → popover-XNIX-rv1.js} +1 -1
  178. package/dist/assets/{precisionRound-BOmLQIKI.js → precisionRound-CCOoIlcP.js} +1 -1
  179. package/dist/assets/{process-output-4yip1nZE.js → process-output-BwkCApeo.js} +1 -1
  180. package/dist/assets/purify.es-BBn8CPhf.js +2 -0
  181. package/dist/assets/{quadrantDiagram-AYHSOK5B-Dela17qb.js → quadrantDiagram-AYHSOK5B-ZvWY20UO.js} +1 -1
  182. package/dist/assets/{react-vega-C6zUovDg.js → react-vega-DzWik59S.js} +1 -1
  183. package/dist/assets/react-vega-plcnUXVG.js +1 -0
  184. package/dist/assets/{readonly-python-code-DmjbJYSq.js → readonly-python-code-BFyASvPB.js} +1 -1
  185. package/dist/assets/{renderShortcut-BJEd-iA7.js → renderShortcut-BjTUrvc5.js} +1 -1
  186. package/dist/assets/{request-registry-CN4oD1xn.js → request-registry-LM8kl4Xv.js} +1 -1
  187. package/dist/assets/{requirementDiagram-UZGBJVZJ-CjimGyZ2.js → requirementDiagram-UZGBJVZJ-4LJ2QyR9.js} +1 -1
  188. package/dist/assets/{run-page-BGijCqbR.js → run-page-BYEyHIaG.js} +1 -1
  189. package/dist/assets/{runs-BMpRKQKC.js → runs-B4QSIylk.js} +1 -1
  190. package/dist/assets/{sankeyDiagram-TZEHDZUN-CBE98yUR.js → sankeyDiagram-TZEHDZUN-7OqUpHYR.js} +1 -1
  191. package/dist/assets/{scratchpad-panel-ByOWj9u_.js → scratchpad-panel-w9Tu3fpH.js} +1 -1
  192. package/dist/assets/{secrets-panel-C2n4dedt.js → secrets-panel-DAnccD-S.js} +1 -1
  193. package/dist/assets/{select-DygbgNTD.js → select-DMX8tcVe.js} +1 -1
  194. package/dist/assets/{sequenceDiagram-WL72ISMW-DSgG0Zyn.js → sequenceDiagram-WL72ISMW-C4sGREOt.js} +1 -1
  195. package/dist/assets/{session-DnMOyddG.js → session-iz9BPeTp.js} +1 -1
  196. package/dist/assets/session-panel-k6_Gni4X.js +1 -0
  197. package/dist/assets/{share-sD4fbzpH.js → share-BWMZuJWY.js} +1 -1
  198. package/dist/assets/{slides-component-B6-Jz3p0.js → slides-component-6o8TgsRv.js} +1 -1
  199. package/dist/assets/{snippets-panel-Bzz2M38q.js → snippets-panel-mGo3M47p.js} +1 -1
  200. package/dist/assets/{spec-Be-iRLAY.js → spec-BQ0QuStT.js} +1 -1
  201. package/dist/assets/{state-Xu6bDsJl.js → state-CGR3DB1q.js} +1 -1
  202. package/dist/assets/{state-D2jTOQOG.js → state-CsNC_7dZ.js} +1 -1
  203. package/dist/assets/{state-B_fNn_z_.js → state-Dj88xOmZ.js} +1 -1
  204. package/dist/assets/{stateDiagram-FKZM4ZOC-By2PSLiJ.js → stateDiagram-FKZM4ZOC-4PvEH0nH.js} +1 -1
  205. package/dist/assets/stateDiagram-v2-4FDKWEC3-CpKgwrjU.js +1 -0
  206. package/dist/assets/stex-BBWVYm-R.js +1 -0
  207. package/dist/assets/{switch-tdkZNn4k.js → switch-BMqCO9bm.js} +1 -1
  208. package/dist/assets/{terminal-CGmjeYqa.js → terminal-qMuurRSM.js} +1 -1
  209. package/dist/assets/{time-BLCpKsnL.js → time-BuGE4zW4.js} +1 -1
  210. package/dist/assets/{timeline-definition-IT6M3QCI-rq80_nVa.js → timeline-definition-IT6M3QCI-D9wk3zrs.js} +1 -1
  211. package/dist/assets/{toggle-BhEcsHTu.js → toggle-BYx0fN9n.js} +1 -1
  212. package/dist/assets/{tooltip-DOQlecCr.js → tooltip-CKZGcDDd.js} +1 -1
  213. package/dist/assets/{tooltip-D_HRHf_c.js → tooltip-CQeE9o7x.js} +1 -1
  214. package/dist/assets/{tracing-BZx6nEPl.js → tracing-DTCuFbVV.js} +1 -1
  215. package/dist/assets/tracing-panel-B1EJu6-W.js +2 -0
  216. package/dist/assets/{tree-D0AxVJ_I.js → tree-82qhH45u.js} +1 -1
  217. package/dist/assets/{useAddCell-BRlAqdmq.js → useAddCell-BdUpg_Ta.js} +1 -1
  218. package/dist/assets/useBoolean-2eWc7NX-.js +1 -0
  219. package/dist/assets/useCellActionButton-CJ_LAoma.js +1 -0
  220. package/dist/assets/{useDateFormatter-CmtFqjqu.js → useDateFormatter-DOoVZUts.js} +1 -1
  221. package/dist/assets/{useDeleteCell-BAfiIxKf.js → useDeleteCell-C1uMlYZu.js} +1 -1
  222. package/dist/assets/{useDependencyPanelTab-jTu3L200.js → useDependencyPanelTab-nuk9kUr_.js} +1 -1
  223. package/dist/assets/useEventListener-DP66hBzA.js +1 -0
  224. package/dist/assets/{useIframeCapabilities-T3alJPda.js → useIframeCapabilities-BhFmTPLk.js} +1 -1
  225. package/dist/assets/{useInstallPackage-jGxNsOWc.js → useInstallPackage-CyTwCrsi.js} +1 -1
  226. package/dist/assets/{useInterval-lamrIyKJ.js → useInterval-Ct4FP8Tw.js} +1 -1
  227. package/dist/assets/{useLifecycle-BDXC6oVR.js → useLifecycle-BRklGKFJ.js} +1 -1
  228. package/dist/assets/useNotebookActions-Bh8YMrlo.js +1 -0
  229. package/dist/assets/{useNumberFormatter-DMA_kIIZ.js → useNumberFormatter-BXZcbTzH.js} +1 -1
  230. package/dist/assets/usePress-G817DpBk.js +7 -0
  231. package/dist/assets/{useSplitCell-CB32IpFa.js → useSplitCell-D7EHwIIE.js} +1 -1
  232. package/dist/assets/{useTheme-CwdqVOYu.js → useTheme-Co8bbxoC.js} +1 -1
  233. package/dist/assets/{utils-CORJ8yYa.js → utils-C1ZciZbF.js} +1 -1
  234. package/dist/assets/{vega-component-BLW2fY7v.js → vega-component-CoUjMYqz.js} +1 -1
  235. package/dist/assets/{vega-loader.browser-CZV6_g2i.js → vega-loader.browser-BJ9oKrvH.js} +1 -1
  236. package/dist/assets/{write-secret-modal-DuxmGjDn.js → write-secret-modal-DOyKonZB.js} +1 -1
  237. package/dist/assets/{xychartDiagram-PRI3JC2R-Bnjm0Q9u.js → xychartDiagram-PRI3JC2R-CTDFOoiw.js} +1 -1
  238. package/dist/index.html +131 -130
  239. package/package.json +9 -9
  240. package/src/__mocks__/requests.ts +1 -0
  241. package/src/components/app-config/ai-config.tsx +10 -0
  242. package/src/components/data-table/pagination.tsx +36 -30
  243. package/src/components/datasources/components.tsx +3 -6
  244. package/src/components/datasources/datasources.tsx +8 -21
  245. package/src/components/editor/actions/types.ts +6 -1
  246. package/src/components/editor/actions/useNotebookActions.tsx +50 -13
  247. package/src/components/editor/chrome/types.ts +17 -0
  248. package/src/components/editor/controls/command-palette.tsx +7 -0
  249. package/src/components/editor/controls/keyboard-shortcuts.tsx +3 -1
  250. package/src/components/editor/file-tree/file-explorer.tsx +48 -62
  251. package/src/components/editor/file-tree/file-icons.tsx +132 -0
  252. package/src/components/editor/file-tree/file-viewer.tsx +1 -1
  253. package/src/components/editor/file-tree/tree-actions.tsx +107 -0
  254. package/src/components/editor/file-tree/types.ts +2 -96
  255. package/src/components/editor/header/filename-input.tsx +4 -1
  256. package/src/components/icons/marimo-icons.tsx +2 -2
  257. package/src/components/pages/home-page.tsx +5 -5
  258. package/src/components/storage/components.tsx +0 -38
  259. package/src/components/storage/storage-file-viewer.tsx +1 -1
  260. package/src/components/storage/storage-inspector.tsx +28 -45
  261. package/src/components/ui/command.tsx +2 -0
  262. package/src/components/ui/links.tsx +1 -0
  263. package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +206 -0
  264. package/src/core/ai/tools/run-cells-tool.ts +75 -40
  265. package/src/core/hotkeys/__tests__/hotkeys.test.ts +64 -1
  266. package/src/core/hotkeys/hotkeys.ts +29 -3
  267. package/src/core/islands/bridge.ts +1 -0
  268. package/src/core/network/__tests__/requests-network.test.ts +17 -0
  269. package/src/core/network/requests-lazy.ts +1 -0
  270. package/src/core/network/requests-network.ts +9 -0
  271. package/src/core/network/requests-static.ts +1 -0
  272. package/src/core/network/requests-toasting.tsx +1 -0
  273. package/src/core/network/types.ts +1 -0
  274. package/src/core/wasm/bridge.ts +1 -0
  275. package/src/plugins/impl/FileBrowserPlugin.tsx +4 -4
  276. package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +309 -0
  277. package/src/plugins/impl/mpl-interactive/__tests__/mpl-websocket-shim.test.ts +110 -0
  278. package/src/plugins/impl/mpl-interactive/mpl-websocket-shim.ts +57 -0
  279. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +8 -2
  280. package/src/plugins/plugins.ts +2 -0
  281. package/src/utils/__tests__/filenames.test.ts +7 -0
  282. package/src/utils/__tests__/smartMatch.test.ts +61 -0
  283. package/src/utils/filenames.ts +3 -0
  284. package/src/utils/smartMatch.ts +62 -0
  285. package/dist/assets/add-connection-dialog-9CzjZlY9.js +0 -138
  286. package/dist/assets/ai-model-dropdown-C3Y44M85.js +0 -5
  287. package/dist/assets/channel-k8gMdpPa.js +0 -1
  288. package/dist/assets/classDiagram-2ON5EDUG-DDFZaNDy.js +0 -1
  289. package/dist/assets/classDiagram-v2-WZHVMYZB-CEbmnHKU.js +0 -1
  290. package/dist/assets/command-DQqqP-WF.js +0 -1
  291. package/dist/assets/command-palette-BSS73m03.js +0 -1
  292. package/dist/assets/components-CF9x5raB.js +0 -1
  293. package/dist/assets/context-B1_BdDTF.js +0 -1
  294. package/dist/assets/context-aware-panel-HnyO4-L2.js +0 -3
  295. package/dist/assets/dist-B8osAFLA.js +0 -1
  296. package/dist/assets/dist-BYtATjzn.js +0 -1
  297. package/dist/assets/dist-Bb40mZM7.js +0 -1
  298. package/dist/assets/dist-C3z6pMsI.js +0 -1
  299. package/dist/assets/dist-CA6NQs25.js +0 -1
  300. package/dist/assets/dist-CCW85AP3.js +0 -1
  301. package/dist/assets/dist-CCnNQVp_.js +0 -1
  302. package/dist/assets/dist-CRVvx8nD.js +0 -1
  303. package/dist/assets/dist-CdZb2Grj.js +0 -1
  304. package/dist/assets/dist-ClLHDbNP.js +0 -1
  305. package/dist/assets/dist-CtKltiBh.js +0 -1
  306. package/dist/assets/dist-D-_c0KFz.js +0 -1
  307. package/dist/assets/dist-D6kWc2hF.js +0 -1
  308. package/dist/assets/dist-D89dID68.js +0 -1
  309. package/dist/assets/dist-DU2EJ7el.js +0 -3
  310. package/dist/assets/dist-DUY6xZX8.js +0 -13
  311. package/dist/assets/dist-DVHYieHl.js +0 -1
  312. package/dist/assets/dist-Q0mIwD1V.js +0 -1
  313. package/dist/assets/dist-aBuSkHFR.js +0 -1
  314. package/dist/assets/dist-gm5AeuIM.js +0 -1
  315. package/dist/assets/dist-p-IM2PMR.js +0 -1
  316. package/dist/assets/download-BTm4CTKr.js +0 -9
  317. package/dist/assets/edit-page-26-lDVMB.js +0 -13
  318. package/dist/assets/file-code-D9wtWSiR.js +0 -1
  319. package/dist/assets/file-explorer-panel-Bv8lRdKl.js +0 -1
  320. package/dist/assets/home-page-BXQp6S6h.js +0 -4
  321. package/dist/assets/html-to-image-b9BimK8l.js +0 -2
  322. package/dist/assets/index-B8ImLAg8.js +0 -38
  323. package/dist/assets/input-BPldEXfy.js +0 -1
  324. package/dist/assets/katex-YDobqqVd.js +0 -1
  325. package/dist/assets/layout-DVAA7kHH.js +0 -5
  326. package/dist/assets/mermaid-4DMBBIKO-C0QemhGt.js +0 -1
  327. package/dist/assets/purify.es-CPplrWRQ.js +0 -2
  328. package/dist/assets/react-vega-1nuO-sn0.js +0 -1
  329. package/dist/assets/session-panel-B_8ny7jh.js +0 -1
  330. package/dist/assets/stateDiagram-v2-4FDKWEC3-ct96_mle.js +0 -1
  331. package/dist/assets/stex-pjf-hOob.js +0 -1
  332. package/dist/assets/tracing-panel-Dz9mRjXj.js +0 -2
  333. package/dist/assets/types-DFiYrN2w.js +0 -17
  334. package/dist/assets/useBoolean-eWwLICkT.js +0 -1
  335. package/dist/assets/useCellActionButton-DFgACqVf.js +0 -1
  336. package/dist/assets/useEventListener-CjXriKgk.js +0 -1
  337. package/dist/assets/useNotebookActions-XGX8NzaB.js +0 -1
  338. package/dist/assets/usePress-DsLftN-x.js +0 -7
  339. /package/dist/assets/{Deferred-D2igisxY.js → Deferred-BMfCOLaw.js} +0 -0
  340. /package/dist/assets/{SSRProvider-DC7ElCZZ.js → SSRProvider-CwqN9FWV.js} +0 -0
  341. /package/dist/assets/{alert-0YTlkh9P.js → alert-Bs8tbZo_.js} +0 -0
  342. /package/dist/assets/{badge-CNBv2dAU.js → badge-BUFDGZ04.js} +0 -0
  343. /package/dist/assets/{blob-CObhN-9g.js → blob-DgooIGjS.js} +0 -0
  344. /package/dist/assets/{defaultLocale-DK1MWd7f.js → defaultLocale-CGfP-Ye3.js} +0 -0
  345. /package/dist/assets/{defaultLocale-OkOxlkkM.js → defaultLocale-CuYNS33t.js} +0 -0
  346. /package/dist/assets/{emotion-is-prop-valid.esm-D7FeWASw.js → emotion-is-prop-valid.esm-lG8j6oqk.js} +0 -0
  347. /package/dist/assets/{en-US-DBqDb4Nb.js → en-US-k6sS5Nab.js} +0 -0
  348. /package/dist/assets/{errors-Bfogio62.js → errors-0IrrdfSG.js} +0 -0
  349. /package/dist/assets/{extends-aq1t6BkR.js → extends-B9D0JO9U.js} +0 -0
  350. /package/dist/assets/{github-BrsjF9dp.js → github-BY6XM4ej.js} +0 -0
  351. /package/dist/assets/{isValid-D3F4nmET.js → isValid-CUXKlcrM.js} +0 -0
  352. /package/dist/assets/{katex-rvFxOCU-.js → katex-FSdXOW5Y.js} +0 -0
  353. /package/dist/assets/{kbd-CVbqSkT8.js → kbd-Rn7tWvNg.js} +0 -0
  354. /package/dist/assets/{link-Cpo6yhBB.js → link-BmtFffTv.js} +0 -0
  355. /package/dist/assets/{links-BKV6zi_7.js → links-MkDbmF2p.js} +0 -0
  356. /package/dist/assets/{objectWithoutPropertiesLoose-Dxmp_Bd_.js → objectWithoutPropertiesLoose-CboCOq4o.js} +0 -0
  357. /package/dist/assets/{ordinal-BEKpVWu-.js → ordinal-DMIExrUm.js} +0 -0
  358. /package/dist/assets/{paths-bMgYkaP2.js → paths-D2lG83Oh.js} +0 -0
  359. /package/dist/assets/{play-D4Tdvkms.js → play-CkqWG85-.js} +0 -0
  360. /package/dist/assets/{plus-B-s-VRHt.js → plus-C9B_qWUi.js} +0 -0
  361. /package/dist/assets/{preload-helper-TXkS1QI3.js → preload-helper-BW0IMuFq.js} +0 -0
  362. /package/dist/assets/{prop-types-DRf51_gT.js → prop-types-C638SUfx.js} +0 -0
  363. /package/dist/assets/{range-DNqFcYmr.js → range-ClqUI25v.js} +0 -0
  364. /package/dist/assets/{refresh-ccw-BOzRCrXK.js → refresh-ccw-B3lGEyQm.js} +0 -0
  365. /package/dist/assets/{refresh-cw-DeCFDX1B.js → refresh-cw-fLeDriQe.js} +0 -0
  366. /package/dist/assets/{rotate-ccw-BG5BZyzw.js → rotate-ccw-DgH8qERb.js} +0 -0
  367. /package/dist/assets/{save-I_RGv5p0.js → save-C91FTnFa.js} +0 -0
  368. /package/dist/assets/{settings-DD8FJvQ_.js → settings-DRfuuLRT.js} +0 -0
  369. /package/dist/assets/{spinner-DCSoZZhh.js → spinner-Dt4SmUsI.js} +0 -0
  370. /package/dist/assets/{square-oV8Csj8Y.js → square-DZpWT_hp.js} +0 -0
  371. /package/dist/assets/{square-function-4zY5Dv0P.js → square-function-DEp1ozoA.js} +0 -0
  372. /package/dist/assets/{stex-FMMSUPAS.js → stex-0ac7Aukl.js} +0 -0
  373. /package/dist/assets/{trash-2-DtQaB9NM.js → trash-2-CrA4LwJ2.js} +0 -0
  374. /package/dist/assets/{trash-Basz0Kvc.js → trash-ZGxZ3QGq.js} +0 -0
  375. /package/dist/assets/{triangle-alert-n1-FF7zs.js → triangle-alert-CzmxsxFO.js} +0 -0
  376. /package/dist/assets/{types-BhvWC48z.js → types-CswNghXe.js} +0 -0
  377. /package/dist/assets/{use-toast-BhMe50aT.js → use-toast-Hc8CXlvz.js} +0 -0
  378. /package/dist/assets/{useAsyncData-DVm0BCFt.js → useAsyncData-CI3ntihq.js} +0 -0
  379. /package/dist/assets/{useDebounce-BUC67G8E.js → useDebounce-S9zaMzrr.js} +0 -0
  380. /package/dist/assets/{uuid-ImXS-885.js → uuid-ClFZlR7U.js} +0 -0
  381. /package/dist/assets/{workflow-CU6kAL_h.js → workflow-DgZ_19fF.js} +0 -0
  382. /package/dist/assets/{youtube-fKFch587.js → youtube-DfMgNU9-.js} +0 -0
@@ -1 +1 @@
1
- import{s as F}from"./chunk-LvLJmgfZ.js";import{t as ee}from"./react-Bj1aDYRI.js";import{t as te}from"./compiler-runtime-B3qBwwSJ.js";import{r as S}from"./useEventListener-CjXriKgk.js";import{t as re}from"./jsx-runtime-CP2fAiZX.js";import{t as ne}from"./cn-d_A4rA-x.js";import{E as oe,S as ie,_ as ae,b as le,c as se,d as ce,f as ue,m as de,s as pe,u as fe,w,x as K}from"./Combination-tjZP3FH6.js";import{a as he,c as X,i as xe,o as me,s as ge,t as ve}from"./dist-CIU0Lack.js";var s=F(ee(),1),p=F(re(),1),[_,Ve]=oe("Tooltip",[X]),R=X(),Y="TooltipProvider",ye=700,L="tooltip.open",[be,O]=_(Y),M=r=>{let{__scopeTooltip:e,delayDuration:t=ye,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=r,l=s.useRef(!0),u=s.useRef(!1),a=s.useRef(0);return s.useEffect(()=>{let f=a.current;return()=>window.clearTimeout(f)},[]),(0,p.jsx)(be,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(a.current),l.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.current=!0,n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:s.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:i})};M.displayName=Y;var E="Tooltip",[we,j]=_(E),z=r=>{let{__scopeTooltip:e,children:t,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:l,delayDuration:u}=r,a=O(E,r.__scopeTooltip),f=R(e),[c,x]=s.useState(null),h=ue(),d=s.useRef(0),m=l??a.disableHoverableContent,v=u??a.delayDuration,g=s.useRef(!1),[b,y]=ie({prop:n,defaultProp:o??!1,onChange:B=>{B?(a.onOpen(),document.dispatchEvent(new CustomEvent(L))):a.onClose(),i==null||i(B)},caller:E}),T=s.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),D=s.useCallback(()=>{window.clearTimeout(d.current),d.current=0,g.current=!1,y(!0)},[y]),P=s.useCallback(()=>{window.clearTimeout(d.current),d.current=0,y(!1)},[y]),A=s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>{g.current=!0,y(!0),d.current=0},v)},[v,y]);return s.useEffect(()=>()=>{d.current&&(d.current=(window.clearTimeout(d.current),0))},[]),(0,p.jsx)(ge,{...f,children:(0,p.jsx)(we,{scope:e,contentId:h,open:b,stateAttribute:T,trigger:c,onTriggerChange:x,onTriggerEnter:s.useCallback(()=>{a.isOpenDelayedRef.current?A():D()},[a.isOpenDelayedRef,A,D]),onTriggerLeave:s.useCallback(()=>{m?P():(window.clearTimeout(d.current),d.current=0)},[P,m]),onOpen:D,onClose:P,disableHoverableContent:m,children:t})})};z.displayName=E;var I="TooltipTrigger",q=s.forwardRef((r,e)=>{let{__scopeTooltip:t,...n}=r,o=j(I,t),i=O(I,t),l=R(t),u=S(e,s.useRef(null),o.onTriggerChange),a=s.useRef(!1),f=s.useRef(!1),c=s.useCallback(()=>a.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),(0,p.jsx)(xe,{asChild:!0,...l,children:(0,p.jsx)(ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:w(r.onPointerMove,x=>{x.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:w(r.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:w(r.onPointerDown,()=>{o.open&&o.onClose(),a.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:w(r.onFocus,()=>{a.current||o.onOpen()}),onBlur:w(r.onBlur,o.onClose),onClick:w(r.onClick,o.onClose)})})});q.displayName=I;var N="TooltipPortal",[Ce,Te]=_(N,{forceMount:void 0}),G=r=>{let{__scopeTooltip:e,forceMount:t,children:n,container:o}=r,i=j(N,e);return(0,p.jsx)(Ce,{scope:e,forceMount:t,children:(0,p.jsx)(K,{present:t||i.open,children:(0,p.jsx)(ce,{asChild:!0,container:o,children:n})})})};G.displayName=N;var C="TooltipContent",J=s.forwardRef((r,e)=>{let t=Te(C,r.__scopeTooltip),{forceMount:n=t.forceMount,side:o="top",...i}=r,l=j(C,r.__scopeTooltip);return(0,p.jsx)(K,{present:n||l.open,children:l.disableHoverableContent?(0,p.jsx)(Q,{side:o,...i,ref:e}):(0,p.jsx)(Ee,{side:o,...i,ref:e})})}),Ee=s.forwardRef((r,e)=>{let t=j(C,r.__scopeTooltip),n=O(C,r.__scopeTooltip),o=s.useRef(null),i=S(e,o),[l,u]=s.useState(null),{trigger:a,onClose:f}=t,c=o.current,{onPointerInTransitChange:x}=n,h=s.useCallback(()=>{u(null),x(!1)},[x]),d=s.useCallback((m,v)=>{let g=m.currentTarget,b={x:m.clientX,y:m.clientY},y=Pe(b,De(b,g.getBoundingClientRect())),T=Le(v.getBoundingClientRect());u(Me([...y,...T])),x(!0)},[x]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(a&&c){let m=g=>d(g,c),v=g=>d(g,a);return a.addEventListener("pointerleave",m),c.addEventListener("pointerleave",v),()=>{a.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",v)}}},[a,c,d,h]),s.useEffect(()=>{if(l){let m=v=>{let g=v.target,b={x:v.clientX,y:v.clientY},y=(a==null?void 0:a.contains(g))||(c==null?void 0:c.contains(g)),T=!Oe(b,l);y?h():T&&(h(),f())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[a,c,l,f,h]),(0,p.jsx)(Q,{...r,ref:i})}),[je,_e]=_(E,{isInside:!1}),Re=le("TooltipContent"),Q=s.forwardRef((r,e)=>{let{__scopeTooltip:t,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:l,...u}=r,a=j(C,t),f=R(t),{onClose:c}=a;return s.useEffect(()=>(document.addEventListener(L,c),()=>document.removeEventListener(L,c)),[c]),s.useEffect(()=>{if(a.trigger){let x=h=>{var d;(d=h.target)!=null&&d.contains(a.trigger)&&c()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[a.trigger,c]),(0,p.jsx)(de,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:x=>x.preventDefault(),onDismiss:c,children:(0,p.jsxs)(me,{"data-state":a.stateAttribute,...f,...u,ref:e,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,p.jsx)(Re,{children:n}),(0,p.jsx)(je,{scope:t,isInside:!0,children:(0,p.jsx)(ve,{id:a.contentId,role:"tooltip",children:o||n})})]})})});J.displayName=C;var U="TooltipArrow",ke=s.forwardRef((r,e)=>{let{__scopeTooltip:t,...n}=r,o=R(t);return _e(U,t).isInside?null:(0,p.jsx)(he,{...o,...n,ref:e})});ke.displayName=U;function De(r,e){let t=Math.abs(e.top-r.y),n=Math.abs(e.bottom-r.y),o=Math.abs(e.right-r.x),i=Math.abs(e.left-r.x);switch(Math.min(t,n,o,i)){case i:return"left";case o:return"right";case t:return"top";case n:return"bottom";default:throw Error("unreachable")}}function Pe(r,e,t=5){let n=[];switch(e){case"top":n.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":n.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":n.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":n.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t});break}return n}function Le(r){let{top:e,right:t,bottom:n,left:o}=r;return[{x:o,y:e},{x:t,y:e},{x:t,y:n},{x:o,y:n}]}function Oe(r,e){let{x:t,y:n}=r,o=!1;for(let i=0,l=e.length-1;i<e.length;l=i++){let u=e[i],a=e[l],f=u.x,c=u.y,x=a.x,h=a.y;c>n!=h>n&&t<(x-f)*(n-c)/(h-c)+f&&(o=!o)}return o}function Me(r){let e=r.slice();return e.sort((t,n)=>t.x<n.x?-1:t.x>n.x?1:t.y<n.y?-1:t.y>n.y?1:0),Ie(e)}function Ie(r){if(r.length<=1)return r.slice();let e=[];for(let n=0;n<r.length;n++){let o=r[n];for(;e.length>=2;){let i=e[e.length-1],l=e[e.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))e.pop();else break}e.push(o)}e.pop();let t=[];for(let n=r.length-1;n>=0;n--){let o=r[n];for(;t.length>=2;){let i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Ne=M,He=z,Ae=q,Be=G,V=J,H=te(),Fe=r=>{let e=(0,H.c)(6),t,n;e[0]===r?(t=e[1],n=e[2]):({delayDuration:n,...t}=r,e[0]=r,e[1]=t,e[2]=n);let o=n===void 0?400:n,i;return e[3]!==o||e[4]!==t?(i=(0,p.jsx)(Ne,{delayDuration:o,...t}),e[3]=o,e[4]=t,e[5]=i):i=e[5],i},W=pe(Be),Z=He,Se=se(V),$=Ae,k=s.forwardRef((r,e)=>{let t=(0,H.c)(11),n,o,i;t[0]===r?(n=t[1],o=t[2],i=t[3]):({className:n,sideOffset:i,...o}=r,t[0]=r,t[1]=n,t[2]=o,t[3]=i);let l=i===void 0?4:i,u;t[4]===n?u=t[5]:(u=ne("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-xs data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",n),t[4]=n,t[5]=u);let a;return t[6]!==o||t[7]!==e||t[8]!==l||t[9]!==u?(a=(0,p.jsx)(fe,{children:(0,p.jsx)(Se,{ref:e,sideOffset:l,className:u,...o})}),t[6]=o,t[7]=e,t[8]=l,t[9]=u,t[10]=a):a=t[10],a});k.displayName=V.displayName;var Ke=r=>{let e=(0,H.c)(22),t,n,o,i,l,u,a,f;e[0]===r?(t=e[1],n=e[2],o=e[3],i=e[4],l=e[5],u=e[6],a=e[7],f=e[8]):({content:o,children:n,usePortal:u,asChild:a,tabIndex:f,side:l,align:t,...i}=r,e[0]=r,e[1]=t,e[2]=n,e[3]=o,e[4]=i,e[5]=l,e[6]=u,e[7]=a,e[8]=f);let c=u===void 0?!0:u,x=a===void 0?!0:a;if(o==null||o==="")return n;let h;e[9]!==x||e[10]!==n||e[11]!==f?(h=(0,p.jsx)($,{asChild:x,tabIndex:f,children:n}),e[9]=x,e[10]=n,e[11]=f,e[12]=h):h=e[12];let d;e[13]!==t||e[14]!==o||e[15]!==l||e[16]!==c?(d=c?(0,p.jsx)(W,{children:(0,p.jsx)(k,{side:l,align:t,children:o})}):(0,p.jsx)(k,{side:l,align:t,children:o}),e[13]=t,e[14]=o,e[15]=l,e[16]=c,e[17]=d):d=e[17];let m;return e[18]!==i||e[19]!==h||e[20]!==d?(m=(0,p.jsxs)(Z,{disableHoverableContent:!0,...i,children:[h,d]}),e[18]=i,e[19]=h,e[20]=d,e[21]=m):m=e[21],m};export{Z as a,Fe as i,k as n,$ as o,W as r,M as s,Ke as t};
1
+ import{s as F}from"./chunk-LvLJmgfZ.js";import{t as ee}from"./react-Bj1aDYRI.js";import{t as te}from"./compiler-runtime-B3qBwwSJ.js";import{r as S}from"./useEventListener-DP66hBzA.js";import{t as re}from"./jsx-runtime-CP2fAiZX.js";import{t as ne}from"./cn-d_A4rA-x.js";import{E as oe,S as ie,_ as ae,b as le,c as se,d as ce,f as ue,m as de,s as pe,u as fe,w,x as K}from"./Combination-lAuBMOg4.js";import{a as he,c as X,i as xe,o as me,s as ge,t as ve}from"./dist-qkIhd7iG.js";var s=F(ee(),1),p=F(re(),1),[_,Ve]=oe("Tooltip",[X]),R=X(),Y="TooltipProvider",ye=700,L="tooltip.open",[be,O]=_(Y),M=r=>{let{__scopeTooltip:e,delayDuration:t=ye,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:i}=r,l=s.useRef(!0),u=s.useRef(!1),a=s.useRef(0);return s.useEffect(()=>{let f=a.current;return()=>window.clearTimeout(f)},[]),(0,p.jsx)(be,{scope:e,isOpenDelayedRef:l,delayDuration:t,onOpen:s.useCallback(()=>{window.clearTimeout(a.current),l.current=!1},[]),onClose:s.useCallback(()=>{window.clearTimeout(a.current),a.current=window.setTimeout(()=>l.current=!0,n)},[n]),isPointerInTransitRef:u,onPointerInTransitChange:s.useCallback(f=>{u.current=f},[]),disableHoverableContent:o,children:i})};M.displayName=Y;var E="Tooltip",[we,j]=_(E),z=r=>{let{__scopeTooltip:e,children:t,open:n,defaultOpen:o,onOpenChange:i,disableHoverableContent:l,delayDuration:u}=r,a=O(E,r.__scopeTooltip),f=R(e),[c,x]=s.useState(null),h=ue(),d=s.useRef(0),m=l??a.disableHoverableContent,v=u??a.delayDuration,g=s.useRef(!1),[b,y]=ie({prop:n,defaultProp:o??!1,onChange:B=>{B?(a.onOpen(),document.dispatchEvent(new CustomEvent(L))):a.onClose(),i==null||i(B)},caller:E}),T=s.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),D=s.useCallback(()=>{window.clearTimeout(d.current),d.current=0,g.current=!1,y(!0)},[y]),P=s.useCallback(()=>{window.clearTimeout(d.current),d.current=0,y(!1)},[y]),A=s.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>{g.current=!0,y(!0),d.current=0},v)},[v,y]);return s.useEffect(()=>()=>{d.current&&(d.current=(window.clearTimeout(d.current),0))},[]),(0,p.jsx)(ge,{...f,children:(0,p.jsx)(we,{scope:e,contentId:h,open:b,stateAttribute:T,trigger:c,onTriggerChange:x,onTriggerEnter:s.useCallback(()=>{a.isOpenDelayedRef.current?A():D()},[a.isOpenDelayedRef,A,D]),onTriggerLeave:s.useCallback(()=>{m?P():(window.clearTimeout(d.current),d.current=0)},[P,m]),onOpen:D,onClose:P,disableHoverableContent:m,children:t})})};z.displayName=E;var I="TooltipTrigger",q=s.forwardRef((r,e)=>{let{__scopeTooltip:t,...n}=r,o=j(I,t),i=O(I,t),l=R(t),u=S(e,s.useRef(null),o.onTriggerChange),a=s.useRef(!1),f=s.useRef(!1),c=s.useCallback(()=>a.current=!1,[]);return s.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),(0,p.jsx)(xe,{asChild:!0,...l,children:(0,p.jsx)(ae.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:u,onPointerMove:w(r.onPointerMove,x=>{x.pointerType!=="touch"&&!f.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:w(r.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:w(r.onPointerDown,()=>{o.open&&o.onClose(),a.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:w(r.onFocus,()=>{a.current||o.onOpen()}),onBlur:w(r.onBlur,o.onClose),onClick:w(r.onClick,o.onClose)})})});q.displayName=I;var N="TooltipPortal",[Ce,Te]=_(N,{forceMount:void 0}),G=r=>{let{__scopeTooltip:e,forceMount:t,children:n,container:o}=r,i=j(N,e);return(0,p.jsx)(Ce,{scope:e,forceMount:t,children:(0,p.jsx)(K,{present:t||i.open,children:(0,p.jsx)(ce,{asChild:!0,container:o,children:n})})})};G.displayName=N;var C="TooltipContent",J=s.forwardRef((r,e)=>{let t=Te(C,r.__scopeTooltip),{forceMount:n=t.forceMount,side:o="top",...i}=r,l=j(C,r.__scopeTooltip);return(0,p.jsx)(K,{present:n||l.open,children:l.disableHoverableContent?(0,p.jsx)(Q,{side:o,...i,ref:e}):(0,p.jsx)(Ee,{side:o,...i,ref:e})})}),Ee=s.forwardRef((r,e)=>{let t=j(C,r.__scopeTooltip),n=O(C,r.__scopeTooltip),o=s.useRef(null),i=S(e,o),[l,u]=s.useState(null),{trigger:a,onClose:f}=t,c=o.current,{onPointerInTransitChange:x}=n,h=s.useCallback(()=>{u(null),x(!1)},[x]),d=s.useCallback((m,v)=>{let g=m.currentTarget,b={x:m.clientX,y:m.clientY},y=Pe(b,De(b,g.getBoundingClientRect())),T=Le(v.getBoundingClientRect());u(Me([...y,...T])),x(!0)},[x]);return s.useEffect(()=>()=>h(),[h]),s.useEffect(()=>{if(a&&c){let m=g=>d(g,c),v=g=>d(g,a);return a.addEventListener("pointerleave",m),c.addEventListener("pointerleave",v),()=>{a.removeEventListener("pointerleave",m),c.removeEventListener("pointerleave",v)}}},[a,c,d,h]),s.useEffect(()=>{if(l){let m=v=>{let g=v.target,b={x:v.clientX,y:v.clientY},y=(a==null?void 0:a.contains(g))||(c==null?void 0:c.contains(g)),T=!Oe(b,l);y?h():T&&(h(),f())};return document.addEventListener("pointermove",m),()=>document.removeEventListener("pointermove",m)}},[a,c,l,f,h]),(0,p.jsx)(Q,{...r,ref:i})}),[je,_e]=_(E,{isInside:!1}),Re=le("TooltipContent"),Q=s.forwardRef((r,e)=>{let{__scopeTooltip:t,children:n,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:l,...u}=r,a=j(C,t),f=R(t),{onClose:c}=a;return s.useEffect(()=>(document.addEventListener(L,c),()=>document.removeEventListener(L,c)),[c]),s.useEffect(()=>{if(a.trigger){let x=h=>{var d;(d=h.target)!=null&&d.contains(a.trigger)&&c()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[a.trigger,c]),(0,p.jsx)(de,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:x=>x.preventDefault(),onDismiss:c,children:(0,p.jsxs)(me,{"data-state":a.stateAttribute,...f,...u,ref:e,style:{...u.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,p.jsx)(Re,{children:n}),(0,p.jsx)(je,{scope:t,isInside:!0,children:(0,p.jsx)(ve,{id:a.contentId,role:"tooltip",children:o||n})})]})})});J.displayName=C;var U="TooltipArrow",ke=s.forwardRef((r,e)=>{let{__scopeTooltip:t,...n}=r,o=R(t);return _e(U,t).isInside?null:(0,p.jsx)(he,{...o,...n,ref:e})});ke.displayName=U;function De(r,e){let t=Math.abs(e.top-r.y),n=Math.abs(e.bottom-r.y),o=Math.abs(e.right-r.x),i=Math.abs(e.left-r.x);switch(Math.min(t,n,o,i)){case i:return"left";case o:return"right";case t:return"top";case n:return"bottom";default:throw Error("unreachable")}}function Pe(r,e,t=5){let n=[];switch(e){case"top":n.push({x:r.x-t,y:r.y+t},{x:r.x+t,y:r.y+t});break;case"bottom":n.push({x:r.x-t,y:r.y-t},{x:r.x+t,y:r.y-t});break;case"left":n.push({x:r.x+t,y:r.y-t},{x:r.x+t,y:r.y+t});break;case"right":n.push({x:r.x-t,y:r.y-t},{x:r.x-t,y:r.y+t});break}return n}function Le(r){let{top:e,right:t,bottom:n,left:o}=r;return[{x:o,y:e},{x:t,y:e},{x:t,y:n},{x:o,y:n}]}function Oe(r,e){let{x:t,y:n}=r,o=!1;for(let i=0,l=e.length-1;i<e.length;l=i++){let u=e[i],a=e[l],f=u.x,c=u.y,x=a.x,h=a.y;c>n!=h>n&&t<(x-f)*(n-c)/(h-c)+f&&(o=!o)}return o}function Me(r){let e=r.slice();return e.sort((t,n)=>t.x<n.x?-1:t.x>n.x?1:t.y<n.y?-1:t.y>n.y?1:0),Ie(e)}function Ie(r){if(r.length<=1)return r.slice();let e=[];for(let n=0;n<r.length;n++){let o=r[n];for(;e.length>=2;){let i=e[e.length-1],l=e[e.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))e.pop();else break}e.push(o)}e.pop();let t=[];for(let n=r.length-1;n>=0;n--){let o=r[n];for(;t.length>=2;){let i=t[t.length-1],l=t[t.length-2];if((i.x-l.x)*(o.y-l.y)>=(i.y-l.y)*(o.x-l.x))t.pop();else break}t.push(o)}return t.pop(),e.length===1&&t.length===1&&e[0].x===t[0].x&&e[0].y===t[0].y?e:e.concat(t)}var Ne=M,He=z,Ae=q,Be=G,V=J,H=te(),Fe=r=>{let e=(0,H.c)(6),t,n;e[0]===r?(t=e[1],n=e[2]):({delayDuration:n,...t}=r,e[0]=r,e[1]=t,e[2]=n);let o=n===void 0?400:n,i;return e[3]!==o||e[4]!==t?(i=(0,p.jsx)(Ne,{delayDuration:o,...t}),e[3]=o,e[4]=t,e[5]=i):i=e[5],i},W=pe(Be),Z=He,Se=se(V),$=Ae,k=s.forwardRef((r,e)=>{let t=(0,H.c)(11),n,o,i;t[0]===r?(n=t[1],o=t[2],i=t[3]):({className:n,sideOffset:i,...o}=r,t[0]=r,t[1]=n,t[2]=o,t[3]=i);let l=i===void 0?4:i,u;t[4]===n?u=t[5]:(u=ne("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-xs data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",n),t[4]=n,t[5]=u);let a;return t[6]!==o||t[7]!==e||t[8]!==l||t[9]!==u?(a=(0,p.jsx)(fe,{children:(0,p.jsx)(Se,{ref:e,sideOffset:l,className:u,...o})}),t[6]=o,t[7]=e,t[8]=l,t[9]=u,t[10]=a):a=t[10],a});k.displayName=V.displayName;var Ke=r=>{let e=(0,H.c)(22),t,n,o,i,l,u,a,f;e[0]===r?(t=e[1],n=e[2],o=e[3],i=e[4],l=e[5],u=e[6],a=e[7],f=e[8]):({content:o,children:n,usePortal:u,asChild:a,tabIndex:f,side:l,align:t,...i}=r,e[0]=r,e[1]=t,e[2]=n,e[3]=o,e[4]=i,e[5]=l,e[6]=u,e[7]=a,e[8]=f);let c=u===void 0?!0:u,x=a===void 0?!0:a;if(o==null||o==="")return n;let h;e[9]!==x||e[10]!==n||e[11]!==f?(h=(0,p.jsx)($,{asChild:x,tabIndex:f,children:n}),e[9]=x,e[10]=n,e[11]=f,e[12]=h):h=e[12];let d;e[13]!==t||e[14]!==o||e[15]!==l||e[16]!==c?(d=c?(0,p.jsx)(W,{children:(0,p.jsx)(k,{side:l,align:t,children:o})}):(0,p.jsx)(k,{side:l,align:t,children:o}),e[13]=t,e[14]=o,e[15]=l,e[16]=c,e[17]=d):d=e[17];let m;return e[18]!==i||e[19]!==h||e[20]!==d?(m=(0,p.jsxs)(Z,{disableHoverableContent:!0,...i,children:[h,d]}),e[18]=i,e[19]=h,e[20]=d,e[21]=m):m=e[21],m};export{Z as a,Fe as i,k as n,$ as o,W as r,M as s,Ke as t};
@@ -1,4 +1,4 @@
1
- var ue=Object.defineProperty;var ce=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>ce(t,typeof e!="symbol"?e+"":e,n);var at,lt,ot,ut,ct;import{C as de,w as he}from"./_Uint8Array-BGESiCQL.js";import{c as fe,m as ye}from"./useEventListener-CjXriKgk.js";import{St as yt,a as pe,c as ge,gt as me,o as ve,wt as be}from"./vega-loader.browser-CZV6_g2i.js";var xe="[object Number]";function we(t){return typeof t=="number"||de(t)&&he(t)==xe}var Ie=we;const pt=Uint8Array.of(65,82,82,79,87,49),$={V1:0,V2:1,V3:2,V4:3,V5:4},S={NONE:0,Schema:1,DictionaryBatch:2,RecordBatch:3,Tensor:4,SparseTensor:5},l={Dictionary:-1,NONE:0,Null:1,Int:2,Float:3,Binary:4,Utf8:5,Bool:6,Decimal:7,Date:8,Time:9,Timestamp:10,Interval:11,List:12,Struct:13,Union:14,FixedSizeBinary:15,FixedSizeList:16,Map:17,Duration:18,LargeBinary:19,LargeUtf8:20,LargeList:21,RunEndEncoded:22,BinaryView:23,Utf8View:24,ListView:25,LargeListView:26},gt={HALF:0,SINGLE:1,DOUBLE:2},z={DAY:0,MILLISECOND:1},m={SECOND:0,MILLISECOND:1,MICROSECOND:2,NANOSECOND:3},C={YEAR_MONTH:0,DAY_TIME:1,MONTH_DAY_NANO:2},W={Sparse:0,Dense:1},mt=Uint8Array,vt=Uint16Array,bt=Uint32Array,xt=BigUint64Array,wt=Int8Array,Le=Int16Array,x=Int32Array,L=BigInt64Array,Ae=Float32Array,k=Float64Array;function Ne(t,e){let n=Math.log2(t)-3;return(e?[wt,Le,x,L]:[mt,vt,bt,xt])[n]}Object.getPrototypeOf(Int8Array);function X(t,e){let n=0,r=t.length;if(r<=2147483648)do{let i=n+r>>>1;t[i]<=e?n=i+1:r=i}while(n<r);else do{let i=Math.trunc((n+r)/2);t[i]<=e?n=i+1:r=i}while(n<r);return n}function J(t,e,n){if(e(t))return t;throw Error(n(t))}function w(t,e,n){return e=Array.isArray(e)?e:Object.values(e),J(t,r=>e.includes(r),n??(()=>`${t} must be one of ${e}`))}function It(t,e){for(let[n,r]of Object.entries(t))if(r===e)return n;return"<Unknown>"}const G=t=>`Unsupported data type: "${It(l,t)}" (id ${t})`,Lt=(t,e,n=!0,r=null)=>({name:t,type:e,nullable:n,metadata:r});function At(t){return Object.hasOwn(t,"name")&&Nt(t.type)}function Nt(t){return typeof(t==null?void 0:t.typeId)=="number"}function B(t,e="",n=!0){return At(t)?t:Lt(e,J(t,Nt,()=>"Data type expected."),n)}const Ee=(t,e,n=!1,r=-1)=>({typeId:l.Dictionary,id:r,dictionary:t,indices:e||Dt(),ordered:n}),Et=(t=32,e=!0)=>({typeId:l.Int,bitWidth:w(t,[8,16,32,64]),signed:e,values:Ne(t,e)}),Dt=()=>Et(32),De=(t=2)=>({typeId:l.Float,precision:w(t,gt),values:[vt,Ae,k][t]}),Se=()=>({typeId:l.Binary,offsets:x}),Be=()=>({typeId:l.Utf8,offsets:x}),Oe=(t,e,n=128)=>({typeId:l.Decimal,precision:t,scale:e,bitWidth:w(n,[128,256]),values:xt}),Te=t=>({typeId:l.Date,unit:w(t,z),values:t===z.DAY?x:L}),Me=(t=m.MILLISECOND,e=32)=>({typeId:l.Time,unit:w(t,m),bitWidth:w(e,[32,64]),values:e===32?x:L}),Ce=(t=m.MILLISECOND,e=null)=>({typeId:l.Timestamp,unit:w(t,m),timezone:e,values:L}),Ue=(t=C.MONTH_DAY_NANO)=>({typeId:l.Interval,unit:w(t,C),values:t===C.MONTH_DAY_NANO?void 0:x}),Ve=t=>({typeId:l.List,children:[B(t)],offsets:x}),Fe=t=>({typeId:l.Struct,children:Array.isArray(t)&&At(t[0])?t:Object.entries(t).map(([e,n])=>Lt(e,n))}),Re=(t,e,n,r)=>(n??(n=e.map((i,s)=>s)),{typeId:l.Union,mode:w(t,W),typeIds:n,typeMap:n.reduce((i,s,a)=>(i[s]=a,i),{}),children:e.map((i,s)=>B(i,`_${s}`)),typeIdForValue:r,offsets:x}),$e=t=>({typeId:l.FixedSizeBinary,stride:t}),ze=(t,e)=>({typeId:l.FixedSizeList,stride:e,children:[B(t)]}),ke=(t,e)=>({typeId:l.Map,keysSorted:t,children:[e],offsets:x}),je=(t=m.MILLISECOND)=>({typeId:l.Duration,unit:w(t,m),values:L}),Ye=()=>({typeId:l.LargeBinary,offsets:L}),_e=()=>({typeId:l.LargeUtf8,offsets:L}),He=t=>({typeId:l.LargeList,children:[B(t)],offsets:L}),Pe=(t,e)=>({typeId:l.RunEndEncoded,children:[J(B(t,"run_ends"),n=>n.type.typeId===l.Int,()=>"Run-ends must have an integer type."),B(e,"values")]}),We=t=>({typeId:l.ListView,children:[B(t,"value")],offsets:x}),Xe=t=>({typeId:l.LargeListView,children:[B(t,"value")],offsets:L});var j=new k(2).buffer;new L(j),new bt(j),new x(j),new mt(j);function O(t){if(t>2**53-1||t<-(2**53-1))throw Error(`BigInt exceeds integer number representation: ${t}`);return Number(t)}function Z(t,e){return Number(t/e)+Number(t%e)/Number(e)}var U=t=>BigInt.asUintN(64,t);function Je(t,e){let n=e<<1,r;return BigInt.asIntN(64,t[n+1])<0?(r=U(~t[n])|U(~t[n+1])<<64n,r=-(r+1n)):r=t[n]|t[n+1]<<64n,r}function Ge(t,e){let n=e<<2,r;return BigInt.asIntN(64,t[n+3])<0?(r=U(~t[n])|U(~t[n+1])<<64n|U(~t[n+2])<<128n|U(~t[n+3])<<192n,r=-(r+1n)):r=t[n]|t[n+1]<<64n|t[n+2]<<128n|t[n+3]<<192n,r}var Ze=new TextDecoder("utf-8");new TextEncoder;function Y(t){return Ze.decode(t)}function St(t,e){return(t[e>>3]&1<<e%8)!=0}function N(t,e){let n=e+h(t,e),r=n-h(t,n),i=v(t,r);return(s,a,o=null)=>{if(s<i){let u=v(t,r+s);if(u)return a(t,n+u)}return o}}function M(t,e){return e}function F(t,e){return!!qe(t,e)}function qe(t,e){return q(t,e)<<24>>24}function q(t,e){return t[e]}function v(t,e){return Ke(t,e)<<16>>16}function Ke(t,e){return t[e]|t[e+1]<<8}function h(t,e){return t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24}function Bt(t,e){return h(t,e)>>>0}function b(t,e){return O(BigInt.asIntN(64,BigInt(Bt(t,e))+(BigInt(Bt(t,e+4))<<32n)))}function _(t,e){let n=e+h(t,e),r=h(t,n);return n+=4,Y(t.subarray(n,n+r))}function T(t,e,n,r){if(!e)return[];let i=e+h(t,e);return Array.from({length:h(t,i)},(s,a)=>r(t,i+4+a*n))}const K=Symbol("rowIndex");function Q(t,e){class n{constructor(s){this[K]=s}toJSON(){return Tt(t,e,this[K])}}let r=n.prototype;for(let i=0;i<t.length;++i){if(Object.hasOwn(r,t[i]))continue;let s=e[i];Object.defineProperty(r,t[i],{get(){return s.at(this[K])},enumerable:!0})}return i=>new n(i)}function Ot(t,e){return n=>Tt(t,e,n)}function Tt(t,e,n){let r={};for(let i=0;i<t.length;++i)r[t[i]]=e[i].at(n);return r}function Qe(t){return t instanceof P}var H=(at=class{constructor({length:t,nullCount:e,type:n,validity:r,values:i,offsets:s,sizes:a,children:o}){this.length=t,this.nullCount=e,this.type=n,this.validity=r,this.values=i,this.offsets=s,this.sizes=a,this.children=o,(!e||!this.validity)&&(this.at=u=>this.value(u))}get[Symbol.toStringTag](){return"Batch"}at(t){return this.isValid(t)?this.value(t):null}isValid(t){return St(this.validity,t)}value(t){return this.values[t]}slice(t,e){let n=e-t,r=Array(n);for(let i=0;i<n;++i)r[i]=this.at(t+i);return r}*[Symbol.iterator](){for(let t=0;t<this.length;++t)yield this.at(t)}},A(at,"ArrayType",null),at),P=class extends H{constructor(t){super(t);let{length:e,values:n}=this;this.values=n.subarray(0,e)}slice(t,e){return this.nullCount?super.slice(t,e):this.values.subarray(t,e)}[Symbol.iterator](){return this.nullCount?super[Symbol.iterator]():this.values[Symbol.iterator]()}},tt=(lt=class extends H{},A(lt,"ArrayType",k),lt),f=(ot=class extends H{},A(ot,"ArrayType",Array),ot),tn=class extends f{value(t){return null}},V=class extends tt{value(t){return O(this.values[t])}},en=class extends tt{value(t){let e=this.values[t],n=(e&31744)>>10,r=(e&1023)/1024,i=(-1)**((e&32768)>>15);switch(n){case 31:return i*(r?NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*2**(n-15)*(1+r)}},nn=class extends f{value(t){return St(this.values,t)}},Mt=class extends H{constructor(t){super(t);let{bitWidth:e,scale:n}=this.type;this.decimal=e===128?Je:Ge,this.scale=10n**BigInt(n)}},rn=(ut=class extends Mt{value(t){return Z(this.decimal(this.values,t),this.scale)}},A(ut,"ArrayType",k),ut),sn=(ct=class extends Mt{value(t){return this.decimal(this.values,t)}},A(ct,"ArrayType",Array),ct),Ct=class extends f{constructor(t){super(t),this.source=t}value(t){return new Date(this.source.value(t))}},an=class extends tt{value(t){return 864e5*this.values[t]}};const ln=V;var on=class extends V{value(t){return super.value(t)*1e3}};const un=V;var cn=class extends V{value(t){return Z(this.values[t],1000n)}},dn=class extends V{value(t){return Z(this.values[t],1000000n)}},hn=class extends f{value(t){return this.values.subarray(t<<1,t+1<<1)}},fn=class extends f{value(t){let e=this.values,n=t<<4;return Float64Array.of(h(e,n),h(e,n+4),b(e,n+8))}},Ut=({values:t,offsets:e},n)=>t.subarray(e[n],e[n+1]),Vt=({values:t,offsets:e},n)=>t.subarray(O(e[n]),O(e[n+1])),yn=class extends f{value(t){return Ut(this,t)}},pn=class extends f{value(t){return Vt(this,t)}},gn=class extends f{value(t){return Y(Ut(this,t))}},mn=class extends f{value(t){return Y(Vt(this,t))}},vn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(e[t],e[t+1])}},bn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(O(e[t]),O(e[t+1]))}},xn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(e,n)}},wn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(O(e),O(n))}},Ft=class extends f{constructor(t){super(t),this.stride=this.type.stride}},In=class extends Ft{value(t){let{stride:e,values:n}=this;return n.subarray(t*e,(t+1)*e)}},Ln=class extends Ft{value(t){let{children:e,stride:n}=this;return e[0].slice(t*n,(t+1)*n)}};function Rt({children:t,offsets:e},n){let[r,i]=t[0].children,s=e[n],a=e[n+1],o=[];for(let u=s;u<a;++u)o.push([r.at(u),i.at(u)]);return o}var An=class extends f{value(t){return Rt(this,t)}},Nn=class extends f{value(t){return new Map(Rt(this,t))}},$t=class extends f{constructor({typeIds:t,...e}){super(e),this.typeIds=t,this.typeMap=this.type.typeMap}value(t,e=t){let{typeIds:n,children:r,typeMap:i}=this;return r[i[n[t]]].at(e)}},En=class extends $t{value(t){return super.value(t,this.offsets[t])}},zt=class extends f{constructor(t,e=Ot){super(t),this.names=this.type.children.map(n=>n.name),this.factory=e(this.names,this.children)}value(t){return this.factory(t)}},Dn=class extends zt{constructor(t){super(t,Q)}},Sn=class extends f{value(t){let[{values:e},n]=this.children;return n.at(X(e,t))}},Bn=class extends f{setDictionary(t){return this.dictionary=t,this.cache=t.cache(),this}value(t){return this.cache[this.key(t)]}key(t){return this.values[t]}},kt=class extends f{constructor({data:t,...e}){super(e),this.data=t}view(t){let{values:e,data:n}=this,r=t<<4,i=r+4,s=e,a=h(s,r);return a>12&&(i=h(s,r+12),s=n[h(s,r+8)]),s.subarray(i,i+a)}},On=class extends kt{value(t){return this.view(t)}},Tn=class extends kt{value(t){return Y(this.view(t))}};function jt(t){let e=[];return{add(n){return e.push(n),this},clear:()=>e=[],done:()=>new Mn(e,t)}}var Mn=class{constructor(t,e=(n=>(n=t[0])==null?void 0:n.type)()){this.type=e,this.length=t.reduce((s,a)=>s+a.length,0),this.nullCount=t.reduce((s,a)=>s+a.nullCount,0),this.data=t;let r=t.length,i=new Int32Array(r+1);if(r===1){let[s]=t;i[1]=s.length,this.at=a=>s.at(a)}else for(let s=0,a=0;s<r;++s)i[s+1]=a+=t[s].length;this.offsets=i}get[Symbol.toStringTag](){return"Column"}[Symbol.iterator](){let t=this.data;return t.length===1?t[0][Symbol.iterator]():Cn(t)}at(t){var i;let{data:e,offsets:n}=this,r=X(n,t)-1;return(i=e[r])==null?void 0:i.at(t-n[r])}get(t){return this.at(t)}toArray(){let{length:t,nullCount:e,data:n}=this,r=!e&&Qe(n[0]),i=n.length;if(r&&i===1)return n[0].values;let s=new(!i||e>0?Array:n[0].constructor.ArrayType??n[0].values.constructor)(t);return r?Un(s,n):Vn(s,n)}cache(){return this._cache??(this._cache=this.toArray())}};function*Cn(t){for(let e=0;e<t.length;++e){let n=t[e][Symbol.iterator]();for(let r=n.next();!r.done;r=n.next())yield r.value}}function Un(t,e){for(let n=0,r=0;n<e.length;++n){let{values:i}=e[n];t.set(i,r),r+=i.length}return t}function Vn(t,e){let n=-1;for(let r=0;r<e.length;++r){let i=e[r];for(let s=0;s<i.length;++s)t[++n]=i.at(s)}return t}var Fn=class le{constructor(e,n,r=!1){let i=e.fields.map(a=>a.name);this.schema=e,this.names=i,this.children=n,this.factory=r?Q:Ot;let s=[];this.getFactory=a=>s[a]??(s[a]=this.factory(i,n.map(o=>o.data[a])))}get[Symbol.toStringTag](){return"Table"}get numCols(){return this.names.length}get numRows(){var e;return((e=this.children[0])==null?void 0:e.length)??0}getChildAt(e){return this.children[e]}getChild(e){let n=this.names.findIndex(r=>r===e);return n>-1?this.children[n]:void 0}selectAt(e,n=[]){let{children:r,factory:i,schema:s}=this,{fields:a}=s;return new le({...s,fields:e.map((o,u)=>Rn(a[o],n[u]))},e.map(o=>r[o]),i===Q)}select(e,n){let r=this.names,i=e.map(s=>r.indexOf(s));return this.selectAt(i,n)}toColumns(){let{children:e,names:n}=this,r={};return n.forEach((i,s)=>{var a;return r[i]=((a=e[s])==null?void 0:a.toArray())??[]}),r}toArray(){var a;let{children:e,getFactory:n,numRows:r}=this,i=((a=e[0])==null?void 0:a.data)??[],s=Array(r);for(let o=0,u=-1;o<i.length;++o){let d=n(o);for(let c=0;c<i[o].length;++c)s[++u]=d(c)}return s}*[Symbol.iterator](){var i;let{children:e,getFactory:n}=this,r=((i=e[0])==null?void 0:i.data)??[];for(let s=0;s<r.length;++s){let a=n(s);for(let o=0;o<r[s].length;++o)yield a(o)}}at(e){let{children:n,getFactory:r,numRows:i}=this;if(e<0||e>=i)return null;let[{offsets:s}]=n,a=X(s,e)-1;return r(a)(e-s[a])}get(e){return this.at(e)}};function Rn(t,e){return e!=null&&e!==t.name?{...t,name:e}:t}function $n(t,e={}){let{typeId:n,bitWidth:r,precision:i,unit:s}=t,{useBigInt:a,useDate:o,useDecimalBigInt:u,useMap:d,useProxy:c}=e;switch(n){case l.Null:return tn;case l.Bool:return nn;case l.Int:case l.Time:case l.Duration:return a||r<64?P:V;case l.Float:return i?P:en;case l.Date:return Yt(s===z.DAY?an:ln,o&&Ct);case l.Timestamp:return Yt(s===m.SECOND?on:s===m.MILLISECOND?un:s===m.MICROSECOND?cn:dn,o&&Ct);case l.Decimal:return u?sn:rn;case l.Interval:return s===C.DAY_TIME?hn:s===C.YEAR_MONTH?P:fn;case l.FixedSizeBinary:return In;case l.Utf8:return gn;case l.LargeUtf8:return mn;case l.Binary:return yn;case l.LargeBinary:return pn;case l.BinaryView:return On;case l.Utf8View:return Tn;case l.List:return vn;case l.LargeList:return bn;case l.Map:return d?Nn:An;case l.ListView:return xn;case l.LargeListView:return wn;case l.FixedSizeList:return Ln;case l.Struct:return c?Dn:zt;case l.RunEndEncoded:return Sn;case l.Dictionary:return Bn;case l.Union:return t.mode?En:$t}throw Error(G(n))}function Yt(t,e){return e?class extends e{constructor(n){super(new t(n))}}:t}function zn(t,e){return{offset:b(t,e),metadataLength:h(t,e+8),bodyLength:b(t,e+16)}}function _t(t,e){return T(t,e,24,zn)}function Ht(t,e,n){let r=N(t,e);if(r(10,M,0))throw Error("Record batch compression not implemented");let i=n<$.V4?8:0;return{length:r(4,b,0),nodes:T(t,r(6,M),16,(s,a)=>({length:b(s,a),nullCount:b(s,a+8)})),regions:T(t,r(8,M),16+i,(s,a)=>({offset:b(s,a+i),length:b(s,a+i+8)})),variadic:T(t,r(12,M),8,b)}}function kn(t,e,n){let r=N(t,e);return{id:r(4,b,0),data:r(6,(i,s)=>Ht(i,s,n)),isDelta:r(8,F,!1)}}function Pt(t,e,n,r){w(n,l,G);let i=N(t,e);switch(n){case l.Binary:return Se();case l.Utf8:return Be();case l.LargeBinary:return Ye();case l.LargeUtf8:return _e();case l.List:return Ve(r[0]);case l.ListView:return We(r[0]);case l.LargeList:return He(r[0]);case l.LargeListView:return Xe(r[0]);case l.Struct:return Fe(r);case l.RunEndEncoded:return Pe(r[0],r[1]);case l.Int:return Et(i(4,h,0),i(6,F,!1));case l.Float:return De(i(4,v,gt.HALF));case l.Decimal:return Oe(i(4,h,0),i(6,h,0),i(8,h,128));case l.Date:return Te(i(4,v,z.MILLISECOND));case l.Time:return Me(i(4,v,m.MILLISECOND),i(6,h,32));case l.Timestamp:return Ce(i(4,v,m.SECOND),i(6,_));case l.Interval:return Ue(i(4,v,C.YEAR_MONTH));case l.Duration:return je(i(4,v,m.MILLISECOND));case l.FixedSizeBinary:return $e(i(4,h,0));case l.FixedSizeList:return ze(r[0],i(4,h,0));case l.Map:return ke(i(4,F,!1),r[0]);case l.Union:return Re(i(4,v,W.Sparse),r,T(t,i(6,M),4,h))}return{typeId:n}}function et(t,e){let n=T(t,e,4,(r,i)=>{let s=N(r,i);return[s(4,_),s(6,_)]});return n.length?new Map(n):null}function Wt(t,e,n){let r=N(t,e);return{version:n,endianness:r(4,v,0),fields:r(6,jn,[]),metadata:r(8,et)}}function jn(t,e){return T(t,e,4,Xt)}function Xt(t,e){let n=N(t,e),r=n(8,q,l.NONE),i=n(10,M,0),s=n(12,_n),a=Pt(t,i,r,n(14,(o,u)=>Yn(o,u)));return s&&(s.dictionary=a,a=s),{name:n(4,_),type:a,nullable:n(6,F,!1),metadata:n(16,et)}}function Yn(t,e){let n=T(t,e,4,Xt);return n.length?n:null}function _n(t,e){if(!e)return null;let n=N(t,e);return Ee(null,n(6,Hn,Dt()),n(8,F,!1),n(4,b,0))}function Hn(t,e){return Pt(t,e,l.Int)}var Pn=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,Wn=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`,Xn=t=>`Unsupported message type: ${t} (${It(S,t)})`;function nt(t,e){let n=h(t,e)||0;if(e+=4,n===-1&&(n=h(t,e)||0,e+=4),n===0)return null;let r=t.subarray(e,e+=n);if(r.byteLength<n)throw Error(Pn(n,r.byteLength));let i=N(r,0),s=i(4,v,$.V1),a=i(6,q,S.NONE),o=i(8,M,0),u=i(10,b,0),d;if(o){let c=a===S.Schema?Wt:a===S.DictionaryBatch?kn:a===S.RecordBatch?Ht:null;if(!c)throw Error(Xn(a));if(d=c(r,o,s),u>0){let g=t.subarray(e,e+=u);if(g.byteLength<u)throw Error(Wn(u,g.byteLength));d.body=g}}return{version:s,type:a,index:e,content:d}}function Jn(t){let e=t instanceof ArrayBuffer?new Uint8Array(t):t;return e instanceof Uint8Array&&Gn(e)?qn(e):Zn(e)}function Gn(t){if(!t||t.length<4)return!1;for(let e=0;e<6;++e)if(pt[e]!==t[e])return!1;return!0}function Zn(t){let e=[t].flat(),n,r=[],i=[];for(let s of e){if(!(s instanceof Uint8Array))throw Error("IPC data batch was not a Uint8Array.");let a=0;for(;;){let o=nt(s,a);if(o===null)break;if(a=o.index,o.content)switch(o.type){case S.Schema:n||(n=o.content);break;case S.RecordBatch:r.push(o.content);break;case S.DictionaryBatch:i.push(o.content);break}}}return{schema:n,dictionaries:i,records:r,metadata:null}}function qn(t){let e=t.byteLength-(pt.length+4),n=N(t,e-h(t,e)),r=n(4,v,$.V1),i=n(8,_t,[]),s=n(10,_t,[]);return{schema:n(6,(a,o)=>Wt(a,o,r)),dictionaries:i.map(({offset:a})=>nt(t,a).content),records:s.map(({offset:a})=>nt(t,a).content),metadata:n(12,et)}}function rt(t,e){return Kn(Jn(t),e)}function Kn(t,e={}){let{schema:n={fields:[]},dictionaries:r,records:i}=t,{version:s,fields:a}=n,o=new Map,u=tr(e,s,o),d=new Map;Qn(n,y=>{let p=y.type;p.typeId===l.Dictionary&&d.set(p.id,p.dictionary)});let c=new Map;for(let y of r){let{id:p,data:E,isDelta:D,body:oe}=y,dt=d.get(p),ht=it(dt,u({...E,body:oe}));if(c.has(p)){let ft=c.get(p);D||ft.clear(),ft.add(ht)}else{if(D)throw Error("Delta update can not be first dictionary batch.");c.set(p,jt(dt).add(ht))}}c.forEach((y,p)=>o.set(p,y.done()));let g=a.map(y=>jt(y.type));for(let y of i){let p=u(y);a.forEach((E,D)=>g[D].add(it(E.type,p)))}return new Fn(n,g.map(y=>y.done()),e.useProxy)}function Qn(t,e){t.fields.forEach(function n(r){var i,s,a;e(r),(s=(i=r.type.dictionary)==null?void 0:i.children)==null||s.forEach(n),(a=r.type.children)==null||a.forEach(n)})}function tr(t,e,n){let r={version:e,options:t,dictionary:i=>n.get(i)};return i=>{let{length:s,nodes:a,regions:o,variadic:u,body:d}=i,c=-1,g=-1,y=-1;return{...r,length:s,node:()=>a[++c],buffer:p=>{let{length:E,offset:D}=o[++g];return p?new p(d.buffer,d.byteOffset+D,E/p.BYTES_PER_ELEMENT):d.subarray(D,D+E)},variadic:()=>u[++y],visit(p){return p.map(E=>it(E.type,this))}}}}function it(t,e){let{typeId:n}=t,{length:r,options:i,node:s,buffer:a,variadic:o,version:u}=e,d=$n(t,i);if(n===l.Null)return new d({length:r,nullCount:r,type:t});let c={...s(),type:t};switch(n){case l.Bool:case l.Int:case l.Time:case l.Duration:case l.Float:case l.Decimal:case l.Date:case l.Timestamp:case l.Interval:case l.FixedSizeBinary:return new d({...c,validity:a(),values:a(t.values)});case l.Utf8:case l.LargeUtf8:case l.Binary:case l.LargeBinary:return new d({...c,validity:a(),offsets:a(t.offsets),values:a()});case l.BinaryView:case l.Utf8View:return new d({...c,validity:a(),values:a(),data:Array.from({length:o()},()=>a())});case l.List:case l.LargeList:case l.Map:return new d({...c,validity:a(),offsets:a(t.offsets),children:e.visit(t.children)});case l.ListView:case l.LargeListView:return new d({...c,validity:a(),offsets:a(t.offsets),sizes:a(t.offsets),children:e.visit(t.children)});case l.FixedSizeList:case l.Struct:return new d({...c,validity:a(),children:e.visit(t.children)});case l.RunEndEncoded:return new d({...c,children:e.visit(t.children)});case l.Dictionary:{let{id:g,indices:y}=t;return new d({...c,validity:a(),values:a(y.values)}).setDictionary(e.dictionary(g))}case l.Union:return u<$.V5&&a(),new d({...c,typeIds:a(wt),offsets:t.mode===W.Sparse?null:a(t.offsets),children:e.visit(t.children)});default:throw Error(G(n))}}new Uint16Array(new Uint8Array([1,0]).buffer)[0];function R(t,e){let n=new Map;return(...r)=>{let i=e(...r);if(n.has(i))return n.get(i);let s=t(...r).finally(()=>{n.delete(i)});return n.set(i,s),s}}function st(t,e){return ve(t,e)}function er(){return pe()}const I=ge;function Jt(){let t=nr(er()),e=n=>JSON.stringify(n);return{load:R(t.load.bind(t),e),sanitize:R(t.sanitize.bind(t),e),http:R(t.http.bind(t),e),file:R(t.file.bind(t),e)}}function nr(t){return{...t,async load(e,n){return e.endsWith(".arrow")?rt(await Gt(e),{useProxy:!1}).toArray():t.load(e,n)}}}const Gt=R(t=>fetch(t).then(e=>e.arrayBuffer()),t=>t);var Zt=I.integer,qt=I.number,rr=I.date,ir=I.boolean,Kt=()=>(I.integer=t=>{if(t==="")return"";if(t==="-inf"||t==="inf")return t;function e(r){let i=Zt(r);return Number.isNaN(i)?r:i}let n=Number.parseInt(t,10);if(Ie(n)){if(!(Math.abs(n)>2**53-1))return e(t);try{return BigInt(t)}catch{return e(t)}}else return""},I.number=t=>{if(t==="-inf"||t==="inf")return t;let e=qt(t);return Number.isNaN(e)?t:e},()=>{I.integer=Zt,I.number=qt}),Qt=()=>(I.date=t=>{if(t==="")return"";if(t==null)return null;if(!/^\d{4}-\d{2}-\d{2}(T[\d.:]+(Z|[+-]\d{2}:?\d{2})?)?$/.test(t))return t;try{let e=new Date(t);return Number.isNaN(e.getTime())?t:e}catch{return ye.warn(`Failed to parse date: ${t}`),t}},()=>{I.date=rr});I.boolean=t=>t==="True"?!0:t==="False"?!1:ir(t);const te=Jt();async function sr(t,e,n={}){let{handleBigIntAndNumberLike:r=!1,replacePeriod:i=!1}=n;if(t.endsWith(".arrow")||(e==null?void 0:e.type)==="arrow")return rt(await Gt(t),{useProxy:!0,useDate:!0,useBigInt:r}).toArray();let s=[Qt];r&&s.push(Kt);let a=[];try{let o=await te.load(t);if(!e){if(typeof o=="string")try{JSON.parse(o),e={type:"json"}}catch{e={type:"csv",parse:"auto"}}typeof o=="object"&&(e={type:"json"})}let u=(e==null?void 0:e.type)==="csv";u&&typeof o=="string"&&(o=lr(o)),u&&typeof o=="string"&&i&&(o=or(o));let d=(e==null?void 0:e.parse)||"auto";return typeof d=="object"&&(d=fe.mapValues(d,c=>c==="time"?"string":c==="datetime"?"date":c)),a=s.map(c=>c()),u?st(o,{...e,parse:d}):st(o,e)}finally{a.forEach(o=>o())}}function ar(t,e=!0){let n=[Qt];e&&n.push(Kt);let r=n.map(s=>s()),i=st(t,{type:"csv",parse:"auto"});return r.forEach(s=>s()),i}function lr(t){return t!=null&&t.includes(",")?ee(t,e=>{let n=new Set;return e.map(r=>{let i=cr(r,n);return n.add(i),i})}):t}function or(t){return t!=null&&t.includes(".")?ee(t,e=>e.map(n=>n.replaceAll(".","\u2024"))):t}function ee(t,e){let n=t.split(`
1
+ var ue=Object.defineProperty;var ce=(t,e,n)=>e in t?ue(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>ce(t,typeof e!="symbol"?e+"":e,n);var at,lt,ot,ut,ct;import{C as de,w as he}from"./_Uint8Array-BGESiCQL.js";import{c as fe,m as ye}from"./useEventListener-DP66hBzA.js";import{St as yt,a as pe,c as ge,gt as me,o as ve,wt as be}from"./vega-loader.browser-BJ9oKrvH.js";var xe="[object Number]";function we(t){return typeof t=="number"||de(t)&&he(t)==xe}var Ie=we;const pt=Uint8Array.of(65,82,82,79,87,49),$={V1:0,V2:1,V3:2,V4:3,V5:4},S={NONE:0,Schema:1,DictionaryBatch:2,RecordBatch:3,Tensor:4,SparseTensor:5},l={Dictionary:-1,NONE:0,Null:1,Int:2,Float:3,Binary:4,Utf8:5,Bool:6,Decimal:7,Date:8,Time:9,Timestamp:10,Interval:11,List:12,Struct:13,Union:14,FixedSizeBinary:15,FixedSizeList:16,Map:17,Duration:18,LargeBinary:19,LargeUtf8:20,LargeList:21,RunEndEncoded:22,BinaryView:23,Utf8View:24,ListView:25,LargeListView:26},gt={HALF:0,SINGLE:1,DOUBLE:2},z={DAY:0,MILLISECOND:1},m={SECOND:0,MILLISECOND:1,MICROSECOND:2,NANOSECOND:3},C={YEAR_MONTH:0,DAY_TIME:1,MONTH_DAY_NANO:2},W={Sparse:0,Dense:1},mt=Uint8Array,vt=Uint16Array,bt=Uint32Array,xt=BigUint64Array,wt=Int8Array,Le=Int16Array,x=Int32Array,L=BigInt64Array,Ae=Float32Array,k=Float64Array;function Ne(t,e){let n=Math.log2(t)-3;return(e?[wt,Le,x,L]:[mt,vt,bt,xt])[n]}Object.getPrototypeOf(Int8Array);function X(t,e){let n=0,r=t.length;if(r<=2147483648)do{let i=n+r>>>1;t[i]<=e?n=i+1:r=i}while(n<r);else do{let i=Math.trunc((n+r)/2);t[i]<=e?n=i+1:r=i}while(n<r);return n}function J(t,e,n){if(e(t))return t;throw Error(n(t))}function w(t,e,n){return e=Array.isArray(e)?e:Object.values(e),J(t,r=>e.includes(r),n??(()=>`${t} must be one of ${e}`))}function It(t,e){for(let[n,r]of Object.entries(t))if(r===e)return n;return"<Unknown>"}const G=t=>`Unsupported data type: "${It(l,t)}" (id ${t})`,Lt=(t,e,n=!0,r=null)=>({name:t,type:e,nullable:n,metadata:r});function At(t){return Object.hasOwn(t,"name")&&Nt(t.type)}function Nt(t){return typeof(t==null?void 0:t.typeId)=="number"}function B(t,e="",n=!0){return At(t)?t:Lt(e,J(t,Nt,()=>"Data type expected."),n)}const Ee=(t,e,n=!1,r=-1)=>({typeId:l.Dictionary,id:r,dictionary:t,indices:e||Dt(),ordered:n}),Et=(t=32,e=!0)=>({typeId:l.Int,bitWidth:w(t,[8,16,32,64]),signed:e,values:Ne(t,e)}),Dt=()=>Et(32),De=(t=2)=>({typeId:l.Float,precision:w(t,gt),values:[vt,Ae,k][t]}),Se=()=>({typeId:l.Binary,offsets:x}),Be=()=>({typeId:l.Utf8,offsets:x}),Oe=(t,e,n=128)=>({typeId:l.Decimal,precision:t,scale:e,bitWidth:w(n,[128,256]),values:xt}),Te=t=>({typeId:l.Date,unit:w(t,z),values:t===z.DAY?x:L}),Me=(t=m.MILLISECOND,e=32)=>({typeId:l.Time,unit:w(t,m),bitWidth:w(e,[32,64]),values:e===32?x:L}),Ce=(t=m.MILLISECOND,e=null)=>({typeId:l.Timestamp,unit:w(t,m),timezone:e,values:L}),Ue=(t=C.MONTH_DAY_NANO)=>({typeId:l.Interval,unit:w(t,C),values:t===C.MONTH_DAY_NANO?void 0:x}),Ve=t=>({typeId:l.List,children:[B(t)],offsets:x}),Fe=t=>({typeId:l.Struct,children:Array.isArray(t)&&At(t[0])?t:Object.entries(t).map(([e,n])=>Lt(e,n))}),Re=(t,e,n,r)=>(n??(n=e.map((i,s)=>s)),{typeId:l.Union,mode:w(t,W),typeIds:n,typeMap:n.reduce((i,s,a)=>(i[s]=a,i),{}),children:e.map((i,s)=>B(i,`_${s}`)),typeIdForValue:r,offsets:x}),$e=t=>({typeId:l.FixedSizeBinary,stride:t}),ze=(t,e)=>({typeId:l.FixedSizeList,stride:e,children:[B(t)]}),ke=(t,e)=>({typeId:l.Map,keysSorted:t,children:[e],offsets:x}),je=(t=m.MILLISECOND)=>({typeId:l.Duration,unit:w(t,m),values:L}),Ye=()=>({typeId:l.LargeBinary,offsets:L}),_e=()=>({typeId:l.LargeUtf8,offsets:L}),He=t=>({typeId:l.LargeList,children:[B(t)],offsets:L}),Pe=(t,e)=>({typeId:l.RunEndEncoded,children:[J(B(t,"run_ends"),n=>n.type.typeId===l.Int,()=>"Run-ends must have an integer type."),B(e,"values")]}),We=t=>({typeId:l.ListView,children:[B(t,"value")],offsets:x}),Xe=t=>({typeId:l.LargeListView,children:[B(t,"value")],offsets:L});var j=new k(2).buffer;new L(j),new bt(j),new x(j),new mt(j);function O(t){if(t>2**53-1||t<-(2**53-1))throw Error(`BigInt exceeds integer number representation: ${t}`);return Number(t)}function Z(t,e){return Number(t/e)+Number(t%e)/Number(e)}var U=t=>BigInt.asUintN(64,t);function Je(t,e){let n=e<<1,r;return BigInt.asIntN(64,t[n+1])<0?(r=U(~t[n])|U(~t[n+1])<<64n,r=-(r+1n)):r=t[n]|t[n+1]<<64n,r}function Ge(t,e){let n=e<<2,r;return BigInt.asIntN(64,t[n+3])<0?(r=U(~t[n])|U(~t[n+1])<<64n|U(~t[n+2])<<128n|U(~t[n+3])<<192n,r=-(r+1n)):r=t[n]|t[n+1]<<64n|t[n+2]<<128n|t[n+3]<<192n,r}var Ze=new TextDecoder("utf-8");new TextEncoder;function Y(t){return Ze.decode(t)}function St(t,e){return(t[e>>3]&1<<e%8)!=0}function N(t,e){let n=e+h(t,e),r=n-h(t,n),i=v(t,r);return(s,a,o=null)=>{if(s<i){let u=v(t,r+s);if(u)return a(t,n+u)}return o}}function M(t,e){return e}function F(t,e){return!!qe(t,e)}function qe(t,e){return q(t,e)<<24>>24}function q(t,e){return t[e]}function v(t,e){return Ke(t,e)<<16>>16}function Ke(t,e){return t[e]|t[e+1]<<8}function h(t,e){return t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24}function Bt(t,e){return h(t,e)>>>0}function b(t,e){return O(BigInt.asIntN(64,BigInt(Bt(t,e))+(BigInt(Bt(t,e+4))<<32n)))}function _(t,e){let n=e+h(t,e),r=h(t,n);return n+=4,Y(t.subarray(n,n+r))}function T(t,e,n,r){if(!e)return[];let i=e+h(t,e);return Array.from({length:h(t,i)},(s,a)=>r(t,i+4+a*n))}const K=Symbol("rowIndex");function Q(t,e){class n{constructor(s){this[K]=s}toJSON(){return Tt(t,e,this[K])}}let r=n.prototype;for(let i=0;i<t.length;++i){if(Object.hasOwn(r,t[i]))continue;let s=e[i];Object.defineProperty(r,t[i],{get(){return s.at(this[K])},enumerable:!0})}return i=>new n(i)}function Ot(t,e){return n=>Tt(t,e,n)}function Tt(t,e,n){let r={};for(let i=0;i<t.length;++i)r[t[i]]=e[i].at(n);return r}function Qe(t){return t instanceof P}var H=(at=class{constructor({length:t,nullCount:e,type:n,validity:r,values:i,offsets:s,sizes:a,children:o}){this.length=t,this.nullCount=e,this.type=n,this.validity=r,this.values=i,this.offsets=s,this.sizes=a,this.children=o,(!e||!this.validity)&&(this.at=u=>this.value(u))}get[Symbol.toStringTag](){return"Batch"}at(t){return this.isValid(t)?this.value(t):null}isValid(t){return St(this.validity,t)}value(t){return this.values[t]}slice(t,e){let n=e-t,r=Array(n);for(let i=0;i<n;++i)r[i]=this.at(t+i);return r}*[Symbol.iterator](){for(let t=0;t<this.length;++t)yield this.at(t)}},A(at,"ArrayType",null),at),P=class extends H{constructor(t){super(t);let{length:e,values:n}=this;this.values=n.subarray(0,e)}slice(t,e){return this.nullCount?super.slice(t,e):this.values.subarray(t,e)}[Symbol.iterator](){return this.nullCount?super[Symbol.iterator]():this.values[Symbol.iterator]()}},tt=(lt=class extends H{},A(lt,"ArrayType",k),lt),f=(ot=class extends H{},A(ot,"ArrayType",Array),ot),tn=class extends f{value(t){return null}},V=class extends tt{value(t){return O(this.values[t])}},en=class extends tt{value(t){let e=this.values[t],n=(e&31744)>>10,r=(e&1023)/1024,i=(-1)**((e&32768)>>15);switch(n){case 31:return i*(r?NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*2**(n-15)*(1+r)}},nn=class extends f{value(t){return St(this.values,t)}},Mt=class extends H{constructor(t){super(t);let{bitWidth:e,scale:n}=this.type;this.decimal=e===128?Je:Ge,this.scale=10n**BigInt(n)}},rn=(ut=class extends Mt{value(t){return Z(this.decimal(this.values,t),this.scale)}},A(ut,"ArrayType",k),ut),sn=(ct=class extends Mt{value(t){return this.decimal(this.values,t)}},A(ct,"ArrayType",Array),ct),Ct=class extends f{constructor(t){super(t),this.source=t}value(t){return new Date(this.source.value(t))}},an=class extends tt{value(t){return 864e5*this.values[t]}};const ln=V;var on=class extends V{value(t){return super.value(t)*1e3}};const un=V;var cn=class extends V{value(t){return Z(this.values[t],1000n)}},dn=class extends V{value(t){return Z(this.values[t],1000000n)}},hn=class extends f{value(t){return this.values.subarray(t<<1,t+1<<1)}},fn=class extends f{value(t){let e=this.values,n=t<<4;return Float64Array.of(h(e,n),h(e,n+4),b(e,n+8))}},Ut=({values:t,offsets:e},n)=>t.subarray(e[n],e[n+1]),Vt=({values:t,offsets:e},n)=>t.subarray(O(e[n]),O(e[n+1])),yn=class extends f{value(t){return Ut(this,t)}},pn=class extends f{value(t){return Vt(this,t)}},gn=class extends f{value(t){return Y(Ut(this,t))}},mn=class extends f{value(t){return Y(Vt(this,t))}},vn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(e[t],e[t+1])}},bn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(O(e[t]),O(e[t+1]))}},xn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(e,n)}},wn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(O(e),O(n))}},Ft=class extends f{constructor(t){super(t),this.stride=this.type.stride}},In=class extends Ft{value(t){let{stride:e,values:n}=this;return n.subarray(t*e,(t+1)*e)}},Ln=class extends Ft{value(t){let{children:e,stride:n}=this;return e[0].slice(t*n,(t+1)*n)}};function Rt({children:t,offsets:e},n){let[r,i]=t[0].children,s=e[n],a=e[n+1],o=[];for(let u=s;u<a;++u)o.push([r.at(u),i.at(u)]);return o}var An=class extends f{value(t){return Rt(this,t)}},Nn=class extends f{value(t){return new Map(Rt(this,t))}},$t=class extends f{constructor({typeIds:t,...e}){super(e),this.typeIds=t,this.typeMap=this.type.typeMap}value(t,e=t){let{typeIds:n,children:r,typeMap:i}=this;return r[i[n[t]]].at(e)}},En=class extends $t{value(t){return super.value(t,this.offsets[t])}},zt=class extends f{constructor(t,e=Ot){super(t),this.names=this.type.children.map(n=>n.name),this.factory=e(this.names,this.children)}value(t){return this.factory(t)}},Dn=class extends zt{constructor(t){super(t,Q)}},Sn=class extends f{value(t){let[{values:e},n]=this.children;return n.at(X(e,t))}},Bn=class extends f{setDictionary(t){return this.dictionary=t,this.cache=t.cache(),this}value(t){return this.cache[this.key(t)]}key(t){return this.values[t]}},kt=class extends f{constructor({data:t,...e}){super(e),this.data=t}view(t){let{values:e,data:n}=this,r=t<<4,i=r+4,s=e,a=h(s,r);return a>12&&(i=h(s,r+12),s=n[h(s,r+8)]),s.subarray(i,i+a)}},On=class extends kt{value(t){return this.view(t)}},Tn=class extends kt{value(t){return Y(this.view(t))}};function jt(t){let e=[];return{add(n){return e.push(n),this},clear:()=>e=[],done:()=>new Mn(e,t)}}var Mn=class{constructor(t,e=(n=>(n=t[0])==null?void 0:n.type)()){this.type=e,this.length=t.reduce((s,a)=>s+a.length,0),this.nullCount=t.reduce((s,a)=>s+a.nullCount,0),this.data=t;let r=t.length,i=new Int32Array(r+1);if(r===1){let[s]=t;i[1]=s.length,this.at=a=>s.at(a)}else for(let s=0,a=0;s<r;++s)i[s+1]=a+=t[s].length;this.offsets=i}get[Symbol.toStringTag](){return"Column"}[Symbol.iterator](){let t=this.data;return t.length===1?t[0][Symbol.iterator]():Cn(t)}at(t){var i;let{data:e,offsets:n}=this,r=X(n,t)-1;return(i=e[r])==null?void 0:i.at(t-n[r])}get(t){return this.at(t)}toArray(){let{length:t,nullCount:e,data:n}=this,r=!e&&Qe(n[0]),i=n.length;if(r&&i===1)return n[0].values;let s=new(!i||e>0?Array:n[0].constructor.ArrayType??n[0].values.constructor)(t);return r?Un(s,n):Vn(s,n)}cache(){return this._cache??(this._cache=this.toArray())}};function*Cn(t){for(let e=0;e<t.length;++e){let n=t[e][Symbol.iterator]();for(let r=n.next();!r.done;r=n.next())yield r.value}}function Un(t,e){for(let n=0,r=0;n<e.length;++n){let{values:i}=e[n];t.set(i,r),r+=i.length}return t}function Vn(t,e){let n=-1;for(let r=0;r<e.length;++r){let i=e[r];for(let s=0;s<i.length;++s)t[++n]=i.at(s)}return t}var Fn=class le{constructor(e,n,r=!1){let i=e.fields.map(a=>a.name);this.schema=e,this.names=i,this.children=n,this.factory=r?Q:Ot;let s=[];this.getFactory=a=>s[a]??(s[a]=this.factory(i,n.map(o=>o.data[a])))}get[Symbol.toStringTag](){return"Table"}get numCols(){return this.names.length}get numRows(){var e;return((e=this.children[0])==null?void 0:e.length)??0}getChildAt(e){return this.children[e]}getChild(e){let n=this.names.findIndex(r=>r===e);return n>-1?this.children[n]:void 0}selectAt(e,n=[]){let{children:r,factory:i,schema:s}=this,{fields:a}=s;return new le({...s,fields:e.map((o,u)=>Rn(a[o],n[u]))},e.map(o=>r[o]),i===Q)}select(e,n){let r=this.names,i=e.map(s=>r.indexOf(s));return this.selectAt(i,n)}toColumns(){let{children:e,names:n}=this,r={};return n.forEach((i,s)=>{var a;return r[i]=((a=e[s])==null?void 0:a.toArray())??[]}),r}toArray(){var a;let{children:e,getFactory:n,numRows:r}=this,i=((a=e[0])==null?void 0:a.data)??[],s=Array(r);for(let o=0,u=-1;o<i.length;++o){let d=n(o);for(let c=0;c<i[o].length;++c)s[++u]=d(c)}return s}*[Symbol.iterator](){var i;let{children:e,getFactory:n}=this,r=((i=e[0])==null?void 0:i.data)??[];for(let s=0;s<r.length;++s){let a=n(s);for(let o=0;o<r[s].length;++o)yield a(o)}}at(e){let{children:n,getFactory:r,numRows:i}=this;if(e<0||e>=i)return null;let[{offsets:s}]=n,a=X(s,e)-1;return r(a)(e-s[a])}get(e){return this.at(e)}};function Rn(t,e){return e!=null&&e!==t.name?{...t,name:e}:t}function $n(t,e={}){let{typeId:n,bitWidth:r,precision:i,unit:s}=t,{useBigInt:a,useDate:o,useDecimalBigInt:u,useMap:d,useProxy:c}=e;switch(n){case l.Null:return tn;case l.Bool:return nn;case l.Int:case l.Time:case l.Duration:return a||r<64?P:V;case l.Float:return i?P:en;case l.Date:return Yt(s===z.DAY?an:ln,o&&Ct);case l.Timestamp:return Yt(s===m.SECOND?on:s===m.MILLISECOND?un:s===m.MICROSECOND?cn:dn,o&&Ct);case l.Decimal:return u?sn:rn;case l.Interval:return s===C.DAY_TIME?hn:s===C.YEAR_MONTH?P:fn;case l.FixedSizeBinary:return In;case l.Utf8:return gn;case l.LargeUtf8:return mn;case l.Binary:return yn;case l.LargeBinary:return pn;case l.BinaryView:return On;case l.Utf8View:return Tn;case l.List:return vn;case l.LargeList:return bn;case l.Map:return d?Nn:An;case l.ListView:return xn;case l.LargeListView:return wn;case l.FixedSizeList:return Ln;case l.Struct:return c?Dn:zt;case l.RunEndEncoded:return Sn;case l.Dictionary:return Bn;case l.Union:return t.mode?En:$t}throw Error(G(n))}function Yt(t,e){return e?class extends e{constructor(n){super(new t(n))}}:t}function zn(t,e){return{offset:b(t,e),metadataLength:h(t,e+8),bodyLength:b(t,e+16)}}function _t(t,e){return T(t,e,24,zn)}function Ht(t,e,n){let r=N(t,e);if(r(10,M,0))throw Error("Record batch compression not implemented");let i=n<$.V4?8:0;return{length:r(4,b,0),nodes:T(t,r(6,M),16,(s,a)=>({length:b(s,a),nullCount:b(s,a+8)})),regions:T(t,r(8,M),16+i,(s,a)=>({offset:b(s,a+i),length:b(s,a+i+8)})),variadic:T(t,r(12,M),8,b)}}function kn(t,e,n){let r=N(t,e);return{id:r(4,b,0),data:r(6,(i,s)=>Ht(i,s,n)),isDelta:r(8,F,!1)}}function Pt(t,e,n,r){w(n,l,G);let i=N(t,e);switch(n){case l.Binary:return Se();case l.Utf8:return Be();case l.LargeBinary:return Ye();case l.LargeUtf8:return _e();case l.List:return Ve(r[0]);case l.ListView:return We(r[0]);case l.LargeList:return He(r[0]);case l.LargeListView:return Xe(r[0]);case l.Struct:return Fe(r);case l.RunEndEncoded:return Pe(r[0],r[1]);case l.Int:return Et(i(4,h,0),i(6,F,!1));case l.Float:return De(i(4,v,gt.HALF));case l.Decimal:return Oe(i(4,h,0),i(6,h,0),i(8,h,128));case l.Date:return Te(i(4,v,z.MILLISECOND));case l.Time:return Me(i(4,v,m.MILLISECOND),i(6,h,32));case l.Timestamp:return Ce(i(4,v,m.SECOND),i(6,_));case l.Interval:return Ue(i(4,v,C.YEAR_MONTH));case l.Duration:return je(i(4,v,m.MILLISECOND));case l.FixedSizeBinary:return $e(i(4,h,0));case l.FixedSizeList:return ze(r[0],i(4,h,0));case l.Map:return ke(i(4,F,!1),r[0]);case l.Union:return Re(i(4,v,W.Sparse),r,T(t,i(6,M),4,h))}return{typeId:n}}function et(t,e){let n=T(t,e,4,(r,i)=>{let s=N(r,i);return[s(4,_),s(6,_)]});return n.length?new Map(n):null}function Wt(t,e,n){let r=N(t,e);return{version:n,endianness:r(4,v,0),fields:r(6,jn,[]),metadata:r(8,et)}}function jn(t,e){return T(t,e,4,Xt)}function Xt(t,e){let n=N(t,e),r=n(8,q,l.NONE),i=n(10,M,0),s=n(12,_n),a=Pt(t,i,r,n(14,(o,u)=>Yn(o,u)));return s&&(s.dictionary=a,a=s),{name:n(4,_),type:a,nullable:n(6,F,!1),metadata:n(16,et)}}function Yn(t,e){let n=T(t,e,4,Xt);return n.length?n:null}function _n(t,e){if(!e)return null;let n=N(t,e);return Ee(null,n(6,Hn,Dt()),n(8,F,!1),n(4,b,0))}function Hn(t,e){return Pt(t,e,l.Int)}var Pn=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,Wn=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`,Xn=t=>`Unsupported message type: ${t} (${It(S,t)})`;function nt(t,e){let n=h(t,e)||0;if(e+=4,n===-1&&(n=h(t,e)||0,e+=4),n===0)return null;let r=t.subarray(e,e+=n);if(r.byteLength<n)throw Error(Pn(n,r.byteLength));let i=N(r,0),s=i(4,v,$.V1),a=i(6,q,S.NONE),o=i(8,M,0),u=i(10,b,0),d;if(o){let c=a===S.Schema?Wt:a===S.DictionaryBatch?kn:a===S.RecordBatch?Ht:null;if(!c)throw Error(Xn(a));if(d=c(r,o,s),u>0){let g=t.subarray(e,e+=u);if(g.byteLength<u)throw Error(Wn(u,g.byteLength));d.body=g}}return{version:s,type:a,index:e,content:d}}function Jn(t){let e=t instanceof ArrayBuffer?new Uint8Array(t):t;return e instanceof Uint8Array&&Gn(e)?qn(e):Zn(e)}function Gn(t){if(!t||t.length<4)return!1;for(let e=0;e<6;++e)if(pt[e]!==t[e])return!1;return!0}function Zn(t){let e=[t].flat(),n,r=[],i=[];for(let s of e){if(!(s instanceof Uint8Array))throw Error("IPC data batch was not a Uint8Array.");let a=0;for(;;){let o=nt(s,a);if(o===null)break;if(a=o.index,o.content)switch(o.type){case S.Schema:n||(n=o.content);break;case S.RecordBatch:r.push(o.content);break;case S.DictionaryBatch:i.push(o.content);break}}}return{schema:n,dictionaries:i,records:r,metadata:null}}function qn(t){let e=t.byteLength-(pt.length+4),n=N(t,e-h(t,e)),r=n(4,v,$.V1),i=n(8,_t,[]),s=n(10,_t,[]);return{schema:n(6,(a,o)=>Wt(a,o,r)),dictionaries:i.map(({offset:a})=>nt(t,a).content),records:s.map(({offset:a})=>nt(t,a).content),metadata:n(12,et)}}function rt(t,e){return Kn(Jn(t),e)}function Kn(t,e={}){let{schema:n={fields:[]},dictionaries:r,records:i}=t,{version:s,fields:a}=n,o=new Map,u=tr(e,s,o),d=new Map;Qn(n,y=>{let p=y.type;p.typeId===l.Dictionary&&d.set(p.id,p.dictionary)});let c=new Map;for(let y of r){let{id:p,data:E,isDelta:D,body:oe}=y,dt=d.get(p),ht=it(dt,u({...E,body:oe}));if(c.has(p)){let ft=c.get(p);D||ft.clear(),ft.add(ht)}else{if(D)throw Error("Delta update can not be first dictionary batch.");c.set(p,jt(dt).add(ht))}}c.forEach((y,p)=>o.set(p,y.done()));let g=a.map(y=>jt(y.type));for(let y of i){let p=u(y);a.forEach((E,D)=>g[D].add(it(E.type,p)))}return new Fn(n,g.map(y=>y.done()),e.useProxy)}function Qn(t,e){t.fields.forEach(function n(r){var i,s,a;e(r),(s=(i=r.type.dictionary)==null?void 0:i.children)==null||s.forEach(n),(a=r.type.children)==null||a.forEach(n)})}function tr(t,e,n){let r={version:e,options:t,dictionary:i=>n.get(i)};return i=>{let{length:s,nodes:a,regions:o,variadic:u,body:d}=i,c=-1,g=-1,y=-1;return{...r,length:s,node:()=>a[++c],buffer:p=>{let{length:E,offset:D}=o[++g];return p?new p(d.buffer,d.byteOffset+D,E/p.BYTES_PER_ELEMENT):d.subarray(D,D+E)},variadic:()=>u[++y],visit(p){return p.map(E=>it(E.type,this))}}}}function it(t,e){let{typeId:n}=t,{length:r,options:i,node:s,buffer:a,variadic:o,version:u}=e,d=$n(t,i);if(n===l.Null)return new d({length:r,nullCount:r,type:t});let c={...s(),type:t};switch(n){case l.Bool:case l.Int:case l.Time:case l.Duration:case l.Float:case l.Decimal:case l.Date:case l.Timestamp:case l.Interval:case l.FixedSizeBinary:return new d({...c,validity:a(),values:a(t.values)});case l.Utf8:case l.LargeUtf8:case l.Binary:case l.LargeBinary:return new d({...c,validity:a(),offsets:a(t.offsets),values:a()});case l.BinaryView:case l.Utf8View:return new d({...c,validity:a(),values:a(),data:Array.from({length:o()},()=>a())});case l.List:case l.LargeList:case l.Map:return new d({...c,validity:a(),offsets:a(t.offsets),children:e.visit(t.children)});case l.ListView:case l.LargeListView:return new d({...c,validity:a(),offsets:a(t.offsets),sizes:a(t.offsets),children:e.visit(t.children)});case l.FixedSizeList:case l.Struct:return new d({...c,validity:a(),children:e.visit(t.children)});case l.RunEndEncoded:return new d({...c,children:e.visit(t.children)});case l.Dictionary:{let{id:g,indices:y}=t;return new d({...c,validity:a(),values:a(y.values)}).setDictionary(e.dictionary(g))}case l.Union:return u<$.V5&&a(),new d({...c,typeIds:a(wt),offsets:t.mode===W.Sparse?null:a(t.offsets),children:e.visit(t.children)});default:throw Error(G(n))}}new Uint16Array(new Uint8Array([1,0]).buffer)[0];function R(t,e){let n=new Map;return(...r)=>{let i=e(...r);if(n.has(i))return n.get(i);let s=t(...r).finally(()=>{n.delete(i)});return n.set(i,s),s}}function st(t,e){return ve(t,e)}function er(){return pe()}const I=ge;function Jt(){let t=nr(er()),e=n=>JSON.stringify(n);return{load:R(t.load.bind(t),e),sanitize:R(t.sanitize.bind(t),e),http:R(t.http.bind(t),e),file:R(t.file.bind(t),e)}}function nr(t){return{...t,async load(e,n){return e.endsWith(".arrow")?rt(await Gt(e),{useProxy:!1}).toArray():t.load(e,n)}}}const Gt=R(t=>fetch(t).then(e=>e.arrayBuffer()),t=>t);var Zt=I.integer,qt=I.number,rr=I.date,ir=I.boolean,Kt=()=>(I.integer=t=>{if(t==="")return"";if(t==="-inf"||t==="inf")return t;function e(r){let i=Zt(r);return Number.isNaN(i)?r:i}let n=Number.parseInt(t,10);if(Ie(n)){if(!(Math.abs(n)>2**53-1))return e(t);try{return BigInt(t)}catch{return e(t)}}else return""},I.number=t=>{if(t==="-inf"||t==="inf")return t;let e=qt(t);return Number.isNaN(e)?t:e},()=>{I.integer=Zt,I.number=qt}),Qt=()=>(I.date=t=>{if(t==="")return"";if(t==null)return null;if(!/^\d{4}-\d{2}-\d{2}(T[\d.:]+(Z|[+-]\d{2}:?\d{2})?)?$/.test(t))return t;try{let e=new Date(t);return Number.isNaN(e.getTime())?t:e}catch{return ye.warn(`Failed to parse date: ${t}`),t}},()=>{I.date=rr});I.boolean=t=>t==="True"?!0:t==="False"?!1:ir(t);const te=Jt();async function sr(t,e,n={}){let{handleBigIntAndNumberLike:r=!1,replacePeriod:i=!1}=n;if(t.endsWith(".arrow")||(e==null?void 0:e.type)==="arrow")return rt(await Gt(t),{useProxy:!0,useDate:!0,useBigInt:r}).toArray();let s=[Qt];r&&s.push(Kt);let a=[];try{let o=await te.load(t);if(!e){if(typeof o=="string")try{JSON.parse(o),e={type:"json"}}catch{e={type:"csv",parse:"auto"}}typeof o=="object"&&(e={type:"json"})}let u=(e==null?void 0:e.type)==="csv";u&&typeof o=="string"&&(o=lr(o)),u&&typeof o=="string"&&i&&(o=or(o));let d=(e==null?void 0:e.parse)||"auto";return typeof d=="object"&&(d=fe.mapValues(d,c=>c==="time"?"string":c==="datetime"?"date":c)),a=s.map(c=>c()),u?st(o,{...e,parse:d}):st(o,e)}finally{a.forEach(o=>o())}}function ar(t,e=!0){let n=[Qt];e&&n.push(Kt);let r=n.map(s=>s()),i=st(t,{type:"csv",parse:"auto"});return r.forEach(s=>s()),i}function lr(t){return t!=null&&t.includes(",")?ee(t,e=>{let n=new Set;return e.map(r=>{let i=cr(r,n);return n.add(i),i})}):t}function or(t){return t!=null&&t.includes(".")?ee(t,e=>e.map(n=>n.replaceAll(".","\u2024"))):t}function ee(t,e){let n=t.split(`
2
2
  `);return n[0]=e(n[0].split(",")).join(","),n.join(`
3
3
  `)}var ur="\u200B";function cr(t,e){let n=t,r=1;for(;e.has(n);)n=`${t}${ur.repeat(r)}`,r++;return n}var dr={version:"1.1.0"};function hr(t,e,n,r){if(me(t))return`[${t.map(i=>e(be(i)?i:ne(i,n))).join(", ")}]`;if(yt(t)){let i="",{title:s,image:a,...o}=t;s&&(i+=`<h2>${e(s)}</h2>`),a&&(i+=`<img src="${new URL(e(a),r||location.href).href}">`);let u=Object.keys(o);if(u.length>0){i+="<table>";for(let d of u){let c=o[d];c!==void 0&&(yt(c)&&(c=ne(c,n)),i+=`<tr><td class="key">${e(d)}</td><td class="value">${e(c)}</td></tr>`)}i+="</table>"}return i||"{}"}return e(t)}function fr(t){let e=[];return function(n,r){return typeof r!="object"||!r?r:(e.length=e.indexOf(this)+1,e.length>t?"[Object]":e.indexOf(r)>=0?"[Circular]":(e.push(r),r))}}function ne(t,e){return JSON.stringify(t,fr(e))}var yr=`#vg-tooltip-element {
4
4
  visibility: hidden;
@@ -1 +1 @@
1
- import{s as A}from"./chunk-LvLJmgfZ.js";import{d as ee,p as te,u as F}from"./useEvent-WUlsM6MC.js";import{t as re}from"./react-Bj1aDYRI.js";import{A as le,G as L,cr as se,mr as ae}from"./cells-CCtxWKxf.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import{t as ne}from"./jsx-runtime-CP2fAiZX.js";import{t as oe}from"./cn-d_A4rA-x.js";import"./dist-DUY6xZX8.js";import"./cjs-CVt8hZ5L.js";import"./main-Cmx6WhDY.js";import"./useNonce-BY4jV7Yb.js";import{t as de}from"./createLucideIcon-BvP5LBIs.js";import{n as ce,r as U}from"./CellStatus-DRjSVmK4.js";import{r as me}from"./x-yqLqiq5Q.js";import{t as pe}from"./chevron-right-_z3dkNFy.js";import{t as ue}from"./circle-check-CceJVe3L.js";import{t as he}from"./circle-play-n0LbT9bZ.js";import"./dist-DfBASypd.js";import"./dist-Dq_iQ08e.js";import"./dist-BjtLy-VA.js";import"./dist-odxAaH5Z.js";import"./dist-51xFOPFs.js";import"./session-DnMOyddG.js";import{r as fe}from"./useTheme-CwdqVOYu.js";import"./Combination-tjZP3FH6.js";import{t as G}from"./tooltip-DOQlecCr.js";import"./purify.es-CPplrWRQ.js";import"./vega-loader.browser-CZV6_g2i.js";import{r as xe,t as ve}from"./react-vega-C6zUovDg.js";import"./defaultLocale-OkOxlkkM.js";import"./defaultLocale-DK1MWd7f.js";import{t as ge}from"./cell-link-B59Kn5nL.js";import{t as je}from"./bundle.esm-_LzfhNmX.js";import{n as ye,r as Ie,t as V}from"./react-resizable-panels.browser.esm-RgA6v8U3.js";import{t as Se}from"./empty-state-DFr2pZOz.js";import"./multi-icon-OxLi6M3I.js";import{r as be}from"./panel-context-ICWm_stq.js";import{t as Ne}from"./clear-button-BA9qcQQg.js";import{n as Te,t as we}from"./runs-BMpRKQKC.js";var ke=de("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),H=ie(),C=A(re(),1);const Y="hoveredCellId",J="cellHover";var Re="cellNum",K="cell",O="startTimestamp",Q="endTimestamp",W="status";function _e(t,e,r,a){let i="hoursminutessecondsmilliseconds";return{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:Y,bind:{element:`#${e}`}},{name:J,select:{type:"point",on:"mouseover",fields:[K],clear:"mouseout"}}],height:{step:r==="sideBySide"?26:21},encoding:{y:{field:Re,scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:r==="sideBySide"?null:void 0},x:{field:O,type:"temporal",axis:{orient:"top",title:null}},x2:{field:Q,type:"temporal"},tooltip:[{field:O,type:"temporal",timeUnit:i,title:"Start"},{field:Q,type:"temporal",timeUnit:i,title:"End"}],size:{value:{expr:`${Y} == toString(datum.${K}) ? 19.5 : 18`}},color:{field:W,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:t},transform:[{calculate:`datum.${W} === 'queued' ? 9999999999999 : datum.${O}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}function X(t){try{let e=new Date(t*1e3);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}var l=A(ne(),1),Z=te(new Map);const Me=()=>{let t=(0,H.c)(34),{runIds:e,runMap:r}=F(we),a=F(Z),{clearRuns:i}=Te(),{theme:n}=fe(),[s,w]=(0,C.useState)("above"),N=be(),c;t[0]===s?c=t[1]:(c=()=>{w(s==="above"?"sideBySide":"above")},t[0]=s,t[1]=c);let m=c;if(e.length===0){let p;return t[2]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)(Se,{title:"No traces",description:(0,l.jsx)("span",{children:"Cells that have ran will appear here."}),icon:(0,l.jsx)(ae,{})}),t[2]=p):p=t[2],p}let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=u):u=t[3];let y=s==="sideBySide",o;t[4]!==y||t[5]!==m?(o=(0,l.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[u,(0,l.jsx)("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:m,defaultChecked:y,className:"h-3 cursor-pointer"})]}),t[4]=y,t[5]=m,t[6]=o):o=t[6];let h;t[7]===i?h=t[8]:(h=(0,l.jsx)(Ne,{dataTestId:"clear-traces-button",onClick:i}),t[7]=i,t[8]=h);let v;t[9]!==o||t[10]!==h?(v=(0,l.jsxs)("div",{className:"flex flex-row justify-start gap-3",children:[o,h]}),t[9]=o,t[10]=h,t[11]=v):v=t[11];let g;if(t[12]!==s||t[13]!==a||t[14]!==e||t[15]!==r||t[16]!==n){let p;t[18]!==s||t[19]!==a||t[20]!==r||t[21]!==n?(p=(_,E)=>{let R=r.get(_);return R?(0,l.jsx)($e,{run:R,isExpanded:a.get(R.runId),isMostRecentRun:E===0,chartPosition:s,theme:n},R.runId):null},t[18]=s,t[19]=a,t[20]=r,t[21]=n,t[22]=p):p=t[22],g=e.map(p),t[12]=s,t[13]=a,t[14]=e,t[15]=r,t[16]=n,t[17]=g}else g=t[17];let j;t[23]===g?j=t[24]:(j=(0,l.jsx)("div",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=j);let T;t[25]!==v||t[26]!==j?(T=(0,l.jsxs)("div",{className:"py-1 px-2 overflow-y-scroll h-full",children:[v,j]}),t[25]=v,t[26]=j,t[27]=T):T=t[27];let f=T;if(N==="sidebar")return f;let x;t[28]===f?x=t[29]:(x=(0,l.jsx)(V,{defaultSize:50,minSize:30,maxSize:80,children:f}),t[28]=f,t[29]=x);let d;t[30]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(Ie,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),t[30]=d):d=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(V,{defaultSize:50,children:(0,l.jsx)("div",{})}),t[31]=I):I=t[31];let S;return t[32]===x?S=t[33]:(S=(0,l.jsxs)(ye,{direction:"horizontal",className:"h-full",children:[x,d,I]}),t[32]=x,t[33]=S),S};var $e=({run:t,isMostRecentRun:e,chartPosition:r,isExpanded:a,theme:i})=>{let n=ee(Z);a??(a=e);let s=()=>{n(c=>{let m=new Map(c);return m.set(t.runId,!a),m})},w=(0,l.jsx)(a?me:pe,{height:16,className:"inline"}),N=(0,l.jsxs)("span",{className:"text-sm cursor-pointer",onClick:s,children:["Run - ",L(t.runStartTime),w]});return a?(0,l.jsx)(ze,{run:t,chartPosition:r,theme:i,title:N},t.runId):(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)("pre",{className:"font-mono font-semibold",children:N})},t.runId)},ze=t=>{let e=(0,H.c)(40),{run:r,chartPosition:a,theme:i,title:n}=t,[s,w]=(0,C.useState)(),N=(0,C.useRef)(null),{ref:c,width:m}=je(),u=m===void 0?300:m,y=le(),o,h;if(e[0]!==y||e[1]!==a||e[2]!==r.cellRuns||e[3]!==r.runId||e[4]!==i){let k=[...r.cellRuns.values()].map(b=>{let M=b.elapsedTime??0;return{cell:b.cellId,cellNum:y.inOrderIds.indexOf(b.cellId),startTimestamp:X(b.startTime),endTimestamp:X(b.startTime+M),elapsedTime:U(M*1e3),status:b.status}});o=`hiddenInputElement-${r.runId}`,h=xe(_e(k,o,a,i)),e[0]=y,e[1]=a,e[2]=r.cellRuns,e[3]=r.runId,e[4]=i,e[5]=o,e[6]=h}else o=e[5],h=e[6];let v=h.spec,g=i==="dark"?"dark":void 0,j=u-50,T=a==="above"?120:100,f;e[7]!==g||e[8]!==j||e[9]!==T?(f={theme:g,width:j,height:T,actions:!1,mode:"vega",renderer:"canvas"},e[7]=g,e[8]=j,e[9]=T,e[10]=f):f=e[10];let x;e[11]!==f||e[12]!==v?(x={ref:N,spec:v,options:f},e[11]=f,e[12]=v,e[13]=x):x=e[13];let d=ve(x),I;e[14]===(d==null?void 0:d.view)?I=e[15]:(I=()=>{let k=[{signalName:J,handler:(b,M)=>{var q;let P=(q=M.cell)==null?void 0:q[0];w(P??null)}}];return k.forEach(b=>{let{signalName:M,handler:P}=b;d==null||d.view.addSignalListener(M,P)}),()=>{k.forEach(b=>{let{signalName:M,handler:P}=b;d==null||d.view.removeSignalListener(M,P)})}},e[14]=d==null?void 0:d.view,e[15]=I);let S;e[16]===d?S=e[17]:(S=[d],e[16]=d,e[17]=S),(0,C.useEffect)(I,S);let p;e[18]!==o||e[19]!==s||e[20]!==r?(p=(0,l.jsx)(Ce,{run:r,hoveredCellId:s,hiddenInputElementId:o}),e[18]=o,e[19]=s,e[20]=r,e[21]=p):p=e[21];let _=p,E=a==="sideBySide"?"-mt-0.5 flex-1":"",R;e[22]===Symbol.for("react.memo_cache_sentinel")?(R=(0,l.jsx)(C.Suspense,{children:(0,l.jsx)("div",{ref:N})}),e[22]=R):R=e[22];let B;e[23]!==c||e[24]!==E?(B=(0,l.jsx)("div",{className:E,ref:c,children:R}),e[23]=c,e[24]=E,e[25]=B):B=e[25];let $=B;if(a==="above"){let k;e[26]!==$||e[27]!==n||e[28]!==_?(k=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,$,_]}),e[26]=$,e[27]=n,e[28]=_,e[29]=k):k=e[29];let b;return e[30]!==r.runId||e[31]!==k?(b=(0,l.jsx)("div",{className:"flex flex-col",children:k},r.runId),e[30]=r.runId,e[31]=k,e[32]=b):b=e[32],b}let z;e[33]!==n||e[34]!==_?(z=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,_]}),e[33]=n,e[34]=_,e[35]=z):z=e[35];let D;return e[36]!==$||e[37]!==r.runId||e[38]!==z?(D=(0,l.jsxs)("div",{className:"flex flex-row",children:[z,$]},r.runId),e[36]=$,e[37]=r.runId,e[38]=z,e[39]=D):D=e[39],D},Ce=t=>{let e=(0,H.c)(12),{run:r,hoveredCellId:a,hiddenInputElementId:i}=t,n=(0,C.useRef)(null),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o=>{n.current&&(n.current.value=String(o),n.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=s):s=e[0];let w=s,N=a||"",c;e[1]!==i||e[2]!==N?(c=(0,l.jsx)("input",{type:"text",id:i,defaultValue:N,hidden:!0,ref:n}),e[1]=i,e[2]=N,e[3]=c):c=e[3];let m;e[4]===r.cellRuns?m=e[5]:(m=[...r.cellRuns.values()],e[4]=r.cellRuns,e[5]=m);let u;e[6]!==a||e[7]!==m?(u=m.map(o=>(0,l.jsx)(Pe,{cellRun:o,hovered:o.cellId===a,dispatchHoverEvent:w},o.cellId)),e[6]=a,e[7]=m,e[8]=u):u=e[8];let y;return e[9]!==c||e[10]!==u?(y=(0,l.jsxs)("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[c,u]}),e[9]=c,e[10]=u,e[11]=y):y=e[11],y},Ee={success:(0,l.jsx)(ue,{color:"green",size:14}),running:(0,l.jsx)(he,{color:"var(--blue-10)",size:14}),error:(0,l.jsx)(se,{color:"red",size:14}),queued:(0,l.jsx)(ke,{color:"grey",size:14})},Pe=t=>{let e=(0,H.c)(39),{cellRun:r,hovered:a,dispatchHoverEvent:i}=t,n;e[0]===r.elapsedTime?n=e[1]:(n=r.elapsedTime?U(r.elapsedTime*1e3):"-",e[0]=r.elapsedTime,e[1]=n);let s=n,w;e[2]!==r.elapsedTime||e[3]!==s?(w=r.elapsedTime?(0,l.jsxs)("span",{children:["This cell took ",(0,l.jsx)(ce,{elapsedTime:s})," to run"]}):(0,l.jsx)("span",{children:"This cell has not been run"}),e[2]=r.elapsedTime,e[3]=s,e[4]=w):w=e[4];let N=w,c;e[5]!==r.cellId||e[6]!==i?(c=()=>{i(r.cellId)},e[5]=r.cellId,e[6]=i,e[7]=c):c=e[7];let m=c,u;e[8]===i?u=e[9]:(u=()=>{i(null)},e[8]=i,e[9]=u);let y=u,o=a&&"bg-(--gray-3) opacity-100",h;e[10]===o?h=e[11]:(h=oe("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100",o),e[10]=o,e[11]=h);let v;e[12]===r.startTime?v=e[13]:(v=L(r.startTime),e[12]=r.startTime,e[13]=v);let g;e[14]===v?g=e[15]:(g=(0,l.jsxs)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:["[",v,"]"]}),e[14]=v,e[15]=g);let j;e[16]===r.cellId?j=e[17]:(j=(0,l.jsxs)("span",{className:"text-(--gray-10) w-16 overflow-hidden",children:["(",(0,l.jsx)(ge,{cellId:r.cellId}),")"]}),e[16]=r.cellId,e[17]=j);let T;e[18]===r.code?T=e[19]:(T=(0,l.jsx)("span",{className:"w-40 truncate -ml-1",children:r.code}),e[18]=r.code,e[19]=T);let f;e[20]===s?f=e[21]:(f=(0,l.jsx)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:s}),e[20]=s,e[21]=f);let x;e[22]!==N||e[23]!==f?(x=(0,l.jsx)(G,{content:N,children:f}),e[22]=N,e[23]=f,e[24]=x):x=e[24];let d=Ee[r.status],I;e[25]!==r.status||e[26]!==d?(I=(0,l.jsx)(G,{content:r.status,children:d}),e[25]=r.status,e[26]=d,e[27]=I):I=e[27];let S;e[28]!==x||e[29]!==I?(S=(0,l.jsxs)("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[x,I]}),e[28]=x,e[29]=I,e[30]=S):S=e[30];let p;return e[31]!==m||e[32]!==y||e[33]!==T||e[34]!==S||e[35]!==h||e[36]!==g||e[37]!==j?(p=(0,l.jsxs)("div",{className:h,onMouseEnter:m,onMouseLeave:y,children:[g,j,T,S]}),e[31]=m,e[32]=y,e[33]=T,e[34]=S,e[35]=h,e[36]=g,e[37]=j,e[38]=p):p=e[38],p};export{Me as Tracing};
1
+ import{s as A}from"./chunk-LvLJmgfZ.js";import{d as ee,p as te,u as F}from"./useEvent-WUlsM6MC.js";import{t as re}from"./react-Bj1aDYRI.js";import{A as le,G as L,cr as se,mr as ae}from"./cells-DJj8ja0V.js";import"./react-dom-CSu739Rf.js";import{t as ie}from"./compiler-runtime-B3qBwwSJ.js";import{t as ne}from"./jsx-runtime-CP2fAiZX.js";import{t as oe}from"./cn-d_A4rA-x.js";import"./dist-Dr9qtoId.js";import"./cjs-CVt8hZ5L.js";import"./main-Cmx6WhDY.js";import"./useNonce-BY4jV7Yb.js";import{t as de}from"./createLucideIcon-BvP5LBIs.js";import{n as ce,r as U}from"./CellStatus-rawm41sF.js";import{r as me}from"./x-yqLqiq5Q.js";import{t as pe}from"./chevron-right-_z3dkNFy.js";import{t as ue}from"./circle-check-CceJVe3L.js";import{t as he}from"./circle-play-n0LbT9bZ.js";import"./dist-Jp_4M-Ei.js";import"./dist-Cf47zp7b.js";import"./dist-Bagw3W9X.js";import"./dist-t1vdhOX_.js";import"./dist-D3OoaVQX.js";import"./session-iz9BPeTp.js";import{r as fe}from"./useTheme-Co8bbxoC.js";import"./Combination-lAuBMOg4.js";import{t as G}from"./tooltip-CKZGcDDd.js";import"./purify.es-BBn8CPhf.js";import"./vega-loader.browser-BJ9oKrvH.js";import{r as xe,t as ve}from"./react-vega-DzWik59S.js";import"./defaultLocale-CuYNS33t.js";import"./defaultLocale-CGfP-Ye3.js";import{t as ge}from"./cell-link-TWNu2IkO.js";import{t as je}from"./bundle.esm-_LzfhNmX.js";import{n as ye,r as Ie,t as V}from"./react-resizable-panels.browser.esm-RgA6v8U3.js";import{t as Se}from"./empty-state-DFr2pZOz.js";import"./multi-icon-OxLi6M3I.js";import{r as be}from"./panel-context-ICWm_stq.js";import{t as Ne}from"./clear-button-BA9qcQQg.js";import{n as Te,t as we}from"./runs-B4QSIylk.js";var ke=de("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),H=ie(),C=A(re(),1);const Y="hoveredCellId",J="cellHover";var Re="cellNum",K="cell",O="startTimestamp",Q="endTimestamp",W="status";function _e(t,e,r,a){let i="hoursminutessecondsmilliseconds";return{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:Y,bind:{element:`#${e}`}},{name:J,select:{type:"point",on:"mouseover",fields:[K],clear:"mouseout"}}],height:{step:r==="sideBySide"?26:21},encoding:{y:{field:Re,scale:{paddingInner:.2},sort:{field:"sortPriority"},title:"cell",axis:r==="sideBySide"?null:void 0},x:{field:O,type:"temporal",axis:{orient:"top",title:null}},x2:{field:Q,type:"temporal"},tooltip:[{field:O,type:"temporal",timeUnit:i,title:"Start"},{field:Q,type:"temporal",timeUnit:i,title:"End"}],size:{value:{expr:`${Y} == toString(datum.${K}) ? 19.5 : 18`}},color:{field:W,scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:t},transform:[{calculate:`datum.${W} === 'queued' ? 9999999999999 : datum.${O}`,as:"sortPriority"}],config:{view:{stroke:"transparent"}}}}function X(t){try{let e=new Date(t*1e3);return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")} ${String(e.getHours()).padStart(2,"0")}:${String(e.getMinutes()).padStart(2,"0")}:${String(e.getSeconds()).padStart(2,"0")}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}var l=A(ne(),1),Z=te(new Map);const Me=()=>{let t=(0,H.c)(34),{runIds:e,runMap:r}=F(we),a=F(Z),{clearRuns:i}=Te(),{theme:n}=fe(),[s,w]=(0,C.useState)("above"),N=be(),c;t[0]===s?c=t[1]:(c=()=>{w(s==="above"?"sideBySide":"above")},t[0]=s,t[1]=c);let m=c;if(e.length===0){let p;return t[2]===Symbol.for("react.memo_cache_sentinel")?(p=(0,l.jsx)(Se,{title:"No traces",description:(0,l.jsx)("span",{children:"Cells that have ran will appear here."}),icon:(0,l.jsx)(ae,{})}),t[2]=p):p=t[2],p}let u;t[3]===Symbol.for("react.memo_cache_sentinel")?(u=(0,l.jsx)("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=u):u=t[3];let y=s==="sideBySide",o;t[4]!==y||t[5]!==m?(o=(0,l.jsxs)("div",{className:"flex flex-row gap-1 items-center",children:[u,(0,l.jsx)("input",{type:"checkbox",name:"chartPosition","data-testid":"chartPosition",onClick:m,defaultChecked:y,className:"h-3 cursor-pointer"})]}),t[4]=y,t[5]=m,t[6]=o):o=t[6];let h;t[7]===i?h=t[8]:(h=(0,l.jsx)(Ne,{dataTestId:"clear-traces-button",onClick:i}),t[7]=i,t[8]=h);let v;t[9]!==o||t[10]!==h?(v=(0,l.jsxs)("div",{className:"flex flex-row justify-start gap-3",children:[o,h]}),t[9]=o,t[10]=h,t[11]=v):v=t[11];let g;if(t[12]!==s||t[13]!==a||t[14]!==e||t[15]!==r||t[16]!==n){let p;t[18]!==s||t[19]!==a||t[20]!==r||t[21]!==n?(p=(_,E)=>{let R=r.get(_);return R?(0,l.jsx)($e,{run:R,isExpanded:a.get(R.runId),isMostRecentRun:E===0,chartPosition:s,theme:n},R.runId):null},t[18]=s,t[19]=a,t[20]=r,t[21]=n,t[22]=p):p=t[22],g=e.map(p),t[12]=s,t[13]=a,t[14]=e,t[15]=r,t[16]=n,t[17]=g}else g=t[17];let j;t[23]===g?j=t[24]:(j=(0,l.jsx)("div",{className:"flex flex-col gap-3",children:g}),t[23]=g,t[24]=j);let T;t[25]!==v||t[26]!==j?(T=(0,l.jsxs)("div",{className:"py-1 px-2 overflow-y-scroll h-full",children:[v,j]}),t[25]=v,t[26]=j,t[27]=T):T=t[27];let f=T;if(N==="sidebar")return f;let x;t[28]===f?x=t[29]:(x=(0,l.jsx)(V,{defaultSize:50,minSize:30,maxSize:80,children:f}),t[28]=f,t[29]=x);let d;t[30]===Symbol.for("react.memo_cache_sentinel")?(d=(0,l.jsx)(Ie,{className:"w-1 bg-border hover:bg-primary/50 transition-colors"}),t[30]=d):d=t[30];let I;t[31]===Symbol.for("react.memo_cache_sentinel")?(I=(0,l.jsx)(V,{defaultSize:50,children:(0,l.jsx)("div",{})}),t[31]=I):I=t[31];let S;return t[32]===x?S=t[33]:(S=(0,l.jsxs)(ye,{direction:"horizontal",className:"h-full",children:[x,d,I]}),t[32]=x,t[33]=S),S};var $e=({run:t,isMostRecentRun:e,chartPosition:r,isExpanded:a,theme:i})=>{let n=ee(Z);a??(a=e);let s=()=>{n(c=>{let m=new Map(c);return m.set(t.runId,!a),m})},w=(0,l.jsx)(a?me:pe,{height:16,className:"inline"}),N=(0,l.jsxs)("span",{className:"text-sm cursor-pointer",onClick:s,children:["Run - ",L(t.runStartTime),w]});return a?(0,l.jsx)(ze,{run:t,chartPosition:r,theme:i,title:N},t.runId):(0,l.jsx)("div",{className:"flex flex-col",children:(0,l.jsx)("pre",{className:"font-mono font-semibold",children:N})},t.runId)},ze=t=>{let e=(0,H.c)(40),{run:r,chartPosition:a,theme:i,title:n}=t,[s,w]=(0,C.useState)(),N=(0,C.useRef)(null),{ref:c,width:m}=je(),u=m===void 0?300:m,y=le(),o,h;if(e[0]!==y||e[1]!==a||e[2]!==r.cellRuns||e[3]!==r.runId||e[4]!==i){let k=[...r.cellRuns.values()].map(b=>{let M=b.elapsedTime??0;return{cell:b.cellId,cellNum:y.inOrderIds.indexOf(b.cellId),startTimestamp:X(b.startTime),endTimestamp:X(b.startTime+M),elapsedTime:U(M*1e3),status:b.status}});o=`hiddenInputElement-${r.runId}`,h=xe(_e(k,o,a,i)),e[0]=y,e[1]=a,e[2]=r.cellRuns,e[3]=r.runId,e[4]=i,e[5]=o,e[6]=h}else o=e[5],h=e[6];let v=h.spec,g=i==="dark"?"dark":void 0,j=u-50,T=a==="above"?120:100,f;e[7]!==g||e[8]!==j||e[9]!==T?(f={theme:g,width:j,height:T,actions:!1,mode:"vega",renderer:"canvas"},e[7]=g,e[8]=j,e[9]=T,e[10]=f):f=e[10];let x;e[11]!==f||e[12]!==v?(x={ref:N,spec:v,options:f},e[11]=f,e[12]=v,e[13]=x):x=e[13];let d=ve(x),I;e[14]===(d==null?void 0:d.view)?I=e[15]:(I=()=>{let k=[{signalName:J,handler:(b,M)=>{var q;let P=(q=M.cell)==null?void 0:q[0];w(P??null)}}];return k.forEach(b=>{let{signalName:M,handler:P}=b;d==null||d.view.addSignalListener(M,P)}),()=>{k.forEach(b=>{let{signalName:M,handler:P}=b;d==null||d.view.removeSignalListener(M,P)})}},e[14]=d==null?void 0:d.view,e[15]=I);let S;e[16]===d?S=e[17]:(S=[d],e[16]=d,e[17]=S),(0,C.useEffect)(I,S);let p;e[18]!==o||e[19]!==s||e[20]!==r?(p=(0,l.jsx)(Ce,{run:r,hoveredCellId:s,hiddenInputElementId:o}),e[18]=o,e[19]=s,e[20]=r,e[21]=p):p=e[21];let _=p,E=a==="sideBySide"?"-mt-0.5 flex-1":"",R;e[22]===Symbol.for("react.memo_cache_sentinel")?(R=(0,l.jsx)(C.Suspense,{children:(0,l.jsx)("div",{ref:N})}),e[22]=R):R=e[22];let B;e[23]!==c||e[24]!==E?(B=(0,l.jsx)("div",{className:E,ref:c,children:R}),e[23]=c,e[24]=E,e[25]=B):B=e[25];let $=B;if(a==="above"){let k;e[26]!==$||e[27]!==n||e[28]!==_?(k=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,$,_]}),e[26]=$,e[27]=n,e[28]=_,e[29]=k):k=e[29];let b;return e[30]!==r.runId||e[31]!==k?(b=(0,l.jsx)("div",{className:"flex flex-col",children:k},r.runId),e[30]=r.runId,e[31]=k,e[32]=b):b=e[32],b}let z;e[33]!==n||e[34]!==_?(z=(0,l.jsxs)("pre",{className:"font-mono font-semibold",children:[n,_]}),e[33]=n,e[34]=_,e[35]=z):z=e[35];let D;return e[36]!==$||e[37]!==r.runId||e[38]!==z?(D=(0,l.jsxs)("div",{className:"flex flex-row",children:[z,$]},r.runId),e[36]=$,e[37]=r.runId,e[38]=z,e[39]=D):D=e[39],D},Ce=t=>{let e=(0,H.c)(12),{run:r,hoveredCellId:a,hiddenInputElementId:i}=t,n=(0,C.useRef)(null),s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o=>{n.current&&(n.current.value=String(o),n.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=s):s=e[0];let w=s,N=a||"",c;e[1]!==i||e[2]!==N?(c=(0,l.jsx)("input",{type:"text",id:i,defaultValue:N,hidden:!0,ref:n}),e[1]=i,e[2]=N,e[3]=c):c=e[3];let m;e[4]===r.cellRuns?m=e[5]:(m=[...r.cellRuns.values()],e[4]=r.cellRuns,e[5]=m);let u;e[6]!==a||e[7]!==m?(u=m.map(o=>(0,l.jsx)(Pe,{cellRun:o,hovered:o.cellId===a,dispatchHoverEvent:w},o.cellId)),e[6]=a,e[7]=m,e[8]=u):u=e[8];let y;return e[9]!==c||e[10]!==u?(y=(0,l.jsxs)("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[c,u]}),e[9]=c,e[10]=u,e[11]=y):y=e[11],y},Ee={success:(0,l.jsx)(ue,{color:"green",size:14}),running:(0,l.jsx)(he,{color:"var(--blue-10)",size:14}),error:(0,l.jsx)(se,{color:"red",size:14}),queued:(0,l.jsx)(ke,{color:"grey",size:14})},Pe=t=>{let e=(0,H.c)(39),{cellRun:r,hovered:a,dispatchHoverEvent:i}=t,n;e[0]===r.elapsedTime?n=e[1]:(n=r.elapsedTime?U(r.elapsedTime*1e3):"-",e[0]=r.elapsedTime,e[1]=n);let s=n,w;e[2]!==r.elapsedTime||e[3]!==s?(w=r.elapsedTime?(0,l.jsxs)("span",{children:["This cell took ",(0,l.jsx)(ce,{elapsedTime:s})," to run"]}):(0,l.jsx)("span",{children:"This cell has not been run"}),e[2]=r.elapsedTime,e[3]=s,e[4]=w):w=e[4];let N=w,c;e[5]!==r.cellId||e[6]!==i?(c=()=>{i(r.cellId)},e[5]=r.cellId,e[6]=i,e[7]=c):c=e[7];let m=c,u;e[8]===i?u=e[9]:(u=()=>{i(null)},e[8]=i,e[9]=u);let y=u,o=a&&"bg-(--gray-3) opacity-100",h;e[10]===o?h=e[11]:(h=oe("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-(--gray-3) hover:opacity-100",o),e[10]=o,e[11]=h);let v;e[12]===r.startTime?v=e[13]:(v=L(r.startTime),e[12]=r.startTime,e[13]=v);let g;e[14]===v?g=e[15]:(g=(0,l.jsxs)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:["[",v,"]"]}),e[14]=v,e[15]=g);let j;e[16]===r.cellId?j=e[17]:(j=(0,l.jsxs)("span",{className:"text-(--gray-10) w-16 overflow-hidden",children:["(",(0,l.jsx)(ge,{cellId:r.cellId}),")"]}),e[16]=r.cellId,e[17]=j);let T;e[18]===r.code?T=e[19]:(T=(0,l.jsx)("span",{className:"w-40 truncate -ml-1",children:r.code}),e[18]=r.code,e[19]=T);let f;e[20]===s?f=e[21]:(f=(0,l.jsx)("span",{className:"text-(--gray-10) dark:text-(--gray-11)",children:s}),e[20]=s,e[21]=f);let x;e[22]!==N||e[23]!==f?(x=(0,l.jsx)(G,{content:N,children:f}),e[22]=N,e[23]=f,e[24]=x):x=e[24];let d=Ee[r.status],I;e[25]!==r.status||e[26]!==d?(I=(0,l.jsx)(G,{content:r.status,children:d}),e[25]=r.status,e[26]=d,e[27]=I):I=e[27];let S;e[28]!==x||e[29]!==I?(S=(0,l.jsxs)("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[x,I]}),e[28]=x,e[29]=I,e[30]=S):S=e[30];let p;return e[31]!==m||e[32]!==y||e[33]!==T||e[34]!==S||e[35]!==h||e[36]!==g||e[37]!==j?(p=(0,l.jsxs)("div",{className:h,onMouseEnter:m,onMouseLeave:y,children:[g,j,T,S]}),e[31]=m,e[32]=y,e[33]=T,e[34]=S,e[35]=h,e[36]=g,e[37]=j,e[38]=p):p=e[38],p};export{Me as Tracing};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./tracing-DTCuFbVV.js","./clear-button-BA9qcQQg.js","./cn-d_A4rA-x.js","./clsx-A78R3nYl.js","./compiler-runtime-B3qBwwSJ.js","./react-Bj1aDYRI.js","./chunk-LvLJmgfZ.js","./jsx-runtime-CP2fAiZX.js","./cells-DJj8ja0V.js","./preload-helper-BW0IMuFq.js","./badge-BUFDGZ04.js","./button-BwamPDJi.js","./useEventListener-DP66hBzA.js","./Combination-lAuBMOg4.js","./react-dom-CSu739Rf.js","./select-DMX8tcVe.js","./menu-items-CRjHRaiu.js","./dist-qkIhd7iG.js","./check-BnZGcuDh.js","./createLucideIcon-BvP5LBIs.js","./x-yqLqiq5Q.js","./tooltip-CKZGcDDd.js","./use-toast-Hc8CXlvz.js","./utils-C1ZciZbF.js","./useEvent-WUlsM6MC.js","./_baseIsEqual-BU8KB_Ip.js","./_Uint8Array-BGESiCQL.js","./invariant-awXiPaF0.js","./merge-DnJbrtRQ.js","./isArrayLikeObject-BkJc8lDE.js","./zod-H_cgTO0M.js","./DeferredRequestRegistry-TekxUirp.js","./Deferred-BMfCOLaw.js","./uuid-ClFZlR7U.js","./config-BH98g9qk.js","./constants-CdR60lKM.js","./session-iz9BPeTp.js","./requests-DZy_SQ_v.js","./useLifecycle-BRklGKFJ.js","./assertNever-Dg4AnA3p.js","./toString-DlRqgfqz.js","./isSymbol-BGkTcW3U.js","./_baseSlice-39dTX4Wi.js","./_hasUnicode-QS_pSfjY.js","./_arrayReduce-BKEr35uH.js","./useNonce-BY4jV7Yb.js","./useTheme-Co8bbxoC.js","./once-DRC4SgqY.js","./capabilities-yFZOze7r.js","./createReducer-BrKCfm9t.js","./paths-D2lG83Oh.js","./dist-C88PeA-j.js","./dist-Dr9qtoId.js","./dist-BUr9VSV4.js","./dist-Jp_4M-Ei.js","./dist-Cf47zp7b.js","./dist-Bagw3W9X.js","./dist-t1vdhOX_.js","./dist-D3OoaVQX.js","./dist-B7Qj0ClH.js","./stex-0ac7Aukl.js","./toDate-DDAiY7kz.js","./purify.es-BBn8CPhf.js","./cjs-CVt8hZ5L.js","./_baseProperty-DuoFhI7N.js","./debounce-D8CkpJG7.js","./toNumber-GB_lFVaq.js","./now-DIo_1hTm.js","./toInteger-Cl1doThW.js","./database-zap-B3efE3T2.js","./main-Cmx6WhDY.js","./cells-jmgGt1lS.css","./CellStatus-rawm41sF.js","./multi-icon-OxLi6M3I.js","./multi-icon-pwGWVz3d.css","./useDateFormatter-DOoVZUts.js","./context-CRmPPhx9.js","./SSRProvider-CwqN9FWV.js","./en-US-k6sS5Nab.js","./ellipsis-CnEpKti0.js","./refresh-cw-fLeDriQe.js","./workflow-DgZ_19fF.js","./CellStatus-2Psjnl5F.css","./empty-state-DFr2pZOz.js","./panel-context-ICWm_stq.js","./cell-link-TWNu2IkO.js","./ImperativeModal-BvRpI5NU.js","./alert-dialog-CfirwkMl.js","./dialog-ChkDhlMQ.js","./input-GLbHj4DF.js","./useDebounce-S9zaMzrr.js","./numbers-Eb1pfDec.js","./useNumberFormatter-BXZcbTzH.js","./usePress-G817DpBk.js","./runs-B4QSIylk.js","./react-vega-DzWik59S.js","./precisionRound-CCOoIlcP.js","./defaultLocale-CuYNS33t.js","./linear-c4WCYuol.js","./timer-BEJidwwG.js","./init-BpLL1fe9.js","./time-BuGE4zW4.js","./defaultLocale-CGfP-Ye3.js","./range-ClqUI25v.js","./vega-loader.browser-BJ9oKrvH.js","./treemap-qinQgXo1.js","./path-DtYs9Dst.js","./colors-Dm6L93c7.js","./ordinal-DMIExrUm.js","./arc-DUSwcTI9.js","./math-CpvW-dlE.js","./array-CEZNxKGf.js","./step-B5y1YzZ4.js","./line-BKm-YkCh.js","./chevron-right-_z3dkNFy.js","./circle-check-CceJVe3L.js","./circle-play-n0LbT9bZ.js","./react-resizable-panels.browser.esm-RgA6v8U3.js","./bundle.esm-_LzfhNmX.js"])))=>i.map(i=>d[i]);
2
+ import{s as m}from"./chunk-LvLJmgfZ.js";import{t as i}from"./react-Bj1aDYRI.js";import{t as n}from"./compiler-runtime-B3qBwwSJ.js";import{t as f}from"./jsx-runtime-CP2fAiZX.js";import{t as _}from"./spinner-Dt4SmUsI.js";import{t as p}from"./preload-helper-BW0IMuFq.js";let c,u=(async()=>{let a,l,r,o,s;a=n(),l=m(i(),1),r=m(f(),1),o=l.lazy(()=>p(()=>import("./tracing-DTCuFbVV.js").then(async t=>(await t.__tla,t)),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118]),import.meta.url).then(t=>({default:t.Tracing}))),c=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)(l.Suspense,{fallback:(0,r.jsx)(s,{}),children:(0,r.jsx)(o,{})}),t[0]=e):e=t[0],e},s=()=>{let t=(0,a.c)(1),e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,r.jsx)("div",{className:"flex flex-col items-center justify-center h-full",children:(0,r.jsx)(_,{})}),t[0]=e):e=t[0],e}})();export{u as __tla,c as default};
@@ -1,3 +1,3 @@
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-CP2fAiZX.js";import{d as Sr}from"./popover-Cvl9xY6R.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(`
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-CP2fAiZX.js";import{d as Sr}from"./popover-XNIX-rv1.js";import{t as Dr}from"./extends-B9D0JO9U.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
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
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-WUlsM6MC.js";import{T as s}from"./cells-CCtxWKxf.js";import{t as i}from"./compiler-runtime-B3qBwwSJ.js";import{o as n}from"./utils-CORJ8yYa.js";import{n as f}from"./html-to-image-b9BimK8l.js";import{o as c}from"./focus-ShrwcKIv.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-WUlsM6MC.js";import{T as s}from"./cells-DJj8ja0V.js";import{t as i}from"./compiler-runtime-B3qBwwSJ.js";import{o as n}from"./utils-C1ZciZbF.js";import{n as f}from"./html-to-image-D-FY7miL.js";import{o as c}from"./focus-j9zawi1p.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};