@tickernelz/wardmote-ui 2026.1115.2 → 2026.1115.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AdapterManager-DlCyzyMu.js → AdapterManager-DD2p5mWg.js} +1 -1
- package/dist/assets/{AdvancedToolsRoute-4n8ZC6o0.js → AdvancedToolsRoute-DlPZ_L6N.js} +1 -1
- package/dist/assets/{AgentActionButtons-LV4FbrTY.js → AgentActionButtons-sm-e5f06.js} +1 -1
- package/dist/assets/{AgentChat-CXR66MM4.js → AgentChat-b78UeZDu.js} +1 -1
- package/dist/assets/{AgentChats-C4cEfRO_.js → AgentChats-XK32PfX0.js} +1 -1
- package/dist/assets/{AgentDefaults-BZwFysUw.js → AgentDefaults-BZlzjR_2.js} +1 -1
- package/dist/assets/{AgentDetail-DPCbH362.js → AgentDetail-DwlY6mx-.js} +1 -1
- package/dist/assets/{AgentTodoCard-82Za1R6Y.js → AgentTodoCard-C6-lHXns.js} +1 -1
- package/dist/assets/{Agents-BotjqSPg.js → Agents-C1-WHkTj.js} +3 -3
- package/dist/assets/{AppDetail-B5T_4Bu-.js → AppDetail-9cue4nY2.js} +1 -1
- package/dist/assets/{AppNotConnected-eBGlritA.js → AppNotConnected-oZ4OtRZ5.js} +1 -1
- package/dist/assets/{ApprovalCard-CyXVBGnO.js → ApprovalCard-B1Fs4K4S.js} +1 -1
- package/dist/assets/{ApprovalDetail-BSNBUdim.js → ApprovalDetail-BchdkauI.js} +1 -1
- package/dist/assets/{ApprovalPayload-vezR61PH.js → ApprovalPayload-HdMQnZAw.js} +1 -1
- package/dist/assets/{Approvals-YzDki85i.js → Approvals-ecXixAXF.js} +1 -1
- package/dist/assets/{AppsReview-D02Q501S.js → AppsReview-DSeqYXkI.js} +1 -1
- package/dist/assets/{ArtifactCard-CC5aIvtf.js → ArtifactCard-B9GVJfR3.js} +1 -1
- package/dist/assets/{Artifacts-CnP5QapS.js → Artifacts-Cfi9iGlP.js} +1 -1
- package/dist/assets/{AssistantConnection-refIKgUa.js → AssistantConnection-D1H83dKT.js} +1 -1
- package/dist/assets/{AttentionInteractionResolver-_l8MisRg.js → AttentionInteractionResolver-K_Jeu6_2.js} +1 -1
- package/dist/assets/{AuditHub-CKyN1yDa.js → AuditHub-DlVx-mPL.js} +1 -1
- package/dist/assets/{BoardChat-Dn5D5hbo.js → BoardChat-BWW2praB.js} +1 -1
- package/dist/assets/{BootstrapSetupUxLab-CDn9Qoy4.js → BootstrapSetupUxLab-C4zke6Cv.js} +1 -1
- package/dist/assets/{Browse-BQApRQGO.js → Browse-DLwvtbXu.js} +1 -1
- package/dist/assets/{BudgetPolicyCard-BAwZpX0_.js → BudgetPolicyCard-B6DX8U3d.js} +1 -1
- package/dist/assets/{CaseDetail-CPGVCggR.js → CaseDetail-dci6PiNM.js} +1 -1
- package/dist/assets/{Cases-CpluIjg7.js → Cases-DySeA3ym.js} +1 -1
- package/dist/assets/{ChatEndpointDetail-C15kjogV.js → ChatEndpointDetail-DYg7hB9_.js} +1 -1
- package/dist/assets/{ChatEndpointSetup-Czgls4T4.js → ChatEndpointSetup-D82OKj2o.js} +1 -1
- package/dist/assets/{ChoiceControls-Dd_bVqHH.js → ChoiceControls-BCF1vPaa.js} +1 -1
- package/dist/assets/{Companies-DK47FHh_.js → Companies-gUbW68nN.js} +1 -1
- package/dist/assets/{CompanyAccess-G_ygWCdy.js → CompanyAccess-C0cDvj8M.js} +1 -1
- package/dist/assets/{CompanyActivity-BzF5S-ak.js → CompanyActivity-CbIPKv4K.js} +1 -1
- package/dist/assets/{CompanyConnections-V6QokJbP.js → CompanyConnections-BezhEQiP.js} +1 -1
- package/dist/assets/{CompanyEnvironments-Dtsf3CLS.js → CompanyEnvironments-6-P8NN3Q.js} +1 -1
- package/dist/assets/{CompanyExport-CMPWrtnT.js → CompanyExport-UdhY3JMr.js} +1 -1
- package/dist/assets/{CompanyImport-1brk-ZPP.js → CompanyImport-Dj5G-Ci_.js} +1 -1
- package/dist/assets/{CompanySettings-DXs4duFl.js → CompanySettings-ifpz0tmL.js} +1 -1
- package/dist/assets/{CompanySettingsPluginPage-C2DZeyFu.js → CompanySettingsPluginPage-BCK7KaI1.js} +1 -1
- package/dist/assets/{CompanySkills-BE6s5mI1.js → CompanySkills-mzA6IM7-.js} +1 -1
- package/dist/assets/{ConfigureBuiltInAgentModal-7wvPpeNM.js → ConfigureBuiltInAgentModal-DsiGg71e.js} +1 -1
- package/dist/assets/{CopyableGatewayUrl-i8-LiYxQ.js → CopyableGatewayUrl-DwtHLPUd.js} +1 -1
- package/dist/assets/{Dashboard-CU-kG6C4.js → Dashboard-CHGehxNs.js} +1 -1
- package/dist/assets/{DecisionDateChips-BhvEmkt1.js → DecisionDateChips-Ce1EP_35.js} +1 -1
- package/dist/assets/{DecisionQueuePage-CBULv6cY.js → DecisionQueuePage-B55ERukD.js} +1 -1
- package/dist/assets/{DesignGuide-BwncU-wB.js → DesignGuide-CoW-4sZp.js} +1 -1
- package/dist/assets/{EmailEndpointSetup-BPf_8pC0.js → EmailEndpointSetup-Q4I-LgnZ.js} +1 -1
- package/dist/assets/{ExecutionWorkspaceDetail-CqvRHX5r.js → ExecutionWorkspaceDetail-_LuHtfta.js} +1 -1
- package/dist/assets/{GatewayDetail-Br82oQib.js → GatewayDetail-BKCHLhcu.js} +1 -1
- package/dist/assets/{GatewaysList-kBD3cwdU.js → GatewaysList-CZ-_zFD_.js} +1 -1
- package/dist/assets/{GoalDetail-BFeUPzal.js → GoalDetail-Bd04vnyA.js} +1 -1
- package/dist/assets/{GoalTree-CaQSt6o5.js → GoalTree-DtvAb581.js} +1 -1
- package/dist/assets/{Goals-CnYUdXEo.js → Goals-BXW_WXNa.js} +1 -1
- package/dist/assets/{ImageGalleryModal-QrZd2HrQ.js → ImageGalleryModal-xeIIyU7g.js} +1 -1
- package/dist/assets/{Inbox-C6bCCEH6.js → Inbox-DmxWV98u.js} +1 -1
- package/dist/assets/{InstanceAdvanced-CTjlJp69.js → InstanceAdvanced-DMrEvjyY.js} +1 -1
- package/dist/assets/{InviteLanding-C65R08_E.js → InviteLanding-C-S7p6JM.js} +1 -1
- package/dist/assets/{IssueChatLongThreadPerf-mdn5NFzU.js → IssueChatLongThreadPerf-BWbJprSQ.js} +1 -1
- package/dist/assets/{IssueChatThread-CZ9Q-xq-.js → IssueChatThread-DmAyIOuN.js} +1 -1
- package/dist/assets/{IssueDetail-svM2GGnk.js → IssueDetail-issXYSBj.js} +1 -1
- package/dist/assets/{IssueOutputSection-Du3C5TFv.js → IssueOutputSection-BioA9Nux.js} +1 -1
- package/dist/assets/{IssueRecoveryActionCard-Bq2QDhQA.js → IssueRecoveryActionCard-CGWmkRkb.js} +1 -1
- package/dist/assets/{IssueReferencePill-Cnjk1Ugc.js → IssueReferencePill-DWL74G_c.js} +1 -1
- package/dist/assets/{IssueThreadInteractionCard-CAzrNSjO.js → IssueThreadInteractionCard-bP4n_lcw.js} +1 -1
- package/dist/assets/{Issues-D97SDuYL.js → Issues-ButYwujh.js} +1 -1
- package/dist/assets/{LiveNowTodoLine-Cq1ub6Gj.js → LiveNowTodoLine-CiCmi71g.js} +1 -1
- package/dist/assets/{ManagedAiConnectionDetails-COyNN_aD.js → ManagedAiConnectionDetails-CgCv2fqy.js} +1 -1
- package/dist/assets/{McpConnect-CYsPUSYV.js → McpConnect-CeT7gUW_.js} +1 -1
- package/dist/assets/{MembershipAction-DYMy7umB.js → MembershipAction-BX9XIExA.js} +1 -1
- package/dist/assets/{ModelsAndProviders-BJaNzbhV.js → ModelsAndProviders-SEGB5DIt.js} +1 -1
- package/dist/assets/{NewAgent-DGXol110.js → NewAgent-LKqNzfsM.js} +1 -1
- package/dist/assets/{OmpAllSettings-BvYkLMhp.js → OmpAllSettings-1aXWEp6h.js} +1 -1
- package/dist/assets/{PipelineSettings-B6Am-LrO.js → PipelineSettings-UFCz50OY.js} +1 -1
- package/dist/assets/{Pipelines-MgjAhzew.js → Pipelines-n5EQOzN2.js} +1 -1
- package/dist/assets/{PixelsOffice-DnBnPerp.js → PixelsOffice-De61dU2s.js} +1 -1
- package/dist/assets/{PluginPage-C1XADFT2.js → PluginPage-CBSnEw7x.js} +1 -1
- package/dist/assets/{PluginSettings-CapWiXsO.js → PluginSettings-D2pNKDKr.js} +1 -1
- package/dist/assets/{ProfileDetailRoute-PJCQrW25.js → ProfileDetailRoute-DCbTvhPd.js} +1 -1
- package/dist/assets/{ProfileSettings-DXbA8GQP.js → ProfileSettings-BUYIctBS.js} +1 -1
- package/dist/assets/{ProfileWizardRoute-DaZPFglw.js → ProfileWizardRoute-o4Kf_DhP.js} +1 -1
- package/dist/assets/{ProjectDetail-DQxMbc1Q.js → ProjectDetail-DOF0t71W.js} +1 -1
- package/dist/assets/{ProjectWorkspaceDetail-dA3zVCbf.js → ProjectWorkspaceDetail-BEbFq9oK.js} +1 -1
- package/dist/assets/{ProjectWorkspacesContent-DnzUTFfW.js → ProjectWorkspacesContent-DwVqtur5.js} +1 -1
- package/dist/assets/{Projects-D3ZC8FJk.js → Projects-BsZYs3Fo.js} +1 -1
- package/dist/assets/{PublicIssueSharePage-BtWc4gq4.js → PublicIssueSharePage-8uOICn1V.js} +1 -1
- package/dist/assets/{ReviewQueueCard-C9YVH9hi.js → ReviewQueueCard-rQxgVMx_.js} +1 -1
- package/dist/assets/{RichWorkProductCard-CJPI3xQY.js → RichWorkProductCard-FcmQ5fHH.js} +1 -1
- package/dist/assets/{RoutineDetail-DUZXGXpv.js → RoutineDetail-DWqy00zc.js} +1 -1
- package/dist/assets/{RoutineRunVariablesDialog-CQJpihoC.js → RoutineRunVariablesDialog-DaGovqJt.js} +1 -1
- package/dist/assets/{Routines-CZMUFOH1.js → Routines-BE2PduWG.js} +1 -1
- package/dist/assets/{ScrollToBottom-wVHhI6vr.js → ScrollToBottom-DiemLpd4.js} +1 -1
- package/dist/assets/{Search-8efHT3Mn.js → Search-B_dblFtf.js} +1 -1
- package/dist/assets/{Secrets-BZCIDLKj.js → Secrets-D8ZlRoVo.js} +1 -1
- package/dist/assets/{SkillSourceTree-D31jixpq.js → SkillSourceTree-CDK_UwP7.js} +1 -1
- package/dist/assets/{SkillSources-Bn1LRP0O.js → SkillSources-C8inxmWw.js} +1 -1
- package/dist/assets/{SkillStudio-C4o17_hm.js → SkillStudio-8S7xrus7.js} +1 -1
- package/dist/assets/{SourceTrustBadge-C0F4cAmH.js → SourceTrustBadge-DTVyCj4T.js} +1 -1
- package/dist/assets/{StatusCards-BIvnBXBN.js → StatusCards-BpujcoJb.js} +1 -1
- package/dist/assets/{SummarySlotCard-Bpu8HBIR.js → SummarySlotCard-CTolnfbx.js} +1 -1
- package/dist/assets/{TaskChatLab-DAEcgWdy.js → TaskChatLab-BfJcSULz.js} +1 -1
- package/dist/assets/{TaskChatMarker-Bbn6iq01.js → TaskChatMarker-BYJIRrTg.js} +1 -1
- package/dist/assets/{TaskChatProtocolCard-wllJ9P2o.js → TaskChatProtocolCard-DTsBzh1L.js} +1 -1
- package/dist/assets/{TaskChatThreadView-Bnyakc3A.js → TaskChatThreadView-CBwEERny.js} +1 -1
- package/dist/assets/{TaskTreeControls-BFz5K7U-.js → TaskTreeControls-BzPeXKPq.js} +1 -1
- package/dist/assets/{Terminal-DGUlqBL9.js → Terminal-DGY0GEez.js} +1 -1
- package/dist/assets/{TerminalView-Cz01H-I5.js → TerminalView-CZkTSDKg.js} +1 -1
- package/dist/assets/{TrustPresetSection-lyB0V8c9.js → TrustPresetSection-DeIvlixJ.js} +1 -1
- package/dist/assets/{UserProfile-5qgIbXdf.js → UserProfile-BkcJ9Wfx.js} +1 -1
- package/dist/assets/{WhatNeedsMe-DjxO39CR.js → WhatNeedsMe-Bg72QkYe.js} +1 -1
- package/dist/assets/{Workspaces-BzTr5cqx.js → Workspaces-BeS2M4CD.js} +1 -1
- package/dist/assets/{connection-owner-EECE9Eiz.js → connection-owner-qWfs2q4d.js} +1 -1
- package/dist/assets/{index-DbENFODe.js → index-CSIXA5y5.js} +3 -3
- package/dist/assets/{issue-properties-BmOIUOmd.js → issue-properties-D3qASSPI.js} +1 -1
- package/dist/assets/{issue-workspace-selection-CIvSmFv2.js → issue-workspace-selection-sfcpgxzV.js} +1 -1
- package/dist/assets/{pipeline-stage-presentation-DoJvVCJ3.js → pipeline-stage-presentation-C9WooPFB.js} +1 -1
- package/dist/assets/{shared-BMQlB2gM.js → shared-57amdu2f.js} +1 -1
- package/dist/assets/{transcript-adapter-DDVisW9K.js → transcript-adapter-D7nXUOr3.js} +1 -1
- package/dist/assets/{useSummaryDraftStream-BNKrqAT0.js → useSummaryDraftStream-1H3w75Dm.js} +1 -1
- package/dist/index.html +1 -1
- package/dist/sw.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/prod-COP_vZWu.js","assets/rolldown-runtime-ZpX3ckPj.js","assets/TaskChatLab-DAEcgWdy.js","assets/createLucideIcon-B-uEJvX6.js","assets/check-DtcbYVEc.js","assets/circle-QmNEwt6Q.js","assets/copy-B55HyIrd.js","assets/button-D3bYvq4T.js","assets/dist-UqMQn1S1.js","assets/dist-D7pwu0R1.js","assets/minus-BICJQjhd.js","assets/pause-Dt9kKzpY.js","assets/play-BEx2fnvh.js","assets/plus-BbX1VFl1.js","assets/rotate-ccw-axI90MQW.js","assets/TaskChatThreadView-Bnyakc3A.js","assets/star-BXywPGTx.js","assets/preload-helper-CceJXRIF.js","assets/ArtifactCard-CC5aIvtf.js","assets/router-2HX_SyKK.js","assets/queryKeys-yuC-YxZI.js","assets/CompanyContext-DDgccGSs.js","assets/companies-query-C3PiqvlB.js","assets/popover-Csg2lQJG.js","assets/dist-BnmtZ2Iv.js","assets/dist-BDSttwka.js","assets/dist-CcFm-u0f.js","assets/es2015-D_463nn1.js","assets/boxes-DKD_NMHM.js","assets/circle-dot--lzumEbC.js","assets/package-CtAS5cQ_.js","assets/search-oKGByIam.js","assets/shield--xuWEiGM.js","assets/terminal-CPu3HVdk.js","assets/external-link-CxXijrsp.js","assets/attachment-icon-ML6IBayL.js","assets/use-copy-action-DTcJkzd7.js","assets/ToastContext-BL2cptrZ.js","assets/clipboard-CTLKYvRL.js","assets/arrow-down-DEeYvDSD.js","assets/chevron-down-B_rMrTLq.js","assets/chevron-right-DDmPvaMb.js","assets/MarkdownBody-B_U4yj24.js","assets/mention-chips-DiRTrrHG.js","assets/agent-avatar-url-BIEMYowR.js","assets/color-contrast-BHHcEMtO.js","assets/archive-D88zlq0K.js","assets/circle-question-mark-DwSVXXAd.js","assets/circle-x-BjJ9dhyd.js","assets/clock-CC_JLeqp.js","assets/file-code-corner-BjfTMOCK.js","assets/folder-open-_ghGCHXm.js","assets/git-pull-request-BjnLQJTs.js","assets/key-round-B3uXhHZr.js","assets/octagon-alert-GkcxkXei.js","assets/agents-DjsXf9UL.js","assets/github-icon-DFxdtKYj.js","assets/usePrefersReducedMotion-D2ae-qu3.js","assets/ThemeContext-B1H3O5xP.js","assets/StatusIcon-BjnMkdr3.js","assets/task-chat-attachments-gnHi9Y8F.js","assets/file-text-Bsh0mVGb.js","assets/file-pnrh3b35.js","assets/TaskChatMarker-Bbn6iq01.js","assets/book-open-BxTSC4RX.js","assets/bot-B76w73ks.js","assets/flag-grOpQtVK.js","assets/info-BwrvDiVL.js","assets/octagon-x-Dv-Y-nVs.js","assets/TaskChatProtocolCard-wllJ9P2o.js","assets/RichWorkProductCard-CJPI3xQY.js","assets/maximize-2-Cvn_jAEz.js","assets/server-DnJLt7Tc.js","assets/ImageGalleryModal-QrZd2HrQ.js","assets/dist-LX8UwhCI.js","assets/chevron-left-BOxfE_aw.js","assets/x-hMw21ejo.js","assets/issue-output-CBQvTXwe.js","assets/QuestionForm-Ce0J42bT.js","assets/MarkdownEditor-DAi4IIOl.js","assets/dist-C5mWZjS5.js","assets/dist-E2vHKLl_.js","assets/dist-BFkQWgno.js","assets/dist-2Rw-Zd_A.js","assets/dist-CJqlwWdH.js","assets/dist-DZXev2k_.js","assets/calendar-clock-BISCDlGh.js","assets/user-D82a7TR4.js","assets/AgentAvatar-B4hORIPc.js","assets/Identity-J7JnIwUT.js","assets/avatar-Da46HV9P.js","assets/routines-5Q3z9LWd.js","assets/activity-BD29TjTr.js","assets/dist-BhxPxuMy.js","assets/message-square-plus-DfHcFdyP.js","assets/input-It0utqV7.js","assets/TaskChatComposerTakeoverContext-R3Q1BhAK.js","assets/shield-check-EFhQ8TuB.js","assets/triangle-alert-Cpo2fj-L.js","assets/dialog-DlsqN-fP.js","assets/textarea-9ySinQRQ.js","assets/square-B6e-47ON.js","assets/users-DWw89AvQ.js","assets/presentation-mode-4ymENOlr.js","assets/list-todo-DEUK6RwS.js","assets/shield-question-mark-m0tt6hs2.js","assets/shield-x-CknkwZJY.js","assets/system-notice-comment-z2u-lnKf.js","assets/label-CPQI5V7i.js","assets/heartbeats-xPg7ZEsm.js","assets/email-CK7WXZe2.js","assets/transcript-adapter-DDVisW9K.js","assets/AgentBubbleActionRow-DkXjmbLK.js","assets/dropdown-menu-BdCU_bAX.js","assets/dist-BYL6sXm3.js","assets/ellipsis-DoMWjpQg.js","assets/thumbs-down-B5HCpIhF.js","assets/thumbs-up-D4dbuLOd.js","assets/tooltip-CBtM5Ru1.js","assets/Cases-CpluIjg7.js","assets/checkbox-CM0BzCfq.js","assets/arrow-up-down-DbH6kJcR.js","assets/columns-3-CY4STSME.js","assets/funnel-DuO6AYgp.js","assets/badge-Dz4tmpgp.js","assets/projects-BoqVGttS.js","assets/BreadcrumbContext-_dNLeVnD.js","assets/cases-CyKm563_.js","assets/CaseIdentifierKey-CEVNnXBk.js","assets/FilterBar-B0nW3JWT.js","assets/CaseDetail-CPGVCggR.js","assets/IssueDocumentAnnotations-MC9Cg0US.js","assets/sheet-_2ap0Qlb.js","assets/tabs-BP71y3CO.js","assets/ellipsis-vertical-BJDskJB3.js","assets/issue-properties-BmOIUOmd.js","assets/issue-attribution-DfN_3u2W.js","assets/WorkspaceRuntimeControls--vWoZbsc.js","assets/activity-BwjvcZxv.js","assets/useManagedSandboxOnly-DmBVo7DC.js","assets/instanceSettings-Beri9WSh.js","assets/archive-restore-BCdKBUrD.js","assets/arrow-right-CI9A-h7U.js","assets/arrow-up-right-Who3c6Eu.js","assets/repeat-Kcok_N3k.js","assets/inboxArchiveCache-BlAbu38l.js","assets/access-RvWIoVKp.js","assets/assignees-DkQNbPzi.js","assets/AgentIdentity-DysUzsFa.js","assets/recent-selections-BnN_nb6Y.js","assets/recent-assignees-DmalYaLf.js","assets/InlineEntitySelector-BPTU6UGg.js","assets/useMobileEntityPickerViewportStyle-CupVnJPm.js","assets/issue-blockers-BziPNnMx.js","assets/eye-Cr1d3Exj.js","assets/refresh-cw-DFyxqrfh.js","assets/IssueReferencePill-Cnjk1Ugc.js","assets/query-placeholder-data-Bg4z2kcq.js","assets/SourceTrustBadge-C0F4cAmH.js","assets/badge-check-Ckoc56vq.js","assets/circle-alert-IYSLYJUJ.js","assets/shield-alert-CE3cG15R.js","assets/InlineBanner-Bb5XPk0z.js","assets/runRetryState-BXetWeys.js","assets/review-policy-CF8yrOPs.js","assets/user-check-C8h_kn-H.js","assets/user-minus-Bb57s2Ci.js","assets/separator-CWcHaiNj.js","assets/issue-workspace-selection-CIvSmFv2.js","assets/list-filter-Ral9WsjH.js","assets/trash-CXx6ftRP.js","assets/select-DKYWrP8G.js","assets/chevron-up-JIXWtmhk.js","assets/chip-Carlb_db.js","assets/card-CtkberpO.js","assets/useAutosaveIndicator-7HgPvOXz.js","assets/FoldCurtain-CaqbwQ5-.js","assets/line-diff-DAcZgvm2.js","assets/DocumentFrameHeader-Cvi5g3Mg.js","assets/Dashboard-CU-kG6C4.js","assets/flask-conical-CStGGVAY.js","assets/layout-dashboard-Do0AiLwc.js","assets/MootMark-JzjkztPD.js","assets/useSharedPolling-C9W19bSA.js","assets/slots-DEaEOBky.js","assets/SidebarContext-CQAYTXv1.js","assets/plugins-B9j-cGkW.js","assets/instance-settings-QXUWVmQs.js","assets/MetricCard-C4ovc-sG.js","assets/smoke-lab-matrix-ClXyORST.js","assets/Companies-DK47FHh_.js","assets/Agents-BotjqSPg.js","assets/useQueries-CARcRe0M.js","assets/network-fTXDUoNc.js","assets/useAgentChatEnabled-CxjeKfu8.js","assets/useHiddenSettings-D4B9ID2B.js","assets/health-DbFHC5QU.js","assets/model-picker-fields-CO8eTE_4.js","assets/arrow-up-ddF-jVQ8.js","assets/adapter-display-registry-Btc8GS-1.js","assets/environments-DNM7-n7c.js","assets/managed-sandbox-environment-B8DewKvK.js","assets/AgentRoleEditor-GiQtUBwK.js","assets/alert-dialog-B25sZXGU.js","assets/EntityRow-Bnh1HYkH.js","assets/AgentDetail-DPCbH362.js","assets/useInfiniteQuery-KaGSl9U6.js","assets/ConnectionSetupFlow-CYRelIus.js","assets/connection-identity-DxOISTHV.js","assets/queryClient-B1lX-ygT.js","assets/collapsible-DfIkfd0G.js","assets/PathInstructionsModal-CDSHNrY7.js","assets/arrow-left-DbEq2ZQa.js","assets/SearchableSelect-LINcdfon.js","assets/command-D25L6P6V.js","assets/searchable-select-fvMNMcqm.js","assets/environment-variables-editor-jbMGpQS9.js","assets/eye-off-D13_kZ5c.js","assets/save-D6Ol3Dt5.js","assets/user-round-DGXuqT69.js","assets/model-DidtFy-U.js","assets/proposal-review-BWfjrdl_.js","assets/server-cog-DTIiF5_T.js","assets/secrets-DQ_ZOoe5.js","assets/inbox-BqqJhYb6.js","assets/link-2-k_0bFjUn.js","assets/SetupWizard-C7Lq6-gc.js","assets/skeleton-BrYUg3zU.js","assets/tools-CXMpY5lh.js","assets/AppLogo-A080obfm.js","assets/assets-CFbf4zTY.js","assets/toggle-switch-n2GNfMll.js","assets/AgentMultiSelect-qfPqHgqC.js","assets/radio-card-DjSTuW8s.js","assets/JsonSchemaForm-BeT-YkAn.js","assets/schema-config-fields-D7skOY9b.js","assets/agent-config-primitives-BgAI9Wjh.js","assets/AgentSetupPrompt-kYvr8COH.js","assets/dynamic-loader-ehitOaJV.js","assets/adapters-CgHcTR0X.js","assets/use-adapter-capabilities-bMzhmkI4.js","assets/AgentCharacter-DDxSOhSK.js","assets/app-connect-policy-BHI-V2Dg.js","assets/responsible-user-denial-Dyl0BwU5.js","assets/ScrollToBottom-wVHhI6vr.js","assets/scroll-area-Drh0SHUe.js","assets/braces-CFDFcEHK.js","assets/chatEndpoints-DU1FUTHN.js","assets/ConfigureBuiltInAgentModal-7wvPpeNM.js","assets/run-log-chunks-ZnzOvrXs.js","assets/IssueRecoveryActionCard-Bq2QDhQA.js","assets/execution-projection-BGI5f3kX.js","assets/workspace-restore-Dz-CzQw6.js","assets/model-fallback-TGS2bD1z.js","assets/ResponsibleUserDenialNotice-CEvs5gLH.js","assets/user-x-ZsJKw74i.js","assets/omp-settings-model-CMuKzvaI.js","assets/ChoiceControls-Dd_bVqHH.js","assets/SkillCardIcon-BCnSfO_D.js","assets/CopyText-ClimrXBs.js","assets/MembershipAction-DYMy7umB.js","assets/log-in-v9DKL1c0.js","assets/AgentActionButtons-LV4FbrTY.js","assets/TrustPresetSection-lyB0V8c9.js","assets/EnforcementBanner-vHB9L-Yh.js","assets/shared-BMQlB2gM.js","assets/OmpAllSettings-BvYkLMhp.js","assets/Projects-D3ZC8FJk.js","assets/ProjectDetail-DQxMbc1Q.js","assets/link-D8yT0AWm.js","assets/BudgetPolicyCard-BAwZpX0_.js","assets/AccessSelectIdentity-DP1Mu7bR.js","assets/InlineEditor-DED3FvOC.js","assets/SummarySlotCard-Bpu8HBIR.js","assets/useSummaryDraftStream-BNKrqAT0.js","assets/budgets-Dh83JquC.js","assets/ProjectWorkspacesContent-DnzUTFfW.js","assets/ProjectWorkspaceDetail-dA3zVCbf.js","assets/MissingPluginTabPlaceholder-tpHW_cHu.js","assets/Workspaces-BzTr5cqx.js","assets/Issues-D97SDuYL.js","assets/Inbox-C6bCCEH6.js","assets/issue-filters-Ce8v1l6U.js","assets/ApprovalPayload-vezR61PH.js","assets/scroll-text-DkybSLN1.js","assets/useSecondTick-C8mfjKOs.js","assets/LiveNowTodoLine-Cq1ub6Gj.js","assets/AgentTodoCard-82Za1R6Y.js","assets/Search-8efHT3Mn.js","assets/file-question-mark-BkUB191G.js","assets/IssueDetail-svM2GGnk.js","assets/IssueWriteDenialNotice-BL15rdb3.js","assets/TerminalView-Cz01H-I5.js","assets/clipboard-paste-CTGh3EHl.js","assets/rotate-cw-CsneTEMK.js","assets/terminal-font-B-qtwS34.js","assets/cloud-B-O92Qvh.js","assets/file-search-rH270bSD.js","assets/folder-search-DREkJnno.js","assets/IssueThreadInteractionCard-CAzrNSjO.js","assets/plug-C6x6irKg.js","assets/interaction-card-visibility-CcLH43P2.js","assets/interaction-audience-BKA801vy.js","assets/AgentMailCredentialField-GpMDP0TI.js","assets/radio-ljY5_vGs.js","assets/settings-BCLiRXsG.js","assets/browser-use-B_hQkV_4.js","assets/TaskTreeControls-BFz5K7U-.js","assets/code-xml-0Ayyc-wN.js","assets/IssueChatThread-CZ9Q-xq-.js","assets/ComposerAddMenu-BAe6OEqw.js","assets/CommentAttributionChip-CoZpP9Qu.js","assets/issueActiveRun-s6f-GUHq.js","assets/ApprovalCard-CyXVBGnO.js","assets/issue-share-CnQGf7_a.js","assets/artifacts-CVWeUMom.js","assets/activity-format-BNHOXlUD.js","assets/AgentChats-C4cEfRO_.js","assets/recent-agent-chats-D6dncy6K.js","assets/AgentChat-CXR66MM4.js","assets/agentChats-Do1wOmo4.js","assets/IssueChatLongThreadPerf-mdn5NFzU.js","assets/Routines-CZMUFOH1.js","assets/audit-navigation-IalprBz0.js","assets/FolderControls-BzHjv3pm.js","assets/RoutineRunVariablesDialog-CQJpihoC.js","assets/Pipelines-MgjAhzew.js","assets/pipeline-stage-presentation-DoJvVCJ3.js","assets/folder-git-2-DwoXLLLe.js","assets/pipelines-DRMWZLsA.js","assets/PipelineSettings-B6Am-LrO.js","assets/RoutineVariablesEditor-Bfp8oxTI.js","assets/StatusCards-BIvnBXBN.js","assets/wand-sparkles-3T1jSols.js","assets/PixelsOffice-DnBnPerp.js","assets/coins-DOScIoKX.js","assets/AttentionInteractionResolver-_l8MisRg.js","assets/RoutineDetail-DUZXGXpv.js","assets/pen-line-ChG9h6IN.js","assets/webhook-C65Oqhz7.js","assets/WebhookUrlWarning-DCT2VWqt.js","assets/RoutineActivityRow-BKtWtOsg.js","assets/UserProfile-5qgIbXdf.js","assets/ExecutionWorkspaceDetail-CqvRHX5r.js","assets/Goals-CnYUdXEo.js","assets/GoalTree-CaQSt6o5.js","assets/Artifacts-CnP5QapS.js","assets/GoalDetail-BFeUPzal.js","assets/Approvals-YzDki85i.js","assets/ApprovalDetail-BSNBUdim.js","assets/CompanyActivity-BzF5S-ak.js","assets/AuditHub-CKyN1yDa.js","assets/arrow-down-left-Bbtqoesi.js","assets/decision-models-DGwWNl8R.js","assets/fast-responses-DfTJsIyW.js","assets/QuotaBar-t5jmdx0g.js","assets/WhatNeedsMe-DjxO39CR.js","assets/DecisionDateChips-BhvEmkt1.js","assets/sun-COPyd3B-.js","assets/DecisionQueuePage-CBULv6cY.js","assets/BoardChat-Dn5D5hbo.js","assets/circle-slash-CW8QpI4G.js","assets/send-DeeMT_AN.js","assets/CompanySettings-DXs4duFl.js","assets/DecisionModelSettings-DMCwoXY5.js","assets/CompanyConnections-V6QokJbP.js","assets/CompanyEnvironments-Dtsf3CLS.js","assets/BootstrapSetupUxLab-CDn9Qoy4.js","assets/ResponsibleUserDenialUxLab-DN6KJXcW.js","assets/CrossIssueCollaborationUxLab-Dm0T3f-s.js","assets/CompanySettingsPluginPage-C2DZeyFu.js","assets/CompanyAccess-G_ygWCdy.js","assets/AdvancedToolsRoute-4n8ZC6o0.js","assets/power-BhiyULZK.js","assets/profile-summary-BvOz6WgX.js","assets/useProfilesData-CwxF85Mp.js","assets/ProfileWizardRoute-DaZPFglw.js","assets/ToolsAdminGate-tzHGMGsb.js","assets/ProfileDetailRoute-PJCQrW25.js","assets/Browse-BQApRQGO.js","assets/ManagedAiConnectionDetails-COyNN_aD.js","assets/retired-composio-DrxhEOpx.js","assets/connection-owner-EECE9Eiz.js","assets/AssistantConnection-refIKgUa.js","assets/AppsConnect-eslQZ4Lz.js","assets/skill-source-connect-return-C3vV7DQP.js","assets/ChatEndpointSetup-Czgls4T4.js","assets/EmailEndpointSetup-BPf_8pC0.js","assets/OpenwaGatewayManager-CPX75sP6.js","assets/ChatEndpointDetail-C15kjogV.js","assets/EmailConnectionAccess-BdGNG8sv.js","assets/ChatIdentityConfirm-BJoMzDSS.js","assets/AppsReview-D02Q501S.js","assets/ReviewQueueCard-C9YVH9hi.js","assets/AppDetail-B5T_4Bu-.js","assets/AppNotConnected-eBGlritA.js","assets/GatewaysList-kBD3cwdU.js","assets/CopyableGatewayUrl-i8-LiYxQ.js","assets/GatewayDetail-Br82oQib.js","assets/CompanySkills-BE6s5mI1.js","assets/SkillBinaryFile-DQ_98eYB.js","assets/company-skill-routes-D5LJ1l8M.js","assets/SkillSources-Bn1LRP0O.js","assets/SkillSourceTree-D31jixpq.js","assets/SkillStudio-C4o17_hm.js","assets/AgentIconPicker-DHgdD_9_.js","assets/resizable-panels-Cfyr3j78.js","assets/IssueOutputSection-Du3C5TFv.js","assets/Secrets-BZCIDLKj.js","assets/CompanyImport-1brk-ZPP.js","assets/agent-order-BE-pAWdx.js","assets/sidebarPreferences-CxJ8nhCI.js","assets/portable-files-CloN_vbk.js","assets/DesignGuide-BwncU-wB.js","assets/RepositoryEditor-DxXq3UJI.js","assets/ThemeToggle-U9FTg879.js","assets/InstanceFeatures-CqkXR6d9.js","assets/useInstanceFeatureSettings-CQdym27e.js","assets/AgentDefaults-BZwFysUw.js","assets/ModelsAndProviders-BJaNzbhV.js","assets/InstanceAdvanced-CTjlJp69.js","assets/InstanceAccess-CDzvvhRr.js","assets/ProfileSettings-DXbA8GQP.js","assets/PluginManager-CPYhUxgY.js","assets/PluginSettings-CapWiXsO.js","assets/AdapterManager-DlCyzyMu.js","assets/PluginPage-C1XADFT2.js","assets/NewAgent-DGXol110.js","assets/Auth-BRkjUyyN.js","assets/invite-memory-CHGcQdLs.js","assets/BoardClaim-7gbzMdsZ.js","assets/McpConnect-CYsPUSYV.js","assets/CliAuth-CfQo7C9j.js","assets/InviteLanding-C65R08_E.js","assets/PublicIssueSharePage-BtWc4gq4.js","assets/JoinRequestQueue-B_br1twW.js","assets/CompanyExport-CMPWrtnT.js","assets/Terminal-DGUlqBL9.js"])))=>i.map(i=>d[i]);
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/prod-COP_vZWu.js","assets/rolldown-runtime-ZpX3ckPj.js","assets/TaskChatLab-BfJcSULz.js","assets/createLucideIcon-B-uEJvX6.js","assets/check-DtcbYVEc.js","assets/circle-QmNEwt6Q.js","assets/copy-B55HyIrd.js","assets/button-D3bYvq4T.js","assets/dist-UqMQn1S1.js","assets/dist-D7pwu0R1.js","assets/minus-BICJQjhd.js","assets/pause-Dt9kKzpY.js","assets/play-BEx2fnvh.js","assets/plus-BbX1VFl1.js","assets/rotate-ccw-axI90MQW.js","assets/TaskChatThreadView-CBwEERny.js","assets/star-BXywPGTx.js","assets/preload-helper-CceJXRIF.js","assets/ArtifactCard-B9GVJfR3.js","assets/router-2HX_SyKK.js","assets/queryKeys-yuC-YxZI.js","assets/CompanyContext-DDgccGSs.js","assets/companies-query-C3PiqvlB.js","assets/popover-Csg2lQJG.js","assets/dist-BnmtZ2Iv.js","assets/dist-BDSttwka.js","assets/dist-CcFm-u0f.js","assets/es2015-D_463nn1.js","assets/boxes-DKD_NMHM.js","assets/circle-dot--lzumEbC.js","assets/package-CtAS5cQ_.js","assets/search-oKGByIam.js","assets/shield--xuWEiGM.js","assets/terminal-CPu3HVdk.js","assets/external-link-CxXijrsp.js","assets/attachment-icon-ML6IBayL.js","assets/use-copy-action-DTcJkzd7.js","assets/ToastContext-BL2cptrZ.js","assets/clipboard-CTLKYvRL.js","assets/arrow-down-DEeYvDSD.js","assets/chevron-down-B_rMrTLq.js","assets/chevron-right-DDmPvaMb.js","assets/MarkdownBody-B_U4yj24.js","assets/mention-chips-DiRTrrHG.js","assets/agent-avatar-url-BIEMYowR.js","assets/color-contrast-BHHcEMtO.js","assets/archive-D88zlq0K.js","assets/circle-question-mark-DwSVXXAd.js","assets/circle-x-BjJ9dhyd.js","assets/clock-CC_JLeqp.js","assets/file-code-corner-BjfTMOCK.js","assets/folder-open-_ghGCHXm.js","assets/git-pull-request-BjnLQJTs.js","assets/key-round-B3uXhHZr.js","assets/octagon-alert-GkcxkXei.js","assets/agents-DjsXf9UL.js","assets/github-icon-DFxdtKYj.js","assets/usePrefersReducedMotion-D2ae-qu3.js","assets/ThemeContext-B1H3O5xP.js","assets/StatusIcon-BjnMkdr3.js","assets/task-chat-attachments-gnHi9Y8F.js","assets/file-text-Bsh0mVGb.js","assets/file-pnrh3b35.js","assets/TaskChatMarker-BYJIRrTg.js","assets/book-open-BxTSC4RX.js","assets/bot-B76w73ks.js","assets/flag-grOpQtVK.js","assets/info-BwrvDiVL.js","assets/octagon-x-Dv-Y-nVs.js","assets/TaskChatProtocolCard-DTsBzh1L.js","assets/RichWorkProductCard-FcmQ5fHH.js","assets/maximize-2-Cvn_jAEz.js","assets/server-DnJLt7Tc.js","assets/ImageGalleryModal-xeIIyU7g.js","assets/dist-LX8UwhCI.js","assets/chevron-left-BOxfE_aw.js","assets/x-hMw21ejo.js","assets/issue-output-CBQvTXwe.js","assets/QuestionForm-Ce0J42bT.js","assets/MarkdownEditor-DAi4IIOl.js","assets/dist-C5mWZjS5.js","assets/dist-E2vHKLl_.js","assets/dist-BFkQWgno.js","assets/dist-2Rw-Zd_A.js","assets/dist-CJqlwWdH.js","assets/dist-DZXev2k_.js","assets/calendar-clock-BISCDlGh.js","assets/user-D82a7TR4.js","assets/AgentAvatar-B4hORIPc.js","assets/Identity-J7JnIwUT.js","assets/avatar-Da46HV9P.js","assets/routines-5Q3z9LWd.js","assets/activity-BD29TjTr.js","assets/dist-BhxPxuMy.js","assets/message-square-plus-DfHcFdyP.js","assets/input-It0utqV7.js","assets/TaskChatComposerTakeoverContext-R3Q1BhAK.js","assets/shield-check-EFhQ8TuB.js","assets/triangle-alert-Cpo2fj-L.js","assets/dialog-DlsqN-fP.js","assets/textarea-9ySinQRQ.js","assets/square-B6e-47ON.js","assets/users-DWw89AvQ.js","assets/presentation-mode-4ymENOlr.js","assets/list-todo-DEUK6RwS.js","assets/shield-question-mark-m0tt6hs2.js","assets/shield-x-CknkwZJY.js","assets/system-notice-comment-z2u-lnKf.js","assets/label-CPQI5V7i.js","assets/heartbeats-xPg7ZEsm.js","assets/email-CK7WXZe2.js","assets/transcript-adapter-D7nXUOr3.js","assets/AgentBubbleActionRow-DkXjmbLK.js","assets/dropdown-menu-BdCU_bAX.js","assets/dist-BYL6sXm3.js","assets/ellipsis-DoMWjpQg.js","assets/thumbs-down-B5HCpIhF.js","assets/thumbs-up-D4dbuLOd.js","assets/tooltip-CBtM5Ru1.js","assets/Cases-DySeA3ym.js","assets/checkbox-CM0BzCfq.js","assets/arrow-up-down-DbH6kJcR.js","assets/columns-3-CY4STSME.js","assets/funnel-DuO6AYgp.js","assets/badge-Dz4tmpgp.js","assets/projects-BoqVGttS.js","assets/BreadcrumbContext-_dNLeVnD.js","assets/cases-CyKm563_.js","assets/CaseIdentifierKey-CEVNnXBk.js","assets/FilterBar-B0nW3JWT.js","assets/CaseDetail-dci6PiNM.js","assets/IssueDocumentAnnotations-MC9Cg0US.js","assets/sheet-_2ap0Qlb.js","assets/tabs-BP71y3CO.js","assets/ellipsis-vertical-BJDskJB3.js","assets/issue-properties-D3qASSPI.js","assets/issue-attribution-DfN_3u2W.js","assets/WorkspaceRuntimeControls--vWoZbsc.js","assets/activity-BwjvcZxv.js","assets/useManagedSandboxOnly-DmBVo7DC.js","assets/instanceSettings-Beri9WSh.js","assets/archive-restore-BCdKBUrD.js","assets/arrow-right-CI9A-h7U.js","assets/arrow-up-right-Who3c6Eu.js","assets/repeat-Kcok_N3k.js","assets/inboxArchiveCache-BlAbu38l.js","assets/access-RvWIoVKp.js","assets/assignees-DkQNbPzi.js","assets/AgentIdentity-DysUzsFa.js","assets/recent-selections-BnN_nb6Y.js","assets/recent-assignees-DmalYaLf.js","assets/InlineEntitySelector-BPTU6UGg.js","assets/useMobileEntityPickerViewportStyle-CupVnJPm.js","assets/issue-blockers-BziPNnMx.js","assets/eye-Cr1d3Exj.js","assets/refresh-cw-DFyxqrfh.js","assets/IssueReferencePill-DWL74G_c.js","assets/query-placeholder-data-Bg4z2kcq.js","assets/SourceTrustBadge-DTVyCj4T.js","assets/badge-check-Ckoc56vq.js","assets/circle-alert-IYSLYJUJ.js","assets/shield-alert-CE3cG15R.js","assets/InlineBanner-Bb5XPk0z.js","assets/runRetryState-BXetWeys.js","assets/review-policy-CF8yrOPs.js","assets/user-check-C8h_kn-H.js","assets/user-minus-Bb57s2Ci.js","assets/separator-CWcHaiNj.js","assets/issue-workspace-selection-sfcpgxzV.js","assets/list-filter-Ral9WsjH.js","assets/trash-CXx6ftRP.js","assets/select-DKYWrP8G.js","assets/chevron-up-JIXWtmhk.js","assets/chip-Carlb_db.js","assets/card-CtkberpO.js","assets/useAutosaveIndicator-7HgPvOXz.js","assets/FoldCurtain-CaqbwQ5-.js","assets/line-diff-DAcZgvm2.js","assets/DocumentFrameHeader-Cvi5g3Mg.js","assets/Dashboard-CHGehxNs.js","assets/flask-conical-CStGGVAY.js","assets/layout-dashboard-Do0AiLwc.js","assets/MootMark-JzjkztPD.js","assets/useSharedPolling-C9W19bSA.js","assets/slots-DEaEOBky.js","assets/SidebarContext-CQAYTXv1.js","assets/plugins-B9j-cGkW.js","assets/instance-settings-QXUWVmQs.js","assets/MetricCard-C4ovc-sG.js","assets/smoke-lab-matrix-ClXyORST.js","assets/Companies-gUbW68nN.js","assets/Agents-C1-WHkTj.js","assets/useQueries-CARcRe0M.js","assets/network-fTXDUoNc.js","assets/useAgentChatEnabled-CxjeKfu8.js","assets/useHiddenSettings-D4B9ID2B.js","assets/health-DbFHC5QU.js","assets/model-picker-fields-CO8eTE_4.js","assets/arrow-up-ddF-jVQ8.js","assets/adapter-display-registry-Btc8GS-1.js","assets/environments-DNM7-n7c.js","assets/managed-sandbox-environment-B8DewKvK.js","assets/AgentRoleEditor-GiQtUBwK.js","assets/alert-dialog-B25sZXGU.js","assets/EntityRow-Bnh1HYkH.js","assets/AgentDetail-DwlY6mx-.js","assets/useInfiniteQuery-KaGSl9U6.js","assets/ConnectionSetupFlow-CYRelIus.js","assets/connection-identity-DxOISTHV.js","assets/queryClient-B1lX-ygT.js","assets/collapsible-DfIkfd0G.js","assets/PathInstructionsModal-CDSHNrY7.js","assets/arrow-left-DbEq2ZQa.js","assets/SearchableSelect-LINcdfon.js","assets/command-D25L6P6V.js","assets/searchable-select-fvMNMcqm.js","assets/environment-variables-editor-jbMGpQS9.js","assets/eye-off-D13_kZ5c.js","assets/save-D6Ol3Dt5.js","assets/user-round-DGXuqT69.js","assets/model-DidtFy-U.js","assets/proposal-review-BWfjrdl_.js","assets/server-cog-DTIiF5_T.js","assets/secrets-DQ_ZOoe5.js","assets/inbox-BqqJhYb6.js","assets/link-2-k_0bFjUn.js","assets/SetupWizard-C7Lq6-gc.js","assets/skeleton-BrYUg3zU.js","assets/tools-CXMpY5lh.js","assets/AppLogo-A080obfm.js","assets/assets-CFbf4zTY.js","assets/toggle-switch-n2GNfMll.js","assets/AgentMultiSelect-qfPqHgqC.js","assets/radio-card-DjSTuW8s.js","assets/JsonSchemaForm-BeT-YkAn.js","assets/schema-config-fields-D7skOY9b.js","assets/agent-config-primitives-BgAI9Wjh.js","assets/AgentSetupPrompt-kYvr8COH.js","assets/dynamic-loader-ehitOaJV.js","assets/adapters-CgHcTR0X.js","assets/use-adapter-capabilities-bMzhmkI4.js","assets/AgentCharacter-DDxSOhSK.js","assets/app-connect-policy-BHI-V2Dg.js","assets/responsible-user-denial-Dyl0BwU5.js","assets/ScrollToBottom-DiemLpd4.js","assets/scroll-area-Drh0SHUe.js","assets/braces-CFDFcEHK.js","assets/chatEndpoints-DU1FUTHN.js","assets/ConfigureBuiltInAgentModal-DsiGg71e.js","assets/run-log-chunks-ZnzOvrXs.js","assets/IssueRecoveryActionCard-CGWmkRkb.js","assets/execution-projection-BGI5f3kX.js","assets/workspace-restore-Dz-CzQw6.js","assets/model-fallback-TGS2bD1z.js","assets/ResponsibleUserDenialNotice-CEvs5gLH.js","assets/user-x-ZsJKw74i.js","assets/omp-settings-model-CMuKzvaI.js","assets/ChoiceControls-BCF1vPaa.js","assets/SkillCardIcon-BCnSfO_D.js","assets/CopyText-ClimrXBs.js","assets/MembershipAction-BX9XIExA.js","assets/log-in-v9DKL1c0.js","assets/AgentActionButtons-sm-e5f06.js","assets/TrustPresetSection-DeIvlixJ.js","assets/EnforcementBanner-vHB9L-Yh.js","assets/shared-57amdu2f.js","assets/OmpAllSettings-1aXWEp6h.js","assets/Projects-BsZYs3Fo.js","assets/ProjectDetail-DOF0t71W.js","assets/link-D8yT0AWm.js","assets/BudgetPolicyCard-B6DX8U3d.js","assets/AccessSelectIdentity-DP1Mu7bR.js","assets/InlineEditor-DED3FvOC.js","assets/SummarySlotCard-CTolnfbx.js","assets/useSummaryDraftStream-1H3w75Dm.js","assets/budgets-Dh83JquC.js","assets/ProjectWorkspacesContent-DwVqtur5.js","assets/ProjectWorkspaceDetail-BEbFq9oK.js","assets/MissingPluginTabPlaceholder-tpHW_cHu.js","assets/Workspaces-BeS2M4CD.js","assets/Issues-ButYwujh.js","assets/Inbox-DmxWV98u.js","assets/issue-filters-Ce8v1l6U.js","assets/ApprovalPayload-HdMQnZAw.js","assets/scroll-text-DkybSLN1.js","assets/useSecondTick-C8mfjKOs.js","assets/LiveNowTodoLine-CiCmi71g.js","assets/AgentTodoCard-C6-lHXns.js","assets/Search-B_dblFtf.js","assets/file-question-mark-BkUB191G.js","assets/IssueDetail-issXYSBj.js","assets/IssueWriteDenialNotice-BL15rdb3.js","assets/TerminalView-CZkTSDKg.js","assets/clipboard-paste-CTGh3EHl.js","assets/rotate-cw-CsneTEMK.js","assets/terminal-font-B-qtwS34.js","assets/cloud-B-O92Qvh.js","assets/file-search-rH270bSD.js","assets/folder-search-DREkJnno.js","assets/IssueThreadInteractionCard-bP4n_lcw.js","assets/plug-C6x6irKg.js","assets/interaction-card-visibility-CcLH43P2.js","assets/interaction-audience-BKA801vy.js","assets/AgentMailCredentialField-GpMDP0TI.js","assets/radio-ljY5_vGs.js","assets/settings-BCLiRXsG.js","assets/browser-use-B_hQkV_4.js","assets/TaskTreeControls-BzPeXKPq.js","assets/code-xml-0Ayyc-wN.js","assets/IssueChatThread-DmAyIOuN.js","assets/ComposerAddMenu-BAe6OEqw.js","assets/CommentAttributionChip-CoZpP9Qu.js","assets/issueActiveRun-s6f-GUHq.js","assets/ApprovalCard-B1Fs4K4S.js","assets/issue-share-CnQGf7_a.js","assets/artifacts-CVWeUMom.js","assets/activity-format-BNHOXlUD.js","assets/AgentChats-XK32PfX0.js","assets/recent-agent-chats-D6dncy6K.js","assets/AgentChat-b78UeZDu.js","assets/agentChats-Do1wOmo4.js","assets/IssueChatLongThreadPerf-BWbJprSQ.js","assets/Routines-BE2PduWG.js","assets/audit-navigation-IalprBz0.js","assets/FolderControls-BzHjv3pm.js","assets/RoutineRunVariablesDialog-DaGovqJt.js","assets/Pipelines-n5EQOzN2.js","assets/pipeline-stage-presentation-C9WooPFB.js","assets/folder-git-2-DwoXLLLe.js","assets/pipelines-DRMWZLsA.js","assets/PipelineSettings-UFCz50OY.js","assets/RoutineVariablesEditor-Bfp8oxTI.js","assets/StatusCards-BpujcoJb.js","assets/wand-sparkles-3T1jSols.js","assets/PixelsOffice-De61dU2s.js","assets/coins-DOScIoKX.js","assets/AttentionInteractionResolver-K_Jeu6_2.js","assets/RoutineDetail-DWqy00zc.js","assets/pen-line-ChG9h6IN.js","assets/webhook-C65Oqhz7.js","assets/WebhookUrlWarning-DCT2VWqt.js","assets/RoutineActivityRow-BKtWtOsg.js","assets/UserProfile-BkcJ9Wfx.js","assets/ExecutionWorkspaceDetail-_LuHtfta.js","assets/Goals-BXW_WXNa.js","assets/GoalTree-DtvAb581.js","assets/Artifacts-Cfi9iGlP.js","assets/GoalDetail-Bd04vnyA.js","assets/Approvals-ecXixAXF.js","assets/ApprovalDetail-BchdkauI.js","assets/CompanyActivity-CbIPKv4K.js","assets/AuditHub-DlVx-mPL.js","assets/arrow-down-left-Bbtqoesi.js","assets/decision-models-DGwWNl8R.js","assets/fast-responses-DfTJsIyW.js","assets/QuotaBar-t5jmdx0g.js","assets/WhatNeedsMe-Bg72QkYe.js","assets/DecisionDateChips-Ce1EP_35.js","assets/sun-COPyd3B-.js","assets/DecisionQueuePage-B55ERukD.js","assets/BoardChat-BWW2praB.js","assets/circle-slash-CW8QpI4G.js","assets/send-DeeMT_AN.js","assets/CompanySettings-ifpz0tmL.js","assets/DecisionModelSettings-DMCwoXY5.js","assets/CompanyConnections-BezhEQiP.js","assets/CompanyEnvironments-6-P8NN3Q.js","assets/BootstrapSetupUxLab-C4zke6Cv.js","assets/ResponsibleUserDenialUxLab-DN6KJXcW.js","assets/CrossIssueCollaborationUxLab-Dm0T3f-s.js","assets/CompanySettingsPluginPage-BCK7KaI1.js","assets/CompanyAccess-C0cDvj8M.js","assets/AdvancedToolsRoute-DlPZ_L6N.js","assets/power-BhiyULZK.js","assets/profile-summary-BvOz6WgX.js","assets/useProfilesData-CwxF85Mp.js","assets/ProfileWizardRoute-o4Kf_DhP.js","assets/ToolsAdminGate-tzHGMGsb.js","assets/ProfileDetailRoute-DCbTvhPd.js","assets/Browse-DLwvtbXu.js","assets/ManagedAiConnectionDetails-CgCv2fqy.js","assets/retired-composio-DrxhEOpx.js","assets/connection-owner-qWfs2q4d.js","assets/AssistantConnection-D1H83dKT.js","assets/AppsConnect-eslQZ4Lz.js","assets/skill-source-connect-return-C3vV7DQP.js","assets/ChatEndpointSetup-D82OKj2o.js","assets/EmailEndpointSetup-Q4I-LgnZ.js","assets/OpenwaGatewayManager-CPX75sP6.js","assets/ChatEndpointDetail-DYg7hB9_.js","assets/EmailConnectionAccess-BdGNG8sv.js","assets/ChatIdentityConfirm-BJoMzDSS.js","assets/AppsReview-DSeqYXkI.js","assets/ReviewQueueCard-rQxgVMx_.js","assets/AppDetail-9cue4nY2.js","assets/AppNotConnected-oZ4OtRZ5.js","assets/GatewaysList-CZ-_zFD_.js","assets/CopyableGatewayUrl-DwtHLPUd.js","assets/GatewayDetail-BKCHLhcu.js","assets/CompanySkills-mzA6IM7-.js","assets/SkillBinaryFile-DQ_98eYB.js","assets/company-skill-routes-D5LJ1l8M.js","assets/SkillSources-C8inxmWw.js","assets/SkillSourceTree-CDK_UwP7.js","assets/SkillStudio-8S7xrus7.js","assets/AgentIconPicker-DHgdD_9_.js","assets/resizable-panels-Cfyr3j78.js","assets/IssueOutputSection-BioA9Nux.js","assets/Secrets-D8ZlRoVo.js","assets/CompanyImport-Dj5G-Ci_.js","assets/agent-order-BE-pAWdx.js","assets/sidebarPreferences-CxJ8nhCI.js","assets/portable-files-CloN_vbk.js","assets/DesignGuide-CoW-4sZp.js","assets/RepositoryEditor-DxXq3UJI.js","assets/ThemeToggle-U9FTg879.js","assets/InstanceFeatures-CqkXR6d9.js","assets/useInstanceFeatureSettings-CQdym27e.js","assets/AgentDefaults-BZlzjR_2.js","assets/ModelsAndProviders-SEGB5DIt.js","assets/InstanceAdvanced-DMrEvjyY.js","assets/InstanceAccess-CDzvvhRr.js","assets/ProfileSettings-BUYIctBS.js","assets/PluginManager-CPYhUxgY.js","assets/PluginSettings-D2pNKDKr.js","assets/AdapterManager-DD2p5mWg.js","assets/PluginPage-CBSnEw7x.js","assets/NewAgent-LKqNzfsM.js","assets/Auth-BRkjUyyN.js","assets/invite-memory-CHGcQdLs.js","assets/BoardClaim-7gbzMdsZ.js","assets/McpConnect-CeT7gUW_.js","assets/CliAuth-CfQo7C9j.js","assets/InviteLanding-C-S7p6JM.js","assets/PublicIssueSharePage-8uOICn1V.js","assets/JoinRequestQueue-B_br1twW.js","assets/CompanyExport-UdhY3JMr.js","assets/Terminal-DGY0GEez.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
var bE=Object.defineProperty;var r=(e,t)=>bE(e,"name",{value:t,configurable:!0});import{i as b0,n as vE,t as go}from"./rolldown-runtime-ZpX3ckPj.js";import{Ar as yE,At as jE,Bi as wE,C as nS,Ei as kE,Fr as tg,Ir as SE,Lt as NE,Mi as v0,Nr as CE,Or as AE,Ot as _E,P as EE,Pi as Kc,Pr as aS,Qt as y0,Ti as IE,Vi as By,_ as TE,_n as RE,ei as sS,i as Od,kr as ME,kt as iS,l as Y,n as rS,na as j0,ni as lS,r as fr,rr as DE,t as Fe,ta as OE,ti as Zs,vn as LE,w as Ky,x as zE,zt as Fd}from"./createLucideIcon-B-uEJvX6.js";import{l as oS}from"./dist-BDSttwka.js";import{t as ke}from"./preload-helper-CceJXRIF.js";import{_ as PE,a as ng,c as $E,d as xo,f as L,h as hn,n as ag,p as UE,r as Ei,s as BE,t as w0,v as Ps,y as cS}from"./star-BXywPGTx.js";import{J as k0,X as kn,Y as KE,_ as Bt,c as Pr,d as S0,f as qE,g as uS,h as Af,n as Ti,r as je,t as $,u as FE,v as me}from"./queryKeys-yuC-YxZI.js";import{t as _f}from"./queryClient-B1lX-ygT.js";import{t as Ef}from"./useQueries-CARcRe0M.js";import{a as HE,c as VE,i as N0,l as WE,o as Zn,u as qy}from"./companies-query-C3PiqvlB.js";import{N as Fy,dt as QE,f as GE,ft as YE,k as XE,n as ZE,p as JE,pt as eI,z as dS}from"./ConnectionSetupFlow-CYRelIus.js";import{t as fS}from"./issue-attribution-DfN_3u2W.js";import{t as tI}from"./execution-projection-BGI5f3kX.js";import{C as pS,D as nI,O as aI,T as sI,d as mS,f as C0,k as sg,w as hS}from"./connection-identity-DxOISTHV.js";import{n as bt,r as iI,t as rI}from"./CompanyContext-DDgccGSs.js";import{A as lI,B as Hd,Bt as oI,C as cI,Ct as uI,E as dI,G as If,H as fI,J as pI,Jt as ig,L as ld,O as mI,Q as gS,Qt as hI,Rt as gI,Ut as Vd,Yt as A0,Z as Hy,_t as xI,an as bI,b as vI,dt as xS,f as Wd,i as yI,in as jI,n as bS,nt as eh,o as ja,on as wI,ot as hc,p as Tf,q as _0,r as Ve,t as mn,tt as Rf,u as vS,ut as yS,v as jS,zt as cn}from"./router-2HX_SyKK.js";import{t as kI}from"./dist-UqMQn1S1.js";import{n as wS,r as SI,t as kS}from"./collapsible-DfIkfd0G.js";import{a as SS,c as NS,i as CS,l as NI,n as AS,o as _S,r as ES,s as IS,t as TS}from"./alert-dialog-B25sZXGU.js";import{a as Qd,n as Gd,t as Yd}from"./avatar-Da46HV9P.js";import{t as Gs}from"./checkbox-CM0BzCfq.js";import{a as RS,c as Ii,i as Sn,n as Vy,o as CI,p as Jr,r as el,s as AI,t as tl}from"./dropdown-menu-BdCU_bAX.js";import{t as _I}from"./scroll-area-Drh0SHUe.js";import{i as EI,r as II,t as TI}from"./tabs-BP71y3CO.js";import{a as RI,o as MI,r as DI,s as OI,t as MS}from"./MarkdownEditor-DAi4IIOl.js";import{o as ys,r as js,t as ws}from"./popover-Csg2lQJG.js";import{t as Mf}from"./activity-BwjvcZxv.js";import{n as LI}from"./PathInstructionsModal-CDSHNrY7.js";import{t as DS}from"./archive-D88zlq0K.js";import{t as zI}from"./arrow-down-DEeYvDSD.js";import{t as E0}from"./arrow-left-DbEq2ZQa.js";import{t as PI}from"./arrow-right-CI9A-h7U.js";import{t as $I}from"./arrow-up-down-DbH6kJcR.js";import{t as UI}from"./arrow-up-right-Who3c6Eu.js";import{t as OS}from"./arrow-up-ddF-jVQ8.js";import{t as LS}from"./book-open-BxTSC4RX.js";import{t as Cc}from"./bot-B76w73ks.js";import{t as zS}from"./boxes-DKD_NMHM.js";import{t as BI}from"./braces-CFDFcEHK.js";import{t as KI}from"./calendar-clock-BISCDlGh.js";import{t as Ms}from"./check-DtcbYVEc.js";import{t as Qr}from"./chevron-down-B_rMrTLq.js";import{t as PS}from"./chevron-left-BOxfE_aw.js";import{t as ur}from"./chevron-right-DDmPvaMb.js";import{t as qI}from"./chevron-up-JIXWtmhk.js";import{n as $S,t as FI}from"./SearchableSelect-LINcdfon.js";import{t as US}from"./circle-alert-IYSLYJUJ.js";import{t as Xd}from"./circle-dot--lzumEbC.js";import{t as rg}from"./circle-question-mark-DwSVXXAd.js";import{t as HI}from"./circle-QmNEwt6Q.js";import{t as lg}from"./AgentIconPicker-DHgdD_9_.js";import{a as VI,c as WI,d as og,i as th,l as QI,n as GI,o as BS,r as YI,s as XI,t as ZI,u as od}from"./ComposerAddMenu-BAe6OEqw.js";import{t as JI}from"./clipboard-paste-CTGh3EHl.js";import{t as e3}from"./clock-CC_JLeqp.js";import{C as t3,D as n3,F as a3,O as KS,P as Wy,k as s3,t as i3,w as r3}from"./MarkdownBody-B_U4yj24.js";import{t as l3}from"./columns-3-CY4STSME.js";import{t as o3}from"./copy-B55HyIrd.js";import{n as c3,t as u3}from"./package-CtAS5cQ_.js";import{t as Df}from"./ellipsis-DoMWjpQg.js";import{t as qS}from"./external-link-CxXijrsp.js";import{a as d3,d as f3,f as p3,g as m3,h as h3,i as g3,l as x3,m as b3,p as v3,u as y3}from"./task-chat-attachments-gnHi9Y8F.js";import{t as FS}from"./file-code-corner-BjfTMOCK.js";import{t as HS}from"./file-text-Bsh0mVGb.js";import{t as I0}from"./flag-grOpQtVK.js";import{t as j3}from"./flask-conical-CStGGVAY.js";import{t as VS}from"./folder-open-_ghGCHXm.js";import{t as w3}from"./funnel-DuO6AYgp.js";import{t as k3}from"./git-pull-request-BjnLQJTs.js";import{t as T0}from"./inbox-BqqJhYb6.js";import{t as R0}from"./key-round-B3uXhHZr.js";import{t as M0}from"./layout-dashboard-Do0AiLwc.js";import{t as S3}from"./link-2-k_0bFjUn.js";import{r as Ma,t as oe}from"./button-D3bYvq4T.js";import{t as N3}from"./RepositoryEditor-DxXq3UJI.js";import{t as WS}from"./maximize-2-Cvn_jAEz.js";import{t as C3}from"./minus-BICJQjhd.js";import{n as Ds,t as A3}from"./ThemeToggle-U9FTg879.js";import{t as QS}from"./network-fTXDUoNc.js";import{t as D0}from"./play-BEx2fnvh.js";import{t as as}from"./plus-BbX1VFl1.js";import{t as nl}from"./refresh-cw-DFyxqrfh.js";import{t as GS}from"./repeat-Kcok_N3k.js";import{t as gc}from"./rotate-ccw-axI90MQW.js";import{t as _3}from"./scroll-text-DkybSLN1.js";import{t as pr}from"./search-oKGByIam.js";import{t as E3}from"./send-DeeMT_AN.js";import{t as YS}from"./settings-BCLiRXsG.js";import{t as I3}from"./shield-alert-CE3cG15R.js";import{t as Ac}from"./shield-check-EFhQ8TuB.js";import{t as T3}from"./shield-question-mark-m0tt6hs2.js";import{t as R3}from"./shield--xuWEiGM.js";import{t as M3}from"./square-B6e-47ON.js";import{t as XS}from"./terminal-CPu3HVdk.js";import{t as cg}from"./trash-CXx6ftRP.js";import{t as ai}from"./triangle-alert-Cpo2fj-L.js";import{t as D3}from"./user-round-DGXuqT69.js";import{t as so}from"./user-D82a7TR4.js";import{t as Gr}from"./users-DWw89AvQ.js";import{t as ia}from"./x-hMw21ejo.js";import{a as O3,i as L3,n as z3,r as P3}from"./SetupWizard-C7Lq6-gc.js";import{i as $3,n as U3,r as Jn,t as B3}from"./SidebarContext-CQAYTXv1.js";import{t as O0}from"./MootMark-JzjkztPD.js";import{a as Of,c as K3,i as q3,n as Ge,o as Qy,r as F3,s as H3,t as ZS}from"./SidebarNavItem-Ctqx1ZPE.js";import{n as oo,t as or}from"./primary-sidebar-styles-BdMiagDc.js";import{i as Is,n as Ts,r as V3,t as Rs}from"./tooltip-CBtM5Ru1.js";import{t as Dn}from"./badge-Dz4tmpgp.js";import{n as W3,t as ug}from"./Identity-J7JnIwUT.js";import{t as mr}from"./AgentAvatar-B4hORIPc.js";import{a as Ri,n as Lf,o as Q3,r as G3,t as Y3}from"./ToastContext-BL2cptrZ.js";import{t as Ha}from"./agents-DjsXf9UL.js";import{t as zf}from"./heartbeats-xPg7ZEsm.js";import{t as pa}from"./instanceSettings-Beri9WSh.js";import{a as nh,c as X3,i as Z3,l as J3,n as Gy,o as ah,r as eT,s as dg,t as Yy}from"./agent-order-BE-pAWdx.js";import{n as _c,t as Ec}from"./useSharedPolling-C9W19bSA.js";import{m as tT,s as nT}from"./inboxArchiveCache-BlAbu38l.js";import{n as Xy,t as hr}from"./projects-BoqVGttS.js";import{t as Pf}from"./useAgentChatEnabled-CxjeKfu8.js";import{a as bo,i as $f,n as $s,o as aT,r as vo,s as Os,t as ks}from"./dialog-DlsqN-fP.js";import{t as Wn}from"./input-It0utqV7.js";import{t as ti}from"./access-RvWIoVKp.js";import{a as sT,c as fg,d as iT,f as Zy,h as nr,i as rT,l as lT,m as Jy,n as oT,o as cT,p as sh,r as JS,s as pg,t as mg,u as Zd}from"./issue-filters-Ce8v1l6U.js";import{a as io,n as e1,r as Vr,t as Kr}from"./assignees-DkQNbPzi.js";import{t as L0}from"./plugins-B9j-cGkW.js";import{n as uT,r as dT,t as sr}from"./instance-settings-QXUWVmQs.js";import{a as fT,c as z0,d as pT,f as mT,i as ej,l as hT,m as gT,n as hg,o as qc,p as xT,r as bT,s as vT,t as P0,u as yT}from"./slots-DEaEOBky.js";import{t as Fc}from"./health-DbFHC5QU.js";import{t as gr}from"./useHiddenSettings-D4B9ID2B.js";import{t as Jd}from"./sidebarPreferences-CxJ8nhCI.js";import{t as rt}from"./skeleton-BrYUg3zU.js";import{t as t1}from"./chatEndpoints-DU1FUTHN.js";import{t as Yl}from"./tools-CXMpY5lh.js";import{t as jT}from"./AppLogo-A080obfm.js";import{r as wT}from"./audit-navigation-IalprBz0.js";import{t as kT}from"./routines-5Q3z9LWd.js";import{t as ST}from"./github-icon-DFxdtKYj.js";import{n as n1,t as NT}from"./BreadcrumbContext-_dNLeVnD.js";import{a as $0,c as ir,i as Xs,l as CT,n as AT,o as wn,r as U0,s as B0,t as a1}from"./command-D25L6P6V.js";import{t as co}from"./AgentIdentity-DysUzsFa.js";import{t as gg}from"./secrets-DQ_ZOoe5.js";import{t as s1}from"./textarea-9ySinQRQ.js";import{t as i1}from"./assets-CFbf4zTY.js";import{n as _T,r as ET}from"./recent-selections-BnN_nb6Y.js";import{a as ef,i as tf,n as xg,r as r1,t as IT}from"./recent-assignees-DmalYaLf.js";import{t as TT}from"./attachment-icon-ML6IBayL.js";import{t as l1}from"./toggle-switch-n2GNfMll.js";import{n as RT,t as MT}from"./presentation-mode-4ymENOlr.js";import{a as ih,c as tj,d as $r,g as cd,h as nj,m as Ai,o as DT,s as aj,t as OT,v as sj}from"./TaskChatComposerTakeoverContext-R3Q1BhAK.js";import{t as LT}from"./interaction-card-visibility-CcLH43P2.js";import{r as zT}from"./useMobileEntityPickerViewportStyle-CupVnJPm.js";import{i as ij,n as PT,t as $T}from"./color-contrast-BHHcEMtO.js";import{t as K0}from"./InlineEntitySelector-BPTU6UGg.js";import{r as UT}from"./searchable-select-fvMNMcqm.js";import{t as rj}from"./InlineBanner-Bb5XPk0z.js";import{t as bg}from"./select-DKYWrP8G.js";import{t as BT}from"./chip-Carlb_db.js";import{t as KT}from"./environments-DNM7-n7c.js";import{t as q0}from"./clipboard-CTLKYvRL.js";import{n as qT,r as FT,t as HT}from"./AgentSetupPrompt-kYvr8COH.js";import{t as F0}from"./usePrefersReducedMotion-D2ae-qu3.js";import{t as VT}from"./use-copy-action-DTcJkzd7.js";import{i as WT}from"./app-connect-policy-BHI-V2Dg.js";import{t as Hc}from"./card-CtkberpO.js";import{t as o1}from"./agentChats-Do1wOmo4.js";import{t as QT}from"./ThemeContext-B1H3O5xP.js";import{t as ei}from"./StatusIcon-BjnMkdr3.js";import{a as GT,d as YT,i as XT,l as ZT,s as JT,t as eR}from"./issue-blockers-BziPNnMx.js";r((function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))l(c);new MutationObserver(c=>{for(const u of c)if(u.type==="childList")for(const p of u.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&l(p)}).observe(document,{childList:!0,subtree:!0});function s(c){const u={};return c.integrity&&(u.integrity=c.integrity),c.referrerPolicy&&(u.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?u.credentials="include":c.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}r(s,"getFetchOpts");function l(c){if(c.ep)return;c.ep=!0;const u=s(c);fetch(c.href,u)}r(l,"processPreload")}),"polyfill")();var tR="__wardmote_no_template__",lj=/^paperclip(?=[:.])/,nR="skillStudio.runTemplate.",aR="__paperclip_no_template__";function sR(e){const t=[],s=[];for(let l=0;l<e.length;l+=1){const c=e.key(l);c!==null&&(lj.test(c)&&t.push(c),c.startsWith(nR)&&s.push(c))}for(const l of t){const c=e.getItem(l),u=l.replace(lj,"wardmote");c!==null&&e.getItem(u)===null&&e.setItem(u,c),e.removeItem(l)}for(const l of s)e.getItem(l)===aR&&e.setItem(l,tR)}r(sR,"migrateRetiredStorageKeys");for(const e of[()=>window.localStorage,()=>window.sessionStorage])try{sR(e())}catch{continue}function c1(e){return(typeof e=="string"?e:e?.name??"").trim()}r(c1,"rawNameOf");function u1(e){const t=e.toLowerCase();return!!(t.includes("://")||t==="localhost"||t.startsWith("localhost:")||/^\d{1,3}(\.\d{1,3}){3}(:\d+)?$/.test(t)||/^[a-z0-9.-]+:\d+$/.test(t))}r(u1,"looksLikeNetworkAddress");function vg(e){return e.split(/[\s._-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}r(vg,"titleCaseIdentifier");function iR(e){const t=/^plugin:\s*(.+)$/i.exec(e);if(!t)return null;let s=t[1].trim();return s=s.slice(s.lastIndexOf(".")+1),s=s.replace(/^plugin[-_]/i,""),vg(s)||"Custom app"}r(iR,"pluginPackageLabel");function rR(e,t={}){const s=t.title?.trim();if(s)return s;const l=c1(e);if(!l||u1(l))return"Custom app";const c=iR(l);if(c)return c;if(l.includes(":")&&!l.includes("://")){const u=l.slice(l.lastIndexOf(":")+1).trim();if(u)return vg(u)}return/\s/.test(l)||/[A-Z]/.test(l)?l:/[._-]/.test(l)?vg(l):l}r(rR,"humanizeConnectionDisplayName");function oG(e){const t=c1(e);return t&&u1(t)?`hosted at ${t}`:null}r(oG,"connectionDisplaySecondaryHint");var lR=864e5;function Xl(e){return e?.phase==="waiting"||e?.phase==="installing"}r(Xl,"isUpdateJobActive");function oR(e){return e+3*lR}r(oR,"updateNoticeHiddenUntil");function cR(e,t){return typeof e=="number"&&Number.isFinite(e)&&t<e}r(cR,"isUpdateNoticeHidden");var d1={name:"badge-dollar-sign",size:24,node:[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]};d1.node;var uR=Fe(d1),f1={name:"book-open-text",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M16 13h2",key:"weia3s"}],["path",{d:"M16 9h2",key:"1n7gjm"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}],["path",{d:"M6 13h2",key:"1cckiz"}],["path",{d:"M6 9h2",key:"1k7j9f"}]]};f1.node;var dR=Fe(f1),p1={name:"chevrons-down-up",size:24,node:[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]]};p1.node;var fR=Fe(p1),m1={name:"chevrons-left-right-ellipsis",size:24,node:[["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"m17 7 5 5-5 5",key:"1xlxn0"}],["path",{d:"m7 7-5 5 5 5",key:"19njba"}],["path",{d:"M8 12h.01",key:"czm47f"}]]};m1.node;var pR=Fe(m1),h1={name:"circle-arrow-up",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]],aliases:["arrow-up-circle"]};h1.node;var oj=Fe(h1),g1={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};g1.node;var H0=Fe(g1),x1={name:"circle-play",size:24,node:[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],aliases:["play-circle"]};x1.node;var b1=Fe(x1),v1={name:"circle-slash-2",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}]],aliases:["circle-slashed"]};v1.node;var mR=Fe(v1),y1={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};y1.node;var j1=Fe(y1),w1={name:"cloud-download",size:24,node:[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]],aliases:["download-cloud"]};w1.node;var hR=Fe(w1),k1={name:"dollar-sign",size:24,node:[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]]};k1.node;var S1=Fe(k1),N1={name:"download",size:24,node:[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]};N1.node;var yg=Fe(N1),C1={name:"file-diff",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]]};C1.node;var gR=Fe(C1),A1={name:"file-pen-line",size:24,node:[["path",{d:"M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z",key:"ukzhwg"}],["path",{d:"M14.487 7.858A1 1 0 0 1 14 7V2",key:"1klhew"}],["path",{d:"M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516",key:"rxaxab"}],["path",{d:"M8 18h1",key:"13wk12"}]],aliases:["file-signature"]};A1.node;var xR=Fe(A1),_1={name:"file-terminal",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m8 16 2-2-2-2",key:"10vzyd"}],["path",{d:"M12 18h4",key:"1wd2n7"}]]};_1.node;var bR=Fe(_1),E1={name:"gamepad-2",size:24,node:[["line",{x1:"6",x2:"10",y1:"11",y2:"11",key:"1gktln"}],["line",{x1:"8",x2:"8",y1:"9",y2:"13",key:"qnk9ow"}],["line",{x1:"15",x2:"15.01",y1:"12",y2:"12",key:"krot7o"}],["line",{x1:"18",x2:"18.01",y1:"10",y2:"10",key:"1lcuu1"}],["path",{d:"M17.32 5H6.68a4 4 0 0 0-3.978 3.59c-.006.052-.01.101-.017.152C2.604 9.416 2 14.456 2 16a3 3 0 0 0 3 3c1 0 1.5-.5 2-1l1.414-1.414A2 2 0 0 1 9.828 16h4.344a2 2 0 0 1 1.414.586L17 18c.5.5 1 1 2 1a3 3 0 0 0 3-3c0-1.545-.604-6.584-.685-7.258-.007-.05-.011-.1-.017-.151A4 4 0 0 0 17.32 5z",key:"mfqc10"}]]};E1.node;var vR=Fe(E1),I1={name:"git-branch-plus",size:24,node:[["path",{d:"M6 3v12",key:"qpgusn"}],["path",{d:"M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"1d02ji"}],["path",{d:"M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z",key:"chk6ph"}],["path",{d:"M15 6a9 9 0 0 0-9 9",key:"or332x"}],["path",{d:"M18 15v6",key:"9wciyi"}],["path",{d:"M21 18h-6",key:"139f0c"}]]};I1.node;var yR=Fe(I1),T1={name:"git-commit-horizontal",size:24,node:[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],aliases:["git-commit"]};T1.node;var jR=Fe(T1),R1={name:"grip-vertical",size:24,node:[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]};R1.node;var wR=Fe(R1),M1={name:"house",size:24,node:[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],aliases:["home"]};M1.node;var kR=Fe(M1),D1={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};D1.node;var SR=Fe(D1),O1={name:"layout-grid",size:24,node:[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]};O1.node;var NR=Fe(O1),L1={name:"library",size:24,node:[["path",{d:"m16 6 4 14",key:"ji33uf"}],["path",{d:"M12 6v14",key:"1n7gus"}],["path",{d:"M8 8v12",key:"1gg7y9"}],["path",{d:"M4 4v16",key:"6qkkli"}]]};L1.node;var jg=Fe(L1),z1={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};z1.node;var P1=Fe(z1),$1={name:"list-collapse",size:24,node:[["path",{d:"M10 5h11",key:"1hkqpe"}],["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 19h11",key:"14g2nv"}],["path",{d:"m3 10 3-3-3-3",key:"i7pm08"}],["path",{d:"m3 20 3-3-3-3",key:"20gx1n"}]]};$1.node;var CR=Fe($1),U1={name:"list-tree",size:24,node:[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]]};U1.node;var B1=Fe(U1),K1={name:"list",size:24,node:[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]};K1.node;var AR=Fe(K1),q1={name:"log-out",size:24,node:[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]]};q1.node;var Uf=Fe(q1),F1={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};F1.node;var H1=Fe(F1),V1={name:"message-circle",size:24,node:[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]};V1.node;var wg=Fe(V1),W1={name:"message-square-reply",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"m10 8-3 3 3 3",key:"fp6dz7"}],["path",{d:"M17 14v-1a2 2 0 0 0-2-2H7",key:"1tkjnz"}]]};W1.node;var _R=Fe(W1),Q1={name:"messages-square",size:24,node:[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]};Q1.node;var ER=Fe(Q1),G1={name:"minimize-2",size:24,node:[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]]};G1.node;var Y1=Fe(G1),X1={name:"monitor-cog",size:24,node:[["path",{d:"M12 17v4",key:"1riwvh"}],["path",{d:"m14.305 7.53.923-.382",key:"1mlnsw"}],["path",{d:"m15.228 4.852-.923-.383",key:"82mpwg"}],["path",{d:"m16.852 3.228-.383-.924",key:"ln4sir"}],["path",{d:"m16.852 8.772-.383.923",key:"1dejw0"}],["path",{d:"m19.148 3.228.383-.924",key:"192kgf"}],["path",{d:"m19.53 9.696-.382-.924",key:"fiavlr"}],["path",{d:"m20.772 4.852.924-.383",key:"1j8mgp"}],["path",{d:"m20.772 7.148.924.383",key:"zix9be"}],["path",{d:"M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7",key:"1tnzv8"}],["path",{d:"M8 21h8",key:"1ev6f3"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}]]};X1.node;var IR=Fe(X1),Z1={name:"panel-right-close",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m8 9 3 3-3 3",key:"12hl5m"}]]};Z1.node;var J1=Fe(Z1),eN={name:"panel-right-open",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}],["path",{d:"m10 15-3-3 3-3",key:"1pgupc"}]]};eN.node;var tN=Fe(eN),nN={name:"panel-top-close",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"m9 16 3-3 3 3",key:"1idcnm"}]]};nN.node;var TR=Fe(nN),aN={name:"pencil-ruler",size:24,node:[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13",key:"orapub"}],["path",{d:"m8 6 2-2",key:"115y1s"}],["path",{d:"m18 16 2-2",key:"ee94s4"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17",key:"cfq27r"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};aN.node;var RR=Fe(aN),sN={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};sN.node;var V0=Fe(sN),iN={name:"receipt-text",size:24,node:[["path",{d:"M13 16H8",key:"wsln4y"}],["path",{d:"M14 8H8",key:"1l3xfs"}],["path",{d:"M16 12H8",key:"1fr5h0"}],["path",{d:"M4 3a1 1 0 0 1 1-1 1.3 1.3 0 0 1 .7.2l.933.6a1.3 1.3 0 0 0 1.4 0l.934-.6a1.3 1.3 0 0 1 1.4 0l.933.6a1.3 1.3 0 0 0 1.4 0l.933-.6a1.3 1.3 0 0 1 1.4 0l.934.6a1.3 1.3 0 0 0 1.4 0l.933-.6A1.3 1.3 0 0 1 19 2a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1 1.3 1.3 0 0 1-.7-.2l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.934.6a1.3 1.3 0 0 1-1.4 0l-.933-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-1.4 0l-.934-.6a1.3 1.3 0 0 0-1.4 0l-.933.6a1.3 1.3 0 0 1-.7.2 1 1 0 0 1-1-1z",key:"ycz6yz"}]]};iN.node;var MR=Fe(iN),rN={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};rN.node;var W0=Fe(rN),lN={name:"search-code",size:24,node:[["path",{d:"m13 13.5 2-2.5-2-2.5",key:"1rvxrh"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}],["path",{d:"M9 8.5 7 11l2 2.5",key:"6ffwbx"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};lN.node;var DR=Fe(lN),oN={name:"settings-2",size:24,node:[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]};oN.node;var OR=Fe(oN),cN={name:"share-2",size:24,node:[["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"}]]};cN.node;var LR=Fe(cN),uN={name:"share",size:24,node:[["path",{d:"M12 2v13",key:"1km8f5"}],["path",{d:"m16 6-4-4-4 4",key:"13yo43"}],["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}]]};uN.node;var zR=Fe(uN),dN={name:"sliders-horizontal",size:24,node:[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]};dN.node;var fN=Fe(dN),pN={name:"square-kanban",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 7v7",key:"1x2jlm"}],["path",{d:"M12 7v4",key:"xawao1"}],["path",{d:"M16 7v9",key:"1hp2iy"}]],aliases:["kanban-square"]};pN.node;var PR=Fe(pN),mN={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};mN.node;var Q0=Fe(mN),hN={name:"square-plus",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M8 12h8",key:"1wcyev"}],["path",{d:"M12 8v8",key:"napkw2"}]],aliases:["plus-square"]};hN.node;var $R=Fe(hN),gN={name:"square-terminal",size:24,node:[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],aliases:["terminal-square"]};gN.node;var UR=Fe(gN),xN={name:"store",size:24,node:[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]]};xN.node;var BR=Fe(xN),bN={name:"timer-reset",size:24,node:[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]]};bN.node;var KR=Fe(bN),vN={name:"toggle-right",size:24,node:[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]]};vN.node;var yN=Fe(vN),jN={name:"unplug",size:24,node:[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]]};jN.node;var qR=Fe(jN),wN={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};wN.node;var FR=Fe(wN),kN={name:"user-plus",size:24,node:[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]]};kN.node;var SN=Fe(kN),NN={name:"user-round-pen",size:24,node:[["path",{d:"M2 21a8 8 0 0 1 10.821-7.487",key:"1c8h7z"}],["path",{d:"M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1817ys"}],["circle",{cx:"10",cy:"8",r:"5",key:"o932ke"}]]};NN.node;var HR=Fe(NN),CN={name:"wifi-off",size:24,node:[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};CN.node;var VR=Fe(CN),Zl=b0(oS()),x=b0(j0(),1),AN="wardmote.staleChunkReload";function WR(){try{return window.sessionStorage}catch{return null}}r(WR,"sessionStore");function QR(e){try{e?.removeItem(AN)}catch{return}}r(QR,"clearReloadMark");function GR(e,t){if(!e)return!1;try{return e.getItem("wardmote.staleChunkReload")===t?!1:(e.setItem(AN,t),!0)}catch{return!1}}r(GR,"markReloadOnce");function Ce(e,t={}){const s=t.reload??(()=>window.location.reload()),l=t.path??(()=>window.location.pathname);return(0,x.lazy)(async()=>{const c=t.storage===void 0?WR():t.storage;try{const u=await e();return QR(c),{default:u}}catch(u){if(!GR(c,l()))throw u;return s(),new Promise(()=>{})}})}r(Ce,"lazyPage");var nt=r(e=>typeof e=="string","isString$1"),cc=r(()=>{let e,t;const s=new Promise((l,c)=>{e=l,t=c});return s.resolve=e,s.reject=t,s},"defer"),rh=r(e=>e==null?"":String(e),"makeString"),YR=r((e,t,s)=>{e.forEach(l=>{t[l]&&(s[l]=t[l])})},"copy"),XR=/###/g,cj=r(e=>e&&e.includes("###")?e.replace(XR,"."):e,"cleanKey"),uj=r(e=>!e||nt(e),"canNotTraverseDeeper"),xc=r((e,t,s)=>{const l=nt(t)?t.split("."):t;let c=0;for(;c<l.length-1;){if(uj(e))return{};const u=cj(l[c]);!e[u]&&s&&(e[u]=new s),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++c}return uj(e)?{}:{obj:e,k:cj(l[c])}},"getLastOfPath"),dj=r((e,t,s)=>{const{obj:l,k:c}=xc(e,t,Object);if(l!==void 0||t.length===1){l[c]=s;return}let u=t[t.length-1],p=t.slice(0,t.length-1),f=xc(e,p,Object);for(;f.obj===void 0&&p.length;)u=`${p[p.length-1]}.${u}`,p=p.slice(0,p.length-1),f=xc(e,p,Object),f?.obj&&typeof f.obj[`${f.k}.${u}`]<"u"&&(f.obj=void 0);f.obj[`${f.k}.${u}`]=s},"setPath"),ZR=r((e,t,s,l)=>{const{obj:c,k:u}=xc(e,t,Object);c[u]=c[u]||[],c[u].push(s)},"pushPath"),nf=r((e,t)=>{const{obj:s,k:l}=xc(e,t);if(s&&Object.prototype.hasOwnProperty.call(s,l))return s[l]},"getPath"),JR=r((e,t,s)=>{const l=nf(e,s);return l!==void 0?l:nf(t,s)},"getPathWithDefaults"),_N=r((e,t,s)=>{for(const l in t)l!=="__proto__"&&l!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,l)?nt(e[l])||e[l]instanceof String||nt(t[l])||t[l]instanceof String?s&&(e[l]=t[l]):_N(e[l],t[l],s):e[l]=t[l]);return e},"deepExtend"),_i=r(e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"regexEscape"),eM={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},tM=r(e=>nt(e)?e.replace(/[&<>"'\/]/g,t=>eM[t]):e,"escape"),nM=class{static{r(this,"RegExpCache")}constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const t=this.regExpMap.get(e);if(t!==void 0)return t;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}},aM=[" ",",","?","!",";"],sM=new nM(20),iM=r((e,t,s)=>{t=t||"",s=s||"";const l=aM.filter(p=>!t.includes(p)&&!s.includes(p));if(l.length===0)return!0;const c=sM.getRegExp(`(${l.map(p=>p==="?"?"\\?":p).join("|")})`);let u=!c.test(e);if(!u){const p=e.indexOf(s);p>0&&!c.test(e.substring(0,p))&&(u=!0)}return u},"looksLikeObjectPath"),kg=r((e,t,s=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const l=t.split(s);let c=e;for(let u=0;u<l.length;){if(!c||typeof c!="object")return;let p,f="";for(let h=u;h<l.length;++h)if(h!==u&&(f+=s),f+=l[h],p=c[f],p!==void 0){if(["string","number","boolean"].includes(typeof p)&&h<l.length-1)continue;u+=h-u+1;break}c=p}return c},"deepFind"),Ic=r(e=>e?.replace(/_/g,"-"),"getCleanedCode"),rM={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}},lM=class Sg{static{r(this,"Logger")}constructor(t,s={}){this.init(t,s)}init(t,s={}){this.prefix=s.prefix||"i18next:",this.logger=t||rM,this.options=s,this.debug=s.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,s,l,c){return c&&!this.debug?null:(t=t.map(u=>nt(u)?u.replace(/[\r\n\x00-\x1F\x7F]/g," "):u),nt(t[0])&&(t[0]=`${l}${this.prefix} ${t[0]}`),this.logger[s](t))}create(t){return new Sg(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new Sg(this.logger,t)}},Js=new lM,Bf=class{static{r(this,"EventEmitter")}constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const l=this.observers[s].get(t)||0;this.observers[s].set(t,l+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){const s=r((...l)=>{t(...l),this.off(e,s)},"wrapper");return this.on(e,s),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([s,l])=>{for(let c=0;c<l;c++)s(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([s,l])=>{for(let c=0;c<l;c++)s(e,...t)})}},fj=class extends Bf{static{r(this,"ResourceStore")}constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,s,l={}){const c=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,u=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let p;e.includes(".")?p=e.split("."):(p=[e,t],s&&(Array.isArray(s)?p.push(...s):nt(s)&&c?p.push(...s.split(c)):p.push(s)));const f=nf(this.data,p);return!f&&!t&&!s&&e.includes(".")&&(e=p[0],t=p[1],s=p.slice(2).join(".")),f||!u||!nt(s)?f:kg(this.data?.[e]?.[t],s,c)}addResource(e,t,s,l,c={silent:!1}){const u=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let p=[e,t];s&&(p=p.concat(u?s.split(u):s)),e.includes(".")&&(p=e.split("."),l=t,t=p[1]),this.addNamespaces(t),dj(this.data,p,l),c.silent||this.emit("added",e,t,s,l)}addResources(e,t,s,l={silent:!1}){for(const c in s)(nt(s[c])||Array.isArray(s[c]))&&this.addResource(e,t,c,s[c],{silent:!0});l.silent||this.emit("added",e,t,s)}addResourceBundle(e,t,s,l,c,u={silent:!1,skipCopy:!1}){let p=[e,t];e.includes(".")&&(p=e.split("."),l=s,s=t,t=p[1]),this.addNamespaces(t);let f=nf(this.data,p)||{};u.skipCopy||(s=JSON.parse(JSON.stringify(s))),l?_N(f,s,c):f={...f,...s},dj(this.data,p,f),u.silent||this.emit("added",e,t,s)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(s=>t[s]&&Object.keys(t[s]).length>0)}toJSON(){return this.data}},EN={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,s,l,c){return e.forEach(u=>{t=this.processors[u]?.process(t,s,l,c)??t}),t}},IN=Symbol("i18next/PATH_KEY");function oM(){const e=[],t=Object.create(null);let s;return t.get=(l,c)=>(s?.revoke?.(),c===IN?e:(e.push(c),s=Proxy.revocable(l,t),s.proxy)),Proxy.revocable(Object.create(null),t).proxy}r(oM,"createProxy");function ro(e,t){const{[IN]:s}=e(oM()),l=t?.keySeparator??".",c=t?.nsSeparator??":",u=t?.enableSelector==="strict";if(s.length>1&&c){const p=t?.ns,f=u?Array.isArray(p)?p:p?[p]:null:Array.isArray(p)?p:null;if(f&&(u?f:f.length>1?f.slice(1):[]).includes(s[0]))return`${s[0]}${c}${s.slice(1).join(l)}`}return s.join(l)}r(ro,"keysFromSelector");var lh=r(e=>!nt(e)&&typeof e!="boolean"&&typeof e!="number","shouldHandleAsObject"),pj=class TN extends Bf{static{r(this,"Translator")}constructor(t,s={}){super(),YR(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Js.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,s={interpolation:{}}){const l={...s};if(t==null)return!1;const c=this.resolve(t,l);if(c?.res===void 0)return!1;const u=lh(c.res);return!(l.returnObjects===!1&&u)}extractFromKey(t,s){let l=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const c=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let u=s.ns||this.options.defaultNS||[];const p=l&&t.includes(l),f=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!iM(t,l,c);if(p&&!f){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:nt(u)?[u]:u};const g=t.split(l);(l!==c||l===c&&this.options.ns.includes(g[0]))&&(u=g.shift()),t=g.join(c)}return{key:t,namespaces:nt(u)?[u]:u}}translate(t,s,l){let c=typeof s=="object"?{...s}:s;if(typeof c!="object"&&this.options.overloadTranslationOptionHandler&&(c=this.options.overloadTranslationOptionHandler(arguments)),typeof c=="object"&&(c={...c}),c||(c={}),t==null)return"";typeof t=="function"&&(t=ro(t,{...this.options,...c})),Array.isArray(t)||(t=[String(t)]),t=t.map(V=>typeof V=="function"?ro(V,{...this.options,...c}):String(V));const u=c.returnDetails!==void 0?c.returnDetails:this.options.returnDetails,p=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator,{key:f,namespaces:h}=this.extractFromKey(t[t.length-1],c),g=h[h.length-1];let v=c.nsSeparator!==void 0?c.nsSeparator:this.options.nsSeparator;v===void 0&&(v=":");const y=c.lng||this.language,j=c.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(y?.toLowerCase()==="cimode")return j?u?{res:`${g}${v}${f}`,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:g,usedParams:this.getUsedParamsDetails(c)}:`${g}${v}${f}`:u?{res:f,usedKey:f,exactUsedKey:f,usedLng:y,usedNS:g,usedParams:this.getUsedParamsDetails(c)}:f;const k=this.resolve(t,c);let S=k?.res;const N=k?.usedKey||f,I=k?.exactUsedKey||f,C=["[object Number]","[object Function]","[object RegExp]"],M=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,_=c.count!==void 0&&!nt(c.count),D=TN.hasDefaultValue(c),U=_?this.pluralResolver.getSuffix(y,c.count,c):"",K=c.ordinal&&_?this.pluralResolver.getSuffix(y,c.count,{ordinal:!1}):"",z=_&&!c.ordinal&&c.count===0,E=z&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${U}`]||c[`defaultValue${K}`]||c.defaultValue;let B=S;R&&!S&&D&&(B=E);const O=lh(B),Q=Object.prototype.toString.apply(B);if(R&&B&&O&&!C.includes(Q)&&!(nt(M)&&Array.isArray(B))){if(!c.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const V=this.options.returnedObjectHandler?this.options.returnedObjectHandler(N,B,{...c,ns:h}):`key '${f} (${this.language})' returned an object instead of string.`;return u?(k.res=V,k.usedParams=this.getUsedParamsDetails(c),k):V}if(p){const V=Array.isArray(B),ue=V?[]:{},ce=V?I:N;for(const X in B)if(Object.prototype.hasOwnProperty.call(B,X)){const A=`${ce}${p}${X}`;D&&!S?ue[X]=this.translate(A,{...c,defaultValue:lh(E)?E[X]:void 0,joinArrays:!1,ns:h}):ue[X]=this.translate(A,{...c,joinArrays:!1,ns:h}),ue[X]===A&&(ue[X]=B[X])}S=ue}}else if(R&&nt(M)&&Array.isArray(S))S=S.join(M),S&&(S=this.extendTranslation(S,t,c,l));else{let V=!1,ue=!1;!this.isValidLookup(S)&&D&&(V=!0,S=E),this.isValidLookup(S)||(ue=!0,S=f);const ce=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ue?void 0:S,X=D&&E!==S&&this.options.updateMissing;if(ue||V||X){if(this.logger.log(X?"updateKey":"missingKey",y,g,_&&!X?`${f}${this.pluralResolver.getSuffix(y,c.count,c)}`:f,X?E:S),p){const le=this.resolve(f,{...c,keySeparator:!1});le&&le.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let A=[];const ee=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ee&&ee[0])for(let le=0;le<ee.length;le++)A.push(ee[le]);else this.options.saveMissingTo==="all"?A=this.languageUtils.toResolveHierarchy(c.lng||this.language):A.push(c.lng||this.language);const ie=r((le,Ae,de)=>{const we=D&&de!==S?de:ce;this.options.missingKeyHandler?this.options.missingKeyHandler(le,g,Ae,we,X,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(le,g,Ae,we,X,c),this.emit("missingKey",le,g,Ae,S)},"send");this.options.saveMissing&&(this.options.saveMissingPlurals&&_?A.forEach(le=>{const Ae=this.pluralResolver.getSuffixes(le,c);z&&c[`defaultValue${this.options.pluralSeparator}zero`]&&!Ae.includes(`${this.options.pluralSeparator}zero`)&&Ae.push(`${this.options.pluralSeparator}zero`),Ae.forEach(de=>{ie([le],f+de,c[`defaultValue${de}`]||E)})}):ie(A,f,E))}S=this.extendTranslation(S,t,c,k,l),ue&&S===f&&this.options.appendNamespaceToMissingKey&&(S=`${g}${v}${f}`),(ue||V)&&this.options.parseMissingKeyHandler&&(S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${v}${f}`:f,V?S:void 0,c))}return u?(k.res=S,k.usedParams=this.getUsedParamsDetails(c),k):S}extendTranslation(t,s,l,c,u){if(this.i18nFormat?.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...l},l.lng||this.language||c.usedLng,c.usedNS,c.usedKey,{resolved:c});else if(!l.skipInterpolation){l.interpolation&&this.interpolator.init({...l,interpolation:{...this.options.interpolation,...l.interpolation}});const h=nt(t)&&(l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let g;if(h){const y=t.match(this.interpolator.nestingRegexp);g=y&&y.length}let v=l.replace&&!nt(l.replace)?l.replace:l;if(this.options.interpolation.defaultVariables&&(v={...this.options.interpolation.defaultVariables,...v}),t=this.interpolator.interpolate(t,v,l.lng||this.language||c.usedLng,l),h){const y=t.match(this.interpolator.nestingRegexp),j=y&&y.length;g<j&&(l.nest=!1)}!l.lng&&c&&c.res&&(l.lng=this.language||c.usedLng),l.nest!==!1&&(t=this.interpolator.nest(t,(...y)=>u?.[0]===y[0]&&!l.context?(this.logger.warn(`It seems you are nesting recursively key: ${y[0]} in key: ${s[0]}`),null):this.translate(...y,s),l)),l.interpolation&&this.interpolator.reset()}const p=l.postProcess||this.options.postProcess,f=nt(p)?[p]:p;return t!=null&&f?.length&&l.applyPostProcessor!==!1&&(t=EN.handle(f,t,s,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...c,usedParams:this.getUsedParamsDetails(l)},...l}:l,this)),t}resolve(t,s={}){let l,c,u,p,f;return nt(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(h=>typeof h=="function"?ro(h,{...this.options,...s}):h)),t.forEach(h=>{if(this.isValidLookup(l))return;const g=this.extractFromKey(h,s),v=g.key;c=v;let y=g.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const j=s.count!==void 0&&!nt(s.count),k=j&&!s.ordinal&&s.count===0,S=s.context!==void 0&&(nt(s.context)||typeof s.context=="number")&&s.context!=="",N=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);y.forEach(I=>{this.isValidLookup(l)||(f=I,!this.checkedLoadedFor[`${N[0]}-${I}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(f)&&(this.checkedLoadedFor[`${N[0]}-${I}`]=!0,this.logger.warn(`key "${c}" for languages "${N.join(", ")}" won't get resolved as namespace "${f}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),N.forEach(C=>{if(this.isValidLookup(l))return;p=C;const M=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(M,v,C,I,s);else{let _;j&&(_=this.pluralResolver.getSuffix(C,s.count,s));const D=`${this.options.pluralSeparator}zero`,U=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(j&&(s.ordinal&&_.startsWith(U)&&M.push(v+_.replace(U,this.options.pluralSeparator)),M.push(v+_),k&&M.push(v+D)),S){const K=`${v}${this.options.contextSeparator||"_"}${s.context}`;M.push(K),j&&(s.ordinal&&_.startsWith(U)&&M.push(K+_.replace(U,this.options.pluralSeparator)),M.push(K+_),k&&M.push(K+D))}}let R;for(;R=M.pop();)this.isValidLookup(l)||(u=R,l=this.getResource(C,I,R,s))}))})}),{res:l,usedKey:c,exactUsedKey:u,usedLng:p,usedNS:f}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,s,l,c={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,s,l,c):this.resourceStore.getResource(t,s,l,c)}getUsedParamsDetails(t={}){const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],l=t.replace&&!nt(t.replace);let c=l?t.replace:t;if(l&&typeof t.count<"u"&&(c={...c,count:t.count}),this.options.interpolation.defaultVariables&&(c={...this.options.interpolation.defaultVariables,...c}),!l){c={...c};for(const u of s)delete c[u]}return c}static hasDefaultValue(t){const s="defaultValue";for(const l in t)if(Object.prototype.hasOwnProperty.call(t,l)&&l.startsWith(s)&&t[l]!==void 0)return!0;return!1}},mj=class{static{r(this,"LanguageUtil")}constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Js.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=Ic(e),!e||!e.includes("-"))return null;const t=e.split("-");return t.length===2||(t.pop(),t[t.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(e=Ic(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(nt(e)&&e.includes("-")){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(s=>{if(t)return;const l=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(l))&&(t=l)}),!t&&this.options.supportedLngs&&e.forEach(s=>{if(t)return;const l=this.getScriptPartFromCode(s);if(this.isSupportedCode(l))return t=l;const c=this.getLanguagePartFromCode(s);if(this.isSupportedCode(c))return t=c;t=this.options.supportedLngs.find(u=>u===c?!0:!u.includes("-")&&!c.includes("-")?!1:!!(u.includes("-")&&!c.includes("-")&&u.slice(0,u.indexOf("-"))===c||u.startsWith(c)&&c.length>1))}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t}getFallbackCodes(e,t){if(!e)return[];if(typeof e=="function"&&(e=e(t)),nt(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let s=e[t];return s||(s=e[this.getScriptPartFromCode(t)]),s||(s=e[this.formatLanguageCode(t)]),s||(s=e[this.getLanguagePartFromCode(t)]),s||(s=e.default),s||[]}toResolveHierarchy(e,t){const s=this.options.fallbackLng,l=Array.isArray(s)?s.join("|"):s;l!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=l);const c=t===void 0||t===!1||nt(t),u=t===void 0&&typeof this.options.fallbackLng=="function",p=nt(e)&&c&&!u;let f=null;if(p){let y;t===void 0?y="undefined":t===!1?y="boolean:false":y=`string:${t}`,f=`${e.length}:${e}|${y}`}if(f!==null){const y=this.resolveHierarchyCache[f];if(y!==void 0)return y.slice()}const h=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),g=[],v=r(y=>{y&&(this.isSupportedCode(y)?g.push(y):this.logger.warn(`rejecting language code not found in supportedLngs: ${y}`))},"addCode");return nt(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&v(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&v(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&v(this.getLanguagePartFromCode(e))):nt(e)&&v(this.formatLanguageCode(e)),h.forEach(y=>{g.includes(y)||v(this.formatLanguageCode(y))}),f!==null?(this.resolveHierarchyCache[f]=g,g.slice()):g}},hj={zero:0,one:1,two:2,few:3,many:4,other:5},gj={select:r(e=>e===1?"one":"other","select"),resolvedOptions:r(()=>({pluralCategories:["one","other"]}),"resolvedOptions")},cM=class{static{r(this,"PluralResolver")}constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Js.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const s=Ic(e==="dev"?"en":e),l=t.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:s,type:l});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let u;try{u=new Intl.PluralRules(s,{type:l})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),gj;if(!e.match(/-|_/))return gj;const f=this.languageUtils.getLanguagePartFromCode(e);u=this.getRule(f,t)}return this.pluralRulesCache[c]=u,u}needsPlural(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,s={}){return this.getSuffixes(e,s).map(l=>`${t}${l}`)}getSuffixes(e,t={}){let s=this.getRule(e,t);return s||(s=this.getRule("dev",t)),s?s.resolvedOptions().pluralCategories.sort((l,c)=>hj[l]-hj[c]).map(l=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(e,t,s={}){const l=this.getRule(e,s);return l?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${l.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,s))}},xj=r((e,t,s,l=".",c=!0)=>{let u=JR(e,t,s);return!u&&c&&nt(s)&&(u=kg(e,s,l),u===void 0&&(u=kg(t,s,l))),u},"deepFindWithDefaults"),bj=r(e=>e.replace(/\$/g,"$$$$"),"regexSafe"),vj=class{static{r(this,"Interpolator")}constructor(e={}){this.logger=Js.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(t=>t),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:t,escapeValue:s,useRawValueToEscape:l,prefix:c,prefixEscaped:u,suffix:p,suffixEscaped:f,formatSeparator:h,unescapeSuffix:g,unescapePrefix:v,nestingPrefix:y,nestingPrefixEscaped:j,nestingSuffix:k,nestingSuffixEscaped:S,nestingOptionsSeparator:N,maxReplaces:I,alwaysFormat:C}=e.interpolation;this.escape=t!==void 0?t:tM,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=c?_i(c):u||"{{",this.suffix=p?_i(p):f||"}}",this.formatSeparator=h||",",this.unescapePrefix=g?"":v?_i(v):"-",this.unescapeSuffix=this.unescapePrefix?"":g?_i(g):"",this.nestingPrefix=y?_i(y):j||_i("$t("),this.nestingSuffix=k?_i(k):S||_i(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=I||1e3,this.alwaysFormat=C!==void 0?C:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=r((t,s)=>t?.source===s?(t.lastIndex=0,t):new RegExp(s,"g"),"getOrResetRegExp");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,s,l){let c,u,p;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=r(y=>{if(!y.includes(this.formatSeparator)){const N=xj(t,f,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,s,{...l,...t,interpolationkey:y}):N}const j=y.split(this.formatSeparator),k=j.shift().trim(),S=j.join(this.formatSeparator).trim();return this.format(xj(t,f,k,this.options.keySeparator,this.options.ignoreJSONStructure),S,s,{...l,...t,interpolationkey:k})},"handleFormat");this.resetRegExp(),!this.escapeValue&&typeof e=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const g=l?.missingInterpolationHandler||this.options.missingInterpolationHandler,v=l?.interpolation?.skipOnVariables!==void 0?l.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:r(y=>y,"safeValue")},{regex:this.regexp,safeValue:r(y=>this.escapeValue?this.escape(y):y,"safeValue")}].forEach(y=>{for(p=0;c=y.regex.exec(e);){const j=c[1].trim();if(u=h(j),u===void 0)if(typeof g=="function"){const S=g(e,c,l);u=nt(S)?S:""}else if(l&&Object.prototype.hasOwnProperty.call(l,j))u="";else if(v){u=c[0];continue}else this.logger.warn(`missed to pass in variable ${j} for interpolating ${e}`),u="";else!nt(u)&&!this.useRawValueToEscape&&(u=rh(u));const k=y.safeValue(u);if(e=e.replace(c[0],bj(k)),v?(y.regex.lastIndex+=k.length,y.regex.lastIndex-=c[0].length):y.regex.lastIndex=0,p++,p>=this.maxReplaces)break}}),e}nest(e,t,s={}){let l,c,u;const p=r((f,h)=>{const g=this.nestingOptionsSeparator;if(!f.includes(g))return f;const v=f.split(new RegExp(`${_i(g)}[ ]*{`));let y=`{${v[1]}`;f=v[0],y=this.interpolate(y,u);const j=y.match(/'/g),k=y.match(/"/g);((j?.length??0)%2===0&&!k||(k?.length??0)%2!==0)&&(y=y.replace(/'/g,'"'));try{u=JSON.parse(y),h&&(u={...h,...u})}catch(S){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,S),`${f}${g}${y}`}return u.defaultValue&&u.defaultValue.includes(this.prefix)&&delete u.defaultValue,f},"handleHasOptions");for(;l=this.nestingRegexp.exec(e);){let f=[];u={...s},u=u.replace&&!nt(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const h=/{.*}/s.test(l[1])?l[1].lastIndexOf("}")+1:l[1].indexOf(this.formatSeparator);if(h!==-1&&(f=l[1].slice(h).split(this.formatSeparator).map(g=>g.trim()).filter(Boolean),l[1]=l[1].slice(0,h)),c=t(p.call(this,l[1].trim(),u),u),c&&l[0]===e&&!nt(c))return c;nt(c)||(c=rh(c)),c||(this.logger.warn(`missed to resolve ${l[1]} for nesting ${e}`),c=""),f.length&&(c=f.reduce((g,v)=>this.format(g,v,s.lng,{...s,interpolationkey:l[1].trim()}),c.trim())),e=e.replace(l[0],bj(rh(c))),this.regexp.lastIndex=0}return e}},uM=r(e=>{let t=e.toLowerCase().trim();const s={};if(e.includes("(")){const l=e.split("(");t=l[0].toLowerCase().trim();const c=l[1].slice(0,-1);t==="currency"&&!c.includes(":")?s.currency||(s.currency=c.trim()):t==="relativetime"&&!c.includes(":")?s.range||(s.range=c.trim()):c.split(";").forEach(u=>{if(u){const[p,...f]=u.split(":"),h=f.join(":").trim().replace(/^'+|'+$/g,""),g=p.trim();s[g]||(s[g]=h),h==="false"&&(s[g]=!1),h==="true"&&(s[g]=!0),isNaN(h)||(s[g]=parseInt(h,10))}})}return{formatName:t,formatOptions:s}},"parseFormatStr"),yj=r(e=>{const t={};return(s,l,c)=>{let u=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(u={...u,[c.interpolationkey]:void 0});const p=l+JSON.stringify(u);let f=t[p];return f||(f=e(Ic(l),c),t[p]=f),f(s)}},"createCachedFormatter"),dM=r(e=>(t,s,l)=>e(Ic(s),l)(t),"createNonCachedFormatter"),fM=class{static{r(this,"Formatter")}constructor(e={}){this.logger=Js.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const s=t.cacheInBuiltFormats?yj:dM;this.formats={number:s((l,c)=>{const u=new Intl.NumberFormat(l,{...c});return p=>u.format(p)}),currency:s((l,c)=>{const u=new Intl.NumberFormat(l,{...c,style:"currency"});return p=>u.format(p)}),datetime:s((l,c)=>{const u=new Intl.DateTimeFormat(l,{...c});return p=>u.format(p)}),relativetime:s((l,c)=>{const u=new Intl.RelativeTimeFormat(l,{...c});return p=>u.format(p,c.range||"day")}),list:s((l,c)=>{const u=new Intl.ListFormat(l,{...c});return p=>u.format(p)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=yj(t)}format(e,t,s,l={}){if(!t||e==null)return e;const c=t.split(this.formatSeparator),u=[];for(let p=0;p<c.length;p++){let f=c[p];for(;f.indexOf("(")>-1&&!f.includes(")")&&p+1<c.length;)f=`${f}${this.formatSeparator}${c[++p]}`;u.push(f)}return u.reduce((p,f)=>{const{formatName:h,formatOptions:g}=uM(f);if(this.formats[h]){let v=p;try{const y=l?.formatParams?.[l.interpolationkey]||{},j=y.locale||y.lng||l.locale||l.lng||s;v=this.formats[h](p,j,{...g,...l,...y})}catch(y){this.logger.warn(y)}return v}else this.logger.warn(`there was no format function for ${h}`);return p},e)}},pM=r((e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},"removePending"),mM=class extends Bf{static{r(this,"Connector")}constructor(e,t,s,l={}){super(),this.backend=e,this.store=t,this.services=s,this.languageUtils=s.languageUtils,this.options=l,this.logger=Js.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=l.maxParallelReads||10,this.readingCalls=0,this.maxRetries=l.maxRetries>=0?l.maxRetries:5,this.retryTimeout=l.retryTimeout>=1?l.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(s,l.backend,l)}queueLoad(e,t,s,l){const c={},u={},p={},f={};return e.forEach(h=>{let g=!0;t.forEach(v=>{const y=`${h}|${v}`;!s.reload&&this.store.hasResourceBundle(h,v)?this.state[y]=2:this.state[y]<0||(this.state[y]===1?u[y]===void 0&&(u[y]=!0):(this.state[y]=1,g=!1,u[y]===void 0&&(u[y]=!0),c[y]===void 0&&(c[y]=!0),f[v]===void 0&&(f[v]=!0)))}),g||(p[h]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:l}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(p),toLoadNamespaces:Object.keys(f)}}loaded(e,t,s){const l=e.split("|"),c=l[0],u=l[1];t&&this.emit("failedLoading",c,u,t),!t&&s&&this.store.addResourceBundle(c,u,s,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&s&&(this.state[e]=0);const p={};this.queue.forEach(f=>{ZR(f.loaded,[c],u),pM(f,e),t&&f.errors.push(t),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(h=>{p[h]||(p[h]={});const g=f.loaded[h];g.length&&g.forEach(v=>{p[h][v]===void 0&&(p[h][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",p),this.queue=this.queue.filter(f=>!f.done)}read(e,t,s,l=0,c=this.retryTimeout,u){if(!e.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:s,tried:l,wait:c,callback:u});return}this.readingCalls++;const p=r((h,g)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(h&&g&&l<this.maxRetries){setTimeout(()=>{this.read(e,t,s,l+1,c*2,u)},c);return}u(h,g)},"resolver"),f=this.backend[s].bind(this.backend);if(f.length===2){try{const h=f(e,t);h&&typeof h.then=="function"?h.then(g=>p(null,g)).catch(p):p(null,h)}catch(h){p(h)}return}return f(e,t,p)}prepareLoading(e,t,s={},l){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();nt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),nt(t)&&(t=[t]);const c=this.queueLoad(e,t,s,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(u=>{this.loadOne(u)})}load(e,t,s){this.prepareLoading(e,t,{},s)}reload(e,t,s){this.prepareLoading(e,t,{reload:!0},s)}loadOne(e,t=""){const s=e.split("|"),l=s[0],c=s[1];this.read(l,c,"read",void 0,void 0,(u,p)=>{u&&this.logger.warn(`${t}loading namespace ${c} for language ${l} failed`,u),!u&&p&&this.logger.log(`${t}loaded namespace ${c} for language ${l}`,p),this.loaded(e,u,p)})}saveMissing(e,t,s,l,c,u={},p=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${s}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if(this.backend?.create){const f={...u,isUpdate:c},h=this.backend.create.bind(this.backend);if(h.length<6)try{let g;h.length===5?g=h(e,t,s,l,f):g=h(e,t,s,l),g&&typeof g.then=="function"?g.then(v=>p(null,v)).catch(p):p(null,g)}catch(g){p(g)}else h(e,t,s,l,p,f)}!e||!e[0]||this.store.addResource(e[0],t,s,l)}}},oh=r(()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:r(e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),nt(e[1])&&(t.defaultValue=e[1]),nt(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const s=e[3]||e[2];Object.keys(s).forEach(l=>{t[l]=s[l]})}return t},"overloadTranslationOptionHandler"),interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),"get"),jj=r(e=>(nt(e.ns)&&(e.ns=[e.ns]),nt(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),nt(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),"transformOptions"),ud=r(()=>{},"noop$1"),hM=r(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]=="function"&&(e[t]=e[t].bind(e))})},"bindMemberFunctions"),gM=class Ld extends Bf{static{r(this,"I18n")}constructor(t={},s){if(super(),this.options=jj(t),this.services={},this.logger=Js,this.modules={external:[]},hM(this),s&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,s),this;setTimeout(()=>{this.init(t,s)},0)}}init(t={},s){this.isInitializing=!0,typeof t=="function"&&(s=t,t={}),t.defaultNS==null&&t.ns&&(nt(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const l=oh();this.options={...l,...this.options,...jj(t)},this.options.interpolation={...l.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=l.overloadTranslationOptionHandler);const c=r(f=>f?typeof f=="function"?new f:f:null,"createClassOnDemand");if(!this.options.isClone){this.modules.logger?Js.init(c(this.modules.logger),this.options):Js.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=fM;const h=new mj(this.options);this.store=new fj(this.options.resources,this.options);const g=this.services;g.logger=Js,g.resourceStore=this.store,g.languageUtils=h,g.pluralResolver=new cM(h,{prepend:this.options.pluralSeparator}),f&&(g.formatter=c(f),g.formatter.init&&g.formatter.init(g,this.options),this.options.interpolation.format=g.formatter.format.bind(g.formatter)),g.interpolator=new vj(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new mM(c(this.modules.backend),g.resourceStore,g,this.options),g.backendConnector.on("*",(v,...y)=>{this.emit(v,...y)}),this.modules.languageDetector&&(g.languageDetector=c(this.modules.languageDetector),g.languageDetector.init&&g.languageDetector.init(g,this.options.detection,this.options)),this.modules.i18nFormat&&(g.i18nFormat=c(this.modules.i18nFormat),g.i18nFormat.init&&g.i18nFormat.init(this)),this.translator=new pj(this.services,this.options),this.translator.on("*",(v,...y)=>{this.emit(v,...y)}),this.modules.external.forEach(v=>{v.init&&v.init(this)})}if(this.format=this.options.interpolation.format,s||(s=ud),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(f=>{this[f]=(...h)=>this.store[f](...h)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(f=>{this[f]=(...h)=>(this.store[f](...h),this)});const u=cc(),p=r(()=>{const f=r((h,g)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),u.resolve(g),s(h,g)},"finish");if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return f(null,this.t.bind(this));this.changeLanguage(this.options.lng,f)},"load");return this.options.resources||!this.options.initAsync?p():setTimeout(p,0),u}loadResources(t,s=ud){let l=s;const c=nt(t)?t:this.language;if(typeof t=="function"&&(l=t),!this.options.resources||this.options.partialBundledLanguages){if(c?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return l();const u=[],p=r(f=>{f&&f!=="cimode"&&this.services.languageUtils.toResolveHierarchy(f).forEach(h=>{h!=="cimode"&&(u.includes(h)||u.push(h))})},"append");c?p(c):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>p(f)),this.options.preload?.forEach?.(f=>p(f)),this.services.backendConnector.load(u,this.options.ns,f=>{!f&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),l(f)})}else l(null)}reloadResources(t,s,l){const c=cc();return typeof t=="function"&&(l=t,t=void 0),typeof s=="function"&&(l=s,s=void 0),t||(t=this.languages),s||(s=this.options.ns),l||(l=ud),this.services.backendConnector.reload(t,s,u=>{c.resolve(),l(u)}),c}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&EN.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let s=0;s<this.languages.length;s++){const l=this.languages[s];if(!["cimode","dev"].includes(l)&&this.store.hasLanguageSomeTranslations(l)){this.resolvedLanguage=l;break}}!this.resolvedLanguage&&!this.languages.includes(t)&&this.store.hasLanguageSomeTranslations(t)&&(this.resolvedLanguage=t,this.languages.unshift(t))}}changeLanguage(t,s){this.isLanguageChangingTo=t;const l=cc();this.emit("languageChanging",t);const c=r(f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},"setLngProps"),u=r((f,h)=>{h?this.isLanguageChangingTo===t&&(c(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,l.resolve((...g)=>this.t(...g)),s&&s(f,(...g)=>this.t(...g))},"done"),p=r(f=>{!t&&!f&&this.services.languageDetector&&(f=[]);const h=nt(f)?f:f&&f[0],g=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(nt(f)?[f]:f);g&&(this.language||c(g),this.translator.language||this.translator.changeLanguage(g),this.services.languageDetector?.cacheUserLanguage?.(g)),this.loadResources(g,v=>{u(v,g)})},"setLng");return!t&&this.services.languageDetector&&!this.services.languageDetector.async?p(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(p):this.services.languageDetector.detect(p):p(t),l}getFixedT(t,s,l,c){const u=c?.scopeNs,p=r((f,h,...g)=>{let v;typeof h!="object"?v=this.options.overloadTranslationOptionHandler([f,h].concat(g)):v={...h},v.lng=v.lng||p.lng,v.lngs=v.lngs||p.lngs;const y=v.ns!==void 0&&v.ns!==null;v.ns=v.ns||p.ns,v.keyPrefix!==""&&(v.keyPrefix=v.keyPrefix||l||p.keyPrefix);const j={...this.options,...v};Array.isArray(u)&&!y&&(j.ns=u),typeof v.keyPrefix=="function"&&(v.keyPrefix=ro(v.keyPrefix,j));const k=this.options.keySeparator||".";let S;return v.keyPrefix&&Array.isArray(f)?S=f.map(N=>(typeof N=="function"&&(N=ro(N,j)),`${v.keyPrefix}${k}${N}`)):(typeof f=="function"&&(f=ro(f,j)),S=v.keyPrefix?`${v.keyPrefix}${k}${f}`:f),this.t(S,v)},"fixedT");return nt(t)?p.lng=t:p.lngs=t,p.ns=s,p.keyPrefix=l,p}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,s={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const l=s.lng||this.resolvedLanguage||this.languages[0],c=this.options?this.options.fallbackLng:!1,u=this.languages[this.languages.length-1];if(l.toLowerCase()==="cimode")return!0;const p=r((f,h)=>{const g=this.services.backendConnector.state[`${f}|${h}`];return g===-1||g===0||g===2},"loadNotPending");if(s.precheck){const f=s.precheck(this,p);if(f!==void 0)return f}return!!(this.hasResourceBundle(l,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||p(l,t)&&(!c||p(u,t)))}loadNamespaces(t,s){const l=cc();return this.options.ns?(nt(t)&&(t=[t]),t.forEach(c=>{this.options.ns.includes(c)||this.options.ns.push(c)}),this.loadResources(c=>{l.resolve(),s&&s(c)}),l):(s&&s(),Promise.resolve())}loadLanguages(t,s){const l=cc();nt(t)&&(t=[t]);const c=this.options.preload||[],u=t.filter(p=>!c.includes(p)&&this.services.languageUtils.isSupportedCode(p));return u.length?(this.options.preload=c.concat(u),this.loadResources(p=>{l.resolve(),s&&s(p)}),l):(s&&s(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!t)return"rtl";try{const c=new Intl.Locale(t);if(c&&c.getTextInfo){const u=c.getTextInfo();if(u&&u.direction)return u.direction}}catch{}const s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],l=this.services?.languageUtils||new mj(oh());return t.toLowerCase().indexOf("-latn")>1?"ltr":s.includes(l.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},s){const l=new Ld(t,s);return l.createInstance=Ld.createInstance,l}cloneInstance(t={},s=ud){const l=t.forkResourceStore;l&&delete t.forkResourceStore;const c={...this.options,...t,isClone:!0},u=new Ld(c);if((t.debug!==void 0||t.prefix!==void 0)&&(u.logger=u.logger.clone(t)),["store","services","language"].forEach(p=>{u[p]=this[p]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},l){const p=Object.keys(this.store.data).reduce((f,h)=>(f[h]={...this.store.data[h]},f[h]=Object.keys(f[h]).reduce((g,v)=>(g[v]={...f[h][v]},g),f[h]),f),{});u.store=new fj(p,c),u.services.resourceStore=u.store}if(t.interpolation){const p={...oh().interpolation,...this.options.interpolation,...t.interpolation},f={...c,interpolation:p};u.services.interpolator=new vj(f)}return u.translator=new pj(u.services,c),u.translator.on("*",(p,...f)=>{u.emit(p,...f)}),u.init(c,s),u.translator.options=c,u.translator.backendConnector.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},u}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}},Da=gM.createInstance(),cG=Da.createInstance,uG=Da.dir,dG=Da.init,fG=Da.loadResources,pG=Da.reloadResources,mG=Da.use,hG=Da.changeLanguage,gG=Da.getFixedT,xG=Da.t,bG=Da.exists,vG=Da.setDefaultNamespace,yG=Da.hasLoadedNamespace,jG=Da.loadNamespaces,wG=Da.loadLanguages,xM=r((e,t,s,l)=>{const c=[s,{code:t,...l||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(c,"warn","react-i18next::",!0);Yr(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),e?.services?.logger?.warn&&e.services.logger.warn(...c)},"warn"),wj={},zd=r((e,t,s,l)=>{Yr(s)&&wj[s]||(Yr(s)&&(wj[s]=new Date),xM(e,t,s,l))},"warnOnce"),RN=r((e,t)=>()=>{if(e.isInitialized)t();else{const s=r(()=>{setTimeout(()=>{e.off("initialized",s)},0),t()},"initialized");e.on("initialized",s)}},"loadedClb"),Ng=r((e,t,s)=>{e.loadNamespaces(t,RN(e,s))},"loadNamespaces"),kj=r((e,t,s,l)=>{if(Yr(s)&&(s=[s]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Ng(e,s,l);s.forEach(c=>{e.options.ns.indexOf(c)<0&&e.options.ns.push(c)}),e.loadLanguages(t,RN(e,l))},"loadLanguages"),bM=r((e,t,s={})=>!t.languages||!t.languages.length?(zd(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:s.lng,precheck:r((l,c)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&l.services.backendConnector.backend&&l.isLanguageChangingTo&&!c(l.isLanguageChangingTo,e))return!1},"precheck")}),"hasLoadedNamespace"),Yr=r(e=>typeof e=="string","isString"),vM=r(e=>typeof e=="object"&&e!==null,"isObject"),yM=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,jM={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},wM=r(e=>jM[e],"unescapeHtmlEntity"),kM=r(e=>e.replace(yM,wM),"unescape"),Cg={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:kM,transDefaultProps:void 0},SM=r((e={})=>{Cg={...Cg,...e}},"setDefaults"),NM=r(()=>Cg,"getDefaults"),MN,CM=r(e=>{MN=e},"setI18n"),AM=r(()=>MN,"getI18n"),_M={type:"3rdParty",init(e){SM(e.options.react),CM(e)}},EM=(0,x.createContext)(),IM=class{static{r(this,"ReportNamespaces")}constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(t=>{this.usedNamespaces[t]||(this.usedNamespaces[t]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},TM=go((e=>{var t=j0();function s(j,k){return j===k&&(j!==0||1/j===1/k)||j!==j&&k!==k}r(s,"is");var l=typeof Object.is=="function"?Object.is:s,c=t.useState,u=t.useEffect,p=t.useLayoutEffect,f=t.useDebugValue;function h(j,k){var S=k(),N=c({inst:{value:S,getSnapshot:k}}),I=N[0].inst,C=N[1];return p(function(){I.value=S,I.getSnapshot=k,g(I)&&C({inst:I})},[j,S,k]),u(function(){return g(I)&&C({inst:I}),j(function(){g(I)&&C({inst:I})})},[j]),f(S),S}r(h,"useSyncExternalStore$2");function g(j){var k=j.getSnapshot;j=j.value;try{var S=k();return!l(j,S)}catch{return!0}}r(g,"checkIfSnapshotChanged");function v(j,k){return k()}r(v,"useSyncExternalStore$1");var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?v:h;e.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y})),RM=go(((e,t)=>{t.exports=TM()})),MM=RM(),DM=r((e,t)=>{if(Yr(t))return t;if(vM(t)&&Yr(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const s=e[e.length-1];return typeof s=="function"?"":s}return e},"notReadyT"),OM={t:DM,ready:!1},LM=r(()=>()=>{},"dummySubscribe"),zM=r((e,t={})=>{const{i18n:s}=t,{i18n:l,defaultNS:c}=(0,x.useContext)(EM)||{},u=s||l||AM();u&&!u.reportNamespaces&&(u.reportNamespaces=new IM),u||zd(u,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const p=(0,x.useMemo)(()=>({...NM(),...u?.options?.react,...t}),[u,t]),{useSuspense:f,keyPrefix:h}=p,g=e||c||u?.options?.defaultNS,v=Yr(g)?[g]:g||["translation"],y=(0,x.useMemo)(()=>v,v);u?.reportNamespaces?.addUsedNamespaces?.(y);const j=(0,x.useRef)(0),k=(0,x.useCallback)(B=>{if(!u)return LM;const{bindI18n:O,bindI18nStore:Q}=p,V=r(()=>{j.current+=1,B()},"wrappedCallback");return O&&u.on(O,V),Q&&u.store.on(Q,V),()=>{O&&O.split(" ").forEach(ue=>u.off(ue,V)),Q&&Q.split(" ").forEach(ue=>u.store.off(ue,V))}},[u,p]),S=(0,x.useRef)(),N=(0,x.useCallback)(()=>{if(!u)return OM;const B=!!(u.isInitialized||u.initializedStoreOnce)&&y.every(ce=>bM(ce,u,p)),O=t.lng||u.language,Q=j.current,V=S.current;if(V&&V.ready===B&&V.lng===O&&V.keyPrefix===h&&V.revision===Q)return V;const ue={t:u.getFixedT(O,p.nsMode==="fallback"?y:y[0],h,{scopeNs:y}),ready:B,lng:O,keyPrefix:h,revision:Q};return S.current=ue,ue},[u,y,h,p,t.lng]),[I,C]=(0,x.useState)(0),{t:M,ready:R}=(0,MM.useSyncExternalStore)(k,N,N);(0,x.useEffect)(()=>{if(u&&!R&&!f){const B=r(()=>C(O=>O+1),"onLoaded");t.lng?kj(u,t.lng,y,B):Ng(u,y,B)}},[u,t.lng,y,R,f,I]);const _=u||{},D=(0,x.useRef)(null),U=(0,x.useRef)(),K=r(B=>`${B.language}|${B.resolvedLanguage}|${B.languages?.join(",")}`,"languageKey"),z=r(B=>{const O=Object.getOwnPropertyDescriptors(B);O.__original&&delete O.__original;const Q=Object.create(Object.getPrototypeOf(B),O);if(!Object.prototype.hasOwnProperty.call(Q,"__original"))try{Object.defineProperty(Q,"__original",{value:B,writable:!1,enumerable:!1,configurable:!1})}catch{}return Q},"createI18nWrapper"),E=(0,x.useMemo)(()=>{const B=_,O=B&&K(B);let Q=B;B&&(D.current&&D.current.__original===B?U.current!==O?(Q=z(B),D.current=Q,U.current=O):Q=D.current:(Q=z(B),D.current=Q,U.current=O));const V=!R&&!f?(...ce)=>(zd(u,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),M(...ce)):M,ue=[V,Q,R];return ue.t=V,ue.i18n=Q,ue.ready=R,ue},[M,_,R,_.resolvedLanguage,_.language,_.languages]);if(u&&f&&!R){let B=!1;try{B=!1}catch{}throw B&&zd(u,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),new Promise(O=>{const Q=r(()=>O(),"onLoaded");t.lng?kj(u,t.lng,y,Q):Ng(u,y,Q)})}return E},"useTranslation$1"),PM={noCompanies:{title:"أنشئ شركتك الأولى",description:"ابدأ بإنشاء شركة.",newCompany:"شركة جديدة"}},$M={app:PM},UM={noCompanies:{title:"আপনার প্রথম কোম্পানি তৈরি করুন",description:"একটি কোম্পানি তৈরি করে শুরু করুন।",newCompany:"নতুন কোম্পানি"}},BM={app:UM},KM={noCompanies:{title:"Vytvořte svou první společnost",description:"Začněte vytvořením společnosti.",newCompany:"Nová společnost"}},qM={app:KM},FM={noCompanies:{title:"Opret din første virksomhed",description:"Kom i gang ved at oprette en virksomhed.",newCompany:"Ny virksomhed"}},HM={app:FM},VM={noCompanies:{title:"Erstellen Sie Ihr erstes Unternehmen",description:"Beginnen Sie, indem Sie ein Unternehmen erstellen.",newCompany:"Neues Unternehmen"}},WM={app:VM},QM={noCompanies:{title:"Δημιουργήστε την πρώτη σας εταιρεία",description:"Ξεκινήστε δημιουργώντας μια εταιρεία.",newCompany:"Νέα εταιρεία"}},GM={app:QM},YM={noCompanies:{title:"Create your first organization",description:"Get started by creating an organization.",newCompany:"New Organization"}},G0={app:YM},XM={noCompanies:{title:"Crea tu primera empresa",description:"Comienza creando una empresa.",newCompany:"Nueva empresa"}},ZM={app:XM},JM={noCompanies:{title:"اولین شرکت خود را ایجاد کنید",description:"با ایجاد یک شرکت شروع کنید.",newCompany:"شرکت جدید"}},eD={app:JM},tD={noCompanies:{title:"Luo ensimmäinen yrityksesi",description:"Aloita luomalla yritys.",newCompany:"Uusi yritys"}},nD={app:tD},aD={noCompanies:{title:"Gumawa ng iyong unang kumpanya",description:"Magsimula sa paggawa ng kumpanya.",newCompany:"Bagong Kumpanya"}},sD={app:aD},iD={noCompanies:{title:"Créez votre première entreprise",description:"Commencez par créer une entreprise.",newCompany:"Nouvelle entreprise"}},rD={app:iD},lD={noCompanies:{title:"צרו את החברה הראשונה שלכם",description:"התחילו ביצירת חברה.",newCompany:"חברה חדשה"}},oD={app:lD},cD={noCompanies:{title:"अपनी पहली कंपनी बनाएं",description:"कंपनी बनाकर शुरुआत करें.",newCompany:"नई कंपनी"}},uD={app:cD},dD={noCompanies:{title:"Hozza létre első vállalatát",description:"Kezdje egy vállalat létrehozásával.",newCompany:"Új vállalat"}},fD={app:dD},pD={noCompanies:{title:"Buat perusahaan pertama Anda",description:"Mulai dengan membuat perusahaan.",newCompany:"Perusahaan Baru"}},mD={app:pD},hD={noCompanies:{title:"Crea la tua prima azienda",description:"Inizia creando un'azienda.",newCompany:"Nuova azienda"}},gD={app:hD},xD={noCompanies:{title:"最初の会社を作成",description:"会社を作成して始めましょう。",newCompany:"新しい会社"}},bD={app:xD},vD={noCompanies:{title:"첫 회사를 만드세요",description:"회사를 만들어 시작하세요.",newCompany:"새 회사"}},yD={app:vD},jD={noCompanies:{title:"तुमची पहिली कंपनी तयार करा",description:"कंपनी तयार करून सुरुवात करा.",newCompany:"नवीन कंपनी"}},wD={app:jD},kD={noCompanies:{title:"Cipta syarikat pertama anda",description:"Mulakan dengan mencipta syarikat.",newCompany:"Syarikat Baharu"}},SD={app:kD},ND={noCompanies:{title:"Opprett ditt første selskap",description:"Kom i gang ved å opprette et selskap.",newCompany:"Nytt selskap"}},CD={app:ND},AD={noCompanies:{title:"Maak uw eerste bedrijf aan",description:"Begin door een bedrijf aan te maken.",newCompany:"Nieuw bedrijf"}},_D={app:AD},ED={noCompanies:{title:"ਆਪਣੀ ਪਹਿਲੀ ਕੰਪਨੀ ਬਣਾਓ",description:"ਕੰਪਨੀ ਬਣਾਕੇ ਸ਼ੁਰੂ ਕਰੋ।",newCompany:"ਨਵੀਂ ਕੰਪਨੀ"}},ID={app:ED},TD={noCompanies:{title:"Utwórz swoją pierwszą firmę",description:"Zacznij od utworzenia firmy.",newCompany:"Nowa firma"}},RD={app:TD},MD={noCompanies:{title:"Crie sua primeira empresa",description:"Comece criando uma empresa.",newCompany:"Nova empresa"}},DD={app:MD},OD={noCompanies:{title:"Crie a sua primeira empresa",description:"Comece por criar uma empresa.",newCompany:"Nova empresa"}},LD={app:OD},zD={noCompanies:{title:"Creați prima companie",description:"Începeți prin crearea unei companii.",newCompany:"Companie nouă"}},PD={app:zD},$D={noCompanies:{title:"Создайте свою первую компанию",description:"Начните с создания компании.",newCompany:"Новая компания"}},UD={app:$D},BD={noCompanies:{title:"Skapa ditt första företag",description:"Kom igång genom att skapa ett företag.",newCompany:"Nytt företag"}},KD={app:BD},qD={noCompanies:{title:"Unda kampuni yako ya kwanza",description:"Anza kwa kuunda kampuni.",newCompany:"Kampuni Mpya"}},FD={app:qD},HD={noCompanies:{title:"உங்கள் முதல் நிறுவனத்தை உருவாக்குங்கள்",description:"ஒரு நிறுவனத்தை உருவாக்கி தொடங்குங்கள்.",newCompany:"புதிய நிறுவனம்"}},VD={app:HD},WD={noCompanies:{title:"మీ మొదటి కంపెనీని సృష్టించండి",description:"కంపెనీని సృష్టించడం ద్వారా ప్రారంభించండి.",newCompany:"కొత్త కంపెనీ"}},QD={app:WD},GD={noCompanies:{title:"สร้างบริษัทแรกของคุณ",description:"เริ่มต้นด้วยการสร้างบริษัท",newCompany:"บริษัทใหม่"}},YD={app:GD},XD={noCompanies:{title:"İlk şirketinizi oluşturun",description:"Bir şirket oluşturarak başlayın.",newCompany:"Yeni Şirket"}},ZD={app:XD},JD={noCompanies:{title:"Створіть свою першу компанію",description:"Почніть зі створення компанії.",newCompany:"Нова компанія"}},e5={app:JD},t5={noCompanies:{title:"اپنی پہلی کمپنی بنائیں",description:"کمپنی بنا کر شروع کریں۔",newCompany:"نئی کمپنی"}},n5={app:t5},a5={noCompanies:{title:"Tạo công ty đầu tiên của bạn",description:"Bắt đầu bằng cách tạo một công ty.",newCompany:"Công ty mới"}},s5={app:a5},i5={noCompanies:{title:"创建您的第一家公司",description:"通过创建公司开始。",newCompany:"新公司"}},r5={app:i5},l5={noCompanies:{title:"建立您的第一家公司",description:"從建立公司開始。",newCompany:"新公司"}},o5={app:l5},c5=2e3;function Sj(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}r(Sj,"isPlainObject");function lr(e){return e.length>0?e.join("."):"<root>"}r(lr,"formatPath");function Nj(e){return Array.from(e.matchAll(/{{\s*([A-Za-z0-9_.-]+)\s*}}/g),t=>t[1]).sort()}r(Nj,"interpolationPlaceholders");function Cj(e){return/<\/?[A-Za-z][A-Za-z0-9:-]*(?:\s[^>]*)?>/.test(e)}r(Cj,"hasRawHtml");function Aj(e){return/\son[A-Za-z]+\s*=/i.test(e)}r(Aj,"hasEventHandlerAttribute");function _j(e){return Array.from(e.matchAll(/\bhttps?:\/\/[^\s<>"')]+/gi),t=>t[0]).sort()}r(_j,"urlsIn");function u5(e,t){const s=[[/<script\b/i.test(e),/<script\b/i.test(t),"<script"],[Aj(e),Aj(t),"event-handler attribute"],[/\bjavascript\s*:/i.test(e),/\bjavascript\s*:/i.test(t),"javascript:"],[/\bdata\s*:/i.test(e),/\bdata\s*:/i.test(t),"data:"],[Cj(e),Cj(t),"raw HTML tag"]].filter(([c,u])=>c&&!u).map(([,,c])=>c),l=new Set(_j(t));return _j(e).find(c=>!l.has(c))&&s.push("unexpected URL"),s}r(u5,"hasBlockedData");function d5(e,t,s,l){const c=Nj(t),u=Nj(s);c.join("\0")!==u.join("\0")&&l.push(`${lr(e)} interpolation placeholders must match English exactly: expected ${JSON.stringify(u)}, received ${JSON.stringify(c)}`);for(const h of u5(t,s))l.push(`${lr(e)} contains disallowed ${h}`);const p=Math.max(s.length*4+64,s.length+128),f=Math.min(c5,p);t.length>f&&l.push(`${lr(e)} is too long: ${t.length} characters exceeds ${f}`)}r(d5,"validateString");function DN(e,t,s,l){if(typeof s=="string"){if(typeof t!="string"){l.push(`${lr(e)} must be a string`);return}d5(e,t,s,l);return}if(!Sj(s)){l.push(`${lr(e)} has unsupported English reference type`);return}if(!Sj(t)){l.push(`${lr(e)} must be an object`);return}const c=Object.keys(s).sort(),u=Object.keys(t).sort(),p=c.filter(h=>!u.includes(h)),f=u.filter(h=>!c.includes(h));for(const h of p)l.push(`${lr([...e,h])} is missing`);for(const h of f)l.push(`${lr([...e,h])} is not defined in English`);for(const h of c)h in t&&DN([...e,h],t[h],s[h],l)}r(DN,"validateNode");function f5(e,t=G0){const s=[];return DN([],e,t,s),s}r(f5,"validateLocaleMessages");function p5(e,t=G0){const s=f5(e,t);if(s.length>0)throw new Error(`Invalid locale messages:
|
|
3
3
|
${s.join(`
|
|
4
4
|
`)}`)}r(p5,"assertValidLocaleMessages");var m5=Object.assign({"./locales/ar.json":$M,"./locales/bn.json":BM,"./locales/cs.json":qM,"./locales/da.json":HM,"./locales/de.json":WM,"./locales/el.json":GM,"./locales/en.json":G0,"./locales/es.json":ZM,"./locales/fa.json":eD,"./locales/fi.json":nD,"./locales/fil.json":sD,"./locales/fr.json":rD,"./locales/he.json":oD,"./locales/hi.json":uD,"./locales/hu.json":fD,"./locales/id.json":mD,"./locales/it.json":gD,"./locales/ja.json":bD,"./locales/ko.json":yD,"./locales/mr.json":wD,"./locales/ms.json":SD,"./locales/nb.json":CD,"./locales/nl.json":_D,"./locales/pa.json":ID,"./locales/pl.json":RD,"./locales/pt-BR.json":DD,"./locales/pt-PT.json":LD,"./locales/ro.json":PD,"./locales/ru.json":UD,"./locales/sv.json":KD,"./locales/sw.json":FD,"./locales/ta.json":VD,"./locales/te.json":QD,"./locales/th.json":YD,"./locales/tr.json":ZD,"./locales/uk.json":e5,"./locales/ur.json":n5,"./locales/vi.json":s5,"./locales/zh-CN.json":r5,"./locales/zh-TW.json":o5}),Kf=Object.fromEntries(Object.entries(m5).map(([e,t])=>{const s=e.match(/\/([A-Za-z0-9_-]+)\.json$/)?.[1];if(!s)throw new Error(`Invalid locale file path: ${e}`);return[s,t]}));if(!("en"in Kf))throw new Error("Missing default locale messages for en");for(const[e,t]of Object.entries(Kf))try{p5(t)}catch(s){const l=s instanceof Error?s.message:String(s);throw new Error(`Invalid ${e} locale messages: ${l}`)}var h5=Object.keys(Kf),g5=Object.fromEntries(Object.entries(Kf).map(([e,t])=>[e,{translation:t}])),x5={resources:g5,lng:"en",fallbackLng:"en",supportedLngs:h5,defaultNS:"translation",interpolation:{escapeValue:!1},returnObjects:!1,initAsync:!1};Da.use(_M).init(x5).catch(e=>{});var ON=zM,a=b0(OE(),1);function Ej({collapsible:e,headerAction:t,label:s,menu:l}){const{isMobile:c}=Jn(),[u,p]=(0,x.useState)(!1),f=!!(l&&((l.actions?.length??0)>0||(l.radioChoices?.length??0)>0)),h="text-(length:--text-nano) font-medium uppercase tracking-widest font-mono text-ink-3/60",g=c?"opacity-100":"opacity-0 group-hover/sidebar-section:opacity-100 group-focus-within/sidebar-section:opacity-100",v=Y("h-3 w-3 shrink-0 text-ink-3/60 transition-all",g,e?.open&&"rotate-90",u&&"opacity-100"),y=Y("h-5 w-5 shrink-0 text-ink-3/60 transition-opacity hover:text-ink data-[state=open]:opacity-100",g),j=(0,a.jsx)("span",{className:h,children:s}),k=t?.icon,S=f?(0,a.jsxs)(tl,{open:u,onOpenChange:p,children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsx)("button",{type:"button","data-slot":"icon-button",className:Y("inline-flex min-w-0 max-w-full items-center rounded-md px-1 py-0.5 text-left outline-none transition-colors","hover:bg-bg-3/50 focus-visible:bg-bg-3/50 focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1",u&&"bg-bg-3/50"),"aria-label":l?.ariaLabel??`${s} actions`,children:j})}),(0,a.jsxs)(el,{align:"start",className:"w-48",children:[l?.actions?.map((N,I)=>{if(N.type==="separator")return(0,a.jsx)(Ii,{},`separator-${I}`);const C=N.icon,M=(0,a.jsxs)(a.Fragment,{children:[C?(0,a.jsx)(C,{className:"size-4"}):null,(0,a.jsx)("span",{children:N.label})]});return N.href?(0,a.jsx)(Sn,{asChild:!0,children:(0,a.jsx)(mn,{to:N.href,children:M})},`${N.label}-${I}`):(0,a.jsx)(Sn,{onSelect:N.onSelect,children:M},`${N.label}-${I}`)}),l?.radioChoices&&l.radioChoices.length>0?(0,a.jsx)(CI,{value:l.radioValue,onValueChange:l.onRadioValueChange,"aria-label":l.radioLabel,children:l.radioChoices.map(N=>(0,a.jsx)(AI,{value:N.value,children:N.label},N.value))}):null]})]}):(0,a.jsx)("div",{className:"inline-flex min-w-0 max-w-full items-center px-1 py-0.5",children:j});return(0,a.jsx)("div",{className:"group/sidebar-section px-3 py-1.5 pointer-coarse:py-1",children:(0,a.jsxs)("div",{className:"relative flex min-h-6 min-w-0 items-center gap-1",children:[e?(0,a.jsx)(SI,{asChild:!0,children:(0,a.jsx)("button",{type:"button","data-slot":"icon-button",className:"absolute -left-4 flex h-5 w-5 items-center justify-center rounded-sm outline-none transition-colors hover:bg-bg-3 focus-visible:ring-2 focus-visible:ring-focus focus-visible:ring-offset-1","aria-label":e.open?`Collapse ${s}`:`Expand ${s}`,children:(0,a.jsx)(ur,{className:v,"aria-hidden":"true"})})}):null,S,t&&k?(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",className:y,"aria-label":t.ariaLabel,onClick:t.onClick,children:(0,a.jsx)(k,{className:"h-3.5 w-3.5"})}):null]})})}r(Ej,"SidebarSectionHeader");function af({label:e,children:t,collapsible:s,menu:l,headerAction:c}){const{collapsed:u,peeking:p}=Jn(),f=F3(),h=u&&!p&&!f,g=(0,a.jsx)("div",{className:"flex flex-col gap-0.5 mt-0.5",children:t});return h?(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"px-3 py-1.5 pointer-coarse:py-1",children:(0,a.jsxs)("div",{className:"flex min-h-6 items-center",children:[(0,a.jsx)("span",{className:"sr-only",children:e}),(0,a.jsx)("div",{className:"h-px w-full bg-line/60","aria-hidden":"true"})]})}),g]}):s?(0,a.jsxs)(kS,{open:s.open,onOpenChange:s.onOpenChange,children:[(0,a.jsx)(Ej,{label:e,collapsible:s,menu:l,headerAction:c}),(0,a.jsx)(wS,{children:g})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)(Ej,{label:e,menu:l,headerAction:c}),g]})}r(af,"SidebarSection");var LN=(0,x.createContext)(null),b5=LN.Provider;function qf(e){const t=(0,x.useContext)(LN);return t&&(!e||t.companyId===e)?t:null}r(qf,"usePrimaryAgentPresentation");function kG({agentId:e,companyId:t}){const s=qf(t);return!s||s.loading||s.primaryAgentId!==e?null:(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("span",{role:"img","aria-label":"My primary agent",className:"inline-flex shrink-0 text-accent",children:(0,a.jsx)(yS,{"aria-hidden":"true",className:"size-3.5"})})}),(0,a.jsx)(Ts,{children:"My primary agent"})]})}r(kG,"PrimaryAgentIndicator");function SG({agent:e}){const t=qf(e.companyId);if(!t||e.status==="terminated"||e.status==="pending_approval")return null;if(t.error)return(0,a.jsx)(oe,{type:"button",variant:"danger",size:"sm",onClick:t.onRetry,className:"h-auto justify-start p-0 text-xs",children:"Retry loading primary agent"});const s=t.primaryAgentId===e.id,l=t.pendingAgentId===e.id;if(s&&!l&&!t.loading)return null;const c=t.primaryAgent?.id===t.primaryAgentId?t.primaryAgent:null,u=t.loading||!!(t.primaryAgentId&&!c),p=u||!!t.pendingAgentId,f=(0,a.jsxs)(oe,{type:"button",variant:"link",size:"sm",disabled:p,onClick:t.primaryAgentId?void 0:()=>t.onChange(e.id),className:"h-auto justify-start p-0 text-xs",children:[l||u?(0,a.jsx)(Ma,{"aria-hidden":"true",className:"size-3 motion-safe:animate-spin"}):null,u?"Loading primary…":l?"Setting primary…":"Set as my primary"]});return c?(0,a.jsxs)(TS,{children:[(0,a.jsx)(NI,{asChild:!0,children:f}),(0,a.jsxs)(CS,{children:[(0,a.jsxs)("div",{className:"flex items-start justify-center gap-5 pt-2",children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-center gap-2 text-center",children:[(0,a.jsx)(mr,{agent:c,size:64,label:`${c.name} avatar`}),(0,a.jsx)("span",{className:"max-w-full break-words text-sm font-medium",children:c.name})]}),(0,a.jsx)(PI,{"aria-hidden":"true",className:"mt-5 size-6 shrink-0 text-ink-3"}),(0,a.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-center gap-2 text-center",children:[(0,a.jsx)(mr,{agent:e,size:64,label:`${e.name} avatar`,className:"rounded-xl ring-1 ring-accent ring-offset-2 ring-offset-bg"}),(0,a.jsxs)("span",{className:"flex max-w-full items-center justify-center gap-1.5 text-sm font-medium",children:[(0,a.jsx)("span",{className:"min-w-0 break-words",children:e.name}),(0,a.jsx)("span",{role:"img","aria-label":"New primary agent",className:"inline-flex shrink-0 text-accent",children:(0,a.jsx)(yS,{"aria-hidden":"true",className:"size-3.5"})})]})]})]}),(0,a.jsxs)(IS,{children:[(0,a.jsx)(NS,{children:"Change your primary agent?"}),(0,a.jsxs)(SS,{className:"break-words",children:["This will make ",e.name," your primary agent, do you want to do this?"]})]}),(0,a.jsxs)(_S,{className:"flex-row justify-between sm:justify-between",children:[(0,a.jsx)(ES,{children:"Cancel"}),(0,a.jsx)(AS,{disabled:p,onClick:r(()=>t.onChange(e.id),"onClick"),children:"Set as my primary"})]})]})]},c.id):f}r(SG,"SetPrimaryAgentButton");var zN=(0,x.createContext)(null),PN=(0,x.createContext)(null);function v5({children:e}){const[t,s]=(0,x.useState)(!1),[l,c]=(0,x.useState)({}),[u,p]=(0,x.useState)(!1),[f,h]=(0,x.useState)(!1),[g,v]=(0,x.useState)({}),[y,j]=(0,x.useState)(!1),[k,S]=(0,x.useState)(!1),[N,I]=(0,x.useState)({}),[C,M]=(0,x.useState)(!1),R=(0,x.useCallback)((ce={})=>{c(ce),s(!0)},[]),_=(0,x.useCallback)(()=>{s(!1),c({})},[]),D=(0,x.useCallback)(()=>{p(!0)},[]),U=(0,x.useCallback)(()=>{p(!1)},[]),K=(0,x.useCallback)((ce={})=>{v(ce),h(!0)},[]),z=(0,x.useCallback)(()=>{h(!1),v({})},[]),E=(0,x.useCallback)(()=>{j(!0)},[]),B=(0,x.useCallback)(()=>{j(!1)},[]),O=(0,x.useCallback)((ce={})=>{I(ce),S(!0)},[]),Q=(0,x.useCallback)(()=>{S(!1),I({})},[]),V=(0,x.useMemo)(()=>({newIssueOpen:t,newIssueDefaults:l,newProjectOpen:u,newGoalOpen:f,newGoalDefaults:g,newAgentOpen:y,onboardingOpen:k,onboardingOptions:N,onboardingRouteDismissed:C}),[t,l,u,f,g,y,k,N,C]),ue=(0,x.useMemo)(()=>({openNewIssue:R,closeNewIssue:_,openNewProject:D,closeNewProject:U,openNewGoal:K,closeNewGoal:z,openNewAgent:E,closeNewAgent:B,openOnboarding:O,closeOnboarding:Q,setOnboardingRouteDismissed:M}),[R,_,D,U,K,z,E,B,O,Q,M]);return(0,a.jsx)(PN.Provider,{value:ue,children:(0,a.jsx)(zN.Provider,{value:V,children:e})})}r(v5,"DialogProvider");function Us(){const e=(0,x.useContext)(PN);if(!e)throw new Error("useDialogActions must be used within DialogProvider");return e}r(Us,"useDialogActions");function Ff(){const e=(0,x.useContext)(zN);if(!e)throw new Error("useDialogState must be used within DialogProvider");return e}r(Ff,"useDialogState");function Vc(){return{...Ff(),...Us()}}r(Vc,"useDialog");var y5={list:r(e=>je.get(`/companies/${e}/built-in-agents`),"list"),provision:r((e,t,s={})=>je.post(`/companies/${e}/built-in-agents/${t}/provision`,s),"provision"),reset:r((e,t,s)=>je.post(`/companies/${e}/built-in-agents/${t}/reset`,s?{resources:s}:{}),"reset"),reconcile:r((e,t)=>je.post(`/companies/${e}/built-in-agents/${t}/reconcile`,{}),"reconcile"),runRoutine:r((e,t,s)=>je.post(`/companies/${e}/built-in-agents/${t}/routines/${s}/run`,{}),"runRoutine"),enableRoutineSchedule:r((e,t,s)=>je.post(`/companies/${e}/built-in-agents/${t}/routines/${s}/enable`,{}),"enableRoutineSchedule"),disableRoutineSchedule:r((e,t,s)=>je.post(`/companies/${e}/built-in-agents/${t}/routines/${s}/disable`,{}),"disableRoutineSchedule")};function j5({status:e,compact:t=!1,className:s}){if(e!=="needs_setup"&&e!=="pending_approval")return null;const l=e==="pending_approval";return(0,a.jsx)(Dn,{variant:"outline",className:Y(dI.amber,t&&"px-1.5 py-0 text-(length:--text-nano)",s),title:l?"Waiting on board hire approval before the feature can run":"Needs adapter/model setup before the feature can run",children:l?t?"Approval":"Pending approval":t?"Setup":"Needs setup"})}r(j5,"BuiltInLifecycleChip");function ch(e,t){if(e.length!==t.length)return!1;for(let s=0;s<e.length;s+=1)if(e[s]!==t[s])return!1;return!0}r(ch,"areEqual$2");function uh(e,t,s){return dg(e,t,s).map(l=>l.id)}r(uh,"buildOrderIds$2");function w5({agents:e,companyId:t,userId:s}){const l=(0,x.useMemo)(()=>({leadershipFirst:!0}),[]),c=(0,x.useMemo)(()=>t?eT(t,s):null,[t,s]),[u,p]=(0,x.useState)(()=>c?uh(e,nh(c),l):e.map(f=>f.id));return(0,x.useEffect)(()=>{const f=c?uh(e,nh(c),l):e.map(h=>h.id);p(h=>ch(h,f)?h:f)},[e,c,l]),(0,x.useEffect)(()=>{if(!c)return;const f=r(v=>{const y=uh(e,v,l);p(j=>ch(j,y)?j:y)},"syncFromIds"),h=r(v=>{v.key===c&&f(nh(c))},"onStorage"),g=r(v=>{const y=v.detail;!y||y.storageKey!==c||f(y.orderedIds)},"onCustomEvent");return window.addEventListener("storage",h),window.addEventListener(Yy,g),()=>{window.removeEventListener("storage",h),window.removeEventListener(Yy,g)}},[e,c,l]),{orderedAgents:(0,x.useMemo)(()=>dg(e,u,l),[e,u,l]),orderedIds:u,persistOrder:(0,x.useCallback)(f=>{const h=new Set(e.map(v=>v.id)),g=f.filter(v=>h.has(v));for(const v of dg(e,[],l))g.includes(v.id)||g.push(v.id);p(v=>ch(v,g)?v:g),c&&X3(c,g)},[e,c,l])}}r(w5,"useAgentOrder");var Ag={listMine:r(e=>je.get(`/companies/${e}/resource-memberships/me`),"listMine"),updateProject:r((e,t,s)=>je.put(`/companies/${e}/resource-memberships/me/projects/${t}`,s),"updateProject"),updateAgent:r((e,t,s)=>je.put(`/companies/${e}/resource-memberships/me/agents/${t}`,s),"updateAgent")};function k5(){return{projectMemberships:{},agentMemberships:{},starredProjectIds:[],starredAgentIds:[],starredDocumentIds:[],projectStarredAt:{},agentStarredAt:{},documentStarredAt:{},updatedAt:null}}r(k5,"emptyMemberships");function S5(e){return e==="project"?{ids:"starredProjectIds",at:"projectStarredAt",state:"projectMemberships"}:{ids:"starredAgentIds",at:"agentStarredAt",state:"agentMemberships"}}r(S5,"starKeys");function Ij(e,t,s,l){const c=e??k5(),u=S5(t),p=c[u.state]??{},f=p[s]==="left"?"left":"joined",h=l.starred===!0?"joined":l.state??f,g=c[u.ids]??[],v={...c[u.at]??{}},y=g.includes(s),j=h==="left"?!1:l.starred===!0?!0:l.starred===!1?!1:y;let k=g;return j&&!y?(k=[s,...g],v[s]=new Date):!j&&y&&(k=g.filter(S=>S!==s),delete v[s]),{...c,[u.state]:{...p,[s]:h},[u.ids]:k,[u.at]:v,updatedAt:new Date}}r(Ij,"applyMembershipChange");function $N(e,t,s){return(t==="project"?e?.projectMemberships[s]:e?.agentMemberships[s])==="left"?"left":"joined"}r($N,"resourceMembershipState");function UN(e,t,s){const l=t==="project"?e?.starredProjectIds:t==="agent"?e?.starredAgentIds:e?.starredDocumentIds;return Array.isArray(l)&&l.includes(s)}r(UN,"isStarred");function BN(e,t){const s=t==="project"?e?.starredProjectIds:t==="agent"?e?.starredAgentIds:e?.starredDocumentIds;return Array.isArray(s)?s:[]}r(BN,"starredResourceIds");function Y0(e){return me({queryKey:$.resourceMemberships.mine(e??"__none__"),queryFn:r(()=>Ag.listMine(e),"queryFn"),enabled:!!e})}r(Y0,"useResourceMemberships");function KN(e){const t=kn(),{pushToast:s}=Ri(),l=$.resourceMemberships.mine(e??"__none__");return Bt({mutationFn:r(c=>{if(!e)throw new Error("Select an organization first.");const u={state:c.state,starred:c.starred};return c.resourceType==="project"?Ag.updateProject(e,c.resourceId,u):Ag.updateAgent(e,c.resourceId,u)},"mutationFn"),onMutate:r(async c=>{await t.cancelQueries({queryKey:l});const u=t.getQueryData(l);return t.setQueryData(l,Ij(u,c.resourceType,c.resourceId,{state:c.state,starred:c.starred})),{previous:u}},"onMutate"),onError:r((c,u,p)=>{p?.previous&&t.setQueryData(l,p.previous);const f=u.starred!==void 0?u.starred?"star":"unstar":u.state==="left"?"leave":"join";s({title:`Couldn't ${f} ${u.resourceName}.`,body:c instanceof Error?c.message:"Try again.",tone:"error"})},"onError"),onSuccess:r((c,u)=>{t.setQueryData(l,p=>Ij(p,u.resourceType,c.resourceId,{state:c.state,starred:c.starredAt!=null}))},"onSuccess"),onSettled:r(()=>{t.invalidateQueries({queryKey:["primary-agent",e]}),t.invalidateQueries({queryKey:l})},"onSettled")})}r(KN,"useResourceMembershipMutation");var N5={healthy:"bg-emerald-500/90 text-white",warning:"bg-amber-500/95 text-amber-950",critical:"bg-red-500/90 text-white"},C5={healthy:"Budget healthy",warning:"Budget warning",critical:"Paused by budget"};function qN({title:e,level:t="critical"}){const s=e??C5[t];return(0,a.jsx)("span",{title:s,"aria-label":s,className:`ml-auto inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full shadow-(--shadow-extract-3) ${N5[t]}`,children:(0,a.jsx)(S1,{className:"h-3 w-3"})})}r(qN,"BudgetSidebarMarker");var A5="opacity-100 sm:opacity-0 sm:transition-opacity sm:group-hover:opacity-100 sm:group-focus-within:opacity-100";function FN({starred:e,resourceName:t,pending:s=!1,error:l=!1,size:c="row",onToggle:u,quiet:p=!1,className:f,revealClassName:h}){const g=e?`Unstar ${t}`:`Star ${t}`,v=s?Ma:w0;function y(j){j.preventDefault(),j.stopPropagation(),!s&&u(!e)}return r(y,"handleClick"),c==="button"?(0,a.jsx)(oe,{type:"button",size:"icon-sm",variant:"ghost","aria-label":g,"aria-pressed":e,"aria-busy":s?"true":void 0,disabled:s,onClick:y,title:l?"Couldn't save — retry":void 0,className:f,children:(0,a.jsx)(v,{className:Y("h-4 w-4",s&&"motion-safe:animate-spin",!s&&l&&"text-bad",!s&&e&&!l&&"fill-amber-500 text-amber-500",!s&&l&&"text-red-500")})}):(0,a.jsx)(oe,{type:"button",size:"icon-xs",variant:"ghost","aria-label":g,"aria-pressed":e,"aria-busy":s?"true":void 0,disabled:s,onClick:y,title:l?"Couldn't save — retry":void 0,className:Y("h-6 w-6 shrink-0",l||s||e&&!p?"opacity-100":h??A5,f),children:(0,a.jsx)(v,{className:Y("h-3.5 w-3.5",s&&"motion-safe:animate-spin",!s&&l&&"text-red-500",!s&&!l&&e&&"fill-amber-500 text-amber-500",!s&&!l&&!e&&"text-ink-3")})})}r(FN,"StarToggle");var _5=3,Tj=12e4,E5=[{value:"top",label:"Top"},{value:"alphabetical",label:"Alphabetical"},{value:"recent",label:"Recent"}];function Fl(e,t){const s=e[t];if(!s)return 0;const l=new Date(s).getTime();return Number.isFinite(l)?l:0}r(Fl,"agentTimestamp");function Rj(e,t){if(t==="top")return e;const s=[...e];return t==="alphabetical"?(s.sort((l,c)=>l.name.localeCompare(c.name,void 0,{sensitivity:"base"})),s):(s.sort((l,c)=>{const u=Fl(c,"lastHeartbeatAt")-Fl(l,"lastHeartbeatAt");if(u!==0)return u;const p=Fl(c,"updatedAt")-Fl(l,"updatedAt");if(p!==0)return p;const f=Fl(c,"createdAt")-Fl(l,"createdAt");return f!==0?f:l.name.localeCompare(c.name,void 0,{sensitivity:"base"})}),s)}r(Rj,"sortAgents");var I5="opacity-0 transition-opacity group-hover/agent:opacity-100 group-focus-within/agent:opacity-100";function T5({activeAgentId:e,activeTab:t,agent:s,disabled:l,isMobile:c,leaving:u,onLeaveAgent:p,onPauseResume:f,rail:h,runCount:g,setSidebarOpen:v,builtInStatus:y,starred:j=!1,onToggleStar:k,starPending:S=!1}){const N=fr(s),I=t?`${Od(s)}/${t}`:Od(s),C=`${Od(s)}/configuration`,M=e===N,R=s.status==="paused",_=R&&s.pauseReason==="budget",D=s.orgChainHealth?.status==="invalid_org_chain",U=R?"Resume agent":"Pause agent",K=l||s.status==="pending_approval"||_||R&&D,z=l?"Updating...":_?"Budget paused":R&&D?"Invalid org chain":U,E=y==="needs_setup"||y==="pending_approval",B=[E?`Built-in agent ${y.replace(/_/g," ")}`:null,D?"Invalid reporting chain":null].filter(Boolean).join(", ")||void 0,O=(0,a.jsx)(Ge,{to:I,label:s.name,iconNode:(0,a.jsx)(mr,{agent:s,size:16,className:"shrink-0 h-4 w-4"}),active:M,liveCount:g,labelClassName:E?"min-w-(--sz-4_5rem) flex-initial":void 0,className:Y("min-w-0 flex-1",j&&!c?"pr-14":"pr-8"),trailing:E||D?(0,a.jsxs)("span",{className:"ml-1 flex shrink-0 items-center gap-1",children:[E?(0,a.jsx)(j5,{status:y,compact:!0}):null,D?(0,a.jsx)(ai,{className:"h-3.5 w-3.5 shrink-0 text-amber-500","aria-label":"Invalid reporting chain"}):null]}):void 0,trailingLabel:B,liveAccessory:s.pauseReason==="budget"?(0,a.jsx)(qN,{title:"Agent paused by budget"}):void 0});return h?O:(0,a.jsxs)("div",{className:"group/agent relative flex items-center",children:[O,j&&!c&&k?(0,a.jsx)("span",{className:"absolute right-10 top-1/2 -translate-y-1/2",children:(0,a.jsx)(FN,{size:"row",quiet:!0,starred:!0,pending:S,resourceName:s.name,onToggle:r(()=>k(s,!1),"onToggle"),revealClassName:I5})}):null,(0,a.jsxs)(tl,{children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",className:Y("absolute right-3 top-1/2 h-6 w-6 -translate-y-1/2 transition-opacity data-[state=open]:pointer-events-auto data-[state=open]:opacity-100",c?"opacity-100":"pointer-events-none opacity-0 group-hover/agent:pointer-events-auto group-hover/agent:opacity-100 group-focus-within/agent:pointer-events-auto group-focus-within/agent:opacity-100"),"aria-label":`Open actions for ${s.name}`,children:(0,a.jsx)(Df,{className:"h-3.5 w-3.5"})})}),(0,a.jsxs)(el,{align:"end",className:"w-48",children:[k?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(Sn,{onClick:r(()=>{S||k(s,!j)},"onClick"),disabled:S,children:[S?(0,a.jsx)(Ma,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)(w0,{className:Y("size-4",j&&"fill-amber-500 text-amber-500")}),(0,a.jsx)("span",{children:j?"Remove from starred":"Star agent"})]}),(0,a.jsx)(Ii,{})]}):null,(0,a.jsx)(Sn,{asChild:!0,children:(0,a.jsxs)(mn,{to:C,onClick:r(()=>{c&&v(!1)},"onClick"),children:[(0,a.jsx)(V0,{className:"size-4"}),(0,a.jsx)("span",{children:"Edit agent"})]})}),(0,a.jsx)(Ii,{}),(0,a.jsxs)(Sn,{onClick:r(()=>{K||f(s,R?"resume":"pause")},"onClick"),disabled:K,title:_?"Agent was paused by budget limits":void 0,children:[R?(0,a.jsx)(b1,{className:"size-4"}):(0,a.jsx)(H0,{className:"size-4"}),(0,a.jsx)("span",{children:z})]}),(0,a.jsx)(Ii,{}),(0,a.jsxs)(Sn,{onClick:r(()=>{u||p(s)},"onClick"),disabled:u,children:[u?(0,a.jsx)(Ma,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)(Uf,{className:"size-4"}),(0,a.jsx)("span",{children:u?"Leaving...":"Leave agent"})]})]})]})]})}r(T5,"SidebarAgentItem");function R5({streamlined:e=!1}={}){const[t,s]=(0,x.useState)(!0),[l,c]=(0,x.useState)(()=>new Set),[u,p]=(0,x.useState)(0),f=(0,x.useRef)(new Map),h=kn(),{selectedCompanyId:g}=bt(),v=qf(g),{openNewAgent:y}=Us(),{isMobile:j,setSidebarOpen:k,collapsed:S,peeking:N}=Jn(),I=S&&!N,{pushToast:C}=Ri(),M=hn(),{data:R}=me({queryKey:$.agents.list(g),queryFn:r(()=>Ha.list(g),"queryFn"),enabled:!!g}),{data:_}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:!!g}),D=_?.enableBuiltInAgents===!0,{data:U}=me({queryKey:$.builtInAgents.list(g),queryFn:r(()=>y5.list(g),"queryFn"),enabled:!!g&&D}),K=(0,x.useMemo)(()=>{const P=new Map;if(!D)return P;for(const qe of U??[])qe.agentId&&P.set(qe.agentId,qe.status);return P},[U,D]),{data:z}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),E=Y0(g),B=KN(g),O=$.liveRuns(g),Q=_c({companyId:g,resourceKey:"live-runs",queryKey:O,enabled:!!g,refetchInterval:!1,leaderOnly:!0}),{data:V,dataUpdatedAt:ue}=me({queryKey:O,queryFn:r(()=>zf.liveRunsForCompany(g),"queryFn"),enabled:Q.enabled,refetchInterval:Q.refetchInterval});Ec(Q,V,ue);const ce=(0,x.useMemo)(()=>{const P=new Map;for(const qe of V??[])P.set(qe.agentId,(P.get(qe.agentId)??0)+1);return P},[V]),X=(0,x.useMemo)(()=>{const P=new Set;for(const[qe,Ye]of ce)Ye>0&&P.add(qe);return P},[ce]),A=(0,x.useMemo)(()=>(R??[]).filter(P=>P.status!=="terminated"&&(!E.isSuccess||$N(E.data,"agent",P.id)!=="left")),[R,E.data,E.isSuccess]),ee=z?.user?.id??z?.session?.userId??null,ie=(0,x.useMemo)(()=>g?Z3(g,ee):null,[ee,g]),[le,Ae]=(0,x.useState)(()=>ie?ah(ie):"top"),{orderedAgents:de}=w5({agents:A,companyId:g,userId:ee}),we=(0,x.useMemo)(()=>Rj(de,le),[de,le]),ye=(0,x.useMemo)(()=>new Set(we.map(P=>P.id)),[we]);(0,x.useEffect)(()=>{const P=Date.now();for(const qe of X)f.current.set(qe,P);for(const qe of f.current.keys())ye.has(qe)||f.current.delete(qe)},[X,ye]);const Me=(0,x.useMemo)(()=>{const P=Date.now(),qe=f.current;return we.filter(Ye=>{if((ce.get(Ye.id)??0)>0)return!0;const xt=qe.get(Ye.id);return xt!==void 0&&P-xt<=Tj})},[ce,u,we]),he=Me.length>0,ve=e?he?Me:we.slice(0,_5):we,et=e&&we.length>0,$e=M.pathname.match(/^\/(?:[^/]+\/)?agents\/([^/]+)(?:\/([^/]+))?/),Ie=$e?.[1]??null,ct=$e?.[2]??null;(0,x.useEffect)(()=>{if(!ie){Ae("top");return}Ae(ah(ie))},[ie]),(0,x.useEffect)(()=>{if(!ie)return;const P=r(Ye=>{Ye.key===ie&&Ae(ah(ie))},"onStorage"),qe=r(Ye=>{const xt=Ye.detail;!xt||xt.storageKey!==ie||Ae(xt.sortMode)},"onCustomEvent");return window.addEventListener("storage",P),window.addEventListener(Gy,qe),()=>{window.removeEventListener("storage",P),window.removeEventListener(Gy,qe)}},[ie]),(0,x.useEffect)(()=>{if(!e)return;const P=Date.now();let qe=null;for(const xt of we){if((ce.get(xt.id)??0)>0)continue;const at=f.current.get(xt.id);if(at===void 0)continue;const Kt=at+Tj;Kt<P||(qe=qe===null?Kt:Math.min(qe,Kt))}if(qe===null)return;const Ye=window.setTimeout(()=>{p(xt=>xt+1)},Math.max(0,qe-P+1));return()=>{window.clearTimeout(Ye)}},[e,we,ce,u]);const He=(0,x.useCallback)(P=>{const qe=P==="alphabetical"||P==="recent"?P:"top";Ae(qe),ie&&J3(ie,qe)},[ie]),vt=Bt({mutationFn:r(({agent:P,action:qe})=>qe==="pause"?Ha.pause(P.id,g??void 0):Ha.resume(P.id,g??void 0),"mutationFn"),onMutate:r(({agent:P})=>{c(qe=>{const Ye=new Set(qe);return Ye.add(P.id),Ye})},"onMutate"),onSuccess:r(async(P,{agent:qe,action:Ye})=>{g&&await Promise.all([h.invalidateQueries({queryKey:$.agents.list(g)}),h.invalidateQueries({queryKey:$.liveRuns(g)}),h.invalidateQueries({queryKey:$.dashboard(g)})]),await Promise.all([h.invalidateQueries({queryKey:$.agents.detail(qe.id)}),h.invalidateQueries({queryKey:$.agents.detail(fr(qe))})]),C({title:Ye==="pause"?"Agent paused":"Agent resumed",body:qe.name,tone:"success"})},"onSuccess"),onError:r((P,{agent:qe,action:Ye})=>{C({title:Ye==="pause"?"Could not pause agent":"Could not resume agent",body:P instanceof Error?P.message:qe.name,tone:"error"})},"onError"),onSettled:r((P,qe,{agent:Ye})=>{c(xt=>{const at=new Set(xt);return at.delete(Ye.id),at})},"onSettled")}),Jt=(0,x.useCallback)(P=>B.mutate({resourceType:"agent",resourceId:P.id,resourceName:P.name,state:"left"}),[B]),ge=(0,x.useCallback)(P=>B.isPending&&B.variables?.resourceType==="agent"&&B.variables.resourceId===P.id,[B.isPending,B.variables]),Oe=(0,x.useCallback)((P,qe)=>B.mutate({resourceType:"agent",resourceId:P.id,resourceName:P.name,starred:qe}),[B]),De=(0,x.useCallback)(P=>B.isPending&&B.variables?.resourceType==="agent"&&B.variables.resourceId===P.id&&B.variables.starred!==void 0,[B.isPending,B.variables]),ut=(0,x.useMemo)(()=>new Set(BN(E.data,"agent")),[E.data]),Ht=(0,x.useMemo)(()=>Rj(A.filter(P=>ut.has(P.id)),"alphabetical"),[A,ut]),Vt=(0,x.useMemo)(()=>ve.filter(P=>!ut.has(P.id)),[ve,ut]),gt=v&&!v.loading?A.find(P=>P.id===v.primaryAgentId):void 0,un=r((P,qe)=>(0,a.jsx)(T5,{activeAgentId:Ie,activeTab:ct,agent:P,disabled:l.has(P.id),isMobile:j,leaving:ge(P),onLeaveAgent:Jt,onPauseResume:r((Ye,xt)=>vt.mutate({agent:Ye,action:xt}),"onPauseResume"),rail:I,runCount:ce.get(P.id)??0,setSidebarOpen:k,builtInStatus:K.get(P.id),starred:qe||UN(E.data,"agent",P.id),onToggleStar:Oe,starPending:De(P)},P.id),"renderAgentRow");return(0,a.jsxs)(af,{label:"Agents",collapsible:{open:t,onOpenChange:s},headerAction:{ariaLabel:"New agent",icon:as,onClick:y},menu:{ariaLabel:"Agents section actions",actions:[{type:"item",label:"Browse agents",icon:Gr,href:"/agents/all"},{type:"separator"}],radioLabel:"Agent sort",radioChoices:E5,radioValue:le,onRadioValueChange:He},children:[[...gt?[gt]:[],...Ht.filter(P=>P.id!==gt?.id),...Vt.filter(P=>P.id!==gt?.id)].map(P=>un(P,ut.has(P.id))),et&&(()=>{const P=(0,a.jsxs)(mn,{to:"/agents/all",state:Of,"aria-label":I?"See all agents":void 0,onClick:r(()=>{j&&k(!1)},"onClick"),className:"flex items-center gap-2.5 mx-2 rounded-lg px-2 py-1.5 pointer-coarse:py-1 text-(length:--text-compact) font-medium text-ink-3 transition-colors hover:bg-bg-3 hover:text-ink",children:[(0,a.jsx)(Gr,{className:"shrink-0 h-4 w-4"}),(0,a.jsx)("span",{className:I?"block w-0 min-w-0 -ms-2.5 overflow-hidden whitespace-nowrap text-transparent select-none":void 0,children:"See all agents"})]});return I?(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:P}),(0,a.jsx)(Ts,{side:"right",children:"See all agents"})]}):P})()]})}r(R5,"SidebarAgents");var M5="opacity-0 transition-opacity group-hover/starred-project:opacity-100 group-focus-within/starred-project:opacity-100";function D5(){const{selectedCompanyId:e}=bt(),{isMobile:t,setSidebarOpen:s,collapsed:l,peeking:c}=Jn(),u=l&&!c,p=hn(),{data:f}=me({queryKey:$.projects.list(e),queryFn:r(()=>hr.list(e),"queryFn"),enabled:!!e}),h=Y0(e),g=KN(e),v=p.pathname.match(/^\/(?:[^/]+\/)?projects\/([^/]+)/)?.[1]??null,y=(0,x.useMemo)(()=>{if(!h.isSuccess)return[];const N=new Set(BN(h.data,"project"));if(N.size===0)return[];const I=new Map((f??[]).map(C=>[C.id,C]));return Array.from(N).map(C=>I.get(C)).filter(C=>!!C).sort((C,M)=>C.name.localeCompare(M.name,void 0,{sensitivity:"base"}))},[h.data,h.isSuccess,f]),j=(0,x.useCallback)(N=>g.mutate({resourceType:"project",resourceId:N.id,resourceName:N.name,starred:!1}),[g]),k=(0,x.useCallback)(N=>g.mutate({resourceType:"project",resourceId:N.id,resourceName:N.name,state:"left"}),[g]),S=(0,x.useCallback)(N=>g.isPending&&g.variables?.resourceType==="project"&&g.variables.resourceId===N.id,[g.isPending,g.variables]);return!h.isSuccess||y.length===0?null:(0,a.jsx)("div",{className:"flex flex-col gap-0.5","aria-label":"Starred projects",children:y.map(N=>{const I=nS(N),C=v===I||v===N.id,M=S(N),R=M&&g.variables?.starred===!1,_=M&&g.variables?.state==="left",D=UN(h.data,"project",N.id),U=(0,a.jsx)(O5,{project:N,active:C,rail:u,onNavigate:r(()=>{t&&s(!1)},"onNavigate")});return(0,a.jsxs)("div",{className:"group/starred-project relative flex items-center",children:[u?(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("div",{className:"min-w-0 flex-1",children:U})}),(0,a.jsx)(Ts,{side:"right",children:N.name})]}):U,!u&&!t?(0,a.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:(0,a.jsx)(FN,{size:"row",quiet:!0,starred:D,pending:R,resourceName:N.name,onToggle:r(()=>j(N),"onToggle"),revealClassName:M5})}):null,!u&&t?(0,a.jsxs)(tl,{children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",className:"absolute right-3 top-1/2 h-6 w-6 -translate-y-1/2 opacity-100","aria-label":`Open actions for ${N.name}`,children:(0,a.jsx)(Df,{className:"h-3.5 w-3.5"})})}),(0,a.jsxs)(el,{align:"end",className:"w-48",children:[(0,a.jsxs)(Sn,{onClick:r(()=>{M||j(N)},"onClick"),disabled:M,children:[R?(0,a.jsx)(Ma,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)(w0,{className:"size-4 fill-amber-500 text-amber-500"}),(0,a.jsx)("span",{children:"Remove from starred"})]}),(0,a.jsx)(Ii,{}),(0,a.jsxs)(Sn,{onClick:r(()=>{M||k(N)},"onClick"),disabled:M,children:[_?(0,a.jsx)(Ma,{className:"size-4 motion-safe:animate-spin"}):(0,a.jsx)(Uf,{className:"size-4"}),(0,a.jsx)("span",{children:"Leave project"})]})]})]}):null]},N.id)})})}r(D5,"SidebarStarredProjects");function O5({project:e,active:t,rail:s,onNavigate:l}){return(0,a.jsxs)(mn,{to:`/projects/${nS(e)}/issues`,state:Of,"aria-current":t?"page":void 0,onClick:l,className:Y("flex min-w-0 flex-1 items-center gap-2.5 mx-2 rounded-lg px-2 py-1.5 pointer-coarse:py-1 text-(length:--text-compact) font-medium transition-colors",!s&&"pl-6 pr-8",t?oo.active:Y(oo.rest,"text-ink/80")),children:[(0,a.jsx)(jS,{color:e.color??null,icon:e.icon??null,size:"xs"}),(0,a.jsx)("span",{className:s?rS:"flex-1 truncate",children:e.name}),!s&&e.visibility==="private"?(0,a.jsx)(ag,{className:"size-3.5 shrink-0 text-ink-3","aria-label":"Private project"}):null,!s&&e.pauseReason==="budget"?(0,a.jsx)(qN,{title:"Project paused by budget"}):null]})}r(O5,"SidebarStarredProjectLink");var _g="wardmote:recent-tasks-updated",HN="wardmote.recentTasks.v2:",L5="wardmote.recentTasks:";function VN(e,t){return`${HN}${e}:${t??"__local_board__"}`}r(VN,"getRecentTasksStorageKey");function z5(e,t){if(!e||typeof e!="object")return!1;const s=e;return s.companyId===t&&typeof s.id=="string"&&s.id.length>0&&typeof s.title=="string"&&(s.identifier===null||typeof s.identifier=="string")&&typeof s.status=="string"&&typeof s.recordedAt=="number"&&Number.isFinite(s.recordedAt)&&(s.snapshotUpdatedAt===void 0||typeof s.snapshotUpdatedAt=="number"&&Number.isFinite(s.snapshotUpdatedAt))}r(z5,"isRecentTaskEntry");function Wr(e,t){if(typeof window>"u")return[];try{const s=e.startsWith(HN)?L5+e.slice(24):e,l=window.localStorage.getItem(e)??window.localStorage.getItem(s),c=JSON.parse(l??"[]");return Array.isArray(c)?WN(c.filter(u=>z5(u,t))):[]}catch{return[]}}r(Wr,"readRecentTasks");function P5(e,t){if(!(typeof window>"u")){try{if(window.localStorage.getItem(e)!==null)return}catch{return}Hf(e,Wr(e,t))}}r(P5,"migrateRecentTasks");function WN(e){const t=new Set;return[...e].sort((s,l)=>l.recordedAt-s.recordedAt).filter(s=>t.has(s.id)?!1:(t.add(s.id),!0)).slice(0,5)}r(WN,"normalizeRecentTasks");function $5(e,t){typeof window>"u"||window.dispatchEvent(new CustomEvent(_g,{detail:{storageKey:e,entries:t}}))}r($5,"publishRecentTasks");function Hf(e,t){if(typeof window>"u")return;const s=WN(t);try{const l=JSON.stringify(s);if(window.localStorage.getItem(e)===l)return;window.localStorage.setItem(e,l)}catch{}$5(e,s)}r(Hf,"writeRecentTasks");function X0(e,t){if(e.id!==t.id||e.companyId!==t.companyId)return e;const s=new Date(t.updatedAt).getTime();return!Number.isFinite(s)||e.snapshotUpdatedAt!==void 0&&s<e.snapshotUpdatedAt?e:s===e.snapshotUpdatedAt?t.externalConversationState!==void 0&&t.externalConversationState!==e.externalConversationState?{...e,status:t.status,externalConversationState:t.externalConversationState}:e:{...e,title:t.title,identifier:t.identifier,status:t.status,externalConversationState:t.externalConversationState,snapshotUpdatedAt:s,recordedAt:Math.max(e.recordedAt,s)}}r(X0,"mergeRecentTaskSnapshot");function U5(e,t,s=new Date(e.updatedAt).getTime()){if(e.conversationAgentId)return;const l=VN(e.companyId,t),c=Wr(l,e.companyId),u=c.find(v=>v.id===e.id),p=Number.isFinite(s)?s:u?.recordedAt??Date.now(),f=new Date(e.updatedAt).getTime(),h=u?X0(u,e):{id:e.id,companyId:e.companyId,title:e.title,identifier:e.identifier,status:e.status,externalConversationState:e.externalConversationState,recordedAt:p,...Number.isFinite(f)?{snapshotUpdatedAt:f}:{}},g={...h,recordedAt:Math.max(p,h.recordedAt)};u&&u.title===g.title&&u.identifier===g.identifier&&u.status===g.status&&u.externalConversationState===g.externalConversationState&&u.recordedAt===g.recordedAt&&u.snapshotUpdatedAt===g.snapshotUpdatedAt||Hf(l,u?c.map(v=>v.id===e.id?g:v):[g,...c])}r(U5,"recordRecentTask");function B5(e,t,s){if(s.size===0)return;const l=Wr(e,t),c=l.filter(u=>!s.has(u.id));c.length!==l.length&&Hf(e,c)}r(B5,"pruneRecentTasks");function QN(e,t,s){const l=new Map(s.map(f=>[f.id,f])),c=Wr(e,t);let u=!1;const p=c.map(f=>{const h=l.get(f.id);if(!h||h.companyId!==t)return f;const g=X0(f,h);return g!==f&&(u=!0),g});u&&Hf(e,p)}r(QN,"updateRecentTaskSnapshots");var K5=1e3;function q5({companyId:e,userId:t}){const s=(0,x.useMemo)(()=>e?VN(e,t):null,[e,t]),[l,c]=(0,x.useState)(()=>s&&e?Wr(s,e):[]);(0,x.useEffect)(()=>{s&&e&&P5(s,e),c(s&&e?Wr(s,e):[])},[e,s]),(0,x.useEffect)(()=>{if(!s||!e)return;const N=r(()=>c(Wr(s,e)),"sync"),I=r(M=>{M.key===s&&N()},"onStorage"),C=r(M=>{const R=M.detail;R?.storageKey===s&&c(R.entries)},"onRecentTasksUpdated");return window.addEventListener("storage",I),window.addEventListener(_g,C),()=>{window.removeEventListener("storage",I),window.removeEventListener(_g,C)}},[e,s]);const u=[...l].sort((N,I)=>N.id.localeCompare(I.id)),p=JSON.stringify(u.map(N=>N.id)),f=Ef({queries:u.map(N=>({queryKey:$.issues.detail(N.id),queryFn:r(()=>cn.get(N.id),"queryFn"),retry:!1,staleTime:3e4}))}),h=new Map(f.flatMap(N=>N.data?[[N.data.id,N.data]]:[])),g=l.map(N=>{const I=h.get(N.id);return!I||I.companyId!==e||I.hiddenAt?N:X0(N,I)}),v=f.map(N=>`${N.dataUpdatedAt}:${N.errorUpdatedAt}:${N.status}`).join("|");(0,x.useEffect)(()=>{if(!s||!e||f.length===0)return;const N=[],I=new Set;f.forEach((C,M)=>{const R=u[M];R&&(C.data?C.data.companyId!==e||C.data.hiddenAt?I.add(R.id):N.push(C.data):C.error instanceof Ti&&[403,404].includes(C.error.status)&&I.add(R.id))}),QN(s,e,N),B5(s,e,I)},[e,p,v,s]);const[y,j]=(0,x.useState)(()=>l.map(N=>N.id)),k=JSON.stringify(l.map(N=>[N.id,N.recordedAt]));(0,x.useEffect)(()=>{const N=JSON.parse(k).map(([C])=>C);if(JSON.stringify([...y].sort((C,M)=>C.localeCompare(M)))!==p){j(N);return}if(N.every((C,M)=>C===y[M]))return;const I=window.setTimeout(()=>j(N),K5);return()=>window.clearTimeout(I)},[k,p,y,s]);const S=new Map(g.map(N=>[N.id,N]));return{entries:y.length===l.length&&y.every(N=>S.has(N))?y.map(N=>S.get(N)):g,storageKey:s}}r(q5,"useRecentTasks");var dh="h-(--profile-popover-row-height) gap-(--profile-popover-row-gap) rounded-lg px-2.5 py-0 text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) focus:bg-bg-3/50 focus:text-ink",F5=":restart-wake-retry";function H5(e,t){return`wardmote.recentTasks:${e}:${t??"__local_board__"}${F5}`}r(H5,"restartWakeRetryStorageKey");function GN(e){if(!e)return new Set;try{const t=JSON.parse(window.localStorage.getItem(e)??"[]");return new Set(Array.isArray(t)?t.filter(s=>typeof s=="string"):[])}catch{return new Set}}r(GN,"readRestartWakeRetryIssueIds");function fh(e,t,s){if(!e)return;const l=GN(e);s?l.add(t):l.delete(t);try{l.size>0?window.localStorage.setItem(e,JSON.stringify([...l])):window.localStorage.removeItem(e)}catch{}}r(fh,"setRestartWakeRetryPending");function ph(e,t){return e instanceof Error&&e.message.trim()?e.message:t}r(ph,"errorMessage$2");function V5({companyId:e,liveIssueIds:t}){const{collapsed:s,peeking:l}=Jn(),c=s&&!l,{data:u,isPending:p}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1});if(!e||p)return null;const f=u?.user?.id??u?.session?.userId??null;return(0,a.jsx)(W5,{companyId:e,userId:f,liveIssueIds:t,rail:c},`${e}:${f??"__local_board__"}`)}r(V5,"SidebarRecentTasks");function W5({companyId:e,userId:t,liveIssueIds:s,rail:l}){const{entries:c,storageKey:u}=q5({companyId:e,userId:t}),p=kn(),f=Lf(),[h,g]=(0,x.useState)(null),[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(null),S=H5(e,t);if(c.length===0)return null;const N=r(async _=>{await Promise.all([p.invalidateQueries({queryKey:$.issues.detail(_)}),p.invalidateQueries({queryKey:$.issues.list(e)}),p.invalidateQueries({queryKey:$.issues.activity(_)})])},"refreshIssueQueries"),I=r(_=>{g(_),y(_.title)},"beginRename"),C=r(async _=>{_.preventDefault();const D=v.trim();if(!h||!D||D===h.title){g(null);return}k("rename");try{const U=await cn.update(h.id,{title:D});p.setQueryData($.issues.detail(h.id),U),u&&QN(u,e,[U]),await N(h.id),g(null),f?.pushToast({title:"Task renamed",tone:"success"})}catch(U){f?.pushToast({title:"Task rename failed",body:ph(U,"Unable to rename this task."),tone:"error"})}finally{k(null)}},"submitRename"),M=r(async _=>{k("archive");try{await cn.archiveFromInbox(_.id),await N(_.id),await p.invalidateQueries({queryKey:$.sidebarBadges(e)}),f?.pushToast({title:"Task archived from inbox",tone:"success"})}catch(D){f?.pushToast({title:"Task archive failed",body:ph(D,"Unable to archive this task from the inbox."),tone:"error"})}finally{k(null)}},"archiveTask"),R=r(async _=>{k("pause");try{const D=await cn.getTreeControlState(_.id);if(D.activePauseHold?.isRoot){const U=await cn.get(_.id);if(fh(S,_.id,!0),await cn.releaseTreeHold(_.id,D.activePauseHold.holdId,{reason:"Restarted from Recent Tasks."}),U.assigneeAgentId){const K=await Ha.wakeup(U.assigneeAgentId,{source:"assignment",triggerDetail:"manual",reason:"recent_task_restart",payload:{issueId:U.id}},U.companyId);if(!("id"in K))throw new Error(K.message??"The assignee wake was skipped.")}fh(S,_.id,!1),f?.pushToast({title:"Task restarted",tone:"success"})}else{if(D.activePauseHold)throw new Error("This task is paused by a parent task. Restart it from the pause root.");if(GN(S).has(_.id)){const U=await cn.get(_.id);if(U.assigneeAgentId){const K=await Ha.wakeup(U.assigneeAgentId,{source:"assignment",triggerDetail:"manual",reason:"recent_task_restart_retry",payload:{issueId:U.id}},U.companyId);if(!("id"in K))throw new Error(K.message??"The assignee wake was skipped.")}fh(S,_.id,!1),f?.pushToast({title:"Task restarted",tone:"success"})}else await cn.createTreeHold(_.id,{mode:"pause",reason:"Paused from Recent Tasks.",releasePolicy:{strategy:"manual"}}),f?.pushToast({title:"Task paused",tone:"success"})}await p.invalidateQueries({queryKey:["issues","tree-control-state",_.id]})}catch(D){f?.pushToast({title:"Task pause update failed",body:ph(D,"Unable to pause or restart this task."),tone:"error"})}finally{k(null)}},"toggleTaskPause");return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(af,{label:"Recent Tasks",children:c.map(_=>(0,a.jsxs)("div",{className:"sidebar-action-row group/recent-task relative",children:[(0,a.jsx)(Ge,{to:`/issues/${_.id}`,label:_.title,trailing:_.status==="in_review"&&_.externalConversationState==="waiting"?(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Idle"}):void 0,trailingLabel:_.status==="in_review"&&_.externalConversationState==="waiting"?"Idle":void 0,className:l?void 0:"sidebar-action-link pointer-coarse:pr-8 [.sidebar-action-row:is(:hover,:focus-within)_&]:text-ink [.sidebar-action-row:has(.sidebar-action-menu[data-state=open])_&]:text-ink",liveCount:s.has(_.id)?1:void 0}),l?null:(0,a.jsxs)(tl,{children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`More actions for ${_.title}`,className:"sidebar-action-menu absolute right-2 top-(--pct-50) z-10 -translate-y-(--pct-50) pointer-events-none opacity-0 transition-opacity focus-visible:pointer-events-auto focus-visible:opacity-100 pointer-coarse:pointer-events-auto pointer-coarse:opacity-100 pointer-coarse:before:hidden group-hover/recent-task:pointer-events-auto group-hover/recent-task:opacity-100 group-focus-within/recent-task:pointer-events-auto group-focus-within/recent-task:opacity-100 data-[state=open]:pointer-events-auto data-[state=open]:opacity-100",children:(0,a.jsx)(Df,{"aria-hidden":"true"})})}),(0,a.jsxs)(el,{side:"right",align:"start",className:"w-(--profile-popover-width) rounded-xl p-1.5 shadow-(--shadow-profile-popover)",children:[(0,a.jsxs)(Sn,{className:dh,onSelect:r(()=>I(_),"onSelect"),children:[(0,a.jsx)(V0,{"aria-hidden":"true"}),"Rename"]}),(0,a.jsxs)(Sn,{className:dh,disabled:j!==null,onSelect:r(()=>{M(_)},"onSelect"),children:[(0,a.jsx)(DS,{"aria-hidden":"true"}),"Archive"]}),(0,a.jsxs)(Sn,{className:dh,disabled:j!==null,onSelect:r(()=>{R(_)},"onSelect"),children:[(0,a.jsx)(nl,{"aria-hidden":"true"}),"Pause/Restart"]})]})]})]},_.id))}),(0,a.jsx)(ks,{open:h!==null,onOpenChange:r(_=>{!_&&j!=="rename"&&g(null)},"onOpenChange"),children:(0,a.jsx)($s,{className:"sm:max-w-md",children:(0,a.jsxs)("form",{className:"grid gap-4",onSubmit:r(_=>{C(_)},"onSubmit"),children:[(0,a.jsxs)(bo,{children:[(0,a.jsx)(Os,{children:"Rename task"}),(0,a.jsx)(vo,{children:"Choose a short, clear name for this task."})]}),(0,a.jsx)(Wn,{autoFocus:!0,"aria-label":"Task name",value:v,disabled:j==="rename",onChange:r(_=>y(_.target.value),"onChange")}),(0,a.jsxs)($f,{children:[(0,a.jsx)(oe,{type:"button",variant:"secondary",disabled:j==="rename",onClick:r(()=>g(null),"onClick"),children:"Cancel"}),(0,a.jsx)(oe,{type:"submit",disabled:j==="rename"||!v.trim(),children:j==="rename"?"Saving...":"Save"})]})]})})})]})}r(W5,"RecentTasksList");var Q5={list:r((e,t={})=>{const s=new URLSearchParams;t.includeDismissed&&s.set("includeDismissed","true"),t.archived&&s.set("archived","true"),t.all&&s.set("all","true"),t.activitySince&&s.set("activitySince",t.activitySince),t.activityUntil&&s.set("activityUntil",t.activityUntil),t.queue&&s.set("queue",t.queue),t.sort&&s.set("sort",t.sort),t.cursor&&s.set("cursor",t.cursor),t.limit!==void 0&&s.set("limit",String(t.limit));const l=s.toString();return je.get(`/companies/${e}/attention${l?`?${l}`:""}`)},"list"),count:r(e=>je.get(`/companies/${e}/attention/count`),"count")},dd={list:r(e=>je.get(`/companies/${e}/inbox-dismissals`),"list"),dismiss:r((e,t)=>je.post(`/companies/${e}/inbox-dismissals`,{itemKey:t}),"dismiss"),snooze:r((e,t,s)=>je.post(`/companies/${e}/inbox-dismissals`,{itemKey:t,kind:"snooze",snoozedUntil:s}),"snooze"),restore:r((e,t)=>je.delete(`/companies/${e}/inbox-dismissals/${encodeURIComponent(t)}`),"restore")},YN={list:r((e,t)=>je.get(`/companies/${e}/approvals${t?`?status=${encodeURIComponent(t)}`:""}`),"list"),create:r((e,t)=>je.post(`/companies/${e}/approvals`,t),"create"),get:r(e=>je.get(`/approvals/${e}`),"get"),approve:r((e,t)=>je.post(`/approvals/${e}/approve`,{decisionNote:t}),"approve"),reject:r((e,t)=>je.post(`/approvals/${e}/reject`,{decisionNote:t}),"reject"),requestRevision:r((e,t)=>je.post(`/approvals/${e}/request-revision`,{decisionNote:t}),"requestRevision"),resubmit:r((e,t)=>je.post(`/approvals/${e}/resubmit`,{payload:t}),"resubmit"),listComments:r(e=>je.get(`/approvals/${e}/comments`),"listComments"),addComment:r((e,t)=>je.post(`/approvals/${e}/comments`,{body:t}),"addComment"),listIssues:r(e=>je.get(`/approvals/${e}/issues`),"listIssues")},G5={summary:r(e=>je.get(`/companies/${e}/dashboard`),"summary")},XN={get:r(e=>je.get(`/companies/${e}/sidebar-badges`),"get")};var Y5=new Set(["failed","timed_out"]),sf=new Set(["pending","revision_requested"]),ZN="wardmote:inbox:dismissed",JN="wardmote:inbox:read-items",eC="wardmote:inbox:last-tab",NG="wardmote:inbox:issue-columns",tC="wardmote:inbox:nesting",nC="wardmote:inbox:group-by",CG="wardmote:inbox:filters",X5="wardmote:inbox:collapsed-groups",Z5="wardmote:inbox:collapsed-parents",Eg=["status","id","assignee","kickedOffBy","project","workspace","parent","labels","updated"],aC=["status","id","updated"];function sC(e){return e?`${X5}:${e}`:null}r(sC,"getInboxCollapsedGroupsStorageKey");function iC(e){return e?`${Z5}:${e}`:null}r(iC,"getInboxCollapsedParentsStorageKey");function AG(e){const t=sC(e);if(!t)return new Set;try{const s=localStorage.getItem(t);if(!s)return new Set;const l=JSON.parse(s);return new Set(Array.isArray(l)?l.filter(c=>typeof c=="string"):[])}catch{return new Set}}r(AG,"loadCollapsedInboxGroupKeys");function _G(e,t){const s=sC(e);if(s)try{localStorage.setItem(s,JSON.stringify([...t]))}catch{}}r(_G,"saveCollapsedInboxGroupKeys");function EG(e){const t=iC(e);if(!t)return new Set;try{const s=localStorage.getItem(t);if(!s)return new Set;const l=JSON.parse(s);return new Set(Array.isArray(l)?l.filter(c=>typeof c=="string"):[])}catch{return new Set}}r(EG,"loadCollapsedInboxParentIds");function IG(e,t){const s=iC(e);if(s)try{localStorage.setItem(s,JSON.stringify([...t]))}catch{}}r(IG,"saveCollapsedInboxParentIds");function Mj(){try{const e=localStorage.getItem(ZN);if(!e)return new Set;const t=JSON.parse(e);return Array.isArray(t)?new Set(t.filter(s=>typeof s=="string"&&s.startsWith("alert:"))):new Set}catch{return new Set}}r(Mj,"loadDismissedInboxAlerts");function J5(e){try{localStorage.setItem(ZN,JSON.stringify([...e]))}catch{}}r(J5,"saveDismissedInboxAlerts");function eO(e){return new Map(e.map(t=>[t.itemKey,ss(t.dismissedAt)]))}r(eO,"buildInboxDismissedAtByKey");function Dj(e,t,s){const l=e.get(t);return l==null?!1:l>=ss(s)}r(Dj,"isInboxEntityDismissed");function Oj(){try{const e=localStorage.getItem(JN);return e?new Set(JSON.parse(e)):new Set}catch{return new Set}}r(Oj,"loadReadInboxItems");function Lj(e){try{localStorage.setItem(JN,JSON.stringify([...e]))}catch{}}r(Lj,"saveReadInboxItems");function rC(e){const t=new Set(e);return Eg.filter(s=>t.has(s))}r(rC,"normalizeInboxIssueColumns");function tO(e){return e?[...Eg]:Eg.filter(t=>t!=="workspace")}r(tO,"getAvailableInboxIssueColumns");function TG(){try{const e=localStorage.getItem(nC);return e==="type"||e==="assignee"||e==="project"||e==="workspace"?e:"none"}catch{return"none"}}r(TG,"loadInboxWorkItemGroupBy");function RG(e){try{localStorage.setItem(nC,e)}catch{}}r(RG,"saveInboxWorkItemGroupBy");function MG(e,t,s){return s&&e==="workspace"&&!t}r(MG,"shouldResetInboxWorkspaceGrouping");function nO(e,t,{isolatedWorkspacesEnabled:s=!1,executionWorkspaceById:l,projectWorkspaceById:c,defaultProjectWorkspaceIdByProjectId:u}={}){const p=t.trim().toLowerCase();return!p||e.title.toLowerCase().includes(p)||e.identifier?.toLowerCase().includes(p)||e.description?.toLowerCase().includes(p)?!0:s?lC(e,{executionWorkspaceById:l,projectWorkspaceById:c,defaultProjectWorkspaceIdByProjectId:u})?.toLowerCase().includes(p)??!1:!1}r(nO,"matchesInboxIssueSearch");function DG({visibleIssues:e,searchableIssues:t,query:s,isolatedWorkspacesEnabled:l=!1,executionWorkspaceById:c,projectWorkspaceById:u,defaultProjectWorkspaceIdByProjectId:p}){const f=s.trim();if(!f)return[];const h=new Set(e.map(g=>g.id));return t.filter(g=>!h.has(g.id)).filter(g=>nO(g,f,{isolatedWorkspacesEnabled:l,executionWorkspaceById:c,projectWorkspaceById:u,defaultProjectWorkspaceIdByProjectId:p})).sort(Tc)}r(DG,"getArchivedInboxSearchIssues");function OG({query:e,filteredWorkItems:t,archivedSearchIssues:s,remoteIssues:l,issueFilters:c,currentUserId:u,enableRoutineVisibilityFilter:p=!1,liveIssueIds:f,issueFilterContext:h={}}){if(!e.trim())return[];const g=new Set([...t.filter(v=>v.kind==="issue").map(v=>v.issue.id),...s.map(v=>v.id)]);return mg(l,c,u,p,f,h).filter(v=>!g.has(v.id))}r(OG,"getInboxSearchSupplementIssues");function aO(e){const t=e?.trim();return t?`${t} (default)`:"Default workspace"}r(aO,"formatDefaultWorkspaceGroupLabel");function sO(e,{projectWorkspaceById:t,defaultProjectWorkspaceIdByProjectId:s}){if(!e.projectId)return null;const l=s?.get(e.projectId)??null;return l?{id:l,label:aO(t?.get(l)?.name)}:null}r(sO,"resolveDefaultProjectWorkspaceInfo");function lC(e,{executionWorkspaceById:t,projectWorkspaceById:s,defaultProjectWorkspaceIdByProjectId:l}){const c=e.projectId?l?.get(e.projectId)??null:null;if(e.executionWorkspaceId){const u=t?.get(e.executionWorkspaceId)??null,p=u?.projectWorkspaceId??e.projectWorkspaceId??null;if(u?.mode==="shared_workspace"&&p===c)return null;const f=u?.name;if(f)return f}if(e.projectWorkspaceId){if(e.projectWorkspaceId===c)return null;const u=s?.get(e.projectWorkspaceId)?.name;if(u)return u}return null}r(lC,"resolveIssueWorkspaceName");function iO(e,{executionWorkspaceById:t,projectWorkspaceById:s,defaultProjectWorkspaceIdByProjectId:l}={}){const c=sO(e,{projectWorkspaceById:s,defaultProjectWorkspaceIdByProjectId:l});if(e.executionWorkspaceId){const u=t?.get(e.executionWorkspaceId)??null,p=u?.projectWorkspaceId??e.projectWorkspaceId??null;if(u?.mode==="shared_workspace"&&p!=null&&p===c?.id&&c)return{key:`workspace:project:${c.id}`,label:c.label};const f=u?.name?.trim();if(f)return{key:`workspace:execution:${e.executionWorkspaceId}`,label:f}}if(e.projectWorkspaceId){if(e.projectWorkspaceId===c?.id)return{key:`workspace:project:${c.id}`,label:c.label};const u=s?.get(e.projectWorkspaceId)?.name?.trim();if(u)return{key:`workspace:project:${e.projectWorkspaceId}`,label:u}}return c?{key:`workspace:project:${c.id}`,label:c.label}:{key:"workspace:none",label:"No workspace"}}r(iO,"resolveIssueWorkspaceGroup");function LG(){try{return localStorage.getItem(tC)!=="false"}catch{return!0}}r(LG,"loadInboxNesting");function zG(e){try{localStorage.setItem(tC,String(e))}catch{}}r(zG,"saveInboxNesting");function PG(e,t){return e&&!t}r(PG,"resolveInboxNestingEnabled");function zj(){try{const e=localStorage.getItem(eC);return e==="all"||e==="unread"||e==="recent"||e==="mine"||e==="blocked"?e:"mine"}catch{return"mine"}}r(zj,"loadLastInboxTab");function $G(e){try{localStorage.setItem(eC,e)}catch{}}r($G,"saveLastInboxTab");function UG(e){return e==="mine"}r(UG,"isMineInboxTab");function BG(e){return e==="all"}r(BG,"shouldShowCompanyAlerts");function KG(e,t){return t===0||e<0?-1:Math.min(e,t-1)}r(KG,"resolveInboxSelectionIndex");function rO(e,t,s){return t===0?-1:e<0?0:s==="next"?Math.min(e+1,t-1):Math.max(e-1,0)}r(rO,"getInboxKeyboardSelectionIndex");function qG(e){const t=[...e].sort((l,c)=>new Date(c.createdAt).getTime()-new Date(l.createdAt).getTime()),s=new Map;for(const l of t)s.has(l.agentId)||s.set(l.agentId,l);return Array.from(s.values()).filter(l=>Y5.has(l.status))}r(qG,"getLatestFailedRunsByAgent");function ss(e){if(!e)return 0;const t=new Date(e).getTime();return Number.isFinite(t)?t:0}r(ss,"normalizeTimestamp");function rf(e){const t=ss(e.lastActivityAt);if(t>0)return t;const s=ss(e.lastExternalCommentAt);return s>0?s:ss(e.updatedAt)}r(rf,"issueLastActivityTimestamp");function Tc(e,t){const s=rf(t)-rf(e);return s!==0?s:ss(t.updatedAt)-ss(e.updatedAt)}r(Tc,"sortIssuesByMostRecentActivity");function lO(e){return[...e].sort(Tc).slice(0,100)}r(lO,"getRecentTouchedIssues");function FG(e,t,s,l){const c=[...e].sort((u,p)=>ss(p.updatedAt)-ss(u.updatedAt));return t==="mine"?c.filter(u=>oC(u,l)):t==="recent"?c:t==="unread"?c.filter(u=>sf.has(u.status)):s==="all"?c:c.filter(u=>{const p=sf.has(u.status);return s==="actionable"?p:!p})}r(FG,"getApprovalsForTab");function oC(e,t){return sf.has(e.status)?!0:t?e.requestedByUserId===t||e.decidedByUserId===t:!1}r(oC,"isApprovalVisibleInMine");function mh(e){const t=ss(e.updatedAt);return t>0?t:ss(e.createdAt)}r(mh,"approvalActivityTimestamp");function HG({issues:e,approvals:t,failedRuns:s=[],joinRequests:l=[]}){return[...e.map(c=>({kind:"issue",timestamp:rf(c),issue:c})),...t.map(c=>({kind:"approval",timestamp:mh(c),approval:c})),...s.map(c=>({kind:"failed_run",timestamp:ss(c.createdAt),run:c})),...l.map(c=>({kind:"join_request",timestamp:ss(c.createdAt),joinRequest:c}))].sort((c,u)=>{const p=u.timestamp-c.timestamp;return p!==0?p:c.kind==="issue"&&u.kind==="issue"?Tc(c.issue,u.issue):c.kind==="approval"&&u.kind==="approval"?mh(u.approval)-mh(c.approval):c.kind==="approval"?-1:1})}r(HG,"getInboxWorkItems");var oO=["issue","approval","failed_run","join_request"],cC={issue:"Tasks",approval:"Approvals",failed_run:"Failed runs",join_request:"Join requests"};function cO(e,{agentById:t,currentUserId:s,userLabelById:l}){if(e.assigneeAgentId){const c=t?.get(e.assigneeAgentId)?.trim();return{key:`assignee:agent:${e.assigneeAgentId}`,label:c||e.assigneeAgentId.slice(0,8)}}return e.assigneeUserId?{key:`assignee:user:${e.assigneeUserId}`,label:Vr(e.assigneeUserId,s,l)??"User"}:{key:"assignee:none",label:"Unassigned"}}r(cO,"resolveIssueAssigneeGroup");function uO(e,{projectById:t}){if(!e.projectId)return{key:"project:none",label:"No project"};const s=t?.get(e.projectId)?.name?.trim();return{key:`project:${e.projectId}`,label:s||e.projectId.slice(0,8)}}r(uO,"resolveIssueProjectGroup");function hh(e,t){const s=new Map;for(const l of e){const c=l.kind==="issue"?t(l.issue):{key:`kind:${l.kind}`,label:cC[l.kind]},u=s.get(c.key);u?(u.items.push(l),u.latestTimestamp=Math.max(u.latestTimestamp,l.timestamp)):s.set(c.key,{label:c.label,items:[l],latestTimestamp:l.timestamp})}return[...s.entries()].map(([l,c])=>({key:l,label:c.label,items:c.items,latestTimestamp:c.latestTimestamp})).sort((l,c)=>{const u=c.latestTimestamp-l.latestTimestamp;return u!==0?u:l.label.localeCompare(c.label)}).map(({key:l,label:c,items:u})=>({key:l,label:c,items:u}))}r(hh,"groupInboxWorkItemsByIssueGroup");function dO(e,t,s={}){if(t==="none")return[{key:"__all",label:null,items:e}];if(t==="workspace")return hh(e,u=>iO(u,s));if(t==="assignee")return hh(e,u=>cO(u,s));if(t==="project")return hh(e,u=>uO(u,s));const l=new Map;for(const u of e){const p=l.get(u.kind)??[];p.push(u),l.set(u.kind,p)}const c=[];for(const u of oO){const p=l.get(u)??[];p.length!==0&&c.push({key:u,label:cC[u],items:p})}return c}r(dO,"groupInboxWorkItems");function fO(e){return e.replace(/^archived-search:/,"").replace(/^other-search:/,"")}r(fO,"stripInboxSearchGroupPrefix");function pO(e){return e.find(t=>t.kind==="issue")?.issue??null}r(pO,"firstIssueFromInboxWorkItems");function Pj(e,t,s){return e?t.projectWorkspaceById?.get(e)?.projectId??(s?.projectWorkspaceId===e?s.projectId:null):s?.projectId??null}r(Pj,"projectIdForProjectWorkspace");function VG(e,t,s,l={}){const c=pO(s);if(!c)return null;const u=fO(e);if(t==="project"){if(!u.startsWith("project:"))return{};const p=u.slice(8);return p&&p!=="none"?{projectId:p}:{}}if(t==="assignee"){if(u.startsWith("assignee:agent:")){const p=u.slice(15);return p?{assigneeAgentId:p}:{}}if(u.startsWith("assignee:user:")){const p=u.slice(14);return p?{assigneeUserId:p}:{}}return{}}if(t==="workspace"){if(u.startsWith("workspace:execution:")){const p=u.slice(20);if(!p)return{};const f=l.executionWorkspaceById?.get(p)??null,h=f?.projectWorkspaceId??(c.executionWorkspaceId===p?c.projectWorkspaceId:null),g=f?.projectId??Pj(h,l,c);return{executionWorkspaceId:p,executionWorkspaceMode:"reuse_existing",...g?{projectId:g}:{},...h?{projectWorkspaceId:h}:{}}}if(u.startsWith("workspace:project:")){const p=u.slice(18);if(!p)return{};const f=Pj(p,l,c);return{...f?{projectId:f}:{},projectWorkspaceId:p}}}return{}}r(VG,"buildInboxIssueGroupCreateDefaults");function mO(e){const t=[],s=[];for(const f of e)f.kind==="issue"?t.push(f):s.push(f);const l=new Set(t.map(f=>f.issue.id)),c=new Map,u=new Set;for(const f of t){const{issue:h}=f;if(h.parentId&&l.has(h.parentId)){u.add(h.id);const g=c.get(h.parentId)??[];g.push(h),c.set(h.parentId,g)}}const p=r((f,h=new Set)=>{const g=rf(f);if(h.has(f.id))return g;const v=new Set(h);v.add(f.id);const y=c.get(f.id)??[];return y.length===0?g:Math.max(g,...y.map(j=>p(j,v)))},"subtreeActivityTimestamp");for(const f of c.values())f.sort((h,g)=>{const v=p(g)-p(h);return v!==0?v:Tc(h,g)});return{displayItems:[...t.filter(f=>!u.has(f.issue.id)).map(f=>{const h=c.get(f.issue.id);if(!h?.length)return f;const g=Math.max(...h.map(v=>p(v)));return{...f,timestamp:Math.max(f.timestamp,g)}}),...s].sort((f,h)=>{const g=h.timestamp-f.timestamp;return g!==0?g:f.kind==="issue"&&h.kind==="issue"?Tc(f.issue,h.issue):0}),childrenByIssueId:c}}r(mO,"buildInboxNesting");function WG(e,t,s,l){const c=l?.keyPrefix??"",u=l?.searchSection??"none",p=l?.nestingEnabled??!1;return u!=="none"&&e.length===0?[]:dO(e,t,s).map(f=>{const h=p&&f.items.some(g=>g.kind==="issue")?mO(f.items):{displayItems:f.items,childrenByIssueId:new Map};return{key:`${c}${f.key}`,label:f.label,displayItems:h.displayItems,childrenByIssueId:h.childrenByIssueId,searchSection:u}})}r(WG,"buildGroupedInboxSections");function hO(e){return e.kind==="issue"?`issue:${e.issue.id}`:e.kind==="approval"?`approval:${e.approval.id}`:e.kind==="failed_run"?`run:${e.run.id}`:`join:${e.joinRequest.id}`}r(hO,"getInboxWorkItemKey");function QG(e,t,s){const l=[];for(const c of e){const u=t.has(c.key);if(c.label&&l.push({type:"group",groupKey:c.key,label:c.label,collapsed:u}),u)continue;const p=r((f,h)=>{const g=c.childrenByIssueId.get(f);if(!(!g?.length||s.has(f)))for(const v of g){if(h.has(v.id))continue;const y=new Set(h);y.add(v.id),l.push({type:"child",issueId:v.id,issue:v}),p(v.id,y)}},"addIssueChildren");for(const f of c.displayItems)l.push({type:"top",itemKey:`${c.key}:${hO(f)}`,item:f}),f.kind==="issue"&&p(f.issue.id,new Set([f.issue.id]))}return l}r(QG,"buildInboxKeyboardNavEntries");function GG({tab:e,hasItems:t,showOnMine:s,showOnRecent:l,showOnUnread:c,showOnAll:u}){return t?e==="mine"?s:e==="recent"?l:e==="unread"?c:u:!1}r(GG,"shouldShowInboxSection");function gO({approvals:e,joinRequests:t,dashboard:s,failedRuns:l,mineIssues:c,dismissedAlerts:u,dismissedAtByKey:p,currentUserId:f}){const h=e.filter(C=>oC(C,f)&&sf.has(C.status)&&!Dj(p,`approval:${C.id}`,C.updatedAt)).length,g=t.filter(C=>!Dj(p,`join:${C.id}`,C.updatedAt??C.createdAt)).length,v=c.filter(C=>C.isUnreadForMe).length,y=s?.agents.error??0,j=s?.costs.monthBudgetCents??0,k=s?.costs.monthUtilizationPercent??0,S=y>0&&l===0&&!u.has("alert:agent-errors"),N=j>0&&k>=80&&!u.has("alert:budget"),I=Number(S)+Number(N);return{inbox:h+g+l+v,approvals:h,failedRuns:l,joinRequests:g,mineIssues:v,alerts:I}}r(gO,"computeInboxBadgeData");var xO="backlog,todo,in_progress,in_review,blocked,done",bO=500,vO=3e4;function yO(){const[e,t]=(0,x.useState)(Mj);return(0,x.useEffect)(()=>{const l=r(c=>{c.key==="wardmote:inbox:dismissed"&&t(Mj())},"handleStorage");return window.addEventListener("storage",l),()=>window.removeEventListener("storage",l)},[]),{dismissed:e,dismiss:r(l=>{t(c=>{const u=new Set(c);return u.add(l),J5(u),u})},"dismiss")}}r(yO,"useDismissedInboxAlerts");function jO(e){const t=kn(),s=e?$.inboxDismissals(e):["inbox-dismissals","__disabled__"],{data:l=[]}=me({queryKey:s,queryFn:r(()=>dd.list(e),"queryFn"),enabled:!!e}),c=Bt({mutationFn:r(({itemKey:j})=>dd.dismiss(e,j),"mutationFn"),onMutate:r(async({itemKey:j})=>{if(!e)return{previous:[]};await t.cancelQueries({queryKey:s});const k=t.getQueryData(s)??[],S=new Date;return t.setQueryData(s,[{id:`optimistic:${j}`,companyId:e,userId:"me",itemKey:j,dismissedAt:S,createdAt:S,updatedAt:S},...k.filter(N=>N.itemKey!==j)]),{previous:k}},"onMutate"),onError:r((j,k,S)=>{S&&t.setQueryData(s,S.previous)},"onError"),onSettled:r(()=>{e&&u()},"onSettled")});function u(){e&&(t.invalidateQueries({queryKey:s}),t.invalidateQueries({queryKey:$.sidebarBadges(e)}),t.invalidateQueries({queryKey:$.attention(e)}))}r(u,"invalidateDismissalConsumers");const p=Bt({mutationFn:r(({itemKey:j,snoozedUntil:k})=>dd.snooze(e,j,k),"mutationFn"),onSettled:u}),f=Bt({mutationFn:r(({itemKey:j})=>dd.restore(e,j),"mutationFn"),onSettled:u}),h=(0,x.useMemo)(()=>eO(l),[l]),g=c.mutate,v=p.mutate,y=f.mutate;return{dismissals:l,dismissedAtByKey:h,dismiss:(0,x.useCallback)(j=>g({itemKey:j}),[g]),snooze:(0,x.useCallback)((j,k)=>v({itemKey:j,snoozedUntil:k}),[v]),restore:(0,x.useCallback)(j=>y({itemKey:j}),[y]),isPending:c.isPending||p.isPending||f.isPending}}r(jO,"useInboxDismissals");function YG(){const[e,t]=(0,x.useState)(Oj);return(0,x.useEffect)(()=>{const c=r(u=>{u.key==="wardmote:inbox:read-items"&&t(Oj())},"handleStorage");return window.addEventListener("storage",c),()=>window.removeEventListener("storage",c)},[]),{readItems:e,markRead:r(c=>{t(u=>{const p=new Set(u);return p.add(c),Lj(p),p})},"markRead"),markUnread:r(c=>{t(u=>{const p=new Set(u);return p.delete(c),Lj(p),p})},"markUnread")}}r(YG,"useReadInboxItems");function Z0(e){const t=tT(e),{dismissed:s}=yO(),{dismissedAtByKey:l}=jO(e),{data:c}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:u=[]}=me({queryKey:$.approvals.list(e),queryFn:r(()=>YN.list(e),"queryFn"),enabled:!!e}),{data:p=[]}=me({queryKey:$.access.joinRequests(e),queryFn:r(async()=>{try{return await ti.listJoinRequests(e,"pending_approval")}catch(R){if(R instanceof Ti&&(R.status===401||R.status===403))return[];throw R}},"queryFn"),enabled:!!e,retry:!1}),f=$.dashboard(e),h=_c({companyId:e,resourceKey:"dashboard",queryKey:f,enabled:!!e}),{data:g,dataUpdatedAt:v}=me({queryKey:f,queryFn:r(()=>G5.summary(e),"queryFn"),enabled:!!e});Ec(h,g,v);const y=$.issues.listMineByMe(e),j=_c({companyId:e,resourceKey:"inbox-badge:mine-issues",queryKey:y,enabled:!!e}),{data:k=[],dataUpdatedAt:S}=me({queryKey:y,queryFn:r(()=>cn.listCompact(e,{touchedByUserId:"me",inboxArchivedByUserId:"me",status:xO,limit:bO}).then(R=>R),"queryFn"),enabled:!!e,refetchOnWindowFocus:!1,staleTime:vO});Ec(j,k,S);const N=(0,x.useMemo)(()=>lO(nT(e,k)),[e,t,k]),I=c?.user.id??c?.session.userId??null,{data:C}=me({queryKey:e?$.sidebarBadges(e):["sidebar-badges","__disabled__"],queryFn:r(async()=>{try{return await XN.get(e)}catch(R){if(R instanceof Ti&&(R.status===401||R.status===403))return null;throw R}},"queryFn"),enabled:!!e,retry:!1}),M=C?.failedRuns??0;return(0,x.useMemo)(()=>gO({approvals:u,joinRequests:p,dashboard:g,failedRuns:M,mineIssues:N,dismissedAlerts:s,dismissedAtByKey:l,currentUserId:I}),[u,p,g,M,N,s,l,I])}r(Z0,"useInboxBadge");var wO=new Set(["detailTab","taskDetailView","contextMenuItem","commentAnnotation","commentContextMenuItem","projectSidebarItem","toolbarButton"]),uC=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","),kO=1e3,SO=new Set(wE),dC=(0,x.createContext)(null);function NO(e){return e instanceof Error&&e.message?e.message:"Unknown error"}r(NO,"getErrorMessage");function CO(e,t,s){return{companyId:e.companyId??null,companyPrefix:e.companyPrefix??null,projectId:e.projectId??(e.entityType==="project"?e.entityId??null:null),entityId:e.entityId??null,entityType:e.entityType??null,userId:s,renderEnvironment:t}}r(CO,"buildLauncherHostContext");function AO(e){if(!e)return;const t=e.querySelector(uC);if(t){t.focus();return}e.focus()}r(AO,"focusFirstElement");function $j(e,t){if(/^https?:\/\//.test(e)||e.startsWith("/")||e.startsWith("#")||e.startsWith(".")||e.startsWith("?"))return e;const s=t.companyPrefix?.trim();return s?`/${s}/${e}`:e}r($j,"resolveLauncherNavigationTarget");function _O(e){if(e.action.type!=="navigate"&&e.action.type!=="deepLink"||/^https?:\/\//.test(e.action.target))return null;const[t]=e.action.target.split(/[?#]/,1),s=t?.split("/").filter(Boolean).at(-1);return s?s.toLowerCase():null}r(_O,"launcherRoutePath");function EO(e,t){if(e.placementZone!=="sidebar"||!t)return e.displayName;const s=_O(e);return s?t.slots.find(l=>l.type==="routeSidebar"&&l.routePath?.toLowerCase()===s)?.displayName??e.displayName:e.displayName}r(EO,"launcherDisplayName");function IO(e,t){if(t.key!=="Tab")return;const s=Array.from(e.querySelectorAll(uC)).filter(p=>!p.hasAttribute("disabled")&&p.tabIndex!==-1);if(s.length===0){t.preventDefault(),e.focus();return}const l=s[0],c=s[s.length-1],u=document.activeElement;if(t.shiftKey&&u===l){t.preventDefault(),c.focus();return}!t.shiftKey&&u===c&&(t.preventDefault(),l.focus())}r(IO,"trapFocus");function TO(e){switch(e){case"projectSidebarItem":return"justify-start h-auto px-3 py-1 text-[12px] font-normal text-ink-3 hover:text-ink";case"contextMenuItem":case"commentContextMenuItem":return"justify-start h-7 w-full px-2 text-xs font-normal";case"sidebar":case"sidebarPanel":return"justify-start h-8 w-full";case"toolbarButton":case"globalToolbarButton":return"h-8";default:return"h-8"}}r(TO,"launcherTriggerClassName");function fC(e){switch(e){case"compact":return{width:"min(28rem, calc(100vw - 2rem))"};case"wide":return{width:"min(64rem, calc(100vw - 2rem))"};case"full":return{width:"calc(100vw - 2rem)",height:"calc(100vh - 2rem)"};case"inline":return{width:"min(24rem, calc(100vw - 2rem))"};default:return{width:"min(40rem, calc(100vw - 2rem))"}}}r(fC,"launcherShellBoundsStyle");function RO(e){const t=e.sourceRect,s=fC(e.bounds).width??"min(24rem, calc(100vw - 2rem))";return t?{width:s,maxHeight:"min(70vh, 36rem)",top:Math.min(t.bottom+8,window.innerHeight-32),left:Math.min(Math.max(t.left,16),Math.max(16,window.innerWidth-360))}:{width:s,maxHeight:"min(70vh, 36rem)",top:"4rem",left:"50%",transform:"translateX(-50%)"}}r(RO,"launcherPopoverStyle");function MO(e){return typeof e=="string"&&SO.has(e)}r(MO,"isPluginLauncherBounds");function pC(e){const t=e.enabled??!0,{data:s,isLoading:l,error:c}=me({queryKey:$.plugins.uiContributions,queryFn:r(()=>L0.listUiContributions(),"queryFn"),enabled:t}),u=(0,x.useMemo)(()=>[...e.placementZones].sort().join("|"),[e.placementZones]),p=(0,x.useMemo)(()=>{const f=new Map;for(const h of s??[])f.set(h.pluginId,h);return f},[s]);return{launchers:(0,x.useMemo)(()=>{const f=new Set(u.split("|").filter(Boolean)),h=[];for(const g of s??[])for(const v of g.launchers)f.has(v.placementZone)&&(wO.has(v.placementZone)&&(!e.entityType||!v.entityTypes?.includes(e.entityType))||h.push({...v,pluginId:g.pluginId,pluginKey:g.pluginKey,pluginDisplayName:g.displayName,pluginVersion:g.version,uiEntryFile:g.uiEntryFile}));return h.sort((g,v)=>{const y=g.order??Number.MAX_SAFE_INTEGER,j=v.order??Number.MAX_SAFE_INTEGER;if(y!==j)return y-j;const k=g.pluginDisplayName.localeCompare(v.pluginDisplayName);return k!==0?k:g.displayName.localeCompare(v.displayName)}),h},[s,e.entityType,u]),contributionsByPluginId:p,isLoading:t&&l,errorMessage:c?NO(c):null}}r(pC,"usePluginLaunchers");async function DO(e,t){const s=t.action.target,l=ej(t.pluginKey,s);return l||(await bT(e),ej(t.pluginKey,s))}r(DO,"resolveLauncherComponent");function OO({pluginId:e,hostContext:t,children:s}){const l=(0,x.useMemo)(()=>({pluginId:e,hostContext:t}),[e,t]);return(0,a.jsx)(vT.Provider,{value:l,children:s})}r(OO,"PluginLauncherBridgeScope");var LO=class extends x.Component{static{r(this,"LauncherErrorBoundary")}state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){}render(){return this.state.hasError?(0,a.jsxs)("div",{className:"rounded-md border border-bad/30 bg-bad/5 p-3 text-sm text-bad",children:[this.props.launcher.pluginDisplayName,": failed to render"]}):this.props.children}};function zO({instance:e,renderEnvironment:t}){const s=e.component,{data:l}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),c=l?.user?.id??l?.session?.userId??null,u=(0,x.useMemo)(()=>CO(e.hostContext,t,c),[e.hostContext,t,c]);if(!s)return t.environment==="iframe"?(0,a.jsx)("iframe",{src:`/_plugins/${encodeURIComponent(e.launcher.pluginId)}/ui/${e.launcher.action.target}`,title:`${e.launcher.pluginDisplayName} ${e.launcher.displayName}`,className:"h-full min-h-[24rem] w-full rounded-md border border-line bg-bg"}):(0,a.jsxs)("div",{className:"rounded-md border border-bad/30 bg-bad/5 p-3 text-sm text-bad",children:[e.launcher.pluginDisplayName,': could not resolve launcher target "',e.launcher.action.target,'".']});if(s.kind==="web-component")return(0,x.createElement)(s.tagName,{className:"block w-full",pluginLauncher:e.launcher,pluginContext:u});const p=(0,x.createElement)(s.component,{launcher:e.launcher,context:u});return(0,a.jsx)(LO,{launcher:e.launcher,children:(0,a.jsx)(OO,{pluginId:e.launcher.pluginId,hostContext:u,children:p})})}r(zO,"LauncherRenderContent");function PO({instance:e,stackIndex:t,isTopmost:s,requestBounds:l,closeLauncher:c}){const u=(0,x.useRef)(null),p=(0,x.useId)();(0,x.useEffect)(()=>{if(!s)return;const y=requestAnimationFrame(()=>{AO(u.current)});return()=>cancelAnimationFrame(y)},[s]),(0,x.useEffect)(()=>{if(!s)return;const y=r(j=>{if(u.current){if(j.key==="Escape"){j.preventDefault(),c(e.key,{reason:"escapeKey",nativeEvent:j});return}IO(u.current,j)}},"handleKeyDown");return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[c,e.key,s]);const f=(0,x.useMemo)(()=>({environment:e.launcher.render?.environment??"hostOverlay",launcherId:e.launcher.id,bounds:e.bounds,requestModalBounds:r(y=>l(e.key,y),"requestModalBounds"),closeLifecycle:{onBeforeClose:r(y=>(e.beforeCloseHandlers.add(y),()=>e.beforeCloseHandlers.delete(y)),"onBeforeClose"),onClose:r(y=>(e.closeHandlers.add(y),()=>e.closeHandlers.delete(y)),"onClose")}}),[e,l]),h=kO+t*20,g=e.launcher.action.type,v=g==="openPopover"?RO(e):fC(e.bounds);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/45",style:{zIndex:h},"aria-hidden":"true",onMouseDown:r(y=>{s&&y.target===y.currentTarget&&c(e.key,{reason:"backdrop",nativeEvent:y})},"onMouseDown")}),(0,a.jsxs)("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":p,tabIndex:-1,className:g==="openDrawer"?"fixed right-0 top-0 h-full max-w-[min(44rem,100vw)] overflow-hidden border-l border-line bg-bg shadow-2xl":g==="openPopover"?"fixed overflow-hidden rounded-xl border border-line bg-bg shadow-2xl":"fixed left-1/2 top-1/2 max-h-[calc(100vh-2rem)] -translate-x-1/2 -translate-y-1/2 overflow-hidden rounded-2xl border border-line bg-bg shadow-2xl",style:{zIndex:h+1,...g==="openDrawer"?{width:v.width??"min(44rem, 100vw)"}:v},onMouseDown:r(y=>y.stopPropagation(),"onMouseDown"),children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 border-b border-line px-4 py-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsx)("h2",{id:p,className:"truncate text-sm font-semibold",children:e.launcher.displayName}),(0,a.jsx)("p",{className:"truncate text-xs text-ink-3",children:e.launcher.pluginDisplayName})]}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"sm",className:"ml-auto",onClick:r(()=>{c(e.key,{reason:"programmatic"})},"onClick"),children:"Close"})]}),(0,a.jsx)("div",{className:Y("overflow-auto p-4",g==="openDrawer"?"h-[calc(100%-3.5rem)]":"max-h-[calc(100vh-7rem)]"),children:(0,a.jsx)(zO,{instance:e,renderEnvironment:f})})]})]})}r(PO,"LauncherModalShell");function $O({children:e}){const[t,s]=(0,x.useState)([]),l=(0,x.useRef)(t);l.current=t;const c=hn(),u=ja(),p=(0,x.useCallback)(async(v,y)=>{const j=l.current.find(k=>k.key===v);if(j){for(const k of[...j.beforeCloseHandlers])await k(y);s(k=>k.filter(S=>S.key!==v)),queueMicrotask(()=>{for(const k of[...j.closeHandlers])k(y);j.sourceElement&&document.contains(j.sourceElement)&&j.sourceElement.focus()})}},[]);(0,x.useEffect)(()=>{t.length!==0&&Promise.all(t.map(v=>p(v.key,{reason:"hostNavigation"})))},[c.key]);const f=(0,x.useCallback)(async(v,y)=>{MO(y.bounds)&&s(j=>j.map(k=>k.key===v?{...k,bounds:y.bounds}:k))},[]),h=(0,x.useCallback)(async(v,y,j,k)=>{switch(v.action.type){case"navigate":u($j(v.action.target,y));return;case"deepLink":/^https?:\/\//.test(v.action.target)?window.open(v.action.target,"_blank","noopener,noreferrer"):u($j(v.action.target,y));return;case"performAction":await L0.bridgePerformAction(v.pluginId,v.action.target,v.action.params,y.companyId??null);return;case"openModal":case"openDrawer":case"openPopover":{const S=await DO(j,v),N=k?.getBoundingClientRect()??null,I={key:`${v.pluginId}:${v.id}:${Date.now()}:${Math.random().toString(36).slice(2,8)}`,launcher:v,hostContext:y,contribution:j,component:S,sourceElement:k??null,sourceRect:N,bounds:v.render?.bounds??"default",beforeCloseHandlers:new Set,closeHandlers:new Set};s(C=>[...C,I]);return}}},[u]),g=(0,x.useMemo)(()=>({activateLauncher:h}),[h]);return(0,a.jsxs)(dC.Provider,{value:g,children:[e,t.map((v,y)=>(0,a.jsx)(PO,{instance:v,stackIndex:y,isTopmost:y===t.length-1,requestBounds:f,closeLauncher:p},v.key))]})}r($O,"PluginLauncherProvider");function UO(){const e=(0,x.useContext)(dC);if(!e)throw new Error("usePluginLauncherRuntime must be used within PluginLauncherProvider");return e}r(UO,"usePluginLauncherRuntime");function BO({displayName:e,launcher:t,placementZone:s,onClick:l}){return(0,a.jsx)(oe,{type:"button",variant:s==="toolbarButton"||s==="globalToolbarButton"?"secondary":"ghost",size:"sm",className:TO(s),onClick:l,children:e??t.displayName})}r(BO,"DefaultLauncherTrigger");function mC({placementZones:e,context:t,entityType:s,className:l,itemClassName:c,errorClassName:u,errorBehavior:p="inline"}){const{activateLauncher:f}=UO(),{launchers:h,contributionsByPluginId:g,errorMessage:v}=pC({placementZones:e,entityType:s,companyId:t.companyId,enabled:!!t.companyId});return v&&p==="inline"?(0,a.jsxs)("div",{className:Y("rounded-md border border-bad/30 bg-bad/5 px-2 py-1 text-xs text-bad",u),children:["Plugin launchers unavailable: ",v]}):h.length===0?null:(0,a.jsx)("div",{className:l,children:h.map(y=>(0,a.jsx)("div",{className:c,children:(0,a.jsx)(BO,{displayName:EO(y,g.get(y.pluginId)),launcher:y,placementZone:y.placementZone,onClick:r(j=>{const k=g.get(y.pluginId);k&&f(y,t,k,j.currentTarget)},"onClick")})},`${y.pluginKey}:${y.id}`))})}r(mC,"PluginLauncherOutlet");function KO(){for(var e=arguments.length,t=new Array(e),s=0;s<e;s++)t[s]=arguments[s];return(0,x.useMemo)(()=>l=>{t.forEach(c=>c(l))},t)}r(KO,"useCombinedRefs");var Vf=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yo(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}r(yo,"isWindow");function J0(e){return"nodeType"in e}r(J0,"isNode");function Oa(e){var t,s;return e?yo(e)?e:J0(e)&&(t=(s=e.ownerDocument)==null?void 0:s.defaultView)!=null?t:window:window}r(Oa,"getWindow");function ex(e){const{Document:t}=Oa(e);return e instanceof t}r(ex,"isDocument");function Wc(e){return yo(e)?!1:e instanceof Oa(e).HTMLElement}r(Wc,"isHTMLElement");function hC(e){return e instanceof Oa(e).SVGElement}r(hC,"isSVGElement");function jo(e){return e?yo(e)?e.document:J0(e)?ex(e)?e:Wc(e)||hC(e)?e.ownerDocument:document:document:document}r(jo,"getOwnerDocument");var Ls=Vf?x.useLayoutEffect:x.useEffect;function Wf(e){const t=(0,x.useRef)(e);return Ls(()=>{t.current=e}),(0,x.useCallback)(function(){for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return t.current==null?void 0:t.current(...l)},[])}r(Wf,"useEvent");function qO(){const e=(0,x.useRef)(null);return[(0,x.useCallback)((t,s)=>{e.current=setInterval(t,s)},[]),(0,x.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}r(qO,"useInterval");function Rc(e,t){t===void 0&&(t=[e]);const s=(0,x.useRef)(e);return Ls(()=>{s.current!==e&&(s.current=e)},t),s}r(Rc,"useLatestValue");function Qc(e,t){const s=(0,x.useRef)();return(0,x.useMemo)(()=>{const l=e(s.current);return s.current=l,l},[...t])}r(Qc,"useLazyMemo");function lf(e){const t=Wf(e),s=(0,x.useRef)(null);return[s,(0,x.useCallback)(l=>{l!==s.current&&t?.(l,s.current),s.current=l},[])]}r(lf,"useNodeRef");function of(e){const t=(0,x.useRef)();return(0,x.useEffect)(()=>{t.current=e},[e]),t.current}r(of,"usePrevious");var gh={};function Gc(e,t){return(0,x.useMemo)(()=>{if(t)return t;const s=gh[e]==null?0:gh[e]+1;return gh[e]=s,e+"-"+s},[e,t])}r(Gc,"useUniqueId");function gC(e){return function(t){for(var s=arguments.length,l=new Array(s>1?s-1:0),c=1;c<s;c++)l[c-1]=arguments[c];return l.reduce((u,p)=>{const f=Object.entries(p);for(const[h,g]of f){const v=u[h];v!=null&&(u[h]=v+e*g)}return u},{...t})}}r(gC,"createAdjustmentFn");var lo=gC(1),Mc=gC(-1);function FO(e){return"clientX"in e&&"clientY"in e}r(FO,"hasViewportRelativeCoordinates");function Qf(e){if(!e)return!1;const{KeyboardEvent:t}=Oa(e.target);return t&&e instanceof t}r(Qf,"isKeyboardEvent");function HO(e){if(!e)return!1;const{TouchEvent:t}=Oa(e.target);return t&&e instanceof t}r(HO,"isTouchEvent");function cf(e){if(HO(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:s}=e.touches[0];return{x:t,y:s}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:s}=e.changedTouches[0];return{x:t,y:s}}}return FO(e)?{x:e.clientX,y:e.clientY}:null}r(cf,"getEventCoordinates");var ni=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:s}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(s?Math.round(s):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:s}=e;return"scaleX("+t+") scaleY("+s+")"}},Transform:{toString(e){if(e)return[ni.Translate.toString(e),ni.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:s,easing:l}=e;return t+" "+s+"ms "+l}}}),Uj="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function VO(e){return e.matches(Uj)?e:e.querySelector(Uj)}r(VO,"findFirstFocusableNode");var WO={display:"none"};function QO(e){let{id:t,value:s}=e;return x.createElement("div",{id:t,style:WO},s)}r(QO,"HiddenText");function GO(e){let{id:t,announcement:s,ariaLiveType:l="assertive"}=e;return x.createElement("div",{id:t,style:{position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":l,"aria-atomic":!0},s)}r(GO,"LiveRegion");function YO(){const[e,t]=(0,x.useState)("");return{announce:(0,x.useCallback)(s=>{s!=null&&t(s)},[]),announcement:e}}r(YO,"useAnnouncement$1");var xC=(0,x.createContext)(null);function XO(e){const t=(0,x.useContext)(xC);(0,x.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}r(XO,"useDndMonitor");function ZO(){const[e]=(0,x.useState)(()=>new Set),t=(0,x.useCallback)(s=>(e.add(s),()=>e.delete(s)),[e]);return[(0,x.useCallback)(s=>{let{type:l,event:c}=s;e.forEach(u=>{var p;return(p=u[l])==null?void 0:p.call(u,c)})},[e]),t]}r(ZO,"useDndMonitorProvider");var JO={draggable:`
|
|
@@ -51,11 +51,11 @@ ${EE}
|
|
|
51
51
|
`}r(B$,"buildAgentOnboardingPrompt");function K$(e){const t=(e.connectionCandidates??[]).map(u=>u.trim()).filter(Boolean),s=new Set;let l=null;try{l=new URL(e.onboardingTextUrl),s.add(l.toString())}catch{const u=e.onboardingTextUrl.trim();u&&s.add(u)}if(!l){for(const u of t)s.add(u);return Array.from(s)}const c=`${l.pathname}${l.search}`;for(const u of t)try{const p=new URL(u);s.add(`${p.origin}${c}`)}catch{s.add(u)}return Array.from(s)}r(K$,"buildCandidateOnboardingUrls");function q$(e){const t=e.testResolutionUrl?.trim();if(t)return t;try{const s=new URL(e.onboardingTextUrl),l=s.pathname.replace(/\/onboarding\.txt$/,"/test-resolution");return`${s.origin}${l}`}catch{return null}}r(q$,"buildResolutionTestUrl");function F$({children:e,className:t,...s}){const[l,c]=(0,x.useState)(null),u=(0,x.useRef)(null),p=F0();return(0,x.useLayoutEffect)(()=>{const f=l,h=u.current;if(!f||!h||typeof ResizeObserver>"u")return;let g,v;const y=new ResizeObserver(()=>{const j=getComputedStyle(f),k=h.getBoundingClientRect().height+parseFloat(j.borderTopWidth)+parseFloat(j.borderBottomWidth);if(k===g)return;const S=v?.playState==="running"?f.getBoundingClientRect().height:g;if(v?.cancel(),g=k,S===void 0||p||typeof f.animate!="function")return;const N=qT("--motion-ease-out-expo");v=f.animate([{height:`${S}px`},{height:`${k}px`}],{duration:FT("--onboarding-motion-step"),easing:Array.isArray(N)?`cubic-bezier(${N.join(",")})`:N})});return y.observe(h),()=>{y.disconnect(),v?.cancel()}},[l,p]),(0,a.jsx)($s,{...s,ref:c,className:Y("overflow-hidden p-0",t),children:(0,a.jsx)("div",{ref:u,className:"flex max-h-(--sz-calc-18) shrink-0 flex-col",children:e})})}r(F$,"AnimatedDialogContent");var yA=[{id:"dot",name:"Dot",adapter:"openai_dot",description:"Your Dot in ChatGPT"},{id:"other",name:"Other",adapter:"http",description:"Any agent that can connect to Wardmote"}];function H$({onSelect:e,dotDisabledReason:t}){return(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:yA.map(s=>(0,a.jsxs)("button",{type:"button",onClick:r(()=>e(s.id),"onClick"),disabled:s.id==="dot"&&!!t,title:s.id==="dot"?t:void 0,className:"flex aspect-square flex-col items-center justify-center gap-3 rounded-lg border border-line bg-bg-2 px-3 py-4 text-center transition-colors disabled:opacity-50 hover:bg-bg-3/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:[(0,a.jsx)(dS,{type:s.adapter,className:"size-8"}),(0,a.jsx)("span",{className:"text-sm font-medium",children:s.name}),(0,a.jsx)("span",{className:"sr-only",children:s.description})]},s.id))})}r(H$,"ExternalAgentPresetPicker");var V$=[{title:"Connected to Wardmote",description:"Your Dot has connected to this agent."},{title:"Task updates enabled",description:"Your Dot is subscribed to new assignments and messages."},{title:"Test event confirmed",description:"Your Dot received our test and replied to Wardmote."}];function W$({state:e}){const t={waiting:0,connected:1,subscribed:2,testing:2,finishing:3,ready:3}[e.phase],s=e.problem==="agent_unavailable"?"Connection checks passed, but this agent cannot receive tasks. Resolve the agent’s setup blocker in Wardmote.":e.problem==="offline"?"Connection updates paused. Reconnect to check the latest status.":e.problem==="prompt_unavailable"?"This setup prompt was replaced in another window. Create a fresh prompt to continue.":e.problem==="event_timeout"?"Your Dot connected, but hasn’t confirmed the test event. Ask it to check Wardmote, then retry.":e.phase==="finishing"?"Your Dot confirmed the test event. Wardmote is finishing agent setup.":e.phase==="ready"?"Your Dot is ready for tasks. Messages can travel both ways.":e.phase==="waiting"?"Watching for your Dot. Updates will appear here automatically.":e.phase==="connected"?"Your Dot connected. Waiting for it to enable task updates.":"Waiting for your Dot to confirm a test event. No task will be created.";return(0,a.jsxs)("section",{"aria-label":"Dot connection checks",className:"space-y-4",children:[(0,a.jsx)("ol",{className:"space-y-4",children:V$.map((l,c)=>{const u=c<t,p=c===t&&e.problem==="event_timeout",f=c===t&&!e.problem,h=u?Ms:p?US:f?Ma:HI;return(0,a.jsxs)("li",{className:"flex items-start gap-3","aria-current":f?"step":void 0,children:[(0,a.jsx)("span",{className:Y("flex size-6 shrink-0 items-center justify-center rounded-full",u?"bg-bg-3 text-ink":p?"text-bad":"text-ink-3"),children:(0,a.jsx)(h,{className:Y("size-4",f&&"animate-spin motion-reduce:animate-none")})}),(0,a.jsxs)("div",{className:"min-w-0 pt-0.5",children:[(0,a.jsxs)("p",{className:Y("text-sm",u||f||p?"font-medium":"text-ink-3"),children:[l.title,(0,a.jsx)("span",{className:"sr-only",children:u?": complete":p?": needs attention":f?": in progress":": waiting"})]}),u&&(0,a.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-ink-3",children:l.description})]})]},l.title)})}),(0,a.jsx)("p",{role:e.problem&&e.problem!=="prompt_unavailable"?"alert":"status","aria-live":"polite",className:Y("text-sm leading-relaxed",e.problem&&e.problem!=="prompt_unavailable"?"text-bad":"text-ink-3"),children:s})]})}r(W$,"DotConnectionChecks");function Q$({preset:e,prompt:t,companyName:s,connection:l,onSelect:c,onBack:u,onClose:p,onCopied:f,onRetry:h,onNewPrompt:g,dotDisabledReason:v,busy:y=!1,error:j,approvalHref:k}){const S=yA.find(R=>R.id===e),N=e==="dot",I=N&&l.phase==="ready"&&!l.problem,C=N&&l.phase!=="waiting",M=l.problem==="agent_unavailable"?"Agent unavailable":l.problem==="offline"?"Updates paused":l.problem==="event_timeout"?"Needs attention":l.phase==="finishing"?"Finishing setup…":l.phase==="connected"?"Connecting…":"Confirming connection…";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"min-h-0 space-y-6 overflow-y-auto px-6 pb-6 pt-8 sm:px-8",children:[(0,a.jsxs)("div",{className:"space-y-3 pr-5",children:[S&&(0,a.jsx)(dS,{type:S.adapter,className:"size-10"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(Os,{className:"text-xl font-semibold tracking-tight",children:S?N?I?"Your Dot is connected":"Connect your Dot":"Invite your agent":"Invite an external agent"}),(0,a.jsx)(vo,{className:"text-sm leading-relaxed",children:S?I?`Your Dot can now receive assignments and work with ${s}.`:l.problem==="agent_unavailable"?"Your Dot is connected. This agent must be available in Wardmote before it can receive assignments.":l.phase==="finishing"?"Your Dot has connected and confirmed task updates. Wardmote is preparing it for assignments.":C?"Your Dot has connected. We’re checking that task updates can travel both ways.":N?"Copy the setup prompt and send it to your Dot in ChatGPT. Your Dot will connect itself; we’ll watch for it here.":"Copy the invitation prompt and send it to your agent. Approve its join request in Wardmote when it’s ready.":`Bring an agent you already use into ${s}.`})]})]}),j&&(0,a.jsxs)("div",{role:"alert",className:"space-y-3 text-sm text-bad",children:[(0,a.jsx)("p",{children:j}),(0,a.jsx)(oe,{variant:"secondary",disabled:y,onClick:h,children:"Try again"})]}),S?k?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"An organization admin needs to approve this agent before Dot can connect. This page will update after approval."}):y&&!t&&l.phase==="waiting"?(0,a.jsx)("p",{role:"status",className:"text-sm text-ink-3",children:"Preparing your invitation…"}):N?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"border-t pt-6",children:[(0,a.jsx)(W$,{state:l}),l.phase==="waiting"&&(0,a.jsx)("p",{className:"mt-4 text-xs text-ink-3",children:"Dot uses your OpenAI account. Provider usage and cost aren’t reported to Wardmote."})]}),l.problem==="event_timeout"&&(0,a.jsx)(oe,{variant:"secondary",disabled:y,onClick:h,children:"Retry test event"}),l.problem==="offline"&&(0,a.jsx)(oe,{variant:"secondary",disabled:y,onClick:h,children:"Reconnect updates"})]}):(0,a.jsxs)("p",{className:"text-sm leading-relaxed text-ink-3",children:["The invitation includes everything your agent needs to join ",s,". You can review its request before granting access."]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(H$,{onSelect:c,dotDisabledReason:v}),v&&(0,a.jsx)("p",{className:"text-sm text-ink-3",children:v})]})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3 border-t px-6 py-4 sm:px-8",children:[(0,a.jsxs)(oe,{variant:"ghost",onClick:S?u:p,children:[S&&(0,a.jsx)(E0,{className:"size-4"}),S?"Back":"Cancel"]}),S&&(k?(0,a.jsx)(oe,{asChild:!0,children:(0,a.jsx)(mn,{to:k,onClick:p,children:"Review approval"})}):I?(0,a.jsx)(oe,{onClick:p,children:"Done"}):C?(0,a.jsxs)(oe,{disabled:!0,"aria-live":"polite",children:[!l.problem&&(0,a.jsx)(Ma,{className:"size-4 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),M]}):N&&l.problem==="prompt_unavailable"?(0,a.jsx)(oe,{disabled:y,onClick:g,children:"Create a new prompt"}):!t||y?(0,a.jsx)(oe,{disabled:!0,children:y?"Preparing…":"Waiting for Dot…"}):(0,a.jsx)(HT,{prompt:t,label:N?"Copy setup prompt":"Copy invitation prompt",title:N?"Connect your Dot":"Invite your agent",description:N?"Send this whole prompt to your Dot in ChatGPT.":"Send this whole prompt to your agent.",agent:N?{name:"Dot",src:"/brands/adapters/openai-dot.svg"}:void 0,align:"end",className:"min-w-0 shrink",onCopied:f},e))]})]})}r(Q$,"ExternalAgentInviteContent");function G$({companyId:e,onClose:t,onBack:s}){const l=kn(),{selectedCompany:c}=bt(),[u,p]=(0,x.useState)(null),[f,h]=(0,x.useState)(null),[g,v]=(0,x.useState)(null),[y,j]=(0,x.useState)(null),[k,S]=(0,x.useState)(""),N=(0,x.useRef)(!1),I=me({queryKey:$.instance.experimentalSettings,queryFn:pa.getExperimental}),C=I.isPending?"Loading available agents…":I.error?"Unable to load feature settings. Try again after refreshing.":!I.data?.enableOpenAiDot||!I.data.enablePublicMcp?"Turn on OpenAI Dot and Assistant connections in Settings > Features.":void 0,M=["dot-binding",e,f?.agent.id],R=me({queryKey:M,queryFn:r(({signal:ie})=>bd.connection(e,f.agent.id,ie),"queryFn"),enabled:u==="dot"&&!!f,retry:!1,staleTime:0,refetchInterval:r(ie=>ie.state.error||ie.state.data?.agentLifecycleState==="ready"&&ie.state.data.canConfigureConnection&&ie.state.data.binding?.status==="ready"&&ie.state.data.binding.subscriptionVerified?!1:2500,"refetchInterval")}),_=Bt({mutationFn:r(async ie=>{if(ie==="dot"){const we=await bd.create(e);h(we),await l.invalidateQueries({queryKey:$.agents.list(e)});return}const le=await ti.createCompanyInvite(e,{allowedJoinTypes:"agent",humanRole:null,agentMessage:null});l.invalidateQueries({queryKey:$.access.invites(e,"all",5)});const Ae=le.onboardingTextUrl??le.onboardingTextPath??`/api/invites/${le.token}/onboarding.txt`,de=await ti.getInviteOnboarding(le.token).catch(()=>null);S(B$({onboardingTextUrl:new URL(Ae,window.location.origin).href,connectionCandidates:de?.onboarding.connectivity?.connectionCandidates??null,testResolutionUrl:de?.onboarding.connectivity?.testResolutionEndpoint?.url??null}))},"mutationFn"),gcTime:0}),D=Bt({mutationFn:r(async ie=>{const le=await bd.pair(e,f.agent.id,ie);v(le),j(null)},"mutationFn"),onSuccess:r(()=>{l.invalidateQueries({queryKey:M})},"onSuccess"),onError:r(()=>{R.refetch()},"onError"),gcTime:0}),U=Bt({mutationFn:r(()=>bd.retry(e,f.agent.id,R.data.binding.id),"mutationFn"),onSuccess:r(()=>{l.invalidateQueries({queryKey:M})},"onSuccess")}),K=R.data?.binding,z=u==="dot"&&R.data?.enabled&&!!R.data.resourceUrl&&R.data.canConfigureConnection&&(!K||K.status==="pairing")&&!g&&!R.error&&!D.isError&&!N.current&&(!y||K?.id===y);(0,x.useEffect)(()=>{z&&R.isFetchedAfterMount&&!R.isFetching&&!D.isPending&&(N.current=!0,D.mutate(K?.id))},[z,R.isFetchedAfterMount,R.isFetching,D.isPending,D.mutate,K?.id]),(0,x.useEffect)(()=>{if(!g)return;const ie=window.setTimeout(()=>{N.current=!1,j(g.bindingId),v(null)},Math.max(0,Date.parse(g.expiresAt)-Date.now()));return()=>window.clearTimeout(ie)},[g]);const E=K?.status==="ready"&&K.subscriptionVerified,B=R.data?.agentLifecycleState==="ready"&&R.data.canConfigureConnection,O=["preparing","verifying"].includes(R.data?.agentLifecycleState??"")&&R.data?.canConfigureConnection,Q={phase:E?B?"ready":O?"finishing":"ready":K?.hasPendingChallenge?"testing":K?.subscriptionVerified?"subscribed":K?.connected?"connected":"waiting",problem:R.error?"offline":E&&!B&&!O?"agent_unavailable":K?.status==="pairing"&&!z&&!D.isPending&&!R.isFetching&&!D.isError&&g?.bindingId!==K.id?"prompt_unavailable":K?.challengeExpiresAt&&!K.hasPendingChallenge&&K.status!=="ready"?"event_timeout":void 0},V=(R.data?.agentStatus??f?.agent.status)==="pending_approval",ue=R.data&&!R.data.canConfigureConnection&&!V,ce=u==="dot"?g&&g.bindingId===K?.id&&R.data?.resourceUrl&&f?XE({companyId:e,agentId:f.agent.id,resourceUrl:R.data.resourceUrl,...g}):"":k,X=(_.variables===u?_.error:null)??(u==="dot"?(K?.connected?null:D.error)??U.error:null),A=_.isPending||D.isPending||U.isPending||z||u==="dot"&&!!f&&(R.isPending||!ce&&R.isFetching),ee=r(()=>{if(ue){R.refetch();return}if(R.error){R.refetch();return}if(_.error||!f){u&&_.mutate(u);return}if(D.error&&!K?.connected){D.mutate(K?.status==="pairing"?K.id:void 0);return}U.mutate()},"retry");return(0,a.jsx)(ks,{open:!0,onOpenChange:r(ie=>{ie||t()},"onOpenChange"),children:(0,a.jsx)(F$,{className:"sm:max-w-(--sz-560px)",children:(0,a.jsx)(Q$,{preset:u,prompt:ce,companyName:c?.name??"your organization",connection:Q,dotDisabledReason:C,busy:A,error:X?.message??(ue?R.data?.agentLifecycleState==="terminated"?"This agent was terminated. Invite another agent to connect Dot.":"Resume this agent before connecting Dot.":void 0),approvalHref:V&&f?.approvalId?`/approvals/${f.approvalId}`:void 0,onSelect:r(ie=>{p(ie),(ie==="dot"?!f:!k)&&_.mutate(ie)},"onSelect"),onBack:r(()=>p(null),"onBack"),onClose:u?t:s,onCopied:r(()=>{u==="dot"&&R.refetch()},"onCopied"),onRetry:ee,onNewPrompt:r(()=>D.mutate(K?.id),"onNewPrompt")})})})}r(G$,"ExternalAgentInviteDialog");function Y$(){const{newAgentOpen:e,closeNewAgent:t}=Vc(),{selectedCompanyId:s}=bt();return e?(0,a.jsx)(X$,{companyId:s,onClose:t},s):null}r(Y$,"NewAgentDialog");function X$({companyId:e,onClose:t}){const s=ja(),[l,c]=(0,x.useState)(!1);return l&&e?(0,a.jsx)(G$,{companyId:e,onClose:t,onBack:r(()=>c(!1),"onBack")}):(0,a.jsx)(GE,{open:!0,onClose:t,onInvite:e?()=>c(!0):void 0,onContinue:r(u=>{t(),s(`/agents/new?${JE(u)}`)},"onContinue")})}r(X$,"NewAgentDialogContent");var Z$=[{title:"Inbox",shortcuts:[{keys:["j"],label:"Move down"},{keys:["↓"],label:"Move down"},{keys:["k"],label:"Move up"},{keys:["↑"],label:"Move up"},{keys:["←"],label:"Collapse selected group"},{keys:["→"],label:"Expand selected group"},{keys:["Enter"],label:"Open selected item"},{keys:["a"],label:"Archive item"},{keys:["y"],label:"Archive item"},{keys:["r"],label:"Mark as read"},{keys:["U"],label:"Mark as unread"}]},{title:"Task detail",shortcuts:[{keys:["y"],label:"Quick-archive back to inbox"},{keys:["g","i"],label:"Go to inbox"},{keys:["g","c"],label:"Focus comment composer"}]},{title:"Decisions",shortcuts:[{keys:["j"],label:"Move down"},{keys:["↓"],label:"Move down"},{keys:["k"],label:"Move up"},{keys:["↑"],label:"Move up"},{keys:["Enter"],label:"Open or close selected decision"},{keys:["x"],label:"Dismiss selected decision"}]},{title:"Global",shortcuts:[{keys:["/"],label:"Search current page or quick search"},{keys:["c"],label:"New task"},{keys:["["],label:"Toggle sidebar"},{keys:["]"],label:"Toggle panel"},{keys:["?"],label:"Show keyboard shortcuts"}]}];function Ew({children:e}){return(0,a.jsx)("kbd",{className:"inline-flex h-6 min-w-6 items-center justify-center rounded border border-line bg-bg-3 px-1.5 font-mono text-xs font-medium text-ink shadow-(--shadow-extract-10)",children:e})}r(Ew,"KeyCap");function J$(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"divide-y divide-line border-t border-line",children:Z$.map(e=>(0,a.jsxs)("div",{className:"px-5 py-3",children:[(0,a.jsx)("h3",{className:"mb-2 text-(length:--text-micro) font-semibold uppercase tracking-wider text-ink-3",children:e.title}),(0,a.jsx)("div",{className:"space-y-1.5",children:e.shortcuts.map(t=>(0,a.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,a.jsx)("span",{className:"text-sm text-ink/90",children:t.label}),(0,a.jsx)("div",{className:"flex items-center gap-1",children:t.keys.map((s,l)=>(0,a.jsxs)("span",{className:"flex items-center gap-1",children:[l>0&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:t.combo?"+":"then"}),(0,a.jsx)(Ew,{children:s})]},s))})]},t.label+t.keys.join()))})]},e.title))}),(0,a.jsx)("div",{className:"border-t border-line px-5 py-3",children:(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Press ",(0,a.jsx)(Ew,{children:"Esc"})," to close · Shortcuts are disabled in text fields"]})})]})}r(J$,"KeyboardShortcutsCheatsheetContent");function eU({open:e,onOpenChange:t}){return(0,a.jsx)(ks,{open:e,onOpenChange:t,children:(0,a.jsxs)($s,{className:"sm:max-w-md gap-0 p-0 overflow-hidden",showCloseButton:!1,children:[(0,a.jsx)(bo,{className:"px-5 pt-5 pb-3",children:(0,a.jsx)(Os,{className:"text-base",children:"Keyboard shortcuts"})}),(0,a.jsx)(J$,{})]})})}r(eU,"KeyboardShortcutsCheatsheet");var tU={info:"border-sky-300 bg-sky-50 text-sky-900 dark:border-sky-500/25 dark:bg-sky-950/60 dark:text-sky-100",success:"border-emerald-300 bg-emerald-50 text-emerald-900 dark:border-emerald-500/25 dark:bg-emerald-950/60 dark:text-emerald-100",warn:"border-amber-300 bg-amber-50 text-amber-900 dark:border-amber-500/25 dark:bg-amber-950/60 dark:text-amber-100",error:"border-red-300 bg-red-50 text-red-900 dark:border-red-500/30 dark:bg-red-950/60 dark:text-red-100"},nU={info:"bg-sky-500 dark:bg-sky-400",success:"bg-emerald-500 dark:bg-emerald-400",warn:"bg-amber-500 dark:bg-amber-400",error:"bg-red-500 dark:bg-red-400"};function aU({toast:e,onDismiss:t}){const[s,l]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{const c=requestAnimationFrame(()=>l(!0));return()=>cancelAnimationFrame(c)},[]),(0,a.jsx)("li",{className:Y("pointer-events-auto rounded-sm border shadow-lg backdrop-blur-xl transition-(--tp-transform-opacity) duration-200 ease-out",s?"translate-y-0 opacity-100":"translate-y-3 opacity-0",tU[e.tone]),children:(0,a.jsxs)("div",{className:"flex items-start gap-3 px-3 py-2.5",children:[e.actor?.type==="agent"?(0,a.jsx)(mr,{agent:{id:e.actor.id,name:e.actor.name,appearance:e.actor.appearance},size:24}):e.actor?.type==="user"?(0,a.jsxs)(Yd,{size:"sm","aria-hidden":"true",children:[e.actor.image&&(0,a.jsx)(Qd,{src:e.actor.image,alt:""}),(0,a.jsx)(Gd,{children:W3(e.actor.name)})]}):(0,a.jsx)("span",{className:Y("mt-1 h-2 w-2 shrink-0 rounded-full",nU[e.tone])}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-semibold leading-5",children:e.title}),e.body&&(0,a.jsx)("p",{className:"mt-1 text-xs leading-4 opacity-70",children:e.body}),e.action&&(e.action.onClick?(0,a.jsx)("button",{type:"button",onClick:r(()=>{e.action?.onClick?.(),t(e.id)},"onClick"),className:"mt-2 inline-flex text-xs font-medium underline underline-offset-4 hover:opacity-90",children:e.action.label}):e.action.href?(0,a.jsx)(mn,{to:e.action.href,onClick:r(()=>t(e.id),"onClick"),className:"mt-2 inline-flex text-xs font-medium underline underline-offset-4 hover:opacity-90",children:e.action.label}):null)]}),(0,a.jsx)("button",{type:"button","aria-label":"Dismiss notification",onClick:r(()=>t(e.id),"onClick"),className:"mt-0.5 shrink-0 rounded p-1 opacity-50 hover:bg-black/10 hover:opacity-100 dark:hover:bg-white/10",children:(0,a.jsx)(ia,{className:"h-3.5 w-3.5"})})]})})}r(aU,"AnimatedToast");function sU(){const e=Q3(),{dismissToast:t}=Ri();return e.length===0?null:(0,a.jsx)("aside",{"aria-live":"polite","aria-atomic":"false",className:"pointer-events-none fixed bottom-3 left-3 z-(--z-120) w-full max-w-sm px-1",children:(0,a.jsx)("ol",{className:"flex w-full flex-col-reverse gap-2",children:e.map(s=>(0,a.jsx)(aU,{toast:s,onDismiss:t},s.id))})})}r(sU,"ToastViewport");async function Iw(e,t){const s=await fetch(`/api/announcements/${e}`,{credentials:"same-origin",cache:"no-store",...t});if(!s.ok)throw new Ti("Announcement request failed",s.status,null);return s}r(Iw,"request");var Tw={async current(e){const t=await(await Iw("current",{signal:e})).json();return t===null?null:jE.parse(t)},async dismiss(e,t,s){await Iw(`${encodeURIComponent(e)}/dismiss`,{method:"POST",signal:s,headers:{"Content-Type":"application/json"},body:JSON.stringify({companyId:t})})}},Lg=new Map;function xx(e){return`wardmote.announcement-dismissals.v1:${encodeURIComponent(e)}:`}r(xx,"announcementStoragePrefix");function vd(e){const t=xx(e),s=new Map;try{for(let l=0;l<localStorage.length;l++){const c=localStorage.key(l);if(!c?.startsWith(t))continue;const u=c.slice(t.length),p=localStorage.getItem(c);iS.safeParse(u).success&&(p==="pending"||p==="synced")&&Lg.set(c,p==="pending")}}catch{}for(const[l,c]of Lg)l.startsWith(t)&&s.set(l.slice(t.length),c);return s}r(vd,"readAnnouncementDismissals");function Ch(e,t,s){const l=`${xx(e)}${t}`;Lg.set(l,s);try{return localStorage.setItem(l,s?"pending":"synced"),!0}catch{return!1}}r(Ch,"saveAnnouncementDismissal");var iU=3e3;function rU(e){const{userId:t,enabled:s}=e,l=(0,x.useRef)(e);l.current=e;const[c,u]=(0,x.useState)(null),p=(0,x.useRef)(()=>{});(0,x.useEffect)(()=>{if(u(null),!t||!s)return;let h=!1,g=0,v=null,y;const j=new Map,k=new Set,S=xx(t);let N=null;try{N=new BroadcastChannel(S)}catch{}const I=r(()=>!h&&l.current.userId===t&&l.current.enabled,"active");async function C(E,B=!0){if(!I()||j.has(E)||!l.current.companyId)return;const O=new AbortController;j.set(E,O);const Q=setTimeout(()=>O.abort(),1e4);try{await Tw.dismiss(E,l.current.companyId,O.signal),I()&&Ch(t,E,!1)}catch{I()&&!k.has(E)&&(k.add(E),l.current.onSaveFailure(B))}finally{clearTimeout(Q),j.delete(E)}}r(C,"sync");async function M(){for(const[E,B]of vd(t)){if(!I())return;B&&await C(E)}}r(M,"flush");function R(){g++,clearTimeout(y),v?.abort(),v=null,u(null)}r(R,"suspend");function _(){if(!I()||document.visibilityState==="hidden")return;R();const E=g,B=new AbortController;v=B;const O=r(()=>I()&&g===E&&!B.signal.aborted,"stillCurrent");let Q=!1,V=!1,ue=null;const ce=r(()=>{!O()||!Q||!V||ue&&!vd(t).has(ue.id)&&(!ue.expiresAt||Date.parse(ue.expiresAt)>Date.now())&&u({userId:t,announcement:ue})},"show");y=setTimeout(()=>{Q=!0,ce()},iU),M(),Tw.current(B.signal).then(X=>{ue=X,V=!0,ce()}).catch(()=>{})}r(_,"resume");function D(){const E=vd(t);u(B=>B?.userId===t&&E.has(B.announcement.id)?null:B)}r(D,"receive");function U(E){E.key?.startsWith(S)&&D()}r(U,"onStorage");function K(){document.visibilityState==="hidden"?R():_()}r(K,"onVisibility");function z(){M()}return r(z,"onOnline"),N&&(N.onmessage=E=>{const B=iS.safeParse(E.data);B.success&&(vd(t).has(B.data)||Ch(t,B.data,!0),D())}),p.current=E=>{if(!I())return;const B=Ch(t,E,!0);u(null),g++,v?.abort();try{N?.postMessage(E)}catch{}C(E,B)},document.addEventListener("visibilitychange",K),window.addEventListener("online",z),window.addEventListener("storage",U),_(),()=>{h=!0,g++,clearTimeout(y),v?.abort();for(const E of j.values())E.abort();N?.close(),document.removeEventListener("visibilitychange",K),window.removeEventListener("online",z),window.removeEventListener("storage",U),p.current=()=>{}}},[t,s]);const f=s&&c?.userId===t?c.announcement:null;return(0,x.useEffect)(()=>{if(!f?.expiresAt)return;let h;const g=r(()=>{const v=Date.parse(f.expiresAt)-Date.now();v<=0?u(null):h=setTimeout(g,Math.min(v,2147483647))},"check");return g(),()=>clearTimeout(h)},[f]),{announcement:f,dismiss:(0,x.useCallback)(h=>p.current(h),[])}}r(rU,"useAnnouncement");function lU(e,t){const s=F0(),l=t??`/api/announcements/${encodeURIComponent(e.id)}/animation`,c=`${l}:${e.animation?.path??""}`,[u,p]=(0,x.useState)(null),f=!!e.animation&&!s;return(0,x.useEffect)(()=>{if(!f)return;const h=new AbortController,g=setTimeout(()=>h.abort(),5e3);return(async()=>{try{const v=await fetch(l,{credentials:"same-origin",cache:"no-store",redirect:"error",referrerPolicy:"no-referrer",signal:h.signal});if(!v.ok||v.headers.get("content-type")?.split(";")[0]!=="text/html")return;const y=await v.text();h.signal.aborted||p({key:c,document:`<meta http-equiv="Content-Security-Policy" content="${_E}">${y}`})}catch{}finally{clearTimeout(g)}})(),()=>{h.abort(),clearTimeout(g)}},[f,c,l]),f&&u?.key===c?u.document:null}r(lU,"useAnnouncementAnimation");function Rw({action:e,primary:t,onClick:s}){const l=(0,a.jsxs)(a.Fragment,{children:[e.label,!t&&e.kind==="external"&&(0,a.jsx)(UI,{className:"size-3.5 shrink-0","aria-hidden":"true"})]}),c=r(u=>{u.button===1&&s()},"onAuxClick");return(0,a.jsx)(oe,{asChild:!0,variant:t?"primary":"ghost",size:"sm",className:"h-auto min-h-9 min-w-0 whitespace-normal py-2 text-left",children:e.kind==="external"?(0,a.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:s,onAuxClick:c,children:l}):(0,a.jsx)(mn,{to:e.path,onClick:s,onAuxClick:c,children:l})})}r(Rw,"Action");function oU({announcement:e,onDismiss:t,imageSrc:s,animationSrc:l,className:c}){const u=(0,x.useId)(),[p,f]=(0,x.useState)(null),h=s??`/api/announcements/${encodeURIComponent(e.id)}/image`,g=!!(e.image&&p!==h),v=lU(e,l),y=!!v;return(0,a.jsxs)(Hc,{role:"region","aria-labelledby":u,className:Y("relative w-full max-w-(--announcement-width) gap-0 overflow-hidden rounded-xl p-0 shadow-sm",c),onKeyDown:r(j=>{j.key==="Escape"&&(j.preventDefault(),j.stopPropagation(),t())},"onKeyDown"),children:[(g||v)&&(0,a.jsxs)("div",{className:"relative h-(--announcement-image-mobile-height) w-full shrink-0 overflow-hidden bg-bg-3 md:h-(--announcement-image-height)",children:[g&&(0,a.jsx)("img",{src:h,alt:y?"":e.image.alt,referrerPolicy:"no-referrer",onError:r(()=>f(h),"onError"),className:"h-full w-full object-cover"}),y&&(0,a.jsx)("div",{role:"img","aria-label":e.animation.alt,className:"pointer-events-none absolute inset-0",children:(0,a.jsx)("iframe",{title:e.animation.alt,"aria-hidden":"true",tabIndex:-1,sandbox:"",referrerPolicy:"no-referrer",srcDoc:v,className:"h-full w-full border-0"})})]}),(0,a.jsx)(oe,{variant:"secondary",size:"icon","aria-label":"Dismiss announcement",onClick:t,className:"absolute right-2 top-2 z-10 size-8 rounded-full shadow-sm",children:(0,a.jsx)(ia,{className:"size-4","aria-hidden":"true"})}),(0,a.jsxs)("div",{className:Y("flex flex-col gap-1 px-4 py-4",!g&&!v&&"pr-12"),children:[(0,a.jsx)("p",{className:"text-xs text-ink-3",children:e.eyebrow}),(0,a.jsx)("h2",{id:u,className:"break-words text-base font-semibold leading-snug",children:e.title}),(0,a.jsx)("p",{className:"break-words text-sm leading-snug text-ink-3",children:e.description})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t px-3 py-2",children:[e.secondaryLink&&(0,a.jsx)(Rw,{action:e.secondaryLink,onClick:t}),(0,a.jsx)("div",{className:"ml-auto min-w-0 max-w-full",children:(0,a.jsx)(Rw,{action:e.primaryAction,primary:!0,onClick:t})})]})]})}r(oU,"AnnouncementCard");var cU='[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"], [aria-modal="true"]:not([data-state="closed"]), dialog[open]';function uU(e){const[t,s]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{if(!e)return;const l=r(()=>s(!!document.querySelector(cU)),"scan");l();const c=new MutationObserver(l);return c.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","aria-modal","open"]}),()=>c.disconnect()},[e]),t}r(uU,"useModalOpen");function dU({health:e}){const{userId:t,settled:s}=N0(),{selectedCompanyId:l,loading:c}=bt(),{onboardingOpen:u}=Ff(),p=Lf(),f=G3(),h=e?.deploymentMode==="local_trusted"?"local-board":s?t:null,{announcement:g,dismiss:v}=rU({userId:h,companyId:l,enabled:!!(h&&!c&&l&&!u),onSaveFailure:r(j=>p?.pushToast({title:j?"Dismissed in this browser":"Dismissed for this visit",body:"Couldn’t save across devices. We’ll retry when you reconnect or return.",tone:"info",dedupeKey:"announcement-dismissal-sync"}),"onSaveFailure")}),y=uU(!!g);return!g||y||(f?.length??0)>0?null:(0,a.jsx)("aside",{"aria-label":"Wardmote announcements",className:"announcement-well fixed left-3 bottom-(--announcement-mobile-bottom) z-40 w-(--announcement-available-width) max-w-(--announcement-width) max-h-(--announcement-mobile-max-height) overflow-y-auto md:bottom-3 md:max-h-(--announcement-max-height)",children:(0,a.jsx)(oU,{announcement:g,onDismiss:r(()=>v(g.id),"onDismiss")},g.id)})}r(dU,"AnnouncementWell");function tp(e){const t=e.split("/").filter(Boolean);return t.length===1?t[0]?.toLowerCase()==="onboarding":t.length===2?t[1]?.toLowerCase()==="onboarding":!1}r(tp,"isOnboardingPath");function fU(e){const t=e.split("/").filter(Boolean);if(t.length===2&&t[1]?.toLowerCase()==="onboarding")return t[0]}r(fU,"companyPrefixFromOnboardingPath");function jA(){return 3}r(jA,"onboardingStepForCompany");function pU(e){const{pathname:t,companyPrefix:s,companies:l}=e;if(!tp(t))return null;if(!s)return{initialStep:1};const c=l.find(u=>u.issuePrefix.toUpperCase()===s.toUpperCase())??null;return c?{initialStep:jA(),companyId:c.id}:{initialStep:1}}r(pU,"resolveRouteOnboardingOptions");function _Y(e){return!e.agentsLoaded||e.agentsRefreshing||e.agentCount>0?!1:!tp(e.pathname)}r(_Y,"shouldRouteAgentlessCompanyToOnboarding");function bx(e){return!e.hasCompanies&&!tp(e.pathname)}r(bx,"shouldRedirectCompanylessRouteToOnboarding");function mU(e){return e.onboardingOpen||!e.routeDismissed}r(mU,"isOnboardingWizardActive");function hU({context:e}){const{slots:t,errorMessage:s}=qc({slotTypes:["appShellOverlay"],companyId:e.companyId});return s||t.length===0?null:(0,a.jsx)("aside",{className:"plugin-app-shell-overlays","aria-label":"Application extensions",children:t.map(l=>(0,a.jsx)(P0,{slot:l,context:e,className:"plugin-app-shell-overlay"},`${l.pluginId}:${l.pluginVersion}:${l.id}`))})}r(hU,"AppShellEntries");function gU({localTrusted:e=!1}){const{userId:t,settled:s}=N0(),{selectedCompanyId:l,selectedCompany:c,loading:u}=bt(),{onboardingOpen:p,onboardingRouteDismissed:f}=Ff(),{pathname:h}=hn(),g=s?t??(e?"local-board":null):null,v=p||!f&&tp(h);if(!g||u||v)return null;const y={companyId:l,companyPrefix:c?.issuePrefix??null,projectId:null,entityId:null,entityType:null,parentEntityId:null,userId:t};return(0,a.jsx)(hU,{context:y},JSON.stringify([g,l]))}r(gU,"PluginAppShellOverlays");var Mw="relative flex min-h-(--sz-calc-11) min-w-0 flex-col items-center justify-center gap-1 rounded-md text-(length:--text-nano) font-medium transition-colors";function xU({visible:e}){const{selectedCompanyId:t}=bt(),{sidebarOpen:s,setSidebarOpen:l}=Jn(),c=Z0(t),{enabled:u}=Pf(),{enabled:p}=Jf(),f=(0,x.useMemo)(()=>[{to:"/dashboard",label:"Home",icon:kR},...p?[]:[{to:"/inbox",label:"Inbox",icon:T0,badge:c.inbox}],{to:"/issues",label:"Tasks",icon:ng,badge:p?c.inbox:void 0},...u?[{to:"/chats",label:"Chat",icon:wg}]:[]],[c.inbox,u,p]);return(0,a.jsx)("nav",{className:"mobile-bottom-nav fixed inset-x-0 bottom-0 z-30 bg-bg-3 pb-(--sz-safe-bottom)","data-visible":e,inert:!e,"aria-label":"Mobile navigation",children:(0,a.jsxs)("div",{className:"grid h-16 px-1",style:{gridTemplateColumns:`repeat(${f.length+1}, minmax(0, 1fr))`},children:[f.map(h=>{const g=h.icon;return(0,a.jsx)(bS,{to:h.to,state:Of,className:r(({isActive:v})=>Y(Mw,v?"text-ink":"text-ink-3"),"className"),children:r(({isActive:v})=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"relative",children:[(0,a.jsx)(g,{className:Y("h-(--sz-18px) w-(--sz-18px)",v&&"stroke-(length:--sw-2_3)")}),h.badge!=null&&h.badge>0&&(0,a.jsx)(Dn,{variant:"ghost",className:"absolute -end-2 -top-2 bg-accent px-1.5 text-(length:--text-nano) leading-none text-accent-ink",children:h.badge>99?"99+":h.badge})]}),(0,a.jsx)("span",{className:"truncate",children:h.label})]}),"children")},h.label)}),(0,a.jsxs)("button",{type:"button","aria-expanded":s,onClick:r(()=>l(!0),"onClick"),className:Y(Mw,s?"text-ink":"text-ink-3"),children:[(0,a.jsx)(H1,{className:"h-(--sz-18px) w-(--sz-18px)"}),(0,a.jsx)("span",{className:"truncate",children:"More"})]})]})})}r(xU,"MobileBottomNav");function Jl(e){if(typeof document>"u")return null;const t=document.querySelector(`meta[name="${e}"]`)?.getAttribute("content")?.trim();return t||null}r(Jl,"readMetaContent");function zg(e){if(!e)return null;const t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]{3}$/.test(t)?`#${t.split("").map(s=>`${s}${s}`).join("").toLowerCase()}`:/^[0-9a-fA-F]{6}$/.test(t)?`#${t.toLowerCase()}`:null}r(zg,"normalizeHexColor");function bU(e){const t=zg(e)??"#000000";return{r:Number.parseInt(t.slice(1,3),16),g:Number.parseInt(t.slice(3,5),16),b:Number.parseInt(t.slice(5,7),16)}}r(bU,"hexToRgb");function Ah(e){const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}r(Ah,"relativeLuminanceChannel");function vU(e){const{r:t,g:s,b:l}=bU(e),c=.2126*Ah(t)+.7152*Ah(s)+.0722*Ah(l);return 1.05/(c+.05)>=(c+.05)/.05?PT:$T}r(vU,"pickReadableTextColor");function EY(){return Jl("wardmote-worktree-enabled")==="true"}r(EY,"isWorktreeRuntime");function IY(){return Jl("wardmote-instance-id")}r(IY,"getWorktreeInstanceId");function yU(){if(Jl("wardmote-worktree-enabled")!=="true")return null;const e=Jl("wardmote-worktree-name"),t=zg(Jl("wardmote-worktree-color"));return!e||!t?null:{enabled:!0,name:e,color:t,textColor:zg(Jl("wardmote-worktree-text-color"))??vU(t)}}r(yU,"getWorktreeUiBranding");function jU(){const e=yU(),{copied:t,failed:s,copy:l}=VT(),c=(0,x.useCallback)(()=>{e&&l(e.name)},[e,l]);return e?(0,a.jsx)("div",{className:"relative overflow-hidden border-b px-3 py-1.5 text-(length:--text-micro) font-medium tracking-(--tracking-caps) uppercase",style:{backgroundColor:e.color,color:e.textColor,borderColor:`${e.textColor}22`,boxShadow:`inset 0 -1px 0 ${e.textColor}18`,backgroundImage:`linear-gradient(90deg, ${e.textColor}14, transparent 28%, transparent 72%, ${e.textColor}12), repeating-linear-gradient(135deg, transparent 0 10px, ${e.textColor}08 10px 20px)`},children:(0,a.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden whitespace-nowrap",children:[(0,a.jsx)("span",{className:"shrink-0 opacity-70",children:"Worktree"}),(0,a.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-70","aria-hidden":"true"}),(0,a.jsx)("button",{type:"button",onClick:c,title:"Click to copy worktree name",className:"truncate font-semibold tracking-(--tracking-eyebrow) cursor-pointer hover:opacity-80 transition-opacity bg-transparent border-none p-0 text-current uppercase text-(length:--text-micro)",children:t?"Copied!":s?"Copy failed":e.name})]})}):null}r(jU,"WorktreeBanner");var wU=3e4;function kU(e){if(!e)return null;const t=new Date(e).getTime();if(Number.isNaN(t))return null;const s=Date.now()-t;if(s<6e4)return"just now";const l=Math.round(s/6e4);if(l<60)return`${l}m ago`;const c=Math.round(l/60);return c<24?`${c}h ago`:`${Math.round(c/24)}d ago`}r(kU,"formatRelativeTimestamp");function SU(e){return e.reason==="backend_changes_and_pending_migrations"?"backend files changed and migrations are pending":e.reason==="pending_migrations"?"pending migrations need a fresh boot":"backend files changed since this server booted"}r(SU,"describeReason");function NU({devServer:e}){const[t,s]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{if(!t)return;const h=window.setTimeout(()=>{s(!1)},wU);return()=>window.clearTimeout(h)},[t]),!e?.enabled||!e.restartRequired)return null;const l=e,c=kU(e.lastChangedAt),u=e.changedPathsSample.slice(0,3),p=`${e.activeRunCount} live run${e.activeRunCount===1?"":"s"}`;async function f(){const h=l.activeRunCount>0?`Restart Wardmote now? This may interrupt ${p}.`:"Restart Wardmote now?";if(window.confirm(h)){s(!0);try{await Fc.requestDevServerRestart()}catch(g){s(!1),window.alert(g instanceof Error?g.message:"Failed to request restart")}}}return r(f,"requestRestartNow"),(0,a.jsx)("div",{className:"border-b border-amber-300/60 bg-amber-50 text-amber-950 dark:border-amber-500/25 dark:bg-amber-500/10 dark:text-amber-100",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 px-3 py-2.5 md:flex-row md:items-center md:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-(--tracking-caps)",children:[(0,a.jsx)(ai,{className:"h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{children:"Restart Required"}),e.autoRestartEnabled?(0,a.jsx)(Dn,{variant:"ghost",className:"bg-amber-900/10 text-(length:--text-nano) tracking-(--tracking-eyebrow) dark:bg-amber-100/10",children:"Auto-Restart On"}):null]}),(0,a.jsxs)("p",{className:"mt-1 text-sm",children:[SU(e),c?` · updated ${c}`:""]}),(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-amber-900/80 dark:text-amber-100/75",children:[u.length>0?(0,a.jsxs)("span",{children:["Changed: ",u.join(", "),e.changedPathCount>u.length?` +${e.changedPathCount-u.length} more`:""]}):null,e.pendingMigrations.length>0?(0,a.jsxs)("span",{children:["Pending migrations: ",e.pendingMigrations.slice(0,2).join(", "),e.pendingMigrations.length>2?` +${e.pendingMigrations.length-2} more`:""]}):null]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs font-medium md:justify-end",children:[e.waitingForIdle?(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full bg-amber-900/10 px-3 py-1.5 dark:bg-amber-100/10",children:[(0,a.jsx)(KR,{className:"h-3.5 w-3.5"}),(0,a.jsxs)("span",{children:["Waiting for ",p," to finish"]})]}):e.autoRestartEnabled?(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full bg-amber-900/10 px-3 py-1.5 dark:bg-amber-100/10",children:[(0,a.jsx)(gc,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{children:"Auto-restart will trigger when the instance is idle"})]}):(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 rounded-full bg-amber-900/10 px-3 py-1.5 dark:bg-amber-100/10",children:[(0,a.jsx)(gc,{className:"h-3.5 w-3.5"}),(0,a.jsxs)("span",{children:["Restart ",(0,a.jsx)("code",{children:"pnpm dev:once"})," after the active work is safe to interrupt"]})]}),(0,a.jsxs)(oe,{variant:"primary",size:"sm",type:"button",onClick:r(()=>{f()},"onClick"),disabled:t,children:[(0,a.jsx)(gc,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{children:t?"Restart requested":"Restart now"})]})]})]})})}r(NU,"DevRestartBanner");var CU=new Set(["disk_space_low","database_backup_skipped_low_disk"]);function AU({diskSpace:e,warnings:t}){const s=(t??[]).filter(u=>CU.has(u.code)),l=e?.level==="emergency",c=l?"Disk space critical":"Disk space low";return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"sr-only","aria-live":l?"assertive":"polite","aria-atomic":"true",children:s.length>0?`${c}. ${s.map(u=>u.message).join(" ")}`:""}),s.length>0&&(0,a.jsx)("section",{"aria-label":c,className:l?"border-b border-red-300/60 bg-red-50 text-red-950 dark:border-red-500/25 dark:bg-red-500/10 dark:text-red-100":"border-b border-amber-300/60 bg-amber-50 text-amber-950 dark:border-amber-500/25 dark:bg-amber-500/10 dark:text-amber-100",children:(0,a.jsxs)("div",{className:"px-3 py-2.5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-(--tracking-caps)",children:[(0,a.jsx)(ai,{className:"h-3.5 w-3.5 shrink-0"}),(0,a.jsx)("span",{children:c})]}),s.map(u=>(0,a.jsx)("p",{className:"mt-1 text-sm",children:u.message},u.code))]})})]})}r(AU,"DiskSpaceBanner");var eo={getStatus:r(()=>je.get("/instance/updates"),"getStatus"),getInstall:r(()=>je.get("/instance/updates/install",{cache:"no-store"}),"getInstall"),liveRuns:r(()=>je.get("/instance/live-runs",{cache:"no-store"}),"liveRuns"),startInstall:r((e,t)=>je.post("/instance/updates/install",{version:e,mode:t}),"startInstall"),forceInstall:r(()=>je.post("/instance/updates/install/force",{}),"forceInstall"),cancelInstall:r(()=>je.delete("/instance/updates/install"),"cancelInstall")};function Pg(e,t){return`${e} ${t}${e===1?"":"s"}`}r(Pg,"plural");function _U(e){return e?new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}r(_U,"formatTime$1");function EU({job:e,serverReachable:t}){switch(e.phase){case"waiting":return(0,a.jsxs)("p",{children:["Waiting for ",Pg(e.liveRuns,"run")," to finish. New runs wait until the update is done.",e.waitDeadline?` Gives up at ${_U(e.waitDeadline)} without changing anything.`:""]});case"installing":return(0,a.jsx)("p",{children:t?`Installing Wardmote ${e.toVersion}: database backup, install, then a restart. Database migrations can take a few minutes.`:"The server is restarting. This page reconnects by itself."});case"succeeded":return(0,a.jsxs)("p",{children:["Wardmote ",e.installedVersion??e.toVersion," is installed and running."]});case"cancelled":return(0,a.jsx)("p",{children:e.error??"The update was cancelled. Nothing was installed."});case"failed":return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("p",{children:e.rolledBackTo?`Updating to ${e.toVersion} failed and Wardmote was rolled back to ${e.rolledBackTo}.`:`Updating to ${e.toVersion} failed.`}),e.error?(0,a.jsx)("p",{className:"text-ink-3",children:e.error}):null,e.logHint?(0,a.jsxs)("p",{className:"text-ink-3",children:["Log: ",(0,a.jsx)("code",{className:"rounded bg-bg-3 px-1 py-0.5 text-xs",children:e.logHint})]}):null]})}}r(EU,"UpdateJobSummary");function IU({open:e,onOpenChange:t,status:s,job:l,serverReachable:c,showResult:u=!1}){const p=kn(),[f,h]=(0,x.useState)(null),[g,v]=(0,x.useState)(null);(0,x.useEffect)(()=>{Xl(l)&&v(l.id)},[l]);const y=l!==null&&(Xl(l)||u||l.id===g),j=me({queryKey:[...$.instance.updates,"live-runs"],queryFn:r(()=>eo.liveRuns(),"queryFn"),enabled:e&&!y,staleTime:0,refetchInterval:e&&!y?3e3:!1}),k=r(({job:_})=>{h(null),v(_.id),p.setQueryData([...$.instance.updates,"install"],{job:_})},"onJob"),S=r(_=>h(_ instanceof Error?_.message:String(_)),"onError"),N=Bt({mutationFn:r(_=>eo.startInstall(s.latestVersion,_),"mutationFn"),onSuccess:k,onError:S}),I=Bt({mutationFn:r(()=>eo.forceInstall(),"mutationFn"),onSuccess:k,onError:S}),C=Bt({mutationFn:r(()=>eo.cancelInstall(),"mutationFn"),onSuccess:k,onError:S}),M=N.isPending||I.isPending||C.isPending,R=j.data?j.data.count+j.data.pendingWakes:null;return(0,a.jsx)(ks,{open:e,onOpenChange:t,children:(0,a.jsxs)($s,{"data-testid":"update-install-dialog",children:[(0,a.jsxs)(bo,{children:[(0,a.jsxs)(Os,{children:["Update Wardmote to ",l&&y?l.toVersion:s.latestVersion]}),(0,a.jsxs)(vo,{children:["Installed ",s.currentVersion,". The update backs up the database, installs the new version and restarts the server. If the new version fails its health check, Wardmote rolls back automatically."]})]}),(0,a.jsxs)("div",{className:"text-sm text-ink","aria-live":"polite",children:[y&&l?(0,a.jsx)(EU,{job:l,serverReachable:c}):R===null?(0,a.jsx)("p",{children:j.isError?"Could not count the active runs.":"Counting active runs..."}):R>0?(0,a.jsx)("p",{children:R===1?"1 run is active now. Stopping it restarts it from its last checkpoint after the update; waiting lets it finish first.":`${R} runs are active now. Stopping them restarts each from its last checkpoint after the update; waiting lets them finish first.`}):(0,a.jsx)("p",{children:"No runs are active. The server restarts briefly."}),f?(0,a.jsx)("p",{role:"alert",className:"mt-2 text-bad",children:f}):null]}),(0,a.jsx)($f,{children:y&&l?l.phase==="waiting"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oe,{type:"button",variant:"secondary",disabled:M,onClick:r(()=>C.mutate(),"onClick"),children:"Cancel update"}),(0,a.jsxs)(oe,{type:"button",variant:"danger",disabled:M,onClick:r(()=>I.mutate(),"onClick"),children:["Stop ",Pg(l.liveRuns,"run")," and update now"]})]}):l.phase==="succeeded"?(0,a.jsx)(oe,{type:"button",onClick:r(()=>window.location.reload(),"onClick"),children:"Reload"}):(0,a.jsx)(oe,{type:"button",variant:"secondary",onClick:r(()=>t(!1),"onClick"),children:"Close"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oe,{type:"button",variant:"secondary",disabled:M,onClick:r(()=>t(!1),"onClick"),children:"Cancel"}),R!==null&&R>0?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oe,{type:"button",variant:"secondary",disabled:M,onClick:r(()=>N.mutate("wait"),"onClick"),children:"Wait for runs to finish"}),(0,a.jsxs)(oe,{type:"button",variant:"primary",autoFocus:!0,disabled:M,onClick:r(()=>N.mutate("force"),"onClick"),children:["Update and stop ",Pg(R,"run")]})]}):(0,a.jsx)(oe,{type:"button",variant:"primary",autoFocus:!0,disabled:M||R===null,onClick:r(()=>N.mutate("wait"),"onClick"),children:"Update now"})]})})]})})}r(IU,"UpdateInstallDialog");var wA="wardmote.updateNotice.hiddenUntil",Dw="wardmote.updateNotice.seenJob",Ow=36e5,TU=2e3,RU=864e5;function MU(e){return e?.source==="local_implicit"||e?.source==="session"&&e.isInstanceAdmin===!0}r(MU,"canSeeUpdateNotice");function kA(e){try{return window.localStorage.getItem(e)}catch{return null}}r(kA,"readStored$1");function Lw(e,t){try{window.localStorage.setItem(e,t)}catch{}}r(Lw,"writeStored");function zw(){const e=Number(kA(wA));return Number.isFinite(e)&&e>0?e:null}r(zw,"readHiddenUntil");var Pw="flex min-w-0 items-center gap-2 border-b border-line bg-accent-soft px-3 py-1.5 text-sm text-ink";function DU({now:e=Date.now}){const t=MU(me({queryKey:$.access.currentBoardAccess,queryFn:r(()=>ti.getCurrentBoardAccess(),"queryFn"),retry:!1,staleTime:3e4}).data),s=me({queryKey:$.instance.updates,queryFn:r(()=>eo.getStatus(),"queryFn"),enabled:t,retry:!1,staleTime:Ow,refetchInterval:Ow}),l=s.data?.install.canInstall===!0,c=me({queryKey:[...$.instance.updates,"install"],queryFn:r(()=>eo.getInstall(),"queryFn"),enabled:t&&l,retry:!1,refetchInterval:r(_=>Xl(_.state.data?.job)||_.state.status==="error"?TU:!1,"refetchInterval")}),u=c.data?.job??null,p=!c.isError,[f,h]=(0,x.useState)(null),[g,v]=(0,x.useState)(zw),[y,j]=(0,x.useState)(()=>kA(Dw)),k=cR(g,e());(0,x.useEffect)(()=>{if(!k||g===null)return;const _=window.setTimeout(()=>v(zw()),Math.max(0,g-e())+1e3);return()=>window.clearTimeout(_)},[k,g,e]);const S=s.data;if(!t||!S)return null;const N=u?.finishedAt?e()-Date.parse(u.finishedAt)<RU&&y!==u.id:!1,I=u?.phase==="succeeded"?!S.updateAvailable:u?.phase==="failed"&&S.latestVersion===u.toVersion,C=u!==null&&(Xl(u)||N&&I),M=l?(0,a.jsx)(IU,{open:f!==null,onOpenChange:r(_=>h(_?f??"start":null),"onOpenChange"),status:S,job:u,serverReachable:p,showResult:f==="result"}):null;if(C&&u){const _=u.trigger==="auto"?"Automatic update":"Update",D=u.phase==="waiting"?`${_} to ${u.toVersion} is waiting for ${u.liveRuns} run${u.liveRuns===1?"":"s"} to finish`:u.phase==="installing"?p?`Installing Wardmote ${u.toVersion}...`:"Wardmote is restarting...":u.phase==="succeeded"?`Wardmote ${u.installedVersion??u.toVersion} is installed`:u.rolledBackTo?`${_} to ${u.toVersion} failed and was rolled back to ${u.rolledBackTo}`:`${_} to ${u.toVersion} failed`,U=r(()=>{Lw(Dw,u.id),j(u.id)},"dismiss");return(0,a.jsxs)("section",{"aria-label":"Wardmote update","data-testid":"update-notice","data-phase":u.phase,className:Pw,children:[Xl(u)?(0,a.jsx)(Ma,{className:"size-4 shrink-0 animate-spin text-accent","aria-hidden":"true"}):(0,a.jsx)(oj,{className:`size-4 shrink-0 ${u.phase==="failed"?"text-bad":"text-accent"}`,"aria-hidden":"true"}),(0,a.jsx)("p",{className:"min-w-0 flex-1 truncate font-semibold",role:"status",children:D}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"xs",onClick:r(()=>h("result"),"onClick"),children:"Details"}),Xl(u)?null:(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"xs",onClick:U,children:"Dismiss"}),M]})}if(!S.updateAvailable||!S.latestVersion||k)return null;const R=r(()=>{const _=oR(e());Lw(wA,String(_)),v(_)},"hide");return(0,a.jsxs)("section",{"aria-label":"Wardmote update available","data-testid":"update-notice",className:Pw,children:[(0,a.jsx)(oj,{className:"size-4 shrink-0 text-accent","aria-hidden":"true"}),(0,a.jsxs)("p",{className:"min-w-0 flex-1 truncate",title:`Installed ${S.currentVersion}. ${S.install.command}`,children:[(0,a.jsxs)("b",{className:"font-semibold",children:["Wardmote ",S.latestVersion,(0,a.jsx)("span",{className:"hidden sm:inline",children:" is available"})]}),(0,a.jsxs)("span",{className:"hidden sm:inline",children:[" · installed ",S.currentVersion]}),l?null:(0,a.jsxs)("span",{className:"hidden lg:inline",children:[" · ",(0,a.jsx)("code",{className:"rounded bg-bg px-1 py-0.5 text-xs",children:S.install.command})]})]}),S.releaseNotesUrl?(0,a.jsxs)("a",{href:S.releaseNotesUrl,target:"_blank",rel:"noreferrer",className:"shrink-0 text-sm font-medium text-accent underline-offset-2 hover:underline",children:[(0,a.jsx)("span",{className:"sm:hidden",children:"Notes"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:"Release notes"})]}):null,l?(0,a.jsx)(oe,{type:"button",variant:"primary",size:"xs",onClick:r(()=>h("start"),"onClick"),children:"Update now"}):null,(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"xs",onClick:R,title:"Hide for 3 days","aria-label":"Hide the update notice for 3 days",children:"Hide"}),M]})}r(DU,"UpdateNotice");var SA=["standalone","fullscreen","window-controls-overlay"];function OU(e){return`(display-mode: ${e})`}r(OU,"displayModeQuery");function LU(){if(!(typeof window>"u"||typeof window.matchMedia!="function"))return window.matchMedia.bind(window)}r(LU,"defaultMatchMedia");function $g(e=LU(),t=typeof navigator>"u"?void 0:navigator.standalone){return t===!0?!0:e?SA.some(s=>e(OU(s)).matches):!1}r($g,"isChromelessDisplayMode");function yd({label:e,children:t,onClick:s}){return(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm",className:"size-8","aria-label":e,onClick:r(()=>{s()},"onClick"),children:t})}),(0,a.jsx)(Ts,{children:e})]})}r(yd,"ControlButton");function zU(e=typeof window>"u"?null:window.history.state){const t=e?.idx;return typeof t=="number"&&t>0}r(zU,"hasInAppHistory");function PU(){const[e,t]=(0,x.useState)(()=>typeof window<"u"?$g():!1);return(0,x.useEffect)(()=>{if(typeof window>"u")return;const s=r(()=>t($g()),"update");if(s(),typeof window.matchMedia!="function")return;const l=SA.map(c=>window.matchMedia(`(display-mode: ${c})`));return l.every(c=>typeof c.addEventListener=="function")?(l.forEach(c=>c.addEventListener("change",s)),()=>l.forEach(c=>c.removeEventListener("change",s))):(l.forEach(c=>c.addListener(s)),()=>l.forEach(c=>c.removeListener(s)))},[]),e}r(PU,"useChromeless");function $w({mobile:e,onNavigateHome:t}){const s=PU(),l=Lf(),c=(0,x.useCallback)(()=>{if(zU()){window.history.back();return}t?t():window.location.assign("/dashboard")},[t]),u=(0,x.useCallback)(()=>{window.location.reload()},[]),p=(0,x.useCallback)(async()=>{const h=window.location.href;try{if(navigator.share){await navigator.share({title:document.title||"Wardmote",url:h});return}await q0(h),l?.pushToast({title:"Link copied",tone:"success"})}catch(g){if(g instanceof DOMException&&g.name==="AbortError")return;l?.pushToast({title:"Share failed",body:"Try opening the page in your browser.",tone:"error"})}},[l]),f=(0,x.useCallback)(()=>{window.open(window.location.href,"_blank","noopener,noreferrer")},[]);return s?(0,a.jsxs)("div",{className:Y("flex items-center gap-1",e?"h-10 border-b border-line bg-bg/95 px-3 backdrop-blur supports-[backdrop-filter]:bg-bg/85":"h-9 border-b border-line px-2"),children:[(0,a.jsx)(yd,{label:"Back",onClick:c,children:(0,a.jsx)(E0,{className:"h-4 w-4"})}),(0,a.jsx)("div",{className:"flex-1"}),(0,a.jsx)(yd,{label:"Refresh",onClick:u,children:(0,a.jsx)(nl,{className:"h-4 w-4"})}),(0,a.jsx)(yd,{label:"Share",onClick:p,children:(0,a.jsx)(LR,{className:"h-4 w-4"})}),(0,a.jsx)(yd,{label:"Open in Browser",onClick:f,children:(0,a.jsx)(qS,{className:"h-4 w-4"})})]}):null}r($w,"StandaloneBrowserControls");function $U(e){return e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}r($U,"formatTime");function UU(){const e=S0(),[t,s]=(0,x.useState)(null);return(0,x.useEffect)(()=>{if(!e){s(null);return}let l=!1;const c=new Date;return WE().then(u=>{l||s(u&&u<c?u:c)}),()=>{l=!0}},[e]),e?(0,a.jsxs)("div",{role:"status",className:"flex items-start gap-2 border-b border-line bg-warn-soft px-4 py-2 text-sm text-ink",children:[(0,a.jsx)(VR,{className:"mt-0.5 size-4 shrink-0 text-warn","aria-hidden":"true"}),(0,a.jsxs)("span",{children:[(0,a.jsx)("b",{className:"font-semibold",children:"You are offline."})," ",t?`Showing what was loaded at ${$U(t)}. `:"Showing what was already loaded. ","Approvals and replies wait until you are back."]})]}):null}r(UU,"OfflineBanner");function NA(){return typeof navigator>"u"?null:navigator.windowControlsOverlay??null}r(NA,"overlay");function BU(e){const t=NA();return t?.addEventListener("geometrychange",e),()=>t?.removeEventListener("geometrychange",e)}r(BU,"subscribe$2");function KU(){return(0,x.useSyncExternalStore)(BU,()=>NA()?.visible===!0,()=>!1)}r(KU,"useWindowControlsOverlayVisible");var qU={WebkitAppRegion:"drag",appRegion:"drag"},FU={WebkitAppRegion:"no-drag",appRegion:"no-drag"};function HU(){const{selectedCompanyId:e}=bt(),{inbox:t}=Z0(e);return(0,a.jsxs)("div",{"data-slot":"window-titlebar",className:"flex shrink-0 items-center gap-2 border-b border-line bg-bg px-3 text-xs text-ink-2",style:{...qU,marginLeft:"env(titlebar-area-x, 0px)",width:"env(titlebar-area-width, 100%)",height:"env(titlebar-area-height, 33px)"},children:[(0,a.jsx)(O0,{className:"size-4 shrink-0 text-ink","aria-hidden":"true"}),(0,a.jsx)("span",{className:"font-semibold text-ink",children:"Wardmote"}),(0,a.jsxs)(mn,{to:"/inbox",style:FU,className:"ml-1 inline-flex items-center gap-1 rounded-(--r-sm) px-1.5 py-0.5 hover:bg-bg-3 hover:text-ink","aria-label":t>0?`Inbox, ${t} waiting`:"Inbox",children:["Inbox",t>0?(0,a.jsx)("span",{className:"rounded-(--r-pill) bg-accent px-1.5 text-(length:--text-micro) font-semibold text-accent-ink tabular-nums",children:t}):null]})]})}r(HU,"TitleBarContent");function VU(){return KU()?(0,a.jsx)(HU,{}):null}r(VU,"WindowTitleBar");var WU=16384,QU=40;function GU(e){if(!e)return;const t=[];for(const s of e.slice(0,WU).split(`
|
|
52
52
|
`).slice(0,41)){const l=/^\s*(?:at|in) ([A-Za-z_$][\w$.-]{0,99})(?:\s|$)/.exec(s)?.[1]??/^([A-Za-z_$][\w$.-]{0,99})@/.exec(s)?.[1];if(l&&t.push(` at ${l}`),t.length===QU)break}return t.length?`
|
|
53
53
|
${t.join(`
|
|
54
|
-
`)}`:void 0}r(GU,"sanitizeComponentStack");function CA(){const e={};if(typeof document<"u"){try{const t=document.readyState;(t==="loading"||t==="interactive"||t==="complete")&&(e.ready_state=t)}catch{}try{const t=document.visibilityState;(t==="visible"||t==="hidden")&&(e.visibility_state=t)}catch{}try{const t=document.documentElement.classList;e.translation_marker=t.contains("translated-ltr")||t.contains("translated-rtl")}catch{}}return e}r(CA,"readBrowserErrorState");function YU(e){const t=GU(e.componentStack);return{tags:{react_error_boundary:e.boundary},contexts:{react:t?{componentStack:t}:{},browser_state:CA()}}}r(YU,"buildBrowserErrorContext");var Uw=Promise.resolve();function vx(e){const t=Uw.then(e);return Uw=t.catch(()=>{}),t}r(vx,"enqueue");var po=null;function XU(e,t){return vx(async()=>{if(!po)try{const s=await ke(()=>import("./prod-COP_vZWu.js"),__vite__mapDeps([0,1]));s.init(JU(e,t)),po=s}catch{}})}r(XU,"initBrowserErrorMonitoring");function ZU(){return vx(async()=>{const e=po;if(po=null,!e)return;const t=e.getClient();try{e.getCurrentScope().setClient(void 0)}catch{}try{await t?.close(2e3)}catch{}})}r(ZU,"teardownBrowserErrorMonitoring");function AA(e,t){let s;try{t&&(s=YU(t))}catch{}vx(async()=>{try{s?po?.captureException(e,s):po?.captureException(e)}catch{}})}r(AA,"captureBrowserException");function JU(e,t){return{dsn:e,environment:t??void 0,release:"1c77627e4b688e47dc495473d16803c0e8acca22",tracesSampleRate:0,sendDefaultPii:!1,beforeSend:r((s,l)=>{try{if(s.contexts={...s.contexts,browser_state:s.contexts?.browser_state??CA()},s.tags={...s.tags,browser_build_mode:"production"},s.exception?.values?.some(c=>c.mechanism?.type==="onunhandledrejection"||c.mechanism?.type==="auto.browser.global_handlers.onunhandledrejection")){const c=l.originalException;s.tags.browser_rejection_kind=c===null?"null":typeof c}}catch{}return s},"beforeSend"),integrations:r(s=>s.filter(l=>l.name!=="HttpContext"&&l.name!=="Breadcrumbs"),"integrations")}}r(JU,"buildBrowserSentryInitOptions");var e8=class extends x.Component{static{r(this,"RouteErrorBoundaryInner")}state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}componentDidCatch(e,t){AA(e,{boundary:"route",componentStack:t.componentStack})}componentDidUpdate(e){this.state.error&&e.resetKey!==this.props.resetKey&&this.setState({error:null})}render(){const{error:e}=this.state;return e?(0,a.jsxs)("div",{className:"mx-auto max-w-2xl space-y-4 px-4 py-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-lg font-semibold",children:"This page hit an error"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Something went wrong while rendering this page. You can go back and try again, or reload."})]}),(0,a.jsx)("pre",{className:"overflow-auto rounded-md border border-bad/30 bg-bad/10 px-3 py-2 text-xs text-bad whitespace-pre-wrap",children:e.message}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:this.props.onReset,children:"Go back"}),(0,a.jsx)(oe,{size:"sm",onClick:r(()=>window.location.reload(),"onClick"),children:"Reload page"})]})]}):this.props.children}};function t8({children:e}){const t=hn(),s=ja(),l=`${t.pathname}${t.search}`;return(0,a.jsx)(e8,{resetKey:l,onReset:r(()=>s(-1),"onReset"),children:e})}r(t8,"RouteErrorBoundary");function n8({open:e,onOpenChange:t,...s}){return(0,a.jsx)(ks,{open:e,onOpenChange:t,children:(0,a.jsxs)($s,{"aria-describedby":void 0,className:"gap-0 overflow-hidden p-0 sm:max-w-md",children:[(0,a.jsxs)("div",{className:"px-4 pt-4 pb-3",children:[(0,a.jsx)(Os,{children:"Chat with an agent"}),s.existingChatAgentIds&&(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"One conversation per agent. Pick up where you left off."})]}),(0,a.jsx)(a8,{...s,onComplete:r(()=>t(!1),"onComplete")},String(e))]})})}r(n8,"AgentChatPicker");function a8({agents:e,onSelect:t,onComplete:s,loading:l,error:c,onRetry:u,existingChatAgentIds:p,renderAgentIcon:f}){const h=(0,x.useRef)(!1),g=(0,x.useRef)(null);(0,x.useEffect)(()=>(h.current=!0,()=>{h.current=!1,g.current?.abort()}),[]);const[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(null),[S,N]=(0,x.useState)(null);async function I(C){if(j)return;k(C.id),N(null);const M=new AbortController;g.current=M;try{await t(C,M.signal),h.current&&s()}catch(R){N(R instanceof Error?R.message:"Couldn’t open chat. Try again.")}finally{k(null)}}return r(I,"selectAgent"),(0,a.jsxs)(a1,{children:[(0,a.jsx)($0,{"aria-label":"Search agents by name or role",placeholder:"Search by name or role…",value:v,onValueChange:y}),S&&(0,a.jsx)("p",{role:"alert",className:"px-4 py-3 text-sm text-bad",children:S}),j&&(0,a.jsx)("p",{role:"status",className:"sr-only",children:"Opening conversation…"}),c?(0,a.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 p-4 text-sm",children:[(0,a.jsx)("p",{children:"Couldn’t load agents. Try again."}),u&&(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:u,children:"Retry"})]}):l?(0,a.jsx)("p",{role:"status",className:"p-4 text-sm text-ink-3",children:"Loading agents…"}):(0,a.jsxs)(B0,{children:[(0,a.jsx)(U0,{children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4",children:[(0,a.jsx)("span",{children:e.length?`No agents match “${v}”`:"No agents yet."}),e.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Try another name or role."}),(0,a.jsx)(oe,{variant:"ghost",size:"sm",onClick:r(()=>y(""),"onClick"),children:"Clear search"})]}):(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Create an agent from the Agents page to start chatting."})]})}),(0,a.jsx)(Xs,{children:e.map(C=>(0,a.jsxs)(wn,{value:C.id,keywords:[C.name,C.title??"",C.role],onSelect:r(()=>{I(C)},"onSelect"),disabled:j!==null,className:"gap-3 px-3 py-3",children:[f?f(C):(0,a.jsx)(lg,{icon:C.icon,className:"size-4 shrink-0"}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"truncate font-medium",children:C.name}),(0,a.jsx)("span",{className:"truncate text-xs text-ink-3",children:C.title??C.role})]}),p&&(0,a.jsx)("span",{className:"shrink-0 text-xs text-ink-3",children:p.includes(C.id)?"Open chat":"New chat"}),C.status==="paused"&&(0,a.jsx)("span",{className:"text-xs text-(--status-agent-paused)",children:"Paused"}),C.status==="terminated"&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Terminated"}),C.status==="pending_approval"&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Awaiting approval"})]},C.id))})]})]})}r(a8,"AgentChatPickerResults");function s8({agents:e,existingChatAgentIds:t,availableAgents:s=e,activeId:l,previews:c={},loading:u=!1,error:p,onRetry:f,initialSearch:h="",onSelect:g,onBrowse:v,onAddChat:y,historyLoading:j,historyError:k,onRetryHistory:S}){const N=ja(),[I,C]=(0,x.useState)(!1),[M,R]=(0,x.useState)(h),_=(0,x.useRef)(null),D=(0,x.useId)(),U=M.trim().toLocaleLowerCase(),K=e.filter(E=>`${E.name} ${E.title??""} ${E.role}`.toLocaleLowerCase().includes(U));function z(){R(""),_.current?.focus()}return r(z,"focusSearch"),(0,a.jsxs)("aside",{"aria-labelledby":D,className:"flex h-full min-h-0 flex-col border-r border-line bg-bg",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col gap-4 px-3 pb-4 pt-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("h2",{id:D,className:"text-sm font-semibold",children:"Chat"}),(0,a.jsx)(oe,{variant:"secondary",size:"icon-sm","aria-label":"Add chat",title:"Add chat",onClick:r(()=>C(!0),"onClick"),children:(0,a.jsx)(as,{className:"size-4"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(pr,{"aria-hidden":"true",className:"pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-ink-3"}),(0,a.jsx)(Wn,{ref:_,"aria-label":"Search agents",placeholder:"Find an agent",value:M,onChange:r(E=>R(E.target.value),"onChange"),onKeyDown:r(E=>{E.key==="Escape"&&(E.stopPropagation(),R(""))},"onKeyDown"),className:"h-8 pl-8 pr-8 text-xs md:text-xs"}),M&&(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs","aria-label":"Clear search",className:"absolute right-1 top-1/2 -translate-y-1/2",onClick:z,children:(0,a.jsx)(ia,{className:"size-3"})})]})]}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-3 pb-3 scrollbar-auto-hide",children:[(0,a.jsx)("p",{className:"px-2 text-(length:--text-micro) font-medium uppercase tracking-widest text-ink-3",children:U?"Search results":"Teammates"}),(0,a.jsx)("span",{role:"status",className:"sr-only",children:u?"Loading agents":`${K.length} ${K.length===1?"agent":"agents"}`}),j&&(0,a.jsx)("p",{role:"status",className:"px-2 text-xs text-ink-3",children:"Loading chat history…"}),k&&(0,a.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 px-2 py-3",children:[(0,a.jsx)("p",{className:"text-xs text-ink-3",children:"Some chat history couldn’t load."}),(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:S,children:"Retry chat history"})]}),p?(0,a.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 px-2 py-6",children:[(0,a.jsx)("p",{className:"text-sm",children:"Couldn’t load your chats."}),(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:f,children:"Try again"})]}):u?(0,a.jsx)("div",{"aria-hidden":"true",className:"flex flex-col gap-1",children:[0,1,2,3].map(E=>(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-md px-2 py-3 motion-safe:animate-pulse",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg bg-bg-3"}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-2",children:[(0,a.jsx)("div",{className:"h-3 w-2/3 rounded-sm bg-bg-3"}),(0,a.jsx)("div",{className:"h-2 w-full rounded-sm bg-bg-3"})]})]},E))}):K.length?(0,a.jsx)("nav",{"aria-label":"Agent conversations",className:"flex flex-col gap-1",children:K.map(E=>(0,a.jsxs)(mn,{to:`/chats/${encodeURIComponent(E.status==="terminated"?E.id:fr(E))}`,"aria-current":l===E.id?"page":void 0,title:`${E.name}${E.title?` · ${E.title}`:""}`,onClick:r(B=>{g&&(B.preventDefault(),g(E))},"onClick"),className:Y("flex min-w-0 items-center gap-3 rounded-md px-2 py-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus",l===E.id?oo.active:oo.rest),children:[(0,a.jsx)(mr,{agent:E,size:32}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"truncate text-sm font-medium",children:E.name}),(0,a.jsx)("span",{className:"truncate text-xs text-ink-3",children:E.status==="terminated"?"Terminated":E.status==="paused"?"Paused":c[E.id]??E.title??"Start a conversation"})]})]},E.id))}):!e.length&&(j||k)?null:(0,a.jsxs)("div",{className:"flex flex-col items-start gap-2 px-2 py-6",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.length?"No agents found":"No chats yet"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-ink-3",children:e.length?"Try another name or role.":"Choose an agent to start a conversation."}),!e.length&&(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:r(()=>C(!0),"onClick"),children:"Choose an agent"}),e.length>0&&(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:z,children:"Clear search"})]})]}),(0,a.jsx)("div",{className:"shrink-0 px-3 py-4",children:(0,a.jsx)(oe,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2 px-2",asChild:!v,onClick:v,children:v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Gr,{className:"size-4"}),"Browse all agents"]}):(0,a.jsxs)(mn,{to:"/agents/all",children:[(0,a.jsx)(Gr,{className:"size-4"}),"Browse all agents"]})})}),(0,a.jsx)(n8,{agents:s,open:I,onOpenChange:C,existingChatAgentIds:t??e.map(E=>E.id),loading:u,error:p,onRetry:f,renderAgentIcon:r(E=>(0,a.jsx)(mr,{agent:E,size:32}),"renderAgentIcon"),onSelect:r(async(E,B)=>{y?await y(E,B):g?await g(E,B):N(`/chats/${encodeURIComponent(fr(E))}`),B?.aborted||R("")},"onSelect")})]})}r(s8,"AgentConversationSidebar");function i8(){const{selectedCompanyId:e}=bt(),{enabled:t,loaded:s}=Pf(),l=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),c=l.data?.user?.id??l.data?.session?.userId??null;return{companyId:e,userId:c,enabled:t,loaded:s,agents:me({queryKey:$.agents.list(e),queryFn:r(()=>Ha.list(e),"queryFn"),enabled:t&&!!e}),chats:me({queryKey:$.agentChats.list(e,c),queryFn:r(()=>o1.list(e),"queryFn"),enabled:t&&!!e&&l.isSuccess}),session:l}}r(i8,"useAgentChatNavigation");function r8(e,t){const s=kn(),l=ja(),{isMobile:c,setSidebarOpen:u}=Jn(),p=(0,x.useRef)({companyId:e,userId:t,mounted:!0});return(0,x.useEffect)(()=>{const f={companyId:e,userId:t,mounted:!0};return p.current=f,()=>{f.mounted=!1}},[e,t]),(0,x.useCallback)(async(f,h)=>{if(!e||f.companyId!==e)throw new Error("Choose an agent from this company.");const g=p.current,v=await o1.ensure(e,f.id);s.setQueryData($.agentChats.detail(e,t,f.id),v),s.setQueryData($.issues.detail(v.id),v),s.setQueryData($.agentChats.list(e,t),y=>[v,...(y??[]).filter(j=>j.id!==v.id)].sort((j,k)=>new Date(k.updatedAt).getTime()-new Date(j.updatedAt).getTime()||k.id.localeCompare(j.id))),!(!g.mounted||p.current!==g||h?.aborted)&&(l(`/chats/${encodeURIComponent(fr(f))}`),c&&u(!1))},[s,e,t,l,c,u])}r(r8,"useOpenAgentChat");function l8(){const{companyId:e,userId:t,agents:s,chats:l,session:c}=i8(),u=r8(e,t),p=ja(),f=Y0(e),{isMobile:h,setSidebarOpen:g}=Jn(),{pathname:v}=hn(),y=v.split("/chats/")[1]?.split("/")[0],j=s.data??[],k=s.isSuccess?[...new Set((l.data??[]).flatMap(D=>D.conversationAgentId&&!j.some(U=>U.id===D.conversationAgentId)?[D.conversationAgentId]:[]))]:[],S=Ef({queries:k.map(D=>({queryKey:$.agents.detail(D),queryFn:r(()=>Ha.get(D,e),"queryFn")}))}),N=new Map(j.map(D=>[D.id,D]));for(const D of S)D.data&&N.set(D.data.id,D.data);const I=[...N.values()].find(D=>D.id===y||D.status!=="terminated"&&encodeURIComponent(fr(D))===y),C=(l.data??[]).flatMap(D=>{const U=D.conversationAgentId?N.get(D.conversationAgentId):void 0;return U?[U]:[]});I&&!C.some(D=>D.id===I.id)&&C.unshift(I);const M=new Set(C.map(D=>D.id)),R=j.filter(D=>!M.has(D.id)&&D.status!=="terminated"&&(!f.isSuccess||$N(f.data,"agent",D.id)!=="left")).sort((D,U)=>D.name.localeCompare(U.name,void 0,{sensitivity:"base"})),_=Object.fromEntries((l.data??[]).filter(D=>D.conversationState==="active").map(D=>[D.conversationAgentId,"Working…"]));return(0,a.jsx)(s8,{agents:[...C,...R],availableAgents:j,existingChatAgentIds:C.map(D=>D.id),activeId:I?.id,previews:_,loading:s.isPending||l.isPending||c.isPending,error:s.error??l.error??c.error,onRetry:r(()=>{s.refetch(),l.refetch(),c.refetch()},"onRetry"),historyLoading:S.some(D=>D.isPending),historyError:S.find(D=>D.error)?.error,onRetryHistory:r(()=>{S.filter(D=>D.isError).forEach(D=>{D.refetch()})},"onRetryHistory"),onAddChat:u,onSelect:r(D=>{p(`/chats/${encodeURIComponent(D.status==="terminated"?D.id:fr(D))}`),h&&g(!1)},"onSelect")},`${e}:${t}`)}r(l8,"AgentConversationsSidebar");var jd=232,Ug=208,Bg=420,Bw=16;function gf(e){return Math.min(Bg,Math.max(Ug,e))}r(gf,"clampSidebarWidth");function Kw(e){if(typeof window>"u")return jd;try{const t=window.localStorage.getItem(e);if(!t)return jd;const s=Number.parseInt(t,10);return Number.isFinite(s)?gf(s):jd}catch{return jd}}r(Kw,"readStoredSidebarWidth");function qw(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,String(gf(t)))}catch{}}r(qw,"writeStoredSidebarWidth");function o8({children:e,open:t,collapsed:s=!1,peeking:l=!1,resizable:c=!1,storageKey:u="wardmote.sidebar.width",className:p,onPanelMouseEnter:f,onPanelMouseLeave:h,onPanelFocusCapture:g,onPanelBlurCapture:v}){const[y,j]=(0,x.useState)(()=>Kw(u)),[k,S]=(0,x.useState)(!1),N=(0,x.useRef)(y),I=(0,x.useRef)(null);(0,x.useEffect)(()=>{const V=Kw(u);N.current=V,j(V)},[u]);const C=t?y:0,M=t?s?72:C:0,R=t?s&&!l?72:C:0,_=R>M,D=c&&t&&!s,U=(0,x.useMemo)(()=>({width:`${M}px`}),[M]),K=(0,x.useMemo)(()=>({width:`${R}px`}),[R]),z=(0,x.useCallback)(V=>{const ue=gf(V);N.current=ue,j(ue),qw(u,ue)},[u]),E=(0,x.useCallback)(V=>{D&&(V.preventDefault(),V.currentTarget.setPointerCapture(V.pointerId),I.current={startX:V.clientX,startWidth:N.current},S(!0))},[D]),B=(0,x.useCallback)(V=>{if(!I.current)return;const ue=gf(I.current.startWidth+V.clientX-I.current.startX);N.current=ue,j(ue)},[]),O=(0,x.useCallback)(()=>{I.current&&(I.current=null,S(!1),qw(u,N.current))},[u]),Q=(0,x.useCallback)(V=>{D&&(V.key==="ArrowLeft"?(V.preventDefault(),z(y-Bw)):V.key==="ArrowRight"?(V.preventDefault(),z(y+Bw)):V.key==="Home"?(V.preventDefault(),z(Ug)):V.key==="End"&&(V.preventDefault(),z(Bg)))},[D,z,y]);return(0,a.jsxs)("div",{className:Y("relative h-full shrink-0",p),style:U,children:[(0,a.jsx)("div",{className:Y("absolute inset-y-0 left-0 flex flex-col overflow-hidden",_?"z-30 border-r border-line bg-bg shadow-lg":"z-0"),style:K,"data-sidebar-overlay":_?"":void 0,onMouseEnter:f,onMouseLeave:h,onFocusCapture:g,onBlurCapture:v,children:e}),D?(0,a.jsx)("div",{role:"separator","aria-label":"Resize sidebar","aria-orientation":"vertical","aria-valuemin":Ug,"aria-valuemax":Bg,"aria-valuenow":y,tabIndex:0,"data-dragging":k?"":void 0,className:"group absolute inset-y-0 z-20 cursor-col-resize touch-none outline-none",style:{right:-4,width:8},onPointerDown:E,onPointerMove:B,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:O,onKeyDown:Q,children:(0,a.jsx)("div",{className:Y("mx-auto h-full w-0.5 transition-colors",k?"bg-focus":"bg-transparent group-hover:bg-focus group-focus-visible:bg-focus")})}):null]})}r(o8,"SidebarShell");function wd({children:e,className:t}){return(0,a.jsx)("div",{"data-secondary-sidebar":"",className:Y("h-full w-full min-w-0 overflow-hidden",t),children:(0,a.jsx)(ZS,{children:e})})}r(wd,"SecondarySidebar");function c8(e,t){if(!t)return!1;if(t.source==="local_implicit"||t.isInstanceAdmin)return!0;if(!e)return!1;const s=t.memberships?.find(l=>l.companyId===e&&l.status==="active");return s?.membershipRole==="owner"||s?.membershipRole==="admin"||s?.membershipRole==="operator"||s?.membershipRole==="member"}r(c8,"canInviteCompanyMembers");function u8(){const e=iI(),t=me({queryKey:$.access.currentBoardAccess,queryFn:r(()=>ti.getCurrentBoardAccess(),"queryFn"),retry:!1,staleTime:3e4});return c8(e?.selectedCompanyId,t.data)}r(u8,"useCanInviteCompanyMembers");function d8(e){return e?.trim().toLowerCase().replace(/['"]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||null}r(d8,"slugifyUserPart");function f8(e){const t=[e?.id,e?.name,e?.email?.split("@")[0],e?.email];for(const s of t){const l=d8(s);if(l)return`/u/${l}`}return"/u/me"}r(f8,"userProfilePath");var Pc=null,_A=!1,Kg=!1,qg=new Set;function $c(){for(const e of qg)e()}r($c,"emit");function p8(e=typeof navigator>"u"?"":navigator.userAgent,t=typeof navigator>"u"?0:navigator.maxTouchPoints){return/iPhone|iPad|iPod/i.test(e)?!0:/Macintosh/i.test(e)&&t>1}r(p8,"isIosSafariLike");function m8(e=window){const t=r(l=>{l.preventDefault(),Pc=l,$c()},"onPrompt"),s=r(()=>{Pc=null,_A=!0,$c()},"onInstalled");return e.addEventListener("beforeinstallprompt",t),e.addEventListener("appinstalled",s),()=>{e.removeEventListener("beforeinstallprompt",t),e.removeEventListener("appinstalled",s)}}r(m8,"captureInstallPrompt");function h8(){return _A||$g()?"installed":Pc?"prompt":p8()?"ios-manual":"unavailable"}r(h8,"installAvailability");async function g8(){const e=Pc;if(!e)return"unavailable";Pc=null,$c(),await e.prompt();const{outcome:t}=await e.userChoice;return t}r(g8,"promptInstall");function Fg(e){Kg!==e&&(Kg=e,$c())}r(Fg,"setIosInstallHelpOpen");function x8(){return Kg}r(x8,"iosInstallHelpOpen");function b8(){return(0,x.useSyncExternalStore)(yx,x8,()=>!1)}r(b8,"useIosInstallHelpOpen");function yx(e){return qg.add(e),()=>{qg.delete(e)}}r(yx,"subscribe$1");function EA(){return(0,x.useSyncExternalStore)(yx,h8,()=>"unavailable")}r(EA,"useInstallAvailability");function TY(e){const t=EA();return(0,x.useSyncExternalStore)(yx,()=>j8(t,e),()=>!1)}r(TY,"useInstallNudgeVisible");var v8=2592e6,Hg="wardmote.install.visits",Fw="wardmote.install.visit-counted",IA="wardmote.install.snoozed-until";function Vg(e,t){const s=Number(e.getItem(t));return Number.isFinite(s)?s:0}r(Vg,"readNumber");function y8(e=window.localStorage,t=window.sessionStorage){try{if(t.getItem(Fw))return;t.setItem(Fw,"1"),e.setItem(Hg,String(Vg(e,Hg)+1))}catch{return}}r(y8,"recordAppVisit");function j8(e,t,s=Date.now(),l=window.localStorage){if(e!=="prompt"&&e!=="ios-manual"||/^\/(?:[^/]+\/)?onboarding(?:\/|$)/.test(t))return!1;try{return Vg(l,Hg)>=3&&Vg(l,IA)<=s}catch{return!1}}r(j8,"installNudgeVisible");function RY(e=Date.now(),t=window.localStorage){try{t.setItem(IA,String(e+v8))}catch{return}finally{$c()}}r(RY,"snoozeInstallNudge");var Hw="Install app",w8="Add Wardmote to your home screen or dock.";function k8({variant:e,onAfterAction:t}){const s=EA();if(s==="installed"||s==="unavailable")return null;const l=r(()=>{s==="ios-manual"?Fg(!0):g8(),t?.()},"handleClick");return e==="compact-menu-action"?(0,a.jsxs)("button",{type:"button",className:"flex h-(--profile-popover-row-height) w-full items-center gap-(--profile-popover-row-gap) rounded-lg px-2.5 text-left text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) text-ink transition-colors hover:bg-bg-3",onClick:l,children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(yg,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:Hw})]}):(0,a.jsxs)("button",{type:"button",className:"flex w-full items-start gap-3 rounded-xl px-3 py-3 text-left transition-colors hover:bg-bg-3/60",onClick:l,children:[(0,a.jsx)("span",{className:"mt-0.5 rounded-lg border border-line bg-bg/70 p-2 text-ink-3",children:(0,a.jsx)(yg,{className:"size-4"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block text-sm font-medium text-ink",children:Hw}),(0,a.jsx)("span",{className:"block text-xs text-ink-3",children:w8})]})]})}r(k8,"InstallAppMenuAction");function S8(){const e=b8();return(0,a.jsx)(ks,{open:e,onOpenChange:Fg,children:(0,a.jsxs)($s,{children:[(0,a.jsxs)(bo,{children:[(0,a.jsx)(Os,{children:"Install Wardmote"}),(0,a.jsx)(vo,{children:"Add Wardmote to your Home Screen from Safari."})]}),(0,a.jsxs)("ol",{className:"space-y-3 text-sm text-ink",children:[(0,a.jsxs)(_h,{index:1,icon:(0,a.jsx)(zR,{className:"size-4"}),children:["Tap ",(0,a.jsx)("strong",{children:"Share"})," in the Safari toolbar."]}),(0,a.jsxs)(_h,{index:2,icon:(0,a.jsx)($R,{className:"size-4"}),children:["Choose ",(0,a.jsx)("strong",{children:"Add to Home Screen"}),"."]}),(0,a.jsxs)(_h,{index:3,children:["Keep ",(0,a.jsx)("strong",{children:"Open as Web App"})," on, then tap ",(0,a.jsx)("strong",{children:"Add"}),"."]})]}),(0,a.jsx)($f,{children:(0,a.jsx)(oe,{type:"button",onClick:r(()=>Fg(!1),"onClick"),children:"Done"})})]})})}r(S8,"IosInstallHelpDialog");function _h({index:e,icon:t,children:s}){return(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-full border border-line text-xs font-semibold text-ink-3",children:e}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t?(0,a.jsx)("span",{className:"text-ink-3",children:t}):null,(0,a.jsx)("span",{children:s})]})]})}r(_h,"InstallStep");function N8(e){if(!e)return"Unavailable";const t=new Date(e);return Number.isNaN(t.getTime())?"Unavailable":new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(t)}r(N8,"formatTimestamp");function C8(e){return!!e&&!Number.isNaN(new Date(e).getTime())}r(C8,"isValidTimestamp");function A8(e){return e?.devServer?.lastRestartAt??e?.serverInfo?.processStartedAt??null}r(A8,"restartTimestamp");function _8(e){const t=e?.serverInfo?.git;return t?.available?`${t.shortSha} · ${t.subject}`:"Commit unavailable"}r(_8,"commitLabel");function E8(e){const t=e?.serverInfo?.git;if(!t?.available)return"Unavailable";const s=t.localChanges;if(!s||!s.available)return"Change status unavailable";if(!s.hasLocalChanges)return"Clean checkout";const l=[[s.stagedFileCount,"staged"],[s.unstagedFileCount,"unstaged"],[s.untrackedFileCount,"untracked"]].filter(([c])=>Number(c)>0).map(([c,u])=>`${c} ${u}`);return l.length>0?`Local changes present (${l.join(", ")})`:"Local changes present"}r(E8,"localChangesLabel");function Eh({icon:e,label:t,value:s,dateTime:l}){return(0,a.jsxs)("div",{className:"flex w-full items-start gap-3 rounded-xl px-3 py-3 text-left",children:[(0,a.jsx)("span",{className:"mt-0.5 rounded-lg border border-line bg-bg/70 p-2 text-ink-3",children:(0,a.jsx)(e,{className:"size-4"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block text-sm font-medium text-ink",children:t}),l?(0,a.jsx)("time",{dateTime:l,className:"block break-words text-xs text-ink-3",children:s}):(0,a.jsx)("span",{className:"block break-words text-xs text-ink-3",children:s})]})]})}r(Eh,"ServerInfoRow");function I8(){const e=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")}).data?.enableServerInfoDebugView===!0,t=me({queryKey:$.health,queryFn:r(()=>Fc.get(),"queryFn"),enabled:e,refetchOnMount:"always",refetchInterval:r(v=>v.state.data?.devServer?.enabled?2e3:!1,"refetchInterval")});if(!e)return null;const s=t.data,l=t.isLoading&&!s,c=t.isError,u=A8(s),p=C8(u),f=c?"Health unavailable":l?"Loading...":N8(u),h=c?"Health unavailable":l?"Loading...":_8(s),g=c?"Health unavailable":l?"Loading...":E8(s);return(0,a.jsxs)("div",{className:"mt-2 border-t border-line pt-2",children:[(0,a.jsx)("p",{className:"px-3 pb-1 pt-1 text-(length:--text-micro) font-medium uppercase tracking-wide text-ink-3",children:"Server"}),(0,a.jsx)(Eh,{icon:j1,label:"Last restarted",value:f,dateTime:!c&&!l&&p?u:null}),(0,a.jsx)(Eh,{icon:jR,label:"Running commit",value:h}),(0,a.jsx)(Eh,{icon:gR,label:"Checkout state",value:g})]})}r(I8,"SidebarServerInfo");var T8="/company/settings/members?tab=invites",R8="https://github.com/tickernelz/wardmote/tree/main/docs",M8="https://github.com/tickernelz/wardmote/issues";function D8(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length>=2?`${t[0]?.[0]??""}${t[t.length-1]?.[0]??""}`.toUpperCase():e.slice(0,2).toUpperCase()}r(D8,"deriveInitials");function Ih({label:e,icon:t,onClick:s,href:l,external:c=!1}){const u="flex h-(--profile-popover-row-height) w-full items-center gap-(--profile-popover-row-gap) rounded-lg px-2.5 text-left text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) text-ink transition-colors hover:bg-bg-3",p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(t,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e})]});return l?c?(0,a.jsx)("a",{href:l,target:"_blank",rel:"noreferrer",className:u,onClick:s,children:p}):(0,a.jsx)(mn,{to:l,className:u,onClick:s,children:p}):(0,a.jsx)("button",{type:"button",className:u,onClick:s,children:p})}r(Ih,"MenuAction");function Vw({deploymentMode:e,open:t,onOpenChange:s,forceExpanded:l=!1}){const{hidden:c,loaded:u}=gr(),p=u8()?T8:null,f=u&&p!==null&&!Fd(c,"company.members")&&!Fd(c,"company.invites"),[h,g]=(0,x.useState)(!1),{isMobile:v,setSidebarOpen:y,collapsed:j,peeking:k}=Jn(),S=j&&!k&&!l,N=t??h,I=s??g,{data:C}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),M=ux({onSignedOut:K}),R=C?.user.name?.trim()||"Board",_=C?.user.email?.trim()||(e==="authenticated"?"Signed in":"Local workspace board"),D=D8(R),U=f8(C?.user);function K(){I(!1),v&&y(!1)}r(K,"closeNavigationChrome");function z(){M.mutate()}return r(z,"handleSignOut"),(0,a.jsx)("div",{className:"bg-line/50 px-3 py-2 dark:bg-bg-3",children:(0,a.jsxs)("div",{className:Y("flex items-center gap-0.5",!S&&"px-2"),children:[(0,a.jsxs)(ws,{open:N,onOpenChange:I,children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:Y("flex min-w-0 items-center gap-2.5 rounded-lg text-left text-(length:--text-compact) font-medium text-ink/80 transition-colors hover:bg-bg-3 hover:text-ink",S?"w-full px-3 py-2":"flex-1 px-2 py-1.5"),"aria-label":"Open account menu",children:[(0,a.jsxs)(Yd,{size:"sm",children:[C?.user.image?(0,a.jsx)(Qd,{src:C.user.image,alt:R}):null,(0,a.jsx)(Gd,{children:D})]}),(0,a.jsx)("span",{className:Y("min-w-0 flex-1 truncate",S&&"block w-0 min-w-0 -ms-2.5 overflow-hidden whitespace-nowrap text-transparent select-none"),children:R})]})}),(0,a.jsxs)(js,{side:"top",align:"start",sideOffset:10,className:"min-h-(--profile-popover-min-height) w-(--profile-popover-width) max-w-(--sz-calc-24) overflow-hidden rounded-xl border-line bg-bg-2 p-0 shadow-(--shadow-profile-popover)",children:[(0,a.jsxs)("div",{className:"relative flex h-(--profile-popover-header-height) shrink-0 items-center gap-2.5 px-3.5",children:[(0,a.jsx)(mn,{to:U,"aria-label":"View profile",onClick:K,className:"absolute inset-0 transition-colors hover:bg-bg-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus"}),(0,a.jsxs)(Yd,{className:"pointer-events-none relative size-9",children:[C?.user.image?(0,a.jsx)(Qd,{src:C.user.image,alt:R}):null,(0,a.jsx)(Gd,{className:"text-xs text-ink",children:D})]}),(0,a.jsxs)("div",{className:"pointer-events-none relative min-w-0 flex-1",children:[(0,a.jsx)("h2",{className:"truncate text-sm font-semibold leading-(--profile-popover-label-line-height) text-ink",children:R}),(0,a.jsx)("p",{className:"truncate text-(length:--text-micro) leading-(--profile-popover-meta-line-height) text-ink-3",children:_})]})]}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-0.5 border-t border-line px-2.5 pb-2.5 pt-2",children:[(0,a.jsx)(Ih,{label:"Settings",icon:YS,href:"/company/settings",onClick:K}),f&&p?(0,a.jsx)(Ih,{label:"Invite",icon:SN,href:p,onClick:K}):null,(0,a.jsx)(Ih,{label:"Documentation",icon:LS,href:R8,external:!0,onClick:r(()=>I(!1),"onClick")}),(0,a.jsx)(A3,{variant:"compact-menu-action",onAfterToggle:r(()=>I(!1),"onAfterToggle")}),(0,a.jsx)(k8,{variant:"compact-menu-action",onAfterAction:r(()=>I(!1),"onAfterAction")}),e==="authenticated"?(0,a.jsxs)("button",{type:"button",className:Y("flex h-(--profile-popover-row-height) w-full items-center gap-(--profile-popover-row-gap) rounded-lg px-2.5 text-left text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) text-ink transition-colors hover:bg-bad/10",M.isPending&&"cursor-not-allowed opacity-60"),onClick:z,disabled:M.isPending,children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(Uf,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:M.isPending?"Signing out...":"Sign out"})]}):null,(0,a.jsx)(I8,{})]})]})]}),S?null:(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("a",{href:M8,target:"_blank",rel:"noreferrer","aria-label":"Share feedback",className:"flex size-8 shrink-0 items-center justify-center rounded-lg text-ink-3/50 transition-colors hover:bg-bg-3 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:(0,a.jsx)(I0,{className:"h-4 w-4","aria-hidden":"true"})})}),(0,a.jsx)(Ts,{side:"top",children:"Share feedback"})]})]})})}r(Vw,"SidebarAccountMenu");var O8=["input","textarea","select","[contenteditable='true']","[contenteditable='plaintext-only']","[role='textbox']","[role='combobox']"].join(", "),L8="[data-page-search-target='true']",z8=new Set(["Shift","Meta","Control","Alt"]);function ko(e){return e instanceof HTMLElement?e.isContentEditable?!0:!!e.closest(O8):!1}r(ko,"isKeyboardShortcutTextInputTarget");function Wg(e=document){return!!e.querySelector("[role='dialog'][aria-modal='true']")}r(Wg,"hasBlockingShortcutDialog");function P8(e){if(!e.isConnected||"disabled"in e&&typeof e.disabled=="boolean"&&e.disabled||e.closest("[hidden], [aria-hidden='true'], [inert]")||e.closest("[role='dialog'][aria-modal='true']"))return!1;const t=window.getComputedStyle(e);return t.display==="none"||t.visibility==="hidden"?!1:e.getClientRects().length>0||e===document.activeElement}r(P8,"isVisibleShortcutTarget");function $8(e=document){return Array.from(e.querySelectorAll(L8)).find(t=>P8(t))??null}r($8,"findPageSearchShortcutTarget");function U8(e=document){const t=$8(e);return t?(t.focus(),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.select(),!0):!1}r(U8,"focusPageSearchShortcutTarget");function B8({key:e,isComposing:t}){return e==="Enter"&&!t}r(B8,"shouldBlurPageSearchOnEnter");function K8({key:e,isComposing:t,currentValue:s}){return e==="Escape"&&!t&&s.length===0}r(K8,"shouldBlurPageSearchOnEscape");function np(e){return z8.has(e)}r(np,"isModifierOnlyKey");function MY({defaultPrevented:e,key:t,metaKey:s,ctrlKey:l,altKey:c,target:u,hasOpenDialog:p,hasSelection:f}){if(e||s||l||c||np(t)||p||ko(u))return"ignore";switch(t){case"j":case"ArrowDown":return"next";case"k":case"ArrowUp":return"previous";case"Enter":return f?"toggle":"ignore";case"x":return f?"dismiss":"ignore";default:return"ignore"}}r(MY,"resolveAttentionQueueKeyAction");function DY({armed:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){return!e||t||l||c||u||np(s)||f||ko(p)?"ignore":s.toLowerCase()==="y"?"archive":"ignore"}r(DY,"resolveInboxQuickArchiveKeyAction");function OY({hasUndoableArchive:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){return!e||t||l||c||u||np(s)||f||ko(p)?"ignore":s==="u"?"undo_archive":"ignore"}r(OY,"resolveInboxUndoArchiveKeyAction");function q8({armed:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){if(t)return e?"disarm":"ignore";if(l||c||u||np(s))return"ignore";if(f||ko(p))return e?"disarm":"ignore";const h=s.toLowerCase();return e?h==="i"?"navigate_inbox":h==="c"?"focus_comment":h==="f"?"open_file_viewer":h==="g"?"arm":"disarm":h==="g"?"arm":"ignore"}r(q8,"resolveIssueDetailGoKeyAction");function F8({onNewIssue:e,onSearch:t,onToggleSidebar:s,onTogglePanel:l,onShowShortcuts:c,onGoToInbox:u}){(0,x.useEffect)(()=>{let p=!1,f=null;const h=r(()=>{f!==null&&(window.clearTimeout(f),f=null)},"clearGoChordTimeout"),g=r(()=>{p=!1,h()},"disarmGoChord"),v=r(()=>{p=!0,h(),f=window.setTimeout(()=>{p=!1,f=null},1200)},"armGoChord");function y(S){if(S.defaultPrevented){g();return}if(u){const N=q8({armed:p,defaultPrevented:S.defaultPrevented,key:S.key,metaKey:S.metaKey,ctrlKey:S.ctrlKey,altKey:S.altKey,target:S.target,hasOpenDialog:Wg()});if(N==="arm"){v();return}if(N==="navigate_inbox"){g(),S.preventDefault(),u();return}if(N==="focus_comment"||N==="open_file_viewer"){g(),S.preventDefault();return}N==="disarm"&&g()}if(!ko(S.target)&&!Wg()){if(S.key==="/"&&!S.metaKey&&!S.ctrlKey&&!S.altKey){S.preventDefault(),U8()||t?.();return}if(S.key==="?"&&!S.metaKey&&!S.ctrlKey&&!S.altKey){S.preventDefault(),c?.();return}S.key==="c"&&!S.metaKey&&!S.ctrlKey&&!S.altKey&&(S.preventDefault(),e?.()),S.key==="["&&!S.metaKey&&!S.ctrlKey&&(S.preventDefault(),s?.()),S.key==="]"&&!S.metaKey&&!S.ctrlKey&&(S.preventDefault(),l?.())}}r(y,"handleKeyDown");const j=r(()=>g(),"handlePointerDown"),k=r(S=>{S.target instanceof HTMLElement&&S.target!==document.body&&g()},"handleFocusIn");return document.addEventListener("pointerdown",j,!0),document.addEventListener("focusin",k,!0),document.addEventListener("keydown",y),()=>{g(),document.removeEventListener("pointerdown",j,!0),document.removeEventListener("focusin",k,!0),document.removeEventListener("keydown",y)}},[e,t,s,l,c,u])}r(F8,"useKeyboardShortcuts");var H8=new Set(["auth","invite","board-claim","cli-auth","docs","s"]);function TA(e){const t=(e.split("?")[0]??"").split("/").filter(Boolean);if(t.length===0)return!0;const[s]=t;return!H8.has(s)}r(TA,"isRememberableCompanyPath");function V8(e){const t=Wd(e.companyPrefix);return e.companies.find(s=>Wd(s.issuePrefix)===t)??null}r(V8,"findCompanyByPrefix");function W8(e){const t=vS(e.pathname);return t?V8({companies:e.companies,companyPrefix:t})?.id??null:e.fallbackCompanyId}r(W8,"getRememberedPathOwnerCompanyId");function Q8(e){const t=e.path?Tf(e.path):"/dashboard";if(!TA(t))return"/dashboard";const[s,l]=(t.split("?")[0]??"").split("/").filter(Boolean);if(s==="issues"&&l){const c=/^([A-Za-z]+)-\d+$/.exec(l);if(c&&Wd(c[1]??"")!==Wd(e.companyPrefix))return"/dashboard"}return t}r(Q8,"sanitizeRememberedPathForCompany");var RA="wardmote.companyPaths";function MA(){try{const e=localStorage.getItem(RA);if(e)return JSON.parse(e)}catch{}return{}}r(MA,"getCompanyPaths");function G8(e,t){const s=MA();s[e]=t,localStorage.setItem(RA,JSON.stringify(s))}r(G8,"saveCompanyPath");function Y8(){const{companies:e,selectedCompanyId:t,selectedCompany:s,selectionSource:l}=bt(),c=hn(),u=ja(),p=(0,x.useRef)(t),f=(0,x.useMemo)(()=>W8({companies:e,pathname:c.pathname,fallbackCompanyId:p.current}),[e,c.pathname]),h=c.pathname+c.search;(0,x.useEffect)(()=>{const g=f,v=Tf(h);g&&TA(v)&&G8(g,v)},[h,f]),(0,x.useEffect)(()=>{if(t){if(p.current!==null&&t!==p.current&&l!=="route_sync"&&s){const g=MA(),v=Q8({path:g[t],companyPrefix:s.issuePrefix});u(`/${s.issuePrefix}${v}`,{replace:!0})}p.current=t}},[s,t,l,u])}r(Y8,"useCompanyPageMemory");var X8=class{static{r(this,"MobileNavScrollTracker")}options;lastTop;lastMaxTop;visible=!0;direction=0;distance=0;constructor(e,t,s){this.options=e,this.lastTop=t,this.lastMaxTop=s}update(e,t){const s=Math.max(0,Math.min(e,t)),l=s-Math.max(this.lastTop,this.options.topZone),c=t!==this.lastMaxTop;if(this.lastTop=s,this.lastMaxTop=t,s<=this.options.topZone)this.visible=!0,this.direction=0,this.distance=0;else if(c)this.direction=0,this.distance=0;else if(l!==0){const u=Math.sign(l);u!==this.direction&&(this.distance=0),this.direction=u,this.distance+=Math.abs(l);const p=u>0?this.options.hideDistance:this.options.showDistance;this.distance>=p&&(this.visible=u<0,this.distance=0)}return this.visible}};function Z8(e,t){const[s,l]=(0,x.useState)(!0);return(0,x.useEffect)(()=>{if(l(!0),!e)return;const c=getComputedStyle(document.documentElement),u=r(y=>Number.parseFloat(c.getPropertyValue(y))||0,"distance"),p=r(()=>{const y=document.scrollingElement??document.documentElement;return{top:window.scrollY||y.scrollTop||0,max:Math.max(0,y.scrollHeight-y.clientHeight)}},"scrollBounds"),f=p(),h=new X8({topZone:u("--mobile-nav-scroll-top-zone"),hideDistance:u("--mobile-nav-scroll-hide-distance"),showDistance:u("--mobile-nav-scroll-show-distance")},f.top,f.max);let g=null;const v=r(()=>{g===null&&(g=requestAnimationFrame(()=>{g=null;const{top:y,max:j}=p(),k=h.visible,S=h.update(y,j);S!==k&&l(S)}))},"onScroll");return window.addEventListener("scroll",v,{passive:!0}),()=>{window.removeEventListener("scroll",v),g!==null&&cancelAnimationFrame(g)}},[e,t]),s}r(Z8,"useMobileNavVisibility");function J8(e){const{matchedCompany:t,selectedCompanyId:s,companies:l}=e;return!t||t.status!=="archived"||s===t.id?null:l.find(c=>c.id===s&&c.status!=="archived")??l.find(c=>c.status!=="archived")??null}r(J8,"resolveArchivedCompanyBounce");function LY(e){const{archivedCompanyId:t,companies:s}=e,l=s.find(c=>c.id!==t&&c.status!=="archived");return l?{kind:"company",company:l}:{kind:"companies_list"}}r(LY,"resolveCompanyArchiveDeparture");function e6(e){const{selectionSource:t,selectedCompanyId:s,routeCompanyId:l}=e;return!(s===l||t==="manual"&&s)}r(e6,"shouldSyncCompanySelectionFromRoute");function t6(e,t){return e instanceof HTMLElement?!(t instanceof HTMLElement)||!document.contains(t)||t===document.body||t===document.documentElement?!0:!e.contains(t):!1}r(t6,"shouldFocusMainContentAfterNavigation");function n6(e){if(!(e instanceof HTMLElement))return()=>{};const t=window.requestAnimationFrame(()=>{t6(e,document.activeElement)&&e.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(t)}r(n6,"scheduleMainContentFocus");function a6(e=document,t=window){const s=r(()=>{e.documentElement.scrollTop!==0&&(e.documentElement.scrollTop=0),e.body.scrollTop!==0&&(e.body.scrollTop=0)},"onScroll");return t.addEventListener("scroll",s,{capture:!0}),()=>t.removeEventListener("scroll",s,{capture:!0})}r(a6,"pinDocumentScrollToZero");var s6=vE({NotFoundPage:r(()=>dr,"NotFoundPage")});function dr({scope:e="global",requestedPrefix:t}){const s=hn(),{setBreadcrumbs:l}=n1(),{companies:c,selectedCompany:u}=bt();(0,x.useEffect)(()=>{l([{label:"Not Found"}])},[l]);const p=u??c[0]??null,f=p?`/${p.issuePrefix}/dashboard`:"/",h=`${s.pathname}${s.search}${s.hash}`,g=t?.toUpperCase(),v=e==="invalid_company_prefix"?"Organization not found":"Page not found",y=e==="invalid_company_prefix"?`No organization matches prefix "${g??"unknown"}".`:"This route does not exist.";return(0,a.jsx)("div",{className:"mx-auto max-w-2xl py-10",children:(0,a.jsxs)(Hc,{className:"block p-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"rounded-md border border-bad/20 bg-bad/10 p-2",children:(0,a.jsx)(ai,{className:"h-5 w-5 text-bad"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:v}),(0,a.jsx)("p",{className:"text-sm text-ink-3",children:y})]})]}),(0,a.jsxs)("div",{className:"mt-4 rounded-md border border-line bg-bg-3/20 px-3 py-2 text-xs text-ink-3",children:["Requested path: ",(0,a.jsx)("code",{className:"font-mono",children:h})]}),(0,a.jsxs)("div",{className:"mt-5 flex flex-wrap gap-2",children:[(0,a.jsx)(oe,{asChild:!0,children:(0,a.jsxs)(mn,{to:f,children:[(0,a.jsx)(xS,{className:"mr-1.5 h-4 w-4"}),"Open dashboard"]})}),(0,a.jsx)(oe,{variant:"secondary",asChild:!0,children:(0,a.jsx)(mn,{to:"/",children:"Go home"})})]})]})})}r(dr,"NotFoundPage$1");function i6(e,t){return XC(e,t)[0]?.toLowerCase()??null}r(i6,"getCompanyRouteSegment");var r6=new Set(["browse","connections","assistant-connection","connect","chat","vercel-connect","review","attention","gateways","advanced","app"]);function l6(e){const t=(0,x.useRef)(null);return(0,x.useLayoutEffect)(()=>{const s=t.current,l=s?.parentElement;if(!e||!s||!l)return;const c=r(()=>l.style.setProperty("--mobile-topbar-h",`${s.offsetHeight}px`),"apply");if(c(),typeof ResizeObserver>"u")return()=>l.style.removeProperty("--mobile-topbar-h");const u=new ResizeObserver(c);return u.observe(s),()=>{u.disconnect(),l.style.removeProperty("--mobile-topbar-h")}},[e]),t}r(l6,"useMobileTopbarHeightVar");function o6({sidebarSections:e}){const{sidebarOpen:t,setSidebarOpen:s,toggleSidebar:l,collapsed:c,peeking:u,setPeeking:p,isMobile:f,isTablet:h}=Jn(),g=l6(f),{openNewIssue:v,openOnboarding:y}=Us(),{togglePanelVisible:j}=dx(),k=Lf()?.pushToast??null,{companies:S,loading:N,selectedCompany:I,selectedCompanyId:C,selectionSource:M,setSelectedCompanyId:R}=bt(),{companyPrefix:_,pluginRoutePath:D,agentId:U,routineId:K}=Ps(),z=ja(),E=hn(),B=PE(),O=W4(E.pathname,_),Q=O.builtInContextualSurface==="settings",V=O.companySegments,ue=O.isTaskDetail,{enabled:ce}=Pf(),X=ce&&V[0]?.toLowerCase()==="chats",A=ue||X,ee=V[0]?.toLowerCase()==="tools",ie=V[0]?.toLowerCase()==="apps",le=ie&&V[1]&&!r6.has(V[1].toLowerCase())?V[1]:null,Ae=ie&&V[1]?.toLowerCase()==="app"&&V[2]?V[2]:null,de=(0,x.useRef)(!1),we=(0,x.useRef)(null),ye=(0,x.useRef)(null),Me=(0,x.useRef)(new q3),he=(0,x.useRef)(E.key),ve=Z8(f&&!ue,E.pathname),[et,$e]=(0,x.useState)(!1),Ie=(0,x.useMemo)(()=>{if(!_)return null;const _e=_.toUpperCase();return S.find(Re=>Re.issuePrefix.toUpperCase()===_e)??null},[S,_]),ct=!!_&&!N&&S.length>0&&!Ie,He=(0,x.useMemo)(()=>D?.toLowerCase()??i6(E.pathname,_),[_,E.pathname,D]),vt=Ie?.id??null,Jt=Ie?.issuePrefix??null,{slots:ge}=qc({slotTypes:["page","routeSidebar"],companyId:vt,enabled:!!(vt&&He)}),Oe=(0,x.useMemo)(()=>fT(ge,He),[He,ge]),De=(0,x.useMemo)(()=>({companyId:vt,companyPrefix:Jt}),[vt,Jt]),ut=Q?(0,a.jsx)(X4,{}):le?(0,a.jsx)(iw,{kind:"connection",connectionId:le}):Ae?(0,a.jsx)(iw,{kind:"application",applicationId:Ae}):ie||ee?(0,a.jsx)(dz,{}):Oe?(0,a.jsx)(Xc,{surface:`plugin:${Oe.id}`,title:Oe.displayName,children:(0,a.jsx)(P0,{slot:Oe,context:De,className:"min-h-0 flex-1",missingBehavior:"placeholder"})}):null,Ht=X?(0,a.jsx)(l8,{}):O.builtInContextualSurface==="agent"&&U?(0,a.jsx)(yz,{agentRef:U}):O.builtInContextualSurface==="routine"&&K?(0,a.jsx)(L3,{children:(0,a.jsx)(Sz,{routineId:K})}):O.builtInContextualSurface==="skills"?(0,a.jsx)(Az,{}):ut,Vt=Ht!=null,gt=Vt&&(X||O.builtInContextualSurface==="skills"||O.builtInContextualSurface==="agent"||O.builtInContextualSurface==="routine"||ie||ee),un=Q&&(f||h),P=Vt&&!gt&&!(h&&Q),qe=gt,Ye=Vt?Oe&&!O.builtInContextualSurface?`plugin:${Oe.id}`:O.builtInContextualSurface:null,xt=(0,x.useRef)(null),{data:at}=me({queryKey:$.health,queryFn:r(()=>Fc.get(),"queryFn"),retry:!1,refetchInterval:r(_e=>_e.state.data?.devServer?.enabled?2e3:!1,"refetchInterval"),refetchIntervalInBackground:!1});(0,x.useEffect)(()=>{const _e=xt.current;Ye&&_&&_e&&_e.surface!==Ye&&_e.pathname!==E.pathname&&Q4({surface:Ye,companyPrefix:_,previousPathname:_e.pathname}),xt.current={pathname:E.pathname,surface:Ye}},[_,Ye,E.pathname]),(0,x.useEffect)(()=>{N||de.current||at?.deploymentMode!=="authenticated"&&S.length===0&&(de.current=!0,y())},[S,N,y,at?.deploymentMode]),(0,x.useEffect)(()=>{if(!_||N||S.length===0)return;if(!Ie){const Re=(C?S.find(lt=>lt.id===C):null)??S[0]??null;Re&&C!==Re.id&&R(Re.id,{source:"route_sync"});return}if(_!==Ie.issuePrefix){const Re=E.pathname.replace(/^\/[^/]+/,"");z(`/${Ie.issuePrefix}${Re}${E.search}`,{replace:!0});return}const _e=J8({matchedCompany:Ie,selectedCompanyId:C,companies:S});if(_e){k?.({title:`${Ie.name} is archived`,body:`Switched to ${_e.name}.`,tone:"info",dedupeKey:`archived-company-bounce:${Ie.id}`}),R(_e.id,{source:"route_sync"}),z(`/${_e.issuePrefix}/dashboard`,{replace:!0});return}e6({selectionSource:M,selectedCompanyId:C,routeCompanyId:Ie.id})&&R(Ie.id,{source:"route_sync"})},[_,S,N,Ie,E.pathname,E.search,z,k,M,C,R]);const Kt=j,ea=(0,x.useCallback)(()=>{document.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,bubbles:!0,cancelable:!0}))},[]),en=(0,x.useRef)(null),Mt=(0,x.useRef)(!1),Gt=(0,x.useRef)(!1),dt=(0,x.useCallback)(()=>{en.current!==null&&(window.clearTimeout(en.current),en.current=null)},[]),On=(0,x.useCallback)(()=>{dt(),en.current=window.setTimeout(()=>p(!0),50)},[dt,p]),mt=(0,x.useCallback)(()=>{dt(),p(!0)},[dt,p]),Nn=(0,x.useCallback)(()=>{dt(),en.current=window.setTimeout(()=>p(!1),120)},[dt,p]),It=(0,x.useCallback)(()=>{Mt.current=!0,c&&!Gt.current&&On()},[c,On]),tn=(0,x.useCallback)(()=>{Mt.current=!1,Gt.current=!1,Nn()},[Nn]),qt=(0,x.useCallback)(()=>{Gt.current||mt()},[mt]),Tt=(0,x.useCallback)(()=>{Mt.current||Nn()},[Nn]);(0,x.useEffect)(()=>dt,[dt]);const Ct=(0,x.useRef)(c);return(0,x.useEffect)(()=>{c!==Ct.current&&(c?(dt(),p(!1),Gt.current=Mt.current):Gt.current=!1,Ct.current=c)},[c,dt,p]),(0,x.useEffect)(()=>{if(!u)return;const _e=r(Re=>{Re.key==="Escape"&&(dt(),p(!1))},"onKeyDown");return window.addEventListener("keydown",_e),()=>window.removeEventListener("keydown",_e)},[u,dt,p]),Y8(),F8({onNewIssue:r(()=>v(),"onNewIssue"),onSearch:ea,onToggleSidebar:l,onTogglePanel:Kt,onShowShortcuts:r(()=>$e(!0),"onShowShortcuts"),onGoToInbox:r(()=>z("/inbox"),"onGoToInbox")}),(0,x.useEffect)(()=>{if(!f)return;const _e=30,Re=50,lt=75;let Dt=0,ze=0;const Ot=r(Lt=>{const nn=Lt.touches[0];Dt=nn.clientX,ze=nn.clientY},"onTouchStart"),Rt=r(Lt=>{const nn=Lt.changedTouches[0],Wt=nn.clientX-Dt;if(!(Math.abs(nn.clientY-ze)>lt)){if(!t&&Dt<_e&&Wt>Re){s(!0);return}t&&Wt<-50&&s(!1)}},"onTouchEnd");return document.addEventListener("touchstart",Ot,{passive:!0}),document.addEventListener("touchend",Rt,{passive:!0}),()=>{document.removeEventListener("touchstart",Ot),document.removeEventListener("touchend",Rt)}},[f,t,s]),(0,x.useEffect)(()=>{const _e=document.body.style.overflow;return document.body.style.overflow=f?"visible":"clip",()=>{document.body.style.overflow=_e}},[f]),(0,x.useEffect)(()=>{if(!f)return a6()},[f]),(0,x.useEffect)(()=>{if(typeof document>"u")return;const _e=ye.current;return n6(_e)},[E.pathname]),(0,x.useEffect)(()=>{const _e=ye.current;if(!_e)return;const Re=r(()=>{Me.current.remember(he.current,_e.scrollTop)},"recordScroll");return _e.addEventListener("scroll",Re,{passive:!0}),()=>_e.removeEventListener("scroll",Re)},[]),(0,x.useLayoutEffect)(()=>{const _e=ye.current,Re=K3({previousPathname:we.current,pathname:E.pathname,navigationType:B,state:E.state});we.current=E.pathname;const lt=B==="POP",Dt=lt?Me.current.recall(E.key):0;if(he.current=E.key,lt){Qy(_e,Dt);const ze=requestAnimationFrame(()=>Qy(_e,Dt));return()=>cancelAnimationFrame(ze)}Re&&H3(_e)},[E.key,E.pathname,E.state,B]),(0,a.jsx)(O3,{children:(0,a.jsxs)("div",{"data-app-shell":"",className:Y("bg-bg text-ink pt-(--sz-safe-top)",f?"min-h-dvh overflow-x-clip":"flex h-dvh flex-col overflow-clip"),children:[(0,a.jsx)("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:left-3 focus:top-3 focus:z-(--z-200) focus:rounded-md focus:bg-bg focus:px-3 focus:py-2 focus:text-sm focus:font-medium focus:shadow-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:"Skip to Main Content"}),(0,a.jsx)(VU,{}),(0,a.jsx)(jU,{}),(0,a.jsx)(NU,{devServer:at?.devServer}),(0,a.jsx)(AU,{diskSpace:at?.diskSpace,warnings:at?.warnings}),(0,a.jsx)(DU,{}),(0,a.jsx)(UU,{}),(0,a.jsxs)("div",{className:Y("min-h-0 flex-1",f?"w-full":"flex overflow-clip"),children:[f&&t&&(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-40 bg-black/50",onClick:r(()=>s(!1),"onClick"),"aria-label":"Close sidebar"}),f?(0,a.jsxs)("div",{className:Y("fixed inset-y-0 left-0 z-50 flex flex-col overflow-hidden pt-(--sz-safe-top) transition-transform duration-100 ease-out",t?"translate-x-0":"-translate-x-full"),children:[(0,a.jsx)("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:(0,a.jsx)("div",{className:"w-60 shrink-0 overflow-hidden",children:Vt?(0,a.jsx)(wd,{children:Ht}):(0,a.jsx)(aw,{children:e})})}),(0,a.jsx)(Vw,{deploymentMode:at?.deploymentMode,forceExpanded:P})]}):(0,a.jsxs)(o8,{open:t,collapsed:P?!1:c,peeking:P?!1:u,resizable:!0,onPanelMouseEnter:P?void 0:It,onPanelMouseLeave:P?void 0:tn,onPanelFocusCapture:!P&&c?qt:void 0,onPanelBlurCapture:!P&&c?Tt:void 0,children:[(0,a.jsx)("div",{className:"flex flex-1 min-h-0",children:P?(0,a.jsx)(wd,{children:Ht}):(0,a.jsx)(aw,{children:e})}),(0,a.jsx)(Vw,{deploymentMode:at?.deploymentMode,forceExpanded:P})]}),!f&&qe&&!gt?(0,a.jsx)(wd,{className:"w-60 shrink-0",children:Ht}):null,(0,a.jsxs)("div",{className:Y("flex min-w-0 flex-col",f?"w-full":"h-full flex-1"),children:[(0,a.jsxs)("div",{ref:g,"data-slot":f?"mobile-topbar":void 0,className:Y(!f&&A&&"hidden",f&&"sticky top-0 z-20 bg-bg/95 backdrop-blur supports-[backdrop-filter]:bg-bg/85"),children:[(0,a.jsx)($w,{mobile:f,onNavigateHome:r(()=>z("/dashboard"),"onNavigateHome")}),(0,a.jsx)(ow,{}),un?(0,a.jsx)("div",{className:"border-b border-line px-4 pb-3",children:(0,a.jsx)(nz,{})}):null]}),(0,a.jsxs)("div",{className:Y(f?"block":"relative flex flex-1 min-h-0",!f&&A&&"streamlined-task-detail-surface"),children:[!f&>?(0,a.jsx)(wd,{className:"w-60 shrink-0 bg-bg",children:Ht}):null,(0,a.jsxs)("div",{className:Y(!f&&A?"flex min-w-0 flex-1 flex-col":"contents"),children:[!f&&A?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($w,{mobile:!1,onNavigateHome:r(()=>z("/dashboard"),"onNavigateHome")}),(0,a.jsx)(ow,{taskDetailLayout:!0})]}):null,(0,a.jsx)("main",{id:"main-content",ref:ye,tabIndex:-1,style:f?{"--tc-composer-bottom":"var(--sz-calc-14)"}:void 0,className:Y("flex-1 p-4 outline-none md:p-6",!f&&A&&"pt-0 md:pt-0",f?"overflow-visible pb-(--sz-calc-14)":"overflow-auto [scrollbar-gutter:stable]"),children:ct?(0,a.jsx)(dr,{scope:"invalid_company_prefix",requestedPrefix:_??I?.issuePrefix}):(0,a.jsx)(t8,{children:(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:(0,a.jsx)(xo,{})})})})]}),(0,a.jsx)(Vz,{taskDetailLayout:!f&&A})]})]})]}),f&&(0,a.jsx)(xU,{visible:ve}),(0,a.jsx)(DP,{}),(0,a.jsx)(D$,{}),(0,a.jsx)(L$,{}),(0,a.jsx)(U$,{}),(0,a.jsx)(Y$,{}),(0,a.jsx)(eU,{open:et,onOpenChange:$e}),(0,a.jsx)(sU,{}),(0,a.jsx)(dU,{health:at}),(0,a.jsx)(gU,{localTrusted:at?.deploymentMode==="local_trusted"})]})})}r(o6,"Layout");var Ww=null;function c6(){return Ww??=new _f,Ww}r(c6,"getDetachedClient");function u6(){const e=(0,x.useContext)(k0),{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:e!=null},e??c6());return e?{enabled:t?.enableConferenceRoomChat===!0,loaded:s}:{enabled:!1,loaded:!0}}r(u6,"useConferenceRoomChatEnabled");function d6(){const{enabled:e,loaded:t}=u6();return t?e?(0,a.jsx)(xo,{}):(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):null}r(d6,"ConferenceRoomChatGate");function ar({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enablePipelines!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(ar,"PipelinesExperimentalGate");function Qw({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enableCases!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(Qw,"CasesExperimentalGate");function Gw({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enableStatusCards!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(Gw,"StatusCardsExperimentalGate");function f6({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enablePixelsOffice!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(f6,"PixelsOfficeExperimentalGate");function Es({pageKey:e}){const{hidden:t,loaded:s}=gr();return s?t.has(e)?(0,a.jsx)(Ve,{to:"/company/settings",replace:!0}):(0,a.jsx)(xo,{}):null}r(Es,"HiddenSettingsPageGate");function Th(){const{data:e,isFetched:t}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return t?e?.enableIsolatedWorkspaces!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(xo,{}):null}r(Th,"IsolatedWorkspacesRouteGate");function Vl(){const e=hn(),{workspaceId:t}=Ps(),{companies:s,loading:l}=bt(),c=me({queryKey:$.executionWorkspaces.detail(t??"__missing__"),queryFn:r(()=>ep.get(t),"queryFn"),enabled:!!t,retry:!1});if(!t)return(0,a.jsx)(dr,{scope:"global"});if(l||c.isPending)return(0,a.jsx)(Ds,{});if(c.isError)return(0,a.jsx)(dr,{scope:"global"});const u=s.find(p=>p.id===c.data.companyId);return u?(0,a.jsx)(Ve,{to:`/${u.issuePrefix}${e.pathname}${e.search}${e.hash}`,replace:!0}):(0,a.jsx)(dr,{scope:"global"})}r(Vl,"UnprefixedExecutionWorkspaceRedirect");function p6(){const{companyPrefix:e,workspaceId:t}=Ps(),{companies:s,loading:l}=bt(),c=me({queryKey:$.executionWorkspaces.detail(t??"__missing__"),queryFn:r(()=>ep.get(t),"queryFn"),enabled:!!t,retry:!1});if(!t||!e)return(0,a.jsx)(dr,{scope:"global"});if(l||c.isPending)return(0,a.jsx)(Ds,{});if(c.isError)return(0,a.jsx)(dr,{scope:"global"});const u=s.find(p=>p.issuePrefix.toUpperCase()===e.toUpperCase());return!u||u.id!==c.data.companyId?(0,a.jsx)(dr,{scope:"global"}):(0,a.jsx)(xo,{})}r(p6,"ExecutionWorkspaceCompanyGate");var ya={status:r((e={})=>{const t=new URLSearchParams;e.command&&t.set("command",e.command),e.network&&t.set("network","1");const s=t.toString();return je.get(`/onboarding/omp${s?`?${s}`:""}`)},"status"),browse:r(e=>je.get(`/onboarding/omp/browse${e?`?path=${encodeURIComponent(e)}`:""}`),"browse"),loginProviders:r((e=!1)=>je.get(`/onboarding/omp/login/providers${e?"?refresh=1":""}`),"loginProviders"),startLogin:r(e=>je.post("/onboarding/omp/login",{provider:e}),"startLogin"),login:r(e=>je.get(`/onboarding/omp/login/${encodeURIComponent(e)}`),"login"),answerLogin:r((e,t)=>je.post(`/onboarding/omp/login/${encodeURIComponent(e)}/input`,{value:t}),"answerLogin"),cancelLogin:r(e=>je.delete(`/onboarding/omp/login/${encodeURIComponent(e)}`),"cancelLogin"),customProviders:r(()=>je.get("/onboarding/omp/custom-providers"),"customProviders"),saveCustomProvider:r((e,t)=>je.put(`/onboarding/omp/custom-providers/${encodeURIComponent(e)}`,t),"saveCustomProvider"),removeCustomProvider:r(e=>je.delete(`/onboarding/omp/custom-providers/${encodeURIComponent(e)}`),"removeCustomProvider"),fetchCustomProviderModels:r(e=>je.post("/onboarding/omp/custom-providers/models",e),"fetchCustomProviderModels"),probeCustomProvider:r(e=>je.post("/onboarding/omp/custom-providers/probe",e),"probeCustomProvider"),remote:r(e=>je.post("/onboarding/omp/remote",{address:e}),"remote")};function m6(e){return{heartbeat:{enabled:e?.heartbeatEnabled??Fy.heartbeatEnabled,intervalSec:e?.intervalSec??Fy.intervalSec,wakeOnDemand:!0,skipTimerWhenNoActionableWork:!0,cooldownSec:10,maxConcurrentRuns:20}}}r(m6,"buildNewAgentRuntimeConfig");function h6({className:e,...t}){return(0,a.jsx)("div",{role:"group","data-slot":"segmented",className:Y("inline-flex items-center gap-0.5 rounded-md border border-line-strong bg-bg-2 p-0.5",e),...t})}r(h6,"Segmented");function g6({selected:e=!1,className:t,type:s="button",...l}){return(0,a.jsx)("button",{type:s,"data-slot":"segmented-item","aria-pressed":e,className:Y("inline-flex h-7 items-center justify-center gap-1.5 whitespace-nowrap rounded-sm px-2.5 text-(length:--t-13) font-medium text-ink-2 transition-(--tp-color-background-color-border-color-box-shadow-opacity) outline-hidden hover:bg-bg-3 hover:text-ink focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:pointer-events-none disabled:text-ink-3 aria-pressed:bg-ink aria-pressed:text-bg-2 aria-pressed:hover:bg-ink aria-pressed:hover:text-bg-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l})}r(g6,"SegmentedItem");var x6="input:not([type=hidden]):not(:disabled), select:not(:disabled), textarea:not(:disabled)",b6="Discard your unsaved changes?",v6=2/3;function y6(e,t){const[s,l]=(0,x.useState)(null),c=(0,x.useRef)(!1),u=(0,x.useRef)(new Map),p=(0,x.useRef)(e);p.current=e;const f=(0,x.useRef)(s);f.current=s;const h=(0,x.useId)(),g=s===null?null:e(s),v=(0,x.useCallback)(M=>`${h}-row-editor-${M.replace(/\s+/g,"_")}`,[h]),y=r(()=>!c.current||window.confirm(b6),"mayDiscard"),j=(0,x.useCallback)((M=!0)=>{const R=f.current;if(c.current=!1,l(null),R===null||!M)return;const _=p.current(R);requestAnimationFrame(()=>{const D=u.current.get(_);(D?.isConnected?D:t?.current)?.focus()})},[t]),k=r(M=>g===e(M)?!0:g!==null&&!y()?!1:(c.current=!1,l(M),!0),"request"),S=r(M=>{if(g!==e(M)){k(M);return}y()&&j()},"toggle"),N=r(()=>{y()&&j()},"dismiss"),I=(0,x.useCallback)(M=>{c.current=M},[]);return{open:s,openKey:g,request:k,toggle:S,close:j,dismiss:N,setDirty:I,triggerProps:r(M=>({ref:r(R=>{R?u.current.set(M,R):u.current.delete(M)},"ref"),"aria-expanded":g===M,"aria-controls":g===M?v(M):void 0}),"triggerProps"),panelId:v}}r(y6,"useInlineRowEditor");function Yw({id:e,onEscape:t,className:s,children:l}){const c=(0,x.useRef)(null);(0,x.useEffect)(()=>{const p=c.current;if(!p)return;p.querySelector(x6)?.focus({preventScroll:!0});const f=p.getBoundingClientRect().top;if(f>=0&&f<=window.innerHeight*v6)return;const h=p.parentElement?.tagName==="LI"?p.previousElementSibling:null;h?h.scrollIntoView?.({block:"center"}):p.scrollIntoView?.({block:"start"})},[]);const u=r(p=>{p.key!=="Escape"||p.defaultPrevented||(p.preventDefault(),p.stopPropagation(),t())},"onKeyDown");return(0,a.jsx)("div",{ref:c,id:e,className:Y("scroll-mt-16",s),onKeyDown:u,children:l})}r(Yw,"InlineRowEditorPanel");var j6=2e3,Xw=["omp","login-providers"];function Rh(e){return e instanceof Error?e.message:"Something went wrong"}r(Rh,"errorText");function Ra({tone:e,children:t}){return(0,a.jsx)("div",{role:e==="bad"?"alert":"status",className:Y("rounded-md border px-3 py-2 text-sm",e==="bad"?"border-bad text-ink":e==="ok"?"border-ok text-ink":"border-line text-ink-2"),children:t})}r(Ra,"OmpNote");function w6({onSignedIn:e,autoFocus:t=!1}){const s=kn(),l=me({queryKey:Xw,queryFn:r(()=>ya.loginProviders(),"queryFn"),staleTime:6e5}),[c,u]=(0,x.useState)(""),[p,f]=(0,x.useState)(null),[h,g]=(0,x.useState)(""),v=c||l.data?.providers[0]||"",y=Bt({mutationFn:r(_=>ya.startLogin(_.name),"mutationFn"),onSuccess:r((_,{popup:D})=>{g(""),f(_),D&&_.url&&_.state==="waiting"?D.location.href=_.url:D?.close()},"onSuccess"),onError:r((_,{popup:D})=>D?.close(),"onError")}),j=Bt({mutationFn:r(_=>ya.answerLogin(p.id,_),"mutationFn"),onSuccess:r(_=>{g(""),f(_)},"onSuccess")}),k=Bt({mutationFn:r(_=>ya.cancelLogin(_),"mutationFn"),onSettled:r(()=>f(null),"onSettled")}),S=p?.state==="waiting",N=me({queryKey:["omp","login",p?.id??""],queryFn:r(()=>ya.login(p.id),"queryFn"),enabled:S,refetchInterval:j6});(0,x.useEffect)(()=>{N.data&&N.data.id===p?.id&&f(N.data)},[N.data,p?.id]);const I=(0,x.useRef)(null),C=(0,x.useRef)(e);C.current=e;const M=p?.state==="succeeded"?p.id:null;(0,x.useEffect)(()=>{!M||I.current===M||(I.current=M,s.invalidateQueries({queryKey:["agents"]}),C.current?.())},[M,s]);function R(_){_.preventDefault(),h.trim()&&j.mutate(h.trim())}return r(R,"submitAnswer"),l.isLoading?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"Asking OMP which providers it can sign in to..."}):l.error?(0,a.jsxs)(Ra,{tone:"bad",children:[Rh(l.error)," ",(0,a.jsx)(oe,{type:"button",variant:"link",size:"xs",onClick:r(()=>{l.refetch()},"onClick"),children:"Try again"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[!p||!S?(0,a.jsxs)("form",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",onSubmit:r(_=>{_.preventDefault(),v&&y.mutate({name:v,popup:window.open("about:blank","_blank")})},"onSubmit"),children:[(0,a.jsxs)("label",{className:"flex min-w-0 flex-1 flex-col gap-1.5 text-sm font-medium",children:["Provider",(0,a.jsx)(bg,{value:v,onChange:r(_=>u(_.target.value),"onChange"),autoFocus:t,className:"w-full",children:l.data?.providers.map(_=>(0,a.jsx)("option",{value:_,children:_},_))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(oe,{type:"submit",disabled:!v||y.isPending,className:"flex-1 sm:flex-none",children:y.isPending?"Starting...":"Sign in"}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon","aria-label":"Reload provider list",title:"Reload provider list",onClick:r(()=>{ya.loginProviders(!0).then(_=>s.setQueryData(Xw,_))},"onClick"),children:(0,a.jsx)(nl,{"aria-hidden":"true"})})]})]}):null,y.error?(0,a.jsx)(Ra,{tone:"bad",children:Rh(y.error)}):null,p?(0,a.jsxs)("section",{"aria-label":`Sign-in to ${p.provider}`,className:"flex flex-col gap-3 rounded-lg border border-line bg-bg-2 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("b",{className:"text-sm font-semibold",children:p.provider}),S?(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"xs",disabled:k.isPending,onClick:r(()=>k.mutate(p.id),"onClick"),children:"Cancel"}):null]}),S&&p.url?(0,a.jsxs)("ol",{className:"flex list-decimal flex-col gap-1.5 ps-5 text-sm text-ink-2",children:[(0,a.jsxs)("li",{children:[(0,a.jsxs)("a",{href:p.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 font-medium text-accent underline underline-offset-4",children:["Open the sign-in page ",(0,a.jsx)(qS,{"aria-hidden":"true",className:"size-3.5"})]})," ","(already opened in a new tab unless the browser blocked it) and approve access."]}),p.prompt&&!p.prompt.secret?(0,a.jsx)("li",{children:"If the page ends on an address that does not load (it starts with http://localhost), copy that whole address from the browser bar and paste it below. On the machine that runs Wardmote this step finishes by itself."}):(0,a.jsx)("li",{children:"Enter the code OMP shows below if the page asks for one. This panel moves on by itself once you approve."})]}):null,S&&p.prompt?(0,a.jsxs)("form",{onSubmit:R,className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,a.jsxs)("label",{className:"flex min-w-0 flex-1 flex-col gap-1.5 text-sm font-medium",children:[p.prompt.label.replace(/:$/,""),(0,a.jsx)(Wn,{value:h,onChange:r(_=>g(_.target.value),"onChange"),type:p.prompt.secret?"password":"text",autoComplete:"off",spellCheck:!1,autoFocus:!p.url})]}),(0,a.jsx)(oe,{type:"submit",disabled:!h.trim()||j.isPending,children:j.isPending?"Sending...":"Send"})]}):null,S&&!p.prompt&&!p.url?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"Waiting for OMP..."}):null,S&&p.message?(0,a.jsx)(Ra,{tone:"bad",children:p.message}):null,j.error?(0,a.jsx)(Ra,{tone:"bad",children:Rh(j.error)}):null,p.state==="succeeded"?(0,a.jsxs)(Ra,{tone:"ok",children:[p.message??"Signed in",". Models from this provider are ready."]}):null,p.state==="failed"?(0,a.jsxs)(Ra,{tone:"bad",children:[p.message??"Sign-in failed",". Check the account on the provider's page, then press Sign in again."]}):null,S&&!p.prompt&&p.lines.length?(0,a.jsx)("pre",{"aria-label":"OMP output",className:"max-h-48 overflow-auto whitespace-pre-wrap break-all rounded-md bg-bg-3 px-3 py-2 font-mono text-xs text-ink-2",children:p.lines.join(`
|
|
54
|
+
`)}`:void 0}r(GU,"sanitizeComponentStack");function CA(){const e={};if(typeof document<"u"){try{const t=document.readyState;(t==="loading"||t==="interactive"||t==="complete")&&(e.ready_state=t)}catch{}try{const t=document.visibilityState;(t==="visible"||t==="hidden")&&(e.visibility_state=t)}catch{}try{const t=document.documentElement.classList;e.translation_marker=t.contains("translated-ltr")||t.contains("translated-rtl")}catch{}}return e}r(CA,"readBrowserErrorState");function YU(e){const t=GU(e.componentStack);return{tags:{react_error_boundary:e.boundary},contexts:{react:t?{componentStack:t}:{},browser_state:CA()}}}r(YU,"buildBrowserErrorContext");var Uw=Promise.resolve();function vx(e){const t=Uw.then(e);return Uw=t.catch(()=>{}),t}r(vx,"enqueue");var po=null;function XU(e,t){return vx(async()=>{if(!po)try{const s=await ke(()=>import("./prod-COP_vZWu.js"),__vite__mapDeps([0,1]));s.init(JU(e,t)),po=s}catch{}})}r(XU,"initBrowserErrorMonitoring");function ZU(){return vx(async()=>{const e=po;if(po=null,!e)return;const t=e.getClient();try{e.getCurrentScope().setClient(void 0)}catch{}try{await t?.close(2e3)}catch{}})}r(ZU,"teardownBrowserErrorMonitoring");function AA(e,t){let s;try{t&&(s=YU(t))}catch{}vx(async()=>{try{s?po?.captureException(e,s):po?.captureException(e)}catch{}})}r(AA,"captureBrowserException");function JU(e,t){return{dsn:e,environment:t??void 0,release:"8077ceab8545eb8082a0640e8b7f1fe8f1ef26c1",tracesSampleRate:0,sendDefaultPii:!1,beforeSend:r((s,l)=>{try{if(s.contexts={...s.contexts,browser_state:s.contexts?.browser_state??CA()},s.tags={...s.tags,browser_build_mode:"production"},s.exception?.values?.some(c=>c.mechanism?.type==="onunhandledrejection"||c.mechanism?.type==="auto.browser.global_handlers.onunhandledrejection")){const c=l.originalException;s.tags.browser_rejection_kind=c===null?"null":typeof c}}catch{}return s},"beforeSend"),integrations:r(s=>s.filter(l=>l.name!=="HttpContext"&&l.name!=="Breadcrumbs"),"integrations")}}r(JU,"buildBrowserSentryInitOptions");var e8=class extends x.Component{static{r(this,"RouteErrorBoundaryInner")}state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}componentDidCatch(e,t){AA(e,{boundary:"route",componentStack:t.componentStack})}componentDidUpdate(e){this.state.error&&e.resetKey!==this.props.resetKey&&this.setState({error:null})}render(){const{error:e}=this.state;return e?(0,a.jsxs)("div",{className:"mx-auto max-w-2xl space-y-4 px-4 py-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-lg font-semibold",children:"This page hit an error"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Something went wrong while rendering this page. You can go back and try again, or reload."})]}),(0,a.jsx)("pre",{className:"overflow-auto rounded-md border border-bad/30 bg-bad/10 px-3 py-2 text-xs text-bad whitespace-pre-wrap",children:e.message}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:this.props.onReset,children:"Go back"}),(0,a.jsx)(oe,{size:"sm",onClick:r(()=>window.location.reload(),"onClick"),children:"Reload page"})]})]}):this.props.children}};function t8({children:e}){const t=hn(),s=ja(),l=`${t.pathname}${t.search}`;return(0,a.jsx)(e8,{resetKey:l,onReset:r(()=>s(-1),"onReset"),children:e})}r(t8,"RouteErrorBoundary");function n8({open:e,onOpenChange:t,...s}){return(0,a.jsx)(ks,{open:e,onOpenChange:t,children:(0,a.jsxs)($s,{"aria-describedby":void 0,className:"gap-0 overflow-hidden p-0 sm:max-w-md",children:[(0,a.jsxs)("div",{className:"px-4 pt-4 pb-3",children:[(0,a.jsx)(Os,{children:"Chat with an agent"}),s.existingChatAgentIds&&(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"One conversation per agent. Pick up where you left off."})]}),(0,a.jsx)(a8,{...s,onComplete:r(()=>t(!1),"onComplete")},String(e))]})})}r(n8,"AgentChatPicker");function a8({agents:e,onSelect:t,onComplete:s,loading:l,error:c,onRetry:u,existingChatAgentIds:p,renderAgentIcon:f}){const h=(0,x.useRef)(!1),g=(0,x.useRef)(null);(0,x.useEffect)(()=>(h.current=!0,()=>{h.current=!1,g.current?.abort()}),[]);const[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(null),[S,N]=(0,x.useState)(null);async function I(C){if(j)return;k(C.id),N(null);const M=new AbortController;g.current=M;try{await t(C,M.signal),h.current&&s()}catch(R){N(R instanceof Error?R.message:"Couldn’t open chat. Try again.")}finally{k(null)}}return r(I,"selectAgent"),(0,a.jsxs)(a1,{children:[(0,a.jsx)($0,{"aria-label":"Search agents by name or role",placeholder:"Search by name or role…",value:v,onValueChange:y}),S&&(0,a.jsx)("p",{role:"alert",className:"px-4 py-3 text-sm text-bad",children:S}),j&&(0,a.jsx)("p",{role:"status",className:"sr-only",children:"Opening conversation…"}),c?(0,a.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 p-4 text-sm",children:[(0,a.jsx)("p",{children:"Couldn’t load agents. Try again."}),u&&(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:u,children:"Retry"})]}):l?(0,a.jsx)("p",{role:"status",className:"p-4 text-sm text-ink-3",children:"Loading agents…"}):(0,a.jsxs)(B0,{children:[(0,a.jsx)(U0,{children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4",children:[(0,a.jsx)("span",{children:e.length?`No agents match “${v}”`:"No agents yet."}),e.length?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Try another name or role."}),(0,a.jsx)(oe,{variant:"ghost",size:"sm",onClick:r(()=>y(""),"onClick"),children:"Clear search"})]}):(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Create an agent from the Agents page to start chatting."})]})}),(0,a.jsx)(Xs,{children:e.map(C=>(0,a.jsxs)(wn,{value:C.id,keywords:[C.name,C.title??"",C.role],onSelect:r(()=>{I(C)},"onSelect"),disabled:j!==null,className:"gap-3 px-3 py-3",children:[f?f(C):(0,a.jsx)(lg,{icon:C.icon,className:"size-4 shrink-0"}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"truncate font-medium",children:C.name}),(0,a.jsx)("span",{className:"truncate text-xs text-ink-3",children:C.title??C.role})]}),p&&(0,a.jsx)("span",{className:"shrink-0 text-xs text-ink-3",children:p.includes(C.id)?"Open chat":"New chat"}),C.status==="paused"&&(0,a.jsx)("span",{className:"text-xs text-(--status-agent-paused)",children:"Paused"}),C.status==="terminated"&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Terminated"}),C.status==="pending_approval"&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Awaiting approval"})]},C.id))})]})]})}r(a8,"AgentChatPickerResults");function s8({agents:e,existingChatAgentIds:t,availableAgents:s=e,activeId:l,previews:c={},loading:u=!1,error:p,onRetry:f,initialSearch:h="",onSelect:g,onBrowse:v,onAddChat:y,historyLoading:j,historyError:k,onRetryHistory:S}){const N=ja(),[I,C]=(0,x.useState)(!1),[M,R]=(0,x.useState)(h),_=(0,x.useRef)(null),D=(0,x.useId)(),U=M.trim().toLocaleLowerCase(),K=e.filter(E=>`${E.name} ${E.title??""} ${E.role}`.toLocaleLowerCase().includes(U));function z(){R(""),_.current?.focus()}return r(z,"focusSearch"),(0,a.jsxs)("aside",{"aria-labelledby":D,className:"flex h-full min-h-0 flex-col border-r border-line bg-bg",children:[(0,a.jsxs)("div",{className:"flex shrink-0 flex-col gap-4 px-3 pb-4 pt-4",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("h2",{id:D,className:"text-sm font-semibold",children:"Chat"}),(0,a.jsx)(oe,{variant:"secondary",size:"icon-sm","aria-label":"Add chat",title:"Add chat",onClick:r(()=>C(!0),"onClick"),children:(0,a.jsx)(as,{className:"size-4"})})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(pr,{"aria-hidden":"true",className:"pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-ink-3"}),(0,a.jsx)(Wn,{ref:_,"aria-label":"Search agents",placeholder:"Find an agent",value:M,onChange:r(E=>R(E.target.value),"onChange"),onKeyDown:r(E=>{E.key==="Escape"&&(E.stopPropagation(),R(""))},"onKeyDown"),className:"h-8 pl-8 pr-8 text-xs md:text-xs"}),M&&(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs","aria-label":"Clear search",className:"absolute right-1 top-1/2 -translate-y-1/2",onClick:z,children:(0,a.jsx)(ia,{className:"size-3"})})]})]}),(0,a.jsxs)("div",{className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-3 pb-3 scrollbar-auto-hide",children:[(0,a.jsx)("p",{className:"px-2 text-(length:--text-micro) font-medium uppercase tracking-widest text-ink-3",children:U?"Search results":"Teammates"}),(0,a.jsx)("span",{role:"status",className:"sr-only",children:u?"Loading agents":`${K.length} ${K.length===1?"agent":"agents"}`}),j&&(0,a.jsx)("p",{role:"status",className:"px-2 text-xs text-ink-3",children:"Loading chat history…"}),k&&(0,a.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 px-2 py-3",children:[(0,a.jsx)("p",{className:"text-xs text-ink-3",children:"Some chat history couldn’t load."}),(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:S,children:"Retry chat history"})]}),p?(0,a.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 px-2 py-6",children:[(0,a.jsx)("p",{className:"text-sm",children:"Couldn’t load your chats."}),(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:f,children:"Try again"})]}):u?(0,a.jsx)("div",{"aria-hidden":"true",className:"flex flex-col gap-1",children:[0,1,2,3].map(E=>(0,a.jsxs)("div",{className:"flex items-center gap-3 rounded-md px-2 py-3 motion-safe:animate-pulse",children:[(0,a.jsx)("div",{className:"size-8 shrink-0 rounded-lg bg-bg-3"}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-2",children:[(0,a.jsx)("div",{className:"h-3 w-2/3 rounded-sm bg-bg-3"}),(0,a.jsx)("div",{className:"h-2 w-full rounded-sm bg-bg-3"})]})]},E))}):K.length?(0,a.jsx)("nav",{"aria-label":"Agent conversations",className:"flex flex-col gap-1",children:K.map(E=>(0,a.jsxs)(mn,{to:`/chats/${encodeURIComponent(E.status==="terminated"?E.id:fr(E))}`,"aria-current":l===E.id?"page":void 0,title:`${E.name}${E.title?` · ${E.title}`:""}`,onClick:r(B=>{g&&(B.preventDefault(),g(E))},"onClick"),className:Y("flex min-w-0 items-center gap-3 rounded-md px-2 py-3 text-left transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus",l===E.id?oo.active:oo.rest),children:[(0,a.jsx)(mr,{agent:E,size:32}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"truncate text-sm font-medium",children:E.name}),(0,a.jsx)("span",{className:"truncate text-xs text-ink-3",children:E.status==="terminated"?"Terminated":E.status==="paused"?"Paused":c[E.id]??E.title??"Start a conversation"})]})]},E.id))}):!e.length&&(j||k)?null:(0,a.jsxs)("div",{className:"flex flex-col items-start gap-2 px-2 py-6",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.length?"No agents found":"No chats yet"}),(0,a.jsx)("p",{className:"text-xs leading-relaxed text-ink-3",children:e.length?"Try another name or role.":"Choose an agent to start a conversation."}),!e.length&&(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:r(()=>C(!0),"onClick"),children:"Choose an agent"}),e.length>0&&(0,a.jsx)(oe,{variant:"secondary",size:"sm",onClick:z,children:"Clear search"})]})]}),(0,a.jsx)("div",{className:"shrink-0 px-3 py-4",children:(0,a.jsx)(oe,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2 px-2",asChild:!v,onClick:v,children:v?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Gr,{className:"size-4"}),"Browse all agents"]}):(0,a.jsxs)(mn,{to:"/agents/all",children:[(0,a.jsx)(Gr,{className:"size-4"}),"Browse all agents"]})})}),(0,a.jsx)(n8,{agents:s,open:I,onOpenChange:C,existingChatAgentIds:t??e.map(E=>E.id),loading:u,error:p,onRetry:f,renderAgentIcon:r(E=>(0,a.jsx)(mr,{agent:E,size:32}),"renderAgentIcon"),onSelect:r(async(E,B)=>{y?await y(E,B):g?await g(E,B):N(`/chats/${encodeURIComponent(fr(E))}`),B?.aborted||R("")},"onSelect")})]})}r(s8,"AgentConversationSidebar");function i8(){const{selectedCompanyId:e}=bt(),{enabled:t,loaded:s}=Pf(),l=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),c=l.data?.user?.id??l.data?.session?.userId??null;return{companyId:e,userId:c,enabled:t,loaded:s,agents:me({queryKey:$.agents.list(e),queryFn:r(()=>Ha.list(e),"queryFn"),enabled:t&&!!e}),chats:me({queryKey:$.agentChats.list(e,c),queryFn:r(()=>o1.list(e),"queryFn"),enabled:t&&!!e&&l.isSuccess}),session:l}}r(i8,"useAgentChatNavigation");function r8(e,t){const s=kn(),l=ja(),{isMobile:c,setSidebarOpen:u}=Jn(),p=(0,x.useRef)({companyId:e,userId:t,mounted:!0});return(0,x.useEffect)(()=>{const f={companyId:e,userId:t,mounted:!0};return p.current=f,()=>{f.mounted=!1}},[e,t]),(0,x.useCallback)(async(f,h)=>{if(!e||f.companyId!==e)throw new Error("Choose an agent from this company.");const g=p.current,v=await o1.ensure(e,f.id);s.setQueryData($.agentChats.detail(e,t,f.id),v),s.setQueryData($.issues.detail(v.id),v),s.setQueryData($.agentChats.list(e,t),y=>[v,...(y??[]).filter(j=>j.id!==v.id)].sort((j,k)=>new Date(k.updatedAt).getTime()-new Date(j.updatedAt).getTime()||k.id.localeCompare(j.id))),!(!g.mounted||p.current!==g||h?.aborted)&&(l(`/chats/${encodeURIComponent(fr(f))}`),c&&u(!1))},[s,e,t,l,c,u])}r(r8,"useOpenAgentChat");function l8(){const{companyId:e,userId:t,agents:s,chats:l,session:c}=i8(),u=r8(e,t),p=ja(),f=Y0(e),{isMobile:h,setSidebarOpen:g}=Jn(),{pathname:v}=hn(),y=v.split("/chats/")[1]?.split("/")[0],j=s.data??[],k=s.isSuccess?[...new Set((l.data??[]).flatMap(D=>D.conversationAgentId&&!j.some(U=>U.id===D.conversationAgentId)?[D.conversationAgentId]:[]))]:[],S=Ef({queries:k.map(D=>({queryKey:$.agents.detail(D),queryFn:r(()=>Ha.get(D,e),"queryFn")}))}),N=new Map(j.map(D=>[D.id,D]));for(const D of S)D.data&&N.set(D.data.id,D.data);const I=[...N.values()].find(D=>D.id===y||D.status!=="terminated"&&encodeURIComponent(fr(D))===y),C=(l.data??[]).flatMap(D=>{const U=D.conversationAgentId?N.get(D.conversationAgentId):void 0;return U?[U]:[]});I&&!C.some(D=>D.id===I.id)&&C.unshift(I);const M=new Set(C.map(D=>D.id)),R=j.filter(D=>!M.has(D.id)&&D.status!=="terminated"&&(!f.isSuccess||$N(f.data,"agent",D.id)!=="left")).sort((D,U)=>D.name.localeCompare(U.name,void 0,{sensitivity:"base"})),_=Object.fromEntries((l.data??[]).filter(D=>D.conversationState==="active").map(D=>[D.conversationAgentId,"Working…"]));return(0,a.jsx)(s8,{agents:[...C,...R],availableAgents:j,existingChatAgentIds:C.map(D=>D.id),activeId:I?.id,previews:_,loading:s.isPending||l.isPending||c.isPending,error:s.error??l.error??c.error,onRetry:r(()=>{s.refetch(),l.refetch(),c.refetch()},"onRetry"),historyLoading:S.some(D=>D.isPending),historyError:S.find(D=>D.error)?.error,onRetryHistory:r(()=>{S.filter(D=>D.isError).forEach(D=>{D.refetch()})},"onRetryHistory"),onAddChat:u,onSelect:r(D=>{p(`/chats/${encodeURIComponent(D.status==="terminated"?D.id:fr(D))}`),h&&g(!1)},"onSelect")},`${e}:${t}`)}r(l8,"AgentConversationsSidebar");var jd=232,Ug=208,Bg=420,Bw=16;function gf(e){return Math.min(Bg,Math.max(Ug,e))}r(gf,"clampSidebarWidth");function Kw(e){if(typeof window>"u")return jd;try{const t=window.localStorage.getItem(e);if(!t)return jd;const s=Number.parseInt(t,10);return Number.isFinite(s)?gf(s):jd}catch{return jd}}r(Kw,"readStoredSidebarWidth");function qw(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,String(gf(t)))}catch{}}r(qw,"writeStoredSidebarWidth");function o8({children:e,open:t,collapsed:s=!1,peeking:l=!1,resizable:c=!1,storageKey:u="wardmote.sidebar.width",className:p,onPanelMouseEnter:f,onPanelMouseLeave:h,onPanelFocusCapture:g,onPanelBlurCapture:v}){const[y,j]=(0,x.useState)(()=>Kw(u)),[k,S]=(0,x.useState)(!1),N=(0,x.useRef)(y),I=(0,x.useRef)(null);(0,x.useEffect)(()=>{const V=Kw(u);N.current=V,j(V)},[u]);const C=t?y:0,M=t?s?72:C:0,R=t?s&&!l?72:C:0,_=R>M,D=c&&t&&!s,U=(0,x.useMemo)(()=>({width:`${M}px`}),[M]),K=(0,x.useMemo)(()=>({width:`${R}px`}),[R]),z=(0,x.useCallback)(V=>{const ue=gf(V);N.current=ue,j(ue),qw(u,ue)},[u]),E=(0,x.useCallback)(V=>{D&&(V.preventDefault(),V.currentTarget.setPointerCapture(V.pointerId),I.current={startX:V.clientX,startWidth:N.current},S(!0))},[D]),B=(0,x.useCallback)(V=>{if(!I.current)return;const ue=gf(I.current.startWidth+V.clientX-I.current.startX);N.current=ue,j(ue)},[]),O=(0,x.useCallback)(()=>{I.current&&(I.current=null,S(!1),qw(u,N.current))},[u]),Q=(0,x.useCallback)(V=>{D&&(V.key==="ArrowLeft"?(V.preventDefault(),z(y-Bw)):V.key==="ArrowRight"?(V.preventDefault(),z(y+Bw)):V.key==="Home"?(V.preventDefault(),z(Ug)):V.key==="End"&&(V.preventDefault(),z(Bg)))},[D,z,y]);return(0,a.jsxs)("div",{className:Y("relative h-full shrink-0",p),style:U,children:[(0,a.jsx)("div",{className:Y("absolute inset-y-0 left-0 flex flex-col overflow-hidden",_?"z-30 border-r border-line bg-bg shadow-lg":"z-0"),style:K,"data-sidebar-overlay":_?"":void 0,onMouseEnter:f,onMouseLeave:h,onFocusCapture:g,onBlurCapture:v,children:e}),D?(0,a.jsx)("div",{role:"separator","aria-label":"Resize sidebar","aria-orientation":"vertical","aria-valuemin":Ug,"aria-valuemax":Bg,"aria-valuenow":y,tabIndex:0,"data-dragging":k?"":void 0,className:"group absolute inset-y-0 z-20 cursor-col-resize touch-none outline-none",style:{right:-4,width:8},onPointerDown:E,onPointerMove:B,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:O,onKeyDown:Q,children:(0,a.jsx)("div",{className:Y("mx-auto h-full w-0.5 transition-colors",k?"bg-focus":"bg-transparent group-hover:bg-focus group-focus-visible:bg-focus")})}):null]})}r(o8,"SidebarShell");function wd({children:e,className:t}){return(0,a.jsx)("div",{"data-secondary-sidebar":"",className:Y("h-full w-full min-w-0 overflow-hidden",t),children:(0,a.jsx)(ZS,{children:e})})}r(wd,"SecondarySidebar");function c8(e,t){if(!t)return!1;if(t.source==="local_implicit"||t.isInstanceAdmin)return!0;if(!e)return!1;const s=t.memberships?.find(l=>l.companyId===e&&l.status==="active");return s?.membershipRole==="owner"||s?.membershipRole==="admin"||s?.membershipRole==="operator"||s?.membershipRole==="member"}r(c8,"canInviteCompanyMembers");function u8(){const e=iI(),t=me({queryKey:$.access.currentBoardAccess,queryFn:r(()=>ti.getCurrentBoardAccess(),"queryFn"),retry:!1,staleTime:3e4});return c8(e?.selectedCompanyId,t.data)}r(u8,"useCanInviteCompanyMembers");function d8(e){return e?.trim().toLowerCase().replace(/['"]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||null}r(d8,"slugifyUserPart");function f8(e){const t=[e?.id,e?.name,e?.email?.split("@")[0],e?.email];for(const s of t){const l=d8(s);if(l)return`/u/${l}`}return"/u/me"}r(f8,"userProfilePath");var Pc=null,_A=!1,Kg=!1,qg=new Set;function $c(){for(const e of qg)e()}r($c,"emit");function p8(e=typeof navigator>"u"?"":navigator.userAgent,t=typeof navigator>"u"?0:navigator.maxTouchPoints){return/iPhone|iPad|iPod/i.test(e)?!0:/Macintosh/i.test(e)&&t>1}r(p8,"isIosSafariLike");function m8(e=window){const t=r(l=>{l.preventDefault(),Pc=l,$c()},"onPrompt"),s=r(()=>{Pc=null,_A=!0,$c()},"onInstalled");return e.addEventListener("beforeinstallprompt",t),e.addEventListener("appinstalled",s),()=>{e.removeEventListener("beforeinstallprompt",t),e.removeEventListener("appinstalled",s)}}r(m8,"captureInstallPrompt");function h8(){return _A||$g()?"installed":Pc?"prompt":p8()?"ios-manual":"unavailable"}r(h8,"installAvailability");async function g8(){const e=Pc;if(!e)return"unavailable";Pc=null,$c(),await e.prompt();const{outcome:t}=await e.userChoice;return t}r(g8,"promptInstall");function Fg(e){Kg!==e&&(Kg=e,$c())}r(Fg,"setIosInstallHelpOpen");function x8(){return Kg}r(x8,"iosInstallHelpOpen");function b8(){return(0,x.useSyncExternalStore)(yx,x8,()=>!1)}r(b8,"useIosInstallHelpOpen");function yx(e){return qg.add(e),()=>{qg.delete(e)}}r(yx,"subscribe$1");function EA(){return(0,x.useSyncExternalStore)(yx,h8,()=>"unavailable")}r(EA,"useInstallAvailability");function TY(e){const t=EA();return(0,x.useSyncExternalStore)(yx,()=>j8(t,e),()=>!1)}r(TY,"useInstallNudgeVisible");var v8=2592e6,Hg="wardmote.install.visits",Fw="wardmote.install.visit-counted",IA="wardmote.install.snoozed-until";function Vg(e,t){const s=Number(e.getItem(t));return Number.isFinite(s)?s:0}r(Vg,"readNumber");function y8(e=window.localStorage,t=window.sessionStorage){try{if(t.getItem(Fw))return;t.setItem(Fw,"1"),e.setItem(Hg,String(Vg(e,Hg)+1))}catch{return}}r(y8,"recordAppVisit");function j8(e,t,s=Date.now(),l=window.localStorage){if(e!=="prompt"&&e!=="ios-manual"||/^\/(?:[^/]+\/)?onboarding(?:\/|$)/.test(t))return!1;try{return Vg(l,Hg)>=3&&Vg(l,IA)<=s}catch{return!1}}r(j8,"installNudgeVisible");function RY(e=Date.now(),t=window.localStorage){try{t.setItem(IA,String(e+v8))}catch{return}finally{$c()}}r(RY,"snoozeInstallNudge");var Hw="Install app",w8="Add Wardmote to your home screen or dock.";function k8({variant:e,onAfterAction:t}){const s=EA();if(s==="installed"||s==="unavailable")return null;const l=r(()=>{s==="ios-manual"?Fg(!0):g8(),t?.()},"handleClick");return e==="compact-menu-action"?(0,a.jsxs)("button",{type:"button",className:"flex h-(--profile-popover-row-height) w-full items-center gap-(--profile-popover-row-gap) rounded-lg px-2.5 text-left text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) text-ink transition-colors hover:bg-bg-3",onClick:l,children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(yg,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:Hw})]}):(0,a.jsxs)("button",{type:"button",className:"flex w-full items-start gap-3 rounded-xl px-3 py-3 text-left transition-colors hover:bg-bg-3/60",onClick:l,children:[(0,a.jsx)("span",{className:"mt-0.5 rounded-lg border border-line bg-bg/70 p-2 text-ink-3",children:(0,a.jsx)(yg,{className:"size-4"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block text-sm font-medium text-ink",children:Hw}),(0,a.jsx)("span",{className:"block text-xs text-ink-3",children:w8})]})]})}r(k8,"InstallAppMenuAction");function S8(){const e=b8();return(0,a.jsx)(ks,{open:e,onOpenChange:Fg,children:(0,a.jsxs)($s,{children:[(0,a.jsxs)(bo,{children:[(0,a.jsx)(Os,{children:"Install Wardmote"}),(0,a.jsx)(vo,{children:"Add Wardmote to your Home Screen from Safari."})]}),(0,a.jsxs)("ol",{className:"space-y-3 text-sm text-ink",children:[(0,a.jsxs)(_h,{index:1,icon:(0,a.jsx)(zR,{className:"size-4"}),children:["Tap ",(0,a.jsx)("strong",{children:"Share"})," in the Safari toolbar."]}),(0,a.jsxs)(_h,{index:2,icon:(0,a.jsx)($R,{className:"size-4"}),children:["Choose ",(0,a.jsx)("strong",{children:"Add to Home Screen"}),"."]}),(0,a.jsxs)(_h,{index:3,children:["Keep ",(0,a.jsx)("strong",{children:"Open as Web App"})," on, then tap ",(0,a.jsx)("strong",{children:"Add"}),"."]})]}),(0,a.jsx)($f,{children:(0,a.jsx)(oe,{type:"button",onClick:r(()=>Fg(!1),"onClick"),children:"Done"})})]})})}r(S8,"IosInstallHelpDialog");function _h({index:e,icon:t,children:s}){return(0,a.jsxs)("li",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"flex size-6 shrink-0 items-center justify-center rounded-full border border-line text-xs font-semibold text-ink-3",children:e}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t?(0,a.jsx)("span",{className:"text-ink-3",children:t}):null,(0,a.jsx)("span",{children:s})]})]})}r(_h,"InstallStep");function N8(e){if(!e)return"Unavailable";const t=new Date(e);return Number.isNaN(t.getTime())?"Unavailable":new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(t)}r(N8,"formatTimestamp");function C8(e){return!!e&&!Number.isNaN(new Date(e).getTime())}r(C8,"isValidTimestamp");function A8(e){return e?.devServer?.lastRestartAt??e?.serverInfo?.processStartedAt??null}r(A8,"restartTimestamp");function _8(e){const t=e?.serverInfo?.git;return t?.available?`${t.shortSha} · ${t.subject}`:"Commit unavailable"}r(_8,"commitLabel");function E8(e){const t=e?.serverInfo?.git;if(!t?.available)return"Unavailable";const s=t.localChanges;if(!s||!s.available)return"Change status unavailable";if(!s.hasLocalChanges)return"Clean checkout";const l=[[s.stagedFileCount,"staged"],[s.unstagedFileCount,"unstaged"],[s.untrackedFileCount,"untracked"]].filter(([c])=>Number(c)>0).map(([c,u])=>`${c} ${u}`);return l.length>0?`Local changes present (${l.join(", ")})`:"Local changes present"}r(E8,"localChangesLabel");function Eh({icon:e,label:t,value:s,dateTime:l}){return(0,a.jsxs)("div",{className:"flex w-full items-start gap-3 rounded-xl px-3 py-3 text-left",children:[(0,a.jsx)("span",{className:"mt-0.5 rounded-lg border border-line bg-bg/70 p-2 text-ink-3",children:(0,a.jsx)(e,{className:"size-4"})}),(0,a.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,a.jsx)("span",{className:"block text-sm font-medium text-ink",children:t}),l?(0,a.jsx)("time",{dateTime:l,className:"block break-words text-xs text-ink-3",children:s}):(0,a.jsx)("span",{className:"block break-words text-xs text-ink-3",children:s})]})]})}r(Eh,"ServerInfoRow");function I8(){const e=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")}).data?.enableServerInfoDebugView===!0,t=me({queryKey:$.health,queryFn:r(()=>Fc.get(),"queryFn"),enabled:e,refetchOnMount:"always",refetchInterval:r(v=>v.state.data?.devServer?.enabled?2e3:!1,"refetchInterval")});if(!e)return null;const s=t.data,l=t.isLoading&&!s,c=t.isError,u=A8(s),p=C8(u),f=c?"Health unavailable":l?"Loading...":N8(u),h=c?"Health unavailable":l?"Loading...":_8(s),g=c?"Health unavailable":l?"Loading...":E8(s);return(0,a.jsxs)("div",{className:"mt-2 border-t border-line pt-2",children:[(0,a.jsx)("p",{className:"px-3 pb-1 pt-1 text-(length:--text-micro) font-medium uppercase tracking-wide text-ink-3",children:"Server"}),(0,a.jsx)(Eh,{icon:j1,label:"Last restarted",value:f,dateTime:!c&&!l&&p?u:null}),(0,a.jsx)(Eh,{icon:jR,label:"Running commit",value:h}),(0,a.jsx)(Eh,{icon:gR,label:"Checkout state",value:g})]})}r(I8,"SidebarServerInfo");var T8="/company/settings/members?tab=invites",R8="https://github.com/tickernelz/wardmote/tree/main/docs",M8="https://github.com/tickernelz/wardmote/issues";function D8(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length>=2?`${t[0]?.[0]??""}${t[t.length-1]?.[0]??""}`.toUpperCase():e.slice(0,2).toUpperCase()}r(D8,"deriveInitials");function Ih({label:e,icon:t,onClick:s,href:l,external:c=!1}){const u="flex h-(--profile-popover-row-height) w-full items-center gap-(--profile-popover-row-gap) rounded-lg px-2.5 text-left text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) text-ink transition-colors hover:bg-bg-3",p=(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(t,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e})]});return l?c?(0,a.jsx)("a",{href:l,target:"_blank",rel:"noreferrer",className:u,onClick:s,children:p}):(0,a.jsx)(mn,{to:l,className:u,onClick:s,children:p}):(0,a.jsx)("button",{type:"button",className:u,onClick:s,children:p})}r(Ih,"MenuAction");function Vw({deploymentMode:e,open:t,onOpenChange:s,forceExpanded:l=!1}){const{hidden:c,loaded:u}=gr(),p=u8()?T8:null,f=u&&p!==null&&!Fd(c,"company.members")&&!Fd(c,"company.invites"),[h,g]=(0,x.useState)(!1),{isMobile:v,setSidebarOpen:y,collapsed:j,peeking:k}=Jn(),S=j&&!k&&!l,N=t??h,I=s??g,{data:C}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),M=ux({onSignedOut:K}),R=C?.user.name?.trim()||"Board",_=C?.user.email?.trim()||(e==="authenticated"?"Signed in":"Local workspace board"),D=D8(R),U=f8(C?.user);function K(){I(!1),v&&y(!1)}r(K,"closeNavigationChrome");function z(){M.mutate()}return r(z,"handleSignOut"),(0,a.jsx)("div",{className:"bg-line/50 px-3 py-2 dark:bg-bg-3",children:(0,a.jsxs)("div",{className:Y("flex items-center gap-0.5",!S&&"px-2"),children:[(0,a.jsxs)(ws,{open:N,onOpenChange:I,children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsxs)("button",{type:"button",className:Y("flex min-w-0 items-center gap-2.5 rounded-lg text-left text-(length:--text-compact) font-medium text-ink/80 transition-colors hover:bg-bg-3 hover:text-ink",S?"w-full px-3 py-2":"flex-1 px-2 py-1.5"),"aria-label":"Open account menu",children:[(0,a.jsxs)(Yd,{size:"sm",children:[C?.user.image?(0,a.jsx)(Qd,{src:C.user.image,alt:R}):null,(0,a.jsx)(Gd,{children:D})]}),(0,a.jsx)("span",{className:Y("min-w-0 flex-1 truncate",S&&"block w-0 min-w-0 -ms-2.5 overflow-hidden whitespace-nowrap text-transparent select-none"),children:R})]})}),(0,a.jsxs)(js,{side:"top",align:"start",sideOffset:10,className:"min-h-(--profile-popover-min-height) w-(--profile-popover-width) max-w-(--sz-calc-24) overflow-hidden rounded-xl border-line bg-bg-2 p-0 shadow-(--shadow-profile-popover)",children:[(0,a.jsxs)("div",{className:"relative flex h-(--profile-popover-header-height) shrink-0 items-center gap-2.5 px-3.5",children:[(0,a.jsx)(mn,{to:U,"aria-label":"View profile",onClick:K,className:"absolute inset-0 transition-colors hover:bg-bg-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus"}),(0,a.jsxs)(Yd,{className:"pointer-events-none relative size-9",children:[C?.user.image?(0,a.jsx)(Qd,{src:C.user.image,alt:R}):null,(0,a.jsx)(Gd,{className:"text-xs text-ink",children:D})]}),(0,a.jsxs)("div",{className:"pointer-events-none relative min-w-0 flex-1",children:[(0,a.jsx)("h2",{className:"truncate text-sm font-semibold leading-(--profile-popover-label-line-height) text-ink",children:R}),(0,a.jsx)("p",{className:"truncate text-(length:--text-micro) leading-(--profile-popover-meta-line-height) text-ink-3",children:_})]})]}),(0,a.jsxs)("div",{className:"flex flex-1 flex-col gap-0.5 border-t border-line px-2.5 pb-2.5 pt-2",children:[(0,a.jsx)(Ih,{label:"Settings",icon:YS,href:"/company/settings",onClick:K}),f&&p?(0,a.jsx)(Ih,{label:"Invite",icon:SN,href:p,onClick:K}):null,(0,a.jsx)(Ih,{label:"Documentation",icon:LS,href:R8,external:!0,onClick:r(()=>I(!1),"onClick")}),(0,a.jsx)(A3,{variant:"compact-menu-action",onAfterToggle:r(()=>I(!1),"onAfterToggle")}),(0,a.jsx)(k8,{variant:"compact-menu-action",onAfterAction:r(()=>I(!1),"onAfterAction")}),e==="authenticated"?(0,a.jsxs)("button",{type:"button",className:Y("flex h-(--profile-popover-row-height) w-full items-center gap-(--profile-popover-row-gap) rounded-lg px-2.5 text-left text-(length:--text-compact) font-medium leading-(--profile-popover-label-line-height) text-ink transition-colors hover:bg-bad/10",M.isPending&&"cursor-not-allowed opacity-60"),onClick:z,disabled:M.isPending,children:[(0,a.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,a.jsx)(Uf,{className:"size-4"})}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:M.isPending?"Signing out...":"Sign out"})]}):null,(0,a.jsx)(I8,{})]})]})]}),S?null:(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("a",{href:M8,target:"_blank",rel:"noreferrer","aria-label":"Share feedback",className:"flex size-8 shrink-0 items-center justify-center rounded-lg text-ink-3/50 transition-colors hover:bg-bg-3 hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:(0,a.jsx)(I0,{className:"h-4 w-4","aria-hidden":"true"})})}),(0,a.jsx)(Ts,{side:"top",children:"Share feedback"})]})]})})}r(Vw,"SidebarAccountMenu");var O8=["input","textarea","select","[contenteditable='true']","[contenteditable='plaintext-only']","[role='textbox']","[role='combobox']"].join(", "),L8="[data-page-search-target='true']",z8=new Set(["Shift","Meta","Control","Alt"]);function ko(e){return e instanceof HTMLElement?e.isContentEditable?!0:!!e.closest(O8):!1}r(ko,"isKeyboardShortcutTextInputTarget");function Wg(e=document){return!!e.querySelector("[role='dialog'][aria-modal='true']")}r(Wg,"hasBlockingShortcutDialog");function P8(e){if(!e.isConnected||"disabled"in e&&typeof e.disabled=="boolean"&&e.disabled||e.closest("[hidden], [aria-hidden='true'], [inert]")||e.closest("[role='dialog'][aria-modal='true']"))return!1;const t=window.getComputedStyle(e);return t.display==="none"||t.visibility==="hidden"?!1:e.getClientRects().length>0||e===document.activeElement}r(P8,"isVisibleShortcutTarget");function $8(e=document){return Array.from(e.querySelectorAll(L8)).find(t=>P8(t))??null}r($8,"findPageSearchShortcutTarget");function U8(e=document){const t=$8(e);return t?(t.focus(),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.select(),!0):!1}r(U8,"focusPageSearchShortcutTarget");function B8({key:e,isComposing:t}){return e==="Enter"&&!t}r(B8,"shouldBlurPageSearchOnEnter");function K8({key:e,isComposing:t,currentValue:s}){return e==="Escape"&&!t&&s.length===0}r(K8,"shouldBlurPageSearchOnEscape");function np(e){return z8.has(e)}r(np,"isModifierOnlyKey");function MY({defaultPrevented:e,key:t,metaKey:s,ctrlKey:l,altKey:c,target:u,hasOpenDialog:p,hasSelection:f}){if(e||s||l||c||np(t)||p||ko(u))return"ignore";switch(t){case"j":case"ArrowDown":return"next";case"k":case"ArrowUp":return"previous";case"Enter":return f?"toggle":"ignore";case"x":return f?"dismiss":"ignore";default:return"ignore"}}r(MY,"resolveAttentionQueueKeyAction");function DY({armed:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){return!e||t||l||c||u||np(s)||f||ko(p)?"ignore":s.toLowerCase()==="y"?"archive":"ignore"}r(DY,"resolveInboxQuickArchiveKeyAction");function OY({hasUndoableArchive:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){return!e||t||l||c||u||np(s)||f||ko(p)?"ignore":s==="u"?"undo_archive":"ignore"}r(OY,"resolveInboxUndoArchiveKeyAction");function q8({armed:e,defaultPrevented:t,key:s,metaKey:l,ctrlKey:c,altKey:u,target:p,hasOpenDialog:f}){if(t)return e?"disarm":"ignore";if(l||c||u||np(s))return"ignore";if(f||ko(p))return e?"disarm":"ignore";const h=s.toLowerCase();return e?h==="i"?"navigate_inbox":h==="c"?"focus_comment":h==="f"?"open_file_viewer":h==="g"?"arm":"disarm":h==="g"?"arm":"ignore"}r(q8,"resolveIssueDetailGoKeyAction");function F8({onNewIssue:e,onSearch:t,onToggleSidebar:s,onTogglePanel:l,onShowShortcuts:c,onGoToInbox:u}){(0,x.useEffect)(()=>{let p=!1,f=null;const h=r(()=>{f!==null&&(window.clearTimeout(f),f=null)},"clearGoChordTimeout"),g=r(()=>{p=!1,h()},"disarmGoChord"),v=r(()=>{p=!0,h(),f=window.setTimeout(()=>{p=!1,f=null},1200)},"armGoChord");function y(S){if(S.defaultPrevented){g();return}if(u){const N=q8({armed:p,defaultPrevented:S.defaultPrevented,key:S.key,metaKey:S.metaKey,ctrlKey:S.ctrlKey,altKey:S.altKey,target:S.target,hasOpenDialog:Wg()});if(N==="arm"){v();return}if(N==="navigate_inbox"){g(),S.preventDefault(),u();return}if(N==="focus_comment"||N==="open_file_viewer"){g(),S.preventDefault();return}N==="disarm"&&g()}if(!ko(S.target)&&!Wg()){if(S.key==="/"&&!S.metaKey&&!S.ctrlKey&&!S.altKey){S.preventDefault(),U8()||t?.();return}if(S.key==="?"&&!S.metaKey&&!S.ctrlKey&&!S.altKey){S.preventDefault(),c?.();return}S.key==="c"&&!S.metaKey&&!S.ctrlKey&&!S.altKey&&(S.preventDefault(),e?.()),S.key==="["&&!S.metaKey&&!S.ctrlKey&&(S.preventDefault(),s?.()),S.key==="]"&&!S.metaKey&&!S.ctrlKey&&(S.preventDefault(),l?.())}}r(y,"handleKeyDown");const j=r(()=>g(),"handlePointerDown"),k=r(S=>{S.target instanceof HTMLElement&&S.target!==document.body&&g()},"handleFocusIn");return document.addEventListener("pointerdown",j,!0),document.addEventListener("focusin",k,!0),document.addEventListener("keydown",y),()=>{g(),document.removeEventListener("pointerdown",j,!0),document.removeEventListener("focusin",k,!0),document.removeEventListener("keydown",y)}},[e,t,s,l,c,u])}r(F8,"useKeyboardShortcuts");var H8=new Set(["auth","invite","board-claim","cli-auth","docs","s"]);function TA(e){const t=(e.split("?")[0]??"").split("/").filter(Boolean);if(t.length===0)return!0;const[s]=t;return!H8.has(s)}r(TA,"isRememberableCompanyPath");function V8(e){const t=Wd(e.companyPrefix);return e.companies.find(s=>Wd(s.issuePrefix)===t)??null}r(V8,"findCompanyByPrefix");function W8(e){const t=vS(e.pathname);return t?V8({companies:e.companies,companyPrefix:t})?.id??null:e.fallbackCompanyId}r(W8,"getRememberedPathOwnerCompanyId");function Q8(e){const t=e.path?Tf(e.path):"/dashboard";if(!TA(t))return"/dashboard";const[s,l]=(t.split("?")[0]??"").split("/").filter(Boolean);if(s==="issues"&&l){const c=/^([A-Za-z]+)-\d+$/.exec(l);if(c&&Wd(c[1]??"")!==Wd(e.companyPrefix))return"/dashboard"}return t}r(Q8,"sanitizeRememberedPathForCompany");var RA="wardmote.companyPaths";function MA(){try{const e=localStorage.getItem(RA);if(e)return JSON.parse(e)}catch{}return{}}r(MA,"getCompanyPaths");function G8(e,t){const s=MA();s[e]=t,localStorage.setItem(RA,JSON.stringify(s))}r(G8,"saveCompanyPath");function Y8(){const{companies:e,selectedCompanyId:t,selectedCompany:s,selectionSource:l}=bt(),c=hn(),u=ja(),p=(0,x.useRef)(t),f=(0,x.useMemo)(()=>W8({companies:e,pathname:c.pathname,fallbackCompanyId:p.current}),[e,c.pathname]),h=c.pathname+c.search;(0,x.useEffect)(()=>{const g=f,v=Tf(h);g&&TA(v)&&G8(g,v)},[h,f]),(0,x.useEffect)(()=>{if(t){if(p.current!==null&&t!==p.current&&l!=="route_sync"&&s){const g=MA(),v=Q8({path:g[t],companyPrefix:s.issuePrefix});u(`/${s.issuePrefix}${v}`,{replace:!0})}p.current=t}},[s,t,l,u])}r(Y8,"useCompanyPageMemory");var X8=class{static{r(this,"MobileNavScrollTracker")}options;lastTop;lastMaxTop;visible=!0;direction=0;distance=0;constructor(e,t,s){this.options=e,this.lastTop=t,this.lastMaxTop=s}update(e,t){const s=Math.max(0,Math.min(e,t)),l=s-Math.max(this.lastTop,this.options.topZone),c=t!==this.lastMaxTop;if(this.lastTop=s,this.lastMaxTop=t,s<=this.options.topZone)this.visible=!0,this.direction=0,this.distance=0;else if(c)this.direction=0,this.distance=0;else if(l!==0){const u=Math.sign(l);u!==this.direction&&(this.distance=0),this.direction=u,this.distance+=Math.abs(l);const p=u>0?this.options.hideDistance:this.options.showDistance;this.distance>=p&&(this.visible=u<0,this.distance=0)}return this.visible}};function Z8(e,t){const[s,l]=(0,x.useState)(!0);return(0,x.useEffect)(()=>{if(l(!0),!e)return;const c=getComputedStyle(document.documentElement),u=r(y=>Number.parseFloat(c.getPropertyValue(y))||0,"distance"),p=r(()=>{const y=document.scrollingElement??document.documentElement;return{top:window.scrollY||y.scrollTop||0,max:Math.max(0,y.scrollHeight-y.clientHeight)}},"scrollBounds"),f=p(),h=new X8({topZone:u("--mobile-nav-scroll-top-zone"),hideDistance:u("--mobile-nav-scroll-hide-distance"),showDistance:u("--mobile-nav-scroll-show-distance")},f.top,f.max);let g=null;const v=r(()=>{g===null&&(g=requestAnimationFrame(()=>{g=null;const{top:y,max:j}=p(),k=h.visible,S=h.update(y,j);S!==k&&l(S)}))},"onScroll");return window.addEventListener("scroll",v,{passive:!0}),()=>{window.removeEventListener("scroll",v),g!==null&&cancelAnimationFrame(g)}},[e,t]),s}r(Z8,"useMobileNavVisibility");function J8(e){const{matchedCompany:t,selectedCompanyId:s,companies:l}=e;return!t||t.status!=="archived"||s===t.id?null:l.find(c=>c.id===s&&c.status!=="archived")??l.find(c=>c.status!=="archived")??null}r(J8,"resolveArchivedCompanyBounce");function LY(e){const{archivedCompanyId:t,companies:s}=e,l=s.find(c=>c.id!==t&&c.status!=="archived");return l?{kind:"company",company:l}:{kind:"companies_list"}}r(LY,"resolveCompanyArchiveDeparture");function e6(e){const{selectionSource:t,selectedCompanyId:s,routeCompanyId:l}=e;return!(s===l||t==="manual"&&s)}r(e6,"shouldSyncCompanySelectionFromRoute");function t6(e,t){return e instanceof HTMLElement?!(t instanceof HTMLElement)||!document.contains(t)||t===document.body||t===document.documentElement?!0:!e.contains(t):!1}r(t6,"shouldFocusMainContentAfterNavigation");function n6(e){if(!(e instanceof HTMLElement))return()=>{};const t=window.requestAnimationFrame(()=>{t6(e,document.activeElement)&&e.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(t)}r(n6,"scheduleMainContentFocus");function a6(e=document,t=window){const s=r(()=>{e.documentElement.scrollTop!==0&&(e.documentElement.scrollTop=0),e.body.scrollTop!==0&&(e.body.scrollTop=0)},"onScroll");return t.addEventListener("scroll",s,{capture:!0}),()=>t.removeEventListener("scroll",s,{capture:!0})}r(a6,"pinDocumentScrollToZero");var s6=vE({NotFoundPage:r(()=>dr,"NotFoundPage")});function dr({scope:e="global",requestedPrefix:t}){const s=hn(),{setBreadcrumbs:l}=n1(),{companies:c,selectedCompany:u}=bt();(0,x.useEffect)(()=>{l([{label:"Not Found"}])},[l]);const p=u??c[0]??null,f=p?`/${p.issuePrefix}/dashboard`:"/",h=`${s.pathname}${s.search}${s.hash}`,g=t?.toUpperCase(),v=e==="invalid_company_prefix"?"Organization not found":"Page not found",y=e==="invalid_company_prefix"?`No organization matches prefix "${g??"unknown"}".`:"This route does not exist.";return(0,a.jsx)("div",{className:"mx-auto max-w-2xl py-10",children:(0,a.jsxs)(Hc,{className:"block p-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"rounded-md border border-bad/20 bg-bad/10 p-2",children:(0,a.jsx)(ai,{className:"h-5 w-5 text-bad"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:v}),(0,a.jsx)("p",{className:"text-sm text-ink-3",children:y})]})]}),(0,a.jsxs)("div",{className:"mt-4 rounded-md border border-line bg-bg-3/20 px-3 py-2 text-xs text-ink-3",children:["Requested path: ",(0,a.jsx)("code",{className:"font-mono",children:h})]}),(0,a.jsxs)("div",{className:"mt-5 flex flex-wrap gap-2",children:[(0,a.jsx)(oe,{asChild:!0,children:(0,a.jsxs)(mn,{to:f,children:[(0,a.jsx)(xS,{className:"mr-1.5 h-4 w-4"}),"Open dashboard"]})}),(0,a.jsx)(oe,{variant:"secondary",asChild:!0,children:(0,a.jsx)(mn,{to:"/",children:"Go home"})})]})]})})}r(dr,"NotFoundPage$1");function i6(e,t){return XC(e,t)[0]?.toLowerCase()??null}r(i6,"getCompanyRouteSegment");var r6=new Set(["browse","connections","assistant-connection","connect","chat","vercel-connect","review","attention","gateways","advanced","app"]);function l6(e){const t=(0,x.useRef)(null);return(0,x.useLayoutEffect)(()=>{const s=t.current,l=s?.parentElement;if(!e||!s||!l)return;const c=r(()=>l.style.setProperty("--mobile-topbar-h",`${s.offsetHeight}px`),"apply");if(c(),typeof ResizeObserver>"u")return()=>l.style.removeProperty("--mobile-topbar-h");const u=new ResizeObserver(c);return u.observe(s),()=>{u.disconnect(),l.style.removeProperty("--mobile-topbar-h")}},[e]),t}r(l6,"useMobileTopbarHeightVar");function o6({sidebarSections:e}){const{sidebarOpen:t,setSidebarOpen:s,toggleSidebar:l,collapsed:c,peeking:u,setPeeking:p,isMobile:f,isTablet:h}=Jn(),g=l6(f),{openNewIssue:v,openOnboarding:y}=Us(),{togglePanelVisible:j}=dx(),k=Lf()?.pushToast??null,{companies:S,loading:N,selectedCompany:I,selectedCompanyId:C,selectionSource:M,setSelectedCompanyId:R}=bt(),{companyPrefix:_,pluginRoutePath:D,agentId:U,routineId:K}=Ps(),z=ja(),E=hn(),B=PE(),O=W4(E.pathname,_),Q=O.builtInContextualSurface==="settings",V=O.companySegments,ue=O.isTaskDetail,{enabled:ce}=Pf(),X=ce&&V[0]?.toLowerCase()==="chats",A=ue||X,ee=V[0]?.toLowerCase()==="tools",ie=V[0]?.toLowerCase()==="apps",le=ie&&V[1]&&!r6.has(V[1].toLowerCase())?V[1]:null,Ae=ie&&V[1]?.toLowerCase()==="app"&&V[2]?V[2]:null,de=(0,x.useRef)(!1),we=(0,x.useRef)(null),ye=(0,x.useRef)(null),Me=(0,x.useRef)(new q3),he=(0,x.useRef)(E.key),ve=Z8(f&&!ue,E.pathname),[et,$e]=(0,x.useState)(!1),Ie=(0,x.useMemo)(()=>{if(!_)return null;const _e=_.toUpperCase();return S.find(Re=>Re.issuePrefix.toUpperCase()===_e)??null},[S,_]),ct=!!_&&!N&&S.length>0&&!Ie,He=(0,x.useMemo)(()=>D?.toLowerCase()??i6(E.pathname,_),[_,E.pathname,D]),vt=Ie?.id??null,Jt=Ie?.issuePrefix??null,{slots:ge}=qc({slotTypes:["page","routeSidebar"],companyId:vt,enabled:!!(vt&&He)}),Oe=(0,x.useMemo)(()=>fT(ge,He),[He,ge]),De=(0,x.useMemo)(()=>({companyId:vt,companyPrefix:Jt}),[vt,Jt]),ut=Q?(0,a.jsx)(X4,{}):le?(0,a.jsx)(iw,{kind:"connection",connectionId:le}):Ae?(0,a.jsx)(iw,{kind:"application",applicationId:Ae}):ie||ee?(0,a.jsx)(dz,{}):Oe?(0,a.jsx)(Xc,{surface:`plugin:${Oe.id}`,title:Oe.displayName,children:(0,a.jsx)(P0,{slot:Oe,context:De,className:"min-h-0 flex-1",missingBehavior:"placeholder"})}):null,Ht=X?(0,a.jsx)(l8,{}):O.builtInContextualSurface==="agent"&&U?(0,a.jsx)(yz,{agentRef:U}):O.builtInContextualSurface==="routine"&&K?(0,a.jsx)(L3,{children:(0,a.jsx)(Sz,{routineId:K})}):O.builtInContextualSurface==="skills"?(0,a.jsx)(Az,{}):ut,Vt=Ht!=null,gt=Vt&&(X||O.builtInContextualSurface==="skills"||O.builtInContextualSurface==="agent"||O.builtInContextualSurface==="routine"||ie||ee),un=Q&&(f||h),P=Vt&&!gt&&!(h&&Q),qe=gt,Ye=Vt?Oe&&!O.builtInContextualSurface?`plugin:${Oe.id}`:O.builtInContextualSurface:null,xt=(0,x.useRef)(null),{data:at}=me({queryKey:$.health,queryFn:r(()=>Fc.get(),"queryFn"),retry:!1,refetchInterval:r(_e=>_e.state.data?.devServer?.enabled?2e3:!1,"refetchInterval"),refetchIntervalInBackground:!1});(0,x.useEffect)(()=>{const _e=xt.current;Ye&&_&&_e&&_e.surface!==Ye&&_e.pathname!==E.pathname&&Q4({surface:Ye,companyPrefix:_,previousPathname:_e.pathname}),xt.current={pathname:E.pathname,surface:Ye}},[_,Ye,E.pathname]),(0,x.useEffect)(()=>{N||de.current||at?.deploymentMode!=="authenticated"&&S.length===0&&(de.current=!0,y())},[S,N,y,at?.deploymentMode]),(0,x.useEffect)(()=>{if(!_||N||S.length===0)return;if(!Ie){const Re=(C?S.find(lt=>lt.id===C):null)??S[0]??null;Re&&C!==Re.id&&R(Re.id,{source:"route_sync"});return}if(_!==Ie.issuePrefix){const Re=E.pathname.replace(/^\/[^/]+/,"");z(`/${Ie.issuePrefix}${Re}${E.search}`,{replace:!0});return}const _e=J8({matchedCompany:Ie,selectedCompanyId:C,companies:S});if(_e){k?.({title:`${Ie.name} is archived`,body:`Switched to ${_e.name}.`,tone:"info",dedupeKey:`archived-company-bounce:${Ie.id}`}),R(_e.id,{source:"route_sync"}),z(`/${_e.issuePrefix}/dashboard`,{replace:!0});return}e6({selectionSource:M,selectedCompanyId:C,routeCompanyId:Ie.id})&&R(Ie.id,{source:"route_sync"})},[_,S,N,Ie,E.pathname,E.search,z,k,M,C,R]);const Kt=j,ea=(0,x.useCallback)(()=>{document.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,bubbles:!0,cancelable:!0}))},[]),en=(0,x.useRef)(null),Mt=(0,x.useRef)(!1),Gt=(0,x.useRef)(!1),dt=(0,x.useCallback)(()=>{en.current!==null&&(window.clearTimeout(en.current),en.current=null)},[]),On=(0,x.useCallback)(()=>{dt(),en.current=window.setTimeout(()=>p(!0),50)},[dt,p]),mt=(0,x.useCallback)(()=>{dt(),p(!0)},[dt,p]),Nn=(0,x.useCallback)(()=>{dt(),en.current=window.setTimeout(()=>p(!1),120)},[dt,p]),It=(0,x.useCallback)(()=>{Mt.current=!0,c&&!Gt.current&&On()},[c,On]),tn=(0,x.useCallback)(()=>{Mt.current=!1,Gt.current=!1,Nn()},[Nn]),qt=(0,x.useCallback)(()=>{Gt.current||mt()},[mt]),Tt=(0,x.useCallback)(()=>{Mt.current||Nn()},[Nn]);(0,x.useEffect)(()=>dt,[dt]);const Ct=(0,x.useRef)(c);return(0,x.useEffect)(()=>{c!==Ct.current&&(c?(dt(),p(!1),Gt.current=Mt.current):Gt.current=!1,Ct.current=c)},[c,dt,p]),(0,x.useEffect)(()=>{if(!u)return;const _e=r(Re=>{Re.key==="Escape"&&(dt(),p(!1))},"onKeyDown");return window.addEventListener("keydown",_e),()=>window.removeEventListener("keydown",_e)},[u,dt,p]),Y8(),F8({onNewIssue:r(()=>v(),"onNewIssue"),onSearch:ea,onToggleSidebar:l,onTogglePanel:Kt,onShowShortcuts:r(()=>$e(!0),"onShowShortcuts"),onGoToInbox:r(()=>z("/inbox"),"onGoToInbox")}),(0,x.useEffect)(()=>{if(!f)return;const _e=30,Re=50,lt=75;let Dt=0,ze=0;const Ot=r(Lt=>{const nn=Lt.touches[0];Dt=nn.clientX,ze=nn.clientY},"onTouchStart"),Rt=r(Lt=>{const nn=Lt.changedTouches[0],Wt=nn.clientX-Dt;if(!(Math.abs(nn.clientY-ze)>lt)){if(!t&&Dt<_e&&Wt>Re){s(!0);return}t&&Wt<-50&&s(!1)}},"onTouchEnd");return document.addEventListener("touchstart",Ot,{passive:!0}),document.addEventListener("touchend",Rt,{passive:!0}),()=>{document.removeEventListener("touchstart",Ot),document.removeEventListener("touchend",Rt)}},[f,t,s]),(0,x.useEffect)(()=>{const _e=document.body.style.overflow;return document.body.style.overflow=f?"visible":"clip",()=>{document.body.style.overflow=_e}},[f]),(0,x.useEffect)(()=>{if(!f)return a6()},[f]),(0,x.useEffect)(()=>{if(typeof document>"u")return;const _e=ye.current;return n6(_e)},[E.pathname]),(0,x.useEffect)(()=>{const _e=ye.current;if(!_e)return;const Re=r(()=>{Me.current.remember(he.current,_e.scrollTop)},"recordScroll");return _e.addEventListener("scroll",Re,{passive:!0}),()=>_e.removeEventListener("scroll",Re)},[]),(0,x.useLayoutEffect)(()=>{const _e=ye.current,Re=K3({previousPathname:we.current,pathname:E.pathname,navigationType:B,state:E.state});we.current=E.pathname;const lt=B==="POP",Dt=lt?Me.current.recall(E.key):0;if(he.current=E.key,lt){Qy(_e,Dt);const ze=requestAnimationFrame(()=>Qy(_e,Dt));return()=>cancelAnimationFrame(ze)}Re&&H3(_e)},[E.key,E.pathname,E.state,B]),(0,a.jsx)(O3,{children:(0,a.jsxs)("div",{"data-app-shell":"",className:Y("bg-bg text-ink pt-(--sz-safe-top)",f?"min-h-dvh overflow-x-clip":"flex h-dvh flex-col overflow-clip"),children:[(0,a.jsx)("a",{href:"#main-content",className:"sr-only focus:not-sr-only focus:fixed focus:left-3 focus:top-3 focus:z-(--z-200) focus:rounded-md focus:bg-bg focus:px-3 focus:py-2 focus:text-sm focus:font-medium focus:shadow-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-focus",children:"Skip to Main Content"}),(0,a.jsx)(VU,{}),(0,a.jsx)(jU,{}),(0,a.jsx)(NU,{devServer:at?.devServer}),(0,a.jsx)(AU,{diskSpace:at?.diskSpace,warnings:at?.warnings}),(0,a.jsx)(DU,{}),(0,a.jsx)(UU,{}),(0,a.jsxs)("div",{className:Y("min-h-0 flex-1",f?"w-full":"flex overflow-clip"),children:[f&&t&&(0,a.jsx)("button",{type:"button",className:"fixed inset-0 z-40 bg-black/50",onClick:r(()=>s(!1),"onClick"),"aria-label":"Close sidebar"}),f?(0,a.jsxs)("div",{className:Y("fixed inset-y-0 left-0 z-50 flex flex-col overflow-hidden pt-(--sz-safe-top) transition-transform duration-100 ease-out",t?"translate-x-0":"-translate-x-full"),children:[(0,a.jsx)("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:(0,a.jsx)("div",{className:"w-60 shrink-0 overflow-hidden",children:Vt?(0,a.jsx)(wd,{children:Ht}):(0,a.jsx)(aw,{children:e})})}),(0,a.jsx)(Vw,{deploymentMode:at?.deploymentMode,forceExpanded:P})]}):(0,a.jsxs)(o8,{open:t,collapsed:P?!1:c,peeking:P?!1:u,resizable:!0,onPanelMouseEnter:P?void 0:It,onPanelMouseLeave:P?void 0:tn,onPanelFocusCapture:!P&&c?qt:void 0,onPanelBlurCapture:!P&&c?Tt:void 0,children:[(0,a.jsx)("div",{className:"flex flex-1 min-h-0",children:P?(0,a.jsx)(wd,{children:Ht}):(0,a.jsx)(aw,{children:e})}),(0,a.jsx)(Vw,{deploymentMode:at?.deploymentMode,forceExpanded:P})]}),!f&&qe&&!gt?(0,a.jsx)(wd,{className:"w-60 shrink-0",children:Ht}):null,(0,a.jsxs)("div",{className:Y("flex min-w-0 flex-col",f?"w-full":"h-full flex-1"),children:[(0,a.jsxs)("div",{ref:g,"data-slot":f?"mobile-topbar":void 0,className:Y(!f&&A&&"hidden",f&&"sticky top-0 z-20 bg-bg/95 backdrop-blur supports-[backdrop-filter]:bg-bg/85"),children:[(0,a.jsx)($w,{mobile:f,onNavigateHome:r(()=>z("/dashboard"),"onNavigateHome")}),(0,a.jsx)(ow,{}),un?(0,a.jsx)("div",{className:"border-b border-line px-4 pb-3",children:(0,a.jsx)(nz,{})}):null]}),(0,a.jsxs)("div",{className:Y(f?"block":"relative flex flex-1 min-h-0",!f&&A&&"streamlined-task-detail-surface"),children:[!f&>?(0,a.jsx)(wd,{className:"w-60 shrink-0 bg-bg",children:Ht}):null,(0,a.jsxs)("div",{className:Y(!f&&A?"flex min-w-0 flex-1 flex-col":"contents"),children:[!f&&A?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)($w,{mobile:!1,onNavigateHome:r(()=>z("/dashboard"),"onNavigateHome")}),(0,a.jsx)(ow,{taskDetailLayout:!0})]}):null,(0,a.jsx)("main",{id:"main-content",ref:ye,tabIndex:-1,style:f?{"--tc-composer-bottom":"var(--sz-calc-14)"}:void 0,className:Y("flex-1 p-4 outline-none md:p-6",!f&&A&&"pt-0 md:pt-0",f?"overflow-visible pb-(--sz-calc-14)":"overflow-auto [scrollbar-gutter:stable]"),children:ct?(0,a.jsx)(dr,{scope:"invalid_company_prefix",requestedPrefix:_??I?.issuePrefix}):(0,a.jsx)(t8,{children:(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:(0,a.jsx)(xo,{})})})})]}),(0,a.jsx)(Vz,{taskDetailLayout:!f&&A})]})]})]}),f&&(0,a.jsx)(xU,{visible:ve}),(0,a.jsx)(DP,{}),(0,a.jsx)(D$,{}),(0,a.jsx)(L$,{}),(0,a.jsx)(U$,{}),(0,a.jsx)(Y$,{}),(0,a.jsx)(eU,{open:et,onOpenChange:$e}),(0,a.jsx)(sU,{}),(0,a.jsx)(dU,{health:at}),(0,a.jsx)(gU,{localTrusted:at?.deploymentMode==="local_trusted"})]})})}r(o6,"Layout");var Ww=null;function c6(){return Ww??=new _f,Ww}r(c6,"getDetachedClient");function u6(){const e=(0,x.useContext)(k0),{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),enabled:e!=null},e??c6());return e?{enabled:t?.enableConferenceRoomChat===!0,loaded:s}:{enabled:!1,loaded:!0}}r(u6,"useConferenceRoomChatEnabled");function d6(){const{enabled:e,loaded:t}=u6();return t?e?(0,a.jsx)(xo,{}):(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):null}r(d6,"ConferenceRoomChatGate");function ar({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enablePipelines!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(ar,"PipelinesExperimentalGate");function Qw({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enableCases!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(Qw,"CasesExperimentalGate");function Gw({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enableStatusCards!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(Gw,"StatusCardsExperimentalGate");function f6({children:e}){const{data:t,isFetched:s}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return s?t?.enablePixelsOffice!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(a.Fragment,{children:e}):null}r(f6,"PixelsOfficeExperimentalGate");function Es({pageKey:e}){const{hidden:t,loaded:s}=gr();return s?t.has(e)?(0,a.jsx)(Ve,{to:"/company/settings",replace:!0}):(0,a.jsx)(xo,{}):null}r(Es,"HiddenSettingsPageGate");function Th(){const{data:e,isFetched:t}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn")});return t?e?.enableIsolatedWorkspaces!==!0?(0,a.jsx)(Ve,{to:"/dashboard",replace:!0}):(0,a.jsx)(xo,{}):null}r(Th,"IsolatedWorkspacesRouteGate");function Vl(){const e=hn(),{workspaceId:t}=Ps(),{companies:s,loading:l}=bt(),c=me({queryKey:$.executionWorkspaces.detail(t??"__missing__"),queryFn:r(()=>ep.get(t),"queryFn"),enabled:!!t,retry:!1});if(!t)return(0,a.jsx)(dr,{scope:"global"});if(l||c.isPending)return(0,a.jsx)(Ds,{});if(c.isError)return(0,a.jsx)(dr,{scope:"global"});const u=s.find(p=>p.id===c.data.companyId);return u?(0,a.jsx)(Ve,{to:`/${u.issuePrefix}${e.pathname}${e.search}${e.hash}`,replace:!0}):(0,a.jsx)(dr,{scope:"global"})}r(Vl,"UnprefixedExecutionWorkspaceRedirect");function p6(){const{companyPrefix:e,workspaceId:t}=Ps(),{companies:s,loading:l}=bt(),c=me({queryKey:$.executionWorkspaces.detail(t??"__missing__"),queryFn:r(()=>ep.get(t),"queryFn"),enabled:!!t,retry:!1});if(!t||!e)return(0,a.jsx)(dr,{scope:"global"});if(l||c.isPending)return(0,a.jsx)(Ds,{});if(c.isError)return(0,a.jsx)(dr,{scope:"global"});const u=s.find(p=>p.issuePrefix.toUpperCase()===e.toUpperCase());return!u||u.id!==c.data.companyId?(0,a.jsx)(dr,{scope:"global"}):(0,a.jsx)(xo,{})}r(p6,"ExecutionWorkspaceCompanyGate");var ya={status:r((e={})=>{const t=new URLSearchParams;e.command&&t.set("command",e.command),e.network&&t.set("network","1");const s=t.toString();return je.get(`/onboarding/omp${s?`?${s}`:""}`)},"status"),browse:r(e=>je.get(`/onboarding/omp/browse${e?`?path=${encodeURIComponent(e)}`:""}`),"browse"),loginProviders:r((e=!1)=>je.get(`/onboarding/omp/login/providers${e?"?refresh=1":""}`),"loginProviders"),startLogin:r(e=>je.post("/onboarding/omp/login",{provider:e}),"startLogin"),login:r(e=>je.get(`/onboarding/omp/login/${encodeURIComponent(e)}`),"login"),answerLogin:r((e,t)=>je.post(`/onboarding/omp/login/${encodeURIComponent(e)}/input`,{value:t}),"answerLogin"),cancelLogin:r(e=>je.delete(`/onboarding/omp/login/${encodeURIComponent(e)}`),"cancelLogin"),customProviders:r(()=>je.get("/onboarding/omp/custom-providers"),"customProviders"),saveCustomProvider:r((e,t)=>je.put(`/onboarding/omp/custom-providers/${encodeURIComponent(e)}`,t),"saveCustomProvider"),removeCustomProvider:r(e=>je.delete(`/onboarding/omp/custom-providers/${encodeURIComponent(e)}`),"removeCustomProvider"),fetchCustomProviderModels:r(e=>je.post("/onboarding/omp/custom-providers/models",e),"fetchCustomProviderModels"),probeCustomProvider:r(e=>je.post("/onboarding/omp/custom-providers/probe",e),"probeCustomProvider"),remote:r(e=>je.post("/onboarding/omp/remote",{address:e}),"remote")};function m6(e){return{heartbeat:{enabled:e?.heartbeatEnabled??Fy.heartbeatEnabled,intervalSec:e?.intervalSec??Fy.intervalSec,wakeOnDemand:!0,skipTimerWhenNoActionableWork:!0,cooldownSec:10,maxConcurrentRuns:20}}}r(m6,"buildNewAgentRuntimeConfig");function h6({className:e,...t}){return(0,a.jsx)("div",{role:"group","data-slot":"segmented",className:Y("inline-flex items-center gap-0.5 rounded-md border border-line-strong bg-bg-2 p-0.5",e),...t})}r(h6,"Segmented");function g6({selected:e=!1,className:t,type:s="button",...l}){return(0,a.jsx)("button",{type:s,"data-slot":"segmented-item","aria-pressed":e,className:Y("inline-flex h-7 items-center justify-center gap-1.5 whitespace-nowrap rounded-sm px-2.5 text-(length:--t-13) font-medium text-ink-2 transition-(--tp-color-background-color-border-color-box-shadow-opacity) outline-hidden hover:bg-bg-3 hover:text-ink focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-focus disabled:pointer-events-none disabled:text-ink-3 aria-pressed:bg-ink aria-pressed:text-bg-2 aria-pressed:hover:bg-ink aria-pressed:hover:text-bg-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l})}r(g6,"SegmentedItem");var x6="input:not([type=hidden]):not(:disabled), select:not(:disabled), textarea:not(:disabled)",b6="Discard your unsaved changes?",v6=2/3;function y6(e,t){const[s,l]=(0,x.useState)(null),c=(0,x.useRef)(!1),u=(0,x.useRef)(new Map),p=(0,x.useRef)(e);p.current=e;const f=(0,x.useRef)(s);f.current=s;const h=(0,x.useId)(),g=s===null?null:e(s),v=(0,x.useCallback)(M=>`${h}-row-editor-${M.replace(/\s+/g,"_")}`,[h]),y=r(()=>!c.current||window.confirm(b6),"mayDiscard"),j=(0,x.useCallback)((M=!0)=>{const R=f.current;if(c.current=!1,l(null),R===null||!M)return;const _=p.current(R);requestAnimationFrame(()=>{const D=u.current.get(_);(D?.isConnected?D:t?.current)?.focus()})},[t]),k=r(M=>g===e(M)?!0:g!==null&&!y()?!1:(c.current=!1,l(M),!0),"request"),S=r(M=>{if(g!==e(M)){k(M);return}y()&&j()},"toggle"),N=r(()=>{y()&&j()},"dismiss"),I=(0,x.useCallback)(M=>{c.current=M},[]);return{open:s,openKey:g,request:k,toggle:S,close:j,dismiss:N,setDirty:I,triggerProps:r(M=>({ref:r(R=>{R?u.current.set(M,R):u.current.delete(M)},"ref"),"aria-expanded":g===M,"aria-controls":g===M?v(M):void 0}),"triggerProps"),panelId:v}}r(y6,"useInlineRowEditor");function Yw({id:e,onEscape:t,className:s,children:l}){const c=(0,x.useRef)(null);(0,x.useEffect)(()=>{const p=c.current;if(!p)return;p.querySelector(x6)?.focus({preventScroll:!0});const f=p.getBoundingClientRect().top;if(f>=0&&f<=window.innerHeight*v6)return;const h=p.parentElement?.tagName==="LI"?p.previousElementSibling:null;h?h.scrollIntoView?.({block:"center"}):p.scrollIntoView?.({block:"start"})},[]);const u=r(p=>{p.key!=="Escape"||p.defaultPrevented||(p.preventDefault(),p.stopPropagation(),t())},"onKeyDown");return(0,a.jsx)("div",{ref:c,id:e,className:Y("scroll-mt-16",s),onKeyDown:u,children:l})}r(Yw,"InlineRowEditorPanel");var j6=2e3,Xw=["omp","login-providers"];function Rh(e){return e instanceof Error?e.message:"Something went wrong"}r(Rh,"errorText");function Ra({tone:e,children:t}){return(0,a.jsx)("div",{role:e==="bad"?"alert":"status",className:Y("rounded-md border px-3 py-2 text-sm",e==="bad"?"border-bad text-ink":e==="ok"?"border-ok text-ink":"border-line text-ink-2"),children:t})}r(Ra,"OmpNote");function w6({onSignedIn:e,autoFocus:t=!1}){const s=kn(),l=me({queryKey:Xw,queryFn:r(()=>ya.loginProviders(),"queryFn"),staleTime:6e5}),[c,u]=(0,x.useState)(""),[p,f]=(0,x.useState)(null),[h,g]=(0,x.useState)(""),v=c||l.data?.providers[0]||"",y=Bt({mutationFn:r(_=>ya.startLogin(_.name),"mutationFn"),onSuccess:r((_,{popup:D})=>{g(""),f(_),D&&_.url&&_.state==="waiting"?D.location.href=_.url:D?.close()},"onSuccess"),onError:r((_,{popup:D})=>D?.close(),"onError")}),j=Bt({mutationFn:r(_=>ya.answerLogin(p.id,_),"mutationFn"),onSuccess:r(_=>{g(""),f(_)},"onSuccess")}),k=Bt({mutationFn:r(_=>ya.cancelLogin(_),"mutationFn"),onSettled:r(()=>f(null),"onSettled")}),S=p?.state==="waiting",N=me({queryKey:["omp","login",p?.id??""],queryFn:r(()=>ya.login(p.id),"queryFn"),enabled:S,refetchInterval:j6});(0,x.useEffect)(()=>{N.data&&N.data.id===p?.id&&f(N.data)},[N.data,p?.id]);const I=(0,x.useRef)(null),C=(0,x.useRef)(e);C.current=e;const M=p?.state==="succeeded"?p.id:null;(0,x.useEffect)(()=>{!M||I.current===M||(I.current=M,s.invalidateQueries({queryKey:["agents"]}),C.current?.())},[M,s]);function R(_){_.preventDefault(),h.trim()&&j.mutate(h.trim())}return r(R,"submitAnswer"),l.isLoading?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"Asking OMP which providers it can sign in to..."}):l.error?(0,a.jsxs)(Ra,{tone:"bad",children:[Rh(l.error)," ",(0,a.jsx)(oe,{type:"button",variant:"link",size:"xs",onClick:r(()=>{l.refetch()},"onClick"),children:"Try again"})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[!p||!S?(0,a.jsxs)("form",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",onSubmit:r(_=>{_.preventDefault(),v&&y.mutate({name:v,popup:window.open("about:blank","_blank")})},"onSubmit"),children:[(0,a.jsxs)("label",{className:"flex min-w-0 flex-1 flex-col gap-1.5 text-sm font-medium",children:["Provider",(0,a.jsx)(bg,{value:v,onChange:r(_=>u(_.target.value),"onChange"),autoFocus:t,className:"w-full",children:l.data?.providers.map(_=>(0,a.jsx)("option",{value:_,children:_},_))})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(oe,{type:"submit",disabled:!v||y.isPending,className:"flex-1 sm:flex-none",children:y.isPending?"Starting...":"Sign in"}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon","aria-label":"Reload provider list",title:"Reload provider list",onClick:r(()=>{ya.loginProviders(!0).then(_=>s.setQueryData(Xw,_))},"onClick"),children:(0,a.jsx)(nl,{"aria-hidden":"true"})})]})]}):null,y.error?(0,a.jsx)(Ra,{tone:"bad",children:Rh(y.error)}):null,p?(0,a.jsxs)("section",{"aria-label":`Sign-in to ${p.provider}`,className:"flex flex-col gap-3 rounded-lg border border-line bg-bg-2 px-4 py-3",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,a.jsx)("b",{className:"text-sm font-semibold",children:p.provider}),S?(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"xs",disabled:k.isPending,onClick:r(()=>k.mutate(p.id),"onClick"),children:"Cancel"}):null]}),S&&p.url?(0,a.jsxs)("ol",{className:"flex list-decimal flex-col gap-1.5 ps-5 text-sm text-ink-2",children:[(0,a.jsxs)("li",{children:[(0,a.jsxs)("a",{href:p.url,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 font-medium text-accent underline underline-offset-4",children:["Open the sign-in page ",(0,a.jsx)(qS,{"aria-hidden":"true",className:"size-3.5"})]})," ","(already opened in a new tab unless the browser blocked it) and approve access."]}),p.prompt&&!p.prompt.secret?(0,a.jsx)("li",{children:"If the page ends on an address that does not load (it starts with http://localhost), copy that whole address from the browser bar and paste it below. On the machine that runs Wardmote this step finishes by itself."}):(0,a.jsx)("li",{children:"Enter the code OMP shows below if the page asks for one. This panel moves on by itself once you approve."})]}):null,S&&p.prompt?(0,a.jsxs)("form",{onSubmit:R,className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,a.jsxs)("label",{className:"flex min-w-0 flex-1 flex-col gap-1.5 text-sm font-medium",children:[p.prompt.label.replace(/:$/,""),(0,a.jsx)(Wn,{value:h,onChange:r(_=>g(_.target.value),"onChange"),type:p.prompt.secret?"password":"text",autoComplete:"off",spellCheck:!1,autoFocus:!p.url})]}),(0,a.jsx)(oe,{type:"submit",disabled:!h.trim()||j.isPending,children:j.isPending?"Sending...":"Send"})]}):null,S&&!p.prompt&&!p.url?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"Waiting for OMP..."}):null,S&&p.message?(0,a.jsx)(Ra,{tone:"bad",children:p.message}):null,j.error?(0,a.jsx)(Ra,{tone:"bad",children:Rh(j.error)}):null,p.state==="succeeded"?(0,a.jsxs)(Ra,{tone:"ok",children:[p.message??"Signed in",". Models from this provider are ready."]}):null,p.state==="failed"?(0,a.jsxs)(Ra,{tone:"bad",children:[p.message??"Sign-in failed",". Check the account on the provider's page, then press Sign in again."]}):null,S&&!p.prompt&&p.lines.length?(0,a.jsx)("pre",{"aria-label":"OMP output",className:"max-h-48 overflow-auto whitespace-pre-wrap break-all rounded-md bg-bg-3 px-3 py-2 font-mono text-xs text-ink-2",children:p.lines.join(`
|
|
55
55
|
`)}):null,(!S||p.prompt)&&p.lines.length?(0,a.jsxs)("details",{className:"text-xs text-ink-3",children:[(0,a.jsx)("summary",{className:"cursor-pointer select-none",children:"What OMP printed"}),(0,a.jsx)("pre",{className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-all rounded-md bg-bg-3 px-3 py-2 font-mono",children:p.lines.join(`
|
|
56
56
|
`)})]}):null]}):null]})}r(w6,"OmpSignIn");var Mh=500,Dh=10,k6=(0,x.memo)(r(function({result:t,savedIds:s,room:l,onAdd:c}){const[u,p]=(0,x.useState)(""),[f,h]=(0,x.useState)(()=>new Set),g=(0,x.useMemo)(()=>t.models.filter(I=>!s.has(I.id)),[t.models,s]),v=(0,x.useMemo)(()=>{if(t.truncated)return[];const I=new Set(t.models.map(C=>C.id));return[...s].filter(C=>!I.has(C))},[t.models,t.truncated,s]),y=(0,x.useMemo)(()=>{const I=u.trim().toLowerCase();return I?t.models.filter(C=>C.id.toLowerCase().includes(I)||C.name?.toLowerCase().includes(I)):t.models},[u,t.models]),j=g.filter(I=>f.has(I.id));function k(I,C){h(M=>{const R=new Set(M);return C?R.add(I):R.delete(I),R})}r(k,"toggle");function S(I){c(I),h(new Set)}r(S,"add");const N=r(I=>I>l,"overLimit");return(0,a.jsxs)("div",{className:"flex flex-col gap-2 rounded-md border border-line-soft p-3","aria-label":"Upstream models",children:[(0,a.jsxs)("p",{className:"text-sm",children:[t.url," lists ",t.models.length," ",t.models.length===1?"model":"models",t.truncated?" (more exist; only these were read)":"",": ",g.length," new, ",t.models.length-g.length," already added."]}),v.length?(0,a.jsxs)(Ra,{tone:"info",children:[v.length," saved ",v.length===1?"model is":"models are"," not listed upstream and ",v.length===1?"stays":"stay"," until you remove ",v.length===1?"it":"them",": ",v.slice(0,Dh).join(", "),v.length>Dh?`, and ${v.length-Dh} more`:"","."]}):null,(0,a.jsx)(Wn,{value:u,onChange:r(I=>p(I.target.value),"onChange"),placeholder:"Search upstream models","aria-label":"Search upstream models",autoComplete:"off"}),(0,a.jsxs)("ul",{className:"flex max-h-72 flex-col overflow-y-auto rounded-md border border-line-soft",children:[y.slice(0,Mh).map(I=>{const C=s.has(I.id);return(0,a.jsx)("li",{className:"border-b border-line-soft last:border-b-0",children:(0,a.jsxs)("label",{className:"flex items-center gap-2 px-2 py-1.5 text-sm",children:[(0,a.jsx)("input",{type:"checkbox",checked:C||f.has(I.id),disabled:C,onChange:r(M=>k(I.id,M.target.checked),"onChange"),"aria-label":I.id}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:I.id}),I.name?(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:I.name}):null,C?(0,a.jsx)("span",{className:"shrink-0 text-xs text-ink-3",children:"Added"}):null]})},I.id)}),y.length===0?(0,a.jsx)("li",{className:"px-2 py-1.5 text-sm text-ink-3",children:"No upstream model matches."}):null]}),y.length>Mh?(0,a.jsxs)("span",{className:"text-xs text-ink-3",children:["Showing ",Mh," of ",y.length,"; search to narrow the list."]}):null,(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsxs)(oe,{type:"button",size:"sm",disabled:j.length===0||N(j.length),onClick:r(()=>S(j),"onClick"),children:["Add selected",j.length?` (${j.length})`:""]}),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",disabled:g.length===0||N(g.length),onClick:r(()=>S(g),"onClick"),children:["Add all",g.length?` (${g.length})`:""]}),N(Math.max(j.length,g.length))?(0,a.jsxs)("span",{className:"text-xs text-ink-3",children:["Only ",l," more ",l===1?"model fits":"models fit","; a provider holds at most ",500,"."]}):null]})]})},"UpstreamModelPicker")),Oh=["omp","custom-providers"],S6={"openai-responses":"OpenAI Responses (/responses): most OpenAI-compatible gateways","openai-completions":"OpenAI Chat Completions (/chat/completions): vLLM, LiteLLM, Ollama, llama.cpp","anthropic-messages":"Anthropic Messages (/messages)","openai-codex-responses":"ChatGPT Codex backend: only with a ChatGPT sign-in token","google-generative-ai":"Google Gemini API","google-vertex":"Google Vertex AI","google-gemini-cli":"Gemini CLI backend","azure-openai-responses":"Azure OpenAI Responses","bedrock-converse-stream":"AWS Bedrock Converse"},N6={"openai-models-list":"OpenAI /models list",proxy:"Proxy (models from the gateway)",litellm:"LiteLLM",ollama:"Ollama","llama.cpp":"llama.cpp","lm-studio":"LM Studio","apple-foundation-models":"Apple Foundation Models"},Ud={id:"",name:"",api:"",contextWindow:"",maxTokens:"",reasoning:!1,images:!1};function C6(e){return e?{name:e.name,baseUrl:e.baseUrl??"",api:e.api??"",keyMode:e.apiKey.kind==="none"?"none":e.apiKey.kind==="missing"?"literal":"keep",keyValue:"",authHeader:e.authHeader,disableStrictTools:e.disableStrictTools,discovery:e.discovery?.type??"",discoveryTimeout:e.discovery?.timeoutMs?String(e.discovery.timeoutMs):"",injectV1:e.discovery?.injectV1??!1,headers:e.headers.map(t=>({name:t.name,value:"",saved:!0})),models:e.models.map(t=>({id:t.id,name:t.name??"",api:t.api??"",contextWindow:t.contextWindow?String(t.contextWindow):"",maxTokens:t.maxTokens?String(t.maxTokens):"",reasoning:t.reasoning??!1,images:t.images??!1}))}:{name:"",baseUrl:"",api:"openai-responses",keyMode:"literal",keyValue:"",authHeader:!1,disableStrictTools:!1,discovery:"",discoveryTimeout:"",injectV1:!1,headers:[],models:[{...Ud}]}}r(C6,"initialState");function Qg(e){switch(e.keyMode){case"keep":return{kind:"keep"};case"none":return{kind:"none"};case"env":return{kind:"env",name:e.keyValue.trim()};case"command":return{kind:"command",command:e.keyValue.trim()};default:return{kind:"literal",value:e.keyValue.trim()}}}r(Qg,"keyInput");function Wl(e){const t=Number(e.replace(/[_,\s]/g,""));return e.trim()&&Number.isInteger(t)&&t>0?t:void 0}r(Wl,"positive");function Gg(e){return e.headers.filter(t=>t.name.trim()).map(t=>t.saved&&!t.value?{name:t.name.trim()}:{name:t.name.trim(),value:t.value})}r(Gg,"headersInput");function A6(e){return{baseUrl:e.baseUrl.trim(),api:e.api||null,apiKey:Qg(e),authHeader:e.authHeader,disableStrictTools:e.disableStrictTools,headers:Gg(e),discovery:e.discovery?{type:e.discovery,...Wl(e.discoveryTimeout)?{timeoutMs:Wl(e.discoveryTimeout)}:{},...e.discovery==="openai-models-list"&&e.injectV1?{injectV1:!0}:{}}:null,models:e.models.filter(t=>t.id.trim()).map(t=>({id:t.id.trim(),...t.name.trim()?{name:t.name.trim()}:{},...t.api?{api:t.api}:{},...Wl(t.contextWindow)?{contextWindow:Wl(t.contextWindow)}:{},...Wl(t.maxTokens)?{maxTokens:Wl(t.maxTokens)}:{},...t.reasoning?{reasoning:!0}:{},...t.images?{images:!0}:{}}))}}r(A6,"toInput");function wc(e){if(e instanceof Ti){const t=e.body?.details;if(Array.isArray(t)){const s=t.map(l=>typeof l?.message=="string"?`${Array.isArray(l.path)?`${l.path.join(".")}: `:""}${l.message}`:null).filter(l=>!!l);if(s.length)return s}return[e.message]}return[e instanceof Error?e.message:"Something went wrong"]}r(wc,"problemsOf");function dc({label:e,hint:t,children:s}){return(0,a.jsxs)("label",{className:"flex min-w-0 flex-col gap-1.5 text-sm font-medium",children:[e,s,t?(0,a.jsx)("span",{className:"text-xs font-normal text-ink-3",children:t}):null]})}r(dc,"Field");function Lh({label:e,hint:t,checked:s,onChange:l}){return(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("span",{className:"flex flex-col gap-0.5 text-sm",children:[(0,a.jsx)("span",{className:"font-medium",children:e}),(0,a.jsx)("span",{className:"text-xs text-ink-3",children:t})]}),(0,a.jsx)(l1,{checked:s,onCheckedChange:l,"aria-label":e})]})}r(Lh,"Toggle");function Zw({provider:e,takenNames:t,onSaved:s,onCancel:l,onDirtyChange:c}){const[u]=(0,x.useState)(()=>C6(e)),[p,f]=(0,x.useState)(u),h=JSON.stringify(p)!==JSON.stringify(u);(0,x.useEffect)(()=>c?.(h),[h,c]);const[g,v]=(0,x.useState)(null),[y,j]=(0,x.useState)(null),k=r(O=>f(Q=>({...Q,...O})),"set"),S=r((O,Q)=>f(V=>({...V,models:V.models.map((ue,ce)=>ce===O?{...ue,...Q}:ue)})),"setModel"),N=r((O,Q)=>f(V=>({...V,headers:V.headers.map((ue,ce)=>ce===O?{...ue,...Q}:ue)})),"setHeader"),I=e!==null,C=!I&&p.name&&!yE.test(p.name)?"Use letters, digits, dot, dash or underscore":!I&&t.includes(p.name)?"A provider with this name already exists; edit it instead":null,M=Bt({mutationFn:r(()=>ya.saveCustomProvider(p.name.trim(),A6(p)),"mutationFn"),onSuccess:s}),R=Bt({mutationFn:r(()=>ya.probeCustomProvider({...I?{name:e.name}:{},baseUrl:p.baseUrl.trim(),apiKey:Qg(p),authHeader:p.authHeader,headers:Gg(p),...p.models[0]?.id.trim()?{modelId:p.models[0].id.trim()}:{}}),"mutationFn"),onSuccess:r(O=>{v(O),f(Q=>({...Q,api:O.suggestedApi??Q.api,models:Q.models.some(V=>V.id.trim())||!O.usedModel?Q.models:[{...Ud,id:O.usedModel}]}))},"onSuccess"),onError:r(()=>v(null),"onError")}),_=Bt({mutationFn:r(()=>ya.fetchCustomProviderModels({...I?{name:e.name}:{},baseUrl:p.baseUrl.trim(),api:p.api||null,apiKey:Qg(p),authHeader:p.authHeader,headers:Gg(p)}),"mutationFn"),onSuccess:j,onError:r(()=>j(null),"onError")}),D=p.models.map(O=>O.id.trim()).filter(Boolean).join(`
|
|
57
57
|
`),U=(0,x.useMemo)(()=>new Set(D?D.split(`
|
|
58
|
-
`):[]),[D]),K=(0,x.useMemo)(()=>y&&!y.error&&!y.truncated?new Set(y.models.map(O=>O.id)):null,[y]),z=(0,x.useCallback)(O=>{f(Q=>{const V=Q.models.filter(X=>X.id.trim()),ue=new Set(V.map(X=>X.id.trim())),ce=O.filter(X=>!ue.has(X.id)).map(X=>({...Ud,id:X.id,name:X.name??""}));return{...Q,models:[...V,...ce]}})},[]);function E(O){O.preventDefault(),C||M.mutate()}r(E,"submit");const B=[...I&&e.apiKey.kind!=="none"&&e.apiKey.kind!=="missing"?[{mode:"keep",label:"Keep saved"}]:[],{mode:"literal",label:"Key"},{mode:"env",label:"Env variable"},{mode:"command",label:"Command"},{mode:"none",label:"No key"}];return(0,a.jsxs)("form",{onSubmit:E,"aria-label":I?`Edit ${e.name}`:"Add a custom provider",className:"flex flex-col gap-4 rounded-lg border border-line bg-bg-2 px-4 py-4 sm:px-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:I?`Edit ${e.name}`:"Add a custom provider"}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Close",onClick:l,children:(0,a.jsx)(ia,{"aria-hidden":"true"})})]}),I&&e.otherKeys.length?(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Also kept as written in models.yml: ",e.otherKeys.join(", "),"."]}):null,(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsx)(dc,{label:"Name",hint:C??"Used in model ids, e.g. my-gateway/model",children:(0,a.jsx)(Wn,{value:p.name,onChange:r(O=>k({name:O.target.value}),"onChange"),disabled:I,required:!0,"aria-invalid":!!C,placeholder:"my-gateway",autoComplete:"off"})}),(0,a.jsx)(dc,{label:"Base URL",hint:"Usually ends in /v1",children:(0,a.jsx)(Wn,{value:p.baseUrl,onChange:r(O=>k({baseUrl:O.target.value}),"onChange"),required:!0,type:"url",placeholder:"http://localhost:8000/v1",autoComplete:"off"})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"API key"}),(0,a.jsx)(h6,{"aria-label":"Where the key comes from",className:"flex-wrap self-start",children:B.map(({mode:O,label:Q})=>(0,a.jsx)(g6,{selected:p.keyMode===O,onClick:r(()=>k({keyMode:O,keyValue:""}),"onClick"),children:Q},O))}),p.keyMode==="literal"?(0,a.jsx)(Wn,{value:p.keyValue,onChange:r(O=>k({keyValue:O.target.value}),"onChange"),type:"password",autoComplete:"off",required:!0,"aria-label":"API key",placeholder:"sk-..."}):p.keyMode==="env"?(0,a.jsx)(Wn,{value:p.keyValue,onChange:r(O=>k({keyValue:O.target.value.toUpperCase()}),"onChange"),required:!0,"aria-label":"Environment variable name",placeholder:"MY_GATEWAY_KEY",autoComplete:"off"}):p.keyMode==="command"?(0,a.jsx)(Wn,{value:p.keyValue,onChange:r(O=>k({keyValue:O.target.value}),"onChange"),required:!0,"aria-label":"Command that prints the key",placeholder:"op read op://vault/gateway/key",autoComplete:"off",className:"font-mono"}):null,(0,a.jsx)("span",{className:"text-xs text-ink-3",children:p.keyMode==="keep"?`The saved ${e?.apiKey.kind==="env"?`variable ${e.apiKey.name}`:e?.apiKey.kind==="command"?"command":"key"} stays as it is.`:p.keyMode==="env"?"OMP reads the key from this variable on the machine that runs agents.":p.keyMode==="command"?"OMP runs this command and uses what it prints.":p.keyMode==="none"?"For local servers that need no key.":"Saved in OMP's models.yml. Wardmote never shows it again."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(dc,{label:"Wire format (api)",hint:"Picking the wrong one is the most common mistake. Test connection suggests the right one.",children:(0,a.jsxs)(bg,{value:p.api,onChange:r(O=>k({api:O.target.value}),"onChange"),className:"w-full",children:[(0,a.jsx)("option",{value:"",children:"Set per model"}),ME.map(O=>(0,a.jsx)("option",{value:O,children:S6[O]??O},O))]})}),(0,a.jsx)(oe,{type:"button",variant:"secondary",size:"sm",className:"self-start",disabled:!p.baseUrl.trim()||R.isPending,onClick:r(()=>R.mutate(),"onClick"),children:R.isPending?"Testing...":"Test connection"}),R.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(R.error).join(" ")}):null,g?(0,a.jsxs)(Ra,{tone:g.suggestedApi?"ok":"bad",children:[g.suggestedApi?`${g.suggestedApi} answered${g.usedModel?` for ${g.usedModel}`:""}, so the wire format is set to it.`:g.usedModel?`No wire format answered for ${g.usedModel}. Check the base URL, key and model id.`:"The server listed no models. Add a model id below, then test again.",(0,a.jsx)("ul",{className:"mt-1 flex flex-col gap-0.5 text-xs text-ink-3",children:g.attempts.map(O=>(0,a.jsxs)("li",{className:"break-all",children:[O.api,": ",O.status??"no answer",O.detail&&!O.ok?` (${O.detail})`:""]},O.api))})]}):null]}),(0,a.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,a.jsx)("legend",{className:"mb-1.5 text-sm font-medium",children:"Models"}),p.models.map((O,Q)=>(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 rounded-md border border-line-soft p-2 sm:grid-cols-[2fr_2fr_1fr_1fr_auto]",children:[K&&O.id.trim()&&!K.has(O.id.trim())?(0,a.jsx)("span",{className:"col-span-2 text-xs text-ink-3 sm:col-span-5",children:"Not listed upstream any more; kept until you remove it."}):null,(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} id`,value:O.id,onChange:r(V=>S(Q,{id:V.target.value}),"onChange"),placeholder:"model id",className:"col-span-2 sm:col-span-1",autoComplete:"off"}),(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} name`,value:O.name,onChange:r(V=>S(Q,{name:V.target.value}),"onChange"),placeholder:"Display name",className:"col-span-2 sm:col-span-1"}),(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} context window`,value:O.contextWindow,onChange:r(V=>S(Q,{contextWindow:V.target.value}),"onChange"),placeholder:"Context",inputMode:"numeric"}),(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} max output tokens`,value:O.maxTokens,onChange:r(V=>S(Q,{maxTokens:V.target.value}),"onChange"),placeholder:"Max output",inputMode:"numeric"}),(0,a.jsxs)("div",{className:"col-span-2 flex items-center justify-between gap-3 text-xs sm:col-span-1",children:[(0,a.jsxs)("label",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("input",{type:"checkbox",checked:O.reasoning,onChange:r(V=>S(Q,{reasoning:V.target.checked}),"onChange")}),"Thinks"]}),(0,a.jsxs)("label",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("input",{type:"checkbox",checked:O.images,onChange:r(V=>S(Q,{images:V.target.checked}),"onChange")}),"Images"]}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`Remove model ${Q+1}`,onClick:r(()=>k({models:p.models.filter((V,ue)=>ue!==Q)}),"onClick"),children:(0,a.jsx)(cg,{"aria-hidden":"true"})})]})]},Q)),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",onClick:r(()=>k({models:[...p.models,{...Ud}]}),"onClick"),children:[(0,a.jsx)(as,{"aria-hidden":"true"}),"Add model"]}),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",disabled:!p.baseUrl.trim()||_.isPending,onClick:r(()=>_.mutate(),"onClick"),children:[(0,a.jsx)(hR,{"aria-hidden":"true"}),_.isPending?"Fetching...":"Fetch models"]})]}),_.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(_.error).join(" ")}):null,y?.error?(0,a.jsx)(Ra,{tone:"bad",children:y.error}):null,y&&!y.error?(0,a.jsx)(k6,{result:y,savedIds:U,room:500-U.size,onAdd:z}):null,(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Leave context and max output empty when unsure; OMP fills known models in."})]}),(0,a.jsxs)("details",{className:"flex flex-col gap-3",children:[(0,a.jsx)("summary",{className:"cursor-pointer select-none text-sm font-medium",children:"Advanced"}),(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[(0,a.jsx)(Lh,{label:"Send the key as an Authorization header",hint:"OpenAI wire formats already do. Turn on for discovery or proxies that need it.",checked:p.authHeader,onChange:r(O=>k({authHeader:O}),"onChange")}),(0,a.jsx)(Lh,{label:"Disable strict tools",hint:"For Anthropic-style proxies that reject strict tool schemas.",checked:p.disableStrictTools,onChange:r(O=>k({disableStrictTools:O}),"onChange")}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsx)(dc,{label:"Model discovery",hint:"Ask the server for its models instead of listing them",children:(0,a.jsxs)(bg,{value:p.discovery,onChange:r(O=>k({discovery:O.target.value}),"onChange"),className:"w-full",children:[(0,a.jsx)("option",{value:"",children:"Off"}),AE.map(O=>(0,a.jsx)("option",{value:O,children:N6[O]??O},O))]})}),p.discovery?(0,a.jsx)(dc,{label:"Discovery timeout (ms)",children:(0,a.jsx)(Wn,{value:p.discoveryTimeout,onChange:r(O=>k({discoveryTimeout:O.target.value}),"onChange"),inputMode:"numeric",placeholder:"OMP default"})}):null]}),p.discovery==="openai-models-list"?(0,a.jsx)(Lh,{label:"Add /v1 to the discovery URL",hint:"Turn on when the base URL has no /v1 but the model list lives under it.",checked:p.injectV1,onChange:r(O=>k({injectV1:O}),"onChange")}):null,(0,a.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,a.jsx)("legend",{className:"mb-1.5 text-sm font-medium",children:"Extra headers"}),p.headers.map((O,Q)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2",children:[(0,a.jsx)(Wn,{"aria-label":`Header ${Q+1} name`,value:O.name,onChange:r(V=>N(Q,{name:V.target.value}),"onChange"),placeholder:"X-Header",disabled:O.saved}),(0,a.jsx)(Wn,{"aria-label":`Header ${Q+1} value`,value:O.value,onChange:r(V=>N(Q,{value:V.target.value}),"onChange"),placeholder:O.saved?"Saved; type to replace":"value",type:"password",autoComplete:"off"}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Remove header ${Q+1}`,onClick:r(()=>k({headers:p.headers.filter((V,ue)=>ue!==Q)}),"onClick"),children:(0,a.jsx)(cg,{"aria-hidden":"true"})})]},Q)),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",className:"self-start",onClick:r(()=>k({headers:[...p.headers,{name:"",value:"",saved:!1}]}),"onClick"),children:[(0,a.jsx)(as,{"aria-hidden":"true"}),"Add header"]})]})]})]}),M.error?(0,a.jsx)(Ra,{tone:"bad",children:(0,a.jsx)("ul",{className:"flex flex-col gap-0.5",children:wc(M.error).map(O=>(0,a.jsx)("li",{children:O},O))})}):null,(0,a.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",onClick:l,children:"Cancel"}),(0,a.jsx)(oe,{type:"submit",disabled:M.isPending||!!C,children:M.isPending?"Checking with OMP...":"Save provider"})]})]})}r(Zw,"CustomProviderForm");function _6(e){switch(e.apiKey.kind){case"env":return e.apiKey.present?`key from ${e.apiKey.name}`:`${e.apiKey.name} is not set on the server`;case"literal":return"key saved";case"command":return"key from a command";case"none":return"no key";case"oauth":return"OMP sign-in";default:return"no key set"}}r(_6,"keySummary");var to=":new";function E6(e){return e===to?to:e.name}r(E6,"providerKey");function I6({onChanged:e}){const t=kn(),s=me({queryKey:Oh,queryFn:r(()=>ya.customProviders(),"queryFn")}),l=y6(E6),c=Bt({mutationFn:r(h=>ya.removeCustomProvider(h),"mutationFn"),onSuccess:r((h,g)=>{t.setQueryData(Oh,h),l.openKey===g&&l.close(!1),e?.()},"onSuccess")}),u=s.data?.providers??[],p=u.map(h=>h.name),f=r(h=>{t.setQueryData(Oh,h),l.close(),e?.()},"onSaved");return(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[s.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(s.error).join(" ")}):null,s.data?.parseError?(0,a.jsxs)(Ra,{tone:"bad",children:[s.data.parseError,". Fix ",s.data.modelsPath," by hand; Wardmote will not overwrite it."]}):null,u.length?(0,a.jsx)("ul",{"aria-label":"Custom providers",className:"flex flex-col divide-y divide-line rounded-lg border border-line",children:u.map(h=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",children:[(0,a.jsx)("b",{className:"font-medium",children:h.name}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs text-ink-3",children:[h.baseUrl,h.api,_6(h),h.discovery?`discovery: ${h.discovery.type}`:`${h.models.length} ${h.models.length===1?"model":"models"}`].filter(Boolean).join(" · ")}),(0,a.jsxs)("span",{className:"flex gap-1",children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Edit ${h.name}`,...l.triggerProps(h.name),onClick:r(()=>l.toggle(h),"onClick"),children:(0,a.jsx)(V0,{"aria-hidden":"true"})}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Remove ${h.name}`,disabled:c.isPending,onClick:r(()=>{window.confirm(`Remove ${h.name} from OMP's models.yml? A backup stays in models.yml.bak.`)&&c.mutate(h.name)},"onClick"),children:(0,a.jsx)(cg,{"aria-hidden":"true"})})]})]}),l.openKey===h.name?(0,a.jsx)(Yw,{id:l.panelId(h.name),onEscape:l.dismiss,className:"px-2 pb-2 sm:px-3 sm:pb-3",children:(0,a.jsx)(Zw,{provider:h,takenNames:p,onCancel:r(()=>l.close(),"onCancel"),onSaved:f,onDirtyChange:l.setDirty})}):null]},h.name))}):s.isLoading?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"Reading models.yml..."}):null,c.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(c.error).join(" ")}):null,l.openKey===to?(0,a.jsx)(Yw,{id:l.panelId(to),onEscape:l.dismiss,children:(0,a.jsx)(Zw,{provider:null,takenNames:p,onCancel:r(()=>l.close(),"onCancel"),onSaved:f,onDirtyChange:l.setDirty})}):(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",className:"self-start",disabled:!!s.data?.parseError,...l.triggerProps(to),onClick:r(()=>l.request(to),"onClick"),children:[(0,a.jsx)(as,{"aria-hidden":"true"}),"Add custom provider"]}),s.data?(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Saved to ",s.data.modelsPath,", with the previous copy in models.yml.bak."]}):null]})}r(I6,"CustomProviders");var T6=["Check OMP","Connect a model","First task"],Yg="Atlas",R6="general";var M6="Only an instance admin can set up OMP on this server.";function zh(e){return e?e.status===403?{message:M6,retry:!1}:{message:e.message||"Could not check OMP on this server.",retry:!0}:null}r(zh,"statusFailure");var D6={anthropic:"Anthropic",openai:"OpenAI","openai-codex":"OpenAI",openrouter:"OpenRouter",google:"Google",deepseek:"DeepSeek"};function O6(e){return e?D6[e]??e:null}r(O6,"providerLabel");function L6(e){return e.state==="ready"?"ready":e.state==="missing"?e.network==="offline"?"offline":"install":"old"}r(L6,"checkView");function z6(e){return(e?.models.length??0)>0}r(z6,"hasModel");function P6(e){return e.state!=="ready"?null:z6(e)?2:1}r(P6,"nextStepAfterCheck");function $6(e){return!e.connected||e.state!=="ready"?null:e.modelCount>0?2:1}r($6,"nextStepAfterRemote");function U6(e){return e.copies.slice(1).filter(t=>t.version!==e.version)}r(U6,"olderCopies");function B6(e){const t=e.trim().split(/\r?\n/,1)[0]?.trim()??"";return t.length<=120?t:`${t.slice(0,119).trimEnd()}…`}r(B6,"taskTitle");function Jw(e){const t=e?.replace(/[\\/]+$/,"").split(/[\\/]/).pop()?.trim();return t||"My company"}r(Jw,"companyNameForFolder");function K6(e){return e?.recommendedModel?e.models.find(t=>t.id===e.recommendedModel)?.label??e.recommendedModel:null}r(K6,"recommendedModelLabel");function q6(e){return e?.recommendedModel?O6(e.models.find(t=>t.id===e.recommendedModel)?.provider??e.recommendedModel.split("/",1)[0]):null}r(q6,"signedInProvider");var xf="Wardmote",DA=2e3,kd=["onboarding","omp-status"],F6={ok:(0,a.jsx)(Ms,{className:"size-3.5","aria-hidden":!0}),bad:(0,a.jsx)(ia,{className:"size-3.5","aria-hidden":!0}),warn:(0,a.jsx)(ai,{className:"size-3.5","aria-hidden":!0}),wait:(0,a.jsx)(e3,{className:"size-3.5","aria-hidden":!0}),run:(0,a.jsx)(nl,{className:"size-3.5 motion-safe:animate-spin","aria-hidden":!0})},H6={ok:"bg-ok-soft text-ok",bad:"bg-bad-soft text-bad",warn:"bg-warn-soft text-warn",wait:"bg-bg-3 text-ink-3",run:"bg-run-soft text-run"};function no({rows:e,label:t}){return(0,a.jsx)("section",{"aria-label":t,className:"rounded-lg border border-line-soft bg-bg-2 px-4 py-1",children:(0,a.jsx)("ul",{children:e.map(s=>(0,a.jsxs)("li",{"data-check":s.state,className:"flex items-center gap-2.5 border-b border-line-soft py-2 text-(length:--t-13) last:border-b-0",children:[(0,a.jsx)("span",{className:Y("grid size-5.5 shrink-0 place-items-center rounded-full",H6[s.state]),children:F6[s.state]}),(0,a.jsx)("span",{className:"min-w-0",children:s.label}),s.value?(0,a.jsx)("span",{className:"ms-auto min-w-0 truncate font-mono text-xs text-ink-3",children:s.value}):null]},s.label))})})}r(no,"Checks");function Xg({command:e}){const[t,s]=(0,x.useState)(!1);return(0,a.jsxs)("div",{className:"flex flex-col items-start gap-2",children:[(0,a.jsx)("code",{className:"block w-full whitespace-pre-wrap break-all rounded-md border border-line-soft bg-bg-3 px-3 py-2.5 font-mono text-(length:--t-13)",children:e}),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",onClick:r(()=>{q0(e).then(()=>s(!0))},"onClick"),children:[t?(0,a.jsx)(Ms,{className:"size-3.5","aria-hidden":!0}):(0,a.jsx)(o3,{className:"size-3.5","aria-hidden":!0}),t?"Copied":"Copy command"]})]})}r(Xg,"CommandBlock");function bf({tone:e,children:t}){return(0,a.jsxs)("div",{role:e==="bad"?"alert":"note",className:Y("flex gap-2.5 rounded-md px-3 py-2.5 text-(length:--t-13)",{warn:"bg-warn-soft",info:"bg-run-soft",bad:"bg-bad-soft"}[e]),children:[(0,a.jsx)(ai,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":!0}),(0,a.jsx)("span",{children:t})]})}r(bf,"Note");function V6({step:e}){return(0,a.jsx)("ol",{"aria-label":"Setup steps",className:"flex flex-wrap items-center gap-1.5 text-xs text-ink-2",children:T6.map((t,s)=>(0,a.jsxs)("li",{className:"flex items-center gap-1.5","aria-current":s===e?"step":void 0,children:[s>0?(0,a.jsx)("span",{"aria-hidden":!0,className:"h-px w-5.5 bg-line"}):null,(0,a.jsx)("span",{className:Y("grid size-5 place-items-center rounded-full border border-line-strong text-(length:--text-micro) font-semibold",s<e&&"border-ok bg-ok text-bg",s===e&&"border-accent text-accent"),children:s<e?(0,a.jsx)(Ms,{className:"size-3","aria-hidden":!0}):s+1}),(0,a.jsx)("span",{className:Y(s===e?"font-semibold text-ink":"max-sm:sr-only"),children:t})]},t))})}r(V6,"Steps");function cr({title:e,lede:t}){return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("h1",{id:"onboarding-title",className:"text-(length:--t-24) font-semibold tracking-tight sm:text-(length:--t-32) sm:leading-tight",children:e}),(0,a.jsx)("p",{className:"max-w-130 text-base text-ink-2",children:t})]})}r(cr,"Heading");function OA({title:e,paragraphs:t}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:e}),t.map(s=>(0,a.jsx)("p",{className:"text-sm text-ink-2",children:s},s))]})}r(OA,"SideText");var W6=(0,a.jsx)(OA,{title:"Why OMP",paragraphs:[`${xf} runs every agent on OMP. OMP talks to the model and uses the tools; ${xf} assigns work, keeps the record and holds the settings.`,"You will not need to open OMP's own settings: models, thinking and tools are set here."]});function Uc({children:e}){return(0,a.jsx)("div",{className:"mt-auto flex flex-wrap items-center gap-2 pt-2",children:e})}r(Uc,"Actions");function Zg(e){if(e instanceof Ti){const t=e.body;if(t&&typeof t.error=="string")return t.error}return e instanceof Error?e.message:String(e)}r(Zg,"errorMessage$1");function Q6({open:e,onOpenChange:t,onPick:s}){const[l,c]=(0,x.useState)(null),u=me({queryKey:["onboarding","omp-browse",l],queryFn:r(()=>ya.browse(l),"queryFn"),enabled:e});return(0,a.jsx)(ks,{open:e,onOpenChange:t,children:(0,a.jsxs)($s,{className:"sm:max-w-lg",children:[(0,a.jsxs)(bo,{children:[(0,a.jsx)(Os,{children:"Choose omp"}),(0,a.jsx)(vo,{className:"truncate font-mono text-xs",children:u.data?.path??"…"})]}),(0,a.jsxs)("ul",{className:"-mx-2 max-h-80 overflow-y-auto",children:[u.data?.parent?(0,a.jsx)("li",{children:(0,a.jsxs)("button",{type:"button",className:"flex min-h-10 w-full items-center gap-2 rounded-md px-2 text-start text-sm hover:bg-bg-3",onClick:r(()=>c(u.data?.parent??null),"onClick"),children:[(0,a.jsx)(Ei,{className:"size-4 text-ink-3","aria-hidden":!0}),".."]})}):null,u.data?.entries.map(p=>(0,a.jsx)("li",{children:(0,a.jsxs)("button",{type:"button",className:"flex min-h-10 w-full items-center gap-2 rounded-md px-2 text-start text-sm hover:bg-bg-3",onClick:r(()=>{p.kind==="directory"?c(p.path):(s(p.path),t(!1))},"onClick"),children:[p.kind==="directory"?(0,a.jsx)(Ei,{className:"size-4 text-ink-3","aria-hidden":!0}):(0,a.jsx)(bR,{className:"size-4 text-accent","aria-hidden":!0}),(0,a.jsx)("span",{className:"truncate",children:p.name})]})},p.path)),u.isError?(0,a.jsx)("li",{className:"px-2 py-2 text-sm text-bad",children:Zg(u.error)}):null]})]})})}r(Q6,"OmpFilePicker");function G6({status:e,failure:t,command:s,onChooseCommand:l,onRemote:c,onRetry:u}){const[p,f]=(0,x.useState)(!1),h=r(v=>v.state==="ready"?{state:"ok",label:`Version ${v.version}`,value:`needs ${v.minVersion} or newer`}:{state:"bad",label:v.version?`Version ${v.version}`:"Version unknown",value:`needs ${v.minVersion}`},"versionRow");if(!e)return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Install OMP",lede:"Looking for OMP on this computer."}),(0,a.jsx)(no,{label:"OMP checks",rows:[t&&!t.retry?{state:"bad",label:"Looking for omp",value:"stopped"}:{state:"run",label:"Looking for omp",value:"every 2 s"}]}),t?(0,a.jsx)(bf,{tone:"bad",children:t.message}):null]});const g=L6(e);if(g==="old"){const v=U6(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Update OMP",lede:e.version?`OMP ${e.version} is older than ${e.minVersion}, so some settings set here would be ignored.`:`The version of OMP could not be read. ${xf} needs OMP ${e.minVersion} or newer.`}),(0,a.jsx)(Xg,{command:e.updateCommand}),(0,a.jsx)(no,{label:"OMP checks",rows:[{state:"ok",label:"omp found",value:e.path},h(e)]}),v.length>0?(0,a.jsxs)(bf,{tone:"warn",children:["Two copies of omp are installed. The older one in ",e.path," runs first. Remove it, or update it with the command above."]}):null]})}return g==="offline"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"You are offline",lede:"Installing needs the internet once. Connect, or point to an omp you already copied here."}),(0,a.jsx)(no,{label:"OMP checks",rows:[{state:"bad",label:"omp.sh not reachable",value:"3 tries"},s?h(e):{state:"wait",label:"Version check"}]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("span",{id:"omp-path-label",className:"text-sm font-medium",children:"Path to omp"}),(0,a.jsxs)(oe,{type:"button",variant:"secondary","aria-labelledby":"omp-path-label",className:"justify-between font-normal",onClick:r(()=>f(!0),"onClick"),children:[(0,a.jsx)("span",{className:Y("truncate",s?"font-mono text-xs":"text-ink-3"),children:s??"Choose file"}),(0,a.jsx)(Ei,{className:"size-4","aria-hidden":!0})]})]}),(0,a.jsx)(Q6,{open:p,onOpenChange:f,onPick:l}),(0,a.jsx)(Uc,{children:(0,a.jsxs)(oe,{type:"button",variant:"secondary",onClick:u,children:[(0,a.jsx)(nl,{className:"size-3.5","aria-hidden":!0}),"Try again"]})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Install OMP",lede:"Run this in a terminal on this computer. This page moves on by itself."}),(0,a.jsx)(Xg,{command:e.installCommand}),(0,a.jsxs)("p",{className:"text-sm text-ink-2",children:[e.os.label," detected ·"," ",(0,a.jsx)("a",{className:"inline-flex min-h-6 items-center text-accent underline-offset-2 hover:underline",href:"https://omp.sh",target:"_blank",rel:"noreferrer",children:"Other ways"})]}),(0,a.jsx)(no,{label:"OMP checks",rows:[e.state==="ready"?{state:"ok",label:"omp found",value:e.path}:{state:"run",label:"Looking for omp",value:"every 2 s"},e.state==="ready"?h(e):{state:"wait",label:`Version ${e.minVersion} or newer`},e.models.length>0?{state:"ok",label:`${e.models.length} models`}:{state:"wait",label:"At least one model"}]}),e.runtime==="local"?(0,a.jsx)(Uc,{children:(0,a.jsx)(oe,{type:"button",variant:"ghost",onClick:c,children:"Run agents on another machine"})}):null]})}r(G6,"CheckOmpScreen");function Y6({remote:e,pending:t,error:s,onCheck:l,onLocal:c}){const[u,p]=(0,x.useState)(e?.address??""),f=e?[e.connected?{state:"ok",label:"Connected",value:e.latencyMs!==null?`${e.latencyMs} ms`:null}:{state:"bad",label:"Not connected",value:e.error},...e.connected?[e.state==="missing"?{state:"bad",label:"omp not found there"}:e.state==="ready"?{state:"ok",label:`omp ${e.version} found`}:{state:"bad",label:`omp ${e.version??""} is too old`.replace(" "," "),value:"needs 18.1.16"},e.modelCount>0?{state:"ok",label:`${e.modelCount} models signed in there`}:{state:"bad",label:"No model signed in there",value:"next step"}]:[]]:[];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Run agents on another machine",lede:"OMP must be installed where agents run. We check it over SSH."}),(0,a.jsxs)("form",{className:"flex flex-col gap-1.5",onSubmit:r(h=>{h.preventDefault(),l(u.trim())},"onSubmit"),id:"onboarding-remote-form",children:[(0,a.jsx)("label",{htmlFor:"onboarding-ssh-address",className:"text-sm font-medium",children:"SSH address"}),(0,a.jsx)(Wn,{id:"onboarding-ssh-address",value:u,onChange:r(h=>p(h.target.value),"onChange"),placeholder:"user@host",autoComplete:"off",spellCheck:!1,"aria-describedby":"onboarding-ssh-help"}),(0,a.jsx)("span",{id:"onboarding-ssh-help",className:"text-xs text-ink-3",children:"Uses your SSH keys. The working folder is your home folder unless you change it later."})]}),f.length>0?(0,a.jsx)(no,{label:"Remote checks",rows:f}):null,s?(0,a.jsx)(bf,{tone:"bad",children:s}):null,(0,a.jsxs)(Uc,{children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",onClick:c,children:"Use this computer"}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsx)(oe,{type:"submit",form:"onboarding-remote-form",disabled:t||u.trim().length===0,children:t?"Checking…":"Continue"})]})]})}r(Y6,"RemoteScreen");function X6({remote:e,onSignedIn:t}){const[s,l]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{if(!e)return;const c=window.setInterval(t,DA);return()=>window.clearInterval(c)},[e,t]),e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Connect a model",lede:`OMP on ${e.host} has no model signed in yet.`}),(0,a.jsxs)("p",{className:"text-sm text-ink-2",children:["Sign in on ",e.host,". This page moves on by itself."]}),(0,a.jsx)(Xg,{command:`ssh -t ${e.username}@${e.host}${e.port!==22?` -p ${e.port}`:""} omp login`})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Connect a model",lede:s?"Add your own gateway or local server to OMP.":"OMP has no model signed in yet. Sign in to a provider; OMP keeps the sign-in."}),s?(0,a.jsx)(I6,{onChanged:t}):(0,a.jsx)(w6,{autoFocus:!0,onSignedIn:t}),(0,a.jsxs)(Uc,{children:[(0,a.jsx)(oe,{type:"button",variant:"link",size:"sm",onClick:r(()=>l(c=>!c),"onClick"),children:s?"Sign in to a provider instead":"Use my own server instead"}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Moves on by itself once OMP has a model."})]})]})}r(X6,"ConnectScreen");function Z6({status:e,remote:t,pending:s,error:l,onStart:c}){const[u,p]=(0,x.useState)(""),f=t?t.homeFolder:e?.projectFolder,h=t?null:K6(e);return(0,a.jsxs)("form",{className:"contents",onSubmit:r(g=>{g.preventDefault(),u.trim()&&c(u.trim())},"onSubmit"),children:[(0,a.jsx)(cr,{title:"What should your first agent do?",lede:`${Yg} starts as soon as you press Start. You can rename it and change its setup later.`}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("label",{htmlFor:"onboarding-first-task",className:"text-sm font-medium",children:"First task"}),(0,a.jsx)(s1,{id:"onboarding-first-task",value:u,onChange:r(g=>p(g.target.value),"onChange"),rows:4,placeholder:f?`Read the README in ${f} and list the three riskiest modules.`:void 0,autoFocus:!0})]}),(0,a.jsxs)("section",{"aria-label":"First agent",className:"flex flex-col gap-1.5 rounded-lg border border-line-soft bg-bg-2 px-4 py-3 text-sm",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Agent"}),Yg,", general assistant"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Model"}),h?`${h} (recommended)`:"OMP default"]}),(0,a.jsxs)("div",{className:"flex min-w-0 gap-2",children:[(0,a.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Folder"}),(0,a.jsx)("span",{className:"min-w-0 truncate font-mono text-xs leading-5",children:f??"~"})]})]}),l?(0,a.jsx)(bf,{tone:"bad",children:l}):null,(0,a.jsxs)(Uc,{children:[(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsxs)(oe,{type:"submit",disabled:s||u.trim().length===0,children:[(0,a.jsx)(D0,{className:"size-3.5","aria-hidden":!0}),s?"Starting…":"Start"]})]})]})}r(Z6,"TaskScreen");function J6(){const{onboardingOpen:e,onboardingOptions:t,closeOnboarding:s,onboardingRouteDismissed:l,setOnboardingRouteDismissed:c}=Vc(),{companies:u,loading:p}=bt(),f=hn(),h=fU(f.pathname),g=h&&p?null:pU({pathname:f.pathname,companyPrefix:h,companies:u});if(!(e||g!==null&&!l))return null;const v=(e?t.companyId:g?.companyId)??null;return(0,a.jsx)(eB,{companyId:v,onClose:r(()=>{s(),c(!0)},"onClose")})}r(J6,"OnboardingFlow");function eB({companyId:e,onClose:t}){const s=kn(),l=ja(),{setSelectedCompanyId:c}=bt(),[u,p]=(0,x.useState)(0),[f,h]=(0,x.useState)("local"),[g,v]=(0,x.useState)(null),[y,j]=(0,x.useState)(null),[k,S]=(0,x.useState)(null),N=me({queryKey:[...kd,g],queryFn:r(()=>ya.status({command:g}),"queryFn"),retry:r((z,E)=>(zh(E)?.retry??!0)&&z<2,"retry"),refetchInterval:r(z=>zh(z.state.error)?.retry===!1||u===2&&z.state.data?!1:DA,"refetchInterval")}),I=N.data,C=zh(N.error),M=me({queryKey:[...kd,"network",g],queryFn:r(()=>ya.status({command:g,network:!0}),"queryFn"),enabled:I?.state==="missing"&&f==="local",refetchInterval:3e4}),R=(0,x.useMemo)(()=>{if(I)return I.state!=="missing"?I:{...I,network:M.data?.network??null}},[I,M.data]);(0,x.useEffect)(()=>{if(f!=="local"||!I||u===2)return;const z=P6(I);z!==null&&z>u&&p(z)},[f,I,u]);const _=Bt({mutationFn:r(z=>ya.remote(z),"mutationFn"),onSuccess:r(z=>{j(z);const E=$6(z);E!==null&&p(E)},"onSuccess")}),D=(0,x.useCallback)(()=>{if(!y){s.invalidateQueries({queryKey:kd});return}ya.remote(y.address).then(z=>{j(z),z.modelCount>0&&p(2)}).catch(()=>{})},[y,s]),U=Bt({mutationFn:r(async z=>{const E=f==="remote"?y?.homeFolder??null:I?.projectFolder??null;let B=e;B||(B=(await qy.create({name:Jw(f==="remote"?y?.host:E)})).id,await s.invalidateQueries({queryKey:$.companies.all}));let O=null;f==="remote"&&y?.homeFolder&&(O=(await KT.create(B,{name:y.host,driver:"ssh",config:{host:y.host,port:y.port,username:y.username,remoteWorkspacePath:y.homeFolder}})).id);const Q={};f==="local"&&I?.recommendedModel&&(Q.model=I.recommendedModel),E&&(Q.cwd=E),g&&(Q.command=g);const V=await Ha.hire(B,{name:Yg,role:R6,appearance:RE(),adapterType:"omp_local",adapterConfig:Q,onboardingFirstAgent:!0,runtimeConfig:m6(),...O?{defaultEnvironmentId:O}:{}});V.approval&&await YN.approve(V.approval.id,"Approved during onboarding first-agent setup.");const ue=await hr.create(B,{name:Jw(E),status:"in_progress",...f==="local"&&E?{workspace:{sourceType:"local_path",cwd:E,isPrimary:!0}}:{}}),ce=await cn.create(B,{title:B6(z),description:z,status:"todo",assigneeAgentId:V.agent.id,projectId:ue.id});return{companyId:B,issue:ce}},"mutationFn"),onMutate:r(()=>S(null),"onMutate"),onError:r(z=>S(Zg(z)),"onError"),onSuccess:r(async({companyId:z,issue:E})=>{await Promise.all([s.invalidateQueries({queryKey:$.companies.all}),s.invalidateQueries({queryKey:$.agents.list(z)}),s.invalidateQueries({queryKey:$.projects.list(z)}),s.invalidateQueries({queryKey:$.issues.list(z)})]);const B=(await qy.list()).find(Q=>Q.id===z)?.issuePrefix??null;c(z,{source:"route_sync"}),t();const O=E.identifier??E.id;l(B?`/${B}/issues/${O}`:`/issues/${O}`)},"onSuccess")}),K=u===1?(0,a.jsx)(OA,{title:"Skipped when OMP is ready",paragraphs:["If OMP already has a signed-in model on this machine, this step is skipped and the best model is picked for you."]}):u===2?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:f==="remote"?`Found on ${y?.host??"that machine"}`:"Found on this computer"}),(0,a.jsx)(no,{label:"Found",rows:f==="remote"?[{state:"ok",label:`OMP ${y?.version??""}`.trim()},{state:"ok",label:`${y?.modelCount??0} models signed in`},{state:"ok",label:"Working folder",value:y?.homeFolder}]:[{state:"ok",label:`OMP ${I?.version??""}`.trim()},{state:"ok",label:`${q6(I)??"Model"} signed in`,value:"imported"},{state:"ok",label:"Project folder",value:I?.projectFolder}]})]}):W6;return(0,a.jsx)(ks,{open:!0,onOpenChange:r(z=>{z||t()},"onOpenChange"),children:(0,a.jsxs)(aT,{children:[(0,a.jsx)("div",{className:"fixed inset-0 z-50 bg-bg"}),(0,a.jsxs)("div",{"data-testid":"onboarding-flow","data-step":u,role:"dialog","aria-modal":"true","aria-labelledby":"onboarding-title",className:"fixed inset-0 z-50 grid overflow-y-auto lg:grid-cols-2",onKeyDown:r(z=>{z.key==="Escape"&&t()},"onKeyDown"),children:[(0,a.jsxs)("main",{className:"flex min-h-dvh min-w-0 flex-col gap-4.5 px-4 py-5 sm:px-8 sm:py-8 lg:px-14 lg:py-10",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(O0,{className:"size-6.5 shrink-0 text-ink","aria-hidden":"true"}),(0,a.jsx)("b",{className:"text-base font-semibold",children:xf})]}),(0,a.jsx)(V6,{step:u}),u===0&&f==="local"?(0,a.jsx)(G6,{status:R,failure:C,command:g,onChooseCommand:v,onRemote:r(()=>h("remote"),"onRemote"),onRetry:r(()=>{s.invalidateQueries({queryKey:kd})},"onRetry")}):null,u===0&&f==="remote"?(0,a.jsx)(Y6,{remote:y,pending:_.isPending,error:_.isError?Zg(_.error):null,onCheck:r(z=>_.mutate(z),"onCheck"),onLocal:r(()=>{h("local"),j(null)},"onLocal")}):null,u===1?(0,a.jsx)(X6,{remote:f==="remote"?y:null,onSignedIn:D}):null,u===2?(0,a.jsx)(Z6,{status:I,remote:f==="remote"?y:null,pending:U.isPending,error:k,onStart:r(z=>U.mutate(z),"onStart")}):null]}),(0,a.jsx)("aside",{className:"hidden min-w-0 flex-col gap-4 border-s border-line-soft bg-bg-3 px-12 py-10 lg:flex",children:K})]})]})})}r(eB,"OnboardingFlowDialog");function tB(){const{openNewIssue:e}=Us();return(0,x.useEffect)(()=>{e()},[e]),(0,a.jsx)(Ve,{to:"/issues",replace:!0})}r(tB,"NewTaskShortcut");var nB="npx @tickernelz/wardmote auth bootstrap-ceo";function Ph({hasActiveInvite:e=!1}){return(0,a.jsxs)("div",{className:"mt-6 border-t border-line pt-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,a.jsx)(XS,{className:"size-4 text-ink-3","aria-hidden":!0}),(0,a.jsx)("span",{children:"Prefer to finish setup from the host?"})]}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:e?"A bootstrap invite is already active. Check your Wardmote startup logs for the first-admin URL, or run this command on the host to rotate it:":"Run this command on the host that runs Wardmote to print a one-time first-admin invite URL:"}),(0,a.jsx)("pre",{className:"mt-3 overflow-x-auto rounded-md border border-line bg-bg-3/30 p-3 font-mono text-xs",children:nB})]})}r(Ph,"CliFallback");function Sd({children:e}){return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsx)(Hc,{className:"block p-6",children:e})})}r(Sd,"StateChrome");function aB(e){return e.user.email||e.user.name||e.user.id}r(aB,"displayIdentity");function sB(e){return e?.status===409?{title:"Someone else has already claimed this instance.",body:"Refresh to sign in, or ask the existing admin to invite you from Settings -> Access."}:e?.status===401?{title:"Your session expired. Sign in again to claim this instance.",body:""}:{title:"We couldn't reach the server. Try again in a moment.",body:""}}r(sB,"claimErrorCopy");function iB({claimAvailable:e,hasActiveInvite:t=!1,session:s,claimState:l,claimError:c,onClaim:u}){if(!e)return(0,a.jsxs)(Sd,{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"This Wardmote is waiting on its first admin"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This instance runs in invite-only mode. The operator must generate a one-time first-admin invite URL from the host. Once you have the link, open it from this browser to finish setup."}),(0,a.jsx)(Ph,{hasActiveInvite:t}),(0,a.jsx)("p",{className:"mt-4 text-xs text-ink-3",children:"Browser-based claim is intentionally disabled in public mode so anyone on the network can't promote themselves."})]});if(l==="success")return(0,a.jsxs)(Sd,{children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"mt-0.5 flex size-9 flex-shrink-0 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",children:(0,a.jsx)(Ac,{className:"size-5","aria-hidden":!0})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"You're the instance admin"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Setup is complete. Taking you to onboarding to create your first organization..."})]})]}),(0,a.jsxs)("div",{className:"mt-5 flex items-center gap-3",children:[(0,a.jsx)(Ma,{className:"size-4 animate-spin text-ink-3","aria-hidden":!0}),(0,a.jsx)("span",{className:"text-sm text-ink-3",children:"Redirecting..."})]}),(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(oe,{asChild:!0,variant:"secondary",children:(0,a.jsx)("a",{href:"/",children:"Continue to dashboard"})})})]});if(!s)return(0,a.jsxs)(Sd,{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Sign in or create your Wardmote account to become the first admin from this browser."}),(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(oe,{asChild:!0,children:(0,a.jsx)(mn,{to:"/auth?next=/",children:"Sign in / Create account"})})}),(0,a.jsx)(Ph,{hasActiveInvite:t})]});const p=sB(c),f=l==="claiming";return(0,a.jsxs)(Sd,{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Claim it now to become the first admin and start onboarding."}),(0,a.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,a.jsxs)(oe,{onClick:u,disabled:f,children:[f&&(0,a.jsx)(Ma,{className:"mr-2 size-4 animate-spin","aria-hidden":!0}),f?"Claiming...":"Claim this instance"]}),(0,a.jsxs)("span",{className:"text-sm text-ink-3",children:["Signed in as ",(0,a.jsx)("span",{className:"font-medium text-ink",children:aB(s)})]})]}),(0,a.jsxs)("p",{className:"mt-3 text-xs text-ink-3",children:["Wrong account?"," ",(0,a.jsx)(mn,{to:"/auth?next=/",className:"underline underline-offset-2",children:"Switch account"}),"."]}),c&&(0,a.jsxs)("div",{role:"alert",className:"mt-4 flex items-start gap-2 rounded-md border border-bad/40 bg-bad/10 p-3 text-sm text-bad",children:[(0,a.jsx)(ai,{className:"mt-0.5 size-4 flex-shrink-0","aria-hidden":!0}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:p.title}),p.body&&(0,a.jsx)("p",{className:"mt-1 text-bad/90",children:p.body})]})]}),(0,a.jsx)(Ph,{hasActiveInvite:t})]})}r(iB,"BootstrapPendingPage");var Nd=5e3;function rB({temporary:e,retrying:t,onRetry:s}){return(0,a.jsxs)("div",{className:"mx-auto flex max-w-xl flex-col gap-4 px-4 py-16",children:[(0,a.jsx)(nl,{className:"size-6 text-ink-3","aria-hidden":"true"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",role:"status",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:e?"Reconnecting to Wardmote":"Unable to load Wardmote"}),(0,a.jsx)("p",{className:"text-sm text-ink-3",children:e?"The server may be restarting or your connection was interrupted. We’ll try again every few seconds and reconnect automatically.":"We couldn’t check your access to this instance. Try again, or contact your instance administrator if this continues."})]}),(0,a.jsx)("div",{children:(0,a.jsx)(oe,{variant:"secondary",onClick:s,disabled:t,children:t?"Connecting…":"Try again"})})]})}r(rB,"CloudAccessError");function lB(){return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsxs)(Hc,{className:"block p-6",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"No organization access"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This account is signed in, but it does not have an active organization membership or instance-admin access on this Wardmote instance."}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Use an organization invite or sign in with an account that already belongs to this org."})]})})}r(lB,"NoBoardAccessPage");function ek({allowMembershipRequest:e=!1}={}){const t=hn(),s=kn(),[l,c]=(0,x.useState)(!1),u=me({queryKey:$.health,queryFn:r(()=>Fc.get(),"queryFn"),retry:!1,refetchInterval:r(R=>{if(R.state.error)return Pr(R.state.error)?Nd:!1;const _=R.state.data;return _?.status==="starting"?Nd:_?.deploymentMode==="authenticated"&&_.bootstrapStatus==="bootstrap_pending"?2e3:!1},"refetchInterval"),refetchIntervalInBackground:!0}),p=u.data?.deploymentMode==="authenticated",f=p&&u.data?.bootstrapStatus==="bootstrap_pending",h=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),enabled:p,retry:!1,refetchInterval:r(R=>Pr(R.state.error)?Nd:!1,"refetchInterval"),refetchIntervalInBackground:!0}),g=me({queryKey:$.access.currentBoardAccess,queryFn:r(()=>ti.getCurrentBoardAccess(),"queryFn"),enabled:p&&!f&&!!h.data,retry:!1,refetchInterval:r(R=>Pr(R.state.error)?Nd:!1,"refetchInterval"),refetchIntervalInBackground:!0}),v=Bt({mutationFn:r(()=>ti.claimBootstrapAdmin(),"mutationFn"),onSuccess:r(async()=>{await s.invalidateQueries({queryKey:$.auth.session}),await s.invalidateQueries({queryKey:$.health}),await s.invalidateQueries({queryKey:$.companies.all}),await s.invalidateQueries({queryKey:$.companies.stats}),await s.invalidateQueries({queryKey:$.access.currentBoardAccess})},"onSuccess")}),y=[u,...p?[h]:[],...p&&!f&&h.data?[g]:[]],j=u.data?.status==="starting",k=j||y.some(R=>Pr(R.error)),S=y.find(R=>R.error&&!(R.data!==void 0&&Pr(R.error)))?.error,N=u.isLoading||p&&h.isLoading||p&&!f&&!!h.data&&g.isLoading,I=e||!p||!!g.data?.isInstanceAdmin||(g.data?.companyIds.length??0)>0,C=!N&&!S&&!f&&(!p||!!h.data)&&I;(0,x.useEffect)(()=>{C?u.data?.status==="ok"&&c(!0):c(!1)},[C,u.data?.status]);const M=(0,x.useRef)(!1);if((0,x.useEffect)(()=>{k?M.current=!0:M.current&&!N&&!S&&(M.current=!1,s.invalidateQueries({predicate:r(R=>Pr(R.state.error),"predicate")}))},[k,N,S,s]),S||j&&!l)return(0,a.jsx)(rB,{temporary:S?Pr(S):!0,retrying:y.some(R=>R.isFetching),onRetry:r(()=>{for(const R of y)(R.error||R===u&&j)&&R.refetch({cancelRefetch:!1})},"onRetry")});if(N)return(0,a.jsx)(Ds,{});if(f){const R=u.data;if(!R)return(0,a.jsx)(Ds,{});const _=v.error instanceof Ti?{status:v.error.status,message:v.error.message}:v.error instanceof Error?{message:v.error.message}:null;return(0,a.jsx)(iB,{claimAvailable:R.deploymentExposure==="private",hasActiveInvite:R.bootstrapInviteActive,session:h.data,claimState:v.isSuccess?"success":v.isPending?"claiming":"idle",claimError:_,onClaim:r(()=>v.mutate(),"onClaim")})}if(p&&!h.data){const R=encodeURIComponent(`${t.pathname}${t.search}`);return(0,a.jsx)(Ve,{to:`/auth?next=${R}`,replace:!0})}return I?(0,a.jsxs)(a.Fragment,{children:[k&&(0,a.jsx)("div",{role:"status",className:"bg-bg-3 px-4 py-2 text-center text-sm text-ink-3",children:"Connection interrupted. Reconnecting automatically…"}),(0,a.jsx)(xo,{})]}):(0,a.jsx)(lB,{})}r(ek,"CloudAccessGate");var LA=["all","active","paused","error","builtin"];function oB({endpointId:e,children:t}){const s=me({queryKey:$.chatEndpoints.detail(e),queryFn:r(()=>t1.get(e),"queryFn")}),{enabled:l,githubEnabled:c}=C0();return s.isError?(0,a.jsxs)("div",{className:"space-y-3 p-6",children:[(0,a.jsx)("p",{role:"alert",className:"text-sm text-bad",children:s.error.message}),(0,a.jsx)(oe,{variant:"secondary",onClick:r(()=>{s.refetch()},"onClick"),children:"Retry"})]}):s.data?mS(s.data.provider,l,c)?(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)(Ve,{to:"/apps",replace:!0}):null}r(oB,"ProviderEndpointGate");function Cd({children:e}){const{enabled:t,githubEnabled:s,loaded:l}=C0(),[c]=cS(),{endpointId:u}=Ps();return!u&&c.get("provider")==="agentmail"?(0,a.jsx)(a.Fragment,{children:e}):l?u?(0,a.jsx)(oB,{endpointId:u,children:e}):mS(c.get("provider"),t,s)?(0,a.jsx)(a.Fragment,{children:e}):(0,a.jsx)(Ve,{to:"/apps",replace:!0}):null}r(Cd,"ChatConnectorsExperimentalGate");Ce(()=>ke(()=>import("./TaskChatLab-DAEcgWdy.js").then(e=>e.TaskChatLab),__vite__mapDeps([2,1,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,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118])));var cB=Ce(()=>ke(()=>import("./Cases-CpluIjg7.js").then(e=>e.Cases),__vite__mapDeps([119,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,121,40,122,123,7,9,124,125,95,126,127,128,38,129,76]))),uB=Ce(()=>ke(()=>import("./CaseDetail-CPGVCggR.js").then(e=>e.CaseDetail),__vite__mapDeps([130,1,3,16,17,20,131,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,90,113,114,80,81,4,41,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,94,14,98,76,89,88,100,36,37,132,74,133,79,82,83,84,85,86,66,87,91,92,93,65,40,134,61,135,136,137,138,12,101,124,139,140,141,142,143,75,62,70,18,35,71,72,73,77,13,144,118,145,125,99,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,67,161,162,163,164,165,166,167,168,127,169,116,117,170,95,126,171,172,173,174,175,176,128,177,178]))),dB=Ce(()=>ke(()=>import("./Dashboard-CU-kG6C4.js").then(e=>e.Dashboard),__vite__mapDeps([179,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,138,65,41,180,181,7,9,97,182,55,183,145,184,185,37,186,187,126,162,160,67,98,174,188,189]))),fB=Ce(()=>ke(()=>import("./Companies-DK47FHh_.js").then(e=>e.Companies),__vite__mapDeps([190,1,3,20,22,21,113,25,8,26,114,80,27,81,4,41,5,141,29,115,7,9,13,170,102,76,124,95,126,174]))),pB=Ce(()=>ke(()=>import("./Agents-BotjqSPg.js").then(e=>e.Agents),__vite__mapDeps([191,1,3,17,16,20,192,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,133,80,81,9,65,7,71,10,193,13,98,88,44,89,90,37,55,109,140,183,145,194,99,74,76,195,196,126,197,39,198,40,173,162,160,67,171,82,83,172,199,200,201,174,202,203,204]))),$h=Ce(()=>ke(()=>import("./AgentDetail-DPCbH362.js").then(e=>e.AgentDetail),__vite__mapDeps([205,1,3,16,17,20,206,192,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,243,244,245,246,69,42,46,48,50,52,54,56,58,59,61,70,18,35,62,71,72,73,75,77,78,94,96,109,146,111,132,182,125,247,248,249,163,250,251,252,153,253,254,106,255,256,257,258,202,259,260,261,262,11,263,264,265,174,266]))),mB=Ce(()=>ke(()=>import("./Projects-D3ZC8FJk.js").then(e=>e.Projects),__vite__mapDeps([267,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,7,9,13,125,126,174,260,261,204]))),Br=Ce(()=>ke(()=>import("./ProjectDetail-DQxMbc1Q.js").then(e=>e.ProjectDetail),__vite__mapDeps([268,1,3,16,17,20,22,207,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,133,141,46,269,270,174,109,183,145,125,146,184,186,187,271,272,42,48,50,52,54,56,58,59,175,176,167,260,261,273,248,274,249,275,276,101,139,259]))),hB=Ce(()=>ke(()=>import("./ProjectWorkspaceDetail-dA3zVCbf.js").then(e=>e.ProjectWorkspaceDetail),__vite__mapDeps([277,1,3,16,17,20,137,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,138,34,7,9,12,14,101,124,139,140,133,80,81,211,99,74,76,212,4,125,184,185,37,186,187,126,174,167,84,278]))),gB=Ce(()=>ke(()=>import("./Workspaces-BzTr5cqx.js").then(e=>e.Workspaces),__vite__mapDeps([279,1,3,20,206,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,140,126,273,65,42,43,44,45,46,4,47,48,49,6,34,50,51,52,53,54,55,56,38,57,58,59,155,124,37,99,74,76,162,160,67,98,171,82,83,80,40,172,248,207,208,209,210,203,120,108,79,81,84,85,86,66,87,88,89,90,91,92,93,211,212,142,143,41,213,214,152,215,216,113,114,115,217,154,13,14,218,161,219,118,173,220,221,222,95,223,100,180,224,225,193,12,97,105,170,226,185,227,228,229,230,231,197,39,198,232,233,234,235,236,199,200,237,201,238,239,240,241,36,242,274,109,249,276,101,125,139,259]))),xB=Ce(()=>ke(()=>import("./Issues-D97SDuYL.js").then(e=>e.Issues),__vite__mapDeps([280,1,3,16,17,20,206,281,22,136,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,46,121,4,41,48,49,224,7,11,13,14,98,87,76,185,89,90,37,55,109,140,183,145,125,99,74,146,282,147,126,148,88,44,174,59,283,42,43,45,47,6,34,50,51,52,53,54,56,38,57,58,161,97,167,84,203,113,114,79,82,83,85,86,66,91,92,93,143,40,115,12,284,101,124,100,197,39,198,173,235,236,118,231,199,65,285,253,286,104,287,69,61,70,18,35,36,62,71,72,73,75,77,78,94,95,96]))),bB=Ce(()=>ke(()=>import("./Search-8efHT3Mn.js").then(e=>e.Search),__vite__mapDeps([288,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,113,114,80,81,41,133,9,121,40,289,61,7,13,14,98,255,87,76,185,124,88,44,89,90,55,125,95,227,126,148,35,173,59,132,74]))),vB=Ce(()=>ke(()=>import("./IssueDetail-svM2GGnk.js").then(e=>e.t).then(e=>e.IssueDetail),__vite__mapDeps([290,1,3,25,8,16,17,20,206,192,22,207,208,209,140,21,19,23,24,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,18,35,136,243,291,106,164,165,166,131,42,46,48,50,52,54,56,58,59,94,132,251,252,292,293,294,295,133,121,75,244,245,246,69,61,70,62,71,72,73,77,78,96,109,146,111,296,134,63,64,68,101,102,103,289,297,298,135,137,138,139,141,144,145,125,147,148,149,150,151,153,156,157,158,159,163,167,168,127,104,299,300,117,301,110,302,303,10,11,304,15,60,107,112,116,305,183,194,282,184,186,187,247,271,287,306,307,308,309,310,174,249,285,250,311,312,313,283,176,272,175,253,314,315,254,255,316]))),yB=Ce(()=>ke(()=>import("./AgentChats-C4cEfRO_.js").then(e=>e.AgentChats),__vite__mapDeps([317,1,3,19,16,17,20,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,88,44,89,90,126,318]))),jB=Ce(()=>ke(()=>import("./AgentChat-CXR66MM4.js").then(e=>e.AgentChat),__vite__mapDeps([319,1,3,16,17,20,22,290,25,8,206,192,207,208,209,140,21,19,23,24,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,18,35,136,243,291,106,164,165,166,131,42,46,48,50,52,54,56,58,59,94,132,251,252,292,293,294,295,133,121,75,244,245,246,69,61,70,62,71,72,73,77,78,96,109,146,111,296,134,63,64,68,101,102,103,289,297,298,135,137,138,139,141,144,145,125,147,148,149,150,151,153,156,157,158,159,163,167,168,127,104,299,300,117,301,110,302,303,10,11,304,15,60,107,112,116,305,183,194,282,184,186,187,247,271,287,306,307,308,309,310,174,249,285,250,311,312,313,283,176,272,175,253,314,315,254,255,316,320,318]))),wB=Ce(()=>ke(()=>import("./IssueChatLongThreadPerf-mdn5NFzU.js").then(e=>e.IssueChatLongThreadPerf),__vite__mapDeps([321,1,3,124,8,9,174,309,16,17,20,207,22,208,209,140,21,19,23,24,25,26,27,28,29,5,30,31,32,33,210,203,74,7,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,243,310,11,35,151,149,42,46,48,50,52,54,56,58,59,299,61,78,75,94,96,300,117,102,147,301,110,302,303,101,116,109,153,107,249,285,158,159,163,250,251,252,311,165]))),kB=Ce(()=>ke(()=>import("./Routines-CZMUFOH1.js").then(e=>e.Routines),__vite__mapDeps([322,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,79,43,44,45,80,74,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,121,4,40,41,7,9,13,144,37,55,109,183,145,125,99,146,323,126,150,149,151,152,171,172,174,324,203,113,114,115,170,95,132,325,108,213,214,215,6,297,51,298,124,140,100,200,38,168]))),SB=Ce(()=>ke(()=>import("./Pipelines-MgjAhzew.js").then(e=>e.Learnings),__vite__mapDeps([326,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,131,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,132,74,120,79,82,83,84,85,86,66,87,91,92,93,121,143,40,172,61,328,67,299,207,208,209,140,210,203,108,211,99,212,142,65,213,214,152,215,160,216,217,154,13,218,161,219,118,124,173,220,221,222,95,223,180,224,225,193,12,155,97,105,170,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,234,235,236,199,200,237,201,238,239,240,241,242,78,75,35,96,300,117,102,301,110,302,303,305,109,174,309,243,310,11,151,149,101,116,153,107,249,285,158,159,163,250,251,252,311,165,157,312,176,77,178,329]))),NB=Ce(()=>ke(()=>import("./Pipelines-MgjAhzew.js").then(e=>e.PipelineItemDetail),__vite__mapDeps([326,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,131,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,132,74,120,79,82,83,84,85,86,66,87,91,92,93,121,143,40,172,61,328,67,299,207,208,209,140,210,203,108,211,99,212,142,65,213,214,152,215,160,216,217,154,13,218,161,219,118,124,173,220,221,222,95,223,180,224,225,193,12,155,97,105,170,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,234,235,236,199,200,237,201,238,239,240,241,242,78,75,35,96,300,117,102,301,110,302,303,305,109,174,309,243,310,11,151,149,101,116,153,107,249,285,158,159,163,250,251,252,311,165,157,312,176,77,178,329]))),CB=Ce(()=>ke(()=>import("./Pipelines-MgjAhzew.js").then(e=>e.PipelineItemLegacyRedirect),__vite__mapDeps([326,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,131,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,132,74,120,79,82,83,84,85,86,66,87,91,92,93,121,143,40,172,61,328,67,299,207,208,209,140,210,203,108,211,99,212,142,65,213,214,152,215,160,216,217,154,13,218,161,219,118,124,173,220,221,222,95,223,180,224,225,193,12,155,97,105,170,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,234,235,236,199,200,237,201,238,239,240,241,242,78,75,35,96,300,117,102,301,110,302,303,305,109,174,309,243,310,11,151,149,101,116,153,107,249,285,158,159,163,250,251,252,311,165,157,312,176,77,178,329]))),Uh=Ce(()=>ke(()=>import("./Pipelines-MgjAhzew.js").then(e=>e.Pipelines),__vite__mapDeps([326,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,131,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,132,74,120,79,82,83,84,85,86,66,87,91,92,93,121,143,40,172,61,328,67,299,207,208,209,140,210,203,108,211,99,212,142,65,213,214,152,215,160,216,217,154,13,218,161,219,118,124,173,220,221,222,95,223,180,224,225,193,12,155,97,105,170,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,234,235,236,199,200,237,201,238,239,240,241,242,78,75,35,96,300,117,102,301,110,302,303,305,109,174,309,243,310,11,151,149,101,116,153,107,249,285,158,159,163,250,251,252,311,165,157,312,176,77,178,329]))),AB=Ce(()=>ke(()=>import("./Pipelines-MgjAhzew.js").then(e=>e.ReviewQueue),__vite__mapDeps([326,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,131,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,132,74,120,79,82,83,84,85,86,66,87,91,92,93,121,143,40,172,61,328,67,299,207,208,209,140,210,203,108,211,99,212,142,65,213,214,152,215,160,216,217,154,13,218,161,219,118,124,173,220,221,222,95,223,180,224,225,193,12,155,97,105,170,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,234,235,236,199,200,237,201,238,239,240,241,242,78,75,35,96,300,117,102,301,110,302,303,305,109,174,309,243,310,11,151,149,101,116,153,107,249,285,158,159,163,250,251,252,311,165,157,312,176,77,178,329]))),_B=Ce(()=>ke(()=>import("./PipelineSettings-B6Am-LrO.js").then(e=>e.PipelineSettings),__vite__mapDeps([330,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,210,113,114,80,81,4,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,90,91,92,93,138,46,143,159,40,216,213,7,9,214,99,152,215,160,115,217,154,53,13,14,218,161,219,118,124,37,173,220,11,12,170,140,95,126,223,100,150,149,231,151,329,331,108,47,171,172]))),tk=Ce(()=>ke(()=>import("./StatusCards-BIvnBXBN.js").then(e=>e.StatusCards),__vite__mapDeps([332,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,120,4,113,114,80,81,41,133,9,40,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,54,55,56,38,57,58,59,115,180,13,155,98,333,118,85,83,124,88,89,90,99,74,76,95,126,100,151,149,152,162,160,67,171,82,172,132,274,109,249]))),EB=Ce(()=>ke(()=>import("./PixelsOffice-DnBnPerp.js").then(e=>e.PixelsOffice),__vite__mapDeps([334,1,3,20,43,44,45,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,245,80,82,83,335,34,224,7,9,11,12,304,76,185,124,37,55,109,146,91,92,126,174,132,74,336,299,207,208,209,140,210,203,120,4,108,79,81,84,85,86,66,87,88,89,90,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,173,220,221,222,95,223,100,38,180,51,225,193,155,97,105,170,98,226,227,228,229,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,48,42,46,50,52,54,56,58,59,61,78,75,94,35,96,300,117,102,147,301,110,302,303,329,275]))),nk=Ce(()=>ke(()=>import("./RoutineDetail-DUZXGXpv.js").then(e=>e.RoutineDetail),__vite__mapDeps([337,1,3,16,17,20,131,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,90,113,114,80,81,4,41,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,94,14,98,76,89,88,100,36,37,132,74,108,79,82,83,84,85,86,66,87,91,92,93,138,142,246,160,216,40,213,214,99,152,215,217,154,13,218,161,219,118,124,173,220,338,12,304,144,170,339,226,185,109,125,95,146,227,126,223,150,149,231,151,233,171,172,237,174,259,262,203,11,177,340,162,67,325,297,298,140,200,168,331,210,341]))),IB=Ce(()=>ke(()=>import("./UserProfile-5qgIbXdf.js").then(e=>e.UserProfile),__vite__mapDeps([342,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,90,160,7,9,219,195,196,126]))),Ql=Ce(()=>ke(()=>import("./ExecutionWorkspaceDetail-CqvRHX5r.js").then(e=>e.ExecutionWorkspaceDetail),__vite__mapDeps([343,1,3,16,17,20,137,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,138,34,7,9,12,14,101,124,139,140,133,80,81,4,40,6,144,98,37,55,109,183,145,125,95,184,185,186,187,91,92,126,100,38,174,167,84,259,273,65,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,59,155,99,74,76,162,160,67,171,82,83,172,248,207,208,209,210,203,120,108,79,85,86,66,87,88,89,90,93,211,212,142,143,41,213,214,152,215,216,113,114,115,217,154,13,218,161,219,118,173,220,221,222,223,180,224,225,193,97,105,170,226,227,228,229,230,231,197,39,198,232,233,234,235,236,199,200,237,201,238,239,240,241,36,242,274,249,278,325,297,298,150,149,151,168]))),TB=Ce(()=>ke(()=>import("./Goals-CnYUdXEo.js").then(e=>e.Goals),__vite__mapDeps([344,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,13,126,345,41]))),ak=Ce(()=>ke(()=>import("./Artifacts-CnP5QapS.js").then(e=>e.Artifacts),__vite__mapDeps([346,1,3,16,17,20,206,18,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,4,6,34,12,35,36,37,38,113,114,80,81,41,212,7,9,76,124,95,126,315]))),RB=Ce(()=>ke(()=>import("./GoalDetail-BFeUPzal.js").then(e=>e.GoalDetail),__vite__mapDeps([347,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,7,13,55,125,126,230,272,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,90,91,92,93,42,46,4,47,48,49,6,34,50,51,52,53,54,56,38,57,58,59,175,176,40,172,167,204,345,41]))),sk=Ce(()=>ke(()=>import("./Approvals-YzDki85i.js").then(e=>e.Approvals),__vite__mapDeps([348,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,97,124,55,126,313,48,49,7,148,88,44,89,90,174,283,42,43,45,46,4,47,6,34,50,51,52,53,54,56,38,57,58,59,161]))),MB=Ce(()=>ke(()=>import("./ApprovalDetail-BSNBUdim.js").then(e=>e.ApprovalDetail),__vite__mapDeps([349,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,42,43,44,45,46,4,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,89,90,126,148,88,100,283,161,97]))),DB=Ce(()=>ke(()=>import("./CompanyActivity-BzF5S-ak.js").then(e=>e.CompanyActivity),__vite__mapDeps([350,1,3,351,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,108,133,80,81,9,138,352,143,65,40,41,335,7,10,54,13,14,284,161,270,98,95,174,185,124,44,89,90,88,37,55,109,99,74,76,146,227,323,91,92,126,148,171,82,83,4,172,316,164,165,166,353,354,275,341,355]))),Ad=Ce(()=>ke(()=>import("./AuditHub-CKyN1yDa.js").then(e=>e.AuditHub),__vite__mapDeps([351,1,3,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,108,133,80,81,9,138,352,143,65,40,41,335,7,10,54,13,14,284,161,270,98,95,174,185,124,44,89,90,88,37,55,109,99,74,76,146,227,323,91,92,126,148,171,82,83,4,172,316,164,165,166,353,354,275,341,355]))),OB=Ce(()=>ke(()=>import("./WhatNeedsMe-DjxO39CR.js").then(e=>e.WhatNeedsMe),__vite__mapDeps([356,1,3,16,17,20,22,357,206,192,43,44,45,251,252,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,120,4,113,114,80,81,41,142,121,86,40,172,48,49,42,46,47,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,169,299,207,208,209,140,203,74,108,79,82,83,84,85,66,87,76,88,89,90,91,92,93,211,99,212,143,65,213,214,152,215,160,216,217,154,13,14,218,161,219,118,124,37,173,220,221,222,95,223,100,180,224,225,193,12,155,97,105,170,98,226,185,227,228,229,126,230,231,197,39,198,162,67,232,233,171,234,235,236,199,200,237,201,238,239,240,241,36,242,61,78,75,94,35,96,300,117,102,147,301,110,302,303,294,358,146,164,165,166,336,109,183,145]))),LB=Ce(()=>ke(()=>import("./DecisionQueuePage-CBULv6cY.js").then(e=>e.DecisionQueuePage),__vite__mapDeps([359,1,3,16,17,20,22,357,206,192,43,44,45,251,252,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,120,4,113,114,80,81,41,142,121,86,40,172,48,49,42,46,47,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,169,299,207,208,209,140,203,74,108,79,82,83,84,85,66,87,76,88,89,90,91,92,93,211,99,212,143,65,213,214,152,215,160,216,217,154,13,14,218,161,219,118,124,37,173,220,221,222,95,223,100,180,224,225,193,12,155,97,105,170,98,226,185,227,228,229,126,230,231,197,39,198,162,67,232,233,171,234,235,236,199,200,237,201,238,239,240,241,36,242,61,78,75,94,35,96,300,117,102,147,301,110,302,303,294,358,146,164,165,166,336]))),zB=Ce(()=>ke(()=>import("./BoardChat-Dn5D5hbo.js").then(e=>e.BoardChat),__vite__mapDeps([360,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,113,114,80,81,4,41,138,39,40,160,361,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,61,169,261,94,362,305,98,87,182,118,85,83,88,89,90,183,145,92,126,35,174,112,115,116,117,76,99,74,100,36,37,132]))),PB=Ce(()=>ke(()=>import("./CompanySettings-DXs4duFl.js").then(e=>e.CompanySettings),__vite__mapDeps([363,1,3,16,17,20,22,21,210,25,8,26,203,74,27,7,9,40,213,23,24,4,76,214,31,99,152,215,10,13,124,37,140,95,196,126,230,231,171,82,83,80,172,236,41,47,118,85,199,65,30,302,364,207,208,209,19,28,29,5,32,33,120,108,79,43,44,45,81,84,86,66,87,88,89,90,91,92,93,211,212,142,143,160,49,6,216,113,114,115,217,154,53,14,218,161,219,173,220,34,221,222,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,197,39,198,162,67,232,233,234,235,200,237,57,201,238,239,240,241,36,242,353]))),$B=Ce(()=>ke(()=>import("./CompanyConnections-V6QokJbP.js").then(e=>e.CompanyConnections),__vite__mapDeps([365,1,3,20,207,16,17,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,364,353,354]))),Bh=Ce(()=>ke(()=>import("./CompanyEnvironments-Dtsf3CLS.js").then(e=>e.CompanyEnvironments),__vite__mapDeps([366,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,203,74,7,9,212,4,216,113,114,80,81,41,40,213,76,214,99,152,215,160,115,217,154,53,13,14,218,161,219,118,85,83,124,37,173,220,225,12,155,170,55,140,126,223,234,120,108,95,100,171,82,172,236,47,231,199,65,200,201,295]))),UB=Ce(()=>ke(()=>import("./BootstrapSetupUxLab-CDn9Qoy4.js").then(e=>e.BootstrapSetupUxLab),__vite__mapDeps([367,1,3,7,8,9,97,33,98,174]))),BB=Ce(()=>ke(()=>import("./ResponsibleUserDenialUxLab-DN6KJXcW.js").then(e=>e.ResponsibleUserDenialUxLab),__vite__mapDeps([368,1,3,174,254,243,106,255]))),KB=Ce(()=>ke(()=>import("./CrossIssueCollaborationUxLab-Dm0T3f-s.js").then(e=>e.CrossIssueCollaborationUxLab),__vite__mapDeps([369,1,3,291,243,142,49,217,97,106,164,165,166,90,25,8,26,89,174,311,118,85,83,124,9]))),qB=Ce(()=>ke(()=>import("./CompanySettingsPluginPage-C2DZeyFu.js").then(e=>e.CompanySettingsPluginPage),__vite__mapDeps([370,1,3,16,17,21,20,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,184,185,37,186,187,126]))),FB=Ce(()=>ke(()=>import("./CompanyAccess-G_ygWCdy.js").then(e=>e.CompanyAccess),__vite__mapDeps([371,1,3,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,90,133,80,81,9,4,6,7,97,170,124,37,55,99,74,76,146,184,185,186,187,195,196,126,38]))),HB=Ce(()=>ke(()=>import("./CompanyAccess-G_ygWCdy.js").then(e=>e.CompanyAccessLegacyRoute),__vite__mapDeps([371,1,3,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,90,133,80,81,9,4,6,7,97,170,124,37,55,99,74,76,146,184,185,186,187,195,196,126,38]))),ik=Ce(()=>ke(()=>import("./AdvancedToolsRoute-4n8ZC6o0.js").then(e=>e.AdvancedToolsRoute),__vite__mapDeps([372,1,3,16,17,20,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,141,64,361,269,10,373,102,125,146,174,132,265,189,374,375,192]))),rk=Ce(()=>ke(()=>import("./ProfileWizardRoute-DaZPFglw.js").then(e=>e.ProfileWizardRoute),__vite__mapDeps([376,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,120,4,108,40,41,7,9,300,13,76,124,37,95,228,126,100,232,88,44,89,90,227,171,82,83,80,172,173,265,98,174,375,192,55,125,91,92,377,161,146]))),VB=Ce(()=>ke(()=>import("./ProfileDetailRoute-PJCQrW25.js").then(e=>e.ProfileDetailRoute),__vite__mapDeps([378,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,108,141,6,7,9,97,170,166,124,37,99,74,76,95,228,126,100,265,98,174,374,375,192,55,125,91,92,377,161,146]))),WB=Ce(()=>ke(()=>import("./Browse-BQApRQGO.js").then(e=>e.Browse),__vite__mapDeps([379,1,3,20,192,22,380,16,17,208,209,140,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,203,74,7,9,120,4,41,155,98,219,89,90,109,99,76,95,227,228,56,162,160,67,233,355,381,113,114,80,81,108,293,115,34,225,222,170,118,85,83,88,44,37,55,146,247,229,126,242,110,382,383,133,6,300,182,38,237,100,57]))),zA=Ce(()=>ke(()=>import("./AppsConnect-eslQZ4Lz.js").then(e=>e.AppsConnect),__vite__mapDeps([384,1,3,16,17,20,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,381,385]))),QB=Ce(()=>ke(()=>import("./ChatEndpointSetup-Czgls4T4.js").then(e=>e.ChatEndpointSetup),__vite__mapDeps([386,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,108,47,6,34,217,154,7,9,98,226,185,118,85,83,88,44,89,90,37,55,140,125,99,74,76,95,196,247,126,100,232,41,227,38,241,36,387,212,142,228,174,110,303,259,263,161,236,40,231,199,65,388]))),lk=Ce(()=>ke(()=>import("./ChatEndpointDetail-C15kjogV.js").then(e=>e.ChatEndpointDetail),__vite__mapDeps([389,1,3,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,203,74,7,9,120,4,113,114,80,81,41,108,79,43,44,45,82,83,84,85,86,66,87,76,88,89,90,91,92,93,138,352,143,40,47,42,46,48,49,6,34,50,51,52,53,54,55,56,38,57,58,59,115,11,12,13,155,170,98,118,124,37,99,95,146,247,228,229,126,100,231,240,239,110,259,390,232,227,233,387,212,142,125,174,303,263,161,236,199,65,388]))),GB=Ce(()=>ke(()=>import("./ChatIdentityConfirm-BJoMzDSS.js").then(e=>e.ChatIdentityConfirm),__vite__mapDeps([391,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,196,247]))),YB=Ce(()=>ke(()=>import("./AppsReview-D02Q501S.js").then(e=>e.AppsReview),__vite__mapDeps([392,1,3,21,20,22,126,393,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,299,207,208,209,140,210,203,74,120,108,79,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,216,113,114,115,217,154,13,14,218,161,219,118,124,37,173,220,221,222,95,223,100,180,224,225,193,12,155,97,105,170,98,226,185,227,228,229,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,201,238,239,240,241,36,242,61,78,75,94,35,96,300,117,102,147,301,110,302,303]))),XB=Ce(()=>ke(()=>import("./AppDetail-B5T_4Bu-.js").then(e=>e.AppDetail),__vite__mapDeps([394,1,3,16,17,20,22,207,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,380,109,56,355,381,146,306,382,385,390,387,125,174,110,303,259,263,393,42,46,48,50,52,54,58,59,299,61,78,75,94,35,96,300,117,102,147,301,302]))),ok=Ce(()=>ke(()=>import("./AppNotConnected-eBGlritA.js").then(e=>e.AppNotConnected),__vite__mapDeps([395,1,3,16,17,20,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,394,380,109,56,355,381,146,306,382,385,390,387,125,174,110,303,259,263,393,42,46,48,50,52,54,58,59,299,61,78,75,94,35,96,300,117,102,147,301,302]))),ck=Ce(()=>ke(()=>import("./GatewaysList-kBD3cwdU.js").then(e=>e.GatewaysList),__vite__mapDeps([396,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,13,37,55,125,95,227,228,126,231,265,98,124,174,397,138,6,53,99,74,76,38]))),ZB=Ce(()=>ke(()=>import("./GatewayDetail-Br82oQib.js").then(e=>e.GatewayDetail),__vite__mapDeps([398,1,3,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,65,246,4,40,75,41,172,213,7,9,76,214,74,99,152,215,47,308,6,53,269,13,362,118,85,83,37,55,125,95,227,228,126,231,38,265,98,124,174,397,138]))),JB=Ce(()=>ke(()=>import("./CompanySkills-BE6s5mI1.js").then(e=>e.CompanySkills),__vite__mapDeps([399,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,113,114,80,81,41,133,9,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,90,91,92,93,212,40,75,160,47,42,46,48,49,6,34,50,51,52,53,7,54,55,56,38,57,58,59,308,115,154,61,180,298,225,68,11,13,155,218,305,161,97,170,98,102,182,118,124,37,125,99,95,126,148,100,162,67,232,227,240,239,36,258,259,177,400,324,203,132,401]))),uk=Ce(()=>ke(()=>import("./SkillSources-Bn1LRP0O.js").then(e=>e.SkillSources),__vite__mapDeps([402,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,113,114,80,81,4,41,160,134,34,61,7,9,13,155,98,99,74,76,95,56,126,214,242,77,401,403,67,124,385]))),Kh=Ce(()=>ke(()=>import("./SkillStudio-C4o17_hm.js").then(e=>e.SkillStudio),__vite__mapDeps([404,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,90,113,114,80,81,4,41,108,133,9,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,91,92,93,212,40,213,7,214,99,152,215,405,65,154,221,120,6,53,222,161,118,124,37,95,223,100,38,333,49,42,46,47,48,34,50,51,52,54,55,56,57,58,59,115,61,180,328,67,71,299,207,208,209,140,203,211,142,143,160,216,217,13,14,218,219,173,220,224,225,193,12,155,97,105,170,98,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,172,234,235,236,199,200,237,201,238,239,240,241,36,242,78,75,94,35,96,300,117,102,147,301,110,302,303,148,149,174,73,77,176,132,258,204,177,129,400,401,399,308,298,68,11,305,182,125,259,324,406,407]))),eK=Ce(()=>ke(()=>import("./Secrets-BZCIDLKj.js").then(e=>e.Secrets),__vite__mapDeps([408,1,3,16,17,20,21,22,120,25,8,4,113,26,114,80,27,81,41,5,133,9,23,24,141,46,142,75,160,48,296,6,115,34,221,108,53,7,222,161,118,85,83,124,88,44,89,90,37,99,74,76,95,223,100,38,51,123,224,67,225,338,13,155,31,97,170,98,219,102,55,146,195,196,227,126,232,171,82,40,172,220,36,132]))),tK=Ce(()=>ke(()=>import("./CompanyImport-1brk-ZPP.js").then(e=>e.CompanyImport),__vite__mapDeps([409,1,3,20,22,207,16,17,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,42,46,48,50,52,54,56,58,59,410,411,412]))),nK=Ce(()=>ke(()=>import("./DesignGuide-BwncU-wB.js").then(e=>e.DesignGuide),__vite__mapDeps([413,1,3,16,17,20,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,245,133,64,310,11,35,151,149,42,46,48,50,52,54,56,58,59,63,61,68,69,70,18,62,71,72,73,75,77,78,94,96,101,102,103,181,104,414,299,300,117,147,301,110,302,303,415,358,182,305,148,174,107,109,156,307,308,144,282,309,243,116,153,249,285,158,159,163,250,251,252,311,165,272,175,176,167,132,260,261,264,265,204,129,400,188,403,340,406,286,287,407]))),aK=Ce(()=>ke(()=>import("./InstanceFeatures-CqkXR6d9.js").then(e=>e.InstanceFeatures),__vite__mapDeps([416,1,3,19,16,17,20,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,124,9,95,187,126,417,140,195,196,231]))),sK=Ce(()=>ke(()=>import("./AgentDefaults-BZwFysUw.js").then(e=>e.AgentDefaults),__vite__mapDeps([418,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,142,55,126,256,257,7,9,14,76,124,171,82,83,80,4,40,172]))),iK=Ce(()=>ke(()=>import("./OmpAllSettings-BvYkLMhp.js").then(e=>e.n).then(e=>e.OmpAllSettingsPage),__vite__mapDeps([266,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,7,9,14,124,55,95,126,100,231,171,82,83,80,4,40,172,173,256,257,76]))),rK=Ce(()=>ke(()=>import("./ModelsAndProviders-BJaNzbhV.js").then(e=>e.ModelsAndProviders),__vite__mapDeps([419,1,3,20,21,22,7,8,9,13,155,55,126,256]))),lK=Ce(()=>ke(()=>import("./InstanceAdvanced-CTjlJp69.js").then(e=>e.InstanceAdvanced),__vite__mapDeps([420,1,3,7,8,9,12,14,98,124,126,417,20,140,195,196,231]))),oK=Ce(()=>ke(()=>import("./InstanceAccess-CDzvvhRr.js").then(e=>e.InstanceAccess),__vite__mapDeps([421,1,3,20,22,120,25,8,4,7,9,97,32,37,146,126,174]))),cK=Ce(()=>ke(()=>import("./ProfileSettings-DXbA8GQP.js").then(e=>e.ProfileSettings),__vite__mapDeps([422,1,3,20,22,21,90,25,8,26,108,224,7,9,12,218,362,170,55,95,126,230,231,232,120,4,23,24,27,41,88,44,89,227,233,171,82,83,80,40,172,174]))),uK=Ce(()=>ke(()=>import("./PluginManager-CPYhUxgY.js").then(e=>e.PluginManager),__vite__mapDeps([423,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,108,180,7,9,13,373,305,170,98,124,37,99,74,76,95,186,126,174]))),dK=Ce(()=>ke(()=>import("./PluginSettings-CapWiXsO.js").then(e=>e.PluginSettings),__vite__mapDeps([424,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,211,99,74,7,76,212,86,48,49,51,218,161,98,339,124,186,184,185,37,187,126,234,120,4,108,40,41,160,217,154,53,13,170,95,223,100,171,82,83,172,174,167,84,139,140]))),dk=Ce(()=>ke(()=>import("./AdapterManager-DlCyzyMu.js").then(e=>e.AdapterManager),__vite__mapDeps([425,1,3,20,21,22,108,25,8,211,33,99,74,26,27,7,9,76,30,51,13,373,155,170,98,124,37,95,126,235,23,24,40,197,39,198,4,31,173,236,41,47,118,85,83,231,199,65,238,239,174]))),fk=Ce(()=>ke(()=>import("./PluginPage-C1XADFT2.js").then(e=>e.PluginPage),__vite__mapDeps([426,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,7,9,186,184,185,37,187,126]))),fK=Ce(()=>ke(()=>import("./NewAgent-DGXol110.js").then(e=>e.NewAgent),__vite__mapDeps([427,1,3,16,17,20,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242]))),pK=Ce(()=>ke(()=>import("./Auth-BRkjUyyN.js").then(e=>e.AuthPage),__vite__mapDeps([428,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,415,358,182,58,196,429]))),mK=Ce(()=>ke(()=>import("./BoardClaim-7gbzMdsZ.js").then(e=>e.BoardClaimPage),__vite__mapDeps([430,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,146,174]))),hK=Ce(()=>ke(()=>import("./AssistantConnection-refIKgUa.js").then(e=>e.AssistantConnection),__vite__mapDeps([383,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,4,6,34,7,300,182,89,90,126,38,237,76,100,57,382]))),pk=Ce(()=>ke(()=>import("./McpConnect-CYsPUSYV.js").then(e=>e.McpConnectPage),__vite__mapDeps([431,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,7,9,182,89,90,95,174,382]))),gK=Ce(()=>ke(()=>import("./McpConnect-CYsPUSYV.js").then(e=>e.McpDevicePage),__vite__mapDeps([431,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,7,9,182,89,90,95,174,382]))),xK=Ce(()=>ke(()=>import("./McpConnect-CYsPUSYV.js").then(e=>e.AssistantConnectionsPage),__vite__mapDeps([431,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,7,9,182,89,90,95,174,382]))),bK=Ce(()=>ke(()=>import("./CliAuth-CfQo7C9j.js").then(e=>e.CliAuthPage),__vite__mapDeps([432,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,146,174]))),vK=Ce(()=>ke(()=>import("./InviteLanding-C65R08_E.js").then(e=>e.InviteLandingPage),__vite__mapDeps([433,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,146,196,199,65,429]))),mk=Ce(()=>ke(()=>import("./PublicIssueSharePage-BtWc4gq4.js").then(e=>e.PublicIssueSharePage),__vite__mapDeps([434,1,3,16,17,20,212,42,43,44,45,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,46,4,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,60,61,62,89,90,227,314]))),yK=Ce(()=>ke(()=>import("./JoinRequestQueue-B_br1twW.js").then(e=>e.JoinRequestQueue),__vite__mapDeps([435,1,3,20,21,22,7,8,9,124,37,146,126,174]))),PA=Ce(()=>ke(()=>Promise.resolve().then(()=>s6).then(e=>e.NotFoundPage),void 0)),fc=Ce(()=>ke(()=>import("./Inbox-C6bCCEH6.js").then(e=>e.n).then(e=>e.Inbox),__vite__mapDeps([281,1,3,16,17,20,22,136,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,46,121,4,41,48,49,224,7,11,13,14,98,87,76,185,89,90,37,55,109,140,183,145,125,99,74,146,282,147,126,148,88,44,174,59,283,42,43,45,47,6,34,50,51,52,53,54,56,38,57,58,161,97,167,84]))),jK=Ce(()=>ke(()=>import("./CompanyExport-CMPWrtnT.js").then(e=>e.CompanyExport),__vite__mapDeps([436,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,42,43,44,45,46,4,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,14,76,37,125,126,77,412]))),wK=Ce(()=>ke(()=>import("./Terminal-DGUlqBL9.js").then(e=>e.Terminal),__vite__mapDeps([437,1,3,16,17,20,292,25,8,114,80,26,27,81,39,198,293,6,7,9,294,31,76,95,38,36,37,295,21,22,19,23,24,28,29,5,30,32,33,210,108,4,40,48,296,53,13,72,105,98,99,74,146,126,214,100,171,82,83,172,200,406])));function kK({children:e}){return(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:e})}r(kK,"ProductionSurface");function SK(e){const t=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{index:!0,element:(0,a.jsx)(Ve,{to:"dashboard",replace:!0})}),(0,a.jsx)(L,{path:"dashboard",element:(0,a.jsx)(dB,{})}),(0,a.jsx)(L,{path:"dashboard/live",element:(0,a.jsx)(Ve,{to:bI("all"),replace:!0})}),(0,a.jsx)(L,{path:"timeline",element:(0,a.jsx)(Ys,{to:"/activity/timeline"})}),(0,a.jsx)(L,{path:"onboarding",element:(0,a.jsx)(BA,{})}),(0,a.jsx)(L,{path:"companies",element:(0,a.jsx)(fB,{})}),(0,a.jsx)(L,{path:"company/settings",element:(0,a.jsx)(PB,{})}),(0,a.jsx)(L,{path:"company/settings/connections",element:(0,a.jsx)($B,{})}),(0,a.jsx)(L,{path:"company/settings/agent-defaults",element:(0,a.jsx)(sK,{})}),(0,a.jsx)(L,{path:"company/settings/agent-defaults/all",element:(0,a.jsx)(iK,{})}),(0,a.jsx)(L,{path:"company/settings/models",element:(0,a.jsx)(rK,{})}),(0,a.jsx)(L,{path:"company/settings/environments",element:(0,a.jsx)(Ve,{to:"/company/settings/instance/environments",replace:!0})}),(0,a.jsx)(L,{path:"company/settings/cloud-upstream",element:(0,a.jsx)(Ve,{to:"/company/export",replace:!0})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"company.members"}),children:[(0,a.jsx)(L,{path:"company/settings/members",element:(0,a.jsx)(FB,{})}),(0,a.jsx)(L,{path:"company/settings/access",element:(0,a.jsx)(HB,{})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.invites"}),children:(0,a.jsx)(L,{path:"company/settings/invites",element:(0,a.jsx)(Ve,{to:"/company/settings/members?tab=invites",replace:!0})})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.export"}),children:(0,a.jsx)(L,{path:"company/export/*",element:(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:(0,a.jsx)(jK,{})})})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.import"}),children:(0,a.jsx)(L,{path:"company/import",element:(0,a.jsx)(tK,{})})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.secrets"}),children:(0,a.jsx)(L,{path:"company/settings/secrets",element:(0,a.jsx)(eK,{})})}),(0,a.jsx)(L,{path:"company/settings/tools",element:(0,a.jsx)(xk,{})}),(0,a.jsx)(L,{path:"company/settings/tools/:tab",element:(0,a.jsx)(xk,{})}),(0,a.jsx)(L,{path:"tools",element:(0,a.jsx)(bk,{})}),(0,a.jsx)(L,{path:"tools/:tab",element:(0,a.jsx)(bk,{})}),(0,a.jsx)(L,{path:"apps",element:(0,a.jsx)(WB,{})}),(0,a.jsx)(L,{path:"apps/assistant-connection",element:(0,a.jsx)(hK,{})}),(0,a.jsx)(L,{path:"apps/browse",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/connections",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/byo",element:(0,a.jsx)(zA,{byoOnly:!0})}),(0,a.jsx)(L,{path:"apps/vercel-connect",element:(0,a.jsx)(hk,{credentialSource:"vercel_connect"})}),(0,a.jsx)(L,{path:"apps/connect",element:(0,a.jsx)(hk,{})}),(0,a.jsx)(L,{path:"apps/chat/connect",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(QB,{})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(Ve,{to:"settings",replace:!0})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId/reviews/:reviewId",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(lk,{})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId/:tab",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(lk,{})})}),(0,a.jsx)(L,{path:"apps/connect/:appKey",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/connect/:appKey/:stage",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/review",element:(0,a.jsx)(YB,{})}),(0,a.jsx)(L,{path:"apps/attention",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/gateways",element:(0,a.jsx)(ck,{})}),(0,a.jsx)(L,{path:"apps/gateways/:gatewayId",element:(0,a.jsx)(Ve,{to:"overview",replace:!0})}),(0,a.jsx)(L,{path:"apps/gateways/:gatewayId/:tab",element:(0,a.jsx)(ZB,{})}),(0,a.jsx)(L,{path:"apps/advanced",element:(0,a.jsx)(ik,{})}),(0,a.jsx)(L,{path:"apps/advanced/gateways",element:(0,a.jsx)(ck,{})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/new",element:(0,a.jsx)(rk,{mode:"new"})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/:profileId/edit",element:(0,a.jsx)(rk,{mode:"edit"})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/:profileId",element:(0,a.jsx)(VB,{})}),(0,a.jsx)(L,{path:"apps/advanced/audit",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/advanced/run-your-own",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/advanced/:tab",element:(0,a.jsx)(ik,{})}),(0,a.jsx)(L,{path:"apps/app/:applicationId",element:(0,a.jsx)(ok,{})}),(0,a.jsx)(L,{path:"apps/app/:applicationId/:tab",element:(0,a.jsx)(ok,{})}),(0,a.jsx)(L,{path:"apps/:connectionId",element:(0,a.jsx)(Ve,{to:"permissions",replace:!0})}),(0,a.jsx)(L,{path:"apps/:connectionId/:tab",element:(0,a.jsx)(XB,{})}),(0,a.jsx)(L,{path:"company/settings/instance",element:(0,a.jsx)(Ve,{to:"/company/settings",replace:!0})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.profile"}),children:(0,a.jsx)(L,{path:"company/settings/instance/profile",element:(0,a.jsx)(cK,{})})}),(0,a.jsx)(L,{path:"company/settings/instance/general",element:(0,a.jsx)(Ve,{to:"/company/settings",replace:!0})}),(0,a.jsx)(L,{path:"company/settings/instance/heartbeats",element:(0,a.jsx)(Ve,{to:"/company/settings",replace:!0})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.environments"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/environments",element:(0,a.jsx)(Bh,{})}),(0,a.jsx)(L,{path:"company/settings/instance/environments/new",element:(0,a.jsx)(Bh,{mode:"create"})}),(0,a.jsx)(L,{path:"company/settings/instance/environments/:environmentId/edit",element:(0,a.jsx)(Bh,{mode:"edit"})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.access"}),children:(0,a.jsx)(L,{path:"company/settings/instance/access",element:(0,a.jsx)(oK,{})})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.experimental"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/features",element:(0,a.jsx)(aK,{})}),(0,a.jsx)(L,{path:"company/settings/instance/advanced",element:(0,a.jsx)(lK,{})}),(0,a.jsx)(L,{path:"company/settings/instance/experimental",element:(0,a.jsx)(Ve,{to:"/company/settings/instance/features",replace:!0})})]}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.plugins"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/plugins",element:(0,a.jsx)(uK,{})}),(0,a.jsx)(L,{path:"company/settings/instance/plugins/:pluginId",element:(0,a.jsx)(dK,{})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.adapters"}),children:(0,a.jsx)(L,{path:"company/settings/instance/adapters",element:(0,a.jsx)(dk,{})})}),(0,a.jsx)(L,{path:"company/settings/:settingsRoutePath/*",element:(0,a.jsx)(qB,{})}),(0,a.jsx)(L,{path:"skills/sources",element:(0,a.jsx)(uk,{})}),(0,a.jsx)(L,{path:"skills/sources/:sourceId",element:(0,a.jsx)(uk,{})}),(0,a.jsx)(L,{path:"skills/studio",element:(0,a.jsx)(Kh,{})}),(0,a.jsx)(L,{path:"skills/studio/new",element:(0,a.jsx)(Kh,{})}),(0,a.jsx)(L,{path:"skills/studio/:skillId",element:(0,a.jsx)(Kh,{})}),(0,a.jsx)(L,{path:"skills/:skillId/studio",element:(0,a.jsx)($A,{})}),(0,a.jsx)(L,{path:"skills/*",element:(0,a.jsx)(JB,{})}),(0,a.jsx)(L,{path:"settings",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"settings/*",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"plugins/:pluginId",element:(0,a.jsx)(fk,{})}),(0,a.jsx)(L,{path:"org",element:(0,a.jsx)(Ve,{to:"/agents/all",replace:!0})}),(0,a.jsx)(L,{path:"agents",element:(0,a.jsx)(Ve,{to:"/agents/all",replace:!0})}),LA.map(s=>(0,a.jsx)(L,{path:`agents/${s}`,element:(0,a.jsx)(pB,{})},s)),(0,a.jsx)(L,{path:"agents/new",element:(0,a.jsx)(fK,{})}),(0,a.jsx)(L,{path:"agents/:agentId",element:(0,a.jsx)($h,{})}),(0,a.jsx)(L,{path:"agents/:agentId/:tab",element:(0,a.jsx)($h,{})}),(0,a.jsx)(L,{path:"agents/:agentId/runs/:runId",element:(0,a.jsx)($h,{})}),(0,a.jsx)(L,{path:"projects",element:(0,a.jsx)(mB,{})}),(0,a.jsx)(L,{path:"projects/:projectId",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/overview",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues/:filter",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Th,{}),children:(0,a.jsx)(L,{path:"projects/:projectId/workspaces/:workspaceId",element:(0,a.jsx)(hB,{})})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/configuration",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/budget",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Th,{}),children:(0,a.jsx)(L,{path:"workspaces",element:(0,a.jsx)(gB,{})})}),(0,a.jsx)(L,{path:"terminal",element:(0,a.jsx)(kK,{children:(0,a.jsx)(wK,{})})}),(0,a.jsx)(L,{path:"issues",element:(0,a.jsx)(xB,{})}),(0,a.jsx)(L,{path:"tasks",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"tasks/new",element:(0,a.jsx)(tB,{})}),(0,a.jsx)(L,{path:"search",element:(0,a.jsx)(bB,{})}),t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"issues/all",element:(0,a.jsx)(bs,{view:"all"})}),(0,a.jsx)(L,{path:"issues/active",element:(0,a.jsx)(bs,{view:"active"})}),(0,a.jsx)(L,{path:"issues/backlog",element:(0,a.jsx)(bs,{view:"backlog"})}),(0,a.jsx)(L,{path:"issues/done",element:(0,a.jsx)(bs,{view:"done"})}),(0,a.jsx)(L,{path:"issues/recent",element:(0,a.jsx)(bs,{view:"recent"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"issues/all",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/active",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/backlog",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/done",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/recent",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})})]}),(0,a.jsx)(L,{path:"chats",element:(0,a.jsx)(yB,{})}),(0,a.jsx)(L,{path:"chats/:agentRef",element:(0,a.jsx)(jB,{})}),(0,a.jsx)(L,{path:"issues/:issueId",element:(0,a.jsx)(vB,{})}),null,(0,a.jsx)(L,{path:"routines",element:(0,a.jsx)(kB,{})}),(0,a.jsx)(L,{path:"cases",element:(0,a.jsx)(Qw,{children:(0,a.jsx)(cB,{})})}),(0,a.jsx)(L,{path:"cases/:caseIdentifier",element:(0,a.jsx)(Qw,{children:(0,a.jsx)(uB,{})})}),(0,a.jsx)(L,{path:"pixels-office",element:(0,a.jsx)(f6,{children:(0,a.jsx)(EB,{})})}),(0,a.jsx)(L,{path:"status",element:(0,a.jsx)(Gw,{children:(0,a.jsx)(tk,{})})}),(0,a.jsx)(L,{path:"status/:cardId",element:(0,a.jsx)(Gw,{children:(0,a.jsx)(tk,{})})}),(0,a.jsx)(L,{path:"status-cards",element:(0,a.jsx)(vk,{})}),(0,a.jsx)(L,{path:"status-cards/:cardId",element:(0,a.jsx)(vk,{})}),(0,a.jsx)(L,{path:"review-queue",element:(0,a.jsx)(ar,{children:(0,a.jsx)(AB,{})})}),(0,a.jsx)(L,{path:"learnings",element:(0,a.jsx)(ar,{children:(0,a.jsx)(SB,{})})}),(0,a.jsx)(L,{path:"pipelines",element:(0,a.jsx)(ar,{children:(0,a.jsx)(Uh,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId",element:(0,a.jsx)(ar,{children:(0,a.jsx)(Uh,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/add",element:(0,a.jsx)(ar,{children:(0,a.jsx)(Uh,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/settings",element:(0,a.jsx)(ar,{children:(0,a.jsx)(_B,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/items/:caseId",element:(0,a.jsx)(ar,{children:(0,a.jsx)(NB,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/cases/:caseId",element:(0,a.jsx)(ar,{children:(0,a.jsx)(CB,{})})}),(0,a.jsx)(L,{path:"routines/:routineId",element:(0,a.jsx)(nk,{})}),(0,a.jsx)(L,{path:"routines/:routineId/:section",element:(0,a.jsx)(nk,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Th,{}),children:(0,a.jsxs)(L,{element:(0,a.jsx)(p6,{}),children:[(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/services",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/configuration",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/runtime-logs",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/issues",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/routines",element:(0,a.jsx)(Ql,{})})]})}),(0,a.jsx)(L,{path:"goals",element:(0,a.jsx)(TB,{})}),(0,a.jsx)(L,{path:"goals/:goalId",element:(0,a.jsx)(RB,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(ak,{})}),(0,a.jsx)(L,{path:"approvals",element:(0,a.jsx)(Ve,{to:"/approvals/pending",replace:!0})}),(0,a.jsx)(L,{path:"approvals/pending",element:(0,a.jsx)(sk,{})}),(0,a.jsx)(L,{path:"approvals/all",element:(0,a.jsx)(sk,{})}),(0,a.jsx)(L,{path:"approvals/:approvalId",element:(0,a.jsx)(MB,{})}),(0,a.jsx)(L,{path:"activity",element:(0,a.jsx)(DB,{})}),(0,a.jsx)(L,{path:"activity/runs",element:(0,a.jsx)(Ad,{section:"runs"})}),(0,a.jsx)(L,{path:"activity/costs",element:(0,a.jsx)(Ad,{section:"costs"})}),(0,a.jsx)(L,{path:"activity/budgets",element:(0,a.jsx)(Ad,{section:"budgets"})}),(0,a.jsx)(L,{path:"activity/timeline",element:(0,a.jsx)(Ad,{section:"timeline"})}),(0,a.jsx)(L,{path:"audit",element:(0,a.jsx)(Ys,{to:"/activity",forceAgentMode:!0})}),(0,a.jsx)(L,{path:"audit/activity",element:(0,a.jsx)(Ys,{to:"/activity"})}),(0,a.jsx)(L,{path:"audit/runs",element:(0,a.jsx)(Ys,{to:"/activity/runs"})}),(0,a.jsx)(L,{path:"audit/costs",element:(0,a.jsx)(Ys,{to:"/activity/costs"})}),(0,a.jsx)(L,{path:"audit/budgets",element:(0,a.jsx)(Ys,{to:"/activity/budgets"})}),(0,a.jsx)(L,{path:"audit/timeline",element:(0,a.jsx)(Ys,{to:"/activity/timeline"})}),(0,a.jsx)(L,{path:"runs",element:(0,a.jsx)(Ys,{to:"/activity/runs"})}),(0,a.jsx)(L,{path:"costs",element:(0,a.jsx)(Ys,{to:"/activity/costs"})}),(0,a.jsx)(L,{path:"budgets",element:(0,a.jsx)(Ys,{to:"/activity/budgets"})}),(0,a.jsxs)(L,{element:(0,a.jsx)(d6,{}),children:[(0,a.jsx)(L,{path:"board-chat",element:(0,a.jsx)(zB,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(ak,{})})]}),null,(0,a.jsx)(L,{path:"decisions",element:(0,a.jsx)(OB,{})}),(0,a.jsx)(L,{path:"decisions/queues/:key",element:(0,a.jsx)(LB,{})}),t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"inbox",element:(0,a.jsx)(gk,{})}),(0,a.jsx)(L,{path:"inbox/mine",element:(0,a.jsx)(bs,{view:"mine"})}),(0,a.jsx)(L,{path:"inbox/recent",element:(0,a.jsx)(bs,{view:"recent"})}),(0,a.jsx)(L,{path:"inbox/unread",element:(0,a.jsx)(bs,{view:"unread"})}),(0,a.jsx)(L,{path:"inbox/blocked",element:(0,a.jsx)(bs,{view:"blocked"})}),(0,a.jsx)(L,{path:"inbox/all",element:(0,a.jsx)(bs,{view:"everything"})}),(0,a.jsx)(L,{path:"inbox/new",element:(0,a.jsx)(bs,{view:"mine"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"inbox",element:(0,a.jsx)(gk,{})}),(0,a.jsx)(L,{path:"inbox/mine",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/recent",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/unread",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/blocked",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/all",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/new",element:(0,a.jsx)(Ve,{to:"/inbox/mine",replace:!0})})]}),(0,a.jsx)(L,{path:"inbox/requests",element:(0,a.jsx)(yK,{})}),(0,a.jsx)(L,{path:"u/:userSlug",element:(0,a.jsx)(IB,{})}),(0,a.jsx)(L,{path:"design-guide",element:(0,a.jsx)(nK,{})}),(0,a.jsx)(L,{path:"instance/settings/adapters",element:(0,a.jsx)(dk,{})}),(0,a.jsx)(L,{path:":pluginRoutePath/*",element:(0,a.jsx)(fk,{})}),(0,a.jsx)(L,{path:"*",element:(0,a.jsx)(PA,{scope:"board"})})]})}r(SK,"boardRoutes");function hk({credentialSource:e="wardmote_vault"}={}){const t=hn(),s=new URLSearchParams(t.search),{enabled:l,githubEnabled:c}=C0();return WT(s,{chatConnectorsEnabled:l,githubReviewBotsEnabled:c})?(0,a.jsx)(zA,{credentialSource:e}):(0,a.jsx)(Ve,{to:"/apps",replace:!0})}r(hk,"AppsConnectEntryRoute");function gk(){const{enabled:e}=Jf();return e?(0,a.jsx)(bs,{view:jI(zj())}):(0,a.jsx)(Ve,{to:`/inbox/${zj()}`,replace:!0})}r(gk,"InboxRootRedirect");function bs({view:e}){const t=hn(),s=new URLSearchParams(t.search);return s.set(hI,e),(0,a.jsx)(Ve,{to:`/issues?${s.toString()}${t.hash}`,replace:!0})}r(bs,"TaskViewRedirect");function $A(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=bt(),{companyPrefix:c,skillId:u}=Ps();if(l)return null;const p=(c?t.find(f=>f.issuePrefix.toUpperCase()===c.toUpperCase()):null)??s??t[0]??null;return!p||!u?(0,a.jsx)(Ve,{to:"/skills/studio",replace:!0}):(0,a.jsx)(Ve,{to:`/${p.issuePrefix}/skills/studio/${encodeURIComponent(u)}${e.search}${e.hash}`,replace:!0})}r($A,"LegacySkillStudioRedirect");function qr(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=bt(),{companyPrefix:c}=Ps(),{hidden:u}=gr();if(l)return(0,a.jsx)(Ds,{});const p=(c?t.find(h=>h.issuePrefix.toUpperCase()===c.toUpperCase()):null)??s??t[0]??null;if(!p)return bx({pathname:e.pathname,hasCompanies:!1})?(0,a.jsx)(Ve,{to:"/onboarding",replace:!0}):(0,a.jsx)(jx,{});const f=uT(dT(`${e.pathname}${e.search}${e.hash}`),u);return(0,a.jsx)(Ve,{to:`/${p.issuePrefix}${f}`,replace:!0})}r(qr,"LegacySettingsRedirect");function xk(){const{tab:e}=Ps();return(0,a.jsx)(Ve,{to:UA(e),replace:!0})}r(xk,"LegacyToolsSettingsRedirect");function bk(){const{tab:e}=Ps();return(0,a.jsx)(Ve,{to:UA(e),replace:!0})}r(bk,"LegacyToolsRedirect");function UA(e){return e?e==="applications"||e==="connections"||e==="overview"||e==="examples"||e==="runtime"||e==="audit"?"/apps":e==="policies"?"/apps/advanced/profiles":`/apps/advanced/${e}`:"/apps/advanced/profiles"}r(UA,"legacyToolsRedirectTarget");function BA(){const{companies:e}=bt(),{openOnboarding:t}=Us(),{t:s}=ON(),{onboardingOpen:l,onboardingRouteDismissed:c}=Ff(),{companyPrefix:u}=Ps(),p=u?e.find(g=>g.issuePrefix.toUpperCase()===u.toUpperCase())??null:null;if(mU({onboardingOpen:l,routeDismissed:c}))return null;const f=p?`Add another agent to ${p.name}`:e.length>0?"Create another organization":"Create your first organization",h=p?"Run onboarding again to add an agent and a starter task for this organization.":e.length>0?"Run onboarding again to create another organization and seed its first agent.":"Get started by creating an organization and your first agent.";return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsxs)("div",{className:"rounded-lg border border-line bg-bg-2 p-6",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:f}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:h}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(oe,{onClick:r(()=>p?t({initialStep:jA(),companyId:p.id}):t(),"onClick"),children:p?"Add Agent":"Start Onboarding"})})]})})}r(BA,"OnboardingRoutePage");function NK(){const{companies:e,selectedCompany:t,loading:s}=bt(),l=hn();if(s)return(0,a.jsx)(Ds,{});const c=t??e[0]??null;return c?(0,a.jsx)(Ve,{to:`/${c.issuePrefix}/dashboard`,replace:!0}):bx({pathname:l.pathname,hasCompanies:!1})?(0,a.jsx)(Ve,{to:"/onboarding",replace:!0}):(0,a.jsx)(jx,{})}r(NK,"CompanyRootRedirect");function vk(){const{cardId:e}=Ps(),t=yI(),s=t?`/${t}`:"";return(0,a.jsx)(Ve,{to:`${s}/status${e?`/${e}`:""}`,replace:!0})}r(vk,"StatusCardsLegacyRedirect");function Ys({to:e,forceAgentMode:t=!1}){const s=hn(),l=new URLSearchParams(s.search);t&&l.set("mode","agents");const c=l.toString();return(0,a.jsx)(Ve,{to:`${e}${c?`?${c}`:""}${s.hash}`,replace:!0})}r(Ys,"AuditCompatibilityRedirect");function Xe(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=bt();if(l)return(0,a.jsx)(Ds,{});const c=s??t[0]??null;return c?(0,a.jsx)(Ve,{to:`/${c.issuePrefix}${e.pathname}${e.search}${e.hash}`,replace:!0}):bx({pathname:e.pathname,hasCompanies:!1})?(0,a.jsx)(Ve,{to:"/onboarding",replace:!0}):(0,a.jsx)(jx,{})}r(Xe,"UnprefixedBoardRedirect");function jx(){const{openOnboarding:e}=Us(),{t}=ON();return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsxs)("div",{className:"rounded-lg border border-line bg-bg-2 p-6",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:t("app.noCompanies.title",{defaultValue:"Create your first organization"})}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:t("app.noCompanies.description",{defaultValue:"Get started by creating an organization."})}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(oe,{onClick:r(()=>e(),"onClick"),children:t("app.noCompanies.newCompany",{defaultValue:"New Organization"})})})]})})}r(jx,"NoCompaniesStartPage");function CK(){const{enabled:e}=Jf();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:(0,a.jsxs)(UE,{children:[(0,a.jsx)(L,{path:"auth",element:(0,a.jsx)(pK,{})}),(0,a.jsx)(L,{path:"board-claim/:token",element:(0,a.jsx)(mK,{})}),(0,a.jsx)(L,{path:"mcp-connect/:id",element:(0,a.jsx)(pk,{})}),(0,a.jsx)(L,{path:"dot-connect/:id",element:(0,a.jsx)(pk,{agentPairingOnly:!0})}),(0,a.jsx)(L,{path:"mcp-device",element:(0,a.jsx)(gK,{})}),(0,a.jsx)(L,{path:"assistant-connections",element:(0,a.jsx)(xK,{})}),(0,a.jsx)(L,{path:"cli-auth/:id",element:(0,a.jsx)(bK,{})}),(0,a.jsx)(L,{path:"invite/:token",element:(0,a.jsx)(vK,{})}),(0,a.jsx)(L,{path:"s/:token",element:(0,a.jsx)(mk,{})}),(0,a.jsx)(L,{path:"s/:token/issues/:issueId",element:(0,a.jsx)(mk,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(ek,{allowMembershipRequest:!0}),children:(0,a.jsx)(L,{path:"chat-identity/confirm",element:(0,a.jsx)(GB,{})})}),(0,a.jsx)(L,{path:"tests/perf/long-thread",element:(0,a.jsx)(wB,{})}),(0,a.jsx)(L,{path:"ux-lab/bootstrap-setup",element:(0,a.jsx)(UB,{})}),(0,a.jsx)(L,{path:"ux-lab/responsible-user-denial",element:(0,a.jsx)(BB,{})}),(0,a.jsx)(L,{path:"ux-lab/cross-issue-collaboration",element:(0,a.jsx)(KB,{})}),(0,a.jsxs)(L,{element:(0,a.jsx)(ek,{}),children:[(0,a.jsx)(L,{index:!0,element:(0,a.jsx)(NK,{})}),(0,a.jsx)(L,{path:"onboarding",element:(0,a.jsx)(BA,{})}),(0,a.jsx)(L,{path:"instance",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"instance/settings",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"instance/settings/*",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"companies",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"dashboard",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"inbox/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"issues",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"tasks",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"tasks/new",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"issues/:issueId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"routines",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"routines/:routineId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"review-queue",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"learnings",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"cases",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"cases/:caseIdentifier",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pixels-office",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status/:cardId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status-cards",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status-cards/:cardId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/add",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/settings",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/items/:caseId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/cases/:caseId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"audit",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"audit/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"activity",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"activity/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"runs",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"costs",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"budgets",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"decisions",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"u/:userSlug",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/studio",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/studio/new",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/studio/:skillId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/:skillId/studio",element:(0,a.jsx)($A,{})}),(0,a.jsx)(L,{path:"skills/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"settings",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"settings/*",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"agents",element:(0,a.jsx)(Xe,{})}),LA.map(t=>(0,a.jsx)(L,{path:`agents/${t}`,element:(0,a.jsx)(Xe,{})},t)),(0,a.jsx)(L,{path:"agents/new",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"agents/:agentId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"agents/:agentId/:tab",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"agents/:agentId/runs/:runId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/overview",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues/:filter",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces/:workspaceId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/configuration",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"workspaces",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"terminal",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/services",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/configuration",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/runtime-logs",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/issues",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/routines",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:":companyPrefix",element:(0,a.jsx)(o6,{}),children:SK(e)}),(0,a.jsx)(L,{path:"*",element:(0,a.jsx)(PA,{scope:"global"})})]})]})}),(0,a.jsx)(J6,{}),(0,a.jsx)(S8,{})]})}r(CK,"App");var AK=class extends x.Component{static{r(this,"AppErrorBoundary")}state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}componentDidCatch(e,t){AA(e,{boundary:"app",componentStack:t.componentStack})}render(){const{error:e}=this.state;return e?(0,a.jsxs)("div",{className:"mx-auto flex min-h-screen max-w-2xl flex-col justify-center space-y-4 px-4 py-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-lg font-semibold",children:"Wardmote hit an error"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Something went wrong while running the app. Reloading usually fixes this."})]}),(0,a.jsx)("pre",{className:"overflow-auto rounded-md border border-bad/30 bg-bad/10 px-3 py-2 text-xs text-bad whitespace-pre-wrap",children:e.message}),(0,a.jsx)("div",{children:(0,a.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md border border-line-strong bg-bg px-3 py-1.5 text-sm font-medium shadow-sm hover:bg-bg-3 hover:text-ink",onClick:r(()=>window.location.reload(),"onClick"),children:"Reload page"})})]}):this.props.children}};function _K(){const{data:e}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),t=e?.sentryDsn,s=e?.sentryEnvironment??void 0;return(0,x.useEffect)(()=>{if(t)return XU(t,s),()=>{ZU()}},[t,s]),null}r(_K,"SentryGate");function EK(){let e;return{promise:new Promise(t=>{e=t}),resolve:e}}r(EK,"createDeferred");function IK(e,t=300){const s=new Map;let l=null,c=null;const u=r(async()=>{l!==null&&(clearTimeout(l),l=null);const h=c;if(c=null,s.size===0){h?.resolve();return}const g=[...s.values()];s.clear();try{await Promise.all(g.map(v=>e.invalidateQueries(Af().visible?v:{...v,refetchType:"none"})))}finally{h?.resolve()}},"flush");return{schedule:r(h=>(s.set(TK(h),h),c===null&&(c=EK()),l===null&&(l=setTimeout(()=>{u()},t)),c.promise),"schedule"),flush:u,dispose:r(()=>{l!==null&&(clearTimeout(l),l=null),s.clear(),c?.resolve(),c=null},"dispose")}}r(IK,"createInvalidationBatcher");var yk=0;function TK(e){if(typeof e.predicate=="function")return`__predicate__:${yk+=1}`;try{return JSON.stringify([e.queryKey??null,e.refetchType??null,e.exact??null,e.type??null])}catch{return`__nonserializable__:${yk+=1}`}}r(TK,"serializeFilters");function RK(e,t){return new Proxy(e,{get(s,l){if(l==="invalidateQueries")return u=>t.schedule(u??{});const c=Reflect.get(s,l,s);return typeof c=="function"?c.bind(s):c}})}r(RK,"createCoalescingQueryClient");function MK(e,t){if(!e)return e;const s=e.filter(l=>l.id!==t);return s.length===e.length?e:s}r(MK,"removeRunFromList");function DK(e,t,s){if(!e)return{next:e,present:!1};let l=!1,c=!1;const u=e.map(p=>p.id!==t||(l=!0,p.status===s)?p:(c=!0,{...p,status:s}));return{next:c?u:e,present:l}}r(DK,"patchRunStatusInList");function OK(e,t){if(!e)return e;const s=e.filter(l=>l.id!==t);return s.length===e.length?e:s}r(OK,"removeLiveRunById");function LK(e,t){return!e||e.executionRunId!==t?e:{...e,executionRunId:null,executionAgentNameKey:null,executionLockedAt:null}}r(LK,"clearIssueExecutionRun");var zK=3e4,PK=["status","priority","title","assigneeAgentId","assigneeUserId","projectId","parentId"],$K=new Set(["issue.read_marked","issue.read_unmarked","issue.inbox_archived","issue.inbox_unarchived"]);function Jg(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}r(Jg,"isRecord");function wx(e){return Jg(e)&&Array.isArray(e.pages)}r(wx,"isInfiniteIssueData");function UK(e){return Array.isArray(e)?e.length:wx(e)?e.pages.reduce((t,s)=>t+(Array.isArray(s)?s.length:0),0):0}r(UK,"issueListRowCount");function BK(e){const t=e.state.data;return wx(t)||UK(t)>=100}r(BK,"isLargeIssueListQuery");function KK(e,t,s){const l={},c=Jg(t?.changes)?t.changes:null;if(e==="issue.updated"&&c)for(const u of PK){const p=c[u];!Jg(p)||p.updated===!0||!("to"in p)||(l[u]=p.to)}return s&&e&&!$K.has(e)&&!Number.isNaN(Date.parse(s))&&(l.lastActivityAt=s),l}r(KK,"readIssueListPatchFromActivity");function qK(e,t){let s=null;for(const[l,c]of Object.entries(t)){if(l==="lastActivityAt"){const u=e.lastActivityAt?new Date(e.lastActivityAt).getTime():0;if(new Date(c).getTime()<=u)continue}else if(!(l in e)||e[l]===c)continue;s??={...e},s[l]=c}return s??e}r(qK,"patchIssueRow");function jk(e,t,s){const l=e.findIndex(p=>p?.id===t);if(l<0)return e;const c=qK(e[l],s);if(c===e[l])return e;const u=e.slice();return u[l]=c,u}r(jk,"patchIssueRows");function FK(e,t,s){if(Array.isArray(e))return jk(e,t,s);if(!wx(e))return e;let l=!1;const c=e.pages.map(u=>{if(!Array.isArray(u))return u;const p=jk(u,t,s);return p!==u&&(l=!0),p});return l?{...e,pages:c}:e}r(FK,"patchIssueListData");function HK(e,t,s,l){if(Object.keys(l).length===0)return 0;let c=0;for(const[u,p]of e.getQueriesData({queryKey:$.issues.list(t)})){const f=FK(p,s,l);f!==p&&(e.setQueryData(u,f),c+=1)}return c}r(HK,"patchIssueInListCaches");function VK(e,t){for(const s of e.getQueryCache().findAll({queryKey:$.issues.list(t)}))e.invalidateQueries({queryKey:s.queryKey,exact:!0,...BK(s)?{refetchType:"none"}:{}})}r(VK,"invalidateIssueListsForActivity");function WK(e,t){const s=r(l=>l.state.isInvalidated,"predicate");return Promise.all([e.refetchQueries({queryKey:$.issues.list(t),type:"active",predicate:s}),e.refetchQueries({queryKey:$.heartbeats(t),type:"active",predicate:s})])}r(WK,"refreshInvalidatedLiveLists");function ao(e){return typeof e=="string"&&e.length>0?e:null}r(ao,"readString$1");function QK(e){return e.length===3&&e[0]==="issues"&&e[2]==="agent-todo"}r(QK,"isAgentTodoQueryKey");function GK(e){if(e.type!=="heartbeat.run.event")return null;const t=e.payload??{};if(t.eventType!=="agent.todo")return null;const s=ao(t.runId),l=ao(t.agentId),c=ao(t.issueId),u=t.seq;if(!s||!l||!c||typeof u!="number"||!Number.isInteger(u))return null;const p=NE(t.payload);return p?{...p,runId:s,agentId:l,issueId:c,seq:u,createdAt:ao(t.lastEventAt)??e.createdAt,runStatus:"running"}:null}r(GK,"readAgentTodoSnapshotFromLiveEvent");function wk(e,t){if(t.type==="heartbeat.run.status"){const l=t.payload??{},c=ao(l.runId),u=ao(l.status);if(!c||!u)return;e.setQueriesData({predicate:r(p=>QK(p.queryKey),"predicate")},p=>p&&p.runId===c&&p.runStatus!==u?{...p,runStatus:u}:p);return}const s=GK(t);s&&e.setQueryData($.issues.agentTodo(s.issueId),l=>l&&l.runId===s.runId&&l.seq>=s.seq?l:s)}r(wk,"applyAgentTodoLiveEvent");function YK(e){const t=e.trim().toLowerCase();return t==="0.0.0.0"||t==="::"||t==="[::]"}r(YK,"isWildcardHost");function XK(e=window.location){return YK(e.hostname)?e.port?`localhost:${e.port}`:"localhost":e.host}r(XK,"browserReachableHost");function ZK(e,t=window.location){const s=t.protocol==="https:"?"wss":"ws",l=e.startsWith("/")?e:`/${e}`;return`${s}://${XK(t)}${l}`}r(ZK,"buildSameOriginWebSocketUrl");function JK(e){try{return new WebSocket(e)}catch{return null}}r(JK,"tryCreateWebSocket");var eq="/pwa-192x192.png",tq="/pwa-monochrome-512x512.png";function kx(){return typeof window<"u"&&"Notification"in window}r(kx,"notificationsSupported");function Sx(){return kx()?Notification.permission:"unsupported"}r(Sx,"notificationPermission");async function nq(){return kx()?Notification.permission!=="default"?Notification.permission:Notification.requestPermission():"unsupported"}r(nq,"requestNotificationPermission");function aq(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window}r(aq,"pushSupported");function zY(e=typeof navigator>"u"?void 0:navigator){return e?(/iPad|iPhone|iPod/.test(e.userAgent)||e.platform==="MacIntel"&&(e.maxTouchPoints??0)>1)&&e.standalone!==!0:!1}r(zY,"isIosWithoutHomeScreenInstall");async function KA(){if(typeof navigator>"u"||!("serviceWorker"in navigator))return null;try{return await navigator.serviceWorker.getRegistration()??null}catch{return null}}r(KA,"getServiceWorkerRegistration");var qA="wardmote.notifications.seen.v1",sq="wardmote.notifications.claim",iq=6e5,rq=200,lq=new Map;function oq(){let e=null;try{e=typeof localStorage>"u"?null:localStorage}catch{e=null}const t=typeof navigator<"u"&&navigator.locks?{request:r((s,l)=>navigator.locks.request(s,l),"request")}:null;return{storage:e,locks:t,now:r(()=>Date.now(),"now"),memory:lq}}r(oq,"defaultEnv");function cq(e){const t=e.storage?.getItem(qA);if(!t)return new Map(e.memory);try{const s=JSON.parse(t),l=new Map(e.memory);for(const[c,u]of Object.entries(s))typeof u=="number"&&l.set(c,u);return l}catch{return new Map(e.memory)}}r(cq,"readSeen");function qh(e,t){const s=t.now(),l=cq(t);for(const[u,p]of l)s-p>iq&&l.delete(u);if(l.has(e))return!1;l.set(e,s);const c=[...l.entries()].sort((u,p)=>p[1]-u[1]).slice(0,rq);t.memory.clear();for(const[u,p]of c)t.memory.set(u,p);return uq(t,c),!0}r(qh,"claimInsideLock");function uq(e,t){try{e.storage?.setItem(qA,JSON.stringify(Object.fromEntries(t)))}catch{return}}r(uq,"writeSeen");async function dq(e,t=oq()){if(!t.locks)return qh(e,t);try{return await t.locks.request(sq,()=>qh(e,t))}catch{return qh(e,t)}}r(dq,"claimNotificationKey");var Fh="paperclip-notifications";function Hh(e){return new Promise((t,s)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>s(e.error)})}r(Hh,"settle");function fq(e){return new Promise((t,s)=>{e.oncomplete=()=>t(),e.onerror=()=>s(e.error),e.onabort=()=>s(e.error)})}r(fq,"committed");async function pq(e,t){if(typeof indexedDB.databases!="function"||!(await indexedDB.databases()).some(c=>c.name===Fh))return 0;const s=await Hh(indexedDB.open(Fh));let l=0;try{if(s.objectStoreNames.contains(t)){const c=await Hh(s.transaction(t,"readonly").objectStore(t).getAll()),u=new Set(await Hh(e.transaction(t,"readonly").objectStore(t).getAllKeys())),p=c.filter(f=>!u.has(f.kind));if(p.length>0){const f=e.transaction(t,"readwrite"),h=f.objectStore(t);for(const g of p)h.put(g);await fq(f),l=p.length}}}finally{s.close()}return indexedDB.deleteDatabase(Fh),l}r(pq,"moveRetiredCustomSounds");var mq="wardmote-notifications",kc="custom-sounds";function hq(e){return e.type.startsWith("audio/")?e.size<=0?{ok:!1,error:"The audio file is empty."}:e.size>524288?{ok:!1,error:"Custom sounds must be 512 KB or smaller."}:{ok:!0}:{ok:!1,error:"Choose an audio file."}}r(hq,"validateCustomSoundFile");function FA(e){return new Promise((t,s)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>s(e.error)})}r(FA,"requestResult");var _d=null;function gq(){if(typeof indexedDB>"u")return Promise.reject(new Error("IndexedDB is unavailable."));if(!_d){const e=indexedDB.open(mq,1);e.onupgradeneeded=()=>{e.result.objectStoreNames.contains(kc)||e.result.createObjectStore(kc,{keyPath:"kind"})},_d=FA(e).then(async t=>(await pq(t,kc).catch(()=>0),t)).catch(t=>{throw _d=null,t})}return _d}r(gq,"openDb");async function Nx(e,t){return FA(t((await gq()).transaction(kc,e).objectStore(kc)))}r(Nx,"withStore");var e0=new Set;function xq(e){return e0.add(e),()=>e0.delete(e)}r(xq,"subscribeCustomSounds");function HA(){for(const e of e0)e()}r(HA,"notifyCustomSoundsChanged");async function PY(e,t){const s=hq(t);if(!s.ok)throw new Error(s.error);const l={kind:e,name:t.name,type:t.type,size:t.size,blob:t,updatedAt:new Date().toISOString()};return await Nx("readwrite",c=>c.put(l)),HA(),l}r(PY,"saveCustomSound");async function bq(e){try{return await Nx("readonly",t=>t.get(e))??null}catch{return null}}r(bq,"loadCustomSound");async function $Y(e){await Nx("readwrite",t=>t.delete(e)),HA()}r($Y,"removeCustomSound");var vq=[{id:"confirmation",label:"Confirmation"},{id:"question",label:"Question"},{id:"glass",label:"Glass"},{id:"bong",label:"Bong"},{id:"maximize",label:"Rise"},{id:"pluck",label:"Pluck"},{id:"error",label:"Alert"},{id:"drop",label:"Drop"},{id:"select",label:"Select"},{id:"open",label:"Open"}],UY="custom",BY="none",t0={approval:"confirmation",question:"question",comment:"pluck",assignment:"maximize",review:"glass",run_failed:"error",join_request:"bong",disk_space:"drop"},KY={approval:"Approvals",question:"Agent questions",comment:"Comments",assignment:"Assignments",review:"Ready for review",run_failed:"Failed runs",join_request:"Join requests",disk_space:"Low disk space"},VA=new Set(vq.map(e=>e.id));function yq(e){return typeof e=="string"&&(VA.has(e)||e==="custom"||e==="none")}r(yq,"isKnownSoundId");function jq(e){return VA.has(e)}r(jq,"isLibrarySoundId");function kk(e,t){return`/sounds/${e}.${t}`}r(kk,"librarySoundUrl");var n0=new Map,vf=new Map,Sk=!1,Ed=null;function WA(){return typeof Audio<"u"}r(WA,"audioSupported");function Nk(){return Ed||(Ed=new Audio().canPlayType('audio/ogg; codecs="vorbis"')?"ogg":"mp3",Ed)}r(Nk,"libraryFormat");function QA(e){let t=n0.get(e);return t||(t=new Audio,t.preload="auto",t.src=e,n0.set(e,t)),t}r(QA,"audioFor");function wq(){for(const e of vf.values())e.then(t=>{t&&(n0.delete(t),URL.revokeObjectURL(t))});vf.clear()}r(wq,"revokeCustomSounds");function kq(e){Sk||(Sk=!0,xq(wq));let t=vf.get(e);return t||(t=bq(e).then(s=>s?URL.createObjectURL(s.blob):null),vf.set(e,t)),t}r(kq,"customSoundUrl");async function GA(e,t){if(t==="none")return null;if(t==="custom"){const s=await kq(e);return s||kk(t0[e],Nk())}return kk(jq(t)?t:t0[e],Nk())}r(GA,"resolveSoundUrl");async function Sq(e,t,s){if(!WA())return!1;const l=await GA(e,t);if(!l)return!1;const c=QA(l);c.volume=Math.min(1,Math.max(0,s)),c.currentTime=0;try{return await c.play(),!0}catch{return!1}}r(Sq,"playSound");function Nq(e,t){return Sq(e,t.kinds[e].soundId,t.volume)}r(Nq,"playKindSound");function Ck(e){if(!(!WA()||!e.enabled))for(const[t,s]of Object.entries(e.kinds))s.enabled&&GA(t,s.soundId).then(l=>{l&&QA(l)})}r(Ck,"preloadNotificationSounds");var a0={getWebPushConfig:r(()=>je.get("/notifications/web-push/config"),"getWebPushConfig"),upsertWebPushSubscription:r(e=>je.put("/notifications/web-push/subscription",e),"upsertWebPushSubscription"),deleteWebPushSubscription:r(e=>je.deleteWithBody("/notifications/web-push/subscription",e),"deleteWebPushSubscription"),sendWebPushTest:r(()=>je.post("/notifications/web-push/test",{}),"sendWebPushTest")},YA="wardmote.notifications.v1",Cq=.6;function s0(){const e={};for(const t of y0)e[t]={enabled:!0,soundId:t0[t]};return{enabled:!0,volume:Cq,pushEnabled:!0,kinds:e}}r(s0,"defaultNotificationSettings");function Vh(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}r(Vh,"asRecord");function XA(e){const t=s0(),s=Vh(e);if(!s)return t;const l=typeof s.volume=="number"&&Number.isFinite(s.volume)?Math.min(1,Math.max(0,s.volume)):t.volume,c=Vh(s.kinds)??{},u={...t.kinds};for(const p of y0){const f=Vh(c[p]);f&&(u[p]={enabled:typeof f.enabled=="boolean"?f.enabled:t.kinds[p].enabled,soundId:yq(f.soundId)?f.soundId:t.kinds[p].soundId})}return{enabled:typeof s.enabled=="boolean"?s.enabled:t.enabled,volume:l,pushEnabled:typeof s.pushEnabled=="boolean"?s.pushEnabled:t.pushEnabled,kinds:u}}r(XA,"normalizeNotificationSettings");function yf(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}r(yf,"storage");function Aq(){const e=yf()?.getItem(YA);if(!e)return s0();try{return XA(JSON.parse(e))}catch{return s0()}}r(Aq,"readStored");var jf,mc=null,Bd=new Set,Id=!1;function Zr(){const e=yf()?.getItem("wardmote.notifications.v1")??null;return mc&&e===jf||(jf=e,mc=Aq()),mc}r(Zr,"getNotificationSettings");function ZA(){for(const e of Bd)e()}r(ZA,"notify");function JA(e){const t=XA(typeof e=="function"?e(Zr()):e);try{yf()?.setItem(YA,JSON.stringify(t))}catch{jf=void 0}return mc=t,jf=yf()?.getItem("wardmote.notifications.v1")??null,ZA(),t}r(JA,"setNotificationSettings");function qY(e,t){return JA(s=>({...s,kinds:{...s.kinds,[e]:{...s.kinds[e],...t}}}))}r(qY,"updateKindSettings");function _q(e){return e.enabled?y0.filter(t=>e.kinds[t].enabled):[]}r(_q,"enabledNotificationKinds");function Ak(e){e.key!==null&&e.key!=="wardmote.notifications.v1"||ZA()}r(Ak,"onStorage");function e2(e){return Bd.add(e),!Id&&typeof window<"u"&&(Id=!0,window.addEventListener("storage",Ak)),()=>{Bd.delete(e),Bd.size===0&&Id&&typeof window<"u"&&(Id=!1,window.removeEventListener("storage",Ak))}}r(e2,"subscribeNotificationSettings");function FY(){return(0,x.useSyncExternalStore)(e2,Zr,Zr)}r(FY,"useNotificationSettings");var Sc={status:"unknown",error:null},i0=new Set,r0=null,_k=Promise.resolve();function Ek(e){if(!(e.status===Sc.status&&e.error===Sc.error)){Sc=e;for(const t of i0)t()}}r(Ek,"setPushState");function Ik(){return Sc}r(Ik,"getPushState");function Eq(){return Sc.status==="active"}r(Eq,"hasActivePushSubscription");function Iq(e){return i0.add(e),()=>i0.delete(e)}r(Iq,"subscribePushState");function HY(){return(0,x.useSyncExternalStore)(Iq,Ik,Ik)}r(HY,"usePushState");function t2(e){const t=e.padEnd(e.length+(4-e.length%4)%4,"=").replace(/-/g,"+").replace(/_/g,"/"),s=atob(t),l=new Uint8Array(new ArrayBuffer(s.length));for(let c=0;c<s.length;c+=1)l[c]=s.charCodeAt(c);return l}r(t2,"urlBase64ToUint8Array");function Tq(e,t){const s=e.options?.applicationServerKey;if(!s)return!0;const l=t2(t),c=new Uint8Array(s);return c.length===l.length&&c.every((u,p)=>u===l[p])}r(Tq,"sameApplicationServerKey");async function Tk(e){await a0.deleteWebPushSubscription({endpoint:e.endpoint}).catch(()=>{}),await e.unsubscribe().catch(()=>!1),r0=null}r(Tk,"forgetSubscription");async function Rq(e,t){if(!aq())return{status:"unsupported",error:null};const s=await KA();if(!s)return{status:"unsupported",error:null};let l=await s.pushManager.getSubscription();if(!(e.enabled&&e.pushEnabled))return l&&await Tk(l),{status:"off",error:null};if(Sx()!=="granted")return{status:"permission",error:null};const c=await a0.getWebPushConfig();if(!c.enabled||!c.publicKey)return{status:"server-disabled",error:null};l&&!Tq(l,c.publicKey)&&(await Tk(l),l=null),l||(l=await s.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t2(c.publicKey)}));const u=l.toJSON(),p=u.keys?.p256dh,f=u.keys?.auth;if(!p||!f)return{status:"error",error:"The browser returned an incomplete push subscription."};const h=_q(e),g=[t,l.endpoint,...h].join("|");return g!==r0&&(await a0.upsertWebPushSubscription({endpoint:l.endpoint,keys:{p256dh:p,auth:f},kinds:h}),r0=g),{status:"active",error:null}}r(Rq,"reconcile");function l0(e,t){const s=_k.then(async()=>{try{const l=await Rq(e,t);return Ek(l),l}catch(l){const c={status:"error",error:l instanceof Error?l.message:"Push subscription failed."};return Ek(c),c}});return _k=s.catch(()=>{}),s}r(l0,"syncPushSubscription");function n2(e,t){return t.enabled&&t.kinds[e.kind]?.enabled===!0}r(n2,"kindEnabled");function Mq(e){const{payload:t,userId:s,settings:l}=e;return!s||!t.recipientUserIds.includes(s)||!n2(t.notification,l)?"none":e.visible?"sound":e.pushActive?"none":"os"}r(Mq,"decideLiveNotification");function Dq(e){return!e.visible||!n2(e.notification,e.settings)?"none":"sound"}r(Dq,"decideServiceWorkerNotification");async function Oq(e){if(Sx()!=="granted")return;const t={body:e.body,tag:e.key,data:{url:e.url},icon:eq,badge:tq},s=await KA();if(s){await s.showNotification(e.title,t);return}new Notification(e.title,t)}r(Oq,"showOsNotification");var a2={claim:r(e=>dq(e),"claim"),playSound:r((e,t)=>Nq(e.kind,t),"playSound"),showOsNotification:Oq};async function s2(e,t,s,l){return e==="none"?e:await l.claim(t.key)?(e==="sound"?await l.playSound(t,s):await l.showOsNotification(t),e):"none"}r(s2,"perform");function Lq(e,t,s=a2,l={}){const c=l.settings??Zr();return s2(Mq({payload:e,userId:t,settings:c,visible:l.visible??Af().visible,pushActive:l.pushActive??Eq()}),e.notification,c,s)}r(Lq,"deliverLiveNotification");function zq(e,t=a2,s={}){const l=s.settings??Zr();return s2(Dq({notification:e,settings:l,visible:s.visible??Af().visible}),e,l,t)}r(zq,"deliverServiceWorkerNotification");function i2(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.key=="string"&&typeof t.kind=="string"&&typeof t.title=="string"?t:null}r(i2,"readNotification");function Pq(e){if(!e||typeof e!="object")return null;const t=e,s=i2(t.notification);return!s||!Array.isArray(t.recipientUserIds)?null:{notification:s,recipientUserIds:t.recipientUserIds.filter(l=>typeof l=="string")}}r(Pq,"readNotificationCreatedPayload");function $q(e){if(!e||typeof e!="object")return null;const t=e;if(t.type==="wardmote.notification"){const s=i2(t.notification);return s?{type:"notification",notification:s}:null}return t.type==="wardmote.navigate"&&typeof t.url=="string"&&t.url.startsWith("/")?{type:"navigate",url:t.url}:null}r($q,"readServiceWorkerMessage");var Uq=1e4,Bq=3,Kq=2e3,qq=3e5,Fq=2e3,Hq=15e3,Vq=0,Wq=1,Bc=new Set(["succeeded","interrupted","failed","cancelled","timed_out"]),r2=(0,x.createContext)(null);function Qq(e,t,s){if(s.companyId===t)for(const l of Array.from(e))try{l(s)}catch{}}r(Qq,"dispatchLiveEventToSubscribers");function VY(e){const t=(0,x.useContext)(r2),s=(0,x.useRef)(e);(0,x.useEffect)(()=>{s.current=e}),(0,x.useEffect)(()=>{if(t)return t.subscribe(l=>{s.current(l)})},[t])}r(VY,"useCompanyLiveEvent");function be(e){return typeof e=="string"&&e.length>0?e:null}r(be,"readString");function al(e){return typeof e!="object"||e===null||Array.isArray(e)?null:e}r(al,"readRecord");function wf(e){return e.slice(0,8)}r(wf,"shortId");function l2(e,t,s){const l=e.getQueryData($.agents.list(t))?.find(c=>c.id===s);return l?.name?l.name:e.getQueryData($.agents.detail(s))?.name??null}r(l2,"resolveAgentName");function Gq(e,t,s){const l=e.getQueryData($.access.companyUserDirectory(t));if(!l)return null;const c=l.users.find(u=>u.principalId===s);return c?.user?.name?.trim()||c?.user?.email?.trim()||null}r(Gq,"resolveUserName");function Fr(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}r(Fr,"truncate");function Yq(e,t,s,l){return s==="agent"&&l?l2(e,t,l)??`Agent ${wf(l)}`:s==="system"?"System":s==="user"&&l?Gq(e,t,l)??(l==="board"||l==="local-board"?"Board":`User ${wf(l)}`):s==="plugin"?"Plugin":"Unknown actor"}r(Yq,"resolveActorLabel");function Cx(e,t,s,l){const c=new Set([s]),u=e.getQueryData($.issues.detail(s)),p=e.getQueryData($.issues.list(t)),f=be(l?.identifier)??be(l?.issueIdentifier);f&&c.add(f),u?.id&&c.add(u.id),u?.identifier&&c.add(u.identifier);const h=p?.find(g=>!!(g.id===s||g.identifier&&g.identifier===s||f&&g.identifier===f));return h?.id&&c.add(h.id),h?.identifier&&c.add(h.identifier),Array.from(c)}r(Cx,"resolveIssueQueryRefs");function Xq(e,t,s,l){const c=Cx(e,t,s,l),u=c.map(v=>e.getQueryData($.issues.detail(v))).find(v=>!!v),p=e.getQueryData($.issues.list(t))?.find(v=>c.some(y=>v.id===y||v.identifier===y)),f=u??p??null,h=be(l?.identifier)??be(l?.issueIdentifier)??f?.identifier??`Task ${wf(s)}`,g=be(l?.title)??be(l?.issueTitle)??f?.title??null;return{ref:h,title:g,label:g?`${h} - ${Fr(g,72)}`:h,href:`/issues/${f?.identifier??s}`}}r(Xq,"resolveIssueToastContext");function o2(){return!(typeof document>"u"||document.visibilityState!=="visible"||typeof document.hasFocus=="function"&&!document.hasFocus())}r(o2,"isPageForegrounded");function xr(e,t,s){if(!(s?.isForegrounded??o2()))return null;const l=Tf(t).split("/").filter(Boolean);if(!["issues","chats"].includes(l[0])||!l[1])return null;let c=decodeURIComponent(l[1]);if(l[0]==="chats"){const j=e.getQueryData($.auth.session),k=j?.user?.id??j?.session?.userId??null,S=vS(t),N=e.getQueryData($.companies.list(k))?.companies.find(M=>M.issuePrefix.toUpperCase()===S?.toUpperCase());if(!N)return null;const I=e.getQueryData($.agents.list(N.id))?.find(M=>M.id===c||fr(M)===c);if(!I)return null;const C=e.getQueryData($.agentChats.detail(N.id,k,I.id));if(!C)return null;c=C.id}const u=e.getQueryData($.issues.detail(c))??null,p=new Set([c]);u?.id&&p.add(u.id),u?.identifier&&p.add(u.identifier);function f(j,k){const S=e.getQueryData($.issues.activeRun(j)),N=e.getQueryData($.issues.liveRuns(j))??[],I=e.getQueryData($.issues.runs(j))??[];S?.id&&k.add(S.id);for(const C of N)C.id&&k.add(C.id);for(const C of I)C.runId&&k.add(C.runId)}r(f,"collectCachedIssueRunIds");const h=new Set;for(const j of p)f(j,h);const g=new Set(p),v=new Set,y=new Set(h);if(u?.companyId&&u.id){const j=e.getQueryData($.issues.listByDescendantRoot(u.companyId,u.id))??[];for(const k of j)g.add(k.id),k.identifier&&g.add(k.identifier),k.assigneeAgentId&&v.add(k.assigneeAgentId),k.executionRunId&&y.add(k.executionRunId),f(k.id,y),k.identifier&&f(k.identifier,y)}if(u?.companyId){const j=e.getQueryData($.liveRuns(u.companyId))??[];for(const k of j)k.issueId&&g.has(k.issueId)&&y.add(k.id)}return{routeIssueRef:c,issueRefs:p,assigneeAgentId:u?.assigneeAgentId??null,runIds:h,subtreeIssueRefs:g,subtreeAgentIds:v,subtreeRunIds:y}}r(xr,"resolveVisibleIssueRouteContext");function ap(e,t){const s=new Set([e]),l=be(t?.identifier)??be(t?.issueIdentifier);return l&&s.add(l),s}r(ap,"buildIssueRefsForPayload");function sp(e,t){for(const s of e)if(t.has(s))return!0;return!1}r(sp,"overlaps");function Zq(e,t,s,l){const c=be(s.entityType),u=be(s.entityId);if(c!=="issue"||!u)return!1;const p=xr(e,t,l);return p?sp(p.subtreeIssueRefs,ap(u,al(s.details))):!1}r(Zq,"shouldSuppressActivityToastForVisibleIssue");function Jq(e,t,s,l){if(!(l?.isForegrounded??o2()))return!1;const c=Tf(t).match(/^\/agents\/[^/]+\/runs\/([^/]+)/)?.[1];if(c&&decodeURIComponent(c)===be(s.runId))return!0;const u=xr(e,t,l);if(!u)return!1;const p=be(s.issueId);if(p)return u.subtreeIssueRefs.has(p);const f=be(s.runId);if(f)return u.subtreeRunIds.has(f);const h=be(s.agentId);return!!h&&(h===u.assigneeAgentId||u.subtreeAgentIds.has(h))}r(Jq,"shouldSuppressRunStatusToastForVisibleIssue");function Rk(e,t,s,l){const c=xr(e,t,l);if(!c)return!1;const u=be(s.runId),p=be(s.agentId);if(!(u!==null&&c.runIds.has(u)||p&&c.assigneeAgentId&&p===c.assigneeAgentId))return!1;const f=be(s.status);if(u&&f&&Bc.has(f))for(const v of c.issueRefs)e.invalidateQueries({queryKey:$.issues.comments(v)}),e.setQueryData($.issues.liveRuns(v),y=>OK(y,u)),e.setQueryData($.issues.activeRun(v),y=>y?.id===u?null:y),e.setQueryData($.issues.detail(v),y=>LK(y,u));const h=!!f&&Bc.has(f),g=!h&&(l?.liveStatusAlreadyPatched??!1);for(const v of c.issueRefs)e.invalidateQueries({queryKey:$.issues.detail(v)}),e.invalidateQueries({queryKey:$.issues.activity(v)}),e.invalidateQueries({queryKey:$.issues.runs(v)}),l?.runLifecycleEvent&&e.invalidateQueries({queryKey:$.issues.queuedComments(v)}),g||(e.invalidateQueries({queryKey:$.issues.liveRuns(v)}),e.invalidateQueries({queryKey:$.issues.activeRun(v)})),h&&(e.invalidateQueries({queryKey:$.issues.comments(v)}),e.invalidateQueries({queryKey:$.issues.attachments(v)}),e.invalidateQueries({queryKey:$.issues.workProducts(v)}),e.invalidateQueries({queryKey:$.issues.workProductPullRequestRefresh(v)}),e.invalidateQueries({queryKey:["issues","tree-control-state",v]}));return!0}r(Rk,"invalidateVisibleIssueRunQueries");function pc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r(pc,"hasPatchKey");function c2(e,t){return e.id!==t.runId?e:{...e,...pc(t,"message")?{currentStatusMessage:t.message}:{},...pc(t,"updatedAt")?{currentStatusUpdatedAt:t.updatedAt}:{},...pc(t,"currentToolName")?{currentToolName:t.currentToolName}:{},...pc(t,"lastAssistantSnippet")?{lastAssistantSnippet:t.lastAssistantSnippet}:{},...pc(t,"lastEventAt")?{lastEventAt:t.lastEventAt}:{}}}r(c2,"applyRunLiveStatusPatch");function Mk(e,t){if(!e)return e;let s=!1;const l=e.map(c=>c.id!==t.runId?c:(s=!0,c2(c,t)));return s?l:e}r(Mk,"applyRunLiveStatusPatchToArray");function e7(e,t,s){const l=be(e.runId);if(!l)return null;const c={runId:l,agentId:be(e.agentId),issueId:be(e.issueId)};if(s==="heartbeat.run.progress")return c.message=be(e.message),c.updatedAt=be(e.updatedAt)??t,c.currentToolName=be(e.currentToolName),c.lastAssistantSnippet=be(e.lastAssistantSnippet),c.lastEventAt=be(e.lastEventAt)??c.updatedAt,c;if(s==="heartbeat.run.log")return c.lastEventAt=be(e.ts)??t,c;if(s==="heartbeat.run.event"){const u=be(e.message);u&&(c.message=u),c.updatedAt=be(e.updatedAt)??t;const p=be(e.currentToolName);p&&(c.currentToolName=p);const f=be(e.lastAssistantSnippet);return f&&(c.lastAssistantSnippet=f),c.lastEventAt=be(e.lastEventAt)??t,c}return null}r(e7,"readRunLiveStatusPatchFromPayload");var t7=1e3;function n7(e=t7){const t=new Map,s=new Map,l=r(c=>{const u=t.get(c);if(!u){s.delete(c);return}t.delete(c),s.set(c,setTimeout(()=>l(c),e)),u.apply(u.patch)},"release");return{submit:r((c,u)=>{if(s.has(c.runId)){t.set(c.runId,{patch:c,apply:u});return}s.set(c.runId,setTimeout(()=>l(c.runId),e)),u(c)},"submit"),dispose:r(()=>{for(const c of s.values())clearTimeout(c);s.clear(),t.clear()},"dispose")}}r(n7,"createRunLogPatchThrottle");function a7(e,t,s,l,c){let u=!1;e.setQueryData($.liveRuns(t),h=>{const g=Mk(h,l);return g!==h&&(u=!0),g});const p=new Set;if(l.issueId)for(const h of Cx(e,t,l.issueId,null))p.add(h);const f=xr(e,s,c);if(f&&(f.runIds.has(l.runId)||l.issueId&&f.issueRefs.has(l.issueId)||l.agentId&&f.assigneeAgentId&&l.agentId===f.assigneeAgentId))for(const h of f.issueRefs)p.add(h);for(const h of p)e.setQueryData($.issues.activeRun(h),g=>!g||g.id!==l.runId?g:(u=!0,c2(g,l))),e.setQueryData($.issues.liveRuns(h),g=>{const v=Mk(g,l);return v!==g&&(u=!0),v});return u}r(a7,"applyRunLiveStatusPatchToCaches");function s7(e,t,s,l){const c=xr(e,t,l);if(!c)return!1;const u=be(s.agentId);return!!u&&(u===c.assigneeAgentId||c.subtreeAgentIds.has(u))}r(s7,"shouldSuppressAgentStatusToastForVisibleIssue");function i7(e,t,s,l){const c=be(s.entityType),u=be(s.entityId),p=be(s.actorType),f=be(s.action),h=al(s.details);if(c!=="issue"||!u||p!=="agent"&&p!=="system"||f!=="issue.updated"||be(h?.source)==="comment")return!1;const g=xr(e,t,l);return g?sp(g.issueRefs,ap(u,h)):!1}r(i7,"shouldDeferIssueRefetchForVisibleAgentActivity");function u2(e,t,s,l){const c=be(s.entityType),u=be(s.entityId),p=be(s.action),f=al(s.details);if(c!=="issue"||!u||p!=="issue.comment_added")return!1;const h=xr(e,t,l);return h?sp(h.issueRefs,ap(u,f)):!1}r(u2,"shouldDeferVisibleIssueCommentActivity");async function r7(e,t,s,l){const c=be(s.entityType),u=be(s.action),p=al(s.details),f=be(p?.commentId);if(c!=="issue"||u!=="issue.comment_added"||!f)return!1;const h=xr(e,t,l);if(!h)return!1;const g=be(s.entityId);if(!g||!sp(h.issueRefs,ap(g,p)))return!1;try{const v=await cn.getComment(h.routeIssueRef,f);for(const y of h.issueRefs)e.setQueryData($.issues.comments(y),j=>j?{...j,pages:gI(j.pages,v)}:{pages:[[v]],pageParams:[null]});return!0}catch{for(const v of h.issueRefs)e.invalidateQueries({queryKey:$.issues.comments(v)});return!1}}r(r7,"hydrateVisibleIssueComment");var l7=new Set(["issue.created","issue.updated","issue.comment_added"]),Dk=new Set(["issue.document_created","issue.document_updated","issue.document_restored","issue.document_deleted"]),o7=new Set(["issue.document_annotation_thread_created","issue.document_annotation_comment_added","issue.document_annotation_thread_resolved","issue.document_annotation_thread_reopened","issue.document_annotation_remapped"]),c7=new Set(["routine.document_annotation_thread_created","routine.document_annotation_comment_added","routine.document_annotation_thread_resolved","routine.document_annotation_thread_reopened","routine.document_annotation_remapped"]),u7=new Set(["case.document_annotation_thread_created","case.document_annotation_comment_added","case.document_annotation_thread_resolved","case.document_annotation_thread_reopened","case.document_annotation_remapped"]),d7=new Set(["error"]),f7=new Set(["failed","timed_out","cancelled"]);function p7(e){if(!e)return null;const t=[];if(typeof e.status=="string"&&t.push(`status -> ${e.status.replace(/_/g," ")}`),typeof e.priority=="string"&&t.push(`priority -> ${e.priority}`),typeof e.assigneeAgentId=="string"||typeof e.assigneeUserId=="string"?t.push("reassigned"):(e.assigneeAgentId===null||e.assigneeUserId===null)&&t.push("unassigned"),e.reopened===!0){const s=be(e.reopenedFrom);t.push(s?`reopened from ${s.replace(/_/g," ")}`:"reopened")}return typeof e.title=="string"&&t.push("title changed"),typeof e.description=="string"&&t.push("description changed"),t.length>0?t.join(", "):null}r(p7,"describeIssueUpdate");function m7(e,t,s,l){const c=be(s.entityType),u=be(s.entityId),p=be(s.action),f=al(s.details),h=be(s.actorId),g=be(s.actorType);if(c!=="issue"||!u||!p||!l7.has(p))return null;const v=Xq(e,t,u,f),y=be(be(s.actorName)?.trim())??Yq(e,t,g,h),j=g==="agent"&&h?e.getQueryData($.agents.list(t))?.find(K=>K.id===h)??e.getQueryData($.agents.detail(h)):void 0,k=g==="user"&&h?e.getQueryData($.access.companyUserDirectory(t))?.users.find(K=>K.principalId===h)?.user:void 0,S=h&&(g==="user"||g==="agent")?{type:g,id:h,name:y,image:s.actorImage!==void 0?be(s.actorImage):k?.image,appearance:g==="agent"?LE(s.actorAppearance!==void 0?s.actorAppearance:j?.appearance,h):void 0}:void 0;if(g==="user"&&l.userId&&h===l.userId||g==="agent"&&l.agentId&&h===l.agentId)return null;if(p==="issue.created")return{actor:S,title:`${y} created ${v.ref}`,body:v.title?Fr(v.title,96):void 0,tone:"success",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${p}:${u}`};if(p==="issue.updated"){if(be(f?.source)==="comment")return null;const K=p7(f),z=K?v.title?`${Fr(v.title,64)} - ${K}`:K:v.title?Fr(v.title,96):v.label;return{actor:S,title:`${y} updated ${v.ref}`,body:Fr(z,100),tone:"info",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${p}:${u}`}}const N=be(f?.commentId),I=be(f?.bodySnippet),C=f?.reopened===!0,M=f?.updated===!0,R=be(f?.reopenedFrom),_=C?R?`reopened from ${R.replace(/_/g," ")}`:"reopened":null,D=C?`${y} reopened and commented on ${v.ref}`:M?`${y} commented and updated ${v.ref}`:`${y} commented on ${v.ref}`,U=I?_?`${_} - ${I.replace(/^#+\s*/m,"").replace(/\n/g," ")}`:I.replace(/^#+\s*/m,"").replace(/\n/g," "):_?v.title?`${_} - ${v.title}`:_:v.title??void 0;return{actor:S,title:D,body:U?Fr(U,96):void 0,tone:"info",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${p}:${u}:${N??"na"}`}}r(m7,"buildActivityToast");function h7(e){const t=be(e.entityType),s=be(e.action),l=be(e.entityId),c=al(e.details);return t!=="join_request"||!s||!l||s!=="join.requested"&&s!=="join.request_replayed"?null:{title:`${be(c?.requestType)==="agent"?"Agent":"Someone"} wants to join`,body:"A new join request is waiting for approval.",tone:"info",action:{label:"View inbox",href:"/inbox/mine"},dedupeKey:`join-request:${l}`}}r(h7,"buildJoinRequestToast");function g7(e,t,s,l){const c=be(e.agentId),u=be(e.status);if(!c||!u||!d7.has(u))return null;const p=u==="error"?"error":"info",f=t(c)??`Agent ${wf(c)}`;return{title:u==="running"?`${f} started`:`${f} errored`,body:s.getQueryData($.agents.list(l))?.find(h=>h.id===c)?.title??void 0,tone:p,action:{label:"View agent",href:`/agents/${c}`},dedupeKey:`agent-status:${c}:${u}`}}r(g7,"buildAgentStatusToast");function x7(e,t){const s=be(e.runId),l=be(e.agentId),c=be(e.status);if(!s||!l||!c||!f7.has(c))return null;const u=be(e.error),p=be(e.errorCode);if(p==="operator_interrupted"||p==="workspace_busy")return null;const f=be(e.contextSource),h=be(e.triggerDetail),g=t(l)??"Agent";if(c==="failed"&&p==="low_trust_isolation_unavailable"&&f?.startsWith("chat:"))return{title:`${g} couldn't start this chat`,body:"This external chat identity isn't linked, and isolated guest workspaces are disabled. Link the identity in Connectors or enable isolated workspaces, then start a new task.",tone:"warn",ttlMs:1e4,action:{label:"Open chat connections",href:"/apps"},dedupeKey:`run-status:${s}:${c}`};const v=c==="succeeded"?"success":c==="cancelled"?"info":"error",y=`${g} run ${c==="succeeded"?"succeeded":c==="failed"?"failed":c==="timed_out"?"timed out":"cancelled"}`;let j;return u?j=Fr(u,100):h&&(j=`Trigger: ${h}`),{title:y,body:j,tone:v,ttlMs:c==="succeeded"?5e3:7e3,action:{label:"View run",href:`/agents/${l}/runs/${s}`},dedupeKey:`run-status:${s}:${c}`}}r(x7,"buildRunStatusToast");function b7(e,t,s){const l=be(s.runId),c=be(s.status);if(!l||!c)return!1;if(e.setQueryData($.runDetail(l),p=>{if(!p)return p;const f=r(h=>Object.prototype.hasOwnProperty.call(s,h),"has");return{...p,status:c,...f("invocationSource")?{invocationSource:be(s.invocationSource)??p.invocationSource}:{},...f("triggerDetail")?{triggerDetail:be(s.triggerDetail)}:{},...f("error")?{error:be(s.error)}:{},...f("errorCode")?{errorCode:be(s.errorCode)}:{},...f("startedAt")?{startedAt:be(s.startedAt)}:{},...f("finishedAt")?{finishedAt:be(s.finishedAt)}:{}}}),Bc.has(c))return e.setQueryData($.liveRuns(t),p=>MK(p,l)),e.getQueryData($.pausedTasks(t))&&e.invalidateQueries({queryKey:$.pausedTasks(t)}),!0;let u=!1;return e.setQueryData($.liveRuns(t),p=>{const f=DK(p,l,c);return u=f.present,f.next}),u}r(b7,"applyRunLifecycleToCompanyLiveRuns");function v7(e,t,s){const l=be(s.status);l&&Bc.has(l)&&e.invalidateQueries({queryKey:$.heartbeats(t),refetchType:"none"}),e.invalidateQueries({queryKey:$.agents.list(t)}),e.invalidateQueries({queryKey:$.dashboard(t)}),e.invalidateQueries({queryKey:["costs",t]}),e.invalidateQueries({queryKey:$.sidebarBadges(t)});const c=be(s.agentId);c&&(e.invalidateQueries({queryKey:$.agents.detail(c)}),e.invalidateQueries({queryKey:$.heartbeats(t,c)}));const u=be(s.runId);u&&e.invalidateQueries({queryKey:$.runDetail(u)})}r(v7,"invalidateHeartbeatQueries");function y7(e,t,s){const l=be(s.agentId);l&&e.invalidateQueries({queryKey:$.agents.detail(l)})}r(y7,"invalidateHeartbeatProgressQueries");var j7=new Set(["approval","attention_source","budget_incident","decision","decision_queue","issue_recovery_action","join_request"]),w7=["issue.blockers_","issue.dependency_recovery_","issue.disposition_repair_","issue.execution_recovery_","issue.interaction_","issue.recovery_action_","issue.stalled_review_","issue.thread_interaction_"],k7=new Set(["failed","timed_out"]);function S7(e,t,s){return t?.startsWith("inbox.")||e&&j7.has(e)?!0:e!=="issue"||!t?!1:w7.some(l=>t.startsWith(l))||t==="issue.reviewers_updated"||t==="issue.status_decision_recorded"?!0:(t==="issue.created"||t==="issue.updated")&&(s?.status!==void 0||s?.blockedByIssueIds!==void 0)}r(S7,"activityChangesAttention");function Ok(e,t,s,l){return e.getQueriesData({queryKey:$.attention(t)}).some(([,c])=>c?"items"in c?Array.isArray(c.items)&&c.items.some(s):"count"in c&&l(c):!1)}r(Ok,"cachedAttentionIncludes");function o0(e,t){e.invalidateQueries({queryKey:$.attention(t)})}r(o0,"invalidateAttentionQueries");function N7(e,t,s,l,c){e.invalidateQueries({queryKey:$.activity(t)}),e.invalidateQueries({queryKey:$.dashboard(t)}),e.invalidateQueries({queryKey:$.sidebarBadges(t)});const u=be(s.entityType),p=be(s.entityId),f=be(s.action),h=be(s.actorType),g=be(s.actorId),v=al(s.details),y=h==="user"&&!!l.userId&&g===l.userId||h==="agent"&&!!l.agentId&&g===l.agentId;if(S7(u,f,v)&&o0(e,t),u==="decision"&&(e.invalidateQueries({queryKey:["decisions",t]}),p&&e.invalidateQueries({queryKey:$.decisions.detail(p)})),(f?.startsWith("ai_connection.")||f?.startsWith("connection_grant."))&&e.invalidateQueries({queryKey:["ai-connections",t]}),(f?.startsWith("primary_agent.")||f?.startsWith("agent.")||f?.startsWith("resource_membership."))&&e.invalidateQueries({queryKey:["primary-agent",t]}),f?.startsWith("resource_membership.")||f?.startsWith("primary_agent.")){const j=be(v?.userId);(!j||j===l.userId)&&e.invalidateQueries({queryKey:$.resourceMemberships.mine(t)})}if(u==="issue"){const j=$.agentChats.list(t,l.userId);if((p&&e.getQueryData(j)?.some(k=>k.id===p)||f==="issue.conversation_opened"&&y)&&e.invalidateQueries({queryKey:j}),(f==="issue.tree_hold_created"||f==="issue.tree_hold_released"||f==="issue.updated")&&(e.invalidateQueries({queryKey:["issues","tree-control-state"]}),f!=="issue.updated"&&e.invalidateQueries({queryKey:$.pausedTasks(t)})),p&&HK(e,t,p,KK(f,v,c?.occurredAt??null)),VK(e,t),a3(e,t,s),p){const k=(f==="issue.comment_added"||f==="issue.updated"&&be(v?.source)==="comment")&&(h==="user"&&!!l.userId&&g===l.userId||h==="agent"&&!!l.agentId&&g===l.agentId),S=!!c?.pathname&&i7(e,c.pathname,s,{isForegrounded:c.isForegrounded}),N=!!c?.pathname&&u2(e,c.pathname,s,{isForegrounded:c.isForegrounded}),I=Cx(e,t,p,v);for(const C of I){const M=k||S||N?{refetchType:"inactive"}:void 0;if(e.invalidateQueries({queryKey:$.issues.detail(C),...M}),e.invalidateQueries({queryKey:$.issues.activity(C),...M}),(f==="issue.comment_added"||f==="issue.conversation_session_started")&&e.invalidateQueries({queryKey:$.issues.comments(C),...M}),(f==="issue.comment_added"||f?.startsWith("issue.queued_comment"))&&e.invalidateQueries({queryKey:$.issues.queuedComments(C)}),(f?.startsWith("issue.attachment_")||f?.startsWith("issue.work_product_"))&&(e.invalidateQueries({queryKey:$.issues.attachments(C)}),e.invalidateQueries({queryKey:$.issues.workProducts(C)})),f==="issue.conversation_session_started"&&(e.invalidateQueries({queryKey:["issues","tree-control-state",C]}),e.invalidateQueries({queryKey:$.issues.interactions(C)})),f&&Dk.has(f)){const R=be(v?.key);e.invalidateQueries({queryKey:$.issues.documents(C),...M}),R?(e.invalidateQueries({queryKey:$.issues.document(C,R),...M}),e.invalidateQueries({queryKey:$.issues.documentRevisions(C,R),...M})):(e.invalidateQueries({queryKey:["issues","document",C],...M}),e.invalidateQueries({queryKey:["issues","document-revisions",C],...M}))}if(f&&(Dk.has(f)||o7.has(f))){const R=be(v?.key)??be(v?.documentKey);e.invalidateQueries({queryKey:R?["issues","document-annotations",C,R]:["issues","document-annotations",C],...M})}(f?.startsWith("issue.thread_interaction_")||(f==="issue.updated"||f==="issue.status_decision_recorded")&&be(v?.source)==="native_status_decision")&&(e.invalidateQueries({queryKey:$.issues.interactions(C)}),e.invalidateQueries({queryKey:$.tools.actionRequests(t,"pending")}),e.invalidateQueries({queryKey:$.apps.attention(t)}),e.invalidateQueries({queryKey:$.tools.trustRules(t)}))}}return}if(u==="agent"){e.invalidateQueries({queryKey:$.agents.list(t)}),e.invalidateQueries({queryKey:$.org(t)}),p&&(e.invalidateQueries({queryKey:$.agents.detail(p)}),e.invalidateQueries({queryKey:$.heartbeats(t,p)}));return}if(u==="project"){const j=be(s.details?.sourceIssueId);j&&e.invalidateQueries({queryKey:$.issues.activity(j)}),e.invalidateQueries({queryKey:$.projects.all(t)}),p&&e.invalidateQueries({queryKey:$.projects.detail(p)});return}if(u==="company_skill"){const j=be(s.details?.sourceIssueId);j&&e.invalidateQueries({queryKey:$.issues.activity(j)}),p&&e.invalidateQueries({queryKey:$.companySkills.detail(t,p)}),e.invalidateQueries({queryKey:$.companySkills.list(t)});return}if(u==="goal"){e.invalidateQueries({queryKey:$.goals.list(t)}),p&&e.invalidateQueries({queryKey:$.goals.detail(p)});return}if(u==="approval"){e.invalidateQueries({queryKey:$.approvals.list(t)});return}if(u==="join_request"){e.invalidateQueries({queryKey:$.access.joinRequests(t)});return}if(u==="cost_event"){e.invalidateQueries({queryKey:["costs",t]}),e.invalidateQueries({queryKey:["usage-by-provider",t]}),e.invalidateQueries({queryKey:["usage-by-biller",t]}),e.invalidateQueries({queryKey:$.usageWindowSpend(t)});return}if(u==="routine"||u==="routine_trigger"||u==="routine_run"){if(e.invalidateQueries({queryKey:["routines"]}),u==="routine"&&f&&c7.has(f)&&p){const j=be(v?.key)??be(v?.documentKey)??"description",k=y?{refetchType:"inactive"}:void 0;e.invalidateQueries({queryKey:["routines","document-annotations",p,j],...k})}return}if(u==="case"){if(e.invalidateQueries({queryKey:$.cases.list(t)}),p&&(e.invalidateQueries({queryKey:$.cases.detail(p)}),e.invalidateQueries({queryKey:$.cases.events(p)}),f&&u7.has(f))){const j=be(v?.key)??be(v?.documentKey),k=y?{refetchType:"inactive"}:void 0;e.invalidateQueries({queryKey:j?["cases","document-annotations",p,j]:["cases","document-annotations",p],...k})}return}if(u==="summary_slot"){const j=be(v?.scopeKind),k=be(v?.slotKey),S=be(v?.scopeId);j&&k&&(e.invalidateQueries({queryKey:$.summarySlots.detail(t,j,k,S)}),e.invalidateQueries({queryKey:$.summarySlots.revisions(t,j,k,S)}));return}u==="company"&&e.invalidateQueries({queryKey:$.companies.all})}r(N7,"invalidateActivityQueries");function C7(e,t){const s=t.payload??{},l=be(s.runId),c=be(s.status);if(!l||!c||!Bc.has(c))return!1;const u=`${t.companyId}:${l}:${c}`,p=e.observedRunOutcomes.has(u);e.observedRunOutcomes.delete(u),e.observedRunOutcomes.add(u),e.observedRunOutcomes.size>Fq&&e.observedRunOutcomes.delete(e.observedRunOutcomes.values().next().value);const f=Date.parse(be(s.finishedAt)??""),h=Date.parse(t.createdAt);return p||h-f>qq}r(C7,"observeRunOutcome");function A7(e,t){const s=Date.now();if(s<e.suppressUntil)return!0;const l=e.cooldownHits.get(t);if(!l)return!1;const c=l.filter(u=>s-u<Uq);return e.cooldownHits.set(t,c),c.length>=Bq}r(A7,"shouldSuppressToast");function _7(e,t){const s=Date.now(),l=e.cooldownHits.get(t)??[];l.push(s),e.cooldownHits.set(t,l)}r(_7,"recordToastHit");function Wh(e,t,s,l){A7(e,s)||t(l)!==null&&_7(e,s)}r(Wh,"gatedPushToast");function E7(e,t,s,l,c,u,p,f){if(l.companyId!==t)return;const h=r(k=>l2(e,t,k),"nameOf"),g=l.payload??{},v=l.type==="heartbeat.run.status"&&(C7(u,l)||Jq(e,s,g)),y=e7(g,l.createdAt,l.type);let j=!1;if(y){const k=r(S=>{j=a7(e,t,s,S)},"applyPatch");l.type==="heartbeat.run.log"&&f?f.submit(y,k):k(y)}if(l.type!=="heartbeat.run.log"){if(l.type==="heartbeat.run.queued"||l.type==="heartbeat.run.status"){const k=b7(e,t,g);if(v7(e,t,g),wk(e,l),k||e.invalidateQueries({queryKey:$.liveRuns(t)}),Rk(e,s,g,{runLifecycleEvent:!0}),(l.type==="heartbeat.run.status"&&k7.has(be(g.status)??"")||l.type==="heartbeat.run.queued"&&Ok(e,t,S=>S.sourceKind==="failed_run",S=>(S.countsBySourceKind?.failed_run??0)>0))&&o0(e,t),l.type==="heartbeat.run.status"){const S=x7(g,h);S&&!v&&Wh(u,c,"run-status",S)}return}if(l.type==="heartbeat.run.progress"){y7(e,t,g),Rk(e,s,g,{liveStatusAlreadyPatched:j});return}if(l.type==="heartbeat.run.event"){wk(e,l);return}if(l.type==="agent.status"){e.invalidateQueries({queryKey:$.agents.list(t)}),e.invalidateQueries({queryKey:$.dashboard(t)}),e.invalidateQueries({queryKey:$.org(t)});const k=be(g.agentId);k&&e.invalidateQueries({queryKey:$.agents.detail(k)}),(be(g.status)==="error"||k&&Ok(e,t,N=>N.sourceKind==="agent_error_alert"&&N.subject?.id===k,N=>N.errorAgentIds?.includes(k)===!0))&&o0(e,t);const S=g7(g,h,e,t);S&&!s7(e,s,g)&&Wh(u,c,"agent-status",S);return}if(l.type==="activity.logged"){N7(e,t,g,p,{pathname:s,occurredAt:l.createdAt??null}),u2(e,s,g)&&r7(e,s,g);const k=be(g.action),S=m7(e,t,g,p)??h7(g);S&&!Zq(e,s,g)&&Wh(u,c,`activity:${k??"unknown"}`,S)}}}r(E7,"handleLiveEvent");function I7(e,t){return e&&e===t?e:null}r(I7,"resolveLiveCompanyId");function Lk(e){e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null}r(Lk,"resetSocketHandlers");function zk(e,t){if(e){if(e.readyState===Vq){e.onopen=()=>{Lk(e),e.close(1e3,t)},e.onmessage=null,e.onerror=()=>{},e.onclose=null;return}Lk(e),e.readyState===Wq&&e.close(1e3,t)}}r(zk,"closeSocketQuietly");function T7(e,t,s){return e==="success"&&(t||s==="local_trusted")}r(T7,"canUseLiveSession");function R7({children:e}){const{visible:t}=uS(),s=(0,x.useRef)(!t),{selectedCompanyId:l,selectedCompany:c}=bt(),u=kn(),{pushToast:p}=Ri(),f=hn(),h=(0,x.useRef)({cooldownHits:new Map,suppressUntil:0,observedRunOutcomes:new Set}),g=(0,x.useRef)(f.pathname),{data:v,status:y}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),{data:j}=me({queryKey:$.health,queryFn:Fc.get}),k=v?.user?.id??v?.session?.userId??(j?.deploymentMode==="local_trusted"?"local-board":null),S=v?.session?.id??k??"signed_out",N=I7(l,c?.id??null),I=T7(y,v!=null,j?.deploymentMode)&&N!==null,C=(0,x.useRef)({userId:k,agentId:null}),M=(0,x.useRef)(new Set),R=(0,x.useCallback)(z=>(M.current.add(z),()=>{M.current.delete(z)}),[]),_=(0,x.useMemo)(()=>({subscribe:R}),[R]),D=(0,x.useMemo)(()=>IK(u),[u]),U=(0,x.useMemo)(()=>RK(u,D),[u,D]),K=(0,x.useMemo)(()=>n7(),[]);return(0,x.useEffect)(()=>()=>{D.dispose(),K.dispose()},[D,K]),(0,x.useEffect)(()=>{g.current=f.pathname},[f.pathname]),(0,x.useEffect)(()=>{C.current={userId:k,agentId:null}},[k]),(0,x.useEffect)(()=>{if(!t||!I||!N)return;const z=window.setInterval(()=>{WK(u,N)},zK);return()=>window.clearInterval(z)},[I,N,u,t]),(0,x.useEffect)(()=>{if(!t){s.current=!0,D.dispose(),K.dispose();return}if(!I||!N)return;s.current&&(s.current=!1,u.invalidateQueries({type:"active"},{cancelRefetch:!1}));let z=!1,E=0,B=null,O=null,Q=null;const V=r(()=>{B!==null&&(window.clearTimeout(B),B=null)},"clearReconnect"),ue=r(()=>{O!==null&&(window.clearInterval(O),O=null)},"stopPolling"),ce=r(()=>{z||O!==null||(O=window.setInterval(()=>{u.invalidateQueries({type:"active"},{cancelRefetch:!1})},Hq))},"startPolling"),X=r(()=>{if(z||B!==null)return;E+=1;const ie=Math.min(15e3,1e3*2**Math.min(E-1,4));B=window.setTimeout(()=>{B=null,A()},ie)},"scheduleReconnect"),A=r(()=>{if(z)return;const ie=ZK(`/api/companies/${encodeURIComponent(N)}/events/ws`),le=JK(ie);if(!le){ce(),X();return}Q=le,le.onopen=()=>{if(z||Q!==le){zk(le,"stale_connection");return}ue(),E>0&&(h.current.suppressUntil=Date.now()+Kq),u.invalidateQueries({type:"active"},{cancelRefetch:!1}),E=0},le.onmessage=Ae=>{if(!Af().visible)return;const de=typeof Ae.data=="string"?Ae.data:"";if(de)try{const we=JSON.parse(de);if(E7(U,N,g.current,we,p,h.current,{userId:C.current.userId,agentId:C.current.agentId},K),Qq(M.current,N,we),we.type==="notification.created"){const ye=Pq(we.payload);ye&&Lq(ye,C.current.userId)}}catch{}},le.onerror=()=>{},le.onclose=()=>{Q===le&&(Q=null,!z&&(ce(),X()))}},"connect"),ee=window.setTimeout(A,0);return()=>{z=!0,window.clearTimeout(ee),V(),ue();const ie=Q;Q=null,zk(ie,"provider_unmount")}},[t,D,K,u,U,N,p,I,S]),(0,a.jsx)(r2.Provider,{value:_,children:e})}r(R7,"LiveUpdatesProvider");function M7(e){let t=Zr();Ck(t),l0(t,e.userId);const s=e2(()=>{const u=Zr();u!==t&&(t=u,Ck(u),l0(u,e.userId))}),l=typeof navigator<"u"&&"serviceWorker"in navigator?navigator.serviceWorker:null,c=r(u=>{const p=$q(u.data);p&&(p.type==="navigate"?e.navigate(p.url):zq(p.notification))},"onMessage");return l?.addEventListener("message",c),l?.startMessages(),()=>{s(),l?.removeEventListener("message",c)}}r(M7,"startNotificationRuntime");function D7(){const e=ja(),t=(0,x.useRef)(e),{data:s}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),l=s?.user?.id??s?.session?.userId??null;return(0,x.useEffect)(()=>{t.current=e},[e]),(0,x.useEffect)(()=>{if(l)return M7({userId:l,navigate:r(c=>t.current(c),"navigate")})},[l]),null}r(D7,"NotificationRuntime");var O7=36e5,L7=3e3,z7=2e3,Pk="wardmote.skip-waiting",P7="wardmote.build-id",d2=null,c0=new Set;function $7(e){d2=e;for(const t of c0)t()}r($7,"publishUpdate");function U7(e){return c0.add(e),()=>{c0.delete(e)}}r(U7,"subscribe");function B7(){return(0,x.useSyncExternalStore)(U7,()=>d2,()=>null)}r(B7,"useServiceWorkerUpdate");function K7(e){return new Promise(t=>{const s=new MessageChannel,l=r(u=>{clearTimeout(c),s.port1.close(),t(u)},"finish"),c=setTimeout(()=>l(null),z7);s.port1.onmessage=u=>{l(typeof u.data?.buildId=="string"?u.data.buildId:null)},e.postMessage({type:P7},[s.port2])})}r(K7,"requestWorkerBuildId");function q7(e={}){const t=e.container??(typeof navigator<"u"&&"serviceWorker"in navigator?navigator.serviceWorker:void 0);if(!t)return()=>{};const s=e.documentRef??document,l=e.reload??(()=>window.location.reload()),c=e.updateIntervalMs??O7,u=e.onUpdateReady??$7;let p=!!t.controller,f=!1,h=!1,g,v=!1;const y=r(async _=>e.pageBuildId?await K7(_)!==e.pageBuildId:!0,"servesNewerBuild"),j=r(()=>{h||(h=!0,g!==void 0&&clearTimeout(g),l())},"reloadOnce"),k=r(async _=>{const D=await y(_);if(!v){if(!D){_.postMessage({type:Pk});return}u(()=>{f=!0,_.postMessage({type:Pk}),g=setTimeout(j,L7)})}},"offerWaiting"),S=r(()=>{if(!p){p=!0;return}if(f){j();return}const _=t.controller;_&&y(_).then(D=>{D&&!v&&!f&&u(j)})},"onControllerChange");t.addEventListener("controllerchange",S);let N;const I=r(()=>{const _=N?.installing;_&&_.addEventListener("statechange",()=>{_.state==="installed"&&t.controller&&k(_)})},"watchInstalling"),C=r(()=>{N?.update().catch(()=>{})},"checkForUpdates"),M=r(()=>{s.visibilityState==="visible"&&C()},"onVisibilityChange");s.addEventListener("visibilitychange",M);const R=setInterval(C,c);return t.register("/sw.js").then(_=>{N=_,_.waiting&&t.controller&&k(_.waiting),_.addEventListener("updatefound",I)}).catch(()=>{}),()=>{v=!0,t.removeEventListener("controllerchange",S),s.removeEventListener("visibilitychange",M),N?.removeEventListener("updatefound",I),clearInterval(R),g!==void 0&&clearTimeout(g)}}r(q7,"startServiceWorkerUpdates");var f2="wardmote.notifications.asked-after-decision";function F7(){try{return window.localStorage.getItem(f2)==="1"}catch{return!0}}r(F7,"alreadyAsked");function H7(){try{window.localStorage.setItem(f2,"1")}catch{return}}r(H7,"markAsked");async function V7(e){const t=await nq();if(t!=="granted")return t;const s=JA(l=>({...l,enabled:!0,pushEnabled:!0}));return e&&await l0(s,e),t}r(V7,"enableNotificationsAfterDecision");function W7(){const{pushToast:e}=Ri(),{data:t}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),s=t?.user?.id??t?.session?.userId??null;(0,x.useEffect)(()=>qE(()=>{F7()||!kx()||Sx()!=="default"||(H7(),e({id:"wardmote-notify-after-decision",title:"Get notified when an agent needs a decision",body:"Turn on notifications for this device. You can change it later in Settings.",tone:"info",persistent:!0,action:{label:"Turn on",onClick:r(()=>{V7(s)},"onClick")}}))}),[e,s])}r(W7,"useFirstDecisionNotificationPrompt");var Q7="wardmote-update-ready";function G7(){const{pushToast:e}=Ri(),t=B7(),s=kn(),l=S0(),c=(0,x.useRef)(l);return(0,x.useEffect)(()=>{t&&e({id:Q7,title:"A new version is ready.",tone:"info",persistent:!0,action:{label:"Reload",onClick:t}})},[t,e]),(0,x.useEffect)(()=>{if(l){c.current=!0;return}c.current&&(c.current=!1,s.invalidateQueries())},[l,s]),W7(),null}r(G7,"PwaRuntime");var p2={get:r(e=>je.get(`/companies/${e}/primary-agent/me`),"get"),set:r((e,t)=>je.put(`/companies/${e}/primary-agent/me`,t),"set")};function Y7(e){const t=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),s=t.data?.user?.id??t.data?.session?.userId??"local-board",l=me({queryKey:$.primaryAgent.mine(e??"__none__",s),queryFn:r(()=>p2.get(e),"queryFn"),enabled:!!e&&t.isSuccess});return{...l,userId:s,loading:!!e&&(t.isPending||l.isPending&&!t.error),error:t.error??l.error,retry:r(()=>t.isError?t.refetch():l.refetch(),"retry")}}r(Y7,"usePrimaryAgent");function X7({children:e}){const{selectedCompanyId:t}=bt(),s=Y7(t),l=kn(),{pushToast:c}=Ri(),u=(0,x.useRef)({companyId:t,userId:s.userId});u.current={companyId:t,userId:s.userId};const p=r(j=>$.primaryAgent.mine(j.companyId,j.userId),"keyFor"),f=r(j=>j.companyId===u.current.companyId&&j.userId===u.current.userId,"isCurrentScope"),h=me({queryKey:$.agents.list(t),queryFn:r(()=>Ha.list(t),"queryFn"),enabled:!!t}),g=Bt({mutationFn:r(j=>p2.set(j.companyId,{primaryAgentId:j.agentId}),"mutationFn"),onMutate:r(async j=>{const k=p(j);await l.cancelQueries({queryKey:k});const S=l.getQueryData(k);return l.setQueryData(k,{companyId:j.companyId,userId:j.userId,primaryAgentId:j.agentId,initialized:!0}),{previous:S}},"onMutate"),onError:r((j,k,S)=>{l.setQueryData(p(k),S?.previous),f(k)&&c({title:"Couldn't change your primary agent.",body:j.message,tone:"error",action:{label:"Retry",onClick:r(()=>{f(k)&&g.mutate(k)},"onClick")}})},"onError"),onSuccess:r((j,k)=>l.setQueryData(p(k),j),"onSuccess"),onSettled:r((j,k,S)=>{l.invalidateQueries({queryKey:p(S)}),l.invalidateQueries({queryKey:$.resourceMemberships.mine(S.companyId)})},"onSettled")}),v=h.data?.find(j=>j.id===s.data?.primaryAgentId&&j.status!=="terminated")??null,y=s.error??h.error;return(0,a.jsx)(b5,{value:t?{companyId:t,primaryAgentId:v?.id??null,primaryAgent:v,loading:s.loading||h.isPending,error:y?.message,onRetry:r(()=>{s.retry(),h.refetch()},"onRetry"),pendingAgentId:g.isPending&&f(g.variables)?g.variables.agentId:null,onChange:r(j=>g.mutate({companyId:t,userId:s.userId,agentId:j}),"onChange")}:null,children:e})}r(X7,"PrimaryAgentProvider");var $k="min-h-9",Z7={default:void 0,warning:"bg-amber-500/5 text-amber-700 dark:text-amber-300",error:"bg-bad/5 text-bad",muted:"opacity-50"};function WY(e,t){const s={name:"",path:"",kind:"dir",children:[]};for(const c of Object.keys(e)){const u=c.split("/").filter(Boolean);let p=s,f="";for(let h=0;h<u.length;h++){const g=u[h];f=f?`${f}/${g}`:g;const v=h===u.length-1;let y=p.children.find(j=>j.name===g);y||(y={name:g,path:f,kind:v?"file":"dir",children:[],action:v?t?.get(c)??null:null},p.children.push(y)),p=y}}function l(c){c.children.sort((u,p)=>u.kind!==p.kind?u.kind==="file"?-1:1:u.name.localeCompare(p.name)),c.children.forEach(l)}return r(l,"sortNode"),l(s),s.children}r(WY,"buildFileTree");function J7(e){let t=0;for(const s of e)s.kind==="file"?t++:t+=J7(s.children);return t}r(J7,"countFiles");function m2(e,t="all"){const s=new Set;for(const l of e){(t==="all"||l.kind===t)&&s.add(l.path);for(const c of m2(l.children,t))s.add(c)}return s}r(m2,"collectAllPaths");function e9(e){return e.endsWith(".yaml")||e.endsWith(".yml")?FS:HS}r(e9,"fileIcon");function h2(e,t,s=0){const l=[];for(const c of e)l.push({node:c,depth:s}),c.kind==="dir"&&t.has(c.path)&&l.push(...h2(c.children,t,s+1));return l}r(h2,"flattenVisibleNodes");function t9(e,t){if(e.kind==="file")return{allChecked:t.has(e.path),someChecked:!1};const s=[...m2(e.children,"file")],l=s.length>0&&s.every(c=>t.has(c));return{allChecked:l,someChecked:s.some(c=>t.has(c))&&!l}}r(t9,"checkboxState");function QY(e){const t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return null;const s={},l=t[1],c=t[2];let u=null,p=null;for(const f of l.split(`
|
|
58
|
+
`):[]),[D]),K=(0,x.useMemo)(()=>y&&!y.error&&!y.truncated?new Set(y.models.map(O=>O.id)):null,[y]),z=(0,x.useCallback)(O=>{f(Q=>{const V=Q.models.filter(X=>X.id.trim()),ue=new Set(V.map(X=>X.id.trim())),ce=O.filter(X=>!ue.has(X.id)).map(X=>({...Ud,id:X.id,name:X.name??""}));return{...Q,models:[...V,...ce]}})},[]);function E(O){O.preventDefault(),C||M.mutate()}r(E,"submit");const B=[...I&&e.apiKey.kind!=="none"&&e.apiKey.kind!=="missing"?[{mode:"keep",label:"Keep saved"}]:[],{mode:"literal",label:"Key"},{mode:"env",label:"Env variable"},{mode:"command",label:"Command"},{mode:"none",label:"No key"}];return(0,a.jsxs)("form",{onSubmit:E,"aria-label":I?`Edit ${e.name}`:"Add a custom provider",className:"flex flex-col gap-4 rounded-lg border border-line bg-bg-2 px-4 py-4 sm:px-5",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsx)("h3",{className:"text-sm font-semibold",children:I?`Edit ${e.name}`:"Add a custom provider"}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Close",onClick:l,children:(0,a.jsx)(ia,{"aria-hidden":"true"})})]}),I&&e.otherKeys.length?(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Also kept as written in models.yml: ",e.otherKeys.join(", "),"."]}):null,(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsx)(dc,{label:"Name",hint:C??"Used in model ids, e.g. my-gateway/model",children:(0,a.jsx)(Wn,{value:p.name,onChange:r(O=>k({name:O.target.value}),"onChange"),disabled:I,required:!0,"aria-invalid":!!C,placeholder:"my-gateway",autoComplete:"off"})}),(0,a.jsx)(dc,{label:"Base URL",hint:"Usually ends in /v1",children:(0,a.jsx)(Wn,{value:p.baseUrl,onChange:r(O=>k({baseUrl:O.target.value}),"onChange"),required:!0,type:"url",placeholder:"http://localhost:8000/v1",autoComplete:"off"})})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"API key"}),(0,a.jsx)(h6,{"aria-label":"Where the key comes from",className:"flex-wrap self-start",children:B.map(({mode:O,label:Q})=>(0,a.jsx)(g6,{selected:p.keyMode===O,onClick:r(()=>k({keyMode:O,keyValue:""}),"onClick"),children:Q},O))}),p.keyMode==="literal"?(0,a.jsx)(Wn,{value:p.keyValue,onChange:r(O=>k({keyValue:O.target.value}),"onChange"),type:"password",autoComplete:"off",required:!0,"aria-label":"API key",placeholder:"sk-..."}):p.keyMode==="env"?(0,a.jsx)(Wn,{value:p.keyValue,onChange:r(O=>k({keyValue:O.target.value.toUpperCase()}),"onChange"),required:!0,"aria-label":"Environment variable name",placeholder:"MY_GATEWAY_KEY",autoComplete:"off"}):p.keyMode==="command"?(0,a.jsx)(Wn,{value:p.keyValue,onChange:r(O=>k({keyValue:O.target.value}),"onChange"),required:!0,"aria-label":"Command that prints the key",placeholder:"op read op://vault/gateway/key",autoComplete:"off",className:"font-mono"}):null,(0,a.jsx)("span",{className:"text-xs text-ink-3",children:p.keyMode==="keep"?`The saved ${e?.apiKey.kind==="env"?`variable ${e.apiKey.name}`:e?.apiKey.kind==="command"?"command":"key"} stays as it is.`:p.keyMode==="env"?"OMP reads the key from this variable on the machine that runs agents.":p.keyMode==="command"?"OMP runs this command and uses what it prints.":p.keyMode==="none"?"For local servers that need no key.":"Saved in OMP's models.yml. Wardmote never shows it again."})]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(dc,{label:"Wire format (api)",hint:"Picking the wrong one is the most common mistake. Test connection suggests the right one.",children:(0,a.jsxs)(bg,{value:p.api,onChange:r(O=>k({api:O.target.value}),"onChange"),className:"w-full",children:[(0,a.jsx)("option",{value:"",children:"Set per model"}),ME.map(O=>(0,a.jsx)("option",{value:O,children:S6[O]??O},O))]})}),(0,a.jsx)(oe,{type:"button",variant:"secondary",size:"sm",className:"self-start",disabled:!p.baseUrl.trim()||R.isPending,onClick:r(()=>R.mutate(),"onClick"),children:R.isPending?"Testing...":"Test connection"}),R.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(R.error).join(" ")}):null,g?(0,a.jsxs)(Ra,{tone:g.suggestedApi?"ok":"bad",children:[g.suggestedApi?`${g.suggestedApi} answered${g.usedModel?` for ${g.usedModel}`:""}, so the wire format is set to it.`:g.usedModel?`No wire format answered for ${g.usedModel}. Check the base URL, key and model id.`:"The server listed no models. Add a model id below, then test again.",(0,a.jsx)("ul",{className:"mt-1 flex flex-col gap-0.5 text-xs text-ink-3",children:g.attempts.map(O=>(0,a.jsxs)("li",{className:"break-all",children:[O.api,": ",O.status??"no answer",O.detail&&!O.ok?` (${O.detail})`:""]},O.api))})]}):null]}),(0,a.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,a.jsx)("legend",{className:"mb-1.5 text-sm font-medium",children:"Models"}),p.models.map((O,Q)=>(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2 rounded-md border border-line-soft p-2 sm:grid-cols-[2fr_2fr_1fr_1fr_auto]",children:[K&&O.id.trim()&&!K.has(O.id.trim())?(0,a.jsx)("span",{className:"col-span-2 text-xs text-ink-3 sm:col-span-5",children:"Not listed upstream any more; kept until you remove it."}):null,(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} id`,value:O.id,onChange:r(V=>S(Q,{id:V.target.value}),"onChange"),placeholder:"model id",className:"col-span-2 sm:col-span-1",autoComplete:"off"}),(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} name`,value:O.name,onChange:r(V=>S(Q,{name:V.target.value}),"onChange"),placeholder:"Display name",className:"col-span-2 sm:col-span-1"}),(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} context window`,value:O.contextWindow,onChange:r(V=>S(Q,{contextWindow:V.target.value}),"onChange"),placeholder:"Context",inputMode:"numeric"}),(0,a.jsx)(Wn,{"aria-label":`Model ${Q+1} max output tokens`,value:O.maxTokens,onChange:r(V=>S(Q,{maxTokens:V.target.value}),"onChange"),placeholder:"Max output",inputMode:"numeric"}),(0,a.jsxs)("div",{className:"col-span-2 flex items-center justify-between gap-3 text-xs sm:col-span-1",children:[(0,a.jsxs)("label",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("input",{type:"checkbox",checked:O.reasoning,onChange:r(V=>S(Q,{reasoning:V.target.checked}),"onChange")}),"Thinks"]}),(0,a.jsxs)("label",{className:"inline-flex items-center gap-1.5",children:[(0,a.jsx)("input",{type:"checkbox",checked:O.images,onChange:r(V=>S(Q,{images:V.target.checked}),"onChange")}),"Images"]}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`Remove model ${Q+1}`,onClick:r(()=>k({models:p.models.filter((V,ue)=>ue!==Q)}),"onClick"),children:(0,a.jsx)(cg,{"aria-hidden":"true"})})]})]},Q)),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",onClick:r(()=>k({models:[...p.models,{...Ud}]}),"onClick"),children:[(0,a.jsx)(as,{"aria-hidden":"true"}),"Add model"]}),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",disabled:!p.baseUrl.trim()||_.isPending,onClick:r(()=>_.mutate(),"onClick"),children:[(0,a.jsx)(hR,{"aria-hidden":"true"}),_.isPending?"Fetching...":"Fetch models"]})]}),_.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(_.error).join(" ")}):null,y?.error?(0,a.jsx)(Ra,{tone:"bad",children:y.error}):null,y&&!y.error?(0,a.jsx)(k6,{result:y,savedIds:U,room:500-U.size,onAdd:z}):null,(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Leave context and max output empty when unsure; OMP fills known models in."})]}),(0,a.jsxs)("details",{className:"flex flex-col gap-3",children:[(0,a.jsx)("summary",{className:"cursor-pointer select-none text-sm font-medium",children:"Advanced"}),(0,a.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[(0,a.jsx)(Lh,{label:"Send the key as an Authorization header",hint:"OpenAI wire formats already do. Turn on for discovery or proxies that need it.",checked:p.authHeader,onChange:r(O=>k({authHeader:O}),"onChange")}),(0,a.jsx)(Lh,{label:"Disable strict tools",hint:"For Anthropic-style proxies that reject strict tool schemas.",checked:p.disableStrictTools,onChange:r(O=>k({disableStrictTools:O}),"onChange")}),(0,a.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,a.jsx)(dc,{label:"Model discovery",hint:"Ask the server for its models instead of listing them",children:(0,a.jsxs)(bg,{value:p.discovery,onChange:r(O=>k({discovery:O.target.value}),"onChange"),className:"w-full",children:[(0,a.jsx)("option",{value:"",children:"Off"}),AE.map(O=>(0,a.jsx)("option",{value:O,children:N6[O]??O},O))]})}),p.discovery?(0,a.jsx)(dc,{label:"Discovery timeout (ms)",children:(0,a.jsx)(Wn,{value:p.discoveryTimeout,onChange:r(O=>k({discoveryTimeout:O.target.value}),"onChange"),inputMode:"numeric",placeholder:"OMP default"})}):null]}),p.discovery==="openai-models-list"?(0,a.jsx)(Lh,{label:"Add /v1 to the discovery URL",hint:"Turn on when the base URL has no /v1 but the model list lives under it.",checked:p.injectV1,onChange:r(O=>k({injectV1:O}),"onChange")}):null,(0,a.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,a.jsx)("legend",{className:"mb-1.5 text-sm font-medium",children:"Extra headers"}),p.headers.map((O,Q)=>(0,a.jsxs)("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2",children:[(0,a.jsx)(Wn,{"aria-label":`Header ${Q+1} name`,value:O.name,onChange:r(V=>N(Q,{name:V.target.value}),"onChange"),placeholder:"X-Header",disabled:O.saved}),(0,a.jsx)(Wn,{"aria-label":`Header ${Q+1} value`,value:O.value,onChange:r(V=>N(Q,{value:V.target.value}),"onChange"),placeholder:O.saved?"Saved; type to replace":"value",type:"password",autoComplete:"off"}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Remove header ${Q+1}`,onClick:r(()=>k({headers:p.headers.filter((V,ue)=>ue!==Q)}),"onClick"),children:(0,a.jsx)(cg,{"aria-hidden":"true"})})]},Q)),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",className:"self-start",onClick:r(()=>k({headers:[...p.headers,{name:"",value:"",saved:!1}]}),"onClick"),children:[(0,a.jsx)(as,{"aria-hidden":"true"}),"Add header"]})]})]})]}),M.error?(0,a.jsx)(Ra,{tone:"bad",children:(0,a.jsx)("ul",{className:"flex flex-col gap-0.5",children:wc(M.error).map(O=>(0,a.jsx)("li",{children:O},O))})}):null,(0,a.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",onClick:l,children:"Cancel"}),(0,a.jsx)(oe,{type:"submit",disabled:M.isPending||!!C,children:M.isPending?"Checking with OMP...":"Save provider"})]})]})}r(Zw,"CustomProviderForm");function _6(e){switch(e.apiKey.kind){case"env":return e.apiKey.present?`key from ${e.apiKey.name}`:`${e.apiKey.name} is not set on the server`;case"literal":return"key saved";case"command":return"key from a command";case"none":return"no key";case"oauth":return"OMP sign-in";default:return"no key set"}}r(_6,"keySummary");var to=":new";function E6(e){return e===to?to:e.name}r(E6,"providerKey");function I6({onChanged:e}){const t=kn(),s=me({queryKey:Oh,queryFn:r(()=>ya.customProviders(),"queryFn")}),l=y6(E6),c=Bt({mutationFn:r(h=>ya.removeCustomProvider(h),"mutationFn"),onSuccess:r((h,g)=>{t.setQueryData(Oh,h),l.openKey===g&&l.close(!1),e?.()},"onSuccess")}),u=s.data?.providers??[],p=u.map(h=>h.name),f=r(h=>{t.setQueryData(Oh,h),l.close(),e?.()},"onSaved");return(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[s.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(s.error).join(" ")}):null,s.data?.parseError?(0,a.jsxs)(Ra,{tone:"bad",children:[s.data.parseError,". Fix ",s.data.modelsPath," by hand; Wardmote will not overwrite it."]}):null,u.length?(0,a.jsx)("ul",{"aria-label":"Custom providers",className:"flex flex-col divide-y divide-line rounded-lg border border-line",children:u.map(h=>(0,a.jsxs)("li",{children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",children:[(0,a.jsx)("b",{className:"font-medium",children:h.name}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs text-ink-3",children:[h.baseUrl,h.api,_6(h),h.discovery?`discovery: ${h.discovery.type}`:`${h.models.length} ${h.models.length===1?"model":"models"}`].filter(Boolean).join(" · ")}),(0,a.jsxs)("span",{className:"flex gap-1",children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Edit ${h.name}`,...l.triggerProps(h.name),onClick:r(()=>l.toggle(h),"onClick"),children:(0,a.jsx)(V0,{"aria-hidden":"true"})}),(0,a.jsx)(oe,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Remove ${h.name}`,disabled:c.isPending,onClick:r(()=>{window.confirm(`Remove ${h.name} from OMP's models.yml? A backup stays in models.yml.bak.`)&&c.mutate(h.name)},"onClick"),children:(0,a.jsx)(cg,{"aria-hidden":"true"})})]})]}),l.openKey===h.name?(0,a.jsx)(Yw,{id:l.panelId(h.name),onEscape:l.dismiss,className:"px-2 pb-2 sm:px-3 sm:pb-3",children:(0,a.jsx)(Zw,{provider:h,takenNames:p,onCancel:r(()=>l.close(),"onCancel"),onSaved:f,onDirtyChange:l.setDirty})}):null]},h.name))}):s.isLoading?(0,a.jsx)("p",{className:"text-sm text-ink-3",children:"Reading models.yml..."}):null,c.error?(0,a.jsx)(Ra,{tone:"bad",children:wc(c.error).join(" ")}):null,l.openKey===to?(0,a.jsx)(Yw,{id:l.panelId(to),onEscape:l.dismiss,children:(0,a.jsx)(Zw,{provider:null,takenNames:p,onCancel:r(()=>l.close(),"onCancel"),onSaved:f,onDirtyChange:l.setDirty})}):(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",className:"self-start",disabled:!!s.data?.parseError,...l.triggerProps(to),onClick:r(()=>l.request(to),"onClick"),children:[(0,a.jsx)(as,{"aria-hidden":"true"}),"Add custom provider"]}),s.data?(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Saved to ",s.data.modelsPath,", with the previous copy in models.yml.bak."]}):null]})}r(I6,"CustomProviders");var T6=["Check OMP","Connect a model","First task"],Yg="Atlas",R6="general";var M6="Only an instance admin can set up OMP on this server.";function zh(e){return e?e.status===403?{message:M6,retry:!1}:{message:e.message||"Could not check OMP on this server.",retry:!0}:null}r(zh,"statusFailure");var D6={anthropic:"Anthropic",openai:"OpenAI","openai-codex":"OpenAI",openrouter:"OpenRouter",google:"Google",deepseek:"DeepSeek"};function O6(e){return e?D6[e]??e:null}r(O6,"providerLabel");function L6(e){return e.state==="ready"?"ready":e.state==="missing"?e.network==="offline"?"offline":"install":"old"}r(L6,"checkView");function z6(e){return(e?.models.length??0)>0}r(z6,"hasModel");function P6(e){return e.state!=="ready"?null:z6(e)?2:1}r(P6,"nextStepAfterCheck");function $6(e){return!e.connected||e.state!=="ready"?null:e.modelCount>0?2:1}r($6,"nextStepAfterRemote");function U6(e){return e.copies.slice(1).filter(t=>t.version!==e.version)}r(U6,"olderCopies");function B6(e){const t=e.trim().split(/\r?\n/,1)[0]?.trim()??"";return t.length<=120?t:`${t.slice(0,119).trimEnd()}…`}r(B6,"taskTitle");function Jw(e){const t=e?.replace(/[\\/]+$/,"").split(/[\\/]/).pop()?.trim();return t||"My company"}r(Jw,"companyNameForFolder");function K6(e){return e?.recommendedModel?e.models.find(t=>t.id===e.recommendedModel)?.label??e.recommendedModel:null}r(K6,"recommendedModelLabel");function q6(e){return e?.recommendedModel?O6(e.models.find(t=>t.id===e.recommendedModel)?.provider??e.recommendedModel.split("/",1)[0]):null}r(q6,"signedInProvider");var xf="Wardmote",DA=2e3,kd=["onboarding","omp-status"],F6={ok:(0,a.jsx)(Ms,{className:"size-3.5","aria-hidden":!0}),bad:(0,a.jsx)(ia,{className:"size-3.5","aria-hidden":!0}),warn:(0,a.jsx)(ai,{className:"size-3.5","aria-hidden":!0}),wait:(0,a.jsx)(e3,{className:"size-3.5","aria-hidden":!0}),run:(0,a.jsx)(nl,{className:"size-3.5 motion-safe:animate-spin","aria-hidden":!0})},H6={ok:"bg-ok-soft text-ok",bad:"bg-bad-soft text-bad",warn:"bg-warn-soft text-warn",wait:"bg-bg-3 text-ink-3",run:"bg-run-soft text-run"};function no({rows:e,label:t}){return(0,a.jsx)("section",{"aria-label":t,className:"rounded-lg border border-line-soft bg-bg-2 px-4 py-1",children:(0,a.jsx)("ul",{children:e.map(s=>(0,a.jsxs)("li",{"data-check":s.state,className:"flex items-center gap-2.5 border-b border-line-soft py-2 text-(length:--t-13) last:border-b-0",children:[(0,a.jsx)("span",{className:Y("grid size-5.5 shrink-0 place-items-center rounded-full",H6[s.state]),children:F6[s.state]}),(0,a.jsx)("span",{className:"min-w-0",children:s.label}),s.value?(0,a.jsx)("span",{className:"ms-auto min-w-0 truncate font-mono text-xs text-ink-3",children:s.value}):null]},s.label))})})}r(no,"Checks");function Xg({command:e}){const[t,s]=(0,x.useState)(!1);return(0,a.jsxs)("div",{className:"flex flex-col items-start gap-2",children:[(0,a.jsx)("code",{className:"block w-full whitespace-pre-wrap break-all rounded-md border border-line-soft bg-bg-3 px-3 py-2.5 font-mono text-(length:--t-13)",children:e}),(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"sm",onClick:r(()=>{q0(e).then(()=>s(!0))},"onClick"),children:[t?(0,a.jsx)(Ms,{className:"size-3.5","aria-hidden":!0}):(0,a.jsx)(o3,{className:"size-3.5","aria-hidden":!0}),t?"Copied":"Copy command"]})]})}r(Xg,"CommandBlock");function bf({tone:e,children:t}){return(0,a.jsxs)("div",{role:e==="bad"?"alert":"note",className:Y("flex gap-2.5 rounded-md px-3 py-2.5 text-(length:--t-13)",{warn:"bg-warn-soft",info:"bg-run-soft",bad:"bg-bad-soft"}[e]),children:[(0,a.jsx)(ai,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":!0}),(0,a.jsx)("span",{children:t})]})}r(bf,"Note");function V6({step:e}){return(0,a.jsx)("ol",{"aria-label":"Setup steps",className:"flex flex-wrap items-center gap-1.5 text-xs text-ink-2",children:T6.map((t,s)=>(0,a.jsxs)("li",{className:"flex items-center gap-1.5","aria-current":s===e?"step":void 0,children:[s>0?(0,a.jsx)("span",{"aria-hidden":!0,className:"h-px w-5.5 bg-line"}):null,(0,a.jsx)("span",{className:Y("grid size-5 place-items-center rounded-full border border-line-strong text-(length:--text-micro) font-semibold",s<e&&"border-ok bg-ok text-bg",s===e&&"border-accent text-accent"),children:s<e?(0,a.jsx)(Ms,{className:"size-3","aria-hidden":!0}):s+1}),(0,a.jsx)("span",{className:Y(s===e?"font-semibold text-ink":"max-sm:sr-only"),children:t})]},t))})}r(V6,"Steps");function cr({title:e,lede:t}){return(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)("h1",{id:"onboarding-title",className:"text-(length:--t-24) font-semibold tracking-tight sm:text-(length:--t-32) sm:leading-tight",children:e}),(0,a.jsx)("p",{className:"max-w-130 text-base text-ink-2",children:t})]})}r(cr,"Heading");function OA({title:e,paragraphs:t}){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:e}),t.map(s=>(0,a.jsx)("p",{className:"text-sm text-ink-2",children:s},s))]})}r(OA,"SideText");var W6=(0,a.jsx)(OA,{title:"Why OMP",paragraphs:[`${xf} runs every agent on OMP. OMP talks to the model and uses the tools; ${xf} assigns work, keeps the record and holds the settings.`,"You will not need to open OMP's own settings: models, thinking and tools are set here."]});function Uc({children:e}){return(0,a.jsx)("div",{className:"mt-auto flex flex-wrap items-center gap-2 pt-2",children:e})}r(Uc,"Actions");function Zg(e){if(e instanceof Ti){const t=e.body;if(t&&typeof t.error=="string")return t.error}return e instanceof Error?e.message:String(e)}r(Zg,"errorMessage$1");function Q6({open:e,onOpenChange:t,onPick:s}){const[l,c]=(0,x.useState)(null),u=me({queryKey:["onboarding","omp-browse",l],queryFn:r(()=>ya.browse(l),"queryFn"),enabled:e});return(0,a.jsx)(ks,{open:e,onOpenChange:t,children:(0,a.jsxs)($s,{className:"sm:max-w-lg",children:[(0,a.jsxs)(bo,{children:[(0,a.jsx)(Os,{children:"Choose omp"}),(0,a.jsx)(vo,{className:"truncate font-mono text-xs",children:u.data?.path??"…"})]}),(0,a.jsxs)("ul",{className:"-mx-2 max-h-80 overflow-y-auto",children:[u.data?.parent?(0,a.jsx)("li",{children:(0,a.jsxs)("button",{type:"button",className:"flex min-h-10 w-full items-center gap-2 rounded-md px-2 text-start text-sm hover:bg-bg-3",onClick:r(()=>c(u.data?.parent??null),"onClick"),children:[(0,a.jsx)(Ei,{className:"size-4 text-ink-3","aria-hidden":!0}),".."]})}):null,u.data?.entries.map(p=>(0,a.jsx)("li",{children:(0,a.jsxs)("button",{type:"button",className:"flex min-h-10 w-full items-center gap-2 rounded-md px-2 text-start text-sm hover:bg-bg-3",onClick:r(()=>{p.kind==="directory"?c(p.path):(s(p.path),t(!1))},"onClick"),children:[p.kind==="directory"?(0,a.jsx)(Ei,{className:"size-4 text-ink-3","aria-hidden":!0}):(0,a.jsx)(bR,{className:"size-4 text-accent","aria-hidden":!0}),(0,a.jsx)("span",{className:"truncate",children:p.name})]})},p.path)),u.isError?(0,a.jsx)("li",{className:"px-2 py-2 text-sm text-bad",children:Zg(u.error)}):null]})]})})}r(Q6,"OmpFilePicker");function G6({status:e,failure:t,command:s,onChooseCommand:l,onRemote:c,onRetry:u}){const[p,f]=(0,x.useState)(!1),h=r(v=>v.state==="ready"?{state:"ok",label:`Version ${v.version}`,value:`needs ${v.minVersion} or newer`}:{state:"bad",label:v.version?`Version ${v.version}`:"Version unknown",value:`needs ${v.minVersion}`},"versionRow");if(!e)return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Install OMP",lede:"Looking for OMP on this computer."}),(0,a.jsx)(no,{label:"OMP checks",rows:[t&&!t.retry?{state:"bad",label:"Looking for omp",value:"stopped"}:{state:"run",label:"Looking for omp",value:"every 2 s"}]}),t?(0,a.jsx)(bf,{tone:"bad",children:t.message}):null]});const g=L6(e);if(g==="old"){const v=U6(e);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Update OMP",lede:e.version?`OMP ${e.version} is older than ${e.minVersion}, so some settings set here would be ignored.`:`The version of OMP could not be read. ${xf} needs OMP ${e.minVersion} or newer.`}),(0,a.jsx)(Xg,{command:e.updateCommand}),(0,a.jsx)(no,{label:"OMP checks",rows:[{state:"ok",label:"omp found",value:e.path},h(e)]}),v.length>0?(0,a.jsxs)(bf,{tone:"warn",children:["Two copies of omp are installed. The older one in ",e.path," runs first. Remove it, or update it with the command above."]}):null]})}return g==="offline"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"You are offline",lede:"Installing needs the internet once. Connect, or point to an omp you already copied here."}),(0,a.jsx)(no,{label:"OMP checks",rows:[{state:"bad",label:"omp.sh not reachable",value:"3 tries"},s?h(e):{state:"wait",label:"Version check"}]}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("span",{id:"omp-path-label",className:"text-sm font-medium",children:"Path to omp"}),(0,a.jsxs)(oe,{type:"button",variant:"secondary","aria-labelledby":"omp-path-label",className:"justify-between font-normal",onClick:r(()=>f(!0),"onClick"),children:[(0,a.jsx)("span",{className:Y("truncate",s?"font-mono text-xs":"text-ink-3"),children:s??"Choose file"}),(0,a.jsx)(Ei,{className:"size-4","aria-hidden":!0})]})]}),(0,a.jsx)(Q6,{open:p,onOpenChange:f,onPick:l}),(0,a.jsx)(Uc,{children:(0,a.jsxs)(oe,{type:"button",variant:"secondary",onClick:u,children:[(0,a.jsx)(nl,{className:"size-3.5","aria-hidden":!0}),"Try again"]})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Install OMP",lede:"Run this in a terminal on this computer. This page moves on by itself."}),(0,a.jsx)(Xg,{command:e.installCommand}),(0,a.jsxs)("p",{className:"text-sm text-ink-2",children:[e.os.label," detected ·"," ",(0,a.jsx)("a",{className:"inline-flex min-h-6 items-center text-accent underline-offset-2 hover:underline",href:"https://omp.sh",target:"_blank",rel:"noreferrer",children:"Other ways"})]}),(0,a.jsx)(no,{label:"OMP checks",rows:[e.state==="ready"?{state:"ok",label:"omp found",value:e.path}:{state:"run",label:"Looking for omp",value:"every 2 s"},e.state==="ready"?h(e):{state:"wait",label:`Version ${e.minVersion} or newer`},e.models.length>0?{state:"ok",label:`${e.models.length} models`}:{state:"wait",label:"At least one model"}]}),e.runtime==="local"?(0,a.jsx)(Uc,{children:(0,a.jsx)(oe,{type:"button",variant:"ghost",onClick:c,children:"Run agents on another machine"})}):null]})}r(G6,"CheckOmpScreen");function Y6({remote:e,pending:t,error:s,onCheck:l,onLocal:c}){const[u,p]=(0,x.useState)(e?.address??""),f=e?[e.connected?{state:"ok",label:"Connected",value:e.latencyMs!==null?`${e.latencyMs} ms`:null}:{state:"bad",label:"Not connected",value:e.error},...e.connected?[e.state==="missing"?{state:"bad",label:"omp not found there"}:e.state==="ready"?{state:"ok",label:`omp ${e.version} found`}:{state:"bad",label:`omp ${e.version??""} is too old`.replace(" "," "),value:"needs 18.1.16"},e.modelCount>0?{state:"ok",label:`${e.modelCount} models signed in there`}:{state:"bad",label:"No model signed in there",value:"next step"}]:[]]:[];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Run agents on another machine",lede:"OMP must be installed where agents run. We check it over SSH."}),(0,a.jsxs)("form",{className:"flex flex-col gap-1.5",onSubmit:r(h=>{h.preventDefault(),l(u.trim())},"onSubmit"),id:"onboarding-remote-form",children:[(0,a.jsx)("label",{htmlFor:"onboarding-ssh-address",className:"text-sm font-medium",children:"SSH address"}),(0,a.jsx)(Wn,{id:"onboarding-ssh-address",value:u,onChange:r(h=>p(h.target.value),"onChange"),placeholder:"user@host",autoComplete:"off",spellCheck:!1,"aria-describedby":"onboarding-ssh-help"}),(0,a.jsx)("span",{id:"onboarding-ssh-help",className:"text-xs text-ink-3",children:"Uses your SSH keys. The working folder is your home folder unless you change it later."})]}),f.length>0?(0,a.jsx)(no,{label:"Remote checks",rows:f}):null,s?(0,a.jsx)(bf,{tone:"bad",children:s}):null,(0,a.jsxs)(Uc,{children:[(0,a.jsx)(oe,{type:"button",variant:"ghost",onClick:c,children:"Use this computer"}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsx)(oe,{type:"submit",form:"onboarding-remote-form",disabled:t||u.trim().length===0,children:t?"Checking…":"Continue"})]})]})}r(Y6,"RemoteScreen");function X6({remote:e,onSignedIn:t}){const[s,l]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{if(!e)return;const c=window.setInterval(t,DA);return()=>window.clearInterval(c)},[e,t]),e?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Connect a model",lede:`OMP on ${e.host} has no model signed in yet.`}),(0,a.jsxs)("p",{className:"text-sm text-ink-2",children:["Sign in on ",e.host,". This page moves on by itself."]}),(0,a.jsx)(Xg,{command:`ssh -t ${e.username}@${e.host}${e.port!==22?` -p ${e.port}`:""} omp login`})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cr,{title:"Connect a model",lede:s?"Add your own gateway or local server to OMP.":"OMP has no model signed in yet. Sign in to a provider; OMP keeps the sign-in."}),s?(0,a.jsx)(I6,{onChanged:t}):(0,a.jsx)(w6,{autoFocus:!0,onSignedIn:t}),(0,a.jsxs)(Uc,{children:[(0,a.jsx)(oe,{type:"button",variant:"link",size:"sm",onClick:r(()=>l(c=>!c),"onClick"),children:s?"Sign in to a provider instead":"Use my own server instead"}),(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Moves on by itself once OMP has a model."})]})]})}r(X6,"ConnectScreen");function Z6({status:e,remote:t,pending:s,error:l,onStart:c}){const[u,p]=(0,x.useState)(""),f=t?t.homeFolder:e?.projectFolder,h=t?null:K6(e);return(0,a.jsxs)("form",{className:"contents",onSubmit:r(g=>{g.preventDefault(),u.trim()&&c(u.trim())},"onSubmit"),children:[(0,a.jsx)(cr,{title:"What should your first agent do?",lede:`${Yg} starts as soon as you press Start. You can rename it and change its setup later.`}),(0,a.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,a.jsx)("label",{htmlFor:"onboarding-first-task",className:"text-sm font-medium",children:"First task"}),(0,a.jsx)(s1,{id:"onboarding-first-task",value:u,onChange:r(g=>p(g.target.value),"onChange"),rows:4,placeholder:f?`Read the README in ${f} and list the three riskiest modules.`:void 0,autoFocus:!0})]}),(0,a.jsxs)("section",{"aria-label":"First agent",className:"flex flex-col gap-1.5 rounded-lg border border-line-soft bg-bg-2 px-4 py-3 text-sm",children:[(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Agent"}),Yg,", general assistant"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Model"}),h?`${h} (recommended)`:"OMP default"]}),(0,a.jsxs)("div",{className:"flex min-w-0 gap-2",children:[(0,a.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Folder"}),(0,a.jsx)("span",{className:"min-w-0 truncate font-mono text-xs leading-5",children:f??"~"})]})]}),l?(0,a.jsx)(bf,{tone:"bad",children:l}):null,(0,a.jsxs)(Uc,{children:[(0,a.jsx)("span",{className:"flex-1"}),(0,a.jsxs)(oe,{type:"submit",disabled:s||u.trim().length===0,children:[(0,a.jsx)(D0,{className:"size-3.5","aria-hidden":!0}),s?"Starting…":"Start"]})]})]})}r(Z6,"TaskScreen");function J6(){const{onboardingOpen:e,onboardingOptions:t,closeOnboarding:s,onboardingRouteDismissed:l,setOnboardingRouteDismissed:c}=Vc(),{companies:u,loading:p}=bt(),f=hn(),h=fU(f.pathname),g=h&&p?null:pU({pathname:f.pathname,companyPrefix:h,companies:u});if(!(e||g!==null&&!l))return null;const v=(e?t.companyId:g?.companyId)??null;return(0,a.jsx)(eB,{companyId:v,onClose:r(()=>{s(),c(!0)},"onClose")})}r(J6,"OnboardingFlow");function eB({companyId:e,onClose:t}){const s=kn(),l=ja(),{setSelectedCompanyId:c}=bt(),[u,p]=(0,x.useState)(0),[f,h]=(0,x.useState)("local"),[g,v]=(0,x.useState)(null),[y,j]=(0,x.useState)(null),[k,S]=(0,x.useState)(null),N=me({queryKey:[...kd,g],queryFn:r(()=>ya.status({command:g}),"queryFn"),retry:r((z,E)=>(zh(E)?.retry??!0)&&z<2,"retry"),refetchInterval:r(z=>zh(z.state.error)?.retry===!1||u===2&&z.state.data?!1:DA,"refetchInterval")}),I=N.data,C=zh(N.error),M=me({queryKey:[...kd,"network",g],queryFn:r(()=>ya.status({command:g,network:!0}),"queryFn"),enabled:I?.state==="missing"&&f==="local",refetchInterval:3e4}),R=(0,x.useMemo)(()=>{if(I)return I.state!=="missing"?I:{...I,network:M.data?.network??null}},[I,M.data]);(0,x.useEffect)(()=>{if(f!=="local"||!I||u===2)return;const z=P6(I);z!==null&&z>u&&p(z)},[f,I,u]);const _=Bt({mutationFn:r(z=>ya.remote(z),"mutationFn"),onSuccess:r(z=>{j(z);const E=$6(z);E!==null&&p(E)},"onSuccess")}),D=(0,x.useCallback)(()=>{if(!y){s.invalidateQueries({queryKey:kd});return}ya.remote(y.address).then(z=>{j(z),z.modelCount>0&&p(2)}).catch(()=>{})},[y,s]),U=Bt({mutationFn:r(async z=>{const E=f==="remote"?y?.homeFolder??null:I?.projectFolder??null;let B=e;B||(B=(await qy.create({name:Jw(f==="remote"?y?.host:E)})).id,await s.invalidateQueries({queryKey:$.companies.all}));let O=null;f==="remote"&&y?.homeFolder&&(O=(await KT.create(B,{name:y.host,driver:"ssh",config:{host:y.host,port:y.port,username:y.username,remoteWorkspacePath:y.homeFolder}})).id);const Q={};f==="local"&&I?.recommendedModel&&(Q.model=I.recommendedModel),E&&(Q.cwd=E),g&&(Q.command=g);const V=await Ha.hire(B,{name:Yg,role:R6,appearance:RE(),adapterType:"omp_local",adapterConfig:Q,onboardingFirstAgent:!0,runtimeConfig:m6(),...O?{defaultEnvironmentId:O}:{}});V.approval&&await YN.approve(V.approval.id,"Approved during onboarding first-agent setup.");const ue=await hr.create(B,{name:Jw(E),status:"in_progress",...f==="local"&&E?{workspace:{sourceType:"local_path",cwd:E,isPrimary:!0}}:{}}),ce=await cn.create(B,{title:B6(z),description:z,status:"todo",assigneeAgentId:V.agent.id,projectId:ue.id});return{companyId:B,issue:ce}},"mutationFn"),onMutate:r(()=>S(null),"onMutate"),onError:r(z=>S(Zg(z)),"onError"),onSuccess:r(async({companyId:z,issue:E})=>{await Promise.all([s.invalidateQueries({queryKey:$.companies.all}),s.invalidateQueries({queryKey:$.agents.list(z)}),s.invalidateQueries({queryKey:$.projects.list(z)}),s.invalidateQueries({queryKey:$.issues.list(z)})]);const B=(await qy.list()).find(Q=>Q.id===z)?.issuePrefix??null;c(z,{source:"route_sync"}),t();const O=E.identifier??E.id;l(B?`/${B}/issues/${O}`:`/issues/${O}`)},"onSuccess")}),K=u===1?(0,a.jsx)(OA,{title:"Skipped when OMP is ready",paragraphs:["If OMP already has a signed-in model on this machine, this step is skipped and the best model is picked for you."]}):u===2?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:f==="remote"?`Found on ${y?.host??"that machine"}`:"Found on this computer"}),(0,a.jsx)(no,{label:"Found",rows:f==="remote"?[{state:"ok",label:`OMP ${y?.version??""}`.trim()},{state:"ok",label:`${y?.modelCount??0} models signed in`},{state:"ok",label:"Working folder",value:y?.homeFolder}]:[{state:"ok",label:`OMP ${I?.version??""}`.trim()},{state:"ok",label:`${q6(I)??"Model"} signed in`,value:"imported"},{state:"ok",label:"Project folder",value:I?.projectFolder}]})]}):W6;return(0,a.jsx)(ks,{open:!0,onOpenChange:r(z=>{z||t()},"onOpenChange"),children:(0,a.jsxs)(aT,{children:[(0,a.jsx)("div",{className:"fixed inset-0 z-50 bg-bg"}),(0,a.jsxs)("div",{"data-testid":"onboarding-flow","data-step":u,role:"dialog","aria-modal":"true","aria-labelledby":"onboarding-title",className:"fixed inset-0 z-50 grid overflow-y-auto lg:grid-cols-2",onKeyDown:r(z=>{z.key==="Escape"&&t()},"onKeyDown"),children:[(0,a.jsxs)("main",{className:"flex min-h-dvh min-w-0 flex-col gap-4.5 px-4 py-5 sm:px-8 sm:py-8 lg:px-14 lg:py-10",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,a.jsx)(O0,{className:"size-6.5 shrink-0 text-ink","aria-hidden":"true"}),(0,a.jsx)("b",{className:"text-base font-semibold",children:xf})]}),(0,a.jsx)(V6,{step:u}),u===0&&f==="local"?(0,a.jsx)(G6,{status:R,failure:C,command:g,onChooseCommand:v,onRemote:r(()=>h("remote"),"onRemote"),onRetry:r(()=>{s.invalidateQueries({queryKey:kd})},"onRetry")}):null,u===0&&f==="remote"?(0,a.jsx)(Y6,{remote:y,pending:_.isPending,error:_.isError?Zg(_.error):null,onCheck:r(z=>_.mutate(z),"onCheck"),onLocal:r(()=>{h("local"),j(null)},"onLocal")}):null,u===1?(0,a.jsx)(X6,{remote:f==="remote"?y:null,onSignedIn:D}):null,u===2?(0,a.jsx)(Z6,{status:I,remote:f==="remote"?y:null,pending:U.isPending,error:k,onStart:r(z=>U.mutate(z),"onStart")}):null]}),(0,a.jsx)("aside",{className:"hidden min-w-0 flex-col gap-4 border-s border-line-soft bg-bg-3 px-12 py-10 lg:flex",children:K})]})]})})}r(eB,"OnboardingFlowDialog");function tB(){const{openNewIssue:e}=Us();return(0,x.useEffect)(()=>{e()},[e]),(0,a.jsx)(Ve,{to:"/issues",replace:!0})}r(tB,"NewTaskShortcut");var nB="npx @tickernelz/wardmote auth bootstrap-ceo";function Ph({hasActiveInvite:e=!1}){return(0,a.jsxs)("div",{className:"mt-6 border-t border-line pt-5",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,a.jsx)(XS,{className:"size-4 text-ink-3","aria-hidden":!0}),(0,a.jsx)("span",{children:"Prefer to finish setup from the host?"})]}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:e?"A bootstrap invite is already active. Check your Wardmote startup logs for the first-admin URL, or run this command on the host to rotate it:":"Run this command on the host that runs Wardmote to print a one-time first-admin invite URL:"}),(0,a.jsx)("pre",{className:"mt-3 overflow-x-auto rounded-md border border-line bg-bg-3/30 p-3 font-mono text-xs",children:nB})]})}r(Ph,"CliFallback");function Sd({children:e}){return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsx)(Hc,{className:"block p-6",children:e})})}r(Sd,"StateChrome");function aB(e){return e.user.email||e.user.name||e.user.id}r(aB,"displayIdentity");function sB(e){return e?.status===409?{title:"Someone else has already claimed this instance.",body:"Refresh to sign in, or ask the existing admin to invite you from Settings -> Access."}:e?.status===401?{title:"Your session expired. Sign in again to claim this instance.",body:""}:{title:"We couldn't reach the server. Try again in a moment.",body:""}}r(sB,"claimErrorCopy");function iB({claimAvailable:e,hasActiveInvite:t=!1,session:s,claimState:l,claimError:c,onClaim:u}){if(!e)return(0,a.jsxs)(Sd,{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"This Wardmote is waiting on its first admin"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This instance runs in invite-only mode. The operator must generate a one-time first-admin invite URL from the host. Once you have the link, open it from this browser to finish setup."}),(0,a.jsx)(Ph,{hasActiveInvite:t}),(0,a.jsx)("p",{className:"mt-4 text-xs text-ink-3",children:"Browser-based claim is intentionally disabled in public mode so anyone on the network can't promote themselves."})]});if(l==="success")return(0,a.jsxs)(Sd,{children:[(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("div",{className:"mt-0.5 flex size-9 flex-shrink-0 items-center justify-center rounded-full bg-emerald-500/15 text-emerald-600 dark:text-emerald-400",children:(0,a.jsx)(Ac,{className:"size-5","aria-hidden":!0})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"You're the instance admin"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Setup is complete. Taking you to onboarding to create your first organization..."})]})]}),(0,a.jsxs)("div",{className:"mt-5 flex items-center gap-3",children:[(0,a.jsx)(Ma,{className:"size-4 animate-spin text-ink-3","aria-hidden":!0}),(0,a.jsx)("span",{className:"text-sm text-ink-3",children:"Redirecting..."})]}),(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(oe,{asChild:!0,variant:"secondary",children:(0,a.jsx)("a",{href:"/",children:"Continue to dashboard"})})})]});if(!s)return(0,a.jsxs)(Sd,{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Sign in or create your Wardmote account to become the first admin from this browser."}),(0,a.jsx)("div",{className:"mt-5",children:(0,a.jsx)(oe,{asChild:!0,children:(0,a.jsx)(mn,{to:"/auth?next=/",children:"Sign in / Create account"})})}),(0,a.jsx)(Ph,{hasActiveInvite:t})]});const p=sB(c),f=l==="claiming";return(0,a.jsxs)(Sd,{children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"No admin has claimed this instance yet. Claim it now to become the first admin and start onboarding."}),(0,a.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,a.jsxs)(oe,{onClick:u,disabled:f,children:[f&&(0,a.jsx)(Ma,{className:"mr-2 size-4 animate-spin","aria-hidden":!0}),f?"Claiming...":"Claim this instance"]}),(0,a.jsxs)("span",{className:"text-sm text-ink-3",children:["Signed in as ",(0,a.jsx)("span",{className:"font-medium text-ink",children:aB(s)})]})]}),(0,a.jsxs)("p",{className:"mt-3 text-xs text-ink-3",children:["Wrong account?"," ",(0,a.jsx)(mn,{to:"/auth?next=/",className:"underline underline-offset-2",children:"Switch account"}),"."]}),c&&(0,a.jsxs)("div",{role:"alert",className:"mt-4 flex items-start gap-2 rounded-md border border-bad/40 bg-bad/10 p-3 text-sm text-bad",children:[(0,a.jsx)(ai,{className:"mt-0.5 size-4 flex-shrink-0","aria-hidden":!0}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:p.title}),p.body&&(0,a.jsx)("p",{className:"mt-1 text-bad/90",children:p.body})]})]}),(0,a.jsx)(Ph,{hasActiveInvite:t})]})}r(iB,"BootstrapPendingPage");var Nd=5e3;function rB({temporary:e,retrying:t,onRetry:s}){return(0,a.jsxs)("div",{className:"mx-auto flex max-w-xl flex-col gap-4 px-4 py-16",children:[(0,a.jsx)(nl,{className:"size-6 text-ink-3","aria-hidden":"true"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",role:"status",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:e?"Reconnecting to Wardmote":"Unable to load Wardmote"}),(0,a.jsx)("p",{className:"text-sm text-ink-3",children:e?"The server may be restarting or your connection was interrupted. We’ll try again every few seconds and reconnect automatically.":"We couldn’t check your access to this instance. Try again, or contact your instance administrator if this continues."})]}),(0,a.jsx)("div",{children:(0,a.jsx)(oe,{variant:"secondary",onClick:s,disabled:t,children:t?"Connecting…":"Try again"})})]})}r(rB,"CloudAccessError");function lB(){return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsxs)(Hc,{className:"block p-6",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"No organization access"}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"This account is signed in, but it does not have an active organization membership or instance-admin access on this Wardmote instance."}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Use an organization invite or sign in with an account that already belongs to this org."})]})})}r(lB,"NoBoardAccessPage");function ek({allowMembershipRequest:e=!1}={}){const t=hn(),s=kn(),[l,c]=(0,x.useState)(!1),u=me({queryKey:$.health,queryFn:r(()=>Fc.get(),"queryFn"),retry:!1,refetchInterval:r(R=>{if(R.state.error)return Pr(R.state.error)?Nd:!1;const _=R.state.data;return _?.status==="starting"?Nd:_?.deploymentMode==="authenticated"&&_.bootstrapStatus==="bootstrap_pending"?2e3:!1},"refetchInterval"),refetchIntervalInBackground:!0}),p=u.data?.deploymentMode==="authenticated",f=p&&u.data?.bootstrapStatus==="bootstrap_pending",h=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),enabled:p,retry:!1,refetchInterval:r(R=>Pr(R.state.error)?Nd:!1,"refetchInterval"),refetchIntervalInBackground:!0}),g=me({queryKey:$.access.currentBoardAccess,queryFn:r(()=>ti.getCurrentBoardAccess(),"queryFn"),enabled:p&&!f&&!!h.data,retry:!1,refetchInterval:r(R=>Pr(R.state.error)?Nd:!1,"refetchInterval"),refetchIntervalInBackground:!0}),v=Bt({mutationFn:r(()=>ti.claimBootstrapAdmin(),"mutationFn"),onSuccess:r(async()=>{await s.invalidateQueries({queryKey:$.auth.session}),await s.invalidateQueries({queryKey:$.health}),await s.invalidateQueries({queryKey:$.companies.all}),await s.invalidateQueries({queryKey:$.companies.stats}),await s.invalidateQueries({queryKey:$.access.currentBoardAccess})},"onSuccess")}),y=[u,...p?[h]:[],...p&&!f&&h.data?[g]:[]],j=u.data?.status==="starting",k=j||y.some(R=>Pr(R.error)),S=y.find(R=>R.error&&!(R.data!==void 0&&Pr(R.error)))?.error,N=u.isLoading||p&&h.isLoading||p&&!f&&!!h.data&&g.isLoading,I=e||!p||!!g.data?.isInstanceAdmin||(g.data?.companyIds.length??0)>0,C=!N&&!S&&!f&&(!p||!!h.data)&&I;(0,x.useEffect)(()=>{C?u.data?.status==="ok"&&c(!0):c(!1)},[C,u.data?.status]);const M=(0,x.useRef)(!1);if((0,x.useEffect)(()=>{k?M.current=!0:M.current&&!N&&!S&&(M.current=!1,s.invalidateQueries({predicate:r(R=>Pr(R.state.error),"predicate")}))},[k,N,S,s]),S||j&&!l)return(0,a.jsx)(rB,{temporary:S?Pr(S):!0,retrying:y.some(R=>R.isFetching),onRetry:r(()=>{for(const R of y)(R.error||R===u&&j)&&R.refetch({cancelRefetch:!1})},"onRetry")});if(N)return(0,a.jsx)(Ds,{});if(f){const R=u.data;if(!R)return(0,a.jsx)(Ds,{});const _=v.error instanceof Ti?{status:v.error.status,message:v.error.message}:v.error instanceof Error?{message:v.error.message}:null;return(0,a.jsx)(iB,{claimAvailable:R.deploymentExposure==="private",hasActiveInvite:R.bootstrapInviteActive,session:h.data,claimState:v.isSuccess?"success":v.isPending?"claiming":"idle",claimError:_,onClaim:r(()=>v.mutate(),"onClaim")})}if(p&&!h.data){const R=encodeURIComponent(`${t.pathname}${t.search}`);return(0,a.jsx)(Ve,{to:`/auth?next=${R}`,replace:!0})}return I?(0,a.jsxs)(a.Fragment,{children:[k&&(0,a.jsx)("div",{role:"status",className:"bg-bg-3 px-4 py-2 text-center text-sm text-ink-3",children:"Connection interrupted. Reconnecting automatically…"}),(0,a.jsx)(xo,{})]}):(0,a.jsx)(lB,{})}r(ek,"CloudAccessGate");var LA=["all","active","paused","error","builtin"];function oB({endpointId:e,children:t}){const s=me({queryKey:$.chatEndpoints.detail(e),queryFn:r(()=>t1.get(e),"queryFn")}),{enabled:l,githubEnabled:c}=C0();return s.isError?(0,a.jsxs)("div",{className:"space-y-3 p-6",children:[(0,a.jsx)("p",{role:"alert",className:"text-sm text-bad",children:s.error.message}),(0,a.jsx)(oe,{variant:"secondary",onClick:r(()=>{s.refetch()},"onClick"),children:"Retry"})]}):s.data?mS(s.data.provider,l,c)?(0,a.jsx)(a.Fragment,{children:t}):(0,a.jsx)(Ve,{to:"/apps",replace:!0}):null}r(oB,"ProviderEndpointGate");function Cd({children:e}){const{enabled:t,githubEnabled:s,loaded:l}=C0(),[c]=cS(),{endpointId:u}=Ps();return!u&&c.get("provider")==="agentmail"?(0,a.jsx)(a.Fragment,{children:e}):l?u?(0,a.jsx)(oB,{endpointId:u,children:e}):mS(c.get("provider"),t,s)?(0,a.jsx)(a.Fragment,{children:e}):(0,a.jsx)(Ve,{to:"/apps",replace:!0}):null}r(Cd,"ChatConnectorsExperimentalGate");Ce(()=>ke(()=>import("./TaskChatLab-BfJcSULz.js").then(e=>e.TaskChatLab),__vite__mapDeps([2,1,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,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118])));var cB=Ce(()=>ke(()=>import("./Cases-DySeA3ym.js").then(e=>e.Cases),__vite__mapDeps([119,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,121,40,122,123,7,9,124,125,95,126,127,128,38,129,76]))),uB=Ce(()=>ke(()=>import("./CaseDetail-dci6PiNM.js").then(e=>e.CaseDetail),__vite__mapDeps([130,1,3,16,17,20,131,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,90,113,114,80,81,4,41,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,94,14,98,76,89,88,100,36,37,132,74,133,79,82,83,84,85,86,66,87,91,92,93,65,40,134,61,135,136,137,138,12,101,124,139,140,141,142,143,75,62,70,18,35,71,72,73,77,13,144,118,145,125,99,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,67,161,162,163,164,165,166,167,168,127,169,116,117,170,95,126,171,172,173,174,175,176,128,177,178]))),dB=Ce(()=>ke(()=>import("./Dashboard-CHGehxNs.js").then(e=>e.Dashboard),__vite__mapDeps([179,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,138,65,41,180,181,7,9,97,182,55,183,145,184,185,37,186,187,126,162,160,67,98,174,188,189]))),fB=Ce(()=>ke(()=>import("./Companies-gUbW68nN.js").then(e=>e.Companies),__vite__mapDeps([190,1,3,20,22,21,113,25,8,26,114,80,27,81,4,41,5,141,29,115,7,9,13,170,102,76,124,95,126,174]))),pB=Ce(()=>ke(()=>import("./Agents-C1-WHkTj.js").then(e=>e.Agents),__vite__mapDeps([191,1,3,17,16,20,192,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,133,80,81,9,65,7,71,10,193,13,98,88,44,89,90,37,55,109,140,183,145,194,99,74,76,195,196,126,197,39,198,40,173,162,160,67,171,82,83,172,199,200,201,174,202,203,204]))),$h=Ce(()=>ke(()=>import("./AgentDetail-DwlY6mx-.js").then(e=>e.AgentDetail),__vite__mapDeps([205,1,3,16,17,20,206,192,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,243,244,245,246,69,42,46,48,50,52,54,56,58,59,61,70,18,35,62,71,72,73,75,77,78,94,96,109,146,111,132,182,125,247,248,249,163,250,251,252,153,253,254,106,255,256,257,258,202,259,260,261,262,11,263,264,265,174,266]))),mB=Ce(()=>ke(()=>import("./Projects-BsZYs3Fo.js").then(e=>e.Projects),__vite__mapDeps([267,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,121,4,7,9,13,125,126,174,260,261,204]))),Br=Ce(()=>ke(()=>import("./ProjectDetail-DOF0t71W.js").then(e=>e.ProjectDetail),__vite__mapDeps([268,1,3,16,17,20,22,207,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,133,141,46,269,270,174,109,183,145,125,146,184,186,187,271,272,42,48,50,52,54,56,58,59,175,176,167,260,261,273,248,274,249,275,276,101,139,259]))),hB=Ce(()=>ke(()=>import("./ProjectWorkspaceDetail-BEbFq9oK.js").then(e=>e.ProjectWorkspaceDetail),__vite__mapDeps([277,1,3,16,17,20,137,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,138,34,7,9,12,14,101,124,139,140,133,80,81,211,99,74,76,212,4,125,184,185,37,186,187,126,174,167,84,278]))),gB=Ce(()=>ke(()=>import("./Workspaces-BeS2M4CD.js").then(e=>e.Workspaces),__vite__mapDeps([279,1,3,20,206,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,140,126,273,65,42,43,44,45,46,4,47,48,49,6,34,50,51,52,53,54,55,56,38,57,58,59,155,124,37,99,74,76,162,160,67,98,171,82,83,80,40,172,248,207,208,209,210,203,120,108,79,81,84,85,86,66,87,88,89,90,91,92,93,211,212,142,143,41,213,214,152,215,216,113,114,115,217,154,13,14,218,161,219,118,173,220,221,222,95,223,100,180,224,225,193,12,97,105,170,226,185,227,228,229,230,231,197,39,198,232,233,234,235,236,199,200,237,201,238,239,240,241,36,242,274,109,249,276,101,125,139,259]))),xB=Ce(()=>ke(()=>import("./Issues-ButYwujh.js").then(e=>e.Issues),__vite__mapDeps([280,1,3,16,17,20,206,281,22,136,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,46,121,4,41,48,49,224,7,11,13,14,98,87,76,185,89,90,37,55,109,140,183,145,125,99,74,146,282,147,126,148,88,44,174,59,283,42,43,45,47,6,34,50,51,52,53,54,56,38,57,58,161,97,167,84,203,113,114,79,82,83,85,86,66,91,92,93,143,40,115,12,284,101,124,100,197,39,198,173,235,236,118,231,199,65,285,253,286,104,287,69,61,70,18,35,36,62,71,72,73,75,77,78,94,95,96]))),bB=Ce(()=>ke(()=>import("./Search-B_dblFtf.js").then(e=>e.Search),__vite__mapDeps([288,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,113,114,80,81,41,133,9,121,40,289,61,7,13,14,98,255,87,76,185,124,88,44,89,90,55,125,95,227,126,148,35,173,59,132,74]))),vB=Ce(()=>ke(()=>import("./IssueDetail-issXYSBj.js").then(e=>e.t).then(e=>e.IssueDetail),__vite__mapDeps([290,1,3,25,8,16,17,20,206,192,22,207,208,209,140,21,19,23,24,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,18,35,136,243,291,106,164,165,166,131,42,46,48,50,52,54,56,58,59,94,132,251,252,292,293,294,295,133,121,75,244,245,246,69,61,70,62,71,72,73,77,78,96,109,146,111,296,134,63,64,68,101,102,103,289,297,298,135,137,138,139,141,144,145,125,147,148,149,150,151,153,156,157,158,159,163,167,168,127,104,299,300,117,301,110,302,303,10,11,304,15,60,107,112,116,305,183,194,282,184,186,187,247,271,287,306,307,308,309,310,174,249,285,250,311,312,313,283,176,272,175,253,314,315,254,255,316]))),yB=Ce(()=>ke(()=>import("./AgentChats-XK32PfX0.js").then(e=>e.AgentChats),__vite__mapDeps([317,1,3,19,16,17,20,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,88,44,89,90,126,318]))),jB=Ce(()=>ke(()=>import("./AgentChat-b78UeZDu.js").then(e=>e.AgentChat),__vite__mapDeps([319,1,3,16,17,20,22,290,25,8,206,192,207,208,209,140,21,19,23,24,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,18,35,136,243,291,106,164,165,166,131,42,46,48,50,52,54,56,58,59,94,132,251,252,292,293,294,295,133,121,75,244,245,246,69,61,70,62,71,72,73,77,78,96,109,146,111,296,134,63,64,68,101,102,103,289,297,298,135,137,138,139,141,144,145,125,147,148,149,150,151,153,156,157,158,159,163,167,168,127,104,299,300,117,301,110,302,303,10,11,304,15,60,107,112,116,305,183,194,282,184,186,187,247,271,287,306,307,308,309,310,174,249,285,250,311,312,313,283,176,272,175,253,314,315,254,255,316,320,318]))),wB=Ce(()=>ke(()=>import("./IssueChatLongThreadPerf-BWbJprSQ.js").then(e=>e.IssueChatLongThreadPerf),__vite__mapDeps([321,1,3,124,8,9,174,309,16,17,20,207,22,208,209,140,21,19,23,24,25,26,27,28,29,5,30,31,32,33,210,203,74,7,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,243,310,11,35,151,149,42,46,48,50,52,54,56,58,59,299,61,78,75,94,96,300,117,102,147,301,110,302,303,101,116,109,153,107,249,285,158,159,163,250,251,252,311,165]))),kB=Ce(()=>ke(()=>import("./Routines-BE2PduWG.js").then(e=>e.Routines),__vite__mapDeps([322,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,79,43,44,45,80,74,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,121,4,40,41,7,9,13,144,37,55,109,183,145,125,99,146,323,126,150,149,151,152,171,172,174,324,203,113,114,115,170,95,132,325,108,213,214,215,6,297,51,298,124,140,100,200,38,168]))),SB=Ce(()=>ke(()=>import("./Pipelines-n5EQOzN2.js").then(e=>e.Learnings),__vite__mapDeps([326,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,131,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,132,74,120,79,82,83,84,85,86,66,87,91,92,93,121,143,40,172,61,328,67,299,207,208,209,140,210,203,108,211,99,212,142,65,213,214,152,215,160,216,217,154,13,218,161,219,118,124,173,220,221,222,95,223,180,224,225,193,12,155,97,105,170,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,234,235,236,199,200,237,201,238,239,240,241,242,78,75,35,96,300,117,102,301,110,302,303,305,109,174,309,243,310,11,151,149,101,116,153,107,249,285,158,159,163,250,251,252,311,165,157,312,176,77,178,329]))),NB=Ce(()=>ke(()=>import("./Pipelines-n5EQOzN2.js").then(e=>e.PipelineItemDetail),__vite__mapDeps([326,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,131,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,132,74,120,79,82,83,84,85,86,66,87,91,92,93,121,143,40,172,61,328,67,299,207,208,209,140,210,203,108,211,99,212,142,65,213,214,152,215,160,216,217,154,13,218,161,219,118,124,173,220,221,222,95,223,180,224,225,193,12,155,97,105,170,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,234,235,236,199,200,237,201,238,239,240,241,242,78,75,35,96,300,117,102,301,110,302,303,305,109,174,309,243,310,11,151,149,101,116,153,107,249,285,158,159,163,250,251,252,311,165,157,312,176,77,178,329]))),CB=Ce(()=>ke(()=>import("./Pipelines-n5EQOzN2.js").then(e=>e.PipelineItemLegacyRedirect),__vite__mapDeps([326,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,131,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,132,74,120,79,82,83,84,85,86,66,87,91,92,93,121,143,40,172,61,328,67,299,207,208,209,140,210,203,108,211,99,212,142,65,213,214,152,215,160,216,217,154,13,218,161,219,118,124,173,220,221,222,95,223,180,224,225,193,12,155,97,105,170,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,234,235,236,199,200,237,201,238,239,240,241,242,78,75,35,96,300,117,102,301,110,302,303,305,109,174,309,243,310,11,151,149,101,116,153,107,249,285,158,159,163,250,251,252,311,165,157,312,176,77,178,329]))),Uh=Ce(()=>ke(()=>import("./Pipelines-n5EQOzN2.js").then(e=>e.Pipelines),__vite__mapDeps([326,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,131,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,132,74,120,79,82,83,84,85,86,66,87,91,92,93,121,143,40,172,61,328,67,299,207,208,209,140,210,203,108,211,99,212,142,65,213,214,152,215,160,216,217,154,13,218,161,219,118,124,173,220,221,222,95,223,180,224,225,193,12,155,97,105,170,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,234,235,236,199,200,237,201,238,239,240,241,242,78,75,35,96,300,117,102,301,110,302,303,305,109,174,309,243,310,11,151,149,101,116,153,107,249,285,158,159,163,250,251,252,311,165,157,312,176,77,178,329]))),AB=Ce(()=>ke(()=>import("./Pipelines-n5EQOzN2.js").then(e=>e.ReviewQueue),__vite__mapDeps([326,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,131,90,113,114,80,81,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,56,38,57,58,59,115,94,14,76,89,88,100,36,37,132,74,120,79,82,83,84,85,86,66,87,91,92,93,121,143,40,172,61,328,67,299,207,208,209,140,210,203,108,211,99,212,142,65,213,214,152,215,160,216,217,154,13,218,161,219,118,124,173,220,221,222,95,223,180,224,225,193,12,155,97,105,170,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,234,235,236,199,200,237,201,238,239,240,241,242,78,75,35,96,300,117,102,301,110,302,303,305,109,174,309,243,310,11,151,149,101,116,153,107,249,285,158,159,163,250,251,252,311,165,157,312,176,77,178,329]))),_B=Ce(()=>ke(()=>import("./PipelineSettings-UFCz50OY.js").then(e=>e.PipelineSettings),__vite__mapDeps([330,1,3,16,17,20,22,327,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,98,55,125,146,147,210,113,114,80,81,4,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,90,91,92,93,138,46,143,159,40,216,213,7,9,214,99,152,215,160,115,217,154,53,13,14,218,161,219,118,124,37,173,220,11,12,170,140,95,126,223,100,150,149,231,151,329,331,108,47,171,172]))),tk=Ce(()=>ke(()=>import("./StatusCards-BpujcoJb.js").then(e=>e.StatusCards),__vite__mapDeps([332,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,120,4,113,114,80,81,41,133,9,40,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,54,55,56,38,57,58,59,115,180,13,155,98,333,118,85,83,124,88,89,90,99,74,76,95,126,100,151,149,152,162,160,67,171,82,172,132,274,109,249]))),EB=Ce(()=>ke(()=>import("./PixelsOffice-De61dU2s.js").then(e=>e.PixelsOffice),__vite__mapDeps([334,1,3,20,43,44,45,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,245,80,82,83,335,34,224,7,9,11,12,304,76,185,124,37,55,109,146,91,92,126,174,132,74,336,299,207,208,209,140,210,203,120,4,108,79,81,84,85,86,66,87,88,89,90,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,173,220,221,222,95,223,100,38,180,51,225,193,155,97,105,170,98,226,227,228,229,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,48,42,46,50,52,54,56,58,59,61,78,75,94,35,96,300,117,102,147,301,110,302,303,329,275]))),nk=Ce(()=>ke(()=>import("./RoutineDetail-DWqy00zc.js").then(e=>e.RoutineDetail),__vite__mapDeps([337,1,3,16,17,20,131,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,90,113,114,80,81,4,41,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,94,14,98,76,89,88,100,36,37,132,74,108,79,82,83,84,85,86,66,87,91,92,93,138,142,246,160,216,40,213,214,99,152,215,217,154,13,218,161,219,118,124,173,220,338,12,304,144,170,339,226,185,109,125,95,146,227,126,223,150,149,231,151,233,171,172,237,174,259,262,203,11,177,340,162,67,325,297,298,140,200,168,331,210,341]))),IB=Ce(()=>ke(()=>import("./UserProfile-BkcJ9Wfx.js").then(e=>e.UserProfile),__vite__mapDeps([342,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,90,160,7,9,219,195,196,126]))),Ql=Ce(()=>ke(()=>import("./ExecutionWorkspaceDetail-_LuHtfta.js").then(e=>e.ExecutionWorkspaceDetail),__vite__mapDeps([343,1,3,16,17,20,137,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,138,34,7,9,12,14,101,124,139,140,133,80,81,4,40,6,144,98,37,55,109,183,145,125,95,184,185,186,187,91,92,126,100,38,174,167,84,259,273,65,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,58,59,155,99,74,76,162,160,67,171,82,83,172,248,207,208,209,210,203,120,108,79,85,86,66,87,88,89,90,93,211,212,142,143,41,213,214,152,215,216,113,114,115,217,154,13,218,161,219,118,173,220,221,222,223,180,224,225,193,97,105,170,226,227,228,229,230,231,197,39,198,232,233,234,235,236,199,200,237,201,238,239,240,241,36,242,274,249,278,325,297,298,150,149,151,168]))),TB=Ce(()=>ke(()=>import("./Goals-BXW_WXNa.js").then(e=>e.Goals),__vite__mapDeps([344,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,13,126,345,41]))),ak=Ce(()=>ke(()=>import("./Artifacts-Cfi9iGlP.js").then(e=>e.Artifacts),__vite__mapDeps([346,1,3,16,17,20,206,18,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,4,6,34,12,35,36,37,38,113,114,80,81,41,212,7,9,76,124,95,126,315]))),RB=Ce(()=>ke(()=>import("./GoalDetail-Bd04vnyA.js").then(e=>e.GoalDetail),__vite__mapDeps([347,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,7,13,55,125,126,230,272,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,90,91,92,93,42,46,4,47,48,49,6,34,50,51,52,53,54,56,38,57,58,59,175,176,40,172,167,204,345,41]))),sk=Ce(()=>ke(()=>import("./Approvals-ecXixAXF.js").then(e=>e.Approvals),__vite__mapDeps([348,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,97,124,55,126,313,48,49,7,148,88,44,89,90,174,283,42,43,45,46,4,47,6,34,50,51,52,53,54,56,38,57,58,59,161]))),MB=Ce(()=>ke(()=>import("./ApprovalDetail-BchdkauI.js").then(e=>e.ApprovalDetail),__vite__mapDeps([349,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,42,43,44,45,46,4,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,89,90,126,148,88,100,283,161,97]))),DB=Ce(()=>ke(()=>import("./CompanyActivity-CbIPKv4K.js").then(e=>e.CompanyActivity),__vite__mapDeps([350,1,3,351,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,108,133,80,81,9,138,352,143,65,40,41,335,7,10,54,13,14,284,161,270,98,95,174,185,124,44,89,90,88,37,55,109,99,74,76,146,227,323,91,92,126,148,171,82,83,4,172,316,164,165,166,353,354,275,341,355]))),Ad=Ce(()=>ke(()=>import("./AuditHub-DlVx-mPL.js").then(e=>e.AuditHub),__vite__mapDeps([351,1,3,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,108,133,80,81,9,138,352,143,65,40,41,335,7,10,54,13,14,284,161,270,98,95,174,185,124,44,89,90,88,37,55,109,99,74,76,146,227,323,91,92,126,148,171,82,83,4,172,316,164,165,166,353,354,275,341,355]))),OB=Ce(()=>ke(()=>import("./WhatNeedsMe-Bg72QkYe.js").then(e=>e.WhatNeedsMe),__vite__mapDeps([356,1,3,16,17,20,22,357,206,192,43,44,45,251,252,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,120,4,113,114,80,81,41,142,121,86,40,172,48,49,42,46,47,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,169,299,207,208,209,140,203,74,108,79,82,83,84,85,66,87,76,88,89,90,91,92,93,211,99,212,143,65,213,214,152,215,160,216,217,154,13,14,218,161,219,118,124,37,173,220,221,222,95,223,100,180,224,225,193,12,155,97,105,170,98,226,185,227,228,229,126,230,231,197,39,198,162,67,232,233,171,234,235,236,199,200,237,201,238,239,240,241,36,242,61,78,75,94,35,96,300,117,102,147,301,110,302,303,294,358,146,164,165,166,336,109,183,145]))),LB=Ce(()=>ke(()=>import("./DecisionQueuePage-B55ERukD.js").then(e=>e.DecisionQueuePage),__vite__mapDeps([359,1,3,16,17,20,22,357,206,192,43,44,45,251,252,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,120,4,113,114,80,81,41,142,121,86,40,172,48,49,42,46,47,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,115,169,299,207,208,209,140,203,74,108,79,82,83,84,85,66,87,76,88,89,90,91,92,93,211,99,212,143,65,213,214,152,215,160,216,217,154,13,14,218,161,219,118,124,37,173,220,221,222,95,223,100,180,224,225,193,12,155,97,105,170,98,226,185,227,228,229,126,230,231,197,39,198,162,67,232,233,171,234,235,236,199,200,237,201,238,239,240,241,36,242,61,78,75,94,35,96,300,117,102,147,301,110,302,303,294,358,146,164,165,166,336]))),zB=Ce(()=>ke(()=>import("./BoardChat-BWW2praB.js").then(e=>e.BoardChat),__vite__mapDeps([360,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,113,114,80,81,4,41,138,39,40,160,361,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,61,169,261,94,362,305,98,87,182,118,85,83,88,89,90,183,145,92,126,35,174,112,115,116,117,76,99,74,100,36,37,132]))),PB=Ce(()=>ke(()=>import("./CompanySettings-ifpz0tmL.js").then(e=>e.CompanySettings),__vite__mapDeps([363,1,3,16,17,20,22,21,210,25,8,26,203,74,27,7,9,40,213,23,24,4,76,214,31,99,152,215,10,13,124,37,140,95,196,126,230,231,171,82,83,80,172,236,41,47,118,85,199,65,30,302,364,207,208,209,19,28,29,5,32,33,120,108,79,43,44,45,81,84,86,66,87,88,89,90,91,92,93,211,212,142,143,160,49,6,216,113,114,115,217,154,53,14,218,161,219,173,220,34,221,222,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,197,39,198,162,67,232,233,234,235,200,237,57,201,238,239,240,241,36,242,353]))),$B=Ce(()=>ke(()=>import("./CompanyConnections-BezhEQiP.js").then(e=>e.CompanyConnections),__vite__mapDeps([365,1,3,20,207,16,17,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,364,353,354]))),Bh=Ce(()=>ke(()=>import("./CompanyEnvironments-6-P8NN3Q.js").then(e=>e.CompanyEnvironments),__vite__mapDeps([366,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,203,74,7,9,212,4,216,113,114,80,81,41,40,213,76,214,99,152,215,160,115,217,154,53,13,14,218,161,219,118,85,83,124,37,173,220,225,12,155,170,55,140,126,223,234,120,108,95,100,171,82,172,236,47,231,199,65,200,201,295]))),UB=Ce(()=>ke(()=>import("./BootstrapSetupUxLab-C4zke6Cv.js").then(e=>e.BootstrapSetupUxLab),__vite__mapDeps([367,1,3,7,8,9,97,33,98,174]))),BB=Ce(()=>ke(()=>import("./ResponsibleUserDenialUxLab-DN6KJXcW.js").then(e=>e.ResponsibleUserDenialUxLab),__vite__mapDeps([368,1,3,174,254,243,106,255]))),KB=Ce(()=>ke(()=>import("./CrossIssueCollaborationUxLab-Dm0T3f-s.js").then(e=>e.CrossIssueCollaborationUxLab),__vite__mapDeps([369,1,3,291,243,142,49,217,97,106,164,165,166,90,25,8,26,89,174,311,118,85,83,124,9]))),qB=Ce(()=>ke(()=>import("./CompanySettingsPluginPage-BCK7KaI1.js").then(e=>e.CompanySettingsPluginPage),__vite__mapDeps([370,1,3,16,17,21,20,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,184,185,37,186,187,126]))),FB=Ce(()=>ke(()=>import("./CompanyAccess-C0cDvj8M.js").then(e=>e.CompanyAccess),__vite__mapDeps([371,1,3,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,90,133,80,81,9,4,6,7,97,170,124,37,55,99,74,76,146,184,185,186,187,195,196,126,38]))),HB=Ce(()=>ke(()=>import("./CompanyAccess-C0cDvj8M.js").then(e=>e.CompanyAccessLegacyRoute),__vite__mapDeps([371,1,3,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,90,133,80,81,9,4,6,7,97,170,124,37,55,99,74,76,146,184,185,186,187,195,196,126,38]))),ik=Ce(()=>ke(()=>import("./AdvancedToolsRoute-DlPZ_L6N.js").then(e=>e.AdvancedToolsRoute),__vite__mapDeps([372,1,3,16,17,20,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,141,64,361,269,10,373,102,125,146,174,132,265,189,374,375,192]))),rk=Ce(()=>ke(()=>import("./ProfileWizardRoute-o4Kf_DhP.js").then(e=>e.ProfileWizardRoute),__vite__mapDeps([376,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,120,4,108,40,41,7,9,300,13,76,124,37,95,228,126,100,232,88,44,89,90,227,171,82,83,80,172,173,265,98,174,375,192,55,125,91,92,377,161,146]))),VB=Ce(()=>ke(()=>import("./ProfileDetailRoute-DCbTvhPd.js").then(e=>e.ProfileDetailRoute),__vite__mapDeps([378,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,108,141,6,7,9,97,170,166,124,37,99,74,76,95,228,126,100,265,98,174,374,375,192,55,125,91,92,377,161,146]))),WB=Ce(()=>ke(()=>import("./Browse-DLwvtbXu.js").then(e=>e.Browse),__vite__mapDeps([379,1,3,20,192,22,380,16,17,208,209,140,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,203,74,7,9,120,4,41,155,98,219,89,90,109,99,76,95,227,228,56,162,160,67,233,355,381,113,114,80,81,108,293,115,34,225,222,170,118,85,83,88,44,37,55,146,247,229,126,242,110,382,383,133,6,300,182,38,237,100,57]))),zA=Ce(()=>ke(()=>import("./AppsConnect-eslQZ4Lz.js").then(e=>e.AppsConnect),__vite__mapDeps([384,1,3,16,17,20,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,381,385]))),QB=Ce(()=>ke(()=>import("./ChatEndpointSetup-D82OKj2o.js").then(e=>e.ChatEndpointSetup),__vite__mapDeps([386,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,108,47,6,34,217,154,7,9,98,226,185,118,85,83,88,44,89,90,37,55,140,125,99,74,76,95,196,247,126,100,232,41,227,38,241,36,387,212,142,228,174,110,303,259,263,161,236,40,231,199,65,388]))),lk=Ce(()=>ke(()=>import("./ChatEndpointDetail-DYg7hB9_.js").then(e=>e.ChatEndpointDetail),__vite__mapDeps([389,1,3,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,203,74,7,9,120,4,113,114,80,81,41,108,79,43,44,45,82,83,84,85,86,66,87,76,88,89,90,91,92,93,138,352,143,40,47,42,46,48,49,6,34,50,51,52,53,54,55,56,38,57,58,59,115,11,12,13,155,170,98,118,124,37,99,95,146,247,228,229,126,100,231,240,239,110,259,390,232,227,233,387,212,142,125,174,303,263,161,236,199,65,388]))),GB=Ce(()=>ke(()=>import("./ChatIdentityConfirm-BJoMzDSS.js").then(e=>e.ChatIdentityConfirm),__vite__mapDeps([391,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,196,247]))),YB=Ce(()=>ke(()=>import("./AppsReview-DSeqYXkI.js").then(e=>e.AppsReview),__vite__mapDeps([392,1,3,21,20,22,126,393,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,4,42,43,44,45,46,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,299,207,208,209,140,210,203,74,120,108,79,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,216,113,114,115,217,154,13,14,218,161,219,118,124,37,173,220,221,222,95,223,100,180,224,225,193,12,155,97,105,170,98,226,185,227,228,229,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,201,238,239,240,241,36,242,61,78,75,94,35,96,300,117,102,147,301,110,302,303]))),XB=Ce(()=>ke(()=>import("./AppDetail-9cue4nY2.js").then(e=>e.AppDetail),__vite__mapDeps([394,1,3,16,17,20,22,207,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,380,109,56,355,381,146,306,382,385,390,387,125,174,110,303,259,263,393,42,46,48,50,52,54,58,59,299,61,78,75,94,35,96,300,117,102,147,301,302]))),ok=Ce(()=>ke(()=>import("./AppNotConnected-oZ4OtRZ5.js").then(e=>e.AppNotConnected),__vite__mapDeps([395,1,3,16,17,20,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,394,380,109,56,355,381,146,306,382,385,390,387,125,174,110,303,259,263,393,42,46,48,50,52,54,58,59,299,61,78,75,94,35,96,300,117,102,147,301,302]))),ck=Ce(()=>ke(()=>import("./GatewaysList-CZ-_zFD_.js").then(e=>e.GatewaysList),__vite__mapDeps([396,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,13,37,55,125,95,227,228,126,231,265,98,124,174,397,138,6,53,99,74,76,38]))),ZB=Ce(()=>ke(()=>import("./GatewayDetail-BKCHLhcu.js").then(e=>e.GatewayDetail),__vite__mapDeps([398,1,3,16,17,20,206,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,65,246,4,40,75,41,172,213,7,9,76,214,74,99,152,215,47,308,6,53,269,13,362,118,85,83,37,55,125,95,227,228,126,231,38,265,98,124,174,397,138]))),JB=Ce(()=>ke(()=>import("./CompanySkills-mzA6IM7-.js").then(e=>e.CompanySkills),__vite__mapDeps([399,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,113,114,80,81,41,133,9,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,90,91,92,93,212,40,75,160,47,42,46,48,49,6,34,50,51,52,53,7,54,55,56,38,57,58,59,308,115,154,61,180,298,225,68,11,13,155,218,305,161,97,170,98,102,182,118,124,37,125,99,95,126,148,100,162,67,232,227,240,239,36,258,259,177,400,324,203,132,401]))),uk=Ce(()=>ke(()=>import("./SkillSources-C8inxmWw.js").then(e=>e.SkillSources),__vite__mapDeps([402,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,113,114,80,81,4,41,160,134,34,61,7,9,13,155,98,99,74,76,95,56,126,214,242,77,401,403,67,124,385]))),Kh=Ce(()=>ke(()=>import("./SkillStudio-8S7xrus7.js").then(e=>e.SkillStudio),__vite__mapDeps([404,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,90,113,114,80,81,4,41,108,133,9,79,43,44,45,74,82,83,84,85,86,66,87,76,88,89,91,92,93,212,40,213,7,214,99,152,215,405,65,154,221,120,6,53,222,161,118,124,37,95,223,100,38,333,49,42,46,47,48,34,50,51,52,54,55,56,57,58,59,115,61,180,328,67,71,299,207,208,209,140,203,211,142,143,160,216,217,13,14,218,219,173,220,224,225,193,12,155,97,105,170,98,226,185,227,228,229,126,230,231,197,39,198,162,232,233,171,172,234,235,236,199,200,237,201,238,239,240,241,36,242,78,75,94,35,96,300,117,102,147,301,110,302,303,148,149,174,73,77,176,132,258,204,177,129,400,401,399,308,298,68,11,305,182,125,259,324,406,407]))),eK=Ce(()=>ke(()=>import("./Secrets-D8ZlRoVo.js").then(e=>e.Secrets),__vite__mapDeps([408,1,3,16,17,20,21,22,120,25,8,4,113,26,114,80,27,81,41,5,133,9,23,24,141,46,142,75,160,48,296,6,115,34,221,108,53,7,222,161,118,85,83,124,88,44,89,90,37,99,74,76,95,223,100,38,51,123,224,67,225,338,13,155,31,97,170,98,219,102,55,146,195,196,227,126,232,171,82,40,172,220,36,132]))),tK=Ce(()=>ke(()=>import("./CompanyImport-Dj5G-Ci_.js").then(e=>e.CompanyImport),__vite__mapDeps([409,1,3,20,22,207,16,17,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,42,46,48,50,52,54,56,58,59,410,411,412]))),nK=Ce(()=>ke(()=>import("./DesignGuide-CoW-4sZp.js").then(e=>e.DesignGuide),__vite__mapDeps([413,1,3,16,17,20,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242,245,133,64,310,11,35,151,149,42,46,48,50,52,54,56,58,59,63,61,68,69,70,18,62,71,72,73,75,77,78,94,96,101,102,103,181,104,414,299,300,117,147,301,110,302,303,415,358,182,305,148,174,107,109,156,307,308,144,282,309,243,116,153,249,285,158,159,163,250,251,252,311,165,272,175,176,167,132,260,261,264,265,204,129,400,188,403,340,406,286,287,407]))),aK=Ce(()=>ke(()=>import("./InstanceFeatures-CqkXR6d9.js").then(e=>e.InstanceFeatures),__vite__mapDeps([416,1,3,19,16,17,20,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,124,9,95,187,126,417,140,195,196,231]))),sK=Ce(()=>ke(()=>import("./AgentDefaults-BZlzjR_2.js").then(e=>e.AgentDefaults),__vite__mapDeps([418,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,142,55,126,256,257,7,9,14,76,124,171,82,83,80,4,40,172]))),iK=Ce(()=>ke(()=>import("./OmpAllSettings-1aXWEp6h.js").then(e=>e.n).then(e=>e.OmpAllSettingsPage),__vite__mapDeps([266,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,7,9,14,124,55,95,126,100,231,171,82,83,80,4,40,172,173,256,257,76]))),rK=Ce(()=>ke(()=>import("./ModelsAndProviders-SEGB5DIt.js").then(e=>e.ModelsAndProviders),__vite__mapDeps([419,1,3,20,21,22,7,8,9,13,155,55,126,256]))),lK=Ce(()=>ke(()=>import("./InstanceAdvanced-DMrEvjyY.js").then(e=>e.InstanceAdvanced),__vite__mapDeps([420,1,3,7,8,9,12,14,98,124,126,417,20,140,195,196,231]))),oK=Ce(()=>ke(()=>import("./InstanceAccess-CDzvvhRr.js").then(e=>e.InstanceAccess),__vite__mapDeps([421,1,3,20,22,120,25,8,4,7,9,97,32,37,146,126,174]))),cK=Ce(()=>ke(()=>import("./ProfileSettings-BUYIctBS.js").then(e=>e.ProfileSettings),__vite__mapDeps([422,1,3,20,22,21,90,25,8,26,108,224,7,9,12,218,362,170,55,95,126,230,231,232,120,4,23,24,27,41,88,44,89,227,233,171,82,83,80,40,172,174]))),uK=Ce(()=>ke(()=>import("./PluginManager-CPYhUxgY.js").then(e=>e.PluginManager),__vite__mapDeps([423,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,108,180,7,9,13,373,305,170,98,124,37,99,74,76,95,186,126,174]))),dK=Ce(()=>ke(()=>import("./PluginSettings-D2pNKDKr.js").then(e=>e.PluginSettings),__vite__mapDeps([424,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,211,99,74,7,76,212,86,48,49,51,218,161,98,339,124,186,184,185,37,187,126,234,120,4,108,40,41,160,217,154,53,13,170,95,223,100,171,82,83,172,174,167,84,139,140]))),dk=Ce(()=>ke(()=>import("./AdapterManager-DD2p5mWg.js").then(e=>e.AdapterManager),__vite__mapDeps([425,1,3,20,21,22,108,25,8,211,33,99,74,26,27,7,9,76,30,51,13,373,155,170,98,124,37,95,126,235,23,24,40,197,39,198,4,31,173,236,41,47,118,85,83,231,199,65,238,239,174]))),fk=Ce(()=>ke(()=>import("./PluginPage-CBSnEw7x.js").then(e=>e.PluginPage),__vite__mapDeps([426,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,212,7,9,186,184,185,37,187,126]))),fK=Ce(()=>ke(()=>import("./NewAgent-LKqNzfsM.js").then(e=>e.NewAgent),__vite__mapDeps([427,1,3,16,17,20,207,22,208,209,140,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,210,203,74,7,9,120,4,108,79,43,44,45,80,81,82,83,84,85,86,66,87,76,88,89,90,91,92,93,211,99,212,142,143,65,40,41,213,214,152,215,160,47,49,6,216,113,114,115,217,154,53,13,14,218,161,219,118,124,37,173,220,34,221,222,95,223,100,38,180,51,224,225,193,12,155,97,105,170,98,226,185,55,227,228,229,126,230,231,197,39,198,162,67,232,233,171,172,234,235,236,199,200,237,57,201,238,239,240,241,36,242]))),pK=Ce(()=>ke(()=>import("./Auth-BRkjUyyN.js").then(e=>e.AuthPage),__vite__mapDeps([428,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,415,358,182,58,196,429]))),mK=Ce(()=>ke(()=>import("./BoardClaim-7gbzMdsZ.js").then(e=>e.BoardClaimPage),__vite__mapDeps([430,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,146,174]))),hK=Ce(()=>ke(()=>import("./AssistantConnection-D1H83dKT.js").then(e=>e.AssistantConnection),__vite__mapDeps([383,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,4,6,34,7,300,182,89,90,126,38,237,76,100,57,382]))),pk=Ce(()=>ke(()=>import("./McpConnect-CeT7gUW_.js").then(e=>e.McpConnectPage),__vite__mapDeps([431,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,7,9,182,89,90,95,174,382]))),gK=Ce(()=>ke(()=>import("./McpConnect-CeT7gUW_.js").then(e=>e.McpDevicePage),__vite__mapDeps([431,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,7,9,182,89,90,95,174,382]))),xK=Ce(()=>ke(()=>import("./McpConnect-CeT7gUW_.js").then(e=>e.AssistantConnectionsPage),__vite__mapDeps([431,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,120,4,7,9,182,89,90,95,174,382]))),bK=Ce(()=>ke(()=>import("./CliAuth-CfQo7C9j.js").then(e=>e.CliAuthPage),__vite__mapDeps([432,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,146,174]))),vK=Ce(()=>ke(()=>import("./InviteLanding-C-S7p6JM.js").then(e=>e.InviteLandingPage),__vite__mapDeps([433,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,146,196,199,65,429]))),mk=Ce(()=>ke(()=>import("./PublicIssueSharePage-8uOICn1V.js").then(e=>e.PublicIssueSharePage),__vite__mapDeps([434,1,3,16,17,20,212,42,43,44,45,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,46,4,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,60,61,62,89,90,227,314]))),yK=Ce(()=>ke(()=>import("./JoinRequestQueue-B_br1twW.js").then(e=>e.JoinRequestQueue),__vite__mapDeps([435,1,3,20,21,22,7,8,9,124,37,146,126,174]))),PA=Ce(()=>ke(()=>Promise.resolve().then(()=>s6).then(e=>e.NotFoundPage),void 0)),fc=Ce(()=>ke(()=>import("./Inbox-DmxWV98u.js").then(e=>e.n).then(e=>e.Inbox),__vite__mapDeps([281,1,3,16,17,20,22,136,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,133,80,81,9,46,121,4,41,48,49,224,7,11,13,14,98,87,76,185,89,90,37,55,109,140,183,145,125,99,74,146,282,147,126,148,88,44,174,59,283,42,43,45,47,6,34,50,51,52,53,54,56,38,57,58,161,97,167,84]))),jK=Ce(()=>ke(()=>import("./CompanyExport-UdhY3JMr.js").then(e=>e.CompanyExport),__vite__mapDeps([436,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,42,43,44,45,46,4,47,48,49,6,34,50,51,52,53,7,9,54,55,56,38,57,58,59,14,76,37,125,126,77,412]))),wK=Ce(()=>ke(()=>import("./Terminal-DGY0GEez.js").then(e=>e.Terminal),__vite__mapDeps([437,1,3,16,17,20,292,25,8,114,80,26,27,81,39,198,293,6,7,9,294,31,76,95,38,36,37,295,21,22,19,23,24,28,29,5,30,32,33,210,108,4,40,48,296,53,13,72,105,98,99,74,146,126,214,100,171,82,83,172,200,406])));function kK({children:e}){return(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:e})}r(kK,"ProductionSurface");function SK(e){const t=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{index:!0,element:(0,a.jsx)(Ve,{to:"dashboard",replace:!0})}),(0,a.jsx)(L,{path:"dashboard",element:(0,a.jsx)(dB,{})}),(0,a.jsx)(L,{path:"dashboard/live",element:(0,a.jsx)(Ve,{to:bI("all"),replace:!0})}),(0,a.jsx)(L,{path:"timeline",element:(0,a.jsx)(Ys,{to:"/activity/timeline"})}),(0,a.jsx)(L,{path:"onboarding",element:(0,a.jsx)(BA,{})}),(0,a.jsx)(L,{path:"companies",element:(0,a.jsx)(fB,{})}),(0,a.jsx)(L,{path:"company/settings",element:(0,a.jsx)(PB,{})}),(0,a.jsx)(L,{path:"company/settings/connections",element:(0,a.jsx)($B,{})}),(0,a.jsx)(L,{path:"company/settings/agent-defaults",element:(0,a.jsx)(sK,{})}),(0,a.jsx)(L,{path:"company/settings/agent-defaults/all",element:(0,a.jsx)(iK,{})}),(0,a.jsx)(L,{path:"company/settings/models",element:(0,a.jsx)(rK,{})}),(0,a.jsx)(L,{path:"company/settings/environments",element:(0,a.jsx)(Ve,{to:"/company/settings/instance/environments",replace:!0})}),(0,a.jsx)(L,{path:"company/settings/cloud-upstream",element:(0,a.jsx)(Ve,{to:"/company/export",replace:!0})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"company.members"}),children:[(0,a.jsx)(L,{path:"company/settings/members",element:(0,a.jsx)(FB,{})}),(0,a.jsx)(L,{path:"company/settings/access",element:(0,a.jsx)(HB,{})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.invites"}),children:(0,a.jsx)(L,{path:"company/settings/invites",element:(0,a.jsx)(Ve,{to:"/company/settings/members?tab=invites",replace:!0})})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.export"}),children:(0,a.jsx)(L,{path:"company/export/*",element:(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:(0,a.jsx)(jK,{})})})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.import"}),children:(0,a.jsx)(L,{path:"company/import",element:(0,a.jsx)(tK,{})})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"company.secrets"}),children:(0,a.jsx)(L,{path:"company/settings/secrets",element:(0,a.jsx)(eK,{})})}),(0,a.jsx)(L,{path:"company/settings/tools",element:(0,a.jsx)(xk,{})}),(0,a.jsx)(L,{path:"company/settings/tools/:tab",element:(0,a.jsx)(xk,{})}),(0,a.jsx)(L,{path:"tools",element:(0,a.jsx)(bk,{})}),(0,a.jsx)(L,{path:"tools/:tab",element:(0,a.jsx)(bk,{})}),(0,a.jsx)(L,{path:"apps",element:(0,a.jsx)(WB,{})}),(0,a.jsx)(L,{path:"apps/assistant-connection",element:(0,a.jsx)(hK,{})}),(0,a.jsx)(L,{path:"apps/browse",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/connections",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/byo",element:(0,a.jsx)(zA,{byoOnly:!0})}),(0,a.jsx)(L,{path:"apps/vercel-connect",element:(0,a.jsx)(hk,{credentialSource:"vercel_connect"})}),(0,a.jsx)(L,{path:"apps/connect",element:(0,a.jsx)(hk,{})}),(0,a.jsx)(L,{path:"apps/chat/connect",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(QB,{})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(Ve,{to:"settings",replace:!0})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId/reviews/:reviewId",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(lk,{})})}),(0,a.jsx)(L,{path:"apps/chat/:endpointId/:tab",element:(0,a.jsx)(Cd,{children:(0,a.jsx)(lk,{})})}),(0,a.jsx)(L,{path:"apps/connect/:appKey",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/connect/:appKey/:stage",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/review",element:(0,a.jsx)(YB,{})}),(0,a.jsx)(L,{path:"apps/attention",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/gateways",element:(0,a.jsx)(ck,{})}),(0,a.jsx)(L,{path:"apps/gateways/:gatewayId",element:(0,a.jsx)(Ve,{to:"overview",replace:!0})}),(0,a.jsx)(L,{path:"apps/gateways/:gatewayId/:tab",element:(0,a.jsx)(ZB,{})}),(0,a.jsx)(L,{path:"apps/advanced",element:(0,a.jsx)(ik,{})}),(0,a.jsx)(L,{path:"apps/advanced/gateways",element:(0,a.jsx)(ck,{})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/new",element:(0,a.jsx)(rk,{mode:"new"})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/:profileId/edit",element:(0,a.jsx)(rk,{mode:"edit"})}),(0,a.jsx)(L,{path:"apps/advanced/profiles/:profileId",element:(0,a.jsx)(VB,{})}),(0,a.jsx)(L,{path:"apps/advanced/audit",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/advanced/run-your-own",element:(0,a.jsx)(Ve,{to:"/apps",replace:!0})}),(0,a.jsx)(L,{path:"apps/advanced/:tab",element:(0,a.jsx)(ik,{})}),(0,a.jsx)(L,{path:"apps/app/:applicationId",element:(0,a.jsx)(ok,{})}),(0,a.jsx)(L,{path:"apps/app/:applicationId/:tab",element:(0,a.jsx)(ok,{})}),(0,a.jsx)(L,{path:"apps/:connectionId",element:(0,a.jsx)(Ve,{to:"permissions",replace:!0})}),(0,a.jsx)(L,{path:"apps/:connectionId/:tab",element:(0,a.jsx)(XB,{})}),(0,a.jsx)(L,{path:"company/settings/instance",element:(0,a.jsx)(Ve,{to:"/company/settings",replace:!0})}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.profile"}),children:(0,a.jsx)(L,{path:"company/settings/instance/profile",element:(0,a.jsx)(cK,{})})}),(0,a.jsx)(L,{path:"company/settings/instance/general",element:(0,a.jsx)(Ve,{to:"/company/settings",replace:!0})}),(0,a.jsx)(L,{path:"company/settings/instance/heartbeats",element:(0,a.jsx)(Ve,{to:"/company/settings",replace:!0})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.environments"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/environments",element:(0,a.jsx)(Bh,{})}),(0,a.jsx)(L,{path:"company/settings/instance/environments/new",element:(0,a.jsx)(Bh,{mode:"create"})}),(0,a.jsx)(L,{path:"company/settings/instance/environments/:environmentId/edit",element:(0,a.jsx)(Bh,{mode:"edit"})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.access"}),children:(0,a.jsx)(L,{path:"company/settings/instance/access",element:(0,a.jsx)(oK,{})})}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.experimental"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/features",element:(0,a.jsx)(aK,{})}),(0,a.jsx)(L,{path:"company/settings/instance/advanced",element:(0,a.jsx)(lK,{})}),(0,a.jsx)(L,{path:"company/settings/instance/experimental",element:(0,a.jsx)(Ve,{to:"/company/settings/instance/features",replace:!0})})]}),(0,a.jsxs)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.plugins"}),children:[(0,a.jsx)(L,{path:"company/settings/instance/plugins",element:(0,a.jsx)(uK,{})}),(0,a.jsx)(L,{path:"company/settings/instance/plugins/:pluginId",element:(0,a.jsx)(dK,{})})]}),(0,a.jsx)(L,{element:(0,a.jsx)(Es,{pageKey:"instance.adapters"}),children:(0,a.jsx)(L,{path:"company/settings/instance/adapters",element:(0,a.jsx)(dk,{})})}),(0,a.jsx)(L,{path:"company/settings/:settingsRoutePath/*",element:(0,a.jsx)(qB,{})}),(0,a.jsx)(L,{path:"skills/sources",element:(0,a.jsx)(uk,{})}),(0,a.jsx)(L,{path:"skills/sources/:sourceId",element:(0,a.jsx)(uk,{})}),(0,a.jsx)(L,{path:"skills/studio",element:(0,a.jsx)(Kh,{})}),(0,a.jsx)(L,{path:"skills/studio/new",element:(0,a.jsx)(Kh,{})}),(0,a.jsx)(L,{path:"skills/studio/:skillId",element:(0,a.jsx)(Kh,{})}),(0,a.jsx)(L,{path:"skills/:skillId/studio",element:(0,a.jsx)($A,{})}),(0,a.jsx)(L,{path:"skills/*",element:(0,a.jsx)(JB,{})}),(0,a.jsx)(L,{path:"settings",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"settings/*",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"plugins/:pluginId",element:(0,a.jsx)(fk,{})}),(0,a.jsx)(L,{path:"org",element:(0,a.jsx)(Ve,{to:"/agents/all",replace:!0})}),(0,a.jsx)(L,{path:"agents",element:(0,a.jsx)(Ve,{to:"/agents/all",replace:!0})}),LA.map(s=>(0,a.jsx)(L,{path:`agents/${s}`,element:(0,a.jsx)(pB,{})},s)),(0,a.jsx)(L,{path:"agents/new",element:(0,a.jsx)(fK,{})}),(0,a.jsx)(L,{path:"agents/:agentId",element:(0,a.jsx)($h,{})}),(0,a.jsx)(L,{path:"agents/:agentId/:tab",element:(0,a.jsx)($h,{})}),(0,a.jsx)(L,{path:"agents/:agentId/runs/:runId",element:(0,a.jsx)($h,{})}),(0,a.jsx)(L,{path:"projects",element:(0,a.jsx)(mB,{})}),(0,a.jsx)(L,{path:"projects/:projectId",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/overview",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues/:filter",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Th,{}),children:(0,a.jsx)(L,{path:"projects/:projectId/workspaces/:workspaceId",element:(0,a.jsx)(hB,{})})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/configuration",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{path:"projects/:projectId/budget",element:(0,a.jsx)(Br,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Th,{}),children:(0,a.jsx)(L,{path:"workspaces",element:(0,a.jsx)(gB,{})})}),(0,a.jsx)(L,{path:"terminal",element:(0,a.jsx)(kK,{children:(0,a.jsx)(wK,{})})}),(0,a.jsx)(L,{path:"issues",element:(0,a.jsx)(xB,{})}),(0,a.jsx)(L,{path:"tasks",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"tasks/new",element:(0,a.jsx)(tB,{})}),(0,a.jsx)(L,{path:"search",element:(0,a.jsx)(bB,{})}),t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"issues/all",element:(0,a.jsx)(bs,{view:"all"})}),(0,a.jsx)(L,{path:"issues/active",element:(0,a.jsx)(bs,{view:"active"})}),(0,a.jsx)(L,{path:"issues/backlog",element:(0,a.jsx)(bs,{view:"backlog"})}),(0,a.jsx)(L,{path:"issues/done",element:(0,a.jsx)(bs,{view:"done"})}),(0,a.jsx)(L,{path:"issues/recent",element:(0,a.jsx)(bs,{view:"recent"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"issues/all",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/active",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/backlog",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/done",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})}),(0,a.jsx)(L,{path:"issues/recent",element:(0,a.jsx)(Ve,{to:"/issues",replace:!0})})]}),(0,a.jsx)(L,{path:"chats",element:(0,a.jsx)(yB,{})}),(0,a.jsx)(L,{path:"chats/:agentRef",element:(0,a.jsx)(jB,{})}),(0,a.jsx)(L,{path:"issues/:issueId",element:(0,a.jsx)(vB,{})}),null,(0,a.jsx)(L,{path:"routines",element:(0,a.jsx)(kB,{})}),(0,a.jsx)(L,{path:"cases",element:(0,a.jsx)(Qw,{children:(0,a.jsx)(cB,{})})}),(0,a.jsx)(L,{path:"cases/:caseIdentifier",element:(0,a.jsx)(Qw,{children:(0,a.jsx)(uB,{})})}),(0,a.jsx)(L,{path:"pixels-office",element:(0,a.jsx)(f6,{children:(0,a.jsx)(EB,{})})}),(0,a.jsx)(L,{path:"status",element:(0,a.jsx)(Gw,{children:(0,a.jsx)(tk,{})})}),(0,a.jsx)(L,{path:"status/:cardId",element:(0,a.jsx)(Gw,{children:(0,a.jsx)(tk,{})})}),(0,a.jsx)(L,{path:"status-cards",element:(0,a.jsx)(vk,{})}),(0,a.jsx)(L,{path:"status-cards/:cardId",element:(0,a.jsx)(vk,{})}),(0,a.jsx)(L,{path:"review-queue",element:(0,a.jsx)(ar,{children:(0,a.jsx)(AB,{})})}),(0,a.jsx)(L,{path:"learnings",element:(0,a.jsx)(ar,{children:(0,a.jsx)(SB,{})})}),(0,a.jsx)(L,{path:"pipelines",element:(0,a.jsx)(ar,{children:(0,a.jsx)(Uh,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId",element:(0,a.jsx)(ar,{children:(0,a.jsx)(Uh,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/add",element:(0,a.jsx)(ar,{children:(0,a.jsx)(Uh,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/settings",element:(0,a.jsx)(ar,{children:(0,a.jsx)(_B,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/items/:caseId",element:(0,a.jsx)(ar,{children:(0,a.jsx)(NB,{})})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/cases/:caseId",element:(0,a.jsx)(ar,{children:(0,a.jsx)(CB,{})})}),(0,a.jsx)(L,{path:"routines/:routineId",element:(0,a.jsx)(nk,{})}),(0,a.jsx)(L,{path:"routines/:routineId/:section",element:(0,a.jsx)(nk,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(Th,{}),children:(0,a.jsxs)(L,{element:(0,a.jsx)(p6,{}),children:[(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/services",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/configuration",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/runtime-logs",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/issues",element:(0,a.jsx)(Ql,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/routines",element:(0,a.jsx)(Ql,{})})]})}),(0,a.jsx)(L,{path:"goals",element:(0,a.jsx)(TB,{})}),(0,a.jsx)(L,{path:"goals/:goalId",element:(0,a.jsx)(RB,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(ak,{})}),(0,a.jsx)(L,{path:"approvals",element:(0,a.jsx)(Ve,{to:"/approvals/pending",replace:!0})}),(0,a.jsx)(L,{path:"approvals/pending",element:(0,a.jsx)(sk,{})}),(0,a.jsx)(L,{path:"approvals/all",element:(0,a.jsx)(sk,{})}),(0,a.jsx)(L,{path:"approvals/:approvalId",element:(0,a.jsx)(MB,{})}),(0,a.jsx)(L,{path:"activity",element:(0,a.jsx)(DB,{})}),(0,a.jsx)(L,{path:"activity/runs",element:(0,a.jsx)(Ad,{section:"runs"})}),(0,a.jsx)(L,{path:"activity/costs",element:(0,a.jsx)(Ad,{section:"costs"})}),(0,a.jsx)(L,{path:"activity/budgets",element:(0,a.jsx)(Ad,{section:"budgets"})}),(0,a.jsx)(L,{path:"activity/timeline",element:(0,a.jsx)(Ad,{section:"timeline"})}),(0,a.jsx)(L,{path:"audit",element:(0,a.jsx)(Ys,{to:"/activity",forceAgentMode:!0})}),(0,a.jsx)(L,{path:"audit/activity",element:(0,a.jsx)(Ys,{to:"/activity"})}),(0,a.jsx)(L,{path:"audit/runs",element:(0,a.jsx)(Ys,{to:"/activity/runs"})}),(0,a.jsx)(L,{path:"audit/costs",element:(0,a.jsx)(Ys,{to:"/activity/costs"})}),(0,a.jsx)(L,{path:"audit/budgets",element:(0,a.jsx)(Ys,{to:"/activity/budgets"})}),(0,a.jsx)(L,{path:"audit/timeline",element:(0,a.jsx)(Ys,{to:"/activity/timeline"})}),(0,a.jsx)(L,{path:"runs",element:(0,a.jsx)(Ys,{to:"/activity/runs"})}),(0,a.jsx)(L,{path:"costs",element:(0,a.jsx)(Ys,{to:"/activity/costs"})}),(0,a.jsx)(L,{path:"budgets",element:(0,a.jsx)(Ys,{to:"/activity/budgets"})}),(0,a.jsxs)(L,{element:(0,a.jsx)(d6,{}),children:[(0,a.jsx)(L,{path:"board-chat",element:(0,a.jsx)(zB,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(ak,{})})]}),null,(0,a.jsx)(L,{path:"decisions",element:(0,a.jsx)(OB,{})}),(0,a.jsx)(L,{path:"decisions/queues/:key",element:(0,a.jsx)(LB,{})}),t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"inbox",element:(0,a.jsx)(gk,{})}),(0,a.jsx)(L,{path:"inbox/mine",element:(0,a.jsx)(bs,{view:"mine"})}),(0,a.jsx)(L,{path:"inbox/recent",element:(0,a.jsx)(bs,{view:"recent"})}),(0,a.jsx)(L,{path:"inbox/unread",element:(0,a.jsx)(bs,{view:"unread"})}),(0,a.jsx)(L,{path:"inbox/blocked",element:(0,a.jsx)(bs,{view:"blocked"})}),(0,a.jsx)(L,{path:"inbox/all",element:(0,a.jsx)(bs,{view:"everything"})}),(0,a.jsx)(L,{path:"inbox/new",element:(0,a.jsx)(bs,{view:"mine"})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(L,{path:"inbox",element:(0,a.jsx)(gk,{})}),(0,a.jsx)(L,{path:"inbox/mine",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/recent",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/unread",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/blocked",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/all",element:(0,a.jsx)(fc,{})}),(0,a.jsx)(L,{path:"inbox/new",element:(0,a.jsx)(Ve,{to:"/inbox/mine",replace:!0})})]}),(0,a.jsx)(L,{path:"inbox/requests",element:(0,a.jsx)(yK,{})}),(0,a.jsx)(L,{path:"u/:userSlug",element:(0,a.jsx)(IB,{})}),(0,a.jsx)(L,{path:"design-guide",element:(0,a.jsx)(nK,{})}),(0,a.jsx)(L,{path:"instance/settings/adapters",element:(0,a.jsx)(dk,{})}),(0,a.jsx)(L,{path:":pluginRoutePath/*",element:(0,a.jsx)(fk,{})}),(0,a.jsx)(L,{path:"*",element:(0,a.jsx)(PA,{scope:"board"})})]})}r(SK,"boardRoutes");function hk({credentialSource:e="wardmote_vault"}={}){const t=hn(),s=new URLSearchParams(t.search),{enabled:l,githubEnabled:c}=C0();return WT(s,{chatConnectorsEnabled:l,githubReviewBotsEnabled:c})?(0,a.jsx)(zA,{credentialSource:e}):(0,a.jsx)(Ve,{to:"/apps",replace:!0})}r(hk,"AppsConnectEntryRoute");function gk(){const{enabled:e}=Jf();return e?(0,a.jsx)(bs,{view:jI(zj())}):(0,a.jsx)(Ve,{to:`/inbox/${zj()}`,replace:!0})}r(gk,"InboxRootRedirect");function bs({view:e}){const t=hn(),s=new URLSearchParams(t.search);return s.set(hI,e),(0,a.jsx)(Ve,{to:`/issues?${s.toString()}${t.hash}`,replace:!0})}r(bs,"TaskViewRedirect");function $A(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=bt(),{companyPrefix:c,skillId:u}=Ps();if(l)return null;const p=(c?t.find(f=>f.issuePrefix.toUpperCase()===c.toUpperCase()):null)??s??t[0]??null;return!p||!u?(0,a.jsx)(Ve,{to:"/skills/studio",replace:!0}):(0,a.jsx)(Ve,{to:`/${p.issuePrefix}/skills/studio/${encodeURIComponent(u)}${e.search}${e.hash}`,replace:!0})}r($A,"LegacySkillStudioRedirect");function qr(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=bt(),{companyPrefix:c}=Ps(),{hidden:u}=gr();if(l)return(0,a.jsx)(Ds,{});const p=(c?t.find(h=>h.issuePrefix.toUpperCase()===c.toUpperCase()):null)??s??t[0]??null;if(!p)return bx({pathname:e.pathname,hasCompanies:!1})?(0,a.jsx)(Ve,{to:"/onboarding",replace:!0}):(0,a.jsx)(jx,{});const f=uT(dT(`${e.pathname}${e.search}${e.hash}`),u);return(0,a.jsx)(Ve,{to:`/${p.issuePrefix}${f}`,replace:!0})}r(qr,"LegacySettingsRedirect");function xk(){const{tab:e}=Ps();return(0,a.jsx)(Ve,{to:UA(e),replace:!0})}r(xk,"LegacyToolsSettingsRedirect");function bk(){const{tab:e}=Ps();return(0,a.jsx)(Ve,{to:UA(e),replace:!0})}r(bk,"LegacyToolsRedirect");function UA(e){return e?e==="applications"||e==="connections"||e==="overview"||e==="examples"||e==="runtime"||e==="audit"?"/apps":e==="policies"?"/apps/advanced/profiles":`/apps/advanced/${e}`:"/apps/advanced/profiles"}r(UA,"legacyToolsRedirectTarget");function BA(){const{companies:e}=bt(),{openOnboarding:t}=Us(),{t:s}=ON(),{onboardingOpen:l,onboardingRouteDismissed:c}=Ff(),{companyPrefix:u}=Ps(),p=u?e.find(g=>g.issuePrefix.toUpperCase()===u.toUpperCase())??null:null;if(mU({onboardingOpen:l,routeDismissed:c}))return null;const f=p?`Add another agent to ${p.name}`:e.length>0?"Create another organization":"Create your first organization",h=p?"Run onboarding again to add an agent and a starter task for this organization.":e.length>0?"Run onboarding again to create another organization and seed its first agent.":"Get started by creating an organization and your first agent.";return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsxs)("div",{className:"rounded-lg border border-line bg-bg-2 p-6",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:f}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:h}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(oe,{onClick:r(()=>p?t({initialStep:jA(),companyId:p.id}):t(),"onClick"),children:p?"Add Agent":"Start Onboarding"})})]})})}r(BA,"OnboardingRoutePage");function NK(){const{companies:e,selectedCompany:t,loading:s}=bt(),l=hn();if(s)return(0,a.jsx)(Ds,{});const c=t??e[0]??null;return c?(0,a.jsx)(Ve,{to:`/${c.issuePrefix}/dashboard`,replace:!0}):bx({pathname:l.pathname,hasCompanies:!1})?(0,a.jsx)(Ve,{to:"/onboarding",replace:!0}):(0,a.jsx)(jx,{})}r(NK,"CompanyRootRedirect");function vk(){const{cardId:e}=Ps(),t=yI(),s=t?`/${t}`:"";return(0,a.jsx)(Ve,{to:`${s}/status${e?`/${e}`:""}`,replace:!0})}r(vk,"StatusCardsLegacyRedirect");function Ys({to:e,forceAgentMode:t=!1}){const s=hn(),l=new URLSearchParams(s.search);t&&l.set("mode","agents");const c=l.toString();return(0,a.jsx)(Ve,{to:`${e}${c?`?${c}`:""}${s.hash}`,replace:!0})}r(Ys,"AuditCompatibilityRedirect");function Xe(){const e=hn(),{companies:t,selectedCompany:s,loading:l}=bt();if(l)return(0,a.jsx)(Ds,{});const c=s??t[0]??null;return c?(0,a.jsx)(Ve,{to:`/${c.issuePrefix}${e.pathname}${e.search}${e.hash}`,replace:!0}):bx({pathname:e.pathname,hasCompanies:!1})?(0,a.jsx)(Ve,{to:"/onboarding",replace:!0}):(0,a.jsx)(jx,{})}r(Xe,"UnprefixedBoardRedirect");function jx(){const{openOnboarding:e}=Us(),{t}=ON();return(0,a.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,a.jsxs)("div",{className:"rounded-lg border border-line bg-bg-2 p-6",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:t("app.noCompanies.title",{defaultValue:"Create your first organization"})}),(0,a.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:t("app.noCompanies.description",{defaultValue:"Get started by creating an organization."})}),(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(oe,{onClick:r(()=>e(),"onClick"),children:t("app.noCompanies.newCompany",{defaultValue:"New Organization"})})})]})})}r(jx,"NoCompaniesStartPage");function CK(){const{enabled:e}=Jf();return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(x.Suspense,{fallback:(0,a.jsx)(Ds,{}),children:(0,a.jsxs)(UE,{children:[(0,a.jsx)(L,{path:"auth",element:(0,a.jsx)(pK,{})}),(0,a.jsx)(L,{path:"board-claim/:token",element:(0,a.jsx)(mK,{})}),(0,a.jsx)(L,{path:"mcp-connect/:id",element:(0,a.jsx)(pk,{})}),(0,a.jsx)(L,{path:"dot-connect/:id",element:(0,a.jsx)(pk,{agentPairingOnly:!0})}),(0,a.jsx)(L,{path:"mcp-device",element:(0,a.jsx)(gK,{})}),(0,a.jsx)(L,{path:"assistant-connections",element:(0,a.jsx)(xK,{})}),(0,a.jsx)(L,{path:"cli-auth/:id",element:(0,a.jsx)(bK,{})}),(0,a.jsx)(L,{path:"invite/:token",element:(0,a.jsx)(vK,{})}),(0,a.jsx)(L,{path:"s/:token",element:(0,a.jsx)(mk,{})}),(0,a.jsx)(L,{path:"s/:token/issues/:issueId",element:(0,a.jsx)(mk,{})}),(0,a.jsx)(L,{element:(0,a.jsx)(ek,{allowMembershipRequest:!0}),children:(0,a.jsx)(L,{path:"chat-identity/confirm",element:(0,a.jsx)(GB,{})})}),(0,a.jsx)(L,{path:"tests/perf/long-thread",element:(0,a.jsx)(wB,{})}),(0,a.jsx)(L,{path:"ux-lab/bootstrap-setup",element:(0,a.jsx)(UB,{})}),(0,a.jsx)(L,{path:"ux-lab/responsible-user-denial",element:(0,a.jsx)(BB,{})}),(0,a.jsx)(L,{path:"ux-lab/cross-issue-collaboration",element:(0,a.jsx)(KB,{})}),(0,a.jsxs)(L,{element:(0,a.jsx)(ek,{}),children:[(0,a.jsx)(L,{index:!0,element:(0,a.jsx)(NK,{})}),(0,a.jsx)(L,{path:"onboarding",element:(0,a.jsx)(BA,{})}),(0,a.jsx)(L,{path:"instance",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"instance/settings",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"instance/settings/*",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"companies",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"dashboard",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"inbox/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"issues",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"tasks",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"tasks/new",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"issues/:issueId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"routines",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"routines/:routineId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"review-queue",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"learnings",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"cases",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"cases/:caseIdentifier",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pixels-office",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status/:cardId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status-cards",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"status-cards/:cardId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/add",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/settings",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/items/:caseId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"pipelines/:pipelineId/cases/:caseId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"artifacts",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"audit",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"audit/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"activity",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"activity/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"runs",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"costs",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"budgets",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"decisions",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"u/:userSlug",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/studio",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/studio/new",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/studio/:skillId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"skills/:skillId/studio",element:(0,a.jsx)($A,{})}),(0,a.jsx)(L,{path:"skills/*",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"settings",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"settings/*",element:(0,a.jsx)(qr,{})}),(0,a.jsx)(L,{path:"agents",element:(0,a.jsx)(Xe,{})}),LA.map(t=>(0,a.jsx)(L,{path:`agents/${t}`,element:(0,a.jsx)(Xe,{})},t)),(0,a.jsx)(L,{path:"agents/new",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"agents/:agentId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"agents/:agentId/:tab",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"agents/:agentId/runs/:runId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/overview",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/issues/:filter",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/workspaces/:workspaceId",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"projects/:projectId/configuration",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"workspaces",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"terminal",element:(0,a.jsx)(Xe,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/services",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/configuration",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/runtime-logs",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/issues",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:"execution-workspaces/:workspaceId/routines",element:(0,a.jsx)(Vl,{})}),(0,a.jsx)(L,{path:":companyPrefix",element:(0,a.jsx)(o6,{}),children:SK(e)}),(0,a.jsx)(L,{path:"*",element:(0,a.jsx)(PA,{scope:"global"})})]})]})}),(0,a.jsx)(J6,{}),(0,a.jsx)(S8,{})]})}r(CK,"App");var AK=class extends x.Component{static{r(this,"AppErrorBoundary")}state={error:null};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}componentDidCatch(e,t){AA(e,{boundary:"app",componentStack:t.componentStack})}render(){const{error:e}=this.state;return e?(0,a.jsxs)("div",{className:"mx-auto flex min-h-screen max-w-2xl flex-col justify-center space-y-4 px-4 py-10",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("h1",{className:"text-lg font-semibold",children:"Wardmote hit an error"}),(0,a.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Something went wrong while running the app. Reloading usually fixes this."})]}),(0,a.jsx)("pre",{className:"overflow-auto rounded-md border border-bad/30 bg-bad/10 px-3 py-2 text-xs text-bad whitespace-pre-wrap",children:e.message}),(0,a.jsx)("div",{children:(0,a.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md border border-line-strong bg-bg px-3 py-1.5 text-sm font-medium shadow-sm hover:bg-bg-3 hover:text-ink",onClick:r(()=>window.location.reload(),"onClick"),children:"Reload page"})})]}):this.props.children}};function _K(){const{data:e}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),t=e?.sentryDsn,s=e?.sentryEnvironment??void 0;return(0,x.useEffect)(()=>{if(t)return XU(t,s),()=>{ZU()}},[t,s]),null}r(_K,"SentryGate");function EK(){let e;return{promise:new Promise(t=>{e=t}),resolve:e}}r(EK,"createDeferred");function IK(e,t=300){const s=new Map;let l=null,c=null;const u=r(async()=>{l!==null&&(clearTimeout(l),l=null);const h=c;if(c=null,s.size===0){h?.resolve();return}const g=[...s.values()];s.clear();try{await Promise.all(g.map(v=>e.invalidateQueries(Af().visible?v:{...v,refetchType:"none"})))}finally{h?.resolve()}},"flush");return{schedule:r(h=>(s.set(TK(h),h),c===null&&(c=EK()),l===null&&(l=setTimeout(()=>{u()},t)),c.promise),"schedule"),flush:u,dispose:r(()=>{l!==null&&(clearTimeout(l),l=null),s.clear(),c?.resolve(),c=null},"dispose")}}r(IK,"createInvalidationBatcher");var yk=0;function TK(e){if(typeof e.predicate=="function")return`__predicate__:${yk+=1}`;try{return JSON.stringify([e.queryKey??null,e.refetchType??null,e.exact??null,e.type??null])}catch{return`__nonserializable__:${yk+=1}`}}r(TK,"serializeFilters");function RK(e,t){return new Proxy(e,{get(s,l){if(l==="invalidateQueries")return u=>t.schedule(u??{});const c=Reflect.get(s,l,s);return typeof c=="function"?c.bind(s):c}})}r(RK,"createCoalescingQueryClient");function MK(e,t){if(!e)return e;const s=e.filter(l=>l.id!==t);return s.length===e.length?e:s}r(MK,"removeRunFromList");function DK(e,t,s){if(!e)return{next:e,present:!1};let l=!1,c=!1;const u=e.map(p=>p.id!==t||(l=!0,p.status===s)?p:(c=!0,{...p,status:s}));return{next:c?u:e,present:l}}r(DK,"patchRunStatusInList");function OK(e,t){if(!e)return e;const s=e.filter(l=>l.id!==t);return s.length===e.length?e:s}r(OK,"removeLiveRunById");function LK(e,t){return!e||e.executionRunId!==t?e:{...e,executionRunId:null,executionAgentNameKey:null,executionLockedAt:null}}r(LK,"clearIssueExecutionRun");var zK=3e4,PK=["status","priority","title","assigneeAgentId","assigneeUserId","projectId","parentId"],$K=new Set(["issue.read_marked","issue.read_unmarked","issue.inbox_archived","issue.inbox_unarchived"]);function Jg(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}r(Jg,"isRecord");function wx(e){return Jg(e)&&Array.isArray(e.pages)}r(wx,"isInfiniteIssueData");function UK(e){return Array.isArray(e)?e.length:wx(e)?e.pages.reduce((t,s)=>t+(Array.isArray(s)?s.length:0),0):0}r(UK,"issueListRowCount");function BK(e){const t=e.state.data;return wx(t)||UK(t)>=100}r(BK,"isLargeIssueListQuery");function KK(e,t,s){const l={},c=Jg(t?.changes)?t.changes:null;if(e==="issue.updated"&&c)for(const u of PK){const p=c[u];!Jg(p)||p.updated===!0||!("to"in p)||(l[u]=p.to)}return s&&e&&!$K.has(e)&&!Number.isNaN(Date.parse(s))&&(l.lastActivityAt=s),l}r(KK,"readIssueListPatchFromActivity");function qK(e,t){let s=null;for(const[l,c]of Object.entries(t)){if(l==="lastActivityAt"){const u=e.lastActivityAt?new Date(e.lastActivityAt).getTime():0;if(new Date(c).getTime()<=u)continue}else if(!(l in e)||e[l]===c)continue;s??={...e},s[l]=c}return s??e}r(qK,"patchIssueRow");function jk(e,t,s){const l=e.findIndex(p=>p?.id===t);if(l<0)return e;const c=qK(e[l],s);if(c===e[l])return e;const u=e.slice();return u[l]=c,u}r(jk,"patchIssueRows");function FK(e,t,s){if(Array.isArray(e))return jk(e,t,s);if(!wx(e))return e;let l=!1;const c=e.pages.map(u=>{if(!Array.isArray(u))return u;const p=jk(u,t,s);return p!==u&&(l=!0),p});return l?{...e,pages:c}:e}r(FK,"patchIssueListData");function HK(e,t,s,l){if(Object.keys(l).length===0)return 0;let c=0;for(const[u,p]of e.getQueriesData({queryKey:$.issues.list(t)})){const f=FK(p,s,l);f!==p&&(e.setQueryData(u,f),c+=1)}return c}r(HK,"patchIssueInListCaches");function VK(e,t){for(const s of e.getQueryCache().findAll({queryKey:$.issues.list(t)}))e.invalidateQueries({queryKey:s.queryKey,exact:!0,...BK(s)?{refetchType:"none"}:{}})}r(VK,"invalidateIssueListsForActivity");function WK(e,t){const s=r(l=>l.state.isInvalidated,"predicate");return Promise.all([e.refetchQueries({queryKey:$.issues.list(t),type:"active",predicate:s}),e.refetchQueries({queryKey:$.heartbeats(t),type:"active",predicate:s})])}r(WK,"refreshInvalidatedLiveLists");function ao(e){return typeof e=="string"&&e.length>0?e:null}r(ao,"readString$1");function QK(e){return e.length===3&&e[0]==="issues"&&e[2]==="agent-todo"}r(QK,"isAgentTodoQueryKey");function GK(e){if(e.type!=="heartbeat.run.event")return null;const t=e.payload??{};if(t.eventType!=="agent.todo")return null;const s=ao(t.runId),l=ao(t.agentId),c=ao(t.issueId),u=t.seq;if(!s||!l||!c||typeof u!="number"||!Number.isInteger(u))return null;const p=NE(t.payload);return p?{...p,runId:s,agentId:l,issueId:c,seq:u,createdAt:ao(t.lastEventAt)??e.createdAt,runStatus:"running"}:null}r(GK,"readAgentTodoSnapshotFromLiveEvent");function wk(e,t){if(t.type==="heartbeat.run.status"){const l=t.payload??{},c=ao(l.runId),u=ao(l.status);if(!c||!u)return;e.setQueriesData({predicate:r(p=>QK(p.queryKey),"predicate")},p=>p&&p.runId===c&&p.runStatus!==u?{...p,runStatus:u}:p);return}const s=GK(t);s&&e.setQueryData($.issues.agentTodo(s.issueId),l=>l&&l.runId===s.runId&&l.seq>=s.seq?l:s)}r(wk,"applyAgentTodoLiveEvent");function YK(e){const t=e.trim().toLowerCase();return t==="0.0.0.0"||t==="::"||t==="[::]"}r(YK,"isWildcardHost");function XK(e=window.location){return YK(e.hostname)?e.port?`localhost:${e.port}`:"localhost":e.host}r(XK,"browserReachableHost");function ZK(e,t=window.location){const s=t.protocol==="https:"?"wss":"ws",l=e.startsWith("/")?e:`/${e}`;return`${s}://${XK(t)}${l}`}r(ZK,"buildSameOriginWebSocketUrl");function JK(e){try{return new WebSocket(e)}catch{return null}}r(JK,"tryCreateWebSocket");var eq="/pwa-192x192.png",tq="/pwa-monochrome-512x512.png";function kx(){return typeof window<"u"&&"Notification"in window}r(kx,"notificationsSupported");function Sx(){return kx()?Notification.permission:"unsupported"}r(Sx,"notificationPermission");async function nq(){return kx()?Notification.permission!=="default"?Notification.permission:Notification.requestPermission():"unsupported"}r(nq,"requestNotificationPermission");function aq(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window}r(aq,"pushSupported");function zY(e=typeof navigator>"u"?void 0:navigator){return e?(/iPad|iPhone|iPod/.test(e.userAgent)||e.platform==="MacIntel"&&(e.maxTouchPoints??0)>1)&&e.standalone!==!0:!1}r(zY,"isIosWithoutHomeScreenInstall");async function KA(){if(typeof navigator>"u"||!("serviceWorker"in navigator))return null;try{return await navigator.serviceWorker.getRegistration()??null}catch{return null}}r(KA,"getServiceWorkerRegistration");var qA="wardmote.notifications.seen.v1",sq="wardmote.notifications.claim",iq=6e5,rq=200,lq=new Map;function oq(){let e=null;try{e=typeof localStorage>"u"?null:localStorage}catch{e=null}const t=typeof navigator<"u"&&navigator.locks?{request:r((s,l)=>navigator.locks.request(s,l),"request")}:null;return{storage:e,locks:t,now:r(()=>Date.now(),"now"),memory:lq}}r(oq,"defaultEnv");function cq(e){const t=e.storage?.getItem(qA);if(!t)return new Map(e.memory);try{const s=JSON.parse(t),l=new Map(e.memory);for(const[c,u]of Object.entries(s))typeof u=="number"&&l.set(c,u);return l}catch{return new Map(e.memory)}}r(cq,"readSeen");function qh(e,t){const s=t.now(),l=cq(t);for(const[u,p]of l)s-p>iq&&l.delete(u);if(l.has(e))return!1;l.set(e,s);const c=[...l.entries()].sort((u,p)=>p[1]-u[1]).slice(0,rq);t.memory.clear();for(const[u,p]of c)t.memory.set(u,p);return uq(t,c),!0}r(qh,"claimInsideLock");function uq(e,t){try{e.storage?.setItem(qA,JSON.stringify(Object.fromEntries(t)))}catch{return}}r(uq,"writeSeen");async function dq(e,t=oq()){if(!t.locks)return qh(e,t);try{return await t.locks.request(sq,()=>qh(e,t))}catch{return qh(e,t)}}r(dq,"claimNotificationKey");var Fh="paperclip-notifications";function Hh(e){return new Promise((t,s)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>s(e.error)})}r(Hh,"settle");function fq(e){return new Promise((t,s)=>{e.oncomplete=()=>t(),e.onerror=()=>s(e.error),e.onabort=()=>s(e.error)})}r(fq,"committed");async function pq(e,t){if(typeof indexedDB.databases!="function"||!(await indexedDB.databases()).some(c=>c.name===Fh))return 0;const s=await Hh(indexedDB.open(Fh));let l=0;try{if(s.objectStoreNames.contains(t)){const c=await Hh(s.transaction(t,"readonly").objectStore(t).getAll()),u=new Set(await Hh(e.transaction(t,"readonly").objectStore(t).getAllKeys())),p=c.filter(f=>!u.has(f.kind));if(p.length>0){const f=e.transaction(t,"readwrite"),h=f.objectStore(t);for(const g of p)h.put(g);await fq(f),l=p.length}}}finally{s.close()}return indexedDB.deleteDatabase(Fh),l}r(pq,"moveRetiredCustomSounds");var mq="wardmote-notifications",kc="custom-sounds";function hq(e){return e.type.startsWith("audio/")?e.size<=0?{ok:!1,error:"The audio file is empty."}:e.size>524288?{ok:!1,error:"Custom sounds must be 512 KB or smaller."}:{ok:!0}:{ok:!1,error:"Choose an audio file."}}r(hq,"validateCustomSoundFile");function FA(e){return new Promise((t,s)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>s(e.error)})}r(FA,"requestResult");var _d=null;function gq(){if(typeof indexedDB>"u")return Promise.reject(new Error("IndexedDB is unavailable."));if(!_d){const e=indexedDB.open(mq,1);e.onupgradeneeded=()=>{e.result.objectStoreNames.contains(kc)||e.result.createObjectStore(kc,{keyPath:"kind"})},_d=FA(e).then(async t=>(await pq(t,kc).catch(()=>0),t)).catch(t=>{throw _d=null,t})}return _d}r(gq,"openDb");async function Nx(e,t){return FA(t((await gq()).transaction(kc,e).objectStore(kc)))}r(Nx,"withStore");var e0=new Set;function xq(e){return e0.add(e),()=>e0.delete(e)}r(xq,"subscribeCustomSounds");function HA(){for(const e of e0)e()}r(HA,"notifyCustomSoundsChanged");async function PY(e,t){const s=hq(t);if(!s.ok)throw new Error(s.error);const l={kind:e,name:t.name,type:t.type,size:t.size,blob:t,updatedAt:new Date().toISOString()};return await Nx("readwrite",c=>c.put(l)),HA(),l}r(PY,"saveCustomSound");async function bq(e){try{return await Nx("readonly",t=>t.get(e))??null}catch{return null}}r(bq,"loadCustomSound");async function $Y(e){await Nx("readwrite",t=>t.delete(e)),HA()}r($Y,"removeCustomSound");var vq=[{id:"confirmation",label:"Confirmation"},{id:"question",label:"Question"},{id:"glass",label:"Glass"},{id:"bong",label:"Bong"},{id:"maximize",label:"Rise"},{id:"pluck",label:"Pluck"},{id:"error",label:"Alert"},{id:"drop",label:"Drop"},{id:"select",label:"Select"},{id:"open",label:"Open"}],UY="custom",BY="none",t0={approval:"confirmation",question:"question",comment:"pluck",assignment:"maximize",review:"glass",run_failed:"error",join_request:"bong",disk_space:"drop"},KY={approval:"Approvals",question:"Agent questions",comment:"Comments",assignment:"Assignments",review:"Ready for review",run_failed:"Failed runs",join_request:"Join requests",disk_space:"Low disk space"},VA=new Set(vq.map(e=>e.id));function yq(e){return typeof e=="string"&&(VA.has(e)||e==="custom"||e==="none")}r(yq,"isKnownSoundId");function jq(e){return VA.has(e)}r(jq,"isLibrarySoundId");function kk(e,t){return`/sounds/${e}.${t}`}r(kk,"librarySoundUrl");var n0=new Map,vf=new Map,Sk=!1,Ed=null;function WA(){return typeof Audio<"u"}r(WA,"audioSupported");function Nk(){return Ed||(Ed=new Audio().canPlayType('audio/ogg; codecs="vorbis"')?"ogg":"mp3",Ed)}r(Nk,"libraryFormat");function QA(e){let t=n0.get(e);return t||(t=new Audio,t.preload="auto",t.src=e,n0.set(e,t)),t}r(QA,"audioFor");function wq(){for(const e of vf.values())e.then(t=>{t&&(n0.delete(t),URL.revokeObjectURL(t))});vf.clear()}r(wq,"revokeCustomSounds");function kq(e){Sk||(Sk=!0,xq(wq));let t=vf.get(e);return t||(t=bq(e).then(s=>s?URL.createObjectURL(s.blob):null),vf.set(e,t)),t}r(kq,"customSoundUrl");async function GA(e,t){if(t==="none")return null;if(t==="custom"){const s=await kq(e);return s||kk(t0[e],Nk())}return kk(jq(t)?t:t0[e],Nk())}r(GA,"resolveSoundUrl");async function Sq(e,t,s){if(!WA())return!1;const l=await GA(e,t);if(!l)return!1;const c=QA(l);c.volume=Math.min(1,Math.max(0,s)),c.currentTime=0;try{return await c.play(),!0}catch{return!1}}r(Sq,"playSound");function Nq(e,t){return Sq(e,t.kinds[e].soundId,t.volume)}r(Nq,"playKindSound");function Ck(e){if(!(!WA()||!e.enabled))for(const[t,s]of Object.entries(e.kinds))s.enabled&&GA(t,s.soundId).then(l=>{l&&QA(l)})}r(Ck,"preloadNotificationSounds");var a0={getWebPushConfig:r(()=>je.get("/notifications/web-push/config"),"getWebPushConfig"),upsertWebPushSubscription:r(e=>je.put("/notifications/web-push/subscription",e),"upsertWebPushSubscription"),deleteWebPushSubscription:r(e=>je.deleteWithBody("/notifications/web-push/subscription",e),"deleteWebPushSubscription"),sendWebPushTest:r(()=>je.post("/notifications/web-push/test",{}),"sendWebPushTest")},YA="wardmote.notifications.v1",Cq=.6;function s0(){const e={};for(const t of y0)e[t]={enabled:!0,soundId:t0[t]};return{enabled:!0,volume:Cq,pushEnabled:!0,kinds:e}}r(s0,"defaultNotificationSettings");function Vh(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}r(Vh,"asRecord");function XA(e){const t=s0(),s=Vh(e);if(!s)return t;const l=typeof s.volume=="number"&&Number.isFinite(s.volume)?Math.min(1,Math.max(0,s.volume)):t.volume,c=Vh(s.kinds)??{},u={...t.kinds};for(const p of y0){const f=Vh(c[p]);f&&(u[p]={enabled:typeof f.enabled=="boolean"?f.enabled:t.kinds[p].enabled,soundId:yq(f.soundId)?f.soundId:t.kinds[p].soundId})}return{enabled:typeof s.enabled=="boolean"?s.enabled:t.enabled,volume:l,pushEnabled:typeof s.pushEnabled=="boolean"?s.pushEnabled:t.pushEnabled,kinds:u}}r(XA,"normalizeNotificationSettings");function yf(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}r(yf,"storage");function Aq(){const e=yf()?.getItem(YA);if(!e)return s0();try{return XA(JSON.parse(e))}catch{return s0()}}r(Aq,"readStored");var jf,mc=null,Bd=new Set,Id=!1;function Zr(){const e=yf()?.getItem("wardmote.notifications.v1")??null;return mc&&e===jf||(jf=e,mc=Aq()),mc}r(Zr,"getNotificationSettings");function ZA(){for(const e of Bd)e()}r(ZA,"notify");function JA(e){const t=XA(typeof e=="function"?e(Zr()):e);try{yf()?.setItem(YA,JSON.stringify(t))}catch{jf=void 0}return mc=t,jf=yf()?.getItem("wardmote.notifications.v1")??null,ZA(),t}r(JA,"setNotificationSettings");function qY(e,t){return JA(s=>({...s,kinds:{...s.kinds,[e]:{...s.kinds[e],...t}}}))}r(qY,"updateKindSettings");function _q(e){return e.enabled?y0.filter(t=>e.kinds[t].enabled):[]}r(_q,"enabledNotificationKinds");function Ak(e){e.key!==null&&e.key!=="wardmote.notifications.v1"||ZA()}r(Ak,"onStorage");function e2(e){return Bd.add(e),!Id&&typeof window<"u"&&(Id=!0,window.addEventListener("storage",Ak)),()=>{Bd.delete(e),Bd.size===0&&Id&&typeof window<"u"&&(Id=!1,window.removeEventListener("storage",Ak))}}r(e2,"subscribeNotificationSettings");function FY(){return(0,x.useSyncExternalStore)(e2,Zr,Zr)}r(FY,"useNotificationSettings");var Sc={status:"unknown",error:null},i0=new Set,r0=null,_k=Promise.resolve();function Ek(e){if(!(e.status===Sc.status&&e.error===Sc.error)){Sc=e;for(const t of i0)t()}}r(Ek,"setPushState");function Ik(){return Sc}r(Ik,"getPushState");function Eq(){return Sc.status==="active"}r(Eq,"hasActivePushSubscription");function Iq(e){return i0.add(e),()=>i0.delete(e)}r(Iq,"subscribePushState");function HY(){return(0,x.useSyncExternalStore)(Iq,Ik,Ik)}r(HY,"usePushState");function t2(e){const t=e.padEnd(e.length+(4-e.length%4)%4,"=").replace(/-/g,"+").replace(/_/g,"/"),s=atob(t),l=new Uint8Array(new ArrayBuffer(s.length));for(let c=0;c<s.length;c+=1)l[c]=s.charCodeAt(c);return l}r(t2,"urlBase64ToUint8Array");function Tq(e,t){const s=e.options?.applicationServerKey;if(!s)return!0;const l=t2(t),c=new Uint8Array(s);return c.length===l.length&&c.every((u,p)=>u===l[p])}r(Tq,"sameApplicationServerKey");async function Tk(e){await a0.deleteWebPushSubscription({endpoint:e.endpoint}).catch(()=>{}),await e.unsubscribe().catch(()=>!1),r0=null}r(Tk,"forgetSubscription");async function Rq(e,t){if(!aq())return{status:"unsupported",error:null};const s=await KA();if(!s)return{status:"unsupported",error:null};let l=await s.pushManager.getSubscription();if(!(e.enabled&&e.pushEnabled))return l&&await Tk(l),{status:"off",error:null};if(Sx()!=="granted")return{status:"permission",error:null};const c=await a0.getWebPushConfig();if(!c.enabled||!c.publicKey)return{status:"server-disabled",error:null};l&&!Tq(l,c.publicKey)&&(await Tk(l),l=null),l||(l=await s.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:t2(c.publicKey)}));const u=l.toJSON(),p=u.keys?.p256dh,f=u.keys?.auth;if(!p||!f)return{status:"error",error:"The browser returned an incomplete push subscription."};const h=_q(e),g=[t,l.endpoint,...h].join("|");return g!==r0&&(await a0.upsertWebPushSubscription({endpoint:l.endpoint,keys:{p256dh:p,auth:f},kinds:h}),r0=g),{status:"active",error:null}}r(Rq,"reconcile");function l0(e,t){const s=_k.then(async()=>{try{const l=await Rq(e,t);return Ek(l),l}catch(l){const c={status:"error",error:l instanceof Error?l.message:"Push subscription failed."};return Ek(c),c}});return _k=s.catch(()=>{}),s}r(l0,"syncPushSubscription");function n2(e,t){return t.enabled&&t.kinds[e.kind]?.enabled===!0}r(n2,"kindEnabled");function Mq(e){const{payload:t,userId:s,settings:l}=e;return!s||!t.recipientUserIds.includes(s)||!n2(t.notification,l)?"none":e.visible?"sound":e.pushActive?"none":"os"}r(Mq,"decideLiveNotification");function Dq(e){return!e.visible||!n2(e.notification,e.settings)?"none":"sound"}r(Dq,"decideServiceWorkerNotification");async function Oq(e){if(Sx()!=="granted")return;const t={body:e.body,tag:e.key,data:{url:e.url},icon:eq,badge:tq},s=await KA();if(s){await s.showNotification(e.title,t);return}new Notification(e.title,t)}r(Oq,"showOsNotification");var a2={claim:r(e=>dq(e),"claim"),playSound:r((e,t)=>Nq(e.kind,t),"playSound"),showOsNotification:Oq};async function s2(e,t,s,l){return e==="none"?e:await l.claim(t.key)?(e==="sound"?await l.playSound(t,s):await l.showOsNotification(t),e):"none"}r(s2,"perform");function Lq(e,t,s=a2,l={}){const c=l.settings??Zr();return s2(Mq({payload:e,userId:t,settings:c,visible:l.visible??Af().visible,pushActive:l.pushActive??Eq()}),e.notification,c,s)}r(Lq,"deliverLiveNotification");function zq(e,t=a2,s={}){const l=s.settings??Zr();return s2(Dq({notification:e,settings:l,visible:s.visible??Af().visible}),e,l,t)}r(zq,"deliverServiceWorkerNotification");function i2(e){if(!e||typeof e!="object")return null;const t=e;return typeof t.key=="string"&&typeof t.kind=="string"&&typeof t.title=="string"?t:null}r(i2,"readNotification");function Pq(e){if(!e||typeof e!="object")return null;const t=e,s=i2(t.notification);return!s||!Array.isArray(t.recipientUserIds)?null:{notification:s,recipientUserIds:t.recipientUserIds.filter(l=>typeof l=="string")}}r(Pq,"readNotificationCreatedPayload");function $q(e){if(!e||typeof e!="object")return null;const t=e;if(t.type==="wardmote.notification"){const s=i2(t.notification);return s?{type:"notification",notification:s}:null}return t.type==="wardmote.navigate"&&typeof t.url=="string"&&t.url.startsWith("/")?{type:"navigate",url:t.url}:null}r($q,"readServiceWorkerMessage");var Uq=1e4,Bq=3,Kq=2e3,qq=3e5,Fq=2e3,Hq=15e3,Vq=0,Wq=1,Bc=new Set(["succeeded","interrupted","failed","cancelled","timed_out"]),r2=(0,x.createContext)(null);function Qq(e,t,s){if(s.companyId===t)for(const l of Array.from(e))try{l(s)}catch{}}r(Qq,"dispatchLiveEventToSubscribers");function VY(e){const t=(0,x.useContext)(r2),s=(0,x.useRef)(e);(0,x.useEffect)(()=>{s.current=e}),(0,x.useEffect)(()=>{if(t)return t.subscribe(l=>{s.current(l)})},[t])}r(VY,"useCompanyLiveEvent");function be(e){return typeof e=="string"&&e.length>0?e:null}r(be,"readString");function al(e){return typeof e!="object"||e===null||Array.isArray(e)?null:e}r(al,"readRecord");function wf(e){return e.slice(0,8)}r(wf,"shortId");function l2(e,t,s){const l=e.getQueryData($.agents.list(t))?.find(c=>c.id===s);return l?.name?l.name:e.getQueryData($.agents.detail(s))?.name??null}r(l2,"resolveAgentName");function Gq(e,t,s){const l=e.getQueryData($.access.companyUserDirectory(t));if(!l)return null;const c=l.users.find(u=>u.principalId===s);return c?.user?.name?.trim()||c?.user?.email?.trim()||null}r(Gq,"resolveUserName");function Fr(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}r(Fr,"truncate");function Yq(e,t,s,l){return s==="agent"&&l?l2(e,t,l)??`Agent ${wf(l)}`:s==="system"?"System":s==="user"&&l?Gq(e,t,l)??(l==="board"||l==="local-board"?"Board":`User ${wf(l)}`):s==="plugin"?"Plugin":"Unknown actor"}r(Yq,"resolveActorLabel");function Cx(e,t,s,l){const c=new Set([s]),u=e.getQueryData($.issues.detail(s)),p=e.getQueryData($.issues.list(t)),f=be(l?.identifier)??be(l?.issueIdentifier);f&&c.add(f),u?.id&&c.add(u.id),u?.identifier&&c.add(u.identifier);const h=p?.find(g=>!!(g.id===s||g.identifier&&g.identifier===s||f&&g.identifier===f));return h?.id&&c.add(h.id),h?.identifier&&c.add(h.identifier),Array.from(c)}r(Cx,"resolveIssueQueryRefs");function Xq(e,t,s,l){const c=Cx(e,t,s,l),u=c.map(v=>e.getQueryData($.issues.detail(v))).find(v=>!!v),p=e.getQueryData($.issues.list(t))?.find(v=>c.some(y=>v.id===y||v.identifier===y)),f=u??p??null,h=be(l?.identifier)??be(l?.issueIdentifier)??f?.identifier??`Task ${wf(s)}`,g=be(l?.title)??be(l?.issueTitle)??f?.title??null;return{ref:h,title:g,label:g?`${h} - ${Fr(g,72)}`:h,href:`/issues/${f?.identifier??s}`}}r(Xq,"resolveIssueToastContext");function o2(){return!(typeof document>"u"||document.visibilityState!=="visible"||typeof document.hasFocus=="function"&&!document.hasFocus())}r(o2,"isPageForegrounded");function xr(e,t,s){if(!(s?.isForegrounded??o2()))return null;const l=Tf(t).split("/").filter(Boolean);if(!["issues","chats"].includes(l[0])||!l[1])return null;let c=decodeURIComponent(l[1]);if(l[0]==="chats"){const j=e.getQueryData($.auth.session),k=j?.user?.id??j?.session?.userId??null,S=vS(t),N=e.getQueryData($.companies.list(k))?.companies.find(M=>M.issuePrefix.toUpperCase()===S?.toUpperCase());if(!N)return null;const I=e.getQueryData($.agents.list(N.id))?.find(M=>M.id===c||fr(M)===c);if(!I)return null;const C=e.getQueryData($.agentChats.detail(N.id,k,I.id));if(!C)return null;c=C.id}const u=e.getQueryData($.issues.detail(c))??null,p=new Set([c]);u?.id&&p.add(u.id),u?.identifier&&p.add(u.identifier);function f(j,k){const S=e.getQueryData($.issues.activeRun(j)),N=e.getQueryData($.issues.liveRuns(j))??[],I=e.getQueryData($.issues.runs(j))??[];S?.id&&k.add(S.id);for(const C of N)C.id&&k.add(C.id);for(const C of I)C.runId&&k.add(C.runId)}r(f,"collectCachedIssueRunIds");const h=new Set;for(const j of p)f(j,h);const g=new Set(p),v=new Set,y=new Set(h);if(u?.companyId&&u.id){const j=e.getQueryData($.issues.listByDescendantRoot(u.companyId,u.id))??[];for(const k of j)g.add(k.id),k.identifier&&g.add(k.identifier),k.assigneeAgentId&&v.add(k.assigneeAgentId),k.executionRunId&&y.add(k.executionRunId),f(k.id,y),k.identifier&&f(k.identifier,y)}if(u?.companyId){const j=e.getQueryData($.liveRuns(u.companyId))??[];for(const k of j)k.issueId&&g.has(k.issueId)&&y.add(k.id)}return{routeIssueRef:c,issueRefs:p,assigneeAgentId:u?.assigneeAgentId??null,runIds:h,subtreeIssueRefs:g,subtreeAgentIds:v,subtreeRunIds:y}}r(xr,"resolveVisibleIssueRouteContext");function ap(e,t){const s=new Set([e]),l=be(t?.identifier)??be(t?.issueIdentifier);return l&&s.add(l),s}r(ap,"buildIssueRefsForPayload");function sp(e,t){for(const s of e)if(t.has(s))return!0;return!1}r(sp,"overlaps");function Zq(e,t,s,l){const c=be(s.entityType),u=be(s.entityId);if(c!=="issue"||!u)return!1;const p=xr(e,t,l);return p?sp(p.subtreeIssueRefs,ap(u,al(s.details))):!1}r(Zq,"shouldSuppressActivityToastForVisibleIssue");function Jq(e,t,s,l){if(!(l?.isForegrounded??o2()))return!1;const c=Tf(t).match(/^\/agents\/[^/]+\/runs\/([^/]+)/)?.[1];if(c&&decodeURIComponent(c)===be(s.runId))return!0;const u=xr(e,t,l);if(!u)return!1;const p=be(s.issueId);if(p)return u.subtreeIssueRefs.has(p);const f=be(s.runId);if(f)return u.subtreeRunIds.has(f);const h=be(s.agentId);return!!h&&(h===u.assigneeAgentId||u.subtreeAgentIds.has(h))}r(Jq,"shouldSuppressRunStatusToastForVisibleIssue");function Rk(e,t,s,l){const c=xr(e,t,l);if(!c)return!1;const u=be(s.runId),p=be(s.agentId);if(!(u!==null&&c.runIds.has(u)||p&&c.assigneeAgentId&&p===c.assigneeAgentId))return!1;const f=be(s.status);if(u&&f&&Bc.has(f))for(const v of c.issueRefs)e.invalidateQueries({queryKey:$.issues.comments(v)}),e.setQueryData($.issues.liveRuns(v),y=>OK(y,u)),e.setQueryData($.issues.activeRun(v),y=>y?.id===u?null:y),e.setQueryData($.issues.detail(v),y=>LK(y,u));const h=!!f&&Bc.has(f),g=!h&&(l?.liveStatusAlreadyPatched??!1);for(const v of c.issueRefs)e.invalidateQueries({queryKey:$.issues.detail(v)}),e.invalidateQueries({queryKey:$.issues.activity(v)}),e.invalidateQueries({queryKey:$.issues.runs(v)}),l?.runLifecycleEvent&&e.invalidateQueries({queryKey:$.issues.queuedComments(v)}),g||(e.invalidateQueries({queryKey:$.issues.liveRuns(v)}),e.invalidateQueries({queryKey:$.issues.activeRun(v)})),h&&(e.invalidateQueries({queryKey:$.issues.comments(v)}),e.invalidateQueries({queryKey:$.issues.attachments(v)}),e.invalidateQueries({queryKey:$.issues.workProducts(v)}),e.invalidateQueries({queryKey:$.issues.workProductPullRequestRefresh(v)}),e.invalidateQueries({queryKey:["issues","tree-control-state",v]}));return!0}r(Rk,"invalidateVisibleIssueRunQueries");function pc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r(pc,"hasPatchKey");function c2(e,t){return e.id!==t.runId?e:{...e,...pc(t,"message")?{currentStatusMessage:t.message}:{},...pc(t,"updatedAt")?{currentStatusUpdatedAt:t.updatedAt}:{},...pc(t,"currentToolName")?{currentToolName:t.currentToolName}:{},...pc(t,"lastAssistantSnippet")?{lastAssistantSnippet:t.lastAssistantSnippet}:{},...pc(t,"lastEventAt")?{lastEventAt:t.lastEventAt}:{}}}r(c2,"applyRunLiveStatusPatch");function Mk(e,t){if(!e)return e;let s=!1;const l=e.map(c=>c.id!==t.runId?c:(s=!0,c2(c,t)));return s?l:e}r(Mk,"applyRunLiveStatusPatchToArray");function e7(e,t,s){const l=be(e.runId);if(!l)return null;const c={runId:l,agentId:be(e.agentId),issueId:be(e.issueId)};if(s==="heartbeat.run.progress")return c.message=be(e.message),c.updatedAt=be(e.updatedAt)??t,c.currentToolName=be(e.currentToolName),c.lastAssistantSnippet=be(e.lastAssistantSnippet),c.lastEventAt=be(e.lastEventAt)??c.updatedAt,c;if(s==="heartbeat.run.log")return c.lastEventAt=be(e.ts)??t,c;if(s==="heartbeat.run.event"){const u=be(e.message);u&&(c.message=u),c.updatedAt=be(e.updatedAt)??t;const p=be(e.currentToolName);p&&(c.currentToolName=p);const f=be(e.lastAssistantSnippet);return f&&(c.lastAssistantSnippet=f),c.lastEventAt=be(e.lastEventAt)??t,c}return null}r(e7,"readRunLiveStatusPatchFromPayload");var t7=1e3;function n7(e=t7){const t=new Map,s=new Map,l=r(c=>{const u=t.get(c);if(!u){s.delete(c);return}t.delete(c),s.set(c,setTimeout(()=>l(c),e)),u.apply(u.patch)},"release");return{submit:r((c,u)=>{if(s.has(c.runId)){t.set(c.runId,{patch:c,apply:u});return}s.set(c.runId,setTimeout(()=>l(c.runId),e)),u(c)},"submit"),dispose:r(()=>{for(const c of s.values())clearTimeout(c);s.clear(),t.clear()},"dispose")}}r(n7,"createRunLogPatchThrottle");function a7(e,t,s,l,c){let u=!1;e.setQueryData($.liveRuns(t),h=>{const g=Mk(h,l);return g!==h&&(u=!0),g});const p=new Set;if(l.issueId)for(const h of Cx(e,t,l.issueId,null))p.add(h);const f=xr(e,s,c);if(f&&(f.runIds.has(l.runId)||l.issueId&&f.issueRefs.has(l.issueId)||l.agentId&&f.assigneeAgentId&&l.agentId===f.assigneeAgentId))for(const h of f.issueRefs)p.add(h);for(const h of p)e.setQueryData($.issues.activeRun(h),g=>!g||g.id!==l.runId?g:(u=!0,c2(g,l))),e.setQueryData($.issues.liveRuns(h),g=>{const v=Mk(g,l);return v!==g&&(u=!0),v});return u}r(a7,"applyRunLiveStatusPatchToCaches");function s7(e,t,s,l){const c=xr(e,t,l);if(!c)return!1;const u=be(s.agentId);return!!u&&(u===c.assigneeAgentId||c.subtreeAgentIds.has(u))}r(s7,"shouldSuppressAgentStatusToastForVisibleIssue");function i7(e,t,s,l){const c=be(s.entityType),u=be(s.entityId),p=be(s.actorType),f=be(s.action),h=al(s.details);if(c!=="issue"||!u||p!=="agent"&&p!=="system"||f!=="issue.updated"||be(h?.source)==="comment")return!1;const g=xr(e,t,l);return g?sp(g.issueRefs,ap(u,h)):!1}r(i7,"shouldDeferIssueRefetchForVisibleAgentActivity");function u2(e,t,s,l){const c=be(s.entityType),u=be(s.entityId),p=be(s.action),f=al(s.details);if(c!=="issue"||!u||p!=="issue.comment_added")return!1;const h=xr(e,t,l);return h?sp(h.issueRefs,ap(u,f)):!1}r(u2,"shouldDeferVisibleIssueCommentActivity");async function r7(e,t,s,l){const c=be(s.entityType),u=be(s.action),p=al(s.details),f=be(p?.commentId);if(c!=="issue"||u!=="issue.comment_added"||!f)return!1;const h=xr(e,t,l);if(!h)return!1;const g=be(s.entityId);if(!g||!sp(h.issueRefs,ap(g,p)))return!1;try{const v=await cn.getComment(h.routeIssueRef,f);for(const y of h.issueRefs)e.setQueryData($.issues.comments(y),j=>j?{...j,pages:gI(j.pages,v)}:{pages:[[v]],pageParams:[null]});return!0}catch{for(const v of h.issueRefs)e.invalidateQueries({queryKey:$.issues.comments(v)});return!1}}r(r7,"hydrateVisibleIssueComment");var l7=new Set(["issue.created","issue.updated","issue.comment_added"]),Dk=new Set(["issue.document_created","issue.document_updated","issue.document_restored","issue.document_deleted"]),o7=new Set(["issue.document_annotation_thread_created","issue.document_annotation_comment_added","issue.document_annotation_thread_resolved","issue.document_annotation_thread_reopened","issue.document_annotation_remapped"]),c7=new Set(["routine.document_annotation_thread_created","routine.document_annotation_comment_added","routine.document_annotation_thread_resolved","routine.document_annotation_thread_reopened","routine.document_annotation_remapped"]),u7=new Set(["case.document_annotation_thread_created","case.document_annotation_comment_added","case.document_annotation_thread_resolved","case.document_annotation_thread_reopened","case.document_annotation_remapped"]),d7=new Set(["error"]),f7=new Set(["failed","timed_out","cancelled"]);function p7(e){if(!e)return null;const t=[];if(typeof e.status=="string"&&t.push(`status -> ${e.status.replace(/_/g," ")}`),typeof e.priority=="string"&&t.push(`priority -> ${e.priority}`),typeof e.assigneeAgentId=="string"||typeof e.assigneeUserId=="string"?t.push("reassigned"):(e.assigneeAgentId===null||e.assigneeUserId===null)&&t.push("unassigned"),e.reopened===!0){const s=be(e.reopenedFrom);t.push(s?`reopened from ${s.replace(/_/g," ")}`:"reopened")}return typeof e.title=="string"&&t.push("title changed"),typeof e.description=="string"&&t.push("description changed"),t.length>0?t.join(", "):null}r(p7,"describeIssueUpdate");function m7(e,t,s,l){const c=be(s.entityType),u=be(s.entityId),p=be(s.action),f=al(s.details),h=be(s.actorId),g=be(s.actorType);if(c!=="issue"||!u||!p||!l7.has(p))return null;const v=Xq(e,t,u,f),y=be(be(s.actorName)?.trim())??Yq(e,t,g,h),j=g==="agent"&&h?e.getQueryData($.agents.list(t))?.find(K=>K.id===h)??e.getQueryData($.agents.detail(h)):void 0,k=g==="user"&&h?e.getQueryData($.access.companyUserDirectory(t))?.users.find(K=>K.principalId===h)?.user:void 0,S=h&&(g==="user"||g==="agent")?{type:g,id:h,name:y,image:s.actorImage!==void 0?be(s.actorImage):k?.image,appearance:g==="agent"?LE(s.actorAppearance!==void 0?s.actorAppearance:j?.appearance,h):void 0}:void 0;if(g==="user"&&l.userId&&h===l.userId||g==="agent"&&l.agentId&&h===l.agentId)return null;if(p==="issue.created")return{actor:S,title:`${y} created ${v.ref}`,body:v.title?Fr(v.title,96):void 0,tone:"success",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${p}:${u}`};if(p==="issue.updated"){if(be(f?.source)==="comment")return null;const K=p7(f),z=K?v.title?`${Fr(v.title,64)} - ${K}`:K:v.title?Fr(v.title,96):v.label;return{actor:S,title:`${y} updated ${v.ref}`,body:Fr(z,100),tone:"info",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${p}:${u}`}}const N=be(f?.commentId),I=be(f?.bodySnippet),C=f?.reopened===!0,M=f?.updated===!0,R=be(f?.reopenedFrom),_=C?R?`reopened from ${R.replace(/_/g," ")}`:"reopened":null,D=C?`${y} reopened and commented on ${v.ref}`:M?`${y} commented and updated ${v.ref}`:`${y} commented on ${v.ref}`,U=I?_?`${_} - ${I.replace(/^#+\s*/m,"").replace(/\n/g," ")}`:I.replace(/^#+\s*/m,"").replace(/\n/g," "):_?v.title?`${_} - ${v.title}`:_:v.title??void 0;return{actor:S,title:D,body:U?Fr(U,96):void 0,tone:"info",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${p}:${u}:${N??"na"}`}}r(m7,"buildActivityToast");function h7(e){const t=be(e.entityType),s=be(e.action),l=be(e.entityId),c=al(e.details);return t!=="join_request"||!s||!l||s!=="join.requested"&&s!=="join.request_replayed"?null:{title:`${be(c?.requestType)==="agent"?"Agent":"Someone"} wants to join`,body:"A new join request is waiting for approval.",tone:"info",action:{label:"View inbox",href:"/inbox/mine"},dedupeKey:`join-request:${l}`}}r(h7,"buildJoinRequestToast");function g7(e,t,s,l){const c=be(e.agentId),u=be(e.status);if(!c||!u||!d7.has(u))return null;const p=u==="error"?"error":"info",f=t(c)??`Agent ${wf(c)}`;return{title:u==="running"?`${f} started`:`${f} errored`,body:s.getQueryData($.agents.list(l))?.find(h=>h.id===c)?.title??void 0,tone:p,action:{label:"View agent",href:`/agents/${c}`},dedupeKey:`agent-status:${c}:${u}`}}r(g7,"buildAgentStatusToast");function x7(e,t){const s=be(e.runId),l=be(e.agentId),c=be(e.status);if(!s||!l||!c||!f7.has(c))return null;const u=be(e.error),p=be(e.errorCode);if(p==="operator_interrupted"||p==="workspace_busy")return null;const f=be(e.contextSource),h=be(e.triggerDetail),g=t(l)??"Agent";if(c==="failed"&&p==="low_trust_isolation_unavailable"&&f?.startsWith("chat:"))return{title:`${g} couldn't start this chat`,body:"This external chat identity isn't linked, and isolated guest workspaces are disabled. Link the identity in Connectors or enable isolated workspaces, then start a new task.",tone:"warn",ttlMs:1e4,action:{label:"Open chat connections",href:"/apps"},dedupeKey:`run-status:${s}:${c}`};const v=c==="succeeded"?"success":c==="cancelled"?"info":"error",y=`${g} run ${c==="succeeded"?"succeeded":c==="failed"?"failed":c==="timed_out"?"timed out":"cancelled"}`;let j;return u?j=Fr(u,100):h&&(j=`Trigger: ${h}`),{title:y,body:j,tone:v,ttlMs:c==="succeeded"?5e3:7e3,action:{label:"View run",href:`/agents/${l}/runs/${s}`},dedupeKey:`run-status:${s}:${c}`}}r(x7,"buildRunStatusToast");function b7(e,t,s){const l=be(s.runId),c=be(s.status);if(!l||!c)return!1;if(e.setQueryData($.runDetail(l),p=>{if(!p)return p;const f=r(h=>Object.prototype.hasOwnProperty.call(s,h),"has");return{...p,status:c,...f("invocationSource")?{invocationSource:be(s.invocationSource)??p.invocationSource}:{},...f("triggerDetail")?{triggerDetail:be(s.triggerDetail)}:{},...f("error")?{error:be(s.error)}:{},...f("errorCode")?{errorCode:be(s.errorCode)}:{},...f("startedAt")?{startedAt:be(s.startedAt)}:{},...f("finishedAt")?{finishedAt:be(s.finishedAt)}:{}}}),Bc.has(c))return e.setQueryData($.liveRuns(t),p=>MK(p,l)),e.getQueryData($.pausedTasks(t))&&e.invalidateQueries({queryKey:$.pausedTasks(t)}),!0;let u=!1;return e.setQueryData($.liveRuns(t),p=>{const f=DK(p,l,c);return u=f.present,f.next}),u}r(b7,"applyRunLifecycleToCompanyLiveRuns");function v7(e,t,s){const l=be(s.status);l&&Bc.has(l)&&e.invalidateQueries({queryKey:$.heartbeats(t),refetchType:"none"}),e.invalidateQueries({queryKey:$.agents.list(t)}),e.invalidateQueries({queryKey:$.dashboard(t)}),e.invalidateQueries({queryKey:["costs",t]}),e.invalidateQueries({queryKey:$.sidebarBadges(t)});const c=be(s.agentId);c&&(e.invalidateQueries({queryKey:$.agents.detail(c)}),e.invalidateQueries({queryKey:$.heartbeats(t,c)}));const u=be(s.runId);u&&e.invalidateQueries({queryKey:$.runDetail(u)})}r(v7,"invalidateHeartbeatQueries");function y7(e,t,s){const l=be(s.agentId);l&&e.invalidateQueries({queryKey:$.agents.detail(l)})}r(y7,"invalidateHeartbeatProgressQueries");var j7=new Set(["approval","attention_source","budget_incident","decision","decision_queue","issue_recovery_action","join_request"]),w7=["issue.blockers_","issue.dependency_recovery_","issue.disposition_repair_","issue.execution_recovery_","issue.interaction_","issue.recovery_action_","issue.stalled_review_","issue.thread_interaction_"],k7=new Set(["failed","timed_out"]);function S7(e,t,s){return t?.startsWith("inbox.")||e&&j7.has(e)?!0:e!=="issue"||!t?!1:w7.some(l=>t.startsWith(l))||t==="issue.reviewers_updated"||t==="issue.status_decision_recorded"?!0:(t==="issue.created"||t==="issue.updated")&&(s?.status!==void 0||s?.blockedByIssueIds!==void 0)}r(S7,"activityChangesAttention");function Ok(e,t,s,l){return e.getQueriesData({queryKey:$.attention(t)}).some(([,c])=>c?"items"in c?Array.isArray(c.items)&&c.items.some(s):"count"in c&&l(c):!1)}r(Ok,"cachedAttentionIncludes");function o0(e,t){e.invalidateQueries({queryKey:$.attention(t)})}r(o0,"invalidateAttentionQueries");function N7(e,t,s,l,c){e.invalidateQueries({queryKey:$.activity(t)}),e.invalidateQueries({queryKey:$.dashboard(t)}),e.invalidateQueries({queryKey:$.sidebarBadges(t)});const u=be(s.entityType),p=be(s.entityId),f=be(s.action),h=be(s.actorType),g=be(s.actorId),v=al(s.details),y=h==="user"&&!!l.userId&&g===l.userId||h==="agent"&&!!l.agentId&&g===l.agentId;if(S7(u,f,v)&&o0(e,t),u==="decision"&&(e.invalidateQueries({queryKey:["decisions",t]}),p&&e.invalidateQueries({queryKey:$.decisions.detail(p)})),(f?.startsWith("ai_connection.")||f?.startsWith("connection_grant."))&&e.invalidateQueries({queryKey:["ai-connections",t]}),(f?.startsWith("primary_agent.")||f?.startsWith("agent.")||f?.startsWith("resource_membership."))&&e.invalidateQueries({queryKey:["primary-agent",t]}),f?.startsWith("resource_membership.")||f?.startsWith("primary_agent.")){const j=be(v?.userId);(!j||j===l.userId)&&e.invalidateQueries({queryKey:$.resourceMemberships.mine(t)})}if(u==="issue"){const j=$.agentChats.list(t,l.userId);if((p&&e.getQueryData(j)?.some(k=>k.id===p)||f==="issue.conversation_opened"&&y)&&e.invalidateQueries({queryKey:j}),(f==="issue.tree_hold_created"||f==="issue.tree_hold_released"||f==="issue.updated")&&(e.invalidateQueries({queryKey:["issues","tree-control-state"]}),f!=="issue.updated"&&e.invalidateQueries({queryKey:$.pausedTasks(t)})),p&&HK(e,t,p,KK(f,v,c?.occurredAt??null)),VK(e,t),a3(e,t,s),p){const k=(f==="issue.comment_added"||f==="issue.updated"&&be(v?.source)==="comment")&&(h==="user"&&!!l.userId&&g===l.userId||h==="agent"&&!!l.agentId&&g===l.agentId),S=!!c?.pathname&&i7(e,c.pathname,s,{isForegrounded:c.isForegrounded}),N=!!c?.pathname&&u2(e,c.pathname,s,{isForegrounded:c.isForegrounded}),I=Cx(e,t,p,v);for(const C of I){const M=k||S||N?{refetchType:"inactive"}:void 0;if(e.invalidateQueries({queryKey:$.issues.detail(C),...M}),e.invalidateQueries({queryKey:$.issues.activity(C),...M}),(f==="issue.comment_added"||f==="issue.conversation_session_started")&&e.invalidateQueries({queryKey:$.issues.comments(C),...M}),(f==="issue.comment_added"||f?.startsWith("issue.queued_comment"))&&e.invalidateQueries({queryKey:$.issues.queuedComments(C)}),(f?.startsWith("issue.attachment_")||f?.startsWith("issue.work_product_"))&&(e.invalidateQueries({queryKey:$.issues.attachments(C)}),e.invalidateQueries({queryKey:$.issues.workProducts(C)})),f==="issue.conversation_session_started"&&(e.invalidateQueries({queryKey:["issues","tree-control-state",C]}),e.invalidateQueries({queryKey:$.issues.interactions(C)})),f&&Dk.has(f)){const R=be(v?.key);e.invalidateQueries({queryKey:$.issues.documents(C),...M}),R?(e.invalidateQueries({queryKey:$.issues.document(C,R),...M}),e.invalidateQueries({queryKey:$.issues.documentRevisions(C,R),...M})):(e.invalidateQueries({queryKey:["issues","document",C],...M}),e.invalidateQueries({queryKey:["issues","document-revisions",C],...M}))}if(f&&(Dk.has(f)||o7.has(f))){const R=be(v?.key)??be(v?.documentKey);e.invalidateQueries({queryKey:R?["issues","document-annotations",C,R]:["issues","document-annotations",C],...M})}(f?.startsWith("issue.thread_interaction_")||(f==="issue.updated"||f==="issue.status_decision_recorded")&&be(v?.source)==="native_status_decision")&&(e.invalidateQueries({queryKey:$.issues.interactions(C)}),e.invalidateQueries({queryKey:$.tools.actionRequests(t,"pending")}),e.invalidateQueries({queryKey:$.apps.attention(t)}),e.invalidateQueries({queryKey:$.tools.trustRules(t)}))}}return}if(u==="agent"){e.invalidateQueries({queryKey:$.agents.list(t)}),e.invalidateQueries({queryKey:$.org(t)}),p&&(e.invalidateQueries({queryKey:$.agents.detail(p)}),e.invalidateQueries({queryKey:$.heartbeats(t,p)}));return}if(u==="project"){const j=be(s.details?.sourceIssueId);j&&e.invalidateQueries({queryKey:$.issues.activity(j)}),e.invalidateQueries({queryKey:$.projects.all(t)}),p&&e.invalidateQueries({queryKey:$.projects.detail(p)});return}if(u==="company_skill"){const j=be(s.details?.sourceIssueId);j&&e.invalidateQueries({queryKey:$.issues.activity(j)}),p&&e.invalidateQueries({queryKey:$.companySkills.detail(t,p)}),e.invalidateQueries({queryKey:$.companySkills.list(t)});return}if(u==="goal"){e.invalidateQueries({queryKey:$.goals.list(t)}),p&&e.invalidateQueries({queryKey:$.goals.detail(p)});return}if(u==="approval"){e.invalidateQueries({queryKey:$.approvals.list(t)});return}if(u==="join_request"){e.invalidateQueries({queryKey:$.access.joinRequests(t)});return}if(u==="cost_event"){e.invalidateQueries({queryKey:["costs",t]}),e.invalidateQueries({queryKey:["usage-by-provider",t]}),e.invalidateQueries({queryKey:["usage-by-biller",t]}),e.invalidateQueries({queryKey:$.usageWindowSpend(t)});return}if(u==="routine"||u==="routine_trigger"||u==="routine_run"){if(e.invalidateQueries({queryKey:["routines"]}),u==="routine"&&f&&c7.has(f)&&p){const j=be(v?.key)??be(v?.documentKey)??"description",k=y?{refetchType:"inactive"}:void 0;e.invalidateQueries({queryKey:["routines","document-annotations",p,j],...k})}return}if(u==="case"){if(e.invalidateQueries({queryKey:$.cases.list(t)}),p&&(e.invalidateQueries({queryKey:$.cases.detail(p)}),e.invalidateQueries({queryKey:$.cases.events(p)}),f&&u7.has(f))){const j=be(v?.key)??be(v?.documentKey),k=y?{refetchType:"inactive"}:void 0;e.invalidateQueries({queryKey:j?["cases","document-annotations",p,j]:["cases","document-annotations",p],...k})}return}if(u==="summary_slot"){const j=be(v?.scopeKind),k=be(v?.slotKey),S=be(v?.scopeId);j&&k&&(e.invalidateQueries({queryKey:$.summarySlots.detail(t,j,k,S)}),e.invalidateQueries({queryKey:$.summarySlots.revisions(t,j,k,S)}));return}u==="company"&&e.invalidateQueries({queryKey:$.companies.all})}r(N7,"invalidateActivityQueries");function C7(e,t){const s=t.payload??{},l=be(s.runId),c=be(s.status);if(!l||!c||!Bc.has(c))return!1;const u=`${t.companyId}:${l}:${c}`,p=e.observedRunOutcomes.has(u);e.observedRunOutcomes.delete(u),e.observedRunOutcomes.add(u),e.observedRunOutcomes.size>Fq&&e.observedRunOutcomes.delete(e.observedRunOutcomes.values().next().value);const f=Date.parse(be(s.finishedAt)??""),h=Date.parse(t.createdAt);return p||h-f>qq}r(C7,"observeRunOutcome");function A7(e,t){const s=Date.now();if(s<e.suppressUntil)return!0;const l=e.cooldownHits.get(t);if(!l)return!1;const c=l.filter(u=>s-u<Uq);return e.cooldownHits.set(t,c),c.length>=Bq}r(A7,"shouldSuppressToast");function _7(e,t){const s=Date.now(),l=e.cooldownHits.get(t)??[];l.push(s),e.cooldownHits.set(t,l)}r(_7,"recordToastHit");function Wh(e,t,s,l){A7(e,s)||t(l)!==null&&_7(e,s)}r(Wh,"gatedPushToast");function E7(e,t,s,l,c,u,p,f){if(l.companyId!==t)return;const h=r(k=>l2(e,t,k),"nameOf"),g=l.payload??{},v=l.type==="heartbeat.run.status"&&(C7(u,l)||Jq(e,s,g)),y=e7(g,l.createdAt,l.type);let j=!1;if(y){const k=r(S=>{j=a7(e,t,s,S)},"applyPatch");l.type==="heartbeat.run.log"&&f?f.submit(y,k):k(y)}if(l.type!=="heartbeat.run.log"){if(l.type==="heartbeat.run.queued"||l.type==="heartbeat.run.status"){const k=b7(e,t,g);if(v7(e,t,g),wk(e,l),k||e.invalidateQueries({queryKey:$.liveRuns(t)}),Rk(e,s,g,{runLifecycleEvent:!0}),(l.type==="heartbeat.run.status"&&k7.has(be(g.status)??"")||l.type==="heartbeat.run.queued"&&Ok(e,t,S=>S.sourceKind==="failed_run",S=>(S.countsBySourceKind?.failed_run??0)>0))&&o0(e,t),l.type==="heartbeat.run.status"){const S=x7(g,h);S&&!v&&Wh(u,c,"run-status",S)}return}if(l.type==="heartbeat.run.progress"){y7(e,t,g),Rk(e,s,g,{liveStatusAlreadyPatched:j});return}if(l.type==="heartbeat.run.event"){wk(e,l);return}if(l.type==="agent.status"){e.invalidateQueries({queryKey:$.agents.list(t)}),e.invalidateQueries({queryKey:$.dashboard(t)}),e.invalidateQueries({queryKey:$.org(t)});const k=be(g.agentId);k&&e.invalidateQueries({queryKey:$.agents.detail(k)}),(be(g.status)==="error"||k&&Ok(e,t,N=>N.sourceKind==="agent_error_alert"&&N.subject?.id===k,N=>N.errorAgentIds?.includes(k)===!0))&&o0(e,t);const S=g7(g,h,e,t);S&&!s7(e,s,g)&&Wh(u,c,"agent-status",S);return}if(l.type==="activity.logged"){N7(e,t,g,p,{pathname:s,occurredAt:l.createdAt??null}),u2(e,s,g)&&r7(e,s,g);const k=be(g.action),S=m7(e,t,g,p)??h7(g);S&&!Zq(e,s,g)&&Wh(u,c,`activity:${k??"unknown"}`,S)}}}r(E7,"handleLiveEvent");function I7(e,t){return e&&e===t?e:null}r(I7,"resolveLiveCompanyId");function Lk(e){e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null}r(Lk,"resetSocketHandlers");function zk(e,t){if(e){if(e.readyState===Vq){e.onopen=()=>{Lk(e),e.close(1e3,t)},e.onmessage=null,e.onerror=()=>{},e.onclose=null;return}Lk(e),e.readyState===Wq&&e.close(1e3,t)}}r(zk,"closeSocketQuietly");function T7(e,t,s){return e==="success"&&(t||s==="local_trusted")}r(T7,"canUseLiveSession");function R7({children:e}){const{visible:t}=uS(),s=(0,x.useRef)(!t),{selectedCompanyId:l,selectedCompany:c}=bt(),u=kn(),{pushToast:p}=Ri(),f=hn(),h=(0,x.useRef)({cooldownHits:new Map,suppressUntil:0,observedRunOutcomes:new Set}),g=(0,x.useRef)(f.pathname),{data:v,status:y}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),{data:j}=me({queryKey:$.health,queryFn:Fc.get}),k=v?.user?.id??v?.session?.userId??(j?.deploymentMode==="local_trusted"?"local-board":null),S=v?.session?.id??k??"signed_out",N=I7(l,c?.id??null),I=T7(y,v!=null,j?.deploymentMode)&&N!==null,C=(0,x.useRef)({userId:k,agentId:null}),M=(0,x.useRef)(new Set),R=(0,x.useCallback)(z=>(M.current.add(z),()=>{M.current.delete(z)}),[]),_=(0,x.useMemo)(()=>({subscribe:R}),[R]),D=(0,x.useMemo)(()=>IK(u),[u]),U=(0,x.useMemo)(()=>RK(u,D),[u,D]),K=(0,x.useMemo)(()=>n7(),[]);return(0,x.useEffect)(()=>()=>{D.dispose(),K.dispose()},[D,K]),(0,x.useEffect)(()=>{g.current=f.pathname},[f.pathname]),(0,x.useEffect)(()=>{C.current={userId:k,agentId:null}},[k]),(0,x.useEffect)(()=>{if(!t||!I||!N)return;const z=window.setInterval(()=>{WK(u,N)},zK);return()=>window.clearInterval(z)},[I,N,u,t]),(0,x.useEffect)(()=>{if(!t){s.current=!0,D.dispose(),K.dispose();return}if(!I||!N)return;s.current&&(s.current=!1,u.invalidateQueries({type:"active"},{cancelRefetch:!1}));let z=!1,E=0,B=null,O=null,Q=null;const V=r(()=>{B!==null&&(window.clearTimeout(B),B=null)},"clearReconnect"),ue=r(()=>{O!==null&&(window.clearInterval(O),O=null)},"stopPolling"),ce=r(()=>{z||O!==null||(O=window.setInterval(()=>{u.invalidateQueries({type:"active"},{cancelRefetch:!1})},Hq))},"startPolling"),X=r(()=>{if(z||B!==null)return;E+=1;const ie=Math.min(15e3,1e3*2**Math.min(E-1,4));B=window.setTimeout(()=>{B=null,A()},ie)},"scheduleReconnect"),A=r(()=>{if(z)return;const ie=ZK(`/api/companies/${encodeURIComponent(N)}/events/ws`),le=JK(ie);if(!le){ce(),X();return}Q=le,le.onopen=()=>{if(z||Q!==le){zk(le,"stale_connection");return}ue(),E>0&&(h.current.suppressUntil=Date.now()+Kq),u.invalidateQueries({type:"active"},{cancelRefetch:!1}),E=0},le.onmessage=Ae=>{if(!Af().visible)return;const de=typeof Ae.data=="string"?Ae.data:"";if(de)try{const we=JSON.parse(de);if(E7(U,N,g.current,we,p,h.current,{userId:C.current.userId,agentId:C.current.agentId},K),Qq(M.current,N,we),we.type==="notification.created"){const ye=Pq(we.payload);ye&&Lq(ye,C.current.userId)}}catch{}},le.onerror=()=>{},le.onclose=()=>{Q===le&&(Q=null,!z&&(ce(),X()))}},"connect"),ee=window.setTimeout(A,0);return()=>{z=!0,window.clearTimeout(ee),V(),ue();const ie=Q;Q=null,zk(ie,"provider_unmount")}},[t,D,K,u,U,N,p,I,S]),(0,a.jsx)(r2.Provider,{value:_,children:e})}r(R7,"LiveUpdatesProvider");function M7(e){let t=Zr();Ck(t),l0(t,e.userId);const s=e2(()=>{const u=Zr();u!==t&&(t=u,Ck(u),l0(u,e.userId))}),l=typeof navigator<"u"&&"serviceWorker"in navigator?navigator.serviceWorker:null,c=r(u=>{const p=$q(u.data);p&&(p.type==="navigate"?e.navigate(p.url):zq(p.notification))},"onMessage");return l?.addEventListener("message",c),l?.startMessages(),()=>{s(),l?.removeEventListener("message",c)}}r(M7,"startNotificationRuntime");function D7(){const e=ja(),t=(0,x.useRef)(e),{data:s}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),l=s?.user?.id??s?.session?.userId??null;return(0,x.useEffect)(()=>{t.current=e},[e]),(0,x.useEffect)(()=>{if(l)return M7({userId:l,navigate:r(c=>t.current(c),"navigate")})},[l]),null}r(D7,"NotificationRuntime");var O7=36e5,L7=3e3,z7=2e3,Pk="wardmote.skip-waiting",P7="wardmote.build-id",d2=null,c0=new Set;function $7(e){d2=e;for(const t of c0)t()}r($7,"publishUpdate");function U7(e){return c0.add(e),()=>{c0.delete(e)}}r(U7,"subscribe");function B7(){return(0,x.useSyncExternalStore)(U7,()=>d2,()=>null)}r(B7,"useServiceWorkerUpdate");function K7(e){return new Promise(t=>{const s=new MessageChannel,l=r(u=>{clearTimeout(c),s.port1.close(),t(u)},"finish"),c=setTimeout(()=>l(null),z7);s.port1.onmessage=u=>{l(typeof u.data?.buildId=="string"?u.data.buildId:null)},e.postMessage({type:P7},[s.port2])})}r(K7,"requestWorkerBuildId");function q7(e={}){const t=e.container??(typeof navigator<"u"&&"serviceWorker"in navigator?navigator.serviceWorker:void 0);if(!t)return()=>{};const s=e.documentRef??document,l=e.reload??(()=>window.location.reload()),c=e.updateIntervalMs??O7,u=e.onUpdateReady??$7;let p=!!t.controller,f=!1,h=!1,g,v=!1;const y=r(async _=>e.pageBuildId?await K7(_)!==e.pageBuildId:!0,"servesNewerBuild"),j=r(()=>{h||(h=!0,g!==void 0&&clearTimeout(g),l())},"reloadOnce"),k=r(async _=>{const D=await y(_);if(!v){if(!D){_.postMessage({type:Pk});return}u(()=>{f=!0,_.postMessage({type:Pk}),g=setTimeout(j,L7)})}},"offerWaiting"),S=r(()=>{if(!p){p=!0;return}if(f){j();return}const _=t.controller;_&&y(_).then(D=>{D&&!v&&!f&&u(j)})},"onControllerChange");t.addEventListener("controllerchange",S);let N;const I=r(()=>{const _=N?.installing;_&&_.addEventListener("statechange",()=>{_.state==="installed"&&t.controller&&k(_)})},"watchInstalling"),C=r(()=>{N?.update().catch(()=>{})},"checkForUpdates"),M=r(()=>{s.visibilityState==="visible"&&C()},"onVisibilityChange");s.addEventListener("visibilitychange",M);const R=setInterval(C,c);return t.register("/sw.js").then(_=>{N=_,_.waiting&&t.controller&&k(_.waiting),_.addEventListener("updatefound",I)}).catch(()=>{}),()=>{v=!0,t.removeEventListener("controllerchange",S),s.removeEventListener("visibilitychange",M),N?.removeEventListener("updatefound",I),clearInterval(R),g!==void 0&&clearTimeout(g)}}r(q7,"startServiceWorkerUpdates");var f2="wardmote.notifications.asked-after-decision";function F7(){try{return window.localStorage.getItem(f2)==="1"}catch{return!0}}r(F7,"alreadyAsked");function H7(){try{window.localStorage.setItem(f2,"1")}catch{return}}r(H7,"markAsked");async function V7(e){const t=await nq();if(t!=="granted")return t;const s=JA(l=>({...l,enabled:!0,pushEnabled:!0}));return e&&await l0(s,e),t}r(V7,"enableNotificationsAfterDecision");function W7(){const{pushToast:e}=Ri(),{data:t}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),s=t?.user?.id??t?.session?.userId??null;(0,x.useEffect)(()=>qE(()=>{F7()||!kx()||Sx()!=="default"||(H7(),e({id:"wardmote-notify-after-decision",title:"Get notified when an agent needs a decision",body:"Turn on notifications for this device. You can change it later in Settings.",tone:"info",persistent:!0,action:{label:"Turn on",onClick:r(()=>{V7(s)},"onClick")}}))}),[e,s])}r(W7,"useFirstDecisionNotificationPrompt");var Q7="wardmote-update-ready";function G7(){const{pushToast:e}=Ri(),t=B7(),s=kn(),l=S0(),c=(0,x.useRef)(l);return(0,x.useEffect)(()=>{t&&e({id:Q7,title:"A new version is ready.",tone:"info",persistent:!0,action:{label:"Reload",onClick:t}})},[t,e]),(0,x.useEffect)(()=>{if(l){c.current=!0;return}c.current&&(c.current=!1,s.invalidateQueries())},[l,s]),W7(),null}r(G7,"PwaRuntime");var p2={get:r(e=>je.get(`/companies/${e}/primary-agent/me`),"get"),set:r((e,t)=>je.put(`/companies/${e}/primary-agent/me`,t),"set")};function Y7(e){const t=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),s=t.data?.user?.id??t.data?.session?.userId??"local-board",l=me({queryKey:$.primaryAgent.mine(e??"__none__",s),queryFn:r(()=>p2.get(e),"queryFn"),enabled:!!e&&t.isSuccess});return{...l,userId:s,loading:!!e&&(t.isPending||l.isPending&&!t.error),error:t.error??l.error,retry:r(()=>t.isError?t.refetch():l.refetch(),"retry")}}r(Y7,"usePrimaryAgent");function X7({children:e}){const{selectedCompanyId:t}=bt(),s=Y7(t),l=kn(),{pushToast:c}=Ri(),u=(0,x.useRef)({companyId:t,userId:s.userId});u.current={companyId:t,userId:s.userId};const p=r(j=>$.primaryAgent.mine(j.companyId,j.userId),"keyFor"),f=r(j=>j.companyId===u.current.companyId&&j.userId===u.current.userId,"isCurrentScope"),h=me({queryKey:$.agents.list(t),queryFn:r(()=>Ha.list(t),"queryFn"),enabled:!!t}),g=Bt({mutationFn:r(j=>p2.set(j.companyId,{primaryAgentId:j.agentId}),"mutationFn"),onMutate:r(async j=>{const k=p(j);await l.cancelQueries({queryKey:k});const S=l.getQueryData(k);return l.setQueryData(k,{companyId:j.companyId,userId:j.userId,primaryAgentId:j.agentId,initialized:!0}),{previous:S}},"onMutate"),onError:r((j,k,S)=>{l.setQueryData(p(k),S?.previous),f(k)&&c({title:"Couldn't change your primary agent.",body:j.message,tone:"error",action:{label:"Retry",onClick:r(()=>{f(k)&&g.mutate(k)},"onClick")}})},"onError"),onSuccess:r((j,k)=>l.setQueryData(p(k),j),"onSuccess"),onSettled:r((j,k,S)=>{l.invalidateQueries({queryKey:p(S)}),l.invalidateQueries({queryKey:$.resourceMemberships.mine(S.companyId)})},"onSettled")}),v=h.data?.find(j=>j.id===s.data?.primaryAgentId&&j.status!=="terminated")??null,y=s.error??h.error;return(0,a.jsx)(b5,{value:t?{companyId:t,primaryAgentId:v?.id??null,primaryAgent:v,loading:s.loading||h.isPending,error:y?.message,onRetry:r(()=>{s.retry(),h.refetch()},"onRetry"),pendingAgentId:g.isPending&&f(g.variables)?g.variables.agentId:null,onChange:r(j=>g.mutate({companyId:t,userId:s.userId,agentId:j}),"onChange")}:null,children:e})}r(X7,"PrimaryAgentProvider");var $k="min-h-9",Z7={default:void 0,warning:"bg-amber-500/5 text-amber-700 dark:text-amber-300",error:"bg-bad/5 text-bad",muted:"opacity-50"};function WY(e,t){const s={name:"",path:"",kind:"dir",children:[]};for(const c of Object.keys(e)){const u=c.split("/").filter(Boolean);let p=s,f="";for(let h=0;h<u.length;h++){const g=u[h];f=f?`${f}/${g}`:g;const v=h===u.length-1;let y=p.children.find(j=>j.name===g);y||(y={name:g,path:f,kind:v?"file":"dir",children:[],action:v?t?.get(c)??null:null},p.children.push(y)),p=y}}function l(c){c.children.sort((u,p)=>u.kind!==p.kind?u.kind==="file"?-1:1:u.name.localeCompare(p.name)),c.children.forEach(l)}return r(l,"sortNode"),l(s),s.children}r(WY,"buildFileTree");function J7(e){let t=0;for(const s of e)s.kind==="file"?t++:t+=J7(s.children);return t}r(J7,"countFiles");function m2(e,t="all"){const s=new Set;for(const l of e){(t==="all"||l.kind===t)&&s.add(l.path);for(const c of m2(l.children,t))s.add(c)}return s}r(m2,"collectAllPaths");function e9(e){return e.endsWith(".yaml")||e.endsWith(".yml")?FS:HS}r(e9,"fileIcon");function h2(e,t,s=0){const l=[];for(const c of e)l.push({node:c,depth:s}),c.kind==="dir"&&t.has(c.path)&&l.push(...h2(c.children,t,s+1));return l}r(h2,"flattenVisibleNodes");function t9(e,t){if(e.kind==="file")return{allChecked:t.has(e.path),someChecked:!1};const s=[...m2(e.children,"file")],l=s.length>0&&s.every(c=>t.has(c));return{allChecked:l,someChecked:s.some(c=>t.has(c))&&!l}}r(t9,"checkboxState");function QY(e){const t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return null;const s={},l=t[1],c=t[2];let u=null,p=null;for(const f of l.split(`
|
|
59
59
|
`)){const h=f.trim();if(!h||h.startsWith("#"))continue;if(h.startsWith("- ")&&u){p||(p=[]),p.push(h.slice(2).trim().replace(/^["']|["']$/g,""));continue}u&&p&&(s[u]=p,p=null,u=null);const g=h.match(/^([a-zA-Z_][\w-]*)\s*:\s*(.*)$/);if(g){const v=g[1],y=g[2].trim().replace(/^["']|["']$/g,"");if(y==="null"){u=null;continue}y?(s[v]=y,u=null):u=v}}return u&&p&&(s[u]=p),Object.keys(s).length>0?{data:s,body:c}:null}r(QY,"parseFrontmatter");var GY={name:"Name",title:"Title",kind:"Kind",reportsTo:"Reports to",skills:"Skills",status:"Status",description:"Description",priority:"Priority",assignee:"Responsible",project:"Project",recurring:"Recurring",targetDate:"Target date"};function n9({nodes:e,selectedFile:t,expandedDirs:s,checkedFiles:l,onToggleDir:c,onSelectFile:u,onToggleCheck:p,fileBadges:f,fileTones:h,renderFileExtra:g,renderLabel:v,checkboxLabel:y,getCheckboxState:j,renderNodeExtra:k,visiblePaths:S,disabled:N=!1,fileRowClassName:I,layout:C="default",showCheckboxes:M=!0,wrapLabels:R=!0,loading:_=!1,error:D,empty:U,ariaLabel:K="Files"}){const z=l??new Set,E=(0,x.useMemo)(()=>h2(e,s).filter(({node:A})=>!S||S.has(A.path)),[s,e,S]),[B,O]=(0,x.useState)(null),Q=(0,x.useRef)(new Map),V=E.some(({node:A})=>A.path===B)?B:E[0]?.node.path;function ue(A){O(A),window.requestAnimationFrame(()=>{Q.current.get(A)?.focus()})}r(ue,"focusPath");function ce(A){N||(A.kind==="dir"?c(A.path):u(A.path))}r(ce,"toggleNode");function X(A,ee,ie){if(!N)switch(A.key){case"ArrowDown":{A.preventDefault();const le=E[Math.min(ee+1,E.length-1)];le&&ue(le.node.path);break}case"ArrowUp":{A.preventDefault();const le=E[Math.max(ee-1,0)];le&&ue(le.node.path);break}case"ArrowRight":ie.kind==="dir"&&!s.has(ie.path)&&(A.preventDefault(),c(ie.path));break;case"ArrowLeft":ie.kind==="dir"&&s.has(ie.path)&&(A.preventDefault(),c(ie.path));break;case"Enter":A.preventDefault(),ce(ie);break;case" ":M&&p&&j?.(ie)!==null&&(A.preventDefault(),p(ie.path,ie.kind))}}return r(X,"handleRowKeyDown"),_?(0,a.jsx)("div",{"aria-busy":"true","aria-label":K,role:"tree",className:"py-1",children:[0,1,2,3].map(A=>(0,a.jsxs)("div",{className:Y("flex items-center gap-2 px-4",$k),children:[(0,a.jsx)(rt,{className:"h-4 w-4 shrink-0 rounded-sm"}),(0,a.jsx)(rt,{className:Y("h-3.5",A===1?"w-3/5":"w-4/5")})]},A))}):D?(0,a.jsx)("div",{"aria-label":K,role:"tree",className:"p-3",children:(0,a.jsxs)("div",{role:"treeitem","aria-level":1,className:"flex min-h-9 items-center justify-between gap-3 rounded-md border border-bad/30 bg-bad/5 px-3 py-2 text-sm",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,a.jsx)(Dn,{variant:"ghost",className:Y("px-2.5",Hd.error??"bg-bg-3 text-ink-3"),children:"error"}),(0,a.jsx)("span",{className:"min-w-0 text-bad",children:D.message})]}),D.retry&&(0,a.jsx)(oe,{type:"button",size:"xs",variant:"secondary",onClick:D.retry,children:"Retry"})]})}):E.length===0?(0,a.jsx)("div",{"aria-label":K,role:"tree",className:"p-3",children:(0,a.jsxs)("div",{className:"rounded-md border border-dashed border-line px-4 py-8 text-center",children:[(0,a.jsx)("div",{className:"text-sm font-medium",children:U?.title??"No files"}),(0,a.jsx)("div",{className:"mt-1 text-xs text-ink-3",children:U?.description??"Files will appear here when they are available."})]})}):(0,a.jsx)("div",{"aria-label":K,role:"tree",children:E.map(({node:A,depth:ee},ie)=>{const le=A.kind==="dir"&&s.has(A.path),Ae=j?.(A),de=M&&Ae!==null,{allChecked:we,someChecked:ye}=Ae==null?t9(A,z):{allChecked:Ae==="checked",someChecked:Ae==="mixed"},Me=f?.[A.path],he=h?.[A.path]??"default",ve=A.kind==="file"?I?.(A,we):void 0,et=A.kind==="file"?e9(A.name):null,$e=A.kind==="file"&&A.path===t;return(0,a.jsxs)("div",{ref:r(Ie=>{Ie?Q.current.set(A.path,Ie):Q.current.delete(A.path)},"ref"),role:"treeitem","aria-level":ee+1,"aria-expanded":A.kind==="dir"?le:void 0,"aria-selected":A.kind==="file"?$e:void 0,"aria-checked":de?ye?"mixed":we:void 0,"aria-disabled":N||void 0,tabIndex:V===A.path?0:-1,className:Y(C==="explorer"?"group flex w-full items-center gap-2 pr-3 text-left text-sm text-ink-3 hover:bg-bg-3/30 cursor-pointer":A.kind==="dir"?M?"group grid w-full grid-cols-(--gtc-2) items-center gap-x-1 pr-3 text-left text-sm text-ink-3 hover:bg-bg-3/30 hover:text-ink":"group grid w-full grid-cols-(--gtc-3) items-center gap-x-1 pr-3 text-left text-sm text-ink-3 hover:bg-bg-3/30 hover:text-ink max-[480px]:grid-cols-(--gtc-4)":"group flex w-full items-center gap-1 pr-3 text-left text-sm text-ink-3 hover:bg-bg-3/30 hover:text-ink cursor-pointer",C==="explorer"?"h-8":$k,C==="explorer"&&"file-tree-row-explorer",$e&&"text-ink bg-bg-3/20",Z7[he],ve,N&&"opacity-50","file-tree-row","outline-none focus-visible:ring-2 focus-visible:ring-focus/50 focus-visible:ring-inset"),style:{"--file-tree-depth":ee},onFocus:r(()=>O(A.path),"onFocus"),onClick:r(()=>ce(A),"onClick"),onKeyDown:r(Ie=>X(Ie,ie,A),"onKeyDown"),"data-file-tree-path":A.path,children:[C==="explorer"&&(A.kind==="dir"?(0,a.jsx)("button",{type:"button",disabled:N,className:"flex size-4 shrink-0 items-center justify-center rounded-sm hover:text-ink focus-visible:ring-2 focus-visible:ring-focus/50",onClick:r(Ie=>{Ie.stopPropagation(),c(A.path)},"onClick"),"aria-label":le?`Collapse ${A.name}`:`Expand ${A.name}`,children:le?(0,a.jsx)(Qr,{className:"size-3.5"}):(0,a.jsx)(ur,{className:"size-3.5"})}):(0,a.jsx)("span",{className:"size-4 shrink-0","aria-hidden":"true"})),de?(0,a.jsx)("label",{className:Y("flex items-center",C==="explorer"?"size-4 shrink-0 justify-center":"pl-2"),onClick:r(Ie=>Ie.stopPropagation(),"onClick"),children:(0,a.jsx)("input",{type:"checkbox","aria-label":y?.(A)??`Select ${A.path}`,disabled:N,checked:we,ref:r(Ie=>{Ie&&(Ie.indeterminate=ye)},"ref"),onChange:r(()=>p?.(A.path,A.kind),"onChange"),className:C==="explorer"?"size-3.5 shrink-0 accent-ink":"mr-2 accent-ink"})}):M&&C==="explorer"?(0,a.jsx)("span",{className:"size-4 shrink-0","aria-hidden":"true"}):null,(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 py-1 text-left",children:[(0,a.jsx)("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:A.kind==="dir"?le?(0,a.jsx)(VS,{className:"h-3.5 w-3.5"}):(0,a.jsx)(Ei,{className:"h-3.5 w-3.5"}):et?(0,a.jsx)(et,{className:"h-3.5 w-3.5"}):null}),(0,a.jsx)("span",{className:Y("min-w-0",C==="explorer"&&"flex-1",R?"break-all leading-4":"truncate"),children:v?v(A):A.name})]}),Me&&(0,a.jsx)(Dn,{variant:"ghost",className:Y("ml-3 text-(length:--text-nano) uppercase tracking-wide",Hd[Me.status]??"bg-bg-3 text-ink-3"),title:Me.tooltip,children:Me.label}),k?.(A),A.kind==="file"&&g?.(A,we),A.kind==="dir"&&C==="default"&&(0,a.jsx)("button",{type:"button",disabled:N,className:"flex h-9 w-9 items-center justify-center self-center rounded-sm text-ink-3 opacity-70 transition-(--tp-background-color-color-opacity) hover:bg-bg-3 hover:text-ink group-hover:opacity-100 focus-visible:ring-2 focus-visible:ring-focus/50 max-[480px]:hidden",onClick:r(Ie=>{Ie.stopPropagation(),c(A.path)},"onClick"),"aria-label":le?`Collapse ${A.name}`:`Expand ${A.name}`,children:le?(0,a.jsx)(Qr,{className:"h-3.5 w-3.5"}):(0,a.jsx)(ur,{className:"h-3.5 w-3.5"})})]},A.path)})})}r(n9,"FileTree");function a9(e,t){return e.visible?e.focused?t.visibleMs:t.unfocusedMs??t.visibleMs:t.hiddenMs??!1}r(a9,"resolvePollingInterval");function s9(e,t){if(e<=0)return 0;const s=Math.min(Math.max(t(),0),.999999);return Math.round(s*e)}r(s9,"computeStartupJitterMs");function i9(e){const t=uS(),s=(0,x.useRef)(null);s.current===null&&(e.jitter===!1?s.current=0:s.current=s9(Math.min(e.jitterMaxMs??1e3,Math.round(e.visibleMs*.2)),Math.random));const l=s.current;return(0,x.useMemo)(()=>{const c=a9(t,e);return c===!1?!1:c+l},[t,e.visibleMs,e.unfocusedMs,e.hiddenMs,l])}r(i9,"useVisibilityRefetchInterval");var r9=3e4,l9=[];function o9(e,t=!0){const{data:s}=me({queryKey:$.pausedTasks(e??"none"),queryFn:r(()=>cn.listPausedTasks(e),"queryFn"),enabled:!!e&&t,refetchInterval:r(l=>l.state.data?.some(c=>c.state==="pausing")?r9:!1,"refetchInterval")});return s??l9}r(o9,"usePausedTasks");var g2={listForIssue:r(e=>je.get(`/issues/${e}/external-objects`),"listForIssue"),getIssueSummary:r(e=>je.get(`/issues/${e}/external-object-summary`),"getIssueSummary"),getIssueSummaries:r((e,t)=>je.post(`/companies/${e}/issues/external-object-summaries`,{issueIds:t}),"getIssueSummaries"),refreshIssueObjects:r((e,t)=>je.post(`/issues/${e}/external-objects/refresh`,t??{}),"refreshIssueObjects"),getProjectSummary:r(e=>je.get(`/projects/${e}/external-object-summary`),"getProjectSummary")};async function c9(e,t){const s={};for(let l=0;l<t.length;l+=500){const c=t.slice(l,l+500),u=await g2.getIssueSummaries(e,c);Object.assign(s,u.summaries)}return{summaries:s}}r(c9,"fetchIssueExternalObjectSummariesInBatches");function u9(e){switch(e.sourceKind){case"title":return"Title";case"description":return"Description";case"comment":return"Comment";case"document":return e.documentKey?`Document: ${e.documentKey}`:"Document";case"property":return e.propertyKey?`Property: ${e.propertyKey}`:"Property";case"plugin":return"Plugin";default:return"Source"}}r(u9,"formatMentionSourceLabel");function x2(){const e=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),retry:!1});return{isEnabled:e.data?.enableExternalObjects===!0,isLoaded:e.data!==void 0||e.isError}}r(x2,"useExternalObjectsFeature");function YY(e){const t=x2(),s=t.isEnabled&&!!e,l=me({queryKey:$.externalObjects.byIssue(e??"__none__"),queryFn:r(()=>g2.listForIssue(e),"queryFn"),enabled:s,staleTime:6e4}),c=(0,x.useMemo)(()=>(l.data??[]).filter(f=>!!f.object).map(f=>{const h=f.object,g=f.sourceLabels&&f.sourceLabels.length>0?f.sourceLabels:Array.from(new Set(f.mentions.map(u9)));return{group:f,mentionCount:f.mentionCount??f.mentions.length,sourceLabels:g,pill:{providerKey:h.providerKey,objectType:h.objectType,displayKey:h.displayKey,iconKey:h.iconKey,statusCategory:h.statusCategory,liveness:h.liveness,displayTitle:h.displayTitle,statusLabel:h.statusLabel,statusIconKey:h.statusIconKey,url:h.sanitizedCanonicalUrl}}}),[l.data]),u=(0,x.useMemo)(()=>{const f={};for(const{group:h}of c){const g=h.object;if(!g)continue;const v=Wy(g.sanitizedCanonicalUrl??null);v&&(f[v]={providerKey:g.providerKey,objectType:g.objectType,displayKey:g.displayKey,iconKey:g.iconKey,statusCategory:g.statusCategory,liveness:g.liveness,statusLabel:g.statusLabel,statusIconKey:g.statusIconKey,displayTitle:g.displayTitle});for(const y of h.mentions){const j=Wy(y.sanitizedDisplayUrl??null);j&&!f[j]&&(f[j]={providerKey:g.providerKey,objectType:g.objectType,displayKey:g.displayKey,iconKey:g.iconKey,statusCategory:g.statusCategory,liveness:g.liveness,statusLabel:g.statusLabel,statusIconKey:g.statusIconKey,displayTitle:g.displayTitle})}}return f},[c]),p=(0,x.useCallback)(()=>{l.refetch()},[l.refetch]);return{isEnabled:t.isEnabled,groups:c,markdownReferences:u,isLoading:s&&l.isLoading,isError:l.isError,refetch:p}}r(YY,"useIssueExternalObjects");function d9(e,t){const s=x2(),l=(0,x.useMemo)(()=>[...new Set(t.filter(p=>p.length>0))].sort(),[t]),c=s.isEnabled&&!!e&&l.length>0,u=me({queryKey:$.externalObjects.issueSummaries(e??"__none__",l),queryFn:r(()=>c9(e,l),"queryFn"),enabled:c,staleTime:6e4});return{summaries:(0,x.useMemo)(()=>new Map(Object.entries(u.data?.summaries??{})),[u.data?.summaries]),isLoading:c&&u.isLoading,isReady:s.isLoaded&&(!c||u.isSuccess)}}r(d9,"useIssueExternalObjectSummaries");var XY={relevance:"Relevance",updated:"Recently updated",created:"Newest created",priority:"Priority"},f9={"24h":"Last 24 hours","7d":"Last 7 days","30d":"Last 30 days","90d":"Last 90 days"};function b2(e){return f9[e]??`Updated ≤ ${e}`}r(b2,"updatedWithinLabel");var p9=new Set(CE);function ZY(e){const t=e.get("sort");return t&&p9.has(t)?t:"relevance"}r(ZY,"parseSearchSort");function JY(e){let t=0;return e.status?.length&&(t+=1),e.priority?.length&&(t+=1),(e.assigneeAgentId!==void 0||e.assigneeUserId)&&(t+=1),e.projectId&&(t+=1),e.labelId&&(t+=1),(e.updatedWithin||e.updatedAfter)&&(t+=1),t}r(JY,"countActiveFilters");function eX(e,t){if(e.assigneeAgentId===null)return"none";if(typeof e.assigneeAgentId=="string")return`agent:${e.assigneeAgentId}`;if(e.assigneeUserId)return e.assigneeUserId===t?"me":`user:${e.assigneeUserId}`}r(eX,"assigneeToken");function tX(e,t,s){const l={...e};return delete l.assigneeAgentId,delete l.assigneeUserId,t&&(t==="none"?l.assigneeAgentId=null:t==="me"?s&&(l.assigneeUserId=s):t.startsWith("agent:")?l.assigneeAgentId=t.slice(6):t.startsWith("user:")&&(l.assigneeUserId=t.slice(5))),l}r(tX,"applyAssigneeToken");function Nc(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(Nc,"humanize$1");function m9(e,t){return e.assigneeAgentId===null?"Unassigned":typeof e.assigneeAgentId=="string"?t.agentName(e.assigneeAgentId)??"Agent":e.assigneeUserId?e.assigneeUserId===t.currentUserId?"Me":t.userName(e.assigneeUserId)??"User":"Assignee"}r(m9,"assigneeChipLabel");function nX(e,t){const s=[];for(const l of e.status??[])s.push({id:`status:${l}`,label:`Status: ${Nc(l)}`,remove:r(c=>{const u={...c},p=(c.status??[]).filter(f=>f!==l);return p.length>0?u.status=p:delete u.status,u},"remove")});for(const l of e.priority??[])s.push({id:`priority:${l}`,label:`Priority: ${Nc(l)}`,remove:r(c=>{const u={...c},p=(c.priority??[]).filter(f=>f!==l);return p.length>0?u.priority=p:delete u.priority,u},"remove")});return(e.assigneeAgentId!==void 0||e.assigneeUserId)&&s.push({id:"assignee",label:`Assignee: ${m9(e,t)}`,remove:r(l=>{const c={...l};return delete c.assigneeAgentId,delete c.assigneeUserId,c},"remove")}),e.projectId&&s.push({id:"project",label:`Project: ${t.projectName(e.projectId)??"Project"}`,remove:r(l=>{const c={...l};return delete c.projectId,c},"remove")}),e.labelId&&s.push({id:"label",label:`Label: ${t.labelName(e.labelId)??"Label"}`,remove:r(l=>{const c={...l};return delete c.labelId,c},"remove")}),e.updatedWithin&&s.push({id:"updated",label:`Updated: ${b2(e.updatedWithin)}`,remove:r(l=>{const c={...l};return delete c.updatedWithin,delete c.updatedAfter,c},"remove")}),s}r(nX,"buildFilterChips");function aX(e,t,s){switch(e){case"status":return`Status: ${t.map(Nc).join(", ")}`;case"priority":return`Priority: ${t.map(Nc).join(", ")}`;case"assigneeAgentId":return`Assignee: ${t.map(l=>s.agentName(l)??"Agent").join(", ")}`;case"assigneeUserId":return`Assignee: ${t.map(l=>l===s.currentUserId?"Me":s.userName(l)??"User").join(", ")}`;case"projectId":return`Project: ${t.map(l=>s.projectName(l)??"Project").join(", ")}`;case"labelId":return`Label: ${t.map(l=>s.labelName(l)??"Label").join(", ")}`;case"updatedWithin":case"updatedAfter":return"Updated window";default:return Nc(e)}}r(aX,"describeLoosenSuggestion");function sX(e,t){const s={...e};switch(t){case"status":delete s.status;break;case"priority":delete s.priority;break;case"assigneeAgentId":case"assigneeUserId":delete s.assigneeAgentId,delete s.assigneeUserId;break;case"projectId":delete s.projectId;break;case"labelId":delete s.labelId;break;case"updatedWithin":case"updatedAfter":delete s.updatedWithin,delete s.updatedAfter}return s}r(sX,"clearFilterDimension");var h9='Search title, ID, description… (pick a field or type "exact phrase")';function Uk(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(Uk,"humanize");function Qh(e,t,s,l=""){const c=t?t.kind==="text"&&s.trim()?Hr(t.key,s):"":s;return[...e,l,c].filter(u=>u.trim().length>0).join(" ")}r(Qh,"composeRaw");function g9(e,t){typeof e=="function"?e(t):e&&(e.current=t)}r(g9,"assignRef");function Bk(e,t,s){const l=!!(t.currentUserId||t.currentAgentId);switch(e){case"status":return[...Kc.map(c=>({id:c,label:Uk(c),token:`status:${c}`})),...s.includes("is")?[{id:"is:open",label:"Open",description:"Any open status",token:"is:open"},{id:"is:closed",label:"Closed",description:"Done or cancelled",token:"is:closed"}]:[]];case"priority":return v0.map(c=>({id:c,label:Uk(c),token:`priority:${c}`}));case"assignee":return[...l?[{id:"me",label:"Me",token:"assignee:me"}]:[],{id:"none",label:"Unassigned",token:"assignee:none"},...(t.agents??[]).map(c=>({id:c.id,label:c.name,token:Hr("assignee",c.name)}))];case"author":return[...l?[{id:"me",label:"Me",token:"author:me"}]:[],...(t.agents??[]).map(c=>({id:c.id,label:c.name,token:Hr("author",c.name)}))];case"label":return(t.labels??[]).map(c=>({id:c.id,label:c.name,token:Hr("label",c.name)}));case"project":return(t.projects??[]).map(c=>({id:c.id,label:c.name,token:Hr("project",c.name)}));case"updated":return aS.map(c=>({id:c,label:b2(c),token:`updated:>${c}`}));default:return[]}}r(Bk,"pickerOptions");function x9(e,t){if(!t)return e;const s=[],l=[];for(const c of e){const u=c.label.toLowerCase();u.startsWith(t)||c.id.toLowerCase().startsWith(t)?s.push(c):u.includes(t)&&l.push(c)}return[...s,...l]}r(x9,"rankOptions");function b9({value:e,onChange:t,context:s={},operatorKeys:l=lA,debounceMs:c=250,placeholder:u=h9,ariaLabel:p="Search",className:f,fieldClassName:h,inputClassName:g,clearOnEscape:v=!1,inputRef:y,autoFocus:j,pageSearchTarget:k,trailing:S,onKeyDown:N}){const I=(0,x.useId)(),C=(0,x.useRef)(null),[M,R]=(0,x.useState)(()=>uc(e,l).tokens),[_,D]=(0,x.useState)(()=>uc(e,l).text),[U,K]=(0,x.useState)(null),[z,E]=(0,x.useState)(""),[B,O]=(0,x.useState)(!1),[Q,V]=(0,x.useState)(-1),ue=(0,x.useRef)(e),ce=(0,x.useRef)(s);ce.current=s;const X=(0,x.useRef)(t);X.current=t;const A=(0,x.useRef)(l);A.current=l;const ee=(0,x.useMemo)(()=>dP.filter(ge=>ge.kind==="text"||l.includes(ge.key)),[l]),ie=Qh(M,U,_,U?z:"");(0,x.useEffect)(()=>{if(e===ue.current)return;ue.current=e;const ge=uc(e,A.current);R(ge.tokens),D(ge.text),K(null),E("")},[e]);const le=(0,x.useCallback)(ge=>{ue.current=ge;const Oe=uo(ge,{...ce.current,operatorKeys:A.current}),De={raw:ge,q:Oe.query,filters:Oe.filters};c<=0?X.current(De):(0,x.startTransition)(()=>X.current(De))},[c]);(0,x.useEffect)(()=>{if(ie===ue.current)return;if(c<=0){le(ie);return}const ge=window.setTimeout(()=>{ie!==ue.current&&le(ie)},c);return()=>window.clearTimeout(ge)},[c,le,ie]);const Ae=(0,x.useCallback)(ge=>ee.find(Oe=>Oe.key===ge.toLowerCase())??null,[ee]),de=(0,x.useMemo)(()=>{if(U){if(U.kind==="text")return[];const De=_.trim().replace(/"/g,"").toLowerCase();return x9(Bk(U.key,s,l),De)}const{token:ge}=jh(_);if(ge.includes(":")||ge.startsWith('"'))return[];const Oe=ge.toLowerCase();return ee.filter(De=>!Oe||De.key.startsWith(Oe)||De.label.toLowerCase().startsWith(Oe)).map(De=>({id:De.key,label:De.label,description:De.description,field:De}))},[s,_,ee,l,U]),we=B&&de.length>0;(0,x.useEffect)(()=>{V(U&&U.kind==="picker"?0:-1)},[U,_]);const ye=r(()=>C.current?.focus(),"focusInput"),Me=r((ge,Oe)=>{E(Oe.trim()),K(ge),D(""),O(!0),ye()},"startField"),he=r(()=>{K(null),D(z?`${z} `:""),E("")},"releaseHeldText"),ve=r((ge,Oe=!0)=>{R(De=>[...De,ge]),he(),O(Oe),ye()},"commitToken"),et=r((ge,Oe=!0)=>{if(ge.field){Me(ge.field,_.slice(0,jh(_).start));return}ge.token&&ve(ge.token,Oe)},"selectOption"),$e=r(ge=>{const Oe=/\s$/.test(ge);if(Oe&&O(!0),U){D(ge);return}const{start:De,token:ut}=jh(ge),Ht=/^([a-zA-Z]+):$/.exec(ut),Vt=Ht?Ae(Ht[1]):null;if(Vt){Me(Vt,ge.slice(0,De));return}const gt=uc(ge,l,!Oe);if(gt.tokens.length>0){R(un=>[...un,...gt.tokens]),D(gt.text&&Oe?`${gt.text} `:gt.text);return}D(ge)},"handleDraftChange"),Ie=r(ge=>{R(Oe=>Oe.filter((De,ut)=>ut!==ge)),ye()},"removeToken"),ct=r(()=>{if(!U)return!1;const ge=_.trim();if(!ge)return!1;if(U.kind==="text")return ve(Hr(U.key,ge)),!0;const Oe=ge.toLowerCase(),De=Bk(U.key,s,l).find(ut=>ut.label.toLowerCase()===Oe||ut.id.toLowerCase()===Oe)??(we&&Q>=0?de[Q]:void 0)??(de.length===1?de[0]:void 0);return De?.token?(ve(De.token),!0):!1},"commitPendingDraft"),He=r(ge=>{const Oe=ge.nativeEvent.isComposing;if(!Oe&&ge.key==="Tab"&&!ge.shiftKey&&(U||we)){if(ge.preventDefault(),ct())return;if(!U&&we&&Q>=0&&de[Q]){et(de[Q]);return}U||O(!1);return}if(!Oe&&ge.key==="ArrowDown"){if(ge.preventDefault(),!B){O(!0);return}de.length>0&&V(De=>(De+1)%de.length);return}if(!Oe&&ge.key==="ArrowUp"&&we){ge.preventDefault(),V(De=>De<=0?de.length-1:De-1);return}if(!Oe&&ge.key==="Enter"){if(we&&Q>=0&&de[Q]){ge.preventDefault(),et(de[Q],!1);return}let De=ie;if(U?.kind==="text"&&_.trim()){const ut=Hr(U.key,_.trim());ve(ut,!1),De=Qh([...M,ut],null,z)}else if(!U){const ut=uc(_,l);ut.tokens.length>0&&(R([...M,...ut.tokens]),D(ut.text),De=Qh([...M,...ut.tokens],null,ut.text))}De!==ue.current&&le(De),O(!1)}if(!Oe&&ge.key==="Escape"&&we&&(O(!1),_.length>0||U)){ge.preventDefault();return}if(!Oe&&ge.key==="Escape"&&v&&ie.length>0){ge.preventDefault(),R([]),K(null),E(""),D(""),ue.current="",X.current({raw:"",q:"",filters:{}});return}if(!Oe&&ge.key==="Backspace"&&ge.currentTarget.selectionStart===0&&ge.currentTarget.selectionEnd===0){if(U){ge.preventDefault(),he();return}if(M.length>0){ge.preventDefault(),R(De=>De.slice(0,-1));return}}N?.(ge)},"handleKeyDown"),vt=M.map(ge=>hP(ge,s)),Jt=U?U.kind==="text"?`${U.label}: type text, Tab or Enter to add`:`Pick ${U.label.toLowerCase()}…`:M.length>0?"":u;return(0,a.jsxs)("div",{className:Y("relative",f),"data-testid":"scoped-search",children:[(0,a.jsxs)("div",{className:Y("flex h-8 w-full min-w-0 items-center gap-1 overflow-x-auto rounded-md border border-line-strong bg-transparent pl-7 pr-1 shadow-xs focus-within:border-focus focus-within:ring-(length:--rad-3) focus-within:ring-focus/50 dark:bg-line-strong/30",h),onMouseDown:r(ge=>{ge.target===ge.currentTarget&&(ge.preventDefault(),ye())},"onMouseDown"),children:[(0,a.jsx)(pr,{className:"pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ink-3"}),vt.map((ge,Oe)=>(0,a.jsxs)(Dn,{variant:"secondary",className:"max-w-56 gap-1 pr-0.5 font-normal","data-testid":"scoped-search-pill",children:[(0,a.jsx)("span",{className:"truncate",children:ge.label}),(0,a.jsx)("button",{type:"button",className:"rounded-full p-0.5 hover:bg-bg/60","aria-label":`Remove ${ge.label}`,onMouseDown:r(De=>De.preventDefault(),"onMouseDown"),onClick:r(()=>Ie(Oe),"onClick"),children:(0,a.jsx)(ia,{className:"h-3 w-3"})})]},`${M[Oe]}:${Oe}`)),U?(0,a.jsxs)(Dn,{variant:"outline",className:"gap-1 pr-0.5 font-normal","data-testid":"scoped-search-pending-field",children:[(0,a.jsxs)("span",{children:[U.key,":"]}),(0,a.jsx)("button",{type:"button",className:"rounded-full p-0.5 hover:bg-bg-3","aria-label":`Remove ${U.label} field`,onMouseDown:r(ge=>ge.preventDefault(),"onMouseDown"),onClick:r(()=>{he(),ye()},"onClick"),children:(0,a.jsx)(ia,{className:"h-3 w-3"})})]}):null,(0,a.jsx)("input",{ref:r(ge=>{C.current=ge,g9(y,ge)},"ref"),role:"combobox","aria-label":p,"aria-expanded":we,"aria-controls":I,"aria-autocomplete":"list","aria-activedescendant":we&&Q>=0?`${I}-${Q}`:void 0,autoFocus:j,value:_,placeholder:Jt,"data-page-search-target":k?"true":void 0,className:Y("h-full min-w-24 flex-1 bg-transparent text-base outline-none placeholder:text-ink-3 md:text-sm",g),onChange:r(ge=>$e(ge.target.value),"onChange"),onFocus:r(()=>O(!0),"onFocus"),onBlur:r(()=>O(!1),"onBlur"),onKeyDown:He}),S]}),we?(0,a.jsx)("div",{id:I,role:"listbox","aria-label":U?`${U.label} values`:"Search fields",className:"absolute left-0 top-full z-50 mt-1 max-h-64 w-full min-w-56 overflow-y-auto rounded-md border border-line bg-bg-2 p-1 text-ink shadow-md","data-testid":"scoped-search-options",children:de.map((ge,Oe)=>(0,a.jsxs)("div",{id:`${I}-${Oe}`,role:"option","aria-selected":Oe===Q,className:Y("flex cursor-pointer items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-sm",Oe===Q?"bg-bg-3 text-ink":"hover:bg-bg-3/50"),onMouseDown:r(De=>De.preventDefault(),"onMouseDown"),onMouseEnter:r(()=>V(Oe),"onMouseEnter"),onClick:r(()=>et(ge),"onClick"),children:[(0,a.jsx)("span",{className:"truncate",children:ge.label}),ge.description?(0,a.jsx)("span",{className:"hidden truncate text-xs text-ink-3 sm:inline",children:ge.description}):null]},ge.id))}):null]})}r(b9,"ScopedSearchInput");function v2(e){if(e.length<=1)return[...e];const t=r((v,y)=>{const j=Kk(v.createdAt),k=Kk(y.createdAt);return j!==k?j-k:v.id<y.id?-1:v.id>y.id?1:0},"tieBreakAsc"),s=new Map;for(const v of e)s.set(v.id,v);const l=new Map,c=new Map;for(const v of e)l.set(v.id,[]),c.set(v.id,0);for(const v of e){const y=new Set;for(const j of v.blockedBy??[])!j||!s.has(j.id)||j.id!==v.id&&(y.has(j.id)||(y.add(j.id),l.get(j.id).push(v.id),c.set(v.id,(c.get(v.id)??0)+1)))}for(const v of l.values())v.sort((y,j)=>t(s.get(y),s.get(j)));const u=[];for(const v of e)c.get(v.id)===0&&u.push(v);u.sort(t);const p=new Set,f=[],h=r(v=>{let y=0,j=u.length;for(;y<j;){const k=y+j>>>1;t(u[k],v)<=0?y=k+1:j=k}u.splice(y,0,v)},"insertReady"),g=r(v=>{for(const y of l.get(v)??[]){if(p.has(y))continue;const j=(c.get(y)??0)-1;if(c.set(y,j),j===0){const k=s.get(y);k&&h(k)}}},"releaseSuccessors");for(;u.length>0;){let v=u.shift();for(;v&&!p.has(v.id);){f.push(v),p.add(v.id),g(v.id);const y=l.get(v.id)??[];if(y.length!==1)break;const j=y[0];if(p.has(j)||(c.get(j)??0)!==0)break;const k=u.findIndex(S=>S.id===j);if(k<0)break;[v]=u.splice(k,1)}}return p.size<e.length?[...e].sort(t):f}r(v2,"workflowSort");function Kk(e){if(!e)return 0;const t=e instanceof Date?e.getTime():new Date(e).getTime();return Number.isFinite(t)?t:0}r(Kk,"toTimestamp");var v9=2;function y9(e,t){return e===!0&&t>=v9}r(y9,"shouldRenderSubIssueProgressSummary");function j9(e){const t={},s=e.filter(f=>f.status!=="cancelled");for(const f of s)t[f.status]=(t[f.status]??0)+1;const l=v2(s),c=l.find(f=>w9(f.status))??null,u=l.filter(f=>!k9(f.status)),p=c===null&&u.length>0&&u.every(f=>f.status==="blocked")?u[0]:null;return{totalCount:s.length,doneCount:t.done??0,inProgressCount:t.in_progress??0,blockedCount:t.blocked??0,countsByStatus:t,target:c?{issue:c,kind:"next"}:p?{issue:p,kind:"blocked"}:null}}r(j9,"buildSubIssueProgressSummary");function w9(e){return e!=="done"&&e!=="cancelled"&&e!=="blocked"}r(w9,"isActionableStatus");function k9(e){return e==="done"||e==="cancelled"}r(k9,"isTerminalStatus");function Gl(e,t){const s={};for(const l of e){const c=t(l);s[c]||(s[c]=[]),s[c].push(l)}return s}r(Gl,"groupBy");function S9(e){return e==="queued"||e==="running"}r(S9,"isLiveRunStatus");var N9=new Set(["done","cancelled"]);function u0(e){return N9.has(e)}r(u0,"isTerminalIssueStatus");function mo(e,t){return S9(e.status)&&!u0(t)}r(mo,"isLiveIssueRun");function C9(e){const t=new Map;for(const s of e??[]){const l={status:s.status,updatedAtMs:A9(s.updatedAt)},c=t.get(s.id);(!c||_9(c,l))&&t.set(s.id,l)}return new Map([...t].map(([s,l])=>[s,l.status]))}r(C9,"collectIssueStatusById");function A9(e){if(e==null)return null;const t=e instanceof Date?e.getTime():new Date(e).getTime();return Number.isFinite(t)?t:null}r(A9,"issueUpdatedAtMs");function _9(e,t){if(t.updatedAtMs!==null&&e.updatedAtMs!==null){if(t.updatedAtMs!==e.updatedAtMs)return t.updatedAtMs>e.updatedAtMs}else{if(t.updatedAtMs!==null)return!0;if(e.updatedAtMs!==null)return!1}return!u0(e.status)&&u0(t.status)}r(_9,"shouldReplaceIssueStatusSnapshot");function E9(e,t){const s=new Set,l=C9(t);for(const c of e??[])c.issueId&&mo(c,l.get(c.issueId))&&s.add(c.issueId);return s}r(E9,"collectLiveIssueIds");function y2(e,t){const s=new Map;if(!e||e.length===0||t.size===0)return s;const l=new Map;for(const c of e)l.set(c.id,c.parentId);for(const c of t){if(!l.has(c))continue;const u=new Set([c]);let p=l.get(c)??null;for(;p&&!u.has(p);)u.add(p),s.set(p,(s.get(p)??0)+1),p=l.get(p)??null}return s}r(y2,"collectSubtreeLiveCounts");function I9(e){return(0,a.jsxs)("svg",{viewBox:"0 0 180 180",fill:"none",stroke:"currentColor",strokeWidth:14,strokeLinecap:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,a.jsx)("path",{d:"M18 84.8528L85.8822 16.9706C95.2548 7.59798 110.451 7.59798 119.823 16.9706C129.196 26.3431 129.196 41.5391 119.823 50.9117L68.5581 102.177"}),(0,a.jsx)("path",{d:"M69.2652 101.47L119.823 50.9117C129.196 41.5391 144.392 41.5391 153.765 50.9117L154.118 51.2652C163.491 60.6378 163.491 75.8338 154.118 85.2063L92.7248 146.6C89.6006 149.724 89.6006 154.789 92.7248 157.913L105.331 170.52"}),(0,a.jsx)("path",{d:"M102.853 33.9411L52.6482 84.1457C43.2756 93.5183 43.2756 108.714 52.6482 118.087C62.0208 127.459 77.2167 127.459 86.5893 118.087L136.794 67.8822"})]})}r(I9,"McpIcon");var T9=new Set(["tool","tool call","tool_call","acp_tool"]);function Kd(e){const t=(e??"").trim().toLowerCase().replace(/\s*\((?:pending|in[_ -]?progress|completed|failed|cancelled|canceled)\)$/,"");return!t||T9.has(t)}r(Kd,"isGenericToolName");function j2(e){const t=e.match(/^mcp__(.+?)__(.+)$/i);if(t)return{namespace:t[1],name:t[2]};const s=e.match(/^mcp\.([^.]+)\.(.+)$/i);return s?{namespace:s[1],name:s[2]}:null}r(j2,"mcpToolIdentity");function Ax(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g,"$1 $2").replace(/[^A-Za-z0-9]+/g," ").trim().toLowerCase().split(/\s+/).filter(Boolean)}r(Ax,"identifierWords");function w2(e){if(e.length===0)return"";const t=e.map(s=>["api","id","lsp","mcp","pr","url"].includes(s)?s.toUpperCase():s).join(" ");return t.charAt(0).toUpperCase()+t.slice(1)}r(w2,"sentenceCase");function qk(e){const t=(e??"").trim();return Kd(t)?"Unnamed tool":w2(Ax(j2(t)?.name??t))}r(qk,"humanizeToolName");var va=r((e,t,s)=>({key:e,singular:t,plural:s}),"group"),R9={bash:{action:"run"},terminal:{action:"run"},shell:{action:"run"},command:{action:"run"},run:{action:"run"},execute:{action:"run"},exec_command:{action:"run"},apply_patch:{action:"update",running:"Applying a patch",completed:"Applied a patch"},read:{action:"read",running:"Reading a file",completed:"Read a file"},write:{action:"update",running:"Writing a file",completed:"Wrote a file"},edit:{action:"update",running:"Editing a file",completed:"Edited a file"},notebook_read:{action:"read",running:"Reading a notebook",completed:"Read a notebook"},notebook_edit:{action:"update",running:"Editing a notebook",completed:"Edited a notebook"},glob:{action:"search",running:"Searching files",completed:"Searched files"},grep:{action:"search",running:"Searching file contents",completed:"Searched file contents",family:"grep"},tool_search:{action:"search",running:"Searching available tools",completed:"Searched available tools",group:va("tool_search","tool search","tool searches")},web_search:{action:"search",running:"Searching the web",completed:"Searched the web",family:"web"},web_fetch:{action:"fetch",running:"Fetching a web page",completed:"Fetched a web page",family:"web"},todo_write:{action:"update",running:"Updating the task list",completed:"Updated the task list",family:"plan",group:va("task_operation","task operation","task operations")},task_create:{action:"create",running:"Creating a task",completed:"Created a task",family:"plan",group:va("task_operation","task operation","task operations")},task_update:{action:"update",running:"Updating a task",completed:"Updated a task",family:"plan",group:va("task_operation","task operation","task operations")},task_list:{action:"list",running:"Listing tasks",completed:"Listed tasks",family:"plan",group:va("task_operation","task operation","task operations")},task_get:{action:"read",running:"Reading a task",completed:"Read a task",family:"plan",group:va("task_operation","task operation","task operations")},enter_plan_mode:{action:"switch",running:"Entering plan mode",completed:"Entered plan mode",family:"plan"},exit_plan_mode:{action:"switch",running:"Leaving plan mode",completed:"Left plan mode",family:"plan"},skill:{action:"read",running:"Loading a skill",completed:"Loaded a skill"},ask_user_question:{action:"request",running:"Requesting input",completed:"Requested input",family:"question"},request_human_input:{action:"request",running:"Requesting input",completed:"Requested input",family:"question",group:va("task_operation","task operation","task operations")},agent:{action:"start",running:"Starting a subagent",completed:"Started a subagent",family:"agent"},task:{action:"start",running:"Starting a subagent",completed:"Started a subagent",family:"agent"},task_output:{action:"read",running:"Checking subagent progress",completed:"Checked subagent progress",family:"agent"},task_stop:{action:"stop",running:"Stopping a subagent",completed:"Stopped a subagent",family:"agent"},send_message:{action:"post",running:"Messaging a subagent",completed:"Messaged a subagent",family:"agent"},spawn_agent:{action:"start",running:"Starting a subagent",completed:"Started a subagent",family:"agent"},wait_agent:{action:"wait",running:"Checking subagent progress",completed:"Checked subagent progress",family:"agent"},wait_threads:{action:"wait",running:"Checking task progress",completed:"Checked task progress",family:"agent"},interrupt_agent:{action:"stop",running:"Interrupting a subagent",completed:"Interrupted a subagent",family:"agent"},report_findings:{action:"post",running:"Reporting findings",completed:"Reported findings",family:"safety"},guardian_review:{action:"think",running:"Reviewing safety",completed:"Reviewed safety",family:"safety"},lsp:{action:"read",running:"Inspecting code intelligence",completed:"Inspected code intelligence"},compact_conversation:{action:"think",running:"Compacting context",completed:"Compacted context"},image_generation:{action:"create",running:"Generating an image",completed:"Generated an image",family:"image"},view_image:{action:"read",running:"Viewing an image",completed:"Viewed an image",family:"image"},multi_tool_use_parallel:{action:"run",running:"Running tools in parallel",completed:"Ran tools in parallel"},get_task_context:{action:"read",running:"Reading task context",completed:"Read task context"},get_task_history:{action:"read",running:"Reading task history",completed:"Read task history"},list_documents:{action:"list",running:"Listing documents",completed:"Listed documents"},read_document:{action:"read",running:"Reading a document",completed:"Read a document"},list_document_revisions:{action:"list",running:"Listing document revisions",completed:"Listed document revisions"},report_progress:{action:"post",running:"Reporting progress",completed:"Reported progress"},answer_status_question:{action:"post",running:"Answering a status question",completed:"Answered a status question"},write_document:{action:"update",running:"Writing a document",completed:"Wrote a document"},register_deliverable:{action:"create",running:"Registering a deliverable",completed:"Registered a deliverable"},finish_task:{action:"finish",running:"Reporting completion",completed:"Reported completion"},wardmote_finish:{action:"finish",running:"Reporting completion",completed:"Reported completion"},block_task:{action:"block",running:"Reporting a blocker",completed:"Reported a blocker"},wardmote_block:{action:"block",running:"Reporting a blocker",completed:"Reported a blocker"},request_review:{action:"request",running:"Requesting review",completed:"Requested review"},list_agents:{action:"list",running:"Listing agents",completed:"Listed agents"},get_agent:{action:"read",running:"Reading agent details",completed:"Read agent details"},search_tasks:{action:"search",running:"Searching tasks",completed:"Searched tasks"},list_approvals:{action:"list",running:"Listing approvals",completed:"Listed approvals"},get_approval:{action:"read",running:"Reading an approval",completed:"Read an approval"},get_approval_context:{action:"read",running:"Reading approval context",completed:"Read approval context"},get_workspace_runtime:{action:"read",running:"Reading workspace status",completed:"Read workspace status"},control_workspace_service:{action:"run",running:"Controlling a workspace service",completed:"Controlled a workspace service"},set_dependencies:{action:"update",running:"Updating task dependencies",completed:"Updated task dependencies"},set_task_title:{action:"update",running:"Naming the task",completed:"Named the task"},create_task:{action:"create",running:"Creating a task",completed:"Created a task"},request_approval:{action:"request",running:"Requesting approval",completed:"Requested approval"},decide_approval:{action:"update",running:"Deciding an approval",completed:"Decided an approval"},comment_on_approval:{action:"post",running:"Commenting on an approval",completed:"Commented on an approval"},schedule_wake:{action:"create",running:"Scheduling a wake-up",completed:"Scheduled a wake-up",family:"wait"},generic_api_request:{action:"request",running:"Calling the Wardmote API",completed:"Called the Wardmote API"}},M9={read:["get","read","inspect","view"],list:["list","glob"],search:["find","search","grep","query","lookup"],fetch:["fetch","browse"],open:["open"],update:["write","edit","update","set","patch","upsert","sync"],create:["create","add","register","upload"],delete:["delete","remove"],move:["move","rename"],run:["run","execute","bash","shell","command"],request:["request","ask","prompt"],post:["send","message","comment","report","answer"],start:["start","spawn","delegate"],stop:["stop","cancel","interrupt"],wait:["wait","sleep","poll"],finish:["finish","complete"],block:["block"],think:["think","reason","compact","review"],switch:["switch","enter","exit"],other:[]},D9={read:"read",edit:"update",delete:"delete",move:"move",search:"search",list:"list",execute:"run",think:"think",fetch:"fetch",switch_mode:"switch"};function O9(e){return Ax(e).join("_")}r(O9,"normalizedKey");function L9(e){const t=e[0];if(!t)return null;for(const[s,l]of Object.entries(M9))if(l.includes(t))return s;return null}r(L9,"inferredAction");function z9(e){return e==="run"?"terminal":e==="read"||e==="list"?"read":e==="search"?"search":e==="fetch"||e==="open"?"web":["update","create","delete","move"].includes(e)?"edit":e==="request"?"question":e==="start"||e==="stop"?"agent":e==="wait"?"wait":"other"}r(z9,"actionFamily");var P9={terminal:XS,grep:DR,search:pr,read:LS,edit:xR,web:pR,plan:P1,question:rg,agent:QS,safety:Ac,image:SR,wait:j1,mcp:I9,other:If};function $9(e,t){const s=t?` ${t}`:"";switch(e){case"read":return{running:`Reading${s||" data"}`,completed:`Read${s||" data"}`};case"list":return{running:`Listing${s||" items"}`,completed:`Listed${s||" items"}`};case"search":return{running:`Searching${s||""}`,completed:`Searched${s||""}`};case"fetch":return{running:`Fetching${s||" data"}`,completed:`Fetched${s||" data"}`};case"open":return{running:`Opening${s||" an item"}`,completed:`Opened${s||" an item"}`};case"update":return{running:`Updating${s||" data"}`,completed:`Updated${s||" data"}`};case"create":return{running:`Creating${s||" an item"}`,completed:`Created${s||" an item"}`};case"delete":return{running:`Deleting${s||" an item"}`,completed:`Deleted${s||" an item"}`};case"move":return{running:`Moving${s||" an item"}`,completed:`Moved${s||" an item"}`};case"run":return{running:"Running a command",completed:"Ran a command"};case"request":return{running:`Requesting${s||" input"}`,completed:`Requested${s||" input"}`};case"post":return{running:`Posting${s||" an update"}`,completed:`Posted${s||" an update"}`};case"start":return{running:`Starting${s||" an operation"}`,completed:`Started${s||" an operation"}`};case"stop":return{running:`Stopping${s||" an operation"}`,completed:`Stopped${s||" an operation"}`};case"wait":return{running:"Waiting",completed:"Finished waiting"};case"finish":return{running:"Reporting completion",completed:"Reported completion"};case"block":return{running:"Reporting a blocker",completed:"Reported a blocker"};case"think":return{running:"Thinking",completed:"Finished thinking"};case"switch":return{running:`Switching${s||" mode"}`,completed:`Switched${s||" mode"}`};case"other":return{running:"Running",completed:"Ran"}}}r($9,"actionCopy");function U9(e){switch(e){case"run":return va("command","command","commands");case"read":case"list":return va("read","read","reads");case"search":return va("search","search","searches");case"update":case"create":case"delete":case"move":return va("file_change","file change","file changes");case"start":case"stop":return va("delegation","delegation","delegations");case"wait":return va("wait","wait","waits");default:return va("tool_action","tool action","tool actions")}}r(U9,"defaultSummaryGroup");function B9(e){return e==="read"||e==="list"?va("wardmote_read","Wardmote read","Wardmote reads"):va("task_operation","task operation","task operations")}r(B9,"wardmoteSummaryGroup");function K9(e){const t=(e.name??"").trim(),s=j2(t),l=(e.namespace??s?.namespace??"").trim(),c=(s?"mcp":e.transport??"builtin").toLowerCase(),u=(s?.name??t).trim(),p=Ax(u),f=O9(u),h=R9[f],g=D9[(e.operation??"").trim().toLowerCase()],v=L9(p),y=h?.action??g??v??"other",j=h?"exact":g?"kind":v?"inferred":Kd(u)?"unnamed":"fallback",k=Kd(u)?"Unnamed tool":qk(u),S=/^[A-Za-z][A-Za-z0-9_.:-]*$/.test(u),N=v&&S&&p.length>1?p.slice(1):[],I=N.length?w2(N).replace(/^./,U=>U.toLowerCase()):void 0,C=h?.running&&h.completed?{running:h.running,completed:h.completed}:y==="other"?Kd(u)?{running:"Running an unnamed tool",completed:"Ran an unnamed tool"}:{running:`Running ${k}`,completed:`Ran ${k}`}:$9(y,h?void 0:I),M=h?.family??z9(y),R=c==="mcp"?"mcp":M,_=l?qk(l):c==="mcp"?"MCP":void 0,D=l.toLowerCase()==="wardmote"?B9(y):h?.group??U9(y);return{icon:P9[R],family:R,runningLabel:C.running,completedLabel:C.completed,failedLabel:`${C.completed} · failed`,interruptedLabel:`${C.running} · stopped`,displayName:k,sourceLabel:_,technicalName:t||void 0,confidence:j,summaryGroup:D}}r(K9,"toolActivityPresentation");function Fk(e){const t=K9({name:e});return{family:t.family,icon:t.icon,verbLabel:t.runningLabel}}r(Fk,"toolTaxonomy");function q9(e){const t=(e??"").trim().toLowerCase();return t==="thinking"?xI:t==="responding"||t.startsWith("responding (")?_R:null}r(q9,"statusLabelIcon");var d0=6e4,f0=12e4,k2=9e5,kf={paused:-2,pausing:-1,active:0,thinking:1,starting:2,quiet:3,stalled:4,pause_failed:5},iX={starting:"loading",active:"working",thinking:"thinking",quiet:"sleepy",stalled:"confused",pausing:"loading",paused:"sleepy",pause_failed:"confused"},F9={pausing:"Pausing",paused:"Paused",pause_failed:"Pause failed"};function H9(e){return{health:e,label:F9[e],silentMs:null}}r(H9,"pauseSignal");function _x(e){if(!e)return null;const t=new Date(e).getTime();return Number.isFinite(t)?t:null}r(_x,"toMs");function S2(e){let t=null;for(const s of[e.lastEventAt,e.currentStatusUpdatedAt,e.outputSilence?.lastOutputAt,e.lastUsefulActionAt]){const l=_x(s);l!==null&&(t===null||l>t)&&(t=l)}return t}r(S2,"lastLiveActivityMs");function Hk(e){const t=Math.floor(e/6e4);if(t<1)return`${Math.max(0,Math.floor(e/1e3))}s`;if(t<60)return`${t}m`;const s=Math.floor(t/60),l=t%60;return l>0?`${s}h ${l}m`:`${s}h`}r(Hk,"formatSilence");function V9(e){return!!e.currentToolName&&!/^finished\b/i.test(e.currentStatusMessage??"")}r(V9,"toolInFlight");function Ex(e,t){const s=_x(e.startedAt);if(s===null||e.status==="queued"||e.status==="scheduled_retry")return{health:"starting",label:"Queued",silentMs:null};const l=S2(e);if(l===null&&t-s<d0)return{health:"starting",label:"Starting",silentMs:null};const c=Math.max(0,t-(l??s)),u=e.outputSilence?.level,p=e.outputSilence?.criticalThresholdMs||k2;return u==="critical"||u!=="snoozed"&&c>=p?{health:"stalled",label:`Stalled ${Hk(c)}`,silentMs:c}:u==="suspicious"||c>=f0?{health:"quiet",label:`Quiet ${Hk(c)}`,silentMs:c}:V9(e)?{health:"active",label:"Working",silentMs:c}:{health:"thinking",label:"Thinking",silentMs:c}}r(Ex,"classifyLiveNowHealth");function W9(e,t){const s=_x(e.startedAt);if(s===null||e.status==="queued"||e.status==="scheduled_retry")return null;const l=S2(e);if(l===null&&t-s<d0)return s+d0;const c=l??s,u=Math.max(0,t-c),p=e.outputSilence?.level;if(u<6e4&&(p==="suspicious"||p==="critical"))return c+(Math.floor(u/1e3)+1)*1e3;if(u<f0)return c+f0;const f=c+(Math.floor(u/6e4)+1)*6e4,h=c+(e.outputSilence?.criticalThresholdMs||k2);return h>t?Math.min(f,h):f}r(W9,"nextLiveNowHealthChangeMs");function N2(e){return e==="paused"?"paused":e==="stalled"||e==="quiet"||e==="pause_failed"?"attention":"working"}r(N2,"liveNowGroupOf");function C2(e,t){return kf[t]-kf[e]}r(C2,"compareLiveNowSeverity");function A2(e){return e.reduce((t,s)=>kf[s.health]>kf[t.health]?s:t)}r(A2,"mostSevereSignal");function rX(e){const t=e.currentToolName?.trim()||null,s=(e.currentStatusMessage?.trim()||null)??(t?Fk(t).verbLabel:null);return s?{icon:t?Fk(t).icon:q9(s)??Mf,text:s}:null}r(rX,"describeLiveActivity");var Q9=3e4,G9=[];function Gh(e){return e.startedAt??e.createdAt}r(Gh,"runStartAt");function ho(e){const t=new Date(e).getTime();return Number.isFinite(t)?t:0}r(ho,"timestampMs");function _2(e,t){const s=new Map;for(const c of e??[]){if(!c.issueId||!mo(c,t.get(c.issueId)))continue;const u=s.get(c.issueId);u?u.push(c):s.set(c.issueId,[c])}const l=[];for(const[c,u]of s)l.push({issueId:c,...E2(u)});return l.sort((c,u)=>ho(u.latestStartAt)-ho(c.latestStartAt))}r(_2,"buildLiveNowEntries");function E2(e){e.sort((s,l)=>ho(Gh(l))-ho(Gh(s)));const t=e.filter(s=>s.startedAt!==null);return{runs:e,latestStartAt:Gh(e[0]),earliestStartedAt:t.length>0?t[t.length-1].startedAt:null}}r(E2,"toRunSet");function Y9(e,t){return(e??[]).filter(s=>!s.issueId&&mo(s)).map(s=>{const l=Ex(s,t);return{entry:E2([s]),signal:l,group:N2(l.health)}}).sort((s,l)=>ho(l.entry.latestStartAt)-ho(s.entry.latestStartAt)).sort((s,l)=>s.group!==l.group?s.group==="attention"?-1:1:s.group==="attention"?C2(s.signal.health,l.signal.health):0)}r(Y9,"buildLiveNowHeartbeats");function X9(e,t,s){const l=[],c=new Set;let u=e?.parentId??null,p=!1;for(;u&&!c.has(u);){c.add(u);const f=t.get(u);if(!f){p=!0;break}l.push({id:f.id,identifier:f.identifier??null,title:f.title}),u=f.parentId??null}return p?s?{ancestors:[...s].reverse().map(({id:f,identifier:h,title:g})=>({id:f,identifier:h,title:g})),complete:!0}:{ancestors:l.reverse(),complete:!1}:{ancestors:l.reverse(),complete:!0}}r(X9,"resolveLiveNowParentPath");function Z9(e,t,s,l=new Map){const c=e.map((u,p)=>{const f=t(u.issueId),h=l.get(u.issueId)??null,g=h?H9(h.state):A2(u.runs.map(v=>Ex(v,s)));return{order:p,item:{entry:u,issue:f,identifier:f?.identifier??u.issueId.slice(0,8),signal:g,group:N2(g.health),pause:h}}});return c.sort((u,p)=>{if(u.item.group!==p.item.group)return u.item.group==="attention"?-1:1;if(u.item.group==="attention"){const f=C2(u.item.signal.health,p.item.signal.health);if(f!==0)return f}return u.order-p.order}),c.map(({item:u})=>u)}r(Z9,"buildLiveNowItems");function I2(e){const[t,s]=(0,x.useState)(0);return(0,x.useEffect)(()=>{const l=Date.now();let c=null;for(const p of e){const f=W9(p,l);f!==null&&(c===null||f<c)&&(c=f)}if(c===null)return;const u=window.setTimeout(()=>s(p=>p+1),Math.max(0,c-l)+50);return()=>window.clearTimeout(u)},[e,t]),Date.now()}r(I2,"useLiveNowClock");function lX(e,t,s=G9){const l=(0,x.useMemo)(()=>new Map(t.map(C=>[C.id,C])),[t]),c=(0,x.useMemo)(()=>{const C=new Set;for(const M of e??[]){if(!M.issueId||C.has(M.issueId)||!mo(M))continue;const R=l.get(M.issueId);(!R||!X9(R,l).complete)&&C.add(M.issueId)}return[...C]},[e,l]),u=Ef({queries:c.map(C=>({queryKey:$.issues.detail(C),queryFn:r(()=>cn.get(C),"queryFn"),staleTime:Q9,retry:!1}))}),{detailById:p,failedIds:f}=(0,x.useMemo)(()=>{const C=new Map,M=new Set;return u.forEach((R,_)=>{const D=c[_];R.data?C.set(D,R.data):R.isError&&M.add(D)}),{detailById:C,failedIds:M}},[c,u]),h=(0,x.useMemo)(()=>{const C=new Map;for(const M of e??[]){if(!M.issueId)continue;const R=l.get(M.issueId)?.status??p.get(M.issueId)?.status;R&&C.set(M.issueId,R)}return _2(e,C)},[p,e,l]),g=(0,x.useMemo)(()=>(e??[]).filter(C=>!C.issueId&&mo(C)),[e]),v=I2((0,x.useMemo)(()=>[...h.flatMap(C=>C.runs),...g],[h,g])),y=Y9(g,v),j=(0,x.useMemo)(()=>new Map(s.map(C=>[C.issueId,C])),[s]),k=r(C=>l.get(C)??p.get(C)??null,"issueById"),S=h.filter(C=>j.get(C.issueId)?.state!=="paused"),N=Z9(S,k,v,j),I=new Set(S.map(C=>C.issueId));return{items:N,heartbeats:y,pausedItems:s.filter(C=>!I.has(C.issueId)).map(C=>({pause:C,issue:k(C.issueId),identifier:C.identifier??C.issueId.slice(0,8)})),loadedById:l,detailById:p,failedIds:f,now:v}}r(lX,"useLiveNowModel");var J9=["assignee","kickedOffBy","project","workspace","parent","labels","updated"],eF={status:"Status",id:"ID",assignee:"Responsible",kickedOffBy:"Kicked off by",project:"Project",workspace:"Workspace",parent:"Parent task",labels:"Tags",updated:"Last updated"},tF={status:"Task state chip on the left edge.",id:"Ticket identifier like PAP-1009.",assignee:"Responsible agent or board user.",kickedOffBy:"Board user or agent who created the task.",project:"Linked project pill with its color.",workspace:"Execution or project workspace used for the task.",parent:"Parent task identifier and title.",labels:"Task labels and tags.",updated:"Latest visible activity time."};function nF(e,t="legacy"){return e==="id"&&t==="task"?"Task identifier like PAP-1009 on the trailing edge.":e==="status"&&t==="task"?"Task state icon on the leading edge.":tF[e]}r(nF,"issueColumnDescription");function Sf(e){return wI(e.lastActivityAt??e.lastExternalCommentAt??e.updatedAt)}r(Sf,"issueActivityTimestamp");function aF(e){return`Updated ${Sf(e)}`}r(aF,"issueActivityText");function sF(e){return e.map(t=>t==="assignee"||t==="kickedOffBy"?"minmax(6rem, 8rem)":t==="project"?"minmax(4.5rem, 7rem)":t==="workspace"?"minmax(6rem, 9rem)":t==="parent"?"minmax(3.5rem, 5.5rem)":t==="labels"?"minmax(3rem, 6rem)":"minmax(3.5rem, 4.5rem)").join(" ")}r(sF,"issueTrailingGridTemplate");function iF({availableColumns:e,visibleColumnSet:t,onToggleColumn:s,showDateGroupSeparators:l,onToggleDateGroupSeparators:c,onResetColumns:u,title:p,iconOnly:f=!1,rowPresentation:h="legacy"}){return(0,a.jsxs)(tl,{children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsxs)(oe,{type:"button",variant:f?"secondary":"ghost",size:f?"icon":"sm",className:f?"h-8 w-8 shrink-0":"hidden h-8 shrink-0 px-2 text-xs sm:inline-flex",title:"Columns",children:[(0,a.jsx)(l3,{className:f?"h-3.5 w-3.5":"mr-1 h-3.5 w-3.5"}),!f&&"Columns"]})}),(0,a.jsxs)(el,{align:"end",className:"w-(--sz-300px) rounded-xl border-line/70 p-1.5 shadow-xl shadow-black/10",children:[(0,a.jsx)(RS,{className:"px-2 pb-1 pt-1.5",children:(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("div",{className:"text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-caps) text-ink-3",children:"Desktop task rows"}),(0,a.jsx)("div",{className:"text-sm font-medium text-ink",children:p})]})}),(0,a.jsx)(Ii,{}),e.map(g=>(0,a.jsx)(Vy,{checked:t.has(g),onSelect:r(v=>v.preventDefault(),"onSelect"),onCheckedChange:r(v=>s(g,v===!0),"onCheckedChange"),className:"items-start rounded-lg px-3 py-2.5 pl-8",children:(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-ink",children:eF[g]}),(0,a.jsx)("span",{className:"text-xs leading-relaxed text-ink-3",children:nF(g,h)})]})},g)),l!==void 0&&c?(0,a.jsx)(Vy,{checked:l,onSelect:r(g=>g.preventDefault(),"onSelect"),onCheckedChange:r(g=>c(g===!0),"onCheckedChange"),className:"items-start rounded-lg px-3 py-2.5 pl-8",children:(0,a.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,a.jsx)("span",{className:"text-sm font-medium text-ink",children:"Date group separators"}),(0,a.jsx)("span",{className:"text-xs leading-relaxed text-ink-3",children:"Show Today, Yesterday, and Earlier rules on newest-first task lists."})]})}):null,(0,a.jsx)(Ii,{}),(0,a.jsxs)(Sn,{onSelect:u,className:"rounded-lg px-3 py-2 text-sm",children:["Reset defaults",(0,a.jsx)("span",{className:"ml-auto text-xs text-ink-3",children:"status, id, updated"})]})]})]})}r(iF,"IssueColumnPicker");function rF(){return(0,a.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,a.jsx)("span",{className:"absolute inline-flex h-full w-full animate-pulse rounded-full bg-blue-400 opacity-75"}),(0,a.jsx)("span",{className:Y("relative inline-flex h-2 w-2 rounded-full","bg-blue-500")})]})}r(rF,"LiveRunDot");function lF(){return(0,a.jsxs)(Dn,{variant:"ghost",className:Y("px-1.5 sm:gap-1.5 sm:px-2","bg-blue-500/10"),children:[(0,a.jsx)(rF,{}),(0,a.jsx)("span",{className:Y("hidden text-(length:--text-micro) font-medium sm:inline","text-blue-600 dark:text-blue-400"),children:"Live"})]})}r(lF,"LiveRunBadge");function Vk({issue:e,isLive:t,subtreeLiveCount:s=0,showSubtreeLiveChip:l=!0,showStatus:c=!0,showIdentifier:u=!0,statusSlot:p,checklistStepNumber:f=null}){return(0,a.jsxs)(a.Fragment,{children:[c?(0,a.jsx)("span",{className:"hidden shrink-0 items-center sm:inline-flex",children:p??(0,a.jsx)(ei,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention})}):null,f!==null?(0,a.jsxs)("span",{className:"shrink-0 font-mono text-xs text-ink-3","aria-hidden":"true",children:[f,"."]}):null,u?(0,a.jsx)("span",{className:"shrink-0 font-mono text-xs text-ink-3",children:e.identifier??e.id.slice(0,8)}):null,t&&(0,a.jsx)(lF,{}),l&&!t&&s>0&&(0,a.jsxs)(Dn,{variant:"outline",className:Y("px-1.5 sm:gap-1.5 sm:px-2","border-line bg-transparent"),title:`${s} sub-task${s===1?"":"s"} running below`,children:[(0,a.jsx)("span",{className:Y("h-2 w-2 shrink-0 rounded-full border","border-ink-3/60 bg-transparent"),"aria-hidden":"true"}),(0,a.jsxs)("span",{className:"hidden text-(length:--text-micro) font-medium text-ink-3 sm:inline",children:[s," live below"]})]})]})}r(Vk,"InboxIssueMetaLeading");function oF({issue:e,columns:t,projectName:s,projectColor:l,workspaceId:c,workspaceName:u,assigneeName:p,assigneeAgent:f,creatorAgent:h,assigneeUserName:g,assigneeUserAvatarUrl:v,creatorAgentName:y,creatorUserName:j,creatorUserAvatarUrl:k,viaAgentName:S,currentUserId:N,parentIdentifier:I,parentTitle:C,assigneeContent:M,onFilterWorkspace:R}){const _=Sf(e),D=g??Vr(e.assigneeUserId,N)??"User",U=fS(e),K=U?.kind==="user"?U.id:null,z=j??Vr(K,N)??"User";return(0,a.jsx)("span",{className:"grid items-center gap-2",style:{gridTemplateColumns:sF(t)},children:t.map(E=>{if(E==="assignee")return M?(0,a.jsx)("span",{className:"min-w-0",children:M},E):e.assigneeAgentId?(0,a.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,a.jsx)(co,{agent:f??{id:e.assigneeAgentId,name:p??e.assigneeAgentId.slice(0,8)},size:"sm",className:"min-w-0"})},E):e.assigneeUserId?(0,a.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,a.jsx)(ug,{name:D,avatarUrl:v,size:"sm",className:"min-w-0"})},E):(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:"Unassigned"},E);if(E==="kickedOffBy"){if(U?.kind==="agent"){const B=y??U.id.slice(0,8);return(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,a.jsx)(co,{agent:h??{id:U.id,name:B},size:"sm",className:"min-w-0"})})}),(0,a.jsx)(Ts,{side:"top",sideOffset:6,children:B})]},E)}if(U?.kind==="user"){const B=S?`${z} · via ${S}`:z;return(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,a.jsx)(ug,{name:z,avatarUrl:k,size:"sm",className:"min-w-0"})})}),(0,a.jsx)(Ts,{side:"top",sideOffset:6,children:B})]},E)}return(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:"Unknown"},E)}if(E==="project"){if(s){const B=l??"#64748b";return(0,a.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-2 text-xs font-medium",style:{color:ij(B,.12)},children:[(0,a.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full",style:{backgroundColor:B}}),(0,a.jsx)("span",{className:"truncate",children:s})]},E)}return(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:"No project"},E)}return E==="labels"?(e.labels??[]).length>0?(0,a.jsxs)("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[(e.labels??[]).slice(0,2).map(B=>(0,a.jsx)(Dn,{variant:"outline",className:"min-w-0 max-w-full px-1.5 py-0 text-(length:--text-nano)",style:{borderColor:B.color,color:ij(B.color,.12),backgroundColor:`${B.color}1f`},children:(0,a.jsx)("span",{className:"truncate",children:B.name})},B.id)),(e.labels??[]).length>2?(0,a.jsxs)("span",{className:"shrink-0 text-(length:--text-nano) font-medium text-ink-3",children:["+",(e.labels??[]).length-2]}):null]},E):(0,a.jsx)("span",{className:"min-w-0","aria-hidden":"true"},E):E==="workspace"?u?(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:c&&R?(0,a.jsxs)(Rs,{children:[(0,a.jsx)(Is,{asChild:!0,children:(0,a.jsx)("button",{type:"button",className:"truncate rounded-sm text-left text-xs text-ink-3 transition-colors hover:text-ink hover:underline",onClick:r(B=>{B.preventDefault(),B.stopPropagation(),R(c)},"onClick"),children:u})}),(0,a.jsx)(Ts,{side:"top",sideOffset:6,children:"Filter by workspace"})]}):u},E):(0,a.jsx)("span",{className:"min-w-0","aria-hidden":"true"},E):E==="parent"?e.parentId?(0,a.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",title:C??void 0,children:I?(0,a.jsx)("span",{className:"font-mono",children:I}):(0,a.jsx)("span",{className:"italic",children:"Sub-task"})},E):(0,a.jsx)("span",{className:"min-w-0","aria-hidden":"true"},E):E==="updated"?(0,a.jsx)("span",{className:"min-w-0 truncate text-right text-(length:--text-micro) font-medium text-ink-3",children:_},E):null})})}r(oF,"InboxIssueTrailingColumns");function cF({icon:e,title:t,message:s,description:l,action:c,onAction:u,hideActionIcon:p=!1}){return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,a.jsx)("div",{className:"bg-bg-3/50 p-4 mb-4",children:(0,a.jsx)(e,{className:"h-10 w-10 text-ink-3/50"})}),t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-base font-semibold text-ink mb-1.5",children:t}),(0,a.jsx)("p",{className:"text-sm text-ink-3 mb-4 max-w-md",children:s})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("p",{className:"text-sm font-medium text-ink mb-1",children:s}),l&&(0,a.jsx)("p",{className:"max-w-md text-sm text-ink-3 mb-4",children:l})]}),c&&u&&(0,a.jsxs)(oe,{onClick:u,children:[!p&&(0,a.jsx)(as,{className:"h-4 w-4 mr-1.5"}),c]})]})}r(cF,"EmptyState");function uF({label:e,collapsible:t=!1,collapsed:s=!1,onToggle:l,trailing:c,className:u}){return(0,a.jsxs)("div",{className:Y("flex items-center py-1.5 pl-1 pr-3",u),children:[t?(0,a.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 text-left","aria-expanded":!s,onClick:l,children:[(0,a.jsx)("span",{className:"inline-flex w-4 shrink-0 items-center justify-center",children:(0,a.jsx)(ur,{className:Y("h-3.5 w-3.5 shrink-0 text-ink-3 transition-transform",!s&&"rotate-90")})}),(0,a.jsx)("span",{className:"truncate text-sm font-semibold uppercase tracking-wide",children:e})]}):(0,a.jsx)("div",{className:"flex min-w-0 items-center gap-1.5",children:(0,a.jsx)("span",{className:"truncate text-sm font-semibold uppercase tracking-wide",children:e})}),c?(0,a.jsx)("div",{className:"ml-auto",children:c}):null]})}r(uF,"IssueGroupHeader");var Yh={critical:{icon:ai,color:ld.critical??"text-yellow-600 dark:text-yellow-400",label:"Critical"},high:{icon:OS,color:ld.high??"text-yellow-600 dark:text-yellow-400",label:"High"},medium:{icon:C3,color:ld.medium??"text-yellow-600 dark:text-yellow-400",label:"Medium"},low:{icon:zI,color:ld.low??"text-yellow-600 dark:text-yellow-400",label:"Low"}},dF=["critical","high","medium","low"];function oX({priority:e,onChange:t,className:s,showLabel:l}){const[c,u]=(0,x.useState)(!1),p=Yh[e]??Yh.medium,f=p.icon,h=(0,a.jsx)("span",{className:Y("inline-flex items-center justify-center shrink-0",p.color,t&&!l&&"cursor-pointer",s),children:(0,a.jsx)(f,{className:"h-3.5 w-3.5"})});if(!t)return l?(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[h,(0,a.jsx)("span",{className:"text-sm",children:p.label})]}):h;const g=l?(0,a.jsxs)("button",{type:"button","aria-label":`Change priority (current: ${p.label})`,className:"inline-flex min-h-5 items-center gap-1.5 cursor-pointer hover:bg-bg-3/50 rounded px-1 -mx-1 py-0.5 transition-colors",children:[h,(0,a.jsx)("span",{className:"text-sm",children:p.label})]}):(0,a.jsx)("button",{type:"button","data-slot":"icon-button","aria-label":`Change priority (current: ${p.label})`,className:"inline-flex cursor-pointer items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-focus",children:h});return(0,a.jsxs)(ws,{open:c,onOpenChange:u,children:[(0,a.jsx)(ys,{asChild:!0,children:g}),(0,a.jsx)(js,{className:"w-36 p-1",align:"start",children:dF.map(v=>{const y=Yh[v],j=y.icon;return(0,a.jsxs)(oe,{active:v===e,variant:"ghost",size:"sm",className:Y("w-full justify-start gap-2 text-xs"),onClick:r(()=>{t(v),u(!1)},"onClick"),children:[(0,a.jsx)(j,{className:Y("h-3.5 w-3.5",y.color)}),y.label]},v)})})]})}r(oX,"PriorityIcon");var fF=[["everything","All categories"],["issues_i_touched","My recent tasks"],["join_requests","Join requests"],["approvals","Approvals"],["failed_runs","Failed runs"],["alerts","Alerts"]],pF=[["all","All approval statuses"],["actionable","Needs action"],["resolved","Resolved"]],Xh=6;function Zh({value:e,onChange:t,label:s}){return(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(pr,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-ink-3"}),(0,a.jsx)(Wn,{value:e,onChange:r(l=>t(l.target.value),"onChange"),placeholder:`Search ${s.toLowerCase()}...`,"aria-label":`Search ${s.toLowerCase()}`,className:"h-8 pl-7 text-xs"})]})}r(Zh,"FilterOptionSearch");function mF({state:e,onChange:t,activeFilterCount:s,agents:l,projects:c,labels:u,currentUserId:p,enableExternalObjectFilters:f=!0,enableRoutineVisibilityFilter:h=!1,enableHiddenTasksFilter:g=!1,buttonVariant:v="ghost",iconOnly:y=!1,creators:j,presentation:k="legacy",inboxScopeFilters:S}){const N=k==="streamlined",[I,C]=(0,x.useState)(""),[M,R]=(0,x.useState)(""),[_,D]=(0,x.useState)(""),[U,K]=(0,x.useState)(""),z=(0,x.useMemo)(()=>sh(l,M,A=>A.name),[l,M]),E=(0,x.useMemo)(()=>sh(c,_,A=>A.name),[c,_]),B=(0,x.useMemo)(()=>sh(u,U,A=>A.name),[u,U]),O=j??[],Q=(0,x.useMemo)(()=>new Map(O.map(A=>[A.id,A])),[O]),V=I.trim().toLowerCase(),ue=(0,x.useMemo)(()=>V?O.filter(A=>`${A.label} ${A.searchText??""}`.toLowerCase().includes(V)):O,[O,V]),ce=(0,x.useMemo)(()=>e.creators.map(A=>{const ee=Q.get(A);if(ee)return ee;if(A.startsWith("agent:"))return{id:A,label:A.slice(6).slice(0,8),kind:"agent"};const ie=A.startsWith("user:")?A.slice(5):A;return{id:A,label:Vr(ie,p)??ie.slice(0,5),kind:"user"}}),[Q,p,e.creators]),X=r(()=>{t(JS),S?.onClear()},"clearFilters");return(0,a.jsxs)(ws,{children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsxs)(oe,{variant:v,size:y?"icon":"sm",className:`text-xs ${y?"relative h-8 w-8 shrink-0":""}`,title:y?s>0?`Filters: ${s}`:"Filter":void 0,children:[(0,a.jsx)(w3,{className:y?"h-3.5 w-3.5":"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),!y&&(0,a.jsx)("span",{className:"hidden sm:inline",children:s>0?`Filters: ${s}`:"Filter"}),!y&&s>0?(0,a.jsx)("span",{className:"ml-0.5 text-(length:--text-nano) font-medium sm:hidden",children:s}):null,y&&s>0?(0,a.jsx)("span",{className:"absolute -right-1 -top-1 flex h-3.5 w-3.5 items-center justify-center rounded-full bg-blue-600 text-(length:--text-nano) font-bold text-white",children:s}):null,!y&&s>0?(0,a.jsx)(ia,{className:"ml-1 hidden h-3 w-3 sm:block",onClick:r(A=>{A.stopPropagation(),X()},"onClick")}):null]})}),(0,a.jsx)(js,{align:"end",className:N?"w-(--sz-calc-10) max-h-(--sz-calc-9) overflow-y-auto overscroll-contain p-0":"w-(--sz-calc-10) p-0",children:(0,a.jsxs)("div",{className:"space-y-3 p-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)("span",{className:"text-sm font-medium",children:"Filters"}),s>0?(0,a.jsx)("button",{type:"button",className:"text-xs text-ink-3 hover:text-ink",onClick:X,children:"Clear"}):null]}),S?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,a.jsxs)("div",{className:"space-y-1","data-filter-options":"inbox-category",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Category"}),(0,a.jsx)("div",{className:"space-y-0.5",children:fF.map(([A,ee])=>{const ie=S.category===A;return(0,a.jsxs)("button",{type:"button","aria-pressed":ie,className:Y("flex w-full items-center justify-between rounded-sm px-2 py-1 text-left text-sm",ie?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50 hover:text-ink"),onClick:r(()=>S.onCategoryChange(A),"onClick"),children:[(0,a.jsx)("span",{children:ee}),ie?(0,a.jsx)(Ms,{className:"h-3.5 w-3.5"}):null]},A)})})]}),S.showApprovalStatus?(0,a.jsxs)("div",{className:"space-y-1","data-filter-options":"inbox-approval-status",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Approval status"}),(0,a.jsx)("div",{className:"space-y-0.5",children:pF.map(([A,ee])=>{const ie=S.approvalStatus===A;return(0,a.jsxs)("button",{type:"button","aria-pressed":ie,className:Y("flex w-full items-center justify-between rounded-sm px-2 py-1 text-left text-sm",ie?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50 hover:text-ink"),onClick:r(()=>S.onApprovalStatusChange(A),"onClick"),children:[(0,a.jsx)("span",{children:ee}),ie?(0,a.jsx)(Ms,{className:"h-3.5 w-3.5"}):null]},A)})})]}):null]}),(0,a.jsx)("div",{className:"border-t border-line"})]}):null,(0,a.jsxs)("div",{className:"space-y-1.5",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Quick filters"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1.5",children:lT.map(A=>{const ee=cT(e.statuses,A.statuses);return(0,a.jsx)(BT,{selected:ee,onClick:r(()=>t({statuses:ee?[]:[...A.statuses]}),"onClick"),children:A.label},A.label)})})]}),(0,a.jsx)("div",{className:"border-t border-line"}),(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[(0,a.jsxs)("div",{className:"min-w-0 space-y-3",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Status"}),(0,a.jsx)("div",{className:"space-y-0.5",children:Zd.map(A=>(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.statuses.includes(A),onCheckedChange:r(()=>t({statuses:nr(e.statuses,A)}),"onCheckedChange")}),(0,a.jsx)(ei,{status:A}),(0,a.jsx)("span",{className:"text-sm",children:pg(A)})]},A))})]}),!1]}),(0,a.jsxs)("div",{className:"min-w-0 space-y-3",children:[(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Responsible"}),N&&(l?.length??0)+(p?2:1)>Xh?(0,a.jsx)(Zh,{value:M,onChange:R,label:"Responsible"}):null,(0,a.jsxs)("div",{"data-filter-options":"responsible",className:N?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:[(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.assignees.includes("__unassigned"),onCheckedChange:r(()=>t({assignees:nr(e.assignees,"__unassigned")}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:"No responsible"})]}),p?(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.assignees.includes("__me"),onCheckedChange:r(()=>t({assignees:nr(e.assignees,"__me")}),"onCheckedChange")}),(0,a.jsx)(so,{className:"h-3.5 w-3.5 text-ink-3"}),(0,a.jsx)("span",{className:"text-sm",children:"Me"})]}):null,(N?z:l??[]).map(A=>(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.assignees.includes(A.id),onCheckedChange:r(()=>t({assignees:nr(e.assignees,A.id)}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:A.name})]},A.id))]})]}),O.length>0?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Creator"}),ce.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:ce.map(A=>(0,a.jsxs)(Dn,{variant:"secondary",className:"gap-1 pr-1",children:[A.kind==="agent"?(0,a.jsx)(Cc,{className:"h-3 w-3"}):(0,a.jsx)(so,{className:"h-3 w-3"}),(0,a.jsx)("span",{children:A.label}),(0,a.jsx)("button",{type:"button",className:"rounded-full p-0.5 hover:bg-bg-3",onClick:r(()=>t({creators:e.creators.filter(ee=>ee!==A.id)}),"onClick"),"aria-label":`Remove creator ${A.label}`,children:(0,a.jsx)(ia,{className:"h-3 w-3"})})]},A.id))}):null,(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)(pr,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-ink-3"}),(0,a.jsx)(Wn,{value:I,onChange:r(A=>C(A.target.value),"onChange"),placeholder:"Search creators...",className:"h-8 pl-7 text-xs"})]}),(0,a.jsx)("div",{"data-filter-options":"creators",className:N?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:ue.length>0?ue.map(A=>{const ee=e.creators.includes(A.id);return(0,a.jsxs)("button",{type:"button",className:`flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left text-sm ${ee?"bg-bg-3 text-ink":"text-ink-3 hover:bg-bg-3/50 hover:text-ink"}`,onClick:r(()=>t({creators:nr(e.creators,A.id)}),"onClick"),children:[A.kind==="agent"?(0,a.jsx)(Cc,{className:"h-3.5 w-3.5"}):(0,a.jsx)(so,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"min-w-0 flex-1 truncate",children:A.label}),ee?(0,a.jsx)(ia,{className:"h-3 w-3"}):null]},A.id)}):(0,a.jsx)("div",{className:"px-2 py-1 text-xs text-ink-3",children:"No creators match."})})]}):null,c&&c.length>0?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Project"}),N&&c.length>Xh?(0,a.jsx)(Zh,{value:_,onChange:D,label:"Projects"}):null,(0,a.jsx)("div",{"data-filter-options":"projects",className:N?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:(N?E:c).map(A=>(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.projects.includes(A.id),onCheckedChange:r(()=>t({projects:nr(e.projects,A.id)}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:A.name})]},A.id))})]}):null]}),(0,a.jsxs)("div",{className:"min-w-0 space-y-3",children:[u&&u.length>0?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Labels"}),N&&u.length>Xh?(0,a.jsx)(Zh,{value:U,onChange:K,label:"Labels"}):null,(0,a.jsx)("div",{"data-filter-options":"labels",className:N?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:(N?B:u).map(A=>(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.labels.includes(A.id),onCheckedChange:r(()=>t({labels:nr(e.labels,A.id)}),"onCheckedChange")}),(0,a.jsx)("span",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:A.color}}),(0,a.jsx)("span",{className:"text-sm",children:A.name})]},A.id))})]}):null,f?(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"External object status"}),(0,a.jsx)("div",{className:"space-y-0.5",children:sT.map(A=>{const ee=A==="failed"?"failed":A==="waiting"?"waiting":A==="running"?"running":A==="auth_required"?"auth_required":A==="unreachable"?"unreachable":A==="stale"?"unknown":"closed",ie=KS(ee),le=(lI[ee]??"").split(" ").filter(Ae=>Ae.startsWith("text-")).join(" ");return(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.externalObjectStatuses.includes(A),onCheckedChange:r(()=>t({externalObjectStatuses:nr(e.externalObjectStatuses,A)}),"onCheckedChange")}),(0,a.jsx)(ie,{className:`h-3.5 w-3.5 shrink-0 ${le}`,"aria-hidden":"true"}),(0,a.jsx)("span",{className:"text-sm",children:rT(A)})]},A)})})]}):null,(0,a.jsxs)("div",{className:"space-y-1",children:[(0,a.jsx)("span",{className:"text-xs text-ink-3",children:"Visibility"}),(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.liveOnly,onCheckedChange:r(A=>t({liveOnly:A===!0}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:"Live runs only"})]}),h?(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.hideRoutineExecutions,onCheckedChange:r(A=>t({hideRoutineExecutions:A===!0}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:"Hide routine runs"})]}):null,g?(0,a.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,a.jsx)(Gs,{checked:e.showHiddenTasks,onCheckedChange:r(A=>t({showHiddenTasks:A===!0}),"onCheckedChange")}),(0,a.jsx)("span",{className:"text-sm",children:"Show hidden tasks"})]}):null]})]})]})]})})]})}r(mF,"IssueFiltersPopover");function hF(e){return e.objects.find(t=>t.statusTone===e.highestSeverity)?.statusCategory??"unknown"}r(hF,"dominantCategory");function gF(e){return e.objects.find(t=>t.statusTone===e.highestSeverity)??null}r(gF,"dominantObject");function xF(e){const t=[];for(const[s,l]of Object.entries(e.byStatusCategory))l&&t.push(`${l} ${r3(s).toLowerCase()}`);return e.staleCount>0&&t.push(`${e.staleCount} stale`),t.push(`${e.total} total`),`External objects: ${t.join(", ")}`}r(xF,"buildBreakdownTitle");function Wk({summary:e,compact:t,className:s}){const l=F0(),c=t3(e),u=e?.total??0;if(!e||u===0||!c)return null;const p=gF(e),f=p?.statusCategory??hF(e),h=s3(p?.statusIconKey)??KS(f),g=mI[f]??"bg-bg-3 text-ink-3",v=n3(e),y=xF(e),j=f==="running"&&!l?"animate-spin":"";return(0,a.jsxs)("span",{role:"img","aria-label":y,title:y,className:Y("inline-flex items-center gap-1 rounded-full px-1.5 py-0.5 text-(length:--text-nano) font-medium tabular-nums leading-none",g,t&&"px-1 py-0.5",s),"data-external-status":f,"data-external-tone":c,children:[(0,a.jsx)(h,{"aria-hidden":"true",className:Y("h-3 w-3 shrink-0",j)}),(0,a.jsx)("span",{children:v>0?v:u})]})}r(Wk,"ExternalObjectStatusSummary");function Qk({onArchive:e,disabled:t,compact:s=!1}){return(0,a.jsxs)("button",{type:"button","data-slot":"icon-button",onClick:r(l=>{l.preventDefault(),l.stopPropagation(),e()},"onClick"),onKeyDown:r(l=>{l.key!=="Enter"&&l.key!==" "||(l.preventDefault(),l.stopPropagation(),e())},"onKeyDown"),disabled:t,className:Y("inline-flex shrink-0 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-ink-3 opacity-0 transition-opacity hover:bg-bg-3 hover:text-ink group-hover:opacity-100 focus-visible:opacity-100 disabled:pointer-events-none disabled:opacity-30",s?"h-5 py-0":"py-1"),"aria-label":"Archive",children:[(0,a.jsx)(DS,{className:"h-3.5 w-3.5"}),"Archive"]})}r(Qk,"InboxArchiveButton");function bF({issue:e,issueLinkState:t,selected:s=!1,presentation:l="legacy",leadingControl:c,statusSlot:u,metadata:p,actions:f,showIdentifier:h=!0,mobileLeading:g,desktopMetaLeading:v,desktopLeadingSpacer:y=!1,mobileMeta:j,mobileTitleMeta:k,desktopTrailing:S,externalObjectSummary:N,trailingMeta:I,titleSuffix:C,titleClassName:M,checklistStepNumber:R=null,checklistCurrentStep:_=!1,checklistDependencyChips:D,checklistRowId:U,unreadState:K=null,onMarkRead:z,onArchive:E,archiveDisabled:B,className:O,onMouseEnter:Q,treeGuides:V=0,chevronInGuide:ue=!1,showDivider:ce=!1}){const X=e.identifier??e.id,A=e.identifier??e.id.slice(0,8),ee=K!=null,ie=K==="visible"||K==="fading",le=(0,a.jsx)("button",{type:"button","data-slot":"icon-button",onClick:r(ve=>{ve.preventDefault(),ve.stopPropagation(),z?.()},"onClick"),onKeyDown:r(ve=>{(ve.key==="Enter"||ve.key===" ")&&(ve.preventDefault(),ve.stopPropagation(),z?.())},"onKeyDown"),className:Y("inline-flex h-4 w-4 items-center justify-center rounded-full transition-colors",s?"hover:bg-bg-3/80":"hover:bg-blue-500/20"),"aria-label":"Mark as read",children:(0,a.jsx)("span",{className:Y("block h-2 w-2 rounded-full transition-opacity duration-300",s?"bg-ink-3/70":"bg-blue-600 dark:bg-blue-400",K==="fading"?"opacity-0":"opacity-100")})}),Ae=s?"!text-ink-3 !border-ink-3":void 0,de=A0(t,e),we=R!==null?(0,a.jsxs)("span",{className:"shrink-0 font-mono text-xs text-ink-3","aria-hidden":"true",children:[R,"."]}):null,ye=e.activeRecoveryAction??null,Me=ye&&!tI(ye.cause)?vF(ye,s,{scheduledRetry:e.scheduledRetry??null}):null,he=eR(e.blockedBy)?(0,a.jsxs)(Dn,{variant:"outline","data-testid":"issue-row-parked-blocker",className:"[&>svg]:size-2.5 ml-1.5 gap-0.5 border-amber-500/60 bg-amber-500/15 text-(length:--text-nano) text-amber-700 dark:text-amber-300",title:"Blocked by parked work — at least one assigned blocker is in backlog and will not wake its assignee.",children:[(0,a.jsx)(I0,{className:"h-2.5 w-2.5","aria-hidden":!0}),"Blocked by parked work"]}):null;if(l==="task"){const ve=K==="visible"||K==="fading";return(0,a.jsxs)("div",{onMouseEnter:Q,"data-slot":"task-row","data-unread":ve?"true":void 0,className:Y("group relative flex min-w-0 items-start gap-2 rounded-lg py-2.5 pr-2 text-sm no-underline text-inherit sm:items-center sm:py-2",ee?"pl-4":"pl-2 sm:pl-4","[&_button]:relative [&_button]:z-10",s?"bg-bg-3/50 hover:bg-bg-3/50":"hover:bg-bg-3/50",_&&"bg-accent/5",O),children:[(0,a.jsx)(mn,{to:Vd(X),state:de,disableIssueQuicklook:!0,issuePrefetch:e,"data-inbox-issue-link":!0,id:U,"aria-current":_?"step":void 0,onClickCapture:r(()=>ig(X,de),"onClickCapture"),className:"absolute inset-0 rounded-lg no-underline text-inherit focus-visible:z-10 focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-focus",children:(0,a.jsxs)("span",{className:"sr-only",children:["Open ",A,": ",e.title]})}),ee?(0,a.jsx)("span",{"data-testid":"issue-row-unread-slot",className:"absolute left-0 top-3 inline-flex h-4 w-4 items-center justify-center sm:top-1/2 sm:-translate-y-1/2",children:ie?le:null}):null,(0,a.jsxs)("span",{"data-slot":"task-row-leading",className:"flex shrink-0 items-start self-stretch gap-1 pt-px sm:items-center sm:pt-0",children:[V>0?Array.from({length:V},(et,$e)=>{const Ie=ue&&$e===V-1;return(0,a.jsx)("span",{"data-slot":"task-row-tree-guide","aria-hidden":"true",className:"relative block w-4 shrink-0 self-stretch",children:(0,a.jsx)("span",{"data-slot":"task-row-tree-connector",className:"absolute -inset-y-3 left-7 w-px bg-bg",children:Ie?(0,a.jsxs)("span",{className:"absolute inset-0 flex flex-col",children:[(0,a.jsx)("span",{className:"flex-1 bg-line"}),(0,a.jsx)("span",{className:"h-3.5 shrink-0"}),(0,a.jsx)("span",{className:"flex-1 bg-line"})]}):(0,a.jsx)("span",{className:"absolute inset-0 bg-line"})})},`task-guide-${$e}`)}):null,c,u??(0,a.jsx)(ei,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention,size:"md",className:Ae}),he]}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1 sm:flex-row sm:items-center sm:gap-2",children:[(0,a.jsxs)("span",{"data-slot":"task-row-title-cluster",className:"flex min-w-0 flex-1 items-baseline gap-1.5 sm:items-center",children:[(0,a.jsxs)("span",{"data-slot":"task-row-title",className:Y("min-w-0 line-clamp-2 text-sm sm:truncate sm:line-clamp-none",ve&&"font-semibold",M),children:[e.title,C]}),Me,k?(0,a.jsx)("span",{className:"ml-auto shrink-0 whitespace-nowrap text-right text-xs text-ink-3 sm:hidden",children:k}):null]}),D?(0,a.jsx)("span",{className:"flex flex-wrap gap-1",children:D}):null,j?(0,a.jsx)("span",{className:"text-xs text-ink-3 sm:hidden",children:j}):null]}),(0,a.jsxs)("span",{"data-slot":"task-row-trailing",className:"ml-auto hidden min-w-0 shrink-0 items-center gap-2 sm:flex",children:[N?(0,a.jsx)(Wk,{summary:N,compact:!0}):null,p?(0,a.jsx)("span",{"data-slot":"task-row-metadata",className:"min-w-0",children:p}):null,S,f?(0,a.jsx)("span",{"data-slot":"task-row-actions",className:"flex shrink-0 items-center gap-1",children:f}):null,E?(0,a.jsx)(Qk,{onArchive:E,disabled:B,compact:!0}):null,h?(0,a.jsx)("span",{"data-slot":"task-row-identifier",className:"w-20 shrink-0 text-right font-mono text-xs text-ink-3",children:A}):null,I?(0,a.jsx)("span",{"data-slot":"task-row-timestamp",className:"w-24 shrink-0 truncate text-right text-xs text-ink-3",children:I}):null]})]})}return(0,a.jsxs)("div",{onMouseEnter:Q,className:Y("group relative flex items-start gap-2 rounded-lg py-2.5 pr-3 text-sm no-underline text-inherit sm:items-center sm:py-2 sm:pl-1",ee?"pl-4":"pl-2","[&_button]:relative [&_button]:z-10",ce&&"border-b border-line last:border-b-0",s?"hover:bg-transparent":"hover:bg-bg-3/50",_?"bg-accent/5":null,O),children:[(0,a.jsx)(mn,{to:Vd(X),state:de,disableIssueQuicklook:!0,issuePrefetch:e,"data-inbox-issue-link":!0,id:U,"aria-current":_?"step":void 0,onClickCapture:r(()=>ig(X,de),"onClickCapture"),className:Y("absolute inset-0 rounded-lg no-underline text-inherit focus-visible:z-10 focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-focus"),children:(0,a.jsxs)("span",{className:"sr-only",children:["Open ",A,": ",e.title]})}),(0,a.jsxs)("span",{className:"flex shrink-0 items-center gap-1 pt-px sm:hidden",children:[g??(0,a.jsx)(ei,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention,size:"md",className:Ae}),he]}),(0,a.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1 sm:contents",children:[(0,a.jsxs)("span",{"data-slot":"task-row-title-cluster",className:"flex min-w-0 items-start gap-1.5 sm:order-2 sm:flex-1 sm:items-center",children:[(0,a.jsxs)("span",{"data-slot":"task-row-title",className:Y("min-w-0 line-clamp-2 text-sm sm:truncate sm:line-clamp-none",M),children:[e.title,C]}),Me]}),D?(0,a.jsx)("span",{className:"flex flex-wrap gap-1 sm:order-3 sm:ml-(--sz-calc-13)",children:D}):null,(0,a.jsxs)("span",{className:"flex items-center gap-2 self-stretch sm:order-1 sm:shrink-0",children:[ee?(0,a.jsx)("span",{"data-testid":"issue-row-unread-slot",className:"hidden h-4 w-4 shrink-0 items-center justify-center self-center sm:inline-flex",children:ie?le:null}):null,V>0?Array.from({length:V},(ve,et)=>{const $e=ue&&et===V-1;return(0,a.jsx)("span",{"aria-hidden":"true",className:"relative hidden w-4 shrink-0 self-stretch sm:block",children:(0,a.jsx)("span",{className:"absolute -inset-y-3 left-8 w-px bg-bg",children:$e?(0,a.jsxs)("span",{className:"absolute inset-0 flex flex-col",children:[(0,a.jsx)("span",{className:"flex-1 bg-line"}),(0,a.jsx)("span",{className:"h-3.5 shrink-0"}),(0,a.jsx)("span",{className:"flex-1 bg-line"})]}):(0,a.jsx)("span",{className:"absolute inset-0 bg-line"})})},`guide-${et}`)}):null,y?(0,a.jsx)("span",{className:"hidden w-3.5 shrink-0 sm:block"}):null,v??(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"hidden shrink-0 items-center gap-1 sm:inline-flex",children:(0,a.jsx)(ei,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention,size:"md",className:Ae})}),we,(0,a.jsx)("span",{className:"shrink-0 font-mono text-xs text-ink-3",children:A}),he]}),j?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("span",{className:"text-xs text-ink-3 sm:hidden","aria-hidden":"true",children:"·"}),(0,a.jsx)("span",{className:"text-xs text-ink-3 sm:hidden",children:j})]}):null]})]}),E||S||I||N?(0,a.jsxs)("span",{className:"ml-auto hidden shrink-0 items-center gap-2 sm:order-3 sm:flex sm:gap-3",children:[E?(0,a.jsx)(Qk,{onArchive:E,disabled:B}):null,N?(0,a.jsx)(Wk,{summary:N,compact:!0}):null,S,I?(0,a.jsx)("span",{className:"text-xs text-ink-3",children:I}):null]}):null,ie?(0,a.jsx)("span",{className:"absolute left-0 top-1/2 inline-flex h-4 w-4 -translate-y-1/2 items-center justify-center sm:hidden",children:le}):null]})}r(bF,"IssueRow");function vF(e,t,s){const l=GT(e,s);if(!l)return null;const c=XT[l],u=c.icon,p=YT(e,s),f=JT(l,e.kind,p),h=p?ZT(p):null;return(0,a.jsxs)(Dn,{variant:"outline","data-testid":"issue-row-recovery-indicator","data-recovery-state":l,"data-recovery-kind":e.kind,"data-recovery-lane":p?.lane,role:"status","aria-label":h?`${f} — ${h}`:f,className:Y("shrink-0 gap-0.5 text-(length:--text-nano)",c.className,t?"!border-ink-3 !text-ink-3":null),title:h?`${f} — ${h}. Open the source task to act.`:`${f} — open the source task to act.`,children:[(0,a.jsx)(u,{className:"h-2.5 w-2.5","aria-hidden":!0}),f]})}r(vF,"renderRecoveryChip");var yF="Kembali ke model utama.";function jF(e,t){return e instanceof Error&&e.message?e.message:t}r(jF,"errorMessage");function wF({issueId:e,run:t,companyId:s,taskLabel:l,className:c}){const u=kn(),[p,f]=(0,x.useState)(!1),h=t?.modelFallback??null,g=Bt({mutationFn:r(async()=>{if(!e||!t)throw new Error("This task has no run on a fallback model.");return await zf.cancel(t.id),cn.addComment(e,yF,void 0,void 0,void 0,crypto.randomUUID())},"mutationFn"),onSuccess:r(()=>{s&&u.invalidateQueries({queryKey:$.liveRuns(s)}),e&&(u.invalidateQueries({queryKey:$.issues.liveRuns(e)}),u.invalidateQueries({queryKey:$.issues.activeRun(e)}),u.invalidateQueries({queryKey:$.issues.runs(e)}),u.invalidateQueries({queryKey:$.issues.comments(e)}))},"onSuccess")});if(!e||!t||!h)return null;const v=l?` on ${l}`:"";return(0,a.jsxs)("span",{"data-slot":"restore-primary-model",className:Y("inline-flex min-w-0 items-center gap-1.5",c),children:[(0,a.jsxs)(oe,{type:"button",variant:"secondary",size:"xs",disabled:g.isPending,"aria-label":`Back to the primary model${v}`,title:`Back to the primary model — stops this fallback run and wakes the assignee on ${h.primaryModel}`,onClick:r(y=>{y.preventDefault(),y.stopPropagation(),f(!0)},"onClick"),children:[(0,a.jsx)(gc,{"aria-hidden":"true"}),g.isPending?"Restoring…":"Back to primary model"]}),g.error?(0,a.jsx)("span",{role:"alert",className:"text-xs text-bad",children:jF(g.error,"Couldn’t restore the primary model.")}):null,(0,a.jsx)(TS,{open:p,onOpenChange:f,children:(0,a.jsxs)(CS,{children:[(0,a.jsxs)(IS,{children:[(0,a.jsxs)(NS,{children:["Back to the primary model",v,"?"]}),(0,a.jsxs)(SS,{children:["This stops the run on ",h.activeModel," now, so any unsaved work in that turn is lost, and wakes the assignee again on ",h.primaryModel,"."]})]}),(0,a.jsxs)(_S,{children:[(0,a.jsx)(ES,{children:"Keep running"}),(0,a.jsx)(AS,{onClick:r(()=>{f(!1),g.mutate()},"onClick"),children:"Stop and switch"})]})]})})]})}r(wF,"RestorePrimaryModelControl");function kF({context:e,search:t,controls:s,actions:l,feedback:c,className:u,ariaLabel:p="Collection controls"}){return(0,a.jsxs)("div",{"data-slot":"collection-toolbar",className:Y("flex flex-col gap-2",u),role:"toolbar","aria-label":p,children:[(0,a.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center",children:[e?(0,a.jsx)("div",{"data-slot":"collection-toolbar-context",className:"min-w-0 shrink-0",children:e}):null,t?(0,a.jsx)("div",{"data-slot":"collection-toolbar-search",className:"min-w-0 flex-1",children:t}):null,s||l?(0,a.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1 sm:ml-auto sm:flex-nowrap",children:[s?(0,a.jsx)("div",{"data-slot":"collection-toolbar-controls",className:"flex min-w-0 flex-wrap items-center gap-1",children:s}):null,l?(0,a.jsx)("div",{"data-slot":"collection-toolbar-actions",className:"flex shrink-0 items-center gap-1",children:l}):null]}):null]}),c?(0,a.jsx)("div",{"data-slot":"collection-toolbar-feedback",className:"min-w-0",children:c}):null]})}r(kF,"CollectionToolbar");function SF({variant:e="list"}){return e==="dashboard"?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)(rt,{className:"h-32 w-full border border-line"}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2 xl:grid-cols-4",children:Array.from({length:4}).map((t,s)=>(0,a.jsx)(rt,{className:"h-24 w-full"},s))}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4",children:Array.from({length:4}).map((t,s)=>(0,a.jsx)(rt,{className:"h-44 w-full"},s))}),(0,a.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,a.jsx)(rt,{className:"h-72 w-full"}),(0,a.jsx)(rt,{className:"h-72 w-full"})]})]}):e==="approvals"?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("div",{className:"flex items-center justify-between",children:(0,a.jsx)(rt,{className:"h-9 w-44"})}),(0,a.jsx)("div",{className:"grid gap-3",children:Array.from({length:3}).map((t,s)=>(0,a.jsx)(rt,{className:"h-36 w-full"},s))})]}):e==="costs"?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:Array.from({length:6}).map((t,s)=>(0,a.jsx)(rt,{className:"h-9 w-28"},s))}),(0,a.jsx)(rt,{className:"h-40 w-full"}),(0,a.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,a.jsx)(rt,{className:"h-72 w-full"}),(0,a.jsx)(rt,{className:"h-72 w-full"})]})]}):e==="inbox"?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(rt,{className:"h-9 w-56"}),(0,a.jsx)(rt,{className:"h-8 w-40"})]}),(0,a.jsx)("div",{className:"space-y-5",children:Array.from({length:3}).map((t,s)=>(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(rt,{className:"h-4 w-40"}),(0,a.jsx)("div",{className:"space-y-1 border border-line",children:Array.from({length:3}).map((l,c)=>(0,a.jsx)(rt,{className:"h-14 w-full rounded-none"},c))})]},s))})]}):e==="org-chart"?(0,a.jsx)("div",{className:"space-y-4",children:(0,a.jsx)(rt,{className:"h-(--sz-calc-17) w-full rounded-lg border border-line"})}):e==="detail"?(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(rt,{className:"h-3 w-64"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(rt,{className:"h-6 w-6"}),(0,a.jsx)(rt,{className:"h-6 w-6"}),(0,a.jsx)(rt,{className:"h-7 w-48"})]}),(0,a.jsx)(rt,{className:"h-4 w-40"})]}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)(rt,{className:"h-10 w-full"}),(0,a.jsx)(rt,{className:"h-32 w-full"})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(rt,{className:"h-8 w-24"}),(0,a.jsx)(rt,{className:"h-8 w-24"}),(0,a.jsx)(rt,{className:"h-8 w-24"})]}),(0,a.jsx)(rt,{className:"h-24 w-full"}),(0,a.jsx)(rt,{className:"h-24 w-full"})]})]}):e==="issues-list"?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)(rt,{className:"h-9 w-64"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(rt,{className:"h-8 w-16"}),(0,a.jsx)(rt,{className:"h-8 w-16"}),(0,a.jsx)(rt,{className:"h-8 w-16"}),(0,a.jsx)(rt,{className:"h-8 w-24"})]})]}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)(rt,{className:"h-4 w-40"}),(0,a.jsx)("div",{className:"space-y-1",children:Array.from({length:8}).map((t,s)=>(0,a.jsx)(rt,{className:"h-11 w-full rounded-none"},s))})]})]}):(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,a.jsx)(rt,{className:"h-9 w-44"}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(rt,{className:"h-8 w-20"}),(0,a.jsx)(rt,{className:"h-8 w-24"})]})]}),(0,a.jsx)("div",{className:"space-y-1",children:Array.from({length:7}).map((t,s)=>(0,a.jsx)(rt,{className:"h-11 w-full rounded-none"},s))})]})}r(SF,"PageSkeleton");var cX="issue.successful_run_handoff_required",uX="issue.successful_run_handoff_escalated";function T2(e){const t=e.successfulRunHandoff;return t?.required!==!0?!1:t.hasLiveContinuation?e.scheduledRetry?.status==="scheduled_retry":!0}r(T2,"isSuccessfulRunHandoffRequired");function dX(e){const t=e.trim();return t==="Wardmote needs a disposition before this issue can continue."||/^##\s+(This issue still needs a next step|Run finished without a next step|Successful run missing issue disposition)/i.test(t)||NF(t)}r(dX,"isSuccessfulRunHandoffComment");function NF(e){const t=e.trim();return t==="Wardmote could not resolve this issue's missing disposition automatically. The source assignment is unchanged and a board decision is required."||/^Wardmote exhausted the bounded successful-run handoff correction\b/i.test(t)}r(NF,"isSuccessfulRunHandoffEscalationComment");function fX(e){return e==="issue.successful_run_handoff_escalated"?{className:"border-red-500/35 bg-red-500/10 text-red-950 dark:text-red-100",iconClassName:"text-red-600 dark:text-red-300"}:e==="issue.successful_run_handoff_required"?{className:"border-amber-300/70 bg-amber-50/90 text-amber-950 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100",iconClassName:"text-amber-600 dark:text-amber-300"}:{className:"border-line/60 text-ink-3",iconClassName:"text-ink-3"}}r(fX,"successfulRunHandoffActivityTone");var R2=[10,25,50];var CF=["backlog","done","cancelled"],p0=["backlog","todo","in_progress","in_review","blocked","done","cancelled"],AF={rail:"border-line bg-bg-3/20",railOver:"bg-bg-3/50 ring-1 ring-accent/20",header:"text-ink-3",count:"text-ink-3/60",body:"bg-bg-3/20",bodyOver:"bg-bg-3/40",card:""},_F={backlog:{rail:"border-line bg-bg-3/30",railOver:"bg-bg-3/50 ring-1 ring-neutral-400/25",header:"text-ink-3",count:"text-ink-3/60",body:"bg-bg-3/30 ring-1 ring-inset ring-line/50",bodyOver:"bg-bg-3/50 ring-1 ring-inset ring-neutral-400/25",card:""},todo:{rail:"border-amber-500/25 bg-amber-50/60 dark:bg-amber-950/20",railOver:"bg-amber-100/70 ring-1 ring-amber-500/25 dark:bg-amber-950/35",header:"text-amber-700 dark:text-amber-300",count:"text-amber-700/65 dark:text-amber-300/65",body:"bg-amber-50/45 ring-1 ring-inset ring-amber-500/15 dark:bg-amber-950/15",bodyOver:"bg-amber-100/70 ring-1 ring-inset ring-amber-500/25 dark:bg-amber-950/30",card:""},in_progress:{rail:"border-blue-500/25 bg-blue-50/60 dark:bg-blue-950/20",railOver:"bg-blue-100/70 ring-1 ring-blue-500/25 dark:bg-blue-950/35",header:"text-blue-700 dark:text-blue-300",count:"text-blue-700/65 dark:text-blue-300/65",body:"bg-blue-50/45 ring-1 ring-inset ring-blue-500/15 dark:bg-blue-950/15",bodyOver:"bg-blue-100/70 ring-1 ring-inset ring-blue-500/25 dark:bg-blue-950/30",card:""},blocked:{rail:"border-red-500/25 bg-red-50/60 dark:bg-red-950/20",railOver:"bg-red-100/70 ring-1 ring-red-500/25 dark:bg-red-950/35",header:"text-red-700 dark:text-red-300",count:"text-red-700/65 dark:text-red-300/65",body:"bg-red-50/45 ring-1 ring-inset ring-red-500/15 dark:bg-red-950/15",bodyOver:"bg-red-100/70 ring-1 ring-inset ring-red-500/25 dark:bg-red-950/30",card:""},in_review:{rail:"border-violet-500/25 bg-violet-50/60 dark:bg-violet-950/20",railOver:"bg-violet-100/70 ring-1 ring-violet-500/25 dark:bg-violet-950/35",header:"text-violet-700 dark:text-violet-300",count:"text-violet-700/65 dark:text-violet-300/65",body:"bg-violet-50/45 ring-1 ring-inset ring-violet-500/15 dark:bg-violet-950/15",bodyOver:"bg-violet-100/70 ring-1 ring-inset ring-violet-500/25 dark:bg-violet-950/30",card:""},done:{rail:"border-green-500/25 bg-green-50/60 dark:bg-green-950/20",railOver:"bg-green-100/70 ring-1 ring-green-500/25 dark:bg-green-950/35",header:"text-green-700 dark:text-green-300",count:"text-green-700/65 dark:text-green-300/65",body:"bg-green-50/45 ring-1 ring-inset ring-green-500/15 dark:bg-green-950/15",bodyOver:"bg-green-100/70 ring-1 ring-inset ring-green-500/25 dark:bg-green-950/30",card:""},cancelled:{rail:"border-neutral-300/70 bg-bg-3/25 opacity-80 dark:border-neutral-700/70 dark:bg-neutral-900/20",railOver:"bg-bg-3/45 opacity-90 ring-1 ring-neutral-400/25 dark:bg-neutral-900/35",header:"text-ink-3/80",count:"text-ink-3/50",body:"bg-bg-3/25 ring-1 ring-inset ring-line/50",bodyOver:"bg-bg-3/45 ring-1 ring-inset ring-neutral-400/25",card:"bg-bg-3/35 text-ink-3 opacity-80 hover:shadow-none"}};function EF(e){return _F[e]??AF}r(EF,"getKanbanColumnTone");function Jh(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(Jh,"statusLabel");function IF(e,t){return p0.includes(e)?e:t.find(s=>s.id===e)?.status??null}r(IF,"resolveKanbanTargetStatus");function TF({status:e,issues:t,agents:s,liveIssueIds:l,liveRunsByIssueId:c,pauseStateByIssueId:u,subtreeLiveCounts:p,compactCards:f=!1,collapsed:h=!1,visibleCount:g,revealIncrement:v,onShowMore:y}){const{setNodeRef:j,isOver:k}=UC({id:e});t.length;const S=h?[]:t.slice(0,g),N=Math.max(t.length-S.length,0),I=Math.min(v,N),C=EF(e);return h?(0,a.jsxs)("div",{ref:j,className:Y("flex min-h-(--sz-220px) w-(--sz-52px) shrink-0 flex-col items-center rounded-md border px-1.5 py-2 transition-colors",C.rail,k&&C.railOver),title:`${Jh(e)}: ${t.length}`,children:[(0,a.jsx)(ei,{status:e}),(0,a.jsx)("span",{className:Y("mt-2 [writing-mode:vertical-rl] rotate-180 text-(length:--text-nano) font-semibold uppercase tracking-wide",C.header),children:Jh(e)}),(0,a.jsx)(Dn,{variant:"ghost",className:Y("mt-auto bg-bg px-1.5 text-(length:--text-nano) tabular-nums",C.header),children:t.length})]}):(0,a.jsxs)("div",{className:"flex flex-col shrink-0 min-w-(--sz-260px) w-(--sz-260px)",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 mb-1",children:[(0,a.jsx)(ei,{status:e}),(0,a.jsx)("span",{className:Y("text-xs font-semibold uppercase tracking-wide",C.header),children:Jh(e)}),(0,a.jsx)("span",{className:Y("ml-auto text-xs tabular-nums",C.count),children:t.length})]}),(0,a.jsxs)("div",{ref:j,className:Y("flex-1 min-h-(--sz-120px) rounded-md p-2 space-y-1 transition-colors",k?C.bodyOver:C.body),children:[(0,a.jsx)(ox,{items:S.map(M=>M.id),strategy:KC,children:S.map(M=>(0,a.jsx)(M2,{issue:M,agents:s,isLive:l?.has(M.id),liveRuns:c?.get(M.id),pauseState:u?.get(M.id),subtreeLiveCount:p?.get(M.id)??0,compact:f,className:C.card},M.id))}),N>0?(0,a.jsxs)("button",{type:"button",className:"mt-1 flex w-full items-center justify-center rounded-md border border-dashed border-line bg-bg/70 px-2 py-2 text-xs font-medium text-ink-3 transition-colors hover:border-ink/30 hover:text-ink",onClick:y,children:["Show ",I," more"]}):null,t.length>0&&(N>0||t.length>=g)?(0,a.jsxs)("p",{className:"px-1 pt-1 text-(length:--text-micro) text-ink-3",children:["Showing ",S.length," of ",t.length]}):null]})]})}r(TF,"KanbanColumn");function M2({issue:e,agents:t,isLive:s,liveRuns:l,pauseState:c,subtreeLiveCount:u=0,isOverlay:p,compact:f=!1,className:h}){const{attributes:g,listeners:v,setNodeRef:y,transform:j,transition:k,isDragging:S}=cx({id:e.id,data:{issue:e}}),N={transform:ni.Transform.toString(j),transition:k},I=r(C=>!C||!t?null:t.find(M=>M.id===C)?.name??null,"agentName");return(0,a.jsx)(Hc,{ref:y,style:N,...g,...v,className:Y("block cursor-grab active:cursor-grabbing transition-shadow",S&&!p?"opacity-30":"",p?"shadow-lg ring-1 ring-accent/20":"hover:shadow-sm",f?"p-2":"p-2.5",h),children:(0,a.jsxs)(mn,{to:`/issues/${e.identifier??e.id}`,disableIssueQuicklook:!0,className:"block no-underline text-inherit",onClick:r(C=>{S&&C.preventDefault()},"onClick"),children:[(0,a.jsxs)("div",{className:`flex items-start gap-1.5 ${f?"mb-1":"mb-1.5"}`,children:[(0,a.jsx)("span",{className:"text-xs text-ink-3 font-mono shrink-0",children:e.identifier??e.id.slice(0,8)}),T2(e)?(0,a.jsxs)(Dn,{variant:"outline",className:"border-amber-400/45 bg-amber-50/60 px-1.5 text-(length:--text-nano) text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300",title:"This task needs a next step","aria-label":"Needs next step",children:[(0,a.jsx)(ai,{className:"h-3 w-3"}),"Next step"]}):null,c?(0,a.jsx)(DF,{state:c}):s&&(0,a.jsx)(RF,{runs:l}),!s&&u>0&&(0,a.jsxs)(Dn,{variant:"outline",className:"border-line px-1.5 text-(length:--text-nano) text-ink-3",title:`${u} sub-task${u===1?"":"s"} running below`,children:[(0,a.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full border border-ink-3/60","aria-hidden":"true"}),u," live below"]})]}),(0,a.jsx)("p",{className:`${f?"mb-1.5 text-xs":"mb-2 text-sm"} leading-snug line-clamp-2`,children:e.title}),(0,a.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[!1,e.assigneeAgentId&&(()=>{const C=I(e.assigneeAgentId);return C?(0,a.jsx)(co,{agent:t?.find(M=>M.id===e.assigneeAgentId)??{id:e.assigneeAgentId,name:C},size:"xs"}):(0,a.jsx)("span",{className:"text-xs text-ink-3 font-mono",children:e.assigneeAgentId.slice(0,8)})})()]})]})})}r(M2,"KanbanCard");function RF({runs:e}){const t=I2(e??OF),s=e&&e.length>0?A2(e.map(c=>Ex(c,t))).health:"active",l=s==="stalled"?"Stalled":s==="quiet"?"Quiet":"Live";return(0,a.jsxs)("span",{"data-live-marker":l.toLowerCase(),"data-live-health":s,className:Y("inline-flex shrink-0 items-center gap-1 text-(length:--text-nano) font-medium",l==="Live"?"text-blue-600 dark:text-blue-400":"text-ink-2"),children:[l==="Live"?(0,a.jsxs)("span",{"aria-hidden":"true",className:"relative flex h-2 w-2",children:[(0,a.jsx)("span",{className:"animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75 motion-reduce:animate-none"}),(0,a.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}):(0,a.jsx)("span",{"aria-hidden":"true",className:"live-now-health-dot h-2 w-2 rounded-full"}),l]})}r(RF,"KanbanLiveMarker");var MF={pausing:"Pausing",paused:"Paused",pause_failed:"Pause failed"};function DF({state:e}){return(0,a.jsxs)("span",{"data-live-marker":e,"data-live-health":e,className:"inline-flex shrink-0 items-center gap-1 text-(length:--text-nano) font-medium text-ink-2",children:[(0,a.jsx)(H0,{"aria-hidden":"true",className:"live-now-health-icon h-3 w-3"}),MF[e]]})}r(DF,"KanbanPausedMarker");var OF=[];function LF({issues:e,agents:t,liveIssueIds:s,liveRunsByIssueId:l,pauseStateByIssueId:c,compactCards:u=!1,collapsedStatuses:p=[],initialVisibleCount:f=10,revealIncrement:h=10,onUpdateIssue:g}){const[v,y]=(0,x.useState)(null),j=`${f}:${h}`,[k,S]=(0,x.useState)({paginationKey:j,counts:{}}),N=k.paginationKey===j?k.counts:{},I=(0,x.useMemo)(()=>new Set(p),[p]),C=tx(Dc(Yf,{activationConstraint:{distance:5}})),M=(0,x.useMemo)(()=>{const z={};for(const E of p0)z[E]=[];for(const E of e)z[E.status]&&z[E.status].push(E);return z},[e]),R=(0,x.useMemo)(()=>v?e.find(z=>z.id===v):null,[v,e]),_=(0,x.useMemo)(()=>y2(e,s??new Set),[e,s]);function D(z){y(z.active.id)}r(D,"handleDragStart");function U(z){y(null);const{active:E,over:B}=z;if(!B)return;const O=E.id,Q=e.find(ue=>ue.id===O);if(!Q)return;const V=IF(B.id,e);V&&V!==Q.status&&g(O,{status:V})}r(U,"handleDragEnd");function K(z){}return r(K,"handleDragOver"),(0,a.jsxs)(rx,{sensors:C,onDragStart:D,onDragOver:K,onDragEnd:U,children:[(0,a.jsx)("div",{className:"flex gap-3 overflow-x-auto pb-4 -mx-2 px-2",children:p0.map(z=>(0,a.jsx)(TF,{status:z,issues:M[z]??[],agents:t,liveIssueIds:s,liveRunsByIssueId:l,pauseStateByIssueId:c,subtreeLiveCounts:_,compactCards:u,collapsed:I.has(z)||I.size>0&&M[z].length===0,visibleCount:N[z]??f,revealIncrement:h,onShowMore:r(()=>{S(E=>{const B=E.paginationKey===j?E.counts:{};return{paginationKey:j,counts:{...B,[z]:(B[z]??f)+h}}})},"onShowMore")},z))}),(0,a.jsx)(p4,{children:R?(0,a.jsx)(M2,{issue:R,agents:t,isOverlay:!0,compact:u}):null})]})}r(LF,"KanbanBoard");function Nf(e,t){const s=new Set(e.map(p=>p.id)),l=r(p=>!p.parentId||!s.has(p.parentId)||t?.has(p.id)===!0,"isRoot"),c=e.filter(l),u=new Map;for(const p of e)if(p.parentId&&!l(p)){const f=u.get(p.parentId)??[];f.push(p),u.set(p.parentId,f)}return{roots:c,childMap:u}}r(Nf,"buildIssueTree");function D2(e,t){return(t.get(e)??[]).reduce((s,l)=>s+1+D2(l.id,t),0)}r(D2,"countDescendants");function pX(e,t){const s=new Map;for(const p of t){if(!p.parentId)continue;const f=s.get(p.parentId)??[];f.push(p),s.set(p.parentId,f)}const l=[],c=new Set([e]);let u=[e];for(;u.length>0;){const p=[];for(const f of u)for(const h of s.get(f)??[])c.has(h.id)||(c.add(h.id),l.push(h),p.push(h.id));u=p}return l}r(pX,"filterIssueDescendants");function zF(e,t){const s=e.currentExecutionWorkspace?.name??e.currentExecutionWorkspace?.branchName??e.currentExecutionWorkspace?.cwd??e.executionWorkspaceId??null,l=e.assigneeUserId&&e.assigneeUserId!==t?e.assigneeUserId??void 0:void 0;return{parentId:e.id,parentIdentifier:e.identifier??void 0,parentTitle:e.title,...e.projectId?{projectId:e.projectId}:{},...e.projectWorkspaceId?{projectWorkspaceId:e.projectWorkspaceId}:{},...e.goalId?{goalId:e.goalId}:{},...e.executionWorkspaceId?{executionWorkspaceId:e.executionWorkspaceId}:{},...e.executionWorkspaceId?{executionWorkspaceMode:"reuse_existing"}:e.executionWorkspacePreference?{executionWorkspaceMode:e.executionWorkspacePreference}:{},...s?{parentExecutionWorkspaceLabel:s}:{},...e.assigneeAgentId?{assigneeAgentId:e.assigneeAgentId}:{},...l?{assigneeUserId:l}:{}}}r(zF,"buildSubIssueDefaultsForViewer");function O2(){return typeof localStorage>"u"?null:localStorage}r(O2,"browserStorage");function eg(e,t){if(!t)return null;try{const s=e.getItem(t);return s==null?null:JSON.parse(s)}catch{return null}}r(eg,"parseStoredJson");function L2({companyId:e,collectionKey:t}){return`wardmote:task-collection:v1:${encodeURIComponent(e)}:${encodeURIComponent(t)}`}r(L2,"taskCollectionPreferencesStorageKey");function PF(e,t){if(!e||typeof e!="object")return!1;const s=e;return s.version===1&&s.companyId===t.companyId&&s.collectionKey===t.collectionKey&&"viewState"in s&&Array.isArray(s.columns)}r(PF,"isCurrentEnvelope");function m0(e,t,s=O2()){if(!s)return;const l={version:1,companyId:e.companyId,collectionKey:e.collectionKey,viewState:t.viewState,viewStateSource:t.viewStateSource??"stored",columns:t.columns};try{s.setItem(L2(e),JSON.stringify(l)),e.legacyViewStorageKey&&s.setItem(e.legacyViewStorageKey,JSON.stringify(t.viewState)),e.legacyColumnsStorageKey&&s.setItem(e.legacyColumnsStorageKey,JSON.stringify(t.columns))}catch{}}r(m0,"saveTaskCollectionPreferences");function $F({storage:e=O2(),defaultViewState:t,defaultColumns:s,normalizeViewState:l,normalizeColumns:c,...u}){if(!e)return{viewState:t,columns:s,migrated:!1,source:"default"};const p=eg(e,L2(u));if(PF(p,u))return{viewState:l(p.viewState),columns:c(p.columns),migrated:!1,source:p.viewStateSource==="default"?"default":"current"};const f=eg(e,u.legacyViewStorageKey),h=eg(e,u.legacyColumnsStorageKey),g=f!==null||h!==null,v={viewState:f===null?t:l(f),columns:h===null?s:c(h)};return g&&m0(u,{...v,viewStateSource:f===null?"default":"stored"},e),{...v,migrated:g,source:f!==null?"legacy":"default"}}r($F,"loadTaskCollectionPreferences");var UF={today:"Today",yesterday:"Yesterday",earlier:"Earlier"};function Gk(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())}r(Gk,"localCalendarOrdinal");function BF(e,t=new Date){const s=e instanceof Date?e:new Date(e);if(Number.isNaN(s.getTime()))return"earlier";const l=Math.round((Gk(t)-Gk(s))/864e5);return l<=0?"today":l===1?"yesterday":"earlier"}r(BF,"taskDateGroup");function KF(e,t){return e===t||e===null&&t==="earlier"?null:UF[t]}r(KF,"taskDateGroupSeparator");var Td=200,Rd=200;function Yk(e){const t=new Date(e.startedAt??e.createdAt).getTime();return Number.isFinite(t)?t:0}r(Yk,"runStartMs");function qF(e,t){const s=new Map(t.map(c=>[c.id,c.status])),l=new Map;for(const c of e??[]){if(!c.issueId||!c.modelFallback||!mo(c,s.get(c.issueId)))continue;const u=l.get(c.issueId);(!u||Yk(c)>Yk(u))&&l.set(c.issueId,c)}return l}r(qF,"fallbackRunsByIssueId");function Md(e){return e.type==="group"?`group:${e.key}`:`issue:${e.issue.id}`}r(Md,"issuesListNavEntryKey");function h0(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}r(h0,"escapeAttrValue");var z2=100,FF=150,HF=320;function Dd(e){if(!e||typeof window>"u")return null;let t=e.parentElement;for(;t&&t!==document.body&&t!==document.documentElement;){const s=window.getComputedStyle(t).overflowY;if(s==="auto"||s==="scroll"||s==="overlay")return t;t=t.parentElement}return null}r(Dd,"findIssuesScrollContainer");var VF=12,WF=24;function P2(e){if(!e)return{top:0,bottom:window.innerHeight};const t=e.getBoundingClientRect();return{top:t.top,bottom:t.top+e.clientHeight}}r(P2,"issuesViewportBounds");function QF(e,t,s){const l=e.querySelectorAll("[data-issue-row-id]"),c=P2(t);let u=0,p=l.length;for(;u<p;){const h=u+p>>1;l[h].getBoundingClientRect().bottom<=c.top?u=h+1:p=h}const f=[];for(let h=u;h<l.length&&f.length<VF;h+=1){const g=l[h].getBoundingClientRect();if(g.top>=c.bottom)break;f.push({id:l[h].dataset.issueRowId,top:g.top-c.top})}return{identity:s,rows:f}}r(QF,"captureIssueRowScrollAnchor");function GF(e,t,s){const l=P2(t),c=[];if(s.rows.forEach(({id:f,top:h},g)=>{const v=e.querySelector(`[data-issue-row-id="${h0(f)}"]`);v&&c.push({shift:Math.round(v.getBoundingClientRect().top-l.top-h),index:g})}),c.length===0)return null;c.sort((f,h)=>f.shift-h.shift);let u=null,p=0;for(let f=1;f<=c.length;f+=1){if(f<c.length&&c[f].shift-c[f-1].shift<=WF)continue;const h=c.slice(p,f),g=h.reduce((v,y)=>y.index<v.index?y:v);(!u||h.length>u.count||h.length===u.count&&g.index<u.first.index)&&(u={count:h.length,first:g}),p=f}return u.first.shift}r(GF,"issueRowAnchorShift");var YF=Kc,XF={backlog:"Backlog",todo:"Todo",in_progress:"In progress",in_review:"In review",done:"Done",blocked:"Blocked",cancelled:"Cancelled"},ZF={backlog:"bg-ink-3/40",todo:"bg-blue-500",in_progress:"bg-yellow-500",in_review:"bg-violet-500",done:"bg-green-500",blocked:"bg-red-500",cancelled:"bg-neutral-400"},qd={...JS,sortField:"updated",sortDir:"desc",groupBy:"none",viewMode:"list",nestingEnabled:!0,showDateGroupSeparators:!0,collapsedGroups:[],collapsedParents:[],boardCardDensity:"auto",boardColdLaneMode:"expanded",boardColumnPageSize:10};function JF(e){return e==="compact"||e==="comfortable"||e==="auto"?e:"auto"}r(JF,"normalizeBoardCardDensity");function eH(e){return e==="collapsed"||e==="expanded"||e==="auto"?e:"auto"}r(eH,"normalizeBoardColdLaneMode");function tH(e){return R2.includes(e)?e:10}r(tH,"normalizeBoardColumnPageSize");function nH(e){const t=e&&typeof e=="object"?e:{};return{...qd,...t,...iT(t),workspaces:[],sortField:["status","priority","title","created","updated","workflow"].includes(t.sortField??"")?t.sortField:qd.sortField,sortDir:t.sortDir==="asc"?"asc":"desc",groupBy:["status","priority","assignee","project","workspace","parent","none"].includes(t.groupBy??"")?t.groupBy:qd.groupBy,viewMode:t.viewMode==="board"?"board":"list",nestingEnabled:t.nestingEnabled!==!1,showDateGroupSeparators:t.showDateGroupSeparators!==!1,collapsedGroups:Array.isArray(t.collapsedGroups)?t.collapsedGroups.filter(s=>typeof s=="string"):[],collapsedParents:Array.isArray(t.collapsedParents)?t.collapsedParents.filter(s=>typeof s=="string"):[],boardCardDensity:JF(t.boardCardDensity),boardColdLaneMode:eH(t.boardColdLaneMode),boardColumnPageSize:tH(t.boardColumnPageSize)}}r(nH,"normalizeIssueViewState");function aH(e,t,s){const l=e.source==="default"&&s?{...e.viewState,sortField:s,sortDir:"asc"}:e.viewState;return t?{...l,assignees:t,statuses:[]}:l}r(aH,"getInitialViewState");function Xk(e,t,s,l,c){const u=aH(e,t,l),p=s?{...u,workspaces:s,statuses:[]}:u;return c?{...p,statuses:c}:p}r(Xk,"getInitialWorkspaceViewState");function sH(e){return`${e}:issue-columns`}r(sH,"getIssueColumnsStorageKey");function $2(e,t){const s=e?`${t}:${e}`:t;return{companyId:e??"__unscoped__",collectionKey:t,legacyViewStorageKey:s,legacyColumnsStorageKey:sH(s)}}r($2,"issueCollectionPreferenceLocation");function mX(e,t){return g0($2(e,t)).viewState.showHiddenTasks}r(mX,"loadStoredShowHiddenTasks");function g0(e){return $F({...e,defaultViewState:qd,defaultColumns:aC,normalizeViewState:nH,normalizeColumns:r(t=>rC(Array.isArray(t)?t:[]),"normalizeColumns")})}r(g0,"loadIssueCollectionPreferences");function iH(e,t){if(t.sortField==="workflow"){const c=v2(e);return t.sortDir==="desc"?[...c].reverse():c}const s=[...e],l=t.sortDir==="asc"?1:-1;return s.sort((c,u)=>{switch(t.sortField){case"status":return l*(Zd.indexOf(c.status)-Zd.indexOf(u.status));case"priority":return l*(fg.indexOf(c.priority)-fg.indexOf(u.priority));case"title":return l*c.title.localeCompare(u.title);case"created":return l*(new Date(c.createdAt).getTime()-new Date(u.createdAt).getTime());case"updated":return l*lH(c,u);default:return 0}}),s}r(iH,"sortIssues");var Zk=new Map;function rH(e,t,s,l,c){const u=Math.min(s.length,Math.max(z2,c));if(!e||e.identity!==t)return u;if(e.ids===s)return Math.min(s.length,Math.max(e.limit,l,u));const p=new Map;s.forEach((g,v)=>p.set(g,v));const f=Math.min(e.limit,e.ids.length);let h=-1;for(let g=0;g<f;g+=1){const v=p.get(e.ids[g]);v!==void 0&&v>h&&(h=v)}return Math.min(s.length,Math.max(h+1,l,u))}r(rH,"nextIssueRowRenderLimit");function x0(e){return e.lastActivityAt??e.updatedAt}r(x0,"issueRecencyDate");function lH(e,t){const s=new Date(x0(e)).getTime()-new Date(x0(t)).getTime();return s!==0?s:new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime()}r(lH,"compareIssueRecency");function oH(e){return e.sortDir!=="desc"?null:e.sortField==="created"?t=>t.createdAt:e.sortField==="updated"?x0:null}r(oH,"issueDateSeparatorDate");var U2=864e5,cH=7*U2;function uH(e,t=Date.now()){const s=t-new Date(e).getTime();return s<U2?0:s<cH?1:2}r(uH,"issueAgeBucket");function dH(e){return e===1?"Older than a day":"Older than a week"}r(dH,"issueAgeSeparatorLabel");function fH(e,t){const s=[];return e<1&&t>=1&&s.push(1),e<2&&t>=2&&s.push(2),s}r(fH,"issueAgeBucketsCrossed");function Jk({label:e}){return(0,a.jsxs)("div",{className:"flex items-center gap-3 px-3 py-1.5 sm:pl-0 sm:pr-4",role:"separator","aria-label":e,"data-issues-date-separator":"",children:[(0,a.jsx)("span",{className:"h-px min-w-0 flex-1 bg-line/80","aria-hidden":"true","data-date-group-rule":""}),(0,a.jsx)("span",{className:"shrink-0 text-(length:--text-nano) font-medium uppercase tracking-wider text-ink-3/70","data-date-group-label":"",children:e}),(0,a.jsx)("span",{className:"h-px min-w-0 flex-1 bg-line/80","aria-hidden":"true","data-date-group-rule":""})]})}r(Jk,"IssueDateSeparator");function pH(e){return e!=="done"&&e!=="cancelled"&&e!=="blocked"}r(pH,"isActionableWorkflowStatus");function mH(e,t){const s=new Map;if(!t)return e.forEach((p,f)=>{s.set(p.id,String(f+1))}),s;const{roots:l,childMap:c}=Nf(e),u=r((p,f)=>{p.forEach((h,g)=>{const v=f?`${f}.${g+1}`:String(g+1);s.set(h.id,v),u(c.get(h.id)??[],v)})},"visit");return u(l,null),e.forEach((p,f)=>{s.has(p.id)||s.set(p.id,String(f+1))}),s}r(mH,"buildChecklistStepNumberMap");function hH(e,t){const s=new Map;if(!t){const p=new Map;for(const f of e){if(!f.parentId)continue;const h=p.get(f.parentId);h&&s.set(f.id,h.id),p.set(f.parentId,f)}return s}const{roots:l,childMap:c}=Nf(e),u=r(p=>{p.forEach((f,h)=>{const g=h>0?p[h-1]:null;f.parentId&&g?.parentId===f.parentId&&s.set(f.id,g.id),u(c.get(f.id)??[])})},"visit");return u(l),s}r(hH,"buildPreviousSiblingIssueIdMap");function gH(e,t,s){return!!(e.parentId&&s&&(e.blockedBy??[]).length===1&&t.length===1&&t[0]===s)}r(gH,"shouldSuppressSinglePreviousSiblingBlockerChip");function xH({context:e,search:t,controls:s}){return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 sm:gap-3",children:[(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2 sm:gap-3",children:[e,t]}),(0,a.jsx)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:s})]})}r(xH,"LegacyIssuesToolbar");function bH({value:e,context:t,onDebouncedChange:s}){return(0,a.jsx)(b9,{value:e,context:t,onChange:r(({raw:l})=>s(l),"onChange"),ariaLabel:"Search tasks",className:"w-full sm:w-64 md:w-80",inputClassName:"text-xs sm:text-sm",pageSearchTarget:!0,onKeyDown:r(l=>{if(B8({key:l.key,isComposing:l.nativeEvent.isComposing})){l.currentTarget.blur();return}K8({key:l.key,isComposing:l.nativeEvent.isComposing,currentValue:l.currentTarget.value})&&l.currentTarget.blur()},"onKeyDown")})}r(bH,"IssueSearchInput");function vH({summary:e,issueLinkState:t,parentIssueIdForCostSummary:s}){const l=e.target,c=l?.issue??null,u=c?.identifier??c?.id??"",p=c?A0(t,c):void 0,f=Kc.map(k=>({status:k,count:e.countsByStatus[k]??0})).filter(k=>k.count>0),h=e.inProgressCount>0,g=i9({visibleMs:5e3}),{data:v}=me({queryKey:$.issues.costSummary(s??"pending",{excludeRoot:!0}),queryFn:r(()=>cn.getCostSummary(s,{excludeRoot:!0}),"queryFn"),enabled:!!s,refetchInterval:h?g:!1}),y=v?v.inputTokens+v.cachedInputTokens+v.outputTokens:0,j=!!v&&(v.runCount>0||y>0);return(0,a.jsx)("div",{className:"border border-line bg-bg p-3",children:(0,a.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm",children:[(0,a.jsxs)("span",{className:"font-medium text-ink",children:[e.doneCount,"/",e.totalCount," done"]}),(0,a.jsxs)("span",{className:"text-ink-3",children:[e.inProgressCount," in progress"]}),(0,a.jsxs)("span",{className:"text-ink-3",children:[e.blockedCount," blocked"]}),j&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"text-ink-3 tabular-nums",title:`${v.runCount.toLocaleString()} run${v.runCount===1?"":"s"} across ${v.issueCount} sub-task${v.issueCount===1?"":"s"}`,children:[zE(y)," tokens"]}),(0,a.jsxs)("span",{className:"text-ink-3 tabular-nums",children:[TE(v.runtimeMs)," runtime"]})]})]}),(0,a.jsx)("div",{role:"progressbar","aria-label":"Sub-tasks completion progress","aria-valuemin":0,"aria-valuenow":e.doneCount,"aria-valuemax":e.totalCount,className:"flex h-2 w-full overflow-hidden rounded-full bg-bg-3",children:f.map(({status:k,count:S})=>(0,a.jsx)("span",{className:Y("h-full",ZF[k]),style:{width:`${S/e.totalCount*100}%`},title:`${XF[k]}: ${S}`,"aria-hidden":"true"},k))})]}),(0,a.jsx)("div",{className:"min-w-0 border border-line bg-bg px-3 py-2 text-sm lg:w-72",children:l&&c?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"text-xs font-medium text-ink-3",children:l.kind==="next"?"Next up":"Waiting on blockers"}),(0,a.jsxs)(mn,{to:Vd(u),state:p,issuePrefetch:c,className:"mt-1 block min-w-0 text-ink underline-offset-2 hover:underline",children:[(0,a.jsx)("span",{className:"font-mono text-xs text-ink-3",children:c.identifier??c.id.slice(0,8)})," ",(0,a.jsx)("span",{children:c.title})]})]}):e.totalCount===0?(0,a.jsx)("div",{className:"text-sm font-medium text-ink",children:"No active sub-tasks"}):e.doneCount===e.totalCount?(0,a.jsx)("div",{className:"text-sm font-medium text-ink",children:"All sub-tasks done"}):(0,a.jsx)("div",{className:"text-sm font-medium text-ink",children:"No actionable sub-tasks"})})]})})}r(vH,"SubIssueProgressSummaryStrip");var eS=["","pl-4 sm:pl-0","pl-8 sm:pl-0","pl-12 sm:pl-0","pl-16 sm:pl-0"];function yH(e){return(0,a.jsx)(jH,{...e})}r(yH,"IssuesList");function jH({issues:e,isLoading:t,error:s,agents:l,projects:c,liveIssueIds:u,liveRuns:p,projectId:f,viewStateKey:h,issueLinkState:g,initialAssignees:v,initialWorkspaces:y,initialStatuses:j,initialSearch:k,searchFilters:S,searchWithinLoadedIssues:N=!1,baseCreateIssueDefaults:I,createIssueLabel:C,defaultSortField:M,showProgressSummary:R=!1,parentIssueIdForCostSummary:_,enableRoutineVisibilityFilter:D=!1,onShowHiddenTasksChange:U,hasMoreIssues:K=!1,isLoadingMoreIssues:z=!1,mutedIssueIds:E,issueBadgeById:B,onLoadMoreIssues:O,onSearchChange:Q,rowPresentation:V="legacy",toolbarContext:ue,toolbarPresentation:ce="legacy",listHeader:X,onUpdateIssue:A}){const ee=(0,x.useRef)(null),ie=ja(),le=hn().key,Ae=kn(),[de,we]=(0,x.useState)(null),ye=(0,x.useRef)(!0);(0,x.useEffect)(()=>{const F=r(()=>{ye.current=!0},"handlePointerMove");return window.addEventListener("mousemove",F,{passive:!0}),()=>window.removeEventListener("mousemove",F)},[]);const Me=(0,x.useRef)(null),he=(0,x.useCallback)(F=>{ye.current&&(Me.current=F,we(W=>W===null?W:null))},[]),{selectedCompanyId:ve}=bt(),{openNewIssue:et}=Us(),{data:$e}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:Ie}=me({queryKey:$.access.companyUserDirectory(ve),queryFn:r(()=>ti.listUserDirectory(ve),"queryFn"),enabled:!!ve}),{data:ct}=me({queryKey:$.instance.experimentalSettings,queryFn:r(()=>pa.getExperimental(),"queryFn"),retry:!1}),He=$e?.user?.id??$e?.session?.userId??null,vt=ct!==void 0,Jt=ct?.enableIsolatedWorkspaces===!0,ge=ct?.enableExternalObjects===!0,Oe=ve?`${h}:${ve}`:h,De=$2(ve,h),ut=v?.join("|")??"",Ht=y?.join("|")??"",Vt=j?`set:${j.join("|")}`:"",gt=(0,x.useRef)(null);gt.current===null&&(gt.current=g0(De));const un=gt.current,[P,qe]=(0,x.useState)(()=>Xk(un,v,y,M,j)),[Ye,xt]=(0,x.useState)(null),[at,Kt]=(0,x.useState)(""),[ea,en]=(0,x.useState)(k??""),[Mt,Gt]=(0,x.useState)(z2),[dt,On]=(0,x.useState)(un.columns),mt=(0,x.useRef)(!1),[Nn,It]=(0,x.useState)(!1),tn=(0,x.useDeferredValue)(ea).trim().toLowerCase();(0,x.useEffect)(()=>{en(k??"")},[k]);const{data:qt}=me({queryKey:$.issues.labels(ve),queryFn:r(()=>cn.listLabels(ve),"queryFn"),enabled:!!ve}),Tt=(0,x.useMemo)(()=>({currentUserId:He,agents:l,projects:c,labels:qt}),[l,He,qt,c]),Ct=(0,x.useMemo)(()=>uo(tn,Tt),[tn,Tt]),_e=Ct.query,Re=_e.length>0||oA(Ct.filters),lt=Re&&!N;(0,x.useEffect)(()=>{Re||It(!1)},[Re]);const Dt=(0,x.useRef)(`${Oe}::${ut}::${Ht}::${Vt}`);(0,x.useEffect)(()=>{const F=`${Oe}::${ut}::${Ht}::${Vt}`;if(Dt.current!==F){Dt.current=F;const W=g0(De);qe(Xk(W,v,y,M,j)),On(W.columns)}},[Oe,v,ut,y,Ht,j,Vt,M,De.companyId,De.collectionKey,De.legacyViewStorageKey,De.legacyColumnsStorageKey]);const ze=(0,x.useCallback)(F=>{qe(W=>{const J={...W,...F};return m0(De,{viewState:J,columns:dt}),J})},[De.companyId,De.collectionKey,De.legacyColumnsStorageKey,De.legacyViewStorageKey,dt]);(0,x.useEffect)(()=>{!vt||ge||P.externalObjectStatuses.length===0||ze({externalObjectStatuses:[]})},[vt,ge,ze,P.externalObjectStatuses.length]),(0,x.useEffect)(()=>{const F=new Set(e.map(J=>J.parentId).filter(Boolean)),W=P.collapsedParents.filter(J=>F.has(J));W.length!==P.collapsedParents.length&&ze({collapsedParents:W})},[e]);const Ot=U!==void 0,Rt=Ot&&P.showHiddenTasks;(0,x.useEffect)(()=>{U?.(Rt)},[Rt,U]);const Lt=(0,x.useMemo)(()=>{if(!Re)return{};const F={...wP(P),...uA(Ct.filters)};return f&&(F.projectId=f),F},[Re,Ct.filters,f,P]),{data:nn=[]}=me({queryKey:[...$.issues.search(ve,_e,f),S??{},Lt,"compact",Td,D?"with-routine-executions":"without-routine-executions",Rt?"with-hidden":"without-hidden"],queryFn:r(({signal:F})=>cn.listCompact(ve,{...Lt,..._e.length>0?{q:_e}:{},projectId:f,limit:Td,...S,...D?{includeRoutineExecutions:!0}:{},...Rt?{includeHidden:!0}:{}},{signal:F}).then(W=>W),"queryFn"),enabled:!!ve&<,placeholderData:r(F=>F,"placeholderData")}),Wt=Ef({queries:YF.map(F=>({queryKey:[...$.issues.list(ve??"__no-company__"),"board-column",F,_e,Lt,f??"__all-projects__",S??{},"compact",Rd,D?"with-routine-executions":"without-routine-executions",Rt?"with-hidden":"without-hidden"],queryFn:r(({signal:W})=>Lt.status&&!Lt.status.split(",").includes(F)?Promise.resolve([]):cn.listCompact(ve,{...Lt,...S,..._e.length>0?{q:_e}:{},projectId:f,status:F,limit:Rd,...D?{includeRoutineExecutions:!0}:{},...Rt?{includeHidden:!0}:{}},{signal:W}).then(J=>J),"queryFn"),enabled:!!ve&&P.viewMode==="board"&&!N,placeholderData:r(W=>W,"placeholderData")}))}),{data:Ln=[]}=me({queryKey:ve?$.executionWorkspaces.summaryList(ve):["execution-workspaces","__disabled__"],queryFn:r(()=>ep.listSummaries(ve),"queryFn"),enabled:!!ve&&Jt}),gn=(0,x.useCallback)(F=>!F||!l?null:l.find(W=>W.id===F)?.name??null,[l]),zn=(0,x.useMemo)(()=>FP(Ie?.users),[Ie?.users]),is=(0,x.useMemo)(()=>HP(Ie?.users),[Ie?.users]),La=(0,x.useMemo)(()=>{const F=new Map;for(const W of c??[])F.set(W.id,{name:W.name,color:W.color??null});return F},[c]),wa=(0,x.useMemo)(()=>{const F=new Map;for(const W of c??[])for(const J of W.workspaces??[])F.set(J.id,{name:J.name||W.name,projectId:W.id});return F},[c]),ka=(0,x.useMemo)(()=>{const F=new Map;for(const W of c??[]){const J=W.executionWorkspacePolicy?.defaultProjectWorkspaceId??W.primaryWorkspace?.id??null;J&&F.set(W.id,J)}return F},[c]),Qn=(0,x.useMemo)(()=>new Set(ka.values()),[ka]),yt=(0,x.useMemo)(()=>{const F=new Map;for(const W of Ln){const J=W.projectWorkspaceId?wa.get(W.projectWorkspaceId)??null:null;F.set(W.id,{name:W.name,mode:W.mode,projectWorkspaceId:W.projectWorkspaceId??null,projectId:J?.projectId??null})}return F},[Ln,wa]),dn=(0,x.useMemo)(()=>({executionWorkspaceById:yt,defaultProjectWorkspaceIdByProjectId:ka}),[ka,yt]),za=(0,x.useMemo)(()=>{const F=new Map;for(const[W,J]of wa)Jy({id:W},Qn)&&F.set(W,J.name);for(const[W,J]of yt)Jy({id:W,mode:J.mode,projectWorkspaceId:J.projectWorkspaceId},Qn)&&F.set(W,J.name);return F},[Qn,yt,wa]),si=(0,x.useMemo)(()=>{const F=new Map,W=new Set;He&&F.set(`user:${He}`,{id:`user:${He}`,label:He==="local-board"?"Board":"Me",kind:"user",searchText:He==="local-board"?"board me human local-board":`me board human ${He}`});for(const J of e)if(J.createdByUserId){const Ee=`user:${J.createdByUserId}`;F.has(Ee)||F.set(Ee,{id:Ee,label:Vr(J.createdByUserId,He)??J.createdByUserId.slice(0,5),kind:"user",searchText:`${J.createdByUserId} board user human`})}for(const J of l??[]){W.add(J.id);const Ee=`agent:${J.id}`;F.has(Ee)||F.set(Ee,{id:Ee,label:J.name,kind:"agent",searchText:`${J.name} ${J.id} agent`})}for(const J of e)if(J.createdByAgentId&&!W.has(J.createdByAgentId)){const Ee=`agent:${J.createdByAgentId}`;F.has(Ee)||F.set(Ee,{id:Ee,label:J.createdByAgentId.slice(0,8),kind:"agent",searchText:`${J.createdByAgentId} agent`})}return[...F.values()].sort((J,Ee)=>J.kind!==Ee.kind?J.kind==="user"?-1:1:J.label.localeCompare(Ee.label))},[l,He,e]),pn=(0,x.useMemo)(()=>new Set(dt),[dt]),Bs=(0,x.useMemo)(()=>tO(Jt),[Jt]),Pn=(0,x.useMemo)(()=>new Set(Bs),[Bs]),ra=(0,x.useMemo)(()=>y2(e,u??new Set),[e,u]),ma=(0,x.useMemo)(()=>qF(p,e),[e,p]),ha=(0,x.useMemo)(()=>J9.filter(F=>pn.has(F)&&Pn.has(F)&&(V==="legacy"||F!=="updated")),[Pn,V,pn]),$n=(0,x.useMemo)(()=>{const F=new Map;for(const W of e)F.set(W.id,W);return F},[e]),Gn=(0,x.useMemo)(()=>{const F=new Map;for(const W of e)F.set(W.id,W.identifier?`${W.identifier}: ${W.title}`:W.title);return F},[e]),Pa=(0,x.useMemo)(()=>{if(P.viewMode!=="board"||N)return null;const F=new Map;let W=!1;for(const J of Wt){W||=J.isPending;for(const Ee of J.data??[])F.set(Ee.id,Ee)}return F.size>0?[...F.values()]:W?e:[]},[Wt,e,N,P.viewMode]),xn=(0,x.useMemo)(()=>P.viewMode==="board"&&!N&&Wt.some(F=>(F.data?.length??0)===Rd),[Wt,N,P.viewMode]),rs=(0,x.useMemo)(()=>Pa??(lt?nn:e),[Pa,e,lt,nn]),Sa=(0,x.useMemo)(()=>{if(!Re||!N)return rs;const F=Mg(_e);return rs.filter(W=>gw(W,F)&&xw(W,Ct.filters))},[Re,_e,Ct.filters,N,rs]),In=lt&&!Nn&&P.viewMode==="list",ga=P.externalObjectStatuses.length>0,Ks=(0,x.useMemo)(()=>P.viewMode==="list"||ga?Sa.map(F=>F.id):[],[ga,Sa,P.viewMode]),{summaries:qs,isLoading:ls,isReady:Va}=d9(ve,Ks),Na=(0,x.useMemo)(()=>({...dn,externalObjectSummaryByIssueId:qs,externalObjectSummariesReady:Va&&!ls}),[ls,Va,qs,dn]),$a=ga&&ls&&!Va,ht=(0,x.useMemo)(()=>{const F=mg(Sa,P,He,D,u,Na);return In?F:iH(F,P)},[In,Sa,P,He,D,u,Na]),Un=(0,x.useMemo)(()=>y9(R,e.length)?j9(e):null,[e,R]),ii=(0,x.useMemo)(()=>M==="workflow"&&P.groupBy==="none",[M,P.groupBy]),ri=(0,x.useMemo)(()=>{if(!ii)return null;const F=new Set(ht.map(Je=>Je.id)),W=mH(ht,P.nestingEnabled),J=hH(ht,P.nestingEnabled),Ee=new Map;return ht.forEach(Je=>{const At=(Je.blockedBy??[]).map(pt=>pt.id).filter(pt=>{if(!F.has(pt))return!1;const sn=$n.get(pt);return sn?sn.status!=="done"&&sn.status!=="cancelled":!1}),Kn=gH(Je,At,J.get(Je.id));Ee.set(Je.id,Kn?[]:At)}),{stepNumberByIssueId:W,unresolvedVisibleBlockersByIssueId:Ee,currentStepIssueId:(ht.find(Je=>pH(Je.status))??null??ht.find(Je=>Je.status==="blocked")??null)?.id??null}},[ii,ht,$n,P.nestingEnabled]),Wa=oT(P,D,Ot),se=(0,x.useMemo)(()=>{if(Wa===0&&!Re)return null;const F=Mg(_e),W=Re?new Set(Sa.map(J=>J.id)):null;return J=>mg([J],P,He,D,u,Na).length>0&&(W===null||W.has(J.id)||gw(J,F)&&xw(J,Ct.filters))},[Wa,He,D,Na,Re,_e,u,Ct.filters,Sa,P]),Te=(0,x.useMemo)(()=>{if(P.viewMode!=="board")return;const F=new Map(rs.map(W=>[W.id,W.status]));return new Map(_2(p,F).map(W=>[W.issueId,W.runs]))},[p,rs,P.viewMode]),Ze=o9(ve,P.viewMode==="board"),We=(0,x.useMemo)(()=>new Map(Ze.map(F=>[F.issueId,F.state])),[Ze]),zt=P.viewMode==="board"&&ht.length>100,Qt=P.boardCardDensity==="compact"||P.boardCardDensity==="auto"&&zt,Z=(0,x.useMemo)(()=>P.boardColdLaneMode==="collapsed"||P.boardColdLaneMode==="auto"&&zt?[...CF]:[],[zt,P.boardColdLaneMode]),Ne=P.boardCardDensity!=="auto"||P.boardColdLaneMode!=="auto"||P.boardColumnPageSize!==10,Be=(0,x.useMemo)(()=>{if(P.groupBy==="none")return[{key:"__all",label:null,items:ht}];if(P.groupBy==="status"){const W=Gl(ht,J=>J.status);return Zd.filter(J=>W[J]?.length).map(J=>({key:J,label:pg(J),items:W[J]}))}if(P.groupBy==="priority"){const W=Gl(ht,J=>J.priority);return fg.filter(J=>W[J]?.length).map(J=>({key:J,label:pg(J),items:W[J]}))}if(P.groupBy==="workspace"){const W=Gl(ht,J=>Zy(J,dn)??"__no_workspace");return Object.keys(W).sort((J,Ee)=>J==="__no_workspace"?1:Ee==="__no_workspace"?-1:(W[Ee]?.length??0)-(W[J]?.length??0)).map(J=>({key:J,label:J==="__no_workspace"?"No Workspace":za.get(J)??J.slice(0,8),items:W[J]}))}if(P.groupBy==="project"){const W=Gl(ht,J=>J.projectId??"__no_project");return Object.keys(W).sort((J,Ee)=>{if(J==="__no_project")return 1;if(Ee==="__no_project")return-1;const Je=La.get(J)?.name??J,At=La.get(Ee)?.name??Ee;return Je.localeCompare(At)}).map(J=>({key:J,label:J==="__no_project"?"No Project":La.get(J)?.name??J.slice(0,8),items:W[J]}))}if(P.groupBy==="parent"){const W=Gl(ht,J=>J.parentId??"__no_parent");return Object.keys(W).sort((J,Ee)=>J==="__no_parent"?1:Ee==="__no_parent"?-1:(W[Ee]?.length??0)-(W[J]?.length??0)).map(J=>({key:J,label:J==="__no_parent"?"No Parent":Gn.get(J)??J.slice(0,8),items:W[J]}))}const F=Gl(ht,W=>W.assigneeAgentId??(W.assigneeUserId?`__user:${W.assigneeUserId}`:"__unassigned"));return Object.keys(F).map(W=>({key:W,label:W==="__unassigned"?"Unassigned":W.startsWith("__user:")?Vr(W.slice(7),He,zn)??"User":gn(W)??W.slice(0,8),items:F[W]}))},[ht,dn,P.groupBy,l,gn,He,za,Gn,zn,La]),Le=(0,x.useMemo)(()=>JSON.stringify([Oe,tn,P.statuses,P.priorities,P.assignees,P.creators,P.labels,P.projects,P.workspaces,P.liveOnly??!1,P.externalObjectStatuses,P.hideRoutineExecutions,Rt,P.sortField,P.sortDir,P.groupBy,P.viewMode,P.nestingEnabled,In]),[Oe,tn,P.statuses,P.priorities,P.assignees,P.creators,P.labels,P.projects,P.workspaces,P.liveOnly,P.externalObjectStatuses,P.hideRoutineExecutions,Rt,P.sortField,P.sortDir,P.groupBy,P.viewMode,P.nestingEnabled,In]),st=(0,x.useRef)({identity:"",keptRootIds:new Set,seenIds:new Set,knownIds:new Set}),it=(0,x.useMemo)(()=>{const F=new Map;if(P.viewMode!=="list")return F;const W=st.current.identity===Le?st.current:null;for(const J of Be){if(!P.nestingEnabled){F.set(J.key,{roots:J.items,childMap:new Map});continue}let Ee;if(W){Ee=new Set(W.keptRootIds);for(const Je of J.items)Je.parentId&&!W.knownIds.has(Je.id)&&W.seenIds.has(Je.parentId)&&Ee.add(Je.id)}F.set(J.key,Nf(J.items,Ee))}return F},[Be,Le,P.nestingEnabled,P.viewMode]),Pt=r(F=>it.get(F.key)??(P.nestingEnabled?Nf(F.items):{roots:F.items,childMap:new Map}),"issueTreeForGroup"),bn=(0,x.useMemo)(()=>{if(P.viewMode!=="list")return[];const F=[];let W=0;for(const J of Be){const Ee=!!J.label&&P.collapsedGroups.includes(J.key);J.label&&F.push({type:"group",key:J.key,collapsed:Ee});const{roots:Je,childMap:At}=Pt(J),Kn=r(pt=>{W+=1;const sn=At.get(pt.id)??[],An=!P.collapsedParents.includes(pt.id);if(Ee||F.push({type:"issue",issue:pt,hasChildren:sn.length>0,expanded:An,budgetOrdinal:W}),An)for(const Se of sn)Kn(Se)},"walk");for(const pt of Je)Kn(pt)}return F},[Be,P.viewMode,P.collapsedGroups,P.collapsedParents,P.nestingEnabled]),Bn=(0,x.useRef)({flatNavEntries:bn,selectedNavKey:de,viewMode:P.viewMode,issueLinkState:g,collapsedGroups:P.collapsedGroups,collapsedParents:P.collapsedParents,updateView:ze});Bn.current={flatNavEntries:bn,selectedNavKey:de,viewMode:P.viewMode,issueLinkState:g,collapsedGroups:P.collapsedGroups,collapsedParents:P.collapsedParents,updateView:ze};const Qa=(0,x.useCallback)(F=>{if(F.startsWith("group:")){const J=ee.current?.querySelector(`[data-issues-group-key="${h0(F.slice(6))}"]`);return J instanceof HTMLElement?J:null}const W=ee.current?.querySelector(`[data-issue-row-id="${h0(F.slice(6))}"]`)?.querySelector("[data-inbox-issue-link]");return W instanceof HTMLElement?W:null},[]);(0,x.useEffect)(()=>{const F=r(W=>{if(W.defaultPrevented)return;const J=W.target;if(!(J instanceof HTMLElement)||ko(J)||Wg(document)||W.metaKey||W.ctrlKey||W.altKey)return;const Ee=Bn.current;if(Ee.viewMode!=="list"||Ee.flatNavEntries.length===0)return;const Je=r(pt=>pt?Ee.flatNavEntries.findIndex(sn=>Md(sn)===pt):-1,"indexOfKey"),At=Je(Me.current),Kn=ye.current&&At>=0?At:Je(Ee.selectedNavKey);switch(W.key){case"j":case"ArrowDown":case"k":case"ArrowUp":{W.preventDefault(),ye.current=!1;const pt=W.key==="j"||W.key==="ArrowDown"?"next":"previous",sn=rO(Kn,Ee.flatNavEntries.length,pt),An=Ee.flatNavEntries[sn];if(!An)break;we(Md(An)),An.type==="issue"&&Gt(Se=>Math.max(Se,An.budgetOrdinal+1));break}case"ArrowLeft":case"ArrowRight":{const pt=Ee.flatNavEntries[Kn];if(!pt)return;const sn=W.key==="ArrowLeft";if(pt.type==="group"){W.preventDefault(),ye.current=!1,we(Md(pt)),Ee.updateView({collapsedGroups:sn?Ee.collapsedGroups.includes(pt.key)?Ee.collapsedGroups:[...Ee.collapsedGroups,pt.key]:Ee.collapsedGroups.filter(An=>An!==pt.key)});break}if(!pt.hasChildren)return;W.preventDefault(),ye.current=!1,we(Md(pt)),Ee.updateView({collapsedParents:sn?Ee.collapsedParents.includes(pt.issue.id)?Ee.collapsedParents:[...Ee.collapsedParents,pt.issue.id]:Ee.collapsedParents.filter(An=>An!==pt.issue.id)});break}case"Enter":{const pt=Ee.flatNavEntries[Kn];if(!pt||pt.type!=="issue")return;W.preventDefault();const sn=pt.issue,An=sn.identifier??sn.id,Se=A0(Ee.issueLinkState,sn);ig(An,Se),uI(Ae,An,{issue:sn}),ie(Vd(An),{state:Se});break}default:return}},"handleKeyDown");return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[ie,Ae]);const Ca=(0,x.useMemo)(()=>{if(P.viewMode!=="list")return[];const F=[];for(const W of Be){const{roots:J,childMap:Ee}=Pt(W),Je=r(At=>{if(F.push(At.id),!P.collapsedParents.includes(At.id))for(const Kn of Ee.get(At.id)??[])Je(Kn)},"walk");for(const At of J)Je(At)}return F},[Be,P.collapsedParents,P.nestingEnabled,P.viewMode]),Cn=(0,x.useRef)(null),[jt]=(0,x.useState)(()=>Zk.get(le)??null),la=jt?.identity===Le?jt.limit:0,Yt=(0,x.useMemo)(()=>P.viewMode==="list"?rH(Cn.current,Le,Ca,Mt,la):Mt,[Ca,Le,Mt,la,P.viewMode]);(0,x.useLayoutEffect)(()=>{P.viewMode==="list"&&(Cn.current={identity:Le,ids:Ca,limit:Yt},Zk.set(le,{identity:Le,limit:Yt}),Mt!==Yt&&Gt(Yt))},[Ca,le,Le,Yt,Mt,P.viewMode]);const ta=(0,x.useRef)(null);(0,x.useEffect)(()=>{if(!de){ta.current=null;return}if(ta.current===de)return;const F=Qa(de);F&&(F.scrollIntoView({block:"nearest"}),ta.current=de)},[Qa,Yt,de]),(0,x.useLayoutEffect)(()=>{if(!P.nestingEnabled||P.viewMode!=="list")return;const F=st.current,W=F.identity===Le?F:{identity:Le,keptRootIds:new Set,seenIds:new Set,knownIds:new Set},J=Ca.slice(0,Yt);for(const Ee of J)W.seenIds.add(Ee);for(const Ee of Be)for(const Je of Ee.items)W.knownIds.add(Je.id);for(const Ee of it.values())for(const Je of Ee.roots)Je.parentId&&(W.seenIds.has(Je.id)||W.knownIds.has(Je.parentId))&&W.keptRootIds.add(Je.id);st.current=W},[Ca,Be,it,Le,Yt,P.nestingEnabled,P.viewMode]);const an=(0,x.useRef)(null),Aa=(0,x.useCallback)(()=>{const F=ee.current;if(!F||P.viewMode!=="list"){an.current=null;return}an.current=QF(F,Dd(F),Le)},[Le,P.viewMode]);(0,x.useEffect)(()=>{if(P.viewMode!=="list")return;const F=Dd(ee.current)??window;return F.addEventListener("scroll",Aa,{passive:!0}),()=>F.removeEventListener("scroll",Aa)},[Aa,P.viewMode]),(0,x.useLayoutEffect)(()=>{const F=ee.current,W=an.current;if(F&&W&&W.identity===Le&&P.viewMode==="list"){const J=Dd(F),Ee=GF(F,J,W);if(Ee===null)return;Ee!==0&&(J?J.scrollTop+=Ee:window.scrollBy(0,Ee))}Aa()},[Ca,Aa,Le,Yt,P.viewMode]);const Fs=P.viewMode==="list"&&Yt>0;(0,x.useLayoutEffect)(()=>{const F=ee.current;if(!F||!Fs)return;let W=window.requestAnimationFrame(()=>{W=window.requestAnimationFrame(()=>F.setAttribute("data-row-deferral",""))});return()=>{window.cancelAnimationFrame(W),F.removeAttribute("data-row-deferral")}},[Fs]);const So=(0,x.useRef)(null),li=!!X&&!P.liveOnly;(0,x.useLayoutEffect)(()=>{const F=So.current;if(!li||!F||typeof ResizeObserver>"u")return;const W=new ResizeObserver(()=>Aa());return W.observe(F),()=>W.disconnect()},[Aa,li]);const _a=P.viewMode==="list"&&Yt<ht.length,sl=Math.max(ht.length-Yt,0),Mi=(0,x.useCallback)(()=>{if(P.viewMode==="list"){if(_a){Gt(Math.min(ht.length,Yt+FF));return}K&&!z&&O?.()}},[ht.length,K,_a,z,O,Yt,P.viewMode]),Ss=P.viewMode==="list"&&!t&&(_a||K&&!z);(0,x.useEffect)(()=>{if(!Ss)return;let F=null;const W=Dd(ee.current),J=W??window,Ee=r((Kn="scroll")=>{F===null&&(F=window.requestAnimationFrame(()=>{F=null;const pt=W?.scrollHeight??document.documentElement.scrollHeight;if(pt===0)return;const sn=W?.clientHeight??window.innerHeight,An=W?W.scrollTop+W.clientHeight:window.scrollY+window.innerHeight,Se=pt>sn+1;if(An>=pt-HF){if(Kn==="initial"&&!_a&&K&&!Se){if(mt.current)return;mt.current=!0}Mi()}}))},"checkScrollPosition"),Je=r(()=>Ee("scroll"),"handleScroll"),At=r(()=>Ee("resize"),"handleResize");return J.addEventListener("scroll",Je,{passive:!0}),window.addEventListener("resize",At),Ee("initial"),()=>{J.removeEventListener("scroll",Je),window.removeEventListener("resize",At),F!==null&&window.cancelAnimationFrame(F)}},[Ss,K,_a,Mi]);const il=(0,x.useCallback)(F=>{const W=F?.key,J={...I??{}};if(f&&J.projectId===void 0&&(J.projectId=f),W){if(P.groupBy==="status")J.status=W;else if(P.groupBy==="priority")J.priority=W;else if(P.groupBy==="assignee"&&W!=="__unassigned")W.startsWith("__user:")?J.assigneeUserId=W.slice(7):J.assigneeAgentId=W;else if(P.groupBy==="project"&&W!=="__no_project")J.projectId=W;else if(P.groupBy==="workspace"&&W!=="__no_workspace"){const Ee=F?.items.find(At=>At.executionWorkspaceId===W||At.projectWorkspaceId===W)??null,Je=yt.get(W);if(Je){J.executionWorkspaceId=W,J.executionWorkspaceMode="reuse_existing",Je.projectWorkspaceId&&(J.projectWorkspaceId=Je.projectWorkspaceId);const At=Je.projectId??(Je.projectWorkspaceId?wa.get(Je.projectWorkspaceId)?.projectId:null)??(Ee?.executionWorkspaceId===W?Ee.projectId:null);At&&(J.projectId=At)}else{const At=wa.get(W);At&&(J.projectWorkspaceId=W,J.projectId=At.projectId)}}else if(P.groupBy==="parent"&&W!=="__no_parent"){const Ee=$n.get(W);Ee?Object.assign(J,zF(Ee,He)):J.parentId=W}}return J},[I,He,yt,$n,f,wa,P.groupBy]),rl=C?`Create ${C}`:"Create Task",br=C?`New ${C}`:"New Task",oi=(0,x.useCallback)(F=>{et(il(F))},[il,et]),ll=(0,x.useCallback)(F=>{ze({workspaces:[F]})},[ze]),vr=(0,x.useCallback)(F=>{const W=rC(F);On(W),m0(De,{viewState:P,columns:W})},[De.companyId,De.collectionKey,De.legacyColumnsStorageKey,De.legacyViewStorageKey,P]),xa=(0,x.useCallback)((F,W)=>{if(W){vr([...dt,F]);return}vr(dt.filter(J=>J!==F))},[vr,dt]),Ns=(0,x.useCallback)((F,W,J=null)=>{A(F,{assigneeAgentId:W,assigneeUserId:J}),xt(null),Kt("")},[A]);let Di=P.viewMode==="list"?Yt:Number.POSITIVE_INFINITY;return(0,a.jsxs)("div",{ref:ee,className:"wardmote-issue-list space-y-4",children:[Un?(0,a.jsx)(vH,{summary:Un,issueLinkState:g,parentIssueIdForCostSummary:_}):null,(0,a.jsx)(ce==="collection"?kF:xH,{className:"wardmote-task-list-toolbar",ariaLabel:ce==="collection"?"Task controls":void 0,context:ue?(0,a.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[ue,(0,a.jsxs)(oe,{size:"sm",variant:"secondary","aria-label":br,onClick:r(()=>oi(),"onClick"),children:[(0,a.jsx)(as,{className:"h-4 w-4 sm:mr-1"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:br})]})]}):(0,a.jsxs)(oe,{size:"sm",variant:"secondary","aria-label":br,onClick:r(()=>oi(),"onClick"),children:[(0,a.jsx)(as,{className:"h-4 w-4 sm:mr-1"}),(0,a.jsx)("span",{className:"hidden sm:inline",children:br})]}),search:(0,a.jsx)(bH,{value:ea,context:Tt,onDebouncedChange:r(F=>{en(F),Q?.(F)},"onDebouncedChange")}),controls:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center border border-line rounded-md overflow-hidden mr-1",role:"group","aria-label":"View mode",children:[(0,a.jsx)("button",{className:`flex h-8 w-8 items-center justify-center transition-colors ${P.viewMode==="list"?"bg-bg-3 text-ink":"text-ink-3 hover:text-ink"}`,onClick:r(()=>ze({viewMode:"list"}),"onClick"),title:"List view","aria-label":"List view","aria-pressed":P.viewMode==="list",children:(0,a.jsx)(AR,{className:"h-3.5 w-3.5"})}),(0,a.jsx)("button",{className:`flex h-8 w-8 items-center justify-center transition-colors ${P.viewMode==="board"?"bg-bg-3 text-ink":"text-ink-3 hover:text-ink"}`,onClick:r(()=>ze({viewMode:"board"}),"onClick"),title:"Board view","aria-label":"Board view","aria-pressed":P.viewMode==="board",children:(0,a.jsx)(PR,{className:"h-3.5 w-3.5"})})]}),P.viewMode==="list"&&(0,a.jsx)(oe,{active:P.nestingEnabled,type:"button",variant:"secondary",size:"icon",className:Y("hidden h-8 w-8 shrink-0 sm:inline-flex"),onClick:r(()=>ze({nestingEnabled:!P.nestingEnabled}),"onClick"),title:P.nestingEnabled?"Disable parent-child nesting":"Enable parent-child nesting",children:(0,a.jsx)(B1,{className:"h-3.5 w-3.5"})}),P.viewMode==="board"&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(oe,{active:Qt,type:"button",variant:"secondary",size:"icon",className:Y("h-8 w-8 shrink-0"),onClick:r(()=>ze({boardCardDensity:Qt?"comfortable":"compact"}),"onClick"),title:Qt?"Use comfortable cards":"Use compact cards",children:(0,a.jsx)(fR,{className:"h-3.5 w-3.5"})}),(0,a.jsx)(oe,{active:Z.length>0,type:"button",variant:"secondary",size:"icon",className:Y("h-8 w-8 shrink-0"),onClick:r(()=>ze({boardColdLaneMode:Z.length>0?"expanded":"collapsed"}),"onClick"),title:Z.length>0?"Expand cold lanes":"Collapse cold lanes",children:(0,a.jsx)(TR,{className:"h-3.5 w-3.5"})}),(0,a.jsxs)(ws,{children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsxs)(oe,{active:P.boardColumnPageSize!==10,type:"button",variant:"secondary",size:"sm",className:Y("h-8 shrink-0 gap-1.5 px-2"),title:"Cards per column",children:[(0,a.jsx)(CR,{className:"h-3.5 w-3.5"}),(0,a.jsx)("span",{className:"min-w-4 text-xs tabular-nums",children:P.boardColumnPageSize})]})}),(0,a.jsx)(js,{align:"end",className:"w-40 p-0",children:(0,a.jsx)("div",{className:"p-2 space-y-0.5",children:R2.map(F=>(0,a.jsxs)("button",{type:"button",className:Y("flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm",P.boardColumnPageSize===F?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50"),onClick:r(()=>ze({boardColumnPageSize:F}),"onClick"),children:[(0,a.jsxs)("span",{children:[F," per column"]}),P.boardColumnPageSize===F&&(0,a.jsx)(Ms,{className:"h-3.5 w-3.5"})]},F))})})]}),(0,a.jsx)(oe,{type:"button",variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",onClick:r(()=>ze({boardCardDensity:"auto",boardColdLaneMode:"expanded",boardColumnPageSize:10}),"onClick"),disabled:!Ne,title:"Reset board density",children:(0,a.jsx)(gc,{className:"h-3.5 w-3.5"})})]}),(0,a.jsx)(iF,{availableColumns:Bs,visibleColumnSet:pn,onToggleColumn:xa,showDateGroupSeparators:P.showDateGroupSeparators,onToggleDateGroupSeparators:r(F=>ze({showDateGroupSeparators:F}),"onToggleDateGroupSeparators"),onResetColumns:r(()=>vr(aC),"onResetColumns"),title:"Choose which task columns stay visible",iconOnly:!0,rowPresentation:V}),(0,a.jsx)(mF,{state:P,onChange:ze,buttonVariant:"secondary",activeFilterCount:Wa,agents:l,creators:si,projects:c?.map(F=>({id:F.id,name:F.name})),labels:qt?.map(F=>({id:F.id,name:F.name,color:F.color})),currentUserId:He,enableExternalObjectFilters:ge,enableRoutineVisibilityFilter:D,enableHiddenTasksFilter:Ot,iconOnly:!0,presentation:V==="task"?"streamlined":"legacy"}),P.viewMode==="list"&&(0,a.jsxs)(ws,{children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsx)(oe,{variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",title:"Sort",children:(0,a.jsx)($I,{className:"h-3.5 w-3.5"})})}),(0,a.jsx)(js,{align:"end",className:"w-48 p-0",children:(0,a.jsxs)("div",{className:"p-2 space-y-0.5",children:[lt&&(0,a.jsx)("button",{className:`flex items-center justify-between w-full px-2 py-1.5 text-sm rounded-sm ${In?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>It(!1),"onClick"),children:(0,a.jsx)("span",{children:"Relevance"})}),[["workflow","Workflow"],["status","Status"],["priority","Priority"],["title","Title"],["created","Created"],["updated","Updated"]].filter(([F])=>F!=="priority").map(([F,W])=>(0,a.jsxs)("button",{className:`flex items-center justify-between w-full px-2 py-1.5 text-sm rounded-sm ${!In&&P.sortField===F?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>{lt&&It(!0),In?ze({sortField:F,sortDir:F==="updated"||F==="created"?"desc":"asc"}):P.sortField===F?ze({sortDir:P.sortDir==="asc"?"desc":"asc"}):ze({sortField:F,sortDir:"asc"})},"onClick"),children:[(0,a.jsx)("span",{children:W}),!In&&P.sortField===F&&(0,a.jsx)("span",{className:"text-xs text-ink-3",children:P.sortDir==="asc"?"↑":"↓"})]},F))]})})]}),P.viewMode==="list"&&(0,a.jsxs)(ws,{children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsx)(oe,{variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",title:"Group",children:(0,a.jsx)(Rf,{className:"h-3.5 w-3.5"})})}),(0,a.jsx)(js,{align:"end",className:"w-44 p-0",children:(0,a.jsx)("div",{className:"p-2 space-y-0.5",children:[["status","Status"],["priority","Priority"],["assignee","Responsible"],["project","Project"],["workspace","Workspace"],["parent","Parent Task"],["none","None"]].filter(([F])=>F!=="priority").map(([F,W])=>(0,a.jsxs)("button",{className:`flex items-center justify-between w-full px-2 py-1.5 text-sm rounded-sm ${P.groupBy===F?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>ze({groupBy:F}),"onClick"),children:[(0,a.jsx)("span",{children:W}),P.groupBy===F&&(0,a.jsx)(Ms,{className:"h-3.5 w-3.5"})]},F))})})]})]})}),li&&X?(0,a.jsx)("div",{ref:So,children:X({viewMode:P.viewMode,issueFilter:se})}):null,(t||$a)&&(0,a.jsx)(SF,{variant:"issues-list"}),s&&(0,a.jsx)("p",{className:"text-sm text-bad",children:s.message}),lt&&nn.length===Td&&(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Showing up to ",Td," matches. Refine the search to narrow further."]}),xn&&(0,a.jsxs)("p",{className:"text-xs text-ink-3",children:["Some board columns are showing up to ",Rd," tasks. Refine filters or search to reveal the rest."]}),!t&&!$a&&ht.length===0&&P.viewMode==="list"&&(0,a.jsx)(cF,{icon:Xd,message:"No tasks match the current filters or search.",action:rl,onAction:r(()=>oi(),"onAction")}),P.viewMode==="board"?(0,a.jsx)(LF,{issues:ht,agents:l,liveIssueIds:u,liveRunsByIssueId:Te,pauseStateByIssueId:We,compactCards:Qt,collapsedStatuses:Z,initialVisibleCount:P.boardColumnPageSize,revealIncrement:P.boardColumnPageSize,onUpdateIssue:A}):(0,a.jsxs)("div",{className:"-mx-2 sm:mx-0",children:[Be.map(F=>Di<=0?null:(0,a.jsxs)(kS,{open:!P.collapsedGroups.includes(F.key),onOpenChange:r(W=>{ze({collapsedGroups:W?P.collapsedGroups.filter(J=>J!==F.key):[...P.collapsedGroups,F.key]})},"onOpenChange"),children:[F.label&&(0,a.jsx)("div",{"data-issues-group-key":F.key,className:Y("rounded-lg px-3 sm:pl-0 sm:pr-4",de===`group:${F.key}`?"bg-bg-3/50":"hover:bg-bg-3/50"),onClick:r(()=>we(`group:${F.key}`),"onClick"),onMouseEnter:r(()=>he(`group:${F.key}`),"onMouseEnter"),children:(0,a.jsx)(uF,{label:F.label,collapsible:!0,collapsed:P.collapsedGroups.includes(F.key),onToggle:r(()=>{ze({collapsedGroups:P.collapsedGroups.includes(F.key)?P.collapsedGroups.filter(W=>W!==F.key):[...P.collapsedGroups,F.key]})},"onToggle"),trailing:(0,a.jsx)(oe,{variant:"ghost",size:"icon-xs",className:"-mr-2",title:`New task in ${F.label}`,"aria-label":`New task in ${F.label}`,onClick:r(()=>oi(F),"onClick"),children:(0,a.jsx)(as,{className:"h-3 w-3"})})})}),(0,a.jsx)(wS,{children:(()=>{const{roots:W,childMap:J}=Pt(F),Ee=r((Se,Hs)=>{if(Di<=0)return null;Di-=1;const Ga=(J.get(Se.id)??[]).length>0,Ya=Ga?D2(Se.id,J):0,ba=!P.collapsedParents.includes(Se.id),ip=!(Ga&&ba),ol=Se.projectId?La.get(Se.projectId)??null:null,Zc=Se.parentId?$n.get(Se.parentId)??null:null,cl=B?.get(Se.id),rp=E?.has(Se.id)===!0,No=Se.assigneeUserId?is.get(Se.assigneeUserId)??null:null,Jc=Vr(Se.assigneeUserId,He,zn)??No?.label??null,ul=fS(Se),dl=ul?.kind==="user"?ul.id:null,fl=ul?.kind==="user"?ul.viaAgentId??null:null,ci=r(Ue=>{Ue.preventDefault(),Ue.stopPropagation(),ze({collapsedParents:ba?[...P.collapsedParents,Se.id]:P.collapsedParents.filter(Ea=>Ea!==Se.id)})},"toggleCollapse"),ui=ri,pl=ui?.stepNumberByIssueId.get(Se.id)??null,eu=ui?.unresolvedVisibleBlockersByIssueId.get(Se.id)??[],tu=ui?`issue-workflow-row-${Se.id}`:void 0,nu=ui&&Se.status==="done"?"text-ink-3":void 0,ml=eu.map(Ue=>{const Ea=$n.get(Ue);if(!Ea)return null;const iu=Ea.identifier??Ea.id.slice(0,8),hl=ui?.stepNumberByIssueId.get(Ue);return{blockerId:Ue,chipLabel:`blocked by ${iu}${hl?` · step ${hl}`:""}`}}).filter(Ue=>Ue!==null),os=ml[0]??null,Co=Math.max(ml.length-1,0),lp=Co>0?` ... and ${Co} more`:"",Ao=os?`${os.chipLabel}${lp}`:"",au=ml.slice(1).map(Ue=>Ue.chipLabel).join(", "),_o=Co>0?`${Ao}: ${au}`:Ao,yr=ui&&os?(0,a.jsx)("button",{type:"button","data-slot":"icon-button",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation();const Ea=document.getElementById(`issue-workflow-row-${os.blockerId}`);Ea&&(Ea.scrollIntoView({behavior:"smooth",block:"nearest"}),Ea.focus?.())},"onClick"),className:"inline-flex items-center rounded-full border border-amber-400/45 bg-amber-50/60 px-1.5 py-0.5 text-(length:--text-nano) font-medium text-amber-700 hover:bg-amber-100/80 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300",title:_o,"aria-label":_o,children:Ao},os.blockerId):null,Oi=ma.get(Se.id)??null,su=Oi?(0,a.jsx)(wF,{issueId:Se.id,run:Oi,companyId:ve,taskLabel:Se.identifier??Se.id.slice(0,8)}):void 0;return(0,a.jsx)("div",{"data-issue-row-id":Se.id,className:Y(V==="legacy"&&Hs>0&&eS[Math.min(Hs,eS.length-1)],ip&&"wardmote-issue-list-row-deferred")||void 0,children:(0,a.jsx)(bF,{issue:Se,presentation:V,issueLinkState:g,selected:de===`issue:${Se.id}`,onMouseEnter:r(()=>he(`issue:${Se.id}`),"onMouseEnter"),treeGuides:Hs,chevronInGuide:Hs>0&&Ga,checklistStepNumber:pl,checklistCurrentStep:ui?.currentStepIssueId===Se.id,checklistDependencyChips:yr,checklistRowId:tu,titleClassName:nu,externalObjectSummary:qs.get(Se.id)??null,titleSuffix:(0,a.jsxs)(a.Fragment,{children:[Ga&&!ba?(0,a.jsxs)("span",{className:"ml-1.5 text-xs text-ink-3",children:["(",Ya," sub-task",Ya!==1?"s":"",")"]}):null,cl?cl==="Paused"?(0,a.jsxs)(Dn,{variant:"ghost",className:Y("ml-1.5 px-1.5 text-(length:--text-nano)",Hd.paused),"aria-label":"Paused",title:"Paused",children:[(0,a.jsx)(mR,{className:"h-3 w-3"}),"Paused"]}):(0,a.jsx)(Dn,{variant:"outline",className:"ml-1.5 border-amber-500/40 bg-amber-500/10 px-1.5 text-(length:--text-nano) text-amber-700 dark:text-amber-300",children:cl}):null,T2(Se)?(0,a.jsxs)(Dn,{variant:"outline",className:"ml-1.5 border-amber-400/45 bg-amber-50/60 px-1.5 text-(length:--text-nano) text-amber-700 dark:border-amber-300/35 dark:bg-amber-400/10 dark:text-amber-300","aria-label":"Needs next step",title:"This task needs a next step",children:[(0,a.jsx)(Xd,{className:"h-3 w-3"}),"Needs next step"]}):null]}),className:Y(rp&&"opacity-70",de===`issue:${Se.id}`&&"bg-bg-3/50 hover:bg-bg-3/50"),leadingControl:V==="task"?Ga?(0,a.jsx)("button",{type:"button","data-slot":"icon-button",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center","aria-label":ba?"Collapse sub-tasks":"Expand sub-tasks",onClick:ci,children:(0,a.jsx)(ur,{className:Y("h-3.5 w-3.5 transition-transform",ba&&"rotate-90")})}):(0,a.jsx)("span",{"data-slot":"task-row-disclosure-spacer",className:"h-4 w-4 shrink-0","aria-hidden":"true"}):void 0,statusSlot:V==="task"?(0,a.jsxs)("span",{className:"relative inline-flex items-start self-stretch sm:items-center",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation()},"onClick"),children:[(0,a.jsx)(ei,{status:Se.status,externalConversationState:Se.externalConversationState,size:"md",blockerAttention:Se.blockerAttention,onChange:r(Ue=>A(Se.id,{status:Ue}),"onChange")}),Ga&&ba?(0,a.jsx)("span",{"aria-hidden":"true",className:"pointer-events-none absolute top-5 -bottom-2.5 left-1/2 w-px bg-line sm:hidden"}):null]}):void 0,metadata:V==="task"?(0,a.jsx)(Vk,{issue:Se,isLive:u?.has(Se.id)===!0,subtreeLiveCount:ra.get(Se.id)??0,showStatus:!1,showIdentifier:!1,checklistStepNumber:pl}):void 0,actions:su,showIdentifier:pn.has("id")&&Pn.has("id"),mobileLeading:Ga?(0,a.jsx)("button",{type:"button","data-slot":"icon-button",onClick:ci,children:(0,a.jsx)(ur,{className:Y("h-3.5 w-3.5 transition-transform",ba&&"rotate-90")})}):(0,a.jsx)("span",{className:"inline-flex items-center",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation()},"onClick"),children:(0,a.jsx)(ei,{status:Se.status,externalConversationState:Se.externalConversationState,size:"md",blockerAttention:Se.blockerAttention,onChange:r(Ue=>A(Se.id,{status:Ue}),"onChange")})}),desktopMetaLeading:V==="legacy"?(0,a.jsxs)(a.Fragment,{children:[Ga?(0,a.jsx)("button",{type:"button","data-slot":"icon-button",className:"relative z-10 hidden w-4 shrink-0 items-center justify-center sm:inline-flex",onClick:ci,children:(0,a.jsx)(ur,{className:Y("h-3.5 w-3.5 transition-transform",ba&&"rotate-90")})}):(0,a.jsx)("span",{className:"hidden w-4 shrink-0 sm:block"}),(0,a.jsx)(Vk,{issue:Se,isLive:u?.has(Se.id)===!0,subtreeLiveCount:ra.get(Se.id)??0,showStatus:pn.has("status")&&Pn.has("status"),showIdentifier:pn.has("id")&&Pn.has("id"),checklistStepNumber:pl,statusSlot:(0,a.jsx)("span",{className:"inline-flex items-center",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation()},"onClick"),children:(0,a.jsx)(ei,{status:Se.status,externalConversationState:Se.externalConversationState,size:"md",blockerAttention:Se.blockerAttention,onChange:r(Ue=>A(Se.id,{status:Ue}),"onChange")})})})]}):void 0,mobileTitleMeta:V==="task"?Sf(Se):void 0,mobileMeta:V==="legacy"?aF(Se).toLowerCase():su,trailingMeta:V==="task"&&pn.has("updated")&&Pn.has("updated")?Sf(Se):void 0,desktopTrailing:ha.length>0?(0,a.jsx)(oF,{issue:Se,columns:ha,projectName:ol?.name??null,projectColor:ol?.color??null,workspaceId:Zy(Se,dn),workspaceName:lC(Se,{executionWorkspaceById:yt,projectWorkspaceById:wa,defaultProjectWorkspaceIdByProjectId:ka}),onFilterWorkspace:ll,assigneeName:gn(Se.assigneeAgentId),assigneeAgent:l?.find(Ue=>Ue.id===Se.assigneeAgentId),creatorAgent:l?.find(Ue=>Ue.id===Se.createdByAgentId),assigneeUserName:Jc,assigneeUserAvatarUrl:No?.image??null,creatorAgentName:gn(Se.createdByAgentId),creatorUserName:dl?is.get(dl)?.label??null:null,creatorUserAvatarUrl:dl?is.get(dl)?.image??null:null,viaAgentName:fl?gn(fl):null,currentUserId:He,parentIdentifier:Zc?.identifier??null,parentTitle:Zc?.title??null,assigneeContent:(0,a.jsxs)(ws,{open:Ye===Se.id,onOpenChange:r(Ue=>{xt(Ue?Se.id:null),Ue||Kt("")},"onOpenChange"),children:[(0,a.jsx)(ys,{asChild:!0,children:(0,a.jsx)("button",{className:"flex w-full shrink-0 items-center overflow-hidden rounded-md px-2 py-1 transition-colors hover:bg-bg-3/50",onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation()},"onClick"),children:Se.assigneeAgentId&&gn(Se.assigneeAgentId)?(0,a.jsx)(co,{agent:l.find(Ue=>Ue.id===Se.assigneeAgentId),size:"sm",className:"min-w-0"}):Se.assigneeUserId?(0,a.jsx)(ug,{name:Jc??"User",avatarUrl:No?.image??null,size:"sm",className:"min-w-0"}):(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-ink-3",children:[(0,a.jsx)("span",{className:"inline-flex h-6 w-6 items-center justify-center rounded-full border border-dashed border-ink-3/35 bg-bg-3/30",children:(0,a.jsx)(so,{className:"h-3.5 w-3.5"})}),"Assignee"]})})}),(0,a.jsxs)(js,{className:"w-56 p-1",align:"end",onClick:r(Ue=>Ue.stopPropagation(),"onClick"),onPointerDownOutside:r(()=>Kt(""),"onPointerDownOutside"),children:[(0,a.jsx)("input",{className:"mb-1 w-full border-b border-line bg-transparent px-2 py-1.5 text-xs outline-none placeholder:text-ink-3/50",placeholder:"Search responsible...",value:at,onChange:r(Ue=>Kt(Ue.target.value),"onChange"),autoFocus:!0}),(0,a.jsxs)("div",{className:"max-h-48 overflow-y-auto overscroll-contain",children:[(0,a.jsx)("button",{className:Y("flex w-full items-center gap-2 rounded px-2 py-1.5 text-xs hover:bg-bg-3/50",!Se.assigneeAgentId&&!Se.assigneeUserId&&"bg-bg-3"),onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation(),Ns(Se.id,null,null)},"onClick"),children:"No responsible"}),He&&(0,a.jsxs)("button",{className:Y("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-bg-3/50",Se.assigneeUserId===He&&"bg-bg-3"),onClick:r(Ue=>{Ue.preventDefault(),Ue.stopPropagation(),Ns(Se.id,null,He)},"onClick"),children:[(0,a.jsx)(so,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,a.jsx)("span",{children:"Me"})]}),(l??[]).filter(Ue=>at.trim()?Ue.name.toLowerCase().includes(at.toLowerCase()):!0).map(Ue=>(0,a.jsx)("button",{className:Y("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-bg-3/50",Se.assigneeAgentId===Ue.id&&"bg-bg-3"),onClick:r(Ea=>{Ea.preventDefault(),Ea.stopPropagation(),Ns(Se.id,Ue.id,null)},"onClick"),children:(0,a.jsx)(co,{agent:Ue,size:"sm",className:"min-w-0"})},Ue.id))]})]})]})}):void 0})},Se.id)},"renderIssueRow"),Je=P.showDateGroupSeparators&&!In?oH(P):null,At=new Date,Kn=[];let pt=null,sn=null;const An=r((Se,Hs)=>{const Ga=Ee(Se,Hs);if(Ga!==null){if(Je&&V==="task"){const Ya=BF(Je(Se),At),ba=KF(pt,Ya);ba&&Kn.push((0,a.jsx)(Jk,{label:ba},`date-sep-${Se.id}-${Ya}`)),pt=Ya}else if(Je){const Ya=uH(Je(Se),At.getTime());for(const ba of sn===null?[]:fH(sn,Ya))Kn.push((0,a.jsx)(Jk,{label:dH(ba)},`date-sep-${Se.id}-${ba}`));sn=Ya}if(Kn.push(Ga),!P.collapsedParents.includes(Se.id))for(const Ya of J.get(Se.id)??[])An(Ya,Hs+1)}},"appendIssueRow");for(const Se of W)An(Se,0);return Kn})()})]},F.key)),(sl>0||K||z)&&(0,a.jsx)("div",{className:"py-2","data-testid":"issues-load-more-sentinel",children:(0,a.jsx)("p",{className:"text-xs text-ink-3",children:z?"Loading more tasks...":sl>0?`Rendering ${Math.min(Yt,ht.length)} of ${ht.length} tasks`:"Scroll to load more tasks"})})]})]})}r(jH,"StreamlinedIssuesList");function wH(e){return e?new Date(e).toLocaleString():"Never"}r(wH,"formatLastRunTimestamp");function kH(e){return e?e.replaceAll("_"," "):null}r(kH,"formatRoutineRunStatus");function hX(e,t){return e==="archived"&&t||t?"active":"paused"}r(hX,"nextRoutineStatus");function SH({routine:e,projectById:t,agentById:s,runningRoutineId:l,statusMutationRoutineId:c,href:u,configureLabel:p="Edit",managedByLabel:f,secondaryDetails:h,runNowButton:g=!1,disableRunNow:v=!1,disableToggle:y=!1,hideArchiveAction:j=!1,divider:k=!0,selected:S=!1,selectMode:N=!1,extraMenuItems:I,onSelectChange:C,onRunNow:M,onToggleEnabled:R,onToggleArchived:_}){const D=e.status==="active",U=e.status==="archived",K=c===e.id,z=e.projectId?t.get(e.projectId)??null:null,E=e.assigneeAgentId?s.get(e.assigneeAgentId)??null:null,B=!U&&!e.assigneeAgentId,O=l===e.id||U||v;return(0,a.jsxs)(mn,{to:u,className:`group flex flex-col gap-3 px-3 py-3 transition-colors hover:bg-bg-3/50 sm:flex-row sm:items-center no-underline text-inherit${k?" border-b border-line last:border-b-0":""}`,children:[N?(0,a.jsx)("div",{className:"flex items-start pt-0.5 sm:pt-1",onClick:r(Q=>{Q.preventDefault(),Q.stopPropagation()},"onClick"),children:(0,a.jsx)("input",{type:"checkbox",className:"h-4 w-4 rounded border-line",checked:S,"aria-label":`Select ${e.title}`,onChange:r(Q=>C?.(e,Q.target.checked),"onChange")})}):null,(0,a.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,a.jsx)("span",{className:"truncate text-sm font-medium",children:e.title}),U||e.status==="paused"||B?(0,a.jsx)("span",{className:"text-xs text-ink-3",children:U?"archived":B?"draft":"paused"}):null,f?(0,a.jsx)("span",{className:"text-xs text-ink-3",children:f}):null]}),(0,a.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-ink-3",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:z?.color??"var(--project-none)"}}),(0,a.jsx)("span",{children:e.projectId?z?.name??"Unknown project":"No project"})]}),(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[e.assigneeAgentId?(0,a.jsx)(mr,{agent:{...E,id:e.assigneeAgentId},size:16,className:"h-3.5 w-3.5 shrink-0"}):null,(0,a.jsx)("span",{children:e.assigneeAgentId?E?.name??"Unknown agent":"No default agent"})]}),(0,a.jsxs)("span",{children:[wH(e.lastRun?.triggeredAt),e.lastRun?` · ${kH(e.lastRun.status)}`:""]})]}),h?(0,a.jsx)("div",{className:"text-xs text-ink-3",children:h}):null]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",onClick:r(Q=>{Q.preventDefault(),Q.stopPropagation()},"onClick"),children:[g?(0,a.jsxs)(oe,{variant:"secondary",size:"sm",disabled:O,onClick:r(()=>M(e),"onClick"),children:[(0,a.jsx)(D0,{className:"h-3.5 w-3.5"}),l===e.id?"Running...":"Run now"]}):null,(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(l1,{size:"lg",checked:D,onCheckedChange:r(()=>R(e,D),"onCheckedChange"),disabled:K||U||y,"aria-label":D?`Disable ${e.title}`:`Enable ${e.title}`}),(0,a.jsx)("span",{className:"w-12 text-xs text-ink-3",children:U?"Archived":B?"Draft":D?"On":"Off"})]}),(0,a.jsxs)(tl,{children:[(0,a.jsx)(Jr,{asChild:!0,children:(0,a.jsx)(oe,{variant:"ghost",size:"icon-sm","aria-label":`More actions for ${e.title}`,children:(0,a.jsx)(Df,{className:"h-4 w-4"})})}),(0,a.jsxs)(el,{align:"end",children:[(0,a.jsx)(Sn,{asChild:!0,children:(0,a.jsx)(mn,{to:u,children:p})}),(0,a.jsx)(Sn,{disabled:O,onClick:r(()=>M(e),"onClick"),children:l===e.id?"Running...":"Run now"}),I?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(Ii,{}),I]}):null,(0,a.jsx)(Ii,{}),(0,a.jsx)(Sn,{onClick:r(()=>R(e,D),"onClick"),disabled:K||U||y,children:D?"Pause":"Enable"}),!j&&_?(0,a.jsx)(Sn,{onClick:r(()=>_(e),"onClick"),disabled:K,children:e.status==="archived"?"Restore":"Archive"}):null]})]})]})]})}r(SH,"RoutineListRow");function NH(e){return{id:e.key,title:e.title,status:e.status,projectId:e.projectId??null,assigneeAgentId:e.assigneeAgentId??null,lastRun:e.lastRunAt||e.lastRunStatus?{triggeredAt:e.lastRunAt??null,status:e.lastRunStatus??null}:null}}r(NH,"managedRoutineToRow");function CH({routines:e,agents:t=[],projects:s=[],pluginDisplayName:l=null,emptyMessage:c="No managed routines.",runningRoutineKey:u=null,statusMutationRoutineKey:p=null,reconcilingRoutineKey:f=null,resettingRoutineKey:h=null,onRunNow:g,onToggleEnabled:v,onReconcile:y,onReset:j}){const k=new Map(t.map(N=>[N.id,N])),S=new Map(s.map(N=>[N.id,{name:N.name,color:N.color}]));return e.length===0?(0,a.jsx)("div",{className:"rounded-lg border border-line px-3 py-8 text-center text-sm text-ink-3",children:c}):(0,a.jsx)("div",{className:"rounded-lg border border-line",children:e.map(N=>{const I=NH(N),C=N.href??(N.routineId?`/routines/${N.routineId}`:"/routines"),M=N.missingRefs??[],R=!!(N.routineId&&N.resourceKey&&M.length===0),_=N.managedByPluginDisplayName??l,D=!!(y||j);return(0,a.jsxs)("div",{className:"last:[&_a]:border-b-0",children:[(0,a.jsx)(SH,{routine:I,projectById:S,agentById:k,runningRoutineId:u,statusMutationRoutineId:p,href:C,configureLabel:"Configure",managedByLabel:_?`Managed by ${_}`:null,runNowButton:!0,hideArchiveAction:!0,disableRunNow:!R,disableToggle:!R,secondaryDetails:(0,a.jsxs)("span",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[N.resourceKey?(0,a.jsx)("span",{children:N.resourceKey}):null,N.cronExpression?(0,a.jsxs)("span",{children:["Schedule ",N.cronExpression]}):null]}),onRunNow:r(()=>g?.(N),"onRunNow"),onToggleEnabled:r(()=>v?.(N,I.status==="active"),"onToggleEnabled")}),D?(0,a.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-b border-line px-3 pb-3 text-xs text-ink-3 last:border-b-0",onClick:r(U=>{U.preventDefault(),U.stopPropagation()},"onClick"),children:[(0,a.jsx)("span",{children:M.length?`Missing ${M.map(U=>`${U.resourceKind}:${U.resourceKey}`).join(", ")}`:"Routine defaults can be repaired."}),(0,a.jsxs)("span",{className:"flex items-center gap-2",children:[y?(0,a.jsx)(oe,{size:"sm",variant:"ghost",disabled:f===N.key,onClick:r(()=>y(N),"onClick"),children:f===N.key?"Reconciling...":"Reconcile"}):null,j?(0,a.jsx)(oe,{size:"sm",variant:"ghost",disabled:h===N.key,onClick:r(()=>j(N),"onClick"),children:h===N.key?"Resetting...":"Reset"}):null]})]}):null]},N.key)})})}r(CH,"ManagedRoutinesList");function tS(e){return new Set(e??[])}r(tS,"toPathSet");function AH({expandedPaths:e,checkedPaths:t,selectedFile:s=null,showCheckboxes:l=!1,onToggleDir:c,onSelectFile:u,...p}){return(0,x.createElement)(n9,{...p,selectedFile:s,expandedDirs:tS(e),checkedFiles:t?tS(t):void 0,showCheckboxes:l,onToggleDir:c??(()=>{}),onSelectFile:u??(()=>{})})}r(AH,"PluginSdkFileTree");function _H(e){const[t,s]=(0,x.useState)(null);return(0,x.useEffect)(()=>{let l=!1;return ke(()=>import("./MarkdownEditor-DAi4IIOl.js").then(c=>c.n).then(c=>{l||s(()=>c.MarkdownEditor)}),__vite__mapDeps([79,1,3,25,8,17,20,43,44,45,21,22,80,27,26,74,81,82,83,24,84,85,28,86,66,87,76,88,89,90,91,92,93])),()=>{l=!0}},[]),t?(0,x.createElement)(t,e):(0,x.createElement)("textarea",{className:e.className,value:e.value,placeholder:e.placeholder,readOnly:e.readOnly,onBlur:e.onBlur,onChange:r(l=>e.onChange(l.currentTarget.value),"onChange")})}r(_H,"PluginSdkMarkdownEditor");function EH(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""&&t!==!1))}r(EH,"compactIssueFilters");function IH({companyId:e,projectId:t=null,filters:s,viewStateKey:l="wardmote:plugin-issues-view",initialSearch:c,createIssueLabel:u,searchWithinLoadedIssues:p=!0}){const f=kn(),h=(0,x.useMemo)(()=>EH({...s??{},projectId:s?.projectId??t??void 0}),[s,t]),g=h.originKindPrefix??null,v=h.projectId??t??null,y=(0,x.useMemo)(()=>["plugins","sdk-ui","issues-list",e??"__no-company__",h],[e,h]),{data:j}=me({queryKey:$.agents.list(e??"__no-company__"),queryFn:r(()=>Ha.list(e),"queryFn"),enabled:!!e}),{data:k}=me({queryKey:$.projects.list(e??"__no-company__",{includeArchived:!0}),queryFn:r(()=>hr.list(e,{includeArchived:!0}),"queryFn"),enabled:!!e}),S=$.liveRuns(e??"__no-company__"),N=_c({companyId:e,resourceKey:"live-runs",queryKey:S,enabled:!!e,refetchInterval:!1,leaderOnly:!0}),{data:I,dataUpdatedAt:C}=me({queryKey:S,queryFn:r(()=>zf.liveRunsForCompany(e),"queryFn"),enabled:N.enabled,refetchInterval:N.refetchInterval});Ec(N,I,C);const{data:M,isLoading:R,error:_}=me({queryKey:y,queryFn:r(()=>cn.list(e,h),"queryFn"),enabled:!!e}),D=(0,x.useMemo)(()=>E9(I,M),[M,I]),U=Bt({mutationFn:r(({id:K,data:z})=>cn.update(K,z),"mutationFn"),onSuccess:r(()=>{e&&(f.invalidateQueries({queryKey:["plugins","sdk-ui","issues-list",e]}),f.invalidateQueries({queryKey:$.issues.list(e)}),v&&(f.invalidateQueries({queryKey:$.issues.listByProject(e,v)}),g&&f.invalidateQueries({queryKey:$.issues.listPluginOperationsByProject(e,v,g)})))},"onSuccess")});return e?(0,x.createElement)(yH,{issues:M??[],isLoading:R,error:_,agents:j,projects:k,liveIssueIds:D,projectId:v??void 0,viewStateKey:l,initialSearch:c,createIssueLabel:u,searchWithinLoadedIssues:p,onUpdateIssue:r((K,z)=>U.mutate({id:K,data:z}),"onUpdateIssue")}):(0,x.createElement)("div",{className:"text-sm text-ink-3"},"Select an organization to view tasks.")}r(IH,"PluginSdkIssuesList");function TH({companyId:e,value:t,onChange:s,placeholder:l="Responsible",noneLabel:c="No responsible",searchPlaceholder:u="Search responsible...",emptyMessage:p="No responsible found.",includeUsers:f=!0,includeTerminatedAgents:h=!1,className:g,onConfirm:v}){const y=z0(),j=e??y.companyId??null,{data:k}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),enabled:f}),S=k?.user?.id??k?.session?.userId??null,{data:N}=me({queryKey:$.agents.list(j??"__no-company__"),queryFn:r(()=>Ha.list(j),"queryFn"),enabled:!!j}),{data:I}=me({queryKey:$.access.companyUserDirectory(j??"__no-company__"),queryFn:r(()=>ti.listUserDirectory(j),"queryFn"),enabled:!!j&&f}),C=(0,x.useMemo)(()=>xg(),[]),M=(0,x.useMemo)(()=>C.map(K=>K.startsWith("agent:")?K.slice(6):null).filter(K=>!!K),[C]),R=(0,x.useMemo)(()=>r1((N??[]).filter(K=>h||K.status!=="terminated"),M),[N,h,M]),_=(0,x.useMemo)(()=>[...f?e1(S):[],...f?fA(I?.users,{excludeUserIds:[S]}):[],...R.map(K=>({id:Kr({assigneeAgentId:K.id}),label:K.name,searchText:`${K.name} ${K.role} ${K.title??""}`}))],[I?.users,S,f,R]),D=io(t),U=D.assigneeAgentId?R.find(K=>K.id===D.assigneeAgentId):null;return(0,x.createElement)(K0,{value:t,options:_,recentOptionIds:C,placeholder:l,noneLabel:c,searchPlaceholder:u,emptyMessage:p,className:g,onConfirm:v,onChange:r(K=>{const z=io(K);z.assigneeAgentId&&tf(z.assigneeAgentId),z.assigneeUserId&&ef(z.assigneeUserId),s(K,z)},"onChange"),renderTriggerValue:r(K=>K?U?(0,x.createElement)(Cf,null,(0,x.createElement)(lg,{icon:U.icon,className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,x.createElement)("span",{className:"truncate"},K.label)):(0,x.createElement)("span",{className:"truncate"},K.label):(0,x.createElement)("span",{className:"text-ink-3"},l),"renderTriggerValue"),renderOption:r(K=>{if(!K.id)return(0,x.createElement)("span",{className:"truncate"},K.label);const z=io(K.id),E=z.assigneeAgentId?R.find(B=>B.id===z.assigneeAgentId):null;return(0,x.createElement)(Cf,null,E?(0,x.createElement)(lg,{icon:E.icon,className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):(0,x.createElement)(so,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,x.createElement)("span",{className:"truncate"},K.label))},"renderOption")})}r(TH,"PluginSdkAssigneePicker");function RH({companyId:e,value:t,onChange:s,placeholder:l="Project",noneLabel:c="No project",searchPlaceholder:u="Search projects...",emptyMessage:p="No projects found.",includeArchived:f=!1,className:h,onConfirm:g}){const v=z0(),y=e??v.companyId??null,{data:j}=me({queryKey:$.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),k=j?.user?.id??j?.session?.userId??null,{data:S}=me({queryKey:$.projects.list(y??"__no-company__",{includeArchived:f}),queryFn:r(()=>hr.list(y,{includeArchived:f}),"queryFn"),enabled:!!y}),N=(0,x.useMemo)(()=>(S??[]).filter(_=>f||!_.archivedAt),[f,S]),{orderedProjects:I}=mA({projects:N,companyId:y,userId:k}),C=(0,x.useMemo)(()=>Og(),[]),M=(0,x.useMemo)(()=>I.map(_=>({id:_.id,label:_.name,searchText:_.description??""})),[I]),R=I.find(_=>_.id===t)??null;return(0,x.createElement)(K0,{value:t,options:M,recentOptionIds:C,placeholder:l,noneLabel:c,searchPlaceholder:u,emptyMessage:p,className:h,onConfirm:g,onChange:r(_=>{_&&mf(_),s(_)},"onChange"),renderTriggerValue:r(_=>!_||!R?(0,x.createElement)("span",{className:"text-ink-3"},l):(0,x.createElement)(Cf,null,(0,x.createElement)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:R.color??"#6366f1"}}),(0,x.createElement)("span",{className:"truncate"},_.label)),"renderTriggerValue"),renderOption:r(_=>{if(!_.id)return(0,x.createElement)("span",{className:"truncate"},_.label);const D=I.find(U=>U.id===_.id);return(0,x.createElement)(Cf,null,(0,x.createElement)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:D?.color??"#6366f1"}}),(0,x.createElement)("span",{className:"truncate"},_.label))},"renderOption")})}r(RH,"PluginSdkProjectPicker");function Cf({children:e}){return(0,x.createElement)("span",{className:"contents"},e)}r(Cf,"FragmentSafe");function MH({label:e,status:t}){const s={ok:"border-emerald-300 bg-emerald-50 text-emerald-700",warning:"border-amber-300 bg-amber-50 text-amber-800",error:"border-red-300 bg-red-50 text-red-700",info:"border-slate-300 bg-slate-50 text-slate-700",pending:"border-slate-300 bg-slate-50 text-slate-600"}[t];return(0,x.createElement)("span",{className:`inline-flex w-fit items-center rounded-full border px-2 py-0.5 text-xs font-medium ${s}`},e)}r(MH,"PluginSdkStatusBadge");function DH({columns:e,rows:t,loading:s,emptyMessage:l="No rows."}){if(s)return(0,x.createElement)("div",{className:"text-sm text-ink-3"},"Loading...");if(!t.length)return(0,x.createElement)("div",{className:"text-sm text-ink-3"},l);const c=e.map(u=>u.width??"minmax(0, 1fr)").join(" ");return(0,x.createElement)("div",{className:"overflow-hidden rounded-md border"},(0,x.createElement)("div",{className:"hidden border-b bg-bg-3/35 px-3 py-2 text-xs font-medium uppercase tracking-wide text-ink-3 md:grid md:[grid-template-columns:var(--plugin-grid-cols)]",style:{"--plugin-grid-cols":c}},e.map(u=>(0,x.createElement)("div",{key:u.key},u.header))),(0,x.createElement)("div",{className:"divide-y"},t.map((u,p)=>(0,x.createElement)("div",{key:String(u.id??p),className:"grid gap-2 px-3 py-3 md:items-center md:[grid-template-columns:var(--plugin-grid-cols)]",style:{"--plugin-grid-cols":c}},e.map(f=>(0,x.createElement)("div",{key:f.key,className:"min-w-0 text-sm"},(0,x.createElement)("div",{className:"mb-1 text-[11px] font-medium uppercase tracking-wide text-ink-3 md:hidden"},f.header),f.render?f.render(u[f.key],u):String(u[f.key]??"")))))))}r(DH,"PluginSdkDataTable");function OH({pairs:e}){return(0,x.createElement)("dl",{className:"grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[max-content_minmax(0,1fr)]"},e.flatMap(t=>[(0,x.createElement)("dt",{key:`${t.label}:label`,className:"text-ink-3"},t.label),(0,x.createElement)("dd",{key:`${t.label}:value`,className:"min-w-0"},t.value)]))}r(OH,"PluginSdkKeyValueList");function LH({label:e,value:t,unit:s}){return(0,x.createElement)("div",{className:"rounded-md border bg-bg-2 p-3"},(0,x.createElement)("div",{className:"text-xs font-medium uppercase tracking-wide text-ink-3"},e),(0,x.createElement)("div",{className:"mt-1 text-lg font-semibold"},`${t}${s??""}`))}r(LH,"PluginSdkMetricCard");function zH({data:e}){return(0,x.createElement)("pre",{className:"max-h-80 overflow-auto rounded-md border bg-bg-3/30 p-2 text-xs"},JSON.stringify(e,null,2))}r(zH,"PluginSdkJsonTree");function PH({label:e="Loading"}){return(0,x.createElement)("span",{className:"inline-block h-3.5 w-3.5 animate-spin rounded-full border-2 border-ink-3/30 border-t-ink align-middle",role:"status","aria-label":e})}r(PH,"PluginSdkSpinner");var $H=class extends x.Component{static{r(this,"PluginSdkErrorBoundary")}state={hasError:!1};static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?this.props.fallback??(0,x.createElement)("div",{className:"rounded-md border border-bad/30 p-3 text-sm text-bad"},"Plugin UI failed to render."):this.props.children}};function UH(e,t){globalThis.__wardmotePluginBridge__={react:e,reactJsxRuntime:a,reactDom:t,sdkUi:{usePluginData:mT,usePluginAction:pT,useHostContext:z0,useHostLocation:hT,useHostNavigation:yT,usePluginStream:xT,usePluginToast:gT,copyTextToClipboard:q0,MarkdownBlock:r(({content:s,className:l,enableWikiLinks:c,wikiLinkRoot:u,resolveWikiLinkHref:p})=>(0,x.createElement)(i3,{className:l,softBreaks:!1,enableWikiLinks:c,wikiLinkRoot:u,resolveWikiLinkHref:p,children:s}),"MarkdownBlock"),MetricCard:LH,StatusBadge:MH,DataTable:DH,KeyValueList:OH,JsonTree:zH,Spinner:PH,ErrorBoundary:$H,MarkdownEditor:_H,FileTree:AH,IssuesList:IH,AssigneePicker:TH,ProjectPicker:RH,ManagedRoutinesList:CH}}}r(UH,"initPluginBridge");var BH=1e4;function KH(e=BH){if(typeof performance>"u"||typeof performance.clearMeasures!="function")return()=>{};const s=setInterval(r(()=>{globalThis.__wardmoteKeepPerfMeasures||performance.clearMeasures()},"reap"),e);return()=>clearInterval(s)}r(KH,"startPerfMeasureReaper");var qH=go((e=>{function t(X,A){var ee=X.length;X.push(A);e:for(;0<ee;){var ie=ee-1>>>1,le=X[ie];if(0<c(le,A))X[ie]=A,X[ee]=le,ee=ie;else break e}}r(t,"push");function s(X){return X.length===0?null:X[0]}r(s,"peek");function l(X){if(X.length===0)return null;var A=X[0],ee=X.pop();if(ee!==A){X[0]=ee;e:for(var ie=0,le=X.length,Ae=le>>>1;ie<Ae;){var de=2*(ie+1)-1,we=X[de],ye=de+1,Me=X[ye];if(0>c(we,ee))ye<le&&0>c(Me,we)?(X[ie]=Me,X[ye]=ee,ie=ye):(X[ie]=we,X[de]=ee,ie=de);else if(ye<le&&0>c(Me,ee))X[ie]=Me,X[ye]=ee,ie=ye;else break e}}return A}r(l,"pop");function c(X,A){var ee=X.sortIndex-A.sortIndex;return ee!==0?ee:X.id-A.id}if(r(c,"compare"),e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var u=performance;e.unstable_now=function(){return u.now()}}else{var p=Date,f=p.now();e.unstable_now=function(){return p.now()-f}}var h=[],g=[],v=1,y=null,j=3,k=!1,S=!1,N=!1,I=!1,C=typeof setTimeout=="function"?setTimeout:null,M=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function _(X){for(var A=s(g);A!==null;){if(A.callback===null)l(g);else if(A.startTime<=X)l(g),A.sortIndex=A.expirationTime,t(h,A);else break;A=s(g)}}r(_,"advanceTimers");function D(X){if(N=!1,_(X),!S)if(s(h)!==null)S=!0,U||(U=!0,Q());else{var A=s(g);A!==null&&ce(D,A.startTime-X)}}r(D,"handleTimeout");var U=!1,K=-1,z=5,E=-1;function B(){return I?!0:!(e.unstable_now()-E<z)}r(B,"shouldYieldToHost");function O(){if(I=!1,U){var X=e.unstable_now();E=X;var A=!0;try{e:{S=!1,N&&(N=!1,M(K),K=-1),k=!0;var ee=j;try{t:{for(_(X),y=s(h);y!==null&&!(y.expirationTime>X&&B());){var ie=y.callback;if(typeof ie=="function"){y.callback=null,j=y.priorityLevel;var le=ie(y.expirationTime<=X);if(X=e.unstable_now(),typeof le=="function"){y.callback=le,_(X),A=!0;break t}y===s(h)&&l(h),_(X)}else l(h);y=s(h)}if(y!==null)A=!0;else{var Ae=s(g);Ae!==null&&ce(D,Ae.startTime-X),A=!1}}break e}finally{y=null,j=ee,k=!1}A=void 0}}finally{A?Q():U=!1}}}r(O,"performWorkUntilDeadline");var Q;if(typeof R=="function")Q=r(function(){R(O)},"schedulePerformWorkUntilDeadline");else if(typeof MessageChannel<"u"){var V=new MessageChannel,ue=V.port2;V.port1.onmessage=O,Q=r(function(){ue.postMessage(null)},"schedulePerformWorkUntilDeadline")}else Q=r(function(){C(O,0)},"schedulePerformWorkUntilDeadline");function ce(X,A){K=C(function(){X(e.unstable_now())},A)}r(ce,"requestHostTimeout"),e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(X){X.callback=null},e.unstable_forceFrameRate=function(X){0>X||125<X||(z=0<X?Math.floor(1e3/X):5)},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_next=function(X){switch(j){case 1:case 2:case 3:var A=3;break;default:A=j}var ee=j;j=A;try{return X()}finally{j=ee}},e.unstable_requestPaint=function(){I=!0},e.unstable_runWithPriority=function(X,A){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var ee=j;j=X;try{return A()}finally{j=ee}},e.unstable_scheduleCallback=function(X,A,ee){var ie=e.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ie+ee:ie):ee=ie,X){case 1:var le=-1;break;case 2:le=250;break;case 5:le=1073741823;break;case 4:le=1e4;break;default:le=5e3}return le=ee+le,X={id:v++,callback:A,priorityLevel:X,startTime:ee,expirationTime:le,sortIndex:-1},ee>ie?(X.sortIndex=ee,t(g,X),s(h)===null&&X===s(g)&&(N?(M(K),K=-1):N=!0,ce(D,ee-ie))):(X.sortIndex=le,t(h,X),S||k||(S=!0,U||(U=!0,Q()))),X},e.unstable_shouldYield=B,e.unstable_wrapCallback=function(X){var A=j;return function(){var ee=j;j=A;try{return X.apply(this,arguments)}finally{j=ee}}}})),FH=go(((e,t)=>{t.exports=qH()})),HH=go((e=>{var t=FH(),s=j0(),l=oS();function c(n){var i="https://react.dev/errors/"+n;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)i+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}r(c,"formatProdErrorMessage");function u(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}r(u,"isValidContainer");function p(n){var i=n,o=n;if(n.alternate)for(;i.return;)i=i.return;else{n=i;do i=n,(i.flags&4098)!==0&&(o=i.return),n=i.return;while(n)}return i.tag===3?o:null}r(p,"getNearestMountedFiber");function f(n){if(n.tag===13){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}r(f,"getSuspenseInstanceFromFiber");function h(n){if(n.tag===31){var i=n.memoizedState;if(i===null&&(n=n.alternate,n!==null&&(i=n.memoizedState)),i!==null)return i.dehydrated}return null}r(h,"getActivityInstanceFromFiber");function g(n){if(p(n)!==n)throw Error(c(188))}r(g,"assertIsMounted");function v(n){var i=n.alternate;if(!i){if(i=p(n),i===null)throw Error(c(188));return i!==n?null:n}for(var o=n,d=i;;){var m=o.return;if(m===null)break;var b=m.alternate;if(b===null){if(d=m.return,d!==null){o=d;continue}break}if(m.child===b.child){for(b=m.child;b;){if(b===o)return g(m),n;if(b===d)return g(m),i;b=b.sibling}throw Error(c(188))}if(o.return!==d.return)o=m,d=b;else{for(var w=!1,T=m.child;T;){if(T===o){w=!0,o=m,d=b;break}if(T===d){w=!0,d=m,o=b;break}T=T.sibling}if(!w){for(T=b.child;T;){if(T===o){w=!0,o=b,d=m;break}if(T===d){w=!0,d=b,o=m;break}T=T.sibling}if(!w)throw Error(c(189))}}if(o.alternate!==d)throw Error(c(190))}if(o.tag!==3)throw Error(c(188));return o.stateNode.current===o?n:i}r(v,"findCurrentFiberUsingSlowPath");function y(n){var i=n.tag;if(i===5||i===26||i===27||i===6)return n;for(n=n.child;n!==null;){if(i=y(n),i!==null)return i;n=n.sibling}return null}r(y,"findCurrentHostFiberImpl");var j=Object.assign,k=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),I=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),_=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),Q=Symbol.iterator;function V(n){return n===null||typeof n!="object"?null:(n=Q&&n[Q]||n["@@iterator"],typeof n=="function"?n:null)}r(V,"getIteratorFn");var ue=Symbol.for("react.client.reference");function ce(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ue?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case I:return"Fragment";case M:return"Profiler";case C:return"StrictMode";case U:return"Suspense";case K:return"SuspenseList";case B:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case N:return"Portal";case _:return n.displayName||"Context";case R:return(n._context.displayName||"Context")+".Consumer";case D:var i=n.render;return n=n.displayName,n||(n=i.displayName||i.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case z:return i=n.displayName||null,i!==null?i:ce(n.type)||"Memo";case E:i=n._payload,n=n._init;try{return ce(n(i))}catch{}}return null}r(ce,"getComponentNameFromType");var X=Array.isArray,A=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ie={pending:!1,data:null,method:null,action:null},le=[],Ae=-1;function de(n){return{current:n}}r(de,"createCursor");function we(n){0>Ae||(n.current=le[Ae],le[Ae]=null,Ae--)}r(we,"pop");function ye(n,i){Ae++,le[Ae]=n.current,n.current=i}r(ye,"push");var Me=de(null),he=de(null),ve=de(null),et=de(null);function $e(n,i){switch(ye(ve,i),ye(he,n),ye(Me,null),i.nodeType){case 9:case 11:n=(n=i.documentElement)&&(n=n.namespaceURI)?py(n):0;break;default:if(n=i.tagName,i=i.namespaceURI)i=py(i),n=my(i,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}we(Me),ye(Me,n)}r($e,"pushHostContainer");function Ie(){we(Me),we(he),we(ve)}r(Ie,"popHostContainer");function ct(n){n.memoizedState!==null&&ye(et,n);var i=Me.current,o=my(i,n.type);i!==o&&(ye(he,n),ye(Me,o))}r(ct,"pushHostContext");function He(n){he.current===n&&(we(Me),we(he)),et.current===n&&(we(et),ic._currentValue=ie)}r(He,"popHostContext");var vt,Jt;function ge(n){if(vt===void 0)try{throw Error()}catch(o){var i=o.stack.trim().match(/\n( *(at )?)/);vt=i&&i[1]||"",Jt=-1<o.stack.indexOf(`
|
|
60
60
|
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
61
61
|
`+vt+n+Jt}r(ge,"describeBuiltInComponentFrame");var Oe=!1;function De(n,i){if(!n||Oe)return"";Oe=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:r(function(){try{if(i){var xe=r(function(){throw Error()},"Fake");if(Object.defineProperty(xe.prototype,"props",{set:r(function(){throw Error()},"set")}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(re){var ae=re}Reflect.construct(n,[],xe)}else{try{xe.call()}catch(re){ae=re}n.call(xe.prototype)}}else{try{throw Error()}catch(re){ae=re}(xe=n())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(re){if(re&&ae&&typeof re.stack=="string")return[re.stack,ae.stack]}return[null,null]},"DetermineComponentFrameRoot")};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=d.DetermineComponentFrameRoot(),w=b[0],T=b[1];if(w&&T){var q=w.split(`
|