@marimo-team/frontend 0.23.7-dev15 → 0.23.7-dev17

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 (159) hide show
  1. package/dist/assets/{CellStatus-CN4mKUXv.js → CellStatus-Cb08qBNj.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-DeBM0cl9.js → ConnectedDataExplorerComponent-BEDxXsa0.js} +1 -1
  3. package/dist/assets/{ErrorBoundary-DzYV_VeY.js → ErrorBoundary-DyYDV0HI.js} +1 -1
  4. package/dist/assets/{ImperativeModal-D7lQ0Q7_.js → ImperativeModal-CvOOClOZ.js} +1 -1
  5. package/dist/assets/{JsonOutput-B0sjIMBK.js → JsonOutput-BqavrgK2.js} +11 -11
  6. package/dist/assets/{LazyAnyLanguageCodeMirror-pAFdCqyC.js → LazyAnyLanguageCodeMirror-CXbgDeVw.js} +2 -2
  7. package/dist/assets/{MarimoErrorOutput-ClA7EZGX.js → MarimoErrorOutput-DyaTrW3L.js} +2 -2
  8. package/dist/assets/{RSPContexts-CINae4Gg.js → RSPContexts-eRifaAal.js} +1 -1
  9. package/dist/assets/{RenderHTML-CruxVneu.js → RenderHTML-CvnUbELu.js} +1 -1
  10. package/dist/assets/{RunButton-CJsJsGj-.js → RunButton-Cw4OpYze.js} +1 -1
  11. package/dist/assets/{add-cell-with-ai-C7f_bUyB.js → add-cell-with-ai-CsUwlDQR.js} +16 -16
  12. package/dist/assets/{add-connection-dialog-DSOgwTlO.js → add-connection-dialog-B00bTtAj.js} +1 -1
  13. package/dist/assets/{agent-panel-CeDyKw1_.js → agent-panel-vnhI1dDS.js} +3 -3
  14. package/dist/assets/{ai-model-dropdown-kQdQhWyz.js → ai-model-dropdown-E3o7Xd1q.js} +4 -4
  15. package/dist/assets/{alert-dialog-BGBdrcqJ.js → alert-dialog-BqFLkbUc.js} +1 -1
  16. package/dist/assets/{any-language-editor-CwwS-naY.js → any-language-editor-Bu4hSl-d.js} +1 -1
  17. package/dist/assets/{app-config-button-dnmk7p6n.js → app-config-button-DTjn2zGb.js} +1 -1
  18. package/dist/assets/{button-D9nb17Rw.js → button-BbCh-29a.js} +1 -1
  19. package/dist/assets/{cache-panel-DDJqyuAl.js → cache-panel-VFeeaT52.js} +1 -1
  20. package/dist/assets/{capabilities-C_FLIcjP.js → capabilities-A_KhFcGV.js} +1 -1
  21. package/dist/assets/cell-editor-C41pv5M8.js +20 -0
  22. package/dist/assets/cell-link-sLKimSIQ.js +1 -0
  23. package/dist/assets/{cells-BBDzmUIS.js → cells-Vnv1zw09.js} +71 -71
  24. package/dist/assets/{chat-display-Ct3Me0kL.js → chat-display-sbJsmezM.js} +1 -1
  25. package/dist/assets/{chat-panel-CXvtUFUU.js → chat-panel-DFLJ558d.js} +1 -1
  26. package/dist/assets/{chat-ui-UFERs8Gx.js → chat-ui-BWV8p_Y-.js} +1 -1
  27. package/dist/assets/{column-preview-Xuel1zsI.js → column-preview-DYtdLerF.js} +1 -1
  28. package/dist/assets/{command-CBCkexpx.js → command-OHlV5HHD.js} +1 -1
  29. package/dist/assets/{command-palette-DuPUk7of.js → command-palette-CvoYeZJD.js} +1 -1
  30. package/dist/assets/{common-Dk5VdfJt.js → common-BhQv6499.js} +1 -1
  31. package/dist/assets/{components-CTKNCmC_.js → components-BA-LgiMU.js} +1 -1
  32. package/dist/assets/{components-DsoH1pO3.js → components-c7ywwQgj.js} +1 -1
  33. package/dist/assets/{config-CPqw1wUv.js → config-CeTe6Mau.js} +1 -1
  34. package/dist/assets/{copy-BCF-tANo.js → copy-DqHGjTAN.js} +1 -1
  35. package/dist/assets/{copy-icon-BYNydU7b.js → copy-icon-8abB4Lgh.js} +1 -1
  36. package/dist/assets/{createReducer-1ePoj7v6.js → createReducer-CI9qeK_X.js} +1 -1
  37. package/dist/assets/{datasource-CmTCEk66.js → datasource-BGeucDqU.js} +2 -2
  38. package/dist/assets/{dates-CAlnO9QB.js → dates-orWokFRU.js} +1 -1
  39. package/dist/assets/{dependency-graph-panel-0u1-ZaOT.js → dependency-graph-panel-Dm8aJtqe.js} +4 -4
  40. package/dist/assets/{dialog-Dj0qTFnG.js → dialog-DBzaWZPw.js} +1 -1
  41. package/dist/assets/{dist-BoOh2kN5.js → dist-BdyjRhEt.js} +1 -1
  42. package/dist/assets/documentation-panel-BmTIHvGw.js +1 -0
  43. package/dist/assets/{download-QGh9oR1D.js → download-CHV3J2Ib.js} +4 -4
  44. package/dist/assets/{dropdown-menu-D1A3cFC8.js → dropdown-menu-CR7cnzLX.js} +1 -1
  45. package/dist/assets/{edit-page-hJAbnd__.js → edit-page-Dvj9-hG8.js} +6 -6
  46. package/dist/assets/{error-banner-C10O4l3y.js → error-banner-JKAA0BVv.js} +1 -1
  47. package/dist/assets/{error-panel-ChlzbfWg.js → error-panel-yG2LOaXm.js} +1 -1
  48. package/dist/assets/{es-DaYh1PsD.js → es-CaLpD1T5.js} +1 -1
  49. package/dist/assets/{field-BrLPDxsA.js → field-CD7Io4xo.js} +1 -1
  50. package/dist/assets/{file-explorer-panel-8dWLD2PY.js → file-explorer-panel-Bsp9TexR.js} +3 -3
  51. package/dist/assets/{file-icons-Cs4oXsAy.js → file-icons-Cisq31t9.js} +1 -1
  52. package/dist/assets/{file-name-input-g7pBBCjk.js → file-name-input-Dti85i-l.js} +1 -1
  53. package/dist/assets/{floating-outline-CFUSr2du.js → floating-outline-CnVsBFJf.js} +1 -1
  54. package/dist/assets/{focus-J47a1GCq.js → focus-bWAnl_NC.js} +1 -1
  55. package/dist/assets/{form-CdFqEqTA.js → form-iTIO7T75.js} +2 -2
  56. package/dist/assets/{formats-Dsc8AdCp.js → formats-D4Sso5bX.js} +1 -1
  57. package/dist/assets/{formatting-Chn6WhRe.js → formatting-BDxRugYY.js} +1 -1
  58. package/dist/assets/{fullscreen-BDxedMYP.js → fullscreen-eipL3i3Y.js} +1 -1
  59. package/dist/assets/{gallery-page-TIWZFnOT.js → gallery-page-DDCU0YEU.js} +1 -1
  60. package/dist/assets/{glide-data-editor-ChlIFl33.js → glide-data-editor-BELaKoS9.js} +1 -1
  61. package/dist/assets/{globals-DUw71mRV.js → globals-B64vMQ0L.js} +1 -1
  62. package/dist/assets/{home-page-HhJfA35e.js → home-page-CSSZCATB.js} +1 -1
  63. package/dist/assets/{hooks-DbPDczTe.js → hooks-CxyxjDM-.js} +1 -1
  64. package/dist/assets/{html-to-image-CAiN3VHj.js → html-to-image-WbbYaIba.js} +2 -2
  65. package/dist/assets/{index-BbBhLC0d.css → index-BcFmKehD.css} +1 -1
  66. package/dist/assets/{index-CH2ZE_q-.js → index-BmG6rFrZ.js} +7 -7
  67. package/dist/assets/{input-BX98vgAu.js → input-DW6LU13i.js} +1 -1
  68. package/dist/assets/kiosk-mode-DPxzN-M0.js +1 -0
  69. package/dist/assets/{label-DTR8T0AE.js → label-xHqFtfdz.js} +1 -1
  70. package/dist/assets/{layout-C1dvirgi.js → layout-B3ilKFRj.js} +5 -5
  71. package/dist/assets/{links-BhX7oUFH.js → links-Bi_gi3iZ.js} +1 -1
  72. package/dist/assets/{logs-panel-B2tW94um.js → logs-panel-7jkC5Vwq.js} +1 -1
  73. package/dist/assets/{maps-C48Oksn0.js → maps-BS8Ra-JU.js} +1 -1
  74. package/dist/assets/{markdown-renderer-CVd_mMPt.js → markdown-renderer-CXVa5ubo.js} +2 -2
  75. package/dist/assets/{menu-items-CwUpDHG7.js → menu-items-DcP01QzW.js} +1 -1
  76. package/dist/assets/{mermaid-ByDNZESx.js → mermaid-B6II7_1_.js} +1 -1
  77. package/dist/assets/{multi-map-rafH3cg3.js → multi-map-CUuNtzHt.js} +1 -1
  78. package/dist/assets/{name-cell-input-DDQOQSsh.js → name-cell-input-DP5q5hou.js} +1 -1
  79. package/dist/assets/{numbers-CAW8yjzj.js → numbers-etj36G80.js} +1 -1
  80. package/dist/assets/{outline-panel-BuTQis3o.js → outline-panel-CAMKZApa.js} +1 -1
  81. package/dist/assets/{packages-panel-CVu8Cpkz.js → packages-panel-BqWdwyLN.js} +1 -1
  82. package/dist/assets/{panels-Z5fVmDRY.js → panels-BaOloRiT.js} +1 -1
  83. package/dist/assets/{popover-UExmgBsf.js → popover-Bz_0Vkyf.js} +1 -1
  84. package/dist/assets/process-output-3R47GJ28.js +1 -0
  85. package/dist/assets/{radio-group-CpHTexlq.js → radio-group-BdIsm_qJ.js} +1 -1
  86. package/dist/assets/{readonly-python-code-DOXF2p8K.js → readonly-python-code-Dz8x4isw.js} +1 -1
  87. package/dist/assets/{renderShortcut-Bfk4NjRL.js → renderShortcut-D_8sQXCD.js} +1 -1
  88. package/dist/assets/{reveal-component-DLRiYfBj.js → reveal-component-BomJwrt3.js} +2 -2
  89. package/dist/assets/{run-page-DDMPBh9O.js → run-page-DOVpxgC2.js} +1 -1
  90. package/dist/assets/{runs-DRld30N_.js → runs-D87fZMlB.js} +1 -1
  91. package/dist/assets/scratchpad-panel-CK721GBB.js +1 -0
  92. package/dist/assets/{secrets-panel-B8CbRNMo.js → secrets-panel-DgXG36fa.js} +1 -1
  93. package/dist/assets/{select-5i7URBEn.js → select-DZcFyKFQ.js} +1 -1
  94. package/dist/assets/{session-VtovaFBS.js → session-gB-8RZAq.js} +1 -1
  95. package/dist/assets/{session-panel-DHfR6tDv.js → session-panel-_DOPOxmi.js} +1 -1
  96. package/dist/assets/{share-CqnSBwZy.js → share-DdpVbvDN.js} +1 -1
  97. package/dist/assets/{snippets-panel-CGs_ME5h.js → snippets-panel-CtEyZp6T.js} +1 -1
  98. package/dist/assets/{spec-Cq8FVoTf.js → spec-ByOlaO3e.js} +1 -1
  99. package/dist/assets/{state-B34hXjp9.js → state-BNbY1nER.js} +1 -1
  100. package/dist/assets/{state-BV_qjCwT.js → state-BmNumiqM.js} +1 -1
  101. package/dist/assets/{state-xEqF8Q3P.js → state-CZ60VH86.js} +3 -3
  102. package/dist/assets/{state-DzJiyfWW.js → state-DujssAPg.js} +1 -1
  103. package/dist/assets/{strings-md4mFbOQ.js → strings-wdPMRf6Z.js} +1 -1
  104. package/dist/assets/{swiper-component-CBSZ9l9W.js → swiper-component-B1e0X8Wt.js} +1 -1
  105. package/dist/assets/{switch-BvybnC9P.js → switch-BT9Ki10B.js} +1 -1
  106. package/dist/assets/{terminal-bb566dQu.js → terminal-G4Y2HQik.js} +1 -1
  107. package/dist/assets/{textarea-bAp21zYj.js → textarea-CUCKX5FP.js} +1 -1
  108. package/dist/assets/{tooltip-Gcwqb_SK.js → tooltip-DTV9tlSr.js} +1 -1
  109. package/dist/assets/{tracing-HakOQiQR.js → tracing-B84tRfOs.js} +1 -1
  110. package/dist/assets/{tracing-panel-eas_Nc-b.js → tracing-panel-Cv--myyS.js} +2 -2
  111. package/dist/assets/{tree-actions-Ci3CV3hN.js → tree-actions-Bzr5XDGx.js} +1 -1
  112. package/dist/assets/{useBoolean-xXcxYCaI.js → useBoolean-BYUGB06y.js} +1 -1
  113. package/dist/assets/useCellActionButton-Mkc0xJ7L.js +1 -0
  114. package/dist/assets/{useDeleteCell-GFhvGBJ7.js → useDeleteCell-C67FKMcv.js} +1 -1
  115. package/dist/assets/{useDependencyPanelTab-DHd7_0b9.js → useDependencyPanelTab-BdgKnqQ5.js} +1 -1
  116. package/dist/assets/{useEventListener-BR0C1MaI.js → useEventListener-DvoEXWke.js} +1 -1
  117. package/dist/assets/{useHotkey-DccKPSPx.js → useHotkey-3DXVR1KZ.js} +1 -1
  118. package/dist/assets/{useIframeCapabilities-BvE4n6hj.js → useIframeCapabilities-BfimgBBe.js} +1 -1
  119. package/dist/assets/{useInstallPackage-D0NLybAx.js → useInstallPackage-CScpUItd.js} +1 -1
  120. package/dist/assets/{useInterval-CvFz96h2.js → useInterval-CAy_JAzY.js} +1 -1
  121. package/dist/assets/useNotebookActions-C_PqW3GC.js +1 -0
  122. package/dist/assets/useRunCells-C991pS4a.js +1 -0
  123. package/dist/assets/useSplitCell-FJGXiUyn.js +1 -0
  124. package/dist/assets/{useTheme-DFXuDFj9.js → useTheme-DyLIIrGi.js} +1 -1
  125. package/dist/assets/{utils-CGtUbqcR.js → utils-441jgnV8.js} +1 -1
  126. package/dist/assets/{utils-BrXijSdZ.js → utils-Wvjk_Y4h.js} +1 -1
  127. package/dist/assets/{vega-component-Bq0lrkG7.js → vega-component-2S2ePGs4.js} +1 -1
  128. package/dist/assets/{write-secret-modal-D8Sww7eA.js → write-secret-modal-BcEaI0rD.js} +1 -1
  129. package/dist/index.html +68 -68
  130. package/package.json +1 -1
  131. package/src/components/editor/actions/useNotebookActions.tsx +3 -1
  132. package/src/components/editor/controls/Controls.tsx +3 -1
  133. package/src/components/editor/navigation/__tests__/clipboard.test.ts +107 -0
  134. package/src/components/editor/navigation/__tests__/navigation.test.ts +70 -0
  135. package/src/components/editor/navigation/clipboard.ts +101 -23
  136. package/src/components/editor/navigation/navigation.ts +15 -1
  137. package/src/components/editor/notebook-cell.tsx +3 -0
  138. package/src/components/pages/run-page.tsx +4 -1
  139. package/src/core/cells/__tests__/cells.test.ts +187 -0
  140. package/src/core/cells/__tests__/pending-cut-service.test.tsx +145 -0
  141. package/src/core/cells/cells.ts +102 -17
  142. package/src/core/cells/document-changes.ts +6 -1
  143. package/src/core/cells/pending-cut-service.ts +64 -0
  144. package/src/core/cells/utils.ts +11 -0
  145. package/src/core/codemirror/cells/extensions.ts +10 -0
  146. package/src/core/hotkeys/hotkeys.ts +5 -0
  147. package/src/css/app/Cell.css +13 -0
  148. package/src/utils/__tests__/id-tree.test.ts +71 -0
  149. package/src/utils/id-tree.tsx +89 -0
  150. package/dist/assets/cell-editor-BN3D1_w1.js +0 -22
  151. package/dist/assets/cell-link-DqiCeeeS.js +0 -1
  152. package/dist/assets/documentation-panel-CcE7aGO9.js +0 -1
  153. package/dist/assets/kiosk-mode-Cr9yyT7A.js +0 -1
  154. package/dist/assets/process-output-DSqjZYr-.js +0 -1
  155. package/dist/assets/scratchpad-panel-CUMSD7sH.js +0 -1
  156. package/dist/assets/useCellActionButton-CHLJURZ7.js +0 -1
  157. package/dist/assets/useNotebookActions-CZ7s2FNR.js +0 -1
  158. package/dist/assets/useRunCells-RJeImyCn.js +0 -1
  159. package/dist/assets/useSplitCell-BRZ3fmLD.js +0 -1
@@ -1 +0,0 @@
1
- import{s as ae}from"./chunk-LvLJmgfZ.js";import{d as ie,u as b}from"./useEvent-D91BmmQi.js";import{Bn as de,E as ne,Mi as se,Ot as F,fr as re,gr as ce,mr as he,ot as me,pr as pe,qn as ke,v as fe,zn as ue}from"./cells-BBDzmUIS.js";import{t as ye}from"./compiler-runtime-B3qBwwSJ.js";import{a as be,o as xe,r as je}from"./utils-BrXijSdZ.js";import{t as ve}from"./jsx-runtime-BqBOg78p.js";import{t as Ce}from"./label-DTR8T0AE.js";import{a as ge,h as we}from"./download-QGh9oR1D.js";import{r as ze}from"./requests-DIwGYs0l.js";import{t as f}from"./createLucideIcon-D5guW7EU.js";import{n as Q,r as V}from"./x-C-6liIBr.js";import{t as Ie}from"./chevron-right-CG5QYXYk.js";import{t as G}from"./circle-plus-BdiiIXu5.js";import{t as We}from"./code-xml-CZN6vNxu.js";import{t as Me}from"./eye-off-n1Li95bE.js";import{t as _e}from"./image-DQHXdEQn.js";import{t as Se}from"./link-CfEtM3Rl.js";import{t as Ae}from"./play-C7DcCsoO.js";import{t as Te}from"./sparkles-CZ5WmLPA.js";import{t as Be}from"./trash-2-CKlZA04n.js";import{t as De}from"./use-toast-T0_cQDma.js";import{n as Ee}from"./copy-BCF-tANo.js";import{i as Ne}from"./useRunCells-RJeImyCn.js";import{a as Re,c as qe,n as He}from"./dialog-Dj0qTFnG.js";import{n as Le}from"./ImperativeModal-D7lQ0Q7_.js";import{n as Oe}from"./state-DzJiyfWW.js";import{r as K}from"./html-to-image-CAiN3VHj.js";import{n as Pe,t as Ue}from"./icons-D9TuFTJG.js";import{t as Fe}from"./useDeleteCell-GFhvGBJ7.js";import{n as Y}from"./name-cell-input-DDQOQSsh.js";import{t as $}from"./multi-icon-BvuxcR2m.js";import{t as Qe}from"./useSplitCell-BRZ3fmLD.js";var J=f("chevrons-down",[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]]),X=f("chevrons-up",[["path",{d:"m17 11-5-5-5 5",key:"e8nh98"}],["path",{d:"m17 18-5-5-5 5",key:"2avn1x"}]]),Z=f("scissors",[["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M8.12 8.12 12 12",key:"1alkpv"}],["path",{d:"M20 4 8.12 15.88",key:"xgtan2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M14.8 14.8 20 20",key:"ptml3r"}]]),Ve=f("text-cursor-input",[["path",{d:"M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6",key:"1528k5"}],["path",{d:"M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7",key:"13ksps"}],["path",{d:"M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1",key:"1n9rhb"}],["path",{d:"M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1",key:"1mj8rg"}],["path",{d:"M9 6v12",key:"velyjx"}]]),ee=f("zap-off",[["path",{d:"M10.513 4.856 13.12 2.17a.5.5 0 0 1 .86.46l-1.377 4.317",key:"193nxd"}],["path",{d:"M15.656 10H20a1 1 0 0 1 .78 1.63l-1.72 1.773",key:"27a7lr"}],["path",{d:"M16.273 16.273 10.88 21.83a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14H4a1 1 0 0 1-.78-1.63l4.507-4.643",key:"1e0qe9"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),le=f("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);function Ge(a){let e=new URL(window.location.href);return e.hash=`scrollTo=${encodeURIComponent(a)}`,e.toString()}function Ke(a){var c;let e=(c=a.match(/scrollTo=([^&]+)/))==null?void 0:c[1];return e?decodeURIComponent(e.split("&")[0]):null}function te(a){return a==="_"?!1:!!(a&&a.trim().length>0)}var Ye=ye(),l=ae(ve(),1);function $e(a){let e=(0,Ye.c)(47),{cell:c,closePopover:u}=a,{createNewCell:m,updateCellConfig:s,updateCellName:x,moveCell:p,sendToTop:W,sendToBottom:M,addColumnBreakpoint:_,clearCellOutput:S,markUntouched:A}=ne(),T=Qe(),B=Ne(c==null?void 0:c.cellId),D=!b(fe),E=Fe(),{openModal:j}=Le(),N=ie(Oe),R=b(je),v=b(xe),oe=b(me),y=b(be),{saveCellConfig:r}=ze();if(!c||oe){let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=[],e[0]=t):t=e[0],t}let{cellId:o,config:i,getEditorView:n,name:h,hasOutput:C,hasConsoleOutput:q,status:H}=c,g;e[1]!==o||e[2]!==i.disabled||e[3]!==r||e[4]!==s?(g=async()=>{let t={disabled:!i.disabled};await r({configs:{[o]:t}}),s({cellId:o,config:t})},e[1]=o,e[2]=i.disabled,e[3]=r,e[4]=s,e[5]=g):g=e[5];let L=g,w;e[6]!==o||e[7]!==i.hide_code||e[8]!==n||e[9]!==r||e[10]!==s?(w=async()=>{let t={hide_code:!i.hide_code};await r({configs:{[o]:t}}),s({cellId:o,config:t});let U=n();U&&(t.hide_code?U.contentDOM.blur():U.focus())},e[6]=o,e[7]=i.hide_code,e[8]=n,e[9]=r,e[10]=s,e[11]=w):w=e[11];let O=w,d=o===se,z;e[12]===Symbol.for("react.memo_cache_sentinel")?(z=(0,l.jsx)(Ae,{size:13,strokeWidth:1.5}),e[12]=z):z=e[12];let P=H==="running"||H==="queued"||H==="disabled-transitively"||i.disabled,k;e[13]===B?k=e[14]:(k=()=>B(),e[13]=B,e[14]=k);let I;return e[15]!==_||e[16]!==R||e[17]!==y||e[18]!==v||e[19]!==D||e[20]!==o||e[21]!==S||e[22]!==u||e[23]!==i.disabled||e[24]!==i.hide_code||e[25]!==m||e[26]!==E||e[27]!==n||e[28]!==q||e[29]!==C||e[30]!==d||e[31]!==A||e[32]!==p||e[33]!==h||e[34]!==j||e[35]!==r||e[36]!==M||e[37]!==W||e[38]!==N||e[39]!==T||e[40]!==P||e[41]!==k||e[42]!==L||e[43]!==O||e[44]!==s||e[45]!==x?(I=[[{icon:z,label:"Run cell",hotkey:"cell.run",hidden:P,redundant:!0,handle:k},{icon:(0,l.jsx)(Te,{size:13,strokeWidth:1.5}),label:"Refactor with AI",hidden:!R,handle:()=>{N(t=>(t==null?void 0:t.cellId)===o?null:{cellId:o})},hotkey:"cell.aiCompletion"},{icon:(0,l.jsx)(Z,{size:13,strokeWidth:1.5}),label:"Split",hotkey:"cell.splitCell",handle:()=>T({cellId:o})},{icon:(0,l.jsx)(We,{size:13,strokeWidth:1.5}),label:"Format",hotkey:"cell.format",handle:()=>{let t=n();t&&ke({[o]:t})}},{icon:i.hide_code?(0,l.jsx)(re,{size:13,strokeWidth:1.5}):(0,l.jsx)(Me,{size:13,strokeWidth:1.5}),label:i.hide_code?"Show code":"Hide code",handle:O,hotkey:"cell.hideCode"},{icon:i.disabled?(0,l.jsx)(ee,{size:13,strokeWidth:1.5}):(0,l.jsx)(le,{size:13,strokeWidth:1.5}),label:i.disabled?"Enable execution":"Disable execution",handle:L,hidden:d}],[{icon:(0,l.jsx)(Ue,{}),label:"Convert to Markdown",hotkey:"cell.viewAsMarkdown",handle:async()=>{let t=n();t&&(K({autoInstantiate:v,createNewCell:m}),F(t,{language:"markdown",keepCodeAsIs:!1}),i.hide_code||(await r({configs:{[o]:{hide_code:!0}}}),s({cellId:o,config:{hide_code:!0}}),A({cellId:o})))},hidden:d},ue(n())==="sql"?{icon:(0,l.jsx)(Pe,{}),label:"View as Python",hotkey:"cell.viewAsSQL",handle:()=>{let t=n();t&&de(t,"python",{force:!0})},hidden:d}:{icon:(0,l.jsx)(pe,{size:13,strokeWidth:1.5}),label:"Convert to SQL",hotkey:"cell.viewAsSQL",handle:()=>{let t=n();t&&(K({autoInstantiate:v,createNewCell:m}),F(t,{language:"sql",keepCodeAsIs:!1}))},hidden:d}],[{icon:(0,l.jsxs)($,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(Q,{size:8,strokeWidth:2})]}),label:"Create cell above",hotkey:"cell.createAbove",handle:()=>m({cellId:o,before:!0}),hidden:d,redundant:!0},{icon:(0,l.jsxs)($,{children:[(0,l.jsx)(G,{size:13,strokeWidth:1.5}),(0,l.jsx)(V,{size:8,strokeWidth:2})]}),label:"Create cell below",hotkey:"cell.createBelow",handle:()=>m({cellId:o,before:!1}),redundant:!0},{icon:(0,l.jsx)(Q,{size:13,strokeWidth:1.5}),label:"Move cell up",hotkey:"cell.moveUp",handle:()=>p({cellId:o,before:!0}),hidden:d},{icon:(0,l.jsx)(V,{size:13,strokeWidth:1.5}),label:"Move cell down",hotkey:"cell.moveDown",handle:()=>p({cellId:o,before:!1}),hidden:d},{icon:(0,l.jsx)(we,{size:13,strokeWidth:1.5}),label:"Move cell left",hotkey:"cell.moveLeft",handle:()=>p({cellId:o,direction:"left"}),hidden:y!=="columns"||d},{icon:(0,l.jsx)(Ie,{size:13,strokeWidth:1.5}),label:"Move cell right",hotkey:"cell.moveRight",handle:()=>p({cellId:o,direction:"right"}),hidden:y!=="columns"||d},{icon:(0,l.jsx)(X,{size:13,strokeWidth:1.5}),label:"Send to top",hotkey:"cell.sendToTop",handle:()=>W({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(J,{size:13,strokeWidth:1.5}),label:"Send to bottom",hotkey:"cell.sendToBottom",handle:()=>M({cellId:o,scroll:!1}),hidden:d},{icon:(0,l.jsx)(he,{size:13,strokeWidth:1.5}),label:"Break into new column",hotkey:"cell.addColumnBreakpoint",handle:()=>_({cellId:o}),hidden:y!=="columns"||d}],[{icon:(0,l.jsx)(_e,{size:13,strokeWidth:1.5}),label:"Export output as PNG",hidden:!C,handle:()=>ge(o,"result")},{icon:(0,l.jsx)(ce,{size:13,strokeWidth:1.5}),label:"Clear output",hidden:!(C||q),handle:()=>{S({cellId:o})}}],[{icon:(0,l.jsx)(Ve,{size:13,strokeWidth:1.5}),label:"Name",disableClick:!0,handle:el,handleHeadless:()=>{j((0,l.jsxs)(He,{children:[(0,l.jsx)(Re,{children:(0,l.jsx)(qe,{children:"Rename cell"})}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)(Ce,{htmlFor:"cell-name",children:"Cell name"}),(0,l.jsx)(Y,{placeholder:"cell name",value:h,onKeyDown:t=>{t.key==="Enter"&&(t.preventDefault(),t.stopPropagation(),j(null))},onChange:t=>x({cellId:o,name:t})})]})]}))},rightElement:(0,l.jsx)(Y,{placeholder:"cell name",value:h,onChange:t=>x({cellId:o,name:t}),onEnterKey:()=>u==null?void 0:u()}),hidden:d},{icon:(0,l.jsx)(Se,{size:13,strokeWidth:1.5}),label:"Copy link to cell",disabled:!te(h),tooltip:te(h)?void 0:"Only named cells can be linked to",handle:async()=>{await Ee(Ge(h)),De({description:"Link copied to clipboard"})}}],[{label:"Delete",hidden:!D,variant:"danger",icon:(0,l.jsx)(Be,{size:13,strokeWidth:1.5}),handle:()=>{E({cellId:o})}}]].map(Xe).filter(Je),e[15]=_,e[16]=R,e[17]=y,e[18]=v,e[19]=D,e[20]=o,e[21]=S,e[22]=u,e[23]=i.disabled,e[24]=i.hide_code,e[25]=m,e[26]=E,e[27]=n,e[28]=q,e[29]=C,e[30]=d,e[31]=A,e[32]=p,e[33]=h,e[34]=j,e[35]=r,e[36]=M,e[37]=W,e[38]=N,e[39]=T,e[40]=P,e[41]=k,e[42]=L,e[43]=O,e[44]=s,e[45]=x,e[46]=I):I=e[46],I}function Je(a){return a.length>0}function Xe(a){return a.filter(Ze)}function Ze(a){return!a.hidden}function el(a){a==null||a.stopPropagation(),a==null||a.preventDefault()}export{Z as a,ee as i,Ke as n,X as o,le as r,J as s,$e as t};
@@ -1 +0,0 @@
1
- import{s as ze}from"./chunk-LvLJmgfZ.js";import{d as $,l as ht,p as mt,u as pe}from"./useEvent-D91BmmQi.js";import{t as pt}from"./react-Bj1aDYRI.js";import{Ai as ue,Dn as ut,E as We,En as ft,On as xt,Ur as yt,Xt as bt,_ as kt,dr as wt,gr as jt,h as _e,jn as gt,lt as Ne,ot as vt,pr as Ct,st as zt,t as Wt,xr as _t}from"./cells-BBDzmUIS.js";import{t as M}from"./compiler-runtime-B3qBwwSJ.js";import{n as Nt,x as Mt}from"./ai-model-dropdown-kQdQhWyz.js";import{_ as H,d as Me}from"./useEventListener-BR0C1MaI.js";import{y as St}from"./utils-BrXijSdZ.js";import{n as S,t as Se}from"./constants-DMpttj8Q.js";import{T as ae,n as Dt,o as At,v as Pt,w as It}from"./config-CPqw1wUv.js";import{n as Lt}from"./switch-BvybnC9P.js";import{t as Et}from"./jsx-runtime-BqBOg78p.js";import{o as Tt}from"./alert-dialog-BGBdrcqJ.js";import{a as Rt,c as fe,o as xe,s as $t}from"./popover-UExmgBsf.js";import{a as Ht,c as Ut,i as qt,n as Ot,r as Bt,s as Ft,t as Vt}from"./select-5i7URBEn.js";import{_t as Yt}from"./JsonOutput-B0sjIMBK.js";import{c as De,d as ye,n as Kt,o as Gt,r as be,t as Jt}from"./download-QGh9oR1D.js";import{t as Ae}from"./tooltip-Gcwqb_SK.js";import{r as Pe,t as U}from"./button-D9nb17Rw.js";import{i as Xt,r as Qt,t as Ie}from"./strings-md4mFbOQ.js";import{r as q}from"./requests-DIwGYs0l.js";import{t as g}from"./createLucideIcon-D5guW7EU.js";import{F as Zt,I as ea,L as Le,P as ta,R as aa,a as Ee,i as Te,u as Re}from"./layout-C1dvirgi.js";import{t as ke}from"./check-BH35Ndha.js";import{n as oa}from"./maps-C48Oksn0.js";import{r as na}from"./useCellActionButton-CHLJURZ7.js";import{t as $e}from"./copy-BwrPA9zQ.js";import{t as sa}from"./eye-off-n1Li95bE.js";import{t as oe}from"./file-BrdxGLRX.js";import{t as la}from"./github-BKS_2Qwn.js";import{u as ia}from"./form-CdFqEqTA.js";import{n as ra,r as da,t as ca}from"./youtube-CbdpN8oL.js";import{i as ha,n as He}from"./add-connection-dialog-DSOgwTlO.js";import{t as ma}from"./house-mGK3v0Mm.js";import{t as pa}from"./image-DQHXdEQn.js";import{t as ua}from"./link-CfEtM3Rl.js";import{r as fa}from"./input-BX98vgAu.js";import{t as xa}from"./settings-DfFe0dWD.js";import{t as ya}from"./sparkles-CZ5WmLPA.js";import{y as ba}from"./textarea-bAp21zYj.js";import{t as ka}from"./square-DMaNzePN.js";import{t as D}from"./use-toast-T0_cQDma.js";import{n as Ue,t as wa}from"./paths-BXWH6vv4.js";import{o as ja}from"./session-VtovaFBS.js";import{n as O}from"./copy-BCF-tANo.js";import{r as ga}from"./useRunCells-RJeImyCn.js";import{a as qe,c as Oe,i as Be,n as Fe,r as Ve}from"./dialog-Dj0qTFnG.js";import{n as we}from"./ImperativeModal-D7lQ0Q7_.js";import{r as va,t as Ye}from"./share-CqnSBwZy.js";import{a as Ca}from"./cell-link-DqiCeeeS.js";import{a as za}from"./renderShortcut-Bfk4NjRL.js";import{t as Wa}from"./icons-D9TuFTJG.js";import{n as Ke}from"./marimo-icons-Dk6YhPWV.js";import{t as _a}from"./links-BhX7oUFH.js";import{r as Na,t as Ge}from"./hooks-DbPDczTe.js";import{t as Je}from"./types-Bhw3Hco_.js";var Ma=g("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),Sa=g("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),Xe=g("clipboard-copy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]),Qe=g("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]),Ze=g("diamond-plus",[["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z",key:"1ey20j"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),Da=g("fast-forward",[["path",{d:"M12 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 12 18z",key:"b19h5q"}],["path",{d:"M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z",key:"h7h5ge"}]]),Aa=g("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]),Pa=g("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),Ia=g("notebook",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M16 2v20",key:"rotuqe"}]]),La=g("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),et=g("presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),Ea=g("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),Ta=g("square-power",[["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M7.998 9.003a5 5 0 1 0 8-.005",key:"1pek45"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]),tt=g("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]),je=M(),A=ze(pt(),1),a=ze(Et(),1);function Ra(){return"uvx marimo@latest"}function $a(t,e,n){let o=n?" --with-token":"",s=`${Ra()} pair prompt --url '${e}'${o}`;switch(t){case"claude":return`claude "$(${s} --claude)"`;case"codex":return`codex "$(${s} --codex)"`;case"opencode":return`opencode --prompt "$(${s} --opencode)"`;default:Qt(t)}}function Ha(t){return t.length<=4?"****":`${"*".repeat(Math.min(t.length-4,8))}${t.slice(-4)}`}var Ua="npx skills add marimo-team/marimo-pair";function qa(){let t=(0,je.c)(2),[e,n]=(0,A.useState)(null),o,s;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=()=>{fetch(Dt("/auth/token").href,{headers:Lt.headers()}).then(Oa).then(r=>n((r==null?void 0:r.token)??null)).catch(()=>n(null))},s=[],t[0]=o,t[1]=s):(o=t[0],s=t[1]),(0,A.useEffect)(o,s),e}function Oa(t){return t.ok?t.json():null}const Ba=t=>{let e=(0,je.c)(32),{onClose:n}=t,[o,s]=(0,A.useState)("claude"),r=At(),i=qa(),l=!!i,d;e[0]!==o||e[1]!==l||e[2]!==r.httpURL?(d=$a(o,r.httpURL.toString(),l),e[0]=o,e[1]=l,e[2]=r.httpURL,e[3]=d):d=e[3];let c=d,p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsx)(Oe,{children:"Pair with an agent"}),e[4]=p):p=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsxs)(qe,{children:[p,(0,a.jsxs)(Ve,{children:["Use an AI coding agent to pair-program on this notebook."," ",(0,a.jsx)("a",{href:"https://links.marimo.app/marimo-pair",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Learn more"}),"."]})]}),e[5]=u):u=e[5];let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"1. Install the skill"}),(0,a.jsx)(B,{command:Ua})]}),e[6]=h):h=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=(0,a.jsx)("span",{className:"text-sm font-medium",children:"2. Run in your terminal"}),e[7]=f):f=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=N=>s(N),e[8]=x):x=e[8];let k;e[9]===Symbol.for("react.memo_cache_sentinel")?(k=(0,a.jsxs)($t,{className:"w-full",children:[(0,a.jsx)(fe,{value:"claude",className:"flex-1",children:"Claude"}),(0,a.jsx)(fe,{value:"codex",className:"flex-1",children:"Codex"}),(0,a.jsx)(fe,{value:"opencode",className:"flex-1",children:"OpenCode"})]}),e[9]=k):k=e[9];let y;e[10]===c?y=e[11]:(y=(0,a.jsx)(xe,{value:"claude",className:"mt-3",children:(0,a.jsx)(B,{command:c})}),e[10]=c,e[11]=y);let b;e[12]===c?b=e[13]:(b=(0,a.jsx)(xe,{value:"codex",className:"mt-3",children:(0,a.jsx)(B,{command:c})}),e[12]=c,e[13]=b);let w;e[14]===c?w=e[15]:(w=(0,a.jsx)(xe,{value:"opencode",className:"mt-3",children:(0,a.jsx)(B,{command:c})}),e[14]=c,e[15]=w);let j;e[16]!==o||e[17]!==w||e[18]!==y||e[19]!==b?(j=(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[f,(0,a.jsxs)(Rt,{value:o,onValueChange:x,children:[k,y,b,w]})]}),e[16]=o,e[17]=w,e[18]=y,e[19]=b,e[20]=j):j=e[20];let z;e[21]!==i||e[22]!==l?(z=l&&i&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"3. Paste when prompted for token"}),(0,a.jsx)(B,{command:i,display:Ha(i)})]}),e[21]=i,e[22]=l,e[23]=z):z=e[23];let v;e[24]!==j||e[25]!==z?(v=(0,a.jsxs)("div",{className:"flex flex-col gap-4 py-2",children:[h,j,z]}),e[24]=j,e[25]=z,e[26]=v):v=e[26];let W;e[27]===n?W=e[28]:(W=(0,a.jsx)(Be,{children:(0,a.jsx)(U,{variant:"secondary",onClick:n,children:"Close"})}),e[27]=n,e[28]=W);let _;return e[29]!==v||e[30]!==W?(_=(0,a.jsxs)(Fe,{className:"sm:max-w-lg",children:[u,v,W]}),e[29]=v,e[30]=W,e[31]=_):_=e[31],_};var B=t=>{let e=(0,je.c)(15),{command:n,display:o}=t,[s,r]=(0,A.useState)(!1),i;e[0]===n?i=e[1]:(i=Pe.stopPropagation(async x=>{x.preventDefault(),await O(n),r(!0),setTimeout(()=>r(!1),2e3)}),e[0]=n,e[1]=i);let l=i,d=o??n,c;e[2]===d?c=e[3]:(c=(0,a.jsx)("code",{className:"flex-1 select-all break-words",children:d}),e[2]=d,e[3]=c);let p;e[4]===s?p=e[5]:(p=s?(0,a.jsx)(ke,{size:14,strokeWidth:1.5}):(0,a.jsx)($e,{size:14,strokeWidth:1.5}),e[4]=s,e[5]=p);let u;e[6]!==l||e[7]!==p?(u=(0,a.jsx)(U,{onClick:l,size:"xs",variant:"ghost",children:p}),e[6]=l,e[7]=p,e[8]=u):u=e[8];let h;e[9]!==s||e[10]!==u?(h=(0,a.jsx)(Ae,{content:"Copied!",open:s,children:u}),e[9]=s,e[10]=u,e[11]=h):h=e[11];let f;return e[12]!==c||e[13]!==h?(f=(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-xs",children:[c,h]}),e[12]=c,e[13]=h,e[14]=f):f=e[14],f},at=M(),ne="https://static.marimo.app";const Fa=t=>{let e=(0,at.c)(25),{onClose:n}=t,[o,s]=(0,A.useState)(""),{exportAsHTML:r}=q(),i=`${o}-${Math.random().toString(36).slice(2,6)}`,l=`${ne}/static/${i}`,d;e[0]!==r||e[1]!==n||e[2]!==i?(d=async j=>{j.preventDefault(),n();let z=await r({download:!1,includeCode:!0,files:ta.INSTANCE.filenames()}),v=D({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${ne}/api/static`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:z,path:i})}).catch(()=>{v.dismiss(),D({title:"Error uploading static page",description:(0,a.jsxs)("div",{children:["Please try again later. If the problem persists, please file a bug report on"," ",(0,a.jsx)("a",{href:S.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]})})}),v.dismiss(),D({title:"Static page uploaded!",description:(0,a.jsxs)("div",{children:["The URL has been copied to your clipboard.",(0,a.jsx)("br",{}),"You can share it with anyone."]})})},e[0]=r,e[1]=n,e[2]=i,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=(0,a.jsx)(Oe,{children:"Share static notebook"}),e[4]=c):c=e[4];let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsxs)(qe,{children:[c,(0,a.jsxs)(Ve,{children:["You can publish a static, non-interactive version of this notebook to the public web. We will create a link for you that lives on"," ",(0,a.jsx)("a",{href:ne,target:"_blank",children:ne}),"."]})]}),e[5]=p):p=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=j=>{s(j.target.value.toLowerCase().replaceAll(/\s/g,"-").replaceAll(/[^\da-z-]/g,""))},e[6]=u):u=e[6];let h;e[7]===o?h=e[8]:(h=(0,a.jsx)(fa,{"data-testid":"slug-input",id:"slug",autoFocus:!0,value:o,placeholder:"Notebook slug",onChange:u,required:!0,autoComplete:"off"}),e[7]=o,e[8]=h);let f;e[9]===l?f=e[10]:(f=(0,a.jsxs)("div",{className:"font-semibold text-sm text-muted-foreground gap-2 flex flex-col",children:["Anyone will be able to access your notebook at this URL:",(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(Va,{text:l}),(0,a.jsx)("span",{className:"text-primary",children:l})]})]}),e[9]=l,e[10]=f);let x;e[11]!==h||e[12]!==f?(x=(0,a.jsxs)("div",{className:"flex flex-col gap-6 py-4",children:[h,f]}),e[11]=h,e[12]=f,e[13]=x):x=e[13];let k;e[14]===n?k=e[15]:(k=(0,a.jsx)(U,{"data-testid":"cancel-share-static-notebook-button",variant:"secondary",onClick:n,children:"Cancel"}),e[14]=n,e[15]=k);let y;e[16]===l?y=e[17]:(y=(0,a.jsx)(U,{"data-testid":"share-static-notebook-button","aria-label":"Save",variant:"default",type:"submit",onClick:async()=>{await O(l)},children:"Create"}),e[16]=l,e[17]=y);let b;e[18]!==k||e[19]!==y?(b=(0,a.jsxs)(Be,{children:[k,y]}),e[18]=k,e[19]=y,e[20]=b):b=e[20];let w;return e[21]!==d||e[22]!==b||e[23]!==x?(w=(0,a.jsx)(Fe,{className:"w-fit",children:(0,a.jsxs)("form",{onSubmit:d,children:[p,x,b]})}),e[21]=d,e[22]=b,e[23]=x,e[24]=w):w=e[24],w};var Va=t=>{let e=(0,at.c)(8),[n,o]=A.useState(!1),s;e[0]===t.text?s=e[1]:(s=Pe.stopPropagation(async c=>{c.preventDefault(),await O(t.text),o(!0),setTimeout(()=>o(!1),2e3)}),e[0]=t.text,e[1]=s);let r=s,i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)($e,{size:14,strokeWidth:1.5}),e[2]=i):i=e[2];let l;e[3]===r?l=e[4]:(l=(0,a.jsx)(U,{"data-testid":"copy-static-notebook-url-button",onClick:r,size:"xs",variant:"secondary",children:i}),e[3]=r,e[4]=l);let d;return e[5]!==n||e[6]!==l?(d=(0,a.jsx)(Ae,{content:"Copied!",open:n,children:l}),e[5]=n,e[6]=l,e[7]=d):d=e[7],d},Ya=M();function Ka(){let t=document.getElementsByClassName(Se.outputArea);for(let e of t){let n=e.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=ue.findElement(e);if(!o){H.warn("Could not find HTMLCellId for visible output area",e);continue}return{cellId:ue.parse(o.id)}}}return H.warn("No visible output area found for scroll anchor"),null}function Ga(t){if(!t){H.warn("No scroll anchor provided to restore scroll position");return}let e=document.getElementById(ue.create(t.cellId));if(!e){H.warn("Could not find cell element to restore scroll position",t.cellId);return}if(!e.querySelector(`.${Se.outputArea}`)){H.warn("Could not find output area to restore scroll position",t.cellId);return}e.scrollIntoView({block:"start",behavior:"auto"})}function ot(){let t=(0,Ya.c)(2),e=$(Ne),n;return t[0]===e?n=t[1]:(n=()=>{let o=Ka();e(s=>({mode:zt(s.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Ga(o)})})},t[0]=e,t[1]=n),n}const nt=mt(!1);var Ja=M();const Xa=()=>{let t=(0,Ja.c)(7),{selectedLayout:e}=Ee(),{setLayoutView:n}=Te();if(ae()&&!gt("wasm_layouts"))return null;let o;t[0]===n?o=t[1]:(o=l=>n(l),t[0]=n,t[1]=o);let s;t[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(Ft,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(Ut,{placeholder:"Select a view"})}),t[2]=s):s=t[2];let r;t[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(Ot,{children:(0,a.jsxs)(Bt,{children:[(0,a.jsx)(Ht,{children:"View as"}),Je.map(Za)]})}),t[3]=r):r=t[3];let i;return t[4]!==e||t[5]!==o?(i=(0,a.jsxs)(Vt,{"data-testid":"layout-select",value:e,onValueChange:o,children:[s,r]}),t[4]=e,t[5]=o,t[6]=i):i=t[6],i};function Qa(t){return(0,a.jsx)(st(t),{className:"h-4 w-4"})}function st(t){switch(t){case"vertical":return Pa;case"grid":return da;case"slides":return et;default:return Xt(t),ka}}function lt(t){return Ie.startCase(t)}function Za(t){return(0,a.jsx)(qt,{value:t,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[Qa(t),(0,a.jsx)("span",{children:lt(t)})]})},t)}async function eo(t){let{filename:e,preset:n,downloadPDF:o}=t;await o({filename:e,webpdf:!1,preset:n,includeInputs:!0,rasterServer:"static"})}var to=M();function ao(t){let e=(0,to.c)(5),{openPrompt:n,closeModal:o}=we(),{sendCopy:s}=q(),r;return e[0]!==o||e[1]!==n||e[2]!==s||e[3]!==t?(r=()=>{if(!t)return null;let i=wa.guessDeliminator(t);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${Ue.basename(t)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:l=>{let d=i.join(Ue.dirname(t),l);s({source:t,destination:d}).then(()=>{o(),D({title:"Notebook copied",description:"A copy of the notebook has been created."}),_a(d)})}})},e[0]=o,e[1]=n,e[2]=s,e[3]=t,e[4]=r):r=e[4],r}const oo=()=>{let{updateCellConfig:t}=We(),{saveCellConfig:e}=q();return(0,A.useCallback)(async()=>{let n=new bt,o=_e(),s=o.cellIds.inOrderIds,r={};for(let l of s){if(o.cellData[l]===void 0)continue;let{code:d,config:c}=o.cellData[l];c.hide_code||n.isSupported(d)&&(r[l]={hide_code:!0})}let i=Me.entries(r);if(i.length!==0){await e({configs:r});for(let[l,d]of i)t({cellId:l,config:d})}},[t])};var no=M();function it(){let t=(0,no.c)(4),{openConfirm:e}=we(),n=$(Pt),{sendRestart:o}=q(),s;return t[0]!==e||t[1]!==o||t[2]!==n?(s=()=>{e({title:"Restart Kernel",description:"This will restart the Python kernel. You'll lose all data that's in memory. You will also lose any unsaved changes, so make sure to save your work before restarting.",variant:"destructive",confirmAction:(0,a.jsx)(Tt,{onClick:async()=>{n({state:It.CLOSING}),await o(),va()},"aria-label":"Confirm Restart",children:"Restart"})})},t[0]=e,t[1]=o,t[2]=n,t[3]=s):s=t[3],s}var so=M(),T=t=>{t==null||t.preventDefault(),t==null||t.stopPropagation()};function lo(){var ve,Ce;let t=(0,so.c)(51),e=Ca(),{openModal:n,closeModal:o}=we(),{toggleApplication:s}=ft(),{selectedPanel:r}=ut(),[i]=ht(Ne),l=pe(vt),d=oo(),[c]=St(),{updateCellConfig:p,undoDeleteCell:u,clearAllCellOutputs:h,addSetupCellIfDoesntExist:f,collapseAllCells:x,expandAllCells:k}=We(),y=it(),b=ga(),w=ao(e),j=$(nt),z=$(Nt),v=$(Mt),{exportAsIPYNB:W,exportAsMarkdown:_,readCode:N,saveCellConfig:le,updateCellOutputs:P}=q(),I=Na(),ie=pe(kt),re=pe(Wt),{selectedLayout:F}=Ee(),{setLayoutView:de}=Te(),V=ot(),Y=((ve=c.sharing)==null?void 0:ve.html)??!0,K=((Ce=c.sharing)==null?void 0:Ce.wasm)??!0,ge=!ae(),ce=F==="slides",rt=zo,dt=Co,G;t[0]!==e||t[1]!==I||t[2]!==P?(G=async m=>{let{preset:C,title:R}=m;if(!e){se();return}await De(R,async me=>{await Ge({takeScreenshots:()=>I({progress:me}),updateCellOutputs:P}),await eo({filename:e,preset:C,downloadPDF:Kt})})},t[0]=e,t[1]=I,t[2]=P,t[3]=G):G=t[3];let L=G,J;t[4]===L?J=t[5]:(J=async()=>{if(ge){await L({preset:"document",title:"Downloading Document PDF..."});return}let m=new Event("export-beforeprint"),C=new Event("export-afterprint");window.dispatchEvent(m),setTimeout(vo,0),setTimeout(()=>window.dispatchEvent(C),0)},t[4]=L,t[5]=J);let X=J,Q;t[6]!==W||t[7]!==e||t[8]!==I||t[9]!==P?(Q=async()=>{if(!e){se();return}await De("Downloading IPYNB...",async m=>{await Ge({takeScreenshots:()=>I({progress:m}),updateCellOutputs:P});let C=await W({download:!1});be(new Blob([C],{type:"application/x-ipynb+json"}),ye.toIPYNB(document.title))})},t[6]=W,t[7]=e,t[8]=I,t[9]=P,t[10]=Q):Q=t[10];let he=Q,Z;t[11]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,a.jsx)(Yt,{size:14,strokeWidth:1.5}),t[11]=Z):Z=t[11];let ee;t[12]===Symbol.for("react.memo_cache_sentinel")?(ee=(0,a.jsx)(Le,{size:14,strokeWidth:1.5}),t[12]=ee):ee=t[12];let E;t[13]===e?E=t[14]:(E=async()=>{if(!e){se();return}await Re({filename:e,includeCode:!0})},t[13]=e,t[14]=E);let te;return t[15]!==f||t[16]!==re||t[17]!==h||t[18]!==o||t[19]!==x||t[20]!==w||t[21]!==L||t[22]!==k||t[23]!==_||t[24]!==e||t[25]!==X||t[26]!==he||t[27]!==ie||t[28]!==d||t[29]!==ce||t[30]!==l||t[31]!==n||t[32]!==N||t[33]!==y||t[34]!==b||t[35]!==le||t[36]!==F||t[37]!==r||t[38]!==j||t[39]!==v||t[40]!==de||t[41]!==z||t[42]!==Y||t[43]!==K||t[44]!==E||t[45]!==s||t[46]!==V||t[47]!==u||t[48]!==p||t[49]!==i.mode?(te=[{icon:Z,label:"Download",handle:T,dropdown:[{icon:ee,label:"Download as HTML",handle:E},{icon:(0,a.jsx)(Le,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!e){se();return}await Re({filename:e,includeCode:!1})}},{icon:(0,a.jsx)(Wa,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let m=await _({download:!1});be(new Blob([m],{type:"text/plain"}),ye.toMarkdown(document.title))}},{icon:(0,a.jsx)(Ia,{size:14,strokeWidth:1.5}),label:"Download as ipynb",handle:he},{icon:(0,a.jsx)(aa,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let m=await N();be(new Blob([m.contents],{type:"text/plain"}),ye.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(pa,{size:14,strokeWidth:1.5}),label:"Download as PNG",disabled:i.mode!=="present",tooltip:i.mode==="present"?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",za("global.hideCode",!1)]}),handle:go},ce?{divider:!0,icon:(0,a.jsx)(oe,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:T,dropdown:[{icon:(0,a.jsx)(oe,{size:14,strokeWidth:1.5}),label:"Document Layout",handle:X},{icon:(0,a.jsx)(oe,{size:14,strokeWidth:1.5}),label:"Slides Layout",rightElement:dt(!0),hidden:!ge,handle:async()=>{await L({preset:"slides",title:"Downloading Slides PDF..."})}}]}:{divider:!0,icon:(0,a.jsx)(oe,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:X}]},{icon:(0,a.jsx)(ya,{size:14,strokeWidth:1.5}),label:"Pair with an agent",hidden:ae(),handle:async()=>{n((0,a.jsx)(Ba,{onClose:o}))}},{icon:(0,a.jsx)(Ea,{size:14,strokeWidth:1.5}),label:"Share",handle:T,hidden:!Y&&!K,dropdown:[{icon:(0,a.jsx)(ia,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!Y,handle:async()=>{n((0,a.jsx)(Fa,{onClose:o}))}},{icon:(0,a.jsx)(ua,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!K,handle:async()=>{await O(Ye({code:(await N()).contents})),D({title:"Copied",description:"Link copied to clipboard."})}},{icon:(0,a.jsx)(Ke,{size:14,strokeWidth:1.5}),label:"Create molab notebook",handle:async()=>{let m=Ye({code:(await N()).contents,baseUrl:`${S.molab}/new`});window.open(m,"_blank")}}]},{icon:(0,a.jsx)(La,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:T,dropdown:xt.flatMap(m=>{let{type:C,Icon:R,hidden:me,additionalKeywords:ct}=m;return me?[]:{label:Ie.startCase(C),rightElement:rt(r===C),icon:(0,a.jsx)(R,{size:14,strokeWidth:1.5}),handle:()=>s(C),additionalKeywords:ct}})},{icon:(0,a.jsx)(et,{size:14,strokeWidth:1.5}),label:"Present as",handle:T,dropdown:[{icon:i.mode==="present"?(0,a.jsx)(ba,{size:14,strokeWidth:1.5}):(0,a.jsx)(Zt,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{V()}},...Je.map((m,C)=>{let R=st(m);return{divider:C===0,label:lt(m),icon:(0,a.jsx)(R,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:F===m&&(0,a.jsx)(ke,{size:14})}),handle:()=>{de(m),i.mode==="edit"&&V()}}})]},{icon:(0,a.jsx)(Aa,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!e||ae(),handle:w},{icon:(0,a.jsx)(Xe,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!e,handle:async()=>{await O((await N()).contents),D({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(na,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!ie||l,handle:async()=>{let m=yt(_e());await le({configs:Me.fromEntries(m.map(jo))});for(let C of m)p({cellId:C,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(Ze,{size:14,strokeWidth:1.5}),label:"Add setup cell",handle:()=>{f({})}},{icon:(0,a.jsx)(Ct,{size:14,strokeWidth:1.5}),label:"Add database connection",handle:()=>{n((0,a.jsx)(He,{onClose:o}))}},{icon:(0,a.jsx)(ha,{size:14,strokeWidth:1.5}),label:"Add remote storage",handle:()=>{n((0,a.jsx)(He,{defaultTab:"storage",onClose:o}))}},{icon:(0,a.jsx)(tt,{size:14,strokeWidth:1.5}),label:"Undo cell deletion",hidden:!re||l,handle:()=>{u()}},{icon:(0,a.jsx)(Ta,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:y,additionalKeywords:["reset","reload","restart"]},{icon:(0,a.jsx)(Da,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{b()}},{icon:(0,a.jsx)(jt,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{h()}},{icon:(0,a.jsx)(sa,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",handle:d,redundant:!0},{icon:(0,a.jsx)(Sa,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:x,redundant:!0},{icon:(0,a.jsx)(Ma,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:k,redundant:!0},{divider:!0,icon:(0,a.jsx)(Qe,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>j(wo)},{icon:(0,a.jsx)(ea,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>v(ko)},{icon:(0,a.jsx)(xa,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>z(bo),redundant:!0,additionalKeywords:["preferences","options","configuration"]},{icon:(0,a.jsx)(oa,{size:14,strokeWidth:1.5}),label:"Resources",handle:T,dropdown:[{icon:(0,a.jsx)(_t,{size:14,strokeWidth:1.5}),label:"Documentation",handle:yo},{icon:(0,a.jsx)(la,{size:14,strokeWidth:1.5}),label:"GitHub",handle:xo},{icon:(0,a.jsx)(ra,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:fo},{icon:(0,a.jsx)(ca,{size:14,strokeWidth:1.5}),label:"YouTube",handle:uo},{icon:(0,a.jsx)(wt,{size:14,strokeWidth:1.5}),label:"Changelog",handle:po}]},{divider:!0,icon:(0,a.jsx)(ma,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:mo},{icon:(0,a.jsx)(Ke,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:ho}].filter(co).map(io),t[15]=f,t[16]=re,t[17]=h,t[18]=o,t[19]=x,t[20]=w,t[21]=L,t[22]=k,t[23]=_,t[24]=e,t[25]=X,t[26]=he,t[27]=ie,t[28]=d,t[29]=ce,t[30]=l,t[31]=n,t[32]=N,t[33]=y,t[34]=b,t[35]=le,t[36]=F,t[37]=r,t[38]=j,t[39]=v,t[40]=de,t[41]=z,t[42]=Y,t[43]=K,t[44]=E,t[45]=s,t[46]=V,t[47]=u,t[48]=p,t[49]=i.mode,t[50]=te):te=t[50],te}function io(t){return t.dropdown?{...t,dropdown:t.dropdown.filter(ro)}:t}function ro(t){return!t.hidden}function co(t){return!t.hidden}function ho(){let t=ja();window.open(t,"_blank")}function mo(){let t=document.baseURI.split("?")[0];window.open(t,"_self")}function po(){window.open(S.releasesPage,"_blank")}function uo(){window.open(S.youtube,"_blank")}function fo(){window.open(S.discordLink,"_blank")}function xo(){window.open(S.githubPage,"_blank")}function yo(){window.open(S.docsPage,"_blank")}function bo(t){return!t}function ko(t){return!t}function wo(t){return!t}function jo(t){return[t,{disabled:!1}]}async function go(){let t=document.getElementById("App");t&&await Gt({element:t,filename:document.title,prepare:Jt})}function vo(){return window.print()}function Co(t){return t?(0,a.jsx)("span",{className:"ml-3 shrink-0 rounded-full border border-emerald-200 bg-emerald-50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-emerald-700",children:"Recommended"}):null}function zo(t){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:t&&(0,a.jsx)(ke,{size:14})})}function se(){D({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{ot as a,Qe as c,nt as i,Xe as l,it as n,tt as o,Xa as r,Ze as s,lo as t};
@@ -1 +0,0 @@
1
- import{d as g,n as i,p as k}from"./useEvent-D91BmmQi.js";import{E as v,Jr as w,Wr as y,bt as F,h as d,zn as _}from"./cells-BBDzmUIS.js";import{t as x}from"./compiler-runtime-B3qBwwSJ.js";import{_ as z}from"./useEventListener-BR0C1MaI.js";import{o as D}from"./dist-HlsDto3K.js";import{r as E}from"./requests-DIwGYs0l.js";var u=x();const I=k(!1);function H(){let r=(0,u.c)(2),n=f(),t;return r[0]===n?t=r[1]:(t=()=>n(w(d())),r[0]=n,r[1]=t),i(t)}function J(r){let n=(0,u.c)(3),t=f(),e;return n[0]!==r||n[1]!==t?(e=()=>{r!==void 0&&t([r])},n[0]=r,n[1]=t,n[2]=e):e=n[2],i(e)}function V(){let r=(0,u.c)(2),n=f(),t;return r[0]===n?t=r[1]:(t=()=>n(y(d())),r[0]=n,r[1]=t),i(t)}function f(){let r=(0,u.c)(4),{prepareForRun:n}=v(),{sendRun:t}=E(),e=g(I),o;return r[0]!==n||r[1]!==t||r[2]!==e?(o=async s=>{if(s.length===0)return;let c=d();return e(!0),b({cellIds:s,sendRun:t,prepareForRun:n,notebook:c})},r[0]=n,r[1]=t,r[2]=e,r[3]=o):o=r[3],i(o)}async function b({cellIds:r,sendRun:n,prepareForRun:t,notebook:e}){var m,h,R;if(r.length===0)return;let{cellHandles:o,cellData:s}=e,c=[];for(let a of r){let l=(h=(m=o[a])==null?void 0:m.current)==null?void 0:h.editorView,p;l?(_(l)!=="markdown"&&D(l),p=F(l)):p=((R=s[a])==null?void 0:R.code)||"",c.push(p),t({cellId:a})}await n({cellIds:r,codes:c}).catch(a=>{z.error(a)})}export{f as a,J as i,b as n,H as o,V as r,I as t};
@@ -1 +0,0 @@
1
- import{s as m}from"./chunk-LvLJmgfZ.js";import{n as p}from"./useEvent-D91BmmQi.js";import{E as d,bt as f,f as u}from"./cells-BBDzmUIS.js";import{t as c}from"./compiler-runtime-B3qBwwSJ.js";import{t as C}from"./jsx-runtime-BqBOg78p.js";import{t as b}from"./use-toast-T0_cQDma.js";import{r as h}from"./useDeleteCell-GFhvGBJ7.js";var v=c(),x=m(C(),1);function j(){let t=(0,v.c)(3),{splitCell:i,undoSplitCell:r}=d(),o;return t[0]!==i||t[1]!==r?(o=s=>{let l=u(s.cellId);if(!l)return;let a=f(l);i(s);let{dismiss:n}=b({title:"Cell split",action:(0,x.jsx)(h,{"data-testid":"undo-split-button",size:"sm",variant:"outline",onClick:()=>{r({...s,snapshot:a}),e()},children:"Undo"})}),e=n},t[0]=i,t[1]=r,t[2]=o):o=t[2],p(o)}export{j as t};