@marimo-team/frontend 0.23.2-dev53 → 0.23.2-dev55
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.
- package/dist/assets/{CellStatus-Dl2cuz44.js → CellStatus-Dtymd7Mw.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-Dpx-IkKu.js → ConnectedDataExplorerComponent-ChNjqWW0.js} +1 -1
- package/dist/assets/{JsonOutput-C9sdMiTb.js → JsonOutput-Cib1YSyW.js} +6 -6
- package/dist/assets/LazyAnyLanguageCodeMirror-BYkSpfWg.js +2 -0
- package/dist/assets/{MarimoErrorOutput-B58oLtN_.js → MarimoErrorOutput-CUkxKVSp.js} +1 -1
- package/dist/assets/{RenderHTML-Drt_i2fd.js → RenderHTML-aOmkRy0R.js} +1 -1
- package/dist/assets/{add-cell-with-ai-BMzH0JuZ.js → add-cell-with-ai-apfqz2QF.js} +1 -1
- package/dist/assets/{add-connection-dialog-D99_HhRY.js → add-connection-dialog-BEPj8ARO.js} +1 -1
- package/dist/assets/{agent-panel-D3tw0ZVQ.js → agent-panel-j9gn23Bw.js} +1 -1
- package/dist/assets/{ai-model-dropdown-CFk3mSaX.js → ai-model-dropdown-CMNpHk5I.js} +1 -1
- package/dist/assets/{any-language-editor-D_u8MU4y.js → any-language-editor-CFmH0GoP.js} +1 -1
- package/dist/assets/apl-ezh0ScS-.js +1 -0
- package/dist/assets/{app-config-button-dGsspe59.js → app-config-button-CXAAPUFL.js} +1 -1
- package/dist/assets/{arc-CUw6mOt_.js → arc-3DY1fURi.js} +1 -1
- package/dist/assets/{architecture-7HQA4BMR-BDbIOgim.js → architecture-7HQA4BMR-CKjkd5Dl.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-Co-kqUfj.js → architectureDiagram-VXUJARFQ-x1tfs-Zy.js} +1 -1
- package/dist/assets/asciiarmor-DBqyln4y.js +1 -0
- package/dist/assets/asn1-C9Hie9a5.js +1 -0
- package/dist/assets/{blockDiagram-VD42YOAC-BZFF4O48.js → blockDiagram-VD42YOAC-DsnHpCid.js} +1 -1
- package/dist/assets/brainfuck-BDNU41Mw.js +1 -0
- package/dist/assets/{c4Diagram-YG6GDRKO-BuxNZzQA.js → c4Diagram-YG6GDRKO-D32cjsO5.js} +1 -1
- package/dist/assets/{cell-editor-4qf8B3EV.js → cell-editor-DzvGVpZ4.js} +1 -1
- package/dist/assets/{cell-link-Df1ljd4V.js → cell-link-owqfXuA4.js} +1 -1
- package/dist/assets/{cells-8P3lr_U-.js → cells-BA9ZN5Xy.js} +4 -4
- package/dist/assets/channel-esN5troS.js +1 -0
- package/dist/assets/{chat-display-C_teRjCW.js → chat-display-AB-C2j6p.js} +1 -1
- package/dist/assets/{chat-panel-JtHFdSiv.js → chat-panel-C1Evz8wb.js} +1 -1
- package/dist/assets/{chat-ui-M6oxwFAv.js → chat-ui-CcArYoMw.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-BMWlISfL.js → chunk-4BX2VUAB-hp7-9s5b.js} +1 -1
- package/dist/assets/chunk-55IACEB6-C_BE0X2F.js +1 -0
- package/dist/assets/{chunk-5FQGJX7Z-nCjg4iIq.js → chunk-5FQGJX7Z-wbiBygI_.js} +2 -2
- package/dist/assets/{chunk-ABZYJK2D-BdqWJL6C.js → chunk-ABZYJK2D-CSzcbtsR.js} +3 -3
- package/dist/assets/{chunk-ATLVNIR6-DhAxBvQu.js → chunk-ATLVNIR6-BGYBu2zE.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-UEGowTjR.js → chunk-B4BG7PRW-S78japIA.js} +1 -1
- package/dist/assets/{chunk-CVBHYZKI-DjXGAbF8.js → chunk-CVBHYZKI-DJ6aHNEG.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-BI-k34yU.js → chunk-DI55MBZ5-B1Vz0MTl.js} +1 -1
- package/dist/assets/{chunk-EXTU4WIE-Cf3FrFD2.js → chunk-EXTU4WIE-D-Spa6rW.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-Br_iaV0k.js → chunk-FMBD7UC4-DiqdRLvx.js} +1 -1
- package/dist/assets/{chunk-HN2XXSSU-BIgd9FoK.js → chunk-HN2XXSSU-CigyI152.js} +1 -1
- package/dist/assets/{chunk-JA3XYJ7Z-C20zvmU0.js → chunk-JA3XYJ7Z-BJGCDHDS.js} +1 -1
- package/dist/assets/{chunk-JZLCHNYA-tBH7NxnH.js → chunk-JZLCHNYA-lm1LBIfJ.js} +1 -1
- package/dist/assets/{chunk-MI3HLSF2-DuSmwUb4.js → chunk-MI3HLSF2-vtv46ho2.js} +1 -1
- package/dist/assets/{chunk-N4CR4FBY-B6DmOrT5.js → chunk-N4CR4FBY-BQWUF0Ly.js} +2 -2
- package/dist/assets/{chunk-QN33PNHL-D0ePs-tP.js → chunk-QN33PNHL-Buv0c3y8.js} +1 -1
- package/dist/assets/{chunk-QXUST7PY-F4EbXpvl.js → chunk-QXUST7PY-tI3bGlcO.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-h7ysr5Be.js → chunk-QZHKN3VN-BWO63iFa.js} +1 -1
- package/dist/assets/{chunk-S3R3BYOJ-BXocTxmX.js → chunk-S3R3BYOJ-BwE-T8-d.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-RGPNKtVq.js → chunk-TZMSLE5B-zQ3MzIy5.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-BSpbvL3e.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-CQ49gdZV.js +1 -0
- package/dist/assets/{clike-D2zK8awx.js → clike-B5Yp94w5.js} +1 -1
- package/dist/assets/clojure-DnkK3bSc.js +1 -0
- package/dist/assets/cmake-BnWrJdTV.js +1 -0
- package/dist/assets/cobol-HBrO1JaF.js +1 -0
- package/dist/assets/{code-block-37QAKDTI-CL6_2ciQ.js → code-block-37QAKDTI-Bf-3UT2Z.js} +1 -1
- package/dist/assets/coffeescript-CRPuDhgD.js +1 -0
- package/dist/assets/{column-preview-Axu0HnwM.js → column-preview-B9m4l29S.js} +1 -1
- package/dist/assets/{command-palette-Cy62Xen5.js → command-palette-NX0xxB_G.js} +1 -1
- package/dist/assets/{common-B-NUAA5M.js → common-CakcoJKZ.js} +1 -1
- package/dist/assets/commonlisp-Da4KcekY.js +1 -0
- package/dist/assets/{components-B7Yfph8S.js → components-DVzYtTDe.js} +1 -1
- package/dist/assets/{components-xJCIMxt1.js → components-eaRIBPb2.js} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-CwhWNM78.js → cose-bilkent-S5V4N54A-DT_V8ZfF.js} +1 -1
- package/dist/assets/crystal-DSapLTsa.js +1 -0
- package/dist/assets/{css-DuJ9VuZT.js → css-B68S0me4.js} +1 -1
- package/dist/assets/cypher-xFGoEou9.js +1 -0
- package/dist/assets/d-DgvhEIBQ.js +1 -0
- package/dist/assets/{dagre-6UL2VRFP-Bw9A28Zb.js → dagre-6UL2VRFP-DGYXMu3i.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-DaGs_iP0.js → data-grid-overlay-editor-CD6KDhh4.js} +1 -1
- package/dist/assets/{datasource-CLc7VKPR.js → datasource-BZ77nRPA.js} +1 -1
- package/dist/assets/{dependency-graph-panel-CTP4_7yE.js → dependency-graph-panel-DJodxi-n.js} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-9RRguBOb.js → diagram-PSM6KHXK-Df7m0-Bk.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-Dn3AQqaQ.js → diagram-QEK2KX5R-BC5JXjfp.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-Dr7j-b-b.js → diagram-S2PKOQOG-D6E97R3h.js} +1 -1
- package/dist/assets/diff-_ncWAuCI.js +1 -0
- package/dist/assets/dist-BOBxlWRU.js +1 -0
- package/dist/assets/{dist-TiOM4ncZ.js → dist-C9byx33H.js} +1 -1
- package/dist/assets/dist-CAjNwSwp.js +1 -0
- package/dist/assets/{dist-Dms_H0dk.js → dist-CM2zL7eu.js} +1 -1
- package/dist/assets/{dist-DNRDNhXD.js → dist-ChEIZSwD.js} +1 -1
- package/dist/assets/{dist-76mkHkPd.js → dist-D9brkCnf.js} +1 -1
- package/dist/assets/dist-DEsgb6r0.js +1 -0
- package/dist/assets/{dist-Cb7Az_hD.js → dist-DK65leDK.js} +1 -1
- package/dist/assets/dist-DMIdeanR.js +1 -0
- package/dist/assets/{dist-B8_L0-Sq.js → dist-DX-ejWLY.js} +1 -1
- package/dist/assets/{dist-DhGUC1Cv.js → dist-DlFpiRHv.js} +1 -1
- package/dist/assets/{dist-Z0sjTHTz.js → dist-H-P6qorM.js} +1 -1
- package/dist/assets/{dist-DJOLbzFp.js → dist-HIpA48xV.js} +1 -1
- package/dist/assets/{dist-z-vBVd7F.js → dist-fKK_jBk2.js} +1 -1
- package/dist/assets/{dist-Bwr8x5jH.js → dist-vhQjV8kg.js} +1 -1
- package/dist/assets/{dockerfile-CxqYfxfC.js → dockerfile-COvjaTvv.js} +1 -1
- package/dist/assets/{documentation-panel-CuZ0vIRJ.js → documentation-panel-DMXEUS7v.js} +1 -1
- package/dist/assets/{download-C9hPuN_P.js → download-rCRPD7IF.js} +1 -1
- package/dist/assets/dtd-BnBIn3kr.js +1 -0
- package/dist/assets/dylan-CkGqQmFw.js +1 -0
- package/dist/assets/ecl-CFTIHpsV.js +1 -0
- package/dist/assets/{edit-page-DVwbBFLu.js → edit-page-B8Pq4PnX.js} +3 -3
- package/dist/assets/eiffel-DqSKoxJh.js +1 -0
- package/dist/assets/elm-dL9c1n0U.js +1 -0
- package/dist/assets/{erDiagram-Q2GNP2WA-CaHOm70x.js → erDiagram-Q2GNP2WA-AvxewI5H.js} +1 -1
- package/dist/assets/erlang-ZIYI48gw.js +1 -0
- package/dist/assets/{error-panel-w2nF9mem.js → error-panel-4rKxybFL.js} +1 -1
- package/dist/assets/{esm-DYK5NwJW.js → esm-jhgLTcf6.js} +1 -1
- package/dist/assets/factor-CDbckATe.js +1 -0
- package/dist/assets/{factor-V3yynXJW.js → factor-PbpmJuj6.js} +1 -1
- package/dist/assets/{file-explorer-panel-gGGNwR-_.js → file-explorer-panel-Bep-85KO.js} +4 -4
- package/dist/assets/{file-icons-1S5VCaFF.js → file-icons-CSF7UWQn.js} +1 -1
- package/dist/assets/{floating-outline-BZXnTZ1r.js → floating-outline-DzcyDJwQ.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-DWt4RNEI.js → flowDiagram-NV44I4VS-BqW0suiP.js} +1 -1
- package/dist/assets/{focus-D4FN7qb2.js → focus-BRfyPUhi.js} +1 -1
- package/dist/assets/{form-BfXyiimk.js → form-DBaVPTFv.js} +1 -1
- package/dist/assets/forth-ClT6YoKq.js +1 -0
- package/dist/assets/fortran-D3wR_E-8.js +1 -0
- package/dist/assets/{ganttDiagram-JELNMOA3-DXyypYug.js → ganttDiagram-JELNMOA3-CeCvJWgC.js} +1 -1
- package/dist/assets/gas-_ShnzaTM.js +1 -0
- package/dist/assets/gherkin-LsHtc0Ns.js +1 -0
- package/dist/assets/{gitGraph-G5XIXVHT-BiXp5Pqu.js → gitGraph-G5XIXVHT-nrZ-BMna.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-fvnnNeux.js → gitGraphDiagram-V2S2FVAM-Dn1AbOWu.js} +1 -1
- package/dist/assets/{glide-data-editor-B7dzZ0Hl.js → glide-data-editor-n2Pw7Fk9.js} +4 -4
- package/dist/assets/groovy-D_Yv0Fac.js +1 -0
- package/dist/assets/haskell-qhM1HAIB.js +1 -0
- package/dist/assets/haxe-Bi62PpIr.js +1 -0
- package/dist/assets/{home-page-Bgh9Dueq.js → home-page-BvfssQ5c.js} +1 -1
- package/dist/assets/{hooks-D_QT1i4z.js → hooks-B2ArfcJq.js} +1 -1
- package/dist/assets/{html-to-image-1NtYwXkp.js → html-to-image-BOWUS6J2.js} +1 -1
- package/dist/assets/idl-CI42bOaI.js +1 -0
- package/dist/assets/index-CD0jEnvj.css +2 -0
- package/dist/assets/index-DWhe-Tk9.js +42 -0
- package/dist/assets/{info-VBDWY6EO-BHp77s1u.js → info-VBDWY6EO-Bn_7XCeN.js} +1 -1
- package/dist/assets/{infoDiagram-HS3SLOUP-Bv1ylYFw.js → infoDiagram-HS3SLOUP-DTO3Z6Cg.js} +1 -1
- package/dist/assets/javascript-BNZ5YnSy.js +1 -0
- package/dist/assets/{journeyDiagram-XKPGCS4Q-CZ0ZUJxy.js → journeyDiagram-XKPGCS4Q-BQL61Vfo.js} +1 -1
- package/dist/assets/julia-dpVUKOp6.js +1 -0
- package/dist/assets/{kanban-definition-3W4ZIXB7-DM63C73P.js → kanban-definition-3W4ZIXB7-CMoUF4Qw.js} +1 -1
- package/dist/assets/katex-B5wxkMHB.js +1 -0
- package/dist/assets/{kiosk-mode-CIxmIlNA.js → kiosk-mode-BJNsfVZJ.js} +1 -1
- package/dist/assets/layout-Cp0JtSeH.js +9 -0
- package/dist/assets/{line-BZOJeOhX.js → line-BCZzhM6G.js} +1 -1
- package/dist/assets/{linear-BJDSDw_1.js → linear-DxS7NPzz.js} +1 -1
- package/dist/assets/livescript-BDwSUbUd.js +1 -0
- package/dist/assets/{logs-panel-BUepHA7e.js → logs-panel-bp6XOaLO.js} +1 -1
- package/dist/assets/lua-cGUKNtb5.js +1 -0
- package/dist/assets/{markdown-renderer-1cPM8PkF.js → markdown-renderer-3M2UXZOE.js} +3 -3
- package/dist/assets/mathematica-D4XScfvP.js +1 -0
- package/dist/assets/mbox-COnP75oc.js +1 -0
- package/dist/assets/mermaid-4DMBBIKO-D-U6KmKa.js +1 -0
- package/dist/assets/{mermaid-Dr2tNO_U.js → mermaid-CI6k86rB.js} +3 -3
- package/dist/assets/{mermaid-parser.core-Blvy2Lmj.js → mermaid-parser.core-B0EhnNjP.js} +2 -2
- package/dist/assets/{mhchem-Bu11NREP.js → mhchem-Bzl65iLm.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-CDScRMS5.js → mindmap-definition-VGOIOE7T-C0BN8YhO.js} +1 -1
- package/dist/assets/mirc-DXskkW6M.js +1 -0
- package/dist/assets/mllike-B3ebn_fS.js +1 -0
- package/dist/assets/modelica-Df8_BOFz.js +1 -0
- package/dist/assets/mscgen-ugK6iLdl.js +1 -0
- package/dist/assets/mumps-Qes0D9Sq.js +1 -0
- package/dist/assets/{name-cell-input-BQJD6TKP.js → name-cell-input-CUkoykAD.js} +1 -1
- package/dist/assets/{nsis-CiMgfKCy.js → nsis-BbDlITQ-.js} +1 -1
- package/dist/assets/nsis-CvTk2ElD.js +1 -0
- package/dist/assets/ntriples-BrWSHgAl.js +1 -0
- package/dist/assets/{number-overlay-editor-CmRseFFX.js → number-overlay-editor-DJEXT_Ye.js} +1 -1
- package/dist/assets/octave--UXUC2au.js +1 -0
- package/dist/assets/{ordinal-bLd73X85.js → ordinal-DTOdb5Da.js} +1 -1
- package/dist/assets/{outline-panel-DccaAsRc.js → outline-panel-s7vxHE_P.js} +1 -1
- package/dist/assets/oz-SCICUQnB.js +1 -0
- package/dist/assets/{packages-panel-abeJJVa6.js → packages-panel-CDb4sauq.js} +1 -1
- package/dist/assets/{packet-DYOGHKS2-C2onz98y.js → packet-DYOGHKS2-B53MIhbR.js} +1 -1
- package/dist/assets/{panels--d4wmuBV.js → panels-WQi_QnnZ.js} +1 -1
- package/dist/assets/pascal-BZRIRN0Y.js +1 -0
- package/dist/assets/perl-BJBf_VRX.js +1 -0
- package/dist/assets/{pie-VRWISCQL-Bc17vwvV.js → pie-VRWISCQL-CsQYRyI_.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-Kssfes1J.js → pieDiagram-ADFJNKIX-CZ1pBex_.js} +1 -1
- package/dist/assets/pig-8VtGvtGP.js +1 -0
- package/dist/assets/powershell-MUdKU-yo.js +1 -0
- package/dist/assets/{process-output-Co0mD7M7.js → process-output-C6_eNZv8.js} +1 -1
- package/dist/assets/properties-B_YTP79K.js +1 -0
- package/dist/assets/protobuf-BjqtN1d3.js +1 -0
- package/dist/assets/{pug-BitzPexG.js → pug-B2p6efPp.js} +1 -1
- package/dist/assets/pug-pCMDyY3V.js +1 -0
- package/dist/assets/puppet-ByNusmmY.js +1 -0
- package/dist/assets/python-CeK7Mdg6.js +1 -0
- package/dist/assets/q-BPLn3RjU.js +1 -0
- package/dist/assets/{quadrantDiagram-AYHSOK5B-DOI1nn6d.js → quadrantDiagram-AYHSOK5B-D6LNQBr8.js} +1 -1
- package/dist/assets/r-C6hL19P_.js +1 -0
- package/dist/assets/{radar-ZZBFDIW7-CESo4CB4.js → radar-ZZBFDIW7-DixuyYGz.js} +1 -1
- package/dist/assets/{react-vega-CJr0PRfC.js → react-vega-B2Q2ObPu.js} +1 -1
- package/dist/assets/{react-vega-Q4VpfXpZ.js → react-vega-D3GJC5Ll.js} +1 -1
- package/dist/assets/{readonly-python-code-BYdGKgJO.js → readonly-python-code-BBLUUIbP.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-D9zOgJ0D.js → requirementDiagram-UZGBJVZJ-BQCIkW22.js} +1 -1
- package/dist/assets/reveal-component-B_RnD8qR.js +91 -0
- package/dist/assets/reveal-component-DlPTFz1w.css +1 -0
- package/dist/assets/rpm-Cepx5AK5.js +1 -0
- package/dist/assets/ruby-8a_JNJtC.js +1 -0
- package/dist/assets/{run-page-o61CwGSS.js → run-page-BImjof7n.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-3o7wGJqY.js → sankeyDiagram-TZEHDZUN-WXVSVZRc.js} +1 -1
- package/dist/assets/sas-DRXu6Kkn.js +1 -0
- package/dist/assets/scheme-DaBlDkbO.js +1 -0
- package/dist/assets/{scratchpad-panel-CqsZSlFQ.js → scratchpad-panel-Ba0rcWha.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-Dch5j0ln.js → sequenceDiagram-WL72ISMW-FSYTKWFS.js} +1 -1
- package/dist/assets/{session-panel-C2KoZApR.js → session-panel-DY3Z3ICZ.js} +1 -1
- package/dist/assets/shell-CEmng-T5.js +1 -0
- package/dist/assets/sieve-CTG31Wbe.js +1 -0
- package/dist/assets/slide-Bv2zR5_1.js +1 -0
- package/dist/assets/slides-BVvo79ll.css +1 -0
- package/dist/assets/smalltalk-DlBjAIRH.js +1 -0
- package/dist/assets/{snippets-panel-dNanbU6P.js → snippets-panel-tfceTIEM.js} +1 -1
- package/dist/assets/sparql-D8XQtNgL.js +1 -0
- package/dist/assets/{state-BjyYO_pj.js → state-DI8CQM2I.js} +1 -1
- package/dist/assets/{state-8mx-Gzpe.js → state-SzKMGrBW.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-Bp3K2nTf.js → stateDiagram-FKZM4ZOC-NXeF8b27.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-co6cLoce.js +1 -0
- package/dist/assets/{step-DhHO_N3i.js → step-COhf-b0R.js} +1 -1
- package/dist/assets/stylus-DpfM4Y-0.js +1 -0
- package/dist/assets/swift-Bevjlmsx.js +1 -0
- package/dist/assets/{slides-component-BZCkobYT.css → swiper-component-a65-SW8d.css} +1 -1
- package/dist/assets/tcl-CWB1W9St.js +1 -0
- package/dist/assets/{textarea-BlamcRdb.js → textarea-D2liylO5.js} +1 -1
- package/dist/assets/textile-DrGyKlBQ.js +1 -0
- package/dist/assets/{time-DOg9EEiQ.js → time-hqD5bg84.js} +1 -1
- package/dist/assets/{timeline-definition-IT6M3QCI-D22iPBQw.js → timeline-definition-IT6M3QCI-B3aCCYAY.js} +1 -1
- package/dist/assets/toml-CF49H3Gs.js +1 -0
- package/dist/assets/{tracing-B8NKIKOU.js → tracing-BUxVK-Z_.js} +1 -1
- package/dist/assets/{tracing-panel-BqQ3Q7g4.js → tracing-panel-BZQdh8Uh.js} +2 -2
- package/dist/assets/{treemap-GDKQZRPO-C6pyMSJG.js → treemap-GDKQZRPO-C7ssVrVz.js} +1 -1
- package/dist/assets/troff-DS9glUnj.js +1 -0
- package/dist/assets/ttcn-cfg-D8JUANmi.js +1 -0
- package/dist/assets/ttcn-iXXxBDpr.js +1 -0
- package/dist/assets/turtle-IsYxGpD1.js +1 -0
- package/dist/assets/{useAddCell-CgMJXG5u.js → useAddCell-xtQoaf-X.js} +1 -1
- package/dist/assets/{useCellActionButton-DUVPJ4Hl.js → useCellActionButton-DXgH5B4A.js} +1 -1
- package/dist/assets/{useDeleteCell-dIpO8Ciq.js → useDeleteCell-C1_f7lEy.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-D3NiPzz8.js → useDependencyPanelTab-PKhgm9-V.js} +1 -1
- package/dist/assets/{useNotebookActions-1VNlr8Vn.js → useNotebookActions-BcUD5CgV.js} +1 -1
- package/dist/assets/{useRunCells-AtsnERdg.js → useRunCells-cIxqHRwZ.js} +1 -1
- package/dist/assets/{useSplitCell-D9U8UlYq.js → useSplitCell-B0qjEpW1.js} +1 -1
- package/dist/assets/vb-CJBc18Ui.js +1 -0
- package/dist/assets/vbscript-f-536WNP.js +1 -0
- package/dist/assets/{vega-component-C_1Yqryv.js → vega-component-Dh_sdcAu.js} +1 -1
- package/dist/assets/velocity-BKcC2FIu.js +1 -0
- package/dist/assets/verilog-BwwsdDY5.js +1 -0
- package/dist/assets/vhdl-BG8PfJd8.js +1 -0
- package/dist/assets/webidl-BHBWV-F6.js +1 -0
- package/dist/assets/xquery-BSuR2Wlv.js +1 -0
- package/dist/assets/{xychartDiagram-PRI3JC2R-DUV4EiPc.js → xychartDiagram-PRI3JC2R-eSL2LfH9.js} +1 -1
- package/dist/assets/yacas-DdJ1FiXV.js +1 -0
- package/dist/assets/z80-BWehJ3ot.js +1 -0
- package/dist/index.html +25 -25
- package/package.json +3 -1
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +9 -17
- package/src/components/slides/reveal-component.tsx +109 -0
- package/src/components/slides/reveal-slides.css +42 -0
- package/src/components/slides/slides.css +0 -65
- package/src/components/slides/{slides-component.tsx → swiper-component.tsx} +1 -0
- package/src/components/slides/swiper-slides.css +64 -0
- package/src/plugins/impl/FileBrowserPlugin.tsx +81 -81
- package/src/plugins/layout/carousel/CarouselPlugin.tsx +3 -1
- package/dist/assets/LazyAnyLanguageCodeMirror-DQ37z5WJ.js +0 -2
- package/dist/assets/apl-zXDdZe3b.js +0 -1
- package/dist/assets/asciiarmor-C4P5j9cB.js +0 -1
- package/dist/assets/asn1-BmvlpbhR.js +0 -1
- package/dist/assets/brainfuck-HeZPrFKt.js +0 -1
- package/dist/assets/channel-XPG8kgW4.js +0 -1
- package/dist/assets/chunk-55IACEB6-Ca_INVWD.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-C9Gp_-H7.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-CQ96TxMi.js +0 -1
- package/dist/assets/clojure-C27wDKbb.js +0 -1
- package/dist/assets/cmake-DTLeEUAM.js +0 -1
- package/dist/assets/cobol-BJPIeLtF.js +0 -1
- package/dist/assets/coffeescript-NgiUpRhS.js +0 -1
- package/dist/assets/commonlisp-BkT9ZPDN.js +0 -1
- package/dist/assets/crystal-Bitd2aUD.js +0 -1
- package/dist/assets/cypher-Ci0F-U_J.js +0 -1
- package/dist/assets/d-CU7m62P_.js +0 -1
- package/dist/assets/diff-LPTgtmzq.js +0 -1
- package/dist/assets/dist-B5D-VXw6.js +0 -1
- package/dist/assets/dist-BcAHn9Gv.js +0 -1
- package/dist/assets/dist-CTFfrmmP.js +0 -1
- package/dist/assets/dist-Cjki75I7.js +0 -1
- package/dist/assets/dtd-D9FRgoZV.js +0 -1
- package/dist/assets/dylan-DMd_ebr9.js +0 -1
- package/dist/assets/ecl-C6Ppu3h8.js +0 -1
- package/dist/assets/eiffel-D0YuMTki.js +0 -1
- package/dist/assets/elm-k_8Ytz1O.js +0 -1
- package/dist/assets/erlang-Bfu2djxR.js +0 -1
- package/dist/assets/factor-CklLCa7P.js +0 -1
- package/dist/assets/forth-BsoRX1Ft.js +0 -1
- package/dist/assets/fortran-BIkOx3oA.js +0 -1
- package/dist/assets/gas-Cfu4rUQ6.js +0 -1
- package/dist/assets/gherkin-44ooRqyb.js +0 -1
- package/dist/assets/groovy-D2i_FEas.js +0 -1
- package/dist/assets/haskell-CAhJaNla.js +0 -1
- package/dist/assets/haxe-DNq8wJUc.js +0 -1
- package/dist/assets/idl-CBimb3xm.js +0 -1
- package/dist/assets/index-9Au3XWKl.js +0 -42
- package/dist/assets/index-CeoQ1Qbe.css +0 -2
- package/dist/assets/javascript-BFLzYQw8.js +0 -1
- package/dist/assets/julia-VCZ-jWKK.js +0 -1
- package/dist/assets/katex-zERQ8y91.js +0 -1
- package/dist/assets/layout-j6GRgN2K.js +0 -9
- package/dist/assets/livescript-CPtH3n5e.js +0 -1
- package/dist/assets/lua-qdxE2XJ3.js +0 -1
- package/dist/assets/mathematica-qyBZdoz7.js +0 -1
- package/dist/assets/mbox--yzO0pxb.js +0 -1
- package/dist/assets/mermaid-4DMBBIKO-CSzyJvsp.js +0 -1
- package/dist/assets/mirc-CbGzQEf7.js +0 -1
- package/dist/assets/mllike-DwJesIvd.js +0 -1
- package/dist/assets/modelica-BND2a_jT.js +0 -1
- package/dist/assets/mscgen-Cn04QRW1.js +0 -1
- package/dist/assets/mumps-KrdGs3Qh.js +0 -1
- package/dist/assets/nsis-CvQk9XkS.js +0 -1
- package/dist/assets/ntriples-DbjBdJDz.js +0 -1
- package/dist/assets/octave-CfT0LFeY.js +0 -1
- package/dist/assets/oz-Cg7S4U1_.js +0 -1
- package/dist/assets/pascal-mX7rYX3T.js +0 -1
- package/dist/assets/perl-CGK9jmiF.js +0 -1
- package/dist/assets/pig-CFK2kNQW.js +0 -1
- package/dist/assets/powershell-uEhYYKIN.js +0 -1
- package/dist/assets/properties-RHm6rols.js +0 -1
- package/dist/assets/protobuf-C3XoURTg.js +0 -1
- package/dist/assets/pug-CWVDYepS.js +0 -1
- package/dist/assets/puppet-CCu7v6Hd.js +0 -1
- package/dist/assets/python-BehxLjmK.js +0 -1
- package/dist/assets/q-Cbfgib9f.js +0 -1
- package/dist/assets/r-4mqiiAnu.js +0 -1
- package/dist/assets/rpm-Bz3iKb9o.js +0 -1
- package/dist/assets/ruby-BC3ebZ6Z.js +0 -1
- package/dist/assets/sas-DQD-pmxe.js +0 -1
- package/dist/assets/scheme-D8nCz-EL.js +0 -1
- package/dist/assets/shell-DCinri7P.js +0 -1
- package/dist/assets/sieve-D8qaWsir.js +0 -1
- package/dist/assets/smalltalk-Ck_PF3cJ.js +0 -1
- package/dist/assets/sparql-BABonzsi.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-C5KiF5P0.js +0 -1
- package/dist/assets/stylus-BxMWjiZP.js +0 -1
- package/dist/assets/swift-BKYA0Gc9.js +0 -1
- package/dist/assets/tcl-C_cpPPQL.js +0 -1
- package/dist/assets/textile-CPY7x83b.js +0 -1
- package/dist/assets/toml-m3z29RUd.js +0 -1
- package/dist/assets/troff-Cl7x3iDw.js +0 -1
- package/dist/assets/ttcn-DkCC-rOY.js +0 -1
- package/dist/assets/ttcn-cfg-BCd_sJG6.js +0 -1
- package/dist/assets/turtle-DQInXG-V.js +0 -1
- package/dist/assets/vb-DkftDk-N.js +0 -1
- package/dist/assets/vbscript-BS7HrCGF.js +0 -1
- package/dist/assets/velocity-CWozNv6y.js +0 -1
- package/dist/assets/verilog-DM3Nu385.js +0 -1
- package/dist/assets/vhdl-Dd3i_TnJ.js +0 -1
- package/dist/assets/webidl-BFBpbXTu.js +0 -1
- package/dist/assets/xquery-Dp7eFbBW.js +0 -1
- package/dist/assets/yacas-rzv6MCL-.js +0 -1
- package/dist/assets/z80-DTVKGhEk.js +0 -1
- /package/dist/assets/{ImageComparisonComponent-BrQhXQzf.js → ImageComparisonComponent-BDf80c-c.js} +0 -0
- /package/dist/assets/{Plot-BtPUzyus.js → Plot-Dw2rpqfa.js} +0 -0
- /package/dist/assets/{apl-BstmXX35.js → apl-BYqtBlld.js} +0 -0
- /package/dist/assets/{array-BsTGuNdl.js → array-BF0shS9G.js} +0 -0
- /package/dist/assets/{asciiarmor-BWFvzTzr.js → asciiarmor-DUW0Iozu.js} +0 -0
- /package/dist/assets/{asn1-4ahf6nZf.js → asn1-ClnHsHDP.js} +0 -0
- /package/dist/assets/{asterisk-CXBNHM5o.js → asterisk-CO_c0gwL.js} +0 -0
- /package/dist/assets/{brainfuck-Bt_daVB8.js → brainfuck-FB_E90sw.js} +0 -0
- /package/dist/assets/{chunk-4F5CHEZ2-ft5dRptB.js → chunk-4F5CHEZ2-CiW94ehv.js} +0 -0
- /package/dist/assets/{chunk-B2363JML-BgmmJlek.js → chunk-B2363JML-Dj_BsGfX.js} +0 -0
- /package/dist/assets/{chunk-DR5Q36YT-RCKPahOt.js → chunk-DR5Q36YT-CCzZb1o4.js} +0 -0
- /package/dist/assets/{chunk-FRFDVMJY-iAJLsuCo.js → chunk-FRFDVMJY-BB5sTbw6.js} +0 -0
- /package/dist/assets/{chunk-PL6DKKU2-BtMOBDdg.js → chunk-PL6DKKU2-BVOKRgy0.js} +0 -0
- /package/dist/assets/{chunk-SJTYNZTY-D4u6Gt9b.js → chunk-SJTYNZTY-BY2Gu6VM.js} +0 -0
- /package/dist/assets/{chunk-TQ3KTPDO-BeeJe1sE.js → chunk-TQ3KTPDO-BXqsqDoM.js} +0 -0
- /package/dist/assets/{chunk-UMXZTB3W-CrzAAJdB.js → chunk-UMXZTB3W-2RQe-UTW.js} +0 -0
- /package/dist/assets/{click-outside-container-iNqKXwRr.js → click-outside-container-7UXGgq-9.js} +0 -0
- /package/dist/assets/{clike-9ER2MrCi.js → clike-B7PZCnaI.js} +0 -0
- /package/dist/assets/{clojure-CxGn3OMa.js → clojure-DtLrahuY.js} +0 -0
- /package/dist/assets/{cmake-Cocclwi5.js → cmake-DGfhkTv5.js} +0 -0
- /package/dist/assets/{cobol-DOSpbQlg.js → cobol-Cpbk-vCU.js} +0 -0
- /package/dist/assets/{coffeescript-PJYgwzYk.js → coffeescript-BATQF8kE.js} +0 -0
- /package/dist/assets/{colors-CfwCAObV.js → colors-C3_wIR8c.js} +0 -0
- /package/dist/assets/{common-keywords-BcXL6njV.js → common-keywords-CvypSGuw.js} +0 -0
- /package/dist/assets/{commonlisp-Dho-Xxsi.js → commonlisp-C9N48zGs.js} +0 -0
- /package/dist/assets/{crystal-D_PLBOY4.js → crystal-D2nrZv1k.js} +0 -0
- /package/dist/assets/{css-DU_SINdX.js → css-DNoZFvlx.js} +0 -0
- /package/dist/assets/{cypher-CVs3EgJV.js → cypher-6TFCZzgE.js} +0 -0
- /package/dist/assets/{cytoscape.esm-Z7RhDAMb.js → cytoscape.esm-BihqZ2_-.js} +0 -0
- /package/dist/assets/{d-Cr0PxKvU.js → d-DHH1X7PS.js} +0 -0
- /package/dist/assets/{diff-ELmwtFG-.js → diff-DNDp4fOd.js} +0 -0
- /package/dist/assets/{dist-Cuo7piLa.js → dist-B5ONF0fx.js} +0 -0
- /package/dist/assets/{dist-yDzOYJbU.js → dist-B804XDz9.js} +0 -0
- /package/dist/assets/{dist-De_C4bys.js → dist-Bgd1ZX49.js} +0 -0
- /package/dist/assets/{dist-CJ2fCJoy.js → dist-BiQrY0m-.js} +0 -0
- /package/dist/assets/{dist-D44_LgrX.js → dist-BvefCWaz.js} +0 -0
- /package/dist/assets/{dist-QPltPF77.js → dist-BvpmHCI2.js} +0 -0
- /package/dist/assets/{dist-CexWf73b.js → dist-C2akIBaE.js} +0 -0
- /package/dist/assets/{dist-Ba9R9Dz8.js → dist-C5pbZROJ.js} +0 -0
- /package/dist/assets/{dist-D2I5RjkX.js → dist-Cb9wJQiu.js} +0 -0
- /package/dist/assets/{dist-BicRLhLc.js → dist-Ct7BBGwl.js} +0 -0
- /package/dist/assets/{dist-IKB4sQxw.js → dist-D-j2KFQ4.js} +0 -0
- /package/dist/assets/{dist-nsjV__ZW.js → dist-D8d8D49Y.js} +0 -0
- /package/dist/assets/{dist-Bhj_nUh_.js → dist-D8llshvP.js} +0 -0
- /package/dist/assets/{dist-CV3hvZMV.js → dist-D8mC0RLm.js} +0 -0
- /package/dist/assets/{dist-C65QDoZM.js → dist-DDWNnRcK.js} +0 -0
- /package/dist/assets/{dist-DKV6fQlc.js → dist-G8rBPeDP.js} +0 -0
- /package/dist/assets/{dist-Ccf5fPww.js → dist-a6hqEAyw.js} +0 -0
- /package/dist/assets/{dtd-BCJ-JACA.js → dtd-BYdB19UC.js} +0 -0
- /package/dist/assets/{duckdb-keywords-Dk0kvdSE.js → duckdb-keywords-C63auBrb.js} +0 -0
- /package/dist/assets/{dylan-CpuKKrjP.js → dylan-3sqQfqPE.js} +0 -0
- /package/dist/assets/{ebnf-DC5-uXTG.js → ebnf-CJQ7hlUt.js} +0 -0
- /package/dist/assets/{ecl-CNXr8T-A.js → ecl-79y60Sdt.js} +0 -0
- /package/dist/assets/{eiffel-4rnhz6vx.js → eiffel-Cy1qkCDz.js} +0 -0
- /package/dist/assets/{elm-DqIXnEN7.js → elm-DrRzHEES.js} +0 -0
- /package/dist/assets/{erlang-ClXrVe7x.js → erlang-D3BTE-y0.js} +0 -0
- /package/dist/assets/{esm-DNqSpXan.js → esm-vpVfqVb3.js} +0 -0
- /package/dist/assets/{fcl-Dm8jAr5v.js → fcl-BM8Miy5A.js} +0 -0
- /package/dist/assets/{forth-Drc9Mq2q.js → forth-DGce5eRS.js} +0 -0
- /package/dist/assets/{fortran-3s1oXIdd.js → fortran-CS97oQQW.js} +0 -0
- /package/dist/assets/{gallery-page-Qv1z0vqJ.js → gallery-page-ClCkynuR.js} +0 -0
- /package/dist/assets/{gas-9fhb0BxH.js → gas-7e_zvN4u.js} +0 -0
- /package/dist/assets/{gherkin-BbXejBud.js → gherkin-3f1nzx4Y.js} +0 -0
- /package/dist/assets/{groovy-vGHsrkfP.js → groovy-Bn1MvSId.js} +0 -0
- /package/dist/assets/{haskell-B_n_nd13.js → haskell-qtyafuM6.js} +0 -0
- /package/dist/assets/{haxe-CZLEpedh.js → haxe-CQwWk_Ht.js} +0 -0
- /package/dist/assets/{http-BbUb1Nxd.js → http-DJG1eSBi.js} +0 -0
- /package/dist/assets/{idl-4ua5my6L.js → idl-BnUby_AK.js} +0 -0
- /package/dist/assets/{init-DBXDYgnX.js → init-AtRnKt23.js} +0 -0
- /package/dist/assets/{javascript-DJkKwr1o.js → javascript-BFKHKHDt.js} +0 -0
- /package/dist/assets/{julia-D54W08MX.js → julia-BZeLe6be.js} +0 -0
- /package/dist/assets/{katex-D5X2VC9a.js → katex-Bc4cO2Ba.js} +0 -0
- /package/dist/assets/{livescript-CUGosS3z.js → livescript-LB6oZdgV.js} +0 -0
- /package/dist/assets/{lua-Bw5Dts75.js → lua-D73MeF_d.js} +0 -0
- /package/dist/assets/{math-BlKAalxO.js → math-BIeW4iGV.js} +0 -0
- /package/dist/assets/{mathematica-CtCIuoIT.js → mathematica-SckqhulL.js} +0 -0
- /package/dist/assets/{mbox-vHFDJvnu.js → mbox-DpdjYR8y.js} +0 -0
- /package/dist/assets/{mirc-CO3Y9jrB.js → mirc-9Mp8ii_5.js} +0 -0
- /package/dist/assets/{mllike-BPxfCAkU.js → mllike-CteazA5r.js} +0 -0
- /package/dist/assets/{modelica-KAFBuHIl.js → modelica-DruS-uJ8.js} +0 -0
- /package/dist/assets/{mscgen-C9hxtsZo.js → mscgen-Dqm6ZJyo.js} +0 -0
- /package/dist/assets/{mumps-C8tf-yfB.js → mumps-DAwJeUn4.js} +0 -0
- /package/dist/assets/{nginx-C8lI27Qr.js → nginx-B_wjuKSa.js} +0 -0
- /package/dist/assets/{node-sql-parser-D2EeUmb_.js → node-sql-parser-UQ9Ur_LP.js} +0 -0
- /package/dist/assets/{ntriples-B6nCzSzC.js → ntriples-D5_p8srT.js} +0 -0
- /package/dist/assets/{octave-DW0WwOAI.js → octave-StxXX2kg.js} +0 -0
- /package/dist/assets/{oz-DD8PS1O-.js → oz-CZcv8Gut.js} +0 -0
- /package/dist/assets/{pascal-ConktTS9.js → pascal-BTSTYf7j.js} +0 -0
- /package/dist/assets/{path-BN6OBP1-.js → path-BMloFSsK.js} +0 -0
- /package/dist/assets/{perl-CdPrZHvr.js → perl-D3WNCnWS.js} +0 -0
- /package/dist/assets/{pig-Ds3ZQUps.js → pig-m1LfHx7X.js} +0 -0
- /package/dist/assets/{powershell-DKAfKCop.js → powershell-C7evXFhK.js} +0 -0
- /package/dist/assets/{properties-BwTwPAAW.js → properties-CX3A241c.js} +0 -0
- /package/dist/assets/{protobuf-CSgJ657o.js → protobuf-CEqDY4vo.js} +0 -0
- /package/dist/assets/{puppet-DyK_X0IF.js → puppet-DlFBPmUd.js} +0 -0
- /package/dist/assets/{python-BzeUYxHV.js → python-kNH0316T.js} +0 -0
- /package/dist/assets/{q-Bp0c6GRl.js → q-KQ_N2MXi.js} +0 -0
- /package/dist/assets/{r-Bli3FTy9.js → r-Dj_WdT8c.js} +0 -0
- /package/dist/assets/{rpm-D1AQK6PP.js → rpm-C3VyCeYo.js} +0 -0
- /package/dist/assets/{ruby-CJeu_toC.js → ruby-9RpAFOsP.js} +0 -0
- /package/dist/assets/{runs-BqrmCG8g.js → runs-BBFoea9K.js} +0 -0
- /package/dist/assets/{sas-Bbulq05Z.js → sas-CFBIkOrK.js} +0 -0
- /package/dist/assets/{scheme-C-VI8l-Y.js → scheme-n4WmsRUQ.js} +0 -0
- /package/dist/assets/{secrets-panel-BYCKy2bq.js → secrets-panel-B6HrST_M.js} +0 -0
- /package/dist/assets/{shell-Du-MFK9C.js → shell-BDAgpmgp.js} +0 -0
- /package/dist/assets/{sieve-D-IiUoQM.js → sieve-BVNIn7Yz.js} +0 -0
- /package/dist/assets/{simple-mode-B77AAnss.js → simple-mode-C-nP-kAb.js} +0 -0
- /package/dist/assets/{smalltalk-Br_CIpIz.js → smalltalk-C7nE9dmX.js} +0 -0
- /package/dist/assets/{solr-B42XCz31.js → solr-CU1BrlpT.js} +0 -0
- /package/dist/assets/{sparql-D5wiDU0O.js → sparql-DPFIzZM3.js} +0 -0
- /package/dist/assets/{spreadsheet-i4lKksl1.js → spreadsheet-DwP77QON.js} +0 -0
- /package/dist/assets/{sql-DqKGJcVl.js → sql-CBifPEyZ.js} +0 -0
- /package/dist/assets/{src-Y10841-5.js → src-DSbF9mby.js} +0 -0
- /package/dist/assets/{stylus-B2ABZxy2.js → stylus-DGcebGVS.js} +0 -0
- /package/dist/assets/{swift-ChWLZtLs.js → swift-DiAJo7C6.js} +0 -0
- /package/dist/assets/{slides-component-JmbdxQRi.js → swiper-component-BIp7oQxt.js} +0 -0
- /package/dist/assets/{tcl-Csz4f9yo.js → tcl-DpD837eJ.js} +0 -0
- /package/dist/assets/{terminal-Dl-rK2s6.js → terminal-6UFUAGzf.js} +0 -0
- /package/dist/assets/{textile-BkobWAZm.js → textile-DEqOicm6.js} +0 -0
- /package/dist/assets/{tiddlywiki-_SfxCz_S.js → tiddlywiki-CqVNI8lH.js} +0 -0
- /package/dist/assets/{tiki-CsWPWNaK.js → tiki-BIINIJTn.js} +0 -0
- /package/dist/assets/{toml-D9FWqYWJ.js → toml-BdA-7EhB.js} +0 -0
- /package/dist/assets/{treemap-uLQtQM8H.js → treemap-DqSsE4KM.js} +0 -0
- /package/dist/assets/{troff-_FD6SvcN.js → troff-iGRgQHLe.js} +0 -0
- /package/dist/assets/{ttcn-iTU0yTJO.js → ttcn-CLQ1c3XL.js} +0 -0
- /package/dist/assets/{ttcn-cfg-BpuB7J-4.js → ttcn-cfg-BFj90pgD.js} +0 -0
- /package/dist/assets/{turtle-DeajVfM4.js → turtle-DwFVq6UC.js} +0 -0
- /package/dist/assets/{types-DOn3dVLe.js → types-D8yP89N6.js} +0 -0
- /package/dist/assets/{vb-CNt-SiTR.js → vb-gm5P9Pn5.js} +0 -0
- /package/dist/assets/{vbscript-CTcoUFsF.js → vbscript-gQvKiDdU.js} +0 -0
- /package/dist/assets/{velocity-Byki2ixP.js → velocity-CkfRmD_d.js} +0 -0
- /package/dist/assets/{verilog-BqGsyPoM.js → verilog-D3b05tu1.js} +0 -0
- /package/dist/assets/{vhdl-BHGnwNx2.js → vhdl-DRo1SU3e.js} +0 -0
- /package/dist/assets/{web-vitals-DnD787Fp.js → web-vitals-CUbDLLN1.js} +0 -0
- /package/dist/assets/{webidl-BuMDLiG2.js → webidl-DFtmGFay.js} +0 -0
- /package/dist/assets/{xquery-BNYKiL_b.js → xquery-CzUikajR.js} +0 -0
- /package/dist/assets/{yacas-NrmlIdJT.js → yacas-BqvQWbYq.js} +0 -0
- /package/dist/assets/{z80-2Lz3j0ZU.js → z80-CQqkYd-2.js} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var Ot=Object.defineProperty;var $t=(t,e,n)=>e in t?Ot(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Q=(t,e,n)=>$t(t,typeof e!="symbol"?e+"":e,n);import{s as
|
|
1
|
+
var Ot=Object.defineProperty;var $t=(t,e,n)=>e in t?Ot(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Q=(t,e,n)=>$t(t,typeof e!="symbol"?e+"":e,n);import{s as Ee}from"./chunk-LvLJmgfZ.js";import{i as Tt,l as fe,n as J,p as Ae,u as he}from"./useEvent-D91BmmQi.js";import{t as Rt}from"./react-Bj1aDYRI.js";import{E as Et,Nn as Ie,gr as At,mi as It,vi as Be}from"./cells-BA9ZN5Xy.js";import"./react-dom-CSu739Rf.js";import{t as oe}from"./compiler-runtime-B3qBwwSJ.js";import{_ as je,v as Bt}from"./useEventListener-BR0C1MaI.js";import{t as Lt}from"./invariant-BUdrueMv.js";import{p as Vt,u as Le}from"./utils-DIGrmLDO.js";import{S as xe}from"./config-Calf6e81.js";import{t as re}from"./cn-DCUzRj2J.js";import{t as Ht}from"./jsx-runtime-BqBOg78p.js";import"./fullscreen-BDxedMYP.js";import{n as qt}from"./multi-map-rafH3cg3.js";import{o as Ut}from"./alert-dialog-BGBdrcqJ.js";import"./popover-UExmgBsf.js";import{a as $,c as ce,p as Ve,r as He,t as qe}from"./dropdown-menu-D1A3cFC8.js";import{a as Wt,i as Ue,o as ue,vt as be}from"./JsonOutput-Cib1YSyW.js";import{c as Kt,i as ve,r as ge}from"./download-rCRPD7IF.js";import{t as A}from"./tooltip-Gcwqb_SK.js";import{n as Gt,t as T}from"./button-D9nb17Rw.js";import{St as Jt}from"./dist-BrR4M-k3.js";import"./cjs-BRGiG41H.js";import"./main-B0OX4z33.js";import"./useNonce-DfoVjkkH.js";import{n as Yt,r as we}from"./requests-DIwGYs0l.js";import{t as X}from"./createLucideIcon-D5guW7EU.js";import{a as We,c as Ke,i as Ge,n as ye,o as Ne,r as Zt,t as Qt}from"./state-Dlj7aAV2.js";import{n as Xt}from"./LazyAnyLanguageCodeMirror-BYkSpfWg.js";import{t as ea}from"./x-C-6liIBr.js";import{n as ke}from"./maps-C48Oksn0.js";import{n as Fe}from"./markdown-renderer-3M2UXZOE.js";import{u as ta}from"./toDate-B5A0DFEz.js";import{t as Ce}from"./copy-BwrPA9zQ.js";import{t as aa}from"./eye-off-n1Li95bE.js";import{a as na,i as Je,n as Ye,r as sa,t as ra}from"./file-icons-CSF7UWQn.js";import{t as Ze}from"./file-BrdxGLRX.js";import{i as Qe,r as ia,t as Xe}from"./add-connection-dialog-BEPj8ARO.js";import{n as _e,t as la}from"./spinner-jEqwgi_c.js";import{t as et}from"./plus-BueqiM86.js";import{t as tt}from"./refresh-cw-BmiNHssk.js";import{t as oa}from"./save-B_q9ApPf.js";import{t as ca}from"./trash-2-C5AzNaHr.js";import{t as da}from"./triangle-alert-CBEvAwaa.js";import{i as ha,n as ma,t as pa}from"./es-CjWf0wU3.js";import"./dist-BwejP-9J.js";import"./dist-G3xLh7ZX.js";import"./dist-idZNafp8.js";import"./dist-DfWgLTCQ.js";import"./dist-Dg3CCt0r.js";import{t as I}from"./use-toast-PYIpV284.js";import{t as Se}from"./paths-DsQUzvvb.js";import"./session-DdhIEena.js";import"./purify.es-Cg0r2qW-.js";import"./dates-CtmdgiVR.js";import{n as me}from"./copy-BnK_ki61.js";import{t as fa}from"./copy-icon-D189KR4Z.js";import{t as at}from"./context-BrNoqz7t.js";import{n as nt}from"./ImperativeModal-CAFE3UV7.js";import{r as xa}from"./errors-DVkmLSXX.js";import{n as ua,t as st}from"./blob-CpeNXBj-.js";import"./utils-DVodi8oQ.js";import"./vega-loader.browser-CRZ52CKf.js";import"./defaultLocale-D_rSvXvJ.js";import"./defaultLocale-C92Rrpmf.js";import{a as ga,i as ya,n as Pe,r as ja,t as ba}from"./tree-Dtn4o2IZ.js";import{n as va,t as wa}from"./alert-DD-RU0QZ.js";import{n as rt}from"./error-banner-BxlXxssi.js";import{n as De}from"./useAsyncData-BRNkjHs1.js";import{a as Na,o as it,t as ka,u as Fa}from"./command-DQS2IzwJ.js";import"./chunk-5FQGJX7Z-wbiBygI_.js";import"./html-to-image-BOWUS6J2.js";import{o as Ca}from"./focus-BRfyPUhi.js";import"./react-resizable-panels.browser.esm-xQHRvEag.js";import{a as _a}from"./renderShortcut-B-72v1dC.js";import{t as Sa}from"./bundle.esm-sq57iaa5.js";import{t as lt}from"./useAddCell-xtQoaf-X.js";import{a as Pa,c as ee,d as Me,l as ot,u as ct}from"./components-eaRIBPb2.js";import{t as Da}from"./empty-state-CrP10sqm.js";import{t as ze}from"./formatting-CbFi9xG8.js";import{a as Ma,i as za,n as dt,r as ht,t as mt}from"./components-DVzYtTDe.js";import{n as pt,t as Oa}from"./marimo-icons-Ce24dQVN.js";import{t as $a}from"./links-DhwG_EVu.js";var Ta=X("book-plus",[["path",{d:"M12 7v6",key:"lw1j43"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M9 10h6",key:"9gxzsh"}]]),Ra=X("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),ft=X("file-plus-corner",[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]]),Ea=X("file-symlink",[["path",{d:"M4 11V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h7",key:"huwfnr"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m10 18 3-3-3-3",key:"18f6ys"}]]),xt=X("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),ut=X("list-tree",[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]),Aa=X("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Ia=X("square-play",[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]]),gt=X("view",[["path",{d:"M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2",key:"mrq65r"}],["path",{d:"M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2",key:"be3xqs"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]),z=Ee(Rt(),1),Ba=oe(),a=Ee(Ht(),1);const yt=t=>{let e=(0,Ba.c)(17),{filename:n,filenameIcon:i,onBack:r,onRefresh:s,onDownload:d,actions:c}=t,h;e[0]===r?h=e[1]:(h=r&&(0,a.jsx)(A,{content:"Back to file list",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:r,children:(0,a.jsx)(Ke,{className:"h-4 w-4"})})}),e[0]=r,e[1]=h);let l;e[2]!==n||e[3]!==i?(l=n?(0,a.jsxs)("span",{className:"flex items-center gap-1.5 flex-1 min-w-0 text-xs font-semibold truncate",children:[i,n]}):(0,a.jsx)("span",{className:"flex-1"}),e[2]=n,e[3]=i,e[4]=l):l=e[4];let f;e[5]===s?f=e[6]:(f=s&&(0,a.jsx)(A,{content:"Refresh",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:s,children:(0,a.jsx)(tt,{className:"h-3.5 w-3.5"})})}),e[5]=s,e[6]=f);let x;e[7]===d?x=e[8]:(x=d&&(0,a.jsx)(A,{content:"Download",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:d,children:(0,a.jsx)(be,{className:"h-3.5 w-3.5"})})}),e[7]=d,e[8]=x);let p;e[9]!==c||e[10]!==f||e[11]!==x?(p=(0,a.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",children:[f,c,x]}),e[9]=c,e[10]=f,e[11]=x,e[12]=p):p=e[12];let g;return e[13]!==h||e[14]!==l||e[15]!==p?(g=(0,a.jsxs)("div",{className:"flex items-center shrink-0 border-b px-1 gap-1",children:[h,l,p]}),e[13]=h,e[14]=l,e[15]=p,e[16]=g):g=e[16],g};var La=new Set(["http","file","in-memory"]);function Oe(t){return JSON.stringify(t).slice(1,-1)}const jt=[{id:"read-file",label:"Insert read snippet",icon:Ta,getCode:t=>{if(t.entry.kind==="directory")return null;let e=Oe(t.entry.path);return t.backendType==="obstore"?`_data = ${t.variableName}.get("${e}").bytes()
|
|
2
2
|
_data`:`_data = ${t.variableName}.cat_file("${e}")
|
|
3
|
-
_data`}},{id:"download-file",label:"Insert download snippet",icon:
|
|
3
|
+
_data`}},{id:"download-file",label:"Insert download snippet",icon:Ea,getCode:t=>{if(t.entry.kind==="directory")return null;let e=Oe(t.entry.path);if(t.backendType==="obstore")return La.has(t.protocol)?null:`from datetime import timedelta
|
|
4
4
|
from obstore import sign
|
|
5
5
|
|
|
6
6
|
signed_url = sign(
|
|
7
7
|
${t.variableName}, "GET", "${e}",
|
|
8
8
|
expires_in=timedelta(hours=1),
|
|
9
9
|
)
|
|
10
|
-
signed_url`;let n=Oe(t.entry.path.split("/").pop()||"download");return`${t.variableName}.get("${e}", "${n}")`}}];var Va=100*1024*1024;function Ha(t){let e=t.endsWith("/")?t.slice(0,-1):t,n=e.split("/");return n[n.length-1]||e}const qa=({entry:t,namespace:e,protocol:n,backendType:i,onBack:r})=>{let{locale:s}=at(),d=lt(),c=Ha(t.path),h=t.mimeType||"text/plain",l=ue(h),f=l&&t.size>Va&&t.size>0,{data:x,isPending:p,error:g,refetch:j}=De(async()=>{if(f)return null;let m=await Ne.request({namespace:e,path:t.path,preview:!l});if(m.error)throw Error(m.error);if(!m.url)throw Error("No URL returned");if(l)return{type:"media",url:m.url};let b=await fetch(m.url);if(!b.ok)throw Error(`Failed to fetch preview: ${b.statusText}`);return{type:"text",content:await b.text()}},[e,t.path,l,f]),w=(0,z.useCallback)(async()=>{try{let m=await Ne.request({namespace:e,path:t.path});if(m.error){I({title:"Download failed",description:m.error,variant:"danger"});return}m.url&&ve(m.url,m.filename??c)}catch(m){je.error("Failed to download storage entry",m),I({title:"Download failed",description:String(m),variant:"danger"})}},[e,t.path,c]),v=jt.map(m=>{let b=m.getCode({variableName:e,protocol:n,entry:t,backendType:i});if(b===null)return null;let u=m.icon;return(0,a.jsx)(E,{content:m.label,children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:()=>d(b),"aria-label":m.label,children:(0,a.jsx)(u,{className:"h-3.5 w-3.5"})})},m.id)}),o=(0,a.jsx)(yt,{filename:c,filenameIcon:Je(c),onBack:r,onDownload:w,actions:v}),y=({includeMime:m=!1})=>(0,a.jsxs)("div",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 p-4 text-xs",children:[(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Path"}),(0,a.jsxs)("div",{className:"truncate flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"font-mono text-[11px]",children:t.path}),(0,a.jsx)(fa,{value:t.path,className:"h-3 w-3"})]}),m&&(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Type"}),m&&(0,a.jsx)("span",{children:h}),t.size>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Size"}),(0,a.jsx)("span",{children:ze(t.size,s)})]}),t.lastModified!=null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Modified"}),(0,a.jsx)("span",{children:new Date(t.lastModified*1e3).toLocaleString()})]})]});return f?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({includeMime:!0}),(0,a.jsxs)("div",{className:"px-4 pb-4 text-xs text-muted-foreground italic",children:["File is too large to preview (",ze(t.size,s),")."]})]}):p?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-center gap-2 text-xs text-muted-foreground min-h-24",children:[(0,a.jsx)(_e,{className:"h-4 w-4 animate-spin"}),"Loading preview..."]})]}):g?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({includeMime:!0}),(0,a.jsxs)("div",{className:"px-4 pb-4 text-xs text-destructive",children:["Failed to load preview: ",g.message]}),(0,a.jsx)("div",{className:"px-4 pb-4",children:(0,a.jsxs)(T,{variant:"secondary",size:"xs",onClick:j,children:[(0,a.jsx)(tt,{className:"h-3 w-3 mr-1"}),"Retry"]})})]}):x?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({}),(0,a.jsx)(Ue,{mimeType:h,contents:x.type==="text"?x.content:void 0,mediaSource:x.type==="media"?{url:x.url}:void 0})]}):(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({includeMime:!0}),(0,a.jsxs)("div",{className:"p-4 flex items-center gap-2 text-xs text-muted-foreground",children:[(0,a.jsx)(Ze,{className:"h-4 w-4"}),"Preview not available for this file type."]})]})};var $e=oe(),Ua=16;function te(t){return{paddingLeft:t*Ua}}function Wa(t,e){return new Date(t*1e3).toLocaleDateString(e,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function bt(t){let e=t.endsWith("/")?t.slice(0,-1):t,n=e.split("/");return n[n.length-1]||e}function Te(t,e,n,i){let r=n.toLowerCase();if(bt(t.path).toLowerCase().includes(r))return!0;if(t.kind==="directory"){let s=i.get(We(e,t.path));if(s)return s.some(d=>Te(d,e,n,i))}return!1}function vt(t,e,n,i){return n.trim()?t.filter(r=>Te(r,e,n,i)):t}var Ka=t=>{let e=(0,$e.c)(36),{namespace:n,protocol:i,rootPath:r,backendType:s,prefix:d,depth:c,locale:h,searchValue:l,onOpenFile:f}=t,{entriesByPath:x}=ye(),{entries:p,isPending:g,error:j}=Ge(n,d);if(g){let o;e[0]===c?o=e[1]:(o=te(c),e[0]=c,e[1]=o);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=(0,a.jsx)(_e,{className:"h-3 w-3 animate-spin"}),e[2]=y):y=e[2];let m;return e[3]===o?m=e[4]:(m=(0,a.jsxs)("div",{className:"flex items-center gap-1.5 py-1 text-xs text-muted-foreground",style:o,children:[y,"Loading..."]}),e[3]=o,e[4]=m),m}if(j){let o;e[5]===c?o=e[6]:(o=te(c),e[5]=c,e[6]=o);let y;return e[7]!==j.message||e[8]!==o?(y=(0,a.jsxs)("div",{className:"py-1 text-xs text-destructive",style:o,children:["Failed to load: ",j.message]}),e[7]=j.message,e[8]=o,e[9]=y):y=e[9],y}if(p.length===0){let o;e[10]===c?o=e[11]:(o=te(c),e[10]=c,e[11]=o);let y;return e[12]===o?y=e[13]:(y=(0,a.jsx)("div",{className:"py-1 text-xs text-muted-foreground italic",style:o,children:"Empty"}),e[12]=o,e[13]=y),y}let w;if(e[14]!==s||e[15]!==p||e[16]!==c||e[17]!==x||e[18]!==h||e[19]!==n||e[20]!==f||e[21]!==i||e[22]!==r||e[23]!==l){let o=vt(p,n,l,x),y;e[25]!==s||e[26]!==c||e[27]!==h||e[28]!==n||e[29]!==f||e[30]!==i||e[31]!==r||e[32]!==l?(y=m=>(0,a.jsx)(wt,{entry:m,namespace:n,protocol:i,rootPath:r,backendType:s,depth:c,locale:h,searchValue:l,onOpenFile:f},m.path),e[25]=s,e[26]=c,e[27]=h,e[28]=n,e[29]=f,e[30]=i,e[31]=r,e[32]=l,e[33]=y):y=e[33],w=o.map(y),e[14]=s,e[15]=p,e[16]=c,e[17]=x,e[18]=h,e[19]=n,e[20]=f,e[21]=i,e[22]=r,e[23]=l,e[24]=w}else w=e[24];let v;return e[34]===w?v=e[35]:(v=(0,a.jsx)(a.Fragment,{children:w}),e[34]=w,e[35]=v),v},wt=({entry:t,namespace:e,protocol:n,rootPath:i,backendType:r,depth:s,locale:d,searchValue:c,onOpenFile:h})=>{var b;let[l,f]=(0,z.useState)(!1),{entriesByPath:x}=ye(),p=lt(),g=t.kind==="directory",j=bt(t.path),w=!!c.trim(),v=g&&w&&j.toLowerCase().includes(c.trim().toLowerCase()),o=g&&w&&!!((b=x.get(We(e,t.path)))!=null&&b.some(u=>Te(u,e,c,x))),y=l||o,m=(0,z.useCallback)(async()=>{try{let u=await Ne.request({namespace:e,path:t.path});if(u.error){I({title:"Download failed",description:u.error,variant:"danger"});return}u.url&&ve(u.url,u.filename??"download")}catch(u){je.error("Failed to download storage entry",u),I({title:"Download failed",description:String(u),variant:"danger"})}},[e,t.path]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(it,{className:re("text-xs flex items-center gap-1.5 cursor-pointer rounded-none group h-6.5",g&&"font-medium"),style:te(s),value:`${e}:${t.path}`,onSelect:()=>{g?f(!y):h({entry:t,namespace:e,protocol:n,backendType:r})},children:[g?(0,a.jsx)(Me,{isExpanded:y,className:"h-3 w-3"}):(0,a.jsx)("span",{className:"w-3 shrink-0"}),g?(0,a.jsx)(na,{className:re("h-3.5 w-3.5 shrink-0",Ye.directory)}):Je(j),(0,a.jsx)("span",{className:"truncate flex-1 text-left",children:j}),(0,a.jsxs)("div",{className:"flex items-center",children:[t.size>0&&(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground pr-2 opacity-0 group-hover:opacity-100 transition-opacity tabular-nums",children:ze(t.size,d)}),t.lastModified!=null&&(0,a.jsx)(E,{content:`Last modified: ${new Date(t.lastModified*1e3).toLocaleString()}`,children:(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground pr-1 opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap",children:Wa(t.lastModified,d)})}),(0,a.jsxs)(qe,{children:[(0,a.jsx)(Ve,{asChild:!0,children:(0,a.jsx)(ot,{iconClassName:"h-3 w-3",onClick:u=>u.stopPropagation()})}),(0,a.jsxs)(He,{align:"end",onClick:u=>u.stopPropagation(),onCloseAutoFocus:u=>u.preventDefault(),children:[!g&&(0,a.jsxs)($,{onSelect:()=>h({entry:t,namespace:e,protocol:n,backendType:r}),children:[(0,a.jsx)(gt,{className:"h-3.5 w-3.5 mr-2"}),"View"]}),(0,a.jsxs)($,{onSelect:async()=>{await me(t.path),I({title:"Copied to clipboard"})},children:[(0,a.jsx)(Ce,{className:ee}),"Copy path"]}),!g&&(0,a.jsxs)($,{onSelect:()=>m(),children:[(0,a.jsx)(be,{className:"h-3.5 w-3.5 mr-2"}),"Download"]}),(0,a.jsx)(ce,{}),jt.map(u=>{let N=u.getCode({variableName:e,protocol:n,entry:t,backendType:r});if(N===null)return null;let F=u.icon;return(0,a.jsxs)($,{onSelect:()=>p(N),children:[(0,a.jsx)(F,{className:ee}),u.label]},u.id)})]})]})]})]}),g&&y&&(0,a.jsx)(Ka,{namespace:e,protocol:n,rootPath:i,backendType:r,prefix:t.path,depth:s+1,locale:d,searchValue:v?"":c,onOpenFile:h})]})},Ga=t=>{let e=(0,$e.c)(43),{namespace:n,locale:i,searchValue:r,onOpenFile:s}=t,[d,c]=(0,z.useState)(!0),{entriesByPath:h}=ye(),{clearNamespaceCache:l}=Zt(),f=n.name??n.displayName,{entries:x,isPending:p,error:g,refetch:j}=Ge(f),w;e[0]!==l||e[1]!==f||e[2]!==j?(w=m=>{m.stopPropagation(),l(f),j()},e[0]=l,e[1]=f,e[2]=j,e[3]=w):w=e[3];let v=w,o=p?n.storageEntries:x,y;if(e[4]!==o||e[5]!==h||e[6]!==g||e[7]!==v||e[8]!==d||e[9]!==p||e[10]!==i||e[11]!==n.backendType||e[12]!==n.displayName||e[13]!==n.name||e[14]!==n.protocol||e[15]!==n.rootPath||e[16]!==f||e[17]!==s||e[18]!==r){let m=vt(o,f,r,h),b;e[20]===d?b=e[21]:(b=()=>c(!d),e[20]=d,e[21]=b);let u;e[22]===d?u=e[23]:(u=(0,a.jsx)(Me,{isExpanded:d,className:"h-3 w-3"}),e[22]=d,e[23]=u);let N;e[24]===n.protocol?N=e[25]:(N=(0,a.jsx)(ia,{protocol:n.protocol}),e[24]=n.protocol,e[25]=N);let F;e[26]===n.displayName?F=e[27]:(F=(0,a.jsx)("span",{children:n.displayName}),e[26]=n.displayName,e[27]=F);let _;e[28]===n.name?_=e[29]:(_=n.name&&(0,a.jsxs)("span",{className:"text-xs text-muted-foreground font-normal",children:["(",(0,a.jsx)(Ma,{variableName:n.name}),")"]}),e[28]=n.name,e[29]=_);let S;e[30]===v?S=e[31]:(S=(0,a.jsx)(ct,{onClick:v,tooltip:"Refresh storage connection",className:"p-0",iconClassName:"h-3 w-3"}),e[30]=v,e[31]=S);let M=n.rootPath||"(root)",P;e[32]===M?P=e[33]:(P=(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground font-normal tabular-nums ml-auto",children:M}),e[32]=M,e[33]=P);let D;e[34]!==n.name||e[35]!==P||e[36]!==b||e[37]!==u||e[38]!==N||e[39]!==F||e[40]!==_||e[41]!==S?(D=(0,a.jsxs)(it,{value:n.name,onSelect:b,className:"flex flex-row font-semibold h-7 text-xs gap-1.5 bg-(--slate-2) text-muted-foreground rounded-none",children:[u,N,F,_,S,P]}),e[34]=n.name,e[35]=P,e[36]=b,e[37]=u,e[38]=N,e[39]=F,e[40]=_,e[41]=S,e[42]=D):D=e[42],y=(0,a.jsxs)(a.Fragment,{children:[D,d&&(0,a.jsxs)(a.Fragment,{children:[p&&o.length===0&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 py-1 text-xs text-muted-foreground",style:te(1),children:[(0,a.jsx)(_e,{className:"h-3 w-3 animate-spin"}),"Loading..."]}),g&&o.length===0&&(0,a.jsx)(Pa,{error:g,style:te(1),className:"py-1 text-xs h-auto overflow-auto max-h-32 items-start",showIcon:!1}),!p&&o.length===0&&!g&&(0,a.jsx)("div",{className:"py-1 text-xs text-muted-foreground italic",style:te(1),children:"No entries"}),r&&m.length===0&&o.length>0&&(0,a.jsx)("div",{className:"py-1 text-xs text-muted-foreground italic",style:te(1),children:"No matches"}),m.map(A=>(0,a.jsx)(wt,{entry:A,namespace:f,protocol:n.protocol,rootPath:n.rootPath,backendType:n.backendType,depth:1,locale:i,searchValue:r,onOpenFile:s},A.path))]})]}),e[4]=o,e[5]=h,e[6]=g,e[7]=v,e[8]=d,e[9]=p,e[10]=i,e[11]=n.backendType,e[12]=n.displayName,e[13]=n.name,e[14]=n.protocol,e[15]=n.rootPath,e[16]=f,e[17]=s,e[18]=r,e[19]=y}else y=e[19];return y};const Ja=()=>{let t=(0,$e.c)(31),{namespaces:e}=ye(),{locale:n}=at(),[i,r]=(0,z.useState)(""),[s,d]=(0,z.useState)(null),c=!!i.trim();if(e.length===0){let b;t[0]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsxs)("span",{children:["Create an obstore or fsspec connection in your notebook. See the"," ",(0,a.jsx)("a",{className:"text-link",href:"https://docs.marimo.io/guides/working_with_data/remote_storage/#quick-start",target:"_blank",rel:"noopener noreferrer",children:"docs"}),"."]}),t[0]=b):b=t[0];let u;return t[1]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsx)(Da,{title:"No storage connected",description:b,action:(0,a.jsx)(Xe,{defaultTab:"storage",children:(0,a.jsxs)(T,{variant:"outline",size:"sm",children:["Add remote storage",(0,a.jsx)(et,{className:"h-4 w-4 ml-2"})]})}),icon:(0,a.jsx)(Qe,{className:"h-8 w-8"})}),t[1]=u):u=t[1],u}let h;t[2]===s?h=t[3]:(h=s&&(0,a.jsx)(qa,{entry:s.entry,namespace:s.namespace,protocol:s.protocol,backendType:s.backendType,onBack:()=>d(null)}),t[2]=s,t[3]=h);let l=s&&"hidden",f;t[4]===l?f=t[5]:(f=re("border-b bg-background rounded-none h-full pb-10 overflow-auto outline-hidden scrollbar-thin",l),t[4]=l,t[5]=f);let x;t[6]===i?x=t[7]:(x=(0,a.jsx)(Na,{placeholder:"Search entries...",className:"h-6 m-1",value:i,onValueChange:r,rootClassName:"flex-1 border-b-0"}),t[6]=i,t[7]=x);let p;t[8]===c?p=t[9]:(p=c&&(0,a.jsx)(T,{variant:"text",size:"xs",className:"float-right border-none px-2 m-0 h-full",onClick:()=>r(""),children:(0,a.jsx)(ea,{className:"h-4 w-4"})}),t[8]=c,t[9]=p);let g;t[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(E,{content:"Filters loaded entries only. Expand directories to include their contents in the search.",delayDuration:200,children:(0,a.jsx)(ta,{className:"h-3.5 w-3.5 shrink-0 cursor-help text-muted-foreground hover:text-foreground mr-2"})}),t[10]=g):g=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)(Xe,{defaultTab:"storage",children:(0,a.jsx)(T,{variant:"ghost",size:"sm",className:"px-2 border-0 border-l border-muted-background rounded-none focus-visible:ring-0 focus-visible:ring-offset-0",children:(0,a.jsx)(et,{className:"h-4 w-4"})})}),t[11]=j):j=t[11];let w;t[12]!==x||t[13]!==p?(w=(0,a.jsxs)("div",{className:"flex items-center w-full border-b",children:[x,p,g,j]}),t[12]=x,t[13]=p,t[14]=w):w=t[14];let v;if(t[15]!==n||t[16]!==e||t[17]!==i){let b;t[19]!==n||t[20]!==i?(b=u=>(0,a.jsx)(Ga,{namespace:u,locale:n,searchValue:i,onOpenFile:d},u.name??u.displayName),t[19]=n,t[20]=i,t[21]=b):b=t[21],v=e.map(b),t[15]=n,t[16]=e,t[17]=i,t[18]=v}else v=t[18];let o;t[22]===v?o=t[23]:(o=(0,a.jsx)(Fa,{className:"flex flex-col",children:v}),t[22]=v,t[23]=o);let y;t[24]!==f||t[25]!==w||t[26]!==o?(y=(0,a.jsxs)(ka,{className:f,shouldFilter:!1,children:[w,o]}),t[24]=f,t[25]=w,t[26]=o,t[27]=y):y=t[27];let m;return t[28]!==h||t[29]!==y?(m=(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[h,y]}),t[28]=h,t[29]=y,t[30]=m):m=t[30],m};var Nt=oe(),kt=(0,z.createContext)(null);function Ya(){return(0,z.useContext)(kt)??void 0}var Za=t=>{let e=(0,Nt.c)(3),{children:n}=t,i=ya(),r;return e[0]!==n||e[1]!==i?(r=(0,a.jsx)(kt.Provider,{value:i,children:n}),e[0]=n,e[1]=i,e[2]=r):r=e[2],r};const Qa=t=>{let e=(0,Nt.c)(5),{children:n}=t,[i,r]=(0,z.useState)(null),s;e[0]!==n||e[1]!==i?(s=i&&(0,a.jsx)(ga,{backend:ja,options:{rootElement:i},children:(0,a.jsx)(Za,{children:n})}),e[0]=n,e[1]=i,e[2]=s):s=e[2];let d;return e[3]===s?d=e[4]:(d=(0,a.jsx)("div",{ref:r,className:"contents",children:s}),e[3]=s,e[4]=d),d};var Re=new Map;const Xa=({file:t,onOpenNotebook:e})=>{let{sendFileDetails:n,sendUpdateFile:i}=we(),r=he(Vt),s=he(Le),d=he(It),[c,h]=(0,z.useState)(""),{data:l,isPending:f,error:x,setData:p,refetch:g}=De(async()=>{let N=await n({path:t.path}),F=N.contents||"";return h(Re.get(t.path)||F),N},[t.path]),j=async()=>{c!==(l==null?void 0:l.contents)&&await i({path:t.path,contents:c}).then(N=>{N.success&&(p(F=>({...F,contents:c})),h(c))})},w=(0,z.useRef)(c);if(w.current=c,(0,z.useEffect)(()=>()=>{if(!(l!=null&&l.contents))return;let N=w.current;N===l.contents?Re.delete(t.path):Re.set(t.path,N)},[t.path,l==null?void 0:l.contents]),x)return(0,a.jsx)(rt,{error:x});if(f||!l)return null;let v=l.mimeType||"text/plain",o=v in Wt,y=d&&l.file.isMarimoFile&&(t.path===d||t.path.endsWith(`/${d}`));if(!l.contents&&!o)return(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 p-6",children:[(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Name"}),(0,a.jsx)("div",{children:l.file.name}),(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Type"}),(0,a.jsx)("div",{children:v})]});let m=(0,a.jsx)(yt,{filename:l.file.name,onRefresh:g,onDownload:s?void 0:()=>{if(l.isBase64&&l.contents){ue(v)?ve(Fe(l.contents,v),l.file.name):ge(st(Fe(l.contents,l.mimeType||"application/octet-stream")),l.file.name);return}ge(new Blob([l.contents||c],{type:v}),l.file.name)},actions:(0,a.jsxs)(a.Fragment,{children:[t.isMarimoFile&&!xe()&&(0,a.jsx)(E,{content:"Open notebook",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:N=>e(N),children:(0,a.jsx)(ke,{className:"h-3.5 w-3.5"})})}),!ue(v)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E,{content:"Copy contents to clipboard",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:async()=>{await me(c)},children:(0,a.jsx)(Ce,{className:"h-3.5 w-3.5"})})}),(0,a.jsx)(E,{content:_a("global.save"),children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:j,disabled:c===l.contents,children:(0,a.jsx)(oa,{className:"h-3.5 w-3.5"})})})]})]})}),b=ue(v),u=!b&&v!=="text/csv";return(0,a.jsxs)(a.Fragment,{children:[m,u&&y&&(0,a.jsxs)(wa,{variant:"warning",className:"rounded-none",children:[(0,a.jsx)(da,{className:"h-4 w-4"}),(0,a.jsx)(va,{children:"Editing the notebook file directly while running in marimo's editor may cause unintended changes. Please use with caution."})]}),(0,a.jsx)(Ue,{mimeType:v,contents:b?void 0:u?c:l.contents??void 0,mediaSource:b?{base64:l.contents,mime:v}:void 0,readOnly:!u,onChange:h,extensions:[Jt.of([{key:r.getHotkey("global.save").key,stopPropagation:!0,run:()=>c===l.contents?!1:(j(),!0)}])]})]})};var en=class{constructor(t){Q(this,"delegate",new Pe([]));Q(this,"rootPath","");Q(this,"onChange",Bt.NOOP);Q(this,"path",new Se("/"));Q(this,"initialize",async t=>{if(this.onChange=t,this.delegate.data.length===0)try{let e=await this.callbacks.listFiles({path:this.rootPath});this.delegate=new Pe(e.files),this.rootPath=e.root,this.path=Se.guessDeliminator(e.root)}catch(e){I({title:"Failed",description:xa(e)})}this.onChange(this.delegate.data)});Q(this,"refreshAll",async t=>{let e=[this.rootPath,...t.map(i=>{var r;return(r=this.delegate.find(i))==null?void 0:r.data.path})].filter(Boolean),n=await Promise.all(e.map(i=>this.callbacks.listFiles({path:i}).catch(()=>({files:[]}))));for(let[i,r]of e.entries()){let s=n[i];r===this.rootPath?this.delegate=new Pe(s.files):this.delegate.update({id:r,changes:{children:s.files}})}this.onChange(this.delegate.data)});Q(this,"relativeFromRoot",t=>{let e=this.rootPath.endsWith(this.path.deliminator)?this.rootPath:`${this.rootPath}${this.path.deliminator}`;return t.startsWith(e)?t.slice(e.length):t});Q(this,"handleResponse",t=>t.success?t:(I({title:"Failed",description:t.message}),null));this.callbacks=t}async expand(t){let e=this.delegate.find(t);if(!e||!e.data.isDirectory)return!1;if(e.children&&e.children.length>0)return!0;let n=await this.callbacks.listFiles({path:e.data.path});return this.delegate.update({id:t,changes:{children:n.files}}),this.onChange(this.delegate.data),!0}async copy(t,e){var c;let n=this.delegate.find(t);if(!n){I({title:"Failed",description:`Node with id ${t} not found in the tree`});return}let i=n.data.path,r=this.path.dirname(i),s=this.path.join(r,e),d=await this.callbacks.copyFileOrFolder({path:i,newPath:s}).then(this.handleResponse);d!=null&&d.info&&(this.delegate.create({parentId:((c=n.parent)==null?void 0:c.id)??null,index:0,data:d.info}),this.onChange(this.delegate.data),await this.refreshAll([r]))}async rename(t,e){let n=this.delegate.find(t);if(!n){I({title:"Failed",description:`Node with id ${t} not found in the tree`});return}let i=n.data.path,r=this.path.join(this.path.dirname(i),e);await this.callbacks.renameFileOrFolder({path:i,newPath:r}).then(this.handleResponse),this.delegate.update({id:t,changes:{name:e,path:r}}),this.onChange(this.delegate.data),await this.refreshAll([r])}async move(t,e){var i;let n=e?((i=this.delegate.find(e))==null?void 0:i.data.path)??e:this.rootPath;await Promise.all(t.map(r=>{this.delegate.move({id:r,parentId:e,index:0});let s=this.delegate.find(r);if(!s)return Promise.resolve();let d=this.path.join(n,this.path.basename(s.data.path));return this.delegate.update({id:r,changes:{path:d}}),this.callbacks.renameFileOrFolder({path:s.data.path,newPath:d}).then(this.handleResponse)})),this.onChange(this.delegate.data),await this.refreshAll([n])}async createFile(t,e,n="file"){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,r=await this.callbacks.createFileOrFolder({path:i,type:n,name:t}).then(this.handleResponse);r!=null&&r.info&&(this.delegate.create({parentId:e,index:0,data:r.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async createFolder(t,e){var r;let n=e?((r=this.delegate.find(e))==null?void 0:r.data.path)??e:this.rootPath,i=await this.callbacks.createFileOrFolder({path:n,type:"directory",name:t}).then(this.handleResponse);i!=null&&i.info&&(this.delegate.create({parentId:e,index:0,data:i.info}),this.onChange(this.delegate.data),await this.refreshAll([n]))}async delete(t){let e=this.delegate.find(t);if(!e){I({title:"Failed",description:`Node with id ${t} not found in the tree`});return}await this.callbacks.deleteFileOrFolder({path:e.data.path}).then(this.handleResponse),this.delegate.drop({id:t}),this.onChange(this.delegate.data)}};const Ft=Ee(t=>{let e=t(Yt);return Lt(e,"no requestClientAtom set"),new en({listFiles:e.sendListFiles,createFileOrFolder:e.sendCreateFileOrFolder,deleteFileOrFolder:e.sendDeleteFileOrFolder,copyFileOrFolder:e.sendCopyFileOrFolder,renameFileOrFolder:e.sendRenameFileOrFolder})}),tn=Ee({});async function an(){await Tt.get(Ft).refreshAll([])}var ae=" ";const Ct={directory:t=>`os.listdir("${t}")`,python:t=>`with open("${t}", "r") as _f:
|
|
10
|
+
signed_url`;let n=Oe(t.entry.path.split("/").pop()||"download");return`${t.variableName}.get("${e}", "${n}")`}}];var Va=100*1024*1024;function Ha(t){let e=t.endsWith("/")?t.slice(0,-1):t,n=e.split("/");return n[n.length-1]||e}const qa=({entry:t,namespace:e,protocol:n,backendType:i,onBack:r})=>{let{locale:s}=at(),d=lt(),c=Ha(t.path),h=t.mimeType||"text/plain",l=ue(h),f=l&&t.size>Va&&t.size>0,{data:x,isPending:p,error:g,refetch:j}=De(async()=>{if(f)return null;let m=await Ne.request({namespace:e,path:t.path,preview:!l});if(m.error)throw Error(m.error);if(!m.url)throw Error("No URL returned");if(l)return{type:"media",url:m.url};let b=await fetch(m.url);if(!b.ok)throw Error(`Failed to fetch preview: ${b.statusText}`);return{type:"text",content:await b.text()}},[e,t.path,l,f]),w=(0,z.useCallback)(async()=>{try{let m=await Ne.request({namespace:e,path:t.path});if(m.error){I({title:"Download failed",description:m.error,variant:"danger"});return}m.url&&ve(m.url,m.filename??c)}catch(m){je.error("Failed to download storage entry",m),I({title:"Download failed",description:String(m),variant:"danger"})}},[e,t.path,c]),v=jt.map(m=>{let b=m.getCode({variableName:e,protocol:n,entry:t,backendType:i});if(b===null)return null;let u=m.icon;return(0,a.jsx)(A,{content:m.label,children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:()=>d(b),"aria-label":m.label,children:(0,a.jsx)(u,{className:"h-3.5 w-3.5"})})},m.id)}),o=(0,a.jsx)(yt,{filename:c,filenameIcon:Je(c),onBack:r,onDownload:w,actions:v}),y=({includeMime:m=!1})=>(0,a.jsxs)("div",{className:"grid grid-cols-[auto_1fr] gap-x-4 gap-y-1.5 p-4 text-xs",children:[(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Path"}),(0,a.jsxs)("div",{className:"truncate flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"font-mono text-[11px]",children:t.path}),(0,a.jsx)(fa,{value:t.path,className:"h-3 w-3"})]}),m&&(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Type"}),m&&(0,a.jsx)("span",{children:h}),t.size>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Size"}),(0,a.jsx)("span",{children:ze(t.size,s)})]}),t.lastModified!=null&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-muted-foreground font-medium",children:"Modified"}),(0,a.jsx)("span",{children:new Date(t.lastModified*1e3).toLocaleString()})]})]});return f?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({includeMime:!0}),(0,a.jsxs)("div",{className:"px-4 pb-4 text-xs text-muted-foreground italic",children:["File is too large to preview (",ze(t.size,s),")."]})]}):p?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({}),(0,a.jsxs)("div",{className:"flex-1 flex items-center justify-center gap-2 text-xs text-muted-foreground min-h-24",children:[(0,a.jsx)(_e,{className:"h-4 w-4 animate-spin"}),"Loading preview..."]})]}):g?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({includeMime:!0}),(0,a.jsxs)("div",{className:"px-4 pb-4 text-xs text-destructive",children:["Failed to load preview: ",g.message]}),(0,a.jsx)("div",{className:"px-4 pb-4",children:(0,a.jsxs)(T,{variant:"secondary",size:"xs",onClick:j,children:[(0,a.jsx)(tt,{className:"h-3 w-3 mr-1"}),"Retry"]})})]}):x?(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({}),(0,a.jsx)(Ue,{mimeType:h,contents:x.type==="text"?x.content:void 0,mediaSource:x.type==="media"?{url:x.url}:void 0})]}):(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[o,y({includeMime:!0}),(0,a.jsxs)("div",{className:"p-4 flex items-center gap-2 text-xs text-muted-foreground",children:[(0,a.jsx)(Ze,{className:"h-4 w-4"}),"Preview not available for this file type."]})]})};var $e=oe(),Ua=16;function te(t){return{paddingLeft:t*Ua}}function Wa(t,e){return new Date(t*1e3).toLocaleDateString(e,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function bt(t){let e=t.endsWith("/")?t.slice(0,-1):t,n=e.split("/");return n[n.length-1]||e}function Te(t,e,n,i){let r=n.toLowerCase();if(bt(t.path).toLowerCase().includes(r))return!0;if(t.kind==="directory"){let s=i.get(We(e,t.path));if(s)return s.some(d=>Te(d,e,n,i))}return!1}function vt(t,e,n,i){return n.trim()?t.filter(r=>Te(r,e,n,i)):t}var Ka=t=>{let e=(0,$e.c)(36),{namespace:n,protocol:i,rootPath:r,backendType:s,prefix:d,depth:c,locale:h,searchValue:l,onOpenFile:f}=t,{entriesByPath:x}=ye(),{entries:p,isPending:g,error:j}=Ge(n,d);if(g){let o;e[0]===c?o=e[1]:(o=te(c),e[0]=c,e[1]=o);let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=(0,a.jsx)(_e,{className:"h-3 w-3 animate-spin"}),e[2]=y):y=e[2];let m;return e[3]===o?m=e[4]:(m=(0,a.jsxs)("div",{className:"flex items-center gap-1.5 py-1 text-xs text-muted-foreground",style:o,children:[y,"Loading..."]}),e[3]=o,e[4]=m),m}if(j){let o;e[5]===c?o=e[6]:(o=te(c),e[5]=c,e[6]=o);let y;return e[7]!==j.message||e[8]!==o?(y=(0,a.jsxs)("div",{className:"py-1 text-xs text-destructive",style:o,children:["Failed to load: ",j.message]}),e[7]=j.message,e[8]=o,e[9]=y):y=e[9],y}if(p.length===0){let o;e[10]===c?o=e[11]:(o=te(c),e[10]=c,e[11]=o);let y;return e[12]===o?y=e[13]:(y=(0,a.jsx)("div",{className:"py-1 text-xs text-muted-foreground italic",style:o,children:"Empty"}),e[12]=o,e[13]=y),y}let w;if(e[14]!==s||e[15]!==p||e[16]!==c||e[17]!==x||e[18]!==h||e[19]!==n||e[20]!==f||e[21]!==i||e[22]!==r||e[23]!==l){let o=vt(p,n,l,x),y;e[25]!==s||e[26]!==c||e[27]!==h||e[28]!==n||e[29]!==f||e[30]!==i||e[31]!==r||e[32]!==l?(y=m=>(0,a.jsx)(wt,{entry:m,namespace:n,protocol:i,rootPath:r,backendType:s,depth:c,locale:h,searchValue:l,onOpenFile:f},m.path),e[25]=s,e[26]=c,e[27]=h,e[28]=n,e[29]=f,e[30]=i,e[31]=r,e[32]=l,e[33]=y):y=e[33],w=o.map(y),e[14]=s,e[15]=p,e[16]=c,e[17]=x,e[18]=h,e[19]=n,e[20]=f,e[21]=i,e[22]=r,e[23]=l,e[24]=w}else w=e[24];let v;return e[34]===w?v=e[35]:(v=(0,a.jsx)(a.Fragment,{children:w}),e[34]=w,e[35]=v),v},wt=({entry:t,namespace:e,protocol:n,rootPath:i,backendType:r,depth:s,locale:d,searchValue:c,onOpenFile:h})=>{var b;let[l,f]=(0,z.useState)(!1),{entriesByPath:x}=ye(),p=lt(),g=t.kind==="directory",j=bt(t.path),w=!!c.trim(),v=g&&w&&j.toLowerCase().includes(c.trim().toLowerCase()),o=g&&w&&!!((b=x.get(We(e,t.path)))!=null&&b.some(u=>Te(u,e,c,x))),y=l||o,m=(0,z.useCallback)(async()=>{try{let u=await Ne.request({namespace:e,path:t.path});if(u.error){I({title:"Download failed",description:u.error,variant:"danger"});return}u.url&&ve(u.url,u.filename??"download")}catch(u){je.error("Failed to download storage entry",u),I({title:"Download failed",description:String(u),variant:"danger"})}},[e,t.path]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(it,{className:re("text-xs flex items-center gap-1.5 cursor-pointer rounded-none group h-6.5",g&&"font-medium"),style:te(s),value:`${e}:${t.path}`,onSelect:()=>{g?f(!y):h({entry:t,namespace:e,protocol:n,backendType:r})},children:[g?(0,a.jsx)(Me,{isExpanded:y,className:"h-3 w-3"}):(0,a.jsx)("span",{className:"w-3 shrink-0"}),g?(0,a.jsx)(na,{className:re("h-3.5 w-3.5 shrink-0",Ye.directory)}):Je(j),(0,a.jsx)("span",{className:"truncate flex-1 text-left",children:j}),(0,a.jsxs)("div",{className:"flex items-center",children:[t.size>0&&(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground pr-2 opacity-0 group-hover:opacity-100 transition-opacity tabular-nums",children:ze(t.size,d)}),t.lastModified!=null&&(0,a.jsx)(A,{content:`Last modified: ${new Date(t.lastModified*1e3).toLocaleString()}`,children:(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground pr-1 opacity-0 group-hover:opacity-100 transition-opacity whitespace-nowrap",children:Wa(t.lastModified,d)})}),(0,a.jsxs)(qe,{children:[(0,a.jsx)(Ve,{asChild:!0,children:(0,a.jsx)(ot,{iconClassName:"h-3 w-3",onClick:u=>u.stopPropagation()})}),(0,a.jsxs)(He,{align:"end",onClick:u=>u.stopPropagation(),onCloseAutoFocus:u=>u.preventDefault(),children:[!g&&(0,a.jsxs)($,{onSelect:()=>h({entry:t,namespace:e,protocol:n,backendType:r}),children:[(0,a.jsx)(gt,{className:"h-3.5 w-3.5 mr-2"}),"View"]}),(0,a.jsxs)($,{onSelect:async()=>{await me(t.path),I({title:"Copied to clipboard"})},children:[(0,a.jsx)(Ce,{className:ee}),"Copy path"]}),!g&&(0,a.jsxs)($,{onSelect:()=>m(),children:[(0,a.jsx)(be,{className:"h-3.5 w-3.5 mr-2"}),"Download"]}),(0,a.jsx)(ce,{}),jt.map(u=>{let N=u.getCode({variableName:e,protocol:n,entry:t,backendType:r});if(N===null)return null;let F=u.icon;return(0,a.jsxs)($,{onSelect:()=>p(N),children:[(0,a.jsx)(F,{className:ee}),u.label]},u.id)})]})]})]})]}),g&&y&&(0,a.jsx)(Ka,{namespace:e,protocol:n,rootPath:i,backendType:r,prefix:t.path,depth:s+1,locale:d,searchValue:v?"":c,onOpenFile:h})]})},Ga=t=>{let e=(0,$e.c)(43),{namespace:n,locale:i,searchValue:r,onOpenFile:s}=t,[d,c]=(0,z.useState)(!0),{entriesByPath:h}=ye(),{clearNamespaceCache:l}=Zt(),f=n.name??n.displayName,{entries:x,isPending:p,error:g,refetch:j}=Ge(f),w;e[0]!==l||e[1]!==f||e[2]!==j?(w=m=>{m.stopPropagation(),l(f),j()},e[0]=l,e[1]=f,e[2]=j,e[3]=w):w=e[3];let v=w,o=p?n.storageEntries:x,y;if(e[4]!==o||e[5]!==h||e[6]!==g||e[7]!==v||e[8]!==d||e[9]!==p||e[10]!==i||e[11]!==n.backendType||e[12]!==n.displayName||e[13]!==n.name||e[14]!==n.protocol||e[15]!==n.rootPath||e[16]!==f||e[17]!==s||e[18]!==r){let m=vt(o,f,r,h),b;e[20]===d?b=e[21]:(b=()=>c(!d),e[20]=d,e[21]=b);let u;e[22]===d?u=e[23]:(u=(0,a.jsx)(Me,{isExpanded:d,className:"h-3 w-3"}),e[22]=d,e[23]=u);let N;e[24]===n.protocol?N=e[25]:(N=(0,a.jsx)(ia,{protocol:n.protocol}),e[24]=n.protocol,e[25]=N);let F;e[26]===n.displayName?F=e[27]:(F=(0,a.jsx)("span",{children:n.displayName}),e[26]=n.displayName,e[27]=F);let _;e[28]===n.name?_=e[29]:(_=n.name&&(0,a.jsxs)("span",{className:"text-xs text-muted-foreground font-normal",children:["(",(0,a.jsx)(Ma,{variableName:n.name}),")"]}),e[28]=n.name,e[29]=_);let S;e[30]===v?S=e[31]:(S=(0,a.jsx)(ct,{onClick:v,tooltip:"Refresh storage connection",className:"p-0",iconClassName:"h-3 w-3"}),e[30]=v,e[31]=S);let M=n.rootPath||"(root)",P;e[32]===M?P=e[33]:(P=(0,a.jsx)("span",{className:"text-[10px] text-muted-foreground font-normal tabular-nums ml-auto",children:M}),e[32]=M,e[33]=P);let D;e[34]!==n.name||e[35]!==P||e[36]!==b||e[37]!==u||e[38]!==N||e[39]!==F||e[40]!==_||e[41]!==S?(D=(0,a.jsxs)(it,{value:n.name,onSelect:b,className:"flex flex-row font-semibold h-7 text-xs gap-1.5 bg-(--slate-2) text-muted-foreground rounded-none",children:[u,N,F,_,S,P]}),e[34]=n.name,e[35]=P,e[36]=b,e[37]=u,e[38]=N,e[39]=F,e[40]=_,e[41]=S,e[42]=D):D=e[42],y=(0,a.jsxs)(a.Fragment,{children:[D,d&&(0,a.jsxs)(a.Fragment,{children:[p&&o.length===0&&(0,a.jsxs)("div",{className:"flex items-center gap-1.5 py-1 text-xs text-muted-foreground",style:te(1),children:[(0,a.jsx)(_e,{className:"h-3 w-3 animate-spin"}),"Loading..."]}),g&&o.length===0&&(0,a.jsx)(Pa,{error:g,style:te(1),className:"py-1 text-xs h-auto overflow-auto max-h-32 items-start",showIcon:!1}),!p&&o.length===0&&!g&&(0,a.jsx)("div",{className:"py-1 text-xs text-muted-foreground italic",style:te(1),children:"No entries"}),r&&m.length===0&&o.length>0&&(0,a.jsx)("div",{className:"py-1 text-xs text-muted-foreground italic",style:te(1),children:"No matches"}),m.map(E=>(0,a.jsx)(wt,{entry:E,namespace:f,protocol:n.protocol,rootPath:n.rootPath,backendType:n.backendType,depth:1,locale:i,searchValue:r,onOpenFile:s},E.path))]})]}),e[4]=o,e[5]=h,e[6]=g,e[7]=v,e[8]=d,e[9]=p,e[10]=i,e[11]=n.backendType,e[12]=n.displayName,e[13]=n.name,e[14]=n.protocol,e[15]=n.rootPath,e[16]=f,e[17]=s,e[18]=r,e[19]=y}else y=e[19];return y};const Ja=()=>{let t=(0,$e.c)(31),{namespaces:e}=ye(),{locale:n}=at(),[i,r]=(0,z.useState)(""),[s,d]=(0,z.useState)(null),c=!!i.trim();if(e.length===0){let b;t[0]===Symbol.for("react.memo_cache_sentinel")?(b=(0,a.jsxs)("span",{children:["Create an obstore or fsspec connection in your notebook. See the"," ",(0,a.jsx)("a",{className:"text-link",href:"https://docs.marimo.io/guides/working_with_data/remote_storage/#quick-start",target:"_blank",rel:"noopener noreferrer",children:"docs"}),"."]}),t[0]=b):b=t[0];let u;return t[1]===Symbol.for("react.memo_cache_sentinel")?(u=(0,a.jsx)(Da,{title:"No storage connected",description:b,action:(0,a.jsx)(Xe,{defaultTab:"storage",children:(0,a.jsxs)(T,{variant:"outline",size:"sm",children:["Add remote storage",(0,a.jsx)(et,{className:"h-4 w-4 ml-2"})]})}),icon:(0,a.jsx)(Qe,{className:"h-8 w-8"})}),t[1]=u):u=t[1],u}let h;t[2]===s?h=t[3]:(h=s&&(0,a.jsx)(qa,{entry:s.entry,namespace:s.namespace,protocol:s.protocol,backendType:s.backendType,onBack:()=>d(null)}),t[2]=s,t[3]=h);let l=s&&"hidden",f;t[4]===l?f=t[5]:(f=re("border-b bg-background rounded-none h-full pb-10 overflow-auto outline-hidden scrollbar-thin",l),t[4]=l,t[5]=f);let x;t[6]===i?x=t[7]:(x=(0,a.jsx)(Na,{placeholder:"Search entries...",className:"h-6 m-1",value:i,onValueChange:r,rootClassName:"flex-1 border-b-0"}),t[6]=i,t[7]=x);let p;t[8]===c?p=t[9]:(p=c&&(0,a.jsx)(T,{variant:"text",size:"xs",className:"float-right border-none px-2 m-0 h-full",onClick:()=>r(""),children:(0,a.jsx)(ea,{className:"h-4 w-4"})}),t[8]=c,t[9]=p);let g;t[10]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(A,{content:"Filters loaded entries only. Expand directories to include their contents in the search.",delayDuration:200,children:(0,a.jsx)(ta,{className:"h-3.5 w-3.5 shrink-0 cursor-help text-muted-foreground hover:text-foreground mr-2"})}),t[10]=g):g=t[10];let j;t[11]===Symbol.for("react.memo_cache_sentinel")?(j=(0,a.jsx)(Xe,{defaultTab:"storage",children:(0,a.jsx)(T,{variant:"ghost",size:"sm",className:"px-2 border-0 border-l border-muted-background rounded-none focus-visible:ring-0 focus-visible:ring-offset-0",children:(0,a.jsx)(et,{className:"h-4 w-4"})})}),t[11]=j):j=t[11];let w;t[12]!==x||t[13]!==p?(w=(0,a.jsxs)("div",{className:"flex items-center w-full border-b",children:[x,p,g,j]}),t[12]=x,t[13]=p,t[14]=w):w=t[14];let v;if(t[15]!==n||t[16]!==e||t[17]!==i){let b;t[19]!==n||t[20]!==i?(b=u=>(0,a.jsx)(Ga,{namespace:u,locale:n,searchValue:i,onOpenFile:d},u.name??u.displayName),t[19]=n,t[20]=i,t[21]=b):b=t[21],v=e.map(b),t[15]=n,t[16]=e,t[17]=i,t[18]=v}else v=t[18];let o;t[22]===v?o=t[23]:(o=(0,a.jsx)(Fa,{className:"flex flex-col",children:v}),t[22]=v,t[23]=o);let y;t[24]!==f||t[25]!==w||t[26]!==o?(y=(0,a.jsxs)(ka,{className:f,shouldFilter:!1,children:[w,o]}),t[24]=f,t[25]=w,t[26]=o,t[27]=y):y=t[27];let m;return t[28]!==h||t[29]!==y?(m=(0,a.jsxs)("div",{className:"h-full flex flex-col",children:[h,y]}),t[28]=h,t[29]=y,t[30]=m):m=t[30],m};var Nt=oe(),kt=(0,z.createContext)(null);function Ya(){return(0,z.useContext)(kt)??void 0}var Za=t=>{let e=(0,Nt.c)(3),{children:n}=t,i=ya(),r;return e[0]!==n||e[1]!==i?(r=(0,a.jsx)(kt.Provider,{value:i,children:n}),e[0]=n,e[1]=i,e[2]=r):r=e[2],r};const Qa=t=>{let e=(0,Nt.c)(5),{children:n}=t,[i,r]=(0,z.useState)(null),s;e[0]!==n||e[1]!==i?(s=i&&(0,a.jsx)(ga,{backend:ja,options:{rootElement:i},children:(0,a.jsx)(Za,{children:n})}),e[0]=n,e[1]=i,e[2]=s):s=e[2];let d;return e[3]===s?d=e[4]:(d=(0,a.jsx)("div",{ref:r,className:"contents",children:s}),e[3]=s,e[4]=d),d};var Re=new Map;const Xa=({file:t,onOpenNotebook:e})=>{let{sendFileDetails:n,sendUpdateFile:i}=we(),r=he(Vt),s=he(Le),d=he(It),[c,h]=(0,z.useState)(""),{data:l,isPending:f,error:x,setData:p,refetch:g}=De(async()=>{let N=await n({path:t.path}),F=N.contents||"";return h(Re.get(t.path)||F),N},[t.path]),j=async()=>{c!==(l==null?void 0:l.contents)&&await i({path:t.path,contents:c}).then(N=>{N.success&&(p(F=>({...F,contents:c})),h(c))})},w=(0,z.useRef)(c);if(w.current=c,(0,z.useEffect)(()=>()=>{if(!(l!=null&&l.contents))return;let N=w.current;N===l.contents?Re.delete(t.path):Re.set(t.path,N)},[t.path,l==null?void 0:l.contents]),x)return(0,a.jsx)(rt,{error:x});if(f||!l)return null;let v=l.mimeType||"text/plain",o=v in Wt,y=d&&l.file.isMarimoFile&&(t.path===d||t.path.endsWith(`/${d}`));if(!l.contents&&!o)return(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 p-6",children:[(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Name"}),(0,a.jsx)("div",{children:l.file.name}),(0,a.jsx)("div",{className:"font-bold text-muted-foreground",children:"Type"}),(0,a.jsx)("div",{children:v})]});let m=(0,a.jsx)(yt,{filename:l.file.name,onRefresh:g,onDownload:s?void 0:()=>{if(l.isBase64&&l.contents){ue(v)?ve(Fe(l.contents,v),l.file.name):ge(st(Fe(l.contents,l.mimeType||"application/octet-stream")),l.file.name);return}ge(new Blob([l.contents||c],{type:v}),l.file.name)},actions:(0,a.jsxs)(a.Fragment,{children:[t.isMarimoFile&&!xe()&&(0,a.jsx)(A,{content:"Open notebook",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:N=>e(N),children:(0,a.jsx)(ke,{className:"h-3.5 w-3.5"})})}),!ue(v)&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(A,{content:"Copy contents to clipboard",children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:async()=>{await me(c)},children:(0,a.jsx)(Ce,{className:"h-3.5 w-3.5"})})}),(0,a.jsx)(A,{content:_a("global.save"),children:(0,a.jsx)(T,{variant:"text",size:"xs",onClick:j,disabled:c===l.contents,children:(0,a.jsx)(oa,{className:"h-3.5 w-3.5"})})})]})]})}),b=ue(v),u=!b&&v!=="text/csv";return(0,a.jsxs)(a.Fragment,{children:[m,u&&y&&(0,a.jsxs)(wa,{variant:"warning",className:"rounded-none",children:[(0,a.jsx)(da,{className:"h-4 w-4"}),(0,a.jsx)(va,{children:"Editing the notebook file directly while running in marimo's editor may cause unintended changes. Please use with caution."})]}),(0,a.jsx)(Ue,{mimeType:v,contents:b?void 0:u?c:l.contents??void 0,mediaSource:b?{base64:l.contents,mime:v}:void 0,readOnly:!u,onChange:h,extensions:[Jt.of([{key:r.getHotkey("global.save").key,stopPropagation:!0,run:()=>c===l.contents?!1:(j(),!0)}])]})]})};var en=class{constructor(t){Q(this,"delegate",new Pe([]));Q(this,"rootPath","");Q(this,"onChange",Bt.NOOP);Q(this,"path",new Se("/"));Q(this,"initialize",async t=>{if(this.onChange=t,this.delegate.data.length===0)try{let e=await this.callbacks.listFiles({path:this.rootPath});this.delegate=new Pe(e.files),this.rootPath=e.root,this.path=Se.guessDeliminator(e.root)}catch(e){I({title:"Failed",description:xa(e)})}this.onChange(this.delegate.data)});Q(this,"refreshAll",async t=>{let e=[this.rootPath,...t.map(i=>{var r;return(r=this.delegate.find(i))==null?void 0:r.data.path})].filter(Boolean),n=await Promise.all(e.map(i=>this.callbacks.listFiles({path:i}).catch(()=>({files:[]}))));for(let[i,r]of e.entries()){let s=n[i];r===this.rootPath?this.delegate=new Pe(s.files):this.delegate.update({id:r,changes:{children:s.files}})}this.onChange(this.delegate.data)});Q(this,"relativeFromRoot",t=>{let e=this.rootPath.endsWith(this.path.deliminator)?this.rootPath:`${this.rootPath}${this.path.deliminator}`;return t.startsWith(e)?t.slice(e.length):t});Q(this,"handleResponse",t=>t.success?t:(I({title:"Failed",description:t.message}),null));this.callbacks=t}async expand(t){let e=this.delegate.find(t);if(!e||!e.data.isDirectory)return!1;if(e.children&&e.children.length>0)return!0;let n=await this.callbacks.listFiles({path:e.data.path});return this.delegate.update({id:t,changes:{children:n.files}}),this.onChange(this.delegate.data),!0}async copy(t,e){var c;let n=this.delegate.find(t);if(!n){I({title:"Failed",description:`Node with id ${t} not found in the tree`});return}let i=n.data.path,r=this.path.dirname(i),s=this.path.join(r,e),d=await this.callbacks.copyFileOrFolder({path:i,newPath:s}).then(this.handleResponse);d!=null&&d.info&&(this.delegate.create({parentId:((c=n.parent)==null?void 0:c.id)??null,index:0,data:d.info}),this.onChange(this.delegate.data),await this.refreshAll([r]))}async rename(t,e){let n=this.delegate.find(t);if(!n){I({title:"Failed",description:`Node with id ${t} not found in the tree`});return}let i=n.data.path,r=this.path.join(this.path.dirname(i),e);await this.callbacks.renameFileOrFolder({path:i,newPath:r}).then(this.handleResponse),this.delegate.update({id:t,changes:{name:e,path:r}}),this.onChange(this.delegate.data),await this.refreshAll([r])}async move(t,e){var i;let n=e?((i=this.delegate.find(e))==null?void 0:i.data.path)??e:this.rootPath;await Promise.all(t.map(r=>{this.delegate.move({id:r,parentId:e,index:0});let s=this.delegate.find(r);if(!s)return Promise.resolve();let d=this.path.join(n,this.path.basename(s.data.path));return this.delegate.update({id:r,changes:{path:d}}),this.callbacks.renameFileOrFolder({path:s.data.path,newPath:d}).then(this.handleResponse)})),this.onChange(this.delegate.data),await this.refreshAll([n])}async createFile(t,e,n="file"){var s;let i=e?((s=this.delegate.find(e))==null?void 0:s.data.path)??e:this.rootPath,r=await this.callbacks.createFileOrFolder({path:i,type:n,name:t}).then(this.handleResponse);r!=null&&r.info&&(this.delegate.create({parentId:e,index:0,data:r.info}),this.onChange(this.delegate.data),await this.refreshAll([i]))}async createFolder(t,e){var r;let n=e?((r=this.delegate.find(e))==null?void 0:r.data.path)??e:this.rootPath,i=await this.callbacks.createFileOrFolder({path:n,type:"directory",name:t}).then(this.handleResponse);i!=null&&i.info&&(this.delegate.create({parentId:e,index:0,data:i.info}),this.onChange(this.delegate.data),await this.refreshAll([n]))}async delete(t){let e=this.delegate.find(t);if(!e){I({title:"Failed",description:`Node with id ${t} not found in the tree`});return}await this.callbacks.deleteFileOrFolder({path:e.data.path}).then(this.handleResponse),this.delegate.drop({id:t}),this.onChange(this.delegate.data)}};const Ft=Ae(t=>{let e=t(Yt);return Lt(e,"no requestClientAtom set"),new en({listFiles:e.sendListFiles,createFileOrFolder:e.sendCreateFileOrFolder,deleteFileOrFolder:e.sendDeleteFileOrFolder,copyFileOrFolder:e.sendCopyFileOrFolder,renameFileOrFolder:e.sendRenameFileOrFolder})}),tn=Ae({});async function an(){await Tt.get(Ft).refreshAll([])}var ae=" ";const Ct={directory:t=>`os.listdir("${t}")`,python:t=>`with open("${t}", "r") as _f:
|
|
11
11
|
${ae}...
|
|
12
12
|
`,json:t=>`with open("${t}", "r") as _f:
|
|
13
13
|
${ae}_data = json.load(_f)
|
|
@@ -23,4 +23,4 @@ ${ae}...
|
|
|
23
23
|
${ae}...
|
|
24
24
|
`,unknown:t=>`with open("${t}", "r") as _f:
|
|
25
25
|
${ae}...
|
|
26
|
-
`};var nn=oe(),sn=1024*1024*100;function _t(t){let e=(0,nn.c)(7),n;e[0]===t?n=e[1]:(n=t===void 0?{}:t,e[0]=t,e[1]=n);let i=n,{sendCreateFileOrFolder:r}=we(),s;e[2]===r?s=e[3]:(s=async c=>{if(c.length===0)return;let h=c.length===1;await Kt(h?"Uploading file...":"Uploading files...",async l=>{l.addTotal(c.length);for(let f of c){let x=hn(dn(f)),p="";x&&(p=Se.guessDeliminator(x).dirname(x));let g=(await ua(f)).split(",")[1];await r({path:p,type:"file",name:f.name,contents:g}),l.increment(1)}await an()},{title:h?"File uploaded":`${c.length} files uploaded`})},e[2]=r,e[3]=s);let d;return e[4]!==i||e[5]!==s?(d={multiple:!0,maxSize:sn,onError:cn,onDropRejected:rn,onDrop:s,...i},e[4]=i,e[5]=s,e[6]=d):d=e[6],pa(d)}function rn(t){I({title:"File upload failed",description:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:t.map(ln)}),variant:"danger"})}function ln(t){return(0,a.jsxs)("div",{children:[t.file.name," (",t.errors.map(on).join(", "),")"]},t.file.name)}function on(t){return t.message}function cn(t){je.error(t),I({title:"File upload failed",description:t.message,variant:"danger"})}function dn(t){if(t.webkitRelativePath)return t.webkitRelativePath;if("path"in t&&typeof t.path=="string")return t.path;if("relativePath"in t&&typeof t.relativePath=="string")return t.relativePath}function hn(t){if(t)return t.replace(/^\/+/,"")}var de=oe(),mn=Be("marimo:showHiddenFiles",!0,Ie,{getOnInit:!0}),St=z.createContext(null);const pn=t=>{let e=(0,de.c)(72),{height:n}=t,i=(0,z.useRef)(null),r=Ya(),[s]=fe(Ft),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];let[c,h]=(0,z.useState)(d),[l,f]=(0,z.useState)(null),[x,p]=fe(mn),{openPrompt:g}=nt(),[j,w]=fe(tn),v;e[1]===s?v=e[2]:(v=()=>s.initialize(h),e[1]=s,e[2]=v);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[3]=o):o=e[3];let{isPending:y,error:m}=De(v,o),b;e[4]!==j||e[5]!==s?(b=()=>s.refreshAll(Object.keys(j).filter(k=>j[k])),e[4]=j,e[5]=s,e[6]=b):b=e[6];let u=J(b),N;e[7]!==p||e[8]!==x?(N=()=>{p(!x)},e[7]=p,e[8]=x,e[9]=N):N=e[9];let F=J(N),_;e[10]!==g||e[11]!==s?(_=async()=>{g({title:"Folder name",onConfirm:async k=>{s.createFolder(k,null)}})},e[10]=g,e[11]=s,e[12]=_):_=e[12];let S=J(_),M;e[13]!==g||e[14]!==s?(M=async()=>{g({title:"File name",onConfirm:async k=>{s.createFile(k,null)}})},e[13]=g,e[14]=s,e[15]=M):M=e[15];let P=J(M),D;e[16]!==g||e[17]!==s?(D=async()=>{g({title:"Notebook name",onConfirm:async k=>{s.createFile(k,null,"notebook")}})},e[16]=g,e[17]=s,e[18]=D):D=e[18];let A=J(D),R;e[19]===w?R=e[20]:(R=()=>{var k;(k=i.current)==null||k.closeAll(),w({})},e[19]=w,e[20]=R);let ne=J(R),Y;e[21]!==c||e[22]!==x?(Y=Dt(c,x),e[21]=c,e[22]=x,e[23]=Y):Y=e[23];let G=Y;if(y){let k;return e[24]===Symbol.for("react.memo_cache_sentinel")?(k=(0,a.jsx)(la,{size:"medium",centered:!0}),e[24]=k):k=e[24],k}if(m){let k;return e[25]===m?k=e[26]:(k=(0,a.jsx)(rt,{error:m}),e[25]=m,e[26]=k),k}if(l){let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=()=>f(null),e[27]=k):k=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(T,{onClick:k,"data-testid":"file-explorer-back-button",variant:"text",size:"xs",className:"mb-0",children:(0,a.jsx)(Ke,{size:16})}),e[28]=O):O=e[28];let W;e[29]===l.name?W=e[30]:(W=(0,a.jsxs)("div",{className:"flex items-center pl-1 pr-3 shrink-0 border-b justify-between",children:[O,(0,a.jsx)("span",{className:"font-bold",children:l.name})]}),e[29]=l.name,e[30]=W);let ie;e[31]!==l.path||e[32]!==s?(ie=zt=>Pt(zt,s.relativeFromRoot(l.path)),e[31]=l.path,e[32]=s,e[33]=ie):ie=e[33];let le;e[34]!==l||e[35]!==ie?(le=(0,a.jsx)(z.Suspense,{children:(0,a.jsx)(Xa,{onOpenNotebook:ie,file:l})}),e[34]=l,e[35]=ie,e[36]=le):le=e[36];let pe;return e[37]!==W||e[38]!==le?(pe=(0,a.jsxs)(a.Fragment,{children:[W,le]}),e[37]=W,e[38]=le,e[39]=pe):pe=e[39],pe}let B;e[40]!==ne||e[41]!==P||e[42]!==S||e[43]!==A||e[44]!==F||e[45]!==u||e[46]!==s?(B=(0,a.jsx)(xn,{onRefresh:u,onHidden:F,onCreateFile:P,onCreateNotebook:A,onCreateFolder:S,onCollapseAll:ne,tree:s}),e[40]=ne,e[41]=P,e[42]=S,e[43]=A,e[44]=F,e[45]=u,e[46]=s,e[47]=B):B=e[47];let se=n-33,L,V,H;e[48]===s?(L=e[49],V=e[50],H=e[51]):(L=async k=>{let{ids:O}=k;for(let W of O)await s.delete(W)},V=async k=>{let{id:O,name:W}=k;await s.rename(O,W)},H=async k=>{let{dragIds:O,parentId:W}=k;await s.move(O,W)},e[48]=s,e[49]=L,e[50]=V,e[51]=H);let Z;e[52]===Symbol.for("react.memo_cache_sentinel")?(Z=k=>{let O=k[0];O&&(O.data.isDirectory||f(O.data))},e[52]=Z):Z=e[52];let q;e[53]!==j||e[54]!==w||e[55]!==s?(q=async k=>{if(await s.expand(k)){let O=j[k]??!1;w({...j,[k]:!O})}},e[53]=j,e[54]=w,e[55]=s,e[56]=q):q=e[56];let U;e[57]!==r||e[58]!==j||e[59]!==se||e[60]!==L||e[61]!==V||e[62]!==H||e[63]!==q||e[64]!==G?(U=(0,a.jsx)(ba,{width:"100%",ref:i,height:se,className:"h-full",data:G,initialOpenState:j,openByDefault:!1,dndManager:r,renderCursor:vn,disableDrop:wn,onDelete:L,onRename:V,onMove:H,onSelect:Z,onToggle:q,padding:15,rowHeight:30,indent:fn,overscanCount:1e3,disableMultiSelection:!0,children:yn}),e[57]=r,e[58]=j,e[59]=se,e[60]=L,e[61]=V,e[62]=H,e[63]=q,e[64]=G,e[65]=U):U=e[65];let K;e[66]!==U||e[67]!==s?(K=(0,a.jsx)(St,{value:s,children:U}),e[66]=U,e[67]=s,e[68]=K):K=e[68];let C;return e[69]!==B||e[70]!==K?(C=(0,a.jsxs)(a.Fragment,{children:[B,K]}),e[69]=B,e[70]=K,e[71]=C):C=e[71],C};var fn=15,xn=t=>{let e=(0,de.c)(37),{onRefresh:n,onHidden:i,onCreateFile:r,onCreateNotebook:s,onCreateFolder:d,onCollapseAll:c}=t,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={noDrag:!0,noDragEventsBubbling:!0},e[0]=h):h=e[0];let{getRootProps:l,getInputProps:f}=_t(h),x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsx)(pt,{size:16}),e[1]=x):x=e[1];let p;e[2]===s?p=e[3]:(p=(0,a.jsx)(E,{content:"Add notebook",children:(0,a.jsx)(T,{"data-testid":"file-explorer-add-notebook-button",onClick:s,variant:"text",size:"xs",children:x})}),e[2]=s,e[3]=p);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(ft,{size:16}),e[4]=g):g=e[4];let j;e[5]===r?j=e[6]:(j=(0,a.jsx)(E,{content:"Add file",children:(0,a.jsx)(T,{"data-testid":"file-explorer-add-file-button",onClick:r,variant:"text",size:"xs",children:g})}),e[5]=r,e[6]=j);let w;e[7]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsx)(xt,{size:16}),e[7]=w):w=e[7];let v;e[8]===d?v=e[9]:(v=(0,a.jsx)(E,{content:"Add folder",children:(0,a.jsx)(T,{"data-testid":"file-explorer-add-folder-button",onClick:d,variant:"text",size:"xs",children:w})}),e[8]=d,e[9]=v);let o;e[10]===l?o=e[11]:(o=l({}),e[10]=l,e[11]=o);let y,m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=Gt({variant:"text",size:"xs"}),y=(0,a.jsx)(ha,{size:16}),e[12]=y,e[13]=m):(y=e[12],m=e[13]);let b;e[14]===o?b=e[15]:(b=(0,a.jsx)(E,{content:"Upload file",children:(0,a.jsx)("button",{"data-testid":"file-explorer-upload-button",...o,className:m,children:y})}),e[14]=o,e[15]=b);let u;e[16]===f?u=e[17]:(u=f({}),e[16]=f,e[17]=u);let N;e[18]===u?N=e[19]:(N=(0,a.jsx)("input",{...u,type:"file"}),e[18]=u,e[19]=N);let F;e[20]===n?F=e[21]:(F=(0,a.jsx)(ct,{"data-testid":"file-explorer-refresh-button",onClick:n}),e[20]=n,e[21]=F);let _;e[22]===Symbol.for("react.memo_cache_sentinel")?(_=(0,a.jsx)(aa,{size:16}),e[22]=_):_=e[22];let S;e[23]===i?S=e[24]:(S=(0,a.jsx)(E,{content:"Toggle hidden files",children:(0,a.jsx)(T,{"data-testid":"file-explorer-hidden-files-button",onClick:i,variant:"text",size:"xs",children:_})}),e[23]=i,e[24]=S);let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=(0,a.jsx)(Ra,{size:16}),e[25]=M):M=e[25];let P;e[26]===c?P=e[27]:(P=(0,a.jsx)(E,{content:"Collapse all folders",children:(0,a.jsx)(T,{"data-testid":"file-explorer-collapse-button",onClick:c,variant:"text",size:"xs",children:M})}),e[26]=c,e[27]=P);let D;return e[28]!==b||e[29]!==N||e[30]!==F||e[31]!==S||e[32]!==P||e[33]!==p||e[34]!==j||e[35]!==v?(D=(0,a.jsxs)("div",{className:"flex items-center justify-end px-2 shrink-0 border-b",children:[p,j,v,b,N,F,S,P]}),e[28]=b,e[29]=N,e[30]=F,e[31]=S,e[32]=P,e[33]=p,e[34]=j,e[35]=v,e[36]=D):D=e[36],D},un=t=>{let e=(0,de.c)(9),{node:n,onOpenMarimoFile:i}=t,r;e[0]===n?r=e[1]:(r=c=>{n.data.isDirectory||(c.stopPropagation(),n.select())},e[0]=n,e[1]=r);let s;e[2]!==n.data.isMarimoFile||e[3]!==i?(s=n.data.isMarimoFile&&!xe()&&(0,a.jsxs)("span",{"data-testid":"file-explorer-open-marimo-button",className:"shrink-0 ml-2 text-sm hidden group-hover:inline hover:underline",onClick:i,children:["open ",(0,a.jsx)(ke,{className:"inline ml-1",size:12})]}),e[2]=n.data.isMarimoFile,e[3]=i,e[4]=s):s=e[4];let d;return e[5]!==n.data.name||e[6]!==r||e[7]!==s?(d=(0,a.jsxs)("span",{className:"flex-1 overflow-hidden text-ellipsis",onClick:r,children:[n.data.name,s]}),e[5]=n.data.name,e[6]=r,e[7]=s,e[8]=d):d=e[8],d},gn=t=>{let e=(0,de.c)(10),{node:n}=t,i=(0,z.useRef)(null),r,s;e[0]===n.data.name?(r=e[1],s=e[2]):(r=()=>{var l,f;(l=i.current)==null||l.focus(),(f=i.current)==null||f.setSelectionRange(0,n.data.name.lastIndexOf("."))},s=[n.data.name],e[0]=n.data.name,e[1]=r,e[2]=s),(0,z.useEffect)(r,s);let d,c;e[3]===n?(d=e[4],c=e[5]):(d=()=>n.reset(),c=l=>{l.key==="Escape"&&n.reset(),l.key==="Enter"&&n.submit(l.currentTarget.value)},e[3]=n,e[4]=d,e[5]=c);let h;return e[6]!==n.data.name||e[7]!==d||e[8]!==c?(h=(0,a.jsx)("input",{ref:i,className:"flex-1 bg-transparent border border-border text-muted-foreground",defaultValue:n.data.name,onClick:Nn,onBlur:d,onKeyDown:c}),e[6]=n.data.name,e[7]=d,e[8]=c,e[9]=h):h=e[9],h},yn=t=>{let e=(0,de.c)(71),{node:n,style:i,dragHandle:r}=t,{openFile:s,sendFileDetails:d}=we(),c=he(Le),h;e[0]!==n.data.isDirectory||e[1]!==n.data.name?(h=n.data.isDirectory?"directory":sa(n.data.name),e[0]=n.data.isDirectory,e[1]=n.data.name,e[2]=h):h=e[2];let l=h,f=ra[l],{openConfirm:x,openPrompt:p}=nt(),{createNewCell:g}=At(),j=Ca(),w;e[3]!==g||e[4]!==j?(w=C=>{g({code:C,before:!1,cellId:j??"__end__"})},e[3]=g,e[4]=j,e[5]=w):w=e[5];let v=w,o=(0,z.use)(St),y;e[6]!==n.data.path||e[7]!==o?(y=async C=>{Pt(C,o?o.relativeFromRoot(n.data.path):n.data.path)},e[6]=n.data.path,e[7]=o,e[8]=y):y=e[8];let m=y,b;e[9]!==n.data.name||e[10]!==n.id||e[11]!==n.tree||e[12]!==x?(b=async C=>{C.stopPropagation(),C.preventDefault(),x({title:"Delete file",description:`Are you sure you want to delete ${n.data.name}?`,confirmAction:(0,a.jsx)(Ut,{onClick:async()=>{await n.tree.delete(n.id)},"aria-label":"Confirm",children:"Delete"})})},e[9]=n.data.name,e[10]=n.id,e[11]=n.tree,e[12]=x,e[13]=b):b=e[13];let u=b,N;e[14]!==n||e[15]!==p||e[16]!==o?(N=async()=>{n.open(),p({title:"Folder name",onConfirm:async C=>{o==null||o.createFolder(C,n.id)}})},e[14]=n,e[15]=p,e[16]=o,e[17]=N):N=e[17];let F=J(N),_;e[18]!==n||e[19]!==p||e[20]!==o?(_=async()=>{n.open(),p({title:"File name",onConfirm:async C=>{o==null||o.createFile(C,n.id)}})},e[18]=n,e[19]=p,e[20]=o,e[21]=_):_=e[21];let S=J(_),M;e[22]!==n||e[23]!==p||e[24]!==o?(M=async()=>{n.open(),p({title:"Notebook name",onConfirm:async C=>{o==null||o.createFile(C,n.id,"notebook")}})},e[22]=n,e[23]=p,e[24]=o,e[25]=M):M=e[25];let P=J(M),D;e[26]!==n.data.name||e[27]!==n.id||e[28]!==o?(D=async()=>{if(!o)return;let[C,k]=ma(n.data.name),O=`${C}_copy${k}`;await o.copy(n.id,O)},e[26]=n.data.name,e[27]=n.id,e[28]=o,e[29]=D):D=e[29];let A=J(D),R;e[30]!==c||e[31]!==l||e[32]!==S||e[33]!==F||e[34]!==P||e[35]!==u||e[36]!==A||e[37]!==v||e[38]!==m||e[39]!==n||e[40]!==s||e[41]!==d||e[42]!==o?(R=()=>(0,a.jsxs)(He,{align:"end",className:"print:hidden w-[220px]",onClick:kn,onCloseAutoFocus:Fn,children:[!n.data.isDirectory&&(0,a.jsxs)($,{onSelect:()=>n.select(),children:[(0,a.jsx)(gt,{className:"h-3.5 w-3.5 mr-2"}),"Open file"]}),!n.data.isDirectory&&!xe()&&(0,a.jsxs)($,{onSelect:()=>{s({path:n.data.path})},children:[(0,a.jsx)(ke,{className:"h-3.5 w-3.5 mr-2"}),"Open file in external editor"]}),n.data.isDirectory&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)($,{onSelect:()=>P(),children:[(0,a.jsx)(pt,{className:"h-3.5 w-3.5 mr-2"}),"Create notebook"]}),(0,a.jsxs)($,{onSelect:()=>S(),children:[(0,a.jsx)(ft,{className:"h-3.5 w-3.5 mr-2"}),"Create file"]}),(0,a.jsxs)($,{onSelect:()=>F(),children:[(0,a.jsx)(xt,{className:"h-3.5 w-3.5 mr-2"}),"Create folder"]}),(0,a.jsx)(ce,{})]}),(0,a.jsxs)($,{onSelect:()=>n.edit(),children:[(0,a.jsx)(Ea,{className:ee}),"Rename"]}),(0,a.jsxs)($,{onSelect:A,children:[(0,a.jsx)(Ce,{className:ee}),"Duplicate"]}),(0,a.jsxs)($,{onSelect:async()=>{await me(n.data.path),I({title:"Copied to clipboard"})},children:[(0,a.jsx)(ut,{className:ee}),"Copy path"]}),o&&(0,a.jsxs)($,{onSelect:async()=>{await me(o.relativeFromRoot(n.data.path)),I({title:"Copied to clipboard"})},children:[(0,a.jsx)(ut,{className:"h-3.5 w-3.5 mr-2"}),"Copy relative path"]}),(0,a.jsx)(ce,{}),(0,a.jsxs)($,{onSelect:()=>{let{path:C}=n.data;v(Ct[l](C))},children:[(0,a.jsx)(Xt,{className:ee}),"Insert snippet for reading file"]}),(0,a.jsxs)($,{onSelect:async()=>{I({title:"Copied to clipboard",description:"Code to open the file has been copied to your clipboard. You can also drag and drop this file into the editor"});let{path:C}=n.data;await me(Ct[l](C))},children:[(0,a.jsx)(Et,{className:ee}),"Copy snippet for reading file"]}),n.data.isMarimoFile&&!xe()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ce,{}),(0,a.jsxs)($,{onSelect:m,children:[(0,a.jsx)(Ia,{className:"h-3.5 w-3.5 mr-2"}),"Open notebook"]})]}),(0,a.jsx)(ce,{}),!n.data.isDirectory&&!c&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)($,{onSelect:async()=>{let C=await d({path:n.data.path});C.isBase64&&C.contents?ge(st(Fe(C.contents,C.mimeType||"application/octet-stream")),n.data.name):ge(new Blob([C.contents||""]),n.data.name)},children:[(0,a.jsx)(be,{className:"h-3.5 w-3.5 mr-2"}),"Download"]}),(0,a.jsx)(ce,{})]}),(0,a.jsxs)($,{onSelect:u,variant:"danger",children:[(0,a.jsx)(ca,{className:ee}),"Delete"]})]}),e[30]=c,e[31]=l,e[32]=S,e[33]=F,e[34]=P,e[35]=u,e[36]=A,e[37]=v,e[38]=m,e[39]=n,e[40]=s,e[41]=d,e[42]=o,e[43]=R):R=e[43];let ne=R,Y;e[44]===Symbol.for("react.memo_cache_sentinel")?(Y=re("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group"),e[44]=Y):Y=e[44];let G,B;e[45]===n?(G=e[46],B=e[47]):(G=C=>{C.stopPropagation(),n.data.isDirectory&&n.toggle()},B=(0,a.jsx)(jn,{node:n}),e[45]=n,e[46]=G,e[47]=B);let se=n.willReceiveDrop&&n.data.isDirectory&&"bg-accent/80 hover:bg-accent/80 text-accent-foreground",L;e[48]===se?L=e[49]:(L=re("flex items-center pl-1 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden group",se),e[48]=se,e[49]=L);let V;e[50]!==f||e[51]!==l||e[52]!==n.data.isMarimoFile?(V=n.data.isMarimoFile?(0,a.jsx)(Oa,{className:"w-5 h-5 shrink-0 mr-2",strokeWidth:1.5}):(0,a.jsx)(f,{className:re("w-5 h-5 shrink-0 mr-2",Ye[l]),strokeWidth:1.5}),e[50]=f,e[51]=l,e[52]=n.data.isMarimoFile,e[53]=V):V=e[53];let H;e[54]!==m||e[55]!==n?(H=n.isEditing?(0,a.jsx)(gn,{node:n}):(0,a.jsx)(un,{node:n,onOpenMarimoFile:m}),e[54]=m,e[55]=n,e[56]=H):H=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,a.jsx)(Ve,{asChild:!0,tabIndex:-1,onClick:Cn,children:(0,a.jsx)(ot,{"data-testid":"file-explorer-more-button",iconClassName:"w-5 h-5"})}),e[57]=Z):Z=e[57];let q;e[58]===ne?q=e[59]:(q=(0,a.jsxs)(qe,{modal:!1,children:[Z,ne()]}),e[58]=ne,e[59]=q);let U;e[60]!==L||e[61]!==V||e[62]!==H||e[63]!==q?(U=(0,a.jsxs)("span",{className:L,children:[V,H,q]}),e[60]=L,e[61]=V,e[62]=H,e[63]=q,e[64]=U):U=e[64];let K;return e[65]!==r||e[66]!==i||e[67]!==G||e[68]!==B||e[69]!==U?(K=(0,a.jsxs)("div",{style:i,ref:r,className:Y,draggable:!0,onClick:G,children:[B,U]}),e[65]=r,e[66]=i,e[67]=G,e[68]=B,e[69]=U,e[70]=K):K=e[70],K},jn=t=>{let e=(0,de.c)(3),{node:n}=t;if(!n.data.isDirectory){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)("span",{className:"w-4 h-4 shrink-0"}),e[0]=r):r=e[0],r}let i;return e[1]===n.isOpen?i=e[2]:(i=(0,a.jsx)(Me,{isExpanded:n.isOpen,className:"w-4 h-4"}),e[1]=n.isOpen,e[2]=i),i};function Pt(t,e){t.stopPropagation(),t.preventDefault(),$a(e)}function Dt(t,e){if(e)return t;let n=[];for(let i of t){if(bn(i.name))continue;let r=i;if(i.children){let s=Dt(i.children,e);s!==i.children&&(r={...i,children:s})}n.push(r)}return n}function bn(t){return!!t.startsWith(".")}function vn(){return null}function wn(t){let{parentNode:e}=t;return!e.data.isDirectory}function Nn(t){return t.stopPropagation()}function kn(t){return t.stopPropagation()}function Fn(t){return t.preventDefault()}function Cn(t){return t.stopPropagation()}var Mt=oe(),_n=Be("marimo:file-explorer-panel:state",{openSections:["files"],hasUserInteracted:!1},Ie),Sn=t=>{let e=(0,Mt.c)(20),{height:n}=t,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={noClick:!0,noKeyboard:!0},e[0]=i):i=e[0];let{getRootProps:r,getInputProps:s,isDragActive:d}=_t(i),c;e[1]===r?c=e[2]:(c=r(),e[1]=r,e[2]=c);let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=re("flex flex-col overflow-hidden relative"),e[3]=h):h=e[3];let l;e[4]===n?l=e[5]:(l={height:n},e[4]=n,e[5]=l);let f;e[6]===s?f=e[7]:(f=s(),e[6]=s,e[7]=f);let x;e[8]===f?x=e[9]:(x=(0,a.jsx)("input",{...f}),e[8]=f,e[9]=x);let p;e[10]===d?p=e[11]:(p=d&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center uppercase justify-center text-xl font-bold text-primary/90 bg-accent/85 z-10 border-2 border-dashed border-primary/90 rounded-lg pointer-events-none",children:"Drop files here"}),e[10]=d,e[11]=p);let g;e[12]===n?g=e[13]:(g=(0,a.jsx)(pn,{height:n}),e[12]=n,e[13]=g);let j;return e[14]!==c||e[15]!==l||e[16]!==x||e[17]!==p||e[18]!==g?(j=(0,a.jsx)(Qa,{children:(0,a.jsxs)("div",{...c,className:h,style:l,children:[x,p,g]})}),e[14]=c,e[15]=l,e[16]=x,e[17]=p,e[18]=g,e[19]=j):j=e[19],j},Pn=33,Dn=()=>{let t=(0,Mt.c)(36),{ref:e,height:n}=Sa(),i=n===void 0?500:n,[r,s]=fe(_n),d=he(Qt).length,c;e:{if(!r.hasUserInteracted&&d>0){if(r.openSections.includes("remote-storage")){c=r.openSections;break e}let R;t[0]===r.openSections?R=t[1]:(R=[...r.openSections,"remote-storage"],t[0]=r.openSections,t[1]=R),c=R;break e}c=r.openSections}let h=c,l;t[2]===s?l=t[3]:(l=R=>{s({openSections:R,hasUserInteracted:!0})},t[2]=s,t[3]=l);let f=l,x=i-Pn*2,p;t[4]===h?p=t[5]:(p=h.includes("remote-storage"),t[4]=h,t[5]=p);let g=p,j;t[6]!==h||t[7]!==g?(j=g&&h.includes("files"),t[6]=h,t[7]=g,t[8]=j):j=t[8];let w=j,v;t[9]!==x||t[10]!==w?(v=w?Math.round(x*.4):x,t[9]=x,t[10]=w,t[11]=v):v=t[11];let o=v,y=Math.max(200,w?x-o:x),m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(Qe,{className:"w-4 h-4"}),t[12]=m):m=t[12];let b;t[13]===d?b=t[14]:(b=d>0&&(0,a.jsx)(za,{children:d}),t[13]=d,t[14]=b);let u;t[15]===b?u=t[16]:(u=(0,a.jsxs)(ht,{children:[m," Remote storage",b]}),t[15]=b,t[16]=u);let N;t[17]===o?N=t[18]:(N={maxHeight:o},t[17]=o,t[18]=N);let F;t[19]===Symbol.for("react.memo_cache_sentinel")?(F=(0,a.jsx)(Ja,{}),t[19]=F):F=t[19];let _;t[20]===N?_=t[21]:(_=(0,a.jsx)(mt,{className:"overflow-auto",style:N,children:F}),t[20]=N,t[21]=_);let S;t[22]!==_||t[23]!==u?(S=(0,a.jsxs)(dt,{value:"remote-storage",children:[u,_]}),t[22]=_,t[23]=u,t[24]=S):S=t[24];let M;t[25]===Symbol.for("react.memo_cache_sentinel")?(M=(0,a.jsxs)(ht,{children:[(0,a.jsx)(Ze,{className:"w-4 h-4"}),"Files"]}),t[25]=M):M=t[25];let P;t[26]===y?P=t[27]:(P=(0,a.jsxs)(dt,{value:"files",children:[M,(0,a.jsx)(mt,{children:(0,a.jsx)(Sn,{height:y})})]}),t[26]=y,t[27]=P);let D;t[28]!==f||t[29]!==h||t[30]!==S||t[31]!==P?(D=(0,a.jsxs)(qt,{type:"multiple",value:h,onValueChange:f,children:[S,P]}),t[28]=f,t[29]=h,t[30]=S,t[31]=P,t[32]=D):D=t[32];let A;return t[33]!==e||t[34]!==D?(A=(0,a.jsx)("div",{ref:e,className:"h-full overflow-auto",children:D}),t[33]=e,t[34]=D,t[35]=A):A=t[35],A};export{Dn as default};
|
|
26
|
+
`};var nn=oe(),sn=1024*1024*100;function _t(t){let e=(0,nn.c)(7),n;e[0]===t?n=e[1]:(n=t===void 0?{}:t,e[0]=t,e[1]=n);let i=n,{sendCreateFileOrFolder:r}=we(),s;e[2]===r?s=e[3]:(s=async c=>{if(c.length===0)return;let h=c.length===1;await Kt(h?"Uploading file...":"Uploading files...",async l=>{l.addTotal(c.length);for(let f of c){let x=hn(dn(f)),p="";x&&(p=Se.guessDeliminator(x).dirname(x));let g=(await ua(f)).split(",")[1];await r({path:p,type:"file",name:f.name,contents:g}),l.increment(1)}await an()},{title:h?"File uploaded":`${c.length} files uploaded`})},e[2]=r,e[3]=s);let d;return e[4]!==i||e[5]!==s?(d={multiple:!0,maxSize:sn,onError:cn,onDropRejected:rn,onDrop:s,...i},e[4]=i,e[5]=s,e[6]=d):d=e[6],pa(d)}function rn(t){I({title:"File upload failed",description:(0,a.jsx)("div",{className:"flex flex-col gap-1",children:t.map(ln)}),variant:"danger"})}function ln(t){return(0,a.jsxs)("div",{children:[t.file.name," (",t.errors.map(on).join(", "),")"]},t.file.name)}function on(t){return t.message}function cn(t){je.error(t),I({title:"File upload failed",description:t.message,variant:"danger"})}function dn(t){if(t.webkitRelativePath)return t.webkitRelativePath;if("path"in t&&typeof t.path=="string")return t.path;if("relativePath"in t&&typeof t.relativePath=="string")return t.relativePath}function hn(t){if(t)return t.replace(/^\/+/,"")}var de=oe(),mn=Be("marimo:showHiddenFiles",!0,Ie,{getOnInit:!0}),St=z.createContext(null);const pn=t=>{let e=(0,de.c)(72),{height:n}=t,i=(0,z.useRef)(null),r=Ya(),[s]=fe(Ft),d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];let[c,h]=(0,z.useState)(d),[l,f]=(0,z.useState)(null),[x,p]=fe(mn),{openPrompt:g}=nt(),[j,w]=fe(tn),v;e[1]===s?v=e[2]:(v=()=>s.initialize(h),e[1]=s,e[2]=v);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[3]=o):o=e[3];let{isPending:y,error:m}=De(v,o),b;e[4]!==j||e[5]!==s?(b=()=>s.refreshAll(Object.keys(j).filter(k=>j[k])),e[4]=j,e[5]=s,e[6]=b):b=e[6];let u=J(b),N;e[7]!==p||e[8]!==x?(N=()=>{p(!x)},e[7]=p,e[8]=x,e[9]=N):N=e[9];let F=J(N),_;e[10]!==g||e[11]!==s?(_=async()=>{g({title:"Folder name",onConfirm:async k=>{s.createFolder(k,null)}})},e[10]=g,e[11]=s,e[12]=_):_=e[12];let S=J(_),M;e[13]!==g||e[14]!==s?(M=async()=>{g({title:"File name",onConfirm:async k=>{s.createFile(k,null)}})},e[13]=g,e[14]=s,e[15]=M):M=e[15];let P=J(M),D;e[16]!==g||e[17]!==s?(D=async()=>{g({title:"Notebook name",onConfirm:async k=>{s.createFile(k,null,"notebook")}})},e[16]=g,e[17]=s,e[18]=D):D=e[18];let E=J(D),R;e[19]===w?R=e[20]:(R=()=>{var k;(k=i.current)==null||k.closeAll(),w({})},e[19]=w,e[20]=R);let ne=J(R),Y;e[21]!==c||e[22]!==x?(Y=Dt(c,x),e[21]=c,e[22]=x,e[23]=Y):Y=e[23];let G=Y;if(y){let k;return e[24]===Symbol.for("react.memo_cache_sentinel")?(k=(0,a.jsx)(la,{size:"medium",centered:!0}),e[24]=k):k=e[24],k}if(m){let k;return e[25]===m?k=e[26]:(k=(0,a.jsx)(rt,{error:m}),e[25]=m,e[26]=k),k}if(l){let k;e[27]===Symbol.for("react.memo_cache_sentinel")?(k=()=>f(null),e[27]=k):k=e[27];let O;e[28]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(T,{onClick:k,"data-testid":"file-explorer-back-button",variant:"text",size:"xs",className:"mb-0",children:(0,a.jsx)(Ke,{size:16})}),e[28]=O):O=e[28];let W;e[29]===l.name?W=e[30]:(W=(0,a.jsxs)("div",{className:"flex items-center pl-1 pr-3 shrink-0 border-b justify-between",children:[O,(0,a.jsx)("span",{className:"font-bold",children:l.name})]}),e[29]=l.name,e[30]=W);let ie;e[31]!==l.path||e[32]!==s?(ie=zt=>Pt(zt,s.relativeFromRoot(l.path)),e[31]=l.path,e[32]=s,e[33]=ie):ie=e[33];let le;e[34]!==l||e[35]!==ie?(le=(0,a.jsx)(z.Suspense,{children:(0,a.jsx)(Xa,{onOpenNotebook:ie,file:l})}),e[34]=l,e[35]=ie,e[36]=le):le=e[36];let pe;return e[37]!==W||e[38]!==le?(pe=(0,a.jsxs)(a.Fragment,{children:[W,le]}),e[37]=W,e[38]=le,e[39]=pe):pe=e[39],pe}let B;e[40]!==ne||e[41]!==P||e[42]!==S||e[43]!==E||e[44]!==F||e[45]!==u||e[46]!==s?(B=(0,a.jsx)(xn,{onRefresh:u,onHidden:F,onCreateFile:P,onCreateNotebook:E,onCreateFolder:S,onCollapseAll:ne,tree:s}),e[40]=ne,e[41]=P,e[42]=S,e[43]=E,e[44]=F,e[45]=u,e[46]=s,e[47]=B):B=e[47];let se=n-33,L,V,H;e[48]===s?(L=e[49],V=e[50],H=e[51]):(L=async k=>{let{ids:O}=k;for(let W of O)await s.delete(W)},V=async k=>{let{id:O,name:W}=k;await s.rename(O,W)},H=async k=>{let{dragIds:O,parentId:W}=k;await s.move(O,W)},e[48]=s,e[49]=L,e[50]=V,e[51]=H);let Z;e[52]===Symbol.for("react.memo_cache_sentinel")?(Z=k=>{let O=k[0];O&&(O.data.isDirectory||f(O.data))},e[52]=Z):Z=e[52];let q;e[53]!==j||e[54]!==w||e[55]!==s?(q=async k=>{if(await s.expand(k)){let O=j[k]??!1;w({...j,[k]:!O})}},e[53]=j,e[54]=w,e[55]=s,e[56]=q):q=e[56];let U;e[57]!==r||e[58]!==j||e[59]!==se||e[60]!==L||e[61]!==V||e[62]!==H||e[63]!==q||e[64]!==G?(U=(0,a.jsx)(ba,{width:"100%",ref:i,height:se,className:"h-full",data:G,initialOpenState:j,openByDefault:!1,dndManager:r,renderCursor:vn,disableDrop:wn,onDelete:L,onRename:V,onMove:H,onSelect:Z,onToggle:q,padding:15,rowHeight:30,indent:fn,overscanCount:1e3,disableMultiSelection:!0,children:yn}),e[57]=r,e[58]=j,e[59]=se,e[60]=L,e[61]=V,e[62]=H,e[63]=q,e[64]=G,e[65]=U):U=e[65];let K;e[66]!==U||e[67]!==s?(K=(0,a.jsx)(St,{value:s,children:U}),e[66]=U,e[67]=s,e[68]=K):K=e[68];let C;return e[69]!==B||e[70]!==K?(C=(0,a.jsxs)(a.Fragment,{children:[B,K]}),e[69]=B,e[70]=K,e[71]=C):C=e[71],C};var fn=15,xn=t=>{let e=(0,de.c)(37),{onRefresh:n,onHidden:i,onCreateFile:r,onCreateNotebook:s,onCreateFolder:d,onCollapseAll:c}=t,h;e[0]===Symbol.for("react.memo_cache_sentinel")?(h={noDrag:!0,noDragEventsBubbling:!0},e[0]=h):h=e[0];let{getRootProps:l,getInputProps:f}=_t(h),x;e[1]===Symbol.for("react.memo_cache_sentinel")?(x=(0,a.jsx)(pt,{size:16}),e[1]=x):x=e[1];let p;e[2]===s?p=e[3]:(p=(0,a.jsx)(A,{content:"Add notebook",children:(0,a.jsx)(T,{"data-testid":"file-explorer-add-notebook-button",onClick:s,variant:"text",size:"xs",children:x})}),e[2]=s,e[3]=p);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=(0,a.jsx)(ft,{size:16}),e[4]=g):g=e[4];let j;e[5]===r?j=e[6]:(j=(0,a.jsx)(A,{content:"Add file",children:(0,a.jsx)(T,{"data-testid":"file-explorer-add-file-button",onClick:r,variant:"text",size:"xs",children:g})}),e[5]=r,e[6]=j);let w;e[7]===Symbol.for("react.memo_cache_sentinel")?(w=(0,a.jsx)(xt,{size:16}),e[7]=w):w=e[7];let v;e[8]===d?v=e[9]:(v=(0,a.jsx)(A,{content:"Add folder",children:(0,a.jsx)(T,{"data-testid":"file-explorer-add-folder-button",onClick:d,variant:"text",size:"xs",children:w})}),e[8]=d,e[9]=v);let o;e[10]===l?o=e[11]:(o=l({}),e[10]=l,e[11]=o);let y,m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=Gt({variant:"text",size:"xs"}),y=(0,a.jsx)(ha,{size:16}),e[12]=y,e[13]=m):(y=e[12],m=e[13]);let b;e[14]===o?b=e[15]:(b=(0,a.jsx)(A,{content:"Upload file",children:(0,a.jsx)("button",{"data-testid":"file-explorer-upload-button",...o,className:m,children:y})}),e[14]=o,e[15]=b);let u;e[16]===f?u=e[17]:(u=f({}),e[16]=f,e[17]=u);let N;e[18]===u?N=e[19]:(N=(0,a.jsx)("input",{...u,type:"file"}),e[18]=u,e[19]=N);let F;e[20]===n?F=e[21]:(F=(0,a.jsx)(ct,{"data-testid":"file-explorer-refresh-button",onClick:n}),e[20]=n,e[21]=F);let _;e[22]===Symbol.for("react.memo_cache_sentinel")?(_=(0,a.jsx)(aa,{size:16}),e[22]=_):_=e[22];let S;e[23]===i?S=e[24]:(S=(0,a.jsx)(A,{content:"Toggle hidden files",children:(0,a.jsx)(T,{"data-testid":"file-explorer-hidden-files-button",onClick:i,variant:"text",size:"xs",children:_})}),e[23]=i,e[24]=S);let M;e[25]===Symbol.for("react.memo_cache_sentinel")?(M=(0,a.jsx)(Ra,{size:16}),e[25]=M):M=e[25];let P;e[26]===c?P=e[27]:(P=(0,a.jsx)(A,{content:"Collapse all folders",children:(0,a.jsx)(T,{"data-testid":"file-explorer-collapse-button",onClick:c,variant:"text",size:"xs",children:M})}),e[26]=c,e[27]=P);let D;return e[28]!==b||e[29]!==N||e[30]!==F||e[31]!==S||e[32]!==P||e[33]!==p||e[34]!==j||e[35]!==v?(D=(0,a.jsxs)("div",{className:"flex items-center justify-end px-2 shrink-0 border-b",children:[p,j,v,b,N,F,S,P]}),e[28]=b,e[29]=N,e[30]=F,e[31]=S,e[32]=P,e[33]=p,e[34]=j,e[35]=v,e[36]=D):D=e[36],D},un=t=>{let e=(0,de.c)(9),{node:n,onOpenMarimoFile:i}=t,r;e[0]===n?r=e[1]:(r=c=>{n.data.isDirectory||(c.stopPropagation(),n.select())},e[0]=n,e[1]=r);let s;e[2]!==n.data.isMarimoFile||e[3]!==i?(s=n.data.isMarimoFile&&!xe()&&(0,a.jsxs)("span",{"data-testid":"file-explorer-open-marimo-button",className:"shrink-0 ml-2 text-sm hidden group-hover:inline hover:underline",onClick:i,children:["open ",(0,a.jsx)(ke,{className:"inline ml-1",size:12})]}),e[2]=n.data.isMarimoFile,e[3]=i,e[4]=s):s=e[4];let d;return e[5]!==n.data.name||e[6]!==r||e[7]!==s?(d=(0,a.jsxs)("span",{className:"flex-1 overflow-hidden text-ellipsis",onClick:r,children:[n.data.name,s]}),e[5]=n.data.name,e[6]=r,e[7]=s,e[8]=d):d=e[8],d},gn=t=>{let e=(0,de.c)(10),{node:n}=t,i=(0,z.useRef)(null),r,s;e[0]===n.data.name?(r=e[1],s=e[2]):(r=()=>{var l,f;(l=i.current)==null||l.focus(),(f=i.current)==null||f.setSelectionRange(0,n.data.name.lastIndexOf("."))},s=[n.data.name],e[0]=n.data.name,e[1]=r,e[2]=s),(0,z.useEffect)(r,s);let d,c;e[3]===n?(d=e[4],c=e[5]):(d=()=>n.reset(),c=l=>{l.key==="Escape"&&n.reset(),l.key==="Enter"&&n.submit(l.currentTarget.value)},e[3]=n,e[4]=d,e[5]=c);let h;return e[6]!==n.data.name||e[7]!==d||e[8]!==c?(h=(0,a.jsx)("input",{ref:i,className:"flex-1 bg-transparent border border-border text-muted-foreground",defaultValue:n.data.name,onClick:Nn,onBlur:d,onKeyDown:c}),e[6]=n.data.name,e[7]=d,e[8]=c,e[9]=h):h=e[9],h},yn=t=>{let e=(0,de.c)(71),{node:n,style:i,dragHandle:r}=t,{openFile:s,sendFileDetails:d}=we(),c=he(Le),h;e[0]!==n.data.isDirectory||e[1]!==n.data.name?(h=n.data.isDirectory?"directory":sa(n.data.name),e[0]=n.data.isDirectory,e[1]=n.data.name,e[2]=h):h=e[2];let l=h,f=ra[l],{openConfirm:x,openPrompt:p}=nt(),{createNewCell:g}=Et(),j=Ca(),w;e[3]!==g||e[4]!==j?(w=C=>{g({code:C,before:!1,cellId:j??"__end__"})},e[3]=g,e[4]=j,e[5]=w):w=e[5];let v=w,o=(0,z.use)(St),y;e[6]!==n.data.path||e[7]!==o?(y=async C=>{Pt(C,o?o.relativeFromRoot(n.data.path):n.data.path)},e[6]=n.data.path,e[7]=o,e[8]=y):y=e[8];let m=y,b;e[9]!==n.data.name||e[10]!==n.id||e[11]!==n.tree||e[12]!==x?(b=async C=>{C.stopPropagation(),C.preventDefault(),x({title:"Delete file",description:`Are you sure you want to delete ${n.data.name}?`,confirmAction:(0,a.jsx)(Ut,{onClick:async()=>{await n.tree.delete(n.id)},"aria-label":"Confirm",children:"Delete"})})},e[9]=n.data.name,e[10]=n.id,e[11]=n.tree,e[12]=x,e[13]=b):b=e[13];let u=b,N;e[14]!==n||e[15]!==p||e[16]!==o?(N=async()=>{n.open(),p({title:"Folder name",onConfirm:async C=>{o==null||o.createFolder(C,n.id)}})},e[14]=n,e[15]=p,e[16]=o,e[17]=N):N=e[17];let F=J(N),_;e[18]!==n||e[19]!==p||e[20]!==o?(_=async()=>{n.open(),p({title:"File name",onConfirm:async C=>{o==null||o.createFile(C,n.id)}})},e[18]=n,e[19]=p,e[20]=o,e[21]=_):_=e[21];let S=J(_),M;e[22]!==n||e[23]!==p||e[24]!==o?(M=async()=>{n.open(),p({title:"Notebook name",onConfirm:async C=>{o==null||o.createFile(C,n.id,"notebook")}})},e[22]=n,e[23]=p,e[24]=o,e[25]=M):M=e[25];let P=J(M),D;e[26]!==n.data.name||e[27]!==n.id||e[28]!==o?(D=async()=>{if(!o)return;let[C,k]=ma(n.data.name),O=`${C}_copy${k}`;await o.copy(n.id,O)},e[26]=n.data.name,e[27]=n.id,e[28]=o,e[29]=D):D=e[29];let E=J(D),R;e[30]!==c||e[31]!==l||e[32]!==S||e[33]!==F||e[34]!==P||e[35]!==u||e[36]!==E||e[37]!==v||e[38]!==m||e[39]!==n||e[40]!==s||e[41]!==d||e[42]!==o?(R=()=>(0,a.jsxs)(He,{align:"end",className:"print:hidden w-[220px]",onClick:kn,onCloseAutoFocus:Fn,children:[!n.data.isDirectory&&(0,a.jsxs)($,{onSelect:()=>n.select(),children:[(0,a.jsx)(gt,{className:"h-3.5 w-3.5 mr-2"}),"Open file"]}),!n.data.isDirectory&&!xe()&&(0,a.jsxs)($,{onSelect:()=>{s({path:n.data.path})},children:[(0,a.jsx)(ke,{className:"h-3.5 w-3.5 mr-2"}),"Open file in external editor"]}),n.data.isDirectory&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)($,{onSelect:()=>P(),children:[(0,a.jsx)(pt,{className:"h-3.5 w-3.5 mr-2"}),"Create notebook"]}),(0,a.jsxs)($,{onSelect:()=>S(),children:[(0,a.jsx)(ft,{className:"h-3.5 w-3.5 mr-2"}),"Create file"]}),(0,a.jsxs)($,{onSelect:()=>F(),children:[(0,a.jsx)(xt,{className:"h-3.5 w-3.5 mr-2"}),"Create folder"]}),(0,a.jsx)(ce,{})]}),(0,a.jsxs)($,{onSelect:()=>n.edit(),children:[(0,a.jsx)(Aa,{className:ee}),"Rename"]}),(0,a.jsxs)($,{onSelect:E,children:[(0,a.jsx)(Ce,{className:ee}),"Duplicate"]}),(0,a.jsxs)($,{onSelect:async()=>{await me(n.data.path),I({title:"Copied to clipboard"})},children:[(0,a.jsx)(ut,{className:ee}),"Copy path"]}),o&&(0,a.jsxs)($,{onSelect:async()=>{await me(o.relativeFromRoot(n.data.path)),I({title:"Copied to clipboard"})},children:[(0,a.jsx)(ut,{className:"h-3.5 w-3.5 mr-2"}),"Copy relative path"]}),(0,a.jsx)(ce,{}),(0,a.jsxs)($,{onSelect:()=>{let{path:C}=n.data;v(Ct[l](C))},children:[(0,a.jsx)(Xt,{className:ee}),"Insert snippet for reading file"]}),(0,a.jsxs)($,{onSelect:async()=>{I({title:"Copied to clipboard",description:"Code to open the file has been copied to your clipboard. You can also drag and drop this file into the editor"});let{path:C}=n.data;await me(Ct[l](C))},children:[(0,a.jsx)(At,{className:ee}),"Copy snippet for reading file"]}),n.data.isMarimoFile&&!xe()&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(ce,{}),(0,a.jsxs)($,{onSelect:m,children:[(0,a.jsx)(Ia,{className:"h-3.5 w-3.5 mr-2"}),"Open notebook"]})]}),(0,a.jsx)(ce,{}),!n.data.isDirectory&&!c&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)($,{onSelect:async()=>{let C=await d({path:n.data.path});C.isBase64&&C.contents?ge(st(Fe(C.contents,C.mimeType||"application/octet-stream")),n.data.name):ge(new Blob([C.contents||""]),n.data.name)},children:[(0,a.jsx)(be,{className:"h-3.5 w-3.5 mr-2"}),"Download"]}),(0,a.jsx)(ce,{})]}),(0,a.jsxs)($,{onSelect:u,variant:"danger",children:[(0,a.jsx)(ca,{className:ee}),"Delete"]})]}),e[30]=c,e[31]=l,e[32]=S,e[33]=F,e[34]=P,e[35]=u,e[36]=E,e[37]=v,e[38]=m,e[39]=n,e[40]=s,e[41]=d,e[42]=o,e[43]=R):R=e[43];let ne=R,Y;e[44]===Symbol.for("react.memo_cache_sentinel")?(Y=re("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group"),e[44]=Y):Y=e[44];let G,B;e[45]===n?(G=e[46],B=e[47]):(G=C=>{C.stopPropagation(),n.data.isDirectory&&n.toggle()},B=(0,a.jsx)(jn,{node:n}),e[45]=n,e[46]=G,e[47]=B);let se=n.willReceiveDrop&&n.data.isDirectory&&"bg-accent/80 hover:bg-accent/80 text-accent-foreground",L;e[48]===se?L=e[49]:(L=re("flex items-center pl-1 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden group",se),e[48]=se,e[49]=L);let V;e[50]!==f||e[51]!==l||e[52]!==n.data.isMarimoFile?(V=n.data.isMarimoFile?(0,a.jsx)(Oa,{className:"w-5 h-5 shrink-0 mr-2",strokeWidth:1.5}):(0,a.jsx)(f,{className:re("w-5 h-5 shrink-0 mr-2",Ye[l]),strokeWidth:1.5}),e[50]=f,e[51]=l,e[52]=n.data.isMarimoFile,e[53]=V):V=e[53];let H;e[54]!==m||e[55]!==n?(H=n.isEditing?(0,a.jsx)(gn,{node:n}):(0,a.jsx)(un,{node:n,onOpenMarimoFile:m}),e[54]=m,e[55]=n,e[56]=H):H=e[56];let Z;e[57]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,a.jsx)(Ve,{asChild:!0,tabIndex:-1,onClick:Cn,children:(0,a.jsx)(ot,{"data-testid":"file-explorer-more-button",iconClassName:"w-5 h-5"})}),e[57]=Z):Z=e[57];let q;e[58]===ne?q=e[59]:(q=(0,a.jsxs)(qe,{modal:!1,children:[Z,ne()]}),e[58]=ne,e[59]=q);let U;e[60]!==L||e[61]!==V||e[62]!==H||e[63]!==q?(U=(0,a.jsxs)("span",{className:L,children:[V,H,q]}),e[60]=L,e[61]=V,e[62]=H,e[63]=q,e[64]=U):U=e[64];let K;return e[65]!==r||e[66]!==i||e[67]!==G||e[68]!==B||e[69]!==U?(K=(0,a.jsxs)("div",{style:i,ref:r,className:Y,draggable:!0,onClick:G,children:[B,U]}),e[65]=r,e[66]=i,e[67]=G,e[68]=B,e[69]=U,e[70]=K):K=e[70],K},jn=t=>{let e=(0,de.c)(3),{node:n}=t;if(!n.data.isDirectory){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=(0,a.jsx)("span",{className:"w-4 h-4 shrink-0"}),e[0]=r):r=e[0],r}let i;return e[1]===n.isOpen?i=e[2]:(i=(0,a.jsx)(Me,{isExpanded:n.isOpen,className:"w-4 h-4"}),e[1]=n.isOpen,e[2]=i),i};function Pt(t,e){t.stopPropagation(),t.preventDefault(),$a(e)}function Dt(t,e){if(e)return t;let n=[];for(let i of t){if(bn(i.name))continue;let r=i;if(i.children){let s=Dt(i.children,e);s!==i.children&&(r={...i,children:s})}n.push(r)}return n}function bn(t){return!!t.startsWith(".")}function vn(){return null}function wn(t){let{parentNode:e}=t;return!e.data.isDirectory}function Nn(t){return t.stopPropagation()}function kn(t){return t.stopPropagation()}function Fn(t){return t.preventDefault()}function Cn(t){return t.stopPropagation()}var Mt=oe(),_n=Be("marimo:file-explorer-panel:state",{openSections:["files"],hasUserInteracted:!1},Ie),Sn=t=>{let e=(0,Mt.c)(20),{height:n}=t,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={noClick:!0,noKeyboard:!0},e[0]=i):i=e[0];let{getRootProps:r,getInputProps:s,isDragActive:d}=_t(i),c;e[1]===r?c=e[2]:(c=r(),e[1]=r,e[2]=c);let h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=re("flex flex-col overflow-hidden relative"),e[3]=h):h=e[3];let l;e[4]===n?l=e[5]:(l={height:n},e[4]=n,e[5]=l);let f;e[6]===s?f=e[7]:(f=s(),e[6]=s,e[7]=f);let x;e[8]===f?x=e[9]:(x=(0,a.jsx)("input",{...f}),e[8]=f,e[9]=x);let p;e[10]===d?p=e[11]:(p=d&&(0,a.jsx)("div",{className:"absolute inset-0 flex items-center uppercase justify-center text-xl font-bold text-primary/90 bg-accent/85 z-10 border-2 border-dashed border-primary/90 rounded-lg pointer-events-none",children:"Drop files here"}),e[10]=d,e[11]=p);let g;e[12]===n?g=e[13]:(g=(0,a.jsx)(pn,{height:n}),e[12]=n,e[13]=g);let j;return e[14]!==c||e[15]!==l||e[16]!==x||e[17]!==p||e[18]!==g?(j=(0,a.jsx)(Qa,{children:(0,a.jsxs)("div",{...c,className:h,style:l,children:[x,p,g]})}),e[14]=c,e[15]=l,e[16]=x,e[17]=p,e[18]=g,e[19]=j):j=e[19],j},Pn=33,Dn=()=>{let t=(0,Mt.c)(36),{ref:e,height:n}=Sa(),i=n===void 0?500:n,[r,s]=fe(_n),d=he(Qt).length,c;e:{if(!r.hasUserInteracted&&d>0){if(r.openSections.includes("remote-storage")){c=r.openSections;break e}let R;t[0]===r.openSections?R=t[1]:(R=[...r.openSections,"remote-storage"],t[0]=r.openSections,t[1]=R),c=R;break e}c=r.openSections}let h=c,l;t[2]===s?l=t[3]:(l=R=>{s({openSections:R,hasUserInteracted:!0})},t[2]=s,t[3]=l);let f=l,x=i-Pn*2,p;t[4]===h?p=t[5]:(p=h.includes("remote-storage"),t[4]=h,t[5]=p);let g=p,j;t[6]!==h||t[7]!==g?(j=g&&h.includes("files"),t[6]=h,t[7]=g,t[8]=j):j=t[8];let w=j,v;t[9]!==x||t[10]!==w?(v=w?Math.round(x*.4):x,t[9]=x,t[10]=w,t[11]=v):v=t[11];let o=v,y=Math.max(200,w?x-o:x),m;t[12]===Symbol.for("react.memo_cache_sentinel")?(m=(0,a.jsx)(Qe,{className:"w-4 h-4"}),t[12]=m):m=t[12];let b;t[13]===d?b=t[14]:(b=d>0&&(0,a.jsx)(za,{children:d}),t[13]=d,t[14]=b);let u;t[15]===b?u=t[16]:(u=(0,a.jsxs)(ht,{children:[m," Remote storage",b]}),t[15]=b,t[16]=u);let N;t[17]===o?N=t[18]:(N={maxHeight:o},t[17]=o,t[18]=N);let F;t[19]===Symbol.for("react.memo_cache_sentinel")?(F=(0,a.jsx)(Ja,{}),t[19]=F):F=t[19];let _;t[20]===N?_=t[21]:(_=(0,a.jsx)(mt,{className:"overflow-auto",style:N,children:F}),t[20]=N,t[21]=_);let S;t[22]!==_||t[23]!==u?(S=(0,a.jsxs)(dt,{value:"remote-storage",children:[u,_]}),t[22]=_,t[23]=u,t[24]=S):S=t[24];let M;t[25]===Symbol.for("react.memo_cache_sentinel")?(M=(0,a.jsxs)(ht,{children:[(0,a.jsx)(Ze,{className:"w-4 h-4"}),"Files"]}),t[25]=M):M=t[25];let P;t[26]===y?P=t[27]:(P=(0,a.jsxs)(dt,{value:"files",children:[M,(0,a.jsx)(mt,{children:(0,a.jsx)(Sn,{height:y})})]}),t[26]=y,t[27]=P);let D;t[28]!==f||t[29]!==h||t[30]!==S||t[31]!==P?(D=(0,a.jsxs)(qt,{type:"multiple",value:h,onValueChange:f,children:[S,P]}),t[28]=f,t[29]=h,t[30]=S,t[31]=P,t[32]=D):D=t[32];let E;return t[33]!==e||t[34]!==D?(E=(0,a.jsx)("div",{ref:e,className:"h-full overflow-auto",children:D}),t[33]=e,t[34]=D,t[35]=E):E=t[35],E};export{Dn as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as y}from"./chunk-LvLJmgfZ.js";import{lr as d}from"./cells-
|
|
1
|
+
import{s as y}from"./chunk-LvLJmgfZ.js";import{lr as d}from"./cells-BA9ZN5Xy.js";import{t as f}from"./cn-DCUzRj2J.js";import{t as g}from"./jsx-runtime-BqBOg78p.js";import{t as e}from"./createLucideIcon-D5guW7EU.js";import{n as c,t as k}from"./file-headphone-BrQspHac.js";import{t as l}from"./file-BrdxGLRX.js";import{t as u}from"./image-HpSc22eh.js";var r=e("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]),v=e("file-play",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M15.033 13.44a.647.647 0 0 1 0 1.12l-4.065 2.352a.645.645 0 0 1-.968-.56v-4.704a.645.645 0 0 1 .967-.56z",key:"1tzo1f"}]]),x=e("file-spreadsheet",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]),z=e("folder-archive",[["circle",{cx:"15",cy:"19",r:"2",key:"u2pros"}],["path",{d:"M20.9 19.8A2 2 0 0 0 22 18V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h5.1",key:"1jj40k"}],["path",{d:"M15 11v-1",key:"cntcp"}],["path",{d:"M15 17v-2",key:"1279jj"}]]),p=e("folder",[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),M=y(g(),1),j={py:"python",txt:"text",md:"text",qmd:"text",log:"text",png:"image",jpg:"image",jpeg:"image",gif:"image",svg:"image",webp:"image",csv:"data",parquet:"data",arrow:"data",xlsx:"data",json:"json",js:"code",ts:"code",tsx:"code",html:"code",css:"code",toml:"code",yaml:"code",yml:"code",wasm:"code",mp3:"audio",m4a:"audio",ogg:"audio",wav:"audio",mp4:"video",m4v:"video",mpeg:"video",webm:"video",mkv:"video",pdf:"pdf",zip:"zip",tar:"zip",gz:"zip"};function i(o){var a;let t=(a=o.split(".").pop())==null?void 0:a.toLowerCase();return t?j[t]??"unknown":"unknown"}const m={directory:p,python:r,code:r,json:c,text:d,image:u,audio:k,video:v,data:x,pdf:d,zip:z,unknown:l},s={directory:"text-amber-500",python:"text-blue-500",code:"text-blue-500",json:"text-blue-500",text:"text-muted-foreground",image:"text-purple-500",audio:"text-orange-500",video:"text-orange-500",data:"text-green-500",pdf:"text-red-500",zip:"text-muted-foreground",unknown:"text-muted-foreground"};function w(o,t){let a=i(o),h=m[a],n=s[a];return(0,M.jsx)(h,{className:f("h-3.5 w-3.5 shrink-0",n,t)})}export{p as a,w as i,s as n,i as r,m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as _}from"./chunk-LvLJmgfZ.js";import{u as j}from"./useEvent-D91BmmQi.js";import{t as M}from"./react-Bj1aDYRI.js";import{S as H,_t as I,it as k}from"./cells-
|
|
1
|
+
import{s as _}from"./chunk-LvLJmgfZ.js";import{u as j}from"./useEvent-D91BmmQi.js";import{t as M}from"./react-Bj1aDYRI.js";import{S as H,_t as I,it as k}from"./cells-BA9ZN5Xy.js";import{t as S}from"./compiler-runtime-B3qBwwSJ.js";import{_ as $}from"./useEventListener-BR0C1MaI.js";import{t as x}from"./cn-DCUzRj2J.js";import{t as B}from"./jsx-runtime-BqBOg78p.js";var L=S(),g=_(M(),1);function T(){return k()==="edit"?document.getElementById("App"):void 0}function O(t){let e=(0,L.c)(7),[r,a]=(0,g.useState)(void 0),[o,s]=(0,g.useState)(void 0),l=(0,g.useRef)(null),n=(0,g.useRef)(null),f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=new Map,e[0]=f):f=e[0];let u=(0,g.useRef)(f),i,m;e[1]===t?(i=e[2],m=e[3]):(i=()=>t.length===0?void 0:(l.current=new IntersectionObserver(d=>{let v=!1;if(d.forEach(h=>{let b=h.target;h.isIntersecting?(!n.current||b.getBoundingClientRect().top<n.current.getBoundingClientRect().top)&&(n.current=b,v=!0):b===n.current&&(n.current=null,v=!0)}),v&&n.current){let h=I(n.current);a("id"in h?h.id:h.path),s(u.current.get(n.current))}},{root:T(),rootMargin:"0px",threshold:0}),t.forEach(d=>{var v;if(d){let h=I(d[0]),b=t.map(D).filter(w=>"id"in h?w.id===h.id:w.textContent===d[0].textContent).indexOf(d[0]);u.current.set(d[0],b),(v=l.current)==null||v.observe(d[0])}}),()=>{l.current&&l.current.disconnect(),n.current=null}),m=[t],e[1]=t,e[2]=i,e[3]=m),(0,g.useEffect)(i,m);let c;return e[4]!==r||e[5]!==o?(c={activeHeaderId:r,activeOccurrences:o},e[4]=r,e[5]=o,e[6]=c):c=e[6],c}function D(t){let[e]=t;return e}function C(t){if(t.length===0)return[];let e=new Map;return t.map(r=>{let a="id"in r.by?r.by.id:r.by.path,o=e.get(a)??0;e.set(a,o+1);let s=N(r,o);return s?[s,a]:null}).filter(Boolean)}function E(t,e){let r=N(t,e);if(!r){$.warn("Could not find element for outline item",t);return}r.scrollIntoView({behavior:"smooth",block:"start"}),r.classList.add("outline-item-highlight"),setTimeout(()=>{r.classList.remove("outline-item-highlight")},3e3)}function N(t,e){return"id"in t.by?document.querySelectorAll(`[id="${CSS.escape(t.by.id)}"]`)[e]:document.evaluate(t.by.path,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}var y=S(),p=_(B(),1);const A=()=>{let t=(0,y.c)(19),{items:e}=j(H),r;t[0]===e?r=t[1]:(r=C(e),t[0]=e,t[1]=r);let{activeHeaderId:a,activeOccurrences:o}=O(r),[s,l]=g.useState(!1);if(e.length<2)return null;let n,f,u;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>l(!0),f=()=>l(!1),u=x("fixed top-[25vh] right-8 z-10000 print:hidden","hidden md:block"),t[2]=n,t[3]=f,t[4]=u):(n=t[2],f=t[3],u=t[4]);let i=s?"-left-[280px] opacity-100":"left-[300px] opacity-0",m;t[5]===i?m=t[6]:(m=x("-top-4 max-h-[70vh] bg-background rounded-lg shadow-lg absolute overflow-auto transition-all duration-300 w-[300px] border",i),t[5]=i,t[6]=m);let c;t[7]!==a||t[8]!==o||t[9]!==e||t[10]!==m?(c=(0,p.jsx)(R,{className:m,items:e,activeHeaderId:a,activeOccurrences:o}),t[7]=a,t[8]=o,t[9]=e,t[10]=m,t[11]=c):c=t[11];let d;t[12]!==a||t[13]!==o||t[14]!==e?(d=(0,p.jsx)(P,{items:e,activeHeaderId:a,activeOccurrences:o}),t[12]=a,t[13]=o,t[14]=e,t[15]=d):d=t[15];let v;return t[16]!==c||t[17]!==d?(v=(0,p.jsxs)("div",{onMouseEnter:n,onMouseLeave:f,className:u,children:[c,d]}),t[16]=c,t[17]=d,t[18]=v):v=t[18],v},P=t=>{let e=(0,y.c)(8),{items:r,activeHeaderId:a,activeOccurrences:o}=t,s,l;if(e[0]!==a||e[1]!==o||e[2]!==r){let f=new Map;s="flex flex-col gap-4 items-end max-h-[70vh] overflow-hidden",l=r.map((u,i)=>{let m="id"in u.by?u.by.id:u.by.path,c=f.get(m)??0;return f.set(m,c+1),(0,p.jsx)("div",{className:x("h-[2px] bg-muted-foreground/60",u.level===1&&"w-5",u.level===2&&"w-4",u.level===3&&"w-3",u.level===4&&"w-2",c===o&&a===m&&"bg-foreground"),onClick:()=>E(u,c)},`${m}-${i}`)}),e[0]=a,e[1]=o,e[2]=r,e[3]=s,e[4]=l}else s=e[3],l=e[4];let n;return e[5]!==s||e[6]!==l?(n=(0,p.jsx)("div",{className:s,children:l}),e[5]=s,e[6]=l,e[7]=n):n=e[7],n},R=t=>{let e=(0,y.c)(11),{items:r,activeHeaderId:a,activeOccurrences:o,className:s}=t,l,n;if(e[0]!==a||e[1]!==o||e[2]!==s||e[3]!==r){let u=new Map;e[6]===s?l=e[7]:(l=x("flex flex-col overflow-auto py-4 pl-2",s),e[6]=s,e[7]=l),n=r.map((i,m)=>{let c="id"in i.by?i.by.id:i.by.path,d=u.get(c)??0;u.set(c,d+1);let v=`${c}-${m}`,h={className:x("px-2 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l",i.level===1&&"font-semibold",i.level===2&&"ml-3",i.level===3&&"ml-6",i.level===4&&"ml-9",d===o&&a===c&&"text-accent-foreground"),onClick:()=>E(i,d)};return i.html?(0,p.jsx)("div",{...h,dangerouslySetInnerHTML:{__html:i.html}},v):(0,p.jsx)("div",{...h,children:i.name},v)}),e[0]=a,e[1]=o,e[2]=s,e[3]=r,e[4]=l,e[5]=n}else l=e[4],n=e[5];let f;return e[8]!==l||e[9]!==n?(f=(0,p.jsx)("div",{className:l,children:n}),e[8]=l,e[9]=n,e[10]=f):f=e[10],f};export{O as i,R as n,C as r,A as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var P1;import"./purify.es-Cg0r2qW-.js";import{u as m1}from"./src-COk1uIaa.js";import{c as et,g as st}from"./chunk-S3R3BYOJ-
|
|
1
|
+
var P1;import"./purify.es-Cg0r2qW-.js";import{u as m1}from"./src-COk1uIaa.js";import{c as et,g as st}from"./chunk-S3R3BYOJ-BwE-T8-d.js";import{n as k,r as Z}from"./src-DSbF9mby.js";import{$ as Yt,B as Ht,C as Xt,H as Mt,U as qt,_ as Qt,a as Zt,b as p1,s as Jt,u as te,v as ee,z as se}from"./chunk-ABZYJK2D-CSzcbtsR.js";import{t as ie}from"./channel-esN5troS.js";import{n as re,t as ue}from"./chunk-MI3HLSF2-vtv46ho2.js";import"./chunk-HN2XXSSU-CigyI152.js";import"./chunk-CVBHYZKI-DJ6aHNEG.js";import"./chunk-ATLVNIR6-BGYBu2zE.js";import"./dist-D-j2KFQ4.js";import"./chunk-JA3XYJ7Z-BJGCDHDS.js";import{o as ne}from"./chunk-JZLCHNYA-lm1LBIfJ.js";import"./chunk-QXUST7PY-tI3bGlcO.js";import{r as oe,t as ae}from"./chunk-N4CR4FBY-BQWUF0Ly.js";import{t as le}from"./chunk-FMBD7UC4-DiqdRLvx.js";import{t as ce}from"./chunk-55IACEB6-C_BE0X2F.js";import{t as he}from"./chunk-QN33PNHL-Buv0c3y8.js";var de="flowchart-",pe=(P1=class{constructor(){this.vertexCounter=0,this.config=p1(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Ht,this.setAccDescription=se,this.setDiagramTitle=qt,this.getAccTitle=ee,this.getAccDescription=Qt,this.getDiagramTitle=Xt,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return Jt.sanitizeText(i,this.config)}lookUpDomId(i){for(let r of this.vertices.values())if(r.id===i)return r.domId;return i}addVertex(i,r,u,o,n,g,p={},c){var z,f;if(!i||i.trim().length===0)return;let a;if(c!==void 0){let d;d=c.includes(`
|
|
2
2
|
`)?c+`
|
|
3
3
|
`:`{
|
|
4
4
|
`+c+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as s,u as C}from"./useEvent-D91BmmQi.js";import{b as d}from"./cells-
|
|
1
|
+
import{p as s,u as C}from"./useEvent-D91BmmQi.js";import{b as d}from"./cells-BA9ZN5Xy.js";import{t as m}from"./createReducer-1ePoj7v6.js";function p(){return{focusedCellId:null,lastFocusedCellId:null}}var{reducer:w,createActions:D,valueAtom:a,useActions:g}=m(p,{focusCell:(l,e)=>({...l,focusedCellId:e.cellId,lastFocusedCellId:e.cellId}),toggleCell:(l,e)=>l.focusedCellId===e.cellId?{...l,focusedCellId:null}:{...l,focusedCellId:e.cellId,lastFocusedCellId:e.cellId},blurCell:l=>({...l,focusedCellId:null})});const c=s(l=>l(a).lastFocusedCellId);function F(){return C(c)}const _=s(l=>{let e=l(c);return!e||e==="__scratch__"?null:r(e,l(d))});function h(l){return s(e=>r(l,e(d)))}function r(l,e){var o;let{cellData:i,cellHandles:f,cellRuntime:I}=e,u=i[l],t=I[l],n=(o=f[l])==null?void 0:o.current;return!u||!n?null:{cellId:l,name:u.name,config:u.config,status:t?t.status:"idle",getEditorView:()=>n.editorView,hasOutput:(t==null?void 0:t.output)!=null,hasConsoleOutput:(t==null?void 0:t.consoleOutputs)!=null}}export{g as a,c as i,h as n,F as o,_ as r,a as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as Ge}from"./chunk-LvLJmgfZ.js";import{t as yr}from"./react-Bj1aDYRI.js";import{Rt as wr,mr as Nr}from"./cells-8P3lr_U-.js";import{_ as ze,c as Cr,d as ke,f as Se,g as kr,h as _e,l as Sr,m as _r,o as Rr,p as le,s as Or,t as Re,u as Te,y as Oe}from"./zod-H_cgTO0M.js";import{t as he}from"./compiler-runtime-B3qBwwSJ.js";import{_ as Ar,d as Vr,o as Ae,v as Er}from"./useEventListener-BR0C1MaI.js";import{t as I}from"./cn-DCUzRj2J.js";import{t as Pr}from"./jsx-runtime-BqBOg78p.js";import{C as xe,S as Be,_ as Lr,b as Ve,v as Ee}from"./fullscreen-BDxedMYP.js";import{o as $r}from"./dist-BoOh2kN5.js";import{u as Ir}from"./menu-items-CwUpDHG7.js";import{i as Mr,r as Dr,t as Fr}from"./popover-UExmgBsf.js";import{c as qr,i as Je,l as Gr,m as zr,n as Tr,r as Br,s as Jr,t as Kr}from"./select-5i7URBEn.js";import{M as Ur,N as Zr,P as Ke,m as Hr}from"./dropdown-menu-D1A3cFC8.js";import{D as Wr}from"./JsonOutput-C9sdMiTb.js";import{t as Xr}from"./label-DTR8T0AE.js";import{t as Qr}from"./tooltip-Gcwqb_SK.js";import{r as Yr,t as Ue}from"./button-D9nb17Rw.js";import{t as Ze}from"./strings-md4mFbOQ.js";import{t as ea}from"./createLucideIcon-D5guW7EU.js";import{t as ra}from"./check-BH35Ndha.js";import{r as aa}from"./x-C-6liIBr.js";import{t as ta}from"./plus-BueqiM86.js";import{t as na}from"./refresh-ccw-BuMhEaS9.js";import{n as sa,t as Pe}from"./input-2egRGOhT.js";import{a as V,c as R,d as E,h as la,l as P,m as oa,o as A,r as He,u as S,y as ia}from"./textarea-BlamcRdb.js";import{t as ca}from"./trash-2-C5AzNaHr.js";import{t as da}from"./badge-IqsYSyWB.js";import{a as ua,o as ma,r as pa,s as fa,t as ha}from"./command-DQS2IzwJ.js";var w=Ge(yr(),1),a=Ge(Pr(),1),Le="Radio",[xa,We]=Be(Le),[ja,va]=xa(Le),Xe=w.forwardRef((t,e)=>{let{__scopeRadio:r,name:s,checked:l=!1,required:o,disabled:i,value:d="on",onCheck:p,form:n,...c}=t,[u,f]=w.useState(null),h=Ae(e,x=>f(x)),m=w.useRef(!1),j=u?n||!!u.closest("form"):!0;return(0,a.jsxs)(ja,{scope:r,checked:l,disabled:i,children:[(0,a.jsx)(xe.button,{type:"button",role:"radio","aria-checked":l,"data-state":rr(l),"data-disabled":i?"":void 0,disabled:i,value:d,...c,ref:h,onClick:Ve(t.onClick,x=>{l||(p==null||p()),j&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),j&&(0,a.jsx)(er,{control:u,bubbles:!m.current,name:s,value:d,checked:l,required:o,disabled:i,form:n,style:{transform:"translateX(-100%)"}})]})});Xe.displayName=Le;var Qe="RadioIndicator",Ye=w.forwardRef((t,e)=>{let{__scopeRadio:r,forceMount:s,...l}=t,o=va(Qe,r);return(0,a.jsx)(Lr,{present:s||o.checked,children:(0,a.jsx)(xe.span,{"data-state":rr(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:e})})});Ye.displayName=Qe;var ga="RadioBubbleInput",er=w.forwardRef(({__scopeRadio:t,control:e,checked:r,bubbles:s=!0,...l},o)=>{let i=w.useRef(null),d=Ae(i,o),p=zr(r),n=$r(e);return w.useEffect(()=>{let c=i.current;if(!c)return;let u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(p!==r&&f){let h=new Event("click",{bubbles:s});f.call(c,r),c.dispatchEvent(h)}},[p,r,s]),(0,a.jsx)(xe.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:d,style:{...l.style,...n,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});er.displayName=ga;function rr(t){return t?"checked":"unchecked"}var ba=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],je="RadioGroup",[ya,xt]=Be(je,[Ke,We]),ar=Ke(),tr=We(),[wa,Na]=ya(je),nr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,name:s,defaultValue:l,value:o,required:i=!1,disabled:d=!1,orientation:p,dir:n,loop:c=!0,onValueChange:u,...f}=t,h=ar(r),m=Ir(n),[j,x]=Ee({prop:o,defaultProp:l??null,onChange:u,caller:je});return(0,a.jsx)(wa,{scope:r,name:s,required:i,disabled:d,value:j,onValueChange:x,children:(0,a.jsx)(Zr,{asChild:!0,...h,orientation:p,dir:m,loop:c,children:(0,a.jsx)(xe.div,{role:"radiogroup","aria-required":i,"aria-orientation":p,"data-disabled":d?"":void 0,dir:m,...f,ref:e})})})});nr.displayName=je;var sr="RadioGroupItem",lr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,disabled:s,...l}=t,o=Na(sr,r),i=o.disabled||s,d=ar(r),p=tr(r),n=w.useRef(null),c=Ae(e,n),u=o.value===l.value,f=w.useRef(!1);return w.useEffect(()=>{let h=j=>{ba.includes(j.key)&&(f.current=!0)},m=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),(0,a.jsx)(Ur,{asChild:!0,...d,focusable:!i,active:u,children:(0,a.jsx)(Xe,{disabled:i,required:o.required,checked:u,...p,...l,name:o.name,ref:c,onCheck:()=>o.onValueChange(l.value),onKeyDown:Ve(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ve(l.onFocus,()=>{var h;f.current&&((h=n.current)==null||h.click())})})})});lr.displayName=sr;var Ca="RadioGroupIndicator",or=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,...s}=t;return(0,a.jsx)(Ye,{...tr(r),...s,ref:e})});or.displayName=Ca;var ir=nr,cr=lr,ka=or,Sa=ea("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),dr=he();const ur=(0,w.createContext)({isSelected:()=>!1,onSelect:Er.NOOP}),$e=t=>{let e=(0,dr.c)(94),r,s,l,o,i,d,p,n,c,u,f,h,m,j,x,g,v,y,N,C,O;e[0]===t?(r=e[1],s=e[2],l=e[3],o=e[4],i=e[5],d=e[6],p=e[7],n=e[8],c=e[9],u=e[10],f=e[11],h=e[12],m=e[13],j=e[14],x=e[15],g=e[16],v=e[17],y=e[18],N=e[19],C=e[20],O=e[21]):({children:r,displayValue:d,className:l,placeholder:m,value:O,defaultValue:i,onValueChange:f,multiple:g,shouldFilter:v,filterFn:p,open:h,defaultOpen:o,onOpenChange:c,inputPlaceholder:y,search:x,onSearchChange:u,emptyState:N,chips:C,chipsClassName:s,keepPopoverOpenOnSelect:n,...j}=t,e[0]=t,e[1]=r,e[2]=s,e[3]=l,e[4]=o,e[5]=i,e[6]=d,e[7]=p,e[8]=n,e[9]=c,e[10]=u,e[11]=f,e[12]=h,e[13]=m,e[14]=j,e[15]=x,e[16]=g,e[17]=v,e[18]=y,e[19]=N,e[20]=C,e[21]=O);let k=g===void 0?!1:g,M=v===void 0?!0:v,D=y===void 0?"Search...":y,se=N===void 0?"Nothing found.":N,$=C===void 0?!1:C,ye=o??!1,oe;e[22]!==c||e[23]!==h||e[24]!==ye?(oe={prop:h,defaultProp:ye,onChange:c},e[22]=c,e[23]=h,e[24]=ye,e[25]=oe):oe=e[25];let[Fe,G]=Ee(oe),z=Fe===void 0?!1:Fe,T;e[26]===f?T=e[27]:(T=_=>{f==null||f(_)},e[26]=f,e[27]=T);let ie;e[28]!==i||e[29]!==T||e[30]!==O?(ie={prop:O,defaultProp:i,onChange:T},e[28]=i,e[29]=T,e[30]=O,e[31]=ie):ie=e[31];let[b,we]=Ee(ie),ce;e[32]===b?ce=e[33]:(ce=_=>Array.isArray(b)?b.includes(_):b===_,e[32]=b,e[33]=ce);let Ne=ce,de;e[34]!==n||e[35]!==k||e[36]!==G||e[37]!==we||e[38]!==b?(de=_=>{let F=_;if(k)if(Array.isArray(b))if(b.includes(F)){let qe=b.filter(br=>br!==_);F=qe.length>0?qe:[]}else F=[...b,F];else F=[F];else b===_&&(F=null);we(F),(n??k)||G(!1)},e[34]=n,e[35]=k,e[36]=G,e[37]=we,e[38]=b,e[39]=de):de=e[39];let B=de,ue;e[40]!==$||e[41]!==d||e[42]!==k||e[43]!==m||e[44]!==b?(ue=()=>k&&$&&m?m:b==null?m??"--":Array.isArray(b)?b.length===0?m??"--":b.length===1&&d!==void 0?d(b[0]):`${b.length} selected`:d===void 0?m??"--":d(b),e[40]=$,e[41]=d,e[42]=k,e[43]=m,e[44]=b,e[45]=ue):ue=e[45];let Ce=ue,me;e[46]===Symbol.for("react.memo_cache_sentinel")?(me=I("relative"),e[46]=me):me=e[46];let J;e[47]===l?J=e[48]:(J=I("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50",l),e[47]=l,e[48]=J);let K;e[49]===Ce?K=e[50]:(K=Ce(),e[49]=Ce,e[50]=K);let U;e[51]===K?U=e[52]:(U=(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:K}),e[51]=K,e[52]=U);let pe;e[53]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,a.jsx)(aa,{className:"ml-3 w-4 h-4 opacity-50 shrink-0"}),e[53]=pe):pe=e[53];let Z;e[54]!==z||e[55]!==J||e[56]!==U?(Z=(0,a.jsx)(Mr,{asChild:!0,children:(0,a.jsxs)("div",{className:J,"aria-expanded":z,children:[U,pe]})}),e[54]=z,e[55]=J,e[56]=U,e[57]=Z):Z=e[57];let H;e[58]!==D||e[59]!==u||e[60]!==x?(H=(0,a.jsx)(ua,{placeholder:D,rootClassName:"px-1 h-8",autoFocus:!0,value:x,onValueChange:u}),e[58]=D,e[59]=u,e[60]=x,e[61]=H):H=e[61];let W;e[62]===se?W=e[63]:(W=(0,a.jsx)(pa,{children:se}),e[62]=se,e[63]=W);let X;e[64]!==B||e[65]!==Ne?(X={isSelected:Ne,onSelect:B},e[64]=B,e[65]=Ne,e[66]=X):X=e[66];let Q;e[67]!==r||e[68]!==X?(Q=(0,a.jsx)(ur,{value:X,children:r}),e[67]=r,e[68]=X,e[69]=Q):Q=e[69];let Y;e[70]!==W||e[71]!==Q?(Y=(0,a.jsxs)(fa,{className:"max-h-60 py-.5",children:[W,Q]}),e[70]=W,e[71]=Q,e[72]=Y):Y=e[72];let ee;e[73]!==p||e[74]!==M||e[75]!==H||e[76]!==Y?(ee=(0,a.jsx)(Dr,{className:"w-full min-w-(--radix-popover-trigger-width) p-0",align:"start",children:(0,a.jsxs)(ha,{filter:p,shouldFilter:M,children:[H,Y]})}),e[73]=p,e[74]=M,e[75]=H,e[76]=Y,e[77]=ee):ee=e[77];let re;e[78]!==z||e[79]!==G||e[80]!==Z||e[81]!==ee?(re=(0,a.jsxs)(Fr,{open:z,onOpenChange:G,children:[Z,ee]}),e[78]=z,e[79]=G,e[80]=Z,e[81]=ee,e[82]=re):re=e[82];let ae;e[83]!==$||e[84]!==s||e[85]!==d||e[86]!==B||e[87]!==k||e[88]!==b?(ae=k&&$&&(0,a.jsx)("div",{className:I("flex flex-col gap-1 items-start",s),children:Array.isArray(b)&&b.map(_=>_==null?null:(0,a.jsxs)(da,{variant:"secondary",children:[(d==null?void 0:d(_))??String(_),(0,a.jsx)(Nr,{onClick:()=>{B(_)},className:"w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer"})]},String(_)))}),e[83]=$,e[84]=s,e[85]=d,e[86]=B,e[87]=k,e[88]=b,e[89]=ae):ae=e[89];let fe;return e[90]!==j||e[91]!==re||e[92]!==ae?(fe=(0,a.jsxs)("div",{className:me,...j,children:[re,ae]}),e[90]=j,e[91]=re,e[92]=ae,e[93]=fe):fe=e[93],fe},ve=w.forwardRef((t,e)=>{let r=(0,dr.c)(17),{children:s,className:l,value:o,onSelect:i,disabled:d}=t,p=typeof o=="object"&&"value"in o?o.value:String(o),n=w.use(ur),c;r[0]===l?c=r[1]:(c=I("pl-6 m-1 py-1",l),r[0]=l,r[1]=c);let u;r[2]!==n||r[3]!==i||r[4]!==o?(u=()=>{n.onSelect(o),i==null||i(o)},r[2]=n,r[3]=i,r[4]=o,r[5]=u):u=r[5];let f;r[6]!==n||r[7]!==o?(f=n.isSelected(o)&&(0,a.jsx)(ra,{className:"absolute left-1 h-4 w-4"}),r[6]=n,r[7]=o,r[8]=f):f=r[8];let h;return r[9]!==s||r[10]!==d||r[11]!==e||r[12]!==c||r[13]!==u||r[14]!==f||r[15]!==p?(h=(0,a.jsxs)(ma,{ref:e,className:c,role:"option",value:p,disabled:d,onSelect:u,children:[f,s]}),r[9]=s,r[10]=d,r[11]=e,r[12]=c,r[13]=u,r[14]=f,r[15]=p,r[16]=h):h=r[16],h});ve.displayName="ComboboxItem";const q={of(t){return JSON.stringify(t)},parse(t){if(!t)return{};try{return JSON.parse(t)}catch{return{label:t}}}};function mr(){return Math.floor(Math.random()*1e5)}var pr=he(),Ie=w.forwardRef((t,e)=>{let r=(0,pr.c)(9),s,l;r[0]===t?(s=r[1],l=r[2]):({className:s,...l}=t,r[0]=t,r[1]=s,r[2]=l);let o;r[3]===s?o=r[4]:(o=I("grid gap-2",s),r[3]=s,r[4]=o);let i;return r[5]!==l||r[6]!==e||r[7]!==o?(i=(0,a.jsx)(ir,{className:o,...l,ref:e}),r[5]=l,r[6]=e,r[7]=o,r[8]=i):i=r[8],i});Ie.displayName=ir.displayName;var Me=w.forwardRef((t,e)=>{let r=(0,pr.c)(10),s,l;if(r[0]!==t){let{className:p,children:n,...c}=t;s=p,l=c,r[0]=t,r[1]=s,r[2]=l}else s=r[1],l=r[2];let o;r[3]===s?o=r[4]:(o=I("h-[16px] w-[16px] transition-shadow data-[state=unchecked]:shadow-xs-solid rounded-full border border-input text-primary ring-offset-background focus:outline-hidden focus:shadow-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:shadow-none",s),r[3]=s,r[4]=o);let i;r[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(ka,{className:"flex items-center justify-center",children:(0,a.jsx)(Hr,{className:"h-[10px] w-[10px] fill-primary text-current"})}),r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==e||r[8]!==o?(d=(0,a.jsx)(cr,{ref:e,className:o,...l,children:i}),r[6]=l,r[7]=e,r[8]=o,r[9]=d):d=r[9],d});Me.displayName=cr.displayName;function _a(t){return t instanceof Re.ZodArray}function fr(t){return t instanceof Re.ZodPipe}function Ra(t){return t instanceof Re.ZodTuple}function hr(t){return"unwrap"in t?t.unwrap():t}function ge(t){let e=r=>{if(r instanceof le){let s=[...r.values];return r.values.size===1?s[0]:s}if(r instanceof Te){let s=r.def.defaultValue;return typeof s=="function"?s():s}if(fr(r))return e(r.in);if(Ra(r))return r.def.items.map(s=>e(s));if("unwrap"in r)return e(hr(r))};return t instanceof Oe||t instanceof ke?e(t.options[0]):_a(t)?Oa(t)?[ge(t.element)]:[]:t instanceof ze?"":t instanceof Se?t.options[0]:t instanceof _e?Object.fromEntries(Object.entries(t.shape).map(([r,s])=>[r,e(s)])):e(t)}function te(t){if(t instanceof le)return t;if(t instanceof _e){let e=t.shape.type;if(e instanceof le)return e;throw Error("Invalid schema")}if(t instanceof Oe||t instanceof ke)return te(t.options[0]);throw Ar.warn(t),Error("Invalid schema")}function Oa(t){return!t.safeParse([]).success}var xr=he(),jr=`
|
|
1
|
+
import{s as Ge}from"./chunk-LvLJmgfZ.js";import{t as yr}from"./react-Bj1aDYRI.js";import{Rt as wr,mr as Nr}from"./cells-BA9ZN5Xy.js";import{_ as ze,c as Cr,d as ke,f as Se,g as kr,h as _e,l as Sr,m as _r,o as Rr,p as le,s as Or,t as Re,u as Te,y as Oe}from"./zod-H_cgTO0M.js";import{t as he}from"./compiler-runtime-B3qBwwSJ.js";import{_ as Ar,d as Vr,o as Ae,v as Er}from"./useEventListener-BR0C1MaI.js";import{t as I}from"./cn-DCUzRj2J.js";import{t as Pr}from"./jsx-runtime-BqBOg78p.js";import{C as xe,S as Be,_ as Lr,b as Ve,v as Ee}from"./fullscreen-BDxedMYP.js";import{o as $r}from"./dist-BoOh2kN5.js";import{u as Ir}from"./menu-items-CwUpDHG7.js";import{i as Mr,r as Dr,t as Fr}from"./popover-UExmgBsf.js";import{c as qr,i as Je,l as Gr,m as zr,n as Tr,r as Br,s as Jr,t as Kr}from"./select-5i7URBEn.js";import{M as Ur,N as Zr,P as Ke,m as Hr}from"./dropdown-menu-D1A3cFC8.js";import{D as Wr}from"./JsonOutput-Cib1YSyW.js";import{t as Xr}from"./label-DTR8T0AE.js";import{t as Qr}from"./tooltip-Gcwqb_SK.js";import{r as Yr,t as Ue}from"./button-D9nb17Rw.js";import{t as Ze}from"./strings-md4mFbOQ.js";import{t as ea}from"./createLucideIcon-D5guW7EU.js";import{t as ra}from"./check-BH35Ndha.js";import{r as aa}from"./x-C-6liIBr.js";import{t as ta}from"./plus-BueqiM86.js";import{t as na}from"./refresh-ccw-BuMhEaS9.js";import{n as sa,t as Pe}from"./input-2egRGOhT.js";import{a as V,c as R,d as E,h as la,l as P,m as oa,o as A,r as He,u as S,y as ia}from"./textarea-D2liylO5.js";import{t as ca}from"./trash-2-C5AzNaHr.js";import{t as da}from"./badge-IqsYSyWB.js";import{a as ua,o as ma,r as pa,s as fa,t as ha}from"./command-DQS2IzwJ.js";var w=Ge(yr(),1),a=Ge(Pr(),1),Le="Radio",[xa,We]=Be(Le),[ja,va]=xa(Le),Xe=w.forwardRef((t,e)=>{let{__scopeRadio:r,name:s,checked:l=!1,required:o,disabled:i,value:d="on",onCheck:p,form:n,...c}=t,[u,f]=w.useState(null),h=Ae(e,x=>f(x)),m=w.useRef(!1),j=u?n||!!u.closest("form"):!0;return(0,a.jsxs)(ja,{scope:r,checked:l,disabled:i,children:[(0,a.jsx)(xe.button,{type:"button",role:"radio","aria-checked":l,"data-state":rr(l),"data-disabled":i?"":void 0,disabled:i,value:d,...c,ref:h,onClick:Ve(t.onClick,x=>{l||(p==null||p()),j&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),j&&(0,a.jsx)(er,{control:u,bubbles:!m.current,name:s,value:d,checked:l,required:o,disabled:i,form:n,style:{transform:"translateX(-100%)"}})]})});Xe.displayName=Le;var Qe="RadioIndicator",Ye=w.forwardRef((t,e)=>{let{__scopeRadio:r,forceMount:s,...l}=t,o=va(Qe,r);return(0,a.jsx)(Lr,{present:s||o.checked,children:(0,a.jsx)(xe.span,{"data-state":rr(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:e})})});Ye.displayName=Qe;var ga="RadioBubbleInput",er=w.forwardRef(({__scopeRadio:t,control:e,checked:r,bubbles:s=!0,...l},o)=>{let i=w.useRef(null),d=Ae(i,o),p=zr(r),n=$r(e);return w.useEffect(()=>{let c=i.current;if(!c)return;let u=window.HTMLInputElement.prototype,f=Object.getOwnPropertyDescriptor(u,"checked").set;if(p!==r&&f){let h=new Event("click",{bubbles:s});f.call(c,r),c.dispatchEvent(h)}},[p,r,s]),(0,a.jsx)(xe.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:d,style:{...l.style,...n,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});er.displayName=ga;function rr(t){return t?"checked":"unchecked"}var ba=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],je="RadioGroup",[ya,xt]=Be(je,[Ke,We]),ar=Ke(),tr=We(),[wa,Na]=ya(je),nr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,name:s,defaultValue:l,value:o,required:i=!1,disabled:d=!1,orientation:p,dir:n,loop:c=!0,onValueChange:u,...f}=t,h=ar(r),m=Ir(n),[j,x]=Ee({prop:o,defaultProp:l??null,onChange:u,caller:je});return(0,a.jsx)(wa,{scope:r,name:s,required:i,disabled:d,value:j,onValueChange:x,children:(0,a.jsx)(Zr,{asChild:!0,...h,orientation:p,dir:m,loop:c,children:(0,a.jsx)(xe.div,{role:"radiogroup","aria-required":i,"aria-orientation":p,"data-disabled":d?"":void 0,dir:m,...f,ref:e})})})});nr.displayName=je;var sr="RadioGroupItem",lr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,disabled:s,...l}=t,o=Na(sr,r),i=o.disabled||s,d=ar(r),p=tr(r),n=w.useRef(null),c=Ae(e,n),u=o.value===l.value,f=w.useRef(!1);return w.useEffect(()=>{let h=j=>{ba.includes(j.key)&&(f.current=!0)},m=()=>f.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",m)}},[]),(0,a.jsx)(Ur,{asChild:!0,...d,focusable:!i,active:u,children:(0,a.jsx)(Xe,{disabled:i,required:o.required,checked:u,...p,...l,name:o.name,ref:c,onCheck:()=>o.onValueChange(l.value),onKeyDown:Ve(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:Ve(l.onFocus,()=>{var h;f.current&&((h=n.current)==null||h.click())})})})});lr.displayName=sr;var Ca="RadioGroupIndicator",or=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,...s}=t;return(0,a.jsx)(Ye,{...tr(r),...s,ref:e})});or.displayName=Ca;var ir=nr,cr=lr,ka=or,Sa=ea("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),dr=he();const ur=(0,w.createContext)({isSelected:()=>!1,onSelect:Er.NOOP}),$e=t=>{let e=(0,dr.c)(94),r,s,l,o,i,d,p,n,c,u,f,h,m,j,x,g,v,y,N,C,O;e[0]===t?(r=e[1],s=e[2],l=e[3],o=e[4],i=e[5],d=e[6],p=e[7],n=e[8],c=e[9],u=e[10],f=e[11],h=e[12],m=e[13],j=e[14],x=e[15],g=e[16],v=e[17],y=e[18],N=e[19],C=e[20],O=e[21]):({children:r,displayValue:d,className:l,placeholder:m,value:O,defaultValue:i,onValueChange:f,multiple:g,shouldFilter:v,filterFn:p,open:h,defaultOpen:o,onOpenChange:c,inputPlaceholder:y,search:x,onSearchChange:u,emptyState:N,chips:C,chipsClassName:s,keepPopoverOpenOnSelect:n,...j}=t,e[0]=t,e[1]=r,e[2]=s,e[3]=l,e[4]=o,e[5]=i,e[6]=d,e[7]=p,e[8]=n,e[9]=c,e[10]=u,e[11]=f,e[12]=h,e[13]=m,e[14]=j,e[15]=x,e[16]=g,e[17]=v,e[18]=y,e[19]=N,e[20]=C,e[21]=O);let k=g===void 0?!1:g,M=v===void 0?!0:v,D=y===void 0?"Search...":y,se=N===void 0?"Nothing found.":N,$=C===void 0?!1:C,ye=o??!1,oe;e[22]!==c||e[23]!==h||e[24]!==ye?(oe={prop:h,defaultProp:ye,onChange:c},e[22]=c,e[23]=h,e[24]=ye,e[25]=oe):oe=e[25];let[Fe,G]=Ee(oe),z=Fe===void 0?!1:Fe,T;e[26]===f?T=e[27]:(T=_=>{f==null||f(_)},e[26]=f,e[27]=T);let ie;e[28]!==i||e[29]!==T||e[30]!==O?(ie={prop:O,defaultProp:i,onChange:T},e[28]=i,e[29]=T,e[30]=O,e[31]=ie):ie=e[31];let[b,we]=Ee(ie),ce;e[32]===b?ce=e[33]:(ce=_=>Array.isArray(b)?b.includes(_):b===_,e[32]=b,e[33]=ce);let Ne=ce,de;e[34]!==n||e[35]!==k||e[36]!==G||e[37]!==we||e[38]!==b?(de=_=>{let F=_;if(k)if(Array.isArray(b))if(b.includes(F)){let qe=b.filter(br=>br!==_);F=qe.length>0?qe:[]}else F=[...b,F];else F=[F];else b===_&&(F=null);we(F),(n??k)||G(!1)},e[34]=n,e[35]=k,e[36]=G,e[37]=we,e[38]=b,e[39]=de):de=e[39];let B=de,ue;e[40]!==$||e[41]!==d||e[42]!==k||e[43]!==m||e[44]!==b?(ue=()=>k&&$&&m?m:b==null?m??"--":Array.isArray(b)?b.length===0?m??"--":b.length===1&&d!==void 0?d(b[0]):`${b.length} selected`:d===void 0?m??"--":d(b),e[40]=$,e[41]=d,e[42]=k,e[43]=m,e[44]=b,e[45]=ue):ue=e[45];let Ce=ue,me;e[46]===Symbol.for("react.memo_cache_sentinel")?(me=I("relative"),e[46]=me):me=e[46];let J;e[47]===l?J=e[48]:(J=I("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50",l),e[47]=l,e[48]=J);let K;e[49]===Ce?K=e[50]:(K=Ce(),e[49]=Ce,e[50]=K);let U;e[51]===K?U=e[52]:(U=(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:K}),e[51]=K,e[52]=U);let pe;e[53]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,a.jsx)(aa,{className:"ml-3 w-4 h-4 opacity-50 shrink-0"}),e[53]=pe):pe=e[53];let Z;e[54]!==z||e[55]!==J||e[56]!==U?(Z=(0,a.jsx)(Mr,{asChild:!0,children:(0,a.jsxs)("div",{className:J,"aria-expanded":z,children:[U,pe]})}),e[54]=z,e[55]=J,e[56]=U,e[57]=Z):Z=e[57];let H;e[58]!==D||e[59]!==u||e[60]!==x?(H=(0,a.jsx)(ua,{placeholder:D,rootClassName:"px-1 h-8",autoFocus:!0,value:x,onValueChange:u}),e[58]=D,e[59]=u,e[60]=x,e[61]=H):H=e[61];let W;e[62]===se?W=e[63]:(W=(0,a.jsx)(pa,{children:se}),e[62]=se,e[63]=W);let X;e[64]!==B||e[65]!==Ne?(X={isSelected:Ne,onSelect:B},e[64]=B,e[65]=Ne,e[66]=X):X=e[66];let Q;e[67]!==r||e[68]!==X?(Q=(0,a.jsx)(ur,{value:X,children:r}),e[67]=r,e[68]=X,e[69]=Q):Q=e[69];let Y;e[70]!==W||e[71]!==Q?(Y=(0,a.jsxs)(fa,{className:"max-h-60 py-.5",children:[W,Q]}),e[70]=W,e[71]=Q,e[72]=Y):Y=e[72];let ee;e[73]!==p||e[74]!==M||e[75]!==H||e[76]!==Y?(ee=(0,a.jsx)(Dr,{className:"w-full min-w-(--radix-popover-trigger-width) p-0",align:"start",children:(0,a.jsxs)(ha,{filter:p,shouldFilter:M,children:[H,Y]})}),e[73]=p,e[74]=M,e[75]=H,e[76]=Y,e[77]=ee):ee=e[77];let re;e[78]!==z||e[79]!==G||e[80]!==Z||e[81]!==ee?(re=(0,a.jsxs)(Fr,{open:z,onOpenChange:G,children:[Z,ee]}),e[78]=z,e[79]=G,e[80]=Z,e[81]=ee,e[82]=re):re=e[82];let ae;e[83]!==$||e[84]!==s||e[85]!==d||e[86]!==B||e[87]!==k||e[88]!==b?(ae=k&&$&&(0,a.jsx)("div",{className:I("flex flex-col gap-1 items-start",s),children:Array.isArray(b)&&b.map(_=>_==null?null:(0,a.jsxs)(da,{variant:"secondary",children:[(d==null?void 0:d(_))??String(_),(0,a.jsx)(Nr,{onClick:()=>{B(_)},className:"w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer"})]},String(_)))}),e[83]=$,e[84]=s,e[85]=d,e[86]=B,e[87]=k,e[88]=b,e[89]=ae):ae=e[89];let fe;return e[90]!==j||e[91]!==re||e[92]!==ae?(fe=(0,a.jsxs)("div",{className:me,...j,children:[re,ae]}),e[90]=j,e[91]=re,e[92]=ae,e[93]=fe):fe=e[93],fe},ve=w.forwardRef((t,e)=>{let r=(0,dr.c)(17),{children:s,className:l,value:o,onSelect:i,disabled:d}=t,p=typeof o=="object"&&"value"in o?o.value:String(o),n=w.use(ur),c;r[0]===l?c=r[1]:(c=I("pl-6 m-1 py-1",l),r[0]=l,r[1]=c);let u;r[2]!==n||r[3]!==i||r[4]!==o?(u=()=>{n.onSelect(o),i==null||i(o)},r[2]=n,r[3]=i,r[4]=o,r[5]=u):u=r[5];let f;r[6]!==n||r[7]!==o?(f=n.isSelected(o)&&(0,a.jsx)(ra,{className:"absolute left-1 h-4 w-4"}),r[6]=n,r[7]=o,r[8]=f):f=r[8];let h;return r[9]!==s||r[10]!==d||r[11]!==e||r[12]!==c||r[13]!==u||r[14]!==f||r[15]!==p?(h=(0,a.jsxs)(ma,{ref:e,className:c,role:"option",value:p,disabled:d,onSelect:u,children:[f,s]}),r[9]=s,r[10]=d,r[11]=e,r[12]=c,r[13]=u,r[14]=f,r[15]=p,r[16]=h):h=r[16],h});ve.displayName="ComboboxItem";const q={of(t){return JSON.stringify(t)},parse(t){if(!t)return{};try{return JSON.parse(t)}catch{return{label:t}}}};function mr(){return Math.floor(Math.random()*1e5)}var pr=he(),Ie=w.forwardRef((t,e)=>{let r=(0,pr.c)(9),s,l;r[0]===t?(s=r[1],l=r[2]):({className:s,...l}=t,r[0]=t,r[1]=s,r[2]=l);let o;r[3]===s?o=r[4]:(o=I("grid gap-2",s),r[3]=s,r[4]=o);let i;return r[5]!==l||r[6]!==e||r[7]!==o?(i=(0,a.jsx)(ir,{className:o,...l,ref:e}),r[5]=l,r[6]=e,r[7]=o,r[8]=i):i=r[8],i});Ie.displayName=ir.displayName;var Me=w.forwardRef((t,e)=>{let r=(0,pr.c)(10),s,l;if(r[0]!==t){let{className:p,children:n,...c}=t;s=p,l=c,r[0]=t,r[1]=s,r[2]=l}else s=r[1],l=r[2];let o;r[3]===s?o=r[4]:(o=I("h-[16px] w-[16px] transition-shadow data-[state=unchecked]:shadow-xs-solid rounded-full border border-input text-primary ring-offset-background focus:outline-hidden focus:shadow-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:shadow-none",s),r[3]=s,r[4]=o);let i;r[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(ka,{className:"flex items-center justify-center",children:(0,a.jsx)(Hr,{className:"h-[10px] w-[10px] fill-primary text-current"})}),r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==e||r[8]!==o?(d=(0,a.jsx)(cr,{ref:e,className:o,...l,children:i}),r[6]=l,r[7]=e,r[8]=o,r[9]=d):d=r[9],d});Me.displayName=cr.displayName;function _a(t){return t instanceof Re.ZodArray}function fr(t){return t instanceof Re.ZodPipe}function Ra(t){return t instanceof Re.ZodTuple}function hr(t){return"unwrap"in t?t.unwrap():t}function ge(t){let e=r=>{if(r instanceof le){let s=[...r.values];return r.values.size===1?s[0]:s}if(r instanceof Te){let s=r.def.defaultValue;return typeof s=="function"?s():s}if(fr(r))return e(r.in);if(Ra(r))return r.def.items.map(s=>e(s));if("unwrap"in r)return e(hr(r))};return t instanceof Oe||t instanceof ke?e(t.options[0]):_a(t)?Oa(t)?[ge(t.element)]:[]:t instanceof ze?"":t instanceof Se?t.options[0]:t instanceof _e?Object.fromEntries(Object.entries(t.shape).map(([r,s])=>[r,e(s)])):e(t)}function te(t){if(t instanceof le)return t;if(t instanceof _e){let e=t.shape.type;if(e instanceof le)return e;throw Error("Invalid schema")}if(t instanceof Oe||t instanceof ke)return te(t.options[0]);throw Ar.warn(t),Error("Invalid schema")}function Oa(t){return!t.safeParse([]).success}var xr=he(),jr=`
|
|
2
2
|
`;const vr=t=>{let e=(0,xr.c)(24),{value:r,options:s,onChange:l,className:o,placeholder:i,textAreaClassName:d,comboBoxClassName:p}=t,[n,c]=(0,w.useState)(!1),u;e[0]===r?u=e[1]:(u=be(r),e[0]=r,e[1]=u);let f=u,h;e[2]!==p||e[3]!==l||e[4]!==s||e[5]!==i||e[6]!==n||e[7]!==d||e[8]!==f?(h=()=>n?(0,a.jsx)(De,{value:f,className:d,onChange:l,placeholder:i?`${i}: one per line`:"One value per line"}):(0,a.jsx)($e,{placeholder:i,displayValue:Aa,className:I("w-full max-w-[400px]",p),multiple:!0,value:f,onValueChange:l,keepPopoverOpenOnSelect:!0,chips:!0,chipsClassName:"flex-row flex-wrap min-w-[210px]",children:s.map(Va)}),e[2]=p,e[3]=l,e[4]=s,e[5]=i,e[6]=n,e[7]=d,e[8]=f,e[9]=h):h=e[9];let m=h,j;e[10]===o?j=e[11]:(j=I("flex gap-1",o),e[10]=o,e[11]=j);let x;e[12]===m?x=e[13]:(x=m(),e[12]=m,e[13]=x);let g=n?"Switch to multi-select":"Switch to textarea",v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(ia,{className:"w-3 h-3"}),e[14]=v):v=e[14];let y;e[15]===n?y=e[16]:(y=(0,a.jsx)(Wr,{size:"xs",onPressedChange:c,pressed:n,children:v}),e[15]=n,e[16]=y);let N;e[17]!==g||e[18]!==y?(N=(0,a.jsx)(Qr,{content:g,children:y}),e[17]=g,e[18]=y,e[19]=N):N=e[19];let C;return e[20]!==j||e[21]!==x||e[22]!==N?(C=(0,a.jsxs)("div",{className:j,children:[x,N]}),e[20]=j,e[21]=x,e[22]=N,e[23]=C):C=e[23],C},De=t=>{let e=(0,xr.c)(11),{className:r,value:s,onChange:l,placeholder:o}=t,i,d;if(e[0]!==s){let u=be(s);i=He,d=u.join(jr),e[0]=s,e[1]=i,e[2]=d}else i=e[1],d=e[2];let p;e[3]===l?p=e[4]:(p=u=>{if(u.target.value===""){l([]);return}l(u.target.value.split(jr))},e[3]=l,e[4]=p);let n=o?`${o}: one per line`:"One value per line",c;return e[5]!==i||e[6]!==r||e[7]!==d||e[8]!==p||e[9]!==n?(c=(0,a.jsx)(i,{value:d,className:r,rows:4,onChange:p,placeholder:n}),e[5]=i,e[6]=r,e[7]=d,e[8]=p,e[9]=n,e[10]=c):c=e[10],c};function be(t){return t==null?[]:Array.isArray(t)?t:[t].filter(e=>e!=null||e!=="")}function Aa(t){return t}function Va(t){return(0,a.jsx)(ve,{value:t,children:t},t)}var ne=he();const Ea=t=>{let e=(0,ne.c)(11),{schema:r,form:s,path:l,renderers:o,children:i}=t,d=l===void 0?"":l,p;e[0]===o?p=e[1]:(p=o===void 0?[]:o,e[0]=o,e[1]=p);let n=p,c;e[2]!==s||e[3]!==d||e[4]!==n||e[5]!==r?(c=L(r,s,d,n),e[2]=s,e[3]=d,e[4]=n,e[5]=r,e[6]=c):c=e[6];let u;return e[7]!==i||e[8]!==s||e[9]!==c?(u=(0,a.jsxs)(oa,{...s,children:[i,c]}),e[7]=i,e[8]=s,e[9]=c,e[10]=u):u=e[10],u};function L(t,e,r,s){for(let n of s){let{isMatch:c,Component:u}=n;if(c(t))return(0,a.jsx)(u,{schema:t,form:e,path:r})}let{label:l,description:o,special:i,direction:d="column",minLength:p}=q.parse(t.description||"");if(t instanceof Te){let n=t.unwrap();return n=!n.description&&t.description?n.describe(t.description):n,L(n,e,r,s)}if(t instanceof kr){let n=t.unwrap();return n=!n.description&&t.description?n.describe(t.description):n,L(n,e,r,s)}if(t instanceof _e)return(0,a.jsxs)("div",{className:I("flex",d==="row"?"flex-row gap-6 items-start":d==="two-columns"?"grid grid-cols-2 gap-y-6":"flex-col gap-6"),children:[(0,a.jsx)(S,{children:l}),Vr.entries(t.shape).map(([n,c])=>{let u=c instanceof le,f=L(c,e,Ma(r,n),s);return u?(0,a.jsx)(w.Fragment,{children:f},n):(0,a.jsx)("div",{className:"flex flex-row align-start",children:f},n)})]});if(t instanceof ze)return i==="time"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Pe,{...n,onValueChange:n.onChange,type:"time",className:"my-0"})}),(0,a.jsx)(E,{})]})}):(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Cr)return(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>(0,a.jsxs)(P,{children:[(0,a.jsxs)("div",{className:"flex flex-row items-start space-x-2",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(wr,{"data-testid":"marimo-plugin-data-frames-boolean-checkbox",checked:n.value,onCheckedChange:n.onChange})})]}),(0,a.jsx)(E,{})]})});if(t instanceof _r)return i==="random_number_button"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>(0,a.jsxs)(Ue,{size:"xs","data-testid":"marimo-plugin-data-frames-random-number-button",variant:"secondary",onClick:()=>{n.onChange(mr())},children:[(0,a.jsx)(na,{className:"w-3.5 h-3.5 mr-1"}),l]})}):(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(sa,{...n,className:"my-0",onValueChange:n.onChange})}),(0,a.jsx)(E,{})]})});if(t instanceof Sr){let n=i==="datetime"?"datetime-local":i==="time"?"time":"date";return(0,a.jsx)(R,{control:e.control,name:r,render:({field:c})=>(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(V,{children:(0,a.jsx)(Pe,{...c,onValueChange:c.onChange,type:n,className:"my-0"})}),(0,a.jsx)(E,{})]})})}if(t instanceof Rr)return(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Se)return(0,a.jsx)($a,{schema:t,form:e,path:r,options:t.options.map(n=>n.toString())});if(t instanceof Or){if(i==="text_area_multiline")return(0,a.jsx)(La,{schema:t,form:e,path:r});let n=t.element;return n instanceof Se?(0,a.jsx)(Ia,{schema:t,form:e,path:r,itemLabel:l,options:n.options.map(c=>c.toString())}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(Xr,{children:l}),(0,a.jsx)(Pa,{schema:t.element,form:e,path:r,minLength:p,renderers:s},r)]})}if(t instanceof ke){let n=t.def,c=n.options,u=n.discriminator,f=h=>c.find(m=>te(m).value===h);return(0,a.jsx)(R,{control:e.control,name:r,render:({field:h})=>{let m=h.value,j=c.map(v=>te(v).value),x=m&&typeof m=="object"&&u in m?m[u]:j[0],g=f(x);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)("div",{className:"flex border-b mb-4 -mt-2",children:j.map(v=>(0,a.jsx)("button",{type:"button",className:`px-4 py-2 ${x===v?"border-b-2 border-primary font-medium":"text-muted-foreground"}`,onClick:()=>{let y=f(v);y?h.onChange(ge(y)):h.onChange({[u]:v})},children:v},v))}),(0,a.jsx)("div",{className:"flex flex-col",children:g&&L(g,e,r,s)},x)]})}})}return t instanceof Oe?(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>{let c=t.options,u=n.value,f=c.map(m=>te(m).value);u||(u=f[0]);let h=c.find(m=>te(m).value===u);return(0,a.jsxs)("div",{className:"flex flex-col mb-4 gap-1",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(Gr,{"data-testid":"marimo-plugin-data-frames-union-select",...n,children:f.map(m=>(0,a.jsx)("option",{value:m,children:m},m))}),h&&L(h,e,r,s)]})}}):t instanceof le?(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>(0,a.jsx)("input",{...n,type:"hidden",value:String([...t.values][0]??"")})}):"unwrap"in t?L(hr(t),e,r,s):fr(t)?L(t.in,e,r,s):(0,a.jsxs)("div",{children:["Unknown schema type"," ",t==null?r:JSON.stringify(t.type??t)]})}var Pa=t=>{let e=(0,ne.c)(39),{schema:r,form:s,path:l,minLength:o,renderers:i}=t,d;e[0]===r.description?d=e[1]:(d=q.parse(r.description||""),e[0]=r.description,e[1]=d);let{label:p,description:n}=d,c=s.control,u;e[2]!==c||e[3]!==l?(u={control:c,name:l},e[2]=c,e[3]=l,e[4]=u):u=e[4];let{fields:f,append:h,remove:m}=la(u),j=o!=null&&f.length<o,x=o==null||f.length>o,g;e[5]===p?g=e[6]:(g=(0,a.jsx)(S,{children:p}),e[5]=p,e[6]=g);let v;e[7]===n?v=e[8]:(v=(0,a.jsx)(A,{children:n}),e[7]=n,e[8]=v);let y;if(e[9]!==x||e[10]!==f||e[11]!==s||e[12]!==l||e[13]!==m||e[14]!==i||e[15]!==r){let D;e[17]!==x||e[18]!==s||e[19]!==l||e[20]!==m||e[21]!==i||e[22]!==r?(D=(se,$)=>(0,a.jsxs)("div",{className:"flex flex-row pl-2 ml-2 border-l-2 border-disabled hover-actions-parent relative pr-5 pt-1 items-center w-fit",onKeyDown:Yr.onEnter(Da),children:[L(r,s,`${l}[${$}]`,i),x&&(0,a.jsx)(ca,{className:"w-4 h-4 ml-2 my-1 text-muted-foreground hover:text-destructive cursor-pointer absolute right-0 top-5",onClick:()=>{m($)}})]},se.id),e[17]=x,e[18]=s,e[19]=l,e[20]=m,e[21]=i,e[22]=r,e[23]=D):D=e[23],y=f.map(D),e[9]=x,e[10]=f,e[11]=s,e[12]=l,e[13]=m,e[14]=i,e[15]=r,e[16]=y}else y=e[16];let N;e[24]!==j||e[25]!==o?(N=j&&(0,a.jsx)("div",{className:"text-destructive text-xs font-semibold",children:(0,a.jsxs)("div",{children:["At least ",o," required."]})}),e[24]=j,e[25]=o,e[26]=N):N=e[26];let C;e[27]!==h||e[28]!==r?(C=()=>{h(ge(r))},e[27]=h,e[28]=r,e[29]=C):C=e[29];let O;e[30]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(ta,{className:"w-3.5 h-3.5 mr-1"}),e[30]=O):O=e[30];let k;e[31]===C?k=e[32]:(k=(0,a.jsx)("div",{children:(0,a.jsxs)(Ue,{size:"xs","data-testid":"marimo-plugin-data-frames-add-array-item",variant:"text",className:"hover:text-accent-foreground",onClick:C,children:[O,"Add"]})}),e[31]=C,e[32]=k);let M;return e[33]!==g||e[34]!==v||e[35]!==y||e[36]!==N||e[37]!==k?(M=(0,a.jsxs)("div",{className:"flex flex-col gap-2 min-w-[220px]",children:[g,v,y,N,k]}),e[33]=g,e[34]=v,e[35]=y,e[36]=N,e[37]=k,e[38]=M):M=e[38],M},gr=t=>{let e=(0,ne.c)(21),{schema:r,form:s,path:l}=t,o;e[0]===r.description?o=e[1]:(o=q.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p,disabled:n,inputType:c}=o;if(c==="textarea"){let h;e[2]!==d||e[3]!==n||e[4]!==i||e[5]!==p?(h=j=>{let{field:x}=j;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(He,{...x,value:x.value,onChange:x.onChange,className:"my-0",placeholder:p,disabled:n})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=n,e[4]=i,e[5]=p,e[6]=h):h=e[6];let m;return e[7]!==s.control||e[8]!==l||e[9]!==h?(m=(0,a.jsx)(R,{control:s.control,name:l,render:h}),e[7]=s.control,e[8]=l,e[9]=h,e[10]=m):m=e[10],m}let u;e[11]!==d||e[12]!==n||e[13]!==c||e[14]!==i||e[15]!==p?(u=h=>{let{field:m}=h;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(Pe,{...m,type:c,value:m.value,onValueChange:m.onChange,className:"my-0",placeholder:p,disabled:n})}),(0,a.jsx)(E,{})]})},e[11]=d,e[12]=n,e[13]=c,e[14]=i,e[15]=p,e[16]=u):u=e[16];let f;return e[17]!==s.control||e[18]!==l||e[19]!==u?(f=(0,a.jsx)(R,{control:s.control,name:l,render:u}),e[17]=s.control,e[18]=l,e[19]=u,e[20]=f):f=e[20],f},La=t=>{let e=(0,ne.c)(10),{schema:r,form:s,path:l}=t,o;e[0]===r.description?o=e[1]:(o=q.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p}=o,n;e[2]!==d||e[3]!==i||e[4]!==p?(n=u=>{let{field:f}=u;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(V,{children:(0,a.jsx)(De,{...f,placeholder:p})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=i,e[4]=p,e[5]=n):n=e[5];let c;return e[6]!==s.control||e[7]!==l||e[8]!==n?(c=(0,a.jsx)(R,{control:s.control,name:l,render:n}),e[6]=s.control,e[7]=l,e[8]=n,e[9]=c):c=e[9],c},$a=t=>{let e=(0,ne.c)(22),{schema:r,form:s,path:l,options:o,textTransform:i}=t,d;e[0]===r.description?d=e[1]:(d=q.parse(r.description),e[0]=r.description,e[1]=d);let{label:p,description:n,disabled:c,special:u}=d;if(u==="radio_group"){let m;e[2]!==n||e[3]!==p||e[4]!==o||e[5]!==l?(m=x=>{let{field:g}=x;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{children:p}),(0,a.jsx)(A,{children:n}),(0,a.jsx)(V,{children:(0,a.jsx)(Ie,{className:"flex flex-row gap-2 pt-1 items-center",value:g.value,onValueChange:g.onChange,children:o.map(v=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(Me,{value:v,id:`${l}-${v}`},v),(0,a.jsx)(S,{className:"whitespace-pre",htmlFor:`${l}-${v}`,children:Ze.startCase(v)})]},v))})}),(0,a.jsx)(E,{})]})},e[2]=n,e[3]=p,e[4]=o,e[5]=l,e[6]=m):m=e[6];let j;return e[7]!==c||e[8]!==s.control||e[9]!==l||e[10]!==m?(j=(0,a.jsx)(R,{control:s.control,name:l,disabled:c,render:m}),e[7]=c,e[8]=s.control,e[9]=l,e[10]=m,e[11]=j):j=e[11],j}let f;e[12]!==n||e[13]!==p||e[14]!==o||e[15]!==i?(f=m=>{let{field:j}=m;return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:p}),(0,a.jsx)(A,{children:n}),(0,a.jsx)(V,{children:(0,a.jsxs)(Kr,{"data-testid":"marimo-plugin-data-frames-select",value:j.value,onValueChange:j.onChange,children:[(0,a.jsx)(Jr,{className:"min-w-[180px]",children:(0,a.jsx)(qr,{placeholder:"--"})}),(0,a.jsx)(Tr,{children:(0,a.jsxs)(Br,{children:[o.map(x=>(0,a.jsx)(Je,{value:x,children:(i==null?void 0:i(x))??x},x)),o.length===0&&(0,a.jsx)(Je,{disabled:!0,value:"--",children:"No options"})]})})]})}),(0,a.jsx)(E,{})]})},e[12]=n,e[13]=p,e[14]=o,e[15]=i,e[16]=f):f=e[16];let h;return e[17]!==c||e[18]!==s.control||e[19]!==l||e[20]!==f?(h=(0,a.jsx)(R,{control:s.control,name:l,disabled:c,render:f}),e[17]=c,e[18]=s.control,e[19]=l,e[20]=f,e[21]=h):h=e[21],h},Ia=t=>{let e=(0,ne.c)(15),{schema:r,form:s,path:l,options:o,itemLabel:i,showSwitchable:d}=t,p;e[0]===r.description?p=e[1]:(p=q.parse(r.description),e[0]=r.description,e[1]=p);let{label:n,description:c,placeholder:u}=p,f;e[2]!==i||e[3]!==u?(f=u??(i?`Select ${i==null?void 0:i.toLowerCase()}`:void 0),e[2]=i,e[3]=u,e[4]=f):f=e[4];let h=f,m;e[5]!==c||e[6]!==n||e[7]!==o||e[8]!==h||e[9]!==d?(m=x=>{let{field:g}=x,v=be(g.value);return(0,a.jsxs)(P,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:n}),(0,a.jsx)(A,{children:c}),(0,a.jsx)(V,{children:d?(0,a.jsx)(vr,{...g,value:v,options:o,placeholder:h}):(0,a.jsx)($e,{className:"min-w-[180px]",placeholder:h,displayValue:Fa,multiple:!0,chips:!0,keepPopoverOpenOnSelect:!0,value:v,onValueChange:g.onChange,children:o.map(qa)})}),(0,a.jsx)(E,{})]})},e[5]=c,e[6]=n,e[7]=o,e[8]=h,e[9]=d,e[10]=m):m=e[10];let j;return e[11]!==s.control||e[12]!==l||e[13]!==m?(j=(0,a.jsx)(R,{control:s.control,name:l,render:m}),e[11]=s.control,e[12]=l,e[13]=m,e[14]=j):j=e[14],j};function Ma(...t){return t.filter(e=>e!=="").join(".")}function Da(t){return t.preventDefault()}function Fa(t){return Ze.startCase(t)}function qa(t){return(0,a.jsx)(ve,{value:t,children:t},t)}export{be as a,Ie as c,mr as d,$e as f,De as i,Me as l,Sa as m,L as n,ge as o,ve as p,vr as r,te as s,Ea as t,q as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as o}from"./forth-DGce5eRS.js";export{o as forth};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as r}from"./fortran-CS97oQQW.js";export{r as fortran};
|