decocms 4.3.1 → 4.4.0
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-B4WPpzHx.js → AlertCircle-CM6D9elR.js} +1 -1
- package/dist/client/assets/{ArrowUpRight-n7J2ORua.js → ArrowUpRight-Kqa5fEjt.js} +1 -1
- package/dist/client/assets/{CheckCircle-DGqDWZvl.js → CheckCircle-8DKF8Yx5.js} +1 -1
- package/dist/client/assets/{ChevronDown-BzkFMF52.js → ChevronDown-DGuR7uUZ.js} +1 -1
- package/dist/client/assets/{ChevronRight-BhZIqa2P.js → ChevronRight-BswIt99A.js} +1 -1
- package/dist/client/assets/{ChevronUp-CtzC0jb0.js → ChevronUp-DSdWQUoR.js} +1 -1
- package/dist/client/assets/{DotsVertical-DskMPw9G.js → DotsVertical-DSosYpI1.js} +1 -1
- package/dist/client/assets/{Eye-Bkw15G1G.js → Eye-Dn1AISrx.js} +1 -1
- package/dist/client/assets/{FilterLines-CTiCp3St.js → FilterLines-CmWI-8pG.js} +1 -1
- package/dist/client/assets/{Globe01-CIvUZBh0.js → Globe01-CcXDI4W7.js} +1 -1
- package/dist/client/assets/{Globe04-By_qGXm-.js → Globe04-B9Btoycr.js} +1 -1
- package/dist/client/assets/{HardDrive-Da-ea-EW.js → HardDrive-BqXWgcmp.js} +1 -1
- package/dist/client/assets/{Key01-DugFMT5_.js → Key01-F6-x7vNY.js} +1 -1
- package/dist/client/assets/{LayoutLeft-DiQ60pSu.js → LayoutLeft-DpqtgcH3.js} +1 -1
- package/dist/client/assets/{LinkExternal01-BMDEbMBF.js → LinkExternal01-DOU6-C1w.js} +1 -1
- package/dist/client/assets/{Monitor01-BFD-ivVa.js → Monitor01-SkSQUhmT.js} +1 -1
- package/dist/client/assets/{Palette-DrmZY9bB.js → Palette-CnoObDqZ.js} +1 -1
- package/dist/client/assets/{Play-CiiKZLoa.js → Play-DzGcMRv3.js} +1 -1
- package/dist/client/assets/{Plus-hFZ_SbzL.js → Plus-DDlkoJBs.js} +1 -1
- package/dist/client/assets/{SearchLg-D4Hs4YLQ.js → SearchLg-CdT_y89m.js} +1 -1
- package/dist/client/assets/{SearchMd-RBoojwOu.js → SearchMd-UY2xUREv.js} +1 -1
- package/dist/client/assets/{Settings02-CuT9JazG.js → Settings02-QyYEyYyn.js} +1 -1
- package/dist/client/assets/{Shield01-D5Fc_Ylv.js → Shield01-V8b5EFFL.js} +1 -1
- package/dist/client/assets/{Star01-BMttIRxb.js → Star01-GVe4t6O1.js} +1 -1
- package/dist/client/assets/{Stars01-HANlppqn.js → Stars01-BIVPeWqS.js} +1 -1
- package/dist/client/assets/{Stars02-Call5O4Q.js → Stars02-DVZm69DV.js} +1 -1
- package/dist/client/assets/{Sun-B0JI-Irq.js → Sun-B2ndPBZP.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-BcqnyefE.js → SwitchHorizontal01-BL4xnvxO.js} +1 -1
- package/dist/client/assets/{Tool01-DFCFgRlB.js → Tool01-Ci5EQ1tM.js} +1 -1
- package/dist/client/assets/{Trash01-CGEeRKCz.js → Trash01-Cc007jho.js} +1 -1
- package/dist/client/assets/{Upload01-V0qkIpRk.js → Upload01-DB9meUjO.js} +1 -1
- package/dist/client/assets/{User01-Co_ACiCO.js → User01-Dz-_mMMJ.js} +1 -1
- package/dist/client/assets/{Users01-B-VpMOmx.js → Users01-Ctg0iuAM.js} +1 -1
- package/dist/client/assets/{Users03-DBa0-LbB.js → Users03-BazvU-rC.js} +1 -1
- package/dist/client/assets/{X-DlUiLOPC.js → X-_dGiBqSn.js} +1 -1
- package/dist/client/assets/{XCircle-BIxZfFEg.js → XCircle-CmN6DNsv.js} +1 -1
- package/dist/client/assets/{XClose-CEJj7vhn.js → XClose-BpreRuFP.js} +1 -1
- package/dist/client/assets/{Zap-USVmT42t.js → Zap-CWxLsQ6b.js} +1 -1
- package/dist/client/assets/{ZapSquare-qeizwUPq.js → ZapSquare-D5x1wm0t.js} +1 -1
- package/dist/client/assets/{ZoomOut-fkR_2hFy.js → ZoomOut-C0bVPfpC.js} +1 -1
- package/dist/client/assets/{access-gate-Dob1Rc1a.js → access-gate-CpQ3bOMg.js} +1 -1
- package/dist/client/assets/{add-section-modal-JApa7Z44.js → add-section-modal-D22Rp_ry.js} +1 -1
- package/dist/client/assets/agent-icon-BjxA8YR3.js +1 -0
- package/dist/client/assets/agents-list-C17XwfcN.js +1 -0
- package/dist/client/assets/{ai-providers-boT7K-bH.js → ai-providers-DNjwL7U0.js} +1 -1
- package/dist/client/assets/{alert-ez0UE1C8.js → alert-CTzYtGwN.js} +1 -1
- package/dist/client/assets/{alert-dialog-BZ8TrIVu.js → alert-dialog-DMWXmTGp.js} +2 -2
- package/dist/client/assets/app-editor-uAXMllzs.js +1 -0
- package/dist/client/assets/{auth-CNqDC7uO.js → auth-DraSXrC6.js} +1 -1
- package/dist/client/assets/{auth-catchall-BG9GP_5W.js → auth-catchall--3ZAEbBd.js} +1 -1
- package/dist/client/assets/{auth-entry-BAXdJDhh.js → auth-entry-DRJ-aW15.js} +1 -1
- package/dist/client/assets/{auth-split-layout-BQs9JvYd.js → auth-split-layout-B77S9w6i.js} +1 -1
- package/dist/client/assets/{authenticate-and-persist-oauth-Dy2XeMqO.js → authenticate-and-persist-oauth-HBteAcVm.js} +1 -1
- package/dist/client/assets/{automation-list-row-DO51bU3z.js → automation-list-row-NZNZGrlr.js} +1 -1
- package/dist/client/assets/automation-runs-BoQeZ1gh.js +1 -0
- package/dist/client/assets/automations-bd5MK3eJ.js +1 -0
- package/dist/client/assets/{avatar-Jhd31ejW.js → avatar-COMRxqae.js} +1 -1
- package/dist/client/assets/{badge-cxwmW2xd.js → badge-B1dPfLuK.js} +1 -1
- package/dist/client/assets/{block-document-AtpOGVAy.js → block-document-B6TgjyKW.js} +2 -2
- package/dist/client/assets/{brand-context-D-YGjyHl.js → brand-context-DGv078pp.js} +1 -1
- package/dist/client/assets/{buckets-ByuitLd7.js → buckets-LnyV7EWC.js} +1 -1
- package/dist/client/assets/bulk-category-panel-BP0Mtj3P.js +1 -0
- package/dist/client/assets/{capability-load-error-C00HLz2q.js → capability-load-error-WTr85D-I.js} +1 -1
- package/dist/client/assets/{card-D3bKVB8y.js → card-Bys-wDTW.js} +1 -1
- package/dist/client/assets/category-editor-Cm1sAVk_.js +1 -0
- package/dist/client/assets/{chat-context-B5uEh4ay.js → chat-context-huSCeR82.js} +4 -4
- package/dist/client/assets/{checkbox-PMXW46HN.js → checkbox-BIDlFz_0.js} +1 -1
- package/dist/client/assets/{cli-auth-success-Bo07c76Z.js → cli-auth-success-DJ5lbMQC.js} +1 -1
- package/dist/client/assets/collection-detail-UTQtN0-J.js +1 -0
- package/dist/client/assets/{collection-display-button-Cu6MzTbi.js → collection-display-button-Bnm_JutP.js} +1 -1
- package/dist/client/assets/{collection-search-CN9TCItb.js → collection-search-CKMDHnku.js} +1 -1
- package/dist/client/assets/{collection-tabs-D5o6VjHd.js → collection-tabs-CWrBkWhe.js} +1 -1
- package/dist/client/assets/{command-D-t5bmXW.js → command-DrgMAh0a.js} +1 -1
- package/dist/client/assets/commerce-onboarding-B8pBrcvE.js +1 -0
- package/dist/client/assets/{connect-desktop-dialog-DchtPbuP.js → connect-desktop-dialog-CvuFk-NY.js} +1 -1
- package/dist/client/assets/{connection-card-BswtsnGE.js → connection-card-DIh-SIqT.js} +1 -1
- package/dist/client/assets/connection-detail-CWog7XFK.js +1 -0
- package/dist/client/assets/{connection-form-helpers-JfkHcTGO.js → connection-form-helpers-DV-bwjt7.js} +1 -1
- package/dist/client/assets/connections-BkvcH3F-.js +1 -0
- package/dist/client/assets/{context-menu-Dln5uXsN.js → context-menu-BPHfkJEs.js} +1 -1
- package/dist/client/assets/{decopilot-CfDwLIyX.js → decopilot-BxOK0Z8W.js} +1 -1
- package/dist/client/assets/{decopilot-sse-pool-DoJkdYBA.js → decopilot-sse-pool-Chmwc1_x.js} +1 -1
- package/dist/client/assets/{dialog-B2cGEuOv.js → dialog-o7scRbG9.js} +1 -1
- package/dist/client/assets/{domain-settings-DNJMc9fW.js → domain-settings-DIv14WFm.js} +1 -1
- package/dist/client/assets/{drawer-Tv6bcT7w.js → drawer-B-Vy7tMY.js} +1 -1
- package/dist/client/assets/{dropdown-menu-Dw-pnYXI.js → dropdown-menu-D-VNET4I.js} +1 -1
- package/dist/client/assets/{empty-state-D7nJB9UW.js → empty-state-1p_UpPHY.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CxK1dunT.js → extract-connection-data-BVX9Eneo.js} +1 -1
- package/dist/client/assets/file-explorer-Bh9kp1sm.js +2 -0
- package/dist/client/assets/{file-type-icon-W_AZRfzL.js → file-type-icon-LHBbJJTG.js} +1 -1
- package/dist/client/assets/{files-B0cAPQGO.js → files-Bw3w16xX.js} +1 -1
- package/dist/client/assets/{form-DI8q6OtF.js → form-DX8cQ4SA.js} +1 -1
- package/dist/client/assets/{general-bpWfsinD.js → general-DzJAxzRR.js} +1 -1
- package/dist/client/assets/{github-repo-picker-M1TBbLot.js → github-repo-picker-ZmfhFTO6.js} +1 -1
- package/dist/client/assets/{hooks-DgSrpwcx.js → hooks-BUt6AoQh.js} +6 -6
- package/dist/client/assets/{import-from-deco-dialog-IZXHkaJ2.js → import-from-deco-dialog-DZhtwoRn.js} +1 -1
- package/dist/client/assets/{index-CshxsRNd.js → index-BBTFoidO.js} +1 -1
- package/dist/client/assets/{index-CABmrUBB.js → index-BPD9Iyv5.js} +1 -1
- package/dist/client/assets/index-BcXb7VeZ.css +1 -0
- package/dist/client/assets/index-CAV1BNai.js +173 -0
- package/dist/client/assets/{index-BFW_K0gJ.js → index-CL3KBg-D.js} +1 -1
- package/dist/client/assets/{index-5MyNR89x.js → index-CXy6rN6i.js} +3 -3
- package/dist/client/assets/{index-Cxp4ZtBG.js → index-CjKis1yy.js} +1 -1
- package/dist/client/assets/{index-BD4HYlEX.js → index-Cod7u1PQ.js} +1 -1
- package/dist/client/assets/{index-BWMRVcd2.js → index-CpgVJVWB.js} +27 -27
- package/dist/client/assets/{index-BgPTCVWL.js → index-DCwPnlYH.js} +1 -1
- package/dist/client/assets/index-DKs6HTlj.js +1 -0
- package/dist/client/assets/{index-BQIJkmZH.js → index-Db3cPjnW.js} +2 -2
- package/dist/client/assets/index-DvDkdoxH.js +1 -0
- package/dist/client/assets/{index-CO_UO0dQ.js → index-NJ9aYDVC.js} +1 -1
- package/dist/client/assets/{index-5XIJtJJp.js → index-VkScKLdP.js} +1 -1
- package/dist/client/assets/{index-redirect-Clw5irxr.js → index-redirect-B6MtHNAq.js} +1 -1
- package/dist/client/assets/{input-D9aeO8wK.js → input-BlhkemhH.js} +1 -1
- package/dist/client/assets/{integration-icon-CMGCCNyJ.js → integration-icon-BSHD1Ijr.js} +1 -1
- package/dist/client/assets/{label-Bj7qsNrz.js → label-CL8Vh65B.js} +1 -1
- package/dist/client/assets/{login-BF7DsD8r.js → login-B4UwjrwL.js} +1 -1
- package/dist/client/assets/{mcp-oauth-DEfvhjPc.js → mcp-oauth-CXj7zg3h.js} +1 -1
- package/dist/client/assets/{members-5GqN16xx.js → members-CZJJNFCT.js} +1 -1
- package/dist/client/assets/{monaco-editor-B3KzPr3D.js → monaco-editor-DBScTPL_.js} +2 -2
- package/dist/client/assets/{monitoring-stats-row-B6byJzyf.js → monitoring-stats-row-DS-oLjL7.js} +1 -1
- package/dist/client/assets/{oauth-callback-xYG2bhs8.js → oauth-callback-DmaJ1bda.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-DGwgTWgk.js → oauth-callback-ai-provider-BQMnSXh3.js} +1 -1
- package/dist/client/assets/{onboarding-CnEfKMnB.js → onboarding-Byb6DxyK.js} +1 -1
- package/dist/client/assets/{org-install-DfRej3K2.js → org-install-DE37K5KN.js} +1 -1
- package/dist/client/assets/{org-layout-Bc9Glt8J.js → org-layout-des0Y5a9.js} +1 -1
- package/dist/client/assets/{organization-choice-DGTNMrAe.js → organization-choice-COkZ5W_o.js} +1 -1
- package/dist/client/assets/{page-seo-form-CcZ53r1B.js → page-seo-form-BcrUATEU.js} +1 -1
- package/dist/client/assets/page-seo-sheet-D1Z6hzyV.js +1 -0
- package/dist/client/assets/popover-SD8gnUXm.js +1 -0
- package/dist/client/assets/post-editor-BDlfII0z.js +1 -0
- package/dist/client/assets/{primitives-CAIbeS4G.js → primitives-CVsZF3ex.js} +1 -1
- package/dist/client/assets/{profile-BF9HkmK_.js → profile-DBUkydtR.js} +1 -1
- package/dist/client/assets/project-app-view-Bk8oTYIF.js +1 -0
- package/dist/client/assets/record-editor-DL8IQ3xy.js +1 -0
- package/dist/client/assets/registry-Bd0JPSYO.js +2 -0
- package/dist/client/assets/{registry-layout-CRS0SBoX.js → registry-layout-BL9jjFNp.js} +1 -1
- package/dist/client/assets/{require-capability-BclGG3Lq.js → require-capability-CLQ4GBGj.js} +1 -1
- package/dist/client/assets/{required-auth-layout-CZqB7vUr.js → required-auth-layout-BzYoSj-D.js} +1 -1
- package/dist/client/assets/{reset-password-CKTIPX2L.js → reset-password-C3Zmx-Z-.js} +1 -1
- package/dist/client/assets/roles-RwbAlbhC.js +1 -0
- package/dist/client/assets/{scroll-area-DLqMfi_N.js → scroll-area-DgIklajW.js} +54 -54
- package/dist/client/assets/{search-input-BXzntIcj.js → search-input-BwHA7yOt.js} +1 -1
- package/dist/client/assets/{secrets-D5X-Z3Mv.js → secrets-Cu_Gp7gT.js} +1 -1
- package/dist/client/assets/{sections-editor-jc7NLaYJ.js → sections-editor-CaNl1tLu.js} +2 -2
- package/dist/client/assets/select-DM3pFFAV.js +1 -0
- package/dist/client/assets/{select-model-BLeb_gwV.js → select-model-C1odlJ1X.js} +1 -1
- package/dist/client/assets/seo-editor-C28ZayGa.js +1 -0
- package/dist/client/assets/settings-layout-C_nc5y3_.js +1 -0
- package/dist/client/assets/{settings-section-Br7JxQz6.js → settings-section-6b9w_VoZ.js} +1 -1
- package/dist/client/assets/{sheet-M6dgbK60.js → sheet-BJF6qruz.js} +1 -1
- package/dist/client/assets/shell-controls-C9tE75mS.js +1 -0
- package/dist/client/assets/{shell-layout-CnTaR8UN.js → shell-layout-gi6XYvgE.js} +1 -1
- package/dist/client/assets/shell-route-loading-Agan4lHM.js +1 -0
- package/dist/client/assets/{sidebar-oYab2QX7.js → sidebar-BD77ZDQ1.js} +1 -1
- package/dist/client/assets/{skeleton-DoPnd-4p.js → skeleton-CuVDGSZE.js} +1 -1
- package/dist/client/assets/{sortable.esm-D8GIYMew.js → sortable.esm-DpWg8tde.js} +2 -2
- package/dist/client/assets/{sso-C9l3tEYi.js → sso-B9XBpXX9.js} +1 -1
- package/dist/client/assets/{store-DXXRJ_VG.js → store-Il1Qjdpz.js} +1 -1
- package/dist/client/assets/store-registry-BN4Ygwm2.js +2 -0
- package/dist/client/assets/{studio-tools-4NjxmaVZ.js → studio-tools-C-Eel15b.js} +1 -1
- package/dist/client/assets/{switch-DLNzAYS1.js → switch-DWXEjjcR.js} +1 -1
- package/dist/client/assets/{tab-id-BptcWVWa.js → tab-id-AX1D_RMI.js} +1 -1
- package/dist/client/assets/{table-B06cGuvx.js → table-sXVKQ5vt.js} +1 -1
- package/dist/client/assets/{tabs-8VxbUDVb.js → tabs-BeXAqCdo.js} +1 -1
- package/dist/client/assets/{task-status-Cm29b2AK.js → task-status-CaQuE65s.js} +1 -1
- package/dist/client/assets/{textarea-Bwn2Wdf8.js → textarea-C30KYfio.js} +1 -1
- package/dist/client/assets/{toggle-group-CndOAl-N.js → toggle-group-B6oTaI1f.js} +1 -1
- package/dist/client/assets/toolbar-DuZrnshW.js +1 -0
- package/dist/client/assets/toolbar-icon-button-CG8gWMNZ.js +1 -0
- package/dist/client/assets/{tools-list-DL7ip2gg.js → tools-list-BSe55AC9.js} +1 -1
- package/dist/client/assets/tooltip-BRQCINXK.js +1 -0
- package/dist/client/assets/{types-U3TqUYrY.js → types-ywta9rZ4.js} +4 -4
- package/dist/client/assets/{use-ai-providers-D4m0Vu5Q.js → use-ai-providers-CpUPA2Pj.js} +1 -1
- package/dist/client/assets/{use-automations-ChKoVegP.js → use-automations-BSn8_z4p.js} +1 -1
- package/dist/client/assets/{use-capability-CQPMPR-5.js → use-capability-AkUZCu97.js} +1 -1
- package/dist/client/assets/{use-clock-tick-CJO5qoT7.js → use-clock-tick-7J301cSN.js} +1 -1
- package/dist/client/assets/{use-collections-DAKL2YGx.js → use-collections-BhzLncHB.js} +1 -1
- package/dist/client/assets/{use-connection-BvgL1-Da.js → use-connection-CSQdDXlG.js} +1 -1
- package/dist/client/assets/{use-copy-WaepYGtr.js → use-copy-3aLRhzTZ.js} +1 -1
- package/dist/client/assets/use-create-virtual-mcp-ClyuqzV0.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-mA5Fw-09.js → use-debounced-autosave-DwyO4Yri.js} +1 -1
- package/dist/client/assets/{use-debounced-value-cQ7ZQKtl.js → use-debounced-value-BGsbVLHA.js} +1 -1
- package/dist/client/assets/{use-decopilot-events-BDkaUhLT.js → use-decopilot-events-B8-U5_6h.js} +1 -1
- package/dist/client/assets/{use-delete-connection-B9XKLaZf.js → use-delete-connection-yP5RphYi.js} +1 -1
- package/dist/client/assets/{use-file-configs-Dfeoim5G.js → use-file-configs-XF2AvMPs.js} +1 -1
- package/dist/client/assets/{use-infinite-scroll-4tV6tFjB.js → use-infinite-scroll-CkXtceVR.js} +1 -1
- package/dist/client/assets/{use-join-requests-CdAJlpjO.js → use-join-requests-mfteqXVe.js} +1 -1
- package/dist/client/assets/{use-mcp-client-CherrXvD.js → use-mcp-client-CRWIqSWI.js} +1 -1
- package/dist/client/assets/{use-mcp-prompts-BnOdccbh.js → use-mcp-prompts-BV9cBymv.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-w6KwNDra.js → use-mcp-tools-Dgj65Z69.js} +1 -1
- package/dist/client/assets/{use-members-ge80zFlj.js → use-members-BZOJ4ncQ.js} +1 -1
- package/dist/client/assets/{use-mobile-lIIxFH5C.js → use-mobile-DgvzRDzB.js} +1 -1
- package/dist/client/assets/{use-navigate-to-agent-BtVHPn7N.js → use-navigate-to-agent-DTqeD3lq.js} +1 -1
- package/dist/client/assets/{use-org-auth-client-Ctxe3HXF.js → use-org-auth-client-Dx974y4u.js} +1 -1
- package/dist/client/assets/{use-org-fs-D-40uH2W.js → use-org-fs-DI1Q1Ycz.js} +1 -1
- package/dist/client/assets/{use-org-sso-BxzKK5rO.js → use-org-sso-kfQLtl8D.js} +1 -1
- package/dist/client/assets/{use-organization-roles-DmQYT9Pn.js → use-organization-roles-B2GmBYYT.js} +1 -1
- package/dist/client/assets/{use-organization-settings-CZfEdu0P.js → use-organization-settings-ClL7mSbK.js} +1 -1
- package/dist/client/assets/{use-registry-connections-C_VqH6te.js → use-registry-connections-DzyhBLO8.js} +1 -1
- package/dist/client/assets/{use-secrets-Dn4coT0R.js → use-secrets-BX0N_3N-.js} +1 -1
- package/dist/client/assets/{use-status-sounds-CWHPQWBO.js → use-status-sounds-BsVH7G2F.js} +1 -1
- package/dist/client/assets/{use-view-mode--ERDyrf1.js → use-view-mode-D4v-Vh_n.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-C5pbd140.js → use-virtual-mcp-7AWl-thI.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-DbI8AV-k.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DT-JxV4F.js +1 -0
- package/dist/client/assets/{useSuspenseQueries-CRdXyKYB.js → useSuspenseQueries-D4Gfj0Tf.js} +1 -1
- package/dist/client/assets/variant-calendar-C9mxKuI5.js +1 -0
- package/dist/client/assets/{view-mode-toggle-BP4LoXpd.js → view-mode-toggle-Dcs21C2T.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/server/cli.js +2 -2
- package/dist/server/server.js +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ChevronLeft-B-p3uhTp.js +0 -1
- package/dist/client/assets/agent-icon-CCm6veEh.js +0 -1
- package/dist/client/assets/agents-list-CsmaOmeB.js +0 -1
- package/dist/client/assets/app-editor-D5hlOetk.js +0 -1
- package/dist/client/assets/automation-runs-CXnAhWiY.js +0 -1
- package/dist/client/assets/automations-akz_oClO.js +0 -1
- package/dist/client/assets/bulk-category-panel-Bu7vkdyV.js +0 -1
- package/dist/client/assets/category-editor-AxaHD2PX.js +0 -1
- package/dist/client/assets/collection-detail-DEEAX0DE.js +0 -1
- package/dist/client/assets/commerce-onboarding-CljjzqU2.js +0 -1
- package/dist/client/assets/connection-detail-Dt-8hGUD.js +0 -1
- package/dist/client/assets/connections-D2zRczhs.js +0 -1
- package/dist/client/assets/file-explorer-dyfhIxpy.js +0 -2
- package/dist/client/assets/index-BqKQnks_.css +0 -1
- package/dist/client/assets/index-BvxT8QID.js +0 -1
- package/dist/client/assets/index-CU_03aq0.js +0 -1
- package/dist/client/assets/index-Db0TT11B.js +0 -169
- package/dist/client/assets/page-seo-sheet-D8FULk67.js +0 -1
- package/dist/client/assets/popover-DowpnV25.js +0 -1
- package/dist/client/assets/post-editor-SVRg54TN.js +0 -1
- package/dist/client/assets/preview-dialog-CwTtT7qa.js +0 -5
- package/dist/client/assets/project-app-view-BQ4gYl-m.js +0 -1
- package/dist/client/assets/record-editor-BNOUgLnP.js +0 -1
- package/dist/client/assets/registry-Bo4vnNv4.js +0 -2
- package/dist/client/assets/roles-DTMTF-Ml.js +0 -1
- package/dist/client/assets/select-CZgnwyj0.js +0 -1
- package/dist/client/assets/seo-editor-BCj_Owpk.js +0 -1
- package/dist/client/assets/settings-layout-QQo5fqWD.js +0 -1
- package/dist/client/assets/shell-controls-CqC5zeBM.js +0 -1
- package/dist/client/assets/shell-route-loading-DFu6UBUI.js +0 -1
- package/dist/client/assets/store-registry-DuMrJjAm.js +0 -2
- package/dist/client/assets/toolbar-ClL4Dhs_.js +0 -1
- package/dist/client/assets/tooltip-DvT2WKW9.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-BSTwTG_J.js +0 -1
- package/dist/client/assets/useInfiniteQuery-_sl5B1oR.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-_eC9d3ii.js +0 -1
- package/dist/client/assets/variant-calendar-Dqcgu1C1.js +0 -1
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
import{c as $,r as B,j as t,k as Y,B as R,K as L,l as Z,D as Ne,m as st,t as W,b as lt,u as nt,E as Me,ae as Pt}from"./index-5MyNR89x.js";import{i as Ft}from"./ChevronRight-BhZIqa2P.js";import{s as it}from"./Eye-Bkw15G1G.js";import{n as Ot,i as rt}from"./Globe01-CIvUZBh0.js";import{a as at,e as Et,f as At,i as Mt}from"./ZoomOut-fkR_2hFy.js";import{a as je}from"./Palette-DrmZY9bB.js";import{s as Ut}from"./Plus-hFZ_SbzL.js";import{i as Bt}from"./SearchLg-D4Hs4YLQ.js";import{t as Lt}from"./Stars01-HANlppqn.js";import{i as ye}from"./Upload01-V0qkIpRk.js";import{s as Rt}from"./XClose-CEJj7vhn.js";import{i as Le}from"./Zap-USVmT42t.js";import{u as ot}from"./use-mobile-lIIxFH5C.js";import{f as _t,a as qt,b as It,c as Kt,d as Vt,e as Ht,A as Gt,g as Qt}from"./alert-dialog-BZ8TrIVu.js";import{d as Re,e as _e,a as qe,f as ct,c as Wt,b as Yt,D as Xt}from"./dialog-B2cGEuOv.js";import{I as we}from"./input-D9aeO8wK.js";import{S as V}from"./skeleton-DoPnd-4p.js";import{F as ne,d as dt,M as ft}from"./file-type-icon-W_AZRfzL.js";import{a as Zt}from"./toolbar-ClL4Dhs_.js";import{p as Ie,l as A,c as Jt,L as es,R as ts,j as ss,h as ls,i as Ye,k as ns,S as is,m as le,n as ut,o as rs}from"./preview-dialog-CwTtT7qa.js";import{u as as}from"./use-debounced-value-cQ7ZQKtl.js";import{a as de,i as os,u as Be,j as Ke,k as cs,b as ds,l as mt,m as fs}from"./use-org-fs-D-40uH2W.js";import{i as Se}from"./DotsVertical-DskMPw9G.js";import{i as us}from"./Key01-DugFMT5_.js";import{s as $e}from"./Trash01-CGEeRKCz.js";import{a as Ce,c as te,b as De,D as Te}from"./dropdown-menu-Dw-pnYXI.js";import{T as ms}from"./textarea-Bwn2Wdf8.js";import{t as hs}from"./ChevronDown-BzkFMF52.js";import{n as ps}from"./ChevronUp-CtzC0jb0.js";import{i as ke}from"./X-DlUiLOPC.js";import"./tab-id-BptcWVWa.js";import"./ChevronLeft-B-p3uhTp.js";import"./tooltip-DvT2WKW9.js";import"./LinkExternal01-BMDEbMBF.js";import"./index-BgPTCVWL.js";import"./LayoutLeft-DiQ60pSu.js";import"./popover-DowpnV25.js";const xs=new Set(["output","upload","public","home"]),gs=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function ht(s){return xs.has(s)||!gs.test(s)?"home":s}function bs(s){const e=$.c(33);let l,i,n;e[0]!==s?({glyph:l,readOnly:n,...i}=s,e[0]=s,e[1]=l,e[2]=i,e[3]=n):(l=e[1],i=e[2],n=e[3]);const r=B.useId(),a=`${r}-back`,c=`${r}-front`,o=`url(#${a})`;let d;e[4]!==o?(d=t.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:o}),e[4]=o,e[5]=d):d=e[5];const u=`url(#${c})`;let f;e[6]!==u?(f=t.jsx("rect",{y:"8.72",width:"32",height:"21",rx:"2.566",fill:u}),e[6]=u,e[7]=f):f=e[7];let m,h,x;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx("rect",{x:"0.3",y:"8.86",width:"31.4",height:"0.55",rx:"0.275",fill:"#FFFFFF",opacity:"0.25"}),h=t.jsx("rect",{y:"25.81",width:"32",height:"0.552",fill:"#84CDFB"}),x=t.jsx("rect",{y:"27.05",width:"32",height:"0.552",fill:"#84CDFB"}),e[8]=m,e[9]=h,e[10]=x):(m=e[8],h=e[9],x=e[10]);let b;e[11]!==l?(b=l&&t.jsx(l,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=l,e[12]=b):b=e[12];let j;e[13]!==n?(j=n&&t.jsxs(t.Fragment,{children:[t.jsx("circle",{cx:"25.5",cy:"25.5",r:"6.2",strokeWidth:"1",className:"fill-background stroke-border"}),t.jsx(it,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=n,e[14]=j):j=e[14];let v,g;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),g=t.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=v,e[16]=g):(v=e[15],g=e[16]);let w;e[17]!==a?(w=t.jsxs("linearGradient",{id:a,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[v,g]}),e[17]=a,e[18]=w):w=e[18];let C,k;e[19]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("stop",{stopColor:"#72B6FA"}),k=t.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=C,e[20]=k):(C=e[19],k=e[20]);let S;e[21]!==c?(S=t.jsxs("radialGradient",{id:c,cx:"0",cy:"0",r:"10",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(1.6 0 0 2.1538 16 19.22)",children:[C,k]}),e[21]=c,e[22]=S):S=e[22];let D;e[23]!==w||e[24]!==S?(D=t.jsxs("defs",{children:[w,S]}),e[23]=w,e[24]=S,e[25]=D):D=e[25];let T;return e[26]!==i||e[27]!==D||e[28]!==d||e[29]!==f||e[30]!==b||e[31]!==j?(T=t.jsxs("svg",{viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",...i,children:[d,f,m,h,x,b,j,D]}),e[26]=i,e[27]=D,e[28]=d,e[29]=f,e[30]=b,e[31]=j,e[32]=T):T=e[32],T}function vs(s,e,l){return e?"color":l?"font":/^--brand-(text|fw|leading|tracking)/i.test(s)?"type":/^--brand-space/i.test(s)?"space":/^--brand-radius/i.test(s)?"radius":/^--brand-shadow/i.test(s)?"shadow":/^--brand-(duration|delay|ease)/i.test(s)?"motion":"other"}const js=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,ys=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,ws=["svg","png","jpg","jpeg","webp","avif","gif"];function ks(s){return s.split(".").pop()?.toLowerCase()??""}function Ns(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ss(s){const e=s.trim();return ys.test(e)||js.test(e)}function $s(s){const e=s.trim(),l=e.match(/^#([0-9a-f]{3})$/i);return l?.[1]?`#${[...l[1]].map(i=>i+i).join("")}`:e}function pt(s){const e=[],l=new Map,i=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let n;for(;(n=i.exec(s))!==null;){const r=n[1],a=n[2].trim();l.has(r)||e.push(r),l.set(r,a)}return e.map(r=>{const a=l.get(r),c=Ss(a),o=/^--brand-font/i.test(r);return{name:r,value:a,isColor:c,isFont:o,kind:vs(r,c,o)}})}const Xe=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function Cs(s){return s.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??s}function Ds(s){const e=[],l=new Map;for(const n of s){if(n.kind!=="color")continue;const r=Cs(n.name);l.has(r)||(e.push(r),l.set(r,[])),l.get(r).push(n)}return e.map(n=>{const r=l.get(n);return{family:n,tokens:r,isRamp:r.filter(a=>/-\d+$/.test(a.name)).length>=5}}).sort((n,r)=>{const a=Xe.indexOf(n.family),c=Xe.indexOf(r.family);return a===-1&&c===-1?0:a===-1?1:c===-1?-1:a-c})}function Ts(s,e,l){const i=new RegExp(`(${Ns(e)}\\s*:\\s*)[^;]+(;)`);if(i.test(s))return s.replace(i,(a,c,o)=>`${c}${l}${o}`);const n=s.search(/:root\s*\{/);if(n!==-1){const a=s.indexOf("{",n)+1;return`${s.slice(0,a)}
|
|
2
|
-
${e}: ${l};${s.slice(a)}`}const r=s.length>0&&!s.endsWith(`
|
|
3
|
-
`)?`
|
|
4
|
-
`:"";return`${s}${r}:root {
|
|
5
|
-
${e}: ${l};
|
|
6
|
-
}
|
|
7
|
-
`}function zs(s){const e=s.filter(i=>i.kind==="file"),l=e.find(i=>/(^|\/)logo\.(svg|png|jpe?g|webp|avif|gif)$/i.test(i.path));return l?l.path:e.find(i=>ws.includes(ks(i.path)))?.path??null}function Ps(s){const e={};for(const l of s.split(`
|
|
8
|
-
`)){const i=l.match(/^([A-Za-z][\w-]*):\s*(.*)$/);i?.[1]&&i[2]!==void 0&&(e[i[1].toLowerCase()]=i[2].trim())}return e}function Ze(s){for(const e of s.split(/\n\s*\n/)){const l=e.trim();if(!(!l||l.startsWith("#")))return l.replace(/\n/g," ")}return null}function xt(s){const e=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:Ze(s),body:s};const l=Ps(e[1]),i=s.slice(e[0].length);return{name:l.name||null,description:l.description||Ze(i),body:i}}const Fs=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Os=new Set(["csv","tsv"]),Es=new Set(["mp4","webm","mov","m4v"]),As=new Set(["txt","md","markdown","json","log","yaml","yml","xml","html","htm"]),Ms=256*1024;function fe(s){const e=new Date(s);if(Number.isNaN(e.getTime()))return"";const l=Date.now()-e.getTime(),i=Math.floor(l/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const n=Math.floor(i/60);if(n<24)return`${n}h ago`;const r=Math.floor(n/24);return r<30?`${r}d ago`:e.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Us(s){return s.split(".").pop()?.toLowerCase()??""}function Ve(s){const e=$.c(3),{onShare:l}=s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Et,{size:14}),e[0]=i):i=e[0];let n;return e[1]!==l?(n=t.jsxs(te,{onClick:l,children:[i,"Share"]}),e[1]=l,e[2]=n):n=e[2],n}function Bs(s){const e=$.c(9),{state:l}=s,i=l==="password"?"Password-protected — link + password to view":l==="inherited"?"Shared via a parent folder":"Public — anyone with the link can view",n=l==="password"?us:rt,r=l==="inherited"?"text-muted-foreground/60":"text-primary";let a;e[0]!==r?(a=Z(r),e[0]=r,e[1]=a):a=e[1];let c;e[2]!==n||e[3]!==i||e[4]!==a?(c=t.jsx(n,{size:12,className:a,"aria-label":i}),e[2]=n,e[3]=i,e[4]=a,e[5]=c):c=e[5];let o;return e[6]!==i||e[7]!==c?(o=t.jsx("span",{title:i,className:"mt-0.5 flex shrink-0 items-center",children:c}),e[6]=i,e[7]=c,e[8]=o):o=e[8],o}function gt(s){const e=$.c(18),{downloadUrl:l,filename:i,onShare:n,onDelete:r}=s,a=`Actions for ${i}`;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(Se,{size:14}),e[0]=c):c=e[0];let o;e[1]!==a?(o=t.jsx(Ce,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Rs,"aria-label":a,children:c})}),e[1]=a,e[2]=o):o=e[2];let d;e[3]!==n?(d=n&&t.jsx(Ve,{onShare:n}),e[3]=n,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ot,{size:14}),e[5]=u):u=e[5];let f;e[6]!==l||e[7]!==i?(f=t.jsx(te,{asChild:!0,children:t.jsxs("a",{href:l,download:i,children:[u,"Download"]})}),e[6]=l,e[7]=i,e[8]=f):f=e[8];let m;e[9]!==r?(m=r&&t.jsxs(te,{variant:"destructive",onClick:r,children:[t.jsx($e,{size:14}),"Delete"]}),e[9]=r,e[10]=m):m=e[10];let h;e[11]!==d||e[12]!==f||e[13]!==m?(h=t.jsxs(De,{align:"end",onClick:Ls,children:[d,f,m]}),e[11]=d,e[12]=f,e[13]=m,e[14]=h):h=e[14];let x;return e[15]!==o||e[16]!==h?(x=t.jsxs(Te,{children:[o,h]}),e[15]=o,e[16]=h,e[17]=x):x=e[17],x}function Ls(s){return s.stopPropagation()}function Rs(s){return s.stopPropagation()}function ue(s){const e=$.c(9),{onOpen:l,children:i,className:n}=s;let r;e[0]!==l?(r=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),l())},e[0]=l,e[1]=r):r=e[1];let a;e[2]!==n?(a=Z("group/card flex cursor-pointer flex-col gap-3 rounded-2xl border border-border bg-background p-4 text-left transition-colors hover:border-border hover:bg-muted/40",n),e[2]=n,e[3]=a):a=e[3];let c;return e[4]!==i||e[5]!==l||e[6]!==r||e[7]!==a?(c=t.jsx("div",{role:"button",tabIndex:0,onClick:l,onKeyDown:r,className:a,children:i}),e[4]=i,e[5]=l,e[6]=r,e[7]=a,e[8]=c):c=e[8],c}function me(s){const e=$.c(19),{icon:l,name:i,meta:n,subtitle:r,publicState:a,actions:c}=s;let o;e[0]!==i?(o=t.jsx("span",{className:"min-w-0 flex-1 truncate text-[13px] text-foreground",title:i,children:i}),e[0]=i,e[1]=o):o=e[1];let d;e[2]!==a?(d=a&&t.jsx(Bs,{state:a}),e[2]=a,e[3]=d):d=e[3];let u;e[4]!==n?(u=n&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:n}),e[4]=n,e[5]=u):u=e[5];let f;e[6]!==o||e[7]!==d||e[8]!==u?(f=t.jsxs("div",{className:"flex items-start gap-3",children:[o,d,u]}),e[6]=o,e[7]=d,e[8]=u,e[9]=f):f=e[9];let m;e[10]!==r?(m=r&&t.jsx("span",{className:"truncate text-xs text-muted-foreground",title:r,children:r}),e[10]=r,e[11]=m):m=e[11];let h;e[12]!==f||e[13]!==m?(h=t.jsxs("div",{className:"flex min-w-0 flex-1 flex-col justify-center",children:[f,m]}),e[12]=f,e[13]=m,e[14]=h):h=e[14];let x;return e[15]!==c||e[16]!==l||e[17]!==h?(x=t.jsxs("div",{className:"flex w-full items-center gap-2.5",children:[l,h,c]}),e[15]=c,e[16]=l,e[17]=h,e[18]=x):x=e[18],x}function ze(s){const e=$.c(17),{name:l,meta:i,subtitle:n,glyph:r,readOnly:a,publicState:c,onOpen:o,onShare:d,onDelete:u}=s;let f;e[0]!==r||e[1]!==a?(f=t.jsx(bs,{glyph:r,readOnly:a,className:"size-8 shrink-0"}),e[0]=r,e[1]=a,e[2]=f):f=e[2];let m;e[3]!==l||e[4]!==u||e[5]!==d?(m=d||u?t.jsxs(Te,{children:[t.jsx(Ce,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:qs,"aria-label":`Actions for ${l}`,children:t.jsx(Se,{size:14})})}),t.jsxs(De,{align:"end",onClick:_s,children:[d&&t.jsx(Ve,{onShare:d}),u&&t.jsxs(te,{variant:"destructive",onClick:u,children:[t.jsx($e,{size:14}),"Delete"]})]})]}):void 0,e[3]=l,e[4]=u,e[5]=d,e[6]=m):m=e[6];let h;e[7]!==i||e[8]!==l||e[9]!==c||e[10]!==n||e[11]!==f||e[12]!==m?(h=t.jsx(me,{icon:f,name:l,meta:i,subtitle:n,publicState:c,actions:m}),e[7]=i,e[8]=l,e[9]=c,e[10]=n,e[11]=f,e[12]=m,e[13]=h):h=e[13];let x;return e[14]!==o||e[15]!==h?(x=t.jsx(ue,{onOpen:o,children:h}),e[14]=o,e[15]=h,e[16]=x):x=e[16],x}function _s(s){return s.stopPropagation()}function qs(s){return s.stopPropagation()}function bt(s){const e=$.c(22),{filename:l,updatedAt:i,downloadUrl:n,subtitle:r,publicState:a,onOpen:c,onShare:o,onDelete:d}=s;let u;e[0]!==l?(u=t.jsx(ne,{filename:l,className:"h-8 w-6.5 shrink-0"}),e[0]=l,e[1]=u):u=e[1];let f;e[2]!==i?(f=fe(i),e[2]=i,e[3]=f):f=e[3];let m;e[4]!==l||e[5]!==r?(m=r??dt(l),e[4]=l,e[5]=r,e[6]=m):m=e[6];let h;e[7]!==n||e[8]!==l||e[9]!==d||e[10]!==o?(h=t.jsx(gt,{downloadUrl:n,filename:l,onShare:o,onDelete:d}),e[7]=n,e[8]=l,e[9]=d,e[10]=o,e[11]=h):h=e[11];let x;e[12]!==l||e[13]!==a||e[14]!==u||e[15]!==f||e[16]!==m||e[17]!==h?(x=t.jsx(me,{icon:u,name:l,meta:f,subtitle:m,publicState:a,actions:h}),e[12]=l,e[13]=a,e[14]=u,e[15]=f,e[16]=m,e[17]=h,e[18]=x):x=e[18];let b;return e[19]!==c||e[20]!==x?(b=t.jsx(ue,{onOpen:c,children:x}),e[19]=c,e[20]=x,e[21]=b):b=e[21],b}function Is(s){const e=$.c(40),{dirName:l,updatedAt:i,skillMdUrl:n,publicState:r,onOpen:a,onBrowse:c,onShare:o,onDelete:d}=s;let u;e[0]!==n?(u=L.fileText(n),e[0]=n,e[1]=u):u=e[1];let f;e[2]!==n?(f=async()=>{const q=await fetch(n,{credentials:"include"});if(!q.ok)throw new Error(`fetch failed: ${q.status}`);return q.text()},e[2]=n,e[3]=f):f=e[3];let m;e[4]!==u||e[5]!==f?(m={queryKey:u,queryFn:f,staleTime:6e4,retry:!1},e[4]=u,e[5]=f,e[6]=m):m=e[6];const{data:h}=Y(m);let x;e[7]!==h?(x=h?xt(h):null,e[7]=h,e[8]=x):x=e[8];const b=x;let j;e[9]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(Le,{size:16})}),e[9]=j):j=e[9];const v=b?.name??l;let g;e[10]!==i?(g=fe(i),e[10]=i,e[11]=g):g=e[11];const w=`Actions for ${l}`;let C;e[12]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(Se,{size:14}),e[12]=C):C=e[12];let k;e[13]!==w?(k=t.jsx(Ce,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Vs,"aria-label":w,children:C})}),e[13]=w,e[14]=k):k=e[14];let S;e[15]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsx(at,{size:14}),e[15]=S):S=e[15];let D;e[16]!==c?(D=t.jsxs(te,{onClick:c,children:[S,"Browse files"]}),e[16]=c,e[17]=D):D=e[17];let T;e[18]!==o?(T=o&&t.jsx(Ve,{onShare:o}),e[18]=o,e[19]=T):T=e[19];let P;e[20]!==d?(P=d&&t.jsxs(te,{variant:"destructive",onClick:d,children:[t.jsx($e,{size:14}),"Delete"]}),e[20]=d,e[21]=P):P=e[21];let F;e[22]!==D||e[23]!==T||e[24]!==P?(F=t.jsxs(De,{align:"end",onClick:Ks,children:[D,T,P]}),e[22]=D,e[23]=T,e[24]=P,e[25]=F):F=e[25];let p;e[26]!==k||e[27]!==F?(p=t.jsxs(Te,{children:[k,F]}),e[26]=k,e[27]=F,e[28]=p):p=e[28];let z;e[29]!==r||e[30]!==p||e[31]!==v||e[32]!==g?(z=t.jsx(me,{icon:j,name:v,meta:g,subtitle:"Skill",publicState:r,actions:p}),e[29]=r,e[30]=p,e[31]=v,e[32]=g,e[33]=z):z=e[33];const O=b?.description??"";let M;e[34]!==O?(M=t.jsx("p",{className:"line-clamp-2 min-h-8 text-xs leading-4 text-muted-foreground",children:O}),e[34]=O,e[35]=M):M=e[35];let _;return e[36]!==a||e[37]!==z||e[38]!==M?(_=t.jsxs(ue,{onOpen:a,children:[z,M]}),e[36]=a,e[37]=z,e[38]=M,e[39]=_):_=e[39],_}function Ks(s){return s.stopPropagation()}function Vs(s){return s.stopPropagation()}function Hs(s){const e=$.c(47),{dirName:l,updatedAt:i,tokensUrl:n,onOpen:r,onBrowse:a,onDelete:c}=s;let o;e[0]!==n?(o=L.fileText(n),e[0]=n,e[1]=o):o=e[1];let d;e[2]!==n?(d=async()=>{const w=await fetch(n,{credentials:"include"});if(!w.ok)throw new Error(`fetch failed: ${w.status}`);return w.text()},e[2]=n,e[3]=d):d=e[3];let u;e[4]!==o||e[5]!==d?(u={queryKey:o,queryFn:d,staleTime:6e4,retry:!1},e[4]=o,e[5]=d,e[6]=u):u=e[6];const{data:f}=Y(u);let m,h,x,b,j;if(e[7]!==f||e[8]!==l||e[9]!==a||e[10]!==c||e[11]!==r||e[12]!==i){const w=f?pt(f).filter(Ys).slice(0,6):[];m=ue,b=r;let C;e[18]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(je,{size:16})}),e[18]=C):C=e[18];let k;e[19]!==i?(k=fe(i),e[19]=i,e[20]=k):k=e[20];const S=`Actions for ${l}`;let D;e[21]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(Se,{size:14}),e[21]=D):D=e[21];let T;e[22]!==S?(T=t.jsx(Ce,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Ws,"aria-label":S,children:D})}),e[22]=S,e[23]=T):T=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(at,{size:14}),e[24]=P):P=e[24];let F;e[25]!==a?(F=t.jsxs(te,{onClick:a,children:[P,"Browse files"]}),e[25]=a,e[26]=F):F=e[26];let p;e[27]!==c?(p=c&&t.jsxs(te,{variant:"destructive",onClick:c,children:[t.jsx($e,{size:14}),"Delete"]}),e[27]=c,e[28]=p):p=e[28];let z;e[29]!==F||e[30]!==p?(z=t.jsxs(De,{align:"end",onClick:Qs,children:[F,p]}),e[29]=F,e[30]=p,e[31]=z):z=e[31];let O;e[32]!==T||e[33]!==z?(O=t.jsxs(Te,{children:[T,z]}),e[32]=T,e[33]=z,e[34]=O):O=e[34],e[35]!==l||e[36]!==O||e[37]!==k?(j=t.jsx(me,{icon:C,name:l,meta:k,subtitle:"Brand",actions:O}),e[35]=l,e[36]=O,e[37]=k,e[38]=j):j=e[38],h="flex min-h-5 items-center gap-1.5",x=w.map(Gs),e[7]=f,e[8]=l,e[9]=a,e[10]=c,e[11]=r,e[12]=i,e[13]=m,e[14]=h,e[15]=x,e[16]=b,e[17]=j}else m=e[13],h=e[14],x=e[15],b=e[16],j=e[17];let v;e[39]!==h||e[40]!==x?(v=t.jsx("div",{className:h,children:x}),e[39]=h,e[40]=x,e[41]=v):v=e[41];let g;return e[42]!==m||e[43]!==b||e[44]!==j||e[45]!==v?(g=t.jsxs(m,{onOpen:b,children:[j,v]}),e[42]=m,e[43]=b,e[44]=j,e[45]=v,e[46]=g):g=e[46],g}function Gs(s){return t.jsx("span",{className:"size-5 rounded-full border border-border/60",style:{backgroundColor:s.value},title:`${s.name}: ${s.value}`},s.name)}function Qs(s){return s.stopPropagation()}function Ws(s){return s.stopPropagation()}function Ys(s){return s.isColor}function Ue(s){const e=$.c(4),{children:l}=s,[i,n]=B.useState(!1);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=()=>o=>{if(!o)return;const d=new IntersectionObserver(u=>{const[f]=u;f?.isIntersecting&&(n(!0),d.disconnect())},{rootMargin:"200px"});d.observe(o)},e[0]=r):r=e[0];const[a]=B.useState(r);if(i){let o;return e[1]!==l?(o=t.jsx(t.Fragment,{children:l}),e[1]=l,e[2]=o):o=e[2],o}let c;return e[3]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx("div",{ref:a,className:"h-full w-full"}),e[3]=c):c=e[3],c}function Xs(s){const e=$.c(11),{url:l}=s;let i;e[0]!==l?(i=L.fileText(l),e[0]=l,e[1]=i):i=e[1];let n;e[2]!==l?(n=async()=>{const d=await fetch(l,{credentials:"include"});if(!d.ok)throw new Error(`fetch failed: ${d.status}`);return d.text()},e[2]=l,e[3]=n):n=e[3];let r;e[4]!==i||e[5]!==n?(r={queryKey:i,queryFn:n,staleTime:6e4,retry:!1},e[4]=i,e[5]=n,e[6]=r):r=e[6];const{data:a}=Y(r);if(!a)return null;let c;e[7]!==a?(c=a.slice(0,2e3),e[7]=a,e[8]=c):c=e[8];let o;return e[9]!==c?(o=t.jsx("pre",{className:"pointer-events-none h-full w-full overflow-hidden bg-background p-3 font-mono text-[9px] leading-[1.5] text-muted-foreground select-none",children:c}),e[9]=c,e[10]=o):o=e[10],o}function Zs(s){const e=$.c(23),{url:l,ext:i}=s;let n;e[0]!==l?(n=L.csvThumb(l),e[0]=l,e[1]=n):n=e[1];let r;e[2]!==l?(r=async()=>{const j=await fetch(l,{credentials:"include",headers:{Range:"bytes=0-8191"}});if(!j.ok)throw new Error(`fetch failed: ${j.status}`);return j.text()},e[2]=l,e[3]=r):r=e[3];let a;e[4]!==n||e[5]!==r?(a={queryKey:n,queryFn:r,staleTime:6e4,retry:!1},e[4]=n,e[5]=r,e[6]=a):a=e[6];const{data:c}=Y(a);if(!c)return null;const o=i==="tsv"?" ":",";let d,u,f,m;if(e[7]!==c||e[8]!==o){m=Symbol.for("react.early_return_sentinel");e:{let j;e[13]!==o?(j=g=>g.split(o).slice(0,6).map(tl),e[13]=o,e[14]=j):j=e[14];const v=c.split(`
|
|
9
|
-
`).filter(Boolean).slice(0,7).map(j);if(v.length===0){m=null;break e}f="pointer-events-none h-full w-full overflow-hidden bg-background p-2 select-none",u="w-full border-collapse",d=v.map(Js)}e[7]=c,e[8]=o,e[9]=d,e[10]=u,e[11]=f,e[12]=m}else d=e[9],u=e[10],f=e[11],m=e[12];if(m!==Symbol.for("react.early_return_sentinel"))return m;let h;e[15]!==d?(h=t.jsx("tbody",{children:d}),e[15]=d,e[16]=h):h=e[16];let x;e[17]!==u||e[18]!==h?(x=t.jsx("table",{className:u,children:h}),e[17]=u,e[18]=h,e[19]=x):x=e[19];let b;return e[20]!==f||e[21]!==x?(b=t.jsx("div",{className:f,children:x}),e[20]=f,e[21]=x,e[22]=b):b=e[22],b}function Js(s,e){return t.jsx("tr",{className:Z(e===0&&"bg-muted/50 font-medium"),children:s.map(el)},e)}function el(s,e){return t.jsx("td",{className:"max-w-[56px] overflow-hidden border border-border/30 px-1 py-px text-[7px] leading-[1.4] text-muted-foreground",style:{maxWidth:56},children:t.jsx("span",{className:"block truncate",children:s})},e)}function tl(s){return s.trim().replace(/^"|"$/g,"")}function sl(s){const e=$.c(14),{filename:l,size:i,downloadUrl:n}=s;let r;if(e[0]!==n||e[1]!==l||e[2]!==i){const a=Us(l);let c;if(Fs.has(a)){let o;e[4]!==n?(o=t.jsx("img",{src:n,alt:"",loading:"lazy",className:"h-full w-full object-cover"}),e[4]=n,e[5]=o):o=e[5],c=o}else if(Es.has(a)){const o=`${n}#t=0.1`;let d;e[6]!==o?(d=t.jsx(Ue,{children:t.jsx("video",{src:o,preload:"metadata",muted:!0,playsInline:!0,className:"pointer-events-none h-full w-full object-cover"})}),e[6]=o,e[7]=d):d=e[7],c=d}else if(a==="pdf"){let o;e[8]!==l?(o=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(ne,{filename:l,className:"h-14 w-11 opacity-60"})}),e[8]=l,e[9]=o):o=e[9],c=o}else if(Os.has(a))c=t.jsx(Ue,{children:t.jsx(Zs,{url:n,ext:a})});else if(As.has(a)&&i<=Ms){let o;e[10]!==n?(o=t.jsx(Ue,{children:t.jsx(Xs,{url:n})}),e[10]=n,e[11]=o):o=e[11],c=o}else{let o;e[12]!==l?(o=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(ne,{filename:l,className:"h-14 w-11 opacity-60"})}),e[12]=l,e[13]=o):o=e[13],c=o}r=t.jsx("div",{className:"aspect-[400/265] w-full overflow-hidden rounded-lg border border-border/60 bg-muted/30",children:c}),e[0]=n,e[1]=l,e[2]=i,e[3]=r}else r=e[3];return r}function ll(s){const e=$.c(27),l=s.onOpen;let i;e[0]!==s.filename?(i=t.jsx(ne,{filename:s.filename,className:"h-8 w-6.5 shrink-0"}),e[0]=s.filename,e[1]=i):i=e[1];const n=s.filename;let r;e[2]!==s.updatedAt?(r=fe(s.updatedAt),e[2]=s.updatedAt,e[3]=r):r=e[3];let a;e[4]!==s.filename||e[5]!==s.subtitle?(a=s.subtitle??dt(s.filename),e[4]=s.filename,e[5]=s.subtitle,e[6]=a):a=e[6];let c;e[7]!==s.downloadUrl||e[8]!==s.filename||e[9]!==s.onDelete||e[10]!==s.onShare?(c=t.jsx(gt,{downloadUrl:s.downloadUrl,filename:s.filename,onShare:s.onShare,onDelete:s.onDelete}),e[7]=s.downloadUrl,e[8]=s.filename,e[9]=s.onDelete,e[10]=s.onShare,e[11]=c):c=e[11];let o;e[12]!==s.filename||e[13]!==s.publicState||e[14]!==i||e[15]!==r||e[16]!==a||e[17]!==c?(o=t.jsx(me,{icon:i,name:n,meta:r,subtitle:a,publicState:s.publicState,actions:c}),e[12]=s.filename,e[13]=s.publicState,e[14]=i,e[15]=r,e[16]=a,e[17]=c,e[18]=o):o=e[18];let d;e[19]!==s.downloadUrl||e[20]!==s.filename||e[21]!==s.size?(d=t.jsx(sl,{filename:s.filename,size:s.size,downloadUrl:s.downloadUrl}),e[19]=s.downloadUrl,e[20]=s.filename,e[21]=s.size,e[22]=d):d=e[22];let u;return e[23]!==s.onOpen||e[24]!==o||e[25]!==d?(u=t.jsxs(ue,{onOpen:l,children:[o,d]}),e[23]=s.onOpen,e[24]=o,e[25]=d,e[26]=u):u=e[26],u}async function nl(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}const il=`
|
|
10
|
-
*{box-sizing:border-box}
|
|
11
|
-
body{margin:0;padding:24px;background:var(--brand-bg,#0b0f1a);color:var(--brand-fg,#f5f7ff);font-family:var(--brand-font-body,system-ui,sans-serif);font-size:14px;line-height:1.5}
|
|
12
|
-
.stack{display:flex;flex-direction:column;gap:18px;max-width:760px}
|
|
13
|
-
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
|
|
14
|
-
h1{font-family:var(--brand-font-display,inherit);font-size:28px;font-weight:700;letter-spacing:-0.02em;margin:0}
|
|
15
|
-
.muted{color:var(--brand-fg-muted,#9fb0c9)}
|
|
16
|
-
.btn{border:0;border-radius:var(--brand-radius,12px);padding:10px 16px;font:inherit;font-weight:600;cursor:pointer}
|
|
17
|
-
.btn-primary{background:var(--brand-primary,#0a84ff);color:#fff}
|
|
18
|
-
.btn-secondary{background:transparent;color:var(--brand-fg,#f5f7ff);border:1.5px solid var(--brand-border-strong,rgba(255,255,255,.22))}
|
|
19
|
-
.btn-ghost{background:transparent;color:var(--brand-fg-muted,#9fb0c9)}
|
|
20
|
-
.card{background:var(--brand-bg-subtle,#121826);border:1px solid var(--brand-border,rgba(255,255,255,.1));border-radius:var(--brand-radius-lg,16px);padding:20px;box-shadow:var(--brand-shadow-md,0 6px 16px rgba(8,12,22,.45))}
|
|
21
|
-
.kpi{font-family:var(--brand-font-display,inherit);font-size:44px;font-weight:700;color:var(--brand-primary,#0a84ff);line-height:1;letter-spacing:-0.02em}
|
|
22
|
-
.input{width:100%;background:var(--brand-bg-elevated,#1a2233);border:1.5px solid var(--brand-border,rgba(255,255,255,.12));border-radius:var(--brand-radius,12px);padding:10px 12px;color:inherit;font:inherit}
|
|
23
|
-
.badge{display:inline-flex;align-items:center;border-radius:999px;padding:4px 10px;font-size:12px;font-weight:600}
|
|
24
|
-
.badge-success{background:var(--brand-success-bg,#e7f6ec);color:var(--brand-success-fg,#0f7a37)}
|
|
25
|
-
.badge-warning{background:var(--brand-warning-bg,#fdf3d6);color:var(--brand-warning-fg,#8a6500)}
|
|
26
|
-
.badge-error{background:var(--brand-error-bg,#fde7e8);color:var(--brand-error-fg,#b01319)}
|
|
27
|
-
.badge-info{background:var(--brand-info-bg,#e8f1ff);color:var(--brand-info-fg,#0b54a8)}
|
|
28
|
-
.chip{border:1.5px solid var(--brand-border-strong,rgba(255,255,255,.22));border-radius:999px;padding:6px 14px;font-size:13px}
|
|
29
|
-
.chip-active{background:var(--brand-primary,#0a84ff);border-color:transparent;color:#fff}
|
|
30
|
-
`,rl=`
|
|
31
|
-
<div class="stack">
|
|
32
|
-
<div>
|
|
33
|
-
<h1>Your brand, applied</h1>
|
|
34
|
-
<p class="muted" style="margin:6px 0 0">Buttons, cards, inputs and badges in your tokens.</p>
|
|
35
|
-
</div>
|
|
36
|
-
<div class="row">
|
|
37
|
-
<button class="btn btn-primary">Primary</button>
|
|
38
|
-
<button class="btn btn-secondary">Secondary</button>
|
|
39
|
-
<button class="btn btn-ghost">Ghost</button>
|
|
40
|
-
</div>
|
|
41
|
-
<div class="card">
|
|
42
|
-
<p class="muted" style="margin:0 0 6px">Monthly savings</p>
|
|
43
|
-
<div class="kpi">$240</div>
|
|
44
|
-
</div>
|
|
45
|
-
<input class="input" placeholder="you@example.com" />
|
|
46
|
-
<div class="row">
|
|
47
|
-
<span class="badge badge-success">Success</span>
|
|
48
|
-
<span class="badge badge-warning">Warning</span>
|
|
49
|
-
<span class="badge badge-error">Error</span>
|
|
50
|
-
<span class="badge badge-info">Info</span>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="row">
|
|
53
|
-
<span class="chip chip-active">All</span>
|
|
54
|
-
<span class="chip">Income</span>
|
|
55
|
-
<span class="chip">Spending</span>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
`;function al(s){return`<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><style>${s??""}</style><style>${il}</style></head><body>${rl}</body></html>`}function ol(s){const e=$.c(13),{tokensUrl:l}=s;let i;e[0]!==l?(i=L.fileText(l??""),e[0]=l,e[1]=i):i=e[1];const n=!!l;let r;e[2]!==l?(r=()=>nl(l??""),e[2]=l,e[3]=r):r=e[3];let a;e[4]!==i||e[5]!==n||e[6]!==r?(a={queryKey:i,enabled:n,queryFn:r,staleTime:6e4,retry:!1},e[4]=i,e[5]=n,e[6]=r,e[7]=a):a=e[7];const c=Y(a);if(l&&c.isPending){let f;return e[8]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(V,{className:"h-full w-full rounded-xl"})}),e[8]=f):f=e[8],f}const o=c.data??null;let d;e[9]!==o?(d=al(o),e[9]=o,e[10]=d):d=e[10];let u;return e[11]!==d?(u=t.jsx("iframe",{title:"Brand components",srcDoc:d,sandbox:"",className:"block h-full w-full border-0 bg-white"}),e[11]=d,e[12]=u):u=e[12],u}const cl="Theme preview",dl=[`<section class="slide-center">
|
|
59
|
-
<p class="eyebrow">Brand deck</p>
|
|
60
|
-
<h1 class="deck-h1">Your brand, on every slide</h1>
|
|
61
|
-
<p class="deck-sub">A live preview of each slide layout in your brand style.</p>
|
|
62
|
-
<p class="deck-meta">Theme preview</p>
|
|
63
|
-
</section>`,`<section>
|
|
64
|
-
<p class="eyebrow">Agenda</p>
|
|
65
|
-
<h2 class="deck-h2">What's in this theme</h2>
|
|
66
|
-
<ol class="agenda">
|
|
67
|
-
<li>Title & section dividers</li>
|
|
68
|
-
<li>Bulleted content</li>
|
|
69
|
-
<li>Side-by-side columns</li>
|
|
70
|
-
<li>Metrics & timelines</li>
|
|
71
|
-
<li>Quotes & closing</li>
|
|
72
|
-
</ol>
|
|
73
|
-
</section>`,`<section class="slide-center divider">
|
|
74
|
-
<p class="giant-number">01</p>
|
|
75
|
-
<h2 class="deck-h1">Content layouts</h2>
|
|
76
|
-
<p class="deck-sub">How text-heavy slides look.</p>
|
|
77
|
-
</section>`,`<section>
|
|
78
|
-
<p class="eyebrow">Bullets</p>
|
|
79
|
-
<h2 class="deck-h2">Key points land cleanly</h2>
|
|
80
|
-
<p class="deck-body intro">Short, scannable lines with the brand accent marker.</p>
|
|
81
|
-
<ul class="bullets">
|
|
82
|
-
<li>Each point is one idea</li>
|
|
83
|
-
<li>Accent color draws the eye</li>
|
|
84
|
-
<li>Plenty of breathing room</li>
|
|
85
|
-
</ul>
|
|
86
|
-
</section>`,`<section>
|
|
87
|
-
<p class="eyebrow">Two column</p>
|
|
88
|
-
<h2 class="deck-h2">Compare side by side</h2>
|
|
89
|
-
<div class="cols">
|
|
90
|
-
<div class="card grow">
|
|
91
|
-
<h3 class="col-title">Before</h3>
|
|
92
|
-
<div class="deck-body"><p>Generic slides that ignore your brand.</p></div>
|
|
93
|
-
</div>
|
|
94
|
-
<div class="card grow">
|
|
95
|
-
<h3 class="col-title">After</h3>
|
|
96
|
-
<div class="deck-body"><p>Every deck on-brand, automatically.</p></div>
|
|
97
|
-
</div>
|
|
98
|
-
</div>
|
|
99
|
-
</section>`,`<section>
|
|
100
|
-
<p class="eyebrow">Metrics</p>
|
|
101
|
-
<h2 class="deck-h2">Numbers that matter</h2>
|
|
102
|
-
<div class="cols kpis">
|
|
103
|
-
<div class="card kpi grow">
|
|
104
|
-
<p class="kpi-value">3×</p>
|
|
105
|
-
<p class="kpi-label">Faster deck creation</p>
|
|
106
|
-
<p class="kpi-delta">since adopting the theme</p>
|
|
107
|
-
</div>
|
|
108
|
-
<div class="card kpi grow">
|
|
109
|
-
<p class="kpi-value">100%</p>
|
|
110
|
-
<p class="kpi-label">On-brand slides</p>
|
|
111
|
-
<p class="kpi-delta">no manual restyling</p>
|
|
112
|
-
</div>
|
|
113
|
-
<div class="card kpi grow">
|
|
114
|
-
<p class="kpi-value">1</p>
|
|
115
|
-
<p class="kpi-label">Source of truth</p>
|
|
116
|
-
<p class="kpi-delta">tokens.css</p>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
119
|
-
</section>`,`<section>
|
|
120
|
-
<p class="eyebrow">Timeline</p>
|
|
121
|
-
<h2 class="deck-h2">How it unfolds</h2>
|
|
122
|
-
<div class="cols timeline">
|
|
123
|
-
<div class="step grow">
|
|
124
|
-
<p class="step-label">Step 1</p>
|
|
125
|
-
<h3 class="col-title">Define</h3>
|
|
126
|
-
<p class="deck-body">Set brand tokens once.</p>
|
|
127
|
-
</div>
|
|
128
|
-
<div class="step grow">
|
|
129
|
-
<p class="step-label">Step 2</p>
|
|
130
|
-
<h3 class="col-title">Generate</h3>
|
|
131
|
-
<p class="deck-body">Create decks from data.</p>
|
|
132
|
-
</div>
|
|
133
|
-
<div class="step grow">
|
|
134
|
-
<p class="step-label">Step 3</p>
|
|
135
|
-
<h3 class="col-title">Present</h3>
|
|
136
|
-
<p class="deck-body">Ship, always on-brand.</p>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
</section>`,`<section>
|
|
140
|
-
<p class="eyebrow">Comparison</p>
|
|
141
|
-
<h2 class="deck-h2">Plans at a glance</h2>
|
|
142
|
-
<div class="cols">
|
|
143
|
-
<div class="card grow">
|
|
144
|
-
<h3 class="col-title">Starter</h3>
|
|
145
|
-
<ul class="bullets compact">
|
|
146
|
-
<li>Core layouts</li>
|
|
147
|
-
<li>Brand colors</li>
|
|
148
|
-
<li>Logo</li>
|
|
149
|
-
</ul>
|
|
150
|
-
</div>
|
|
151
|
-
<div class="card grow">
|
|
152
|
-
<h3 class="col-title">Pro</h3>
|
|
153
|
-
<ul class="bullets compact">
|
|
154
|
-
<li>Everything in Starter</li>
|
|
155
|
-
<li>Custom fonts</li>
|
|
156
|
-
<li>Theme shell</li>
|
|
157
|
-
</ul>
|
|
158
|
-
</div>
|
|
159
|
-
</div>
|
|
160
|
-
</section>`,`<section class="slide-center">
|
|
161
|
-
<blockquote class="deck-quote">“Design once, stay on-brand everywhere.”</blockquote>
|
|
162
|
-
<p class="attribution">Brand system · Studio</p>
|
|
163
|
-
</section>`,`<section class="slide-center">
|
|
164
|
-
<h2 class="deck-h1">Ready to present</h2>
|
|
165
|
-
<p class="deck-sub">Generate a deck with this theme via the slides skill.</p>
|
|
166
|
-
<p class="cta">slides-create --theme …</p>
|
|
167
|
-
</section>`].join(`
|
|
168
|
-
|
|
169
|
-
`);async function Je(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function fl(s,e){const l=e?`<style>${e}</style>`:"";return s.replaceAll("{{{slides}}}",dl).replaceAll("{{title}}",cl).replace(/(src=")(\/deck-runtime\/)/g,`$1${window.location.origin}$2`).replace("</head>",`${l}</head>`)}function ul(s){const e=$.c(23),{readUrl:l,title:i,tokensUrl:n}=s;let r;e[0]!==l?(r=L.fileText(l),e[0]=l,e[1]=r):r=e[1];let a;e[2]!==l?(a=()=>Je(l),e[2]=l,e[3]=a):a=e[3];let c;e[4]!==r||e[5]!==a?(c={queryKey:r,queryFn:a,staleTime:6e4,retry:!1},e[4]=r,e[5]=a,e[6]=c):c=e[6];const o=Y(c);let d;e[7]!==n?(d=L.fileText(n??""),e[7]=n,e[8]=d):d=e[8];const u=!!n;let f;e[9]!==n?(f=()=>Je(n??""),e[9]=n,e[10]=f):f=e[10];let m;e[11]!==d||e[12]!==u||e[13]!==f?(m={queryKey:d,enabled:u,queryFn:f,staleTime:6e4,retry:!1},e[11]=d,e[12]=u,e[13]=f,e[14]=m):m=e[14];const h=Y(m);if(o.isPending||n&&h.isPending){let v;return e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(V,{className:"aspect-[16/9] w-full max-w-3xl rounded-xl"})}),e[15]=v):v=e[15],v}if(o.isError||!o.data){let v;return e[16]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This theme is no longer available."}),e[16]=v):v=e[16],v}const x=h.data??null;let b;e[17]!==x||e[18]!==o.data?(b=fl(o.data,x),e[17]=x,e[18]=o.data,e[19]=b):b=e[19];let j;return e[20]!==b||e[21]!==i?(j=t.jsx("iframe",{title:i,srcDoc:b,sandbox:"allow-scripts",className:"block h-full w-full border-0 bg-white"}),e[20]=b,e[21]=i,e[22]=j):j=e[22],j}async function et(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function oe(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=t.jsx("p",{className:"text-sm font-medium text-foreground",children:l}),e[0]=l,e[1]=i):i=e[1],i}function ml(s){const e=$.c(16),{family:l,tokens:i,editing:n,valueOf:r,onEdit:a}=s;let c;e[0]!==l?(c=t.jsx("span",{className:"text-xs text-muted-foreground",children:l}),e[0]=l,e[1]=c):c=e[1];let o;if(e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==n||e[8]!==a||e[9]!==r?(f=m=>{const h=r(m),x=`${m.name.replace(/^--brand-/,"")}: ${h}`;return n&&/^#/.test(h)?t.jsx("input",{type:"color","aria-label":m.name,title:x,value:$s(h),onChange:b=>a(m.name,b.target.value),className:"size-7 cursor-pointer rounded-md border border-border/60 bg-transparent p-0.5"},m.name):t.jsx("span",{title:x,className:"size-7 rounded-md border border-border/60",style:{backgroundColor:h}},m.name)},e[7]=n,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=n,e[3]=a,e[4]=i,e[5]=r,e[6]=o}else o=e[6];let d;e[11]!==o?(d=t.jsx("div",{className:"flex flex-wrap gap-1",children:o}),e[11]=o,e[12]=d):d=e[12];let u;return e[13]!==c||e[14]!==d?(u=t.jsxs("div",{className:"flex flex-col gap-1.5",children:[c,d]}),e[13]=c,e[14]=d,e[15]=u):u=e[15],u}function hl(s){const e=$.c(9),{token:l,value:i}=s;if(l.kind==="space"){let r;return e[0]!==i?(r=t.jsx("span",{className:"flex h-7 w-16 shrink-0 items-center",children:t.jsx("span",{className:"h-1.5 rounded-full bg-primary",style:{width:i,maxWidth:"100%"}})}),e[0]=i,e[1]=r):r=e[1],r}if(l.kind==="radius"){let r;return e[2]!==i?(r=t.jsx("span",{className:"size-7 shrink-0 border border-border bg-muted/50",style:{borderRadius:i}}),e[2]=i,e[3]=r):r=e[3],r}if(l.kind==="shadow"){let r;return e[4]!==i?(r=t.jsx("span",{className:"size-7 shrink-0 rounded-md bg-background",style:{boxShadow:i}}),e[4]=i,e[5]=r):r=e[5],r}if(l.kind==="type"&&/^--brand-text-/.test(l.name)){const r=`min(${i}, 22px)`;let a;return e[6]!==r?(a=t.jsx("span",{className:"flex size-7 shrink-0 items-center justify-center overflow-hidden leading-none text-foreground",style:{fontSize:r},children:"Ag"}),e[6]=r,e[7]=a):a=e[7],a}let n;return e[8]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("span",{className:"size-7 shrink-0"}),e[8]=n):n=e[8],n}function vt(s){const e=$.c(17),{token:l,value:i,editing:n,onEdit:r}=s;let a;e[0]!==l||e[1]!==i?(a=t.jsx(hl,{token:l,value:i}),e[0]=l,e[1]=i,e[2]=a):a=e[2];let c;if(e[3]!==l.name){let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=/^--brand-/,e[5]=f):f=e[5],c=l.name.replace(f,""),e[3]=l.name,e[4]=c}else c=e[4];let o;e[6]!==c?(o=t.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:c}),e[6]=c,e[7]=o):o=e[7];let d;e[8]!==n||e[9]!==r||e[10]!==l.name||e[11]!==i?(d=n?t.jsx(we,{value:i,onChange:f=>r(l.name,f.target.value),className:"h-8 w-40 font-mono text-xs"}):t.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:i}),e[8]=n,e[9]=r,e[10]=l.name,e[11]=i,e[12]=d):d=e[12];let u;return e[13]!==a||e[14]!==o||e[15]!==d?(u=t.jsxs("div",{className:"flex items-center gap-3",children:[a,o,d]}),e[13]=a,e[14]=o,e[15]=d,e[16]=u):u=e[16],u}function ae(s){const e=$.c(16),{label:l,tokens:i,editing:n,valueOf:r,onEdit:a}=s;if(i.length===0)return null;let c;e[0]!==l?(c=t.jsx(oe,{children:l}),e[0]=l,e[1]=c):c=e[1];let o;if(e[2]!==n||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==n||e[8]!==a||e[9]!==r?(f=m=>t.jsx(vt,{token:m,value:r(m),editing:n,onEdit:a},m.name),e[7]=n,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=n,e[3]=a,e[4]=i,e[5]=r,e[6]=o}else o=e[6];let d;e[11]!==o?(d=t.jsx("div",{className:"flex flex-col gap-2.5",children:o}),e[11]=o,e[12]=d):d=e[12];let u;return e[13]!==c||e[14]!==d?(u=t.jsxs("div",{className:"flex flex-col gap-3",children:[c,d]}),e[13]=c,e[14]=d,e[15]=u):u=e[15],u}function jt({brandPath:s,onClose:e,variant:l}){const{org:i}=Ne(),n=Ie(s),r=n.volume??"",a=n.dirPath,c=A(a),o=n.readOnly,d=st(),u=de(),f=os(r),{upload:m,remove:h}=Be(r),x=B.useRef(null),b=Ke(r,a),j=b.data??[],v=y=>j.some(U=>U.kind==="file"&&A(U.path)===y),g=v("tokens.css"),w=v("brand.md"),C=v("slides-theme.html"),k=zs(j),S=u(r,`${a}/tokens.css`),D=u(r,`${a}/brand.md`),T=u(r,`${a}/slides-theme.html`),P=Y({queryKey:L.fileText(S),enabled:g,queryFn:()=>et(S),staleTime:6e4,retry:!1}),F=Y({queryKey:L.fileText(D),enabled:w,queryFn:()=>et(D),staleTime:6e4,retry:!1}),[p,z]=B.useState(!1),[O,M]=B.useState({}),[_,q]=B.useState(null),[Q,E]=B.useState(!1),[I,se]=B.useState(!1),[he,pe]=B.useState("deck"),G=P.data?pt(P.data):[],Oe=y=>G.find(U=>U.name===y)?.value,H=y=>O[y.name]??y.value,ie=Ds(G),xe=G.filter(y=>y.kind==="font"),ge=G.filter(y=>y.kind==="type"),N=G.filter(y=>y.kind==="space"),K=G.filter(y=>y.kind==="radius"),re=G.filter(y=>y.kind==="shadow"),Nt=G.filter(y=>y.kind==="motion"),St=G.filter(y=>y.kind==="other"),J=(y,U)=>M(ve=>({...ve,[y]:U})),be=C&&he==="deck",Ee=_??F.data??"",Ae=Object.entries(O).filter(([y,U])=>Oe(y)!==U),Ge=_!==null&&_!==(F.data??""),$t=Ae.length>0||Ge;function Ct(){M({}),q(null),z(!1)}async function Dt(){E(!0);try{if(Ae.length>0){let y=P.data??"";for(const[U,ve]of Ae)y=Ts(y,U,ve);await f.mutateAsync({path:`${a}/tokens.css`,body:y,contentType:"text/css; charset=utf-8"}),d.invalidateQueries({queryKey:L.fileText(S)})}Ge&&_!==null&&(await f.mutateAsync({path:`${a}/brand.md`,body:_,contentType:"text/markdown; charset=utf-8"}),d.invalidateQueries({queryKey:L.fileText(D)})),d.invalidateQueries({queryKey:L.orgFsVolume(i.id,r)}),d.invalidateQueries({queryKey:L.orgFsRecent(i.id)}),M({}),q(null),z(!1),W.success("Brand saved")}catch(y){W.error(y instanceof Error?y.message:"Failed to save brand")}finally{E(!1)}}async function Tt(y){const U=y?.[0];if(!U)return;const Qe=`logo.${(U.name.split(".").pop()??"png").toLowerCase()}`;try{await m.mutateAsync({dir:a,files:[new File([U],Qe,{type:U.type})]}),k&&A(k)!==Qe&&await h.mutateAsync(k),W.success("Logo updated")}catch(We){W.error(We instanceof Error?We.message:"Logo upload failed")}finally{x.current&&(x.current.value="")}}const zt=!b.isPending&&!g&&!w&&!k;return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(je,{size:18})}),l==="dialog"?t.jsx(qe,{className:"flex-1 truncate text-base font-medium text-foreground",children:c}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:c}),!o&&(p?t.jsxs(t.Fragment,{children:[t.jsx(R,{variant:"ghost",size:"sm",onClick:Ct,disabled:Q,children:"Cancel"}),t.jsx(R,{size:"sm",disabled:!$t||Q,onClick:()=>{Dt()},children:Q?"Saving…":"Save"})]}):t.jsxs(R,{variant:"outline",size:"sm",onClick:()=>z(!0),children:[t.jsx(At,{size:14}),"Edit"]})),l==="dialog"?t.jsx(ct,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ke,{size:16})})}):t.jsx(R,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:e,children:t.jsx(ke,{size:16})})]}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:b.isPending?t.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[t.jsx(V,{className:"h-40 w-full rounded-xl"}),t.jsx(V,{className:"h-4 w-1/3"}),t.jsx(V,{className:"h-4 w-2/3"})]}):zt?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This brand is no longer available."}):t.jsxs(t.Fragment,{children:[(C||g)&&t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{role:"button",tabIndex:0,"aria-label":I?"Show preview":"Hide preview",onClick:()=>se(y=>!y),onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.preventDefault(),se(U=>!U))},className:"flex cursor-pointer items-center justify-between gap-2 px-4 py-2.5 hover:bg-muted/40",children:[t.jsxs("div",{className:"flex gap-0.5 rounded-lg bg-muted p-0.5 text-xs font-medium",onClick:y=>y.stopPropagation(),children:[C&&t.jsx("button",{type:"button",onClick:()=>{pe("deck"),se(!1)},className:Z("rounded-md px-2.5 py-1",be?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Deck"}),t.jsx("button",{type:"button",onClick:()=>{pe("components"),se(!1)},className:Z("rounded-md px-2.5 py-1",be?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm"),children:"Components"})]}),I?t.jsx(hs,{size:16,className:"shrink-0 text-muted-foreground"}):t.jsx(ps,{size:16,className:"shrink-0 text-muted-foreground"})]}),!I&&t.jsx("div",{className:"px-4 pb-4",children:t.jsx("div",{className:Z("w-full overflow-hidden rounded-xl border border-border bg-muted/30",be?"aspect-[16/9]":"h-96"),children:be?t.jsx(ul,{readUrl:T,title:`${c} deck theme`,tokensUrl:S}):t.jsx(ol,{tokensUrl:S})})})]}),t.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 overflow-y-auto p-6",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(oe,{children:"Logo"}),t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx("div",{className:"flex size-24 items-center justify-center overflow-hidden rounded-xl border border-border bg-muted/30",children:k?t.jsx("img",{src:u(r,k),alt:`${c} logo`,className:"max-h-full max-w-full object-contain"}):t.jsx(je,{size:28,className:"text-muted-foreground/50"})}),p&&t.jsxs("div",{children:[t.jsxs(R,{variant:"outline",size:"sm",disabled:m.isPending,onClick:()=>x.current?.click(),children:[t.jsx(ye,{size:14}),k?"Replace logo":"Add logo"]}),t.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:y=>{Tt(y.target.files)}})]})]})]}),ie.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(oe,{children:"Colors"}),ie.map(y=>t.jsx(ml,{family:y.family,tokens:y.tokens,editing:p,valueOf:H,onEdit:J},y.family))]}),(xe.length>0||ge.length>0)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(oe,{children:"Typography"}),xe.map(y=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:y.name.replace(/^--brand-font-?/,"")||"font"}),p?t.jsx(we,{value:H(y),onChange:U=>J(y.name,U.target.value),className:"h-9"}):t.jsx("span",{className:"truncate text-lg text-foreground",style:{fontFamily:H(y)},children:H(y)})]},y.name)),ge.map(y=>t.jsx(vt,{token:y,value:H(y),editing:p,onEdit:J},y.name))]}),t.jsx(ae,{label:"Spacing",tokens:N,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Radius",tokens:K,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Shadows",tokens:re,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Motion",tokens:Nt,editing:p,valueOf:H,onEdit:J}),t.jsx(ae,{label:"Tokens",tokens:St,editing:p,valueOf:H,onEdit:J}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(oe,{children:"Voice & guidelines"}),p?t.jsx(ms,{value:Ee,onChange:y=>q(y.target.value),placeholder:"Describe the brand voice, tone, do's and don'ts…",className:"min-h-48 font-mono text-sm"}):F.isPending&&w?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(V,{className:"h-3 w-full"}),t.jsx(V,{className:"h-3 w-5/6"})]}):Ee.trim()?t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:t.jsx(ft,{id:`brand-preview-${s}`,text:Ee})}):t.jsx("p",{className:"text-sm text-muted-foreground",children:"No brand voice written yet."})]})]})]})})]})}function pl(s){const e=$.c(8),{brandPath:l,onClose:i}=s;let n;e[0]!==i?(n=c=>{c||i()},e[0]=i,e[1]=n):n=e[1];let r;e[2]!==l||e[3]!==i?(r=t.jsx(Re,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-2xl!",closeButtonClassName:"hidden",children:t.jsx(jt,{brandPath:l,onClose:i,variant:"dialog"})}),e[2]=l,e[3]=i,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==r?(a=t.jsx(_e,{open:!0,onOpenChange:n,children:r}),e[5]=n,e[6]=r,e[7]=a):a=e[7],a}function xl(s){const e=$.c(3),{brandPath:l,onClose:i}=s;let n;return e[0]!==l||e[1]!==i?(n=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(jt,{brandPath:l,onClose:i,variant:"panel"})}),e[0]=l,e[1]=i,e[2]=n):n=e[2],n}function yt(s){const e=$.c(23),{skillPath:l,onClose:i,variant:n}=s,r=Ie(l),{volume:a,dirPath:c}=r,o=de(),d=o(a??"",`${c}/SKILL.md`),u=L.fileText(d);let f;e[0]!==d?(f=async()=>{const E=await fetch(d,{credentials:"include"});if(!E.ok)throw new Error(`fetch failed: ${E.status}`);return E.text()},e[0]=d,e[1]=f):f=e[1];let m;e[2]!==u||e[3]!==f?(m={queryKey:u,queryFn:f,staleTime:6e4,retry:!1},e[2]=u,e[3]=f,e[4]=m):m=e[4];const h=Y(m),x=Ke(a??"",c);let b;e[5]!==c?(b=A(c),e[5]=c,e[6]=b):b=e[6];const j=b;let v;e[7]!==h.data?(v=h.data?xt(h.data):null,e[7]=h.data,e[8]=v):v=e[8];const g=v,w=bl;let C;e[9]===Symbol.for("react.memo_cache_sentinel")?(C=(E,I)=>w(E.path)?-1:w(I.path)?1:A(E.path).localeCompare(A(I.path)),e[9]=C):C=e[9];const k=(x.data??[]).filter(gl).sort(C),[S,D]=B.useState(null),T=S===null?null:k.find(E=>E.path===S)??null,P=g?.name??j;let F;e[10]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(Le,{size:18})}),e[10]=F):F=e[10];let p;e[11]!==P||e[12]!==n?(p=n==="dialog"?t.jsx(qe,{className:"flex-1 truncate text-base font-medium text-foreground",children:P}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:P}),e[11]=P,e[12]=n,e[13]=p):p=e[13];let z;e[14]!==i||e[15]!==n?(z=n==="dialog"?t.jsx(ct,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ke,{size:16})})}):t.jsx(R,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:i,children:t.jsx(ke,{size:16})}),e[14]=i,e[15]=n,e[16]=z):z=e[16];let O;e[17]!==p||e[18]!==z?(O=t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[F,p,z]}),e[17]=p,e[18]=z,e[19]=O):O=e[19];let M;e[20]===Symbol.for("react.memo_cache_sentinel")?(M=t.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[20]=M):M=e[20];const _="relative flex min-w-0 flex-1 flex-col overflow-y-auto",q=T?t.jsx(Jt,{file:{key:T.path,filename:A(T.path),size:T.size,downloadUrl:o(a??"",T.path)}}):h.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(V,{className:"h-4 w-1/3"}),t.jsx(V,{className:"h-3 w-full"}),t.jsx(V,{className:"h-3 w-5/6"}),t.jsx(V,{className:"h-3 w-2/3"})]}):h.isError||!g?t.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:"This skill is no longer available."}):t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"flex flex-col gap-4 border-b border-border p-6",children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Description"}),t.jsx("p",{className:"text-base text-muted-foreground",children:g.description??"Claude Code skill"})]}),t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:t.jsx(ft,{id:`skill-preview-${l}`,text:g.body})})]});let Q;return e[21]!==q?(Q=t.jsx("div",{className:_,children:q}),e[21]=q,e[22]=Q):Q=e[22],t.jsxs(t.Fragment,{children:[O,t.jsxs("div",{className:"flex min-h-0 flex-1",children:[t.jsxs("div",{className:"flex w-[220px] shrink-0 flex-col gap-1 overflow-y-auto border-r border-border bg-muted p-3",children:[M,x.isPending?t.jsx(V,{className:"mx-2 h-4 w-24"}):k.map(E=>{const I=w(E.path)?T===null:S===E.path;return t.jsxs("button",{type:"button",onClick:()=>D(w(E.path)?null:E.path),className:Z("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",I?"bg-background shadow-sm":"hover:bg-muted/60"),children:[t.jsx(ne,{filename:A(E.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:Z("truncate text-sm",I?"text-foreground":"text-muted-foreground"),children:A(E.path)})]},E.path)})]}),Q]})]})}function gl(s){return s.kind==="file"}function bl(s){return A(s)==="SKILL.md"}function vl(s){const e=$.c(8),{skillPath:l,onClose:i}=s;let n;e[0]!==i?(n=c=>{c||i()},e[0]=i,e[1]=n):n=e[1];let r;e[2]!==i||e[3]!==l?(r=t.jsx(Re,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",closeButtonClassName:"hidden",children:t.jsx(yt,{skillPath:l,onClose:i,variant:"dialog"})}),e[2]=i,e[3]=l,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==r?(a=t.jsx(_e,{open:!0,onOpenChange:n,children:r}),e[5]=n,e[6]=r,e[7]=a):a=e[7],a}function jl(s){const e=$.c(3),{skillPath:l,onClose:i}=s;let n;return e[0]!==i||e[1]!==l?(n=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(yt,{skillPath:l,onClose:i,variant:"panel"})}),e[0]=i,e[1]=l,e[2]=n):n=e[2],n}function He(s){return`${window.location.origin}${s}`}function ce(s){if(s.shareMode==="password")return"password";if(s.shareMode==="public"||s.readPublic)return"public";if(s.effectivePublic)return"inherited"}const wt=[{id:"home",description:"Your organization's home folder",glyph:Mt},{id:"uploads",description:"Files your team uploads",glyph:ye},{id:"outputs",description:"Agent run outputs",glyph:Lt}],yl=6;function kt(s,e,l){const i=e.includes("/")?e.slice(0,e.lastIndexOf("/")):"",n=ut(s),r=n?`public/${n}`:s==="home"?ht(l):s;return i?`${r}/${i}`:r}function ee(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=t.jsx("p",{className:"text-[13px] text-foreground",children:l}),e[0]=l,e[1]=i):i=e[1],i}function X(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=t.jsx("div",{className:"@container",children:t.jsx("div",{className:"grid grid-cols-1 gap-3 @[440px]:grid-cols-2 @[660px]:grid-cols-3",children:l})}),e[0]=l,e[1]=i):i=e[1],i}function Pe(s){const e=$.c(2),{rows:l}=s,i=l===void 0?1:l;let n;return e[0]!==i?(n=t.jsx(X,{children:Array.from({length:i*3},wl)}),e[0]=i,e[1]=n):n=e[1],n}function wl(s,e){return t.jsx(V,{className:"h-16 rounded-2xl"},e)}function Fe(s){const e=$.c(2),{children:l}=s;let i;return e[0]!==l?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:l}),e[0]=l,e[1]=i):i=e[1],i}function kl(s){const e=$.c(6),{volume:l,displayName:i,description:n,glyph:r,onOpen:a}=s,c=fs(l),o=i??l,d=c.data?`${c.data.files} files`:void 0;let u;return e[0]!==n||e[1]!==r||e[2]!==a||e[3]!==o||e[4]!==d?(u=t.jsx(ze,{name:o,meta:d,subtitle:n,glyph:r,onOpen:a}),e[0]=n,e[1]=r,e[2]=a,e[3]=o,e[4]=d,e[5]=u):u=e[5],u}function Nl(s){const e=$.c(8),{segments:l,onNavigate:i}=s;let n;e[0]!==i?(n=t.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(""),children:"Library"}),e[0]=i,e[1]=n):n=e[1];let r;e[2]!==i||e[3]!==l?(r=l.map((c,o)=>{const d=l.slice(0,o+1).join("/"),u=o===l.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(Ft,{size:12,className:"shrink-0 text-muted-foreground"}),u?t.jsx("span",{className:"truncate font-medium text-foreground",children:c}):t.jsx("button",{type:"button",className:"truncate text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(d),children:c})]},d)}),e[2]=i,e[3]=l,e[4]=r):r=e[4];let a;return e[5]!==n||e[6]!==r?(a=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[n,r]}),e[5]=n,e[6]=r,e[7]=a):a=e[7],a}function Sl(s){const e=$.c(32),{query:l,stale:i,onOpenFile:n,onShare:r,onDelete:a}=s,{org:c}=Ne(),o=de(),d=cs(l);let u;e[0]!==o||e[1]!==r?(u=k=>r({volume:k.volume,path:k.path,kind:"file",shareMode:k.shareMode??"private",effectivePublic:k.effectivePublic??!1,url:He(o(k.volume,k.path))}),e[0]=o,e[1]=r,e[2]=u):u=e[2];const f=u;if(d.isPending){let k;return e[3]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Pe,{rows:2}),e[3]=k):k=e[3],k}let m;e[4]!==d.data?(m=d.data??[],e[4]=d.data,e[5]=m):m=e[5];const h=m;if(h.length===0){let k;return e[6]!==l?(k=t.jsxs(Fe,{children:["No files match “",l,"”."]}),e[6]=l,e[7]=k):k=e[7],k}const x=(i||d.isPlaceholderData)&&"opacity-50";let b;e[8]!==x?(b=Z("flex flex-col gap-3",x),e[8]=x,e[9]=b):b=e[9];const j=h.length===1?"result":"results";let v;e[10]!==h.length||e[11]!==j?(v=t.jsxs(ee,{children:[h.length," ",j]}),e[10]=h.length,e[11]=j,e[12]=v):v=e[12];let g;if(e[13]!==o||e[14]!==a||e[15]!==n||e[16]!==c||e[17]!==h||e[18]!==f){let k;e[20]!==o||e[21]!==a||e[22]!==n||e[23]!==c||e[24]!==f?(k=S=>{const D=ut(S.volume)!==null;return t.jsx(bt,{filename:A(S.path),updatedAt:S.updatedAt,downloadUrl:o(S.volume,S.path),subtitle:kt(S.volume,S.path,c.slug),publicState:ce(S),onOpen:()=>n(rs(S.volume,S.path)),onShare:D?void 0:()=>f(S),onDelete:D?void 0:()=>a({volume:S.volume,path:S.path,kind:"file"})},`${S.volume}/${S.path}`)},e[20]=o,e[21]=a,e[22]=n,e[23]=c,e[24]=f,e[25]=k):k=e[25],g=h.map(k),e[13]=o,e[14]=a,e[15]=n,e[16]=c,e[17]=h,e[18]=f,e[19]=g}else g=e[19];let w;e[26]!==g?(w=t.jsx(X,{children:g}),e[26]=g,e[27]=w):w=e[27];let C;return e[28]!==b||e[29]!==v||e[30]!==w?(C=t.jsxs("div",{className:b,children:[v,w]}),e[28]=b,e[29]=v,e[30]=w,e[31]=C):C=e[31],C}function $l(s){const e=$.c(24),{onOpenDir:l,onOpenFile:i,onShare:n,onDelete:r}=s,{org:a}=Ne(),c=ds(),o=mt(),d=de();let u;e[0]!==d||e[1]!==n?(u=g=>n({volume:g.volume,path:g.path,kind:"file",shareMode:g.shareMode??"private",effectivePublic:g.effectivePublic??!1,url:He(d(g.volume,g.path))}),e[0]=d,e[1]=n,e[2]=u):u=e[2];const f=u;let m;if(e[3]!==d||e[4]!==r||e[5]!==i||e[6]!==a||e[7]!==c.data||e[8]!==c.isPending||e[9]!==f){const g=(c.data??[]).slice(0,yl);m=c.isPending?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Recently added"}),t.jsx(Pe,{})]}):g.length>0?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Recently added"}),t.jsx(X,{children:g.map(w=>t.jsx(ll,{filename:A(w.path),updatedAt:w.updatedAt,size:w.size,downloadUrl:d(w.volume,w.path),subtitle:kt(w.volume,w.path,a.slug),publicState:ce(w),onOpen:()=>i(`${w.volume}/${w.path}`),onShare:()=>f(w),onDelete:()=>r({volume:w.volume,path:w.path,kind:"file"})},`${w.volume}/${w.path}`))})]}):t.jsx(Fe,{children:"No files yet — upload one, or ask an agent to produce something."}),e[3]=d,e[4]=r,e[5]=i,e[6]=a,e[7]=c.data,e[8]=c.isPending,e[9]=f,e[10]=m}else m=e[10];let h;e[11]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx(ee,{children:"Folders"}),e[11]=h):h=e[11];let x;e[12]!==l||e[13]!==a?(x=wt.map(g=>t.jsx(kl,{volume:g.id,displayName:g.id==="home"?ht(a.slug):void 0,description:g.description,glyph:g.glyph,onOpen:()=>l(g.id)},g.id)),e[12]=l,e[13]=a,e[14]=x):x=e[14];let b;e[15]!==l||e[16]!==o.data?.length?(b=(o.data?.length??0)>0&&t.jsx(ze,{name:"public",meta:`${o.data?.length} sets`,subtitle:"Curated skill sets — read-only",glyph:rt,readOnly:!0,onOpen:()=>l("public")}),e[15]=l,e[16]=o.data?.length,e[17]=b):b=e[17];let j;e[18]!==x||e[19]!==b?(j=t.jsxs("div",{className:"flex flex-col gap-3",children:[h,t.jsxs(X,{children:[x,b]})]}),e[18]=x,e[19]=b,e[20]=j):j=e[20];let v;return e[21]!==m||e[22]!==j?(v=t.jsxs(t.Fragment,{children:[m,j]}),e[21]=m,e[22]=j,e[23]=v):v=e[23],v}function Cl(s){const e=$.c(11),{onOpenDir:l}=s,i=mt();if(i.isPending){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Pe,{}),e[0]=o):o=e[0],o}let n;e[1]!==i.data?(n=i.data??[],e[1]=i.data,e[2]=n):n=e[2];const r=n;if(r.length===0){let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Fe,{children:"No public skill sets are configured."}),e[3]=o):o=e[3],o}let a;if(e[4]!==l||e[5]!==r){let o;e[7]!==l?(o=d=>t.jsx(ze,{name:d,subtitle:"Read-only",readOnly:!0,onOpen:()=>l(`public/${d}`)},d),e[7]=l,e[8]=o):o=e[8],a=r.map(o),e[4]=l,e[5]=r,e[6]=a}else a=e[6];let c;return e[9]!==a?(c=t.jsx(X,{children:a}),e[9]=a,e[10]=c):c=e[10],c}function Dl(s){const e=$.c(34),{location:l,onOpenDir:i,onOpenFile:n,onOpenSkill:r,onOpenBrand:a,onShare:c,onDelete:o}=s,d=l.volume??"",u=Ke(d,l.dirPath),f=de();if(u.isPending){let g;return e[0]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Pe,{rows:2}),e[0]=g):g=e[0],g}if(u.isError){const g=u.error instanceof Error?u.error.message:"Failed to load";let w;return e[1]!==g?(w=t.jsx("p",{className:"text-sm text-destructive",children:g}),e[1]=g,e[2]=w):w=e[2],w}let m,h,x,b,j;if(e[3]!==f||e[4]!==u.data||e[5]!==l||e[6]!==o||e[7]!==a||e[8]!==i||e[9]!==n||e[10]!==r||e[11]!==c||e[12]!==d){j=Symbol.for("react.early_return_sentinel");e:{const g=u.data??[],w=g.filter(Fl),C=g.filter(Pl),k=g.filter(zl),S=g.filter(Tl);if(g.length===0){const p=l.readOnly?"Empty — this read-only set syncs from its GitHub source.":"Empty folder — upload a file or create a folder to get started.";let z;e[18]!==p?(z=t.jsx(Fe,{children:p}),e[18]=p,e[19]=z):z=e[19],j=z;break e}let D;e[20]!==l.readOnly||e[21]!==o||e[22]!==d?(D=p=>l.readOnly?void 0:()=>o({volume:d,path:p.path,kind:p.kind}),e[20]=l.readOnly,e[21]=o,e[22]=d,e[23]=D):D=e[23];const T=D;let P;e[24]!==f||e[25]!==l.readOnly||e[26]!==c||e[27]!==d?(P=p=>l.readOnly?void 0:()=>c({volume:d,path:p.path,kind:p.kind,shareMode:p.shareMode??"private",effectivePublic:p.effectivePublic??!1,url:p.kind==="file"?He(f(d,p.path)):void 0}),e[24]=f,e[25]=l.readOnly,e[26]=c,e[27]=d,e[28]=P):P=e[28];const F=P;m=w.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Skills"}),t.jsx(X,{children:w.map(p=>t.jsx(Is,{dirName:A(p.path),updatedAt:p.updatedAt,skillMdUrl:f(d,`${p.path}/SKILL.md`),publicState:ce(p),onOpen:()=>r(le(l,p.path)),onBrowse:()=>i(le(l,p.path)),onShare:F(p),onDelete:T(p)},p.path))})]}),h=C.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Brands"}),t.jsx(X,{children:C.map(p=>t.jsx(Hs,{dirName:A(p.path),updatedAt:p.updatedAt,tokensUrl:f(d,`${p.path}/tokens.css`),onOpen:()=>a(le(l,p.path)),onBrowse:()=>i(le(l,p.path)),onDelete:T(p)},p.path))})]}),x=k.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Folders"}),t.jsx(X,{children:k.map(p=>t.jsx(ze,{name:A(p.path),meta:fe(p.updatedAt),readOnly:l.readOnly,publicState:ce(p),onOpen:()=>i(le(l,p.path)),onShare:F(p),onDelete:T(p)},p.path))})]}),b=S.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ee,{children:"Files"}),t.jsx(X,{children:S.map(p=>t.jsx(bt,{filename:A(p.path),updatedAt:p.updatedAt,downloadUrl:f(d,p.path),publicState:ce(p),onOpen:()=>n(le(l,p.path)),onShare:F(p),onDelete:T(p)},p.path))})]})}e[3]=f,e[4]=u.data,e[5]=l,e[6]=o,e[7]=a,e[8]=i,e[9]=n,e[10]=r,e[11]=c,e[12]=d,e[13]=m,e[14]=h,e[15]=x,e[16]=b,e[17]=j}else m=e[13],h=e[14],x=e[15],b=e[16],j=e[17];if(j!==Symbol.for("react.early_return_sentinel"))return j;let v;return e[29]!==m||e[30]!==h||e[31]!==x||e[32]!==b?(v=t.jsxs(t.Fragment,{children:[m,h,x,b]}),e[29]=m,e[30]=h,e[31]=x,e[32]=b,e[33]=v):v=e[33],v}function Tl(s){return s.kind==="file"}function zl(s){return s.kind==="dir"&&!s.hasSkill&&!s.hasBrand}function Pl(s){return s.kind==="dir"&&s.hasBrand&&!s.hasSkill}function Fl(s){return s.kind==="dir"&&s.hasSkill}function tt(){const{org:s}=Ne(),e=st(),l=lt(),i=ot(),n=nt({strict:!1}),r=n.path??"",a=Ie(r),c=a.segments.length===0,o=(N,K)=>l({to:".",search:re=>({...re,[N]:K||void 0})}),d=N=>o("path",N),u=(N,K)=>l({to:".",search:re=>({...re,preview:void 0,skill:void 0,brand:void 0,[N]:K})}),f=N=>u("preview",N),m=N=>u("skill",N),h=N=>u("brand",N),[x,b]=B.useState(""),j=as(x.trim(),300),[v,g]=B.useState(null),[w,C]=B.useState(null),[k,S]=B.useState(!1),[D,T]=B.useState(""),P=B.useRef(null),[F,p]=B.useState(!1),z=B.useRef(0),O=a.readOnly?null:a.volume??"uploads",M=a.volume?a.dirPath:"",{upload:_,mkdir:q}=Be(O??"uploads"),{remove:Q}=Be(v?.volume??"uploads");async function E(N){if(!(!O||!N||N.length===0))try{await _.mutateAsync({dir:M,files:[...N]}),W.success(N.length===1?`Uploaded ${N[0]?.name}`:`Uploaded ${N.length} files`)}catch(K){W.error(K instanceof Error?K.message:"Upload failed")}finally{P.current&&(P.current.value="")}}const I=O!==null,se=c?"uploads":a.segments.at(-1)??"this folder";function he(N){return N.dataTransfer.types.includes("Files")}function pe(N){!I||!he(N)||(N.preventDefault(),z.current+=1,p(!0))}function G(N){!I||!he(N)||N.preventDefault()}function Oe(){I&&(z.current=Math.max(0,z.current-1),z.current===0&&p(!1))}function H(N){I&&(N.preventDefault(),z.current=0,p(!1),N.dataTransfer.files.length>0&&E(N.dataTransfer.files))}async function ie(){const N=D.trim();if(!(!O||!N))try{await q.mutateAsync(M?`${M}/${N}`:N),W.success(`Folder "${N}" created`),S(!1),T("")}catch(K){W.error(K instanceof Error?K.message:"Failed to create folder")}}async function xe(){if(!v)return;const N=v;try{await Q.mutateAsync(N.path),W.success(`Deleted ${A(N.path)}`)}catch(K){W.error(K instanceof Error?K.message:"Delete failed")}finally{g(null)}}function ge(){for(const N of wt)e.invalidateQueries({queryKey:L.orgFsVolume(s.id,N.id)});a.volume&&e.invalidateQueries({queryKey:L.orgFsVolume(s.id,a.volume)}),e.invalidateQueries({queryKey:L.orgFsRecent(s.id)}),e.invalidateQueries({queryKey:L.orgFsSearchRoot(s.id)}),e.invalidateQueries({queryKey:L.orgFsPublicSets(s.id)})}return t.jsxs("div",{className:"relative h-full",onDragEnter:pe,onDragOver:G,onDragLeave:Oe,onDrop:H,children:[F&&t.jsx("div",{className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center bg-background/80 p-6 backdrop-blur-sm",children:t.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-2xl border-2 border-dashed border-primary px-10 py-8 text-center",children:[t.jsx(ye,{size:28,className:"text-primary"}),t.jsxs("p",{className:"text-sm font-medium text-foreground",children:["Drop to upload to ",se]})]})}),t.jsx("div",{className:"h-full overflow-y-auto",children:t.jsxs("div",{className:"mx-auto flex w-full max-w-[900px] flex-col gap-10 px-6 py-10 lg:px-10",children:[t.jsxs("div",{className:"flex flex-col gap-2",children:[!c&&t.jsx(Nl,{segments:a.segments,onNavigate:d}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("h1",{className:"min-w-0 flex-1 truncate text-xl font-medium text-foreground",children:c?"Library":a.segments.at(-1)??"Library"}),t.jsx(R,{variant:"ghost",size:"icon",onClick:ge,"aria-label":"Refresh",children:t.jsx(Pt,{size:14})}),!c&&O&&t.jsxs(R,{variant:"outline",size:"sm",onClick:()=>S(!0),children:[t.jsx(Ut,{size:14}),"New folder"]}),a.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(it,{size:12}),"Read-only"]}):t.jsxs(R,{size:"sm",disabled:_.isPending,onClick:()=>P.current?.click(),children:[t.jsx(ye,{size:14}),_.isPending?"Uploading…":"Upload file"]}),t.jsx("input",{ref:P,type:"file",multiple:!0,className:"hidden",onChange:N=>{E(N.target.files)}})]})]}),t.jsxs("div",{className:"relative",children:[t.jsx(Bt,{size:16,className:"pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted-foreground"}),t.jsx(we,{value:x,onChange:N=>b(N.target.value),onKeyDown:N=>{N.key==="Escape"&&b("")},placeholder:"Search all files…",className:"h-10 rounded-xl pr-9 pl-9"}),x&&t.jsx(R,{variant:"ghost",size:"icon",className:"absolute top-1/2 right-1.5 size-7 -translate-y-1/2",onClick:()=>b(""),"aria-label":"Clear search",children:t.jsx(Rt,{size:14})})]}),j?t.jsx(Sl,{query:j,stale:x.trim()!==j,onOpenFile:f,onShare:C,onDelete:g}):c?t.jsx($l,{onOpenDir:d,onOpenFile:f,onShare:C,onDelete:g}):a.volume===null?t.jsx(Cl,{onOpenDir:d}):t.jsx(Dl,{location:a,onOpenDir:d,onOpenFile:f,onOpenSkill:m,onOpenBrand:h,onShare:C,onDelete:g},a.volume)]})}),i&&(n.preview?t.jsx(ns,{previewPath:n.preview,onClose:()=>o("preview",null)}):n.skill?t.jsx(vl,{skillPath:n.skill,onClose:()=>o("skill",null)},n.skill):n.brand?t.jsx(pl,{brandPath:n.brand,onClose:()=>o("brand",null)},n.brand):null),t.jsx(_e,{open:k,onOpenChange:S,children:t.jsxs(Re,{children:[t.jsxs(Wt,{children:[t.jsx(qe,{children:"New folder"}),t.jsxs(Yt,{children:["Create a folder in ",r||"the library","."]})]}),t.jsx(we,{autoFocus:!0,placeholder:"folder-name",value:D,onChange:N=>T(N.target.value),onKeyDown:N=>{N.key==="Enter"&&ie()}}),t.jsxs(Xt,{children:[t.jsx(R,{variant:"outline",onClick:()=>S(!1),children:"Cancel"}),t.jsx(R,{disabled:!D.trim()||q.isPending,onClick:()=>{ie()},children:"Create"})]})]})}),t.jsx(is,{target:w,onOpenChange:N=>{N||C(null)}}),t.jsx(_t,{open:v!==null,onOpenChange:N=>{N||g(null)},children:t.jsxs(qt,{children:[t.jsxs(It,{children:[t.jsxs(Kt,{children:["Delete ",v?A(v.path):"","?"]}),t.jsx(Vt,{children:v?.kind==="dir"?"The folder and everything inside it will be deleted for the whole organization. Sandboxes see this change within seconds.":"The file will be deleted for the whole organization. Sandboxes see this change within seconds."})]}),t.jsxs(Ht,{children:[t.jsx(Gt,{children:"Cancel"}),t.jsx(Qt,{onClick:()=>{xe()},children:"Delete"})]})]})})]})}function gn(){const s=$.c(12),e=ot(),l=lt();let i;s[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},s[0]=i):i=s[0];const n=nt(i);let r;s[1]!==l?(r=d=>l({to:".",search:u=>({...u,[d]:void 0})}),s[1]=l,s[2]=r):r=s[2];const a=r;let c,o;if(s[3]!==a||s[4]!==e||s[5]!==n.brand||s[6]!==n.preview||s[7]!==n.skill){o=Symbol.for("react.early_return_sentinel");e:{const d=n.preview?{key:"preview",path:n.preview,panel:t.jsx(es,{previewPath:n.preview,onClose:()=>a("preview")})}:n.skill?{key:"skill",path:n.skill,panel:t.jsx(jl,{skillPath:n.skill,onClose:()=>a("skill")},n.skill)}:n.brand?{key:"brand",path:n.brand,panel:t.jsx(xl,{brandPath:n.brand,onClose:()=>a("brand")},n.brand)}:null;if(e){let f;s[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-hidden bg-background",children:t.jsx(Me,{children:t.jsx(tt,{})})}),s[10]=f):f=s[10],o=f;break e}let u;s[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ye,{order:1,minSize:30,defaultSize:55,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(Me,{children:t.jsx(tt,{})})})})}),s[11]=u):u=s[11],c=t.jsxs(ts,{direction:"horizontal",className:"min-h-0 flex-1 pt-0 pr-1 pb-1 pl-0",children:[u,d&&t.jsxs(t.Fragment,{children:[t.jsx(Zt.Tabs,{children:t.jsx(ss,{title:A(d.path),icon:{kind:"component",Component:f=>d.key==="preview"?t.jsx(ne,{filename:A(d.path),...f}):d.key==="skill"?t.jsx(Le,{...f}):t.jsx(je,{...f})},active:!0,onClick:()=>a(d.key)})}),t.jsx(ls,{className:"bg-sidebar"}),t.jsx(Ye,{order:2,minSize:25,defaultSize:45,children:t.jsx("div",{className:"h-full p-0.5 pt-0.25",children:t.jsx("div",{className:"card-shadow flex h-full flex-col overflow-hidden rounded-[0.75rem] bg-background",children:t.jsx(Me,{children:d.panel})})})})]})]})}s[3]=a,s[4]=e,s[5]=n.brand,s[6]=n.preview,s[7]=n.skill,s[8]=c,s[9]=o}else c=s[8],o=s[9];return o!==Symbol.for("react.early_return_sentinel")?o:c}export{gn as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as it,r as E,j as e,i as rt}from"./index-5MyNR89x.js";import{S as mt,b as pt,c as st,d as at}from"./sheet-M6dgbK60.js";import{S as nt}from"./scroll-area-DLqMfi_N.js";import{r as lt,c as ct,u as dt,a as St,i as ft,f as ut,d as vt,P as ht,S as gt}from"./page-seo-form-CcZ53r1B.js";import{p as xt}from"./index-BWMRVcd2.js";import"./X-DlUiLOPC.js";import"./agent-icon-CCm6veEh.js";import"./AlertCircle-B4WPpzHx.js";import"./Tool01-DFCFgRlB.js";import"./SwitchHorizontal01-BcqnyefE.js";import"./Settings02-CuT9JazG.js";import"./XCircle-BIxZfFEg.js";import"./ArrowUpRight-n7J2ORua.js";import"./ZapSquare-qeizwUPq.js";import"./Users03-DBa0-LbB.js";import"./CheckCircle-DGqDWZvl.js";import"./ChevronUp-CtzC0jb0.js";import"./ChevronDown-BzkFMF52.js";import"./ChevronLeft-B-p3uhTp.js";import"./ChevronRight-BhZIqa2P.js";import"./DotsVertical-DskMPw9G.js";import"./Stars02-Call5O4Q.js";import"./Eye-Bkw15G1G.js";import"./ZoomOut-fkR_2hFy.js";import"./Globe01-CIvUZBh0.js";import"./FilterLines-CTiCp3St.js";import"./Star01-BMttIRxb.js";import"./Globe04-By_qGXm-.js";import"./HardDrive-Da-ea-EW.js";import"./Key01-DugFMT5_.js";import"./LayoutLeft-DiQ60pSu.js";import"./LinkExternal01-BMDEbMBF.js";import"./Monitor01-BFD-ivVa.js";import"./Sun-B0JI-Irq.js";import"./Palette-DrmZY9bB.js";import"./Play-CiiKZLoa.js";import"./Plus-hFZ_SbzL.js";import"./SearchLg-D4Hs4YLQ.js";import"./SearchMd-RBoojwOu.js";import"./Shield01-D5Fc_Ylv.js";import"./Stars01-HANlppqn.js";import"./Trash01-CGEeRKCz.js";import"./Upload01-V0qkIpRk.js";import"./User01-Co_ACiCO.js";import"./Users01-B-VpMOmx.js";import"./XClose-CEJj7vhn.js";import"./Zap-USVmT42t.js";import"./use-clock-tick-CJO5qoT7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-WaepYGtr.js";import"./tooltip-DvT2WKW9.js";import"./file-type-icon-W_AZRfzL.js";import"./dialog-B2cGEuOv.js";import"./use-mobile-lIIxFH5C.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-U3TqUYrY.js";import"./use-mcp-client-CherrXvD.js";import"./auth-CNqDC7uO.js";import"./chat-context-B5uEh4ay.js";import"./hooks-DgSrpwcx.js";import"./decopilot-sse-pool-DoJkdYBA.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-virtual-mcp-C5pbd140.js";import"./use-collections-DAKL2YGx.js";import"./use-ai-providers-D4m0Vu5Q.js";import"./studio-tools-4NjxmaVZ.js";import"./use-decopilot-events-BDkaUhLT.js";import"./use-organization-settings-CZfEdu0P.js";import"./shell-layout-CnTaR8UN.js";import"./avatar-Jhd31ejW.js";import"./required-auth-layout-CZqB7vUr.js";import"./use-org-sso-BxzKK5rO.js";import"./integration-icon-CMGCCNyJ.js";import"./use-navigate-to-agent-BtVHPn7N.js";import"./use-connection-BvgL1-Da.js";import"./use-mcp-prompts-BnOdccbh.js";import"./form-DI8q6OtF.js";import"./label-Bj7qsNrz.js";import"./input-D9aeO8wK.js";import"./select-CZgnwyj0.js";import"./switch-DLNzAYS1.js";import"./index-BFW_K0gJ.js";import"./drawer-Tv6bcT7w.js";import"./collection-search-CN9TCItb.js";import"./tabs-8VxbUDVb.js";import"./toggle-group-CndOAl-N.js";import"./sortable.esm-D8GIYMew.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BswtsnGE.js";import"./use-registry-connections-C_VqH6te.js";import"./useInfiniteQuery-_sl5B1oR.js";import"./use-infinite-scroll-4tV6tFjB.js";import"./extract-connection-data-CxK1dunT.js";import"./card-D3bKVB8y.js";import"./collection-tabs-D5o6VjHd.js";import"./badge-cxwmW2xd.js";import"./textarea-Bwn2Wdf8.js";import"./connection-form-helpers-JfkHcTGO.js";import"./authenticate-and-persist-oauth-Dy2XeMqO.js";import"./mcp-oauth-DEfvhjPc.js";import"./useSuspenseInfiniteQuery-_eC9d3ii.js";import"./connect-desktop-dialog-DchtPbuP.js";import"./decopilot-CfDwLIyX.js";import"./checkbox-PMXW46HN.js";import"./skeleton-DoPnd-4p.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Br7JxQz6.js";import"./popover-DowpnV25.js";import"./command-D-t5bmXW.js";import"./index-BD4HYlEX.js";import"./use-org-fs-D-40uH2W.js";import"./dropdown-menu-Dw-pnYXI.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CWHPQWBO.js";import"./empty-state-D7nJB9UW.js";import"./toolbar-ClL4Dhs_.js";import"./preview-dialog-CwTtT7qa.js";import"./index-BgPTCVWL.js";import"./use-mcp-tools-w6KwNDra.js";import"./use-capability-CQPMPR-5.js";import"./shell-route-loading-DFu6UBUI.js";import"./tools-list-DL7ip2gg.js";import"./alert-dialog-BZ8TrIVu.js";import"./use-debounced-autosave-mA5Fw-09.js";import"./index-CshxsRNd.js";import"./sidebar-oYab2QX7.js";import"./search-input-BXzntIcj.js";import"./github-repo-picker-M1TBbLot.js";import"./use-debounced-value-cQ7ZQKtl.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-Dn4coT0R.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./automation-runs-CXnAhWiY.js";import"./table-B06cGuvx.js";import"./use-members-ge80zFlj.js";import"./use-org-auth-client-Ctxe3HXF.js";import"./task-status-Cm29b2AK.js";import"./use-automations-ChKoVegP.js";import"./use-file-configs-Dfeoim5G.js";import"./monaco-editor-B3KzPr3D.js";import"./select-model-BLeb_gwV.js";import"./automation-list-row-DO51bU3z.js";function mi(u){const t=it.c(46),{open:N,onOpenChange:P,orgSlug:Q,virtualMcpId:U,branch:W,decofile:G,meta:s,target:m,onSaved:X}=u,o=lt(G,m,s),k=m.kind==="site"?"site":m.pageKey,[Y,Z]=E.useState(k),[tt,i]=E.useState(null),[J,g]=E.useState(void 0),[x,y]=E.useState(0);Y!==k&&(Z(k),i(null),g(void 0),y(wt));const{persistSeo:a,persistRawSeo:I,flush:K,isPending:D}=ct({orgSlug:Q,virtualMcpId:U,branch:W,target:m,resolved:o,onSaved:X}),w=m.kind==="page",ot=w?o?.rawSeoData:void 0,v=J!==void 0?J:ot,et=w?dt(v)??void 0:void 0,h=tt??et??o?.seoData??{},p=o?St(h,o):null,n=p&&(!w||ft(v))?xt(p,s):null,_=m.kind==="page"?ut(G,s)?.seoData??void 0:void 0;let j;t[0]!==s?(j=vt(s),t[0]=s,t[1]=j):j=t[1];const M=j;let R;t[2]!==a||t[3]!==o||t[4]!==i?(R=r=>{if(!o)return;const L=r;i(L),a(L)},t[2]=a,t[3]=o,t[4]=i,t[5]=R):R=t[5];const V=R;let F;t[6]!==K||t[7]!==P?(F=r=>{r||K(),P(r)},t[6]=K,t[7]=P,t[8]=F):F=t[8];const z=F,A=m.kind==="site"?"Site SEO":"Page SEO",T=w&&o,B=m.kind==="site"&&o&&n,H=m.kind==="site"?"No site-level SEO block found.":o?"SEO schema not found for this page.":"Could not load page SEO.";let C;t[9]!==i?(C=()=>i(null),t[9]=i,t[10]=C):C=t[10];const $=C;let O;t[11]!==y?(O=()=>y(yt),t[11]=y,t[12]=O):O=t[12];const q=O;let l;t[13]!==A?(l=e.jsx(mt,{className:"text-sm font-semibold",children:A}),t[13]=A,t[14]=l):l=t[14];let c;t[15]!==D?(c=D&&e.jsx(rt,{size:14,className:"animate-spin text-muted-foreground"}),t[15]=D,t[16]=c):c=t[16];let d;t[17]!==l||t[18]!==c?(d=e.jsxs(pt,{className:"px-4 py-3 border-b flex-row items-center justify-between space-y-0",children:[l,c]}),t[17]=l,t[18]=c,t[19]=d):d=t[19];let S;t[20]!==p||t[21]!==q||t[22]!==$||t[23]!==M||t[24]!==v||t[25]!==h||t[26]!==H||t[27]!==x||t[28]!==V||t[29]!==I||t[30]!==a||t[31]!==o||t[32]!==n||t[33]!==i||t[34]!==g||t[35]!==T||t[36]!==B||t[37]!==_?(S=!o||!T&&!B?e.jsx("div",{className:"flex h-full items-center justify-center text-sm text-muted-foreground",children:H}):e.jsx(nt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:e.jsx("div",{className:"px-6 py-4",children:e.jsx("div",{className:"mx-auto max-w-sm",children:T?e.jsx(ht,{rawSeo:v,innerSeo:h,defaultResolveType:M,seoSchema:n,activeResolveType:p,seoTypeOptions:o.seoTypeOptions,formResetKey:x,siteDefaultSeo:_,onPersistRaw:r=>{g(r),I(r)},onInnerChange:r=>{i(r),a(r)},onClearForm:$,onBumpFormKey:q}):n&&p&&e.jsx(gt,{schema:n,resolveType:p,value:h,formResetKey:x,onChange:V})})})}),t[20]=p,t[21]=q,t[22]=$,t[23]=M,t[24]=v,t[25]=h,t[26]=H,t[27]=x,t[28]=V,t[29]=I,t[30]=a,t[31]=o,t[32]=n,t[33]=i,t[34]=g,t[35]=T,t[36]=B,t[37]=_,t[38]=S):S=t[38];let f;t[39]!==d||t[40]!==S?(f=e.jsxs(st,{side:"right",className:"w-[400px] sm:max-w-[440px] p-0 gap-0",children:[d,S]}),t[39]=d,t[40]=S,t[41]=f):f=t[41];let b;return t[42]!==z||t[43]!==N||t[44]!==f?(b=e.jsx(at,{open:N,onOpenChange:z,children:f}),t[42]=z,t[43]=N,t[44]=f,t[45]=b):b=t[45],b}function yt(u){return u+1}function wt(u){return u+1}export{mi as SeoSheet};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,a3 as $,j as c,a4 as L,ak as z,_ as O,V as _,W as g,U as E,Z as j,a2 as G,X as w,dA as H,dB as K,Y as U,dC as V,dD as W,dE as Z,$ as B,a0 as X,a1 as Y,c as R,l as q}from"./index-5MyNR89x.js";var C="Popover",[b]=U(C,[w]),P=w(),[J,u]=b(C),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=P(e),l=i.useRef(null),[d,h]=i.useState(!1),[x,f]=$({prop:r,defaultProp:n??!1,onChange:s,caller:C});return c.jsx(L,{...p,children:c.jsx(J,{scope:e,contentId:z(),triggerRef:l,open:x,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(m=>!m),[f]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>h(!0),[]),onCustomAnchorRemove:i.useCallback(()=>h(!1),[]),modal:a,children:o})})};N.displayName=C;var F="PopoverAnchor",Q=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(F,o),s=P(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(E,{...s,...r,ref:e})});Q.displayName=F;var S="PopoverTrigger",y=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(S,o),s=P(o),a=O(e,n.triggerRef),p=c.jsx(_.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":I(n.open),...r,ref:a,onClick:g(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(E,{asChild:!0,...s,children:p})});y.displayName=S;var A="PopoverPortal",[ee,oe]=b(A,{forceMount:void 0}),D=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=u(A,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(j,{present:o||s.open,children:c.jsx(G,{asChild:!0,container:n,children:r})})})};D.displayName=A;var v="PopoverContent",M=i.forwardRef((t,e)=>{const o=oe(v,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=u(v,t.__scopePopover);return c.jsx(j,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});M.displayName=v;var te=V("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(null),n=O(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return H(a)},[]),c.jsx(K,{as:te,allowPinchZoom:!0,children:c.jsx(k,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:g(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:g(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,l=p.button===0&&p.ctrlKey===!0,d=p.button===2||l;s.current=d},{checkForDefaultPrevented:!1}),onFocusOutside:g(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=u(v,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(k,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),k=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onInteractOutside:h,...x}=t,f=u(v,o),m=P(o);return W(),c.jsx(Z,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(B,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:l,onFocusOutside:d,onDismiss:()=>f.onOpenChange(!1),children:c.jsx(X,{"data-state":I(f.open),role:"dialog",id:f.contentId,...m,...x,ref:e,style:{...x.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),T="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=u(T,o);return c.jsx(_.button,{type:"button",...r,ref:e,onClick:g(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=T;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=P(o);return c.jsx(Y,{...n,...r,ref:e})});ce.displayName=ae;function I(t){return t?"open":"closed"}var ie=N,pe=y,le=D,de=M;function fe(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function ve(t){const e=R.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=R.c(12);let o,r,n,s;e[0]!==t?({className:o,align:n,sideOffset:s,...r}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s):(o=e[1],r=e[2],n=e[3],s=e[4]);const a=n===void 0?"center":n,p=s===void 0?4:s;let l;e[5]!==o?(l=q("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-lg overflow-hidden border p-4 shadow-md outline-hidden",o),e[5]=o,e[6]=l):l=e[6];let d;return e[7]!==a||e[8]!==r||e[9]!==p||e[10]!==l?(d=c.jsx(le,{children:c.jsx(de,{"data-slot":"popover-content",align:a,sideOffset:p,className:l,...r})}),e[7]=a,e[8]=r,e[9]=p,e[10]=l,e[11]=d):d=e[11],d}export{fe as P,ve as a,ge as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as H,j as t,B as Z}from"./index-5MyNR89x.js";import{n as ee}from"./LinkExternal01-BMDEbMBF.js";import{aC as te,t as oe}from"./agent-icon-CCm6veEh.js";import{I as J}from"./input-D9aeO8wK.js";import{L as G}from"./label-Bj7qsNrz.js";import{M as ie}from"./automation-runs-CXnAhWiY.js";import{T as Q,a as se,b as W,c as le}from"./tabs-8VxbUDVb.js";import{T as re}from"./textarea-Bwn2Wdf8.js";import{au as ae,av as me,at as pe,aw as ne,ax as ce,ay as de,az as fe}from"./index-BWMRVcd2.js";import{b as ue,a as xe,B as he}from"./block-document-AtpOGVAy.js";import{u as ge,s as F,E as ve,R as ye,A as je}from"./primitives-CAIbeS4G.js";import"./AlertCircle-B4WPpzHx.js";import"./Tool01-DFCFgRlB.js";import"./SwitchHorizontal01-BcqnyefE.js";import"./Settings02-CuT9JazG.js";import"./XCircle-BIxZfFEg.js";import"./ArrowUpRight-n7J2ORua.js";import"./ZapSquare-qeizwUPq.js";import"./Users03-DBa0-LbB.js";import"./CheckCircle-DGqDWZvl.js";import"./ChevronUp-CtzC0jb0.js";import"./ChevronDown-BzkFMF52.js";import"./ChevronLeft-B-p3uhTp.js";import"./ChevronRight-BhZIqa2P.js";import"./DotsVertical-DskMPw9G.js";import"./Stars02-Call5O4Q.js";import"./Eye-Bkw15G1G.js";import"./ZoomOut-fkR_2hFy.js";import"./Globe01-CIvUZBh0.js";import"./FilterLines-CTiCp3St.js";import"./Star01-BMttIRxb.js";import"./Globe04-By_qGXm-.js";import"./HardDrive-Da-ea-EW.js";import"./Key01-DugFMT5_.js";import"./LayoutLeft-DiQ60pSu.js";import"./Monitor01-BFD-ivVa.js";import"./Sun-B0JI-Irq.js";import"./Palette-DrmZY9bB.js";import"./Play-CiiKZLoa.js";import"./Plus-hFZ_SbzL.js";import"./SearchLg-D4Hs4YLQ.js";import"./SearchMd-RBoojwOu.js";import"./Shield01-D5Fc_Ylv.js";import"./Stars01-HANlppqn.js";import"./Trash01-CGEeRKCz.js";import"./Upload01-V0qkIpRk.js";import"./User01-Co_ACiCO.js";import"./Users01-B-VpMOmx.js";import"./XClose-CEJj7vhn.js";import"./X-DlUiLOPC.js";import"./Zap-USVmT42t.js";import"./useInfiniteQuery-_sl5B1oR.js";import"./use-infinite-scroll-4tV6tFjB.js";import"./use-connection-BvgL1-Da.js";import"./use-collections-DAKL2YGx.js";import"./use-mcp-client-CherrXvD.js";import"./auth-CNqDC7uO.js";import"./use-virtual-mcp-C5pbd140.js";import"./card-D3bKVB8y.js";import"./sheet-M6dgbK60.js";import"./table-B06cGuvx.js";import"./empty-state-D7nJB9UW.js";import"./use-members-ge80zFlj.js";import"./use-org-auth-client-Ctxe3HXF.js";import"./task-status-Cm29b2AK.js";import"./use-automations-ChKoVegP.js";import"./studio-tools-4NjxmaVZ.js";import"./useSuspenseInfiniteQuery-_eC9d3ii.js";import"./badge-cxwmW2xd.js";import"./select-CZgnwyj0.js";import"./tooltip-DvT2WKW9.js";import"./checkbox-PMXW46HN.js";import"./command-D-t5bmXW.js";import"./index-BD4HYlEX.js";import"./dialog-B2cGEuOv.js";import"./popover-DowpnV25.js";import"./avatar-Jhd31ejW.js";import"./scroll-area-DLqMfi_N.js";import"./use-clock-tick-CJO5qoT7.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-WaepYGtr.js";import"./file-type-icon-W_AZRfzL.js";import"./use-mobile-lIIxFH5C.js";import"./tab-id-BptcWVWa.js";import"./content-blocks-o63cs2vh.js";import"./types-U3TqUYrY.js";import"./chat-context-B5uEh4ay.js";import"./hooks-DgSrpwcx.js";import"./decopilot-sse-pool-DoJkdYBA.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-D4m0Vu5Q.js";import"./use-decopilot-events-BDkaUhLT.js";import"./use-organization-settings-CZfEdu0P.js";import"./shell-layout-CnTaR8UN.js";import"./required-auth-layout-CZqB7vUr.js";import"./use-org-sso-BxzKK5rO.js";import"./integration-icon-CMGCCNyJ.js";import"./use-navigate-to-agent-BtVHPn7N.js";import"./use-mcp-prompts-BnOdccbh.js";import"./form-DI8q6OtF.js";import"./index-BFW_K0gJ.js";import"./drawer-Tv6bcT7w.js";import"./collection-search-CN9TCItb.js";import"./toggle-group-CndOAl-N.js";import"./sortable.esm-D8GIYMew.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-BswtsnGE.js";import"./use-registry-connections-C_VqH6te.js";import"./extract-connection-data-CxK1dunT.js";import"./collection-tabs-D5o6VjHd.js";import"./connection-form-helpers-JfkHcTGO.js";import"./authenticate-and-persist-oauth-Dy2XeMqO.js";import"./mcp-oauth-DEfvhjPc.js";import"./connect-desktop-dialog-DchtPbuP.js";import"./decopilot-CfDwLIyX.js";import"./skeleton-DoPnd-4p.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-Br7JxQz6.js";import"./use-org-fs-D-40uH2W.js";import"./dropdown-menu-Dw-pnYXI.js";import"./question-004-sINsf4GQ.js";import"./use-status-sounds-CWHPQWBO.js";import"./toolbar-ClL4Dhs_.js";import"./preview-dialog-CwTtT7qa.js";import"./index-BgPTCVWL.js";import"./use-mcp-tools-w6KwNDra.js";import"./use-capability-CQPMPR-5.js";import"./shell-route-loading-DFu6UBUI.js";import"./tools-list-DL7ip2gg.js";import"./alert-dialog-BZ8TrIVu.js";import"./switch-DLNzAYS1.js";import"./use-debounced-autosave-mA5Fw-09.js";import"./index-CshxsRNd.js";import"./sidebar-oYab2QX7.js";import"./search-input-BXzntIcj.js";import"./github-repo-picker-M1TBbLot.js";import"./use-debounced-value-cQ7ZQKtl.js";import"./github-installations-DzN1UQ4x.js";import"./use-secrets-Dn4coT0R.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./use-file-configs-Dfeoim5G.js";import"./monaco-editor-B3KzPr3D.js";import"./select-model-BLeb_gwV.js";import"./automation-list-row-DO51bU3z.js";function be(A){return Array.isArray(A)?A.map(e=>({key:F(e?.key),value:F(e?.value)})):[]}function mi(A){const e=H.c(66),{orgSlug:i,virtualMcpId:d,branch:o,blockKey:l,block:p,decofile:m,meta:u,previewBaseUrl:x}=A;let y;e[0]!==o||e[1]!==i||e[2]!==d?(y={orgSlug:i,virtualMcpId:d,branch:o},e[0]=o,e[1]=i,e[2]=d,e[3]=y):y=e[3];const s=ae(y);let n;e[4]!==p?(n=me(p,"posts"),e[4]=p,e[5]=n):n=e[5];const j=n;let b;e[6]!==l||e[7]!==s?(b=T=>{s.mutate({blockKey:l,data:ne(l,"posts",T)})},e[6]=l,e[7]=s,e[8]=b):b=e[8];const[r,_]=ge(j,b);let C;e[9]!==r||e[10]!==_?(C=(T,Y)=>_({...r,[T]:Y}),e[9]=r,e[10]=_,e[11]=C):C=e[11];const h=C;let S;e[12]!==m||e[13]!==r||e[14]!==x?(S=ue({decofile:m,post:r,previewBaseUrl:x}),e[12]=m,e[13]=r,e[14]=x,e[15]=S):S=e[15];const f=S;let a;e[16]!==r.title?(a=F(r.title)||"Untitled post",e[16]=r.title,e[17]=a):a=e[17];let c;e[18]!==a?(c=t.jsx("span",{className:"truncate text-sm font-medium",children:a}),e[18]=a,e[19]=c):c=e[19];let g;e[20]!==s.isError||e[21]!==s.isPending?(g=t.jsx(pe,{isPending:s.isPending,isError:s.isError}),e[20]=s.isError,e[21]=s.isPending,e[22]=g):g=e[22];const k=!f,P=f?"Open the post preview in a new tab":"Set the post slug (and its category) plus the blog app's pageSlug to preview";let N;e[23]!==f?(N=()=>{f&&window.open(f,"_blank","noopener,noreferrer")},e[23]=f,e[24]=N):N=e[24];let B;e[25]===Symbol.for("react.memo_cache_sentinel")?(B=t.jsx(ee,{size:14}),e[25]=B):B=e[25];let w;e[26]!==P||e[27]!==N||e[28]!==k?(w=t.jsxs(Z,{type:"button",variant:"outline",size:"sm",disabled:k,title:P,onClick:N,children:[B,"See preview"]}),e[26]=P,e[27]=N,e[28]=k,e[29]=w):w=e[29];let E;e[30]!==w||e[31]!==g?(E=t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[g,w]}),e[30]=w,e[31]=g,e[32]=E):E=e[32];let v;e[33]!==E||e[34]!==c?(v=t.jsxs("div",{className:"flex h-12 shrink-0 items-center justify-between border-b px-6",children:[c,E]}),e[33]=E,e[34]=c,e[35]=v):v=e[35];let L;e[36]!==r.title?(L=F(r.title),e[36]=r.title,e[37]=L):L=e[37];let R;e[38]!==h?(R=T=>h("title",T),e[38]=h,e[39]=R):R=e[39];let U;e[40]!==L||e[41]!==R?(U=t.jsx(ve,{value:L,onChange:R,placeholder:"Post title",className:"py-1 text-4xl font-bold text-foreground"}),e[40]=L,e[41]=R,e[42]=U):U=e[42];let O;e[43]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs(Q,{value:"content",children:[t.jsx(te,{}),"Content"]}),e[43]=O):O=e[43];let K;e[44]===Symbol.for("react.memo_cache_sentinel")?(K=t.jsxs(se,{children:[O,t.jsxs(Q,{value:"settings",children:[t.jsx(oe,{}),"Settings"]})]}),e[44]=K):K=e[44];let $;e[45]!==r.sections?($=xe(r.sections),e[45]=r.sections,e[46]=$):$=e[46];let I;e[47]!==h?(I=T=>h("sections",T),e[47]=h,e[48]=I):I=e[48];let M;e[49]!==u||e[50]!==$||e[51]!==I?(M=t.jsx(W,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(he,{value:$,onChange:I,meta:u,emptyMessage:"This post has no content yet. Use ⊕ to add your first block."})})}),e[49]=u,e[50]=$,e[51]=I,e[52]=M):M=e[52];let z;e[53]!==m||e[54]!==r||e[55]!==h?(z=t.jsx(W,{value:"settings",children:t.jsx("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:t.jsx(Ce,{post:r,decofile:m,onChange:h})})}),e[53]=m,e[54]=r,e[55]=h,e[56]=z):z=e[56];let D;e[57]!==M||e[58]!==z?(D=t.jsxs(le,{defaultValue:"content",className:"mt-6 gap-4",children:[K,M,z]}),e[57]=M,e[58]=z,e[59]=D):D=e[59];let V;e[60]!==U||e[61]!==D?(V=t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 py-8",children:[U,D]})}),e[60]=U,e[61]=D,e[62]=V):V=e[62];let q;return e[63]!==v||e[64]!==V?(q=t.jsxs("div",{className:"flex h-full flex-col",children:[v,V]}),e[63]=v,e[64]=V,e[65]=q):q=e[65],q}function Ce(A){const e=H.c(59),{post:i,decofile:d,onChange:o}=A;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx(G,{htmlFor:"post-excerpt",children:"Excerpt"}),e[0]=l):l=e[0];let p;e[1]!==i.excerpt?(p=F(i.excerpt),e[1]=i.excerpt,e[2]=p):p=e[2];let m;e[3]!==o?(m=v=>o("excerpt",v.target.value),e[3]=o,e[4]=m):m=e[4];let u;e[5]!==p||e[6]!==m?(u=t.jsxs("div",{className:"space-y-2",children:[l,t.jsx(re,{id:"post-excerpt",value:p,onChange:m,rows:2})]}),e[5]=p,e[6]=m,e[7]=u):u=e[7];let x;e[8]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(G,{htmlFor:"post-slug",children:"Slug"}),e[8]=x):x=e[8];let y;e[9]!==i.slug?(y=F(i.slug),e[9]=i.slug,e[10]=y):y=e[10];let s;e[11]!==o?(s=v=>o("slug",v.target.value),e[11]=o,e[12]=s):s=e[12];let n;e[13]!==y||e[14]!==s?(n=t.jsxs("div",{className:"space-y-2",children:[x,t.jsx(J,{id:"post-slug",value:y,onChange:s,placeholder:"my-post",className:"h-10"})]}),e[13]=y,e[14]=s,e[15]=n):n=e[15];let j;e[16]===Symbol.for("react.memo_cache_sentinel")?(j={type:"string",format:"date",title:"Date"},e[16]=j):j=e[16];let b;e[17]!==i.date?(b=F(i.date),e[17]=i.date,e[18]=b):b=e[18];let r;e[19]!==o?(r=v=>o("date",v),e[19]=o,e[20]=r):r=e[20];let _;e[21]!==b||e[22]!==r?(_=t.jsx(fe,{schema:j,value:b,onChange:r,path:"post-date",label:"Date"}),e[21]=b,e[22]=r,e[23]=_):_=e[23];let C;e[24]!==_||e[25]!==n?(C=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[n,_]}),e[24]=_,e[25]=n,e[26]=C):C=e[26];let h;e[27]===Symbol.for("react.memo_cache_sentinel")?(h={type:"string",format:"image-uri",title:"Cover image"},e[27]=h):h=e[27];let S;e[28]!==o?(S=v=>o("image",v),e[28]=o,e[29]=S):S=e[29];let f;e[30]!==i.image||e[31]!==S?(f=t.jsx(ce,{schema:h,value:i.image,onChange:S,path:"post-image",label:"Cover image"}),e[30]=i.image,e[31]=S,e[32]=f):f=e[32];let a;e[33]===Symbol.for("react.memo_cache_sentinel")?(a=["email"],e[33]=a):a=e[33];let c;e[34]!==o?(c=v=>o("authors",v),e[34]=o,e[35]=c):c=e[35];let g;e[36]!==d||e[37]!==i.authors||e[38]!==c?(g=t.jsx(X,{label:"Authors",decofile:d,kind:"authors",valueField:"email",extraFields:a,selected:i.authors,onChange:c}),e[36]=d,e[37]=i.authors,e[38]=c,e[39]=g):g=e[39];let k;e[40]===Symbol.for("react.memo_cache_sentinel")?(k=["slug"],e[40]=k):k=e[40];let P;e[41]!==o?(P=v=>o("categories",v),e[41]=o,e[42]=P):P=e[42];let N;e[43]!==d||e[44]!==i.categories||e[45]!==P?(N=t.jsx(X,{label:"Categories",decofile:d,kind:"categories",valueField:"slug",extraFields:k,selected:i.categories,onChange:P}),e[43]=d,e[44]=i.categories,e[45]=P,e[46]=N):N=e[46];let B;e[47]!==o?(B=v=>o("extraProps",v),e[47]=o,e[48]=B):B=e[48];let w;e[49]!==i.extraProps||e[50]!==B?(w=t.jsx(ke,{value:i.extraProps,onChange:B}),e[49]=i.extraProps,e[50]=B,e[51]=w):w=e[51];let E;return e[52]!==C||e[53]!==f||e[54]!==g||e[55]!==N||e[56]!==w||e[57]!==u?(E=t.jsxs("div",{className:"space-y-5",children:[u,C,f,g,N,w]}),e[52]=C,e[53]=f,e[54]=g,e[55]=N,e[56]=w,e[57]=u,e[58]=E):E=e[58],E}function ke(A){const e=H.c(15),{value:i,onChange:d}=A;let o,l,p,m;if(e[0]!==d||e[1]!==i){o=be(i);const y=(s,n)=>d(o.map((j,b)=>b===s?{...j,...n}:j));l="space-y-2",e[6]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(G,{children:"Extra props"}),e[6]=p):p=e[6],m=o.length>0&&t.jsx("ul",{className:"space-y-2",children:o.map((s,n)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(J,{value:s.key,onChange:j=>y(n,{key:j.target.value}),placeholder:"key",className:"h-9 flex-1"}),t.jsx(J,{value:s.value,onChange:j=>y(n,{value:j.target.value}),placeholder:"value",className:"h-9 flex-1"}),t.jsx(ye,{label:"Remove prop",onClick:()=>d(o.filter((j,b)=>b!==n))})]},n))}),e[0]=d,e[1]=i,e[2]=o,e[3]=l,e[4]=p,e[5]=m}else o=e[2],l=e[3],p=e[4],m=e[5];let u;e[7]!==o||e[8]!==d?(u=t.jsx(je,{label:"Add prop",onClick:()=>d([...o,{key:"",value:""}])}),e[7]=o,e[8]=d,e[9]=u):u=e[9];let x;return e[10]!==l||e[11]!==p||e[12]!==m||e[13]!==u?(x=t.jsxs("div",{className:l,children:[p,m,u]}),e[10]=l,e[11]=p,e[12]=m,e[13]=u,e[14]=x):x=e[14],x}function X(A){const e=H.c(31),{label:i,decofile:d,kind:o,valueField:l,extraFields:p,selected:m,onChange:u}=A;let x,y,s;if(e[0]!==d||e[1]!==o||e[2]!==l){x=de(d,o);let f;e[6]!==l?(f=(c,g)=>F(c[l])||g,e[6]=l,e[7]=f):f=e[7],s=f;let a;e[8]!==s?(a=c=>{const{key:g,payload:k}=c;return{value:s(k,g),label:F(k.name)||s(k,g)}},e[8]=s,e[9]=a):a=e[9],y=x.map(a),e[0]=d,e[1]=o,e[2]=l,e[3]=x,e[4]=y,e[5]=s}else x=e[3],y=e[4],s=e[5];const n=y;let j;if(e[10]!==m||e[11]!==l){const f=Array.isArray(m)?m:[];let a;e[13]!==l?(a=c=>F(c[l]),e[13]=l,e[14]=a):a=e[14],j=f.map(a).filter(Boolean),e[10]=m,e[11]=l,e[12]=j}else j=e[12];const b=j;let r;e[15]!==p||e[16]!==u||e[17]!==x||e[18]!==l||e[19]!==s?(r=f=>{u(f.map(a=>{const c=x.find(k=>{const{key:P,payload:N}=k;return s(N,P)===a});if(!c)return{name:a,[l]:a};const g={name:F(c.payload.name)};for(const k of p)g[k]=c.payload[k]??a;return g}))},e[15]=p,e[16]=u,e[17]=x,e[18]=l,e[19]=s,e[20]=r):r=e[20];const _=r;let C;e[21]!==i?(C=t.jsx(G,{children:i}),e[21]=i,e[22]=C):C=e[22];let h;e[23]!==b||e[24]!==_||e[25]!==i||e[26]!==n?(h=n.length===0?t.jsxs("p",{className:"text-xs text-muted-foreground",children:["No ",i.toLowerCase()," yet — create some in the"," ",i.toLowerCase()," collection."]}):t.jsx(ie,{options:n,defaultValue:b,onValueChange:_,placeholder:`Select ${i.toLowerCase()}`,maxCount:4}),e[23]=b,e[24]=_,e[25]=i,e[26]=n,e[27]=h):h=e[27];let S;return e[28]!==C||e[29]!==h?(S=t.jsxs("div",{className:"space-y-2",children:[C,h]}),e[28]=C,e[29]=h,e[30]=S):S=e[30],S}export{mi as PostEditor};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import{r as h,aN as tn,c as J,l as xe,j as a,J as nn,i as rn,B as Z,K as Ke,k as sn,ae as on,D as ln,m as an,t as Pe,ag as cn,G as un,e as dn}from"./index-5MyNR89x.js";import{c as fn,d as mn,g as pn,b as hn,e as xn,a as gn,h as vn}from"./ZoomOut-fkR_2hFy.js";import{c as wn,a as Ve,d as yt,e as bt}from"./dialog-B2cGEuOv.js";import{T as oe,a as le,b as ae}from"./tooltip-DvT2WKW9.js";import{n as Re,i as St}from"./Globe01-CIvUZBh0.js";import{n as zt}from"./LinkExternal01-BMDEbMBF.js";import{s as yn}from"./XClose-CEJj7vhn.js";import{S as $e}from"./skeleton-DoPnd-4p.js";import{l as bn,F as Sn}from"./index-BgPTCVWL.js";import{F as Xe,M as zn}from"./file-type-icon-W_AZRfzL.js";import{D as jn,a as kn,b as Pn,c as it}from"./dropdown-menu-Dw-pnYXI.js";import{i as Cn}from"./LayoutLeft-DiQ60pSu.js";import{i as En,f as jt,n as Nn,d as kt,e as $n}from"./use-org-fs-D-40uH2W.js";import{I as Mn}from"./input-D9aeO8wK.js";import{a as In,P as Rn,b as Dn}from"./popover-DowpnV25.js";import{i as Ln}from"./ChevronUp-CtzC0jb0.js";import{a as _n}from"./Eye-Bkw15G1G.js";import{i as An}from"./Key01-DugFMT5_.js";const Ae=h.createContext(null);Ae.displayName="PanelGroupContext";const K={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"},Qe=10,pe=h.useLayoutEffect,ot=tn.useId,Tn=typeof ot=="function"?ot:()=>null;let Hn=0;function Ze(t=null){const e=Tn(),n=h.useRef(t||e||null);return n.current===null&&(n.current=""+Hn++),t??n.current}function Pt({children:t,className:e="",collapsedSize:n,collapsible:r,defaultSize:s,forwardedRef:i,id:o,maxSize:l,minSize:c,onCollapse:d,onExpand:m,onResize:u,order:f,style:v,tagName:x="div",...k}){const b=h.useContext(Ae);if(b===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:w,expandPanel:C,getPanelSize:I,getPanelStyle:j,groupId:F,isPanelCollapsed:$,reevaluatePanelConstraints:g,registerPanel:G,resizePanel:W,unregisterPanel:O}=b,A=Ze(o),D=h.useRef({callbacks:{onCollapse:d,onExpand:m,onResize:u},constraints:{collapsedSize:n,collapsible:r,defaultSize:s,maxSize:l,minSize:c},id:A,idIsFromProps:o!==void 0,order:f});h.useRef({didLogMissingDefaultSizeWarning:!1}),pe(()=>{const{callbacks:_,constraints:L}=D.current,T={...L};D.current.id=A,D.current.idIsFromProps=o!==void 0,D.current.order=f,_.onCollapse=d,_.onExpand=m,_.onResize=u,L.collapsedSize=n,L.collapsible=r,L.defaultSize=s,L.maxSize=l,L.minSize=c,(T.collapsedSize!==L.collapsedSize||T.collapsible!==L.collapsible||T.maxSize!==L.maxSize||T.minSize!==L.minSize)&&g(D.current,T)}),pe(()=>{const _=D.current;return G(_),()=>{O(_)}},[f,A,G,O]),h.useImperativeHandle(i,()=>({collapse:()=>{w(D.current)},expand:_=>{C(D.current,_)},getId(){return A},getSize(){return I(D.current)},isCollapsed(){return $(D.current)},isExpanded(){return!$(D.current)},resize:_=>{W(D.current,_)}}),[w,C,I,$,A,W]);const V=j(D.current,s);return h.createElement(x,{...k,children:t,className:e,id:A,style:{...V,...v},[K.groupId]:F,[K.panel]:"",[K.panelCollapsible]:r||void 0,[K.panelId]:A,[K.panelSize]:parseFloat(""+V.flexGrow).toFixed(1)})}const Ct=h.forwardRef((t,e)=>h.createElement(Pt,{...t,forwardedRef:e}));Pt.displayName="Panel";Ct.displayName="forwardRef(Panel)";let Ye=null,Ie=-1,de=null;function On(t,e){if(e){const n=(e&It)!==0,r=(e&Rt)!==0,s=(e&Dt)!==0,i=(e&Lt)!==0;if(n)return s?"se-resize":i?"ne-resize":"e-resize";if(r)return s?"sw-resize":i?"nw-resize":"w-resize";if(s)return"s-resize";if(i)return"n-resize"}switch(t){case"horizontal":return"ew-resize";case"intersection":return"move";case"vertical":return"ns-resize"}}function Un(){de!==null&&(document.head.removeChild(de),Ye=null,de=null,Ie=-1)}function Fe(t,e){var n,r;const s=On(t,e);if(Ye!==s){if(Ye=s,de===null&&(de=document.createElement("style"),document.head.appendChild(de)),Ie>=0){var i;(i=de.sheet)===null||i===void 0||i.removeRule(Ie)}Ie=(n=(r=de.sheet)===null||r===void 0?void 0:r.insertRule(`*{cursor: ${s} !important;}`))!==null&&n!==void 0?n:-1}}function Et(t){return t.type==="keydown"}function Nt(t){return t.type.startsWith("pointer")}function $t(t){return t.type.startsWith("mouse")}function Te(t){if(Nt(t)){if(t.isPrimary)return{x:t.clientX,y:t.clientY}}else if($t(t))return{x:t.clientX,y:t.clientY};return{x:1/0,y:1/0}}function Fn(){if(typeof matchMedia=="function")return matchMedia("(pointer:coarse)").matches?"coarse":"fine"}function Wn(t,e,n){return t.x<e.x+e.width&&t.x+t.width>e.x&&t.y<e.y+e.height&&t.y+t.height>e.y}function Bn(t,e){if(t===e)throw new Error("Cannot compare node with itself");const n={a:ct(t),b:ct(e)};let r;for(;n.a.at(-1)===n.b.at(-1);)t=n.a.pop(),e=n.b.pop(),r=t;N(r,"Stacking order can only be calculated for elements with a common ancestor");const s={a:at(lt(n.a)),b:at(lt(n.b))};if(s.a===s.b){const i=r.childNodes,o={a:n.a.at(-1),b:n.b.at(-1)};let l=i.length;for(;l--;){const c=i[l];if(c===o.a)return 1;if(c===o.b)return-1}}return Math.sign(s.a-s.b)}const Gn=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function qn(t){var e;const n=getComputedStyle((e=Mt(t))!==null&&e!==void 0?e:t).display;return n==="flex"||n==="inline-flex"}function Kn(t){const e=getComputedStyle(t);return!!(e.position==="fixed"||e.zIndex!=="auto"&&(e.position!=="static"||qn(t))||+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"||Gn.test(e.willChange)||e.webkitOverflowScrolling==="touch")}function lt(t){let e=t.length;for(;e--;){const n=t[e];if(N(n,"Missing node"),Kn(n))return n}return null}function at(t){return t&&Number(getComputedStyle(t).zIndex)||0}function ct(t){const e=[];for(;t;)e.push(t),t=Mt(t);return e}function Mt(t){const{parentNode:e}=t;return e&&e instanceof ShadowRoot?e.host:e}const It=1,Rt=2,Dt=4,Lt=8,Vn=Fn()==="coarse";let re=[],be=!1,me=new Map,He=new Map;const Ce=new Set;function Xn(t,e,n,r,s){var i;const{ownerDocument:o}=e,l={direction:n,element:e,hitAreaMargins:r,setResizeHandlerState:s},c=(i=me.get(o))!==null&&i!==void 0?i:0;return me.set(o,c+1),Ce.add(l),De(),function(){var m;He.delete(t),Ce.delete(l);const u=(m=me.get(o))!==null&&m!==void 0?m:1;if(me.set(o,u-1),De(),u===1&&me.delete(o),re.includes(l)){const f=re.indexOf(l);f>=0&&re.splice(f,1),tt(),s("up",!0,null)}}}function Yn(t){const{target:e}=t,{x:n,y:r}=Te(t);be=!0,et({target:e,x:n,y:r}),De(),re.length>0&&(Le("down",t),t.preventDefault(),_t(e)||t.stopImmediatePropagation())}function We(t){const{x:e,y:n}=Te(t);if(be&&t.buttons===0&&(be=!1,Le("up",t)),!be){const{target:r}=t;et({target:r,x:e,y:n})}Le("move",t),tt(),re.length>0&&t.preventDefault()}function Be(t){const{target:e}=t,{x:n,y:r}=Te(t);He.clear(),be=!1,re.length>0&&(t.preventDefault(),_t(e)||t.stopImmediatePropagation()),Le("up",t),et({target:e,x:n,y:r}),tt(),De()}function _t(t){let e=t;for(;e;){if(e.hasAttribute(K.resizeHandle))return!0;e=e.parentElement}return!1}function et({target:t,x:e,y:n}){re.splice(0);let r=null;(t instanceof HTMLElement||t instanceof SVGElement)&&(r=t),Ce.forEach(s=>{const{element:i,hitAreaMargins:o}=s,l=i.getBoundingClientRect(),{bottom:c,left:d,right:m,top:u}=l,f=Vn?o.coarse:o.fine;if(e>=d-f&&e<=m+f&&n>=u-f&&n<=c+f){if(r!==null&&document.contains(r)&&i!==r&&!i.contains(r)&&!r.contains(i)&&Bn(r,i)>0){let x=r,k=!1;for(;x&&!x.contains(i);){if(Wn(x.getBoundingClientRect(),l)){k=!0;break}x=x.parentElement}if(k)return}re.push(s)}})}function Ge(t,e){He.set(t,e)}function tt(){let t=!1,e=!1;re.forEach(r=>{const{direction:s}=r;s==="horizontal"?t=!0:e=!0});let n=0;He.forEach(r=>{n|=r}),t&&e?Fe("intersection",n):t?Fe("horizontal",n):e?Fe("vertical",n):Un()}let qe=new AbortController;function De(){qe.abort(),qe=new AbortController;const t={capture:!0,signal:qe.signal};Ce.size&&(be?(re.length>0&&me.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("contextmenu",Be,t),r.addEventListener("pointerleave",We,t),r.addEventListener("pointermove",We,t))}),window.addEventListener("pointerup",Be,t),window.addEventListener("pointercancel",Be,t)):me.forEach((e,n)=>{const{body:r}=n;e>0&&(r.addEventListener("pointerdown",Yn,t),r.addEventListener("pointermove",We,t))}))}function Le(t,e){Ce.forEach(n=>{const{setResizeHandlerState:r}=n,s=re.includes(n);r(t,s,e)})}function Jn(){const[t,e]=h.useState(0);return h.useCallback(()=>e(n=>n+1),[])}function N(t,e){if(!t)throw console.error(e),Error(e)}function he(t,e,n=Qe){return t.toFixed(n)===e.toFixed(n)?0:t>e?1:-1}function ce(t,e,n=Qe){return he(t,e,n)===0}function ee(t,e,n){return he(t,e,n)===0}function Qn(t,e,n){if(t.length!==e.length)return!1;for(let r=0;r<t.length;r++){const s=t[r],i=e[r];if(!ee(s,i,n))return!1}return!0}function ye({panelConstraints:t,panelIndex:e,size:n}){const r=t[e];N(r!=null,`Panel constraints not found for index ${e}`);let{collapsedSize:s=0,collapsible:i,maxSize:o=100,minSize:l=0}=r;if(he(n,l)<0)if(i){const c=(s+l)/2;he(n,c)<0?n=s:n=l}else n=l;return n=Math.min(o,n),n=parseFloat(n.toFixed(Qe)),n}function je({delta:t,initialLayout:e,panelConstraints:n,pivotIndices:r,prevLayout:s,trigger:i}){if(ee(t,0))return e;const o=[...e],[l,c]=r;N(l!=null,"Invalid first pivot index"),N(c!=null,"Invalid second pivot index");let d=0;if(i==="keyboard"){{const u=t<0?c:l,f=n[u];N(f,`Panel constraints not found for index ${u}`);const{collapsedSize:v=0,collapsible:x,minSize:k=0}=f;if(x){const b=e[u];if(N(b!=null,`Previous layout not found for panel index ${u}`),ee(b,v)){const w=k-b;he(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}{const u=t<0?l:c,f=n[u];N(f,`No panel constraints found for index ${u}`);const{collapsedSize:v=0,collapsible:x,minSize:k=0}=f;if(x){const b=e[u];if(N(b!=null,`Previous layout not found for panel index ${u}`),ee(b,k)){const w=b-v;he(w,Math.abs(t))>0&&(t=t<0?0-w:w)}}}}{const u=t<0?1:-1;let f=t<0?c:l,v=0;for(;;){const k=e[f];N(k!=null,`Previous layout not found for panel index ${f}`);const w=ye({panelConstraints:n,panelIndex:f,size:100})-k;if(v+=w,f+=u,f<0||f>=n.length)break}const x=Math.min(Math.abs(t),Math.abs(v));t=t<0?0-x:x}{let f=t<0?l:c;for(;f>=0&&f<n.length;){const v=Math.abs(t)-Math.abs(d),x=e[f];N(x!=null,`Previous layout not found for panel index ${f}`);const k=x-v,b=ye({panelConstraints:n,panelIndex:f,size:k});if(!ee(x,b)&&(d+=x-b,o[f]=b,d.toPrecision(3).localeCompare(Math.abs(t).toPrecision(3),void 0,{numeric:!0})>=0))break;t<0?f--:f++}}if(Qn(s,o))return s;{const u=t<0?c:l,f=e[u];N(f!=null,`Previous layout not found for panel index ${u}`);const v=f+d,x=ye({panelConstraints:n,panelIndex:u,size:v});if(o[u]=x,!ee(x,v)){let k=v-x,w=t<0?c:l;for(;w>=0&&w<n.length;){const C=o[w];N(C!=null,`Previous layout not found for panel index ${w}`);const I=C+k,j=ye({panelConstraints:n,panelIndex:w,size:I});if(ee(C,j)||(k-=j-C,o[w]=j),ee(k,0))break;t>0?w--:w++}}}const m=o.reduce((u,f)=>f+u,0);return ee(m,100)?o:s}function Zn({layout:t,panelsArray:e,pivotIndices:n}){let r=0,s=100,i=0,o=0;const l=n[0];N(l!=null,"No pivot index found"),e.forEach((u,f)=>{const{constraints:v}=u,{maxSize:x=100,minSize:k=0}=v;f===l?(r=k,s=x):(i+=k,o+=x)});const c=Math.min(s,100-i),d=Math.max(r,100-o),m=t[l];return{valueMax:c,valueMin:d,valueNow:m}}function Ee(t,e=document){return Array.from(e.querySelectorAll(`[${K.resizeHandleId}][data-panel-group-id="${t}"]`))}function At(t,e,n=document){const s=Ee(t,n).findIndex(i=>i.getAttribute(K.resizeHandleId)===e);return s??null}function Tt(t,e,n){const r=At(t,e,n);return r!=null?[r,r+1]:[-1,-1]}function Ht(t,e=document){var n;if(e instanceof HTMLElement&&(e==null||(n=e.dataset)===null||n===void 0?void 0:n.panelGroupId)==t)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${t}"]`);return r||null}function Oe(t,e=document){const n=e.querySelector(`[${K.resizeHandleId}="${t}"]`);return n||null}function er(t,e,n,r=document){var s,i,o,l;const c=Oe(e,r),d=Ee(t,r),m=c?d.indexOf(c):-1,u=(s=(i=n[m])===null||i===void 0?void 0:i.id)!==null&&s!==void 0?s:null,f=(o=(l=n[m+1])===null||l===void 0?void 0:l.id)!==null&&o!==void 0?o:null;return[u,f]}function tr({committedValuesRef:t,eagerValuesRef:e,groupId:n,layout:r,panelDataArray:s,panelGroupElement:i,setLayout:o}){h.useRef({didWarnAboutMissingResizeHandle:!1}),pe(()=>{if(!i)return;const l=Ee(n,i);for(let c=0;c<s.length-1;c++){const{valueMax:d,valueMin:m,valueNow:u}=Zn({layout:r,panelsArray:s,pivotIndices:[c,c+1]}),f=l[c];if(f!=null){const v=s[c];N(v,`No panel data found for index "${c}"`),f.setAttribute("aria-controls",v.id),f.setAttribute("aria-valuemax",""+Math.round(d)),f.setAttribute("aria-valuemin",""+Math.round(m)),f.setAttribute("aria-valuenow",u!=null?""+Math.round(u):"")}}return()=>{l.forEach((c,d)=>{c.removeAttribute("aria-controls"),c.removeAttribute("aria-valuemax"),c.removeAttribute("aria-valuemin"),c.removeAttribute("aria-valuenow")})}},[n,r,s,i]),h.useEffect(()=>{if(!i)return;const l=e.current;N(l,"Eager values not found");const{panelDataArray:c}=l,d=Ht(n,i);N(d!=null,`No group found for id "${n}"`);const m=Ee(n,i);N(m,`No resize handles found for group id "${n}"`);const u=m.map(f=>{const v=f.getAttribute(K.resizeHandleId);N(v,"Resize handle element has no handle id attribute");const[x,k]=er(n,v,c,i);if(x==null||k==null)return()=>{};const b=w=>{if(!w.defaultPrevented)switch(w.key){case"Enter":{w.preventDefault();const C=c.findIndex(I=>I.id===x);if(C>=0){const I=c[C];N(I,`No panel data found for index ${C}`);const j=r[C],{collapsedSize:F=0,collapsible:$,minSize:g=0}=I.constraints;if(j!=null&&$){const G=je({delta:ee(j,F)?g-F:F-j,initialLayout:r,panelConstraints:c.map(W=>W.constraints),pivotIndices:Tt(n,v,i),prevLayout:r,trigger:"keyboard"});r!==G&&o(G)}}break}}};return f.addEventListener("keydown",b),()=>{f.removeEventListener("keydown",b)}});return()=>{u.forEach(f=>f())}},[i,t,e,n,r,s,o])}function ut(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}function Ot(t,e){const n=t==="horizontal",{x:r,y:s}=Te(e);return n?r:s}function nr(t,e,n,r,s){const i=n==="horizontal",o=Oe(e,s);N(o,`No resize handle element found for id "${e}"`);const l=o.getAttribute(K.groupId);N(l,"Resize handle element has no group id attribute");let{initialCursorPosition:c}=r;const d=Ot(n,t),m=Ht(l,s);N(m,`No group element found for id "${l}"`);const u=m.getBoundingClientRect(),f=i?u.width:u.height;return(d-c)/f*100}function rr(t,e,n,r,s,i){if(Et(t)){const o=n==="horizontal";let l=0;t.shiftKey?l=100:s!=null?l=s:l=10;let c=0;switch(t.key){case"ArrowDown":c=o?0:l;break;case"ArrowLeft":c=o?-l:0;break;case"ArrowRight":c=o?l:0;break;case"ArrowUp":c=o?0:-l;break;case"End":c=100;break;case"Home":c=-100;break}return c}else return r==null?0:nr(t,e,n,r,i)}function sr({panelDataArray:t}){const e=Array(t.length),n=t.map(i=>i.constraints);let r=0,s=100;for(let i=0;i<t.length;i++){const o=n[i];N(o,`Panel constraints not found for index ${i}`);const{defaultSize:l}=o;l!=null&&(r++,e[i]=l,s-=l)}for(let i=0;i<t.length;i++){const o=n[i];N(o,`Panel constraints not found for index ${i}`);const{defaultSize:l}=o;if(l!=null)continue;const c=t.length-r,d=s/c;r++,e[i]=d,s-=d}return e}function ge(t,e,n){e.forEach((r,s)=>{const i=t[s];N(i,`Panel data not found for index ${s}`);const{callbacks:o,constraints:l,id:c}=i,{collapsedSize:d=0,collapsible:m}=l,u=n[c];if(u==null||r!==u){n[c]=r;const{onCollapse:f,onExpand:v,onResize:x}=o;x&&x(r,u),m&&(f||v)&&(v&&(u==null||ce(u,d))&&!ce(r,d)&&v(),f&&(u==null||!ce(u,d))&&ce(r,d)&&f())}})}function Me(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n])return!1;return!0}function ir({defaultSize:t,dragState:e,layout:n,panelData:r,panelIndex:s,precision:i=3}){const o=n[s];let l;return o==null?l=t!=null?t.toPrecision(i):"1":r.length===1?l="1":l=o.toPrecision(i),{flexBasis:0,flexGrow:l,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}function or(t,e=10){let n=null;return(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{t(...s)},e)}}function dt(t){try{if(typeof localStorage<"u")t.getItem=e=>localStorage.getItem(e),t.setItem=(e,n)=>{localStorage.setItem(e,n)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),t.getItem=()=>null,t.setItem=()=>{}}}function Ut(t){return`react-resizable-panels:${t}`}function Ft(t){return t.map(e=>{const{constraints:n,id:r,idIsFromProps:s,order:i}=e;return s?r:i?`${i}:${JSON.stringify(n)}`:JSON.stringify(n)}).sort((e,n)=>e.localeCompare(n)).join(",")}function Wt(t,e){try{const n=Ut(t),r=e.getItem(n);if(r){const s=JSON.parse(r);if(typeof s=="object"&&s!=null)return s}}catch{}return null}function lr(t,e,n){var r,s;const i=(r=Wt(t,n))!==null&&r!==void 0?r:{},o=Ft(e);return(s=i[o])!==null&&s!==void 0?s:null}function ar(t,e,n,r,s){var i;const o=Ut(t),l=Ft(e),c=(i=Wt(t,s))!==null&&i!==void 0?i:{};c[l]={expandToSizes:Object.fromEntries(n.entries()),layout:r};try{s.setItem(o,JSON.stringify(c))}catch(d){console.error(d)}}function ft({layout:t,panelConstraints:e}){const n=[...t],r=n.reduce((i,o)=>i+o,0);if(n.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${n.map(i=>`${i}%`).join(", ")}`);if(!ee(r,100)&&n.length>0)for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=100/r*o;n[i]=l}let s=0;for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=ye({panelConstraints:e,panelIndex:i,size:o});o!=l&&(s+=o-l,n[i]=l)}if(!ee(s,0))for(let i=0;i<e.length;i++){const o=n[i];N(o!=null,`No layout data found for index ${i}`);const l=o+s,c=ye({panelConstraints:e,panelIndex:i,size:l});if(o!==c&&(s-=c-o,n[i]=c,ee(s,0)))break}return n}const cr=100,ke={getItem:t=>(dt(ke),ke.getItem(t)),setItem:(t,e)=>{dt(ke),ke.setItem(t,e)}},mt={};function Bt({autoSaveId:t=null,children:e,className:n="",direction:r,forwardedRef:s,id:i=null,onLayout:o=null,keyboardResizeBy:l=null,storage:c=ke,style:d,tagName:m="div",...u}){const f=Ze(i),v=h.useRef(null),[x,k]=h.useState(null),[b,w]=h.useState([]),C=Jn(),I=h.useRef({}),j=h.useRef(new Map),F=h.useRef(0),$=h.useRef({autoSaveId:t,direction:r,dragState:x,id:f,keyboardResizeBy:l,onLayout:o,storage:c}),g=h.useRef({layout:b,panelDataArray:[],panelDataArrayChanged:!1});h.useRef({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),h.useImperativeHandle(s,()=>({getId:()=>$.current.id,getLayout:()=>{const{layout:p}=g.current;return p},setLayout:p=>{const{onLayout:z}=$.current,{layout:M,panelDataArray:P}=g.current,y=ft({layout:p,panelConstraints:P.map(E=>E.constraints)});ut(M,y)||(w(y),g.current.layout=y,z&&z(y),ge(P,y,I.current))}}),[]),pe(()=>{$.current.autoSaveId=t,$.current.direction=r,$.current.dragState=x,$.current.id=f,$.current.onLayout=o,$.current.storage=c}),tr({committedValuesRef:$,eagerValuesRef:g,groupId:f,layout:b,panelDataArray:g.current.panelDataArray,setLayout:w,panelGroupElement:v.current}),h.useEffect(()=>{const{panelDataArray:p}=g.current;if(t){if(b.length===0||b.length!==p.length)return;let z=mt[t];z==null&&(z=or(ar,cr),mt[t]=z);const M=[...p],P=new Map(j.current);z(t,M,P,b,c)}},[t,b,c]),h.useEffect(()=>{});const G=h.useCallback(p=>{const{onLayout:z}=$.current,{layout:M,panelDataArray:P}=g.current;if(p.constraints.collapsible){const y=P.map(se=>se.constraints),{collapsedSize:E=0,panelSize:U,pivotIndices:X}=fe(P,p,M);if(N(U!=null,`Panel size not found for panel "${p.id}"`),!ce(U,E)){j.current.set(p.id,U);const ie=ve(P,p)===P.length-1?U-E:E-U,q=je({delta:ie,initialLayout:M,panelConstraints:y,pivotIndices:X,prevLayout:M,trigger:"imperative-api"});Me(M,q)||(w(q),g.current.layout=q,z&&z(q),ge(P,q,I.current))}}},[]),W=h.useCallback((p,z)=>{const{onLayout:M}=$.current,{layout:P,panelDataArray:y}=g.current;if(p.constraints.collapsible){const E=y.map(ne=>ne.constraints),{collapsedSize:U=0,panelSize:X=0,minSize:se=0,pivotIndices:ie}=fe(y,p,P),q=z??se;if(ce(X,U)){const ne=j.current.get(p.id),Se=ne!=null&&ne>=q?ne:q,Ue=ve(y,p)===y.length-1?X-Se:Se-X,Q=je({delta:Ue,initialLayout:P,panelConstraints:E,pivotIndices:ie,prevLayout:P,trigger:"imperative-api"});Me(P,Q)||(w(Q),g.current.layout=Q,M&&M(Q),ge(y,Q,I.current))}}},[]),O=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{panelSize:P}=fe(M,p,z);return N(P!=null,`Panel size not found for panel "${p.id}"`),P},[]),A=h.useCallback((p,z)=>{const{panelDataArray:M}=g.current,P=ve(M,p);return ir({defaultSize:z,dragState:x,layout:b,panelData:M,panelIndex:P})},[x,b]),D=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{collapsedSize:P=0,collapsible:y,panelSize:E}=fe(M,p,z);return N(E!=null,`Panel size not found for panel "${p.id}"`),y===!0&&ce(E,P)},[]),V=h.useCallback(p=>{const{layout:z,panelDataArray:M}=g.current,{collapsedSize:P=0,collapsible:y,panelSize:E}=fe(M,p,z);return N(E!=null,`Panel size not found for panel "${p.id}"`),!y||he(E,P)>0},[]),_=h.useCallback(p=>{const{panelDataArray:z}=g.current;z.push(p),z.sort((M,P)=>{const y=M.order,E=P.order;return y==null&&E==null?0:y==null?-1:E==null?1:y-E}),g.current.panelDataArrayChanged=!0,C()},[C]);pe(()=>{if(g.current.panelDataArrayChanged){g.current.panelDataArrayChanged=!1;const{autoSaveId:p,onLayout:z,storage:M}=$.current,{layout:P,panelDataArray:y}=g.current;let E=null;if(p){const X=lr(p,y,M);X&&(j.current=new Map(Object.entries(X.expandToSizes)),E=X.layout)}E==null&&(E=sr({panelDataArray:y}));const U=ft({layout:E,panelConstraints:y.map(X=>X.constraints)});ut(P,U)||(w(U),g.current.layout=U,z&&z(U),ge(y,U,I.current))}}),pe(()=>{const p=g.current;return()=>{p.layout=[]}},[]);const L=h.useCallback(p=>{let z=!1;const M=v.current;return M&&window.getComputedStyle(M,null).getPropertyValue("direction")==="rtl"&&(z=!0),function(y){y.preventDefault();const E=v.current;if(!E)return()=>null;const{direction:U,dragState:X,id:se,keyboardResizeBy:ie,onLayout:q}=$.current,{layout:ne,panelDataArray:Se}=g.current,{initialLayout:Ne}=X??{},Ue=Tt(se,p,E);let Q=rr(y,p,U,X,ie,E);const rt=U==="horizontal";rt&&z&&(Q=-Q);const Zt=Se.map(en=>en.constraints),ze=je({delta:Q,initialLayout:Ne??ne,panelConstraints:Zt,pivotIndices:Ue,prevLayout:ne,trigger:Et(y)?"keyboard":"mouse-or-touch"}),st=!Me(ne,ze);(Nt(y)||$t(y))&&F.current!=Q&&(F.current=Q,!st&&Q!==0?rt?Ge(p,Q<0?It:Rt):Ge(p,Q<0?Dt:Lt):Ge(p,0)),st&&(w(ze),g.current.layout=ze,q&&q(ze),ge(Se,ze,I.current))}},[]),T=h.useCallback((p,z)=>{const{onLayout:M}=$.current,{layout:P,panelDataArray:y}=g.current,E=y.map(ne=>ne.constraints),{panelSize:U,pivotIndices:X}=fe(y,p,P);N(U!=null,`Panel size not found for panel "${p.id}"`);const ie=ve(y,p)===y.length-1?U-z:z-U,q=je({delta:ie,initialLayout:P,panelConstraints:E,pivotIndices:X,prevLayout:P,trigger:"imperative-api"});Me(P,q)||(w(q),g.current.layout=q,M&&M(q),ge(y,q,I.current))},[]),H=h.useCallback((p,z)=>{const{layout:M,panelDataArray:P}=g.current,{collapsedSize:y=0,collapsible:E}=z,{collapsedSize:U=0,collapsible:X,maxSize:se=100,minSize:ie=0}=p.constraints,{panelSize:q}=fe(P,p,M);q!=null&&(E&&X&&ce(q,y)?ce(y,U)||T(p,U):q<ie?T(p,ie):q>se&&T(p,se))},[T]),Y=h.useCallback((p,z)=>{const{direction:M}=$.current,{layout:P}=g.current;if(!v.current)return;const y=Oe(p,v.current);N(y,`Drag handle element not found for id "${p}"`);const E=Ot(M,z);k({dragHandleId:p,dragHandleRect:y.getBoundingClientRect(),initialCursorPosition:E,initialLayout:P})},[]),te=h.useCallback(()=>{k(null)},[]),B=h.useCallback(p=>{const{panelDataArray:z}=g.current,M=ve(z,p);M>=0&&(z.splice(M,1),delete I.current[p.id],g.current.panelDataArrayChanged=!0,C())},[C]),S=h.useMemo(()=>({collapsePanel:G,direction:r,dragState:x,expandPanel:W,getPanelSize:O,getPanelStyle:A,groupId:f,isPanelCollapsed:D,isPanelExpanded:V,reevaluatePanelConstraints:H,registerPanel:_,registerResizeHandle:L,resizePanel:T,startDragging:Y,stopDragging:te,unregisterPanel:B,panelGroupElement:v.current}),[G,x,r,W,O,A,f,D,V,H,_,L,T,Y,te,B]),R={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return h.createElement(Ae.Provider,{value:S},h.createElement(m,{...u,children:e,className:n,id:i,ref:v,style:{...R,...d},[K.group]:"",[K.groupDirection]:r,[K.groupId]:f}))}const Gt=h.forwardRef((t,e)=>h.createElement(Bt,{...t,forwardedRef:e}));Bt.displayName="PanelGroup";Gt.displayName="forwardRef(PanelGroup)";function ve(t,e){return t.findIndex(n=>n===e||n.id===e.id)}function fe(t,e,n){const r=ve(t,e),i=r===t.length-1?[r-1,r]:[r,r+1],o=n[r];return{...e.constraints,panelSize:o,pivotIndices:i}}function ur({disabled:t,handleId:e,resizeHandler:n,panelGroupElement:r}){h.useEffect(()=>{if(t||n==null||r==null)return;const s=Oe(e,r);if(s==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(),n(o);break}case"F6":{o.preventDefault();const l=s.getAttribute(K.groupId);N(l,`No group element found for id "${l}"`);const c=Ee(l,r),d=At(l,e,r);N(d!==null,`No resize element found for id "${e}"`);const m=o.shiftKey?d>0?d-1:c.length-1:d+1<c.length?d+1:0;c[m].focus();break}}};return s.addEventListener("keydown",i),()=>{s.removeEventListener("keydown",i)}},[r,t,e,n])}function qt({children:t=null,className:e="",disabled:n=!1,hitAreaMargins:r,id:s,onBlur:i,onClick:o,onDragging:l,onFocus:c,onPointerDown:d,onPointerUp:m,style:u={},tabIndex:f=0,tagName:v="div",...x}){var k,b;const w=h.useRef(null),C=h.useRef({onClick:o,onDragging:l,onPointerDown:d,onPointerUp:m});h.useEffect(()=>{C.current.onClick=o,C.current.onDragging=l,C.current.onPointerDown=d,C.current.onPointerUp=m});const I=h.useContext(Ae);if(I===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:j,groupId:F,registerResizeHandle:$,startDragging:g,stopDragging:G,panelGroupElement:W}=I,O=Ze(s),[A,D]=h.useState("inactive"),[V,_]=h.useState(!1),[L,T]=h.useState(null),H=h.useRef({state:A});pe(()=>{H.current.state=A}),h.useEffect(()=>{if(n)T(null);else{const S=$(O);T(()=>S)}},[n,O,$]);const Y=(k=r?.coarse)!==null&&k!==void 0?k:15,te=(b=r?.fine)!==null&&b!==void 0?b:5;h.useEffect(()=>{if(n||L==null)return;const S=w.current;N(S,"Element ref not attached");let R=!1;return Xn(O,S,j,{coarse:Y,fine:te},(z,M,P)=>{if(!M){D("inactive");return}switch(z){case"down":{D("drag"),R=!1,N(P,'Expected event to be defined for "down" action'),g(O,P);const{onDragging:y,onPointerDown:E}=C.current;y?.(!0),E?.();break}case"move":{const{state:y}=H.current;R=!0,y!=="drag"&&D("hover"),N(P,'Expected event to be defined for "move" action'),L(P);break}case"up":{D("hover"),G();const{onClick:y,onDragging:E,onPointerUp:U}=C.current;E?.(!1),U?.(),R||y?.();break}}})},[Y,j,n,te,$,O,L,g,G]),ur({disabled:n,handleId:O,resizeHandler:L,panelGroupElement:W});const B={touchAction:"none",userSelect:"none"};return h.createElement(v,{...x,children:t,className:e,id:s,onBlur:()=>{_(!1),i?.()},onFocus:()=>{_(!0),c?.()},ref:w,role:"separator",style:{...B,...u},tabIndex:f,[K.groupDirection]:j,[K.groupId]:F,[K.resizeHandle]:"",[K.resizeHandleActive]:A==="drag"?"pointer":V?"keyboard":void 0,[K.resizeHandleEnabled]:!n,[K.resizeHandleId]:O,[K.resizeHandleState]:A})}qt.displayName="PanelResizeHandle";function ls(t){const e=J.c(10);let n,r,s;e[0]!==t?({className:n,ref:s,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let i;e[4]!==n?(i=xe("flex h-full w-full data-[panel-group-direction=vertical]:flex-col",n),e[4]=n,e[5]=i):i=e[5];let o;return e[6]!==r||e[7]!==s||e[8]!==i?(o=a.jsx(Gt,{ref:s,"data-slot":"resizable-panel-group",className:i,...r}),e[6]=r,e[7]=s,e[8]=i,e[9]=o):o=e[9],o}function as(t){const e=J.c(4);let n;e[0]!==t?({...n}=t,e[0]=t,e[1]=n):n=e[1];let r;return e[2]!==n?(r=a.jsx(Ct,{"data-slot":"resizable-panel",...n}),e[2]=n,e[3]=r):r=e[3],r}function cs(t){const e=J.c(12);let n,r,s;e[0]!==t?({withHandle:s,className:n,...r}=t,e[0]=t,e[1]=n,e[2]=r,e[3]=s):(n=e[1],r=e[2],s=e[3]);let i;e[4]!==n?(i=xe("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",n),e[4]=n,e[5]=i):i=e[5];let o;e[6]!==s?(o=s&&a.jsx("div",{className:"bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border",children:a.jsx(fn,{className:"size-2.5"})}),e[6]=s,e[7]=o):o=e[7];let l;return e[8]!==r||e[9]!==i||e[10]!==o?(l=a.jsx(qt,{"data-slot":"resizable-handle",className:i,...r,children:o}),e[8]=r,e[9]=i,e[10]=o,e[11]=l):l=e[11],l}function dr(t){if(!t||t.includes("\\")||t.includes("..")||t.includes("\0"))return!0;try{const e=decodeURIComponent(t);if(e.includes("\\")||e.includes("..")||e.includes("\0"))return!0;if(e!==t&&e.includes("/")){const n=(t.match(/\//g)??[]).length;if((e.match(/\//g)??[]).length>n)return!0}return!1}catch{return!0}}function fr(t){if(dr(t))throw new Error(`Invalid block key: ${t||"(empty)"}`)}function mr(t){try{return decodeURIComponent(t)}catch{return t}}function pr(t){return fr(t),encodeURIComponent(t)}function hr(t){return`.deco/blocks/${pr(t)}.json`}function us(t){return`/${hr(t)}`}const ds=1e4,xr=3;function Je(t){return t.trim()?(t.startsWith("/")?t:`/${t}`).replace(/\/+/g,"/"):"/"}function nt(t){return t.startsWith("/")?t.slice(1):t}function _e(t){return t.trim()?t.startsWith("/")?t:`/${t}`:"/"}function gr(t){const e=_e(t);if(e==="/")return"/";const n=e.split("/").filter(Boolean);return n.pop(),n.length===0?"/":`/${n.join("/")}`}function fs(t,e){const n=e.replace(/^\/+|\/+$/g,"");return _e(n?`${t==="/"?"":t}/${n}`:t)}function ms(t,e){return e==="directory"?t:gr(t)}function ps(t){const e=t.trim();return e?e.includes("/")||e.includes("\\")||e.includes("..")||e.includes("\0")?"Name cannot contain /, \\, or ..":null:"Name is required"}function vr(t){const e=nt(t);return e?e.split("/").filter(Boolean).length:0}function hs(t,e,n,r=!1){return{files:[...new Set([...t,...n.files])],directories:[...new Set([...e,...n.directories??[]])],truncated:r||!!n.truncated}}function xs(t,e){return vr(t)>=xr&&!e.has(t)}function gs(t,e,n=[]){const r=nt(t);if(e.includes(r)||n.includes(r))return!0;if(!r)return!1;const s=`${r}/`;return e.some(i=>i.startsWith(s))||n.some(i=>i.startsWith(s))}function vs(t){const e=nt(t),n=".deco/blocks/";if(!e.startsWith(n)||!e.endsWith(".json"))return null;const r=e.slice(n.length,-5);return mr(r)}function wr(t){if(!t)return"plaintext";const e=t.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 ws(t){const e=Je(t).split("/").filter(Boolean),n=["/"];let r="";for(const s of e.slice(0,-1))r+=`/${s}`,n.push(r);return n}function ys(t,e=[]){const n={children:[]},r=i=>{const l=Je(i).split("/").filter(Boolean);let c=n,d="";for(const m of l){d+=`/${m}`;let u=c.children.find(f=>f.name===m);u?u.kind==="file"&&(u.kind="directory"):(u={name:m,path:d,kind:"directory",children:[]},c.children.push(u)),c=u}};for(const i of t){const l=Je(i).split("/").filter(Boolean);let c=n,d="";l.forEach((m,u)=>{d+=`/${m}`;const f=u===l.length-1;let v=c.children.find(x=>x.name===m);v||(v={name:m,path:d,kind:f?"file":"directory",children:[]},c.children.push(v)),c=v})}for(const i of e)r(_e(i));const s=i=>{i.sort((o,l)=>o.kind!==l.kind?o.kind==="directory"?-1:1:o.name.localeCompare(l.name));for(const o of i)o.children.length>0&&s(o.children)};return s(n.children),n.children}function yr(t,e,n=0){const r=[];for(const s of t)s.name!==".gitkeep"&&(r.push({node:s,depth:n}),s.kind==="directory"&&s.children.length>0&&e.has(s.path)&&r.push(...yr(s.children,e,n+1)));return r}function bs(t){return t.split(`
|
|
2
|
-
`).map(e=>{const n=e.match(/^\d+\t(.*)/);return n?n[1]:e}).join(`
|
|
3
|
-
`)}bn.config({paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.52.0/min/vs"}});function br(t){const e=J.c(11),{value:n,filename:r}=t,[s]=nn(),i=s.theme==="dark"||s.theme==="system"&&typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").matches;let o;e[0]!==r?(o=wr(r),e[0]=r,e[1]=o):o=e[1];const l=i?"vs-dark":"light";let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx("div",{className:"flex h-full w-full items-center justify-center",children:a.jsx(rn,{size:20,className:"animate-spin text-muted-foreground"})}),e[2]=c):c=e[2];let d,m;e[3]===Symbol.for("react.memo_cache_sentinel")?(d={enabled:!1},m={top:12,bottom:12},e[3]=d,e[4]=m):(d=e[3],m=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:m,renderLineHighlight:"none",scrollbar:{vertical:"auto",horizontal:"auto",verticalScrollbarSize:8,horizontalScrollbarSize:8}},e[5]=u):u=e[5];let f;return e[6]!==r||e[7]!==o||e[8]!==l||e[9]!==n?(f=a.jsx(Sn,{path:r,language:o,value:n,theme:l,loading:c,options:u},r),e[6]=r,e[7]=o,e[8]=l,e[9]=n,e[10]=f):f=e[10],f}function Kt(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:`${(t/(1024*1024)).toFixed(1)} MB`}const Sr=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),zr=new Set(["txt","json","csv","tsv","log","yaml","yml","xml","toml","ts","tsx","js","jsx","py","rb","go","rs","java","sh","sql"]),pt=2*1024*1024;function jr(t,e){const n=t.split(".").pop()?.toLowerCase()??"";return Sr.has(n)?"image":n==="pdf"?"pdf":n==="html"||n==="htm"?"html":n==="md"||n==="markdown"?e<=pt?"markdown":"download":zr.has(n)&&e<=pt?"text":"download"}function Vt(){const t=J.c(2);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=a.jsx($e,{className:"h-6 w-2/3"}),t[0]=e):e=t[0];let n;return t[1]===Symbol.for("react.memo_cache_sentinel")?(n=a.jsx("div",{className:"flex h-full w-full items-center justify-center",children:a.jsxs("div",{className:"flex w-3/4 max-w-md flex-col gap-3 p-6",children:[e,a.jsxs("div",{className:"flex flex-col gap-1.5",children:[a.jsx($e,{className:"h-3 w-full"}),a.jsx($e,{className:"h-3 w-5/6"}),a.jsx($e,{className:"h-3 w-2/3"})]})]})}),t[1]=n):n=t[1],n}function Xt(t){const e=J.c(20),{file:n,note:r}=t;let s;e[0]!==n.filename?(s=a.jsx(Xe,{filename:n.filename,className:"h-12 w-10"}),e[0]=n.filename,e[1]=s):s=e[1];let i;e[2]!==n.filename?(i=a.jsx("span",{className:"text-sm font-medium text-foreground",children:n.filename}),e[2]=n.filename,e[3]=i):i=e[3];let o;e[4]!==n.size?(o=Kt(n.size),e[4]=n.size,e[5]=o):o=e[5];const l=r?` · ${r}`:"";let c;e[6]!==o||e[7]!==l?(c=a.jsxs("span",{className:"text-xs text-muted-foreground",children:[o,l]}),e[6]=o,e[7]=l,e[8]=c):c=e[8];let d;e[9]!==i||e[10]!==c?(d=a.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 m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=a.jsx(Re,{size:14}),e[12]=m):m=e[12];let u;e[13]!==n.downloadUrl||e[14]!==n.filename?(u=a.jsx(Z,{asChild:!0,variant:"outline",size:"sm",children:a.jsxs("a",{href:n.downloadUrl,download:n.filename,children:[m,"Download"]})}),e[13]=n.downloadUrl,e[14]=n.filename,e[15]=u):u=e[15];let f;return e[16]!==s||e[17]!==d||e[18]!==u?(f=a.jsx("div",{className:"flex h-full w-full items-center justify-center",children:a.jsxs("div",{className:"flex flex-col items-center gap-3 rounded-xl border border-border bg-muted/30 px-10 py-8",children:[s,d,u]})}),e[16]=s,e[17]=d,e[18]=u,e[19]=f):f=e[19],f}function ht(t){const e=J.c(16),{file:n,markdown:r}=t;let s;e[0]!==n.downloadUrl?(s=Ke.fileText(n.downloadUrl),e[0]=n.downloadUrl,e[1]=s):s=e[1];let i;e[2]!==n.downloadUrl?(i=async()=>{const u=await fetch(n.downloadUrl,{credentials:"include"});if(!u.ok)throw new Error(`fetch failed: ${u.status}`);return u.text()},e[2]=n.downloadUrl,e[3]=i):i=e[3];let o;e[4]!==s||e[5]!==i?(o={queryKey:s,queryFn:i,staleTime:6e4,retry:!1},e[4]=s,e[5]=i,e[6]=o):o=e[6];const{data:l,isPending:c,isError:d}=sn(o);if(c){let u;return e[7]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx(Vt,{}),e[7]=u):u=e[7],u}if(d||l===void 0){let u;return e[8]!==n?(u=a.jsx(Xt,{file:n,note:"preview unavailable"}),e[8]=n,e[9]=u):u=e[9],u}if(r){const u=`file-preview-${n.key}`;let f;return e[10]!==l||e[11]!==u?(f=a.jsx("div",{className:"h-full overflow-y-auto",children:a.jsx("div",{className:"prose prose-sm dark:prose-invert mx-auto max-w-3xl px-6 py-6",children:a.jsx(zn,{id:u,text:l})})}),e[10]=l,e[11]=u,e[12]=f):f=e[12],f}let m;return e[13]!==l||e[14]!==n.filename?(m=a.jsx(br,{value:l,filename:n.filename}),e[13]=l,e[14]=n.filename,e[15]=m):m=e[15],m}function kr(t){const e=J.c(15),{file:n}=t;switch(jr(n.filename,n.size)){case"image":{let s;return e[0]!==n.downloadUrl||e[1]!==n.filename?(s=a.jsx("div",{className:"flex h-full w-full items-center justify-center overflow-auto bg-muted/30 p-4",children:a.jsx("img",{src:n.downloadUrl,alt:n.filename,className:"max-h-full max-w-full rounded-lg object-contain"})}),e[0]=n.downloadUrl,e[1]=n.filename,e[2]=s):s=e[2],s}case"pdf":{let s;return e[3]!==n.downloadUrl||e[4]!==n.filename?(s=a.jsx("iframe",{src:n.downloadUrl,title:n.filename,className:"block h-full w-full bg-white"}),e[3]=n.downloadUrl,e[4]=n.filename,e[5]=s):s=e[5],s}case"html":{let s;return e[6]!==n.downloadUrl||e[7]!==n.filename?(s=a.jsx("iframe",{src:n.downloadUrl,title:n.filename,sandbox:"allow-scripts",className:"block h-full w-full bg-white"}),e[6]=n.downloadUrl,e[7]=n.filename,e[8]=s):s=e[8],s}case"markdown":{let s;return e[9]!==n?(s=a.jsx(ht,{file:n,markdown:!0}),e[9]=n,e[10]=s):s=e[10],s}case"text":{let s;return e[11]!==n?(s=a.jsx(ht,{file:n,markdown:!1}),e[11]=n,e[12]=s):s=e[12],s}default:{let s;return e[13]!==n?(s=a.jsx(Xt,{file:n}),e[13]=n,e[14]=s):s=e[14],s}}}function Pr(t){const e=J.c(40),{readUrl:n,editor:r,downloadName:s,trailing:i}=t;let o;e[0]!==n?(o=new URL(n,window.location.origin).toString(),e[0]=n,e[1]=o):o=e[1];const l=o;let c;e[2]!==r?(c=r.deckDetected&&a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:r.railOpen?"secondary":"ghost",size:"icon","aria-label":r.railOpen?"Hide slide list":"Show slide list",onClick:()=>r.setRailOpen(!r.railOpen),children:a.jsx(Cn,{size:14})})}),a.jsx(ae,{side:"bottom",children:r.railOpen?"Hide slide list":"Show slide list"})]}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==l?(d=()=>window.open(l,"_blank","noopener"),e[4]=l,e[5]=d):d=e[5];let m;e[6]!==l?(m=a.jsx("span",{className:"truncate",children:l}),e[6]=l,e[7]=m):m=e[7];let u;e[8]!==l||e[9]!==d||e[10]!==m?(u=a.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:l,children:m}),e[8]=l,e[9]=d,e[10]=m,e[11]=u):u=e[11];let f;e[12]!==r.agentUpdated||e[13]!==r.reload?(f=r.agentUpdated&&a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1 text-xs",onClick:r.reload,children:[a.jsx(on,{size:12}),"Agent updated — reload"]})}),a.jsx(ae,{side:"bottom",children:"The agent rewrote this deck while you were editing. Reloading discards unsaved differences."})]}),e[12]=r.agentUpdated,e[13]=r.reload,e[14]=f):f=e[14];let v;e[15]!==r.saving?(v=r.saving&&a.jsx("span",{className:"px-1 text-xs text-muted-foreground",children:"Saving…"}),e[15]=r.saving,e[16]=v):v=e[16];let x;e[17]!==r?(x=r.deckDetected&&r.writable&&a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:r.editMode?"secondary":"ghost",size:"icon","aria-label":r.editMode?"Done editing":"Edit inline",className:xe(r.editMode&&"text-primary"),onClick:()=>r.setEditMode(!r.editMode),children:a.jsx(mn,{size:14})})}),a.jsx(ae,{side:"bottom",children:r.editMode?"Done editing":"Edit inline (text, reorder, delete)"})]}),e[17]=r,e[18]=x):x=e[18];let k;e[19]!==l||e[20]!==s||e[21]!==r.deckDetected?(k=r.deckDetected?a.jsxs(jn,{children:[a.jsx(kn,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",children:a.jsx(Re,{size:14})})}),a.jsxs(Pn,{align:"end",children:[a.jsxs(it,{onClick:()=>window.open(`${l}#print`,"_blank","noopener"),children:[a.jsx(pn,{size:14}),"Export as PDF"]}),a.jsx(it,{asChild:!0,children:a.jsxs("a",{href:l,download:s,children:[a.jsx(hn,{size:14}),"Download HTML"]})})]})]}):a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Download",asChild:!0,children:a.jsx("a",{href:l,download:s,children:a.jsx(Re,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Download"})]}),e[19]=l,e[20]=s,e[21]=r.deckDetected,e[22]=k):k=e[22];let b;e[23]!==l?(b=()=>window.open(l,"_blank","noopener"),e[23]=l,e[24]=b):b=e[24];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=a.jsx(zt,{size:14}),e[25]=w):w=e[25];let C;e[26]!==b?(C=a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Open in new tab",onClick:b,children:w})}),e[26]=b,e[27]=C):C=e[27];let I;e[28]===Symbol.for("react.memo_cache_sentinel")?(I=a.jsx(ae,{side:"bottom",children:"Open in new tab"}),e[28]=I):I=e[28];let j;e[29]!==C?(j=a.jsxs(oe,{children:[C,I]}),e[29]=C,e[30]=j):j=e[30];let F;return e[31]!==j||e[32]!==c||e[33]!==u||e[34]!==f||e[35]!==v||e[36]!==x||e[37]!==k||e[38]!==i?(F=a.jsxs("div",{className:"flex h-9 shrink-0 items-center gap-1 border-b border-border/60 px-2",children:[c,u,f,v,x,k,j,i]}),e[31]=j,e[32]=c,e[33]=u,e[34]=f,e[35]=v,e[36]=x,e[37]=k,e[38]=i,e[39]=F):F=e[39],F}const we=1;function Cr(t){if(typeof t!="object"||t===null||t.v!==we||t.source!=="deck-viewer")return null;const e=t;return e.type==="ready"||e.type==="state"||e.type==="op"&&typeof e.opId=="string"&&e.op?e:null}class ue extends Error{constructor(e,n){super(e),this.code=n,this.name="DeckOpError"}code}function Yt(t){return[...t.children].filter(e=>!/^(TEMPLATE|SCRIPT|STYLE)$/.test(e.tagName))}function Er(t){const n=new DOMParser().parseFromString(t,"text/html").querySelector("deck-viewer");return n?Yt(n).length:null}function Nr(t,e){const n=new DOMParser().parseFromString(t,"text/html"),r=n.querySelector("deck-viewer");if(!r)throw new ue("no <deck-viewer> element in source","no-viewer");const s=Yt(r),i=e.kind==="move"?e.from:e.at,o=s[i];if(!o)throw new ue(`slide index ${i} out of range (${s.length})`,"stale-index");switch(e.kind){case"remove":{if(s.length<=1)throw new ue("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>=s.length)throw new ue(`move target ${e.to} out of range`,"stale-index");if(e.to!==e.from){const c=e.to<e.from?s[e.to]:s[e.to].nextSibling;r.insertBefore(o,c)}break}case"set-attr":{if(!/^[a-zA-Z][\w-]*$/.test(e.name))throw new ue(`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 ue("replace html has no root element","bad-op");o.replaceWith(n.importNode(d,!0));break}default:throw new ue(`unknown op kind: ${e.kind}`,"bad-op")}return`${t.trimStart().toLowerCase().startsWith("<!doctype")?`<!DOCTYPE html>
|
|
4
|
-
`:""}${n.documentElement.outerHTML}
|
|
5
|
-
`}const xt="home",$r=400,Mr=800;function Ir(t){const e=t.savePath!==void 0,{org:n}=ln(),r=an(),s=En(xt),[i,o]=h.useState(!1),[l,c]=h.useState(!1),[d,m]=h.useState(!1),[u,f]=h.useState(!1),[v,x]=h.useState(!1),[k,b]=h.useState(!1),[w,C]=h.useState(null),[I,j]=h.useState(null),[F,$]=h.useState(0),[g]=h.useState(()=>({iframe:null,source:null,queue:Promise.resolve(),saveTimer:null,selfMarkers:new Set})),G=i||k||v,W=()=>{t.savePath!==void 0&&(r.invalidateQueries({queryKey:Ke.orgFsStat(n.id,xt,t.savePath)}),r.invalidateQueries({queryKey:Ke.orgFsRecent(n.id)}))},O=S=>{g.iframe?.contentWindow?.postMessage(S,"*")},A=()=>{g.source=null,f(!1),I&&C(I),$(S=>S+1),W()};t.statMarker!==I&&(j(t.statMarker),t.statMarker!==null&&(w===null?C(t.statMarker):g.selfMarkers.has(t.statMarker)||t.statMarker!==w&&(G?f(!0):(g.source=null,C(t.statMarker)))));const D=async()=>{g.saveTimer=null;const S=g.source;if(S===null){b(!1);return}x(!0);try{const R=await s.mutateAsync({path:t.savePath,body:S});g.selfMarkers.add(jt(R)),W()}catch(R){console.error("[deck-editor] save failed",R),Pe.error("Couldn't save deck edits — reloading the preview."),H.current.reload()}finally{x(!1),b(!1)}},V=S=>{b(!0),g.saveTimer&&clearTimeout(g.saveTimer),g.saveTimer=setTimeout(()=>{H.current.flushSave()},S)},_=(S,R,p)=>{O({v:we,type:"ack",opId:S,ok:R,error:p})},L=async S=>{if(!e){_(S.opId,!1,"read-only preview");return}try{if(g.source===null){const p=await fetch(t.readUrl,{credentials:"include"});if(!p.ok)throw new Error(`HTTP ${p.status}`);g.source=await p.text()}const R=Er(g.source);if(R===null||R!==S.witness.childCount)throw new ue(`slide count drifted (source ${R}, iframe ${S.witness.childCount})`,"stale-index");g.source=Nr(g.source,S.op),_(S.opId,!0),V(S.op.kind==="replace"?Mr:$r)}catch(R){console.error("[deck-editor] op failed",S.op,R),_(S.opId,!1,R instanceof Error?R.message:String(R)),Pe.error("That edit couldn't be saved — reloading the preview."),H.current.reload()}},T=S=>{if(!g.iframe||S.source!==g.iframe.contentWindow)return;const R=Cr(S.data);if(R){if(R.type==="ready"){c(!0),H.current.editMode?O({v:we,type:"set-edit-mode",enabled:!0}):H.current.railOpen&&O({v:we,type:"set-rail",open:!0});return}R.type==="op"&&(g.queue=g.queue.then(()=>H.current.handleOp(R)).catch(()=>{}))}},H=h.useRef({onMessage:T,handleOp:L,flushSave:D,reload:A,editMode:i,railOpen:d});H.current={onMessage:T,handleOp:L,flushSave:D,reload:A,editMode:i,railOpen:d};const[Y]=h.useState(()=>{let S=null;return R=>{if(R){g.iframe=R;const p=z=>H.current.onMessage(z);window.addEventListener("message",p),S=()=>window.removeEventListener("message",p)}else S?.(),S=null,g.iframe=null}}),te=S=>{m(S),O({v:we,type:"set-rail",open:S})},B=S=>{o(S),O({v:we,type:"set-edit-mode",enabled:S}),S&&m(!0),!S&&u&&!k&&!v&&A()};return{iframeRef:Y,deckDetected:l,writable:e,displayedMarker:w===null?null:`${w}.${F}`,editMode:i,setEditMode:B,railOpen:d,setRailOpen:te,saving:v,agentUpdated:u,reload:A,postToIframe:O}}const Rr=300;function Dr({readUrl:t,marker:e,title:n,savePath:r,trailing:s}){const i=Ir({readUrl:t,statMarker:e,savePath:r}),[o,l]=h.useState(null);if(i.displayedMarker===null)return null;const c=t.includes("?")?"&":"?",d=`${t}${c}v=${encodeURIComponent(i.displayedMarker)}`,m=o===d;return a.jsxs("div",{className:"flex h-full w-full flex-col bg-background",children:[a.jsx(Pr,{readUrl:t,editor:i,downloadName:n.split("/").pop()??n,trailing:s}),a.jsx("div",{className:"relative flex-1",children:a.jsx("iframe",{ref:i.iframeRef,src:d,onLoad:()=>l(d),sandbox:"allow-scripts",className:xe("absolute inset-0 block h-full w-full bg-white","transition-opacity ease-out",m?"opacity-100":"opacity-0"),style:{transitionDuration:`${Rr}ms`},title:n},d)})]})}const Lr=[{mode:"private",label:"Org only",Icon:cn},{mode:"public",label:"Public",Icon:St},{mode:"password",label:"Password",Icon:An}];function Jt(t){const e=J.c(38),{volume:n,path:r,kind:s,shareMode:i,effectivePublic:o,url:l}=t,c=Nn(n),{data:d}=kt(n,r),m=d?.shareMode??i,f=(d?.effectivePublic??o)&&m==="private",v=s==="dir",x=v?"folder":"file",[k,b]=h.useState(!1),[w,C]=h.useState(""),[I,j]=h.useState(!1);let F;e[0]!==r||e[1]!==c||e[2]!==x?(F=(B,S)=>{c.mutate({path:r,mode:B,password:S},{onSuccess:()=>{b(!1),C(""),Pe.success(B==="private"?`This ${x} is now org-only`:B==="public"?`Anyone with the link can now view this ${x}`:`This ${x} is now password-protected`)},onError:_r})},e[0]=r,e[1]=c,e[2]=x,e[3]=F):F=e[3];const $=F;let g;e[4]!==$?(g=B=>{if(B==="password"){b(!0);return}b(!1),$(B)},e[4]=$,e[5]=g):g=e[5];const G=g,W=k?"password":m;let O;e[6]!==l?(O=async()=>{l&&(await navigator.clipboard.writeText(l),j(!0),Pe.success("Link copied to clipboard"),setTimeout(()=>j(!1),2e3))},e[6]=l,e[7]=O):O=e[7];const A=O;let D;e[8]!==I||e[9]!==A||e[10]!==l?(D=l?a.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-input bg-muted/50 px-2 py-1.5",children:[a.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:l}),a.jsx(Z,{variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:A,"aria-label":"Copy link",children:I?a.jsx(Ln,{size:12,className:"text-green-600"}):a.jsx(_n,{size:12})})]}):null,e[8]=I,e[9]=A,e[10]=l,e[11]=D):D=e[11];const V=D;if(f){let B;e[12]===Symbol.for("react.memo_cache_sentinel")?(B=a.jsx("div",{className:"mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full bg-muted text-muted-foreground",children:a.jsx(St,{size:16})}),e[12]=B):B=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=a.jsx("span",{className:"text-sm font-medium text-foreground",children:"Shared via a parent folder"}),e[13]=S):S=e[13];const R=v?"files in this folder":"this file";let p;e[14]!==R?(p=a.jsxs("div",{className:"flex items-start gap-3",children:[B,a.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[S,a.jsxs("span",{className:"text-xs text-muted-foreground",children:["Anyone with the link can view"," ",R,". Manage sharing on the parent folder."]})]})]}),e[14]=R,e[15]=p):p=e[15];let z;return e[16]!==V||e[17]!==p?(z=a.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[p,V]}),e[16]=V,e[17]=p,e[18]=z):z=e[18],z}let _;e[19]!==W||e[20]!==G||e[21]!==c.isPending?(_=Lr.map(B=>{const{mode:S,label:R,Icon:p}=B;return a.jsxs("button",{type:"button",disabled:c.isPending,onClick:()=>G(S),className:xe("flex flex-col items-center gap-1 rounded-md px-2 py-2 text-xs font-medium transition-colors disabled:opacity-60",W===S?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:[a.jsx(p,{size:15}),R]},S)}),e[19]=W,e[20]=G,e[21]=c.isPending,e[22]=_):_=e[22];let L;e[23]!==_?(L=a.jsx("div",{className:"grid grid-cols-3 gap-1 rounded-lg bg-muted p-1",children:_}),e[23]=_,e[24]=L):L=e[24];const T=W==="private"?`Only members of your organization can open ${v?"these files":"this link"}.`:W==="public"?v?"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 ${v?"files in this folder":"this file"}.`;let H;e[25]!==T?(H=a.jsx("p",{className:"text-xs text-muted-foreground",children:T}),e[25]=T,e[26]=H):H=e[26];let Y;e[27]!==W||e[28]!==$||e[29]!==m||e[30]!==w||e[31]!==c.isPending?(Y=W==="password"&&a.jsxs("form",{className:"flex items-center gap-2",onSubmit:B=>{B.preventDefault(),w&&$("password",w)},children:[a.jsx(Mn,{type:"password",value:w,onChange:B=>C(B.target.value),placeholder:m==="password"?"New password":"Password",autoComplete:"new-password",className:"h-8 text-xs"}),a.jsx(Z,{type:"submit",size:"sm",className:"shrink-0",disabled:!w||c.isPending,children:m==="password"?"Update":"Set"})]}),e[27]=W,e[28]=$,e[29]=m,e[30]=w,e[31]=c.isPending,e[32]=Y):Y=e[32];let te;return e[33]!==V||e[34]!==L||e[35]!==H||e[36]!==Y?(te=a.jsxs("div",{className:"flex w-full min-w-0 flex-col gap-3",children:[L,H,Y,V]}),e[33]=V,e[34]=L,e[35]=H,e[36]=Y,e[37]=te):te=e[37],te}function _r(t){return Pe.error(t instanceof Error?t.message:"Failed to update sharing")}function gt(t){const e=J.c(7),{volume:n,path:r,shareMode:s,effectivePublic:i,url:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(In,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon","aria-label":"Share",children:a.jsx(xn,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Share"})]}),e[0]=l):l=e[0];let c;return e[1]!==i||e[2]!==r||e[3]!==s||e[4]!==o||e[5]!==n?(c=a.jsxs(Rn,{children:[l,a.jsx(Dn,{align:"end",className:"w-80 p-3",children:a.jsx(Jt,{volume:n,path:r,kind:"file",shareMode:s,effectivePublic:i,url:o})})]}),e[1]=i,e[2]=r,e[3]=s,e[4]=o,e[5]=n,e[6]=c):c=e[6],c}function Ss(t){const e=J.c(11),{target:n,onOpenChange:r}=t,s=!!n,i=n?.kind==="dir"?"folder":"file";let o;e[0]!==i?(o=a.jsx(wn,{children:a.jsxs(Ve,{children:["Share ",i]})}),e[0]=i,e[1]=o):o=e[1];let l;e[2]!==n?(l=n&&a.jsx(Jt,{...n}),e[2]=n,e[3]=l):l=e[3];let c;e[4]!==o||e[5]!==l?(c=a.jsxs(yt,{className:"sm:max-w-md",children:[o,l]}),e[4]=o,e[5]=l,e[6]=c):c=e[6];let d;return e[7]!==r||e[8]!==s||e[9]!==c?(d=a.jsx(bt,{open:s,onOpenChange:r,children:c}),e[7]=r,e[8]=s,e[9]=c,e[10]=d):d=e[10],d}function Ar(t){const e=t?t.split("/").filter(Boolean):[],n=e[0]==="public",r=n?e[1]??null:null,s=n?r?`public-${r}`:null:e[0]??null,i=(n?e.slice(2):e.slice(1)).join("/");return{segments:e,volume:s,dirPath:i,isPublic:n,publicSet:r,readOnly:n}}function zs(t,e){return t.isPublic&&t.publicSet?`public/${t.publicSet}/${e}`:t.volume?`${t.volume}/${e}`:e}const vt="public-";function Tr(t){return t.startsWith(vt)?t.slice(vt.length):null}function js(t,e){const n=Tr(t);return n?`public/${n}/${e}`:`${t}/${e}`}function Hr(t){const e=t.lastIndexOf("/");return e===-1?t:t.slice(e+1)}function Or(t){const e=J.c(11),{org:n,previewPath:r}=t;let s;e[0]!==r?(s=r.split("/").slice(0,-1).join("/"),e[0]=r,e[1]=s):s=e[1];const i=s;let o;e[2]!==n?(o={org:n},e[2]=n,e[3]=o):o=e[3];let l;e[4]!==i||e[5]!==r?(l={path:i,preview:r},e[4]=i,e[5]=r,e[6]=l):l=e[6];let c;e[7]===Symbol.for("react.memo_cache_sentinel")?(c=a.jsx(gn,{size:14}),e[7]=c):c=e[7];let d;return e[8]!==o||e[9]!==l?(d=a.jsx(Z,{variant:"ghost",size:"sm",asChild:!0,className:"shrink-0 gap-1.5 text-xs text-muted-foreground",children:a.jsxs(un,{to:"/$org/files",params:o,search:l,children:[c,"See in library"]})}),e[8]=o,e[9]=l,e[10]=d):d=e[10],d}const Ur=t=>/\.html?$/i.test(t);function wt(t){const e=J.c(6),{onClose:n}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(yn,{size:14}),e[0]=r):r=e[0];let s;e[1]!==n?(s=a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",onClick:n,children:r})}),e[1]=n,e[2]=s):s=e[2];let i;e[3]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx(ae,{side:"bottom",children:"Close"}),e[3]=i):i=e[3];let o;return e[4]!==s?(o=a.jsxs(oe,{children:[s,i]}),e[4]=s,e[5]=o):o=e[5],o}function Qt(t){const e=J.c(37),{previewPath:n,onClose:r,showSeeInLibrary:s,variant:i}=t,o=s===void 0?!1:s;let l;e[0]!==n?(l=Ar(n),e[0]=n,e[1]=l):l=e[1];const c=l,{volume:d,dirPath:m}=c,{data:u,isPending:f}=kt(d,m),v=$n(d??""),x=Hr(m);let k;e[2]===Symbol.for("react.memo_cache_sentinel")?(k={strict:!1},e[2]=k):k=e[2];const{org:b}=dn(k),w=i==="dialog";let C;e[3]!==b||e[4]!==n||e[5]!==o?(C=o&&b?a.jsx(Or,{org:b,previewPath:n}):null,e[3]=b,e[4]=n,e[5]=o,e[6]=C):C=e[6];const I=C,j=u&&u.kind==="file"?{key:n,filename:x,size:u.size,downloadUrl:v(u.path)}:null;if(j&&u&&Ur(x)){const O=j.downloadUrl;let A;e[7]!==u?(A=jt(u),e[7]=u,e[8]=A):A=e[8];const D=d??"",V=u.shareMode??"private",_=u.effectivePublic??!1,L=window.location.origin+j.downloadUrl;let T;e[9]!==m||e[10]!==L||e[11]!==D||e[12]!==V||e[13]!==_?(T=a.jsx(gt,{volume:D,path:m,shareMode:V,effectivePublic:_,url:L}),e[9]=m,e[10]=L,e[11]=D,e[12]=V,e[13]=_,e[14]=T):T=e[14];let H;e[15]!==w||e[16]!==r?(H=w?a.jsx("div",{className:"w-8 shrink-0"}):a.jsx(wt,{onClose:r}),e[15]=w,e[16]=r,e[17]=H):H=e[17];let Y;return e[18]!==I||e[19]!==T||e[20]!==H?(Y=a.jsxs(a.Fragment,{children:[T,I,H]}),e[18]=I,e[19]=T,e[20]=H,e[21]=Y):Y=e[21],a.jsxs(a.Fragment,{children:[w&&a.jsx(Ve,{className:"sr-only",children:x}),a.jsx(Dr,{readUrl:O,marker:A,title:x,savePath:d==="home"?m:void 0,trailing:Y},n)]})}const F=w?"h-11 py-1 pr-12 pl-2":"h-9 px-2";let $;e[22]!==F?($=xe("flex shrink-0 items-center gap-1 border-b border-border/60",F),e[22]=F,e[23]=$):$=e[23];let g;e[24]!==u?.effectivePublic||e[25]!==u?.shareMode||e[26]!==j||e[27]!==m||e[28]!==d?(g=j&&a.jsxs(a.Fragment,{children:[a.jsx(gt,{volume:d??"",path:m,shareMode:u?.shareMode??"private",effectivePublic:u?.effectivePublic??!1,url:window.location.origin+j.downloadUrl}),a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",asChild:!0,children:a.jsx("a",{href:j.downloadUrl,download:j.filename,children:a.jsx(Re,{size:14})})})}),a.jsx(ae,{side:"bottom",children:"Download"})]}),a.jsxs(oe,{children:[a.jsx(le,{asChild:!0,children:a.jsx(Z,{variant:"ghost",size:"icon",onClick:()=>window.open(j.downloadUrl,"_blank","noopener"),children:a.jsx(zt,{size:14})})}),a.jsx(ae,{side:"bottom",children:"Open in new tab"})]})]}),e[24]=u?.effectivePublic,e[25]=u?.shareMode,e[26]=j,e[27]=m,e[28]=d,e[29]=g):g=e[29];let G;e[30]!==w||e[31]!==r?(G=!w&&a.jsx(wt,{onClose:r}),e[30]=w,e[31]=r,e[32]=G):G=e[32];let W;return e[33]!==j||e[34]!==x||e[35]!==f?(W=a.jsx("div",{className:"relative min-h-0 flex-1 bg-background",children:j?a.jsx(kr,{file:j}):f?a.jsx(Vt,{}):a.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2",children:[a.jsx(Xe,{filename:x,className:"h-7.5 w-6"}),a.jsx("span",{className:"text-sm text-muted-foreground",children:"This file is no longer available."})]})}),e[33]=j,e[34]=x,e[35]=f,e[36]=W):W=e[36],a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:$,children:[a.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-2 px-2",children:[a.jsx(Xe,{filename:x,className:"h-4.5 w-3.5 shrink-0"}),w?a.jsx(Ve,{className:"truncate text-xs font-medium text-foreground",children:x}):a.jsx("span",{className:"truncate text-xs font-medium text-foreground",children:x}),j&&a.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:Kt(j.size)})]}),I,g,G]}),W]})}function ks(t){const e=J.c(4),{previewPath:n,onClose:r,showSeeInLibrary:s}=t,i=s===void 0?!1:s;let o;return e[0]!==r||e[1]!==n||e[2]!==i?(o=a.jsx("div",{className:"flex h-full w-full flex-col bg-background",children:a.jsx(Qt,{previewPath:n,onClose:r,showSeeInLibrary:i,variant:"panel"})}),e[0]=r,e[1]=n,e[2]=i,e[3]=o):o=e[3],o}function Fr(t){const e=J.c(5),{icon:n}=t;if(n.kind==="component"){const{Component:s}=n;let i;return e[0]!==s?(i=a.jsx(s,{className:"size-4"}),e[0]=s,e[1]=i):i=e[1],i}if(n.kind==="url"){let s;return e[2]!==n.src?(s=a.jsx("img",{src:n.src,alt:"",className:"size-4 rounded-sm object-cover"}),e[2]=n.src,e[3]=s):s=e[3],s}let r;return e[4]===Symbol.for("react.memo_cache_sentinel")?(r=a.jsx(vn,{className:"size-4"}),e[4]=r):r=e[4],r}function Ps(t){const e=J.c(13),{title:n,icon:r,active:s,onClick:i}=t,o=s?"bg-sidebar-accent text-sidebar-foreground":"text-sidebar-foreground/60 hover:bg-sidebar-accent hover:text-sidebar-foreground";let l;e[0]!==o?(l=xe("shrink-0 flex items-center gap-1.5 h-8 rounded-md px-2","[transition:background-color_180ms_ease,color_180ms_ease]",o),e[0]=o,e[1]=l):l=e[1];let c;e[2]!==r?(c=a.jsx("span",{className:"flex size-5 items-center justify-center shrink-0",children:a.jsx(Fr,{icon:r})}),e[2]=r,e[3]=c):c=e[3];let d;e[4]!==n?(d=a.jsx("span",{className:"whitespace-nowrap text-sm font-medium leading-none",children:n}),e[4]=n,e[5]=d):d=e[5];let m;return e[6]!==s||e[7]!==i||e[8]!==l||e[9]!==c||e[10]!==d||e[11]!==n?(m=a.jsxs("button",{type:"button",onClick:i,"aria-pressed":s,"aria-label":n,className:l,children:[c,d]}),e[6]=s,e[7]=i,e[8]=l,e[9]=c,e[10]=d,e[11]=n,e[12]=m):m=e[12],m}function Cs(t){const e=J.c(9),{previewPath:n,onClose:r,showSeeInLibrary:s}=t,i=s===void 0?!1:s;let o;e[0]!==r?(o=d=>{d||r()},e[0]=r,e[1]=o):o=e[1];let l;e[2]!==r||e[3]!==n||e[4]!==i?(l=a.jsx(yt,{className:"flex h-[88vh] w-[94vw] max-w-none! flex-col gap-0 overflow-hidden p-0 sm:max-w-5xl!",children:a.jsx(Qt,{previewPath:n,onClose:r,showSeeInLibrary:i,variant:"dialog"})}),e[2]=r,e[3]=n,e[4]=i,e[5]=l):l=e[5];let c;return e[6]!==o||e[7]!==l?(c=a.jsx(bt,{open:!0,onOpenChange:o,children:l}),e[6]=o,e[7]=l,e[8]=c):c=e[8],c}export{gr as A,fs as B,gs as C,vs as D,xr as E,Vt as F,hs as G,Dr as H,ks as L,ls as R,Ss as S,Fr as T,us as a,fr as b,kr as c,hr as d,gt as e,Kt as f,wr as g,cs as h,as as i,Ps as j,Cs as k,Hr as l,zs as m,Tr as n,js as o,Ar as p,ds as q,ws as r,ys as s,yr as t,ms as u,nt as v,_e as w,xs as x,bs as y,ps as z};
|