@datalayer/agent-runtimes 1.6.87 → 1.6.89

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 (328) hide show
  1. package/dist-embed/chunks/{AgentDetails-BRhO9qA_.js → AgentDetails-DdSlGfQV.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-DAWAmYS1.js → AgentDetailsDialog-C7rvaKS1.js} +1 -1
  3. package/dist-embed/chunks/{CellSidebarExtension-B_Bqi3Eh.js → CellSidebarExtension-CrgdhbHy.js} +1 -1
  4. package/dist-embed/chunks/{ChatView-eRieNBDa.js → ChatView-Bw7yLD4U.js} +1 -1
  5. package/dist-embed/chunks/{CollapsiblePlugin-DPGnrmLj.js → CollapsiblePlugin-ng8VFSwH.js} +1 -1
  6. package/dist-embed/chunks/{ContextPie-h_II4EDU.js → ContextPie-Duhkymga.js} +1 -1
  7. package/dist-embed/chunks/{DeckComponent-oBh8nbTa.js → DeckComponent-BhyoCP90.js} +2 -2
  8. package/dist-embed/chunks/{DocumentView-C8G8fA7K.js → DocumentView-Dn2adk7S.js} +1 -1
  9. package/dist-embed/chunks/{EphemeralDocument-Bm1w17Zw.js → EphemeralDocument-BiQZswSQ.js} +1 -1
  10. package/dist-embed/chunks/{EphemeralNotebook-jQ7FGCY-.js → EphemeralNotebook-C04wMmoE.js} +1 -1
  11. package/dist-embed/chunks/{ExcalidrawComponent-BgjhoJC3.js → ExcalidrawComponent-GkzKDk_S.js} +1 -1
  12. package/dist-embed/chunks/{ExcalidrawModal-DtdsEiaS.js → ExcalidrawModal-Ct44VSBv.js} +1 -1
  13. package/dist-embed/chunks/{JupyterLexicalExtension-Dr8dgCst.js → JupyterLexicalExtension-BYde4Hzz.js} +8 -8
  14. package/dist-embed/chunks/{KernelVariables-cH-x-Hrc.js → KernelVariables-DvfwDxTX.js} +1 -1
  15. package/dist-embed/chunks/{NotebookToolSurfaces-BcIduPcQ.js → NotebookToolSurfaces-BvKDvb3M.js} +1 -1
  16. package/dist-embed/chunks/{NotebookView-LJ0GBHTQ.js → NotebookView-Wo8VVvUY.js} +1 -1
  17. package/dist-embed/chunks/{Output-Do1CYRIF.js → Output-BmVt4DpZ.js} +1 -1
  18. package/dist-embed/chunks/{SandboxDetailsDialog-DjP6mCWy.js → SandboxDetailsDialog-CCmkIp8x.js} +1 -1
  19. package/dist-embed/chunks/{SchemaForm-1QzMu6Zk.js → SchemaForm-YDAPV6Rb.js} +1 -1
  20. package/dist-embed/chunks/{SheetTabs-DJG69znU.js → SheetTabs-PG3DQn2N.js} +1 -1
  21. package/dist-embed/chunks/{SpreadsheetPreviewView-5marsdKE.js → SpreadsheetPreviewView-CpUuO1Di.js} +1 -1
  22. package/dist-embed/chunks/{SpreadsheetView-CmD-dAjn.js → SpreadsheetView-CsSXGqRw.js} +1 -1
  23. package/dist-embed/chunks/{WidgetVariableView-BQoMV999.js → WidgetVariableView-BBupZR8G.js} +1 -1
  24. package/dist-embed/chunks/{YouTubePlugin-BCHN7vdi.js → YouTubePlugin-BOnLCvAR.js} +1 -1
  25. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-CF8QpiZa.js → abnfDiagram-VCTEODGH-C5V-1V3E.js} +1 -1
  26. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-GnaR64st.js → abnfDiagram-VCTEODGH-CvZ8usho.js} +1 -1
  27. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BSmEjUJk.js → abnfDiagram-VCTEODGH-DN0kRlog.js} +1 -1
  28. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-4AR7vABL.js → ar-SA-G6X2FPQ2-DloHADQr.js} +1 -1
  29. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-b_EnmOeS.js → architectureDiagram-5GKGNRK7-BeTQQNyc.js} +1 -1
  30. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-ByAYkSMW.js → architectureDiagram-5GKGNRK7-Bwqgkba9.js} +1 -1
  31. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-Cy6c9GhS.js → architectureDiagram-5GKGNRK7-DRfUn2vu.js} +1 -1
  32. package/dist-embed/chunks/{az-AZ-76LH7QW2-DQ2RQ6Bt.js → az-AZ-76LH7QW2-ZZtVb3rf.js} +1 -1
  33. package/dist-embed/chunks/{bg-BG-XCXSNQG7-BRTYabxb.js → bg-BG-XCXSNQG7-9xliuV5e.js} +1 -1
  34. package/dist-embed/chunks/{blockDiagram-868be97b-C6Xxmbgc.js → blockDiagram-868be97b-DQhIB20U.js} +1 -1
  35. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-zXh6gZYF.js → blockDiagram-I7D4REHJ-BjLfxD7u.js} +1 -1
  36. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-BBd_q6Z7.js → blockDiagram-I7D4REHJ-BjW3QpXh.js} +1 -1
  37. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-Clrwi7_Q.js → blockDiagram-I7D4REHJ-DUfJri3_.js} +1 -1
  38. package/dist-embed/chunks/{bn-BD-2XOGV67Q-DJpR_aiV.js → bn-BD-2XOGV67Q-Bhkca3_3.js} +1 -1
  39. package/dist-embed/chunks/{c4Diagram-3f4bdde3-BhBNs69f.js → c4Diagram-3f4bdde3-dS_U3gYR.js} +1 -1
  40. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BWQ9xHoN.js → c4Diagram-7LVT6UL2-BK8yvli2.js} +1 -1
  41. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DcCc8HaH.js → c4Diagram-7LVT6UL2-Da5uNT8x.js} +1 -1
  42. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-p14SIG7V.js → c4Diagram-7LVT6UL2-O_rZefrz.js} +1 -1
  43. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BrHrTXrx.js → ca-ES-6MX7JW3Y-jpG1o3Op.js} +1 -1
  44. package/dist-embed/chunks/{chunk-2Q5K7J3B-BkzWX8eg.js → chunk-2Q5K7J3B-BX9u1bBi.js} +1 -1
  45. package/dist-embed/chunks/{chunk-2Q5K7J3B-CWx-QJ0-.js → chunk-2Q5K7J3B-DiqqlJZw.js} +1 -1
  46. package/dist-embed/chunks/{chunk-2Q5K7J3B-CtmdieBX.js → chunk-2Q5K7J3B-JhdIsXWp.js} +1 -1
  47. package/dist-embed/chunks/{chunk-5VM5RSS4-Ciba-ybC.js → chunk-5VM5RSS4-BbOPwJfe.js} +1 -1
  48. package/dist-embed/chunks/{chunk-5VM5RSS4-C7mbT2Vq.js → chunk-5VM5RSS4-C5X9VB1v.js} +1 -1
  49. package/dist-embed/chunks/{chunk-5VM5RSS4-O8p7luYq.js → chunk-5VM5RSS4-box8kQsT.js} +1 -1
  50. package/dist-embed/chunks/{chunk-F27PBJKO-Bo5boRfj.js → chunk-F27PBJKO-BUeWPnw5.js} +1 -1
  51. package/dist-embed/chunks/{chunk-F27PBJKO-CZHz6AS9.js → chunk-F27PBJKO-CQM02DXR.js} +1 -1
  52. package/dist-embed/chunks/{chunk-F27PBJKO-WqHcL2s0.js → chunk-F27PBJKO-syxUNYMu.js} +1 -1
  53. package/dist-embed/chunks/{chunk-IMKFNOWR-CPdtPffh.js → chunk-IMKFNOWR-B87sc0vl.js} +1 -1
  54. package/dist-embed/chunks/{chunk-IMKFNOWR-BJR6rkFo.js → chunk-IMKFNOWR-CPIe37ka.js} +1 -1
  55. package/dist-embed/chunks/{chunk-IMKFNOWR-Csfu1kFU.js → chunk-IMKFNOWR-rg2BEcj6.js} +1 -1
  56. package/dist-embed/chunks/{chunk-JWPE2WC7-BVXd-ICe.js → chunk-JWPE2WC7-BGdc9-bH.js} +1 -1
  57. package/dist-embed/chunks/{chunk-JWPE2WC7-Cq6Q947j.js → chunk-JWPE2WC7-DXZeG2qg.js} +1 -1
  58. package/dist-embed/chunks/{chunk-JWPE2WC7-Bf4pFlIJ.js → chunk-JWPE2WC7-NvLQtuoq.js} +1 -1
  59. package/dist-embed/chunks/{chunk-POPQ4Y6H-DhNnPwZp.js → chunk-POPQ4Y6H-BgR92oKl.js} +1 -1
  60. package/dist-embed/chunks/{chunk-POPQ4Y6H-s1yt1ZtK.js → chunk-POPQ4Y6H-DWWKSDND.js} +1 -1
  61. package/dist-embed/chunks/{chunk-POPQ4Y6H-B_rWRGt2.js → chunk-POPQ4Y6H-UAJm0Siu.js} +1 -1
  62. package/dist-embed/chunks/{chunk-SVP7TREG-CHN6fclq.js → chunk-SVP7TREG-BE97ZGVE.js} +1 -1
  63. package/dist-embed/chunks/{chunk-SVP7TREG-8oKVa2mm.js → chunk-SVP7TREG-BGHt1HDi.js} +1 -1
  64. package/dist-embed/chunks/{chunk-SVP7TREG-CsFEUe5B.js → chunk-SVP7TREG-lMq3S-u-.js} +1 -1
  65. package/dist-embed/chunks/{chunk-TICWLB2K-CSCMv_QA.js → chunk-TICWLB2K-BdUzhQPw.js} +1 -1
  66. package/dist-embed/chunks/{chunk-TICWLB2K-BsCtCkEM.js → chunk-TICWLB2K-CeH9Mpzc.js} +1 -1
  67. package/dist-embed/chunks/{chunk-TICWLB2K-InZQ5ZEH.js → chunk-TICWLB2K-D6WJ64X6.js} +1 -1
  68. package/dist-embed/chunks/{chunk-XXDRQBXY-z8go8Kjf.js → chunk-XXDRQBXY-B8THsPMh.js} +1 -1
  69. package/dist-embed/chunks/{chunk-XXDRQBXY-Y8pSpMzF.js → chunk-XXDRQBXY-BU32lP3z.js} +1 -1
  70. package/dist-embed/chunks/{chunk-XXDRQBXY-sm2AIgJ5.js → chunk-XXDRQBXY-CjAMT3RS.js} +1 -1
  71. package/dist-embed/chunks/{classDiagram-ZZMXUADV-BjEOw29S.js → classDiagram-ZZMXUADV-Cy9bb-Ja.js} +1 -1
  72. package/dist-embed/chunks/{classDiagram-ZZMXUADV-G9WI_1Zg.js → classDiagram-ZZMXUADV-HBhnoh6h.js} +1 -1
  73. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DJ40c8si.js → classDiagram-ZZMXUADV-dVm_zkxF.js} +1 -1
  74. package/dist-embed/chunks/{classDiagram-f62afe4f-Blm1wT1_.js → classDiagram-f62afe4f-jrNOgtbP.js} +1 -1
  75. package/dist-embed/chunks/{classDiagram-v2-604399ef-DtWqjJhW.js → classDiagram-v2-604399ef-CIao-4MQ.js} +1 -1
  76. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BjEOw29S.js → classDiagram-v2-VYDZK3BY-Cy9bb-Ja.js} +1 -1
  77. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-G9WI_1Zg.js → classDiagram-v2-VYDZK3BY-HBhnoh6h.js} +1 -1
  78. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DJ40c8si.js → classDiagram-v2-VYDZK3BY-dVm_zkxF.js} +1 -1
  79. package/dist-embed/chunks/{core-BrYTRvTy.js → core-trN55qc5.js} +1 -1
  80. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-j_7L0NF5.js → cose-bilkent-JH36ORCC-D2gVNaYW.js} +1 -1
  81. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-C73aLaB-.js → cose-bilkent-JH36ORCC-DFWJgtSE.js} +1 -1
  82. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DCtKiRmD.js → cose-bilkent-JH36ORCC-DGrxjlJ4.js} +1 -1
  83. package/dist-embed/chunks/{createText-aed3d8b3-B0tLexrf.js → createText-aed3d8b3-DoLPKXK1.js} +1 -1
  84. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-CmCt0bDq.js → cs-CZ-2BRQDIVT-BMA1Xu87.js} +1 -1
  85. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-BSwaTAfL.js → cynefinDiagram-5FMLGOSQ-BZ1LtKUy.js} +1 -1
  86. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DXr1M_CB.js → cynefinDiagram-5FMLGOSQ-DExZ3BYo.js} +1 -1
  87. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DLyDkFEh.js → cynefinDiagram-5FMLGOSQ-DhFh7Gts.js} +1 -1
  88. package/dist-embed/chunks/{da-DK-5WZEPLOC-Bow4-dps.js → da-DK-5WZEPLOC-smzK_QPz.js} +1 -1
  89. package/dist-embed/chunks/{dagre-GXQ25YYZ-CPu-St26.js → dagre-GXQ25YYZ-4P90jeEC.js} +1 -1
  90. package/dist-embed/chunks/{dagre-GXQ25YYZ-Bfxayyi1.js → dagre-GXQ25YYZ-CQ05bX5J.js} +1 -1
  91. package/dist-embed/chunks/{dagre-GXQ25YYZ-DTWZ8vY1.js → dagre-GXQ25YYZ-MXGi4287.js} +1 -1
  92. package/dist-embed/chunks/{de-DE-XR44H4JA-DOrKYiYP.js → de-DE-XR44H4JA-CfWQxGGf.js} +1 -1
  93. package/dist-embed/chunks/{diagram-S7CK7UJ4-ERKr1j6v.js → diagram-S7CK7UJ4-Ccq8-Zxr.js} +1 -1
  94. package/dist-embed/chunks/{diagram-S7CK7UJ4-Biw5mnoN.js → diagram-S7CK7UJ4-CvR2q_hg.js} +1 -1
  95. package/dist-embed/chunks/{diagram-S7CK7UJ4-ewBgYmRN.js → diagram-S7CK7UJ4-xgW0lqt_.js} +1 -1
  96. package/dist-embed/chunks/{diagram-UQ7AKVKN-B-f2Afei.js → diagram-UQ7AKVKN-Csc8IuSs.js} +1 -1
  97. package/dist-embed/chunks/{diagram-UQ7AKVKN-C-6kzgTn.js → diagram-UQ7AKVKN-D6nWV9sq.js} +1 -1
  98. package/dist-embed/chunks/{diagram-UQ7AKVKN-CGNA7gub.js → diagram-UQ7AKVKN-DM05uJg0.js} +1 -1
  99. package/dist-embed/chunks/{diagram-VSXAHHWV-DRVoe_PH.js → diagram-VSXAHHWV-C0Dte6B4.js} +1 -1
  100. package/dist-embed/chunks/{diagram-VSXAHHWV-7M08zFHc.js → diagram-VSXAHHWV-CBb3q1Lt.js} +1 -1
  101. package/dist-embed/chunks/{diagram-VSXAHHWV-CTQu2IBp.js → diagram-VSXAHHWV-ChcqzpvG.js} +1 -1
  102. package/dist-embed/chunks/{diagram-VX7I27RA-vkcQI8-t.js → diagram-VX7I27RA-D8OyA7LV.js} +1 -1
  103. package/dist-embed/chunks/{diagram-VX7I27RA-DHwSWNj4.js → diagram-VX7I27RA-DA3s85ZI.js} +1 -1
  104. package/dist-embed/chunks/{diagram-VX7I27RA-B_LkfTnq.js → diagram-VX7I27RA-DFBWpFKi.js} +1 -1
  105. package/dist-embed/chunks/{diagram-Z3DM3KII-D0Xt6xwn.js → diagram-Z3DM3KII-CWv5dRb1.js} +1 -1
  106. package/dist-embed/chunks/{diagram-Z3DM3KII-YAo8QSYR.js → diagram-Z3DM3KII-DViUyD1V.js} +1 -1
  107. package/dist-embed/chunks/{diagram-Z3DM3KII-BZ9tmKdd.js → diagram-Z3DM3KII-DpwpLNON.js} +1 -1
  108. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DN2tb-X8.js → ebnfDiagram-PWID7BFC-CeZcQDV3.js} +1 -1
  109. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-C2oLjL45.js → ebnfDiagram-PWID7BFC-DogBQteX.js} +1 -1
  110. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-Dk5WVIim.js → ebnfDiagram-PWID7BFC-ZbRTmpLY.js} +1 -1
  111. package/dist-embed/chunks/{edges-b2856ca0-BSzU9ga-.js → edges-b2856ca0-D_o-rhcf.js} +1 -1
  112. package/dist-embed/chunks/{el-GR-BZB4AONW-BTtxEAc0.js → el-GR-BZB4AONW-B66N5_hN.js} +1 -1
  113. package/dist-embed/chunks/{erDiagram-5d81789a--wvCe6Ur.js → erDiagram-5d81789a-Fv2KfQrA.js} +1 -1
  114. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BDw_Db3e.js → erDiagram-RLTQ6QDP-BGg8orkr.js} +1 -1
  115. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BTXMcY7Y.js → erDiagram-RLTQ6QDP-CmahDLTF.js} +1 -1
  116. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BsU1EeJN.js → erDiagram-RLTQ6QDP-QI_LQlaL.js} +1 -1
  117. package/dist-embed/chunks/{es-ES-U4NZUMDT-DhrLOB7I.js → es-ES-U4NZUMDT-B9FR_uSt.js} +1 -1
  118. package/dist-embed/chunks/{esm-VjpQWsU9.js → esm--zHizpYG.js} +1 -1
  119. package/dist-embed/chunks/{esm-BFRTiV0k.js → esm-BaCqpqKi.js} +1 -1
  120. package/dist-embed/chunks/{eu-ES-A7QVB2H4-CdpglPNY.js → eu-ES-A7QVB2H4-BOXiXCGc.js} +1 -1
  121. package/dist-embed/chunks/{fa-IR-HGAKTJCU-Ea2hzNvl.js → fa-IR-HGAKTJCU-DZGgNuMT.js} +1 -1
  122. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-D6KBS1-v.js → fi-FI-Z5N7JZ37-CaWIHowf.js} +1 -1
  123. package/dist-embed/chunks/{flowDb-185abca5-CBeP2_ZY.js → flowDb-185abca5-Bme86bTZ.js} +1 -1
  124. package/dist-embed/chunks/{flowDiagram-1629c991-LZzO5ZR8.js → flowDiagram-1629c991-Dgzjtx-J.js} +1 -1
  125. package/dist-embed/chunks/{flowDiagram-HODETNUW-DNjEQlAR.js → flowDiagram-HODETNUW-CgvZqEVs.js} +1 -1
  126. package/dist-embed/chunks/{flowDiagram-HODETNUW-DP1PWdQF.js → flowDiagram-HODETNUW-CmuRDMmw.js} +1 -1
  127. package/dist-embed/chunks/{flowDiagram-HODETNUW-_U05MBMl.js → flowDiagram-HODETNUW-OUrVNdIM.js} +1 -1
  128. package/dist-embed/chunks/{flowDiagram-v2-1d953310-DeqYSBVG.js → flowDiagram-v2-1d953310-C0-FfyAn.js} +1 -1
  129. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-Dg5bSBS4.js → flowchart-elk-definition-6df44142-Cj7Q5rsQ.js} +1 -1
  130. package/dist-embed/chunks/{fr-FR-RHASNOE6-CeDw1EdR.js → fr-FR-RHASNOE6-JbYWEs2C.js} +1 -1
  131. package/dist-embed/chunks/{ganttDiagram-3b0b3873-D9Pr_Kxk.js → ganttDiagram-3b0b3873-11vGPr5M.js} +1 -1
  132. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Baccn166.js → ganttDiagram-EL5Y4UJY-BKVYCh-L.js} +1 -1
  133. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DmwhuzrV.js → ganttDiagram-EL5Y4UJY-DjmeWOsd.js} +1 -1
  134. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Qz5HuyzZ.js → ganttDiagram-EL5Y4UJY-sX30iW6f.js} +1 -1
  135. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CF5nE-hV.js → gitGraphDiagram-WWUBYQGX-BuldyYGe.js} +1 -1
  136. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-BUlSUrle.js → gitGraphDiagram-WWUBYQGX-CVcSYkDK.js} +1 -1
  137. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-ZgEb3qK-.js → gitGraphDiagram-WWUBYQGX-D5bCd_Fv.js} +1 -1
  138. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-BqpGV-_U.js → gitGraphDiagram-f01e8bc2-CWnInLhH.js} +1 -1
  139. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-DK2-uVTg.js → gl-ES-HMX3MZ6V-DHOQCvQH.js} +1 -1
  140. package/dist-embed/chunks/{he-IL-6SHJWFNN-Fk0F_rV-.js → he-IL-6SHJWFNN-T-2jEF-H.js} +1 -1
  141. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-03USmwuM.js → hi-IN-IWLTKZ5I-DnwHC230.js} +1 -1
  142. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-BSbsIqRs.js → hu-HU-A5ZG7DT2-CXi3BH37.js} +1 -1
  143. package/dist-embed/chunks/{id-ID-SAP4L64H-Def1ERB7.js → id-ID-SAP4L64H-CLNAMqbr.js} +1 -1
  144. package/dist-embed/chunks/{index-DrrVr0x3.js → index-5os8HYj-.js} +1 -1
  145. package/dist-embed/chunks/{index-9bae90f3-9T5x-xqi.js → index-9bae90f3-iredpvJb.js} +1 -1
  146. package/dist-embed/chunks/{index-CHu5zo1L.js → index-BeJsO4Vc.js} +1 -1
  147. package/dist-embed/chunks/{index-z8PItpd8.js → index-C5HZB8ue.js} +2 -2
  148. package/dist-embed/chunks/{index-Df2MkvAW.js → index-CLB4KPZs.js} +4 -4
  149. package/dist-embed/chunks/{index-DB6fbGKT.js → index-DqWZNFUh.js} +1 -1
  150. package/dist-embed/chunks/{index-DObGLuCI.js → index-s25RSqvt.js} +4 -4
  151. package/dist-embed/chunks/index.esm-BLnMhA7S.js +1 -0
  152. package/dist-embed/chunks/{index.esm-BA_6VWW2.js → index.esm-CDmg415B.js} +1 -1
  153. package/dist-embed/chunks/{infoDiagram-27XIBGKW-D3fIZzte.js → infoDiagram-27XIBGKW-C5jY9v4i.js} +1 -1
  154. package/dist-embed/chunks/{infoDiagram-27XIBGKW-Cs7bZlH6.js → infoDiagram-27XIBGKW-ZpA0pyod.js} +1 -1
  155. package/dist-embed/chunks/{infoDiagram-27XIBGKW-B4XVsJvC.js → infoDiagram-27XIBGKW-r53wKy7u.js} +1 -1
  156. package/dist-embed/chunks/{infoDiagram-a29d40f1-DkWa9MRC.js → infoDiagram-a29d40f1-Knwr4YPu.js} +1 -1
  157. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BB-Kv-Mj.js → ishikawaDiagram-5VMMS53U-DZTg3ecD.js} +1 -1
  158. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BIytcjnR.js → ishikawaDiagram-5VMMS53U-DyyVsa6G.js} +1 -1
  159. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-B6nIkJxX.js → ishikawaDiagram-5VMMS53U-_ZSb2XNA.js} +1 -1
  160. package/dist-embed/chunks/{it-IT-JPQ66NNP-SLcJY1NM.js → it-IT-JPQ66NNP-txSVmIqw.js} +1 -1
  161. package/dist-embed/chunks/{ja-JP-DBVTYXUO-Cc9AUQ4A.js → ja-JP-DBVTYXUO-DOImz4yG.js} +1 -1
  162. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-Bs6ObzT9.js → journeyDiagram-3NMN7TZE-Bc9JVKJo.js} +1 -1
  163. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-DjgUmoWA.js → journeyDiagram-3NMN7TZE-ChyAFriv.js} +1 -1
  164. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-C3yCP95B.js → journeyDiagram-3NMN7TZE-DAnc386V.js} +1 -1
  165. package/dist-embed/chunks/{journeyDiagram-95396277-Dj4xwdzk.js → journeyDiagram-95396277-BebgPn4W.js} +1 -1
  166. package/dist-embed/chunks/{kaa-6HZHGXH3-CzXQn7ER.js → kaa-6HZHGXH3-B2yEdYaM.js} +1 -1
  167. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-Cd1AWKsn.js → kab-KAB-ZGHBKWFO-sLTnjbMU.js} +1 -1
  168. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-_mcHB773.js → kanban-definition-UXKFOSKX-C2nVULib.js} +1 -1
  169. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-B9DSJpj9.js → kanban-definition-UXKFOSKX-CaaDxJqC.js} +1 -1
  170. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Chsw2-Nq.js → kanban-definition-UXKFOSKX-Ceyuj1Ce.js} +1 -1
  171. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-CoeOUA0W.js → kk-KZ-P5N5QNE5-BDlGvfGX.js} +1 -1
  172. package/dist-embed/chunks/{km-KH-HSX4SM5Z-Newj9En6.js → km-KH-HSX4SM5Z-CooQACBW.js} +1 -1
  173. package/dist-embed/chunks/{ko-KR-MTYHY66A-B0HPCdz1.js → ko-KR-MTYHY66A-Bj_rlaK_.js} +1 -1
  174. package/dist-embed/chunks/{ku-TR-6OUDTVRD-DGP0qnbh.js → ku-TR-6OUDTVRD-Bj6Ypm8A.js} +1 -1
  175. package/dist-embed/chunks/{layout-DTdkd155.js → layout-BjpOdFu2.js} +1 -1
  176. package/dist-embed/chunks/{layout-D_LOxL0l.js → layout-DQIVAfpO.js} +1 -1
  177. package/dist-embed/chunks/{layout-W4AzWc9F.js → layout-Dqr0Lpzq.js} +1 -1
  178. package/dist-embed/chunks/{lib-CXGDRspZ.js → lib-14GbWfrY.js} +1 -1
  179. package/dist-embed/chunks/{lib-CADgZZ9y.js → lib-4swlpTXy.js} +1 -1
  180. package/dist-embed/chunks/{lib-B8KSw9bH.js → lib-BQq_nDIJ.js} +1 -1
  181. package/dist-embed/chunks/{lib-Y90USIm4.js → lib-B_Y-fFGM.js} +1 -1
  182. package/dist-embed/chunks/{lib-BYzUzQ6H.js → lib-Bi3C17qp.js} +1 -1
  183. package/dist-embed/chunks/{lib-nq0B6NsD.js → lib-BnWPn-3C.js} +1 -1
  184. package/dist-embed/chunks/{lib-CaukawRB.js → lib-CFjofO2V.js} +1 -1
  185. package/dist-embed/chunks/{lib-B8ebpTVD.js → lib-CZdsrJQn.js} +1 -1
  186. package/dist-embed/chunks/{lib-Cn7qCM0u.js → lib-CjtFb8n-.js} +1 -1
  187. package/dist-embed/chunks/{lib-Enno6S7H.js → lib-CxLkAp-u.js} +1 -1
  188. package/dist-embed/chunks/{lib-Coc8tcSm.js → lib-D-SlE5VC.js} +1 -1
  189. package/dist-embed/chunks/{lib-EuT6O3Jf.js → lib-D8GpP3sJ.js} +1 -1
  190. package/dist-embed/chunks/{lib-Bc3R7boK.js → lib-DTFhY99t.js} +1 -1
  191. package/dist-embed/chunks/{lib-DDbDl1bK.js → lib-Df9xZsJQ.js} +1 -1
  192. package/dist-embed/chunks/{lib-CrCTDU2F.js → lib-Dte5toRY.js} +1 -1
  193. package/dist-embed/chunks/{lib-BSeAgx1v.js → lib-RkdqeSxj.js} +1 -1
  194. package/dist-embed/chunks/{lib-YvkJZ6Rp.js → lib-XPaJtC26.js} +1 -1
  195. package/dist-embed/chunks/{lib-CLcIUOT7.js → lib-ZCrl6o8i.js} +1 -1
  196. package/dist-embed/chunks/{lib-DKIJv0vv.js → lib-epJftt6F.js} +1 -1
  197. package/dist-embed/chunks/{lt-LT-XHIRWOB4-BIsLadFj.js → lt-LT-XHIRWOB4-tCy9B-KD.js} +1 -1
  198. package/dist-embed/chunks/{lv-LV-5QDEKY6T-C8HmZZBF.js → lv-LV-5QDEKY6T-D7otgK4T.js} +1 -1
  199. package/dist-embed/chunks/{mermaid.core-Dd-D7tJ4.js → mermaid.core-DMHnDUdQ.js} +4 -4
  200. package/dist-embed/chunks/{mermaid.core-By9AWIOp.js → mermaid.core-DySu4CMa.js} +3 -3
  201. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-Uv7-26v7.js → mindmap-definition-YA3MSWOX-BXfU9jpH.js} +1 -1
  202. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-CmGscTNk.js → mindmap-definition-YA3MSWOX-BxYK9vLg.js} +1 -1
  203. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-CCpwK8vh.js → mindmap-definition-YA3MSWOX-DQSoT62j.js} +1 -1
  204. package/dist-embed/chunks/{mindmap-definition-e4c1d938-aCX0qYqH.js → mindmap-definition-e4c1d938-GSsr5zyA.js} +1 -1
  205. package/dist-embed/chunks/{mr-IN-CRQNXWMA-DKYnEuji.js → mr-IN-CRQNXWMA-C_WuMJ-7.js} +1 -1
  206. package/dist-embed/chunks/{my-MM-5M5IBNSE-MY3GKeMd.js → my-MM-5M5IBNSE-ljxQ9hC9.js} +1 -1
  207. package/dist-embed/chunks/{nb-NO-T6EIAALU-txIp5vuE.js → nb-NO-T6EIAALU-D2s2RIr7.js} +1 -1
  208. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-C6xelwh4.js → nl-NL-IS3SIHDZ-BnT13jFW.js} +1 -1
  209. package/dist-embed/chunks/{nn-NO-6E72VCQL-BFYvN5n1.js → nn-NO-6E72VCQL-obFqc-dJ.js} +1 -1
  210. package/dist-embed/chunks/{oc-FR-POXYY2M6-uGpH7RML.js → oc-FR-POXYY2M6-Dp0fg3-H.js} +1 -1
  211. package/dist-embed/chunks/{pa-IN-N4M65BXN-Cg4Z-vtz.js → pa-IN-N4M65BXN-BefFR002.js} +1 -1
  212. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-DLONs192.js → pegDiagram-XKGWAZYB-FSobI14k.js} +1 -1
  213. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-C1R8Kk6K.js → pegDiagram-XKGWAZYB-GlLsdSxR.js} +1 -1
  214. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-dwQNJiaW.js → pegDiagram-XKGWAZYB-iCCMOEMa.js} +1 -1
  215. package/dist-embed/chunks/{percentages-BXMCSKIN-9RttMFHC.js → percentages-BXMCSKIN-D1a6fCH1.js} +5 -5
  216. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-DiT0kFGb.js → pieDiagram-E7YTZNPT-BLVqNMWJ.js} +1 -1
  217. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-CH60iHt1.js → pieDiagram-E7YTZNPT-CIfzhxTy.js} +1 -1
  218. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-Cm-wzRi8.js → pieDiagram-E7YTZNPT-ffhUIieA.js} +1 -1
  219. package/dist-embed/chunks/{pieDiagram-c941bede-BF587JLB.js → pieDiagram-c941bede-nYu7i5OI.js} +1 -1
  220. package/dist-embed/chunks/{pl-PL-T2D74RX3-Dv_CTL10.js → pl-PL-T2D74RX3-BO36IHPS.js} +1 -1
  221. package/dist-embed/chunks/{plugin-Bvp_HQZg.js → plugin-m2JrXH0S.js} +1 -1
  222. package/dist-embed/chunks/{pt-BR-5N22H2LF-CK-yjA9j.js → pt-BR-5N22H2LF-DeQn8LGc.js} +1 -1
  223. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-DYb7ailg.js → pt-PT-UZXXM6DQ-BY1iT-VW.js} +1 -1
  224. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-mkOZIUHb.js → quadrantDiagram-AXDQQJYC-BE9RPE6m.js} +1 -1
  225. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-B1wf6Zth.js → quadrantDiagram-AXDQQJYC-DbYIZcyN.js} +1 -1
  226. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-DWDtOx8-.js → quadrantDiagram-AXDQQJYC-Dpzqg33f.js} +1 -1
  227. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-CE6GwviF.js → quadrantDiagram-cf8b8fe0-nVG6Aygu.js} +1 -1
  228. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DrkBEH1z.js → railroadDiagram-O6MQD6OU-CEl2l0ZE.js} +1 -1
  229. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DEB7gRmX.js → railroadDiagram-O6MQD6OU-CwaTW3Mo.js} +1 -1
  230. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DjA_m2-o.js → railroadDiagram-O6MQD6OU-jikRRl2W.js} +1 -1
  231. package/dist-embed/chunks/{renderer-B_98xkGt.js → renderer-CCsq5PXp.js} +1 -1
  232. package/dist-embed/chunks/{requirementDiagram-53bda41b-BsRjuGBf.js → requirementDiagram-53bda41b-CXGOrv-O.js} +1 -1
  233. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-C8d0kJ1A.js → requirementDiagram-BXWQKSXE-Bd0fV1Bn.js} +1 -1
  234. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-S8WT8VJ1.js → requirementDiagram-BXWQKSXE-ClYVmNTl.js} +1 -1
  235. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-82Ybj2ki.js → requirementDiagram-BXWQKSXE-DEQBP2xS.js} +1 -1
  236. package/dist-embed/chunks/{ro-RO-JPDTUUEW-1Cu9X8j1.js → ro-RO-JPDTUUEW-BJDoWheT.js} +1 -1
  237. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-Bl3rV2YR.js → ru-RU-B4JR7IUQ-tTkTCAO1.js} +1 -1
  238. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-C2LowYxA.js → sankeyDiagram-P5KCCOFB-CLR82118.js} +1 -1
  239. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CKqSAqcJ.js → sankeyDiagram-P5KCCOFB-CuMdtMPP.js} +1 -1
  240. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-eNBOyfBR.js → sankeyDiagram-P5KCCOFB-DH-uxGJV.js} +1 -1
  241. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-BAS8V2Ov.js → sankeyDiagram-c3ef121a-nnS5nxSr.js} +1 -1
  242. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-BWNvF-m7.js → sequenceDiagram-82a5b84f-BXXPsnTm.js} +1 -1
  243. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CxH0MlFa.js → sequenceDiagram-WJ2MYXX4-CkWCOxWE.js} +1 -1
  244. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-C_2alFNp.js → sequenceDiagram-WJ2MYXX4-D00NbcmA.js} +1 -1
  245. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-fsR56p6L.js → sequenceDiagram-WJ2MYXX4-VyUqwKEJ.js} +1 -1
  246. package/dist-embed/chunks/{si-LK-N5RQ5JYF-C2t5ES1t.js → si-LK-N5RQ5JYF-D4AT7z9z.js} +1 -1
  247. package/dist-embed/chunks/{sizeCapture-INFHLROL-BCe0IiFV.js → sizeCapture-INFHLROL-B_CNNL_v.js} +1 -1
  248. package/dist-embed/chunks/{sizeCapture-INFHLROL-BsZaIjAU.js → sizeCapture-INFHLROL-_h3QW8w5.js} +1 -1
  249. package/dist-embed/chunks/{sizeCapture-INFHLROL-Y7lBmAj6.js → sizeCapture-INFHLROL-cLmnJm7s.js} +1 -1
  250. package/dist-embed/chunks/{sk-SK-C5VTKIMK-BPwM2QoN.js → sk-SK-C5VTKIMK-zTXKcnhq.js} +1 -1
  251. package/dist-embed/chunks/{sl-SI-NN7IZMDC-BCS7eO-5.js → sl-SI-NN7IZMDC-DrxXPVrt.js} +1 -1
  252. package/dist-embed/chunks/{state-DeMGhTAB.js → state-CGa66Nqd.js} +1 -1
  253. package/dist-embed/chunks/{stateDiagram-43e79a5f-2cuSVith.js → stateDiagram-43e79a5f-CKwOZnPj.js} +1 -1
  254. package/dist-embed/chunks/{stateDiagram-D77RDMKH-DosU0FIz.js → stateDiagram-D77RDMKH-BVJqlFiv.js} +1 -1
  255. package/dist-embed/chunks/{stateDiagram-D77RDMKH-ul2eLf5Q.js → stateDiagram-D77RDMKH-CEvuFuTH.js} +1 -1
  256. package/dist-embed/chunks/{stateDiagram-D77RDMKH-3P7AgNud.js → stateDiagram-D77RDMKH-Ns0E2Xy4.js} +1 -1
  257. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-Ur2pX7Zl.js → stateDiagram-v2-2041ed4f-Dx6MQIKx.js} +1 -1
  258. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-D0rhfnrW.js → stateDiagram-v2-MP3YSRHH-C_JHNwKt.js} +1 -1
  259. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-BvlJBilq.js → stateDiagram-v2-MP3YSRHH-DXcA38of.js} +1 -1
  260. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-DeEmivLr.js → stateDiagram-v2-MP3YSRHH-ok1qePbZ.js} +1 -1
  261. package/dist-embed/chunks/{styles-455b33cd-DPOVDa0x.js → styles-455b33cd-CyGhxLIv.js} +1 -1
  262. package/dist-embed/chunks/{styles-f932cba9-Dev7yXQc.js → styles-f932cba9-Yfe3P5e2.js} +1 -1
  263. package/dist-embed/chunks/{styles-fcc2142b-70zGEKfV.js → styles-fcc2142b-CoUogcOD.js} +1 -1
  264. package/dist-embed/chunks/{subset-shared.chunk-Cs06OLE4.js → subset-shared.chunk-Ez82ye3f.js} +1 -1
  265. package/dist-embed/chunks/{subset-worker.chunk-C-vXxYep.js → subset-worker.chunk-BJr6TVB9.js} +1 -1
  266. package/dist-embed/chunks/{substates-BuHNVWkx.js → substates-Bs9ZMVGa.js} +1 -1
  267. package/dist-embed/chunks/{sv-SE-XGPEYMSR-sUR_yJ3Z.js → sv-SE-XGPEYMSR-CVuCUAbC.js} +1 -1
  268. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-zokUeLzq.js → svgDrawCommon-148a3cd9-Vfy_vJEN.js} +1 -1
  269. package/dist-embed/chunks/{swimlanes-42K2YHIH-x4BMo9Cs.js → swimlanes-42K2YHIH-BMEa5pc_.js} +1 -1
  270. package/dist-embed/chunks/{swimlanes-42K2YHIH-CIW2hU2l.js → swimlanes-42K2YHIH-CpRw9PHz.js} +1 -1
  271. package/dist-embed/chunks/{swimlanes-42K2YHIH-DOkKP2_2.js → swimlanes-42K2YHIH-DO1ZzP4k.js} +1 -1
  272. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-zOAH82Ya.js → swimlanesDiagram-VR7AAH4N-BCaTTDxJ.js} +1 -1
  273. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-9yw92Xx_.js → swimlanesDiagram-VR7AAH4N-BYKvE-MW.js} +1 -1
  274. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BlFZ7eQS.js → swimlanesDiagram-VR7AAH4N-BucpGmoC.js} +1 -1
  275. package/dist-embed/chunks/{ta-IN-2NMHFXQM-c1DneC5B.js → ta-IN-2NMHFXQM-BURg7Kc1.js} +1 -1
  276. package/dist-embed/chunks/{th-TH-HPSO5L25-TIsXPiQR.js → th-TH-HPSO5L25-CxVkDzOV.js} +1 -1
  277. package/dist-embed/chunks/{timeline-definition-24CTP7MA-C9Ed6D0K.js → timeline-definition-24CTP7MA-CRpA2xfq.js} +1 -1
  278. package/dist-embed/chunks/{timeline-definition-24CTP7MA-kHlycslq.js → timeline-definition-24CTP7MA-C_RPFzcS.js} +1 -1
  279. package/dist-embed/chunks/{timeline-definition-24CTP7MA-BfM-0614.js → timeline-definition-24CTP7MA-DUJPQe9n.js} +1 -1
  280. package/dist-embed/chunks/{timeline-definition-7545f45a-B4ECAP9Q.js → timeline-definition-7545f45a-BPBA2KPg.js} +1 -1
  281. package/dist-embed/chunks/{tr-TR-DEFEU3FU-Bvb4Ep_L.js → tr-TR-DEFEU3FU-DzMZjlaq.js} +1 -1
  282. package/dist-embed/chunks/{uk-UA-QMV73CPH-BNgdD_2E.js → uk-UA-QMV73CPH-DBHj_NAU.js} +1 -1
  283. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-7gMUaOyw.js → vennDiagram-4TSXK5OY-ByKQXzaL.js} +1 -1
  284. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-Dt9fBhlj.js → vennDiagram-4TSXK5OY-C4cLgb45.js} +1 -1
  285. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-CrE30dtz.js → vennDiagram-4TSXK5OY-CRiS0wYe.js} +1 -1
  286. package/dist-embed/chunks/{vi-VN-M7AON7JQ-T0aYX7Py.js → vi-VN-M7AON7JQ-B8B39qmP.js} +1 -1
  287. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-CsR-8GhP.js → wardleyDiagram-VM6X3IG4-BbgqGTmD.js} +1 -1
  288. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-6HRbbvDt.js → wardleyDiagram-VM6X3IG4-CLayLpj4.js} +1 -1
  289. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-AvAVDPLG.js → wardleyDiagram-VM6X3IG4-CnxCRlDr.js} +1 -1
  290. package/dist-embed/chunks/{xychartDiagram-3f383b91-C09F8RkF.js → xychartDiagram-3f383b91-zh1CmS72.js} +1 -1
  291. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CkZtbHvK.js → xychartDiagram-S5SC5T6Z-CYJl0Gtl.js} +1 -1
  292. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-VWPR98LV.js → xychartDiagram-S5SC5T6Z-CoRCml5l.js} +1 -1
  293. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-ZZD1fZ1L.js → xychartDiagram-S5SC5T6Z-RhhCg-yn.js} +1 -1
  294. package/dist-embed/chunks/{zh-CN-LNUGB5OW-CpDHeCAz.js → zh-CN-LNUGB5OW-OOkUvmDB.js} +1 -1
  295. package/dist-embed/chunks/{zh-HK-E62DVLB3-B5Kmyhoq.js → zh-HK-E62DVLB3-r2T4uQQz.js} +1 -1
  296. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-D-Gvp4EC.js → zh-TW-RAJ6MFWO-CVJ2FptU.js} +1 -1
  297. package/dist-embed/datalayer-app-main.js +231 -62
  298. package/lib/apps/Application.d.ts +1 -1
  299. package/lib/apps/Application.js +4 -0
  300. package/lib/apps/apps/AppRenderer.d.ts +7 -0
  301. package/lib/apps/apps/AppRenderer.js +21 -2
  302. package/lib/apps/apps/appspec.js +7 -1
  303. package/lib/apps/core/index.d.ts +33 -1
  304. package/lib/apps/core/index.js +15 -0
  305. package/lib/apps/plugins/chat/ChatView.js +3 -0
  306. package/lib/apps/shell/LeftPanel.d.ts +85 -0
  307. package/lib/apps/shell/LeftPanel.js +138 -0
  308. package/lib/apps/shell/LoopWorkspace.js +27 -2
  309. package/lib/apps/shell/index.d.ts +1 -0
  310. package/lib/apps/shell/index.js +1 -0
  311. package/lib/chat/Chat.d.ts +1 -1
  312. package/lib/chat/Chat.js +2 -2
  313. package/lib/chat/base/ChatBase.js +2 -1
  314. package/lib/chat/header/ChatHeaderBase.d.ts +7 -1
  315. package/lib/chat/header/ChatHeaderBase.js +2 -2
  316. package/lib/specs/actions.js +2 -0
  317. package/lib/specs/agentPresentations.d.ts +26 -0
  318. package/lib/specs/agentPresentations.js +73 -0
  319. package/lib/specs/agents/agents.js +15 -1
  320. package/lib/specs/apps.d.ts +7 -6
  321. package/lib/specs/apps.js +292 -32
  322. package/lib/specs/appspecSchema.js +7 -0
  323. package/lib/types/agentspecs.d.ts +16 -1
  324. package/lib/types/agentspecs.js +1 -1
  325. package/lib/types/chat.d.ts +12 -0
  326. package/package.json +1 -1
  327. package/scripts/codegen/generate_agents.py +93 -2
  328. package/dist-embed/chunks/index.esm-CjezntnN.js +0 -1
@@ -196,4 +196,4 @@ try:
196
196
  __dl_kernel_variables(${t}, ${s})
197
197
  finally:
198
198
  del __dl_kernel_variables
199
- `}const V=new Map([["python",{code:be}]]);function Le(e,t){const s=e.toLowerCase();return V.set(s,t),()=>{V.get(s)===t&&V.delete(s)}}function O(e){if(!e)return;const t=e.toLowerCase();return V.get(t)??V.get(t.replace(/[0-9.]+$/,""))}function Z(e){return O(e)!==void 0}class b extends Error{constructor(t){super(t),this.name="KernelVariablesError"}}function X(e){const{stdout:t,error:s}=e,r=t.lastIndexOf(N),a=r>0?t.lastIndexOf(N,r-1):-1;if(a<0||r<=a)throw new b(s?`The kernel could not list its variables: ${s}`:"The kernel did not say what its variables are.");const l=t.slice(a+N.length,r);let c;try{c=JSON.parse(l)}catch{throw new b("The kernel answered with something that is not JSON.")}if(!c||typeof c!="object"||Array.isArray(c))throw new b("The kernel answered with no variables.");const u=c;if(typeof u.error=="string")throw new b(u.error);return u}const k=e=>typeof e=="string"?e:void 0,M=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;function ee(e){if(!e||typeof e!="object")return;const t=e,s=k(t.name);if(!s)return;const r=ge.includes(t.kind)?t.kind:"object",a={name:s,type:k(t.type)??"object",kind:r,preview:k(t.preview)??""},l=k(t.module);l&&(a.module=l);const c=M(t.size);c!==void 0&&(a.size=c),Array.isArray(t.shape)&&t.shape.every(m=>M(m)!==void 0)&&(a.shape=t.shape);const u=M(t.length);u!==void 0&&(a.length=u);const f=k(t.dtype);f&&(a.dtype=f);const o=k(t.model_id);return o&&(a.modelId=o),a}function je(e){const t=X(e);if(!Array.isArray(t.variables))throw new b("The kernel answered with no variables.");return t.variables.map(ee).filter(s=>s!==void 0)}function ke(e){const s=X(e).variable,r=ee(s);if(!s||!r)throw new b("The kernel did not describe the variable.");const a=s.data&&typeof s.data=="object"&&!Array.isArray(s.data)?s.data:{};return{...r,repr:k(s.repr)??"",truncated:s.truncated===!0,data:a}}async function ve(e,t={}){const s=O(t.language??"python");if(!s)throw new b(`Variables are listed for Python kernels, not ${t.language}.`);return je(await e(s.code({modules:t.modules})))}async function Se(e,t,s={}){const r=O(s.language??"python");if(!r)throw new b(`Variables are listed for Python kernels, not ${s.language}.`);return ke(await e(r.code({name:t})))}function S(e){if(e===void 0)return"";const t=["B","KB","MB","GB","TB"];let s=e,r=0;for(;s>=1024&&r<t.length-1;)s/=1024,r+=1;return r===0?`${s} ${t[r]}`:`${s.toFixed(s<10?1:0)} ${t[r]}`}function C(e){const{kind:t,shape:s,length:r,dtype:a}=e;if(t==="dataframe"&&s?.length===2)return`${s[0]} rows × ${s[1]} cols`;if(t==="series"&&s?.length)return`${s[0]} rows${a?` · ${a}`:""}`;if(t==="ndarray"&&s){const l=s.length?s.join(" × "):"scalar";return a?`${l} · ${a}`:l}return r!==void 0?t==="mapping"?`${r} ${r===1?"key":"keys"}`:t==="string"?`${r} ${r===1?"char":"chars"}`:`${r} ${r===1?"item":"items"}`:""}async function $e(e,t,s){const r=e.requestExecute({code:t,silent:!0,store_history:!1,stop_on_error:!1,allow_stdin:!1},!0);s?.(r.msg.header.msg_id);const a=[];let l;r.onIOPub=u=>{const f=u.header.msg_type;if(f==="stream"){const o=u.content;o.name==="stdout"&&a.push(o.text)}else if(f==="error"){const o=u.content;l=`${o.ename}: ${o.evalue}`}};const c=await r.done;if(!l&&c?.content?.status==="error"){const u=c.content;l=`${u.ename}: ${u.evalue}`}return{stdout:a.join(""),error:l}}function ze(e,t){return s=>$e(e,s,t)}const Ee=p.lazy(()=>le(()=>import("./WidgetVariableView-BQoMV999.js"),[],import.meta.url)),W={fontFamily:"mono",fontSize:0,whiteSpace:"pre-wrap",wordBreak:"break-word"};function E({variable:e}){return n.jsxs(i,{children:[n.jsx(i,{as:"pre","data-kernel-variable-repr":"",sx:{...W,m:0,p:2,maxHeight:240,overflow:"auto",bg:"canvas.inset",color:"fg.default",border:"1px solid",borderColor:"border.default",borderRadius:2},children:e.repr}),e.truncated&&n.jsxs(_,{as:"p",sx:{fontSize:0,color:"fg.muted",m:0,mt:1},children:["Cut at ",e.repr.length.toLocaleString()," characters."]})]})}function w({facts:e}){return n.jsx(i,{as:"dl",sx:{display:"grid",gridTemplateColumns:"max-content 1fr",columnGap:3,rowGap:1,m:0,fontSize:1},children:e.filter(([,t])=>t).map(([t,s])=>n.jsxs(i,{sx:{display:"contents"},children:[n.jsx(i,{as:"dt",sx:{color:"fg.muted"},children:t}),n.jsx(i,{as:"dd",sx:{m:0,...W,fontSize:1},children:s})]},t))})}function P({columns:e,index:t,rows:s,caption:r}){const a={px:2,py:1,borderBottom:"1px solid",borderColor:"border.muted",textAlign:"left",whiteSpace:"nowrap",fontFamily:"mono",fontSize:0};return n.jsx(i,{sx:{overflow:"auto",maxHeight:280,border:"1px solid",borderColor:"border.default",borderRadius:2},children:n.jsxs(i,{as:"table","data-kernel-variable-table":"",sx:{borderCollapse:"collapse",width:"100%",color:"fg.default"},children:[r&&n.jsx(i,{as:"caption",sx:{textAlign:"left",p:2,fontSize:0,color:"fg.muted"},children:r}),n.jsx("thead",{children:n.jsxs(i,{as:"tr",sx:{bg:"canvas.subtle"},children:[t&&n.jsx(i,{as:"th",sx:a}),e.map((l,c)=>n.jsx(i,{as:"th",sx:{...a,fontWeight:"bold"},children:l},`${l}-${c}`))]})}),n.jsx("tbody",{children:s.map((l,c)=>n.jsxs("tr",{children:[t&&n.jsx(i,{as:"th",sx:{...a,color:"fg.muted"},children:t[c]}),l.map((u,f)=>n.jsx(i,{as:"td",sx:a,children:u},f))]},c))})]})})}const y=e=>Array.isArray(e)?e.map(t=>String(t)):[],Ne=[{id:"scalar",matches:e=>e.kind==="scalar"||e.kind==="string",render:({variable:e})=>n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Type",e.type],["Length",e.length?.toLocaleString()],["Size",S(e.size)]]}),n.jsx(E,{variable:e})]})},{id:"collection",matches:e=>e.kind==="sequence"||e.kind==="set"||e.kind==="mapping",render:({variable:e})=>{const t=Array.isArray(e.data.items)?e.data.items:[],s=e.kind==="mapping";return n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Type",e.type],["Length",C(e)],["Size",S(e.size)]]}),t.length>0&&n.jsx(P,{caption:e.length!==void 0&&e.length>t.length?`The first ${t.length} of ${e.length.toLocaleString()}`:void 0,columns:s?["Key","Value"]:["Item"],index:s?void 0:t.map((r,a)=>String(a)),rows:t.map(r=>s?y(r):[String(r)])})]})}},{id:"ndarray",matches:e=>e.kind==="ndarray",render:({variable:e})=>n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Shape",e.shape?`(${e.shape.join(", ")})`:""],["Dtype",e.dtype],["Size",S(e.size)]]}),n.jsx(E,{variable:e})]})},{id:"dataframe",matches:e=>e.kind==="dataframe",render:({variable:e})=>{const t=y(e.data.columns),s=y(e.data.dtypes),r=Array.isArray(e.data.rows)?e.data.rows.map(y):[];return n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Shape",C(e)],["Size",S(e.size)]]}),t.length>0?n.jsx(P,{caption:`head(${r.length})`,columns:t.map((a,l)=>s[l]?`${a} · ${s[l]}`:a),index:y(e.data.index),rows:r}):n.jsx(E,{variable:e})]})}},{id:"series",matches:e=>e.kind==="series",render:({variable:e})=>{const t=y(e.data.values);return n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Name",e.data.name],["Length",C(e)],["Size",S(e.size)]]}),n.jsx(P,{caption:`head(${t.length})`,columns:[String(e.data.name??e.name)],index:y(e.data.index),rows:t.map(s=>[s])})]})}},{id:"figure",matches:e=>e.kind==="figure",render:({variable:e})=>typeof e.data.png=="string"?n.jsx(i,{as:"img",alt:`The figure ${e.name}`,src:`data:image/png;base64,${e.data.png}`,sx:{maxWidth:"100%",bg:"white",borderRadius:2}}):n.jsx(E,{variable:e})},{id:"widget",matches:e=>e.kind==="widget",summary:e=>e.preview?`value: ${e.preview}`:e.type,render:({variable:e,connection:t})=>n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Widget",e.type],["Value",e.preview],["Description",e.data.description]]}),t&&e.modelId?n.jsx(p.Suspense,{fallback:n.jsx(_,{sx:{fontSize:1,color:"fg.muted"},children:"Loading the widget…"}),children:n.jsx(Ee,{connection:t,modelId:e.modelId})}):n.jsx(_,{as:"p",sx:{m:0,fontSize:1,color:"fg.muted"},children:"The widget is drawn live where the page talks to its kernel."})]})},{id:"callable",matches:e=>e.kind==="function"||e.kind==="class"||e.kind==="module",summary:e=>e.kind==="module"?`module ${e.preview}`:`${e.kind} ${e.preview}`,render:({variable:e})=>n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.kind!=="module"&&n.jsxs(i,{sx:{...W,fontSize:1},children:[e.kind==="class"?"class ":"def ",e.preview,e.data.signature??""]}),e.kind==="class"&&y(e.data.bases).length>0&&n.jsx(i,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:y(e.data.bases).map(t=>n.jsx(Y,{variant:"secondary",children:t},t))}),n.jsx(w,{facts:[["Module",e.kind==="module"?e.preview:void 0],["File",e.data.file]]}),typeof e.data.doc=="string"&&e.data.doc&&n.jsx(_,{as:"p",sx:{m:0,fontSize:1,whiteSpace:"pre-wrap"},children:e.data.doc})]})}],U={id:"repr",matches:()=>!0,render:({variable:e})=>n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Type",e.module&&e.module!=="builtins"?`${e.module}.${e.type}`:e.type],["Size",S(e.size)]]}),n.jsx(E,{variable:e})]})};class Ve{_registered=[];register(t){return this._registered.unshift(t),()=>{this._registered=this._registered.filter(s=>s!==t)}}list(){return[...this._registered,...Ne,U]}resolve(t,s=[]){return[...s,...this.list()].find(r=>r.matches(t))??U}}const te=new Ve;function v({children:e,busy:t=!1,...s}){return n.jsxs(i,{...s,sx:{display:"flex",alignItems:"center",gap:2,p:3,color:"fg.muted",fontSize:1},children:[t&&n.jsx(_e,{size:"small"}),n.jsx(_,{children:e})]})}function Te(e,t,s,r,a){const[l,c]=p.useState({state:"none"});return p.useEffect(()=>{let u=!1;const f=o=>!u&&c(o);return s?(f(Z(r)?{state:"ready",execute:s,language:r}:{state:"unsupported",language:r}),()=>{u=!0}):!e&&!t?(f({state:"none"}),()=>{u=!0}):(f({state:"starting"}),(async()=>{e&&await e.ready;const o=t??e?.connection??null;if(!o){f({state:"none"});return}const x=(await o.info)?.language_info?.name??"";f(Z(x)?{state:"ready",execute:ze(o,g=>a.add(g)),language:x,connection:o}:{state:"unsupported",language:x||"an unknown language"})})().catch(()=>f({state:"none"})),()=>{u=!0})},[e,t,s,r,a]),l}function Ie({variable:e,connection:t,execute:s,language:r,renderers:a,version:l}){const[c,u]=p.useState(),[f,o]=p.useState();if(p.useEffect(()=>{let x=!1;return o(void 0),Se(s,e.name,{language:r}).then(g=>!x&&u(g)).catch(g=>!x&&o(g instanceof Error?g.message:String(g))),()=>{x=!0}},[s,e.name,r,l]),f)return n.jsx(Q,{variant:"danger",sx:{fontSize:1},children:f});if(!c)return n.jsx(v,{busy:!0,children:"Reading the variable…"});const m=te.resolve(c,a);return n.jsx(i,{"data-kernel-variable-details":c.name,"data-renderer":m.id,children:m.render({variable:c,connection:t})})}const Ce=({kernel:e,connection:t,execute:s,language:r="python",autoRefresh:a=!0,showModules:l=!1,renderers:c=[],maxHeight:u=480})=>{const f=p.useMemo(()=>new Set,[]),o=Te(e,t,s,r,f),[m,x]=p.useState(),[g,q]=p.useState(!1),[T,G]=p.useState(),[R,ne]=p.useState(""),[I,se]=p.useState(l),[re,K]=p.useState(),[ae,ie]=p.useState(0),B=p.useRef(void 0),$=p.useCallback(async()=>{if(o.state==="ready"){q(!0);try{const d=await ve(o.execute,{language:o.language,modules:I});x(d),G(void 0),ie(h=>h+1)}catch(d){G(d instanceof Error?d.message:String(d))}finally{q(!1)}}},[o,I]);p.useEffect(()=>{x(void 0),K(void 0),$()},[$]),p.useEffect(()=>{const d=o.state==="ready"?o.connection:void 0;if(!d||!a)return;const h=()=>{clearTimeout(B.current),B.current=setTimeout(()=>{$()},250)},L=(oe,j)=>{if(j.header.msg_type!=="status")return;const de=j.content.execution_state,F=j.parent_header;de==="idle"&&F?.msg_type==="execute_request"&&F.msg_id&&!f.has(F.msg_id)&&h()};let z=!1;const H=(oe,j)=>{j==="restarting"||j==="autorestarting"?(z=!0,x([]),K(void 0)):j==="idle"&&z&&(z=!1,h())};return d.iopubMessage.connect(L),d.statusChanged.connect(H),()=>{clearTimeout(B.current),d.iopubMessage.disconnect(L),d.statusChanged.disconnect(H)}},[o,a,$,f]);const A=p.useMemo(()=>{const d=R.trim().toLowerCase();return(m??[]).filter(h=>!d||h.name.toLowerCase().includes(d)||h.type.toLowerCase().includes(d))},[m,R]);if(o.state==="none")return n.jsx(v,{"data-kernel-variables":"none",children:"No kernel: its variables are listed once there is one."});if(o.state==="starting")return n.jsx(v,{busy:!0,"data-kernel-variables":"starting",children:"The kernel is starting…"});if(o.state==="unsupported")return n.jsx(v,{"data-kernel-variables":"unsupported",children:`Variables are listed for Python kernels; this one runs ${o.language}.`});const D=o;return n.jsxs(i,{"data-kernel-variables":"ready",sx:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[n.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:2},children:[n.jsx(ce,{"aria-label":"Filter the variables",placeholder:"Filter by name or type",leadingVisual:ue,value:R,onChange:d=>ne(d.target.value),size:"small",sx:{flex:1,minWidth:0}}),n.jsx(fe,{icon:pe,"aria-label":"Refresh the variables",size:"small",disabled:g,onClick:()=>{$()},"data-kernel-variables-refresh":""})]}),n.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:2},children:[n.jsx(_,{id:"kernel-variables-modules",sx:{fontSize:0,color:"fg.muted",flex:1},children:m?`${A.length} of ${m.length} variable${m.length===1?"":"s"}`:""}),n.jsx(_,{sx:{fontSize:0,color:"fg.muted"},children:"Modules"}),n.jsx(me,{size:"small","aria-labelledby":"kernel-variables-modules",checked:I,onClick:()=>se(!I),statusLabelPosition:"end"})]}),T&&n.jsx(Q,{variant:"danger",sx:{fontSize:1},children:T}),!m&&!T&&n.jsx(v,{busy:!0,children:"Listing the variables…"}),m&&m.length===0&&!T&&n.jsx(v,{"data-kernel-variables":"empty",children:"No variables yet: define some by running code."}),A.length>0&&n.jsx(i,{as:"ul",sx:{listStyle:"none",m:0,p:0,maxHeight:u,overflow:"auto",border:"1px solid",borderColor:"border.default",borderRadius:2},children:A.map(d=>{const h=re===d.name,L=te.resolve(d,c),z=C(d);return n.jsxs(i,{as:"li","data-kernel-variable":d.name,sx:{borderBottom:"1px solid",borderColor:"border.muted","&:last-child":{borderBottom:"none"}},children:[n.jsxs(i,{as:"button",type:"button","aria-expanded":h,onClick:()=>K(h?void 0:d.name),sx:{display:"grid",gridTemplateColumns:"auto minmax(0, 1fr) auto",columnGap:2,alignItems:"baseline",width:"100%",textAlign:"left",px:2,py:1,border:"none",bg:h?"canvas.subtle":"transparent",color:"fg.default",cursor:"pointer","&:hover":{bg:"canvas.subtle"}},children:[n.jsx(i,{sx:{color:"fg.muted",alignSelf:"center"},children:h?n.jsx(he,{size:12}):n.jsx(xe,{size:12})}),n.jsxs(i,{sx:{minWidth:0},children:[n.jsx(_,{sx:{fontFamily:"mono",fontSize:1,fontWeight:"bold"},children:d.name}),n.jsx(_,{as:"div",sx:{fontFamily:"mono",fontSize:0,color:"fg.muted",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:L.summary?.(d)??d.preview})]}),n.jsxs(i,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:1},children:[n.jsx(Y,{variant:"secondary",size:"small",children:d.type}),n.jsx(_,{sx:{fontSize:0,color:"fg.muted"},children:z||S(d.size)})]})]}),h&&n.jsx(i,{sx:{px:3,pb:3,pt:1},children:n.jsx(Ie,{variable:d,connection:D.connection,execute:D.execute,language:D.language,renderers:c,version:ae})})]},d.name)})}),m&&m.length>0&&A.length===0&&n.jsx(v,{children:"No variable matches the filter."})]})};export{Ce as K,ye as P,N as a,J as b,Ve as c,E as d,$e as e,P as f,b as g,U as h,S as i,Se as j,we as k,ze as l,C as m,te as n,O as o,X as p,ve as q,ke as r,je as s,be as t,Le as u,Z as v,ee as w};
199
+ `}const V=new Map([["python",{code:be}]]);function Le(e,t){const s=e.toLowerCase();return V.set(s,t),()=>{V.get(s)===t&&V.delete(s)}}function O(e){if(!e)return;const t=e.toLowerCase();return V.get(t)??V.get(t.replace(/[0-9.]+$/,""))}function Z(e){return O(e)!==void 0}class b extends Error{constructor(t){super(t),this.name="KernelVariablesError"}}function X(e){const{stdout:t,error:s}=e,r=t.lastIndexOf(N),a=r>0?t.lastIndexOf(N,r-1):-1;if(a<0||r<=a)throw new b(s?`The kernel could not list its variables: ${s}`:"The kernel did not say what its variables are.");const l=t.slice(a+N.length,r);let c;try{c=JSON.parse(l)}catch{throw new b("The kernel answered with something that is not JSON.")}if(!c||typeof c!="object"||Array.isArray(c))throw new b("The kernel answered with no variables.");const u=c;if(typeof u.error=="string")throw new b(u.error);return u}const k=e=>typeof e=="string"?e:void 0,M=e=>typeof e=="number"&&Number.isFinite(e)?e:void 0;function ee(e){if(!e||typeof e!="object")return;const t=e,s=k(t.name);if(!s)return;const r=ge.includes(t.kind)?t.kind:"object",a={name:s,type:k(t.type)??"object",kind:r,preview:k(t.preview)??""},l=k(t.module);l&&(a.module=l);const c=M(t.size);c!==void 0&&(a.size=c),Array.isArray(t.shape)&&t.shape.every(m=>M(m)!==void 0)&&(a.shape=t.shape);const u=M(t.length);u!==void 0&&(a.length=u);const f=k(t.dtype);f&&(a.dtype=f);const o=k(t.model_id);return o&&(a.modelId=o),a}function je(e){const t=X(e);if(!Array.isArray(t.variables))throw new b("The kernel answered with no variables.");return t.variables.map(ee).filter(s=>s!==void 0)}function ke(e){const s=X(e).variable,r=ee(s);if(!s||!r)throw new b("The kernel did not describe the variable.");const a=s.data&&typeof s.data=="object"&&!Array.isArray(s.data)?s.data:{};return{...r,repr:k(s.repr)??"",truncated:s.truncated===!0,data:a}}async function ve(e,t={}){const s=O(t.language??"python");if(!s)throw new b(`Variables are listed for Python kernels, not ${t.language}.`);return je(await e(s.code({modules:t.modules})))}async function Se(e,t,s={}){const r=O(s.language??"python");if(!r)throw new b(`Variables are listed for Python kernels, not ${s.language}.`);return ke(await e(r.code({name:t})))}function S(e){if(e===void 0)return"";const t=["B","KB","MB","GB","TB"];let s=e,r=0;for(;s>=1024&&r<t.length-1;)s/=1024,r+=1;return r===0?`${s} ${t[r]}`:`${s.toFixed(s<10?1:0)} ${t[r]}`}function C(e){const{kind:t,shape:s,length:r,dtype:a}=e;if(t==="dataframe"&&s?.length===2)return`${s[0]} rows × ${s[1]} cols`;if(t==="series"&&s?.length)return`${s[0]} rows${a?` · ${a}`:""}`;if(t==="ndarray"&&s){const l=s.length?s.join(" × "):"scalar";return a?`${l} · ${a}`:l}return r!==void 0?t==="mapping"?`${r} ${r===1?"key":"keys"}`:t==="string"?`${r} ${r===1?"char":"chars"}`:`${r} ${r===1?"item":"items"}`:""}async function $e(e,t,s){const r=e.requestExecute({code:t,silent:!0,store_history:!1,stop_on_error:!1,allow_stdin:!1},!0);s?.(r.msg.header.msg_id);const a=[];let l;r.onIOPub=u=>{const f=u.header.msg_type;if(f==="stream"){const o=u.content;o.name==="stdout"&&a.push(o.text)}else if(f==="error"){const o=u.content;l=`${o.ename}: ${o.evalue}`}};const c=await r.done;if(!l&&c?.content?.status==="error"){const u=c.content;l=`${u.ename}: ${u.evalue}`}return{stdout:a.join(""),error:l}}function ze(e,t){return s=>$e(e,s,t)}const Ee=p.lazy(()=>le(()=>import("./WidgetVariableView-BBupZR8G.js"),[],import.meta.url)),W={fontFamily:"mono",fontSize:0,whiteSpace:"pre-wrap",wordBreak:"break-word"};function E({variable:e}){return n.jsxs(i,{children:[n.jsx(i,{as:"pre","data-kernel-variable-repr":"",sx:{...W,m:0,p:2,maxHeight:240,overflow:"auto",bg:"canvas.inset",color:"fg.default",border:"1px solid",borderColor:"border.default",borderRadius:2},children:e.repr}),e.truncated&&n.jsxs(_,{as:"p",sx:{fontSize:0,color:"fg.muted",m:0,mt:1},children:["Cut at ",e.repr.length.toLocaleString()," characters."]})]})}function w({facts:e}){return n.jsx(i,{as:"dl",sx:{display:"grid",gridTemplateColumns:"max-content 1fr",columnGap:3,rowGap:1,m:0,fontSize:1},children:e.filter(([,t])=>t).map(([t,s])=>n.jsxs(i,{sx:{display:"contents"},children:[n.jsx(i,{as:"dt",sx:{color:"fg.muted"},children:t}),n.jsx(i,{as:"dd",sx:{m:0,...W,fontSize:1},children:s})]},t))})}function P({columns:e,index:t,rows:s,caption:r}){const a={px:2,py:1,borderBottom:"1px solid",borderColor:"border.muted",textAlign:"left",whiteSpace:"nowrap",fontFamily:"mono",fontSize:0};return n.jsx(i,{sx:{overflow:"auto",maxHeight:280,border:"1px solid",borderColor:"border.default",borderRadius:2},children:n.jsxs(i,{as:"table","data-kernel-variable-table":"",sx:{borderCollapse:"collapse",width:"100%",color:"fg.default"},children:[r&&n.jsx(i,{as:"caption",sx:{textAlign:"left",p:2,fontSize:0,color:"fg.muted"},children:r}),n.jsx("thead",{children:n.jsxs(i,{as:"tr",sx:{bg:"canvas.subtle"},children:[t&&n.jsx(i,{as:"th",sx:a}),e.map((l,c)=>n.jsx(i,{as:"th",sx:{...a,fontWeight:"bold"},children:l},`${l}-${c}`))]})}),n.jsx("tbody",{children:s.map((l,c)=>n.jsxs("tr",{children:[t&&n.jsx(i,{as:"th",sx:{...a,color:"fg.muted"},children:t[c]}),l.map((u,f)=>n.jsx(i,{as:"td",sx:a,children:u},f))]},c))})]})})}const y=e=>Array.isArray(e)?e.map(t=>String(t)):[],Ne=[{id:"scalar",matches:e=>e.kind==="scalar"||e.kind==="string",render:({variable:e})=>n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Type",e.type],["Length",e.length?.toLocaleString()],["Size",S(e.size)]]}),n.jsx(E,{variable:e})]})},{id:"collection",matches:e=>e.kind==="sequence"||e.kind==="set"||e.kind==="mapping",render:({variable:e})=>{const t=Array.isArray(e.data.items)?e.data.items:[],s=e.kind==="mapping";return n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Type",e.type],["Length",C(e)],["Size",S(e.size)]]}),t.length>0&&n.jsx(P,{caption:e.length!==void 0&&e.length>t.length?`The first ${t.length} of ${e.length.toLocaleString()}`:void 0,columns:s?["Key","Value"]:["Item"],index:s?void 0:t.map((r,a)=>String(a)),rows:t.map(r=>s?y(r):[String(r)])})]})}},{id:"ndarray",matches:e=>e.kind==="ndarray",render:({variable:e})=>n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Shape",e.shape?`(${e.shape.join(", ")})`:""],["Dtype",e.dtype],["Size",S(e.size)]]}),n.jsx(E,{variable:e})]})},{id:"dataframe",matches:e=>e.kind==="dataframe",render:({variable:e})=>{const t=y(e.data.columns),s=y(e.data.dtypes),r=Array.isArray(e.data.rows)?e.data.rows.map(y):[];return n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Shape",C(e)],["Size",S(e.size)]]}),t.length>0?n.jsx(P,{caption:`head(${r.length})`,columns:t.map((a,l)=>s[l]?`${a} · ${s[l]}`:a),index:y(e.data.index),rows:r}):n.jsx(E,{variable:e})]})}},{id:"series",matches:e=>e.kind==="series",render:({variable:e})=>{const t=y(e.data.values);return n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Name",e.data.name],["Length",C(e)],["Size",S(e.size)]]}),n.jsx(P,{caption:`head(${t.length})`,columns:[String(e.data.name??e.name)],index:y(e.data.index),rows:t.map(s=>[s])})]})}},{id:"figure",matches:e=>e.kind==="figure",render:({variable:e})=>typeof e.data.png=="string"?n.jsx(i,{as:"img",alt:`The figure ${e.name}`,src:`data:image/png;base64,${e.data.png}`,sx:{maxWidth:"100%",bg:"white",borderRadius:2}}):n.jsx(E,{variable:e})},{id:"widget",matches:e=>e.kind==="widget",summary:e=>e.preview?`value: ${e.preview}`:e.type,render:({variable:e,connection:t})=>n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Widget",e.type],["Value",e.preview],["Description",e.data.description]]}),t&&e.modelId?n.jsx(p.Suspense,{fallback:n.jsx(_,{sx:{fontSize:1,color:"fg.muted"},children:"Loading the widget…"}),children:n.jsx(Ee,{connection:t,modelId:e.modelId})}):n.jsx(_,{as:"p",sx:{m:0,fontSize:1,color:"fg.muted"},children:"The widget is drawn live where the page talks to its kernel."})]})},{id:"callable",matches:e=>e.kind==="function"||e.kind==="class"||e.kind==="module",summary:e=>e.kind==="module"?`module ${e.preview}`:`${e.kind} ${e.preview}`,render:({variable:e})=>n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[e.kind!=="module"&&n.jsxs(i,{sx:{...W,fontSize:1},children:[e.kind==="class"?"class ":"def ",e.preview,e.data.signature??""]}),e.kind==="class"&&y(e.data.bases).length>0&&n.jsx(i,{sx:{display:"flex",gap:1,flexWrap:"wrap"},children:y(e.data.bases).map(t=>n.jsx(Y,{variant:"secondary",children:t},t))}),n.jsx(w,{facts:[["Module",e.kind==="module"?e.preview:void 0],["File",e.data.file]]}),typeof e.data.doc=="string"&&e.data.doc&&n.jsx(_,{as:"p",sx:{m:0,fontSize:1,whiteSpace:"pre-wrap"},children:e.data.doc})]})}],U={id:"repr",matches:()=>!0,render:({variable:e})=>n.jsxs(i,{sx:{display:"flex",flexDirection:"column",gap:2},children:[n.jsx(w,{facts:[["Type",e.module&&e.module!=="builtins"?`${e.module}.${e.type}`:e.type],["Size",S(e.size)]]}),n.jsx(E,{variable:e})]})};class Ve{_registered=[];register(t){return this._registered.unshift(t),()=>{this._registered=this._registered.filter(s=>s!==t)}}list(){return[...this._registered,...Ne,U]}resolve(t,s=[]){return[...s,...this.list()].find(r=>r.matches(t))??U}}const te=new Ve;function v({children:e,busy:t=!1,...s}){return n.jsxs(i,{...s,sx:{display:"flex",alignItems:"center",gap:2,p:3,color:"fg.muted",fontSize:1},children:[t&&n.jsx(_e,{size:"small"}),n.jsx(_,{children:e})]})}function Te(e,t,s,r,a){const[l,c]=p.useState({state:"none"});return p.useEffect(()=>{let u=!1;const f=o=>!u&&c(o);return s?(f(Z(r)?{state:"ready",execute:s,language:r}:{state:"unsupported",language:r}),()=>{u=!0}):!e&&!t?(f({state:"none"}),()=>{u=!0}):(f({state:"starting"}),(async()=>{e&&await e.ready;const o=t??e?.connection??null;if(!o){f({state:"none"});return}const x=(await o.info)?.language_info?.name??"";f(Z(x)?{state:"ready",execute:ze(o,g=>a.add(g)),language:x,connection:o}:{state:"unsupported",language:x||"an unknown language"})})().catch(()=>f({state:"none"})),()=>{u=!0})},[e,t,s,r,a]),l}function Ie({variable:e,connection:t,execute:s,language:r,renderers:a,version:l}){const[c,u]=p.useState(),[f,o]=p.useState();if(p.useEffect(()=>{let x=!1;return o(void 0),Se(s,e.name,{language:r}).then(g=>!x&&u(g)).catch(g=>!x&&o(g instanceof Error?g.message:String(g))),()=>{x=!0}},[s,e.name,r,l]),f)return n.jsx(Q,{variant:"danger",sx:{fontSize:1},children:f});if(!c)return n.jsx(v,{busy:!0,children:"Reading the variable…"});const m=te.resolve(c,a);return n.jsx(i,{"data-kernel-variable-details":c.name,"data-renderer":m.id,children:m.render({variable:c,connection:t})})}const Ce=({kernel:e,connection:t,execute:s,language:r="python",autoRefresh:a=!0,showModules:l=!1,renderers:c=[],maxHeight:u=480})=>{const f=p.useMemo(()=>new Set,[]),o=Te(e,t,s,r,f),[m,x]=p.useState(),[g,q]=p.useState(!1),[T,G]=p.useState(),[R,ne]=p.useState(""),[I,se]=p.useState(l),[re,K]=p.useState(),[ae,ie]=p.useState(0),B=p.useRef(void 0),$=p.useCallback(async()=>{if(o.state==="ready"){q(!0);try{const d=await ve(o.execute,{language:o.language,modules:I});x(d),G(void 0),ie(h=>h+1)}catch(d){G(d instanceof Error?d.message:String(d))}finally{q(!1)}}},[o,I]);p.useEffect(()=>{x(void 0),K(void 0),$()},[$]),p.useEffect(()=>{const d=o.state==="ready"?o.connection:void 0;if(!d||!a)return;const h=()=>{clearTimeout(B.current),B.current=setTimeout(()=>{$()},250)},L=(oe,j)=>{if(j.header.msg_type!=="status")return;const de=j.content.execution_state,F=j.parent_header;de==="idle"&&F?.msg_type==="execute_request"&&F.msg_id&&!f.has(F.msg_id)&&h()};let z=!1;const H=(oe,j)=>{j==="restarting"||j==="autorestarting"?(z=!0,x([]),K(void 0)):j==="idle"&&z&&(z=!1,h())};return d.iopubMessage.connect(L),d.statusChanged.connect(H),()=>{clearTimeout(B.current),d.iopubMessage.disconnect(L),d.statusChanged.disconnect(H)}},[o,a,$,f]);const A=p.useMemo(()=>{const d=R.trim().toLowerCase();return(m??[]).filter(h=>!d||h.name.toLowerCase().includes(d)||h.type.toLowerCase().includes(d))},[m,R]);if(o.state==="none")return n.jsx(v,{"data-kernel-variables":"none",children:"No kernel: its variables are listed once there is one."});if(o.state==="starting")return n.jsx(v,{busy:!0,"data-kernel-variables":"starting",children:"The kernel is starting…"});if(o.state==="unsupported")return n.jsx(v,{"data-kernel-variables":"unsupported",children:`Variables are listed for Python kernels; this one runs ${o.language}.`});const D=o;return n.jsxs(i,{"data-kernel-variables":"ready",sx:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[n.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:2},children:[n.jsx(ce,{"aria-label":"Filter the variables",placeholder:"Filter by name or type",leadingVisual:ue,value:R,onChange:d=>ne(d.target.value),size:"small",sx:{flex:1,minWidth:0}}),n.jsx(fe,{icon:pe,"aria-label":"Refresh the variables",size:"small",disabled:g,onClick:()=>{$()},"data-kernel-variables-refresh":""})]}),n.jsxs(i,{sx:{display:"flex",alignItems:"center",gap:2},children:[n.jsx(_,{id:"kernel-variables-modules",sx:{fontSize:0,color:"fg.muted",flex:1},children:m?`${A.length} of ${m.length} variable${m.length===1?"":"s"}`:""}),n.jsx(_,{sx:{fontSize:0,color:"fg.muted"},children:"Modules"}),n.jsx(me,{size:"small","aria-labelledby":"kernel-variables-modules",checked:I,onClick:()=>se(!I),statusLabelPosition:"end"})]}),T&&n.jsx(Q,{variant:"danger",sx:{fontSize:1},children:T}),!m&&!T&&n.jsx(v,{busy:!0,children:"Listing the variables…"}),m&&m.length===0&&!T&&n.jsx(v,{"data-kernel-variables":"empty",children:"No variables yet: define some by running code."}),A.length>0&&n.jsx(i,{as:"ul",sx:{listStyle:"none",m:0,p:0,maxHeight:u,overflow:"auto",border:"1px solid",borderColor:"border.default",borderRadius:2},children:A.map(d=>{const h=re===d.name,L=te.resolve(d,c),z=C(d);return n.jsxs(i,{as:"li","data-kernel-variable":d.name,sx:{borderBottom:"1px solid",borderColor:"border.muted","&:last-child":{borderBottom:"none"}},children:[n.jsxs(i,{as:"button",type:"button","aria-expanded":h,onClick:()=>K(h?void 0:d.name),sx:{display:"grid",gridTemplateColumns:"auto minmax(0, 1fr) auto",columnGap:2,alignItems:"baseline",width:"100%",textAlign:"left",px:2,py:1,border:"none",bg:h?"canvas.subtle":"transparent",color:"fg.default",cursor:"pointer","&:hover":{bg:"canvas.subtle"}},children:[n.jsx(i,{sx:{color:"fg.muted",alignSelf:"center"},children:h?n.jsx(he,{size:12}):n.jsx(xe,{size:12})}),n.jsxs(i,{sx:{minWidth:0},children:[n.jsx(_,{sx:{fontFamily:"mono",fontSize:1,fontWeight:"bold"},children:d.name}),n.jsx(_,{as:"div",sx:{fontFamily:"mono",fontSize:0,color:"fg.muted",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:L.summary?.(d)??d.preview})]}),n.jsxs(i,{sx:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:1},children:[n.jsx(Y,{variant:"secondary",size:"small",children:d.type}),n.jsx(_,{sx:{fontSize:0,color:"fg.muted"},children:z||S(d.size)})]})]}),h&&n.jsx(i,{sx:{px:3,pb:3,pt:1},children:n.jsx(Ie,{variable:d,connection:D.connection,execute:D.execute,language:D.language,renderers:c,version:ae})})]},d.name)})}),m&&m.length>0&&A.length===0&&n.jsx(v,{children:"No variable matches the filter."})]})};export{Ce as K,ye as P,N as a,J as b,Ve as c,E as d,$e as e,P as f,b as g,U as h,S as i,Se as j,we as k,ze as l,C as m,te as n,O as o,X as p,ve as q,ke as r,je as s,be as t,Le as u,Z as v,ee as w};
@@ -1 +1 @@
1
- import{r as C,Z as h,j as l,B as c,T as j,$ as I}from"../datalayer-app-main.js";import{O as v,a as T,C as k}from"./Output-Do1CYRIF.js";import"./index-i9IsP_xD.js";import"./hoverbox-CStlKQWE.js";import"./index--Rl4aMiU.js";import"./index-DrrVr0x3.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";const R=new Set(["insertCell","updateCell","runCell","datalayer_insertCell","datalayer_updateCell","datalayer_runCell"]),w=new Set(["executeCodeInNotebook","datalayer_executeCodeInNotebook","executeCodeInDocument","datalayer_executeCodeInDocument"]);function O(r){const e=r.result;if(e&&typeof e=="object")return e;if(typeof e=="string")try{const t=I(e);if(t&&typeof t=="object")return t}catch{}}function S(r){const e=r.args??{};if(typeof e.index=="number")return e.index;const t=O(r);if(t&&typeof t.index=="number")return t.index}function B(r,e){const t=S(e);return t===void 0?null:h.getState().notebooks.get(r)?.model?.cells?.get(t)??null}function L(r){const e=O(r)??{},t=[];for(const o of e.outputs??[]){const s=o.content;if(s&&typeof s=="object"){const d=s;if("output_type"in d){t.push(d);continue}if("data"in d||"text"in d||"ename"in d){t.push({output_type:o.type??"display_data",...d});continue}}t.push({output_type:"stream",name:"stdout",text:String(s??"")})}return t}const b=new WeakSet,M={insertCell:"inserted",updateCell:"updated",runCell:"ran",executeCodeInNotebook:"executed",executeCodeInDocument:"executed"};function H({documentId:r,context:e}){const{name:t,status:o,defaultUI:s}=e,d=t.replace(/^datalayer_/,""),i=C.useRef({id:null,model:null}),[,_]=C.useState(0);C.useEffect(()=>{if(!w.has(t)||o!=="executing"||i.current.id===e.toolCallId&&i.current.model)return;let u=!1,x;const g=()=>{if(u)return;const y=h.getState().notebooks.get(r)?.adapter?.lastExecuteOutputs??null;if(y&&!b.has(y)){_(E=>E+1);return}x=window.setTimeout(g,250)};return g(),()=>{u=!0,x!==void 0&&window.clearTimeout(x)}},[t,o,e.toolCallId,r]);let a=null,p=null,n=null,f;if(o==="executing"||o==="complete"||o==="error"){if(R.has(t))f=S(e),a=B(r,e);else if(w.has(t)){if(i.current.id!==e.toolCallId){const u=h.getState().notebooks.get(r)?.adapter?.lastExecuteOutputs??null;u&&!b.has(u)&&(i.current={id:e.toolCallId,model:u})}if(n=i.current.id===e.toolCallId?i.current.model:null,n&&o!=="executing"&&b.add(n),!n&&o==="complete"){const u=L(e);p=u.length>0?u:null}}}const m=a?.type==="code"?a.outputs:void 0;return l.jsxs(l.Fragment,{children:[s,n||p?l.jsxs(c,{mt:1,width:"100%",border:"1px solid",borderColor:"border.default",borderRadius:2,overflow:"hidden",bg:"canvas.default",children:[l.jsx(c,{px:2,py:1,bg:"canvas.subtle",borderBottom:"1px solid",borderColor:"border.muted",children:l.jsxs(j,{sx:{fontSize:0,color:"fg.muted"},children:["Output ·"," ",o==="executing"?"executing…":o==="error"?"stopped":"executed"]})}),l.jsx(c,{p:2,children:n?l.jsx(v,{id:`${e.toolCallId}-execute-outputs`,model:n,showControl:!1,showEditor:!1,autoRun:!1}):l.jsx(T,{cell:{cell_type:"code",outputs:p,metadata:{}}})})]}):null,a?l.jsxs(c,{mt:1,width:"100%",border:"1px solid",borderColor:"border.default",borderRadius:2,overflow:"hidden",bg:"canvas.default",children:[l.jsx(c,{px:2,py:1,bg:"canvas.subtle",borderBottom:"1px solid",borderColor:"border.muted",children:l.jsxs(j,{sx:{fontSize:0,color:"fg.muted"},children:[f!==void 0?`Cell ${f}`:"Cell"," · ",M[d]??d]})}),l.jsx(k,{readOnly:!0,type:a.type??"code",source:a.sharedModel.getSource(),outputs:[]}),m&&(o==="executing"||m.length>0)?l.jsx(c,{borderTop:"1px solid",borderColor:"border.muted",p:2,children:l.jsx(v,{id:`${e.toolCallId}-outputs`,model:m,showControl:!1,showEditor:!1,autoRun:!1})}):null]}):null]})}export{R as CELL_TOOLS,w as EXECUTE_TOOLS,H as NotebookToolSurfaces,O as decodedResult,H as default,L as executionOutputs,S as touchedCellIndex,B as touchedCellModel};
1
+ import{r as C,Z as h,j as l,B as c,T as j,$ as I}from"../datalayer-app-main.js";import{O as v,a as T,C as k}from"./Output-BmVt4DpZ.js";import"./index-i9IsP_xD.js";import"./hoverbox-CStlKQWE.js";import"./index--Rl4aMiU.js";import"./index-5os8HYj-.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";const R=new Set(["insertCell","updateCell","runCell","datalayer_insertCell","datalayer_updateCell","datalayer_runCell"]),w=new Set(["executeCodeInNotebook","datalayer_executeCodeInNotebook","executeCodeInDocument","datalayer_executeCodeInDocument"]);function O(r){const e=r.result;if(e&&typeof e=="object")return e;if(typeof e=="string")try{const t=I(e);if(t&&typeof t=="object")return t}catch{}}function S(r){const e=r.args??{};if(typeof e.index=="number")return e.index;const t=O(r);if(t&&typeof t.index=="number")return t.index}function B(r,e){const t=S(e);return t===void 0?null:h.getState().notebooks.get(r)?.model?.cells?.get(t)??null}function L(r){const e=O(r)??{},t=[];for(const o of e.outputs??[]){const s=o.content;if(s&&typeof s=="object"){const d=s;if("output_type"in d){t.push(d);continue}if("data"in d||"text"in d||"ename"in d){t.push({output_type:o.type??"display_data",...d});continue}}t.push({output_type:"stream",name:"stdout",text:String(s??"")})}return t}const b=new WeakSet,M={insertCell:"inserted",updateCell:"updated",runCell:"ran",executeCodeInNotebook:"executed",executeCodeInDocument:"executed"};function H({documentId:r,context:e}){const{name:t,status:o,defaultUI:s}=e,d=t.replace(/^datalayer_/,""),i=C.useRef({id:null,model:null}),[,_]=C.useState(0);C.useEffect(()=>{if(!w.has(t)||o!=="executing"||i.current.id===e.toolCallId&&i.current.model)return;let u=!1,x;const g=()=>{if(u)return;const y=h.getState().notebooks.get(r)?.adapter?.lastExecuteOutputs??null;if(y&&!b.has(y)){_(E=>E+1);return}x=window.setTimeout(g,250)};return g(),()=>{u=!0,x!==void 0&&window.clearTimeout(x)}},[t,o,e.toolCallId,r]);let a=null,p=null,n=null,f;if(o==="executing"||o==="complete"||o==="error"){if(R.has(t))f=S(e),a=B(r,e);else if(w.has(t)){if(i.current.id!==e.toolCallId){const u=h.getState().notebooks.get(r)?.adapter?.lastExecuteOutputs??null;u&&!b.has(u)&&(i.current={id:e.toolCallId,model:u})}if(n=i.current.id===e.toolCallId?i.current.model:null,n&&o!=="executing"&&b.add(n),!n&&o==="complete"){const u=L(e);p=u.length>0?u:null}}}const m=a?.type==="code"?a.outputs:void 0;return l.jsxs(l.Fragment,{children:[s,n||p?l.jsxs(c,{mt:1,width:"100%",border:"1px solid",borderColor:"border.default",borderRadius:2,overflow:"hidden",bg:"canvas.default",children:[l.jsx(c,{px:2,py:1,bg:"canvas.subtle",borderBottom:"1px solid",borderColor:"border.muted",children:l.jsxs(j,{sx:{fontSize:0,color:"fg.muted"},children:["Output ·"," ",o==="executing"?"executing…":o==="error"?"stopped":"executed"]})}),l.jsx(c,{p:2,children:n?l.jsx(v,{id:`${e.toolCallId}-execute-outputs`,model:n,showControl:!1,showEditor:!1,autoRun:!1}):l.jsx(T,{cell:{cell_type:"code",outputs:p,metadata:{}}})})]}):null,a?l.jsxs(c,{mt:1,width:"100%",border:"1px solid",borderColor:"border.default",borderRadius:2,overflow:"hidden",bg:"canvas.default",children:[l.jsx(c,{px:2,py:1,bg:"canvas.subtle",borderBottom:"1px solid",borderColor:"border.muted",children:l.jsxs(j,{sx:{fontSize:0,color:"fg.muted"},children:[f!==void 0?`Cell ${f}`:"Cell"," · ",M[d]??d]})}),l.jsx(k,{readOnly:!0,type:a.type??"code",source:a.sharedModel.getSource(),outputs:[]}),m&&(o==="executing"||m.length>0)?l.jsx(c,{borderTop:"1px solid",borderColor:"border.muted",p:2,children:l.jsx(v,{id:`${e.toolCallId}-outputs`,model:m,showControl:!1,showEditor:!1,autoRun:!1})}):null]}):null]})}export{R as CELL_TOOLS,w as EXECUTE_TOOLS,H as NotebookToolSurfaces,O as decodedResult,H as default,L as executionOutputs,S as touchedCellIndex,B as touchedCellModel};
@@ -1,2 +1,2 @@
1
- import{a1 as b,a2 as h,a7 as f,r as n,j as i,B as d,T as x,ac as k,ad as j,ae as v}from"../datalayer-app-main.js";import{EphemeralNotebook as I}from"./EphemeralNotebook-jQ7FGCY-.js";import{u as y,o as T,a as E}from"./openingNotebook-DTqjQOa4.js";import"./useProgressTask-DV0x1UbX.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./CellSidebarExtension-B_Bqi3Eh.js";import"./index--Rl4aMiU.js";import"./hoverbox-CStlKQWE.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./index-DrrVr0x3.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./renderer-B_98xkGt.js";import"./SquareIcon-Dy3l3VdH.js";function F({workspace:p}){const r=b(),e=h(r.snapshot),m=p.surfaceId,u=y(v,j,{workspace:p,editorId:m}),t=f(k)[0]?.value,s=n.useMemo(()=>t?t.notebook():T(),[t]),c=n.useMemo(()=>t?t.prime!==void 0?t.prime:s.cells.filter(o=>o.cell_type==="code").map(o=>Array.isArray(o.source)?o.source.join(""):o.source).join(`
1
+ import{a1 as b,a2 as h,a7 as f,r as n,j as i,B as d,T as x,ac as k,ad as j,ae as v}from"../datalayer-app-main.js";import{EphemeralNotebook as I}from"./EphemeralNotebook-C04wMmoE.js";import{u as y,o as T,a as E}from"./openingNotebook-DTqjQOa4.js";import"./useProgressTask-DV0x1UbX.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./CellSidebarExtension-CrgdhbHy.js";import"./index--Rl4aMiU.js";import"./hoverbox-CStlKQWE.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./index-5os8HYj-.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./renderer-CCsq5PXp.js";import"./SquareIcon-Dy3l3VdH.js";function F({workspace:p}){const r=b(),e=h(r.snapshot),m=p.surfaceId,u=y(v,j,{workspace:p,editorId:m}),t=f(k)[0]?.value,s=n.useMemo(()=>t?t.notebook():T(),[t]),c=n.useMemo(()=>t?t.prime!==void 0?t.prime:s.cells.filter(o=>o.cell_type==="code").map(o=>Array.isArray(o.source)?o.source.join(""):o.source).join(`
2
2
  `):E(),[t,s]),l=n.useRef(null);if(n.useEffect(()=>{const o=e.kernelId;e.state!=="running"||!o||l.current!==o&&(l.current=o,r.execute(c).catch(g=>{console.warn("[loop] could not prime the opening cell",g)}))},[r,e.state,e.kernelId,c]),e.state!=="running")return i.jsx(d,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:4,textAlign:"center",children:i.jsx(x,{children:"The notebook needs a running sandbox. Open the Sandbox view to see what it is doing."})});const a=r.getServiceManager()??void 0;return i.jsx(d,{sx:{height:"100%",minHeight:0,"& .jp-NotebookPanel":{height:"100% !important",minHeight:0},"& .dla-Box-Notebook":{display:"flex",flexDirection:"column",minHeight:0}},children:i.jsx(I,{nbformat:s,inheritTheme:!0,notebookId:m,serviceManager:a,kernelId:a?e.kernelId:void 0,showToolbar:u.present,toolbarExtraItems:u.items,runtimeOverride:!a&&e.jupyterUrl?{baseUrl:e.jupyterUrl,token:e.jupyterToken}:void 0})})}export{F as default};
@@ -1,4 +1,4 @@
1
- import{j as jsxRuntimeExports,e9 as ActionMenu,I as IconButton,h2 as KebabHorizontalIcon,bl as ActionList,kf as StopIcon,r as reactExports,lb as useJupyterReactStoreFromProps,kH as OutputAreaModel,lc as OutputArea,av as standardRendererFactories,gC as MessageLoop,aB as Widget,bh as PromiseDelegate,_ as __vitePreload,f3 as CodeCell,iL as MarkdownCell,ka as SessionContext,cs as find,eB as EditorThemeRegistry,ex as EditorLanguageRegistry,dL as CommandRegistry,ld as createStandaloneCell,iO as Cell$1,kx as CodeCellModel,kw as MarkdownCellModel,dC as ToolbarButton,fS as runIcon,le as BoxPanel,kE as DEFAULT_VARIANT,kF as MarimoReactive,lf as cellsStore,eC as EditorExtensionRegistry,eD as ybinding,kJ as newUuid,lg as RawCell,kv as RawCellModel,lh as useCellsStore,B as Box,dv as StyledSpinner,li as getPanel,lj as activateHover,kn as StateField,lk as showPanel,bN as EditorView,kB as Decoration,kA as StateEffect,kk as Facet,ll as combineConfig,lm as RangeSetBuilder,ln as crelt,lo as hoverTooltip,kC as WidgetType,lp as lineNumbers,lq as highlightActiveLineGutter,lr as highlightSpecialChars,ls as history,lt as foldGutter,lu as drawSelection,lv as dropCursor,c2 as EditorState,lw as indentOnInput,lx as syntaxHighlighting,ly as bracketMatching,lz as closeBrackets,lA as autocompletion,lB as rectangularSelection,lC as crosshairCursor,lD as highlightActiveLine,lE as highlightSelectionMatches,bZ as keymap,lF as closeBracketsKeymap,lG as defaultKeymap,lH as searchKeymap,lI as historyKeymap,lJ as foldKeymap,lK as completionKeymap,lL as defaultHighlightStyle,gc as useTheme,bx as Box$1,lM as ArrowRightIcon,lN as useOutputsStore,bY as Prec,lO as Compartment,at as getDefaultExportFromCjs}from"../datalayer-app-main.js";import{q as Toolbar}from"./index-i9IsP_xD.js";import{j as WidgetRenderer,W as WIDGET_MIMETYPE,h as getMarked,i as createLatexTypesetter,C as CodeMirrorEditorFactory,a as CodeMirrorMimeTypeService,c as CompleterModel,b as Completer,P as ProviderReconciliator,f as KernelCompleterProvider,d as CompletionHandler,r as rendererFactory$1,g as rendererFactory$2}from"./index--Rl4aMiU.js";import{D as DOMWidgetModel,g as DOMWidgetView,h as JupyterLuminoPanelWidget,$,M as ManagerBase,R as RenderMimeRegistry,E as ErrorWidgetView,b as base,c as controls,i as createErrorWidgetModel,a as WIDGET_STATE_MIMETYPE,s as shims,e as semverExports,r as requireLoader,S as SemVerCache,J as JUPYTER_WIDGETS_VERSION,d as JUPYTER_CONTROLS_VERSION,L as Lumino}from"./index-DrrVr0x3.js";import{python}from"./dist-Frc5TvpU.js";import{P as PaintbrushIcon}from"./PaintbrushIcon-CFBHU-3l.js";import{P as ProgressBar}from"./index-BaRoLDk0.js";import{F as ForwardRef}from"./RestartIcon-DvpOf5Mf.js";const KernelActionMenu=n=>{const{kernel:t,outputAdapter:o,onClearOutputs:r}=n;return jsxRuntimeExports.jsxs(ActionMenu,{children:[jsxRuntimeExports.jsx(ActionMenu.Anchor,{children:jsxRuntimeExports.jsx(IconButton,{"aria-labelledby":"",icon:KebabHorizontalIcon,variant:"invisible"})}),jsxRuntimeExports.jsx(ActionMenu.Overlay,{children:jsxRuntimeExports.jsxs(ActionList,{children:[jsxRuntimeExports.jsxs(ActionList.Item,{disabled:!t,onSelect:s=>{t&&t.interrupt().catch(a=>{console.error("[KernelActionMenu] Interrupt failed:",a)})},children:[jsxRuntimeExports.jsx(ActionList.LeadingVisual,{children:jsxRuntimeExports.jsx(StopIcon,{})}),"Interrupt kernel"]}),jsxRuntimeExports.jsxs(ActionList.Item,{disabled:!t,onSelect:s=>{t&&t.restart().catch(a=>{console.error("[KernelActionMenu] Restart failed:",a)})},children:[jsxRuntimeExports.jsx(ActionList.LeadingVisual,{children:jsxRuntimeExports.jsx(ForwardRef,{})}),"Restart kernel"]}),jsxRuntimeExports.jsxs(ActionList.Item,{variant:"danger",disabled:!1,onSelect:s=>{r?r():o&&o.clear()},children:[jsxRuntimeExports.jsx(ActionList.LeadingVisual,{children:jsxRuntimeExports.jsx(PaintbrushIcon,{})}),"Clear outputs"]})]})})]})},KernelProgressBar=()=>{const[n,t]=reactExports.useState(0);return reactExports.useEffect(()=>{const o=setInterval(()=>{t(r=>{let s=r+1;return s>100&&(s=0),s})},100);return()=>clearInterval(o)},[]),jsxRuntimeExports.jsx(ProgressBar,{progress:n,barSize:"small"})},useJupyter=n=>{const{jupyterConfig:t,kernel:o,kernelIsLoading:r,serviceManager:s}=useJupyterReactStoreFromProps(n??{});return{defaultKernel:o,jupyterServerUrl:t.jupyterServerUrl,kernel:o,kernelIsLoading:r,kernelManager:s?.kernels,lite:n?.lite,serverless:n?.serverless??!1,serverSettings:s?.serverSettings,serviceManager:s}},OUTPUT_WIDGET_VERSION="1.0.0";let OutputModel$1=class extends DOMWidgetModel{defaults(){return Object.assign(Object.assign({},super.defaults()),{_model_name:"OutputModel",_view_name:"OutputView",_model_module:"@jupyter-widgets/output",_view_module:"@jupyter-widgets/output",_model_module_version:OUTPUT_WIDGET_VERSION,_view_module_version:OUTPUT_WIDGET_VERSION})}},OutputView$1=class extends DOMWidgetView{};class OutputModel extends OutputModel$1{defaults(){return Object.assign(Object.assign({},super.defaults()),{msg_id:"",outputs:[]})}initialize(t,o){super.initialize(t,o),this._outputs=new OutputAreaModel({trusted:!0}),this.listenTo(this,"change:outputs",this.setOutputs),this.setOutputs()}get outputs(){return this._outputs}clear_output(t=!1){this._outputs.clear(t)}setOutputs(t,o,r){r&&r.newMessage||(this.clear_output(),this._outputs.fromJSON(JSON.parse(JSON.stringify(this.get("outputs")))))}}class OutputView extends OutputView$1{_createElement(t){return this.luminoWidget=new JupyterLuminoPanelWidget({view:this}),this.luminoWidget.node}_setElement(t){if(this.el||t!==this.luminoWidget.node)throw new Error("Cannot reset the DOM element.");this.el=this.luminoWidget.node,this.$el=$(this.luminoWidget.node)}render(){super.render(),this._outputView=new OutputArea({rendermime:this.model.widget_manager.renderMime,model:this.model.outputs}),this.luminoWidget.insertWidget(0,this._outputView),this.luminoWidget.addClass("jupyter-widgets"),this.luminoWidget.addClass("widget-output"),this.update()}remove(){return this._outputView.dispose(),super.remove()}}const outputWidgets=Object.freeze(Object.defineProperty({__proto__:null,OutputModel,OutputView},Symbol.toStringTag,{value:"Module"}));class HTMLManager extends ManagerBase{_viewList;constructor(t){super(),this.loader=t?.loader,this.renderMime=new RenderMimeRegistry({initialFactories:standardRendererFactories}),this.renderMime.addFactory({safe:!1,mimeTypes:[WIDGET_MIMETYPE],createRenderer:o=>new WidgetRenderer(o,this)},0),this._viewList=new Set,window.addEventListener("resize",()=>{this._viewList.forEach(o=>{MessageLoop.postMessage(o.luminoWidget,Widget.ResizeMessage.UnknownSize)})})}async display_view(t,o){let r;try{r=await t}catch(s){const a=`Could not create a view for ${t}`;console.error(a);const u=createErrorWidgetModel(s,a),h=new u;r=new ErrorWidgetView({model:h}),r.render()}Widget.attach(r.luminoWidget,o),this._viewList.add(r),r.once("remove",()=>{this._viewList.delete(r)})}filterExistingModelState(t){return super.filterExistingModelState(t)}_get_comm_info(){return Promise.resolve({})}_create_comm(t,o,r,s,a){return Promise.resolve({on_close:()=>{},on_msg:()=>{},close:()=>{}})}loadClass(t,o,r){return new Promise((s,a)=>{o==="@jupyter-widgets/base"?s(base):o==="@jupyter-widgets/controls"?s(controls):o==="@jupyter-widgets/output"?s(outputWidgets):this.loader!==void 0?s(this.loader(o,r)):a(`Could not load module ${o}@${r}`)}).then(s=>s[t]?s[t]:Promise.reject(`Class ${t} not found in module ${o}@${r}`))}renderMime;loader}class ClassicWidgetManager extends HTMLManager{_kernelConnection;_commRegistration;_onError;_registry;_ready=new PromiseDelegate;constructor(t){super(t),this.comm_target_name="jupyter.widget";const o=()=>{window.define("@jupyter-widgets/base",base),window.define("@jupyter-widgets/controls",controls),this._registry=new SemVerCache,this.register=this.register.bind(this),this.registerWithKernel=this.registerWithKernel.bind(this),this._getRegistry=this._getRegistry.bind(this),this._handleCommOpen=this._handleCommOpen.bind(this),this.register({name:"@jupyter-widgets/base",version:JUPYTER_WIDGETS_VERSION,exports:()=>__vitePreload(()=>import("./index-DrrVr0x3.js").then(r=>r.b),[],import.meta.url)}),this.register({name:"@jupyter-widgets/controls",version:JUPYTER_CONTROLS_VERSION,exports:()=>__vitePreload(()=>import("./index-DrrVr0x3.js").then(r=>r.c),[],import.meta.url)}),this._ready.resolve(!0)};if(window.require&&window.define)o();else{const r=document.createElement("script"),s=document.createElement("script");s.setAttribute("data-jupyter-widgets-cdn-only","true"),document.body.appendChild(s),r.src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js",document.body.appendChild(r),r.onload=()=>{o()},r.onerror=a=>{console.error("ClassicWidgetManager: Failed to load RequireJS",a),o()}}}get ready(){return this._ready}async _loadFromNotebook(t){const o=t.getMetadata("widgets");if(o&&o[WIDGET_STATE_MIMETYPE]){let r=o[WIDGET_STATE_MIMETYPE];r=this.filterExistingModelState(r),await this.set_state(r)}}registerWithKernel(t){if(this._kernelConnection=t,this.kernel=t,this._commRegistration&&this._commRegistration.dispose(),t){if(!this._registry){console.error("ClassicWidgetManager: Registry not initialized when registering with kernel.");return}this._commRegistration=t.registerCommTarget(this.comm_target_name,this._handleCommOpen)}else this.kernel=null}async _handleCommOpen(t,o){try{const r=new shims.services.Comm(t);await this.handle_comm_open(r,o)}catch(r){throw console.error("ClassicWidgetManager: Error in _handleCommOpen:",r),r}}_getRegistry(){return this._registry}get onError(){return this._onError}display_view(t,o){return Promise.resolve(t).then(r=>{Widget.attach(r.luminoWidget,o),r.on("remove",()=>{})})}async loadClass(t,o,r){(o==="@jupyter-widgets/base"||o==="@jupyter-widgets/controls")&&semverExports.valid(r)&&(r=`^${r}`);let s=this._getRegistry().getAllVersions(o);const a=r.split(".").length===2?r+".0":r;if(!s){const m=await requireLoader(o,a),w={name:o,version:a.replaceAll("^",""),exports:{...m}};if(this.register(w),s=this._getRegistry().getAllVersions(o),!s)throw new Error(`No version of module ${o} is registered`)}const u=this._getRegistry().get(o,a);if(!u){const m=Object.keys(s);throw new Error(`Module ${o}, version ${a} is not registered, however, ${m.join(",")} ${m.length>1?"are":"is"}`)}let h;typeof u=="function"?h=await u():h=await u;const b=h[t];if(!b)throw new Error(`Class ${t} not found in module ${o}`);return b}callbacks(t){const o=super.callbacks(t);return Object.assign({},o,{iopub:{output:r=>this._onError.emit(r)}})}_create_comm(t,o,r,s,a){const u=this._kernelConnection?.createComm(t,o);return(r||s)&&u?.open(r,s),Promise.resolve(new shims.services.Comm(u))}_get_comm_info(){return this._kernelConnection.requestCommInfo({target_name:this.comm_target_name}).then(t=>t.content.comms)}register(t){this._getRegistry().set(t.name,t.version,t.exports)}}const CSS_CLASS="jp-RenderedPlotly",MIME_TYPE="application/vnd.plotly.v1+json";class RenderedPlotly extends Widget{constructor(t){super(),this.addClass(CSS_CLASS),this._mimeType=t.mimeType,this._img_el=document.createElement("img"),this._img_el.className="plot-img",this.node.appendChild(this._img_el),this._img_el.addEventListener("mouseenter",o=>{this.createGraph(this._model)})}renderModel(t){if(this.hasGraphElement())return Promise.resolve();this._model=t;const o=t.data["image/png"];return o!=null?(this.updateImage(o),Promise.resolve()):this.createGraph(t)}hasGraphElement(){return this.node.querySelector(".plot-container")!==null}updateImage(t){this.hideGraph(),this._img_el.src="data:image/png;base64,"+t,this.showImage()}hideGraph(){const t=this.node.querySelector(".plot-container");t!=null&&(t.style.display="none")}showGraph(){const t=this.node.querySelector(".plot-container");t!=null&&(t.style.display="block")}hideImage(){const t=this.node.querySelector(".plot-img");t!=null&&(t.style.display="none")}showImage(){const t=this.node.querySelector(".plot-img");t!=null&&(t.style.display="block")}createGraph(t){const{data:o,layout:r,frames:s,config:a}=t.data[this._mimeType];return r.height||(r.height=360),(async()=>(RenderedPlotly.Plotly===null&&(RenderedPlotly.Plotly=await __vitePreload(()=>import("./index-DB6fbGKT.js").then(h=>h.i),[],import.meta.url),RenderedPlotly._resolveLoadingPlotly()),RenderedPlotly.loadingPlotly))().then(()=>RenderedPlotly.Plotly.react(this.node,o,r,a)).then(h=>{this.showGraph(),this.hideImage(),this.update(),s&&RenderedPlotly.Plotly.addFrames(this.node,s),this.node.offsetWidth>0&&this.node.offsetHeight>0&&RenderedPlotly.Plotly.toImage(h,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then(b=>{const m=b.split(",")[1];t.data["image/png"]!==m&&t.setData({data:{...t.data,"image/png":m}})}),this.node.on("plotly_webglcontextlost",()=>{const b=t.data["image/png"];if(b!=null)return this.updateImage(b),Promise.resolve()})})}onAfterShow(t){this.update()}onResize(t){this.update()}onUpdateRequest(t){RenderedPlotly.Plotly&&this.isVisible&&this.hasGraphElement()&&RenderedPlotly.Plotly.redraw(this.node).then(()=>{RenderedPlotly.Plotly.Plots.resize(this.node)})}_mimeType;_img_el;_model;static Plotly=null;static _resolveLoadingPlotly;static loadingPlotly=new Promise(t=>{RenderedPlotly._resolveLoadingPlotly=t})}const rendererFactory={safe:!0,mimeTypes:[MIME_TYPE],defaultRank:10,createRenderer:n=>new RenderedPlotly(n)};async function execute(n,t,o,r,s,a=!1,u){let h=!0;s&&Array.isArray(s.tags)&&s.tags.indexOf("raises-exception")!==-1&&(h=!1);const m=r.execute(t,{model:o.model,stopOnError:h,suppressCodeExecutionErrors:a,onExecutionPhaseChanged:u})?.future;if(!m){console.warn(`execute: the kernel returned no execution for output ${n}; is it connected?`);return}return o._onIOPub=m.onIOPub,o._onExecuteReply=m.onReply,o.future=m,m.done}const cmdIds={invoke:"completer:invoke",select:"completer:select"},CellCommands=(n,t,o,r)=>{n.addCommand(cmdIds.invoke,{label:"Completer: Invoke",execute:()=>o.invoke()}),n.addCommand(cmdIds.select,{label:"Completer: Select",execute:()=>o.completer.selectActive()}),n.addCommand("run:cell",{execute:()=>{t instanceof CodeCell?r.execute():t instanceof MarkdownCell&&(t.rendered=!0)}}),n.addKeyBinding({selector:".jp-InputArea-editor.jp-mod-completer-enabled",keys:["Tab"],command:cmdIds.invoke}),n.addKeyBinding({selector:".jp-InputArea-editor",keys:["Shift Enter"],command:"run:cell"}),[{selector:".jp-InputArea-editor.jp-mod-completer-active",keys:["Enter"],command:cmdIds.select}].map(a=>n.addKeyBinding(a))};class CellAdapter{_id;_outputs;_cell;_kernel;_panel;_sessionContext;_variant;_type;_iPyWidgetsClassicManager;constructor(t){const{id:o,type:r,source:s,outputs:a,kernel:u,boxOptions:h,variant:b}=t;this._id=o,this._variant=b,this._outputs=a,this._kernel=u,this._type=r,this.setupCell(r,s,u,h)}setupCell(t="code",o,r,s){const a=r.sessionManager,u=r.kernelSpecManager,h=r?{id:r.id,shouldStart:!1,autoStartDefault:!1,shutdownOnDispose:!1}:{name:"python",shouldStart:!0,autoStartDefault:!0,shutdownOnDispose:!0};this._sessionContext=new SessionContext({name:r?.path,path:r?.path,sessionManager:a,specsManager:u,type:"python",kernelPreference:h}),this._sessionContext._initialize=async()=>{const l=this._sessionContext.sessionManager;await l.ready,await l.refreshRunning();const y=find(l.running(),A=>A.kernel?.id===this._kernel.id);if(y)try{const A=l.connectTo({model:y,kernelConnectionOptions:{handleComms:!0}});A.kernel&&!A.kernel.handleComms&&(A.kernel.handleComms=!0),this._sessionContext._handleNewSession(A)}catch(A){return this._sessionContext._handleSessionError(A),Promise.reject(A)}return await this._sessionContext._startIfNecessary()};const b=new EditorThemeRegistry;for(const l of EditorThemeRegistry.getDefaultThemes())b.addTheme(l);const m=()=>{const l=new EditorExtensionRegistry;for(const y of EditorExtensionRegistry.getDefaultExtensions({themes:b}))l.addExtension(y);return l.addExtension({name:"shared-model-binding",factory:y=>{const A=y.model.sharedModel;return EditorExtensionRegistry.createImmutableExtension(ybinding({ytext:A.ysource,undoManager:A.undoManager??void 0}))}}),l},w=new EditorLanguageRegistry;for(const l of EditorLanguageRegistry.getDefaultLanguages())w.addLanguage(l);w.addLanguage({name:"ipythongfm",mime:"text/x-ipythongfm",load:async()=>(await __vitePreload(()=>import("./dist-eeUvSSUK.js"),[],import.meta.url)).markdown({codeLanguages:y=>w.findBest(y)})});const E=new CodeMirrorMimeTypeService(w),R=new CommandRegistry;document.addEventListener("keydown",l=>{const y=document.activeElement;y&&y.closest(".dla-Jupyter-Cell")===this._cell.node&&R.processKeydownEvent(l)},!0);const k=new RenderMimeRegistry({initialFactories:standardRendererFactories,latexTypesetter:createLatexTypesetter(),markdownParser:getMarked(w)});this._iPyWidgetsClassicManager=new ClassicWidgetManager({loader:requireLoader}),k.addFactory({safe:!1,mimeTypes:[WIDGET_MIMETYPE],createRenderer:l=>new WidgetRenderer(l,this._iPyWidgetsClassicManager)},0);const O=new CodeMirrorEditorFactory({extensions:m(),languages:w}),_=createStandaloneCell({cell_type:t,source:o,outputs:this._outputs,metadata:{}}),S=new Cell$1.ContentFactory({editorFactory:O.newInlineEditor.bind(O)});if(t==="code"){const l=_;this._cell=new CodeCell({rendermime:k,model:new CodeCellModel({sharedModel:l}),contentFactory:S})}else if(t==="markdown"){const l=_;this._cell=new MarkdownCell({rendermime:k,model:new MarkdownCellModel({sharedModel:l}),contentFactory:S})}this._cell.addClass("dla-Jupyter-Cell"),this._cell.initializeState(),this._type==="markdown"&&(this._cell.rendered=!1);let D=!1,T=null;const q=async l=>{if(l&&(!D||T!==l.id))try{l.handleComms||(console.warn("Kernel connection does not handle Comms, enabling it",l.id),l.handleComms=!0),D=!0,T=l.id,await l.info,l.connectionStatus==="connected"?this._iPyWidgetsClassicManager?.registerWithKernel(l):console.log("Kernel disconnected while waiting for info, will retry on next connection...")}catch(y){console.error("Error getting kernel info or registering widget manager:",y),D=!1,T=null,setTimeout(()=>{l.connectionStatus==="connected"&&T!==l.id&&(this._iPyWidgetsClassicManager?.registerWithKernel(l),D=!0,T=l.id)},1e3)}else!l&&D&&(this._iPyWidgetsClassicManager?.registerWithKernel(null),D=!1,T=null)};this._sessionContext.kernelChanged.connect((l,y)=>{const A=y.newValue;D=!1,T=null,q(A)}),this._sessionContext.kernelChanged.connect(()=>{this._sessionContext.session?.kernel?.info.then(l=>{if(this._type==="code"){const y=l.language_info,A=E.getMimeTypeByLanguage(y);this._cell.model&&(this._cell.model.mimeType=A)}})}),this._sessionContext.ready.then(()=>{const l=this._sessionContext.session?.kernel;q(l||null)});const F=this._cell.editor,B=new CompleterModel,P=new Completer({editor:F,model:B}),I=1e3,j=new KernelCompleterProvider,H=new ProviderReconciliator({context:{widget:this._cell,editor:F,session:this._sessionContext.session},providers:[j],timeout:I}),G=new CompletionHandler({completer:P,reconciliator:H});this._sessionContext.ready.then(()=>{const l=new KernelCompleterProvider;G.reconciliator=new ProviderReconciliator({context:{widget:this._cell,editor:F,session:this._sessionContext.session},providers:[l],timeout:I})}),this._cell.ready.then(()=>{G.editor=this._cell&&this._cell.editor}),CellCommands(R,this._cell,G,this),P.hide(),P.addClass("jp-Completer-Cell"),Widget.attach(P,document.body);const i=new Toolbar;i.addItem("spacer",Toolbar.createSpacerItem());const p=new ToolbarButton({icon:runIcon,onClick:()=>{this._type==="code"?this.execute():this._type==="markdown"&&(this._cell.rendered=!0)},tooltip:"Run"});i.addItem("run",p),i.addItem("interrupt",Toolbar.createInterruptButton(this._sessionContext)),i.addItem("restart",Toolbar.createRestartButton(this._sessionContext)),i.addItem("status",Toolbar.createKernelStatusItem(this._sessionContext)),this._type==="code"&&(this._cell.outputsScrolled=!1),this._cell.activate(),this._panel=new BoxPanel,this._panel.direction="top-to-bottom",this._panel.spacing=0,s?.showToolbar!==!1&&this._panel.addWidget(i),this._panel.addWidget(this._cell),s?.showToolbar!==!1&&BoxPanel.setStretch(i,0),BoxPanel.setStretch(this._cell,1),window.addEventListener("resize",()=>{this._panel.update()}),this._panel.update()}get panel(){return this._panel}get cell(){return this._cell}get sessionContext(){return this._sessionContext}get kernel(){return this._kernel}get variant(){return this._variant??this._kernel?.variant??DEFAULT_VARIANT}execute=({react:t=!0}={})=>{this._type==="code"?(this._iPyWidgetsClassicManager?.registerWithKernel(this._kernel.connection),this._execute(this._cell,void 0,t)):this._type==="markdown"&&(this._cell.rendered=!0)};reactive(){const t=this._kernel?.connection;return this.variant==="marimo"&&t?MarimoReactive.for(t):void 0}async _execute(t,o,r=!0){cellsStore.getState().setIsExecuting(this._id,!0);const s=t.model,a=s.sharedModel.getSource();if(!a.trim()||!this.kernel)return s.sharedModel.transact(()=>{s.clearExecution()},!1),cellsStore.getState().setIsExecuting(this._id,!1),new Promise(()=>{});const u=this.reactive();u&&(u.bindRunner(this._id,()=>this._execute(t,void 0,!1)),(await u.register(this._id,a)).error&&u.unbindRunner(this._id));const h={cellId:s.sharedModel.getId()};o={...s.metadata,...o,...h};const{recordTiming:b}=o;s.sharedModel.transact(()=>{s.clearExecution(),t.outputHidden=!1},!1),t.setPrompt("*"),s.trusted=!0;let m;try{const w=execute(this._id,a,t.outputArea,this._kernel,o);if(b){const R=C=>{let k;switch(C.header.msg_type){case"status":k=`status.${C.content.execution_state}`;break;case"execute_input":k="execute_input";break;default:return!0}const O=C.header.date||new Date().toISOString(),_=Object.assign({},s.getMetadata("execution"));return _[`iopub.${k}`]=O,s.setMetadata("execution",_),!0};t.outputArea.future.registerMessageHook(R)}else s.deleteMetadata("execution");m=t.outputArea.future;const E=await w;if(s.executionCount=E.content.execution_count,b){const R=Object.assign({},s.getMetadata("execution")),C=E.metadata.started;C&&(R["shell.execute_reply.started"]=C);const k=E.header.date;R["shell.execute_reply"]=k||new Date().toISOString(),s.setMetadata("execution",R)}return cellsStore.getState().setIsExecuting(this._id,!1),u&&r&&!u.reacting&&E.content.status==="ok"&&await u.react(this._id),E}catch(w){if(cellsStore.getState().setIsExecuting(this._id,!1),m&&!t.isDisposed&&t.outputArea.future===m&&(t.setPrompt(""),b&&m.isDisposed)){const E=Object.assign({},s.getMetadata("execution"));E.execution_failed=new Date().toISOString(),s.setMetadata("execution",E)}throw w}}}const themes=new EditorThemeRegistry,editorExtensions=()=>{const n=new EditorExtensionRegistry;for(const t of EditorExtensionRegistry.getDefaultExtensions({themes}))n.addExtension(t);return n.addExtension({name:"shared-model-binding",factory:t=>{const o=t.model.sharedModel;return EditorExtensionRegistry.createImmutableExtension(ybinding({ytext:o.ysource,undoManager:o.undoManager??void 0}))}}),n},languages=new EditorLanguageRegistry;for(const n of EditorLanguageRegistry.getDefaultLanguages())languages.addLanguage(n);languages.addLanguage({name:"ipythongfm",mime:"text/x-ipythongfm",load:async()=>(await __vitePreload(()=>import("./dist-eeUvSSUK.js"),[],import.meta.url)).markdown({codeLanguages:t=>languages.findBest(t)})});const renderFactories=standardRendererFactories.concat(rendererFactory),rendermime=new RenderMimeRegistry({initialFactories:renderFactories,latexTypesetter:createLatexTypesetter(),markdownParser:getMarked(languages)}),factoryService=new CodeMirrorEditorFactory({extensions:editorExtensions(),languages}),InputViewer=n=>{const{cell:t,languageInfo:o}=n,r=t.id||newUuid();switch(t.cell_type){case"code":{const s=createStandaloneCell(t),a=new CodeCell({rendermime,model:new CodeCellModel({sharedModel:s}),contentFactory:new Cell$1.ContentFactory({editorFactory:factoryService.newInlineEditor.bind(factoryService)})}).initializeState();return o&&o.mimetype&&(a.model.mimeType=o.mimetype),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Lumino,{id:r,children:a})})}case"markdown":{const s=createStandaloneCell(t),a=new MarkdownCell({rendermime,showEditorForReadOnlyMarkdown:!1,model:new MarkdownCellModel({sharedModel:s}),contentFactory:new Cell$1.ContentFactory({editorFactory:factoryService.newInlineEditor.bind(factoryService)})}).initializeState();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Lumino,{id:r,children:a})})}case"raw":{const s=createStandaloneCell(t),a=new RawCell({model:new RawCellModel({sharedModel:s}),contentFactory:new Cell$1.ContentFactory({editorFactory:factoryService.newInlineEditor.bind(factoryService)})});return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Lumino,{id:r,children:a})})}default:return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}};class OutputViewerAdapter{_renderers;_outputArea;_rendermime;constructor(adaptPlotly,outputs){this._renderers=standardRendererFactories.filter(n=>n.mimeTypes[0]!=="text/javascript"),this._renderers.push(rendererFactory$1),this._renderers.push(rendererFactory$2),this._rendermime=new RenderMimeRegistry({initialFactories:this._renderers});const outputAreaModel=new OutputAreaModel({trusted:!0,values:outputs});if(this._outputArea=new OutputArea({model:outputAreaModel,rendermime:this._rendermime}),adaptPlotly&&outputs&&outputs[0]){const data=outputs[0].data,isPlotly=data["application/vnd.plotly.v1+json"];if(isPlotly){let script=this._outputArea.node.children[0].children[1].children[0].children[1].innerHTML;script=script.replaceAll(`
1
+ import{j as jsxRuntimeExports,e9 as ActionMenu,I as IconButton,h2 as KebabHorizontalIcon,bl as ActionList,kf as StopIcon,r as reactExports,lb as useJupyterReactStoreFromProps,kH as OutputAreaModel,lc as OutputArea,av as standardRendererFactories,gC as MessageLoop,aB as Widget,bh as PromiseDelegate,_ as __vitePreload,f3 as CodeCell,iL as MarkdownCell,ka as SessionContext,cs as find,eB as EditorThemeRegistry,ex as EditorLanguageRegistry,dL as CommandRegistry,ld as createStandaloneCell,iO as Cell$1,kx as CodeCellModel,kw as MarkdownCellModel,dC as ToolbarButton,fS as runIcon,le as BoxPanel,kE as DEFAULT_VARIANT,kF as MarimoReactive,lf as cellsStore,eC as EditorExtensionRegistry,eD as ybinding,kJ as newUuid,lg as RawCell,kv as RawCellModel,lh as useCellsStore,B as Box,dv as StyledSpinner,li as getPanel,lj as activateHover,kn as StateField,lk as showPanel,bN as EditorView,kB as Decoration,kA as StateEffect,kk as Facet,ll as combineConfig,lm as RangeSetBuilder,ln as crelt,lo as hoverTooltip,kC as WidgetType,lp as lineNumbers,lq as highlightActiveLineGutter,lr as highlightSpecialChars,ls as history,lt as foldGutter,lu as drawSelection,lv as dropCursor,c2 as EditorState,lw as indentOnInput,lx as syntaxHighlighting,ly as bracketMatching,lz as closeBrackets,lA as autocompletion,lB as rectangularSelection,lC as crosshairCursor,lD as highlightActiveLine,lE as highlightSelectionMatches,bZ as keymap,lF as closeBracketsKeymap,lG as defaultKeymap,lH as searchKeymap,lI as historyKeymap,lJ as foldKeymap,lK as completionKeymap,lL as defaultHighlightStyle,gc as useTheme,bx as Box$1,lM as ArrowRightIcon,lN as useOutputsStore,bY as Prec,lO as Compartment,at as getDefaultExportFromCjs}from"../datalayer-app-main.js";import{q as Toolbar}from"./index-i9IsP_xD.js";import{j as WidgetRenderer,W as WIDGET_MIMETYPE,h as getMarked,i as createLatexTypesetter,C as CodeMirrorEditorFactory,a as CodeMirrorMimeTypeService,c as CompleterModel,b as Completer,P as ProviderReconciliator,f as KernelCompleterProvider,d as CompletionHandler,r as rendererFactory$1,g as rendererFactory$2}from"./index--Rl4aMiU.js";import{D as DOMWidgetModel,g as DOMWidgetView,h as JupyterLuminoPanelWidget,$,M as ManagerBase,R as RenderMimeRegistry,E as ErrorWidgetView,b as base,c as controls,i as createErrorWidgetModel,a as WIDGET_STATE_MIMETYPE,s as shims,e as semverExports,r as requireLoader,S as SemVerCache,J as JUPYTER_WIDGETS_VERSION,d as JUPYTER_CONTROLS_VERSION,L as Lumino}from"./index-5os8HYj-.js";import{python}from"./dist-Frc5TvpU.js";import{P as PaintbrushIcon}from"./PaintbrushIcon-CFBHU-3l.js";import{P as ProgressBar}from"./index-BaRoLDk0.js";import{F as ForwardRef}from"./RestartIcon-DvpOf5Mf.js";const KernelActionMenu=n=>{const{kernel:t,outputAdapter:o,onClearOutputs:r}=n;return jsxRuntimeExports.jsxs(ActionMenu,{children:[jsxRuntimeExports.jsx(ActionMenu.Anchor,{children:jsxRuntimeExports.jsx(IconButton,{"aria-labelledby":"",icon:KebabHorizontalIcon,variant:"invisible"})}),jsxRuntimeExports.jsx(ActionMenu.Overlay,{children:jsxRuntimeExports.jsxs(ActionList,{children:[jsxRuntimeExports.jsxs(ActionList.Item,{disabled:!t,onSelect:s=>{t&&t.interrupt().catch(a=>{console.error("[KernelActionMenu] Interrupt failed:",a)})},children:[jsxRuntimeExports.jsx(ActionList.LeadingVisual,{children:jsxRuntimeExports.jsx(StopIcon,{})}),"Interrupt kernel"]}),jsxRuntimeExports.jsxs(ActionList.Item,{disabled:!t,onSelect:s=>{t&&t.restart().catch(a=>{console.error("[KernelActionMenu] Restart failed:",a)})},children:[jsxRuntimeExports.jsx(ActionList.LeadingVisual,{children:jsxRuntimeExports.jsx(ForwardRef,{})}),"Restart kernel"]}),jsxRuntimeExports.jsxs(ActionList.Item,{variant:"danger",disabled:!1,onSelect:s=>{r?r():o&&o.clear()},children:[jsxRuntimeExports.jsx(ActionList.LeadingVisual,{children:jsxRuntimeExports.jsx(PaintbrushIcon,{})}),"Clear outputs"]})]})})]})},KernelProgressBar=()=>{const[n,t]=reactExports.useState(0);return reactExports.useEffect(()=>{const o=setInterval(()=>{t(r=>{let s=r+1;return s>100&&(s=0),s})},100);return()=>clearInterval(o)},[]),jsxRuntimeExports.jsx(ProgressBar,{progress:n,barSize:"small"})},useJupyter=n=>{const{jupyterConfig:t,kernel:o,kernelIsLoading:r,serviceManager:s}=useJupyterReactStoreFromProps(n??{});return{defaultKernel:o,jupyterServerUrl:t.jupyterServerUrl,kernel:o,kernelIsLoading:r,kernelManager:s?.kernels,lite:n?.lite,serverless:n?.serverless??!1,serverSettings:s?.serverSettings,serviceManager:s}},OUTPUT_WIDGET_VERSION="1.0.0";let OutputModel$1=class extends DOMWidgetModel{defaults(){return Object.assign(Object.assign({},super.defaults()),{_model_name:"OutputModel",_view_name:"OutputView",_model_module:"@jupyter-widgets/output",_view_module:"@jupyter-widgets/output",_model_module_version:OUTPUT_WIDGET_VERSION,_view_module_version:OUTPUT_WIDGET_VERSION})}},OutputView$1=class extends DOMWidgetView{};class OutputModel extends OutputModel$1{defaults(){return Object.assign(Object.assign({},super.defaults()),{msg_id:"",outputs:[]})}initialize(t,o){super.initialize(t,o),this._outputs=new OutputAreaModel({trusted:!0}),this.listenTo(this,"change:outputs",this.setOutputs),this.setOutputs()}get outputs(){return this._outputs}clear_output(t=!1){this._outputs.clear(t)}setOutputs(t,o,r){r&&r.newMessage||(this.clear_output(),this._outputs.fromJSON(JSON.parse(JSON.stringify(this.get("outputs")))))}}class OutputView extends OutputView$1{_createElement(t){return this.luminoWidget=new JupyterLuminoPanelWidget({view:this}),this.luminoWidget.node}_setElement(t){if(this.el||t!==this.luminoWidget.node)throw new Error("Cannot reset the DOM element.");this.el=this.luminoWidget.node,this.$el=$(this.luminoWidget.node)}render(){super.render(),this._outputView=new OutputArea({rendermime:this.model.widget_manager.renderMime,model:this.model.outputs}),this.luminoWidget.insertWidget(0,this._outputView),this.luminoWidget.addClass("jupyter-widgets"),this.luminoWidget.addClass("widget-output"),this.update()}remove(){return this._outputView.dispose(),super.remove()}}const outputWidgets=Object.freeze(Object.defineProperty({__proto__:null,OutputModel,OutputView},Symbol.toStringTag,{value:"Module"}));class HTMLManager extends ManagerBase{_viewList;constructor(t){super(),this.loader=t?.loader,this.renderMime=new RenderMimeRegistry({initialFactories:standardRendererFactories}),this.renderMime.addFactory({safe:!1,mimeTypes:[WIDGET_MIMETYPE],createRenderer:o=>new WidgetRenderer(o,this)},0),this._viewList=new Set,window.addEventListener("resize",()=>{this._viewList.forEach(o=>{MessageLoop.postMessage(o.luminoWidget,Widget.ResizeMessage.UnknownSize)})})}async display_view(t,o){let r;try{r=await t}catch(s){const a=`Could not create a view for ${t}`;console.error(a);const u=createErrorWidgetModel(s,a),h=new u;r=new ErrorWidgetView({model:h}),r.render()}Widget.attach(r.luminoWidget,o),this._viewList.add(r),r.once("remove",()=>{this._viewList.delete(r)})}filterExistingModelState(t){return super.filterExistingModelState(t)}_get_comm_info(){return Promise.resolve({})}_create_comm(t,o,r,s,a){return Promise.resolve({on_close:()=>{},on_msg:()=>{},close:()=>{}})}loadClass(t,o,r){return new Promise((s,a)=>{o==="@jupyter-widgets/base"?s(base):o==="@jupyter-widgets/controls"?s(controls):o==="@jupyter-widgets/output"?s(outputWidgets):this.loader!==void 0?s(this.loader(o,r)):a(`Could not load module ${o}@${r}`)}).then(s=>s[t]?s[t]:Promise.reject(`Class ${t} not found in module ${o}@${r}`))}renderMime;loader}class ClassicWidgetManager extends HTMLManager{_kernelConnection;_commRegistration;_onError;_registry;_ready=new PromiseDelegate;constructor(t){super(t),this.comm_target_name="jupyter.widget";const o=()=>{window.define("@jupyter-widgets/base",base),window.define("@jupyter-widgets/controls",controls),this._registry=new SemVerCache,this.register=this.register.bind(this),this.registerWithKernel=this.registerWithKernel.bind(this),this._getRegistry=this._getRegistry.bind(this),this._handleCommOpen=this._handleCommOpen.bind(this),this.register({name:"@jupyter-widgets/base",version:JUPYTER_WIDGETS_VERSION,exports:()=>__vitePreload(()=>import("./index-5os8HYj-.js").then(r=>r.b),[],import.meta.url)}),this.register({name:"@jupyter-widgets/controls",version:JUPYTER_CONTROLS_VERSION,exports:()=>__vitePreload(()=>import("./index-5os8HYj-.js").then(r=>r.c),[],import.meta.url)}),this._ready.resolve(!0)};if(window.require&&window.define)o();else{const r=document.createElement("script"),s=document.createElement("script");s.setAttribute("data-jupyter-widgets-cdn-only","true"),document.body.appendChild(s),r.src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js",document.body.appendChild(r),r.onload=()=>{o()},r.onerror=a=>{console.error("ClassicWidgetManager: Failed to load RequireJS",a),o()}}}get ready(){return this._ready}async _loadFromNotebook(t){const o=t.getMetadata("widgets");if(o&&o[WIDGET_STATE_MIMETYPE]){let r=o[WIDGET_STATE_MIMETYPE];r=this.filterExistingModelState(r),await this.set_state(r)}}registerWithKernel(t){if(this._kernelConnection=t,this.kernel=t,this._commRegistration&&this._commRegistration.dispose(),t){if(!this._registry){console.error("ClassicWidgetManager: Registry not initialized when registering with kernel.");return}this._commRegistration=t.registerCommTarget(this.comm_target_name,this._handleCommOpen)}else this.kernel=null}async _handleCommOpen(t,o){try{const r=new shims.services.Comm(t);await this.handle_comm_open(r,o)}catch(r){throw console.error("ClassicWidgetManager: Error in _handleCommOpen:",r),r}}_getRegistry(){return this._registry}get onError(){return this._onError}display_view(t,o){return Promise.resolve(t).then(r=>{Widget.attach(r.luminoWidget,o),r.on("remove",()=>{})})}async loadClass(t,o,r){(o==="@jupyter-widgets/base"||o==="@jupyter-widgets/controls")&&semverExports.valid(r)&&(r=`^${r}`);let s=this._getRegistry().getAllVersions(o);const a=r.split(".").length===2?r+".0":r;if(!s){const m=await requireLoader(o,a),w={name:o,version:a.replaceAll("^",""),exports:{...m}};if(this.register(w),s=this._getRegistry().getAllVersions(o),!s)throw new Error(`No version of module ${o} is registered`)}const u=this._getRegistry().get(o,a);if(!u){const m=Object.keys(s);throw new Error(`Module ${o}, version ${a} is not registered, however, ${m.join(",")} ${m.length>1?"are":"is"}`)}let h;typeof u=="function"?h=await u():h=await u;const b=h[t];if(!b)throw new Error(`Class ${t} not found in module ${o}`);return b}callbacks(t){const o=super.callbacks(t);return Object.assign({},o,{iopub:{output:r=>this._onError.emit(r)}})}_create_comm(t,o,r,s,a){const u=this._kernelConnection?.createComm(t,o);return(r||s)&&u?.open(r,s),Promise.resolve(new shims.services.Comm(u))}_get_comm_info(){return this._kernelConnection.requestCommInfo({target_name:this.comm_target_name}).then(t=>t.content.comms)}register(t){this._getRegistry().set(t.name,t.version,t.exports)}}const CSS_CLASS="jp-RenderedPlotly",MIME_TYPE="application/vnd.plotly.v1+json";class RenderedPlotly extends Widget{constructor(t){super(),this.addClass(CSS_CLASS),this._mimeType=t.mimeType,this._img_el=document.createElement("img"),this._img_el.className="plot-img",this.node.appendChild(this._img_el),this._img_el.addEventListener("mouseenter",o=>{this.createGraph(this._model)})}renderModel(t){if(this.hasGraphElement())return Promise.resolve();this._model=t;const o=t.data["image/png"];return o!=null?(this.updateImage(o),Promise.resolve()):this.createGraph(t)}hasGraphElement(){return this.node.querySelector(".plot-container")!==null}updateImage(t){this.hideGraph(),this._img_el.src="data:image/png;base64,"+t,this.showImage()}hideGraph(){const t=this.node.querySelector(".plot-container");t!=null&&(t.style.display="none")}showGraph(){const t=this.node.querySelector(".plot-container");t!=null&&(t.style.display="block")}hideImage(){const t=this.node.querySelector(".plot-img");t!=null&&(t.style.display="none")}showImage(){const t=this.node.querySelector(".plot-img");t!=null&&(t.style.display="block")}createGraph(t){const{data:o,layout:r,frames:s,config:a}=t.data[this._mimeType];return r.height||(r.height=360),(async()=>(RenderedPlotly.Plotly===null&&(RenderedPlotly.Plotly=await __vitePreload(()=>import("./index-DqWZNFUh.js").then(h=>h.i),[],import.meta.url),RenderedPlotly._resolveLoadingPlotly()),RenderedPlotly.loadingPlotly))().then(()=>RenderedPlotly.Plotly.react(this.node,o,r,a)).then(h=>{this.showGraph(),this.hideImage(),this.update(),s&&RenderedPlotly.Plotly.addFrames(this.node,s),this.node.offsetWidth>0&&this.node.offsetHeight>0&&RenderedPlotly.Plotly.toImage(h,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then(b=>{const m=b.split(",")[1];t.data["image/png"]!==m&&t.setData({data:{...t.data,"image/png":m}})}),this.node.on("plotly_webglcontextlost",()=>{const b=t.data["image/png"];if(b!=null)return this.updateImage(b),Promise.resolve()})})}onAfterShow(t){this.update()}onResize(t){this.update()}onUpdateRequest(t){RenderedPlotly.Plotly&&this.isVisible&&this.hasGraphElement()&&RenderedPlotly.Plotly.redraw(this.node).then(()=>{RenderedPlotly.Plotly.Plots.resize(this.node)})}_mimeType;_img_el;_model;static Plotly=null;static _resolveLoadingPlotly;static loadingPlotly=new Promise(t=>{RenderedPlotly._resolveLoadingPlotly=t})}const rendererFactory={safe:!0,mimeTypes:[MIME_TYPE],defaultRank:10,createRenderer:n=>new RenderedPlotly(n)};async function execute(n,t,o,r,s,a=!1,u){let h=!0;s&&Array.isArray(s.tags)&&s.tags.indexOf("raises-exception")!==-1&&(h=!1);const m=r.execute(t,{model:o.model,stopOnError:h,suppressCodeExecutionErrors:a,onExecutionPhaseChanged:u})?.future;if(!m){console.warn(`execute: the kernel returned no execution for output ${n}; is it connected?`);return}return o._onIOPub=m.onIOPub,o._onExecuteReply=m.onReply,o.future=m,m.done}const cmdIds={invoke:"completer:invoke",select:"completer:select"},CellCommands=(n,t,o,r)=>{n.addCommand(cmdIds.invoke,{label:"Completer: Invoke",execute:()=>o.invoke()}),n.addCommand(cmdIds.select,{label:"Completer: Select",execute:()=>o.completer.selectActive()}),n.addCommand("run:cell",{execute:()=>{t instanceof CodeCell?r.execute():t instanceof MarkdownCell&&(t.rendered=!0)}}),n.addKeyBinding({selector:".jp-InputArea-editor.jp-mod-completer-enabled",keys:["Tab"],command:cmdIds.invoke}),n.addKeyBinding({selector:".jp-InputArea-editor",keys:["Shift Enter"],command:"run:cell"}),[{selector:".jp-InputArea-editor.jp-mod-completer-active",keys:["Enter"],command:cmdIds.select}].map(a=>n.addKeyBinding(a))};class CellAdapter{_id;_outputs;_cell;_kernel;_panel;_sessionContext;_variant;_type;_iPyWidgetsClassicManager;constructor(t){const{id:o,type:r,source:s,outputs:a,kernel:u,boxOptions:h,variant:b}=t;this._id=o,this._variant=b,this._outputs=a,this._kernel=u,this._type=r,this.setupCell(r,s,u,h)}setupCell(t="code",o,r,s){const a=r.sessionManager,u=r.kernelSpecManager,h=r?{id:r.id,shouldStart:!1,autoStartDefault:!1,shutdownOnDispose:!1}:{name:"python",shouldStart:!0,autoStartDefault:!0,shutdownOnDispose:!0};this._sessionContext=new SessionContext({name:r?.path,path:r?.path,sessionManager:a,specsManager:u,type:"python",kernelPreference:h}),this._sessionContext._initialize=async()=>{const l=this._sessionContext.sessionManager;await l.ready,await l.refreshRunning();const y=find(l.running(),A=>A.kernel?.id===this._kernel.id);if(y)try{const A=l.connectTo({model:y,kernelConnectionOptions:{handleComms:!0}});A.kernel&&!A.kernel.handleComms&&(A.kernel.handleComms=!0),this._sessionContext._handleNewSession(A)}catch(A){return this._sessionContext._handleSessionError(A),Promise.reject(A)}return await this._sessionContext._startIfNecessary()};const b=new EditorThemeRegistry;for(const l of EditorThemeRegistry.getDefaultThemes())b.addTheme(l);const m=()=>{const l=new EditorExtensionRegistry;for(const y of EditorExtensionRegistry.getDefaultExtensions({themes:b}))l.addExtension(y);return l.addExtension({name:"shared-model-binding",factory:y=>{const A=y.model.sharedModel;return EditorExtensionRegistry.createImmutableExtension(ybinding({ytext:A.ysource,undoManager:A.undoManager??void 0}))}}),l},w=new EditorLanguageRegistry;for(const l of EditorLanguageRegistry.getDefaultLanguages())w.addLanguage(l);w.addLanguage({name:"ipythongfm",mime:"text/x-ipythongfm",load:async()=>(await __vitePreload(()=>import("./dist-eeUvSSUK.js"),[],import.meta.url)).markdown({codeLanguages:y=>w.findBest(y)})});const E=new CodeMirrorMimeTypeService(w),R=new CommandRegistry;document.addEventListener("keydown",l=>{const y=document.activeElement;y&&y.closest(".dla-Jupyter-Cell")===this._cell.node&&R.processKeydownEvent(l)},!0);const k=new RenderMimeRegistry({initialFactories:standardRendererFactories,latexTypesetter:createLatexTypesetter(),markdownParser:getMarked(w)});this._iPyWidgetsClassicManager=new ClassicWidgetManager({loader:requireLoader}),k.addFactory({safe:!1,mimeTypes:[WIDGET_MIMETYPE],createRenderer:l=>new WidgetRenderer(l,this._iPyWidgetsClassicManager)},0);const O=new CodeMirrorEditorFactory({extensions:m(),languages:w}),_=createStandaloneCell({cell_type:t,source:o,outputs:this._outputs,metadata:{}}),S=new Cell$1.ContentFactory({editorFactory:O.newInlineEditor.bind(O)});if(t==="code"){const l=_;this._cell=new CodeCell({rendermime:k,model:new CodeCellModel({sharedModel:l}),contentFactory:S})}else if(t==="markdown"){const l=_;this._cell=new MarkdownCell({rendermime:k,model:new MarkdownCellModel({sharedModel:l}),contentFactory:S})}this._cell.addClass("dla-Jupyter-Cell"),this._cell.initializeState(),this._type==="markdown"&&(this._cell.rendered=!1);let D=!1,T=null;const q=async l=>{if(l&&(!D||T!==l.id))try{l.handleComms||(console.warn("Kernel connection does not handle Comms, enabling it",l.id),l.handleComms=!0),D=!0,T=l.id,await l.info,l.connectionStatus==="connected"?this._iPyWidgetsClassicManager?.registerWithKernel(l):console.log("Kernel disconnected while waiting for info, will retry on next connection...")}catch(y){console.error("Error getting kernel info or registering widget manager:",y),D=!1,T=null,setTimeout(()=>{l.connectionStatus==="connected"&&T!==l.id&&(this._iPyWidgetsClassicManager?.registerWithKernel(l),D=!0,T=l.id)},1e3)}else!l&&D&&(this._iPyWidgetsClassicManager?.registerWithKernel(null),D=!1,T=null)};this._sessionContext.kernelChanged.connect((l,y)=>{const A=y.newValue;D=!1,T=null,q(A)}),this._sessionContext.kernelChanged.connect(()=>{this._sessionContext.session?.kernel?.info.then(l=>{if(this._type==="code"){const y=l.language_info,A=E.getMimeTypeByLanguage(y);this._cell.model&&(this._cell.model.mimeType=A)}})}),this._sessionContext.ready.then(()=>{const l=this._sessionContext.session?.kernel;q(l||null)});const F=this._cell.editor,B=new CompleterModel,P=new Completer({editor:F,model:B}),I=1e3,j=new KernelCompleterProvider,H=new ProviderReconciliator({context:{widget:this._cell,editor:F,session:this._sessionContext.session},providers:[j],timeout:I}),G=new CompletionHandler({completer:P,reconciliator:H});this._sessionContext.ready.then(()=>{const l=new KernelCompleterProvider;G.reconciliator=new ProviderReconciliator({context:{widget:this._cell,editor:F,session:this._sessionContext.session},providers:[l],timeout:I})}),this._cell.ready.then(()=>{G.editor=this._cell&&this._cell.editor}),CellCommands(R,this._cell,G,this),P.hide(),P.addClass("jp-Completer-Cell"),Widget.attach(P,document.body);const i=new Toolbar;i.addItem("spacer",Toolbar.createSpacerItem());const p=new ToolbarButton({icon:runIcon,onClick:()=>{this._type==="code"?this.execute():this._type==="markdown"&&(this._cell.rendered=!0)},tooltip:"Run"});i.addItem("run",p),i.addItem("interrupt",Toolbar.createInterruptButton(this._sessionContext)),i.addItem("restart",Toolbar.createRestartButton(this._sessionContext)),i.addItem("status",Toolbar.createKernelStatusItem(this._sessionContext)),this._type==="code"&&(this._cell.outputsScrolled=!1),this._cell.activate(),this._panel=new BoxPanel,this._panel.direction="top-to-bottom",this._panel.spacing=0,s?.showToolbar!==!1&&this._panel.addWidget(i),this._panel.addWidget(this._cell),s?.showToolbar!==!1&&BoxPanel.setStretch(i,0),BoxPanel.setStretch(this._cell,1),window.addEventListener("resize",()=>{this._panel.update()}),this._panel.update()}get panel(){return this._panel}get cell(){return this._cell}get sessionContext(){return this._sessionContext}get kernel(){return this._kernel}get variant(){return this._variant??this._kernel?.variant??DEFAULT_VARIANT}execute=({react:t=!0}={})=>{this._type==="code"?(this._iPyWidgetsClassicManager?.registerWithKernel(this._kernel.connection),this._execute(this._cell,void 0,t)):this._type==="markdown"&&(this._cell.rendered=!0)};reactive(){const t=this._kernel?.connection;return this.variant==="marimo"&&t?MarimoReactive.for(t):void 0}async _execute(t,o,r=!0){cellsStore.getState().setIsExecuting(this._id,!0);const s=t.model,a=s.sharedModel.getSource();if(!a.trim()||!this.kernel)return s.sharedModel.transact(()=>{s.clearExecution()},!1),cellsStore.getState().setIsExecuting(this._id,!1),new Promise(()=>{});const u=this.reactive();u&&(u.bindRunner(this._id,()=>this._execute(t,void 0,!1)),(await u.register(this._id,a)).error&&u.unbindRunner(this._id));const h={cellId:s.sharedModel.getId()};o={...s.metadata,...o,...h};const{recordTiming:b}=o;s.sharedModel.transact(()=>{s.clearExecution(),t.outputHidden=!1},!1),t.setPrompt("*"),s.trusted=!0;let m;try{const w=execute(this._id,a,t.outputArea,this._kernel,o);if(b){const R=C=>{let k;switch(C.header.msg_type){case"status":k=`status.${C.content.execution_state}`;break;case"execute_input":k="execute_input";break;default:return!0}const O=C.header.date||new Date().toISOString(),_=Object.assign({},s.getMetadata("execution"));return _[`iopub.${k}`]=O,s.setMetadata("execution",_),!0};t.outputArea.future.registerMessageHook(R)}else s.deleteMetadata("execution");m=t.outputArea.future;const E=await w;if(s.executionCount=E.content.execution_count,b){const R=Object.assign({},s.getMetadata("execution")),C=E.metadata.started;C&&(R["shell.execute_reply.started"]=C);const k=E.header.date;R["shell.execute_reply"]=k||new Date().toISOString(),s.setMetadata("execution",R)}return cellsStore.getState().setIsExecuting(this._id,!1),u&&r&&!u.reacting&&E.content.status==="ok"&&await u.react(this._id),E}catch(w){if(cellsStore.getState().setIsExecuting(this._id,!1),m&&!t.isDisposed&&t.outputArea.future===m&&(t.setPrompt(""),b&&m.isDisposed)){const E=Object.assign({},s.getMetadata("execution"));E.execution_failed=new Date().toISOString(),s.setMetadata("execution",E)}throw w}}}const themes=new EditorThemeRegistry,editorExtensions=()=>{const n=new EditorExtensionRegistry;for(const t of EditorExtensionRegistry.getDefaultExtensions({themes}))n.addExtension(t);return n.addExtension({name:"shared-model-binding",factory:t=>{const o=t.model.sharedModel;return EditorExtensionRegistry.createImmutableExtension(ybinding({ytext:o.ysource,undoManager:o.undoManager??void 0}))}}),n},languages=new EditorLanguageRegistry;for(const n of EditorLanguageRegistry.getDefaultLanguages())languages.addLanguage(n);languages.addLanguage({name:"ipythongfm",mime:"text/x-ipythongfm",load:async()=>(await __vitePreload(()=>import("./dist-eeUvSSUK.js"),[],import.meta.url)).markdown({codeLanguages:t=>languages.findBest(t)})});const renderFactories=standardRendererFactories.concat(rendererFactory),rendermime=new RenderMimeRegistry({initialFactories:renderFactories,latexTypesetter:createLatexTypesetter(),markdownParser:getMarked(languages)}),factoryService=new CodeMirrorEditorFactory({extensions:editorExtensions(),languages}),InputViewer=n=>{const{cell:t,languageInfo:o}=n,r=t.id||newUuid();switch(t.cell_type){case"code":{const s=createStandaloneCell(t),a=new CodeCell({rendermime,model:new CodeCellModel({sharedModel:s}),contentFactory:new Cell$1.ContentFactory({editorFactory:factoryService.newInlineEditor.bind(factoryService)})}).initializeState();return o&&o.mimetype&&(a.model.mimeType=o.mimetype),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Lumino,{id:r,children:a})})}case"markdown":{const s=createStandaloneCell(t),a=new MarkdownCell({rendermime,showEditorForReadOnlyMarkdown:!1,model:new MarkdownCellModel({sharedModel:s}),contentFactory:new Cell$1.ContentFactory({editorFactory:factoryService.newInlineEditor.bind(factoryService)})}).initializeState();return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Lumino,{id:r,children:a})})}case"raw":{const s=createStandaloneCell(t),a=new RawCell({model:new RawCellModel({sharedModel:s}),contentFactory:new Cell$1.ContentFactory({editorFactory:factoryService.newInlineEditor.bind(factoryService)})});return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Lumino,{id:r,children:a})})}default:return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}};class OutputViewerAdapter{_renderers;_outputArea;_rendermime;constructor(adaptPlotly,outputs){this._renderers=standardRendererFactories.filter(n=>n.mimeTypes[0]!=="text/javascript"),this._renderers.push(rendererFactory$1),this._renderers.push(rendererFactory$2),this._rendermime=new RenderMimeRegistry({initialFactories:this._renderers});const outputAreaModel=new OutputAreaModel({trusted:!0,values:outputs});if(this._outputArea=new OutputArea({model:outputAreaModel,rendermime:this._rendermime}),adaptPlotly&&outputs&&outputs[0]){const data=outputs[0].data,isPlotly=data["application/vnd.plotly.v1+json"];if(isPlotly){let script=this._outputArea.node.children[0].children[1].children[0].children[1].innerHTML;script=script.replaceAll(`
2
2
  ,`,`
3
3
  `),eval(script)}}}clearOutput(){this._outputArea.model.clear()}get outputArea(){return this._outputArea}}const OutputViewer=({cell:n,adaptPlotly:t=!1})=>{const o=n.outputs?n.outputs:void 0,r=new OutputViewerAdapter(t,o);return n.cell_type==="code"?jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Lumino,{children:r.outputArea})}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},Cell=({autoStart:n=!0,id:t,kernel:o,outputs:r=[],readOnly:s=!1,showToolbar:a=!0,source:u="",type:h="code",variant:b})=>{const[m]=reactExports.useState(t||newUuid()),[w,E]=reactExports.useState(),R=useCellsStore(),C=reactExports.useRef(!1),k=_=>{_.cell.model.contentChanged.connect((S,D)=>{R.setSource(m,S.sharedModel.getSource())}),_.cell instanceof CodeCell&&_.cell.outputArea.outputLengthChanged?.connect((S,D)=>{R.setOutputsCount(m,D)}),_.sessionContext.initialize().then(()=>{n&&_.cell.model&&_.execute()}),_.sessionContext.kernelChanged.connect(()=>{_.sessionContext.session?.kernel?.info.then(S=>{R.setKernelSessionAvailable(m,!0)})})};reactExports.useEffect(()=>{!w&&!C.current&&o&&(C.current=!0,o.ready.then(()=>{const _=new CellAdapter({id:m,type:h,source:u,outputs:r,kernel:o,boxOptions:{showToolbar:a},variant:b});E(_),R.setAdapter(m,_),R.setSource(m,u),k(_);const S=D=>{let T=D.target;for(;T&&!T.classList.contains("jp-MarkdownOutput");)T=T.parentElement;T&&T.classList.contains("jp-MarkdownOutput")&&(_.cell.rendered=!1)};return document.addEventListener("dblclick",S),()=>{document.removeEventListener("dblclick",S)}}))},[u,o]);const O=reactExports.useMemo(()=>({cell_type:h,source:u,metadata:{editable:!1,trusted:!0},...h==="code"?{outputs:r,execution_count:null}:{}}),[h,u,r]);return s?jsxRuntimeExports.jsxs(Box,{className:"dla-Jupyter-ReadOnlyCell",children:[jsxRuntimeExports.jsx(InputViewer,{cell:O}),h==="code"&&O.outputs?.length?jsxRuntimeExports.jsx(OutputViewer,{cell:O}):null]}):w?jsxRuntimeExports.jsx(Box,{sx:{"& .dla-Jupyter-Cell":{position:"relative !important",contain:"content !important"},"& .jp-Toolbar":{height:"auto !important",position:"relative"},"& .lm-BoxPanel":{position:"relative"},"& .jp-Cell":{position:"relative"},"& .jp-CodeCell":{height:"auto !important",position:"relative"},"& .jp-MarkdownCell":{height:"auto !important",minHeight:"65px",position:"relative"},"& .jp-Cell-outputArea":{paddingBottom:"2px"},"& .jp-CodeMirrorEditor":{cursor:"text !important"}},children:jsxRuntimeExports.jsx(Lumino,{children:w.panel})}):jsxRuntimeExports.jsx(Box,{sx:{display:"flex",justifyContent:"center",alignItems:"center",p:4},children:jsxRuntimeExports.jsx(StyledSpinner,{size:"medium"})})};class SelectedDiagnostic{constructor(t,o,r){this.from=t,this.to=o,this.diagnostic=r}}class LintState{constructor(t,o,r){this.diagnostics=t,this.panel=o,this.selected=r}static init(t,o,r){let s=r.facet(lintConfig).markerFilter;s&&(t=s(t,r));let a=t.slice().sort((C,k)=>C.from-k.from||C.to-k.to),u=new RangeSetBuilder,h=[],b=0,m=r.doc.iter(),w=0,E=r.doc.length;for(let C=0;;){let k=C==a.length?null:a[C];if(!k&&!h.length)break;let O,_;if(h.length)O=b,_=h.reduce((T,q)=>Math.min(T,q.to),k&&k.from>O?k.from:1e8);else{if(O=k.from,O>E)break;_=k.to,h.push(k),C++}for(;C<a.length;){let T=a[C];if(T.from==O&&(T.to>T.from||T.to==O))h.push(T),C++,_=Math.min(T.to,_);else{_=Math.min(T.from,_);break}}_=Math.min(_,E);let S=!1;if(h.some(T=>T.from==O&&(T.to==_||_==E))&&(S=O==_,!S&&_-O<10)){let T=O-(w+m.value.length);T>0&&(m.next(T),w=O);for(let q=O;;){if(q>=_){S=!0;break}if(!m.lineBreak&&w+m.value.length>q)break;q=w+m.value.length,w+=m.value.length,m.next()}}let D=maxSeverity(h);if(S)u.add(O,O,Decoration.widget({widget:new DiagnosticWidget(D),diagnostics:h.slice()}));else{let T=h.reduce((q,F)=>F.markClass?q+" "+F.markClass:q,"");u.add(O,_,Decoration.mark({class:"cm-lintRange cm-lintRange-"+D+T,diagnostics:h.slice(),inclusiveEnd:h.some(q=>q.to>_)}))}if(b=_,b==E)break;for(let T=0;T<h.length;T++)h[T].to<=b&&h.splice(T--,1)}let R=u.finish();return new LintState(R,o,findDiagnostic(R))}}function findDiagnostic(n,t=null,o=0){let r=null;return n.between(o,1e9,(s,a,{spec:u})=>{if(!(t&&u.diagnostics.indexOf(t)<0))if(!r)r=new SelectedDiagnostic(s,a,t||u.diagnostics[0]);else{if(u.diagnostics.indexOf(r.diagnostic)<0)return!1;r=new SelectedDiagnostic(r.from,a,r.diagnostic)}}),r}function hideTooltip(n,t){let o=t.pos,r=t.end||o,s=n.state.facet(lintConfig).hideOn(n,o,r);if(s!=null)return s;let a=n.startState.doc.lineAt(t.pos);return!!(n.effects.some(u=>u.is(setDiagnosticsEffect))||n.changes.touchesRange(a.from,Math.max(a.to,r)))}function maybeEnableLint(n,t){return n.field(lintState,!1)?t:t.concat(StateEffect.appendConfig.of(lintExtensions))}const setDiagnosticsEffect=StateEffect.define(),togglePanel=StateEffect.define(),movePanelSelection=StateEffect.define(),lintState=StateField.define({create(){return new LintState(Decoration.none,null,null)},update(n,t){if(t.docChanged&&n.diagnostics.size){let o=n.diagnostics.map(t.changes),r=null,s=n.panel;if(n.selected){let a=t.changes.mapPos(n.selected.from,1);r=findDiagnostic(o,n.selected.diagnostic,a)||findDiagnostic(o,null,a)}!o.size&&s&&t.state.facet(lintConfig).autoPanel&&(s=null),n=new LintState(o,s,r)}for(let o of t.effects)if(o.is(setDiagnosticsEffect)){let r=t.state.facet(lintConfig).autoPanel?o.value.length?LintPanel.open:null:n.panel;n=LintState.init(o.value,r,t.state)}else o.is(togglePanel)?n=new LintState(n.diagnostics,o.value?LintPanel.open:null,n.selected):o.is(movePanelSelection)&&(n=new LintState(n.diagnostics,n.panel,o.value));return n},provide:n=>[showPanel.from(n,t=>t.panel),EditorView.decorations.from(n,t=>t.diagnostics)]}),activeMark=Decoration.mark({class:"cm-lintRange cm-lintRange-active"});function lintTooltip(n,t,o){let{diagnostics:r}=n.state.field(lintState),s,a=-1,u=-1;r.between(t-(o<0?1:0),t+(o>0?1:0),(b,m,{spec:w})=>{if(t>=b&&t<=m&&(b==m||(t>b||o>0)&&(t<m||o<0)))return s=w.diagnostics,a=b,u=m,!1});let h=n.state.facet(lintConfig).tooltipFilter;return s&&h&&(s=h(s,n.state)),s?{pos:a,end:u,above:!0,create(){return{dom:diagnosticsTooltip(n,s)}}}:null}function diagnosticsTooltip(n,t){return crelt("ul",{class:"cm-tooltip-lint"},t.map(o=>renderDiagnostic(n,o,!1)))}const openLintPanel=n=>{let t=n.state.field(lintState,!1);(!t||!t.panel)&&n.dispatch({effects:maybeEnableLint(n.state,[togglePanel.of(!0)])});let o=getPanel(n,LintPanel.open);return o&&o.dom.querySelector(".cm-panel-lint ul").focus(),!0},closeLintPanel=n=>{let t=n.state.field(lintState,!1);return!t||!t.panel?!1:(n.dispatch({effects:togglePanel.of(!1)}),!0)},nextDiagnostic=n=>{let t=n.state.field(lintState,!1);if(!t)return!1;let o=n.state.selection.main,r=findDiagnostic(t.diagnostics,null,o.to+1);return!r&&(r=findDiagnostic(t.diagnostics,null,0),!r||r.from==o.from&&r.to==o.to)?!1:(n.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),activateHover(n,r.from,1,{tooltip:lintHover,until:s=>s.docChanged||s.newSelection.main.head<r.from||s.newSelection.main.head>r.to}),!0)},lintKeymap=[{key:"Mod-Shift-m",run:openLintPanel,preventDefault:!0},{key:"F8",run:nextDiagnostic}],lintConfig=Facet.define({combine(n){return{sources:n.map(t=>t.source).filter(t=>t!=null),...combineConfig(n.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:combineFilter,tooltipFilter:combineFilter,needsRefresh:(t,o)=>t?o?r=>t(r)||o(r):t:o,hideOn:(t,o)=>t?o?(r,s,a)=>t(r,s,a)||o(r,s,a):t:o,autoPanel:(t,o)=>t||o})}}});function combineFilter(n,t){return n?t?(o,r)=>t(n(o,r),r):n:t}function assignKeys(n){let t=[];if(n)t:for(let{name:o}of n){for(let r=0;r<o.length;r++){let s=o[r];if(/[a-zA-Z]/.test(s)&&!t.some(a=>a.toLowerCase()==s.toLowerCase())){t.push(s);continue t}}t.push("")}return t}function renderDiagnostic(n,t,o){var r;let s=o?assignKeys(t.actions):[];return crelt("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},crelt("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(n):t.message),(r=t.actions)===null||r===void 0?void 0:r.map((a,u)=>{let h=0,b=C=>{if(C.preventDefault(),h>Date.now()-100)return;let k=findDiagnostic(n.state.field(lintState).diagnostics,t);k&&a.apply(n,k.from,k.to),h=Date.now()},{name:m}=a,w=s[u]?m.indexOf(s[u]):-1,E=w<0?m:[m.slice(0,w),crelt("u",m.slice(w,w+1)),m.slice(w+1)],R=a.markClass?" "+a.markClass:"";return crelt("button",{type:"button",class:"cm-diagnosticAction"+R,onclick:b,onmousedown:b,"aria-label":` Action: ${m}${w<0?"":` (access key "${s[u]})"`}.`},E)}),t.source&&crelt("div",{class:"cm-diagnosticSource"},t.source))}class DiagnosticWidget extends WidgetType{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return crelt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class PanelItem{constructor(t,o){this.diagnostic=o,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=renderDiagnostic(t,o,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class LintPanel{constructor(t){this.view=t,this.items=[];let o=s=>{if(!(s.ctrlKey||s.altKey||s.metaKey)){if(s.keyCode==27)closeLintPanel(this.view),this.view.focus();else if(s.keyCode==38||s.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(s.keyCode==40||s.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(s.keyCode==36)this.moveSelection(0);else if(s.keyCode==35)this.moveSelection(this.items.length-1);else if(s.keyCode==13)this.view.focus();else if(s.keyCode>=65&&s.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:a}=this.items[this.selectedIndex],u=assignKeys(a.actions);for(let h=0;h<u.length;h++)if(u[h].toUpperCase().charCodeAt(0)==s.keyCode){let b=findDiagnostic(this.view.state.field(lintState).diagnostics,a);b&&a.actions[h].apply(t,b.from,b.to)}}else return;s.preventDefault()}},r=s=>{for(let a=0;a<this.items.length;a++)this.items[a].dom.contains(s.target)&&this.moveSelection(a)};this.list=crelt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:o,onclick:r}),this.dom=crelt("div",{class:"cm-panel-lint"},this.list,crelt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>closeLintPanel(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(lintState).selected;if(!t)return-1;for(let o=0;o<this.items.length;o++)if(this.items[o].diagnostic==t.diagnostic)return o;return-1}update(){let{diagnostics:t,selected:o}=this.view.state.field(lintState),r=0,s=!1,a=null,u=new Set;for(t.between(0,this.view.state.doc.length,(h,b,{spec:m})=>{for(let w of m.diagnostics){if(u.has(w))continue;u.add(w);let E=-1,R;for(let C=r;C<this.items.length;C++)if(this.items[C].diagnostic==w){E=C;break}E<0?(R=new PanelItem(this.view,w),this.items.splice(r,0,R),s=!0):(R=this.items[E],E>r&&(this.items.splice(r,E-r),s=!0)),o&&R.diagnostic==o.diagnostic?R.dom.hasAttribute("aria-selected")||(R.dom.setAttribute("aria-selected","true"),a=R):R.dom.hasAttribute("aria-selected")&&R.dom.removeAttribute("aria-selected"),r++}});r<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)s=!0,this.items.pop();this.items.length==0&&(this.items.push(new PanelItem(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),s=!0),a?(this.list.setAttribute("aria-activedescendant",a.id),this.view.requestMeasure({key:this,read:()=>({sel:a.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:h,panel:b})=>{let m=b.height/this.list.offsetHeight;h.top<b.top?this.list.scrollTop-=(b.top-h.top)/m:h.bottom>b.bottom&&(this.list.scrollTop+=(h.bottom-b.bottom)/m)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),s&&this.sync()}sync(){let t=this.list.firstChild;function o(){let r=t;t=r.nextSibling,r.remove()}for(let r of this.items)if(r.dom.parentNode==this.list){for(;t!=r.dom;)o();t=r.dom.nextSibling}else this.list.insertBefore(r.dom,t);for(;t;)o()}moveSelection(t){if(this.selectedIndex<0)return;let o=this.view.state.field(lintState),r=findDiagnostic(o.diagnostics,this.items[t].diagnostic);r&&this.view.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0,effects:movePanelSelection.of(r)})}static open(t){return new LintPanel(t)}}function svg$2(n,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(n)}</svg>')`}function underline(n){return svg$2(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${n}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const baseTheme=EditorView.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:underline("#f11")},".cm-lintRange-warning":{backgroundImage:underline("orange")},".cm-lintRange-info":{backgroundImage:underline("#999")},".cm-lintRange-hint":{backgroundImage:underline("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:"#86714a80"},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:"#2e343e"}}});function severityWeight(n){return n=="error"?4:n=="warning"?3:n=="info"?2:1}function maxSeverity(n){let t="hint",o=1;for(let r of n){let s=severityWeight(r.severity);s>o&&(o=s,t=r.severity)}return t}const lintHover=hoverTooltip(lintTooltip,{hideOn:hideTooltip}),lintExtensions=[lintState,EditorView.decorations.compute([lintState],n=>{let{selected:t,panel:o}=n.field(lintState);return!t||!o||t.from==t.to?Decoration.none:Decoration.set([activeMark.range(t.from,t.to)])}),lintHover,baseTheme],basicSetup=[lineNumbers(),highlightActiveLineGutter(),highlightSpecialChars(),history(),foldGutter(),drawSelection(),dropCursor(),EditorState.allowMultipleSelections.of(!0),indentOnInput(),syntaxHighlighting(defaultHighlightStyle,{fallback:!0}),bracketMatching(),closeBrackets(),autocompletion(),rectangularSelection(),crosshairCursor(),highlightActiveLine(),highlightSelectionMatches(),keymap.of([...closeBracketsKeymap,...defaultKeymap,...searchKeymap,...historyKeymap,...foldKeymap,...completionKeymap,...lintKeymap])],theme=EditorView.theme({"&":{fontSize:"9pt",border:"1px solid var(--borderColor-default, #d0d7de)",backgroundColor:"var(--bgColor-default, #ffffff)",color:"var(--fgColor-default, #1f2328)"},".cm-content":{fontFamily:"Menlo, Monaco, Lucida Console, monospace",minHeight:"10px",color:"var(--fgColor-default, #1f2328)",caretColor:"var(--fgColor-accent, #0969da)"},".cm-gutters":{minHeight:"10px",backgroundColor:"var(--bgColor-muted, #f6f8fa)",color:"var(--fgColor-muted, #656d76)",borderRight:"1px solid var(--borderColor-default, #d0d7de)"},".cm-lineNumbers .cm-gutterElement":{color:"var(--fgColor-muted, #656d76)"},".cm-activeLineGutter":{backgroundColor:"var(--bgColor-neutral-muted, rgba(175, 184, 193, 0.2))",color:"var(--fgColor-default, #1f2328)"},".cm-scroller":{overflow:"auto"}},{dark:!1}),codeMirrorTheme=[theme],CodeMirrorOutputToolbarMenu=n=>{const{executeCode:t,outputAdapter:o,editorView:r}=n;return jsxRuntimeExports.jsxs(ActionMenu,{children:[jsxRuntimeExports.jsx(ActionMenu.Anchor,{children:jsxRuntimeExports.jsx(IconButton,{"aria-labelledby":"",icon:KebabHorizontalIcon,variant:"invisible"})}),jsxRuntimeExports.jsx(ActionMenu.Overlay,{children:jsxRuntimeExports.jsxs(ActionList,{children:[jsxRuntimeExports.jsxs(ActionList.Item,{onSelect:s=>{s.preventDefault(),t(r)},children:[jsxRuntimeExports.jsx(ActionList.LeadingVisual,{children:jsxRuntimeExports.jsx(ArrowRightIcon,{})}),jsxRuntimeExports.jsx(ActionList.TrailingVisual,{children:"⇧ ↵"}),"Run code"]}),jsxRuntimeExports.jsxs(ActionList.Item,{onSelect:s=>{s.preventDefault(),o.interrupt()},children:[jsxRuntimeExports.jsx(ActionList.LeadingVisual,{children:jsxRuntimeExports.jsx(StopIcon,{})}),"Interrupt kernel"]}),jsxRuntimeExports.jsxs(ActionList.Item,{variant:"danger",onClick:s=>{s.preventDefault(),o.clear()},children:[jsxRuntimeExports.jsx(ActionList.LeadingVisual,{children:jsxRuntimeExports.jsx(PaintbrushIcon,{})}),"Clear outputs"]})]})})]})},KernelStatus=({color:n})=>jsxRuntimeExports.jsx(Box$1,{sx:{backgroundColor:n,width:"14px",height:"14px",borderRadius:3}}),CodeMirrorOutputToolbar=n=>{const{executeCode:t,editorView:o,kernel:r,codePre:s}=n,{theme:a}=useTheme(),u=reactExports.useMemo(()=>a?.colorSchemes.light.colors.success.muted,[]),h=reactExports.useMemo(()=>a?.colorSchemes.light.colors.severe.muted,[]),[b,m]=reactExports.useState("unknown");reactExports.useEffect(()=>{r&&r.ready.then(()=>{s&&t(o,s),m(r.connection.status),r.connection.statusChanged.connect((E,R)=>{m(R)})})},[r]);const w=E=>E==="idle"?u:h;return jsxRuntimeExports.jsxs(Box$1,{display:"flex",children:[jsxRuntimeExports.jsx(Box$1,{flexGrow:1}),jsxRuntimeExports.jsx(Box$1,{sx:{paddingTop:"6px"},children:jsxRuntimeExports.jsx(KernelStatus,{color:w(b)})}),jsxRuntimeExports.jsx(Box$1,{children:jsxRuntimeExports.jsx(CodeMirrorOutputToolbarMenu,{...n})})]})},CodeMirrorEditor=n=>{const{code:t,codePre:o,outputAdapter:r,autoRun:s,disableRun:a,sourceId:u,toolbarPosition:h,insertText:b,kernel:m}=n,w=useOutputsStore(),[E,R]=reactExports.useState(),C=reactExports.useRef(a),k=reactExports.useRef(r),O=reactExports.useRef(m),_=w.getDataset(u),S=w.getInput(u),D=reactExports.useRef(void 0);reactExports.useEffect(()=>{C.current=a},[a]),reactExports.useEffect(()=>{k.current=r},[r]),reactExports.useEffect(()=>{O.current=m,k.current&&(k.current.kernel=m)},[m]);const T=B=>{if(E&&B!==void 0){if(E.state.doc.toString()===B)return;E.dispatch({changes:{from:0,to:E.state.doc.length,insert:B}})}},q=B=>{E&&b&&E.dispatch({changes:{from:0,insert:b(B)}})},F=(B,P)=>{if(C.current)return alert("Code execution is disabled for this editor. There should be a button on the page to run this editor."),!0;const I=k.current;return O.current&&(I.kernel=O.current),P?I.execute(P):I.execute(B.state.doc.toString()),!0};return reactExports.useEffect(()=>{w.setInput(u,t);const B=new Compartment,P=EditorState.create({doc:t,extensions:[Prec.highest(keymap.of([{key:"Shift-Enter",run:j=>F(j),preventDefault:!0}])),EditorView.domEventHandlers({keydown:(j,H)=>j.shiftKey&&j.key==="Enter"?(j.preventDefault(),F(H)):!1}),basicSetup,B.of(python()),EditorView.lineWrapping,codeMirrorTheme,EditorView.updateListener.of(j=>{if(j.docChanged){const H=j.state.doc.toString();w.setInput(u,H)}})]}),I=new EditorView({state:P,parent:D.current});return R(I),s&&F(I),()=>{I.destroy()}},[t]),reactExports.useEffect(()=>{q(_)},[_]),reactExports.useEffect(()=>{T(S)},[S]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[m&&h==="up"&&jsxRuntimeExports.jsx(CodeMirrorOutputToolbar,{editorView:E,codePre:o,kernel:m,outputAdapter:r,executeCode:F}),jsxRuntimeExports.jsx("div",{ref:D}),m&&h==="middle"&&jsxRuntimeExports.jsx(CodeMirrorOutputToolbar,{editorView:E,codePre:o,kernel:m,outputAdapter:r,executeCode:F})]})},CodeMirrorDatalayerEditor=CodeMirrorEditor;class OutputAdapter{_id;_kernel;_renderers;_outputArea;_rendermime;_iPyWidgetsManager;_suppressCodeExecutionErrors;_variant;_lastCode="";constructor(id,kernel,outputs,outputAreaModel,suppressCodeExecutionErrors=!1,variant){this._id=id,this._kernel=kernel,this._variant=variant,this._suppressCodeExecutionErrors=suppressCodeExecutionErrors,this._renderers=standardRendererFactories.filter(n=>n.mimeTypes[0]!=="text/javascript"),this._renderers.push(rendererFactory$1),this._renderers.push(rendererFactory$2),this._rendermime=new RenderMimeRegistry({initialFactories:this._renderers}),this._iPyWidgetsManager=new ClassicWidgetManager({loader:requireLoader}),this._rendermime.addFactory({safe:!1,mimeTypes:[WIDGET_MIMETYPE],createRenderer:n=>new WidgetRenderer(n,this._iPyWidgetsManager)},0);const model=outputAreaModel??new OutputAreaModel({trusted:!0,values:outputs});if(this._outputArea=new OutputArea({model,rendermime:this._rendermime}),outputs&&outputs[0]){const data=outputs[0].data;if(data){const isPlotly=data["application/vnd.plotly.v1+json"];if(isPlotly){let script=this._outputArea.node.children[0].children[1].children[0].children[1].innerHTML;script=script.replaceAll(`
4
4
  ,`,`
@@ -1,4 +1,4 @@
1
- import{r as p,k as _,n as S,o as A,q as L,u as P,j as n,T as x,B as c,v as b,D as B,S as K,H as O,x as U,L as z,y as T,I as N,z as R,A as $}from"../datalayer-app-main.js";import{e as F,K as H}from"./KernelVariables-cH-x-Hrc.js";function E({status:e}){const s=e==="running"||e==="idle"?"success":e==="busy"||e==="starting"?"attention":e==="error"||e==="dead"?"danger":"secondary";return n.jsx(z,{variant:s,size:"small","data-sandbox-status":e,children:e})}function Y({url:e}){const[s,l]=p.useState(!1);return n.jsxs(c,{display:"flex",alignItems:"center",gap:1,minWidth:0,children:[n.jsx(T,{href:e,target:"_blank",rel:"noreferrer",sx:{fontFamily:"mono",fontSize:0,wordBreak:"break-all"},children:e}),n.jsx(N,{icon:s?R:$,"aria-label":"Copy the URL",size:"small",variant:"invisible",onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{l(!0),setTimeout(()=>l(!1),1500)})}})]})}function C(e){if(e===void 0||e==="")return;const s=typeof e=="number"?new Date(e<1e12?e*1e3:e):new Date(e);return Number.isNaN(s.getTime())?void 0:s.toLocaleString()}const h="__DL_PYODIDE__",M=`def __dl_pyodide():
1
+ import{r as p,k as _,n as S,o as A,q as L,u as P,j as n,T as x,B as c,v as b,D as B,S as K,H as O,x as U,L as z,y as T,I as N,z as R,A as $}from"../datalayer-app-main.js";import{e as F,K as H}from"./KernelVariables-DvfwDxTX.js";function E({status:e}){const s=e==="running"||e==="idle"?"success":e==="busy"||e==="starting"?"attention":e==="error"||e==="dead"?"danger":"secondary";return n.jsx(z,{variant:s,size:"small","data-sandbox-status":e,children:e})}function Y({url:e}){const[s,l]=p.useState(!1);return n.jsxs(c,{display:"flex",alignItems:"center",gap:1,minWidth:0,children:[n.jsx(T,{href:e,target:"_blank",rel:"noreferrer",sx:{fontFamily:"mono",fontSize:0,wordBreak:"break-all"},children:e}),n.jsx(N,{icon:s?R:$,"aria-label":"Copy the URL",size:"small",variant:"invisible",onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{l(!0),setTimeout(()=>l(!1),1500)})}})]})}function C(e){if(e===void 0||e==="")return;const s=typeof e=="number"?new Date(e<1e12?e*1e3:e):new Date(e);return Number.isNaN(s.getTime())?void 0:s.toLocaleString()}const h="__DL_PYODIDE__",M=`def __dl_pyodide():
2
2
  import json, sys
3
3
  facts = {'python': sys.version.split()[0], 'packages': []}
4
4
  try:
@@ -1 +1 @@
1
- import{kR as ne,kS as se,kT as ae,bm as ie,J as O,kU as le,j as t,kV as oe,kW as de,gM as F,kX as H,gc as ce,r as E,bx as T,f8 as ue,I as ee,X as pe,dp as te,T as K,dt as he,W as me,A as xe,v as re,kY as Y,kZ as fe,k_ as ye,gh as ge,h3 as J,gO as be,k$ as je,B as Ce,ds as Te}from"../datalayer-app-main.js";import{F as Se,T as D,a as X,g as A,b as Fe,e as Z,d as L,f as ke,h as Be,t as ve,i as we,c as Ae,j as Ie,A as De,s as Le,k as We,o as G,l as Oe,m as Re,n as v,u as Ve,p as _e,r as Ee,q as $e,v as qe}from"./index-CHu5zo1L.js";import{A as Ge,a as Pe}from"./ArrowUpIcon-y5enrVH9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./uniqueId-BVuTZY3F.js";import"./toNumber-B1wj8-wx.js";import"./_baseClone-ByJL1tkX.js";import"./merge-B_wcPK4Y.js";import"./isEqual-DXPB_0fo.js";const Me=r=>{const e=ie.c(24);let n,s,a,o;e[0]!==r?({children:n,disabled:s,onChange:a,...o}=r,e[0]=r,e[1]=n,e[2]=s,e[3]=a,e[4]=o):(n=e[1],s=e[2],a=e[3],o=e[4]);let m;if(e[5]!==n){const y=O.Children.toArray(n).filter(Ue).map(Ne).flat();m=O.Children.toArray(y).filter(ze).map(He).filter(Boolean),e[5]=n,e[6]=m}else m=e[6];const u=m,[d,c]=le(u);let x;e[7]!==d||e[8]!==c?(x=y=>{const{value:b,checked:j}=y.currentTarget;if(j){c([...d.current||[],b]);return}c((d.current||[]).filter(S=>S!==b))},e[7]=d,e[8]=c,e[9]=x):x=e[9];const i=x;let l;e[10]!==a||e[11]!==d||e[12]!==i?(l=y=>{a&&(i(y),a(d.current||[],y))},e[10]=a,e[11]=d,e[12]=i,e[13]=l):l=e[13];let h;e[14]!==s||e[15]!==l?(h={disabled:s,onChange:l},e[14]=s,e[15]=l,e[16]=h):h=e[16];let p;e[17]!==n||e[18]!==s||e[19]!==o?(p=t.jsx(oe,{disabled:s,...o,children:n}),e[17]=n,e[18]=s,e[19]=o,e[20]=p):p=e[20];let f;return e[21]!==h||e[22]!==p?(f=t.jsx(de.Provider,{value:h,children:p}),e[21]=h,e[22]=p,e[23]=f):f=e[23],f};var Q=Object.assign(Me,{Caption:ae,Label:se,Validation:ne});function Ue(r){return O.isValidElement(r)&&r.type===F}function Ne(r){return O.isValidElement(r)?r.props.children:[]}function ze(r){return O.isValidElement(r)&&r.type===H}function He(r){return O.isValidElement(r)&&(r.props.checked||r.props.defaultChecked)&&r.props.value}const Ke=({name:r="slider",id:e="slider",min:n=0,max:s=10,value:a=5,label:o="label",step:m=1,markers:u=!1,displayValue:d=!0,disabled:c=!1,orientation:x="horizontal",width:i="200px",onChange:l})=>{const{colorMode:h}=ce(),p=s<n?n:n+(s-n)/2,[f,y]=E.useState(p);E.useEffect(()=>{y(a??p)},[a,p]);const b=S=>{const g=Number(S.target.value);y(g),l(g)},j={width:i,...x==="vertical"?{transform:"rotate(-90deg)"}:{},colorScheme:h=="day"?"light":"dark",accentColor:"var(--fgColor-accent)"};return t.jsxs(T,{display:"flex",alignItems:"center",children:[t.jsx("input",{type:"range",id:e,name:r,min:n,max:s,value:f,step:m??"any",list:"slider-markers",style:j,onChange:b,disabled:c}),u&&m&&t.jsx("datalist",{id:"slider-markers",children:Array.from({length:Math.floor((s-n)/m)+1},(S,g)=>n+g*m).map(S=>t.jsx("option",{value:S},`slider-marker-${S}`))}),o&&t.jsx(F.Label,{htmlFor:e,sx:{ml:2},children:o}),d&&x==="horizontal"&&t.jsx(ue,{sx:{ml:2},children:f})]})};function Xe(r){return E.forwardRef(({fields:e,widgets:n,templates:s,...a},o)=>(e={...r?.fields,...e},n={...r?.widgets,...n},s={...r?.templates,...s,ButtonTemplates:{...r?.templates?.ButtonTemplates,...s?.ButtonTemplates}},t.jsx(Se,{...r,...a,fields:e,widgets:n,templates:s,ref:o})))}function Ye({uiSchema:r,registry:e,...n}){const{translateString:s}=e;return t.jsx(ee,{variant:"default",size:"small",icon:pe,"aria-label":s(D.AddItemButton),...n})}function Je(r){const{children:e,disabled:n,hasToolbar:s,hasMoveDown:a,hasMoveUp:o,hasRemove:m,index:u,onDropIndexClick:d,onReorderClick:c,readonly:x,uiSchema:i,registry:l}=r,{MoveDownButton:h,MoveUpButton:p,RemoveButton:f}=l.templates.ButtonTemplates,y={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold",minWidth:0};return t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},alignItems:"center",children:[t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},style:{overflow:"auto"},children:t.jsx(T,{mb:2,p:2,sx:{borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:e})}),s&&t.jsxs(T,{p:1,children:[(o||a)&&t.jsx(p,{style:y,disabled:n||x||!o,onClick:c(u,u-1),uiSchema:i,registry:l}),(o||a)&&t.jsx(h,{style:y,disabled:n||x||!a,onClick:c(u,u+1),uiSchema:i,registry:l}),m&&t.jsx(f,{style:y,disabled:n||x,onClick:d(u),uiSchema:i,registry:l})]})]})}function Ze(r){const{canAdd:e,disabled:n,idSchema:s,uiSchema:a,items:o,onAddClick:m,readonly:u,registry:d,required:c,schema:x,title:i}=r,l=X(a),h=A("ArrayFieldDescriptionTemplate",d,l),p=A("ArrayFieldItemTemplate",d,l),f=A("ArrayFieldTitleTemplate",d,l),{ButtonTemplates:{AddButton:y}}=d.templates;return t.jsxs(T,{p:3,sx:{display:"flex",width:"100%",flexFlow:"row wrap",borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:[t.jsx(f,{idSchema:s,title:l.title||i,schema:x,uiSchema:a,required:c,registry:d}),t.jsx(h,{idSchema:s,description:l.description||x.description,schema:x,uiSchema:a,registry:d}),t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},children:[o&&o.map(({key:b,...j})=>t.jsx(p,{...j},b)),e&&t.jsx(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},justifyContent:"flex-end",children:t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsx(T,{mt:2,children:t.jsx(y,{className:"array-item-add",onClick:m,disabled:n||u,uiSchema:a,registry:d})})})})]},`array-item-list-${s.$id}`)]})}function Qe(r){const{id:e,placeholder:n,required:s,readonly:a,disabled:o,type:m,label:u,value:d,onChange:c,onBlur:x,onFocus:i,autofocus:l,options:h,schema:p,uiSchema:f,rawErrors:y=[],formContext:b,registry:j,hideLabel:S,hideError:g,...C}=r,w=Fe(p,m,h),{step:I,min:R,max:V,...M}=w,$={...Array.isArray(p.examples)?{list:Z(e)}:void 0,...M,...I!==void 0?{step:I}:void 0,...R!==void 0?{min:R}:void 0,...V!==void 0?{max:V}:void 0},U=({target:{value:k}})=>c(k===""?h.emptyValue:k),N=({target:{value:k}})=>x(e,k),z=({target:{value:k}})=>i(e,k),{schemaUtils:q}=j,B=q.getDisplayLabel(p,f);return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{visuallyHidden:!B,htmlFor:e,children:u||p.title}),t.jsx(te,{id:e,name:e,placeholder:n,autoFocus:l,required:s,disabled:o||a,...$,value:d||d===0?d:"",validationStatus:y.length>0?"error":void 0,onChange:U,onBlur:N,onFocus:z,block:!0,...C,"aria-describedby":L(e,!!p.examples)}),Array.isArray(p.examples)&&t.jsx("datalist",{id:Z(e),children:p.examples.concat(p.default&&!p.examples.includes(p.default)?[p.default]:[]).map(k=>t.jsx("option",{value:k},k))})]})}function et(r){const{id:e,description:n}=r;return n?t.jsx(K,{id:e,as:"p",mt:1,children:n}):null}function tt({errors:r,registry:e}){const{translateString:n}=e;return t.jsx(T,{mb:3,sx:{borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:t.jsxs(T,{p:3,children:[t.jsx(T,{as:"h3",sx:{fontSize:3,fontWeight:"semibold",m:0},children:n(D.ErrorsLabel)}),t.jsx(t.Fragment,{children:r.map((s,a)=>t.jsx(he,{variant:"danger",sx:{marginTop:2},children:s.stack},a))})]})})}function P({color:r,title:e,icon:n,...s}){return r||(r="invisible"),t.jsx(ee,{variant:r,size:"small",icon:n,onClick:a=>a.preventDefault(),onSubmit:a=>a.preventDefault(),"aria-label":e,...s})}function rt(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.CopyButton),...r,icon:xe})}function nt(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.MoveDownButton),...r,icon:Pe})}function st(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.MoveUpButton),...r,icon:Ge})}function at(r){const{iconType:e,...n}=r,{registry:{translateString:s}}=n;return t.jsx(P,{title:s(D.RemoveButton),...n,icon:me})}function it(r){const{errors:e=[],idSchema:n}=r;if(e.length===0)return null;const s=ke(n);return t.jsx("div",{id:s,children:e.map((a,o)=>t.jsxs(K,{as:"p",mb:1,sx:{fontSize:"12px",display:"block",color:"danger.fg"},children:["•"," "+a]},o))})}function lt(r){const{idSchema:e,help:n}=r;if(!n)return null;const s=Be(e);return t.jsx(F.Caption,{id:s,children:n})}function ot(r){const{id:e,children:n,classNames:s,style:a,disabled:o,displayLabel:m,hidden:u,label:d,onDropPropertyClick:c,onKeyChange:x,readonly:i,required:l,rawErrors:h=[],errors:p,help:f,rawDescription:y,schema:b,uiSchema:j,registry:S}=r,g=X(j),C=A("WrapIfAdditionalTemplate",S,g);return u?t.jsx("div",{style:{display:"none"},children:n}):t.jsx(C,{classNames:s,style:a,disabled:o,id:e,label:d,onDropPropertyClick:c,onKeyChange:x,readonly:i,required:l,schema:b,uiSchema:j,registry:S,children:t.jsxs(F,{required:l,children:[t.jsx(F.Label,{visuallyHidden:!0}),n,m&&y?t.jsx(F.Caption,{id:e,children:y}):null,p,f]})})}function dt(r){const{description:e,title:n,properties:s,required:a,disabled:o,readonly:m,uiSchema:u,idSchema:d,schema:c,formData:x,onAddClick:i,registry:l}=r,h=X(u),p=A("TitleFieldTemplate",l,h),f=A("DescriptionFieldTemplate",l,h),{ButtonTemplates:{AddButton:y}}=l.templates;return t.jsxs(t.Fragment,{children:[(h.title||n)&&t.jsx(p,{id:ve(d),title:n,required:a,schema:c,uiSchema:u,registry:l}),(h.description||e)&&t.jsx(f,{id:we(d),description:h.description||e,schema:c,uiSchema:u,registry:l}),t.jsxs(T,{sx:{display:"flex",width:"100%",flexDirection:"column",flexFlow:"row wrap"},style:{marginTop:"10px"},children:[s.map((b,j)=>b.hidden?b.content:t.jsx(T,{sx:{flexBasis:"100%",flexGrow:0,maxWidth:"100%"},mb:1,children:b.content},j)),Ae(c,u,x)&&t.jsx(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},justifyContent:"flex-end",children:t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsx(y,{className:"object-property-expand",onClick:b=>{b.preventDefault(),i(c)()},disabled:o||m,uiSchema:u,registry:l})})})]})]})}function ct({uiSchema:r}){const{submitText:e,norender:n,props:s={}}=Ie(r);return n?null:t.jsx(T,{marginTop:2,children:t.jsx(re,{type:"submit",variant:"primary",...s,children:e})})}function ut({id:r,title:e}){return t.jsx(T,{id:r,my:2,children:t.jsx(T,{as:"h5",sx:{fontSize:1,fontWeight:"semibold",m:0,borderBottom:"1px solid",borderColor:"border.default",paddingBottom:1},children:e})})}function pt(r){const{children:e,classNames:n,style:s,disabled:a,id:o,label:m,onDropPropertyClick:u,onKeyChange:d,readonly:c,required:x,schema:i,uiSchema:l,registry:h}=r,{templates:p,translateString:f}=h,{RemoveButton:y}=p.ButtonTemplates,b=f(D.KeyLabel,[m]),j=De in i,S={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"};if(!j)return t.jsx("div",{className:n,style:s,children:e});const g=({target:C})=>d(C.value);return t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},alignItems:"center",className:n,style:s,children:[t.jsx(T,{pr:2,sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsxs(F,{id:`${o}-key`,required:x,children:[t.jsx(F.Label,{children:b}),t.jsx(te,{defaultValue:m,disabled:a||c,name:`${o}-key`,onBlur:c?void 0:g,type:"text",block:!0})]})}),t.jsx(T,{pr:2,sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:e}),t.jsx(T,{children:t.jsx(y,{iconType:"default",style:S,disabled:a||c,onClick:u(m),uiSchema:l,registry:h})})]},`${o}-key`)}function ht(){return{ArrayFieldItemTemplate:Je,ArrayFieldTemplate:Ze,BaseInputTemplate:Qe,ButtonTemplates:{AddButton:Ye,CopyButton:rt,MoveDownButton:nt,MoveUpButton:st,RemoveButton:at,SubmitButton:ct},DescriptionFieldTemplate:et,ErrorListTemplate:tt,FieldErrorTemplate:it,FieldHelpTemplate:lt,FieldTemplate:ot,ObjectFieldTemplate:dt,TitleFieldTemplate:ut,WrapIfAdditionalTemplate:pt}}function mt(r){const{schema:e,id:n,value:s,disabled:a,readonly:o,label:m,autofocus:u,onChange:d,onBlur:c,onFocus:x}=r,i=Le(e),l=({target:{checked:f}})=>d(f),h=({target:{value:f}})=>c(n,f),p=({target:{value:f}})=>x(n,f);return t.jsxs(F,{id:n,children:[t.jsx(H,{checked:typeof s>"u"?!1:!!s,required:i,disabled:a||o,autoFocus:u,onChange:l,onBlur:h,onFocus:p,"aria-describedby":L(n)}),t.jsx(F.Label,{children:m||""})]})}function xt({schema:r,label:e,id:n,disabled:s,options:a,value:o,autofocus:m,readonly:u,required:d,onChange:c,onBlur:x,onFocus:i}){const{enumOptions:l,enumDisabled:h,inline:p,emptyValue:f}=a,y=Array.isArray(o)?o:[o],b=g=>({target:{checked:C}})=>{c(C?Oe(g,y,l):Re(g,y,l))},j=({target:{value:g}})=>x(n,v(g,l,f)),S=({target:{value:g}})=>i(n,v(g,l,f));return t.jsxs(Q,{required:d,children:[t.jsx(Q.Label,{children:e||r.title}),Array.isArray(l)&&l.map((g,C)=>{const w=We(g.value,y),I=Array.isArray(h)&&h.indexOf(g.value)!==-1;return t.jsxs(F,{id:G(n,C),children:[t.jsx(H,{checked:w,disabled:s||I||u,autoFocus:m&&C===0,onChange:b(C),onBlur:j,onFocus:S,"aria-describedby":L(n)}),t.jsx(F.Label,{children:g.label})]},G(n,C))})]})}function ft(r){const{options:e,registry:n}=r,s=A("BaseInputTemplate",n,e);return t.jsx(s,{type:"date",InputLabelProps:{shrink:!0},...r})}function yt(r){const{options:e,registry:n}=r,s=A("BaseInputTemplate",n,e),a=Ve(r.value),o=m=>{r.onChange(_e(m))};return t.jsx(s,{type:"datetime-local",...r,value:a,onChange:o})}function gt({id:r,schema:e,options:n,value:s,required:a,disabled:o,readonly:m,label:u,onChange:d,onBlur:c,onFocus:x}){const{enumOptions:i,enumDisabled:l,emptyValue:h}=n,p=({target:{value:b}})=>d(v(b,i,h)),f=({target:{value:b}})=>c(r,v(b,i,h)),y=({target:{value:b}})=>x(r,v(b,i,h));return t.jsxs(Y,{name:r,required:a,children:[t.jsx(Y.Label,{children:u||e.title}),t.jsx(t.Fragment,{children:Array.isArray(i)&&i.map((b,j)=>{const S=Array.isArray(l)&&l.indexOf(b.value)!==-1;return t.jsxs(F,{id:G(r,j),children:[t.jsx(fe,{value:String(j),onChange:p,onBlur:f,onFocus:y,"aria-describedby":L(r),disabled:o||S||m},j),t.jsx(F.Label,{children:b.label})]},G(r,j))})})]})}function bt(r){const{value:e,readonly:n,disabled:s,options:a,schema:o,onChange:m,label:u,id:d}=r,c={value:e,label:u,id:d,name:d,...Ee(o)},x=i=>{m(i??a.emptyValue)};return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{htmlFor:d,children:u||o.title}),t.jsx(Ke,{disabled:s||n,onChange:x,...c,"aria-describedby":L(d)})]})}function jt({schema:r,id:e,options:n,label:s,required:a,disabled:o,placeholder:m,readonly:u,value:d,multiple:c,autofocus:x,onChange:i,onBlur:l,onFocus:h,rawErrors:p=[],registry:f,uiSchema:y,hideError:b,formContext:j,...S}){const{enumOptions:g,enumDisabled:C,emptyValue:w}=n,[I,R]=E.useState(!1);c=typeof c>"u"?!1:!!c;const V=c?[]:"",M=typeof d>"u"||c&&d.length<1||!c&&d===V,$=g?.map(({value:B,label:k},W)=>{const _=Array.isArray(C)&&C.indexOf(B)!==-1;return{text:k,id:W,disabled:_}}),U=({target:{value:B}})=>i(v(B,g,w)),N=({target:{value:B}})=>l(e,v(B,g,w)),z=({target:{value:B}})=>h(e,v(B,g,w)),q=$e(d,g,c);return t.jsxs(F,{id:e,required:a,children:[t.jsx(F.Label,{visuallyHidden:!(s||r.title),htmlFor:e,children:s||r.title}),c&&Array.isArray(g)?t.jsx(ye,{placeholderText:(s||r.title)??"",renderAnchor:({children:B,"aria-labelledby":k,...W})=>t.jsx(re,{trailingAction:ge,"aria-labelledby":` ${k}`,...W,onClick:_=>{R(!I),_.preventDefault()},children:B||`Select ${s||r.title}`}),open:I,onOpenChange:R,items:$??[],selected:($??[]).filter((B,k)=>q?.includes(String(k))),onSelectedChange:B=>{i(v(B.map(k=>k.id),g,w))},onFilterChange:()=>null,overlayProps:{width:"small"}}):t.jsx(J,{name:e,value:M?V:q,disabled:o||u,autoFocus:x,placeholder:s||r.title,validationStatus:p.length>0?"error":void 0,onChange:U,onBlur:N,onFocus:z,defaultValue:void 0,...S,"aria-describedby":L(e),children:Array.isArray(g)&&g.map(({value:B,label:k},W)=>{const _=Array.isArray(C)&&C.indexOf(B)!==-1;return t.jsx(J.Option,{value:String(W),disabled:_,children:k},W)})})]})}function Ct({id:r,placeholder:e,value:n,label:s,disabled:a,autofocus:o,readonly:m,onBlur:u,onFocus:d,onChange:c,options:x,schema:i,uiSchema:l,required:h,rawErrors:p=[],registry:f}){const{schemaUtils:y}=f,b=y.getDisplayLabel(i,l)&&(!!s||!!i.title),j=({target:{value:C}})=>c(C===""?x.emptyValue:C),S=({target:{value:C}})=>u(r,C),g=({target:{value:C}})=>d(r,C);return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{visuallyHidden:!b,htmlFor:r,children:s||i.title}),t.jsx(be,{id:r,name:r,value:n??"",placeholder:e,autoFocus:o,required:h,disabled:a||m,validationStatus:p.length>0?"error":void 0,onChange:j,onBlur:S,onFocus:g,block:!0,"aria-describedby":L(r)})]})}function Tt(){return{CheckboxWidget:mt,CheckboxesWidget:xt,DateWidget:ft,DateTimeWidget:yt,RadioWidget:gt,RangeWidget:bt,SelectWidget:jt,TextareaWidget:Ct}}function St(){return{templates:ht(),widgets:Tt()}}function Ft(){return Xe(St())}const kt=Ft();function Bt({id:r,value:e,label:n,disabled:s,readonly:a,onChange:o}){return t.jsxs(Ce,{display:"flex",flexDirection:"column",gap:1,children:[t.jsx(K,{as:"span",id:`${r}-label`,sx:{fontWeight:"semibold"},children:n}),t.jsx(Te,{size:"small","aria-labelledby":`${r}-label`,checked:!!e,disabled:s||a,onClick:()=>o(!e)})]})}function vt({id:r,value:e,label:n,disabled:s,readonly:a,placeholder:o,onChange:m}){const u=Array.isArray(e)?e.map(String):[],[d,c]=E.useState(""),x=()=>{const i=d.trim();i&&!u.includes(i)&&m([...u,i]),c("")};return t.jsxs(F,{id:r,disabled:s||a,children:[t.jsx(F.Label,{children:n}),t.jsx(je,{block:!0,placeholder:o,tokens:u.map((i,l)=>({id:l,text:i})),value:d,onChange:i=>c(i.target.value.replace(",","")),onKeyDown:i=>{(i.key==="Enter"||i.key===",")&&(i.preventDefault(),x())},onBlur:x,onTokenRemove:i=>{m(u.filter((l,h)=>h!==i))}})]})}const wt={switch:Bt,tags:vt};function qt(r){return t.jsx(kt,{...r,widgets:wt,validator:qe})}export{qt as default};
1
+ import{kR as ne,kS as se,kT as ae,bm as ie,J as O,kU as le,j as t,kV as oe,kW as de,gM as F,kX as H,gc as ce,r as E,bx as T,f8 as ue,I as ee,X as pe,dp as te,T as K,dt as he,W as me,A as xe,v as re,kY as Y,kZ as fe,k_ as ye,gh as ge,h3 as J,gO as be,k$ as je,B as Ce,ds as Te}from"../datalayer-app-main.js";import{F as Se,T as D,a as X,g as A,b as Fe,e as Z,d as L,f as ke,h as Be,t as ve,i as we,c as Ae,j as Ie,A as De,s as Le,k as We,o as G,l as Oe,m as Re,n as v,u as Ve,p as _e,r as Ee,q as $e,v as qe}from"./index-BeJsO4Vc.js";import{A as Ge,a as Pe}from"./ArrowUpIcon-y5enrVH9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./uniqueId-BVuTZY3F.js";import"./toNumber-B1wj8-wx.js";import"./_baseClone-ByJL1tkX.js";import"./merge-B_wcPK4Y.js";import"./isEqual-DXPB_0fo.js";const Me=r=>{const e=ie.c(24);let n,s,a,o;e[0]!==r?({children:n,disabled:s,onChange:a,...o}=r,e[0]=r,e[1]=n,e[2]=s,e[3]=a,e[4]=o):(n=e[1],s=e[2],a=e[3],o=e[4]);let m;if(e[5]!==n){const y=O.Children.toArray(n).filter(Ue).map(Ne).flat();m=O.Children.toArray(y).filter(ze).map(He).filter(Boolean),e[5]=n,e[6]=m}else m=e[6];const u=m,[d,c]=le(u);let x;e[7]!==d||e[8]!==c?(x=y=>{const{value:b,checked:j}=y.currentTarget;if(j){c([...d.current||[],b]);return}c((d.current||[]).filter(S=>S!==b))},e[7]=d,e[8]=c,e[9]=x):x=e[9];const i=x;let l;e[10]!==a||e[11]!==d||e[12]!==i?(l=y=>{a&&(i(y),a(d.current||[],y))},e[10]=a,e[11]=d,e[12]=i,e[13]=l):l=e[13];let h;e[14]!==s||e[15]!==l?(h={disabled:s,onChange:l},e[14]=s,e[15]=l,e[16]=h):h=e[16];let p;e[17]!==n||e[18]!==s||e[19]!==o?(p=t.jsx(oe,{disabled:s,...o,children:n}),e[17]=n,e[18]=s,e[19]=o,e[20]=p):p=e[20];let f;return e[21]!==h||e[22]!==p?(f=t.jsx(de.Provider,{value:h,children:p}),e[21]=h,e[22]=p,e[23]=f):f=e[23],f};var Q=Object.assign(Me,{Caption:ae,Label:se,Validation:ne});function Ue(r){return O.isValidElement(r)&&r.type===F}function Ne(r){return O.isValidElement(r)?r.props.children:[]}function ze(r){return O.isValidElement(r)&&r.type===H}function He(r){return O.isValidElement(r)&&(r.props.checked||r.props.defaultChecked)&&r.props.value}const Ke=({name:r="slider",id:e="slider",min:n=0,max:s=10,value:a=5,label:o="label",step:m=1,markers:u=!1,displayValue:d=!0,disabled:c=!1,orientation:x="horizontal",width:i="200px",onChange:l})=>{const{colorMode:h}=ce(),p=s<n?n:n+(s-n)/2,[f,y]=E.useState(p);E.useEffect(()=>{y(a??p)},[a,p]);const b=S=>{const g=Number(S.target.value);y(g),l(g)},j={width:i,...x==="vertical"?{transform:"rotate(-90deg)"}:{},colorScheme:h=="day"?"light":"dark",accentColor:"var(--fgColor-accent)"};return t.jsxs(T,{display:"flex",alignItems:"center",children:[t.jsx("input",{type:"range",id:e,name:r,min:n,max:s,value:f,step:m??"any",list:"slider-markers",style:j,onChange:b,disabled:c}),u&&m&&t.jsx("datalist",{id:"slider-markers",children:Array.from({length:Math.floor((s-n)/m)+1},(S,g)=>n+g*m).map(S=>t.jsx("option",{value:S},`slider-marker-${S}`))}),o&&t.jsx(F.Label,{htmlFor:e,sx:{ml:2},children:o}),d&&x==="horizontal"&&t.jsx(ue,{sx:{ml:2},children:f})]})};function Xe(r){return E.forwardRef(({fields:e,widgets:n,templates:s,...a},o)=>(e={...r?.fields,...e},n={...r?.widgets,...n},s={...r?.templates,...s,ButtonTemplates:{...r?.templates?.ButtonTemplates,...s?.ButtonTemplates}},t.jsx(Se,{...r,...a,fields:e,widgets:n,templates:s,ref:o})))}function Ye({uiSchema:r,registry:e,...n}){const{translateString:s}=e;return t.jsx(ee,{variant:"default",size:"small",icon:pe,"aria-label":s(D.AddItemButton),...n})}function Je(r){const{children:e,disabled:n,hasToolbar:s,hasMoveDown:a,hasMoveUp:o,hasRemove:m,index:u,onDropIndexClick:d,onReorderClick:c,readonly:x,uiSchema:i,registry:l}=r,{MoveDownButton:h,MoveUpButton:p,RemoveButton:f}=l.templates.ButtonTemplates,y={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold",minWidth:0};return t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},alignItems:"center",children:[t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},style:{overflow:"auto"},children:t.jsx(T,{mb:2,p:2,sx:{borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:e})}),s&&t.jsxs(T,{p:1,children:[(o||a)&&t.jsx(p,{style:y,disabled:n||x||!o,onClick:c(u,u-1),uiSchema:i,registry:l}),(o||a)&&t.jsx(h,{style:y,disabled:n||x||!a,onClick:c(u,u+1),uiSchema:i,registry:l}),m&&t.jsx(f,{style:y,disabled:n||x,onClick:d(u),uiSchema:i,registry:l})]})]})}function Ze(r){const{canAdd:e,disabled:n,idSchema:s,uiSchema:a,items:o,onAddClick:m,readonly:u,registry:d,required:c,schema:x,title:i}=r,l=X(a),h=A("ArrayFieldDescriptionTemplate",d,l),p=A("ArrayFieldItemTemplate",d,l),f=A("ArrayFieldTitleTemplate",d,l),{ButtonTemplates:{AddButton:y}}=d.templates;return t.jsxs(T,{p:3,sx:{display:"flex",width:"100%",flexFlow:"row wrap",borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:[t.jsx(f,{idSchema:s,title:l.title||i,schema:x,uiSchema:a,required:c,registry:d}),t.jsx(h,{idSchema:s,description:l.description||x.description,schema:x,uiSchema:a,registry:d}),t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},children:[o&&o.map(({key:b,...j})=>t.jsx(p,{...j},b)),e&&t.jsx(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},justifyContent:"flex-end",children:t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsx(T,{mt:2,children:t.jsx(y,{className:"array-item-add",onClick:m,disabled:n||u,uiSchema:a,registry:d})})})})]},`array-item-list-${s.$id}`)]})}function Qe(r){const{id:e,placeholder:n,required:s,readonly:a,disabled:o,type:m,label:u,value:d,onChange:c,onBlur:x,onFocus:i,autofocus:l,options:h,schema:p,uiSchema:f,rawErrors:y=[],formContext:b,registry:j,hideLabel:S,hideError:g,...C}=r,w=Fe(p,m,h),{step:I,min:R,max:V,...M}=w,$={...Array.isArray(p.examples)?{list:Z(e)}:void 0,...M,...I!==void 0?{step:I}:void 0,...R!==void 0?{min:R}:void 0,...V!==void 0?{max:V}:void 0},U=({target:{value:k}})=>c(k===""?h.emptyValue:k),N=({target:{value:k}})=>x(e,k),z=({target:{value:k}})=>i(e,k),{schemaUtils:q}=j,B=q.getDisplayLabel(p,f);return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{visuallyHidden:!B,htmlFor:e,children:u||p.title}),t.jsx(te,{id:e,name:e,placeholder:n,autoFocus:l,required:s,disabled:o||a,...$,value:d||d===0?d:"",validationStatus:y.length>0?"error":void 0,onChange:U,onBlur:N,onFocus:z,block:!0,...C,"aria-describedby":L(e,!!p.examples)}),Array.isArray(p.examples)&&t.jsx("datalist",{id:Z(e),children:p.examples.concat(p.default&&!p.examples.includes(p.default)?[p.default]:[]).map(k=>t.jsx("option",{value:k},k))})]})}function et(r){const{id:e,description:n}=r;return n?t.jsx(K,{id:e,as:"p",mt:1,children:n}):null}function tt({errors:r,registry:e}){const{translateString:n}=e;return t.jsx(T,{mb:3,sx:{borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:t.jsxs(T,{p:3,children:[t.jsx(T,{as:"h3",sx:{fontSize:3,fontWeight:"semibold",m:0},children:n(D.ErrorsLabel)}),t.jsx(t.Fragment,{children:r.map((s,a)=>t.jsx(he,{variant:"danger",sx:{marginTop:2},children:s.stack},a))})]})})}function P({color:r,title:e,icon:n,...s}){return r||(r="invisible"),t.jsx(ee,{variant:r,size:"small",icon:n,onClick:a=>a.preventDefault(),onSubmit:a=>a.preventDefault(),"aria-label":e,...s})}function rt(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.CopyButton),...r,icon:xe})}function nt(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.MoveDownButton),...r,icon:Pe})}function st(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.MoveUpButton),...r,icon:Ge})}function at(r){const{iconType:e,...n}=r,{registry:{translateString:s}}=n;return t.jsx(P,{title:s(D.RemoveButton),...n,icon:me})}function it(r){const{errors:e=[],idSchema:n}=r;if(e.length===0)return null;const s=ke(n);return t.jsx("div",{id:s,children:e.map((a,o)=>t.jsxs(K,{as:"p",mb:1,sx:{fontSize:"12px",display:"block",color:"danger.fg"},children:["•"," "+a]},o))})}function lt(r){const{idSchema:e,help:n}=r;if(!n)return null;const s=Be(e);return t.jsx(F.Caption,{id:s,children:n})}function ot(r){const{id:e,children:n,classNames:s,style:a,disabled:o,displayLabel:m,hidden:u,label:d,onDropPropertyClick:c,onKeyChange:x,readonly:i,required:l,rawErrors:h=[],errors:p,help:f,rawDescription:y,schema:b,uiSchema:j,registry:S}=r,g=X(j),C=A("WrapIfAdditionalTemplate",S,g);return u?t.jsx("div",{style:{display:"none"},children:n}):t.jsx(C,{classNames:s,style:a,disabled:o,id:e,label:d,onDropPropertyClick:c,onKeyChange:x,readonly:i,required:l,schema:b,uiSchema:j,registry:S,children:t.jsxs(F,{required:l,children:[t.jsx(F.Label,{visuallyHidden:!0}),n,m&&y?t.jsx(F.Caption,{id:e,children:y}):null,p,f]})})}function dt(r){const{description:e,title:n,properties:s,required:a,disabled:o,readonly:m,uiSchema:u,idSchema:d,schema:c,formData:x,onAddClick:i,registry:l}=r,h=X(u),p=A("TitleFieldTemplate",l,h),f=A("DescriptionFieldTemplate",l,h),{ButtonTemplates:{AddButton:y}}=l.templates;return t.jsxs(t.Fragment,{children:[(h.title||n)&&t.jsx(p,{id:ve(d),title:n,required:a,schema:c,uiSchema:u,registry:l}),(h.description||e)&&t.jsx(f,{id:we(d),description:h.description||e,schema:c,uiSchema:u,registry:l}),t.jsxs(T,{sx:{display:"flex",width:"100%",flexDirection:"column",flexFlow:"row wrap"},style:{marginTop:"10px"},children:[s.map((b,j)=>b.hidden?b.content:t.jsx(T,{sx:{flexBasis:"100%",flexGrow:0,maxWidth:"100%"},mb:1,children:b.content},j)),Ae(c,u,x)&&t.jsx(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},justifyContent:"flex-end",children:t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsx(y,{className:"object-property-expand",onClick:b=>{b.preventDefault(),i(c)()},disabled:o||m,uiSchema:u,registry:l})})})]})]})}function ct({uiSchema:r}){const{submitText:e,norender:n,props:s={}}=Ie(r);return n?null:t.jsx(T,{marginTop:2,children:t.jsx(re,{type:"submit",variant:"primary",...s,children:e})})}function ut({id:r,title:e}){return t.jsx(T,{id:r,my:2,children:t.jsx(T,{as:"h5",sx:{fontSize:1,fontWeight:"semibold",m:0,borderBottom:"1px solid",borderColor:"border.default",paddingBottom:1},children:e})})}function pt(r){const{children:e,classNames:n,style:s,disabled:a,id:o,label:m,onDropPropertyClick:u,onKeyChange:d,readonly:c,required:x,schema:i,uiSchema:l,registry:h}=r,{templates:p,translateString:f}=h,{RemoveButton:y}=p.ButtonTemplates,b=f(D.KeyLabel,[m]),j=De in i,S={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"};if(!j)return t.jsx("div",{className:n,style:s,children:e});const g=({target:C})=>d(C.value);return t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},alignItems:"center",className:n,style:s,children:[t.jsx(T,{pr:2,sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsxs(F,{id:`${o}-key`,required:x,children:[t.jsx(F.Label,{children:b}),t.jsx(te,{defaultValue:m,disabled:a||c,name:`${o}-key`,onBlur:c?void 0:g,type:"text",block:!0})]})}),t.jsx(T,{pr:2,sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:e}),t.jsx(T,{children:t.jsx(y,{iconType:"default",style:S,disabled:a||c,onClick:u(m),uiSchema:l,registry:h})})]},`${o}-key`)}function ht(){return{ArrayFieldItemTemplate:Je,ArrayFieldTemplate:Ze,BaseInputTemplate:Qe,ButtonTemplates:{AddButton:Ye,CopyButton:rt,MoveDownButton:nt,MoveUpButton:st,RemoveButton:at,SubmitButton:ct},DescriptionFieldTemplate:et,ErrorListTemplate:tt,FieldErrorTemplate:it,FieldHelpTemplate:lt,FieldTemplate:ot,ObjectFieldTemplate:dt,TitleFieldTemplate:ut,WrapIfAdditionalTemplate:pt}}function mt(r){const{schema:e,id:n,value:s,disabled:a,readonly:o,label:m,autofocus:u,onChange:d,onBlur:c,onFocus:x}=r,i=Le(e),l=({target:{checked:f}})=>d(f),h=({target:{value:f}})=>c(n,f),p=({target:{value:f}})=>x(n,f);return t.jsxs(F,{id:n,children:[t.jsx(H,{checked:typeof s>"u"?!1:!!s,required:i,disabled:a||o,autoFocus:u,onChange:l,onBlur:h,onFocus:p,"aria-describedby":L(n)}),t.jsx(F.Label,{children:m||""})]})}function xt({schema:r,label:e,id:n,disabled:s,options:a,value:o,autofocus:m,readonly:u,required:d,onChange:c,onBlur:x,onFocus:i}){const{enumOptions:l,enumDisabled:h,inline:p,emptyValue:f}=a,y=Array.isArray(o)?o:[o],b=g=>({target:{checked:C}})=>{c(C?Oe(g,y,l):Re(g,y,l))},j=({target:{value:g}})=>x(n,v(g,l,f)),S=({target:{value:g}})=>i(n,v(g,l,f));return t.jsxs(Q,{required:d,children:[t.jsx(Q.Label,{children:e||r.title}),Array.isArray(l)&&l.map((g,C)=>{const w=We(g.value,y),I=Array.isArray(h)&&h.indexOf(g.value)!==-1;return t.jsxs(F,{id:G(n,C),children:[t.jsx(H,{checked:w,disabled:s||I||u,autoFocus:m&&C===0,onChange:b(C),onBlur:j,onFocus:S,"aria-describedby":L(n)}),t.jsx(F.Label,{children:g.label})]},G(n,C))})]})}function ft(r){const{options:e,registry:n}=r,s=A("BaseInputTemplate",n,e);return t.jsx(s,{type:"date",InputLabelProps:{shrink:!0},...r})}function yt(r){const{options:e,registry:n}=r,s=A("BaseInputTemplate",n,e),a=Ve(r.value),o=m=>{r.onChange(_e(m))};return t.jsx(s,{type:"datetime-local",...r,value:a,onChange:o})}function gt({id:r,schema:e,options:n,value:s,required:a,disabled:o,readonly:m,label:u,onChange:d,onBlur:c,onFocus:x}){const{enumOptions:i,enumDisabled:l,emptyValue:h}=n,p=({target:{value:b}})=>d(v(b,i,h)),f=({target:{value:b}})=>c(r,v(b,i,h)),y=({target:{value:b}})=>x(r,v(b,i,h));return t.jsxs(Y,{name:r,required:a,children:[t.jsx(Y.Label,{children:u||e.title}),t.jsx(t.Fragment,{children:Array.isArray(i)&&i.map((b,j)=>{const S=Array.isArray(l)&&l.indexOf(b.value)!==-1;return t.jsxs(F,{id:G(r,j),children:[t.jsx(fe,{value:String(j),onChange:p,onBlur:f,onFocus:y,"aria-describedby":L(r),disabled:o||S||m},j),t.jsx(F.Label,{children:b.label})]},G(r,j))})})]})}function bt(r){const{value:e,readonly:n,disabled:s,options:a,schema:o,onChange:m,label:u,id:d}=r,c={value:e,label:u,id:d,name:d,...Ee(o)},x=i=>{m(i??a.emptyValue)};return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{htmlFor:d,children:u||o.title}),t.jsx(Ke,{disabled:s||n,onChange:x,...c,"aria-describedby":L(d)})]})}function jt({schema:r,id:e,options:n,label:s,required:a,disabled:o,placeholder:m,readonly:u,value:d,multiple:c,autofocus:x,onChange:i,onBlur:l,onFocus:h,rawErrors:p=[],registry:f,uiSchema:y,hideError:b,formContext:j,...S}){const{enumOptions:g,enumDisabled:C,emptyValue:w}=n,[I,R]=E.useState(!1);c=typeof c>"u"?!1:!!c;const V=c?[]:"",M=typeof d>"u"||c&&d.length<1||!c&&d===V,$=g?.map(({value:B,label:k},W)=>{const _=Array.isArray(C)&&C.indexOf(B)!==-1;return{text:k,id:W,disabled:_}}),U=({target:{value:B}})=>i(v(B,g,w)),N=({target:{value:B}})=>l(e,v(B,g,w)),z=({target:{value:B}})=>h(e,v(B,g,w)),q=$e(d,g,c);return t.jsxs(F,{id:e,required:a,children:[t.jsx(F.Label,{visuallyHidden:!(s||r.title),htmlFor:e,children:s||r.title}),c&&Array.isArray(g)?t.jsx(ye,{placeholderText:(s||r.title)??"",renderAnchor:({children:B,"aria-labelledby":k,...W})=>t.jsx(re,{trailingAction:ge,"aria-labelledby":` ${k}`,...W,onClick:_=>{R(!I),_.preventDefault()},children:B||`Select ${s||r.title}`}),open:I,onOpenChange:R,items:$??[],selected:($??[]).filter((B,k)=>q?.includes(String(k))),onSelectedChange:B=>{i(v(B.map(k=>k.id),g,w))},onFilterChange:()=>null,overlayProps:{width:"small"}}):t.jsx(J,{name:e,value:M?V:q,disabled:o||u,autoFocus:x,placeholder:s||r.title,validationStatus:p.length>0?"error":void 0,onChange:U,onBlur:N,onFocus:z,defaultValue:void 0,...S,"aria-describedby":L(e),children:Array.isArray(g)&&g.map(({value:B,label:k},W)=>{const _=Array.isArray(C)&&C.indexOf(B)!==-1;return t.jsx(J.Option,{value:String(W),disabled:_,children:k},W)})})]})}function Ct({id:r,placeholder:e,value:n,label:s,disabled:a,autofocus:o,readonly:m,onBlur:u,onFocus:d,onChange:c,options:x,schema:i,uiSchema:l,required:h,rawErrors:p=[],registry:f}){const{schemaUtils:y}=f,b=y.getDisplayLabel(i,l)&&(!!s||!!i.title),j=({target:{value:C}})=>c(C===""?x.emptyValue:C),S=({target:{value:C}})=>u(r,C),g=({target:{value:C}})=>d(r,C);return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{visuallyHidden:!b,htmlFor:r,children:s||i.title}),t.jsx(be,{id:r,name:r,value:n??"",placeholder:e,autoFocus:o,required:h,disabled:a||m,validationStatus:p.length>0?"error":void 0,onChange:j,onBlur:S,onFocus:g,block:!0,"aria-describedby":L(r)})]})}function Tt(){return{CheckboxWidget:mt,CheckboxesWidget:xt,DateWidget:ft,DateTimeWidget:yt,RadioWidget:gt,RangeWidget:bt,SelectWidget:jt,TextareaWidget:Ct}}function St(){return{templates:ht(),widgets:Tt()}}function Ft(){return Xe(St())}const kt=Ft();function Bt({id:r,value:e,label:n,disabled:s,readonly:a,onChange:o}){return t.jsxs(Ce,{display:"flex",flexDirection:"column",gap:1,children:[t.jsx(K,{as:"span",id:`${r}-label`,sx:{fontWeight:"semibold"},children:n}),t.jsx(Te,{size:"small","aria-labelledby":`${r}-label`,checked:!!e,disabled:s||a,onClick:()=>o(!e)})]})}function vt({id:r,value:e,label:n,disabled:s,readonly:a,placeholder:o,onChange:m}){const u=Array.isArray(e)?e.map(String):[],[d,c]=E.useState(""),x=()=>{const i=d.trim();i&&!u.includes(i)&&m([...u,i]),c("")};return t.jsxs(F,{id:r,disabled:s||a,children:[t.jsx(F.Label,{children:n}),t.jsx(je,{block:!0,placeholder:o,tokens:u.map((i,l)=>({id:l,text:i})),value:d,onChange:i=>c(i.target.value.replace(",","")),onKeyDown:i=>{(i.key==="Enter"||i.key===",")&&(i.preventDefault(),x())},onBlur:x,onTokenRemove:i=>{m(u.filter((l,h)=>h!==i))}})]})}const wt={switch:Bt,tags:vt};function qt(r){return t.jsx(kt,{...r,widgets:wt,validator:qe})}export{qt as default};
@@ -84,4 +84,4 @@ ${n.text.slice(ie.selectionEnd)}`)}else R.key==="Enter"?(R.preventDefault(),xt({
84
84
  grid full ${o.gridFull} · partial ${o.gridPartial} · blits ${o.blits} · overlay ${o.overlay}
85
85
  painted ${o.cells} cells, ${o.texts} texts
86
86
  text cache ${s.size} · hit ${i} %
87
- cells ${r.cells.toLocaleString()} · chunks ${r.chunks} · strings ${r.strings} · styles ${r.styles}`})}const rm="@datalayer/cells-charts",dm=ha({name:rm,displayName:"Cells charts",description:"Column, bar, line, area, pie, scatter and combo charts, drawn with Apache ECharts.",octicon:"graph",activationEvents:[fs(jr),fs(Br)],load:()=>Ri(()=>import("./plugin-Bvp_HQZg.js"),[],import.meta.url)});function mm(t){const{sheets:e,active:n,add:o,rename:r,move:s,remove:i,activate:a}=Hf(),[l,c]=k.useState(null),[u,h]=k.useState(""),d=k.useRef(new Map),f=()=>{if(l===null)return;const y=r(l.id,l.name.trim());y.ok?(c(null),h("")):h(y.refusals.map(x=>x.message).join(" "))},m=(y,x)=>{const $=e.length,A=y.key==="ArrowRight"?(x+1)%$:y.key==="ArrowLeft"?(x+$-1)%$:y.key==="Home"?0:y.key==="End"?$-1:void 0;A!==void 0?(y.preventDefault(),a(e[A].id),d.current.get(e[A].id)?.focus()):y.key==="F2"&&(y.preventDefault(),c({id:e[x].id,name:e[x].name}))},g=e.findIndex(y=>y.id===n),w=e[g];return C.jsxs("div",{"data-cells-sheet-tabs":"",style:{display:"flex",alignItems:"center",gap:4,padding:4},children:[C.jsx("div",{role:"tablist","aria-label":t["aria-label"]??"Sheets",style:{display:"flex",gap:2},children:e.map((y,x)=>{const $=y.id===n;return C.jsx("button",{ref:A=>{d.current.set(y.id,A)},role:"tab",type:"button","aria-selected":$,tabIndex:$?0:-1,onClick:()=>a(y.id),onDoubleClick:()=>c({id:y.id,name:y.name}),onKeyDown:A=>m(A,x),style:{padding:"2px 10px",border:"1px solid var(--borderColor-muted, #d0d7de)",borderBottom:$?"2px solid var(--borderColor-accent-emphasis, #0969da)":void 0,background:$?"var(--bgColor-default, #fff)":"var(--bgColor-muted, #f6f8fa)",color:"var(--fgColor-default, #1f2328)",fontWeight:$?600:400,cursor:"pointer"},children:y.name},y.id)})}),l!==null&&C.jsx(fa,{"aria-label":`Rename ${e.find(y=>y.id===l.id)?.name??""}`,size:"small",autoFocus:!0,value:l.name,onChange:y=>c({id:l.id,name:y.target.value}),onBlur:f,onKeyDown:y=>{y.key==="Enter"?(y.preventDefault(),f()):y.key==="Escape"&&(c(null),h(""))}}),C.jsx(ds,{icon:da,"aria-label":"Add a sheet",size:"small",variant:"invisible",onClick:()=>{const y=o();y.ok||h(y.refusals.map(x=>x.message).join(" "))}}),w!==void 0&&C.jsxs(Uo,{children:[C.jsx(Uo.Anchor,{children:C.jsx(ds,{icon:ma,"aria-label":`More for ${w.name}`,size:"small",variant:"invisible"})}),C.jsx(Uo.Overlay,{children:C.jsxs(Be,{children:[C.jsx(Be.Item,{onSelect:()=>c({id:w.id,name:w.name}),children:"Rename"}),C.jsx(Be.Item,{disabled:g===0,onSelect:()=>s(w.id,g-1),children:"Move left"}),C.jsx(Be.Item,{disabled:g===e.length-1,onSelect:()=>s(w.id,g+1),children:"Move right"}),C.jsx(Be.Divider,{}),C.jsx(Be.Item,{variant:"danger",disabled:e.length===1,onSelect:()=>{const y=i(w.id);y.ok||h(y.refusals.map(x=>x.message).join(" "))},children:"Delete"})]})})]}),u&&C.jsx("span",{role:"alert",style:{color:"var(--fgColor-danger, #d1242f)"},children:u})]})}export{Yi as A,im as B,po as C,dr as D,Hi as E,fm as S,am as a,cm as b,Ye as c,Bf as d,_f as e,um as f,hm as g,lm as h,j as i,Pf as j,mm as k,If as l,dm as m,Jt as n,jr as o,Br as p,qi as q,Cn as r,Wr as s,Or as t,yt as u,Li as v,hc as w,Yh as x,fr as y,Oe as z};
87
+ cells ${r.cells.toLocaleString()} · chunks ${r.chunks} · strings ${r.strings} · styles ${r.styles}`})}const rm="@datalayer/cells-charts",dm=ha({name:rm,displayName:"Cells charts",description:"Column, bar, line, area, pie, scatter and combo charts, drawn with Apache ECharts.",octicon:"graph",activationEvents:[fs(jr),fs(Br)],load:()=>Ri(()=>import("./plugin-m2JrXH0S.js"),[],import.meta.url)});function mm(t){const{sheets:e,active:n,add:o,rename:r,move:s,remove:i,activate:a}=Hf(),[l,c]=k.useState(null),[u,h]=k.useState(""),d=k.useRef(new Map),f=()=>{if(l===null)return;const y=r(l.id,l.name.trim());y.ok?(c(null),h("")):h(y.refusals.map(x=>x.message).join(" "))},m=(y,x)=>{const $=e.length,A=y.key==="ArrowRight"?(x+1)%$:y.key==="ArrowLeft"?(x+$-1)%$:y.key==="Home"?0:y.key==="End"?$-1:void 0;A!==void 0?(y.preventDefault(),a(e[A].id),d.current.get(e[A].id)?.focus()):y.key==="F2"&&(y.preventDefault(),c({id:e[x].id,name:e[x].name}))},g=e.findIndex(y=>y.id===n),w=e[g];return C.jsxs("div",{"data-cells-sheet-tabs":"",style:{display:"flex",alignItems:"center",gap:4,padding:4},children:[C.jsx("div",{role:"tablist","aria-label":t["aria-label"]??"Sheets",style:{display:"flex",gap:2},children:e.map((y,x)=>{const $=y.id===n;return C.jsx("button",{ref:A=>{d.current.set(y.id,A)},role:"tab",type:"button","aria-selected":$,tabIndex:$?0:-1,onClick:()=>a(y.id),onDoubleClick:()=>c({id:y.id,name:y.name}),onKeyDown:A=>m(A,x),style:{padding:"2px 10px",border:"1px solid var(--borderColor-muted, #d0d7de)",borderBottom:$?"2px solid var(--borderColor-accent-emphasis, #0969da)":void 0,background:$?"var(--bgColor-default, #fff)":"var(--bgColor-muted, #f6f8fa)",color:"var(--fgColor-default, #1f2328)",fontWeight:$?600:400,cursor:"pointer"},children:y.name},y.id)})}),l!==null&&C.jsx(fa,{"aria-label":`Rename ${e.find(y=>y.id===l.id)?.name??""}`,size:"small",autoFocus:!0,value:l.name,onChange:y=>c({id:l.id,name:y.target.value}),onBlur:f,onKeyDown:y=>{y.key==="Enter"?(y.preventDefault(),f()):y.key==="Escape"&&(c(null),h(""))}}),C.jsx(ds,{icon:da,"aria-label":"Add a sheet",size:"small",variant:"invisible",onClick:()=>{const y=o();y.ok||h(y.refusals.map(x=>x.message).join(" "))}}),w!==void 0&&C.jsxs(Uo,{children:[C.jsx(Uo.Anchor,{children:C.jsx(ds,{icon:ma,"aria-label":`More for ${w.name}`,size:"small",variant:"invisible"})}),C.jsx(Uo.Overlay,{children:C.jsxs(Be,{children:[C.jsx(Be.Item,{onSelect:()=>c({id:w.id,name:w.name}),children:"Rename"}),C.jsx(Be.Item,{disabled:g===0,onSelect:()=>s(w.id,g-1),children:"Move left"}),C.jsx(Be.Item,{disabled:g===e.length-1,onSelect:()=>s(w.id,g+1),children:"Move right"}),C.jsx(Be.Divider,{}),C.jsx(Be.Item,{variant:"danger",disabled:e.length===1,onSelect:()=>{const y=i(w.id);y.ok||h(y.refusals.map(x=>x.message).join(" "))},children:"Delete"})]})})]}),u&&C.jsx("span",{role:"alert",style:{color:"var(--fgColor-danger, #d1242f)"},children:u})]})}export{Yi as A,im as B,po as C,dr as D,Hi as E,fm as S,am as a,cm as b,Ye as c,Bf as d,_f as e,um as f,hm as g,lm as h,j as i,Pf as j,mm as k,If as l,dm as m,Jt as n,jr as o,Br as p,qi as q,Cn as r,Wr as s,Or as t,yt as u,Li as v,hc as w,Yh as x,fr as y,Oe as z};