decocms 3.73.1 → 3.74.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-DMqR3m0L.js → AlertCircle-Ccspj6_x.js} +1 -1
- package/dist/client/assets/ArrowRight-DjM-WAe8.js +1 -0
- package/dist/client/assets/{ArrowUpRight-DeYzuaJ8.js → ArrowUpRight-tJm1fmd7.js} +1 -1
- package/dist/client/assets/Check-D3J8f8u-.js +1 -0
- package/dist/client/assets/{CheckCircle-D6b8lFUP.js → CheckCircle-2NPq-6dO.js} +1 -1
- package/dist/client/assets/{ChevronDown-CYFvWHpZ.js → ChevronDown-Dilz0yBl.js} +1 -1
- package/dist/client/assets/{ChevronLeft-DXSAgzPw.js → ChevronLeft-CJ5DBM3M.js} +1 -1
- package/dist/client/assets/{ChevronRight-Dj41DV2U.js → ChevronRight-KEtpzT4P.js} +1 -1
- package/dist/client/assets/ChevronUp-B5x1falF.js +1 -0
- package/dist/client/assets/{DotsVertical-y5lMfVOQ.js → DotsVertical-BM5d8Pc7.js} +1 -1
- package/dist/client/assets/{Eye-D3THRXh6.js → Eye-hHNCwVZ1.js} +1 -1
- package/dist/client/assets/{FilterLines-BPeCeYIz.js → FilterLines-DfVdVEBp.js} +1 -1
- package/dist/client/assets/{Globe01-BquIL2vg.js → Globe01-DD8UM4Hn.js} +1 -1
- package/dist/client/assets/{Globe04-BBRZWdJY.js → Globe04-CHjKQaGv.js} +1 -1
- package/dist/client/assets/{HardDrive-DmtpWveq.js → HardDrive-ClhqImrT.js} +1 -1
- package/dist/client/assets/{Key01-Lcx9qTy7.js → Key01-BYHEvjL0.js} +1 -1
- package/dist/client/assets/{LayoutLeft-CkiSxkS_.js → LayoutLeft-BNwcfVCc.js} +1 -1
- package/dist/client/assets/{LinkExternal01-jwO28Eeb.js → LinkExternal01-BqsD3A6i.js} +1 -1
- package/dist/client/assets/{Monitor01-L6hrk62b.js → Monitor01-BqllG5YD.js} +1 -1
- package/dist/client/assets/{Palette-ClNyQOQA.js → Palette-CdtyN2t7.js} +1 -1
- package/dist/client/assets/{Play-C6QgiUls.js → Play-DpX5JUyA.js} +1 -1
- package/dist/client/assets/{Plus-_82_8sq8.js → Plus-BaLwS14l.js} +1 -1
- package/dist/client/assets/{SearchMd-C3Pmxf99.js → SearchMd-CJ_dFCp5.js} +1 -1
- package/dist/client/assets/{Settings02-B7hO-Tma.js → Settings02-Cg6Yp6Ig.js} +1 -1
- package/dist/client/assets/{Shield01-RDE62wRx.js → Shield01-DYwaNnY3.js} +1 -1
- package/dist/client/assets/{Star01-BfSEPDRT.js → Star01-D42mJCl7.js} +1 -1
- package/dist/client/assets/{Stars01-W6Wl0Pse.js → Stars01-CrB442jN.js} +1 -1
- package/dist/client/assets/{Stars02-9vF61uFx.js → Stars02-C2akJW-A.js} +1 -1
- package/dist/client/assets/{Sun-BxuJFhF6.js → Sun-CgYYfF85.js} +1 -1
- package/dist/client/assets/{SwitchHorizontal01-yw5VS97V.js → SwitchHorizontal01-y3DhestF.js} +1 -1
- package/dist/client/assets/{Tool01-B4SsemMS.js → Tool01-CI_6KMgQ.js} +1 -1
- package/dist/client/assets/{Trash01-CG0gTYx7.js → Trash01-Cd_0JhhN.js} +1 -1
- package/dist/client/assets/{Upload01-BlvGy5d-.js → Upload01-ijsbLMSK.js} +1 -1
- package/dist/client/assets/{User01-CTuKNCEa.js → User01-BI5RuTWy.js} +1 -1
- package/dist/client/assets/{Users01-KXiCgru2.js → Users01-LhAUtJ2l.js} +1 -1
- package/dist/client/assets/{Users03-BOvyNEV4.js → Users03-CJf6bBEA.js} +1 -1
- package/dist/client/assets/{X-CKIhVHQk.js → X-BmA2kYv-.js} +1 -1
- package/dist/client/assets/XCircle-CSVmVGl-.js +1 -0
- package/dist/client/assets/{XClose-Ig7y9gcI.js → XClose-BGGuhSdx.js} +1 -1
- package/dist/client/assets/{Zap-w60sxAoc.js → Zap-C5OGTH44.js} +1 -1
- package/dist/client/assets/{ZapSquare-C7yt7KfQ.js → ZapSquare-Bh6-lHaM.js} +1 -1
- package/dist/client/assets/{ZoomOut-DVSwpwUz.js → ZoomOut-xDQo2yr7.js} +1 -1
- package/dist/client/assets/{access-gate-CEtgmlCt.js → access-gate-C-eMG1Ta.js} +1 -1
- package/dist/client/assets/add-section-modal-DNNafM9O.js +1 -0
- package/dist/client/assets/agent-icon-Bcqwo2Wq.js +1 -0
- package/dist/client/assets/agents-list-obMS8uxZ.js +1 -0
- package/dist/client/assets/ai-providers-apfL_rjp.js +1 -0
- package/dist/client/assets/{alert-DIqgQstn.js → alert-B1Ln6zZV.js} +1 -1
- package/dist/client/assets/{alert-dialog-BuJSufuR.js → alert-dialog-BZRM5ze7.js} +3 -3
- package/dist/client/assets/app-editor-C0jI2dDZ.js +1 -0
- package/dist/client/assets/{auth-catchall-CHUZWWSw.js → auth-catchall-s-1qzuNO.js} +1 -1
- package/dist/client/assets/auth-entry-CW5gsTiA.js +1 -0
- package/dist/client/assets/{auth-tkqpBHf1.js → auth-rl3GT7t8.js} +1 -1
- package/dist/client/assets/{auth-split-layout-DRR0KEkj.js → auth-split-layout-BC0lphRW.js} +1 -1
- package/dist/client/assets/{automation-list-row-40GibzkL.js → automation-list-row-DefMjeyu.js} +1 -1
- package/dist/client/assets/{automation-runs-BEntIYkJ.js → automation-runs-C-Da4MEd.js} +1 -1
- package/dist/client/assets/automations-CbOSvhEe.js +1 -0
- package/dist/client/assets/{avatar-DfTXVgX9.js → avatar-CXZnLPEU.js} +1 -1
- package/dist/client/assets/backoff-CrEUbyZT.js +1 -0
- package/dist/client/assets/{badge-an9iff2c.js → badge-DSiiJMKS.js} +1 -1
- package/dist/client/assets/{block-document-DZEmtfok.js → block-document-DR_-i1iv.js} +1 -1
- package/dist/client/assets/{brand-context-BhD6vM0G.js → brand-context-D385RFi4.js} +1 -1
- package/dist/client/assets/buckets-CfLzGo42.js +1 -0
- package/dist/client/assets/{calendar-tEWC6_XV.js → calendar-CdvLiXTi.js} +1 -1
- package/dist/client/assets/{capability-load-error-BXEh1mp-.js → capability-load-error-Cc0Imt5p.js} +1 -1
- package/dist/client/assets/{card-Ckx3Kwvj.js → card-DSDTRgoU.js} +1 -1
- package/dist/client/assets/category-editor-sMElZzN1.js +1 -0
- package/dist/client/assets/chat-context-DnaexSAo.js +21 -0
- package/dist/client/assets/checkbox-CL_5fiO_.js +1 -0
- package/dist/client/assets/{cli-auth-success-DWLJa27h.js → cli-auth-success-DV-qTae_.js} +1 -1
- package/dist/client/assets/collection-detail-CtoW7iVa.js +1 -0
- package/dist/client/assets/collection-display-button-Boq8hl8Q.js +1 -0
- package/dist/client/assets/{collection-search-CCzYANV5.js → collection-search-2g11_WBH.js} +1 -1
- package/dist/client/assets/{collection-tabs-CBstOc4r.js → collection-tabs-CDMyDuFK.js} +1 -1
- package/dist/client/assets/{command-pIEd50-L.js → command-Bw_f0kDn.js} +1 -1
- package/dist/client/assets/commerce-onboarding-LL_9usA-.js +1 -0
- package/dist/client/assets/connect-desktop-dialog-Dybq2Hx1.js +1 -0
- package/dist/client/assets/{connection-card-CqvtHNnU.js → connection-card-DA1t_KQo.js} +1 -1
- package/dist/client/assets/connection-detail-C3h6Iqqu.js +1 -0
- package/dist/client/assets/{connection-form-helpers-ByFrPc9N.js → connection-form-helpers-BqK6S8Yx.js} +1 -1
- package/dist/client/assets/connections-BdIG1myf.js +1 -0
- package/dist/client/assets/context-menu-KaWlIbj1.js +1 -0
- package/dist/client/assets/{decopilot-D6xQ1qh2.js → decopilot-fUgUe2Eh.js} +1 -1
- package/dist/client/assets/decopilot-sse-pool-Dl1x5tdf.js +1 -0
- package/dist/client/assets/delay-CnY5UFtP.js +1 -0
- package/dist/client/assets/dialog-CQ6B0IwC.js +1 -0
- package/dist/client/assets/{domain-settings-DIU6G_-3.js → domain-settings-BvzKBAZm.js} +1 -1
- package/dist/client/assets/drawer-mbT59SGx.js +1 -0
- package/dist/client/assets/dropdown-menu-bs6nmOyP.js +1 -0
- package/dist/client/assets/{empty-state-BrSxZrfZ.js → empty-state-crYivviN.js} +1 -1
- package/dist/client/assets/{extract-connection-data-CBzjCfJ2.js → extract-connection-data-D-Y4GRfE.js} +1 -1
- package/dist/client/assets/file-explorer-iYX8uF4-.js +2 -0
- package/dist/client/assets/{file-type-icon-BOPDPlds.js → file-type-icon-D0ASmNXK.js} +1 -1
- package/dist/client/assets/{files-cbAPSaRo.js → files-ENTpyfhv.js} +1 -1
- package/dist/client/assets/{form-BZY9ZRz4.js → form-O9DEtf_L.js} +1 -1
- package/dist/client/assets/general-BJWZpnpu.js +1 -0
- package/dist/client/assets/{github-repo-picker-CrW8szfE.js → github-repo-picker-CHTvfJAD.js} +1 -1
- package/dist/client/assets/{hooks-DLdyjUhZ.js → hooks-CSfRJCjt.js} +6 -6
- package/dist/client/assets/image-field-BdcHkDRx.js +1 -0
- package/dist/client/assets/{import-from-deco-dialog-BVpWCCC9.js → import-from-deco-dialog-Bz8FE0_9.js} +2 -2
- package/dist/client/assets/{index-CqHy6432.js → index-7a12TwCl.js} +10 -10
- package/dist/client/assets/{index-BBz_54sx.js → index-B4I34F6K.js} +1 -1
- package/dist/client/assets/{index-CszBxeF9.js → index-BFeGPSf0.js} +1 -1
- package/dist/client/assets/{index-BwhwNs2D.js → index-BK1jVztm.js} +4 -4
- package/dist/client/assets/{index-CE8AoMpS.js → index-BPuJ390n.js} +1 -1
- package/dist/client/assets/{index-DexxTctJ.js → index-BRnQ22g3.js} +1 -1
- package/dist/client/assets/index-B_6khNsr.js +1 -0
- package/dist/client/assets/{index-xsAZnQ1t.js → index-BsWl8UuV.js} +1 -1
- package/dist/client/assets/index-C9uGIJ2-.js +1 -0
- package/dist/client/assets/{index-BY2TC4bG.js → index-CGoh8mx2.js} +2 -2
- package/dist/client/assets/{index-C3Ab2DJ2.js → index-D0U_smqt.js} +29 -29
- package/dist/client/assets/{index-BQXvSs-s.js → index-DHLJyA5u.js} +3 -3
- package/dist/client/assets/{index-C4w1u5Cz.js → index-D_UY8Zf9.js} +1 -1
- package/dist/client/assets/{index-WHuW26DU.js → index-DvTimAjS.js} +12 -12
- package/dist/client/assets/{index-redirect-DHc9uFFV.js → index-redirect-CPy0Z1T_.js} +1 -1
- package/dist/client/assets/{input-BmmiCY6T.js → input-Ccm3ShdT.js} +1 -1
- package/dist/client/assets/{integration-icon-CFvT6ZpF.js → integration-icon-BjRqMG3n.js} +1 -1
- package/dist/client/assets/label-KRKjsQLR.js +1 -0
- package/dist/client/assets/login-B5WUG2bv.js +1 -0
- package/dist/client/assets/{mcp-oauth-BGmk7Mi5.js → mcp-oauth-Ccqa98JF.js} +1 -1
- package/dist/client/assets/{members-DO2LVAyy.js → members-BwXKPt6c.js} +2 -2
- package/dist/client/assets/{monaco-editor-yw8USVwR.js → monaco-editor-DztiaMte.js} +1 -1
- package/dist/client/assets/{monitoring-stats-row-BuR-EBQ0.js → monitoring-stats-row-DY_Jk7Qu.js} +1 -1
- package/dist/client/assets/{oauth-callback-wtZvQiOu.js → oauth-callback-B5Sy5Cax.js} +1 -1
- package/dist/client/assets/{oauth-callback-ai-provider-17H-B-SW.js → oauth-callback-ai-provider-DFLSFrMH.js} +1 -1
- package/dist/client/assets/onboarding-tnqH6jke.js +1 -0
- package/dist/client/assets/{org-install-e7rNwps-.js → org-install-CMfEhUPU.js} +1 -1
- package/dist/client/assets/org-layout-DWTGapvu.js +1 -0
- package/dist/client/assets/organization-choice-BhcilQzG.js +1 -0
- package/dist/client/assets/{page-seo-form-BgMsVAcV.js → page-seo-form-CworrxTj.js} +1 -1
- package/dist/client/assets/page-seo-sheet-CU9OHYe8.js +1 -0
- package/dist/client/assets/popover-CQIMDVug.js +1 -0
- package/dist/client/assets/post-editor-BgM1RATm.js +1 -0
- package/dist/client/assets/preview-dialog-CJENsRWm.js +5 -0
- package/dist/client/assets/{primitives-BcfJna5s.js → primitives-qIzOEfAk.js} +1 -1
- package/dist/client/assets/profile-B0-E7bKd.js +1 -0
- package/dist/client/assets/project-app-view-CMI1MfV-.js +1 -0
- package/dist/client/assets/record-editor-DGdCVdoZ.js +1 -0
- package/dist/client/assets/registry-D-K5v381.js +2 -0
- package/dist/client/assets/{registry-layout-t_GwGR-W.js → registry-layout-Cy0i7eVL.js} +4 -4
- package/dist/client/assets/require-capability-D9TOSbgf.js +1 -0
- package/dist/client/assets/required-auth-layout-D9FVCOQl.js +1 -0
- package/dist/client/assets/{reset-password-CPoVJQh2.js → reset-password-m90-iQba.js} +1 -1
- package/dist/client/assets/roles-m5faIEUW.js +1 -0
- package/dist/client/assets/save-referenced-block-CtS93Zrw.js +1 -0
- package/dist/client/assets/save-status-Dr27404A.js +1 -0
- package/dist/client/assets/{schema-form-D8_e7uDj.js → schema-form-Bpex2GV2.js} +1 -1
- package/dist/client/assets/{scroll-area-DwqNfKe5.js → scroll-area-DbztbmuO.js} +7 -7
- package/dist/client/assets/{search-input-DjHO_xeh.js → search-input-C742tJr8.js} +1 -1
- package/dist/client/assets/secrets-DbY4hLUu.js +1 -0
- package/dist/client/assets/{sections-editor-D8YHUjur.js → sections-editor-DJuNcR6f.js} +2 -2
- package/dist/client/assets/select-COSJe-70.js +1 -0
- package/dist/client/assets/{select-model-4ZBcZdkE.js → select-model-Cv_gN_vr.js} +1 -1
- package/dist/client/assets/seo-editor-ynZ80zTU.js +1 -0
- package/dist/client/assets/settings-layout-D5cpx9f5.js +1 -0
- package/dist/client/assets/{settings-section-Dxa_AxFP.js → settings-section-C-zTpCRT.js} +1 -1
- package/dist/client/assets/{sheet-COdJ-0Qy.js → sheet-CuyenB5M.js} +1 -1
- package/dist/client/assets/shell-controls-fwD6Be98.js +1 -0
- package/dist/client/assets/shell-layout-BhblvLd4.js +1 -0
- package/dist/client/assets/shell-route-loading-ClsKn-Oj.js +1 -0
- package/dist/client/assets/{sidebar-DCgpgzJu.js → sidebar-BYFEz6-7.js} +1 -1
- package/dist/client/assets/skeleton-DHas8e4O.js +1 -0
- package/dist/client/assets/{sortable.esm-LmSoSdxy.js → sortable.esm-CtBH0PGw.js} +1 -1
- package/dist/client/assets/sso-BFO9vLZv.js +1 -0
- package/dist/client/assets/{store-Dj11zgxF.js → store-C9F0E0yc.js} +1 -1
- package/dist/client/assets/store-registry-D8kCyVob.js +2 -0
- package/dist/client/assets/studio-tools-DO12gBMa.js +1 -0
- package/dist/client/assets/switch-By8vCxNg.js +1 -0
- package/dist/client/assets/table-BgkbBxMz.js +1 -0
- package/dist/client/assets/{tabs-BcUIMPwc.js → tabs-DPoZSyfS.js} +1 -1
- package/dist/client/assets/{task-status-BfQltC__.js → task-status-D9k3BLzM.js} +1 -1
- package/dist/client/assets/textarea-DQwh6y_K.js +1 -0
- package/dist/client/assets/{toggle-group-Cp4C3_lM.js → toggle-group-CW5GRzAp.js} +1 -1
- package/dist/client/assets/{toolbar-DyjTkAru.js → toolbar-1QmqWl6-.js} +1 -1
- package/dist/client/assets/tooltip-DO1R3Vmb.js +1 -0
- package/dist/client/assets/{types-7ak1Ve40.js → types-pBNKtzBp.js} +1 -1
- package/dist/client/assets/{use-ai-providers-CC3uGtbf.js → use-ai-providers-qobt2OiH.js} +1 -1
- package/dist/client/assets/{use-automations-D2hKtMe8.js → use-automations-BwoNV2me.js} +1 -1
- package/dist/client/assets/use-capability-C09ZF9_G.js +1 -0
- package/dist/client/assets/{use-clock-tick-SbPzFjh0.js → use-clock-tick-_1lW4UqP.js} +1 -1
- package/dist/client/assets/{use-collections-DrlB7sAG.js → use-collections-DRgt6Bb8.js} +1 -1
- package/dist/client/assets/use-connection-XfA-QrSw.js +1 -0
- package/dist/client/assets/use-copy-DyplBFAe.js +1 -0
- package/dist/client/assets/use-create-virtual-mcp-BJFWHgGz.js +1 -0
- package/dist/client/assets/{use-debounced-autosave-C4B5942u.js → use-debounced-autosave-DqciCJ__.js} +1 -1
- package/dist/client/assets/use-deco-credits-CyoNix9p.js +1 -0
- package/dist/client/assets/{use-delete-connection-C_lUSAxo.js → use-delete-connection-CweyK7E_.js} +1 -1
- package/dist/client/assets/use-file-configs-OLHA7dwa.js +1 -0
- package/dist/client/assets/{use-infinite-scroll-CaTJY2LS.js → use-infinite-scroll-BbUZw7ju.js} +1 -1
- package/dist/client/assets/{use-join-requests-Bf6--Yng.js → use-join-requests-CHh2Zrhx.js} +1 -1
- package/dist/client/assets/use-mcp-client-DilmxmKU.js +10 -0
- package/dist/client/assets/{use-mcp-prompts-5xEBY9_7.js → use-mcp-prompts-D2ueJ3CD.js} +1 -1
- package/dist/client/assets/{use-mcp-tools-CYtQa-6Z.js → use-mcp-tools-uucJgbkt.js} +1 -1
- package/dist/client/assets/{use-members-BWyLHt4a.js → use-members-Y5iRty7v.js} +1 -1
- package/dist/client/assets/use-navigate-to-agent-HvaD8xDj.js +1 -0
- package/dist/client/assets/{use-org-auth-client-Blpkj8FB.js → use-org-auth-client-Dl_7zTlg.js} +1 -1
- package/dist/client/assets/{use-org-sso-CEQ82hSZ.js → use-org-sso-9Z0u5sV3.js} +1 -1
- package/dist/client/assets/{use-organization-roles-lBgqu0F4.js → use-organization-roles-C8kGFpoE.js} +1 -1
- package/dist/client/assets/use-organization-settings-B5vS3xHV.js +1 -0
- package/dist/client/assets/{use-registry-connections-CK9xDmAR.js → use-registry-connections-DhFpf503.js} +1 -1
- package/dist/client/assets/use-secrets-DtlQfYRK.js +1 -0
- package/dist/client/assets/{use-status-sounds-C5Tq4YPI.js → use-status-sounds-BSqGti4P.js} +1 -1
- package/dist/client/assets/{use-view-mode-Dz9A7efZ.js → use-view-mode-Cc4A86jX.js} +1 -1
- package/dist/client/assets/{use-virtual-mcp-Bc7GdFZa.js → use-virtual-mcp-cixi9WNo.js} +1 -1
- package/dist/client/assets/useInfiniteQuery-C4arjVN1.js +1 -0
- package/dist/client/assets/useSuspenseInfiniteQuery-DTlBviqw.js +1 -0
- package/dist/client/assets/variant-calendar-BtDF6xbX.js +1 -0
- package/dist/client/assets/view-mode-toggle-BNmCyKXO.js +1 -0
- package/dist/client/index.html +1 -1
- package/dist/server/cli.js +509 -506
- package/dist/server/server.js +318 -318
- package/package.json +1 -1
- package/dist/client/assets/ChevronUp-CiXMtnii.js +0 -1
- package/dist/client/assets/XCircle-DRGwo6Em.js +0 -1
- package/dist/client/assets/add-section-modal-CwlL6ayr.js +0 -1
- package/dist/client/assets/agent-icon-D5EbntAT.js +0 -1
- package/dist/client/assets/agents-list-DOj0Fh6v.js +0 -1
- package/dist/client/assets/ai-providers-D2FalLjO.js +0 -1
- package/dist/client/assets/app-editor-DH47BAx3.js +0 -1
- package/dist/client/assets/automations-C8R4Fvhm.js +0 -1
- package/dist/client/assets/buckets-BNXQ-vfY.js +0 -1
- package/dist/client/assets/category-editor-511TL03p.js +0 -1
- package/dist/client/assets/chat-context-BNtznWGC.js +0 -21
- package/dist/client/assets/checkbox-I3IyJWnj.js +0 -1
- package/dist/client/assets/collection-detail-CqdkHGGR.js +0 -1
- package/dist/client/assets/collection-display-button-C3NMWQ0u.js +0 -1
- package/dist/client/assets/connect-desktop-dialog-BgIjMJ8k.js +0 -1
- package/dist/client/assets/connection-detail-BljhUTi8.js +0 -1
- package/dist/client/assets/connections-BxfE7CNZ.js +0 -1
- package/dist/client/assets/context-menu-CUB1yHM7.js +0 -1
- package/dist/client/assets/decopilot-sse-pool-BkzSWgw-.js +0 -1
- package/dist/client/assets/dialog-CyIn0DRx.js +0 -1
- package/dist/client/assets/drawer-DFg9xgM4.js +0 -1
- package/dist/client/assets/dropdown-menu-kPcoeCiJ.js +0 -1
- package/dist/client/assets/file-explorer-DqjZVlFC.js +0 -2
- package/dist/client/assets/general-DiEcrxnP.js +0 -1
- package/dist/client/assets/image-field-CodUWKZv.js +0 -1
- package/dist/client/assets/index-CE5zniob.js +0 -1
- package/dist/client/assets/index-DCOB_mfs.js +0 -1
- package/dist/client/assets/label-DitP_QKf.js +0 -1
- package/dist/client/assets/login-B5Epw0z9.js +0 -1
- package/dist/client/assets/onboarding-BoQhKI2i.js +0 -1
- package/dist/client/assets/org-layout-BMfkaVCj.js +0 -1
- package/dist/client/assets/page-seo-sheet-DeiY4L_a.js +0 -1
- package/dist/client/assets/popover-BcAFMnrn.js +0 -1
- package/dist/client/assets/post-editor-B7uc8ZWG.js +0 -1
- package/dist/client/assets/preview-dialog-CWq_MXwm.js +0 -5
- package/dist/client/assets/profile-D0fa1gEu.js +0 -1
- package/dist/client/assets/project-app-view-CXpwRwLv.js +0 -1
- package/dist/client/assets/record-editor-Ct33qGpE.js +0 -1
- package/dist/client/assets/registry-BIqKm9sP.js +0 -2
- package/dist/client/assets/require-capability-CoJVffIR.js +0 -1
- package/dist/client/assets/required-auth-layout-B3CS-pLH.js +0 -1
- package/dist/client/assets/roles-Kqs8iopc.js +0 -1
- package/dist/client/assets/save-referenced-block-rb2uyE9z.js +0 -1
- package/dist/client/assets/save-status-C9PbQUEN.js +0 -1
- package/dist/client/assets/secrets-Dlj_raMe.js +0 -1
- package/dist/client/assets/select-Di6xzzYo.js +0 -1
- package/dist/client/assets/seo-editor-C9cdDir2.js +0 -1
- package/dist/client/assets/settings-layout-DR15Rbl6.js +0 -1
- package/dist/client/assets/shell-controls-Cw8j2a_F.js +0 -1
- package/dist/client/assets/shell-layout-DmxTk-Cg.js +0 -1
- package/dist/client/assets/shell-route-loading-DW_liPbt.js +0 -1
- package/dist/client/assets/skeleton-CZ9pOveV.js +0 -1
- package/dist/client/assets/sso-BJQWPrvg.js +0 -1
- package/dist/client/assets/store-registry-BXdj_bIJ.js +0 -2
- package/dist/client/assets/studio-tools-DRut7Wwk.js +0 -1
- package/dist/client/assets/switch-sHkW6RUp.js +0 -1
- package/dist/client/assets/table-BUxYcsuG.js +0 -1
- package/dist/client/assets/textarea-D8B22gmM.js +0 -1
- package/dist/client/assets/tooltip-2IhfImXT.js +0 -1
- package/dist/client/assets/use-capability-CU6DCnG3.js +0 -1
- package/dist/client/assets/use-connection-Dffadu_t.js +0 -1
- package/dist/client/assets/use-copy-Btaqep1K.js +0 -1
- package/dist/client/assets/use-create-virtual-mcp-D6wTKoFC.js +0 -1
- package/dist/client/assets/use-deco-credits-16Jb7c03.js +0 -1
- package/dist/client/assets/use-file-configs-qOKR17qO.js +0 -1
- package/dist/client/assets/use-mcp-client-BdKIOTso.js +0 -10
- package/dist/client/assets/use-navigate-to-agent-BTMo9com.js +0 -1
- package/dist/client/assets/use-organization-settings--a-kmsBC.js +0 -1
- package/dist/client/assets/use-secrets-B008jqWi.js +0 -1
- package/dist/client/assets/useInfiniteQuery-Ca6dlOLl.js +0 -1
- package/dist/client/assets/useRouterState-DgLuS94C.js +0 -1
- package/dist/client/assets/useSuspenseInfiniteQuery-CZbIaY66.js +0 -1
- package/dist/client/assets/variant-calendar-DgzKgoL6.js +0 -1
- package/dist/client/assets/view-mode-toggle-Cc6sYskX.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as h}from"./index-
|
|
1
|
+
import{r as h}from"./index-D0U_smqt.js";var w=(o,i,l,s,c,t,m,d)=>{let r=document.documentElement,u=["light","dark"];function n(e){(Array.isArray(o)?o:[o]).forEach(a=>{let p=a==="class",S=p&&t?c.map(f=>t[f]||f):c;p?(r.classList.remove(...S),r.classList.add(t&&t[e]?t[e]:e)):r.setAttribute(a,e)}),y(e)}function y(e){d&&u.includes(e)&&(r.style.colorScheme=e)}function g(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}if(s)n(s);else try{let e=localStorage.getItem(i)||l,a=m&&e==="system"?g():e;n(a)}catch{}};h.createContext(void 0);h.memo(({forcedTheme:o,storageKey:i,attribute:l,enableSystem:s,enableColorScheme:c,defaultTheme:t,value:m,themes:d,nonce:r,scriptProps:u})=>{let n=JSON.stringify([l,i,t,o,d,m,s,c]).slice(1,-1);return h.createElement("script",{...u,suppressHydrationWarning:!0,nonce:typeof window>"u"?r:"",dangerouslySetInnerHTML:{__html:`(${w.toString()})(${n})`}})});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as f,l as d,r as p,j as r}from"./index-D0U_smqt.js";import{m as w}from"./sidebar-BYFEz6-7.js";const v=p.createContext(void 0),H=v.Provider;function N(c,e){const l=p.Children.toArray(c);for(const i of l)if(p.isValidElement(i)&&i.type===e)return i;return null}function P(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex flex-col h-full w-full bg-background overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function C(c){const e=f.c(17),{children:l,className:i,hideSidebarTrigger:s}=c;let t;e[0]!==l?(t=N(l,j),e[0]=l,e[1]=t):t=e[1];const n=t;let a;e[2]!==l?(a=N(l,b),e[2]=l,e[3]=a):a=e[3];const o=a;let m;e[4]!==i?(m=d("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",i),e[4]=i,e[5]=m):m=e[5];let x;e[6]!==s?(x=!s&&r.jsx(w,{className:"md:hidden shrink-0"}),e[6]=s,e[7]=x):x=e[7];let u;e[8]!==n||e[9]!==x?(u=r.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[x,n]}),e[8]=n,e[9]=x,e[10]=u):u=e[10];let h;e[11]!==o?(h=r.jsx("div",{className:"flex items-center",children:o}),e[11]=o,e[12]=h):h=e[12];let g;return e[13]!==m||e[14]!==u||e[15]!==h?(g=r.jsxs("div",{className:m,children:[u,h]}),e[13]=m,e[14]=u,e[15]=h,e[16]=g):g=e[16],g}function j(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 min-w-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function b(c){const e=f.c(5),{children:l,className:i}=c;let s;e[0]!==i?(s=d("flex items-center gap-2 shrink-0 overflow-hidden",i),e[0]=i,e[1]=s):s=e[1];let t;return e[2]!==l||e[3]!==s?(t=r.jsx("div",{className:s,children:l}),e[2]=l,e[3]=s,e[4]=t):t=e[4],t}function $(c){const e=f.c(6),{children:l,className:i}=c,s=p.useContext(v);let t;e[0]!==i||e[1]!==s?(t=d("flex-1 overflow-auto",s,i),e[0]=i,e[1]=s,e[2]=t):t=e[2];let n;return e[3]!==l||e[4]!==t?(n=r.jsx("div",{className:t,children:l}),e[3]=l,e[4]=t,e[5]=n):n=e[5],n}function y(c){const e=f.c(10),{children:l,actions:i,className:s}=c;let t;e[0]!==s?(t=d("flex flex-wrap items-center justify-between gap-3",s),e[0]=s,e[1]=t):t=e[1];let n;e[2]!==l?(n=r.jsx("div",{className:"text-xl font-medium min-w-0",children:l}),e[2]=l,e[3]=n):n=e[3];let a;e[4]!==i?(a=i&&r.jsx("div",{className:"flex items-center gap-2",children:i}),e[4]=i,e[5]=a):a=e[5];let o;return e[6]!==t||e[7]!==n||e[8]!==a?(o=r.jsxs("div",{className:t,children:[n,a]}),e[6]=t,e[7]=n,e[8]=a,e[9]=o):o=e[9],o}function R(c){const e=f.c(6),{children:l,className:i,maxWidth:s}=c,t=s===void 0?"max-w-[1200px]":s;let n;e[0]!==i||e[1]!==t?(n=d("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",t,i),e[0]=i,e[1]=t,e[2]=n):n=e[2];let a;return e[3]!==l||e[4]!==n?(a=r.jsx("div",{className:n,children:l}),e[3]=l,e[4]=n,e[5]=a):a=e[5],a}const T=Object.assign(P,{Header:Object.assign(C,{Left:j,Right:b}),Content:$,Title:y,Body:R});export{T as P,H as a};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{c as S,r as U,j as t,k as Y,B as _,K as B,l as ee,s as Fe,I as Je,t as W,b as et,u as tt,a2 as Te,ac as Tt}from"./index-D0U_smqt.js";import{i as zt}from"./ChevronRight-KEtpzT4P.js";import{s as st}from"./Eye-hHNCwVZ1.js";import{n as Pt,i as nt}from"./Globe01-DD8UM4Hn.js";import{a as lt,d as Ft,e as Ot,i as Et}from"./ZoomOut-xDQo2yr7.js";import{a as pe}from"./Palette-CdtyN2t7.js";import{s as At}from"./Plus-BaLwS14l.js";import{t as Mt}from"./Stars01-CrB442jN.js";import{i as xe}from"./Upload01-ijsbLMSK.js";import{i as Oe}from"./Zap-C5OGTH44.js";import{u as it}from"./tooltip-DO1R3Vmb.js";import{f as Ut,a as Bt,b as Lt,c as _t,d as Rt,e as qt,A as It,g as Kt}from"./alert-dialog-BZRM5ze7.js";import{c as Ee,d as Ae,a as Me,f as rt,D as Ht,b as Vt,e as Gt}from"./dialog-CQ6B0IwC.js";import{I as Ue}from"./input-Ccm3ShdT.js";import{S as K}from"./skeleton-DHas8e4O.js";import{F as ie,d as at,M as ot}from"./file-type-icon-D0ASmNXK.js";import{a as Qt}from"./toolbar-1QmqWl6-.js";import{q as Be,r as A,a as be,s as Wt,u as Pe,t as Le,f as Yt,L as Xt,n as Zt,o as Jt,m as es,R as Ve,p as ts,S as ss,b as ns,v as ct,w as le,x as ls}from"./preview-dialog-CJENsRWm.js";import{a as ve}from"./DotsVertical-BM5d8Pc7.js";import{i as is}from"./Key01-BYHEvjL0.js";import{s as je}from"./Trash01-Cd_0JhhN.js";import{a as ye,c as te,b as we,D as ke}from"./dropdown-menu-bs6nmOyP.js";import{T as rs}from"./textarea-DQwh6y_K.js";import{t as as}from"./ChevronDown-Dilz0yBl.js";import{n as os}from"./ChevronUp-B5x1falF.js";import{i as ge}from"./X-BmA2kYv-.js";import"./Check-D3J8f8u-.js";import"./tab-id-BptcWVWa.js";import"./ChevronLeft-CJ5DBM3M.js";import"./LinkExternal01-BqsD3A6i.js";import"./XClose-BGGuhSdx.js";import"./index-BsWl8UuV.js";import"./LayoutLeft-BNwcfVCc.js";import"./popover-CQIMDVug.js";const cs=new Set(["output","upload","public","home"]),ds=/^[A-Za-z0-9][A-Za-z0-9._-]*$/;function fs(s){return cs.has(s)||!ds.test(s)?"home":s}function us(s){const e=S.c(33);let n,i,l;e[0]!==s?({glyph:n,readOnly:l,...i}=s,e[0]=s,e[1]=n,e[2]=i,e[3]=l):(n=e[1],i=e[2],l=e[3]);const r=U.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 v;e[11]!==n?(v=n&&t.jsx(n,{x:10.5,y:13.2,width:11,height:11,strokeWidth:2.2,style:{color:"#014AC9",opacity:.55}}),e[11]=n,e[12]=v):v=e[12];let j;e[13]!==l?(j=l&&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(st,{x:22.1,y:22.1,width:6.8,height:6.8,strokeWidth:2.2,className:"text-muted-foreground"})]}),e[13]=l,e[14]=j):j=e[14];let y,k;e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("stop",{offset:"0.3",stopColor:"#4D87DF"}),k=t.jsx("stop",{offset:"1",stopColor:"#296FE8"}),e[15]=y,e[16]=k):(y=e[15],k=e[16]);let N;e[17]!==a?(N=t.jsxs("linearGradient",{id:a,x1:"15.97",y1:"2.55",x2:"15.97",y2:"9.53",gradientUnits:"userSpaceOnUse",children:[y,k]}),e[17]=a,e[18]=N):N=e[18];let g,C;e[19]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("stop",{stopColor:"#72B6FA"}),C=t.jsx("stop",{offset:"1",stopColor:"#5BB1EF"}),e[19]=g,e[20]=C):(g=e[19],C=e[20]);let D;e[21]!==c?(D=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:[g,C]}),e[21]=c,e[22]=D):D=e[22];let P;e[23]!==N||e[24]!==D?(P=t.jsxs("defs",{children:[N,D]}),e[23]=N,e[24]=D,e[25]=P):P=e[25];let $;return e[26]!==i||e[27]!==P||e[28]!==d||e[29]!==f||e[30]!==v||e[31]!==j?($=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,v,j,P]}),e[26]=i,e[27]=P,e[28]=d,e[29]=f,e[30]=v,e[31]=j,e[32]=$):$=e[32],$}function ms(s,e,n){return e?"color":n?"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 hs=/^(rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch|color)\(/i,ps=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,xs=["svg","png","jpg","jpeg","webp","avif","gif"];function gs(s){return s.split(".").pop()?.toLowerCase()??""}function bs(s){return s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function vs(s){const e=s.trim();return ps.test(e)||hs.test(e)}function js(s){const e=s.trim(),n=e.match(/^#([0-9a-f]{3})$/i);return n?.[1]?`#${[...n[1]].map(i=>i+i).join("")}`:e}function dt(s){const e=[],n=new Map,i=/(--brand-[\w-]+)\s*:\s*([^;]+);/g;let l;for(;(l=i.exec(s))!==null;){const r=l[1],a=l[2].trim();n.has(r)||e.push(r),n.set(r,a)}return e.map(r=>{const a=n.get(r),c=vs(a),o=/^--brand-font/i.test(r);return{name:r,value:a,isColor:c,isFont:o,kind:ms(r,c,o)}})}const Ge=["primary","secondary","accent","neutral","success","warning","error","info","bg","fg","border","ring"];function ys(s){return s.match(/^--brand-([a-z]+)/i)?.[1]?.toLowerCase()??s}function ws(s){const e=[],n=new Map;for(const l of s){if(l.kind!=="color")continue;const r=ys(l.name);n.has(r)||(e.push(r),n.set(r,[])),n.get(r).push(l)}return e.map(l=>{const r=n.get(l);return{family:l,tokens:r,isRamp:r.filter(a=>/-\d+$/.test(a.name)).length>=5}}).sort((l,r)=>{const a=Ge.indexOf(l.family),c=Ge.indexOf(r.family);return a===-1&&c===-1?0:a===-1?1:c===-1?-1:a-c})}function ks(s,e,n){const i=new RegExp(`(${bs(e)}\\s*:\\s*)[^;]+(;)`);if(i.test(s))return s.replace(i,(a,c,o)=>`${c}${n}${o}`);const l=s.search(/:root\s*\{/);if(l!==-1){const a=s.indexOf("{",l)+1;return`${s.slice(0,a)}
|
|
2
2
|
${e}: ${n};${s.slice(a)}`}const r=s.length>0&&!s.endsWith(`
|
|
3
3
|
`)?`
|
|
4
4
|
`:"";return`${s}${r}:root {
|
|
5
5
|
${e}: ${n};
|
|
6
6
|
}
|
|
7
7
|
`}function Ns(s){const e=s.filter(i=>i.kind==="file"),n=e.find(i=>/(^|\/)logo\.(svg|png|jpe?g|webp|avif|gif)$/i.test(i.path));return n?n.path:e.find(i=>xs.includes(gs(i.path)))?.path??null}function Ss(s){const e={};for(const n of s.split(`
|
|
8
|
-
`)){const i=n.match(/^([A-Za-z][\w-]*):\s*(.*)$/);i?.[1]&&i[2]!==void 0&&(e[i[1].toLowerCase()]=i[2].trim())}return e}function Qe(s){for(const e of s.split(/\n\s*\n/)){const n=e.trim();if(!(!n||n.startsWith("#")))return n.replace(/\n/g," ")}return null}function ft(s){const e=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:Qe(s),body:s};const n=Ss(e[1]),i=s.slice(e[0].length);return{name:n.name||null,description:n.description||Qe(i),body:i}}const $s=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Cs=new Set(["csv","tsv"]),Ds=new Set(["mp4","webm","mov","m4v"]),Ts=new Set(["txt","md","markdown","json","log","yaml","yml","xml","html","htm"]),zs=256*1024;function ce(s){const e=new Date(s);if(Number.isNaN(e.getTime()))return"";const n=Date.now()-e.getTime(),i=Math.floor(n/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const l=Math.floor(i/60);if(l<24)return`${l}h ago`;const r=Math.floor(l/24);return r<30?`${r}d ago`:e.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Fs(s){return s.split(".").pop()?.toLowerCase()??""}function _e(s){const e=S.c(3),{onShare:n}=s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Pt,{size:14}),e[0]=i):i=e[0];let l;return e[1]!==n?(l=t.jsxs(te,{onClick:n,children:[i,"Share"]}),e[1]=n,e[2]=l):l=e[2],l}function Ps(s){const e=S.c(9),{state:n}=s,i=n==="password"?"Password-protected — link + password to view":n==="inherited"?"Shared via a parent folder":"Public — anyone with the link can view",l=n==="password"?is:nt,r=n==="inherited"?"text-muted-foreground/60":"text-primary";let a;e[0]!==r?(a=ee(r),e[0]=r,e[1]=a):a=e[1];let c;e[2]!==l||e[3]!==i||e[4]!==a?(c=t.jsx(l,{size:12,className:a,"aria-label":i}),e[2]=l,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 ut(s){const e=S.c(18),{downloadUrl:n,filename:i,onShare:l,onDelete:r}=s,a=`Actions for ${i}`;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(ve,{size:14}),e[0]=c):c=e[0];let o;e[1]!==a?(o=t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Es,"aria-label":a,children:c})}),e[1]=a,e[2]=o):o=e[2];let d;e[3]!==l?(d=l&&t.jsx(_e,{onShare:l}),e[3]=l,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ft,{size:14}),e[5]=u):u=e[5];let f;e[6]!==n||e[7]!==i?(f=t.jsx(te,{asChild:!0,children:t.jsxs("a",{href:n,download:i,children:[u,"Download"]})}),e[6]=n,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(je,{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(we,{align:"end",onClick:Os,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(ke,{children:[o,h]}),e[15]=o,e[16]=h,e[17]=x):x=e[17],x}function Os(s){return s.stopPropagation()}function Es(s){return s.stopPropagation()}function de(s){const e=S.c(9),{onOpen:n,children:i,className:l}=s;let r;e[0]!==n?(r=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n())},e[0]=n,e[1]=r):r=e[1];let a;e[2]!==l?(a=ee("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",l),e[2]=l,e[3]=a):a=e[3];let c;return e[4]!==i||e[5]!==n||e[6]!==r||e[7]!==a?(c=t.jsx("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:r,className:a,children:i}),e[4]=i,e[5]=n,e[6]=r,e[7]=a,e[8]=c):c=e[8],c}function fe(s){const e=S.c(19),{icon:n,name:i,meta:l,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(Ps,{state:a}),e[2]=a,e[3]=d):d=e[3];let u;e[4]!==l?(u=l&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:l}),e[4]=l,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:"text-xs text-muted-foreground",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]!==n||e[17]!==h?(x=t.jsxs("div",{className:"flex w-full items-center gap-2.5",children:[n,h,c]}),e[15]=c,e[16]=n,e[17]=h,e[18]=x):x=e[18],x}function Ne(s){const e=S.c(17),{name:n,meta:i,subtitle:l,glyph:r,readOnly:a,publicState:c,onOpen:o,onShare:d,onDelete:u}=s;let f;e[0]!==r||e[1]!==a?(f=t.jsx(us,{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]!==n||e[4]!==u||e[5]!==d?(m=d||u?t.jsxs(ke,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Ms,"aria-label":`Actions for ${n}`,children:t.jsx(ve,{size:14})})}),t.jsxs(we,{align:"end",onClick:As,children:[d&&t.jsx(_e,{onShare:d}),u&&t.jsxs(te,{variant:"destructive",onClick:u,children:[t.jsx(je,{size:14}),"Delete"]})]})]}):void 0,e[3]=n,e[4]=u,e[5]=d,e[6]=m):m=e[6];let h;e[7]!==i||e[8]!==n||e[9]!==c||e[10]!==l||e[11]!==f||e[12]!==m?(h=t.jsx(fe,{icon:f,name:n,meta:i,subtitle:l,publicState:c,actions:m}),e[7]=i,e[8]=n,e[9]=c,e[10]=l,e[11]=f,e[12]=m,e[13]=h):h=e[13];let x;return e[14]!==o||e[15]!==h?(x=t.jsx(de,{onOpen:o,children:h}),e[14]=o,e[15]=h,e[16]=x):x=e[16],x}function As(s){return s.stopPropagation()}function Ms(s){return s.stopPropagation()}function mt(s){const e=S.c(21),{filename:n,updatedAt:i,downloadUrl:l,publicState:r,onOpen:a,onShare:c,onDelete:o}=s;let d;e[0]!==n?(d=t.jsx(ie,{filename:n,className:"h-8 w-6.5 shrink-0"}),e[0]=n,e[1]=d):d=e[1];let u;e[2]!==i?(u=ce(i),e[2]=i,e[3]=u):u=e[3];let f;e[4]!==n?(f=at(n),e[4]=n,e[5]=f):f=e[5];let m;e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==c?(m=t.jsx(ut,{downloadUrl:l,filename:n,onShare:c,onDelete:o}),e[6]=l,e[7]=n,e[8]=o,e[9]=c,e[10]=m):m=e[10];let h;e[11]!==n||e[12]!==r||e[13]!==d||e[14]!==u||e[15]!==f||e[16]!==m?(h=t.jsx(fe,{icon:d,name:n,meta:u,subtitle:f,publicState:r,actions:m}),e[11]=n,e[12]=r,e[13]=d,e[14]=u,e[15]=f,e[16]=m,e[17]=h):h=e[17];let x;return e[18]!==a||e[19]!==h?(x=t.jsx(de,{onOpen:a,children:h}),e[18]=a,e[19]=h,e[20]=x):x=e[20],x}function Us(s){const e=S.c(40),{dirName:n,updatedAt:i,skillMdUrl:l,publicState:r,onOpen:a,onBrowse:c,onShare:o,onDelete:d}=s;let u;e[0]!==l?(u=B.fileText(l),e[0]=l,e[1]=u):u=e[1];let f;e[2]!==l?(f=async()=>{const R=await fetch(l,{credentials:"include"});if(!R.ok)throw new Error(`fetch failed: ${R.status}`);return R.text()},e[2]=l,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?ft(h):null,e[7]=h,e[8]=x):x=e[8];const v=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(Oe,{size:16})}),e[9]=j):j=e[9];const y=v?.name??n;let k;e[10]!==i?(k=ce(i),e[10]=i,e[11]=k):k=e[11];const N=`Actions for ${n}`;let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(ve,{size:14}),e[12]=g):g=e[12];let C;e[13]!==N?(C=t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Ls,"aria-label":N,children:g})}),e[13]=N,e[14]=C):C=e[14];let D;e[15]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(lt,{size:14}),e[15]=D):D=e[15];let F;e[16]!==c?(F=t.jsxs(te,{onClick:c,children:[D,"Browse files"]}),e[16]=c,e[17]=F):F=e[17];let $;e[18]!==o?($=o&&t.jsx(_e,{onShare:o}),e[18]=o,e[19]=$):$=e[19];let P;e[20]!==d?(P=d&&t.jsxs(te,{variant:"destructive",onClick:d,children:[t.jsx(je,{size:14}),"Delete"]}),e[20]=d,e[21]=P):P=e[21];let z;e[22]!==F||e[23]!==$||e[24]!==P?(z=t.jsxs(we,{align:"end",onClick:Bs,children:[F,$,P]}),e[22]=F,e[23]=$,e[24]=P,e[25]=z):z=e[25];let p;e[26]!==C||e[27]!==z?(p=t.jsxs(ke,{children:[C,z]}),e[26]=C,e[27]=z,e[28]=p):p=e[28];let T;e[29]!==r||e[30]!==p||e[31]!==y||e[32]!==k?(T=t.jsx(fe,{icon:j,name:y,meta:k,subtitle:"Skill",publicState:r,actions:p}),e[29]=r,e[30]=p,e[31]=y,e[32]=k,e[33]=T):T=e[33];const E=v?.description??"";let L;e[34]!==E?(L=t.jsx("p",{className:"line-clamp-2 min-h-8 text-xs leading-4 text-muted-foreground",children:E}),e[34]=E,e[35]=L):L=e[35];let q;return e[36]!==a||e[37]!==T||e[38]!==L?(q=t.jsxs(de,{onOpen:a,children:[T,L]}),e[36]=a,e[37]=T,e[38]=L,e[39]=q):q=e[39],q}function Bs(s){return s.stopPropagation()}function Ls(s){return s.stopPropagation()}function _s(s){const e=S.c(47),{dirName:n,updatedAt:i,tokensUrl:l,onOpen:r,onBrowse:a,onDelete:c}=s;let o;e[0]!==l?(o=B.fileText(l),e[0]=l,e[1]=o):o=e[1];let d;e[2]!==l?(d=async()=>{const N=await fetch(l,{credentials:"include"});if(!N.ok)throw new Error(`fetch failed: ${N.status}`);return N.text()},e[2]=l,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,v,j;if(e[7]!==f||e[8]!==n||e[9]!==a||e[10]!==c||e[11]!==r||e[12]!==i){const N=f?dt(f).filter(Ks).slice(0,6):[];m=de,v=r;let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(pe,{size:16})}),e[18]=g):g=e[18];let C;e[19]!==i?(C=ce(i),e[19]=i,e[20]=C):C=e[20];const D=`Actions for ${n}`;let F;e[21]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(ve,{size:14}),e[21]=F):F=e[21];let $;e[22]!==D?($=t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Is,"aria-label":D,children:F})}),e[22]=D,e[23]=$):$=e[23];let P;e[24]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(lt,{size:14}),e[24]=P):P=e[24];let z;e[25]!==a?(z=t.jsxs(te,{onClick:a,children:[P,"Browse files"]}),e[25]=a,e[26]=z):z=e[26];let p;e[27]!==c?(p=c&&t.jsxs(te,{variant:"destructive",onClick:c,children:[t.jsx(je,{size:14}),"Delete"]}),e[27]=c,e[28]=p):p=e[28];let T;e[29]!==z||e[30]!==p?(T=t.jsxs(we,{align:"end",onClick:qs,children:[z,p]}),e[29]=z,e[30]=p,e[31]=T):T=e[31];let E;e[32]!==$||e[33]!==T?(E=t.jsxs(ke,{children:[$,T]}),e[32]=$,e[33]=T,e[34]=E):E=e[34],e[35]!==n||e[36]!==E||e[37]!==C?(j=t.jsx(fe,{icon:g,name:n,meta:C,subtitle:"Brand",actions:E}),e[35]=n,e[36]=E,e[37]=C,e[38]=j):j=e[38],h="flex min-h-5 items-center gap-1.5",x=N.map(Rs),e[7]=f,e[8]=n,e[9]=a,e[10]=c,e[11]=r,e[12]=i,e[13]=m,e[14]=h,e[15]=x,e[16]=v,e[17]=j}else m=e[13],h=e[14],x=e[15],v=e[16],j=e[17];let y;e[39]!==h||e[40]!==x?(y=t.jsx("div",{className:h,children:x}),e[39]=h,e[40]=x,e[41]=y):y=e[41];let k;return e[42]!==m||e[43]!==v||e[44]!==j||e[45]!==y?(k=t.jsxs(m,{onOpen:v,children:[j,y]}),e[42]=m,e[43]=v,e[44]=j,e[45]=y,e[46]=k):k=e[46],k}function Rs(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 Is(s){return s.stopPropagation()}function Ks(s){return s.isColor}function ze(s){const e=S.c(4),{children:n}=s,[i,l]=U.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&&(l(!0),d.disconnect())},{rootMargin:"200px"});d.observe(o)},e[0]=r):r=e[0];const[a]=U.useState(r);if(i){let o;return e[1]!==n?(o=t.jsx(t.Fragment,{children:n}),e[1]=n,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 Hs(s){const e=S.c(11),{url:n}=s;let i;e[0]!==n?(i=B.fileText(n),e[0]=n,e[1]=i):i=e[1];let l;e[2]!==n?(l=async()=>{const d=await fetch(n,{credentials:"include"});if(!d.ok)throw new Error(`fetch failed: ${d.status}`);return d.text()},e[2]=n,e[3]=l):l=e[3];let r;e[4]!==i||e[5]!==l?(r={queryKey:i,queryFn:l,staleTime:6e4,retry:!1},e[4]=i,e[5]=l,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 Vs(s){const e=S.c(23),{url:n,ext:i}=s;let l;e[0]!==n?(l=B.csvThumb(n),e[0]=n,e[1]=l):l=e[1];let r;e[2]!==n?(r=async()=>{const j=await fetch(n,{credentials:"include",headers:{Range:"bytes=0-8191"}});if(!j.ok)throw new Error(`fetch failed: ${j.status}`);return j.text()},e[2]=n,e[3]=r):r=e[3];let a;e[4]!==l||e[5]!==r?(a={queryKey:l,queryFn:r,staleTime:6e4,retry:!1},e[4]=l,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=k=>k.split(o).slice(0,6).map(Ws),e[13]=o,e[14]=j):j=e[14];const y=c.split(`
|
|
9
|
-
`).filter(Boolean).slice(0,7).map(j);if(y.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=y.map(Gs)}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 v;return e[20]!==f||e[21]!==x?(v=t.jsx("div",{className:f,children:x}),e[20]=f,e[21]=x,e[22]=v):v=e[22],v}function Gs(s,e){return t.jsx("tr",{className:ee(e===0&&"bg-muted/50 font-medium"),children:s.map(Qs)},e)}function Qs(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 Ws(s){return s.trim().replace(/^"|"$/g,"")}function Ys(s){const e=S.c(14),{filename:n,size:i,downloadUrl:l}=s;let r;if(e[0]!==l||e[1]!==n||e[2]!==i){const a=
|
|
8
|
+
`)){const i=n.match(/^([A-Za-z][\w-]*):\s*(.*)$/);i?.[1]&&i[2]!==void 0&&(e[i[1].toLowerCase()]=i[2].trim())}return e}function Qe(s){for(const e of s.split(/\n\s*\n/)){const n=e.trim();if(!(!n||n.startsWith("#")))return n.replace(/\n/g," ")}return null}function ft(s){const e=s.match(/^---\n([\s\S]*?)\n---\n?/);if(!e||e[1]===void 0)return{name:null,description:Qe(s),body:s};const n=Ss(e[1]),i=s.slice(e[0].length);return{name:n.name||null,description:n.description||Qe(i),body:i}}const $s=new Set(["png","jpg","jpeg","gif","webp","svg","avif"]),Cs=new Set(["csv","tsv"]),Ds=new Set(["mp4","webm","mov","m4v"]),Ts=new Set(["txt","md","markdown","json","log","yaml","yml","xml","html","htm"]),zs=256*1024;function ce(s){const e=new Date(s);if(Number.isNaN(e.getTime()))return"";const n=Date.now()-e.getTime(),i=Math.floor(n/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;const l=Math.floor(i/60);if(l<24)return`${l}h ago`;const r=Math.floor(l/24);return r<30?`${r}d ago`:e.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Ps(s){return s.split(".").pop()?.toLowerCase()??""}function _e(s){const e=S.c(3),{onShare:n}=s;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ft,{size:14}),e[0]=i):i=e[0];let l;return e[1]!==n?(l=t.jsxs(te,{onClick:n,children:[i,"Share"]}),e[1]=n,e[2]=l):l=e[2],l}function Fs(s){const e=S.c(9),{state:n}=s,i=n==="password"?"Password-protected — link + password to view":n==="inherited"?"Shared via a parent folder":"Public — anyone with the link can view",l=n==="password"?is:nt,r=n==="inherited"?"text-muted-foreground/60":"text-primary";let a;e[0]!==r?(a=ee(r),e[0]=r,e[1]=a):a=e[1];let c;e[2]!==l||e[3]!==i||e[4]!==a?(c=t.jsx(l,{size:12,className:a,"aria-label":i}),e[2]=l,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 ut(s){const e=S.c(18),{downloadUrl:n,filename:i,onShare:l,onDelete:r}=s,a=`Actions for ${i}`;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(ve,{size:14}),e[0]=c):c=e[0];let o;e[1]!==a?(o=t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Es,"aria-label":a,children:c})}),e[1]=a,e[2]=o):o=e[2];let d;e[3]!==l?(d=l&&t.jsx(_e,{onShare:l}),e[3]=l,e[4]=d):d=e[4];let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Pt,{size:14}),e[5]=u):u=e[5];let f;e[6]!==n||e[7]!==i?(f=t.jsx(te,{asChild:!0,children:t.jsxs("a",{href:n,download:i,children:[u,"Download"]})}),e[6]=n,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(je,{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(we,{align:"end",onClick:Os,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(ke,{children:[o,h]}),e[15]=o,e[16]=h,e[17]=x):x=e[17],x}function Os(s){return s.stopPropagation()}function Es(s){return s.stopPropagation()}function de(s){const e=S.c(9),{onOpen:n,children:i,className:l}=s;let r;e[0]!==n?(r=o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),n())},e[0]=n,e[1]=r):r=e[1];let a;e[2]!==l?(a=ee("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",l),e[2]=l,e[3]=a):a=e[3];let c;return e[4]!==i||e[5]!==n||e[6]!==r||e[7]!==a?(c=t.jsx("div",{role:"button",tabIndex:0,onClick:n,onKeyDown:r,className:a,children:i}),e[4]=i,e[5]=n,e[6]=r,e[7]=a,e[8]=c):c=e[8],c}function fe(s){const e=S.c(19),{icon:n,name:i,meta:l,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(Fs,{state:a}),e[2]=a,e[3]=d):d=e[3];let u;e[4]!==l?(u=l&&t.jsx("span",{className:"shrink-0 text-xs text-muted-foreground",children:l}),e[4]=l,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:"text-xs text-muted-foreground",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]!==n||e[17]!==h?(x=t.jsxs("div",{className:"flex w-full items-center gap-2.5",children:[n,h,c]}),e[15]=c,e[16]=n,e[17]=h,e[18]=x):x=e[18],x}function Ne(s){const e=S.c(17),{name:n,meta:i,subtitle:l,glyph:r,readOnly:a,publicState:c,onOpen:o,onShare:d,onDelete:u}=s;let f;e[0]!==r||e[1]!==a?(f=t.jsx(us,{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]!==n||e[4]!==u||e[5]!==d?(m=d||u?t.jsxs(ke,{children:[t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Ms,"aria-label":`Actions for ${n}`,children:t.jsx(ve,{size:14})})}),t.jsxs(we,{align:"end",onClick:As,children:[d&&t.jsx(_e,{onShare:d}),u&&t.jsxs(te,{variant:"destructive",onClick:u,children:[t.jsx(je,{size:14}),"Delete"]})]})]}):void 0,e[3]=n,e[4]=u,e[5]=d,e[6]=m):m=e[6];let h;e[7]!==i||e[8]!==n||e[9]!==c||e[10]!==l||e[11]!==f||e[12]!==m?(h=t.jsx(fe,{icon:f,name:n,meta:i,subtitle:l,publicState:c,actions:m}),e[7]=i,e[8]=n,e[9]=c,e[10]=l,e[11]=f,e[12]=m,e[13]=h):h=e[13];let x;return e[14]!==o||e[15]!==h?(x=t.jsx(de,{onOpen:o,children:h}),e[14]=o,e[15]=h,e[16]=x):x=e[16],x}function As(s){return s.stopPropagation()}function Ms(s){return s.stopPropagation()}function mt(s){const e=S.c(21),{filename:n,updatedAt:i,downloadUrl:l,publicState:r,onOpen:a,onShare:c,onDelete:o}=s;let d;e[0]!==n?(d=t.jsx(ie,{filename:n,className:"h-8 w-6.5 shrink-0"}),e[0]=n,e[1]=d):d=e[1];let u;e[2]!==i?(u=ce(i),e[2]=i,e[3]=u):u=e[3];let f;e[4]!==n?(f=at(n),e[4]=n,e[5]=f):f=e[5];let m;e[6]!==l||e[7]!==n||e[8]!==o||e[9]!==c?(m=t.jsx(ut,{downloadUrl:l,filename:n,onShare:c,onDelete:o}),e[6]=l,e[7]=n,e[8]=o,e[9]=c,e[10]=m):m=e[10];let h;e[11]!==n||e[12]!==r||e[13]!==d||e[14]!==u||e[15]!==f||e[16]!==m?(h=t.jsx(fe,{icon:d,name:n,meta:u,subtitle:f,publicState:r,actions:m}),e[11]=n,e[12]=r,e[13]=d,e[14]=u,e[15]=f,e[16]=m,e[17]=h):h=e[17];let x;return e[18]!==a||e[19]!==h?(x=t.jsx(de,{onOpen:a,children:h}),e[18]=a,e[19]=h,e[20]=x):x=e[20],x}function Us(s){const e=S.c(40),{dirName:n,updatedAt:i,skillMdUrl:l,publicState:r,onOpen:a,onBrowse:c,onShare:o,onDelete:d}=s;let u;e[0]!==l?(u=B.fileText(l),e[0]=l,e[1]=u):u=e[1];let f;e[2]!==l?(f=async()=>{const R=await fetch(l,{credentials:"include"});if(!R.ok)throw new Error(`fetch failed: ${R.status}`);return R.text()},e[2]=l,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?ft(h):null,e[7]=h,e[8]=x):x=e[8];const v=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(Oe,{size:16})}),e[9]=j):j=e[9];const y=v?.name??n;let k;e[10]!==i?(k=ce(i),e[10]=i,e[11]=k):k=e[11];const N=`Actions for ${n}`;let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(ve,{size:14}),e[12]=g):g=e[12];let C;e[13]!==N?(C=t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Ls,"aria-label":N,children:g})}),e[13]=N,e[14]=C):C=e[14];let D;e[15]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx(lt,{size:14}),e[15]=D):D=e[15];let P;e[16]!==c?(P=t.jsxs(te,{onClick:c,children:[D,"Browse files"]}),e[16]=c,e[17]=P):P=e[17];let $;e[18]!==o?($=o&&t.jsx(_e,{onShare:o}),e[18]=o,e[19]=$):$=e[19];let F;e[20]!==d?(F=d&&t.jsxs(te,{variant:"destructive",onClick:d,children:[t.jsx(je,{size:14}),"Delete"]}),e[20]=d,e[21]=F):F=e[21];let z;e[22]!==P||e[23]!==$||e[24]!==F?(z=t.jsxs(we,{align:"end",onClick:Bs,children:[P,$,F]}),e[22]=P,e[23]=$,e[24]=F,e[25]=z):z=e[25];let p;e[26]!==C||e[27]!==z?(p=t.jsxs(ke,{children:[C,z]}),e[26]=C,e[27]=z,e[28]=p):p=e[28];let T;e[29]!==r||e[30]!==p||e[31]!==y||e[32]!==k?(T=t.jsx(fe,{icon:j,name:y,meta:k,subtitle:"Skill",publicState:r,actions:p}),e[29]=r,e[30]=p,e[31]=y,e[32]=k,e[33]=T):T=e[33];const E=v?.description??"";let L;e[34]!==E?(L=t.jsx("p",{className:"line-clamp-2 min-h-8 text-xs leading-4 text-muted-foreground",children:E}),e[34]=E,e[35]=L):L=e[35];let q;return e[36]!==a||e[37]!==T||e[38]!==L?(q=t.jsxs(de,{onOpen:a,children:[T,L]}),e[36]=a,e[37]=T,e[38]=L,e[39]=q):q=e[39],q}function Bs(s){return s.stopPropagation()}function Ls(s){return s.stopPropagation()}function _s(s){const e=S.c(47),{dirName:n,updatedAt:i,tokensUrl:l,onOpen:r,onBrowse:a,onDelete:c}=s;let o;e[0]!==l?(o=B.fileText(l),e[0]=l,e[1]=o):o=e[1];let d;e[2]!==l?(d=async()=>{const N=await fetch(l,{credentials:"include"});if(!N.ok)throw new Error(`fetch failed: ${N.status}`);return N.text()},e[2]=l,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,v,j;if(e[7]!==f||e[8]!==n||e[9]!==a||e[10]!==c||e[11]!==r||e[12]!==i){const N=f?dt(f).filter(Ks).slice(0,6):[];m=de,v=r;let g;e[18]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx("div",{className:"flex size-8 shrink-0 items-center justify-center rounded-lg bg-primary/10 text-primary",children:t.jsx(pe,{size:16})}),e[18]=g):g=e[18];let C;e[19]!==i?(C=ce(i),e[19]=i,e[20]=C):C=e[20];const D=`Actions for ${n}`;let P;e[21]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(ve,{size:14}),e[21]=P):P=e[21];let $;e[22]!==D?($=t.jsx(ye,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-6 shrink-0 opacity-0 transition-opacity group-hover/card:opacity-100 data-[state=open]:opacity-100",onClick:Is,"aria-label":D,children:P})}),e[22]=D,e[23]=$):$=e[23];let F;e[24]===Symbol.for("react.memo_cache_sentinel")?(F=t.jsx(lt,{size:14}),e[24]=F):F=e[24];let z;e[25]!==a?(z=t.jsxs(te,{onClick:a,children:[F,"Browse files"]}),e[25]=a,e[26]=z):z=e[26];let p;e[27]!==c?(p=c&&t.jsxs(te,{variant:"destructive",onClick:c,children:[t.jsx(je,{size:14}),"Delete"]}),e[27]=c,e[28]=p):p=e[28];let T;e[29]!==z||e[30]!==p?(T=t.jsxs(we,{align:"end",onClick:qs,children:[z,p]}),e[29]=z,e[30]=p,e[31]=T):T=e[31];let E;e[32]!==$||e[33]!==T?(E=t.jsxs(ke,{children:[$,T]}),e[32]=$,e[33]=T,e[34]=E):E=e[34],e[35]!==n||e[36]!==E||e[37]!==C?(j=t.jsx(fe,{icon:g,name:n,meta:C,subtitle:"Brand",actions:E}),e[35]=n,e[36]=E,e[37]=C,e[38]=j):j=e[38],h="flex min-h-5 items-center gap-1.5",x=N.map(Rs),e[7]=f,e[8]=n,e[9]=a,e[10]=c,e[11]=r,e[12]=i,e[13]=m,e[14]=h,e[15]=x,e[16]=v,e[17]=j}else m=e[13],h=e[14],x=e[15],v=e[16],j=e[17];let y;e[39]!==h||e[40]!==x?(y=t.jsx("div",{className:h,children:x}),e[39]=h,e[40]=x,e[41]=y):y=e[41];let k;return e[42]!==m||e[43]!==v||e[44]!==j||e[45]!==y?(k=t.jsxs(m,{onOpen:v,children:[j,y]}),e[42]=m,e[43]=v,e[44]=j,e[45]=y,e[46]=k):k=e[46],k}function Rs(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 Is(s){return s.stopPropagation()}function Ks(s){return s.isColor}function ze(s){const e=S.c(4),{children:n}=s,[i,l]=U.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&&(l(!0),d.disconnect())},{rootMargin:"200px"});d.observe(o)},e[0]=r):r=e[0];const[a]=U.useState(r);if(i){let o;return e[1]!==n?(o=t.jsx(t.Fragment,{children:n}),e[1]=n,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 Hs(s){const e=S.c(11),{url:n}=s;let i;e[0]!==n?(i=B.fileText(n),e[0]=n,e[1]=i):i=e[1];let l;e[2]!==n?(l=async()=>{const d=await fetch(n,{credentials:"include"});if(!d.ok)throw new Error(`fetch failed: ${d.status}`);return d.text()},e[2]=n,e[3]=l):l=e[3];let r;e[4]!==i||e[5]!==l?(r={queryKey:i,queryFn:l,staleTime:6e4,retry:!1},e[4]=i,e[5]=l,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 Vs(s){const e=S.c(23),{url:n,ext:i}=s;let l;e[0]!==n?(l=B.csvThumb(n),e[0]=n,e[1]=l):l=e[1];let r;e[2]!==n?(r=async()=>{const j=await fetch(n,{credentials:"include",headers:{Range:"bytes=0-8191"}});if(!j.ok)throw new Error(`fetch failed: ${j.status}`);return j.text()},e[2]=n,e[3]=r):r=e[3];let a;e[4]!==l||e[5]!==r?(a={queryKey:l,queryFn:r,staleTime:6e4,retry:!1},e[4]=l,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=k=>k.split(o).slice(0,6).map(Ws),e[13]=o,e[14]=j):j=e[14];const y=c.split(`
|
|
9
|
+
`).filter(Boolean).slice(0,7).map(j);if(y.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=y.map(Gs)}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 v;return e[20]!==f||e[21]!==x?(v=t.jsx("div",{className:f,children:x}),e[20]=f,e[21]=x,e[22]=v):v=e[22],v}function Gs(s,e){return t.jsx("tr",{className:ee(e===0&&"bg-muted/50 font-medium"),children:s.map(Qs)},e)}function Qs(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 Ws(s){return s.trim().replace(/^"|"$/g,"")}function Ys(s){const e=S.c(14),{filename:n,size:i,downloadUrl:l}=s;let r;if(e[0]!==l||e[1]!==n||e[2]!==i){const a=Ps(n);let c;if($s.has(a)){let o;e[4]!==l?(o=t.jsx("img",{src:l,alt:"",loading:"lazy",className:"h-full w-full object-cover"}),e[4]=l,e[5]=o):o=e[5],c=o}else if(Ds.has(a)){const o=`${l}#t=0.1`;let d;e[6]!==o?(d=t.jsx(ze,{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]!==n?(o=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(ie,{filename:n,className:"h-14 w-11 opacity-60"})}),e[8]=n,e[9]=o):o=e[9],c=o}else if(Cs.has(a))c=t.jsx(ze,{children:t.jsx(Vs,{url:l,ext:a})});else if(Ts.has(a)&&i<=zs){let o;e[10]!==l?(o=t.jsx(ze,{children:t.jsx(Hs,{url:l})}),e[10]=l,e[11]=o):o=e[11],c=o}else{let o;e[12]!==n?(o=t.jsx("div",{className:"flex h-full w-full items-center justify-center",children:t.jsx(ie,{filename:n,className:"h-14 w-11 opacity-60"})}),e[12]=n,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]=l,e[1]=n,e[2]=i,e[3]=r}else r=e[3];return r}function Xs(s){const e=S.c(26),n=s.onOpen;let i;e[0]!==s.filename?(i=t.jsx(ie,{filename:s.filename,className:"h-8 w-6.5 shrink-0"}),e[0]=s.filename,e[1]=i):i=e[1];const l=s.filename;let r;e[2]!==s.updatedAt?(r=ce(s.updatedAt),e[2]=s.updatedAt,e[3]=r):r=e[3];let a;e[4]!==s.filename?(a=at(s.filename),e[4]=s.filename,e[5]=a):a=e[5];let c;e[6]!==s.downloadUrl||e[7]!==s.filename||e[8]!==s.onDelete||e[9]!==s.onShare?(c=t.jsx(ut,{downloadUrl:s.downloadUrl,filename:s.filename,onShare:s.onShare,onDelete:s.onDelete}),e[6]=s.downloadUrl,e[7]=s.filename,e[8]=s.onDelete,e[9]=s.onShare,e[10]=c):c=e[10];let o;e[11]!==s.filename||e[12]!==s.publicState||e[13]!==i||e[14]!==r||e[15]!==a||e[16]!==c?(o=t.jsx(fe,{icon:i,name:l,meta:r,subtitle:a,publicState:s.publicState,actions:c}),e[11]=s.filename,e[12]=s.publicState,e[13]=i,e[14]=r,e[15]=a,e[16]=c,e[17]=o):o=e[17];let d;e[18]!==s.downloadUrl||e[19]!==s.filename||e[20]!==s.size?(d=t.jsx(Ys,{filename:s.filename,size:s.size,downloadUrl:s.downloadUrl}),e[18]=s.downloadUrl,e[19]=s.filename,e[20]=s.size,e[21]=d):d=e[21];let u;return e[22]!==s.onOpen||e[23]!==o||e[24]!==d?(u=t.jsxs(de,{onOpen:n,children:[o,d]}),e[22]=s.onOpen,e[23]=o,e[24]=d,e[25]=u):u=e[25],u}async function Zs(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}const Js=`
|
|
10
10
|
*{box-sizing:border-box}
|
|
11
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
12
|
.stack{display:flex;flex-direction:column;gap:18px;max-width:760px}
|
|
@@ -166,4 +166,4 @@ import{e as S,r as U,j as t,m as Y,B as _,K as B,c as ee,p as Pe,F as Je,n as W,
|
|
|
166
166
|
<p class="cta">slides-create --theme …</p>
|
|
167
167
|
</section>`].join(`
|
|
168
168
|
|
|
169
|
-
`);async function We(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function rn(s,e){const n=e?`<style>${e}</style>`:"";return s.replaceAll("{{{slides}}}",ln).replaceAll("{{title}}",nn).replace(/(src=")(\/deck-runtime\/)/g,`$1${window.location.origin}$2`).replace("</head>",`${n}</head>`)}function an(s){const e=S.c(23),{readUrl:n,title:i,tokensUrl:l}=s;let r;e[0]!==n?(r=B.fileText(n),e[0]=n,e[1]=r):r=e[1];let a;e[2]!==n?(a=()=>We(n),e[2]=n,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]!==l?(d=B.fileText(l??""),e[7]=l,e[8]=d):d=e[8];const u=!!l;let f;e[9]!==l?(f=()=>We(l??""),e[9]=l,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||l&&h.isPending){let y;return e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(K,{className:"aspect-[16/9] w-full max-w-3xl rounded-xl"})}),e[15]=y):y=e[15],y}if(o.isError||!o.data){let y;return e[16]===Symbol.for("react.memo_cache_sentinel")?(y=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]=y):y=e[16],y}const x=h.data??null;let v;e[17]!==x||e[18]!==o.data?(v=rn(o.data,x),e[17]=x,e[18]=o.data,e[19]=v):v=e[19];let j;return e[20]!==v||e[21]!==i?(j=t.jsx("iframe",{title:i,srcDoc:v,sandbox:"allow-scripts",className:"block h-full w-full border-0 bg-white"}),e[20]=v,e[21]=i,e[22]=j):j=e[22],j}async function Ye(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function ae(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("p",{className:"text-sm font-medium text-foreground",children:n}),e[0]=n,e[1]=i):i=e[1],i}function on(s){const e=S.c(16),{family:n,tokens:i,editing:l,valueOf:r,onEdit:a}=s;let c;e[0]!==n?(c=t.jsx("span",{className:"text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=c):c=e[1];let o;if(e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==l||e[8]!==a||e[9]!==r?(f=m=>{const h=r(m),x=`${m.name.replace(/^--brand-/,"")}: ${h}`;return l&&/^#/.test(h)?t.jsx("input",{type:"color","aria-label":m.name,title:x,value:js(h),onChange:v=>a(m.name,v.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]=l,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=l,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 cn(s){const e=S.c(9),{token:n,value:i}=s;if(n.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(n.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(n.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(n.kind==="type"&&/^--brand-text-/.test(n.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 l;return e[8]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("span",{className:"size-7 shrink-0"}),e[8]=l):l=e[8],l}function ht(s){const e=S.c(17),{token:n,value:i,editing:l,onEdit:r}=s;let a;e[0]!==n||e[1]!==i?(a=t.jsx(cn,{token:n,value:i}),e[0]=n,e[1]=i,e[2]=a):a=e[2];let c;if(e[3]!==n.name){let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=/^--brand-/,e[5]=f):f=e[5],c=n.name.replace(f,""),e[3]=n.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]!==l||e[9]!==r||e[10]!==n.name||e[11]!==i?(d=l?t.jsx(Ue,{value:i,onChange:f=>r(n.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]=l,e[9]=r,e[10]=n.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 re(s){const e=S.c(16),{label:n,tokens:i,editing:l,valueOf:r,onEdit:a}=s;if(i.length===0)return null;let c;e[0]!==n?(c=t.jsx(ae,{children:n}),e[0]=n,e[1]=c):c=e[1];let o;if(e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==l||e[8]!==a||e[9]!==r?(f=m=>t.jsx(ht,{token:m,value:r(m),editing:l,onEdit:a},m.name),e[7]=l,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=l,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 pt({brandPath:s,onClose:e,variant:n}){const{org:i}=Pe(),l=Be(s),r=l.volume??"",a=l.dirPath,c=A(a),o=l.readOnly,d=Je(),u=be(),f=Wt(r),{upload:m,remove:h}=Fe(r),x=U.useRef(null),v=Le(r,a),j=v.data??[],y=b=>j.some(M=>M.kind==="file"&&A(M.path)===b),k=y("tokens.css"),N=y("brand.md"),g=y("slides-theme.html"),C=Ns(j),D=u(r,`${a}/tokens.css`),F=u(r,`${a}/brand.md`),$=u(r,`${a}/slides-theme.html`),P=Y({queryKey:B.fileText(D),enabled:k,queryFn:()=>Ye(D),staleTime:6e4,retry:!1}),z=Y({queryKey:B.fileText(F),enabled:N,queryFn:()=>Ye(F),staleTime:6e4,retry:!1}),[p,T]=U.useState(!1),[E,L]=U.useState({}),[q,R]=U.useState(null),[Q,O]=U.useState(!1),[G,se]=U.useState(!1),[Se,ue]=U.useState("deck"),H=P.data?dt(P.data):[],$e=b=>H.find(M=>M.name===b)?.value,V=b=>E[b.name]??b.value,w=ws(H),I=H.filter(b=>b.kind==="font"),ne=H.filter(b=>b.kind==="type"),vt=H.filter(b=>b.kind==="space"),jt=H.filter(b=>b.kind==="radius"),yt=H.filter(b=>b.kind==="shadow"),wt=H.filter(b=>b.kind==="motion"),kt=H.filter(b=>b.kind==="other"),Z=(b,M)=>L(he=>({...he,[b]:M})),me=g&&Se==="deck",Ce=q??z.data??"",De=Object.entries(E).filter(([b,M])=>$e(b)!==M),Ie=q!==null&&q!==(z.data??""),Nt=De.length>0||Ie;function St(){L({}),R(null),T(!1)}async function $t(){O(!0);try{if(De.length>0){let b=P.data??"";for(const[M,he]of De)b=ks(b,M,he);await f.mutateAsync({path:`${a}/tokens.css`,body:b,contentType:"text/css; charset=utf-8"}),d.invalidateQueries({queryKey:B.fileText(D)})}Ie&&q!==null&&(await f.mutateAsync({path:`${a}/brand.md`,body:q,contentType:"text/markdown; charset=utf-8"}),d.invalidateQueries({queryKey:B.fileText(F)})),d.invalidateQueries({queryKey:B.orgFsVolume(i.id,r)}),d.invalidateQueries({queryKey:B.orgFsRecent(i.id)}),L({}),R(null),T(!1),W.success("Brand saved")}catch(b){W.error(b instanceof Error?b.message:"Failed to save brand")}finally{O(!1)}}async function Ct(b){const M=b?.[0];if(!M)return;const Ke=`logo.${(M.name.split(".").pop()??"png").toLowerCase()}`;try{await m.mutateAsync({dir:a,files:[new File([M],Ke,{type:M.type})]}),C&&A(C)!==Ke&&await h.mutateAsync(C),W.success("Logo updated")}catch(He){W.error(He instanceof Error?He.message:"Logo upload failed")}finally{x.current&&(x.current.value="")}}const Dt=!v.isPending&&!k&&!N&&!C;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(pe,{size:18})}),n==="dialog"?t.jsx(Me,{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(_,{variant:"ghost",size:"sm",onClick:St,disabled:Q,children:"Cancel"}),t.jsx(_,{size:"sm",disabled:!Nt||Q,onClick:()=>{$t()},children:Q?"Saving…":"Save"})]}):t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>T(!0),children:[t.jsx(Ot,{size:14}),"Edit"]})),n==="dialog"?t.jsx(rt,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ge,{size:16})})}):t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:e,children:t.jsx(ge,{size:16})})]}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:v.isPending?t.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[t.jsx(K,{className:"h-40 w-full rounded-xl"}),t.jsx(K,{className:"h-4 w-1/3"}),t.jsx(K,{className:"h-4 w-2/3"})]}):Dt?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:[(g||k)&&t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{role:"button",tabIndex:0,"aria-label":G?"Show preview":"Hide preview",onClick:()=>se(b=>!b),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),se(M=>!M))},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:b=>b.stopPropagation(),children:[g&&t.jsx("button",{type:"button",onClick:()=>{ue("deck"),se(!1)},className:ee("rounded-md px-2.5 py-1",me?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Deck"}),t.jsx("button",{type:"button",onClick:()=>{ue("components"),se(!1)},className:ee("rounded-md px-2.5 py-1",me?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm"),children:"Components"})]}),G?t.jsx(as,{size:16,className:"shrink-0 text-muted-foreground"}):t.jsx(os,{size:16,className:"shrink-0 text-muted-foreground"})]}),!G&&t.jsx("div",{className:"px-4 pb-4",children:t.jsx("div",{className:ee("w-full overflow-hidden rounded-xl border border-border bg-muted/30",me?"aspect-[16/9]":"h-96"),children:me?t.jsx(an,{readUrl:$,title:`${c} deck theme`,tokensUrl:D}):t.jsx(sn,{tokensUrl:D})})})]}),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(ae,{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:C?t.jsx("img",{src:u(r,C),alt:`${c} logo`,className:"max-h-full max-w-full object-contain"}):t.jsx(pe,{size:28,className:"text-muted-foreground/50"})}),p&&t.jsxs("div",{children:[t.jsxs(_,{variant:"outline",size:"sm",disabled:m.isPending,onClick:()=>x.current?.click(),children:[t.jsx(xe,{size:14}),C?"Replace logo":"Add logo"]}),t.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:b=>{Ct(b.target.files)}})]})]})]}),w.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ae,{children:"Colors"}),w.map(b=>t.jsx(on,{family:b.family,tokens:b.tokens,editing:p,valueOf:V,onEdit:Z},b.family))]}),(I.length>0||ne.length>0)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ae,{children:"Typography"}),I.map(b=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:b.name.replace(/^--brand-font-?/,"")||"font"}),p?t.jsx(Ue,{value:V(b),onChange:M=>Z(b.name,M.target.value),className:"h-9"}):t.jsx("span",{className:"truncate text-lg text-foreground",style:{fontFamily:V(b)},children:V(b)})]},b.name)),ne.map(b=>t.jsx(ht,{token:b,value:V(b),editing:p,onEdit:Z},b.name))]}),t.jsx(re,{label:"Spacing",tokens:vt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Radius",tokens:jt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Shadows",tokens:yt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Motion",tokens:wt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Tokens",tokens:kt,editing:p,valueOf:V,onEdit:Z}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ae,{children:"Voice & guidelines"}),p?t.jsx(rs,{value:Ce,onChange:b=>R(b.target.value),placeholder:"Describe the brand voice, tone, do's and don'ts…",className:"min-h-48 font-mono text-sm"}):z.isPending&&N?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(K,{className:"h-3 w-full"}),t.jsx(K,{className:"h-3 w-5/6"})]}):Ce.trim()?t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:t.jsx(ot,{id:`brand-preview-${s}`,text:Ce})}):t.jsx("p",{className:"text-sm text-muted-foreground",children:"No brand voice written yet."})]})]})]})})]})}function dn(s){const e=S.c(8),{brandPath:n,onClose:i}=s;let l;e[0]!==i?(l=c=>{c||i()},e[0]=i,e[1]=l):l=e[1];let r;e[2]!==n||e[3]!==i?(r=t.jsx(Ee,{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(pt,{brandPath:n,onClose:i,variant:"dialog"})}),e[2]=n,e[3]=i,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==r?(a=t.jsx(Ae,{open:!0,onOpenChange:l,children:r}),e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function fn(s){const e=S.c(3),{brandPath:n,onClose:i}=s;let l;return e[0]!==n||e[1]!==i?(l=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(pt,{brandPath:n,onClose:i,variant:"panel"})}),e[0]=n,e[1]=i,e[2]=l):l=e[2],l}function xt(s){const e=S.c(23),{skillPath:n,onClose:i,variant:l}=s,r=Be(n),{volume:a,dirPath:c}=r,o=be(),d=o(a??"",`${c}/SKILL.md`),u=B.fileText(d);let f;e[0]!==d?(f=async()=>{const O=await fetch(d,{credentials:"include"});if(!O.ok)throw new Error(`fetch failed: ${O.status}`);return O.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=Le(a??"",c);let v;e[5]!==c?(v=A(c),e[5]=c,e[6]=v):v=e[6];const j=v;let y;e[7]!==h.data?(y=h.data?ft(h.data):null,e[7]=h.data,e[8]=y):y=e[8];const k=y,N=mn;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=(O,G)=>N(O.path)?-1:N(G.path)?1:A(O.path).localeCompare(A(G.path)),e[9]=g):g=e[9];const C=(x.data??[]).filter(un).sort(g),[D,F]=U.useState(null),$=D===null?null:C.find(O=>O.path===D)??null,P=k?.name??j;let z;e[10]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(Oe,{size:18})}),e[10]=z):z=e[10];let p;e[11]!==P||e[12]!==l?(p=l==="dialog"?t.jsx(Me,{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]=l,e[13]=p):p=e[13];let T;e[14]!==i||e[15]!==l?(T=l==="dialog"?t.jsx(rt,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ge,{size:16})})}):t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:i,children:t.jsx(ge,{size:16})}),e[14]=i,e[15]=l,e[16]=T):T=e[16];let E;e[17]!==p||e[18]!==T?(E=t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[z,p,T]}),e[17]=p,e[18]=T,e[19]=E):E=e[19];let L;e[20]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[20]=L):L=e[20];const q="relative flex min-w-0 flex-1 flex-col overflow-y-auto",R=$?t.jsx(Yt,{file:{key:$.path,filename:A($.path),size:$.size,downloadUrl:o(a??"",$.path)}}):h.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(K,{className:"h-4 w-1/3"}),t.jsx(K,{className:"h-3 w-full"}),t.jsx(K,{className:"h-3 w-5/6"}),t.jsx(K,{className:"h-3 w-2/3"})]}):h.isError||!k?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:k.description??"Claude Code skill"})]}),t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:t.jsx(ot,{id:`skill-preview-${n}`,text:k.body})})]});let Q;return e[21]!==R?(Q=t.jsx("div",{className:q,children:R}),e[21]=R,e[22]=Q):Q=e[22],t.jsxs(t.Fragment,{children:[E,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:[L,x.isPending?t.jsx(K,{className:"mx-2 h-4 w-24"}):C.map(O=>{const G=N(O.path)?$===null:D===O.path;return t.jsxs("button",{type:"button",onClick:()=>F(N(O.path)?null:O.path),className:ee("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",G?"bg-background shadow-sm":"hover:bg-muted/60"),children:[t.jsx(ie,{filename:A(O.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:ee("truncate text-sm",G?"text-foreground":"text-muted-foreground"),children:A(O.path)})]},O.path)})]}),Q]})]})}function un(s){return s.kind==="file"}function mn(s){return A(s)==="SKILL.md"}function hn(s){const e=S.c(8),{skillPath:n,onClose:i}=s;let l;e[0]!==i?(l=c=>{c||i()},e[0]=i,e[1]=l):l=e[1];let r;e[2]!==i||e[3]!==n?(r=t.jsx(Ee,{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(xt,{skillPath:n,onClose:i,variant:"dialog"})}),e[2]=i,e[3]=n,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==r?(a=t.jsx(Ae,{open:!0,onOpenChange:l,children:r}),e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function pn(s){const e=S.c(3),{skillPath:n,onClose:i}=s;let l;return e[0]!==i||e[1]!==n?(l=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(xt,{skillPath:n,onClose:i,variant:"panel"})}),e[0]=i,e[1]=n,e[2]=l):l=e[2],l}function gt(s){return`${window.location.origin}${s}`}function oe(s){if(s.shareMode==="password")return"password";if(s.shareMode==="public"||s.readPublic)return"public";if(s.effectivePublic)return"inherited"}const bt=[{id:"home",description:"Your organization's home folder",glyph:Et},{id:"uploads",description:"Files your team uploads",glyph:xe},{id:"outputs",description:"Agent run outputs",glyph:Mt}],Xe=3;function J(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("p",{className:"text-[13px] text-foreground",children:n}),e[0]=n,e[1]=i):i=e[1],i}function X(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:n}),e[0]=n,e[1]=i):i=e[1],i}function Re(s){const e=S.c(2),{rows:n}=s,i=n===void 0?1:n;let l;return e[0]!==i?(l=t.jsx(X,{children:Array.from({length:i*3},xn)}),e[0]=i,e[1]=l):l=e[1],l}function xn(s,e){return t.jsx(K,{className:"h-16 rounded-2xl"},e)}function qe(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1],i}function gn(s){const e=S.c(6),{volume:n,displayName:i,description:l,glyph:r,onOpen:a}=s,c=ls(n),o=i??n,d=c.data?`${c.data.files} files`:void 0;let u;return e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==o||e[4]!==d?(u=t.jsx(Ne,{name:o,meta:d,subtitle:l,glyph:r,onOpen:a}),e[0]=l,e[1]=r,e[2]=a,e[3]=o,e[4]=d,e[5]=u):u=e[5],u}function bn(s){const e=S.c(8),{segments:n,onNavigate:i}=s;let l;e[0]!==i?(l=t.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(""),children:"Library"}),e[0]=i,e[1]=l):l=e[1];let r;e[2]!==i||e[3]!==n?(r=n.map((c,o)=>{const d=n.slice(0,o+1).join("/"),u=o===n.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(zt,{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]=n,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==r?(a=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[l,r]}),e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function vn(s){const e=S.c(23),{onOpenDir:n,onOpenFile:i,onShare:l,onDelete:r}=s,{org:a}=Pe(),c=ns(),o=ct(),d=be();let u;e[0]!==d||e[1]!==l?(u=h=>l({volume:h.volume,path:h.path,kind:"file",shareMode:h.shareMode??"private",effectivePublic:h.effectivePublic??!1,url:gt(d(h.volume,h.path))}),e[0]=d,e[1]=l,e[2]=u):u=e[2];const f=u;let m;if(e[3]!==d||e[4]!==r||e[5]!==n||e[6]!==i||e[7]!==a||e[8]!==o.data?.length||e[9]!==c.data||e[10]!==c.isPending||e[11]!==f){const h=c.data??[],x=h.slice(0,Xe),v=h.slice(Xe);let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(J,{children:"Folders"}),e[13]=j):j=e[13];let y;e[14]!==n||e[15]!==a?(y=bt.map(g=>t.jsx(gn,{volume:g.id,displayName:g.id==="home"?fs(a.slug):void 0,description:g.description,glyph:g.glyph,onOpen:()=>n(g.id)},g.id)),e[14]=n,e[15]=a,e[16]=y):y=e[16];let k;e[17]!==n||e[18]!==o.data?.length?(k=(o.data?.length??0)>0&&t.jsx(Ne,{name:"public",meta:`${o.data?.length} sets`,subtitle:"Curated skill sets — read-only",glyph:nt,readOnly:!0,onOpen:()=>n("public")}),e[17]=n,e[18]=o.data?.length,e[19]=k):k=e[19];let N;e[20]!==y||e[21]!==k?(N=t.jsxs("div",{className:"flex flex-col gap-3",children:[j,t.jsxs(X,{children:[y,k]})]}),e[20]=y,e[21]=k,e[22]=N):N=e[22],m=t.jsxs(t.Fragment,{children:[c.isPending?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Recently added"}),t.jsx(Re,{})]}):x.length>0?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Recently added"}),t.jsx(X,{children:x.map(g=>t.jsx(Xs,{filename:A(g.path),updatedAt:g.updatedAt,size:g.size,downloadUrl:d(g.volume,g.path),publicState:oe(g),onOpen:()=>i(`${g.volume}/${g.path}`),onShare:()=>f(g),onDelete:()=>r({volume:g.volume,path:g.path,kind:"file"})},`${g.volume}/${g.path}`))})]}):t.jsx(qe,{children:"No files yet — upload one, or ask an agent to produce something."}),N,v.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"All files"}),t.jsx(X,{children:v.map(g=>t.jsx(mt,{filename:A(g.path),updatedAt:g.updatedAt,downloadUrl:d(g.volume,g.path),publicState:oe(g),onOpen:()=>i(`${g.volume}/${g.path}`),onShare:()=>f(g),onDelete:()=>r({volume:g.volume,path:g.path,kind:"file"})},`${g.volume}/${g.path}`))})]})]}),e[3]=d,e[4]=r,e[5]=n,e[6]=i,e[7]=a,e[8]=o.data?.length,e[9]=c.data,e[10]=c.isPending,e[11]=f,e[12]=m}else m=e[12];return m}function jn(s){const e=S.c(11),{onOpenDir:n}=s,i=ct();if(i.isPending){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Re,{}),e[0]=o):o=e[0],o}let l;e[1]!==i.data?(l=i.data??[],e[1]=i.data,e[2]=l):l=e[2];const r=l;if(r.length===0){let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(qe,{children:"No public skill sets are configured."}),e[3]=o):o=e[3],o}let a;if(e[4]!==n||e[5]!==r){let o;e[7]!==n?(o=d=>t.jsx(Ne,{name:d,subtitle:"Read-only",readOnly:!0,onOpen:()=>n(`public/${d}`)},d),e[7]=n,e[8]=o):o=e[8],a=r.map(o),e[4]=n,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 yn(s){const e=S.c(34),{location:n,onOpenDir:i,onOpenFile:l,onOpenSkill:r,onOpenBrand:a,onShare:c,onDelete:o}=s,d=n.volume??"",u=Le(d,n.dirPath),f=be();if(u.isPending){let k;return e[0]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Re,{rows:2}),e[0]=k):k=e[0],k}if(u.isError){const k=u.error instanceof Error?u.error.message:"Failed to load";let N;return e[1]!==k?(N=t.jsx("p",{className:"text-sm text-destructive",children:k}),e[1]=k,e[2]=N):N=e[2],N}let m,h,x,v,j;if(e[3]!==f||e[4]!==u.data||e[5]!==n||e[6]!==o||e[7]!==a||e[8]!==i||e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==d){j=Symbol.for("react.early_return_sentinel");e:{const k=u.data??[],N=k.filter(Sn),g=k.filter(Nn),C=k.filter(kn),D=k.filter(wn);if(k.length===0){const p=n.readOnly?"Empty — this read-only set syncs from its GitHub source.":"Empty folder — upload a file or create a folder to get started.";let T;e[18]!==p?(T=t.jsx(qe,{children:p}),e[18]=p,e[19]=T):T=e[19],j=T;break e}let F;e[20]!==n.readOnly||e[21]!==o||e[22]!==d?(F=p=>n.readOnly?void 0:()=>o({volume:d,path:p.path,kind:p.kind}),e[20]=n.readOnly,e[21]=o,e[22]=d,e[23]=F):F=e[23];const $=F;let P;e[24]!==f||e[25]!==n.readOnly||e[26]!==c||e[27]!==d?(P=p=>n.readOnly?void 0:()=>c({volume:d,path:p.path,kind:p.kind,shareMode:p.shareMode??"private",effectivePublic:p.effectivePublic??!1,url:p.kind==="file"?gt(f(d,p.path)):void 0}),e[24]=f,e[25]=n.readOnly,e[26]=c,e[27]=d,e[28]=P):P=e[28];const z=P;m=N.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Skills"}),t.jsx(X,{children:N.map(p=>t.jsx(Us,{dirName:A(p.path),updatedAt:p.updatedAt,skillMdUrl:f(d,`${p.path}/SKILL.md`),publicState:oe(p),onOpen:()=>r(le(n,p.path)),onBrowse:()=>i(le(n,p.path)),onShare:z(p),onDelete:$(p)},p.path))})]}),h=g.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Brands"}),t.jsx(X,{children:g.map(p=>t.jsx(_s,{dirName:A(p.path),updatedAt:p.updatedAt,tokensUrl:f(d,`${p.path}/tokens.css`),onOpen:()=>a(le(n,p.path)),onBrowse:()=>i(le(n,p.path)),onDelete:$(p)},p.path))})]}),x=C.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Folders"}),t.jsx(X,{children:C.map(p=>t.jsx(Ne,{name:A(p.path),meta:ce(p.updatedAt),readOnly:n.readOnly,publicState:oe(p),onOpen:()=>i(le(n,p.path)),onShare:z(p),onDelete:$(p)},p.path))})]}),v=D.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Files"}),t.jsx(X,{children:D.map(p=>t.jsx(mt,{filename:A(p.path),updatedAt:p.updatedAt,downloadUrl:f(d,p.path),publicState:oe(p),onOpen:()=>l(le(n,p.path)),onShare:z(p),onDelete:$(p)},p.path))})]})}e[3]=f,e[4]=u.data,e[5]=n,e[6]=o,e[7]=a,e[8]=i,e[9]=l,e[10]=r,e[11]=c,e[12]=d,e[13]=m,e[14]=h,e[15]=x,e[16]=v,e[17]=j}else m=e[13],h=e[14],x=e[15],v=e[16],j=e[17];if(j!==Symbol.for("react.early_return_sentinel"))return j;let y;return e[29]!==m||e[30]!==h||e[31]!==x||e[32]!==v?(y=t.jsxs(t.Fragment,{children:[m,h,x,v]}),e[29]=m,e[30]=h,e[31]=x,e[32]=v,e[33]=y):y=e[33],y}function wn(s){return s.kind==="file"}function kn(s){return s.kind==="dir"&&!s.hasSkill&&!s.hasBrand}function Nn(s){return s.kind==="dir"&&s.hasBrand&&!s.hasSkill}function Sn(s){return s.kind==="dir"&&s.hasSkill}function Ze(){const{org:s}=Pe(),e=Je(),n=et(),i=it(),l=tt({strict:!1}),r=l.path??"",a=Be(r),c=a.segments.length===0,o=(w,I)=>n({to:".",search:ne=>({...ne,[w]:I||void 0})}),d=w=>o("path",w),u=(w,I)=>n({to:".",search:ne=>({...ne,preview:void 0,skill:void 0,brand:void 0,[w]:I})}),f=w=>u("preview",w),m=w=>u("skill",w),h=w=>u("brand",w),[x,v]=U.useState(null),[j,y]=U.useState(null),[k,N]=U.useState(!1),[g,C]=U.useState(""),D=U.useRef(null),[F,$]=U.useState(!1),P=U.useRef(0),z=a.readOnly?null:a.volume??"uploads",p=a.volume?a.dirPath:"",{upload:T,mkdir:E}=Fe(z??"uploads"),{remove:L}=Fe(x?.volume??"uploads");async function q(w){if(!(!z||!w||w.length===0))try{await T.mutateAsync({dir:p,files:[...w]}),W.success(w.length===1?`Uploaded ${w[0]?.name}`:`Uploaded ${w.length} files`)}catch(I){W.error(I instanceof Error?I.message:"Upload failed")}finally{D.current&&(D.current.value="")}}const R=z!==null,Q=c?"uploads":a.segments.at(-1)??"this folder";function O(w){return w.dataTransfer.types.includes("Files")}function G(w){!R||!O(w)||(w.preventDefault(),P.current+=1,$(!0))}function se(w){!R||!O(w)||w.preventDefault()}function Se(){R&&(P.current=Math.max(0,P.current-1),P.current===0&&$(!1))}function ue(w){R&&(w.preventDefault(),P.current=0,$(!1),w.dataTransfer.files.length>0&&q(w.dataTransfer.files))}async function H(){const w=g.trim();if(!(!z||!w))try{await E.mutateAsync(p?`${p}/${w}`:w),W.success(`Folder "${w}" created`),N(!1),C("")}catch(I){W.error(I instanceof Error?I.message:"Failed to create folder")}}async function $e(){if(!x)return;const w=x;try{await L.mutateAsync(w.path),W.success(`Deleted ${A(w.path)}`)}catch(I){W.error(I instanceof Error?I.message:"Delete failed")}finally{v(null)}}function V(){for(const w of bt)e.invalidateQueries({queryKey:B.orgFsVolume(s.id,w.id)});a.volume&&e.invalidateQueries({queryKey:B.orgFsVolume(s.id,a.volume)}),e.invalidateQueries({queryKey:B.orgFsRecent(s.id)}),e.invalidateQueries({queryKey:B.orgFsPublicSets(s.id)})}return t.jsxs("div",{className:"relative h-full",onDragEnter:G,onDragOver:se,onDragLeave:Se,onDrop:ue,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(xe,{size:28,className:"text-primary"}),t.jsxs("p",{className:"text-sm font-medium text-foreground",children:["Drop to upload to ",Q]})]})}),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(bn,{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(_,{variant:"ghost",size:"icon",onClick:V,"aria-label":"Refresh",children:t.jsx(Tt,{size:14})}),!c&&z&&t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>N(!0),children:[t.jsx(At,{size:14}),"New folder"]}),a.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(st,{size:12}),"Read-only"]}):t.jsxs(_,{size:"sm",disabled:T.isPending,onClick:()=>D.current?.click(),children:[t.jsx(xe,{size:14}),T.isPending?"Uploading…":"Upload file"]}),t.jsx("input",{ref:D,type:"file",multiple:!0,className:"hidden",onChange:w=>{q(w.target.files)}})]})]}),c?t.jsx(vn,{onOpenDir:d,onOpenFile:f,onShare:y,onDelete:v}):a.volume===null?t.jsx(jn,{onOpenDir:d}):t.jsx(yn,{location:a,onOpenDir:d,onOpenFile:f,onOpenSkill:m,onOpenBrand:h,onShare:y,onDelete:v},a.volume)]})}),i&&(l.preview?t.jsx(ts,{previewPath:l.preview,onClose:()=>o("preview",null)}):l.skill?t.jsx(hn,{skillPath:l.skill,onClose:()=>o("skill",null)},l.skill):l.brand?t.jsx(dn,{brandPath:l.brand,onClose:()=>o("brand",null)},l.brand):null),t.jsx(Ae,{open:k,onOpenChange:N,children:t.jsxs(Ee,{children:[t.jsxs(Ht,{children:[t.jsx(Me,{children:"New folder"}),t.jsxs(Vt,{children:["Create a folder in ",r||"the library","."]})]}),t.jsx(Ue,{autoFocus:!0,placeholder:"folder-name",value:g,onChange:w=>C(w.target.value),onKeyDown:w=>{w.key==="Enter"&&H()}}),t.jsxs(Gt,{children:[t.jsx(_,{variant:"outline",onClick:()=>N(!1),children:"Cancel"}),t.jsx(_,{disabled:!g.trim()||E.isPending,onClick:()=>{H()},children:"Create"})]})]})}),t.jsx(ss,{target:j,onOpenChange:w=>{w||y(null)}}),t.jsx(Ut,{open:x!==null,onOpenChange:w=>{w||v(null)},children:t.jsxs(Bt,{children:[t.jsxs(Lt,{children:[t.jsxs(_t,{children:["Delete ",x?A(x.path):"","?"]}),t.jsx(Rt,{children:x?.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(qt,{children:[t.jsx(It,{children:"Cancel"}),t.jsx(Kt,{onClick:()=>{$e()},children:"Delete"})]})]})})]})}function il(){const s=S.c(12),e=it(),n=et();let i;s[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},s[0]=i):i=s[0];const l=tt(i);let r;s[1]!==n?(r=d=>n({to:".",search:u=>({...u,[d]:void 0})}),s[1]=n,s[2]=r):r=s[2];const a=r;let c,o;if(s[3]!==a||s[4]!==e||s[5]!==l.brand||s[6]!==l.preview||s[7]!==l.skill){o=Symbol.for("react.early_return_sentinel");e:{const d=l.preview?{key:"preview",path:l.preview,panel:t.jsx(Xt,{previewPath:l.preview,onClose:()=>a("preview")})}:l.skill?{key:"skill",path:l.skill,panel:t.jsx(pn,{skillPath:l.skill,onClose:()=>a("skill")},l.skill)}:l.brand?{key:"brand",path:l.brand,panel:t.jsx(fn,{brandPath:l.brand,onClose:()=>a("brand")},l.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(Te,{children:t.jsx(Ze,{})})}),s[10]=f):f=s[10],o=f;break e}let u;s[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ve,{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(Te,{children:t.jsx(Ze,{})})})})}),s[11]=u):u=s[11],c=t.jsxs(Zt,{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(Qt.Tabs,{children:t.jsx(Jt,{title:A(d.path),icon:{kind:"component",Component:f=>d.key==="preview"?t.jsx(ie,{filename:A(d.path),...f}):d.key==="skill"?t.jsx(Oe,{...f}):t.jsx(pe,{...f})},active:!0,onClick:()=>a(d.key)})}),t.jsx(es,{className:"bg-sidebar"}),t.jsx(Ve,{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(Te,{children:d.panel})})})})]})]})}s[3]=a,s[4]=e,s[5]=l.brand,s[6]=l.preview,s[7]=l.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{il as default};
|
|
169
|
+
`);async function We(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function rn(s,e){const n=e?`<style>${e}</style>`:"";return s.replaceAll("{{{slides}}}",ln).replaceAll("{{title}}",nn).replace(/(src=")(\/deck-runtime\/)/g,`$1${window.location.origin}$2`).replace("</head>",`${n}</head>`)}function an(s){const e=S.c(23),{readUrl:n,title:i,tokensUrl:l}=s;let r;e[0]!==n?(r=B.fileText(n),e[0]=n,e[1]=r):r=e[1];let a;e[2]!==n?(a=()=>We(n),e[2]=n,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]!==l?(d=B.fileText(l??""),e[7]=l,e[8]=d):d=e[8];const u=!!l;let f;e[9]!==l?(f=()=>We(l??""),e[9]=l,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||l&&h.isPending){let y;return e[15]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsx("div",{className:"flex h-full w-full items-center justify-center p-6",children:t.jsx(K,{className:"aspect-[16/9] w-full max-w-3xl rounded-xl"})}),e[15]=y):y=e[15],y}if(o.isError||!o.data){let y;return e[16]===Symbol.for("react.memo_cache_sentinel")?(y=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]=y):y=e[16],y}const x=h.data??null;let v;e[17]!==x||e[18]!==o.data?(v=rn(o.data,x),e[17]=x,e[18]=o.data,e[19]=v):v=e[19];let j;return e[20]!==v||e[21]!==i?(j=t.jsx("iframe",{title:i,srcDoc:v,sandbox:"allow-scripts",className:"block h-full w-full border-0 bg-white"}),e[20]=v,e[21]=i,e[22]=j):j=e[22],j}async function Ye(s){const e=await fetch(s,{credentials:"include"});if(!e.ok)throw new Error(`fetch failed: ${e.status}`);return e.text()}function ae(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("p",{className:"text-sm font-medium text-foreground",children:n}),e[0]=n,e[1]=i):i=e[1],i}function on(s){const e=S.c(16),{family:n,tokens:i,editing:l,valueOf:r,onEdit:a}=s;let c;e[0]!==n?(c=t.jsx("span",{className:"text-xs text-muted-foreground",children:n}),e[0]=n,e[1]=c):c=e[1];let o;if(e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==l||e[8]!==a||e[9]!==r?(f=m=>{const h=r(m),x=`${m.name.replace(/^--brand-/,"")}: ${h}`;return l&&/^#/.test(h)?t.jsx("input",{type:"color","aria-label":m.name,title:x,value:js(h),onChange:v=>a(m.name,v.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]=l,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=l,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 cn(s){const e=S.c(9),{token:n,value:i}=s;if(n.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(n.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(n.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(n.kind==="type"&&/^--brand-text-/.test(n.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 l;return e[8]===Symbol.for("react.memo_cache_sentinel")?(l=t.jsx("span",{className:"size-7 shrink-0"}),e[8]=l):l=e[8],l}function ht(s){const e=S.c(17),{token:n,value:i,editing:l,onEdit:r}=s;let a;e[0]!==n||e[1]!==i?(a=t.jsx(cn,{token:n,value:i}),e[0]=n,e[1]=i,e[2]=a):a=e[2];let c;if(e[3]!==n.name){let f;e[5]===Symbol.for("react.memo_cache_sentinel")?(f=/^--brand-/,e[5]=f):f=e[5],c=n.name.replace(f,""),e[3]=n.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]!==l||e[9]!==r||e[10]!==n.name||e[11]!==i?(d=l?t.jsx(Ue,{value:i,onChange:f=>r(n.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]=l,e[9]=r,e[10]=n.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 re(s){const e=S.c(16),{label:n,tokens:i,editing:l,valueOf:r,onEdit:a}=s;if(i.length===0)return null;let c;e[0]!==n?(c=t.jsx(ae,{children:n}),e[0]=n,e[1]=c):c=e[1];let o;if(e[2]!==l||e[3]!==a||e[4]!==i||e[5]!==r){let f;e[7]!==l||e[8]!==a||e[9]!==r?(f=m=>t.jsx(ht,{token:m,value:r(m),editing:l,onEdit:a},m.name),e[7]=l,e[8]=a,e[9]=r,e[10]=f):f=e[10],o=i.map(f),e[2]=l,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 pt({brandPath:s,onClose:e,variant:n}){const{org:i}=Fe(),l=Be(s),r=l.volume??"",a=l.dirPath,c=A(a),o=l.readOnly,d=Je(),u=be(),f=Wt(r),{upload:m,remove:h}=Pe(r),x=U.useRef(null),v=Le(r,a),j=v.data??[],y=b=>j.some(M=>M.kind==="file"&&A(M.path)===b),k=y("tokens.css"),N=y("brand.md"),g=y("slides-theme.html"),C=Ns(j),D=u(r,`${a}/tokens.css`),P=u(r,`${a}/brand.md`),$=u(r,`${a}/slides-theme.html`),F=Y({queryKey:B.fileText(D),enabled:k,queryFn:()=>Ye(D),staleTime:6e4,retry:!1}),z=Y({queryKey:B.fileText(P),enabled:N,queryFn:()=>Ye(P),staleTime:6e4,retry:!1}),[p,T]=U.useState(!1),[E,L]=U.useState({}),[q,R]=U.useState(null),[Q,O]=U.useState(!1),[G,se]=U.useState(!1),[Se,ue]=U.useState("deck"),H=F.data?dt(F.data):[],$e=b=>H.find(M=>M.name===b)?.value,V=b=>E[b.name]??b.value,w=ws(H),I=H.filter(b=>b.kind==="font"),ne=H.filter(b=>b.kind==="type"),vt=H.filter(b=>b.kind==="space"),jt=H.filter(b=>b.kind==="radius"),yt=H.filter(b=>b.kind==="shadow"),wt=H.filter(b=>b.kind==="motion"),kt=H.filter(b=>b.kind==="other"),Z=(b,M)=>L(he=>({...he,[b]:M})),me=g&&Se==="deck",Ce=q??z.data??"",De=Object.entries(E).filter(([b,M])=>$e(b)!==M),Ie=q!==null&&q!==(z.data??""),Nt=De.length>0||Ie;function St(){L({}),R(null),T(!1)}async function $t(){O(!0);try{if(De.length>0){let b=F.data??"";for(const[M,he]of De)b=ks(b,M,he);await f.mutateAsync({path:`${a}/tokens.css`,body:b,contentType:"text/css; charset=utf-8"}),d.invalidateQueries({queryKey:B.fileText(D)})}Ie&&q!==null&&(await f.mutateAsync({path:`${a}/brand.md`,body:q,contentType:"text/markdown; charset=utf-8"}),d.invalidateQueries({queryKey:B.fileText(P)})),d.invalidateQueries({queryKey:B.orgFsVolume(i.id,r)}),d.invalidateQueries({queryKey:B.orgFsRecent(i.id)}),L({}),R(null),T(!1),W.success("Brand saved")}catch(b){W.error(b instanceof Error?b.message:"Failed to save brand")}finally{O(!1)}}async function Ct(b){const M=b?.[0];if(!M)return;const Ke=`logo.${(M.name.split(".").pop()??"png").toLowerCase()}`;try{await m.mutateAsync({dir:a,files:[new File([M],Ke,{type:M.type})]}),C&&A(C)!==Ke&&await h.mutateAsync(C),W.success("Logo updated")}catch(He){W.error(He instanceof Error?He.message:"Logo upload failed")}finally{x.current&&(x.current.value="")}}const Dt=!v.isPending&&!k&&!N&&!C;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(pe,{size:18})}),n==="dialog"?t.jsx(Me,{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(_,{variant:"ghost",size:"sm",onClick:St,disabled:Q,children:"Cancel"}),t.jsx(_,{size:"sm",disabled:!Nt||Q,onClick:()=>{$t()},children:Q?"Saving…":"Save"})]}):t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>T(!0),children:[t.jsx(Ot,{size:14}),"Edit"]})),n==="dialog"?t.jsx(rt,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ge,{size:16})})}):t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:e,children:t.jsx(ge,{size:16})})]}),t.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:v.isPending?t.jsxs("div",{className:"flex flex-col gap-3 p-6",children:[t.jsx(K,{className:"h-40 w-full rounded-xl"}),t.jsx(K,{className:"h-4 w-1/3"}),t.jsx(K,{className:"h-4 w-2/3"})]}):Dt?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:[(g||k)&&t.jsxs("div",{className:"shrink-0 border-b border-border",children:[t.jsxs("div",{role:"button",tabIndex:0,"aria-label":G?"Show preview":"Hide preview",onClick:()=>se(b=>!b),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),se(M=>!M))},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:b=>b.stopPropagation(),children:[g&&t.jsx("button",{type:"button",onClick:()=>{ue("deck"),se(!1)},className:ee("rounded-md px-2.5 py-1",me?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:"Deck"}),t.jsx("button",{type:"button",onClick:()=>{ue("components"),se(!1)},className:ee("rounded-md px-2.5 py-1",me?"text-muted-foreground hover:text-foreground":"bg-background text-foreground shadow-sm"),children:"Components"})]}),G?t.jsx(as,{size:16,className:"shrink-0 text-muted-foreground"}):t.jsx(os,{size:16,className:"shrink-0 text-muted-foreground"})]}),!G&&t.jsx("div",{className:"px-4 pb-4",children:t.jsx("div",{className:ee("w-full overflow-hidden rounded-xl border border-border bg-muted/30",me?"aspect-[16/9]":"h-96"),children:me?t.jsx(an,{readUrl:$,title:`${c} deck theme`,tokensUrl:D}):t.jsx(sn,{tokensUrl:D})})})]}),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(ae,{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:C?t.jsx("img",{src:u(r,C),alt:`${c} logo`,className:"max-h-full max-w-full object-contain"}):t.jsx(pe,{size:28,className:"text-muted-foreground/50"})}),p&&t.jsxs("div",{children:[t.jsxs(_,{variant:"outline",size:"sm",disabled:m.isPending,onClick:()=>x.current?.click(),children:[t.jsx(xe,{size:14}),C?"Replace logo":"Add logo"]}),t.jsx("input",{ref:x,type:"file",accept:"image/*",className:"hidden",onChange:b=>{Ct(b.target.files)}})]})]})]}),w.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ae,{children:"Colors"}),w.map(b=>t.jsx(on,{family:b.family,tokens:b.tokens,editing:p,valueOf:V,onEdit:Z},b.family))]}),(I.length>0||ne.length>0)&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ae,{children:"Typography"}),I.map(b=>t.jsxs("div",{className:"flex flex-col gap-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:b.name.replace(/^--brand-font-?/,"")||"font"}),p?t.jsx(Ue,{value:V(b),onChange:M=>Z(b.name,M.target.value),className:"h-9"}):t.jsx("span",{className:"truncate text-lg text-foreground",style:{fontFamily:V(b)},children:V(b)})]},b.name)),ne.map(b=>t.jsx(ht,{token:b,value:V(b),editing:p,onEdit:Z},b.name))]}),t.jsx(re,{label:"Spacing",tokens:vt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Radius",tokens:jt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Shadows",tokens:yt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Motion",tokens:wt,editing:p,valueOf:V,onEdit:Z}),t.jsx(re,{label:"Tokens",tokens:kt,editing:p,valueOf:V,onEdit:Z}),t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(ae,{children:"Voice & guidelines"}),p?t.jsx(rs,{value:Ce,onChange:b=>R(b.target.value),placeholder:"Describe the brand voice, tone, do's and don'ts…",className:"min-h-48 font-mono text-sm"}):z.isPending&&N?t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx(K,{className:"h-3 w-full"}),t.jsx(K,{className:"h-3 w-5/6"})]}):Ce.trim()?t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:t.jsx(ot,{id:`brand-preview-${s}`,text:Ce})}):t.jsx("p",{className:"text-sm text-muted-foreground",children:"No brand voice written yet."})]})]})]})})]})}function dn(s){const e=S.c(8),{brandPath:n,onClose:i}=s;let l;e[0]!==i?(l=c=>{c||i()},e[0]=i,e[1]=l):l=e[1];let r;e[2]!==n||e[3]!==i?(r=t.jsx(Ee,{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(pt,{brandPath:n,onClose:i,variant:"dialog"})}),e[2]=n,e[3]=i,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==r?(a=t.jsx(Ae,{open:!0,onOpenChange:l,children:r}),e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function fn(s){const e=S.c(3),{brandPath:n,onClose:i}=s;let l;return e[0]!==n||e[1]!==i?(l=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(pt,{brandPath:n,onClose:i,variant:"panel"})}),e[0]=n,e[1]=i,e[2]=l):l=e[2],l}function xt(s){const e=S.c(23),{skillPath:n,onClose:i,variant:l}=s,r=Be(n),{volume:a,dirPath:c}=r,o=be(),d=o(a??"",`${c}/SKILL.md`),u=B.fileText(d);let f;e[0]!==d?(f=async()=>{const O=await fetch(d,{credentials:"include"});if(!O.ok)throw new Error(`fetch failed: ${O.status}`);return O.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=Le(a??"",c);let v;e[5]!==c?(v=A(c),e[5]=c,e[6]=v):v=e[6];const j=v;let y;e[7]!==h.data?(y=h.data?ft(h.data):null,e[7]=h.data,e[8]=y):y=e[8];const k=y,N=mn;let g;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=(O,G)=>N(O.path)?-1:N(G.path)?1:A(O.path).localeCompare(A(G.path)),e[9]=g):g=e[9];const C=(x.data??[]).filter(un).sort(g),[D,P]=U.useState(null),$=D===null?null:C.find(O=>O.path===D)??null,F=k?.name??j;let z;e[10]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx("div",{className:"flex size-9 shrink-0 items-center justify-center rounded-full bg-primary/10 text-primary",children:t.jsx(Oe,{size:18})}),e[10]=z):z=e[10];let p;e[11]!==F||e[12]!==l?(p=l==="dialog"?t.jsx(Me,{className:"flex-1 truncate text-base font-medium text-foreground",children:F}):t.jsx("span",{className:"flex-1 truncate text-base font-medium text-foreground",children:F}),e[11]=F,e[12]=l,e[13]=p):p=e[13];let T;e[14]!==i||e[15]!==l?(T=l==="dialog"?t.jsx(rt,{asChild:!0,children:t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",children:t.jsx(ge,{size:16})})}):t.jsx(_,{variant:"ghost",size:"icon",className:"size-8 shrink-0",onClick:i,children:t.jsx(ge,{size:16})}),e[14]=i,e[15]=l,e[16]=T):T=e[16];let E;e[17]!==p||e[18]!==T?(E=t.jsxs("div",{className:"flex shrink-0 items-center gap-3 border-b border-border px-4 py-3",children:[z,p,T]}),e[17]=p,e[18]=T,e[19]=E):E=e[19];let L;e[20]===Symbol.for("react.memo_cache_sentinel")?(L=t.jsx("p",{className:"px-2 py-1.5 text-sm font-medium text-foreground",children:"Files"}),e[20]=L):L=e[20];const q="relative flex min-w-0 flex-1 flex-col overflow-y-auto",R=$?t.jsx(Yt,{file:{key:$.path,filename:A($.path),size:$.size,downloadUrl:o(a??"",$.path)}}):h.isPending?t.jsxs("div",{className:"flex flex-col gap-2 p-6",children:[t.jsx(K,{className:"h-4 w-1/3"}),t.jsx(K,{className:"h-3 w-full"}),t.jsx(K,{className:"h-3 w-5/6"}),t.jsx(K,{className:"h-3 w-2/3"})]}):h.isError||!k?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:k.description??"Claude Code skill"})]}),t.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none p-6",children:t.jsx(ot,{id:`skill-preview-${n}`,text:k.body})})]});let Q;return e[21]!==R?(Q=t.jsx("div",{className:q,children:R}),e[21]=R,e[22]=Q):Q=e[22],t.jsxs(t.Fragment,{children:[E,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:[L,x.isPending?t.jsx(K,{className:"mx-2 h-4 w-24"}):C.map(O=>{const G=N(O.path)?$===null:D===O.path;return t.jsxs("button",{type:"button",onClick:()=>P(N(O.path)?null:O.path),className:ee("flex items-center gap-2.5 rounded-lg px-2 py-1.5 text-left",G?"bg-background shadow-sm":"hover:bg-muted/60"),children:[t.jsx(ie,{filename:A(O.path),className:"h-6 w-5 shrink-0"}),t.jsx("span",{className:ee("truncate text-sm",G?"text-foreground":"text-muted-foreground"),children:A(O.path)})]},O.path)})]}),Q]})]})}function un(s){return s.kind==="file"}function mn(s){return A(s)==="SKILL.md"}function hn(s){const e=S.c(8),{skillPath:n,onClose:i}=s;let l;e[0]!==i?(l=c=>{c||i()},e[0]=i,e[1]=l):l=e[1];let r;e[2]!==i||e[3]!==n?(r=t.jsx(Ee,{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(xt,{skillPath:n,onClose:i,variant:"dialog"})}),e[2]=i,e[3]=n,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==r?(a=t.jsx(Ae,{open:!0,onOpenChange:l,children:r}),e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function pn(s){const e=S.c(3),{skillPath:n,onClose:i}=s;let l;return e[0]!==i||e[1]!==n?(l=t.jsx("div",{className:"flex h-full w-full flex-col overflow-hidden bg-background",children:t.jsx(xt,{skillPath:n,onClose:i,variant:"panel"})}),e[0]=i,e[1]=n,e[2]=l):l=e[2],l}function gt(s){return`${window.location.origin}${s}`}function oe(s){if(s.shareMode==="password")return"password";if(s.shareMode==="public"||s.readPublic)return"public";if(s.effectivePublic)return"inherited"}const bt=[{id:"home",description:"Your organization's home folder",glyph:Et},{id:"uploads",description:"Files your team uploads",glyph:xe},{id:"outputs",description:"Agent run outputs",glyph:Mt}],Xe=3;function J(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("p",{className:"text-[13px] text-foreground",children:n}),e[0]=n,e[1]=i):i=e[1],i}function X(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:n}),e[0]=n,e[1]=i):i=e[1],i}function Re(s){const e=S.c(2),{rows:n}=s,i=n===void 0?1:n;let l;return e[0]!==i?(l=t.jsx(X,{children:Array.from({length:i*3},xn)}),e[0]=i,e[1]=l):l=e[1],l}function xn(s,e){return t.jsx(K,{className:"h-16 rounded-2xl"},e)}function qe(s){const e=S.c(2),{children:n}=s;let i;return e[0]!==n?(i=t.jsx("p",{className:"text-sm text-muted-foreground",children:n}),e[0]=n,e[1]=i):i=e[1],i}function gn(s){const e=S.c(6),{volume:n,displayName:i,description:l,glyph:r,onOpen:a}=s,c=ls(n),o=i??n,d=c.data?`${c.data.files} files`:void 0;let u;return e[0]!==l||e[1]!==r||e[2]!==a||e[3]!==o||e[4]!==d?(u=t.jsx(Ne,{name:o,meta:d,subtitle:l,glyph:r,onOpen:a}),e[0]=l,e[1]=r,e[2]=a,e[3]=o,e[4]=d,e[5]=u):u=e[5],u}function bn(s){const e=S.c(8),{segments:n,onNavigate:i}=s;let l;e[0]!==i?(l=t.jsx("button",{type:"button",className:"text-muted-foreground hover:text-foreground hover:underline",onClick:()=>i(""),children:"Library"}),e[0]=i,e[1]=l):l=e[1];let r;e[2]!==i||e[3]!==n?(r=n.map((c,o)=>{const d=n.slice(0,o+1).join("/"),u=o===n.length-1;return t.jsxs("span",{className:"flex min-w-0 items-center gap-1",children:[t.jsx(zt,{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]=n,e[4]=r):r=e[4];let a;return e[5]!==l||e[6]!==r?(a=t.jsxs("div",{className:"flex min-w-0 flex-wrap items-center gap-1 text-sm",children:[l,r]}),e[5]=l,e[6]=r,e[7]=a):a=e[7],a}function vn(s){const e=S.c(23),{onOpenDir:n,onOpenFile:i,onShare:l,onDelete:r}=s,{org:a}=Fe(),c=ns(),o=ct(),d=be();let u;e[0]!==d||e[1]!==l?(u=h=>l({volume:h.volume,path:h.path,kind:"file",shareMode:h.shareMode??"private",effectivePublic:h.effectivePublic??!1,url:gt(d(h.volume,h.path))}),e[0]=d,e[1]=l,e[2]=u):u=e[2];const f=u;let m;if(e[3]!==d||e[4]!==r||e[5]!==n||e[6]!==i||e[7]!==a||e[8]!==o.data?.length||e[9]!==c.data||e[10]!==c.isPending||e[11]!==f){const h=c.data??[],x=h.slice(0,Xe),v=h.slice(Xe);let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(J,{children:"Folders"}),e[13]=j):j=e[13];let y;e[14]!==n||e[15]!==a?(y=bt.map(g=>t.jsx(gn,{volume:g.id,displayName:g.id==="home"?fs(a.slug):void 0,description:g.description,glyph:g.glyph,onOpen:()=>n(g.id)},g.id)),e[14]=n,e[15]=a,e[16]=y):y=e[16];let k;e[17]!==n||e[18]!==o.data?.length?(k=(o.data?.length??0)>0&&t.jsx(Ne,{name:"public",meta:`${o.data?.length} sets`,subtitle:"Curated skill sets — read-only",glyph:nt,readOnly:!0,onOpen:()=>n("public")}),e[17]=n,e[18]=o.data?.length,e[19]=k):k=e[19];let N;e[20]!==y||e[21]!==k?(N=t.jsxs("div",{className:"flex flex-col gap-3",children:[j,t.jsxs(X,{children:[y,k]})]}),e[20]=y,e[21]=k,e[22]=N):N=e[22],m=t.jsxs(t.Fragment,{children:[c.isPending?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Recently added"}),t.jsx(Re,{})]}):x.length>0?t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Recently added"}),t.jsx(X,{children:x.map(g=>t.jsx(Xs,{filename:A(g.path),updatedAt:g.updatedAt,size:g.size,downloadUrl:d(g.volume,g.path),publicState:oe(g),onOpen:()=>i(`${g.volume}/${g.path}`),onShare:()=>f(g),onDelete:()=>r({volume:g.volume,path:g.path,kind:"file"})},`${g.volume}/${g.path}`))})]}):t.jsx(qe,{children:"No files yet — upload one, or ask an agent to produce something."}),N,v.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"All files"}),t.jsx(X,{children:v.map(g=>t.jsx(mt,{filename:A(g.path),updatedAt:g.updatedAt,downloadUrl:d(g.volume,g.path),publicState:oe(g),onOpen:()=>i(`${g.volume}/${g.path}`),onShare:()=>f(g),onDelete:()=>r({volume:g.volume,path:g.path,kind:"file"})},`${g.volume}/${g.path}`))})]})]}),e[3]=d,e[4]=r,e[5]=n,e[6]=i,e[7]=a,e[8]=o.data?.length,e[9]=c.data,e[10]=c.isPending,e[11]=f,e[12]=m}else m=e[12];return m}function jn(s){const e=S.c(11),{onOpenDir:n}=s,i=ct();if(i.isPending){let o;return e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Re,{}),e[0]=o):o=e[0],o}let l;e[1]!==i.data?(l=i.data??[],e[1]=i.data,e[2]=l):l=e[2];const r=l;if(r.length===0){let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(qe,{children:"No public skill sets are configured."}),e[3]=o):o=e[3],o}let a;if(e[4]!==n||e[5]!==r){let o;e[7]!==n?(o=d=>t.jsx(Ne,{name:d,subtitle:"Read-only",readOnly:!0,onOpen:()=>n(`public/${d}`)},d),e[7]=n,e[8]=o):o=e[8],a=r.map(o),e[4]=n,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 yn(s){const e=S.c(34),{location:n,onOpenDir:i,onOpenFile:l,onOpenSkill:r,onOpenBrand:a,onShare:c,onDelete:o}=s,d=n.volume??"",u=Le(d,n.dirPath),f=be();if(u.isPending){let k;return e[0]===Symbol.for("react.memo_cache_sentinel")?(k=t.jsx(Re,{rows:2}),e[0]=k):k=e[0],k}if(u.isError){const k=u.error instanceof Error?u.error.message:"Failed to load";let N;return e[1]!==k?(N=t.jsx("p",{className:"text-sm text-destructive",children:k}),e[1]=k,e[2]=N):N=e[2],N}let m,h,x,v,j;if(e[3]!==f||e[4]!==u.data||e[5]!==n||e[6]!==o||e[7]!==a||e[8]!==i||e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==d){j=Symbol.for("react.early_return_sentinel");e:{const k=u.data??[],N=k.filter(Sn),g=k.filter(Nn),C=k.filter(kn),D=k.filter(wn);if(k.length===0){const p=n.readOnly?"Empty — this read-only set syncs from its GitHub source.":"Empty folder — upload a file or create a folder to get started.";let T;e[18]!==p?(T=t.jsx(qe,{children:p}),e[18]=p,e[19]=T):T=e[19],j=T;break e}let P;e[20]!==n.readOnly||e[21]!==o||e[22]!==d?(P=p=>n.readOnly?void 0:()=>o({volume:d,path:p.path,kind:p.kind}),e[20]=n.readOnly,e[21]=o,e[22]=d,e[23]=P):P=e[23];const $=P;let F;e[24]!==f||e[25]!==n.readOnly||e[26]!==c||e[27]!==d?(F=p=>n.readOnly?void 0:()=>c({volume:d,path:p.path,kind:p.kind,shareMode:p.shareMode??"private",effectivePublic:p.effectivePublic??!1,url:p.kind==="file"?gt(f(d,p.path)):void 0}),e[24]=f,e[25]=n.readOnly,e[26]=c,e[27]=d,e[28]=F):F=e[28];const z=F;m=N.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Skills"}),t.jsx(X,{children:N.map(p=>t.jsx(Us,{dirName:A(p.path),updatedAt:p.updatedAt,skillMdUrl:f(d,`${p.path}/SKILL.md`),publicState:oe(p),onOpen:()=>r(le(n,p.path)),onBrowse:()=>i(le(n,p.path)),onShare:z(p),onDelete:$(p)},p.path))})]}),h=g.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Brands"}),t.jsx(X,{children:g.map(p=>t.jsx(_s,{dirName:A(p.path),updatedAt:p.updatedAt,tokensUrl:f(d,`${p.path}/tokens.css`),onOpen:()=>a(le(n,p.path)),onBrowse:()=>i(le(n,p.path)),onDelete:$(p)},p.path))})]}),x=C.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Folders"}),t.jsx(X,{children:C.map(p=>t.jsx(Ne,{name:A(p.path),meta:ce(p.updatedAt),readOnly:n.readOnly,publicState:oe(p),onOpen:()=>i(le(n,p.path)),onShare:z(p),onDelete:$(p)},p.path))})]}),v=D.length>0&&t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx(J,{children:"Files"}),t.jsx(X,{children:D.map(p=>t.jsx(mt,{filename:A(p.path),updatedAt:p.updatedAt,downloadUrl:f(d,p.path),publicState:oe(p),onOpen:()=>l(le(n,p.path)),onShare:z(p),onDelete:$(p)},p.path))})]})}e[3]=f,e[4]=u.data,e[5]=n,e[6]=o,e[7]=a,e[8]=i,e[9]=l,e[10]=r,e[11]=c,e[12]=d,e[13]=m,e[14]=h,e[15]=x,e[16]=v,e[17]=j}else m=e[13],h=e[14],x=e[15],v=e[16],j=e[17];if(j!==Symbol.for("react.early_return_sentinel"))return j;let y;return e[29]!==m||e[30]!==h||e[31]!==x||e[32]!==v?(y=t.jsxs(t.Fragment,{children:[m,h,x,v]}),e[29]=m,e[30]=h,e[31]=x,e[32]=v,e[33]=y):y=e[33],y}function wn(s){return s.kind==="file"}function kn(s){return s.kind==="dir"&&!s.hasSkill&&!s.hasBrand}function Nn(s){return s.kind==="dir"&&s.hasBrand&&!s.hasSkill}function Sn(s){return s.kind==="dir"&&s.hasSkill}function Ze(){const{org:s}=Fe(),e=Je(),n=et(),i=it(),l=tt({strict:!1}),r=l.path??"",a=Be(r),c=a.segments.length===0,o=(w,I)=>n({to:".",search:ne=>({...ne,[w]:I||void 0})}),d=w=>o("path",w),u=(w,I)=>n({to:".",search:ne=>({...ne,preview:void 0,skill:void 0,brand:void 0,[w]:I})}),f=w=>u("preview",w),m=w=>u("skill",w),h=w=>u("brand",w),[x,v]=U.useState(null),[j,y]=U.useState(null),[k,N]=U.useState(!1),[g,C]=U.useState(""),D=U.useRef(null),[P,$]=U.useState(!1),F=U.useRef(0),z=a.readOnly?null:a.volume??"uploads",p=a.volume?a.dirPath:"",{upload:T,mkdir:E}=Pe(z??"uploads"),{remove:L}=Pe(x?.volume??"uploads");async function q(w){if(!(!z||!w||w.length===0))try{await T.mutateAsync({dir:p,files:[...w]}),W.success(w.length===1?`Uploaded ${w[0]?.name}`:`Uploaded ${w.length} files`)}catch(I){W.error(I instanceof Error?I.message:"Upload failed")}finally{D.current&&(D.current.value="")}}const R=z!==null,Q=c?"uploads":a.segments.at(-1)??"this folder";function O(w){return w.dataTransfer.types.includes("Files")}function G(w){!R||!O(w)||(w.preventDefault(),F.current+=1,$(!0))}function se(w){!R||!O(w)||w.preventDefault()}function Se(){R&&(F.current=Math.max(0,F.current-1),F.current===0&&$(!1))}function ue(w){R&&(w.preventDefault(),F.current=0,$(!1),w.dataTransfer.files.length>0&&q(w.dataTransfer.files))}async function H(){const w=g.trim();if(!(!z||!w))try{await E.mutateAsync(p?`${p}/${w}`:w),W.success(`Folder "${w}" created`),N(!1),C("")}catch(I){W.error(I instanceof Error?I.message:"Failed to create folder")}}async function $e(){if(!x)return;const w=x;try{await L.mutateAsync(w.path),W.success(`Deleted ${A(w.path)}`)}catch(I){W.error(I instanceof Error?I.message:"Delete failed")}finally{v(null)}}function V(){for(const w of bt)e.invalidateQueries({queryKey:B.orgFsVolume(s.id,w.id)});a.volume&&e.invalidateQueries({queryKey:B.orgFsVolume(s.id,a.volume)}),e.invalidateQueries({queryKey:B.orgFsRecent(s.id)}),e.invalidateQueries({queryKey:B.orgFsPublicSets(s.id)})}return t.jsxs("div",{className:"relative h-full",onDragEnter:G,onDragOver:se,onDragLeave:Se,onDrop:ue,children:[P&&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(xe,{size:28,className:"text-primary"}),t.jsxs("p",{className:"text-sm font-medium text-foreground",children:["Drop to upload to ",Q]})]})}),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(bn,{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(_,{variant:"ghost",size:"icon",onClick:V,"aria-label":"Refresh",children:t.jsx(Tt,{size:14})}),!c&&z&&t.jsxs(_,{variant:"outline",size:"sm",onClick:()=>N(!0),children:[t.jsx(At,{size:14}),"New folder"]}),a.readOnly?t.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[t.jsx(st,{size:12}),"Read-only"]}):t.jsxs(_,{size:"sm",disabled:T.isPending,onClick:()=>D.current?.click(),children:[t.jsx(xe,{size:14}),T.isPending?"Uploading…":"Upload file"]}),t.jsx("input",{ref:D,type:"file",multiple:!0,className:"hidden",onChange:w=>{q(w.target.files)}})]})]}),c?t.jsx(vn,{onOpenDir:d,onOpenFile:f,onShare:y,onDelete:v}):a.volume===null?t.jsx(jn,{onOpenDir:d}):t.jsx(yn,{location:a,onOpenDir:d,onOpenFile:f,onOpenSkill:m,onOpenBrand:h,onShare:y,onDelete:v},a.volume)]})}),i&&(l.preview?t.jsx(ts,{previewPath:l.preview,onClose:()=>o("preview",null)}):l.skill?t.jsx(hn,{skillPath:l.skill,onClose:()=>o("skill",null)},l.skill):l.brand?t.jsx(dn,{brandPath:l.brand,onClose:()=>o("brand",null)},l.brand):null),t.jsx(Ae,{open:k,onOpenChange:N,children:t.jsxs(Ee,{children:[t.jsxs(Ht,{children:[t.jsx(Me,{children:"New folder"}),t.jsxs(Vt,{children:["Create a folder in ",r||"the library","."]})]}),t.jsx(Ue,{autoFocus:!0,placeholder:"folder-name",value:g,onChange:w=>C(w.target.value),onKeyDown:w=>{w.key==="Enter"&&H()}}),t.jsxs(Gt,{children:[t.jsx(_,{variant:"outline",onClick:()=>N(!1),children:"Cancel"}),t.jsx(_,{disabled:!g.trim()||E.isPending,onClick:()=>{H()},children:"Create"})]})]})}),t.jsx(ss,{target:j,onOpenChange:w=>{w||y(null)}}),t.jsx(Ut,{open:x!==null,onOpenChange:w=>{w||v(null)},children:t.jsxs(Bt,{children:[t.jsxs(Lt,{children:[t.jsxs(_t,{children:["Delete ",x?A(x.path):"","?"]}),t.jsx(Rt,{children:x?.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(qt,{children:[t.jsx(It,{children:"Cancel"}),t.jsx(Kt,{onClick:()=>{$e()},children:"Delete"})]})]})})]})}function rl(){const s=S.c(12),e=it(),n=et();let i;s[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},s[0]=i):i=s[0];const l=tt(i);let r;s[1]!==n?(r=d=>n({to:".",search:u=>({...u,[d]:void 0})}),s[1]=n,s[2]=r):r=s[2];const a=r;let c,o;if(s[3]!==a||s[4]!==e||s[5]!==l.brand||s[6]!==l.preview||s[7]!==l.skill){o=Symbol.for("react.early_return_sentinel");e:{const d=l.preview?{key:"preview",path:l.preview,panel:t.jsx(Xt,{previewPath:l.preview,onClose:()=>a("preview")})}:l.skill?{key:"skill",path:l.skill,panel:t.jsx(pn,{skillPath:l.skill,onClose:()=>a("skill")},l.skill)}:l.brand?{key:"brand",path:l.brand,panel:t.jsx(fn,{brandPath:l.brand,onClose:()=>a("brand")},l.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(Te,{children:t.jsx(Ze,{})})}),s[10]=f):f=s[10],o=f;break e}let u;s[11]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(Ve,{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(Te,{children:t.jsx(Ze,{})})})})}),s[11]=u):u=s[11],c=t.jsxs(Zt,{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(Qt.Tabs,{children:t.jsx(Jt,{title:A(d.path),icon:{kind:"component",Component:f=>d.key==="preview"?t.jsx(ie,{filename:A(d.path),...f}):d.key==="skill"?t.jsx(Oe,{...f}):t.jsx(pe,{...f})},active:!0,onClick:()=>a(d.key)})}),t.jsx(es,{className:"bg-sidebar"}),t.jsx(Ve,{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(Te,{children:d.panel})})})})]})]})}s[3]=a,s[4]=e,s[5]=l.brand,s[6]=l.preview,s[7]=l.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{rl as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{by as _}from"./index-D0U_smqt.js";var S={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===b||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,S.exports=I()),S.exports}var g=C();const h=_(g);export{h as R,g as r};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,ai as P,cz as R,cA as Ee,cB as ke,cC as Se,bP as xe,cD as j}from"./index-C3Ab2DJ2.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',Pe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",qe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:U=!1,vimBindings:A=!0,...B}=t,H=P(),ne=P(),N=P(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:qe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;q().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),O=m.getAttribute("id");return((g=e.get(O))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=q().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],O=le(S,y);r.current.filtered.items.set(g,O),O>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(Pe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function q(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=q()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=q(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(q().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:e=>{var o;(o=B.onKeyDown)==null||o.call(B,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=P(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;U(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function U(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:B,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:U,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=P(),v=n.useRef(null),b=n.useRef(null),i=P(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Be=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Oe=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ue=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Oe,Item:Ve,Input:Be,Group:je,Separator:Le,Dialog:ze,Empty:Ue,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
|
|
1
|
+
import{r as n,ai as q,cz as R,cA as Ee,cB as ke,cC as Se,bR as xe,cD as j}from"./index-D0U_smqt.js";var de=1,Ie=.9,Ce=.8,Re=.17,Q=.1,Z=.999,Ae=.9999,Me=.99,$e=/[\\\/_+.#"@\[\(\{&]/,De=/[\\\/_+.#"@\[\(\{&]/g,Fe=/[\s-]/,ve=/[\s-]/g;function ee(t,l,r,f,u,c,d){if(c===l.length)return u===t.length?de:Me;var v=`${u},${c}`;if(d[v]!==void 0)return d[v];for(var b=f.charAt(c),i=r.indexOf(b,u),p=0,h,x,E,I;i>=0;)h=ee(t,l,r,f,i+1,c+1,d),h>p&&(i===u?h*=de:$e.test(t.charAt(i-1))?(h*=Ce,E=t.slice(u,i-1).match(De),E&&u>0&&(h*=Math.pow(Z,E.length))):Fe.test(t.charAt(i-1))?(h*=Ie,I=t.slice(u,i-1).match(ve),I&&u>0&&(h*=Math.pow(Z,I.length))):(h*=Re,u>0&&(h*=Math.pow(Z,i-u))),t.charAt(i)!==l.charAt(c)&&(h*=Ae)),(h<Q&&r.charAt(i-1)===f.charAt(c+1)||f.charAt(c+1)===f.charAt(c)&&r.charAt(i-1)!==f.charAt(c))&&(x=ee(t,l,r,f,i+1,c+2,d),x*Q>h&&(h=x*Q)),h>p&&(p=h),i=r.indexOf(b,i+1);return d[v]=p,p}function se(t){return t.toLowerCase().replace(ve," ")}function Ke(t,l,r){return t=r&&r.length>0?`${t+" "+r.join(" ")}`:t,ee(t,l,se(t),se(l),0,0,{})}var V='[cmdk-group=""]',_='[cmdk-group-items=""]',qe='[cmdk-group-heading=""]',me='[cmdk-item=""]',fe=`${me}:not([aria-disabled="true"])`,te="cmdk-item-select",F="data-value",Pe=(t,l,r)=>Ke(t,l,r),pe=n.createContext(void 0),L=()=>n.useContext(pe),he=n.createContext(void 0),re=()=>n.useContext(he),ge=n.createContext(void 0),be=n.forwardRef((t,l)=>{let r=K(()=>{var e,o;return{search:"",value:(o=(e=t.value)!=null?e:t.defaultValue)!=null?o:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),f=K(()=>new Set),u=K(()=>new Map),c=K(()=>new Map),d=K(()=>new Set),v=we(t),{label:b,children:i,value:p,onValueChange:h,filter:x,shouldFilter:E,loop:I,disablePointerSelection:U=!1,vimBindings:A=!0,...B}=t,H=q(),ne=q(),N=q(),M=n.useRef(null),w=We();$(()=>{if(p!==void 0){let e=p.trim();r.current.value=e,k.emit()}},[p]),$(()=>{w(6,ae)},[]);let k=n.useMemo(()=>({subscribe:e=>(d.current.add(e),()=>d.current.delete(e)),snapshot:()=>r.current,setState:(e,o,s)=>{var a,m,g,S;if(!Object.is(r.current[e],o)){if(r.current[e]=o,e==="search")J(),W(),w(1,G);else if(e==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let y=document.getElementById(N);y?y.focus():(a=document.getElementById(H))==null||a.focus()}if(w(7,()=>{var y;r.current.selectedItemId=(y=D())==null?void 0:y.id,k.emit()}),s||w(5,ae),((m=v.current)==null?void 0:m.value)!==void 0){let y=o??"";(S=(g=v.current).onValueChange)==null||S.call(g,y);return}}k.emit()}},emit:()=>{d.current.forEach(e=>e())}}),[]),T=n.useMemo(()=>({value:(e,o,s)=>{var a;o!==((a=c.current.get(e))==null?void 0:a.value)&&(c.current.set(e,{value:o,keywords:s}),r.current.filtered.items.set(e,le(o,s)),w(2,()=>{W(),k.emit()}))},item:(e,o)=>(f.current.add(e),o&&(u.current.has(o)?u.current.get(o).add(e):u.current.set(o,new Set([e]))),w(3,()=>{J(),W(),r.current.value||G(),k.emit()}),()=>{c.current.delete(e),f.current.delete(e),r.current.filtered.items.delete(e);let s=D();w(4,()=>{J(),s?.getAttribute("id")===e&&G(),k.emit()})}),group:e=>(u.current.has(e)||u.current.set(e,new Set),()=>{c.current.delete(e),u.current.delete(e)}),filter:()=>v.current.shouldFilter,label:b||t["aria-label"],getDisablePointerSelection:()=>v.current.disablePointerSelection,listId:H,inputId:N,labelId:ne,listInnerRef:M}),[]);function le(e,o){var s,a;let m=(a=(s=v.current)==null?void 0:s.filter)!=null?a:Pe;return e?m(e,r.current.search,o):0}function W(){if(!r.current.search||v.current.shouldFilter===!1)return;let e=r.current.filtered.items,o=[];r.current.filtered.groups.forEach(a=>{let m=u.current.get(a),g=0;m.forEach(S=>{let y=e.get(S);g=Math.max(y,g)}),o.push([a,g])});let s=M.current;P().sort((a,m)=>{var g,S;let y=a.getAttribute("id"),O=m.getAttribute("id");return((g=e.get(O))!=null?g:0)-((S=e.get(y))!=null?S:0)}).forEach(a=>{let m=a.closest(_);m?m.appendChild(a.parentElement===m?a:a.closest(`${_} > *`)):s.appendChild(a.parentElement===s?a:a.closest(`${_} > *`))}),o.sort((a,m)=>m[1]-a[1]).forEach(a=>{var m;let g=(m=M.current)==null?void 0:m.querySelector(`${V}[${F}="${encodeURIComponent(a[0])}"]`);g?.parentElement.appendChild(g)})}function G(){let e=P().find(s=>s.getAttribute("aria-disabled")!=="true"),o=e?.getAttribute(F);k.setState("value",o||void 0)}function J(){var e,o,s,a;if(!r.current.search||v.current.shouldFilter===!1){r.current.filtered.count=f.current.size;return}r.current.filtered.groups=new Set;let m=0;for(let g of f.current){let S=(o=(e=c.current.get(g))==null?void 0:e.value)!=null?o:"",y=(a=(s=c.current.get(g))==null?void 0:s.keywords)!=null?a:[],O=le(S,y);r.current.filtered.items.set(g,O),O>0&&m++}for(let[g,S]of u.current)for(let y of S)if(r.current.filtered.items.get(y)>0){r.current.filtered.groups.add(g);break}r.current.filtered.count=m}function ae(){var e,o,s;let a=D();a&&(((e=a.parentElement)==null?void 0:e.firstChild)===a&&((s=(o=a.closest(V))==null?void 0:o.querySelector(qe))==null||s.scrollIntoView({block:"nearest"})),a.scrollIntoView({block:"nearest"}))}function D(){var e;return(e=M.current)==null?void 0:e.querySelector(`${me}[aria-selected="true"]`)}function P(){var e;return Array.from(((e=M.current)==null?void 0:e.querySelectorAll(fe))||[])}function X(e){let o=P()[e];o&&k.setState("value",o.getAttribute(F))}function Y(e){var o;let s=D(),a=P(),m=a.findIndex(S=>S===s),g=a[m+e];(o=v.current)!=null&&o.loop&&(g=m+e<0?a[a.length-1]:m+e===a.length?a[0]:a[m+e]),g&&k.setState("value",g.getAttribute(F))}function ue(e){let o=D(),s=o?.closest(V),a;for(;s&&!a;)s=e>0?Ne(s,V):Te(s,V),a=s?.querySelector(fe);a?k.setState("value",a.getAttribute(F)):Y(e)}let ie=()=>X(P().length-1),oe=e=>{e.preventDefault(),e.metaKey?ie():e.altKey?ue(1):Y(1)},ce=e=>{e.preventDefault(),e.metaKey?X(0):e.altKey?ue(-1):Y(-1)};return n.createElement(R.div,{ref:l,tabIndex:-1,...B,"cmdk-root":"",onKeyDown:e=>{var o;(o=B.onKeyDown)==null||o.call(B,e);let s=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||s))switch(e.key){case"n":case"j":{A&&e.ctrlKey&&oe(e);break}case"ArrowDown":{oe(e);break}case"p":case"k":{A&&e.ctrlKey&&ce(e);break}case"ArrowUp":{ce(e);break}case"Home":{e.preventDefault(),X(0);break}case"End":{e.preventDefault(),ie();break}case"Enter":{e.preventDefault();let a=D();if(a){let m=new Event(te);a.dispatchEvent(m)}}}}},n.createElement("label",{"cmdk-label":"",htmlFor:T.inputId,id:T.labelId,style:Je},b),z(t,e=>n.createElement(he.Provider,{value:k},n.createElement(pe.Provider,{value:T},e))))}),Ve=n.forwardRef((t,l)=>{var r,f;let u=q(),c=n.useRef(null),d=n.useContext(ge),v=L(),b=we(t),i=(f=(r=b.current)==null?void 0:r.forceMount)!=null?f:d?.forceMount;$(()=>{if(!i)return v.item(u,d?.id)},[i]);let p=ye(u,c,[t.value,t.children,c],t.keywords),h=re(),x=C(w=>w.value&&w.value===p.current),E=C(w=>i||v.filter()===!1?!0:w.search?w.filtered.items.get(u)>0:!0);n.useEffect(()=>{let w=c.current;if(!(!w||t.disabled))return w.addEventListener(te,I),()=>w.removeEventListener(te,I)},[E,t.onSelect,t.disabled]);function I(){var w,k;U(),(k=(w=b.current).onSelect)==null||k.call(w,p.current)}function U(){h.setState("value",p.current,!0)}if(!E)return null;let{disabled:A,value:B,onSelect:H,forceMount:ne,keywords:N,...M}=t;return n.createElement(R.div,{ref:j(c,l),...M,id:u,"cmdk-item":"",role:"option","aria-disabled":!!A,"aria-selected":!!x,"data-disabled":!!A,"data-selected":!!x,onPointerMove:A||v.getDisablePointerSelection()?void 0:U,onClick:A?void 0:I},t.children)}),je=n.forwardRef((t,l)=>{let{heading:r,children:f,forceMount:u,...c}=t,d=q(),v=n.useRef(null),b=n.useRef(null),i=q(),p=L(),h=C(E=>u||p.filter()===!1?!0:E.search?E.filtered.groups.has(d):!0);$(()=>p.group(d),[]),ye(d,v,[t.value,t.heading,b]);let x=n.useMemo(()=>({id:d,forceMount:u}),[u]);return n.createElement(R.div,{ref:j(v,l),...c,"cmdk-group":"",role:"presentation",hidden:h?void 0:!0},r&&n.createElement("div",{ref:b,"cmdk-group-heading":"","aria-hidden":!0,id:i},r),z(t,E=>n.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?i:void 0},n.createElement(ge.Provider,{value:x},E))))}),Le=n.forwardRef((t,l)=>{let{alwaysRender:r,...f}=t,u=n.useRef(null),c=C(d=>!d.search);return!r&&!c?null:n.createElement(R.div,{ref:j(u,l),...f,"cmdk-separator":"",role:"separator"})}),Be=n.forwardRef((t,l)=>{let{onValueChange:r,...f}=t,u=t.value!=null,c=re(),d=C(i=>i.search),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{t.value!=null&&c.setState("search",t.value)},[t.value]),n.createElement(R.input,{ref:l,...f,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":b.listId,"aria-labelledby":b.labelId,"aria-activedescendant":v,id:b.inputId,type:"text",value:u?t.value:d,onChange:i=>{u||c.setState("search",i.target.value),r?.(i.target.value)}})}),Oe=n.forwardRef((t,l)=>{let{children:r,label:f="Suggestions",...u}=t,c=n.useRef(null),d=n.useRef(null),v=C(i=>i.selectedItemId),b=L();return n.useEffect(()=>{if(d.current&&c.current){let i=d.current,p=c.current,h,x=new ResizeObserver(()=>{h=requestAnimationFrame(()=>{let E=i.offsetHeight;p.style.setProperty("--cmdk-list-height",E.toFixed(1)+"px")})});return x.observe(i),()=>{cancelAnimationFrame(h),x.unobserve(i)}}},[]),n.createElement(R.div,{ref:j(c,l),...u,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":v,"aria-label":f,id:b.listId},z(t,i=>n.createElement("div",{ref:j(d,b.listInnerRef),"cmdk-list-sizer":""},i)))}),ze=n.forwardRef((t,l)=>{let{open:r,onOpenChange:f,overlayClassName:u,contentClassName:c,container:d,...v}=t;return n.createElement(Ee,{open:r,onOpenChange:f},n.createElement(ke,{container:d},n.createElement(Se,{"cmdk-overlay":"",className:u}),n.createElement(xe,{"aria-label":t.label,"cmdk-dialog":"",className:c},n.createElement(be,{ref:l,...v}))))}),Ue=n.forwardRef((t,l)=>C(r=>r.filtered.count===0)?n.createElement(R.div,{ref:l,...t,"cmdk-empty":"",role:"presentation"}):null),He=n.forwardRef((t,l)=>{let{progress:r,children:f,label:u="Loading...",...c}=t;return n.createElement(R.div,{ref:l,...c,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":u},z(t,d=>n.createElement("div",{"aria-hidden":!0},d)))}),Ye=Object.assign(be,{List:Oe,Item:Ve,Input:Be,Group:je,Separator:Le,Dialog:ze,Empty:Ue,Loading:He});function Ne(t,l){let r=t.nextElementSibling;for(;r;){if(r.matches(l))return r;r=r.nextElementSibling}}function Te(t,l){let r=t.previousElementSibling;for(;r;){if(r.matches(l))return r;r=r.previousElementSibling}}function we(t){let l=n.useRef(t);return $(()=>{l.current=t}),l}var $=typeof window>"u"?n.useEffect:n.useLayoutEffect;function K(t){let l=n.useRef();return l.current===void 0&&(l.current=t()),l}function C(t){let l=re(),r=()=>t(l.snapshot());return n.useSyncExternalStore(l.subscribe,r,r)}function ye(t,l,r,f=[]){let u=n.useRef(),c=L();return $(()=>{var d;let v=(()=>{var i;for(let p of r){if(typeof p=="string")return p.trim();if(typeof p=="object"&&"current"in p)return p.current?(i=p.current.textContent)==null?void 0:i.trim():u.current}})(),b=f.map(i=>i.trim());c.value(t,v,b),(d=l.current)==null||d.setAttribute(F,v),u.current=v}),u}var We=()=>{let[t,l]=n.useState(),r=K(()=>new Map);return $(()=>{r.current.forEach(f=>f()),r.current=new Map},[t]),(f,u)=>{r.current.set(f,u),l({})}};function Ge(t){let l=t.type;return typeof l=="function"?l(t.props):"render"in l?l.render(t.props):t}function z({asChild:t,children:l},r){return t&&n.isValidElement(l)?n.cloneElement(Ge(l),{ref:l.ref},r(l.props.children)):r(l)}var Je={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};export{Ye as _};
|