@vellumai/web 0.11.2-dev.202608051734.355dff7 → 0.11.2-dev.202608051933.deffc0f
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AnimatePresence-DWbwz63e.js → AnimatePresence-DYJ0_Bk3.js} +1 -1
- package/dist/assets/{BundleConfirmPage-DYLY3nDm.js → BundleConfirmPage-V0d2zlXh.js} +1 -1
- package/dist/assets/{about-page-hRb6IdZ6.js → about-page-o0ZAOc3y.js} +1 -1
- package/dist/assets/access-C6QblWKw.js +1 -0
- package/dist/assets/account-page-By0i89qq.js +1 -0
- package/dist/assets/{acp-run-actions-BjsVHIf8.js → acp-run-actions-CyNeqOUd.js} +1 -1
- package/dist/assets/{acp-run-detail-panel-CD4lYudn.js → acp-run-detail-panel-D5ORadRs.js} +1 -1
- package/dist/assets/{acp-run-store-ZJ3pQsPd.js → acp-run-store-f3ZZ5vfh.js} +1 -1
- package/dist/assets/{activity-steps-panel-DZiWfoRC.js → activity-steps-panel-Chsx-fKi.js} +1 -1
- package/dist/assets/{add-credential-modal-G4RqUBYE.js → add-credential-modal-DCKFcBNK.js} +1 -1
- package/dist/assets/{add-credits-modal-DHWpxP-h.js → add-credits-modal-DJ9cd50F.js} +1 -1
- package/dist/assets/ai-page-BR76Z8wh.js +1 -0
- package/dist/assets/{animate-CIunG13_.js → animate-BbrG8x9N.js} +1 -1
- package/dist/assets/{animated-avatar-CkKsoJMb.js → animated-avatar-DGpGKFC7.js} +1 -1
- package/dist/assets/{api-D4Wq3tEJ.js → api-B02rrru9.js} +1 -1
- package/dist/assets/{api-key-screen-Dk_Erqj0.js → api-key-screen-BD9bEMKw.js} +1 -1
- package/dist/assets/{app-card-D_b7ajlP.js → app-card-62yIjexu.js} +1 -1
- package/dist/assets/{assistant-feature-flag-store-Bpiyb3UO.js → assistant-feature-flag-store-QGyc5F15.js} +1 -1
- package/dist/assets/{assistant-status-panel-DOlaZNjY.js → assistant-status-panel-7jk9yz-d.js} +1 -1
- package/dist/assets/auth-store-DQBqJ9Zf.js +2 -0
- package/dist/assets/{avatar-random-CAM6TfyJ.js → avatar-random-Cqr15AaZ.js} +1 -1
- package/dist/assets/{avatar-renderer-BnZamcjg.js → avatar-renderer-gGO0o7tZ.js} +1 -1
- package/dist/assets/{background-task-actions-Dqussw7U.js → background-task-actions-CEod2hv4.js} +1 -1
- package/dist/assets/{background-task-detail-panel-DhKq02MR.js → background-task-detail-panel-DxuIKotW.js} +1 -1
- package/dist/assets/{background-task-store-CrpkniEd.js → background-task-store-DBkMeElr.js} +1 -1
- package/dist/assets/{billing-page-CbkWoSp3.js → billing-page-esFxG7ch.js} +3 -3
- package/dist/assets/{bookmarks-page-CeEjDpy_.js → bookmarks-page-DIYhiWMy.js} +1 -1
- package/dist/assets/browser-DpbIFTGf.js +2 -0
- package/dist/assets/{build-state-GJ6TT3dL.js → build-state-RmkzjNSl.js} +1 -1
- package/dist/assets/{channels-page-route-p1mQhgYB.js → channels-page-route-U4_5sRxV.js} +1 -1
- package/dist/assets/{chat-avatar-sQ6tX-4v.js → chat-avatar-DJKAfDJW.js} +1 -1
- package/dist/assets/{chat-markdown-message-VgOMwk_z.js → chat-markdown-message-B36GrH1l.js} +1 -1
- package/dist/assets/checkout-continuation-BO0Ny9h3.js +1 -0
- package/dist/assets/checkout-page-CiDWTxWV.js +1 -0
- package/dist/assets/{client-feature-flag-store-DcNe2lt_.js → client-feature-flag-store-DujD6DL8.js} +1 -1
- package/dist/assets/{client-perf-C-MJwJKu.js → client-perf-CQuu6r5h.js} +1 -1
- package/dist/assets/{command-palette-DiL9Fymo.js → command-palette-DflsVP7s.js} +1 -1
- package/dist/assets/{command-palette-window-page-DIBHrw7U.js → command-palette-window-page-BEBH_7GI.js} +1 -1
- package/dist/assets/{community-page-TXu2RMFs.js → community-page-DOPJGC9b.js} +1 -1
- package/dist/assets/{composer-settings-D_Ypd9n6.js → composer-settings-DMFWvZRm.js} +1 -1
- package/dist/assets/{connect-page-BOwqoXDH.js → connect-page-D8l1oHxd.js} +1 -1
- package/dist/assets/{consent-controls-_cOoTVc3.js → consent-controls-DvwbwUOq.js} +1 -1
- package/dist/assets/consent-eo_quPak.js +1 -0
- package/dist/assets/{contacts-gateway-EHsHomBl.js → contacts-gateway-Dml5USpK.js} +1 -1
- package/dist/assets/{contacts-page-route-CuaE_MD2.js → contacts-page-route-DR3e4M5g.js} +1 -1
- package/dist/assets/conversation-cache-DWJJt1dq.js +1 -0
- package/dist/assets/conversation-list-fetchers-CVn_WHcU.js +1 -0
- package/dist/assets/{conversation-navigation-CxUK4Fhh.js → conversation-navigation-DnxNTtTG.js} +1 -1
- package/dist/assets/conversation-queries-Bf5aB-kP.js +1 -0
- package/dist/assets/{credentials-page-ClXliep6.js → credentials-page-Mf-beCDU.js} +1 -1
- package/dist/assets/{csv-preview-D5EScRyC.js → csv-preview-Cb3O6FJ3.js} +1 -1
- package/dist/assets/{debug-page-DdKMk_VT.js → debug-page-kCuKgzKW.js} +1 -1
- package/dist/assets/{deploy-dialogs-Sz7_4XGL.js → deploy-dialogs-CdgMLVKR.js} +1 -1
- package/dist/assets/{deploy-store-DfhOfBLF.js → deploy-store-DOEwnSYF.js} +1 -1
- package/dist/assets/{developer-page-DebBhzLg.js → developer-page-tGacR_j2.js} +1 -1
- package/dist/assets/{diagnostics-B8CfVwTx.js → diagnostics-zbC2olIU.js} +1 -1
- package/dist/assets/{doctor-handoff-store-DiF_qO2F.js → doctor-handoff-store-938U_PWE.js} +1 -1
- package/dist/assets/{document-viewer-container-Cez0vbTM.js → document-viewer-container-B3H5r6Vx.js} +2 -2
- package/dist/assets/{document-viewer-page-BtKjhRR1.js → document-viewer-page-BuqA-5AL.js} +1 -1
- package/dist/assets/effective-timezone-C6X5Vt_s.js +1 -0
- package/dist/assets/{emails-page-pbiiAg7j.js → emails-page-BvpdSrVe.js} +1 -1
- package/dist/assets/{feature-flag-catalog-DLSx2qti.js → feature-flag-catalog-Cigl5R2_.js} +1 -1
- package/dist/assets/{file-editor-DE-Dw4iG.js → file-editor-DsgRiCQJ.js} +1 -1
- package/dist/assets/first-run-scope-BQ2FTcs1.js +1 -0
- package/dist/assets/{funnel-events-Xu4h-ISW.js → funnel-events-Cqx7t1f1.js} +1 -1
- package/dist/assets/{general-page-BIC9lrJt.js → general-page-aweJSuPL.js} +1 -1
- package/dist/assets/{get-memory-stats-DEXAf_xr.js → get-memory-stats-u6Hkt6fb.js} +1 -1
- package/dist/assets/haptics-UlcaJKo6.js +2 -0
- package/dist/assets/{hatching-screen-NSDcJdso.js → hatching-screen-snGzVqU6.js} +1 -1
- package/dist/assets/home-page-route-CLmXyyQJ.js +1 -0
- package/dist/assets/{hosting-screen-DEvExAiv.js → hosting-screen-Byp-xUVG.js} +1 -1
- package/dist/assets/identity-BBf0d0zw.js +1 -0
- package/dist/assets/{identity-page-route-DXjKIUCT.js → identity-page-route-BPKi5m8E.js} +2 -2
- package/dist/assets/{index-C4yZJVsJ.js → index-DUBUiRly.js} +3 -3
- package/dist/assets/{ingest-DaEam2-h.js → ingest-CMGYRNYA.js} +1 -1
- package/dist/assets/{inspect-page-Dd9vRZFU.js → inspect-page-BEgoFImS.js} +4 -4
- package/dist/assets/{installed-plugins-query-DqNOfIzB.js → installed-plugins-query-BKLXToLk.js} +1 -1
- package/dist/assets/{integration-icon-CEj6of8V.js → integration-icon-B2RF_VOY.js} +1 -1
- package/dist/assets/integrations-page-BA2GnVoX.js +1 -0
- package/dist/assets/{intelligence-layout-CYOs9g5z.js → intelligence-layout-DqPt0nQG.js} +1 -1
- package/dist/assets/{invalidate-memory-queries-CmAE1n6k.js → invalidate-memory-queries-m_zGW-Q9.js} +1 -1
- package/dist/assets/{invalidate-plugin-queries-8-nVuyT-.js → invalidate-plugin-queries-DAB1Z6NN.js} +1 -1
- package/dist/assets/{latest-assistant-text-CAl0YM3t.js → latest-assistant-text-BrEYsqsD.js} +2 -2
- package/dist/assets/{library-detail-page-ZAksMCi8.js → library-detail-page-BcyLIWfW.js} +1 -1
- package/dist/assets/{library-page-C_bHG29P.js → library-page-CCO-P9Mf.js} +1 -1
- package/dist/assets/{local-runtime-upgrade-BtnfGFvX.js → local-runtime-upgrade-COfY4aeu.js} +1 -1
- package/dist/assets/{login-flow-BNaCTXwB.js → login-flow-C4Q6PuZ8.js} +1 -1
- package/dist/assets/login-page-DlRIP8KI.js +1 -0
- package/dist/assets/logout-page-D3L-Upv3.js +1 -0
- package/dist/assets/{logs-layout-CPq-uymB.js → logs-layout-B9bGBYsj.js} +1 -1
- package/dist/assets/{media-preview-DA0rS8cw.js → media-preview-BpeDmKF8.js} +1 -1
- package/dist/assets/{memory-page-route-B5B2Dxeb.js → memory-page-route-2MWgT0ZS.js} +2 -2
- package/dist/assets/{memory-router-playground-page-CJT6dCJJ.js → memory-router-playground-page-_xIMvJ1T.js} +1 -1
- package/dist/assets/{message-files-panel-C7fZmKu9.js → message-files-panel-Dnlf1NMr.js} +1 -1
- package/dist/assets/{messages-Bzoxmx-l.js → messages-BsebAxbJ.js} +2 -2
- package/dist/assets/{metric-card-Do3wNbPI.js → metric-card-Cn3Pxp_y.js} +1 -1
- package/dist/assets/{mobile-sidebar-drawer-BJd6tv4Y.js → mobile-sidebar-drawer-DLQTNJ0f.js} +1 -1
- package/dist/assets/native-anchor-DlLucCuN.js +1 -0
- package/dist/assets/navigation-resolver-G5hvXj7n.js +1 -0
- package/dist/assets/{not-found-PdwOnNTv.js → not-found-D7zMNeoP.js} +1 -1
- package/dist/assets/notifications-KDnxMuel.js +1 -0
- package/dist/assets/{notifications-page-BwstYa-9.js → notifications-page-DOvBG6MA.js} +1 -1
- package/dist/assets/{oauth-complete-page-BkgOY2_3.js → oauth-complete-page-BtAOD5L_.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-BBTQrcoD.js → oauth-popup-complete-page-BOhgbJpy.js} +1 -1
- package/dist/assets/{onboarding-layout-vvQBbcNH.js → onboarding-layout-BJGGWHC5.js} +1 -1
- package/dist/assets/open-workspace-file-DuM6YljK.js +2 -0
- package/dist/assets/page-empty-state-DMOmLL3O.js +1 -0
- package/dist/assets/pairing-page-DUGGmtF7.js +1 -0
- package/dist/assets/{pdf-file-preview-Cu8sMBOL.js → pdf-file-preview-lOeUDEY0.js} +1 -1
- package/dist/assets/{personality-page-DWEuqYvL.js → personality-page-BJ4zMN_J.js} +1 -1
- package/dist/assets/plans-page-DXkMROlG.js +1 -0
- package/dist/assets/platform-detection-DVo8Md11.js +6 -0
- package/dist/assets/{platform-login-notice-6RhKIp2V.js → platform-login-notice-QBjBs-bf.js} +1 -1
- package/dist/assets/platform-loopback-page-DHfJc1sP.js +1 -0
- package/dist/assets/{plugin-detail-page-Dn6mFgg9.js → plugin-detail-page-hhCC8N_y.js} +1 -1
- package/dist/assets/plugins-surface-CLevPrO2.js +1 -0
- package/dist/assets/{prefs-DCq3owwr.js → prefs-BmjzWWYT.js} +1 -1
- package/dist/assets/privacy-page-BY3uqWM6.js +1 -0
- package/dist/assets/privacy-screen-BqwK5OY5.js +1 -0
- package/dist/assets/provider-callback-page-CZdG8aZO.js +1 -0
- package/dist/assets/{provider-key-C6EBUeUy.js → provider-key-DttR9fDs.js} +1 -1
- package/dist/assets/provider-signup-page-ZZ8fcOTI.js +1 -0
- package/dist/assets/{provisioning-targets-P0R2EB_9.js → provisioning-targets-D0PQtccl.js} +1 -1
- package/dist/assets/push-registration-C51GEWeG.js +2 -0
- package/dist/assets/{quick-input-page-CJTRL6h3.js → quick-input-page-QikxtuDe.js} +1 -1
- package/dist/assets/react-query.gen-DYPHpypm.js +1 -0
- package/dist/assets/{remove-from-device-dialog-BgHwDgjL.js → remove-from-device-dialog-DPjq2HVH.js} +1 -1
- package/dist/assets/{research-mock-page-B--gQIPc.js → research-mock-page-DuGMQ8Gj.js} +1 -1
- package/dist/assets/{research-onboarding-route-S64sLFJm.js → research-onboarding-route-CJZ7RsRT.js} +3 -3
- package/dist/assets/{research-results-view-DZcYXLOV.js → research-results-view-C9to0vk2.js} +1 -1
- package/dist/assets/{retire-confirm-dialog-z1e5g-T2.js → retire-confirm-dialog-ChBsQoPV.js} +1 -1
- package/dist/assets/review-terms-screen-D2Nrs2g_.js +1 -0
- package/dist/assets/routes-XSuDx207.js +23 -0
- package/dist/assets/runtime-upgrade-banner-BDkDHeFs.js +2 -0
- package/dist/assets/{schedules-TiY9ctCJ.js → schedules-pP64xy_x.js} +1 -1
- package/dist/assets/{schedules-page-DRdg3lrg.js → schedules-page-Dl67yc8g.js} +1 -1
- package/dist/assets/sdk.gen-Dy1Bb8sS.js +6 -0
- package/dist/assets/{select-assistant-screen-Dry2a53v.js → select-assistant-screen-CX3yQoVF.js} +1 -1
- package/dist/assets/settings-layout-BeyEfawX.js +1 -0
- package/dist/assets/settings-navigation-m6QhETIa.js +1 -0
- package/dist/assets/{share-feedback-modal-BwZXYT6i.js → share-feedback-modal-CpPZwk_w.js} +1 -1
- package/dist/assets/{sidebar-tree-DqCdhWH0.js → sidebar-tree-CzLoiQ8C.js} +1 -1
- package/dist/assets/signup-page-DjhLpIIJ.js +1 -0
- package/dist/assets/{signup-shell-DQoX-73u.js → signup-shell-n2TrmmNi.js} +1 -1
- package/dist/assets/{site-favicon-Dy0dGKv4.js → site-favicon-BF7RhCjo.js} +1 -1
- package/dist/assets/{skill-detail-page-BBVw63ek.js → skill-detail-page-Bwtdr5Ze.js} +1 -1
- package/dist/assets/{skill-detail-panel-CZYcz8zJ.js → skill-detail-panel-DmmtSmZB.js} +1 -1
- package/dist/assets/{skills-CobQEp0Y.js → skills-BNvHTcYo.js} +1 -1
- package/dist/assets/{slack-setup-wizard-qz8Y2kbN.js → slack-setup-wizard-Dt8mhYhN.js} +1 -1
- package/dist/assets/{sound-manager-DdFhLSnM.js → sound-manager-C-FXxZhq.js} +1 -1
- package/dist/assets/{sounds-page-DFytZ95a.js → sounds-page-Chp1s4M-.js} +1 -1
- package/dist/assets/{start-screen-CAUO7iU0.js → start-screen-CH0iSBVN.js} +1 -1
- package/dist/assets/stt-language-picker-modal-Dy379lW1.js +1 -0
- package/dist/assets/{subagent-detail-panel-BiZcxtca.js → subagent-detail-panel-BdPfn7BV.js} +1 -1
- package/dist/assets/{subagent-store-CaYz_-6p.js → subagent-store-DwBJL4BM.js} +1 -1
- package/dist/assets/superpowers-page-C4B5FREg.js +1 -0
- package/dist/assets/{system-events-page-en3PLLA2.js → system-events-page-D3ZA138u.js} +1 -1
- package/dist/assets/{text-preview-GzzXU2th.js → text-preview-BmuS3Jnw.js} +1 -1
- package/dist/assets/{theme-stage-page-DfXinJSb.js → theme-stage-page-CpsFSfFV.js} +1 -1
- package/dist/assets/{threshold-presets-nk5pzNj0.js → threshold-presets-CQ7vI-Wq.js} +1 -1
- package/dist/assets/{tool-detail-panel-Duob5Onw.js → tool-detail-panel-0Sp3CHFJ.js} +1 -1
- package/dist/assets/{transcript-message-body-shared-B8tylrby.js → transcript-message-body-shared-C_Ijqrn5.js} +1 -1
- package/dist/assets/{trust-rules-api-yGqV5NSi.js → trust-rules-api-B4g_XMAO.js} +1 -1
- package/dist/assets/{upgrade-cancel-page-BO1g_2dY.js → upgrade-cancel-page-Dem0wnzu.js} +1 -1
- package/dist/assets/{upgrade-success-page-JLfUPRXK.js → upgrade-success-page-CnQyI3_u.js} +1 -1
- package/dist/assets/{use-app-theme-D47xo0HN.js → use-app-theme-BAGQ6WMq.js} +1 -1
- package/dist/assets/use-assistant-avatar-CqTCEKcn.js +1 -0
- package/dist/assets/{use-assistant-capability-DW1-G9gT.js → use-assistant-capability-CUEzubv5.js} +1 -1
- package/dist/assets/{use-assistant-identity-details-CYJJlhVI.js → use-assistant-identity-details-DlLs9xww.js} +1 -1
- package/dist/assets/{use-attachment-preview-xtU_G3Z8.js → use-attachment-preview-BZuYc4Vc.js} +2 -2
- package/dist/assets/use-attachment-squares-NEEA7Zuc.js +1 -0
- package/dist/assets/{use-avatar-accent-var-DpG_e3Ig.js → use-avatar-accent-var-CUL1kls8.js} +1 -1
- package/dist/assets/{use-bookmarks-BxeHtxr6.js → use-bookmarks-DRRtDvQB.js} +1 -1
- package/dist/assets/{use-bundled-avatar-components-DjSw8dxI.js → use-bundled-avatar-components-BzgMHQcH.js} +2 -2
- package/dist/assets/use-checkout-dismiss-refresh-DhzMx3v8.js +1 -0
- package/dist/assets/{use-command-palette-sections-Cuznzj_A.js → use-command-palette-sections-DmP2C3s9.js} +1 -1
- package/dist/assets/{use-edge-swipe-Cn0pKFX0.js → use-edge-swipe-DLpSYIqE.js} +1 -1
- package/dist/assets/{use-edge-swipe-back-DkPfMOdP.js → use-edge-swipe-back-Bbc-9rPY.js} +1 -1
- package/dist/assets/{use-edit-app-IZp8w7bB.js → use-edit-app-d9VPKqhM.js} +1 -1
- package/dist/assets/{use-effective-timezone-BK7XyO_V.js → use-effective-timezone-DixfAba2.js} +1 -1
- package/dist/assets/use-invite-link-dialog-CYX6yRMD.js +1 -0
- package/dist/assets/{use-is-org-ready-CzV7o_oQ.js → use-is-org-ready-XO3KhcpH.js} +1 -1
- package/dist/assets/{use-local-file-info-DaNZn1QT.js → use-local-file-info-BhIb0tEw.js} +1 -1
- package/dist/assets/use-onboarding-login-Fi5kWxZq.js +1 -0
- package/dist/assets/{use-platform-assistant-id-CfSQv1Jk.js → use-platform-assistant-id-CzGrGP7A.js} +1 -1
- package/dist/assets/{use-platform-gate-eiz8Kj6G.js → use-platform-gate-BO0EH_L6.js} +1 -1
- package/dist/assets/{use-reduced-motion-CznEG-5y.js → use-reduced-motion-Blpe7z4_.js} +1 -1
- package/dist/assets/use-return-to-short-circuit-CdGWtw01.js +1 -0
- package/dist/assets/{use-save-twilio-credentials-Dm0bhx_A.js → use-save-twilio-credentials-D2l1lp1p.js} +1 -1
- package/dist/assets/{use-skill-actions-BkMRz2kV.js → use-skill-actions-BJSFEj-2.js} +1 -1
- package/dist/assets/{use-skill-detail-files-c0kyL9qZ.js → use-skill-detail-files-DpE4ZhKF.js} +1 -1
- package/dist/assets/use-sticky-profiles-B6BkFXi7.js +1 -0
- package/dist/assets/{use-subagent-card-data-C7ZEUE5M.js → use-subagent-card-data-eoetJ052.js} +1 -1
- package/dist/assets/{use-supports-bookmarks-DYxpaoa_.js → use-supports-bookmarks-sSuQiAsQ.js} +1 -1
- package/dist/assets/use-supports-credentials-settings-BGk1AxJ5.js +1 -0
- package/dist/assets/{use-swipe-engine-VZ15d2Yh.js → use-swipe-engine--jntXWQT.js} +1 -1
- package/dist/assets/use-transcript-message-by-id-By23xt-c.js +1 -0
- package/dist/assets/{use-transcript-messages--IFYHvqK.js → use-transcript-messages-KoFuifkV.js} +1 -1
- package/dist/assets/{use-voice-sample-preview-CFjnL9wj.js → use-voice-sample-preview-DiXNs-im.js} +1 -1
- package/dist/assets/{utils-Dr_wOC7R.js → utils-B2hm7pwO.js} +1 -1
- package/dist/assets/{utils-CPWCnpba.js → utils-CThlho72.js} +1 -1
- package/dist/assets/{viewer-store-COyBTSXn.js → viewer-store-BdgeUnmH.js} +1 -1
- package/dist/assets/voice-list-BPgpjHIk.js +1 -0
- package/dist/assets/voice-page-BkCYY9At.js +1 -0
- package/dist/assets/{weather-forecast-display-C60AEmxC.js → weather-forecast-display-CR94vzni.js} +1 -1
- package/dist/assets/{welcome-screen-qydptjIT.js → welcome-screen-DukaWmAY.js} +1 -1
- package/dist/assets/{workflow-detail-panel-BiouTrdj.js → workflow-detail-panel-B2y2HOes.js} +1 -1
- package/dist/assets/{workflow-store-DPRUYCna.js → workflow-store-BPw35C7H.js} +1 -1
- package/dist/assets/workspace-page-Bi28RIvE.js +1 -0
- package/dist/assets/workspace-tree-query-Cp0iX1ma.js +1 -0
- package/dist/index.html +152 -153
- package/package.json +1 -1
- package/dist/assets/access-BSsaN2On.js +0 -1
- package/dist/assets/account-page-CSGAEOcI.js +0 -1
- package/dist/assets/ai-page-DU2k-A_I.js +0 -1
- package/dist/assets/auth-store-344lpSdW.js +0 -2
- package/dist/assets/browser-vie4LRYm.js +0 -2
- package/dist/assets/checkout-continuation-CnwFJDxg.js +0 -1
- package/dist/assets/checkout-page-CLOktjEp.js +0 -1
- package/dist/assets/consent-BpATHDME.js +0 -1
- package/dist/assets/conversation-cache-Beenngrg.js +0 -1
- package/dist/assets/conversation-list-fetchers-DCLRirbj.js +0 -1
- package/dist/assets/conversation-queries-SlTB6ibo.js +0 -1
- package/dist/assets/effective-timezone-C3ee9H8L.js +0 -1
- package/dist/assets/first-run-scope-BVltBd3g.js +0 -1
- package/dist/assets/haptics-Blk_K02O.js +0 -2
- package/dist/assets/home-page-route-DlOwKMZn.js +0 -1
- package/dist/assets/identity-CCWRQBqs.js +0 -1
- package/dist/assets/integrations-page-Ca6ZZDNB.js +0 -1
- package/dist/assets/login-page-uBp3mUse.js +0 -1
- package/dist/assets/logout-page-CvwqF-4Y.js +0 -1
- package/dist/assets/native-anchor-Qk379M-W.js +0 -1
- package/dist/assets/native-biometric-CbCUFdjC.js +0 -6
- package/dist/assets/navigation-resolver-y9MHLxam.js +0 -1
- package/dist/assets/notifications-CsTAeEjD.js +0 -1
- package/dist/assets/open-workspace-file-CpTrcRQg.js +0 -2
- package/dist/assets/page-empty-state-BKU_UJ5Z.js +0 -1
- package/dist/assets/pairing-page-DFly7SIf.js +0 -1
- package/dist/assets/plans-page-DKnsdczi.js +0 -1
- package/dist/assets/platform-detection-C5Xt8-QJ.js +0 -1
- package/dist/assets/platform-loopback-page-BQy56wr2.js +0 -1
- package/dist/assets/plugins-surface-CSW8ge7J.js +0 -1
- package/dist/assets/privacy-page-yZ8NOrgd.js +0 -1
- package/dist/assets/privacy-screen-Dn_PscxS.js +0 -1
- package/dist/assets/provider-callback-page-D9rRddgx.js +0 -1
- package/dist/assets/provider-signup-page-2swsxRIy.js +0 -1
- package/dist/assets/push-registration-23UkBXeo.js +0 -2
- package/dist/assets/react-query.gen-D0Q5L-je.js +0 -1
- package/dist/assets/review-terms-screen-F1o1JWC8.js +0 -1
- package/dist/assets/routes-4aGUKLYP.js +0 -23
- package/dist/assets/runtime-upgrade-banner-D8TSBqKf.js +0 -2
- package/dist/assets/sdk.gen-CsUgJyBR.js +0 -6
- package/dist/assets/settings-layout-DbpkQ0qP.js +0 -1
- package/dist/assets/settings-navigation-CjPoGbpD.js +0 -1
- package/dist/assets/signup-page-C8l2WsPS.js +0 -1
- package/dist/assets/superpowers-page-CWj7rGy1.js +0 -1
- package/dist/assets/use-assistant-avatar-C7ze3vgm.js +0 -1
- package/dist/assets/use-attachment-squares-BBxMZP7o.js +0 -1
- package/dist/assets/use-checkout-dismiss-refresh-Bfms2Ch3.js +0 -1
- package/dist/assets/use-invite-link-dialog-Dv3ig9W1.js +0 -1
- package/dist/assets/use-onboarding-login-jt_ejqRb.js +0 -1
- package/dist/assets/use-return-to-short-circuit-BFgPJjCM.js +0 -1
- package/dist/assets/use-sticky-profiles-DfDcQ-kB.js +0 -1
- package/dist/assets/use-supports-credentials-settings-DAFFDbZ4.js +0 -1
- package/dist/assets/use-transcript-message-by-id-CgKXNqmO.js +0 -1
- package/dist/assets/voice-list-CUXyi8jy.js +0 -1
- package/dist/assets/voice-page-B_vaHVZn.js +0 -1
- package/dist/assets/workspace-page-B4R0RGFq.js +0 -1
- package/dist/assets/workspace-tree-query-CCVpyMq8.js +0 -1
- /package/dist/assets/{a2a-invite-Cx2okV6a.js → a2a-invite-Bm584O1Q.js} +0 -0
- /package/dist/assets/{account-shell-BFwCqbiW.js → account-shell-BAxD1c33.js} +0 -0
- /package/dist/assets/{android-consumption-only-DT4SppcW.js → android-consumption-only-BhpxWm8b.js} +0 -0
- /package/dist/assets/{app-info-D-aHGnE-.js → app-info-CFDDITP8.js} +0 -0
- /package/dist/assets/{app-types-DyIrz4FQ.js → app-types-BaF0YViN.js} +0 -0
- /package/dist/assets/{apple-logo-_x2VgiOh.js → apple-logo-QxCmgL_8.js} +0 -0
- /package/dist/assets/{avatar-bundled-components-CwoY0fNX.js → avatar-bundled-components-CpUPtepI.js} +0 -0
- /package/dist/assets/{avatar-subagent-BzM5BMYE.js → avatar-subagent-CODNemgH.js} +0 -0
- /package/dist/assets/{avatar-svg-compositor-BWsnZx7I.js → avatar-svg-compositor-HKhsTl-B.js} +0 -0
- /package/dist/assets/{avatar-tone-Cnko8w64.js → avatar-tone-DJBf2301.js} +0 -0
- /package/dist/assets/{browser-timezone-Bt06ntni.js → browser-timezone-CIJphq8z.js} +0 -0
- /package/dist/assets/{by-tool-use-id-index-CsMrRoeV.js → by-tool-use-id-index-BNlydLFB.js} +0 -0
- /package/dist/assets/{chat-layout-slots-store-4BKpWVWP.js → chat-layout-slots-store-Df14mWpo.js} +0 -0
- /package/dist/assets/{chat-Bwc_Va4x.js → chat-qr1cXxyu.js} +0 -0
- /package/dist/assets/{conversation-selection-CxnP6yVT.js → conversation-selection-BQ2rwj3i.js} +0 -0
- /package/dist/assets/{conversation-store-pVTpsull.js → conversation-store-CRB7YBVE.js} +0 -0
- /package/dist/assets/{copy-to-clipboard-Bxl-OHim.js → copy-to-clipboard-Begy4gA7.js} +0 -0
- /package/dist/assets/{credential-entry-page-CHEnzRl_.js → credential-entry-page-Ctcscm1e.js} +0 -0
- /package/dist/assets/{detail-card-CIG8Ur34.js → detail-card-Jp-4dqnZ.js} +0 -0
- /package/dist/assets/{detail-drawer-NoEo8D31.js → detail-drawer-D_NmfOfo.js} +0 -0
- /package/dist/assets/{detail-panel-stop-button-BdEcyDIr.js → detail-panel-stop-button-D0pZKzCv.js} +0 -0
- /package/dist/assets/{detail-shell-Ber1o-Jd.js → detail-shell-Cfhmm8Ht.js} +0 -0
- /package/dist/assets/{dictation-overlay-page-B-ZiRDCN.js → dictation-overlay-page-B0G77Lxf.js} +0 -0
- /package/dist/assets/{edit-chat-session-DV3JHy7m.js → edit-chat-session-DKHJkqrM.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-DFDbUp2o.js → emoji-catalog-data-wClcJhQd.js} +0 -0
- /package/dist/assets/{environment-store-DPPZjQBr.js → environment-store-CY9Rnrfi.js} +0 -0
- /package/dist/assets/{esm-CNeJzEKI.js → esm-DapZX4Er.js} +0 -0
- /package/dist/assets/{external-urls-DjcLrlMy.js → external-urls-DdNdyTc4.js} +0 -0
- /package/dist/assets/{eye-bbox-C3QvquSe.js → eye-bbox-CL9fV-US.js} +0 -0
- /package/dist/assets/{format-date-BVeYupnR.js → format-date-C_mIPxz2.js} +0 -0
- /package/dist/assets/{hard-navigate-9vglJJTR.js → hard-navigate-DqAmkZZE.js} +0 -0
- /package/dist/assets/{link-click-CncSkJ2L.js → link-click-DEZzmUsj.js} +0 -0
- /package/dist/assets/{machine-sizes-DwjJlMD9.js → machine-sizes-fKP6e9yR.js} +0 -0
- /package/dist/assets/{misc-DkLRKNc9.js → misc-D9--6g1n.js} +0 -0
- /package/dist/assets/{native-file-CzcnZ6ES.js → native-file-BTjo719k.js} +0 -0
- /package/dist/assets/{oauth-connection-utils-B_y5U8k5.js → oauth-connection-utils-DLsnIBSh.js} +0 -0
- /package/dist/assets/{oauth-popup-h31BDZz7.js → oauth-popup-DEdfcSaL.js} +0 -0
- /package/dist/assets/{onboarding-step-layout-CsE4NokU.js → onboarding-step-layout-Cm0PD1db.js} +0 -0
- /package/dist/assets/{onboarding-store-CHNXLvVd.js → onboarding-store-BllETOYg.js} +0 -0
- /package/dist/assets/{optimistic-lifecycle-DYPK-Ow7.js → optimistic-lifecycle-Zm4t_MWl.js} +0 -0
- /package/dist/assets/{page-shell-CTGK0BYQ.js → page-shell-BitkSRw8.js} +0 -0
- /package/dist/assets/{password-reset-page-wBsuzxY1.js → password-reset-page-i1oxLRuB.js} +0 -0
- /package/dist/assets/{pdf-preview-BUviTR8O.js → pdf-preview-BeENvA7P.js} +0 -0
- /package/dist/assets/{plugin-attribution-CqwqgBBt.js → plugin-attribution-C3Kyge4T.js} +0 -0
- /package/dist/assets/{plugins-page-BM7uyCVq.js → plugins-page-B6xzLuM-.js} +0 -0
- /package/dist/assets/{pointer-CbRUenvI.js → pointer-Di9xGve4.js} +0 -0
- /package/dist/assets/{prechat-BhksnvOi.js → prechat-D0kfFLHe.js} +0 -0
- /package/dist/assets/{preview-skeleton-SOAvtgSp.js → preview-skeleton-Dr_FZPD0.js} +0 -0
- /package/dist/assets/{profile-metadata-CV0PnVCc.js → profile-metadata-ABpt5sF3.js} +0 -0
- /package/dist/assets/{proxy-CJDjUn7E.js → proxy-lK4w-Bft.js} +0 -0
- /package/dist/assets/{public-asset-CXfLVmJu.js → public-asset-Di_CM-Tf.js} +0 -0
- /package/dist/assets/{radio-card-nav-B8eyoVlT.js → radio-card-nav-DJHt6k5l.js} +0 -0
- /package/dist/assets/{react-query.gen-nOsyoQ6U.js → react-query.gen-BtWMgf9p.js} +0 -0
- /package/dist/assets/{research-facts-DiJ-nQ1R.js → research-facts-BElRDNOP.js} +0 -0
- /package/dist/assets/{research-onboarding-persistence-D4qPVBNx.js → research-onboarding-persistence-BBFfx020.js} +0 -0
- /package/dist/assets/{sandbox-bridge-l7hxmFmg.js → sandbox-bridge-BNwuZJHp.js} +0 -0
- /package/dist/assets/{sdk.gen-CY1afY_n.js → sdk.gen-DGleJJuY.js} +0 -0
- /package/dist/assets/{setting-row-zsrcjZm0.js → setting-row-Dgoez0aa.js} +0 -0
- /package/dist/assets/{skills-page-D1fhMr6r.js → skills-page-BuFYHg6T.js} +0 -0
- /package/dist/assets/{status-badge-pill-DYBOsHm1.js → status-badge-pill-D7j-0FLr.js} +0 -0
- /package/dist/assets/{theme-preferences-BV8pm97v.js → theme-preferences-D7_-kTyl.js} +0 -0
- /package/dist/assets/{three-dot-indicator-kyZ3c9IW.js → three-dot-indicator-uhGzoECR.js} +0 -0
- /package/dist/assets/{tiptap-document-editor-DxfJdAvi.js → tiptap-document-editor-BV7KYOAB.js} +0 -0
- /package/dist/assets/{usage-redirect-page-Dko1TiFl.js → usage-redirect-page-DUkPPZtp.js} +0 -0
- /package/dist/assets/{use-active-assistant-id-BF7k_8wM.js → use-active-assistant-id-Ga7QpWoG.js} +0 -0
- /package/dist/assets/{use-bus-subscription-BpN_ExxB.js → use-bus-subscription-B-nzwF5c.js} +0 -0
- /package/dist/assets/{use-copy-to-clipboard-FnRYJ4Kv.js → use-copy-to-clipboard-Da76__Tl.js} +0 -0
- /package/dist/assets/{use-is-mobile-BZEx6kJ_.js → use-is-mobile-C0Jx9AxD.js} +0 -0
- /package/dist/assets/{voice-providers-note-D0NlUr34.js → voice-providers-note-BVDt6Sob.js} +0 -0
- /package/dist/assets/{workflow-status-KgjQhFZ8.js → workflow-status-9khXBfP6.js} +0 -0
- /package/dist/assets/{workspace-path-links-D6BeIXR9.js → workspace-path-links-C1A7ZMlC.js} +0 -0
- /package/dist/assets/{workspace-theme-tokens-PCjFiNBt.js → workspace-theme-tokens-hEF46cJM.js} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/web-BAiU3nLP.js","assets/dist-DZjsRBrq.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./capture-error-D12Gu3Tx.js";import{t as n}from"./react-BFJW0bSv.js";import{t as r}from"./button-DWxxMNqc.js";import{t as i}from"./preload-helper-Cv2QeVDK.js";import{t as a}from"./chunk-5KNZJZUH-Bsoom5--.js";import{n as o}from"./QueryClientProvider-CMu7CkQU.js";import{t as s}from"./useQuery-Bz-fbQ-m.js";import{t as c}from"./useMutation-CXGTrp4W.js";import{t as l}from"./jsx-runtime-D3ZM-ToX.js";import{t as u}from"./createLucideIcon-C1mdGPB9.js";import{t as d}from"./circle-alert-C1Hon9Us.js";import{t as f}from"./circle-check-CoU8jUcF.js";import{t as ee}from"./cloud-off-CNsmAfgy.js";import{t as te}from"./info-DJd5yI-U.js";import{t as p}from"./loader-circle-D7A_UeUb.js";import{t as m}from"./moon-Ch_uynqT.js";import{t as h}from"./refresh-cw-4J4MFuhM.js";import{t as g}from"./triangle-alert-CuEUegtS.js";import{t as _}from"./wrench-Dn3oHH42.js";import{n as v}from"./toast-DFRsyumK.js";import{t as y}from"./confirm-dialog-CsxDM9Vd.js";import{n as b,t as x}from"./create-selectors-B5FxuP1q.js";import{I as ne,V as re,f as S}from"./local-mode-BsyhpYyk.js";import{t as C}from"./is-electron-Djuya72b.js";import{n as w,t as T}from"./resolved-assistants-store-CcfVZNkg.js";import{t as E}from"./assistant-identity-store-Dk3c04VV.js";import{ct as ie,et as ae,gt as D,nt as O}from"./auth-store-344lpSdW.js";import{N as k,Q as A,k as j}from"./sdk.gen-C98zmHHo.js";import{n as M}from"./event-bus-CnxdyIPs.js";import{t as N}from"./client-feature-flag-store-DcNe2lt_.js";import{m as oe}from"./native-biometric-CbCUFdjC.js";import{i as P,t as F}from"./dist-DZjsRBrq.js";import{d as I}from"./routes-gT_HcUb1.js";import{i as L,t as R}from"./use-platform-gate-eiz8Kj6G.js";import{r as z}from"./use-is-org-ready-CzV7o_oQ.js";import{o as B}from"./diagnostics-B8CfVwTx.js";import{t as se}from"./use-bus-subscription-BpN_ExxB.js";import{C as ce,O as le,k as V,yt as ue}from"./react-query.gen-nOsyoQ6U.js";import{t as H}from"./misc-DkLRKNc9.js";import{a as de,i as U,n as fe,o as W,r as G,s as pe,t as K}from"./local-runtime-upgrade-BtnfGFvX.js";var me=u(`wifi-off`,[[`path`,{d:`M12 20h.01`,key:`zekei9`}],[`path`,{d:`M8.5 16.429a5 5 0 0 1 7 0`,key:`1bycff`}],[`path`,{d:`M5 12.859a10 10 0 0 1 5.17-2.69`,key:`1dl1wf`}],[`path`,{d:`M19 12.859a10 10 0 0 0-2.007-1.523`,key:`4k23kn`}],[`path`,{d:`M2 8.82a15 15 0 0 1 4.177-2.643`,key:`1grhjp`}],[`path`,{d:`M22 8.82a15 15 0 0 0-11.288-3.764`,key:`z3jwby`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),q=e(n(),1),he=x(b()((e,t)=>({isConnected:!1,setConnected:n=>{t().isConnected!==n&&e({isConnected:n})}}))),ge=()=>he.getState().isConnected;function J(e){return C()?window.vellum?.connectivity?.onState(e)??(()=>void 0):()=>void 0}function _e(e){C()&&window.vellum?.connectivity?.setDevice(e)}async function ve(e){if(!C())return null;try{return await e()??null}catch{return null}}function Y(){return ve(()=>window.vellum?.connectivity?.get())}function X(){return ve(()=>window.vellum?.connectivity?.retry())}var ye=5e3,Z=3e4,be=1e3,xe=3e4;function Se(e){return typeof e!=`number`||!Number.isFinite(e)||e<=0?ye:Math.min(xe,Math.max(be,e))}function Ce({assistantState:e,activeAssistantIsPlatformHosted:t,targetIsKnownPlatformHostedAssistant:n,targetIsLifecycleOperationAssistant:r}){return r||n||e.kind===`active`&&t}var we=new Map;function Te(e,t){let n=t?`${t.state}:${t.detail_state??``}`:`absent`;we.get(e)!==n&&(we.set(e,n),B(`operational_status`,{assistantId:e,state:t?.state??null,detailState:t?.detail_state??null,reason:t?.detail?.reason??null,message:t?.detail?.message??null,healthzOk:t?.runtime?.healthz_ok??null,podPhase:t?.pod?.pod_phase??null,sseConnected:ge()}))}async function Ee(e,t){let{data:n,error:r,response:i}=await k({path:{id:e},signal:t,throwOnError:!1});if(!i||!i.ok){if(i?.status===403||i?.status===404)return Te(e,null),null;throw r??Error(`Failed to fetch assistant operational status`)}let a=n??null;return Te(e,a),a}function De(e){let t=L(),n=D.use.assistantState(),r=D.use.operationalStatusAssistantId(),i=w(t=>e?t.assistants.find(t=>t.id===e):void 0),a=R(),o=z(),c=!!e&&e===r,l=i?.isPlatformHosted===!0&&i.isLocal===!1,u=!!e&&t===`full`&&o&&Ce({assistantState:n,activeAssistantIsPlatformHosted:a,targetIsKnownPlatformHostedAssistant:l,targetIsLifecycleOperationAssistant:c});return s({queryKey:ce({path:{id:u?e:`disabled`}}).queryKey,queryFn:({signal:t})=>Ee(e,t),enabled:u,retry:!1,staleTime:0,refetchIntervalInBackground:!0,refetchInterval:e=>{if(!u)return!1;let t=e.state.data;return t===null?Z:t?.state===`sleeping`?ye:Se(t?.poll_after_ms)}})}function Oe(e){return e?.state===`active`}var ke=2e3;function Ae(){let[e,t]=(0,q.useState)(`online`),n=(0,q.useRef)(null),r=(0,q.useCallback)(()=>{n.current&&=(clearTimeout(n.current),null)},[]),i=(0,q.useCallback)(e=>{e&&(r(),t(e))},[r]),a=(0,q.useCallback)(()=>{Y().then(i)},[i]);return se(`app.resume`,a),(0,q.useEffect)(()=>{let e=J(e=>{if(e===`online`){if(n.current)return;n.current=setTimeout(()=>{n.current=null,t(`online`)},ke)}else r(),t(e)});return window.addEventListener(`focus`,a),()=>{e(),window.removeEventListener(`focus`,a),r()}},[a,r]),{connectivityState:e,retryConnectivity:(0,q.useCallback)(()=>{X().then(i)},[i])}}var je=P(`Network`,{web:()=>i(()=>import(`./web-BAiU3nLP.js`).then(e=>new e.NetworkWeb),__vite__mapDeps([0,1]))});function Me(){let[e,t]=(0,q.useState)(!0);return(0,q.useEffect)(()=>{if(!F.isNativePlatform())return;let e=!1;je.getStatus().then(n=>{e||t(n.connected)}).catch(()=>{});let n=je.addListener(`networkStatusChange`,n=>{e||t(n.connected)});return()=>{e=!0,n.then(e=>e.remove()).catch(()=>{})}},[]),e}var Q=l(),Ne=6e4,Pe=15e3,Fe={info:{container:`bg-[var(--system-info-weak)]`,content:`text-[color:var(--system-info-strong)]`,icon:`text-[color:var(--system-info-strong)]`,action:`[--status-banner-action-color:var(--system-info-strong)]`,DefaultIcon:te},success:{container:`bg-[var(--system-positive-weak)]`,content:`text-[color:var(--system-positive-strong)]`,icon:`text-[color:var(--system-positive-strong)]`,action:`[--status-banner-action-color:var(--system-positive-strong)]`,DefaultIcon:f},warning:{container:`bg-[var(--system-mid-weak)]`,content:`text-[color:var(--system-mid-strong)]`,icon:`text-[color:var(--system-mid-strong)]`,action:`[--status-banner-action-color:var(--system-mid-strong)]`,DefaultIcon:d},error:{container:`bg-[var(--system-negative-weak)]`,content:`text-[color:var(--system-negative-strong)]`,icon:`text-[color:var(--system-negative-strong)]`,action:`[--status-banner-action-color:var(--system-negative-strong)]`,DefaultIcon:g},neutral:{container:`bg-[var(--surface-active)]`,content:`text-[color:var(--content-secondary)]`,icon:`text-[color:var(--content-secondary)]`,action:`[--status-banner-action-color:var(--content-secondary)]`,DefaultIcon:null}},Ie={web:`min-h-10 rounded-none px-4 py-[10px]`,electron:`min-h-8 rounded-[6px] px-2 py-[7px]`};function Le({tone:e,title:t,children:n,icon:r,actions:i,placement:a=`web`,className:o,ref:s,...c}){let l=Fe[e],u=e===`error`?`alert`:`status`,d=a===`web`?`text-body-medium-default leading-5`:`text-body-small-default leading-[18px]`,f=r===void 0?l.DefaultIcon?(0,Q.jsx)(l.DefaultIcon,{"aria-hidden":`true`}):null:r;return(0,Q.jsxs)(`div`,{...c,ref:s,role:u,"data-slot":`status-banner-notice`,"data-placement":a,"data-tone":e,className:H(`flex w-full shrink-0 items-center justify-between gap-3 overflow-hidden`,`text-[color:var(--content-default)]`,Ie[a],l.container,o),children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-2`,children:[f?(0,Q.jsx)(`span`,{className:H(`flex size-3.5 shrink-0 items-center justify-center [&_svg]:size-3.5`,l.icon),children:f}):null,(0,Q.jsxs)(`div`,{className:`min-w-0`,children:[(0,Q.jsx)(`div`,{className:H(`truncate`,l.content,d),children:t}),n?(0,Q.jsx)(`div`,{className:`text-body-small-default leading-4 text-[color:var(--content-secondary)]`,children:n}):null]})]}),i?(0,Q.jsx)(`div`,{className:H(`flex shrink-0 items-center border-l border-[color-mix(in_srgb,var(--status-banner-action-color)_22%,transparent)] text-label-medium-default`,`text-[color:var(--status-banner-action-color)]`,l.action,a===`web`?`gap-2 pl-4 leading-5`:`gap-1.5 pl-2 leading-[18px]`,`[&_[data-slot=button]]:h-auto [&_[data-slot=button]]:border-0 [&_[data-slot=button]]:bg-transparent`,`[&_[data-slot=button]]:-mx-1 [&_[data-slot=button]]:rounded-sm [&_[data-slot=button]]:px-1 [&_[data-slot=button]]:py-0`,`[&_[data-slot=button]]:text-body-small-default`,`[&_[data-slot=button]]:leading-[inherit] [&_[data-slot=button]]:shadow-none`,`[&_[data-slot=button]]:[--vbtn-fg:var(--status-banner-action-color)]`,`[&_[data-slot=button]]:hover:!bg-transparent [&_[data-slot=button]]:hover:!opacity-100`,`[&_[data-slot=button]]:hover:[--vbtn-fg:var(--status-banner-action-color)]`,`[&_[data-slot=button]]:focus-visible:ring-2 [&_[data-slot=button]]:focus-visible:ring-[var(--ring)] [&_[data-slot=button]]:focus-visible:ring-offset-0`),children:i}):null]})}var $={initializing:`Assistant is initializing`,migrating:`Assistant is migrating`,provisioning:`Assistant is provisioning`,active:`Assistant is healthy`,sleeping:`Assistant is sleeping`,waking:`Assistant is waking`,restarting:`Assistant is restarting`,restoring_backup:`Assistant is restoring a backup`,upgrading_assistant_version:`Assistant is upgrading`,resizing_machine:`Assistant machine is resizing`,resizing_storage:`Assistant storage is resizing`,maintenance_mode:`Assistant is in maintenance mode`,crash_loop:`Assistant fatal error`,unreachable:`Assistant is unreachable`,not_found:`Assistant was not found`,retiring:`Assistant is retiring`},Re={initializing:`Assistant failed to initialize`,migrating:`Assistant migration failed`,provisioning:`Assistant failed to provision`,waking:`Assistant failed to wake`,restarting:`Assistant restart failed`,restoring_backup:`Backup restore failed`,upgrading_assistant_version:`Assistant upgrade failed`,resizing_machine:`Machine resize failed`,resizing_storage:`Storage resize failed`,retiring:`Assistant failed to retire`};function ze(){return{tone:`warning`,title:$.maintenance_mode,icon:(0,Q.jsx)(_,{className:`h-4 w-4`,"aria-hidden":`true`})}}function Be(){return(0,Q.jsx)(p,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`})}function Ve(){return(0,Q.jsx)(`span`,{className:`busy-indicator inline-block size-2 rounded-full bg-current`,"aria-hidden":`true`})}function He(e,t){if(!(!e&&!t))return(0,Q.jsxs)(Q.Fragment,{children:[e?Ge():null,e&&t?(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px bg-[color-mix(in_srgb,var(--status-banner-action-color)_35%,transparent)]`}):null,t?(0,Q.jsx)(r,{variant:`ghost`,size:`compact`,onClick:t,children:`Dismiss`}):null]})}function Ue(e,t,n){if(!e||Oe(e))return null;if(e.detail_state===`failed`){let r=Re[e.state];if(r)return{tone:`error`,title:r,children:e.detail?.message??void 0,actions:He(t,n)}}switch(e.state){case`crash_loop`:case`unreachable`:case`not_found`:return{tone:`error`,title:$[e.state],actions:t?Ge():void 0};case`sleeping`:return{tone:`neutral`,title:$[e.state],icon:(0,Q.jsx)(m,{className:`h-4 w-4`,"aria-hidden":`true`})};case`maintenance_mode`:return ze();case`upgrading_assistant_version`:case`resizing_machine`:case`resizing_storage`:case`initializing`:case`migrating`:case`provisioning`:return{tone:`info`,title:$[e.state],icon:Be()};case`waking`:return{tone:`info`,title:$[e.state],icon:Ve()};case`restarting`:case`restoring_backup`:case`retiring`:return{tone:`warning`,title:$[e.state],icon:Be()};default:return{tone:`warning`,title:$[e.state],icon:Be()}}}function We(e,t,n){switch(e){case`sleeping`:return{tone:n?`error`:`neutral`,title:`Your assistant is asleep`,children:n,icon:(0,Q.jsx)(m,{className:`h-4 w-4`,"aria-hidden":`true`}),actions:t};case`starting`:return{tone:`info`,title:`Your assistant is waking up`,icon:Ve()};case`upgrading`:return{tone:`warning`,title:`Assistant is upgrading`,icon:(0,Q.jsx)(p,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`})};case`migrating`:return{tone:`info`,title:`Assistant is migrating`,icon:(0,Q.jsx)(p,{className:`h-4 w-4 animate-spin`,"aria-hidden":`true`})};case`crashed`:return{tone:`error`,title:`Your assistant crashed`,children:n,actions:t};case`unreachable`:return{tone:n?`error`:`neutral`,title:`Your assistant is asleep`,icon:(0,Q.jsx)(m,{className:`h-4 w-4`,"aria-hidden":`true`}),children:n,actions:t};case`unhealthy`:return{tone:`warning`,title:`Assistant is unhealthy`};default:return null}}function Ge(){return(0,Q.jsx)(r,{asChild:!0,variant:`outlined`,size:`compact`,children:(0,Q.jsx)(a,{to:`${I.settings.debug}?tab=doctor`,children:`Go to Doctor`})})}function Ke(e){return e===`sleeping`||e===`crashed`||e===`unreachable`}function qe({banner:e,className:t,placement:n}){return(0,Q.jsx)(`div`,{className:H(n===`electron`?`px-4 pt-2`:`px-0 pt-0`,t),children:(0,Q.jsx)(Le,{tone:e.tone,title:e.title,icon:e.icon,actions:e.actions,placement:n,children:e.children})})}function Je(){let e=C(),n=oe(),{connectivityState:i,retryConnectivity:a}=Ae(),o=Me(),s=w.use.activeAssistantId(),c=w.use.selectedAssistantId(),l=w.use.assistants(),u=ae.use.currentOrganizationId(),d=D.use.assistantState(),f=D.use.operationalStatusAssistantId(),te=(0,q.useMemo)(()=>{let e=T(l,u).filter(e=>e.isPlatformHosted===!0&&e.isLocal===!1);return e.find(e=>e.id===c)?.id??e[0]?.id??null},[l,u,c]),h=f??s??te,g=d.kind===`active`&&!d.isLocal&&!!s&&h===s,_=De(h),v=ie(),{data:y,isError:b,refetch:x}=_,[E,k]=(0,q.useState)(!1);(0,q.useEffect)(()=>{y?.state===`sleeping`?k(!0):(y?.state===`active`||y?.state===`crash_loop`||y?.state===`not_found`)&&k(!1)},[y?.state]),(0,q.useEffect)(()=>{if(!E||y?.state!==`unreachable`)return;let e=setTimeout(()=>{k(!1)},6e4);return()=>clearTimeout(e)},[E,y?.state]);let[A,M]=(0,q.useState)(!1);(0,q.useEffect)(()=>{y?.state===`active`?M(!0):(y?.state===`sleeping`||y?.state===`crash_loop`||y?.state===`not_found`)&&M(!1)},[y?.state]),(0,q.useEffect)(()=>{if(!A||y?.state!==`unreachable`)return;let e=setTimeout(()=>{M(!1)},15e3);return()=>clearTimeout(e)},[A,y?.state]);let[N,P]=(0,q.useState)(null);se(`app.resume`,()=>{P(Date.now()+Pe)}),(0,q.useEffect)(()=>{if(N===null)return;let e=N-Date.now();if(e<=0){P(null);return}let t=setTimeout(()=>{P(null)},e);return()=>clearTimeout(t)},[N]);let F=N!==null,[I,L]=(0,q.useState)(null);(0,q.useEffect)(()=>{h&&(y?.state===`restarting`?L(y.detail_state===`failed`?null:h):(y?.state===`active`||y?.state===`sleeping`||y?.state===`not_found`)&&L(null))},[h,y?.state,y?.detail_state]);let R=I!==null&&I===h;(0,q.useEffect)(()=>{if(!R||y?.state!==`crash_loop`)return;let e=setTimeout(()=>{L(null)},6e4);return()=>clearTimeout(e)},[R,y?.state]);let[z,B]=(0,q.useState)(null),ce=(0,q.useRef)(y?.state);(0,q.useEffect)(()=>{let e=ce.current;ce.current=y?.state,y?.state!==e&&B(null)},[y?.state]);let le=(0,q.useCallback)(()=>{y?.state&&B(y.state)},[y?.state]),[V,ue]=(0,q.useState)(!1),[H,de]=(0,q.useState)(null),[U,fe]=(0,q.useState)(!1),[W,G]=(0,q.useState)(!1),[pe,K]=(0,q.useState)(null);(0,q.useEffect)(()=>{if(!W)return;let e=setTimeout(()=>{G(!1)},Ne);return()=>clearTimeout(e)},[W]),(0,q.useEffect)(()=>{(v===`healthy`||v===`unhealthy`||v===`sleeping`)&&G(!1)},[v]),(0,q.useEffect)(()=>{G(!1)},[s]);let he=(0,q.useCallback)(async()=>{if(!(!h||V)){ue(!0),de(null);try{let{response:e}=await j({path:{assistant_id:h},throwOnError:!1});if(!e?.ok)throw Error(`Exit maintenance mode returned non-ok response`);await Promise.allSettled([x(),O.checkAssistant()])}catch(e){t(e,{context:`exit_maintenance_mode_status_banner`}),de(`Failed to exit maintenance mode. Please try again.`)}finally{ue(!1)}}},[h,V,x]),ge=(0,q.useCallback)(async()=>{if(!(!s||U)){fe(!0),G(!0),K(null);try{let e=await re(s);if(!e.ok){G(!1),K(e.error||`Wake failed. Try running vellum wake in your terminal.`);return}await Promise.allSettled([x(),a(),O.checkAssistant()]),O.triggerReachabilityProbe()}catch(e){G(!1),t(e,{context:`wake_local_assistant_status_banner`}),K(`Wake failed. Try running vellum wake in your terminal.`)}finally{fe(!1)}}},[s,U,x,a]);if((0,q.useEffect)(()=>{Ke(v)||K(null)},[v]),e&&i===`device-offline`||!e&&n&&!o)return{tone:`error`,title:`You're offline`,icon:(0,Q.jsx)(me,{className:`h-4 w-4`,"aria-hidden":`true`})};if(!ne()&&Ke(v))return{tone:`neutral`,title:`Your assistant runs locally`,icon:(0,Q.jsx)(m,{className:`h-4 w-4`,"aria-hidden":`true`}),children:`Open the Vellum desktop app or run vellum wake in your terminal to start it.`};let J=(U||W)&&Ke(v)?`starting`:v,_e=We(J,Ke(J)&&s&&S(s)?(0,Q.jsx)(r,{variant:`outlined`,size:`compact`,leftIcon:U?(0,Q.jsx)(p,{className:`animate-spin`,"aria-hidden":`true`}):void 0,disabled:!s||U,onClick:()=>{ge()},children:`Wake up`}):void 0,pe);if(_e)return _e;let ve=d.kind===`active`&&d.isLocal;if(e&&ve&&i===`backend-unreachable`)return{tone:`error`,title:`Trying to reach Vellum…`,icon:(0,Q.jsx)(ee,{className:`h-4 w-4`,"aria-hidden":`true`}),actions:(0,Q.jsx)(r,{variant:`outlined`,size:`compact`,onClick:a,children:`Retry now`})};let Y=d.kind===`active`&&d.maintenanceMode?.enabled===!0&&(!y||Oe(y));if(b&&!Y&&!F)return{tone:`error`,title:`Assistant status is unavailable`,actions:g?Ge():void 0};let X=y?.state===`unreachable`&&(E||F)?{...y,state:`waking`}:y?.state===`unreachable`&&A?{...y,state:`sleeping`}:y?.state===`crash_loop`&&R?{...y,state:`restarting`}:y,ye=X?.detail_state===`failed`&&X.state===z,Z=Y?ze():ye?null:Ue(X,g,le);return!(y?.state===`maintenance_mode`||Y)||!Z?Z:{...Z,tone:H?`error`:Z.tone,children:H,actions:h?(0,Q.jsx)(r,{variant:`outlined`,size:`compact`,leftIcon:V?(0,Q.jsx)(p,{className:`animate-spin`,"aria-hidden":`true`}):void 0,disabled:V,onClick:()=>{he()},children:`Resume Assistant`}):void 0}}function Ye({className:e,placement:t=C()?`electron`:`web`}){let n=Je();return n?(0,Q.jsx)(qe,{banner:n,className:e,placement:t}):null}var Xe=3e3;function Ze({assistantId:e,currentVersion:t,placement:n=`web`,className:i}){let[a,o]=(0,q.useState)(!1),[c,l]=(0,q.useState)(null),u=D(e=>e.assistantState),d=ie(),f=w.use.activeAssistantId(),ee=E.use.version(),te=N.use.previewChannel(),p=e??f,m=t??ee,g=w(e=>p?e.assistants.find(e=>e.id===p):null),_=g?.cloud===`local`,b=g?.isPlatformHosted===!0&&g?.isLocal===!1,x=g?.runtimeVersion??m??null,re=g?.currentReleaseVersion??m??null,S=_?`local`:b?`platform`:null,{data:C}=De(b?p??null:null),T=S===`local`?x:S===`platform`?re:null,ae=_&&g?.isActiveLockfileAssistant===!0,O=u.kind===`self_hosted`?!u.health||u.health===`healthy`:u.kind===`active`&&u.isLocal?u.reachable!==!1&&(!u.health||u.health===`healthy`):!1,k=!d||d===`healthy`,A=u.kind===`active`&&!u.isLocal&&u.reachable!==!1&&!u.maintenanceMode?.enabled&&(!u.health||u.health===`healthy`)&&(!C||C.state===`active`),j=!!p&&!!T&&!!g?.isLocal&&ae&&O&&k&&ne()||!!p&&!!T&&b&&A,oe=U(g?.releaseChannel,te),{data:P,refetch:F}=s({...ue({query:S===`platform`?{channel:oe}:{stable:!0,limit:100}}),enabled:j,refetchInterval:K,refetchOnReconnect:!0,refetchOnWindowFocus:!0});(0,q.useEffect)(()=>{if(!j)return;let e=()=>{F()},t=[M(`app.resume`,e),M(`power.resume`,e),M(`power.unlock`,e)];return()=>{for(let e of t)e()}},[F,j]);let I=(0,q.useMemo)(()=>S===`platform`?P?.find(e=>e.is_stable!==!1)??P?.[0]:G(P),[S,P])?.version??null,L=p&&I?`${p}:${I}`:null,R=de(T,I),z=pe({assistantId:p,targetVersion:I??void 0}),B=Qe({assistantId:p,targetVersion:I??void 0,shouldStopPolling:C?.detail_state===`failed`}),se=S===`platform`?B.isPending:z.isPending;return(0,q.useEffect)(()=>{if(!p||!I){l(null);return}l(W(p,I)?`${p}:${I}`:null)},[p,I]),!j||!I||!R||L!==null&&L===c||se?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:H(n===`electron`?`px-4 pt-2`:`px-0 pt-0`,i),children:(0,Q.jsx)(Le,{tone:`info`,title:`New assistant version available: ${I}`,placement:n,icon:(0,Q.jsx)(h,{"aria-hidden":`true`}),actions:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(r,{variant:`ghost`,size:`compact`,onClick:()=>o(!0),children:`Update`}),(0,Q.jsx)(`span`,{"aria-hidden":`true`,className:`h-3 w-px bg-[color-mix(in_srgb,var(--status-banner-action-color)_35%,transparent)]`}),(0,Q.jsx)(r,{variant:`ghost`,size:`compact`,onClick:()=>{!p||!I||(fe(p,I),l(`${p}:${I}`))},children:`Later`})]})})}),(0,Q.jsx)(y,{open:a,title:`Update assistant runtime`,message:`Update to version ${I}? The assistant will be briefly unavailable during the update.`,confirmLabel:`Update`,onConfirm:async()=>{if(!(!p||!I||!S)){o(!1);try{if(S===`platform`){let e=await B.upgrade();if(e.detail?.includes(`Already on the latest`)){v.warning(e.detail);return}}else await z.upgrade(),v.success(`Update complete — assistant is healthy.`,{id:`runtime-upgrade-complete`,tone:`strong`});l(`${p}:${I}`)}catch(e){v.error(e instanceof Error?e.message:`Failed to trigger update. Please try again.`)}}},onCancel:()=>o(!1)})]})}function Qe({assistantId:e,targetVersion:t,shouldStopPolling:n=!1}){let r=o(),[i,a]=(0,q.useState)(!1),l=(0,q.useRef)(null),u=c({mutationFn:async()=>{if(!e)throw Error(`No assistant is active.`);let{data:n}=await A({path:{id:e},body:t?{version:t}:{},throwOnError:!0});return n}});return(0,q.useEffect)(()=>{!i||!n||(l.current=null,a(!1))},[i,n]),s({...le({path:{id:e??``}}),enabled:i&&!!e,refetchInterval:e=>{let t=e.state.data?.current_release_version;return t&&l.current&&t===l.current?(queueMicrotask(()=>{e.state.data&&w.getState().upsertFromApi(e.state.data),l.current=null,a(!1),v.success(`Update complete — assistant is healthy.`,{id:`runtime-upgrade-complete`,tone:`strong`})}),!1):Xe}}),{isPending:u.isPending||i,upgrade:async()=>{if(!e)throw Error(`No assistant is active.`);let n=await u.mutateAsync();return n.detail?.includes(`Already on the latest`)||(l.current=n.version??t??null,l.current&&a(!0),r.invalidateQueries({queryKey:V({path:{id:e}})})),n}}}export{he as a,J as i,Ye as n,me as o,_e as r,Ze as t};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
var e=(e,t,n)=>{typeof n==`string`||n instanceof Blob?e.append(t,n):n instanceof Date?e.append(t,n.toISOString()):e.append(t,JSON.stringify(n))},t={bodySerializer:t=>{let n=new FormData;return Object.entries(t).forEach(([t,r])=>{r!=null&&(Array.isArray(r)?r.forEach(r=>e(n,t,r)):e(n,t,r))}),n}},n={bodySerializer:e=>JSON.stringify(e,(e,t)=>typeof t==`bigint`?t.toString():t)};Object.entries({$body_:`body`,$headers_:`headers`,$path_:`path`,$query_:`query`});function r({onRequest:e,onSseError:t,onSseEvent:n,responseTransformer:r,responseValidator:i,sseDefaultRetryDelay:a,sseMaxRetryAttempts:o,sseMaxRetryDelay:s,sseSleepFn:c,url:l,...u}){let d,f=c??(e=>new Promise(t=>setTimeout(t,e)));return{stream:async function*(){let c=a??3e3,p=0,m=u.signal??new AbortController().signal;for(;!m.aborted;){p++;let a=u.headers instanceof Headers?u.headers:new Headers(u.headers);d!==void 0&&a.set(`Last-Event-ID`,d);try{let t={redirect:`follow`,...u,body:u.serializedBody,headers:a,signal:m},o=new Request(l,t);e&&(o=await e(l,t));let s=await(u.fetch??globalThis.fetch)(o);if(!s.ok)throw Error(`SSE failed: ${s.status} ${s.statusText}`);if(!s.body)throw Error(`No body in SSE response`);let f=s.body.pipeThrough(new TextDecoderStream).getReader(),p=``,h=()=>{try{f.cancel()}catch{}};m.addEventListener(`abort`,h);try{for(;;){let{done:e,value:t}=await f.read();if(e)break;p+=t,p=p.replace(/\r\n?/g,`
|
|
2
|
-
`);let a=p.split(`
|
|
3
|
-
|
|
4
|
-
`);p=a.pop()??``;for(let e of a){let t=e.split(`
|
|
5
|
-
`),a=[],o;for(let e of t)if(e.startsWith(`data:`))a.push(e.replace(/^data:\s*/,``));else if(e.startsWith(`event:`))o=e.replace(/^event:\s*/,``);else if(e.startsWith(`id:`))d=e.replace(/^id:\s*/,``);else if(e.startsWith(`retry:`)){let t=Number.parseInt(e.replace(/^retry:\s*/,``),10);Number.isNaN(t)||(c=t)}let s,l=!1;if(a.length){let e=a.join(`
|
|
6
|
-
`);try{s=JSON.parse(e),l=!0}catch{s=e}}l&&(i&&await i(s),r&&(s=await r(s))),n?.({data:s,event:o,id:d,retry:c}),a.length&&(yield s)}}}finally{m.removeEventListener(`abort`,h),f.releaseLock()}break}catch(e){if(t?.(e),o!==void 0&&p>=o)break;await f(Math.min(c*2**(p-1),s??3e4))}}}()}}var i=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},a=e=>{switch(e){case`form`:return`,`;case`pipeDelimited`:return`|`;case`spaceDelimited`:return`%20`;default:return`,`}},o=e=>{switch(e){case`label`:return`.`;case`matrix`:return`;`;case`simple`:return`,`;default:return`&`}},s=({allowReserved:e,explode:t,name:n,style:r,value:o})=>{if(!t){let t=(e?o:o.map(e=>encodeURIComponent(e))).join(a(r));switch(r){case`label`:return`.${t}`;case`matrix`:return`;${n}=${t}`;case`simple`:return t;default:return`${n}=${t}`}}let s=i(r),l=o.map(t=>r===`label`||r===`simple`?e?t:encodeURIComponent(t):c({allowReserved:e,name:n,value:t})).join(s);return r===`label`||r===`matrix`?s+l:l},c=({allowReserved:e,name:t,value:n})=>{if(n==null)return``;if(typeof n==`object`)throw Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},l=({allowReserved:e,explode:t,name:n,style:r,value:i,valueOnly:a})=>{if(i instanceof Date)return a?i.toISOString():`${n}=${i.toISOString()}`;if(r!==`deepObject`&&!t){let t=[];Object.entries(i).forEach(([n,r])=>{t=[...t,n,e?r:encodeURIComponent(r)]});let a=t.join(`,`);switch(r){case`form`:return`${n}=${a}`;case`label`:return`.${a}`;case`matrix`:return`;${n}=${a}`;default:return a}}let s=o(r),l=Object.entries(i).map(([t,i])=>c({allowReserved:e,name:r===`deepObject`?`${n}[${t}]`:t,value:i})).join(s);return r===`label`||r===`matrix`?s+l:l},u=/\{[^{}]+\}/g,d=({path:e,url:t})=>{let n=t,r=t.match(u);if(r)for(let t of r){let r=!1,i=t.substring(1,t.length-1),a=`simple`;i.endsWith(`*`)&&(r=!0,i=i.substring(0,i.length-1)),i.startsWith(`.`)?(i=i.substring(1),a=`label`):i.startsWith(`;`)&&(i=i.substring(1),a=`matrix`);let o=e[i];if(o==null)continue;if(Array.isArray(o)){n=n.replace(t,s({explode:r,name:i,style:a,value:o}));continue}if(typeof o==`object`){n=n.replace(t,l({explode:r,name:i,style:a,value:o,valueOnly:!0}));continue}if(a===`matrix`){n=n.replace(t,`;${c({name:i,value:o})}`);continue}let u=encodeURIComponent(a===`label`?`.${o}`:o);n=n.replace(t,u)}return n},f=({baseUrl:e,path:t,query:n,querySerializer:r,url:i})=>{let a=i.startsWith(`/`)?i:`/${i}`,o=(e??``)+a;t&&(o=d({path:t,url:o}));let s=n?r(n):``;return s.startsWith(`?`)&&(s=s.substring(1)),s&&(o+=`?${s}`),o};function p(e){let t=e.body!==void 0;if(t&&e.bodySerializer)return`serializedBody`in e?e.serializedBody!==void 0&&e.serializedBody!==``?e.serializedBody:null:e.body===``?null:e.body;if(t)return e.body}var m=async(e,t)=>{let n=typeof t==`function`?await t(e):t;if(n)return e.scheme===`bearer`?`Bearer ${n}`:e.scheme===`basic`?`Basic ${btoa(n)}`:n},h=({parameters:e={},...t}={})=>n=>{let r=[];if(n&&typeof n==`object`)for(let i in n){let a=n[i];if(a==null)continue;let o=e[i]||t;if(Array.isArray(a)){let e=s({allowReserved:o.allowReserved,explode:!0,name:i,style:`form`,value:a,...o.array});e&&r.push(e)}else if(typeof a==`object`){let e=l({allowReserved:o.allowReserved,explode:!0,name:i,style:`deepObject`,value:a,...o.object});e&&r.push(e)}else{let e=c({allowReserved:o.allowReserved,name:i,value:a});e&&r.push(e)}}return r.join(`&`)},ee=e=>{if(!e)return`stream`;let t=e.split(`;`)[0]?.trim();if(t){if(t.startsWith(`application/json`)||t.endsWith(`+json`))return`json`;if(t===`multipart/form-data`)return`formData`;if([`application/`,`audio/`,`image/`,`video/`].some(e=>t.startsWith(e)))return`blob`;if(t.startsWith(`text/`))return`text`}},g=(e,t)=>t?!!(e.headers.has(t)||e.query?.[t]||e.headers.get(`Cookie`)?.includes(`${t}=`)):!1,te=async({security:e,...t})=>{for(let n of e){if(g(t,n.name))continue;let e=await m(n,t.auth);if(!e)continue;let r=n.name??`Authorization`;switch(n.in){case`query`:t.query||={},t.query[r]=e;break;case`cookie`:t.headers.append(`Cookie`,`${r}=${e}`);break;default:t.headers.set(r,e);break}}},_=e=>f({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer==`function`?e.querySerializer:h(e.querySerializer),url:e.url}),v=(e,t)=>{let n={...e,...t};return n.baseUrl?.endsWith(`/`)&&(n.baseUrl=n.baseUrl.substring(0,n.baseUrl.length-1)),n.headers=b(e.headers,t.headers),n},y=e=>{let t=[];return e.forEach((e,n)=>{t.push([n,e])}),t},b=(...e)=>{let t=new Headers;for(let n of e){if(!n)continue;let e=n instanceof Headers?y(n):Object.entries(n);for(let[n,r]of e)if(r===null)t.delete(n);else if(Array.isArray(r))for(let e of r)t.append(n,e);else r!==void 0&&t.set(n,typeof r==`object`?JSON.stringify(r):r)}return t},x=class{fns=[];clear(){this.fns=[]}eject(e){let t=this.getInterceptorIndex(e);this.fns[t]&&(this.fns[t]=null)}exists(e){let t=this.getInterceptorIndex(e);return!!this.fns[t]}getInterceptorIndex(e){return typeof e==`number`?this.fns[e]?e:-1:this.fns.indexOf(e)}update(e,t){let n=this.getInterceptorIndex(e);return this.fns[n]?(this.fns[n]=t,e):!1}use(e){return this.fns.push(e),this.fns.length-1}},S=()=>({error:new x,request:new x,response:new x}),C=h({allowReserved:!1,array:{explode:!0,style:`form`},object:{explode:!0,style:`deepObject`}}),w={"Content-Type":`application/json`},T=(e={})=>({...n,headers:w,parseAs:`auto`,querySerializer:C,...e}),E=((e={})=>{let t=v(T(),e),n=()=>({...t}),i=e=>(t=v(t,e),n()),a=S(),o=async e=>{let n={...t,...e,fetch:e.fetch??t.fetch??globalThis.fetch,headers:b(t.headers,e.headers),serializedBody:void 0};n.security&&await te({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body!==void 0&&n.bodySerializer&&(n.serializedBody=n.bodySerializer(n.body)),(n.body===void 0||n.serializedBody===``)&&n.headers.delete(`Content-Type`);let r=n;return{opts:r,url:_(r)}},s=async e=>{let n=e.throwOnError??t.throwOnError,r=e.responseStyle??t.responseStyle,i,s;try{let{opts:t,url:n}=await o(e),r={redirect:`follow`,...t,body:p(t)};i=new Request(n,r);for(let e of a.request.fns)e&&(i=await e(i,t));let c=t.fetch;s=await c(i);for(let e of a.response.fns)e&&(s=await e(s,i,t));let l={request:i,response:s};if(s.ok){let e=(t.parseAs===`auto`?ee(s.headers.get(`Content-Type`)):t.parseAs)??`json`;if(s.status===204||s.headers.get(`Content-Length`)===`0`){let n;switch(e){case`arrayBuffer`:case`blob`:case`text`:n=await s[e]();break;case`formData`:n=new FormData;break;case`stream`:n=s.body;break;default:n={};break}return t.responseStyle===`data`?n:{data:n,...l}}let n;switch(e){case`arrayBuffer`:case`blob`:case`formData`:case`text`:n=await s[e]();break;case`json`:{let e=await s.text();n=e?JSON.parse(e):{};break}case`stream`:return t.responseStyle===`data`?s.body:{data:s.body,...l}}return e===`json`&&(t.responseValidator&&await t.responseValidator(n),t.responseTransformer&&(n=await t.responseTransformer(n))),t.responseStyle===`data`?n:{data:n,...l}}let u=await s.text(),d;try{d=JSON.parse(u)}catch{}throw d??u}catch(t){let o=t;for(let t of a.error.fns)t&&(o=await t(o,s,i,e));if(o||={},n)throw o;return r===`data`?void 0:{error:o,request:i,response:s}}},c=e=>t=>s({...t,method:e}),l=e=>async t=>{let{opts:n,url:i}=await o(t);return r({...n,body:n.body,method:e,onRequest:async(e,t)=>{let r=new Request(e,t);for(let e of a.request.fns)e&&(r=await e(r,n));return r},serializedBody:p(n),url:i})};return{buildUrl:e=>_({...t,...e}),connect:c(`CONNECT`),delete:c(`DELETE`),get:c(`GET`),getConfig:n,head:c(`HEAD`),interceptors:a,options:c(`OPTIONS`),patch:c(`PATCH`),post:c(`POST`),put:c(`PUT`),request:s,setConfig:i,sse:{connect:l(`CONNECT`),delete:l(`DELETE`),get:l(`GET`),head:l(`HEAD`),options:l(`OPTIONS`),patch:l(`PATCH`),post:l(`POST`),put:l(`PUT`),trace:l(`TRACE`)},trace:c(`TRACE`)}})(T()),D=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/apps`,...e}),O=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/apps/{id}/delete`,...e}),k=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/apps/{id}/open`,...e}),A=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/apps/{id}/publish`,...e}),j=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/apps/{id}/publish-status`,...e}),M=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/apps/{id}/share-cloud`,...e}),N=e=>(e.client??E).post({bodySerializer:null,url:`/v1/assistants/{assistant_id}/apps/import-bundle`,...e,headers:{"Content-Type":`application/octet-stream`,...e.headers}}),P=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/apps/shared/{token}`,...e}),F=e=>(e.client??E).post({...t,url:`/v1/assistants/{assistant_id}/attachments`,...e,headers:{"Content-Type":null,...e.headers}}),I=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/attachments/{id}/content`,...e}),L=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/avatar/character-components`,...e}),R=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/avatar/image`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),z=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/avatar/render-from-traits`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),B=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/avatar/state`,...e}),V=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/background-tools`,...e}),H=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/background-tools/cancel`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),U=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/backups`,...e}),W=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/backups/create`,...e}),G=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/backups/restore`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),K=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/bookmarks`,...e}),q=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/bookmarks`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),J=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/bookmarks/by-message/{messageId}`,...e}),Y=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/channels/available`,...e}),X=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/channels/readiness`,...e}),Z=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/config`,...e}),Q=e=>(e.client??E).patch({url:`/v1/assistants/{assistant_id}/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ne=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/config/llm/call-sites`,...e}),re=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/config/llm/default-provider`,...e}),ie=e=>(e.client??E).put({url:`/v1/assistants/{assistant_id}/config/llm/default-provider`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ae=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/config/llm/profiles`,...e}),oe=e=>(e.client??E).put({url:`/v1/assistants/{assistant_id}/config/llm/profiles/{name}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),se=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/confirm`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ce=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/consolidation/config`,...e}),le=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/consolidation/run-now`,...e}),ue=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/consolidation/runs`,...e}),de=e=>(e.client??E).patch({url:`/v1/assistants/{assistant_id}/contact-channels/{contactChannelId}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),fe=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/contacts`,...e}),pe=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/contacts/merge`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),me=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/conversation-starters`,...e}),he=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/conversations`,...e}),ge=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),_e=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/{conversationId}/slack-channel/resolve`,...e}),ve=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/conversations/{id}`,...e}),ye=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/archive`,...e}),be=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/cancel`,...e}),xe=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/conversations/{id}/compaction`,...e}),Se=e=>(e.client??E).put({url:`/v1/assistants/{assistant_id}/conversations/{id}/inference-profile`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ce=e=>(e.client??E).patch({url:`/v1/assistants/{assistant_id}/conversations/{id}/name`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),we=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/retry`,...e}),Te=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/slash`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ee=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/surface`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),De=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/unarchive`,...e}),Oe=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/{id}/undo`,...e}),ke=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/archive/bulk`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ae=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/fork`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),je=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/conversations/llm-context`,...e}),Me=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/reorder`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ne=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/seen`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Pe=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/seen/bulk`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Fe=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/summarize`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ie=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/conversations/unread`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Le=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/credentials/delete`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Re=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/credentials/inspect`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ze=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/credentials/list`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Be=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/credentials/reveal`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ve=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/credentials/set`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),He=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/dictation`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ue=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/disk-pressure/acknowledge`,...e}),We=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/disk-pressure/status`,...e}),Ge=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/documents`,...e}),Ke=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/documents`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),qe=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/documents/{id}`,...e}),Je=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/documents/{id}/comments`,...e}),Ye=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/documents/{id}/comments`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Xe=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/documents/{id}/comments/{commentId}`,...e}),Ze=e=>(e.client??E).patch({url:`/v1/assistants/{assistant_id}/documents/{id}/comments/{commentId}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Qe=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/documents/{id}/conversations`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),$e=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/documents/{id}/pdf`,...e}),et=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/documents/for-workspace-file`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),tt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/events/tail`,...e}),nt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/groups`,...e}),rt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/groups`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),it=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/groups/{groupId}`,...e}),at=e=>(e.client??E).patch({url:`/v1/assistants/{assistant_id}/groups/{groupId}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ot=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/healthz`,...e}),st=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/heartbeat/config`,...e}),ct=e=>(e.client??E).put({url:`/v1/assistants/{assistant_id}/heartbeat/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),lt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/heartbeat/run-now`,...e}),ut=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/heartbeat/runs`,...e}),dt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/home/feed`,...e}),ft=e=>(e.client??E).patch({url:`/v1/assistants/{assistant_id}/home/feed/{id}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),pt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/home/feed/{id}/actions/{actionId}`,...e}),mt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/home/feed/mark-all`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ht=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/home/state`,...e}),gt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/identity`,...e}),_t=e=>(e.client??E).put({url:`/v1/assistants/{assistant_id}/inference/active-profile`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),vt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/inference/chatgpt-subscription/auth`,...e}),yt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/inference/chatgpt-subscription/auth/exchange`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),bt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/inference/profiles`,...e}),xt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/inference/provider-connections`,...e}),St=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/inference/provider-connections`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ct=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/inference/provider-connections/{name}`,...e}),wt=e=>(e.client??E).patch({url:`/v1/assistants/{assistant_id}/inference/provider-connections/{name}`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Tt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/integrations/a2a/invite`,...e}),Et=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/integrations/slack/channel/config`,...e}),Dt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/integrations/slack/channel/config`,...e}),Ot=e=>(e.client??E).patch({url:`/v1/assistants/{assistant_id}/integrations/slack/channel/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),kt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/integrations/slack/channel/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),At=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/integrations/telegram/config`,...e}),jt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/integrations/telegram/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Mt=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/integrations/twilio/credentials`,...e}),Nt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/integrations/twilio/credentials`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Pt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/integrations/vercel/config`,...e}),Ft=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/integrations/vercel/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),It=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/live-voice/preflight`,...e}),Lt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/llm-request-logs/{id}/context`,...e}),Rt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/llm-request-logs/{id}/payload`,...e}),zt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/logs/export`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Bt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/memory-graph`,...e}),Vt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/memory-graph-node`,...e}),Ht=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/memory/remember`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ut=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/memory/stats`,...e}),Wt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/memory/v2/concept-page`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Gt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/memory/v2/now-text`,...e}),Kt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/memory/v2/router-prompt-template`,...e}),qt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/memory/v2/simulate-router`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Jt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/memory/worker/start`,...e}),Yt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/memory/worker/status`,...e}),Xt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/memory/worker/stop`,...e}),Zt=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/messages`,...e}),Qt=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/messages`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),$t=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/messages/{id}/llm-context`,...e}),en=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/messages/queued/{id}`,...e}),tn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/messages/queued/{id}/steer`,...e}),nn=e=>(e.client??E).put({url:`/v1/assistants/{assistant_id}/model/image-gen`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),rn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/notification-intent-result`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),an=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/oauth/apps`,...e}),on=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/oauth/apps`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),sn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/oauth/apps/{appId}/connect`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),cn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/oauth/apps/{appId}/connections`,...e}),ln=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/oauth/apps/{id}`,...e}),un=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/oauth/connections/{id}`,...e}),dn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/oauth/providers`,...e}),fn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/oauth/providers/{providerKey}`,...e}),pn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/onboarding/checkin`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),mn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/pending-interactions`,...e}),hn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/plugins`,...e}),gn=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/plugins/{name}`,...e}),_n=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/plugins/{name}`,...e}),vn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/plugins/{name}/disable`,...e}),yn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/plugins/{name}/enable`,...e}),bn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/plugins/{name}/icon`,...e}),xn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/plugins/{name}/inspect`,...e}),Sn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/plugins/{name}/upgrade`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Cn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/plugins/install`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),wn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/plugins/search`,...e}),Tn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/question-response`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),En=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/retrospective/config`,...e}),Dn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/retrospective/runs`,...e}),On=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/schedules`,...e}),kn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/schedules`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),An=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/schedules/{id}`,...e}),jn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/schedules/{id}/run`,...e}),Mn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/schedules/{id}/runs`,...e}),Nn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/schedules/{id}/toggle`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Pn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/schedules/usage-summary`,...e}),Fn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/search/global`,...e}),In=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/secret`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Ln=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/secrets`,...e}),Rn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/secrets`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),zn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/secrets/read`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Bn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/skills`,...e}),Vn=e=>(e.client??E).delete({url:`/v1/assistants/{assistant_id}/skills/{id}`,...e}),Hn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/skills/{id}`,...e}),Un=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/skills/{id}/files`,...e}),Wn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/skills/{id}/files/content`,...e}),Gn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/skills/categories`,...e}),Kn=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/skills/install`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),qn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/slack/channels`,...e}),Jn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/slack/users`,...e}),Yn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/sounds/available`,...e}),Xn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/sounds/config`,...e}),Zn=e=>(e.client??E).put({url:`/v1/assistants/{assistant_id}/sounds/config`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),Qn=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/stt/providers`,...e}),$n=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/stt/transcribe`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),er=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/subagents/{id}`,...e}),$=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/subagents/{id}/abort`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),tr=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/subagents/reconcile`,...e}),nr=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/suggestion`,...e}),rr=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/surface-actions`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),ir=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/surfaces/{surfaceId}`,...e}),ar=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/telemetry/ingest`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),or=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/tts/managed-voices`,...e}),sr=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/tts/providers`,...e}),cr=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/usage/breakdown`,...e}),lr=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/usage/daily`,...e}),ur=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/usage/series`,...e}),dr=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/usage/totals`,...e}),fr=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/workflows/runs/{id}`,...e}),pr=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/workflows/runs/{id}/abort`,...e}),mr=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/workflows/runs/{id}/journal`,...e}),hr=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/workspace/delete`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),gr=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/workspace/file`,...e}),_r=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/workspace/file/content`,...e}),vr=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/workspace/mkdir`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),yr=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/workspace/rename`,...e,headers:{"Content-Type":`application/json`,...e.headers}}),br=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/workspace/theme`,...e}),xr=e=>(e.client??E).get({url:`/v1/assistants/{assistant_id}/workspace/tree`,...e}),Sr=e=>(e.client??E).post({url:`/v1/assistants/{assistant_id}/workspace/write`,...e,headers:{"Content-Type":`application/json`,...e.headers}});export{he as $,jn as $n,Ot as $t,ae as A,cn as An,ar as Ar,rt as At,_e as B,vn as Bn,hr as Br,ht as Bt,Y as C,Zt as Cn,$n as Cr,et as Ct,re as D,nn as Dn,nr as Dr,it as Dt,ne as E,tn as En,tr as Er,tt as Et,ue as F,fn as Fn,ur as Fr,ut as Ft,Se as G,Sn as Gn,br as Gr,bt as Gt,be as H,_n as Hn,gr as Hr,_t as Ht,de as I,dn as In,dr as Ir,pt as It,Te as J,wn as Jn,E as Jr,xt as Jt,Ce as K,hn as Kn,xr as Kr,Ct as Kt,fe as L,pn as Ln,pr as Lr,ft as Lt,se as M,an as Mn,sr as Mr,st as Mt,ce as N,on as Nn,cr as Nr,ct as Nt,ie as O,rn as On,rr as Or,at as Ot,le as P,un as Pn,lr as Pr,lt as Pt,Ae as Q,An as Qn,Dt as Qt,pe as R,mn as Rn,fr as Rr,dt as Rt,q as S,$t as Sn,Qn as Sr,$e as St,Z as T,en as Tn,er as Tr,Ke as Tt,xe as U,bn as Un,vr as Ur,yt as Ut,ye as V,yn as Vn,_r as Vr,gt as Vt,ve as W,xn as Wn,yr as Wr,vt as Wt,De as X,En as Xn,Tt as Xt,Ee as Y,Tn as Yn,St as Yt,Oe as Z,Dn as Zn,Et as Zt,W as _,Jt as _n,qn as _r,Ze as _t,M as a,Pt as an,Fn as ar,Fe as at,J as b,Bt as bn,Xn as br,Qe as bt,P as c,Lt as cn,Rn as cr,Le as ct,L as d,Ht as dn,Wn as dr,Be as dt,kt as en,Mn as er,je as et,R as f,Ut as fn,Un as fr,Ve as ft,V as g,qt as gn,Kn as gr,Xe as gt,H as h,Kt as hn,Bn as hr,We as ht,j as i,Nt as in,Pn as ir,Ne as it,Q as j,ln as jn,or as jr,ot as jt,oe as k,sn as kn,ir as kr,nt as kt,I as l,Rt as ln,zn as lr,Re as lt,B as m,Gt as mn,Gn as mr,Ue as mt,k as n,jt as nn,On as nr,Me as nt,D as o,Ft as on,In as or,Ie as ot,z as p,Wt as pn,Hn as pr,He as pt,we as q,Cn as qn,Sr as qr,wt as qt,A as r,Mt as rn,kn as rr,Pe as rt,N as s,It as sn,Ln as sr,me as st,O as t,At as tn,Nn as tr,ge as tt,F as u,zt as un,Vn as ur,ze as ut,U as v,Yt as vn,Jn as vr,Je as vt,X as w,Qt as wn,$ as wr,Ge as wt,K as x,Vt as xn,Zn as xr,qe as xt,G as y,Xt as yn,Yn as yr,Ye as yt,ke as z,gn as zn,mr as zr,mt as zt};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{l as n,r,u as i}from"./chunk-5KNZJZUH-Bsoom5--.js";import{t as a}from"./jsx-runtime-D3ZM-ToX.js";import{t as o}from"./use-supports-bookmarks-DYxpaoa_.js";import{t as s}from"./log-in-Cg4GMoQN.js";import{t as c}from"./log-out-DQCZkz7J.js";import{n as l}from"./resolved-assistants-store-CcfVZNkg.js";import{i as u}from"./auth-store-344lpSdW.js";import{d}from"./routes-gT_HcUb1.js";import{f}from"./platform-detection-C5Xt8-QJ.js";import{i as p}from"./use-platform-gate-eiz8Kj6G.js";import{r as m,t as h}from"./settings-navigation-CjPoGbpD.js";import{t as g}from"./use-onboarding-login-jt_ejqRb.js";import{t as _}from"./assistant-feature-flag-store-Bpiyb3UO.js";import{n as v,t as y}from"./sidebar-tree-DqCdhWH0.js";import{t as b}from"./use-supports-credentials-settings-DAFFDbZ4.js";var x=e(t(),1),S=a();function C(){let e=_.use.settingsDeveloperNav(),t=f(),a=l.use.activeAssistantId(),C=o(a),w=b(a),T=p()===`full`?`Billing & Usage`:`Usage`,{pathname:E}=n(),D=i(),O=u(),{login:k}=g(),A=(0,x.useMemo)(()=>h.filter(e=>!(e.id===`notifications`&&!t||e.id===`bookmarks`&&!C||e.id===`credentials`&&!w||e.id===`developer`)).map(e=>e.id===`billing`?{...e,label:T}:e),[t,C,w,T]),j=(0,x.useMemo)(()=>{let t=[];return e&&t.push(...h.filter(e=>e.id===`developer`)),t.push(O?{id:`logout`,label:`Log Out`,icon:c,onSelect:()=>void m(D)}:{id:`login`,label:`Log In`,icon:s,onSelect:()=>void k()}),t},[e,O,D,k]),M=(0,x.useMemo)(()=>{if(E===d.settings.root)return`Settings`;let e=h.find(e=>E===e.href||E.startsWith(e.href+`/`));return e?e.id===`billing`?T:e.label:`Settings`},[E,T]);return(0,S.jsx)(v,{backHref:d.assistant,sidebar:(0,S.jsx)(y,{items:A,bottomItems:j,indexPath:d.settings.root}),title:M,children:(0,S.jsx)(r,{})})}export{C as SettingsLayout};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./bell-AcmAnzRp.js";import{n as t}from"./use-supports-bookmarks-DYxpaoa_.js";import{t as n}from"./bug-Bbtz2Ob2.js";import{t as r}from"./chart-column-Dhrv2ghB.js";import{t as i}from"./code-DoyWcW4T.js";import{t as a}from"./cpu-D69Rp7jS.js";import{t as o}from"./key-round-DwjCZmHI.js";import{t as s}from"./mic-Bn8p7xSE.js";import{t as c}from"./puzzle-j1BAxwgg.js";import{t as l}from"./shield-check-DUUzbZCV.js";import{t as u}from"./sliders-horizontal-BFh0fJDm.js";import{t as d}from"./users-CsTFUtqE.js";import{t as f}from"./volume-2-BwDvcvzG.js";import{m as p,n as m,p as h}from"./local-mode-BsyhpYyk.js";import{t as g}from"./is-electron-Djuya72b.js";import{n as _}from"./auth-store-344lpSdW.js";import{g as v}from"./native-biometric-CbCUFdjC.js";import{d as y}from"./routes-gT_HcUb1.js";import"./navigation-resolver-y9MHLxam.js";import"./build-state-GJ6TT3dL.js";import{t as b}from"./hard-navigate-9vglJJTR.js";function x(){return p()?y.welcome:y.onboarding.privacy}function S(e){g()&&window.vellum?.identity?.setName(e)}async function C(e){if(p()){let t=m();if(t&&h(t)){await v(!1),_.setState({platformSession:`absent`});return}await v(!1),await _.getState().logout(),e(x())}else await _.getState().logout(),S(``),b(y.account.login)}var w=[{id:`assistant-status`,label:`General`,href:y.settings.general,icon:u},{id:`model`,label:`Models & Services`,href:y.settings.ai,icon:a},{id:`integrations`,label:`Integrations`,href:y.settings.integrations,icon:c},{id:`credentials`,label:`Credentials`,href:y.settings.credentials,icon:o},{id:`notifications`,label:`Notifications`,href:y.settings.notifications,icon:e},{id:`voice`,label:`Voice`,href:y.settings.voice,icon:s},{id:`sounds`,label:`Sounds`,href:y.settings.sounds,icon:f},{id:`privacy`,label:`Permissions & Privacy`,href:y.settings.privacy,icon:l},{id:`bookmarks`,label:`Bookmarks`,href:y.settings.bookmarks,icon:t},{id:`billing`,label:`Usage`,href:y.settings.usage,icon:r},{id:`community`,label:`Community`,href:y.settings.community,icon:d},{id:`debug`,label:`Debug`,href:y.settings.debug,icon:n},{id:`developer`,label:`Developer`,href:y.settings.developer,icon:i}],T={developer:`debug`,advanced:`debug`,model:`model`,privacy:`privacy`,security:`assistant-status`,"voice & sounds":`voice`,"voice and sounds":`voice`,devices:`assistant-status`,"self-hosted assistants":`assistant-status`},E={"keyboard-shortcuts":`${y.settings.general}?preferences=open`,"keyboard shortcuts":`${y.settings.general}?preferences=open`,services:y.settings.ai,"text-to-speech":y.settings.ai,"speech-to-text":y.settings.ai,archive:`${y.settings.debug}?tab=archive`,billing:y.settings.usageBilling,"billing & usage":y.settings.usageBilling,usage:`${y.settings.usage}?tab=usage`};function D(e){return e.trim().toLowerCase()}function O(e){let t=D(e),n=E[t];if(n)return n;let r=T[t];if(r){let e=w.find(e=>e.id===r);if(e)return e.href}return w.find(e=>D(e.label)===t||e.id===t)?.href??null}export{S as i,O as n,C as r,w as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{t as n}from"./jsx-runtime-D3ZM-ToX.js";import{f as r}from"./native-biometric-CbCUFdjC.js";import{n as i,r as a}from"./login-flow-BNaCTXwB.js";import{t as o}from"./proxy-CJDjUn7E.js";import{t as s}from"./AnimatePresence-DWbwz63e.js";import{t as c}from"./apple-logo-_x2VgiOh.js";import{n as l,t as u}from"./use-return-to-short-circuit-BFgPJjCM.js";import{t as d}from"./signup-shell-DQoX-73u.js";var f=e(t(),1),p=n();function m({words:e}){let[t,n]=(0,f.useState)(0),r=(0,f.useMemo)(()=>e.reduce((e,t)=>e.length>=t.length?e:t),[e]);return(0,f.useEffect)(()=>{let t=setInterval(()=>{n(t=>(t+1)%e.length)},2400);return()=>clearInterval(t)},[e.length]),(0,p.jsxs)(`span`,{className:`signup__rotating`,children:[(0,p.jsxs)(`span`,{className:`signup__rotating-sizer`,"aria-hidden":!0,children:[r,`.`]}),(0,p.jsx)(s,{mode:`wait`,children:(0,p.jsxs)(o.em,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},exit:{opacity:0,y:-16},transition:{duration:.3,ease:`easeInOut`},children:[e[t],`.`]},e[t])})]})}var h=[`Personal Intelligence`,`Software Engineer`,`Finance Ops`,`Household Manager`,`GTM Engineer`,`Product Lead`];function g({returnTo:e}){let[t,n]=(0,f.useState)(null),o=a(e,{authIntent:`signup`});return(0,p.jsxs)(d,{children:[(0,p.jsxs)(`h1`,{className:`signup__title`,children:[`Meet your new`,(0,p.jsx)(`br`,{}),(0,p.jsx)(m,{words:h})]}),(0,p.jsx)(`p`,{className:`signup__subtitle`,children:`The most powerful assistant that can handle your work and life admin tasks.`}),(0,p.jsx)(`div`,{className:`signup__buttons`,children:(0,p.jsx)(`button`,{type:`button`,className:`signup__btn`,onClick:()=>{n(null),r(i,o,{returnTo:e,intent:`signup`}).catch(e=>{console.error(`[signup] auth flow failed:`,e),n(`Something went wrong. Please try again.`)})},children:`Continue`})}),t&&(0,p.jsx)(`p`,{className:`signup__error`,children:t}),(0,p.jsxs)(`p`,{className:`signup__footer`,children:[`Already have an account?`,` `,(0,p.jsx)(`button`,{type:`button`,className:`signup__link`,onClick:()=>{n(null),r(i,a(e),{returnTo:e}).catch(e=>{console.error(`[signup] sign-in flow failed:`,e),n(`Something went wrong. Please try again.`)})},children:`Sign in`})]}),(0,p.jsxs)(`a`,{className:`signup__download`,href:`/downloads`,children:[(0,p.jsx)(c,{size:16}),`Download for macOS`]})]})}function _(){let e=u();return e.kind===`wait`?(0,p.jsx)(d,{children:(0,p.jsx)(l,{})}):e.kind===`redirect`?e.node:(0,p.jsx)(g,{returnTo:e.returnTo})}export{_ as SignupPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{s as t,t as n}from"./local-settings-Bx7FsNo5.js";import{t as r}from"./react-BFJW0bSv.js";import{W as i,t as a}from"./button-DWxxMNqc.js";import{l as o,m as s,u as c}from"./chunk-5KNZJZUH-Bsoom5--.js";import{n as l}from"./QueryClientProvider-CMu7CkQU.js";import{t as u}from"./useQuery-Bz-fbQ-m.js";import{t as d}from"./useMutation-CXGTrp4W.js";import{t as f}from"./jsx-runtime-D3ZM-ToX.js";import{t as p}from"./card-q0GJX1HZ.js";import{t as m}from"./createLucideIcon-C1mdGPB9.js";import{t as h}from"./arrow-down-to-line-DmG4pLoU.js";import{t as g}from"./arrow-left-BikDV6F2.js";import{a as _,i as v,n as y,o as b,r as x,s as S,t as ee}from"./use-skill-actions-BkMRz2kV.js";import{t as C}from"./brain-DPCFa4t_.js";import{t as w}from"./calendar-C5r4HzTL.js";import{t as te}from"./check-DRqtWHWc.js";import{i as T,n as E,r as ne,t as re}from"./invalidate-plugin-queries-8-nVuyT-.js";import{t as D}from"./circle-check-big-DYlsR-nv.js";import{t as ie}from"./cloud-off-CNsmAfgy.js";import{t as ae}from"./code-DoyWcW4T.js";import{I as O,N as k}from"./src-CqJTlX1y.js";import{t as A}from"./download-4D3U4xXO.js";import{t as oe}from"./external-link-oGdSxU8S.js";import{t as j}from"./globe-DN9GN4I5.js";import{t as se}from"./hard-drive-CMtjuH7I.js";import{t as ce}from"./heart-Ccmw6M7x.js";import{t as M}from"./layout-grid-CkEwTukn.js";import{t as le}from"./link-2-DeNtOuO4.js";import{t as N}from"./loader-circle-D7A_UeUb.js";import{t as ue}from"./mail-CgnilCq4.js";import{t as de}from"./message-circle-BQPQp-gO.js";import{t as fe}from"./mic-Bn8p7xSE.js";import{t as P}from"./puzzle-j1BAxwgg.js";import{t as pe}from"./search-DZBQ2Z4C.js";import{t as F}from"./settings-DexiwiWn.js";import{t as me}from"./sparkles-D4vo9pIw.js";import{t as he}from"./terminal-CS0VBw1f.js";import{t as I}from"./trash-2-CCIeETW1.js";import{t as ge}from"./triangle-alert-CuEUegtS.js";import{t as _e}from"./user-pW2z0-8i.js";import{t as ve}from"./x-CAGZWET-.js";import{n as L,t as ye}from"./installed-plugins-query-DqNOfIzB.js";import{t as R}from"./tag-D1UeSlPe.js";import{t as be}from"./popover-BdpFLBqi.js";import{t as xe}from"./input-DF52UqKH.js";import{t as Se}from"./toggle-g8KBdUmy.js";import{n as z}from"./toast-DFRsyumK.js";import{t as Ce}from"./confirm-dialog-CsxDM9Vd.js";import{t as we}from"./file-markdown-TUJclkdj.js";import{t as Te}from"./assistant-identity-store-Dk3c04VV.js";import{i as B}from"./utils-CPWCnpba.js";import{Bn as Ee,Kn as De,Un as Oe,Vn as ke}from"./sdk.gen-CsUgJyBR.js";import{d as Ae}from"./routes-gT_HcUb1.js";import{Ct as je,at as Me,cn as Ne,ln as Pe,lt as V,sn as Fe,st as H,ut as Ie,wt as Le}from"./react-query.gen-D0Q5L-je.js";import{n as Re}from"./use-is-mobile-BZEx6kJ_.js";import{t as U}from"./misc-DkLRKNc9.js";import{t as ze}from"./plugins-surface-CSW8ge7J.js";import{t as Be}from"./use-active-assistant-id-BF7k_8wM.js";import{n as Ve,r as He}from"./skills-CobQEp0Y.js";var Ue=m(`funnel`,[[`path`,{d:`M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z`,key:`sc7q7i`}]]),W=e(r(),1),G=f(),We={sm:`h-7 w-7`,md:`h-8 w-8 text-3xl`};function K({external:e=!1,icon:t,iconSrc:n,size:r=`sm`,className:i}){let[a,o]=(0,W.useState)(!1);(0,W.useEffect)(()=>{o(!1)},[n]);let s=t||(e?`📦`:`🧩`),c=!!n&&!a;return(0,G.jsx)(`span`,{className:U(`flex shrink-0 items-center justify-center`,We[r],i),children:c?(0,G.jsx)(`img`,{src:n,alt:``,"aria-hidden":!0,loading:`lazy`,className:`h-full w-full object-contain`,onError:()=>o(!0)}):s})}var Ge=e=>`Remove "${e}" from this assistant?`,Ke=e=>`"${e}" has local edits that will be overwritten by the upgrade. Continue?`,qe=`Upgrade anyway`,Je=`Failed to install plugin. Please try again.`,Ye=`Failed to remove plugin. Please try again.`,Xe=`Failed to upgrade plugin. Please try again.`,Ze=`Failed to update plugin. Please try again.`;function Qe(e,t){let n=e.map(e=>({name:e.name,description:e.description??void 0,status:`installed`,external:void 0,version:e.version??void 0,path:e.path,issues:e.issues,enabled:e.enabled,icon:e.icon,hasIcon:e.hasIcon,iconVersion:e.iconVersion})),r=new Set(n.map(e=>e.name)),i=t.filter(e=>!r.has(e.name)).map(e=>({name:e.name,description:e.description,status:`available`,external:!0,path:e.path}));return[...n,...i]}function $e(e,t){let n=t.trim().toLowerCase();return n?[e.name,e.description].some(e=>e?.toLowerCase().includes(n)):!0}function et(e){return[...e].sort((e,t)=>{let n=e.status===`installed`;return n===(t.status===`installed`)?e.name.localeCompare(t.name,void 0,{sensitivity:`base`}):n?-1:1})}function tt(e,t){switch(t){case`all`:return e;case`available`:return e.filter(e=>e.status===`available`);case`installed`:return e.filter(e=>e.status===`installed`);case`active`:return e.filter(e=>e.status===`installed`&&e.enabled!==!1);case`off`:return e.filter(e=>e.status===`installed`&&e.enabled===!1)}}function nt(e){return e?e.slice(0,7):`unknown`}function q({plugin:e,surfaces:t=null,className:n}){let r=[{label:`Source`,value:e.source?.kind===`github`?e.source.repo:`Local`,href:(e.source?.kind===`github`?`https://github.com/${e.source.repo}`:null)??void 0}];return e.homepage&&r.push({label:`Homepage`,value:e.homepage,href:e.homepage}),e.license&&r.push({label:`License`,value:e.license}),t&&(t.skills.length>0&&r.push({label:`Skills`,value:String(t.skills.length)}),t.hooks.length>0&&r.push({label:`Hooks`,value:String(t.hooks.length)}),t.tools.length>0&&r.push({label:`Tools`,value:String(t.tools.length)})),(0,G.jsx)(`dl`,{className:U(`mb-5 grid gap-x-6 gap-y-2 border-b pb-5 sm:grid-cols-[max-content_1fr]`,n),style:{borderColor:`var(--border-base)`},children:r.map(e=>(0,G.jsxs)(`div`,{className:`contents`,children:[(0,G.jsx)(`dt`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:e.label}),(0,G.jsx)(`dd`,{className:`min-w-0 truncate text-body-small-default`,style:{color:`var(--content-secondary)`},children:e.href?(0,G.jsxs)(`a`,{href:e.href,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 underline`,style:{color:`var(--primary-base, #60a5fa)`},children:[e.value,(0,G.jsx)(oe,{className:`h-3 w-3`,"aria-hidden":!0})]}):e.value})]},e.label))})}function rt({plugin:e,drift:t,onInstall:n,onRemove:r,onUpgrade:i,isInstalling:o,isRemoving:s,isUpgrading:c,hasLocalEdits:l,enabled:u,onToggle:d,isToggling:f}){let[p,m]=(0,W.useState)(!1),[g,_]=(0,W.useState)(!1),v=e.installed??!1,y=e.artifact??null,b=t?.status===`update-available`,x=b?`Upgrade ${nt(t?.local?.commit??null)} → ${nt(t?.remote?.commit??null)}`:void 0;return(0,G.jsxs)(G.Fragment,{children:[v?(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 md:flex-nowrap md:shrink-0`,children:[u!==void 0&&d?(0,G.jsx)(Se,{label:`Auto-include in chat`,checked:u,onChange:()=>d(),disabled:f}):null,y?(0,G.jsx)(a,{asChild:!0,leftIcon:(0,G.jsx)(A,{"aria-hidden":!0}),children:(0,G.jsx)(`a`,{href:y.url,download:!0,children:y.label??`Download`})}):null,b?(0,G.jsx)(a,{type:`button`,onClick:()=>{if(l){_(!0);return}i()},disabled:c,title:x,leftIcon:c?(0,G.jsx)(N,{className:`animate-spin`,"aria-hidden":!0}):(0,G.jsx)(T,{"aria-hidden":!0}),children:`Upgrade`}):null,(0,G.jsx)(a,{type:`button`,variant:`dangerOutline`,onClick:()=>m(!0),disabled:s,leftIcon:s?(0,G.jsx)(N,{className:`animate-spin`,"aria-hidden":!0}):(0,G.jsx)(I,{"aria-hidden":!0}),children:`Remove`})]}):(0,G.jsx)(a,{type:`button`,onClick:n,disabled:o,leftIcon:o?(0,G.jsx)(N,{className:`animate-spin`,"aria-hidden":!0}):(0,G.jsx)(h,{"aria-hidden":!0}),children:`Install`}),(0,G.jsx)(Ce,{open:p,title:`Remove plugin`,message:Ge(e.name),confirmLabel:`Remove`,destructive:!0,onConfirm:()=>{m(!1),r()},onCancel:()=>m(!1)}),(0,G.jsx)(Ce,{open:g,title:`Upgrade plugin`,message:Ke(e.name),confirmLabel:qe,destructive:!0,onConfirm:()=>{_(!1),i()},onCancel:()=>_(!1)})]})}function it(){return(0,G.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,G.jsx)(N,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})})}function J(){return(0,G.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-2 py-12 text-center`,style:{color:`var(--content-tertiary)`},children:[(0,G.jsx)(ge,{className:`h-6 w-6`,"aria-hidden":!0}),(0,G.jsx)(`p`,{className:`text-body-medium-default`,children:`We couldn't load this plugin.`}),(0,G.jsx)(`p`,{className:`text-body-small-default`,children:`It may not exist, or your assistant may be on an older build.`})]})}function at({isInstallError:e,isRemoveError:t,isUpgradeError:n}){let r=e?Je:t?Ye:n?Xe:null;return r?(0,G.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 rounded px-3 py-2 text-body-small-default`,style:{backgroundColor:`var(--surface-secondary)`,color:`var(--content-warning, var(--content-tertiary))`},role:`alert`,children:[(0,G.jsx)(ge,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}),r]}):null}function ot({external:e,className:t}){let n=e?{label:`External`,icon:j}:{label:`Local`,icon:se};return(0,G.jsx)(R,{tone:`neutral`,leftIcon:(0,W.createElement)(n.icon),className:t,children:n.label})}function Y({onClick:e,isUpgrading:t=!1}={}){let n=(0,G.jsx)(R,{tone:`warning`,leftIcon:(0,W.createElement)(t?N:T,{className:t?`animate-spin`:void 0}),className:`shrink-0`,children:`Update available`});return e?(0,G.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),e()},disabled:t,"aria-label":`Upgrade plugin`,className:`shrink-0 rounded-[6px] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)] disabled:cursor-not-allowed`,children:n}):n}var st=300*1e3;function X({assistantId:e,name:t,enabled:n=!0}){return u({...H({path:{assistant_id:e,name:t}}),enabled:!!e&&!!t&&n,staleTime:st,retry:!1})}function ct(e){let t=e?.local?.localChanges;return!!t&&t?.clean===!1}function lt(e,t,n){let r=l(),i=n?.onRemoved,a=u({...Me({path:{assistant_id:e,name:t}}),enabled:!!e&&!!t}),o=X({assistantId:e,name:t,enabled:a.data?.installed??!1}).data,s=(0,W.useCallback)(()=>re(r,e,t),[e,t,r]),c=Pe({onSuccess:()=>{s(),z.success(`Installed ${t||`plugin`}`)}}),d=Fe({onSuccess:()=>{s(),i?.()}}),f=Ne({onSuccess:e=>{s(),z.success(e.outcome===`already-up-to-date`?`${t||`Plugin`} is already up to date`:`Upgraded ${t||`plugin`} to ${nt(e.toCommit)}`)}});return{plugin:a.data??null,drift:o,isLoading:a.isLoading,isError:a.isError,install:()=>{c.mutate({path:{assistant_id:e},body:{name:t}})},remove:()=>{d.mutate({path:{assistant_id:e,name:t}})},upgrade:()=>{f.mutate({path:{assistant_id:e,name:t},body:{}})},isInstalling:c.isPending,isRemoving:d.isPending,isUpgrading:f.isPending,isInstallError:c.isError,isRemoveError:d.isError,isUpgradeError:f.isError,hasLocalEdits:ct(o)}}var ut=`0.10.5`;function dt(){return B(ut)}function Z(e,t,n,r){let i=dt(),{data:a}=u({queryKey:[`pluginIcon`,e,t,r],queryFn:async()=>{let{data:n,error:r}=await Oe({path:{assistant_id:e,name:t},parseAs:`blob`,throwOnError:!1});if(r||!(n instanceof Blob))throw Error(`Failed to load plugin icon`);return n},enabled:!!(i&&n&&r),staleTime:1/0,retry:!1}),[o,s]=(0,W.useState)(void 0);return(0,W.useEffect)(()=>{if(!a){s(void 0);return}let e=URL.createObjectURL(a);return s(e),()=>{URL.revokeObjectURL(e)}},[a]),o}function ft(e){let t=l(),n={queryKey:V({path:{assistant_id:e}})},r=(e,r)=>{t.setQueriesData(n,t=>t&&{...t,plugins:t.plugins.map(t=>t.name===e?{...t,enabled:r}:t)})},i=d({mutationFn:async({name:t,nextEnabled:n})=>{let r=await(n?ke({path:{assistant_id:e,name:t},throwOnError:!1}):Ee({path:{assistant_id:e,name:t},throwOnError:!1})),i=r.response?.status;if(r.response?.ok||i===409)return r;throw Error(`Plugin toggle failed (${i??`network error`})`)},onMutate:async({name:e,nextEnabled:i})=>{await t.cancelQueries(n),r(e,i)},onError:(e,{name:t,nextEnabled:n})=>{r(t,!n),z.error(Ze)},onSettled:(n,r,i)=>{re(t,e,i.name)}});return{toggle:(e,t)=>{i.mutate({name:e,nextEnabled:t})},togglingName:i.isPending?i.variables?.name??null:null}}function pt({assistantId:e,name:t,onBack:n,externalHint:r,enabled:i}){let{plugin:o,drift:s,isLoading:c,isError:l,install:u,remove:d,upgrade:f,isInstalling:m,isRemoving:h,isUpgrading:_,isInstallError:v,isRemoveError:y,isUpgradeError:b,hasLocalEdits:x}=lt(e,t,{onRemoved:n}),{toggle:S,togglingName:ee}=ft(e),C=Z(e,t,o?.hasIcon,o?.iconVersion);return(0,G.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col`,children:[(0,G.jsxs)(`div`,{className:`mb-4 flex items-start gap-3`,children:[(0,G.jsx)(a,{type:`button`,variant:`ghost`,iconOnly:(0,G.jsx)(g,{"aria-hidden":!0}),"aria-label":`Back to plugins`,onClick:n}),(0,G.jsx)(Q,{name:t,plugin:o,externalHint:r,iconSrc:C,drift:s,onInstall:u,onRemove:d,onUpgrade:f,isInstalling:m,isRemoving:h,isUpgrading:_,hasLocalEdits:x,enabled:i,onToggle:()=>S(t,!i),isToggling:ee===t})]}),(v||y||b)&&(0,G.jsx)(at,{isInstallError:v,isRemoveError:y,isUpgradeError:b}),(0,G.jsx)(p.Root,{asChild:!0,children:(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-6 py-5`,children:c?(0,G.jsx)(it,{}):l||!o?(0,G.jsx)(J,{}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(q,{plugin:o,surfaces:s?.surfaces??null}),o.readme?(0,G.jsx)(we,{content:o.readme}):(0,G.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`This plugin doesn't ship a README.`})]})})})]})}function Q({name:e,plugin:t,externalHint:n,iconSrc:r,drift:i,onInstall:a,onRemove:o,onUpgrade:s,isInstalling:c,isRemoving:l,isUpgrading:u,hasLocalEdits:d,enabled:f,onToggle:p,isToggling:m}){let h=t?.source?.kind===`github`,g=t?h:n,_=i?.status===`update-available`;return(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3 sm:flex-row sm:items-center`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-3`,children:[g===void 0?(0,G.jsx)(`span`,{"aria-hidden":!0,className:`h-8 w-8 shrink-0`}):(0,G.jsx)(K,{external:g,icon:t?.icon??void 0,iconSrc:r,size:`md`}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,G.jsx)(`h2`,{className:`text-title-medium`,style:{color:`var(--content-default)`},children:t?.name??e}),t?.version?(0,G.jsxs)(`span`,{className:`shrink-0 text-body-small-default`,style:{color:`var(--content-tertiary)`},children:[`v`,t.version]}):null,t?(0,G.jsx)(ot,{external:h}):null,_?(0,G.jsx)(Y,{}):null]}),t?.description?(0,G.jsx)(`p`,{className:`mt-0.5 line-clamp-2 text-body-medium-lighter`,style:{color:`var(--content-secondary)`},children:t.description}):null]})]}),t?(0,G.jsx)(rt,{plugin:t,drift:i,onInstall:a,onRemove:o,onUpgrade:s,isInstalling:c,isRemoving:l,isUpgrading:u,hasLocalEdits:d,enabled:f,onToggle:p,isToggling:m}):null]})}var mt=e(i(),1);function ht({assistantId:e,name:t,onBack:n,externalHint:r,enabled:i}){let{plugin:o,drift:s,isLoading:c,isError:l,install:u,remove:d,upgrade:f,isInstalling:m,isRemoving:h,isUpgrading:_,isInstallError:v,isRemoveError:y,isUpgradeError:b,hasLocalEdits:x}=lt(e,t,{onRemoved:n}),{toggle:S,togglingName:ee}=ft(e),[C,w]=(0,W.useState)(null);(0,W.useEffect)(()=>{w(document.getElementById(`viewport-overlays`))},[]);let te=o?.source?.kind===`github`,T=o?te:r,E=s?.status===`update-available`,ne=o?.name??t,re=Z(e,t,o?.hasIcon,o?.iconVersion),D=(0,G.jsxs)(`div`,{className:`fixed inset-0 z-40 flex flex-col overflow-hidden bg-[var(--surface-overlay)]`,style:{paddingTop:`calc(8px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)))`,paddingBottom:`calc(8px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)))`,paddingLeft:`calc(12px + var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))`,paddingRight:`calc(12px + var(--safe-area-inset-right, env(safe-area-inset-right, 0px)))`},children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,G.jsx)(a,{variant:`ghost`,iconOnly:(0,G.jsx)(g,{"aria-hidden":!0}),expandOnMobile:!0,"aria-label":`Back to plugins`,onClick:n,className:`max-md:bg-[var(--surface-active)]`}),(0,G.jsx)(`span`,{className:`min-w-0 flex-1 truncate px-2 text-center text-body-medium-default`,style:{color:`var(--content-secondary)`},children:ne}),(0,G.jsx)(`span`,{"aria-hidden":!0,className:`h-8 w-8 shrink-0 touch-mobile:h-10 touch-mobile:w-10`})]}),(0,G.jsxs)(`div`,{className:`mt-4 flex flex-col gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[T===void 0?(0,G.jsx)(`span`,{"aria-hidden":!0,className:`h-8 w-8 shrink-0`}):(0,G.jsx)(K,{external:T,icon:o?.icon??void 0,iconSrc:re,size:`md`}),(0,G.jsx)(`h2`,{className:`min-w-0 truncate text-title-medium`,style:{color:`var(--content-emphasised)`},children:ne})]}),(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[E?(0,G.jsx)(Y,{}):null,o?(0,G.jsx)(ot,{external:te}):null]})]}),o?.description?(0,G.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:o.description}):null]}),o?(0,G.jsx)(`div`,{className:`mt-3 flex flex-wrap items-center gap-2`,children:(0,G.jsx)(rt,{plugin:o,drift:s,enabled:i,onToggle:()=>S(t,!i),isToggling:ee===t,onInstall:u,onRemove:d,onUpgrade:f,isInstalling:m,isRemoving:h,isUpgrading:_,hasLocalEdits:x})}):null,(v||y||b)&&(0,G.jsx)(`div`,{className:`mt-3`,children:(0,G.jsx)(at,{isInstallError:v,isRemoveError:y,isUpgradeError:b})}),(0,G.jsx)(p.Root,{asChild:!0,noPadding:!0,children:(0,G.jsx)(`div`,{className:`mt-6 flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border bg-[var(--surface-lift)]`,style:{borderColor:`var(--border-hover)`},children:(0,G.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-4`,children:c?(0,G.jsx)(it,{}):l||!o?(0,G.jsx)(J,{}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(q,{plugin:o,surfaces:s?.surfaces??null}),o.readme?(0,G.jsx)(we,{content:o.readme}):(0,G.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`This plugin doesn't ship a README.`})]})})})})]});return C?(0,mt.createPortal)(D,C):D}function gt({assistantId:e,item:t,drift:n,onSelect:r,onInstall:i,onRemove:o,onUpgrade:s,isInstalling:c=!1,isRemoving:l=!1,isUpgrading:u=!1}){let d=t.status===`available`,f=n?.status===`update-available`,m=t.enabled!==void 0,g=t.enabled===!1,_=Z(e,t.name,t.hasIcon,t.iconVersion);return(0,G.jsx)(p.Root,{asChild:!0,children:(0,G.jsxs)(`div`,{role:`button`,tabIndex:0,onClick:r,onKeyDown:e=>{e.target===e.currentTarget&&(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),r())},className:`flex cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors hover:bg-[var(--surface-hover)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]`,children:[(0,G.jsx)(K,{size:`sm`,external:t.external,icon:t.icon,iconSrc:_,className:g?`opacity-50`:void 0}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`truncate text-body-medium-default`,style:{color:g?`var(--content-tertiary)`:`var(--content-emphasised)`},children:t.name}),t.version?(0,G.jsxs)(`span`,{className:`shrink-0 text-body-small-default`,style:{color:`var(--content-tertiary)`},children:[`v`,t.version]}):null,(0,G.jsx)(R,{tone:`neutral`,leftIcon:(0,G.jsx)(P,{"aria-hidden":!0}),children:`Plugin`}),f?(0,G.jsx)(Y,{onClick:s,isUpgrading:u}):null]}),(0,G.jsx)(`p`,{className:`mt-1 truncate text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:t.description??`No description provided.`}),t.issues&&t.issues.length>0?(0,G.jsxs)(`p`,{className:`mt-1 truncate text-body-small-default`,style:{color:`var(--content-warning, var(--content-tertiary))`},title:t.issues.join(`; `),children:[t.issues[0],t.issues.length>1?` (+${t.issues.length-1} more)`:``]}):null]}),d?c?(0,G.jsx)(a,{type:`button`,iconOnly:(0,G.jsx)(N,{className:`animate-spin`,"aria-hidden":!0}),disabled:!0,"aria-label":`Installing`,expandOnMobile:!1}):(0,G.jsx)(a,{type:`button`,iconOnly:(0,G.jsx)(h,{"aria-hidden":!0}),onClick:e=>{e.stopPropagation(),i?.()},disabled:!i,"aria-label":`Install plugin`,expandOnMobile:!1}):(0,G.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[m?(0,G.jsx)(R,{tone:t.enabled?`positive`:`neutral`,children:t.enabled?`Enabled`:`Disabled`}):null,(0,G.jsx)(a,{type:`button`,variant:`dangerOutline`,iconOnly:l?(0,G.jsx)(N,{className:`animate-spin`,"aria-hidden":!0}):(0,G.jsx)(I,{"aria-hidden":!0}),onClick:e=>{e.stopPropagation(),o?.()},disabled:l||u||!o,"aria-label":`Remove plugin`,expandOnMobile:!1})]})]})})}var _t={mail:ue,calendar:w,"message-circle":de,globe:j,zap:L,code:ae,mic:fe,"shopping-cart":E,palette:ne,heart:ce,settings:F,"link-2":le};function vt(e){return _t[e]}function yt({selected:e,onSelect:t,counts:n,totalCount:r,showCounts:i,categories:a,ariaLabel:o=`Skill categories`}){let s=[...a].sort((e,t)=>e.label.localeCompare(t.label));return(0,G.jsxs)(`nav`,{className:`flex flex-col gap-1`,"aria-label":o,children:[(0,G.jsx)(bt,{icon:M,label:`All`,count:r,isActive:e===null,showCount:i,onClick:()=>t(null)}),s.map(r=>(0,G.jsx)(bt,{icon:vt(r.icon)??M,label:r.label,count:n[r.slug]??0,isActive:e===r.slug,showCount:i,onClick:()=>t(r.slug)},r.slug))]})}function bt({icon:e,label:t,count:n,isActive:r,showCount:i,onClick:o}){return(0,G.jsxs)(a,{variant:`ghost`,onClick:o,"aria-pressed":r,className:`h-auto justify-between gap-3 rounded-lg border-0 bg-transparent px-3 py-2 text-left hover:bg-[var(--ghost-hover)]`,style:{backgroundColor:r?`var(--surface-active)`:void 0,color:r?`var(--content-default)`:`var(--content-secondary)`},children:[(0,G.jsxs)(`span`,{className:`flex items-center gap-2.5`,children:[(0,G.jsx)(e,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}),(0,G.jsx)(`span`,{className:`text-body-medium-default`,children:t})]}),i&&(0,G.jsx)(`span`,{className:`text-body-small-default`,style:{color:`var(--content-tertiary)`},children:n})]})}function xt({skill:e,onSelect:t,onInstall:n,onRemove:r,isInstalling:i=!1,isRemoving:o=!1}){let s=x(e),c=Ve(e);return(0,G.jsx)(p.Root,{asChild:!0,children:(0,G.jsxs)(`div`,{role:`button`,tabIndex:0,onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t())},className:`flex cursor-pointer items-center gap-3 px-3 py-2 text-left transition-colors hover:bg-[var(--surface-hover)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring)]`,children:[(0,G.jsx)(`div`,{className:`flex shrink-0 items-center justify-center text-[28px] leading-none`,children:(0,G.jsx)(b,{skill:e,className:`h-7 w-7`})}),(0,G.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`truncate text-body-medium-default`,style:{color:`var(--content-emphasised)`},children:e.name}),(0,G.jsx)(_,{origin:e.origin})]}),(0,G.jsx)(`p`,{className:`mt-1 truncate text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:e.description})]}),s?i?(0,G.jsx)(a,{type:`button`,iconOnly:(0,G.jsx)(N,{className:`animate-spin`,"aria-hidden":!0}),disabled:!0,"aria-label":`Installing`,expandOnMobile:!1}):(0,G.jsx)(a,{type:`button`,iconOnly:(0,G.jsx)(h,{"aria-hidden":!0}),onClick:e=>{e.stopPropagation(),n?.()},disabled:!n,"aria-label":`Install skill`,expandOnMobile:!1}):(0,G.jsx)(a,{type:`button`,variant:`dangerOutline`,iconOnly:o?(0,G.jsx)(N,{className:`animate-spin`,"aria-hidden":!0}):(0,G.jsx)(I,{"aria-hidden":!0}),onClick:e=>{e.stopPropagation(),r?.()},disabled:!c||o||!r,"aria-label":c?`Remove skill`:`Bundled skill cannot be removed`,title:c?void 0:`Bundled skills cannot be removed`,expandOnMobile:!1})]})})}var St=[{value:`all`,label:`All`,icon:M},{value:`installed`,label:`Installed`,icon:D},{value:`available`,label:`Available`,icon:h}],Ct=[{value:`skills`,label:`Skills`,icon:L},{value:`plugins`,label:`Plugins`,icon:P}],wt=[{value:`vellum`,label:`Vellum`,icon:S},{value:`clawhub`,label:`Clawhub`,icon:j},{value:`skillssh`,label:`skills.sh`,icon:he},{value:`custom`,label:`Custom`,icon:_e},{value:`assistant-memory`,label:`Assistant's Memory`,icon:C}];function Tt({search:e,onSearchChange:t,filter:n,onFilterChange:r,isSearching:i,categories:a,category:o,onCategoryChange:s,counts:c,totalCount:l,showCounts:u,pluginsSupported:d}){return(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(xe,{type:`search`,value:e,onChange:e=>{t(e.target.value)},placeholder:`Search superpowers`,"aria-label":`Search superpowers`,leftIcon:(0,G.jsx)(pe,{className:`h-4 w-4`,"aria-hidden":!0}),rightIcon:i?(0,G.jsx)(N,{className:`h-4 w-4 animate-spin`,"aria-hidden":!0}):void 0,fullWidth:!0,wrapperClassName:`flex-1`}),(0,G.jsx)(Et,{filter:n,onFilterChange:r,categories:a,category:o,onCategoryChange:s,counts:c,totalCount:l,showCounts:u,pluginsSupported:d})]})}function Et(e){let t=Re(),[n,r]=(0,W.useState)(!1),i=(0,G.jsx)(a,{type:`button`,variant:`outlined`,iconOnly:(0,G.jsx)(Ue,{"aria-hidden":!0}),"aria-label":`Filter superpowers`,"aria-haspopup":t?`dialog`:`listbox`,"aria-expanded":n,tintColor:`var(--primary-base)`});if(t)return(0,G.jsx)(Dt,{...e,open:n,onOpenChange:r,trigger:i});let o=t=>{e.onFilterChange(t),r(!1)};return(0,G.jsxs)(be.Root,{open:n,onOpenChange:r,children:[(0,G.jsx)(be.Trigger,{asChild:!0,children:i}),(0,G.jsx)(be.Content,{align:`end`,sideOffset:4,className:`w-44 overflow-hidden p-0`,children:(0,G.jsxs)(`ul`,{role:`listbox`,children:[(0,G.jsx)(kt,{label:`Status`,options:St,selected:e.filter,onSelect:o}),e.pluginsSupported&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`div`,{className:`border-t`,style:{borderColor:`var(--border-base)`}}),(0,G.jsx)(kt,{label:`Type`,options:Ct,selected:e.filter,onSelect:o})]}),(0,G.jsx)(`div`,{className:`border-t`,style:{borderColor:`var(--border-base)`}}),(0,G.jsx)(kt,{label:`Source`,options:wt,selected:e.filter,onSelect:o})]})})]})}function Dt({filter:e,onFilterChange:t,categories:n,category:r,onCategoryChange:i,counts:o,totalCount:s,showCounts:c,pluginsSupported:l,open:u,onOpenChange:d,trigger:f}){let p=[...n].sort((e,t)=>e.label.localeCompare(t.label));return(0,G.jsxs)(O.Root,{open:u,onOpenChange:d,children:[(0,G.jsx)(O.Trigger,{asChild:!0,children:f}),(0,G.jsxs)(O.Content,{className:`max-h-[85dvh]`,"aria-describedby":void 0,children:[(0,G.jsx)(`div`,{"aria-hidden":!0,className:`mx-auto mb-3 h-1 w-9 shrink-0 rounded-full bg-[var(--border-element)]`}),(0,G.jsx)(O.Header,{children:(0,G.jsx)(O.Title,{children:`Filters`})}),(0,G.jsxs)(O.Body,{className:`flex flex-col gap-3 pt-2`,children:[(0,G.jsx)(Ot,{label:`Status`,children:St.map(n=>(0,G.jsx)($,{icon:n.icon,label:n.label,active:e===n.value,onSelect:()=>t(n.value)},n.value))}),l&&(0,G.jsx)(Ot,{label:`Type`,children:Ct.map(n=>(0,G.jsx)($,{icon:n.icon,label:n.label,active:e===n.value,onSelect:()=>t(n.value)},n.value))}),(0,G.jsx)(Ot,{label:`Source`,children:wt.map(n=>(0,G.jsx)($,{icon:n.icon,label:n.label,active:e===n.value,onSelect:()=>t(n.value)},n.value))}),(0,G.jsxs)(Ot,{label:`Categories`,children:[(0,G.jsx)($,{icon:M,label:`All`,active:r===null,badge:c?s:void 0,onSelect:()=>i(null)}),p.map(e=>(0,G.jsx)($,{icon:vt(e.icon)??M,label:e.label,active:r===e.slug,badge:c?o[e.slug]??0:void 0,onSelect:()=>i(e.slug)},e.slug))]})]}),(0,G.jsx)(O.Footer,{children:(0,G.jsx)(a,{type:`button`,variant:`primary`,fullWidth:!0,onClick:()=>d(!1),children:`Done`})})]})]})}function Ot({label:e,children:t}){return(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`div`,{className:`px-2 pb-1 text-body-small-default uppercase tracking-wide`,style:{color:`var(--content-tertiary)`},children:e}),t]})}function $({icon:e,label:t,active:n,badge:r,onSelect:i}){return(0,G.jsx)(k,{icon:e,label:t,active:n,activeVariant:`branded`,badge:r,trailingAction:n&&r==null?(0,G.jsx)(te,{className:`h-4 w-4 text-[var(--primary-base)]`,"aria-hidden":!0}):void 0,onSelect:i})}function kt({label:e,options:t,selected:n,onSelect:r}){return(0,G.jsxs)(`li`,{children:[(0,G.jsx)(`div`,{className:`px-3 pb-1 pt-2 text-body-small-default uppercase tracking-wide`,style:{color:`var(--content-tertiary)`},children:e}),(0,G.jsx)(`ul`,{children:t.map(e=>{let t=e.icon,i=n===e.value;return(0,G.jsx)(`li`,{children:(0,G.jsxs)(`button`,{type:`button`,onClick:()=>r(e.value),role:`option`,"aria-selected":i,className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-body-medium-lighter transition-colors hover:bg-[var(--surface-hover)]`,style:{color:i?`var(--primary-base)`:`var(--content-default)`},children:[(0,G.jsx)(t,{className:`h-4 w-4`,"aria-hidden":!0}),(0,G.jsx)(`span`,{className:`flex-1`,children:e.label}),i&&(0,G.jsx)(D,{className:`h-3.5 w-3.5`,"aria-hidden":!0})]})},e.value)})})]})}var At=300*1e3,jt=[],Mt=[];async function Nt(e,t,n){let r=await De({path:{assistant_id:e},query:{q:void 0,category:t},signal:n,throwOnError:!1});if(r.response?.status===404)return{plugins:[]};if(!r.response?.ok)throw Error(`Failed to load plugins`);return r.data??{plugins:[]}}function Pt(e,t){let[n,r]=(0,W.useState)({assistantId:e,latched:!1}),i=n.assistantId===e?n.latched:!1;return n.assistantId!==e&&r({assistantId:e,latched:!1}),(0,W.useEffect)(()=>{t&&r(t=>t.assistantId===e&&t.latched?t:{assistantId:e,latched:!0})},[e,t]),i||t}function Ft(e,t=null,n=!0){let r=t??void 0,i=u({queryKey:V({path:{assistant_id:e},query:{q:void 0,category:r}}),queryFn:({signal:t})=>Nt(e,r,t),enabled:!!e&&n,staleTime:At}),a=u({...ye(e),enabled:!!e&&n&&t!==null}),o=u({...Ie({path:{assistant_id:e},query:{q:void 0}}),enabled:!!e&&n,staleTime:At}),s=(0,W.useMemo)(()=>{let e=t===null?i.data?.plugins:a.data?.plugins??i.data?.plugins;return new Set((e??jt).map(e=>e.name))},[t,a.data?.plugins,i.data?.plugins]),c=(0,W.useMemo)(()=>{let e=i.data?.plugins??jt,n=o.data?.matches??Mt;return et(Qe(e,(t===null?n:n.filter(e=>(e.category??`system`)===t)).filter(e=>!s.has(e.name))))},[i.data?.plugins,o.data?.matches,t,s]),d=t===null?i.data:a.data,f=Pt(e,d?.categoryCounts!==void 0),p=Pt(e,(d?.plugins??jt).some(e=>e.enabled!==void 0)),m=l(),h=(0,W.useRef)(null);return(0,W.useEffect)(()=>{if(h.current===e||!o.isSuccess)return;let t=d?.plugins;if(!t?.length)return;let n=new Map((o.data?.matches??Mt).map(e=>[e.name,e.category]));t.some(e=>{let t=n.get(e.name);return t!=null&&t!==`system`&&(e.category??`system`)===`system`})&&(h.current=e,m.invalidateQueries({queryKey:V({path:{assistant_id:e},query:{q:void 0}})}))},[e,o.isSuccess,o.data?.matches,d?.plugins,m]),{items:c,isLoading:i.isLoading,catalogLoading:o.isLoading,isError:i.isError,isFetching:i.isFetching||o.isFetching,catalogError:o.isError,categorySupported:f,pluginToggleSupported:p,installedCategoryCounts:d?.categoryCounts,installedPlugins:d?.plugins??jt,installedTotal:d?.totalCount,catalogMatches:o.data?.matches??Mt,unfilteredInstalledNames:s}}function It(e){return u({...je({path:{assistant_id:e}}),select:e=>e.categories,staleTime:300*1e3})}var Lt=new Set([`all`,`installed`,`available`,`skills`,`plugins`,`vellum`,`clawhub`,`skillssh`,`custom`,`assistant-memory`]);function Rt(e){let t=e.get(`filter`),n=e.get(`category`);return{q:e.get(`q`)??``,filter:Vt(t)?t:`all`,category:n||null}}function zt(e,t){let n=new URLSearchParams(e);return t.q!==void 0&&Bt(n,`q`,t.q.trim()||null),t.filter!==void 0&&Bt(n,`filter`,t.filter===`all`?null:t.filter),t.category!==void 0&&Bt(n,`category`,t.category),n}function Bt(e,t,n){n===null?e.delete(t):e.set(t,n)}function Vt(e){return e!==null&&Lt.has(e)}function Ht(e){switch(e){case`installed`:return{kind:`installed`};case`available`:return{kind:`available`};case`vellum`:case`clawhub`:case`skillssh`:case`custom`:case`assistant-memory`:return{origin:e};default:return{}}}function Ut(e){return e!==`plugins`}function Wt(e){return e===`all`||e===`installed`||e===`available`||e===`plugins`}function Gt(e){switch(e){case`installed`:return`installed`;case`available`:return`available`;default:return`all`}}function Kt(e,t){let[n,r]=(0,W.useState)(e);return(0,W.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>clearTimeout(n)},[e,t]),n}var qt=300,Jt=`vellum:superpowers:tipDismissed`;function Yt(e){return[...e].sort((e,t)=>e.installed===t.installed?e.name.localeCompare(t.name,void 0,{sensitivity:`base`}):e.installed?-1:1)}function Xt({assistantId:e}){let r=c(),i=o(),a=l(),d=Re(),f=Te.use.version(),p=ze(),[m,h]=s(),{q:g,filter:_,category:y}=(0,W.useMemo)(()=>Rt(m),[m]),b=m.get(`plugin`),x=(0,W.useCallback)(e=>{h(t=>zt(t,e),{replace:!0})},[h]),S=m.get(`success`),C=(0,W.useRef)(!1);(0,W.useEffect)(()=>{S!==`true`||C.current||(C.current=!0,b&&z.success(`Installed ${b}`),h(e=>{let t=new URLSearchParams(e);return t.delete(`success`),t},{replace:!0}))},[S,b,h]);let[w,te]=(0,W.useState)(g),T=Kt(w.trim(),qt),E=(0,W.useRef)(g);(0,W.useEffect)(()=>{if(g!==E.current&&(E.current=g,g!==w.trim())){te(g);return}T!==g&&T===w.trim()&&(E.current=T,x({q:T}))},[T,g,w,x]);let ne=(0,W.useCallback)(e=>x({filter:e}),[x]),D=(0,W.useCallback)(e=>x({category:e}),[x]),[ie,ae]=(0,W.useState)(()=>n(Jt,!1)),O=(0,W.useCallback)(()=>{ae(!0),t(Jt,!0)},[]),k=!p&&_===`plugins`?`all`:_,A=Ut(k),oe=p&&Wt(k),j=Gt(k),{handleInstall:se,handleRemove:ce,isInstallingSkill:M,isRemovingSkill:le,skillPendingRemoval:N,confirmRemove:ue,cancelRemove:de}=ee(e),{data:fe=[]}=It(e),{origin:P,kind:pe}=(0,W.useMemo)(()=>Ht(k),[k]),F=u({...Le({path:{assistant_id:e},query:{include:`catalog`,origin:P,kind:pe,q:T||void 0,category:y??void 0}}),select:e=>({skills:e.skills,categoryCounts:e.categoryCounts,totalCount:e.totalCount}),enabled:!!e&&A}),me=u({...Le({path:{assistant_id:e},query:{include:`catalog`,origin:P,kind:pe,q:T||void 0}}),select:e=>({skills:e.skills,categoryCounts:e.categoryCounts,totalCount:e.totalCount}),enabled:!!e&&A&&y!==null}),{items:he,isLoading:I,catalogLoading:ge,isError:_e,isFetching:ve,catalogError:L,categorySupported:ye,installedCategoryCounts:R,installedPlugins:be,installedTotal:xe,catalogMatches:Se,unfilteredInstalledNames:we}=Ft(e,y,p),B=oe&&(y===null||ye),Ee=(0,W.useCallback)(t=>re(a,e,t),[e,a]),[De,Oe]=(0,W.useState)(null),[ke,je]=(0,W.useState)(null),[Me,V]=(0,W.useState)(null),[H,Ie]=(0,W.useState)(null),[U,Be]=(0,W.useState)(null),Ve=Pe({onMutate:e=>Oe(e.body.name),onSuccess:(e,t)=>z.success(`Installed ${t.body.name}`),onError:()=>z.error(Je),onSettled:(e,t,n)=>{Oe(null),Ee(n.body.name)}}),Ue=Fe({onMutate:e=>je(e.path.name),onSuccess:(e,t)=>z.success(`Removed ${t.path.name}`),onError:()=>z.error(Ye),onSettled:(e,t,n)=>{je(null),Ee(n.path.name)}}),We=Ne({onMutate:e=>V(e.path.name),onSuccess:(e,t)=>z.success(e.outcome===`already-up-to-date`?`${t.path.name} is already up to date`:`Upgraded ${t.path.name} to ${nt(e.toCommit)}`),onError:()=>z.error(Xe),onSettled:(e,t,n)=>{V(null),Ee(n.path.name)}}),K=(0,W.useCallback)(e=>h(t=>{let n=new URLSearchParams(t);return n.set(`plugin`,e.name),n}),[h]),Ze=(0,W.useCallback)(()=>h(e=>{let t=new URLSearchParams(e);return t.delete(`plugin`),t},{replace:!0}),[h]),Qe=(0,W.useCallback)(t=>{Ve.mutate({path:{assistant_id:e},body:{name:t.name}})},[e,Ve]),et=(0,W.useCallback)(()=>{H&&(Ue.mutate({path:{assistant_id:e,name:H.name}}),Ie(null))},[e,H,Ue]),q=(0,W.useCallback)(t=>{We.mutate({path:{assistant_id:e,name:t},body:{}})},[e,We]),rt=(0,W.useCallback)(()=>{U&&(q(U.name),Be(null))},[U,q]),it=(0,W.useCallback)((e,t)=>{if(ct(t)){Be(e);return}q(e.name)},[q]),J=(0,W.useMemo)(()=>A?F.data?.skills??[]:[],[A,F.data?.skills]),at=(0,W.useMemo)(()=>B?tt(he,j).filter(e=>$e(e,T)):[],[B,he,j,T]),ot=(0,W.useMemo)(()=>Yt([...J.map(e=>({type:`skill`,key:`skill:${e.id}`,name:e.name,installed:v(e),skill:e})),...at.map(e=>({type:`plugin`,key:`plugin:${e.name}`,name:e.name,installed:e.status===`installed`,item:e}))]),[J,at]),Y=y===null?F.data:me.data,st=Zt(A,Y?.skills??J,Y?.categoryCounts,Y?.totalCount),X=Qt(oe&&ye,R,be,xe,Se,we,j),{counts:lt,totalCount:ut}=(0,W.useMemo)(()=>{let e={...st.counts};for(let[t,n]of Object.entries(X.counts))e[t]=(e[t]??0)+n;return{counts:e,totalCount:st.totalCount+X.totalCount}},[st,X]),dt=A&&F.isLoading,Z=A&&F.isError,ft=B&&I,Q=B&&_e,mt=(Z||!A)&&(Q||!B)&&(Z||Q),_t=dt||ft,vt=!!T&&(A&&F.isFetching||B&&ve&&!I),bt=w.trim().length>0;if(b&&!p&&f===null)return null;if(b&&p){let t=he.find(e=>e.name===b),n={assistantId:e,name:b,externalHint:t?.external,enabled:t?.enabled,onBack:Ze};return d?(0,G.jsx)(ht,{...n}):(0,G.jsx)(pt,{...n})}let St=(0,G.jsx)(`div`,{className:`min-w-0 flex-1 overflow-y-auto`,children:_t?(0,G.jsx)(nn,{}):mt?(0,G.jsx)(rn,{}):ot.length===0?B&&ge&&j!==`installed`?(0,G.jsx)(nn,{}):(0,G.jsx)(an,{filter:k,category:y}):(0,G.jsx)(`ul`,{className:`flex flex-col gap-2`,children:ot.map(t=>(0,G.jsx)(`li`,{children:t.type===`skill`?(0,G.jsx)(xt,{skill:t.skill,onSelect:()=>r(Ae.skills.detail(t.skill.id),{state:{listSearch:i.search}}),onInstall:()=>se(t.skill),onRemove:()=>ce(t.skill),isInstalling:M(t.skill),isRemoving:le(t.skill)}):t.installed?(0,G.jsx)($t,{assistantId:e,item:t.item,onSelect:()=>K(t.item),onRemove:()=>Ie(t.item),onUpgrade:e=>it(t.item,e),isRemoving:ke===t.item.name,isUpgrading:Me===t.item.name}):(0,G.jsx)(gt,{assistantId:e,item:t.item,onSelect:()=>K(t.item),onInstall:()=>Qe(t.item),isInstalling:De===t.item.name})},t.key))})});return(0,G.jsxs)(`div`,{className:`flex h-full min-h-0 flex-1 flex-col gap-4`,children:[!ie&&(0,G.jsx)(en,{onDismiss:O}),(0,G.jsx)(Tt,{search:w,onSearchChange:te,filter:k,onFilterChange:ne,isSearching:vt,categories:fe,category:y,onCategoryChange:D,counts:lt,totalCount:ut,showCounts:!bt,pluginsSupported:p}),!_t&&!mt&&Z?(0,G.jsx)(tn,{text:`Skills are temporarily unavailable. Plugins are still listed below.`}):null,!_t&&!mt&&Q?(0,G.jsx)(tn,{text:`Plugins are temporarily unavailable. Skills are still listed below.`}):null,B&&L&&!ft&&!Q?(0,G.jsx)(tn,{text:`Plugin catalog browsing is temporarily unavailable. Installed plugins are still listed below.`}):null,(0,G.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-6`,children:[(0,G.jsx)(`aside`,{className:`hidden w-56 shrink-0 overflow-y-auto sm:block`,children:(0,G.jsx)(yt,{ariaLabel:`Superpower categories`,selected:y,onSelect:D,counts:lt,totalCount:ut,showCounts:!bt,categories:fe})}),St]}),(0,G.jsx)(He,{skillName:N?.name??null,onConfirm:ue,onCancel:de}),(0,G.jsx)(Ce,{open:H!==null,title:`Remove plugin`,message:H?Ge(H.name):``,confirmLabel:`Remove`,destructive:!0,onConfirm:et,onCancel:()=>Ie(null)}),(0,G.jsx)(Ce,{open:U!==null,title:`Upgrade plugin`,message:U?Ke(U.name):``,confirmLabel:qe,destructive:!0,onConfirm:rt,onCancel:()=>Be(null)})]})}function Zt(e,t,n,r){return(0,W.useMemo)(()=>{if(!e)return{counts:{},totalCount:0};if(n&&Object.keys(n).length>0)return{counts:n,totalCount:r??t.length};let i={};for(let e of t){let t=e.category??`system`;i[t]=(i[t]??0)+1}return{counts:i,totalCount:r??t.length}},[e,t,n,r])}function Qt(e,t,n,r,i,a,o){return(0,W.useMemo)(()=>{if(!e)return{counts:{},totalCount:0};let s={},c=o!==`available`,l=o===`all`||o===`available`;if(c)if(t&&Object.keys(t).length>0)Object.assign(s,t);else for(let e of n){let t=e.category??`system`;s[t]=(s[t]??0)+1}let u=0;if(l)for(let e of i){if(a.has(e.name))continue;let t=e.category??`system`;s[t]=(s[t]??0)+1,u+=1}let d=r??n.length;return{counts:s,totalCount:(c?d:0)+u}},[e,t,n,r,i,a,o])}function $t({assistantId:e,item:t,onSelect:n,onRemove:r,onUpgrade:i,isRemoving:a,isUpgrading:o}){let s=X({assistantId:e,name:t.name}).data;return(0,G.jsx)(gt,{assistantId:e,item:t,drift:s,onSelect:n,onRemove:r,onUpgrade:()=>i(s),isRemoving:a,isUpgrading:o})}function en({onDismiss:e}){return(0,G.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg px-4 py-2.5 text-body-small-default`,style:{backgroundColor:`var(--surface-base)`,color:`var(--content-secondary)`},children:[(0,G.jsx)(me,{className:`h-4 w-4 shrink-0`,style:{color:`var(--primary-base)`}}),(0,G.jsx)(`p`,{className:`flex-1`,children:`Create a new custom skill by describing what you want in chat, or install plugins to extend your assistant.`}),(0,G.jsx)(a,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,G.jsx)(ve,{"aria-hidden":!0}),onClick:e,"aria-label":`Dismiss tip`,tintColor:`var(--content-tertiary)`,expandOnMobile:!1})]})}function tn({text:e}){return(0,G.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg px-4 py-2.5 text-body-small-default`,style:{backgroundColor:`var(--surface-base)`,color:`var(--content-secondary)`},children:[(0,G.jsx)(ie,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`},"aria-hidden":!0}),(0,G.jsx)(`p`,{className:`flex-1`,children:e})]})}function nn(){return(0,G.jsx)(`div`,{className:`flex items-center justify-center py-16`,children:(0,G.jsx)(N,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})})}function rn(){return(0,G.jsx)(p.Root,{children:(0,G.jsxs)(p.Body,{className:`flex flex-col items-center justify-center py-16 text-center`,children:[(0,G.jsx)(ge,{className:`mb-3 h-8 w-8`,style:{color:`var(--system-danger)`},"aria-hidden":!0}),(0,G.jsx)(`h3`,{className:`text-title-small`,style:{color:`var(--content-default)`},children:`Failed to load superpowers`}),(0,G.jsx)(`p`,{className:`mt-1 max-w-sm text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:`Something went wrong. Try refreshing the page.`})]})})}function an({filter:e,category:t}){let{title:n,subtitle:r,Icon:i}=on(e,t);return(0,G.jsx)(y,{icon:i,title:n,subtitle:r})}function on(e,t){if(t)return{title:`Nothing in this category`,subtitle:`Try selecting a different category or clearing the filter.`,Icon:M};switch(e){case`installed`:return{title:`No Superpowers Installed`,subtitle:`Ask your assistant in chat to search for and install new skills and plugins.`,Icon:L};case`available`:return{title:`Nothing Left to Install`,subtitle:`All available skills and plugins are installed.`,Icon:D};case`skills`:return{title:`No Skills Found`,subtitle:`Ask your assistant in chat to search for and install new skills.`,Icon:L};case`plugins`:return{title:`No Plugins Found`,subtitle:`Browse the catalog to install plugins that extend your assistant.`,Icon:P};case`vellum`:return{title:`No Vellum Skills`,subtitle:`No bundled Vellum skills found.`,Icon:L};case`clawhub`:return{title:`No Clawhub Skills`,subtitle:`No Clawhub skills found. Try searching the catalog.`,Icon:L};case`skillssh`:return{title:`No skills.sh Skills`,subtitle:`No skills.sh skills found. Try searching the catalog.`,Icon:L};case`custom`:return{title:`No Custom Skills`,subtitle:`Create a custom skill by describing what you want in chat.`,Icon:L};case`assistant-memory`:return{title:`No Skills From Memory`,subtitle:`Skills your assistant authors from past conversations will appear here.`,Icon:L};default:return{title:`No Superpowers Available`,subtitle:`Check your connection to the Vellum catalog.`,Icon:ie}}}function sn(){return(0,G.jsx)(Xt,{assistantId:Be()})}export{sn as SuperpowersPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{n}from"./QueryClientProvider-CMu7CkQU.js";import{t as r}from"./useQuery-Bz-fbQ-m.js";import{i,n as a,o}from"./utils-CPWCnpba.js";import{n as s}from"./api-errors-BmlR1gU1.js";import{Br as c,Hr as l,Vr as u,d,f,m as p,p as m,qr as h}from"./sdk.gen-CsUgJyBR.js";var g=e(t(),1),_=`0.8.7`;function v(){return a(_)}function y(){return i(_)}async function b(){return await o(),v()}function x(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.bodyShape==`string`&&typeof t.eyeStyle==`string`&&typeof t.color==`string`}function S(e){return e===`character`||e===`image`||e===`none`}function C(e){return e===`builder`||e===`upload`||e===`ai`}function w(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.updatedAt==`string`&&typeof t.etag==`string`}function T(e){if(typeof e!=`object`||!e)return!1;let t=e;return S(t.kind)&&(t.traits===null||x(t.traits))&&(t.source===null||C(t.source))&&(t.image===null||w(t.image))}async function E(e){try{let{data:t,error:n,response:r}=await p({path:{assistant_id:e},throwOnError:!1});return s(r,n,`Failed to fetch avatar state`),!r.ok||!T(t)?null:t}catch{return null}}async function D(e){try{let{data:t,error:n,response:r}=await d({path:{assistant_id:e},throwOnError:!1});return s(r,n,`Failed to fetch character components`),!r.ok||!t?null:t}catch{return null}}async function O(e){try{let{data:t,error:n,response:r}=await l({path:{assistant_id:e},query:{path:`data/avatar/character-traits.json`},throwOnError:!1});if(s(r,n,`Failed to fetch character traits`),!r.ok||!t)return null;let i=JSON.parse(t.content);return x(i)?i:null}catch{return null}}async function k(e,t){try{let{error:n,response:r}=await m({path:{assistant_id:e},body:t,throwOnError:!1});return s(r,n,`Failed to save character traits`),r.ok}catch{return!1}}async function A(e,t){try{let n=await t.arrayBuffer(),r=btoa(new Uint8Array(n).reduce((e,t)=>e+String.fromCharCode(t),``));if(!await b())return j(e,r);let{error:i,response:a}=await f({path:{assistant_id:e},body:{content:r,encoding:`base64`},throwOnError:!1});return s(a,i,`Failed to upload avatar image`),a.ok}catch{return!1}}async function j(e,t){let{error:n,response:r}=await h({path:{assistant_id:e},body:{path:`data/avatar/avatar-image.png`,content:t,encoding:`base64`},throwOnError:!1});return s(r,n,`Failed to upload avatar image`),r.ok?(await c({path:{assistant_id:e},body:{path:`data/avatar/character-traits.json`},throwOnError:!1}),!0):!1}async function M(e){try{let{data:t,error:n,response:r}=await u({path:{assistant_id:e},query:{path:`data/avatar/avatar-image.png`},parseAs:`blob`,throwOnError:!1});return s(r,n,`Failed to fetch avatar image`),!r.ok||!t?null:URL.createObjectURL(t)}catch{return null}}var N=`assistantAvatar`;function P(e){return[N,e]}var F=new Map;async function I(e){let t=await E(e);if(t===null)throw Error(`Failed to fetch avatar state`);return t.kind===`character`?{traits:t.traits,imageUrl:null}:t.kind===`image`?{traits:null,imageUrl:await M(e)}:{traits:null,imageUrl:null}}async function L(e){let t=await M(e);return{traits:t?null:await O(e),imageUrl:t}}function R(e){let t=n(),i=y(),{data:a,isLoading:o}=r({queryKey:[...P(e??``),i],queryFn:async()=>{let t=e,[n,{traits:r,imageUrl:a}]=await Promise.all([D(t),i?I(t):L(t)]);if(!n&&!a)throw Error(`Failed to fetch character components`);let o=F.get(t);return o&&o!==a&&URL.revokeObjectURL(o),a?F.set(t,a):F.delete(t),{components:n,traits:r,customImageUrl:a}},enabled:!!e,staleTime:1/0,structuralSharing:!1,retry:1}),s=(0,g.useCallback)(()=>{e&&t.invalidateQueries({queryKey:P(e)})},[e,t]);return{components:a?.components??null,traits:a?.traits??null,customImageUrl:a?.customImageUrl??null,isLoading:o,invalidate:s}}export{k as a,O as i,R as n,A as o,D as r,x as s,P as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{n}from"./button-DWxxMNqc.js";import{t as r}from"./jsx-runtime-D3ZM-ToX.js";import{t as i}from"./typography-BeUa5Fd-.js";import{t as a}from"./archive-VIStcSec.js";import{a as o,c as s,l as c,o as l,r as u,s as d,t as f,u as p}from"./use-attachment-preview-xtU_G3Z8.js";import"./src-CqJTlX1y.js";import{t as m}from"./download-4D3U4xXO.js";import{t as h}from"./file-text-BWjfiPpo.js";import{t as g}from"./file-BBJshqSR.js";import{m as _}from"./native-biometric-CbCUFdjC.js";import{a as v,n as y,o as b}from"./pdf-preview-BUviTR8O.js";var x=e(t(),1),S=r(),C=`h-16 w-16 shrink-0 rounded-lg`,w={image:(0,S.jsx)(s,{className:`h-6 w-6`}),video:(0,S.jsx)(d,{className:`h-6 w-6`}),audio:(0,S.jsx)(c,{className:`h-6 w-6`}),pdf:(0,S.jsx)(o,{className:`h-6 w-6`}),code:(0,S.jsx)(p,{className:`h-6 w-6`}),archive:(0,S.jsx)(a,{className:`h-6 w-6`}),spreadsheet:(0,S.jsx)(l,{className:`h-6 w-6`}),document:(0,S.jsx)(h,{className:`h-6 w-6`}),text:(0,S.jsx)(h,{className:`h-6 w-6`}),file:(0,S.jsx)(g,{className:`h-6 w-6`})};function T({attachment:e,onPreview:t,onDownload:r,onPreviewError:a}){let{filename:o,mimeType:s,sizeBytes:c,previewUrl:l,thumbnailUrl:u}=e,d=y(s,o),f=d===`image`&&l!==null,p=d===`video`&&u!=null?u:null,h=!f&&p===null,g=t!=null,T=b(o,18),E=v(c),D=_(),O=(0,x.useCallback)(e=>{e.stopPropagation(),r?.()},[r]);return(0,S.jsxs)(`div`,{role:g?`button`:f?`img`:void 0,"aria-label":o,title:o,tabIndex:g?0:void 0,onClick:g?t:void 0,onKeyDown:g?e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),t?.())}:void 0,className:`group/square flex flex-col gap-1${g?` cursor-pointer`:``}`,children:[(0,S.jsxs)(`div`,{className:`relative w-fit`,children:[(0,S.jsx)(`div`,{className:`${C} flex items-center justify-center overflow-hidden bg-[var(--surface-lift)] bg-cover bg-center text-[var(--content-secondary)]${h?` border border-[var(--border-element)]`:``}`,style:p?{backgroundImage:`url(${JSON.stringify(p)})`}:void 0,children:f?(0,S.jsx)(`img`,{src:l,alt:``,"aria-hidden":!0,onError:a,className:`h-full w-full object-cover`}):p?null:w[d]}),r&&(0,S.jsx)(`div`,{className:`pointer-events-none absolute inset-0 rounded-lg bg-black/50 opacity-0 transition-opacity group-hover/square:pointer-events-auto group-hover/square:opacity-100 group-focus-within/square:pointer-events-auto group-focus-within/square:opacity-100`,children:(0,S.jsx)(n,{content:`Download`,children:(0,S.jsx)(`button`,{type:`button`,onClick:O,onKeyDown:e=>e.stopPropagation(),"aria-label":`Download ${o}`,className:`absolute bottom-1 right-1 flex h-6 w-6 items-center justify-center rounded-md text-white/80 transition-colors hover:bg-white/20 hover:text-white`,children:(0,S.jsx)(m,{className:`h-3.5 w-3.5`})})})})]}),(0,S.jsx)(i,{variant:`label-small-default`,className:`max-w-[64px] truncate text-[var(--content-tertiary)]`,children:T}),!D&&(0,S.jsx)(i,{variant:`label-small-default`,className:`text-[var(--content-disabled)]`,children:E})]})}function E({attachments:e,assistantId:t}){let[n,r]=(0,x.useState)(new Set),i=(0,x.useCallback)(e=>{r(t=>t.has(e)?t:new Set(t).add(e))},[]),a=(0,x.useMemo)(()=>n.size===0?e:e.map(e=>n.has(e.id)?{...e,previewUrl:null}:e),[e,n]),{openPreview:o,previewModal:s}=f(t,a);return{displayAttachments:a,renderSquare:(0,x.useCallback)((n,r)=>(0,S.jsx)(T,{attachment:n,onPreview:()=>o(n),onDownload:()=>void u(e[r]??n,t),onPreviewError:()=>i(n.id)},n.id),[e,t,o,i]),openPreview:o,markImageFailed:i,previewModal:s}}export{C as n,E as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{t as n}from"./button-DWxxMNqc.js";import{n as r,u as i}from"./chunk-5KNZJZUH-Bsoom5--.js";import{c as a,g as o,n as s}from"./QueryClientProvider-CMu7CkQU.js";import{t as c}from"./useQuery-Bz-fbQ-m.js";import{t as l}from"./useMutation-CXGTrp4W.js";import{t as u}from"./jsx-runtime-D3ZM-ToX.js";import{t as d}from"./typography-BeUa5Fd-.js";import{t as f}from"./createLucideIcon-C1mdGPB9.js";import{t as p}from"./arrow-right-UTImTy7b.js";import{t as m}from"./check-DRqtWHWc.js";import{t as h}from"./circle-alert-C1Hon9Us.js";import{t as g}from"./circle-check-CoU8jUcF.js";import{t as _}from"./coins-DMUWIOL8.js";import{t as v}from"./cpu-D69Rp7jS.js";import{t as y}from"./hard-drive-CMtjuH7I.js";import{t as b}from"./info-DJd5yI-U.js";import{t as x}from"./loader-circle-D7A_UeUb.js";import{t as S}from"./mail-CgnilCq4.js";import{t as C}from"./triangle-alert-CuEUegtS.js";import{t as w}from"./notice-DrCduoXJ.js";import{t as T}from"./modal-UqO42jBg.js";import{n as E}from"./toast-DFRsyumK.js";import{t as ee}from"./confirm-dialog-CsxDM9Vd.js";import{t as D}from"./dropdown-CLoJyNei.js";import{n as O}from"./resolved-assistants-store-CcfVZNkg.js";import{X as k,d as te,et as A,f as j,p as ne,u as M}from"./auth-store-344lpSdW.js";import{S as re,b as ie}from"./native-biometric-CbCUFdjC.js";import{d as ae}from"./routes-gT_HcUb1.js";import{f as oe}from"./platform-detection-C5Xt8-QJ.js";import{n as N}from"./use-assistant-avatar-C7ze3vgm.js";import{r as se}from"./use-is-org-ready-CzV7o_oQ.js";import{n as ce,r as P}from"./browser-vie4LRYm.js";import{C as le,O as ue,Tt as de,c as fe,ct as pe,dt as me,et as F,it as he,l as ge,lt as _e,ot as I,r as ve,st as ye,tt as L,ut as be,y as xe}from"./react-query.gen-nOsyoQ6U.js";import{t as Se}from"./avatar-bundled-components-CwoY0fNX.js";import{r as R}from"./use-avatar-accent-var-DpG_e3Ig.js";import{t as z}from"./misc-DkLRKNc9.js";import{n as B,t as Ce}from"./avatar-tone-Cnko8w64.js";import{t as V}from"./chat-avatar-sQ6tX-4v.js";import{t as we}from"./avatar-renderer-BnZamcjg.js";import{n as Te}from"./use-bundled-avatar-components-DjSw8dxI.js";import{t as Ee}from"./android-consumption-only-DT4SppcW.js";import{c as De,i as H,l as Oe,n as U,r as ke,t as Ae}from"./machine-sizes-DwjJlMD9.js";import{a as je,i as Me,n as Ne,r as Pe,t as Fe}from"./provisioning-targets-P0R2EB_9.js";import{t as Ie}from"./environment-store-DPPZjQBr.js";var W=f(`computer`,[[`rect`,{width:`14`,height:`8`,x:`5`,y:`2`,rx:`2`,key:`wc9tft`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,key:`w68u3i`}],[`path`,{d:`M6 18h2`,key:`rwmk9e`}],[`path`,{d:`M12 18h6`,key:`aqd8w3`}]]),G=u();function Le({children:e,redirectToBilling:t=!1}){return oe()?t?(0,G.jsx)(r,{replace:!0,to:ae.settings.usageBilling}):(0,G.jsx)(w,{tone:`info`,children:Ee}):e}var K=e(t(),1);function Re({icon:e}){return(0,G.jsx)(`span`,{className:`flex h-11 w-11 items-center justify-center rounded-full`,style:{backgroundColor:`color-mix(in oklab, var(--system-negative-strong) 12%, transparent)`},children:(0,G.jsx)(e,{className:`h-5 w-5`,style:{color:`var(--system-negative-strong)`},"aria-hidden":`true`})})}var ze={fontFamily:`var(--font-serif)`,fontSize:`32px`,fontWeight:400,lineHeight:1.2,letterSpacing:`0.64px`};function Be({title:e,subtitle:t}){return(0,G.jsxs)(`header`,{className:`flex flex-col items-center gap-2 pt-12 text-center`,children:[(0,G.jsx)(`h2`,{className:`text-[var(--content-emphasised)]`,style:ze,children:e}),t&&(0,G.jsx)(`p`,{className:`text-[14px] font-normal text-[var(--content-secondary)]`,children:t})]})}var Ve=[{bodyShape:`star`,eyeStyle:`curious`,color:`yellow`,size:103,position:`-left-[28px] -top-[33px]`,rotate:180},{bodyShape:`star`,eyeStyle:`curious`,color:`orange`,size:109,position:`left-[63%] -top-[62px] -translate-x-1/2`,rotate:-8},{bodyShape:`blob`,eyeStyle:`grumpy`,color:`green`,size:76,position:`-right-[25px] top-[60px]`,rotate:1},{bodyShape:`stack`,eyeStyle:`gentle`,color:`purple`,size:110,position:`-left-[39px] top-[74%]`,rotate:0},{bodyShape:`urchin`,eyeStyle:`goofy`,color:`pink`,size:137,position:`-right-[42px] -bottom-[40px]`,rotate:180},{bodyShape:`sprout`,eyeStyle:`curious`,color:`orange`,size:72,position:`left-[37%] -bottom-[22px] -translate-x-1/2`,rotate:0}],q=[{bodyShape:`star`,eyeStyle:`curious`,color:`yellow`,size:103,position:`-left-[28px] -top-[33px]`,rotate:180},{bodyShape:`star`,eyeStyle:`curious`,color:`orange`,size:109,position:`left-[63%] -top-[62px] -translate-x-1/2`,rotate:-8},{bodyShape:`blob`,eyeStyle:`grumpy`,color:`green`,size:76,position:`-right-[25px] top-[60px]`,rotate:1}];function J({variant:e=`full`}){let t=Te();return t?(0,G.jsx)(`div`,{"aria-hidden":`true`,"data-testid":`creature-corners`,className:`pointer-events-none absolute inset-0 select-none`,children:(e===`top`?q:Ve).map((e,n)=>(0,G.jsx)(`span`,{className:`absolute ${e.position}`,style:{rotate:`${e.rotate}deg`},children:(0,G.jsx)(we,{components:t,bodyShapeId:e.bodyShape,eyeStyleId:e.eyeStyle,colorId:e.color,size:e.size})},n))}):null}var He={waitingStatus:`Upgrading your assistant…`,snagStatus:`We hit a snag upgrading your assistant`,snagCaption:`Retry in the background and we'll keep working on your upgrade.`,confirmingStatus:`Confirming your upgrade…`,confirmTimeoutStatus:`Still confirming your upgrade`,confirmTimeoutCaption:`Your payment went through safely. This can take a minute.`,backgroundConfirmMessage:`Your assistant is still upgrading. Chatting won't be available until it finishes. You can keep waiting here, or continue and we'll let you know when it's ready.`,backgroundExitToast:`Your upgrade continues in the background.`,backgroundRetryToast:`We'll retry your upgrade in the background.`,completeSubtitle:`Enjoy the new found power.`,fetchErrorBody:`We hit a problem checking your subscription. Your upgrade may still be processing. Return to billing to refresh.`},Ue={waitingStatus:`Updating your assistant…`,snagStatus:`We hit a snag updating your assistant`,snagCaption:`Retry in the background and we'll keep working on your plan change.`,confirmingStatus:`Confirming your plan change…`,confirmTimeoutStatus:`Still confirming your plan change`,confirmTimeoutCaption:`Your plan change was submitted. This can take a minute.`,backgroundConfirmMessage:`Your assistant is still updating. Chatting won't be available until it finishes. You can keep waiting here, or continue and we'll let you know when it's ready.`,backgroundExitToast:`Your plan change continues in the background.`,backgroundRetryToast:`We'll retry your plan change in the background.`,completeSubtitle:`Your plan changes are live.`,fetchErrorBody:`We hit a problem checking your subscription. Your plan change may still be processing. Return to billing to refresh.`},We={upgrade:He,downgrade:Ue,change:Ue};function Y(e=`upgrade`){return We[e]}function X(e,t=!0){let{data:n}=c({...ve(),enabled:t&&e==null}),{data:r}=c({...ue({path:{id:e??``}}),enabled:t&&e!=null});return e==null?n:r}function Z({assistantId:e,direction:t}){let r=i(),a=X(e,se())?.name||`your assistant`;return(0,G.jsxs)(`div`,{className:`relative flex min-h-[320px] flex-col items-center justify-center overflow-hidden px-8 pb-16 [animation:onboarding-step-in_350ms_ease-out] motion-reduce:[animation:none]`,children:[(0,G.jsx)(J,{variant:`full`}),(0,G.jsxs)(`div`,{className:`relative flex w-full flex-col items-center`,children:[(0,G.jsx)(Be,{title:`You're all set!`,subtitle:Y(t).completeSubtitle}),(0,G.jsx)(`div`,{className:`mt-10 flex w-full flex-col items-center gap-10`,children:(0,G.jsxs)(n,{variant:`primary`,"data-testid":`onboarding-complete-return`,onClick:()=>{e!=null&&k(e),r(ae.assistant,{replace:!0})},children:[`Return to `,a]})})]})]})}function Ge(e=!0,t){let n=X(t,e),r=t??n?.id,{data:i,isError:a,isFetching:o,dataUpdatedAt:s,errorUpdatedAt:l}=c({...fe({path:{assistant_id:r??``}}),enabled:e&&!!r});return{assistant:n,assistantId:r,domains:i,domainsError:a,domainsFetching:o,domainsUpdatedAt:s,domainsErrorUpdatedAt:l}}var Ke=1e3,qe=1e4,Je=2500,Ye=2e3,Xe=1e4,Ze=[`machine_size`,`subdomain`,`non_field_errors`],Qe={subdomain_taken:`That subdomain is already taken. Try another.`,assistant_already_has_domain:`Your assistant already has a custom domain.`,no_assistant_to_attach_domain:`We couldn't find an assistant to attach this domain to.`,exceeds_machine_tier:`That machine size isn't available on your plan.`,provisioning_submission_failed:`We couldn't queue your upgrade just now. Try again in a moment.`,no_active_pro:`We couldn't confirm your Pro plan yet. Try again in a moment.`,no_provisionable_assistants:`We couldn't find an assistant to upgrade yet. Try again in a moment.`},$e={provisioning_submission_failed:`We couldn't queue your plan change just now. Try again in a moment.`,no_provisionable_assistants:`We couldn't find an assistant to update yet. Try again in a moment.`};function et(e,t,n=`upgrade`){if(e&&typeof e==`object`){let t=e;if(typeof t.error==`string`){let e=(n===`upgrade`?void 0:$e[t.error])??Qe[t.error];if(e)return e}for(let e of Ze){let n=t[e];if(Array.isArray(n)&&typeof n[0]==`string`)return n[0]}if(typeof t.detail==`string`)return t.detail}return t}var tt=`h-8 rounded-lg border border-[var(--border-element)] bg-[var(--field-bg)] px-2.5 text-[14px] text-[var(--content-default)] placeholder:text-[var(--content-tertiary)] outline-none transition-[border-color] duration-150 focus:border-[var(--border-active)] disabled:cursor-not-allowed disabled:opacity-60`,nt=`text-[11px] font-medium text-[var(--content-secondary)]`;function rt({onExit:e,machineBusy:t=!1,assistantId:r}){let i=s(),a=Ie.use.emailRootDomain(),{assistant:o,assistantId:c,domains:u}=Ge(!0,r),d=u?.results[0],[f,p]=(0,K.useState)(``),[m,h]=(0,K.useState)(`hi`),[g,_]=(0,K.useState)(!1);(0,K.useEffect)(()=>{if(!g){if(d){p(d.subdomain),_(!0);return}!o?.handle||f||(p(o.handle),_(!0))}},[o?.handle,d,g,f]);let[v,y]=(0,K.useState)(null),[b,x]=(0,K.useState)(!1),S=l(I()),C=!!d||b,E=S.isPending||b;return(0,K.useEffect)(()=>{if(!b)return;let t=setTimeout(e,800);return()=>clearTimeout(t)},[b,e]),(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(T.Body,{className:`animate-[onboarding-step-in_350ms_ease-out] space-y-6 pb-0 motion-reduce:animate-none`,children:[(0,G.jsx)(J,{variant:`top`}),(0,G.jsx)(Be,{title:`Assistant Email`,subtitle:`Set up an email for your assistant.`}),(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,G.jsx)(`label`,{htmlFor:`onboarding-email-prefix`,className:nt,children:`Prefix`}),(0,G.jsx)(`input`,{id:`onboarding-email-prefix`,value:m,onChange:e=>h(e.target.value.toLowerCase().trim()),disabled:E||C,readOnly:C,placeholder:`hi`,className:`${tt} w-24`})]}),(0,G.jsx)(`span`,{className:`flex h-8 items-center text-[var(--content-secondary)]`,children:`@`}),(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,G.jsx)(`label`,{htmlFor:`onboarding-email-handle`,className:nt,children:`Handle (public)`}),(0,G.jsx)(`input`,{id:`onboarding-email-handle`,value:f,onChange:e=>{p(e.target.value.toLowerCase().trim()),v&&y(null)},disabled:E||C,readOnly:C,autoFocus:!0,placeholder:`my-assistant`,"aria-invalid":!!v,className:`${tt} w-full min-w-0`})]}),(0,G.jsxs)(`span`,{className:`flex h-8 shrink-0 items-center text-[14px] text-[var(--content-tertiary)]`,children:[`.`,a]})]}),v&&(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--system-negative-strong)]`,children:v}),C&&(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:`This domain has been set and cannot be changed.`})]}),t&&!C&&(0,G.jsx)(w,{tone:`neutral`,children:`Your assistant is restarting — you can set the domain in a moment.`}),!C&&(0,G.jsx)(w,{tone:`info`,className:`border-transparent bg-[var(--surface-active)]`,children:(0,G.jsx)(`span`,{className:`font-medium text-[var(--content-tertiary)]`,children:`You won't be able to change the handle once set.`})}),b?(0,G.jsx)(w,{tone:`success`,children:`Domain set — redirecting…`}):null]}),(0,G.jsx)(T.Footer,{className:`items-center pt-6`,children:C?(0,G.jsx)(n,{variant:`primary`,"data-testid":`onboarding-domain-continue`,onClick:e,children:`Continue`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(n,{variant:`outlined`,"data-testid":`onboarding-domain-skip`,disabled:E,onClick:()=>{E||S.mutate({body:{skipped:!0}},{onSuccess:e,onError:()=>e()})},children:`Skip`}),(0,G.jsx)(n,{variant:`primary`,"data-testid":`onboarding-domain-set`,disabled:!f||E||t,onClick:()=>{E||t||!f||S.mutate({body:{subdomain:f,...m?{email_username:m}:{}}},{onSuccess:()=>{y(null),x(!0),i.invalidateQueries({queryKey:xe()}),i.invalidateQueries({queryKey:ge({path:{assistant_id:c??``}})}),i.invalidateQueries({queryKey:_e()})},onError:e=>{y(et(e,`Couldn't register that subdomain. Try a different one.`))}})},children:`Next`})]})})]})}function it({onGoToBilling:e,direction:t}){return(0,G.jsxs)(`div`,{className:`flex flex-col items-center gap-4 px-6 py-10 text-center`,children:[(0,G.jsx)(Re,{icon:h}),(0,G.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,G.jsx)(d,{variant:`title-small`,as:`h1`,children:`Couldn't reach billing`}),(0,G.jsx)(d,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-secondary)]`,children:Y(t).fetchErrorBody})]}),(0,G.jsx)(n,{variant:`primary`,"data-testid":`onboarding-go-to-billing`,onClick:e,children:`Go to billing`})]})}function Q(e){let t=e/100;return Number.isInteger(t)?`$${t}`:`$${t.toFixed(2)}`}function $(e){return`${Q(e)}/mo`}function at(e){return`${Q(e)}/month`}function ot(e){return`${e>0?`+`:`−`}${Q(Math.abs(e))}/mo`}function st(e){return`${e} GB storage`}function ct(e){return`${Q(e*100)} of bundled credits`}function lt(e){let{targets:t,fromSnapshot:n,machineFloor:r,credits:i}=e,a=[];return t.machineSize==null?r!=null&&n.machineSize!=null&&n.machineSize!==r&&a.push({key:`machine`,label:`Machine`,from:H[n.machineSize],to:H[r]}):n.machineSize!==t.machineSize&&a.push({key:`machine`,label:`Machine`,from:n.machineSize==null?void 0:H[n.machineSize],to:H[t.machineSize]}),t.storageGib!=null&&(n.storageGib==null||t.storageGib>n.storageGib)&&a.push({key:`storage`,label:`Storage`,from:n.storageGib==null?void 0:`${n.storageGib} GB`,to:`${t.storageGib} GB`}),i!=null&&a.push({key:`credits`,label:`Credits`,from:i.from,to:i.to}),a}var ut=60,dt=ut*2;function ft({imageUrl:e,animateIn:t=!0}){return(0,G.jsxs)(`div`,{"aria-hidden":!0,"data-testid":`takeover-backdrop`,className:`pointer-events-none absolute inset-0 overflow-hidden${t?` provision-avatar-reveal`:``}`,children:[(0,G.jsx)(`img`,{src:e,alt:``,decoding:`async`,draggable:!1,className:`absolute left-1/2 top-1/2 max-w-none -translate-x-1/2 -translate-y-1/2 object-cover object-center`,style:{filter:`blur(${ut}px)`,width:`calc(100% + ${dt*2}px)`,height:`calc(100% + ${dt*2}px)`}}),(0,G.jsx)(`div`,{className:`absolute inset-0 bg-black/55`})]})}function pt(e){let t=e?.match(/^credits_(\d+)$/)?.[1];return t==null?null:Number(t)}function mt(e,t){if(t!=null)return e?.credit_tiers?.find(e=>e.tier===t)}function ht(e){let t=se(),{data:n}=c({...F(),enabled:t&&e});return n?.plans.find(e=>e.id===`pro`)}function gt(e,t){return t==null?0:mt(e,t)?.credits_usd??pt(t)}function _t(e){let t=ht(e!=null);if(e==null||t==null)return null;let n;if(e.kind===`package`){let r=t.packages.find(t=>t.key===e.packageKey);n=r?.credits_usd??mt(t,r?.credit_tier)?.credits_usd}else n=mt(t,e.creditTier)?.credits_usd;return n==null?null:{fromUsd:0,toUsd:n}}function vt(e){let t=ht(e!=null);if(e==null)return null;let n=gt(t,e.fromTier),r=gt(t,e.toTier);return n==null||r==null?null:{fromUsd:n,toUsd:r}}function yt(e){let t=O.use.activeAssistantId(),n=e===void 0?t:e,{components:r,traits:i,customImageUrl:a,isLoading:o}=N(n),s=(0,K.useMemo)(()=>j(),[ne()]),c=s!=null&&te(s)?s:null,l=n!=null&&!o,u=c!=null&&(n==null||n===c.assistantId),d=u&&!(l&&(r!=null||i!=null||a!=null))?c:null,f=d?d.components:r,p=d?d.traits:i,m=d?null:a,h=l||u,g=R(f,p)??(m?null:(f??Se).colors?.[0]?.hex??null);return{tintHex:h&&g?B(g):Ce,backdropImageUrl:h?m:null,ready:h,avatar:{components:f,traits:p,customImageUrl:m}}}function bt(e,t){let[n,r]=(0,K.useState)(e),i=(0,K.useRef)(0);return(0,K.useEffect)(()=>{i.current=performance.now()},[]),(0,K.useEffect)(()=>{if(t<=0||e===n)return;let a=t-(performance.now()-i.current);if(a<=0){i.current=performance.now(),r(e);return}let o=setTimeout(()=>{i.current=performance.now(),r(e)},a);return()=>clearTimeout(o)},[e,n,t]),t<=0?e:n}var xt=`--takeover-surface`,St=`var(${xt},${Ce})`,Ct=`color-mix(in srgb, var(--content-emphasised) 10%, transparent)`,wt=240,Tt=1.414,Et=[{minHeight:680,size:wt},{minHeight:600,size:184}],Dt=132;function Ot(e){for(let t of Et)if(e>=t.minHeight)return t.size;return Dt}function kt(){let[e,t]=(0,K.useState)(()=>Ot(typeof window>`u`?1/0:window.innerHeight));return(0,K.useEffect)(()=>{let e=()=>t(Ot(window.innerHeight));return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),e}var At={machine:v,storage:y,credits:_},jt={idle:``,working:` is-working`,settling:` is-settling`,stalled:` is-stalled`,grown:` is-evolved`};function Mt(e,t){return e===`DONE`||e===`NOT_APPLICABLE`?`grown`:e===`STALLED`?`stalled`:e===`WAITING`||e===`RESIZING`?t?`settling`:`working`:`idle`}function Nt({assistantId:e,mode:t,downsizing:n=!1}){let{avatar:r,ready:i}=yt(e),a=Te(),o=kt(),s=t===`working`||t===`settling`;return(0,G.jsxs)(`div`,{"aria-hidden":!0,className:`provision-avatar-evolve relative z-10 flex flex-col items-center${jt[i?t:`idle`]}${n?` is-downsizing`:``}`,style:{"--provision-avatar-size":`${o}px`,"--provision-avatar-growth":Tt},children:[(0,G.jsxs)(`div`,{className:`provision-avatar-stage`,children:[(0,G.jsx)(`div`,{"data-testid":`provision-avatar-placeholder`,className:`provision-avatar-placeholder${i?` is-resolved`:``}`}),(0,G.jsx)(`div`,{className:`provision-avatar-layer`,children:(0,G.jsx)(`div`,{className:`provision-avatar-current`,children:(0,G.jsx)(`div`,{className:`provision-avatar-strain`,children:i&&(0,G.jsx)(`div`,{className:`provision-avatar-reveal`,children:(0,G.jsx)(V,{components:r.components??a,traits:r.traits,customImageUrl:r.customImageUrl,size:o,isAssistantBusy:s})})})})})]}),(0,G.jsx)(`div`,{className:`provision-avatar-shadow`})]})}function Pt({status:e,caption:t}){return(0,G.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5`,children:[(0,G.jsx)(`h1`,{className:`text-[var(--content-emphasised)]`,style:ze,children:e}),t&&(0,G.jsx)(d,{variant:`body-medium-lighter`,as:`p`,className:`max-w-sm text-[var(--content-secondary)]`,children:t})]})}function Ft({icon:e,label:t,from:n,to:r,done:i=!1,pending:a=!1,testId:o}){let s=null;return i?s=`Complete`:a&&(s=`Pending`),(0,G.jsxs)(`div`,{"data-testid":o,className:`flex min-w-0 flex-auto items-center gap-2 rounded-lg px-2 py-1.5${a?` opacity-70`:``}`,style:{backgroundColor:Ct},children:[(0,G.jsx)(`span`,{className:`hidden h-6 w-6 shrink-0 items-center justify-center min-[420px]:flex`,children:(0,G.jsx)(e,{className:`h-3.5 w-3.5 text-[var(--content-tertiary)]`,"aria-hidden":`true`})}),(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 text-left wrap-anywhere`,children:[(0,G.jsx)(`span`,{className:`text-[12px] font-medium leading-tight text-[var(--content-tertiary)]`,children:t}),(0,G.jsxs)(`span`,{className:`flex flex-wrap items-center gap-1.5 text-[14px] font-medium leading-[18px] text-[var(--content-emphasised)]`,children:[n&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`span`,{children:n}),(0,G.jsx)(`span`,{className:`sr-only`,children:`to`}),(0,G.jsx)(p,{className:`h-3 w-3 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":`true`})]}),(0,G.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,G.jsx)(`span`,{children:r}),i?(0,G.jsx)(m,{"data-testid":`chip-check`,className:`h-3.5 w-3.5 shrink-0 text-[var(--system-positive-strong)]`,"aria-hidden":`true`}):a&&(0,G.jsx)(x,{"data-testid":`chip-spinner`,className:`h-3.5 w-3.5 shrink-0 animate-spin text-[var(--content-tertiary)] motion-reduce:animate-none`,"aria-hidden":`true`})]}),s&&(0,G.jsx)(`span`,{className:`sr-only`,children:s})]})]})]})}function It({label:e}){return(0,G.jsx)(`span`,{className:`rounded-lg px-3 py-2 text-[14px] text-[var(--content-emphasised)]`,style:{backgroundColor:Ct},children:e})}function Lt({children:e,wide:t=!1,testId:n}){return(0,G.jsx)(`div`,{"data-testid":n,className:`flex w-full ${t?`max-w-2xl`:`max-w-sm`} items-stretch justify-center gap-2`,children:e})}function Rt(e,t){return e===`credits`?!0:t?.[e]===!0}function zt({intent:e,creditsChange:t,targets:n,fromSnapshot:r,machineFloor:i,landed:a,allDone:o=!1,creditsOnly:s=!1}){let c=_t(e),l=vt(t),u=c??l,d=lt({targets:n,fromSnapshot:r,machineFloor:i,credits:u==null?null:{from:$(u.fromUsd*100),to:$(u.toUsd*100)}}),f=s?d.filter(e=>e.key===`credits`):d,p=f.filter(e=>o||Rt(e.key,a)).map(e=>e.label).join(`, `),[m]=(0,K.useState)(p),h=p===m?``:`${p} complete`;return f.length===0?null:(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Lt,{testId:`resource-chips`,wide:f.length>=3,children:f.map(e=>{let t=o||Rt(e.key,a);return(0,G.jsx)(Ft,{testId:`chip-${e.key}`,icon:At[e.key],label:e.label,from:e.from,to:e.to,done:t,pending:!t},e.key)})}),(0,G.jsx)(`p`,{"aria-live":`polite`,className:`sr-only`,"data-testid":`chip-announcement`,children:h})]})}function Bt({intent:e}){if(e.kind===`package`)return(0,G.jsx)(Lt,{children:(0,G.jsx)(It,{label:`${e.packageKey.charAt(0).toUpperCase()+e.packageKey.slice(1)} package`})});let t=[e.machineTier,e.storageTier,e.creditTier].filter(e=>e!=null).length;return(0,G.jsxs)(Lt,{wide:t>=3,children:[e.machineTier!=null&&(0,G.jsx)(Ft,{icon:v,label:`Machine`,to:U[e.machineTier]??e.machineTier}),e.storageTier!=null&&(0,G.jsx)(Ft,{icon:y,label:`Storage`,to:e.storageTier.toUpperCase()}),e.creditTier!=null&&(0,G.jsx)(It,{label:`${e.creditTier.replace(`credits_`,``)} credits`})]})}function Vt({state:e,direction:t,softWaiting:r,intent:i,creditsChange:a,targets:o,fromSnapshot:s,machineFloor:c,landed:l,celebrating:u,onCelebrationEnd:d,assistantId:f,escapeAvailable:p,onEscape:m,onPhaseChange:h,kickError:g,confirm:_,dwellMs:v=Je,phaseMinMs:y=900}){let b=Y(t),x=(0,K.useRef)(d);(0,K.useEffect)(()=>{x.current=d},[d]);let S=bt(e,y),C=S===`DONE`||S===`NOT_APPLICABLE`,w=S===`RESIZING`?`WAITING`:S,T=(0,K.useRef)(h);(0,K.useEffect)(()=>{T.current=h},[h]),(0,K.useEffect)(()=>{T.current?.(S)},[S]);let{tintHex:E,backdropImageUrl:ee}=yt(f),D=u&&C;return(0,K.useEffect)(()=>{if(!D)return;let e=setTimeout(()=>x.current(),v);return()=>clearTimeout(e)},[D,v]),(0,G.jsxs)(`div`,{"data-theme":`dark`,className:`provision-surface-settle relative flex h-full min-h-[420px] w-full flex-col items-center [justify-content:safe_center] gap-10 px-6 py-10 text-center`,style:{[xt]:E,backgroundColor:St},children:[ee&&(0,G.jsx)(ft,{imageUrl:ee}),(0,G.jsx)(Nt,{assistantId:f,mode:Mt(S,r),downsizing:t===`downgrade`}),(0,G.jsx)(`div`,{className:`relative z-10 flex min-h-[144px] w-full flex-col items-center gap-8 [animation:onboarding-step-in_420ms_ease-out] motion-reduce:[animation:none]`,children:te()},w)]});function O(e=`Continue in the background`){return p?(0,G.jsx)(n,{variant:`ghost`,"data-testid":`provisioning-escape`,onClick:m,children:e}):null}function k({allDone:e=!1,creditsOnly:t=!1}={}){return(0,G.jsx)(zt,{intent:i,creditsChange:a,targets:o,fromSnapshot:s,machineFloor:c,landed:l,allDone:e,creditsOnly:t})}function te(){if(S===`CONFIRMING`)return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Pt,{status:b.confirmingStatus,caption:`This might take a couple seconds.`}),i&&(0,G.jsx)(Bt,{intent:i}),O()]});if(S===`WAITING`||S===`RESIZING`)return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Pt,{status:b.waitingStatus,caption:r?`Still working — this can take a minute or two.`:`This might take a couple seconds.`}),k(),O()]});if(S===`DONE`)return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Pt,{status:`All done!`}),k({allDone:!0})]});if(S===`NOT_APPLICABLE`)return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Pt,{status:`Your plan is ready`}),k({allDone:!0,creditsOnly:!0})]});if(S===`STALLED`){let e=g!=null;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Pt,{status:e?b.snagStatus:`This is taking longer than expected`,caption:e?et(g,b.snagCaption,t):`This may take a couple of minutes.`}),k(),e?O(`Retry in the background`):O()]})}return S===`CONFIRM_TIMEOUT`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Pt,{status:b.confirmTimeoutStatus,caption:b.confirmTimeoutCaption}),(0,G.jsxs)(`div`,{className:`flex items-center gap-2 pt-1`,children:[(0,G.jsx)(n,{variant:`outlined`,"data-testid":`onboarding-go-to-billing`,onClick:_.onGoToBilling,children:`Go to billing`}),(0,G.jsx)(n,{variant:`primary`,"data-testid":`onboarding-retry`,onClick:_.onRetry,children:`Try again`})]})]}):null}}function Ht(e){let{planId:t,targets:n,actuals:r,initialActuals:i,resizeOperationInFlight:a,sawOperation:o,msSinceWatchStart:s,confirmExpired:c,serverVerdict:l=null,statusObservedSinceTargetsMet:u=!0,targetsProveNoop:d=!0}=e;if(t!==`pro`)return{state:c?`CONFIRM_TIMEOUT`:`CONFIRMING`,softWaiting:!1};let f=o||a,p=l===`started`||l===`in_progress`,m=o||d&&u;if(!a){let e=p?m:f||l===`already_done`||i!=null&&!je(n,i);if(je(n,r)){if(e)return{state:`DONE`,softWaiting:!1};if(!p&&(d||l===`not_applicable`))return{state:`NOT_APPLICABLE`,softWaiting:!1}}else{if(l===`already_done`)return{state:`DONE`,softWaiting:!1};if(l===`not_applicable`)return{state:`NOT_APPLICABLE`,softWaiting:!1}}}return s!=null&&s>=9e4?{state:`STALLED`,softWaiting:!1}:f||l===`started`||l===`in_progress`?{state:`RESIZING`,softWaiting:!1}:{state:`WAITING`,softWaiting:s!=null&&s>=3e4}}var Ut=2e3,Wt=1e3,Gt=[`DONE`,`NOT_APPLICABLE`,`CONFIRM_TIMEOUT`],Kt={assistantId:null,machine:null,storage:null};function qt({open:e,canLowerResources:t=!1,verdictRecheckMs:n=Xe}){let r=s(),i=se(),[u,d]=(0,K.useState)(!1),[f,p]=(0,K.useState)(0),[m,h]=(0,K.useState)(null),[g,_]=(0,K.useState)(null),[v,y]=(0,K.useState)(null),[b,x]=(0,K.useState)(null),[S,C]=(0,K.useState)(null),[w,T]=(0,K.useState)(null),[E,ee]=(0,K.useState)(Kt),[D,O]=(0,K.useState)(null),[k,te]=(0,K.useState)(!1),j=(0,K.useRef)(!1),ne=(0,K.useRef)(!1),M=(0,K.useRef)(0),[re,ie]=(0,K.useState)(!1),[ae,oe]=(0,K.useState)(null),[N,ce]=(0,K.useState)(null),[P,de]=(0,K.useState)(null),[fe,F]=(0,K.useState)(()=>Date.now()),[he,ge]=(0,K.useState)(!0);(0,K.useEffect)(()=>{e||(d(!1),p(0),h(null),_(null),y(null),ie(!1),oe(null),ce(null),de(null),ge(!0),x(null),C(null),T(null),ee(Kt),O(null),te(!1),j.current=!1,ne.current=!1,M.current+=1)},[e]),(0,K.useEffect)(()=>{e&&(h(Date.now()),r.invalidateQueries({queryKey:me()}),r.invalidateQueries({queryKey:_e()}))},[e,r]);let I=g!=null,L=c({...be(),refetchInterval:e=>e.state.data?.plan_id===`pro`||u?!1:Ke,refetchIntervalInBackground:!1,enabled:e&&i&&!I}),xe=(m!=null&&L.dataUpdatedAt>=m?L.data?.plan_id:null)??null;(0,K.useEffect)(()=>{if(!e||I||xe!==`pro`)return;let t=Date.now();_(t),F(t)},[e,I,xe]),(0,K.useEffect)(()=>{if(!e||I)return;let t=setTimeout(()=>d(!0),qe);return()=>clearTimeout(t)},[e,I,f]);let Se=(0,K.useCallback)(()=>{d(!1),p(e=>e+1),A.getState().fetchOrganizations(),r.invalidateQueries({queryKey:me()})},[r]),R=(0,K.useCallback)(()=>{let e=Date.now();y(e),F(e)},[]),{mutate:z}=l(ye()),B=(0,K.useCallback)(e=>{let t=M.current;z({},{onSuccess:n=>{t===M.current&&(O(null),Ne(n)?ne.current?O({error:n.reason??`no_active_pro`}):(ne.current=!0,te(!0),e===`escape`&&R()):(x(n.state),e===`escape`&&R()))},onError:e=>{t===M.current&&O(e)}})},[z,R]);(0,K.useEffect)(()=>{!e||!i||!I||j.current||(j.current=!0,B(`auto`))},[e,i,I,B]),(0,K.useEffect)(()=>{if(!k)return;let e=M.current,t=setTimeout(()=>{te(!1),e===M.current&&B(`auto`)},Ye);return()=>clearTimeout(t)},[k,B]);let Ce=(0,K.useCallback)(()=>B(`escape`),[B]),V=c({...pe(),enabled:e&&i&&I}),we=he?Ut:!1,Te=c({...ve(),enabled:e&&i&&I,refetchInterval:e=>e.state.data?.id==null?we:!1,retry:!1}),Ee=I&&m!=null&&V.dataUpdatedAt>=m,H=Ee&&!V.isPending&&!V.isFetching,U=(Ee?V.data?.primary_assistant_id:null)??(V.isPending?null:Te.data?.id??null),ke=c({...ue({path:{id:U??`unresolved`}}),enabled:e&&i&&I&&U!=null,refetchInterval:we,retry:!1}),Ie=le({path:{id:U??`unresolved`}}),W=c({...Ie,enabled:e&&i&&I&&U!=null,refetchInterval:we,retry:!1}),G=(0,K.useRef)(0),[Le,Re]=(0,K.useState)(0),ze=o(Ie.queryKey);(0,K.useEffect)(()=>r.getQueryCache().subscribe(t=>{if(!(t.type!==`updated`||t.query.queryHash!==ze)){if(t.action.type===`fetch`)G.current+=1;else if(t.action.type===`success`&&!t.action.manual){let n=G.current,r=e&&Pe(t.action.data);a.schedule(()=>{Re(n),r&&(ie(!0),oe(U))})}}}),[r,ze,e,U]);let Be=Pe(W.data),Ve=ae===U,q=V.data,J=(0,K.useMemo)(()=>q?{machineSize:De(q.max_machine_tier),storageGib:q.selected_storage_gib??null}:null,[q]),He=q!=null&&q.max_machine_tier==null?Ae:null,Ue=q?q.domain_setup_available&&q.primary_assistant_id!=null:void 0,We=ke.data,Y=(0,K.useMemo)(()=>We?{machineSize:We.machine_size??null,storageGib:We.provisioned_storage_gib??null}:null,[We]),X=P===U,Z=(0,K.useMemo)(()=>{let e=Fe(J,Y),t=J?.machineSize??He;if(t==null)return e;let n=Y?.machineSize??null;if(n==null)return{...e,machine:!1};let r=(X?N?.machineSize:null)??n,i=Oe(t)<Oe(r);return{...e,machine:i?Oe(n)<=Oe(t):Oe(n)>=Oe(t)}},[J,Y,N,X,He]),Ge=je(J,Y),Je=w===U;(0,K.useEffect)(()=>{e&&(Ge?(C(e=>e!=null&&Je?e:Date.now()),T(U)):(C(null),T(null)))},[e,Ge,U,Je]);let Ze=E.assistantId===U;(0,K.useEffect)(()=>{if(!e)return;let t=G.current;ee(e=>{let n=e.assistantId===U?e:Kt,r=Z.machine?n.machine??t:null,i=Z.storage?n.storage??t:null;return e.assistantId===U&&e.machine===r&&e.storage===i?e:{assistantId:U,machine:r,storage:i}})},[e,Z,U]);let Qe=(0,K.useMemo)(()=>{let e=Me(W.data),t=e=>e!=null&&Ze&&Le>e;return{machine:Z.machine&&!e.machine&&t(E.machine),storage:Z.storage&&!e.storage&&t(E.storage)}},[Z,E,Ze,Le,W.data]);(0,K.useEffect)(()=>{!e||!Y||N!=null&&X||(ce(Y),de(U))},[e,Y,U,N,X]);let $e=v??g,et=$e==null?null:Math.max(0,fe-$e),tt=!t,{state:nt,softWaiting:rt}=Ht({planId:I?`pro`:xe,targets:J,actuals:Y,initialActuals:X?N:null,resizeOperationInFlight:Be,sawOperation:re&&Ve,msSinceWatchStart:et,confirmExpired:u,serverVerdict:b,statusObservedSinceTargetsMet:S!=null&&Je&&W.dataUpdatedAt>S,targetsProveNoop:tt}),it=Gt.includes(nt),Q=e&&I&&!it;(0,K.useEffect)(()=>{ge(Q)},[Q]),(0,K.useEffect)(()=>{if(!e||!I||it)return;let t=setInterval(()=>F(Date.now()),Wt);return()=>clearInterval(t)},[e,I,it]);let $=!tt&&(b===`started`||b===`in_progress`)&&!(re&&Ve);return(0,K.useEffect)(()=>{if(!e||!I||it||!$)return;let t=setInterval(()=>B(`auto`),n);return()=>clearInterval(t)},[e,I,it,$,n,B]),{state:nt,softWaiting:rt,targets:J,actualsSnapshot:N,machineFloor:He,landed:Qe,assistantId:U,domainStepAvailable:Ue,onboardingSettled:H,confirmError:!I&&L.isError,targetsError:I&&V.isError&&(!q||!Ee),escapeEligible:et!=null&&et>=6e4,retryConfirm:Se,kickProvisioning:Ce,kickError:D}}var Jt=200,Yt=380;function Xt(){return typeof window<`u`&&window.matchMedia?.(`(prefers-reduced-motion: reduce)`).matches===!0}var Zt=e=>e===`WAITING`||e===`RESIZING`||e===`STALLED`,Qt=e=>e===`DONE`||e===`NOT_APPLICABLE`,$t={machineSize:null,storageGib:null};function en({open:e,onClose:t,dwellMs:n,phaseMinMs:r,mode:i=`checkout`,resizeContext:a}){let o=i===`resize`,c=s(),[l,u]=(0,K.useState)(`provisioning`),[d,f]=(0,K.useState)(`idle`),p=(0,K.useRef)([]),[m,h]=(0,K.useState)(null),[g,_]=(0,K.useState)(null),[v,y]=(0,K.useState)(null),[b,x]=(0,K.useState)(!1),S=o?a?.direction:void 0,C=Y(S),w=qt({open:e,canLowerResources:o?a?.canLowerResources===!0:!1}),D=(0,K.useRef)(!1);(0,K.useEffect)(()=>{if(e){D.current=!0,h(o?null:re()),y(e=>e??Date.now());return}p.current.forEach(clearTimeout),p.current=[],u(`provisioning`),f(`idle`),_(null),y(null),x(!1),D.current&&(D.current=!1,M())},[e,o]),(0,K.useEffect)(()=>()=>{p.current.forEach(clearTimeout)},[]),(0,K.useEffect)(()=>{l===`complete`&&ie()},[l]);let O=Zt(w.state),k=Qt(g??w.state),{targets:te,assistantId:A,domainStepAvailable:j,onboardingSettled:ne}=w,ae=o?a?.fromSnapshot:void 0,oe=w.actualsSnapshot,N={machineSize:ae?.machineSize??oe?.machineSize??null,storageGib:ae?.storageGib??oe?.storageGib??null},{tintHex:se,backdropImageUrl:ce}=yt(A),P=o&&j===!0,{domains:le,domainsError:ue,domainsFetching:de,domainsUpdatedAt:fe,domainsErrorUpdatedAt:pe}=Ge(e&&P,A),me=(le?.results.length??0)>0,F=(0,K.useRef)(null);(0,K.useEffect)(()=>{if(!e){F.current=null;return}!P||A==null||F.current!==A&&(F.current=A,c.invalidateQueries({queryKey:ge({path:{assistant_id:A}})}))},[e,P,A,c]);let he=!de&&(v!=null&&fe>=v||v!=null&&!!ue&&pe>=v),[_e,I]=(0,K.useState)(!1),ve=ne&&(!P||he);(0,K.useEffect)(()=>{if(!e){I(!1);return}ve&&I(!0)},[e,ve]);let ye=(0,K.useCallback)(()=>{let e=o?j===!0&&!me?`domain`:`complete`:j===!1?`complete`:`domain`;if(Xt()){u(e);return}f(`covering`),p.current.push(setTimeout(()=>{u(e),f(`revealing`),p.current.push(setTimeout(()=>f(`idle`),Yt))},Jt))},[j,o,me]),L=(0,K.useCallback)(()=>{x(!0)},[]),be=(0,K.useCallback)(()=>{w.kickProvisioning(),E.info(w.kickError==null?C.backgroundExitToast:C.backgroundRetryToast),x(!1),t()},[w,t,C]),xe=(0,K.useCallback)(()=>{x(!1)},[]),Se=l===`provisioning`&&(w.confirmError||w.targetsError),R=l===`provisioning`&&!Se,z=R&&!k,B=`transition-[background-color] duration-300 ease-out${R?` bg-black p-0`:``}`,Ce=R?`[animation:fadeIn_0.45s_ease-out_both]`:d===`revealing`?`[animation:fadeInUp_0.42s_ease-out_0.12s_both]`:`[animation:fadeIn_0.25s_ease-out_both]`;return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(T.Root,{open:e,onOpenChange:e=>{e||t()},children:(0,G.jsxs)(T.Content,{size:`md`,hideCloseButton:l!==`complete`,dismissOnOverlayClick:!z,onEscapeKeyDown:z?e=>e.preventDefault():void 0,onInteractOutside:z?e=>e.preventDefault():void 0,"data-theme":R?`dark`:void 0,overlayClassName:B,className:R?`overflow-y-auto inset-0 max-w-none w-screen h-screen max-h-none rounded-none border-0`:`overflow-hidden`,style:{[xt]:se},children:[(0,G.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col motion-reduce:[animation:none] ${Ce}`,children:V()},l),d!==`idle`&&(0,G.jsx)(`div`,{"aria-hidden":!0,"data-testid":`takeover-exit-sheet`,className:`pointer-events-none fixed inset-0 z-50 ${d===`covering`?`[animation:fadeIn_200ms_ease-in_both]`:`[animation:fadeIn_380ms_ease-out_both_reverse]`}`,style:{backgroundColor:St},children:ce&&(0,G.jsx)(ft,{imageUrl:ce,animateIn:!1})})]})}),(0,G.jsx)(ee,{open:b&&O,title:`Continue in the background?`,message:C.backgroundConfirmMessage,confirmLabel:`Continue`,cancelLabel:`Keep waiting`,onConfirm:be,onCancel:xe})]});function V(){return l===`provisioning`?w.confirmError||w.targetsError?(0,G.jsx)(it,{onGoToBilling:t,direction:S}):(0,G.jsx)(Vt,{state:w.state,direction:S,softWaiting:w.softWaiting,intent:m,creditsChange:o?a?.credits:void 0,targets:te??$t,fromSnapshot:N,machineFloor:w.machineFloor,landed:w.landed,celebrating:_e,onCelebrationEnd:ye,assistantId:A,escapeAvailable:O&&w.escapeEligible,onEscape:L,onPhaseChange:_,kickError:w.kickError,confirm:{onRetry:w.retryConfirm,onGoToBilling:t},dwellMs:n,phaseMinMs:r}):l===`domain`?(0,G.jsx)(rt,{machineBusy:O,assistantId:A,onExit:()=>u(`complete`)}):(0,G.jsx)(Z,{assistantId:A,direction:S})}}function tn(e){return e!=null&&!e.customized}function nn(e){return tn(e)?e.name:`Custom`}var rn=[`mighty`,`super`,`ultra`],an=[`free`,...rn];function on(e){return an.indexOf(e)}function sn(e,t){if(e===null)return`upgrade`;let n=on(e),r=on(t);return n===-1||r===-1?`upgrade`:r===n?`current`:r<n?`downgrade`:`upgrade`}function cn(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>rn.indexOf(e.key)-rn.indexOf(t.key));if(!t)return n[0];let r=n.findIndex(e=>e.key===t);return r===-1?n[0]:r>=n.length-1?null:n[r+1]}var ln={free:{bodyShape:`ninja`,eyeStyle:`angry`,color:`yellow`},mighty:{bodyShape:`blob`,eyeStyle:`grumpy`,color:`green`},super:{bodyShape:`urchin`,eyeStyle:`goofy`,color:`teal`},ultra:{bodyShape:`sprout`,eyeStyle:`curious`,color:`orange`}};function un({tier:e,size:t=40}){let n=ln[e]??ln.free,r=Te();return(0,G.jsx)(`div`,{"aria-hidden":!0,className:`inline-flex shrink-0`,children:r?(0,G.jsx)(we,{components:r,bodyShapeId:n.bodyShape,colorId:n.color,size:t}):(0,G.jsx)(`div`,{style:{width:t,height:t}})})}var dn={free:{tagline:`Get to know your assistant.`,cta:`Start Free`,priceCaption:`Forever`},mighty:{tagline:`More capacity for consistent use.`,cta:`Power Up`,priceCaption:`Billed monthly`,recommended:!0},super:{tagline:`Do more, think less about the how.`,cta:`Go Super`,priceCaption:`Billed monthly`,extraFeatures:[`Assistant email and subdomain`]},ultra:{tagline:`Your second brain, running full speed.`,cta:`Unleash Ultra`,priceCaption:`Billed monthly`,extraFeatures:[`Assistant email and subdomain`]}};function fn(e){return dn[e]}function pn(e){return`Downgrade to ${e}`}var mn=`Small`;function hn(e){return e?.machine_size?H[e.machine_size]??e.machine_size:mn}function gn(e){let t=e.credits_usd??0,n=fn(e.key)?.extraFeatures??[];return[{icon:W,label:`${hn(e)} Machine`},{icon:y,label:`${e.storage_gib} GB Storage`},{icon:_,label:`${Q(t*100)} in credits included`},...n.map(e=>({icon:S,label:e}))]}function _n(){return[{icon:W,label:`${mn} Machine`},{icon:y,label:`4 GB Storage`},{icon:_,label:`Pay as you go credits`}]}function vn(e,t=[]){let n=e?.credits_usd??0,r=e?.storage_gib??4,i=ke[e?.machine_size??`small`];return[`${hn(e)} machine${i?` (${i})`:``}`,st(r),ct(n),...t]}var yn={machine:`Configurable machine size`,storage:`Configurable storage`,credits:`Pay-as-you-go and bundled credits`};function bn(e,t){let n=[`${e.machineTier?U[e.machineTier]??t.machine_tiers.find(t=>t.tier===e.machineTier)?.label??e.machineTier:mn} Machine`];if(e.storageGib!=null&&n.push(`${e.storageGib} GB`),e.creditTier!=null){let r=mt(t,e.creditTier)?.credits_usd??pt(e.creditTier);n.push(r==null?`Credit bundle`:`${r} credits/mo`)}return n}function xn(e,t){let n=new Set([yn.machine]);return e.storageGib!=null&&n.add(yn.storage),e.creditTier!=null&&n.add(yn.credits),[...bn(e,t),...t.included_features.filter(e=>!n.has(e))]}var Sn=`billing-portal-return-snapshot`;function Cn(e){try{sessionStorage.removeItem(Sn),sessionStorage.setItem(Sn,JSON.stringify(e))}catch{}}function wn(){if(typeof sessionStorage>`u`)return null;try{let e=sessionStorage.getItem(Sn);if(!e)return null;let t=JSON.parse(e);return typeof t.cancel_at_period_end!=`boolean`||typeof t.plan_id!=`string`?null:{cancel_at_period_end:t.cancel_at_period_end,cancel_at:t.cancel_at??null,plan_id:t.plan_id}}catch{return null}}function Tn(){try{sessionStorage.removeItem(Sn)}catch{}}function En(e){return e?{cancel_at_period_end:e.cancel_at_period_end,cancel_at:e.cancel_at??null,plan_id:e.plan_id}:null}function Dn(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleDateString(void 0,{year:`numeric`,month:`long`,day:`numeric`})}function On(e){return e?e.cancel_at??e.current_period_end??null:null}function kn(e){let t=s();return(0,K.useEffect)(()=>P(()=>{t.invalidateQueries(be())}),[t]),de({onSuccess:t=>{e&&Cn(e),ce(t.portal_url)},onError:()=>{E.error(`Couldn't open the billing portal. Please try again.`,{id:`billing-portal-session-error`})}})}function An(e){return e.disabled===!0}function jn({machineTiers:e,storageTiers:t,selectedMachineTier:n,selectedStorageTier:r,onMachineTierChange:i,onStorageTierChange:a,currentMachinePriceCents:o,currentStoragePriceCents:s}){let c=(0,K.useMemo)(()=>e.map(e=>{let t=U[e.tier]??e.label,n=o==null?`+${$(e.price_cents)}`:e.price_cents===o?`(${$(e.price_cents)}, current)`:ot(e.price_cents-o);return{value:e.tier,label:`${t} ${n}`,disabled:An(e)}}),[e,o]),l=(0,K.useMemo)(()=>t.map(e=>{let t=s==null?`+${$(e.price_cents)}`:e.price_cents===s?`(${$(e.price_cents)}, current)`:ot(e.price_cents-s);return{value:e.tier,label:`${e.storage_gib} GB ${t}`,disabled:An(e)}}),[t,s]);return(0,G.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,G.jsx)(d,{as:`p`,variant:`label-small-default`,className:`text-[var(--content-secondary)]`,children:`Machine`}),(0,G.jsx)(`span`,{title:`Determines the CPU and memory allocated to your assistant`,children:(0,G.jsx)(b,{className:`h-3 w-3 text-[var(--content-tertiary)]`})})]}),(0,G.jsx)(D,{"aria-label":`Machine tier`,placeholder:`Select a machine tier`,value:n??``,onChange:i,options:c})]}),(0,G.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,G.jsx)(d,{as:`p`,variant:`label-small-default`,className:`text-[var(--content-secondary)]`,children:`Storage`}),(0,G.jsx)(`span`,{title:`Persistent disk space for your assistant's files and data`,children:(0,G.jsx)(b,{className:`h-3 w-3 text-[var(--content-tertiary)]`})})]}),(0,G.jsx)(D,{"aria-label":`Storage tier`,placeholder:`Select a storage tier`,value:r??``,onChange:a,options:l})]})]})}var Mn=new Set([`active`,`trialing`,`past_due`]);function Nn(e){return e.plan_id!==`base`&&e.cancel_at_period_end!==!0&&!e.cancel_at&&e.status!=null&&Mn.has(e.status)}var Pn=[`target_plan_id`,`confirm`,`machine_tier`,`storage_tier`,`credit_tier`,`package`,`non_field_errors`];function Fn(e,t){if(e&&typeof e==`object`){for(let t of Pn)if(t in e){let n=e[t];if(Array.isArray(n)&&typeof n[0]==`string`)return n[0]}if(`detail`in e&&typeof e.detail==`string`)return e.detail}return t}function In(e,t){let n=e.filter(e=>!An(e));return t!==null&&n.some(e=>e.tier===t)?t:n[0]?.tier??null}function Ln(e,t,n){return t===void 0?n:t!==null&&(t===n||e.some(e=>e.tier===t))?t:null}function Rn(e){return e.length?Math.min(...e.map(e=>e.price_cents)):0}function zn(){let e=s(),t=l(he());return{changePackage:async n=>{try{let r=await t.mutateAsync({body:{package:n}});return await Promise.all([e.invalidateQueries({queryKey:me()}),e.invalidateQueries({queryKey:L()}),e.invalidateQueries({queryKey:_e()})]),r}catch(e){return E.error(Fn(e,`Failed to change your plan. Please try again.`)),null}},isPending:t.isPending}}function Bn({className:e,"data-testid":t,children:n}){return(0,G.jsx)(`div`,{"aria-hidden":!0,"data-testid":t,className:z(`flex size-[52px] shrink-0 items-center justify-center rounded-xl`,e),children:n})}var Vn=32;function Hn(){let{ready:e,avatar:t}=yt();return(0,G.jsx)(Bn,{"data-testid":`assistant-avatar-tile`,className:`bg-[var(--surface-active)]`,children:e?(0,G.jsx)(V,{components:t.components,traits:t.traits,customImageUrl:t.customImageUrl,size:Vn}):null})}var Un=`Billed monthly · prorated difference charged today`,Wn=`Billed monthly · prorated difference charged today or credited next invoice`,Gn=`Billed monthly · prorated credit on your next invoice`,Kn=`Your machine downsizes now and your storage stays. No refund.`,qn=`Continue`,Jn=`The plan includes`,Yn=`Your plan will include`;function Xn(e,t,n){let r=n?fn(n)?.tagline??``:``;switch(e){case`downgrade`:return{title:pn(t),subtitle:``,priceCaption:Gn,checklistHeading:Yn,note:Kn,confirmLabel:pn(t),destructive:!0};case`switch`:return{title:`Switch to ${t}`,subtitle:r,priceCaption:Wn,checklistHeading:Jn,note:``,confirmLabel:qn,destructive:!1};default:return{title:`Upgrade to ${t}`,subtitle:r,priceCaption:Un,checklistHeading:Jn,note:``,confirmLabel:qn,destructive:!1}}}function Zn({open:e,relation:t,packageName:r,targetPackage:i,pending:a,onCancel:o,onConfirm:s}){let c=(0,K.useRef)(null),l=(0,K.useId)(),u=Xn(t,r,i?.key??null),f=i?{price:$(i.total_price_cents),highlights:vn(i,fn(i.key)?.extraFeatures??[])}:null,p=u.subtitle,m=u.note?{"aria-describedby":l}:p?{}:{"aria-describedby":void 0};return(0,G.jsx)(T.Root,{open:e,onOpenChange:e=>{!e&&!a&&o()},children:(0,G.jsxs)(T.Content,{size:`sm`,hideCloseButton:!0,className:`gap-4 p-4 max-w-[421px]`,onOpenAutoFocus:e=>{e.preventDefault(),c.current?.focus()},...m,children:[(0,G.jsxs)(T.Header,{className:`flex-row items-center gap-3 p-0 pb-2`,children:[u.destructive?(0,G.jsx)(Bn,{"data-testid":`package-switch-warning-tile`,className:`bg-[var(--system-negative-weak)]`,children:(0,G.jsx)(C,{className:`size-6 text-[var(--system-negative-strong)]`})}):(0,G.jsx)(Hn,{}),(0,G.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,G.jsx)(T.Title,{className:`text-title-small text-[var(--content-emphasised)] [&>span]:whitespace-normal`,children:u.title}),p?(0,G.jsx)(T.Description,{className:`mt-0 text-body-medium-default text-[var(--content-tertiary)]`,children:p}):null]})]}),f?(0,G.jsxs)(T.Body,{className:`flex flex-col gap-4 p-0`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,G.jsx)(d,{as:`p`,variant:`title-large`,className:`text-[var(--content-default)]`,children:f.price}),(0,G.jsx)(d,{as:`p`,variant:`label-medium-default`,className:`leading-[15px] text-[var(--content-tertiary)]`,children:u.priceCaption})]}),(0,G.jsx)(`div`,{className:`h-px w-full bg-[var(--border-hover)]`}),(0,G.jsx)(d,{as:`p`,variant:`body-small-default`,className:`text-[var(--content-tertiary)]`,children:u.checklistHeading}),(0,G.jsx)(`ul`,{className:`flex flex-col gap-2`,children:f.highlights.map(e=>(0,G.jsxs)(`li`,{className:`flex items-center gap-1`,children:[(0,G.jsx)(g,{className:`size-4 shrink-0 text-[var(--content-secondary)]`,"aria-hidden":!0}),(0,G.jsx)(d,{as:`span`,variant:`body-medium-default`,className:`text-[var(--content-default)]`,children:e})]},e))})]}):null,u.note?(0,G.jsx)(d,{id:l,as:`p`,variant:`body-medium-default`,className:`text-[var(--content-secondary)]`,children:u.note}):null,(0,G.jsxs)(T.Footer,{className:`flex-col gap-4 p-0`,children:[(0,G.jsx)(n,{fullWidth:!0,variant:u.destructive?`danger`:`primary`,onClick:s,disabled:a,"data-testid":`confirm-package-switch-button`,children:u.confirmLabel}),(0,G.jsx)(n,{ref:c,fullWidth:!0,variant:`ghost`,onClick:o,disabled:a,children:`Cancel`})]})]})})}function Qn(){let e=s();(0,K.useEffect)(()=>P(()=>{e.invalidateQueries({queryKey:me()}),e.invalidateQueries({queryKey:L()}),e.invalidateQueries({queryKey:_e()})}),[e])}export{sn as A,Le as B,pn as C,tn as D,rn as E,$ as F,at as I,st as L,ct as M,ot as N,cn as O,Q as P,Ge as R,gn as S,un as T,W as V,kn as _,Fn as a,_n as b,Ln as c,An as d,En as f,wn as g,On as h,Mn as i,en as j,nn as k,In as l,Dn as m,Zn as n,Nn as o,Tn as p,zn as r,Rn as s,Qn as t,jn as u,xn as v,fn as w,hn as x,bn as y,X as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{t as n}from"./button-DWxxMNqc.js";import{n as r}from"./QueryClientProvider-CMu7CkQU.js";import{t as i}from"./useQuery-Bz-fbQ-m.js";import{t as a}from"./useMutation-CXGTrp4W.js";import{t as o}from"./jsx-runtime-D3ZM-ToX.js";import{t as s}from"./typography-BeUa5Fd-.js";import{c,h as l,i as u,m as d,n as f,r as p,s as m,t as h}from"./use-save-twilio-credentials-Dm0bhx_A.js";import{t as g}from"./check-DRqtWHWc.js";import{G as _}from"./src-CqJTlX1y.js";import{t as v}from"./link-2-DeNtOuO4.js";import{t as y}from"./loader-circle-D7A_UeUb.js";import{t as b}from"./input-DF52UqKH.js";import{t as x}from"./modal-UqO42jBg.js";import{n as S}from"./toast-DFRsyumK.js";import{i as C}from"./utils-CPWCnpba.js";import{i as w,n as T,t as E}from"./api-errors-BmlR1gU1.js";import{Zt as D,rn as O,tn as k}from"./sdk.gen-CsUgJyBR.js";import{G as A,J as j,K as M,o as ee,q as te,s as N,x as P}from"./react-query.gen-D0Q5L-je.js";import{n as F}from"./sdk.gen-CY1afY_n.js";import{t as I}from"./copy-to-clipboard-Bxl-OHim.js";import{t as L}from"./a2a-invite-Cx2okV6a.js";var R=e(t(),1),z=o(),B=[`no_one`,`guardian_only`,`trusted_contacts`,`any_contact`,`strangers`],V=`trusted_contacts`,H=new Set([`platform`,`a2a`]),U=new Set([`vellum`,`whatsapp`,`discord`]);function W(e){return U.has(e)}var G={no_one:`No one`,guardian_only:`Only you`,trusted_contacts:`Verified contacts`,any_contact:`Any contact`,strangers:`Strangers`};function K(e){return{no_one:`No one can message ${e} on this channel: every message is blocked, including yours.`,guardian_only:`Only you can message ${e}. Everyone else is turned away.`,trusted_contacts:`You and the people you’ve verified can message ${e}. Anyone else is asked to verify first, and you’re notified.`,any_contact:`You and any known contact can message ${e}, including contacts you haven’t verified yet. Strangers are asked to verify first.`,strangers:`Anyone can message ${e}, including complete strangers.`}}function q(e){return t=>{S.error(t instanceof Error?t.message:e)}}function J(e){let t=e-Date.now();if(t<=0)return`Expired`;let n=Math.ceil(t/(1e3*60*60*24));return n===1?`Expires in 1 day`:`Expires in ${n} days`}function Y({open:e,assistantId:t,onClose:r}){let[i,o]=(0,R.useState)(!1),c=(0,R.useRef)(null),l=(0,R.useRef)(!1),u=a({...A({path:{assistant_id:t}})}),d=(0,R.useRef)(u.mutate);(0,R.useLayoutEffect)(()=>{d.current=u.mutate});let f=(0,R.useRef)(u.reset);(0,R.useLayoutEffect)(()=>{f.current=u.reset}),(0,R.useEffect)(()=>{e&&!l.current&&d.current({path:{assistant_id:t}}),l.current=e},[e,t]),(0,R.useEffect)(()=>()=>{c.current&&clearTimeout(c.current)},[]);let p=(0,R.useCallback)(()=>{f.current(),o(!1),c.current&&=(clearTimeout(c.current),null),r()},[r]),m=(0,R.useCallback)(e=>{I(e,{errorMessage:`Couldn't copy the invite link.`,onCopied:()=>{o(!0),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>o(!1),2e3)}})},[]),h=u.isSuccess&&u.data.token?L({senderAssistantId:t,token:u.data.token}):``;return(0,z.jsx)(x.Root,{open:e,onOpenChange:e=>{e||p()},children:(0,z.jsxs)(x.Content,{size:`sm`,children:[(0,z.jsx)(x.Header,{children:(0,z.jsx)(x.Title,{children:`Share Connection Link`})}),(0,z.jsx)(x.Body,{children:u.isPending?(0,z.jsxs)(`div`,{className:`flex items-center gap-2 py-2 text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:[(0,z.jsx)(y,{className:`h-4 w-4 animate-spin`}),`Creating invite link…`]}):u.isError?(0,z.jsxs)(`div`,{className:`space-y-3`,children:[(0,z.jsx)(`p`,{role:`alert`,className:`!m-0 text-body-medium-lighter`,style:{color:`var(--system-negative-strong)`},children:`Failed to create invite link. Make sure A2A is enabled for your assistant.`}),(0,z.jsx)(n,{variant:`outlined`,onClick:()=>u.mutate({path:{assistant_id:t}}),children:`Try Again`})]}):u.isSuccess?(0,z.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,z.jsx)(s,{variant:`body-medium-lighter`,style:{color:`var(--content-secondary)`},children:`Share this link with another assistant owner to establish a connection.`}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(b,{type:`text`,readOnly:!0,value:h,fullWidth:!0,wrapperClassName:`flex-1`,className:`font-mono`,onFocus:e=>e.currentTarget.select()}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>m(h),"aria-label":`Copy invite link`,className:`flex h-9 w-9 shrink-0 items-center justify-center rounded-md border border-[var(--border-base)] hover:bg-[var(--surface-hover)]`,children:i?(0,z.jsx)(g,{className:`h-4 w-4`}):(0,z.jsx)(_,{className:`h-4 w-4`})})]}),u.data.expiresAt!=null&&(0,z.jsx)(s,{variant:`body-small-default`,style:{color:`var(--content-tertiary)`},children:J(u.data.expiresAt)})]}):null}),(0,z.jsx)(x.Footer,{children:(0,z.jsx)(n,{variant:`outlined`,onClick:p,children:`Done`})})]})})}function X({onClick:e}){return(0,z.jsx)(n,{variant:`outlined`,size:`compact`,leftIcon:(0,z.jsx)(v,{className:`h-3.5 w-3.5`}),onClick:e,children:`Share Connection Link`})}function Z(e){return typeof e==`string`&&B.includes(e)}function Q(e){return H.has(e)}function ne(e){return(e?.policies??[]).filter(e=>!Q(e.channelType)&&!W(e.channelType)).map(e=>({...e,policy:Z(e.policy)?e.policy:`trusted_contacts`}))}async function re(e,t,n,r){if(Q(t))throw new E(403,`Channel "${t}" is internal and is not user-configurable.`);let{data:i,error:a,response:o}=await F({path:{assistant_id:e,channel_type:t},body:{policy:n,note:r??null},throwOnError:!1});if(T(o,a,`Failed to save channel policy.`),!o.ok)throw new E(o.status,w(a,o,`Failed to save channel policy.`));if(!i?.policy)throw new E(500,`Gateway returned no policy in response.`);return i.policy}var ie=`0.10.0`;function $(){return C(ie)}function ae(e){let t=r(),n=$(),o=(0,R.useMemo)(()=>({path:{assistant_id:e}}),[e]),s=(0,R.useMemo)(()=>l(o),[o]),u=i({...d(o),enabled:n,select:ne}),f=(0,R.useMemo)(()=>{let e={};for(let t of u.data??[])c(t.channelType)&&(e[t.channelType]=t.policy);return e},[u.data]),p=a({mutationFn:({channelKey:t,policy:n})=>re(e,t,n),onSuccess:()=>t.invalidateQueries({queryKey:s}),onError:q(`Failed to save channel policy`)}),m=(0,R.useCallback)((e,t)=>{p.mutate({channelKey:e,policy:t})},[p]);return n?{policies:f,savingKey:p.isPending?p.variables?.channelKey??null:null,isLoading:u.isPending,isError:u.isError,onChange:m}:{policies:void 0,savingKey:null,isLoading:!1,isError:!1,onChange:void 0}}var oe={slack:`I want to reach you on Slack. Let's set it up.`,telegram:`I want to reach you on Telegram. Let's set it up.`,phone:`I want to be able to call you. Let's set you up with a phone number.`},se=15e3;function ce({assistantId:e,onStartSetupConversation:t}){let n=r(),o=(0,R.useMemo)(()=>({path:{assistant_id:e}}),[e]),s=(0,R.useMemo)(()=>N(o),[o]),c=i({...ee(o),enabled:!!e,refetchInterval:se,select:e=>e.snapshots}),l=(0,R.useMemo)(()=>le(c.data??[]),[c.data]),d=l.some(e=>e.key===`slack`&&e.status===`ready`),m=i({...M(o),enabled:d,select:e=>e.threadMode}),g=ae(e),_=(0,R.useCallback)(()=>n.invalidateQueries({queryKey:s}),[n,s]),v=a({mutationFn:async t=>{let n={path:{assistant_id:e},throwOnError:!0};t===`slack`?await D(n):t===`telegram`?await k(n):t===`phone`&&await O(n)},onSettled:(t,r,i)=>{_(),i===`slack`&&u(n,e)}}),y=f({assistantId:e}),b=p({assistantId:e}),x=h({assistantId:e}),S=a({...j(),onSuccess:()=>{n.invalidateQueries({queryKey:te(o)})}}),C=y.mutateAsync,w=(0,R.useCallback)(async e=>{await C(e)},[C]),T=b.mutate,E=(0,R.useCallback)((e,t)=>{T({botToken:e,appToken:t})},[T]),A=S.mutate,P=(0,R.useCallback)(t=>{A({path:{assistant_id:e},body:{threadMode:t}})},[A,e]),F=x.mutateAsync,I=(0,R.useCallback)(async(e,t)=>{await F({accountSid:e,authToken:t})},[F]),L=(0,R.useCallback)(e=>{t&&t(oe[e])},[t]),z=v.mutate,B=(0,R.useCallback)(e=>{z(e)},[z]);return{channels:l,pendingChannelKey:v.isPending?v.variables??null:null,slackThreadMode:m.data,slackThreadModePending:S.isPending,channelPolicies:g.policies,policySavingKey:g.savingKey,policiesLoading:g.isLoading,policiesError:g.isError,onChannelPolicyChange:g.onChange,onSetup:t?L:void 0,onDisconnect:B,onSaveTelegramToken:w,onSaveSlackConfig:E,slackSaveStatus:b.status,slackSaveError:b.error?.message??null,onSlackThreadModeChange:P,onSaveTwilioCredentials:I}}function le(e){let t=new Map;for(let n of e)t.set(n.channel,n);return m.map(e=>{let n=t.get(e);return{key:e,status:ue(n),address:n?.channelHandle??void 0}})}function ue(e){return e?e.ready||e.setupStatus===`ready`?`ready`:e.setupStatus===`incomplete`?`incomplete`:`not_configured`:`not_configured`}function de(e){let t=r(),[n,i]=(0,R.useState)(!1);return{isOpen:n,open:(0,R.useCallback)(()=>{i(!0)},[]),close:(0,R.useCallback)(()=>{i(!1),t.invalidateQueries({queryKey:P({path:{assistant_id:e}})})},[t,e])}}export{q as a,G as c,Y as i,K as l,ce as n,V as o,X as r,B as s,de as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{l as n}from"./chunk-5KNZJZUH-Bsoom5--.js";import{t as r}from"./is-electron-Djuya72b.js";import{f as i}from"./native-biometric-CbCUFdjC.js";import{d as a}from"./routes-gT_HcUb1.js";import{i as o}from"./navigation-resolver-y9MHLxam.js";import{t as s}from"./build-state-GJ6TT3dL.js";import{n as c}from"./login-flow-BNaCTXwB.js";var l=e(t(),1);function u(e){let t=n(),[u,d]=(0,l.useState)(!1),[f,p]=(0,l.useState)(null),m=(0,l.useRef)(0);return{loading:u,error:f,login:async()=>{let n=e??o(s({sessionSettled:!0,isAuthenticated:!0}),t.pathname),r=++m.current;p(null),d(!0);try{await i(c,`${a.account.providerCallback}?returnTo=${encodeURIComponent(n)}`,{returnTo:n})}catch{if(r!==m.current)return;p(`Something went wrong. Please try again.`),d(!1)}},cancel:()=>{m.current++,d(!1),p(null),r()&&window.vellum?.auth?.cancelOAuth()}}}export{u as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./chunk-jRWAZmH_.js";import{t}from"./react-BFJW0bSv.js";import{m as n,n as r}from"./chunk-5KNZJZUH-Bsoom5--.js";import{t as i}from"./jsx-runtime-D3ZM-ToX.js";import{t as a}from"./loader-circle-D7A_UeUb.js";import{a as o,s}from"./auth-store-344lpSdW.js";import{w as c}from"./native-biometric-CbCUFdjC.js";import{d as l}from"./routes-gT_HcUb1.js";import{a as u}from"./use-platform-gate-eiz8Kj6G.js";import{t as d}from"./hard-navigate-9vglJJTR.js";import{a as f,o as p}from"./login-flow-BNaCTXwB.js";var m=i();function h(){return(0,m.jsx)(a,{className:`h-6 w-6 animate-spin text-[var(--content-tertiary)]`,"aria-label":`Loading`})}var g=e(t(),1);function _({to:e}){let t=f(e);return(0,g.useEffect)(()=>{t&&d(e)},[t,e]),t?null:(0,m.jsx)(r,{to:e,replace:!0})}function v(){let[e]=n(),t=o(),r=s(),i=u(),a=e.get(`returnTo`),d=c(a,l.assistant);if(!a)return{kind:`proceed`,returnTo:null};if(r)return{kind:`wait`};if(!t)return{kind:`proceed`,returnTo:d};if(p(d)){if(i===`pending`)return{kind:`wait`};if(i===`disabled`)return{kind:`proceed`,returnTo:d}}return{kind:`redirect`,node:(0,m.jsx)(_,{to:d})}}export{h as n,v as t};
|