decocms 4.76.26 → 4.76.28
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/client/assets/{AlertCircle-JEjdNMaq.js → AlertCircle-C0LNRXFL.js} +1 -1
- package/dist/client/assets/{AreaChart-PnztWdjA.js → AreaChart-DRbv2Se_.js} +1 -1
- package/dist/client/assets/{ArrowUp-DywFPxe6.js → ArrowUp-DEIsNZJ7.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-DLRJTLkX.js → ArrowUpRight-CfyQUwOR.js} +1 -1
- package/dist/client/assets/{Check-DD8Xmahb.js → Check-CHx9EjoK.js} +1 -1
- package/dist/client/assets/{CheckCircle-7cd8BjDx.js → CheckCircle-DuKYtqTR.js} +1 -1
- package/dist/client/assets/{ChevronDown-QIhX3Guq.js → ChevronDown-UK2bP1UQ.js} +1 -1
- package/dist/client/assets/{ChevronRight-BE8X0Uvv.js → ChevronRight-EIxlJCAn.js} +1 -1
- package/dist/client/assets/{ChevronUp-CHU-pqaF.js → ChevronUp-C2du4mz8.js} +1 -1
- package/dist/client/assets/{Circle-Drh4lCf8.js → Circle-Dn33pGko.js} +1 -1
- package/dist/client/assets/{Copy01-bjw8s3CW.js → Copy01-Dec6QuUO.js} +1 -1
- package/dist/client/assets/{DotsVertical-V24pvLf1.js → DotsVertical-DURNExIZ.js} +1 -1
- package/dist/client/assets/{Eye-D7S6ROXa.js → Eye-Tv0RqHHP.js} +1 -1
- package/dist/client/assets/{FilterLines-C7qMMnf_.js → FilterLines-DoBDuM0w.js} +1 -1
- package/dist/client/assets/{Flag01-O5w8Cwne.js → Flag01-UPbZzTjU.js} +1 -1
- package/dist/client/assets/{Globe01-B8VxPAUQ.js → Globe01-Dv1MemnH.js} +1 -1
- package/dist/client/assets/{Globe04-DY0990ND.js → Globe04-DlE3tpui.js} +1 -1
- package/dist/client/assets/{HardDrive-d1Xy0sKP.js → HardDrive-BSWP1vqJ.js} +1 -1
- package/dist/client/assets/{Key01-Peoi24lZ.js → Key01-DUQfSOZQ.js} +1 -1
- package/dist/client/assets/{LayoutLeft-Br0EAroS.js → LayoutLeft-BB_flP7V.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BoeRl2uM.js → LinkExternal01-DTumzywO.js} +1 -1
- package/dist/client/assets/{List-DHfOraGc.js → List-Cearyjn7.js} +1 -1
- package/dist/client/assets/{Monitor01-4Nd5RcXO.js → Monitor01-BXWr0YEZ.js} +1 -1
- package/dist/client/assets/{Package-D5caCh1i.js → Package-Dc3diOZj.js} +1 -1
- package/dist/client/assets/{Palette-CfNf7kNL.js → Palette-DLRDeZMj.js} +1 -1
- package/dist/client/assets/{Play-3lCkFF0P.js → Play-B_VdYdQy.js} +1 -1
- package/dist/client/assets/{Plus-4NSGOzSP.js → Plus-BkEprJHF.js} +1 -1
- package/dist/client/assets/{SearchLg-DgQT4rWG.js → SearchLg-D_6LPW5y.js} +1 -1
- package/dist/client/assets/{SearchMd-CTQ2aPbD.js → SearchMd-DPgb_Mb5.js} +1 -1
- package/dist/client/assets/{Settings02-DUp_kXTN.js → Settings02-B4gKkQVa.js} +1 -1
- package/dist/client/assets/{Shield01-CzTOW1uS.js → Shield01-ByGL3nCz.js} +1 -1
- package/dist/client/assets/{Star01-D5_DRcqg.js → Star01-rwC6MUs1.js} +1 -1
- package/dist/client/assets/{Stars01-D7u2_dXb.js → Stars01-DkyiijKz.js} +1 -1
- package/dist/client/assets/{Stars02-DiL3YsnP.js → Stars02-CFJkyC0W.js} +1 -1
- package/dist/client/assets/{Sun-CIHi_RNB.js → Sun-D5EL7OWV.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-DcvoTMhH.js → SwitchHorizontal01-CfyLxrC_.js} +1 -1
- package/dist/client/assets/{Tool01-4ayLL1Pz.js → Tool01-vwcHp5vx.js} +1 -1
- package/dist/client/assets/{Tool02-LfwvX73M.js → Tool02-B9R6nZBJ.js} +1 -1
- package/dist/client/assets/{Trash01-Ceh1ErAt.js → Trash01-CQNpRi9v.js} +1 -1
- package/dist/client/assets/{TrendUp01-BBcYJ_bQ.js → TrendUp01-DpJPP1Jq.js} +1 -1
- package/dist/client/assets/{Upload01-29mEqq4o.js → Upload01-CbyoXv84.js} +1 -1
- package/dist/client/assets/{User01-DOj07baz.js → User01-DVvBrT-K.js} +1 -1
- package/dist/client/assets/{UserPlus01-s4Mw01w4.js → UserPlus01-DoMT5VeR.js} +1 -1
- package/dist/client/assets/{Users01-BBI44anw.js → Users01-BTp0QmgZ.js} +1 -1
- package/dist/client/assets/{Users03-Dl4BYAiQ.js → Users03-CeF5jvSj.js} +1 -1
- package/dist/client/assets/{X-DOgQ9OMS.js → X-ehE2-PPh.js} +1 -1
- package/dist/client/assets/{XCircle-sJ0VkNnU.js → XCircle-H5V2L4xB.js} +1 -1
- package/dist/client/assets/{XClose-B9QnqYjT.js → XClose-AmEq2OYZ.js} +1 -1
- package/dist/client/assets/{Zap-CBDf1FZB.js → Zap-BUgMog8M.js} +1 -1
- package/dist/client/assets/{ZapSquare-Drbxe5yD.js → ZapSquare-D3GithUx.js} +1 -1
- package/dist/client/assets/{ZoomOut-BN419Auj.js → ZoomOut-CXi1AmaE.js} +1 -1
- package/dist/client/assets/{access-gate-BiIczTav.js → access-gate-CQxfoP_U.js} +1 -1
- package/dist/client/assets/{add-section-modal-BTGvgWjv.js → add-section-modal-IG3NiKUf.js} +1 -1
- package/dist/client/assets/{agent-icon-IzOMQqpr.js → agent-icon-CTdje-Yo.js} +1 -1
- package/dist/client/assets/{agents-list-D4um2swg.js → agents-list-DkDqV_RP.js} +1 -1
- package/dist/client/assets/{ai-providers-CdqKOQor.js → ai-providers-BVRPYmN7.js} +1 -1
- package/dist/client/assets/{alert-CbvFx1Bx.js → alert-Dw4nOyuN.js} +1 -1
- package/dist/client/assets/{alert-dialog-_7xK-_-l.js → alert-dialog-vSPTpv6H.js} +1 -1
- package/dist/client/assets/app-editor-CTVFzQ80.js +1 -0
- package/dist/client/assets/{auth-CQC1McEv.js → auth-CJQ6Yx_r.js} +1 -1
- package/dist/client/assets/{auth-catchall-BO5foWnf.js → auth-catchall-8vX-tkiK.js} +1 -1
- package/dist/client/assets/{auth-entry-CNzCDeae.js → auth-entry-DK32MCfV.js} +1 -1
- package/dist/client/assets/{auth-split-layout-Dh0uLyI-.js → auth-split-layout-DCKTSx3i.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-toG6RRhO.js → authenticate-and-persist-oauth-B70SAkix.js} +1 -1
- package/dist/client/assets/{automation-list-row-DI4iW8D8.js → automation-list-row-CnL5NUn0.js} +1 -1
- package/dist/client/assets/{automation-runs-BsUWX0YG.js → automation-runs-Cc4W98hs.js} +2 -2
- package/dist/client/assets/automations-BqDg5l7C.js +1 -0
- package/dist/client/assets/{autosend-DCRYPUxS.js → autosend-DYq_Jvzc.js} +1 -1
- package/dist/client/assets/{avatar-CRhRWgdF.js → avatar-BeXwGFfk.js} +1 -1
- package/dist/client/assets/{badge-BaNFbTzd.js → badge-Bu2YMz_4.js} +1 -1
- package/dist/client/assets/{block-document-BW8ImIhf.js → block-document-D5c4Dz22.js} +1 -1
- package/dist/client/assets/{brand-context-B_tY1g8X.js → brand-context-CLtfaJqj.js} +1 -1
- package/dist/client/assets/{buckets-CXg0DXgf.js → buckets-C9hZ8uQM.js} +1 -1
- package/dist/client/assets/{bulk-category-panel-DoHCSV1p.js → bulk-category-panel-BOZgPiQy.js} +1 -1
- package/dist/client/assets/{calendar-BhzpHYaK.js → calendar-PInr3mmc.js} +1 -1
- package/dist/client/assets/{capability-load-error-MZFL4N4q.js → capability-load-error-jrr5P4vz.js} +1 -1
- package/dist/client/assets/{card-BkChKAsi.js → card-CWxEyxBu.js} +1 -1
- package/dist/client/assets/{category-editor-BxkUDxqH.js → category-editor-BdRjbS6h.js} +1 -1
- package/dist/client/assets/{chat-context-D--jJ0mW.js → chat-context-Cr6qmlGy.js} +1 -1
- package/dist/client/assets/{checkbox-Da4u7m4z.js → checkbox-DHREKNj6.js} +1 -1
- package/dist/client/assets/{cli-auth-success-BpVDT2UE.js → cli-auth-success-BHKGsy9Q.js} +1 -1
- package/dist/client/assets/{collection-detail-BSS1LfKM.js → collection-detail-CrkU7mPY.js} +1 -1
- package/dist/client/assets/{collection-display-button-DlbI3hqv.js → collection-display-button-C8VvBTox.js} +1 -1
- package/dist/client/assets/{collection-search-CLUGJZF5.js → collection-search-ZIcj7LLW.js} +1 -1
- package/dist/client/assets/{collection-table-wrapper-DQ-MB43Q.js → collection-table-wrapper-DOKsgICB.js} +1 -1
- package/dist/client/assets/{collection-tabs-CPHe7zsN.js → collection-tabs-C1ybuJHO.js} +1 -1
- package/dist/client/assets/{command-CykJNafy.js → command-BwCOntKm.js} +1 -1
- package/dist/client/assets/{commerce-onboarding-BN2Y3zhL.js → commerce-onboarding-BQMESyPD.js} +1 -1
- package/dist/client/assets/{companions-core-CcN0T2OT.js → companions-core-1f14i-4e.js} +1 -1
- package/dist/client/assets/{connect-desktop-dialog-DhHmNLCN.js → connect-desktop-dialog-d7Jl0eRb.js} +1 -1
- package/dist/client/assets/{connection-card-Z6KPaA-g.js → connection-card-BOsDQ33m.js} +1 -1
- package/dist/client/assets/{connection-detail-CYNfdNu1.js → connection-detail-D6sRVx0b.js} +1 -1
- package/dist/client/assets/{connection-form-helpers-CrCzGAhg.js → connection-form-helpers-Bko18JmW.js} +1 -1
- package/dist/client/assets/{connections-zZn20lsz.js → connections-CZ3Mhjyz.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DG-jpnTO.js → decopilot-sse-pool-BM-tUdQR.js} +1 -1
- package/dist/client/assets/{dialog-DpRPtQlN.js → dialog-uPEldi6L.js} +1 -1
- package/dist/client/assets/{domain-settings-Clkjofl2.js → domain-settings-CQqGcD4z.js} +1 -1
- package/dist/client/assets/{drawer-CbyYzWfN.js → drawer-CeOMWORD.js} +1 -1
- package/dist/client/assets/{dropdown-menu-BK6Lb0Nq.js → dropdown-menu-BnqypSUe.js} +1 -1
- package/dist/client/assets/{empty-state-DbOLNoO_.js → empty-state-Dj1UiFtA.js} +1 -1
- package/dist/client/assets/{extract-connection-data-3T9XLYzt.js → extract-connection-data-rNjNJHae.js} +1 -1
- package/dist/client/assets/{file-explorer-DgPMaNMw.js → file-explorer-h3A6HenO.js} +1 -1
- package/dist/client/assets/{file-type-icon-qFgSOslJ.js → file-type-icon-mhXAsYz9.js} +1 -1
- package/dist/client/assets/{files-DdQcObk7.js → files-BQDBoPGe.js} +1 -1
- package/dist/client/assets/{form-ob0zetC8.js → form-CBIL6eiC.js} +1 -1
- package/dist/client/assets/{general-CiYgo3Y0.js → general-DpsClpa0.js} +1 -1
- package/dist/client/assets/{github-repo-picker-Bhh8AhS3.js → github-repo-picker-C6F-TBMc.js} +1 -1
- package/dist/client/assets/{hooks-CAkZ0hUS.js → hooks-C1wDxsG8.js} +1 -1
- package/dist/client/assets/{index-BuahLGL5.js → index-8weOSYP9.js} +1 -1
- package/dist/client/assets/{index-iLNVLpVB.js → index-BRT-eiWy.js} +5 -5
- package/dist/client/assets/{index-B9kvHfbV.js → index-Bc-Htd9N.js} +1 -1
- package/dist/client/assets/{index-SndQMS5v.js → index-CZMZ2qCP.js} +1 -1
- package/dist/client/assets/{index-D-g-Smyf.js → index-CyLw_PTZ.js} +1 -1
- package/dist/client/assets/{index-D16D3Xo8.js → index-Cz21JVVz.js} +2 -2
- package/dist/client/assets/{index-C4WNfAxp.js → index-CzoFhUGA.js} +2 -2
- package/dist/client/assets/{index-DHgBlK64.js → index-D8Sx01WH.js} +1 -1
- package/dist/client/assets/{index-WfIzPpeT.js → index-DE4xtToZ.js} +1 -1
- package/dist/client/assets/{index-BikctH4L.js → index-DaW53K3w.js} +1 -1
- package/dist/client/assets/{index--VbulPjz.js → index-DeM3xnRo.js} +1 -1
- package/dist/client/assets/{index-Br0McRCm.js → index-QRKcLEI9.js} +1 -1
- package/dist/client/assets/{index-MWQj12Ky.js → index-h0mm9XmA.js} +1 -1
- package/dist/client/assets/{index-C6rSPqKT.js → index-ibVYCtdk.js} +3 -3
- package/dist/client/assets/{index-redirect-DfO_XEMy.js → index-redirect-4WIiEC98.js} +1 -1
- package/dist/client/assets/{input-BOl29soq.js → input-CLma5TTa.js} +1 -1
- package/dist/client/assets/{integration-icon-Dobf_BcZ.js → integration-icon-CH7ULFsC.js} +1 -1
- package/dist/client/assets/{invite-member-dialog-CbtZoxDt.js → invite-member-dialog-B9TFFt67.js} +1 -1
- package/dist/client/assets/{label-YaOxmgC6.js → label-HegC4zUI.js} +1 -1
- package/dist/client/assets/{layout-BkTSJlfx.js → layout-D9xgYSWi.js} +1 -1
- package/dist/client/assets/{login-CDteB8qC.js → login-DFLMZ3qu.js} +1 -1
- package/dist/client/assets/{mcp-oauth-BoQhsehQ.js → mcp-oauth-refjE4PD.js} +1 -1
- package/dist/client/assets/{members-Cddy3pmx.js → members-DohQmAh4.js} +1 -1
- package/dist/client/assets/{monaco-editor-CXwRI0Db.js → monaco-editor-CbXE9Xqh.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-DI3ebezr.js → monitoring-stats-row-D2OaVmvA.js} +1 -1
- package/dist/client/assets/{oauth-callback-CqvYc7SO.js → oauth-callback-BD-rnRKV.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-BH9uCTdA.js → oauth-callback-ai-provider-W6zgxeJt.js} +1 -1
- package/dist/client/assets/{onboarding-__gAytu9.js → onboarding-CcNFi16c.js} +1 -1
- package/dist/client/assets/{org-install-Bdfq7jWA.js → org-install--_QSmOJj.js} +1 -1
- package/dist/client/assets/{org-layout-C7mhFhR3.js → org-layout-DYZ_Vdd8.js} +1 -1
- package/dist/client/assets/{organization-choice-BqSvAe3n.js → organization-choice-DXf2eVHS.js} +1 -1
- package/dist/client/assets/{orgs-D7l9haYh.js → orgs-XCJtlsXs.js} +1 -1
- package/dist/client/assets/{page-seo-form-CZxlMiuU.js → page-seo-form-BJE4N0q6.js} +1 -1
- package/dist/client/assets/page-seo-sheet-Dn8gU-8w.js +1 -0
- package/dist/client/assets/{popover-FAMOUKCi.js → popover-D59OWen2.js} +1 -1
- package/dist/client/assets/{post-editor-D5QLnH1N.js → post-editor-DgVNv_rH.js} +1 -1
- package/dist/client/assets/{primitives-01Nkb1aE.js → primitives-DfbHf84t.js} +1 -1
- package/dist/client/assets/{profile-BTZBnjkn.js → profile-DltlP7xu.js} +1 -1
- package/dist/client/assets/project-app-view-Bnulcm0D.js +1 -0
- package/dist/client/assets/record-editor-FGIpxVOr.js +1 -0
- package/dist/client/assets/redirect-editor-COIPOqhB.js +1 -0
- package/dist/client/assets/registry-C2jCLyFo.js +2 -0
- package/dist/client/assets/{registry-layout-Ct5fZxcc.js → registry-layout-p_pDhyQI.js} +1 -1
- package/dist/client/assets/{reports-G-S2YiCT.js → reports-BUiMkCeS.js} +1 -1
- package/dist/client/assets/{require-capability-BQ52Qg2O.js → require-capability-BYYj6I9k.js} +1 -1
- package/dist/client/assets/{required-auth-layout-DTezT7SL.js → required-auth-layout-BdqwRFOI.js} +1 -1
- package/dist/client/assets/{reset-password-CSQioStu.js → reset-password-ILu_xind.js} +1 -1
- package/dist/client/assets/{roles-DN0ACc8V.js → roles-DBPdPEDv.js} +1 -1
- package/dist/client/assets/{search-input-B0hGe9Cn.js → search-input-D7ajgDO_.js} +1 -1
- package/dist/client/assets/{secrets-DAx3W6eh.js → secrets-CVk2A9J6.js} +1 -1
- package/dist/client/assets/{sections-editor-BF62-lT6.js → sections-editor-1a4sumOF.js} +1 -1
- package/dist/client/assets/{select-D0q7bCO5.js → select-DCMRbMTV.js} +1 -1
- package/dist/client/assets/{select-model-ssYbD-o4.js → select-model-Bx-Xed51.js} +1 -1
- package/dist/client/assets/{self-tool-result-DEhHfa16.js → self-tool-result-BtI_8CVd.js} +1 -1
- package/dist/client/assets/{seo-editor-as8ru-KG.js → seo-editor-Cs_3ZAXk.js} +1 -1
- package/dist/client/assets/{settings-layout-DbtQ3NJu.js → settings-layout-DbPYh7eX.js} +1 -1
- package/dist/client/assets/{settings-section-D_VsqESF.js → settings-section-Dss2hFT-.js} +1 -1
- package/dist/client/assets/{shell-controls-DEw6ukcl.js → shell-controls-C3MhzxnW.js} +1 -1
- package/dist/client/assets/{shell-layout-BOz65zhN.js → shell-layout-DPnzwBdL.js} +1 -1
- package/dist/client/assets/{sidebar-C2AB2RFw.js → sidebar-BIOIlAO_.js} +1 -1
- package/dist/client/assets/{skeleton-BjdIEsAI.js → skeleton-DcJ-AWeX.js} +1 -1
- package/dist/client/assets/{sso-C3ghvnj-.js → sso-DVhSY1Kw.js} +1 -1
- package/dist/client/assets/{store-BuWCrjLx.js → store-WNKCxnBi.js} +1 -1
- package/dist/client/assets/store-registry-As3TNtVB.js +2 -0
- package/dist/client/assets/{studio-tools-DnbtK9EU.js → studio-tools-CiEb3YCV.js} +1 -1
- package/dist/client/assets/{switch-CrEaBS4r.js → switch-CvVKCLWe.js} +1 -1
- package/dist/client/assets/{table-CcsfClB_.js → table-DUOWHqJQ.js} +1 -1
- package/dist/client/assets/{tabs-CTzez_zZ.js → tabs-BqGxXdoI.js} +1 -1
- package/dist/client/assets/{textarea-Cvg62Zwl.js → textarea-DV1w30pD.js} +1 -1
- package/dist/client/assets/{toggle-group-DaNw79Vt.js → toggle-group-BOYJJ8oi.js} +1 -1
- package/dist/client/assets/{toolbar-BawvGBDb.js → toolbar-D6dZQ1kJ.js} +1 -1
- package/dist/client/assets/{toolbar-icon-button-CKUrxf9y.js → toolbar-icon-button-D3ZfFn7X.js} +1 -1
- package/dist/client/assets/{tools-list-C_t4TrwL.js → tools-list-CggpcmV4.js} +1 -1
- package/dist/client/assets/{tooltip-DoczXJLQ.js → tooltip-DmGjSLGv.js} +1 -1
- package/dist/client/assets/{use-ai-providers-Co9QW_iN.js → use-ai-providers-CmNDf8vd.js} +1 -1
- package/dist/client/assets/{use-automations-t0Hn2O-v.js → use-automations-C8vesZ5J.js} +1 -1
- package/dist/client/assets/{use-autosave-ClLAcn6N.js → use-autosave-D46FxJLf.js} +1 -1
- package/dist/client/assets/{use-capability-D5VBTA74.js → use-capability-EhARhd3Z.js} +1 -1
- package/dist/client/assets/{use-clock-tick-DULwIbC5.js → use-clock-tick-2EW1HZaU.js} +1 -1
- package/dist/client/assets/{use-collections-CiFSj-2E.js → use-collections-CvDTPu4s.js} +1 -1
- package/dist/client/assets/{use-connection-Dy0a03AD.js → use-connection-DkYq5t3v.js} +1 -1
- package/dist/client/assets/{use-copy-sff5YRCn.js → use-copy-DqYfTFoV.js} +1 -1
- package/dist/client/assets/{use-create-virtual-mcp-CtEautQ8.js → use-create-virtual-mcp-CSvz7-rk.js} +1 -1
- package/dist/client/assets/{use-debounced-autosave-CoZwlL2r.js → use-debounced-autosave-DhohqvG9.js} +1 -1
- package/dist/client/assets/{use-debounced-value-Dzfbm8zZ.js → use-debounced-value-7buBvFAI.js} +1 -1
- package/dist/client/assets/{use-deco-credits-CAQDn7eP.js → use-deco-credits-CVzSYKYM.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-CVKvugmx.js → use-decopilot-events-CkuFGVsY.js} +1 -1
- package/dist/client/assets/{use-delete-connection-siC3M2mG.js → use-delete-connection-C2WiA17l.js} +1 -1
- package/dist/client/assets/{use-deployment-admin-Coz3bxXZ.js → use-deployment-admin-C_Ql7vEL.js} +1 -1
- package/dist/client/assets/{use-file-configs-DEB-biCW.js → use-file-configs-CcqaFUoI.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-mMzHsNNR.js → use-infinite-scroll-BkLL2k_w.js} +1 -1
- package/dist/client/assets/{use-join-requests-DHm-57T6.js → use-join-requests-DULtcSY7.js} +1 -1
- package/dist/client/assets/{use-mcp-client-nyUUhjjA.js → use-mcp-client-OGs9WihN.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-DvfJnT3g.js → use-mcp-tools-B3ZOCtmr.js} +1 -1
- package/dist/client/assets/{use-members-DWezi5NP.js → use-members-BEIFWHR7.js} +1 -1
- package/dist/client/assets/{use-mobile-qj1W_Bbs.js → use-mobile-B1itw65d.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-CsPUQI6s.js → use-navigate-to-agent-miif_g44.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-CSmMVfbm.js → use-org-auth-client-D_9vuP20.js} +1 -1
- package/dist/client/assets/{use-org-sso-B4F4F8rq.js → use-org-sso-DCaBtTKN.js} +1 -1
- package/dist/client/assets/{use-organization-roles-izOzDhFz.js → use-organization-roles-C5Xk9wws.js} +1 -1
- package/dist/client/assets/{use-organization-settings-B2ne0tO2.js → use-organization-settings-D7VQkjik.js} +1 -1
- package/dist/client/assets/{use-registry-connections-CxSTD8pP.js → use-registry-connections-D7PghIBt.js} +1 -1
- package/dist/client/assets/{use-secrets-HUeETyue.js → use-secrets-DNdZ7I0w.js} +1 -1
- package/dist/client/assets/{use-status-sounds-o8g6ezne.js → use-status-sounds-CXNpvY3s.js} +1 -1
- package/dist/client/assets/{use-view-mode-B2RienOz.js → use-view-mode-CTcmjP_L.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C4SSVzMO.js → use-virtual-mcp-CkueoyOa.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-k0Oz8aiZ.js +1 -0
- package/dist/client/assets/{useRouterState-jJQX6j3i.js → useRouterState-DczLxF9S.js} +1 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-D6yz4hO3.js +1 -0
- package/dist/client/assets/{users-BEVRwZFB.js → users-C_Ywx_9Z.js} +1 -1
- package/dist/client/assets/{variant-calendar-vNGZ4MqD.js → variant-calendar-DcAf2fYs.js} +1 -1
- package/dist/client/assets/{view-mode-toggle-DFwLIgKE.js → view-mode-toggle-DNrPFZMu.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +1 -1
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/app-editor-B4QOXpv-.js +0 -1
- package/dist/client/assets/automations-DnVTdwpg.js +0 -1
- package/dist/client/assets/page-seo-sheet-CvEUwTbF.js +0 -1
- package/dist/client/assets/project-app-view-WWDLR4ej.js +0 -1
- package/dist/client/assets/record-editor-D9xqtmM_.js +0 -1
- package/dist/client/assets/redirect-editor-CMYCgU_I.js +0 -1
- package/dist/client/assets/registry-CHkJpwnW.js +0 -2
- package/dist/client/assets/store-registry-DGY-vmZx.js +0 -2
- package/dist/client/assets/useInfiniteQuery-rUzOrzHT.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-COnNX6yD.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{bi as f,bj as t,af as R,I as l,c2 as z,H as s,ag as y,ad as g,aW as b,b3 as H,bg as V,c3 as ve,c4 as xe,c5 as K,c6 as W,c7 as we,c8 as Ce,c9 as Z,ca as ke,cb as Pe,cc as qe,cd as Te,ce as Ie,cf as Ee,cg as Le,ch as ze,bu as Ae,ci as De,cj as Ue,ck as Ne,cl as $e,cm as Oe,cn as je,co as Be,bt as Fe,r as oe,c as J,j as w,cp as Ve,cq as We,p as Ke,l as se,bx as Ze}from"./index-
|
|
1
|
+
import{bi as f,bj as t,af as R,I as l,c2 as z,H as s,ag as y,ad as g,aW as b,b3 as H,bg as V,c3 as ve,c4 as xe,c5 as K,c6 as W,c7 as we,c8 as Ce,c9 as Z,ca as ke,cb as Pe,cc as qe,cd as Te,ce as Ie,cf as Ee,cg as Le,ch as ze,bu as Ae,ci as De,cj as Ue,ck as Ne,cl as $e,cm as Oe,cn as je,co as Be,bt as Fe,r as oe,c as J,j as w,cp as Ve,cq as We,p as Ke,l as se,bx as Ze}from"./index-ibVYCtdk.js";import{P as Je}from"./use-mcp-client-OGs9WihN.js";const de=["default-src 'none'","script-src 'unsafe-inline' 'unsafe-eval' 'wasm-unsafe-eval'","style-src 'unsafe-inline'","img-src * data: blob:","media-src * data: blob:","font-src data:","connect-src 'none'","frame-src 'none'","worker-src blob:","form-action 'none'","base-uri 'none'"].join("; ");function Ye(r,e={}){const i=`<meta http-equiv="Content-Security-Policy" content="${Ge(e)}">`,n=/<head(\s[^>]*)?>|<HEAD(\s[^>]*)?>/i,c=r.match(n);if(c){const m=(c.index??0)+c[0].length;return r.slice(0,m)+`
|
|
2
2
|
`+i+r.slice(m)}const d=/<html(\s[^>]*)?>|<HTML(\s[^>]*)?>/i,u=r.match(d);if(u){const m=(u.index??0)+u[0].length;return r.slice(0,m)+`
|
|
3
3
|
<head>
|
|
4
4
|
`+i+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,aV as V,dL as R,cM as Ee,cO as ke,cQ as Se,F as xe,dM as P}from"./index-C6rSPqKT.js";var de=1,Ie=.9,Ce=.8,Re=.17,Y=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Y&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Y>h&&(h=x*Y)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var L='[cmdk-group=""]',_='[cmdk-group-items=""]',Ve='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",qe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),j=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:U=!1,vimBindings:A=!0,...O}=t,H=V(),ne=V(),N=V(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:qe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;q().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${L}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=q().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(L))==null?void 0:o.querySelector(Ve))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function q(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function Q(e){let o=q()[e];o&&k.setState("value",o.getAttribute(F))}function X(e){var o;let s=D(),a=q(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(L),a;for(;s&&!a;)s=e>0?Ne(s,L):Te(s,L),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):X(e)}let ie=()=>Q(q().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):X(1)},ce=e=>{e.preventDefault(),e.metaKey?Q(0):e.altKey?ue(-1):X(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),Q(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Le=n.forwardRef((t,l)=>{var r,f;let u=V(),c=n.useRef(null),d=n.useContext(ge),v=j(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;U(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function U(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:P(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:U,onClick:A?void 0:I},t.children)}),Pe=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=V(),v=n.useRef(null),b=n.useRef(null),i=V(),p=j(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:P(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),je=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:P(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=j();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=j();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:P(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:P(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ue=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Xe=Object.assign(be,{List:Be,Item:Le,Input:Oe,Group:Pe,Separator:je,Dialog:ze,Empty:Ue,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=j();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Xe as _};
|
|
1
|
+
import{r as n,aV as V,dL as R,cM as Ee,cO as ke,cQ as Se,F as xe,dM as P}from"./index-ibVYCtdk.js";var de=1,Ie=.9,Ce=.8,Re=.17,Y=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Y&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Y>h&&(h=x*Y)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var L='[cmdk-group=""]',_='[cmdk-group-items=""]',Ve='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",qe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),j=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:U=!1,vimBindings:A=!0,...O}=t,H=V(),ne=V(),N=V(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:qe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;q().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),B=m.getAttribute("id");return((g=e.get(B))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${L}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=q().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],B=le(S,y);r.current.filtered.items.set(g,B),B>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(L))==null?void 0:o.querySelector(Ve))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function q(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function Q(e){let o=q()[e];o&&k.setState("value",o.getAttribute(F))}function X(e){var o;let s=D(),a=q(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(L),a;for(;s&&!a;)s=e>0?Ne(s,L):Te(s,L),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):X(e)}let ie=()=>Q(q().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):X(1)},ce=e=>{e.preventDefault(),e.metaKey?Q(0):e.altKey?ue(-1):X(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...O,"cmdk-root":"",onKeyDown:e=>{var o;(o=O.onKeyDown)==null||o.call(O,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),Q(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Le=n.forwardRef((t,l)=>{var r,f;let u=V(),c=n.useRef(null),d=n.useContext(ge),v=j(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;U(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function U(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:O,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:P(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:U,onClick:A?void 0:I},t.children)}),Pe=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=V(),v=n.useRef(null),b=n.useRef(null),i=V(),p=j(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:P(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),je=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:P(u,l),...f,"cmdk-separator":"",role:"separator"})}),Oe=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=j();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Be=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=j();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:P(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:P(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ue=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Xe=Object.assign(be,{List:Be,Item:Le,Input:Oe,Group:Pe,Separator:je,Dialog:ze,Empty:Ue,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=j();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Xe as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-ibVYCtdk.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{c as $,C as de,n as Ze,d as We,K as Q,m as ie,aY as Sn,r as k,ap as Ns,l as ce,j as l,U as zs,i as Cs,B as Z,aL as Nn,t as ue,w as $s,L as Ps,e as Es,b as zn,u as Cn,E as Ft}from"./index-C6rSPqKT.js";import{i as Ds}from"./ChevronRight-BE8X0Uvv.js";import{s as $n}from"./Eye-D7S6ROXa.js";import{n as Ve,i as yt}from"./Globe01-B8VxPAUQ.js";import{b as Ts,c as Fs,e as Ms,i as Is,f as Pn,a as qt,g as Ls,d as Os}from"./ZoomOut-BN419Auj.js";import{a as ht}from"./Palette-CfNf7kNL.js";import{s as Rs}from"./Plus-4NSGOzSP.js";import{i as As}from"./SearchLg-DgQT4rWG.js";import{t as _s}from"./Stars01-D7u2_dXb.js";import{i as mt}from"./Upload01-29mEqq4o.js";import{s as En}from"./XClose-B9QnqYjT.js";import{i as Kt}from"./Zap-CBDf1FZB.js";import{u as Dn}from"./use-mobile-qj1W_Bbs.js";import{f as Us,a as Bs,b as Hs,c as qs,d as Ks,e as Ws,A as Gs,g as Vs}from"./alert-dialog-_7xK-_-l.js";import{D as Tn,a as Ue,d as Je,e as et,i as Fn,h as Xs,c as Qs}from"./dialog-DpRPtQlN.js";import{I as Xe}from"./input-BOl29soq.js";import{S as ae}from"./skeleton-BjdIEsAI.js";import{F as Se,M as Wt,d as Mn}from"./file-type-icon-qFgSOslJ.js";import{T as Ys}from"./toolbar-BawvGBDb.js";import{a as Zs}from"./Package-D5caCh1i.js";import{u as Js}from"./use-debounced-value-Dzfbm8zZ.js";import{i as vt}from"./DotsVertical-V24pvLf1.js";import{i as In}from"./Key01-Peoi24lZ.js";import{s as wt}from"./Trash01-Ceh1ErAt.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-BK6Lb0Nq.js";import{T as el}from"./textarea-Cvg62Zwl.js";import{t as tl}from"./ChevronDown-QIhX3Guq.js";import{n as nl}from"./ChevronUp-CHU-pqaF.js";import{i as pt}from"./X-DOgQ9OMS.js";import{P as sl,b as ll,a as rl}from"./popover-FAMOUKCi.js";import{b as ye,T as ve,a as we}from"./tooltip-DoczXJLQ.js";import{i as il}from"./Check-DD8Xmahb.js";import{a as ol}from"./Copy01-bjw8s3CW.js";import{n as Ln}from"./LinkExternal01-BoeRl2uM.js";import{l as al,F as cl}from"./index--VbulPjz.js";import{i as dl}from"./LayoutLeft-Br0EAroS.js";function On(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Gt(n,e){const t=$.c(11),{org:s}=de();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(ul),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:Sn,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],ie(o)}function ul(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function Rn(n,e,t){const s=$.c(15),{org:r}=de();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function fl(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function hl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=de();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==r.slug?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function ml(n,e){const t=$.c(11),s=50,{org:r}=de();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==r.slug||t[5]!==n?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:Sn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Mo(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(pl)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],ie(o)}function pl(n){return{volume:n.volume,path:n.path}}async function Io(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function xl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const gl=new Set(["md","mdx","markdown","txt","text"]),bl=25,yl=64*1024,vl=256*1024,wl=4;function jl(n){const e=n.lastIndexOf(".");return e===-1?!1:gl.has(n.slice(e+1).toLowerCase())}async function Lo(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<wl&&a.push({path:m.path,depth:u.depth+1});continue}jl(m.path)&&m.size<=yl&&i.length<bl?i.push(m.path):o.push(r(m.path))}}const c=await Promise.all(i.map(u=>xl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>vl){o.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function An(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function kl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function _n(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function Sl(n){const e=$.c(18),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:r,onMutate:i,onError:o,onSettled:a},e[13]=r,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function _t(n){const e=$.c(26),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Vt=10,Fe=k.useLayoutEffect,ln=Ns.useId,Nl=typeof ln=="function"?ln:()=>null;let zl=0;function Xt(n=null){const e=Nl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+zl++),n??t.current}function Un({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Xt(o),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,H={..._};P.current.id=v,P.current.idIsFromProps=o!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=a,_.minSize=c,(H.collapsedSize!==_.collapsedSize||H.collapsible!==_.collapsible||H.maxSize!==_.maxSize||H.minSize!==_.minSize)&&w(P.current,H)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Bn=k.forwardRef((n,e)=>k.createElement(Un,{...n,forwardedRef:e}));Un.displayName="Panel";Bn.displayName="forwardRef(Panel)";let Ut=null,ft=-1,Ce=null;function Cl(n,e){if(e){const t=(e&Gn)!==0,s=(e&Vn)!==0,r=(e&Xn)!==0,i=(e&Qn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function $l(){Ce!==null&&(document.head.removeChild(Ce),Ut=null,Ce=null,ft=-1)}function Mt(n,e){var t,s;const r=Cl(n,e);if(Ut!==r){if(Ut=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Hn(n){return n.type==="keydown"}function qn(n){return n.type.startsWith("pointer")}function Kn(n){return n.type.startsWith("mouse")}function kt(n){if(qn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Kn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Pl(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function El(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function Dl(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:an(n),b:an(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;V(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:on(rn(t.a)),b:on(rn(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(r.a-r.b)}const Tl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Fl(n){var e;const t=getComputedStyle((e=Wn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Ml(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Fl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Tl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function rn(n){let e=n.length;for(;e--;){const t=n[e];if(V(t,"Missing node"),Ml(t))return t}return null}function on(n){return n&&Number(getComputedStyle(n).zIndex)||0}function an(n){const e=[];for(;n;)e.push(n),n=Wn(n);return e}function Wn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Gn=1,Vn=2,Xn=4,Qn=8,Il=Pl()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Ll(n,e,t,s,r){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(o))!==null&&i!==void 0?i:0;return Te.set(o,c+1),Qe.add(a),xt(),function(){var f;St.delete(n),Qe.delete(a);const u=(f=Te.get(o))!==null&&f!==void 0?f:1;if(Te.set(o,u-1),xt(),u===1&&Te.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Yt(),r("up",!0,null)}}}function Ol(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Qt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Yn(e)||n.stopImmediatePropagation())}function It(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Qt({target:s,x:e,y:t})}gt("move",n),Yt(),xe.length>0&&n.preventDefault()}function Lt(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Yn(e)||n.stopImmediatePropagation()),gt("up",n),Qt({target:e,x:t,y:s}),Yt(),xt()}function Yn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Qt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:o}=r,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Il?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&Dl(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(El(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Ot(n,e){St.set(n,e)}function Yt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Mt("intersection",t):n?Mt("horizontal",t):e?Mt("vertical",t):$l()}let Rt=new AbortController;function xt(){Rt.abort(),Rt=new AbortController;const n={capture:!0,signal:Rt.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",Lt,n),s.addEventListener("pointerleave",It,n),s.addEventListener("pointermove",It,n))}),window.addEventListener("pointerup",Lt,n),window.addEventListener("pointercancel",Lt,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ol,n),s.addEventListener("pointermove",It,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Rl(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function V(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Vt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Vt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Al(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];V(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(r+a)/2;Me(t,c)<0?t=r:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Vt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];V(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];V(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];V(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];V(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Al(r,o))return r;{const u=n<0?c:a,h=e[u];V(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];V(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:r}function _l({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const a=t[0];V(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,r=p):(i+=g,o+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Zn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Jn(n,e,t){const s=Zn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function es(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function Ul(n,e,t,s=document){var r,i,o,a;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Bl({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=_l({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=r[c];V(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const a=e.current;V(a,"Eager values not found");const{panelDataArray:c}=a,d=es(t,i);V(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);V(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);V(m,"Resize handle element has no handle id attribute");const[p,g]=Ul(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];V(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Jn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&o(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,o])}function cn(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function ts(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Hl(n,e,t,s,r){const i=t==="horizontal",o=Nt(e,r);V(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=ts(t,n),f=es(a,r);V(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function ql(n,e,t,s,r,i){if(Hn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:r!=null?a=r:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Hl(n,e,t,s,i)}function Kl({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,r-=a)}for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];V(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Wl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Gl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function dn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ns(n){return`react-resizable-panels:${n}`}function ss(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ls(n,e){try{const t=ns(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Vl(n,e,t){var s,r;const i=(s=ls(n,t))!==null&&s!==void 0?s:{},o=ss(e);return(r=i[o])!==null&&r!==void 0?r:null}function Xl(n,e,t,s,r){var i;const o=ns(n),a=ss(e),c=(i=ls(n,r))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function un({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let r=0;for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(r+=o-a,t[i]=a)}if(!me(r,0))for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=o+r,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(r-=c-o,t[i]=c,me(r,0)))break}return t}const Ql=100,qe={getItem:n=>(dn(qe),qe.getItem(n)),setItem:(n,e)=>{dn(qe),qe.setItem(n,e)}},fn={};function rs({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Xt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Rl(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=un({layout:S,panelConstraints:U.map(B=>B.constraints)});cn(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=o,C.current.storage=c}),Bl({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=fn[n];O==null&&(O=Gl(Xl,Ql),fn[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:B=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(V(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,B)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-B:B-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const B=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,oe=He({delta:Pe,initialLayout:U,panelConstraints:B,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,oe)||(x(oe),w.current.layout=oe,R&&R(oe),Ie(T,oe,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return V(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Wl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:B}=De(R,S,O);return V(B!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(B,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:B}=De(R,S,O);return V(B!=null,`Panel size not found for panel "${S.id}"`),!T||Me(B,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,B=U.order;return T==null&&B==null?0:T==null?-1:B==null?1:T-B}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let B=null;if(S){const te=Vl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),B=te.layout)}B==null&&(B=Kl({panelDataArray:T}));const Y=un({layout:B,panelConstraints:T.map(te=>te.constraints)});cn(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const B=m.current;if(!B)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Jn(fe,S,B);let oe=ql(T,S,Y,te,E,B);const at=Y==="horizontal";at&&O&&(oe=-oe);const Dt=ge.map(Tt=>Tt.constraints),Ee=He({delta:oe,initialLayout:Ne??ne,panelConstraints:Dt,pivotIndices:Pe,prevLayout:ne,trigger:Hn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(qn(T)||Kn(T))&&z.current!=oe&&(z.current=oe,!ct&&oe!==0?at?Ot(S,oe<0?Gn:Vn):Ot(S,oe<0?Xn:Qn):Ot(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),H=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,B=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);V(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:B,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),G=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:B}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(B&&te&&je(X,T)?je(T,Y)||H(S,Y):X<E?H(S,E):X>fe&&H(S,fe))},[H]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);V(T,`Drag handle element not found for id "${S}"`);const B=ts(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:B,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:G,registerPanel:A,registerResizeHandle:_,resizePanel:H,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,G,A,_,H,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const is=k.forwardRef((n,e)=>k.createElement(rs,{...n,forwardedRef:e}));rs.displayName="PanelGroup";is.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Yl({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=r.getAttribute(se.groupId);V(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Zn(a,e,s);V(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function os({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Xt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,H]=k.useState(null),G=k.useRef({state:v});Fe(()=>{G.current.state=v}),k.useEffect(()=>{if(t)H(null);else{const L=C(F);H(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;V(L,"Element ref not attached");let K=!1;return Ll(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,V(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:B}=y.current;T?.(!0),B?.();break}case"move":{const{state:T}=G.current;K=!0,T!=="drag"&&P("hover"),V(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:B,onPointerUp:Y}=y.current;B?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Yl({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}os.displayName="PanelResizeHandle";function Zl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=l.jsx(is,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function hn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Bn,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Jl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ts,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=l.jsx(os,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function er(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function tr(n){if(er(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function nr(n){try{return decodeURIComponent(n)}catch{return n}}function sr(n){return tr(n),encodeURIComponent(n)}function lr(n){return`.deco/blocks/${sr(n)}.json`}function Oo(n){return`/${lr(n)}`}const Ro=1e4,rr=3;function Bt(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Zt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function ir(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ao(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function _o(n,e){return e==="directory"?n:ir(n)}function Uo(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function or(n){const e=Zt(n);return e?e.split("/").filter(Boolean).length:0}function Bo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Ho(n,e){return or(n)>=rr&&!e.has(n)}function qo(n,e,t=[]){const s=Zt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function Ko(n){const e=Zt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return nr(s)}function ar(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Wo(n){const e=Bt(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Go(n,e=[]){const t={children:[]},s=i=>{const a=Bt(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Bt(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function cr(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...cr(r.children,e,t+1)));return s}function Vo(n){return n.split(`
|
|
1
|
+
import{c as $,C as de,n as Ze,d as We,K as Q,m as ie,aY as Sn,r as k,ap as Ns,l as ce,j as l,U as zs,i as Cs,B as Z,aL as Nn,t as ue,w as $s,L as Ps,e as Es,b as zn,u as Cn,E as Ft}from"./index-ibVYCtdk.js";import{i as Ds}from"./ChevronRight-EIxlJCAn.js";import{s as $n}from"./Eye-Tv0RqHHP.js";import{n as Ve,i as yt}from"./Globe01-Dv1MemnH.js";import{b as Ts,c as Fs,e as Ms,i as Is,f as Pn,a as qt,g as Ls,d as Os}from"./ZoomOut-CXi1AmaE.js";import{a as ht}from"./Palette-DLRDeZMj.js";import{s as Rs}from"./Plus-BkEprJHF.js";import{i as As}from"./SearchLg-D_6LPW5y.js";import{t as _s}from"./Stars01-DkyiijKz.js";import{i as mt}from"./Upload01-CbyoXv84.js";import{s as En}from"./XClose-AmEq2OYZ.js";import{i as Kt}from"./Zap-BUgMog8M.js";import{u as Dn}from"./use-mobile-B1itw65d.js";import{f as Us,a as Bs,b as Hs,c as qs,d as Ks,e as Ws,A as Gs,g as Vs}from"./alert-dialog-vSPTpv6H.js";import{D as Tn,a as Ue,d as Je,e as et,i as Fn,h as Xs,c as Qs}from"./dialog-uPEldi6L.js";import{I as Xe}from"./input-CLma5TTa.js";import{S as ae}from"./skeleton-DcJ-AWeX.js";import{F as Se,M as Wt,d as Mn}from"./file-type-icon-mhXAsYz9.js";import{T as Ys}from"./toolbar-D6dZQ1kJ.js";import{a as Zs}from"./Package-Dc3diOZj.js";import{u as Js}from"./use-debounced-value-7buBvFAI.js";import{i as vt}from"./DotsVertical-DURNExIZ.js";import{i as In}from"./Key01-DUQfSOZQ.js";import{s as wt}from"./Trash01-CQNpRi9v.js";import{D as tt,a as nt,c as st,d as be}from"./dropdown-menu-BnqypSUe.js";import{T as el}from"./textarea-DV1w30pD.js";import{t as tl}from"./ChevronDown-UK2bP1UQ.js";import{n as nl}from"./ChevronUp-C2du4mz8.js";import{i as pt}from"./X-ehE2-PPh.js";import{P as sl,b as ll,a as rl}from"./popover-D59OWen2.js";import{b as ye,T as ve,a as we}from"./tooltip-DmGjSLGv.js";import{i as il}from"./Check-CHx9EjoK.js";import{a as ol}from"./Copy01-Dec6QuUO.js";import{n as Ln}from"./LinkExternal01-DTumzywO.js";import{l as al,F as cl}from"./index-DeM3xnRo.js";import{i as dl}from"./LayoutLeft-BB_flP7V.js";function On(n){return n.contentHash??`${n.size}-${n.updatedAt}`}function pe(n,e,t,s){const r=new URLSearchParams(s).toString();return`/api/${encodeURIComponent(n)}/fs/${encodeURIComponent(e)}/${t}${r?`?${r}`:""}`}async function he(n,e){const t=await fetch(n,e);if(!t.ok){let s="";try{s=(await t.json()).error??""}catch{}throw new Error(s||`HTTP ${t.status}`)}return t}function Gt(n,e){const t=$.c(11),{org:s}=de();let r;t[0]!==s.id||t[1]!==e||t[2]!==n?(r=Q.orgFsList(s.id,n,e),t[0]=s.id,t[1]=e,t[2]=n,t[3]=r):r=t[3];let i;t[4]!==s.slug||t[5]!==e||t[6]!==n?(i=async()=>(await(await he(pe(s.slug,n,"list",{path:e}))).json()).entries.toSorted(ul),t[4]=s.slug,t[5]=e,t[6]=n,t[7]=i):i=t[7];let o;return t[8]!==r||t[9]!==i?(o={queryKey:r,placeholderData:Sn,queryFn:i},t[8]=r,t[9]=i,t[10]=o):o=t[10],ie(o)}function ul(n,e){return n.kind!==e.kind?n.kind==="dir"?-1:1:n.path.localeCompare(e.path)}function Rn(n,e,t){const s=$.c(15),{org:r}=de();let i;s[0]!==r.id||s[1]!==e||s[2]!==n?(i=Q.orgFsStat(r.id,n??"",e),s[0]=r.id,s[1]=e,s[2]=n,s[3]=i):i=s[3];const o=n!==null;let a;s[4]!==t?(a=t?.refetchIntervalWhenAbsent?f=>f.state.data?!1:t.refetchIntervalWhenAbsent??!1:void 0,s[4]=t,s[5]=a):a=s[5];let c;s[6]!==r.slug||s[7]!==e||s[8]!==n?(c=async()=>{const f=await fetch(pe(r.slug,n??"","stat",{path:e}));if(f.status===404)return null;if(!f.ok)throw new Error(`HTTP ${f.status}`);return(await f.json()).entry},s[6]=r.slug,s[7]=e,s[8]=n,s[9]=c):c=s[9];let d;return s[10]!==i||s[11]!==o||s[12]!==a||s[13]!==c?(d={queryKey:i,enabled:o,refetchInterval:a,queryFn:c},s[10]=i,s[11]=o,s[12]=a,s[13]=c,s[14]=d):d=s[14],ie(d)}function fl(n){const e=$.c(9),{org:t}=de();let s;e[0]!==t.id||e[1]!==n?(s=Q.orgFsUsage(t.id,n),e[0]=t.id,e[1]=n,e[2]=s):s=e[2];let r;e[3]!==t.slug||e[4]!==n?(r=async()=>await(await he(pe(t.slug,n,"usage"))).json(),e[3]=t.slug,e[4]=n,e[5]=r):r=e[5];let i;return e[6]!==s||e[7]!==r?(i={queryKey:s,queryFn:r},e[6]=s,e[7]=r,e[8]=i):i=e[8],ie(i)}function hl(n,e){const t=$.c(9),s=n===void 0?60:n,{org:r}=de();let i;t[0]!==r.id?(i=Q.orgFsRecent(r.id),t[0]=r.id,t[1]=i):i=t[1];const o=e?.enabled;let a;t[2]!==s||t[3]!==r.slug?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/recent?limit=${s}`)).json()).entries,t[2]=s,t[3]=r.slug,t[4]=a):a=t[4];let c;return t[5]!==i||t[6]!==o||t[7]!==a?(c={queryKey:i,enabled:o,queryFn:a},t[5]=i,t[6]=o,t[7]=a,t[8]=c):c=t[8],ie(c)}function ml(n,e){const t=$.c(11),s=50,{org:r}=de();let i;t[0]!==r.id||t[1]!==n?(i=Q.orgFsSearch(r.id,n),t[0]=r.id,t[1]=n,t[2]=i):i=t[2];const o=n.length>0;let a;t[3]!==s||t[4]!==r.slug||t[5]!==n?(a=async()=>(await(await he(`/api/${encodeURIComponent(r.slug)}/fs/search?q=${encodeURIComponent(n)}&limit=${s}`)).json()).entries,t[3]=s,t[4]=r.slug,t[5]=n,t[6]=a):a=t[6];let c;return t[7]!==i||t[8]!==o||t[9]!==a?(c={queryKey:i,enabled:o,placeholderData:Sn,queryFn:a},t[7]=i,t[8]=o,t[9]=a,t[10]=c):c=t[10],ie(c)}function Mo(n){const e=$.c(8),{org:t}=de();let s;e[0]!==t.id?(s=Q.orgFsSkills(t.id),e[0]=t.id,e[1]=s):s=e[1];const r=n?.enabled;let i;e[2]!==t.slug?(i=async()=>{const a=await he(`/api/${encodeURIComponent(t.slug)}/fs/skills`),{skills:c}=await a.json();return c.map(pl)},e[2]=t.slug,e[3]=i):i=e[3];let o;return e[4]!==s||e[5]!==r||e[6]!==i?(o={queryKey:s,enabled:r,queryFn:i},e[4]=s,e[5]=r,e[6]=i,e[7]=o):o=e[7],ie(o)}function pl(n){return{volume:n.volume,path:n.path}}async function Io(n){const e=await he(`/api/${encodeURIComponent(n)}/fs/skills`),{skills:t}=await e.json();return t}async function xl(n,e,t){return(await he(pe(n,e,"read",{path:t}))).text()}const gl=new Set(["md","mdx","markdown","txt","text"]),bl=25,yl=64*1024,vl=256*1024,wl=4;function jl(n){const e=n.lastIndexOf(".");return e===-1?!1:gl.has(n.slice(e+1).toLowerCase())}async function Lo(n,e,t){const s=t?`${t}/`:"",r=u=>u.startsWith(s)?u.slice(s.length):u,i=[],o=[],a=[{path:t,depth:0}];for(;a.length>0;){const u=a.shift();if(!u)break;let h;try{h=(await(await he(pe(n,e,"list",{path:u.path}))).json()).entries}catch{continue}for(const m of[...h].sort((p,g)=>p.path.localeCompare(g.path))){if(m.kind==="dir"){u.depth<wl&&a.push({path:m.path,depth:u.depth+1});continue}jl(m.path)&&m.size<=yl&&i.length<bl?i.push(m.path):o.push(r(m.path))}}const c=await Promise.all(i.map(u=>xl(n,e,u).catch(()=>null))),d=[];let f=0;return i.forEach((u,h)=>{const m=c[h];if(m==null||f+m.length>vl){o.push(r(u));return}f+=m.length,d.push({relPath:r(u),content:m})}),d.sort((u,h)=>u.relPath==="SKILL.md"?-1:h.relPath==="SKILL.md"?1:u.relPath.localeCompare(h.relPath)),o.sort(),{files:d,omittedPaths:o}}function An(){const n=$.c(7),{org:e}=de();let t;n[0]!==e.id?(t=Q.orgFsPublicSets(e.id),n[0]=e.id,n[1]=t):t=n[1];let s;n[2]!==e.slug?(s=async()=>(await(await he(`/api/${encodeURIComponent(e.slug)}/fs/public-sets`)).json()).sets,n[2]=e.slug,n[3]=s):s=n[3];let r;return n[4]!==t||n[5]!==s?(r={queryKey:t,staleTime:3e5,queryFn:s},n[4]=t,n[5]=s,n[6]=r):r=n[6],ie(r)}function kl(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t.slug||e[1]!==n?(s=r=>pe(t.slug,n,"read",{path:r}),e[0]=t.slug,e[1]=n,e[2]=s):s=e[2],s}function lt(){const n=$.c(2),{org:e}=de();let t;return n[0]!==e.slug?(t=(s,r)=>pe(e.slug,s,"read",{path:r}),n[0]=e.slug,n[1]=t):t=n[1],t}function _n(n){const e=$.c(3),{org:t}=de();let s;return e[0]!==t||e[1]!==n?(s={mutationFn:async r=>(await(await he(pe(t.slug,n,"file",{path:r.path}),{method:"PUT",headers:{"content-type":r.contentType??"text/html; charset=utf-8"},body:r.body})).json()).entry},e[0]=t,e[1]=n,e[2]=s):s=e[2],We(s)}function Sl(n){const e=$.c(18),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==n?(r=async d=>(await(await he(pe(t.slug,n,"public",{path:d.path}),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({mode:d.mode,password:d.password})})).json()).entry,e[0]=t,e[1]=n,e[2]=r):r=e[2];let i;e[3]!==t||e[4]!==s||e[5]!==n?(i=async d=>{const f=Q.orgFsStat(t.id,n,d.path);await s.cancelQueries({queryKey:f});const u=s.getQueryData(f),h=d.mode!=="private";return s.setQueryData(f,m=>m&&{...m,readPublic:h,effectivePublic:h,shareMode:d.mode}),{key:f,previous:u}},e[3]=t,e[4]=s,e[5]=n,e[6]=i):i=e[6];let o;e[7]!==s?(o=(d,f,u)=>{u&&s.setQueryData(u.key,u.previous)},e[7]=s,e[8]=o):o=e[8];let a;e[9]!==t||e[10]!==s||e[11]!==n?(a=(d,f,u)=>{s.invalidateQueries({queryKey:Q.orgFsStat(t.id,n,u.path)}),s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[9]=t,e[10]=s,e[11]=n,e[12]=a):a=e[12];let c;return e[13]!==r||e[14]!==i||e[15]!==o||e[16]!==a?(c={mutationFn:r,onMutate:i,onError:o,onSettled:a},e[13]=r,e[14]=i,e[15]=o,e[16]=a,e[17]=c):c=e[17],We(c)}function _t(n){const e=$.c(26),{org:t}=de(),s=Ze();let r;e[0]!==t||e[1]!==s||e[2]!==n?(r=()=>{s.invalidateQueries({queryKey:Q.orgFsVolume(t.id,n)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}),s.invalidateQueries({queryKey:Q.orgFsSearchRoot(t.id)})},e[0]=t,e[1]=s,e[2]=n,e[3]=r):r=e[3];const i=r;let o;e[4]!==t||e[5]!==n?(o=async b=>{for(const x of b.files){const y=b.dir?`${b.dir}/${x.name}`:x.name;await he(pe(t.slug,n,"file",{path:y}),{method:"PUT",headers:{"content-type":x.type||"application/octet-stream"},body:x})}},e[4]=t,e[5]=n,e[6]=o):o=e[6];let a;e[7]!==i||e[8]!==o?(a={mutationFn:o,onSettled:i},e[7]=i,e[8]=o,e[9]=a):a=e[9];const c=We(a);let d;e[10]!==t||e[11]!==n?(d=async b=>{await he(pe(t.slug,n,"dir",{path:b}),{method:"POST"})},e[10]=t,e[11]=n,e[12]=d):d=e[12];let f;e[13]!==i||e[14]!==d?(f={mutationFn:d,onSuccess:i},e[13]=i,e[14]=d,e[15]=f):f=e[15];const u=We(f);let h;e[16]!==t||e[17]!==n?(h=async b=>{await he(pe(t.slug,n,"file",{path:b}),{method:"DELETE"})},e[16]=t,e[17]=n,e[18]=h):h=e[18];let m;e[19]!==i||e[20]!==h?(m={mutationFn:h,onSuccess:i},e[19]=i,e[20]=h,e[21]=m):m=e[21];const p=We(m);let g;return e[22]!==u||e[23]!==p||e[24]!==c?(g={upload:c,mkdir:u,remove:p},e[22]=u,e[23]=p,e[24]=c,e[25]=g):g=e[25],g}const jt=k.createContext(null);jt.displayName="PanelGroupContext";const se={group:"data-panel-group",groupDirection:"data-panel-group-direction",groupId:"data-panel-group-id",panel:"data-panel",panelCollapsible:"data-panel-collapsible",panelId:"data-panel-id",panelSize:"data-panel-size",resizeHandle:"data-resize-handle",resizeHandleActive:"data-resize-handle-active",resizeHandleEnabled:"data-panel-resize-handle-enabled",resizeHandleId:"data-panel-resize-handle-id",resizeHandleState:"data-resize-handle-state"},Vt=10,Fe=k.useLayoutEffect,ln=Ns.useId,Nl=typeof ln=="function"?ln:()=>null;let zl=0;function Xt(n=null){const e=Nl(),t=k.useRef(n||e||null);return t.current===null&&(t.current=""+zl++),n??t.current}function Un({children:n,className:e="",collapsedSize:t,collapsible:s,defaultSize:r,forwardedRef:i,id:o,maxSize:a,minSize:c,onCollapse:d,onExpand:f,onResize:u,order:h,style:m,tagName:p="div",...g}){const b=k.useContext(jt);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:x,expandPanel:y,getPanelSize:j,getPanelStyle:N,groupId:z,isPanelCollapsed:C,reevaluatePanelConstraints:w,registerPanel:M,resizePanel:I,unregisterPanel:F}=b,v=Xt(o),P=k.useRef({callbacks:{onCollapse:d,onExpand:f,onResize:u},constraints:{collapsedSize:t,collapsible:s,defaultSize:r,maxSize:a,minSize:c},id:v,idIsFromProps:o!==void 0,order:h});k.useRef({didLogMissingDefaultSizeWarning:!1}),Fe(()=>{const{callbacks:A,constraints:_}=P.current,H={..._};P.current.id=v,P.current.idIsFromProps=o!==void 0,P.current.order=h,A.onCollapse=d,A.onExpand=f,A.onResize=u,_.collapsedSize=t,_.collapsible=s,_.defaultSize=r,_.maxSize=a,_.minSize=c,(H.collapsedSize!==_.collapsedSize||H.collapsible!==_.collapsible||H.maxSize!==_.maxSize||H.minSize!==_.minSize)&&w(P.current,H)}),Fe(()=>{const A=P.current;return M(A),()=>{F(A)}},[h,v,M,F]),k.useImperativeHandle(i,()=>({collapse:()=>{x(P.current)},expand:A=>{y(P.current,A)},getId(){return v},getSize(){return j(P.current)},isCollapsed(){return C(P.current)},isExpanded(){return!C(P.current)},resize:A=>{I(P.current,A)}}),[x,y,j,C,v,I]);const W=N(P.current,r);return k.createElement(p,{...g,children:n,className:e,id:v,style:{...W,...m},[se.groupId]:z,[se.panel]:"",[se.panelCollapsible]:s||void 0,[se.panelId]:v,[se.panelSize]:parseFloat(""+W.flexGrow).toFixed(1)})}const Bn=k.forwardRef((n,e)=>k.createElement(Un,{...n,forwardedRef:e}));Un.displayName="Panel";Bn.displayName="forwardRef(Panel)";let Ut=null,ft=-1,Ce=null;function Cl(n,e){if(e){const t=(e&Gn)!==0,s=(e&Vn)!==0,r=(e&Xn)!==0,i=(e&Qn)!==0;if(t)return r?"se-resize":i?"ne-resize":"e-resize";if(s)return r?"sw-resize":i?"nw-resize":"w-resize";if(r)return"s-resize";if(i)return"n-resize"}switch(n){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function $l(){Ce!==null&&(document.head.removeChild(Ce),Ut=null,Ce=null,ft=-1)}function Mt(n,e){var t,s;const r=Cl(n,e);if(Ut!==r){if(Ut=r,Ce===null&&(Ce=document.createElement("style"),document.head.appendChild(Ce)),ft>=0){var i;(i=Ce.sheet)===null||i===void 0||i.removeRule(ft)}ft=(t=(s=Ce.sheet)===null||s===void 0?void 0:s.insertRule(`*{cursor: ${r} !important;}`))!==null&&t!==void 0?t:-1}}function Hn(n){return n.type==="keydown"}function qn(n){return n.type.startsWith("pointer")}function Kn(n){return n.type.startsWith("mouse")}function kt(n){if(qn(n)){if(n.isPrimary)return{x:n.clientX,y:n.clientY}}else if(Kn(n))return{x:n.clientX,y:n.clientY};return{x:1/0,y:1/0}}function Pl(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function El(n,e,t){return n.x<e.x+e.width&&n.x+n.width>e.x&&n.y<e.y+e.height&&n.y+n.height>e.y}function Dl(n,e){if(n===e)throw new Error("Cannot compare node with itself");const t={a:an(n),b:an(e)};let s;for(;t.a.at(-1)===t.b.at(-1);)n=t.a.pop(),e=t.b.pop(),s=n;V(s,"Stacking order can only be calculated for elements with a common ancestor");const r={a:on(rn(t.a)),b:on(rn(t.b))};if(r.a===r.b){const i=s.childNodes,o={a:t.a.at(-1),b:t.b.at(-1)};let a=i.length;for(;a--;){const c=i[a];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(r.a-r.b)}const Tl=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Fl(n){var e;const t=getComputedStyle((e=Wn(n))!==null&&e!==void 0?e:n).display;return t==="flex"||t==="inline-flex"}function Ml(n){const e=getComputedStyle(n);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||Fl(n))||+e.opacity<1||"transform"in e&&e.transform!=="none"||"webkitTransform"in e&&e.webkitTransform!=="none"||"mixBlendMode"in e&&e.mixBlendMode!=="normal"||"filter"in e&&e.filter!=="none"||"webkitFilter"in e&&e.webkitFilter!=="none"||"isolation"in e&&e.isolation==="isolate"||Tl.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function rn(n){let e=n.length;for(;e--;){const t=n[e];if(V(t,"Missing node"),Ml(t))return t}return null}function on(n){return n&&Number(getComputedStyle(n).zIndex)||0}function an(n){const e=[];for(;n;)e.push(n),n=Wn(n);return e}function Wn(n){const{parentNode:e}=n;return e&&e instanceof ShadowRoot?e.host:e}const Gn=1,Vn=2,Xn=4,Qn=8,Il=Pl()==="coarse";let xe=[],_e=!1,Te=new Map,St=new Map;const Qe=new Set;function Ll(n,e,t,s,r){var i;const{ownerDocument:o}=e,a={direction:t,element:e,hitAreaMargins:s,setResizeHandlerState:r},c=(i=Te.get(o))!==null&&i!==void 0?i:0;return Te.set(o,c+1),Qe.add(a),xt(),function(){var f;St.delete(n),Qe.delete(a);const u=(f=Te.get(o))!==null&&f!==void 0?f:1;if(Te.set(o,u-1),xt(),u===1&&Te.delete(o),xe.includes(a)){const h=xe.indexOf(a);h>=0&&xe.splice(h,1),Yt(),r("up",!0,null)}}}function Ol(n){const{target:e}=n,{x:t,y:s}=kt(n);_e=!0,Qt({target:e,x:t,y:s}),xt(),xe.length>0&&(gt("down",n),n.preventDefault(),Yn(e)||n.stopImmediatePropagation())}function It(n){const{x:e,y:t}=kt(n);if(_e&&n.buttons===0&&(_e=!1,gt("up",n)),!_e){const{target:s}=n;Qt({target:s,x:e,y:t})}gt("move",n),Yt(),xe.length>0&&n.preventDefault()}function Lt(n){const{target:e}=n,{x:t,y:s}=kt(n);St.clear(),_e=!1,xe.length>0&&(n.preventDefault(),Yn(e)||n.stopImmediatePropagation()),gt("up",n),Qt({target:e,x:t,y:s}),Yt(),xt()}function Yn(n){let e=n;for(;e;){if(e.hasAttribute(se.resizeHandle))return!0;e=e.parentElement}return!1}function Qt({target:n,x:e,y:t}){xe.splice(0);let s=null;(n instanceof HTMLElement||n instanceof SVGElement)&&(s=n),Qe.forEach(r=>{const{element:i,hitAreaMargins:o}=r,a=i.getBoundingClientRect(),{bottom:c,left:d,right:f,top:u}=a,h=Il?o.coarse:o.fine;if(e>=d-h&&e<=f+h&&t>=u-h&&t<=c+h){if(s!==null&&document.contains(s)&&i!==s&&!i.contains(s)&&!s.contains(i)&&Dl(s,i)>0){let p=s,g=!1;for(;p&&!p.contains(i);){if(El(p.getBoundingClientRect(),a)){g=!0;break}p=p.parentElement}if(g)return}xe.push(r)}})}function Ot(n,e){St.set(n,e)}function Yt(){let n=!1,e=!1;xe.forEach(s=>{const{direction:r}=s;r==="horizontal"?n=!0:e=!0});let t=0;St.forEach(s=>{t|=s}),n&&e?Mt("intersection",t):n?Mt("horizontal",t):e?Mt("vertical",t):$l()}let Rt=new AbortController;function xt(){Rt.abort(),Rt=new AbortController;const n={capture:!0,signal:Rt.signal};Qe.size&&(_e?(xe.length>0&&Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("contextmenu",Lt,n),s.addEventListener("pointerleave",It,n),s.addEventListener("pointermove",It,n))}),window.addEventListener("pointerup",Lt,n),window.addEventListener("pointercancel",Lt,n)):Te.forEach((e,t)=>{const{body:s}=t;e>0&&(s.addEventListener("pointerdown",Ol,n),s.addEventListener("pointermove",It,n))}))}function gt(n,e){Qe.forEach(t=>{const{setResizeHandlerState:s}=t,r=xe.includes(t);s(n,r,e)})}function Rl(){const[n,e]=k.useState(0);return k.useCallback(()=>e(t=>t+1),[])}function V(n,e){if(!n)throw console.error(e),Error(e)}function Me(n,e,t=Vt){return n.toFixed(t)===e.toFixed(t)?0:n>e?1:-1}function je(n,e,t=Vt){return Me(n,e,t)===0}function me(n,e,t){return Me(n,e,t)===0}function Al(n,e,t){if(n.length!==e.length)return!1;for(let s=0;s<n.length;s++){const r=n[s],i=e[s];if(!me(r,i,t))return!1}return!0}function Ae({panelConstraints:n,panelIndex:e,size:t}){const s=n[e];V(s!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:r=0,collapsible:i,maxSize:o=100,minSize:a=0}=s;if(Me(t,a)<0)if(i){const c=(r+a)/2;Me(t,c)<0?t=r:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(Vt)),t}function He({delta:n,initialLayout:e,panelConstraints:t,pivotIndices:s,prevLayout:r,trigger:i}){if(me(n,0))return e;const o=[...e],[a,c]=s;V(a!=null,"Invalid first pivot index"),V(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=n<0?c:a,h=t[u];V(h,`Panel constraints not found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,m)){const x=g-b;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}{const u=n<0?a:c,h=t[u];V(h,`No panel constraints found for index ${u}`);const{collapsedSize:m=0,collapsible:p,minSize:g=0}=h;if(p){const b=e[u];if(V(b!=null,`Previous layout not found for panel index ${u}`),me(b,g)){const x=b-m;Me(x,Math.abs(n))>0&&(n=n<0?0-x:x)}}}}{const u=n<0?1:-1;let h=n<0?c:a,m=0;for(;;){const g=e[h];V(g!=null,`Previous layout not found for panel index ${h}`);const x=Ae({panelConstraints:t,panelIndex:h,size:100})-g;if(m+=x,h+=u,h<0||h>=t.length)break}const p=Math.min(Math.abs(n),Math.abs(m));n=n<0?0-p:p}{let h=n<0?a:c;for(;h>=0&&h<t.length;){const m=Math.abs(n)-Math.abs(d),p=e[h];V(p!=null,`Previous layout not found for panel index ${h}`);const g=p-m,b=Ae({panelConstraints:t,panelIndex:h,size:g});if(!me(p,b)&&(d+=p-b,o[h]=b,d.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?h--:h++}}if(Al(r,o))return r;{const u=n<0?c:a,h=e[u];V(h!=null,`Previous layout not found for panel index ${u}`);const m=h+d,p=Ae({panelConstraints:t,panelIndex:u,size:m});if(o[u]=p,!me(p,m)){let g=m-p,x=n<0?c:a;for(;x>=0&&x<t.length;){const y=o[x];V(y!=null,`Previous layout not found for panel index ${x}`);const j=y+g,N=Ae({panelConstraints:t,panelIndex:x,size:j});if(me(y,N)||(g-=N-y,o[x]=N),me(g,0))break;n>0?x--:x++}}}const f=o.reduce((u,h)=>h+u,0);return me(f,100)?o:r}function _l({layout:n,panelsArray:e,pivotIndices:t}){let s=0,r=100,i=0,o=0;const a=t[0];V(a!=null,"No pivot index found"),e.forEach((u,h)=>{const{constraints:m}=u,{maxSize:p=100,minSize:g=0}=m;h===a?(s=g,r=p):(i+=g,o+=p)});const c=Math.min(r,100-i),d=Math.max(s,100-o),f=n[a];return{valueMax:c,valueMin:d,valueNow:f}}function Ye(n,e=document){return Array.from(e.querySelectorAll(`[${se.resizeHandleId}][data-panel-group-id="${n}"]`))}function Zn(n,e,t=document){const r=Ye(n,t).findIndex(i=>i.getAttribute(se.resizeHandleId)===e);return r??null}function Jn(n,e,t){const s=Zn(n,e,t);return s!=null?[s,s+1]:[-1,-1]}function es(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const s=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return s||null}function Nt(n,e=document){const t=e.querySelector(`[${se.resizeHandleId}="${n}"]`);return t||null}function Ul(n,e,t,s=document){var r,i,o,a;const c=Nt(e,s),d=Ye(n,s),f=c?d.indexOf(c):-1,u=(r=(i=t[f])===null||i===void 0?void 0:i.id)!==null&&r!==void 0?r:null,h=(o=(a=t[f+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[u,h]}function Bl({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:s,panelDataArray:r,panelGroupElement:i,setLayout:o}){k.useRef({didWarnAboutMissingResizeHandle:!1}),Fe(()=>{if(!i)return;const a=Ye(t,i);for(let c=0;c<r.length-1;c++){const{valueMax:d,valueMin:f,valueNow:u}=_l({layout:s,panelsArray:r,pivotIndices:[c,c+1]}),h=a[c];if(h!=null){const m=r[c];V(m,`No panel data found for index "${c}"`),h.setAttribute("aria-controls",m.id),h.setAttribute("aria-valuemax",""+Math.round(d)),h.setAttribute("aria-valuemin",""+Math.round(f)),h.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{a.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[t,s,r,i]),k.useEffect(()=>{if(!i)return;const a=e.current;V(a,"Eager values not found");const{panelDataArray:c}=a,d=es(t,i);V(d!=null,`No group found for id "${t}"`);const f=Ye(t,i);V(f,`No resize handles found for group id "${t}"`);const u=f.map(h=>{const m=h.getAttribute(se.resizeHandleId);V(m,"Resize handle element has no handle id attribute");const[p,g]=Ul(t,m,c,i);if(p==null||g==null)return()=>{};const b=x=>{if(!x.defaultPrevented)switch(x.key){case"Enter":{x.preventDefault();const y=c.findIndex(j=>j.id===p);if(y>=0){const j=c[y];V(j,`No panel data found for index ${y}`);const N=s[y],{collapsedSize:z=0,collapsible:C,minSize:w=0}=j.constraints;if(N!=null&&C){const M=He({delta:me(N,z)?w-z:z-N,initialLayout:s,panelConstraints:c.map(I=>I.constraints),pivotIndices:Jn(t,m,i),prevLayout:s,trigger:"keyboard"});s!==M&&o(M)}}break}}};return h.addEventListener("keydown",b),()=>{h.removeEventListener("keydown",b)}});return()=>{u.forEach(h=>h())}},[i,n,e,t,s,r,o])}function cn(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function ts(n,e){const t=n==="horizontal",{x:s,y:r}=kt(e);return t?s:r}function Hl(n,e,t,s,r){const i=t==="horizontal",o=Nt(e,r);V(o,`No resize handle element found for id "${e}"`);const a=o.getAttribute(se.groupId);V(a,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=s;const d=ts(t,n),f=es(a,r);V(f,`No group element found for id "${a}"`);const u=f.getBoundingClientRect(),h=i?u.width:u.height;return(d-c)/h*100}function ql(n,e,t,s,r,i){if(Hn(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:r!=null?a=r:a=10;let c=0;switch(n.key){case"ArrowDown":c=o?0:a;break;case"ArrowLeft":c=o?-a:0;break;case"ArrowRight":c=o?a:0;break;case"ArrowUp":c=o?0:-a;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return s==null?0:Hl(n,e,t,s,i)}function Kl({panelDataArray:n}){const e=Array(n.length),t=n.map(i=>i.constraints);let s=0,r=100;for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;a!=null&&(s++,e[i]=a,r-=a)}for(let i=0;i<n.length;i++){const o=t[i];V(o,`Panel constraints not found for index ${i}`);const{defaultSize:a}=o;if(a!=null)continue;const c=n.length-s,d=r/c;s++,e[i]=d,r-=d}return e}function Ie(n,e,t){e.forEach((s,r)=>{const i=n[r];V(i,`Panel data not found for index ${r}`);const{callbacks:o,constraints:a,id:c}=i,{collapsedSize:d=0,collapsible:f}=a,u=t[c];if(u==null||s!==u){t[c]=s;const{onCollapse:h,onExpand:m,onResize:p}=o;p&&p(s,u),f&&(h||m)&&(m&&(u==null||je(u,d))&&!je(s,d)&&m(),h&&(u==null||!je(u,d))&&je(s,d)&&h())}})}function ut(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function Wl({defaultSize:n,dragState:e,layout:t,panelData:s,panelIndex:r,precision:i=3}){const o=t[r];let a;return o==null?a=n!=null?n.toPrecision(i):"1":s.length===1?a="1":a=o.toPrecision(i),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function Gl(n,e=10){let t=null;return(...r)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...r)},e)}}function dn(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function ns(n){return`react-resizable-panels:${n}`}function ss(n){return n.map(e=>{const{constraints:t,id:s,idIsFromProps:r,order:i}=e;return r?s:i?`${i}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function ls(n,e){try{const t=ns(n),s=e.getItem(t);if(s){const r=JSON.parse(s);if(typeof r=="object"&&r!=null)return r}}catch{}return null}function Vl(n,e,t){var s,r;const i=(s=ls(n,t))!==null&&s!==void 0?s:{},o=ss(e);return(r=i[o])!==null&&r!==void 0?r:null}function Xl(n,e,t,s,r){var i;const o=ns(n),a=ss(e),c=(i=ls(n,r))!==null&&i!==void 0?i:{};c[a]={expandToSizes:Object.fromEntries(t.entries()),layout:s};try{r.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function un({layout:n,panelConstraints:e}){const t=[...n],s=t.reduce((i,o)=>i+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(i=>`${i}%`).join(", ")}`);if(!me(s,100)&&t.length>0)for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=100/s*o;t[i]=a}let r=0;for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=Ae({panelConstraints:e,panelIndex:i,size:o});o!=a&&(r+=o-a,t[i]=a)}if(!me(r,0))for(let i=0;i<e.length;i++){const o=t[i];V(o!=null,`No layout data found for index ${i}`);const a=o+r,c=Ae({panelConstraints:e,panelIndex:i,size:a});if(o!==c&&(r-=c-o,t[i]=c,me(r,0)))break}return t}const Ql=100,qe={getItem:n=>(dn(qe),qe.getItem(n)),setItem:(n,e)=>{dn(qe),qe.setItem(n,e)}},fn={};function rs({autoSaveId:n=null,children:e,className:t="",direction:s,forwardedRef:r,id:i=null,onLayout:o=null,keyboardResizeBy:a=null,storage:c=qe,style:d,tagName:f="div",...u}){const h=Xt(i),m=k.useRef(null),[p,g]=k.useState(null),[b,x]=k.useState([]),y=Rl(),j=k.useRef({}),N=k.useRef(new Map),z=k.useRef(0),C=k.useRef({autoSaveId:n,direction:s,dragState:p,id:h,keyboardResizeBy:a,onLayout:o,storage:c}),w=k.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});k.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),k.useImperativeHandle(r,()=>({getId:()=>C.current.id,getLayout:()=>{const{layout:S}=w.current;return S},setLayout:S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current,T=un({layout:S,panelConstraints:U.map(B=>B.constraints)});cn(R,T)||(x(T),w.current.layout=T,O&&O(T),Ie(U,T,j.current))}}),[]),Fe(()=>{C.current.autoSaveId=n,C.current.direction=s,C.current.dragState=p,C.current.id=h,C.current.onLayout=o,C.current.storage=c}),Bl({committedValuesRef:C,eagerValuesRef:w,groupId:h,layout:b,panelDataArray:w.current.panelDataArray,setLayout:x,panelGroupElement:m.current}),k.useEffect(()=>{const{panelDataArray:S}=w.current;if(n){if(b.length===0||b.length!==S.length)return;let O=fn[n];O==null&&(O=Gl(Xl,Ql),fn[n]=O);const R=[...S],U=new Map(N.current);O(n,R,U,b,c)}},[n,b,c]),k.useEffect(()=>{});const M=k.useCallback(S=>{const{onLayout:O}=C.current,{layout:R,panelDataArray:U}=w.current;if(S.constraints.collapsible){const T=U.map(fe=>fe.constraints),{collapsedSize:B=0,panelSize:Y,pivotIndices:te}=De(U,S,R);if(V(Y!=null,`Panel size not found for panel "${S.id}"`),!je(Y,B)){N.current.set(S.id,Y);const E=Oe(U,S)===U.length-1?Y-B:B-Y,X=He({delta:E,initialLayout:R,panelConstraints:T,pivotIndices:te,prevLayout:R,trigger:"imperative-api"});ut(R,X)||(x(X),w.current.layout=X,O&&O(X),Ie(U,X,j.current))}}},[]),I=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current;if(S.constraints.collapsible){const B=T.map(ne=>ne.constraints),{collapsedSize:Y=0,panelSize:te=0,minSize:fe=0,pivotIndices:E}=De(T,S,U),X=O??fe;if(je(te,Y)){const ne=N.current.get(S.id),ge=ne!=null&&ne>=X?ne:X,Pe=Oe(T,S)===T.length-1?te-ge:ge-te,oe=He({delta:Pe,initialLayout:U,panelConstraints:B,pivotIndices:E,prevLayout:U,trigger:"imperative-api"});ut(U,oe)||(x(oe),w.current.layout=oe,R&&R(oe),Ie(T,oe,j.current))}}},[]),F=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{panelSize:U}=De(R,S,O);return V(U!=null,`Panel size not found for panel "${S.id}"`),U},[]),v=k.useCallback((S,O)=>{const{panelDataArray:R}=w.current,U=Oe(R,S);return Wl({defaultSize:O,dragState:p,layout:b,panelData:R,panelIndex:U})},[p,b]),P=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:B}=De(R,S,O);return V(B!=null,`Panel size not found for panel "${S.id}"`),T===!0&&je(B,U)},[]),W=k.useCallback(S=>{const{layout:O,panelDataArray:R}=w.current,{collapsedSize:U=0,collapsible:T,panelSize:B}=De(R,S,O);return V(B!=null,`Panel size not found for panel "${S.id}"`),!T||Me(B,U)>0},[]),A=k.useCallback(S=>{const{panelDataArray:O}=w.current;O.push(S),O.sort((R,U)=>{const T=R.order,B=U.order;return T==null&&B==null?0:T==null?-1:B==null?1:T-B}),w.current.panelDataArrayChanged=!0,y()},[y]);Fe(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:S,onLayout:O,storage:R}=C.current,{layout:U,panelDataArray:T}=w.current;let B=null;if(S){const te=Vl(S,T,R);te&&(N.current=new Map(Object.entries(te.expandToSizes)),B=te.layout)}B==null&&(B=Kl({panelDataArray:T}));const Y=un({layout:B,panelConstraints:T.map(te=>te.constraints)});cn(U,Y)||(x(Y),w.current.layout=Y,O&&O(Y),Ie(T,Y,j.current))}}),Fe(()=>{const S=w.current;return()=>{S.layout=[]}},[]);const _=k.useCallback(S=>{let O=!1;const R=m.current;return R&&window.getComputedStyle(R,null).getPropertyValue("direction")==="rtl"&&(O=!0),function(T){T.preventDefault();const B=m.current;if(!B)return()=>null;const{direction:Y,dragState:te,id:fe,keyboardResizeBy:E,onLayout:X}=C.current,{layout:ne,panelDataArray:ge}=w.current,{initialLayout:Ne}=te??{},Pe=Jn(fe,S,B);let oe=ql(T,S,Y,te,E,B);const at=Y==="horizontal";at&&O&&(oe=-oe);const Dt=ge.map(Tt=>Tt.constraints),Ee=He({delta:oe,initialLayout:Ne??ne,panelConstraints:Dt,pivotIndices:Pe,prevLayout:ne,trigger:Hn(T)?"keyboard":"mouse-or-touch"}),ct=!ut(ne,Ee);(qn(T)||Kn(T))&&z.current!=oe&&(z.current=oe,!ct&&oe!==0?at?Ot(S,oe<0?Gn:Vn):Ot(S,oe<0?Xn:Qn):Ot(S,0)),ct&&(x(Ee),w.current.layout=Ee,X&&X(Ee),Ie(ge,Ee,j.current))}},[]),H=k.useCallback((S,O)=>{const{onLayout:R}=C.current,{layout:U,panelDataArray:T}=w.current,B=T.map(ne=>ne.constraints),{panelSize:Y,pivotIndices:te}=De(T,S,U);V(Y!=null,`Panel size not found for panel "${S.id}"`);const E=Oe(T,S)===T.length-1?Y-O:O-Y,X=He({delta:E,initialLayout:U,panelConstraints:B,pivotIndices:te,prevLayout:U,trigger:"imperative-api"});ut(U,X)||(x(X),w.current.layout=X,R&&R(X),Ie(T,X,j.current))},[]),G=k.useCallback((S,O)=>{const{layout:R,panelDataArray:U}=w.current,{collapsedSize:T=0,collapsible:B}=O,{collapsedSize:Y=0,collapsible:te,maxSize:fe=100,minSize:E=0}=S.constraints,{panelSize:X}=De(U,S,R);X!=null&&(B&&te&&je(X,T)?je(T,Y)||H(S,Y):X<E?H(S,E):X>fe&&H(S,fe))},[H]),q=k.useCallback((S,O)=>{const{direction:R}=C.current,{layout:U}=w.current;if(!m.current)return;const T=Nt(S,m.current);V(T,`Drag handle element not found for id "${S}"`);const B=ts(R,O);g({dragHandleId:S,dragHandleRect:T.getBoundingClientRect(),initialCursorPosition:B,initialLayout:U})},[]),ee=k.useCallback(()=>{g(null)},[]),J=k.useCallback(S=>{const{panelDataArray:O}=w.current,R=Oe(O,S);R>=0&&(O.splice(R,1),delete j.current[S.id],w.current.panelDataArrayChanged=!0,y())},[y]),L=k.useMemo(()=>({collapsePanel:M,direction:s,dragState:p,expandPanel:I,getPanelSize:F,getPanelStyle:v,groupId:h,isPanelCollapsed:P,isPanelExpanded:W,reevaluatePanelConstraints:G,registerPanel:A,registerResizeHandle:_,resizePanel:H,startDragging:q,stopDragging:ee,unregisterPanel:J,panelGroupElement:m.current}),[M,p,s,I,F,v,h,P,W,G,A,_,H,q,ee,J]),K={display:"flex",flexDirection:s==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return k.createElement(jt.Provider,{value:L},k.createElement(f,{...u,children:e,className:t,id:i,ref:m,style:{...K,...d},[se.group]:"",[se.groupDirection]:s,[se.groupId]:h}))}const is=k.forwardRef((n,e)=>k.createElement(rs,{...n,forwardedRef:e}));rs.displayName="PanelGroup";is.displayName="forwardRef(PanelGroup)";function Oe(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function De(n,e,t){const s=Oe(n,e),i=s===n.length-1?[s-1,s]:[s,s+1],o=t[s];return{...e.constraints,panelSize:o,pivotIndices:i}}function Yl({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:s}){k.useEffect(()=>{if(n||t==null||s==null)return;const r=Nt(e,s);if(r==null)return;const i=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=r.getAttribute(se.groupId);V(a,`No group element found for id "${a}"`);const c=Ye(a,s),d=Zn(a,e,s);V(d!==null,`No resize element found for id "${e}"`);const f=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[f].focus();break}}};return r.addEventListener("keydown",i),()=>{r.removeEventListener("keydown",i)}},[s,n,e,t])}function os({children:n=null,className:e="",disabled:t=!1,hitAreaMargins:s,id:r,onBlur:i,onClick:o,onDragging:a,onFocus:c,onPointerDown:d,onPointerUp:f,style:u={},tabIndex:h=0,tagName:m="div",...p}){var g,b;const x=k.useRef(null),y=k.useRef({onClick:o,onDragging:a,onPointerDown:d,onPointerUp:f});k.useEffect(()=>{y.current.onClick=o,y.current.onDragging=a,y.current.onPointerDown=d,y.current.onPointerUp=f});const j=k.useContext(jt);if(j===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:N,groupId:z,registerResizeHandle:C,startDragging:w,stopDragging:M,panelGroupElement:I}=j,F=Xt(r),[v,P]=k.useState("inactive"),[W,A]=k.useState(!1),[_,H]=k.useState(null),G=k.useRef({state:v});Fe(()=>{G.current.state=v}),k.useEffect(()=>{if(t)H(null);else{const L=C(F);H(()=>L)}},[t,F,C]);const q=(g=s?.coarse)!==null&&g!==void 0?g:15,ee=(b=s?.fine)!==null&&b!==void 0?b:5;k.useEffect(()=>{if(t||_==null)return;const L=x.current;V(L,"Element ref not attached");let K=!1;return Ll(F,L,N,{coarse:q,fine:ee},(O,R,U)=>{if(!R){P("inactive");return}switch(O){case"down":{P("drag"),K=!1,V(U,'Expected event to be defined for "down" action'),w(F,U);const{onDragging:T,onPointerDown:B}=y.current;T?.(!0),B?.();break}case"move":{const{state:T}=G.current;K=!0,T!=="drag"&&P("hover"),V(U,'Expected event to be defined for "move" action'),_(U);break}case"up":{P("hover"),M();const{onClick:T,onDragging:B,onPointerUp:Y}=y.current;B?.(!1),Y?.(),K||T?.();break}}})},[q,N,t,ee,C,F,_,w,M]),Yl({disabled:t,handleId:F,resizeHandler:_,panelGroupElement:I});const J={touchAction:"none",userSelect:"none"};return k.createElement(m,{...p,children:n,className:e,id:r,onBlur:()=>{A(!1),i?.()},onFocus:()=>{A(!0),c?.()},ref:x,role:"separator",style:{...J,...u},tabIndex:h,[se.groupDirection]:N,[se.groupId]:z,[se.resizeHandle]:"",[se.resizeHandleActive]:v==="drag"?"pointer":W?"keyboard":void 0,[se.resizeHandleEnabled]:!t,[se.resizeHandleId]:F,[se.resizeHandleState]:v})}os.displayName="PanelResizeHandle";function Zl(n){const e=$.c(10);let t,s,r;e[0]!==n?({className:t,ref:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",t),e[4]=t,e[5]=i):i=e[5];let o;return e[6]!==s||e[7]!==r||e[8]!==i?(o=l.jsx(is,{ref:r,"data-slot":"resizable-panel-group",className:i,...s}),e[6]=s,e[7]=r,e[8]=i,e[9]=o):o=e[9],o}function hn(n){const e=$.c(4);let t;e[0]!==n?({...t}=n,e[0]=n,e[1]=t):t=e[1];let s;return e[2]!==t?(s=l.jsx(Bn,{"data-slot":"resizable-panel",...t}),e[2]=t,e[3]=s):s=e[3],s}function Jl(n){const e=$.c(12);let t,s,r;e[0]!==n?({withHandle:r,className:t,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);let i;e[4]!==t?(i=ce("bg-border focus-visible:ring-ring relative flex w-[0.5px] items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-hidden data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:-translate-y-1/2 data-[panel-group-direction=vertical]:after:translate-x-0 [&[data-panel-group-direction=vertical]>div]:rotate-90",t),e[4]=t,e[5]=i):i=e[5];let o;e[6]!==r?(o=r&&l.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:l.jsx(Ts,{className:"size-2.5"})}),e[6]=r,e[7]=o):o=e[7];let a;return e[8]!==s||e[9]!==i||e[10]!==o?(a=l.jsx(os,{"data-slot":"resizable-handle",className:i,...s,children:o}),e[8]=s,e[9]=i,e[10]=o,e[11]=a):a=e[11],a}function er(n){if(!n||n.includes("\\")||n.includes("..")||n.includes("\0"))return!0;try{const e=decodeURIComponent(n);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==n&&e.includes("/")){const t=(n.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>t)return!0}return!1}catch{return!0}}function tr(n){if(er(n))throw new Error(`Invalid block key: ${n||"(empty)"}`)}function nr(n){try{return decodeURIComponent(n)}catch{return n}}function sr(n){return tr(n),encodeURIComponent(n)}function lr(n){return`.deco/blocks/${sr(n)}.json`}function Oo(n){return`/${lr(n)}`}const Ro=1e4,rr=3;function Bt(n){return n.trim()?(n.startsWith("/")?n:`/${n}`).replace(/\/+/g,"/"):"/"}function Zt(n){return n.startsWith("/")?n.slice(1):n}function bt(n){return n.trim()?n.startsWith("/")?n:`/${n}`:"/"}function ir(n){const e=bt(n);if(e==="/")return"/";const t=e.split("/").filter(Boolean);return t.pop(),t.length===0?"/":`/${t.join("/")}`}function Ao(n,e){const t=e.replace(/^\/+|\/+$/g,"");return bt(t?`${n==="/"?"":n}/${t}`:n)}function _o(n,e){return e==="directory"?n:ir(n)}function Uo(n){const e=n.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function or(n){const e=Zt(n);return e?e.split("/").filter(Boolean).length:0}function Bo(n,e,t,s=!1){return{files:[...new Set([...n,...t.files])],directories:[...new Set([...e,...t.directories??[]])],truncated:s||!!t.truncated}}function Ho(n,e){return or(n)>=rr&&!e.has(n)}function qo(n,e,t=[]){const s=Zt(n);if(e.includes(s)||t.includes(s))return!0;if(!s)return!1;const r=`${s}/`;return e.some(i=>i.startsWith(r))||t.some(i=>i.startsWith(r))}function Ko(n){const e=Zt(n),t=".deco/blocks/";if(!e.startsWith(t)||!e.endsWith(".json"))return null;const s=e.slice(t.length,-5);return nr(s)}function ar(n){if(!n)return"plaintext";const e=n.toLowerCase();return e.endsWith(".tsx")||e.endsWith(".ts")?"typescript":e.endsWith(".jsx")||e.endsWith(".js")||e.endsWith(".mjs")||e.endsWith(".cjs")?"javascript":e.endsWith(".json")?"json":e.endsWith(".md")||e.endsWith(".mdx")?"markdown":e.endsWith(".css")?"css":e.endsWith(".scss")?"scss":e.endsWith(".html")?"html":e.endsWith(".yaml")||e.endsWith(".yml")?"yaml":e.endsWith(".xml")||e.endsWith(".svg")?"xml":e.endsWith(".py")?"python":e.endsWith(".sql")?"sql":e.endsWith(".sh")?"shell":"plaintext"}function Wo(n){const e=Bt(n).split("/").filter(Boolean),t=["/"];let s="";for(const r of e.slice(0,-1))s+=`/${r}`,t.push(s);return t}function Go(n,e=[]){const t={children:[]},s=i=>{const a=Bt(i).split("/").filter(Boolean);let c=t,d="";for(const f of a){d+=`/${f}`;let u=c.children.find(h=>h.name===f);u?u.kind==="file"&&(u.kind="directory"):(u={name:f,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of n){const a=Bt(i).split("/").filter(Boolean);let c=t,d="";a.forEach((f,u)=>{d+=`/${f}`;const h=u===a.length-1;let m=c.children.find(p=>p.name===f);m||(m={name:f,path:d,kind:h?"file":"directory",children:[]},c.children.push(m)),c=m})}for(const i of e)s(bt(i));const r=i=>{i.sort((o,a)=>o.kind!==a.kind?o.kind==="directory"?-1:1:o.name.localeCompare(a.name));for(const o of i)o.children.length>0&&r(o.children)};return r(t.children),t.children}function cr(n,e,t=0){const s=[];for(const r of n)r.name!==".gitkeep"&&(s.push({node:r,depth:t}),r.kind==="directory"&&r.children.length>0&&e.has(r.path)&&s.push(...cr(r.children,e,t+1)));return s}function Vo(n){return n.split(`
|
|
2
2
|
`).map(e=>{const t=e.match(/^\d+\t(.*)/);return t?t[1]:e}).join(`
|
|
3
3
|
`)}al.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function dr(n){const e=$.c(11),{value:t,filename:s}=n,[r]=zs(),i=r.theme==="dark"||r.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==s?(o=ar(s),e[0]=s,e[1]=o):o=e[1];const a=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsx(Cs,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},f={top:12,bottom:12},e[3]=d,e[4]=f):(d=e[3],f=e[4]);let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u={readOnly:!0,domReadOnly:!0,fontSize:13,scrollBeyondLastLine:!1,automaticLayout:!0,lineNumbersMinChars:3,wordWrap:"on",minimap:d,padding:f,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let h;return e[6]!==s||e[7]!==o||e[8]!==a||e[9]!==t?(h=l.jsx(cl,{path:s,language:o,value:t,theme:a,loading:c,options:u},s),e[6]=s,e[7]=o,e[8]=a,e[9]=t,e[10]=h):h=e[10],h}function as(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}const ur=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),fr=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),mn=2*1024*1024;function hr(n,e){const t=n.split(".").pop()?.toLowerCase()??"";return ur.has(t)?"image":t==="pdf"?"pdf":t==="html"||t==="htm"?"html":t==="md"||t==="markdown"?e<=mn?"markdown":"download":fr.has(t)&&e<=mn?"text":"download"}function cs(){const n=$.c(2);let e;n[0]===Symbol.for("react.memo_cache_sentinel")?(e=l.jsx(ae,{className:"h-6 w-2/3"}),n[0]=e):e=n[0];let t;return n[1]===Symbol.for("react.memo_cache_sentinel")?(t=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,l.jsxs("div",{className:"flex flex-col gap-1.5",children:[l.jsx(ae,{className:"h-3 w-full"}),l.jsx(ae,{className:"h-3 w-5/6"}),l.jsx(ae,{className:"h-3 w-2/3"})]})]})}),n[1]=t):t=n[1],t}function ds(n){const e=$.c(20),{file:t,note:s}=n;let r;e[0]!==t.filename?(r=l.jsx(Se,{filename:t.filename,className:"h-12 w-10"}),e[0]=t.filename,e[1]=r):r=e[1];let i;e[2]!==t.filename?(i=l.jsx("span",{className:"text-sm font-medium text-foreground",children:t.filename}),e[2]=t.filename,e[3]=i):i=e[3];let o;e[4]!==t.size?(o=as(t.size),e[4]=t.size,e[5]=o):o=e[5];const a=s?` · ${s}`:"";let c;e[6]!==o||e[7]!==a?(c=l.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,a]}),e[6]=o,e[7]=a,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=l.jsxs("div",{className:"flex flex-col items-center gap-0.5",children:[i,c]}),e[9]=i,e[10]=c,e[11]=d):d=e[11];let f;e[12]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(Ve,{size:14}),e[12]=f):f=e[12];let u;e[13]!==t.downloadUrl||e[14]!==t.filename?(u=l.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:l.jsxs("a",{href:t.downloadUrl,download:t.filename,children:[f,"Download"]})}),e[13]=t.downloadUrl,e[14]=t.filename,e[15]=u):u=e[15];let h;return e[16]!==r||e[17]!==d||e[18]!==u?(h=l.jsx("div",{className:"flex h-full w-full items-center justify-center",children:l.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[r,d,u]})}),e[16]=r,e[17]=d,e[18]=u,e[19]=h):h=e[19],h}function pn(n){const e=$.c(16),{file:t,markdown:s}=n;let r;e[0]!==t.downloadUrl?(r=Q.fileText(t.downloadUrl),e[0]=t.downloadUrl,e[1]=r):r=e[1];let i;e[2]!==t.downloadUrl?(i=async()=>{const u=await fetch(t.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=t.downloadUrl,e[3]=i):i=e[3];let o;e[4]!==r||e[5]!==i?(o={queryKey:r,queryFn:i,staleTime:6e4,retry:!1},e[4]=r,e[5]=i,e[6]=o):o=e[6];const{data:a,isPending:c,isError:d}=ie(o);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=l.jsx(cs,{}),e[7]=u):u=e[7],u}if(d||a===void 0){let u;return e[8]!==t?(u=l.jsx(ds,{file:t,note:"preview unavailable"}),e[8]=t,e[9]=u):u=e[9],u}if(s){const u=`file-preview-${t.key}`;let h;return e[10]!==a||e[11]!==u?(h=l.jsx("div",{className:"h-full overflow-y-auto",children:l.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:l.jsx(Wt,{id:u,text:a})})}),e[10]=a,e[11]=u,e[12]=h):h=e[12],h}let f;return e[13]!==a||e[14]!==t.filename?(f=l.jsx(dr,{value:a,filename:t.filename}),e[13]=a,e[14]=t.filename,e[15]=f):f=e[15],f}function us(n){const e=$.c(15),{file:t}=n;switch(hr(t.filename,t.size)){case"image":{let r;return e[0]!==t.downloadUrl||e[1]!==t.filename?(r=l.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:l.jsx("img",{src:t.downloadUrl,alt:t.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=t.downloadUrl,e[1]=t.filename,e[2]=r):r=e[2],r}case"pdf":{let r;return e[3]!==t.downloadUrl||e[4]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,className:"block h-full w-full bg-white"}),e[3]=t.downloadUrl,e[4]=t.filename,e[5]=r):r=e[5],r}case"html":{let r;return e[6]!==t.downloadUrl||e[7]!==t.filename?(r=l.jsx("iframe",{src:t.downloadUrl,title:t.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=t.downloadUrl,e[7]=t.filename,e[8]=r):r=e[8],r}case"markdown":{let r;return e[9]!==t?(r=l.jsx(pn,{file:t,markdown:!0}),e[9]=t,e[10]=r):r=e[10],r}case"text":{let r;return e[11]!==t?(r=l.jsx(pn,{file:t,markdown:!1}),e[11]=t,e[12]=r):r=e[12],r}default:{let r;return e[13]!==t?(r=l.jsx(ds,{file:t}),e[13]=t,e[14]=r):r=e[14],r}}}function mr(n){const e=$.c(40),{readUrl:t,editor:s,downloadName:r,trailing:i}=n;let o;e[0]!==t?(o=new URL(t,window.location.origin).toString(),e[0]=t,e[1]=o):o=e[1];const a=o;let c;e[2]!==s?(c=s.deckDetected&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.railOpen?"secondary":"ghost",size:"icon","aria-label":s.railOpen?"Hide slide list":"Show slide list",onClick:()=>s.setRailOpen(!s.railOpen),children:l.jsx(dl,{size:14})})}),l.jsx(we,{side:"bottom",children:s.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=s,e[3]=c):c=e[3];let d;e[4]!==a?(d=()=>window.open(a,"_blank","noopener"),e[4]=a,e[5]=d):d=e[5];let f;e[6]!==a?(f=l.jsx("span",{className:"truncate",children:a}),e[6]=a,e[7]=f):f=e[7];let u;e[8]!==a||e[9]!==d||e[10]!==f?(u=l.jsx("button",{type:"button",onClick:d,className:"flex min-w-0 flex-1 items-center rounded-md px-2 py-1 text-left text-xs text-muted-foreground transition-colors hover:bg-muted hover:text-foreground",title:a,children:f}),e[8]=a,e[9]=d,e[10]=f,e[11]=u):u=e[11];let h;e[12]!==s.agentUpdated||e[13]!==s.reload?(h=s.agentUpdated&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:s.reload,children:[l.jsx(Nn,{size:12}),"Agent updated — reload"]})}),l.jsx(we,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=s.agentUpdated,e[13]=s.reload,e[14]=h):h=e[14];let m;e[15]!==s.saving?(m=s.saving&&l.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=s.saving,e[16]=m):m=e[16];let p;e[17]!==s?(p=s.deckDetected&&s.writable&&l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:s.editMode?"secondary":"ghost",size:"icon","aria-label":s.editMode?"Done editing":"Edit inline",className:ce(s.editMode&&"text-primary"),onClick:()=>s.setEditMode(!s.editMode),children:l.jsx(Fs,{size:14})})}),l.jsx(we,{side:"bottom",children:s.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=s,e[18]=p):p=e[18];let g;e[19]!==a||e[20]!==r||e[21]!==s.deckDetected?(g=s.deckDetected?l.jsxs(tt,{children:[l.jsx(nt,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",children:l.jsx(Ve,{size:14})})}),l.jsxs(st,{align:"end",children:[l.jsxs(be,{onClick:()=>window.open(`${a}#print`,"_blank","noopener"),children:[l.jsx(Ms,{size:14}),"Export as PDF"]}),l.jsx(be,{asChild:!0,children:l.jsxs("a",{href:a,download:r,children:[l.jsx(Is,{size:14}),"Download HTML"]})})]})]}):l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:l.jsx("a",{href:a,download:r,children:l.jsx(Ve,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Download"})]}),e[19]=a,e[20]=r,e[21]=s.deckDetected,e[22]=g):g=e[22];let b;e[23]!==a?(b=()=>window.open(a,"_blank","noopener"),e[23]=a,e[24]=b):b=e[24];let x;e[25]===Symbol.for("react.memo_cache_sentinel")?(x=l.jsx(Ln,{size:14}),e[25]=x):x=e[25];let y;e[26]!==b?(y=l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:x})}),e[26]=b,e[27]=y):y=e[27];let j;e[28]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(we,{side:"bottom",children:"Open in new tab"}),e[28]=j):j=e[28];let N;e[29]!==y?(N=l.jsxs(ye,{children:[y,j]}),e[29]=y,e[30]=N):N=e[30];let z;return e[31]!==N||e[32]!==c||e[33]!==u||e[34]!==h||e[35]!==m||e[36]!==p||e[37]!==g||e[38]!==i?(z=l.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,h,m,p,g,N,i]}),e[31]=N,e[32]=c,e[33]=u,e[34]=h,e[35]=m,e[36]=p,e[37]=g,e[38]=i,e[39]=z):z=e[39],z}const Re=1;function pr(n){if(typeof n!="object"||n===null||n.v!==Re||n.source!=="deck-viewer")return null;const e=n;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class ze extends Error{constructor(e,t){super(e),this.code=t,this.name="DeckOpError"}code}function fs(n){return[...n.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function xr(n){const t=new DOMParser().parseFromString(n,"text/html").querySelector("deck-viewer");return t?fs(t).length:null}function gr(n,e){const t=new DOMParser().parseFromString(n,"text/html"),s=t.querySelector("deck-viewer");if(!s)throw new ze("no <deck-viewer> element in source","no-viewer");const r=fs(s),i=e.kind==="move"?e.from:e.at,o=r[i];if(!o)throw new ze(`slide index ${i} out of range (${r.length})`,"stale-index");switch(e.kind){case"remove":{if(r.length<=1)throw new ze("cannot remove the last slide","bad-op");o.remove();break}case"duplicate":{const c=o.cloneNode(!0);c.removeAttribute("id");for(const d of c.querySelectorAll("[id]"))d.removeAttribute("id");o.after(c);break}case"move":{if(e.to<0||e.to>=r.length)throw new ze(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?r[e.to]:r[e.to].nextSibling;s.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new ze(`invalid attribute name: ${e.name}`,"bad-op");o.setAttribute(e.name,e.value);break}case"remove-attr":{o.removeAttribute(e.name);break}case"replace":{const d=new DOMParser().parseFromString(e.html,"text/html").body.firstElementChild;if(!d)throw new ze("replace html has no root element","bad-op");o.replaceWith(t.importNode(d,!0));break}default:throw new ze(`unknown op kind: ${e.kind}`,"bad-op")}return`${n.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
4
|
`:""}${t.documentElement.outerHTML}
|
|
5
|
-
`}const xn="home",br=400,yr=800;function vr(n){const e=n.savePath!==void 0,{org:t}=de(),s=Ze(),r=_n(xn),[i,o]=k.useState(!1),[a,c]=k.useState(!1),[d,f]=k.useState(!1),[u,h]=k.useState(!1),[m,p]=k.useState(!1),[g,b]=k.useState(!1),[x,y]=k.useState(null),[j,N]=k.useState(null),[z,C]=k.useState(0),[w]=k.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),M=i||g||m,I=()=>{n.savePath!==void 0&&(s.invalidateQueries({queryKey:Q.orgFsStat(t.id,xn,n.savePath)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}))},F=L=>{w.iframe?.contentWindow?.postMessage(L,"*")},v=()=>{w.source=null,h(!1),j&&y(j),C(L=>L+1),I()};n.statMarker!==j&&(N(n.statMarker),n.statMarker!==null&&(x===null?y(n.statMarker):w.selfMarkers.has(n.statMarker)||n.statMarker!==x&&(M?h(!0):(w.source=null,y(n.statMarker)))));const P=async()=>{w.saveTimer=null;const L=w.source;if(L===null){b(!1);return}p(!0);try{const K=await r.mutateAsync({path:n.savePath,body:L});w.selfMarkers.add(On(K)),I()}catch(K){console.error("[deck-editor] save failed",K),ue.error("Couldn't save deck edits — reloading the preview."),G.current.reload()}finally{p(!1),b(!1)}},W=L=>{b(!0),w.saveTimer&&clearTimeout(w.saveTimer),w.saveTimer=setTimeout(()=>{G.current.flushSave()},L)},A=(L,K,S)=>{F({v:Re,type:"ack",opId:L,ok:K,error:S})},_=async L=>{if(!e){A(L.opId,!1,"read-only preview");return}try{if(w.source===null){const S=await fetch(n.readUrl,{credentials:"include"});if(!S.ok)throw new Error(`HTTP ${S.status}`);w.source=await S.text()}const K=xr(w.source);if(K===null||K!==L.witness.childCount)throw new ze(`slide count drifted (source ${K}, iframe ${L.witness.childCount})`,"stale-index");w.source=gr(w.source,L.op),A(L.opId,!0),W(L.op.kind==="replace"?yr:br)}catch(K){console.error("[deck-editor] op failed",L.op,K),A(L.opId,!1,K instanceof Error?K.message:String(K)),ue.error("That edit couldn't be saved — reloading the preview."),G.current.reload()}},H=L=>{if(!w.iframe||L.source!==w.iframe.contentWindow)return;const K=pr(L.data);if(K){if(K.type==="ready"){c(!0),G.current.editMode?F({v:Re,type:"set-edit-mode",enabled:!0}):G.current.railOpen&&F({v:Re,type:"set-rail",open:!0});return}K.type==="op"&&(w.queue=w.queue.then(()=>G.current.handleOp(K)).catch(()=>{}))}},G=k.useRef({onMessage:H,handleOp:_,flushSave:P,reload:v,editMode:i,railOpen:d});G.current={onMessage:H,handleOp:_,flushSave:P,reload:v,editMode:i,railOpen:d};const[q]=k.useState(()=>{let L=null;return K=>{if(K){w.iframe=K;const S=O=>G.current.onMessage(O);window.addEventListener("message",S),L=()=>window.removeEventListener("message",S)}else L?.(),L=null,w.iframe=null}}),ee=L=>{f(L),F({v:Re,type:"set-rail",open:L})},J=L=>{o(L),F({v:Re,type:"set-edit-mode",enabled:L}),L&&f(!0),!L&&u&&!g&&!m&&v()};return{iframeRef:q,deckDetected:a,writable:e,displayedMarker:x===null?null:`${x}.${z}`,editMode:i,setEditMode:J,railOpen:d,setRailOpen:ee,saving:m,agentUpdated:u,reload:v,postToIframe:F}}const wr=300;function jr({readUrl:n,marker:e,title:t,savePath:s,trailing:r}){const i=vr({readUrl:n,statMarker:e,savePath:s}),[o,a]=k.useState(null);if(i.displayedMarker===null)return null;const c=n.includes("?")?"&":"?",d=`${n}${c}v=${encodeURIComponent(i.displayedMarker)}`,f=o===d;return l.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[l.jsx(mr,{readUrl:n,editor:i,downloadName:t.split("/").pop()??t,trailing:r}),l.jsx("div",{className:"relative flex-1",children:l.jsx("iframe",{ref:i.iframeRef,src:d,onLoad:()=>a(d),sandbox:"allow-scripts",className:ce("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",f?"opacity-100":"opacity-0"),style:{transitionDuration:`${wr}ms`},title:t},d)})]})}const kr=[{mode:"private",label:"Org only",Icon:$s},{mode:"public",label:"Public",Icon:yt},{mode:"password",label:"Password",Icon:In}];function hs(n){const e=$.c(38),{volume:t,path:s,kind:r,shareMode:i,effectivePublic:o,url:a}=n,c=Sl(t),{data:d}=Rn(t,s),f=d?.shareMode??i,h=(d?.effectivePublic??o)&&f==="private",m=r==="dir",p=m?"folder":"file",[g,b]=k.useState(!1),[x,y]=k.useState(""),[j,N]=k.useState(!1);let z;e[0]!==s||e[1]!==c||e[2]!==p?(z=(J,L)=>{c.mutate({path:s,mode:J,password:L},{onSuccess:()=>{b(!1),y(""),ue.success(J==="private"?`This ${p} is now org-only`:J==="public"?`Anyone with the link can now view this ${p}`:`This ${p} is now password-protected`)},onError:Sr})},e[0]=s,e[1]=c,e[2]=p,e[3]=z):z=e[3];const C=z;let w;e[4]!==C?(w=J=>{if(J==="password"){b(!0);return}b(!1),C(J)},e[4]=C,e[5]=w):w=e[5];const M=w,I=g?"password":f;let F;e[6]!==a?(F=async()=>{a&&(await navigator.clipboard.writeText(a),N(!0),ue.success("Link copied to clipboard"),setTimeout(()=>N(!1),2e3))},e[6]=a,e[7]=F):F=e[7];const v=F;let P;e[8]!==j||e[9]!==v||e[10]!==a?(P=a?l.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[l.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:a}),l.jsx(Z,{variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:v,"aria-label":"Copy link",children:j?l.jsx(il,{size:12,className:"text-green-600"}):l.jsx(ol,{size:12})})]}):null,e[8]=j,e[9]=v,e[10]=a,e[11]=P):P=e[11];const W=P;if(h){let J;e[12]===Symbol.for("react.memo_cache_sentinel")?(J=l.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:l.jsx(yt,{size:16})}),e[12]=J):J=e[12];let L;e[13]===Symbol.for("react.memo_cache_sentinel")?(L=l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Shared via a parent folder"}),e[13]=L):L=e[13];const K=m?"files in this folder":"this file";let S;e[14]!==K?(S=l.jsxs("div",{className:"flex items-start gap-3",children:[J,l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[L,l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Anyone with the link can view"," ",K,". Manage sharing on the parent folder."]})]})]}),e[14]=K,e[15]=S):S=e[15];let O;return e[16]!==W||e[17]!==S?(O=l.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[S,W]}),e[16]=W,e[17]=S,e[18]=O):O=e[18],O}let A;e[19]!==I||e[20]!==M||e[21]!==c.isPending?(A=kr.map(J=>{const{mode:L,label:K,Icon:S}=J;return l.jsxs("button",{type:"button",disabled:c.isPending,onClick:()=>M(L),className:ce("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",I===L?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.jsx(S,{size:15}),K]},L)}),e[19]=I,e[20]=M,e[21]=c.isPending,e[22]=A):A=e[22];let _;e[23]!==A?(_=l.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-lg bg-muted p-1",children:A}),e[23]=A,e[24]=_):_=e[24];const H=I==="private"?`Only members of your organization can open ${m?"these files":"this link"}.`:I==="public"?m?"Anyone on the internet can view files in this folder via their link.":"Anyone on the internet with the link can view this file.":`Anyone with the link AND the password can view ${m?"files in this folder":"this file"}.`;let G;e[25]!==H?(G=l.jsx("p",{className:"text-xs text-muted-foreground",children:H}),e[25]=H,e[26]=G):G=e[26];let q;e[27]!==I||e[28]!==C||e[29]!==f||e[30]!==x||e[31]!==c.isPending?(q=I==="password"&&l.jsxs("form",{className:"flex items-center gap-2",onSubmit:J=>{J.preventDefault(),x&&C("password",x)},children:[l.jsx(Xe,{type:"password",value:x,onChange:J=>y(J.target.value),placeholder:f==="password"?"New password":"Password",autoComplete:"new-password",className:"h-8 text-xs"}),l.jsx(Z,{type:"submit",size:"sm",className:"shrink-0",disabled:!x||c.isPending,children:f==="password"?"Update":"Set"})]}),e[27]=I,e[28]=C,e[29]=f,e[30]=x,e[31]=c.isPending,e[32]=q):q=e[32];let ee;return e[33]!==W||e[34]!==_||e[35]!==G||e[36]!==q?(ee=l.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[_,G,q,W]}),e[33]=W,e[34]=_,e[35]=G,e[36]=q,e[37]=ee):ee=e[37],ee}function Sr(n){return ue.error(n instanceof Error?n.message:"Failed to update sharing")}function gn(n){const e=$.c(7),{volume:t,path:s,shareMode:r,effectivePublic:i,url:o}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(sl,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Share",children:l.jsx(Pn,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Share"})]}),e[0]=a):a=e[0];let c;return e[1]!==i||e[2]!==s||e[3]!==r||e[4]!==o||e[5]!==t?(c=l.jsxs(ll,{children:[a,l.jsx(rl,{align:"end",className:"w-80 p-3",children:l.jsx(hs,{volume:t,path:s,kind:"file",shareMode:r,effectivePublic:i,url:o})})]}),e[1]=i,e[2]=s,e[3]=r,e[4]=o,e[5]=t,e[6]=c):c=e[6],c}function Nr(n){const e=$.c(11),{target:t,onOpenChange:s}=n,r=!!t,i=t?.kind==="dir"?"folder":"file";let o;e[0]!==i?(o=l.jsx(Tn,{children:l.jsxs(Ue,{children:["Share ",i]})}),e[0]=i,e[1]=o):o=e[1];let a;e[2]!==t?(a=t&&l.jsx(hs,{...t}),e[2]=t,e[3]=a):a=e[3];let c;e[4]!==o||e[5]!==a?(c=l.jsxs(Je,{className:"sm:max-w-md",children:[o,a]}),e[4]=o,e[5]=a,e[6]=c):c=e[6];let d;return e[7]!==s||e[8]!==r||e[9]!==c?(d=l.jsx(et,{open:r,onOpenChange:s,children:c}),e[7]=s,e[8]=r,e[9]=c,e[10]=d):d=e[10],d}function zt(n){const e=n?n.split("/").filter(Boolean):[],t=e[0]==="public",s=t?e[1]??null:null,r=t?s?`public-${s}`:null:e[0]??null,i=(t?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:r,dirPath:i,isPublic:t,publicSet:s,readOnly:t}}function Le(n,e){return n.isPublic&&n.publicSet?`public/${n.publicSet}/${e}`:n.volume?`${n.volume}/${e}`:e}const bn="public-";function Jt(n){return n.startsWith(bn)?n.slice(bn.length):null}function zr(n,e){const t=Jt(n);return t?`public/${t}/${e}`:`${n}/${e}`}function le(n){const e=n.lastIndexOf("/");return e===-1?n:n.slice(e+1)}function Cr(n){const e=$.c(11),{org:t,previewPath:s}=n;let r;e[0]!==s?(r=s.split("/").slice(0,-1).join("/"),e[0]=s,e[1]=r):r=e[1];const i=r;let o;e[2]!==t?(o={org:t},e[2]=t,e[3]=o):o=e[3];let a;e[4]!==i||e[5]!==s?(a={path:i,preview:s},e[4]=i,e[5]=s,e[6]=a):a=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(qt,{size:14}),e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==a?(d=l.jsx(Z,{variant:"ghost",size:"sm",asChild:!0,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:l.jsxs(Ps,{to:"/$org/files",params:o,search:a,children:[c,"See in library"]})}),e[8]=o,e[9]=a,e[10]=d):d=e[10],d}const $r=n=>/\.html?$/i.test(n);function yn(n){const e=$.c(6),{onClose:t}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=l.jsx(En,{size:14}),e[0]=s):s=e[0];let r;e[1]!==t?(r=l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon",onClick:t,children:s})}),e[1]=t,e[2]=r):r=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(we,{side:"bottom",children:"Close"}),e[3]=i):i=e[3];let o;return e[4]!==r?(o=l.jsxs(ye,{children:[r,i]}),e[4]=r,e[5]=o):o=e[5],o}function ms(n){const e=$.c(37),{previewPath:t,onClose:s,showSeeInLibrary:r,variant:i}=n,o=r===void 0?!1:r;let a;e[0]!==t?(a=zt(t),e[0]=t,e[1]=a):a=e[1];const c=a,{volume:d,dirPath:f}=c,{data:u,isPending:h}=Rn(d,f),m=kl(d??""),p=le(f);let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g={strict:!1},e[2]=g):g=e[2];const{org:b}=Es(g),x=i==="dialog";let y;e[3]!==b||e[4]!==t||e[5]!==o?(y=o&&b?l.jsx(Cr,{org:b,previewPath:t}):null,e[3]=b,e[4]=t,e[5]=o,e[6]=y):y=e[6];const j=y,N=u&&u.kind==="file"?{key:t,filename:p,size:u.size,downloadUrl:m(u.path)}:null;if(N&&u&&$r(p)){const F=N.downloadUrl;let v;e[7]!==u?(v=On(u),e[7]=u,e[8]=v):v=e[8];const P=d??"",W=u.shareMode??"private",A=u.effectivePublic??!1,_=window.location.origin+N.downloadUrl;let H;e[9]!==f||e[10]!==_||e[11]!==P||e[12]!==W||e[13]!==A?(H=l.jsx(gn,{volume:P,path:f,shareMode:W,effectivePublic:A,url:_}),e[9]=f,e[10]=_,e[11]=P,e[12]=W,e[13]=A,e[14]=H):H=e[14];let G;e[15]!==x||e[16]!==s?(G=x?l.jsx("div",{className:"w-8 shrink-0"}):l.jsx(yn,{onClose:s}),e[15]=x,e[16]=s,e[17]=G):G=e[17];let q;return e[18]!==j||e[19]!==H||e[20]!==G?(q=l.jsxs(l.Fragment,{children:[H,j,G]}),e[18]=j,e[19]=H,e[20]=G,e[21]=q):q=e[21],l.jsxs(l.Fragment,{children:[x&&l.jsx(Ue,{className:"sr-only",children:p}),l.jsx(jr,{readUrl:F,marker:v,title:p,savePath:d==="home"?f:void 0,trailing:q},t)]})}const z=x?"h-11 py-1 pr-12 pl-2":"h-9 px-2";let C;e[22]!==z?(C=ce("flex shrink-0 items-center gap-1 border-b border-border/60",z),e[22]=z,e[23]=C):C=e[23];let w;e[24]!==u?.effectivePublic||e[25]!==u?.shareMode||e[26]!==N||e[27]!==f||e[28]!==d?(w=N&&l.jsxs(l.Fragment,{children:[l.jsx(gn,{volume:d??"",path:f,shareMode:u?.shareMode??"private",effectivePublic:u?.effectivePublic??!1,url:window.location.origin+N.downloadUrl}),l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon",asChild:!0,children:l.jsx("a",{href:N.downloadUrl,download:N.filename,children:l.jsx(Ve,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Download"})]}),l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon",onClick:()=>window.open(N.downloadUrl,"_blank","noopener"),children:l.jsx(Ln,{size:14})})}),l.jsx(we,{side:"bottom",children:"Open in new tab"})]})]}),e[24]=u?.effectivePublic,e[25]=u?.shareMode,e[26]=N,e[27]=f,e[28]=d,e[29]=w):w=e[29];let M;e[30]!==x||e[31]!==s?(M=!x&&l.jsx(yn,{onClose:s}),e[30]=x,e[31]=s,e[32]=M):M=e[32];let I;return e[33]!==N||e[34]!==p||e[35]!==h?(I=l.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:N?l.jsx(us,{file:N}):h?l.jsx(cs,{}):l.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[l.jsx(Se,{filename:p,className:"h-7.5 w-6"}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})}),e[33]=N,e[34]=p,e[35]=h,e[36]=I):I=e[36],l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:C,children:[l.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[l.jsx(Se,{filename:p,className:"h-4.5 w-3.5 shrink-0"}),x?l.jsx(Ue,{className:"truncate text-xs font-medium text-foreground",children:p}):l.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:p}),N&&l.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:as(N.size)})]}),j,w,M]}),I]})}function Pr(n){const e=$.c(4),{previewPath:t,onClose:s,showSeeInLibrary:r}=n,i=r===void 0?!1:r;let o;return e[0]!==s||e[1]!==t||e[2]!==i?(o=l.jsx("div",{className:"flex h-full w-full flex-col bg-background",children:l.jsx(ms,{previewPath:t,onClose:s,showSeeInLibrary:i,variant:"panel"})}),e[0]=s,e[1]=t,e[2]=i,e[3]=o):o=e[3],o}const Er=new Set(["output","upload","public","home"]),Dr=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function ps(n){return Er.has(n)||!Dr.test(n)?"home":n}function Tr(n){const e=$.c(10),{icon:t,className:s}=n,r=s===void 0?"size-4":s;if(t.kind==="component"){const{Component:o}=t;let a;return e[0]!==o||e[1]!==r?(a=l.jsx(o,{className:r}),e[0]=o,e[1]=r,e[2]=a):a=e[2],a}if(t.kind==="url"){const o=t.src;let a;e[3]!==r?(a=ce(r,"rounded-sm object-cover"),e[3]=r,e[4]=a):a=e[4];let c;return e[5]!==t.src||e[6]!==a?(c=l.jsx("img",{src:o,alt:"",className:a}),e[5]=t.src,e[6]=a,e[7]=c):c=e[7],c}let i;return e[8]!==r?(i=l.jsx(Zs,{className:r}),e[8]=r,e[9]=i):i=e[9],i}function Fr(n){const e=$.c(17),{title:t,icon:s,active:r,onClick:i,disabled:o,locked:a,className:c}=n,d=o===void 0?!1:o,f=a===void 0?!1:a,u=f||void 0,h=f&&"pointer-events-none",m=r?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let p;e[0]!==c||e[1]!==h||e[2]!==m?(p=ce("shrink-0 flex items-center gap-1.5 h-8 rounded-md px-2","[transition:background-color_180ms_ease,color_180ms_ease]","disabled:opacity-40 disabled:pointer-events-none",h,m,c),e[0]=c,e[1]=h,e[2]=m,e[3]=p):p=e[3];let g;e[4]!==s?(g=l.jsx("span",{className:"flex size-5 items-center justify-center shrink-0",children:l.jsx(Tr,{icon:s})}),e[4]=s,e[5]=g):g=e[5];let b;e[6]!==t?(b=l.jsx("span",{className:"max-md:hidden whitespace-nowrap text-sm font-medium leading-none",children:t}),e[6]=t,e[7]=b):b=e[7];let x;return e[8]!==r||e[9]!==d||e[10]!==i||e[11]!==u||e[12]!==p||e[13]!==g||e[14]!==b||e[15]!==t?(x=l.jsxs("button",{type:"button",onClick:i,disabled:d,"aria-pressed":r,"aria-disabled":u,"aria-label":t,className:p,children:[g,b]}),e[8]=r,e[9]=d,e[10]=i,e[11]=u,e[12]=p,e[13]=g,e[14]=b,e[15]=t,e[16]=x):x=e[16],x}function Mr(n){const e=$.c(33);let t,s,r;e[0]!==n?({glyph:t,readOnly:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);const i=k.useId(),o=`${i}-back`,a=`${i}-front`,c=`url(#${o})`;let d;e[4]!==c?(d=l.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:c}),e[4]=c,e[5]=d):d=e[5];const f=`url(#${a})`;let u;e[6]!==f?(u=l.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:f}),e[6]=f,e[7]=u):u=e[7];let h,m,p;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),m=l.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:"#84CDFB"}),p=l.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:"#84CDFB"}),e[8]=h,e[9]=m,e[10]=p):(h=e[8],m=e[9],p=e[10]);let g;e[11]!==t?(g=t&&l.jsx(t,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=t,e[12]=g):g=e[12];let b;e[13]!==r?(b=r&&l.jsxs(l.Fragment,{children:[l.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),l.jsx($n,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=r,e[14]=b):b=e[14];let x,y;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=l.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),y=l.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=x,e[16]=y):(x=e[15],y=e[16]);let j;e[17]!==o?(j=l.jsxs("linearGradient",{id:o,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[x,y]}),e[17]=o,e[18]=j):j=e[18];let N,z;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx("stop",{stopColor:"#72B6FA"}),z=l.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=N,e[20]=z):(N=e[19],z=e[20]);let C;e[21]!==a?(C=l.jsxs("radialGradient",{id:a,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[N,z]}),e[21]=a,e[22]=C):C=e[22];let w;e[23]!==j||e[24]!==C?(w=l.jsxs("defs",{children:[j,C]}),e[23]=j,e[24]=C,e[25]=w):w=e[25];let M;return e[26]!==s||e[27]!==w||e[28]!==d||e[29]!==u||e[30]!==g||e[31]!==b?(M=l.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...s,children:[d,u,h,m,p,g,b,w]}),e[26]=s,e[27]=w,e[28]=d,e[29]=u,e[30]=g,e[31]=b,e[32]=M):M=e[32],M}function Ir(n,e,t){return e?"color":t?"font":/^--brand-(text|fw|leading|tracking)/i.test(n)?"type":/^--brand-space/i.test(n)?"space":/^--brand-radius/i.test(n)?"radius":/^--brand-shadow/i.test(n)?"shadow":/^--brand-(duration|delay|ease)/i.test(n)?"motion":"other"}const Lr=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,Or=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Rr=["svg","png","jpg","jpeg","webp","avif","gif"];function Ar(n){return n.split(".").pop()?.toLowerCase()??""}function _r(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ur(n){const e=n.trim();return Or.test(e)||Lr.test(e)}function Br(n){const e=n.trim(),t=e.match(/^#([0-9a-f]{3})$/i);return t?.[1]?`#${[...t[1]].map(s=>s+s).join("")}`:e}function xs(n){const e=[],t=new Map,s=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let r;for(;(r=s.exec(n))!==null;){const i=r[1],o=r[2].trim();t.has(i)||e.push(i),t.set(i,o)}return e.map(i=>{const o=t.get(i),a=Ur(o),c=/^--brand-font/i.test(i);return{name:i,value:o,isColor:a,isFont:c,kind:Ir(i,a,c)}})}const vn=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function Hr(n){return n.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??n}function qr(n){const e=[],t=new Map;for(const r of n){if(r.kind!=="color")continue;const i=Hr(r.name);t.has(i)||(e.push(i),t.set(i,[])),t.get(i).push(r)}return e.map(r=>{const i=t.get(r);return{family:r,tokens:i,isRamp:i.filter(o=>/-\d+$/.test(o.name)).length>=5}}).sort((r,i)=>{const o=vn.indexOf(r.family),a=vn.indexOf(i.family);return o===-1&&a===-1?0:o===-1?1:a===-1?-1:o-a})}function Kr(n,e,t){const s=new RegExp(`(${_r(e)}\\s*:\\s*)[^;]+(;)`);if(s.test(n))return n.replace(s,(o,a,c)=>`${a}${t}${c}`);const r=n.search(/:root\s*\{/);if(r!==-1){const o=n.indexOf("{",r)+1;return`${n.slice(0,o)}
|
|
5
|
+
`}const xn="home",br=400,yr=800;function vr(n){const e=n.savePath!==void 0,{org:t}=de(),s=Ze(),r=_n(xn),[i,o]=k.useState(!1),[a,c]=k.useState(!1),[d,f]=k.useState(!1),[u,h]=k.useState(!1),[m,p]=k.useState(!1),[g,b]=k.useState(!1),[x,y]=k.useState(null),[j,N]=k.useState(null),[z,C]=k.useState(0),[w]=k.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),M=i||g||m,I=()=>{n.savePath!==void 0&&(s.invalidateQueries({queryKey:Q.orgFsStat(t.id,xn,n.savePath)}),s.invalidateQueries({queryKey:Q.orgFsRecent(t.id)}))},F=L=>{w.iframe?.contentWindow?.postMessage(L,"*")},v=()=>{w.source=null,h(!1),j&&y(j),C(L=>L+1),I()};n.statMarker!==j&&(N(n.statMarker),n.statMarker!==null&&(x===null?y(n.statMarker):w.selfMarkers.has(n.statMarker)||n.statMarker!==x&&(M?h(!0):(w.source=null,y(n.statMarker)))));const P=async()=>{w.saveTimer=null;const L=w.source;if(L===null){b(!1);return}p(!0);try{const K=await r.mutateAsync({path:n.savePath,body:L});w.selfMarkers.add(On(K)),I()}catch(K){console.error("[deck-editor] save failed",K),ue.error("Couldn't save deck edits — reloading the preview."),G.current.reload()}finally{p(!1),b(!1)}},W=L=>{b(!0),w.saveTimer&&clearTimeout(w.saveTimer),w.saveTimer=setTimeout(()=>{G.current.flushSave()},L)},A=(L,K,S)=>{F({v:Re,type:"ack",opId:L,ok:K,error:S})},_=async L=>{if(!e){A(L.opId,!1,"read-only preview");return}try{if(w.source===null){const S=await fetch(n.readUrl,{credentials:"include"});if(!S.ok)throw new Error(`HTTP ${S.status}`);w.source=await S.text()}const K=xr(w.source);if(K===null||K!==L.witness.childCount)throw new ze(`slide count drifted (source ${K}, iframe ${L.witness.childCount})`,"stale-index");w.source=gr(w.source,L.op),A(L.opId,!0),W(L.op.kind==="replace"?yr:br)}catch(K){console.error("[deck-editor] op failed",L.op,K),A(L.opId,!1,K instanceof Error?K.message:String(K)),ue.error("That edit couldn't be saved — reloading the preview."),G.current.reload()}},H=L=>{if(!w.iframe||L.source!==w.iframe.contentWindow)return;const K=pr(L.data);if(K){if(K.type==="ready"){c(!0),G.current.editMode?F({v:Re,type:"set-edit-mode",enabled:!0}):G.current.railOpen&&F({v:Re,type:"set-rail",open:!0});return}K.type==="op"&&(w.queue=w.queue.then(()=>G.current.handleOp(K)).catch(()=>{}))}},G=k.useRef({onMessage:H,handleOp:_,flushSave:P,reload:v,editMode:i,railOpen:d});G.current={onMessage:H,handleOp:_,flushSave:P,reload:v,editMode:i,railOpen:d};const[q]=k.useState(()=>{let L=null;return K=>{if(K){w.iframe=K;const S=O=>G.current.onMessage(O);window.addEventListener("message",S),L=()=>window.removeEventListener("message",S)}else L?.(),L=null,w.iframe=null}}),ee=L=>{f(L),F({v:Re,type:"set-rail",open:L})},J=L=>{o(L),F({v:Re,type:"set-edit-mode",enabled:L}),L&&f(!0),!L&&u&&!g&&!m&&v()};return{iframeRef:q,deckDetected:a,writable:e,displayedMarker:x===null?null:`${x}.${z}`,editMode:i,setEditMode:J,railOpen:d,setRailOpen:ee,saving:m,agentUpdated:u,reload:v,postToIframe:F}}const wr=300;function jr({readUrl:n,marker:e,title:t,savePath:s,trailing:r}){const i=vr({readUrl:n,statMarker:e,savePath:s}),[o,a]=k.useState(null);if(i.displayedMarker===null)return null;const c=n.includes("?")?"&":"?",d=`${n}${c}v=${encodeURIComponent(i.displayedMarker)}`,f=o===d;return l.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[l.jsx(mr,{readUrl:n,editor:i,downloadName:t.split("/").pop()??t,trailing:r}),l.jsx("div",{className:"relative flex-1",children:l.jsx("iframe",{ref:i.iframeRef,src:d,onLoad:()=>a(d),sandbox:"allow-scripts",className:ce("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",f?"opacity-100":"opacity-0"),style:{transitionDuration:`${wr}ms`},title:t},d)})]})}const kr=[{mode:"private",label:"Org only",Icon:$s},{mode:"public",label:"Public",Icon:yt},{mode:"password",label:"Password",Icon:In}];function hs(n){const e=$.c(38),{volume:t,path:s,kind:r,shareMode:i,effectivePublic:o,url:a}=n,c=Sl(t),{data:d}=Rn(t,s),f=d?.shareMode??i,h=(d?.effectivePublic??o)&&f==="private",m=r==="dir",p=m?"folder":"file",[g,b]=k.useState(!1),[x,y]=k.useState(""),[j,N]=k.useState(!1);let z;e[0]!==s||e[1]!==c||e[2]!==p?(z=(J,L)=>{c.mutate({path:s,mode:J,password:L},{onSuccess:()=>{b(!1),y(""),ue.success(J==="private"?`This ${p} is now org-only`:J==="public"?`Anyone with the link can now view this ${p}`:`This ${p} is now password-protected`)},onError:Sr})},e[0]=s,e[1]=c,e[2]=p,e[3]=z):z=e[3];const C=z;let w;e[4]!==C?(w=J=>{if(J==="password"){b(!0);return}b(!1),C(J)},e[4]=C,e[5]=w):w=e[5];const M=w,I=g?"password":f;let F;e[6]!==a?(F=async()=>{a&&(await navigator.clipboard.writeText(a),N(!0),ue.success("Link copied to clipboard"),setTimeout(()=>N(!1),2e3))},e[6]=a,e[7]=F):F=e[7];const v=F;let P;e[8]!==j||e[9]!==v||e[10]!==a?(P=a?l.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[l.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:a}),l.jsx(Z,{variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:v,"aria-label":"Copy link",children:j?l.jsx(il,{size:12,className:"text-success"}):l.jsx(ol,{size:12})})]}):null,e[8]=j,e[9]=v,e[10]=a,e[11]=P):P=e[11];const W=P;if(h){let J;e[12]===Symbol.for("react.memo_cache_sentinel")?(J=l.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:l.jsx(yt,{size:16})}),e[12]=J):J=e[12];let L;e[13]===Symbol.for("react.memo_cache_sentinel")?(L=l.jsx("span",{className:"text-sm font-medium text-foreground",children:"Shared via a parent folder"}),e[13]=L):L=e[13];const K=m?"files in this folder":"this file";let S;e[14]!==K?(S=l.jsxs("div",{className:"flex items-start gap-3",children:[J,l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[L,l.jsxs("span",{className:"text-xs text-muted-foreground",children:["Anyone with the link can view"," ",K,". Manage sharing on the parent folder."]})]})]}),e[14]=K,e[15]=S):S=e[15];let O;return e[16]!==W||e[17]!==S?(O=l.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[S,W]}),e[16]=W,e[17]=S,e[18]=O):O=e[18],O}let A;e[19]!==I||e[20]!==M||e[21]!==c.isPending?(A=kr.map(J=>{const{mode:L,label:K,Icon:S}=J;return l.jsxs("button",{type:"button",disabled:c.isPending,onClick:()=>M(L),className:ce("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",I===L?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[l.jsx(S,{size:15}),K]},L)}),e[19]=I,e[20]=M,e[21]=c.isPending,e[22]=A):A=e[22];let _;e[23]!==A?(_=l.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-lg bg-muted p-1",children:A}),e[23]=A,e[24]=_):_=e[24];const H=I==="private"?`Only members of your organization can open ${m?"these files":"this link"}.`:I==="public"?m?"Anyone on the internet can view files in this folder via their link.":"Anyone on the internet with the link can view this file.":`Anyone with the link AND the password can view ${m?"files in this folder":"this file"}.`;let G;e[25]!==H?(G=l.jsx("p",{className:"text-xs text-muted-foreground",children:H}),e[25]=H,e[26]=G):G=e[26];let q;e[27]!==I||e[28]!==C||e[29]!==f||e[30]!==x||e[31]!==c.isPending?(q=I==="password"&&l.jsxs("form",{className:"flex items-center gap-2",onSubmit:J=>{J.preventDefault(),x&&C("password",x)},children:[l.jsx(Xe,{type:"password",value:x,onChange:J=>y(J.target.value),placeholder:f==="password"?"New password":"Password",autoComplete:"new-password",className:"h-8 text-xs"}),l.jsx(Z,{type:"submit",size:"sm",className:"shrink-0",disabled:!x||c.isPending,children:f==="password"?"Update":"Set"})]}),e[27]=I,e[28]=C,e[29]=f,e[30]=x,e[31]=c.isPending,e[32]=q):q=e[32];let ee;return e[33]!==W||e[34]!==_||e[35]!==G||e[36]!==q?(ee=l.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[_,G,q,W]}),e[33]=W,e[34]=_,e[35]=G,e[36]=q,e[37]=ee):ee=e[37],ee}function Sr(n){return ue.error(n instanceof Error?n.message:"Failed to update sharing")}function gn(n){const e=$.c(7),{volume:t,path:s,shareMode:r,effectivePublic:i,url:o}=n;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(sl,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Share",children:l.jsx(Pn,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Share"})]}),e[0]=a):a=e[0];let c;return e[1]!==i||e[2]!==s||e[3]!==r||e[4]!==o||e[5]!==t?(c=l.jsxs(ll,{children:[a,l.jsx(rl,{align:"end",className:"w-80 p-3",children:l.jsx(hs,{volume:t,path:s,kind:"file",shareMode:r,effectivePublic:i,url:o})})]}),e[1]=i,e[2]=s,e[3]=r,e[4]=o,e[5]=t,e[6]=c):c=e[6],c}function Nr(n){const e=$.c(11),{target:t,onOpenChange:s}=n,r=!!t,i=t?.kind==="dir"?"folder":"file";let o;e[0]!==i?(o=l.jsx(Tn,{children:l.jsxs(Ue,{children:["Share ",i]})}),e[0]=i,e[1]=o):o=e[1];let a;e[2]!==t?(a=t&&l.jsx(hs,{...t}),e[2]=t,e[3]=a):a=e[3];let c;e[4]!==o||e[5]!==a?(c=l.jsxs(Je,{className:"sm:max-w-md",children:[o,a]}),e[4]=o,e[5]=a,e[6]=c):c=e[6];let d;return e[7]!==s||e[8]!==r||e[9]!==c?(d=l.jsx(et,{open:r,onOpenChange:s,children:c}),e[7]=s,e[8]=r,e[9]=c,e[10]=d):d=e[10],d}function zt(n){const e=n?n.split("/").filter(Boolean):[],t=e[0]==="public",s=t?e[1]??null:null,r=t?s?`public-${s}`:null:e[0]??null,i=(t?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:r,dirPath:i,isPublic:t,publicSet:s,readOnly:t}}function Le(n,e){return n.isPublic&&n.publicSet?`public/${n.publicSet}/${e}`:n.volume?`${n.volume}/${e}`:e}const bn="public-";function Jt(n){return n.startsWith(bn)?n.slice(bn.length):null}function zr(n,e){const t=Jt(n);return t?`public/${t}/${e}`:`${n}/${e}`}function le(n){const e=n.lastIndexOf("/");return e===-1?n:n.slice(e+1)}function Cr(n){const e=$.c(11),{org:t,previewPath:s}=n;let r;e[0]!==s?(r=s.split("/").slice(0,-1).join("/"),e[0]=s,e[1]=r):r=e[1];const i=r;let o;e[2]!==t?(o={org:t},e[2]=t,e[3]=o):o=e[3];let a;e[4]!==i||e[5]!==s?(a={path:i,preview:s},e[4]=i,e[5]=s,e[6]=a):a=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(qt,{size:14}),e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==a?(d=l.jsx(Z,{variant:"ghost",size:"sm",asChild:!0,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:l.jsxs(Ps,{to:"/$org/files",params:o,search:a,children:[c,"See in library"]})}),e[8]=o,e[9]=a,e[10]=d):d=e[10],d}const $r=n=>/\.html?$/i.test(n);function yn(n){const e=$.c(6),{onClose:t}=n;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=l.jsx(En,{size:14}),e[0]=s):s=e[0];let r;e[1]!==t?(r=l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon",onClick:t,children:s})}),e[1]=t,e[2]=r):r=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(we,{side:"bottom",children:"Close"}),e[3]=i):i=e[3];let o;return e[4]!==r?(o=l.jsxs(ye,{children:[r,i]}),e[4]=r,e[5]=o):o=e[5],o}function ms(n){const e=$.c(37),{previewPath:t,onClose:s,showSeeInLibrary:r,variant:i}=n,o=r===void 0?!1:r;let a;e[0]!==t?(a=zt(t),e[0]=t,e[1]=a):a=e[1];const c=a,{volume:d,dirPath:f}=c,{data:u,isPending:h}=Rn(d,f),m=kl(d??""),p=le(f);let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g={strict:!1},e[2]=g):g=e[2];const{org:b}=Es(g),x=i==="dialog";let y;e[3]!==b||e[4]!==t||e[5]!==o?(y=o&&b?l.jsx(Cr,{org:b,previewPath:t}):null,e[3]=b,e[4]=t,e[5]=o,e[6]=y):y=e[6];const j=y,N=u&&u.kind==="file"?{key:t,filename:p,size:u.size,downloadUrl:m(u.path)}:null;if(N&&u&&$r(p)){const F=N.downloadUrl;let v;e[7]!==u?(v=On(u),e[7]=u,e[8]=v):v=e[8];const P=d??"",W=u.shareMode??"private",A=u.effectivePublic??!1,_=window.location.origin+N.downloadUrl;let H;e[9]!==f||e[10]!==_||e[11]!==P||e[12]!==W||e[13]!==A?(H=l.jsx(gn,{volume:P,path:f,shareMode:W,effectivePublic:A,url:_}),e[9]=f,e[10]=_,e[11]=P,e[12]=W,e[13]=A,e[14]=H):H=e[14];let G;e[15]!==x||e[16]!==s?(G=x?l.jsx("div",{className:"w-8 shrink-0"}):l.jsx(yn,{onClose:s}),e[15]=x,e[16]=s,e[17]=G):G=e[17];let q;return e[18]!==j||e[19]!==H||e[20]!==G?(q=l.jsxs(l.Fragment,{children:[H,j,G]}),e[18]=j,e[19]=H,e[20]=G,e[21]=q):q=e[21],l.jsxs(l.Fragment,{children:[x&&l.jsx(Ue,{className:"sr-only",children:p}),l.jsx(jr,{readUrl:F,marker:v,title:p,savePath:d==="home"?f:void 0,trailing:q},t)]})}const z=x?"h-11 py-1 pr-12 pl-2":"h-9 px-2";let C;e[22]!==z?(C=ce("flex shrink-0 items-center gap-1 border-b border-border/60",z),e[22]=z,e[23]=C):C=e[23];let w;e[24]!==u?.effectivePublic||e[25]!==u?.shareMode||e[26]!==N||e[27]!==f||e[28]!==d?(w=N&&l.jsxs(l.Fragment,{children:[l.jsx(gn,{volume:d??"",path:f,shareMode:u?.shareMode??"private",effectivePublic:u?.effectivePublic??!1,url:window.location.origin+N.downloadUrl}),l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon",asChild:!0,children:l.jsx("a",{href:N.downloadUrl,download:N.filename,children:l.jsx(Ve,{size:14})})})}),l.jsx(we,{side:"bottom",children:"Download"})]}),l.jsxs(ye,{children:[l.jsx(ve,{asChild:!0,children:l.jsx(Z,{variant:"ghost",size:"icon",onClick:()=>window.open(N.downloadUrl,"_blank","noopener"),children:l.jsx(Ln,{size:14})})}),l.jsx(we,{side:"bottom",children:"Open in new tab"})]})]}),e[24]=u?.effectivePublic,e[25]=u?.shareMode,e[26]=N,e[27]=f,e[28]=d,e[29]=w):w=e[29];let M;e[30]!==x||e[31]!==s?(M=!x&&l.jsx(yn,{onClose:s}),e[30]=x,e[31]=s,e[32]=M):M=e[32];let I;return e[33]!==N||e[34]!==p||e[35]!==h?(I=l.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:N?l.jsx(us,{file:N}):h?l.jsx(cs,{}):l.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[l.jsx(Se,{filename:p,className:"h-7.5 w-6"}),l.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})}),e[33]=N,e[34]=p,e[35]=h,e[36]=I):I=e[36],l.jsxs(l.Fragment,{children:[l.jsxs("div",{className:C,children:[l.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[l.jsx(Se,{filename:p,className:"h-4.5 w-3.5 shrink-0"}),x?l.jsx(Ue,{className:"truncate text-xs font-medium text-foreground",children:p}):l.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:p}),N&&l.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:as(N.size)})]}),j,w,M]}),I]})}function Pr(n){const e=$.c(4),{previewPath:t,onClose:s,showSeeInLibrary:r}=n,i=r===void 0?!1:r;let o;return e[0]!==s||e[1]!==t||e[2]!==i?(o=l.jsx("div",{className:"flex h-full w-full flex-col bg-background",children:l.jsx(ms,{previewPath:t,onClose:s,showSeeInLibrary:i,variant:"panel"})}),e[0]=s,e[1]=t,e[2]=i,e[3]=o):o=e[3],o}const Er=new Set(["output","upload","public","home"]),Dr=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function ps(n){return Er.has(n)||!Dr.test(n)?"home":n}function Tr(n){const e=$.c(10),{icon:t,className:s}=n,r=s===void 0?"size-4":s;if(t.kind==="component"){const{Component:o}=t;let a;return e[0]!==o||e[1]!==r?(a=l.jsx(o,{className:r}),e[0]=o,e[1]=r,e[2]=a):a=e[2],a}if(t.kind==="url"){const o=t.src;let a;e[3]!==r?(a=ce(r,"rounded-sm object-cover"),e[3]=r,e[4]=a):a=e[4];let c;return e[5]!==t.src||e[6]!==a?(c=l.jsx("img",{src:o,alt:"",className:a}),e[5]=t.src,e[6]=a,e[7]=c):c=e[7],c}let i;return e[8]!==r?(i=l.jsx(Zs,{className:r}),e[8]=r,e[9]=i):i=e[9],i}function Fr(n){const e=$.c(17),{title:t,icon:s,active:r,onClick:i,disabled:o,locked:a,className:c}=n,d=o===void 0?!1:o,f=a===void 0?!1:a,u=f||void 0,h=f&&"pointer-events-none",m=r?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let p;e[0]!==c||e[1]!==h||e[2]!==m?(p=ce("shrink-0 flex items-center gap-1.5 h-8 rounded-md px-2","[transition:background-color_180ms_ease,color_180ms_ease]","disabled:opacity-40 disabled:pointer-events-none",h,m,c),e[0]=c,e[1]=h,e[2]=m,e[3]=p):p=e[3];let g;e[4]!==s?(g=l.jsx("span",{className:"flex size-5 items-center justify-center shrink-0",children:l.jsx(Tr,{icon:s})}),e[4]=s,e[5]=g):g=e[5];let b;e[6]!==t?(b=l.jsx("span",{className:"max-md:hidden whitespace-nowrap text-sm font-medium leading-none",children:t}),e[6]=t,e[7]=b):b=e[7];let x;return e[8]!==r||e[9]!==d||e[10]!==i||e[11]!==u||e[12]!==p||e[13]!==g||e[14]!==b||e[15]!==t?(x=l.jsxs("button",{type:"button",onClick:i,disabled:d,"aria-pressed":r,"aria-disabled":u,"aria-label":t,className:p,children:[g,b]}),e[8]=r,e[9]=d,e[10]=i,e[11]=u,e[12]=p,e[13]=g,e[14]=b,e[15]=t,e[16]=x):x=e[16],x}function Mr(n){const e=$.c(33);let t,s,r;e[0]!==n?({glyph:t,readOnly:r,...s}=n,e[0]=n,e[1]=t,e[2]=s,e[3]=r):(t=e[1],s=e[2],r=e[3]);const i=k.useId(),o=`${i}-back`,a=`${i}-front`,c=`url(#${o})`;let d;e[4]!==c?(d=l.jsx("path",{d:"M2.53738 2.55C1.13602 2.55 0 3.68602 0 5.08738V11.535H31.931V7.65326C31.931 6.23616 30.7822 5.08738 29.3651 5.08738H14.7681L13.8775 5.02542C13.3886 4.99141 12.9197 4.81809 12.5261 4.52596L10.7726 3.22419C10.1828 2.78638 9.46784 2.55 8.73334 2.55H2.53738Z",fill:c}),e[4]=c,e[5]=d):d=e[5];const f=`url(#${a})`;let u;e[6]!==f?(u=l.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:f}),e[6]=f,e[7]=u):u=e[7];let h,m,p;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=l.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),m=l.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:"#84CDFB"}),p=l.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:"#84CDFB"}),e[8]=h,e[9]=m,e[10]=p):(h=e[8],m=e[9],p=e[10]);let g;e[11]!==t?(g=t&&l.jsx(t,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=t,e[12]=g):g=e[12];let b;e[13]!==r?(b=r&&l.jsxs(l.Fragment,{children:[l.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),l.jsx($n,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=r,e[14]=b):b=e[14];let x,y;e[15]===Symbol.for("react.memo_cache_sentinel")?(x=l.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),y=l.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=x,e[16]=y):(x=e[15],y=e[16]);let j;e[17]!==o?(j=l.jsxs("linearGradient",{id:o,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[x,y]}),e[17]=o,e[18]=j):j=e[18];let N,z;e[19]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx("stop",{stopColor:"#72B6FA"}),z=l.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=N,e[20]=z):(N=e[19],z=e[20]);let C;e[21]!==a?(C=l.jsxs("radialGradient",{id:a,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[N,z]}),e[21]=a,e[22]=C):C=e[22];let w;e[23]!==j||e[24]!==C?(w=l.jsxs("defs",{children:[j,C]}),e[23]=j,e[24]=C,e[25]=w):w=e[25];let M;return e[26]!==s||e[27]!==w||e[28]!==d||e[29]!==u||e[30]!==g||e[31]!==b?(M=l.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...s,children:[d,u,h,m,p,g,b,w]}),e[26]=s,e[27]=w,e[28]=d,e[29]=u,e[30]=g,e[31]=b,e[32]=M):M=e[32],M}function Ir(n,e,t){return e?"color":t?"font":/^--brand-(text|fw|leading|tracking)/i.test(n)?"type":/^--brand-space/i.test(n)?"space":/^--brand-radius/i.test(n)?"radius":/^--brand-shadow/i.test(n)?"shadow":/^--brand-(duration|delay|ease)/i.test(n)?"motion":"other"}const Lr=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,Or=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,Rr=["svg","png","jpg","jpeg","webp","avif","gif"];function Ar(n){return n.split(".").pop()?.toLowerCase()??""}function _r(n){return n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ur(n){const e=n.trim();return Or.test(e)||Lr.test(e)}function Br(n){const e=n.trim(),t=e.match(/^#([0-9a-f]{3})$/i);return t?.[1]?`#${[...t[1]].map(s=>s+s).join("")}`:e}function xs(n){const e=[],t=new Map,s=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let r;for(;(r=s.exec(n))!==null;){const i=r[1],o=r[2].trim();t.has(i)||e.push(i),t.set(i,o)}return e.map(i=>{const o=t.get(i),a=Ur(o),c=/^--brand-font/i.test(i);return{name:i,value:o,isColor:a,isFont:c,kind:Ir(i,a,c)}})}const vn=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function Hr(n){return n.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??n}function qr(n){const e=[],t=new Map;for(const r of n){if(r.kind!=="color")continue;const i=Hr(r.name);t.has(i)||(e.push(i),t.set(i,[])),t.get(i).push(r)}return e.map(r=>{const i=t.get(r);return{family:r,tokens:i,isRamp:i.filter(o=>/-\d+$/.test(o.name)).length>=5}}).sort((r,i)=>{const o=vn.indexOf(r.family),a=vn.indexOf(i.family);return o===-1&&a===-1?0:o===-1?1:a===-1?-1:o-a})}function Kr(n,e,t){const s=new RegExp(`(${_r(e)}\\s*:\\s*)[^;]+(;)`);if(s.test(n))return n.replace(s,(o,a,c)=>`${a}${t}${c}`);const r=n.search(/:root\s*\{/);if(r!==-1){const o=n.indexOf("{",r)+1;return`${n.slice(0,o)}
|
|
6
6
|
${e}: ${t};${n.slice(o)}`}const i=n.length>0&&!n.endsWith(`
|
|
7
7
|
`)?`
|
|
8
8
|
`:"";return`${n}${i}:root {
|