@marimo-team/frontend 0.22.1-dev34 → 0.22.1-dev39

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 (239) hide show
  1. package/dist/assets/{CellStatus-DKyVv7Zj.js → CellStatus-Cf0Jlrcs.js} +1 -1
  2. package/dist/assets/{ConnectedDataExplorerComponent-BUc9LHJJ.js → ConnectedDataExplorerComponent-DUxaLoL7.js} +1 -1
  3. package/dist/assets/{JsonOutput-D1i8P1dG.js → JsonOutput-IpD2GLtO.js} +2 -2
  4. package/dist/assets/{MarimoErrorOutput-RmM7djc-.js → MarimoErrorOutput-dTNCLY-Q.js} +1 -1
  5. package/dist/assets/{Plot-C7NE7pEx.js → Plot-BAM1jEAz.js} +72 -72
  6. package/dist/assets/{RenderHTML-Bmn77an6.js → RenderHTML-C5GEp4ca.js} +1 -1
  7. package/dist/assets/{add-cell-with-ai-RyZ9Xe2b.js → add-cell-with-ai-C0J3LyiV.js} +1 -1
  8. package/dist/assets/{add-connection-dialog-ogwy8tvS.js → add-connection-dialog-C42PDYI7.js} +1 -1
  9. package/dist/assets/{agent-panel-BHLkHj7k.js → agent-panel-CH-jHjEl.js} +1 -1
  10. package/dist/assets/{ai-model-dropdown-Dnf-CxbP.js → ai-model-dropdown-D14GiszF.js} +1 -1
  11. package/dist/assets/{app-config-button-D1Z_xsvC.js → app-config-button-v-557oRb.js} +1 -1
  12. package/dist/assets/{cell-editor-_GDTh-4a.js → cell-editor-Dd6UaL1A.js} +2 -2
  13. package/dist/assets/{cell-link-D4UrIH9w.js → cell-link-Cimoe3Fv.js} +1 -1
  14. package/dist/assets/{cells-ArUhhHls.js → cells-CcsG9Aum.js} +1 -1
  15. package/dist/assets/{chat-display-YmFjOXkV.js → chat-display-hfpeXiYe.js} +1 -1
  16. package/dist/assets/{chat-panel-B76rxYTh.js → chat-panel-DxT370nA.js} +1 -1
  17. package/dist/assets/{chat-ui-BitNq1z6.js → chat-ui-Dv4y0-td.js} +1 -1
  18. package/dist/assets/{column-preview-NDhbeu0E.js → column-preview-ZSErTRFA.js} +1 -1
  19. package/dist/assets/{command-palette-uJxkhle4.js → command-palette-CjF_cblG.js} +1 -1
  20. package/dist/assets/{common-CRBlPqv5.js → common-BZK7spst.js} +1 -1
  21. package/dist/assets/{components-DwGcJvMB.js → components-D2OlyENc.js} +1 -1
  22. package/dist/assets/{components-BfHGr__b.js → components-DpxyscxU.js} +1 -1
  23. package/dist/assets/{datasource-D9e37ifa.js → datasource-D9nfSxKS.js} +1 -1
  24. package/dist/assets/{dependency-graph-panel-BBmN-Vc7.js → dependency-graph-panel-5MbMtFss.js} +1 -1
  25. package/dist/assets/{documentation-panel-Dm2xtsTq.js → documentation-panel-DPdXS3YO.js} +1 -1
  26. package/dist/assets/{download-7EtMZf2Y.js → download-BFQaUFKI.js} +1 -1
  27. package/dist/assets/{edit-page-Cr_DnrkM.js → edit-page-CMd8_Psc.js} +4 -4
  28. package/dist/assets/{error-panel-C3-vTzaH.js → error-panel-DV8jpRsf.js} +1 -1
  29. package/dist/assets/{file-explorer-panel-g9KppC7Y.js → file-explorer-panel-Dr_ZNDk3.js} +1 -1
  30. package/dist/assets/{file-icons-JXAG6vK-.js → file-icons-DSJsG_mI.js} +1 -1
  31. package/dist/assets/{floating-outline-B6Qyid7Q.js → floating-outline-Cfa1ESSb.js} +1 -1
  32. package/dist/assets/{focus-DCN0oEe0.js → focus-C5u0JQUq.js} +1 -1
  33. package/dist/assets/{form-BVnQnVQ2.js → form-3ZUGKch9.js} +1 -1
  34. package/dist/assets/glide-data-editor-a3qLDl-r.js +132 -0
  35. package/dist/assets/{home-page-Bg02jazh.js → home-page-BrqppCUS.js} +1 -1
  36. package/dist/assets/{hooks-zQJ9iU_R.js → hooks-CHE17GG1.js} +1 -1
  37. package/dist/assets/{html-to-image-C5XSE7QT.js → html-to-image-BRbQwG7G.js} +1 -1
  38. package/dist/assets/{index-BaQAJwyb.css → index-BkdonYlq.css} +1 -1
  39. package/dist/assets/index-Bt8G6SSE.js +42 -0
  40. package/dist/assets/{kiosk-mode-CriCUOI1.js → kiosk-mode-Cu86-jaD.js} +1 -1
  41. package/dist/assets/{layout-Cudicm29.js → layout-B-lTkLKA.js} +1 -1
  42. package/dist/assets/{logs-panel-CoWO9c8s.js → logs-panel-CNVgwoHO.js} +1 -1
  43. package/dist/assets/{markdown-renderer-CyUc0f8D.js → markdown-renderer-B91NzmVT.js} +1 -1
  44. package/dist/assets/{name-cell-input-DeM6upjB.js → name-cell-input-hsV_b1Op.js} +1 -1
  45. package/dist/assets/{outline-panel-C4P3wA7Z.js → outline-panel-C3jvSnZF.js} +1 -1
  46. package/dist/assets/{packages-panel-DnrjjQDF.js → packages-panel-0_Z5vM7i.js} +1 -1
  47. package/dist/assets/{panels-BCRqI88j.js → panels-uc8QhzpO.js} +1 -1
  48. package/dist/assets/{process-output-e_aMblRk.js → process-output-CsvKn_Mr.js} +1 -1
  49. package/dist/assets/{readonly-python-code-CVgh88Tn.js → readonly-python-code-oFCRG7Wt.js} +1 -1
  50. package/dist/assets/{run-page-C-ySBXLo.js → run-page-DKCqiq_f.js} +1 -1
  51. package/dist/assets/{scratchpad-panel-C5Pogi1P.js → scratchpad-panel-ChHLgDv_.js} +1 -1
  52. package/dist/assets/{session-panel-DEsnZWks.js → session-panel-CPKKt31q.js} +1 -1
  53. package/dist/assets/{snippets-panel-DQgE3W8I.js → snippets-panel-CDqEDwpY.js} +1 -1
  54. package/dist/assets/{spec-CBbUxOvL.js → spec-CFx2bitO.js} +1 -1
  55. package/dist/assets/{state-pGNeffyB.js → state-BBVlYaRC.js} +1 -1
  56. package/dist/assets/{state-CV8Wy3e4.js → state-C93JW11U.js} +1 -1
  57. package/dist/assets/{textarea-DqzNK0s9.js → textarea-DJEKmYtw.js} +1 -1
  58. package/dist/assets/{tracing-BUFVOmZw.js → tracing-CLWi5jD3.js} +1 -1
  59. package/dist/assets/{tracing-panel-BsLloPWd.js → tracing-panel-ksnvVrMH.js} +2 -2
  60. package/dist/assets/{useAddCell-cC7JUC0q.js → useAddCell-mJ1PkF-E.js} +1 -1
  61. package/dist/assets/{useCellActionButton-BiYBXHfb.js → useCellActionButton-4HWj1rt3.js} +1 -1
  62. package/dist/assets/{useDeleteCell-D2p4Dz0U.js → useDeleteCell-B0OAS0ly.js} +1 -1
  63. package/dist/assets/{useDependencyPanelTab-c5-eXlcr.js → useDependencyPanelTab-BuZ0fgAR.js} +1 -1
  64. package/dist/assets/useLifecycle-N3bfh_O1.js +1 -0
  65. package/dist/assets/useNotebookActions-DuHUqtII.js +1 -0
  66. package/dist/assets/{useRunCells-DgBY-vh9.js → useRunCells-Du76UV1R.js} +1 -1
  67. package/dist/assets/{useSplitCell-SS0kKwVk.js → useSplitCell-CeL7eJq1.js} +1 -1
  68. package/dist/index.html +25 -25
  69. package/package.json +1 -1
  70. package/src/__mocks__/common.ts +4 -4
  71. package/src/components/chat/acp/agent-panel.tsx +2 -2
  72. package/src/components/data-table/__tests__/columns.test.tsx +7 -7
  73. package/src/components/data-table/cell-hover-template/types.ts +1 -1
  74. package/src/components/data-table/cell-hover-text/types.ts +1 -1
  75. package/src/components/data-table/cell-selection/__tests__/feature.test.ts +1 -1
  76. package/src/components/data-table/cell-selection/types.ts +1 -1
  77. package/src/components/data-table/cell-styling/types.ts +1 -1
  78. package/src/components/data-table/charts/chart-spec/altair-generator.ts +2 -2
  79. package/src/components/data-table/column-formatting/types.ts +2 -2
  80. package/src/components/data-table/column-summary/legacy-chart-spec.ts +1 -1
  81. package/src/components/data-table/column-wrapping/types.ts +1 -1
  82. package/src/components/data-table/copy-column/types.ts +1 -1
  83. package/src/components/data-table/data-table.tsx +12 -12
  84. package/src/components/data-table/focus-row/types.ts +1 -1
  85. package/src/components/data-table/loading-table.tsx +1 -1
  86. package/src/components/data-table/range-focus/__tests__/atoms.test.ts +2 -2
  87. package/src/components/data-table/range-focus/atoms.ts +2 -2
  88. package/src/components/dependency-graph/dependency-graph-tree.tsx +1 -1
  89. package/src/components/editor/__tests__/dynamic-favicon.test.tsx +1 -1
  90. package/src/components/editor/actions/pair-with-agent-modal.tsx +142 -0
  91. package/src/components/editor/actions/useNotebookActions.tsx +10 -0
  92. package/src/components/editor/ai/ai-completion-editor.tsx +1 -1
  93. package/src/components/editor/app-container.tsx +1 -1
  94. package/src/components/editor/chrome/panels/empty-state.tsx +1 -0
  95. package/src/components/editor/controls/keyboard-shortcuts.tsx +1 -1
  96. package/src/components/editor/navigation/__tests__/navigation.test.ts +1 -1
  97. package/src/components/editor/navigation/navigation.ts +1 -1
  98. package/src/components/editor/notebook-cell.tsx +1 -1
  99. package/src/components/editor/output/JsonOutput.tsx +4 -4
  100. package/src/components/editor/output/ansi-reduce.ts +2 -2
  101. package/src/components/editor/output/console/ConsoleOutput.tsx +1 -1
  102. package/src/components/editor/renderers/cells-renderer.tsx +1 -1
  103. package/src/components/editor/renderers/grid-layout/grid-layout.tsx +1 -1
  104. package/src/components/editor/renderers/plugins.ts +1 -1
  105. package/src/components/editor/renderers/slides-layout/types.ts +2 -2
  106. package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +2 -2
  107. package/src/components/editor/renderers/vertical-layout/__tests__/vertical-layout.test.ts +1 -1
  108. package/src/components/find-replace/find-replace.tsx +3 -1
  109. package/src/components/forms/form.tsx +1 -1
  110. package/src/components/forms/options.ts +1 -1
  111. package/src/components/static-html/static-banner.tsx +2 -2
  112. package/src/components/terminal/terminal.tsx +4 -4
  113. package/src/components/ui/button.tsx +1 -1
  114. package/src/components/ui/command.tsx +1 -1
  115. package/src/core/ai/context/providers/__tests__/datasource.test.ts +1 -1
  116. package/src/core/ai/context/providers/__tests__/error.test.ts +1 -1
  117. package/src/core/ai/context/providers/__tests__/variable.test.ts +1 -1
  118. package/src/core/ai/context/registry.ts +2 -2
  119. package/src/core/ai/tools/registry.ts +1 -1
  120. package/src/core/cells/__tests__/cells.test.ts +2 -2
  121. package/src/core/cells/__tests__/scrollCellIntoView.test.ts +1 -1
  122. package/src/core/cells/__tests__/session.test.ts +1 -1
  123. package/src/core/cells/__tests__/utils.test.ts +1 -1
  124. package/src/core/cells/cells.ts +1 -1
  125. package/src/core/cells/ids.ts +1 -1
  126. package/src/core/codemirror/ai/request.ts +1 -1
  127. package/src/core/codemirror/copilot/__tests__/language-server.test.ts +1 -1
  128. package/src/core/codemirror/copilot/__tests__/transport.test.ts +1 -1
  129. package/src/core/codemirror/copilot/language-server.ts +1 -1
  130. package/src/core/codemirror/copilot/types.ts +1 -1
  131. package/src/core/codemirror/facet.ts +1 -1
  132. package/src/core/codemirror/language/__tests__/sql.test.ts +4 -4
  133. package/src/core/codemirror/language/languages/sql/completion-builder.ts +1 -1
  134. package/src/core/codemirror/language/metadata.ts +1 -1
  135. package/src/core/codemirror/language/types.ts +1 -1
  136. package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +1 -1
  137. package/src/core/codemirror/lsp/notebook-lsp.ts +1 -1
  138. package/src/core/codemirror/misc/__tests__/dnd.test.ts +1 -1
  139. package/src/core/codemirror/rtc/loro/awareness.ts +1 -1
  140. package/src/core/config/feature-flag.tsx +1 -1
  141. package/src/core/dom/outline.ts +1 -1
  142. package/src/core/export/__tests__/hooks.test.ts +1 -1
  143. package/src/core/hotkeys/__tests__/hotkeys.test.ts +1 -1
  144. package/src/core/hotkeys/shortcuts.ts +1 -1
  145. package/src/core/islands/__tests__/bridge.test.ts +2 -2
  146. package/src/core/islands/bridge.ts +2 -2
  147. package/src/core/islands/components/output-wrapper.tsx +1 -1
  148. package/src/core/islands/parse.ts +1 -1
  149. package/src/core/lsp/__tests__/transport.test.ts +1 -1
  150. package/src/core/network/DeferredRequestRegistry.ts +1 -1
  151. package/src/core/network/__tests__/requests-network.test.ts +1 -1
  152. package/src/core/network/api.ts +2 -2
  153. package/src/core/network/requests-lazy.ts +1 -1
  154. package/src/core/network/requests-toasting.tsx +1 -1
  155. package/src/core/static/files.ts +1 -1
  156. package/src/core/vscode/vscode-bindings.ts +1 -1
  157. package/src/core/wasm/bridge.ts +3 -3
  158. package/src/core/wasm/worker/tracer.ts +1 -1
  159. package/src/core/websocket/useWebSocket.tsx +2 -2
  160. package/src/css/globals.css +37 -61
  161. package/src/custom.d.ts +1 -1
  162. package/src/hooks/__tests__/useDuplicateShortcuts.test.ts +2 -2
  163. package/src/hooks/debug.ts +3 -3
  164. package/src/hooks/useDebounce.ts +1 -1
  165. package/src/hooks/useEventListener.ts +1 -1
  166. package/src/hooks/useHotkey.ts +1 -1
  167. package/src/hooks/useLifecycle.ts +2 -2
  168. package/src/hooks/useNonce.ts +1 -1
  169. package/src/hooks/useResizeObserver.ts +2 -2
  170. package/src/main.tsx +1 -1
  171. package/src/plugins/core/RenderHTML.tsx +3 -3
  172. package/src/plugins/core/__test__/registerReactComponent.test.ts +1 -1
  173. package/src/plugins/core/registerReactComponent.tsx +4 -4
  174. package/src/plugins/core/rpc.ts +1 -1
  175. package/src/plugins/impl/DataTablePlugin.tsx +1 -1
  176. package/src/plugins/impl/FileBrowserPlugin.tsx +1 -1
  177. package/src/plugins/impl/FormPlugin.tsx +1 -1
  178. package/src/plugins/impl/__tests__/MatrixPlugin.test.tsx +1 -1
  179. package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +1 -1
  180. package/src/plugins/impl/anywidget/model.ts +1 -1
  181. package/src/plugins/impl/anywidget/types.ts +2 -2
  182. package/src/plugins/impl/anywidget/widget-binding.ts +1 -1
  183. package/src/plugins/impl/chat/ChatPlugin.tsx +1 -1
  184. package/src/plugins/impl/chat/chat-ui.tsx +1 -1
  185. package/src/plugins/impl/data-editor/glide-data-editor.tsx +1 -1
  186. package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +2 -2
  187. package/src/plugins/impl/data-explorer/components/query-form.tsx +1 -1
  188. package/src/plugins/impl/data-explorer/functions/function.ts +1 -1
  189. package/src/plugins/impl/data-explorer/queries/types.ts +1 -1
  190. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -1
  191. package/src/plugins/impl/data-frames/forms/renderers.tsx +1 -1
  192. package/src/plugins/impl/data-frames/utils/operators.ts +1 -1
  193. package/src/plugins/impl/matplotlib/MatplotlibPlugin.tsx +1 -1
  194. package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +1 -1
  195. package/src/plugins/impl/panel/PanelPlugin.tsx +2 -2
  196. package/src/plugins/impl/plotly/Plot.tsx +3 -3
  197. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +62 -44
  198. package/src/plugins/impl/plotly/__tests__/PlotlyPlugin.test.tsx +114 -0
  199. package/src/plugins/impl/plotly/__tests__/selection.test.ts +158 -196
  200. package/src/plugins/impl/plotly/selection.ts +274 -56
  201. package/src/plugins/impl/vega/batched.ts +1 -1
  202. package/src/plugins/impl/vega/make-selectable.ts +1 -1
  203. package/src/plugins/impl/vega/types.ts +1 -1
  204. package/src/plugins/layout/DownloadPlugin.tsx +1 -1
  205. package/src/plugins/layout/LazyPlugin.tsx +1 -1
  206. package/src/plugins/layout/RoutesPlugin.tsx +1 -1
  207. package/src/plugins/layout/mermaid/mermaid.tsx +1 -1
  208. package/src/plugins/plugins.ts +1 -1
  209. package/src/stories/data-explorer.stories.tsx +1 -1
  210. package/src/stories/dataframe.stories.tsx +1 -1
  211. package/src/stories/editor.stories.tsx +1 -1
  212. package/src/stories/select.stories.tsx +1 -1
  213. package/src/stories/switchable-multi-select.stories.tsx +1 -1
  214. package/src/utils/Logger.ts +1 -1
  215. package/src/utils/__tests__/arrays.test.ts +1 -1
  216. package/src/utils/__tests__/blob.test.ts +1 -1
  217. package/src/utils/__tests__/dates.test.ts +1 -1
  218. package/src/utils/__tests__/errors.test.ts +1 -1
  219. package/src/utils/__tests__/objects.test.ts +3 -3
  220. package/src/utils/__tests__/waitForWs.test.ts +1 -1
  221. package/src/utils/arrays.ts +1 -1
  222. package/src/utils/assertNever.ts +1 -1
  223. package/src/utils/batch-requests.ts +2 -2
  224. package/src/utils/createReducer.ts +2 -2
  225. package/src/utils/id-tree.tsx +2 -2
  226. package/src/utils/idle.ts +1 -1
  227. package/src/utils/invariant.ts +1 -2
  228. package/src/utils/maps.ts +1 -1
  229. package/src/utils/math.ts +0 -1
  230. package/src/utils/multi-map.ts +1 -1
  231. package/src/utils/objects.ts +1 -1
  232. package/src/utils/once.ts +2 -2
  233. package/src/utils/staticImplements.ts +1 -1
  234. package/src/utils/storage/jotai.ts +1 -1
  235. package/src/utils/tracer.ts +2 -2
  236. package/dist/assets/glide-data-editor-CDqunAkw.js +0 -132
  237. package/dist/assets/index-KI45dku7.js +0 -35
  238. package/dist/assets/useLifecycle-D202VvPd.js +0 -1
  239. package/dist/assets/useNotebookActions-Bb4xxjuJ.js +0 -1
@@ -1 +0,0 @@
1
- import{s as a}from"./chunk-LvLJmgfZ.js";import{t as h}from"./react-Bj1aDYRI.js";import{t as e}from"./createLucideIcon-w-Qo9n0R.js";var r=e("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),p=e("hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]),c=e("toggle-left",[["circle",{cx:"9",cy:"12",r:"3",key:"u3jwor"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]),i=e("type",[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]),y=a(h(),1);function k(t){(0,y.useEffect)(t,[])}function o(t){(0,y.useEffect)(()=>t(),[])}export{p as a,c as i,o as n,r as o,i as r,k as t};
@@ -1 +0,0 @@
1
- import{s as we}from"./chunk-LvLJmgfZ.js";import{d as L,l as Ze,p as Xe,u as de}from"./useEvent-D91BmmQi.js";import{t as et}from"./react-Bj1aDYRI.js";import{$ as tt,E as ge,Sn as at,Vt as ot,_ as nt,_i as ce,_n as it,dr as st,et as lt,h as je,jr as rt,or as dt,rr as ct,t as ht,tr as pt,tt as ve,vn as mt,yn as ut}from"./cells-ArUhhHls.js";import{t as D}from"./compiler-runtime-B3qBwwSJ.js";import{n as ft,x as yt}from"./ai-model-dropdown-Dnf-CxbP.js";import{_ as T,d as Ce}from"./useEventListener-DGjKht0c.js";import{y as kt}from"./utils-DKaC_ndw.js";import{n as A,t as ze}from"./constants-tOPFFcLZ.js";import{S as he,h as bt,x as xt}from"./config-CmaJdl9U.js";import{t as wt}from"./jsx-runtime-Blw4afVn.js";import{o as gt}from"./alert-dialog-CXspBRlP.js";import{a as jt,c as vt,i as Ct,n as zt,r as Mt,s as Wt,t as St}from"./select--zcABebs.js";import{gt as _t}from"./JsonOutput-D1i8P1dG.js";import{c as Me,d as pe,n as Dt,o as At,r as me,t as Pt}from"./download-7EtMZf2Y.js";import{m as Nt}from"./form-BVnQnVQ2.js";import{t as It}from"./tooltip-DmqhBBs6.js";import{r as Et,t as ue}from"./button-BKVLeSTX.js";import{i as Lt,t as We}from"./strings-pfr2N700.js";import{r as H}from"./requests-9-v2bhoi.js";import{t as h}from"./createLucideIcon-w-Qo9n0R.js";import{a as Se,f as Tt,i as _e,m as Ht,p as De,u as Ae}from"./layout-Cudicm29.js";import{t as Pe}from"./check-B-sKate2.js";import{n as qt}from"./maps-B4xARV9R.js";import{r as Rt}from"./useCellActionButton-BiYBXHfb.js";import{t as Bt}from"./copy-DFMsQ6MJ.js";import{t as Vt}from"./eye-off-DgRJ-xBZ.js";import{t as Ft}from"./file-plus-corner-BjSB-E2p.js";import{t as J}from"./file-DaJ4JeZH.js";import{t as Ot}from"./github-CP61uL34.js";import{n as Yt,r as Kt,t as $t}from"./youtube-zkHE2QB5.js";import{i as Ut,n as Ne}from"./add-connection-dialog-ogwy8tvS.js";import{n as Gt,t as Jt}from"./square-BVY9SgWs.js";import{t as Qt}from"./image-CpSydGUq.js";import{t as Zt}from"./link-BCjh6ihR.js";import{r as Xt}from"./input-DjrybsRY.js";import{t as ea}from"./settings-D6Nc4lMz.js";import{y as ta}from"./textarea-DqzNK0s9.js";import{t as C}from"./use-toast-T0_cQDma.js";import{n as Ie,t as aa}from"./paths-Dfii2bN8.js";import{o as oa}from"./session-DDorezMU.js";import{a as na,c as ia,i as sa,n as la,r as ra}from"./dialog-CognbQV_.js";import{n as fe}from"./ImperativeModal-DSu22ncS.js";import{r as da,t as ca}from"./share-DkQqqFqC.js";import{n as Q}from"./copy-C8iWa1qI.js";import{r as ha}from"./useRunCells-DgBY-vh9.js";import{a as pa}from"./cell-link-D4UrIH9w.js";import{a as ma}from"./renderShortcut-Bjt8kSBs.js";import{t as ua}from"./icons-UbXYeuXE.js";import{t as fa}from"./links-wWTxfdQn.js";import{r as ya,t as Ee}from"./hooks-zQJ9iU_R.js";import{t as Le}from"./types-z6Sk3JCV.js";var ka=h("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),ba=h("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),Te=h("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"}]]),He=h("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"}]]),qe=h("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"}]]),xa=h("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"}]]),wa=h("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"}]]),ga=h("keyboard",[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]]),Re=h("layout-template",[["rect",{width:"18",height:"7",x:"3",y:"3",rx:"1",key:"f1a2em"}],["rect",{width:"9",height:"7",x:"3",y:"14",rx:"1",key:"jqznyg"}],["rect",{width:"5",height:"7",x:"16",y:"14",rx:"1",key:"q5h2i8"}]]),ja=h("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"}]]),va=h("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"}]]),Ca=h("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),Be=h("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"}]]),za=h("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"}]]),Ma=h("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"}]]),Ve=h("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"}]]),Fe=D(),ye=we(et(),1),a=we(wt(),1),Z="https://static.marimo.app";const Wa=e=>{let t=(0,Fe.c)(25),{onClose:n}=e,[o,s]=(0,ye.useState)(""),{exportAsHTML:r}=H(),l=`${o}-${Math.random().toString(36).slice(2,6)}`,i=`${Z}/static/${l}`,d;t[0]!==r||t[1]!==n||t[2]!==l?(d=async v=>{v.preventDefault(),n();let N=await r({download:!1,includeCode:!0,files:Tt.INSTANCE.filenames()}),z=C({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${Z}/api/static`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:N,path:l})}).catch(()=>{z.dismiss(),C({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:A.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]})})}),z.dismiss(),C({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."]})})},t[0]=r,t[1]=n,t[2]=l,t[3]=d):d=t[3];let m;t[4]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(ia,{children:"Share static notebook"}),t[4]=m):m=t[4];let w;t[5]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsxs)(na,{children:[m,(0,a.jsxs)(ra,{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:Z,target:"_blank",children:Z}),"."]})]}),t[5]=w):w=t[5];let g;t[6]===Symbol.for("react.memo_cache_sentinel")?(g=v=>{s(v.target.value.toLowerCase().replaceAll(/\s/g,"-").replaceAll(/[^\da-z-]/g,""))},t[6]=g):g=t[6];let u;t[7]===o?u=t[8]:(u=(0,a.jsx)(Xt,{"data-testid":"slug-input",id:"slug",autoFocus:!0,value:o,placeholder:"Notebook slug",onChange:g,required:!0,autoComplete:"off"}),t[7]=o,t[8]=u);let f;t[9]===i?f=t[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)(Sa,{text:i}),(0,a.jsx)("span",{className:"text-primary",children:i})]})]}),t[9]=i,t[10]=f);let y;t[11]!==u||t[12]!==f?(y=(0,a.jsxs)("div",{className:"flex flex-col gap-6 py-4",children:[u,f]}),t[11]=u,t[12]=f,t[13]=y):y=t[13];let k;t[14]===n?k=t[15]:(k=(0,a.jsx)(ue,{"data-testid":"cancel-share-static-notebook-button",variant:"secondary",onClick:n,children:"Cancel"}),t[14]=n,t[15]=k);let b;t[16]===i?b=t[17]:(b=(0,a.jsx)(ue,{"data-testid":"share-static-notebook-button","aria-label":"Save",variant:"default",type:"submit",onClick:async()=>{await Q(i)},children:"Create"}),t[16]=i,t[17]=b);let x;t[18]!==k||t[19]!==b?(x=(0,a.jsxs)(sa,{children:[k,b]}),t[18]=k,t[19]=b,t[20]=x):x=t[20];let j;return t[21]!==d||t[22]!==x||t[23]!==y?(j=(0,a.jsx)(la,{className:"w-fit",children:(0,a.jsxs)("form",{onSubmit:d,children:[w,y,x]})}),t[21]=d,t[22]=x,t[23]=y,t[24]=j):j=t[24],j};var Sa=e=>{let t=(0,Fe.c)(8),[n,o]=ye.useState(!1),s;t[0]===e.text?s=t[1]:(s=Et.stopPropagation(async m=>{m.preventDefault(),await Q(e.text),o(!0),setTimeout(()=>o(!1),2e3)}),t[0]=e.text,t[1]=s);let r=s,l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(Bt,{size:14,strokeWidth:1.5}),t[2]=l):l=t[2];let i;t[3]===r?i=t[4]:(i=(0,a.jsx)(ue,{"data-testid":"copy-static-notebook-url-button",onClick:r,size:"xs",variant:"secondary",children:l}),t[3]=r,t[4]=i);let d;return t[5]!==n||t[6]!==i?(d=(0,a.jsx)(It,{content:"Copied!",open:n,children:i}),t[5]=n,t[6]=i,t[7]=d):d=t[7],d},_a=D();function Da(){let e=document.getElementsByClassName(ze.outputArea);for(let t of e){let n=t.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=ce.findElement(t);if(!o){T.warn("Could not find HTMLCellId for visible output area",t);continue}return{cellId:ce.parse(o.id)}}}return T.warn("No visible output area found for scroll anchor"),null}function Aa(e){if(!e){T.warn("No scroll anchor provided to restore scroll position");return}let t=document.getElementById(ce.create(e.cellId));if(!t){T.warn("Could not find cell element to restore scroll position",e.cellId);return}if(!t.querySelector(`.${ze.outputArea}`)){T.warn("Could not find output area to restore scroll position",e.cellId);return}t.scrollIntoView({block:"start",behavior:"auto"})}function Oe(){let e=(0,_a.c)(2),t=L(ve),n;return e[0]===t?n=e[1]:(n=()=>{let o=Da();t(s=>({mode:lt(s.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{Aa(o)})})},e[0]=t,e[1]=n),n}const Ye=Xe(!1);var Pa=D();const Na=()=>{let e=(0,Pa.c)(7),{selectedLayout:t}=Se(),{setLayoutView:n}=_e();if(he()&&!at("wasm_layouts"))return null;let o;e[0]===n?o=e[1]:(o=i=>n(i),e[0]=n,e[1]=o);let s;e[2]===Symbol.for("react.memo_cache_sentinel")?(s=(0,a.jsx)(Wt,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(vt,{placeholder:"Select a view"})}),e[2]=s):s=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)(zt,{children:(0,a.jsxs)(Mt,{children:[(0,a.jsx)(jt,{children:"View as"}),Le.map(Ea)]})}),e[3]=r):r=e[3];let l;return e[4]!==t||e[5]!==o?(l=(0,a.jsxs)(St,{"data-testid":"layout-select",value:t,onValueChange:o,children:[s,r]}),e[4]=t,e[5]=o,e[6]=l):l=e[6],l};function Ia(e){return(0,a.jsx)(Ke(e),{className:"h-4 w-4"})}function Ke(e){switch(e){case"vertical":return ja;case"grid":return Kt;case"slides":return Be;default:return Lt(e),Jt}}function $e(e){return We.startCase(e)}function Ea(e){return(0,a.jsx)(Ct,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[Ia(e),(0,a.jsx)("span",{children:$e(e)})]})},e)}async function La(e){let{filename:t,preset:n,downloadPDF:o}=e;await o({filename:t,webpdf:!1,preset:n,includeInputs:!0,rasterServer:"static"})}var Ta=D();function Ha(e){let t=(0,Ta.c)(5),{openPrompt:n,closeModal:o}=fe(),{sendCopy:s}=H(),r;return t[0]!==o||t[1]!==n||t[2]!==s||t[3]!==e?(r=()=>{if(!e)return null;let l=aa.guessDeliminator(e);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${Ie.basename(e)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:i=>{let d=l.join(Ie.dirname(e),i);s({source:e,destination:d}).then(()=>{o(),C({title:"Notebook copied",description:"A copy of the notebook has been created."}),fa(d)})}})},t[0]=o,t[1]=n,t[2]=s,t[3]=e,t[4]=r):r=t[4],r}const qa=()=>{let{updateCellConfig:e}=ge(),{saveCellConfig:t}=H();return(0,ye.useCallback)(async()=>{let n=new ot,o=je(),s=o.cellIds.inOrderIds,r={};for(let i of s){if(o.cellData[i]===void 0)continue;let{code:d,config:m}=o.cellData[i];m.hide_code||n.isSupported(d)&&(r[i]={hide_code:!0})}let l=Ce.entries(r);if(l.length!==0){await t({configs:r});for(let[i,d]of l)e({cellId:i,config:d})}},[e])};var Ra=D();function Ue(){let e=(0,Ra.c)(4),{openConfirm:t}=fe(),n=L(bt),{sendRestart:o}=H(),s;return e[0]!==t||e[1]!==o||e[2]!==n?(s=()=>{t({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)(gt,{onClick:async()=>{n({state:xt.CLOSING}),await o(),da()},"aria-label":"Confirm Restart",children:"Restart"})})},e[0]=t,e[1]=o,e[2]=n,e[3]=s):s=e[3],s}var Ba=D(),P=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation()};function Va(){var be,xe;let e=(0,Ba.c)(51),t=pa(),{openModal:n,closeModal:o}=fe(),{toggleApplication:s}=it(),{selectedPanel:r}=mt(),[l]=Ze(ve),i=de(tt),d=qa(),[m]=kt(),{updateCellConfig:w,undoDeleteCell:g,clearAllCellOutputs:u,addSetupCellIfDoesntExist:f,collapseAllCells:y,expandAllCells:k}=ge(),b=Ue(),x=ha(),j=Ha(t),v=L(Ye),N=L(ft),z=L(yt),{exportAsIPYNB:ee,exportAsMarkdown:te,readCode:I,saveCellConfig:ae,updateCellOutputs:M}=H(),W=ya(),oe=de(nt),ne=de(ht),{selectedLayout:q}=Se(),{setLayoutView:ie}=_e(),R=Oe(),B=((be=m.sharing)==null?void 0:be.html)??!0,V=((xe=m.sharing)==null?void 0:xe.wasm)??!0,ke=!he(),se=q==="slides",Ge=so,Je=io,F;e[0]!==t||e[1]!==W||e[2]!==M?(F=async c=>{let{preset:p,title:E}=c;if(!t){X();return}await Me(E,async re=>{await Ee({takeScreenshots:()=>W({progress:re}),updateCellOutputs:M}),await La({filename:t,preset:p,downloadPDF:Dt})})},e[0]=t,e[1]=W,e[2]=M,e[3]=F):F=e[3];let S=F,O;e[4]===S?O=e[5]:(O=async()=>{if(ke){await S({preset:"document",title:"Downloading Document PDF..."});return}let c=new Event("export-beforeprint"),p=new Event("export-afterprint");window.dispatchEvent(c),setTimeout(no,0),setTimeout(()=>window.dispatchEvent(p),0)},e[4]=S,e[5]=O);let Y=O,K;e[6]!==ee||e[7]!==t||e[8]!==W||e[9]!==M?(K=async()=>{if(!t){X();return}await Me("Downloading IPYNB...",async c=>{await Ee({takeScreenshots:()=>W({progress:c}),updateCellOutputs:M});let p=await ee({download:!1});me(new Blob([p],{type:"application/x-ipynb+json"}),pe.toIPYNB(document.title))})},e[6]=ee,e[7]=t,e[8]=W,e[9]=M,e[10]=K):K=e[10];let le=K,$;e[11]===Symbol.for("react.memo_cache_sentinel")?($=(0,a.jsx)(_t,{size:14,strokeWidth:1.5}),e[11]=$):$=e[11];let U;e[12]===Symbol.for("react.memo_cache_sentinel")?(U=(0,a.jsx)(De,{size:14,strokeWidth:1.5}),e[12]=U):U=e[12];let _;e[13]===t?_=e[14]:(_=async()=>{if(!t){X();return}await Ae({filename:t,includeCode:!0})},e[13]=t,e[14]=_);let G;return e[15]!==f||e[16]!==ne||e[17]!==u||e[18]!==o||e[19]!==y||e[20]!==j||e[21]!==S||e[22]!==k||e[23]!==te||e[24]!==t||e[25]!==Y||e[26]!==le||e[27]!==oe||e[28]!==d||e[29]!==se||e[30]!==i||e[31]!==n||e[32]!==I||e[33]!==b||e[34]!==x||e[35]!==ae||e[36]!==q||e[37]!==r||e[38]!==v||e[39]!==z||e[40]!==ie||e[41]!==N||e[42]!==B||e[43]!==V||e[44]!==_||e[45]!==s||e[46]!==R||e[47]!==g||e[48]!==w||e[49]!==l.mode?(G=[{icon:$,label:"Download",handle:P,dropdown:[{icon:U,label:"Download as HTML",handle:_},{icon:(0,a.jsx)(De,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!t){X();return}await Ae({filename:t,includeCode:!1})}},{icon:(0,a.jsx)(ua,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let c=await te({download:!1});me(new Blob([c],{type:"text/plain"}),pe.toMarkdown(document.title))}},{icon:(0,a.jsx)(va,{size:14,strokeWidth:1.5}),label:"Download as ipynb",handle:le},{icon:(0,a.jsx)(Ht,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let c=await I();me(new Blob([c.contents],{type:"text/plain"}),pe.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(Qt,{size:14,strokeWidth:1.5}),label:"Download as PNG",disabled:l.mode!=="present",tooltip:l.mode==="present"?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",ma("global.hideCode",!1)]}),handle:oo},se?{divider:!0,icon:(0,a.jsx)(J,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:P,dropdown:[{icon:(0,a.jsx)(J,{size:14,strokeWidth:1.5}),label:"Document Layout",handle:Y},{icon:(0,a.jsx)(J,{size:14,strokeWidth:1.5}),label:"Slides Layout",rightElement:Je(!0),hidden:!ke,handle:async()=>{await S({preset:"slides",title:"Downloading Slides PDF..."})}}]}:{divider:!0,icon:(0,a.jsx)(J,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:Y}]},{icon:(0,a.jsx)(za,{size:14,strokeWidth:1.5}),label:"Share",handle:P,hidden:!B&&!V,dropdown:[{icon:(0,a.jsx)(Nt,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!B,handle:async()=>{n((0,a.jsx)(Wa,{onClose:o}))}},{icon:(0,a.jsx)(Zt,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!V,handle:async()=>{await Q(ca({code:(await I()).contents})),C({title:"Copied",description:"Link copied to clipboard."})}}]},{icon:(0,a.jsx)(Ca,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:P,dropdown:ut.flatMap(c=>{let{type:p,Icon:E,hidden:re,additionalKeywords:Qe}=c;return re?[]:{label:We.startCase(p),rightElement:Ge(r===p),icon:(0,a.jsx)(E,{size:14,strokeWidth:1.5}),handle:()=>s(p),additionalKeywords:Qe}})},{icon:(0,a.jsx)(Be,{size:14,strokeWidth:1.5}),label:"Present as",handle:P,dropdown:[{icon:l.mode==="present"?(0,a.jsx)(ta,{size:14,strokeWidth:1.5}):(0,a.jsx)(Re,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{R()}},...Le.map((c,p)=>{let E=Ke(c);return{divider:p===0,label:$e(c),icon:(0,a.jsx)(E,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:q===c&&(0,a.jsx)(Pe,{size:14})}),handle:()=>{ie(c),l.mode==="edit"&&R()}}})]},{icon:(0,a.jsx)(wa,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!t||he(),handle:j},{icon:(0,a.jsx)(Te,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!t,handle:async()=>{await Q((await I()).contents),C({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(Rt,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!oe||i,handle:async()=>{let c=rt(je());await ae({configs:Ce.fromEntries(c.map(ao))});for(let p of c)w({cellId:p,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(qe,{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)(Ne,{onClose:o}))}},{icon:(0,a.jsx)(Ut,{size:14,strokeWidth:1.5}),label:"Add remote storage",handle:()=>{n((0,a.jsx)(Ne,{defaultTab:"storage",onClose:o}))}},{icon:(0,a.jsx)(Ve,{size:14,strokeWidth:1.5}),label:"Undo cell deletion",hidden:!ne||i,handle:()=>{g()}},{icon:(0,a.jsx)(Ma,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:b,additionalKeywords:["reset","reload","restart"]},{icon:(0,a.jsx)(xa,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{x()}},{icon:(0,a.jsx)(dt,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{u()}},{icon:(0,a.jsx)(Vt,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",handle:d,redundant:!0},{icon:(0,a.jsx)(ba,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:y,redundant:!0},{icon:(0,a.jsx)(ka,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:k,redundant:!0},{divider:!0,icon:(0,a.jsx)(He,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>v(to)},{icon:(0,a.jsx)(ga,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>z(eo)},{icon:(0,a.jsx)(ea,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>N(Xa),redundant:!0,additionalKeywords:["preferences","options","configuration"]},{icon:(0,a.jsx)(qt,{size:14,strokeWidth:1.5}),label:"Resources",handle:P,dropdown:[{icon:(0,a.jsx)(st,{size:14,strokeWidth:1.5}),label:"Documentation",handle:Za},{icon:(0,a.jsx)(Ot,{size:14,strokeWidth:1.5}),label:"GitHub",handle:Qa},{icon:(0,a.jsx)(Yt,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:Ja},{icon:(0,a.jsx)($t,{size:14,strokeWidth:1.5}),label:"YouTube",handle:Ga},{icon:(0,a.jsx)(pt,{size:14,strokeWidth:1.5}),label:"Changelog",handle:Ua}]},{divider:!0,icon:(0,a.jsx)(Gt,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:$a},{icon:(0,a.jsx)(Ft,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:Ka}].filter(Ya).map(Fa),e[15]=f,e[16]=ne,e[17]=u,e[18]=o,e[19]=y,e[20]=j,e[21]=S,e[22]=k,e[23]=te,e[24]=t,e[25]=Y,e[26]=le,e[27]=oe,e[28]=d,e[29]=se,e[30]=i,e[31]=n,e[32]=I,e[33]=b,e[34]=x,e[35]=ae,e[36]=q,e[37]=r,e[38]=v,e[39]=z,e[40]=ie,e[41]=N,e[42]=B,e[43]=V,e[44]=_,e[45]=s,e[46]=R,e[47]=g,e[48]=w,e[49]=l.mode,e[50]=G):G=e[50],G}function Fa(e){return e.dropdown?{...e,dropdown:e.dropdown.filter(Oa)}:e}function Oa(e){return!e.hidden}function Ya(e){return!e.hidden}function Ka(){let e=oa();window.open(e,"_blank")}function $a(){let e=document.baseURI.split("?")[0];window.open(e,"_self")}function Ua(){window.open(A.releasesPage,"_blank")}function Ga(){window.open(A.youtube,"_blank")}function Ja(){window.open(A.discordLink,"_blank")}function Qa(){window.open(A.githubPage,"_blank")}function Za(){window.open(A.docsPage,"_blank")}function Xa(e){return!e}function eo(e){return!e}function to(e){return!e}function ao(e){return[e,{disabled:!1}]}async function oo(){let e=document.getElementById("App");e&&await At({element:e,filename:document.title,prepare:Pt})}function no(){return window.print()}function io(e){return e?(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 so(e){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:e&&(0,a.jsx)(Pe,{size:14})})}function X(){C({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{Oe as a,qe as c,Ye as i,He as l,Ue as n,Ve as o,Na as r,Re as s,Va as t,Te as u};