@vellumai/web 0.11.7 → 0.11.8-staging.1
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/{a2a-invite-CalxmT9U.js → a2a-invite-DqSTflKa.js} +1 -1
- package/dist/assets/{about-page-oelEgoKN.js → about-page-BjnrQu1C.js} +1 -1
- package/dist/assets/account-Bo0GsPWI.js +1 -0
- package/dist/assets/account-D59Pog6a.js +1 -0
- package/dist/assets/{account-page-DoWCrccl.js → account-page-DqP1QsnR.js} +1 -1
- package/dist/assets/{account-shell-D6h6YPdW.js → account-shell-DK0R6Tov.js} +1 -1
- package/dist/assets/{acp-run-detail-panel-BqBDl6QB.js → acp-run-detail-panel-BdtW6qDu.js} +4 -4
- package/dist/assets/activity-redirect-page-BlnIxG-Z.js +1 -0
- package/dist/assets/activity-steps-panel-BSUUY3JD.js +1 -0
- package/dist/assets/{add-credits-modal-Clc-YWYG.js → add-credits-modal-BI2CsQ87.js} +1 -1
- package/dist/assets/ai-page-DGyy3dQE.js +1 -0
- package/dist/assets/android-billing-handoff-DrlrNBbY.js +1 -0
- package/dist/assets/api-key-screen-_UTNn9KJ.js +1 -0
- package/dist/assets/{app-info-BzVdvgJM.js → app-info-BLCdGdH4.js} +1 -1
- package/dist/assets/archive-redirect-page-BLoeX3_F.js +1 -0
- package/dist/assets/assistant-status-panel-YKs5Ubf5.js +1 -0
- package/dist/assets/{auth-welcome-screen-ghh-qFOz.js → auth-welcome-screen-_mWoDKPq.js} +1 -1
- package/dist/assets/avatar-bundled-components-D8WzF-8G.js +1 -0
- package/dist/assets/avatar-random-CjTiNqoZ.js +1 -0
- package/dist/assets/await-org-header-settled-0xMP92NT.js +1 -0
- package/dist/assets/background-task-detail-panel-CUQtiY1y.js +1 -0
- package/dist/assets/billing-page-DScRdoHM.js +3 -0
- package/dist/assets/{billing-redirect-page-DaIhDbvM.js → billing-redirect-page-BmuMF_1f.js} +1 -1
- package/dist/assets/{bookmarks-page-CvCqY1u_.js → bookmarks-page-DutOB8Of.js} +1 -1
- package/dist/assets/{bundle-confirm-page-DuW3Ltpg.js → bundle-confirm-page-CpWjneJj.js} +1 -1
- package/dist/assets/channel-transcript-panel-Dd8N9yEZ.js +1 -0
- package/dist/assets/channels-B8lsoUr6.js +9 -0
- package/dist/assets/channels-D4_Gad55.js +9 -0
- package/dist/assets/channels-page-route--8dnzBPq.js +1 -0
- package/dist/assets/chat-Bff_DY7r.js +3 -0
- package/dist/assets/chat-C2NjPMmK.js +3 -0
- package/dist/assets/chat-CGQw-Yey.js +3 -0
- package/dist/assets/chat-EhD_n50p.js +3 -0
- package/dist/assets/checkout-continuation-CpvBfvVc.js +1 -0
- package/dist/assets/{checkout-page-CpaWMY_L.js → checkout-page-IsznypCf.js} +1 -1
- package/dist/assets/checkout-return-target-DbrgNrrf.js +1 -0
- package/dist/assets/command-palette-BxtSdT49.js +1 -0
- package/dist/assets/{command-palette-window-page-C4vKhArq.js → command-palette-window-page-C-xJ-yX9.js} +1 -1
- package/dist/assets/common-5z_PuGxF.js +1 -0
- package/dist/assets/common-CEn7rBGF.js +1 -0
- package/dist/assets/{community-page-xiwPgo2f.js → community-page-CXHy8Ge9.js} +1 -1
- package/dist/assets/companion-layout-Czzr0lJa.js +1 -0
- package/dist/assets/companion-surface-page-CnvwXfnQ.js +1 -0
- package/dist/assets/connect-page-_NcsEyVj.js +1 -0
- package/dist/assets/{consent-controls-RsRyTWzn.js → consent-controls-C5AN2KN4.js} +1 -1
- package/dist/assets/contacts-B1CxNq6I.js +1 -0
- package/dist/assets/contacts-gateway-CQ4flwOK.js +1 -0
- package/dist/assets/contacts-jdOGgx_y.js +1 -0
- package/dist/assets/contacts-page-route-DyWsRFq5.js +1 -0
- package/dist/assets/{credential-entry-page-CHyGUHNE.js → credential-entry-page-xZF9nHkn.js} +1 -1
- package/dist/assets/credential-requests-BAOvHGUi.js +1 -0
- package/dist/assets/credential-requests-CeqlvkYb.js +1 -0
- package/dist/assets/credentials-page-Cv7KZ5ho.js +1 -0
- package/dist/assets/{csv-preview-D1DFyAyk.js → csv-preview-CbPbBKMc.js} +2 -2
- package/dist/assets/danger-zone-redirect-page-DSW93QrQ.js +1 -0
- package/dist/assets/debug-page-pjDDmKf-.js +4 -0
- package/dist/assets/deploy-dialogs-BbxlNwkW.js +1 -0
- package/dist/assets/{detail-card-BTciodin.js → detail-card-CUnVRct3.js} +1 -1
- package/dist/assets/{detail-panel-stop-button-DvPi_A52.js → detail-panel-stop-button-jUM1oBBe.js} +1 -1
- package/dist/assets/developer-page-DiF8DSCd.js +1 -0
- package/dist/assets/devices-redirect-page-CxnsRMZf.js +1 -0
- package/dist/assets/{dictation-overlay-page-CV5-bWnC.js → dictation-overlay-page-C-LzQvTP.js} +1 -1
- package/dist/assets/{document-viewer-page-B9aeVcPf.js → document-viewer-page-Bq6Y0E7o.js} +1 -1
- package/dist/assets/emails-page-8B6Ly4G5.js +1 -0
- package/dist/assets/environment-store-DJj25KEt.js +1 -0
- package/dist/assets/{esm-BFMxsKfC.js → esm-BM5LKkMa.js} +2 -2
- package/dist/assets/esm-BmuPALKt.js +2 -0
- package/dist/assets/esm-BrAZhW0M.js +2 -0
- package/dist/assets/esm-COwSlx4I.js +2 -0
- package/dist/assets/esm-Ci6ABHVx.js +2 -0
- package/dist/assets/{esm-C8_GJq6u.js → esm-D3dJNih2.js} +1 -1
- package/dist/assets/{esm-BmkPJcrm.js → esm-DC5BUUBD.js} +1 -1
- package/dist/assets/esm-DDyx9ZyD.js +1 -0
- package/dist/assets/esm-DKi5wrhP.js +2 -0
- package/dist/assets/{file-editor-qyflOek_.js → file-editor-DXDNFMLF.js} +1 -1
- package/dist/assets/general-page-DG9ZCp1L.js +1 -0
- package/dist/assets/hatching-screen-DjlxM27X.js +1 -0
- package/dist/assets/home-9eoM_SNy.js +1 -0
- package/dist/assets/home-BhxVuUxm.js +1 -0
- package/dist/assets/home-CSq5yPBw.js +1 -0
- package/dist/assets/home-Dex_kznj.js +1 -0
- package/dist/assets/hosting-screen-CHJV8OKw.js +1 -0
- package/dist/assets/identity-page-route-Dy6BfkON.js +7 -0
- package/dist/assets/index-DJRB6vZU.css +2 -0
- package/dist/assets/index-D_aS89pX.js +370 -0
- package/dist/assets/inspect-page-0gb3Spn6.js +9 -0
- package/dist/assets/integrations-page-Ba79dcjJ.js +1 -0
- package/dist/assets/intelligence-CPhx3_7x.js +5 -0
- package/dist/assets/intelligence-CYj3jKpS.js +5 -0
- package/dist/assets/intelligence-DOcItPm0.js +5 -0
- package/dist/assets/intelligence-DbjVpOZC.js +5 -0
- package/dist/assets/{intelligence-layout-DKknlxHu.js → intelligence-layout-Xz9XcFr1.js} +1 -1
- package/dist/assets/keyboard-shortcuts-redirect-page-C40qrNeb.js +1 -0
- package/dist/assets/{latest-assistant-text-CVRVSoFg.js → latest-assistant-text-DSAZhezZ.js} +2 -2
- package/dist/assets/library-A1mfTMw7.js +1 -0
- package/dist/assets/library-BmjZHtUe.js +1 -0
- package/dist/assets/library-detail-page-B5v9tOTU.js +1 -0
- package/dist/assets/library-page-D-ARkx0z.js +1 -0
- package/dist/assets/{login-page-Bca-1DK6.js → login-page-BVW_Vh56.js} +1 -1
- package/dist/assets/logout-page-D6vp-22y.js +1 -0
- package/dist/assets/logs-CoXwXRSx.js +1 -0
- package/dist/assets/logs-Fi_ec4t8.js +1 -0
- package/dist/assets/{logs-layout-BsqrLQee.js → logs-layout-BA179Y3f.js} +1 -1
- package/dist/assets/markdown-preview-GpDL8mBq.js +1 -0
- package/dist/assets/{media-preview-daMlnyj8.js → media-preview-CDJaS6fc.js} +1 -1
- package/dist/assets/memory-page-route-Cvj55ZjT.js +2 -0
- package/dist/assets/memory-router-playground-page-DUZ0gtBR.js +1 -0
- package/dist/assets/{message-files-panel-D-C9C2PJ.js → message-files-panel-PTrDXJ4i.js} +1 -1
- package/dist/assets/{metric-card-Bij5WGzs.js → metric-card-CWM6vcyu.js} +1 -1
- package/dist/assets/{notifications-page-C6zUs2x1.js → notifications-page-CaZD0MYc.js} +1 -1
- package/dist/assets/{oauth-complete-page-CuNDqPAt.js → oauth-complete-page-Ba3Mx9KI.js} +1 -1
- package/dist/assets/{oauth-popup-complete-page-hRc3yLWH.js → oauth-popup-complete-page-BZmU05Vk.js} +2 -2
- package/dist/assets/onboarding-Cfot2yE2.js +1 -0
- package/dist/assets/onboarding-DfVty_iP.js +1 -0
- package/dist/assets/onboarding-gNiy_Bmv.js +1 -0
- package/dist/assets/onboarding-pcCDtWuX.js +1 -0
- package/dist/assets/{page-shell-DtdXurhX.js → page-shell-DLe_v5G-.js} +1 -1
- package/dist/assets/{pairing-page-CwLe0EJV.js → pairing-page-BQ3K7weF.js} +1 -1
- package/dist/assets/password-reset-page-CRZ-73il.js +1 -0
- package/dist/assets/pdf-file-preview-CuTK4AuS.js +1 -0
- package/dist/assets/personality-page-D1G40Yn3.js +1 -0
- package/dist/assets/plans-page-DPXyO50E.js +1 -0
- package/dist/assets/{platform-loopback-page-CgXx1oDQ.js → platform-loopback-page-DKu--uHN.js} +1 -1
- package/dist/assets/plugin-detail-page-CnKTgCyr.js +1 -0
- package/dist/assets/plugins-page-ClQ_3N9E.js +1 -0
- package/dist/assets/preview-error-CyxFuY6O.js +1 -0
- package/dist/assets/privacy-page-u1PH5mYu.js +1 -0
- package/dist/assets/privacy-screen-Da8hwBJF.js +1 -0
- package/dist/assets/{provider-callback-page-DGVehvIp.js → provider-callback-page-M-6o0Pd5.js} +1 -1
- package/dist/assets/{provider-key-CUAJZvaQ.js → provider-key-B_Xu4pqn.js} +1 -1
- package/dist/assets/{provider-signup-page-B5gnrbym.js → provider-signup-page-0j8UCf9F.js} +1 -1
- package/dist/assets/{provisioning-targets-BbLfumae.js → provisioning-targets-CQv-d2hy.js} +1 -1
- package/dist/assets/{quick-input-page-Ccy-FS5S.js → quick-input-page-K0l1m71a.js} +1 -1
- package/dist/assets/rehype-katex-DsHZTQuO.js +259 -0
- package/dist/assets/remote-web-DC-am5Yy.js +1 -0
- package/dist/assets/remote-web-sY-CQsMN.js +1 -0
- package/dist/assets/{research-mock-page-DqfkGU9x.js → research-mock-page-D6T-KFn5.js} +1 -1
- package/dist/assets/research-onboarding-route-CnZboHbK.js +50 -0
- package/dist/assets/review-terms-screen-C2I57d8X.js +1 -0
- package/dist/assets/schedules-0KnLvdZ6.js +1 -0
- package/dist/assets/{schedules-CYD1CzCP.js → schedules-C2HIPzbf.js} +1 -1
- package/dist/assets/schedules-CsCj9HkE.js +1 -0
- package/dist/assets/schedules-DN7BQ5zf.js +1 -0
- package/dist/assets/schedules-DRVrzPSf.js +1 -0
- package/dist/assets/schedules-page-B-c8TkpF.js +1 -0
- package/dist/assets/security-redirect-page-CnA878M5.js +1 -0
- package/dist/assets/select-assistant-screen-DLSi6ldU.js +1 -0
- package/dist/assets/{self-hosted-servers-BHF9gq8j.js → self-hosted-servers-DZ--Hv9v.js} +1 -1
- package/dist/assets/service-form-controls-DlTUj71T.js +1 -0
- package/dist/assets/{setting-row-DRwmii99.js → setting-row-B5QZHkoF.js} +1 -1
- package/dist/assets/settings-BD1QISCO.js +3 -0
- package/dist/assets/settings-C3zYzBq9.js +3 -0
- package/dist/assets/settings-Cvt8QAL2.js +3 -0
- package/dist/assets/settings-divider-F3FqveK-.js +1 -0
- package/dist/assets/settings-layout-Crci2jyE.js +1 -0
- package/dist/assets/settings-zEkYIHEa.js +3 -0
- package/dist/assets/share-feedback-modal-C2COnRnh.js +2 -0
- package/dist/assets/{sidebar-tree-C1t1xfKD.js → sidebar-tree-DzK404Jf.js} +1 -1
- package/dist/assets/{signup-page-Dyhm65FW.js → signup-page-CB-8w0gl.js} +1 -1
- package/dist/assets/{signup-shell-CSThcwPa.js → signup-shell-D9xQLQal.js} +1 -1
- package/dist/assets/skill-detail-page-hNrlnmr1.js +2 -0
- package/dist/assets/skill-detail-panel-DUDHXwZA.js +1 -0
- package/dist/assets/{skill-removal-dialog-bN91N7f8.js → skill-removal-dialog-gdW2aZkn.js} +1 -1
- package/dist/assets/skills-page-CFtShvMb.js +1 -0
- package/dist/assets/sounds-page-CkIUEtSv.js +1 -0
- package/dist/assets/{start-screen-DyyYavfM.js → start-screen-DBgDXlld.js} +1 -1
- package/dist/assets/stt-language-picker-modal-CAakw-eP.js +1 -0
- package/dist/assets/subagent-detail-panel-DS_xxlJF.js +4 -0
- package/dist/assets/superpowers-page-CGIr7ogv.js +1 -0
- package/dist/assets/system-events-page-g_mlVVGo.js +1 -0
- package/dist/assets/system-events-redirect-page-Dv3PuAV5.js +1 -0
- package/dist/assets/terminal-BNpUPBzh.js +1 -0
- package/dist/assets/terminal-DSb_gkKE.js +1 -0
- package/dist/assets/text-preview-D4MWwSA4.js +1 -0
- package/dist/assets/{theme-stage-page-Pcnh0PTQ.js → theme-stage-page-gece5MtY.js} +1 -1
- package/dist/assets/{tiptap-document-editor-ZZmtZ799.js → tiptap-document-editor-CQnnqMvK.js} +3 -3
- package/dist/assets/tool-detail-panel-BvydW69m.js +12 -0
- package/dist/assets/{trait-cycle-row-BWNJ21g4.js → trait-cycle-row-C5vdkh7k.js} +1 -1
- package/dist/assets/upgrade-cancel-page-BgYFSzet.js +1 -0
- package/dist/assets/upgrade-success-page-C6lE5YG0.js +1 -0
- package/dist/assets/usage-redirect-page-BZFXmMmI.js +1 -0
- package/dist/assets/usage-window-Bl8EMpiB.js +1 -0
- package/dist/assets/{use-assistant-identity-details-oVmPdjVe.js → use-assistant-identity-details-B-mZTZFr.js} +1 -1
- package/dist/assets/use-checkout-dismiss-refresh-DqQwfaI3.js +1 -0
- package/dist/assets/use-edge-swipe-back-BN1FCIPJ.js +2 -0
- package/dist/assets/use-hotkey-recorder-DGZHpMeu.js +1 -0
- package/dist/assets/use-invite-link-dialog-BIk7uhnC.js +1 -0
- package/dist/assets/{use-platform-assistant-id-DcVWp7KY.js → use-platform-assistant-id-CLcP1OSp.js} +1 -1
- package/dist/assets/use-return-to-short-circuit-Dc9IrWhB.js +1 -0
- package/dist/assets/{use-side-list-room-DQbUPFcU.js → use-side-list-room-C7h2iBrD.js} +1 -1
- package/dist/assets/use-skill-actions-DWGc43zV.js +1 -0
- package/dist/assets/{use-skill-detail-files-BGIXJykk.js → use-skill-detail-files-BiL03man.js} +1 -1
- package/dist/assets/use-supports-credentials-settings-Bmk31dUN.js +1 -0
- package/dist/assets/use-transcript-message-by-id-BhCGLlt8.js +1 -0
- package/dist/assets/vendor-kNpRDQWe.js +127 -0
- package/dist/assets/voice-page-C0a3qZdD.js +1 -0
- package/dist/assets/{weather-forecast-display-B6j-V-yS.js → weather-forecast-display-uFMDzqaC.js} +1 -1
- package/dist/assets/{web-DL2rv-Fb.js → web-BVZ7Tz6e.js} +1 -1
- package/dist/assets/{web-CE-RjE8i.js → web-Be02fpV9.js} +1 -1
- package/dist/assets/{web-Q8lSPj8Z.js → web-CEMV9s9j.js} +1 -1
- package/dist/assets/{web-Cv_J7__I.js → web-CgJtsMCO.js} +1 -1
- package/dist/assets/{web-DPEGYPrR.js → web-D9pmN_Ii.js} +1 -1
- package/dist/assets/{web-pwf5Vh3V.js → web-D_X6fLKT.js} +1 -1
- package/dist/assets/{web-DDFO9PaS.js → web-Ds-zK9c0.js} +1 -1
- package/dist/assets/{web-Cw24uxYA.js → web-mOIiFuEV.js} +1 -1
- package/dist/assets/{web-kKGZ0Pbn.js → web-zYA24dWM.js} +1 -1
- package/dist/assets/welcome-screen-l8WGeqN3.js +1 -0
- package/dist/assets/workflow-detail-panel-6Ty2arSd.js +1 -0
- package/dist/assets/workspace-BuluZX5F.js +1 -0
- package/dist/assets/workspace-ITbZLAwF.js +1 -0
- package/dist/assets/workspace-page-VmejMKBX.js +1 -0
- package/dist/index.html +42 -15
- package/package.json +1 -1
- package/dist/assets/activity-steps-panel-C5Nlm1Ax.js +0 -1
- package/dist/assets/ai-page-DtRit5K4.js +0 -1
- package/dist/assets/android-billing-handoff-D6KkZQcR.js +0 -1
- package/dist/assets/api-key-screen-BWXzfFaa.js +0 -1
- package/dist/assets/archive-redirect-page-DD3q7S_q.js +0 -1
- package/dist/assets/assistant-status-panel-i2Q5Ng1C.js +0 -1
- package/dist/assets/avatar-random-BEjqLOzH.js +0 -1
- package/dist/assets/background-task-detail-panel-igcj1myW.js +0 -1
- package/dist/assets/billing-page-BtVWtaxz.js +0 -3
- package/dist/assets/channel-transcript-panel-C5dxI2kC.js +0 -1
- package/dist/assets/channels-page-route-CaZZgVvj.js +0 -1
- package/dist/assets/chat-CuSRAhBb.js +0 -3
- package/dist/assets/chat-Dw-Xoh_r.js +0 -3
- package/dist/assets/checkout-continuation-gyr3KRhJ.js +0 -1
- package/dist/assets/checkout-return-target-uGUiSRvm.js +0 -1
- package/dist/assets/command-palette-Dqv1yvzc.js +0 -1
- package/dist/assets/companion-layout-BgFk39Te.js +0 -1
- package/dist/assets/companion-surface-page-BE_GKIQH.js +0 -1
- package/dist/assets/connect-page-1WOW2Uyb.js +0 -1
- package/dist/assets/contacts-gateway-aq64PPDs.js +0 -1
- package/dist/assets/contacts-page-route-fh_BygpY.js +0 -1
- package/dist/assets/credentials-page-u4m5eB0e.js +0 -1
- package/dist/assets/danger-zone-redirect-page-pm7xtA64.js +0 -1
- package/dist/assets/debug-page-BiRFASyO.js +0 -4
- package/dist/assets/deploy-dialogs-BQGFr3pp.js +0 -1
- package/dist/assets/detail-drawer-svbxV7k9.js +0 -1
- package/dist/assets/developer-page-YJ4ePRAY.js +0 -1
- package/dist/assets/devices-redirect-page-Bc3d-ANN.js +0 -1
- package/dist/assets/emails-page-DuxmJeBh.js +0 -1
- package/dist/assets/environment-store-Cb7OK6xz.js +0 -1
- package/dist/assets/esm-BWaPHKOl.js +0 -2
- package/dist/assets/esm-B_9x3_5A.js +0 -2
- package/dist/assets/esm-CvsVyyLL.js +0 -2
- package/dist/assets/esm-D8F0P9NS.js +0 -1
- package/dist/assets/esm-DLD7mc5e.js +0 -2
- package/dist/assets/esm-lFkAo6qR.js +0 -2
- package/dist/assets/general-page-CplJ3sOI.js +0 -1
- package/dist/assets/hatching-screen-tqPPQDHG.js +0 -1
- package/dist/assets/home-BWUNWNMl.js +0 -1
- package/dist/assets/home-DJ6q91Qp.js +0 -1
- package/dist/assets/home-page-route-CMsbxqsW.js +0 -1
- package/dist/assets/hosting-screen-7idZudJ8.js +0 -1
- package/dist/assets/identity-page-route-C4EAb-ac.js +0 -7
- package/dist/assets/index-2ECSWhtU.css +0 -2
- package/dist/assets/index-7XDiAJ-A.js +0 -357
- package/dist/assets/inspect-page-DsXykArJ.js +0 -9
- package/dist/assets/integrations-page-CmMVSsvu.js +0 -1
- package/dist/assets/intelligence-DwVUW6jm.js +0 -5
- package/dist/assets/intelligence-JlruxYAh.js +0 -5
- package/dist/assets/keyboard-shortcuts-redirect-page-CFu5x117.js +0 -1
- package/dist/assets/library-detail-page-CKFkI0QY.js +0 -1
- package/dist/assets/library-page-dIrR1lib.js +0 -1
- package/dist/assets/logout-page-BzAORi0q.js +0 -1
- package/dist/assets/markdown-preview-DLXGytZI.js +0 -1
- package/dist/assets/memory-page-route-CX1I7izG.js +0 -2
- package/dist/assets/memory-router-playground-page-Mk3rfyGO.js +0 -1
- package/dist/assets/onboarding-BbtVI8KM.js +0 -1
- package/dist/assets/onboarding-BoaKLlZ5.js +0 -1
- package/dist/assets/page-empty-state-BrGkTMcK.js +0 -1
- package/dist/assets/password-reset-page-C7qvqEJQ.js +0 -1
- package/dist/assets/pdf-file-preview-DbwHMWey.js +0 -1
- package/dist/assets/personality-page-Ci_b1dH9.js +0 -1
- package/dist/assets/plans-page-CyqILV_j.js +0 -1
- package/dist/assets/plugin-detail-page-CvC_LUz2.js +0 -1
- package/dist/assets/plugins-page-9LuPE9IY.js +0 -1
- package/dist/assets/preview-error-DbAQP8oG.js +0 -1
- package/dist/assets/privacy-page-OIOZKgWi.js +0 -1
- package/dist/assets/privacy-screen-DFnrbIrM.js +0 -1
- package/dist/assets/profile-metadata-Bk4pj7o_.js +0 -1
- package/dist/assets/research-onboarding-route-D3qFv6SM.js +0 -50
- package/dist/assets/review-terms-screen-BD3wP3KC.js +0 -1
- package/dist/assets/schedules-B_SL_iV4.js +0 -1
- package/dist/assets/schedules-DhwNRBkz.js +0 -1
- package/dist/assets/schedules-page-D64tvhuZ.js +0 -1
- package/dist/assets/security-redirect-page-CWR-HICc.js +0 -1
- package/dist/assets/select-assistant-screen-SfWB0oQ2.js +0 -1
- package/dist/assets/service-form-controls-DNfWnjSp.js +0 -1
- package/dist/assets/settings-divider-X9YnFIFQ.js +0 -1
- package/dist/assets/settings-gjWN0WQO.js +0 -3
- package/dist/assets/settings-iLTzqZW8.js +0 -3
- package/dist/assets/settings-layout-C2Um5qit.js +0 -1
- package/dist/assets/share-feedback-modal-BzV03dUO.js +0 -2
- package/dist/assets/skill-detail-page-Cja0k8_e.js +0 -2
- package/dist/assets/skill-detail-panel-BIOL410z.js +0 -1
- package/dist/assets/skills-page-CYogTXmH.js +0 -1
- package/dist/assets/sounds-page-DAy2o3wO.js +0 -1
- package/dist/assets/stt-language-picker-modal-CpGwbd4g.js +0 -1
- package/dist/assets/subagent-detail-panel-330bH7ee.js +0 -4
- package/dist/assets/superpowers-page-D6wv3GWO.js +0 -1
- package/dist/assets/system-events-page-CFN8tMUJ.js +0 -1
- package/dist/assets/system-events-redirect-page-BarOgFkA.js +0 -1
- package/dist/assets/text-preview-CZeqyzdw.js +0 -1
- package/dist/assets/tool-detail-panel-BgCSb_m5.js +0 -12
- package/dist/assets/upgrade-cancel-page-ByVEWPeH.js +0 -1
- package/dist/assets/upgrade-success-page-iAPLJbee.js +0 -1
- package/dist/assets/usage-redirect-page-BHd-7in5.js +0 -1
- package/dist/assets/use-checkout-dismiss-refresh-BO2cN2i8.js +0 -1
- package/dist/assets/use-edge-swipe-back-CzESg8qG.js +0 -2
- package/dist/assets/use-hotkey-recorder-CY089_4p.js +0 -1
- package/dist/assets/use-invite-link-dialog-Ck-LquhT.js +0 -1
- package/dist/assets/use-return-to-short-circuit-NDSwANeI.js +0 -1
- package/dist/assets/use-skill-actions-CNBx-WS1.js +0 -1
- package/dist/assets/use-supports-credentials-settings-C6S_OHMP.js +0 -1
- package/dist/assets/use-transcript-message-by-id-Dqm1PMu3.js +0 -1
- package/dist/assets/vendor-WUN87CSE.js +0 -385
- package/dist/assets/voice-page-nBfEMyWs.js +0 -1
- package/dist/assets/welcome-screen-BrwdmDqM.js +0 -1
- package/dist/assets/workflow-detail-panel-DcTQSyju.js +0 -1
- package/dist/assets/workspace-page-Dwfwnkh5.js +0 -1
- /package/dist/assets/{app-types-BSxLQFrc.js → app-types-CBnv5WGq.js} +0 -0
- /package/dist/assets/{build.umd-CJjt7Lfj.js → build.umd-Dew0cvF9.js} +0 -0
- /package/dist/assets/{definitions-Dz0UVs0Z.js → definitions-B0aFqshm.js} +0 -0
- /package/dist/assets/{definitions-BTBjNf1i.js → definitions-BjIATsKe.js} +0 -0
- /package/dist/assets/{diff-rows-DzBJ95DT.js → diff-rows-BVqSFCjn.js} +0 -0
- /package/dist/assets/{emoji-catalog-data-a3DXKyhe.js → emoji-catalog-data-C12r4S_i.js} +0 -0
- /package/dist/assets/{format-countdown-Cge3iaM1.js → format-countdown-D5ONON7b.js} +0 -0
- /package/dist/assets/{vendor-CfUWwwYf.css → katex-CfUWwwYf.css} +0 -0
- /package/dist/assets/{link-click-DpfLT-iQ.js → link-click-B3w1V7FL.js} +0 -0
- /package/dist/assets/{machine-sizes-C3ptouhz.js → machine-sizes-DfVG31u5.js} +0 -0
- /package/dist/assets/{onboarding-step-layout-BlSoa02H.js → onboarding-step-layout-CjtymnM2.js} +0 -0
- /package/dist/assets/{pdf-fWDhmWcw.js → pdf-DnKvQsrL.js} +0 -0
- /package/dist/assets/{plugin-attribution-c6x0DrZM.js → plugin-attribution-C-EIiue7.js} +0 -0
- /package/dist/assets/{radio-card-nav-DlRweN3g.js → radio-card-nav-Omg0Ffee.js} +0 -0
- /package/dist/assets/{skill-icon-Me8DDEMt.js → skill-icon-Nml5aUXj.js} +0 -0
- /package/dist/assets/{status-badge-pill-BAkXhxwa.js → status-badge-pill-Bg90syHR.js} +0 -0
- /package/dist/assets/{use-truncated-blob-text-DLF_hf3O.js → use-truncated-blob-text-BSWOxKWU.js} +0 -0
- /package/dist/assets/{xterm-DfM4JBPp.js → xterm-DJzhWP7c.js} +0 -0
- /package/dist/assets/{xterm-addon-fit-DuBTfuI9.js → xterm-addon-fit-CNjgHcEW.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Zn as t,er as n,j as r}from"./vendor-kNpRDQWe.js";import{b as i,g as a,n as o,r as s,t as c}from"./react-DPM_L_aA.js";import{di as l,mn as u}from"./icons-CSdHOix6.js";import{$ as d,Bv as f,Cv as p,Gv as m,Ks as h,Mt as g,Ru as _,Tt as v,Tv as y,W_ as b,X as x,Xf as S,Xm as C,Y as w,Z as T,Zv as ee,_a as te,av as ne,ay as E,by as D,ca as re,cs as O,da as ie,fa as k,ga as A,ha as ae,iv as j,iy as M,kt as N,la as oe,ls as se,ma as P,oa as ce,pa as F,qd as le,qs as I,ry as L,sa as R,ty as ue,ua as de,uy as z,va as B,wt as V,zu as H}from"./index-D_aS89pX.js";import{t as U}from"./detail-card-CUnVRct3.js";import{t as fe}from"./stt-language-picker-modal-CAakw-eP.js";import{t as pe}from"./use-hotkey-recorder-DGZHpMeu.js";var W=e(i(),1),G=c();function me(){let{t:e}=r(`settings`),{available:t,currentCode:n,configuredProviderId:i,selectLanguage:a,selecting:o}=T(w()),[s,c]=(0,W.useState)(!1);return t?(0,G.jsxs)(U,{title:e(`listeningLanguageCard.title`),subtitle:e(`listeningLanguageCard.subtitle`),children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(`span`,{className:`min-w-0 text-body-medium-lighter text-[var(--content-default)]`,children:d(n,i)}),(0,G.jsx)(D,{variant:`outlined`,onClick:()=>c(!0),className:`shrink-0`,children:e(`listeningLanguageCard.change`)})]}),(0,G.jsx)(fe,{open:s,onOpenChange:c,title:e(`listeningLanguageCard.title`),currentCode:n,configuredProviderId:i,selectLanguage:a,selecting:o})]}):null}var K=`flux`;function he(e){return e===`vellum`}function q(e,t){let n=e?.trim().toLowerCase();return!n||n===`multi`||t===void 0?!0:t.includes(n.split(`-`)[0]??n)}function ge(){let{t:e}=r(`settings`),i=n(),a=S(),o=w(),[s,c]=(0,W.useState)(!1),{data:l}=t({..._({path:{assistant_id:o}}),enabled:a,staleTime:3e4}),u=l?.services?.stt,{data:d}=t({...le({path:{assistant_id:o}}),enabled:a,staleTime:5*6e4}),f=u?.roles?.liveVoice?.provider??u?.provider,p=d?.providers?.find(e=>e.id===f),m=p?.modelFamilies?.includes(K)??!1;if(!f||!m)return null;let h=q(u?.language,p?.turnDetectionLanguages),g=u?.roles?.liveVoice,v=g?g.model:u?.providers?.[f]?.model,y=v===void 0?he(f)&&h:v===K,b=async t=>{c(!0);try{let{response:e}=await C({path:{assistant_id:o},body:{services:{stt:{roles:{liveVoice:{provider:f,model:t?K:p?.baseModelFamily}}}}},throwOnError:!1});if(!e?.ok)throw Error(String(e?.status??``));await i.invalidateQueries({queryKey:H({path:{assistant_id:o}})})}catch{ue.error(e(`voicePage.turnDetectionFailed`))}finally{c(!1)}};return(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e(`voicePage.turnDetectionLabel`)}),(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:e(h?`voicePage.turnDetectionDescription`:`voicePage.turnDetectionLanguageUnsupported`)}),(0,G.jsx)(z,{checked:y,disabled:s||!h&&!y,onChange:e=>void b(e),"aria-label":e(`voicePage.turnDetectionLabel`)})]})}function _e({assistantId:e,open:t,onOpenChange:n}){return(0,G.jsx)(L.Root,{open:t,onOpenChange:n,children:(0,G.jsx)(L.Content,{size:`md`,children:(0,G.jsx)(ve,{assistantId:e,onDone:()=>n(!1)})})})}function ve({assistantId:e,onDone:t}){let{t:n}=r(),{available:i,currentModel:a,selectModel:o,selecting:s}=N(e);return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)(L.Header,{children:[(0,G.jsx)(L.Title,{children:n(`voicePickerModal.title`)}),i&&(0,G.jsx)(L.Description,{children:`Uses Vellum credits, through providers like ElevenLabs and Deepgram.`})]}),(0,G.jsx)(L.Body,{children:(0,G.jsx)(v,{assistantId:e,filterBySource:!0,value:a,onChange:o,autoScrollToSelected:!0})}),(0,G.jsxs)(L.Footer,{className:`items-center justify-between gap-3`,children:[(0,G.jsx)(x,{}),(0,G.jsx)(D,{variant:`primary`,onClick:t,disabled:s,className:`shrink-0`,children:n(`voicePickerModal.done`)})]})]})}function ye(){let{t:e}=r(`settings`),t=w(),{available:n,settled:i,voices:a,currentModel:o}=N(t),s=a.find(e=>e.model===o)??a[0],[c,l]=(0,W.useState)(!1),u=b.use.name(),d=u?e(`voicePickerCard.titleWithName`,{name:u}):e(`voicePickerCard.title`);return i?n&&s?(0,G.jsxs)(U,{title:d,subtitle:e(`voicePickerCard.creditsNote`),children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,G.jsx)(V,{description:s.description,className:`min-w-0 text-body-medium-lighter text-[var(--content-default)]`}),(0,G.jsx)(D,{variant:`outlined`,onClick:()=>l(!0),className:`shrink-0`,children:e(`voicePickerCard.changeButton`)})]}),(0,G.jsx)(_e,{assistantId:t,open:c,onOpenChange:l})]}):(0,G.jsx)(U,{title:d,children:(0,G.jsx)(g,{})}):(0,G.jsx)(U,{title:d,children:(0,G.jsx)(f,{as:`span`,role:`status`,"aria-label":e(`voicePickerCard.loadingAria`),className:`block h-9 w-48`})})}var be=[{prefKey:`showUserTranscript`,label:`Show the words you say`,description:`Live transcription while you speak.`},{prefKey:`showAssistantTranscript`,label:`Show the words the assistant says`,description:`Text alongside the spoken response.`}],xe=`We recommend keeping both off to start. It feels more like a real conversation.`;function Se(){let{t:e}=r();return(0,G.jsx)(`span`,{className:`shrink-0 rounded-full bg-[var(--surface-active)] px-2 py-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:e(`voiceTranscriptToggles.recommendedOff`)})}function Ce({label:e,description:t,showBadge:n,checked:r,onChange:i}){return(0,G.jsxs)(`div`,{className:`flex items-center justify-between gap-3 py-1`,children:[(0,G.jsxs)(`div`,{className:`min-w-0`,children:[(0,G.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`truncate text-body-medium-lighter text-[var(--content-default)]`,children:e}),n?(0,G.jsx)(Se,{}):null]}),t?(0,G.jsx)(`div`,{className:`text-body-small-default text-[var(--content-tertiary)]`,children:t}):null]}),(0,G.jsx)(z,{checked:r,onChange:i,"aria-label":e})]})}function we({showDescription:e=!1,showRecommendedBadge:t=!1}){let n=I.use.showUserTranscript(),r=I.use.showAssistantTranscript(),i=I.use.setShowUserTranscript(),a=I.use.setShowAssistantTranscript(),o={showUserTranscript:{checked:n,onChange:i},showAssistantTranscript:{checked:r,onChange:a}};return(0,G.jsx)(G.Fragment,{children:be.map(n=>{let r=o[n.prefKey];return(0,G.jsx)(Ce,{label:n.label,description:e?n.description:void 0,showBadge:t,checked:r.checked,onChange:r.onChange},n.prefKey)})})}var J=`text-body-small-default text-[var(--content-tertiary)]`;function Te(){let[e]=a(),t=e.get(`tab`);return t===`sounds`?(0,G.jsx)(s,{replace:!0,to:j.settings.sounds}):t===`services`?(0,G.jsx)(s,{replace:!0,to:j.settings.ai}):(0,G.jsx)(Ee,{})}function Ee(){let{t:e}=r(`settings`);return(0,G.jsxs)(`div`,{className:`flex flex-col gap-8`,children:[(0,G.jsxs)(Y,{heading:e(`voicePage.sectionOutputHeading`),description:e(`voicePage.sectionOutputDescription`),children:[(0,G.jsx)(ye,{}),(0,G.jsx)(De,{})]}),(0,G.jsxs)(Y,{heading:e(`voicePage.sectionInputHeading`),description:e(`voicePage.sectionInputDescription`),children:[(0,G.jsx)(ke,{}),(0,G.jsx)(me,{}),(0,G.jsx)(Me,{}),(0,G.jsx)(Ne,{})]}),(0,G.jsx)(Y,{heading:e(`voicePage.sectionCaptionsHeading`),children:(0,G.jsx)(Oe,{})})]})}function De(){let{t:e}=r(`settings`),{available:t}=N(w());return t?(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 px-1 text-body-small-default text-[var(--content-tertiary)]`,children:[(0,G.jsx)(u,{className:`h-3.5 w-3.5 shrink-0 text-[var(--content-quiet)]`}),(0,G.jsx)(`span`,{children:e(`voicePage.speechServicesBannerPrompt`)}),(0,G.jsxs)(o,{to:`${j.settings.ai}#text-to-speech`,className:`inline-flex items-center gap-1 text-[var(--content-secondary)] underline decoration-[var(--border-element)] underline-offset-2 hover:text-[var(--content-default)]`,children:[e(`voicePage.speechServicesBannerLink`),(0,G.jsx)(l,{className:`h-3 w-3`})]})]}):null}function Y({heading:e,description:t,children:n}){return(0,G.jsxs)(`section`,{className:`flex flex-col gap-4`,children:[(0,G.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,G.jsx)(`h2`,{className:`text-label-medium-default uppercase tracking-wide text-[var(--content-tertiary)]`,children:e}),t&&(0,G.jsx)(`p`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:t})]}),n]})}function Oe(){let{t:e}=r(`settings`);return(0,G.jsx)(U,{title:e(`voicePage.captionsTitle`),subtitle:e(`voicePage.captionsSubtitle`),children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(we,{showDescription:!0}),(0,G.jsx)(`p`,{className:`${J} pt-1`,children:xe})]})})}var X=``;function ke(){let{t:e}=r(`settings`),[t,n]=(0,W.useState)([]),[i,a]=(0,W.useState)(!1),[o,s]=(0,W.useState)(!1),[c,l]=(0,W.useState)(()=>se()),u=(0,W.useCallback)(async()=>{if(navigator.mediaDevices?.enumerateDevices)try{let e=(await navigator.mediaDevices.enumerateDevices()).filter(e=>e.kind===`audioinput`);a(e.length>0&&e.every(e=>!e.label)),n(e.filter(e=>e.deviceId!==``&&e.deviceId!==`default`&&e.deviceId!==`communications`)),s(e.length===0||e.some(e=>!!e.label))}catch{n([]),a(!1),s(!1)}},[]),d=(0,W.useCallback)(async()=>{try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});for(let t of e.getTracks())t.stop()}catch{}u()},[u]);(0,W.useEffect)(()=>{u();let e=navigator.mediaDevices;if(!e?.addEventListener)return;let t=()=>void u();return e.addEventListener(`devicechange`,t),()=>e.removeEventListener(`devicechange`,t)},[u]);let f=(0,W.useMemo)(()=>{let n=t.map((t,n)=>({value:t.deviceId,label:t.label||e(`voicePage.microphoneFallbackLabel`,{index:n+1})})),r=c!==X&&!n.some(e=>e.value===c);return[{value:null,label:e(`voicePage.systemDefault`)},...n,...r?[{value:c,label:e(o?`voicePage.savedMicrophoneNotConnected`:`voicePage.savedMicrophone`)}]:[]]},[t,c,o,e]),h=(0,W.useCallback)(e=>{l(e),e===X?p(O):y(O,e)},[]),g=c===X?null:c;return(0,G.jsx)(U,{title:e(`voicePage.microphoneTitle`),subtitle:e(`voicePage.microphoneSubtitle`),children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,G.jsx)(`div`,{className:`max-w-xs`,children:(0,G.jsx)(m,{options:f,value:g,onChange:h,onSelectNone:()=>h(X),"aria-label":e(`voicePage.microphoneAriaLabel`)})}),i&&(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,G.jsx)(D,{variant:`outlined`,onClick:d,children:e(`voicePage.allowMicrophoneAccess`)}),(0,G.jsx)(`span`,{className:J,children:e(`voicePage.grantMicrophoneAccessHint`)})]})]})})}var Ae=new Set([`Control`,`Alt`,`Shift`,`Meta`,`Fn`]),Z=`toggleVoice`,je=[{label:`Ctrl+Shift`,activator:{kind:`modifierOnly`,modifiers:[`control`,`shift`]}},{label:`Alt`,activator:{kind:`modifierOnly`,modifiers:[`option`]}}];function Me(){let{t:e}=r(`settings`),t=te(),n=ne(),i=B(e=>e.registered)===!1,[a,o]=(0,W.useState)(()=>oe(t)),[s,c]=(0,W.useState)(!1),[l,d]=(0,W.useState)([]),[f,p]=(0,W.useState)(!1),m=(0,W.useRef)(null),h=(0,W.useMemo)(()=>{let e=re(),n={label:F(e),activator:e};return t?[{label:`Fn`,activator:k},n]:[n]},[t]),g=a.kind!==`off`,_=(0,W.useCallback)(e=>{o(e),ie(e),c(!1),d([]),p(!1)},[]),v=pe({onBound:()=>_({kind:`off`})}),y=v.catalog.find(e=>e.key===Z)?.accelerator??``,b=v.recordingKey===Z,x=(0,W.useCallback)(()=>{_(k),v.removeHotkey(Z)},[v,_]),S=de()?je:[],C=(0,W.useCallback)(e=>{_(e),v.removeHotkey(Z)},[v,_]),w=(0,W.useCallback)(()=>{_({kind:`off`}),v.removeHotkey(Z)},[v,_]),T=(0,W.useCallback)(()=>{c(!0),d([]),p(!1),requestAnimationFrame(()=>{m.current?.focus()})},[]),E=(0,W.useCallback)(()=>{c(!1),d([]),p(!1)},[]),D=(0,W.useCallback)(e=>{let n=[];return t&&e.getModifierState(`Fn`)&&n.push(`function`),e.ctrlKey&&n.push(`control`),e.altKey&&n.push(`option`),e.shiftKey&&n.push(`shift`),e.metaKey&&n.push(`command`),n},[t]),O=(0,W.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),e.key===`Escape`){E();return}let t=D(e);if(t.includes(`function`)){_(k);return}if(Ae.has(e.key)){p(!1),d(A(t));return}if(t.length===0){p(!0);return}_({kind:`key`,label:e.key.length===1?e.key.toUpperCase():e.key,modifiers:A(t)})},[E,D,_]),j=(0,W.useCallback)(e=>{s&&D(e).length===0&&l.length>0&&(d([]),p(!0))},[D,s,l]);(0,W.useEffect)(()=>{if(!s)return;let e=e=>{m.current&&!m.current.contains(e.target)&&E()};return window.addEventListener(`mousedown`,e),()=>window.removeEventListener(`mousedown`,e)},[E,s]);let M=g&&!h.some(e=>P(e.activator,a));return n?(0,G.jsx)(U,{title:e(`voicePage.voiceShortcutTitle`),subtitle:e(`voicePage.voiceShortcutSubtitleDesktop`),children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[t&&(0,G.jsx)(Q,{label:e(`voicePage.fnKeyLabel`),badge:e(`voicePage.recommendedBadge`),selected:R(a),onClick:x}),S.map(e=>(0,G.jsx)(Q,{label:e.label,selected:P(e.activator,a),onClick:()=>C(e.activator)},e.label)),(0,G.jsx)(Q,{label:b?e(`voicePage.recordingPrompt`):y?(0,G.jsx)(ee,{accelerator:y}):e(`voicePage.customKey`),selected:y!==``,recording:b,onClick:b?v.stopRecording:()=>v.startRecording(Z)}),(0,G.jsx)(Q,{label:e(`voicePage.offKeyLabel`),selected:a.kind===`off`&&!y&&!b,onClick:w})]}),R(a)&&i&&(0,G.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,G.jsx)(u,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,G.jsx)(`span`,{children:e(`voicePage.fnRefusedNote`)})]}),v.conflict?.key===Z&&(0,G.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-default text-[var(--system-negative-strong)]`,children:[(0,G.jsx)(u,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,G.jsx)(`span`,{children:e(`voicePage.shortcutConflict`,{command:v.conflict.label})})]})]})}):(0,G.jsx)(U,{title:e(`voicePage.voiceShortcutTitle`),subtitle:e(`voicePage.voiceShortcutSubtitle`),children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,G.jsx)(z,{checked:g,onChange:e=>{_(e?ce(t):{kind:`off`})},label:e(`voicePage.enableVoiceShortcut`)}),g&&(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsx)(`span`,{className:J,children:e(`voicePage.activationKeyLabel`)}),(0,G.jsxs)(`div`,{ref:m,tabIndex:s?0:-1,onKeyDown:s?O:void 0,onKeyUp:s?j:void 0,className:`flex flex-wrap items-center gap-2 focus:outline-none`,children:[h.map(e=>(0,G.jsx)(Q,{label:e.label,selected:P(e.activator,a),onClick:()=>_(e.activator)},e.label)),s?(0,G.jsx)(Q,{label:l.length>0?ae(l):e(`voicePage.pressShortcut`),selected:!0,recording:!0,onClick:E}):(0,G.jsx)(Q,{label:M?F(a):e(`voicePage.customKey`),selected:M,onClick:T})]}),f&&(0,G.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-default text-[var(--content-quiet)]`,children:[(0,G.jsx)(u,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,G.jsx)(`span`,{children:e(`voicePage.shortcutChordHint`)})]}),g&&(0,G.jsxs)(`div`,{className:`flex items-start gap-1 pt-1 text-body-small-default text-[var(--content-quiet)]`,children:[(0,G.jsx)(u,{className:`mt-0.5 h-3 w-3 shrink-0`}),(0,G.jsx)(`span`,{children:e(`voicePage.focusedTabNote`)})]})]})]})})}function Q({label:e,badge:t,selected:n,recording:r=!1,onClick:i}){return(0,G.jsxs)(`button`,{type:`button`,onClick:i,className:[`inline-flex items-center gap-2 rounded-lg border px-3 py-1.5 text-body-medium-lighter transition-colors`,`border-[var(--border-subtle)]`,n?`bg-[var(--surface-active)]`:`bg-[var(--surface-lift)] hover:bg-[var(--surface-hover)]`,r?`animate-pulse`:``].filter(Boolean).join(` `),children:[(0,G.jsx)(`span`,{className:[`inline-block h-2.5 w-2.5 rounded-full border`,n?`border-[var(--primary-base)] bg-[var(--primary-base)]`:`border-[var(--border-element)]`].join(` `)}),(0,G.jsx)(`span`,{className:`text-[var(--content-default)]`,children:e}),t&&(0,G.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:t})]})}function Ne(){let{t:e}=r(`settings`),t=I.use.pauseBeforeReplyMs(),n=I.use.setPauseBeforeReplyMs(),i=I.use.interruptSensitivity(),a=I.use.setInterruptSensitivity(),o=(0,W.useMemo)(()=>[{value:`low`,label:e(`voicePage.interruptSensitivityLow`)},{value:`medium`,label:e(`voicePage.interruptSensitivityMedium`)},{value:`high`,label:e(`voicePage.interruptSensitivityHigh`)}],[e]),s=t!==null||i!==null;return(0,G.jsx)(U,{title:e(`voicePage.turnTakingTitle`),subtitle:e(`voicePage.turnTakingSubtitle`),children:(0,G.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,G.jsx)(ge,{}),(0,G.jsx)($,{label:e(`voicePage.pauseBeforeReplyLabel`),description:e(`voicePage.pauseBeforeReplyDescription`),isDefault:t===null,children:(0,G.jsx)(`div`,{className:`max-w-xs`,children:(0,G.jsx)(M,{value:(t??1200)/1e3,onValueChange:e=>{typeof e==`number`&&n(Math.round(e*1e3))},min:500/1e3,max:h/1e3,step:.1,showValue:!0,formatValue:e=>`${(typeof e==`number`?e:e[0]).toFixed(1)}s`,"aria-label":e(`voicePage.pauseBeforeReplyAriaLabel`)})})}),(0,G.jsx)($,{label:e(`voicePage.interruptSensitivityLabel`),description:e(`voicePage.interruptSensitivityDescription`),isDefault:i===null,children:(0,G.jsx)(`div`,{className:`max-w-xs`,children:(0,G.jsx)(E,{items:o,value:i??`medium`,onChange:a,ariaLabel:e(`voicePage.interruptSensitivityAriaLabel`)})})}),s&&(0,G.jsx)(`div`,{children:(0,G.jsx)(D,{variant:`outlined`,onClick:()=>{n(null),a(null)},children:e(`voicePage.resetToDefaults`)})})]})})}function $({label:e,description:t,isDefault:n,children:i}){let{t:a}=r(`settings`);return(0,G.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,G.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,G.jsx)(`span`,{className:`text-body-medium-lighter text-[var(--content-default)]`,children:e}),n&&(0,G.jsx)(`span`,{className:`shrink-0 rounded-full bg-[var(--surface-active)] px-2 py-0.5 text-body-small-default text-[var(--content-tertiary)]`,children:a(`voicePage.defaultBadge`)})]}),(0,G.jsx)(`p`,{className:J,children:t}),i]})}export{Te as VoicePage};
|
package/dist/assets/{weather-forecast-display-B6j-V-yS.js → weather-forecast-display-uFMDzqaC.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{O as t}from"./vendor-WUN87CSE.js";import{b as n,t as r}from"./react-DPM_L_aA.js";import{At as i,D as a,I as o,Xn as s,fr as c,hr as l,lr as u,mr as d,pr as f,s as p,ur as m}from"./icons-CSdHOix6.js";import{en as h,nn as g,pa as _,rn as v,tn as y}from"./index-7XDiAJ-A.js";var b=e(n(),1),x={"sun.max.fill":{icon:a,className:`text-orange-500`},"cloud.sun.fill":{icon:m,className:`text-amber-400`},"moon.fill":{icon:i,className:`text-blue-400`},"cloud.moon.fill":{icon:f,className:`text-blue-400`},"cloud.fill":{icon:u,className:`text-stone-400`},"cloud.rain.fill":{icon:c,className:`text-blue-400`},snowflake:{icon:o,className:`text-blue-300`},"cloud.bolt.fill":{icon:d,className:`text-orange-500`},"cloud.fog.fill":{icon:l,className:`text-stone-400`}},S={sunny:{icon:a,className:`text-orange-500`},clear:{icon:a,className:`text-orange-500`},"partly cloudy":{icon:m,className:`text-amber-400`},"mostly sunny":{icon:m,className:`text-amber-400`},cloudy:{icon:u,className:`text-stone-400`},overcast:{icon:u,className:`text-stone-400`},rainy:{icon:c,className:`text-blue-400`},rain:{icon:c,className:`text-blue-400`},drizzle:{icon:c,className:`text-blue-400`},snow:{icon:o,className:`text-blue-300`},snowy:{icon:o,className:`text-blue-300`},thunderstorm:{icon:d,className:`text-orange-500`},thunder:{icon:d,className:`text-orange-500`},foggy:{icon:l,className:`text-stone-400`},fog:{icon:l,className:`text-stone-400`},mist:{icon:l,className:`text-stone-400`},hazy:{icon:l,className:`text-stone-400`},night:{icon:i,className:`text-blue-400`},"mainly clear":{icon:a,className:`text-orange-500`},"mostly cloudy":{icon:u,className:`text-stone-400`},breezy:{icon:p,className:`text-stone-400`},windy:{icon:p,className:`text-stone-400`},cool:{icon:u,className:`text-stone-400`},warm:{icon:a,className:`text-orange-500`},hot:{icon:a,className:`text-orange-500`},cold:{icon:o,className:`text-blue-300`},"cold snap":{icon:o,className:`text-blue-300`},"warm, mostly sunny":{icon:m,className:`text-amber-400`},"cooler, breezy":{icon:p,className:`text-stone-400`}},C={icon:u,className:`text-stone-400`};function w(e){let t=x[e];if(t)return t;let n=e.toLowerCase(),r=S[n];if(r)return r;for(let[e,t]of Object.entries(S))if(n.includes(e))return t;return C}function T(e){if(typeof e==`string`){let t=e.match(/^(\d+)\s*mph\s*(.*)/i);if(t)return{speed:Number(t[1]),direction:t[2]?.trim()||void 0}}return{}}function E(e){let t;if(typeof e.location==`string`)t=e.location;else{let n=g(e.location);n&&typeof n.name==`string`&&(t=n.name)}if(!t)return null;let n=g(e.current),r=y(n?.temp)??y(e.currentTemp)??y(e.temperature)??y(e.temp),i=y(n?.feelsLike)??y(n?.feels_like)??y(n?.apparentTemperature)??y(e.feelsLike)??y(e.feels_like)??y(e.apparentTemperature),a=v(n?.condition)??v(e.condition),o=y(n?.humidity)??y(e.humidity),s=T(n?.wind??e.wind),c=y(n?.windSpeed)??y(n?.wind_speed)??y(e.windSpeed)??y(e.wind_speed)??s.speed,l=v(n?.windDirection)??v(n?.wind_direction)??v(e.windDirection)??v(e.wind_direction)??s.direction,u=g(e.units),d=v(u?.temperature)??v(n?.unit)??v(e.unit)??`F`,f=v(u?.speed)??v(e.windUnit)??v(e.wind_unit),p=h(e.hourly).map((e,t)=>({id:v(e.id)??String(t),time:v(e.time)??``,icon:v(e.icon)??v(e.condition)??`cloud.fill`,temp:y(e.tempC)??y(e.temp)??y(e.temperature),tempC:y(e.tempC)})),m=h([e.forecast,e.daily,e.days].find(Array.isArray)).map((e,t)=>({id:v(e.id)??String(t),day:v(e.day)??v(e.date),dayLabel:v(e.dayLabel)??v(e.date),icon:v(e.icon)??v(e.condition)??`cloud.fill`,low:y(e.low),high:y(e.high),lowC:y(e.lowC),highC:y(e.highC),precip:y(e.precip)??y(e.precipitation)??y(e.precipitationProbability),condition:v(e.condition)}));return{location:t,currentTemp:r,feelsLike:i,condition:a,humidity:o,windSpeed:c,windDirection:l,windUnit:f,unit:d,hourly:p.length>0?p:void 0,forecast:m.length>0?m:void 0}}function D(e){return e*9/5+32}function O(e){return(e-32)*5/9}function k(e,t,n){if(e===void 0)return null;let r=e;return t&&!n&&(r=O(e)),!t&&n&&(r=D(e)),`${Math.round(r)}`}function A(e,t,n){return e.tempC===void 0?e.temp===void 0?null:k(e.temp,t,n):k(e.tempC,!1,n)}function j(e,t,n){return e.lowC===void 0?k(e.low,t,n):k(e.lowC,!1,n)}function M(e,t,n){return e.highC===void 0?k(e.high,t,n):k(e.highC,!1,n)}var N=r();function P({icon:e,size:t=20}){let{icon:n,className:r}=w(e);return(0,N.jsx)(n,{width:t,height:t,className:r})}function F({useFahrenheit:e,onToggle:n}){let{t:r}=t(`chat`);return(0,N.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border border-[var(--border-element)]`,children:[(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!0),className:_(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-[var(--primary-base)] text-[var(--content-inset)]`:`bg-transparent text-[var(--content-quiet)]`),children:r(`weatherForecastDisplay.fahrenheit`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!1),className:_(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-transparent text-[var(--content-quiet)]`:`bg-[var(--primary-base)] text-[var(--content-inset)]`),children:r(`weatherForecastDisplay.celsius`)})]})}function I({data:e,sourceIsFahrenheit:n,useFahrenheit:r,onToggle:i}){let{t:a}=t(`chat`),o=e.location,c=k(e.currentTemp,n,r),l=k(e.feelsLike,n,r),u=r?`F`:`C`,d=e.forecast?.[0],f=d?M(d,n,r):null,m=d?j(d,n,r):null,h=null;return e.windSpeed!==void 0&&(h=`${Math.round(e.windSpeed)} ${e.windUnit??`mph`}`,e.windDirection&&(h=`${e.windDirection} ${h}`)),(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:o}),c!==null&&(0,N.jsxs)(`div`,{className:`mt-1 text-4xl font-light text-[var(--content-default)]`,children:[c,`°`,u]}),e.condition&&(0,N.jsx)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--content-quiet)]`,children:e.condition})]}),(0,N.jsx)(F,{useFahrenheit:r,onToggle:i})]}),(0,N.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[l!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:a(`weatherForecastDisplay.feelsLike`,{temp:l})}),f!==null&&m!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:a(`weatherForecastDisplay.highLow`,{high:f,low:m})}),h&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(p,{width:12,height:12}),h]}),e.humidity!==void 0&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(s,{width:12,height:12}),e.humidity,`%`]})]})]})}function L({hourly:e,sourceIsFahrenheit:n,useFahrenheit:r}){let{t:i}=t(`chat`);return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex gap-3 overflow-x-auto`,children:e.map((e,t)=>{let a=e.time.toLowerCase()===`now`,o=A(e,n,r);return(0,N.jsxs)(`div`,{className:`flex min-w-[3rem] shrink-0 flex-col items-center gap-1`,children:[(0,N.jsx)(`span`,{className:a?`text-body-small-emphasised text-[var(--content-default)]`:`text-label-medium-default text-[var(--content-quiet)]`,children:a?i(`weatherForecastDisplay.now`):e.time}),(0,N.jsx)(P,{icon:e.icon,size:18}),o!==null&&(0,N.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-default)]`,children:[o,`°`]})]},e.id??t)})})})}function R({forecast:e,currentTemp:t,sourceIsFahrenheit:n,useFahrenheit:r}){let{globalMin:i,globalMax:a}=(0,b.useMemo)(()=>{let t=1/0,n=-1/0;for(let r of e){let e=r.lowC??r.low,i=r.highC??r.high;e!==void 0&&e<t&&(t=e),i!==void 0&&i>n&&(n=i)}return{globalMin:t===1/0?0:t,globalMax:n===-1/0?100:n}},[e]),o=a-i||1;return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map((e,s)=>{let c=e.dayLabel??e.day??`Day ${s+1}`,l=c.toLowerCase()===`today`,u=j(e,n,r),d=M(e,n,r),f=e.precip,p=e.lowC??e.low??i,m=e.highC??e.high??a,h=(p-i)/o*100,g=(m-i)/o*100,v=Math.max(g-h,2),y=null;if(l&&t!==void 0){let r=(e.lowC!==void 0||e.highC!==void 0)&&n?(t-32)*5/9:t;y=m===p?50:(Math.max(p,Math.min(m,r))-p)/(m-p)*100}return(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:_(`w-12 shrink-0 truncate text-body-small-default`,l?`text-[var(--content-default)]`:`text-[var(--content-quiet)]`),children:c}),(0,N.jsxs)(`div`,{className:`flex w-10 shrink-0 items-center justify-center gap-0.5`,children:[(0,N.jsx)(P,{icon:e.icon,size:16}),f!==void 0&&f>0&&(0,N.jsxs)(`span`,{className:`text-label-small-default text-blue-400`,children:[Math.round(f),`%`]})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-faint)]`,children:u===null?`--`:`${u}°`}),(0,N.jsxs)(`div`,{className:`relative h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--border-subtle)]`,children:[(0,N.jsx)(`div`,{className:`absolute top-0 h-full rounded-full bg-[var(--primary-base)]`,style:{left:`${h}%`,width:`${v}%`}}),y!==null&&(0,N.jsx)(`div`,{className:`absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-[var(--aux-white)] bg-[var(--aux-white)] shadow-sm`,style:{left:`${h+y/100*v}%`}})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-default)]`,children:d===null?`--`:`${d}°`})]},e.id??s)})})})}function z({templateData:e,fallback:t}){let n=(0,b.useMemo)(()=>E(e),[e]),r=n?.unit?.toUpperCase()===`F`||n?.unit?.toLowerCase()===`fahrenheit`,[i,a]=(0,b.useState)(null),o=i??r;return!n||n.currentTemp===void 0&&!n.forecast?.length?t??null:(0,N.jsxs)(`div`,{className:`mt-3`,children:[(0,N.jsx)(I,{data:n,sourceIsFahrenheit:r,useFahrenheit:o,onToggle:a}),n.hourly&&n.hourly.length>0&&(0,N.jsx)(L,{hourly:n.hourly,sourceIsFahrenheit:r,useFahrenheit:o}),n.forecast&&n.forecast.length>0&&(0,N.jsx)(R,{forecast:n.forecast,currentTemp:n.currentTemp,sourceIsFahrenheit:r,useFahrenheit:o})]})}export{z as WeatherForecastDisplay};
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{j as t}from"./vendor-kNpRDQWe.js";import{b as n,t as r}from"./react-DPM_L_aA.js";import{At as i,D as a,I as o,Xn as s,fr as c,hr as l,lr as u,mr as d,pr as f,s as p,ur as m}from"./icons-CSdHOix6.js";import{Bt as h,Lt as g,Rt as _,ia as v,zt as y}from"./index-D_aS89pX.js";var b=e(n(),1),x={"sun.max.fill":{icon:a,className:`text-orange-500`},"cloud.sun.fill":{icon:m,className:`text-amber-400`},"moon.fill":{icon:i,className:`text-blue-400`},"cloud.moon.fill":{icon:f,className:`text-blue-400`},"cloud.fill":{icon:u,className:`text-stone-400`},"cloud.rain.fill":{icon:c,className:`text-blue-400`},snowflake:{icon:o,className:`text-blue-300`},"cloud.bolt.fill":{icon:d,className:`text-orange-500`},"cloud.fog.fill":{icon:l,className:`text-stone-400`}},S={sunny:{icon:a,className:`text-orange-500`},clear:{icon:a,className:`text-orange-500`},"partly cloudy":{icon:m,className:`text-amber-400`},"mostly sunny":{icon:m,className:`text-amber-400`},cloudy:{icon:u,className:`text-stone-400`},overcast:{icon:u,className:`text-stone-400`},rainy:{icon:c,className:`text-blue-400`},rain:{icon:c,className:`text-blue-400`},drizzle:{icon:c,className:`text-blue-400`},snow:{icon:o,className:`text-blue-300`},snowy:{icon:o,className:`text-blue-300`},thunderstorm:{icon:d,className:`text-orange-500`},thunder:{icon:d,className:`text-orange-500`},foggy:{icon:l,className:`text-stone-400`},fog:{icon:l,className:`text-stone-400`},mist:{icon:l,className:`text-stone-400`},hazy:{icon:l,className:`text-stone-400`},night:{icon:i,className:`text-blue-400`},"mainly clear":{icon:a,className:`text-orange-500`},"mostly cloudy":{icon:u,className:`text-stone-400`},breezy:{icon:p,className:`text-stone-400`},windy:{icon:p,className:`text-stone-400`},cool:{icon:u,className:`text-stone-400`},warm:{icon:a,className:`text-orange-500`},hot:{icon:a,className:`text-orange-500`},cold:{icon:o,className:`text-blue-300`},"cold snap":{icon:o,className:`text-blue-300`},"warm, mostly sunny":{icon:m,className:`text-amber-400`},"cooler, breezy":{icon:p,className:`text-stone-400`}},C={icon:u,className:`text-stone-400`};function w(e){let t=x[e];if(t)return t;let n=e.toLowerCase(),r=S[n];if(r)return r;for(let[e,t]of Object.entries(S))if(n.includes(e))return t;return C}function T(e){if(typeof e==`string`){let t=e.match(/^(\d+)\s*mph\s*(.*)/i);if(t)return{speed:Number(t[1]),direction:t[2]?.trim()||void 0}}return{}}function E(e){let t;if(typeof e.location==`string`)t=e.location;else{let n=y(e.location);n&&typeof n.name==`string`&&(t=n.name)}if(!t)return null;let n=y(e.current),r=_(n?.temp)??_(e.currentTemp)??_(e.temperature)??_(e.temp),i=_(n?.feelsLike)??_(n?.feels_like)??_(n?.apparentTemperature)??_(e.feelsLike)??_(e.feels_like)??_(e.apparentTemperature),a=h(n?.condition)??h(e.condition),o=_(n?.humidity)??_(e.humidity),s=T(n?.wind??e.wind),c=_(n?.windSpeed)??_(n?.wind_speed)??_(e.windSpeed)??_(e.wind_speed)??s.speed,l=h(n?.windDirection)??h(n?.wind_direction)??h(e.windDirection)??h(e.wind_direction)??s.direction,u=y(e.units),d=h(u?.temperature)??h(n?.unit)??h(e.unit)??`F`,f=h(u?.speed)??h(e.windUnit)??h(e.wind_unit),p=g(e.hourly).map((e,t)=>({id:h(e.id)??String(t),time:h(e.time)??``,icon:h(e.icon)??h(e.condition)??`cloud.fill`,temp:_(e.tempC)??_(e.temp)??_(e.temperature),tempC:_(e.tempC)})),m=g([e.forecast,e.daily,e.days].find(Array.isArray)).map((e,t)=>({id:h(e.id)??String(t),day:h(e.day)??h(e.date),dayLabel:h(e.dayLabel)??h(e.date),icon:h(e.icon)??h(e.condition)??`cloud.fill`,low:_(e.low),high:_(e.high),lowC:_(e.lowC),highC:_(e.highC),precip:_(e.precip)??_(e.precipitation)??_(e.precipitationProbability),condition:h(e.condition)}));return{location:t,currentTemp:r,feelsLike:i,condition:a,humidity:o,windSpeed:c,windDirection:l,windUnit:f,unit:d,hourly:p.length>0?p:void 0,forecast:m.length>0?m:void 0}}function D(e){return e*9/5+32}function O(e){return(e-32)*5/9}function k(e,t,n){if(e===void 0)return null;let r=e;return t&&!n&&(r=O(e)),!t&&n&&(r=D(e)),`${Math.round(r)}`}function A(e,t,n){return e.tempC===void 0?e.temp===void 0?null:k(e.temp,t,n):k(e.tempC,!1,n)}function j(e,t,n){return e.lowC===void 0?k(e.low,t,n):k(e.lowC,!1,n)}function M(e,t,n){return e.highC===void 0?k(e.high,t,n):k(e.highC,!1,n)}var N=r();function P({icon:e,size:t=20}){let{icon:n,className:r}=w(e);return(0,N.jsx)(n,{width:t,height:t,className:r})}function F({useFahrenheit:e,onToggle:n}){let{t:r}=t(`chat`);return(0,N.jsxs)(`div`,{className:`flex overflow-hidden rounded-md border border-[var(--border-element)]`,children:[(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!0),className:v(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-[var(--primary-base)] text-[var(--content-inset)]`:`bg-transparent text-[var(--content-quiet)]`),children:r(`weatherForecastDisplay.fahrenheit`)}),(0,N.jsx)(`button`,{type:`button`,onClick:()=>n(!1),className:v(`px-2 py-0.5 text-body-small-default transition-colors`,e?`bg-transparent text-[var(--content-quiet)]`:`bg-[var(--primary-base)] text-[var(--content-inset)]`),children:r(`weatherForecastDisplay.celsius`)})]})}function I({data:e,sourceIsFahrenheit:n,useFahrenheit:r,onToggle:i}){let{t:a}=t(`chat`),o=e.location,c=k(e.currentTemp,n,r),l=k(e.feelsLike,n,r),u=r?`F`:`C`,d=e.forecast?.[0],f=d?M(d,n,r):null,m=d?j(d,n,r):null,h=null;return e.windSpeed!==void 0&&(h=`${Math.round(e.windSpeed)} ${e.windUnit??`mph`}`,e.windDirection&&(h=`${e.windDirection} ${h}`)),(0,N.jsxs)(`div`,{children:[(0,N.jsxs)(`div`,{className:`flex items-start justify-between`,children:[(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`div`,{className:`text-body-medium-default text-[var(--content-tertiary)]`,children:o}),c!==null&&(0,N.jsxs)(`div`,{className:`mt-1 text-4xl font-light text-[var(--content-default)]`,children:[c,`°`,u]}),e.condition&&(0,N.jsx)(`div`,{className:`mt-0.5 text-body-small-default text-[var(--content-quiet)]`,children:e.condition})]}),(0,N.jsx)(F,{useFahrenheit:r,onToggle:i})]}),(0,N.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-3`,children:[l!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:a(`weatherForecastDisplay.feelsLike`,{temp:l})}),f!==null&&m!==null&&(0,N.jsx)(`span`,{className:`text-body-small-default text-[var(--content-quiet)]`,children:a(`weatherForecastDisplay.highLow`,{high:f,low:m})}),h&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(p,{width:12,height:12}),h]}),e.humidity!==void 0&&(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-[var(--tag-bg-neutral)] px-2 py-0.5 text-label-medium-default text-[var(--content-tertiary)]`,children:[(0,N.jsx)(s,{width:12,height:12}),e.humidity,`%`]})]})]})}function L({hourly:e,sourceIsFahrenheit:n,useFahrenheit:r}){let{t:i}=t(`chat`);return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex gap-3 overflow-x-auto`,children:e.map((e,t)=>{let a=e.time.toLowerCase()===`now`,o=A(e,n,r);return(0,N.jsxs)(`div`,{className:`flex min-w-[3rem] shrink-0 flex-col items-center gap-1`,children:[(0,N.jsx)(`span`,{className:a?`text-body-small-emphasised text-[var(--content-default)]`:`text-label-medium-default text-[var(--content-quiet)]`,children:a?i(`weatherForecastDisplay.now`):e.time}),(0,N.jsx)(P,{icon:e.icon,size:18}),o!==null&&(0,N.jsxs)(`span`,{className:`text-body-small-default text-[var(--content-default)]`,children:[o,`°`]})]},e.id??t)})})})}function R({forecast:e,currentTemp:t,sourceIsFahrenheit:n,useFahrenheit:r}){let{globalMin:i,globalMax:a}=(0,b.useMemo)(()=>{let t=1/0,n=-1/0;for(let r of e){let e=r.lowC??r.low,i=r.highC??r.high;e!==void 0&&e<t&&(t=e),i!==void 0&&i>n&&(n=i)}return{globalMin:t===1/0?0:t,globalMax:n===-1/0?100:n}},[e]),o=a-i||1;return(0,N.jsx)(`div`,{className:`mt-3 border-t border-[var(--border-element)] pt-3`,children:(0,N.jsx)(`div`,{className:`flex flex-col gap-2`,children:e.map((e,s)=>{let c=e.dayLabel??e.day??`Day ${s+1}`,l=c.toLowerCase()===`today`,u=j(e,n,r),d=M(e,n,r),f=e.precip,p=e.lowC??e.low??i,m=e.highC??e.high??a,h=(p-i)/o*100,g=(m-i)/o*100,_=Math.max(g-h,2),y=null;if(l&&t!==void 0){let r=(e.lowC!==void 0||e.highC!==void 0)&&n?(t-32)*5/9:t;y=m===p?50:(Math.max(p,Math.min(m,r))-p)/(m-p)*100}return(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(`span`,{className:v(`w-12 shrink-0 truncate text-body-small-default`,l?`text-[var(--content-default)]`:`text-[var(--content-quiet)]`),children:c}),(0,N.jsxs)(`div`,{className:`flex w-10 shrink-0 items-center justify-center gap-0.5`,children:[(0,N.jsx)(P,{icon:e.icon,size:16}),f!==void 0&&f>0&&(0,N.jsxs)(`span`,{className:`text-label-small-default text-blue-400`,children:[Math.round(f),`%`]})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-faint)]`,children:u===null?`--`:`${u}°`}),(0,N.jsxs)(`div`,{className:`relative h-1.5 flex-1 overflow-hidden rounded-full bg-[var(--border-subtle)]`,children:[(0,N.jsx)(`div`,{className:`absolute top-0 h-full rounded-full bg-[var(--primary-base)]`,style:{left:`${h}%`,width:`${_}%`}}),y!==null&&(0,N.jsx)(`div`,{className:`absolute top-1/2 h-2.5 w-2.5 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-[var(--aux-white)] bg-[var(--aux-white)] shadow-sm`,style:{left:`${h+y/100*_}%`}})]}),(0,N.jsx)(`span`,{className:`w-7 shrink-0 text-right text-body-small-default text-[var(--content-default)]`,children:d===null?`--`:`${d}°`})]},e.id??s)})})})}function z({templateData:e,fallback:t}){let n=(0,b.useMemo)(()=>E(e),[e]),r=n?.unit?.toUpperCase()===`F`||n?.unit?.toLowerCase()===`fahrenheit`,[i,a]=(0,b.useState)(null),o=i??r;return!n||n.currentTemp===void 0&&!n.forecast?.length?t??null:(0,N.jsxs)(`div`,{className:`mt-3`,children:[(0,N.jsx)(I,{data:n,sourceIsFahrenheit:r,useFahrenheit:o,onToggle:a}),n.hourly&&n.hourly.length>0&&(0,N.jsx)(L,{hourly:n.hourly,sourceIsFahrenheit:r,useFahrenheit:o}),n.forecast&&n.forecast.length>0&&(0,N.jsx)(R,{forecast:n.forecast,currentTemp:n.currentTemp,sourceIsFahrenheit:r,useFahrenheit:o})]})}export{z as WeatherForecastDisplay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as e}from"./vendor-kNpRDQWe.js";import{n as t,t as n}from"./definitions-B0aFqshm.js";var r=class extends e{constructor(){super(...arguments),this.selectionStarted=!1}async impact(e){let t=this.patternForImpact(e?.style);this.vibrateWithPattern(t)}async notification(e){let t=this.patternForNotification(e?.type);this.vibrateWithPattern(t)}async vibrate(e){let t=e?.duration||300;this.vibrateWithPattern([t])}async selectionStart(){this.selectionStarted=!0}async selectionChanged(){this.selectionStarted&&this.vibrateWithPattern([70])}async selectionEnd(){this.selectionStarted=!1}patternForImpact(e=n.Heavy){return e===n.Medium?[43]:e===n.Light?[20]:[61]}patternForNotification(e=t.Success){return e===t.Warning?[30,40,30,50,60]:e===t.Error?[27,45,50]:[35,65,21]}vibrateWithPattern(e){if(navigator.vibrate)navigator.vibrate(e);else throw this.unavailable(`Browser does not support the vibrate API`)}};export{r as HapticsWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as e}from"./vendor-kNpRDQWe.js";var t=class extends e{constructor(){super(),this._lastWindow=null}async open(e){this._lastWindow=window.open(e.url,e.windowName||`_blank`)}async close(){return new Promise((e,t)=>{this._lastWindow==null?t(`No active window to close!`):(this._lastWindow.close(),this._lastWindow=null,e())})}};new t;export{t as BrowserWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as e,O as t}from"./vendor-kNpRDQWe.js";import{n}from"./definitions-BjIATsKe.js";function r(e){let t=e.split(`/`).filter(e=>e!==`.`),n=[];return t.forEach(e=>{e===`..`&&n.length>0&&n[n.length-1]!==`..`?n.pop():n.push(e)}),n.join(`/`)}function i(e,t){e=r(e),t=r(t);let n=e.split(`/`),i=t.split(`/`);return e!==t&&n.every((e,t)=>e===i[t])}var a=class r extends e{constructor(){super(...arguments),this.DB_VERSION=1,this.DB_NAME=`Disc`,this._writeCmds=[`add`,`put`,`delete`],this.downloadFile=async e=>{let n=t(e,e.webFetchExtra),r=await fetch(e.url,n),i;if(!e.progress)i=await r.blob();else if(!r?.body)i=new Blob;else{let t=r.body.getReader(),n=0,a=[],o=r.headers.get(`content-type`),s=parseInt(r.headers.get(`content-length`)||`0`,10);for(;;){let{done:r,value:i}=await t.read();if(r)break;a.push(i),n+=i?.length||0;let o={url:e.url,bytes:n,contentLength:s};this.notifyListeners(`progress`,o)}let c=new Uint8Array(n),l=0;for(let e of a)e!==void 0&&(c.set(e,l),l+=e.length);i=new Blob([c.buffer],{type:o||void 0})}return{path:(await this.writeFile({path:e.path,directory:e.directory??void 0,recursive:e.recursive??!1,data:i})).uri,blob:i}}}readFileInChunks(e,t){throw this.unavailable(`Method not implemented.`)}async initDb(){if(this._db!==void 0)return this._db;if(!(`indexedDB`in window))throw this.unavailable(`This browser doesn't support IndexedDB`);return new Promise((e,t)=>{let n=indexedDB.open(this.DB_NAME,this.DB_VERSION);n.onupgradeneeded=r.doUpgrade,n.onsuccess=()=>{this._db=n.result,e(n.result)},n.onerror=()=>t(n.error),n.onblocked=()=>{console.warn(`db blocked`)}})}static doUpgrade(e){let t=e.target.result;switch(e.oldVersion){default:t.objectStoreNames.contains(`FileStorage`)&&t.deleteObjectStore(`FileStorage`),t.createObjectStore(`FileStorage`,{keyPath:`path`}).createIndex(`by_folder`,`folder`)}}async dbRequest(e,t){let n=this._writeCmds.indexOf(e)===-1?`readonly`:`readwrite`;return this.initDb().then(r=>new Promise((i,a)=>{let o=r.transaction([`FileStorage`],n).objectStore(`FileStorage`)[e](...t);o.onsuccess=()=>i(o.result),o.onerror=()=>a(o.error)}))}async dbIndexRequest(e,t,n){let r=this._writeCmds.indexOf(t)===-1?`readonly`:`readwrite`;return this.initDb().then(i=>new Promise((a,o)=>{let s=i.transaction([`FileStorage`],r).objectStore(`FileStorage`).index(e)[t](...n);s.onsuccess=()=>a(s.result),s.onerror=()=>o(s.error)}))}getPath(e,t){let n=t===void 0?``:t.replace(/^[/]+|[/]+$/g,``),r=``;return e!==void 0&&(r+=`/`+e),t!==``&&(r+=`/`+n),r}async clear(){(await this.initDb()).transaction([`FileStorage`],`readwrite`).objectStore(`FileStorage`).clear()}async readFile(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(n===void 0)throw Error(`File does not exist.`);return{data:n.content?n.content:``}}async writeFile(e){let t=this.getPath(e.directory,e.path),n=e.data,r=e.encoding,i=e.recursive,a=await this.dbRequest(`get`,[t]);if(a&&a.type===`directory`)throw Error(`The supplied path is a directory.`);let o=t.substr(0,t.lastIndexOf(`/`));if(await this.dbRequest(`get`,[o])===void 0){let t=o.indexOf(`/`,1);if(t!==-1){let n=o.substr(t);await this.mkdir({path:n,directory:e.directory,recursive:i})}}if(!r&&!(n instanceof Blob)&&(n=n.indexOf(`,`)>=0?n.split(`,`)[1]:n,!this.isBase64String(n)))throw Error(`The supplied data is not valid base64 content.`);let s=Date.now(),c={path:t,folder:o,type:`file`,size:n instanceof Blob?n.size:n.length,ctime:s,mtime:s,content:n};return await this.dbRequest(`put`,[c]),{uri:c.path}}async appendFile(e){let t=this.getPath(e.directory,e.path),n=e.data,r=e.encoding,i=t.substr(0,t.lastIndexOf(`/`)),a=Date.now(),o=a,s=await this.dbRequest(`get`,[t]);if(s&&s.type===`directory`)throw Error(`The supplied path is a directory.`);if(await this.dbRequest(`get`,[i])===void 0){let t=i.indexOf(`/`,1);if(t!==-1){let n=i.substr(t);await this.mkdir({path:n,directory:e.directory,recursive:!0})}}if(!r&&!this.isBase64String(n))throw Error(`The supplied data is not valid base64 content.`);if(s!==void 0){if(s.content instanceof Blob)throw Error(`The occupied entry contains a Blob object which cannot be appended to.`);n=s.content!==void 0&&!r?btoa(atob(s.content)+atob(n)):s.content+n,o=s.ctime}let c={path:t,folder:i,type:`file`,size:n.length,ctime:o,mtime:a,content:n};await this.dbRequest(`put`,[c])}async deleteFile(e){let t=this.getPath(e.directory,e.path);if(await this.dbRequest(`get`,[t])===void 0)throw Error(`File does not exist.`);if((await this.dbIndexRequest(`by_folder`,`getAllKeys`,[IDBKeyRange.only(t)])).length!==0)throw Error(`Folder is not empty.`);await this.dbRequest(`delete`,[t])}async mkdir(e){let t=this.getPath(e.directory,e.path),n=e.recursive,r=t.substr(0,t.lastIndexOf(`/`)),i=(t.match(/\//g)||[]).length,a=await this.dbRequest(`get`,[r]),o=await this.dbRequest(`get`,[t]);if(i===1)throw Error(`Cannot create Root directory`);if(o!==void 0)throw Error(`Current directory does already exist.`);if(!n&&i!==2&&a===void 0)throw Error(`Parent directory must exist`);if(n&&i!==2&&a===void 0){let t=r.substr(r.indexOf(`/`,1));await this.mkdir({path:t,directory:e.directory,recursive:n})}let s=Date.now(),c={path:t,folder:r,type:`directory`,size:0,ctime:s,mtime:s};await this.dbRequest(`put`,[c])}async rmdir(e){let{path:t,directory:n,recursive:r}=e,i=this.getPath(n,t),a=await this.dbRequest(`get`,[i]);if(a===void 0)throw Error(`Folder does not exist.`);if(a.type!==`directory`)throw Error(`Requested path is not a directory`);let o=await this.readdir({path:t,directory:n});if(o.files.length!==0&&!r)throw Error(`Folder is not empty`);for(let e of o.files){let i=`${t}/${e.name}`;(await this.stat({path:i,directory:n})).type===`file`?await this.deleteFile({path:i,directory:n}):await this.rmdir({path:i,directory:n,recursive:r})}await this.dbRequest(`delete`,[i])}async readdir(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(e.path!==``&&n===void 0)throw Error(`Folder does not exist.`);let r=await this.dbIndexRequest(`by_folder`,`getAllKeys`,[IDBKeyRange.only(t)]);return{files:await Promise.all(r.map(async e=>{let n=await this.dbRequest(`get`,[e]);return n===void 0&&(n=await this.dbRequest(`get`,[e+`/`])),{name:e.substring(t.length+1),type:n.type,size:n.size,ctime:n.ctime,mtime:n.mtime,uri:n.path}}))}}async getUri(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);return n===void 0&&(n=await this.dbRequest(`get`,[t+`/`])),{uri:n?.path||t}}async stat(e){let t=this.getPath(e.directory,e.path),n=await this.dbRequest(`get`,[t]);if(n===void 0&&(n=await this.dbRequest(`get`,[t+`/`])),n===void 0)throw Error(`Entry does not exist.`);return{name:n.path.substring(t.length+1),type:n.type,size:n.size,ctime:n.ctime,mtime:n.mtime,uri:n.path}}async rename(e){await this._copy(e,!0)}async copy(e){return this._copy(e,!1)}async requestPermissions(){return{publicStorage:`granted`}}async checkPermissions(){return{publicStorage:`granted`}}async _copy(e,t=!1){let{toDirectory:r}=e,{to:a,from:o,directory:s}=e;if(!a||!o)throw Error(`Both to and from must be provided`);r||=s;let c=this.getPath(s,o),l=this.getPath(r,a);if(c===l)return{uri:l};if(i(c,l))throw Error(`To path cannot contain the from path`);let u;try{u=await this.stat({path:a,directory:r})}catch{let e=a.split(`/`);e.pop();let t=e.join(`/`);if(e.length>0&&(await this.stat({path:t,directory:r})).type!==`directory`)throw Error(`Parent directory of the to path is a file`)}if(u&&u.type===`directory`)throw Error(`Cannot overwrite a directory with a file`);let d=await this.stat({path:o,directory:s}),f=async(e,t,n)=>{let i=this.getPath(r,e),a=await this.dbRequest(`get`,[i]);a.ctime=t,a.mtime=n,await this.dbRequest(`put`,[a])},p=d.ctime?d.ctime:Date.now();switch(d.type){case`file`:{let e=await this.readFile({path:o,directory:s});t&&await this.deleteFile({path:o,directory:s});let i;!(e.data instanceof Blob)&&!this.isBase64String(e.data)&&(i=n.UTF8);let c=await this.writeFile({path:a,directory:r,data:e.data,encoding:i});return t&&await f(a,p,d.mtime),c}case`directory`:{if(u)throw Error(`Cannot move a directory over an existing object`);try{await this.mkdir({path:a,directory:r,recursive:!1}),t&&await f(a,p,d.mtime)}catch{}let e=(await this.readdir({path:o,directory:s})).files;for(let n of e)await this._copy({from:`${o}/${n.name}`,to:`${a}/${n.name}`,directory:s,toDirectory:r},t);t&&await this.rmdir({path:o,directory:s})}}return{uri:l}}isBase64String(e){try{return btoa(atob(e))==e}catch{return!1}}};a._debug=!0;export{a as FilesystemWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as e}from"./vendor-kNpRDQWe.js";var t=class extends e{constructor(){super(),this.handleVisibilityChange=()=>{let e={isActive:document.hidden!==!0};this.notifyListeners(`appStateChange`,e),document.hidden?this.notifyListeners(`pause`,null):this.notifyListeners(`resume`,null)},document.addEventListener(`visibilitychange`,this.handleVisibilityChange,!1)}exitApp(){throw this.unimplemented(`Not implemented on web.`)}async getInfo(){throw this.unimplemented(`Not implemented on web.`)}async getLaunchUrl(){return{url:``}}async getState(){return{isActive:document.hidden!==!0}}async minimizeApp(){throw this.unimplemented(`Not implemented on web.`)}async toggleBackButtonHandler(){throw this.unimplemented(`Not implemented on web.`)}async getAppLanguage(){return{value:navigator.language.split(`-`)[0].toLowerCase()}}};export{t as AppWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as e}from"./vendor-kNpRDQWe.js";var t=class extends e{async canShare(){return typeof navigator>`u`||!navigator.share?{value:!1}:{value:!0}}async share(e){if(typeof navigator>`u`||!navigator.share)throw this.unavailable(`Share API not available in this browser`);return await navigator.share({title:e.title,text:e.text,url:e.url}),{}}};export{t as ShareWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as e}from"./vendor-kNpRDQWe.js";function t(){let e=window.navigator.connection||window.navigator.mozConnection||window.navigator.webkitConnection,t=`unknown`,n=e?e.type||e.effectiveType:null;if(n&&typeof n==`string`)switch(n){case`bluetooth`:case`cellular`:t=`cellular`;break;case`none`:t=`none`;break;case`ethernet`:case`wifi`:case`wimax`:t=`wifi`;break;case`other`:case`unknown`:t=`unknown`;break;case`slow-2g`:case`2g`:case`3g`:t=`cellular`;break;case`4g`:t=`wifi`;break;default:break}return t}var n=class extends e{constructor(){super(),this.handleOnline=()=>{let e={connected:!0,connectionType:t()};this.notifyListeners(`networkStatusChange`,e)},this.handleOffline=()=>{this.notifyListeners(`networkStatusChange`,{connected:!1,connectionType:`none`})},typeof window<`u`&&(window.addEventListener(`online`,this.handleOnline),window.addEventListener(`offline`,this.handleOffline))}async getStatus(){if(!window.navigator)throw this.unavailable(`Browser does not support the Network Information API`);let e=window.navigator.onLine,n=t();return{connected:e,connectionType:e?n:`none`}}};new n;export{n as NetworkWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as e}from"./vendor-kNpRDQWe.js";var t=class extends e{async start(e){return new Promise(async(t,n)=>{await navigator.mediaDevices.getUserMedia({audio:!e.disableAudio,video:!0}).then(e=>{e.getTracks().forEach(e=>e.stop())}).catch(e=>{n(e)});let r=document.getElementById(`video`),i=document.getElementById(e.parent);if(r)n({message:`camera already started`});else{let r=document.createElement(`video`);r.id=`video`,r.setAttribute(`class`,e.className||``),e.position!==`rear`&&r.setAttribute(`style`,`-webkit-transform: scaleX(-1); transform: scaleX(-1);`);let a=navigator.userAgent.toLowerCase();if(a.includes(`safari`)&&!a.includes(`chrome`)&&(r.setAttribute(`autoplay`,`true`),r.setAttribute(`muted`,`true`),r.setAttribute(`playsinline`,`true`)),i.appendChild(r),navigator.mediaDevices?.getUserMedia){let i={video:{width:{ideal:e.width},height:{ideal:e.height}}};e.position===`rear`?(i.video.facingMode=`environment`,this.isBackCamera=!0):this.isBackCamera=!1,navigator.mediaDevices.getUserMedia(i).then(function(e){r.srcObject=e,r.play(),t()},e=>{n(e)})}}})}async startRecordVideo(){throw this.unimplemented(`Not implemented on web.`)}async stopRecordVideo(){throw this.unimplemented(`Not implemented on web.`)}async stop(){let e=document.getElementById(`video`);if(e){e.pause();let t=e.srcObject.getTracks();for(let e of t)e.stop();e.remove()}}async capture(e){return new Promise(t=>{let n=document.getElementById(`video`),r=document.createElement(`canvas`),i=r.getContext(`2d`);r.width=n.videoWidth,r.height=n.videoHeight,this.isBackCamera||(i.translate(n.videoWidth,0),i.scale(-1,1)),i.drawImage(n,0,0,n.videoWidth,n.videoHeight);let a;a=e.quality==null?r.toDataURL(`image/png`).replace(`data:image/png;base64,`,``):r.toDataURL(`image/jpeg`,e.quality/100).replace(`data:image/jpeg;base64,`,``),t({value:a})})}async captureSample(e){return this.capture(e)}async getSupportedFlashModes(){throw Error(`getSupportedFlashModes not supported under the web platform`)}async setFlashMode(e){throw Error(`setFlashMode not supported under the web platform`)}async flip(){throw Error(`flip not supported under the web platform`)}async setOpacity(e){let t=document.getElementById(`video`);t&&e.opacity&&t.style.setProperty(`opacity`,e.opacity.toString())}async isCameraStarted(){throw this.unimplemented(`Not implemented on web.`)}};export{t as CameraPreviewWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as e}from"./vendor-kNpRDQWe.js";var t=class extends e{async getSafeAreaInsets(){return{insets:{top:0,left:0,right:0,bottom:0}}}async getStatusBarHeight(){return{statusBarHeight:0}}setImmersiveNavigationBar(){throw this.unimplemented(`Method not supported on Web.`)}unsetImmersiveNavigationBar(){throw this.unimplemented(`Method not supported on Web.`)}};export{t as SafeAreaWeb};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{D as e}from"./vendor-kNpRDQWe.js";var t=class extends e{constructor(){super(...arguments),this.pending=[],this.deliveredNotifications=[],this.hasNotificationSupport=()=>{if(!(`Notification`in window)||!Notification.requestPermission)return!1;if(Notification.permission!==`granted`)try{new Notification(``)}catch(e){if(e instanceof Error&&e.name===`TypeError`)return!1}return!0}}async getDeliveredNotifications(){let e=[];for(let t of this.deliveredNotifications){let n={title:t.title,id:parseInt(t.tag),body:t.body};e.push(n)}return{notifications:e}}async removeDeliveredNotifications(e){for(let t of e.notifications){let e=this.deliveredNotifications.find(e=>e.tag===String(t.id));e?.close(),this.deliveredNotifications=this.deliveredNotifications.filter(()=>!e)}}async removeAllDeliveredNotifications(){for(let e of this.deliveredNotifications)e.close();this.deliveredNotifications=[]}async createChannel(){throw this.unimplemented(`Not implemented on web.`)}async deleteChannel(){throw this.unimplemented(`Not implemented on web.`)}async listChannels(){throw this.unimplemented(`Not implemented on web.`)}async schedule(e){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);for(let t of e.notifications)this.sendNotification(t);return{notifications:e.notifications.map(e=>({id:e.id}))}}async getPending(){return{notifications:this.pending}}async registerActionTypes(){throw this.unimplemented(`Not implemented on web.`)}async cancel(e){this.pending=this.pending.filter(t=>!e.notifications.find(e=>e.id===t.id))}async areEnabled(){let{display:e}=await this.checkPermissions();return{value:e===`granted`}}async changeExactNotificationSetting(){throw this.unimplemented(`Not implemented on web.`)}async checkExactNotificationSetting(){throw this.unimplemented(`Not implemented on web.`)}async requestPermissions(){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);return{display:this.transformNotificationPermission(await Notification.requestPermission())}}async checkPermissions(){if(!this.hasNotificationSupport())throw this.unavailable(`Notifications not supported in this browser.`);return{display:this.transformNotificationPermission(Notification.permission)}}transformNotificationPermission(e){switch(e){case`granted`:return`granted`;case`denied`:return`denied`;default:return`prompt`}}sendPending(){let e=[],t=new Date().getTime();for(let n of this.pending)n.schedule?.at&&n.schedule.at.getTime()<=t&&(this.buildNotification(n),e.push(n));this.pending=this.pending.filter(t=>!e.find(e=>e===t))}sendNotification(e){if(e.schedule?.at){let t=e.schedule.at.getTime()-new Date().getTime();this.pending.push(e),setTimeout(()=>{this.sendPending()},t);return}this.buildNotification(e)}buildNotification(e){let t=new Notification(e.title,{body:e.body,tag:String(e.id)});return t.addEventListener(`click`,this.onClick.bind(this,e),!1),t.addEventListener(`show`,this.onShow.bind(this,e),!1),t.addEventListener(`close`,()=>{this.deliveredNotifications=this.deliveredNotifications.filter(()=>!this)},!1),this.deliveredNotifications.push(t),t}onClick(e){let t={actionId:`tap`,notification:e};this.notifyListeners(`localNotificationActionPerformed`,t)}onShow(e){this.notifyListeners(`localNotificationReceived`,e)}};export{t as LocalNotificationsWeb};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./vendor-kNpRDQWe.js";import{f as t,t as n}from"./react-DPM_L_aA.js";import{Pr as r,iv as i,y_ as a}from"./index-D_aS89pX.js";import{t as o}from"./auth-welcome-screen-_mWoDKPq.js";var s=n();function c(){let{t:n}=e(`onboarding`),c=t();return(0,s.jsx)(o,{secondary:{label:n(`welcome.continueWithoutAccount`),onSelect:()=>{a()?c(i.selectAssistant,r):c(i.onboarding.hosting,r)}}})}export{c as WelcomeScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{_ as t,f as n,g as r,j as i}from"./vendor-kNpRDQWe.js";import{b as a,t as o}from"./react-DPM_L_aA.js";import{Lr as s,Rr as c,ai as l,gi as u,jr as d,m as f,o as p,v as m}from"./icons-CSdHOix6.js";import{n as h,r as g,t as _}from"./metric-card-CWM6vcyu.js";import{Is as v,Ls as y,Nr as b,Rs as x,Tn as S,_ as C,by as w,kn as T,wn as E,yy as D}from"./index-D_aS89pX.js";import{t as O}from"./detail-panel-stop-button-jUM1oBBe.js";import{t as k}from"./status-badge-pill-Bg90syHR.js";var A=e(a(),1),j=o();function M({title:e,body:t,emptyText:n}){return(0,j.jsxs)(`div`,{className:`mb-5`,children:[(0,j.jsx)(D,{variant:`body-medium-default`,as:`h3`,className:`mb-2 text-[var(--content-emphasised)]`,children:e}),t?(0,j.jsx)(D,{variant:`body-medium-lighter`,as:`p`,className:`whitespace-pre-wrap break-words leading-relaxed text-[var(--content-default)]`,children:t}):(0,j.jsx)(D,{variant:`body-medium-lighter`,as:`p`,className:`text-[var(--content-tertiary)]`,children:n})]})}function N({leaf:e}){let{t}=i(`chat`),n=e.status===`running`?t(`workflowLeafDetail.running`):t(`workflowLeafDetail.noResultSummary`);return(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`div`,{className:`mb-5 grid grid-cols-2 gap-3`,children:[(0,j.jsx)(_,{icon:(0,j.jsx)(u,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.inputTokens??0,format:e=>h(Math.round(e)),label:t(`workflowLeafDetail.input`)}),(0,j.jsx)(_,{icon:(0,j.jsx)(g,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.outputTokens??0,format:e=>h(Math.round(e)),label:t(`workflowLeafDetail.output`)})]}),(0,j.jsx)(M,{title:t(`workflowLeafDetail.prompt`),body:e.promptSummary,emptyText:t(`workflowLeafDetail.noPromptSummary`)}),(0,j.jsx)(M,{title:t(`workflowLeafDetail.result`),body:e.resultSummary,emptyText:n})]})}function P({status:e}){return(0,j.jsx)(k,{color:y(e),label:x(e)})}function F(e){switch(e){case`completed`:return`var(--system-positive-strong)`;case`failed`:return`var(--system-negative-strong)`;case`cancelled`:return`var(--content-secondary)`;default:return`var(--primary-base)`}}function I(e){switch(e){case`completed`:return`Completed`;case`failed`:return`Failed`;case`cancelled`:return`Cancelled`;default:return`Running`}}function L({status:e}){return(0,j.jsx)(k,{color:F(e),label:I(e)})}function R({status:e}){let{t:a}=i(`chat`),o=n(),s=`h-3.5 w-3.5 shrink-0`,c;return c=e===`running`?(0,j.jsx)(T,{className:`shrink-0`,dotSize:4,gap:2}):e===`completed`?(0,j.jsx)(d,{className:s,style:{color:`var(--system-positive-strong)`}}):e===`failed`?(0,j.jsx)(m,{className:s,style:{color:`var(--system-negative-strong)`}}):(0,j.jsx)(l,{className:s,style:{color:`var(--content-secondary)`},role:`img`,"aria-label":a(`workflowSubagentRow.cancelledAria`)}),(0,j.jsx)(t,{mode:`wait`,initial:!1,children:(0,j.jsx)(r.span,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:o?{duration:0}:{duration:.15,ease:[.16,1,.3,1]},className:`flex shrink-0 items-center`,children:c},e)})}function z({runId:e,leaf:t,components:n,onSelect:r}){let{t:a}=i(`chat`),o=t.label??`Subagent ${t.seq}`,s=t.promptSummary,c=E(`${e}:${t.seq}`);return(0,j.jsx)(`button`,{type:`button`,onClick:r,"aria-label":a(`workflowSubagentRow.openDetailsAria`,{title:o}),className:`flex w-full cursor-pointer items-center justify-between gap-2 rounded-[6px] px-2 py-1.5 text-left transition-colors hover:bg-[var(--surface-overlay)]`,children:(0,j.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,j.jsx)(R,{status:t.status}),n?(0,j.jsx)(S,{components:n,bodyShapeId:c.bodyShape,eyeStyleId:c.eyeStyle,colorId:c.color,size:16}):(0,j.jsx)(`div`,{style:{width:16,height:16,flexShrink:0},"aria-hidden":!0}),(0,j.jsx)(D,{variant:`body-medium-default`,title:o,className:`max-w-[60%] shrink-0 truncate text-[var(--content-default)]`,children:o}),s&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`span`,{"aria-hidden":!0,className:`shrink-0 text-[var(--content-tertiary)] opacity-10`,children:`|`}),(0,j.jsx)(D,{variant:`body-medium-lighter`,title:s,className:`min-w-0 truncate text-[var(--content-tertiary)]`,children:s})]})]})})}function B({entry:e,onClose:t,onStop:a,onRequestJournal:o}){let{t:l}=i(`chat`),d=v(e.status),m=n(),y=e.label??e.runId,x=e.agentsSpawned||e.leaves.size,T=b(),k=[...e.leaves.values()].sort((e,t)=>e.seq-t.seq),[M,F]=(0,A.useState)(null),[I,R]=(0,A.useState)(e.runId);I!==e.runId&&(R(e.runId),F(null));let B=M==null?void 0:e.leaves.get(M),V=B?E(`${e.runId}:${B.seq}`):void 0,H=(0,A.useCallback)(()=>F(null),[]),U=B?B.label??`Subagent ${B.seq}`:``,W=B?U:y,G=d?`live`:`final`;return(0,A.useEffect)(()=>{o?.(e.runId)},[e.runId,G,o]),(0,j.jsx)(C,{headerAbove:B&&(0,j.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2 border-b border-[var(--border-hover)] px-5 py-3`,children:[(0,j.jsx)(`button`,{type:`button`,onClick:H,title:y,className:`min-w-0 shrink cursor-pointer truncate text-left text-[var(--content-default)] hover:underline`,children:(0,j.jsx)(D,{variant:`body-small-default`,as:`span`,children:y})}),(0,j.jsx)(s,{className:`h-2.5 w-2.5 shrink-0 text-[var(--content-tertiary)]`,"aria-hidden":!0}),(0,j.jsx)(D,{variant:`body-small-default`,as:`span`,title:U,className:`min-w-0 shrink truncate text-[var(--content-secondary)]`,children:U})]}),icon:(0,j.jsxs)(j.Fragment,{children:[B&&(0,j.jsx)(w,{variant:`outlined`,iconOnly:(0,j.jsx)(c,{}),onClick:H,"aria-label":l(`workflowDetailPanel.backToSubagentsAria`),tooltip:l(`workflowDetailPanel.back`),className:`shrink-0`}),B?T&&V?(0,j.jsx)(S,{components:T,bodyShapeId:V.bodyShape,eyeStyleId:V.eyeStyle,colorId:V.color,size:32}):(0,j.jsx)(`div`,{style:{width:32,height:32,flexShrink:0},"aria-hidden":!0}):(0,j.jsx)(p,{className:`h-5 w-5 shrink-0 text-[var(--content-secondary)]`,"aria-hidden":!0})]}),title:W,headerTrailing:B?(0,j.jsx)(L,{status:B.status}):(0,j.jsx)(P,{status:e.status}),headerActions:d&&a?(0,j.jsx)(O,{onStop:()=>a(e.runId),ariaLabel:l(`workflowDetailPanel.stopWorkflow`)}):void 0,closeLabel:l(`workflowDetailPanel.closeDetail`),onClose:t,children:(0,j.jsx)(r.div,{initial:{opacity:0},animate:{opacity:1},transition:m?{duration:0}:{duration:.18,ease:[.16,1,.3,1]},children:B?(0,j.jsx)(N,{leaf:B}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`mb-5 grid grid-cols-3 gap-3`,children:[(0,j.jsx)(_,{icon:(0,j.jsx)(u,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.inputTokens,format:e=>h(Math.round(e)),label:l(`workflowDetailPanel.input`)}),(0,j.jsx)(_,{icon:(0,j.jsx)(g,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:e.outputTokens,format:e=>h(Math.round(e)),label:l(`workflowDetailPanel.output`)}),(0,j.jsx)(_,{icon:(0,j.jsx)(f,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-secondary)`}}),target:x,format:e=>h(Math.round(e)),label:l(`workflowDetailPanel.agents`)})]}),(0,j.jsxs)(`div`,{children:[(0,j.jsx)(D,{variant:`body-medium-default`,as:`h3`,className:`mb-4 text-[var(--content-emphasised)]`,children:l(`workflowDetailPanel.subagents`)}),k.length===0?(0,j.jsx)(D,{variant:`body-small-default`,className:`py-4 text-center text-[var(--content-tertiary)]`,children:l(`workflowDetailPanel.noSubagentsYet`)}):(0,j.jsx)(`div`,{className:`flex flex-col gap-1`,children:k.map(t=>(0,j.jsx)(z,{runId:e.runId,leaf:t,components:T,onSelect:()=>F(t.seq)},t.seq))})]})]})},B?String(B.seq):`list`)})}export{B as WorkflowDetailPanel};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={heading:`檔案`,newFile:`新增檔案`,newFolder:`新增資料夾`,delete:`刪除`,rename:`重新命名`,renaming:`正在重新命名…`,create:`建立`,creating:`正在建立…`,creatingHeading:`建立新項目`,createTriggerAria:`建立新檔案或資料夾`,createTriggerTitle:`新檔案或資料夾`,nameLabel:`名稱`,nameError:`請輸入不含斜線的單一檔案或資料夾名稱。`,cancel:`取消`,sortByNameAria:`依名稱排序`,sortBySizeAria:`依大小排序`,sortedBySizeTitle:`已依大小排序,切換為依名稱排序`,sortedByNameTitle:`已依名稱排序,切換為依大小排序`,hideHiddenAria:`隱藏隱藏檔案`,showHiddenAria:`顯示隱藏檔案`,searchPlaceholder:`搜尋檔案`,clearSearchAria:`清除搜尋`,noFilesFound:`找不到檔案`,deleteFolderTitle:`刪除資料夾`,deleteFileTitle:`刪除檔案`,deleteFileMessage:`您確定要刪除 <name>{name}</name> 嗎?此操作無法復原。`,deleteFolderMessage:`您確定要刪除 <name>{name}</name> 及其所有內容嗎?此操作無法復原。`,deleting:`正在刪除…`},t={drawerTitle:`檔案`},n={download:`下載`,downloading:`正在下載…`,downloadFailed:`下載失敗。請再試一次。`,preview:`預覽`,source:`來源`,modifiedLabel:`修改時間:`,selectAFile:`選取檔案以檢視`,browseFiles:`瀏覽檔案`,fileNotFound:`找不到檔案`,saveFailed:`儲存失敗`,downloadAria:`下載 {name}`},r={workspaceTree:e,workspaceBrowser:t,workspaceFileViewer:n};export{r as default,t as workspaceBrowser,n as workspaceFileViewer,e as workspaceTree};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={heading:`文件`,newFile:`新建文件`,newFolder:`新建文件夹`,delete:`删除`,rename:`重命名`,renaming:`正在重命名…`,create:`创建`,creating:`正在创建…`,creatingHeading:`新建`,createTriggerAria:`创建新文件或文件夹`,createTriggerTitle:`新建文件或文件夹`,nameLabel:`名称`,nameError:`请输入不含斜杠的单个文件或文件夹名称。`,cancel:`取消`,sortByNameAria:`按名称排序`,sortBySizeAria:`按大小排序`,sortedBySizeTitle:`已按大小排序,切换为按名称排序`,sortedByNameTitle:`已按名称排序,切换为按大小排序`,hideHiddenAria:`隐藏隐藏文件`,showHiddenAria:`显示隐藏文件`,searchPlaceholder:`搜索文件`,clearSearchAria:`清除搜索`,noFilesFound:`未找到文件`,deleteFolderTitle:`删除文件夹`,deleteFileTitle:`删除文件`,deleteFileMessage:`确定要删除 <name>{name}</name> 吗?此操作无法撤消。`,deleteFolderMessage:`确定要删除 <name>{name}</name> 及其所有内容吗?此操作无法撤消。`,deleting:`正在删除…`},t={drawerTitle:`文件`},n={download:`下载`,downloading:`正在下载…`,downloadFailed:`下载失败。请重试。`,preview:`预览`,source:`源文件`,modifiedLabel:`修改时间:`,selectAFile:`选择一个文件以查看`,browseFiles:`浏览文件`,fileNotFound:`文件未找到`,saveFailed:`保存失败`,downloadAria:`下载 {name}`},r={workspaceTree:e,workspaceBrowser:t,workspaceFileViewer:n};export{r as default,t as workspaceBrowser,n as workspaceFileViewer,e as workspaceTree};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{Jn as t,N as n,Xn as r,Zn as i,er as a,j as o}from"./vendor-kNpRDQWe.js";import{b as s,g as c,t as l}from"./react-DPM_L_aA.js";import{An as u,Gn as d,In as f,J as p,Kn as m,Lr as h,On as g,Pn as _,Zn as v,_t as y,gn as b,i as x,p as S,st as C,tn as w,x as T,xi as E,zn as D,zr as O}from"./icons-CSdHOix6.js";import{t as k}from"./folder-open-8sWiN1cw.js";import{$h as A,Jh as j,Jt as M,Kt as N,Kv as P,Pn as F,Qh as I,Xh as L,Xv as R,Y as z,Yh as B,Yt as V,Yv as H,Zh as ee,by as U,di as te,dy as ne,ey as re,ny as W,qh as ie,qt as ae,ry as G}from"./index-D_aS89pX.js";import{n as K,r as oe,t as se}from"./use-side-list-room-C7h2iBrD.js";import{t as q}from"./format-file-size-BCpFMv3k.js";import{i as J,n as ce,r as Y,t as X}from"./file-editor-DXDNFMLF.js";var le=E(`arrow-down-a-z`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M20 8h-5`,key:`1vsyxs`}],[`path`,{d:`M15 10V6.5a2.5 2.5 0 0 1 5 0V10`,key:`ag13bf`}],[`path`,{d:`M15 14h5l-5 6h5`,key:`ur5jdg`}]]),ue=E(`arrow-down-wide-narrow`,[[`path`,{d:`m3 16 4 4 4-4`,key:`1co6wj`}],[`path`,{d:`M7 20V4`,key:`1yoxec`}],[`path`,{d:`M11 4h10`,key:`1w87gc`}],[`path`,{d:`M11 8h7`,key:`djye34`}],[`path`,{d:`M11 12h4`,key:`q8tih4`}]]),Z=e(s(),1);function de(e){if(!e)return``;let t=e.indexOf(`;`);return(t===-1?e:e.slice(0,t)).trim()}function fe(e,t){return de(t)===`application/json`?!0:(e??``).toLowerCase().endsWith(`.json`)}function pe(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}function me(e){return e.split(`/`).some(e=>e.startsWith(`.`))}var Q=l();function he(e){let{assistantId:t,path:n,name:r,showHidden:i}=e,[a,o]=(0,Z.useState)(!1),[s,c]=(0,Z.useState)(!1);return{isDownloading:a,error:s,download:(0,Z.useCallback)(async()=>{c(!1),o(!0);try{await F({assistantId:t,path:n,filename:r,showHidden:i})}catch{c(!0)}finally{o(!1)}},[t,n,r,i])}}function ge({assistantId:e,path:t,name:n,showHidden:r}){let{t:i}=o(`workspace`),{isDownloading:a,error:s,download:c}=he({assistantId:e,path:t,name:n,showHidden:r});return(0,Q.jsx)(U,{variant:`ghost`,size:`regular`,iconOnly:a?(0,Q.jsx)(w,{className:`animate-spin`,"aria-hidden":!0}):(0,Q.jsx)(v,{"aria-hidden":!0}),onClick:()=>void c(),disabled:a,"aria-label":i(`workspaceFileViewer.downloadAria`,{name:n}),tooltip:i(s?`workspaceFileViewer.downloadFailed`:`workspaceFileViewer.download`)})}function _e(e){return r({queryFn:async()=>{let{data:t,error:n}=await B({path:e.path,query:{path:e.query.path,...e.query.showHidden?{showHidden:`true`}:{}}});if(n)throw n;return t},queryKey:[`assistantsWorkspaceFileRetrieve`,e]})}function ve({mimeType:e}){let t=e.indexOf(`;`),n=(t===-1?e:e.slice(0,t)).trim(),r=f;return n.startsWith(`image/`)?r=b:n.startsWith(`video/`)?r=S:!n.startsWith(`text/`)&&n!==`application/json`&&n!==`application/octet-stream`&&(r=_),(0,Q.jsx)(`span`,{className:`flex h-5 w-5 shrink-0 items-center justify-center rounded`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 10%, transparent)`},children:(0,Q.jsx)(r,{className:`h-3.5 w-3.5`,style:{color:`var(--content-default)`}})})}function ye({viewMode:e,onChange:t}){let{t:n}=o(`workspace`);return(0,Q.jsx)(`div`,{className:`inline-flex rounded-md p-0.5`,style:{backgroundColor:`color-mix(in oklab, var(--content-default) 6%, transparent)`},children:[`preview`,`source`].map(r=>{let i=e===r;return(0,Q.jsx)(U,{variant:`ghost`,onClick:()=>t(r),className:`h-auto rounded border-0 px-2.5 py-1 text-body-small-default hover:bg-transparent`,style:{backgroundColor:i?`var(--surface-lift)`:`transparent`,color:i?`var(--content-default)`:`var(--content-tertiary)`,boxShadow:i?`0 1px 2px rgba(0,0,0,0.15)`:void 0},children:n(r===`preview`?`workspaceFileViewer.preview`:`workspaceFileViewer.source`)},r)})})}function $({name:e,mimeType:t,size:n,rightContent:r}){return(0,Q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-b px-3 py-2.5`,style:{borderColor:`var(--border-element)`},children:[(0,Q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,Q.jsx)(ve,{mimeType:t}),(0,Q.jsx)(`span`,{className:`truncate text-body-medium-default`,style:{color:`var(--content-default)`},children:e}),n!=null&&(0,Q.jsx)(`span`,{className:`shrink-0 text-body-small-default`,style:{color:`var(--content-tertiary)`},children:q(n)})]}),r]})}function be({assistantId:e,path:t,mimeType:n,showHidden:r}){let{data:a,isLoading:o}=i({queryFn:async()=>{let n=await j({path:{assistant_id:e},query:{path:t,...r?{showHidden:`true`}:{}},parseAs:`blob`});if(n.error)throw n.error;return n.data},queryKey:[`assistantsWorkspaceFileContentRetrieve`,{assistantId:e,path:t,showHidden:r}],enabled:!!t}),[s,c]=(0,Z.useState)(null);return(0,Z.useEffect)(()=>{if(!a)return;let e=URL.createObjectURL(a);return c(e),()=>{URL.revokeObjectURL(e),c(null)}},[a]),o?(0,Q.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,Q.jsx)(w,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})}):s?n.startsWith(`image/`)?(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Q.jsx)(`img`,{src:s,alt:t.split(`/`).pop()??`image`,className:`max-h-[70vh] max-w-full rounded object-contain`})}):n.startsWith(`video/`)?(0,Q.jsx)(`div`,{className:`flex items-center justify-center p-4`,children:(0,Q.jsx)(`video`,{src:s,controls:!0,className:`max-h-[70vh] max-w-full rounded`})}):null:null}function xe({assistantId:e,path:t,name:n,mimeType:r,size:i,modifiedAt:a,showHidden:s}){let{t:c}=o(`workspace`),{isDownloading:l,error:u,download:d}=he({assistantId:e,path:t,name:n,showHidden:s});return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:n,mimeType:r,size:i}),(0,Q.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-8`,children:(0,Q.jsxs)(`div`,{className:`w-full max-w-sm rounded-lg border p-6 text-center`,style:{borderColor:`var(--border-base)`,backgroundColor:`var(--surface-lift)`},children:[(0,Q.jsx)(_,{className:`mx-auto h-10 w-10`,style:{color:`var(--content-tertiary)`}}),(0,Q.jsx)(`p`,{className:`mt-3 text-body-medium-default`,style:{color:`var(--content-default)`},children:n}),(0,Q.jsxs)(`div`,{className:`mt-2 space-y-1`,children:[(0,Q.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:r}),(0,Q.jsx)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:q(i,`Unknown size`)}),a&&(0,Q.jsxs)(`p`,{className:`text-body-small-default`,style:{color:`var(--content-secondary, var(--content-tertiary))`},children:[c(`workspaceFileViewer.modifiedLabel`),` `,new Date(a).toLocaleString()]})]}),(0,Q.jsx)(U,{variant:`outlined`,size:`compact`,leftIcon:l?(0,Q.jsx)(w,{className:`animate-spin`,"aria-hidden":!0}):(0,Q.jsx)(v,{"aria-hidden":!0}),onClick:d,disabled:l,"aria-label":c(`workspaceFileViewer.downloadAria`,{name:n}),className:`mt-4`,children:c(l?`workspaceFileViewer.downloading`:`workspaceFileViewer.download`)}),u&&(0,Q.jsx)(`p`,{className:`mt-2 text-body-small-default`,style:{color:`var(--system-error)`},children:c(`workspaceFileViewer.downloadFailed`)})]})})]})}function Se({assistantId:e,selectedPath:n,showHidden:r,viewMode:s,onChangeViewMode:c,onBrowse:l,pathRename:u,pathDelete:d}){let{t:f}=o(`workspace`),p=a(),{data:m,isLoading:h}=i({..._e({path:{assistant_id:e},query:{path:n??``,showHidden:r}}),enabled:!!n}),[g,_]=(0,Z.useState)(null),[v,y]=(0,Z.useState)(null);(0,Z.useEffect)(()=>{if(!u)return;let{from:e,to:t}=u,n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;_(e=>e==null?e:n(e)),y(e=>e==null?e:{...e,path:n(e.path)})},[u]),(0,Z.useEffect)(()=>{if(!d)return;let{path:e}=d,t=t=>t===e||t.startsWith(`${e}/`);_(e=>e!=null&&t(e)?null:e),y(e=>e!=null&&t(e.path)?null:e)},[d]);let b=g!=null&&g===n,x=m?.content??``,S=v?.path===n?v.content:x,C=()=>{_(null),y(null)},T=t({mutationFn:async({path:t,content:n})=>{let{error:r,response:i}=await A({path:{assistant_id:e},body:{path:t,content:n,encoding:`utf8`},throwOnError:!1});if(!i?.ok||r)throw Error(`Failed to save file`)},onSuccess:(e,t)=>{_(e=>e===t.path?null:e),y(e=>e?.path===t.path?null:e),p.invalidateQueries({queryKey:[`assistantsWorkspaceFileRetrieve`]})}}),E=S!==x,D=(0,Z.useCallback)(()=>{n&&E&&!T.isPending&&T.mutate({path:n,content:S})},[n,E,T,S]);if(!n)return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center gap-3`,children:[(0,Q.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:f(`workspaceFileViewer.selectAFile`)}),l&&(0,Q.jsx)(U,{type:`button`,onClick:l,leftIcon:(0,Q.jsx)(k,{"aria-hidden":!0}),children:f(`workspaceFileViewer.browseFiles`)})]});if(h)return(0,Q.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Q.jsx)(w,{className:`h-6 w-6 animate-spin`,style:{color:`var(--content-tertiary)`}})});if(!m)return(0,Q.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,Q.jsx)(`p`,{className:`text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:f(`workspaceFileViewer.fileNotFound`)})});let O=m.mimeType??`application/octet-stream`,j=m.name??n.split(`/`).pop()??n,N=V(j,O),P=fe(j,O),F=m.content!=null&&!N&&!P,I=n?me(n):!0,L=b&&(0,Q.jsx)(ce,{isDirty:E,isSaving:T.isPending,error:T.isError?f(`workspaceFileViewer.saveFailed`):null,onSave:D,onDiscard:C});if(N&&m.content!=null){let e=b?S:m.content;return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:j,mimeType:O,rightContent:(0,Q.jsx)(ye,{viewMode:s,onChange:e=>{b&&C(),c(e)}})}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(X,{content:e,fileName:j,mimeType:O,showEdit:!I&&s===`source`,isEditing:b,onToggleEdit:()=>b?C():_(n)}),s===`preview`?(0,Q.jsx)(`div`,{className:`h-full overflow-auto px-6 py-4`,style:{color:`var(--content-default)`},children:(0,Q.jsx)(M,{content:e})}):b?(0,Q.jsx)(Y,{value:S,onChange:e=>y({path:n,content:e}),onSave:D}):(0,Q.jsx)(J,{content:m.content,readOnly:I,onStartEdit:()=>_(n)})]}),L]})}if(P&&m.content!=null){let e=b?S:m.content,t=pe(e);return(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:j,mimeType:O,rightContent:(0,Q.jsx)(ye,{viewMode:s,onChange:e=>{b&&C(),c(e)}})}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(X,{content:s===`preview`?t:e,downloadContent:e,fileName:j,mimeType:O,showEdit:!I&&s===`source`,isEditing:b,onToggleEdit:()=>b?C():_(n)}),s===`preview`?(0,Q.jsx)(J,{content:t,readOnly:!0,whiteSpace:`pre`}):b?(0,Q.jsx)(Y,{value:S,onChange:e=>y({path:n,content:e}),onSave:D}):(0,Q.jsx)(J,{content:m.content,readOnly:I,onStartEdit:()=>_(n)})]}),L]})}return F?(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:j,mimeType:O,size:m.size}),(0,Q.jsxs)(`div`,{className:`relative flex-1 overflow-hidden`,children:[(0,Q.jsx)(X,{content:b?S:m.content??``,fileName:j,mimeType:O,showEdit:!I,isEditing:b,onToggleEdit:()=>b?C():_(n)}),b?(0,Q.jsx)(Y,{value:S,onChange:e=>y({path:n,content:e}),onSave:D}):(0,Q.jsx)(J,{content:m.content??``,readOnly:I,onStartEdit:()=>_(n)})]}),L]}):O.startsWith(`image/`)||O.startsWith(`video/`)?(0,Q.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,Q.jsx)($,{name:j,mimeType:O,size:m.size,rightContent:(0,Q.jsx)(ge,{assistantId:e,path:n,name:j,showHidden:r})}),(0,Q.jsx)(`div`,{className:`flex-1 overflow-auto`,children:(0,Q.jsx)(be,{assistantId:e,path:n,mimeType:O,showHidden:r})})]}):(0,Q.jsx)(xe,{assistantId:e,path:n,name:j,mimeType:O,size:m.size,modifiedAt:m.modifiedAt,showHidden:r})}function Ce(e,t){if(t===`name`)return e;let n=e.slice();return n.sort((e,t)=>{let n=e.size??null,r=t.size??null;return n===null&&r===null?(e.name??``).localeCompare(t.name??``):n===null?1:r===null?-1:n===r?(e.name??``).localeCompare(t.name??``):r-n}),n}async function we(e,t,n,r){let i=n.toLowerCase(),a=r?.toLowerCase(),{data:o}=await I({path:{assistant_id:e},query:t?{path:t}:{}});if(o?.entries?.some(e=>{let t=(e.name??``).toLowerCase();return t===i&&t!==a}))throw Error(`"${n}" already exists here.`)}function Te({entry:e}){return e.type===`directory`?(0,Q.jsx)(g,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):e.mimeType?.startsWith(`image/`)?(0,Q.jsx)(b,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):e.mimeType?.startsWith(`video/`)?(0,Q.jsx)(S,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Q.jsx)(f,{className:`h-4 w-4 shrink-0`,style:{color:`var(--content-tertiary)`}})}function Ee({entry:e,assistantId:t,expandedPaths:n,selectedPath:r,showHidden:a,sortMode:s,searchLower:c,onToggleExpand:l,onSelectPath:d,onRequestDelete:f,onRequestRename:p,onRequestCreate:m,depth:g}){let{t:_}=o(`workspace`),v=e.path??``,b=e.name??``,x=e.type===`directory`,S=n.has(v),C=r===v,w=b.startsWith(`.`),E=!me(v),k=x&&(S||c.length>0),{data:A}=i({...ae({assistantId:t,path:v,showHidden:a,includeDirSizes:s===`size`}),enabled:x&&k}),j=(0,Z.useMemo)(()=>Ce(A?.entries??[],s),[A?.entries,s]),M=c===``||b.toLowerCase().includes(c);if(c!==``&&!x&&!M)return null;let N=(0,Q.jsxs)(`button`,{onClick:()=>{x?l(v):d(v)},className:`flex w-full items-center gap-1.5 px-2 py-1 text-left text-body-medium-lighter transition-colors hover:bg-[var(--surface-hover)]`,style:{paddingLeft:`${g*14+8}px`,paddingRight:`8px`,color:C?`var(--content-default)`:w?`var(--content-tertiary)`:`var(--content-default)`,backgroundColor:C?`color-mix(in oklab, var(--primary-base) 12%, transparent)`:void 0,opacity:w&&!C?.7:1},children:[x?k?(0,Q.jsx)(O,{className:`h-3 w-3 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Q.jsx)(h,{className:`h-3 w-3 shrink-0`,style:{color:`var(--content-tertiary)`}}):(0,Q.jsx)(`span`,{className:`h-3 w-3 shrink-0`}),(0,Q.jsx)(Te,{entry:e}),(0,Q.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:b}),e.size!=null&&(0,Q.jsx)(`span`,{className:`shrink-0 text-label-medium-default tabular-nums`,style:{color:`var(--content-tertiary)`},children:q(e.size)})]});return(0,Q.jsxs)(`div`,{children:[E?(0,Q.jsxs)(P.Root,{children:[(0,Q.jsx)(P.Trigger,{children:N}),(0,Q.jsxs)(P.Content,{children:[x&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(P.Item,{leftIcon:(0,Q.jsx)(D,{className:`h-3.5 w-3.5`}),onSelect:()=>m({kind:`file`,parentPath:v}),children:_(`workspaceTree.newFile`)}),(0,Q.jsx)(P.Item,{leftIcon:(0,Q.jsx)(u,{className:`h-3.5 w-3.5`}),onSelect:()=>m({kind:`folder`,parentPath:v}),children:_(`workspaceTree.newFolder`)}),(0,Q.jsx)(P.Separator,{})]}),(0,Q.jsx)(P.Item,{leftIcon:(0,Q.jsx)(T,{className:`h-3.5 w-3.5`}),onSelect:()=>f({path:v,name:b,isDirectory:x}),children:_(`workspaceTree.delete`)}),(0,Q.jsx)(P.Item,{leftIcon:(0,Q.jsx)(y,{className:`h-3.5 w-3.5`}),onSelect:()=>p({path:v,name:b,isDirectory:x}),children:_(`workspaceTree.rename`)})]})]}):N,x&&k&&j.length>0&&(0,Q.jsx)(`div`,{children:j.map(e=>(0,Q.jsx)(Ee,{entry:e,assistantId:t,expandedPaths:n,selectedPath:r,showHidden:a,sortMode:s,searchLower:c,onToggleExpand:l,onSelectPath:d,onRequestDelete:f,onRequestRename:p,onRequestCreate:m,depth:g+1},e.path))})]})}function De({title:e,placeholder:t,confirmLabel:n,pendingLabel:r,initialName:i,onCancel:a,onConfirm:s,pending:c,error:l}){let{t:u}=o(`workspace`),d=(0,Z.useRef)(null),[f,p]=(0,Z.useState)(i??``),m=f.trim(),h=m.length>0&&(/[/\\]/.test(m)||m===`.`||m===`..`),g=m.length>0&&!h&&!c;return(0,Q.jsx)(G.Root,{open:!0,onOpenChange:e=>{!e&&!c&&a()},children:(0,Q.jsx)(G.Content,{size:`sm`,hideCloseButton:!0,"aria-describedby":void 0,onOpenAutoFocus:e=>{e.preventDefault();let t=d.current;t&&(t.focus(),requestAnimationFrame(()=>{t.setSelectionRange(0,t.value.length)}))},onEscapeKeyDown:e=>{e.preventDefault(),e.stopPropagation(),c||a()},children:(0,Q.jsxs)(`form`,{onSubmit:e=>{e.preventDefault(),g&&s(m)},children:[(0,Q.jsx)(G.Header,{children:(0,Q.jsx)(G.Title,{children:e})}),(0,Q.jsx)(G.Body,{children:(0,Q.jsx)(ne,{ref:d,label:u(`workspaceTree.nameLabel`),value:f,onChange:e=>p(e.target.value),placeholder:t,errorText:l??(h?u(`workspaceTree.nameError`):void 0),autoComplete:`off`,spellCheck:!1,fullWidth:!0})}),(0,Q.jsxs)(G.Footer,{children:[(0,Q.jsx)(U,{type:`button`,variant:`outlined`,onClick:a,disabled:c,children:u(`workspaceTree.cancel`)}),(0,Q.jsx)(U,{type:`submit`,variant:`primary`,disabled:!g,children:c?r:n})]})]})})})}function Oe({assistantId:e,expandedPaths:r,selectedPath:s,showHidden:c,sortMode:l,onToggleExpand:u,onExpandPath:f,onSelectPath:h,onToggleShowHidden:g,onChangeSortMode:_,onPathDeleted:v,onPathRenamed:y,search:b,onSearchChange:S}){let{t:C}=o(`workspace`),w=a(),T=b.trim().toLowerCase(),[E,D]=(0,Z.useState)(!1),[O,k]=(0,Z.useState)(null),[j,M]=(0,Z.useState)(null),P=(0,Z.useCallback)(()=>{k(null),M(null)},[]),{data:F,isLoading:I}=i(ae({assistantId:e,showHidden:c,includeDirSizes:l===`size`})),R=(0,Z.useMemo)(()=>Ce(F?.entries??[],l),[F?.entries,l]),z=(0,Z.useCallback)(()=>{for(let e of[N,`assistantsWorkspaceFileRetrieve`,`assistantsWorkspaceFileContentRetrieve`])w.invalidateQueries({queryKey:[e]})},[w]),B=t({mutationFn:async t=>{let n=t.parentPath?`${t.parentPath}/${t.name}`:t.name;await we(e,t.parentPath,t.name);let{error:r,response:i}=t.kind===`file`?await A({path:{assistant_id:e},body:{path:n,content:``,encoding:`utf8`},throwOnError:!1}):await L({path:{assistant_id:e},body:{path:n},throwOnError:!1});if(r||!i?.ok)throw Error(typeof r==`string`?r:`Failed to create — check the name and try again.`);return{...t,path:n}},onSuccess:e=>{P(),z(),e.parentPath&&f(e.parentPath),e.kind===`file`?h(e.path):f(e.path)},onError:e=>{M(e instanceof Error?e.message:`Failed to create.`)}}),V=t({mutationFn:async t=>{let n=t.oldPath.lastIndexOf(`/`),r=n===-1?``:t.oldPath.slice(0,n),i=t.oldPath.slice(n+1),a=r?`${r}/${t.newName}`:t.newName;await we(e,r,t.newName,i);let{error:o,response:s}=await ee({path:{assistant_id:e},body:{oldPath:t.oldPath,newPath:a},throwOnError:!1});if(o||!s?.ok)throw Error(typeof o==`string`?o:`Failed to rename — check the name and try again.`);return{oldPath:t.oldPath,newPath:a}},onSuccess:({oldPath:e,newPath:t})=>{P(),z(),y(e,t)},onError:e=>{M(e instanceof Error?e.message:`Failed to rename.`)}}),H=(0,Z.useCallback)(e=>{M(null),k({type:`create`,...e})},[]),te=(0,Z.useCallback)(e=>{M(null),k({type:`rename`,path:e.path,name:e.name})},[]),[W,G]=(0,Z.useState)(null),K=t({mutationFn:async t=>{let{error:n,response:r}=await ie({path:{assistant_id:e},body:{path:t.path},throwOnError:!1});if(n||!r?.ok)throw Error(typeof n==`string`?n:`Failed to delete — try again.`);return t},onSuccess:e=>{G(null),z(),v(e.path)}}),oe=(0,Z.useCallback)(e=>{K.reset(),G(e)},[K]);return(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(`div`,{className:`flex items-center justify-between border-b px-3 py-2.5`,style:{borderColor:`var(--border-element)`},children:[(0,Q.jsx)(`span`,{className:`text-body-medium-default`,style:{color:`var(--content-secondary)`},children:C(`workspaceTree.heading`)}),(0,Q.jsxs)(`div`,{className:`flex items-center gap-0.5`,children:[(0,Q.jsx)(U,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:l===`size`?(0,Q.jsx)(ue,{"aria-hidden":!0}):(0,Q.jsx)(le,{"aria-hidden":!0}),onClick:()=>_(l===`size`?`name`:`size`),"aria-label":C(l===`size`?`workspaceTree.sortByNameAria`:`workspaceTree.sortBySizeAria`),title:C(l===`size`?`workspaceTree.sortedBySizeTitle`:`workspaceTree.sortedByNameTitle`),tintColor:l===`size`?`var(--content-default)`:`var(--content-tertiary)`}),(0,Q.jsx)(U,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:c?(0,Q.jsx)(d,{"aria-hidden":!0}):(0,Q.jsx)(m,{"aria-hidden":!0}),onClick:g,"aria-label":C(c?`workspaceTree.hideHiddenAria`:`workspaceTree.showHiddenAria`),title:C(c?`workspaceTree.hideHiddenAria`:`workspaceTree.showHiddenAria`),tintColor:c?`var(--content-default)`:`var(--content-tertiary)`}),(0,Q.jsx)(ke,{open:E,onOpenChange:D,onSelectKind:e=>{D(!1),H({kind:e,parentPath:``})}})]})]}),(0,Q.jsx)(`div`,{className:`px-3 py-2`,children:(0,Q.jsxs)(`div`,{className:`relative`,children:[(0,Q.jsx)(ne,{type:`text`,value:b,onChange:e=>S(e.target.value),placeholder:C(`workspaceTree.searchPlaceholder`),leftIcon:(0,Q.jsx)(p,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),fullWidth:!0,spellCheck:!1,autoComplete:`off`}),b&&(0,Q.jsx)(U,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(x,{"aria-hidden":!0}),onClick:()=>S(``),"aria-label":C(`workspaceTree.clearSearchAria`),className:`absolute right-1.5 top-1/2 -translate-y-1/2`,tintColor:`var(--content-tertiary)`})]})}),(0,Q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto py-1`,children:I?(0,Q.jsx)(`div`,{className:`flex items-center justify-center py-8`,children:(0,Q.jsx)(`div`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent`,style:{color:`var(--content-tertiary)`}})}):R.length?R.map(t=>(0,Q.jsx)(Ee,{entry:t,assistantId:e,expandedPaths:r,selectedPath:s,showHidden:c,sortMode:l,searchLower:T,onToggleExpand:u,onSelectPath:h,onRequestDelete:oe,onRequestRename:te,onRequestCreate:H,depth:0},t.path)):(0,Q.jsx)(`p`,{className:`px-3 py-4 text-center text-body-medium-lighter`,style:{color:`var(--content-tertiary)`},children:C(`workspaceTree.noFilesFound`)})}),O?.type===`create`&&(0,Q.jsx)(De,{title:O.kind===`file`?C(`workspaceTree.newFile`):C(`workspaceTree.newFolder`),placeholder:O.kind===`file`?`filename.md`:`folder-name`,confirmLabel:C(`workspaceTree.create`),pendingLabel:C(`workspaceTree.creating`),onCancel:P,onConfirm:e=>{M(null),B.mutate({kind:O.kind,parentPath:O.parentPath,name:e})},pending:B.isPending,error:j},`create-${O.kind}-${O.parentPath}`),O?.type===`rename`&&(0,Q.jsx)(De,{title:C(`workspaceTree.rename`),placeholder:O.name,confirmLabel:C(`workspaceTree.rename`),pendingLabel:C(`workspaceTree.renaming`),initialName:O.name,onCancel:P,onConfirm:e=>{if(e===O.name){P();return}M(null),V.mutate({oldPath:O.path,newName:e})},pending:V.isPending,error:j},`rename-${O.path}`),(0,Q.jsx)(re,{open:W!==null,title:W?.isDirectory?C(`workspaceTree.deleteFolderTitle`):C(`workspaceTree.deleteFileTitle`),message:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(n,{i18nKey:W?.isDirectory?`workspaceTree.deleteFolderMessage`:`workspaceTree.deleteFileMessage`,ns:`workspace`,values:{name:W?.name??``},components:{name:(0,Q.jsx)(`span`,{style:{color:`var(--content-default)`}})}}),K.error&&(0,Q.jsx)(`span`,{className:`mt-2 block`,style:{color:`var(--system-negative-strong)`},children:K.error.message})]}),confirmLabel:K.isPending?C(`workspaceTree.deleting`):C(`workspaceTree.delete`),destructive:!0,isPending:K.isPending,onConfirm:()=>{W&&K.mutate(W)},onCancel:()=>G(null)})]})}function ke({open:e,onOpenChange:t,onSelectKind:n}){let{t:r}=o(`workspace`);return te()?(0,Q.jsxs)(W.Root,{open:e,onOpenChange:t,children:[(0,Q.jsx)(W.Trigger,{asChild:!0,children:(0,Q.jsx)(U,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(C,{"aria-hidden":!0}),"aria-label":r(`workspaceTree.createTriggerAria`),title:r(`workspaceTree.createTriggerTitle`),tintColor:`var(--content-tertiary)`})}),(0,Q.jsxs)(W.Content,{children:[(0,Q.jsx)(W.Header,{className:`sr-only`,children:(0,Q.jsx)(W.Title,{children:r(`workspaceTree.creatingHeading`)})}),(0,Q.jsxs)(W.Body,{className:`pt-0`,children:[(0,Q.jsx)(H,{icon:D,label:r(`workspaceTree.newFile`),onSelect:()=>n(`file`)}),(0,Q.jsx)(H,{icon:u,label:r(`workspaceTree.newFolder`),onSelect:()=>n(`folder`)})]})]})]}):(0,Q.jsxs)(R.Root,{open:e,onOpenChange:t,children:[(0,Q.jsx)(R.Trigger,{asChild:!0,children:(0,Q.jsx)(U,{type:`button`,variant:`ghost`,size:`compact`,iconOnly:(0,Q.jsx)(C,{"aria-hidden":!0}),"aria-label":r(`workspaceTree.createTriggerAria`),title:r(`workspaceTree.createTriggerTitle`),tintColor:`var(--content-tertiary)`})}),(0,Q.jsxs)(R.Content,{align:`end`,sideOffset:4,children:[(0,Q.jsx)(R.Item,{leftIcon:(0,Q.jsx)(D,{className:`h-3.5 w-3.5`}),onSelect:()=>n(`file`),children:r(`workspaceTree.newFile`)}),(0,Q.jsx)(R.Item,{leftIcon:(0,Q.jsx)(u,{className:`h-3.5 w-3.5`}),onSelect:()=>n(`folder`),children:r(`workspaceTree.newFolder`)})]})]})}function Ae(e){let t=e.split(`/`),n=new Set;for(let e=1;e<t.length;e++)n.add(t.slice(0,e).join(`/`));return n}function je({assistantId:e}){let{t}=o(`workspace`),[n,r]=c(),[i,a]=(0,Z.useState)(()=>{let e=n.get(`file`);return e?Ae(e):new Set}),[s,l]=(0,Z.useState)(()=>n.get(`file`)),[u,d]=(0,Z.useState)(!1),[f,p]=(0,Z.useState)(()=>n.get(`sort`)===`size`?`size`:`name`),[m,h]=(0,Z.useState)(`preview`);(0,Z.useEffect)(()=>{let e=n.get(`file`);e&&(l(e),a(t=>{let n=new Set(t);for(let t of Ae(e))n.add(t);return n.size===t.size?t:n}),r(e=>{let t=new URLSearchParams(e);return t.delete(`file`),t},{replace:!0}))},[n,r]);let g=(0,Z.useCallback)(e=>{a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),_=(0,Z.useCallback)(e=>{a(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})},[]),{paneRef:v,hasRoomForList:y,drawerOpen:b,openDrawer:x,closeDrawer:S}=se(),[C,w]=(0,Z.useState)(``),T=(0,Z.useCallback)(e=>{l(e),S()},[S]),[E,D]=(0,Z.useState)(null),O=(0,Z.useCallback)(e=>{let t=t=>t===e||t.startsWith(`${e}/`);l(e=>e!==null&&t(e)?null:e),a(e=>{let n=new Set([...e].filter(e=>!t(e)));return n.size===e.size?e:n}),D({path:e})},[]),[k,A]=(0,Z.useState)(null),j={assistantId:e,expandedPaths:i,selectedPath:s,showHidden:u,sortMode:f,onToggleExpand:g,onExpandPath:_,onSelectPath:T,onToggleShowHidden:()=>d(e=>!e),onChangeSortMode:p,onPathDeleted:O,onPathRenamed:(0,Z.useCallback)((e,t)=>{let n=n=>n===e?t:n.startsWith(`${e}/`)?t+n.slice(e.length):n;l(e=>e===null?e:n(e)),a(e=>{let t=!1,r=new Set;for(let i of e){let e=n(i);e!==i&&(t=!0),r.add(e)}return t?r:e}),A({from:e,to:t})},[]),search:C,onSearchChange:w};return(0,Q.jsxs)(`div`,{ref:v,className:`flex h-full min-h-0 flex-col gap-4`,children:[y?null:(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsx)(`div`,{className:`flex items-center`,children:(0,Q.jsx)(oe,{onClick:x})}),(0,Q.jsx)(K,{open:b,onClose:S,title:t(`workspaceBrowser.drawerTitle`),children:(0,Q.jsx)(Oe,{...j})})]}),(0,Q.jsxs)(`div`,{className:`grid min-h-0 flex-1 gap-4 ${y?`grid-cols-[320px_1fr]`:`grid-cols-1`}`,children:[y?(0,Q.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border`,style:{backgroundColor:`var(--surface-overlay)`,borderColor:`var(--border-base)`},children:(0,Q.jsx)(Oe,{...j})}):null,(0,Q.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-col overflow-hidden rounded-xl border`,style:{backgroundColor:`var(--surface-overlay)`,borderColor:`var(--border-base)`},children:(0,Q.jsx)(Se,{assistantId:e,selectedPath:s,showHidden:u,viewMode:m,onChangeViewMode:h,onBrowse:y?void 0:x,pathRename:k,pathDelete:E})})]})]})}function Me(){return(0,Q.jsx)(je,{assistantId:z()})}export{Me as WorkspacePage};
|
package/dist/index.html
CHANGED
|
@@ -134,10 +134,21 @@
|
|
|
134
134
|
// omitting it here keeps the splash and the app saying the same thing.
|
|
135
135
|
// `src/shell-metadata.test.ts` fails if the two drift.
|
|
136
136
|
(function () {
|
|
137
|
-
var SUPPORTED_LOCALES = ["en", "es", "ru"];
|
|
138
|
-
var LABELS = { es: "Cargando" }
|
|
137
|
+
var SUPPORTED_LOCALES = ["en", "es", "ru", "zh", "zh-TW"];
|
|
138
|
+
var LABELS = { es: "Cargando", zh: "正在加载", "zh-TW": "正在載入" };: add Traditional Chinese (zh-TW) localization catalog)
|
|
139
139
|
|
|
140
140
|
function resolveLocale() {
|
|
141
|
+
var findCanonical = function (candidate) {
|
|
142
|
+
if (!candidate) return null;
|
|
143
|
+
var candLower = String(candidate).toLowerCase();
|
|
144
|
+
for (var j = 0; j < SUPPORTED_LOCALES.length; j++) {
|
|
145
|
+
if (SUPPORTED_LOCALES[j].toLowerCase() === candLower) {
|
|
146
|
+
return SUPPORTED_LOCALES[j];
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
};
|
|
151
|
+
|
|
141
152
|
var stored = null;
|
|
142
153
|
try {
|
|
143
154
|
stored = window.localStorage.getItem("device:locale");
|
|
@@ -148,8 +159,11 @@
|
|
|
148
159
|
// over: without it a Spanish host keeps the English label while the app
|
|
149
160
|
// itself comes up in Spanish.
|
|
150
161
|
}
|
|
151
|
-
if (stored
|
|
152
|
-
|
|
162
|
+
if (stored) {
|
|
163
|
+
var canonStored = findCanonical(stored);
|
|
164
|
+
if (canonStored) {
|
|
165
|
+
return canonStored;
|
|
166
|
+
}
|
|
153
167
|
}
|
|
154
168
|
var preferred = [];
|
|
155
169
|
var nav = window.navigator;
|
|
@@ -159,16 +173,30 @@
|
|
|
159
173
|
preferred = [nav.language];
|
|
160
174
|
}
|
|
161
175
|
for (var i = 0; i < preferred.length; i++) {
|
|
162
|
-
var
|
|
163
|
-
if (
|
|
176
|
+
var raw = String(preferred[i]).trim();
|
|
177
|
+
if (raw === "") {
|
|
164
178
|
continue;
|
|
165
179
|
}
|
|
166
|
-
|
|
167
|
-
|
|
180
|
+
var exact = findCanonical(raw);
|
|
181
|
+
if (exact) {
|
|
182
|
+
return exact;
|
|
183
|
+
}
|
|
184
|
+
var lower = raw.toLowerCase();
|
|
185
|
+
if (
|
|
186
|
+
lower === "zh-hant" ||
|
|
187
|
+
lower.indexOf("zh-hant-") === 0 ||
|
|
188
|
+
lower === "zh-hk" ||
|
|
189
|
+
lower === "zh-mo"
|
|
190
|
+
) {
|
|
191
|
+
var tw = findCanonical("zh-TW");
|
|
192
|
+
if (tw) {
|
|
193
|
+
return tw;
|
|
194
|
+
}
|
|
168
195
|
}
|
|
169
|
-
var base =
|
|
170
|
-
|
|
171
|
-
|
|
196
|
+
var base = lower.split("-")[0];
|
|
197
|
+
var baseExact = findCanonical(base);
|
|
198
|
+
if (baseExact) {
|
|
199
|
+
return baseExact;
|
|
172
200
|
}
|
|
173
201
|
}
|
|
174
202
|
return "en";
|
|
@@ -276,13 +304,12 @@
|
|
|
276
304
|
}
|
|
277
305
|
}
|
|
278
306
|
</style>
|
|
279
|
-
<script type="module" crossorigin src="/assistant/assets/index-
|
|
307
|
+
<script type="module" crossorigin src="/assistant/assets/index-D_aS89pX.js"></script>
|
|
280
308
|
<link rel="modulepreload" crossorigin href="/assistant/assets/rolldown-runtime-BM3Ffeng.js">
|
|
281
309
|
<link rel="modulepreload" crossorigin href="/assistant/assets/react-DPM_L_aA.js">
|
|
282
|
-
<link rel="modulepreload" crossorigin href="/assistant/assets/vendor-
|
|
310
|
+
<link rel="modulepreload" crossorigin href="/assistant/assets/vendor-kNpRDQWe.js">
|
|
283
311
|
<link rel="modulepreload" crossorigin href="/assistant/assets/icons-CSdHOix6.js">
|
|
284
|
-
<link rel="stylesheet" crossorigin href="/assistant/assets/
|
|
285
|
-
<link rel="stylesheet" crossorigin href="/assistant/assets/index-2ECSWhtU.css">
|
|
312
|
+
<link rel="stylesheet" crossorigin href="/assistant/assets/index-DJRB6vZU.css">
|
|
286
313
|
<script>window.__VELLUM_CONFIG__={"webUrl":"https://www.vellum.ai","platformUrl":"https://platform.vellum.ai"}</script></head>
|
|
287
314
|
<body>
|
|
288
315
|
<!--
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{o as e}from"./rolldown-runtime-BM3Ffeng.js";import{O as t}from"./vendor-WUN87CSE.js";import{b as n,t as r}from"./react-DPM_L_aA.js";import{Rr as i}from"./icons-CSdHOix6.js";import{At as a,Ct as o,Cy as s,Dn as c,Dt as l,Fn as u,Mt as d,On as f,Ot as p,P as m,St as h,Tn as g,Tt as _,Ws as v,bt as y,cn as b,fr as x,ir as S,jn as C,kn as w,kt as T,vt as E,wt as D,wy as O,xt as k,yt as A}from"./index-7XDiAJ-A.js";import{t as j}from"./use-transcript-message-by-id-Dqm1PMu3.js";import{ToolDetailBody as M,t as N}from"./tool-detail-panel-BgCSb_m5.js";var P=e(n(),1);function F(e,t,n){let r=A(t,n.workflow),i=e=>{let t=k(e,n.workflow.byToolUseId);if(t!==null&&r.has(t))return!0;let i=E(e,n.acpByToolUseId);if(i!==null&&n.acpById[i]!==void 0)return!0;let a=y(e);return a!==void 0&&n.backgroundTaskById[a]!==void 0},a=t.filter(e=>!i(e));if(a.length===t.length)return{items:e,toolCalls:t};let o=new Set(a.map(e=>e.id));return{items:e.filter(e=>e.kind!==`toolCall`||o.has(e.toolCall.id)),toolCalls:a}}function I(e,t){let n=j(e),r=v.use.byId(),i=v.use.byToolUseId(),a=v.use.notFoundRunIds(),o=v.use.hydrationFailedRunIds(),s=S.use.byId(),c=S.use.byToolUseId(),l=x.use.byId();return(0,P.useMemo)(()=>{if(!n||t==null)return null;let e=w(n.contentBlocks??[],{splitInlineThinking:n.role!==`user`})[t];if(!e||e.type!==`activity`)return null;let{cardItems:u,toolCalls:d}=f(e.items);return F(u,d,{workflow:{byId:r,byToolUseId:i,notFoundRunIds:a,hydrationFailedRunIds:o},acpById:s,acpByToolUseId:c,backgroundTaskById:l})},[n,t,r,i,a,o,s,c,l])}var L=r(),R=60;function z({payload:e,onClose:n,assistantId:r}){let{t:a}=t(`chat`),[c,l]=(0,P.useState)(null),u=I(e.messageId,e.groupIndex),f=u?.items??e.items,p=u?.toolCalls??e.toolCalls,v=_(f),y=o(v.steps),b=D(v.state,v.steps),x=b===`loading`,S=h(b,v.totalDurationLabel??``,y.failed),C=x&&v.currentStepTitle||S,w=new Map(p.map(e=>[e.id,e])),T=c?c.kind===`thinking`?`Thinking`:c.activity||c.title:``;return(0,L.jsx)(m,{icon:c?(0,L.jsx)(O,{variant:`outlined`,iconOnly:(0,L.jsx)(i,{}),"aria-label":a(`activityStepsPanel.backAria`),tooltip:a(`activityStepsPanel.backTooltip`),onClick:()=>l(null),className:`shrink-0`}):void 0,titleNode:c?(0,L.jsx)(s,{variant:`title-medium`,className:`min-w-0 shrink truncate py-0.5 leading-snug text-[var(--content-default)]`,children:T}):(0,L.jsxs)(`span`,{className:`flex min-w-0 items-center gap-1.5 py-0.5`,children:[(0,L.jsx)(s,{variant:`title-medium`,className:`min-w-0 shrink truncate leading-snug text-[var(--content-default)]`,children:x?(0,L.jsx)(g,{children:C}):C}),v.stepCount?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":!0,className:`size-[3px] shrink-0 rounded-full bg-[var(--content-tertiary)]`}),(0,L.jsx)(s,{variant:`title-medium`,className:`shrink-0 whitespace-nowrap leading-snug text-[var(--content-secondary)]`,children:v.stepCount})]}):null]}),closeLabel:a(`activityStepsPanel.closeSteps`),onClose:n,children:c?(0,L.jsx)(V,{detail:c,assistantId:r}):(0,L.jsx)(d,{steps:v.steps,timeline:!0,renderStep:t=>(0,L.jsx)(B,{step:t,activeDetail:c,onOpenDetail:l,lookupToolCall:e=>w.get(e),messageId:e.messageId,groupIndex:e.groupIndex})})})}function B({step:e,activeDetail:n,onOpenDetail:r,lookupToolCall:i,messageId:o,groupIndex:s}){let{t:d}=t(`chat`);if(e.kind===`thinking`){let t=o!=null&&e.thinkingItemIndex!=null?{messageId:o,thinkingGroupIndex:s,thinkingItemIndex:e.thinkingItemIndex}:{};return(0,L.jsx)(T,{iconName:`brain`,label:u(C(e.text),R),ariaLabel:d(`activityStepsPanel.viewThinkingAria`),active:!1,onClick:()=>r({kind:`thinking`,toolCallId:``,toolName:``,title:d(`activityStepsPanel.thinkingTitle`),activity:``,input:{},status:`completed`,thinkingText:e.text,...t})})}if(e.kind===`web_search`)return(0,L.jsx)(p,{step:e});if(e.kind===`web_search_error`)return(0,L.jsx)(l,{step:e});if(e.kind!==`tool`)return(0,L.jsx)(a,{step:e});let f=i(e.toolCallId);return(0,L.jsx)(T,{iconName:e.iconName,label:e.activity||e.info||e.title,active:n?.toolCallId===e.toolCallId,onClick:()=>{f&&r(c(f))}})}function V({detail:e,assistantId:t}){let n=N(e.kind===`thinking`?e.messageId:void 0,e.thinkingGroupIndex,e.thinkingItemIndex);return(0,L.jsx)(`div`,{className:`flex flex-col gap-4`,children:e.kind===`thinking`?(0,L.jsx)(b,{content:n??e.thinkingText??``,hardLineBreaks:!0,assistantId:t}):(0,L.jsx)(M,{detail:e,assistantId:t})})}export{z as ActivityStepsPanel};
|