@xopcai/xopc 0.0.482 → 0.0.484
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/browser-ext/dist/assets/{auth-B658Oa_i.js → auth-8EjgHa-n.js} +48 -17
- package/dist/browser-ext/dist/background.js +7 -3
- package/dist/browser-ext/dist/sidepanel.html +1 -1
- package/dist/browser-ext/dist/sidepanel.js +1 -1
- package/dist/browser-ext/manifest.json +1 -1
- package/dist/extensions/telegram/xopc.extension.json +1 -1
- package/dist/gateway/server/chunks.bin +1628 -1598
- package/dist/gateway/server/chunks.json +1 -1
- package/dist/gateway/static/root/assets/{activity-store-BCPCuT-6.js → activity-store-hSe5Nbgk.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-dicebear-Di9jxcH9.js → agent-avatar-dicebear-BY2wRiwY.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-avatar-display-KbzBlJ8W.js → agent-avatar-display-D_UDgOr9.js} +2 -2
- package/dist/gateway/static/root/assets/{agent-defaults-settings-panel-CYZzdU6C.js → agent-defaults-settings-panel-BrcyLG9M.js} +1 -1
- package/dist/gateway/static/root/assets/{agent-plugin-dialog-Bhkawcil.js → agent-plugin-dialog-CSJC1yud.js} +1 -1
- package/dist/gateway/static/root/assets/{agents-B2RXJeIo.js → agents-DX-t3X7K.js} +3 -3
- package/dist/gateway/static/root/assets/{agents-admin-api-DpfkHNbc.js → agents-admin-api-DSr-PWuW.js} +1 -1
- package/dist/gateway/static/root/assets/{api-BtngCZrB.js → api-B3T06TLl.js} +1 -1
- package/dist/gateway/static/root/assets/{api-CnOSHyKU.js → api-CGs641OT.js} +1 -1
- package/dist/gateway/static/root/assets/{app-management-settings-panel-Dyc3I-ng.js → app-management-settings-panel-D6ZoYKaA.js} +1 -1
- package/dist/gateway/static/root/assets/{appearance-settings-CmdhL-0n.js → appearance-settings-BRb6kZT8.js} +1 -1
- package/dist/gateway/static/root/assets/{apps-page-BFqC9Knk.js → apps-page-CH9wENBj.js} +1 -1
- package/dist/gateway/static/root/assets/{archive-plugin-DFP0MajV.js → archive-plugin-CQ5UXgZk.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-api-Cc5X3Q1t.js → automation-api-D-gn6x5E.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-result-state-B7fHzLLf.js → automation-result-state-B7hq0XOL.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-run-list-DPTby29p.js → automation-run-list-CM59-qm5.js} +1 -1
- package/dist/gateway/static/root/assets/{automation-task-card-CjzArAJi.js → automation-task-card-C453Q-Wa.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-page-BKbElVfF.js → automations-page-B1Ri4sh8.js} +1 -1
- package/dist/gateway/static/root/assets/{automations-workspace-_18qOoLm.js → automations-workspace-CNSza6ir.js} +2 -2
- package/dist/gateway/static/root/assets/bell-BlYch9Vg.js +1 -0
- package/dist/gateway/static/root/assets/{binary-plugins-DnE-iqaV.js → binary-plugins-D_zw0TgG.js} +1 -1
- package/dist/gateway/static/root/assets/{block-editor-CYobheuw.js → block-editor-Cesz2DqP.js} +1 -1
- package/dist/gateway/static/root/assets/browser-notification-delivery-DjK3F0oR.js +1 -0
- package/dist/gateway/static/root/assets/{browser-settings-page-BLniK98R.js → browser-settings-page-BHElJSFt.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-BfTF_flC.js → capabilities-BaKHutgZ.js} +1 -1
- package/dist/gateway/static/root/assets/{capabilities-oihQXc5J.js → capabilities-abgigXV1.js} +1 -1
- package/dist/gateway/static/root/assets/capabilities-page-EENl65YY.js +2 -0
- package/dist/gateway/static/root/assets/capabilities-settings-panel-BOwbZn9X.js +8 -0
- package/dist/gateway/static/root/assets/{channels-DEIqjf9M.js → channels-DlnXbcOj.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-agents-api-BzuJyysa.js → chat-agents-api-CyvBfBbp.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-chart-block-DurSfGy2.js → chat-chart-block-B83s8HE9.js} +1 -1
- package/dist/gateway/static/root/assets/{chat-page-CK4aWVbI.js → chat-page-LOR5JxDh.js} +15 -15
- package/dist/gateway/static/root/assets/{chat-terminal-dock-UBaRUsXJ.js → chat-terminal-dock-DE8j-K9d.js} +1 -1
- package/dist/gateway/static/root/assets/{command-palette-api-3kNqE3U7.js → command-palette-api-YP0zV_Ol.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-model-config-control-CrI-u8F_.js → composer-model-config-control-C2Bku39S.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-notifications-L6u0F2_8.js → composer-notifications-MGKffwC7.js} +1 -1
- package/dist/gateway/static/root/assets/{composer-payload-handoff-DdHGkHOq.js → composer-payload-handoff-ClWsunJ2.js} +1 -1
- package/dist/gateway/static/root/assets/{computer-settings-page-BwvCOkbI.js → computer-settings-page-DUzQe6Bz.js} +1 -1
- package/dist/gateway/static/root/assets/{connected-providers-grid-B8eiZl6Z.js → connected-providers-grid-BgW-ioIt.js} +1 -1
- package/dist/gateway/static/root/assets/{connection-usage-guide-CydSRk3h.js → connection-usage-guide-B9hoSOnN.js} +1 -1
- package/dist/gateway/static/root/assets/{connector-service-page-CLBi6R-Z.js → connector-service-page-e67KylnM.js} +1 -1
- package/dist/gateway/static/root/assets/{connectors-api-Bn2IbtcF.js → connectors-api-CRGq-TSw.js} +1 -1
- package/dist/gateway/static/root/assets/connectors-page-BJm1jjct.js +1 -0
- package/dist/gateway/static/root/assets/{date-picker-DsD7NIm2.js → date-picker-DwITf4I2.js} +1 -1
- package/dist/gateway/static/root/assets/{date-time-picker-BhnBpBpj.js → date-time-picker-ChG1CqR1.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-eFR-zmP2.js → desktop-pet-BHoFymL4.js} +1 -1
- package/dist/gateway/static/root/assets/{desktop-pet-settings-CfFTYstQ.js → desktop-pet-settings-BYeBN4jj.js} +1 -1
- package/dist/gateway/static/root/assets/{dev-view-store-D_uPX9_R.js → dev-view-store-DsjH8x76.js} +1 -1
- package/dist/gateway/static/root/assets/device-connections-panel-DE01vyK_.js +1 -0
- package/dist/gateway/static/root/assets/device-pairing-action-w1enAo76.js +1 -0
- package/dist/gateway/static/root/assets/{device-pairing-wizard-BeLkoDUp.js → device-pairing-wizard-Dt737tSq.js} +1 -1
- package/dist/gateway/static/root/assets/{directory-picker-path-field-5wZa0JF3.js → directory-picker-path-field-B-eUnbng.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-authoritative-grants-DaA0KXyO.js → extension-authoritative-grants-DYp2nNol.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-debug-page-CXe8jimk.js → extension-debug-page-D3X7SlzG.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-iframe-host-BwMISzWU.js → extension-iframe-host-CIAq7PSn.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-marketplace-api-DuWuae8G.js → extension-marketplace-api-DGV5FC-v.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-message-router-DzBfVl6h.js → extension-message-router-B2wbucV7.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-page-DW18FOb8.js → extension-page-qwY7r1_p.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-provider-CyYrgUw-.js → extension-provider-DFcRbTHI.js} +1 -1
- package/dist/gateway/static/root/assets/{extension-settings-page-ByGVQYDw.js → extension-settings-page-Cpnh9lcZ.js} +1 -1
- package/dist/gateway/static/root/assets/file-preview-surface-Da1xZiG6.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-config-swr-BYoBGl6i.js → gateway-config-swr-BD-ams0X.js} +1 -1
- package/dist/gateway/static/root/assets/gateway-realtime-CoIFB3im.js +1 -0
- package/dist/gateway/static/root/assets/gateway-realtime-store-CTWm23Qi.js +1 -0
- package/dist/gateway/static/root/assets/{gateway-restart-CtqJpyNu.js → gateway-restart-Dos1Pp84.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-settings-xzO7KDsu.js → gateway-settings-DUC1iOVK.js} +1 -1
- package/dist/gateway/static/root/assets/{gateway-startup-retry-DCDOl6Oo.js → gateway-startup-retry-DgmvR-hb.js} +1 -1
- package/dist/gateway/static/root/assets/{global-defaults-api-DXFSI87T.js → global-defaults-api-B7suATYU.js} +1 -1
- package/dist/gateway/static/root/assets/{home-page-CztF0goW.js → home-page-BusNFHe-.js} +3 -3
- package/dist/gateway/static/root/assets/{home-task-actions-DTXb7Gc7.js → home-task-actions-C8Fi6GBq.js} +1 -1
- package/dist/gateway/static/root/assets/{image-generation-api-Ck0rMJy3.js → image-generation-api-Baz4xdZ4.js} +1 -1
- package/dist/gateway/static/root/assets/{imports-page-egn9yYfF.js → imports-page-DR0eLPgB.js} +1 -1
- package/dist/gateway/static/root/assets/index-B_TGvH_k.css +1 -0
- package/dist/gateway/static/root/assets/index-DE6GguFZ.js +11 -0
- package/dist/gateway/static/root/assets/{install-connector-dialog-CMh8jhn1.js → install-connector-dialog-CntHi8Rh.js} +1 -1
- package/dist/gateway/static/root/assets/installed-connector-row-skeleton-BAe_utvG.js +1 -0
- package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BOiKmOwN.js → keyboard-shortcuts-settings-DlGDLJI2.js} +1 -1
- package/dist/gateway/static/root/assets/{local-app-workbench-page-ev6VTDX2.js → local-app-workbench-page-B9uSL1Mi.js} +1 -1
- package/dist/gateway/static/root/assets/{local-apps-page-CQBSa3cR.js → local-apps-page-BoCtITdL.js} +1 -1
- package/dist/gateway/static/root/assets/{local-session-drafts-pAAFf-Ad.js → local-session-drafts-CGSV1RQg.js} +1 -1
- package/dist/gateway/static/root/assets/{locale-store-BYdvIuPj.js → locale-store-CHjsq5NR.js} +1 -1
- package/dist/gateway/static/root/assets/{logs-page-Z-4VNgnq.js → logs-page-0hkRbcUR.js} +1 -1
- package/dist/gateway/static/root/assets/{management-api-D739TCBl.js → management-api-FVu7eYXD.js} +1 -1
- package/dist/gateway/static/root/assets/management-settings-QQB1r71U.js +1 -0
- package/dist/gateway/static/root/assets/map-pin-BFRLhzQ9.js +1 -0
- package/dist/gateway/static/root/assets/{markdown-view-BOJVaGPC.js → markdown-view-ihzUc4ud.js} +1 -1
- package/dist/gateway/static/root/assets/{mcp-conversation-setup-page-NcRvP7cK.js → mcp-conversation-setup-page-DffQKrjd.js} +1 -1
- package/dist/gateway/static/root/assets/{media-plugins-B9bQ3e1j.js → media-plugins-C78NkHfB.js} +1 -1
- package/dist/gateway/static/root/assets/{messages-lc5BjBtX.js → messages-C7QSnTdg.js} +2 -2
- package/dist/gateway/static/root/assets/{model-selector-DugdMlvi.js → model-selector-QFZY5XNN.js} +1 -1
- package/dist/gateway/static/root/assets/{models-hub-cache-DvDksW4g.js → models-hub-cache-BrD6r5Qs.js} +1 -1
- package/dist/gateway/static/root/assets/note-detail-panel-DXzfoiyk.js +7 -0
- package/dist/gateway/static/root/assets/note-image-lightbox-Bvjumefe.js +1 -0
- package/dist/gateway/static/root/assets/{notes-api-auhtw3zM.js → notes-api-D5SvfybU.js} +1 -1
- package/dist/gateway/static/root/assets/{notes-page-DnI1iJ3g.js → notes-page-BNTgiHSk.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-api-BXKG29Kg.js → oauth-api-DnMpUoyx.js} +1 -1
- package/dist/gateway/static/root/assets/{oauth-provider-connect-y6-vDWb-.js → oauth-provider-connect-DGYky6ut.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-capture-button-BBVJZgU0.js → page-context-capture-button-BXSBeGms.js} +1 -1
- package/dist/gateway/static/root/assets/{page-context-draft-B30xEPDh.js → page-context-draft-Bk7jVvAG.js} +1 -1
- package/dist/gateway/static/root/assets/{page-header-store-BGCCXOOf.js → page-header-store-NP7MCIaP.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-avatar-w5Sekj02.js → personal-avatar-1TVnHakL.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-page-BWzfp81f.js → personal-page-D7zTHQ0K.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-profile-settings-BYmKk14v.js → personal-profile-settings-TcI0Zfwr.js} +1 -1
- package/dist/gateway/static/root/assets/{personal-settings-panel-DYnTT7aB.js → personal-settings-panel-BJ46T7ZO.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-dependencies-card-DJciwZ-7.js → phone-dependencies-card-B4QsgIEF.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-connection-C3jmc4ma.js → phone-model-connection-Dk5kE1Ll.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-model-picker-MWC_Zh2a.js → phone-model-picker-CFoxQiws.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-settings-page-C1Yc6tP7.js → phone-settings-page-Bv1xm8sh.js} +1 -1
- package/dist/gateway/static/root/assets/{phone-workspace-store-Cxk2PJZe.js → phone-workspace-store-DGaibcsi.js} +1 -1
- package/dist/gateway/static/root/assets/{plugin-details-dialog-CpKZE_nx.js → plugin-details-dialog-FcOJaeP0.js} +1 -1
- package/dist/gateway/static/root/assets/{preference-select-fields-ByihE_wl.js → preference-select-fields-B-yK91If.js} +1 -1
- package/dist/gateway/static/root/assets/{preview-runtime-iJuVSugF.js → preview-runtime-C1U57WSM.js} +3 -3
- package/dist/gateway/static/root/assets/product-automation-feedback-GA_YPLkr.js +1 -0
- package/dist/gateway/static/root/assets/product-navigation-wFfnI3uw.js +1 -0
- package/dist/gateway/static/root/assets/{product-open-page-B7kAAD7Q.js → product-open-page-C09VEZjY.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-content-CzNWh2h2.js → product-preview-content-BOq3gtSJ.js} +1 -1
- package/dist/gateway/static/root/assets/{product-preview-modal-B1RKw3Z-.js → product-preview-modal-DIh_CsXp.js} +2 -2
- package/dist/gateway/static/root/assets/{project-detail-page-Zr1I56NG.js → project-detail-page-Dgs8ImMC.js} +1 -1
- package/dist/gateway/static/root/assets/{project-understanding-D0S9pFg7.js → project-understanding-4IyHVmus.js} +1 -1
- package/dist/gateway/static/root/assets/{projects-page-DlwRbxAj.js → projects-page-BHQxQGTd.js} +1 -1
- package/dist/gateway/static/root/assets/{providers-api-D_v_CJ3l.js → providers-api-D9NuB7w3.js} +1 -1
- package/dist/gateway/static/root/assets/{recording-upload-BSyxK34y.js → recording-upload-plrQDkLa.js} +1 -1
- package/dist/gateway/static/root/assets/{registry-api-DGi-X6j7.js → registry-api-CDpUAb2R.js} +1 -1
- package/dist/gateway/static/root/assets/{remote-access-hub-D3EYRXQC.js → remote-access-hub-DVTs8pwO.js} +1 -1
- package/dist/gateway/static/root/assets/{resource-unavailable-52Jvhy-I.js → resource-unavailable-CZlqZYk-.js} +1 -1
- package/dist/gateway/static/root/assets/{right-workspace-store-DsGslCi-.js → right-workspace-store-Cehybf-G.js} +1 -1
- package/dist/gateway/static/root/assets/route-preload-7WVrzJca.js +2 -0
- package/dist/gateway/static/root/assets/routine-panel-Bfbiz0IN.js +2 -0
- package/dist/gateway/static/root/assets/{runtime-tools-api-D8Xtty0g.js → runtime-tools-api-BhS0RWf2.js} +1 -1
- package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-r28zxrgP.js → runtime-tools-settings-panel-jTbGPGeA.js} +1 -1
- package/dist/gateway/static/root/assets/{service-recommendation-list-Kw6pwI8U.js → service-recommendation-list-wfd0Mjtu.js} +1 -1
- package/dist/gateway/static/root/assets/{session-api-eApyRHbI.js → session-api-CR3NLqvs.js} +1 -1
- package/dist/gateway/static/root/assets/{session-manager-C-oe-9_N.js → session-manager-DUWeBdeG.js} +1 -1
- package/dist/gateway/static/root/assets/{sessions-page-BkNfjgXC.js → sessions-page-9ibCNP9o.js} +1 -1
- package/dist/gateway/static/root/assets/settings-advanced-gate-Cq4HDQu2.js +1 -0
- package/dist/gateway/static/root/assets/{settings-advanced-section-Dc9aztiW.js → settings-advanced-section-CTLdGPvx.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-mode-store-DcE2iR7e.js → settings-mode-store-CCQVvItG.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-CXRPZxuB.js → settings-page-BOzzOS6k.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-header-CQueaD1Z.js → settings-page-header-C21Iw2rD.js} +1 -1
- package/dist/gateway/static/root/assets/{settings-page-layout-BlwyxcEq.js → settings-page-layout-BXcLlp6p.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-interaction-page-BvL6C5ja.js → setup-interaction-page-W2F5ZaR_.js} +1 -1
- package/dist/gateway/static/root/assets/{setup-status-panel-Dp5cY2P9.js → setup-status-panel-BFNwZuhp.js} +1 -1
- package/dist/gateway/static/root/assets/share-2-CnIB9PsV.js +1 -0
- package/dist/gateway/static/root/assets/share-link-dialog-2JjvWs0q.js +1 -0
- package/dist/gateway/static/root/assets/{share-preview-page-IG0fTWJO.js → share-preview-page-Di5_ukH8.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-api-DgYOJV0T.js → shares-api-BhWvN3LS.js} +1 -1
- package/dist/gateway/static/root/assets/{shares-settings-YeLkRDki.js → shares-settings-CirGM67m.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-api-DRCHLW2T.js → skill-api-BG9A1WF0.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-list-api-CQUhEUOF.js → skill-list-api-B26hHnXq.js} +1 -1
- package/dist/gateway/static/root/assets/{skill-reload-api-BoEna1cx.js → skill-reload-api-B9Eu5Yk_.js} +1 -1
- package/dist/gateway/static/root/assets/{skills-page-CBAL83FE.js → skills-page-gGU0LZ5e.js} +1 -1
- package/dist/gateway/static/root/assets/{space-api-d4Q4hkEY.js → space-api-_uKFiASp.js} +1 -1
- package/dist/gateway/static/root/assets/space-page-CKVuhV2i.js +2 -0
- package/dist/gateway/static/root/assets/{space-workbook-BDjeiRtr.js → space-workbook-BAwHwK6O.js} +1 -1
- package/dist/gateway/static/root/assets/system-settings-panel-0e2zfQLt.js +1 -0
- package/dist/gateway/static/root/assets/{task-detail-page-DFeKIcxT.js → task-detail-page-DEpYIaok.js} +1 -1
- package/dist/gateway/static/root/assets/{task-header-title-ClyuCAFb.js → task-header-title-Cdgp2rCs.js} +1 -1
- package/dist/gateway/static/root/assets/{task-run-issue-notice-XWlgvgEo.js → task-run-issue-notice-CGrUMy0s.js} +1 -1
- package/dist/gateway/static/root/assets/{terminal-panel-store-CNkRP4kf.js → terminal-panel-store-Cy90Ix5U.js} +1 -1
- package/dist/gateway/static/root/assets/{theme-store-nXIuAiQZ.js → theme-store-CvG266p8.js} +1 -1
- package/dist/gateway/static/root/assets/{tracing-settings-page-CoWcr2c0.js → tracing-settings-page-Cx_fOH70.js} +1 -1
- package/dist/gateway/static/root/assets/{tunnel-api-DgsELO9g.js → tunnel-api-Cph-ZBBy.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-activity-store-BI_PbKCi.js → understanding-activity-store-CN4JzOIO.js} +1 -1
- package/dist/gateway/static/root/assets/{understanding-refresh-store-DPHzCi1Q.js → understanding-refresh-store-BuZZ1_VH.js} +1 -1
- package/dist/gateway/static/root/assets/{usage-page-BVNBJa59.js → usage-page-Du42x0ej.js} +1 -1
- package/dist/gateway/static/root/assets/{use-autosave-BPDFVsgM.js → use-autosave-B_WH_LBE.js} +1 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-DJsIzJ1c.js +2 -0
- package/dist/gateway/static/root/assets/{use-file-preview-expanded-BhmEiOkv.js → use-file-preview-expanded-BFF2vXm5.js} +1 -1
- package/dist/gateway/static/root/assets/{use-generated-media-CLEV4wYC.js → use-generated-media-CzRbgtcv.js} +1 -1
- package/dist/gateway/static/root/assets/{use-personal-profile-CFaihmiJ.js → use-personal-profile-D4gLM6Wi.js} +1 -1
- package/dist/gateway/static/root/assets/{use-personal-work-CIZMwOlm.js → use-personal-work-Dd2jRUpz.js} +1 -1
- package/dist/gateway/static/root/assets/{use-realtime-voice-CvtX2HcA.js → use-realtime-voice-9OvLwHzk.js} +1 -1
- package/dist/gateway/static/root/assets/use-section-navigation-yC9HkVpd.js +1 -0
- package/dist/gateway/static/root/assets/use-share-link-WKZLlEqr.js +1 -0
- package/dist/gateway/static/root/assets/{use-workspace-tree-BnvuxYD4.js → use-workspace-tree-LCIT1H-D.js} +1 -1
- package/dist/gateway/static/root/assets/{user-model-page-D4yNFvW1.js → user-model-page-AK2U8vGc.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-api-key-field-NINoxB5r.js → voice-api-key-field-BqXQj51r.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-config-api-7cvKLNoE.js → voice-config-api-sXEIG6lz.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-input-shortcut-events-DaCuiqoi.js → voice-input-shortcut-events-DN-_rY5a.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-player-store-DipmM7w1.js → voice-player-store-CTbnOdeM.js} +1 -1
- package/dist/gateway/static/root/assets/{voice-settings-BTvMqF_9.js → voice-settings-j8o-hGTm.js} +1 -1
- package/dist/gateway/static/root/assets/wifi-off-C35sMFUl.js +1 -0
- package/dist/gateway/static/root/assets/{work-discovery-overlay-BKdumzyK.js → work-discovery-overlay-BjfTRFX8.js} +1 -1
- package/dist/gateway/static/root/assets/{work-discovery-page-uX1VIzJY.js → work-discovery-page-CSRkFiXc.js} +1 -1
- package/dist/gateway/static/root/assets/{working-directory-picker-modal-C9hWAPvW.js → working-directory-picker-modal-DgM21YVT.js} +1 -1
- package/dist/gateway/static/root/assets/{workspace-api-_mQWmOZm.js → workspace-api-BuNWyNvA.js} +2 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-CX8zX9eZ.js +1 -0
- package/dist/gateway/static/root/assets/workspace-file-preview-dialog-DwVWTehC.js +1 -0
- package/dist/gateway/static/root/assets/{workspace-open-location-menu-BZSS94es.js → workspace-open-location-menu-BAbIGS01.js} +1 -1
- package/dist/gateway/static/root/assets/{xopc-cloud-account-card-xJr48TmR.js → xopc-cloud-account-card-e8HJFnTs.js} +1 -1
- package/dist/gateway/static/root/index.html +100 -95
- package/dist/package.js +1 -1
- package/dist/packages/endpoint-tools-client/src/index.js +8 -4
- package/dist/packages/endpoint-tools-protocol/src/canonical-json.js +20 -0
- package/dist/packages/endpoint-tools-protocol/src/folders.js +170 -0
- package/dist/packages/endpoint-tools-protocol/src/index.js +55 -17
- package/dist/packages/endpoint-tools-protocol/src/location.js +22 -1
- package/dist/packages/endpoint-tools-protocol/src/personal.js +151 -8
- package/dist/src/agent/external-tools/endpoint-provider.js +54 -10
- package/dist/src/agent/tool-manuals/computer.d.ts +1 -1
- package/dist/src/agent/tool-manuals/computer.js +2 -2
- package/dist/src/browser/remote/endpoint-transport.js +2 -1
- package/dist/src/computer/endpoint-transport.d.ts +1 -1
- package/dist/src/computer/endpoint-transport.js +4 -2
- package/dist/src/computer/errors.js +2 -1
- package/dist/src/computer/model-adapter.js +1 -0
- package/dist/src/computer/runtime.d.ts +1 -0
- package/dist/src/computer/runtime.js +14 -2
- package/dist/src/endpoint-tools/context-store.js +2 -1
- package/dist/src/endpoint-tools/delegation.js +2 -1
- package/dist/src/endpoint-tools/desktop-authority-response.js +2 -1
- package/dist/src/endpoint-tools/device-capability-grants.d.ts +13 -0
- package/dist/src/endpoint-tools/device-capability-grants.js +71 -0
- package/dist/src/endpoint-tools/folder-connections.d.ts +19 -0
- package/dist/src/endpoint-tools/folder-connections.js +48 -0
- package/dist/src/endpoint-tools/grant-service.js +2 -1
- package/dist/src/endpoint-tools/invocation-service.d.ts +3 -0
- package/dist/src/endpoint-tools/invocation-service.js +10 -2
- package/dist/src/endpoint-tools/policy.js +16 -5
- package/dist/src/endpoint-tools/provider-catalog.js +2 -1
- package/dist/src/endpoint-tools/provider-operation-journal.js +2 -1
- package/dist/src/endpoint-tools/registry.js +2 -1
- package/dist/src/endpoint-tools/target-resolver.d.ts +1 -1
- package/dist/src/endpoint-tools/target-resolver.js +25 -5
- package/dist/src/endpoint-tools/task-targets.d.ts +4 -1
- package/dist/src/endpoint-tools/task-targets.js +10 -4
- package/dist/src/endpoint-tools/terminal-broker.js +2 -1
- package/dist/src/gateway/hono/middleware/auth.js +10 -0
- package/dist/src/gateway/hono/routes/device-connections.d.ts +3 -0
- package/dist/src/gateway/hono/routes/device-connections.js +289 -0
- package/dist/src/gateway/hono/routes/device-targets.js +32 -5
- package/dist/src/gateway/hono/routes/endpoint-compatibility.js +8 -0
- package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
- package/dist/src/gateway/hono/routes/media.js +18 -32
- package/dist/src/gateway/hono/routes/music-generation.js +1 -1
- package/dist/src/gateway/hono/routes/shares.js +96 -12
- package/dist/src/gateway/hono/routes/space.js +6 -3
- package/dist/src/gateway/hono/routes/video-generation.js +1 -1
- package/dist/src/gateway/security/gateway-scopes.d.ts +1 -0
- package/dist/src/gateway/security/gateway-scopes.js +9 -1
- package/dist/src/gateway/security/media-playback-ticket.d.ts +3 -0
- package/dist/src/gateway/security/media-playback-ticket.js +41 -0
- package/dist/src/media-shared/http/file-response.d.ts +3 -0
- package/dist/src/media-shared/http/file-response.js +31 -0
- package/dist/src/music-generation/artifact.d.ts +1 -1
- package/dist/src/music-generation/artifact.js +4 -18
- package/dist/src/realtime/compact-run-event.js +5 -1
- package/dist/src/session/compact-history.js +6 -3
- package/dist/src/share/share-landing.d.ts +2 -0
- package/dist/src/share/share-landing.js +4 -0
- package/dist/src/share/share-store.js +3 -2
- package/dist/src/share/share-types.d.ts +4 -0
- package/dist/src/space/repository.d.ts +9 -1
- package/dist/src/space/repository.js +75 -30
- package/dist/src/storage/sqlite/desktop-execution-repository.js +2 -1
- package/dist/src/storage/sqlite/desktop-execution-stop-repository.js +2 -1
- package/dist/src/storage/sqlite/desktop-operation-repository.js +2 -1
- package/dist/src/storage/sqlite/device-pairing-approval.js +1 -0
- package/dist/src/video-generation/artifact.d.ts +1 -1
- package/dist/src/video-generation/artifact.js +4 -28
- package/package.json +2 -2
- package/dist/gateway/static/root/assets/browser-notification-delivery-DmE2FgGc.js +0 -1
- package/dist/gateway/static/root/assets/capabilities-page-B32XFJ59.js +0 -2
- package/dist/gateway/static/root/assets/capabilities-settings-panel-CWnHPY8j.js +0 -8
- package/dist/gateway/static/root/assets/connectors-page-ywk7W0s6.js +0 -1
- package/dist/gateway/static/root/assets/file-preview-surface-Cw70pwph.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-Dzq6_piH.js +0 -1
- package/dist/gateway/static/root/assets/gateway-realtime-store-B9CDQ8NO.js +0 -1
- package/dist/gateway/static/root/assets/index-dqkMYWTd.js +0 -11
- package/dist/gateway/static/root/assets/index-q78xsKF3.css +0 -1
- package/dist/gateway/static/root/assets/management-settings-CZDWUPmg.js +0 -1
- package/dist/gateway/static/root/assets/note-detail-panel-CEi6GNEA.js +0 -7
- package/dist/gateway/static/root/assets/note-image-lightbox-DftbeSZR.js +0 -1
- package/dist/gateway/static/root/assets/product-automation-feedback-ref9gqOW.js +0 -1
- package/dist/gateway/static/root/assets/product-navigation-Dp-adLY_.js +0 -1
- package/dist/gateway/static/root/assets/route-preload-D00yB6hp.js +0 -2
- package/dist/gateway/static/root/assets/routine-panel-sCpXMbMl.js +0 -2
- package/dist/gateway/static/root/assets/settings-advanced-gate-B82UPSQS.js +0 -1
- package/dist/gateway/static/root/assets/share-link-dialog-CB3LkWw8.js +0 -1
- package/dist/gateway/static/root/assets/space-page-8BMb_g2p.js +0 -2
- package/dist/gateway/static/root/assets/system-settings-panel-dt8k0K4V.js +0 -1
- package/dist/gateway/static/root/assets/use-composer-attachments-9nVD0sQ1.js +0 -2
- package/dist/gateway/static/root/assets/workspace-editor-agent-store-BzuNTkZu.js +0 -1
- package/dist/gateway/static/root/assets/workspace-file-preview-dialog-D4Nc7XkR.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{_ as i}from"./chunk-KS7C4IRE-DIIvxCDx.js";import{a,i as o,n as s,o as c}from"./locale-store-BYdvIuPj.js";import{t as l}from"./messages-lc5BjBtX.js";import{a as u,n as d,o as f,r as p,s as m,t as h}from"./dist-DlirbHVs.js";import{t as g}from"./activity-YogQEteU.js";import{t as _}from"./chevron-left-DqFhpbvK.js";import{t as v}from"./chevron-right-BweFrslA.js";import{n as y,r as b,t as x}from"./popover-select-hRG1EzAY.js";import{t as S}from"./laptop-CI3hBVrl.js";import{n as C,t as ee}from"./shield-off-2jsucUds.js";import{t as w}from"./plus-Q2yW6OE7.js";import{t as T}from"./search-DA7gz22f.js";import{t as E}from"./smartphone-DSSsQFqA.js";import{t as te}from"./x-B_N4OPjy.js";import{t as D}from"./cn-0WouolD0.js";import{t as O}from"./skeleton-DzdOeGYz.js";import{s as k}from"./session-api-eApyRHbI.js";import{i as A,o as j}from"./vendor-swr-CdRzEUwF.js";import{t as M}from"./button-C5tRaJxt.js";import{i as ne,o as N}from"./settings-shell-dialog-layer-BU3UuiJr.js";import{t as P}from"./page-tabs-DoYMKhVO.js";import{t as F}from"./confirm-dialog-MHCmEEUZ.js";import{t as I}from"./refresh-button-DX7bULU5.js";import{n as L}from"./index.module-Cd9ENXfk.js";import{n as R}from"./settings-loading-skeleton-CAoOV17i.js";import{a as z,i as B,n as re,o as ie,r as ae,t as oe}from"./management-api-D739TCBl.js";import{n as se,t as ce}from"./settings-page-header-CQueaD1Z.js";import{t as le}from"./settings-page-layout-BlwyxcEq.js";import{t as V}from"./device-pairing-wizard-BeLkoDUp.js";var H=n(),U=e(t(),1),W=r();function ue({operationId:e,zh:t}){let[n,r]=(0,U.useState)(!1),[i,a]=(0,U.useState)(``);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(M,{variant:`ghost`,className:`h-7 px-2 text-xs`,disabled:n,onClick:async()=>{r(!0);try{let n=(await c(o(`/api/endpoint-tools/provider-operations/${encodeURIComponent(e)}`))).payload.receipt?.state;a(n===`succeeded`?t?`设备报告已完成,Gateway 未收到结果。`:`Device reported completion. Gateway did not receive the result.`:n===`running`?t?`设备仍在执行。`:`Device is still running.`:t?`设备未确认结果。`:`Device has not confirmed the outcome.`)}catch{a(t?`暂时无法核对设备状态。`:`Unable to check device status.`)}finally{r(!1)}},children:n?t?`核对中…`:`Checking…`:t?`核对设备状态`:`Check device status`}),i?(0,W.jsx)(`p`,{role:`status`,className:`text-right text-xs text-fg-muted`,children:i}):null]})}async function de(e=`GET`,t,n){let r=await a(o(`/api/endpoint-tools/target-authorizations`+(n?`/`+encodeURIComponent(n):``)),{method:e,...t?{body:JSON.stringify(t)}:{}});if(!r.ok)throw Error(r.status===403?`owner`:`unavailable`);return(await r.json()).payload}function fe({devices:e,zh:t}){let n=A(`device-single-call-grants`,()=>de(),{refreshInterval:5e3,shouldRetryOnError:!1}),r=A(n.error?null:`device-grant-conversations`,()=>k({limit:100}),{shouldRetryOnError:!1}),[i,a]=(0,U.useState)(``),[o,s]=(0,U.useState)(``),[c,l]=(0,U.useState)(``),[u,d]=(0,U.useState)(`weather`),[f,p]=(0,U.useState)(`approximate`),[m,h]=(0,U.useState)(`restaurant`),[g,_]=(0,U.useState)(!1),[v,y]=(0,U.useState)(!1);if(n.error)return null;let b=e.flatMap(e=>e.endpoints.map(t=>({...t,label:e.displayName+` · `+e.platform+` · `+e.id.slice(-8)}))),S=b.find(e=>e.endpointId===c)?.tools.find(e=>e.descriptor.name.endsWith(`.device.get_location`))?.descriptor.name,C=async()=>{if(!(!S||!i||!o)){_(!0),y(!1);try{await de(`POST`,{conversationId:i,requestorPrincipalId:o,targetEndpointId:c,toolName:S,arguments:{purpose:u,precision:f,...u===`nearby`?{category:m}:{}}}),await n.mutate()}catch{y(!0)}finally{_(!1)}}};return(0,W.jsxs)(`section`,{className:`mb-5 rounded-xl border border-edge bg-surface-base p-4`,children:[(0,W.jsx)(`h3`,{className:`font-semibold text-fg`,children:t?`跨设备单次授权`:`Single-call device authorization`}),(0,W.jsx)(`p`,{className:`mt-1 text-sm text-fg-muted`,children:t?`为指定会话和来源设备授权一次定位查询,60 秒后失效。目标设备仍需确认;授权后请在来源设备继续请求。`:`Authorize one location query for a conversation and source device. Expires in 60 seconds; target-device consent is still required. Continue the request from the source device.`}),n.isLoading||r.isLoading?(0,W.jsx)(O,{className:`mt-3 h-28`}):(0,W.jsxs)(`div`,{className:`mt-3 grid gap-3 sm:grid-cols-2`,children:[(0,W.jsx)(x,{value:i,onChange:a,placeholder:t?`选择会话`:`Conversation`,ariaLabel:t?`会话`:`Conversation`,options:(r.data?.items??[]).map(e=>({value:e.key,label:e.name||e.key}))}),(0,W.jsx)(x,{value:o,onChange:s,placeholder:t?`消息来源设备`:`Source device`,ariaLabel:t?`消息来源设备`:`Source device`,options:e.filter(e=>e.endpoints.length>0).map(e=>({value:e.id,label:e.displayName+` · `+e.platform+` · `+e.id.slice(-8)}))}),(0,W.jsx)(x,{value:c,onChange:l,placeholder:t?`使用哪台设备的位置`:`Location device`,ariaLabel:t?`目标设备`:`Target device`,options:b.filter(e=>e.tools.some(e=>e.descriptor.name.endsWith(`.device.get_location`))).map(e=>({value:e.endpointId,label:e.label}))}),(0,W.jsx)(x,{placeholder:t?`用途`:`Purpose`,value:u,onChange:e=>d(e),ariaLabel:t?`用途`:`Purpose`,options:[{value:`weather`,label:t?`查询天气`:`Weather`},{value:`nearby`,label:t?`附近地点`:`Nearby places`}],allowEmpty:!1}),(0,W.jsx)(x,{placeholder:t?`精度`:`Precision`,value:f,onChange:e=>p(e),ariaLabel:t?`精度`:`Precision`,options:[{value:`approximate`,label:t?`大致位置`:`Approximate`},{value:`precise`,label:t?`精确位置`:`Precise`}],allowEmpty:!1}),u===`nearby`?(0,W.jsx)(x,{placeholder:t?`地点类型`:`Category`,value:m,onChange:h,ariaLabel:t?`附近地点类型`:`Place category`,options:[`restaurant`,`cafe`,`pharmacy`,`park`].map((e,n)=>({value:e,label:t?[`餐厅`,`咖啡馆`,`药店`,`公园`][n]:e})),allowEmpty:!1}):null,(0,W.jsx)(M,{variant:`primary`,disabled:g||!i||!o||!S,onClick:()=>void C(),children:t?`允许一次`:`Allow once`})]}),v?(0,W.jsx)(`p`,{role:`alert`,className:`mt-2 text-sm text-fg-muted`,children:t?`授权失败,请检查设备连接后重试。`:`Authorization failed. Check the device connection.`}):null,(0,W.jsx)(`div`,{className:`mt-3 space-y-2`,children:n.data?.map(r=>(0,W.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-sm text-fg-muted`,children:[(0,W.jsxs)(`span`,{children:[e.find(e=>e.endpoints.some(e=>e.endpointId===r.targetEndpointId))?.displayName??(t?`设备`:`Device`),` · `,r.state===`running`?t?`执行中`:`Running`:t?`等待本次调用`:`Awaiting one call`]}),(0,W.jsx)(M,{disabled:g,onClick:()=>{_(!0),de(`DELETE`,void 0,r.id).then(()=>n.mutate()).catch(()=>y(!0)).finally(()=>_(!1))},children:t?`撤销`:`Revoke`})]},r.id))})]})}var pe={ready:[`可用`,`Ready`],offline:[`离线`,`Offline`],authorization_required:[`等待批准`,`Approval required`],needs_foreground:[`需要设备前台运行`,`Foreground required`],permission_missing:[`缺少设备权限`,`Device permission required`],resource_busy:[`资源占用中`,`Resource busy`],unavailable:[`暂不可用`,`Unavailable`]};function me({principalId:e,zh:t}){let n=o(`/api/endpoint-tools/providers`),{data:r,error:i,mutate:a}=A(`${n}?principalId=${encodeURIComponent(e)}`,e=>c(e),{refreshInterval:15e3}),[s,l]=(0,U.useState)(),[u,d]=(0,U.useState)(!1),f=r?.payload.filter(t=>t.principalId===e),p=async t=>{l(t.provider.localId),d(!1);try{await c(n+`/admission`,{method:`POST`,body:JSON.stringify({principalId:e,localId:t.provider.localId,expectedDigest:t.digest,allowed:!t.admitted})}),await a()}catch{d(!0),await a()}finally{l(void 0)}};return(0,W.jsxs)(`section`,{className:`space-y-2`,children:[(0,W.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:t?`设备能力`:`Device capabilities`}),!r&&!i?(0,W.jsx)(O,{className:`h-24 w-full rounded-xl`}):null,i||u?(0,W.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:t?`能力信息更新失败,请刷新后重试。`:`Unable to update capabilities. Refresh and retry.`}):null,f?.length===0?(0,W.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t?`此设备尚未上报扩展能力。`:`No additional capabilities reported.`}):null,f?.map(e=>(0,W.jsxs)(`article`,{className:`space-y-2 rounded-xl border border-edge-subtle p-3`,children:[(0,W.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,W.jsx)(`h4`,{className:`break-words text-sm font-medium text-fg`,children:e.provider.title}),(0,W.jsx)(`span`,{className:`shrink-0 text-xs text-fg-muted`,children:(pe[e.status]??pe.unavailable)[+!t]})]}),(0,W.jsx)(`p`,{className:`break-words text-xs text-fg-muted`,children:e.provider.summary}),(0,W.jsxs)(`details`,{className:`text-xs text-fg-subtle`,children:[(0,W.jsx)(`summary`,{className:`cursor-pointer`,children:t?`${e.provider.tools.length} 项能力及权限`:`${e.provider.tools.length} tools and permissions`}),(0,W.jsx)(`ul`,{className:`mt-2 space-y-2`,children:e.provider.tools.map(e=>(0,W.jsxs)(`li`,{className:`break-words`,children:[(0,W.jsx)(`p`,{className:`font-medium text-fg`,children:e.title}),(0,W.jsx)(`p`,{children:e.description}),(0,W.jsxs)(`p`,{children:[e.effect,` · `,e.sensitivity,` · `,e.confirmation===`always`?t?`每次确认`:`Confirm each call`:t?`按批准范围执行`:`Approved scope`,e.requiredPermissions.length?` · ${e.requiredPermissions.join(`, `)}`:``]})]},e.name))})]}),(0,W.jsx)(M,{variant:`secondary`,disabled:s!==void 0,onClick:()=>void p(e),children:s===e.provider.localId?t?`保存中…`:`Saving…`:e.admitted?t?`撤销能力批准`:`Revoke approval`:t?`批准这些能力`:`Approve capabilities`})]},e.provider.localId))]})}var he=720*60*60*1e3;function ge(e){let t=[e.access,e.principal].filter(e=>e!==null);return t.length>0&&t.every(e=>e.revokedAt!==void 0)}function G(e){return ge(e)?`revoked`:e.endpoints.length>0?`online`:`offline`}function _e(e){return new Set(e.endpoints.flatMap(e=>e.tools.map(({descriptor:e})=>e.name))).size}function ve(e,t=Date.now()){return G(e)===`offline`&&(e.lastSeenAt??e.createdAt)<t-he}function ye(e,t,n=Date.now()){let r=t.query.trim().toLocaleLowerCase();return e.filter(e=>{let i=G(e),a=t.status===`all`||(t.status===`active`?i!==`revoked`:t.status===`stale`?ve(e,n):i===t.status),o=!t.platform||e.platform===t.platform,s=!r||[e.displayName,e.id,e.kind,e.platform].some(e=>e.toLocaleLowerCase().includes(r));return a&&o&&s})}function be(e){return e.length>8?e.slice(-8):e}function xe(e){let t=(0,H.c)(61),{device:n,busy:r,onClose:i,onRevoke:a,onRename:o}=e,c=s(Se),g;t[0]===c?g=t[1]:(g=l(c),t[0]=c,t[1]=g);let _=g.endpointToolsSettings,v=c===`zh`?`zh-CN`:`en`,y;t[2]===v?y=t[3]:(y=new Intl.DateTimeFormat(v,{dateStyle:`medium`,timeStyle:`short`}),t[2]=v,t[3]=y);let b=y,x;t[4]===n?x=t[5]:(x=n?G(n):`offline`,t[4]=n,t[5]=x);let S=x,C=n!==null,w;t[6]===i?w=t[7]:(w=e=>!e&&i(),t[6]=i,t[7]=w);let T;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(T=(0,W.jsx)(u,{className:D(`xopc-dialog-overlay fixed inset-0 bg-scrim`,N)}),t[8]=T):T=t[8];let E;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(E=D(`xopc-drawer-right fixed right-0 top-0 flex size-full max-w-lg flex-col border-l border-edge bg-surface-overlay shadow-popover outline-none`,ne),t[9]=E):E=t[9];let O=n?.displayName??_.deviceDetails,k;t[10]===O?k=t[11]:(k=(0,W.jsx)(m,{className:`truncate text-base font-semibold text-fg`,children:O}),t[10]=O,t[11]=k);let A;t[12]===n?A=t[13]:(A=n?(0,W.jsxs)(`p`,{className:`mt-0.5 text-xs text-fg-muted`,children:[n.kind,` · `,n.platform,` · `,be(n.id)]}):null,t[12]=n,t[13]=A);let j;t[14]!==k||t[15]!==A?(j=(0,W.jsxs)(`div`,{className:`min-w-0`,children:[k,A]}),t[14]=k,t[15]=A,t[16]=j):j=t[16];let P;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(P=(0,W.jsx)(te,{className:`size-5`,"aria-hidden":!0}),t[17]=P):P=t[17];let F;t[18]===_.close?F=t[19]:(F=(0,W.jsx)(d,{asChild:!0,children:(0,W.jsx)(M,{variant:`ghost`,className:`size-9 shrink-0 p-0`,"aria-label":_.close,children:P})}),t[18]=_.close,t[19]=F);let I;t[20]!==j||t[21]!==F?(I=(0,W.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between gap-3 border-b border-edge px-4 py-3`,children:[j,F]}),t[20]=j,t[21]=F,t[22]=I):I=t[22];let L;t[23]!==_.accessActive||t[24]!==_.accessRevoked||t[25]!==_.accessTitle||t[26]!==_.createdAt||t[27]!==_.endpointCount||t[28]!==_.endpointsTitle||t[29]!==_.identityId||t[30]!==_.identityTitle||t[31]!==_.lastSeen||t[32]!==_.never||t[33]!==_.noAccessIdentity||t[34]!==_.noOnlineEndpoints||t[35]!==_.noPermissions||t[36]!==_.permissions||t[37]!==_.status||t[38]!==_.statusLabel||t[39]!==_.toolCount||t[40]!==n||t[41]!==b||t[42]!==c||t[43]!==o||t[44]!==S?(L=n?(0,W.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-5 overflow-y-auto p-4`,children:[n.principal&&S!==`revoked`&&o?(0,W.jsx)(Ce,{device:n,zh:c===`zh`,onRename:o},`${n.id}:${n.settingsRevision??0}`):null,(0,W.jsxs)(`dl`,{className:`grid grid-cols-2 gap-3 rounded-xl bg-surface-hover/40 p-4`,children:[(0,W.jsx)(K,{label:_.statusLabel,value:_.status[S]}),(0,W.jsx)(K,{label:_.lastSeen,value:n.lastSeenAt?b.format(n.lastSeenAt):_.never}),(0,W.jsx)(K,{label:_.endpointCount,value:String(n.endpoints.length)}),(0,W.jsx)(K,{label:_.toolCount,value:String(_e(n))})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:_.accessTitle}),(0,W.jsx)(`div`,{className:`mt-2 rounded-xl border border-edge-subtle bg-surface-base p-3 text-xs text-fg-muted`,children:n.access?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{children:n.access.revokedAt?_.accessRevoked:_.accessActive}),(0,W.jsx)(`p`,{className:`mt-1`,children:n.access.requestProofVersion===1?c===`zh`?`设备请求签名已启用`:`Device request signing enabled`:c===`zh`?`请求签名未启用,设备不可用`:`Request signing is missing; device unavailable`}),(0,W.jsxs)(`p`,{className:`mt-1 break-words`,children:[_.permissions,`: `,n.access.scopes.join(`, `)||_.noPermissions]})]}):(0,W.jsx)(`p`,{children:_.noAccessIdentity})})]}),n.principal&&S!==`revoked`?(0,W.jsx)(me,{principalId:n.id,zh:c===`zh`},n.id):null,n.access&&!n.access.revokedAt&&[`ios`,`android`,`harmonyos`].includes(n.platform??``)?(0,W.jsx)(we,{device:n,zh:c===`zh`},n.id):null,(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:_.endpointsTitle}),(0,W.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[n.endpoints.length===0?(0,W.jsx)(`p`,{className:`text-sm text-fg-muted`,children:_.noOnlineEndpoints}):null,n.endpoints.map(e=>(0,W.jsxs)(`article`,{className:`rounded-xl border border-edge-subtle bg-surface-base p-3`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,W.jsx)(`p`,{className:`min-w-0 break-all text-xs font-medium text-fg`,children:e.endpointId}),(0,W.jsxs)(`span`,{className:`text-xs text-fg-muted`,children:[_.status[e.availability],` · v`,e.appVersion]})]}),(0,W.jsx)(`div`,{className:`mt-3 space-y-2`,children:e.tools.map(e=>{let{descriptor:t}=e;return(0,W.jsxs)(`div`,{className:`rounded-lg bg-surface-hover/50 px-3 py-2`,children:[(0,W.jsx)(`p`,{className:`break-all text-xs font-medium text-fg`,children:t.title}),(0,W.jsxs)(`p`,{className:`mt-0.5 break-words text-xs text-fg-subtle`,children:[t.requiresForeground?c===`zh`?`需要设备在前台 · `:`Requires foreground · `:``,t.confirmation===`always`?c===`zh`?`每次确认`:`Confirm each time`:c===`zh`?`按已授权范围调用`:`Uses the authorized scope`]})]},t.name)})})]},e.connectionId))]})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:_.identityTitle}),n.principal&&S!==`revoked`&&o?(0,W.jsx)(Ce,{device:n,zh:c===`zh`,onRename:o},`${n.id}:${n.settingsRevision??0}`):null,(0,W.jsxs)(`dl`,{className:`mt-2 rounded-xl border border-edge-subtle bg-surface-base p-3 text-xs`,children:[(0,W.jsx)(K,{label:_.identityId,value:n.id,breakAll:!0}),(0,W.jsx)(`div`,{className:`mt-3`,children:(0,W.jsx)(K,{label:_.createdAt,value:b.format(n.createdAt)})})]})]})]}):null,t[23]=_.accessActive,t[24]=_.accessRevoked,t[25]=_.accessTitle,t[26]=_.createdAt,t[27]=_.endpointCount,t[28]=_.endpointsTitle,t[29]=_.identityId,t[30]=_.identityTitle,t[31]=_.lastSeen,t[32]=_.never,t[33]=_.noAccessIdentity,t[34]=_.noOnlineEndpoints,t[35]=_.noPermissions,t[36]=_.permissions,t[37]=_.status,t[38]=_.statusLabel,t[39]=_.toolCount,t[40]=n,t[41]=b,t[42]=c,t[43]=o,t[44]=S,t[45]=L):L=t[45];let R;t[46]!==r||t[47]!==_.removeDevice||t[48]!==_.revoking||t[49]!==n||t[50]!==a||t[51]!==S?(R=n&&S!==`revoked`?(0,W.jsx)(`div`,{className:`shrink-0 border-t border-edge px-4 py-3`,children:(0,W.jsxs)(M,{variant:`secondary`,className:`w-full text-danger`,disabled:r,onClick:()=>a(n),children:[(0,W.jsx)(ee,{className:`size-4`,"aria-hidden":!0}),r?_.revoking:_.removeDevice]})}):null,t[46]=r,t[47]=_.removeDevice,t[48]=_.revoking,t[49]=n,t[50]=a,t[51]=S,t[52]=R):R=t[52];let z;t[53]!==I||t[54]!==L||t[55]!==R?(z=(0,W.jsxs)(f,{children:[T,(0,W.jsxs)(p,{className:E,"aria-describedby":void 0,children:[I,L,R]})]}),t[53]=I,t[54]=L,t[55]=R,t[56]=z):z=t[56];let B;return t[57]!==z||t[58]!==C||t[59]!==w?(B=(0,W.jsx)(h,{open:C,onOpenChange:w,children:z}),t[57]=z,t[58]=C,t[59]=w,t[60]=B):B=t[60],B}function Se(e){return e.language}function K(e){let t=(0,H.c)(10),{label:n,value:r,breakAll:i}=e,a=i!==void 0&&i,o;t[0]===n?o=t[1]:(o=(0,W.jsx)(`dt`,{className:`text-xs text-fg-subtle`,children:n}),t[0]=n,t[1]=o);let s=a&&`break-all font-mono text-xs`,c;t[2]===s?c=t[3]:(c=D(`mt-1 text-sm text-fg`,s),t[2]=s,t[3]=c);let l;t[4]!==c||t[5]!==r?(l=(0,W.jsx)(`dd`,{className:c,children:r}),t[4]=c,t[5]=r,t[6]=l):l=t[6];let u;return t[7]!==o||t[8]!==l?(u=(0,W.jsxs)(`div`,{className:`min-w-0`,children:[o,l]}),t[7]=o,t[8]=l,t[9]=u):u=t[9],u}function Ce({device:e,zh:t,onRename:n}){let[r,i]=(0,U.useState)(e.displayName),[a,o]=(0,U.useState)(!1),[s,c]=(0,U.useState)(!1);return(0,W.jsxs)(`form`,{className:`space-y-2`,onSubmit:async t=>{if(t.preventDefault(),!(a||!r.trim())){o(!0),c(!1);try{await n(e,r.trim())}catch{c(!0)}finally{o(!1)}}},children:[(0,W.jsxs)(`label`,{className:`block text-sm text-fg`,children:[t?`设备名称`:`Device name`,(0,W.jsx)(`input`,{value:r,maxLength:80,onChange:e=>i(e.target.value),className:`mt-2 h-10 w-full rounded-lg border border-edge bg-surface-inset px-3 text-fg`})]}),(0,W.jsx)(M,{type:`submit`,variant:`secondary`,disabled:a||!r.trim()||r.trim()===e.displayName,children:a?t?`保存中…`:`Saving…`:t?`保存名称`:`Save name`}),s?(0,W.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:t?`保存失败,请刷新设备信息后重试。`:`Unable to save. Refresh device information and retry.`}):null]})}function we({device:e,zh:t}){let n=e.access?.scopes.includes(`phone.control`)?`control`:e.access?.scopes.includes(`phone.view`)?`view`:`none`,[r,i]=(0,U.useState)(n),[a,s]=(0,U.useState)(!1),[l,u]=(0,U.useState)(!1);return(0,U.useEffect)(()=>i(n),[n]),(0,W.jsxs)(`section`,{className:`space-y-2`,children:[(0,W.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:t?`云手机访问`:`Cloud phone access`}),(0,W.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t?`移动端配对后默认可查看并接管。可在此关闭,或撤销整个设备的授权。`:`Mobile pairing includes viewing and control by default. Disable it here or revoke the device entirely.`}),(0,W.jsxs)(y,{value:r,disabled:a,onChange:async t=>{let n=t.target.value;s(!0),u(!1);try{await c(o(`/api/phone/device-access/${encodeURIComponent(e.id)}`),{method:`PATCH`,body:JSON.stringify({access:n})}),i(n),await j(o(`/api/endpoint-tools/devices`))}catch{u(!0)}finally{s(!1)}},children:[(0,W.jsx)(b,{value:`none`,children:t?`不允许`:`Not allowed`}),(0,W.jsx)(b,{value:`view`,children:t?`仅查看`:`View only`}),(0,W.jsx)(b,{value:`control`,children:t?`查看并接管`:`View and control`})]}),l?(0,W.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:t?`授权保存失败,请重试。`:`Unable to save phone access.`}):null]})}function Te(e){let t=(0,H.c)(19),{onPaired:n}=e,[r,a]=i(),o=s(Ee),c;t[0]===o?c=t[1]:(c=l(o),t[0]=o,t[1]=c);let u=c.endpointToolsSettings.deviceAccess,d;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(d={open:!1},t[2]=d):d=t[2];let[f,p]=(0,U.useState)(d),m,h;t[3]!==r||t[4]!==a?(m=()=>{let e=r.get(`startDevicePairing`);e!==`mobile`&&e!==`browser`||(p({open:!0,target:e}),a(q,{replace:!0}))},h=[r,a],t[3]=r,t[4]=a,t[5]=m,t[6]=h):(m=t[5],h=t[6]),(0,U.useEffect)(m,h);let g,_;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>p({open:!0}),_=(0,W.jsx)(w,{className:`size-4`,"aria-hidden":!0}),t[7]=g,t[8]=_):(g=t[7],_=t[8]);let v;t[9]===u.addDevice?v=t[10]:(v=(0,W.jsxs)(M,{variant:`primary`,onClick:g,children:[_,u.addDevice]}),t[9]=u.addDevice,t[10]=v);let y;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>p(t=>({...t,open:e})),t[11]=y):y=t[11];let b;t[12]!==f.open||t[13]!==f.target||t[14]!==n?(b=(0,W.jsx)(V,{open:f.open,onOpenChange:y,onPaired:n,targetKind:f.target}),t[12]=f.open,t[13]=f.target,t[14]=n,t[15]=b):b=t[15];let x;return t[16]!==v||t[17]!==b?(x=(0,W.jsxs)(W.Fragment,{children:[v,b]}),t[16]=v,t[17]=b,t[18]=x):x=t[18],x}function q(e){let t=new URLSearchParams(e);return t.delete(`startDevicePairing`),t}function Ee(e){return e.language}var De=5e3,J=20,Oe=20;function Y(e){return e===`online`||e===`succeeded`?`bg-success-soft text-success`:e===`running`?`bg-accent-soft text-accent-fg`:e===`failed`||e===`revoked`?`bg-danger-soft text-danger`:`bg-surface-hover text-fg-muted`}function ke(e){let t=(0,H.c)(5),{status:n,label:r}=e,i;t[0]===n?i=t[1]:(i=D(`rounded-full px-2 py-0.5 text-xs font-medium`,Y(n)),t[0]=n,t[1]=i);let a;return t[2]!==r||t[3]!==i?(a=(0,W.jsx)(`span`,{className:i,children:r}),t[2]=r,t[3]=i,t[4]=a):a=t[4],a}function X(){let e=s(e=>e.language),t=l(e).endpointToolsSettings,[n,r]=i(),a=n.get(`view`)===`activity`?`activity`:`devices`,[o,c]=(0,U.useState)(null),[u,d]=(0,U.useState)([]),[f,p]=(0,U.useState)(!1),[m,h]=(0,U.useState)(!1),[y,b]=(0,U.useState)(``),[w,te]=(0,U.useState)(`active`),[O,k]=(0,U.useState)(``),[j,ne]=(0,U.useState)(1),[N,V]=(0,U.useState)(()=>new Set),[H,de]=(0,U.useState)(``),[pe]=L(H,250),[me,he]=(0,U.useState)(``),[ge,Se]=(0,U.useState)(``),[K,Ce]=(0,U.useState)(``),[we,q]=(0,U.useState)(1),Ee={page:we,pageSize:Oe,query:pe,principalId:me,status:ge,effect:K},Y=A(B(),ae,{refreshInterval:De}),X=A(a===`activity`?oe(Ee):null,()=>re(Ee),{refreshInterval:De,keepPreviousData:!0}),Ae=(0,U.useMemo)(()=>new Intl.DateTimeFormat(e===`zh`?`zh-CN`:`en`,{dateStyle:`medium`,timeStyle:`short`}),[e]);if(Y.isLoading&&!Y.data)return(0,W.jsx)(se,{children:(0,W.jsx)(R,{sections:2})});let Z=Y.data??[],je=X.data?.items??[],Me=Z.filter(e=>G(e)===`online`).length,Ne=Z.filter(e=>G(e)!==`revoked`).length,Pe=Z.filter(e=>ve(e)).length,Fe=[...new Set(Z.map(e=>e.platform))].toSorted(),Q=ye(Z,{query:y,status:w,platform:O}),Ie=Math.max(1,Math.ceil(Q.length/J)),$=Math.min(j,Ie),Le=Q.slice(($-1)*J,$*J),Re=Le.reduce((e,t)=>(G(t)!==`revoked`&&e.push(t.id),e),[]),ze=Re.length>0&&Re.every(e=>N.has(e)),Be=e=>{r(t=>{let n=new URLSearchParams(t);return e===`devices`?n.delete(`view`):n.set(`view`,e),n},{replace:!0})},Ve=async()=>{await Promise.all([Y.mutate(),a===`activity`?X.mutate():Promise.resolve()])},He=async()=>{if(!(u.length===0||f)){p(!0),h(!1);try{await ie(u.map(e=>e.id)),d([]),V(new Set),await Y.mutate()}catch{h(!0)}finally{p(!1)}}},Ue=e=>{e(),ne(1),V(new Set)};return(0,W.jsxs)(se,{children:[(0,W.jsx)(ce,{title:t.title,subtitle:t.subtitle,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(I,{className:`size-9 shrink-0 p-0`,label:t.refresh,onClick:Ve}),(0,W.jsx)(Te,{onPaired:()=>void Y.mutate()})]})}),Y.error||X.error?(0,W.jsx)(`div`,{className:`rounded-xl bg-danger-soft px-4 py-3 text-sm text-danger`,children:t.loadError}):null,(0,W.jsx)(`div`,{className:`grid gap-3 sm:grid-cols-3`,children:[{label:t.activeDevices,value:Ne,filter:`active`},{label:t.onlineDevices,value:Me,filter:`online`},{label:t.staleDevices,value:Pe,filter:`stale`}].map(({label:e,value:t,filter:n})=>(0,W.jsxs)(`button`,{type:`button`,className:D(`touch-target rounded-xl px-4 py-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,w===n?`bg-surface-active`:`bg-surface-hover/20 hover:bg-surface-hover/50`),"aria-pressed":w===n,onClick:()=>{Ue(()=>te(n)),Be(`devices`)},children:[(0,W.jsx)(`span`,{className:`text-xs text-fg-muted`,children:e}),(0,W.jsx)(`span`,{className:`mt-1 block text-2xl font-semibold text-fg`,children:t})]},n))}),(0,W.jsx)(P,{items:[{id:`devices`,label:t.devicesTab,icon:C,count:Ne},{id:`activity`,label:t.activityTab,icon:g,count:X.data?.total}],activeTab:a,onChange:Be,ariaLabel:t.viewsAria,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`}),(0,W.jsxs)(le,{id:`devices`,activeTab:a,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`,title:t.devicesTitle,hint:t.devicesHint,children:[(0,W.jsx)(fe,{devices:Z,zh:e===`zh`}),(0,W.jsxs)(`div`,{className:`mb-4 grid gap-2 sm:grid-cols-[minmax(0,1fr)_11rem_11rem]`,children:[(0,W.jsxs)(`label`,{className:`relative block`,children:[(0,W.jsx)(`span`,{className:`sr-only`,children:t.searchDevices}),(0,W.jsx)(T,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,W.jsx)(`input`,{type:`search`,"aria-label":t.searchDevices,value:y,placeholder:t.searchDevices,className:`h-10 w-full rounded-lg border border-edge bg-surface-inset pl-9 pr-3 text-base text-fg placeholder:text-fg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:text-sm`,onChange:e=>Ue(()=>b(e.target.value))})]}),(0,W.jsx)(x,{value:w,options:[{value:`active`,label:t.filterActive},{value:`online`,label:t.status.online},{value:`offline`,label:t.status.offline},{value:`stale`,label:t.filterStale},{value:`revoked`,label:t.status.revoked},{value:`all`,label:t.filterAll}],placeholder:t.statusLabel,allowEmpty:!1,ariaLabel:t.statusLabel,onChange:e=>Ue(()=>te(e))}),(0,W.jsx)(x,{value:O,options:Fe.map(e=>({value:e,label:e})),placeholder:t.allPlatforms,emptyLabel:t.allPlatforms,ariaLabel:t.platformLabel,onChange:e=>Ue(()=>k(e))})]}),N.size>0?(0,W.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center justify-between gap-3 rounded-xl bg-accent-soft px-3 py-2`,children:[(0,W.jsx)(`p`,{className:`text-sm font-medium text-accent-fg`,children:t.selectedCount.replace(`{{count}}`,String(N.size))}),(0,W.jsxs)(M,{variant:`secondary`,className:`text-danger`,onClick:()=>{h(!1),d(Z.filter(e=>N.has(e.id)))},children:[(0,W.jsx)(ee,{className:`size-4`,"aria-hidden":!0}),t.removeSelected]})]}):null,Z.length===0?(0,W.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noDevices}):Q.length===0?(0,W.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noMatchingDevices}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`flex min-h-10 items-center gap-3 border-b border-edge-subtle px-1`,children:(0,W.jsxs)(`label`,{className:D(`touch-target flex items-center gap-2 text-xs text-fg-muted`,Re.length>0?`cursor-pointer`:`cursor-not-allowed opacity-50`),children:[(0,W.jsx)(`input`,{type:`checkbox`,"aria-label":t.selectPage,checked:ze,disabled:Re.length===0,className:`size-4 accent-accent`,onChange:e=>{V(t=>{let n=new Set(t);for(let t of Re)e.target.checked?n.add(t):n.delete(t);return n})}}),t.selectPage]})}),(0,W.jsx)(`ul`,{className:`divide-y divide-edge-subtle`,children:Le.map(e=>{let n=G(e),r=e.kind===`mobile`?E:S;return(0,W.jsxs)(`li`,{className:`flex items-center gap-3`,children:[(0,W.jsx)(`label`,{className:D(`touch-target flex size-10 shrink-0 items-center justify-center`,n===`revoked`?`cursor-not-allowed opacity-40`:`cursor-pointer`),children:(0,W.jsx)(`input`,{type:`checkbox`,checked:N.has(e.id),disabled:n===`revoked`,"aria-label":t.selectDevice.replace(`{{name}}`,e.displayName),className:`size-4 accent-accent`,onChange:t=>{V(n=>{let r=new Set(n);return t.target.checked?r.add(e.id):r.delete(e.id),r})}})}),(0,W.jsxs)(`button`,{type:`button`,className:`touch-target flex min-w-0 flex-1 items-center gap-3 py-3 text-left hover:bg-surface-hover/50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>c(e),children:[(0,W.jsx)(`span`,{className:`flex size-9 shrink-0 items-center justify-center rounded-lg bg-surface-inset text-fg-muted`,children:(0,W.jsx)(r,{className:`size-4`,"aria-hidden":!0})}),(0,W.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,W.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,W.jsx)(`span`,{className:`truncate text-sm font-medium text-fg`,children:e.displayName}),(0,W.jsx)(ke,{status:n,label:t.status[n]})]}),(0,W.jsxs)(`span`,{className:`mt-1 block text-xs text-fg-muted`,children:[e.platform,` · `,be(e.id),` · `,t.lastSeen,`: `,e.lastSeenAt?Ae.format(e.lastSeenAt):t.never]})]}),(0,W.jsx)(`span`,{className:`hidden shrink-0 text-right text-xs text-fg-muted sm:block`,children:t.endpointSummary.replace(`{{endpoints}}`,String(e.endpoints.length)).replace(`{{tools}}`,String(_e(e)))}),(0,W.jsx)(v,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0})]})]},e.id)})}),(0,W.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 border-t border-edge-subtle pt-3`,children:[(0,W.jsx)(`p`,{className:`text-xs text-fg-muted`,children:t.paginationSummary.replace(`{{from}}`,String(($-1)*J+1)).replace(`{{to}}`,String(Math.min($*J,Q.length))).replace(`{{total}}`,String(Q.length))}),(0,W.jsxs)(`div`,{className:`flex gap-2`,children:[(0,W.jsx)(M,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.previousPage,disabled:$<=1,onClick:()=>ne(e=>Math.max(1,e-1)),children:(0,W.jsx)(_,{className:`size-4`,"aria-hidden":!0})}),(0,W.jsx)(M,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.nextPage,disabled:$>=Ie,onClick:()=>ne(e=>Math.min(Ie,e+1)),children:(0,W.jsx)(v,{className:`size-4`,"aria-hidden":!0})})]})]})]})]}),(0,W.jsxs)(le,{id:`activity`,activeTab:a,tabIdPrefix:`endpoint-management-tab`,panelIdPrefix:`endpoint-management-panel`,title:t.callsTitle,hint:t.callsHint,children:[(0,W.jsxs)(`div`,{className:`mb-4 grid gap-2 sm:grid-cols-2 lg:grid-cols-4`,children:[(0,W.jsxs)(`label`,{className:`relative block sm:col-span-2 lg:col-span-1`,children:[(0,W.jsx)(`span`,{className:`sr-only`,children:t.searchActivity}),(0,W.jsx)(T,{className:`pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-fg-subtle`,"aria-hidden":!0}),(0,W.jsx)(`input`,{type:`search`,"aria-label":t.searchActivity,value:H,placeholder:t.searchActivity,className:`h-10 w-full rounded-lg border border-edge bg-surface-inset pl-9 pr-3 text-base text-fg placeholder:text-fg-subtle focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent sm:text-sm`,onChange:e=>{de(e.target.value),q(1)}})]}),(0,W.jsx)(x,{value:me,options:Z.map(e=>({value:e.id,label:`${e.displayName} · ${be(e.id)}`})),placeholder:t.allDevices,emptyLabel:t.allDevices,ariaLabel:t.deviceLabel,onChange:e=>{he(e),q(1)}}),(0,W.jsx)(x,{value:ge,options:[{value:`running`,label:t.status.running},{value:`succeeded`,label:t.status.succeeded},{value:`failed`,label:t.status.failed}],placeholder:t.allStatuses,emptyLabel:t.allStatuses,ariaLabel:t.statusLabel,onChange:e=>{Se(e),q(1)}}),(0,W.jsx)(x,{value:K,options:[{value:`read`,label:t.effects.read},{value:`write`,label:t.effects.write},{value:`destructive`,label:t.effects.destructive}],placeholder:t.allEffects,emptyLabel:t.allEffects,ariaLabel:t.effectLabel,onChange:e=>{Ce(e),q(1)}})]}),X.isLoading&&!X.data?(0,W.jsx)(R,{sections:1}):null,je.length===0&&!X.isLoading?(0,W.jsx)(`p`,{className:`text-sm text-fg-muted`,children:t.noMatchingCalls}):null,(0,W.jsx)(`div`,{className:`space-y-2`,children:je.map(n=>(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 rounded-lg bg-surface-base/55 px-3 py-2.5`,children:[(0,W.jsxs)(`div`,{className:`min-w-0`,children:[(0,W.jsx)(`p`,{className:`break-all text-sm font-medium text-fg`,children:n.toolName}),(0,W.jsxs)(`p`,{className:`mt-0.5 text-xs text-fg-muted`,children:[Ae.format(n.startedAt),` · `,t.effects[n.effect],` · `,n.endpointId]}),n.errorMessage?(0,W.jsx)(`p`,{className:`mt-1 text-xs text-danger`,children:n.errorMessage}):null]}),(0,W.jsxs)(`div`,{className:`flex max-w-xs flex-col items-end gap-1`,children:[(0,W.jsx)(ke,{status:n.status,label:n.errorCode===`OUTCOME_UNKNOWN`?e===`zh`?`结果未知`:`Outcome unknown`:t.status[n.status]}),n.operationId&&n.toolName.startsWith(`provider_`)&&n.errorCode===`OUTCOME_UNKNOWN`?(0,W.jsx)(ue,{operationId:n.operationId,zh:e===`zh`}):null]})]},n.id))}),X.data&&X.data.total>0?(0,W.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3 border-t border-edge-subtle pt-3`,children:[(0,W.jsx)(`p`,{className:`text-xs text-fg-muted`,children:t.paginationSummary.replace(`{{from}}`,String((X.data.page-1)*X.data.pageSize+1)).replace(`{{to}}`,String(Math.min(X.data.page*X.data.pageSize,X.data.total))).replace(`{{total}}`,String(X.data.total))}),(0,W.jsxs)(`div`,{className:`flex gap-2`,children:[(0,W.jsx)(M,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.previousPage,disabled:X.data.page<=1,onClick:()=>q(e=>Math.max(1,e-1)),children:(0,W.jsx)(_,{className:`size-4`,"aria-hidden":!0})}),(0,W.jsx)(M,{variant:`ghost`,className:`size-9 p-0`,"aria-label":t.nextPage,disabled:X.data.page>=X.data.totalPages,onClick:()=>q(e=>Math.min(X.data.totalPages,e+1)),children:(0,W.jsx)(v,{className:`size-4`,"aria-hidden":!0})})]})]}):null]}),(0,W.jsx)(xe,{device:o,busy:f,onRename:async(e,t)=>{await z(e.id,t,e.settingsRevision??0);let n=await Y.mutate();c(n?.find(t=>t.id===e.id)??null)},onClose:()=>c(null),onRevoke:e=>{c(null),h(!1),d([e])}}),(0,W.jsx)(F,{open:u.length>0,title:u.length>1?t.removeManyTitle:t.removeTitle,description:`${u.length>1?t.removeManyDescription.replace(`{{count}}`,String(u.length)):t.removeDescription.replace(`{{name}}`,u[0]?.displayName??``)}${m?`\n\n${t.revokeError}`:``}`,confirmLabel:f?t.revoking:t.removeDevice,cancelLabel:t.cancel,destructive:!0,onConfirm:()=>void He(),onCancel:()=>{f||d([])}})]})}export{X as EndpointToolsManagementSettings};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/block-editor-CYobheuw.js","assets/rolldown-runtime-aKtaBQYM.js","assets/vendor-react-BOUWij0V.js","assets/locale-store-BYdvIuPj.js","assets/messages-lc5BjBtX.js","assets/unlink-NsCMuCT1.js","assets/createLucideIcon-DPHK1VkS.js","assets/check-DUBLcKHA.js","assets/copy-Dv6d4Dvw.js","assets/external-link-DjqjBmc3.js","assets/notes-api-auhtw3zM.js","assets/dist-DlirbHVs.js","assets/es2015-CFqg57eW.js","assets/dist-CDSvxjOh.js","assets/download-Dk-ZjtO6.js","assets/markdown-view-BOJVaGPC.js","assets/marked.esm-8VXEA2AD.js","assets/chunk-KS7C4IRE-DIIvxCDx.js","assets/preload-helper-Czpn1I53.js","assets/file-image-CDUPkZvG.js","assets/plus-Q2yW6OE7.js","assets/x-B_N4OPjy.js","assets/cn-0WouolD0.js","assets/bundle-mjs-rHxsej31.js","assets/app-link-Ji4uewEG.js","assets/product-delivery-4gEqUIsK.js","assets/schemas-CCWMleym.js","assets/copy-to-clipboard-HOJ79TWv.js","assets/xml-_d7dTN2Q.js","assets/mermaid-render-oOellPHt.js","assets/markdown-view-Czi3_WHu.css","assets/chat-chart-block-DurSfGy2.js","assets/skeleton-DzdOeGYz.js","assets/list-todo-CTVRto8O.js","assets/loader-circle-CifKLtgG.js","assets/mic-CuUb7zc-.js","assets/pause-DuPxgSxk.js","assets/pencil-DmIY3Oa-.js","assets/play-kxZvpBg8.js","assets/undo-2-6IMTwK4M.js","assets/vendor-swr-CdRzEUwF.js","assets/floating-ui.dom-CiMnRY5O.js","assets/linkify-it-BkqEorO0.js","assets/vendor-codemirror-aCQ0FcJT.js","assets/voice-player-store-DipmM7w1.js","assets/playback-coordinator-CWHIf0wr.js","assets/note-image-lightbox-DftbeSZR.js","assets/block-editor-Cvy3D_4T.css","assets/markdown-editor-CjQJ-Nho.js","assets/languages-kF11aUYU.js","assets/chat-page-CK4aWVbI.js","assets/app-window-DXFNqt_0.js","assets/archive-Dz0hferG.js","assets/arrow-left-D880xG-P.js","assets/video-generation-Cec49Jwg.js","assets/arrow-up-D5ZtR1QT.js","assets/product-automation-feedback-ref9gqOW.js","assets/activity-YogQEteU.js","assets/bot-DjLkhyZL.js","assets/circle-check-C23XjkUj.js","assets/circle-pause-CN9jYH2s.js","assets/clock-3-DnrAnuyZ.js","assets/message-square-fVE7Ghj1.js","assets/rotate-ccw-JM1TBLpp.js","assets/rotate-cw-LIg3Am9S.js","assets/sparkles-DHlfQFAF.js","assets/triangle-alert-2JXFNNKU.js","assets/volume-2-BSJhAY97.js","assets/zap-dximCGjy.js","assets/session-manager-C-oe-9_N.js","assets/turn-outcome-BSbEJx8h.js","assets/session-api-eApyRHbI.js","assets/gateway-startup-retry-DCDOl6Oo.js","assets/local-session-drafts-pAAFf-Ad.js","assets/tool-activity-BtJkgjFf.js","assets/attachment-utils-core-BPYdUI6y.js","assets/gateway-realtime-Dzq6_piH.js","assets/gateway-realtime-store-B9CDQ8NO.js","assets/registry-api-DGi-X6j7.js","assets/agents-admin-api-DpfkHNbc.js","assets/gateway-config-swr-BYoBGl6i.js","assets/button-C5tRaJxt.js","assets/automation-api-Cc5X3Q1t.js","assets/earth-C9Z4bTTG.js","assets/chevron-down-ccbiQQz_.js","assets/chevron-right-BweFrslA.js","assets/working-directory-picker-modal-C9hWAPvW.js","assets/file-archive-DanfQJNe.js","assets/interaction-BdhHBbYa.js","assets/form-field-width-DJw_jULe.js","assets/settings-form-draft-Dy10ldo8.js","assets/popover-select-hRG1EzAY.js","assets/dist-BSVQC3i_.js","assets/dist-DSRLZhL9.js","assets/floating-ui.react-dom-Gx6CM22l.js","assets/settings-shell-dialog-layer-BU3UuiJr.js","assets/circle-alert-BEjgurr2.js","assets/send-1f1Ntw6E.js","assets/circle-x-DFsCKeya.js","assets/circle-BoO4YvTx.js","assets/file-tree-utils-DJs1faGv.js","assets/database-CjjeZfRG.js","assets/ellipsis-0k4rZLoy.js","assets/file-code-corner-byQA1VfD.js","assets/file-text-D12HbeVy.js","assets/file-CStvVK2S.js","assets/folder-kanban-CpLlFI1o.js","assets/folder-open-CyzJ19I9.js","assets/folder-CN-pC3XL.js","assets/git-branch-Dh9uxTot.js","assets/globe-DSSGFWFn.js","assets/history-DXH_9jsE.js","assets/key-round-DWbpyU2U.js","assets/laptop-CI3hBVrl.js","assets/link-2-D_ZKYUW7.js","assets/list-checks-BbsExAoq.js","assets/messages-square-BckAJrEW.js","assets/monitor-Af5eAvF7.js","assets/use-generated-media-CLEV4wYC.js","assets/install-connector-dialog-CMh8jhn1.js","assets/secret-input-DsjfQmDn.js","assets/eye-CABVeTq0.js","assets/is-masked-secret-DOkL5b_X.js","assets/connectors-api-Bn2IbtcF.js","assets/electron-env-DHOGevH3.js","assets/oauth-provider-connect-y6-vDWb-.js","assets/cloud-C4-yfnnk.js","assets/models-hub-cache-DvDksW4g.js","assets/oauth-api-BXKG29Kg.js","assets/connection-usage-guide-CydSRk3h.js","assets/connection-usage-BhdQRWgQ.js","assets/paperclip-f1HujQY1.js","assets/pin-off-BMRv-Kxr.js","assets/refresh-cw-BRlGaq2w.js","assets/save-DRDABU--.js","assets/search-DA7gz22f.js","assets/settings-2-D-csvaET.js","assets/settings-uiTATseT.js","assets/shield-check-BU58siTV.js","assets/smartphone-DSSsQFqA.js","assets/square-DMK_fB-3.js","assets/preview-runtime-iJuVSugF.js","assets/use-async-resource-BHFGZCY2.js","assets/workspace-api-_mQWmOZm.js","assets/files-GdwDamkp.js","assets/index.module-Cd9ENXfk.js","assets/trash-2-DusmjVPV.js","assets/user-round-C9jxPhMR.js","assets/share-link-dialog-CB3LkWw8.js","assets/copy-text-row-gqdh0Bg1.js","assets/wrench-DFb4r8bH.js","assets/tasks-CwyNaa-j.js","assets/specialists-xbB3xL9e.js","assets/api-CnOSHyKU.js","assets/session-identity-DRFdxntH.js","assets/new-session-preferences-gb411vZP.js","assets/composer-model-config-control-CrI-u8F_.js","assets/model-selector-DugdMlvi.js","assets/open-capability-settings-DQsmJxI7.js","assets/model-sort-_Tz8s_4N.js","assets/cloud-credits-B-nbtkqv.js","assets/space-api-d4Q4hkEY.js","assets/home-task-actions-DTXb7Gc7.js","assets/capabilities-BfTF_flC.js","assets/capabilities-oihQXc5J.js","assets/right-workspace-store-DsGslCi-.js","assets/phone-workspace-store-Cxk2PJZe.js","assets/workspace-editor-agent-store-BzuNTkZu.js","assets/chat-agents-api-BzuJyysa.js","assets/middleware-Pd0e8Igk.js","assets/composer-payload-handoff-DdHGkHOq.js","assets/voice-input-shortcut-events-DaCuiqoi.js","assets/chunk-D32TOXHM-DQIy-Baq.js","assets/tool-friendly-title-CJVFJ2Ud.js","assets/use-realtime-voice-CvtX2HcA.js","assets/voice-CUfqdnlR.js","assets/composer-notifications-L6u0F2_8.js","assets/activity-store-BCPCuT-6.js","assets/voice-call-context-BM2A4bLz.js","assets/app-chrome-BeB4KgOf.js","assets/page-header-store-BGCCXOOf.js","assets/new-chat-navigation-spnin196.js","assets/loopi-CNtmi9FU.js","assets/loopi-C09I2mNj.css","assets/extension-provider-CyYrgUw-.js","assets/theme-store-nXIuAiQZ.js","assets/extension-message-router-DzBfVl6h.js","assets/agent-avatar-display-KbzBlJ8W.js","assets/skill-wire-pattern-BPpeIcCi.js","assets/composer-handoff-params-DBpzHuNo.js","assets/agent-display-names-Bje7vfSn.js","assets/use-directory-picker-C4p7AgWY.js","assets/confirm-dialog-MHCmEEUZ.js","assets/shares-api-DgYOJV0T.js","assets/dist-DaFr5KMw.js","assets/use-composer-attachments-9nVD0sQ1.js","assets/chevron-left-DqFhpbvK.js","assets/use-file-preview-expanded-BhmEiOkv.js","assets/message-square-plus-XP0tGdlV.js","assets/minimize-2-DtOGrlpo.js","assets/constants-D5Z-mUto.js","assets/sliding-tab-list-CmcrqRzN.js","assets/sliding-indicator-hwz0sx3h.js","assets/file-preview-surface-Cw70pwph.js","assets/command-palette-api-3kNqE3U7.js","assets/skill-list-api-CQUhEUOF.js","assets/skill-api-utils-C7V4JVXM.js","assets/automation-task-card-CjzArAJi.js","assets/automation-display-DaVDNZz8.js","assets/message-circle-Badhj-4D.js","assets/date-picker-DsD7NIm2.js","assets/calendar-days-hw_Y-g-s.js","assets/time-picker-otHjbob1.js","assets/dev-view-store-D_uPX9_R.js","assets/extension-iframe-host-BwMISzWU.js","assets/extension-authoritative-grants-DaA0KXyO.js","assets/runtime-health-zDkHcOZO.js","assets/api-BtngCZrB.js","assets/terminal-panel-store-CNkRP4kf.js","assets/agents-app-path-ciChvpCS.js","assets/use-media-query-ady-FgjK.js","assets/oauth-authorization-window-o6URRos4.js","assets/page-context-draft-B30xEPDh.js","assets/management-api-D739TCBl.js","assets/side-chat-shortcut-BIw-1TTD.js","assets/chat-page-zQeUaawJ.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,i as n,n as r,t as i}from"./vendor-react-BOUWij0V.js";import{t as a}from"./preload-helper-Czpn1I53.js";import{d as o,f as s,t as c}from"./chunk-KS7C4IRE-DIIvxCDx.js";import{f as l,i as u,l as d,n as f,o as p,p as m}from"./locale-store-BYdvIuPj.js";import{t as h}from"./messages-lc5BjBtX.js";import{a as g,c as _,i as v,n as y,o as b,r as x,s as S,t as C}from"./dist-DlirbHVs.js";import{t as w}from"./arrow-down-to-line-C5D8Vt-L.js";import{t as T}from"./arrow-left-D880xG-P.js";import{a as E,c as D,i as O,n as k,o as A,r as j,s as M,t as N}from"./product-automation-feedback-ref9gqOW.js";import{A as P,D as F,L as I,R as L,S as R,T as ee,a as z,c as te,h as ne,i as re,j as ie,l as B,n as ae,o as oe,r as se,t as ce,w as V,x as le}from"./recording-upload-BSyxK34y.js";import{t as ue}from"./check-DUBLcKHA.js";import{t as de}from"./chevron-down-ccbiQQz_.js";import{n as fe,r as pe}from"./popover-select-hRG1EzAY.js";import{t as me}from"./circle-check-C23XjkUj.js";import{t as H}from"./code-xml-DJtYhZUF.js";import{t as U}from"./copy-Dv6d4Dvw.js";import{t as W}from"./download-Dk-ZjtO6.js";import{t as he}from"./ellipsis-0k4rZLoy.js";import{t as ge}from"./external-link-DjqjBmc3.js";import{t as _e}from"./eye-CABVeTq0.js";import{t as ve}from"./file-text-D12HbeVy.js";import{t as ye}from"./history-DXH_9jsE.js";import{C as G,E as be,F as xe,I as Se,O as Ce,S as we,T as Te,_ as Ee,a as De,c as Oe,d as ke,f as Ae,h as je,l as Me,m as Ne,n as Pe,r as Fe,s as Ie,u as Le,w as Re,x as ze}from"./notes-api-auhtw3zM.js";import{t as K}from"./loader-circle-CifKLtgG.js";import{P as Be}from"./markdown-view-BOJVaGPC.js";import{t as Ve}from"./message-circle-Badhj-4D.js";import{t as He}from"./pencil-DmIY3Oa-.js";import{t as Ue}from"./play-kxZvpBg8.js";import{t as We}from"./refresh-cw-BRlGaq2w.js";import{t as Ge}from"./search-DA7gz22f.js";import{t as Ke}from"./sliders-horizontal-DqsYor6I.js";import{t as qe}from"./sparkles-DHlfQFAF.js";import{t as Je}from"./square-pen-B8FsvqNu.js";import{t as Ye}from"./square-DMK_fB-3.js";import{t as Xe}from"./trash-2-DusmjVPV.js";import{t as Ze}from"./upload-rrb46c3c.js";import{t as Qe}from"./x-B_N4OPjy.js";import{t as q}from"./cn-0WouolD0.js";import{t as $e}from"./skeleton-DzdOeGYz.js";import{a as et,o as J,s as tt,t as nt}from"./session-manager-C-oe-9_N.js";import{i as rt}from"./vendor-swr-CdRzEUwF.js";import{o as it,s as at,t as ot}from"./playback-coordinator-CWHIf0wr.js";import{t as Y}from"./button-C5tRaJxt.js";import{t as X}from"./copy-to-clipboard-HOJ79TWv.js";import{r as st}from"./app-chrome-BeB4KgOf.js";import{i as ct}from"./theme-store-nXIuAiQZ.js";import{t as Z}from"./page-header-store-BGCCXOOf.js";import{t as lt}from"./automation-api-Cc5X3Q1t.js";import{t as ut}from"./confirm-dialog-MHCmEEUZ.js";import{b as dt,d as ft,o as pt,s as mt,v as ht}from"./shares-api-DgYOJV0T.js";import{l as gt,m as _t,o as vt,r as yt,t as bt,u as xt}from"./dist-DaFr5KMw.js";import{t as St}from"./oauth-provider-connect-y6-vDWb-.js";import{n as Ct,t as wt}from"./page-context-draft-B30xEPDh.js";import"./note-image-lightbox-DftbeSZR.js";import{t as Tt}from"./page-context-capture-button-BBVJZgU0.js";var Q=e(t(),1),$=i();function Et({projectId:e,compact:t=!1}){let n=f(e=>e.language)===`zh`,r=s(),i=(0,Q.useRef)(null),a=(0,Q.useRef)(null),o=(0,Q.useRef)(null),c=(0,Q.useRef)(!1),[l,u]=(0,Q.useState)(null),[d,p]=(0,Q.useState)(!1),[m,h]=(0,Q.useState)(null),[_,w]=(0,Q.useState)(null);async function T(e){let t=o.current;if(!(!t||c.current)){c.current=!0,u(0),p(!1),h(null);try{e!==void 0&&await le(e);let n=await V();if(n.consentAcknowledgedAt==null){w(n.consentPolicyVersion);return}w(null),t.draft??=await ce(t.file,t.requestId);let i=await R({clientRequestId:t.requestId,contextProjectId:t.projectId,source:`web`,consentPolicyVersion:n.consentPolicyVersion,recordedAt:t.draft.startedAt}),a={...t.draft,serverDiscussionId:i.discussion.id,projectId:t.projectId};await ne(a),await ae(a,i.discussion.id,u,!0,e=>p(e===`verifying`)),await B(t.requestId),o.current=null,r(`/notes/${encodeURIComponent(i.note.id)}`)}catch(e){h(e instanceof Error&&e.message===`Unsupported audio format`?n?`请选择 MP3、M4A、WAV、OGG 或 WebM 音频。`:`Choose an MP3, M4A, WAV, OGG, or WebM file.`:n?`上传未完成,请重试。`:`Upload incomplete. Try again.`)}finally{c.current=!1,u(null),p(!1)}}}let E=n?`上传音频`:`Upload audio`,D=d?n?`正在确认音频`:`Verifying audio`:l===null?E:n?`上传中 ${l}%`:`Uploading ${l}%`;return(0,$.jsxs)(`div`,{className:t?`relative inline-flex`:`flex min-w-0 flex-col`,children:[(0,$.jsx)(`input`,{ref:i,hidden:!0,type:`file`,accept:`audio/mpeg,audio/mp4,audio/wav,audio/x-wav,audio/ogg,audio/webm,.mp3,.m4a,.wav,.ogg,.webm`,onChange:t=>{let r=t.target.files?.[0];if(t.target.value=``,r){if(!r.size||r.size>1073741824){o.current=null,h(n?`请选择小于或等于 1 GiB 的非空音频。`:`Choose a non-empty audio file up to 1 GiB.`);return}o.current={file:r,requestId:crypto.randomUUID(),projectId:e},T()}}}),(0,$.jsxs)(`button`,{ref:a,type:`button`,"aria-label":D,title:E,disabled:l!==null,className:`inline-flex items-center gap-3 text-left hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:opacity-60 ${t?`size-11 shrink-0 justify-center rounded-lg text-fg-muted`:`min-h-20 flex-1 rounded-xl border border-edge bg-surface-panel p-4 text-sm font-semibold text-fg`}`,onClick:()=>i.current?.click(),children:[l===null?(0,$.jsx)(Ze,{className:t?`size-4`:`size-5 shrink-0 text-fg-muted`,"aria-hidden":!0}):(0,$.jsx)(K,{className:`size-4 shrink-0 animate-spin`,"aria-hidden":!0}),t?(0,$.jsx)(`span`,{className:`sr-only`,role:`status`,children:D}):(0,$.jsx)(`span`,{role:`status`,children:D})]}),m?(0,$.jsxs)(`div`,{className:`rounded-lg border border-edge bg-surface-panel p-2 text-xs text-danger ${t?`absolute right-0 top-full z-20 w-56 shadow-popover`:`mt-2`}`,children:[(0,$.jsx)(`span`,{role:`alert`,children:m}),o.current?(0,$.jsx)(Y,{variant:`ghost`,onClick:()=>void T(),children:n?`重试`:`Retry`}):null]}):null,(0,$.jsx)(C,{open:_!==null,onOpenChange:e=>{!e&&!c.current&&w(null)},children:(0,$.jsxs)(b,{children:[(0,$.jsx)(g,{className:`xopc-dialog-overlay fixed inset-0 z-[90] bg-scrim`}),(0,$.jsxs)(x,{onCloseAutoFocus:e=>{e.preventDefault(),a.current?.focus()},className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[91] w-[min(24rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 rounded-xl border border-edge bg-surface-overlay p-5 text-fg shadow-popover`,children:[(0,$.jsx)(S,{className:`font-semibold`,children:E}),(0,$.jsx)(v,{className:`mt-2 text-sm text-fg-muted`,children:n?`请确认你有权上传此录音,并允许语音服务转写。`:`Confirm you have permission to upload and transcribe this recording.`}),m?(0,$.jsx)(`p`,{role:`alert`,className:`mt-2 text-xs text-danger`,children:m}):null,(0,$.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,$.jsx)(y,{asChild:!0,children:(0,$.jsx)(Y,{disabled:l!==null,children:n?`取消`:`Cancel`})}),(0,$.jsx)(Y,{variant:`primary`,disabled:l!==null,onClick:()=>{_!==null&&T(_)},children:n?`确认上传`:`Confirm upload`})]})]})]})})]})}var Dt=r(),Ot=6e4,kt=36e5,At=864e5;function jt(e){let t=new Date(e);return t.setHours(0,0,0,0),t.getTime()}function Mt(e,t,n){let r=t-e;if(r<Ot)return n.justNow;if(r<kt){let e=Math.floor(r/Ot);return n.minutesAgo.replace(`{{n}}`,String(e))}let i=jt(t);if(e>=i)return n.today+` `+new Date(e).toLocaleTimeString(n.locale,{hour:`2-digit`,minute:`2-digit`});if(e>=i-At)return n.yesterday+` `+new Date(e).toLocaleTimeString(n.locale,{hour:`2-digit`,minute:`2-digit`});if(r<7*At){let e=Math.floor(r/At);return n.daysAgo.replace(`{{n}}`,String(e))}return new Date(e).toLocaleDateString(n.locale,{month:`short`,day:`numeric`})}function Nt(e,t,n){let r=jt(t);if(e>=r)return n.today;if(e>=r-At)return n.yesterday;let i=new Date(e),a=new Date(t);return i.getFullYear()===a.getFullYear()?i.toLocaleDateString(n.locale,{month:`long`,day:`numeric`}):i.toLocaleDateString(n.locale,{year:`numeric`,month:`long`,day:`numeric`})}function Pt(e){let t=new Date(e);return`${t.getFullYear()}-${String(t.getMonth()+1).padStart(2,`0`)}-${String(t.getDate()).padStart(2,`0`)}`}function Ft(e){let t=(0,Dt.c)(45),{title:n,description:r,prompt:i,coverage:a,className:o,variant:c}=e,l=c===void 0?`card`:c,u=f(Rt),d=h(u).automations.suggestions,p=h(u).automations,m=s(),g;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(g={revalidateOnFocus:!1,refreshInterval:15e3},t[0]=g):g=t[0];let{data:_}=rt(a?`automation-suggestion-coverage`:null,Lt,g),v=a?_?.automations.find(e=>O(e,a)):void 0,y=v?k(v,p):[];if(l===`titleAction`){if(v){let e;t[1]===o?e=t[2]:(e=q(`flex min-w-0 items-center gap-2 rounded-lg border border-emerald-500/25 bg-emerald-500/10 px-2.5 py-1.5`,o),t[1]=o,t[2]=e);let n;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(me,{className:`size-3.5 shrink-0 text-emerald-700 dark:text-emerald-300`,"aria-hidden":!0}),t[3]=n):n=t[3];let r;return t[4]===m?r=t[5]:(r=()=>m(`/automations`),t[4]=m,t[5]=r),(0,$.jsxs)(`section`,{className:e,children:[n,(0,$.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium text-fg`,children:d.coveredTitle}),(0,$.jsx)(Y,{variant:`ghost`,className:`h-7 shrink-0 rounded-md px-2 text-xs`,onClick:r,children:d.manage})]})}let e;t[6]===o?e=t[7]:(e=q(`flex min-w-0 items-center gap-2 rounded-lg bg-surface-panel px-2.5 py-1.5 shadow-surface`,o),t[6]=o,t[7]=e);let a;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,$.jsx)(I,{className:`size-3.5 shrink-0 text-accent`,"aria-hidden":!0}),t[8]=a):a=t[8];let s;t[9]!==r||t[10]!==n?(s=(0,$.jsx)(`span`,{className:`min-w-0 truncate text-xs font-medium text-fg`,title:r,children:n}),t[9]=r,t[10]=n,t[11]=s):s=t[11];let c;t[12]!==m||t[13]!==i?(c=()=>{let e=new URLSearchParams({draft:i,autogenerate:`1`});m(`/automations?${e.toString()}`)},t[12]=m,t[13]=i,t[14]=c):c=t[14];let l;return t[15]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,$.jsx)(qe,{className:`size-3.5`,"aria-hidden":!0}),t[15]=l):l=t[15],(0,$.jsxs)(`section`,{className:e,children:[a,s,(0,$.jsxs)(Y,{variant:`secondary`,className:`h-7 shrink-0 rounded-md px-2 text-xs`,onClick:c,children:[l,d.setup]})]})}if(v){let e;t[16]===o?e=t[17]:(e=q(`rounded-lg border border-emerald-500/25 bg-emerald-500/10 p-3`,o),t[16]=o,t[17]=e);let n;t[18]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,$.jsx)(me,{className:`mt-0.5 size-4 shrink-0 text-emerald-700 dark:text-emerald-300`,"aria-hidden":!0}),t[18]=n):n=t[18];let r;t[19]===m?r=t[20]:(r=()=>m(`/automations`),t[19]=m,t[20]=r);let i;return t[21]!==d||t[22]!==r?(i=(0,$.jsx)(`div`,{className:`mt-3 flex justify-end`,children:(0,$.jsx)(Y,{variant:`ghost`,className:`h-8 rounded-md px-2.5 text-xs`,onClick:r,children:d.manage})}),t[21]=d,t[22]=r,t[23]=i):i=t[23],(0,$.jsxs)(`section`,{className:e,children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-2`,children:[n,(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`div`,{className:`text-sm font-semibold text-fg`,children:d.coveredTitle}),(0,$.jsx)(`p`,{className:`mt-1 break-words text-xs leading-5 text-fg-muted`,children:j(d.coveredDescription,{name:v.name})})]})]}),(0,$.jsxs)(`div`,{className:`mt-2 rounded-md bg-surface-base/55 px-2.5 py-2`,children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg`,children:p.explain.whyCovered}),(0,$.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1.5`,children:y.map(It)})]}),i]})}let b;t[24]===o?b=t[25]:(b=q(`rounded-lg bg-surface-panel p-3 shadow-surface`,o),t[24]=o,t[25]=b);let x;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(x=(0,$.jsx)(I,{className:`mt-0.5 size-4 shrink-0 text-accent`,"aria-hidden":!0}),t[26]=x):x=t[26];let S;t[27]===n?S=t[28]:(S=(0,$.jsx)(`div`,{className:`text-sm font-semibold text-fg`,children:n}),t[27]=n,t[28]=S);let C;t[29]===r?C=t[30]:(C=(0,$.jsx)(`p`,{className:`mt-1 break-words text-xs leading-5 text-fg-muted`,children:r}),t[29]=r,t[30]=C);let w;t[31]!==S||t[32]!==C?(w=(0,$.jsxs)(`div`,{className:`flex items-start gap-2`,children:[x,(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[S,C]})]}),t[31]=S,t[32]=C,t[33]=w):w=t[33];let T;t[34]!==m||t[35]!==i?(T=()=>{let e=new URLSearchParams({draft:i,autogenerate:`1`});m(`/automations?${e.toString()}`)},t[34]=m,t[35]=i,t[36]=T):T=t[36];let E;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(qe,{className:`size-3.5`,"aria-hidden":!0}),t[37]=E):E=t[37];let D;t[38]!==d.create||t[39]!==T?(D=(0,$.jsx)(`div`,{className:`mt-3 flex justify-end`,children:(0,$.jsxs)(Y,{variant:`secondary`,className:`h-8 rounded-md px-2.5 text-xs`,onClick:T,children:[E,d.create]})}),t[38]=d.create,t[39]=T,t[40]=D):D=t[40];let A;return t[41]!==D||t[42]!==b||t[43]!==w?(A=(0,$.jsxs)(`section`,{className:b,children:[w,D]}),t[41]=D,t[42]=b,t[43]=w,t[44]=A):A=t[44],A}function It(e){return(0,$.jsx)(`span`,{className:`rounded-full bg-surface-panel px-2 py-0.5 text-xs text-fg-muted`,children:e},e)}function Lt(){return lt.list()}function Rt(e){return e.language}var zt=`z-[140] min-w-44 rounded-lg border border-edge bg-surface-overlay p-1 text-sm text-fg shadow-popover`,Bt=`flex min-h-11 cursor-pointer items-center gap-2 rounded-md px-3 outline-none focus:bg-surface-hover data-[disabled]:pointer-events-none data-[disabled]:opacity-40`;function Vt(e){let t=(0,Dt.c)(54),{detail:n,zh:r,busy:i,processing:a,pageText:o,editing:s,noteActions:c}=e,l=`/api/discussions/${encodeURIComponent(n.discussion.id)}`,d=!!n.discussion.audioAttachmentId&&!n.discussion.audioDeletedAt,f;t[0]!==n.note.id||t[1]!==c||t[2]!==r?(f=c?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`button`,{type:`button`,className:`inline-flex min-h-11 items-center justify-center gap-2 rounded-lg px-3 text-sm text-fg-muted hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent aria-expanded:bg-accent-soft aria-expanded:text-accent-fg aria-expanded:hover:bg-accent-soft`,"aria-expanded":c.chatOpen??!1,"aria-controls":`note-assistant-${n.note.id}`,disabled:c.busy,onClick:c.onChat,children:[(0,$.jsx)(Ve,{className:`size-4`,"aria-hidden":!0}),r?`问这段录音`:`Ask recording`]}),(0,$.jsxs)(`button`,{type:`button`,className:`inline-flex min-h-11 items-center justify-center gap-2 rounded-lg px-3 text-sm text-fg-muted hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":r?`分享笔记`:`Share note`,disabled:c.busy,onClick:c.onShare,children:[(0,$.jsx)(D,{className:`size-4`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:r?`分享`:`Share`})]})]}):null,t[0]=n.note.id,t[1]=c,t[2]=r,t[3]=f):f=t[3];let p=r?`导出笔记`:`Export note`,m;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(W,{className:`size-4`,"aria-hidden":!0}),t[4]=m):m=t[4];let h=r?`导出`:`Export`,g;t[5]===h?g=t[6]:(g=(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:h}),t[5]=h,t[6]=g);let _;t[7]!==p||t[8]!==g?(_=(0,$.jsx)(_t,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,className:`inline-flex min-h-11 items-center justify-center gap-2 rounded-lg px-3 text-sm text-fg-muted hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":p,children:[m,g]})}),t[7]=p,t[8]=g,t[9]=_):_=t[9];let v;t[10]===Symbol.for(`react.memo_cache_sentinel`)?(v=[`md`,`txt`,`srt`],t[10]=v):v=t[10];let y;t[11]!==l||t[12]!==r?(y=v.map(e=>(0,$.jsx)(yt,{asChild:!0,children:(0,$.jsx)(`a`,{className:Bt,href:u(`${l}/export?format=${e}`),download:!0,children:e===`srt`?r?`字幕 · SRT`:`Subtitles · SRT`:e===`md`?`Markdown · MD`:r?`纯文本 · TXT`:`Plain text · TXT`})},e)),t[11]=l,t[12]=r,t[13]=y):y=t[13];let b;t[14]!==d||t[15]!==l||t[16]!==r?(b=d?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(xt,{className:`my-1 h-px bg-edge-subtle`}),(0,$.jsx)(yt,{asChild:!0,children:(0,$.jsxs)(`a`,{className:Bt,href:u(`${l}/audio`),download:!0,children:[(0,$.jsx)(W,{className:`size-4`,"aria-hidden":!0}),r?`下载录音`:`Download recording`]})})]}):null,t[14]=d,t[15]=l,t[16]=r,t[17]=b):b=t[17];let x;t[18]!==y||t[19]!==b?(x=(0,$.jsx)(vt,{children:(0,$.jsxs)(bt,{align:`end`,sideOffset:6,collisionPadding:12,className:zt,children:[y,b]})}),t[18]=y,t[19]=b,t[20]=x):x=t[20];let S;t[21]!==x||t[22]!==_?(S=(0,$.jsxs)(gt,{children:[_,x]}),t[21]=x,t[22]=_,t[23]=S):S=t[23];let C=r?`更多笔记操作`:`More note actions`,w;t[24]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(he,{className:`size-5`,"aria-hidden":!0}),t[24]=w):w=t[24];let T;t[25]===C?T=t[26]:(T=(0,$.jsx)(_t,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,"aria-label":C,className:`inline-flex min-h-11 items-center justify-center gap-2 rounded-lg px-3 text-sm text-fg-muted hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:w})}),t[25]=C,t[26]=T);let E;t[27]!==c||t[28]!==r?(E=c?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(yt,{className:Bt,disabled:c.busy,onSelect:c.onAnalyze,children:[(0,$.jsx)(qe,{className:`size-4`,"aria-hidden":!0}),r?`进一步分析`:`Analyze this note`]}),(0,$.jsxs)(yt,{className:Bt,onSelect:c.onHistory,children:[(0,$.jsx)(ye,{className:`size-4`,"aria-hidden":!0}),r?`版本历史`:`Version history`]})]}):null,t[27]=c,t[28]=r,t[29]=E):E=t[29];let O=n.note.id,k=String(n.note.remoteVersion??1),A;t[30]!==n.note.id||t[31]!==k?(A={kind:`note`,id:O,revision:k},t[30]=n.note.id,t[31]=k,t[32]=A):A=t[32];let j;t[33]===o?j=t[34]:(j={text:o,draft:!1},t[33]=o,t[34]=j);let M=r?`带到新对话`:`Use in a new chat`,N=i||a||s||!o||o.length>16e3,P;t[35]!==A||t[36]!==j||t[37]!==M||t[38]!==N?(P=(0,$.jsx)(`div`,{children:(0,$.jsx)(Tt,{presentation:`menu`,resource:A,selection:j,label:M,disabled:N})}),t[35]=A,t[36]=j,t[37]=M,t[38]=N,t[39]=P):P=t[39];let F;t[40]!==c||t[41]!==r?(F=c?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(xt,{className:`my-1 h-px bg-edge-subtle`}),(0,$.jsxs)(yt,{className:`${Bt} text-danger`,disabled:c.busy,onSelect:c.onDelete,children:[(0,$.jsx)(Xe,{className:`size-4`,"aria-hidden":!0}),r?`删除笔记`:`Delete note`]})]}):null,t[40]=c,t[41]=r,t[42]=F):F=t[42];let I;t[43]!==E||t[44]!==P||t[45]!==F?(I=(0,$.jsx)(vt,{children:(0,$.jsxs)(bt,{align:`end`,sideOffset:6,collisionPadding:12,className:zt,children:[E,P,F]})}),t[43]=E,t[44]=P,t[45]=F,t[46]=I):I=t[46];let L;t[47]!==T||t[48]!==I?(L=(0,$.jsxs)(gt,{children:[T,I]}),t[47]=T,t[48]=I,t[49]=L):L=t[49];let R;return t[50]!==f||t[51]!==S||t[52]!==L?(R=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[f,S,L]}),t[50]=f,t[51]=S,t[52]=L,t[53]=R):R=t[53],R}function Ht(e){let t=(0,Dt.c)(68),{detail:n,template:r,onTemplate:i,zh:a,busy:o,processing:s,onOrganize:c,onRegenerate:l}=e,[u,d]=(0,Q.useState)(!1),f=!!n.discussion.audioAttachmentId&&!n.discussion.audioDeletedAt,p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,$.jsx)(Ke,{className:`size-3.5`,"aria-hidden":!0}),t[0]=p):p=t[0];let m=a?`整理方式`:`Summary settings`,h;t[1]===m?h=t[2]:(h=(0,$.jsx)(_,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,className:`inline-flex min-h-11 items-center gap-2 rounded-lg px-2 text-xs text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,children:[p,m]})}),t[1]=m,t[2]=h);let w;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(g,{className:`fixed inset-0 z-[150] bg-scrim`}),t[3]=w):w=t[3];let T=a?`整理方式`:`Summary settings`,E;t[4]===T?E=t[5]:(E=(0,$.jsx)(S,{className:`font-medium`,children:T}),t[4]=T,t[5]=E);let D=a?`关闭整理设置`:`Close summary settings`,O;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(O=(0,$.jsx)(Qe,{className:`size-4`}),t[6]=O):O=t[6];let k;t[7]===D?k=t[8]:(k=(0,$.jsx)(y,{className:`inline-flex size-11 items-center justify-center rounded-lg hover:bg-surface-hover`,"aria-label":D,children:O}),t[7]=D,t[8]=k);let A;t[9]!==E||t[10]!==k?(A=(0,$.jsxs)(`header`,{className:`flex shrink-0 items-center justify-between border-b border-edge-subtle px-5 py-3`,children:[E,k]}),t[9]=E,t[10]=k,t[11]=A):A=t[11];let j=a?`根据已有原文重新整理纪要。你已手动编辑的内容会保留。`:`Reorganize the existing transcript. Your manual edits are preserved.`,M;t[12]===j?M=t[13]:(M=(0,$.jsx)(v,{className:`text-sm leading-6 text-fg-muted`,children:j}),t[12]=j,t[13]=M);let N=a?`纪要模板`:`Summary template`,P;t[14]===N?P=t[15]:(P=(0,$.jsx)(`span`,{children:N}),t[14]=N,t[15]=P);let F=a?`纪要模板`:`Summary template`,I;t[16]===i?I=t[17]:(I=e=>i(e.target.value),t[16]=i,t[17]=I);let L=a?`通用会议`:`General`,R;t[18]===L?R=t[19]:(R=(0,$.jsx)(pe,{value:`general`,children:L}),t[18]=L,t[19]=R);let ee=a?`项目例会`:`Project`,z;t[20]===ee?z=t[21]:(z=(0,$.jsx)(pe,{value:`project`,children:ee}),t[20]=ee,t[21]=z);let te=a?`需求评审`:`Review`,ne;t[22]===te?ne=t[23]:(ne=(0,$.jsx)(pe,{value:`review`,children:te}),t[22]=te,t[23]=ne);let re=a?`客户访谈`:`Interview`,ie;t[24]===re?ie=t[25]:(ie=(0,$.jsx)(pe,{value:`interview`,children:re}),t[24]=re,t[25]=ie);let B;t[26]!==F||t[27]!==I||t[28]!==R||t[29]!==z||t[30]!==ne||t[31]!==ie||t[32]!==r?(B=(0,$.jsxs)(fe,{value:r,"aria-label":F,onChange:I,children:[R,z,ne,ie]}),t[26]=F,t[27]=I,t[28]=R,t[29]=z,t[30]=ne,t[31]=ie,t[32]=r,t[33]=B):B=t[33];let ae;t[34]!==P||t[35]!==B?(ae=(0,$.jsxs)(`label`,{className:`block space-y-2 text-sm`,children:[P,B]}),t[34]=P,t[35]=B,t[36]=ae):ae=t[36];let oe;t[37]!==f||t[38]!==o||t[39]!==n.discussion.status||t[40]!==l||t[41]!==s||t[42]!==a?(oe=f&&[`completed`,`needs_attention`].includes(n.discussion.status)?(0,$.jsxs)(`details`,{className:`border-t border-edge-subtle pt-3`,children:[(0,$.jsx)(`summary`,{className:`min-h-11 cursor-pointer text-sm text-fg-muted`,children:a?`高级选项:重新识别录音`:`Advanced: transcribe again`}),(0,$.jsx)(`p`,{className:`mb-3 text-xs leading-5 text-fg-muted`,children:a?`重新处理原音,可能耗时较长。适用于原文缺失或识别不完整。`:`Process the original recording again when text is missing or incomplete. This may take longer.`}),(0,$.jsx)(Y,{disabled:o||s,onClick:()=>{d(!1),l()},children:a?`从原音重新生成`:`Regenerate from audio`})]}):null,t[37]=f,t[38]=o,t[39]=n.discussion.status,t[40]=l,t[41]=s,t[42]=a,t[43]=oe):oe=t[43];let se;t[44]!==M||t[45]!==ae||t[46]!==oe?(se=(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-5 overflow-y-auto p-5`,children:[M,ae,oe]}),t[44]=M,t[45]=ae,t[46]=oe,t[47]=se):se=t[47];let ce=a?`取消`:`Cancel`,V;t[48]===ce?V=t[49]:(V=(0,$.jsx)(y,{asChild:!0,children:(0,$.jsx)(Y,{children:ce})}),t[48]=ce,t[49]=V);let le=o||s||!n.discussion.canonicalTranscript,ue;t[50]===c?ue=t[51]:(ue=()=>{d(!1),c()},t[50]=c,t[51]=ue);let de;t[52]===Symbol.for(`react.memo_cache_sentinel`)?(de=(0,$.jsx)(We,{className:`size-4`,"aria-hidden":!0}),t[52]=de):de=t[52];let me=a?`重新整理纪要`:`Regenerate summary`,H;t[53]!==le||t[54]!==ue||t[55]!==me?(H=(0,$.jsxs)(Y,{variant:`primary`,disabled:le,onClick:ue,children:[de,me]}),t[53]=le,t[54]=ue,t[55]=me,t[56]=H):H=t[56];let U;t[57]!==V||t[58]!==H?(U=(0,$.jsxs)(`footer`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge-subtle p-4`,children:[V,H]}),t[57]=V,t[58]=H,t[59]=U):U=t[59];let W;t[60]!==A||t[61]!==se||t[62]!==U?(W=(0,$.jsxs)(b,{children:[w,(0,$.jsxs)(x,{className:`fixed left-1/2 top-1/2 z-[151] flex h-[min(28rem,90dvh)] w-[min(30rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay text-fg`,children:[A,se,U]})]}),t[60]=A,t[61]=se,t[62]=U,t[63]=W):W=t[63];let he;return t[64]!==u||t[65]!==h||t[66]!==W?(he=(0,$.jsxs)(C,{open:u,onOpenChange:d,children:[h,W]}),t[64]=u,t[65]=h,t[66]=W,t[67]=he):he=t[67],he}function Ut(e){return JSON.stringify([e.transcript.revision,e.transcript.segments.map(e=>[e.sequence,e.revision,e.status]),e.organization?.revision])}function Wt(e,t,n,r){let i=(0,Dt.c)(27),a=r!==void 0&&r,[o,s]=(0,Q.useState)(),c;i[0]!==n||i[1]!==a||i[2]!==t||i[3]!==e||i[4]!==o?(c=()=>{!a&&t&&(o?.noteId!==e||o.version!==Ut(t))&&(o?.noteId===e&&n(),s({noteId:e,version:Ut(t),value:t}))},i[0]=n,i[1]=a,i[2]=t,i[3]=e,i[4]=o,i[5]=c):c=i[5];let l=o?.noteId,u=o?.version,d;i[6]!==n||i[7]!==a||i[8]!==t||i[9]!==e||i[10]!==l||i[11]!==u?(d=[e,t,l,u,n,a],i[6]=n,i[7]=a,i[8]=t,i[9]=e,i[10]=l,i[11]=u,i[12]=d):d=i[12],(0,Q.useLayoutEffect)(c,d);let f;i[13]!==n||i[14]!==t||i[15]!==e?(f=r=>{let i=r===void 0?t:r;i&&(n(),s({noteId:e,version:Ut(i),value:i}))},i[13]=n,i[14]=t,i[15]=e,i[16]=f):f=i[16];let p=f,m=o?.noteId===e?o:void 0,h;i[17]!==m||i[18]!==t?(h=!!t&&!!m&&m.version!==Ut(t),i[17]=m,i[18]=t,i[19]=h):h=i[19];let g=h,_;i[20]!==m||i[21]!==t?(_=t&&m?{...t,transcript:m.value.transcript,organization:m.value.organization}:t,i[20]=m,i[21]=t,i[22]=_):_=i[22];let v=_,y;return i[23]!==v||i[24]!==g||i[25]!==p?(y={detail:v,hasUpdates:g,publish:p},i[23]=v,i[24]=g,i[25]=p,i[26]=y):y=i[26],y}function Gt(e){let t=(0,Q.useRef)(null),n=(0,Q.useCallback)(()=>{let n=e.current;if(!n||t.current)return;let r=n.getBoundingClientRect().top;t.current={scrollTop:n.scrollTop,anchors:n.scrollTop<=0?[]:Array.from(n.querySelectorAll(`[data-reading-anchor]`)).filter(e=>e.getBoundingClientRect().bottom>r).map(e=>({key:e.dataset.readingAnchor,top:e.getBoundingClientRect().top-r}))}},[e]);return(0,Q.useLayoutEffect)(()=>{let n=t.current,r=e.current;if(t.current=null,!n||!r)return;let i=new Map(Array.from(r.querySelectorAll(`[data-reading-anchor]`)).map(e=>[e.dataset.readingAnchor,e])),a=n.anchors.find(e=>i.has(e.key));r.scrollTop=a?r.scrollTop+i.get(a.key).getBoundingClientRect().top-r.getBoundingClientRect().top-a.top:n.scrollTop}),n}var Kt=e=>`${Math.floor(e/6e4)}:${String(Math.floor(e/1e3)%60).padStart(2,`0`)}`;function qt({id:e,query:t,zh:n,refreshKey:r,sourceKey:i,active:a,tab:o,onEvidence:s,onPlay:c}){let[l,d]=(0,Q.useState)(),f=(0,Q.useRef)(null),m=Gt(f),h=(0,Q.useRef)(null),g=(0,Q.useRef)(!1),[_,v]=(0,Q.useState)(!0),[y,b]=(0,Q.useState)(``),[x,S]=(0,Q.useState)(!1),C=(0,Q.useRef)(0),[w,T]=(0,Q.useState)(),[E,D]=(0,Q.useState)(),[O,k]=(0,Q.useState)(``),[A,j]=(0,Q.useState)(0),M=JSON.stringify([e,i,t]),N=t?``:r;(0,Q.useEffect)(()=>{if(!a||t)return;let e=window.setInterval(()=>j(e=>e+1),3e3);return()=>window.clearInterval(e)},[a,t]),(0,Q.useEffect)(()=>{D(void 0)},[e,t]),(0,Q.useEffect)(()=>{let n=++C.current,r=new AbortController;v(!0),S(!1),b(``);let i=g.current;g.current=!1;let a=window.setTimeout(()=>{p(u(`/api/discussions/${encodeURIComponent(e)}/review?q=${encodeURIComponent(t)}`),{signal:r.signal}).then(async a=>{if(C.current!==n)return;let o=h.current;if(!i&&o?.key===M){if(o.value.version===a.version)return;let i=o.value.hits.length;for(;a.hasMore&&a.hits.length<i;){let i=await p(u(`/api/discussions/${encodeURIComponent(e)}/review?q=${encodeURIComponent(t)}&offset=${a.hits.length}&version=${encodeURIComponent(a.version)}`),{signal:r.signal});if(C.current!==n)return;if(i.version!==a.version||!i.hits.length)throw Error(`Review changed during refresh`);a={...i,offset:0,hits:[...a.hits,...i.hits]}}m()}h.current={key:M,value:a},d(a),T(M),k(t)}).catch(e=>{C.current===n&&!r.signal.aborted&&b(String(e))}).finally(()=>{C.current===n&&v(!1)})},t?200:0);return()=>{C.current++,r.abort(),window.clearTimeout(a)}},[e,t,N,i,M,A,m]);function P(){g.current=!0,j(e=>e+1)}async function F(){if(!l||x)return;let r=C.current;S(!0);try{let n=await p(u(`/api/discussions/${encodeURIComponent(e)}/review?q=${encodeURIComponent(t)}&offset=${l.hits.length}&version=${l.version}`));if(r===C.current){let e={...n,hits:[...l.hits,...n.hits]};h.current={key:M,value:e},d(e)}}catch(e){r===C.current&&b(n?`内容已变化,请重新搜索。${String(e)}`:`Content changed; search again. ${String(e)}`)}finally{r===C.current&&S(!1)}}function I(e){D(e),(!e.provisional||e.kind===`chapter`)&&e.transcriptRevision!==void 0&&e.segments.length&&s({transcriptRevision:e.transcriptRevision,stale:e.stale,audioAvailable:l?.coverage.audioAvailable??!1,timingVerified:e.segments.some(e=>e.playback.length>0),segments:e.segments})}let L=e=>e.kind===`chapter`?n?`章节`:`Chapter`:e.kind===`annotation`?n?`我的标记`:`My mark`:e.kind===`analysis`?n?`分析`:`Analysis`:n?`原文`:`Transcript`,R=e=>(0,$.jsxs)(`article`,{"data-reading-anchor":`review:${e.id}`,className:`space-y-2 rounded-xl bg-surface-inset p-4`,children:[(0,$.jsxs)(`button`,{className:`text-left text-sm text-accent-fg`,onClick:()=>I(e),children:[e.startedAtMs===void 0?``:`${Kt(e.startedAtMs)}${e.endedAtMs===void 0?``:`–${Kt(e.endedAtMs)}`} · `,e.title||L(e)]}),(0,$.jsx)(`p`,{className:`whitespace-pre-wrap text-sm`,children:e.kind===`chapter`&&!t&&e.text.length>300?`${e.text.slice(0,300)}…`:e.text}),(0,$.jsxs)(`p`,{className:`text-xs text-fg-muted`,children:[L(e),e.provisional?n?` · 阶段性结果`:` · Partial result`:``,e.stale?n?` · 原文已更新,保留旧版依据`:` · Earlier transcript revision`:``,e.kind===`chapter`?` · ${e.highlightCount??0} ${n?`个重点`:`marks`} · ${e.actionCount??0} ${n?`个候选行动`:`candidate actions`}`:``]}),e.kind!==`chapter`||t||E?.id===e.id?e.segments.map(e=>(0,$.jsxs)(`p`,{className:`text-xs text-fg-muted`,children:[Kt(e.startedAtMs),` · `,e.text.length>500?`${e.text.slice(0,500)}…`:e.text]},`${e.sequence}:${e.startedAtMs}`)):null,e.playback.slice(0,3).map((e,t)=>(0,$.jsxs)(Y,{onClick:()=>c(e.startedAtMs,e.endedAtMs),children:[n?`回听上下文`:`Play context`,` `,Kt(e.startedAtMs),`–`,Kt(e.endedAtMs)]},t)),e.segments.length?(0,$.jsx)(Y,{onClick:()=>I(e),children:n?`查看对应原文`:`View transcript`}):(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:n?`暂无可核实的原文定位`:`No verified transcript reference`})]},e.id);return(0,$.jsxs)(`section`,{ref:e=>{f.current=e?.closest(`main`)??e},"aria-label":n?`长录音回顾`:`Recording review`,className:`flex flex-col gap-3`,children:[y?(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:y}),(0,$.jsx)(Y,{onClick:P,children:n?`刷新结果`:`Refresh results`})]}):null,_&&(!l||w!==M||O!==t)?(0,$.jsx)($e,{className:`h-20 w-full`}):null,l&&w===M&&(!t||O===t)?(0,$.jsxs)($.Fragment,{children:[t?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`h3`,{className:`text-sm font-medium`,children:n?`搜索结果 · ${l.total}`:`Search results · ${l.total}`}),(0,$.jsx)(Y,{onClick:P,children:n?`刷新结果`:`Refresh results`}),(0,$.jsx)(`div`,{"aria-label":n?`命中位置`:`Match positions`,className:`relative my-3 h-5 rounded bg-surface-inset`,children:l.hits.filter(e=>e.startedAtMs!==void 0).map(e=>(0,$.jsx)(`button`,{className:`absolute top-0 h-5 w-1.5 rounded bg-accent`,style:{left:`${Math.min(99,100*e.startedAtMs/Math.max(1,l.coverage.durationMs))}%`},"aria-label":`${Kt(e.startedAtMs)} ${e.title||L(e)}`,onClick:()=>I(e)},e.id))}),l.total?null:(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n?`未找到关键词;尚未转写的内容无法搜索。`:`No matches. Untranscribed audio is not searchable yet.`}),l.hits.map(R)]}):(0,$.jsxs)($.Fragment,{children:[o===`summary`&&l.chapters.length?(0,$.jsxs)(`details`,{className:`rounded-xl bg-surface-inset px-4`,children:[(0,$.jsxs)(`summary`,{className:`min-h-11 cursor-pointer py-3 text-sm font-medium focus-visible:ring-2 focus-visible:ring-accent`,children:[n?`章节目录`:`Chapters`,` · `,l.chapters.length]}),(0,$.jsx)(`div`,{className:`space-y-3 pb-4`,children:l.chapters.map(R)})]}):null,l.hits.length?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`h3`,{className:`text-sm font-medium`,children:n?`本轮已完成转写(阶段性)`:`Available transcription from this run`}),l.hits.map(R)]}):null]}),l.hasMore?(0,$.jsx)(Y,{disabled:x,onClick:()=>void F(),children:n?`加载更多结果`:`More results`}):null,(0,$.jsxs)(`details`,{className:`rounded-lg text-xs text-fg-muted`,children:[(0,$.jsx)(`summary`,{className:`min-h-11 cursor-pointer py-3 focus-visible:ring-2 focus-visible:ring-accent`,children:n?`处理范围`:`Processing coverage`}),(0,$.jsxs)(`div`,{role:`status`,className:`space-y-2 pb-3 leading-5`,children:[(0,$.jsxs)(`p`,{children:[n?`原音`:`Audio`,` · `,l.coverage.audioAvailable?n?`已保存,可回听`:`Saved, ready to play`:n?`尚不可用`:`Unavailable`]}),(0,$.jsxs)(`p`,{children:[n?`本轮转写已处理`:`Processed this run`,` `,Kt(l.coverage.processedMs),` / `,Kt(l.coverage.durationMs),` · `,n?`连续处理至`:`Continuous through`,` `,Kt(l.coverage.continuousThroughMs)]}),(0,$.jsxs)(`p`,{children:[n?`分析覆盖`:`Analysis coverage`,` · `,l.coverage.analysisRanges.length?l.coverage.analysisRanges.map(e=>`${Kt(e.startedAtMs)}–${Kt(e.endedAtMs)}`).join(`、`):n?`暂无本版已完成章节`:`No completed chapters for this revision`,l.coverage.analysisStale?n?`;已发布分析基于旧版原文`:`; published analysis uses an earlier transcript`:``,` · `,l.coverage.complete?n?`本轮处理完成`:`Run complete`:n?`阶段性内容,其余仍待处理`:`Partial content; remaining work pending`]})]})]}),E?.provisional?(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:n?`以上是本轮已保存的阶段性原文;正式发布后才能校对和标记具体段落。`:`Saved partial text; segment editing and highlighting become available after publication.`}):null]}):null]})}function Jt({recordingId:e,discussionId:t,zh:n,onEvidence:r,onPlay:i}){let{data:a=[],mutate:o}=rt(`/api/discussions/${t}/annotations`,e=>p(u(e))),[s,c]=(0,Q.useState)([]),[l,d]=(0,Q.useState)(null),[f,m]=(0,Q.useState)(null),[h,g]=(0,Q.useState)(``),_=(0,Q.useCallback)(async()=>{c(await z(e))},[e]),v=(0,Q.useCallback)(async()=>{try{await se(e,t),await _(),await o()}catch(e){await o(),g(e instanceof Error?e.message:String(e))}},[e,t,_,o]);(0,Q.useEffect)(()=>{_().catch(e=>g(String(e))),v();let e=()=>{_().catch(e=>g(String(e)))};window.addEventListener(`discussion-annotations-changed`,e),window.addEventListener(`online`,v);let t=window.setInterval(()=>{navigator.onLine&&v()},15e3);return()=>{window.removeEventListener(`discussion-annotations-changed`,e),window.removeEventListener(`online`,v),window.clearInterval(t)}},[_,v]);let y=new Map(a.map(e=>[e.annotation.id,{...e,localState:`synced`}]));for(let e of s)if(e.state!==`synced`||!y.has(e.annotation.id)){let t=y.get(e.annotation.id);y.set(e.annotation.id,{annotation:e.annotation,state:t?.state??`pending`,playback:t?.playback??[],evidence:t?.evidence,localState:e.state})}let b=async(t,n=s.find(e=>e.annotation.id===t.id)?.nonce??null)=>{try{await te(e,{...t,updatedAt:Date.now()},n),m(null),g(``),await _(),v()}catch(e){g(e instanceof Error?e.message:String(e))}};return(0,$.jsxs)(`section`,{className:`space-y-4`,"aria-label":n?`我的标记`:`My highlights`,children:[h?(0,$.jsxs)(`p`,{role:`alert`,className:`text-sm text-danger`,children:[h,(0,$.jsx)(Y,{onClick:()=>void v(),children:n?`重试同步`:`Retry sync`})]}):null,y.size?null:(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:n?`暂无标记`:`No highlights yet`}),[...y.values()].sort((e,t)=>e.annotation.anchor.capturedAt-t.annotation.anchor.capturedAt).filter(e=>!e.annotation.deleted||e.localState===`conflict`).map(e=>(0,$.jsxs)(`article`,{className:`space-y-2 rounded-lg border border-edge p-3`,children:[(0,$.jsxs)(`p`,{className:`text-xs text-fg-muted`,children:[e.annotation.kind===`highlight`?n?`重点`:`Highlight`:e.annotation.kind===`question`?n?`问题`:`Question`:n?`我的补充`:`My note`,` · `,new Date(e.annotation.anchor.capturedAt).toLocaleString(),` · `,e.localState===`synced`?n?`已同步`:`Synced`:e.localState===`conflict`?n?`同步冲突,保留了本机修改`:`Conflict; local edits retained`:n?`本机已保存,待同步`:`Saved locally; sync pending`]}),e.evidence?.segments.map(e=>(0,$.jsx)(`blockquote`,{className:`text-sm`,children:e.text},e.sequence)),e.positionMs===void 0?null:(0,$.jsxs)(`p`,{className:`text-xs text-fg-muted`,children:[n?`标记位置`:`Marked position`,` · `,Math.floor(e.positionMs/6e4),`:`,String(Math.floor(e.positionMs/1e3)%60).padStart(2,`0`)]}),e.annotation.text?(0,$.jsxs)(`p`,{className:`whitespace-pre-wrap text-sm`,children:[n?`我的说明:`:`My context: `,e.annotation.text]}):null,(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,$.jsx)(Y,{disabled:!e.evidence,onClick:()=>e.evidence&&r(e.evidence),children:n?`查看原文`:`View transcript`}),e.playback.map((e,t)=>(0,$.jsxs)(Y,{onClick:()=>i(e),children:[n?`回听`:`Play`,` `,Math.floor(e.startedAtMs/6e4),`:`,String(Math.floor(e.startedAtMs/1e3)%60).padStart(2,`0`)]},t)),(0,$.jsx)(Y,{onClick:()=>{d(s.find(t=>t.annotation.id===e.annotation.id)?.nonce??null),m({...e.annotation,revision:a.find(t=>t.annotation.id===e.annotation.id)?.annotation.revision??e.annotation.revision})},children:e.localState===`conflict`?n?`合并修改`:`Merge changes`:n?`添加说明/类型`:`Edit context/type`}),(0,$.jsx)(Y,{onClick:()=>void b({...e.annotation,deleted:!0}),children:n?`移除标记`:`Remove`})]}),e.state===`located`&&!e.evidence?(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:n?`该位置原文尚未生成,可先回听原音。`:`Transcript for this position is pending; audio is usable.`}):null,e.state===`unavailable`?(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:n?`该位置原音未保存、已删除或时间尚无法核实;保留原始标记,不自动移动。`:`Audio at this position is missing, deleted or unverified. The original anchor has been retained.`}):e.state===`pending`?(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:n?`等待原音/原文完成定位`:`Awaiting audio/transcript positioning`}):null,e.localState===`conflict`?(0,$.jsx)(Y,{onClick:()=>{let t=s.find(t=>t.annotation.id===e.annotation.id),n=a.find(t=>t.annotation.id===e.annotation.id);t&&n&&re(t,n.annotation).then(_)},children:n?`使用服务端版本`:`Use server version`}):null]},e.annotation.id)),f?(0,$.jsxs)(`div`,{role:`dialog`,"aria-label":n?`编辑标记`:`Edit highlight`,className:`rounded-lg border border-edge p-3`,children:[(0,$.jsxs)(fe,{value:f.kind,"aria-label":n?`标记类型`:`Highlight type`,onChange:e=>m({...f,kind:e.target.value}),children:[(0,$.jsx)(pe,{value:`highlight`,children:n?`重点`:`Highlight`}),(0,$.jsx)(pe,{value:`question`,children:n?`问题`:`Question`}),(0,$.jsx)(pe,{value:`note`,children:n?`补充`:`Context`})]}),(0,$.jsx)(`textarea`,{"aria-label":n?`我的说明`:`My context`,maxLength:4e3,value:f.text,onChange:e=>m({...f,text:e.target.value}),className:`my-2 min-h-24 w-full rounded border border-edge bg-surface-inset p-2`}),(0,$.jsx)(Y,{onClick:()=>void b(f,l),children:n?`保存到本机并同步`:`Save locally and sync`}),(0,$.jsx)(Y,{onClick:()=>m(null),children:n?`取消`:`Cancel`})]}):null]})}var Yt={tab:`summary`,query:``,page:1,positionMs:0},Xt=m((e,t)=>({notes:{},update:(n,r)=>{let i={...Qt(n,t().notes[n]),...r};e(e=>({notes:{...e.notes,[n]:i}}));try{localStorage.setItem(`discussion-review:${n}`,JSON.stringify(i))}catch{}}})),Zt=new Map;function Qt(e,t){if(t)return t;if(Zt.has(e))return Zt.get(e);let n=Yt;try{let t=JSON.parse(localStorage.getItem(`discussion-review:${e}`)??`null`);t&&[`summary`,`transcript`,`marks`].includes(t.tab)&&typeof t.query==`string`&&Number.isSafeInteger(t.page)&&t.page>0&&t.page<=1e4&&Number.isFinite(t.positionMs)&&t.positionMs>=0&&(n={...Yt,...t})}catch{}return Zt.set(e,n),n}function $t(e){let t=(0,Dt.c)(51),{initial:n,zh:r,busy:i,onClose:a,onSave:o}=e,[s,c]=(0,Q.useState)(n),l;t[0]!==i||t[1]!==a?(l=e=>{!e&&!i&&a()},t[0]=i,t[1]=a,t[2]=l):l=t[2];let u;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,$.jsx)(g,{className:`xopc-dialog-overlay fixed inset-0 z-[70] bg-scrim backdrop-blur-[2px]`}),t[3]=u):u=t[3];let d=r?`编辑纪要内容`:`Edit meeting content`,f;t[4]===d?f=t[5]:(f=(0,$.jsx)(`header`,{className:`border-b border-edge p-4`,children:(0,$.jsx)(S,{children:d})}),t[4]=d,t[5]=f);let p=r?`人工修改会保留,重新整理不会覆盖。已创建任务保持不变。`:`Your changes survive regeneration. Existing tasks remain unchanged.`,m;t[6]===p?m=t[7]:(m=(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:p}),t[6]=p,t[7]=m);let h=r?`内容`:`Content`,_;t[8]===s?_=t[9]:(_=e=>c({...s,text:e.target.value}),t[8]=s,t[9]=_);let v;t[10]!==s.text||t[11]!==_?(v=(0,$.jsx)(`textarea`,{className:`mt-1 min-h-32 w-full rounded border border-edge bg-transparent p-2`,value:s.text,onChange:_}),t[10]=s.text,t[11]=_,t[12]=v):v=t[12];let y;t[13]!==h||t[14]!==v?(y=(0,$.jsxs)(`label`,{className:`block text-sm`,children:[h,v]}),t[13]=h,t[14]=v,t[15]=y):y=t[15];let w;t[16]!==s||t[17]!==r?(w=s.kind===`actionItems`?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`label`,{className:`block text-sm`,children:[r?`负责人原话`:`Owner as stated`,(0,$.jsx)(`input`,{className:`mt-1 w-full rounded border border-edge bg-transparent p-2`,value:s.owner??``,onChange:e=>c({...s,owner:e.target.value})})]}),(0,$.jsxs)(`label`,{className:`block text-sm`,children:[r?`期限原话`:`Date as stated`,(0,$.jsx)(`input`,{className:`mt-1 w-full rounded border border-edge bg-transparent p-2`,value:s.dueDate??``,onChange:e=>c({...s,dueDate:e.target.value})})]})]}):null,t[16]=s,t[17]=r,t[18]=w):w=t[18];let T;t[19]!==s||t[20]!==r?(T=s.kind===`summary`?null:(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-sm`,children:[(0,$.jsx)(`input`,{type:`checkbox`,className:`ui-checkbox`,checked:!!s.ignored,onChange:e=>c({...s,ignored:e.target.checked})}),r?`忽略此项`:`Ignore this item`]}),t[19]=s,t[20]=r,t[21]=T):T=t[21];let E;t[22]!==y||t[23]!==w||t[24]!==T||t[25]!==m?(E=(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto p-4`,children:[m,y,w,T]}),t[22]=y,t[23]=w,t[24]=T,t[25]=m,t[26]=E):E=t[26];let D=r?`取消`:`Cancel`,O;t[27]!==i||t[28]!==a||t[29]!==D?(O=(0,$.jsx)(Y,{disabled:i,onClick:a,children:D}),t[27]=i,t[28]=a,t[29]=D,t[30]=O):O=t[30];let k;t[31]!==i||t[32]!==s.text?(k=i||!s.text.trim(),t[31]=i,t[32]=s.text,t[33]=k):k=t[33];let A;t[34]!==s||t[35]!==o?(A=()=>void o(s),t[34]=s,t[35]=o,t[36]=A):A=t[36];let j=r?`保存修改`:`Save changes`,M;t[37]!==k||t[38]!==A||t[39]!==j?(M=(0,$.jsx)(Y,{variant:`primary`,disabled:k,onClick:A,children:j}),t[37]=k,t[38]=A,t[39]=j,t[40]=M):M=t[40];let N;t[41]!==O||t[42]!==M?(N=(0,$.jsxs)(`footer`,{className:`flex justify-end gap-2 border-t border-edge p-3`,children:[O,M]}),t[41]=O,t[42]=M,t[43]=N):N=t[43];let P;t[44]!==E||t[45]!==N||t[46]!==f?(P=(0,$.jsxs)(b,{children:[u,(0,$.jsxs)(x,{"aria-describedby":void 0,className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[71] flex h-[min(32rem,90dvh)] w-[min(36rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay`,children:[f,E,N]})]}),t[44]=E,t[45]=N,t[46]=f,t[47]=P):P=t[47];let F;return t[48]!==l||t[49]!==P?(F=(0,$.jsx)(C,{open:!0,onOpenChange:l,children:P}),t[48]=l,t[49]=P,t[50]=F):F=t[50],F}function en(e,t,n){if(t===`summary`){let r=e.organization;if(!r)return``;let i=r.organization;if(!i)return``;let a=e=>e.filter(e=>n.showIgnored||!e.ignored);return JSON.stringify({discussionId:e.discussion.id,view:t,revision:r.revision,transcriptRevision:r.transcriptRevision,summary:i.summary,decisions:a(i.decisions),actionItems:a(i.actionItems),risks:a(i.risks),openQuestions:a(i.openQuestions),chapters:i.chapters},null,2)}let r=n.query.toLocaleLowerCase(),i=e.transcript.segments.filter(e=>(e.displayText??e.rawText??``).toLocaleLowerCase().includes(r)||e.speakerLabel?.toLocaleLowerCase().includes(r)).slice(0,n.page*50);return i.length?JSON.stringify({discussionId:e.discussion.id,view:t,revision:e.transcript.revision,scope:`loaded filtered segments only`,segments:i.map(e=>({sequence:e.sequence,startedAtMs:e.startedAtMs,speaker:e.speakerLabel,text:e.displayText??e.rawText??``}))},null,2):``}var tn=e=>`${String(Math.floor(e/6e4)).padStart(2,`0`)}:${String(Math.floor(e/1e3)%60).padStart(2,`0`)}`;function nn(e,t){e.currentTime=Number.isFinite(e.duration)?Math.min(t,e.duration):t}function rn({noteId:e,onPersonalNotes:t,onMeetingContent:n,personalNotes:r,personalNotesActive:i=!1,noteTitle:a,noteActions:s}){let l=o(),d=(0,Q.useId)(),m=(0,Q.useRef)(null),h=f(e=>e.language)===`zh`,{data:_,mutate:v,isLoading:y}=rt([`note-discussion-document`,e],()=>ee(e),{refreshInterval:e=>e&&([`recording`,`stopping`,`sealing`,`organizing`].includes(e.discussion.status)||e.recordingJob?.state===`queued`||e.recordingJob?.state===`running`)?3e3:0}),[w,T]=(0,Q.useState)(null),[E,D]=(0,Q.useState)(null),O=(0,Q.useRef)(null),{detail:k,hasUpdates:A,publish:j}=Wt(e,_,Gt(O),!!w||!!E),M=k?.discussion.id,N=`/api/discussions/${encodeURIComponent(M??``)}`,{data:I=[],mutate:R}=rt(M?`${N}/actions`:null,e=>p(u(e)),{refreshInterval:1e4}),z=Xt(t=>Qt(e,t.notes[e])),ne=Xt(e=>e.update),re=z.tab,B=t=>ne(e,{tab:t}),ae=z.query,ce=t=>ne(e,{query:t}),[V,le]=(0,Q.useState)(!1),de=(0,Q.useRef)(null);(0,Q.useEffect)(()=>{V&&de.current?.focus()},[V]);let[fe,pe]=(0,Q.useState)(`general`),me=(0,Q.useRef)(null),H=(0,Q.useRef)(null),[U,W]=(0,Q.useState)(!1),[he,ge]=(0,Q.useState)(!1),_e=(0,Q.useRef)(!1),ve=(0,Q.useRef)(null),ye=(0,Q.useRef)(null),[G,be]=(0,Q.useState)(null),[xe,Se]=(0,Q.useState)(!1),[Ce,we]=(0,Q.useState)([]),[Te,Ee]=(0,Q.useState)(null),[De,Oe]=(0,Q.useState)(!1),ke=z.page,Ae=t=>ne(e,{page:t}),je=(0,Q.useRef)(null),[Me,Ne]=(0,Q.useState)([]),Pe=(0,Q.useRef)(0),Fe=(0,Q.useRef)(0),Ie=(0,Q.useRef)(_?.transcript.revision);Ie.current=_?.transcript.revision;let Le=(0,Q.useRef)(null),Re=(0,Q.useRef)(_?.discussion.audioDeletedAt);Re.current=_?.discussion.audioDeletedAt;let ze=(0,Q.useRef)(null),[K,Ve]=(0,Q.useState)();(0,Q.useEffect)(()=>{let t=()=>{v(),R()},n=n=>{n.detail?.noteId===e&&t()};return window.addEventListener(`note-updated`,n),window.addEventListener(`discussion-updated`,t),window.addEventListener(`discussion-segment-updated`,t),()=>{window.removeEventListener(`note-updated`,n),window.removeEventListener(`discussion-updated`,t),window.removeEventListener(`discussion-segment-updated`,t)}},[v,R,e]),(0,Q.useEffect)(()=>{k?.discussion.template&&pe(k.discussion.template)},[k?.discussion.template]);async function He(e){if(!De){Oe(!0),Ee(null);try{await e();let t=await v();j(t),await R()}catch(e){Ee(e instanceof Error?e.message:String(e))}finally{Oe(!1)}}}function We(e,t){if(!Le.current)return;let n=Le.current,r=e/1e3;je.current=t??null,ze.current=n.readyState===0?r:null,nn(n,r),ot(n),n.play().catch(()=>{n.paused&&at(n)})}function Ke(){if(H.current)return;let e=ye.current??(document.activeElement instanceof HTMLElement?document.activeElement:null);H.current={element:e,triggerIndex:Array.from(O.current?.querySelectorAll(`button`)??[]).findIndex(t=>t===e),scrollTop:O.current?.scrollTop??0,review:z}}function qe(){Fe.current++,W(!1),be(null),ge(!1),Ne([]),H.current=null,ve.current=null}function Ye(){Fe.current++,W(!1),be(null),ve.current=H.current?.element??null,he||(H.current=null)}function Xe(){let t=H.current;if(!t)return;let{tab:n,query:r,page:i,anchor:a,anchorRevision:o}=t.review;ne(e,{tab:n,query:r,page:i,anchor:a,anchorRevision:o}),Ne([]),be(null),ge(!1),_e.current=!0}(0,Q.useLayoutEffect)(()=>{if(!G&&!U&&ve.current&&(ve.current.focus({preventScroll:!0}),ve.current=null),!_e.current)return;_e.current=!1;let e=H.current;e&&O.current&&(O.current.scrollTop=e.scrollTop),(e?.element?.isConnected?e.element:e&&e.triggerIndex>=0?O.current?.querySelectorAll(`button`)[e.triggerIndex]:null)?.focus({preventScroll:!0}),H.current=null}),(0,Q.useEffect)(()=>{(G||U)&&me.current?.focus({preventScroll:!0})},[G,U]);function Ze(e){i&&n?.(),Ke();let t=e.stale||e.transcriptRevision!==Ie.current,r=Re.current?{...e,audioAvailable:!1,timingVerified:!1,segments:e.segments.map(e=>({...e,playback:[]}))}:e;be({...r,stale:t}),t||Ne(e.segments.map(e=>e.sequence))}async function q(e,t){if(!k)return;let r=Pe.current,a=++Fe.current;i&&n?.(),Ke(),W(!0),be(null),Ee(null);try{let n=await p(u(`${N}/evidence?revision=${t??k.organization?.transcriptRevision??k.transcript.revision}&segments=${e.join(`,`)}`));if(r!==Pe.current||a!==Fe.current)return;Ze(n)}catch(e){r===Pe.current&&a===Fe.current&&(Ee(e instanceof Error?e.message:String(e)),Ye())}finally{a===Fe.current&&W(!1)}}async function et(e){if(!k||Re.current||!Le.current)return;(G||U||he)&&qe();let t=Pe.current,n=++Fe.current;if(Ee(null),k.discussion.mimeType?.split(`;`)[0]===`audio/wav`&&e.endedAtMs>e.startedAtMs){We(e.startedAtMs,e.endedAtMs);return}try{let r=await p(u(`${N}/evidence?revision=${k.transcript.revision}&segments=${e.sequence}`));if(t!==Pe.current||n!==Fe.current||Re.current)return;let i=r.segments.find(t=>t.sequence===e.sequence)?.playback[0];if(!i){Ee(h?`这段录音暂无法定位`:`This segment cannot be located yet`);return}Ne([]),We(i.startedAtMs,i.endedAtMs)}catch(e){t===Pe.current&&n===Fe.current&&Ee(e instanceof Error?e.message:String(e))}}async function J(e){k&&await He(async()=>{await te(k.discussion.clientRequestId,oe({type:`transcript`,capturedAt:Date.now(),transcriptRevision:k.transcript.revision,segmentIds:[e.sequence]})),B(`marks`),se(k.discussion.clientRequestId,k.discussion.id).catch(e=>Ee(String(e)))})}(0,Q.useEffect)(()=>(Pe.current++,Fe.current++,H.current=null,ge(!1),W(!1),be(null),Ne([]),T(null),D(null),we([]),Ee(null),je.current=null,()=>{Pe.current++}),[e]),(0,Q.useEffect)(()=>{let t=k?.discussion.audioSha256??k?.discussion.audioAttachmentId;if(!t)return;let n=Qt(e,Xt.getState().notes[e]);n.source&&n.source!==t?(Pe.current++,Fe.current++,W(!1),be(null),Ne([]),Le.current?.pause(),ne(e,{positionMs:0,source:t}),ze.current=0,je.current=null):ne(e,{source:t})},[e,k?.discussion.audioSha256,k?.discussion.audioAttachmentId,ne]),(0,Q.useEffect)(()=>{k?.discussion.audioDeletedAt&&(Le.current?.pause(),ze.current=null,je.current=null,be(e=>e?{...e,audioAvailable:!1,timingVerified:!1,segments:e.segments.map(e=>({...e,playback:[]}))}:null))},[k?.discussion.audioDeletedAt]),(0,Q.useEffect)(()=>{z.tab===`transcript`&&z.anchor!==void 0&&z.anchorRevision===k?.transcript.revision&&window.setTimeout(()=>document.getElementById(`discussion-segment-${z.anchor}`)?.scrollIntoView?.({block:`center`}),0)},[z.tab,z.anchor,z.anchorRevision,k?.transcript.revision]),(0,Q.useEffect)(()=>{Ne([]),be(e=>e&&e.transcriptRevision!==_?.transcript.revision?{...e,stale:!0}:e)},[_?.transcript.revision]);function tt(e,t,n=h?`原话`:`Source`){let r=k&&(t??k.organization?.transcriptRevision??k.transcript.revision)===k.transcript.revision?k.transcript.segments.find(t=>t.sequence===e[0]):void 0;return(0,$.jsx)(`button`,{type:`button`,className:`inline-flex min-h-11 shrink-0 items-center gap-1.5 rounded-lg px-2 text-xs text-accent-fg hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":r?`${n} · ${tn(r.startedAtMs)}`:void 0,onClick:()=>void q(e,t),children:r?(0,$.jsx)(`span`,{className:`tabular-nums`,children:tn(r.startedAtMs)}):n})}let nt=(e,t,n)=>t.some(e=>xe||!e.ignored)?(0,$.jsxs)(`section`,{className:`space-y-2`,children:[(0,$.jsx)(`h3`,{className:`font-semibold text-fg`,children:e}),t.filter(e=>xe||!e.ignored).map(e=>(0,$.jsxs)(`div`,{"data-reading-anchor":`fact:${e.id}`,className:`flex items-start gap-3 text-sm`,children:[(0,$.jsxs)(`p`,{className:`flex-1 whitespace-pre-wrap`,children:[e.text,e.supersededBy||e.disputedBy?(0,$.jsx)(`span`,{className:`ml-2 text-xs text-fg-muted`,children:h?`有后续变更`:`Later changes`}):null,e.editedByUser?(0,$.jsx)(`span`,{className:`ml-2 text-xs text-fg-muted`,children:h?e.ignored?`已忽略`:`人工编辑`:e.ignored?`Ignored`:`Edited`}):null]}),(0,$.jsx)(`button`,{className:`text-xs text-fg-muted`,disabled:De||A,onClick:()=>D({kind:n,itemId:e.id,text:e.text,ignored:e.ignored}),children:h?`编辑`:`Edit`}),e.evidenceSegmentIds.length?tt(e.evidenceSegmentIds,e.evidenceRevision):(0,$.jsx)(`span`,{className:`text-xs text-fg-muted`,children:h?`暂无定位`:`No source timing`})]},e.id))]}):null;if(y)return(0,$.jsx)($e,{className:`h-48 w-full`});if(!k)return null;let{discussion:X,transcript:st,organization:ct}=k,Z=ct?.organization,lt=!k.note.title||/^Discussion · \d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(k.note.title)?h?`语音笔记`:`Voice note`:k.note.title,ut=X.recordingStartedAt??k.note.createdAt,dt=ut?new Date(ut).toLocaleDateString(h?`zh-CN`:`en`,{month:`short`,day:`numeric`}):null,ft=X.audioSha256??X.audioAttachmentId??``,pt=K?.source===ft?K.ms:X.durationMs??0,mt=!!X.audioAttachmentId&&!X.audioDeletedAt,ht=[`stopping`,`sealing`,`organizing`].includes(X.status),gt=!A&&[`recording`,`completed`,`needs_attention`].includes(X.status),_t=i||!!G||U,vt=st.segments.filter(e=>(e.displayText??e.rawText??``).toLocaleLowerCase().includes(ae.toLocaleLowerCase())||e.speakerLabel?.toLocaleLowerCase().includes(ae.toLocaleLowerCase())),yt=i?k.note.markdown:re===`marks`||ae.trim()?``:en(k,re,{query:ae,page:ke,showIgnored:xe});return(0,$.jsxs)(`section`,{className:`@container/discussion relative flex h-full min-h-0 min-w-0 w-full flex-col text-fg`,onClickCapture:e=>{ye.current=e.target instanceof Element?e.target.closest(`button`):null},onKeyDown:e=>{!e.defaultPrevented&&(e.metaKey||e.ctrlKey)&&e.key===`f`&&(e.preventDefault(),i&&O.current&&getComputedStyle(O.current).visibility===`hidden`&&n?.(),V?window.requestAnimationFrame(()=>de.current?.focus()):le(!0))},children:[(0,$.jsxs)(`header`,{className:`flex shrink-0 flex-wrap items-start gap-x-4 gap-y-1 px-5 pb-3 pt-5 sm:px-7`,children:[(0,$.jsxs)(`div`,{className:`min-w-40 flex-1`,children:[a??(0,$.jsx)(`h2`,{className:`break-words text-2xl font-semibold leading-snug tracking-tight`,children:lt}),(0,$.jsx)(`p`,{className:`mt-1 text-xs tabular-nums text-fg-muted`,children:[dt,tn(pt)].filter(Boolean).join(` · `)})]}),(0,$.jsx)(Vt,{noteActions:s,detail:k,zh:h,busy:De,processing:ht,pageText:yt,editing:!!E||!!w})]}),(0,$.jsxs)(`div`,{className:`mx-5 mb-2 flex shrink-0 flex-wrap items-center justify-between gap-x-2 border-b border-edge-subtle pb-2 sm:mx-7`,children:[(0,$.jsx)(`nav`,{"aria-label":h?`录音内容`:`Recording content`,className:`inline-flex items-center rounded-xl bg-surface-inset px-1`,children:[`summary`,`transcript`].map(e=>(0,$.jsxs)(`button`,{type:`button`,"aria-pressed":re===e||e===`transcript`&&re===`marks`,className:`group relative isolate min-h-11 rounded-lg px-3.5 text-sm text-fg-muted aria-pressed:font-medium aria-pressed:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>{i&&O.current&&getComputedStyle(O.current).visibility===`hidden`&&n?.(),qe(),B(e)},children:[(0,$.jsx)(`span`,{"aria-hidden":!0,className:`absolute inset-x-0 inset-y-1.5 -z-10 rounded-lg group-aria-pressed:bg-surface-panel group-aria-pressed:shadow-sm`}),e===`summary`?h?`纪要`:`Summary`:h?`转写`:`Transcript`]},e))}),(0,$.jsxs)(`div`,{className:`ml-auto flex items-center gap-1`,children:[(0,$.jsx)(`button`,{type:`button`,"aria-label":h?`搜索`:`Search`,"aria-expanded":V||!!ae,onClick:()=>{i&&n?.(),le(e=>!e),V&&ce(``)},className:`inline-flex size-11 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,children:(0,$.jsx)(Ge,{className:`size-4`,"aria-hidden":!0})}),r?(0,$.jsxs)(`button`,{ref:m,type:`button`,"aria-expanded":i,"aria-controls":d,className:`inline-flex min-h-11 items-center gap-1.5 rounded-lg px-2 text-sm font-medium text-accent-fg hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>{i?n?.():(qe(),t?.())},children:[i?(0,$.jsx)(ue,{className:`size-4`,"aria-hidden":!0}):(0,$.jsx)(Je,{className:`size-4`,"aria-hidden":!0}),i?h?`完成`:`Done`:h?`写笔记`:`Write notes`]}):null]})]}),Te?(0,$.jsxs)(`details`,{role:`alert`,className:`px-4 py-2 text-sm text-danger`,children:[(0,$.jsx)(`summary`,{children:h?`操作未完成,可以稍后重试`:`Action incomplete. Try again later`}),(0,$.jsx)(`p`,{className:`mt-2 break-words text-xs text-fg-muted`,children:Te})]}):null,V||ae?(0,$.jsxs)(`label`,{className:`mx-5 mb-2 shrink-0 items-center gap-2 rounded-xl bg-surface-inset px-3 sm:mx-7 ${i?`hidden @min-[58rem]/discussion:flex`:`flex`}`,children:[(0,$.jsx)(Ge,{className:`size-4 text-fg-muted`}),(0,$.jsx)(`input`,{ref:de,"aria-label":h?`搜索录音内容`:`Search recording`,className:`min-h-11 min-w-0 w-full bg-transparent text-sm outline-none`,maxLength:200,placeholder:h?`搜索录音内容`:`Search recording`,value:ae,onChange:e=>{ce(e.target.value),Ae(1)}}),(0,$.jsx)(`button`,{className:`inline-flex size-11 shrink-0 items-center justify-center rounded-lg focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":h?`关闭搜索`:`Close search`,onClick:()=>{ce(``),le(!1)},children:(0,$.jsx)(Qe,{className:`size-4`})})]}):null,he?(0,$.jsx)(`div`,{className:`flex shrink-0 items-center px-5 pb-2 text-xs text-fg-muted sm:px-7`,children:(0,$.jsx)(Y,{variant:`ghost`,onClick:Xe,children:H.current?.review.tab===`summary`?h?`返回结论`:`Back to conclusion`:h?`返回阅读位置`:`Back to reading`})}):null,(0,$.jsxs)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 overflow-hidden`,children:[(0,$.jsxs)(`main`,{ref:O,className:`min-h-0 min-w-0 flex-1 flex-col gap-5 overflow-y-auto px-5 pb-6 pt-3 sm:px-7 ${_t?`invisible @min-[58rem]/discussion:visible`:``} flex`,children:[re!==`summary`&&!ae.trim()?(0,$.jsx)(`div`,{className:`mx-auto flex w-full max-w-[46rem] justify-end`,children:(0,$.jsxs)(Y,{variant:`ghost`,"aria-pressed":re===`marks`,onClick:()=>B(re===`marks`?`transcript`:`marks`),className:`min-h-11 gap-1.5 aria-pressed:bg-surface-inset`,children:[(0,$.jsx)(L,{className:`size-4`,"aria-hidden":!0}),h?`我的标记`:`My highlights`]})}):null,(X.status!==`completed`||!Z||ct?.transcriptRevision!==st.revision)&&(X.status!==`recording`||k.recordingJob)?(0,$.jsx)(P,{context:`note`,nextAttemptAt:k.processing?.nextAttemptAt,input:ie(k),zh:h,busy:De,onRetry:e=>void He(()=>e===`analyze`?p(u(`${N}/organize`),{method:`POST`,body:JSON.stringify({template:fe})}):F(X.id,e===`regenerate`?`from_audio`:`resume`))}):null,(0,$.jsx)(`div`,{className:`mx-auto w-full max-w-[46rem]`,hidden:!!ae.trim(),children:re===`marks`?(0,$.jsx)(Jt,{recordingId:X.clientRequestId,discussionId:X.id,zh:h,onEvidence:Ze,onPlay:e=>We(e.startedAtMs,e.endedAtMs)},X.id):re===`summary`?Z?(0,$.jsxs)(`div`,{className:`mx-auto w-full max-w-[46rem] space-y-6`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsx)(`h3`,{className:`text-base font-medium`,children:h?`摘要`:`Summary`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(Ht,{detail:k,template:fe,onTemplate:pe,zh:h,busy:De,processing:ht,onOrganize:()=>void He(()=>p(u(`${N}/organize`),{method:`POST`,body:JSON.stringify({template:fe})})),onRegenerate:()=>void He(()=>F(X.id,`from_audio`))}),(0,$.jsx)(`button`,{className:`inline-flex size-11 shrink-0 items-center justify-center rounded-full text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":h?`编辑概要`:`Edit overview`,title:h?`编辑概要`:`Edit overview`,disabled:De||ht||A,onClick:()=>D({kind:`summary`,itemId:`summary`,text:Z.summary}),children:(0,$.jsx)(Je,{className:`size-4`,"aria-hidden":!0})})]})]}),(0,$.jsx)(`p`,{"data-reading-anchor":`summary`,className:`whitespace-pre-wrap text-[15px] leading-7`,children:Z.summary}),Z.summaryEditedByUser?(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:h?`已由你编辑`:`Edited by you`}):null,Z.summaryEvidenceSegmentIds?.length?Array.from({length:Math.ceil(Z.summaryEvidenceSegmentIds.length/100)},(e,t)=>(0,$.jsxs)(Y,{onClick:()=>void q(Z.summaryEvidenceSegmentIds.slice(t*100,(t+1)*100)),children:[h?`查看原话`:`View source`,Z.summaryEvidenceSegmentIds.length>100?` · ${t+1}`:``]},t)):null,Z.keyPointEvidence?.length?(0,$.jsxs)(`section`,{className:`space-y-2`,children:[(0,$.jsx)(`h3`,{children:h?`重点结论`:`Key points`}),Z.keyPointEvidence.map(e=>(0,$.jsxs)(`div`,{className:`flex gap-2 text-sm`,children:[(0,$.jsx)(`p`,{className:`flex-1`,children:e.text}),tt(e.evidenceSegmentIds,e.evidenceRevision)]},e.id))]}):Z.keyPoints.length?(0,$.jsxs)(`section`,{className:`space-y-3`,children:[(0,$.jsx)(`h3`,{className:`text-base font-medium`,children:h?`重点结论`:`Key points`}),(0,$.jsx)(`ul`,{className:`list-disc space-y-2 pl-5 text-[15px] leading-7`,children:Z.keyPoints.map((e,t)=>(0,$.jsx)(`li`,{children:e},`${t}:${e}`))})]}):null,[...Z.decisions,...Z.actionItems,...Z.risks,...Z.openQuestions].some(e=>e.ignored)?(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-fg-muted`,children:[(0,$.jsx)(`input`,{type:`checkbox`,className:`ui-checkbox`,checked:xe,onChange:e=>Se(e.target.checked)}),h?`显示已忽略项`:`Show ignored items`]}):null,Ce.length?(0,$.jsx)(Y,{disabled:De||A,onClick:()=>void He(async()=>{for(let e of Ce)await p(u(`${N}/actions/${encodeURIComponent(e)}/convert`),{method:`POST`,body:JSON.stringify({organizationRevision:ct.revision})});we([])}),children:h?`加入所选 ${Ce.length} 项任务`:`Add ${Ce.length} selected tasks`}):null,nt(h?`已决定事项`:`Decisions`,Z.decisions,`decisions`),Z.actionItems.length?(0,$.jsxs)(`section`,{className:`space-y-3`,children:[(0,$.jsx)(`h3`,{className:`font-semibold`,children:h?`下一步行动`:`Next actions`}),Z.actionItems.filter(e=>xe||!e.ignored).map(e=>{let t=I.find(t=>t.actionId===e.id);return(0,$.jsxs)(`article`,{"data-reading-anchor":`action:${e.id}`,className:`rounded-lg border border-edge-subtle p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-2`,children:[!t&&!e.ignored&&(!(e.supersededBy||e.disputedBy)||e.reviewedChangeId===(e.supersededBy??e.disputedBy))?(0,$.jsx)(`input`,{type:`checkbox`,"aria-label":`${h?`选择行动`:`Select action`}: ${e.title}`,className:`ui-checkbox`,checked:Ce.includes(e.id),onChange:t=>we(t.target.checked?[...Ce,e.id]:Ce.filter(t=>t!==e.id))}):null,(0,$.jsxs)(`p`,{className:`flex-1 text-sm font-medium`,children:[e.title,e.supersededBy||e.disputedBy?(0,$.jsx)(`span`,{className:`ml-2 text-xs text-fg-muted`,children:h?`有后续变更,请复核`:`Review later changes`}):null,e.editedByUser?(0,$.jsx)(`span`,{className:`ml-2 text-xs text-fg-muted`,children:h?e.ignored?`已忽略`:`人工编辑`:e.ignored?`Ignored`:`Edited`}):null]}),(0,$.jsx)(`button`,{className:`text-xs text-fg-muted`,disabled:De||ht||A,onClick:()=>D({kind:`actionItems`,itemId:e.id,text:e.title,owner:e.owner,dueDate:e.dueDate,ignored:e.ignored}),children:h?`编辑`:`Edit`})]}),(0,$.jsxs)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:[e.owner??(h?`负责人未明确`:`Owner unspecified`),` · `,e.dueDate??(h?`期限未明确`:`Date unspecified`)]}),(0,$.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-3 text-xs`,children:[e.evidenceSegmentIds.length?tt(e.evidenceSegmentIds,e.evidenceRevision,h?`查看原话`:`Source`):null,t?t.deleted?(0,$.jsx)(`span`,{children:h?`关联任务已删除`:`Linked task deleted`}):(0,$.jsx)(c,{className:`text-accent-fg`,to:Be(`${l.pathname}${l.search}`,t.taskId),children:t.resolution===`done`?h?`已完成 · 查看任务`:`Done · View task`:h?`查看任务 / 交给助手`:`View task / Delegate`}):e.ignored?null:(0,$.jsx)(Y,{disabled:De||A||!!(e.supersededBy||e.disputedBy)&&e.reviewedChangeId!==(e.supersededBy??e.disputedBy),onClick:()=>void He(()=>p(u(`${N}/actions/${encodeURIComponent(e.id)}/convert`),{method:`POST`,body:JSON.stringify({organizationRevision:ct.revision})})),children:h?`加入我的任务`:`Add to my tasks`})]})]},e.id)})]}):null,nt(h?`风险`:`Risks`,Z.risks,`risks`),nt(h?`尚未确定`:`Open questions`,Z.openQuestions,`openQuestions`),Z.changes?.length?(0,$.jsxs)(`section`,{className:`space-y-3`,children:[(0,$.jsx)(`h3`,{className:`font-semibold`,children:h?`前后变更`:`Changes during the meeting`}),Z.changes.map(e=>{let t=[...Z.decisions,...Z.actionItems,...Z.risks,...Z.openQuestions],n=t.find(t=>t.id===e.fromId),r=t.find(t=>t.id===e.toId);return!n||!r?null:(0,$.jsxs)(`article`,{className:`space-y-2 rounded border border-edge p-3 text-sm`,children:[(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:e.relation===`supersedes`?h?`后续撤销或替代`:`Later superseded`:h?`存在冲突,尚未明确解决`:`Unresolved conflict`}),(0,$.jsx)(`button`,{className:`block text-left text-accent-fg`,onClick:()=>void q(n.evidenceSegmentIds,n.evidenceRevision),children:`title`in n?n.title:n.text}),(0,$.jsx)(`span`,{children:`↓`}),(0,$.jsx)(`button`,{className:`block text-left text-accent-fg`,onClick:()=>void q(r.evidenceSegmentIds,r.evidenceRevision),children:`title`in r?r.title:r.text})]},`${e.fromId}:${e.toId}`)})]}):null]}):(0,$.jsxs)(`div`,{className:`mx-auto w-full max-w-[46rem] space-y-4 py-3`,children:[(0,$.jsx)(`p`,{className:`whitespace-pre-wrap text-[15px] leading-7 text-fg-muted`,children:st.text?st.text.slice(0,400)+(st.text.length>400?`…`:``):null}),st.text?(0,$.jsx)(Y,{className:`min-h-11`,onClick:()=>B(`transcript`),children:h?`查看转写`:`View transcript`}):null]}):(0,$.jsxs)(`div`,{className:`divide-y divide-edge-subtle`,children:[vt.slice(0,ke*50).map(e=>(0,$.jsxs)(`article`,{"data-reading-anchor":`segment:${e.sequence}`,id:`discussion-segment-${e.sequence}`,className:`px-3 py-2 ${Me.includes(e.sequence)||z.anchor===e.sequence&&z.anchorRevision===st.revision?`rounded-lg bg-accent-soft`:z.positionMs>0&&z.positionMs>=e.startedAtMs&&z.positionMs<e.endedAtMs?`rounded-lg bg-surface-inset`:``}`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-2 text-xs text-fg-muted`,children:[(0,$.jsx)(`span`,{children:e.speakerLabel??(h?`未区分说话人`:`Speaker unknown`)}),e.status===`confirmed`&&!A?(0,$.jsxs)(`button`,{type:`button`,className:`ml-auto inline-flex min-h-11 items-center gap-1.5 rounded-lg px-2 hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>void J(e),children:[(0,$.jsx)(L,{className:`size-3.5`,"aria-hidden":!0}),h?`标记此段`:`Highlight segment`]}):null,gt&&e.status===`confirmed`?(0,$.jsx)(`button`,{type:`button`,className:`min-h-11 rounded-lg px-2 hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>T({segment:e,text:e.displayText??e.rawText??``,speaker:e.speakerLabel??``}),children:h?`校对`:`Edit`}):null]}),mt&&e.status===`confirmed`?(0,$.jsxs)(`button`,{type:`button`,className:`flex min-h-11 w-full items-start gap-3 rounded-lg px-2 py-2 text-left hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>void et(e),children:[(0,$.jsxs)(`span`,{className:`inline-flex shrink-0 items-center gap-1 pt-1 text-xs tabular-nums text-accent-fg`,children:[(0,$.jsx)(Ue,{className:`size-3`,"aria-hidden":!0}),(0,$.jsxs)(`span`,{className:`sr-only`,children:[h?`回听`:`Play`,` `]}),tn(e.startedAtMs)]}),(0,$.jsx)(`span`,{className:`whitespace-pre-wrap break-words text-sm leading-6`,children:e.displayText??e.rawText})]}):(0,$.jsxs)(`p`,{className:`flex gap-3 px-2 py-2 text-sm leading-6`,children:[(0,$.jsx)(`span`,{className:`shrink-0 text-xs tabular-nums text-fg-muted`,children:tn(e.startedAtMs)}),(0,$.jsx)(`span`,{className:`whitespace-pre-wrap break-words`,children:e.displayText??e.rawText??(h?`等待转写`:`Awaiting transcription`)})]})]},e.sequence)),vt.length>ke*50?(0,$.jsx)(Y,{onClick:()=>Ae(ke+1),children:h?`加载更多`:`More`}):null]})}),(0,$.jsx)(`div`,{className:`mx-auto w-full max-w-[46rem]`,children:(0,$.jsx)(qt,{id:X.id,query:ae.trim(),zh:h,sourceKey:`${X.audioSha256}:${X.audioDeletedAt}`,active:ht||X.status===`recording`,tab:re,refreshKey:`${X.updatedAt}:${st.revision}:${ct?.revision}`,onEvidence:Ze,onPlay:We},X.id)})]}),r?(0,$.jsx)(`aside`,{id:d,"aria-label":h?`我的笔记`:`My notes`,hidden:!i,className:`absolute inset-0 z-10 min-h-0 min-w-0 overflow-hidden bg-surface-panel @min-[58rem]/discussion:static @min-[58rem]/discussion:w-[24rem] @min-[58rem]/discussion:shrink-0 @min-[58rem]/discussion:border-l @min-[58rem]/discussion:border-edge-subtle`,onKeyDown:e=>{e.key!==`Escape`||e.defaultPrevented||(n?.(),m.current?.focus())},children:r}):null,G||U?(0,$.jsxs)(`aside`,{ref:me,tabIndex:-1,onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),Ye())},"aria-label":h?`原话证据`:`Source evidence`,className:`absolute inset-0 z-20 flex min-h-0 w-full min-w-0 flex-col border-edge bg-surface-panel outline-none @min-[58rem]/discussion:static @min-[58rem]/discussion:w-[22rem] @min-[58rem]/discussion:shrink-0 @min-[58rem]/discussion:border-l`,children:[(0,$.jsxs)(`header`,{className:`flex shrink-0 items-center justify-between border-b border-edge p-4`,children:[(0,$.jsxs)(`h3`,{children:[h?`原话证据`:`Source evidence`,` `,G?`· v${G.transcriptRevision}`:``]}),(0,$.jsx)(`button`,{"aria-label":h?`关闭`:`Close`,className:`inline-flex size-11 items-center justify-center rounded-lg hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:Ye,children:(0,$.jsx)(Qe,{className:`size-4`})})]}),(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-4 overflow-y-auto p-4`,children:[U?(0,$.jsxs)(`div`,{"aria-busy":`true`,className:`space-y-3`,children:[(0,$.jsx)($e,{className:`h-4 w-1/3`}),(0,$.jsx)($e,{className:`h-24 w-full`})]}):null,G?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:h?`按整段定位,不代表词句级时间。`:`Segment timing; not word-level alignment.`}),G.stale?(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:h?`原文已更新,以下保留当时版本的依据。`:`Transcript updated; showing the original evidence revision.`}):null,!G.audioAvailable||!G.timingVerified?(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:h?`原文仍可查看;原音不可用或时间定位待核实。`:`Text remains available; audio is missing or timing is unverified.`}):null,G.segments.map(t=>(0,$.jsxs)(`article`,{className:`space-y-2 rounded border border-edge p-3`,children:[(0,$.jsxs)(`p`,{className:`text-xs text-fg-muted`,children:[tn(t.startedAtMs),`–`,tn(t.endedAtMs),` · `,t.speakerLabel??(h?`说话人未明确`:`Unknown speaker`)]}),(0,$.jsx)(`p`,{className:`whitespace-pre-wrap text-sm leading-7`,children:t.text}),t.playback.map((e,t)=>(0,$.jsxs)(Y,{onClick:()=>We(e.startedAtMs,e.endedAtMs),children:[h?`播放原话`:`Play source`,` `,tn(e.startedAtMs),`–`,tn(e.endedAtMs)]},t)),!G.stale&&G.transcriptRevision===_?.transcript.revision&&G.transcriptRevision!==st.revision?(0,$.jsx)(Y,{onClick:()=>j(),children:h?`查看最新原文`:`View latest transcript`}):null,!G.stale&&G.transcriptRevision===_?.transcript.revision&&G.transcriptRevision===st.revision?(0,$.jsx)(Y,{onClick:()=>{ce(``),Ae(Math.max(ke,Math.ceil((st.segments.findIndex(e=>e.sequence===t.sequence)+1)/50))),B(`transcript`),Ne([t.sequence]),be(null),ge(!0),ne(e,{anchor:t.sequence,anchorRevision:st.revision}),window.setTimeout(()=>document.getElementById(`discussion-segment-${t.sequence}`)?.scrollIntoView?.({block:`center`}),0)},children:h?`定位原文`:`Locate transcript`}):null]},t.sequence))]}):null]})]}):null]}),mt?(0,$.jsx)(`footer`,{className:`shrink-0 border-t border-edge-subtle px-4 py-2`,children:(0,$.jsx)(`audio`,{ref:Le,controls:!0,preload:`metadata`,className:`h-10 w-full`,src:u(`${N}/audio`),"aria-label":h?`录音播放器`:`Recording player`,onDurationChange:e=>{let t=e.currentTarget.duration;Ve(Number.isFinite(t)&&t>0?{source:ft,ms:Math.floor(t*1e3)}:void 0)},onTimeUpdate:t=>{let n=t.currentTarget.currentTime*1e3;ne(e,{positionMs:n}),je.current!==null&&n>=je.current&&(t.currentTarget.pause(),je.current=null)},onLoadedMetadata:e=>{let t=e.currentTarget;ze.current===null?nn(t,z.source===ft?z.positionMs/1e3:0):(nn(t,ze.current),ze.current=null,it(t)&&t.play().catch(()=>{t.paused&&at(t)}))},onError:()=>Ee(h?`录音暂不可播放`:`Recording unavailable`)},ft)}):null,E&&ct?(0,$.jsx)($t,{initial:E,zh:h,busy:De,onClose:()=>D(null),onSave:e=>He(async()=>{await p(u(`${N}/summary`),{method:`PATCH`,body:JSON.stringify({...e,expectedRevision:ct.revision})}),D(null)})},`${E.kind}:${E.itemId}:${ct.revision}`):null,w?(0,$.jsx)(C,{open:!0,onOpenChange:e=>{e||T(null)},children:(0,$.jsxs)(b,{children:[(0,$.jsx)(g,{className:`xopc-dialog-overlay fixed inset-0 z-[70] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(x,{"aria-describedby":void 0,className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[71] flex h-[min(28rem,90dvh)] w-[min(36rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay`,children:[(0,$.jsxs)(`header`,{className:`flex items-center justify-between border-b border-edge p-4`,children:[(0,$.jsx)(S,{children:h?`校对逐字稿`:`Edit transcript`}),(0,$.jsx)(`button`,{"aria-label":h?`关闭校对`:`Close editor`,onClick:()=>T(null),children:(0,$.jsx)(Qe,{className:`size-4`})})]}),(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 space-y-3 overflow-y-auto p-4`,children:[(0,$.jsxs)(`label`,{className:`block text-xs`,children:[h?`本段说话人`:`Speaker for this segment`,(0,$.jsx)(`input`,{className:`mt-1 w-full rounded border border-edge bg-surface-inset p-2 text-sm`,value:w.speaker,onChange:e=>T({...w,speaker:e.target.value})})]}),w.segment.speakerLabel?(0,$.jsxs)(`label`,{className:`flex items-center gap-2 text-xs`,children:[(0,$.jsx)(`input`,{type:`checkbox`,className:`ui-checkbox`,checked:!!w.applyToSpeakerGroup,onChange:e=>T({...w,applyToSpeakerGroup:e.target.checked})}),h?`同时更名所有同标签片段;输入已有标签可合并说话人`:`Rename all segments with this label; use an existing label to merge speakers`]}):null,(0,$.jsx)(`textarea`,{className:`min-h-32 w-full rounded border border-edge bg-surface-inset p-2 text-sm`,value:w.text,onChange:e=>T({...w,text:e.target.value})})]}),(0,$.jsx)(`footer`,{className:`border-t border-edge p-3`,children:(0,$.jsxs)(Y,{variant:`primary`,disabled:De||!w.text.trim(),onClick:()=>void He(async()=>{await p(u(`${N}/segments/${w.segment.sequence}`),{method:`PATCH`,body:JSON.stringify({displayText:w.text,speakerLabel:w.speaker,expectedRevision:w.segment.revision,applyToSpeakerGroup:w.applyToSpeakerGroup,expectedTranscriptRevision:st.revision})}),T(null)}),children:[(0,$.jsx)(ue,{className:`size-4`}),h?`保存修订`:`Save revision`]})})]})]})}):null]})}var an={edit:He,ai_edit:qe,sync:We,restore:w};function on(e,t){return{edit:t.triggerEdit,ai_edit:t.triggerAiEdit,sync:t.triggerSync,restore:t.triggerRestore}[e]??e}function sn({noteId:e,activeTimestamp:t,onSelect:n,onClose:r,onRestored:i}){let a=f(e=>e.language),o=h(a).notes,s={justNow:o.justNow,minutesAgo:o.minutesAgo,today:o.today,yesterday:o.yesterday,daysAgo:o.daysAgo,locale:l(a)},{data:c}=rt(e?[`note-history`,e]:null,()=>Ae(e)),[u,d]=(0,Q.useState)(!1),[p,m]=(0,Q.useState)(null),[g,_]=(0,Q.useState)(null),v=(0,Q.useCallback)(async t=>{d(!0),_(null);try{await Te(e,t),m(null),i()}catch{_(o.restoreFailed)}finally{d(!1)}},[e,o.restoreSuccess,o.restoreFailed,i]),y=Date.now();return(0,$.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-between border-b border-edge px-4 py-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium text-fg`,children:[(0,$.jsx)(ye,{className:`size-4`,"aria-hidden":!0}),o.history]}),(0,$.jsx)(`button`,{type:`button`,onClick:r,className:`rounded-lg p-1 text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg`,children:(0,$.jsx)(Qe,{className:`size-4`,"aria-hidden":!0})})]}),(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:[g?(0,$.jsx)(`p`,{className:`border-b border-danger/20 bg-danger-soft px-4 py-2 text-xs text-danger`,role:`alert`,children:g}):null,c?.length?(0,$.jsx)(`ul`,{className:`divide-y divide-edge`,children:c.map(e=>{let r=an[e.trigger]??He,i=t===e.timestamp,a=p===e.timestamp;return(0,$.jsxs)(`li`,{children:[(0,$.jsxs)(`button`,{type:`button`,onClick:()=>n(e),className:q(`w-full px-4 py-3 text-left transition-colors`,i?`bg-accent/10`:`hover:bg-surface-hover`),children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(r,{className:`size-3.5 shrink-0 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`text-xs font-medium text-fg`,children:on(e.trigger,o)}),(0,$.jsx)(`span`,{className:`ml-auto text-xs text-fg-muted`,children:Mt(e.timestamp,y,s)})]}),e.snippet&&(0,$.jsx)(`p`,{className:`mt-1 truncate text-xs text-fg-muted/60`,children:e.snippet})]}),i&&(0,$.jsx)(`div`,{className:`border-t border-edge/50 px-4 py-2`,children:a?(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate text-xs text-fg-muted`,children:o.restoreConfirm}),(0,$.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),v(e.timestamp)},disabled:u,className:`shrink-0 rounded-lg bg-accent px-3 py-1 text-xs font-medium text-on-accent transition-colors hover:bg-accent/90 disabled:opacity-50`,children:u?`...`:o.restore}),(0,$.jsx)(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),m(null)},className:`shrink-0 rounded-lg px-2 py-1 text-xs text-fg-muted hover:bg-surface-hover`,children:`Cancel`})]}):(0,$.jsx)(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),m(e.timestamp)},className:`rounded-lg bg-surface-hover px-3 py-1 text-xs font-medium text-fg transition-colors hover:bg-accent hover:text-on-accent`,children:o.restore})})]},e.timestamp)})}):(0,$.jsxs)(`div`,{className:`px-4 py-8 text-center`,children:[(0,$.jsx)(`p`,{className:`text-sm font-medium text-fg-muted`,children:o.historyEmpty}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted/60`,children:o.historyEmptyDescription})]})]})]})}function cn({noteId:e,note:t,catalyzing:n,onCatalyze:r,onClose:i,noteThreads:a,openingChat:o,onOpenChat:c,onOpenNewChat:l}){let u=h(f(e=>e.language)).notes,d=s(),p=t?.aiDeep?.catalysis,m=p?.report??null,[g,_]=(0,Q.useState)(null),[v,y]=(0,Q.useState)(!1),{data:b,mutate:x,isLoading:S}=rt(e?[`note-agent-context-status`,e]:null,()=>Me(e),{revalidateOnFocus:!1}),C=(0,Q.useCallback)(async()=>{if(!v){y(!0),_(null);try{await x(()=>ze(e),{revalidate:!1})}catch(e){_(`${u.contextRebuildFailed}: ${e instanceof Error?e.message:u.quickCaptureFailedHint}`)}finally{y(!1)}}},[v,x,u.contextRebuildFailed,u.quickCaptureFailedHint,e]),w=(0,Q.useCallback)(async t=>{try{await we(e,t)}catch{}},[e]);return(0,$.jsxs)(`div`,{className:`flex h-full flex-col`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-b border-edge-subtle px-4 py-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(qe,{className:`size-4 text-accent`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`text-sm font-semibold text-fg`,children:u.catalysisSectionTitle})]}),(0,$.jsx)(`button`,{type:`button`,onClick:i,"aria-label":u.lightboxClose,className:`rounded-lg p-1.5 text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg`,children:(0,$.jsx)(T,{className:`size-4 rotate-180`,"aria-hidden":!0})})]}),(0,$.jsxs)(`div`,{className:`flex-1 overflow-y-auto p-4`,children:[(0,$.jsx)(`p`,{className:`mb-4 text-xs leading-relaxed text-fg-muted`,children:u.catalysisSectionDescription}),b?(0,$.jsxs)(`section`,{className:`mb-4 rounded-xl bg-surface-base p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:u.contextStatusTitle}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>void C(),disabled:S||v,className:`rounded-md px-1.5 py-0.5 text-[11px] font-medium text-accent transition-colors hover:bg-accent/10 disabled:cursor-not-allowed disabled:opacity-50`,children:v?u.processing:u.contextRebuild}),(0,$.jsx)(`span`,{className:q(`rounded-full px-2 py-0.5 text-[11px] font-medium`,b.status===`ready`?`bg-emerald-500/10 text-emerald-600 dark:text-emerald-300`:b.status===`partial`?`bg-amber-500/10 text-amber-600 dark:text-amber-300`:`bg-red-500/10 text-red-600 dark:text-red-300`),children:b.status})]}),(0,$.jsx)(`div`,{className:`mt-2 text-xs leading-relaxed text-fg-muted`,children:u.contextStatusDetail.replace(`{{attachments}}`,String(b.attachments.length)).replace(`{{tokens}}`,String(b.tokenEstimate??0))}),g?(0,$.jsx)(`p`,{className:`mt-3 rounded-lg border border-danger/25 bg-danger-soft px-3 py-2 text-xs text-danger`,role:`alert`,children:g}):null,b.attachments.length>0?(0,$.jsx)(`div`,{className:`mt-3 space-y-1.5`,children:b.attachments.slice(0,5).map(e=>(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded-lg bg-surface-hover px-2 py-1.5 text-xs`,children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate text-fg`,children:e.fileName}),(0,$.jsx)(`span`,{className:`shrink-0 text-fg-muted`,children:e.status})]},e.attachmentId))}):null]}):null,(0,$.jsx)(`button`,{type:`button`,onClick:r,disabled:n,className:`w-full rounded-lg bg-accent px-2.5 py-1.5 text-xs font-medium text-on-accent transition-colors hover:bg-accent/90 disabled:cursor-not-allowed disabled:opacity-50`,children:n?u.processing:m?u.recatalyze:u.catalyzeAction}),m?(0,$.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:u.valueHypothesis}),(0,$.jsx)(`p`,{className:`mt-1 text-sm leading-relaxed text-fg`,children:m.valueHypothesis})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:u.targetUsers}),(0,$.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1.5`,children:m.targetUsers.slice(0,5).map(e=>(0,$.jsx)(`span`,{className:`rounded-full bg-surface-hover px-2 py-0.5 text-xs text-fg`,children:e},e))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:u.keyQuestions}),(0,$.jsx)(`ul`,{className:`mt-1 space-y-1 text-sm leading-relaxed text-fg`,children:m.keyQuestions.slice(0,3).map(e=>(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`mt-2 size-1 shrink-0 rounded-full bg-accent`}),(0,$.jsx)(`span`,{children:e})]},e))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:u.mvpPathLabel}),(0,$.jsx)(`ol`,{className:`mt-1 space-y-1 text-sm leading-relaxed text-fg`,children:m.mvpPath.slice(0,3).map((e,t)=>(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsxs)(`span`,{className:`text-fg-muted`,children:[t+1,`.`]}),(0,$.jsx)(`span`,{children:e})]},e))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:u.risks}),(0,$.jsx)(`ul`,{className:`mt-1 space-y-1 text-sm leading-relaxed text-fg`,children:m.risks.slice(0,3).map(e=>(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`mt-2 size-1 shrink-0 rounded-full bg-fg-muted`}),(0,$.jsx)(`span`,{children:e})]},e))})]}),(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`div`,{className:`text-xs font-medium text-fg-muted`,children:u.nextActions}),(0,$.jsx)(`ul`,{className:`mt-1 space-y-1 text-sm leading-relaxed text-fg`,children:m.nextActions.slice(0,4).map(e=>(0,$.jsxs)(`li`,{className:`flex gap-2`,children:[(0,$.jsx)(`span`,{className:`rounded bg-accent/10 px-1.5 py-0.5 text-[10px] uppercase tracking-wide text-accent`,children:e.kind}),(0,$.jsx)(`span`,{children:e.text})]},`${e.kind}:${e.text}`))})]}),(0,$.jsxs)(`div`,{className:`flex items-center justify-between border-t border-edge-subtle pt-3`,children:[(0,$.jsx)(`span`,{className:`text-xs text-fg-muted`,children:u.confidenceLabel.replace(`{{percent}}`,String(Math.round(m.confidence*100)))}),(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,$.jsx)(`button`,{type:`button`,onClick:()=>void w(`helpful`),className:q(`rounded-lg p-1.5 text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg`,p?.feedback===`helpful`&&`bg-accent/10 text-accent`),"aria-label":u.feedbackHelpfulAria,children:(0,$.jsx)(A,{className:`size-3.5`,"aria-hidden":!0})}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>void w(`not_helpful`),className:q(`rounded-lg p-1.5 text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg`,p?.feedback===`not_helpful`&&`bg-accent/10 text-accent`),"aria-label":u.feedbackNotHelpfulAria,children:(0,$.jsx)(M,{className:`size-3.5`,"aria-hidden":!0})})]})]})]}):(0,$.jsx)(`div`,{className:`mt-4 rounded-lg border border-dashed border-edge-subtle px-3 py-6 text-center text-sm text-fg-muted`,children:u.noCatalysisReportHint}),(0,$.jsxs)(`section`,{className:`mt-6 rounded-xl bg-surface-base p-4`,children:[(0,$.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-semibold text-fg`,children:[(0,$.jsx)(Ve,{className:`size-4 text-accent`,"aria-hidden":!0}),u.relatedThreadsTitle]}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:u.relatedThreadsDescription})]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1.5`,children:[(0,$.jsx)(`button`,{type:`button`,onClick:c,disabled:o,className:`rounded-lg border border-edge px-2.5 py-1.5 text-xs font-medium text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg disabled:cursor-not-allowed disabled:opacity-50`,children:o?u.openingChat:u.openThread}),(0,$.jsx)(`button`,{type:`button`,onClick:l,disabled:o,className:`rounded-lg bg-accent px-2.5 py-1.5 text-xs font-medium text-on-accent transition-colors hover:bg-accent/90 disabled:cursor-not-allowed disabled:opacity-50`,children:u.newThread})]})]}),a.length>0?(0,$.jsx)(`div`,{className:`space-y-2`,children:a.slice(0,5).map(e=>(0,$.jsxs)(`button`,{type:`button`,onClick:()=>d(`/chat/${encodeURIComponent(e.key)}`),className:`w-full rounded-lg border border-edge-subtle px-3 py-2 text-left transition-colors hover:bg-surface-hover`,children:[(0,$.jsx)(`div`,{className:`truncate text-sm font-medium text-fg`,children:e.name||u.noteDiscussionFallback}),(0,$.jsx)(`div`,{className:`mt-0.5 text-xs text-fg-muted`,children:u.messageCount.replace(`{{count}}`,String(e.messageCount??0))})]},e.key))}):(0,$.jsx)(`div`,{className:`rounded-lg border border-dashed border-edge-subtle px-3 py-5 text-center text-sm text-fg-muted`,children:u.noThreads})]})]})]})}var ln=[{value:`86400000`,zh:`24 小时`,en:`24 hours`},{value:`604800000`,zh:`7 天`,en:`7 days`},{value:`2592000000`,zh:`30 天`,en:`30 days`}];function un({open:e,onOpenChange:t,note:n}){let r=f(e=>e.language)===`zh`,i=r?mn:hn,{data:a,mutate:o}=rt(e?[`note-shares`,n.id]:null,()=>Ne(n.id)),s=rt(e?`hosted-share-auth-status`:null,ft),c=s.data===!0,l=rt(e&&c?`hosted-publication-capabilities`:null,mt),u=l.data?.publishing.allowed===!0,d=rt(e&&c?[`hosted-note-publications`,n.id]:null,()=>ke(n.id)),[p,m]=(0,Q.useState)(new Set),[h,_]=(0,Q.useState)(`86400000`),[w,T]=(0,Q.useState)(``),[E,O]=(0,Q.useState)(``),[k,A]=(0,Q.useState)(`hosted`),[j,M]=(0,Q.useState)(!1),[N,P]=(0,Q.useState)(null),[F,I]=(0,Q.useState)(null),[L,R]=(0,Q.useState)(!1),[ee,z]=(0,Q.useState)(null),te=(0,Q.useMemo)(()=>{let e=new Set;return n.markdown.replace(/xopc-attachment:\/\/notes\/([^/]+)\/([^\s)]+)/gi,(t,r,i)=>{try{decodeURIComponent(r)===n.id&&e.add(decodeURIComponent(i))}catch{}return t}),(n.attachments??[]).filter(t=>e.has(t.id))},[n.attachments,n.id,n.markdown]);(0,Q.useEffect)(()=>{e&&(m(new Set(te.map(e=>e.id))),I(null),R(!1),z(null))},[e,te]);let ne=async()=>{M(!0),z(null);try{let e={expectedNoteVersion:n.updatedAt,attachmentIds:[...p],ttlMs:Number(h),maxViews:w.trim()?Number(w):null,description:E.trim()||void 0};if(k===`hosted`){let t=await Fe(n.id,e);I(t.shareUrl),await d.mutate()}else{let t=await De(n.id,e);I(t.payload.shareUrl),await o()}}catch(e){z(e instanceof Error?e.message:String(e))}finally{M(!1)}},re=async(e,t)=>{P(e.id),z(null);try{t===`refresh`?await G(n.id,e.id,{expectedNoteVersion:n.updatedAt,attachmentIds:[...p]}):await ht(e.id),await d.mutate()}catch(e){z(e instanceof Error?e.message:String(e))}finally{P(null)}},ie=async(e,t)=>{P(e.id),z(null);try{t===`refresh`?await Re(n.id,e.id,{expectedNoteVersion:n.updatedAt,attachmentIds:[...p]}):t===`extend`?await pt(e.id,864e5):await dt(e.id),await o()}catch(e){z(e instanceof Error?e.message:String(e))}finally{P(null)}},B=async e=>{z(null);try{if(!await X(e)){R(!1),z(i.copyFailed);return}R(!0),window.setTimeout(()=>R(!1),1500)}catch{R(!1),z(i.copyFailed)}};return(0,$.jsx)(C,{open:e,onOpenChange:t,children:(0,$.jsxs)(b,{children:[(0,$.jsx)(g,{className:`xopc-dialog-overlay fixed inset-0 z-[70] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(x,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[71] flex h-[min(42rem,calc(100dvh-2rem))] w-[min(40rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-popover outline-none`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-start justify-between border-b border-edge px-5 py-4`,children:[(0,$.jsxs)(`div`,{children:[(0,$.jsxs)(S,{className:`flex items-center gap-2 text-base font-semibold text-fg`,children:[(0,$.jsx)(D,{className:`size-4`}),i.title]}),(0,$.jsx)(v,{className:`mt-1 text-xs text-fg-muted`,children:i.description})]}),(0,$.jsx)(y,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,className:`rounded-md p-1.5 text-fg-muted hover:bg-surface-hover`,"aria-label":i.close,children:(0,$.jsx)(Qe,{className:`size-4`})})})]}),(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-5`,children:[(0,$.jsxs)(`section`,{className:`rounded-lg border border-edge bg-surface-inset p-4`,children:[(0,$.jsx)(`div`,{className:`text-sm font-semibold text-fg`,children:n.title||i.untitled}),(0,$.jsx)(`p`,{className:`mt-2 line-clamp-4 whitespace-pre-wrap text-xs leading-5 text-fg-muted`,children:n.markdown||i.empty}),(0,$.jsx)(`p`,{className:`mt-3 text-xs text-fg-subtle`,children:i.privateExcluded})]}),te.length>0?(0,$.jsxs)(`section`,{className:`mt-5`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-medium text-fg`,children:i.attachments}),(0,$.jsx)(`div`,{className:`mt-2 grid gap-2`,children:te.map(e=>(0,$.jsxs)(`label`,{className:`flex items-center gap-3 rounded-lg border border-edge-subtle px-3 py-2 text-sm text-fg-muted`,children:[(0,$.jsx)(`input`,{type:`checkbox`,checked:p.has(e.id),onChange:()=>m(t=>{let n=new Set(t);return n.has(e.id)?n.delete(e.id):n.add(e.id),n}),className:`accent-accent`}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.fileName}),(0,$.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:pn(e.size)})]},e.id))})]}):null,(0,$.jsxs)(`section`,{className:`mt-5 grid gap-4 sm:grid-cols-2`,children:[(0,$.jsxs)(`label`,{className:`grid gap-1.5 text-xs text-fg-muted sm:col-span-2`,children:[i.delivery,(0,$.jsxs)(fe,{value:k,onChange:e=>A(e.target.value),children:[(0,$.jsx)(pe,{value:`hosted`,children:i.deliveryHosted}),(0,$.jsx)(pe,{value:`local`,children:i.deliveryLocal})]})]}),k===`hosted`&&s.data===!1?(0,$.jsx)(`div`,{className:`sm:col-span-2`,children:(0,$.jsx)(St,{providerId:`xopc-share`,displayName:`XOPC Hosted Share`,connected:!1,onConnected:()=>void s.mutate(!0,{revalidate:!1})})}):null,k===`hosted`&&c&&l.data&&!u?(0,$.jsx)(`p`,{className:`rounded-lg border border-warning/30 bg-warning-soft px-3 py-2 text-xs text-warning sm:col-span-2`,children:i.hostedDisabled}):null,(0,$.jsxs)(`label`,{className:`grid gap-1.5 text-xs text-fg-muted`,children:[i.expires,(0,$.jsx)(fe,{value:h,onChange:e=>_(e.target.value),children:ln.map(e=>(0,$.jsx)(pe,{value:e.value,children:r?e.zh:e.en},e.value))})]}),(0,$.jsxs)(`label`,{className:`grid gap-1.5 text-xs text-fg-muted`,children:[i.maxViews,(0,$.jsx)(`input`,{type:`number`,min:1,max:1e3,value:w,onChange:e=>T(e.target.value),placeholder:i.unlimited,className:`h-9 rounded-md border border-edge bg-surface-panel px-3 text-sm text-fg outline-none focus:border-accent`})]}),(0,$.jsxs)(`label`,{className:`grid gap-1.5 text-xs text-fg-muted sm:col-span-2`,children:[i.publicDescription,(0,$.jsx)(`input`,{value:E,onChange:e=>O(e.target.value),className:`h-9 rounded-md border border-edge bg-surface-panel px-3 text-sm text-fg outline-none focus:border-accent`})]})]}),F?(0,$.jsx)(`div`,{className:`mt-5 rounded-lg border border-success/25 bg-success-soft p-3`,children:(0,$.jsxs)(`div`,{className:`flex gap-2`,children:[(0,$.jsx)(`input`,{readOnly:!0,value:F,className:`min-w-0 flex-1 bg-transparent text-xs text-fg outline-none`}),(0,$.jsxs)(Y,{type:`button`,className:`px-2 py-1 text-xs`,variant:`ghost`,onClick:()=>void B(F),children:[L?(0,$.jsx)(ue,{className:`size-4`}):(0,$.jsx)(U,{className:`size-4`}),L?i.copied:i.copy]}),(0,$.jsxs)(Y,{type:`button`,className:`px-2 py-1 text-xs`,variant:`ghost`,onClick:()=>window.open(F,`_blank`,`noopener,noreferrer`),children:[(0,$.jsx)(ge,{className:`size-4`}),i.open]})]})}):null,ee?(0,$.jsx)(`p`,{className:`mt-4 rounded-lg border border-danger/25 bg-danger-soft px-3 py-2 text-sm text-danger`,children:ee}):null,(a?.items.length??0)>0?(0,$.jsxs)(`section`,{className:`mt-6 border-t border-edge pt-5`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-medium text-fg`,children:i.activeLinks}),(0,$.jsx)(`div`,{className:`mt-2 grid gap-2`,children:a.items.map(e=>(0,$.jsx)(fn,{share:e,busy:N===e.id,t:i,onCopy:B,onAction:ie},e.id))})]}):null,(d.data?.length??0)>0?(0,$.jsxs)(`section`,{className:`mt-6 border-t border-edge pt-5`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-medium text-fg`,children:i.hostedLinks}),(0,$.jsx)(`div`,{className:`mt-2 grid gap-2`,children:d.data.map(e=>(0,$.jsx)(dn,{publication:e,stale:e.source?.version!==String(n.updatedAt),busy:N===e.id,publishingAllowed:u,t:i,onCopy:B,onAction:re},e.id))})]}):null]}),(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center justify-end gap-2 border-t border-edge px-5 py-3`,children:[(0,$.jsx)(y,{asChild:!0,children:(0,$.jsx)(Y,{type:`button`,variant:`ghost`,children:i.close})}),(0,$.jsxs)(Y,{type:`button`,onClick:()=>void ne(),disabled:j||k===`hosted`&&(!c||!u),children:[j?(0,$.jsx)(K,{className:`size-4 animate-spin`}):(0,$.jsx)(D,{className:`size-4`}),j?i.creating:i.create]})]})]})]})})}function dn(e){let t=(0,Dt.c)(64),{publication:n,stale:r,busy:i,publishingAllowed:a,t:o,onCopy:s,onAction:c}=e,l=n.revoked||n.expired,u=l&&`opacity-60`,d;t[0]===u?d=t[1]:(d=q(`rounded-lg border border-edge-subtle p-3`,u),t[0]=u,t[1]=d);let f=r&&!l?o.stale:l?o.inactive:o.active,p;t[2]===f?p=t[3]:(p=(0,$.jsx)(`span`,{children:f}),t[2]=f,t[3]=p);let m;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,$.jsx)(`span`,{children:`·`}),t[4]=m):m=t[4];let h=n.maxViews===null?``:` / ${n.maxViews}`,g;t[5]!==n.viewCount||t[6]!==o.views||t[7]!==h?(g=(0,$.jsxs)(`span`,{children:[o.views,` `,n.viewCount,h]}),t[5]=n.viewCount,t[6]=o.views,t[7]=h,t[8]=g):g=t[8];let _;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,$.jsx)(`span`,{children:`·`}),t[9]=_):_=t[9];let v;t[10]!==n.revision||t[11]!==o.revision?(v=(0,$.jsxs)(`span`,{children:[o.revision,` `,n.revision]}),t[10]=n.revision,t[11]=o.revision,t[12]=v):v=t[12];let y;t[13]!==p||t[14]!==g||t[15]!==v?(y=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-fg-muted`,children:[p,m,g,_,v]}),t[13]=p,t[14]=g,t[15]=v,t[16]=y):y=t[16];let b;t[17]===n.shareUrl?b=t[18]:(b=(0,$.jsx)(`div`,{className:`mt-1 truncate text-xs text-fg-subtle`,children:n.shareUrl}),t[17]=n.shareUrl,t[18]=b);let x;t[19]!==y||t[20]!==b?(x=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[y,b]}),t[19]=y,t[20]=b,t[21]=x):x=t[21];let S;t[22]===i?S=t[23]:(S=i?(0,$.jsx)(K,{className:`size-4 animate-spin text-fg-muted`}):null,t[22]=i,t[23]=S);let C;t[24]!==x||t[25]!==S?(C=(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[x,S]}),t[24]=x,t[25]=S,t[26]=C):C=t[26];let w=!a,T;t[27]!==s||t[28]!==n.shareUrl?(T=()=>void s(n.shareUrl),t[27]=s,t[28]=n.shareUrl,t[29]=T):T=t[29];let E;t[30]===Symbol.for(`react.memo_cache_sentinel`)?(E=(0,$.jsx)(U,{className:`size-3.5`}),t[30]=E):E=t[30];let D;t[31]!==o.copy||t[32]!==w||t[33]!==T?(D=(0,$.jsxs)(Y,{className:`px-2 py-1 text-xs`,variant:`ghost`,disabled:w,onClick:T,children:[E,o.copy]}),t[31]=o.copy,t[32]=w,t[33]=T,t[34]=D):D=t[34];let O=!a,k;t[35]===n.shareUrl?k=t[36]:(k=()=>window.open(n.shareUrl,`_blank`,`noopener,noreferrer`),t[35]=n.shareUrl,t[36]=k);let A;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsx)(ge,{className:`size-3.5`}),t[37]=A):A=t[37];let j;t[38]!==o.open||t[39]!==O||t[40]!==k?(j=(0,$.jsxs)(Y,{className:`px-2 py-1 text-xs`,variant:`ghost`,disabled:O,onClick:k,children:[A,o.open]}),t[38]=o.open,t[39]=O,t[40]=k,t[41]=j):j=t[41];let M;t[42]!==i||t[43]!==l||t[44]!==c||t[45]!==n||t[46]!==a||t[47]!==r||t[48]!==o.refresh?(M=r&&!l?(0,$.jsxs)(Y,{className:`px-2 py-1 text-xs`,variant:`ghost`,disabled:i||!a,onClick:()=>void c(n,`refresh`),children:[(0,$.jsx)(We,{className:`size-3.5`}),o.refresh]}):null,t[42]=i,t[43]=l,t[44]=c,t[45]=n,t[46]=a,t[47]=r,t[48]=o.refresh,t[49]=M):M=t[49];let N;t[50]!==i||t[51]!==c||t[52]!==n||t[53]!==o.revoke?(N=n.revoked?null:(0,$.jsxs)(Y,{className:`px-2 py-1 text-xs`,variant:`ghost`,disabled:i,onClick:()=>void c(n,`revoke`),children:[(0,$.jsx)(Xe,{className:`size-3.5`}),o.revoke]}),t[50]=i,t[51]=c,t[52]=n,t[53]=o.revoke,t[54]=N):N=t[54];let P;t[55]!==D||t[56]!==j||t[57]!==M||t[58]!==N?(P=(0,$.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:[D,j,M,N]}),t[55]=D,t[56]=j,t[57]=M,t[58]=N,t[59]=P):P=t[59];let F;return t[60]!==C||t[61]!==d||t[62]!==P?(F=(0,$.jsxs)(`div`,{className:d,children:[C,P]}),t[60]=C,t[61]=d,t[62]=P,t[63]=F):F=t[63],F}function fn(e){let t=(0,Dt.c)(68),{share:n,busy:r,t:i,onCopy:a,onAction:o}=e,s=n.revoked||n.expired,c=s&&`opacity-60`,l;t[0]===c?l=t[1]:(l=q(`rounded-lg border border-edge-subtle p-3`,c),t[0]=c,t[1]=l);let u=n.stale&&!s?i.stale:s?i.inactive:i.active,d;t[2]===u?d=t[3]:(d=(0,$.jsx)(`span`,{children:u}),t[2]=u,t[3]=d);let f;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(`span`,{children:`·`}),t[4]=f):f=t[4];let p=n.maxViews===null?``:` / ${n.maxViews}`,m;t[5]!==n.viewCount||t[6]!==i.views||t[7]!==p?(m=(0,$.jsxs)(`span`,{children:[i.views,` `,n.viewCount,p]}),t[5]=n.viewCount,t[6]=i.views,t[7]=p,t[8]=m):m=t[8];let h;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,$.jsx)(`span`,{children:`·`}),t[9]=h):h=t[9];let g;t[10]===n.expiresAt?g=t[11]:(g=new Date(n.expiresAt).toLocaleDateString(),t[10]=n.expiresAt,t[11]=g);let _;t[12]===g?_=t[13]:(_=(0,$.jsx)(`span`,{children:g}),t[12]=g,t[13]=_);let v;t[14]!==_||t[15]!==d||t[16]!==m?(v=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-fg-muted`,children:[d,f,m,h,_]}),t[14]=_,t[15]=d,t[16]=m,t[17]=v):v=t[17];let y;t[18]===n.shareUrl?y=t[19]:(y=(0,$.jsx)(`div`,{className:`mt-1 truncate text-xs text-fg-subtle`,children:n.shareUrl}),t[18]=n.shareUrl,t[19]=y);let b;t[20]!==v||t[21]!==y?(b=(0,$.jsxs)(`div`,{className:`min-w-0`,children:[v,y]}),t[20]=v,t[21]=y,t[22]=b):b=t[22];let x;t[23]===r?x=t[24]:(x=r?(0,$.jsx)(K,{className:`size-4 animate-spin text-fg-muted`}):null,t[23]=r,t[24]=x);let S;t[25]!==b||t[26]!==x?(S=(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[b,x]}),t[25]=b,t[26]=x,t[27]=S):S=t[27];let C;t[28]!==a||t[29]!==n.shareUrl?(C=()=>void a(n.shareUrl),t[28]=a,t[29]=n.shareUrl,t[30]=C):C=t[30];let w;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(w=(0,$.jsx)(U,{className:`size-3.5`}),t[31]=w):w=t[31];let T;t[32]!==i.copy||t[33]!==C?(T=(0,$.jsxs)(Y,{className:`px-2 py-1 text-xs`,variant:`ghost`,onClick:C,children:[w,i.copy]}),t[32]=i.copy,t[33]=C,t[34]=T):T=t[34];let E;t[35]===n.shareUrl?E=t[36]:(E=()=>window.open(n.shareUrl,`_blank`,`noopener,noreferrer`),t[35]=n.shareUrl,t[36]=E);let D;t[37]===Symbol.for(`react.memo_cache_sentinel`)?(D=(0,$.jsx)(ge,{className:`size-3.5`}),t[37]=D):D=t[37];let O;t[38]!==i.open||t[39]!==E?(O=(0,$.jsxs)(Y,{className:`px-2 py-1 text-xs`,variant:`ghost`,onClick:E,children:[D,i.open]}),t[38]=i.open,t[39]=E,t[40]=O):O=t[40];let k;t[41]!==r||t[42]!==s||t[43]!==o||t[44]!==n||t[45]!==i.refresh?(k=n.stale&&!s?(0,$.jsxs)(Y,{className:`px-2 py-1 text-xs`,variant:`ghost`,disabled:r,onClick:()=>void o(n,`refresh`),children:[(0,$.jsx)(We,{className:`size-3.5`}),i.refresh]}):null,t[41]=r,t[42]=s,t[43]=o,t[44]=n,t[45]=i.refresh,t[46]=k):k=t[46];let A;t[47]!==r||t[48]!==s||t[49]!==o||t[50]!==n||t[51]!==i.extend?(A=s?null:(0,$.jsx)(Y,{className:`px-2 py-1 text-xs`,variant:`ghost`,disabled:r,onClick:()=>void o(n,`extend`),children:i.extend}),t[47]=r,t[48]=s,t[49]=o,t[50]=n,t[51]=i.extend,t[52]=A):A=t[52];let j;t[53]!==r||t[54]!==o||t[55]!==n||t[56]!==i.revoke?(j=n.revoked?null:(0,$.jsxs)(Y,{className:`px-2 py-1 text-xs`,variant:`ghost`,disabled:r,onClick:()=>void o(n,`revoke`),children:[(0,$.jsx)(Xe,{className:`size-3.5`}),i.revoke]}),t[53]=r,t[54]=o,t[55]=n,t[56]=i.revoke,t[57]=j):j=t[57];let M;t[58]!==T||t[59]!==O||t[60]!==k||t[61]!==A||t[62]!==j?(M=(0,$.jsxs)(`div`,{className:`mt-2 flex flex-wrap gap-1`,children:[T,O,k,A,j]}),t[58]=T,t[59]=O,t[60]=k,t[61]=A,t[62]=j,t[63]=M):M=t[63];let N;return t[64]!==S||t[65]!==l||t[66]!==M?(N=(0,$.jsxs)(`div`,{className:l,children:[S,M]}),t[64]=S,t[65]=l,t[66]=M,t[67]=N):N=t[67],N}function pn(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`}var mn={title:`分享笔记`,description:`创建一个无需登录即可查看的只读快照。`,close:`关闭`,untitled:`无标题笔记`,empty:`空笔记`,privateExcluded:`不会分享标签、AI 元数据、项目、讨论、历史版本或未引用附件。`,attachments:`包含的附件`,expires:`有效期`,maxViews:`最多查看次数`,unlimited:`不限`,publicDescription:`公开说明(可选)`,create:`创建分享链接`,creating:`创建中…`,copy:`复制`,copied:`已复制`,open:`打开`,activeLinks:`这条笔记的分享`,copyFailed:`无法复制到剪贴板,请手动选择链接并复制。`,delivery:`发布方式`,deliveryHosted:`平台托管(外网稳定访问)`,deliveryLocal:`本机直连(需要隧道或公网部署)`,hostedLinks:`平台托管发布`,revision:`版本`,hostedDisabled:`管理员已暂停你的公网分享能力。已有托管链接当前不可访问,但仍可撤销。`,stale:`旧版本`,inactive:`已失效`,active:`有效`,views:`查看`,refresh:`更新快照`,extend:`延长 24 小时`,revoke:`撤销`},hn={title:`Share Note`,description:`Create a read-only snapshot that opens without sign-in.`,close:`Close`,untitled:`Untitled Note`,empty:`Empty Note`,privateExcluded:`Tags, AI metadata, projects, discussions, history, and unreferenced attachments are excluded.`,attachments:`Included attachments`,expires:`Expires`,maxViews:`Maximum views`,unlimited:`Unlimited`,publicDescription:`Public description (optional)`,create:`Create share link`,creating:`Creating…`,copy:`Copy`,copied:`Copied`,open:`Open`,activeLinks:`Shares for this Note`,copyFailed:`Could not copy to the clipboard. Select the link and copy it manually.`,delivery:`Publishing method`,deliveryHosted:`Hosted platform (stable public access)`,deliveryLocal:`Direct from this device (requires public access)`,hostedLinks:`Hosted publications`,revision:`Revision`,hostedDisabled:`An administrator has paused public sharing for your account. Existing hosted links are unavailable, but can still be revoked.`,stale:`Older version`,inactive:`Inactive`,active:`Active`,views:`Views`,refresh:`Update snapshot`,extend:`Extend 24 hours`,revoke:`Revoke`},gn=e(n(),1);function _n({noteId:e,selection:t,zh:n,onDismiss:r,onAsk:i}){let[a,o]=(0,Q.useState)(null),[s,c]=(0,Q.useState)(!1),[l,d]=(0,Q.useState)(``),[f,m]=(0,Q.useState)(!1),h=(0,Q.useRef)(null),g=(0,Q.useRef)(null),[_,v]=(0,Q.useState)({left:8,top:8}),y=s||a!==null||!!l,b=t.text.length>16e3;function x(){h.current?.abort(),r(),t.restore()}(0,Q.useEffect)(()=>{o(null),c(!1),d(``),m(!1);let e=e=>{g.current?.contains(e.target)||r()},n=e=>{e.key===`Escape`&&(e.preventDefault(),r(),t.restore())},i=e=>{!g.current?.contains(e.target)&&!h.current&&!g.current?.contains(document.activeElement)&&r()};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,n),window.addEventListener(`resize`,r),window.addEventListener(`scroll`,i,!0),()=>{h.current?.abort(),h.current=null,document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,n),window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,i,!0)}},[t,r]),(0,Q.useLayoutEffect)(()=>{let e=g.current?.getBoundingClientRect();if(!e)return;let n=Math.max(8,Math.min(t.rect.left,window.innerWidth-e.width-8)),r=t.rect.bottom+8,i=r+e.height<=window.innerHeight-8?r:Math.max(8,t.rect.top-e.height-8);v({left:n,top:i})},[t,y,a,l]);async function S(r){h.current?.abort();let i=new AbortController;h.current=i,c(!0),d(``),o(null),m(!1);try{let a=await p(u(`/api/notes/${encodeURIComponent(e)}/ai/edit`),{method:`POST`,signal:i.signal,body:JSON.stringify({instruction:r,markdown:t.text})});if(i.signal.aborted)return;let s=a.patch.operations.filter(e=>e.type===`replaceRange`).map(e=>e.markdown??``).join(`
|
|
3
|
-
|
|
4
|
-
`);if(!s.trim())throw Error(n?`没有可用结果,请重试。`:`No result available. Try again.`);o(s)}catch(e){i.signal.aborted||d(e instanceof Error?e.message:String(e))}finally{i.signal.aborted||(c(!1),h.current=null)}}return(0,gn.createPortal)((0,$.jsxs)(`div`,{ref:g,role:`region`,"data-note-selection-actions":!0,"aria-keyshortcuts":`Alt+Enter`,"aria-label":n?`笔记选段操作`:`Note selection actions`,className:`fixed z-[80] flex max-h-[calc(100dvh-1rem)] max-w-[calc(100vw-1rem)] flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay text-fg shadow-popover ${y?`w-96`:``}`,style:_,onPointerDown:e=>{e.target.closest(`button`)&&e.preventDefault()},children:[(0,$.jsxs)(`div`,{role:`group`,"aria-label":n?`选段操作`:`Selection actions`,className:`flex shrink-0 flex-wrap items-center gap-1 p-1`,children:[(0,$.jsx)(Y,{variant:`ghost`,className:`text-xs`,disabled:s||b,onClick:()=>void S(`summary`),children:n?`摘要预览`:`Summary`}),(0,$.jsx)(Y,{variant:`ghost`,className:`text-xs`,disabled:s||b,onClick:()=>void S(`todo`),children:n?`提取待办`:`Extract to-dos`}),(0,$.jsx)(Y,{variant:`ghost`,className:`text-xs`,disabled:s||b,onClick:()=>i(t.text),children:n?`引用提问`:`Ask about selection`}),(0,$.jsx)(`button`,{type:`button`,className:`inline-flex size-9 items-center justify-center rounded-lg hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":n?`关闭选段操作`:`Close selection actions`,onClick:x,children:(0,$.jsx)(Qe,{className:`size-4`})})]}),b?(0,$.jsx)(`p`,{className:`px-3 pb-3 text-xs text-fg-muted`,children:n?`请选择不超过 16000 字的片段。`:`Select up to 16,000 characters.`}):null,y?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-y-auto border-t border-edge-subtle p-3`,children:[(0,$.jsx)(`p`,{className:`mb-3 text-xs text-fg-muted`,children:n?`按选段生成的本地整理预览,尚未写入笔记。`:`Local preview of the selection. Your note is unchanged.`}),s?(0,$.jsxs)(`div`,{"aria-busy":`true`,className:`space-y-2`,children:[(0,$.jsx)($e,{className:`h-4 w-full`}),(0,$.jsx)($e,{className:`h-4 w-2/3`})]}):null,a===null?null:(0,$.jsx)(`pre`,{className:`whitespace-pre-wrap break-words font-sans text-sm leading-6`,children:a}),l?(0,$.jsx)(`p`,{role:`alert`,className:`text-xs text-danger`,children:l}):null]}),a===null?null:(0,$.jsxs)(`div`,{className:`flex shrink-0 justify-end gap-2 border-t border-edge-subtle p-2`,children:[(0,$.jsx)(Y,{variant:`ghost`,onClick:()=>void X(a).then(e=>{m(e),e||d(n?`复制失败,请重试。`:`Copy failed. Try again.`)}),children:f?n?`已复制`:`Copied`:n?`复制结果`:`Copy`}),(0,$.jsx)(Y,{variant:`primary`,onClick:()=>{t.insertAfter(a)?r():d(n?`正文已变化,请重新选择片段后再整理。`:`The note changed. Select the passage again.`)},children:n?`插入选段后`:`Insert after selection`})]})]}):null]}),document.body)}function vn(e){let t=(0,Dt.c)(18),{input:n,labels:r,showLabel:i}=e,a=i===void 0||i,o;t[0]===n?o=t[1]:(o=n(),t[0]=n,t[1]=o);let s=o.source.id,c;t[2]===s?c=t[3]:(c=e=>e.source?.type===`note`&&e.source.id===s&&e.status!==`idle`,t[2]=s,t[3]=c);let l=et(c),u;t[4]===s?u=t[5]:(u=e=>e.source?.type===`note`&&e.source.id===s&&e.status===`preparing`,t[4]=s,t[5]=u);let d=et(u),f=et(yn),p;t[6]!==n||t[7]!==r||t[8]!==d||t[9]!==a?(p=(0,$.jsx)(E,{input:n,labels:r,disabled:d,showLabel:a}),t[6]=n,t[7]=r,t[8]=d,t[9]=a,t[10]=p):p=t[10];let m;t[11]!==l||t[12]!==r||t[13]!==f?(m=l?(0,$.jsx)(`button`,{type:`button`,onClick:f,title:r.stop,"aria-label":r.stop,className:`inline-flex size-8 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:(0,$.jsx)(Ye,{className:`size-3.5`,"aria-hidden":!0})}):null,t[11]=l,t[12]=r,t[13]=f,t[14]=m):m=t[14];let h;return t[15]!==p||t[16]!==m?(h=(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[p,m]}),t[15]=p,t[16]=m,t[17]=h):h=t[17],h}function yn(e){return e.stop}function bn(e,t){let n=J(t.replace(/^\s*(`{3,}|~{3,})[^\n]*$/gm,``).replace(/xopc-attachment:\/\/[^\s)]+/g,``).replace(/^(\s*[-*+]\s+)\[[ xX]\]\s*/gm,`$1`)),r=J(e);return!r||n.split(`
|
|
5
|
-
`)[0]===r?n:[r,n].filter(Boolean).join(`
|
|
6
|
-
|
|
7
|
-
`)}var xn=()=>a(()=>import(`./block-editor-CYobheuw.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47])),Sn=()=>a(()=>import(`./markdown-editor-CjQJ-Nho.js`),__vite__mapDeps([48,1,2,43,49,18])),Cn=(0,Q.lazy)(()=>a(()=>import(`./chat-page-CK4aWVbI.js`).then(e=>e.n).then(e=>({default:e.ChatPage})),__vite__mapDeps([50,1,16,2,18,17,3,4,11,12,13,6,51,52,53,54,55,56,57,58,59,60,61,9,34,62,36,38,63,64,65,66,67,68,22,23,69,26,70,25,71,72,73,74,75,76,77,45,78,79,80,40,81,82,83,7,84,85,86,87,88,89,90,91,32,92,93,41,94,95,96,97,98,99,100,8,101,14,102,103,19,104,105,106,107,108,109,110,111,10,15,20,21,24,27,28,29,30,31,112,113,114,115,33,116,35,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,37,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,42,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225]))),wn=(0,Q.lazy)(()=>xn().then(e=>({default:e.BlockEditor}))),Tn=(0,Q.lazy)(()=>Sn().then(e=>({default:e.MarkdownEditor})));function En(){let e=(0,Dt.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col px-6 py-4`,"aria-busy":!0,children:[(0,$.jsx)(`div`,{className:`h-8 w-56 max-w-full animate-pulse rounded-md bg-surface-hover`}),(0,$.jsx)(`div`,{className:`mt-6 h-4 w-11/12 animate-pulse rounded bg-surface-hover`}),(0,$.jsx)(`div`,{className:`mt-3 h-4 w-9/12 animate-pulse rounded bg-surface-hover`}),(0,$.jsx)(`div`,{className:`mt-3 h-4 w-10/12 animate-pulse rounded bg-surface-hover`})]}),e[0]=t):t=e[0],t}function Dn(e){let t=(0,Dt.c)(29),{mode:n,onModeChange:r,labels:i}=e,a;t[0]===i.edit?a=t[1]:(a={id:`wysiwyg`,label:i.edit,Icon:ve},t[0]=i.edit,t[1]=a);let o;t[2]===i.source?o=t[3]:(o={id:`source`,label:i.source,Icon:H},t[2]=i.source,t[3]=o);let s;t[4]===i.preview?s=t[5]:(s={id:`preview`,label:i.preview,Icon:_e},t[4]=i.preview,t[5]=s);let c;t[6]!==a||t[7]!==o||t[8]!==s?(c=[a,o,s],t[6]=a,t[7]=o,t[8]=s,t[9]=c):c=t[9];let l=c,u;t[10]!==n||t[11]!==l?(u=l.find(e=>e.id===n)??l[0],t[10]=n,t[11]=l,t[12]=u):u=t[12];let d=u,f=d.Icon,p=On,m;t[13]===f?m=t[14]:(m=(0,$.jsx)(f,{className:`size-3.5`,"aria-hidden":!0}),t[13]=f,t[14]=m);let h;t[15]===d.label?h=t[16]:(h=(0,$.jsx)(`span`,{children:d.label}),t[15]=d.label,t[16]=h);let g;t[17]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,$.jsx)(de,{className:`size-3 text-fg-subtle`,"aria-hidden":!0}),t[17]=g):g=t[17];let _;t[18]!==d.label||t[19]!==m||t[20]!==h?(_=(0,$.jsx)(_t,{asChild:!0,children:(0,$.jsxs)(`button`,{type:`button`,"aria-label":d.label,className:`inline-flex h-8 items-center gap-1.5 rounded-lg border border-edge px-2.5 text-xs font-medium text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[m,h,g]})}),t[18]=d.label,t[19]=m,t[20]=h,t[21]=_):_=t[21];let v;t[22]!==n||t[23]!==l||t[24]!==r?(v=(0,$.jsx)(vt,{children:(0,$.jsx)(bt,{align:`end`,sideOffset:6,className:`z-50 min-w-36 rounded-xl border border-edge bg-surface-overlay p-1 shadow-popover`,children:l.map(e=>{let{id:t,label:i,Icon:a}=e;return(0,$.jsxs)(yt,{onSelect:()=>r(t),onPointerMove:()=>p(t),onFocus:()=>p(t),className:`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none hover:bg-surface-hover focus:bg-surface-hover`,children:[(0,$.jsx)(a,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`flex-1`,children:i}),n===t?(0,$.jsx)(ue,{className:`size-4 text-accent`,"aria-hidden":!0}):null]},t)})})}),t[22]=n,t[23]=l,t[24]=r,t[25]=v):v=t[25];let y;return t[26]!==v||t[27]!==_?(y=(0,$.jsxs)(gt,{modal:!1,children:[_,v]}),t[26]=v,t[27]=_,t[28]=y):y=t[28],y}function On(e){e===`wysiwyg`&&xn(),e===`source`&&Sn()}function kn(e){let t=(0,Dt.c)(16),{noteId:n,onBack:r,onSaved:i,showBackButton:a,backButtonClassName:o,clearHeaderOnCleanup:s,onOpenSearch:c,autoFocus:l,initialMode:u,onAutoFocusConsumed:d}=e,p=a===void 0||a,m=s===void 0||s,g=l!==void 0&&l,_=f(An),v;t[0]===_?v=t[1]:(v=h(_),t[0]=_,t[1]=v);let y=v.notes.lightboxClose,b;t[2]!==g||t[3]!==o||t[4]!==m||t[5]!==u||t[6]!==n||t[7]!==d||t[8]!==r||t[9]!==c||t[10]!==i||t[11]!==p?(b=(0,$.jsx)(jn,{noteId:n,onBack:r,onSaved:i,showBackButton:p,backButtonClassName:o,clearHeaderOnCleanup:m,onOpenSearch:c,autoFocus:g,initialMode:u,onAutoFocusConsumed:d}),t[2]=g,t[3]=o,t[4]=m,t[5]=u,t[6]=n,t[7]=d,t[8]=r,t[9]=c,t[10]=i,t[11]=p,t[12]=b):b=t[12];let x;return t[13]!==y||t[14]!==b?(x=(0,$.jsx)(xe,{closeLabel:y,children:b}),t[13]=y,t[14]=b,t[15]=x):x=t[15],x}function An(e){return e.language}function jn({noteId:e,onBack:t,onSaved:n,showBackButton:r=!0,backButtonClassName:i,clearHeaderOnCleanup:a=!0,onOpenSearch:o,autoFocus:c=!1,initialMode:l=`wysiwyg`,onAutoFocusConsumed:u}){let p=f(e=>e.language),m=h(p).notes,g=h(p).chat.pageContext,_=h(p).automations.suggestions,{data:v}=rt([`note-discussion-document`,e],()=>ee(e)),[y,b]=(0,Q.useState)(!0),[x,S]=(0,Q.useState)(null),C=(0,Q.useCallback)(()=>S(null),[]);(0,Q.useEffect)(()=>{S(null)},[e]);let w=s(),E=ct(e=>e.resolved)===`dark`,{openImage:O}=Se(),[k,A]=(0,Q.useState)(l);(0,Q.useEffect)(()=>{S(null)},[k,y]);let[j,M]=(0,Q.useState)(null),[P,F]=(0,Q.useState)(null),[I,L]=(0,Q.useState)(!1),[R,z]=(0,Q.useState)(``),[te,ne]=(0,Q.useState)(360),[re,ie]=(0,Q.useState)(!1),[B,ae]=(0,Q.useState)(!1),[oe,se]=(0,Q.useState)(!1),[ce,V]=(0,Q.useState)(!1),[le,de]=(0,Q.useState)(null),fe=(0,Q.useRef)(0),[pe,me]=(0,Q.useState)(null),H=d(e=>e.baseUrl),U=d(e=>e.conversationId),W=le?.noteId===e&&le.gatewayUrl===H&&le.gatewayToken===U?le.conversationId:null;(0,Q.useEffect)(()=>(fe.current++,V(!1),de(null),se(!1),me(null),b(!0),()=>{fe.current++}),[e,H,U]);let ge=(0,Q.useRef)(0);(0,Q.useEffect)(()=>()=>{ge.current+=1},[e]);let[_e,G]=(0,Q.useState)(null),[xe,we]=(0,Q.useState)(!1),[Te,De]=(0,Q.useState)(null),[ke,Ae]=(0,Q.useState)(!1),[Me,Ne]=(0,Q.useState)(!1),Fe=(0,Q.useRef)(!1),Re=(0,Q.useRef)(null),ze=(0,Q.useRef)(null),K=(0,Q.useRef)(null),Be=(0,Q.useRef)(null),He=(0,Q.useRef)(void 0),Ue=(0,Q.useRef)(null),We=(0,Q.useRef)(null),Ke=(0,Q.useRef)(null),Je=(0,Q.useRef)(null),Ye=(0,Q.useRef)(null),Ze=Z(e=>e.setPageHeader),$e=Z(e=>e.clearPageHeader),{data:J,mutate:it,error:at}=rt(e?[`note-detail`,e]:null,()=>Oe(e)),{data:ot=[],mutate:Y}=rt(e?[`note-threads`,e]:null,()=>je(e),{revalidateOnFocus:!1}),X=P!==null,lt=(0,Q.useCallback)(e=>{G(`${m.refreshFailed}: ${e instanceof Error?e.message:m.quickCaptureFailedHint}`)},[m.quickCaptureFailedHint,m.refreshFailed]);(0,Q.useEffect)(()=>{if(!e)return;let t=t=>{t.detail?.noteId===e&&it().catch(lt)};return window.addEventListener(`note-updated`,t),()=>window.removeEventListener(`note-updated`,t)},[it,e,lt]),(0,Q.useEffect)(()=>{z(``),F(null),M(null),Fe.current=!1,Ye.current=null},[e]),(0,Q.useEffect)(()=>{!J||I||Be.current!==null||Fe.current||z(J.title??``)},[J,I]),(0,Q.useEffect)(()=>{if(!c||!J||X||Ye.current===e)return;let t=window.requestAnimationFrame(()=>{Je.current?.focus(),u?.()});return Ye.current=e,()=>window.cancelAnimationFrame(t)},[c,X,J,e,u]);let dt=J?new Date(J.createdAt).toLocaleString(void 0,{year:`numeric`,month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}):``,ft=(0,Q.useMemo)(()=>r?(0,$.jsx)(`button`,{type:`button`,onClick:t,"aria-label":m.back,className:q(`rounded-lg p-1.5 text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg`,st,i),children:(0,$.jsx)(T,{className:`size-4`,"aria-hidden":!0})}):null,[i,m.back,t,r]),pt=(0,Q.useCallback)(()=>{let t=et.getState();t.source?.type===`note`&&t.source.id===e&&t.stop()},[e]),mt=(0,Q.useCallback)(e=>{e!==`preview`&&pt(),A(e)},[pt]);(0,Q.useEffect)(()=>{!I&&K.current===null&&Be.current===null&&(He.current=J?.remoteVersion??1)},[e,J?.remoteVersion,I]);let ht=(0,Q.useCallback)(async t=>{let n=He.current??J?.remoteVersion??1,r=await be(e,t,n);return He.current===n&&(He.current=r.remoteVersion??n+1),r},[e,J?.remoteVersion]),St=(0,Q.useCallback)(t=>{pt(),z(t),e&&(Be.current=t,ze.current&&clearTimeout(ze.current),ze.current=setTimeout(async()=>{let e=Be.current;if(Be.current=null,e!==null){L(!0);try{await ht({title:e}),await it(),n?.()}catch(t){Be.current===null&&(Be.current=e),G(`${m.saveFailed}: ${t instanceof Error?t.message:m.saveFailedHint}`)}finally{L(!1)}}},600))},[pt,e,it,n,ht,m.saveFailed,m.saveFailedHint]),Tt=(0,Q.useMemo)(()=>(0,$.jsxs)(`div`,{className:q(`flex min-w-0 items-center gap-2`,st),children:[(0,$.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-fg`,title:R||dt||void 0,children:R||dt}),I?(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-fg-muted opacity-60`,children:m.saving}):null]}),[m.saving,I,dt,R]),Et=(0,Q.useCallback)(async()=>{ae(!0),G(null);try{await Pe(e),await it()}catch(e){G(`${m.catalysisFailed}: ${e instanceof Error?e.message:m.chatOpenFailedMessage}`)}finally{ae(!1)}},[it,e]),Dt=(0,Q.useCallback)(()=>{V(!1),M(j===`breakdown`?null:`breakdown`),!J?.aiDeep?.catalysis?.report&&!B&&Et()},[j,B,Et,J?.aiDeep?.catalysis?.report]),Ot=(0,Q.useCallback)(()=>{let t=P?P.markdown??``:K.current??J?.markdown??``,n=P?P.title??``:R,r=bn(n,t);return{source:{type:`note`,id:e,title:n||m.titlePlaceholder},text:r,language:tt(r,p)}},[p,m.titlePlaceholder,J?.markdown,e,P,R]),kt=(0,Q.useCallback)(async()=>{Re.current&&clearTimeout(Re.current),ze.current&&clearTimeout(ze.current),Re.current=null,ze.current=null;let e=K.current,t=Be.current;K.current=null,Be.current=null;let r={};if(e!==null&&(r.markdown=e),t!==null&&(r.title=t),Object.keys(r).length===0)return J??null;L(!0);try{let e=await ht(r);return await it(e,{revalidate:!1}),n?.(),e}catch(n){return K.current===null&&(K.current=e),Be.current===null&&(Be.current=t),G(`${m.saveFailed}: ${n instanceof Error?n.message:m.saveFailedHint}`),null}finally{L(!1)}},[it,m.saveFailed,m.saveFailedHint,J,n,ht]),At=(0,Q.useCallback)(async()=>I?(G(p===`zh`?`笔记正在保存,请稍后发送。`:`The note is saving. Please send again shortly.`),!1):!!await kt()&&K.current===null&&Be.current===null,[I,p,kt]),jt=(0,Q.useCallback)(async(t=!1)=>{if(M(null),V(!0),oe||!t&&W)return;let n=++fe.current;se(!0),G(null);try{if(!await At())return;let r=await Ee(e,{forceNew:t});if(n!==fe.current)return;de({noteId:e,gatewayUrl:H,gatewayToken:U,conversationId:r.conversationId}),await it(),await Y()}catch(e){n===fe.current&&G(`${m.chatOpenFailedTitle}: ${e instanceof Error?e.message:m.chatOpenFailedMessage}`)}finally{n===fe.current&&se(!1)}},[oe,W,At,it,Y,e,H,U,m.chatOpenFailedMessage,m.chatOpenFailedTitle]),Mt=(0,Q.useCallback)(async e=>{if(!J||oe||I)return;se(!0),G(null);let t=d.getState(),n=++ge.current,r=()=>ge.current===n&&d.getState().baseUrl===t.baseUrl&&d.getState().conversationId===t.conversationId;try{let n=window.getSelection(),i=e??(n?.anchorNode&&n.focusNode&&Ue.current?.contains(n.anchorNode)&&Ue.current.contains(n.focusNode)?n.toString():``),a=await kt();if(!a||!r())return;if(K.current!==null||Be.current!==null)throw Error(g.unavailable);let o=Ct.capture({title:a.title||a.id,text:a.markdown,resourceRefs:[{kind:`note`,id:a.id,revision:String(a.remoteVersion??1)}],selection:i?{text:i,draft:!1}:void 0}),s=await new nt().createSession();if(!r())return;if(K.current!==null||Be.current!==null)throw Error(g.unavailable);let c=wt(t.baseUrl,t.conversationId,s.key);if(!Ct.put(c,o))throw Error(g.unavailable);w(`/chat/${encodeURIComponent(s.key)}`)}catch{r()&&G(g.unavailable)}finally{ge.current===n&&se(!1)}},[J,oe,I,kt,w,g.unavailable]),Nt=(0,Q.useCallback)(async()=>{G(null);let e=await kt();e&&(De(e),we(!0))},[kt]),Pt=(0,Q.useCallback)(async()=>{if(!(Me||I)){Ae(!1),Ne(!0),G(null),pt(),Re.current&&clearTimeout(Re.current),ze.current&&clearTimeout(ze.current),Re.current=null,ze.current=null,K.current=null,Be.current=null;try{await Ie(e),window.dispatchEvent(new CustomEvent(`note-deleted`,{detail:{noteId:e}})),n?.(),t()}catch(e){G(`${m.deleteFailed}: ${e instanceof Error?e.message:m.quickCaptureFailedHint}`)}finally{Ne(!1)}}},[Me,m.deleteFailed,m.quickCaptureFailedHint,e,t,n,I,pt]),It=(0,Q.useMemo)(()=>(0,$.jsxs)(`div`,{className:q(`flex min-w-0 items-center gap-1 sm:gap-2`,st),children:[o?(0,$.jsx)(`button`,{type:`button`,onClick:o,"aria-label":m.searchDialogTitle,className:`rounded-lg p-1.5 text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:(0,$.jsx)(Ge,{className:`size-4`,"aria-hidden":!0})}):null,(0,$.jsx)(vn,{input:Ot,showLabel:!1,labels:{read:m.readAloud,preparing:m.readAloudPreparing,pause:m.readAloudPause,resume:m.readAloudResume,retry:m.readAloudRetry,stop:m.readAloudStop}}),(0,$.jsxs)(`button`,{type:`button`,onClick:Dt,disabled:B,"aria-label":m.catalysisSectionTitle,className:q(`inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-xs font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50`,j===`breakdown`?`bg-accent/10 text-accent`:`bg-accent/10 text-fg hover:bg-accent/15`),children:[(0,$.jsx)(qe,{className:`size-3.5`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:B?m.catalyzing:m.catalyzeButton})]}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>jt(!1),"aria-label":m.openChatButton,disabled:oe,className:q(`inline-flex items-center gap-1.5 rounded-lg px-2.5 py-1.5 text-xs font-medium transition-colors`,`border border-edge text-fg-muted hover:bg-surface-hover hover:text-fg disabled:cursor-not-allowed disabled:opacity-50`),children:[(0,$.jsx)(Ve,{className:`size-3.5`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`hidden sm:inline`,children:oe?m.openingChat:m.openChatButton})]}),(0,$.jsx)(Dn,{mode:k,onModeChange:mt,labels:{edit:m.modeEdit,source:m.modeSource,preview:m.modePreview}}),(0,$.jsxs)(`button`,{type:`button`,onClick:()=>void Mt(),disabled:oe||I||!J||!!P,className:`inline-flex items-center gap-1.5 rounded-lg border border-edge px-2.5 py-1.5 text-xs text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent disabled:opacity-50`,children:[(0,$.jsx)(ve,{className:`size-3.5`,"aria-hidden":!0}),g.capture]}),(0,$.jsxs)(gt,{modal:!1,children:[(0,$.jsx)(_t,{asChild:!0,children:(0,$.jsx)(`button`,{type:`button`,"aria-label":m.noteActions,title:m.noteActions,className:`inline-flex size-8 items-center justify-center rounded-lg text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:(0,$.jsx)(he,{className:`size-4`,"aria-hidden":!0})})}),(0,$.jsx)(vt,{children:(0,$.jsxs)(bt,{align:`end`,sideOffset:6,className:`z-50 min-w-40 rounded-xl border border-edge bg-surface-overlay p-1 shadow-popover`,children:[(0,$.jsxs)(yt,{onSelect:()=>void Nt(),className:`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none hover:bg-surface-hover focus:bg-surface-hover`,children:[(0,$.jsx)(D,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),p===`zh`?`分享`:`Share`]}),(0,$.jsxs)(yt,{onSelect:()=>{V(!1),M(j===`history`?null:`history`)},className:`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-fg outline-none hover:bg-surface-hover focus:bg-surface-hover`,children:[(0,$.jsx)(ye,{className:`size-4 text-fg-muted`,"aria-hidden":!0}),(0,$.jsx)(`span`,{className:`flex-1`,children:m.history}),j===`history`?(0,$.jsx)(ue,{className:`size-4 text-accent`,"aria-hidden":!0}):null]}),(0,$.jsx)(xt,{className:`my-1 h-px bg-edge-subtle`}),(0,$.jsxs)(yt,{disabled:Me||I,onSelect:()=>Ae(!0),className:`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm text-danger outline-none hover:bg-danger-soft focus:bg-danger-soft data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,children:[(0,$.jsx)(Xe,{className:`size-4`,"aria-hidden":!0}),m.delete]})]})})]})]}),[B,Dt,jt,Mt,g.capture,J,P,k,m.history,m.modeEdit,m.modePreview,m.modeSource,oe,j,o,m.searchDialogTitle,m.readAloud,m.readAloudPause,m.readAloudPreparing,m.readAloudResume,m.readAloudRetry,m.readAloudStop,mt,Ot,Nt,Me,I,p,m.delete,Ae]);(0,Q.useLayoutEffect)(()=>(Ze({startExtra:ft,main:J&&!v?Tt:null,end:J&&!v?It:null}),()=>{a&&$e()}),[a,$e,It,Tt,ft,v,y,J,Ze]);let Lt=(0,Q.useCallback)(t=>{e&&(pt(),K.current=t,Re.current&&clearTimeout(Re.current),Re.current=setTimeout(async()=>{let e=K.current;if(K.current=null,e!==null){L(!0),G(null);try{await ht({markdown:e}),await it(),n?.()}catch(t){K.current===null&&(K.current=e),G(`${m.saveFailed}: ${t instanceof Error?t.message:m.saveFailedHint}`)}finally{L(!1)}}},600))},[pt,e,it,m.saveFailed,m.saveFailedHint,n,ht]),Rt=(0,Q.useCallback)(t=>{Le(e,t.timestamp).then(e=>{e&&(pt(),F(e),v&&b(!1))})},[v,e,pt]),zt=(0,Q.useCallback)(()=>{pt(),M(null),F(null)},[pt]),Bt=(0,Q.useCallback)(()=>{pt(),M(null),F(null),it().catch(lt),n?.()},[it,n,lt,pt]);if((0,Q.useEffect)(()=>()=>{Re.current&&clearTimeout(Re.current),ze.current&&clearTimeout(ze.current);let t=K.current,n=Be.current;K.current=null,Be.current=null;let r={};t!==null&&(r.markdown=t),n!==null&&(r.title=n),Object.keys(r).length>0&&be(e,r,He.current).catch(()=>void 0)},[e]),J===void 0)return at?(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center`,role:`alert`,children:[(0,$.jsx)(`p`,{className:`text-sm text-danger`,children:m.home.loadFailed}),(0,$.jsx)(`button`,{type:`button`,onClick:()=>void it().catch(lt),className:`rounded-lg border border-edge px-3 py-2 text-sm text-fg hover:bg-surface-hover`,children:m.home.retry}),(0,$.jsx)(`button`,{type:`button`,onClick:t,className:`text-sm text-fg-muted hover:text-fg`,children:m.back})]}):(0,$.jsx)(En,{});if(J===null)return(0,$.jsxs)(`div`,{className:`flex flex-1 flex-col items-center justify-center gap-3 text-center`,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium text-fg`,children:m.notFoundTitle}),(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:m.notFoundDescription}),(0,$.jsx)(`button`,{type:`button`,onClick:t,className:`rounded-lg border border-edge px-3 py-1.5 text-sm font-medium text-fg-muted transition-colors hover:bg-surface-hover hover:text-fg`,children:m.back})]});let Vt=X?P.title??``:R,Ht=X?P.markdown??``:K.current??J.markdown??``,Ut=new Date(J.createdAt).getTime(),Wt=Number.isFinite(Ut)&&Date.now()-Ut<3600*1e3?(0,$.jsx)(Ft,{title:_.noteCreatedTitle,description:_.noteCreatedDescription,prompt:_.noteCreatedPrompt,coverage:{eventType:`note.created`,source:`notes`,eventPayload:{noteId:e}},variant:`titleAction`,className:`ml-3 hidden max-w-[18rem] shrink-0 md:flex`}):null,Gt=/^Discussion · \d{4}-\d{2}-\d{2} \d{2}:\d{2}$/.test(R)?``:R,Kt=p===`zh`?`语音笔记`:`Voice note`,qt=!y&&!X?(0,$.jsx)(`input`,{ref:Je,"aria-label":m.titlePlaceholder,value:Gt,placeholder:Kt,onChange:e=>St(e.target.value),onCompositionStart:()=>{Fe.current=!0},onCompositionEnd:()=>{Fe.current=!1},className:`w-full rounded-md bg-transparent text-2xl font-semibold leading-snug tracking-tight placeholder:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`}):null,Jt=(0,$.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[v?(0,$.jsxs)(`div`,{className:`flex shrink-0 flex-wrap items-center justify-between gap-x-2 border-b border-edge-subtle px-4 py-1`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-medium`,children:p===`zh`?`我的笔记`:`My notes`}),(0,$.jsx)(Dn,{mode:k,onModeChange:mt,labels:{edit:m.modeEdit,source:m.modeSource,preview:m.modePreview}})]}):null,(0,$.jsx)(`div`,{className:`h-full min-h-0 min-w-0 flex-1`,children:X?(0,$.jsxs)(`div`,{className:`h-full overflow-y-auto px-4 py-4 sm:px-6`,children:[Vt&&(0,$.jsx)(`h1`,{className:`mb-4 text-2xl font-bold text-fg/70`,children:Vt}),Ht?(0,$.jsx)(Ce,{noteId:e,content:Ht,className:`opacity-80`}):(0,$.jsx)(`p`,{className:`italic text-fg-muted`,children:m.emptyPreview})]}):(0,$.jsxs)($.Fragment,{children:[k===`wysiwyg`&&(0,$.jsxs)(`div`,{className:`flex h-full flex-col`,children:[v?null:(0,$.jsxs)(`div`,{className:`flex shrink-0 items-start px-6 pt-4`,children:[(0,$.jsx)(`input`,{ref:Je,type:`text`,value:R,onChange:e=>St(e.target.value),onCompositionStart:()=>{Fe.current=!0},onCompositionEnd:()=>{Fe.current=!1},onKeyDown:e=>{let t=e.nativeEvent;e.key===`Enter`&&!Fe.current&&!t.isComposing&&(e.preventDefault(),(Ue.current?.querySelector(`.ProseMirror`))?.focus())},placeholder:m.titlePlaceholder,className:`min-w-0 flex-1 border-none bg-transparent text-2xl font-bold text-fg placeholder:text-fg-muted/40 focus:outline-none`}),Wt]}),(0,$.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,$.jsx)(Q.Suspense,{fallback:(0,$.jsx)(En,{}),children:(0,$.jsx)(wn,{autoFocus:!!v&&!y,placeholder:v?p===`zh`?`写点什么…`:`Write a note…`:void 0,initialContent:J.markdown??``,onChange:Lt,noteId:e,onTextSelection:S},`wysiwyg-${e}`)})})]}),k===`source`&&(0,$.jsxs)(`div`,{className:`flex h-full flex-col`,children:[v?null:(0,$.jsxs)(`div`,{className:`flex shrink-0 items-start px-6 pt-4`,children:[(0,$.jsx)(`input`,{ref:Je,type:`text`,value:R,onChange:e=>St(e.target.value),placeholder:m.titlePlaceholder,className:`min-w-0 flex-1 border-none bg-transparent text-2xl font-bold text-fg placeholder:text-fg-muted/40 focus:outline-none`}),Wt]}),(0,$.jsx)(`div`,{className:`min-h-0 flex-1`,children:(0,$.jsx)(Q.Suspense,{fallback:(0,$.jsx)(En,{}),children:(0,$.jsx)(Tn,{initialContent:J.markdown??``,onChange:Lt,isDark:E,onTextSelection:S},`source-${e}`)})})]}),k===`preview`&&(0,$.jsxs)(`div`,{className:`h-full overflow-y-auto px-4 py-4 sm:px-6`,onClick:e=>{let t=e.target;t instanceof HTMLImageElement&&O(t.currentSrc||t.src,t.alt)},children:[!v&&R&&!J.markdown.trimStart().startsWith(`# ${R.trim()}\n`)&&J.markdown.trim()!==`# ${R.trim()}`&&(0,$.jsx)(`h1`,{className:`mb-4 text-2xl font-bold text-fg`,children:R}),J.markdown?(0,$.jsx)(Ce,{noteId:e,content:J.markdown,className:`[&_img]:cursor-zoom-in`}):v?(0,$.jsx)(`button`,{type:`button`,className:`min-h-11 rounded-lg px-2 text-sm text-accent-fg hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>mt(`wysiwyg`),children:p===`zh`?`写笔记`:`Write notes`}):(0,$.jsx)(`p`,{className:`italic text-fg-muted`,children:m.emptyPreview})]})]})})]});return(0,$.jsxs)($.Fragment,{children:[x&&!X&&!(v&&y)&&k!==`preview`?(0,$.jsx)(_n,{noteId:e,selection:x,zh:p===`zh`,onDismiss:C,onAsk:e=>{me({id:Date.now(),text:p===`zh`?`请帮我分析或改写下面这段笔记:\n\n${e}`:`Help me analyze or rewrite this note selection:\n\n${e}`}),C(),jt()}},`${e}:${k}`):null,(0,$.jsxs)(`div`,{className:`@container/note flex h-full min-h-0 min-w-0 gap-3 p-3 sm:p-4`,children:[(0,$.jsxs)(`div`,{className:q(`mx-auto min-h-0 min-w-0 w-full flex-1 flex-col`,ce||j?`hidden @min-[56rem]/note:flex`:`flex`,!v&&`max-w-[60rem]`),children:[_e?(0,$.jsx)(`p`,{className:`mb-3 shrink-0 rounded-lg border border-danger/25 bg-danger-soft px-3 py-2 text-sm text-danger`,role:`alert`,children:_e}):null,(0,$.jsx)(N,{eventType:`note.created`,source:`notes`,payloadKey:`noteId`,payloadValue:e,className:`mb-3 shrink-0`}),(0,$.jsx)(N,{eventType:`note.updated`,source:`notes`,payloadKey:`noteId`,payloadValue:e,className:`mb-3 shrink-0`}),(0,$.jsxs)(`div`,{ref:Ue,onKeyDown:e=>{x&&e.altKey&&e.key===`Enter`&&(e.preventDefault(),document.querySelector(`[data-note-selection-actions] button:not(:disabled)`)?.focus())},className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border border-edge-subtle bg-surface-panel xl:flex-row`,children:[v?(0,$.jsx)(rn,{noteId:e,noteTitle:qt,personalNotes:Jt,personalNotesActive:!y,onMeetingContent:()=>{X&&zt(),b(!0)},onPersonalNotes:()=>{zt(),mt(`wysiwyg`),b(!1)},noteActions:{onAnalyze:Dt,chatOpen:ce,onChat:()=>{ce?V(!1):jt(!1)},onShare:()=>{Nt()},onHistory:()=>{V(!1),j===`history`?zt():M(`history`)},onDelete:()=>Ae(!0),busy:Me||I||B||oe}}):null,v?null:Jt]})]}),ce||W?(0,$.jsxs)(`aside`,{id:`note-assistant-${e}`,"aria-label":p===`zh`?`笔记 AI 对话`:`Note AI chat`,className:q(`min-h-0 min-w-0 shrink-0 flex-col overflow-hidden rounded-xl border border-edge-subtle bg-surface-panel`,ce?`flex w-full @min-[56rem]/note:w-[22rem] @min-[76rem]/note:w-[24rem]`:`hidden`),children:[(0,$.jsxs)(`header`,{className:`flex shrink-0 items-center gap-2 border-b border-edge-subtle px-4 py-2`,children:[(0,$.jsx)(Ve,{className:`size-4 text-accent-fg`,"aria-hidden":!0}),(0,$.jsx)(`h2`,{className:`flex-1 text-sm font-medium`,children:v?p===`zh`?`问这段录音`:`Ask about this recording`:p===`zh`?`AI 对话`:`AI chat`}),(0,$.jsx)(`button`,{type:`button`,className:`inline-flex size-11 items-center justify-center rounded-lg text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,"aria-label":p===`zh`?`收起 AI 对话`:`Close AI chat`,onClick:()=>{V(!1),window.requestAnimationFrame(()=>document.querySelector(`[aria-controls="note-assistant-${e}"]`)?.focus({preventScroll:!0}))},children:(0,$.jsx)(Qe,{className:`size-4`})})]}),v&&ce&&W&&v.transcript?.text?.trim()?(0,$.jsx)(`div`,{className:`flex shrink-0 flex-wrap gap-1 border-b border-edge-subtle px-4 py-1`,children:(p===`zh`?[`最后决定了什么?`,`有哪些待跟进事项?`]:[`What was decided?`,`What needs follow-up?`]).map(e=>(0,$.jsx)(`button`,{type:`button`,className:`min-h-11 rounded-lg px-2 text-xs text-fg-muted hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-accent`,onClick:()=>me({id:Date.now(),text:e}),children:e},e))}):null,_e&&W?(0,$.jsx)(`p`,{role:`alert`,className:`shrink-0 px-4 py-2 text-xs text-danger`,children:_e}):null,(0,$.jsx)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:W?(0,$.jsx)(Q.Suspense,{fallback:(0,$.jsx)(En,{}),children:(0,$.jsx)(Cn,{embedded:!0,sourceNoteInView:!0,conversationId:W,draftSeed:pe,beforeSend:At},`${e}:${W}`)}):oe?(0,$.jsx)(En,{}):(0,$.jsxs)(`div`,{className:`space-y-3 p-4 text-sm`,children:[(0,$.jsx)(`p`,{className:`text-fg-muted`,children:_e||(p===`zh`?`对话尚未打开,请重试。`:`Chat could not be opened. Try again.`)}),(0,$.jsx)(`button`,{type:`button`,className:`min-h-11 rounded-lg px-3 text-accent-fg hover:bg-surface-hover`,onClick:()=>void jt(),children:p===`zh`?`重新打开`:`Try again`})]})})]}):null,(0,$.jsx)(`div`,{ref:We,className:q(`relative min-h-0 max-w-full shrink-0 flex-col overflow-hidden`,j?`flex`:`hidden`,!re&&`transition-[width] duration-300 ease-in-out`),style:{width:j?te:0},children:(0,$.jsxs)(`div`,{ref:Ke,className:`flex min-h-0 flex-1 flex-col`,style:{width:te},children:[(0,$.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,onPointerDown:e=>{e.preventDefault();let t=e.currentTarget;t.setPointerCapture(e.pointerId),ie(!0);let n=e.clientX,r=te,i=e.pointerId,a=0,o=te,s=te,c=()=>{a=0,s=o,j&&We.current?.style.setProperty(`width`,`${s}px`),Ke.current?.style.setProperty(`width`,`${s}px`)},l=e=>{let t=r-(e.clientX-n);o=Math.max(280,Math.min(600,Math.round(t))),a===0&&(a=window.requestAnimationFrame(c))},u=()=>{a!==0&&(window.cancelAnimationFrame(a),c());try{t.releasePointerCapture(i)}catch{}ie(!1),ne(s),window.removeEventListener(`pointermove`,l),window.removeEventListener(`pointerup`,u),window.removeEventListener(`pointercancel`,u)};window.addEventListener(`pointermove`,l),window.addEventListener(`pointerup`,u),window.addEventListener(`pointercancel`,u)},className:q(`absolute left-0 top-0 z-10 h-full w-2 -translate-x-1/2 cursor-col-resize`,`before:content-[''] before:pointer-events-none before:absolute before:left-1/2 before:top-0 before:h-full before:w-px before:-translate-x-1/2`,`before:bg-transparent before:transition-[background-color] before:duration-150`,`hover:before:bg-edge/65 dark:hover:before:bg-edge/75`,re&&`before:!bg-edge/80 dark:before:!bg-edge/85`,`touch-none select-none`)}),(0,$.jsx)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden rounded-xl border border-edge-subtle bg-surface-panel`,children:j===`history`?(0,$.jsx)(sn,{noteId:e,activeTimestamp:P?.timestamp??null,onSelect:Rt,onClose:zt,onRestored:Bt}):j===`breakdown`?(0,$.jsx)(cn,{noteId:e,note:J??null,catalyzing:B,onCatalyze:Et,onClose:()=>M(null),noteThreads:ot,openingChat:oe,onOpenChat:()=>jt(!1),onOpenNewChat:()=>jt(!0)}):null})]})})]}),Te?(0,$.jsx)(un,{open:xe,onOpenChange:we,note:Te}):null,(0,$.jsx)(ut,{open:ke,title:m.deleteConfirmTitle,description:m.deleteConfirmDescription.replace(`{{title}}`,J.title||m.titlePlaceholder),confirmLabel:m.deleteConfirmLabel,cancelLabel:m.deleteCancelLabel,destructive:!0,onConfirm:()=>void Pt(),onCancel:()=>Ae(!1)})]})}export{Et as a,Mt as i,Pt as n,Nt as r,kn as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./notes-api-auhtw3zM.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./chunk-KS7C4IRE-DIIvxCDx.js";import{n as a}from"./locale-store-BYdvIuPj.js";import{t as o}from"./messages-lc5BjBtX.js";import{t as s}from"./createLucideIcon-DPHK1VkS.js";import{t as c}from"./activity-YogQEteU.js";import{t as l}from"./bot-DjLkhyZL.js";import{t as u}from"./circle-check-C23XjkUj.js";import{t as d}from"./circle-pause-CN9jYH2s.js";import{t as f}from"./clock-3-DnrAnuyZ.js";import{t as p}from"./external-link-DjqjBmc3.js";import{t as m}from"./loader-circle-CifKLtgG.js";import{t as h}from"./message-square-fVE7Ghj1.js";import{t as g}from"./pause-DuPxgSxk.js";import{t as _}from"./play-kxZvpBg8.js";import{t as v}from"./rotate-ccw-JM1TBLpp.js";import{t as y}from"./rotate-cw-LIg3Am9S.js";import{t as b}from"./sparkles-DHlfQFAF.js";import{t as x}from"./triangle-alert-2JXFNNKU.js";import{t as S}from"./volume-2-BSJhAY97.js";import{t as C}from"./zap-dximCGjy.js";import{t as w}from"./cn-0WouolD0.js";import{a as T}from"./session-manager-C-oe-9_N.js";import{i as E}from"./vendor-swr-CdRzEUwF.js";import{t as D}from"./button-C5tRaJxt.js";import{t as O}from"./automation-api-Cc5X3Q1t.js";var k=s(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),A=s(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),j=s(`thumbs-down`,[[`path`,{d:`M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z`,key:`m61m77`}],[`path`,{d:`M17 14V2`,key:`8ymqnk`}]]),M=s(`thumbs-up`,[[`path`,{d:`M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z`,key:`emmmcr`}],[`path`,{d:`M7 10v12`,key:`1qc93n`}]]),N=n(),P=e(t(),1),F=r(),I=(0,P.forwardRef)(function(e,t){let n=(0,N.c)(36),r,i,a,o,s,c,l;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4],s=n[5],c=n[6],l=n[7]):({input:a,labels:o,className:i,showLabel:s,disabled:c,hideNativeTitle:l,...r}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o,n[5]=s,n[6]=c,n[7]=l);let u=s!==void 0&&s,d=c!==void 0&&c,f=l!==void 0&&l,p;n[8]===a?p=n[9]:(p=typeof a==`function`?a():a,n[8]=a,n[9]=p);let h=p,y=T(L),b=T(R),x=T(z),C=y?.type===h.source.type&&y.id===h.source.id,E=C?b:`idle`,D=E===`preparing`?o.preparing:E===`playing`?o.pause:E===`paused`?o.resume:E===`error`?o.retry:o.read,O;n[10]!==a||n[11]!==x?(O=()=>x(typeof a==`function`?a():a),n[10]=a,n[11]=x,n[12]=O):O=n[12];let k;n[13]!==d||n[14]!==h.text?(k=d||!h.text.trim(),n[13]=d,n[14]=h.text,n[15]=k):k=n[15];let A=f?void 0:D,j=C&&(E===`playing`||E===`paused`),M=u?`min-h-11 gap-1.5 px-2.5 text-sm font-medium sm:min-h-8 sm:text-xs`:`size-11 sm:size-9`,P=C&&`bg-surface-active text-accent`,I;n[16]!==i||n[17]!==P||n[18]!==M?(I=w(`inline-flex shrink-0 items-center justify-center rounded-lg text-fg-muted transition-colors transition-transform duration-150 ease-out`,`hover:bg-surface-hover hover:text-fg active:scale-95 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-accent`,M,P,i),n[16]=i,n[17]=P,n[18]=M,n[19]=I):I=n[19];let B;n[20]===E?B=n[21]:(B=E===`preparing`?(0,F.jsx)(m,{className:`size-4 animate-spin`,"aria-hidden":!0}):E===`playing`?(0,F.jsx)(g,{className:`size-4`,"aria-hidden":!0}):E===`paused`?(0,F.jsx)(_,{className:`size-4`,"aria-hidden":!0}):E===`error`?(0,F.jsx)(v,{className:`size-4`,"aria-hidden":!0}):(0,F.jsx)(S,{className:`size-4`,"aria-hidden":!0}),n[20]=E,n[21]=B);let V;n[22]!==D||n[23]!==u?(V=u?(0,F.jsx)(`span`,{children:D}):null,n[22]=D,n[23]=u,n[24]=V):V=n[24];let H;return n[25]!==r||n[26]!==D||n[27]!==t||n[28]!==I||n[29]!==B||n[30]!==V||n[31]!==O||n[32]!==k||n[33]!==A||n[34]!==j?(H=(0,F.jsxs)(`button`,{...r,ref:t,type:`button`,onClick:O,disabled:k,title:A,"aria-label":D,"aria-pressed":j,className:I,children:[B,V]}),n[25]=r,n[26]=D,n[27]=t,n[28]=I,n[29]=B,n[30]=V,n[31]=O,n[32]=k,n[33]=A,n[34]=j,n[35]=H):H=n[35],H});function L(e){return e.source}function R(e){return e.status}function z(e){return e.requestStart}function B(e,t){return Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,String(n)),e)}function V(e,t){if(!e.enabled||e.trigger.kind!==`event`||e.trigger.eventType!==t.eventType||e.trigger.source&&e.trigger.source!==t.source)return!1;let n=e.trigger.payloadMatch;if(!n)return!0;let r=t.eventPayload??{};return Object.entries(n).every(([e,t])=>Object.is(r[e],t))}function H(e,t){let n=e.trigger,r=t.explain;return n.kind===`event`?[W(n.eventType,n.source,t),G(n.payloadMatch,t),q(e.safety,t),K(e.action,t)]:[r.triggerMatched,K(e.action,t)]}function U(e,t,n){let r=e.triggerSnapshot,i=Y(t),a=n.explain;return r.kind===`event`?[i?W(i.type,i.source,n):W(r.eventType,r.source,n),G(r.payloadMatch,n),q(J(t),n),K(e.actionSnapshot,n)]:r.kind===`manual`?[a.manual,K(e.actionSnapshot,n)]:r.kind===`webhook`?[a.webhook,K(e.actionSnapshot,n)]:[a.schedule,K(e.actionSnapshot,n)]}function W(e,t,n){let r=n.explain;return t?B(r.eventFrom,{eventType:e,source:t}):B(r.event,{eventType:e})}function G(e,t){if(!e||Object.keys(e).length===0)return t.explain.noPayloadFilter;let n=Object.entries(e).slice(0,3).map(([e,t])=>`${e}=${String(t)}`).join(`, `);return B(t.explain.payloadMatched,{pairs:n})}function K(e,t){return e.kind===`task_command`?`Starts task ${e.taskId}.`:e.kind===`system`?`Runs system capability ${e.capability}.`:t.explain.actionAgent}function q(e,t){let n=e?.mode??`auto_apply`;return B(t.explain.safetyMode,{mode:t.safety[n]})}function J(e){if(!e.data||typeof e.data!=`object`||Array.isArray(e.data))return;let t=e.data.safety;if(!t||typeof t!=`object`||Array.isArray(t))return;let n=t.mode;return n===`suggest_only`||n===`ask_before_apply`||n===`auto_apply`?{mode:n}:void 0}function Y(e){if(!e.data||typeof e.data!=`object`||Array.isArray(e.data))return null;let t=e.data.event;if(!t||typeof t!=`object`||Array.isArray(t))return null;let n=t;return typeof n.type!=`string`||!n.type.trim()?null:{type:n.type,source:typeof n.source==`string`?n.source:void 0}}function X(e){return e===`succeeded`?`border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300`:e===`failed`||e===`timeout`?`border-red-500/30 bg-red-500/10 text-red-700 dark:text-red-300`:e===`cancelled`?`border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300`:`border-blue-500/30 bg-blue-500/10 text-blue-700 dark:text-blue-300`}function Z(e,t){return new Date(e).toLocaleString(t,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`})}function ee(e){return e.some(e=>[`queued`,`running`,`cancelling`].includes(e.run.status))}function Q(e){return e===`failed`||e===`timeout`||e===`cancelled`}function te(e){let t=new Map;for(let{run:n}of e){let e=t.get(n.automationId),r=!e||n.createdAtMs>e.latest.createdAtMs?n:e.latest;t.set(n.automationId,{latest:r,hadAttention:!!e?.hadAttention||Q(n.status)})}let n={total:t.size,succeeded:0,active:0,attention:0,recovered:0};for(let{latest:e,hadAttention:r}of t.values())e.status===`succeeded`&&(n.succeeded+=1),e.status===`succeeded`&&r&&(n.recovered+=1),(e.status===`queued`||e.status===`running`||e.status===`cancelling`)&&(n.active+=1),Q(e.status)&&(n.attention+=1,n.latestAttentionRun??=e);return n}function ne(e){let t=new Map;for(let{run:n}of e){let e=t.get(n.automationId);(!e||n.createdAtMs>e.createdAtMs)&&t.set(n.automationId,n)}return t}function $(e,t){return Object.entries(t).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,String(n)),e)}function re(e){let t=(0,N.c)(47),{health:n,labels:r,primaryRepairBusy:i,onPrimaryRepair:a}=e,o=n.attention>0,s=n.active>0,c=n.recovered>0,l;t[0]!==s||t[1]!==c||t[2]!==n.active||t[3]!==n.attention||t[4]!==n.latestAttentionRun?.automationName||t[5]!==n.recovered||t[6]!==n.succeeded||t[7]!==n.total||t[8]!==r.feedback.summaryHealthy||t[9]!==r.feedback.summaryNeedsAttention||t[10]!==r.feedback.summaryRecovered||t[11]!==r.feedback.summaryRunning||t[12]!==r.feedback.thisAutomation||t[13]!==o?(l=o?$(r.feedback.summaryNeedsAttention,{total:n.total,attention:n.attention,name:n.latestAttentionRun?.automationName??r.feedback.thisAutomation}):s?$(r.feedback.summaryRunning,{total:n.total,active:n.active}):c?$(r.feedback.summaryRecovered,{total:n.total,recovered:n.recovered,succeeded:n.succeeded}):$(r.feedback.summaryHealthy,{total:n.total,succeeded:n.succeeded}),t[0]=s,t[1]=c,t[2]=n.active,t[3]=n.attention,t[4]=n.latestAttentionRun?.automationName,t[5]=n.recovered,t[6]=n.succeeded,t[7]=n.total,t[8]=r.feedback.summaryHealthy,t[9]=r.feedback.summaryNeedsAttention,t[10]=r.feedback.summaryRecovered,t[11]=r.feedback.summaryRunning,t[12]=r.feedback.thisAutomation,t[13]=o,t[14]=l):l=t[14];let d=l,p=o?`text-amber-800 dark:text-amber-200`:`text-fg-muted`,m;t[15]===p?m=t[16]:(m=w(`break-words text-xs leading-5`,p),t[15]=p,t[16]=m);let h;t[17]!==d||t[18]!==m?(h=(0,F.jsx)(`p`,{className:m,children:d}),t[17]=d,t[18]=m,t[19]=h):h=t[19];let g;t[20]!==n.succeeded||t[21]!==r.feedback.succeededCount?(g=n.succeeded?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-emerald-500/25 bg-emerald-500/10 px-2 py-0.5 text-xs text-emerald-700 dark:text-emerald-300`,children:[(0,F.jsx)(u,{className:`size-3`,"aria-hidden":!0}),$(r.feedback.succeededCount,{count:n.succeeded})]}):null,t[20]=n.succeeded,t[21]=r.feedback.succeededCount,t[22]=g):g=t[22];let _;t[23]!==n.active||t[24]!==r.feedback.activeCount?(_=n.active?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-blue-500/25 bg-blue-500/10 px-2 py-0.5 text-xs text-blue-700 dark:text-blue-300`,children:[(0,F.jsx)(f,{className:`size-3`,"aria-hidden":!0}),$(r.feedback.activeCount,{count:n.active})]}):null,t[23]=n.active,t[24]=r.feedback.activeCount,t[25]=_):_=t[25];let v;t[26]!==n.attention||t[27]!==r.feedback.attentionCount?(v=n.attention?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-amber-500/25 bg-amber-500/10 px-2 py-0.5 text-xs text-amber-700 dark:text-amber-300`,children:[(0,F.jsx)(x,{className:`size-3`,"aria-hidden":!0}),$(r.feedback.attentionCount,{count:n.attention})]}):null,t[26]=n.attention,t[27]=r.feedback.attentionCount,t[28]=v):v=t[28];let y;t[29]!==n.recovered||t[30]!==r.feedback.recoveredCount?(y=n.recovered?(0,F.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-emerald-500/25 bg-emerald-500/10 px-2 py-0.5 text-xs text-emerald-700 dark:text-emerald-300`,children:[(0,F.jsx)(u,{className:`size-3`,"aria-hidden":!0}),$(r.feedback.recoveredCount,{count:n.recovered})]}):null,t[29]=n.recovered,t[30]=r.feedback.recoveredCount,t[31]=y):y=t[31];let S;t[32]!==g||t[33]!==_||t[34]!==v||t[35]!==y?(S=(0,F.jsxs)(`div`,{className:`mt-1.5 flex flex-wrap gap-1.5`,children:[g,_,v,y]}),t[32]=g,t[33]=_,t[34]=v,t[35]=y,t[36]=S):S=t[36];let C;t[37]!==r.feedback.primaryRepair||t[38]!==r.feedback.primaryRepairing||t[39]!==o||t[40]!==a||t[41]!==i?(C=o&&a?(0,F.jsx)(`div`,{className:`mt-2`,children:(0,F.jsxs)(D,{variant:`secondary`,className:`h-7 rounded-md px-2 text-xs`,disabled:i,onClick:a,children:[(0,F.jsx)(b,{className:`size-3.5`,"aria-hidden":!0}),i?r.feedback.primaryRepairing:r.feedback.primaryRepair]})}):null,t[37]=r.feedback.primaryRepair,t[38]=r.feedback.primaryRepairing,t[39]=o,t[40]=a,t[41]=i,t[42]=C):C=t[42];let T;return t[43]!==C||t[44]!==h||t[45]!==S?(T=(0,F.jsxs)(`div`,{className:`mb-3 border-l-2 border-accent/50 pl-3`,children:[h,S,C]}),t[43]=C,t[44]=h,t[45]=S,t[46]=T):T=t[46],T}function ie({eventType:e,source:t,payloadKey:n,payloadValue:r,limit:s=3,className:f,onSaveInsight:m,isInsightSaved:g}){let _=a(e=>e.language),v=o(_).automations,x=_===`zh`?`zh-CN`:`en-US`,S=[`product-automation-feedback`,e,t??``,n??``,r??``,s],[T,k]=(0,P.useState)(null),[A,j]=(0,P.useState)(null),{data:M,mutate:N}=E(e&&(!n||r!==void 0)?S:null,()=>O.productEventRuns({eventType:e,source:t,payloadKey:n,payloadValue:r,limit:s}),{revalidateOnFocus:!1,refreshInterval:e=>e?.items&&ee(e.items)?3e3:15e3}),[I,L]=(0,P.useState)({}),[R,z]=(0,P.useState)({}),B=M?.items??[],V=te(B),H=ne(B);if(!B.length)return null;let W=async(e,t)=>{k(e),j(null);try{await t(),await N()}catch(e){j(e instanceof Error?e.message:String(e))}finally{k(null)}},G=async e=>{k(`${e.id}:repair`),j(null);try{let t=await O.repairDraft(e.id,{language:_});L(n=>({...n,[e.id]:t.repair})),z(t=>({...t,[e.id]:!1}))}catch(e){j(e instanceof Error?e.message:String(e))}finally{k(null)}},K=async(e,t,n=!1)=>{k(n?`${e.id}:applyAndRerun`:`${e.id}:applyRepair`),j(null);try{await O.update(e.automationId,t.patch),n&&await O.rerun(e.id),await N(),L(t=>{let n={...t};return delete n[e.id],n}),z(t=>{let n={...t};return delete n[e.id],n})}catch(e){j(e instanceof Error?e.message:String(e))}finally{k(null)}},q=V.latestAttentionRun&&!I[V.latestAttentionRun.id]?V.latestAttentionRun:void 0,J=q?T===`${q.id}:repair`:!1;return(0,F.jsxs)(`section`,{className:w(`rounded-lg border border-edge bg-surface-panel p-3`,f),children:[(0,F.jsxs)(`div`,{className:`mb-2 flex items-center justify-between gap-3`,children:[(0,F.jsxs)(`h3`,{className:`flex min-w-0 items-center gap-2 text-sm font-semibold text-fg`,children:[(0,F.jsx)(C,{className:`size-4 shrink-0 text-accent`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`truncate`,children:v.feedback.title})]}),(0,F.jsx)(`span`,{className:`shrink-0 text-xs text-fg-muted`,children:B.length})]}),(0,F.jsx)(re,{health:V,labels:v,primaryRepairBusy:J,onPrimaryRepair:q?()=>void G(q):void 0}),A?(0,F.jsxs)(`p`,{className:`mb-2 rounded-md border border-danger/25 bg-danger-soft px-2.5 py-2 text-xs text-danger`,role:`alert`,children:[v.feedback.actionFailed,`: `,A]}):null,(0,F.jsx)(`ul`,{className:`grid gap-2`,children:B.map(({run:e,triggerEvent:t})=>{let n=H.get(e.automationId),r=n?.id===e.id,a=Q(e.status)&&!r,o=a&&n?.status===`succeeded`,s=I[e.id],f=R[e.id]??!1,_=T===`${e.id}:repair`,S=T===`${e.id}:applyRepair`,C=T===`${e.id}:applyAndRerun`,E=U(e,t,v),k=g?.(e)??!1,A=e.status===`succeeded`&&!!e.summary&&!!m&&!k,j=T===`${e.id}:saveInsight`;return(0,F.jsxs)(`li`,{className:`rounded-md border border-edge/70 bg-surface-inset/35 px-2.5 py-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,F.jsxs)(`div`,{className:`min-w-0`,children:[(0,F.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,children:[(0,F.jsx)(l,{className:`size-3.5 shrink-0 text-fg-muted`,"aria-hidden":!0}),(0,F.jsx)(`p`,{className:`truncate text-sm font-medium text-fg`,children:e.automationName})]}),(0,F.jsx)(`p`,{className:`mt-1 line-clamp-2 break-words text-xs text-fg-muted`,children:e.error||e.summary||t.message})]}),(0,F.jsxs)(`div`,{className:`flex shrink-0 flex-col items-end gap-1`,children:[(0,F.jsx)(`span`,{className:w(`rounded-full border px-2 py-0.5 text-xs`,X(e.status)),children:v.status[e.status]}),a?(0,F.jsx)(`span`,{className:`rounded-full border border-emerald-500/25 bg-emerald-500/10 px-2 py-0.5 text-xs text-emerald-700 dark:text-emerald-300`,children:o?v.feedback.recovered:v.feedback.historical}):null]})]}),(0,F.jsx)(`div`,{className:`mt-2 flex items-center justify-between gap-2 text-xs text-fg-muted`,children:(0,F.jsxs)(`span`,{className:`inline-flex min-w-0 items-center gap-1`,children:[(0,F.jsx)(c,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),(0,F.jsx)(`span`,{className:`truncate`,children:Z(t.createdAtMs,x)})]})}),(0,F.jsxs)(`div`,{className:`mt-2 rounded-md border border-edge/60 bg-surface-base/45 px-2.5 py-2`,children:[(0,F.jsx)(`div`,{className:`text-xs font-medium text-fg`,children:v.explain.whyRan}),(0,F.jsx)(`div`,{className:`mt-1 flex flex-wrap gap-1.5`,children:E.map(e=>(0,F.jsx)(`span`,{className:`rounded-full border border-edge/70 bg-surface-panel px-2 py-0.5 text-xs text-fg-muted`,children:e},e))})]}),s?(0,F.jsxs)(`div`,{className:`mt-2 rounded-md border border-amber-500/30 bg-amber-500/10 px-2.5 py-2`,children:[(0,F.jsxs)(`div`,{className:`flex items-center gap-1.5 text-xs font-semibold text-amber-800 dark:text-amber-200`,children:[(0,F.jsx)(b,{className:`size-3.5`,"aria-hidden":!0}),v.repair.title]}),(0,F.jsx)(`p`,{className:`mt-1 break-words text-xs text-fg`,children:s.explanation}),s.expectedEffect?(0,F.jsx)(`p`,{className:`mt-1 break-words text-xs text-fg-muted`,children:s.expectedEffect}):null,s.risks.length?(0,F.jsx)(`ul`,{className:`mt-2 list-disc space-y-1 pl-4 text-xs text-fg-muted`,children:s.risks.slice(0,3).map(e=>(0,F.jsx)(`li`,{children:e},e))}):null,s.requiresApproval?(0,F.jsxs)(`label`,{className:`mt-2 flex items-start gap-2 text-xs text-fg`,children:[(0,F.jsx)(`input`,{className:`mt-0.5`,type:`checkbox`,checked:f,onChange:t=>{z(n=>({...n,[e.id]:t.target.checked}))}}),(0,F.jsx)(`span`,{children:v.repair.approval})]}):null,(0,F.jsxs)(`div`,{className:`mt-2 flex flex-wrap justify-end gap-1.5`,children:[(0,F.jsx)(D,{variant:`ghost`,className:`h-7 rounded-md px-2 text-xs`,onClick:()=>{L(t=>{let n={...t};return delete n[e.id],n})},children:v.draft.discard}),(0,F.jsx)(D,{variant:`secondary`,className:`h-7 rounded-md px-2 text-xs`,disabled:s.requiresApproval&&!f||T!==null,onClick:()=>void K(e,s),children:S?v.feedback.working:v.repair.apply}),(0,F.jsxs)(D,{variant:`primary`,className:`h-7 rounded-md px-2 text-xs`,disabled:s.requiresApproval&&!f||T!==null,onClick:()=>void K(e,s,!0),children:[(0,F.jsx)(y,{className:`size-3.5`,"aria-hidden":!0}),C?v.feedback.working:v.feedback.applyAndRerun]})]})]}):null,(0,F.jsxs)(`div`,{className:`mt-2 flex flex-wrap items-center gap-1.5`,children:[k?(0,F.jsxs)(`span`,{className:`inline-flex h-7 items-center gap-1 rounded-md border border-emerald-500/25 bg-emerald-500/10 px-2 text-xs text-emerald-700 dark:text-emerald-300`,children:[(0,F.jsx)(u,{className:`size-3.5`,"aria-hidden":!0}),v.feedback.savedInsight]}):null,A?(0,F.jsxs)(D,{variant:`secondary`,className:`h-7 rounded-md px-2 text-xs`,disabled:T!==null,onClick:()=>void W(`${e.id}:saveInsight`,()=>Promise.resolve(m(e))),children:[(0,F.jsx)(u,{className:`size-3.5`,"aria-hidden":!0}),j?v.feedback.savingInsight:v.feedback.saveInsight]}):null,e.conversationId?(0,F.jsx)(D,{asChild:!0,variant:`ghost`,className:`h-7 rounded-md px-2 text-xs`,children:(0,F.jsxs)(i,{to:`/chat/${encodeURIComponent(e.conversationId)}`,children:[(0,F.jsx)(h,{className:`size-3.5`,"aria-hidden":!0}),v.feedback.chat]})}):null,null,r&&Q(e.status)&&!s?(0,F.jsxs)(D,{variant:`ghost`,className:`h-7 rounded-md px-2 text-xs`,disabled:T!==null,onClick:()=>void G(e),children:[(0,F.jsx)(b,{className:`size-3.5`,"aria-hidden":!0}),_?v.repair.generating:v.repair.suggest]}):null,(0,F.jsxs)(D,{variant:`ghost`,className:`h-7 rounded-md px-2 text-xs`,disabled:T!==null,onClick:()=>void W(`${e.id}:rerun`,()=>O.rerun(e.id)),children:[(0,F.jsx)(y,{className:`size-3.5`,"aria-hidden":!0}),T===`${e.id}:rerun`?v.feedback.working:v.feedback.rerun]}),(0,F.jsxs)(D,{variant:`ghost`,className:`h-7 rounded-md px-2 text-xs`,disabled:T!==null,onClick:()=>void W(`${e.id}:pause`,()=>O.pause(e.automationId)),children:[(0,F.jsx)(d,{className:`size-3.5`,"aria-hidden":!0}),T===`${e.id}:pause`?v.feedback.working:v.feedback.pause]}),(0,F.jsx)(D,{asChild:!0,variant:`ghost`,className:`h-7 rounded-md px-2 text-xs`,children:(0,F.jsxs)(i,{to:`/automations?run=${encodeURIComponent(e.id)}`,children:[(0,F.jsx)(p,{className:`size-3.5`,"aria-hidden":!0}),v.feedback.open]})})]})]},e.id)})})]})}export{I as a,A as c,V as i,k as l,H as n,M as o,B as r,j as s,ie as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=[{id:`work-overview`,domain:`work`,path:`/`},{id:`work-projects`,domain:`work`,path:`/projects`},{id:`work-notes`,domain:`work`,path:`/notes`}],t=[{id:`automation-triggers`,domain:`automation`,path:`/automations`}],n=[`extensions`,`skills`,`connectors`,`agents`,`channels`],r=n.map(e=>({id:`capabilities-${e}`,domain:`capabilities`,path:`/capabilities/${e}`}));function i(e){return`/capabilities/${e}`}var a=[{id:`work`,path:`/`,sections:e},{id:`automation`,path:`/automations`,sections:t},{id:`capabilities`,path:i(n[0]),sections:r},{id:`apps`,path:`/local-apps`,sections:[{id:`apps-library`,domain:`apps`,path:`/local-apps`}]},{id:`me`,path:`/user-model`,sections:[{id:`me-overview`,domain:`me`,path:`/user-model`}]}];function o(e,t){return e===t||e.startsWith(`${t}/`)}function s(e){return e===`/`||o(e,`/chat`)||o(e,`/tasks`)||o(e,`/projects`)||o(e,`/notes`)?`work`:o(e,`/automations`)?`automation`:o(e,`/capabilities`)?`capabilities`:o(e,`/local-apps`)||o(e,`/open`)?`apps`:o(e,`/user-model`)?`me`:null}function c(e,t=``){if(e===`/`)return`work-overview`;if(o(e,`/projects`))return`work-projects`;if(o(e,`/notes`))return`work-notes`;if(o(e,`/automations`))return`automation-triggers`;if(o(e,`/local-apps`)||o(e,`/open`))return`apps-library`;if(o(e,`/user-model`))return`me-overview`;if(o(e,`/capabilities`)){let t=`capabilities-${e.split(`/`)[2]||n[0]}`;return r.some(e=>e.id===t)?t:r[0].id}return null}function l(e){return a.find(t=>t.id===e)}function u(e){if(o(e,`/chat`)||o(e,`/tasks`))return!1;let t=s(e);return t===`work`||t===`automation`||t===`capabilities`}export{l as a,s as i,a as n,c as o,i as r,u as s,n as t};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sessions-page-BkNfjgXC.js","assets/rolldown-runtime-aKtaBQYM.js","assets/vendor-react-BOUWij0V.js","assets/chunk-KS7C4IRE-DIIvxCDx.js","assets/preload-helper-Czpn1I53.js","assets/locale-store-BYdvIuPj.js","assets/messages-lc5BjBtX.js","assets/dist-DlirbHVs.js","assets/es2015-CFqg57eW.js","assets/dist-CDSvxjOh.js","assets/session-identity-label-CZf50vSj.js","assets/createLucideIcon-DPHK1VkS.js","assets/session-identity-DRFdxntH.js","assets/schemas-CCWMleym.js","assets/archive-Dz0hferG.js","assets/popover-select-hRG1EzAY.js","assets/check-DUBLcKHA.js","assets/cn-0WouolD0.js","assets/bundle-mjs-rHxsej31.js","assets/skeleton-DzdOeGYz.js","assets/dist-BSVQC3i_.js","assets/dist-DSRLZhL9.js","assets/floating-ui.dom-CiMnRY5O.js","assets/floating-ui.react-dom-Gx6CM22l.js","assets/settings-shell-dialog-layer-BU3UuiJr.js","assets/circle-BoO4YvTx.js","assets/coins-DjP27vUx.js","assets/database-CjjeZfRG.js","assets/download-Dk-ZjtO6.js","assets/folder-open-CyzJ19I9.js","assets/layers-mJW7JJKm.js","assets/layout-grid-CEVZdVFU.js","assets/message-square-fVE7Ghj1.js","assets/minimize-2-DtOGrlpo.js","assets/pin-off-BMRv-Kxr.js","assets/plus-Q2yW6OE7.js","assets/search-DA7gz22f.js","assets/settings-uiTATseT.js","assets/trash-2-DusmjVPV.js","assets/x-B_N4OPjy.js","assets/session-api-eApyRHbI.js","assets/gateway-startup-retry-DCDOl6Oo.js","assets/vendor-swr-CdRzEUwF.js","assets/gateway-config-swr-BYoBGl6i.js","assets/chat-agents-api-BzuJyysa.js","assets/registry-api-DGi-X6j7.js","assets/button-C5tRaJxt.js","assets/interaction-BdhHBbYa.js","assets/form-field-width-DJw_jULe.js","assets/page-tabs-DoYMKhVO.js","assets/sliding-indicator-hwz0sx3h.js","assets/agent-avatar-display-KbzBlJ8W.js","assets/loopi-CNtmi9FU.js","assets/loopi-C09I2mNj.css","assets/session-channel-icon-CJAPoVO-.js","assets/clock-3-DnrAnuyZ.js","assets/git-branch-Dh9uxTot.js","assets/message-circle-Badhj-4D.js","assets/panels-top-left-BKvp2Dag.js","assets/plug-DKYPEgkR.js","assets/settings-2-D-csvaET.js","assets/terminal-oKqqZdiG.js","assets/zap-dximCGjy.js","assets/segmented-styles-Cqb91xsn.js","assets/settings-form-draft-Dy10ldo8.js","assets/sliding-tab-list-CmcrqRzN.js","assets/model-selector-DugdMlvi.js","assets/open-capability-settings-DQsmJxI7.js","assets/model-sort-_Tz8s_4N.js","assets/settings-advanced-section-Dc9aztiW.js","assets/settings-mode-store-DcE2iR7e.js","assets/middleware-Pd0e8Igk.js","assets/number-input-El7Szeln.js","assets/settings-page-header-CQueaD1Z.js","assets/external-link-DjqjBmc3.js","assets/sparkles-DHlfQFAF.js","assets/settings-page-layout-BlwyxcEq.js","assets/settings-form-section-num14vSv.js","assets/pencil-DmIY3Oa-.js","assets/use-autosave-BPDFVsgM.js","assets/circle-alert-BEjgurr2.js","assets/loader-circle-CifKLtgG.js","assets/settings-advanced-gate-B82UPSQS.js","assets/usage-page-BVNBJa59.js","assets/bot-DjLkhyZL.js","assets/gauge-C78eD2BA.js","assets/refresh-cw-BRlGaq2w.js","assets/timer-rCwGHjuO.js","assets/xopc-cloud-account-card-xJr48TmR.js","assets/cloud-C4-yfnnk.js","assets/triangle-alert-2JXFNNKU.js","assets/cloud-credits-B-nbtkqv.js","assets/automations-page-BKbElVfF.js","assets/automations-workspace-_18qOoLm.js","assets/activity-YogQEteU.js","assets/arrow-left-D880xG-P.js","assets/automation-display-DaVDNZz8.js","assets/automation-run-list-DPTby29p.js","assets/automation-api-Cc5X3Q1t.js","assets/chevron-down-ccbiQQz_.js","assets/chevron-right-BweFrslA.js","assets/circle-check-C23XjkUj.js","assets/copy-Dv6d4Dvw.js","assets/ellipsis-0k4rZLoy.js","assets/eye-CABVeTq0.js","assets/list-filter-CIPvpfLA.js","assets/markdown-view-BOJVaGPC.js","assets/marked.esm-8VXEA2AD.js","assets/file-image-CDUPkZvG.js","assets/app-link-Ji4uewEG.js","assets/product-delivery-4gEqUIsK.js","assets/copy-to-clipboard-HOJ79TWv.js","assets/xml-_d7dTN2Q.js","assets/mermaid-render-oOellPHt.js","assets/markdown-view-Czi3_WHu.css","assets/pause-DuPxgSxk.js","assets/play-kxZvpBg8.js","assets/shield-check-BU58siTV.js","assets/square-pen-B8FsvqNu.js","assets/api-CnOSHyKU.js","assets/tasks-CwyNaa-j.js","assets/turn-outcome-BSbEJx8h.js","assets/specialists-xbB3xL9e.js","assets/files-GdwDamkp.js","assets/session-manager-C-oe-9_N.js","assets/local-session-drafts-pAAFf-Ad.js","assets/tool-activity-BtJkgjFf.js","assets/attachment-utils-core-BPYdUI6y.js","assets/gateway-realtime-Dzq6_piH.js","assets/gateway-realtime-store-B9CDQ8NO.js","assets/playback-coordinator-CWHIf0wr.js","assets/agents-admin-api-DpfkHNbc.js","assets/page-header-store-BGCCXOOf.js","assets/agent-display-names-Bje7vfSn.js","assets/refresh-button-DX7bULU5.js","assets/dist-DaFr5KMw.js","assets/automation-task-card-CjzArAJi.js","assets/date-picker-DsD7NIm2.js","assets/calendar-days-hw_Y-g-s.js","assets/chevron-left-DqFhpbvK.js","assets/time-picker-otHjbob1.js","assets/date-time-picker-BhnBpBpj.js","assets/automation-result-state-B7fHzLLf.js","assets/routine-panel-sCpXMbMl.js","assets/capabilities-BfTF_flC.js","assets/home-task-actions-DTXb7Gc7.js","assets/capabilities-oihQXc5J.js","assets/right-workspace-store-DsGslCi-.js","assets/phone-workspace-store-Cxk2PJZe.js","assets/workspace-editor-agent-store-BzuNTkZu.js","assets/task-run-issue-notice-XWlgvgEo.js","assets/file-text-D12HbeVy.js","assets/activity-store-BCPCuT-6.js","assets/shares-api-DgYOJV0T.js","assets/capability-presentation-DlJQUUlM.js","assets/home-page-CztF0goW.js","assets/arrow-right-DSSvoX71.js","assets/circle-pause-CN9jYH2s.js","assets/grip-horizontal-CqVA8V1e.js","assets/history-DXH_9jsE.js","assets/list-todo-CTVRto8O.js","assets/lock-keyhole-DEK5kH0u.js","assets/paperclip-f1HujQY1.js","assets/undo-2-6IMTwK4M.js","assets/composer-payload-handoff-DdHGkHOq.js","assets/mic-CuUb7zc-.js","assets/rotate-ccw-JM1TBLpp.js","assets/voice-input-shortcut-events-DaCuiqoi.js","assets/use-realtime-voice-CvtX2HcA.js","assets/voice-CUfqdnlR.js","assets/composer-notifications-L6u0F2_8.js","assets/composer-handoff-params-DBpzHuNo.js","assets/skill-wire-pattern-BPpeIcCi.js","assets/use-composer-attachments-9nVD0sQ1.js","assets/file-code-corner-byQA1VfD.js","assets/file-CStvVK2S.js","assets/use-file-preview-expanded-BhmEiOkv.js","assets/app-window-DXFNqt_0.js","assets/link-2-D_ZKYUW7.js","assets/message-square-plus-XP0tGdlV.js","assets/save-DRDABU--.js","assets/preview-runtime-iJuVSugF.js","assets/rotate-cw-LIg3Am9S.js","assets/electron-env-DHOGevH3.js","assets/use-async-resource-BHFGZCY2.js","assets/workspace-api-_mQWmOZm.js","assets/index.module-Cd9ENXfk.js","assets/constants-D5Z-mUto.js","assets/app-chrome-BeB4KgOf.js","assets/share-link-dialog-CB3LkWw8.js","assets/globe-DSSGFWFn.js","assets/copy-text-row-gqdh0Bg1.js","assets/file-preview-surface-Cw70pwph.js","assets/date-formatters-DukWSVwc.js","assets/tab-completion-input-CxtEp0aP.js","assets/task-detail-page-DFeKIcxT.js","assets/chat-page-CK4aWVbI.js","assets/video-generation-Cec49Jwg.js","assets/arrow-up-D5ZtR1QT.js","assets/product-automation-feedback-ref9gqOW.js","assets/volume-2-BSJhAY97.js","assets/earth-C9Z4bTTG.js","assets/working-directory-picker-modal-C9hWAPvW.js","assets/file-archive-DanfQJNe.js","assets/send-1f1Ntw6E.js","assets/circle-x-DFsCKeya.js","assets/file-tree-utils-DJs1faGv.js","assets/folder-kanban-CpLlFI1o.js","assets/folder-CN-pC3XL.js","assets/notes-api-auhtw3zM.js","assets/chat-chart-block-DurSfGy2.js","assets/key-round-DWbpyU2U.js","assets/laptop-CI3hBVrl.js","assets/list-checks-BbsExAoq.js","assets/messages-square-BckAJrEW.js","assets/monitor-Af5eAvF7.js","assets/use-generated-media-CLEV4wYC.js","assets/install-connector-dialog-CMh8jhn1.js","assets/secret-input-DsjfQmDn.js","assets/is-masked-secret-DOkL5b_X.js","assets/connectors-api-Bn2IbtcF.js","assets/oauth-provider-connect-y6-vDWb-.js","assets/models-hub-cache-DvDksW4g.js","assets/oauth-api-BXKG29Kg.js","assets/connection-usage-guide-CydSRk3h.js","assets/connection-usage-BhdQRWgQ.js","assets/smartphone-DSSsQFqA.js","assets/square-DMK_fB-3.js","assets/user-round-C9jxPhMR.js","assets/wrench-DFb4r8bH.js","assets/new-session-preferences-gb411vZP.js","assets/composer-model-config-control-CrI-u8F_.js","assets/space-api-d4Q4hkEY.js","assets/chunk-D32TOXHM-DQIy-Baq.js","assets/linkify-it-BkqEorO0.js","assets/tool-friendly-title-CJVFJ2Ud.js","assets/voice-call-context-BM2A4bLz.js","assets/new-chat-navigation-spnin196.js","assets/extension-provider-CyYrgUw-.js","assets/theme-store-nXIuAiQZ.js","assets/extension-message-router-DzBfVl6h.js","assets/use-directory-picker-C4p7AgWY.js","assets/confirm-dialog-MHCmEEUZ.js","assets/command-palette-api-3kNqE3U7.js","assets/skill-list-api-CQUhEUOF.js","assets/skill-api-utils-C7V4JVXM.js","assets/dev-view-store-D_uPX9_R.js","assets/extension-iframe-host-BwMISzWU.js","assets/extension-authoritative-grants-DaA0KXyO.js","assets/runtime-health-zDkHcOZO.js","assets/api-BtngCZrB.js","assets/terminal-panel-store-CNkRP4kf.js","assets/agents-app-path-ciChvpCS.js","assets/use-media-query-ady-FgjK.js","assets/oauth-authorization-window-o6URRos4.js","assets/page-context-draft-B30xEPDh.js","assets/management-api-D739TCBl.js","assets/side-chat-shortcut-BIw-1TTD.js","assets/chat-page-zQeUaawJ.css","assets/file-icon-N6WjUhq_.js","assets/presentation-D-Ui_vVA.js","assets/task-header-title-ClyuCAFb.js","assets/page-context-capture-button-BBVJZgU0.js","assets/dependency-picker-DEPr5_Wk.js","assets/projects-page-DlwRbxAj.js","assets/project-understanding-D0S9pFg7.js","assets/project-detail-page-Zr1I56NG.js","assets/resource-unavailable-52Jvhy-I.js","assets/recording-upload-BSyxK34y.js","assets/workspace-open-location-menu-BZSS94es.js","assets/image-Cwyalflz.js","assets/panel-left-C8MqSXRZ.js","assets/sticky-note-fzP7NAJq.js","assets/store-SzD1Jvgm.js","assets/upload-rrb46c3c.js","assets/file-tree-CYUkQR1t.js","assets/workspace-file-preview-dialog-D4Nc7XkR.js","assets/voice-player-store-DipmM7w1.js","assets/project-overview-model-DrLXaO-t.js","assets/directory-picker-path-field-5wZa0JF3.js","assets/skill-api-DRCHLW2T.js","assets/skill-reload-api-BoEna1cx.js","assets/note-detail-panel-CEi6GNEA.js","assets/arrow-down-to-line-C5D8Vt-L.js","assets/code-xml-DJtYhZUF.js","assets/sliders-horizontal-DqsYor6I.js","assets/note-image-lightbox-DftbeSZR.js","assets/project-detail-page-DLioOiRN.css","assets/notes-page-DnI1iJ3g.js","assets/star-BuMAkjC9.js","assets/scan-search-CSIGkseh.js","assets/capabilities-page-B32XFJ59.js","assets/product-navigation-Dp-adLY_.js","assets/capability-links-MZdYfPKx.js","assets/capability-header-actions-Ck3ILShB.js","assets/user-model-page-D4yNFvW1.js","assets/understanding-refresh-store-DPHzCi1Q.js","assets/understanding-activity-store-BI_PbKCi.js","assets/logs-page-Z-4VNgnq.js","assets/sliding-segmented-DagP0myu.js","assets/settings-page-CXRPZxuB.js","assets/browser-settings-page-BLniK98R.js","assets/cpu-B247669f.js","assets/info-CDrmIZhb.js","assets/plug-zap-L8NMe3Sv.js","assets/settings-loading-skeleton-CAoOV17i.js","assets/phone-settings-page-C1Yc6tP7.js","assets/beta-badge-BnzdzIEl.js","assets/global-defaults-api-DXFSI87T.js","assets/phone-model-picker-MWC_Zh2a.js","assets/phone-dependencies-card-DJciwZ-7.js","assets/runtime-tools-api-D8Xtty0g.js","assets/phone-model-connection-C3jmc4ma.js","assets/providers-api-D_v_CJ3l.js","assets/mobile-pair-qr-CuIbmw5x.js","assets/browser-BLJWD7WI.js","assets/computer-settings-page-BwvCOkbI.js","assets/mouse-pointer-2-DZ51Onvj.js","assets/extension-page-DW18FOb8.js","assets/extension-settings-page-ByGVQYDw.js","assets/schema-form-DkuIsCBU.js","assets/secret-input-labels-B5Jl5HqK.js","assets/voice-config-api-7cvKLNoE.js","assets/voice-api-key-field-NINoxB5r.js","assets/extension-debug-page-CXe8jimk.js","assets/share-preview-page-IG0fTWJO.js","assets/local-apps-page-CQBSa3cR.js","assets/box-DvYoGszj.js","assets/local-app-workbench-page-ev6VTDX2.js","assets/power-off-CwwQ7Gp7.js","assets/power-ZI-pBczI.js","assets/product-open-page-B7kAAD7Q.js","assets/open-route-MyZ2sB9C.js","assets/work-discovery-page-uX1VIzJY.js","assets/service-recommendation-list-Kw6pwI8U.js","assets/package-wATCyihJ.js","assets/server-BlHCBjiE.js","assets/agent-plugin-dialog-Bhkawcil.js","assets/capability-icon-CmvCZOJX.js","assets/extension-marketplace-api-DuWuae8G.js","assets/work-discovery-overlay-BKdumzyK.js","assets/brand-logo-CgT9zQfr.js","assets/setup-status-panel-Dp5cY2P9.js","assets/stethoscope-DRqTAtjD.js","assets/appearance-settings-CmdhL-0n.js","assets/preference-select-fields-ByihE_wl.js","assets/keyboard-shortcuts-settings-BOiKmOwN.js","assets/personal-settings-panel-DYnTT7aB.js","assets/voice-settings-BTvMqF_9.js","assets/capability-navigation-CZbCI5C2.js","assets/use-personal-profile-CFaihmiJ.js","assets/personal-profile-settings-BYmKk14v.js","assets/personal-avatar-w5Sekj02.js","assets/personal-avatar-DsEp8QJ7.css","assets/system-settings-panel-dt8k0K4V.js","assets/browser-notification-delivery-DmE2FgGc.js","assets/shield-B1sI_cxl.js","assets/desktop-pet-settings-CfFTYstQ.js","assets/wand-sparkles-CkSL-3Fy.js","assets/desktop-pet-sprite-D5YYq2zC.js","assets/desktop-pet-sprite-BuB0g8zv.css","assets/app-management-settings-panel-Dyc3I-ng.js","assets/capabilities-settings-panel-CWnHPY8j.js","assets/connected-providers-grid-B8eiZl6Z.js","assets/navigation-ByOzYT0t.js","assets/image-generation-api-Ck0rMJy3.js","assets/gateway-settings-xzO7KDsu.js","assets/network-BUQLY1BV.js","assets/gateway-restart-CtqJpyNu.js","assets/runtime-tools-settings-panel-r28zxrgP.js","assets/remote-access-hub-D3EYRXQC.js","assets/tunnel-api-DgsELO9g.js","assets/shares-settings-YeLkRDki.js","assets/use-workspace-tree-BnvuxYD4.js","assets/agent-defaults-settings-panel-CYZzdU6C.js","assets/puzzle-BptcPjKI.js","assets/management-settings-CZDWUPmg.js","assets/shield-off-2jsucUds.js","assets/device-pairing-wizard-BeLkoDUp.js","assets/panel-right-CFGrHTsD.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./preload-helper-Czpn1I53.js";var t=()=>e(()=>import(`./sessions-page-BkNfjgXC.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82])),n=()=>e(()=>import(`./usage-page-BVNBJa59.js`),__vite__mapDeps([83,1,2,3,4,5,6,84,11,15,16,17,18,19,20,8,9,21,22,23,24,80,26,27,85,86,87,42,46,65,50,73,74,75,76,88,89,90,91,13])),r=()=>e(()=>import(`./automations-page-BKbElVfF.js`),__vite__mapDeps([92,2,1,93,4,3,5,6,7,8,9,94,11,95,96,97,17,18,19,42,98,16,99,100,15,20,21,22,23,24,80,101,102,103,104,56,105,81,106,107,28,108,35,39,109,110,13,111,112,113,114,57,115,78,116,86,36,117,75,118,38,62,119,120,121,122,123,40,41,124,125,126,127,128,129,130,45,131,43,44,46,132,133,65,50,134,135,66,60,67,47,48,68,136,51,52,53,137,138,139,140,55,141,142,143,144,145,146,147,148,149,150,74,151,152,153,154])),i=()=>e(()=>import(`./home-page-CztF0goW.js`),__vite__mapDeps([155,1,2,4,3,5,6,7,8,9,156,11,96,16,99,100,80,101,157,55,74,151,158,159,160,161,106,107,28,108,35,39,17,18,109,110,13,111,112,113,114,57,32,58,162,86,36,60,75,163,19,121,144,120,122,125,42,145,146,147,148,149,46,164,165,166,67,47,167,71,168,169,124,40,41,126,127,128,129,130,45,131,43,170,152,132,98,171,172,65,50,173,139,174,175,176,177,102,103,104,29,178,81,179,33,78,180,181,182,183,184,185,123,186,187,188,135,21,22,23,189,15,20,24,190,191,192,153,193,150,154,143,194])),a=()=>e(()=>import(`./task-detail-page-DFeKIcxT.js`),__vite__mapDeps([195,1,2,3,4,5,6,7,8,9,196,107,11,177,14,95,197,198,199,94,84,101,157,55,74,81,32,115,116,166,182,75,90,200,62,17,18,124,13,121,110,40,41,125,126,127,128,129,130,45,131,43,42,46,98,201,16,99,100,202,203,47,48,64,15,19,20,21,22,23,24,80,204,205,25,206,102,27,28,103,174,108,151,175,207,29,208,56,190,159,209,106,35,39,109,111,112,113,114,210,211,212,178,213,160,214,165,215,216,217,218,104,219,220,183,221,89,222,223,224,225,162,78,34,86,180,36,60,37,117,226,227,181,184,185,123,186,38,228,189,191,229,120,122,119,12,230,231,66,67,68,91,232,145,144,146,147,148,149,44,71,164,167,233,234,235,168,169,170,152,236,188,132,237,52,53,238,239,240,51,172,171,133,241,242,153,135,173,139,176,179,33,187,65,50,192,243,244,245,136,96,57,137,138,140,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,193,261,141,150,154,262,263])),o=()=>e(()=>import(`./projects-page-DlwRbxAj.js`),__vite__mapDeps([264,1,2,3,4,5,6,7,8,9,14,11,156,202,203,81,17,18,46,47,48,64,15,16,19,20,21,22,23,24,207,29,34,35,166,36,39,119,13,120,121,110,122,123,132,265,42,241,193])),s=()=>e(()=>import(`./project-detail-page-Zr1I56NG.js`),__vite__mapDeps([266,1,2,3,4,5,6,267,7,8,9,14,11,95,156,199,94,84,101,157,55,74,81,32,115,116,166,182,75,90,200,62,17,18,124,107,13,121,110,40,41,125,126,127,128,129,130,45,131,43,42,46,98,268,99,96,16,139,100,202,203,47,48,64,15,19,20,21,22,23,24,80,204,25,206,269,102,29,170,152,183,28,175,208,56,159,209,106,108,35,39,109,111,112,113,114,210,270,31,213,161,179,165,271,162,34,180,36,37,117,227,181,184,185,123,186,272,273,38,274,228,120,122,119,145,144,146,147,148,149,188,49,50,132,237,171,172,133,265,65,242,134,86,275,103,259,174,151,260,276,176,177,104,178,33,78,187,135,189,190,191,239,71,192,153,173,243,244,245,137,138,193,277,278,79,279,241,280,281,93,97,105,57,118,44,66,60,67,68,136,51,52,53,140,141,142,143,150,154,262,255,282,283,284,285,221,89,222,223,286,263,287])),c=()=>e(()=>import(`./notes-page-DnI1iJ3g.js`),__vite__mapDeps([288,1,2,3,4,5,6,14,11,95,156,198,199,94,84,101,157,55,74,81,32,115,116,166,182,75,90,200,62,17,18,124,107,13,121,110,40,41,125,126,127,128,129,130,45,131,43,42,46,9,98,268,99,138,15,16,19,20,8,21,22,23,24,103,151,208,209,7,28,106,108,35,39,109,111,112,113,114,210,102,289,165,290,162,36,38,188,132,65,50,242,186,135,282,283,284,104,159,57,78,86,285,118,227,274,239,71,153,221,89,183,222,223,255,286,262,146,144,120,122])),l=()=>e(()=>import(`./capabilities-page-B32XFJ59.js`),__vite__mapDeps([291,1,2,4,3,5,6,19,17,18,292,132,293,225,294,36,11,46,9,20,8,21,22,23,253])),u=()=>e(()=>import(`./user-model-page-D4yNFvW1.js`),__vite__mapDeps([295,1,2,3,4,5,6,7,8,9,95,11,201,84,296,42,138,16,99,100,15,17,18,19,20,21,22,23,24,80,101,55,27,28,103,297,29,56,160,81,161,57,78,35,86,36,117,285,75,272,38,274,228,39,46,188,132,52,53,65,50,186,135,137,139])),d=()=>e(()=>import(`./logs-page-Z-4VNgnq.js`),__vite__mapDeps([298,1,2,3,4,5,6,7,8,9,99,11,15,16,17,18,19,20,21,22,23,24,299,50,63,28,151,208,85,105,86,36,61,39,40,13,41,128,129,46,111,48,134,141,137,138,139,100,140,55,73,74,75,76])),f=()=>e(()=>import(`./settings-page-CXRPZxuB.js`),__vite__mapDeps([300,1,2,3,4,5,6])),p=()=>e(()=>import(`./browser-settings-page-BLniK98R.js`),__vite__mapDeps([301,1,2,3,4,5,6,99,11,15,16,17,18,19,20,8,9,21,22,23,24,101,302,28,74,104,29,85,190,303,81,161,304,86,60,90,42,43,46,64,305,72,73,75,76,79,80])),m=()=>e(()=>import(`./phone-settings-page-C1Yc6tP7.js`),__vite__mapDeps([306,1,2,3,4,5,6,7,8,9,177,11,99,15,16,17,18,19,20,21,22,23,24,307,116,35,86,36,117,226,39,42,46,148,135,308,43,73,74,75,309,68,310,101,28,229,311,312,95,67,313,45,41,219,222,314,315])),h=()=>e(()=>import(`./computer-settings-page-BwvCOkbI.js`),__vite__mapDeps([316,1,2,3,4,5,6,16,11,190,215,317,35,117,227,19,17,18,42,43,45,41,46,9,183,66,15,20,8,21,22,23,24,60,67,47,48,68,308,73,74,75,76])),g=()=>e(()=>import(`./extension-page-DW18FOb8.js`),__vite__mapDeps([318,1,2,3,4,267,5,6,132,238,42,128,13,129,239,71,240,110,124,107,121,40,41,125,126,127,130,45,131,43,144,120,122,152,247,7,8,9,19,17,18,64,248,15,11,16,20,21,22,23,24])),_=()=>e(()=>import(`./extension-settings-page-ByGVQYDw.js`),__vite__mapDeps([319,1,2,3,4,5,6,267,15,11,16,17,18,19,20,8,9,21,22,23,24,42,46,48,238,128,13,129,239,71,240,110,124,107,121,40,41,125,126,127,130,45,131,43,144,120,122,152,68,247,7,64,248,305,73,74,75,76,79,80,81,320,218,101,102,104,111,47,219,321,72,322,169,323])),v=()=>e(()=>import(`./extension-debug-page-CXe8jimk.js`),__vite__mapDeps([324,1,2,5,6,238,42,128,13,129,239,71,240,110,124,107,121,40,41,125,126,127,130,45,4,131,43,144,120,122,152,73,3,74,11,75,17,18,46,9,76])),y=()=>e(()=>import(`./share-preview-page-IG0fTWJO.js`),__vite__mapDeps([325,1,2,4,3,5,6,176,11,177,16,99,102,28,103,74,104,29,178,81,106,107,7,8,9,108,35,39,17,18,109,110,13,111,112,113,114,179,33,162,78,86,180,181,182,36,19,121,127,183,184,185,123,186,40,41,187,47,170,152,188,65,50,135,21,22,23,46,210])),b=()=>e(()=>import(`./local-apps-page-CQBSa3cR.js`),__vite__mapDeps([326,1,2,3,4,5,6,156,11,327,35,19,17,18,42,46,9,132,250])),x=()=>e(()=>import(`./local-app-workbench-page-ev6VTDX2.js`),__vite__mapDeps([328,1,2,3,4,5,6,267,7,8,9,95,11,16,15,17,18,19,20,21,22,23,24,101,205,55,74,329,207,159,81,271,330,86,166,117,75,38,90,39,110,13,42,46,239,71,132,240,124,107,121,40,41,125,126,127,128,129,130,45,131,43,144,120,122,152,248,249,250,193,194,262,151,146,135,255])),S=()=>e(()=>import(`./product-open-page-B7kAAD7Q.js`),__vite__mapDeps([331,2,1,3,4,5,6,19,17,18,110,13,42,250,332])),C=()=>e(()=>import(`./work-discovery-page-uX1VIzJY.js`).then(e=>e.n),__vite__mapDeps([333,1,2,3,4,5,6,11,334,7,8,9,99,202,203,81,17,18,46,47,48,64,101,211,217,15,16,19,20,21,22,23,24,74,218,102,104,111,219,39,220,43,42,183,221,89,222,45,41,223,224,75,225,335,35,336,337,95,80,25,29,117,274,293,315,338,339,138,100,55,27,297,151,56,160,214,304,52,53,241])),w=()=>e(()=>import(`./work-discovery-overlay-BKdumzyK.js`),__vite__mapDeps([340,1,2,5,6,7,8,9,333,3,4,11,334,99,202,203,81,17,18,46,47,48,64,101,211,217,15,16,19,20,21,22,23,24,74,218,102,104,111,219,39,220,43,42,183,221,89,222,45,41,223,224,75,225,335,35,336,337,95,80,25,29,117,274,293,315,338,339,138,100,55,27,297,151,56,160,214,304,52,53,241,341])),T=()=>e(()=>import(`./setup-status-panel-Dp5cY2P9.js`),__vite__mapDeps([342,1,2,3,4,5,6,94,11,100,101,205,25,303,81,86,343,90,17,18,19,42,43,129,45,41,46,9,47,219,183,244,245,305,313,222,73,74,75,76,77,78,82,70,71,311])),E=()=>e(()=>import(`./appearance-settings-CmdhL-0n.js`),__vite__mapDeps([344,1,2,5,6,15,11,16,17,18,19,20,8,9,21,22,23,24,43,42,47,345,71,48,239,246,73,3,4,74,75,46,76,82,70])),D=()=>e(()=>import(`./keyboard-shortcuts-settings-BOiKmOwN.js`),__vite__mapDeps([346,1,2,5,6,17,18,183,167,71,257,73,3,4,74,11,75,46,9,76])),O=()=>e(()=>import(`./personal-settings-panel-DYnTT7aB.js`),__vite__mapDeps([347,1,2,5,6,15,11,16,17,18,19,20,8,9,21,22,23,24,124,107,13,121,110,40,41,125,126,127,128,129,130,45,4,131,43,42,348,3,218,101,102,104,81,111,47,48,219,165,116,227,200,169,46,67,168,71,170,152,236,321,68,66,60,305,349,72,79,80,322,323,350,73,74,75,76,351,274,231,95,99,100,166,51,52,53,352,353])),k=()=>e(()=>import(`./system-settings-panel-dt8k0K4V.js`),__vite__mapDeps([354,1,2,5,6,355,11,183,74,86,356,17,18,47,64,73,3,4,75,46,9,76,77,78])),A=()=>e(()=>import(`./desktop-pet-settings-CfFTYstQ.js`),__vite__mapDeps([357,1,2,3,4,5,6,267,99,11,15,16,17,18,19,20,8,9,21,22,23,24,80,74,179,358,166,47,183,134,86,46,359,360,73,75,76])),j=()=>e(()=>import(`./app-management-settings-panel-Dyc3I-ng.js`),__vite__mapDeps([361,1,2,5,6,7,8,9,102,11,81,335,17,18,19,42,46,24,111,47,183,64,305,73,3,4,74,75,76,77,78])),M=()=>e(()=>import(`./capabilities-settings-panel-CWnHPY8j.js`),__vite__mapDeps([362,1,2,4,3,5,6,7,8,9,156,11,197,100,15,16,17,18,19,20,21,22,23,24,101,363,139,218,102,104,81,111,47,48,219,190,35,36,60,39,42,43,45,41,46,321,65,50,68,349,222,313,221,89,183,223,154,74,270,211,78,59,86,117,285,38,90,229,169,13,91,67,348,165,116,227,200,130,168,124,107,121,110,40,125,126,127,128,129,131,71,170,152,236,66,305,72,79,80,322,323,364,64,242,252,308,69,70,254,73,75,76,77,365,88])),N=()=>e(()=>import(`./gateway-settings-xzO7KDsu.js`),__vite__mapDeps([366,1,2,3,4,5,6,15,11,16,17,18,19,20,8,9,21,22,23,24,80,218,101,102,104,81,111,47,48,219,303,211,367,86,182,368,89,215,78,117,42,46,183,356,285,90,43,321,364,49,50,64,242,7,70,71,305,69,72,73,74,75,76,77,82])),P=()=>e(()=>import(`./runtime-tools-settings-panel-r28zxrgP.js`),__vite__mapDeps([369,1,2,5,6,15,11,16,17,18,19,20,8,9,21,22,23,24,80,101,28,166,42,46,134,86,305,73,3,4,74,75,76,82,70,71,311,310,99,229])),F=()=>e(()=>import(`./remote-access-hub-D3EYRXQC.js`),__vite__mapDeps([370,1,2,3,4,5,6,7,8,9,156,11,16,99,100,25,102,74,218,101,104,81,17,18,111,47,48,219,190,211,367,330,336,356,226,61,90,42,43,46,24,49,50,64,242,191,21,22,23,70,71,313,45,41,222,223,183,69,254,73,75,76,77,78,371,19,364,82])),I=()=>e(()=>import(`./shares-settings-YeLkRDki.js`),__vite__mapDeps([372,1,2,3,4,5,6,7,8,9,16,11,99,15,17,18,19,20,21,22,23,24,206,89,102,151,29,159,81,32,35,86,272,38,189,74,190,39,46,191,111,42,43,131,48,49,47,50,133,64,242,275,100,103,259,203,174,108,175,260,208,183,153,373,185,123,13,149,305,221,101,222,45,41,223,72,73,75,76,77,78])),L=()=>e(()=>import(`./agent-defaults-settings-panel-CYZzdU6C.js`),__vite__mapDeps([374,1,2,3,4,5,6,101,11,85,213,375,36,117,285,17,18,19,91,13,42,46,9,183,65,50,244,245,70,71,308,43,69,72,73,74,75,76,79,16,80,81])),R=()=>e(()=>import(`./management-settings-CZDWUPmg.js`),__vite__mapDeps([376,1,2,3,4,5,6,7,8,9,94,11,139,100,15,16,17,18,19,20,21,22,23,24,212,377,35,36,226,39,40,13,41,42,46,49,47,50,242,134,86,186,305,256,73,74,75,76,378,101,55,28,379,109,110,184,191,102,111,223,183,254,371,190,81,330,43,48,364,77,78,314,315])),z=new Set;function B(e){z.has(e)||(z.add(e),e().catch(()=>{z.delete(e)}))}function V(){B(a)}function H(e){let[t]=e.split(/[?#]/,1);return t||`/`}function U(e){B(f);let t=e.slice(10);if(t===`overview`)return B(T);if(t===`appearance`)return B(E);if(t===`keyboard-shortcuts`)return B(D);if(t===`personal`)return B(O);if(t===`system`)return B(k);if(t===`desktop-pet`)return B(A);if(t===`desktop-app`)return B(j);if(t.startsWith(`capabilities/`))return B(M);if(t===`gateway`)return B(N);if(t===`runtimes`)return B(P);if(t===`devices`)return B(R);if(t===`tunnel`||t===`remote-access`)return B(F);if(t===`shares`)return B(I);if(t===`agent-defaults`)return B(L);if(t===`agent-browser`)return B(p);if(t===`phone-use`)return B(m);if(t===`computer-use`)return B(h)}function W(e){if(!e.startsWith(`/`))return;let a=H(e);if(a===`/capabilities`||a.startsWith(`/capabilities/`))return B(l);if(a===`/user-model`)return B(u);if(a===`/automations`)return B(r);if(a===`/`)return B(i);if(a.startsWith(`/tasks/`))return V();if(a===`/projects`)return B(o);if(a.startsWith(`/projects/`))return B(s);if(a===`/notes`||a.startsWith(`/notes/`))return B(c);if(a.startsWith(`/extensions/`))return B(g);if(a===`/local-apps`)return B(b);if(a.startsWith(`/local-apps/`))return B(x);if(a===`/open`)return B(S);if(a===`/onboarding/workspace`)return B(C);if(a.startsWith(`/share/`))return B(y);if(a===`/settings/sessions`)return B(t);if(a===`/settings/usage`)return B(n);if(a===`/settings/logs`)return B(d);if(a===`/settings/extensions/debug`)return B(v);if(a.startsWith(`/settings/ext/`))return B(_);if(a.startsWith(`/settings/`))return U(a)}export{y as A,s as C,t as D,P as E,u as F,w as I,C as L,k as M,a as N,f as O,n as P,W as R,S,F as T,b as _,r as a,O as b,A as c,g as d,_ as f,x as g,D as h,E as i,I as j,T as k,R as l,i as m,L as n,M as o,N as p,j as r,h as s,p as t,v as u,d as v,o as w,m as x,c as y,V as z};
|