@xopcai/xopc 0.0.414 → 0.0.415

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.
Files changed (264) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/telegram/xopc.extension.json +1 -1
  3. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-ClobpdW3.js → agent-avatar-dicebear-CJFwitU2.js} +1 -1
  4. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DclyJr1N.js +1 -0
  5. package/dist/gateway/static/root/assets/{agents-admin-api-CeBkHnl8.js → agents-admin-api-B1p-ghg9.js} +1 -1
  6. package/dist/gateway/static/root/assets/agents-jhErNtzi.js +77 -0
  7. package/dist/gateway/static/root/assets/{app-management-settings-panel-CLunLNGp.js → app-management-settings-panel-DgwqNi5i.js} +1 -1
  8. package/dist/gateway/static/root/assets/{appearance-settings-DBEgoE9g.js → appearance-settings-C0wJfFyz.js} +1 -1
  9. package/dist/gateway/static/root/assets/apps-page-C0LcnI4h.js +1 -0
  10. package/dist/gateway/static/root/assets/{archive-plugin-JElK4Goq.js → archive-plugin-Ch7wolHE.js} +1 -1
  11. package/dist/gateway/static/root/assets/{automations-page-CZ0UqwyU.js → automations-page-DK7AU79v.js} +1 -1
  12. package/dist/gateway/static/root/assets/automations-workspace-CBxiV34x.js +8 -0
  13. package/dist/gateway/static/root/assets/{binary-plugins-CXFawow6.js → binary-plugins-B4HcHYsC.js} +1 -1
  14. package/dist/gateway/static/root/assets/{block-editor-BoduwSYI.js → block-editor-BQAWEZF-.js} +30 -30
  15. package/dist/gateway/static/root/assets/{browser-automation-inputs-D1pDgMJu.js → browser-automation-inputs-D6AccXaA.js} +1 -1
  16. package/dist/gateway/static/root/assets/browser-automations-page-vJIrTxdi.js +3 -0
  17. package/dist/gateway/static/root/assets/browser-settings-page-in5Roh_E.js +3 -0
  18. package/dist/gateway/static/root/assets/{capabilities-Bpeh6E22.js → capabilities-BlxF36t-.js} +1 -1
  19. package/dist/gateway/static/root/assets/{capabilities-page-C-EecWbS.js → capabilities-page-CiGx8wpQ.js} +2 -2
  20. package/dist/gateway/static/root/assets/capabilities-settings-panel-a8kqjzQu.js +8 -0
  21. package/dist/gateway/static/root/assets/{capability-header-actions-BasrAWA0.js → capability-header-actions-D4Yq35fD.js} +1 -1
  22. package/dist/gateway/static/root/assets/channels-C_CxcjKT.js +1 -0
  23. package/dist/gateway/static/root/assets/{chat-terminal-dock-CwQbzcZ_.js → chat-terminal-dock-zdMySdMm.js} +2 -2
  24. package/dist/gateway/static/root/assets/{computer-settings-page-DNWeJKfF.js → computer-settings-page-C5Z6Jr0p.js} +1 -1
  25. package/dist/gateway/static/root/assets/{connector-service-page-CxHgC5RM.js → connector-service-page-Cxus0qrZ.js} +1 -1
  26. package/dist/gateway/static/root/assets/connectors-page-DCBO2CxK.js +1 -0
  27. package/dist/gateway/static/root/assets/{date-picker-CXxLbLJb.js → date-picker-DuyyD6jz.js} +1 -1
  28. package/dist/gateway/static/root/assets/{dependency-picker-DVuWMrSj.js → dependency-picker-BZN72rrk.js} +1 -1
  29. package/dist/gateway/static/root/assets/{desktop-pet-KbVLtAlO.js → desktop-pet-BtvTIDCi.js} +1 -1
  30. package/dist/gateway/static/root/assets/{desktop-pet-settings-BDlg9g4s.js → desktop-pet-settings-BcyP7Z6v.js} +1 -1
  31. package/dist/gateway/static/root/assets/device-pairing-wizard-Ctbgr50F.js +1 -0
  32. package/dist/gateway/static/root/assets/{directory-picker-path-field-a7xEodzo.js → directory-picker-path-field-DOusKz-O.js} +1 -1
  33. package/dist/gateway/static/root/assets/{extension-debug-page-CHelH5u_.js → extension-debug-page-Bt4FwsFu.js} +1 -1
  34. package/dist/gateway/static/root/assets/{extension-page-CrVHmS9-.js → extension-page-0vsxX3FB.js} +1 -1
  35. package/dist/gateway/static/root/assets/{extension-settings-page-CiMybi0r.js → extension-settings-page-5Pt5_ELc.js} +1 -1
  36. package/dist/gateway/static/root/assets/{gateway-config-swr-DF_HV6NP.js → gateway-config-swr-fQKBHBi1.js} +1 -1
  37. package/dist/gateway/static/root/assets/{gateway-realtime-DMAzNlm-.js → gateway-realtime-DkWCHVzI.js} +1 -1
  38. package/dist/gateway/static/root/assets/gateway-realtime-store-Bx9KCID-.js +1 -0
  39. package/dist/gateway/static/root/assets/gateway-settings-BsVOcmV5.js +1 -0
  40. package/dist/gateway/static/root/assets/{gateway-startup-retry-B91CBTzO.js → gateway-startup-retry-Cfwxof4k.js} +1 -1
  41. package/dist/gateway/static/root/assets/{highlight-code-AMjU04kR.js → highlight-code-C8eS9949.js} +1 -1
  42. package/dist/gateway/static/root/assets/{highlighted-body-KQOG7T2V-8ACAVktj.js → highlighted-body-KQOG7T2V-Cbk7eMlg.js} +1 -1
  43. package/dist/gateway/static/root/assets/home-page-BZDZnmyc.js +2 -0
  44. package/dist/gateway/static/root/assets/{image-generation-api-CVBaWmrV.js → image-generation-api-CAS8QVla.js} +1 -1
  45. package/dist/gateway/static/root/assets/{imports-page-C5IP3e6d.js → imports-page-BCLBYzV1.js} +1 -1
  46. package/dist/gateway/static/root/assets/index-Bys6njTY.js +710 -0
  47. package/dist/gateway/static/root/assets/index-Vsf0bj5e.css +1 -0
  48. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-BhU6VYvd.js → keyboard-shortcuts-settings-CM_kt5XN.js} +1 -1
  49. package/dist/gateway/static/root/assets/local-app-workbench-page-Dk87jtcc.js +1 -0
  50. package/dist/gateway/static/root/assets/{local-apps-page-DcP1Bdlk.js → local-apps-page-BTSOChhk.js} +1 -1
  51. package/dist/gateway/static/root/assets/{local-session-drafts-DvmwiLUx.js → local-session-drafts-iGX_6O0O.js} +1 -1
  52. package/dist/gateway/static/root/assets/{locale-store-JogcXC4J.js → locale-store-B7s2Hb35.js} +1 -1
  53. package/dist/gateway/static/root/assets/{logs-page-CS3hcTOq.js → logs-page-D3gVdm8S.js} +2 -2
  54. package/dist/gateway/static/root/assets/management-settings-BQNYFE4J.js +1 -0
  55. package/dist/gateway/static/root/assets/{media-plugins-BnPpcJ2J.js → media-plugins-DYQDjCVQ.js} +1 -1
  56. package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-ChweJKTv.js +1 -0
  57. package/dist/gateway/static/root/assets/{messages-RzwPiQNL.js → messages-BYq0cPbn.js} +2 -2
  58. package/dist/gateway/static/root/assets/note-detail-panel-CYKwUCte.js +5 -0
  59. package/dist/gateway/static/root/assets/note-image-lightbox-BTSZb9ZT.js +1 -0
  60. package/dist/gateway/static/root/assets/notes-page-CJ5nhWfL.js +8 -0
  61. package/dist/gateway/static/root/assets/page-context-capture-button-DVn_dU83.js +1 -0
  62. package/dist/gateway/static/root/assets/personal-page-DcW14lqn.js +1 -0
  63. package/dist/gateway/static/root/assets/personal-settings-panel-C16Iqe7X.js +1 -0
  64. package/dist/gateway/static/root/assets/phone-dependencies-card-D3l9uPFM.js +1 -0
  65. package/dist/gateway/static/root/assets/{phone-model-picker-CZoIAQ1j.js → phone-model-picker-DOv38vBn.js} +1 -1
  66. package/dist/gateway/static/root/assets/phone-settings-page-DUHp1q_9.js +1 -0
  67. package/dist/gateway/static/root/assets/plugin-details-dialog-BpfgDlVa.js +1 -0
  68. package/dist/gateway/static/root/assets/{preview-open-alternatives-FGqN-mQx.js → preview-open-alternatives-RlHk76TI.js} +1 -1
  69. package/dist/gateway/static/root/assets/{product-open-page-CwnHLfdL.js → product-open-page-Dh-HqLrE.js} +1 -1
  70. package/dist/gateway/static/root/assets/{product-preview-content-BD6k5hF9.js → product-preview-content-c3K-4DWc.js} +1 -1
  71. package/dist/gateway/static/root/assets/project-detail-page-GD8TxKad.js +7 -0
  72. package/dist/gateway/static/root/assets/projects-page-B8HAt9sD.js +1 -0
  73. package/dist/gateway/static/root/assets/{registry-api-BGqSwITi.js → registry-api-BcfoLEna.js} +1 -1
  74. package/dist/gateway/static/root/assets/remote-access-hub-D3el7lHK.js +1 -0
  75. package/dist/gateway/static/root/assets/{runtime-tools-api-CSm5SpnR.js → runtime-tools-api-DesqGCnE.js} +1 -1
  76. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-q_oswAdV.js → runtime-tools-settings-panel-Dbskk6RG.js} +1 -1
  77. package/dist/gateway/static/root/assets/{schema-form-DoVn5jJK.js → schema-form-CXO1B1k4.js} +1 -1
  78. package/dist/gateway/static/root/assets/{session-api-DTxZyMta.js → session-api-DdQnMwkl.js} +1 -1
  79. package/dist/gateway/static/root/assets/{session-manager-B2HDomj4.js → session-manager-CA1NkTR_.js} +1 -1
  80. package/dist/gateway/static/root/assets/sessions-page-07liaSHH.js +1 -0
  81. package/dist/gateway/static/root/assets/settings-advanced-gate-BGjU8rfN.js +1 -0
  82. package/dist/gateway/static/root/assets/{settings-form-section-Ce8vVv-9.js → settings-form-section-BQxKmbbJ.js} +1 -1
  83. package/dist/gateway/static/root/assets/{settings-page-DP2w3ejC.js → settings-page-DvVMpKiA.js} +1 -1
  84. package/dist/gateway/static/root/assets/{setup-status-panel-ZmlE8jIE.js → setup-status-panel-DKo_VTx-.js} +1 -1
  85. package/dist/gateway/static/root/assets/{share-preview-page-DV4dKrmG.js → share-preview-page-XgZk8Oa1.js} +1 -1
  86. package/dist/gateway/static/root/assets/shares-settings-BODFqK8k.js +1 -0
  87. package/dist/gateway/static/root/assets/{skill-api-DTdejInH.js → skill-api-CV-WT2hj.js} +1 -1
  88. package/dist/gateway/static/root/assets/skill-reload-api-Ce6OUk2C.js +1 -0
  89. package/dist/gateway/static/root/assets/skills-page-B7ehOIML.js +2 -0
  90. package/dist/gateway/static/root/assets/{system-settings-panel-Baxkhov7.js → system-settings-panel-CxJkZRT4.js} +1 -1
  91. package/dist/gateway/static/root/assets/task-detail-page-CxRR0QuW.js +2 -0
  92. package/dist/gateway/static/root/assets/{task-result-evidence-DIGSC4qF.js → task-result-evidence-D-gGKNX9.js} +1 -1
  93. package/dist/gateway/static/root/assets/{tracing-settings-page-BaU8frtc.js → tracing-settings-page-CQw3G-FB.js} +1 -1
  94. package/dist/gateway/static/root/assets/{tunnel-api-BCcOUsqu.js → tunnel-api-B2HnCi0U.js} +1 -1
  95. package/dist/gateway/static/root/assets/{usage-page-BFeIbpbi.js → usage-page-uUEkO38r.js} +1 -1
  96. package/dist/gateway/static/root/assets/{use-autosave-C1X47WVb.js → use-autosave-Dc0nwUpX.js} +1 -1
  97. package/dist/gateway/static/root/assets/user-model-page-ICUutbKL.js +2 -0
  98. package/dist/gateway/static/root/assets/{voice-api-key-field-Bk4DQMTw.js → voice-api-key-field-BSWXZkGa.js} +1 -1
  99. package/dist/gateway/static/root/assets/{voice-config-api-D7xsWrdh.js → voice-config-api-BkUlN7GH.js} +1 -1
  100. package/dist/gateway/static/root/assets/{work-discovery-overlay-B7_NmTB5.js → work-discovery-overlay-H3cdwq3l.js} +1 -1
  101. package/dist/gateway/static/root/assets/{xopc-cloud-account-card-CJ_akAvc.js → xopc-cloud-account-card-CvT_W6YS.js} +1 -1
  102. package/dist/gateway/static/root/index.html +14 -14
  103. package/dist/package.js +1 -1
  104. package/dist/src/agent/coding/workspace-revision.js +1 -1
  105. package/dist/src/agent/commands/command-registry.js +1 -1
  106. package/dist/src/agent/memory/context-recovery.d.ts +1 -1
  107. package/dist/src/agent/skills/installer.js +3 -3
  108. package/dist/src/agent/tool-manuals/phone.d.ts +1 -1
  109. package/dist/src/agent/tool-manuals/phone.js +4 -2
  110. package/dist/src/agent/tools/personal-task-tool.d.ts +1 -1
  111. package/dist/src/agent/tools/personal-task-tool.js +23 -21
  112. package/dist/src/agent/tools/phone-use-tool.js +20 -0
  113. package/dist/src/backup/archive.js +2 -1
  114. package/dist/src/browser/providers/browser-ext-install.js +1 -1
  115. package/dist/src/cli/commands/extension-marketplace.js +3 -3
  116. package/dist/src/cli/commands/extension-pack.js +1 -1
  117. package/dist/src/cli/commands/extension.js +2 -2
  118. package/dist/src/cli/commands/gateway/lifecycle.js +1 -1
  119. package/dist/src/connectors/connected-source-understanding.js +1 -1
  120. package/dist/src/connectors/learning-coordinator.js +1 -1
  121. package/dist/src/extensions/install.js +1 -1
  122. package/dist/src/extensions/update.js +1 -1
  123. package/dist/src/gateway/hono/routes/auth-registry-extensions.js +1 -1
  124. package/dist/src/gateway/hono/routes/connectors.js +7 -7
  125. package/dist/src/gateway/hono/routes/home.js +1 -1
  126. package/dist/src/gateway/hono/routes/phone.js +8 -0
  127. package/dist/src/gateway/hono/routes/public-gateway.js +1 -1
  128. package/dist/src/gateway/service/config-coordinator.js +1 -1
  129. package/dist/src/gateway/service/session-input-coordinator.js +1 -1
  130. package/dist/src/gateway/service.js +7 -7
  131. package/dist/src/infra/unhandled-rejections.js +2 -2
  132. package/dist/src/infra/update-restart.js +1 -1
  133. package/dist/src/infra/update-runner.js +1 -1
  134. package/dist/src/personal-agent/prompts.js +1 -1
  135. package/dist/src/phone/adb-driver.d.ts +6 -2
  136. package/dist/src/phone/adb-driver.js +89 -37
  137. package/dist/src/phone/cloud-adb.js +8 -0
  138. package/dist/src/phone/cloud-scrcpy.d.ts +3 -1
  139. package/dist/src/phone/cloud-scrcpy.js +17 -3
  140. package/dist/src/phone/contracts.d.ts +45 -0
  141. package/dist/src/phone/contracts.js +16 -3
  142. package/dist/src/phone/model-adapter.d.ts +83 -1
  143. package/dist/src/phone/model-adapter.js +75 -17
  144. package/dist/src/phone/reliability.d.ts +7 -0
  145. package/dist/src/phone/reliability.js +66 -0
  146. package/dist/src/phone/runtime.d.ts +8 -0
  147. package/dist/src/phone/runtime.js +179 -11
  148. package/dist/src/phone/scrcpy-text.d.ts +11 -0
  149. package/dist/src/phone/scrcpy-text.js +72 -0
  150. package/dist/src/phone/scrcpy.d.ts +5 -1
  151. package/dist/src/phone/scrcpy.js +48 -3
  152. package/dist/src/storage/sqlite/connection.js +2 -2
  153. package/dist/src/storage/sqlite/offline-access.js +13 -7
  154. package/dist/src/storage/sqlite/schema-errors.d.ts +12 -0
  155. package/dist/src/storage/sqlite/schema-errors.js +21 -3
  156. package/dist/src/storage/sqlite/schema-upgrade.d.ts +4 -0
  157. package/dist/src/storage/sqlite/schema-upgrade.js +78 -0
  158. package/dist/src/storage/sqlite/schema.d.ts +2 -1
  159. package/dist/src/storage/sqlite/schema.js +9 -3
  160. package/dist/src/storage/sqlite/upgrades/203_remove_retired_proactive_contracts.sql +70 -0
  161. package/dist/src/storage/sqlite/upgrades/204_home_intelligence.sql +78 -0
  162. package/dist/src/storage/sqlite/upgrades/205_agent_catalog.sql +66 -0
  163. package/dist/src/storage/sqlite/upgrades/206_home_advice_strategy_version.sql +2 -0
  164. package/dist/src/storage/sqlite/upgrades/207_user_model_policy_contract.sql +121 -0
  165. package/dist/src/storage/sqlite/upgrades/208_automation_management.sql +2 -0
  166. package/dist/src/storage/sqlite/upgrades/209_automation_event_hub.sql +48 -0
  167. package/dist/src/storage/sqlite/upgrades/210_remove_legacy_automation_timeout.sql +14 -0
  168. package/dist/src/storage/sqlite/upgrades/211_automation_result_deliveries.sql +16 -0
  169. package/dist/src/storage/sqlite/upgrades/212_automation_delivery_policy.sql +30 -0
  170. package/dist/src/storage/sqlite/upgrades/213_automation_reliability_contract.sql +188 -0
  171. package/dist/src/storage/sqlite/upgrades/214_ai_usage_ledger.sql +41 -0
  172. package/dist/src/storage/sqlite/upgrades/215_scene_execution_adapters.sql +6 -0
  173. package/dist/src/storage/sqlite/upgrades/216_remove_scene_model_usage.sql +1 -0
  174. package/dist/src/storage/sqlite/upgrades/217_remove_legacy_memory_tables.sql +4 -0
  175. package/dist/src/storage/sqlite/upgrades/218_core_relation_indexes.sql +26 -0
  176. package/dist/src/storage/sqlite/upgrades/219_json_contracts.sql +123 -0
  177. package/dist/src/storage/sqlite/upgrades/220_normalize_timestamps.sql +339 -0
  178. package/dist/src/storage/sqlite/upgrades/221_ai_usage_retention_index.sql +2 -0
  179. package/dist/src/storage/sqlite/upgrades/222_session_config_authority.sql +13 -0
  180. package/dist/src/storage/sqlite/upgrades/223_session_creation_receipts.sql +59 -0
  181. package/dist/src/storage/sqlite/upgrades/224_task_origin_links.sql +8 -0
  182. package/dist/src/storage/sqlite/upgrades/225_task_collaboration.sql +32 -0
  183. package/dist/src/storage/sqlite/upgrades/226_task_main_updates.sql +9 -0
  184. package/dist/src/storage/sqlite/upgrades/227_task_main_update_decisions.sql +8 -0
  185. package/dist/src/storage/sqlite/upgrades/228_task_main_agent_links.sql +14 -0
  186. package/dist/src/storage/sqlite/upgrades/229_task_criterion_reviews.sql +12 -0
  187. package/dist/src/storage/sqlite/upgrades/230_personal_agent_onboarding.sql +8 -0
  188. package/dist/src/storage/sqlite/upgrades/231_task_result_deliveries.sql +32 -0
  189. package/dist/src/storage/sqlite/upgrades/232_personal_requests.sql +28 -0
  190. package/dist/src/storage/sqlite/upgrades/233_observability_usage_links.sql +3 -0
  191. package/dist/src/storage/sqlite/upgrades/234_task_result_reply.sql +14 -0
  192. package/dist/src/storage/sqlite/upgrades/235_personal_conversation_priority.sql +3 -0
  193. package/dist/src/storage/sqlite/upgrades/236_personal_proactivity.sql +53 -0
  194. package/dist/src/storage/sqlite/upgrades/237_personal_strategy_versions.sql +18 -0
  195. package/dist/src/storage/sqlite/upgrades/238_browser_record_replay.sql +45 -0
  196. package/dist/src/storage/sqlite/upgrades/239_clarification_notifications.sql +26 -0
  197. package/dist/src/storage/sqlite/upgrades/240_device_settings.sql +5 -0
  198. package/dist/src/storage/sqlite/upgrades/241_device_grant_audit.sql +13 -0
  199. package/dist/src/storage/sqlite/upgrades/242_cloud_usage_receipts.sql +5 -0
  200. package/dist/src/storage/sqlite/upgrades/243_voice_opening_greetings.sql +12 -0
  201. package/dist/src/storage/sqlite/upgrades/244_device_request_proofs.sql +8 -0
  202. package/dist/src/storage/sqlite/upgrades/245_memory_learning.sql +125 -0
  203. package/dist/src/storage/sqlite/upgrades/246_personal_session_thinking.sql +22 -0
  204. package/dist/src/storage/sqlite/upgrades/247_agent_selection_records.sql +32 -0
  205. package/dist/src/storage/sqlite/upgrades/248_next_turn_suggestions.sql +20 -0
  206. package/dist/src/storage/sqlite/upgrades/249_task_allocations.sql +17 -0
  207. package/dist/src/storage/sqlite/upgrades/250_research_checkpoints.sql +15 -0
  208. package/dist/src/storage/sqlite/upgrades/251_personal_result_reads.sql +40 -0
  209. package/dist/src/storage/sqlite/upgrades/252_task_work_revisions.sql +15 -0
  210. package/dist/src/storage/sqlite/upgrades/253_discussion_processing_recovery.sql +20 -0
  211. package/dist/src/storage/sqlite/upgrades/254_discussion_annotations.sql +17 -0
  212. package/dist/src/storage/sqlite/upgrades/255_discussion_chapter_progress.sql +10 -0
  213. package/dist/src/storage/sqlite/upgrades/256_task_main_update_retries.sql +21 -0
  214. package/dist/src/storage/sqlite/upgrades/257_session_composer_history.sql +11 -0
  215. package/dist/src/storage/sqlite/upgrades/258_task_phase_changes.sql +20 -0
  216. package/dist/src/storage/sqlite/upgrades/259_personal_default_style.sql +10 -0
  217. package/dist/src/storage/sqlite/windows-database-owners.js +33 -28
  218. package/dist/src/tasks/capabilities/relations.d.ts +2 -2
  219. package/dist/src/tui/clipboard-image.js +1 -1
  220. package/dist/src/tui/tui.js +1 -1
  221. package/dist/src/user-context/sources/index.js +1 -1
  222. package/dist/src/utils/index.js +1 -1
  223. package/dist/src/utils/logger/index.js +1 -1
  224. package/dist/src/utils/logger.js +1 -1
  225. package/dist/src/work-discovery/probe.js +1 -1
  226. package/dist/src/work-discovery/service.js +2 -2
  227. package/package.json +5 -5
  228. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-mf0jgEPE.js +0 -1
  229. package/dist/gateway/static/root/assets/agents-CKhZ4UYQ.js +0 -77
  230. package/dist/gateway/static/root/assets/apps-page-BZ_MaQJf.js +0 -1
  231. package/dist/gateway/static/root/assets/automations-workspace-CHUDHNVL.js +0 -8
  232. package/dist/gateway/static/root/assets/browser-automations-page-DStDm9y1.js +0 -3
  233. package/dist/gateway/static/root/assets/browser-settings-page-6I4oetKt.js +0 -3
  234. package/dist/gateway/static/root/assets/capabilities-settings-panel-BQoCPk3x.js +0 -8
  235. package/dist/gateway/static/root/assets/channels-BKf_-Mdt.js +0 -1
  236. package/dist/gateway/static/root/assets/connectors-page-CUBg8spT.js +0 -1
  237. package/dist/gateway/static/root/assets/device-pairing-wizard-PmP_vGem.js +0 -1
  238. package/dist/gateway/static/root/assets/gateway-realtime-store-CoIgC1Al.js +0 -1
  239. package/dist/gateway/static/root/assets/gateway-settings-DnrQ28E2.js +0 -1
  240. package/dist/gateway/static/root/assets/home-page-pTwVME-g.js +0 -2
  241. package/dist/gateway/static/root/assets/index-BLL0wKRZ.css +0 -1
  242. package/dist/gateway/static/root/assets/index-ygkHNYyo.js +0 -710
  243. package/dist/gateway/static/root/assets/local-app-workbench-page-Cwl6EvuX.js +0 -1
  244. package/dist/gateway/static/root/assets/management-settings-DC-Y_-GP.js +0 -1
  245. package/dist/gateway/static/root/assets/mermaid-MCJ5UELQ-vckgHpON.js +0 -1
  246. package/dist/gateway/static/root/assets/note-detail-panel-C7u4dxEk.js +0 -5
  247. package/dist/gateway/static/root/assets/note-image-lightbox-jvqYtySx.js +0 -1
  248. package/dist/gateway/static/root/assets/notes-page-Bs7F5Hpf.js +0 -8
  249. package/dist/gateway/static/root/assets/page-context-capture-button-DO_yhXS1.js +0 -1
  250. package/dist/gateway/static/root/assets/personal-page-BexL2-PQ.js +0 -1
  251. package/dist/gateway/static/root/assets/personal-settings-panel-BKA4fbYH.js +0 -1
  252. package/dist/gateway/static/root/assets/phone-dependencies-card-ChFtdFhA.js +0 -1
  253. package/dist/gateway/static/root/assets/phone-settings-page-DRyK0nHH.js +0 -1
  254. package/dist/gateway/static/root/assets/plugin-details-dialog-B-N61jJH.js +0 -1
  255. package/dist/gateway/static/root/assets/project-detail-page-DtKmFBml.js +0 -7
  256. package/dist/gateway/static/root/assets/projects-page-CFZIz9mc.js +0 -1
  257. package/dist/gateway/static/root/assets/remote-access-hub-CWEc7W0m.js +0 -1
  258. package/dist/gateway/static/root/assets/sessions-page-BuPqNxpd.js +0 -1
  259. package/dist/gateway/static/root/assets/settings-advanced-gate-QTVDCGJG.js +0 -1
  260. package/dist/gateway/static/root/assets/shares-settings-CtNxWqW-.js +0 -1
  261. package/dist/gateway/static/root/assets/skill-reload-api-Egaf8PqZ.js +0 -1
  262. package/dist/gateway/static/root/assets/skills-page-C6FKxf4J.js +0 -2
  263. package/dist/gateway/static/root/assets/task-detail-page-C77-rpkt.js +0 -2
  264. package/dist/gateway/static/root/assets/user-model-page-u8zY5jea.js +0 -2
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-ygkHNYyo.js","assets/rolldown-runtime-aKtaBQYM.js","assets/preload-helper-zJ_50EbN.js","assets/es2015-DBLcMg5B.js","assets/vendor-react-BOUWij0V.js","assets/dist-CxGUk8J-.js","assets/middleware-Pd0e8Igk.js","assets/locale-store-JogcXC4J.js","assets/messages-RzwPiQNL.js","assets/dist-CI_fqRk-.js","assets/floating-ui.dom-B7uQOZZW.js","assets/chunk-KS7C4IRE-BvcCCgTW.js","assets/vendor-swr-BIWyz7Rc.js","assets/createLucideIcon-DPHK1VkS.js","assets/app-window-DXFNqt_0.js","assets/check-DUBLcKHA.js","assets/chevron-down-ccbiQQz_.js","assets/popover-select-DGKUpVsz.js","assets/dist-C3DSFZCi.js","assets/skeleton-BI5TyibZ.js","assets/cn-0WouolD0.js","assets/bundle-mjs-rHxsej31.js","assets/settings-shell-dialog-layer-BU3UuiJr.js","assets/circle-check-C23XjkUj.js","assets/copy-Dv6d4Dvw.js","assets/download-Dk-ZjtO6.js","assets/ellipsis-0k4rZLoy.js","assets/external-link-DjqjBmc3.js","assets/eye-CABVeTq0.js","assets/file-image-CDUPkZvG.js","assets/folder-open-CyzJ19I9.js","assets/globe-DSSGFWFn.js","assets/loader-circle-CifKLtgG.js","assets/session-manager-B2HDomj4.js","assets/schemas-CObaziC7.js","assets/gateway-realtime-DMAzNlm-.js","assets/gateway-realtime-store-CoIgC1Al.js","assets/local-session-drafts-DvmwiLUx.js","assets/session-api-DTxZyMta.js","assets/gateway-startup-retry-B91CBTzO.js","assets/personal-proactivity-BJcZ3Yhi.js","assets/constants-DeXt1mV-.js","assets/tool-activity-BtJkgjFf.js","assets/registry-api-BGqSwITi.js","assets/attachment-utils-core-BIOUBrpT.js","assets/agents-admin-api-CeBkHnl8.js","assets/gateway-config-swr-DF_HV6NP.js","assets/capabilities-Bpeh6E22.js","assets/local-apps-yys1VChX.js","assets/tasks-TVRjEggr.js","assets/specialists-4bkS5rZ4.js","assets/product-delivery-BqNm-8S5.js","assets/files-Bw4SBGdM.js","assets/button-aIC072nz.js","assets/sliding-indicator-hwz0sx3h.js","assets/copy-to-clipboard-HOJ79TWv.js","assets/electron-env-Dit0bHgy.js","assets/index-BLL0wKRZ.css"])))=>i.map(i=>d[i]);
2
- 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"./preload-helper-zJ_50EbN.js";import{l as a,m as o,t as s,u as c}from"./chunk-KS7C4IRE-BvcCCgTW.js";import{t as l}from"./chevron-down-ccbiQQz_.js";import{t as u}from"./circle-check-C23XjkUj.js";import{t as d}from"./external-link-DjqjBmc3.js";import{t as f}from"./messages-RzwPiQNL.js";import{t as p}from"./cn-0WouolD0.js";import{n as m}from"./locale-store-JogcXC4J.js";import{s as h}from"./tasks-TVRjEggr.js";import{t as g}from"./button-aIC072nz.js";import{t as _}from"./skeleton-BI5TyibZ.js";import{a as v,i as y,o as b,s as x}from"./dist-C3DSFZCi.js";import{$s as S,Ac as C,Ad as w,Bc as T,Bs as E,Cn as D,Dc as O,El as k,Fc as A,Fl as j,Ha as M,Hl as N,Hs as P,Ic as F,Io as I,Jr as L,Js as R,Ks as z,Lc as B,Pd as V,Ql as H,Qs as U,Rc as W,Sn as G,Tn as K,Uu as q,Vc as ee,Xs as te,Yr as ne,Zs as re,_a as ie,bd as ae,di as oe,ec as se,hu as ce,io as le,jd as J,nc as ue,oi as de,qc as fe,qs as pe,r as me,sc as he,vl as Y,wn as ge,zc as _e,zs as ve}from"./index-ygkHNYyo.js";import{n as ye}from"./date-formatters-DukWSVwc.js";import{n as be}from"./tab-completion-input-CxtEp0aP.js";import{i as xe,n as Se,r as X,t as Ce}from"./task-result-evidence-DIGSC4qF.js";var Z=n(),Q=e(t(),1);function we(e,t,n=!1){let[r,i]=(0,Q.useState)(null),[a,o]=(0,Q.useState)(!0),[s,c]=(0,Q.useState)(null),l=(0,Q.useRef)(0),u=(0,Q.useCallback)(async()=>{let t=++l.current;c(null);try{let r=await(n?z(e,!0):z(e));t===l.current&&i(r)}catch(e){t===l.current&&c(e instanceof Error?e.message:String(e))}finally{t===l.current&&o(!1)}},[e,n]);return(0,Q.useEffect)(()=>(u(),()=>{l.current++}),[u,t]),(0,Q.useEffect)(()=>{let e,t=1/0,n=n=>{let r=Date.now()+n;r>=t||(window.clearTimeout(e),t=r,e=window.setTimeout(()=>{e=void 0,t=1/0,u()},n))},r=()=>n(100),i=()=>n(750),a=()=>{document.visibilityState===`visible`&&r()},o=[`task-changed-v2`,`task-updated`,`session-created`,`agent-run-started`,`agent-run-ended`,`automation-run-completed`,`home-advisor-updated`,`gateway-realtime-connected`,`realtime-gap`,`focus`],s=[`session-updated`,`session-transcript-updated`];return o.forEach(e=>window.addEventListener(e,r)),s.forEach(e=>window.addEventListener(e,i)),document.addEventListener(`visibilitychange`,a),()=>{o.forEach(e=>window.removeEventListener(e,r)),s.forEach(e=>window.removeEventListener(e,i)),document.removeEventListener(`visibilitychange`,a),window.clearTimeout(e)}},[u]),{home:r,loading:a,loadError:s,setLoadError:c,load:u}}var $=r(),Te=12e3;function Ee(e){let t=(0,Z.c)(107),{variant:n,inputId:r,inputRef:i,intent:a,labels:o,attachments:s,isDragging:c,attachmentBusy:l,attachmentsFull:u,voice:d,chat:f,cancelAction:m,onIntentChange:h,onPickFiles:_,onRemoveAttachment:v,onPaste:y,onDragOver:b,onDragLeave:x,onDrop:S,onSubmit:C}=e,w=n===`inline`,T;t[0]!==s||t[1]!==a?(T=!!a.trim()||s.length>0,t[0]=s,t[1]=a,t[2]=T):T=t[2];let E=T,D=d.voiceActive&&d.phase!==`error`,O;t[3]!==C||t[4]!==d.voiceActive?(O=e=>{if(d.voiceActive){e.preventDefault();return}C(e)},t[3]=C,t[4]=d.voiceActive,t[5]=O):O=t[5];let k=w?`mx-auto mt-6 w-full overflow-hidden rounded-xl border border-edge bg-surface-base p-2 text-left shadow-surface transition-colors focus-within:border-accent focus-within:ring-2 focus-within:ring-accent/15 sm:mt-8`:`flex min-h-0 flex-1 flex-col`,A;t[6]===k?A=t[7]:(A=p(`relative`,k),t[6]=k,t[7]=A);let j;t[8]!==w||t[9]!==c||t[10]!==o.dropFiles?(j=c?(0,$.jsx)(`div`,{className:p(`pointer-events-none absolute inset-0 z-10 flex items-center justify-center bg-accent-soft/90 text-sm font-medium text-accent-fg backdrop-blur-[1px]`,w&&`rounded-2xl`),children:o.dropFiles}):null,t[8]=w,t[9]=c,t[10]=o.dropFiles,t[11]=j):j=t[11];let M=!w&&`flex min-h-0 flex-1 flex-col overflow-y-auto px-5 py-4`,N;t[12]===M?N=t[13]:(N=p(M),t[12]=M,t[13]=N);let P=w?`sr-only`:`mb-2 shrink-0 text-sm font-medium text-fg`,F;t[14]!==r||t[15]!==o.intentLabel||t[16]!==P?(F=(0,$.jsx)(`label`,{htmlFor:r,className:P,children:o.intentLabel}),t[14]=r,t[15]=o.intentLabel,t[16]=P,t[17]=F):F=t[17];let I;t[18]!==l||t[19]!==f||t[20]!==d.audioLevel||t[21]!==d.cancelVoiceInput||t[22]!==d.confirmVoiceInput||t[23]!==d.elapsedLabel||t[24]!==d.error||t[25]!==d.finalTranscript||t[26]!==d.partialTranscript||t[27]!==d.phase||t[28]!==d.recordedDictation||t[29]!==d.retryVoiceInput||t[30]!==d.settingsRequired||t[31]!==d.voiceActive?(I=d.voiceActive?(0,$.jsx)(ge,{phase:d.phase,elapsedLabel:d.elapsedLabel,recordedDictation:d.recordedDictation,audioLevel:d.audioLevel,partialTranscript:d.partialTranscript,finalTranscript:d.finalTranscript,error:d.error,settingsRequired:d.settingsRequired,disabled:l,chat:f,onCancel:d.cancelVoiceInput,onConfirm:d.confirmVoiceInput,onRetry:d.retryVoiceInput}):null,t[18]=l,t[19]=f,t[20]=d.audioLevel,t[21]=d.cancelVoiceInput,t[22]=d.confirmVoiceInput,t[23]=d.elapsedLabel,t[24]=d.error,t[25]=d.finalTranscript,t[26]=d.partialTranscript,t[27]=d.phase,t[28]=d.recordedDictation,t[29]=d.retryVoiceInput,t[30]=d.settingsRequired,t[31]=d.voiceActive,t[32]=I):I=t[32];let L=D&&`hidden`,R=w?`min-h-24 bg-transparent px-3 py-2`:`min-h-32 flex-1 rounded-xl border border-edge bg-surface-base p-3 focus:border-accent focus:ring-2 focus:ring-accent/20`,z;t[33]!==L||t[34]!==R?(z=p(`w-full resize-none text-sm font-normal leading-6 text-fg outline-none placeholder:text-fg-subtle`,L,R),t[33]=L,t[34]=R,t[35]=z):z=t[35];let B;t[36]===h?B=t[37]:(B=e=>h(e.target.value),t[36]=h,t[37]=B);let V=!w,U;t[38]!==r||t[39]!==i||t[40]!==a||t[41]!==o.intentPlaceholder||t[42]!==o.intentSuggestion||t[43]!==h||t[44]!==y||t[45]!==z||t[46]!==B||t[47]!==V?(U=(0,$.jsx)(be,{ref:i,id:r,className:z,value:a,onChange:B,onPaste:y,suggestion:o.intentSuggestion,onAcceptSuggestion:h,onKeyDown:De,placeholder:o.intentPlaceholder,maxLength:Te,autoFocus:V}),t[38]=r,t[39]=i,t[40]=a,t[41]=o.intentPlaceholder,t[42]=o.intentSuggestion,t[43]=h,t[44]=y,t[45]=z,t[46]=B,t[47]=V,t[48]=U):U=t[48];let W=w?`border-b-0 bg-transparent px-3 pb-2 pt-0`:`mt-3 border-b-0 bg-transparent px-0 pb-0`,G;t[49]!==s||t[50]!==v||t[51]!==W?(G=(0,$.jsx)(de,{attachments:s,topPadded:!1,onRemove:v,className:W}),t[49]=s,t[50]=v,t[51]=W,t[52]=G):G=t[52];let K;t[53]!==w||t[54]!==a.length||t[55]!==o.shortcut?(K=w?null:(0,$.jsxs)(`div`,{className:`mt-2 flex shrink-0 items-center justify-between gap-3 text-[11px] text-fg-subtle`,children:[(0,$.jsx)(`span`,{children:o.shortcut}),(0,$.jsxs)(`span`,{className:`tabular-nums`,children:[a.length.toLocaleString(),` / `,Te.toLocaleString()]})]}),t[53]=w,t[54]=a.length,t[55]=o.shortcut,t[56]=K):K=t[56];let q;t[57]!==I||t[58]!==U||t[59]!==G||t[60]!==K||t[61]!==N||t[62]!==F?(q=(0,$.jsxs)(`div`,{className:N,children:[F,I,U,G,K]}),t[57]=I,t[58]=U,t[59]=G,t[60]=K,t[61]=N,t[62]=F,t[63]=q):q=t[63];let ee=w?`border-edge-subtle px-1 pt-2`:`border-edge px-5 py-4`,te;t[64]===ee?te=t[65]:(te=p(`flex shrink-0 items-center gap-2 border-t`,ee),t[64]=ee,t[65]=te);let re=!w&&`mr-auto`,ie;t[66]===re?ie=t[67]:(ie=p(`flex items-center gap-1`,re),t[66]=re,t[67]=ie);let ae=l||u,oe;t[68]===Symbol.for(`react.memo_cache_sentinel`)?(oe=(0,$.jsx)(H,{className:`size-4`,"aria-hidden":!0}),t[68]=oe):oe=t[68];let se;t[69]!==o.attachTitle||t[70]!==_||t[71]!==ae?(se=(0,$.jsx)(g,{type:`button`,variant:`ghost`,className:`size-9 rounded-lg p-0`,disabled:ae,title:o.attachTitle,"aria-label":o.attachTitle,onClick:_,children:oe}),t[69]=o.attachTitle,t[70]=_,t[71]=ae,t[72]=se):se=t[72];let ce;t[73]!==l||t[74]!==f||t[75]!==d.startVoiceInput||t[76]!==d.voiceActive?(ce=d.voiceActive?null:(0,$.jsx)(ne,{disabled:l,chat:f,onStart:d.startVoiceInput}),t[73]=l,t[74]=f,t[75]=d.startVoiceInput,t[76]=d.voiceActive,t[77]=ce):ce=t[77];let le;t[78]!==ie||t[79]!==se||t[80]!==ce?(le=(0,$.jsxs)(`div`,{className:ie,children:[se,ce]}),t[78]=ie,t[79]=se,t[80]=ce,t[81]=le):le=t[81];let J;t[82]!==m||t[83]!==w||t[84]!==o.shortcut?(J=w?(0,$.jsx)(`span`,{className:`hidden text-[11px] text-fg-subtle sm:inline`,children:o.shortcut}):m,t[82]=m,t[83]=w,t[84]=o.shortcut,t[85]=J):J=t[85];let ue=w?`ml-auto h-9 rounded-lg px-3.5 text-xs`:`min-w-32`,fe=!E||l||d.voiceActive,pe=w?`size-3.5`:`size-4`,me;t[86]===pe?me=t[87]:(me=(0,$.jsx)(Y,{className:pe,"aria-hidden":!0}),t[86]=pe,t[87]=me);let he;t[88]!==o.submit||t[89]!==ue||t[90]!==fe||t[91]!==me?(he=(0,$.jsxs)(g,{type:`submit`,variant:`primary`,className:ue,disabled:fe,children:[me,o.submit]}),t[88]=o.submit,t[89]=ue,t[90]=fe,t[91]=me,t[92]=he):he=t[92];let _e;t[93]!==te||t[94]!==le||t[95]!==J||t[96]!==he?(_e=(0,$.jsxs)(`div`,{className:te,children:[le,J,he]}),t[93]=te,t[94]=le,t[95]=J,t[96]=he,t[97]=_e):_e=t[97];let ve;return t[98]!==x||t[99]!==b||t[100]!==S||t[101]!==O||t[102]!==q||t[103]!==_e||t[104]!==A||t[105]!==j?(ve=(0,$.jsxs)(`form`,{onSubmit:O,onDragOver:b,onDragLeave:x,onDrop:S,className:A,children:[j,q,_e]}),t[98]=x,t[99]=b,t[100]=S,t[101]=O,t[102]=q,t[103]=_e,t[104]=A,t[105]=j,t[106]=ve):ve=t[106],ve}function De(e){e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),e.currentTarget.form?.requestSubmit())}function Oe(e){let t=(0,Z.c)(12),{href:n,children:r,onOpen:i}=e,o=a();if(n&&/^https?:\/\//i.test(n)){let e;return t[0]!==r||t[1]!==n?(e=(0,$.jsx)(`a`,{href:n,target:`_blank`,rel:`noopener noreferrer`,className:`rounded-sm text-accent-fg hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:r}),t[0]=r,t[1]=n,t[2]=e):e=t[2],e}if(n?.startsWith(`/`)&&!n.startsWith(`//`)){let e=`${o.pathname}${o.search}`,a;t[3]!==n||t[4]!==e?(a=O(e,n),t[3]=n,t[4]=e,t[5]=a):a=t[5];let c;return t[6]!==r||t[7]!==i||t[8]!==a?(c=(0,$.jsx)(s,{to:a,className:`rounded-sm text-accent-fg hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,onClick:i,children:r}),t[6]=r,t[7]=i,t[8]=a,t[9]=c):c=t[9],c}let c;return t[10]===r?c=t[11]:(c=(0,$.jsx)(`span`,{children:r}),t[10]=r,t[11]=c),c}function ke(e){let t=(0,Z.c)(4),{label:n,onClick:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,$.jsx)(q,{className:`size-3.5`,"aria-hidden":!0}),t[0]=i):i=t[0];let a;return t[1]!==n||t[2]!==r?(a=(0,$.jsxs)(`button`,{type:`button`,className:`inline-flex min-h-9 items-center gap-1.5 rounded-lg px-2 text-xs font-medium text-fg-muted transition-colors duration-150 hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,onClick:r,children:[i,n]}),t[1]=n,t[2]=r,t[3]=a):a=t[3],a}function Ae(e){let t=(0,Z.c)(65),{opportunity:n,copy:r,onOpenHistory:i}=e,a,o,s,c,u,d;if(t[0]!==r.aiLabel||t[1]!==r.automationAction||t[2]!==r.automationHint||t[3]!==r.history||t[4]!==r.minutes||t[5]!==r.needsSetup||t[6]!==r.why||t[7]!==i||t[8]!==n.capabilities||t[9]!==n.continuation||t[10]!==n.estimatedMinutes||t[11]!==n.outcome||t[12]!==n.rationale||t[13]!==n.title){let e=n.capabilities.filter(Me),l;t[20]===r.aiLabel?l=t[21]:(l=(0,$.jsx)(`span`,{children:r.aiLabel}),t[20]=r.aiLabel,t[21]=l);let f;t[22]!==r.minutes||t[23]!==n.estimatedMinutes?(f=n.estimatedMinutes?(0,$.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,$.jsx)(ae,{className:`size-3.5`,"aria-hidden":!0}),n.estimatedMinutes,` `,r.minutes]}):null,t[22]=r.minutes,t[23]=n.estimatedMinutes,t[24]=f):f=t[24];let p;t[25]!==l||t[26]!==f?(p=(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-xs text-fg-subtle`,children:[l,f]}),t[25]=l,t[26]=f,t[27]=p):p=t[27];let m;t[28]!==r.history||t[29]!==i?(m=(0,$.jsx)(ke,{label:r.history,onClick:i}),t[28]=r.history,t[29]=i,t[30]=m):m=t[30],t[31]!==m||t[32]!==p?(a=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[p,m]}),t[31]=m,t[32]=p,t[33]=a):a=t[33],t[34]===n.title?o=t[35]:(o=(0,$.jsx)(`h3`,{className:`mt-3 text-xl font-semibold leading-7 tracking-tight text-fg`,children:n.title}),t[34]=n.title,t[35]=o),t[36]===n.outcome?s=t[37]:(s=(0,$.jsx)(`p`,{className:`mt-2 text-sm leading-6 text-fg-muted`,children:n.outcome}),t[36]=n.outcome,t[37]=s);let h;t[38]===r.why?h=t[39]:(h=(0,$.jsxs)(`span`,{className:`font-medium text-fg`,children:[r.why,`:`]}),t[38]=r.why,t[39]=h),t[40]!==n.rationale||t[41]!==h?(c=(0,$.jsxs)(`p`,{className:`mt-4 text-sm leading-6 text-fg-muted`,children:[h,n.rationale]}),t[40]=n.rationale,t[41]=h,t[42]=c):c=t[42],t[43]!==r.automationAction||t[44]!==r.automationHint||t[45]!==n.continuation?(u=n.continuation?.kind===`automation`?(0,$.jsxs)(`div`,{className:`mt-4 flex flex-col gap-3 rounded-xl border border-edge bg-surface-subtle p-3 sm:flex-row sm:items-center sm:justify-between`,children:[(0,$.jsx)(`p`,{className:`text-xs leading-5 text-fg-muted`,children:r.automationHint}),(0,$.jsx)(`a`,{href:`#${n.continuation.href}`,className:`inline-flex min-h-11 shrink-0 items-center rounded-lg px-3 text-xs font-medium text-accent hover:bg-accent-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:r.automationAction})]}):null,t[43]=r.automationAction,t[44]=r.automationHint,t[45]=n.continuation,t[46]=u):u=t[46],d=e.length>0?(0,$.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,"aria-label":r.needsSetup,children:e.map(e=>(0,$.jsxs)(`a`,{href:`#${e.recoveryPath??`/settings`}`,className:`rounded-full border border-accent/25 bg-accent-soft px-2.5 py-1 text-xs text-accent hover:border-accent/50`,children:[r.needsSetup,` · `,e.capability]},`${e.kind}:${e.capability}`))}):null,t[0]=r.aiLabel,t[1]=r.automationAction,t[2]=r.automationHint,t[3]=r.history,t[4]=r.minutes,t[5]=r.needsSetup,t[6]=r.why,t[7]=i,t[8]=n.capabilities,t[9]=n.continuation,t[10]=n.estimatedMinutes,t[11]=n.outcome,t[12]=n.rationale,t[13]=n.title,t[14]=a,t[15]=o,t[16]=s,t[17]=c,t[18]=u,t[19]=d}else a=t[14],o=t[15],s=t[16],c=t[17],u=t[18],d=t[19];let f;t[47]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,$.jsx)(l,{className:`size-3.5 transition-transform group-open:rotate-180`,"aria-hidden":!0}),t[47]=f):f=t[47];let p;t[48]===r.evidence?p=t[49]:(p=(0,$.jsxs)(`summary`,{className:`flex min-h-9 cursor-pointer list-none items-center gap-1.5 text-xs font-medium text-fg-muted hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[r.evidence,f]}),t[48]=r.evidence,t[49]=p);let m;t[50]===n.evidence?m=t[51]:(m=n.evidence.map(je),t[50]=n.evidence,t[51]=m);let h;t[52]===m?h=t[53]:(h=(0,$.jsx)(`ul`,{className:`mt-2 space-y-2 border-l border-edge pl-3 text-xs leading-5 text-fg-muted`,children:m}),t[52]=m,t[53]=h);let g;t[54]!==h||t[55]!==p?(g=(0,$.jsxs)(`details`,{open:!0,className:`mt-4 group`,children:[p,h]}),t[54]=h,t[55]=p,t[56]=g):g=t[56];let _;return t[57]!==a||t[58]!==g||t[59]!==o||t[60]!==s||t[61]!==c||t[62]!==u||t[63]!==d?(_=(0,$.jsxs)($.Fragment,{children:[a,o,s,c,u,d,g]}),t[57]=a,t[58]=g,t[59]=o,t[60]=s,t[61]=c,t[62]=u,t[63]=d,t[64]=_):_=t[64],_}function je(e){return(0,$.jsx)(`li`,{children:(0,$.jsx)(Oe,{href:e.href,children:e.observation})},e.id)}function Me(e){return e.readiness!==`ready`}function Ne(e){let t=(0,Z.c)(134),{advisor:n,copy:r,busy:i,onRefresh:a,onAction:o,onFeedback:s,onClarification:c,onOpenHistory:l,preflight:d,receipt:f}=e,[p,m]=(0,Q.useState)(),h;t[0]!==n.alternatives||t[1]!==n.primary||t[2]!==n.state?(h=n.state===`ready`?[n.primary,...n.alternatives]:[],t[0]=n.alternatives,t[1]=n.primary,t[2]=n.state,t[3]=h):h=t[3];let _=h,v;t[4]!==_||t[5]!==p?(v=_.find(e=>e.id===p)??_[0],t[4]=_,t[5]=p,t[6]=v):v=t[6];let y=v,b;t[7]===_[0]?.id?b=t[8]:(b=()=>m(_[0]?.id),t[7]=_[0]?.id,t[8]=b);let x=_[0]?.id,S;if(t[9]!==n.state||t[10]!==x?(S=[n.state,x],t[9]=n.state,t[10]=x,t[11]=S):S=t[11],(0,Q.useEffect)(b,S),n.state===`disabled`)return null;if(f){let e;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(u,{className:`size-5 shrink-0 text-success`,"aria-hidden":!0}),t[12]=e):e=t[12];let n;t[13]===f.title?n=t[14]:(n=(0,$.jsx)(`p`,{className:`text-sm font-semibold text-fg`,children:f.title}),t[13]=f.title,t[14]=n);let i;t[15]===f.detail?i=t[16]:(i=(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:f.detail}),t[15]=f.detail,t[16]=i);let a;t[17]!==n||t[18]!==i?(a=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[n,i]}),t[17]=n,t[18]=i,t[19]=a):a=t[19];let o;t[20]!==r.history||t[21]!==l?(o=(0,$.jsx)(ke,{label:r.history,onClick:l}),t[20]=r.history,t[21]=l,t[22]=o):o=t[22];let s=`#${f.href}`,c;t[23]!==r.viewProgress||t[24]!==s?(c=(0,$.jsx)(g,{asChild:!0,variant:`secondary`,className:`min-h-10 text-xs`,children:(0,$.jsx)(`a`,{href:s,children:r.viewProgress})}),t[23]=r.viewProgress,t[24]=s,t[25]=c):c=t[25];let d;t[26]!==o||t[27]!==c?(d=(0,$.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[o,c]}),t[26]=o,t[27]=c,t[28]=d):d=t[28];let p;return t[29]!==d||t[30]!==a?(p=(0,$.jsx)(`section`,{className:`mt-7 rounded-2xl border border-success/25 bg-success-soft px-5 py-4`,role:`status`,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-center`,children:[e,a,d]})}),t[29]=d,t[30]=a,t[31]=p):p=t[31],p}if(n.state===`quiet`||n.state===`refreshing`)return null;if(n.state===`clarification`){let e;t[32]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,$.jsx)(Y,{className:`size-4`,"aria-hidden":!0}),t[32]=e):e=t[32];let a;t[33]===r.aiLabel?a=t[34]:(a=(0,$.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-medium text-accent`,children:[e,r.aiLabel]}),t[33]=r.aiLabel,t[34]=a);let o;t[35]!==r.history||t[36]!==l?(o=(0,$.jsx)(ke,{label:r.history,onClick:l}),t[35]=r.history,t[36]=l,t[37]=o):o=t[37];let s;t[38]!==a||t[39]!==o?(s=(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[a,o]}),t[38]=a,t[39]=o,t[40]=s):s=t[40];let u;t[41]===n.question.question?u=t[42]:(u=(0,$.jsx)(`h3`,{id:`home-advisor-question`,className:`mt-3 text-lg font-semibold text-fg`,children:n.question.question}),t[41]=n.question.question,t[42]=u);let d;if(t[43]!==n.question.options||t[44]!==n.question.question||t[45]!==i||t[46]!==c){let e;t[48]!==n.question.question||t[49]!==i||t[50]!==c?(e=e=>(0,$.jsx)(g,{type:`button`,variant:`secondary`,className:`min-h-11`,disabled:i,onClick:()=>c(n.question.question,e.label),children:e.label},e.id),t[48]=n.question.question,t[49]=i,t[50]=c,t[51]=e):e=t[51],d=n.question.options.map(e),t[43]=n.question.options,t[44]=n.question.question,t[45]=i,t[46]=c,t[47]=d}else d=t[47];let f;t[52]===d?f=t[53]:(f=(0,$.jsx)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:d}),t[52]=d,t[53]=f);let p;return t[54]!==u||t[55]!==f||t[56]!==s?(p=(0,$.jsxs)(`section`,{className:`mt-7 rounded-2xl border border-accent/25 bg-surface-base px-5 py-5`,"aria-labelledby":`home-advisor-question`,children:[s,u,f]}),t[54]=u,t[55]=f,t[56]=s,t[57]=p):p=t[57],p}if(!y)return null;let C=d?.opportunityId===y.id?d.value:void 0,w;t[58]!==n.stale||t[59]!==r.refreshing?(w=n.stale?(0,$.jsxs)(`p`,{className:`mb-3 inline-flex items-center gap-2 text-xs text-accent`,children:[(0,$.jsx)(j,{className:`size-3.5 animate-spin`,"aria-hidden":!0}),r.refreshing]}):null,t[58]=n.stale,t[59]=r.refreshing,t[60]=w):w=t[60];let T;t[61]!==r||t[62]!==l||t[63]!==y?(T=(0,$.jsx)(Ae,{opportunity:y,copy:r,onOpenHistory:l}),t[61]=r,t[62]=l,t[63]=y,t[64]=T):T=t[64];let E;t[65]!==i||t[66]!==r.configure||t[67]!==r.degradedStart||t[68]!==r.setupHint||t[69]!==r.setupTitle||t[70]!==o||t[71]!==y||t[72]!==C?(E=C?.state===`needs_setup`?(0,$.jsx)(`div`,{className:`mt-5 rounded-xl border border-accent/25 bg-accent-soft/40 p-4`,role:`alert`,"aria-live":`polite`,children:(0,$.jsxs)(`div`,{className:`flex gap-3`,children:[(0,$.jsx)(k,{className:`mt-0.5 size-4 shrink-0 text-accent`,"aria-hidden":!0}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`text-sm font-semibold text-fg`,children:r.setupTitle}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:r.setupHint}),(0,$.jsx)(`ul`,{className:`mt-2 space-y-1 text-xs leading-5 text-fg-muted`,children:C.blockers.map(Pe)}),(0,$.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[C.recoveryActions.map(e=>(0,$.jsxs)(`a`,{href:`#${e.href}`,className:`inline-flex min-h-11 items-center rounded-lg border border-accent/30 px-3 text-xs font-medium text-accent hover:bg-accent-soft focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:[r.configure,` · `,e.capability]},e.capability)),C.degradedAction?(0,$.jsx)(g,{type:`button`,variant:`secondary`,className:`min-h-11`,disabled:i,onClick:()=>o(y,`degraded_start`),children:r.degradedStart}):null]})]})]})}):null,t[65]=i,t[66]=r.configure,t[67]=r.degradedStart,t[68]=r.setupHint,t[69]=r.setupTitle,t[70]=o,t[71]=y,t[72]=C,t[73]=E):E=t[73];let D;t[74]!==i||t[75]!==r.start||t[76]!==o||t[77]!==y?(D=y.actions.canStart?(0,$.jsxs)(g,{type:`button`,variant:`primary`,className:`min-h-11`,disabled:i,onClick:()=>o(y,`start`),children:[(0,$.jsx)(Y,{className:`size-4`,"aria-hidden":!0}),r.start]}):null,t[74]=i,t[75]=r.start,t[76]=o,t[77]=y,t[78]=D):D=t[78];let O;t[79]!==i||t[80]!==r.discuss||t[81]!==o||t[82]!==y?(O=y.actions.canDiscuss?(0,$.jsxs)(g,{type:`button`,variant:`secondary`,className:`min-h-11`,disabled:i,onClick:()=>o(y,`discuss`),children:[(0,$.jsx)(ce,{className:`size-4`,"aria-hidden":!0}),r.discuss]}):null,t[79]=i,t[80]=r.discuss,t[81]=o,t[82]=y,t[83]=O):O=t[83];let A;t[84]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,$.jsx)(j,{className:`size-4`,"aria-hidden":!0}),t[84]=A):A=t[84];let M;t[85]!==i||t[86]!==r.refresh||t[87]!==a?(M=(0,$.jsxs)(g,{type:`button`,variant:`ghost`,className:`min-h-11`,disabled:i,onClick:a,title:r.refresh,children:[A,r.refresh]}),t[85]=i,t[86]=r.refresh,t[87]=a,t[88]=M):M=t[88];let N;t[89]===r.feedback?N=t[90]:(N=(0,$.jsx)(`summary`,{className:`flex min-h-11 cursor-pointer list-none items-center rounded-lg px-3 text-xs text-fg-muted hover:bg-surface-hover hover:text-fg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent`,children:r.feedback}),t[89]=r.feedback,t[90]=N);let P;t[91]===r.alreadyDone?P=t[92]:(P=[`already_done`,r.alreadyDone],t[91]=r.alreadyDone,t[92]=P);let F;t[93]===r.irrelevant?F=t[94]:(F=[`irrelevant`,r.irrelevant],t[93]=r.irrelevant,t[94]=F);let I;t[95]===r.later?I=t[96]:(I=[`too_early`,r.later],t[95]=r.later,t[96]=I);let L;t[97]===r.sourceIncorrect?L=t[98]:(L=[`source_incorrect`,r.sourceIncorrect],t[97]=r.sourceIncorrect,t[98]=L);let R;t[99]===r.lessLikeThis?R=t[100]:(R=[`less_like_this`,r.lessLikeThis],t[99]=r.lessLikeThis,t[100]=R);let z;t[101]!==P||t[102]!==F||t[103]!==I||t[104]!==L||t[105]!==R?(z=[P,F,I,L,R],t[101]=P,t[102]=F,t[103]=I,t[104]=L,t[105]=R,t[106]=z):z=t[106];let B=z,V;t[107]!==i||t[108]!==s||t[109]!==y||t[110]!==B?(V=(0,$.jsx)(`div`,{className:`absolute right-0 z-20 mt-1 w-44 rounded-xl border border-edge bg-surface-overlay p-1 shadow-float`,children:B.map(e=>{let[t,n]=e;return(0,$.jsx)(`button`,{type:`button`,disabled:i,className:`min-h-10 w-full rounded-lg px-3 text-left text-sm text-fg-muted hover:bg-surface-hover hover:text-fg`,onClick:()=>s(y,t),children:n},t)})}),t[107]=i,t[108]=s,t[109]=y,t[110]=B,t[111]=V):V=t[111];let H;t[112]!==N||t[113]!==V?(H=(0,$.jsxs)(`details`,{className:`relative ml-auto`,children:[N,V]}),t[112]=N,t[113]=V,t[114]=H):H=t[114];let U;t[115]!==O||t[116]!==M||t[117]!==H||t[118]!==D?(U=(0,$.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center gap-2`,children:[D,O,M,H]}),t[115]=O,t[116]=M,t[117]=H,t[118]=D,t[119]=U):U=t[119];let W;t[120]!==U||t[121]!==w||t[122]!==T||t[123]!==E?(W=(0,$.jsxs)(`div`,{className:`px-5 py-5 sm:px-6`,children:[w,T,E,U]}),t[120]=U,t[121]=w,t[122]=T,t[123]=E,t[124]=W):W=t[124];let G;t[125]!==i||t[126]!==r.alternatives||t[127]!==_||t[128]!==y.id?(G=_.length>1?(0,$.jsxs)(`div`,{className:`border-t border-edge-subtle px-5 py-4 sm:px-6`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium text-fg-subtle`,children:r.alternatives}),(0,$.jsx)(`div`,{className:`mt-2 flex flex-wrap gap-2`,children:_.filter(e=>e.id!==y.id).map(e=>(0,$.jsx)(`button`,{type:`button`,disabled:i,className:`min-h-10 rounded-lg border border-edge px-3 text-left text-sm text-fg-muted hover:bg-surface-hover hover:text-fg`,onClick:()=>m(e.id),children:e.title},e.id))})]}):null,t[125]=i,t[126]=r.alternatives,t[127]=_,t[128]=y.id,t[129]=G):G=t[129];let K;return t[130]!==r.aiLabel||t[131]!==W||t[132]!==G?(K=(0,$.jsxs)(`section`,{className:`mt-7 rounded-2xl border border-accent/25 bg-surface-base`,"aria-label":r.aiLabel,children:[W,G]}),t[130]=r.aiLabel,t[131]=W,t[132]=G,t[133]=K):K=t[133],K}function Pe(e){return(0,$.jsx)(`li`,{children:e.message},`${e.kind}:${e.capability}`)}var Fe=new Set([`started`,`discussing`,`completed`]);function Ie(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsx)(`div`,{className:`space-y-4`,"aria-busy":!0,children:[0,1,2].map(Le)}),e[0]=t):t=e[0],t}function Le(e){return(0,$.jsxs)(`div`,{className:`space-y-2 rounded-xl border border-edge-subtle p-4`,children:[(0,$.jsx)(_,{className:`h-4 w-24 rounded`}),(0,$.jsx)(_,{className:`h-5 w-4/5 rounded`}),(0,$.jsx)(_,{className:`h-4 w-3/5 rounded`})]},e)}function Re(e){let t=(0,Z.c)(11),{open:n,refreshKey:r,onOpenChange:i,onReevaluate:a}=e,o=m(ze),s=f(o).projectsPage.home,u=c(),[p,h]=(0,Q.useState)(`all`),_;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_=[],t[0]=_):_=t[0];let[v,y]=(0,Q.useState)(_),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(),w;t[1]===n?w=t[2]:(w=()=>{if(!n)return;let e=!0;return x(!0),C(void 0),pe().then(t=>{e&&y(t.items)}).catch(t=>{e&&C(t instanceof Error?t.message:String(t))}).finally(()=>{e&&x(!1)}),()=>{e=!1}},t[1]=n,t[2]=w);let E;t[3]!==n||t[4]!==r?(E=[n,r],t[3]=n,t[4]=r,t[5]=E):E=t[5],(0,Q.useEffect)(w,E);let D=v.filter(e=>p===`all`||(p===`adopted`?Fe.has(e.status):!Fe.has(e.status))),k=new Intl.DateTimeFormat(o===`zh`?`zh-CN`:`en`,{dateStyle:`medium`}),N=new Intl.DateTimeFormat(o===`zh`?`zh-CN`:`en`,{dateStyle:`medium`,timeStyle:`short`}),P=new Map;for(let e of D){let t=k.format(new Date(e.updatedAt));P.set(t,[...P.get(t)??[],e])}let I=[...P.entries()],L=e=>e.feedbackKind===`already_done`?s.advisorHistoryStatusCompleted:e.feedbackKind===`irrelevant`?s.advisorHistoryStatusIrrelevant:e.feedbackKind===`source_incorrect`?s.advisorHistoryStatusSourceIncorrect:e.feedbackKind===`less_like_this`?s.advisorHistoryStatusLessLikeThis:{available:s.advisorHistoryStatusAvailable,started:s.advisorHistoryStatusStarted,discussing:s.advisorHistoryStatusDiscussing,completed:s.advisorHistoryStatusCompleted,snoozed:s.advisorHistoryStatusSnoozed,dismissed:s.advisorHistoryStatusDismissed,expired:s.advisorHistoryStatusExpired,superseded:s.advisorHistoryStatusSuperseded}[e.status],R=e=>{if(e.href){i(!1),u(O(`/`,e.href));return}e.status===`discussing`&&(i(!1),u(`/chat/new?${new URLSearchParams({draft:e.opportunity.actionPrompt}).toString()}`))},z;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(z=(0,$.jsx)(_e,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim`}),t[6]=z):z=t[6];let V;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(V=(0,$.jsx)(q,{className:`mt-0.5 size-5 shrink-0 text-accent`,"aria-hidden":!0}),t[7]=V):V=t[7];let H;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(H=(0,$.jsx)(fe,{className:`size-4`,"aria-hidden":!0}),t[8]=H):H=t[8];let U=b?(0,$.jsx)(Ie,{}):S?(0,$.jsxs)(`div`,{className:`rounded-xl border border-danger/25 bg-danger-soft p-4 text-sm text-danger`,children:[(0,$.jsx)(`p`,{children:s.advisorHistoryLoadFailed}),(0,$.jsx)(g,{type:`button`,variant:`ghost`,className:`mt-2`,onClick:()=>i(!1),children:s.advisorHistoryClose})]}):I.length===0?(0,$.jsxs)(`div`,{className:`py-16 text-center`,children:[(0,$.jsx)(q,{className:`mx-auto size-6 text-fg-subtle`,"aria-hidden":!0}),(0,$.jsx)(`p`,{className:`mt-3 text-sm font-medium text-fg`,children:s.advisorHistoryEmpty}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:s.advisorHistoryEmptyHint})]}):(0,$.jsx)(`div`,{className:`space-y-6`,children:I.map(e=>{let[t,n]=e;return(0,$.jsxs)(`section`,{"aria-label":t,children:[(0,$.jsx)(`h3`,{className:`mb-2 text-xs font-medium text-fg-subtle`,children:t}),(0,$.jsx)(`div`,{className:`space-y-2`,children:n.map(e=>{let t=!!e.href||e.status===`discussing`,n=[`snoozed`,`dismissed`,`expired`,`superseded`].includes(e.status);return(0,$.jsxs)(`article`,{className:`rounded-xl border border-edge-subtle bg-surface-base p-4`,children:[(0,$.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`p`,{className:`text-xs font-medium text-accent`,children:L(e)}),(0,$.jsx)(`h4`,{className:`mt-1.5 text-sm font-semibold leading-5 text-fg`,children:e.opportunity.title}),(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:e.opportunity.outcome})]}),(0,$.jsx)(`time`,{className:`shrink-0 text-[11px] text-fg-subtle`,dateTime:new Date(e.updatedAt).toISOString(),children:N.format(new Date(e.updatedAt))})]}),e.snoozedUntil?(0,$.jsxs)(`p`,{className:`mt-2 inline-flex items-center gap-1 text-xs text-fg-muted`,children:[(0,$.jsx)(ae,{className:`size-3.5`,"aria-hidden":!0}),s.advisorHistoryReturnsAt,` `,N.format(new Date(e.snoozedUntil))]}):null,(0,$.jsxs)(`details`,{className:`group mt-3`,children:[(0,$.jsxs)(`summary`,{className:`flex min-h-8 cursor-pointer list-none items-center gap-1 text-xs font-medium text-fg-muted hover:text-fg`,children:[s.advisorHistoryEvidence,(0,$.jsx)(l,{className:`size-3.5 transition-transform duration-200 group-open:rotate-180 motion-reduce:transition-none`,"aria-hidden":!0})]}),(0,$.jsx)(`ul`,{className:`mt-2 space-y-1.5 border-l border-edge pl-3 text-xs leading-5 text-fg-muted`,children:e.opportunity.evidence.map(e=>(0,$.jsx)(`li`,{children:(0,$.jsx)(Oe,{href:e.href,onOpen:()=>i(!1),children:e.observation})},e.id))})]}),t||n?(0,$.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[t?(0,$.jsxs)(g,{type:`button`,variant:`secondary`,className:`min-h-9 text-xs`,onClick:()=>R(e),children:[(0,$.jsx)(d,{className:`size-3.5`,"aria-hidden":!0}),e.status===`discussing`?s.advisorHistoryContinueDiscussion:s.advisorHistoryViewProgress]}):null,n?(0,$.jsxs)(g,{type:`button`,variant:`ghost`,className:`min-h-9 text-xs`,onClick:()=>{i(!1),a()},children:[(0,$.jsx)(j,{className:`size-3.5`,"aria-hidden":!0}),s.advisorHistoryReevaluate]}):null]}):null]},e.opportunity.id)})})]},t)})}),G;return t[9]===U?G=t[10]:(G=(0,$.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4`,children:U}),t[9]=U,t[10]=G),(0,$.jsx)(A,{open:n,onOpenChange:i,children:(0,$.jsxs)(T,{children:[z,(0,$.jsxs)(B,{className:`xopc-drawer-right fixed right-0 top-0 z-[90] flex size-full max-w-lg flex-col overflow-hidden border-l border-edge bg-surface-overlay shadow-popover outline-none`,"aria-describedby":`home-advisor-history-description`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-start gap-3 border-b border-edge px-5 py-4`,children:[V,(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(ee,{className:`text-base font-semibold text-fg`,children:s.advisorHistoryTitle}),(0,$.jsx)(W,{id:`home-advisor-history-description`,className:`mt-1 text-xs leading-5 text-fg-muted`,children:s.advisorHistoryDescription})]}),(0,$.jsx)(F,{asChild:!0,children:(0,$.jsx)(g,{type:`button`,variant:`ghost`,className:`-mr-2 size-9 shrink-0 p-0`,"aria-label":s.advisorHistoryClose,children:H})})]}),(0,$.jsx)(`div`,{className:`shrink-0 border-b border-edge-subtle px-5 py-3`,children:(0,$.jsx)(M,{className:`inline-flex rounded-lg bg-surface-inset p-1`,role:`group`,"aria-label":s.advisorHistoryFilterLabel,indicatorClassName:`rounded-md bg-surface-panel shadow-surface`,children:[[`all`,s.advisorHistoryFilterAll],[`adopted`,s.advisorHistoryFilterAdopted],[`other`,s.advisorHistoryFilterOther]].map(e=>{let[t,n]=e;return(0,$.jsx)(`button`,{type:`button`,className:`min-h-9 rounded-md px-3 text-xs font-medium transition-colors duration-150 ${p===t?`bg-surface-panel text-fg shadow-surface`:`text-fg-muted hover:text-fg`}`,"aria-pressed":p===t,onClick:()=>h(t),children:n},t)})})}),G]})]})})}function ze(e){return e.language}function Be(e,t){return e.replace(`{{count}}`,String(t))}function Ve(e,t){if(e.state===`disabled`)return null;if(e.state===`ready`){let n=1+e.alternatives.length;return{label:Be(t.ready,n),detail:e.primary.title,tone:`accent`,refreshing:!!e.stale}}return e.state===`clarification`?{label:t.clarification,detail:e.question.question,tone:`accent`,refreshing:!1}:e.state===`refreshing`?{label:t.refreshing,detail:e.previous?.title??t.refreshingDetail,tone:`accent`,refreshing:!0}:e.reason===`generation_failed`?{label:t.generationFailed,detail:t.generationFailedDetail,tone:`danger`,refreshing:!1}:e.reason===`budget_exhausted`?{label:t.budgetExhausted,detail:t.budgetExhaustedDetail,tone:`warning`,refreshing:!1}:e.reason===`model_unavailable`?{label:t.modelUnavailable,detail:t.modelUnavailableDetail,tone:`warning`,refreshing:!1}:{label:t.idle,detail:t.idleDetail,tone:`neutral`,refreshing:!1}}var He={accent:`bg-accent`,danger:`bg-danger`,neutral:`bg-fg-subtle`,warning:`bg-warning`};function Ue(e){let t=(0,Z.c)(50),{advisor:n,busy:r,copy:i,onOpenHistory:a,onRefresh:o}=e,[s,c]=(0,Q.useState)(!1),l;t[0]!==n||t[1]!==i?(l=Ve(n,i),t[0]=n,t[1]=i,t[2]=l):l=t[2];let u=l;if(!u)return null;let d=n.state!==`refreshing`,f=n.state===`ready`?i.findAnother:i.retry,m=`${i.label}:${u.label}`,h;t[3]===u.refreshing?h=t[4]:(h=u.refreshing?(0,$.jsx)(j,{className:`size-3.5 shrink-0 animate-spin motion-reduce:animate-none`,"aria-hidden":!0}):(0,$.jsx)(Y,{className:`size-3.5 shrink-0`,"aria-hidden":!0}),t[3]=u.refreshing,t[4]=h);let _=He[u.tone],S;t[5]===_?S=t[6]:(S=p(`size-1.5 shrink-0 rounded-full`,_),t[5]=_,t[6]=S);let C;t[7]===S?C=t[8]:(C=(0,$.jsx)(`span`,{className:S,"aria-hidden":!0}),t[7]=S,t[8]=C);let w;t[9]!==i.label||t[10]!==u.label?(w=(0,$.jsxs)(`span`,{className:`truncate`,children:[i.label,` · `,u.label]}),t[9]=i.label,t[10]=u.label,t[11]=w):w=t[11];let T;t[12]!==m||t[13]!==h||t[14]!==C||t[15]!==w?(T=(0,$.jsx)(x,{asChild:!0,children:(0,$.jsxs)(g,{type:`button`,variant:`ghost`,className:`h-9 max-w-56 rounded-lg px-2.5`,"aria-label":m,children:[h,C,w]})}),t[12]=m,t[13]=h,t[14]=C,t[15]=w,t[16]=T):T=t[16];let E;t[17]===u.refreshing?E=t[18]:(E=(0,$.jsx)(`span`,{className:`mt-1 flex size-7 shrink-0 items-center justify-center rounded-lg bg-accent-soft text-accent`,children:u.refreshing?(0,$.jsx)(j,{className:`size-4 animate-spin motion-reduce:animate-none`,"aria-hidden":!0}):(0,$.jsx)(Y,{className:`size-4`,"aria-hidden":!0})}),t[17]=u.refreshing,t[18]=E);let D;t[19]===u.label?D=t[20]:(D=(0,$.jsx)(`p`,{className:`font-semibold text-fg`,children:u.label}),t[19]=u.label,t[20]=D);let O;t[21]===u.detail?O=t[22]:(O=(0,$.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-fg-muted`,children:u.detail}),t[21]=u.detail,t[22]=O);let k;t[23]!==D||t[24]!==O?(k=(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[D,O]}),t[23]=D,t[24]=O,t[25]=k):k=t[25];let A;t[26]!==k||t[27]!==E?(A=(0,$.jsxs)(`div`,{className:`flex items-start gap-3`,children:[E,k]}),t[26]=k,t[27]=E,t[28]=A):A=t[28];let M;t[29]===a?M=t[30]:(M=()=>{c(!1),a()},t[29]=a,t[30]=M);let N;t[31]===Symbol.for(`react.memo_cache_sentinel`)?(N=(0,$.jsx)(q,{className:`size-3.5`,"aria-hidden":!0}),t[31]=N):N=t[31];let P;t[32]!==i.history||t[33]!==M?(P=(0,$.jsxs)(g,{type:`button`,variant:`ghost`,className:`h-9 rounded-lg text-xs`,onClick:M,children:[N,i.history]}),t[32]=i.history,t[33]=M,t[34]=P):P=t[34];let F;t[35]!==r||t[36]!==d||t[37]!==o||t[38]!==f?(F=d?(0,$.jsxs)(g,{type:`button`,variant:`secondary`,className:`h-9 rounded-lg text-xs`,disabled:r,onClick:()=>{c(!1),o()},children:[(0,$.jsx)(j,{className:`size-3.5`,"aria-hidden":!0}),f]}):null,t[35]=r,t[36]=d,t[37]=o,t[38]=f,t[39]=F):F=t[39];let I;t[40]!==P||t[41]!==F?(I=(0,$.jsxs)(`div`,{className:`mt-4 flex items-center justify-end gap-1 border-t border-edge-subtle pt-3`,children:[P,F]}),t[40]=P,t[41]=F,t[42]=I):I=t[42];let L;t[43]!==A||t[44]!==I?(L=(0,$.jsx)(v,{children:(0,$.jsxs)(y,{side:`bottom`,align:`end`,sideOffset:6,className:`z-[70] w-[min(21rem,calc(100vw-1.5rem))] rounded-xl border border-edge bg-surface-overlay p-4 text-sm text-fg shadow-popover outline-none`,onOpenAutoFocus:We,children:[A,I]})}),t[43]=A,t[44]=I,t[45]=L):L=t[45];let R;return t[46]!==s||t[47]!==L||t[48]!==T?(R=(0,$.jsxs)(b,{open:s,onOpenChange:c,children:[T,L]}),t[46]=s,t[47]=L,t[48]=T,t[49]=R):R=t[49],R}function We(e){return e.preventDefault()}async function Ge(e,t=`en`){let n=await R(e),r=n.runs.filter(e=>!e.parentRunId).sort((e,t)=>t.queuedAt-e.queuedAt)[0];if(!n.allowedCommands.includes(`start`)||r?.status!==`failed`)throw Error(t===`zh`?`任务状态已变化,暂时无法重试。请刷新并查看当前状态。`:`Task is no longer available for retry. Refresh and review its current state.`);await P(e,{type:`start`,executor:h.parse({...r.executorRef,kind:r.executorKind})},n.task.version)}function Ke(e){let t=e.runs.filter(e=>!e.parentRunId).sort((e,t)=>t.queuedAt-e.queuedAt)[0],n=e.conversation?.currentExecutorAgentId??e.task.delegateAgentId,r=n?{kind:`agent`,agentId:n}:t?{...t.executorRef,kind:t.executorKind}:void 0,i=h.safeParse(r);return i.success?i.data:void 0}var qe=(0,Q.lazy)(()=>i(()=>import(`./index-ygkHNYyo.js`).then(e=>e.Xn).then(e=>({default:e.WorkspaceFilePreviewPanel})),__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])));function Je({taskId:e,language:t,onComplete:n,onUpdated:r}){let i=t===`zh`,o=a(),c=`${o.pathname}${o.search}`,[l,u]=(0,Q.useState)(),[d,f]=(0,Q.useState)(),[p,m]=(0,Q.useState)(null),[h,v]=(0,Q.useState)(),[y,b]=(0,Q.useState)(!1),x=(0,Q.useRef)(!1),w=(0,Q.useRef)(0),[E,D]=(0,Q.useState)(0);(0,Q.useEffect)(()=>{u(void 0),v(void 0)},[e]),(0,Q.useEffect)(()=>{let t=!0,n=++w.current;return f(void 0),R(e).then(e=>{t&&n===w.current&&!x.current&&u(e)}).catch(e=>{t&&n===w.current&&f(e instanceof Error?e.message:String(e))}),()=>{t=!1}},[e,E]),(0,Q.useEffect)(()=>{let t=()=>{x.current||D(e=>e+1)},n=n=>{n.detail?.taskId===e&&t()};return window.addEventListener(`task-changed-v2`,n),window.addEventListener(`focus`,t),window.addEventListener(`realtime-gap`,t),window.addEventListener(`gateway-realtime-connected`,t),()=>{window.removeEventListener(`task-changed-v2`,n),window.removeEventListener(`focus`,t),window.removeEventListener(`realtime-gap`,t),window.removeEventListener(`gateway-realtime-connected`,t)}},[e]);let O=l?xe(l):[],k=l?.task.phase===`review`&&l.allowedCommands.includes(`close`)&&l.waits.length===0&&O.length>0&&O.every(e=>e.status===`passed`),j=l?Ke(l):void 0,M=l?.allowedCommands.includes(`start`)&&l.waits.length===0&&j,N=e=>{w.current++,u(e),r?.(e)};async function F(e,t,r=!1){if(!x.current){x.current=!0,w.current++,b(!0),f(void 0);try{N(await e()),v(t),r&&n()}catch(e){f(e instanceof Error?e.message:String(e))}finally{x.current=!1,b(!1)}}}let I=l?.receipts.filter(e=>l.runs.some(t=>t.id===e.runId&&t.contractVersion===l.task.latestContractVersion)).sort((e,t)=>t.finalizedAt-e.finalizedAt)[0],L=O.filter(e=>e.status===`passed`).length,z=O.filter(e=>e.status===`failed`).length,V=O.length-L-z,H=l?.task.contract?.acceptancePolicy===`verified_auto`,U=C(c,e);return(0,$.jsxs)(`section`,{className:`mt-4 space-y-4 rounded-xl border border-edge bg-surface-panel p-4`,"aria-label":i?`任务结果与处理`:`Task result and actions`,"aria-busy":y,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:i?`执行结果`:`Result`}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(g,{variant:`ghost`,disabled:y,onClick:()=>D(e=>e+1),children:i?`刷新状态`:`Refresh status`}),(0,$.jsx)(s,{to:U,className:`inline-flex min-h-9 items-center text-xs font-medium text-accent-fg hover:underline`,children:i?`查看任务详情`:`Task details`})]})]}),d?(0,$.jsx)(`p`,{role:`alert`,className:`text-sm text-danger`,children:d}):null,y?(0,$.jsx)(`p`,{role:`status`,className:`text-xs text-fg-muted`,children:i?`正在处理…`:`Processing…`}):null,h?(0,$.jsx)(`p`,{role:`status`,className:`text-sm text-success`,children:h}):null,!l&&!d?(0,$.jsxs)(`div`,{className:`space-y-3`,"aria-busy":!0,children:[(0,$.jsx)(_,{className:`h-5 w-1/3`}),(0,$.jsx)(_,{className:`h-24 w-full`})]}):null,l?(0,$.jsxs)($.Fragment,{children:[I?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:I.completionVerdict===`achieved`?i?`执行报告已达成目标,请结合依据逐项验收。`:`The run reports the goal achieved. Review the evidence before accepting.`:i?`当前为阶段性结果,尚有工作需要推进。`:`This is a partial result. More work is needed.`}),(0,$.jsx)(X,{content:I.summary,contentKey:`home:${e}:result:${I.runId}`,language:t,previewHeight:180}),I.remainingWork.length>0?(0,$.jsxs)(`div`,{className:`text-sm text-fg-muted`,children:[(0,$.jsx)(`p`,{className:`font-medium text-fg`,children:i?`尚待完成`:`Remaining work`}),(0,$.jsx)(`ul`,{className:`mt-1 list-disc space-y-1 pl-5`,children:I.remainingWork.map((e,t)=>(0,$.jsx)(`li`,{children:e},t))})]}):null,I.nextAction?(0,$.jsxs)(`p`,{className:`whitespace-pre-wrap text-sm text-fg-muted`,children:[(0,$.jsx)(`span`,{className:`font-medium text-fg`,children:i?`下一步:`:`Next step: `}),I.nextAction]}):null,I.judgment?(0,$.jsxs)(`div`,{className:`space-y-1 text-sm text-fg-muted`,children:[(0,$.jsx)(`p`,{className:`font-medium text-fg`,children:i?`判断依据`:`Assessment`}),(0,$.jsx)(`p`,{children:I.judgment.recommendation}),(0,$.jsx)(`ul`,{className:`list-disc space-y-1 pl-5`,children:I.judgment.reasons.map((e,t)=>(0,$.jsx)(`li`,{children:e},t))}),I.judgment.uncertainty?(0,$.jsxs)(`p`,{children:[i?`待确认:`:`Uncertainty: `,I.judgment.uncertainty]}):null]}):null,(0,$.jsx)(Ce,{evidence:I.evidence,projectId:l.task.projectId,conversationId:l.conversation?.activeConversationId,language:t,onOpenFile:m})]}):(0,$.jsx)(`p`,{className:`text-sm text-fg-muted`,children:i?`当前任务版本暂无执行结果,可先处理等待事项或查看执行进度。`:`No result for the current task version. Resolve pending items or view progress.`}),O.length>0?(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(`h3`,{className:`text-sm font-semibold text-fg`,children:[i?`验收条件`:`Acceptance criteria`,` `,(0,$.jsxs)(`span`,{className:`font-normal text-fg-muted`,children:[L,`/`,O.length]})]}),O.map((n,r)=>(0,$.jsxs)(`div`,{className:`space-y-2 border-t border-edge-subtle pt-3`,children:[(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-2`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1 text-sm text-fg`,children:[(0,$.jsx)(`p`,{className:`break-words`,children:n.text}),(0,$.jsx)(`p`,{className:`mt-1 text-xs text-fg-muted`,children:i?{passed:`已通过`,failed:`未通过`,unverified:`待判定`}[n.status]:{passed:`Passed`,failed:`Failed`,unverified:`Not reviewed`}[n.status]})]}),l.task.phase===`review`&&!H?(0,$.jsx)(`div`,{className:`flex gap-2`,children:[`passed`,`failed`].map(t=>(0,$.jsx)(g,{variant:`secondary`,disabled:y||n.status===t,onClick:()=>void F(()=>S(e,r,t,l.task.version,l.task.latestContractVersion),i?`判定已保存。`:`Review saved.`),children:i?t===`passed`?`确认通过`:`未通过`:t===`passed`?`Mark passed`:`Mark failed`},t))}):null]}),n.note?(0,$.jsx)(`p`,{className:`whitespace-pre-wrap text-xs leading-5 text-fg-muted`,children:n.note}):null,n.review?.note?(0,$.jsx)(`p`,{className:`text-xs text-fg-muted`,children:n.review.note}):null,(0,$.jsx)(Ce,{evidence:n.evidence,projectId:l.task.projectId,conversationId:l.conversation?.activeConversationId,language:t,onOpenFile:m})]},r))]}):null,l.waits.length>0?(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsx)(`h3`,{className:`text-sm font-semibold text-fg`,children:i?`等待处理`:`Pending items`}),l.waits.map(t=>(0,$.jsx)(`div`,{children:l.allowedCommands.includes(`resolve_wait`)&&(t.kind===`user_input`||t.kind===`approval`&&typeof t.condition.capability==`string`)&&t.condition.type!==`connection`?(0,$.jsx)(Se,{wait:t,detail:l,zh:i,onUpdated:N}):(0,$.jsxs)(`div`,{className:`rounded-lg bg-surface-hover p-3 text-sm text-fg-muted`,children:[(0,$.jsx)(`p`,{children:t.reason}),t.kind===`paused`&&l.allowedCommands.includes(`resolve_wait`)?(0,$.jsx)(g,{className:`mt-2`,disabled:y,onClick:()=>void F(()=>P(e,{type:`resolve_wait`,waitId:t.id},l.task.version),i?`已解除暂停,任务状态已更新。`:`Pause resolved. Task status updated.`),children:i?`恢复任务`:`Resume task`}):(0,$.jsx)(s,{to:typeof t.condition.dependsOnTaskId==`string`?C(c,t.condition.dependsOnTaskId):U,className:`mt-2 inline-flex min-h-9 items-center text-accent-fg hover:underline`,children:i?`查看并处理`:`View and resolve`})]})},t.id))]}):null,l.task.phase===`review`&&!k?(0,$.jsx)(`p`,{className:`text-xs leading-5 text-fg-muted`,children:i?`尚有 ${V} 项待判定、${z} 项未通过、${l.waits.length} 项等待处理。${H?`此任务需要执行验证;请继续执行以补齐依据和未完成项。`:`查看依据后逐项判定;未通过时可继续执行修正。`}`:`${V} unreviewed, ${z} failed, ${l.waits.length} pending items. ${H?`This task requires execution verification. Continue execution to supply missing evidence.`:`Review the evidence and mark each criterion; continue execution to fix failures.`}`}):null,(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[l.task.phase===`review`?(0,$.jsx)(g,{variant:`primary`,disabled:y||!k,onClick:()=>void F(()=>P(e,{type:`close`,resolution:`done`},l.task.version),i?`任务已验收完成。`:`Task accepted.`,!0),children:i?`验收完成`:`Accept task`}):null,M?(0,$.jsx)(g,{variant:k?`secondary`:`primary`,disabled:y,onClick:()=>void F(()=>P(e,{type:`start`,executor:j},l.task.version),i?`已开始执行,结果将自动更新。`:`Execution started. Results will update automatically.`),children:i?I?`继续执行并验证`:`开始执行`:I?`Continue and verify`:`Start execution`}):null]})]}):null,l&&p?(0,$.jsx)(A,{open:!0,onOpenChange:e=>{e||m(null)},children:(0,$.jsxs)(T,{children:[(0,$.jsx)(_e,{className:`fixed inset-0 z-[80] bg-scrim`}),(0,$.jsxs)(B,{className:`app-main-surface fixed left-1/2 top-1/2 z-[90] flex h-[min(54rem,calc(100dvh-2rem))] w-[min(72rem,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-panel outline-none`,"aria-describedby":void 0,children:[(0,$.jsxs)(ee,{className:`sr-only`,children:[i?`交付物预览`:`Artifact preview`,` · `,p]}),(0,$.jsx)(Q.Suspense,{fallback:(0,$.jsxs)(`div`,{className:`flex-1 space-y-3 p-4`,"aria-busy":!0,children:[(0,$.jsx)(_,{className:`h-9 w-full`}),(0,$.jsx)(_,{className:`h-64 w-full`})]}),children:(0,$.jsx)(qe,{filePath:p,projectId:l.task.projectId,conversationId:l.conversation?.activeConversationId,onClose:()=>m(null)})})]})]})}):null]})}function Ye(e,t){return e.replace(/\{\{(\w+)\}\}/g,(e,n)=>String(t[n]??``))}function Xe(){let e=(0,Z.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,$.jsxs)(`div`,{className:`space-y-8`,"aria-busy":!0,children:[(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsx)(_,{className:`h-10 w-3/5 rounded-xl`}),(0,$.jsx)(_,{className:`h-5 w-4/5 rounded-lg`})]}),(0,$.jsx)(_,{className:`h-64 rounded-2xl`}),(0,$.jsx)(_,{className:`h-32 rounded-xl`})]}),e[0]=t):t=e[0],t}function Ze(e){let t=(0,Z.c)(61),{item:n,busy:r,recommendationLabel:i,dueLabel:a,failureLabel:s,locale:c,onAction:l,onComplete:u,onUpdated:d}=e,[f,p]=o(),m;t[0]===n.openAction?m=t[1]:(m=n.openAction?.type===`open`?/^\/tasks\/([^/?#]+)/.exec(n.openAction.href):null,t[0]=n.openAction,t[1]=m);let h=m,_=n.primaryAction?.type===`task_review`?n.primaryAction.taskId:h?decodeURIComponent(h[1]):void 0,v;t[2]!==_||t[3]!==f?(v=_&&f.get(`reviewTask`)===_,t[2]=_,t[3]=f,t[4]=v):v=t[4];let y=!!v,b;t[5]!==_||t[6]!==f||t[7]!==p?(b=e=>{let t=new URLSearchParams(f);e&&_?t.set(`reviewTask`,_):t.delete(`reviewTask`),p(t)},t[5]=_,t[6]=f,t[7]=p,t[8]=b):b=t[8];let x=b,S;t[9]!==a||t[10]!==n.dueAt||t[11]!==c?(S=n.dueAt?`${a} ${ye(new Date(n.dueAt),c)}`:null,t[9]=a,t[10]=n.dueAt,t[11]=c,t[12]=S):S=t[12];let C=S,w=n.kind===`failure`?s:C,T;t[13]===w?T=t[14]:(T=w?(0,$.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 text-xs font-medium text-warning`,children:[(0,$.jsx)(`span`,{className:`size-1.5 rounded-full bg-warning`,"aria-hidden":!0}),(0,$.jsx)(`span`,{children:w})]}):null,t[13]=w,t[14]=T);let E=!n.openAction,D;t[15]!==n.id||t[16]!==n.openAction||t[17]!==l?(D=()=>n.openAction&&l(n.openAction,n.id),t[15]=n.id,t[16]=n.openAction,t[17]=l,t[18]=D):D=t[18];let O;t[19]===n.title?O=t[20]:(O=(0,$.jsx)(`span`,{className:`block text-lg font-semibold leading-7 tracking-tight text-fg`,children:n.title}),t[19]=n.title,t[20]=O);let k;t[21]===n.summary?k=t[22]:(k=(0,$.jsx)(`span`,{className:`mt-1.5 block text-sm leading-6 text-fg-muted`,children:n.summary}),t[21]=n.summary,t[22]=k);let A;t[23]!==E||t[24]!==D||t[25]!==O||t[26]!==k?(A=(0,$.jsxs)(`button`,{type:`button`,className:`block w-full text-left outline-none focus-visible:rounded-md focus-visible:ring-2 focus-visible:ring-accent`,disabled:E,onClick:D,children:[O,k]}),t[23]=E,t[24]=D,t[25]=O,t[26]=k,t[27]=A):A=t[27];let j;t[28]!==n.recommendation||t[29]!==i?(j=n.recommendation?(0,$.jsxs)(`p`,{className:`mt-3 text-sm leading-6 text-fg-muted`,children:[(0,$.jsxs)(`span`,{className:`font-semibold text-fg`,children:[i,`:`]}),n.recommendation]}):null,t[28]=n.recommendation,t[29]=i,t[30]=j):j=t[30];let M;t[31]!==r||t[32]!==n.id||t[33]!==n.primaryAction||t[34]!==n.secondaryActions||t[35]!==l||t[36]!==y||t[37]!==_||t[38]!==x?(M=n.primaryAction||n.secondaryActions.length>0?(0,$.jsxs)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:[n.primaryAction?(0,$.jsx)(g,{type:`button`,variant:`primary`,className:`h-9 rounded-lg px-3.5 text-xs`,disabled:r,"aria-expanded":_&&[`task_review`,`open`].includes(n.primaryAction.type)?y:void 0,onClick:()=>_&&[`task_review`,`open`].includes(n.primaryAction.type)?x(!y):l(n.primaryAction,n.id),children:n.primaryAction.label}):null,n.secondaryActions.map(e=>(0,$.jsx)(g,{type:`button`,variant:`secondary`,className:`h-9 rounded-lg px-3.5 text-xs shadow-none`,disabled:r,onClick:()=>l(e,n.id),children:e.label},`${e.type}:${e.label}`))]}):null,t[31]=r,t[32]=n.id,t[33]=n.primaryAction,t[34]=n.secondaryActions,t[35]=l,t[36]=y,t[37]=_,t[38]=x,t[39]=M):M=t[39];let N;t[40]!==n.primaryAction?.type||t[41]!==c||t[42]!==y||t[43]!==_||t[44]!==x?(N=_&&n.primaryAction?.type===`retry_task`?(0,$.jsx)(g,{variant:`ghost`,className:`mt-2`,"aria-expanded":y,onClick:()=>x(!y),children:c===`zh`?`查看结果与依据`:`View result and evidence`}):null,t[40]=n.primaryAction?.type,t[41]=c,t[42]=y,t[43]=_,t[44]=x,t[45]=N):N=t[45];let P;t[46]!==c||t[47]!==u||t[48]!==d||t[49]!==y||t[50]!==_||t[51]!==x?(P=y&&_?(0,$.jsx)(Je,{taskId:_,language:c,onUpdated:d,onComplete:()=>{x(!1),u()}},_):null,t[46]=c,t[47]=u,t[48]=d,t[49]=y,t[50]=_,t[51]=x,t[52]=P):P=t[52];let F;return t[53]!==r||t[54]!==A||t[55]!==j||t[56]!==M||t[57]!==N||t[58]!==P||t[59]!==T?(F=(0,$.jsxs)(`article`,{className:`px-5 py-5 sm:px-6 sm:py-6`,"aria-busy":r,children:[T,A,j,M,N,P]}),t[53]=r,t[54]=A,t[55]=j,t[56]=M,t[57]=N,t[58]=P,t[59]=T,t[60]=F):F=t[60],F}function Qe(e){let t=(0,Z.c)(38),{item:n,onAction:r,language:i,onUpdated:a}=e,[o,s]=(0,Q.useState)(!1),c;t[0]===n.openAction?c=t[1]:(c=n.openAction?.type===`open`?/^\/tasks\/([^/?#]+)/.exec(n.openAction.href):null,t[0]=n.openAction,t[1]=c);let l=c,u=l?decodeURIComponent(l[1]):void 0,d;t[2]===n.kind?d=t[3]:(d=n.kind===`scheduled`?(0,$.jsx)(V,{className:`size-4`,"aria-hidden":!0}):(0,$.jsx)(`span`,{className:`size-1.5 rounded-full bg-fg-subtle`,"aria-hidden":!0}),t[2]=n.kind,t[3]=d);let f=d,p=!n.openAction,m=u?o:void 0,h;t[4]!==n.id||t[5]!==n.openAction||t[6]!==r||t[7]!==u?(h=()=>u?s($e):n.openAction&&r(n.openAction,n.id),t[4]=n.id,t[5]=n.openAction,t[6]=r,t[7]=u,t[8]=h):h=t[8];let g;t[9]===f?g=t[10]:(g=(0,$.jsx)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-fg-subtle`,children:f}),t[9]=f,t[10]=g);let _;t[11]===n.title?_=t[12]:(_=(0,$.jsx)(`span`,{className:`block truncate text-sm font-medium text-fg`,children:n.title}),t[11]=n.title,t[12]=_);let v;t[13]===n.summary?v=t[14]:(v=(0,$.jsx)(`span`,{className:`mt-0.5 block truncate text-xs text-fg-muted`,children:n.summary}),t[13]=n.summary,t[14]=v);let y;t[15]!==_||t[16]!==v?(y=(0,$.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[_,v]}),t[15]=_,t[16]=v,t[17]=y):y=t[17];let b;t[18]===n.statusLabel?b=t[19]:(b=n.statusLabel?(0,$.jsx)(`span`,{className:`shrink-0 text-xs text-fg-subtle`,children:n.statusLabel}):null,t[18]=n.statusLabel,t[19]=b);let x;t[20]===n.openAction?x=t[21]:(x=n.openAction?(0,$.jsx)(J,{className:`size-4 shrink-0 text-fg-subtle`,"aria-hidden":!0}):null,t[20]=n.openAction,t[21]=x);let S;t[22]!==b||t[23]!==x||t[24]!==p||t[25]!==m||t[26]!==h||t[27]!==g||t[28]!==y?(S=(0,$.jsxs)(`button`,{type:`button`,className:`flex min-h-16 w-full items-center gap-3 py-3 text-left outline-none hover:text-fg focus-visible:rounded-md focus-visible:ring-2 focus-visible:ring-accent`,disabled:p,"aria-expanded":m,onClick:h,children:[g,y,b,x]}),t[22]=b,t[23]=x,t[24]=p,t[25]=m,t[26]=h,t[27]=g,t[28]=y,t[29]=S):S=t[29];let C;t[30]!==o||t[31]!==i||t[32]!==a||t[33]!==u?(C=u&&o?(0,$.jsx)(Je,{taskId:u,language:i,onUpdated:a,onComplete:()=>s(!1)}):null,t[30]=o,t[31]=i,t[32]=a,t[33]=u,t[34]=C):C=t[34];let w;return t[35]!==S||t[36]!==C?(w=(0,$.jsxs)(`div`,{children:[S,C]}),t[35]=S,t[36]=C,t[37]=w):w=t[37],w}function $e(e){return!e}function et(){let e=m(e=>e.language),t=f(e),n=t.projectsPage,r=he(e),i=c(),o=a(),s=le(e=>e.setPageHeader),l=le(e=>e.clearPageHeader),[u,d]=(0,Q.useState)(!1),{home:p,loading:h,loadError:_,setLoadError:v,load:y}=we(e,o.key,u),[b,x]=(0,Q.useState)(!1),[S,C]=(0,Q.useState)(``),k=(0,Q.useRef)(!1),[j,M]=(0,Q.useState)(),[P,R]=(0,Q.useState)(!1),[z,V]=(0,Q.useState)(null),[H,q]=(0,Q.useState)(!1),[ne,ae]=(0,Q.useState)(),[ce,J]=(0,Q.useState)(!1),[de,pe]=(0,Q.useState)(0),[Y,ge]=(0,Q.useState)(),[ye,be]=(0,Q.useState)(),[xe,Se]=(0,Q.useState)(!1),X=L({chat:t.chat}),Ce=(0,Q.useRef)(null),Z=I({disabled:xe,chat:t.chat,onTranscript:e=>{C(t=>K(t,e)),window.setTimeout(()=>Ce.current?.focus(),0)}}),{phase:Te,voiceActive:De,startVoiceInput:Oe,cancelVoiceInput:ke,confirmVoiceInput:Ae,retryVoiceInput:je}=Z;(0,Q.useEffect)(()=>{if(!Y)return;let e=window.setTimeout(()=>ge(void 0),8e3);return()=>window.clearTimeout(e)},[Y]);let Me=(0,Q.useCallback)(async e=>{if(!(e.length===0||xe)){Se(!0);try{await X.processFiles(e)}finally{Se(!1)}}},[xe,X.processFiles]),Pe=(0,Q.useCallback)(async e=>{let t=oe(e.clipboardData);t.length!==0&&(e.preventDefault(),await Me(t))},[Me]),Fe=(0,Q.useCallback)(e=>{e.dataTransfer.types.includes(`Files`)&&(e.preventDefault(),e.dataTransfer.dropEffect=`copy`,X.setIsDragging(!0))},[X.setIsDragging]),Ie=(0,Q.useCallback)(e=>{let t=e.relatedTarget;(!(t instanceof Node)||!e.currentTarget.contains(t))&&X.setIsDragging(!1)},[X.setIsDragging]),Le=(0,Q.useCallback)(async e=>{e.preventDefault(),X.setIsDragging(!1),await Me(Array.from(e.dataTransfer.files))},[X.setIsDragging,Me]),ze=(0,Q.useCallback)(e=>{e.preventDefault();let t=X.wireAttachmentsPayload(),n=ie(S,t.length>0?me(t):void 0,{projectScope:`none`});n&&(x(!1),C(``),X.clearAttachments(),i(n))},[X.clearAttachments,X.wireAttachmentsPayload,S,i]),Be=X.attachments.length>=10,Ve={attachTitle:Be?Ye(t.chat.maxAttachmentsReached,{max:10}):`${t.chat.attachFile} (${X.attachments.length}/10)`,dropFiles:t.chat.dropFiles,intentLabel:r.intentLabel,intentPlaceholder:r.intentPlaceholder,intentSuggestion:r.intentSuggestion,shortcut:n.home.submitShortcut,submit:r.newWork},He=(0,Q.useMemo)(()=>({label:n.home.advisorStatusLabel,ready:n.home.advisorStatusReady,clarification:n.home.advisorStatusClarification,refreshing:n.home.advisorStatusRefreshing,refreshingDetail:n.home.advisorRefreshing,idle:n.home.advisorStatusIdle,idleDetail:n.home.advisorUnavailableTitle,generationFailed:n.home.advisorStatusGenerationFailed,budgetExhausted:n.home.advisorStatusBudgetExhausted,modelUnavailable:n.home.advisorStatusModelUnavailable,generationFailedDetail:n.home.advisorGenerationFailed,budgetExhaustedDetail:n.home.advisorBudgetExhausted,modelUnavailableDetail:n.home.advisorModelUnavailable,history:n.home.advisorHistory,retry:n.home.retry,findAnother:n.home.advisorRefresh}),[n.home]),We=!!(p&&p.needsUser.length===0&&p.backgroundCount===0),Ke=!!(p&&p.needsUser.length===0),qe=Ke||b;(0,Q.useEffect)(()=>{!qe&&De&&ke()},[ke,qe,De]),(0,Q.useEffect)(()=>{let e=e=>{let t=e.detail?.target;t&&t!==`chat`||!qe||xe||(e.preventDefault(),Te===`recording`?Ae():Te===`idle`?(Ce.current?.focus(),Oe()):Te===`error`&&je())},t=e=>{let t=e.detail?.target;t&&t!==`chat`||!qe||!De||(e.preventDefault(),ke(),Ce.current?.focus())};return window.addEventListener(D,e),window.addEventListener(G,t),()=>{window.removeEventListener(D,e),window.removeEventListener(G,t)}},[xe,ke,qe,Ae,je,Oe,De,Te]);let Je=(0,Q.useCallback)(e=>{e||ke(),x(e)},[ke]),$e=(0,Q.useCallback)((t,n)=>{if(t.type===`open`){i(O(`/`,t.href));return}t.type===`task_review`||k.current||(k.current=!0,V(n),M(void 0),v(null),(async()=>{try{if(t.type===`retry_task`)await Ge(t.taskId,e),M({message:e===`zh`?`任务已重新开始,可查看执行进度。`:`Task restarted. View progress.`,href:O(`/`,`/tasks/${encodeURIComponent(t.taskId)}`)});else if(t.type===`connector_decision`)await re({kind:`connector_approval`,approvalId:t.approvalId},t.decision),M({message:e===`zh`?t.decision===`approve`?`已批准授权,任务状态将自动更新。`:`已拒绝授权。`:t.decision===`approve`?`Permission approved. Task status will update.`:`Permission denied.`});else if(t.type===`retry_run`){let n=await U({kind:t.subjectKind,runId:t.runId});M({message:e===`zh`?`已发起重试,可查看新的执行结果。`:`Retry started. Follow the new execution.`,href:n.conversationId?`/chat/${encodeURIComponent(n.conversationId)}`:`/automations?run=${encodeURIComponent(n.runId)}`})}else t.type===`acknowledge_run`&&(await ve({kind:t.subjectKind,runId:t.runId}),M({message:e===`zh`?`已确认此异常,已从待处理事项移除。`:`Issue acknowledged and removed from pending items.`}));await y()}catch(e){v(e instanceof Error?e.message:String(e))}finally{k.current=!1,V(null)}})())},[e,y,i]),et=(0,Q.useCallback)(t=>{M({message:e===`zh`?t.task.phase===`closed`?`任务已验收完成。`:`操作已保存,任务状态已更新。`:t.task.phase===`closed`?`Task accepted.`:`Action saved. Task status updated.`,href:O(`/`,`/tasks/${encodeURIComponent(t.task.id)}`)}),y()},[e,y]),tt=(0,Q.useCallback)(()=>{q(!0),ae(void 0),be(void 0),v(null),te(e).then(()=>y()).catch(e=>v(e instanceof Error?e.message:String(e))).finally(()=>q(!1))},[e,y]),nt=(0,Q.useCallback)((e,t)=>{q(!0),v(null),E(e,t).then(async t=>{if(t.outcome===`needs_setup`){be({opportunityId:e.id,value:t.preflight});return}if(be(void 0),pe(e=>e+1),t.outcome===`task`){ae({title:n.home.advisorStartedTitle,detail:Ye(n.home.advisorStartedDetail,{title:e.title}),href:O(`/`,t.href)}),await y();return}i(t.href)}).catch(e=>v(e instanceof Error?e.message:String(e))).finally(()=>q(!1))},[y,i,n.home.advisorStartedDetail,n.home.advisorStartedTitle]),rt=(0,Q.useCallback)((e,t)=>{q(!0),ae(void 0),be(void 0),v(null),se(e,{kind:t,snoozedUntil:t===`too_early`?Date.now()+4320*6e4:void 0}).then(({idempotencyKey:t})=>(ge({opportunityId:e.id,idempotencyKey:t}),pe(e=>e+1),y())).catch(e=>v(e instanceof Error?e.message:String(e))).finally(()=>q(!1))},[y]),it=(0,Q.useCallback)(()=>{if(!Y)return;let e=Y;ge(void 0),q(!0),v(null),ue(e.opportunityId,e.idempotencyKey).then(()=>(pe(e=>e+1),y())).catch(t=>{ge(e),v(t instanceof Error?t.message:String(t))}).finally(()=>q(!1))},[Y,y]),at=(0,Q.useCallback)((e,t)=>{i(`/chat/new?${new URLSearchParams({draft:`${e}\n\n${t}`}).toString()}`)},[i]),ot=(0,Q.useMemo)(()=>(0,$.jsxs)(`div`,{className:`flex items-center gap-1`,children:[p?(0,$.jsx)(Ue,{advisor:p.advisor,busy:H,copy:He,onOpenHistory:()=>J(!0),onRefresh:tt}):null,Ke?null:(0,$.jsxs)(g,{type:`button`,variant:`primary`,className:`h-9 rounded-lg`,onClick:()=>x(!0),children:[(0,$.jsx)(N,{className:`size-4`,"aria-hidden":!0}),r.newWork]})]}),[H,He,r.newWork,p,tt,Ke]);(0,Q.useLayoutEffect)(()=>(s({startExtra:null,main:(0,$.jsx)(`h1`,{className:`truncate text-base font-semibold tracking-tight text-fg`,children:n.title}),end:ot}),()=>l()),[l,ot,s,n.title]);let st=p?.needsUser.length??0,ct=p?.backgroundCount??0,lt=st>0?Ye(n.home.attentionTitle,{count:st}):ct>0?n.home.clearTitle:n.home.idleTitle,ut=st>0?ct>0?Ye(n.home.attentionIntroWithBackground,{count:ct}):n.home.attentionIntro:ct>0?Ye(n.home.clearIntro,{count:ct}):n.home.idleIntro;return(0,$.jsxs)(`main`,{className:`mx-auto flex w-full max-w-[920px] flex-1 flex-col px-4 pb-8 pt-3 sm:px-6 lg:px-8 lg:pb-12 lg:pt-4`,children:[(0,$.jsx)(`input`,{ref:X.fileInputRef,type:`file`,multiple:!0,className:`hidden`,onChange:e=>{let t=e.target.files;t&&Me(Array.from(t)),e.target.value=``}}),(0,$.jsx)(A,{open:b,onOpenChange:Je,children:(0,$.jsxs)(T,{children:[(0,$.jsx)(_e,{className:`xopc-dialog-overlay fixed inset-0 z-[80] bg-scrim backdrop-blur-[2px]`}),(0,$.jsxs)(B,{className:`xopc-dialog-content fixed left-1/2 top-1/2 z-[90] flex h-[min(31rem,calc(100dvh-1.5rem))] w-[min(36rem,calc(100vw-1.5rem))] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-xl border border-edge bg-surface-overlay shadow-float focus:outline-none`,children:[(0,$.jsxs)(`div`,{className:`flex shrink-0 items-start gap-4 border-b border-edge px-5 py-4`,children:[(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(ee,{className:`text-base font-semibold text-fg`,children:r.dialogTitle}),(0,$.jsx)(W,{className:`mt-1 text-sm leading-5 text-fg-muted`,children:r.dialogDescription})]}),(0,$.jsx)(F,{asChild:!0,children:(0,$.jsx)(g,{type:`button`,variant:`ghost`,className:`-mr-2 -mt-1 size-8 shrink-0 rounded-lg p-0`,title:n.cancel,"aria-label":n.cancel,children:(0,$.jsx)(fe,{className:`size-4`,"aria-hidden":!0})})})]}),(0,$.jsx)(Ee,{variant:`dialog`,inputId:`new-conversation-intent`,inputRef:Ce,intent:S,labels:{...Ve,submit:r.submit},attachments:X.attachments,isDragging:X.isDragging,attachmentBusy:xe,attachmentsFull:Be,voice:Z,chat:t.chat,cancelAction:(0,$.jsx)(F,{asChild:!0,children:(0,$.jsx)(g,{type:`button`,variant:`ghost`,children:n.cancel})}),onIntentChange:C,onPickFiles:()=>X.fileInputRef.current?.click(),onRemoveAttachment:X.removeAttachment,onPaste:e=>void Pe(e),onDragOver:Fe,onDragLeave:Ie,onDrop:e=>void Le(e),onSubmit:ze})]})]})}),(0,$.jsx)(Re,{open:ce,refreshKey:de,onOpenChange:J,onReevaluate:tt}),_?(0,$.jsxs)(`div`,{role:`alert`,className:`mb-6 flex items-center justify-between gap-3 rounded-xl border border-danger/25 bg-danger-soft px-4 py-3 text-sm text-danger`,children:[(0,$.jsx)(`span`,{children:_}),(0,$.jsx)(g,{type:`button`,variant:`ghost`,className:`h-8 px-2`,onClick:()=>void y(),children:n.home.retry})]}):null,j?(0,$.jsxs)(`div`,{role:`status`,className:`mb-5 flex flex-wrap items-center justify-between gap-3 rounded-xl border border-success/25 bg-success-soft px-4 py-3 text-sm text-fg`,children:[(0,$.jsx)(`span`,{children:j.message}),j.href?(0,$.jsx)(g,{variant:`ghost`,onClick:()=>i(j.href),children:e===`zh`?`查看进展与结果`:`View progress and result`}):null]}):null,h?(0,$.jsx)(Xe,{}):p?(0,$.jsxs)(`div`,{className:We?`mx-auto my-auto w-full max-w-[640px]`:`w-full`,children:[(0,$.jsxs)(`section`,{className:We?`w-full text-center`:`max-w-3xl`,children:[(0,$.jsx)(`h2`,{className:`text-3xl font-semibold leading-tight tracking-[-0.035em] text-fg sm:text-4xl`,children:lt}),(0,$.jsx)(`p`,{className:We?`mx-auto mt-3 max-w-xl text-sm leading-6 text-fg-muted sm:text-base sm:leading-7`:`mt-3 max-w-2xl text-sm leading-6 text-fg-muted sm:text-base sm:leading-7`,children:ut})]}),Ke?(0,$.jsx)(Ee,{variant:`inline`,inputId:`home-conversation-intent`,inputRef:Ce,intent:S,labels:Ve,attachments:X.attachments,isDragging:X.isDragging,attachmentBusy:xe,attachmentsFull:Be,voice:Z,chat:t.chat,onIntentChange:C,onPickFiles:()=>X.fileInputRef.current?.click(),onRemoveAttachment:X.removeAttachment,onPaste:e=>void Pe(e),onDragOver:Fe,onDragLeave:Ie,onDrop:e=>void Le(e),onSubmit:ze}):null,(0,$.jsx)(Ne,{advisor:p.advisor,busy:H,copy:{aiLabel:n.home.advisorAiLabel,why:n.home.advisorWhy,evidence:n.home.advisorEvidence,needsSetup:n.home.advisorNeedsSetup,start:n.home.advisorStart,discuss:n.home.advisorDiscuss,refresh:n.home.advisorRefresh,refreshing:n.home.advisorRefreshing,history:n.home.advisorHistory,viewProgress:n.home.advisorViewProgress,alternatives:n.home.advisorAlternatives,feedback:n.home.advisorFeedback,alreadyDone:n.home.advisorAlreadyDone,irrelevant:n.home.advisorIrrelevant,later:n.home.advisorLater,lessLikeThis:n.home.advisorLessLikeThis,sourceIncorrect:n.home.advisorSourceIncorrect,minutes:n.home.advisorMinutes,setupTitle:n.home.advisorSetupTitle,setupHint:n.home.advisorSetupHint,configure:n.home.advisorConfigure,degradedStart:n.home.advisorDegradedStart,automationHint:n.home.advisorAutomationHint,automationAction:n.home.advisorAutomationAction},onRefresh:tt,onAction:nt,onFeedback:rt,onClarification:at,onOpenHistory:()=>J(!0),preflight:ye,receipt:ne}),p.needsUser.length>0?(0,$.jsxs)(`section`,{className:`mt-10`,"aria-labelledby":`home-needs-user-title`,children:[(0,$.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 px-1`,children:[(0,$.jsx)(w,{className:`size-4 text-warning`,"aria-hidden":!0}),(0,$.jsx)(`h2`,{id:`home-needs-user-title`,className:`text-sm font-semibold text-fg`,children:n.home.needsUserTitle})]}),(0,$.jsx)(`div`,{className:`divide-y divide-edge-subtle overflow-hidden rounded-2xl border border-edge-subtle bg-surface-base`,children:p.needsUser.map(t=>(0,$.jsx)(Ze,{item:t,busy:z!==null,recommendationLabel:n.home.recommendationLabel,dueLabel:n.home.dueLabel,failureLabel:r.runAttention,locale:e,onAction:$e,onComplete:()=>void y(),onUpdated:et},t.id))}),u||(p.attentionPolicy?.suppressedDecisionCount??0)+(p.attentionPolicy?.suppressedAttentionCount??0)>0?(0,$.jsx)(g,{variant:`ghost`,className:`mt-2`,"aria-expanded":u,onClick:()=>d(e=>!e),children:e===`zh`?u?`收起待处理事项`:`查看其余 ${(p.attentionPolicy?.suppressedDecisionCount??0)+(p.attentionPolicy?.suppressedAttentionCount??0)} 项待处理事项`:u?`Show fewer pending items`:`View ${(p.attentionPolicy?.suppressedDecisionCount??0)+(p.attentionPolicy?.suppressedAttentionCount??0)} more pending items`}):null]}):null,p.background.length>0?(0,$.jsxs)(`section`,{className:`mt-10`,"aria-labelledby":`home-background-title`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3 px-1`,children:[(0,$.jsx)(`h2`,{id:`home-background-title`,className:`text-sm font-semibold text-fg`,children:n.home.backgroundTitle}),(0,$.jsx)(`span`,{className:`text-xs text-fg-subtle`,children:Ye(n.home.backgroundCount,{count:p.backgroundCount})})]}),(0,$.jsx)(`div`,{className:`mt-2 divide-y divide-edge-subtle border-y border-edge-subtle`,children:(P?p.background:p.background.slice(0,3)).map(t=>(0,$.jsx)(Qe,{item:t,language:e,onAction:$e,onUpdated:et},t.id))}),p.background.length>3?(0,$.jsx)(g,{variant:`ghost`,className:`mt-2`,"aria-expanded":P,onClick:()=>R(e=>!e),children:e===`zh`?P?`收起`:`查看全部 ${p.backgroundCount} 项`:P?`Show less`:`View all ${p.backgroundCount} items`}):null]}):null]}):null,Y?(0,$.jsxs)(`div`,{role:`status`,className:`fixed bottom-5 left-1/2 z-[100] flex -translate-x-1/2 items-center gap-4 rounded-lg border border-edge bg-surface-overlay px-4 py-3 text-sm text-fg shadow-float`,children:[(0,$.jsx)(`span`,{children:n.home.advisorFeedbackSaved}),(0,$.jsx)(`button`,{type:`button`,className:`font-medium text-accent-fg hover:underline`,onClick:it,children:n.home.advisorUndo})]}):null]})}export{et as HomePage};