@marimo-team/frontend 0.23.12-dev8 → 0.23.12-dev9
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-6opTJjMX.js → CellStatus-BGSEw-sx.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-i1kaFF7n.js → ConnectedDataExplorerComponent-swQQzg5v.js} +1 -1
- package/dist/assets/{DeferredRequestRegistry-RuL7NV1n.js → DeferredRequestRegistry-EP9ZArpv.js} +1 -1
- package/dist/assets/{ImperativeModal-B62Q6S9l.js → ImperativeModal-MQnbMIO2.js} +1 -1
- package/dist/assets/{JsonOutput-CWVuEz6C.js → JsonOutput-CxKHBYIA.js} +3 -3
- package/dist/assets/{LazyAnyLanguageCodeMirror-CsAMDSIw.js → LazyAnyLanguageCodeMirror-CUQODgGJ.js} +2 -2
- package/dist/assets/{MarimoErrorOutput-dYrcxVwq.js → MarimoErrorOutput-G8Q8ZYoi.js} +1 -1
- package/dist/assets/{RSPContexts-VzcTZjG1.js → RSPContexts-CXueMbRb.js} +1 -1
- package/dist/assets/{RenderHTML-ohul2q99.js → RenderHTML-DXJCvdz4.js} +1 -1
- package/dist/assets/{RunButton-BMpP08P_.js → RunButton-B0ruC_FE.js} +1 -1
- package/dist/assets/{add-cell-with-ai-5tJjrFh0.js → add-cell-with-ai-DWNUMbns.js} +1 -1
- package/dist/assets/{add-connection-dialog-pVExi7gB.js → add-connection-dialog-CZ2UuO8f.js} +3 -3
- package/dist/assets/{agent-panel-By97CFFK.js → agent-panel-B-_gvxz2.js} +1 -1
- package/dist/assets/{ai-model-dropdown-Dvmxl0HU.js → ai-model-dropdown-BW60s6ul.js} +1 -1
- package/dist/assets/{any-language-editor-F2HBwXr3.js → any-language-editor-ChWsxHdv.js} +1 -1
- package/dist/assets/{app-config-button-BB5z7_FE.js → app-config-button-DJaefZBz.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-DkQVwQl-.js → architectureDiagram-VXUJARFQ-BTCyBm7a.js} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-CACq6Mqn.js → blockDiagram-VD42YOAC-mvbUAzY4.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-COoIP9fI.js → c4Diagram-YG6GDRKO-qKF4yNR5.js} +1 -1
- package/dist/assets/{cache-panel-BlIrcwlT.js → cache-panel-Ds3GhmDF.js} +1 -1
- package/dist/assets/{cell-editor-DQKaGrC9.js → cell-editor-CvLW6KK3.js} +1 -1
- package/dist/assets/{cell-link-DBKqdVgo.js → cell-link-BWqpbaiv.js} +1 -1
- package/dist/assets/{cells-DiASVTIh.js → cells-BidbgSuB.js} +3 -3
- package/dist/assets/channel-Bvgym58O.js +1 -0
- package/dist/assets/{chat-display-D8X6vz7W.js → chat-display-BRCFntOw.js} +1 -1
- package/dist/assets/{chat-panel-B9l3ukjX.js → chat-panel-BGCbxSQx.js} +1 -1
- package/dist/assets/{chat-ui-BwH7dd6n.js → chat-ui-CceYGzB9.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-Cr4aqhf3.js → chunk-55IACEB6-BZgGh8Op.js} +1 -1
- package/dist/assets/{chunk-5FQGJX7Z-DTLanAkx.js → chunk-5FQGJX7Z-C6VN0dQj.js} +3 -3
- package/dist/assets/{chunk-ABZYJK2D-BWwBJaW4.js → chunk-ABZYJK2D-DntHwfwl.js} +1 -1
- package/dist/assets/{chunk-ATLVNIR6-ZywQjHDL.js → chunk-ATLVNIR6-CZy1WXhH.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-Q6rM60b0.js → chunk-B4BG7PRW-CifnFMMD.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-DkUFRB44.js → chunk-DI55MBZ5-BKMnvFi2.js} +1 -1
- package/dist/assets/{chunk-EXTU4WIE-A9IRvoap.js → chunk-EXTU4WIE-CYseDwky.js} +1 -1
- package/dist/assets/{chunk-JA3XYJ7Z-BC57JRLK.js → chunk-JA3XYJ7Z-Bj396ovX.js} +1 -1
- package/dist/assets/{chunk-JZLCHNYA-CmPEo2OR.js → chunk-JZLCHNYA-QttzWzFq.js} +1 -1
- package/dist/assets/{chunk-N4CR4FBY-qcFzulsJ.js → chunk-N4CR4FBY-DgrFkHXi.js} +2 -2
- package/dist/assets/{chunk-QN33PNHL-CfKFSQ8y.js → chunk-QN33PNHL-shgGaZ1X.js} +1 -1
- package/dist/assets/{chunk-QXUST7PY-DiH4MyLq.js → chunk-QXUST7PY-EJQ74OiC.js} +1 -1
- package/dist/assets/{chunk-S3R3BYOJ-C7n0Esov.js → chunk-S3R3BYOJ-DHLCcICg.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-Yl1gB5ep.js → chunk-TZMSLE5B-BgJLE0Za.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-DrqS8d9F.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-DchP-T46.js +1 -0
- package/dist/assets/{code-block-37QAKDTI-BJ9X4ytb.js → code-block-37QAKDTI--cy-8SOv.js} +1 -1
- package/dist/assets/{column-preview-B3CdpsbL.js → column-preview-BbgM2h8n.js} +1 -1
- package/dist/assets/{command-DRHbYHUP.js → command-CsbsBLBw.js} +1 -1
- package/dist/assets/{command-palette-D2BHtSuk.js → command-palette-Mqu8KKo1.js} +1 -1
- package/dist/assets/{common-CvUUt55g.js → common-B94MReIe.js} +1 -1
- package/dist/assets/{components-CimBDpZ8.js → components-DoRr7Hf1.js} +1 -1
- package/dist/assets/{config-3clPIEB9.js → config-BE150fVL.js} +1 -1
- package/dist/assets/{context-C2Ie4tn_.js → context-DE_5rdOV.js} +1 -1
- package/dist/assets/{copy-icon-EHMT-qlr.js → copy-icon-BCIGtBo0.js} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-CQqSLzd1.js → cose-bilkent-S5V4N54A-DhxFsKpJ.js} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-C8k8cWk0.js → dagre-6UL2VRFP-B6hk_Bns.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-BrFXEIvf.js → data-grid-overlay-editor-CTUPMnar.js} +1 -1
- package/dist/assets/{datasource-Da-qoi34.js → datasource-DI-YUWev.js} +1 -1
- package/dist/assets/{dates-D8uxHHPL.js → dates-CnrjjcMO.js} +1 -1
- package/dist/assets/{dependency-graph-panel-CMjZH8W-.js → dependency-graph-panel-B7_LMfP4.js} +1 -1
- package/dist/assets/{diagram-PSM6KHXK-CyHuNpNq.js → diagram-PSM6KHXK-mo2Enmtf.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-XfuQrtcF.js → diagram-QEK2KX5R-BmkxV10c.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-bJWzui-7.js → diagram-S2PKOQOG-FgQ9g-FW.js} +1 -1
- package/dist/assets/dist-B1NchzZ7.js +1 -0
- package/dist/assets/{dist-CyK0ePPW.js → dist-B3BjoKW1.js} +1 -1
- package/dist/assets/dist-Bc19bAck.js +1 -0
- package/dist/assets/{dist-D-2yWcX9.js → dist-Bj9Iedc0.js} +1 -1
- package/dist/assets/{dist-BHCGBHnf.js → dist-BygSqKXd.js} +1 -1
- package/dist/assets/{dist-77VmTZjj.js → dist-CBFremCY.js} +1 -1
- package/dist/assets/dist-CGfx7GOn.js +1 -0
- package/dist/assets/{dist-CABwQOV5.js → dist-CKZJyGZk.js} +1 -1
- package/dist/assets/{dist-CIQQgRzz.js → dist-CKjd2mnC.js} +1 -1
- package/dist/assets/dist-CKlHe_tO.js +1 -0
- package/dist/assets/{dist-C4-ruy-b.js → dist-CPAr7_4H.js} +1 -1
- package/dist/assets/{dist-FYUcqnI2.js → dist-CmjkyMZS.js} +1 -1
- package/dist/assets/{dist-sJHUucQ8.js → dist-Cq98Ix9k.js} +1 -1
- package/dist/assets/{dist-XexmIjM8.js → dist-CwSi3e6S.js} +1 -1
- package/dist/assets/{dist-Cqrb9QGk.js → dist-D6TmDEVn.js} +1 -1
- package/dist/assets/{dist-DblYTes5.js → dist-DHMtQYxT.js} +1 -1
- package/dist/assets/{dist-BP6Oj7vU.js → dist-DU6-XN1L.js} +1 -1
- package/dist/assets/{dist-CruUwJkI.js → dist-DZJfnBKu.js} +1 -1
- package/dist/assets/dist-D_FHXQyQ.js +1 -0
- package/dist/assets/{dist-CKVgRUgH.js → dist-Ds-fJX2L.js} +1 -1
- package/dist/assets/{dist-DyuwOQr-.js → dist-d_9Qt_7_.js} +1 -1
- package/dist/assets/dist-znptp4sC.js +1 -0
- package/dist/assets/{documentation-panel-BS_uG8hW.js → documentation-panel-BGXFZYSy.js} +1 -1
- package/dist/assets/{download-CdS_EveB.js → download-DgEarSps.js} +1 -1
- package/dist/assets/{edit-page-DanoliKk.js → edit-page-DExCsBoE.js} +4 -4
- package/dist/assets/{erDiagram-Q2GNP2WA-Db-GMQLy.js → erDiagram-Q2GNP2WA-DZx9RiLu.js} +1 -1
- package/dist/assets/{error-banner-BSQVN46J.js → error-banner-C4DZksWV.js} +1 -1
- package/dist/assets/{error-panel-Csh1BgrG.js → error-panel-Bd98g_JW.js} +1 -1
- package/dist/assets/{es-EItoYvXh.js → es-Cy7KBUrF.js} +1 -1
- package/dist/assets/{esm-DwJBDgEq.js → esm-BqXnk7X6.js} +1 -1
- package/dist/assets/{esm-X3Tr2pur.js → esm-DSv-aO_T.js} +1 -1
- package/dist/assets/{field-DlNY-dDH.js → field-CA9HCE2Y.js} +1 -1
- package/dist/assets/{file-explorer-panel--h0xwnRB.js → file-explorer-panel-5GiP_o58.js} +1 -1
- package/dist/assets/{file-icons-D6BjDFSV.js → file-icons-BwFX01F6.js} +1 -1
- package/dist/assets/{file-name-input-CsUxNFtr.js → file-name-input-C_iFa52z.js} +1 -1
- package/dist/assets/{fileToBase64-BSOFR3RV.js → fileToBase64-Doh9J-g6.js} +1 -1
- package/dist/assets/{floating-outline-D2cwxR8Z.js → floating-outline-BDx00oB1.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-DSxxTDOm.js → flowDiagram-NV44I4VS-BaCfA1PD.js} +1 -1
- package/dist/assets/{focus-BvvRVcVF.js → focus-CocfMydm.js} +1 -1
- package/dist/assets/{form-CO925gWV.js → form-DgnBiuvP.js} +1 -1
- package/dist/assets/{formats-ZGU43GQU.js → formats-Dkhsq416.js} +1 -1
- package/dist/assets/{formatting-DhA_x3cD.js → formatting-Bjzx5J8_.js} +1 -1
- package/dist/assets/{gallery-page-CNPcxPCI.js → gallery-page-Cwx-CV9Q.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-Boeh8Xec.js → ganttDiagram-JELNMOA3-D76yMCwq.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-Ww-CAbr5.js → gitGraphDiagram-V2S2FVAM-xaQk-fkD.js} +1 -1
- package/dist/assets/github-BQ8If5nZ.js +1 -0
- package/dist/assets/{glide-data-editor-Bmm8OMxa.js → glide-data-editor-DtDJGBDZ.js} +4 -4
- package/dist/assets/{globals-Bx8Km3LH.js → globals-BDWM3c_z.js} +1 -1
- package/dist/assets/home-page-BuVWyEpt.js +4 -0
- package/dist/assets/{hooks-7dyPrQQS.js → hooks-dPm1h9aq.js} +1 -1
- package/dist/assets/{html-to-image-BWhkUSek.js → html-to-image-TCtIotr9.js} +1 -1
- package/dist/assets/{index-CG1hyPot.js → index-CrgYGp5w.js} +5 -5
- package/dist/assets/{infoDiagram-HS3SLOUP-emf5Oa26.js → infoDiagram-HS3SLOUP-CaCHYq-C.js} +1 -1
- package/dist/assets/{input-DB2LiTiQ.js → input-b2KTOk0X.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-BM5cpMVY.js → journeyDiagram-XKPGCS4Q-9j5RE995.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-BAIfwDqR.js → kanban-definition-3W4ZIXB7-KTZNPjVQ.js} +1 -1
- package/dist/assets/{kiosk-mode-D0mAc3Fr.js → kiosk-mode-sfaqwl5N.js} +1 -1
- package/dist/assets/{layout-C0MKkswN.js → layout-CVg460UU.js} +3 -3
- package/dist/assets/{linear-BWkmpE3J.js → linear-BWk6x-Bf.js} +1 -1
- package/dist/assets/{links-BN8FYTyp.js → links-BL4SaTJe.js} +1 -1
- package/dist/assets/{logs-panel-BaGDTq_5.js → logs-panel-Bs7u1Wfd.js} +1 -1
- package/dist/assets/{markdown-renderer-CyLjgnQY.js → markdown-renderer-CGZTB2Dx.js} +3 -3
- package/dist/assets/{mermaid-4DMBBIKO-DX6ZCeSi.js → mermaid-4DMBBIKO-1vt0_Bql.js} +1 -1
- package/dist/assets/{mermaid-yhDJCmk2.js → mermaid-BC06IzvM.js} +3 -3
- package/dist/assets/{mermaid-parser.core-CEw6EtVC.js → mermaid-parser.core-UC5-TA69.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-DAiNJDIe.js → mindmap-definition-VGOIOE7T-DwhzT05K.js} +1 -1
- package/dist/assets/{name-cell-input-DBkW5PZU.js → name-cell-input-D4k4IMJD.js} +1 -1
- package/dist/assets/{number-overlay-editor-4rrKClOH.js → number-overlay-editor-DU72uJyj.js} +1 -1
- package/dist/assets/{outline-panel-xLeB4sTR.js → outline-panel-5sRz-QR2.js} +1 -1
- package/dist/assets/{packages-panel-BbWGOWIZ.js → packages-panel-DhXpwKjz.js} +1 -1
- package/dist/assets/{pair-with-agent-modal-Q9Od23Rh.js → pair-with-agent-modal-BONZmBdh.js} +1 -1
- package/dist/assets/{panels-id0eyz64.js → panels-C3XyfWZa.js} +1 -1
- package/dist/assets/{pathUtils-BXCjaLHB.js → pathUtils-ANiMIEDI.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-KdHVGtb7.js → pieDiagram-ADFJNKIX-Ddohs4pt.js} +1 -1
- package/dist/assets/{precisionRound-BOmLQIKI.js → precisionRound-CCOoIlcP.js} +1 -1
- package/dist/assets/{process-output-BcuY_Us9.js → process-output-CRIsE74Q.js} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-B9NNSzQG.js → quadrantDiagram-AYHSOK5B-DXHmstFN.js} +1 -1
- package/dist/assets/{radio-group-XouISBp9.js → radio-group-Czn6pjhm.js} +1 -1
- package/dist/assets/react-vega-DrvGjEhj.js +1 -0
- package/dist/assets/{react-vega-BfOzG-mm.js → react-vega-IsGFjh4e.js} +1 -1
- package/dist/assets/{readonly-python-code-BK3Xk2qY.js → readonly-python-code-DtUWOxnZ.js} +1 -1
- package/dist/assets/{renderShortcut-LpVarhnQ.js → renderShortcut-CKbqJyj4.js} +1 -1
- package/dist/assets/{request-registry-K6vbazWs.js → request-registry-unC7eRnq.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-B5pxFnOe.js → requirementDiagram-UZGBJVZJ-FZxRqc8c.js} +1 -1
- package/dist/assets/{reveal-component-Do91RUH9.js → reveal-component-DDZ2IxNS.js} +1 -1
- package/dist/assets/{run-page-CYnMjVum.js → run-page-K4C80Bqk.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-w55_GOPb.js → sankeyDiagram-TZEHDZUN-BVzsFJnF.js} +1 -1
- package/dist/assets/{scratchpad-panel-DH3KlUbZ.js → scratchpad-panel-Cwl5E8lN.js} +1 -1
- package/dist/assets/{secrets-panel-CgahHnqr.js → secrets-panel-BUtOtnIM.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-CW_L_PJr.js → sequenceDiagram-WL72ISMW-DdzNFBtb.js} +1 -1
- package/dist/assets/{session-panel-BJP2lKfE.js → session-panel-DGjSy-dF.js} +1 -1
- package/dist/assets/{share-DQjChRJG.js → share-vrPro738.js} +1 -1
- package/dist/assets/{snippets-panel-DKenTNmv.js → snippets-panel-94zH2JCj.js} +1 -1
- package/dist/assets/{spec-CDgWI0fT.js → spec-BzxoPflZ.js} +1 -1
- package/dist/assets/{src-CvyFXpBy.js → src-CyeQdfB6.js} +1 -1
- package/dist/assets/{state-DwAS0kE4.js → state-ClDZE-YW.js} +1 -1
- package/dist/assets/{state-Cy10NkuA.js → state-CzwQl1aE.js} +1 -1
- package/dist/assets/{state-DjrxAf9W.js → state-RnIztwr-.js} +1 -1
- package/dist/assets/{state-MC8-jN2e.js → state-WA3j91X9.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-BOX6WbbZ.js → stateDiagram-FKZM4ZOC-DCOZ5EVk.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-D_uhE9WV.js +1 -0
- package/dist/assets/stex-CruVQx-P.js +1 -0
- package/dist/assets/{swiper-component-BwPCQTdo.js → swiper-component-B3QJ6Yx5.js} +1 -1
- package/dist/assets/{switch-DvDNxcZP.js → switch-DHhZkGEv.js} +1 -1
- package/dist/assets/{terminal-BXH7Uaqi.js → terminal-C0JxB62q.js} +1 -1
- package/dist/assets/{textarea-BBpaAGpK.js → textarea-Dz09niIv.js} +1 -1
- package/dist/assets/{time-SPyfucy1.js → time-BsAzPDU3.js} +1 -1
- package/dist/assets/{timeline-definition-IT6M3QCI-Lad2-H_k.js → timeline-definition-IT6M3QCI-BJT2fHGH.js} +1 -1
- package/dist/assets/{tracing-Bz68-Fa1.js → tracing-C_GaBGFx.js} +1 -1
- package/dist/assets/tracing-panel-BkzzwM_5.js +2 -0
- package/dist/assets/{tree-actions-C729o8TG.js → tree-actions-CesD4Rcl.js} +1 -1
- package/dist/assets/{useBoolean-BMzj74q1.js → useBoolean-48bgGoSa.js} +1 -1
- package/dist/assets/{useCellActionButton-VGB6-gGh.js → useCellActionButton-DNYd1sgZ.js} +1 -1
- package/dist/assets/{useDateFormatter-CAlTJ8HV.js → useDateFormatter-CANi6nSX.js} +1 -1
- package/dist/assets/{useDeleteCell-D_p8uMly.js → useDeleteCell-CCCMHD2a.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-v8fQPE_U.js → useDependencyPanelTab-P57LIkal.js} +1 -1
- package/dist/assets/{useInstallPackage-C1Dd0aIZ.js → useInstallPackage-DEHK-C20.js} +1 -1
- package/dist/assets/{useNotebookActions-Hdu82BAI.js → useNotebookActions-B8xsvWwy.js} +1 -1
- package/dist/assets/{useNumberFormatter-CuxZh3Bq.js → useNumberFormatter-DCM-63YT.js} +1 -1
- package/dist/assets/{usePress-BSFUeqnS.js → usePress-mjvipKvz.js} +1 -1
- package/dist/assets/{useRunCells-DXtOL4UR.js → useRunCells-DFXV3Rm5.js} +1 -1
- package/dist/assets/{useSplitCell-CzaZEqwj.js → useSplitCell-R-0wFhnd.js} +1 -1
- package/dist/assets/{utils-DPvpQ891.js → utils-BIlJBJIu.js} +1 -1
- package/dist/assets/{vega-component-Ch7x9hsC.js → vega-component-wGZOy7qv.js} +1 -1
- package/dist/assets/{vega-loader.browser-CZV6_g2i.js → vega-loader.browser-BJ9oKrvH.js} +1 -1
- package/dist/assets/{write-secret-modal-K2n79wHj.js → write-secret-modal-qfcjtCvk.js} +1 -1
- package/dist/assets/{xychartDiagram-PRI3JC2R-f8MNNXWc.js → xychartDiagram-PRI3JC2R-BtC1koqJ.js} +1 -1
- package/dist/assets/youtube-NfBeYlaL.js +1 -0
- package/dist/index.html +111 -111
- package/package.json +1 -1
- package/src/components/editor/actions/useNotebookActions.tsx +4 -4
- package/src/components/home/components.tsx +4 -4
- package/src/components/icons/github.tsx +21 -0
- package/src/components/icons/youtube.tsx +21 -0
- package/src/components/storage/components.tsx +3 -7
- package/dist/assets/channel-CpOVhGq6.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-Bxr8oM_y.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-CY-gITpZ.js +0 -1
- package/dist/assets/dist-Bm-o3knM.js +0 -1
- package/dist/assets/dist-C0zWDt4u.js +0 -1
- package/dist/assets/dist-C2qq2Q11.js +0 -1
- package/dist/assets/dist-CI-LXQQ2.js +0 -1
- package/dist/assets/dist-DThLGT6I.js +0 -1
- package/dist/assets/dist-VVk6z_gh.js +0 -1
- package/dist/assets/github-CyzgLJDA.js +0 -1
- package/dist/assets/home-page-CPt4LGp0.js +0 -4
- package/dist/assets/react-vega-4x9RLMqT.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-JHjNwkbq.js +0 -1
- package/dist/assets/stex-BBWVYm-R.js +0 -1
- package/dist/assets/tracing-panel-BfgGYFNi.js +0 -2
- package/dist/assets/youtube-BEAtppjN.js +0 -1
- /package/dist/assets/{Deferred-BMfCOLaw.js → Deferred-CfyqLOPG.js} +0 -0
- /package/dist/assets/{SSRProvider-DX2edArU.js → SSRProvider-DrpctNAg.js} +0 -0
- /package/dist/assets/{alert-1y_DnRWn.js → alert-Bjh7v4lb.js} +0 -0
- /package/dist/assets/{azure-DBVzcmvx.js → azure-B42ls0Ui.js} +0 -0
- /package/dist/assets/{badge-6yGCqY1Z.js → badge-CFAaMy0O.js} +0 -0
- /package/dist/assets/{blob-BiK5xmlC.js → blob-dGUJ3Bw8.js} +0 -0
- /package/dist/assets/{bundle.esm-D544r2Sr.js → bundle.esm-BULc9l6b.js} +0 -0
- /package/dist/assets/{card-s1ZaQ9ub.js → card-DrIItWkf.js} +0 -0
- /package/dist/assets/{copy-D8MtpXgN.js → copy-CyasABTK.js} +0 -0
- /package/dist/assets/{defaultLocale-DK1MWd7f.js → defaultLocale-CGfP-Ye3.js} +0 -0
- /package/dist/assets/{defaultLocale-OkOxlkkM.js → defaultLocale-CuYNS33t.js} +0 -0
- /package/dist/assets/{dialog-DkJmIrsG.js → dialog-Dr_Y1zNi.js} +0 -0
- /package/dist/assets/{dist-UghNT0W0.js → dist-BM-OLiKa.js} +0 -0
- /package/dist/assets/{dist-ZjSH4Z6x.js → dist-BZhJ1bTM.js} +0 -0
- /package/dist/assets/{dist-CNKFZCiw.js → dist-D-o1OXc9.js} +0 -0
- /package/dist/assets/{dist-BtrqKtvn.js → dist-DnIl7RU-.js} +0 -0
- /package/dist/assets/{emotion-is-prop-valid.esm-CK2zY6a8.js → emotion-is-prop-valid.esm-DiQGBfwj.js} +0 -0
- /package/dist/assets/{empty-state-QmmE2oN4.js → empty-state-vKu4k0Y4.js} +0 -0
- /package/dist/assets/{en-US-BXNio91F.js → en-US-DZwIjHwu.js} +0 -0
- /package/dist/assets/{errors-9jMmWHd9.js → errors-48KFPvCp.js} +0 -0
- /package/dist/assets/{events-XR_LpvHc.js → events-BRbNg7Li.js} +0 -0
- /package/dist/assets/{extends-CeSFM22p.js → extends-2LbFKIQQ.js} +0 -0
- /package/dist/assets/{house-DHu4JLi3.js → house-DkdBWh44.js} +0 -0
- /package/dist/assets/{icons-avFV3lBF.js → icons-D3YFXNmD.js} +0 -0
- /package/dist/assets/{image-BzUcK6ho.js → image-jhXeQEgs.js} +0 -0
- /package/dist/assets/{isValid-DKyiOp4U.js → isValid-Cgon0fXK.js} +0 -0
- /package/dist/assets/{kbd-UVzWBHfi.js → kbd-BCXa3Ocm.js} +0 -0
- /package/dist/assets/{link-e5mRDDOC.js → link-My4Pey3q.js} +0 -0
- /package/dist/assets/{links-CCkJpphF.js → links-DK7te6sJ.js} +0 -0
- /package/dist/assets/{message-circle-RkIzfQEi.js → message-circle-D_YIPPZo.js} +0 -0
- /package/dist/assets/{micromark-factory-space-BUQpMdx2.js → micromark-factory-space-P--XWZhg.js} +0 -0
- /package/dist/assets/{multi-icon-CTvmuLdL.js → multi-icon-CGXdgpE4.js} +0 -0
- /package/dist/assets/{numbers-_ry1Nlla.js → numbers-BKZTJMZ6.js} +0 -0
- /package/dist/assets/{objectWithoutPropertiesLoose-BkUn3I0-.js → objectWithoutPropertiesLoose-Msf1n32r.js} +0 -0
- /package/dist/assets/{ordinal-Cn9sg_-a.js → ordinal-CIZb_ice.js} +0 -0
- /package/dist/assets/{package-BTIV9-Dk.js → package-BoMcg6sy.js} +0 -0
- /package/dist/assets/{panel-context-DC1vAeB3.js → panel-context-RKllh8pM.js} +0 -0
- /package/dist/assets/{paths-DhuNSnZ_.js → paths-kNeJ8nbe.js} +0 -0
- /package/dist/assets/{plus-ZXRHY1up.js → plus-CExKUszm.js} +0 -0
- /package/dist/assets/{preload-helper-BW0IMuFq.js → preload-helper-y72bE5iF.js} +0 -0
- /package/dist/assets/{prop-types-B6Y2e__V.js → prop-types-D_pYuT11.js} +0 -0
- /package/dist/assets/{purify.es-DfJp_of2.js → purify.es-DdxMtdqK.js} +0 -0
- /package/dist/assets/{range-DNqFcYmr.js → range-ClqUI25v.js} +0 -0
- /package/dist/assets/{react-icons.esm-DCqqMD4w.js → react-icons.esm-C2u-_EAQ.js} +0 -0
- /package/dist/assets/{react-resizable-panels.browser.esm-Ce2ksurd.js → react-resizable-panels.browser.esm-CgWOEYeG.js} +0 -0
- /package/dist/assets/{refresh-ccw-Bee7JLOl.js → refresh-ccw-CUkO1Vlo.js} +0 -0
- /package/dist/assets/{refresh-cw-C9FftltI.js → refresh-cw-DcEasnos.js} +0 -0
- /package/dist/assets/{requests-DqJEWJ-Q.js → requests-Bm3bohzL.js} +0 -0
- /package/dist/assets/{rotate-ccw-ZsOWbQCw.js → rotate-ccw-CBXqO1Fd.js} +0 -0
- /package/dist/assets/{save-BNNMzGly.js → save-CGxzAyve.js} +0 -0
- /package/dist/assets/{semaphore-X3ApuO41.js → semaphore-FlZezxaf.js} +0 -0
- /package/dist/assets/{session-CsT5Gg9j.js → session-B6_8umQX.js} +0 -0
- /package/dist/assets/{settings-1WkYMLdR.js → settings-Cn43l_vx.js} +0 -0
- /package/dist/assets/{sparkles-COaEc8Qn.js → sparkles-DctOjjEz.js} +0 -0
- /package/dist/assets/{spinner-BbI9qk88.js → spinner-DTBVbtl-.js} +0 -0
- /package/dist/assets/{square-35tXIgiR.js → square-DPWHdF_-.js} +0 -0
- /package/dist/assets/{square-function-Dx0pKHko.js → square-function-CPbVtjKW.js} +0 -0
- /package/dist/assets/{stex-0ac7Aukl.js → stex-C6JeW1YI.js} +0 -0
- /package/dist/assets/{table-CnW850Wt.js → table-Fk_msRcD.js} +0 -0
- /package/dist/assets/{timer-B6DpdVnC.js → timer-BgiWPhV9.js} +0 -0
- /package/dist/assets/{trash-2-CqTUwVuU.js → trash-2-CjPoUZCP.js} +0 -0
- /package/dist/assets/{trash-BW_KaFjz.js → trash-Icq8_IVf.js} +0 -0
- /package/dist/assets/{triangle-alert-D8Ft17xk.js → triangle-alert-CV7pqa1o.js} +0 -0
- /package/dist/assets/{types-BnrgJ4Gh.js → types-xF5uWODg.js} +0 -0
- /package/dist/assets/{use-toast-kCNiuc-_.js → use-toast-BH8bU9Xf.js} +0 -0
- /package/dist/assets/{useAsyncData-DAQcLiyE.js → useAsyncData-CT1LpOBD.js} +0 -0
- /package/dist/assets/{useDebounce-CpLI2dsc.js → useDebounce-BlBSYv0n.js} +0 -0
- /package/dist/assets/{useDeepCompareMemoize-CWcgQCbT.js → useDeepCompareMemoize-zUHU--0D.js} +0 -0
- /package/dist/assets/{useHotkey-CJo8iX8v.js → useHotkey-C-blZ3Z8.js} +0 -0
- /package/dist/assets/{useIframeCapabilities-B0dNZiKK.js → useIframeCapabilities-DuGyzPVb.js} +0 -0
- /package/dist/assets/{useTheme-D_ZbTTJw.js → useTheme-CWoNQwFz.js} +0 -0
- /package/dist/assets/{uuid-ClFZlR7U.js → uuid-BukULOeS.js} +0 -0
- /package/dist/assets/{workflow-f8flhcJ1.js → workflow-ClrYl5m7.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as ze}from"./chunk-LvLJmgfZ.js";import{d as L,l as rt,p as dt,u as I}from"./useEvent-D91BmmQi.js";import{t as ct}from"./react-Bj1aDYRI.js";import{An as ht,Cr as pt,D as We,E as mt,Mn as ut,Nn as ft,On as bt,Or as yt,Qt as kt,Tn as wt,Ui as be,_ as xt,br as gt,ct as jt,dt as Me,h as Ae,kn as vt,lt as Ct,ni as zt,t as Wt,vr as Mt,yr as Se}from"./cells-DiASVTIh.js";import{t as z}from"./compiler-runtime-B3qBwwSJ.js";import{n as At,r as St,x as _t}from"./ai-model-dropdown-Dvmxl0HU.js";import{_ as H,d as _e}from"./useEventListener-BakX-tnw.js";import{r as Dt,x as Pt}from"./utils-Dev6I_Kv.js";import{n as W,t as De}from"./constants-B9JJ72XE.js";import{T as X,v as Nt,w as It}from"./config-3clPIEB9.js";import{t as Et}from"./jsx-runtime-PbYoItBR.js";import{o as Tt}from"./alert-dialog-CC0gG4Av.js";import{a as Lt,c as Ht,i as Rt,n as qt,r as Ot,s as Bt,t as Ft}from"./select-Cjly7tmx.js";import{Nt as Vt}from"./JsonOutput-CWVuEz6C.js";import{c as Pe,d as ye,n as Yt,o as $t,r as ke,t as Ut}from"./download-CdS_EveB.js";import{t as Kt}from"./tooltip-CgQpRVyN.js";import{r as Gt,t as we}from"./button-BF7GSjhW.js";import{i as Jt,t as Ne}from"./strings-DvZlHYnD.js";import{r as R}from"./requests-KshNNAOp.js";import{t as m}from"./createLucideIcon-BTp1tQDO.js";import{F as Qt,I as Xt,L as Ie,P as Zt,a as Ee,i as Te,u as Le}from"./layout-C0MKkswN.js";import{t as He}from"./check-DQmqoJgr.js";import{r as ea}from"./useCellActionButton-VGB6-gGh.js";import{t as ta}from"./code-DP40S9ln.js";import{t as aa}from"./copy-IBNGDypD.js";import{t as Re}from"./eye-off-DI0EQXw0.js";import{t as oa}from"./external-link-BktyywYg.js";import{t as Z}from"./file-BvoBtS_V.js";import{t as na}from"./github-CyzgLJDA.js";import{u as ia}from"./form-CO925gWV.js";import{n as sa,r as la,t as ra}from"./youtube-BEAtppjN.js";import{i as da,n as qe}from"./add-connection-dialog-pVExi7gB.js";import{t as ca}from"./house-DHu4JLi3.js";import{t as ha}from"./image-BzUcK6ho.js";import{t as pa}from"./link-e5mRDDOC.js";import{r as ma}from"./input-DB2LiTiQ.js";import{t as ua}from"./settings-1WkYMLdR.js";import{t as fa}from"./sparkles-COaEc8Qn.js";import{y as ba}from"./textarea-BBpaAGpK.js";import{t as ya}from"./square-35tXIgiR.js";import{t as M}from"./use-toast-kCNiuc-_.js";import{n as Oe,t as ka}from"./paths-DhuNSnZ_.js";import{o as wa}from"./session-CsT5Gg9j.js";import{n as ee}from"./copy-D8MtpXgN.js";import{r as xa}from"./useRunCells-DXtOL4UR.js";import{a as ga,c as ja,i as va,n as Ca,r as za}from"./dialog-DkJmIrsG.js";import{n as xe}from"./ImperativeModal-B62Q6S9l.js";import{r as Wa,t as Be}from"./share-DQjChRJG.js";import{a as Ma}from"./cell-link-DBKqdVgo.js";import{a as Aa}from"./renderShortcut-LpVarhnQ.js";import{t as Sa}from"./icons-avFV3lBF.js";import{t as _a}from"./pair-with-agent-modal-Q9Od23Rh.js";import{n as Fe}from"./marimo-icons-CbdeMmbB.js";import{t as Da}from"./links-BN8FYTyp.js";import{r as Pa,t as Ve}from"./hooks-7dyPrQQS.js";import{t as Ye}from"./types-a-yURniQ.js";var Na=m("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),Ia=m("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),$e=m("clipboard-copy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]),Ue=m("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]),Ke=m("diamond-plus",[["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z",key:"1ey20j"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),Ea=m("fast-forward",[["path",{d:"M12 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 12 18z",key:"b19h5q"}],["path",{d:"M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z",key:"h7h5ge"}]]),Ta=m("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]),La=m("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),Ha=m("notebook",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M16 2v20",key:"rotuqe"}]]),Ra=m("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),Ge=m("presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),qa=m("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),Oa=m("square-power",[["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M7.998 9.003a5 5 0 1 0 8-.005",key:"1pek45"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]),Je=m("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]),Qe=z(),Xe=ze(ct(),1),a=ze(Et(),1),te="https://static.marimo.app";const Ba=e=>{let t=(0,Qe.c)(25),{onClose:n}=e,[o,i]=(0,Xe.useState)(""),{exportAsHTML:d}=R(),l=`${o}-${Math.random().toString(36).slice(2,6)}`,s=`${te}/static/${l}`,r;t[0]!==d||t[1]!==n||t[2]!==l?(r=async v=>{v.preventDefault(),n();let T=await d({download:!1,includeCode:!0,files:Zt.INSTANCE.filenames()}),A=M({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${te}/api/static`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:T,path:l})}).catch(()=>{A.dismiss(),M({title:"Error uploading static page",description:(0,a.jsxs)("div",{children:["Please try again later. If the problem persists, please file a bug report on"," ",(0,a.jsx)("a",{href:W.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]})})}),A.dismiss(),M({title:"Static page uploaded!",description:(0,a.jsxs)("div",{children:["The URL has been copied to your clipboard.",(0,a.jsx)("br",{}),"You can share it with anyone."]})})},t[0]=d,t[1]=n,t[2]=l,t[3]=r):r=t[3];let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsx)(ja,{children:"Share static notebook"}),t[4]=h):h=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsxs)(ga,{children:[h,(0,a.jsxs)(za,{children:["You can publish a static, non-interactive version of this notebook to the public web. We will create a link for you that lives on"," ",(0,a.jsx)("a",{href:te,target:"_blank",children:te}),"."]})]}),t[5]=p):p=t[5];let g;t[6]===Symbol.for("react.memo_cache_sentinel")?(g=v=>{i(v.target.value.toLowerCase().replaceAll(/\s/g,"-").replaceAll(/[^\da-z-]/g,""))},t[6]=g):g=t[6];let f;t[7]===o?f=t[8]:(f=(0,a.jsx)(ma,{"data-testid":"slug-input",id:"slug",autoFocus:!0,value:o,placeholder:"Notebook slug",onChange:g,required:!0,autoComplete:"off"}),t[7]=o,t[8]=f);let b;t[9]===s?b=t[10]:(b=(0,a.jsxs)("div",{className:"font-semibold text-sm text-muted-foreground gap-2 flex flex-col",children:["Anyone will be able to access your notebook at this URL:",(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(Fa,{text:s}),(0,a.jsx)("span",{className:"text-primary",children:s})]})]}),t[9]=s,t[10]=b);let y;t[11]!==f||t[12]!==b?(y=(0,a.jsxs)("div",{className:"flex flex-col gap-6 py-4",children:[f,b]}),t[11]=f,t[12]=b,t[13]=y):y=t[13];let k;t[14]===n?k=t[15]:(k=(0,a.jsx)(we,{"data-testid":"cancel-share-static-notebook-button",variant:"secondary",onClick:n,children:"Cancel"}),t[14]=n,t[15]=k);let w;t[16]===s?w=t[17]:(w=(0,a.jsx)(we,{"data-testid":"share-static-notebook-button","aria-label":"Save",variant:"default",type:"submit",onClick:async()=>{await ee(s)},children:"Create"}),t[16]=s,t[17]=w);let x;t[18]!==k||t[19]!==w?(x=(0,a.jsxs)(va,{children:[k,w]}),t[18]=k,t[19]=w,t[20]=x):x=t[20];let j;return t[21]!==r||t[22]!==x||t[23]!==y?(j=(0,a.jsx)(Ca,{className:"w-fit",children:(0,a.jsxs)("form",{onSubmit:r,children:[p,y,x]})}),t[21]=r,t[22]=x,t[23]=y,t[24]=j):j=t[24],j};var Fa=e=>{let t=(0,Qe.c)(8),[n,o]=Xe.useState(!1),i;t[0]===e.text?i=t[1]:(i=Gt.stopPropagation(async h=>{h.preventDefault(),await ee(e.text),o(!0),setTimeout(()=>o(!1),2e3)}),t[0]=e.text,t[1]=i);let d=i,l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(aa,{size:14,strokeWidth:1.5}),t[2]=l):l=t[2];let s;t[3]===d?s=t[4]:(s=(0,a.jsx)(we,{"data-testid":"copy-static-notebook-url-button",onClick:d,size:"xs",variant:"secondary",children:l}),t[3]=d,t[4]=s);let r;return t[5]!==n||t[6]!==s?(r=(0,a.jsx)(Kt,{content:"Copied!",open:n,children:s}),t[5]=n,t[6]=s,t[7]=r):r=t[7],r},Va=z();function Ya(){let e=document.getElementsByClassName(De.outputArea);for(let t of e){let n=t.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=be.findElement(t);if(!o){H.warn("Could not find HTMLCellId for visible output area",t);continue}return{cellId:be.parse(o.id)}}}return H.warn("No visible output area found for scroll anchor"),null}function $a(e){if(!e){H.warn("No scroll anchor provided to restore scroll position");return}let t=document.getElementById(be.create(e.cellId));if(!t){H.warn("Could not find cell element to restore scroll position",e.cellId);return}if(!t.querySelector(`.${De.outputArea}`)){H.warn("Could not find output area to restore scroll position",e.cellId);return}t.scrollIntoView({block:"start",behavior:"auto"})}function Ze(){let e=(0,Va.c)(2),t=L(Me),n;return e[0]===t?n=e[1]:(n=()=>{let o=Ya();t(i=>({mode:Ct(i.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{$a(o)})})},e[0]=t,e[1]=n),n}const et=dt(!1);var Ua=z();const Ka=()=>{let e=(0,Ua.c)(7),{selectedLayout:t}=Ee(),{setLayoutView:n}=Te();if(X()&&!ft("wasm_layouts"))return null;let o;e[0]===n?o=e[1]:(o=s=>n(s),e[0]=n,e[1]=o);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(Bt,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(Ht,{placeholder:"Select a view"})}),e[2]=i):i=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=(0,a.jsx)(qt,{children:(0,a.jsxs)(Ot,{children:[(0,a.jsx)(Lt,{children:"View as"}),Ye.map(Ja)]})}),e[3]=d):d=e[3];let l;return e[4]!==t||e[5]!==o?(l=(0,a.jsxs)(Ft,{"data-testid":"layout-select",value:t,onValueChange:o,children:[i,d]}),e[4]=t,e[5]=o,e[6]=l):l=e[6],l};function Ga(e){return(0,a.jsx)(tt(e),{className:"h-4 w-4"})}function tt(e){switch(e){case"vertical":return La;case"grid":return la;case"slides":return Ge;default:return Jt(e),ya}}function at(e){return Ne.startCase(e)}function Ja(e){return(0,a.jsx)(Rt,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[Ga(e),(0,a.jsx)("span",{children:at(e)})]})},e)}async function Qa(e){let{filename:t,preset:n,downloadPDF:o}=e;await o({filename:t,webpdf:!1,preset:n,includeInputs:!0,rasterServer:"static"})}var Xa=z();function Za(e){let t=(0,Xa.c)(5),{openPrompt:n,closeModal:o}=xe(),{sendCopy:i}=R(),d;return t[0]!==o||t[1]!==n||t[2]!==i||t[3]!==e?(d=()=>{if(!e)return null;let l=ka.guessDeliminator(e);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${Oe.basename(e)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:s=>{let r=l.join(Oe.dirname(e),s);i({source:e,destination:r}).then(()=>{o(),M({title:"Notebook copied",description:"A copy of the notebook has been created."}),Da(r)})}})},t[0]=o,t[1]=n,t[2]=i,t[3]=e,t[4]=d):d=t[4],d}var eo=z();function ot(){let e=(0,eo.c)(4),{openConfirm:t}=xe(),n=L(Nt),{sendRestart:o}=R(),i;return e[0]!==t||e[1]!==o||e[2]!==n?(i=()=>{t({title:"Restart Kernel",description:"This will restart the Python kernel. You'll lose all data that's in memory. You will also lose any unsaved changes, so make sure to save your work before restarting.",variant:"destructive",confirmAction:(0,a.jsx)(Tt,{onClick:async()=>{n({state:It.CLOSING}),await o(),Wa()},"aria-label":"Confirm Restart",children:"Restart"})})},e[0]=t,e[1]=o,e[2]=n,e[3]=i):i=e[3],i}var to=z(),ao=new kt,oo=e=>ao.isSupported(e)?"markdown":"code";const nt=()=>{let e=(0,to.c)(3),{updateCellConfig:t}=We(),{saveCellConfig:n}=R(),o;return e[0]!==n||e[1]!==t?(o=async(i,d)=>{let l=Ae(),s={};for(let h of l.cellIds.inOrderIds){let p=l.cellData[h];p===void 0||p.config.hide_code===i||oo(p.code)===d&&(s[h]={hide_code:i})}let r=_e.entries(s);if(r.length!==0){await n({configs:s});for(let[h,p]of r)t({cellId:h,config:p})}},e[0]=n,e[1]=t,e[2]=o):o=e[2],o};var no=z(),E=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation()};function io(){var je,ve,Ce;let e=(0,no.c)(56),t=Ma(),{openModal:n,closeModal:o}=xe(),{toggleApplication:i}=bt(),{selectedPanel:d}=vt(),[l]=rt(Me),s=I(jt),r=nt(),[h]=Pt(),p=I(wt),g=I(Dt),{updateCellConfig:f,undoDeleteCell:b,clearAllCellOutputs:y,addSetupCellIfDoesntExist:k,collapseAllCells:w,expandAllCells:x}=We(),j=ot(),v=xa(),T=Za(t),A=L(et),oe=L(At),{handleClick:ne}=St(),ie=L(_t),{exportAsIPYNB:se,exportAsMarkdown:le,readCode:S,saveCellConfig:re,updateCellOutputs:_}=R(),D=Pa(),de=I(xt),ce=I(Wt),he=I(mt),{selectedLayout:q}=Ee(),{setLayoutView:pe}=Te(),O=Ze(),B=((je=h.sharing)==null?void 0:je.html)??!0,F=((ve=h.sharing)==null?void 0:ve.wasm)??!0,V=((Ce=h.sharing)==null?void 0:Ce.molab)??!0,ge=!X(),me=q==="slides",it=Co,st=vo,Y;e[0]!==t||e[1]!==D||e[2]!==_?(Y=async c=>{let{preset:u,title:C}=c;if(!t){ae();return}await Pe(C,async fe=>{await Ve({takeScreenshots:()=>D({progress:fe}),updateCellOutputs:_}),await Qa({filename:t,preset:u,downloadPDF:Yt})})},e[0]=t,e[1]=D,e[2]=_,e[3]=Y):Y=e[3];let P=Y,$;e[4]===P?$=e[5]:($=async()=>{if(ge){await P({preset:"document",title:"Downloading Document PDF..."});return}let c=new Event("export-beforeprint"),u=new Event("export-afterprint");window.dispatchEvent(c),setTimeout(jo,0),setTimeout(()=>window.dispatchEvent(u),0)},e[4]=P,e[5]=$);let U=$,K;e[6]!==se||e[7]!==t||e[8]!==D||e[9]!==_?(K=async()=>{if(!t){ae();return}await Pe("Downloading IPYNB...",async c=>{await Ve({takeScreenshots:()=>D({progress:c}),updateCellOutputs:_});let u=await se({download:!1});ke(new Blob([u],{type:"application/x-ipynb+json"}),ye.toIPYNB(document.title))})},e[6]=se,e[7]=t,e[8]=D,e[9]=_,e[10]=K):K=e[10];let ue=K,G;e[11]===Symbol.for("react.memo_cache_sentinel")?(G=(0,a.jsx)(Vt,{size:14,strokeWidth:1.5}),e[11]=G):G=e[11];let J;e[12]===Symbol.for("react.memo_cache_sentinel")?(J=(0,a.jsx)(Ie,{size:14,strokeWidth:1.5}),e[12]=J):J=e[12];let N;e[13]===t?N=e[14]:(N=async()=>{if(!t){ae();return}await Le({filename:t,includeCode:!0})},e[13]=t,e[14]=N);let Q;return e[15]!==k||e[16]!==g||e[17]!==ce||e[18]!==p||e[19]!==y||e[20]!==o||e[21]!==w||e[22]!==T||e[23]!==P||e[24]!==x||e[25]!==le||e[26]!==t||e[27]!==U||e[28]!==ue||e[29]!==de||e[30]!==me||e[31]!==s||e[32]!==n||e[33]!==ne||e[34]!==S||e[35]!==j||e[36]!==v||e[37]!==re||e[38]!==q||e[39]!==d||e[40]!==r||e[41]!==A||e[42]!==ie||e[43]!==pe||e[44]!==oe||e[45]!==B||e[46]!==V||e[47]!==F||e[48]!==N||e[49]!==i||e[50]!==O||e[51]!==b||e[52]!==he||e[53]!==f||e[54]!==l.mode?(Q=[{icon:G,label:"Download",handle:E,dropdown:[{icon:J,label:"Download as HTML",handle:N},{icon:(0,a.jsx)(Ie,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!t){ae();return}await Le({filename:t,includeCode:!1})}},{icon:(0,a.jsx)(Sa,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let c=await le({download:!1});ke(new Blob([c],{type:"text/plain"}),ye.toMarkdown(document.title))}},{icon:(0,a.jsx)(Ha,{size:14,strokeWidth:1.5}),label:"Download as ipynb",handle:ue},{icon:(0,a.jsx)(ta,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let c=await S();ke(new Blob([c.contents],{type:"text/plain"}),ye.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(ha,{size:14,strokeWidth:1.5}),label:"Download as PNG",disabled:l.mode!=="present",tooltip:l.mode==="present"?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",Aa("global.hideCode",!1)]}),handle:go},me?{divider:!0,icon:(0,a.jsx)(Z,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:E,dropdown:[{icon:(0,a.jsx)(Z,{size:14,strokeWidth:1.5}),label:"Document Layout",handle:U},{icon:(0,a.jsx)(Z,{size:14,strokeWidth:1.5}),label:"Slides Layout",rightElement:st(!0),hidden:!ge,handle:async()=>{await P({preset:"slides",title:"Downloading Slides PDF..."})}}]}:{divider:!0,icon:(0,a.jsx)(Z,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:U}]},{icon:(0,a.jsx)(fa,{size:14,strokeWidth:1.5}),label:"Pair with an agent",hidden:X(),handle:async()=>{n((0,a.jsx)(_a,{onClose:o}))}},{icon:(0,a.jsx)(qa,{size:14,strokeWidth:1.5}),label:"Share",handle:E,hidden:!B&&!F&&!V,dropdown:[{icon:(0,a.jsx)(ia,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!B,handle:async()=>{n((0,a.jsx)(Ba,{onClose:o}))}},{icon:(0,a.jsx)(pa,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!F,handle:async()=>{await ee(Be({code:(await S()).contents})),M({title:"Copied",description:"Link copied to clipboard."})}},{icon:(0,a.jsx)(Fe,{size:14,strokeWidth:1.5}),label:"Create molab notebook",hidden:!V,handle:async()=>{let c=Be({code:(await S()).contents,baseUrl:`${W.molab}/new`});window.open(c,"_blank")}}]},{icon:(0,a.jsx)(Ra,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:E,dropdown:ht.flatMap(c=>{let u=c.type==="ai"&&!g;if(ut({panel:c,capabilities:p,aiEnabled:g})&&!u)return[];let{type:C,Icon:fe,additionalKeywords:lt}=c;return{label:Ne.startCase(C),rightElement:it(d===C),icon:(0,a.jsx)(fe,{size:14,strokeWidth:1.5}),handle:()=>{if(u){ne("ai","ai-features");return}i(C)},additionalKeywords:lt}})},{icon:(0,a.jsx)(Ge,{size:14,strokeWidth:1.5}),label:"Present as",handle:E,dropdown:[{icon:l.mode==="present"?(0,a.jsx)(ba,{size:14,strokeWidth:1.5}):(0,a.jsx)(Qt,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{O()}},...Ye.map((c,u)=>{let C=tt(c);return{divider:u===0,label:at(c),icon:(0,a.jsx)(C,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:q===c&&(0,a.jsx)(He,{size:14})}),handle:()=>{pe(c),l.mode==="edit"&&O()}}})]},{icon:(0,a.jsx)(Ta,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!t||X(),handle:T},{icon:(0,a.jsx)($e,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!t,handle:async()=>{await ee((await S()).contents),M({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(ea,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!de||s,handle:async()=>{let c=zt(Ae());await re({configs:_e.fromEntries(c.map(xo))});for(let u of c)f({cellId:u,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(Ke,{size:14,strokeWidth:1.5}),label:"Add setup cell",handle:()=>{k({})}},{icon:(0,a.jsx)(gt,{size:14,strokeWidth:1.5}),label:"Add database connection",handle:()=>{n((0,a.jsx)(qe,{onClose:o}))}},{icon:(0,a.jsx)(da,{size:14,strokeWidth:1.5}),label:"Add remote storage",handle:()=>{n((0,a.jsx)(qe,{defaultTab:"storage",onClose:o}))}},{icon:(0,a.jsx)(Je,{size:14,strokeWidth:1.5}),label:he,hidden:!ce||s,handle:()=>{b()}},{icon:(0,a.jsx)(Oa,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:j,additionalKeywords:["reset","reload","restart"]},{icon:(0,a.jsx)(Ea,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{v()}},{icon:(0,a.jsx)(pt,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{y()}},{icon:(0,a.jsx)(Se,{size:14,strokeWidth:1.5}),label:"Show all code",hotkey:"global.showAllCode",handle:()=>r(!1,"code"),redundant:!0},{icon:(0,a.jsx)(Re,{size:14,strokeWidth:1.5}),label:"Hide all code",hotkey:"global.hideAllCode",handle:()=>r(!0,"code"),redundant:!0},{icon:(0,a.jsx)(Se,{size:14,strokeWidth:1.5}),label:"Show all markdown code",hotkey:"global.showAllMarkdownCode",handle:()=>r(!1,"markdown"),redundant:!0},{icon:(0,a.jsx)(Re,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",hotkey:"global.hideAllMarkdownCode",handle:()=>r(!0,"markdown"),redundant:!0},{icon:(0,a.jsx)(Ia,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:w,redundant:!0},{icon:(0,a.jsx)(Na,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:x,redundant:!0},{divider:!0,icon:(0,a.jsx)(Ue,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>A(wo)},{icon:(0,a.jsx)(Xt,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>ie(ko)},{icon:(0,a.jsx)(ua,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>oe(yo),redundant:!0,additionalKeywords:["preferences","options","configuration"]},{icon:(0,a.jsx)(oa,{size:14,strokeWidth:1.5}),label:"Resources",handle:E,dropdown:[{icon:(0,a.jsx)(yt,{size:14,strokeWidth:1.5}),label:"Documentation",handle:bo},{icon:(0,a.jsx)(na,{size:14,strokeWidth:1.5}),label:"GitHub",handle:fo},{icon:(0,a.jsx)(sa,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:uo},{icon:(0,a.jsx)(ra,{size:14,strokeWidth:1.5}),label:"YouTube",handle:mo},{icon:(0,a.jsx)(Mt,{size:14,strokeWidth:1.5}),label:"Changelog",handle:po}]},{divider:!0,icon:(0,a.jsx)(ca,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:ho},{icon:(0,a.jsx)(Fe,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:co}].filter(ro).map(so),e[15]=k,e[16]=g,e[17]=ce,e[18]=p,e[19]=y,e[20]=o,e[21]=w,e[22]=T,e[23]=P,e[24]=x,e[25]=le,e[26]=t,e[27]=U,e[28]=ue,e[29]=de,e[30]=me,e[31]=s,e[32]=n,e[33]=ne,e[34]=S,e[35]=j,e[36]=v,e[37]=re,e[38]=q,e[39]=d,e[40]=r,e[41]=A,e[42]=ie,e[43]=pe,e[44]=oe,e[45]=B,e[46]=V,e[47]=F,e[48]=N,e[49]=i,e[50]=O,e[51]=b,e[52]=he,e[53]=f,e[54]=l.mode,e[55]=Q):Q=e[55],Q}function so(e){return e.dropdown?{...e,dropdown:e.dropdown.filter(lo)}:e}function lo(e){return!e.hidden}function ro(e){return!e.hidden}function co(){let e=wa();window.open(e,"_blank")}function ho(){let e=document.baseURI.split("?")[0];window.open(e,"_self")}function po(){window.open(W.releasesPage,"_blank")}function mo(){window.open(W.youtube,"_blank")}function uo(){window.open(W.discordLink,"_blank")}function fo(){window.open(W.githubPage,"_blank")}function bo(){window.open(W.docsPage,"_blank")}function yo(e){return!e}function ko(e){return!e}function wo(e){return!e}function xo(e){return[e,{disabled:!1}]}async function go(){let e=document.getElementById("App");e&&await $t({element:e,filename:document.title,prepare:Ut})}function jo(){return window.print()}function vo(e){return e?(0,a.jsx)("span",{className:"ml-3 shrink-0 rounded-full border border-emerald-200 bg-emerald-50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-emerald-700",children:"Recommended"}):null}function Co(e){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:e&&(0,a.jsx)(He,{size:14})})}function ae(){M({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{et as a,Ke as c,Ka as i,Ue as l,nt as n,Ze as o,ot as r,Je as s,io as t,$e as u};
|
|
1
|
+
import{s as ze}from"./chunk-LvLJmgfZ.js";import{d as L,l as rt,p as dt,u as I}from"./useEvent-D91BmmQi.js";import{t as ct}from"./react-Bj1aDYRI.js";import{An as ht,Cr as pt,D as We,E as mt,Mn as ut,Nn as ft,On as bt,Or as yt,Qt as kt,Tn as wt,Ui as be,_ as xt,br as gt,ct as jt,dt as Me,h as Ae,kn as vt,lt as Ct,ni as zt,t as Wt,vr as Mt,yr as Se}from"./cells-BidbgSuB.js";import{t as z}from"./compiler-runtime-B3qBwwSJ.js";import{n as At,r as St,x as _t}from"./ai-model-dropdown-BW60s6ul.js";import{_ as H,d as _e}from"./useEventListener-BakX-tnw.js";import{r as Dt,x as Nt}from"./utils-Dev6I_Kv.js";import{n as W,t as De}from"./constants-B9JJ72XE.js";import{T as X,v as Pt,w as It}from"./config-BE150fVL.js";import{t as Et}from"./jsx-runtime-PbYoItBR.js";import{o as Tt}from"./alert-dialog-CC0gG4Av.js";import{a as Lt,c as Ht,i as Ot,n as Rt,r as qt,s as Ft,t as Bt}from"./select-Cjly7tmx.js";import{Nt as Vt}from"./JsonOutput-CxKHBYIA.js";import{c as Ne,d as ye,n as Yt,o as $t,r as ke,t as Ut}from"./download-DgEarSps.js";import{t as Kt}from"./tooltip-CgQpRVyN.js";import{r as Gt,t as we}from"./button-BF7GSjhW.js";import{i as Jt,t as Pe}from"./strings-DvZlHYnD.js";import{r as O}from"./requests-KshNNAOp.js";import{t as m}from"./createLucideIcon-BTp1tQDO.js";import{F as Qt,I as Xt,L as Ie,P as Zt,a as Ee,i as Te,u as Le}from"./layout-CVg460UU.js";import{t as He}from"./check-DQmqoJgr.js";import{r as ea}from"./useCellActionButton-DNYd1sgZ.js";import{t as ta}from"./code-DP40S9ln.js";import{t as aa}from"./copy-IBNGDypD.js";import{t as Oe}from"./eye-off-DI0EQXw0.js";import{t as oa}from"./external-link-BktyywYg.js";import{t as Z}from"./file-BvoBtS_V.js";import{u as na}from"./form-DgnBiuvP.js";import{n as ia,r as sa,t as la}from"./youtube-NfBeYlaL.js";import{i as ra,n as Re}from"./add-connection-dialog-CZ2UuO8f.js";import{t as da}from"./house-DkdBWh44.js";import{t as ca}from"./image-jhXeQEgs.js";import{t as ha}from"./link-My4Pey3q.js";import{r as pa}from"./input-b2KTOk0X.js";import{t as ma}from"./settings-Cn43l_vx.js";import{t as ua}from"./sparkles-DctOjjEz.js";import{y as fa}from"./textarea-Dz09niIv.js";import{t as ba}from"./square-DPWHdF_-.js";import{t as M}from"./use-toast-BH8bU9Xf.js";import{n as qe,t as ya}from"./paths-kNeJ8nbe.js";import{o as ka}from"./session-B6_8umQX.js";import{n as ee}from"./copy-CyasABTK.js";import{r as wa}from"./useRunCells-DFXV3Rm5.js";import{a as xa,c as ga,i as ja,n as va,r as Ca}from"./dialog-Dr_Y1zNi.js";import{n as xe}from"./ImperativeModal-MQnbMIO2.js";import{r as za,t as Fe}from"./share-vrPro738.js";import{a as Wa}from"./cell-link-BWqpbaiv.js";import{a as Ma}from"./renderShortcut-CKbqJyj4.js";import{t as Aa}from"./icons-D3YFXNmD.js";import{t as Sa}from"./pair-with-agent-modal-BONZmBdh.js";import{t as _a}from"./github-BQ8If5nZ.js";import{n as Be}from"./marimo-icons-CbdeMmbB.js";import{t as Da}from"./links-BL4SaTJe.js";import{r as Na,t as Ve}from"./hooks-dPm1h9aq.js";import{t as Ye}from"./types-a-yURniQ.js";var Pa=m("circle-chevron-down",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 10-4 4-4-4",key:"894hmk"}]]),Ia=m("circle-chevron-right",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m10 8 4 4-4 4",key:"1wy4r4"}]]),$e=m("clipboard-copy",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2",key:"4jdomd"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v4",key:"3hqy98"}],["path",{d:"M21 14H11",key:"1bme5i"}],["path",{d:"m15 10-4 4 4 4",key:"5dvupr"}]]),Ue=m("command",[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]]),Ke=m("diamond-plus",[["path",{d:"M12 8v8",key:"napkw2"}],["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41L13.7 2.71a2.41 2.41 0 0 0-3.41 0z",key:"1ey20j"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),Ea=m("fast-forward",[["path",{d:"M12 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 12 18z",key:"b19h5q"}],["path",{d:"M2 6a2 2 0 0 1 3.414-1.414l6 6a2 2 0 0 1 0 2.828l-6 6A2 2 0 0 1 2 18z",key:"h7h5ge"}]]),Ta=m("files",[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]]),La=m("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]),Ha=m("notebook",[["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",key:"1nb95v"}],["path",{d:"M16 2v20",key:"rotuqe"}]]),Oa=m("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]),Ge=m("presentation",[["path",{d:"M2 3h20",key:"91anmk"}],["path",{d:"M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3",key:"2k9sn8"}],["path",{d:"m7 21 5-5 5 5",key:"bip4we"}]]),Ra=m("share-2",[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]]),qa=m("square-power",[["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M7.998 9.003a5 5 0 1 0 8-.005",key:"1pek45"}],["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}]]),Je=m("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]),Qe=z(),Xe=ze(ct(),1),a=ze(Et(),1),te="https://static.marimo.app";const Fa=e=>{let t=(0,Qe.c)(25),{onClose:n}=e,[o,i]=(0,Xe.useState)(""),{exportAsHTML:d}=O(),l=`${o}-${Math.random().toString(36).slice(2,6)}`,s=`${te}/static/${l}`,r;t[0]!==d||t[1]!==n||t[2]!==l?(r=async v=>{v.preventDefault(),n();let T=await d({download:!1,includeCode:!0,files:Zt.INSTANCE.filenames()}),A=M({title:"Uploading static notebook...",description:"Please wait."});await fetch(`${te}/api/static`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({html:T,path:l})}).catch(()=>{A.dismiss(),M({title:"Error uploading static page",description:(0,a.jsxs)("div",{children:["Please try again later. If the problem persists, please file a bug report on"," ",(0,a.jsx)("a",{href:W.issuesPage,target:"_blank",className:"underline",children:"GitHub"}),"."]})})}),A.dismiss(),M({title:"Static page uploaded!",description:(0,a.jsxs)("div",{children:["The URL has been copied to your clipboard.",(0,a.jsx)("br",{}),"You can share it with anyone."]})})},t[0]=d,t[1]=n,t[2]=l,t[3]=r):r=t[3];let h;t[4]===Symbol.for("react.memo_cache_sentinel")?(h=(0,a.jsx)(ga,{children:"Share static notebook"}),t[4]=h):h=t[4];let p;t[5]===Symbol.for("react.memo_cache_sentinel")?(p=(0,a.jsxs)(xa,{children:[h,(0,a.jsxs)(Ca,{children:["You can publish a static, non-interactive version of this notebook to the public web. We will create a link for you that lives on"," ",(0,a.jsx)("a",{href:te,target:"_blank",children:te}),"."]})]}),t[5]=p):p=t[5];let g;t[6]===Symbol.for("react.memo_cache_sentinel")?(g=v=>{i(v.target.value.toLowerCase().replaceAll(/\s/g,"-").replaceAll(/[^\da-z-]/g,""))},t[6]=g):g=t[6];let f;t[7]===o?f=t[8]:(f=(0,a.jsx)(pa,{"data-testid":"slug-input",id:"slug",autoFocus:!0,value:o,placeholder:"Notebook slug",onChange:g,required:!0,autoComplete:"off"}),t[7]=o,t[8]=f);let b;t[9]===s?b=t[10]:(b=(0,a.jsxs)("div",{className:"font-semibold text-sm text-muted-foreground gap-2 flex flex-col",children:["Anyone will be able to access your notebook at this URL:",(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(Ba,{text:s}),(0,a.jsx)("span",{className:"text-primary",children:s})]})]}),t[9]=s,t[10]=b);let y;t[11]!==f||t[12]!==b?(y=(0,a.jsxs)("div",{className:"flex flex-col gap-6 py-4",children:[f,b]}),t[11]=f,t[12]=b,t[13]=y):y=t[13];let k;t[14]===n?k=t[15]:(k=(0,a.jsx)(we,{"data-testid":"cancel-share-static-notebook-button",variant:"secondary",onClick:n,children:"Cancel"}),t[14]=n,t[15]=k);let w;t[16]===s?w=t[17]:(w=(0,a.jsx)(we,{"data-testid":"share-static-notebook-button","aria-label":"Save",variant:"default",type:"submit",onClick:async()=>{await ee(s)},children:"Create"}),t[16]=s,t[17]=w);let x;t[18]!==k||t[19]!==w?(x=(0,a.jsxs)(ja,{children:[k,w]}),t[18]=k,t[19]=w,t[20]=x):x=t[20];let j;return t[21]!==r||t[22]!==x||t[23]!==y?(j=(0,a.jsx)(va,{className:"w-fit",children:(0,a.jsxs)("form",{onSubmit:r,children:[p,y,x]})}),t[21]=r,t[22]=x,t[23]=y,t[24]=j):j=t[24],j};var Ba=e=>{let t=(0,Qe.c)(8),[n,o]=Xe.useState(!1),i;t[0]===e.text?i=t[1]:(i=Gt.stopPropagation(async h=>{h.preventDefault(),await ee(e.text),o(!0),setTimeout(()=>o(!1),2e3)}),t[0]=e.text,t[1]=i);let d=i,l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=(0,a.jsx)(aa,{size:14,strokeWidth:1.5}),t[2]=l):l=t[2];let s;t[3]===d?s=t[4]:(s=(0,a.jsx)(we,{"data-testid":"copy-static-notebook-url-button",onClick:d,size:"xs",variant:"secondary",children:l}),t[3]=d,t[4]=s);let r;return t[5]!==n||t[6]!==s?(r=(0,a.jsx)(Kt,{content:"Copied!",open:n,children:s}),t[5]=n,t[6]=s,t[7]=r):r=t[7],r},Va=z();function Ya(){let e=document.getElementsByClassName(De.outputArea);for(let t of e){let n=t.getBoundingClientRect();if(n.bottom>0&&n.top<window.innerHeight){let o=be.findElement(t);if(!o){H.warn("Could not find HTMLCellId for visible output area",t);continue}return{cellId:be.parse(o.id)}}}return H.warn("No visible output area found for scroll anchor"),null}function $a(e){if(!e){H.warn("No scroll anchor provided to restore scroll position");return}let t=document.getElementById(be.create(e.cellId));if(!t){H.warn("Could not find cell element to restore scroll position",e.cellId);return}if(!t.querySelector(`.${De.outputArea}`)){H.warn("Could not find output area to restore scroll position",e.cellId);return}t.scrollIntoView({block:"start",behavior:"auto"})}function Ze(){let e=(0,Va.c)(2),t=L(Me),n;return e[0]===t?n=e[1]:(n=()=>{let o=Ya();t(i=>({mode:Ct(i.mode),cellAnchor:(o==null?void 0:o.cellId)??null})),requestAnimationFrame(()=>{requestAnimationFrame(()=>{$a(o)})})},e[0]=t,e[1]=n),n}const et=dt(!1);var Ua=z();const Ka=()=>{let e=(0,Ua.c)(7),{selectedLayout:t}=Ee(),{setLayoutView:n}=Te();if(X()&&!ft("wasm_layouts"))return null;let o;e[0]===n?o=e[1]:(o=s=>n(s),e[0]=n,e[1]=o);let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(Ft,{className:"min-w-[110px] border-border bg-background","data-testid":"layout-select",children:(0,a.jsx)(Ht,{placeholder:"Select a view"})}),e[2]=i):i=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=(0,a.jsx)(Rt,{children:(0,a.jsxs)(qt,{children:[(0,a.jsx)(Lt,{children:"View as"}),Ye.map(Ja)]})}),e[3]=d):d=e[3];let l;return e[4]!==t||e[5]!==o?(l=(0,a.jsxs)(Bt,{"data-testid":"layout-select",value:t,onValueChange:o,children:[i,d]}),e[4]=t,e[5]=o,e[6]=l):l=e[6],l};function Ga(e){return(0,a.jsx)(tt(e),{className:"h-4 w-4"})}function tt(e){switch(e){case"vertical":return La;case"grid":return sa;case"slides":return Ge;default:return Jt(e),ba}}function at(e){return Pe.startCase(e)}function Ja(e){return(0,a.jsx)(Ot,{value:e,children:(0,a.jsxs)("div",{className:"flex items-center gap-1.5 leading-5",children:[Ga(e),(0,a.jsx)("span",{children:at(e)})]})},e)}async function Qa(e){let{filename:t,preset:n,downloadPDF:o}=e;await o({filename:t,webpdf:!1,preset:n,includeInputs:!0,rasterServer:"static"})}var Xa=z();function Za(e){let t=(0,Xa.c)(5),{openPrompt:n,closeModal:o}=xe(),{sendCopy:i}=O(),d;return t[0]!==o||t[1]!==n||t[2]!==i||t[3]!==e?(d=()=>{if(!e)return null;let l=ya.guessDeliminator(e);n({title:"Copy notebook",description:"Enter a new filename for the notebook copy.",defaultValue:`_${qe.basename(e)}`,confirmText:"Copy notebook",spellCheck:!1,onConfirm:s=>{let r=l.join(qe.dirname(e),s);i({source:e,destination:r}).then(()=>{o(),M({title:"Notebook copied",description:"A copy of the notebook has been created."}),Da(r)})}})},t[0]=o,t[1]=n,t[2]=i,t[3]=e,t[4]=d):d=t[4],d}var eo=z();function ot(){let e=(0,eo.c)(4),{openConfirm:t}=xe(),n=L(Pt),{sendRestart:o}=O(),i;return e[0]!==t||e[1]!==o||e[2]!==n?(i=()=>{t({title:"Restart Kernel",description:"This will restart the Python kernel. You'll lose all data that's in memory. You will also lose any unsaved changes, so make sure to save your work before restarting.",variant:"destructive",confirmAction:(0,a.jsx)(Tt,{onClick:async()=>{n({state:It.CLOSING}),await o(),za()},"aria-label":"Confirm Restart",children:"Restart"})})},e[0]=t,e[1]=o,e[2]=n,e[3]=i):i=e[3],i}var to=z(),ao=new kt,oo=e=>ao.isSupported(e)?"markdown":"code";const nt=()=>{let e=(0,to.c)(3),{updateCellConfig:t}=We(),{saveCellConfig:n}=O(),o;return e[0]!==n||e[1]!==t?(o=async(i,d)=>{let l=Ae(),s={};for(let h of l.cellIds.inOrderIds){let p=l.cellData[h];p===void 0||p.config.hide_code===i||oo(p.code)===d&&(s[h]={hide_code:i})}let r=_e.entries(s);if(r.length!==0){await n({configs:s});for(let[h,p]of r)t({cellId:h,config:p})}},e[0]=n,e[1]=t,e[2]=o):o=e[2],o};var no=z(),E=e=>{e==null||e.preventDefault(),e==null||e.stopPropagation()};function io(){var je,ve,Ce;let e=(0,no.c)(56),t=Wa(),{openModal:n,closeModal:o}=xe(),{toggleApplication:i}=bt(),{selectedPanel:d}=vt(),[l]=rt(Me),s=I(jt),r=nt(),[h]=Nt(),p=I(wt),g=I(Dt),{updateCellConfig:f,undoDeleteCell:b,clearAllCellOutputs:y,addSetupCellIfDoesntExist:k,collapseAllCells:w,expandAllCells:x}=We(),j=ot(),v=wa(),T=Za(t),A=L(et),oe=L(At),{handleClick:ne}=St(),ie=L(_t),{exportAsIPYNB:se,exportAsMarkdown:le,readCode:S,saveCellConfig:re,updateCellOutputs:_}=O(),D=Na(),de=I(xt),ce=I(Wt),he=I(mt),{selectedLayout:R}=Ee(),{setLayoutView:pe}=Te(),q=Ze(),F=((je=h.sharing)==null?void 0:je.html)??!0,B=((ve=h.sharing)==null?void 0:ve.wasm)??!0,V=((Ce=h.sharing)==null?void 0:Ce.molab)??!0,ge=!X(),me=R==="slides",it=Co,st=vo,Y;e[0]!==t||e[1]!==D||e[2]!==_?(Y=async c=>{let{preset:u,title:C}=c;if(!t){ae();return}await Ne(C,async fe=>{await Ve({takeScreenshots:()=>D({progress:fe}),updateCellOutputs:_}),await Qa({filename:t,preset:u,downloadPDF:Yt})})},e[0]=t,e[1]=D,e[2]=_,e[3]=Y):Y=e[3];let N=Y,$;e[4]===N?$=e[5]:($=async()=>{if(ge){await N({preset:"document",title:"Downloading Document PDF..."});return}let c=new Event("export-beforeprint"),u=new Event("export-afterprint");window.dispatchEvent(c),setTimeout(jo,0),setTimeout(()=>window.dispatchEvent(u),0)},e[4]=N,e[5]=$);let U=$,K;e[6]!==se||e[7]!==t||e[8]!==D||e[9]!==_?(K=async()=>{if(!t){ae();return}await Ne("Downloading IPYNB...",async c=>{await Ve({takeScreenshots:()=>D({progress:c}),updateCellOutputs:_});let u=await se({download:!1});ke(new Blob([u],{type:"application/x-ipynb+json"}),ye.toIPYNB(document.title))})},e[6]=se,e[7]=t,e[8]=D,e[9]=_,e[10]=K):K=e[10];let ue=K,G;e[11]===Symbol.for("react.memo_cache_sentinel")?(G=(0,a.jsx)(Vt,{size:14,strokeWidth:1.5}),e[11]=G):G=e[11];let J;e[12]===Symbol.for("react.memo_cache_sentinel")?(J=(0,a.jsx)(Ie,{size:14,strokeWidth:1.5}),e[12]=J):J=e[12];let P;e[13]===t?P=e[14]:(P=async()=>{if(!t){ae();return}await Le({filename:t,includeCode:!0})},e[13]=t,e[14]=P);let Q;return e[15]!==k||e[16]!==g||e[17]!==ce||e[18]!==p||e[19]!==y||e[20]!==o||e[21]!==w||e[22]!==T||e[23]!==N||e[24]!==x||e[25]!==le||e[26]!==t||e[27]!==U||e[28]!==ue||e[29]!==de||e[30]!==me||e[31]!==s||e[32]!==n||e[33]!==ne||e[34]!==S||e[35]!==j||e[36]!==v||e[37]!==re||e[38]!==R||e[39]!==d||e[40]!==r||e[41]!==A||e[42]!==ie||e[43]!==pe||e[44]!==oe||e[45]!==F||e[46]!==V||e[47]!==B||e[48]!==P||e[49]!==i||e[50]!==q||e[51]!==b||e[52]!==he||e[53]!==f||e[54]!==l.mode?(Q=[{icon:G,label:"Download",handle:E,dropdown:[{icon:J,label:"Download as HTML",handle:P},{icon:(0,a.jsx)(Ie,{size:14,strokeWidth:1.5}),label:"Download as HTML (exclude code)",handle:async()=>{if(!t){ae();return}await Le({filename:t,includeCode:!1})}},{icon:(0,a.jsx)(Aa,{strokeWidth:1.5,style:{width:14,height:14}}),label:"Download as Markdown",handle:async()=>{let c=await le({download:!1});ke(new Blob([c],{type:"text/plain"}),ye.toMarkdown(document.title))}},{icon:(0,a.jsx)(Ha,{size:14,strokeWidth:1.5}),label:"Download as ipynb",handle:ue},{icon:(0,a.jsx)(ta,{size:14,strokeWidth:1.5}),label:"Download Python code",handle:async()=>{let c=await S();ke(new Blob([c.contents],{type:"text/plain"}),ye.toPY(document.title))}},{divider:!0,icon:(0,a.jsx)(ca,{size:14,strokeWidth:1.5}),label:"Download as PNG",disabled:l.mode!=="present",tooltip:l.mode==="present"?void 0:(0,a.jsxs)("span",{children:["Only available in app view. ",(0,a.jsx)("br",{}),"Toggle with: ",Ma("global.hideCode",!1)]}),handle:go},me?{divider:!0,icon:(0,a.jsx)(Z,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:E,dropdown:[{icon:(0,a.jsx)(Z,{size:14,strokeWidth:1.5}),label:"Document Layout",handle:U},{icon:(0,a.jsx)(Z,{size:14,strokeWidth:1.5}),label:"Slides Layout",rightElement:st(!0),hidden:!ge,handle:async()=>{await N({preset:"slides",title:"Downloading Slides PDF..."})}}]}:{divider:!0,icon:(0,a.jsx)(Z,{size:14,strokeWidth:1.5}),label:"Download as PDF",handle:U}]},{icon:(0,a.jsx)(ua,{size:14,strokeWidth:1.5}),label:"Pair with an agent",hidden:X(),handle:async()=>{n((0,a.jsx)(Sa,{onClose:o}))}},{icon:(0,a.jsx)(Ra,{size:14,strokeWidth:1.5}),label:"Share",handle:E,hidden:!F&&!B&&!V,dropdown:[{icon:(0,a.jsx)(na,{size:14,strokeWidth:1.5}),label:"Publish HTML to web",hidden:!F,handle:async()=>{n((0,a.jsx)(Fa,{onClose:o}))}},{icon:(0,a.jsx)(ha,{size:14,strokeWidth:1.5}),label:"Create WebAssembly link",hidden:!B,handle:async()=>{await ee(Fe({code:(await S()).contents})),M({title:"Copied",description:"Link copied to clipboard."})}},{icon:(0,a.jsx)(Be,{size:14,strokeWidth:1.5}),label:"Create molab notebook",hidden:!V,handle:async()=>{let c=Fe({code:(await S()).contents,baseUrl:`${W.molab}/new`});window.open(c,"_blank")}}]},{icon:(0,a.jsx)(Oa,{size:14,strokeWidth:1.5}),label:"Helper panel",redundant:!0,handle:E,dropdown:ht.flatMap(c=>{let u=c.type==="ai"&&!g;if(ut({panel:c,capabilities:p,aiEnabled:g})&&!u)return[];let{type:C,Icon:fe,additionalKeywords:lt}=c;return{label:Pe.startCase(C),rightElement:it(d===C),icon:(0,a.jsx)(fe,{size:14,strokeWidth:1.5}),handle:()=>{if(u){ne("ai","ai-features");return}i(C)},additionalKeywords:lt}})},{icon:(0,a.jsx)(Ge,{size:14,strokeWidth:1.5}),label:"Present as",handle:E,dropdown:[{icon:l.mode==="present"?(0,a.jsx)(fa,{size:14,strokeWidth:1.5}):(0,a.jsx)(Qt,{size:14,strokeWidth:1.5}),label:"Toggle app view",hotkey:"global.hideCode",handle:()=>{q()}},...Ye.map((c,u)=>{let C=tt(c);return{divider:u===0,label:at(c),icon:(0,a.jsx)(C,{size:14,strokeWidth:1.5}),rightElement:(0,a.jsx)("div",{className:"w-8 flex justify-end",children:R===c&&(0,a.jsx)(He,{size:14})}),handle:()=>{pe(c),l.mode==="edit"&&q()}}})]},{icon:(0,a.jsx)(Ta,{size:14,strokeWidth:1.5}),label:"Duplicate notebook",hidden:!t||X(),handle:T},{icon:(0,a.jsx)($e,{size:14,strokeWidth:1.5}),label:"Copy code to clipboard",hidden:!t,handle:async()=>{await ee((await S()).contents),M({title:"Copied",description:"Code copied to clipboard."})}},{icon:(0,a.jsx)(ea,{size:14,strokeWidth:1.5}),label:"Enable all cells",hidden:!de||s,handle:async()=>{let c=zt(Ae());await re({configs:_e.fromEntries(c.map(xo))});for(let u of c)f({cellId:u,config:{disabled:!1}})}},{divider:!0,icon:(0,a.jsx)(Ke,{size:14,strokeWidth:1.5}),label:"Add setup cell",handle:()=>{k({})}},{icon:(0,a.jsx)(gt,{size:14,strokeWidth:1.5}),label:"Add database connection",handle:()=>{n((0,a.jsx)(Re,{onClose:o}))}},{icon:(0,a.jsx)(ra,{size:14,strokeWidth:1.5}),label:"Add remote storage",handle:()=>{n((0,a.jsx)(Re,{defaultTab:"storage",onClose:o}))}},{icon:(0,a.jsx)(Je,{size:14,strokeWidth:1.5}),label:he,hidden:!ce||s,handle:()=>{b()}},{icon:(0,a.jsx)(qa,{size:14,strokeWidth:1.5}),label:"Restart kernel",variant:"danger",handle:j,additionalKeywords:["reset","reload","restart"]},{icon:(0,a.jsx)(Ea,{size:14,strokeWidth:1.5}),label:"Re-run all cells",redundant:!0,hotkey:"global.runAll",handle:async()=>{v()}},{icon:(0,a.jsx)(pt,{size:14,strokeWidth:1.5}),label:"Clear all outputs",redundant:!0,handle:()=>{y()}},{icon:(0,a.jsx)(Se,{size:14,strokeWidth:1.5}),label:"Show all code",hotkey:"global.showAllCode",handle:()=>r(!1,"code"),redundant:!0},{icon:(0,a.jsx)(Oe,{size:14,strokeWidth:1.5}),label:"Hide all code",hotkey:"global.hideAllCode",handle:()=>r(!0,"code"),redundant:!0},{icon:(0,a.jsx)(Se,{size:14,strokeWidth:1.5}),label:"Show all markdown code",hotkey:"global.showAllMarkdownCode",handle:()=>r(!1,"markdown"),redundant:!0},{icon:(0,a.jsx)(Oe,{size:14,strokeWidth:1.5}),label:"Hide all markdown code",hotkey:"global.hideAllMarkdownCode",handle:()=>r(!0,"markdown"),redundant:!0},{icon:(0,a.jsx)(Ia,{size:14,strokeWidth:1.5}),label:"Collapse all sections",hotkey:"global.collapseAllSections",handle:w,redundant:!0},{icon:(0,a.jsx)(Pa,{size:14,strokeWidth:1.5}),label:"Expand all sections",hotkey:"global.expandAllSections",handle:x,redundant:!0},{divider:!0,icon:(0,a.jsx)(Ue,{size:14,strokeWidth:1.5}),label:"Command palette",hotkey:"global.commandPalette",handle:()=>A(wo)},{icon:(0,a.jsx)(Xt,{size:14,strokeWidth:1.5}),label:"Keyboard shortcuts",hotkey:"global.showHelp",handle:()=>ie(ko)},{icon:(0,a.jsx)(ma,{size:14,strokeWidth:1.5}),label:"User settings",handle:()=>oe(yo),redundant:!0,additionalKeywords:["preferences","options","configuration"]},{icon:(0,a.jsx)(oa,{size:14,strokeWidth:1.5}),label:"Resources",handle:E,dropdown:[{icon:(0,a.jsx)(yt,{size:14,strokeWidth:1.5}),label:"Documentation",handle:bo},{icon:(0,a.jsx)(_a,{className:"h-3.5 w-3.5"}),label:"GitHub",handle:fo},{icon:(0,a.jsx)(ia,{size:14,strokeWidth:1.5}),label:"Discord Community",handle:uo},{icon:(0,a.jsx)(la,{className:"h-3.5 w-3.5"}),label:"YouTube",handle:mo},{icon:(0,a.jsx)(Mt,{size:14,strokeWidth:1.5}),label:"Changelog",handle:po}]},{divider:!0,icon:(0,a.jsx)(da,{size:14,strokeWidth:1.5}),label:"Return home",hidden:!location.search.includes("file"),handle:ho},{icon:(0,a.jsx)(Be,{size:14,strokeWidth:1.5}),label:"New notebook",hidden:!location.search.includes("file"),handle:co}].filter(ro).map(so),e[15]=k,e[16]=g,e[17]=ce,e[18]=p,e[19]=y,e[20]=o,e[21]=w,e[22]=T,e[23]=N,e[24]=x,e[25]=le,e[26]=t,e[27]=U,e[28]=ue,e[29]=de,e[30]=me,e[31]=s,e[32]=n,e[33]=ne,e[34]=S,e[35]=j,e[36]=v,e[37]=re,e[38]=R,e[39]=d,e[40]=r,e[41]=A,e[42]=ie,e[43]=pe,e[44]=oe,e[45]=F,e[46]=V,e[47]=B,e[48]=P,e[49]=i,e[50]=q,e[51]=b,e[52]=he,e[53]=f,e[54]=l.mode,e[55]=Q):Q=e[55],Q}function so(e){return e.dropdown?{...e,dropdown:e.dropdown.filter(lo)}:e}function lo(e){return!e.hidden}function ro(e){return!e.hidden}function co(){let e=ka();window.open(e,"_blank")}function ho(){let e=document.baseURI.split("?")[0];window.open(e,"_self")}function po(){window.open(W.releasesPage,"_blank")}function mo(){window.open(W.youtube,"_blank")}function uo(){window.open(W.discordLink,"_blank")}function fo(){window.open(W.githubPage,"_blank")}function bo(){window.open(W.docsPage,"_blank")}function yo(e){return!e}function ko(e){return!e}function wo(e){return!e}function xo(e){return[e,{disabled:!1}]}async function go(){let e=document.getElementById("App");e&&await $t({element:e,filename:document.title,prepare:Ut})}function jo(){return window.print()}function vo(e){return e?(0,a.jsx)("span",{className:"ml-3 shrink-0 rounded-full border border-emerald-200 bg-emerald-50 px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-emerald-700",children:"Recommended"}):null}function Co(e){return(0,a.jsx)("div",{className:"w-8 flex justify-end",children:e&&(0,a.jsx)(He,{size:14})})}function ae(){M({title:"Error",description:"Notebooks must be named to be exported.",variant:"danger"})}export{et as a,Ke as c,Ka as i,Ue as l,nt as n,Ze as o,ot as r,Je as s,io as t,$e as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as h}from"./chunk-LvLJmgfZ.js";import{t as c}from"./react-Bj1aDYRI.js";import{t as y}from"./context-
|
|
1
|
+
import{s as h}from"./chunk-LvLJmgfZ.js";import{t as c}from"./react-Bj1aDYRI.js";import{t as y}from"./context-DE_5rdOV.js";var l=new Map,m=!1;try{m=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}var u=!1;try{u=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}var p={degree:{narrow:{default:"\xB0","ja-JP":" \u5EA6","zh-TW":"\u5EA6","sl-SI":" \xB0"}}},f=class{format(t){var e;let r="";if(r=!m&&this.options.signDisplay!=null?b(this.numberFormatter,this.options.signDisplay,t):this.numberFormatter.format(t),this.options.style==="unit"&&!u){let{unit:s,unitDisplay:i="short",locale:a}=this.resolvedOptions();if(!s)return r;let o=(e=p[s])==null?void 0:e[i];r+=o[a]||o.default}return r}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,r){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,r);if(r<t)throw RangeError("End date must be >= start date");return`${this.format(t)} \u2013 ${this.format(r)}`}formatRangeToParts(t,r){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,r);if(r<t)throw RangeError("End date must be >= start date");let e=this.numberFormatter.formatToParts(t),s=this.numberFormatter.formatToParts(r);return[...e.map(i=>({...i,source:"startRange"})),{type:"literal",value:" \u2013 ",source:"shared"},...s.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!m&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!u&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,r={}){this.numberFormatter=d(t,r),this.options=r}};function d(t,r={}){var a;let{numberingSystem:e}=r;if(e&&t.includes("-nu-")&&(t.includes("-u-")||(t+="-u-"),t+=`-nu-${e}`),r.style==="unit"&&!u){let{unit:o,unitDisplay:n="short"}=r;if(!o)throw Error('unit option must be provided with style: "unit"');if(!((a=p[o])!=null&&a[n]))throw Error(`Unsupported unit ${o} with unitDisplay = ${n}`);r={...r,style:"decimal"}}let s=t+(r?Object.entries(r).sort((o,n)=>o[0]<n[0]?-1:1).join():"");if(l.has(s))return l.get(s);let i=new Intl.NumberFormat(t,r);return l.set(s,i),i}function b(t,r,e){if(r==="auto")return t.format(e);if(r==="never")return t.format(Math.abs(e));{let s=!1;if(r==="always"?s=e>0||Object.is(e,0):r==="exceptZero"&&(Object.is(e,-0)||Object.is(e,0)?e=Math.abs(e):s=e>0),s){let i=t.format(-e),a=t.format(e),o=i.replace(a,"").replace(/\u200e|\u061C/,"");return[...o].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),i.replace(a,"!!!").replace(o,"+").replace("!!!",a)}else return t.format(e)}}var g=h(c(),1);function D(t={}){let{locale:r}=y();return(0,g.useMemo)(()=>new f(r,t),[r,t])}export{f as n,D as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as tt}from"./chunk-LvLJmgfZ.js";import{t as nt}from"./react-Bj1aDYRI.js";import{t as rt}from"./react-dom-CSu739Rf.js";import{n as it}from"./clsx-BtEcuwwV.js";import{n as ot}from"./SSRProvider-DX2edArU.js";var d=tt(nt(),1),T=typeof document<"u"?d.useLayoutEffect:()=>{};function at(e){let[t,n]=(0,d.useState)(e),a=(0,d.useRef)(t),i=(0,d.useRef)(null),s=(0,d.useRef)(()=>{if(!i.current)return;let l=i.current.next();if(l.done){i.current=null;return}a.current===l.value?s.current():n(l.value)});return T(()=>{a.current=t,i.current&&s.current()}),[t,(0,d.useCallback)(l=>{i.current=l(a.current),s.current()},[s])]}var st=!!(typeof window<"u"&&window.document&&window.document.createElement),x=new Map,G;typeof FinalizationRegistry<"u"&&(G=new FinalizationRegistry(e=>{x.delete(e)}));function Se(e){let[t,n]=(0,d.useState)(e),a=(0,d.useRef)(null),i=ot(t),s=(0,d.useRef)(null);if(G&&G.register(s,i),st){let l=x.get(i);l&&!l.includes(a)?l.push(a):x.set(i,[a])}return T(()=>{let l=i;return()=>{G&&G.unregister(s),x.delete(l)}},[i]),(0,d.useEffect)(()=>{let l=a.current;return l&&n(l),()=>{l&&(a.current=null)}}),i}function lt(e,t){if(e===t)return e;let n=x.get(e);if(n)return n.forEach(i=>i.current=t),t;let a=x.get(t);return a?(a.forEach(i=>i.current=e),e):t}function ut(e=[]){let t=Se(),[n,a]=at(t),i=(0,d.useCallback)(()=>{a(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,a]);return T(i,[t,i,...e]),n}function te(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}var h=e=>(e==null?void 0:e.ownerDocument)??document,O=e=>e&&"window"in e&&e.window===e?e:h(e).defaultView||window;function ct(e){return typeof e=="object"&&!!e&&"nodeType"in e&&typeof e.nodeType=="number"}function dt(e){return ct(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var ft=!1;function W(){return ft}function E(e,t){if(!W())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName==="SLOT"&&n.assignedSlot?n.assignedSlot.parentNode:dt(n)?n.host:n.parentNode}return!1}var ne=(e=document)=>{var n;if(!W())return e.activeElement;let t=e.activeElement;for(;t&&"shadowRoot"in t&&((n=t.shadowRoot)!=null&&n.activeElement);)t=t.shadowRoot.activeElement;return t};function g(e){if(W()&&e.target instanceof Element&&e.target.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function pt(e){if(!e)return!1;let t=e.getRootNode(),n=O(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let a=t.activeElement;return a!=null&&e.contains(a)}function Le(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1,a=e.map(i=>{let s=Ce(i,t);return n||(n=typeof s=="function"),s});if(n)return()=>{a.forEach((i,s)=>{typeof i=="function"?i():Ce(e[s],null)})}}}function Ce(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function re(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let a=e[n];for(let i in a){let s=t[i],l=a[i];typeof s=="function"&&typeof l=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=te(s,l):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?t[i]=it(s,l):i==="id"&&s&&l?t.id=lt(s,l):i==="ref"&&s&&l?t.ref=Le(s,l):t[i]=l===void 0?s:l}}return t}function j(e){if(gt())e.focus({preventScroll:!0});else{let t=yt(e);e.focus(),vt(t)}}var Y=null;function gt(){if(Y==null){Y=!1;try{document.createElement("div").focus({get preventScroll(){return Y=!0,!0}})}catch{}}return Y}function yt(e){let t=e.parentNode,n=[],a=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==a;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return a instanceof HTMLElement&&n.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),n}function vt(e){for(let{element:t,scrollTop:n,scrollLeft:a}of e)t.scrollTop=n,t.scrollLeft=a}function _(e){var n;if(typeof window>"u"||window.navigator==null)return!1;let t=(n=window.navigator.userAgentData)==null?void 0:n.brands;return Array.isArray(t)&&t.some(a=>e.test(a.brand))||e.test(window.navigator.userAgent)}function ie(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function w(e){let t=null;return()=>(t??(t=e()),t)}var F=w(function(){return ie(/^Mac/i)}),Ae=w(function(){return ie(/^iPhone/i)}),oe=w(function(){return ie(/^iPad/i)||F()&&navigator.maxTouchPoints>1}),X=w(function(){return Ae()||oe()}),mt=w(function(){return F()||X()}),Me=w(function(){return _(/AppleWebKit/i)&&!Ke()}),Ke=w(function(){return _(/Chrome/i)}),ae=w(function(){return _(/Android/i)}),bt=w(function(){return _(/Firefox/i)}),ht=(0,d.createContext)({isNative:!0,open:Tt,useHref:e=>e});function se(){return(0,d.useContext)(ht)}function L(e,t,n=!0){var v;var a;let{metaKey:i,ctrlKey:s,altKey:l,shiftKey:p}=t;bt()&&(a=window.event)!=null&&((v=a.type)!=null&&v.startsWith("key"))&&e.target==="_blank"&&(F()?i=!0:s=!0);let y=Me()&&F()&&!oe()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:s,altKey:l,shiftKey:p}):new MouseEvent("click",{metaKey:i,ctrlKey:s,altKey:l,shiftKey:p,detail:1,bubbles:!0,cancelable:!0});L.isOpening=n,j(e),e.dispatchEvent(y),L.isOpening=!1}L.isOpening=!1;function Et(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function Tt(e,t){Et(e,n=>L(n,t))}function wt(e){let t=se().useHref(e.href??"");return{"data-href":e.href?t:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}function Pt(e){let t=se().useHref((e==null?void 0:e.href)??"");return{href:e!=null&&e.href?t:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}var k=new Map,le=new Set;function Ie(){if(typeof window>"u")return;function e(a){return"propertyName"in a}let t=a=>{let i=g(a);if(!e(a)||!i)return;let s=k.get(i);s||(s=new Set,k.set(i,s),i.addEventListener("transitioncancel",n,{once:!0})),s.add(a.propertyName)},n=a=>{let i=g(a);if(!e(a)||!i)return;let s=k.get(i);if(s&&(s.delete(a.propertyName),s.size===0&&(i.removeEventListener("transitioncancel",n),k.delete(i)),k.size===0)){for(let l of le)l();le.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ie):Ie());function kt(){for(let[e]of k)"isConnected"in e&&!e.isConnected&&k.delete(e)}function xe(e){requestAnimationFrame(()=>{kt(),k.size===0?e():le.add(e)})}function Oe(){let e=(0,d.useRef)(new Map),t=(0,d.useCallback)((i,s,l,p)=>{let y=p!=null&&p.once?(...v)=>{e.current.delete(l),l(...v)}:l;e.current.set(l,{type:s,eventTarget:i,fn:y,options:p}),i.addEventListener(s,y,p)},[]),n=(0,d.useCallback)((i,s,l,p)=>{var v;let y=((v=e.current.get(l))==null?void 0:v.fn)||l;i.removeEventListener(s,y,p),e.current.delete(l)},[]),a=(0,d.useCallback)(()=>{e.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return(0,d.useEffect)(()=>a,[a]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:a}}var St=d.useInsertionEffect??T;function z(e){let t=(0,d.useRef)(null);return St(()=>{t.current=e},[e]),(0,d.useCallback)((...n)=>{let a=t.current;return a==null?void 0:a(...n)},[])}function Fe(e,t){T(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Ne(e){return e.pointerType===""&&e.isTrusted?!0:ae()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function He(e){return!ae()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var Lt=typeof Element<"u"&&"checkVisibility"in Element.prototype;function Ct(e){let t=O(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:a}=e.style,i=n!=="none"&&a!=="hidden"&&a!=="collapse";if(i){let{getComputedStyle:s}=e.ownerDocument.defaultView,{display:l,visibility:p}=s(e);i=l!=="none"&&p!=="hidden"&&p!=="collapse"}return i}function At(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function ue(e,t){return Lt?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&Ct(e)&&At(e,t)&&(!e.parentElement||ue(e.parentElement,e))}var ce=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],Mt=ce.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ce.push('[tabindex]:not([tabindex="-1"]):not([disabled])');var Kt=ce.join(':not([hidden]):not([tabindex="-1"]),');function Re(e){return e.matches(Mt)&&ue(e)&&!De(e)}function It(e){return e.matches(Kt)&&ue(e)&&!De(e)}function De(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function de(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Ue(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function xt(e){let t=(0,d.useRef)({isFocused:!1,observer:null});return T(()=>{let n=t.current;return()=>{n.observer&&(n.observer=(n.observer.disconnect(),null))}},[]),(0,d.useCallback)(n=>{let a=g(n);if(a instanceof HTMLButtonElement||a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement){t.current.isFocused=!0;let i=a;i.addEventListener("focusout",s=>{if(t.current.isFocused=!1,i.disabled){let l=de(s);e==null||e(l)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)==null||s.disconnect();let l=i===ne()?null:ne();i.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[e])}var fe=!1;function Ot(e){for(;e&&!Re(e);)e=e.parentElement;let t=O(e),n=t.document.activeElement;if(!n||n===e)return;fe=!0;let a=!1,i=m=>{(g(m)===n||a)&&m.stopImmediatePropagation()},s=m=>{(g(m)===n||a)&&(m.stopImmediatePropagation(),!e&&!a&&(a=!0,j(n),y()))},l=m=>{(g(m)===e||a)&&m.stopImmediatePropagation()},p=m=>{(g(m)===e||a)&&(m.stopImmediatePropagation(),a||(a=!0,j(n),y()))};t.addEventListener("blur",i,!0),t.addEventListener("focusout",s,!0),t.addEventListener("focusin",p,!0),t.addEventListener("focus",l,!0);let y=()=>{cancelAnimationFrame(v),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",s,!0),t.removeEventListener("focusin",p,!0),t.removeEventListener("focus",l,!0),fe=!1,a=!1},v=requestAnimationFrame(y);return y}var N="default",pe="",q=new WeakMap;function Ft(e){if(X()){if(N==="default"){let t=h(e);pe=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}N="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";q.set(e,e.style[t]),e.style[t]="none"}}function Ge(e){if(X()){if(N!=="disabled")return;N="restoring",setTimeout(()=>{xe(()=>{if(N==="restoring"){let t=h(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=pe||""),pe="",N="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&q.has(e)){let t=q.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),q.delete(e)}}var ge=d.createContext({register:()=>{}});ge.displayName="PressResponderContext";function Nt(e,t){return t.get?t.get.call(e):t.value}function je(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Ht(e,t){return Nt(e,je(e,t,"get"))}function Rt(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function ze(e,t,n){Rt(e,t),t.set(e,n)}function Dt(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=n}}function Ve(e,t,n){return Dt(e,je(e,t,"set"),n),n}rt();function Ut(e){let t=(0,d.useContext)(ge);if(t){let{register:n,ref:a,...i}=t;e=re(i,e),n()}return Fe(t,e.ref),e}var J=new WeakMap,$=class{continuePropagation(){Ve(this,J,!1)}get shouldStopPropagation(){return Ht(this,J)}constructor(e,t,n,a){var v;ze(this,J,{writable:!0,value:void 0}),Ve(this,J,!0);let i=(v=(a==null?void 0:a.target)??n.currentTarget)==null?void 0:v.getBoundingClientRect(),s,l=0,p,y=null;n.clientX!=null&&n.clientY!=null&&(p=n.clientX,y=n.clientY),i&&(p!=null&&y!=null?(s=p-i.left,l=y-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=l,this.key=n.key}},Be=Symbol("linkClicked"),We="react-aria-pressable-style",Ye="data-react-aria-pressable";function Gt(e){let{onPress:t,onPressChange:n,onPressStart:a,onPressEnd:i,onPressUp:s,onClick:l,isDisabled:p,isPressed:y,preventFocusOnPress:v,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:A,ref:Q,...qe}=Ut(e),[Je,me]=(0,d.useState)(!1),P=(0,d.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:M,removeAllGlobalListeners:H,removeGlobalListener:R}=Oe(),D=(0,d.useCallback)((r,c)=>{let o=P.current;if(p||o.didFirePressStart)return!1;let f=!0;if(o.isTriggeringEvent=!0,a){let u=new $("pressstart",c,r);a(u),f=u.shouldStopPropagation}return n&&n(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,me(!0),f},[p,a,n]),S=(0,d.useCallback)((r,c,o=!0)=>{let f=P.current;if(!f.didFirePressStart)return!1;f.didFirePressStart=!1,f.isTriggeringEvent=!0;let u=!0;if(i){let b=new $("pressend",c,r);i(b),u=b.shouldStopPropagation}if(n&&n(!1),me(!1),t&&o&&!p){let b=new $("press",c,r);t(b),u&&(u=b.shouldStopPropagation)}return f.isTriggeringEvent=!1,u},[p,i,n,t]),$e=z(S),U=(0,d.useCallback)((r,c)=>{let o=P.current;if(p)return!1;if(s){o.isTriggeringEvent=!0;let f=new $("pressup",c,r);return s(f),o.isTriggeringEvent=!1,f.shouldStopPropagation}return!0},[p,s]),Qe=z(U),K=(0,d.useCallback)(r=>{let c=P.current;if(c.isPressed&&c.target){c.didFirePressStart&&c.pointerType!=null&&S(C(c.target,r),c.pointerType,!1),c.isPressed=!1,Pe(null),c.isOverTarget=!1,c.activePointerId=null,c.pointerType=null,H(),A||Ge(c.target);for(let o of c.disposables)o();c.disposables=[]}},[A,H,S]),Z=z(K),be=(0,d.useCallback)(r=>{m&&K(r)},[m,K]),ee=(0,d.useCallback)(r=>{p||(l==null||l(r))},[p,l]),he=(0,d.useCallback)((r,c)=>{if(!p&&l){let o=new MouseEvent("click",r);Ue(o,c),l(de(o))}},[p,l]),Ze=z(he),[Ee,Te]=(0,d.useState)(!1);T(()=>{let r=P.current;if(Ee){let c=u=>{var ke;if(r.isPressed&&r.target&&ve(u,r.target)){var b;_e(g(u),u.key)&&u.preventDefault();let V=g(u),B=E(r.target,V);$e(C(r.target,u),"keyboard",B),B&&Ze(u,r.target),H(),u.key!=="Enter"&&ye(r.target)&&E(r.target,V)&&!u[Be]&&(u[Be]=!0,L(r.target,u,!1)),r.isPressed=!1,Te(!1),(b=r.metaKeyEvents)==null||b.delete(u.key)}else if(u.key==="Meta"&&((ke=r.metaKeyEvents)!=null&&ke.size)){var I;let V=r.metaKeyEvents;r.metaKeyEvents=void 0;for(let B of V.values())(I=r.target)==null||I.dispatchEvent(new KeyboardEvent("keyup",B))}},o=r.target,f=te(u=>{o&&ve(u,o)&&!u.repeat&&E(o,g(u))&&r.target&&Qe(C(r.target,u),"keyboard")},c);return M(h(r.target),"keyup",f,!0),()=>{R(h(r.target),"keyup",f,!0)}}},[Ee,M,H,R]);let[we,Pe]=(0,d.useState)(null);T(()=>{let r=P.current;if(we==="pointer"){let c=f=>{if(f.pointerId===r.activePointerId&&r.isPressed&&f.button===0&&r.target){if(E(r.target,g(f))&&r.pointerType!=null){let u=!1,b=setTimeout(()=>{r.isPressed&&r.target instanceof HTMLElement&&(u?Z(f):(j(r.target),r.target.click()))},80);f.currentTarget&&M(f.currentTarget,"click",()=>u=!0,!0),r.disposables.push(()=>clearTimeout(b))}else Z(f);r.isOverTarget=!1}},o=f=>{Z(f)};return M(h(r.target),"pointerup",c,!1),M(h(r.target),"pointercancel",o,!1),()=>{R(h(r.target),"pointerup",c,!1),R(h(r.target),"pointercancel",o,!1)}}},[we,M,R]);let et=(0,d.useMemo)(()=>{let r=P.current,c={onKeyDown(o){if(ve(o.nativeEvent,o.currentTarget)&&E(o.currentTarget,g(o))){var f;_e(g(o),o.key)&&o.preventDefault();let u=!0;!r.isPressed&&!o.repeat&&(r.target=o.currentTarget,r.isPressed=!0,Te(!0),r.pointerType="keyboard",u=D(o,"keyboard")),u&&o.stopPropagation(),o.metaKey&&F()&&((f=r.metaKeyEvents)==null||f.set(o.key,o.nativeEvent))}else o.key==="Meta"&&(r.metaKeyEvents=new Map)},onClick(o){if(!(o&&!E(o.currentTarget,g(o)))&&o&&o.button===0&&!r.isTriggeringEvent&&!L.isOpening){let f=!0;if(p&&o.preventDefault(),!r.ignoreEmulatedMouseEvents&&!r.isPressed&&(r.pointerType==="virtual"||Ne(o.nativeEvent))){let u=D(o,"virtual"),b=U(o,"virtual"),I=S(o,"virtual");ee(o),f=u&&b&&I}else if(r.isPressed&&r.pointerType!=="keyboard"){let u=r.pointerType||o.nativeEvent.pointerType||"virtual",b=U(C(o.currentTarget,o),u),I=S(C(o.currentTarget,o),u,!0);f=b&&I,r.isOverTarget=!1,ee(o),K(o)}r.ignoreEmulatedMouseEvents=!1,f&&o.stopPropagation()}}};return typeof PointerEvent<"u"&&(c.onPointerDown=o=>{if(o.button!==0||!E(o.currentTarget,g(o)))return;if(He(o.nativeEvent)){r.pointerType="virtual";return}r.pointerType=o.pointerType;let f=!0;if(!r.isPressed){r.isPressed=!0,Pe("pointer"),r.isOverTarget=!0,r.activePointerId=o.pointerId,r.target=o.currentTarget,A||Ft(r.target),f=D(o,r.pointerType);let u=g(o);"releasePointerCapture"in u&&("hasPointerCapture"in u?u.hasPointerCapture(o.pointerId)&&u.releasePointerCapture(o.pointerId):u.releasePointerCapture(o.pointerId))}f&&o.stopPropagation()},c.onMouseDown=o=>{if(E(o.currentTarget,g(o))&&o.button===0){if(v){let f=Ot(o.target);f&&r.disposables.push(f)}o.stopPropagation()}},c.onPointerUp=o=>{!E(o.currentTarget,g(o))||r.pointerType==="virtual"||o.button===0&&!r.isPressed&&U(o,r.pointerType||o.pointerType)},c.onPointerEnter=o=>{o.pointerId===r.activePointerId&&r.target&&!r.isOverTarget&&r.pointerType!=null&&(r.isOverTarget=!0,D(C(r.target,o),r.pointerType))},c.onPointerLeave=o=>{o.pointerId===r.activePointerId&&r.target&&r.isOverTarget&&r.pointerType!=null&&(r.isOverTarget=!1,S(C(r.target,o),r.pointerType,!1),be(o))},c.onDragStart=o=>{E(o.currentTarget,g(o))&&K(o)}),c},[p,v,H,A,K,be,S,D,U,ee,he]);return(0,d.useEffect)(()=>{if(!Q)return;let r=h(Q.current);if(!r||!r.head||r.getElementById(We))return;let c=r.createElement("style");c.id=We,c.textContent=`
|
|
1
|
+
import{s as tt}from"./chunk-LvLJmgfZ.js";import{t as nt}from"./react-Bj1aDYRI.js";import{t as rt}from"./react-dom-CSu739Rf.js";import{n as it}from"./clsx-BtEcuwwV.js";import{n as ot}from"./SSRProvider-DrpctNAg.js";var d=tt(nt(),1),T=typeof document<"u"?d.useLayoutEffect:()=>{};function at(e){let[t,n]=(0,d.useState)(e),a=(0,d.useRef)(t),i=(0,d.useRef)(null),s=(0,d.useRef)(()=>{if(!i.current)return;let l=i.current.next();if(l.done){i.current=null;return}a.current===l.value?s.current():n(l.value)});return T(()=>{a.current=t,i.current&&s.current()}),[t,(0,d.useCallback)(l=>{i.current=l(a.current),s.current()},[s])]}var st=!!(typeof window<"u"&&window.document&&window.document.createElement),x=new Map,G;typeof FinalizationRegistry<"u"&&(G=new FinalizationRegistry(e=>{x.delete(e)}));function Se(e){let[t,n]=(0,d.useState)(e),a=(0,d.useRef)(null),i=ot(t),s=(0,d.useRef)(null);if(G&&G.register(s,i),st){let l=x.get(i);l&&!l.includes(a)?l.push(a):x.set(i,[a])}return T(()=>{let l=i;return()=>{G&&G.unregister(s),x.delete(l)}},[i]),(0,d.useEffect)(()=>{let l=a.current;return l&&n(l),()=>{l&&(a.current=null)}}),i}function lt(e,t){if(e===t)return e;let n=x.get(e);if(n)return n.forEach(i=>i.current=t),t;let a=x.get(t);return a?(a.forEach(i=>i.current=e),e):t}function ut(e=[]){let t=Se(),[n,a]=at(t),i=(0,d.useCallback)(()=>{a(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,a]);return T(i,[t,i,...e]),n}function te(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}var h=e=>(e==null?void 0:e.ownerDocument)??document,O=e=>e&&"window"in e&&e.window===e?e:h(e).defaultView||window;function ct(e){return typeof e=="object"&&!!e&&"nodeType"in e&&typeof e.nodeType=="number"}function dt(e){return ct(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in e}var ft=!1;function W(){return ft}function E(e,t){if(!W())return t&&e?e.contains(t):!1;if(!e||!t)return!1;let n=t;for(;n!==null;){if(n===e)return!0;n=n.tagName==="SLOT"&&n.assignedSlot?n.assignedSlot.parentNode:dt(n)?n.host:n.parentNode}return!1}var ne=(e=document)=>{var n;if(!W())return e.activeElement;let t=e.activeElement;for(;t&&"shadowRoot"in t&&((n=t.shadowRoot)!=null&&n.activeElement);)t=t.shadowRoot.activeElement;return t};function g(e){if(W()&&e.target instanceof Element&&e.target.shadowRoot){if("composedPath"in e)return e.composedPath()[0]??null;if("composedPath"in e.nativeEvent)return e.nativeEvent.composedPath()[0]??null}return e.target}function pt(e){if(!e)return!1;let t=e.getRootNode(),n=O(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let a=t.activeElement;return a!=null&&e.contains(a)}function Le(...e){return e.length===1&&e[0]?e[0]:t=>{let n=!1,a=e.map(i=>{let s=Ce(i,t);return n||(n=typeof s=="function"),s});if(n)return()=>{a.forEach((i,s)=>{typeof i=="function"?i():Ce(e[s],null)})}}}function Ce(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function re(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let a=e[n];for(let i in a){let s=t[i],l=a[i];typeof s=="function"&&typeof l=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?t[i]=te(s,l):(i==="className"||i==="UNSAFE_className")&&typeof s=="string"&&typeof l=="string"?t[i]=it(s,l):i==="id"&&s&&l?t.id=lt(s,l):i==="ref"&&s&&l?t.ref=Le(s,l):t[i]=l===void 0?s:l}}return t}function j(e){if(gt())e.focus({preventScroll:!0});else{let t=yt(e);e.focus(),vt(t)}}var Y=null;function gt(){if(Y==null){Y=!1;try{document.createElement("div").focus({get preventScroll(){return Y=!0,!0}})}catch{}}return Y}function yt(e){let t=e.parentNode,n=[],a=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==a;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return a instanceof HTMLElement&&n.push({element:a,scrollTop:a.scrollTop,scrollLeft:a.scrollLeft}),n}function vt(e){for(let{element:t,scrollTop:n,scrollLeft:a}of e)t.scrollTop=n,t.scrollLeft=a}function _(e){var n;if(typeof window>"u"||window.navigator==null)return!1;let t=(n=window.navigator.userAgentData)==null?void 0:n.brands;return Array.isArray(t)&&t.some(a=>e.test(a.brand))||e.test(window.navigator.userAgent)}function ie(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)==null?void 0:t.platform)||window.navigator.platform):!1}function w(e){let t=null;return()=>(t??(t=e()),t)}var F=w(function(){return ie(/^Mac/i)}),Ae=w(function(){return ie(/^iPhone/i)}),oe=w(function(){return ie(/^iPad/i)||F()&&navigator.maxTouchPoints>1}),X=w(function(){return Ae()||oe()}),mt=w(function(){return F()||X()}),Me=w(function(){return _(/AppleWebKit/i)&&!Ke()}),Ke=w(function(){return _(/Chrome/i)}),ae=w(function(){return _(/Android/i)}),bt=w(function(){return _(/Firefox/i)}),ht=(0,d.createContext)({isNative:!0,open:Tt,useHref:e=>e});function se(){return(0,d.useContext)(ht)}function L(e,t,n=!0){var v;var a;let{metaKey:i,ctrlKey:s,altKey:l,shiftKey:p}=t;bt()&&(a=window.event)!=null&&((v=a.type)!=null&&v.startsWith("key"))&&e.target==="_blank"&&(F()?i=!0:s=!0);let y=Me()&&F()&&!oe()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:i,ctrlKey:s,altKey:l,shiftKey:p}):new MouseEvent("click",{metaKey:i,ctrlKey:s,altKey:l,shiftKey:p,detail:1,bubbles:!0,cancelable:!0});L.isOpening=n,j(e),e.dispatchEvent(y),L.isOpening=!1}L.isOpening=!1;function Et(e,t){if(e instanceof HTMLAnchorElement)t(e);else if(e.hasAttribute("data-href")){let n=document.createElement("a");n.href=e.getAttribute("data-href"),e.hasAttribute("data-target")&&(n.target=e.getAttribute("data-target")),e.hasAttribute("data-rel")&&(n.rel=e.getAttribute("data-rel")),e.hasAttribute("data-download")&&(n.download=e.getAttribute("data-download")),e.hasAttribute("data-ping")&&(n.ping=e.getAttribute("data-ping")),e.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=e.getAttribute("data-referrer-policy")),e.appendChild(n),t(n),e.removeChild(n)}}function Tt(e,t){Et(e,n=>L(n,t))}function wt(e){let t=se().useHref(e.href??"");return{"data-href":e.href?t:void 0,"data-target":e.target,"data-rel":e.rel,"data-download":e.download,"data-ping":e.ping,"data-referrer-policy":e.referrerPolicy}}function Pt(e){let t=se().useHref((e==null?void 0:e.href)??"");return{href:e!=null&&e.href?t:void 0,target:e==null?void 0:e.target,rel:e==null?void 0:e.rel,download:e==null?void 0:e.download,ping:e==null?void 0:e.ping,referrerPolicy:e==null?void 0:e.referrerPolicy}}var k=new Map,le=new Set;function Ie(){if(typeof window>"u")return;function e(a){return"propertyName"in a}let t=a=>{let i=g(a);if(!e(a)||!i)return;let s=k.get(i);s||(s=new Set,k.set(i,s),i.addEventListener("transitioncancel",n,{once:!0})),s.add(a.propertyName)},n=a=>{let i=g(a);if(!e(a)||!i)return;let s=k.get(i);if(s&&(s.delete(a.propertyName),s.size===0&&(i.removeEventListener("transitioncancel",n),k.delete(i)),k.size===0)){for(let l of le)l();le.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Ie):Ie());function kt(){for(let[e]of k)"isConnected"in e&&!e.isConnected&&k.delete(e)}function xe(e){requestAnimationFrame(()=>{kt(),k.size===0?e():le.add(e)})}function Oe(){let e=(0,d.useRef)(new Map),t=(0,d.useCallback)((i,s,l,p)=>{let y=p!=null&&p.once?(...v)=>{e.current.delete(l),l(...v)}:l;e.current.set(l,{type:s,eventTarget:i,fn:y,options:p}),i.addEventListener(s,y,p)},[]),n=(0,d.useCallback)((i,s,l,p)=>{var v;let y=((v=e.current.get(l))==null?void 0:v.fn)||l;i.removeEventListener(s,y,p),e.current.delete(l)},[]),a=(0,d.useCallback)(()=>{e.current.forEach((i,s)=>{n(i.eventTarget,i.type,s,i.options)})},[n]);return(0,d.useEffect)(()=>a,[a]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:a}}var St=d.useInsertionEffect??T;function z(e){let t=(0,d.useRef)(null);return St(()=>{t.current=e},[e]),(0,d.useCallback)((...n)=>{let a=t.current;return a==null?void 0:a(...n)},[])}function Fe(e,t){T(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}function Ne(e){return e.pointerType===""&&e.isTrusted?!0:ae()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function He(e){return!ae()&&e.width===0&&e.height===0||e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"}var Lt=typeof Element<"u"&&"checkVisibility"in Element.prototype;function Ct(e){let t=O(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:a}=e.style,i=n!=="none"&&a!=="hidden"&&a!=="collapse";if(i){let{getComputedStyle:s}=e.ownerDocument.defaultView,{display:l,visibility:p}=s(e);i=l!=="none"&&p!=="hidden"&&p!=="collapse"}return i}function At(e,t){return!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function ue(e,t){return Lt?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):e.nodeName!=="#comment"&&Ct(e)&&At(e,t)&&(!e.parentElement||ue(e.parentElement,e))}var ce=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],Mt=ce.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";ce.push('[tabindex]:not([tabindex="-1"]):not([disabled])');var Kt=ce.join(':not([hidden]):not([tabindex="-1"]),');function Re(e){return e.matches(Mt)&&ue(e)&&!De(e)}function It(e){return e.matches(Kt)&&ue(e)&&!De(e)}function De(e){let t=e;for(;t!=null;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function de(e){let t=e;return t.nativeEvent=e,t.isDefaultPrevented=()=>t.defaultPrevented,t.isPropagationStopped=()=>t.cancelBubble,t.persist=()=>{},t}function Ue(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function xt(e){let t=(0,d.useRef)({isFocused:!1,observer:null});return T(()=>{let n=t.current;return()=>{n.observer&&(n.observer=(n.observer.disconnect(),null))}},[]),(0,d.useCallback)(n=>{let a=g(n);if(a instanceof HTMLButtonElement||a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||a instanceof HTMLSelectElement){t.current.isFocused=!0;let i=a;i.addEventListener("focusout",s=>{if(t.current.isFocused=!1,i.disabled){let l=de(s);e==null||e(l)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&i.disabled){var s;(s=t.current.observer)==null||s.disconnect();let l=i===ne()?null:ne();i.dispatchEvent(new FocusEvent("blur",{relatedTarget:l})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:l}))}}),t.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[e])}var fe=!1;function Ot(e){for(;e&&!Re(e);)e=e.parentElement;let t=O(e),n=t.document.activeElement;if(!n||n===e)return;fe=!0;let a=!1,i=m=>{(g(m)===n||a)&&m.stopImmediatePropagation()},s=m=>{(g(m)===n||a)&&(m.stopImmediatePropagation(),!e&&!a&&(a=!0,j(n),y()))},l=m=>{(g(m)===e||a)&&m.stopImmediatePropagation()},p=m=>{(g(m)===e||a)&&(m.stopImmediatePropagation(),a||(a=!0,j(n),y()))};t.addEventListener("blur",i,!0),t.addEventListener("focusout",s,!0),t.addEventListener("focusin",p,!0),t.addEventListener("focus",l,!0);let y=()=>{cancelAnimationFrame(v),t.removeEventListener("blur",i,!0),t.removeEventListener("focusout",s,!0),t.removeEventListener("focusin",p,!0),t.removeEventListener("focus",l,!0),fe=!1,a=!1},v=requestAnimationFrame(y);return y}var N="default",pe="",q=new WeakMap;function Ft(e){if(X()){if(N==="default"){let t=h(e);pe=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}N="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";q.set(e,e.style[t]),e.style[t]="none"}}function Ge(e){if(X()){if(N!=="disabled")return;N="restoring",setTimeout(()=>{xe(()=>{if(N==="restoring"){let t=h(e);t.documentElement.style.webkitUserSelect==="none"&&(t.documentElement.style.webkitUserSelect=pe||""),pe="",N="default"}})},300)}else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&q.has(e)){let t=q.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";e.style[n]==="none"&&(e.style[n]=t),e.getAttribute("style")===""&&e.removeAttribute("style"),q.delete(e)}}var ge=d.createContext({register:()=>{}});ge.displayName="PressResponderContext";function Nt(e,t){return t.get?t.get.call(e):t.value}function je(e,t,n){if(!t.has(e))throw TypeError("attempted to "+n+" private field on non-instance");return t.get(e)}function Ht(e,t){return Nt(e,je(e,t,"get"))}function Rt(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}function ze(e,t,n){Rt(e,t),t.set(e,n)}function Dt(e,t,n){if(t.set)t.set.call(e,n);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=n}}function Ve(e,t,n){return Dt(e,je(e,t,"set"),n),n}rt();function Ut(e){let t=(0,d.useContext)(ge);if(t){let{register:n,ref:a,...i}=t;e=re(i,e),n()}return Fe(t,e.ref),e}var J=new WeakMap,$=class{continuePropagation(){Ve(this,J,!1)}get shouldStopPropagation(){return Ht(this,J)}constructor(e,t,n,a){var v;ze(this,J,{writable:!0,value:void 0}),Ve(this,J,!0);let i=(v=(a==null?void 0:a.target)??n.currentTarget)==null?void 0:v.getBoundingClientRect(),s,l=0,p,y=null;n.clientX!=null&&n.clientY!=null&&(p=n.clientX,y=n.clientY),i&&(p!=null&&y!=null?(s=p-i.left,l=y-i.top):(s=i.width/2,l=i.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=s,this.y=l,this.key=n.key}},Be=Symbol("linkClicked"),We="react-aria-pressable-style",Ye="data-react-aria-pressable";function Gt(e){let{onPress:t,onPressChange:n,onPressStart:a,onPressEnd:i,onPressUp:s,onClick:l,isDisabled:p,isPressed:y,preventFocusOnPress:v,shouldCancelOnPointerExit:m,allowTextSelectionOnPress:A,ref:Q,...qe}=Ut(e),[Je,me]=(0,d.useState)(!1),P=(0,d.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:M,removeAllGlobalListeners:H,removeGlobalListener:R}=Oe(),D=(0,d.useCallback)((r,c)=>{let o=P.current;if(p||o.didFirePressStart)return!1;let f=!0;if(o.isTriggeringEvent=!0,a){let u=new $("pressstart",c,r);a(u),f=u.shouldStopPropagation}return n&&n(!0),o.isTriggeringEvent=!1,o.didFirePressStart=!0,me(!0),f},[p,a,n]),S=(0,d.useCallback)((r,c,o=!0)=>{let f=P.current;if(!f.didFirePressStart)return!1;f.didFirePressStart=!1,f.isTriggeringEvent=!0;let u=!0;if(i){let b=new $("pressend",c,r);i(b),u=b.shouldStopPropagation}if(n&&n(!1),me(!1),t&&o&&!p){let b=new $("press",c,r);t(b),u&&(u=b.shouldStopPropagation)}return f.isTriggeringEvent=!1,u},[p,i,n,t]),$e=z(S),U=(0,d.useCallback)((r,c)=>{let o=P.current;if(p)return!1;if(s){o.isTriggeringEvent=!0;let f=new $("pressup",c,r);return s(f),o.isTriggeringEvent=!1,f.shouldStopPropagation}return!0},[p,s]),Qe=z(U),K=(0,d.useCallback)(r=>{let c=P.current;if(c.isPressed&&c.target){c.didFirePressStart&&c.pointerType!=null&&S(C(c.target,r),c.pointerType,!1),c.isPressed=!1,Pe(null),c.isOverTarget=!1,c.activePointerId=null,c.pointerType=null,H(),A||Ge(c.target);for(let o of c.disposables)o();c.disposables=[]}},[A,H,S]),Z=z(K),be=(0,d.useCallback)(r=>{m&&K(r)},[m,K]),ee=(0,d.useCallback)(r=>{p||(l==null||l(r))},[p,l]),he=(0,d.useCallback)((r,c)=>{if(!p&&l){let o=new MouseEvent("click",r);Ue(o,c),l(de(o))}},[p,l]),Ze=z(he),[Ee,Te]=(0,d.useState)(!1);T(()=>{let r=P.current;if(Ee){let c=u=>{var ke;if(r.isPressed&&r.target&&ve(u,r.target)){var b;_e(g(u),u.key)&&u.preventDefault();let V=g(u),B=E(r.target,V);$e(C(r.target,u),"keyboard",B),B&&Ze(u,r.target),H(),u.key!=="Enter"&&ye(r.target)&&E(r.target,V)&&!u[Be]&&(u[Be]=!0,L(r.target,u,!1)),r.isPressed=!1,Te(!1),(b=r.metaKeyEvents)==null||b.delete(u.key)}else if(u.key==="Meta"&&((ke=r.metaKeyEvents)!=null&&ke.size)){var I;let V=r.metaKeyEvents;r.metaKeyEvents=void 0;for(let B of V.values())(I=r.target)==null||I.dispatchEvent(new KeyboardEvent("keyup",B))}},o=r.target,f=te(u=>{o&&ve(u,o)&&!u.repeat&&E(o,g(u))&&r.target&&Qe(C(r.target,u),"keyboard")},c);return M(h(r.target),"keyup",f,!0),()=>{R(h(r.target),"keyup",f,!0)}}},[Ee,M,H,R]);let[we,Pe]=(0,d.useState)(null);T(()=>{let r=P.current;if(we==="pointer"){let c=f=>{if(f.pointerId===r.activePointerId&&r.isPressed&&f.button===0&&r.target){if(E(r.target,g(f))&&r.pointerType!=null){let u=!1,b=setTimeout(()=>{r.isPressed&&r.target instanceof HTMLElement&&(u?Z(f):(j(r.target),r.target.click()))},80);f.currentTarget&&M(f.currentTarget,"click",()=>u=!0,!0),r.disposables.push(()=>clearTimeout(b))}else Z(f);r.isOverTarget=!1}},o=f=>{Z(f)};return M(h(r.target),"pointerup",c,!1),M(h(r.target),"pointercancel",o,!1),()=>{R(h(r.target),"pointerup",c,!1),R(h(r.target),"pointercancel",o,!1)}}},[we,M,R]);let et=(0,d.useMemo)(()=>{let r=P.current,c={onKeyDown(o){if(ve(o.nativeEvent,o.currentTarget)&&E(o.currentTarget,g(o))){var f;_e(g(o),o.key)&&o.preventDefault();let u=!0;!r.isPressed&&!o.repeat&&(r.target=o.currentTarget,r.isPressed=!0,Te(!0),r.pointerType="keyboard",u=D(o,"keyboard")),u&&o.stopPropagation(),o.metaKey&&F()&&((f=r.metaKeyEvents)==null||f.set(o.key,o.nativeEvent))}else o.key==="Meta"&&(r.metaKeyEvents=new Map)},onClick(o){if(!(o&&!E(o.currentTarget,g(o)))&&o&&o.button===0&&!r.isTriggeringEvent&&!L.isOpening){let f=!0;if(p&&o.preventDefault(),!r.ignoreEmulatedMouseEvents&&!r.isPressed&&(r.pointerType==="virtual"||Ne(o.nativeEvent))){let u=D(o,"virtual"),b=U(o,"virtual"),I=S(o,"virtual");ee(o),f=u&&b&&I}else if(r.isPressed&&r.pointerType!=="keyboard"){let u=r.pointerType||o.nativeEvent.pointerType||"virtual",b=U(C(o.currentTarget,o),u),I=S(C(o.currentTarget,o),u,!0);f=b&&I,r.isOverTarget=!1,ee(o),K(o)}r.ignoreEmulatedMouseEvents=!1,f&&o.stopPropagation()}}};return typeof PointerEvent<"u"&&(c.onPointerDown=o=>{if(o.button!==0||!E(o.currentTarget,g(o)))return;if(He(o.nativeEvent)){r.pointerType="virtual";return}r.pointerType=o.pointerType;let f=!0;if(!r.isPressed){r.isPressed=!0,Pe("pointer"),r.isOverTarget=!0,r.activePointerId=o.pointerId,r.target=o.currentTarget,A||Ft(r.target),f=D(o,r.pointerType);let u=g(o);"releasePointerCapture"in u&&("hasPointerCapture"in u?u.hasPointerCapture(o.pointerId)&&u.releasePointerCapture(o.pointerId):u.releasePointerCapture(o.pointerId))}f&&o.stopPropagation()},c.onMouseDown=o=>{if(E(o.currentTarget,g(o))&&o.button===0){if(v){let f=Ot(o.target);f&&r.disposables.push(f)}o.stopPropagation()}},c.onPointerUp=o=>{!E(o.currentTarget,g(o))||r.pointerType==="virtual"||o.button===0&&!r.isPressed&&U(o,r.pointerType||o.pointerType)},c.onPointerEnter=o=>{o.pointerId===r.activePointerId&&r.target&&!r.isOverTarget&&r.pointerType!=null&&(r.isOverTarget=!0,D(C(r.target,o),r.pointerType))},c.onPointerLeave=o=>{o.pointerId===r.activePointerId&&r.target&&r.isOverTarget&&r.pointerType!=null&&(r.isOverTarget=!1,S(C(r.target,o),r.pointerType,!1),be(o))},c.onDragStart=o=>{E(o.currentTarget,g(o))&&K(o)}),c},[p,v,H,A,K,be,S,D,U,ee,he]);return(0,d.useEffect)(()=>{if(!Q)return;let r=h(Q.current);if(!r||!r.head||r.getElementById(We))return;let c=r.createElement("style");c.id=We,c.textContent=`
|
|
2
2
|
@layer {
|
|
3
3
|
[${Ye}] {
|
|
4
4
|
touch-action: pan-x pan-y pinch-zoom;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as k,n as i,p as v}from"./useEvent-D91BmmQi.js";import{D as w,St as y,Vn as F,h as d,ri as b,si as D}from"./cells-
|
|
1
|
+
import{d as k,n as i,p as v}from"./useEvent-D91BmmQi.js";import{D as w,St as y,Vn as F,h as d,ri as b,si as D}from"./cells-BidbgSuB.js";import{t as V}from"./compiler-runtime-B3qBwwSJ.js";import{_}from"./useEventListener-BakX-tnw.js";import{o as x}from"./dist-B0WqBUnf.js";import{r as H}from"./requests-KshNNAOp.js";var u=V();const I=v(!1);function S(){let r=(0,u.c)(2),n=f(),t;return r[0]===n?t=r[1]:(t=()=>n(D(d())),r[0]=n,r[1]=t),i(t)}function j(r){let n=(0,u.c)(3),t=f(),e;return n[0]!==r||n[1]!==t?(e=()=>{r!==void 0&&t([r])},n[0]=r,n[1]=t,n[2]=e):e=n[2],i(e)}function q(){let r=(0,u.c)(2),n=f(),t;return r[0]===n?t=r[1]:(t=()=>n(b(d())),r[0]=n,r[1]=t),i(t)}function f(){let r=(0,u.c)(4),{prepareForRun:n}=w(),{sendRun:t}=H(),e=k(I),o;return r[0]!==n||r[1]!==t||r[2]!==e?(o=async s=>{if(s.length===0)return;let c=d();return e(!0),g({cellIds:s,sendRun:t,prepareForRun:n,notebook:c})},r[0]=n,r[1]=t,r[2]=e,r[3]=o):o=r[3],i(o)}async function g({cellIds:r,sendRun:n,prepareForRun:t,notebook:e}){var m,h,R;if(r.length===0)return;let{cellHandles:o,cellData:s}=e,c=[];for(let a of r){let l=(h=(m=o[a])==null?void 0:m.current)==null?void 0:h.editorView,p;l?(F(l)!=="markdown"&&x(l),p=y(l)):p=((R=s[a])==null?void 0:R.code)||"",c.push(p),t({cellId:a})}await n({cellIds:r,codes:c}).catch(a=>{_.error(a)})}export{f as a,j as i,g as n,S as o,q as r,I as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as m}from"./chunk-LvLJmgfZ.js";import{n as p}from"./useEvent-D91BmmQi.js";import{D as d,St as f,f as u}from"./cells-
|
|
1
|
+
import{s as m}from"./chunk-LvLJmgfZ.js";import{n as p}from"./useEvent-D91BmmQi.js";import{D as d,St as f,f as u}from"./cells-BidbgSuB.js";import{t as c}from"./compiler-runtime-B3qBwwSJ.js";import{t as C}from"./jsx-runtime-PbYoItBR.js";import{r as h}from"./useDeleteCell-CCCMHD2a.js";import{t as v}from"./use-toast-BH8bU9Xf.js";var x=c(),S=m(C(),1);function b(){let t=(0,x.c)(3),{splitCell:i,undoSplitCell:r}=d(),o;return t[0]!==i||t[1]!==r?(o=s=>{let l=u(s.cellId);if(!l)return;let a=f(l);i(s);let{dismiss:n}=v({title:"Cell split",action:(0,S.jsx)(h,{"data-testid":"undo-split-button",size:"sm",variant:"outline",onClick:()=>{r({...s,snapshot:a}),e()},children:"Undo"})}),e=n},t[0]=i,t[1]=r,t[2]=o):o=t[2],p(o)}export{b as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var de=Object.defineProperty;var he=(t,e,n)=>e in t?de(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>he(t,typeof e!="symbol"?e+"":e,n);var at,lt,ot,ut,ct;import{_ as fe,d as yt}from"./useEventListener-BakX-tnw.js";import{St as pt,a as ye,c as pe,gt as ge,o as me,wt as ve}from"./vega-loader.browser-CZV6_g2i.js";const gt=Uint8Array.of(65,82,82,79,87,49),$={V1:0,V2:1,V3:2,V4:3,V5:4},S={NONE:0,Schema:1,DictionaryBatch:2,RecordBatch:3,Tensor:4,SparseTensor:5},l={Dictionary:-1,NONE:0,Null:1,Int:2,Float:3,Binary:4,Utf8:5,Bool:6,Decimal:7,Date:8,Time:9,Timestamp:10,Interval:11,List:12,Struct:13,Union:14,FixedSizeBinary:15,FixedSizeList:16,Map:17,Duration:18,LargeBinary:19,LargeUtf8:20,LargeList:21,RunEndEncoded:22,BinaryView:23,Utf8View:24,ListView:25,LargeListView:26},mt={HALF:0,SINGLE:1,DOUBLE:2},z={DAY:0,MILLISECOND:1},m={SECOND:0,MILLISECOND:1,MICROSECOND:2,NANOSECOND:3},C={YEAR_MONTH:0,DAY_TIME:1,MONTH_DAY_NANO:2},W={Sparse:0,Dense:1},vt=Uint8Array,bt=Uint16Array,xt=Uint32Array,wt=BigUint64Array,It=Int8Array,be=Int16Array,x=Int32Array,L=BigInt64Array,xe=Float32Array,k=Float64Array;function we(t,e){let n=Math.log2(t)-3;return(e?[It,be,x,L]:[vt,bt,xt,wt])[n]}Object.getPrototypeOf(Int8Array);function X(t,e){let n=0,r=t.length;if(r<=2147483648)do{let i=n+r>>>1;t[i]<=e?n=i+1:r=i}while(n<r);else do{let i=Math.trunc((n+r)/2);t[i]<=e?n=i+1:r=i}while(n<r);return n}function J(t,e,n){if(e(t))return t;throw Error(n(t))}function w(t,e,n){return e=Array.isArray(e)?e:Object.values(e),J(t,r=>e.includes(r),n??(()=>`${t} must be one of ${e}`))}function Lt(t,e){for(let[n,r]of Object.entries(t))if(r===e)return n;return"<Unknown>"}const Z=t=>`Unsupported data type: "${Lt(l,t)}" (id ${t})`,At=(t,e,n=!0,r=null)=>({name:t,type:e,nullable:n,metadata:r});function Nt(t){return Object.hasOwn(t,"name")&&Et(t.type)}function Et(t){return typeof(t==null?void 0:t.typeId)=="number"}function B(t,e="",n=!0){return Nt(t)?t:At(e,J(t,Et,()=>"Data type expected."),n)}const Ie=(t,e,n=!1,r=-1)=>({typeId:l.Dictionary,id:r,dictionary:t,indices:e||St(),ordered:n}),Dt=(t=32,e=!0)=>({typeId:l.Int,bitWidth:w(t,[8,16,32,64]),signed:e,values:we(t,e)}),St=()=>Dt(32),Le=(t=2)=>({typeId:l.Float,precision:w(t,mt),values:[bt,xe,k][t]}),Ae=()=>({typeId:l.Binary,offsets:x}),Ne=()=>({typeId:l.Utf8,offsets:x}),Ee=(t,e,n=128)=>({typeId:l.Decimal,precision:t,scale:e,bitWidth:w(n,[128,256]),values:wt}),De=t=>({typeId:l.Date,unit:w(t,z),values:t===z.DAY?x:L}),Se=(t=m.MILLISECOND,e=32)=>({typeId:l.Time,unit:w(t,m),bitWidth:w(e,[32,64]),values:e===32?x:L}),Be=(t=m.MILLISECOND,e=null)=>({typeId:l.Timestamp,unit:w(t,m),timezone:e,values:L}),Oe=(t=C.MONTH_DAY_NANO)=>({typeId:l.Interval,unit:w(t,C),values:t===C.MONTH_DAY_NANO?void 0:x}),Te=t=>({typeId:l.List,children:[B(t)],offsets:x}),Me=t=>({typeId:l.Struct,children:Array.isArray(t)&&Nt(t[0])?t:Object.entries(t).map(([e,n])=>At(e,n))}),Ce=(t,e,n,r)=>(n??(n=e.map((i,s)=>s)),{typeId:l.Union,mode:w(t,W),typeIds:n,typeMap:n.reduce((i,s,a)=>(i[s]=a,i),{}),children:e.map((i,s)=>B(i,`_${s}`)),typeIdForValue:r,offsets:x}),Ue=t=>({typeId:l.FixedSizeBinary,stride:t}),Ve=(t,e)=>({typeId:l.FixedSizeList,stride:e,children:[B(t)]}),Fe=(t,e)=>({typeId:l.Map,keysSorted:t,children:[e],offsets:x}),Re=(t=m.MILLISECOND)=>({typeId:l.Duration,unit:w(t,m),values:L}),$e=()=>({typeId:l.LargeBinary,offsets:L}),ze=()=>({typeId:l.LargeUtf8,offsets:L}),ke=t=>({typeId:l.LargeList,children:[B(t)],offsets:L}),je=(t,e)=>({typeId:l.RunEndEncoded,children:[J(B(t,"run_ends"),n=>n.type.typeId===l.Int,()=>"Run-ends must have an integer type."),B(e,"values")]}),Ye=t=>({typeId:l.ListView,children:[B(t,"value")],offsets:x}),_e=t=>({typeId:l.LargeListView,children:[B(t,"value")],offsets:L});var j=new k(2).buffer;new L(j),new xt(j),new x(j),new vt(j);function O(t){if(t>2**53-1||t<-(2**53-1))throw Error(`BigInt exceeds integer number representation: ${t}`);return Number(t)}function G(t,e){return Number(t/e)+Number(t%e)/Number(e)}var U=t=>BigInt.asUintN(64,t);function He(t,e){let n=e<<1,r;return BigInt.asIntN(64,t[n+1])<0?(r=U(~t[n])|U(~t[n+1])<<64n,r=-(r+1n)):r=t[n]|t[n+1]<<64n,r}function Pe(t,e){let n=e<<2,r;return BigInt.asIntN(64,t[n+3])<0?(r=U(~t[n])|U(~t[n+1])<<64n|U(~t[n+2])<<128n|U(~t[n+3])<<192n,r=-(r+1n)):r=t[n]|t[n+1]<<64n|t[n+2]<<128n|t[n+3]<<192n,r}var We=new TextDecoder("utf-8");new TextEncoder;function Y(t){return We.decode(t)}function Bt(t,e){return(t[e>>3]&1<<e%8)!=0}function N(t,e){let n=e+h(t,e),r=n-h(t,n),i=v(t,r);return(s,a,o=null)=>{if(s<i){let u=v(t,r+s);if(u)return a(t,n+u)}return o}}function M(t,e){return e}function F(t,e){return!!Xe(t,e)}function Xe(t,e){return q(t,e)<<24>>24}function q(t,e){return t[e]}function v(t,e){return Je(t,e)<<16>>16}function Je(t,e){return t[e]|t[e+1]<<8}function h(t,e){return t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24}function Ot(t,e){return h(t,e)>>>0}function b(t,e){return O(BigInt.asIntN(64,BigInt(Ot(t,e))+(BigInt(Ot(t,e+4))<<32n)))}function _(t,e){let n=e+h(t,e),r=h(t,n);return n+=4,Y(t.subarray(n,n+r))}function T(t,e,n,r){if(!e)return[];let i=e+h(t,e);return Array.from({length:h(t,i)},(s,a)=>r(t,i+4+a*n))}const K=Symbol("rowIndex");function Q(t,e){class n{constructor(s){this[K]=s}toJSON(){return Mt(t,e,this[K])}}let r=n.prototype;for(let i=0;i<t.length;++i){if(Object.hasOwn(r,t[i]))continue;let s=e[i];Object.defineProperty(r,t[i],{get(){return s.at(this[K])},enumerable:!0})}return i=>new n(i)}function Tt(t,e){return n=>Mt(t,e,n)}function Mt(t,e,n){let r={};for(let i=0;i<t.length;++i)r[t[i]]=e[i].at(n);return r}function Ze(t){return t instanceof P}var H=(at=class{constructor({length:t,nullCount:e,type:n,validity:r,values:i,offsets:s,sizes:a,children:o}){this.length=t,this.nullCount=e,this.type=n,this.validity=r,this.values=i,this.offsets=s,this.sizes=a,this.children=o,(!e||!this.validity)&&(this.at=u=>this.value(u))}get[Symbol.toStringTag](){return"Batch"}at(t){return this.isValid(t)?this.value(t):null}isValid(t){return Bt(this.validity,t)}value(t){return this.values[t]}slice(t,e){let n=e-t,r=Array(n);for(let i=0;i<n;++i)r[i]=this.at(t+i);return r}*[Symbol.iterator](){for(let t=0;t<this.length;++t)yield this.at(t)}},A(at,"ArrayType",null),at),P=class extends H{constructor(t){super(t);let{length:e,values:n}=this;this.values=n.subarray(0,e)}slice(t,e){return this.nullCount?super.slice(t,e):this.values.subarray(t,e)}[Symbol.iterator](){return this.nullCount?super[Symbol.iterator]():this.values[Symbol.iterator]()}},tt=(lt=class extends H{},A(lt,"ArrayType",k),lt),f=(ot=class extends H{},A(ot,"ArrayType",Array),ot),Ge=class extends f{value(t){return null}},V=class extends tt{value(t){return O(this.values[t])}},qe=class extends tt{value(t){let e=this.values[t],n=(e&31744)>>10,r=(e&1023)/1024,i=(-1)**((e&32768)>>15);switch(n){case 31:return i*(r?NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*2**(n-15)*(1+r)}},Ke=class extends f{value(t){return Bt(this.values,t)}},Ct=class extends H{constructor(t){super(t);let{bitWidth:e,scale:n}=this.type;this.decimal=e===128?He:Pe,this.scale=10n**BigInt(n)}},Qe=(ut=class extends Ct{value(t){return G(this.decimal(this.values,t),this.scale)}},A(ut,"ArrayType",k),ut),tn=(ct=class extends Ct{value(t){return this.decimal(this.values,t)}},A(ct,"ArrayType",Array),ct),Ut=class extends f{constructor(t){super(t),this.source=t}value(t){return new Date(this.source.value(t))}},en=class extends tt{value(t){return 864e5*this.values[t]}};const nn=V;var rn=class extends V{value(t){return super.value(t)*1e3}};const sn=V;var an=class extends V{value(t){return G(this.values[t],1000n)}},ln=class extends V{value(t){return G(this.values[t],1000000n)}},on=class extends f{value(t){return this.values.subarray(t<<1,t+1<<1)}},un=class extends f{value(t){let e=this.values,n=t<<4;return Float64Array.of(h(e,n),h(e,n+4),b(e,n+8))}},Vt=({values:t,offsets:e},n)=>t.subarray(e[n],e[n+1]),Ft=({values:t,offsets:e},n)=>t.subarray(O(e[n]),O(e[n+1])),cn=class extends f{value(t){return Vt(this,t)}},dn=class extends f{value(t){return Ft(this,t)}},hn=class extends f{value(t){return Y(Vt(this,t))}},fn=class extends f{value(t){return Y(Ft(this,t))}},yn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(e[t],e[t+1])}},pn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(O(e[t]),O(e[t+1]))}},gn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(e,n)}},mn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(O(e),O(n))}},Rt=class extends f{constructor(t){super(t),this.stride=this.type.stride}},vn=class extends Rt{value(t){let{stride:e,values:n}=this;return n.subarray(t*e,(t+1)*e)}},bn=class extends Rt{value(t){let{children:e,stride:n}=this;return e[0].slice(t*n,(t+1)*n)}};function $t({children:t,offsets:e},n){let[r,i]=t[0].children,s=e[n],a=e[n+1],o=[];for(let u=s;u<a;++u)o.push([r.at(u),i.at(u)]);return o}var xn=class extends f{value(t){return $t(this,t)}},wn=class extends f{value(t){return new Map($t(this,t))}},zt=class extends f{constructor({typeIds:t,...e}){super(e),this.typeIds=t,this.typeMap=this.type.typeMap}value(t,e=t){let{typeIds:n,children:r,typeMap:i}=this;return r[i[n[t]]].at(e)}},In=class extends zt{value(t){return super.value(t,this.offsets[t])}},kt=class extends f{constructor(t,e=Tt){super(t),this.names=this.type.children.map(n=>n.name),this.factory=e(this.names,this.children)}value(t){return this.factory(t)}},Ln=class extends kt{constructor(t){super(t,Q)}},An=class extends f{value(t){let[{values:e},n]=this.children;return n.at(X(e,t))}},Nn=class extends f{setDictionary(t){return this.dictionary=t,this.cache=t.cache(),this}value(t){return this.cache[this.key(t)]}key(t){return this.values[t]}},jt=class extends f{constructor({data:t,...e}){super(e),this.data=t}view(t){let{values:e,data:n}=this,r=t<<4,i=r+4,s=e,a=h(s,r);return a>12&&(i=h(s,r+12),s=n[h(s,r+8)]),s.subarray(i,i+a)}},En=class extends jt{value(t){return this.view(t)}},Dn=class extends jt{value(t){return Y(this.view(t))}};function Yt(t){let e=[];return{add(n){return e.push(n),this},clear:()=>e=[],done:()=>new Sn(e,t)}}var Sn=class{constructor(t,e=(n=>(n=t[0])==null?void 0:n.type)()){this.type=e,this.length=t.reduce((s,a)=>s+a.length,0),this.nullCount=t.reduce((s,a)=>s+a.nullCount,0),this.data=t;let r=t.length,i=new Int32Array(r+1);if(r===1){let[s]=t;i[1]=s.length,this.at=a=>s.at(a)}else for(let s=0,a=0;s<r;++s)i[s+1]=a+=t[s].length;this.offsets=i}get[Symbol.toStringTag](){return"Column"}[Symbol.iterator](){let t=this.data;return t.length===1?t[0][Symbol.iterator]():Bn(t)}at(t){var i;let{data:e,offsets:n}=this,r=X(n,t)-1;return(i=e[r])==null?void 0:i.at(t-n[r])}get(t){return this.at(t)}toArray(){let{length:t,nullCount:e,data:n}=this,r=!e&&Ze(n[0]),i=n.length;if(r&&i===1)return n[0].values;let s=new(!i||e>0?Array:n[0].constructor.ArrayType??n[0].values.constructor)(t);return r?On(s,n):Tn(s,n)}cache(){return this._cache??(this._cache=this.toArray())}};function*Bn(t){for(let e=0;e<t.length;++e){let n=t[e][Symbol.iterator]();for(let r=n.next();!r.done;r=n.next())yield r.value}}function On(t,e){for(let n=0,r=0;n<e.length;++n){let{values:i}=e[n];t.set(i,r),r+=i.length}return t}function Tn(t,e){let n=-1;for(let r=0;r<e.length;++r){let i=e[r];for(let s=0;s<i.length;++s)t[++n]=i.at(s)}return t}var Mn=class ue{constructor(e,n,r=!1){let i=e.fields.map(a=>a.name);this.schema=e,this.names=i,this.children=n,this.factory=r?Q:Tt;let s=[];this.getFactory=a=>s[a]??(s[a]=this.factory(i,n.map(o=>o.data[a])))}get[Symbol.toStringTag](){return"Table"}get numCols(){return this.names.length}get numRows(){var e;return((e=this.children[0])==null?void 0:e.length)??0}getChildAt(e){return this.children[e]}getChild(e){let n=this.names.findIndex(r=>r===e);return n>-1?this.children[n]:void 0}selectAt(e,n=[]){let{children:r,factory:i,schema:s}=this,{fields:a}=s;return new ue({...s,fields:e.map((o,u)=>Cn(a[o],n[u]))},e.map(o=>r[o]),i===Q)}select(e,n){let r=this.names,i=e.map(s=>r.indexOf(s));return this.selectAt(i,n)}toColumns(){let{children:e,names:n}=this,r={};return n.forEach((i,s)=>{var a;return r[i]=((a=e[s])==null?void 0:a.toArray())??[]}),r}toArray(){var a;let{children:e,getFactory:n,numRows:r}=this,i=((a=e[0])==null?void 0:a.data)??[],s=Array(r);for(let o=0,u=-1;o<i.length;++o){let d=n(o);for(let c=0;c<i[o].length;++c)s[++u]=d(c)}return s}*[Symbol.iterator](){var i;let{children:e,getFactory:n}=this,r=((i=e[0])==null?void 0:i.data)??[];for(let s=0;s<r.length;++s){let a=n(s);for(let o=0;o<r[s].length;++o)yield a(o)}}at(e){let{children:n,getFactory:r,numRows:i}=this;if(e<0||e>=i)return null;let[{offsets:s}]=n,a=X(s,e)-1;return r(a)(e-s[a])}get(e){return this.at(e)}};function Cn(t,e){return e!=null&&e!==t.name?{...t,name:e}:t}function Un(t,e={}){let{typeId:n,bitWidth:r,precision:i,unit:s}=t,{useBigInt:a,useDate:o,useDecimalBigInt:u,useMap:d,useProxy:c}=e;switch(n){case l.Null:return Ge;case l.Bool:return Ke;case l.Int:case l.Time:case l.Duration:return a||r<64?P:V;case l.Float:return i?P:qe;case l.Date:return _t(s===z.DAY?en:nn,o&&Ut);case l.Timestamp:return _t(s===m.SECOND?rn:s===m.MILLISECOND?sn:s===m.MICROSECOND?an:ln,o&&Ut);case l.Decimal:return u?tn:Qe;case l.Interval:return s===C.DAY_TIME?on:s===C.YEAR_MONTH?P:un;case l.FixedSizeBinary:return vn;case l.Utf8:return hn;case l.LargeUtf8:return fn;case l.Binary:return cn;case l.LargeBinary:return dn;case l.BinaryView:return En;case l.Utf8View:return Dn;case l.List:return yn;case l.LargeList:return pn;case l.Map:return d?wn:xn;case l.ListView:return gn;case l.LargeListView:return mn;case l.FixedSizeList:return bn;case l.Struct:return c?Ln:kt;case l.RunEndEncoded:return An;case l.Dictionary:return Nn;case l.Union:return t.mode?In:zt}throw Error(Z(n))}function _t(t,e){return e?class extends e{constructor(n){super(new t(n))}}:t}function Vn(t,e){return{offset:b(t,e),metadataLength:h(t,e+8),bodyLength:b(t,e+16)}}function Ht(t,e){return T(t,e,24,Vn)}function Pt(t,e,n){let r=N(t,e);if(r(10,M,0))throw Error("Record batch compression not implemented");let i=n<$.V4?8:0;return{length:r(4,b,0),nodes:T(t,r(6,M),16,(s,a)=>({length:b(s,a),nullCount:b(s,a+8)})),regions:T(t,r(8,M),16+i,(s,a)=>({offset:b(s,a+i),length:b(s,a+i+8)})),variadic:T(t,r(12,M),8,b)}}function Fn(t,e,n){let r=N(t,e);return{id:r(4,b,0),data:r(6,(i,s)=>Pt(i,s,n)),isDelta:r(8,F,!1)}}function Wt(t,e,n,r){w(n,l,Z);let i=N(t,e);switch(n){case l.Binary:return Ae();case l.Utf8:return Ne();case l.LargeBinary:return $e();case l.LargeUtf8:return ze();case l.List:return Te(r[0]);case l.ListView:return Ye(r[0]);case l.LargeList:return ke(r[0]);case l.LargeListView:return _e(r[0]);case l.Struct:return Me(r);case l.RunEndEncoded:return je(r[0],r[1]);case l.Int:return Dt(i(4,h,0),i(6,F,!1));case l.Float:return Le(i(4,v,mt.HALF));case l.Decimal:return Ee(i(4,h,0),i(6,h,0),i(8,h,128));case l.Date:return De(i(4,v,z.MILLISECOND));case l.Time:return Se(i(4,v,m.MILLISECOND),i(6,h,32));case l.Timestamp:return Be(i(4,v,m.SECOND),i(6,_));case l.Interval:return Oe(i(4,v,C.YEAR_MONTH));case l.Duration:return Re(i(4,v,m.MILLISECOND));case l.FixedSizeBinary:return Ue(i(4,h,0));case l.FixedSizeList:return Ve(r[0],i(4,h,0));case l.Map:return Fe(i(4,F,!1),r[0]);case l.Union:return Ce(i(4,v,W.Sparse),r,T(t,i(6,M),4,h))}return{typeId:n}}function et(t,e){let n=T(t,e,4,(r,i)=>{let s=N(r,i);return[s(4,_),s(6,_)]});return n.length?new Map(n):null}function Xt(t,e,n){let r=N(t,e);return{version:n,endianness:r(4,v,0),fields:r(6,Rn,[]),metadata:r(8,et)}}function Rn(t,e){return T(t,e,4,Jt)}function Jt(t,e){let n=N(t,e),r=n(8,q,l.NONE),i=n(10,M,0),s=n(12,zn),a=Wt(t,i,r,n(14,(o,u)=>$n(o,u)));return s&&(s.dictionary=a,a=s),{name:n(4,_),type:a,nullable:n(6,F,!1),metadata:n(16,et)}}function $n(t,e){let n=T(t,e,4,Jt);return n.length?n:null}function zn(t,e){if(!e)return null;let n=N(t,e);return Ie(null,n(6,kn,St()),n(8,F,!1),n(4,b,0))}function kn(t,e){return Wt(t,e,l.Int)}var jn=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,Yn=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`,_n=t=>`Unsupported message type: ${t} (${Lt(S,t)})`;function nt(t,e){let n=h(t,e)||0;if(e+=4,n===-1&&(n=h(t,e)||0,e+=4),n===0)return null;let r=t.subarray(e,e+=n);if(r.byteLength<n)throw Error(jn(n,r.byteLength));let i=N(r,0),s=i(4,v,$.V1),a=i(6,q,S.NONE),o=i(8,M,0),u=i(10,b,0),d;if(o){let c=a===S.Schema?Xt:a===S.DictionaryBatch?Fn:a===S.RecordBatch?Pt:null;if(!c)throw Error(_n(a));if(d=c(r,o,s),u>0){let g=t.subarray(e,e+=u);if(g.byteLength<u)throw Error(Yn(u,g.byteLength));d.body=g}}return{version:s,type:a,index:e,content:d}}function Hn(t){let e=t instanceof ArrayBuffer?new Uint8Array(t):t;return e instanceof Uint8Array&&Pn(e)?Xn(e):Wn(e)}function Pn(t){if(!t||t.length<4)return!1;for(let e=0;e<6;++e)if(gt[e]!==t[e])return!1;return!0}function Wn(t){let e=[t].flat(),n,r=[],i=[];for(let s of e){if(!(s instanceof Uint8Array))throw Error("IPC data batch was not a Uint8Array.");let a=0;for(;;){let o=nt(s,a);if(o===null)break;if(a=o.index,o.content)switch(o.type){case S.Schema:n||(n=o.content);break;case S.RecordBatch:r.push(o.content);break;case S.DictionaryBatch:i.push(o.content);break}}}return{schema:n,dictionaries:i,records:r,metadata:null}}function Xn(t){let e=t.byteLength-(gt.length+4),n=N(t,e-h(t,e)),r=n(4,v,$.V1),i=n(8,Ht,[]),s=n(10,Ht,[]);return{schema:n(6,(a,o)=>Xt(a,o,r)),dictionaries:i.map(({offset:a})=>nt(t,a).content),records:s.map(({offset:a})=>nt(t,a).content),metadata:n(12,et)}}function rt(t,e){return Jn(Hn(t),e)}function Jn(t,e={}){let{schema:n={fields:[]},dictionaries:r,records:i}=t,{version:s,fields:a}=n,o=new Map,u=Gn(e,s,o),d=new Map;Zn(n,y=>{let p=y.type;p.typeId===l.Dictionary&&d.set(p.id,p.dictionary)});let c=new Map;for(let y of r){let{id:p,data:E,isDelta:D,body:ce}=y,dt=d.get(p),ht=it(dt,u({...E,body:ce}));if(c.has(p)){let ft=c.get(p);D||ft.clear(),ft.add(ht)}else{if(D)throw Error("Delta update can not be first dictionary batch.");c.set(p,Yt(dt).add(ht))}}c.forEach((y,p)=>o.set(p,y.done()));let g=a.map(y=>Yt(y.type));for(let y of i){let p=u(y);a.forEach((E,D)=>g[D].add(it(E.type,p)))}return new Mn(n,g.map(y=>y.done()),e.useProxy)}function Zn(t,e){t.fields.forEach(function n(r){var i,s,a;e(r),(s=(i=r.type.dictionary)==null?void 0:i.children)==null||s.forEach(n),(a=r.type.children)==null||a.forEach(n)})}function Gn(t,e,n){let r={version:e,options:t,dictionary:i=>n.get(i)};return i=>{let{length:s,nodes:a,regions:o,variadic:u,body:d}=i,c=-1,g=-1,y=-1;return{...r,length:s,node:()=>a[++c],buffer:p=>{let{length:E,offset:D}=o[++g];return p?new p(d.buffer,d.byteOffset+D,E/p.BYTES_PER_ELEMENT):d.subarray(D,D+E)},variadic:()=>u[++y],visit(p){return p.map(E=>it(E.type,this))}}}}function it(t,e){let{typeId:n}=t,{length:r,options:i,node:s,buffer:a,variadic:o,version:u}=e,d=Un(t,i);if(n===l.Null)return new d({length:r,nullCount:r,type:t});let c={...s(),type:t};switch(n){case l.Bool:case l.Int:case l.Time:case l.Duration:case l.Float:case l.Decimal:case l.Date:case l.Timestamp:case l.Interval:case l.FixedSizeBinary:return new d({...c,validity:a(),values:a(t.values)});case l.Utf8:case l.LargeUtf8:case l.Binary:case l.LargeBinary:return new d({...c,validity:a(),offsets:a(t.offsets),values:a()});case l.BinaryView:case l.Utf8View:return new d({...c,validity:a(),values:a(),data:Array.from({length:o()},()=>a())});case l.List:case l.LargeList:case l.Map:return new d({...c,validity:a(),offsets:a(t.offsets),children:e.visit(t.children)});case l.ListView:case l.LargeListView:return new d({...c,validity:a(),offsets:a(t.offsets),sizes:a(t.offsets),children:e.visit(t.children)});case l.FixedSizeList:case l.Struct:return new d({...c,validity:a(),children:e.visit(t.children)});case l.RunEndEncoded:return new d({...c,children:e.visit(t.children)});case l.Dictionary:{let{id:g,indices:y}=t;return new d({...c,validity:a(),values:a(y.values)}).setDictionary(e.dictionary(g))}case l.Union:return u<$.V5&&a(),new d({...c,typeIds:a(It),offsets:t.mode===W.Sparse?null:a(t.offsets),children:e.visit(t.children)});default:throw Error(Z(n))}}new Uint16Array(new Uint8Array([1,0]).buffer)[0];function R(t,e){let n=new Map;return(...r)=>{let i=e(...r);if(n.has(i))return n.get(i);let s=t(...r).finally(()=>{n.delete(i)});return n.set(i,s),s}}function st(t,e){return me(t,e)}function qn(){return ye()}const I=pe;function Zt(){let t=Kn(qn()),e=n=>JSON.stringify(n);return{load:R(t.load.bind(t),e),sanitize:R(t.sanitize.bind(t),e),http:R(t.http.bind(t),e),file:R(t.file.bind(t),e)}}function Kn(t){return{...t,async load(e,n){return e.endsWith(".arrow")?rt(await Gt(e),{useProxy:!1}).toArray():t.load(e,n)}}}const Gt=R(t=>fetch(t).then(e=>e.arrayBuffer()),t=>t);var qt=I.integer,Kt=I.number,Qn=I.date,tr=I.boolean,Qt=()=>(I.integer=t=>{if(t==="")return"";if(t==="-inf"||t==="inf")return t;function e(r){let i=qt(r);return Number.isNaN(i)?r:i}let n=Number.parseInt(t,10);if(Number.isNaN(n))return t;if(!(Math.abs(n)>2**53-1))return e(t);try{return BigInt(t)}catch{return e(t)}},I.number=t=>{if(t==="-inf"||t==="inf")return t;let e=Kt(t);return Number.isNaN(e)?t:e},()=>{I.integer=qt,I.number=Kt}),te=()=>(I.date=t=>{if(t==="")return"";if(t==null)return null;if(!/^\d{4}-\d{2}-\d{2}(T[\d.:]+(Z|[+-]\d{2}:?\d{2})?)?$/.test(t))return t;try{let e=new Date(t);return Number.isNaN(e.getTime())?t:e}catch{return fe.warn(`Failed to parse date: ${t}`),t}},()=>{I.date=Qn});I.boolean=t=>t==="True"?!0:t==="False"?!1:tr(t);const ee=Zt();async function er(t,e,n={}){let{handleBigIntAndNumberLike:r=!1,replacePeriod:i=!1}=n;if(t.endsWith(".arrow")||(e==null?void 0:e.type)==="arrow")return rt(await Gt(t),{useProxy:!0,useDate:!0,useBigInt:r}).toArray();let s=[te];r&&s.push(Qt);let a=[];try{let o=await ee.load(t);if(!e){if(typeof o=="string")try{JSON.parse(o),e={type:"json"}}catch{e={type:"csv",parse:"auto"}}typeof o=="object"&&(e={type:"json"})}let u=(e==null?void 0:e.type)==="csv";u&&typeof o=="string"&&(o=rr(o)),u&&typeof o=="string"&&i&&(o=ir(o));let d=(e==null?void 0:e.parse)||"auto";return typeof d=="object"&&(d=yt.mapValues(d,c=>c==="time"?"string":c==="datetime"?"date":c)),a=s.map(c=>c()),u?st(o,{...e,parse:d}):st(o,e)}finally{a.forEach(o=>o())}}function nr(t,e=!0){let n=[te];e&&n.push(Qt);let r=n.map(s=>s()),i=st(t,{type:"csv",parse:"auto"});return r.forEach(s=>s()),i}function rr(t){return t!=null&&t.includes(",")?ne(t,e=>{let n=new Set;return e.map(r=>{let i=ar(r,n);return n.add(i),i})}):t}function ir(t){return t!=null&&t.includes(".")?ne(t,e=>e.map(n=>n.replaceAll(".","\u2024"))):t}function ne(t,e){let n=t.split(`
|
|
1
|
+
var de=Object.defineProperty;var he=(t,e,n)=>e in t?de(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var A=(t,e,n)=>he(t,typeof e!="symbol"?e+"":e,n);var at,lt,ot,ut,ct;import{_ as fe,d as yt}from"./useEventListener-BakX-tnw.js";import{St as pt,a as ye,c as pe,gt as ge,o as me,wt as ve}from"./vega-loader.browser-BJ9oKrvH.js";const gt=Uint8Array.of(65,82,82,79,87,49),$={V1:0,V2:1,V3:2,V4:3,V5:4},S={NONE:0,Schema:1,DictionaryBatch:2,RecordBatch:3,Tensor:4,SparseTensor:5},l={Dictionary:-1,NONE:0,Null:1,Int:2,Float:3,Binary:4,Utf8:5,Bool:6,Decimal:7,Date:8,Time:9,Timestamp:10,Interval:11,List:12,Struct:13,Union:14,FixedSizeBinary:15,FixedSizeList:16,Map:17,Duration:18,LargeBinary:19,LargeUtf8:20,LargeList:21,RunEndEncoded:22,BinaryView:23,Utf8View:24,ListView:25,LargeListView:26},mt={HALF:0,SINGLE:1,DOUBLE:2},z={DAY:0,MILLISECOND:1},m={SECOND:0,MILLISECOND:1,MICROSECOND:2,NANOSECOND:3},C={YEAR_MONTH:0,DAY_TIME:1,MONTH_DAY_NANO:2},W={Sparse:0,Dense:1},vt=Uint8Array,bt=Uint16Array,xt=Uint32Array,wt=BigUint64Array,It=Int8Array,be=Int16Array,x=Int32Array,L=BigInt64Array,xe=Float32Array,k=Float64Array;function we(t,e){let n=Math.log2(t)-3;return(e?[It,be,x,L]:[vt,bt,xt,wt])[n]}Object.getPrototypeOf(Int8Array);function X(t,e){let n=0,r=t.length;if(r<=2147483648)do{let i=n+r>>>1;t[i]<=e?n=i+1:r=i}while(n<r);else do{let i=Math.trunc((n+r)/2);t[i]<=e?n=i+1:r=i}while(n<r);return n}function J(t,e,n){if(e(t))return t;throw Error(n(t))}function w(t,e,n){return e=Array.isArray(e)?e:Object.values(e),J(t,r=>e.includes(r),n??(()=>`${t} must be one of ${e}`))}function Lt(t,e){for(let[n,r]of Object.entries(t))if(r===e)return n;return"<Unknown>"}const Z=t=>`Unsupported data type: "${Lt(l,t)}" (id ${t})`,At=(t,e,n=!0,r=null)=>({name:t,type:e,nullable:n,metadata:r});function Nt(t){return Object.hasOwn(t,"name")&&Et(t.type)}function Et(t){return typeof(t==null?void 0:t.typeId)=="number"}function B(t,e="",n=!0){return Nt(t)?t:At(e,J(t,Et,()=>"Data type expected."),n)}const Ie=(t,e,n=!1,r=-1)=>({typeId:l.Dictionary,id:r,dictionary:t,indices:e||St(),ordered:n}),Dt=(t=32,e=!0)=>({typeId:l.Int,bitWidth:w(t,[8,16,32,64]),signed:e,values:we(t,e)}),St=()=>Dt(32),Le=(t=2)=>({typeId:l.Float,precision:w(t,mt),values:[bt,xe,k][t]}),Ae=()=>({typeId:l.Binary,offsets:x}),Ne=()=>({typeId:l.Utf8,offsets:x}),Ee=(t,e,n=128)=>({typeId:l.Decimal,precision:t,scale:e,bitWidth:w(n,[128,256]),values:wt}),De=t=>({typeId:l.Date,unit:w(t,z),values:t===z.DAY?x:L}),Se=(t=m.MILLISECOND,e=32)=>({typeId:l.Time,unit:w(t,m),bitWidth:w(e,[32,64]),values:e===32?x:L}),Be=(t=m.MILLISECOND,e=null)=>({typeId:l.Timestamp,unit:w(t,m),timezone:e,values:L}),Oe=(t=C.MONTH_DAY_NANO)=>({typeId:l.Interval,unit:w(t,C),values:t===C.MONTH_DAY_NANO?void 0:x}),Te=t=>({typeId:l.List,children:[B(t)],offsets:x}),Me=t=>({typeId:l.Struct,children:Array.isArray(t)&&Nt(t[0])?t:Object.entries(t).map(([e,n])=>At(e,n))}),Ce=(t,e,n,r)=>(n??(n=e.map((i,s)=>s)),{typeId:l.Union,mode:w(t,W),typeIds:n,typeMap:n.reduce((i,s,a)=>(i[s]=a,i),{}),children:e.map((i,s)=>B(i,`_${s}`)),typeIdForValue:r,offsets:x}),Ue=t=>({typeId:l.FixedSizeBinary,stride:t}),Ve=(t,e)=>({typeId:l.FixedSizeList,stride:e,children:[B(t)]}),Fe=(t,e)=>({typeId:l.Map,keysSorted:t,children:[e],offsets:x}),Re=(t=m.MILLISECOND)=>({typeId:l.Duration,unit:w(t,m),values:L}),$e=()=>({typeId:l.LargeBinary,offsets:L}),ze=()=>({typeId:l.LargeUtf8,offsets:L}),ke=t=>({typeId:l.LargeList,children:[B(t)],offsets:L}),je=(t,e)=>({typeId:l.RunEndEncoded,children:[J(B(t,"run_ends"),n=>n.type.typeId===l.Int,()=>"Run-ends must have an integer type."),B(e,"values")]}),Ye=t=>({typeId:l.ListView,children:[B(t,"value")],offsets:x}),_e=t=>({typeId:l.LargeListView,children:[B(t,"value")],offsets:L});var j=new k(2).buffer;new L(j),new xt(j),new x(j),new vt(j);function O(t){if(t>2**53-1||t<-(2**53-1))throw Error(`BigInt exceeds integer number representation: ${t}`);return Number(t)}function G(t,e){return Number(t/e)+Number(t%e)/Number(e)}var U=t=>BigInt.asUintN(64,t);function He(t,e){let n=e<<1,r;return BigInt.asIntN(64,t[n+1])<0?(r=U(~t[n])|U(~t[n+1])<<64n,r=-(r+1n)):r=t[n]|t[n+1]<<64n,r}function Pe(t,e){let n=e<<2,r;return BigInt.asIntN(64,t[n+3])<0?(r=U(~t[n])|U(~t[n+1])<<64n|U(~t[n+2])<<128n|U(~t[n+3])<<192n,r=-(r+1n)):r=t[n]|t[n+1]<<64n|t[n+2]<<128n|t[n+3]<<192n,r}var We=new TextDecoder("utf-8");new TextEncoder;function Y(t){return We.decode(t)}function Bt(t,e){return(t[e>>3]&1<<e%8)!=0}function N(t,e){let n=e+h(t,e),r=n-h(t,n),i=v(t,r);return(s,a,o=null)=>{if(s<i){let u=v(t,r+s);if(u)return a(t,n+u)}return o}}function M(t,e){return e}function F(t,e){return!!Xe(t,e)}function Xe(t,e){return q(t,e)<<24>>24}function q(t,e){return t[e]}function v(t,e){return Je(t,e)<<16>>16}function Je(t,e){return t[e]|t[e+1]<<8}function h(t,e){return t[e]|t[e+1]<<8|t[e+2]<<16|t[e+3]<<24}function Ot(t,e){return h(t,e)>>>0}function b(t,e){return O(BigInt.asIntN(64,BigInt(Ot(t,e))+(BigInt(Ot(t,e+4))<<32n)))}function _(t,e){let n=e+h(t,e),r=h(t,n);return n+=4,Y(t.subarray(n,n+r))}function T(t,e,n,r){if(!e)return[];let i=e+h(t,e);return Array.from({length:h(t,i)},(s,a)=>r(t,i+4+a*n))}const K=Symbol("rowIndex");function Q(t,e){class n{constructor(s){this[K]=s}toJSON(){return Mt(t,e,this[K])}}let r=n.prototype;for(let i=0;i<t.length;++i){if(Object.hasOwn(r,t[i]))continue;let s=e[i];Object.defineProperty(r,t[i],{get(){return s.at(this[K])},enumerable:!0})}return i=>new n(i)}function Tt(t,e){return n=>Mt(t,e,n)}function Mt(t,e,n){let r={};for(let i=0;i<t.length;++i)r[t[i]]=e[i].at(n);return r}function Ze(t){return t instanceof P}var H=(at=class{constructor({length:t,nullCount:e,type:n,validity:r,values:i,offsets:s,sizes:a,children:o}){this.length=t,this.nullCount=e,this.type=n,this.validity=r,this.values=i,this.offsets=s,this.sizes=a,this.children=o,(!e||!this.validity)&&(this.at=u=>this.value(u))}get[Symbol.toStringTag](){return"Batch"}at(t){return this.isValid(t)?this.value(t):null}isValid(t){return Bt(this.validity,t)}value(t){return this.values[t]}slice(t,e){let n=e-t,r=Array(n);for(let i=0;i<n;++i)r[i]=this.at(t+i);return r}*[Symbol.iterator](){for(let t=0;t<this.length;++t)yield this.at(t)}},A(at,"ArrayType",null),at),P=class extends H{constructor(t){super(t);let{length:e,values:n}=this;this.values=n.subarray(0,e)}slice(t,e){return this.nullCount?super.slice(t,e):this.values.subarray(t,e)}[Symbol.iterator](){return this.nullCount?super[Symbol.iterator]():this.values[Symbol.iterator]()}},tt=(lt=class extends H{},A(lt,"ArrayType",k),lt),f=(ot=class extends H{},A(ot,"ArrayType",Array),ot),Ge=class extends f{value(t){return null}},V=class extends tt{value(t){return O(this.values[t])}},qe=class extends tt{value(t){let e=this.values[t],n=(e&31744)>>10,r=(e&1023)/1024,i=(-1)**((e&32768)>>15);switch(n){case 31:return i*(r?NaN:1/0);case 0:return i*(r?6103515625e-14*r:0)}return i*2**(n-15)*(1+r)}},Ke=class extends f{value(t){return Bt(this.values,t)}},Ct=class extends H{constructor(t){super(t);let{bitWidth:e,scale:n}=this.type;this.decimal=e===128?He:Pe,this.scale=10n**BigInt(n)}},Qe=(ut=class extends Ct{value(t){return G(this.decimal(this.values,t),this.scale)}},A(ut,"ArrayType",k),ut),tn=(ct=class extends Ct{value(t){return this.decimal(this.values,t)}},A(ct,"ArrayType",Array),ct),Ut=class extends f{constructor(t){super(t),this.source=t}value(t){return new Date(this.source.value(t))}},en=class extends tt{value(t){return 864e5*this.values[t]}};const nn=V;var rn=class extends V{value(t){return super.value(t)*1e3}};const sn=V;var an=class extends V{value(t){return G(this.values[t],1000n)}},ln=class extends V{value(t){return G(this.values[t],1000000n)}},on=class extends f{value(t){return this.values.subarray(t<<1,t+1<<1)}},un=class extends f{value(t){let e=this.values,n=t<<4;return Float64Array.of(h(e,n),h(e,n+4),b(e,n+8))}},Vt=({values:t,offsets:e},n)=>t.subarray(e[n],e[n+1]),Ft=({values:t,offsets:e},n)=>t.subarray(O(e[n]),O(e[n+1])),cn=class extends f{value(t){return Vt(this,t)}},dn=class extends f{value(t){return Ft(this,t)}},hn=class extends f{value(t){return Y(Vt(this,t))}},fn=class extends f{value(t){return Y(Ft(this,t))}},yn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(e[t],e[t+1])}},pn=class extends f{value(t){let e=this.offsets;return this.children[0].slice(O(e[t]),O(e[t+1]))}},gn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(e,n)}},mn=class extends f{value(t){let e=this.offsets[t],n=e+this.sizes[t];return this.children[0].slice(O(e),O(n))}},Rt=class extends f{constructor(t){super(t),this.stride=this.type.stride}},vn=class extends Rt{value(t){let{stride:e,values:n}=this;return n.subarray(t*e,(t+1)*e)}},bn=class extends Rt{value(t){let{children:e,stride:n}=this;return e[0].slice(t*n,(t+1)*n)}};function $t({children:t,offsets:e},n){let[r,i]=t[0].children,s=e[n],a=e[n+1],o=[];for(let u=s;u<a;++u)o.push([r.at(u),i.at(u)]);return o}var xn=class extends f{value(t){return $t(this,t)}},wn=class extends f{value(t){return new Map($t(this,t))}},zt=class extends f{constructor({typeIds:t,...e}){super(e),this.typeIds=t,this.typeMap=this.type.typeMap}value(t,e=t){let{typeIds:n,children:r,typeMap:i}=this;return r[i[n[t]]].at(e)}},In=class extends zt{value(t){return super.value(t,this.offsets[t])}},kt=class extends f{constructor(t,e=Tt){super(t),this.names=this.type.children.map(n=>n.name),this.factory=e(this.names,this.children)}value(t){return this.factory(t)}},Ln=class extends kt{constructor(t){super(t,Q)}},An=class extends f{value(t){let[{values:e},n]=this.children;return n.at(X(e,t))}},Nn=class extends f{setDictionary(t){return this.dictionary=t,this.cache=t.cache(),this}value(t){return this.cache[this.key(t)]}key(t){return this.values[t]}},jt=class extends f{constructor({data:t,...e}){super(e),this.data=t}view(t){let{values:e,data:n}=this,r=t<<4,i=r+4,s=e,a=h(s,r);return a>12&&(i=h(s,r+12),s=n[h(s,r+8)]),s.subarray(i,i+a)}},En=class extends jt{value(t){return this.view(t)}},Dn=class extends jt{value(t){return Y(this.view(t))}};function Yt(t){let e=[];return{add(n){return e.push(n),this},clear:()=>e=[],done:()=>new Sn(e,t)}}var Sn=class{constructor(t,e=(n=>(n=t[0])==null?void 0:n.type)()){this.type=e,this.length=t.reduce((s,a)=>s+a.length,0),this.nullCount=t.reduce((s,a)=>s+a.nullCount,0),this.data=t;let r=t.length,i=new Int32Array(r+1);if(r===1){let[s]=t;i[1]=s.length,this.at=a=>s.at(a)}else for(let s=0,a=0;s<r;++s)i[s+1]=a+=t[s].length;this.offsets=i}get[Symbol.toStringTag](){return"Column"}[Symbol.iterator](){let t=this.data;return t.length===1?t[0][Symbol.iterator]():Bn(t)}at(t){var i;let{data:e,offsets:n}=this,r=X(n,t)-1;return(i=e[r])==null?void 0:i.at(t-n[r])}get(t){return this.at(t)}toArray(){let{length:t,nullCount:e,data:n}=this,r=!e&&Ze(n[0]),i=n.length;if(r&&i===1)return n[0].values;let s=new(!i||e>0?Array:n[0].constructor.ArrayType??n[0].values.constructor)(t);return r?On(s,n):Tn(s,n)}cache(){return this._cache??(this._cache=this.toArray())}};function*Bn(t){for(let e=0;e<t.length;++e){let n=t[e][Symbol.iterator]();for(let r=n.next();!r.done;r=n.next())yield r.value}}function On(t,e){for(let n=0,r=0;n<e.length;++n){let{values:i}=e[n];t.set(i,r),r+=i.length}return t}function Tn(t,e){let n=-1;for(let r=0;r<e.length;++r){let i=e[r];for(let s=0;s<i.length;++s)t[++n]=i.at(s)}return t}var Mn=class ue{constructor(e,n,r=!1){let i=e.fields.map(a=>a.name);this.schema=e,this.names=i,this.children=n,this.factory=r?Q:Tt;let s=[];this.getFactory=a=>s[a]??(s[a]=this.factory(i,n.map(o=>o.data[a])))}get[Symbol.toStringTag](){return"Table"}get numCols(){return this.names.length}get numRows(){var e;return((e=this.children[0])==null?void 0:e.length)??0}getChildAt(e){return this.children[e]}getChild(e){let n=this.names.findIndex(r=>r===e);return n>-1?this.children[n]:void 0}selectAt(e,n=[]){let{children:r,factory:i,schema:s}=this,{fields:a}=s;return new ue({...s,fields:e.map((o,u)=>Cn(a[o],n[u]))},e.map(o=>r[o]),i===Q)}select(e,n){let r=this.names,i=e.map(s=>r.indexOf(s));return this.selectAt(i,n)}toColumns(){let{children:e,names:n}=this,r={};return n.forEach((i,s)=>{var a;return r[i]=((a=e[s])==null?void 0:a.toArray())??[]}),r}toArray(){var a;let{children:e,getFactory:n,numRows:r}=this,i=((a=e[0])==null?void 0:a.data)??[],s=Array(r);for(let o=0,u=-1;o<i.length;++o){let d=n(o);for(let c=0;c<i[o].length;++c)s[++u]=d(c)}return s}*[Symbol.iterator](){var i;let{children:e,getFactory:n}=this,r=((i=e[0])==null?void 0:i.data)??[];for(let s=0;s<r.length;++s){let a=n(s);for(let o=0;o<r[s].length;++o)yield a(o)}}at(e){let{children:n,getFactory:r,numRows:i}=this;if(e<0||e>=i)return null;let[{offsets:s}]=n,a=X(s,e)-1;return r(a)(e-s[a])}get(e){return this.at(e)}};function Cn(t,e){return e!=null&&e!==t.name?{...t,name:e}:t}function Un(t,e={}){let{typeId:n,bitWidth:r,precision:i,unit:s}=t,{useBigInt:a,useDate:o,useDecimalBigInt:u,useMap:d,useProxy:c}=e;switch(n){case l.Null:return Ge;case l.Bool:return Ke;case l.Int:case l.Time:case l.Duration:return a||r<64?P:V;case l.Float:return i?P:qe;case l.Date:return _t(s===z.DAY?en:nn,o&&Ut);case l.Timestamp:return _t(s===m.SECOND?rn:s===m.MILLISECOND?sn:s===m.MICROSECOND?an:ln,o&&Ut);case l.Decimal:return u?tn:Qe;case l.Interval:return s===C.DAY_TIME?on:s===C.YEAR_MONTH?P:un;case l.FixedSizeBinary:return vn;case l.Utf8:return hn;case l.LargeUtf8:return fn;case l.Binary:return cn;case l.LargeBinary:return dn;case l.BinaryView:return En;case l.Utf8View:return Dn;case l.List:return yn;case l.LargeList:return pn;case l.Map:return d?wn:xn;case l.ListView:return gn;case l.LargeListView:return mn;case l.FixedSizeList:return bn;case l.Struct:return c?Ln:kt;case l.RunEndEncoded:return An;case l.Dictionary:return Nn;case l.Union:return t.mode?In:zt}throw Error(Z(n))}function _t(t,e){return e?class extends e{constructor(n){super(new t(n))}}:t}function Vn(t,e){return{offset:b(t,e),metadataLength:h(t,e+8),bodyLength:b(t,e+16)}}function Ht(t,e){return T(t,e,24,Vn)}function Pt(t,e,n){let r=N(t,e);if(r(10,M,0))throw Error("Record batch compression not implemented");let i=n<$.V4?8:0;return{length:r(4,b,0),nodes:T(t,r(6,M),16,(s,a)=>({length:b(s,a),nullCount:b(s,a+8)})),regions:T(t,r(8,M),16+i,(s,a)=>({offset:b(s,a+i),length:b(s,a+i+8)})),variadic:T(t,r(12,M),8,b)}}function Fn(t,e,n){let r=N(t,e);return{id:r(4,b,0),data:r(6,(i,s)=>Pt(i,s,n)),isDelta:r(8,F,!1)}}function Wt(t,e,n,r){w(n,l,Z);let i=N(t,e);switch(n){case l.Binary:return Ae();case l.Utf8:return Ne();case l.LargeBinary:return $e();case l.LargeUtf8:return ze();case l.List:return Te(r[0]);case l.ListView:return Ye(r[0]);case l.LargeList:return ke(r[0]);case l.LargeListView:return _e(r[0]);case l.Struct:return Me(r);case l.RunEndEncoded:return je(r[0],r[1]);case l.Int:return Dt(i(4,h,0),i(6,F,!1));case l.Float:return Le(i(4,v,mt.HALF));case l.Decimal:return Ee(i(4,h,0),i(6,h,0),i(8,h,128));case l.Date:return De(i(4,v,z.MILLISECOND));case l.Time:return Se(i(4,v,m.MILLISECOND),i(6,h,32));case l.Timestamp:return Be(i(4,v,m.SECOND),i(6,_));case l.Interval:return Oe(i(4,v,C.YEAR_MONTH));case l.Duration:return Re(i(4,v,m.MILLISECOND));case l.FixedSizeBinary:return Ue(i(4,h,0));case l.FixedSizeList:return Ve(r[0],i(4,h,0));case l.Map:return Fe(i(4,F,!1),r[0]);case l.Union:return Ce(i(4,v,W.Sparse),r,T(t,i(6,M),4,h))}return{typeId:n}}function et(t,e){let n=T(t,e,4,(r,i)=>{let s=N(r,i);return[s(4,_),s(6,_)]});return n.length?new Map(n):null}function Xt(t,e,n){let r=N(t,e);return{version:n,endianness:r(4,v,0),fields:r(6,Rn,[]),metadata:r(8,et)}}function Rn(t,e){return T(t,e,4,Jt)}function Jt(t,e){let n=N(t,e),r=n(8,q,l.NONE),i=n(10,M,0),s=n(12,zn),a=Wt(t,i,r,n(14,(o,u)=>$n(o,u)));return s&&(s.dictionary=a,a=s),{name:n(4,_),type:a,nullable:n(6,F,!1),metadata:n(16,et)}}function $n(t,e){let n=T(t,e,4,Jt);return n.length?n:null}function zn(t,e){if(!e)return null;let n=N(t,e);return Ie(null,n(6,kn,St()),n(8,F,!1),n(4,b,0))}function kn(t,e){return Wt(t,e,l.Int)}var jn=(t,e)=>`Expected to read ${t} metadata bytes, but only read ${e}.`,Yn=(t,e)=>`Expected to read ${t} bytes for message body, but only read ${e}.`,_n=t=>`Unsupported message type: ${t} (${Lt(S,t)})`;function nt(t,e){let n=h(t,e)||0;if(e+=4,n===-1&&(n=h(t,e)||0,e+=4),n===0)return null;let r=t.subarray(e,e+=n);if(r.byteLength<n)throw Error(jn(n,r.byteLength));let i=N(r,0),s=i(4,v,$.V1),a=i(6,q,S.NONE),o=i(8,M,0),u=i(10,b,0),d;if(o){let c=a===S.Schema?Xt:a===S.DictionaryBatch?Fn:a===S.RecordBatch?Pt:null;if(!c)throw Error(_n(a));if(d=c(r,o,s),u>0){let g=t.subarray(e,e+=u);if(g.byteLength<u)throw Error(Yn(u,g.byteLength));d.body=g}}return{version:s,type:a,index:e,content:d}}function Hn(t){let e=t instanceof ArrayBuffer?new Uint8Array(t):t;return e instanceof Uint8Array&&Pn(e)?Xn(e):Wn(e)}function Pn(t){if(!t||t.length<4)return!1;for(let e=0;e<6;++e)if(gt[e]!==t[e])return!1;return!0}function Wn(t){let e=[t].flat(),n,r=[],i=[];for(let s of e){if(!(s instanceof Uint8Array))throw Error("IPC data batch was not a Uint8Array.");let a=0;for(;;){let o=nt(s,a);if(o===null)break;if(a=o.index,o.content)switch(o.type){case S.Schema:n||(n=o.content);break;case S.RecordBatch:r.push(o.content);break;case S.DictionaryBatch:i.push(o.content);break}}}return{schema:n,dictionaries:i,records:r,metadata:null}}function Xn(t){let e=t.byteLength-(gt.length+4),n=N(t,e-h(t,e)),r=n(4,v,$.V1),i=n(8,Ht,[]),s=n(10,Ht,[]);return{schema:n(6,(a,o)=>Xt(a,o,r)),dictionaries:i.map(({offset:a})=>nt(t,a).content),records:s.map(({offset:a})=>nt(t,a).content),metadata:n(12,et)}}function rt(t,e){return Jn(Hn(t),e)}function Jn(t,e={}){let{schema:n={fields:[]},dictionaries:r,records:i}=t,{version:s,fields:a}=n,o=new Map,u=Gn(e,s,o),d=new Map;Zn(n,y=>{let p=y.type;p.typeId===l.Dictionary&&d.set(p.id,p.dictionary)});let c=new Map;for(let y of r){let{id:p,data:E,isDelta:D,body:ce}=y,dt=d.get(p),ht=it(dt,u({...E,body:ce}));if(c.has(p)){let ft=c.get(p);D||ft.clear(),ft.add(ht)}else{if(D)throw Error("Delta update can not be first dictionary batch.");c.set(p,Yt(dt).add(ht))}}c.forEach((y,p)=>o.set(p,y.done()));let g=a.map(y=>Yt(y.type));for(let y of i){let p=u(y);a.forEach((E,D)=>g[D].add(it(E.type,p)))}return new Mn(n,g.map(y=>y.done()),e.useProxy)}function Zn(t,e){t.fields.forEach(function n(r){var i,s,a;e(r),(s=(i=r.type.dictionary)==null?void 0:i.children)==null||s.forEach(n),(a=r.type.children)==null||a.forEach(n)})}function Gn(t,e,n){let r={version:e,options:t,dictionary:i=>n.get(i)};return i=>{let{length:s,nodes:a,regions:o,variadic:u,body:d}=i,c=-1,g=-1,y=-1;return{...r,length:s,node:()=>a[++c],buffer:p=>{let{length:E,offset:D}=o[++g];return p?new p(d.buffer,d.byteOffset+D,E/p.BYTES_PER_ELEMENT):d.subarray(D,D+E)},variadic:()=>u[++y],visit(p){return p.map(E=>it(E.type,this))}}}}function it(t,e){let{typeId:n}=t,{length:r,options:i,node:s,buffer:a,variadic:o,version:u}=e,d=Un(t,i);if(n===l.Null)return new d({length:r,nullCount:r,type:t});let c={...s(),type:t};switch(n){case l.Bool:case l.Int:case l.Time:case l.Duration:case l.Float:case l.Decimal:case l.Date:case l.Timestamp:case l.Interval:case l.FixedSizeBinary:return new d({...c,validity:a(),values:a(t.values)});case l.Utf8:case l.LargeUtf8:case l.Binary:case l.LargeBinary:return new d({...c,validity:a(),offsets:a(t.offsets),values:a()});case l.BinaryView:case l.Utf8View:return new d({...c,validity:a(),values:a(),data:Array.from({length:o()},()=>a())});case l.List:case l.LargeList:case l.Map:return new d({...c,validity:a(),offsets:a(t.offsets),children:e.visit(t.children)});case l.ListView:case l.LargeListView:return new d({...c,validity:a(),offsets:a(t.offsets),sizes:a(t.offsets),children:e.visit(t.children)});case l.FixedSizeList:case l.Struct:return new d({...c,validity:a(),children:e.visit(t.children)});case l.RunEndEncoded:return new d({...c,children:e.visit(t.children)});case l.Dictionary:{let{id:g,indices:y}=t;return new d({...c,validity:a(),values:a(y.values)}).setDictionary(e.dictionary(g))}case l.Union:return u<$.V5&&a(),new d({...c,typeIds:a(It),offsets:t.mode===W.Sparse?null:a(t.offsets),children:e.visit(t.children)});default:throw Error(Z(n))}}new Uint16Array(new Uint8Array([1,0]).buffer)[0];function R(t,e){let n=new Map;return(...r)=>{let i=e(...r);if(n.has(i))return n.get(i);let s=t(...r).finally(()=>{n.delete(i)});return n.set(i,s),s}}function st(t,e){return me(t,e)}function qn(){return ye()}const I=pe;function Zt(){let t=Kn(qn()),e=n=>JSON.stringify(n);return{load:R(t.load.bind(t),e),sanitize:R(t.sanitize.bind(t),e),http:R(t.http.bind(t),e),file:R(t.file.bind(t),e)}}function Kn(t){return{...t,async load(e,n){return e.endsWith(".arrow")?rt(await Gt(e),{useProxy:!1}).toArray():t.load(e,n)}}}const Gt=R(t=>fetch(t).then(e=>e.arrayBuffer()),t=>t);var qt=I.integer,Kt=I.number,Qn=I.date,tr=I.boolean,Qt=()=>(I.integer=t=>{if(t==="")return"";if(t==="-inf"||t==="inf")return t;function e(r){let i=qt(r);return Number.isNaN(i)?r:i}let n=Number.parseInt(t,10);if(Number.isNaN(n))return t;if(!(Math.abs(n)>2**53-1))return e(t);try{return BigInt(t)}catch{return e(t)}},I.number=t=>{if(t==="-inf"||t==="inf")return t;let e=Kt(t);return Number.isNaN(e)?t:e},()=>{I.integer=qt,I.number=Kt}),te=()=>(I.date=t=>{if(t==="")return"";if(t==null)return null;if(!/^\d{4}-\d{2}-\d{2}(T[\d.:]+(Z|[+-]\d{2}:?\d{2})?)?$/.test(t))return t;try{let e=new Date(t);return Number.isNaN(e.getTime())?t:e}catch{return fe.warn(`Failed to parse date: ${t}`),t}},()=>{I.date=Qn});I.boolean=t=>t==="True"?!0:t==="False"?!1:tr(t);const ee=Zt();async function er(t,e,n={}){let{handleBigIntAndNumberLike:r=!1,replacePeriod:i=!1}=n;if(t.endsWith(".arrow")||(e==null?void 0:e.type)==="arrow")return rt(await Gt(t),{useProxy:!0,useDate:!0,useBigInt:r}).toArray();let s=[te];r&&s.push(Qt);let a=[];try{let o=await ee.load(t);if(!e){if(typeof o=="string")try{JSON.parse(o),e={type:"json"}}catch{e={type:"csv",parse:"auto"}}typeof o=="object"&&(e={type:"json"})}let u=(e==null?void 0:e.type)==="csv";u&&typeof o=="string"&&(o=rr(o)),u&&typeof o=="string"&&i&&(o=ir(o));let d=(e==null?void 0:e.parse)||"auto";return typeof d=="object"&&(d=yt.mapValues(d,c=>c==="time"?"string":c==="datetime"?"date":c)),a=s.map(c=>c()),u?st(o,{...e,parse:d}):st(o,e)}finally{a.forEach(o=>o())}}function nr(t,e=!0){let n=[te];e&&n.push(Qt);let r=n.map(s=>s()),i=st(t,{type:"csv",parse:"auto"});return r.forEach(s=>s()),i}function rr(t){return t!=null&&t.includes(",")?ne(t,e=>{let n=new Set;return e.map(r=>{let i=ar(r,n);return n.add(i),i})}):t}function ir(t){return t!=null&&t.includes(".")?ne(t,e=>e.map(n=>n.replaceAll(".","\u2024"))):t}function ne(t,e){let n=t.split(`
|
|
2
2
|
`);return n[0]=e(n[0].split(",")).join(","),n.join(`
|
|
3
3
|
`)}var sr="\u200B";function ar(t,e){let n=t,r=1;for(;e.has(n);)n=`${t}${sr.repeat(r)}`,r++;return n}var lr={version:"1.1.0"};function or(t,e,n,r){if(ge(t))return`[${t.map(i=>e(ve(i)?i:re(i,n))).join(", ")}]`;if(pt(t)){let i="",{title:s,image:a,...o}=t;s&&(i+=`<h2>${e(s)}</h2>`),a&&(i+=`<img src="${new URL(e(a),r||location.href).href}">`);let u=Object.keys(o);if(u.length>0){i+="<table>";for(let d of u){let c=o[d];c!==void 0&&(pt(c)&&(c=re(c,n)),i+=`<tr><td class="key">${e(d)}</td><td class="value">${e(c)}</td></tr>`)}i+="</table>"}return i||"{}"}return e(t)}function ur(t){let e=[];return function(n,r){return typeof r!="object"||!r?r:(e.length=e.indexOf(this)+1,e.length>t?"[Object]":e.indexOf(r)>=0?"[Circular]":(e.push(r),r))}}function re(t,e){return JSON.stringify(t,ur(e))}var cr=`#vg-tooltip-element {
|
|
4
4
|
visibility: hidden;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as Z}from"./chunk-LvLJmgfZ.js";import{n as C}from"./useEvent-D91BmmQi.js";import{t as Y}from"./react-Bj1aDYRI.js";import"./react-dom-CSu739Rf.js";import{t as tt}from"./compiler-runtime-B3qBwwSJ.js";import{t as et}from"./debounce-OiXznToA.js";import{_,d as V}from"./useEventListener-BakX-tnw.js";import{n as H}from"./config-3clPIEB9.js";import{t as nt}from"./cn-X2M2usMq.js";import{t as rt}from"./jsx-runtime-PbYoItBR.js";import"./fullscreen-BXI8V5i6.js";import{t as at}from"./tooltip-CgQpRVyN.js";import{r as it}from"./button-BF7GSjhW.js";import{d as N}from"./arrays-DWxvyYxP.js";import{u as ot}from"./toDate-DCE7d2fN.js";import"./session-CsT5Gg9j.js";import{r as lt}from"./useTheme-D_ZbTTJw.js";import{t as ct}from"./isValid-DKyiOp4U.js";import{a as st,r as mt,t as pt}from"./utils-DPvpQ891.js";import{n as ut}from"./vega-loader.browser-CZV6_g2i.js";import{t as ft}from"./react-vega-BfOzG-mm.js";import"./defaultLocale-OkOxlkkM.js";import"./defaultLocale-DK1MWd7f.js";import{r as dt,t as ht}from"./alert-1y_DnRWn.js";import{n as gt}from"./error-banner-BSQVN46J.js";import{t as yt}from"./formats-ZGU43GQU.js";import{n as vt}from"./useAsyncData-DAQcLiyE.js";import{t as F}from"./useDeepCompareMemoize-CWcgQCbT.js";import{t as kt}from"./semaphore-X3ApuO41.js";var bt=tt(),S=Z(Y(),1);function wt(t){return t.data&&"url"in t.data&&(t.data.url=H(t.data.url).href),t}const u={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"};var W=new Set(["boxplot","errorband","errorbar"]);const x={getMarkType(t){let e=typeof t=="string"?t:t.type;if(W.has(e))throw Error("Not supported");return e},isInteractive(t){let e=typeof t=="string"?t:t.type;return!W.has(e)},makeClickable(t){let e=typeof t=="string"?t:t.type;return e in u?typeof t=="string"?{type:t,cursor:"pointer",tooltip:!0}:{...t,type:e,cursor:"pointer",tooltip:!0}:t},getOpacity(t){return typeof t=="string"?null:"opacity"in t&&typeof t.opacity=="number"?t.opacity:null}},v={point(t){return t==null?"select_point":`select_point_${t}`},interval(t){return t==null?"select_interval":`select_interval_${t}`},legendSelection(t){return`legend_selection_${t}`},binColoring(t){return t==null?"bin_coloring":`bin_coloring_${t}`},HIGHLIGHT:"highlight",PAN_ZOOM:"pan_zoom",hasPoint(t){return t.some(e=>e.startsWith("select_point"))},hasInterval(t){return t.some(e=>e.startsWith("select_interval"))},hasLegend(t){return t.some(e=>e.startsWith("legend_selection"))},hasPanZoom(t){return t.some(e=>e.startsWith("pan_zoom"))},isBinColoring(t){return t.startsWith("bin_coloring")}},j={highlight(){return{name:v.HIGHLIGHT,select:{type:"point",on:"mouseover"}}},interval(t,e){return{name:v.interval(e),select:{type:"interval",encodings:D(t),mark:{fill:"#669EFF",fillOpacity:.07,stroke:"#669EFF",strokeOpacity:.4},on:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]",translate:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]"}}},point(t,e){return{name:v.point(e),select:{type:"point",encodings:D(t),on:"click[!event.metaKey]"}}},binColoring(t){return{name:v.binColoring(t),select:{type:"point",on:"click[!event.metaKey]"}}},legend(t){return{name:v.legendSelection(t),select:{type:"point",fields:[t]},bind:"legend"}},panZoom(){return{name:v.PAN_ZOOM,bind:"scales",select:{type:"interval",on:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",translate:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",zoom:"wheel![event.metaKey]"}}}};function D(t){switch(x.getMarkType(t.mark)){case u.image:case u.trail:return;case u.area:case u.arc:return["color"];case u.bar:{let e=St(t);return e==="horizontal"?["y"]:e==="vertical"?["x"]:void 0}case u.circle:case u.geoshape:case u.line:case u.point:case u.rect:case u.rule:case u.square:case u.text:case u.tick:return["x","y"]}}function P(t){return"params"in t&&t.params&&t.params.length>0?N(t.params.filter(e=>e==null?!1:"select"in e&&e.select!==void 0).map(e=>e.name)):"layer"in t?N(t.layer.flatMap(P)):"vconcat"in t?N(t.vconcat.flatMap(P)):"hconcat"in t?N(t.hconcat.flatMap(P)):[]}function St(t){var a,i;if(!t||!("mark"in t))return;let e=(a=t.encoding)==null?void 0:a.x,n=(i=t.encoding)==null?void 0:i.y;if(e&&"type"in e&&e.type==="nominal")return"vertical";if(n&&"type"in n&&n.type==="nominal"||e&&"aggregate"in e)return"horizontal";if(n&&"aggregate"in n)return"vertical"}function xt(t){if(!t.encoding)return[];let e=[];for(let n of Object.values(t.encoding))n&&typeof n=="object"&&"bin"in n&&n.bin&&"field"in n&&typeof n.field=="string"&&e.push(n.field);return e}function G(t){if(!t||!("encoding"in t))return[];let{encoding:e}=t;return e?Object.entries(e).flatMap(n=>{let[a,i]=n;return!i||!At.has(a)?[]:"field"in i&&typeof i.field=="string"?[i.field]:"condition"in i&&i.condition&&typeof i.condition=="object"&&"field"in i.condition&&i.condition.field&&typeof i.condition.field=="string"?[i.condition.field]:[]}):[]}var At=new Set(["color","fill","fillOpacity","opacity","shape","size"]);function $(t,e,n,a){let i=n.filter(o=>v.isBinColoring(o)),r={and:(i.length>0?i:n).map(o=>({param:o}))};if(t==="opacity"){let o=x.getOpacity(a)||1;return{...e,opacity:{condition:{test:r,value:o},value:o/5}}}else return e}function _t(t){if(!("select"in t)||!t.select)return JSON.stringify(t);let e=t.select;if(typeof e=="string")return JSON.stringify({type:e,bind:t.bind});let n={type:e.type,encodings:"encodings"in e&&e.encodings?[...e.encodings].toSorted():void 0,fields:"fields"in e&&e.fields?[...e.fields].toSorted():void 0,bind:t.bind};return JSON.stringify(n)}function q(t){let e=E(t);if(e.length===0)return t;let n=jt(e);return n.length===0?t:{...L(K(t,new Set(n.map(a=>a.name))),n.map(a=>a.name)),params:[...t.params||[],...n]}}function E(t){let e=[];if("vconcat"in t&&Array.isArray(t.vconcat))for(let n of t.vconcat)e.push(...E(n));else if("hconcat"in t&&Array.isArray(t.hconcat))for(let n of t.hconcat)e.push(...E(n));else{if("layer"in t)return[];"mark"in t&&"params"in t&&t.params&&t.params.length>0&&e.push({params:t.params})}return e}function jt(t){if(t.length===0)return[];let e=new Map,n=t.length;for(let{params:i}of t){let r=new Set;for(let o of i){let s=_t(o);r.has(s)||(r.add(s),e.has(s)||e.set(s,{count:0,param:o}),e.get(s).count++)}}let a=[];for(let[,{count:i,param:r}]of e)i===n&&a.push(r);return a}function K(t,e){if("vconcat"in t&&Array.isArray(t.vconcat))return{...t,vconcat:t.vconcat.map(n=>K(n,e))};if("hconcat"in t&&Array.isArray(t.hconcat))return{...t,hconcat:t.hconcat.map(n=>K(n,e))};if("mark"in t&&"params"in t&&t.params){let n=t.params,a=[];for(let i of n){if(!i||typeof i!="object"||!("name"in i)){a.push(i);continue}e.has(i.name)||a.push(i)}if(a.length===0){let{params:i,...r}=t;return r}return{...t,params:a}}return t}function L(t,e){return"vconcat"in t&&Array.isArray(t.vconcat)?{...t,vconcat:t.vconcat.map(n=>L(n,e))}:"hconcat"in t&&Array.isArray(t.hconcat)?{...t,hconcat:t.hconcat.map(n=>L(n,e))}:"layer"in t?t:"mark"in t&&x.isInteractive(t.mark)?{...t,mark:x.makeClickable(t.mark),encoding:$("opacity",t.encoding||{},e,t.mark)}:t}function T(t,e){var s,h;let{chartSelection:n=!0,fieldSelection:a=!0}=e;if(!n&&!a)return t;(s=t.params)!=null&&s.some(l=>l.bind==="legend")&&(a=!1);let i=(h=t.params)==null?void 0:h.some(l=>!l.bind);i&&(n=!1);let r="vconcat"in t||"hconcat"in t;if(i&&r)return t;if("vconcat"in t){let l=t.vconcat.map(m=>"mark"in m?T(m,{chartSelection:n,fieldSelection:a}):m);return q({...t,vconcat:l})}if("hconcat"in t){let l=t.hconcat.map(m=>"mark"in m?T(m,{chartSelection:n,fieldSelection:a}):m);return q({...t,hconcat:l})}if("layer"in t){let l=t.params&&t.params.length>0,m=a!==!1&&!l,k=[];if(m){let p=t.layer.flatMap(f=>"mark"in f?G(f):[]);k=[...new Set(p)],Array.isArray(a)&&(k=k.filter(f=>a.includes(f)))}let w=t.layer.map((p,f)=>{if(!("mark"in p))return p;let g=p;if(f===0&&k.length>0){let O=k.map(M=>j.legend(M));g={...g,params:[...g.params||[],...O]}}return g=z(g,n,f),g=J(g),f===0&&(g=B(g)),g});return{...t,layer:w}}if(!("mark"in t)||!x.isInteractive(t.mark))return t;let o=t;return o=Ot(o,a),o=z(o,n,void 0),o=J(o),o=B(o),o}function Ot(t,e){if(e===!1)return t;let n=G(t);Array.isArray(e)&&(n=n.filter(r=>e.includes(r)));let a=n.map(r=>j.legend(r)),i=[...t.params||[],...a];return{...t,params:i}}function z(t,e,n){if(e===!1)return t;let a;try{a=x.getMarkType(t.mark)}catch{return t}if(a==="geoshape")return t;let i=xt(t),r=e===!0?i.length>0?["point"]:Mt(a):[e];if(!r||r.length===0)return t;let o=r.map(h=>h==="interval"?j.interval(t,n):j.point(t,n)),s=[...t.params||[],...o];return i.length>0&&r.includes("point")&&s.push(j.binColoring(n)),{...t,params:s}}function B(t){let e;try{e=x.getMarkType(t.mark)}catch{}if(e==="geoshape")return t;let n=t.params||[];return n.some(a=>a.bind==="scales")?t:{...t,params:[...n,j.panZoom()]}}function J(t){let e="encoding"in t?t.encoding:void 0,n=t.params||[],a=n.map(i=>i.name);return n.length===0||!x.isInteractive(t.mark)?t:{...t,mark:x.makeClickable(t.mark),encoding:$("opacity",e||{},a,t.mark)}}function Mt(t){switch(t){case"arc":case"area":return["point"];case"text":case"bar":return["point","interval"];case"line":return;default:return["point","interval"]}}var Nt=5;async function Pt(t){if(!t)return t;let e="datasets"in t?{...t.datasets}:{},n=new kt(Nt),a=async r=>{if(!r)return r;if("layer"in r){let l=await Promise.all(r.layer.map(a));r={...r,layer:l}}if("hconcat"in r){let l=await Promise.all(r.hconcat.map(a));r={...r,hconcat:l}}if("vconcat"in r){let l=await Promise.all(r.vconcat.map(a));r={...r,vconcat:l}}if("spec"in r&&(r={...r,spec:await a(r.spec)}),!r.data||!("url"in r.data))return r;let o;try{o=H(r.data.url)}catch{return r}let s=r.data.format,h=await n.run(()=>st(o.href,s));return e[o.pathname]=h,{...r,data:{name:o.pathname}}},i=await a(t);return Object.keys(e).length===0?i:{...i,datasets:e}}var d=Z(rt(),1);ut("arrow",yt);var It=t=>{let e=(0,bt.c)(12),{value:n,setValue:a,chartSelection:i,fieldSelection:r,spec:o,embedOptions:s}=t,h,l;e[0]===o?(h=e[1],l=e[2]):(h=async()=>Pt(o),l=[o],e[0]=o,e[1]=h,e[2]=l);let{data:m,error:k}=vt(h,l);if(k){let p;return e[3]===k?p=e[4]:(p=(0,d.jsx)(gt,{error:k}),e[3]=k,e[4]=p),p}if(!m)return null;let w;return e[5]!==i||e[6]!==s||e[7]!==r||e[8]!==m||e[9]!==a||e[10]!==n?(w=(0,d.jsx)(Ct,{value:n,setValue:a,chartSelection:i,fieldSelection:r,spec:m,embedOptions:s}),e[5]=i,e[6]=s,e[7]=r,e[8]=m,e[9]=a,e[10]=n,e[11]=w):w=e[11],w},Ct=({value:t,setValue:e,chartSelection:n,fieldSelection:a,spec:i,embedOptions:r})=>{let{theme:o}=lt(),s=(0,S.useRef)(null),h=(0,S.useRef)(void 0),[l,m]=(0,S.useState)(),k=(0,S.useMemo)(()=>r&&"actions"in r?r.actions:{source:!1,compiled:!1},[r]),w=F(i),p=(0,S.useMemo)(()=>T(wt(w),{chartSelection:n,fieldSelection:a}),[w,n,a]),f=(0,S.useMemo)(()=>P(p),[p]),g=C(c=>{e({...t,...c})}),O=(0,S.useMemo)(()=>et((c,y)=>{_.debug("[Vega signal]",c,y);let b=V.mapValues(y,Kt);b=V.mapValues(b,Et),g({[c]:b})},100),[g]),M=F(f),I=(0,S.useMemo)(()=>M.reduce((c,y)=>(v.PAN_ZOOM===y||v.isBinColoring(y)||c.push({signalName:y,handler:(b,X)=>O(b,X)}),c),[]),[M,O]),R=C(c=>{_.error(c),_.debug(p),m(c)}),Q=C(c=>{_.debug("[Vega view] created",c),h.current=c,m(void 0)}),U=()=>{let c=[];return v.hasPoint(f)&&c.push(["Point selection","click to select a point; hold shift for multi-select"]),v.hasInterval(f)&&c.push(["Interval selection","click and drag to select an interval"]),v.hasLegend(f)&&c.push(["Legend selection","click to select a legend item; hold shift for multi-select"]),v.hasPanZoom(f)&&c.push(["Pan","hold the meta key and drag"],["Zoom","hold the meta key and scroll"]),c.length===0?null:(0,d.jsx)(at,{delayDuration:300,side:"left",content:(0,d.jsx)("div",{className:"text-xs flex flex-col",children:c.map((y,b)=>(0,d.jsxs)("div",{children:[(0,d.jsxs)("span",{className:"font-bold tracking-wide",children:[y[0],":"]})," ",y[1]]},b))}),children:(0,d.jsx)(ot,{className:"absolute bottom-1 right-0 m-2 h-4 w-4 cursor-help text-muted-foreground hover:text-foreground"})})},A=ft({ref:s,spec:p,options:{theme:o==="dark"?"dark":void 0,actions:k,mode:"vega-lite",tooltip:mt.call,renderer:"canvas"},onError:R,onEmbed:Q});return(0,S.useEffect)(()=>(I.forEach(({signalName:c,handler:y})=>{try{A==null||A.view.addSignalListener(c,y)}catch(b){_.error(b)}}),()=>{I.forEach(({signalName:c,handler:y})=>{try{A==null||A.view.removeSignalListener(c,y)}catch(b){_.error(b)}})}),[A,I]),(0,d.jsxs)(d.Fragment,{children:[l&&(0,d.jsxs)(ht,{variant:"destructive",children:[(0,d.jsx)(dt,{children:l.message}),(0,d.jsx)("div",{className:"text-md",children:l.stack})]}),(0,d.jsxs)("div",{className:nt("relative"),onPointerDown:it.stopPropagation(),children:[(0,d.jsx)("div",{ref:s,"data-container-width":pt(p)}),U()]})]})};function Et(t){return t instanceof Set?[...t]:t}function Kt(t){return Array.isArray(t)?t.map(e=>e instanceof Date&&ct(e)?new Date(e).getTime():e):t}var Lt=It;export{Lt as default};
|
|
1
|
+
import{s as Z}from"./chunk-LvLJmgfZ.js";import{n as C}from"./useEvent-D91BmmQi.js";import{t as Y}from"./react-Bj1aDYRI.js";import"./react-dom-CSu739Rf.js";import{t as tt}from"./compiler-runtime-B3qBwwSJ.js";import{t as et}from"./debounce-OiXznToA.js";import{_,d as V}from"./useEventListener-BakX-tnw.js";import{n as H}from"./config-BE150fVL.js";import{t as nt}from"./cn-X2M2usMq.js";import{t as rt}from"./jsx-runtime-PbYoItBR.js";import"./fullscreen-BXI8V5i6.js";import{t as at}from"./tooltip-CgQpRVyN.js";import{r as it}from"./button-BF7GSjhW.js";import{d as N}from"./arrays-DWxvyYxP.js";import{u as ot}from"./toDate-DCE7d2fN.js";import"./session-B6_8umQX.js";import{r as lt}from"./useTheme-CWoNQwFz.js";import{t as ct}from"./isValid-Cgon0fXK.js";import{a as st,r as mt,t as pt}from"./utils-BIlJBJIu.js";import{n as ut}from"./vega-loader.browser-BJ9oKrvH.js";import{t as ft}from"./react-vega-IsGFjh4e.js";import"./defaultLocale-CuYNS33t.js";import"./defaultLocale-CGfP-Ye3.js";import{r as dt,t as ht}from"./alert-Bjh7v4lb.js";import{n as gt}from"./error-banner-C4DZksWV.js";import{t as yt}from"./formats-Dkhsq416.js";import{n as vt}from"./useAsyncData-CT1LpOBD.js";import{t as F}from"./useDeepCompareMemoize-zUHU--0D.js";import{t as kt}from"./semaphore-FlZezxaf.js";var bt=tt(),S=Z(Y(),1);function wt(t){return t.data&&"url"in t.data&&(t.data.url=H(t.data.url).href),t}const u={arc:"arc",area:"area",bar:"bar",image:"image",line:"line",point:"point",rect:"rect",rule:"rule",text:"text",tick:"tick",trail:"trail",circle:"circle",square:"square",geoshape:"geoshape"};var W=new Set(["boxplot","errorband","errorbar"]);const x={getMarkType(t){let e=typeof t=="string"?t:t.type;if(W.has(e))throw Error("Not supported");return e},isInteractive(t){let e=typeof t=="string"?t:t.type;return!W.has(e)},makeClickable(t){let e=typeof t=="string"?t:t.type;return e in u?typeof t=="string"?{type:t,cursor:"pointer",tooltip:!0}:{...t,type:e,cursor:"pointer",tooltip:!0}:t},getOpacity(t){return typeof t=="string"?null:"opacity"in t&&typeof t.opacity=="number"?t.opacity:null}},v={point(t){return t==null?"select_point":`select_point_${t}`},interval(t){return t==null?"select_interval":`select_interval_${t}`},legendSelection(t){return`legend_selection_${t}`},binColoring(t){return t==null?"bin_coloring":`bin_coloring_${t}`},HIGHLIGHT:"highlight",PAN_ZOOM:"pan_zoom",hasPoint(t){return t.some(e=>e.startsWith("select_point"))},hasInterval(t){return t.some(e=>e.startsWith("select_interval"))},hasLegend(t){return t.some(e=>e.startsWith("legend_selection"))},hasPanZoom(t){return t.some(e=>e.startsWith("pan_zoom"))},isBinColoring(t){return t.startsWith("bin_coloring")}},j={highlight(){return{name:v.HIGHLIGHT,select:{type:"point",on:"mouseover"}}},interval(t,e){return{name:v.interval(e),select:{type:"interval",encodings:D(t),mark:{fill:"#669EFF",fillOpacity:.07,stroke:"#669EFF",strokeOpacity:.4},on:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]",translate:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]"}}},point(t,e){return{name:v.point(e),select:{type:"point",encodings:D(t),on:"click[!event.metaKey]"}}},binColoring(t){return{name:v.binColoring(t),select:{type:"point",on:"click[!event.metaKey]"}}},legend(t){return{name:v.legendSelection(t),select:{type:"point",fields:[t]},bind:"legend"}},panZoom(){return{name:v.PAN_ZOOM,bind:"scales",select:{type:"interval",on:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",translate:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",zoom:"wheel![event.metaKey]"}}}};function D(t){switch(x.getMarkType(t.mark)){case u.image:case u.trail:return;case u.area:case u.arc:return["color"];case u.bar:{let e=St(t);return e==="horizontal"?["y"]:e==="vertical"?["x"]:void 0}case u.circle:case u.geoshape:case u.line:case u.point:case u.rect:case u.rule:case u.square:case u.text:case u.tick:return["x","y"]}}function P(t){return"params"in t&&t.params&&t.params.length>0?N(t.params.filter(e=>e==null?!1:"select"in e&&e.select!==void 0).map(e=>e.name)):"layer"in t?N(t.layer.flatMap(P)):"vconcat"in t?N(t.vconcat.flatMap(P)):"hconcat"in t?N(t.hconcat.flatMap(P)):[]}function St(t){var a,i;if(!t||!("mark"in t))return;let e=(a=t.encoding)==null?void 0:a.x,n=(i=t.encoding)==null?void 0:i.y;if(e&&"type"in e&&e.type==="nominal")return"vertical";if(n&&"type"in n&&n.type==="nominal"||e&&"aggregate"in e)return"horizontal";if(n&&"aggregate"in n)return"vertical"}function xt(t){if(!t.encoding)return[];let e=[];for(let n of Object.values(t.encoding))n&&typeof n=="object"&&"bin"in n&&n.bin&&"field"in n&&typeof n.field=="string"&&e.push(n.field);return e}function G(t){if(!t||!("encoding"in t))return[];let{encoding:e}=t;return e?Object.entries(e).flatMap(n=>{let[a,i]=n;return!i||!At.has(a)?[]:"field"in i&&typeof i.field=="string"?[i.field]:"condition"in i&&i.condition&&typeof i.condition=="object"&&"field"in i.condition&&i.condition.field&&typeof i.condition.field=="string"?[i.condition.field]:[]}):[]}var At=new Set(["color","fill","fillOpacity","opacity","shape","size"]);function $(t,e,n,a){let i=n.filter(o=>v.isBinColoring(o)),r={and:(i.length>0?i:n).map(o=>({param:o}))};if(t==="opacity"){let o=x.getOpacity(a)||1;return{...e,opacity:{condition:{test:r,value:o},value:o/5}}}else return e}function _t(t){if(!("select"in t)||!t.select)return JSON.stringify(t);let e=t.select;if(typeof e=="string")return JSON.stringify({type:e,bind:t.bind});let n={type:e.type,encodings:"encodings"in e&&e.encodings?[...e.encodings].toSorted():void 0,fields:"fields"in e&&e.fields?[...e.fields].toSorted():void 0,bind:t.bind};return JSON.stringify(n)}function q(t){let e=E(t);if(e.length===0)return t;let n=jt(e);return n.length===0?t:{...L(K(t,new Set(n.map(a=>a.name))),n.map(a=>a.name)),params:[...t.params||[],...n]}}function E(t){let e=[];if("vconcat"in t&&Array.isArray(t.vconcat))for(let n of t.vconcat)e.push(...E(n));else if("hconcat"in t&&Array.isArray(t.hconcat))for(let n of t.hconcat)e.push(...E(n));else{if("layer"in t)return[];"mark"in t&&"params"in t&&t.params&&t.params.length>0&&e.push({params:t.params})}return e}function jt(t){if(t.length===0)return[];let e=new Map,n=t.length;for(let{params:i}of t){let r=new Set;for(let o of i){let s=_t(o);r.has(s)||(r.add(s),e.has(s)||e.set(s,{count:0,param:o}),e.get(s).count++)}}let a=[];for(let[,{count:i,param:r}]of e)i===n&&a.push(r);return a}function K(t,e){if("vconcat"in t&&Array.isArray(t.vconcat))return{...t,vconcat:t.vconcat.map(n=>K(n,e))};if("hconcat"in t&&Array.isArray(t.hconcat))return{...t,hconcat:t.hconcat.map(n=>K(n,e))};if("mark"in t&&"params"in t&&t.params){let n=t.params,a=[];for(let i of n){if(!i||typeof i!="object"||!("name"in i)){a.push(i);continue}e.has(i.name)||a.push(i)}if(a.length===0){let{params:i,...r}=t;return r}return{...t,params:a}}return t}function L(t,e){return"vconcat"in t&&Array.isArray(t.vconcat)?{...t,vconcat:t.vconcat.map(n=>L(n,e))}:"hconcat"in t&&Array.isArray(t.hconcat)?{...t,hconcat:t.hconcat.map(n=>L(n,e))}:"layer"in t?t:"mark"in t&&x.isInteractive(t.mark)?{...t,mark:x.makeClickable(t.mark),encoding:$("opacity",t.encoding||{},e,t.mark)}:t}function T(t,e){var s,h;let{chartSelection:n=!0,fieldSelection:a=!0}=e;if(!n&&!a)return t;(s=t.params)!=null&&s.some(l=>l.bind==="legend")&&(a=!1);let i=(h=t.params)==null?void 0:h.some(l=>!l.bind);i&&(n=!1);let r="vconcat"in t||"hconcat"in t;if(i&&r)return t;if("vconcat"in t){let l=t.vconcat.map(m=>"mark"in m?T(m,{chartSelection:n,fieldSelection:a}):m);return q({...t,vconcat:l})}if("hconcat"in t){let l=t.hconcat.map(m=>"mark"in m?T(m,{chartSelection:n,fieldSelection:a}):m);return q({...t,hconcat:l})}if("layer"in t){let l=t.params&&t.params.length>0,m=a!==!1&&!l,k=[];if(m){let p=t.layer.flatMap(f=>"mark"in f?G(f):[]);k=[...new Set(p)],Array.isArray(a)&&(k=k.filter(f=>a.includes(f)))}let w=t.layer.map((p,f)=>{if(!("mark"in p))return p;let g=p;if(f===0&&k.length>0){let O=k.map(M=>j.legend(M));g={...g,params:[...g.params||[],...O]}}return g=z(g,n,f),g=J(g),f===0&&(g=B(g)),g});return{...t,layer:w}}if(!("mark"in t)||!x.isInteractive(t.mark))return t;let o=t;return o=Ot(o,a),o=z(o,n,void 0),o=J(o),o=B(o),o}function Ot(t,e){if(e===!1)return t;let n=G(t);Array.isArray(e)&&(n=n.filter(r=>e.includes(r)));let a=n.map(r=>j.legend(r)),i=[...t.params||[],...a];return{...t,params:i}}function z(t,e,n){if(e===!1)return t;let a;try{a=x.getMarkType(t.mark)}catch{return t}if(a==="geoshape")return t;let i=xt(t),r=e===!0?i.length>0?["point"]:Mt(a):[e];if(!r||r.length===0)return t;let o=r.map(h=>h==="interval"?j.interval(t,n):j.point(t,n)),s=[...t.params||[],...o];return i.length>0&&r.includes("point")&&s.push(j.binColoring(n)),{...t,params:s}}function B(t){let e;try{e=x.getMarkType(t.mark)}catch{}if(e==="geoshape")return t;let n=t.params||[];return n.some(a=>a.bind==="scales")?t:{...t,params:[...n,j.panZoom()]}}function J(t){let e="encoding"in t?t.encoding:void 0,n=t.params||[],a=n.map(i=>i.name);return n.length===0||!x.isInteractive(t.mark)?t:{...t,mark:x.makeClickable(t.mark),encoding:$("opacity",e||{},a,t.mark)}}function Mt(t){switch(t){case"arc":case"area":return["point"];case"text":case"bar":return["point","interval"];case"line":return;default:return["point","interval"]}}var Nt=5;async function Pt(t){if(!t)return t;let e="datasets"in t?{...t.datasets}:{},n=new kt(Nt),a=async r=>{if(!r)return r;if("layer"in r){let l=await Promise.all(r.layer.map(a));r={...r,layer:l}}if("hconcat"in r){let l=await Promise.all(r.hconcat.map(a));r={...r,hconcat:l}}if("vconcat"in r){let l=await Promise.all(r.vconcat.map(a));r={...r,vconcat:l}}if("spec"in r&&(r={...r,spec:await a(r.spec)}),!r.data||!("url"in r.data))return r;let o;try{o=H(r.data.url)}catch{return r}let s=r.data.format,h=await n.run(()=>st(o.href,s));return e[o.pathname]=h,{...r,data:{name:o.pathname}}},i=await a(t);return Object.keys(e).length===0?i:{...i,datasets:e}}var d=Z(rt(),1);ut("arrow",yt);var It=t=>{let e=(0,bt.c)(12),{value:n,setValue:a,chartSelection:i,fieldSelection:r,spec:o,embedOptions:s}=t,h,l;e[0]===o?(h=e[1],l=e[2]):(h=async()=>Pt(o),l=[o],e[0]=o,e[1]=h,e[2]=l);let{data:m,error:k}=vt(h,l);if(k){let p;return e[3]===k?p=e[4]:(p=(0,d.jsx)(gt,{error:k}),e[3]=k,e[4]=p),p}if(!m)return null;let w;return e[5]!==i||e[6]!==s||e[7]!==r||e[8]!==m||e[9]!==a||e[10]!==n?(w=(0,d.jsx)(Ct,{value:n,setValue:a,chartSelection:i,fieldSelection:r,spec:m,embedOptions:s}),e[5]=i,e[6]=s,e[7]=r,e[8]=m,e[9]=a,e[10]=n,e[11]=w):w=e[11],w},Ct=({value:t,setValue:e,chartSelection:n,fieldSelection:a,spec:i,embedOptions:r})=>{let{theme:o}=lt(),s=(0,S.useRef)(null),h=(0,S.useRef)(void 0),[l,m]=(0,S.useState)(),k=(0,S.useMemo)(()=>r&&"actions"in r?r.actions:{source:!1,compiled:!1},[r]),w=F(i),p=(0,S.useMemo)(()=>T(wt(w),{chartSelection:n,fieldSelection:a}),[w,n,a]),f=(0,S.useMemo)(()=>P(p),[p]),g=C(c=>{e({...t,...c})}),O=(0,S.useMemo)(()=>et((c,y)=>{_.debug("[Vega signal]",c,y);let b=V.mapValues(y,Kt);b=V.mapValues(b,Et),g({[c]:b})},100),[g]),M=F(f),I=(0,S.useMemo)(()=>M.reduce((c,y)=>(v.PAN_ZOOM===y||v.isBinColoring(y)||c.push({signalName:y,handler:(b,X)=>O(b,X)}),c),[]),[M,O]),R=C(c=>{_.error(c),_.debug(p),m(c)}),Q=C(c=>{_.debug("[Vega view] created",c),h.current=c,m(void 0)}),U=()=>{let c=[];return v.hasPoint(f)&&c.push(["Point selection","click to select a point; hold shift for multi-select"]),v.hasInterval(f)&&c.push(["Interval selection","click and drag to select an interval"]),v.hasLegend(f)&&c.push(["Legend selection","click to select a legend item; hold shift for multi-select"]),v.hasPanZoom(f)&&c.push(["Pan","hold the meta key and drag"],["Zoom","hold the meta key and scroll"]),c.length===0?null:(0,d.jsx)(at,{delayDuration:300,side:"left",content:(0,d.jsx)("div",{className:"text-xs flex flex-col",children:c.map((y,b)=>(0,d.jsxs)("div",{children:[(0,d.jsxs)("span",{className:"font-bold tracking-wide",children:[y[0],":"]})," ",y[1]]},b))}),children:(0,d.jsx)(ot,{className:"absolute bottom-1 right-0 m-2 h-4 w-4 cursor-help text-muted-foreground hover:text-foreground"})})},A=ft({ref:s,spec:p,options:{theme:o==="dark"?"dark":void 0,actions:k,mode:"vega-lite",tooltip:mt.call,renderer:"canvas"},onError:R,onEmbed:Q});return(0,S.useEffect)(()=>(I.forEach(({signalName:c,handler:y})=>{try{A==null||A.view.addSignalListener(c,y)}catch(b){_.error(b)}}),()=>{I.forEach(({signalName:c,handler:y})=>{try{A==null||A.view.removeSignalListener(c,y)}catch(b){_.error(b)}})}),[A,I]),(0,d.jsxs)(d.Fragment,{children:[l&&(0,d.jsxs)(ht,{variant:"destructive",children:[(0,d.jsx)(dt,{children:l.message}),(0,d.jsx)("div",{className:"text-md",children:l.stack})]}),(0,d.jsxs)("div",{className:nt("relative"),onPointerDown:it.stopPropagation(),children:[(0,d.jsx)("div",{ref:s,"data-container-width":pt(p)}),U()]})]})};function Et(t){return t instanceof Set?[...t]:t}function Kt(t){return Array.isArray(t)?t.map(e=>e instanceof Date&&ct(e)?new Date(e).getTime():e):t}var Lt=It;export{Lt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Tt,n as _n,r as Wn,s as Jn,t as qn}from"./precisionRound-
|
|
1
|
+
import{a as Tt,n as _n,r as Wn,s as Jn,t as qn}from"./precisionRound-CCOoIlcP.js";import{i as _t,n as Hn,r as Gn,t as Zn}from"./defaultLocale-CuYNS33t.js";import{C as Vn,N as Wt,S as Qn,T as Jt,_ as qt,a as Kn,b as it,c as Ht,i as Xn,l as Gt,n as tr,o as nr,p as Zt,r as rr,s as er,t as ar,v as st,w as ur,x as or}from"./defaultLocale-CGfP-Ye3.js";function E(t,n,r){return t.fields=n||[],t.fname=r,t}function ir(t){return t==null?null:t.fname}function Vt(t){return t==null?null:t.fields}function Qt(t){return t.length===1?sr(t[0]):lr(t)}var sr=t=>function(n){return n[t]},lr=t=>{let n=t.length;return function(r){for(let e=0;e<n;++e)r=r[t[e]];return r}};function v(t){throw Error(t)}function wt(t){let n=[],r=t.length,e=null,a=0,u="",o,i,c;t+="";function l(){n.push(u+t.substring(o,i)),u="",o=i+1}for(o=i=0;i<r;++i)if(c=t[i],c==="\\")u+=t.substring(o,i++),o=i;else if(c===e)l(),e=null,a=-1;else{if(e)continue;o===a&&c==='"'||o===a&&c==="'"?(o=i+1,e=c):c==="."&&!a?i>o?l():o=i+1:c==="["?(i>o&&l(),a=o=i+1):c==="]"&&(a||v("Access path missing open bracket: "+t),a>0&&l(),a=0,o=i+1)}return a&&v("Access path missing closing bracket: "+t),e&&v("Access path missing closing quote: "+t),i>o&&(i++,l()),n}function lt(t,n,r){let e=wt(t);return t=e.length===1?e[0]:t,E((r&&r.get||Qt)(e),[t],n||t)}var cr=lt("id"),W=E(t=>t,[],"identity"),I=E(()=>0,[],"zero"),Kt=E(()=>1,[],"one"),fr=E(()=>!0,[],"true"),hr=E(()=>!1,[],"false"),gr=new Set([...Object.getOwnPropertyNames(Object.prototype).filter(t=>typeof Object.prototype[t]=="function"),"__proto__"]);function pr(t,n,r){let e=[n].concat([].slice.call(r));console[t].apply(console,e)}var mr=0,dr=1,yr=2,vr=3,br=4;function Mr(t,n,r=pr){let e=t||0;return{level(a){return arguments.length?(e=+a,this):e},error(){return e>=1&&r(n||"error","ERROR",arguments),this},warn(){return e>=2&&r(n||"warn","WARN",arguments),this},info(){return e>=3&&r(n||"log","INFO",arguments),this},debug(){return e>=4&&r(n||"log","DEBUG",arguments),this}}}var J=Array.isArray;function $(t){return t===Object(t)}var Xt=t=>t!=="__proto__";function Cr(...t){return t.reduce((n,r)=>{for(let e in r)if(e==="signals")n.signals=Tr(n.signals,r.signals);else{let a=e==="legend"?{layout:1}:e==="style"?!0:null;jt(n,e,r[e],a)}return n},{})}function jt(t,n,r,e){if(!Xt(n))return;let a,u;if($(r)&&!J(r))for(a in u=$(t[n])?t[n]:t[n]={},r)e&&(e===!0||e[a])?jt(u,a,r[a]):Xt(a)&&(u[a]=r[a]);else t[n]=r}function Tr(t,n){if(t==null)return n;let r={},e=[];function a(u){r[u.name]||(r[u.name]=1,e.push(u))}return n.forEach(a),t.forEach(a),e}function P(t){return t[t.length-1]}function q(t){return t==null||t===""?null:+t}var tn=t=>n=>t*Math.exp(n),nn=t=>n=>Math.log(t*n),rn=t=>n=>Math.sign(n)*Math.log1p(Math.abs(n/t)),en=t=>n=>Math.sign(n)*Math.expm1(Math.abs(n))*t,ct=t=>n=>n<0?-((-n)**+t):n**+t;function ft(t,n,r,e){let a=r(t[0]),u=r(P(t)),o=(u-a)*n;return[e(a-o),e(u-o)]}function wr(t,n){return ft(t,n,q,W)}function jr(t,n){var r=Math.sign(t[0]);return ft(t,n,nn(r),tn(r))}function Dr(t,n,r){return ft(t,n,ct(r),ct(1/r))}function kr(t,n,r){return ft(t,n,rn(r),en(r))}function ht(t,n,r,e,a){let u=e(t[0]),o=e(P(t)),i=n==null?(u+o)/2:e(n);return[a(i+(u-i)*r),a(i+(o-i)*r)]}function Or(t,n,r){return ht(t,n,r,q,W)}function Ur(t,n,r){let e=Math.sign(t[0]);return ht(t,n,r,nn(e),tn(e))}function xr(t,n,r,e){return ht(t,n,r,ct(e),ct(1/e))}function Nr(t,n,r,e){return ht(t,n,r,rn(e),en(e))}function Ar(t){return 1+~~(new Date(t).getMonth()/3)}function Er(t){return 1+~~(new Date(t).getUTCMonth()/3)}function R(t){return t==null?[]:J(t)?t:[t]}function Sr(t,n,r){let e=t[0],a=t[1],u;return a<e&&(u=a,a=e,e=u),u=a-e,u>=r-n?[n,r]:[e=Math.min(Math.max(e,n),r-u),e+u]}function B(t){return typeof t=="function"}var Fr="descending";function Pr(t,n,r){r||(r={}),n=R(n)||[];let e=[],a=[],u={},o=r.comparator||zr;return R(t).forEach((i,c)=>{i!=null&&(e.push(n[c]===Fr?-1:1),a.push(i=B(i)?i:lt(i,null,r)),(Vt(i)||[]).forEach(l=>u[l]=1))}),a.length===0?null:E(o(a,e),Object.keys(u))}var Dt=(t,n)=>(t<n||t==null)&&n!=null?-1:(t>n||n==null)&&t!=null?1:(n=n instanceof Date?+n:n,(t=t instanceof Date?+t:t)!==t&&n===n?-1:n!==n&&t===t?1:0),zr=(t,n)=>t.length===1?Yr(t[0],n[0]):Ir(t,n,t.length),Yr=(t,n)=>function(r,e){return Dt(t(r),t(e))*n},Ir=(t,n,r)=>(n.push(0),function(e,a){let u,o=0,i=-1;for(;o===0&&++i<r;)u=t[i],o=Dt(u(e),u(a));return o*n[i]});function an(t){return B(t)?t:()=>t}function $r(t,n){let r;return e=>{r&&clearTimeout(r),r=setTimeout(()=>(n(e),r=null),t)}}function z(t){for(let n,r,e=1,a=arguments.length;e<a;++e)for(r in n=arguments[e],n)t[r]=n[r];return t}function Rr(t,n){let r=0,e,a,u,o;if(t&&(e=t.length))if(n==null){for(a=t[r];r<e&&(a==null||a!==a);a=t[++r]);for(u=o=a;r<e;++r)a=t[r],a!=null&&(a<u&&(u=a),a>o&&(o=a))}else{for(a=n(t[r]);r<e&&(a==null||a!==a);a=n(t[++r]));for(u=o=a;r<e;++r)a=n(t[r]),a!=null&&(a<u&&(u=a),a>o&&(o=a))}return[u,o]}function Br(t,n){let r=t.length,e=-1,a,u,o,i,c;if(n==null){for(;++e<r;)if(u=t[e],u!=null&&u>=u){a=o=u;break}if(e===r)return[-1,-1];for(i=c=e;++e<r;)u=t[e],u!=null&&(a>u&&(a=u,i=e),o<u&&(o=u,c=e))}else{for(;++e<r;)if(u=n(t[e],e,t),u!=null&&u>=u){a=o=u;break}if(e===r)return[-1,-1];for(i=c=e;++e<r;)u=n(t[e],e,t),u!=null&&(a>u&&(a=u,i=e),o<u&&(o=u,c=e))}return[i,c]}function N(t,n){return Object.hasOwn(t,n)}var gt={};function Lr(t){let n={},r;function e(u){return N(n,u)&&n[u]!==gt}let a={size:0,empty:0,object:n,has:e,get(u){return e(u)?n[u]:void 0},set(u,o){return e(u)||(++a.size,n[u]===gt&&--a.empty),n[u]=o,this},delete(u){return e(u)&&(--a.size,++a.empty,n[u]=gt),this},clear(){a.size=a.empty=0,a.object=n={}},test(u){return arguments.length?(r=u,a):r},clean(){let u={},o=0;for(let i in n){let c=n[i];c!==gt&&(!r||!r(c))&&(u[i]=c,++o)}a.size=o,a.empty=0,a.object=n=u}};return t&&Object.keys(t).forEach(u=>{a.set(u,t[u])}),a}function _r(t,n,r,e,a,u){if(!r&&r!==0)return u;let o=+r,i=t[0],c=P(t),l;c<i&&(l=i,i=c,c=l),l=Math.abs(n-i);let h=Math.abs(c-n);return l<h&&l<=o?e:h<=o?a:u}function Wr(t,n,r){let e=t.prototype=Object.create(n.prototype);return Object.defineProperty(e,"constructor",{value:t,writable:!0,enumerable:!0,configurable:!0}),z(e,r)}function Jr(t,n,r,e){let a=n[0],u=n[n.length-1],o;return a>u&&(o=a,a=u,u=o),r=r===void 0||r,e=e===void 0||e,(r?a<=t:a<t)&&(e?t<=u:t<u)}function qr(t){return typeof t=="boolean"}function un(t){return Object.prototype.toString.call(t)==="[object Date]"}function on(t){return t&&B(t[Symbol.iterator])}function sn(t){return typeof t=="number"}function Hr(t){return Object.prototype.toString.call(t)==="[object RegExp]"}function pt(t){return typeof t=="string"}function Gr(t,n,r){t&&(t=n?R(t).map(i=>i.replace(/\\(.)/g,"$1")):R(t));let e=t&&t.length,a=r&&r.get||Qt,u=i=>a(n?[i]:wt(i)),o;if(!e)o=function(){return""};else if(e===1){let i=u(t[0]);o=function(c){return""+i(c)}}else{let i=t.map(u);o=function(c){let l=""+i[0](c),h=0;for(;++h<e;)l+="|"+i[h](c);return l}}return E(o,t,"key")}function Zr(t,n){let r=t[0],e=P(t),a=+n;return a?a===1?e:r+a*(e-r):r}var Vr=1e4;function Qr(t){t=+t||Vr;let n,r,e,a=()=>{n={},r={},e=0},u=(o,i)=>(++e>t&&(r=n,n={},e=1),n[o]=i);return a(),{clear:a,has:o=>N(n,o)||N(r,o),get:o=>N(n,o)?n[o]:N(r,o)?u(o,r[o]):void 0,set:(o,i)=>N(n,o)?n[o]=i:u(o,i)}}function Kr(t,n,r,e){let a=n.length,u=r.length;if(!u)return n;if(!a)return r;let o=e||new n.constructor(a+u),i=0,c=0,l=0;for(;i<a&&c<u;++l)o[l]=t(n[i],r[c])>0?r[c++]:n[i++];for(;i<a;++i,++l)o[l]=n[i];for(;c<u;++c,++l)o[l]=r[c];return o}function H(t,n){let r="";for(;--n>=0;)r+=t;return r}function Xr(t,n,r,e){let a=r||" ",u=t+"",o=n-u.length;return o<=0?u:e==="left"?H(a,o)+u:e==="center"?H(a,~~(o/2))+u+H(a,Math.ceil(o/2)):u+H(a,o)}function ln(t){return t&&P(t)-t[0]||0}function mt(t){return J(t)?`[${t.map(n=>n===null?"null":mt(n))}]`:$(t)||pt(t)?JSON.stringify(t).replaceAll("\u2028","\\u2028").replaceAll("\u2029","\\u2029"):t}function cn(t){return t==null||t===""?null:!t||t==="false"||t==="0"?!1:!!t}var te=t=>sn(t)||un(t)?t:Date.parse(t);function fn(t,n){return n||(n=te),t==null||t===""?null:n(t)}function hn(t){return t==null||t===""?null:t+""}function gn(t){let n={},r=t.length;for(let e=0;e<r;++e)n[t[e]]=!0;return n}function ne(t,n,r,e){let a=e??"\u2026",u=t+"",o=u.length,i=Math.max(0,n-a.length);return o<=n?u:r==="left"?a+u.slice(o-i):r==="center"?u.slice(0,Math.ceil(i/2))+a+u.slice(o-~~(i/2)):u.slice(0,i)+a}function re(t,n,r){if(t)if(n){let e=t.length;for(let a=0;a<e;++a){let u=n(t[a]);u&&r(u,a,t)}}else t.forEach(r)}var pn={},kt={},Ot=34,G=10,Ut=13;function mn(t){return Function("d","return {"+t.map(function(n,r){return JSON.stringify(n)+": d["+r+'] || ""'}).join(",")+"}")}function ee(t,n){var r=mn(t);return function(e,a){return n(r(e),a,t)}}function dn(t){var n=Object.create(null),r=[];return t.forEach(function(e){for(var a in e)a in n||r.push(n[a]=a)}),r}function T(t,n){var r=t+"",e=r.length;return e<n?Array(n-e+1).join(0)+r:r}function ae(t){return t<0?"-"+T(-t,6):t>9999?"+"+T(t,6):T(t,4)}function ue(t){var n=t.getUTCHours(),r=t.getUTCMinutes(),e=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":ae(t.getUTCFullYear(),4)+"-"+T(t.getUTCMonth()+1,2)+"-"+T(t.getUTCDate(),2)+(a?"T"+T(n,2)+":"+T(r,2)+":"+T(e,2)+"."+T(a,3)+"Z":e?"T"+T(n,2)+":"+T(r,2)+":"+T(e,2)+"Z":r||n?"T"+T(n,2)+":"+T(r,2)+"Z":"")}function oe(t){var n=RegExp('["'+t+`
|
|
2
2
|
\r]`),r=t.charCodeAt(0);function e(s,f){var g,p,m=a(s,function(d,C){if(g)return g(d,C-1);p=d,g=f?ee(d,f):mn(d)});return m.columns=p||[],m}function a(s,f){var g=[],p=s.length,m=0,d=0,C,x=p<=0,j=!1;s.charCodeAt(p-1)===G&&--p,s.charCodeAt(p-1)===Ut&&--p;function y(){if(x)return kt;if(j)return j=!1,pn;var ut,ot=m,_;if(s.charCodeAt(ot)===Ot){for(;m++<p&&s.charCodeAt(m)!==Ot||s.charCodeAt(++m)===Ot;);return(ut=m)>=p?x=!0:(_=s.charCodeAt(m++))===G?j=!0:_===Ut&&(j=!0,s.charCodeAt(m)===G&&++m),s.slice(ot+1,ut-1).replace(/""/g,'"')}for(;m<p;){if((_=s.charCodeAt(ut=m++))===G)j=!0;else if(_===Ut)j=!0,s.charCodeAt(m)===G&&++m;else if(_!==r)continue;return s.slice(ot,ut)}return x=!0,s.slice(ot,p)}for(;(C=y())!==kt;){for(var at=[];C!==pn&&C!==kt;)at.push(C),C=y();f&&(at=f(at,d++))==null||g.push(at)}return g}function u(s,f){return s.map(function(g){return f.map(function(p){return h(g[p])}).join(t)})}function o(s,f){return f??(f=dn(s)),[f.map(h).join(t)].concat(u(s,f)).join(`
|
|
3
3
|
`)}function i(s,f){return f??(f=dn(s)),u(s,f).join(`
|
|
4
4
|
`)}function c(s){return s.map(l).join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as V}from"./chunk-LvLJmgfZ.js";import{t as B}from"./react-Bj1aDYRI.js";import{t as G}from"./compiler-runtime-B3qBwwSJ.js";import{t as H}from"./jsx-runtime-PbYoItBR.js";import{c as I,i as J,n as O,s as Q,t as U}from"./select-Cjly7tmx.js";import{t as P}from"./label-CFvCMYuj.js";import{t as W}from"./button-BF7GSjhW.js";import{r as X}from"./requests-KshNNAOp.js";import{r as D}from"./input-
|
|
1
|
+
import{s as V}from"./chunk-LvLJmgfZ.js";import{t as B}from"./react-Bj1aDYRI.js";import{t as G}from"./compiler-runtime-B3qBwwSJ.js";import{t as H}from"./jsx-runtime-PbYoItBR.js";import{c as I,i as J,n as O,s as Q,t as U}from"./select-Cjly7tmx.js";import{t as P}from"./label-CFvCMYuj.js";import{t as W}from"./button-BF7GSjhW.js";import{r as X}from"./requests-KshNNAOp.js";import{r as D}from"./input-b2KTOk0X.js";import{t as E}from"./use-toast-BH8bU9Xf.js";import{a as Z,c as $,i as ee,n as te,r as re}from"./dialog-Dr_Y1zNi.js";import{t as ae}from"./links-DK7te6sJ.js";import{r as L}from"./field-CA9HCE2Y.js";var oe=G(),T=V(B(),1),t=V(H(),1);function ne(a){return a.toSorted((e,r)=>e.provider==="env"?1:r.provider==="env"?-1:0)}const le=a=>{let e=(0,oe.c)(43),{providerNames:r,onClose:A,onSuccess:F}=a,{writeSecret:Y}=X(),[o,M]=T.useState(""),[l,R]=T.useState(""),[n,z]=T.useState(r[0]),g;e[0]!==o||e[1]!==n||e[2]!==F||e[3]!==l||e[4]!==Y?(g=async i=>{if(i.preventDefault(),!n){E({title:"Error",description:"No location selected for the secret.",variant:"danger"});return}if(!o||!l||!n){E({title:"Error",description:"Please fill in all fields.",variant:"danger"});return}try{await Y({key:o,value:l,provider:"dotenv",name:n}),E({title:"Secret created",description:"The secret has been created successfully."}),F(o)}catch{E({title:"Error",description:"Failed to create secret. Please try again.",variant:"danger"})}},e[0]=o,e[1]=n,e[2]=F,e[3]=l,e[4]=Y,e[5]=g):g=e[5];let q=g,j;e[6]===Symbol.for("react.memo_cache_sentinel")?(j=(0,t.jsxs)(Z,{children:[(0,t.jsx)($,{children:"Add Secret"}),(0,t.jsx)(re,{children:"Add a new secret to your environment variables."})]}),e[6]=j):j=e[6];let y;e[7]===Symbol.for("react.memo_cache_sentinel")?(y=(0,t.jsx)(P,{htmlFor:"key",children:"Key"}),e[7]=y):y=e[7];let S;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=i=>{M(ie(i.target.value))},e[8]=S):S=e[8];let s;e[9]===o?s=e[10]:(s=(0,t.jsxs)("div",{className:"grid gap-2",children:[y,(0,t.jsx)(D,{id:"key",value:o,onChange:S,placeholder:"MY_SECRET_KEY",required:!0})]}),e[9]=o,e[10]=s);let _;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=(0,t.jsx)(P,{htmlFor:"value",children:"Value"}),e[11]=_):_=e[11];let b;e[12]===Symbol.for("react.memo_cache_sentinel")?(b=i=>R(i.target.value),e[12]=b):b=e[12];let c;e[13]===l?c=e[14]:(c=(0,t.jsx)(D,{id:"value",type:"password",value:l,onChange:b,required:!0,autoComplete:"off"}),e[13]=l,e[14]=c);let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=se()&&(0,t.jsx)(L,{children:"Note: You are sending this key over http."}),e[15]=C):C=e[15];let d;e[16]===c?d=e[17]:(d=(0,t.jsxs)("div",{className:"grid gap-2",children:[_,c,C]}),e[16]=c,e[17]=d);let N;e[18]===Symbol.for("react.memo_cache_sentinel")?(N=(0,t.jsx)(P,{htmlFor:"location",children:"Location"}),e[18]=N):N=e[18];let m;e[19]===r.length?m=e[20]:(m=r.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No dotenv locations configured."}),e[19]=r.length,e[20]=m);let h;e[21]!==n||e[22]!==r?(h=r.length>0&&(0,t.jsxs)(U,{value:n,onValueChange:i=>z(i),children:[(0,t.jsx)(Q,{children:(0,t.jsx)(I,{placeholder:"Select a provider"})}),(0,t.jsx)(O,{children:r.map(ce)})]}),e[21]=n,e[22]=r,e[23]=h):h=e[23];let k;e[24]===Symbol.for("react.memo_cache_sentinel")?(k=(0,t.jsxs)(L,{children:["You can configure the location by setting the"," ",(0,t.jsx)(ae,{href:"https://links.marimo.app/dotenv",children:"dotenv configuration"}),"."]}),e[24]=k):k=e[24];let p;e[25]!==m||e[26]!==h?(p=(0,t.jsxs)("div",{className:"grid gap-2",children:[N,m,h,k]}),e[25]=m,e[26]=h,e[27]=p):p=e[27];let u;e[28]!==d||e[29]!==p||e[30]!==s?(u=(0,t.jsxs)("div",{className:"grid gap-4 py-4",children:[s,d,p]}),e[28]=d,e[29]=p,e[30]=s,e[31]=u):u=e[31];let f;e[32]===A?f=e[33]:(f=(0,t.jsx)(W,{type:"button",variant:"outline",onClick:A,children:"Cancel"}),e[32]=A,e[33]=f);let K=!o||!l||!n,v;e[34]===K?v=e[35]:(v=(0,t.jsx)(W,{type:"submit",disabled:K,children:"Add Secret"}),e[34]=K,e[35]=v);let x;e[36]!==f||e[37]!==v?(x=(0,t.jsxs)(ee,{children:[f,v]}),e[36]=f,e[37]=v,e[38]=x):x=e[38];let w;return e[39]!==q||e[40]!==u||e[41]!==x?(w=(0,t.jsx)(te,{children:(0,t.jsxs)("form",{onSubmit:q,children:[j,u,x]})}),e[39]=q,e[40]=u,e[41]=x,e[42]=w):w=e[42],w};function ie(a){return a.replaceAll(/\W/g,"_")}function se(){return window.location.href.startsWith("http://")}function ce(a){return(0,t.jsx)(J,{value:a,children:a},a)}export{ne as n,le as t};
|