@tickernelz/wardmote-ui 2026.1114.3 → 2026.1115.0
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/AccessSelectIdentity-BDYx1ZfF.js +1 -0
- package/dist/assets/AdapterManager-Dr6HMn6m.js +1 -0
- package/dist/assets/AdvancedToolsRoute-BtrEJ8Kl.js +39 -0
- package/dist/assets/AgentActionButtons-GqegemnQ.js +1 -0
- package/dist/assets/AgentAvatar-CHxCQtX1.js +1 -0
- package/dist/assets/AgentBubbleActionRow-DDep61nY.js +1 -0
- package/dist/assets/AgentCharacter-DpdNYKTX.js +2 -0
- package/dist/assets/AgentChat-BwT6gtxl.js +1 -0
- package/dist/assets/AgentChats-C7Wny5Xo.js +1 -0
- package/dist/assets/AgentDefaults-Cs5Bf0J-.js +1 -0
- package/dist/assets/AgentDetail-FzlEvgyi.js +38 -0
- package/dist/assets/AgentIconPicker-CDdlpWlV.js +1 -0
- package/dist/assets/AgentIdentity-C6wmi_qi.js +1 -0
- package/dist/assets/AgentMailCredentialField-DTevbVmi.js +1 -0
- package/dist/assets/AgentMultiSelect-isF4VAOe.js +1 -0
- package/dist/assets/AgentRoleEditor-DALs_S3f.js +1 -0
- package/dist/assets/AgentSetupPrompt-mJfq45rR.js +30 -0
- package/dist/assets/AgentTodoCard-DofAPWmu.js +1 -0
- package/dist/assets/Agents-CmauHEC_.js +3 -0
- package/dist/assets/AppDetail-C61JaJyi.js +5 -0
- package/dist/assets/AppLogo-Da6J2kSR.js +1 -0
- package/dist/assets/AppNotConnected-CiM1HSNo.js +1 -0
- package/dist/assets/ApprovalCard-C-z6ovlE.js +1 -0
- package/dist/assets/ApprovalDetail-DvGLSlDB.js +1 -0
- package/dist/assets/ApprovalPayload-VYiHqD4m.js +1 -0
- package/dist/assets/Approvals-D7h2H_sr.js +1 -0
- package/dist/assets/AppsConnect-BV3-Loxz.js +1 -0
- package/dist/assets/AppsReview-CbER22st.js +1 -0
- package/dist/assets/ArtifactCard-BewPtFvc.js +1 -0
- package/dist/assets/Artifacts-DvVv2IJk.js +1 -0
- package/dist/assets/AssistantConnection-hL02uszq.js +1 -0
- package/dist/assets/AttentionInteractionResolver-qHNl_xbV.js +1 -0
- package/dist/assets/AuditHub-nt7z4iFD.js +1 -0
- package/dist/assets/Auth-BB7VP3fC.js +3 -0
- package/dist/assets/BoardChat-BNCmqJXx.js +18 -0
- package/dist/assets/BoardClaim-Cy6RXIcK.js +1 -0
- package/dist/assets/BootstrapSetupUxLab-Dx7dsqL7.js +1 -0
- package/dist/assets/BreadcrumbContext-BKgeE2st.js +1 -0
- package/dist/assets/Browse-CSoDYBmL.js +1 -0
- package/dist/assets/BudgetPolicyCard-CvjxMT7D.js +1 -0
- package/dist/assets/CaseDetail-DLWFPO4F.js +2 -0
- package/dist/assets/CaseIdentifierKey-Bxj5DIwm.js +1 -0
- package/dist/assets/Cases-DVrVJGhT.js +2 -0
- package/dist/assets/ChatEndpointDetail-BtVesRM4.js +5 -0
- package/dist/assets/ChatEndpointSetup-aBQTEbNQ.js +1 -0
- package/dist/assets/ChatIdentityConfirm-BzwwLyfO.js +1 -0
- package/dist/assets/ChoiceControls-CyXp9WJX.js +1 -0
- package/dist/assets/CliAuth-CyZ8-Woi.js +1 -0
- package/dist/assets/CommentAttributionChip-CojGGiYj.js +1 -0
- package/dist/assets/Companies-NQZfEwC5.js +1 -0
- package/dist/assets/CompanyAccess-FyXDsh86.js +1 -0
- package/dist/assets/CompanyActivity-BJv98EGz.js +1 -0
- package/dist/assets/CompanyConnections-XcsFcJNb.js +1 -0
- package/dist/assets/CompanyContext-dsHNbwL5.js +1 -0
- package/dist/assets/CompanyEnvironments-iFBbTOTj.js +3 -0
- package/dist/assets/CompanyExport-xlMYiY7S.js +4 -0
- package/dist/assets/CompanyImport-CfVS727g.js +1 -0
- package/dist/assets/CompanySettings-CkI5BPE7.js +1 -0
- package/dist/assets/CompanySettingsPluginPage-CHfwGrSy.js +1 -0
- package/dist/assets/CompanySkills-DRYlbEIw.js +10 -0
- package/dist/assets/ComposerAddMenu-DE7U8fwA.js +3 -0
- package/dist/assets/ConfigureBuiltInAgentModal-CPTKswQX.js +1 -0
- package/dist/assets/ConnectionSetupFlow-CVuuI_IB.js +40 -0
- package/dist/assets/CopyText-_f1fNkU9.js +1 -0
- package/dist/assets/CopyableGatewayUrl-C5DM-jlb.js +1 -0
- package/dist/assets/CrossIssueCollaborationUxLab-tDhS-jq4.js +1 -0
- package/dist/assets/Dashboard-CsWdlf2w.js +2 -0
- package/dist/assets/DecisionDateChips-CKGOW4lI.js +1 -0
- package/dist/assets/DecisionModelSettings-CRU_tFiW.js +1 -0
- package/dist/assets/DecisionQueuePage-B-d23vhE.js +1 -0
- package/dist/assets/DesignGuide-C6pUE0g8.js +23 -0
- package/dist/assets/DocumentFrameHeader-DJxQSrVU.js +1 -0
- package/dist/assets/EmailConnectionAccess-Bmzjruyw.js +1 -0
- package/dist/assets/EmailEndpointSetup-tb-MwAeF.js +1 -0
- package/dist/assets/EnforcementBanner-CvSlJnT3.js +1 -0
- package/dist/assets/EntityRow-B_hi0SpF.js +1 -0
- package/dist/assets/ExecutionWorkspaceDetail-DeGCUx0Z.js +19 -0
- package/dist/assets/FilterBar-B0Ky4IKW.js +1 -0
- package/dist/assets/FoldCurtain-DpaCBMQq.js +1 -0
- package/dist/assets/FolderControls-Bnct9FlN.js +1 -0
- package/dist/assets/GatewayDetail-C1azJf5O.js +2 -0
- package/dist/assets/GatewaysList-C5G4t9_s.js +1 -0
- package/dist/assets/GoalDetail-CI3GJljQ.js +1 -0
- package/dist/assets/GoalTree-DSJRz3A3.js +1 -0
- package/dist/assets/Goals-BD7j5fQ-.js +1 -0
- package/dist/assets/Identity-D6-4ufCa.js +1 -0
- package/dist/assets/ImageGalleryModal-DYawBp7o.js +1 -0
- package/dist/assets/Inbox-D31eIx5B.js +2 -0
- package/dist/assets/InlineBanner-BxYdCuGP.js +1 -0
- package/dist/assets/InlineEditor-CDKgapVj.js +1 -0
- package/dist/assets/InlineEntitySelector-DcWijm3s.js +1 -0
- package/dist/assets/InstanceAccess-DGzXC0Xl.js +1 -0
- package/dist/assets/InstanceAdvanced-xrGokT-A.js +1 -0
- package/dist/assets/InstanceFeatures-Dh9AJ16M.js +1 -0
- package/dist/assets/InviteLanding-SBgzJ00W.js +1 -0
- package/dist/assets/IssueChatLongThreadPerf-C8RVTu9g.js +2 -0
- package/dist/assets/IssueChatThread-D_ke-NXX.js +40 -0
- package/dist/assets/IssueDetail-D6t6W3vf.js +9 -0
- package/dist/assets/IssueDocumentAnnotations-BusZRPJz.js +2 -0
- package/dist/assets/IssueOutputSection-DbSjLJ0z.js +1 -0
- package/dist/assets/IssueRecoveryActionCard--s2DeVTI.js +1 -0
- package/dist/assets/IssueReferencePill-CrbkBko3.js +1 -0
- package/dist/assets/IssueThreadInteractionCard-CEOm3Nou.js +9 -0
- package/dist/assets/IssueWriteDenialNotice-BSocbA8i.js +1 -0
- package/dist/assets/Issues-D87QBALw.js +5 -0
- package/dist/assets/JoinRequestQueue-m5g8CeX_.js +1 -0
- package/dist/assets/JsonSchemaForm-DcMqKoRk.js +1 -0
- package/dist/assets/LiveNowTodoLine-4_fha7LL.js +1 -0
- package/dist/assets/ManagedAiConnectionDetails-BvECa_4J.js +1 -0
- package/dist/assets/MarkdownBody-DneqWO_F.js +16 -0
- package/dist/assets/MarkdownEditor-Dop0pvpQ.js +85 -0
- package/dist/assets/McpConnect-B6lgmV49.js +1 -0
- package/dist/assets/MembershipAction-lxyNE6cV.js +1 -0
- package/dist/assets/MetricCard-C65n44vu.js +1 -0
- package/dist/assets/MissingPluginTabPlaceholder-DzxTVHCm.js +1 -0
- package/dist/assets/ModelsAndProviders-Cf5ywcp6.js +1 -0
- package/dist/assets/MootMark-Cw1oipfs.js +1 -0
- package/dist/assets/NewAgent-DIm04W61.js +1 -0
- package/dist/assets/OmpAllSettings-BN_03A5F.js +1 -0
- package/dist/assets/OpenwaGatewayManager-CR2JaccN.js +2 -0
- package/dist/assets/PathInstructionsModal-BJj8D16I.js +1 -0
- package/dist/assets/PipelineSettings-DJ3wPyS6.js +2 -0
- package/dist/assets/Pipelines-DGmfqNxF.js +1 -0
- package/dist/assets/PixelsOffice-IvHoOjLi.js +2 -0
- package/dist/assets/PluginManager-CCLKIrQH.js +1 -0
- package/dist/assets/PluginPage-BPjyJHry.js +1 -0
- package/dist/assets/PluginSettings-BOAe2lNP.js +1 -0
- package/dist/assets/ProfileDetailRoute-BtPWhwsL.js +1 -0
- package/dist/assets/ProfileSettings-nUyykb7U.js +1 -0
- package/dist/assets/ProfileWizardRoute-BgmALebB.js +1 -0
- package/dist/assets/ProjectDetail-Sc5w75pl.js +1 -0
- package/dist/assets/ProjectWorkspaceDetail-DddXh8vS.js +29 -0
- package/dist/assets/ProjectWorkspacesContent-BDjk8_xt.js +1 -0
- package/dist/assets/Projects-CI3qDhpS.js +1 -0
- package/dist/assets/PublicIssueSharePage-DwYXZzxO.js +1 -0
- package/dist/assets/QuestionForm-CichUYOX.js +7 -0
- package/dist/assets/QuotaBar-BGCW-X3-.js +1 -0
- package/dist/assets/RepositoryEditor-DjowAt7s.js +1 -0
- package/dist/assets/ResponsibleUserDenialNotice-Bln16DNY.js +1 -0
- package/dist/assets/ResponsibleUserDenialUxLab-D7OT10CT.js +1 -0
- package/dist/assets/ReviewQueueCard-DOmPi2Sh.js +1 -0
- package/dist/assets/RichWorkProductCard-DR1nS1PX.js +1 -0
- package/dist/assets/RoutineActivityRow-FRpZgdY9.js +1 -0
- package/dist/assets/RoutineDetail-B3VRsS0N.js +2 -0
- package/dist/assets/RoutineRunVariablesDialog-DswRuGZ9.js +1 -0
- package/dist/assets/RoutineVariablesEditor-Donmo-Ha.js +1 -0
- package/dist/assets/Routines-Di5TG7XO.js +1 -0
- package/dist/assets/ScrollToBottom-_G56w_lV.js +1 -0
- package/dist/assets/Search-BIik4_bN.js +1 -0
- package/dist/assets/SearchableSelect-Dt_6_dds.js +1 -0
- package/dist/assets/Secrets-CHpXsGv_.js +4 -0
- package/dist/assets/SetupWizard-Bywkpo--.js +1 -0
- package/dist/assets/SidebarContext-B3wVOcP3.js +1 -0
- package/dist/assets/SidebarNavItem-DKoBWUYG.js +1 -0
- package/dist/assets/SkillBinaryFile-StCRWUUR.js +1 -0
- package/dist/assets/SkillCardIcon-DV49-Rqj.js +2 -0
- package/dist/assets/SkillSourceTree-DggH4IBB.js +2 -0
- package/dist/assets/SkillSources-DfT7WFOQ.js +2 -0
- package/dist/assets/SkillStudio-CRelTbZ8.js +9 -0
- package/dist/assets/SourceTrustBadge-DVLJ7ZD_.js +1 -0
- package/dist/assets/StatusCards-DpkFy5MW.js +1 -0
- package/dist/assets/StatusIcon-DQw2SvHx.js +1 -0
- package/dist/assets/SummarySlotCard-DrD7ZUGg.js +1 -0
- package/dist/assets/TaskChatComposerTakeoverContext-CDZizi4n.js +1 -0
- package/dist/assets/TaskChatLab-DEU_p6uP.js +11 -0
- package/dist/assets/TaskChatMarker-CIi5LTz5.js +2 -0
- package/dist/assets/TaskChatProtocolCard-914r9_hc.js +1 -0
- package/dist/assets/TaskChatThreadView-Cg1OemFt.js +4 -0
- package/dist/assets/TaskTreeControls-CxIqDyig.js +3 -0
- package/dist/assets/Terminal-BbK63NvM.js +1 -0
- package/dist/assets/TerminalView-rL43P2cd.js +58 -0
- package/dist/assets/ThemeContext-VwmgZV3v.js +1 -0
- package/dist/assets/ThemeToggle-zSm7ZVJQ.js +1 -0
- package/dist/assets/ToastContext-Brs-4k-1.js +1 -0
- package/dist/assets/ToolsAdminGate-r7j5MzHI.js +1 -0
- package/dist/assets/TrustPresetSection-Clyy_toY.js +1 -0
- package/dist/assets/UserProfile-DPol1TV3.js +1 -0
- package/dist/assets/WebhookUrlWarning-DL5kWPiZ.js +1 -0
- package/dist/assets/WhatNeedsMe-CgUifJfF.js +1 -0
- package/dist/assets/WorkspaceRuntimeControls-C-Iz5m02.js +1 -0
- package/dist/assets/Workspaces-VvtqZaqn.js +1 -0
- package/dist/assets/access-GBXLU9Vk.js +1 -0
- package/dist/assets/activity-CYcMbzsk.js +1 -0
- package/dist/assets/activity-fmxP7mpr.js +1 -0
- package/dist/assets/activity-format-DoAsbE0g.js +1 -0
- package/dist/assets/adapter-display-registry-C6GXIVXZ.js +1 -0
- package/dist/assets/adapters-CFK_eCPY.js +1 -0
- package/dist/assets/agent-avatar-url-D2n1Ozed.js +1 -0
- package/dist/assets/agent-config-primitives-Cs7txZkg.js +1 -0
- package/dist/assets/agentChats-B6eLnzJT.js +1 -0
- package/dist/assets/agents-B46GLJqX.js +1 -0
- package/dist/assets/alert-dialog-BvLBb6EL.js +1 -0
- package/dist/assets/app-connect-policy-BuNz5ikd.js +1 -0
- package/dist/assets/archive-CJfzKyJd.js +1 -0
- package/dist/assets/archive-restore-Bu12jvK6.js +1 -0
- package/dist/assets/arrow-down-Ci2NVHDm.js +1 -0
- package/dist/assets/arrow-down-left-Dk2oXKyh.js +1 -0
- package/dist/assets/arrow-left-C6eRcImQ.js +1 -0
- package/dist/assets/arrow-right-rIiVMAiv.js +1 -0
- package/dist/assets/arrow-up-Dnv0YU10.js +1 -0
- package/dist/assets/arrow-up-down-DYp2VJib.js +1 -0
- package/dist/assets/arrow-up-right-BWJhDk_Y.js +1 -0
- package/dist/assets/artifacts-BwKfWH9Y.js +1 -0
- package/dist/assets/assets-CcTyp_pK.js +1 -0
- package/dist/assets/attachment-icon-CABmZCE-.js +1 -0
- package/dist/assets/avatar-DWrtTUFj.js +1 -0
- package/dist/assets/badge-Bw9Yv7_W.js +1 -0
- package/dist/assets/badge-check-C3SQez1U.js +1 -0
- package/dist/assets/book-open-amuA6uFy.js +1 -0
- package/dist/assets/bot-DRofiPdb.js +1 -0
- package/dist/assets/boxes-5gvA2uo8.js +1 -0
- package/dist/assets/braces-C5ZUDIxe.js +1 -0
- package/dist/assets/browser-use-BILV_BYD.js +1 -0
- package/dist/assets/budgets-DZOWP4Hh.js +1 -0
- package/dist/assets/button-bS07vQAg.js +1 -0
- package/dist/assets/calendar-clock-BYIHtGGP.js +1 -0
- package/dist/assets/card-BdxT61BL.js +1 -0
- package/dist/assets/cases-CZE-FTip.js +1 -0
- package/dist/assets/chatEndpoints-91qyAU1E.js +1 -0
- package/dist/assets/check-Cn0uuQ_e.js +1 -0
- package/dist/assets/checkbox-tTcdQ3wz.js +1 -0
- package/dist/assets/chevron-down-DA6rxxgD.js +1 -0
- package/dist/assets/chevron-left-zJln1v3t.js +1 -0
- package/dist/assets/chevron-right-dRlTJLmW.js +1 -0
- package/dist/assets/chevron-up-OGjfRrmd.js +1 -0
- package/dist/assets/chip-C1sAQ_om.js +1 -0
- package/dist/assets/circle-D37l2gIX.js +1 -0
- package/dist/assets/circle-alert-Da1ne2k3.js +1 -0
- package/dist/assets/circle-dot-BflVdAjA.js +1 -0
- package/dist/assets/circle-question-mark-D9QciJpU.js +1 -0
- package/dist/assets/circle-slash-C-AiIJx8.js +1 -0
- package/dist/assets/circle-x-CSlDT5zP.js +1 -0
- package/dist/assets/clipboard-paste-CDNv7EUP.js +1 -0
- package/dist/assets/clock-CzJ0Y1V8.js +1 -0
- package/dist/assets/cloud-DFiLk-Nc.js +1 -0
- package/dist/assets/code-xml-BdOLy6gM.js +1 -0
- package/dist/assets/coins-DxyWOmEZ.js +1 -0
- package/dist/assets/collapsible-9d0h08gJ.js +1 -0
- package/dist/assets/columns-3-Bd3qBbsG.js +1 -0
- package/dist/assets/command-DibaV-of.js +5 -0
- package/dist/assets/companies-query-lyTYPUyy.js +1 -0
- package/dist/assets/connection-identity-CymhAKo1.js +1 -0
- package/dist/assets/connection-owner-CrqspCR3.js +1 -0
- package/dist/assets/copy-B9wRjKte.js +1 -0
- package/dist/assets/createLucideIcon-Dp_BESPI.js +94 -0
- package/dist/assets/decision-models-BtPQZgAS.js +1 -0
- package/dist/assets/dialog-BbBEA9p-.js +1 -0
- package/dist/assets/dist-B4RM_iwm.js +1 -0
- package/dist/assets/dist-BUubItNY.js +1 -0
- package/dist/assets/dist-Bfnp-w05.js +1 -0
- package/dist/assets/dist-Br1hXe2P.js +1 -0
- package/dist/assets/dist-Bt8JSjoR.js +1 -0
- package/dist/assets/dist-ByLqhYXa.js +1 -0
- package/dist/assets/dist-CYtosku9.js +1 -0
- package/dist/assets/dist-CaA23w-w.js +1 -0
- package/dist/assets/dist-CgTn_tfa.js +1 -0
- package/dist/assets/dist-DZG7nTA7.js +1 -0
- package/dist/assets/dist-DqqULahA.js +1 -0
- package/dist/assets/dist-DrKAhw8j.js +1 -0
- package/dist/assets/dist-Dy96Oxtm.js +1 -0
- package/dist/assets/dropdown-menu-CR4r_wCy.js +1 -0
- package/dist/assets/ellipsis-D-B_YyXO.js +1 -0
- package/dist/assets/ellipsis-vertical-Cvwuft46.js +1 -0
- package/dist/assets/email-B4M0T3qh.js +1 -0
- package/dist/assets/environment-variables-editor-CMuDqyG3.js +1 -0
- package/dist/assets/environments-DXsydWIO.js +1 -0
- package/dist/assets/es2015-C36Uu4St.js +41 -0
- package/dist/assets/external-link-dcZMvrBY.js +1 -0
- package/dist/assets/eye-FIf8kCfJ.js +1 -0
- package/dist/assets/eye-off-DyiqgKoU.js +1 -0
- package/dist/assets/fast-responses-BRhTUKUm.js +1 -0
- package/dist/assets/file-BTR-cl5V.js +1 -0
- package/dist/assets/file-code-corner-D56_khbN.js +1 -0
- package/dist/assets/file-question-mark-DKgQ4Qx0.js +1 -0
- package/dist/assets/file-search-qrHVliUu.js +1 -0
- package/dist/assets/file-text-C3HKnY1t.js +1 -0
- package/dist/assets/flag-DtP1qZ9D.js +1 -0
- package/dist/assets/flask-conical-CEy_2iN6.js +1 -0
- package/dist/assets/folder-git-2-sTNuDiCh.js +1 -0
- package/dist/assets/folder-open-BjdwrLu4.js +1 -0
- package/dist/assets/folder-search-C2QnQ02g.js +1 -0
- package/dist/assets/funnel-B6zSgvNd.js +1 -0
- package/dist/assets/git-pull-request-BVLQZnFj.js +1 -0
- package/dist/assets/github-icon-BvWUh1KT.js +1 -0
- package/dist/assets/health-CcqADKZw.js +1 -0
- package/dist/assets/heartbeats-Do5AjDtr.js +1 -0
- package/dist/assets/inbox-Dob9VqgU.js +1 -0
- package/dist/assets/inboxArchiveCache-DyAJQXXz.js +1 -0
- package/dist/assets/index-Bz_e1N10.css +2 -0
- package/dist/assets/index-CUNTJ_RK.js +67 -0
- package/dist/assets/info-Tk1lW8gi.js +1 -0
- package/dist/assets/input-Cq0iBDAN.js +1 -0
- package/dist/assets/instanceSettings-kW2DXfL4.js +1 -0
- package/dist/assets/interaction-audience-eGPW7epJ.js +1 -0
- package/dist/assets/interaction-card-visibility-CMe0W5FM.js +1 -0
- package/dist/assets/issue-blockers-B3cNlMTc.js +1 -0
- package/dist/assets/issue-filters-Ce8v1l6U.js +1 -0
- package/dist/assets/issue-output-DJVhoabR.js +1 -0
- package/dist/assets/issue-properties-By4_d87g.js +4 -0
- package/dist/assets/issue-share-Csd88Ksi.js +1 -0
- package/dist/assets/issue-workspace-selection-D3X0yGTI.js +1 -0
- package/dist/assets/key-round-DnZyJChv.js +1 -0
- package/dist/assets/label-C8OzDIYT.js +1 -0
- package/dist/assets/layout-dashboard-BKS8iwhq.js +1 -0
- package/dist/assets/link-2-Cl0gUYUT.js +1 -0
- package/dist/assets/link-DJXsSlVf.js +1 -0
- package/dist/assets/list-filter-WC4U6eSH.js +1 -0
- package/dist/assets/list-todo-CQxIFFFt.js +1 -0
- package/dist/assets/log-in-CqSMhQnh.js +1 -0
- package/dist/assets/maximize-2-amZRvyCt.js +1 -0
- package/dist/assets/mention-chips-CE46mpoH.js +17 -0
- package/dist/assets/message-square-plus-C_l_rEfF.js +1 -0
- package/dist/assets/minus-Buu9ydDk.js +1 -0
- package/dist/assets/model-fallback-DLgR8yUB.js +1 -0
- package/dist/assets/model-picker-fields-B9Syk1Po.js +1 -0
- package/dist/assets/network-CwJcZzzO.js +1 -0
- package/dist/assets/octagon-alert-Brf0_Mjx.js +1 -0
- package/dist/assets/octagon-x-Buu9jyYv.js +1 -0
- package/dist/assets/omp-settings-model-tJ2dGg2i.js +1 -0
- package/dist/assets/package-Cear_jmz.js +1 -0
- package/dist/assets/pause-BUOF24wZ.js +1 -0
- package/dist/assets/pen-line-BzM9aj3c.js +1 -0
- package/dist/assets/pipeline-stage-presentation-DlCpG0qw.js +2 -0
- package/dist/assets/pipelines-CNnZNrdV.js +1 -0
- package/dist/assets/play-BbPL3U2Z.js +1 -0
- package/dist/assets/plug-8Lp1g1l2.js +1 -0
- package/dist/assets/plugins-DkSvCKMQ.js +1 -0
- package/dist/assets/plus--_-YgodI.js +1 -0
- package/dist/assets/popover-CgIDA573.js +1 -0
- package/dist/assets/power-CApeDdsJ.js +1 -0
- package/dist/assets/presentation-mode-CA39Cukj.js +1 -0
- package/dist/assets/profile-summary-Djbqv9qM.js +1 -0
- package/dist/assets/projects-oY9VYW38.js +1 -0
- package/dist/assets/proposal-review-Duwdz6By.js +1 -0
- package/dist/assets/queryClient-DexRZQAq.js +1 -0
- package/dist/assets/queryKeys-Sk0U6x0H.js +1 -0
- package/dist/assets/radio-Cqg3txrz.js +1 -0
- package/dist/assets/radio-card-Dt1-FCvF.js +1 -0
- package/dist/assets/recent-agent-chats-d0l_Yj1L.js +1 -0
- package/dist/assets/refresh-cw-DCZxsFMf.js +1 -0
- package/dist/assets/repeat-CC7VfEiF.js +1 -0
- package/dist/assets/resizable-panels-ByTtx3M4.js +1 -0
- package/dist/assets/review-policy-Dxd8aZiE.js +1 -0
- package/dist/assets/rotate-ccw-C_1vZuhL.js +1 -0
- package/dist/assets/rotate-cw-I3e1Xw1W.js +1 -0
- package/dist/assets/router-qrDA_fDm.js +1 -0
- package/dist/assets/routines-CJdlnuen.js +1 -0
- package/dist/assets/runRetryState-dV9X1tL7.js +1 -0
- package/dist/assets/save-DqST8D4G.js +1 -0
- package/dist/assets/schema-config-fields-DWL2SGAV.js +1 -0
- package/dist/assets/scroll-area-CpCJXkWU.js +1 -0
- package/dist/assets/scroll-text-BJJb9Pmr.js +1 -0
- package/dist/assets/search-ibIk5iio.js +1 -0
- package/dist/assets/secrets-Bm2e103f.js +1 -0
- package/dist/assets/select-DHbqeY8-.js +1 -0
- package/dist/assets/send-C41Z1Xid.js +1 -0
- package/dist/assets/separator-BidXiA6w.js +1 -0
- package/dist/assets/server-CMSWA2Ot.js +1 -0
- package/dist/assets/server-cog-BD1bLG6y.js +1 -0
- package/dist/assets/settings-C9BE0rWf.js +1 -0
- package/dist/assets/shared-BbsNa_97.js +1 -0
- package/dist/assets/sheet-CBSmXpkT.js +1 -0
- package/dist/assets/shield-alert-YwTMOIDC.js +1 -0
- package/dist/assets/shield-check-wN-_3-kE.js +1 -0
- package/dist/assets/shield-fs-95RH0.js +1 -0
- package/dist/assets/shield-question-mark-BMirO5nk.js +1 -0
- package/dist/assets/shield-x-D-Cey5j5.js +1 -0
- package/dist/assets/sidebarPreferences-DrwUhshr.js +1 -0
- package/dist/assets/skeleton-BGHeLb8T.js +1 -0
- package/dist/assets/slots-CoW6zbG2.js +49 -0
- package/dist/assets/smoke-lab-matrix-Bd93k2qI.js +1 -0
- package/dist/assets/square-CxemVvLC.js +1 -0
- package/dist/assets/star-CpH09lE0.js +15 -0
- package/dist/assets/sun-BmLLKuXZ.js +1 -0
- package/dist/assets/system-notice-comment-C59ifr3s.js +1 -0
- package/dist/assets/tabs-BeNCSQfH.js +1 -0
- package/dist/assets/task-chat-attachments-fAxgAmq-.js +10 -0
- package/dist/assets/terminal-BHpyJMSm.js +1 -0
- package/dist/assets/textarea-BCpiepe1.js +1 -0
- package/dist/assets/thumbs-down-DZc6J8BY.js +1 -0
- package/dist/assets/thumbs-up-BSrfRAoM.js +1 -0
- package/dist/assets/toggle-switch-4ZdUl1cb.js +1 -0
- package/dist/assets/tools-CtHWMX0r.js +1 -0
- package/dist/assets/tooltip-BeXkeOXn.js +1 -0
- package/dist/assets/transcript-adapter-CL9r2VPx.js +5 -0
- package/dist/assets/trash-DR-HYzK4.js +1 -0
- package/dist/assets/triangle-alert-2xDDaXgc.js +1 -0
- package/dist/assets/use-adapter-capabilities-Doio2Kd7.js +1 -0
- package/dist/assets/use-copy-action-BwdiNLQ4.js +1 -0
- package/dist/assets/useAgentChatEnabled-DAjgbjFc.js +1 -0
- package/dist/assets/useAutosaveIndicator-SeuXAwa6.js +1 -0
- package/dist/assets/useHiddenSettings-su4lPXtZ.js +1 -0
- package/dist/assets/useInfiniteQuery-DpkS2abG.js +1 -0
- package/dist/assets/useInstanceFeatureSettings-Jo6rkq0M.js +1 -0
- package/dist/assets/useManagedSandboxOnly-mYadyWYh.js +1 -0
- package/dist/assets/useMobileEntityPickerViewportStyle-Dndq48zX.js +1 -0
- package/dist/assets/usePrefersReducedMotion-CtREi7r-.js +1 -0
- package/dist/assets/useProfilesData-yVfX1sRo.js +1 -0
- package/dist/assets/useQueries-SZ8rhHDB.js +1 -0
- package/dist/assets/useSecondTick-D3ecvH8m.js +1 -0
- package/dist/assets/useSharedPolling-SqFIqyK_.js +1 -0
- package/dist/assets/useSummaryDraftStream-DNU41h57.js +3 -0
- package/dist/assets/user-BVhnWxYc.js +1 -0
- package/dist/assets/user-check-BUwzmc0Y.js +1 -0
- package/dist/assets/user-minus-DUnrN5mR.js +1 -0
- package/dist/assets/user-round-DlEVjh6C.js +1 -0
- package/dist/assets/user-x-3uNljA-y.js +1 -0
- package/dist/assets/users-CycOHqnK.js +1 -0
- package/dist/assets/wand-sparkles-DpBlMupu.js +1 -0
- package/dist/assets/webhook-DmWTKMCs.js +1 -0
- package/dist/assets/x-C-YdLCiV.js +1 -0
- package/dist/index.html +192 -191
- package/dist/sw.js +1 -1
- package/package.json +1 -1
- package/dist/assets/AccessSelectIdentity-Dp--1kWe.js +0 -1
- package/dist/assets/ActiveAgentsPanel-CF0fwsze.js +0 -1
- package/dist/assets/AdapterManager-DUXWwNxv.js +0 -1
- package/dist/assets/AdvancedToolsRoute-BamlkE3p.js +0 -39
- package/dist/assets/AgentActionButtons-CPIhsP04.js +0 -1
- package/dist/assets/AgentAvatar-DgGEobSY.js +0 -1
- package/dist/assets/AgentBubbleActionRow-BUAUmJKa.js +0 -1
- package/dist/assets/AgentCharacter-BTEn5MBu.js +0 -2
- package/dist/assets/AgentChat-BAn_ghsu.js +0 -1
- package/dist/assets/AgentChats-f73hodzr.js +0 -1
- package/dist/assets/AgentDefaults-BL1XYvEo.js +0 -1
- package/dist/assets/AgentDetail-DthxFfuB.js +0 -38
- package/dist/assets/AgentIconPicker-D87bSkxE.js +0 -1
- package/dist/assets/AgentIdentity-I_kB4rMX.js +0 -1
- package/dist/assets/AgentMailCredentialField-L4T0REEW.js +0 -1
- package/dist/assets/AgentMultiSelect-DsJfZtR2.js +0 -1
- package/dist/assets/AgentRoleEditor-DTKNKZXs.js +0 -1
- package/dist/assets/AgentSetupPrompt-DYBB5Med.js +0 -30
- package/dist/assets/AgentTodoCard-BvgkWD0T.js +0 -1
- package/dist/assets/Agents-D5qI6yZZ.js +0 -3
- package/dist/assets/AppDetail-B6PtMl8J.js +0 -5
- package/dist/assets/AppLogo-CZr1Y48O.js +0 -1
- package/dist/assets/AppNotConnected-C_tGn786.js +0 -1
- package/dist/assets/ApprovalCard-DrfZAdGQ.js +0 -1
- package/dist/assets/ApprovalDetail-sfPpfdXc.js +0 -1
- package/dist/assets/ApprovalPayload-C4F3ItGH.js +0 -1
- package/dist/assets/Approvals-DZoMl7_m.js +0 -1
- package/dist/assets/AppsConnect-D8Gu187f.js +0 -1
- package/dist/assets/AppsReview-DokFETm0.js +0 -1
- package/dist/assets/ArtifactCard-BTf2-JIV.js +0 -1
- package/dist/assets/Artifacts-CK8FaygC.js +0 -1
- package/dist/assets/AssistantConnection-BlKC7jk0.js +0 -1
- package/dist/assets/AttentionInteractionResolver-C2iz6oqT.js +0 -1
- package/dist/assets/AuditHub-DMhunMn8.js +0 -1
- package/dist/assets/Auth-_P9t1YSS.js +0 -3
- package/dist/assets/BoardChat-C4W8JLKB.js +0 -18
- package/dist/assets/BoardClaim-CsomHmd6.js +0 -1
- package/dist/assets/BootstrapSetupUxLab-D58OwniR.js +0 -1
- package/dist/assets/BreadcrumbContext-BVZDZoC0.js +0 -1
- package/dist/assets/Browse-BDjohBak.js +0 -1
- package/dist/assets/BudgetPolicyCard-DfAAgk9Z.js +0 -1
- package/dist/assets/CaseDetail-CL0FC5sG.js +0 -2
- package/dist/assets/CaseIdentifierKey-D8Xi16PS.js +0 -1
- package/dist/assets/Cases-C-7dXrEt.js +0 -2
- package/dist/assets/ChatEndpointDetail-C-IYAYG8.js +0 -5
- package/dist/assets/ChatEndpointSetup-CM3QixMj.js +0 -1
- package/dist/assets/ChatIdentityConfirm-DCI5BnWo.js +0 -1
- package/dist/assets/ChoiceControls-3Qpci4yE.js +0 -1
- package/dist/assets/CliAuth-CRG0c0EH.js +0 -1
- package/dist/assets/CommentAttributionChip-fz5Mn0RW.js +0 -1
- package/dist/assets/Companies-97toQ8Cw.js +0 -1
- package/dist/assets/CompanyAccess-CKhS1BaS.js +0 -1
- package/dist/assets/CompanyActivity-DzNrAyAb.js +0 -1
- package/dist/assets/CompanyConnections-ORCH4i3U.js +0 -1
- package/dist/assets/CompanyContext-CSrVsSze.js +0 -1
- package/dist/assets/CompanyEnvironments-DphURbtb.js +0 -3
- package/dist/assets/CompanyExport-XeVCUcK3.js +0 -4
- package/dist/assets/CompanyImport-DPKpUaRa.js +0 -1
- package/dist/assets/CompanySettings-4JQpzuS1.js +0 -1
- package/dist/assets/CompanySettingsPluginPage-cVvXh0_G.js +0 -1
- package/dist/assets/CompanySkills-BA_9Ztwj.js +0 -10
- package/dist/assets/ComposerAddMenu-DNp4ecG8.js +0 -3
- package/dist/assets/ConfigureBuiltInAgentModal-CQCHDkl4.js +0 -1
- package/dist/assets/ConnectionSetupFlow-BaarToKu.js +0 -40
- package/dist/assets/CopyText-Cr673_Kx.js +0 -1
- package/dist/assets/CopyableGatewayUrl-DxQsV7Hr.js +0 -1
- package/dist/assets/CrossIssueCollaborationUxLab-CEh5B2iJ.js +0 -1
- package/dist/assets/Dashboard--iaPJqJp.js +0 -2
- package/dist/assets/DashboardLive-4rGeotay.js +0 -1
- package/dist/assets/DecisionDateChips-CJOLtNrJ.js +0 -1
- package/dist/assets/DecisionModelSettings-D-OxKIGP.js +0 -1
- package/dist/assets/DecisionQueuePage-D-kNFav_.js +0 -1
- package/dist/assets/DesignGuide-D7486q4b.js +0 -23
- package/dist/assets/DocumentFrameHeader-B61HhahB.js +0 -1
- package/dist/assets/EmailConnectionAccess-DAFMofYX.js +0 -1
- package/dist/assets/EmailEndpointSetup-6OHb9B4q.js +0 -1
- package/dist/assets/EnforcementBanner-DWPluRU0.js +0 -1
- package/dist/assets/EntityRow-BIfupmlZ.js +0 -1
- package/dist/assets/ExecutionWorkspaceDetail-BGV-9D5Y.js +0 -19
- package/dist/assets/FilterBar-5ta25FCb.js +0 -1
- package/dist/assets/FoldCurtain-DUAOdtCt.js +0 -1
- package/dist/assets/FolderControls-L2RzbfdQ.js +0 -1
- package/dist/assets/GatewayDetail-CdXNQ9gD.js +0 -2
- package/dist/assets/GatewaysList-B0Jq1IRC.js +0 -1
- package/dist/assets/GoalDetail-D2VhPtvw.js +0 -1
- package/dist/assets/GoalTree-kFpgH4dA.js +0 -1
- package/dist/assets/Goals-B-_gq_Qu.js +0 -1
- package/dist/assets/Identity-Cv_2a9qJ.js +0 -1
- package/dist/assets/ImageGalleryModal-DzKBMOnu.js +0 -1
- package/dist/assets/Inbox-zllmqRcB.js +0 -2
- package/dist/assets/InlineBanner-VQ5mstsR.js +0 -1
- package/dist/assets/InlineEditor-BKBqNA21.js +0 -1
- package/dist/assets/InlineEntitySelector-v2Q4C8oT.js +0 -1
- package/dist/assets/InstanceAccess-Ns2rAmva.js +0 -1
- package/dist/assets/InstanceAdvanced-B7tDfjwG.js +0 -1
- package/dist/assets/InstanceFeatures-DUQnBkxy.js +0 -1
- package/dist/assets/InviteLanding-brwa_8NC.js +0 -1
- package/dist/assets/IssueChatLongThreadPerf-D0HJe6IV.js +0 -2
- package/dist/assets/IssueChatThread-CMXzuvrF.js +0 -40
- package/dist/assets/IssueDetail-DGdg-mB8.js +0 -9
- package/dist/assets/IssueDocumentAnnotations-BK-LgExc.js +0 -2
- package/dist/assets/IssueOutputSection-aSyiE1pg.js +0 -1
- package/dist/assets/IssueRecoveryActionCard-vAuL_OEC.js +0 -1
- package/dist/assets/IssueReferenceActivitySummary-CbpSjmdV.js +0 -1
- package/dist/assets/IssueReferencePill-DAEplgLd.js +0 -1
- package/dist/assets/IssueThreadInteractionCard-wFidFTIh.js +0 -9
- package/dist/assets/IssueWriteDenialNotice-BCJ74Czu.js +0 -1
- package/dist/assets/Issues-CsmM33z_.js +0 -3
- package/dist/assets/JoinRequestQueue-ZZq3jWW-.js +0 -1
- package/dist/assets/JsonSchemaForm-ixDd6e-N.js +0 -1
- package/dist/assets/LiveNowTodoLine-CP32NNp_.js +0 -1
- package/dist/assets/ManagedAiConnectionDetails-Ba0awZ-O.js +0 -1
- package/dist/assets/MarkdownBody-BTjuUgFa.js +0 -16
- package/dist/assets/MarkdownEditor-DXD-Cu3u.js +0 -85
- package/dist/assets/McpConnect-CYLP1yLX.js +0 -1
- package/dist/assets/MembershipAction-CKs7Ua9x.js +0 -1
- package/dist/assets/MetricCard-DaAh5x_N.js +0 -1
- package/dist/assets/MissingPluginTabPlaceholder-DT47WyQq.js +0 -1
- package/dist/assets/ModelsAndProviders-gaR7HDQm.js +0 -1
- package/dist/assets/MootMark-DZAfkwdv.js +0 -1
- package/dist/assets/NewAgent-DBQzvxIr.js +0 -1
- package/dist/assets/OmpAllSettings-B_Knr51Z.js +0 -1
- package/dist/assets/OpenwaGatewayManager-DH3bF7fa.js +0 -2
- package/dist/assets/PathInstructionsModal-D4GUYKIT.js +0 -1
- package/dist/assets/PipelineSettings-Dl-94FB5.js +0 -2
- package/dist/assets/Pipelines-CY9hGe0h.js +0 -1
- package/dist/assets/PixelsOffice-BgyGZsiV.js +0 -2
- package/dist/assets/PluginManager-4rrrAOLG.js +0 -1
- package/dist/assets/PluginPage-CMA4Ei50.js +0 -1
- package/dist/assets/PluginSettings-Cm4H1JRT.js +0 -1
- package/dist/assets/ProfileDetailRoute-BEBctbC6.js +0 -1
- package/dist/assets/ProfileSettings-Djo7BLIj.js +0 -1
- package/dist/assets/ProfileWizardRoute-DxLujEtD.js +0 -1
- package/dist/assets/ProjectDetail-CmmdvUHn.js +0 -1
- package/dist/assets/ProjectWorkspaceDetail-BsA0hJ-k.js +0 -29
- package/dist/assets/ProjectWorkspacesContent-BNNI_WAk.js +0 -1
- package/dist/assets/Projects-BTAauZr0.js +0 -1
- package/dist/assets/PublicIssueSharePage-DdPjfmD9.js +0 -1
- package/dist/assets/QuestionForm-B8-PWz3B.js +0 -7
- package/dist/assets/QuotaBar-_ok6Pek4.js +0 -1
- package/dist/assets/RepositoryEditor-CFt-HPgf.js +0 -1
- package/dist/assets/ResponsibleUserDenialNotice-DKNk1-BK.js +0 -1
- package/dist/assets/ResponsibleUserDenialUxLab-Bt9vnHJz.js +0 -1
- package/dist/assets/ReviewQueueCard-BC6VY8Bc.js +0 -1
- package/dist/assets/RichWorkProductCard-ClpMt_Bh.js +0 -1
- package/dist/assets/RoutineActivityRow-B69N6Hcy.js +0 -1
- package/dist/assets/RoutineDetail-BT6_GKnC.js +0 -2
- package/dist/assets/RoutineRunVariablesDialog-D_Mls1sV.js +0 -1
- package/dist/assets/RoutineVariablesEditor-0dQ10yPY.js +0 -1
- package/dist/assets/Routines-4LevOfvV.js +0 -1
- package/dist/assets/ScrollToBottom-jItsgDR8.js +0 -1
- package/dist/assets/Search-bmcm0_m_.js +0 -1
- package/dist/assets/SearchableSelect-CIJ5K8ih.js +0 -1
- package/dist/assets/Secrets-DfR1fBAZ.js +0 -4
- package/dist/assets/SetupWizard-C8qzkJn1.js +0 -1
- package/dist/assets/SidebarContext-CF3RWLxh.js +0 -1
- package/dist/assets/SidebarNavItem-DV9nmC7O.js +0 -1
- package/dist/assets/SkillBinaryFile-DNe-MmCv.js +0 -1
- package/dist/assets/SkillCardIcon-BTCafp8l.js +0 -2
- package/dist/assets/SkillSourceTree--FWKWyF3.js +0 -2
- package/dist/assets/SkillSources-jUDjqy5i.js +0 -2
- package/dist/assets/SkillStudio-BsqtUnzF.js +0 -9
- package/dist/assets/SourceTrustBadge-CfBrvKL3.js +0 -1
- package/dist/assets/StatusCards-Dt3zorUZ.js +0 -1
- package/dist/assets/StatusIcon-0GcYXDdN.js +0 -1
- package/dist/assets/SummarySlotCard-D1C0qH2L.js +0 -1
- package/dist/assets/TaskChatComposerTakeoverContext-BJAHPHve.js +0 -1
- package/dist/assets/TaskChatLab-B0coUvdp.js +0 -11
- package/dist/assets/TaskChatMarker-C40twVjh.js +0 -2
- package/dist/assets/TaskChatProtocolCard--bi_tc6i.js +0 -1
- package/dist/assets/TaskChatThreadView-DkzFDrLW.js +0 -4
- package/dist/assets/TaskDetailRelationsPanel-DZGkinoJ.js +0 -1
- package/dist/assets/TaskTreeControls-DznugVpi.js +0 -3
- package/dist/assets/Terminal-NjEb5-2b.js +0 -1
- package/dist/assets/TerminalView-DZxK2Ei5.js +0 -58
- package/dist/assets/ThemeContext-DYRUK81c.js +0 -1
- package/dist/assets/ThemeToggle-BWFlFnSX.js +0 -1
- package/dist/assets/ToastContext-DMdt9oTd.js +0 -1
- package/dist/assets/ToolsAdminGate-BI5-WYC3.js +0 -1
- package/dist/assets/TrustPresetSection-CjNwNBo3.js +0 -1
- package/dist/assets/UserProfile-Dujv3qdz.js +0 -1
- package/dist/assets/WebhookUrlWarning-D0GLAS0A.js +0 -1
- package/dist/assets/WhatNeedsMe-C9P2EsqQ.js +0 -1
- package/dist/assets/WorkspaceRuntimeControls-T4YUoZvK.js +0 -1
- package/dist/assets/Workspaces-BTgSx9nA.js +0 -1
- package/dist/assets/access-GAosX22P.js +0 -1
- package/dist/assets/activity-BVYJmFzR.js +0 -1
- package/dist/assets/activity-CB9AQzZO.js +0 -1
- package/dist/assets/activity-format-zP89NM00.js +0 -1
- package/dist/assets/adapter-display-registry-Bk0KWAHT.js +0 -1
- package/dist/assets/adapters-Dp0USyWg.js +0 -1
- package/dist/assets/agent-avatar-url-C-slYk2A.js +0 -1
- package/dist/assets/agent-config-primitives-BsZUnbf2.js +0 -1
- package/dist/assets/agentChats-CjHr739f.js +0 -1
- package/dist/assets/agents-DmlgUVso.js +0 -1
- package/dist/assets/alert-dialog-Blls2GnU.js +0 -1
- package/dist/assets/app-connect-policy-CUzbEnhU.js +0 -1
- package/dist/assets/archive-CTfe4zq5.js +0 -1
- package/dist/assets/archive-restore-DeLPtKS0.js +0 -1
- package/dist/assets/arrow-down-Dg4PKbmt.js +0 -1
- package/dist/assets/arrow-down-left-C8jhGqM0.js +0 -1
- package/dist/assets/arrow-left-Ce_LIut0.js +0 -1
- package/dist/assets/arrow-right-BL5kYtCZ.js +0 -1
- package/dist/assets/arrow-up-D_YoSnQD.js +0 -1
- package/dist/assets/arrow-up-down-Bpe9xqCo.js +0 -1
- package/dist/assets/arrow-up-right-BLYWl-we.js +0 -1
- package/dist/assets/artifacts-9HWeqVeB.js +0 -1
- package/dist/assets/assets-TRDkBfss.js +0 -1
- package/dist/assets/attachment-icon-4xDiQblX.js +0 -1
- package/dist/assets/avatar-UO226cef.js +0 -1
- package/dist/assets/badge-DuA2EgZC.js +0 -1
- package/dist/assets/badge-check-Bd7IYIB2.js +0 -1
- package/dist/assets/bot-C9arfJWx.js +0 -1
- package/dist/assets/boxes-fV98p9-r.js +0 -1
- package/dist/assets/braces-BEVhwPeU.js +0 -1
- package/dist/assets/browser-use-D2HTf8rD.js +0 -1
- package/dist/assets/budgets-DvML2uxG.js +0 -1
- package/dist/assets/button-CMwV3L1P.js +0 -1
- package/dist/assets/calendar-clock-BVFltraz.js +0 -1
- package/dist/assets/card-Bru3x_SJ.js +0 -1
- package/dist/assets/cases-m9RZ5Cym.js +0 -1
- package/dist/assets/chatEndpoints-BKsIHowE.js +0 -1
- package/dist/assets/check-Ctsrlfa-.js +0 -1
- package/dist/assets/checkbox-BHQhs41k.js +0 -1
- package/dist/assets/chevron-down-BCvxsWfI.js +0 -1
- package/dist/assets/chevron-left-DP4zwC0G.js +0 -1
- package/dist/assets/chevron-right-s7L6hXXq.js +0 -1
- package/dist/assets/chevron-up-rFDQGA-7.js +0 -1
- package/dist/assets/chip-DsDe6yck.js +0 -1
- package/dist/assets/circle-IAHLDvLO.js +0 -1
- package/dist/assets/circle-alert-C-L4OsHh.js +0 -1
- package/dist/assets/circle-dot-zr8GONq2.js +0 -1
- package/dist/assets/circle-question-mark-B1jR2is9.js +0 -1
- package/dist/assets/circle-slash-Bx5HrFMb.js +0 -1
- package/dist/assets/circle-x-CFlSbYzD.js +0 -1
- package/dist/assets/clipboard-paste-D9rNPVFj.js +0 -1
- package/dist/assets/clock-CzrJT_cP.js +0 -1
- package/dist/assets/cloud-BktKFMPI.js +0 -1
- package/dist/assets/code-xml-BWc3OvMt.js +0 -1
- package/dist/assets/coins-C6QoCoLN.js +0 -1
- package/dist/assets/collapsible-CqjPlqOa.js +0 -1
- package/dist/assets/columns-3-CqC5nP-p.js +0 -1
- package/dist/assets/command-Ca3v36Mu.js +0 -5
- package/dist/assets/companies-query-D9PxIiMT.js +0 -1
- package/dist/assets/connection-identity-YKZfppDS.js +0 -1
- package/dist/assets/connection-owner-DL4yKhSt.js +0 -1
- package/dist/assets/copy-_wvZOjTe.js +0 -1
- package/dist/assets/createLucideIcon-DJi9suAC.js +0 -94
- package/dist/assets/decision-models-CD2AFC2a.js +0 -1
- package/dist/assets/dialog-CKUblzlR.js +0 -1
- package/dist/assets/dist-BNOqBr2U.js +0 -1
- package/dist/assets/dist-Bm2igrAN.js +0 -1
- package/dist/assets/dist-BuHnL0GV.js +0 -1
- package/dist/assets/dist-CClcSLHe.js +0 -1
- package/dist/assets/dist-CtvMIwRC.js +0 -1
- package/dist/assets/dist-CvHBQVAC.js +0 -1
- package/dist/assets/dist-DC4EOH0g.js +0 -1
- package/dist/assets/dist-DMg_vOQs.js +0 -1
- package/dist/assets/dist-DOIzg2vq.js +0 -1
- package/dist/assets/dist-DTFX_1D6.js +0 -1
- package/dist/assets/dist-DcOFbG-W.js +0 -1
- package/dist/assets/dist-SzpVz8Pd.js +0 -1
- package/dist/assets/dist-ypeTPGg_.js +0 -1
- package/dist/assets/dropdown-menu-DEO3mF_E.js +0 -1
- package/dist/assets/ellipsis-BTiLRUn4.js +0 -1
- package/dist/assets/ellipsis-vertical-DWXPf6Ow.js +0 -1
- package/dist/assets/email-BNu4jmOH.js +0 -1
- package/dist/assets/environment-variables-editor-0qgSPgNN.js +0 -1
- package/dist/assets/environments-BLQs1ScE.js +0 -1
- package/dist/assets/es2015-C3hhXnTu.js +0 -41
- package/dist/assets/external-link-nl1b263c.js +0 -1
- package/dist/assets/eye-DRS7RbEp.js +0 -1
- package/dist/assets/eye-off-CVVA-EWh.js +0 -1
- package/dist/assets/fast-responses-DZodQpLv.js +0 -1
- package/dist/assets/file-N19tC0jj.js +0 -1
- package/dist/assets/file-code-corner-CmZ_RihF.js +0 -1
- package/dist/assets/file-pen-line-DX6PZQXR.js +0 -1
- package/dist/assets/file-question-mark-CTomlKBX.js +0 -1
- package/dist/assets/file-search-DZpRLS-j.js +0 -1
- package/dist/assets/file-text-Cw7ntqRx.js +0 -1
- package/dist/assets/flag-R0AVTKGk.js +0 -1
- package/dist/assets/flask-conical-CEYKkO5k.js +0 -1
- package/dist/assets/folder-git-2-D2Hz-CeQ.js +0 -1
- package/dist/assets/folder-open-8WDYv4mw.js +0 -1
- package/dist/assets/folder-search-D0WkVTZt.js +0 -1
- package/dist/assets/funnel-DWwD2WCu.js +0 -1
- package/dist/assets/git-pull-request-CdCSG7CL.js +0 -1
- package/dist/assets/github-icon-Bbgf67tg.js +0 -1
- package/dist/assets/health-DF7yrggW.js +0 -1
- package/dist/assets/heartbeats-DOyojsaN.js +0 -1
- package/dist/assets/inbox-C08arfF_.js +0 -1
- package/dist/assets/inboxArchiveCache-D8QGdg49.js +0 -1
- package/dist/assets/index-3AxqhPET.js +0 -67
- package/dist/assets/index-B5bd7Tk6.css +0 -2
- package/dist/assets/info-DXpx_HA2.js +0 -1
- package/dist/assets/input-DobnTAyB.js +0 -1
- package/dist/assets/instanceSettings-D8g_QlS-.js +0 -1
- package/dist/assets/interaction-audience-BRS_4X7S.js +0 -1
- package/dist/assets/interaction-card-visibility-DcyO470L.js +0 -1
- package/dist/assets/issue-blockers-DLfa24KC.js +0 -1
- package/dist/assets/issue-filters-BO9xiK0c.js +0 -1
- package/dist/assets/issue-output-CU3gasZ1.js +0 -1
- package/dist/assets/issue-properties-B1cYnBDU.js +0 -4
- package/dist/assets/issue-share-j9E_vLuf.js +0 -1
- package/dist/assets/issue-workspace-selection-S8UgGgK1.js +0 -1
- package/dist/assets/key-round-0RqEOB_C.js +0 -1
- package/dist/assets/label-BPz3pg9_.js +0 -1
- package/dist/assets/layout-dashboard-DClZjSaR.js +0 -1
- package/dist/assets/link-2-CND-9QZ2.js +0 -1
- package/dist/assets/link-BITB8yRp.js +0 -1
- package/dist/assets/list-filter-h7_mdWEH.js +0 -1
- package/dist/assets/list-todo-BmObdeVq.js +0 -1
- package/dist/assets/log-in-nSyhNjrD.js +0 -1
- package/dist/assets/maximize-2-DgliXYEr.js +0 -1
- package/dist/assets/mention-chips-D8856Q0_.js +0 -17
- package/dist/assets/message-square-plus-yRlSBxPl.js +0 -1
- package/dist/assets/minus-WOgDAWiC.js +0 -1
- package/dist/assets/model-fallback-X_YvC3rj.js +0 -1
- package/dist/assets/model-picker-fields-235ien8Z.js +0 -1
- package/dist/assets/network-RCsafDTP.js +0 -1
- package/dist/assets/octagon-alert-CeNhknXC.js +0 -1
- package/dist/assets/octagon-x-CBcXy1zJ.js +0 -1
- package/dist/assets/omp-settings-model-uqWvMNr2.js +0 -1
- package/dist/assets/package-CYC5MDhY.js +0 -1
- package/dist/assets/pause-CJSwJvLv.js +0 -1
- package/dist/assets/pen-line-CxWwoiP_.js +0 -1
- package/dist/assets/pipeline-stage-presentation-5UBw7nsb.js +0 -2
- package/dist/assets/pipelines-vN196fc4.js +0 -1
- package/dist/assets/play-CJNuUj69.js +0 -1
- package/dist/assets/plug-VjpaJcMq.js +0 -1
- package/dist/assets/plugins-CF2QITJB.js +0 -1
- package/dist/assets/plus-C6fnr28l.js +0 -1
- package/dist/assets/popover-BhYHYj7q.js +0 -1
- package/dist/assets/power-B3xsPeS4.js +0 -1
- package/dist/assets/presentation-mode-Bk6TnKr9.js +0 -1
- package/dist/assets/profile-summary-unutni_7.js +0 -1
- package/dist/assets/projects-mixWrT5q.js +0 -1
- package/dist/assets/proposal-review-kucrRJgS.js +0 -1
- package/dist/assets/queryClient-BOli2vjj.js +0 -1
- package/dist/assets/queryKeys-DYV5MhM_.js +0 -1
- package/dist/assets/radio-DnDOdgWd.js +0 -1
- package/dist/assets/radio-card-DVZaXlw0.js +0 -1
- package/dist/assets/recent-agent-chats-DIU_z_qg.js +0 -1
- package/dist/assets/refresh-cw-B_Oki9wZ.js +0 -1
- package/dist/assets/repeat-DGPKlc5I.js +0 -1
- package/dist/assets/resizable-panels-Qjbo0P05.js +0 -1
- package/dist/assets/review-policy-BL48kYvb.js +0 -1
- package/dist/assets/rotate-ccw-CQEJ4ewP.js +0 -1
- package/dist/assets/rotate-cw-DnCrcS38.js +0 -1
- package/dist/assets/router-2UfGeejU.js +0 -1
- package/dist/assets/routines-KPtwxuS7.js +0 -1
- package/dist/assets/runRetryState-BdjK4QQj.js +0 -1
- package/dist/assets/save-CJ1Iqyew.js +0 -1
- package/dist/assets/schema-config-fields-DggSrP5S.js +0 -1
- package/dist/assets/scroll-area-P1KpIQWe.js +0 -1
- package/dist/assets/scroll-text-BpkOrME3.js +0 -1
- package/dist/assets/search-04O7m-IF.js +0 -1
- package/dist/assets/secrets-CZifgF0J.js +0 -1
- package/dist/assets/select-V0Hm_q4f.js +0 -1
- package/dist/assets/send-mNwfi_F1.js +0 -1
- package/dist/assets/separator-B2LFqBpM.js +0 -1
- package/dist/assets/server-DIhG4RDC.js +0 -1
- package/dist/assets/server-cog-DV4ua9lY.js +0 -1
- package/dist/assets/settings-DuZndeX2.js +0 -1
- package/dist/assets/shared-4LF6wQ38.js +0 -1
- package/dist/assets/sheet-jd7y5x4-.js +0 -1
- package/dist/assets/shield-BhaVQdWV.js +0 -1
- package/dist/assets/shield-alert-Be9GuMrS.js +0 -1
- package/dist/assets/shield-check-B0HVjzM_.js +0 -1
- package/dist/assets/shield-question-mark-D1_en6pn.js +0 -1
- package/dist/assets/shield-x-D-Ice3nf.js +0 -1
- package/dist/assets/sidebarPreferences-vEHBC54I.js +0 -1
- package/dist/assets/skeleton-Bv_lQagE.js +0 -1
- package/dist/assets/slots-Dw517dxP.js +0 -49
- package/dist/assets/smoke-lab-matrix-0BhnGQeo.js +0 -1
- package/dist/assets/square-B2aH51tE.js +0 -1
- package/dist/assets/star-BZgQbzhV.js +0 -15
- package/dist/assets/sun-_NIddwh7.js +0 -1
- package/dist/assets/system-notice-comment-CL_SWj_f.js +0 -1
- package/dist/assets/tabs-B2Os_leL.js +0 -1
- package/dist/assets/task-chat-attachments-jZNCAKd4.js +0 -10
- package/dist/assets/terminal-C0CKe_Zz.js +0 -1
- package/dist/assets/textarea-BRPEfJ-g.js +0 -1
- package/dist/assets/thumbs-down-C2BkjZOy.js +0 -1
- package/dist/assets/thumbs-up-OW2IsTL7.js +0 -1
- package/dist/assets/toggle-switch-BHxNtSq9.js +0 -1
- package/dist/assets/tool-taxonomy-B5zpbkHA.js +0 -1
- package/dist/assets/tools-B-L_sU_9.js +0 -1
- package/dist/assets/tooltip-B5WQ3lq5.js +0 -1
- package/dist/assets/transcript-adapter-C29ZJiU2.js +0 -5
- package/dist/assets/trash-D7zTaHTj.js +0 -1
- package/dist/assets/triangle-alert-CBVKiaXB.js +0 -1
- package/dist/assets/use-adapter-capabilities-Bu8XkVZ9.js +0 -1
- package/dist/assets/use-copy-action-D5dEzo6L.js +0 -1
- package/dist/assets/useAgentChatEnabled-Chi_JXJj.js +0 -1
- package/dist/assets/useAutosaveIndicator-DttGFwx7.js +0 -1
- package/dist/assets/useHiddenSettings-CcaZfHLD.js +0 -1
- package/dist/assets/useInfiniteQuery-B28xptxn.js +0 -1
- package/dist/assets/useInstanceFeatureSettings-CEK6Xn3o.js +0 -1
- package/dist/assets/useManagedSandboxOnly-CO01cDK4.js +0 -1
- package/dist/assets/useMobileEntityPickerViewportStyle-C3R37KtS.js +0 -1
- package/dist/assets/usePrefersReducedMotion-Dw81-akd.js +0 -1
- package/dist/assets/useProfilesData-2L3_71Ql.js +0 -1
- package/dist/assets/useQueries-BIJ7zVTy.js +0 -1
- package/dist/assets/useSecondTick-Gige2l0t.js +0 -1
- package/dist/assets/useSharedPolling-D4Xn8mY2.js +0 -1
- package/dist/assets/useSummaryDraftStream-R2Y2bAUU.js +0 -3
- package/dist/assets/user-Ccom_Ph0.js +0 -1
- package/dist/assets/user-check-BoBa1Xs_.js +0 -1
- package/dist/assets/user-minus-B4F-9ccK.js +0 -1
- package/dist/assets/user-round-CGxsJ0K8.js +0 -1
- package/dist/assets/user-x-CRO9YVVi.js +0 -1
- package/dist/assets/users-DyKzwIh4.js +0 -1
- package/dist/assets/wand-sparkles-BqnbLKl3.js +0 -1
- package/dist/assets/webhook-BVBCKjlU.js +0 -1
- package/dist/assets/x-DRDFdlYE.js +0 -1
|
@@ -1,67 +0,0 @@
|
|
|
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-B0coUvdp.js","assets/createLucideIcon-DJi9suAC.js","assets/check-Ctsrlfa-.js","assets/circle-IAHLDvLO.js","assets/copy-_wvZOjTe.js","assets/button-CMwV3L1P.js","assets/dist-BuHnL0GV.js","assets/dist-CtvMIwRC.js","assets/minus-WOgDAWiC.js","assets/pause-CJSwJvLv.js","assets/play-CJNuUj69.js","assets/plus-C6fnr28l.js","assets/rotate-ccw-CQEJ4ewP.js","assets/TaskChatThreadView-DkzFDrLW.js","assets/star-BZgQbzhV.js","assets/preload-helper-CceJXRIF.js","assets/ArtifactCard-BTf2-JIV.js","assets/router-2UfGeejU.js","assets/queryKeys-DYV5MhM_.js","assets/CompanyContext-CSrVsSze.js","assets/companies-query-D9PxIiMT.js","assets/popover-BhYHYj7q.js","assets/dist-Bm2igrAN.js","assets/dist-SzpVz8Pd.js","assets/dist-CClcSLHe.js","assets/es2015-C3hhXnTu.js","assets/boxes-fV98p9-r.js","assets/circle-dot-zr8GONq2.js","assets/package-CYC5MDhY.js","assets/search-04O7m-IF.js","assets/shield-BhaVQdWV.js","assets/terminal-C0CKe_Zz.js","assets/external-link-nl1b263c.js","assets/attachment-icon-4xDiQblX.js","assets/use-copy-action-D5dEzo6L.js","assets/ToastContext-DMdt9oTd.js","assets/clipboard-CTLKYvRL.js","assets/arrow-down-Dg4PKbmt.js","assets/chevron-down-BCvxsWfI.js","assets/chevron-right-s7L6hXXq.js","assets/tool-taxonomy-B5zpbkHA.js","assets/circle-question-mark-B1jR2is9.js","assets/file-pen-line-DX6PZQXR.js","assets/RichWorkProductCard-ClpMt_Bh.js","assets/file-text-Cw7ntqRx.js","assets/file-N19tC0jj.js","assets/maximize-2-DgliXYEr.js","assets/server-DIhG4RDC.js","assets/github-icon-Bbgf67tg.js","assets/ImageGalleryModal-DzKBMOnu.js","assets/dist-DC4EOH0g.js","assets/chevron-left-DP4zwC0G.js","assets/x-DRDFdlYE.js","assets/issue-output-CU3gasZ1.js","assets/network-RCsafDTP.js","assets/shield-check-B0HVjzM_.js","assets/MarkdownBody-BTjuUgFa.js","assets/mention-chips-D8856Q0_.js","assets/agent-avatar-url-C-slYk2A.js","assets/color-contrast-BHHcEMtO.js","assets/archive-CTfe4zq5.js","assets/circle-x-CFlSbYzD.js","assets/clock-CzrJT_cP.js","assets/file-code-corner-CmZ_RihF.js","assets/folder-open-8WDYv4mw.js","assets/git-pull-request-CdCSG7CL.js","assets/key-round-0RqEOB_C.js","assets/octagon-alert-CeNhknXC.js","assets/agents-DmlgUVso.js","assets/usePrefersReducedMotion-Dw81-akd.js","assets/ThemeContext-DYRUK81c.js","assets/StatusIcon-0GcYXDdN.js","assets/task-chat-attachments-jZNCAKd4.js","assets/TaskChatMarker-C40twVjh.js","assets/bot-C9arfJWx.js","assets/flag-R0AVTKGk.js","assets/info-DXpx_HA2.js","assets/octagon-x-CBcXy1zJ.js","assets/TaskChatProtocolCard--bi_tc6i.js","assets/QuestionForm-B8-PWz3B.js","assets/MarkdownEditor-DXD-Cu3u.js","assets/dist-DTFX_1D6.js","assets/dist-DOIzg2vq.js","assets/dist-DcOFbG-W.js","assets/dist-DMg_vOQs.js","assets/dist-CvHBQVAC.js","assets/dist-BNOqBr2U.js","assets/calendar-clock-BVFltraz.js","assets/user-Ccom_Ph0.js","assets/AgentAvatar-DgGEobSY.js","assets/Identity-Cv_2a9qJ.js","assets/avatar-UO226cef.js","assets/routines-KPtwxuS7.js","assets/activity-BVYJmFzR.js","assets/dist-BhxPxuMy.js","assets/message-square-plus-yRlSBxPl.js","assets/input-DobnTAyB.js","assets/TaskChatComposerTakeoverContext-BJAHPHve.js","assets/triangle-alert-CBVKiaXB.js","assets/dialog-CKUblzlR.js","assets/textarea-BRPEfJ-g.js","assets/square-B2aH51tE.js","assets/users-DyKzwIh4.js","assets/presentation-mode-Bk6TnKr9.js","assets/list-todo-BmObdeVq.js","assets/shield-question-mark-D1_en6pn.js","assets/shield-x-D-Ice3nf.js","assets/system-notice-comment-CL_SWj_f.js","assets/label-BPz3pg9_.js","assets/heartbeats-DOyojsaN.js","assets/email-BNu4jmOH.js","assets/transcript-adapter-C29ZJiU2.js","assets/AgentBubbleActionRow-BUAUmJKa.js","assets/dropdown-menu-DEO3mF_E.js","assets/dist-ypeTPGg_.js","assets/ellipsis-BTiLRUn4.js","assets/thumbs-down-C2BkjZOy.js","assets/thumbs-up-OW2IsTL7.js","assets/tooltip-B5WQ3lq5.js","assets/Cases-C-7dXrEt.js","assets/checkbox-BHQhs41k.js","assets/arrow-up-down-Bpe9xqCo.js","assets/columns-3-CqC5nP-p.js","assets/funnel-DWwD2WCu.js","assets/badge-DuA2EgZC.js","assets/projects-mixWrT5q.js","assets/BreadcrumbContext-BVZDZoC0.js","assets/cases-m9RZ5Cym.js","assets/CaseIdentifierKey-D8Xi16PS.js","assets/FilterBar-5ta25FCb.js","assets/CaseDetail-CL0FC5sG.js","assets/IssueDocumentAnnotations-BK-LgExc.js","assets/sheet-jd7y5x4-.js","assets/tabs-B2Os_leL.js","assets/ellipsis-vertical-DWXPf6Ow.js","assets/issue-properties-B1cYnBDU.js","assets/issue-attribution-DfN_3u2W.js","assets/WorkspaceRuntimeControls-T4YUoZvK.js","assets/activity-CB9AQzZO.js","assets/useManagedSandboxOnly-CO01cDK4.js","assets/instanceSettings-D8g_QlS-.js","assets/archive-restore-DeLPtKS0.js","assets/arrow-right-BL5kYtCZ.js","assets/arrow-up-right-BLYWl-we.js","assets/repeat-DGPKlc5I.js","assets/inboxArchiveCache-D8QGdg49.js","assets/access-GAosX22P.js","assets/assignees-DkQNbPzi.js","assets/AgentIdentity-I_kB4rMX.js","assets/recent-selections-BnN_nb6Y.js","assets/recent-assignees-DmalYaLf.js","assets/InlineEntitySelector-v2Q4C8oT.js","assets/useMobileEntityPickerViewportStyle-C3R37KtS.js","assets/issue-blockers-DLfa24KC.js","assets/eye-DRS7RbEp.js","assets/refresh-cw-B_Oki9wZ.js","assets/TaskDetailRelationsPanel-DZGkinoJ.js","assets/query-placeholder-data-Bg4z2kcq.js","assets/SourceTrustBadge-CfBrvKL3.js","assets/badge-check-Bd7IYIB2.js","assets/circle-alert-C-L4OsHh.js","assets/shield-alert-Be9GuMrS.js","assets/InlineBanner-VQ5mstsR.js","assets/runRetryState-BdjK4QQj.js","assets/IssueReferencePill-DAEplgLd.js","assets/review-policy-BL48kYvb.js","assets/user-check-BoBa1Xs_.js","assets/user-minus-B4F-9ccK.js","assets/separator-B2LFqBpM.js","assets/issue-workspace-selection-S8UgGgK1.js","assets/list-filter-h7_mdWEH.js","assets/trash-D7zTaHTj.js","assets/select-V0Hm_q4f.js","assets/chevron-up-rFDQGA-7.js","assets/chip-DsDe6yck.js","assets/card-Bru3x_SJ.js","assets/useAutosaveIndicator-DttGFwx7.js","assets/FoldCurtain-DUAOdtCt.js","assets/line-diff-DAcZgvm2.js","assets/DocumentFrameHeader-B61HhahB.js","assets/Dashboard--iaPJqJp.js","assets/flask-conical-CEYKkO5k.js","assets/layout-dashboard-DClZjSaR.js","assets/MootMark-DZAfkwdv.js","assets/useSharedPolling-D4Xn8mY2.js","assets/slots-Dw517dxP.js","assets/SidebarContext-CF3RWLxh.js","assets/plugins-CF2QITJB.js","assets/instance-settings-QXUWVmQs.js","assets/IssueReferenceActivitySummary-CbpSjmdV.js","assets/activity-format-zP89NM00.js","assets/MetricCard-DaAh5x_N.js","assets/ActiveAgentsPanel-CF0fwsze.js","assets/useQueries-BIJ7zVTy.js","assets/IssueChatThread-CMXzuvrF.js","assets/ConnectionSetupFlow-BaarToKu.js","assets/connection-identity-YKZfppDS.js","assets/queryClient-BOli2vjj.js","assets/collapsible-CqjPlqOa.js","assets/alert-dialog-Blls2GnU.js","assets/PathInstructionsModal-D4GUYKIT.js","assets/arrow-left-Ce_LIut0.js","assets/SearchableSelect-CIJ5K8ih.js","assets/command-Ca3v36Mu.js","assets/searchable-select-fvMNMcqm.js","assets/environment-variables-editor-0qgSPgNN.js","assets/eye-off-CVVA-EWh.js","assets/save-CJ1Iqyew.js","assets/user-round-CGxsJ0K8.js","assets/model-DidtFy-U.js","assets/proposal-review-kucrRJgS.js","assets/server-cog-DV4ua9lY.js","assets/secrets-CZifgF0J.js","assets/inbox-C08arfF_.js","assets/link-2-CND-9QZ2.js","assets/SetupWizard-C8qzkJn1.js","assets/skeleton-Bv_lQagE.js","assets/tools-B-L_sU_9.js","assets/AppLogo-CZr1Y48O.js","assets/assets-TRDkBfss.js","assets/toggle-switch-BHxNtSq9.js","assets/model-picker-fields-235ien8Z.js","assets/arrow-up-D_YoSnQD.js","assets/AgentMultiSelect-DsJfZtR2.js","assets/radio-card-DVZaXlw0.js","assets/JsonSchemaForm-ixDd6e-N.js","assets/schema-config-fields-DggSrP5S.js","assets/agent-config-primitives-BsZUnbf2.js","assets/adapter-display-registry-Bk0KWAHT.js","assets/environments-BLQs1ScE.js","assets/AgentSetupPrompt-DYBB5Med.js","assets/managed-sandbox-environment-B8DewKvK.js","assets/dynamic-loader-ehitOaJV.js","assets/adapters-Dp0USyWg.js","assets/use-adapter-capabilities-Bu8XkVZ9.js","assets/AgentCharacter-BTEn5MBu.js","assets/app-connect-policy-CUzbEnhU.js","assets/responsible-user-denial-Dyl0BwU5.js","assets/ComposerAddMenu-DNp4ecG8.js","assets/IssueThreadInteractionCard-wFidFTIh.js","assets/plug-VjpaJcMq.js","assets/interaction-card-visibility-DcyO470L.js","assets/interaction-audience-BRS_4X7S.js","assets/AgentMailCredentialField-L4T0REEW.js","assets/run-log-chunks-ZnzOvrXs.js","assets/useSecondTick-Gige2l0t.js","assets/IssueRecoveryActionCard-vAuL_OEC.js","assets/execution-projection-BGI5f3kX.js","assets/workspace-restore-Dz-CzQw6.js","assets/CommentAttributionChip-fz5Mn0RW.js","assets/LiveNowTodoLine-CP32NNp_.js","assets/AgentTodoCard-BvgkWD0T.js","assets/smoke-lab-matrix-0BhnGQeo.js","assets/DashboardLive-4rGeotay.js","assets/Companies-97toQ8Cw.js","assets/Agents-D5qI6yZZ.js","assets/useAgentChatEnabled-Chi_JXJj.js","assets/useHiddenSettings-CcaZfHLD.js","assets/health-DF7yrggW.js","assets/AgentRoleEditor-DTKNKZXs.js","assets/EntityRow-BIfupmlZ.js","assets/AgentDetail-DthxFfuB.js","assets/useInfiniteQuery-B28xptxn.js","assets/ScrollToBottom-jItsgDR8.js","assets/scroll-area-P1KpIQWe.js","assets/braces-BEVhwPeU.js","assets/chatEndpoints-BKsIHowE.js","assets/ConfigureBuiltInAgentModal-CQCHDkl4.js","assets/model-fallback-X_YvC3rj.js","assets/ResponsibleUserDenialNotice-DKNk1-BK.js","assets/user-x-CRO9YVVi.js","assets/omp-settings-model-uqWvMNr2.js","assets/ChoiceControls-3Qpci4yE.js","assets/SkillCardIcon-BTCafp8l.js","assets/CopyText-Cr673_Kx.js","assets/MembershipAction-CKs7Ua9x.js","assets/log-in-nSyhNjrD.js","assets/AgentActionButtons-CPIhsP04.js","assets/TrustPresetSection-CjNwNBo3.js","assets/EnforcementBanner-DWPluRU0.js","assets/shared-4LF6wQ38.js","assets/OmpAllSettings-B_Knr51Z.js","assets/Projects-BTAauZr0.js","assets/ProjectDetail-CmmdvUHn.js","assets/link-BITB8yRp.js","assets/BudgetPolicyCard-DfAAgk9Z.js","assets/AccessSelectIdentity-Dp--1kWe.js","assets/InlineEditor-BKBqNA21.js","assets/SummarySlotCard-D1C0qH2L.js","assets/useSummaryDraftStream-R2Y2bAUU.js","assets/budgets-DvML2uxG.js","assets/ProjectWorkspacesContent-BNNI_WAk.js","assets/ProjectWorkspaceDetail-BsA0hJ-k.js","assets/MissingPluginTabPlaceholder-DT47WyQq.js","assets/Workspaces-BTgSx9nA.js","assets/Issues-CsmM33z_.js","assets/Inbox-zllmqRcB.js","assets/issue-filters-BO9xiK0c.js","assets/ApprovalPayload-C4F3ItGH.js","assets/scroll-text-BpkOrME3.js","assets/Search-bmcm0_m_.js","assets/file-question-mark-CTomlKBX.js","assets/IssueDetail-DGdg-mB8.js","assets/IssueWriteDenialNotice-BCJ74Czu.js","assets/TerminalView-DZxK2Ei5.js","assets/clipboard-paste-D9rNPVFj.js","assets/rotate-cw-DnCrcS38.js","assets/terminal-font-B-qtwS34.js","assets/cloud-BktKFMPI.js","assets/file-search-DZpRLS-j.js","assets/folder-search-D0WkVTZt.js","assets/radio-DnDOdgWd.js","assets/settings-DuZndeX2.js","assets/browser-use-D2HTf8rD.js","assets/TaskTreeControls-DznugVpi.js","assets/code-xml-BWc3OvMt.js","assets/issueActiveRun-s6f-GUHq.js","assets/ApprovalCard-DrfZAdGQ.js","assets/issue-share-j9E_vLuf.js","assets/artifacts-9HWeqVeB.js","assets/AgentChats-f73hodzr.js","assets/recent-agent-chats-DIU_z_qg.js","assets/AgentChat-BAn_ghsu.js","assets/agentChats-CjHr739f.js","assets/IssueChatLongThreadPerf-D0HJe6IV.js","assets/Routines-4LevOfvV.js","assets/audit-navigation-IalprBz0.js","assets/FolderControls-L2RzbfdQ.js","assets/RoutineRunVariablesDialog-D_Mls1sV.js","assets/Pipelines-CY9hGe0h.js","assets/pipeline-stage-presentation-5UBw7nsb.js","assets/folder-git-2-D2Hz-CeQ.js","assets/pipelines-vN196fc4.js","assets/PipelineSettings-Dl-94FB5.js","assets/RoutineVariablesEditor-0dQ10yPY.js","assets/StatusCards-Dt3zorUZ.js","assets/wand-sparkles-BqnbLKl3.js","assets/PixelsOffice-BgyGZsiV.js","assets/coins-C6QoCoLN.js","assets/AttentionInteractionResolver-C2iz6oqT.js","assets/RoutineDetail-BT6_GKnC.js","assets/pen-line-CxWwoiP_.js","assets/webhook-BVBCKjlU.js","assets/WebhookUrlWarning-D0GLAS0A.js","assets/RoutineActivityRow-B69N6Hcy.js","assets/UserProfile-Dujv3qdz.js","assets/ExecutionWorkspaceDetail-BGV-9D5Y.js","assets/Goals-B-_gq_Qu.js","assets/GoalTree-kFpgH4dA.js","assets/Artifacts-CK8FaygC.js","assets/GoalDetail-D2VhPtvw.js","assets/Approvals-DZoMl7_m.js","assets/ApprovalDetail-sfPpfdXc.js","assets/CompanyActivity-DzNrAyAb.js","assets/AuditHub-DMhunMn8.js","assets/arrow-down-left-C8jhGqM0.js","assets/decision-models-CD2AFC2a.js","assets/fast-responses-DZodQpLv.js","assets/QuotaBar-_ok6Pek4.js","assets/WhatNeedsMe-C9P2EsqQ.js","assets/DecisionDateChips-CJOLtNrJ.js","assets/sun-_NIddwh7.js","assets/DecisionQueuePage-D-kNFav_.js","assets/BoardChat-C4W8JLKB.js","assets/circle-slash-Bx5HrFMb.js","assets/send-mNwfi_F1.js","assets/CompanySettings-4JQpzuS1.js","assets/DecisionModelSettings-D-OxKIGP.js","assets/CompanyConnections-ORCH4i3U.js","assets/CompanyEnvironments-DphURbtb.js","assets/BootstrapSetupUxLab-D58OwniR.js","assets/ResponsibleUserDenialUxLab-Bt9vnHJz.js","assets/CrossIssueCollaborationUxLab-CEh5B2iJ.js","assets/CompanySettingsPluginPage-cVvXh0_G.js","assets/CompanyAccess-CKhS1BaS.js","assets/AdvancedToolsRoute-BamlkE3p.js","assets/power-B3xsPeS4.js","assets/profile-summary-unutni_7.js","assets/useProfilesData-2L3_71Ql.js","assets/ProfileWizardRoute-DxLujEtD.js","assets/ToolsAdminGate-BI5-WYC3.js","assets/ProfileDetailRoute-BEBctbC6.js","assets/Browse-BDjohBak.js","assets/ManagedAiConnectionDetails-Ba0awZ-O.js","assets/retired-composio-DrxhEOpx.js","assets/connection-owner-DL4yKhSt.js","assets/AssistantConnection-BlKC7jk0.js","assets/AppsConnect-D8Gu187f.js","assets/skill-source-connect-return-C3vV7DQP.js","assets/ChatEndpointSetup-CM3QixMj.js","assets/EmailEndpointSetup-6OHb9B4q.js","assets/OpenwaGatewayManager-DH3bF7fa.js","assets/ChatEndpointDetail-C-IYAYG8.js","assets/EmailConnectionAccess-DAFMofYX.js","assets/ChatIdentityConfirm-DCI5BnWo.js","assets/AppsReview-DokFETm0.js","assets/ReviewQueueCard-BC6VY8Bc.js","assets/AppDetail-B6PtMl8J.js","assets/AppNotConnected-C_tGn786.js","assets/GatewaysList-B0Jq1IRC.js","assets/CopyableGatewayUrl-DxQsV7Hr.js","assets/GatewayDetail-CdXNQ9gD.js","assets/CompanySkills-BA_9Ztwj.js","assets/SkillBinaryFile-DNe-MmCv.js","assets/company-skill-routes-D5LJ1l8M.js","assets/SkillSources-jUDjqy5i.js","assets/SkillSourceTree--FWKWyF3.js","assets/SkillStudio-BsqtUnzF.js","assets/AgentIconPicker-D87bSkxE.js","assets/resizable-panels-Qjbo0P05.js","assets/IssueOutputSection-aSyiE1pg.js","assets/Secrets-DfR1fBAZ.js","assets/CompanyImport-DPKpUaRa.js","assets/agent-order-BE-pAWdx.js","assets/sidebarPreferences-vEHBC54I.js","assets/portable-files-CloN_vbk.js","assets/DesignGuide-D7486q4b.js","assets/RepositoryEditor-CFt-HPgf.js","assets/ThemeToggle-BWFlFnSX.js","assets/InstanceFeatures-DUQnBkxy.js","assets/useInstanceFeatureSettings-CEK6Xn3o.js","assets/AgentDefaults-BL1XYvEo.js","assets/ModelsAndProviders-gaR7HDQm.js","assets/InstanceAdvanced-B7tDfjwG.js","assets/InstanceAccess-Ns2rAmva.js","assets/ProfileSettings-Djo7BLIj.js","assets/PluginManager-4rrrAOLG.js","assets/PluginSettings-Cm4H1JRT.js","assets/AdapterManager-DUXWwNxv.js","assets/PluginPage-CMA4Ei50.js","assets/NewAgent-DBQzvxIr.js","assets/Auth-_P9t1YSS.js","assets/invite-memory-CHGcQdLs.js","assets/BoardClaim-CsomHmd6.js","assets/McpConnect-CYLP1yLX.js","assets/CliAuth-CRG0c0EH.js","assets/InviteLanding-brwa_8NC.js","assets/PublicIssueSharePage-DdPjfmD9.js","assets/JoinRequestQueue-ZZq3jWW-.js","assets/CompanyExport-XeVCUcK3.js","assets/Terminal-NjEb5-2b.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var L_=Object.defineProperty;var r=(e,t)=>L_(e,"name",{value:t,configurable:!0});import{i as Qg,n as z_,t as Xl}from"./rolldown-runtime-ZpX3ckPj.js";import{Ar as P_,At as U_,Bi as $_,C as Rk,Ei as B_,Fr as zh,Ir as K_,Lt as q_,Mi as Gg,Nr as F_,Or as H_,Ot as V_,P as W_,Pi as Ic,Pr as Dk,Qt as Yg,Ti as Q_,Vi as yy,_ as G_,_n as Y_,ei as Mk,i as jd,kr as X_,kt as Ok,l as X,n as Lk,na as Xg,ni as zk,r as ar,rr as Z_,t as Je,ta as J_,ti as Qa,vn as eE,w as jy,x as tE,zt as Ed}from"./createLucideIcon-DJi9suAC.js";import{l as Pk}from"./dist-SzpVz8Pd.js";import{t as ke}from"./preload-helper-CceJXRIF.js";import{_ as nE,a as Ph,c as sE,d as Zl,f as L,h as vn,n as Uh,p as aE,r as wi,s as iE,t as Zg,v as La,y as Uk}from"./star-BZgQbzhV.js";import{J as Jg,X as wn,Y as rE,_ as Kt,c as Tr,d as e0,f as lE,g as $k,h as ff,n as Si,r as we,t as U,u as oE,v as ge}from"./queryKeys-DYV5MhM_.js";import{t as mf}from"./queryClient-BOli2vjj.js";import{t as t0}from"./useQueries-BIJ7zVTy.js";import{a as cE,c as uE,i as n0,l as dE,o as Zn,u as wy}from"./companies-query-D9PxIiMT.js";import{N as ky,dt as fE,f as mE,ft as pE,k as hE,n as gE,p as xE,pt as bE,z as Bk}from"./ConnectionSetupFlow-BaarToKu.js";import{t as Kk}from"./issue-attribution-DfN_3u2W.js";import{t as vE}from"./execution-projection-BGI5f3kX.js";import{C as qk,D as yE,O as jE,T as wE,d as Fk,f as s0,k as $h,w as Hk}from"./connection-identity-YKZfppDS.js";import{n as vt,r as kE,t as SE}from"./CompanyContext-CSrVsSze.js";import{A as NE,B as Id,Bt as CE,C as AE,Ct as _E,E as EE,G as a0,H as IE,J as TE,Jt as Bh,L as Wu,O as RE,Q as Vk,Qt as DE,Rt as ME,Ut as Td,Yt as i0,Z as Sy,an as OE,b as LE,dt as Wk,f as Rd,i as zE,in as PE,n as Qk,nt as Pp,o as bs,ot as ac,p as pf,q as r0,r as Qe,t as gn,tt as hf,u as Gk,ut as Yk,v as Xk,zt as hn}from"./router-2UfGeejU.js";import{t as UE}from"./dist-BuHnL0GV.js";import{n as Zk,r as $E,t as Jk}from"./collapsible-CqjPlqOa.js";import{a as eS,c as tS,i as nS,l as BE,n as sS,o as aS,r as iS,s as rS,t as lS}from"./alert-dialog-Blls2GnU.js";import{a as Dd,n as Md,t as Od}from"./avatar-UO226cef.js";import{t as vi}from"./checkbox-BHQhs41k.js";import{a as oS,c as ki,i as Cn,n as Ny,o as KE,p as Wr,r as Qr,s as qE,t as Gr}from"./dropdown-menu-DEO3mF_E.js";import{t as FE}from"./scroll-area-P1KpIQWe.js";import{i as HE,r as VE,t as WE}from"./tabs-B2Os_leL.js";import{a as QE,o as GE,r as YE,s as XE,t as cS}from"./MarkdownEditor-DXD-Cu3u.js";import{o as xa,r as ba,t as va}from"./popover-BhYHYj7q.js";import{t as l0}from"./activity-CB9AQzZO.js";import{n as ZE}from"./PathInstructionsModal-D4GUYKIT.js";import{t as uS}from"./archive-CTfe4zq5.js";import{t as JE}from"./arrow-down-Dg4PKbmt.js";import{t as o0}from"./arrow-left-Ce_LIut0.js";import{t as eI}from"./arrow-right-BL5kYtCZ.js";import{t as tI}from"./arrow-up-down-Bpe9xqCo.js";import{t as nI}from"./arrow-up-right-BLYWl-we.js";import{t as dS}from"./arrow-up-D_YoSnQD.js";import{t as hc}from"./bot-C9arfJWx.js";import{t as fS}from"./boxes-fV98p9-r.js";import{t as sI}from"./braces-BEVhwPeU.js";import{t as aI}from"./calendar-clock-BVFltraz.js";import{t as Ta}from"./check-Ctsrlfa-.js";import{t as Br}from"./chevron-down-BCvxsWfI.js";import{t as mS}from"./chevron-left-DP4zwC0G.js";import{t as nr}from"./chevron-right-s7L6hXXq.js";import{t as iI}from"./chevron-up-rFDQGA-7.js";import{n as pS,t as rI}from"./SearchableSelect-CIJ5K8ih.js";import{t as hS}from"./circle-alert-C-L4OsHh.js";import{t as Ld}from"./circle-dot-zr8GONq2.js";import{t as Cy}from"./circle-question-mark-B1jR2is9.js";import{t as lI}from"./circle-IAHLDvLO.js";import{t as Kh}from"./AgentIconPicker-D87bSkxE.js";import{a as oI,c as cI,d as qh,i as Ay,l as uI,n as dI,o as gS,r as fI,s as mI,t as pI,u as Qu}from"./ComposerAddMenu-DNp4ecG8.js";import{t as hI}from"./clipboard-paste-D9rNPVFj.js";import{t as gI}from"./clock-CzrJT_cP.js";import{C as xI,D as bI,F as vI,O as xS,P as _y,k as yI,t as jI,w as wI}from"./MarkdownBody-BTjuUgFa.js";import{t as kI}from"./columns-3-CqC5nP-p.js";import{t as SI}from"./copy-_wvZOjTe.js";import{n as NI,t as CI}from"./package-CYC5MDhY.js";import{t as gf}from"./ellipsis-BTiLRUn4.js";import{t as bS}from"./external-link-nl1b263c.js";import{a as AI,d as _I,f as EI,g as II,h as TI,i as RI,l as DI,m as MI,p as OI,u as LI}from"./task-chat-attachments-jZNCAKd4.js";import{t as vS}from"./file-code-corner-CmZ_RihF.js";import{t as yS}from"./file-text-Cw7ntqRx.js";import{t as c0}from"./flag-R0AVTKGk.js";import{t as zI}from"./flask-conical-CEYKkO5k.js";import{t as jS}from"./folder-open-8WDYv4mw.js";import{t as PI}from"./funnel-DWwD2WCu.js";import{t as UI}from"./git-pull-request-CdCSG7CL.js";import{t as u0}from"./inbox-C08arfF_.js";import{t as d0}from"./key-round-0RqEOB_C.js";import{t as f0}from"./layout-dashboard-DClZjSaR.js";import{t as $I}from"./link-2-CND-9QZ2.js";import{r as As,t as le}from"./button-CMwV3L1P.js";import{t as BI}from"./RepositoryEditor-CFt-HPgf.js";import{t as wS}from"./maximize-2-DgliXYEr.js";import{t as KI}from"./minus-WOgDAWiC.js";import{n as Ra,t as qI}from"./ThemeToggle-BWFlFnSX.js";import{t as FI}from"./network-RCsafDTP.js";import{t as m0}from"./play-CJNuUj69.js";import{t as Js}from"./plus-C6fnr28l.js";import{t as Yr}from"./refresh-cw-B_Oki9wZ.js";import{t as kS}from"./repeat-DGPKlc5I.js";import{t as ic}from"./rotate-ccw-CQEJ4ewP.js";import{t as HI}from"./scroll-text-BpkOrME3.js";import{t as Kr}from"./search-04O7m-IF.js";import{t as VI}from"./send-mNwfi_F1.js";import{t as SS}from"./settings-DuZndeX2.js";import{t as WI}from"./shield-alert-Be9GuMrS.js";import{t as zd}from"./shield-check-B0HVjzM_.js";import{t as QI}from"./shield-question-mark-D1_en6pn.js";import{t as GI}from"./shield-BhaVQdWV.js";import{t as YI}from"./square-B2aH51tE.js";import{t as XI}from"./terminal-C0CKe_Zz.js";import{t as Fh}from"./trash-D7zTaHTj.js";import{t as Ja}from"./triangle-alert-CBVKiaXB.js";import{t as ZI}from"./user-round-CGxsJ0K8.js";import{t as Kl}from"./user-Ccom_Ph0.js";import{t as qr}from"./users-DyKzwIh4.js";import{t as is}from"./x-DRDFdlYE.js";import{a as JI,i as e3,n as t3,r as n3}from"./SetupWizard-C8qzkJn1.js";import{i as s3,n as a3,r as Jn,t as i3}from"./SidebarContext-CF3RWLxh.js";import{t as p0}from"./MootMark-DZAfkwdv.js";import{a as xf,c as r3,i as l3,n as Ge,o as Ey,r as o3,s as c3,t as NS}from"./SidebarNavItem-DV9nmC7O.js";import{n as Vl,t as er}from"./primary-sidebar-styles-BdMiagDc.js";import{i as _a,n as Ea,r as u3,t as Ia}from"./tooltip-B5WQ3lq5.js";import{t as Bn}from"./badge-DuA2EgZC.js";import{n as d3,t as Hh}from"./Identity-Cv_2a9qJ.js";import{t as ir}from"./AgentAvatar-DgGEobSY.js";import{a as Ni,n as bf,o as f3,r as m3,t as p3}from"./ToastContext-DMdt9oTd.js";import{t as $s}from"./agents-DmlgUVso.js";import{t as vf}from"./heartbeats-DOyojsaN.js";import{t as fs}from"./instanceSettings-D8g_QlS-.js";import{a as Up,c as h3,i as g3,l as x3,n as Iy,o as $p,r as b3,s as Vh,t as Ty}from"./agent-order-BE-pAWdx.js";import{n as gc,t as xc}from"./useSharedPolling-D4Xn8mY2.js";import{m as v3,s as y3}from"./inboxArchiveCache-D8QGdg49.js";import{n as Ry,t as rr}from"./projects-mixWrT5q.js";import{t as yf}from"./useAgentChatEnabled-Chi_JXJj.js";import{a as Jl,i as jf,n as za,o as j3,r as eo,s as Da,t as ya}from"./dialog-CKUblzlR.js";import{t as Wn}from"./input-DobnTAyB.js";import{t as Xa}from"./access-GAosX22P.js";import{a as w3,c as Wh,d as k3,f as Dy,h as Qi,i as S3,l as N3,m as My,n as C3,o as A3,p as Bp,r as CS,s as Qh,t as AS,u as Pd}from"./issue-filters-BO9xiK0c.js";import{a as ql,n as _S,r as Ur,t as Or}from"./assignees-DkQNbPzi.js";import{t as h0}from"./plugins-CF2QITJB.js";import{n as _3,r as E3,t as Yi}from"./instance-settings-QXUWVmQs.js";import{a as I3,c as g0,d as T3,f as R3,i as Oy,l as D3,m as M3,n as Gh,o as Tc,p as O3,r as L3,s as z3,t as x0,u as P3}from"./slots-Dw517dxP.js";import{t as Rc}from"./health-DF7yrggW.js";import{t as lr}from"./useHiddenSettings-CcaZfHLD.js";import{t as Ud}from"./sidebarPreferences-vEHBC54I.js";import{t as lt}from"./skeleton-Bv_lQagE.js";import{t as ES}from"./chatEndpoints-BKsIHowE.js";import{t as Ml}from"./tools-B-L_sU_9.js";import{t as U3}from"./AppLogo-CZr1Y48O.js";import{r as $3}from"./audit-navigation-IalprBz0.js";import{t as B3}from"./routines-KPtwxuS7.js";import{t as K3}from"./github-icon-Bbgf67tg.js";import{n as IS,t as q3}from"./BreadcrumbContext-BVZDZoC0.js";import{a as b0,c as Xi,i as Wa,l as F3,n as H3,o as jn,r as v0,s as y0,t as TS}from"./command-Ca3v36Mu.js";import{t as Wl}from"./AgentIdentity-I_kB4rMX.js";import{t as Yh}from"./secrets-CZifgF0J.js";import{t as RS}from"./textarea-BRPEfJ-g.js";import{t as DS}from"./assets-TRDkBfss.js";import{n as V3,r as W3}from"./recent-selections-BnN_nb6Y.js";import{a as $d,i as Bd,n as Xh,r as MS,t as Q3}from"./recent-assignees-DmalYaLf.js";import{t as G3}from"./attachment-icon-4xDiQblX.js";import{t as OS}from"./toggle-switch-BHxNtSq9.js";import{n as Y3,t as X3}from"./presentation-mode-Bk6TnKr9.js";import{a as Kp,c as Ly,d as Rr,g as Gu,h as zy,m as yi,o as Z3,s as Py,t as J3,v as Uy}from"./TaskChatComposerTakeoverContext-BJAHPHve.js";import{t as eT}from"./interaction-card-visibility-DcyO470L.js";import{r as tT}from"./useMobileEntityPickerViewportStyle-C3R37KtS.js";import{i as $y,n as nT,t as sT}from"./color-contrast-BHHcEMtO.js";import{t as j0}from"./InlineEntitySelector-v2Q4C8oT.js";import{r as aT}from"./searchable-select-fvMNMcqm.js";import{t as By}from"./InlineBanner-VQ5mstsR.js";import{t as Zh}from"./select-V0Hm_q4f.js";import{t as iT}from"./chip-DsDe6yck.js";import{t as rT}from"./environments-BLQs1ScE.js";import{t as w0}from"./clipboard-CTLKYvRL.js";import{n as lT,r as oT,t as cT}from"./AgentSetupPrompt-DYBB5Med.js";import{t as k0}from"./usePrefersReducedMotion-Dw81-akd.js";import{t as uT}from"./use-copy-action-D5dEzo6L.js";import{i as dT}from"./app-connect-policy-CUzbEnhU.js";import{t as Dc}from"./card-Bru3x_SJ.js";import{t as LS}from"./agentChats-CjHr739f.js";import{t as fT}from"./ThemeContext-DYRUK81c.js";import{t as Ya}from"./StatusIcon-0GcYXDdN.js";import{a as mT,d as pT,i as hT,l as gT,s as xT,t as bT}from"./issue-blockers-DLfa24KC.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 m of u.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&l(m)}).observe(document,{childList:!0,subtree:!0});function i(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(i,"getFetchOpts");function l(c){if(c.ep)return;c.ep=!0;const u=i(c);fetch(c.href,u)}r(l,"processPreload")}),"polyfill")();var vT="__wardmote_no_template__",Ky=/^paperclip(?=[:.])/,yT="skillStudio.runTemplate.",jT="__paperclip_no_template__";function wT(e){const t=[],i=[];for(let l=0;l<e.length;l+=1){const c=e.key(l);c!==null&&(Ky.test(c)&&t.push(c),c.startsWith(yT)&&i.push(c))}for(const l of t){const c=e.getItem(l),u=l.replace(Ky,"wardmote");c!==null&&e.getItem(u)===null&&e.setItem(u,c),e.removeItem(l)}for(const l of i)e.getItem(l)===jT&&e.setItem(l,vT)}r(wT,"migrateRetiredStorageKeys");for(const e of[()=>window.localStorage,()=>window.sessionStorage])try{wT(e())}catch{continue}function zS(e){return(typeof e=="string"?e:e?.name??"").trim()}r(zS,"rawNameOf");function PS(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(PS,"looksLikeNetworkAddress");function Jh(e){return e.split(/[\s._-]+/).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase()).join(" ")}r(Jh,"titleCaseIdentifier");function kT(e){const t=/^plugin:\s*(.+)$/i.exec(e);if(!t)return null;let i=t[1].trim();return i=i.slice(i.lastIndexOf(".")+1),i=i.replace(/^plugin[-_]/i,""),Jh(i)||"Custom app"}r(kT,"pluginPackageLabel");function ST(e,t={}){const i=t.title?.trim();if(i)return i;const l=zS(e);if(!l||PS(l))return"Custom app";const c=kT(l);if(c)return c;if(l.includes(":")&&!l.includes("://")){const u=l.slice(l.lastIndexOf(":")+1).trim();if(u)return Jh(u)}return/\s/.test(l)||/[A-Z]/.test(l)?l:/[._-]/.test(l)?Jh(l):l}r(ST,"humanizeConnectionDisplayName");function YW(e){const t=zS(e);return t&&PS(t)?`hosted at ${t}`:null}r(YW,"connectionDisplaySecondaryHint");var NT=864e5;function Ol(e){return e?.phase==="waiting"||e?.phase==="installing"}r(Ol,"isUpdateJobActive");function CT(e){return e+3*NT}r(CT,"updateNoticeHiddenUntil");function AT(e,t){return typeof e=="number"&&Number.isFinite(e)&&t<e}r(AT,"isUpdateNoticeHidden");var US={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"}]]};US.node;var _T=Je(US),$S={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["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"}]]};$S.node;var ET=Je($S),BS={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"}]]};BS.node;var IT=Je(BS),KS={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"}]]};KS.node;var TT=Je(KS),qS={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"]};qS.node;var qy=Je(qS),FS={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"]};FS.node;var HS=Je(FS),VS={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"]};VS.node;var WS=Je(VS),QS={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"]};QS.node;var RT=Je(QS),GS={name:"clock-3",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]};GS.node;var DT=Je(GS),YS={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"]};YS.node;var MT=Je(YS),XS={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"}]]};XS.node;var ZS=Je(XS),JS={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"}]]};JS.node;var eg=Je(JS),e1={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"}]]};e1.node;var OT=Je(e1),t1={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"}]]};t1.node;var LT=Je(t1),n1={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"}]]};n1.node;var zT=Je(n1),s1={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"}]]};s1.node;var PT=Je(s1),a1={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"]};a1.node;var UT=Je(a1),i1={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"}]]};i1.node;var $T=Je(i1),r1={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"]};r1.node;var BT=Je(r1),l1={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"}]]};l1.node;var KT=Je(l1),o1={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"}]]};o1.node;var tg=Je(o1),c1={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"}]]};c1.node;var qT=Je(c1),u1={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"}]]};u1.node;var FT=Je(u1),d1={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"}]]};d1.node;var f1=Je(d1),m1={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"}]]};m1.node;var HT=Je(m1),p1={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"}]]};p1.node;var wf=Je(p1),h1={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};h1.node;var g1=Je(h1),x1={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"}]]};x1.node;var ng=Je(x1),b1={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"}]]};b1.node;var VT=Je(b1),v1={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"}]]};v1.node;var y1=Je(v1),j1={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"}]]};j1.node;var WT=Je(j1),w1={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"}]]};w1.node;var k1=Je(w1),S1={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"}]]};S1.node;var N1=Je(S1),C1={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"}]]};C1.node;var QT=Je(C1),A1={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"}]]};A1.node;var GT=Je(A1),_1={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"}]]};_1.node;var S0=Je(_1),E1={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"}]]};E1.node;var YT=Je(E1),I1={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"]};I1.node;var N0=Je(I1),T1={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"}]]};T1.node;var XT=Je(T1),R1={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"}]]};R1.node;var ZT=Je(R1),D1={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"}]]};D1.node;var JT=Je(D1),M1={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"}]]};M1.node;var O1=Je(M1),L1={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"]};L1.node;var eR=Je(L1),z1={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"]};z1.node;var C0=Je(z1),P1={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"]};P1.node;var tR=Je(P1),U1={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"]};U1.node;var nR=Je(U1),$1={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"}]]};$1.node;var sR=Je($1),B1={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"}]]};B1.node;var aR=Je(B1),K1={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"}]]};K1.node;var q1=Je(K1),F1={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"}]]};F1.node;var iR=Je(F1),H1={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"}]]};H1.node;var rR=Je(H1),V1={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"}]]};V1.node;var W1=Je(V1),Q1={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"}]]};Q1.node;var lR=Je(Q1),G1={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"}]]};G1.node;var oR=Je(G1),Ll=Qg(Pk()),x=Qg(Xg(),1),Y1="wardmote.staleChunkReload";function cR(){try{return window.sessionStorage}catch{return null}}r(cR,"sessionStore");function uR(e){try{e?.removeItem(Y1)}catch{return}}r(uR,"clearReloadMark");function dR(e,t){if(!e)return!1;try{return e.getItem("wardmote.staleChunkReload")===t?!1:(e.setItem(Y1,t),!0)}catch{return!1}}r(dR,"markReloadOnce");function Ne(e,t={}){const i=t.reload??(()=>window.location.reload()),l=t.path??(()=>window.location.pathname);return(0,x.lazy)(async()=>{const c=t.storage===void 0?cR():t.storage;try{const u=await e();return uR(c),{default:u}}catch(u){if(!dR(c,l()))throw u;return i(),new Promise(()=>{})}})}r(Ne,"lazyPage");var st=r(e=>typeof e=="string","isString$1"),Zo=r(()=>{let e,t;const i=new Promise((l,c)=>{e=l,t=c});return i.resolve=e,i.reject=t,i},"defer"),qp=r(e=>e==null?"":String(e),"makeString"),fR=r((e,t,i)=>{e.forEach(l=>{t[l]&&(i[l]=t[l])})},"copy"),mR=/###/g,Fy=r(e=>e&&e.includes("###")?e.replace(mR,"."):e,"cleanKey"),Hy=r(e=>!e||st(e),"canNotTraverseDeeper"),rc=r((e,t,i)=>{const l=st(t)?t.split("."):t;let c=0;for(;c<l.length-1;){if(Hy(e))return{};const u=Fy(l[c]);!e[u]&&i&&(e[u]=new i),Object.prototype.hasOwnProperty.call(e,u)?e=e[u]:e={},++c}return Hy(e)?{}:{obj:e,k:Fy(l[c])}},"getLastOfPath"),Vy=r((e,t,i)=>{const{obj:l,k:c}=rc(e,t,Object);if(l!==void 0||t.length===1){l[c]=i;return}let u=t[t.length-1],m=t.slice(0,t.length-1),f=rc(e,m,Object);for(;f.obj===void 0&&m.length;)u=`${m[m.length-1]}.${u}`,m=m.slice(0,m.length-1),f=rc(e,m,Object),f?.obj&&typeof f.obj[`${f.k}.${u}`]<"u"&&(f.obj=void 0);f.obj[`${f.k}.${u}`]=i},"setPath"),pR=r((e,t,i,l)=>{const{obj:c,k:u}=rc(e,t,Object);c[u]=c[u]||[],c[u].push(i)},"pushPath"),Kd=r((e,t)=>{const{obj:i,k:l}=rc(e,t);if(i&&Object.prototype.hasOwnProperty.call(i,l))return i[l]},"getPath"),hR=r((e,t,i)=>{const l=Kd(e,i);return l!==void 0?l:Kd(t,i)},"getPathWithDefaults"),X1=r((e,t,i)=>{for(const l in t)l!=="__proto__"&&l!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,l)?st(e[l])||e[l]instanceof String||st(t[l])||t[l]instanceof String?i&&(e[l]=t[l]):X1(e[l],t[l],i):e[l]=t[l]);return e},"deepExtend"),ji=r(e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"regexEscape"),gR={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},xR=r(e=>st(e)?e.replace(/[&<>"'\/]/g,t=>gR[t]):e,"escape"),bR=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 i=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,i),this.regExpQueue.push(e),i}},vR=[" ",",","?","!",";"],yR=new bR(20),jR=r((e,t,i)=>{t=t||"",i=i||"";const l=vR.filter(m=>!t.includes(m)&&!i.includes(m));if(l.length===0)return!0;const c=yR.getRegExp(`(${l.map(m=>m==="?"?"\\?":m).join("|")})`);let u=!c.test(e);if(!u){const m=e.indexOf(i);m>0&&!c.test(e.substring(0,m))&&(u=!0)}return u},"looksLikeObjectPath"),sg=r((e,t,i=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const l=t.split(i);let c=e;for(let u=0;u<l.length;){if(!c||typeof c!="object")return;let m,f="";for(let h=u;h<l.length;++h)if(h!==u&&(f+=i),f+=l[h],m=c[f],m!==void 0){if(["string","number","boolean"].includes(typeof m)&&h<l.length-1)continue;u+=h-u+1;break}c=m}return c},"deepFind"),bc=r(e=>e?.replace(/_/g,"-"),"getCleanedCode"),wR={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)}},kR=class ag{static{r(this,"Logger")}constructor(t,i={}){this.init(t,i)}init(t,i={}){this.prefix=i.prefix||"i18next:",this.logger=t||wR,this.options=i,this.debug=i.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,i,l,c){return c&&!this.debug?null:(t=t.map(u=>st(u)?u.replace(/[\r\n\x00-\x1F\x7F]/g," "):u),st(t[0])&&(t[0]=`${l}${this.prefix} ${t[0]}`),this.logger[i](t))}create(t){return new ag(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new ag(this.logger,t)}},Ga=new kR,kf=class{static{r(this,"EventEmitter")}constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const l=this.observers[i].get(t)||0;this.observers[i].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 i=r((...l)=>{t(...l),this.off(e,i)},"wrapper");return this.on(e,i),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,l])=>{for(let c=0;c<l;c++)i(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,l])=>{for(let c=0;c<l;c++)i(e,...t)})}},Wy=class extends kf{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,i,l={}){const c=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator,u=l.ignoreJSONStructure!==void 0?l.ignoreJSONStructure:this.options.ignoreJSONStructure;let m;e.includes(".")?m=e.split("."):(m=[e,t],i&&(Array.isArray(i)?m.push(...i):st(i)&&c?m.push(...i.split(c)):m.push(i)));const f=Kd(this.data,m);return!f&&!t&&!i&&e.includes(".")&&(e=m[0],t=m[1],i=m.slice(2).join(".")),f||!u||!st(i)?f:sg(this.data?.[e]?.[t],i,c)}addResource(e,t,i,l,c={silent:!1}){const u=c.keySeparator!==void 0?c.keySeparator:this.options.keySeparator;let m=[e,t];i&&(m=m.concat(u?i.split(u):i)),e.includes(".")&&(m=e.split("."),l=t,t=m[1]),this.addNamespaces(t),Vy(this.data,m,l),c.silent||this.emit("added",e,t,i,l)}addResources(e,t,i,l={silent:!1}){for(const c in i)(st(i[c])||Array.isArray(i[c]))&&this.addResource(e,t,c,i[c],{silent:!0});l.silent||this.emit("added",e,t,i)}addResourceBundle(e,t,i,l,c,u={silent:!1,skipCopy:!1}){let m=[e,t];e.includes(".")&&(m=e.split("."),l=i,i=t,t=m[1]),this.addNamespaces(t);let f=Kd(this.data,m)||{};u.skipCopy||(i=JSON.parse(JSON.stringify(i))),l?X1(f,i,c):f={...f,...i},Vy(this.data,m,f),u.silent||this.emit("added",e,t,i)}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(i=>t[i]&&Object.keys(t[i]).length>0)}toJSON(){return this.data}},Z1={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,i,l,c){return e.forEach(u=>{t=this.processors[u]?.process(t,i,l,c)??t}),t}},J1=Symbol("i18next/PATH_KEY");function SR(){const e=[],t=Object.create(null);let i;return t.get=(l,c)=>(i?.revoke?.(),c===J1?e:(e.push(c),i=Proxy.revocable(l,t),i.proxy)),Proxy.revocable(Object.create(null),t).proxy}r(SR,"createProxy");function Fl(e,t){const{[J1]:i}=e(SR()),l=t?.keySeparator??".",c=t?.nsSeparator??":",u=t?.enableSelector==="strict";if(i.length>1&&c){const m=t?.ns,f=u?Array.isArray(m)?m:m?[m]:null:Array.isArray(m)?m:null;if(f&&(u?f:f.length>1?f.slice(1):[]).includes(i[0]))return`${i[0]}${c}${i.slice(1).join(l)}`}return i.join(l)}r(Fl,"keysFromSelector");var Fp=r(e=>!st(e)&&typeof e!="boolean"&&typeof e!="number","shouldHandleAsObject"),Qy=class eN extends kf{static{r(this,"Translator")}constructor(t,i={}){super(),fR(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=i,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Ga.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,i={interpolation:{}}){const l={...i};if(t==null)return!1;const c=this.resolve(t,l);if(c?.res===void 0)return!1;const u=Fp(c.res);return!(l.returnObjects===!1&&u)}extractFromKey(t,i){let l=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;l===void 0&&(l=":");const c=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator;let u=i.ns||this.options.defaultNS||[];const m=l&&t.includes(l),f=!this.options.userDefinedKeySeparator&&!i.keySeparator&&!this.options.userDefinedNsSeparator&&!i.nsSeparator&&!jR(t,l,c);if(m&&!f){const h=t.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:t,namespaces:st(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:st(u)?[u]:u}}translate(t,i,l){let c=typeof i=="object"?{...i}:i;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=Fl(t,{...this.options,...c})),Array.isArray(t)||(t=[String(t)]),t=t.map(Y=>typeof Y=="function"?Fl(Y,{...this.options,...c}):String(Y));const u=c.returnDetails!==void 0?c.returnDetails:this.options.returnDetails,m=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,_=k?.exactUsedKey||f,I=["[object Number]","[object Function]","[object RegExp]"],D=c.joinArrays!==void 0?c.joinArrays:this.options.joinArrays,T=!this.i18nFormat||this.i18nFormat.handleAsObject,C=c.count!==void 0&&!st(c.count),M=eN.hasDefaultValue(c),z=C?this.pluralResolver.getSuffix(y,c.count,c):"",K=c.ordinal&&C?this.pluralResolver.getSuffix(y,c.count,{ordinal:!1}):"",P=C&&!c.ordinal&&c.count===0,A=P&&c[`defaultValue${this.options.pluralSeparator}zero`]||c[`defaultValue${z}`]||c[`defaultValue${K}`]||c.defaultValue;let B=S;T&&!S&&M&&(B=A);const O=Fp(B),W=Object.prototype.toString.apply(B);if(T&&B&&O&&!I.includes(W)&&!(st(D)&&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 Y=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=Y,k.usedParams=this.getUsedParamsDetails(c),k):Y}if(m){const Y=Array.isArray(B),ce=Y?[]:{},oe=Y?_:N;for(const $ in B)if(Object.prototype.hasOwnProperty.call(B,$)){const R=`${oe}${m}${$}`;M&&!S?ce[$]=this.translate(R,{...c,defaultValue:Fp(A)?A[$]:void 0,joinArrays:!1,ns:h}):ce[$]=this.translate(R,{...c,joinArrays:!1,ns:h}),ce[$]===R&&(ce[$]=B[$])}S=ce}}else if(T&&st(D)&&Array.isArray(S))S=S.join(D),S&&(S=this.extendTranslation(S,t,c,l));else{let Y=!1,ce=!1;!this.isValidLookup(S)&&M&&(Y=!0,S=A),this.isValidLookup(S)||(ce=!0,S=f);const oe=(c.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&ce?void 0:S,$=M&&A!==S&&this.options.updateMissing;if(ce||Y||$){if(this.logger.log($?"updateKey":"missingKey",y,g,C&&!$?`${f}${this.pluralResolver.getSuffix(y,c.count,c)}`:f,$?A:S),m){const ae=this.resolve(f,{...c,keySeparator:!1});ae&&ae.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 R=[];const ne=this.languageUtils.getFallbackCodes(this.options.fallbackLng,c.lng||this.language);if(this.options.saveMissingTo==="fallback"&&ne&&ne[0])for(let ae=0;ae<ne.length;ae++)R.push(ne[ae]);else this.options.saveMissingTo==="all"?R=this.languageUtils.toResolveHierarchy(c.lng||this.language):R.push(c.lng||this.language);const ue=r((ae,Ee,fe)=>{const Ae=M&&fe!==S?fe:oe;this.options.missingKeyHandler?this.options.missingKeyHandler(ae,g,Ee,Ae,$,c):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(ae,g,Ee,Ae,$,c),this.emit("missingKey",ae,g,Ee,S)},"send");this.options.saveMissing&&(this.options.saveMissingPlurals&&C?R.forEach(ae=>{const Ee=this.pluralResolver.getSuffixes(ae,c);P&&c[`defaultValue${this.options.pluralSeparator}zero`]&&!Ee.includes(`${this.options.pluralSeparator}zero`)&&Ee.push(`${this.options.pluralSeparator}zero`),Ee.forEach(fe=>{ue([ae],f+fe,c[`defaultValue${fe}`]||A)})}):ue(R,f,A))}S=this.extendTranslation(S,t,c,k,l),ce&&S===f&&this.options.appendNamespaceToMissingKey&&(S=`${g}${v}${f}`),(ce||Y)&&this.options.parseMissingKeyHandler&&(S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${g}${v}${f}`:f,Y?S:void 0,c))}return u?(k.res=S,k.usedParams=this.getUsedParamsDetails(c),k):S}extendTranslation(t,i,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=st(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&&!st(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: ${i[0]}`),null):this.translate(...y,i),l)),l.interpolation&&this.interpolator.reset()}const m=l.postProcess||this.options.postProcess,f=st(m)?[m]:m;return t!=null&&f?.length&&l.applyPostProcessor!==!1&&(t=Z1.handle(f,t,i,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...c,usedParams:this.getUsedParamsDetails(l)},...l}:l,this)),t}resolve(t,i={}){let l,c,u,m,f;return st(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(h=>typeof h=="function"?Fl(h,{...this.options,...i}):h)),t.forEach(h=>{if(this.isValidLookup(l))return;const g=this.extractFromKey(h,i),v=g.key;c=v;let y=g.namespaces;this.options.fallbackNS&&(y=y.concat(this.options.fallbackNS));const j=i.count!==void 0&&!st(i.count),k=j&&!i.ordinal&&i.count===0,S=i.context!==void 0&&(st(i.context)||typeof i.context=="number")&&i.context!=="",N=i.lngs?i.lngs:this.languageUtils.toResolveHierarchy(i.lng||this.language,i.fallbackLng);y.forEach(_=>{this.isValidLookup(l)||(f=_,!this.checkedLoadedFor[`${N[0]}-${_}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(f)&&(this.checkedLoadedFor[`${N[0]}-${_}`]=!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(I=>{if(this.isValidLookup(l))return;m=I;const D=[v];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(D,v,I,_,i);else{let C;j&&(C=this.pluralResolver.getSuffix(I,i.count,i));const M=`${this.options.pluralSeparator}zero`,z=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(j&&(i.ordinal&&C.startsWith(z)&&D.push(v+C.replace(z,this.options.pluralSeparator)),D.push(v+C),k&&D.push(v+M)),S){const K=`${v}${this.options.contextSeparator||"_"}${i.context}`;D.push(K),j&&(i.ordinal&&C.startsWith(z)&&D.push(K+C.replace(z,this.options.pluralSeparator)),D.push(K+C),k&&D.push(K+M))}}let T;for(;T=D.pop();)this.isValidLookup(l)||(u=T,l=this.getResource(I,_,T,i))}))})}),{res:l,usedKey:c,exactUsedKey:u,usedLng:m,usedNS:f}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,i,l,c={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(t,i,l,c):this.resourceStore.getResource(t,i,l,c)}getUsedParamsDetails(t={}){const i=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],l=t.replace&&!st(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 i)delete c[u]}return c}static hasDefaultValue(t){const i="defaultValue";for(const l in t)if(Object.prototype.hasOwnProperty.call(t,l)&&l.startsWith(i)&&t[l]!==void 0)return!0;return!1}},Gy=class{static{r(this,"LanguageUtil")}constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Ga.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=bc(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=bc(e),!e||!e.includes("-"))return e;const t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(st(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(i=>{if(t)return;const l=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(l))&&(t=l)}),!t&&this.options.supportedLngs&&e.forEach(i=>{if(t)return;const l=this.getScriptPartFromCode(i);if(this.isSupportedCode(l))return t=l;const c=this.getLanguagePartFromCode(i);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)),st(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let i=e[t];return i||(i=e[this.getScriptPartFromCode(t)]),i||(i=e[this.formatLanguageCode(t)]),i||(i=e[this.getLanguagePartFromCode(t)]),i||(i=e.default),i||[]}toResolveHierarchy(e,t){const i=this.options.fallbackLng,l=Array.isArray(i)?i.join("|"):i;l!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=l);const c=t===void 0||t===!1||st(t),u=t===void 0&&typeof this.options.fallbackLng=="function",m=st(e)&&c&&!u;let f=null;if(m){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 st(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))):st(e)&&v(this.formatLanguageCode(e)),h.forEach(y=>{g.includes(y)||v(this.formatLanguageCode(y))}),f!==null?(this.resolveHierarchyCache[f]=g,g.slice()):g}},Yy={zero:0,one:1,two:2,few:3,many:4,other:5},Xy={select:r(e=>e===1?"one":"other","select"),resolvedOptions:r(()=>({pluralCategories:["one","other"]}),"resolvedOptions")},NR=class{static{r(this,"PluralResolver")}constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Ga.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){const i=bc(e==="dev"?"en":e),l=t.ordinal?"ordinal":"cardinal",c=JSON.stringify({cleanedCode:i,type:l});if(c in this.pluralRulesCache)return this.pluralRulesCache[c];let u;try{u=new Intl.PluralRules(i,{type:l})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),Xy;if(!e.match(/-|_/))return Xy;const f=this.languageUtils.getLanguagePartFromCode(e);u=this.getRule(f,t)}return this.pluralRulesCache[c]=u,u}needsPlural(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,i={}){return this.getSuffixes(e,i).map(l=>`${t}${l}`)}getSuffixes(e,t={}){let i=this.getRule(e,t);return i||(i=this.getRule("dev",t)),i?i.resolvedOptions().pluralCategories.sort((l,c)=>Yy[l]-Yy[c]).map(l=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${l}`):[]}getSuffix(e,t,i={}){const l=this.getRule(e,i);return l?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${l.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,i))}},Zy=r((e,t,i,l=".",c=!0)=>{let u=hR(e,t,i);return!u&&c&&st(i)&&(u=sg(e,i,l),u===void 0&&(u=sg(t,i,l))),u},"deepFindWithDefaults"),Jy=r(e=>e.replace(/\$/g,"$$$$"),"regexSafe"),ej=class{static{r(this,"Interpolator")}constructor(e={}){this.logger=Ga.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:i,useRawValueToEscape:l,prefix:c,prefixEscaped:u,suffix:m,suffixEscaped:f,formatSeparator:h,unescapeSuffix:g,unescapePrefix:v,nestingPrefix:y,nestingPrefixEscaped:j,nestingSuffix:k,nestingSuffixEscaped:S,nestingOptionsSeparator:N,maxReplaces:_,alwaysFormat:I}=e.interpolation;this.escape=t!==void 0?t:xR,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=l!==void 0?l:!1,this.prefix=c?ji(c):u||"{{",this.suffix=m?ji(m):f||"}}",this.formatSeparator=h||",",this.unescapePrefix=g?"":v?ji(v):"-",this.unescapeSuffix=this.unescapePrefix?"":g?ji(g):"",this.nestingPrefix=y?ji(y):j||ji("$t("),this.nestingSuffix=k?ji(k):S||ji(")"),this.nestingOptionsSeparator=N||",",this.maxReplaces=_||1e3,this.alwaysFormat=I!==void 0?I:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=r((t,i)=>t?.source===i?(t.lastIndex=0,t):new RegExp(i,"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,i,l){let c,u,m;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},h=r(y=>{if(!y.includes(this.formatSeparator)){const N=Zy(t,f,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(N,void 0,i,{...l,...t,interpolationkey:y}):N}const j=y.split(this.formatSeparator),k=j.shift().trim(),S=j.join(this.formatSeparator).trim();return this.format(Zy(t,f,k,this.options.keySeparator,this.options.ignoreJSONStructure),S,i,{...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(m=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=st(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!st(u)&&!this.useRawValueToEscape&&(u=qp(u));const k=y.safeValue(u);if(e=e.replace(c[0],Jy(k)),v?(y.regex.lastIndex+=k.length,y.regex.lastIndex-=c[0].length):y.regex.lastIndex=0,m++,m>=this.maxReplaces)break}}),e}nest(e,t,i={}){let l,c,u;const m=r((f,h)=>{const g=this.nestingOptionsSeparator;if(!f.includes(g))return f;const v=f.split(new RegExp(`${ji(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={...i},u=u.replace&&!st(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(m.call(this,l[1].trim(),u),u),c&&l[0]===e&&!st(c))return c;st(c)||(c=qp(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,i.lng,{...i,interpolationkey:l[1].trim()}),c.trim())),e=e.replace(l[0],Jy(qp(c))),this.regexp.lastIndex=0}return e}},CR=r(e=>{let t=e.toLowerCase().trim();const i={};if(e.includes("(")){const l=e.split("(");t=l[0].toLowerCase().trim();const c=l[1].slice(0,-1);t==="currency"&&!c.includes(":")?i.currency||(i.currency=c.trim()):t==="relativetime"&&!c.includes(":")?i.range||(i.range=c.trim()):c.split(";").forEach(u=>{if(u){const[m,...f]=u.split(":"),h=f.join(":").trim().replace(/^'+|'+$/g,""),g=m.trim();i[g]||(i[g]=h),h==="false"&&(i[g]=!1),h==="true"&&(i[g]=!0),isNaN(h)||(i[g]=parseInt(h,10))}})}return{formatName:t,formatOptions:i}},"parseFormatStr"),tj=r(e=>{const t={};return(i,l,c)=>{let u=c;c&&c.interpolationkey&&c.formatParams&&c.formatParams[c.interpolationkey]&&c[c.interpolationkey]&&(u={...u,[c.interpolationkey]:void 0});const m=l+JSON.stringify(u);let f=t[m];return f||(f=e(bc(l),c),t[m]=f),f(i)}},"createCachedFormatter"),AR=r(e=>(t,i,l)=>e(bc(i),l)(t),"createNonCachedFormatter"),_R=class{static{r(this,"Formatter")}constructor(e={}){this.logger=Ga.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";const i=t.cacheInBuiltFormats?tj:AR;this.formats={number:i((l,c)=>{const u=new Intl.NumberFormat(l,{...c});return m=>u.format(m)}),currency:i((l,c)=>{const u=new Intl.NumberFormat(l,{...c,style:"currency"});return m=>u.format(m)}),datetime:i((l,c)=>{const u=new Intl.DateTimeFormat(l,{...c});return m=>u.format(m)}),relativetime:i((l,c)=>{const u=new Intl.RelativeTimeFormat(l,{...c});return m=>u.format(m,c.range||"day")}),list:i((l,c)=>{const u=new Intl.ListFormat(l,{...c});return m=>u.format(m)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=tj(t)}format(e,t,i,l={}){if(!t||e==null)return e;const c=t.split(this.formatSeparator),u=[];for(let m=0;m<c.length;m++){let f=c[m];for(;f.indexOf("(")>-1&&!f.includes(")")&&m+1<c.length;)f=`${f}${this.formatSeparator}${c[++m]}`;u.push(f)}return u.reduce((m,f)=>{const{formatName:h,formatOptions:g}=CR(f);if(this.formats[h]){let v=m;try{const y=l?.formatParams?.[l.interpolationkey]||{},j=y.locale||y.lng||l.locale||l.lng||i;v=this.formats[h](m,j,{...g,...l,...y})}catch(y){this.logger.warn(y)}return v}else this.logger.warn(`there was no format function for ${h}`);return m},e)}},ER=r((e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},"removePending"),IR=class extends kf{static{r(this,"Connector")}constructor(e,t,i,l={}){super(),this.backend=e,this.store=t,this.services=i,this.languageUtils=i.languageUtils,this.options=l,this.logger=Ga.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?.(i,l.backend,l)}queueLoad(e,t,i,l){const c={},u={},m={},f={};return e.forEach(h=>{let g=!0;t.forEach(v=>{const y=`${h}|${v}`;!i.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||(m[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(m),toLoadNamespaces:Object.keys(f)}}loaded(e,t,i){const l=e.split("|"),c=l[0],u=l[1];t&&this.emit("failedLoading",c,u,t),!t&&i&&this.store.addResourceBundle(c,u,i,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&i&&(this.state[e]=0);const m={};this.queue.forEach(f=>{pR(f.loaded,[c],u),ER(f,e),t&&f.errors.push(t),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(h=>{m[h]||(m[h]={});const g=f.loaded[h];g.length&&g.forEach(v=>{m[h][v]===void 0&&(m[h][v]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",m),this.queue=this.queue.filter(f=>!f.done)}read(e,t,i,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:i,tried:l,wait:c,callback:u});return}this.readingCalls++;const m=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,i,l+1,c*2,u)},c);return}u(h,g)},"resolver"),f=this.backend[i].bind(this.backend);if(f.length===2){try{const h=f(e,t);h&&typeof h.then=="function"?h.then(g=>m(null,g)).catch(m):m(null,h)}catch(h){m(h)}return}return f(e,t,m)}prepareLoading(e,t,i={},l){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();st(e)&&(e=this.languageUtils.toResolveHierarchy(e)),st(t)&&(t=[t]);const c=this.queueLoad(e,t,i,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(u=>{this.loadOne(u)})}load(e,t,i){this.prepareLoading(e,t,{},i)}reload(e,t,i){this.prepareLoading(e,t,{reload:!0},i)}loadOne(e,t=""){const i=e.split("|"),l=i[0],c=i[1];this.read(l,c,"read",void 0,void 0,(u,m)=>{u&&this.logger.warn(`${t}loading namespace ${c} for language ${l} failed`,u),!u&&m&&this.logger.log(`${t}loaded namespace ${c} for language ${l}`,m),this.loaded(e,u,m)})}saveMissing(e,t,i,l,c,u={},m=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${i}" 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(!(i==null||i==="")){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,i,l,f):g=h(e,t,i,l),g&&typeof g.then=="function"?g.then(v=>m(null,v)).catch(m):m(null,g)}catch(g){m(g)}else h(e,t,i,l,m,f)}!e||!e[0]||this.store.addResource(e[0],t,i,l)}}},Hp=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]),st(e[1])&&(t.defaultValue=e[1]),st(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const i=e[3]||e[2];Object.keys(i).forEach(l=>{t[l]=i[l]})}return t},"overloadTranslationOptionHandler"),interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),"get"),nj=r(e=>(st(e.ns)&&(e.ns=[e.ns]),st(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),st(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),"transformOptions"),Yu=r(()=>{},"noop$1"),TR=r(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]=="function"&&(e[t]=e[t].bind(e))})},"bindMemberFunctions"),RR=class wd extends kf{static{r(this,"I18n")}constructor(t={},i){if(super(),this.options=nj(t),this.services={},this.logger=Ga,this.modules={external:[]},TR(this),i&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,i),this;setTimeout(()=>{this.init(t,i)},0)}}init(t={},i){this.isInitializing=!0,typeof t=="function"&&(i=t,t={}),t.defaultNS==null&&t.ns&&(st(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const l=Hp();this.options={...l,...this.options,...nj(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?Ga.init(c(this.modules.logger),this.options):Ga.init(null,this.options);let f;this.modules.formatter?f=this.modules.formatter:f=_R;const h=new Gy(this.options);this.store=new Wy(this.options.resources,this.options);const g=this.services;g.logger=Ga,g.resourceStore=this.store,g.languageUtils=h,g.pluralResolver=new NR(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 ej(this.options),g.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},g.backendConnector=new IR(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 Qy(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,i||(i=Yu),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=Zo(),m=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),i(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?m():setTimeout(m,0),u}loadResources(t,i=Yu){let l=i;const c=st(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=[],m=r(f=>{f&&f!=="cimode"&&this.services.languageUtils.toResolveHierarchy(f).forEach(h=>{h!=="cimode"&&(u.includes(h)||u.push(h))})},"append");c?m(c):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>m(f)),this.options.preload?.forEach?.(f=>m(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,i,l){const c=Zo();return typeof t=="function"&&(l=t,t=void 0),typeof i=="function"&&(l=i,i=void 0),t||(t=this.languages),i||(i=this.options.ns),l||(l=Yu),this.services.backendConnector.reload(t,i,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"&&Z1.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 i=0;i<this.languages.length;i++){const l=this.languages[i];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,i){this.isLanguageChangingTo=t;const l=Zo();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)),i&&i(f,(...g)=>this.t(...g))},"done"),m=r(f=>{!t&&!f&&this.services.languageDetector&&(f=[]);const h=st(f)?f:f&&f[0],g=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(st(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?m(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(m):this.services.languageDetector.detect(m):m(t),l}getFixedT(t,i,l,c){const u=c?.scopeNs,m=r((f,h,...g)=>{let v;typeof h!="object"?v=this.options.overloadTranslationOptionHandler([f,h].concat(g)):v={...h},v.lng=v.lng||m.lng,v.lngs=v.lngs||m.lngs;const y=v.ns!==void 0&&v.ns!==null;v.ns=v.ns||m.ns,v.keyPrefix!==""&&(v.keyPrefix=v.keyPrefix||l||m.keyPrefix);const j={...this.options,...v};Array.isArray(u)&&!y&&(j.ns=u),typeof v.keyPrefix=="function"&&(v.keyPrefix=Fl(v.keyPrefix,j));const k=this.options.keySeparator||".";let S;return v.keyPrefix&&Array.isArray(f)?S=f.map(N=>(typeof N=="function"&&(N=Fl(N,j)),`${v.keyPrefix}${k}${N}`)):(typeof f=="function"&&(f=Fl(f,j)),S=v.keyPrefix?`${v.keyPrefix}${k}${f}`:f),this.t(S,v)},"fixedT");return st(t)?m.lng=t:m.lngs=t,m.ns=i,m.keyPrefix=l,m}t(...t){return this.translator?.translate(...t)}exists(...t){return this.translator?.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,i={}){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=i.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 m=r((f,h)=>{const g=this.services.backendConnector.state[`${f}|${h}`];return g===-1||g===0||g===2},"loadNotPending");if(i.precheck){const f=i.precheck(this,m);if(f!==void 0)return f}return!!(this.hasResourceBundle(l,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||m(l,t)&&(!c||m(u,t)))}loadNamespaces(t,i){const l=Zo();return this.options.ns?(st(t)&&(t=[t]),t.forEach(c=>{this.options.ns.includes(c)||this.options.ns.push(c)}),this.loadResources(c=>{l.resolve(),i&&i(c)}),l):(i&&i(),Promise.resolve())}loadLanguages(t,i){const l=Zo();st(t)&&(t=[t]);const c=this.options.preload||[],u=t.filter(m=>!c.includes(m)&&this.services.languageUtils.isSupportedCode(m));return u.length?(this.options.preload=c.concat(u),this.loadResources(m=>{l.resolve(),i&&i(m)}),l):(i&&i(),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 i=["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 Gy(Hp());return t.toLowerCase().indexOf("-latn")>1?"ltr":i.includes(l.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},i){const l=new wd(t,i);return l.createInstance=wd.createInstance,l}cloneInstance(t={},i=Yu){const l=t.forkResourceStore;l&&delete t.forkResourceStore;const c={...this.options,...t,isClone:!0},u=new wd(c);if((t.debug!==void 0||t.prefix!==void 0)&&(u.logger=u.logger.clone(t)),["store","services","language"].forEach(m=>{u[m]=this[m]}),u.services={...this.services},u.services.utils={hasLoadedNamespace:u.hasLoadedNamespace.bind(u)},l){const m=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 Wy(m,c),u.services.resourceStore=u.store}if(t.interpolation){const m={...Hp().interpolation,...this.options.interpolation,...t.interpolation},f={...c,interpolation:m};u.services.interpolator=new ej(f)}return u.translator=new Qy(u.services,c),u.translator.on("*",(m,...f)=>{u.emit(m,...f)}),u.init(c,i),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}}},_s=RR.createInstance(),XW=_s.createInstance,ZW=_s.dir,JW=_s.init,eQ=_s.loadResources,tQ=_s.reloadResources,nQ=_s.use,sQ=_s.changeLanguage,aQ=_s.getFixedT,iQ=_s.t,rQ=_s.exists,lQ=_s.setDefaultNamespace,oQ=_s.hasLoadedNamespace,cQ=_s.loadNamespaces,uQ=_s.loadLanguages,DR=r((e,t,i,l)=>{const c=[i,{code:t,...l||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(c,"warn","react-i18next::",!0);Fr(c[0])&&(c[0]=`react-i18next:: ${c[0]}`),e?.services?.logger?.warn&&e.services.logger.warn(...c)},"warn"),sj={},kd=r((e,t,i,l)=>{Fr(i)&&sj[i]||(Fr(i)&&(sj[i]=new Date),DR(e,t,i,l))},"warnOnce"),tN=r((e,t)=>()=>{if(e.isInitialized)t();else{const i=r(()=>{setTimeout(()=>{e.off("initialized",i)},0),t()},"initialized");e.on("initialized",i)}},"loadedClb"),ig=r((e,t,i)=>{e.loadNamespaces(t,tN(e,i))},"loadNamespaces"),aj=r((e,t,i,l)=>{if(Fr(i)&&(i=[i]),e.options.preload&&e.options.preload.indexOf(t)>-1)return ig(e,i,l);i.forEach(c=>{e.options.ns.indexOf(c)<0&&e.options.ns.push(c)}),e.loadLanguages(t,tN(e,l))},"loadLanguages"),MR=r((e,t,i={})=>!t.languages||!t.languages.length?(kd(t,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:i.lng,precheck:r((l,c)=>{if(i.bindI18n&&i.bindI18n.indexOf("languageChanging")>-1&&l.services.backendConnector.backend&&l.isLanguageChangingTo&&!c(l.isLanguageChangingTo,e))return!1},"precheck")}),"hasLoadedNamespace"),Fr=r(e=>typeof e=="string","isString"),OR=r(e=>typeof e=="object"&&e!==null,"isObject"),LR=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,zR={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},PR=r(e=>zR[e],"unescapeHtmlEntity"),UR=r(e=>e.replace(LR,PR),"unescape"),rg={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:UR,transDefaultProps:void 0},$R=r((e={})=>{rg={...rg,...e}},"setDefaults"),BR=r(()=>rg,"getDefaults"),nN,KR=r(e=>{nN=e},"setI18n"),qR=r(()=>nN,"getI18n"),FR={type:"3rdParty",init(e){$R(e.options.react),KR(e)}},HR=(0,x.createContext)(),VR=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)}},WR=Xl((e=>{var t=Xg();function i(j,k){return j===k&&(j!==0||1/j===1/k)||j!==j&&k!==k}r(i,"is");var l=typeof Object.is=="function"?Object.is:i,c=t.useState,u=t.useEffect,m=t.useLayoutEffect,f=t.useDebugValue;function h(j,k){var S=k(),N=c({inst:{value:S,getSnapshot:k}}),_=N[0].inst,I=N[1];return m(function(){_.value=S,_.getSnapshot=k,g(_)&&I({inst:_})},[j,S,k]),u(function(){return g(_)&&I({inst:_}),j(function(){g(_)&&I({inst:_})})},[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})),QR=Xl(((e,t)=>{t.exports=WR()})),GR=QR(),YR=r((e,t)=>{if(Fr(t))return t;if(OR(t)&&Fr(t.defaultValue))return t.defaultValue;if(typeof e=="function")return"";if(Array.isArray(e)){const i=e[e.length-1];return typeof i=="function"?"":i}return e},"notReadyT"),XR={t:YR,ready:!1},ZR=r(()=>()=>{},"dummySubscribe"),JR=r((e,t={})=>{const{i18n:i}=t,{i18n:l,defaultNS:c}=(0,x.useContext)(HR)||{},u=i||l||qR();u&&!u.reportNamespaces&&(u.reportNamespaces=new VR),u||kd(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 m=(0,x.useMemo)(()=>({...BR(),...u?.options?.react,...t}),[u,t]),{useSuspense:f,keyPrefix:h}=m,g=e||c||u?.options?.defaultNS,v=Fr(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 ZR;const{bindI18n:O,bindI18nStore:W}=m,Y=r(()=>{j.current+=1,B()},"wrappedCallback");return O&&u.on(O,Y),W&&u.store.on(W,Y),()=>{O&&O.split(" ").forEach(ce=>u.off(ce,Y)),W&&W.split(" ").forEach(ce=>u.store.off(ce,Y))}},[u,m]),S=(0,x.useRef)(),N=(0,x.useCallback)(()=>{if(!u)return XR;const B=!!(u.isInitialized||u.initializedStoreOnce)&&y.every(oe=>MR(oe,u,m)),O=t.lng||u.language,W=j.current,Y=S.current;if(Y&&Y.ready===B&&Y.lng===O&&Y.keyPrefix===h&&Y.revision===W)return Y;const ce={t:u.getFixedT(O,m.nsMode==="fallback"?y:y[0],h,{scopeNs:y}),ready:B,lng:O,keyPrefix:h,revision:W};return S.current=ce,ce},[u,y,h,m,t.lng]),[_,I]=(0,x.useState)(0),{t:D,ready:T}=(0,GR.useSyncExternalStore)(k,N,N);(0,x.useEffect)(()=>{if(u&&!T&&!f){const B=r(()=>I(O=>O+1),"onLoaded");t.lng?aj(u,t.lng,y,B):ig(u,y,B)}},[u,t.lng,y,T,f,_]);const C=u||{},M=(0,x.useRef)(null),z=(0,x.useRef)(),K=r(B=>`${B.language}|${B.resolvedLanguage}|${B.languages?.join(",")}`,"languageKey"),P=r(B=>{const O=Object.getOwnPropertyDescriptors(B);O.__original&&delete O.__original;const W=Object.create(Object.getPrototypeOf(B),O);if(!Object.prototype.hasOwnProperty.call(W,"__original"))try{Object.defineProperty(W,"__original",{value:B,writable:!1,enumerable:!1,configurable:!1})}catch{}return W},"createI18nWrapper"),A=(0,x.useMemo)(()=>{const B=C,O=B&&K(B);let W=B;B&&(M.current&&M.current.__original===B?z.current!==O?(W=P(B),M.current=W,z.current=O):W=M.current:(W=P(B),M.current=W,z.current=O));const Y=!T&&!f?(...oe)=>(kd(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."),D(...oe)):D,ce=[Y,W,T];return ce.t=Y,ce.i18n=W,ce.ready=T,ce},[D,C,T,C.resolvedLanguage,C.language,C.languages]);if(u&&f&&!T){let B=!1;try{B=!1}catch{}throw B&&kd(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 W=r(()=>O(),"onLoaded");t.lng?aj(u,t.lng,y,W):ig(u,y,W)})}return A},"useTranslation$1"),eD={noCompanies:{title:"أنشئ شركتك الأولى",description:"ابدأ بإنشاء شركة.",newCompany:"شركة جديدة"}},tD={app:eD},nD={noCompanies:{title:"আপনার প্রথম কোম্পানি তৈরি করুন",description:"একটি কোম্পানি তৈরি করে শুরু করুন।",newCompany:"নতুন কোম্পানি"}},sD={app:nD},aD={noCompanies:{title:"Vytvořte svou první společnost",description:"Začněte vytvořením společnosti.",newCompany:"Nová společnost"}},iD={app:aD},rD={noCompanies:{title:"Opret din første virksomhed",description:"Kom i gang ved at oprette en virksomhed.",newCompany:"Ny virksomhed"}},lD={app:rD},oD={noCompanies:{title:"Erstellen Sie Ihr erstes Unternehmen",description:"Beginnen Sie, indem Sie ein Unternehmen erstellen.",newCompany:"Neues Unternehmen"}},cD={app:oD},uD={noCompanies:{title:"Δημιουργήστε την πρώτη σας εταιρεία",description:"Ξεκινήστε δημιουργώντας μια εταιρεία.",newCompany:"Νέα εταιρεία"}},dD={app:uD},fD={noCompanies:{title:"Create your first organization",description:"Get started by creating an organization.",newCompany:"New Organization"}},A0={app:fD},mD={noCompanies:{title:"Crea tu primera empresa",description:"Comienza creando una empresa.",newCompany:"Nueva empresa"}},pD={app:mD},hD={noCompanies:{title:"اولین شرکت خود را ایجاد کنید",description:"با ایجاد یک شرکت شروع کنید.",newCompany:"شرکت جدید"}},gD={app:hD},xD={noCompanies:{title:"Luo ensimmäinen yrityksesi",description:"Aloita luomalla yritys.",newCompany:"Uusi yritys"}},bD={app:xD},vD={noCompanies:{title:"Gumawa ng iyong unang kumpanya",description:"Magsimula sa paggawa ng kumpanya.",newCompany:"Bagong Kumpanya"}},yD={app:vD},jD={noCompanies:{title:"Créez votre première entreprise",description:"Commencez par créer une entreprise.",newCompany:"Nouvelle entreprise"}},wD={app:jD},kD={noCompanies:{title:"צרו את החברה הראשונה שלכם",description:"התחילו ביצירת חברה.",newCompany:"חברה חדשה"}},SD={app:kD},ND={noCompanies:{title:"अपनी पहली कंपनी बनाएं",description:"कंपनी बनाकर शुरुआत करें.",newCompany:"नई कंपनी"}},CD={app:ND},AD={noCompanies:{title:"Hozza létre első vállalatát",description:"Kezdje egy vállalat létrehozásával.",newCompany:"Új vállalat"}},_D={app:AD},ED={noCompanies:{title:"Buat perusahaan pertama Anda",description:"Mulai dengan membuat perusahaan.",newCompany:"Perusahaan Baru"}},ID={app:ED},TD={noCompanies:{title:"Crea la tua prima azienda",description:"Inizia creando un'azienda.",newCompany:"Nuova azienda"}},RD={app:TD},DD={noCompanies:{title:"最初の会社を作成",description:"会社を作成して始めましょう。",newCompany:"新しい会社"}},MD={app:DD},OD={noCompanies:{title:"첫 회사를 만드세요",description:"회사를 만들어 시작하세요.",newCompany:"새 회사"}},LD={app:OD},zD={noCompanies:{title:"तुमची पहिली कंपनी तयार करा",description:"कंपनी तयार करून सुरुवात करा.",newCompany:"नवीन कंपनी"}},PD={app:zD},UD={noCompanies:{title:"Cipta syarikat pertama anda",description:"Mulakan dengan mencipta syarikat.",newCompany:"Syarikat Baharu"}},$D={app:UD},BD={noCompanies:{title:"Opprett ditt første selskap",description:"Kom i gang ved å opprette et selskap.",newCompany:"Nytt selskap"}},KD={app:BD},qD={noCompanies:{title:"Maak uw eerste bedrijf aan",description:"Begin door een bedrijf aan te maken.",newCompany:"Nieuw bedrijf"}},FD={app:qD},HD={noCompanies:{title:"ਆਪਣੀ ਪਹਿਲੀ ਕੰਪਨੀ ਬਣਾਓ",description:"ਕੰਪਨੀ ਬਣਾਕੇ ਸ਼ੁਰੂ ਕਰੋ।",newCompany:"ਨਵੀਂ ਕੰਪਨੀ"}},VD={app:HD},WD={noCompanies:{title:"Utwórz swoją pierwszą firmę",description:"Zacznij od utworzenia firmy.",newCompany:"Nowa firma"}},QD={app:WD},GD={noCompanies:{title:"Crie sua primeira empresa",description:"Comece criando uma empresa.",newCompany:"Nova empresa"}},YD={app:GD},XD={noCompanies:{title:"Crie a sua primeira empresa",description:"Comece por criar uma empresa.",newCompany:"Nova empresa"}},ZD={app:XD},JD={noCompanies:{title:"Creați prima companie",description:"Începeți prin crearea unei companii.",newCompany:"Companie nouă"}},eM={app:JD},tM={noCompanies:{title:"Создайте свою первую компанию",description:"Начните с создания компании.",newCompany:"Новая компания"}},nM={app:tM},sM={noCompanies:{title:"Skapa ditt första företag",description:"Kom igång genom att skapa ett företag.",newCompany:"Nytt företag"}},aM={app:sM},iM={noCompanies:{title:"Unda kampuni yako ya kwanza",description:"Anza kwa kuunda kampuni.",newCompany:"Kampuni Mpya"}},rM={app:iM},lM={noCompanies:{title:"உங்கள் முதல் நிறுவனத்தை உருவாக்குங்கள்",description:"ஒரு நிறுவனத்தை உருவாக்கி தொடங்குங்கள்.",newCompany:"புதிய நிறுவனம்"}},oM={app:lM},cM={noCompanies:{title:"మీ మొదటి కంపెనీని సృష్టించండి",description:"కంపెనీని సృష్టించడం ద్వారా ప్రారంభించండి.",newCompany:"కొత్త కంపెనీ"}},uM={app:cM},dM={noCompanies:{title:"สร้างบริษัทแรกของคุณ",description:"เริ่มต้นด้วยการสร้างบริษัท",newCompany:"บริษัทใหม่"}},fM={app:dM},mM={noCompanies:{title:"İlk şirketinizi oluşturun",description:"Bir şirket oluşturarak başlayın.",newCompany:"Yeni Şirket"}},pM={app:mM},hM={noCompanies:{title:"Створіть свою першу компанію",description:"Почніть зі створення компанії.",newCompany:"Нова компанія"}},gM={app:hM},xM={noCompanies:{title:"اپنی پہلی کمپنی بنائیں",description:"کمپنی بنا کر شروع کریں۔",newCompany:"نئی کمپنی"}},bM={app:xM},vM={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"}},yM={app:vM},jM={noCompanies:{title:"创建您的第一家公司",description:"通过创建公司开始。",newCompany:"新公司"}},wM={app:jM},kM={noCompanies:{title:"建立您的第一家公司",description:"從建立公司開始。",newCompany:"新公司"}},SM={app:kM},NM=2e3;function ij(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}r(ij,"isPlainObject");function Ji(e){return e.length>0?e.join("."):"<root>"}r(Ji,"formatPath");function rj(e){return Array.from(e.matchAll(/{{\s*([A-Za-z0-9_.-]+)\s*}}/g),t=>t[1]).sort()}r(rj,"interpolationPlaceholders");function lj(e){return/<\/?[A-Za-z][A-Za-z0-9:-]*(?:\s[^>]*)?>/.test(e)}r(lj,"hasRawHtml");function oj(e){return/\son[A-Za-z]+\s*=/i.test(e)}r(oj,"hasEventHandlerAttribute");function cj(e){return Array.from(e.matchAll(/\bhttps?:\/\/[^\s<>"')]+/gi),t=>t[0]).sort()}r(cj,"urlsIn");function CM(e,t){const i=[[/<script\b/i.test(e),/<script\b/i.test(t),"<script"],[oj(e),oj(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:"],[lj(e),lj(t),"raw HTML tag"]].filter(([c,u])=>c&&!u).map(([,,c])=>c),l=new Set(cj(t));return cj(e).find(c=>!l.has(c))&&i.push("unexpected URL"),i}r(CM,"hasBlockedData");function AM(e,t,i,l){const c=rj(t),u=rj(i);c.join("\0")!==u.join("\0")&&l.push(`${Ji(e)} interpolation placeholders must match English exactly: expected ${JSON.stringify(u)}, received ${JSON.stringify(c)}`);for(const h of CM(t,i))l.push(`${Ji(e)} contains disallowed ${h}`);const m=Math.max(i.length*4+64,i.length+128),f=Math.min(NM,m);t.length>f&&l.push(`${Ji(e)} is too long: ${t.length} characters exceeds ${f}`)}r(AM,"validateString");function sN(e,t,i,l){if(typeof i=="string"){if(typeof t!="string"){l.push(`${Ji(e)} must be a string`);return}AM(e,t,i,l);return}if(!ij(i)){l.push(`${Ji(e)} has unsupported English reference type`);return}if(!ij(t)){l.push(`${Ji(e)} must be an object`);return}const c=Object.keys(i).sort(),u=Object.keys(t).sort(),m=c.filter(h=>!u.includes(h)),f=u.filter(h=>!c.includes(h));for(const h of m)l.push(`${Ji([...e,h])} is missing`);for(const h of f)l.push(`${Ji([...e,h])} is not defined in English`);for(const h of c)h in t&&sN([...e,h],t[h],i[h],l)}r(sN,"validateNode");function _M(e,t=A0){const i=[];return sN([],e,t,i),i}r(_M,"validateLocaleMessages");function EM(e,t=A0){const i=_M(e,t);if(i.length>0)throw new Error(`Invalid locale messages:
|
|
3
|
-
${i.join(`
|
|
4
|
-
`)}`)}r(EM,"assertValidLocaleMessages");var IM=Object.assign({"./locales/ar.json":tD,"./locales/bn.json":sD,"./locales/cs.json":iD,"./locales/da.json":lD,"./locales/de.json":cD,"./locales/el.json":dD,"./locales/en.json":A0,"./locales/es.json":pD,"./locales/fa.json":gD,"./locales/fi.json":bD,"./locales/fil.json":yD,"./locales/fr.json":wD,"./locales/he.json":SD,"./locales/hi.json":CD,"./locales/hu.json":_D,"./locales/id.json":ID,"./locales/it.json":RD,"./locales/ja.json":MD,"./locales/ko.json":LD,"./locales/mr.json":PD,"./locales/ms.json":$D,"./locales/nb.json":KD,"./locales/nl.json":FD,"./locales/pa.json":VD,"./locales/pl.json":QD,"./locales/pt-BR.json":YD,"./locales/pt-PT.json":ZD,"./locales/ro.json":eM,"./locales/ru.json":nM,"./locales/sv.json":aM,"./locales/sw.json":rM,"./locales/ta.json":oM,"./locales/te.json":uM,"./locales/th.json":fM,"./locales/tr.json":pM,"./locales/uk.json":gM,"./locales/ur.json":bM,"./locales/vi.json":yM,"./locales/zh-CN.json":wM,"./locales/zh-TW.json":SM}),Sf=Object.fromEntries(Object.entries(IM).map(([e,t])=>{const i=e.match(/\/([A-Za-z0-9_-]+)\.json$/)?.[1];if(!i)throw new Error(`Invalid locale file path: ${e}`);return[i,t]}));if(!("en"in Sf))throw new Error("Missing default locale messages for en");for(const[e,t]of Object.entries(Sf))try{EM(t)}catch(i){const l=i instanceof Error?i.message:String(i);throw new Error(`Invalid ${e} locale messages: ${l}`)}var TM=Object.keys(Sf),RM=Object.fromEntries(Object.entries(Sf).map(([e,t])=>[e,{translation:t}])),DM={resources:RM,lng:"en",fallbackLng:"en",supportedLngs:TM,defaultNS:"translation",interpolation:{escapeValue:!1},returnObjects:!1,initAsync:!1};_s.use(FR).init(DM).catch(e=>{});var aN=JR,s=Qg(J_(),1);function uj({collapsible:e,headerAction:t,label:i,menu:l}){const{isMobile:c}=Jn(),[u,m]=(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=X("h-3 w-3 shrink-0 text-ink-3/60 transition-all",g,e?.open&&"rotate-90",u&&"opacity-100"),y=X("h-5 w-5 shrink-0 text-ink-3/60 transition-opacity hover:text-ink data-[state=open]:opacity-100",g),j=(0,s.jsx)("span",{className:h,children:i}),k=t?.icon,S=f?(0,s.jsxs)(Gr,{open:u,onOpenChange:m,children:[(0,s.jsx)(Wr,{asChild:!0,children:(0,s.jsx)("button",{type:"button","data-slot":"icon-button",className:X("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??`${i} actions`,children:j})}),(0,s.jsxs)(Qr,{align:"start",className:"w-48",children:[l?.actions?.map((N,_)=>{if(N.type==="separator")return(0,s.jsx)(ki,{},`separator-${_}`);const I=N.icon,D=(0,s.jsxs)(s.Fragment,{children:[I?(0,s.jsx)(I,{className:"size-4"}):null,(0,s.jsx)("span",{children:N.label})]});return N.href?(0,s.jsx)(Cn,{asChild:!0,children:(0,s.jsx)(gn,{to:N.href,children:D})},`${N.label}-${_}`):(0,s.jsx)(Cn,{onSelect:N.onSelect,children:D},`${N.label}-${_}`)}),l?.radioChoices&&l.radioChoices.length>0?(0,s.jsx)(KE,{value:l.radioValue,onValueChange:l.onRadioValueChange,"aria-label":l.radioLabel,children:l.radioChoices.map(N=>(0,s.jsx)(qE,{value:N.value,children:N.label},N.value))}):null]})]}):(0,s.jsx)("div",{className:"inline-flex min-w-0 max-w-full items-center px-1 py-0.5",children:j});return(0,s.jsx)("div",{className:"group/sidebar-section px-3 py-1.5 pointer-coarse:py-1",children:(0,s.jsxs)("div",{className:"relative flex min-h-6 min-w-0 items-center gap-1",children:[e?(0,s.jsx)($E,{asChild:!0,children:(0,s.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 ${i}`:`Expand ${i}`,children:(0,s.jsx)(nr,{className:v,"aria-hidden":"true"})})}):null,S,t&&k?(0,s.jsx)(le,{variant:"ghost",size:"icon-xs",className:y,"aria-label":t.ariaLabel,onClick:t.onClick,children:(0,s.jsx)(k,{className:"h-3.5 w-3.5"})}):null]})})}r(uj,"SidebarSectionHeader");function qd({label:e,children:t,collapsible:i,menu:l,headerAction:c}){const{collapsed:u,peeking:m}=Jn(),f=o3(),h=u&&!m&&!f,g=(0,s.jsx)("div",{className:"flex flex-col gap-0.5 mt-0.5",children:t});return h?(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"px-3 py-1.5 pointer-coarse:py-1",children:(0,s.jsxs)("div",{className:"flex min-h-6 items-center",children:[(0,s.jsx)("span",{className:"sr-only",children:e}),(0,s.jsx)("div",{className:"h-px w-full bg-line/60","aria-hidden":"true"})]})}),g]}):i?(0,s.jsxs)(Jk,{open:i.open,onOpenChange:i.onOpenChange,children:[(0,s.jsx)(uj,{label:e,collapsible:i,menu:l,headerAction:c}),(0,s.jsx)(Zk,{children:g})]}):(0,s.jsxs)("div",{children:[(0,s.jsx)(uj,{label:e,menu:l,headerAction:c}),g]})}r(qd,"SidebarSection");var iN=(0,x.createContext)(null),MM=iN.Provider;function Nf(e){const t=(0,x.useContext)(iN);return t&&(!e||t.companyId===e)?t:null}r(Nf,"usePrimaryAgentPresentation");function dQ({agentId:e,companyId:t}){const i=Nf(t);return!i||i.loading||i.primaryAgentId!==e?null:(0,s.jsxs)(Ia,{children:[(0,s.jsx)(_a,{asChild:!0,children:(0,s.jsx)("span",{role:"img","aria-label":"My primary agent",className:"inline-flex shrink-0 text-accent",children:(0,s.jsx)(Yk,{"aria-hidden":"true",className:"size-3.5"})})}),(0,s.jsx)(Ea,{children:"My primary agent"})]})}r(dQ,"PrimaryAgentIndicator");function fQ({agent:e}){const t=Nf(e.companyId);if(!t||e.status==="terminated"||e.status==="pending_approval")return null;if(t.error)return(0,s.jsx)(le,{type:"button",variant:"danger",size:"sm",onClick:t.onRetry,className:"h-auto justify-start p-0 text-xs",children:"Retry loading primary agent"});const i=t.primaryAgentId===e.id,l=t.pendingAgentId===e.id;if(i&&!l&&!t.loading)return null;const c=t.primaryAgent?.id===t.primaryAgentId?t.primaryAgent:null,u=t.loading||!!(t.primaryAgentId&&!c),m=u||!!t.pendingAgentId,f=(0,s.jsxs)(le,{type:"button",variant:"link",size:"sm",disabled:m,onClick:t.primaryAgentId?void 0:()=>t.onChange(e.id),className:"h-auto justify-start p-0 text-xs",children:[l||u?(0,s.jsx)(As,{"aria-hidden":"true",className:"size-3 motion-safe:animate-spin"}):null,u?"Loading primary…":l?"Setting primary…":"Set as my primary"]});return c?(0,s.jsxs)(lS,{children:[(0,s.jsx)(BE,{asChild:!0,children:f}),(0,s.jsxs)(nS,{children:[(0,s.jsxs)("div",{className:"flex items-start justify-center gap-5 pt-2",children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-center gap-2 text-center",children:[(0,s.jsx)(ir,{agent:c,size:64,label:`${c.name} avatar`}),(0,s.jsx)("span",{className:"max-w-full break-words text-sm font-medium",children:c.name})]}),(0,s.jsx)(eI,{"aria-hidden":"true",className:"mt-5 size-6 shrink-0 text-ink-3"}),(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col items-center gap-2 text-center",children:[(0,s.jsx)(ir,{agent:e,size:64,label:`${e.name} avatar`,className:"rounded-xl ring-1 ring-accent ring-offset-2 ring-offset-bg"}),(0,s.jsxs)("span",{className:"flex max-w-full items-center justify-center gap-1.5 text-sm font-medium",children:[(0,s.jsx)("span",{className:"min-w-0 break-words",children:e.name}),(0,s.jsx)("span",{role:"img","aria-label":"New primary agent",className:"inline-flex shrink-0 text-accent",children:(0,s.jsx)(Yk,{"aria-hidden":"true",className:"size-3.5"})})]})]})]}),(0,s.jsxs)(rS,{children:[(0,s.jsx)(tS,{children:"Change your primary agent?"}),(0,s.jsxs)(eS,{className:"break-words",children:["This will make ",e.name," your primary agent, do you want to do this?"]})]}),(0,s.jsxs)(aS,{className:"flex-row justify-between sm:justify-between",children:[(0,s.jsx)(iS,{children:"Cancel"}),(0,s.jsx)(sS,{disabled:m,onClick:r(()=>t.onChange(e.id),"onClick"),children:"Set as my primary"})]})]})]},c.id):f}r(fQ,"SetPrimaryAgentButton");var rN=(0,x.createContext)(null),lN=(0,x.createContext)(null);function OM({children:e}){const[t,i]=(0,x.useState)(!1),[l,c]=(0,x.useState)({}),[u,m]=(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,_]=(0,x.useState)({}),[I,D]=(0,x.useState)(!1),T=(0,x.useCallback)((oe={})=>{c(oe),i(!0)},[]),C=(0,x.useCallback)(()=>{i(!1),c({})},[]),M=(0,x.useCallback)(()=>{m(!0)},[]),z=(0,x.useCallback)(()=>{m(!1)},[]),K=(0,x.useCallback)((oe={})=>{v(oe),h(!0)},[]),P=(0,x.useCallback)(()=>{h(!1),v({})},[]),A=(0,x.useCallback)(()=>{j(!0)},[]),B=(0,x.useCallback)(()=>{j(!1)},[]),O=(0,x.useCallback)((oe={})=>{_(oe),S(!0)},[]),W=(0,x.useCallback)(()=>{S(!1),_({})},[]),Y=(0,x.useMemo)(()=>({newIssueOpen:t,newIssueDefaults:l,newProjectOpen:u,newGoalOpen:f,newGoalDefaults:g,newAgentOpen:y,onboardingOpen:k,onboardingOptions:N,onboardingRouteDismissed:I}),[t,l,u,f,g,y,k,N,I]),ce=(0,x.useMemo)(()=>({openNewIssue:T,closeNewIssue:C,openNewProject:M,closeNewProject:z,openNewGoal:K,closeNewGoal:P,openNewAgent:A,closeNewAgent:B,openOnboarding:O,closeOnboarding:W,setOnboardingRouteDismissed:D}),[T,C,M,z,K,P,A,B,O,W,D]);return(0,s.jsx)(lN.Provider,{value:ce,children:(0,s.jsx)(rN.Provider,{value:Y,children:e})})}r(OM,"DialogProvider");function Pa(){const e=(0,x.useContext)(lN);if(!e)throw new Error("useDialogActions must be used within DialogProvider");return e}r(Pa,"useDialogActions");function Cf(){const e=(0,x.useContext)(rN);if(!e)throw new Error("useDialogState must be used within DialogProvider");return e}r(Cf,"useDialogState");function Mc(){return{...Cf(),...Pa()}}r(Mc,"useDialog");var LM={list:r(e=>we.get(`/companies/${e}/built-in-agents`),"list"),provision:r((e,t,i={})=>we.post(`/companies/${e}/built-in-agents/${t}/provision`,i),"provision"),reset:r((e,t,i)=>we.post(`/companies/${e}/built-in-agents/${t}/reset`,i?{resources:i}:{}),"reset"),reconcile:r((e,t)=>we.post(`/companies/${e}/built-in-agents/${t}/reconcile`,{}),"reconcile"),runRoutine:r((e,t,i)=>we.post(`/companies/${e}/built-in-agents/${t}/routines/${i}/run`,{}),"runRoutine"),enableRoutineSchedule:r((e,t,i)=>we.post(`/companies/${e}/built-in-agents/${t}/routines/${i}/enable`,{}),"enableRoutineSchedule"),disableRoutineSchedule:r((e,t,i)=>we.post(`/companies/${e}/built-in-agents/${t}/routines/${i}/disable`,{}),"disableRoutineSchedule")};function zM({status:e,compact:t=!1,className:i}){if(e!=="needs_setup"&&e!=="pending_approval")return null;const l=e==="pending_approval";return(0,s.jsx)(Bn,{variant:"outline",className:X(EE.amber,t&&"px-1.5 py-0 text-(length:--text-nano)",i),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(zM,"BuiltInLifecycleChip");function Vp(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i+=1)if(e[i]!==t[i])return!1;return!0}r(Vp,"areEqual$2");function Wp(e,t,i){return Vh(e,t,i).map(l=>l.id)}r(Wp,"buildOrderIds$2");function PM({agents:e,companyId:t,userId:i}){const l=(0,x.useMemo)(()=>({leadershipFirst:!0}),[]),c=(0,x.useMemo)(()=>t?b3(t,i):null,[t,i]),[u,m]=(0,x.useState)(()=>c?Wp(e,Up(c),l):e.map(f=>f.id));return(0,x.useEffect)(()=>{const f=c?Wp(e,Up(c),l):e.map(h=>h.id);m(h=>Vp(h,f)?h:f)},[e,c,l]),(0,x.useEffect)(()=>{if(!c)return;const f=r(v=>{const y=Wp(e,v,l);m(j=>Vp(j,y)?j:y)},"syncFromIds"),h=r(v=>{v.key===c&&f(Up(c))},"onStorage"),g=r(v=>{const y=v.detail;!y||y.storageKey!==c||f(y.orderedIds)},"onCustomEvent");return window.addEventListener("storage",h),window.addEventListener(Ty,g),()=>{window.removeEventListener("storage",h),window.removeEventListener(Ty,g)}},[e,c,l]),{orderedAgents:(0,x.useMemo)(()=>Vh(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 Vh(e,[],l))g.includes(v.id)||g.push(v.id);m(v=>Vp(v,g)?v:g),c&&h3(c,g)},[e,c,l])}}r(PM,"useAgentOrder");var lg={listMine:r(e=>we.get(`/companies/${e}/resource-memberships/me`),"listMine"),updateProject:r((e,t,i)=>we.put(`/companies/${e}/resource-memberships/me/projects/${t}`,i),"updateProject"),updateAgent:r((e,t,i)=>we.put(`/companies/${e}/resource-memberships/me/agents/${t}`,i),"updateAgent")};function UM(){return{projectMemberships:{},agentMemberships:{},starredProjectIds:[],starredAgentIds:[],starredDocumentIds:[],projectStarredAt:{},agentStarredAt:{},documentStarredAt:{},updatedAt:null}}r(UM,"emptyMemberships");function $M(e){return e==="project"?{ids:"starredProjectIds",at:"projectStarredAt",state:"projectMemberships"}:{ids:"starredAgentIds",at:"agentStarredAt",state:"agentMemberships"}}r($M,"starKeys");function dj(e,t,i,l){const c=e??UM(),u=$M(t),m=c[u.state]??{},f=m[i]==="left"?"left":"joined",h=l.starred===!0?"joined":l.state??f,g=c[u.ids]??[],v={...c[u.at]??{}},y=g.includes(i),j=h==="left"?!1:l.starred===!0?!0:l.starred===!1?!1:y;let k=g;return j&&!y?(k=[i,...g],v[i]=new Date):!j&&y&&(k=g.filter(S=>S!==i),delete v[i]),{...c,[u.state]:{...m,[i]:h},[u.ids]:k,[u.at]:v,updatedAt:new Date}}r(dj,"applyMembershipChange");function oN(e,t,i){return(t==="project"?e?.projectMemberships[i]:e?.agentMemberships[i])==="left"?"left":"joined"}r(oN,"resourceMembershipState");function cN(e,t,i){const l=t==="project"?e?.starredProjectIds:t==="agent"?e?.starredAgentIds:e?.starredDocumentIds;return Array.isArray(l)&&l.includes(i)}r(cN,"isStarred");function uN(e,t){const i=t==="project"?e?.starredProjectIds:t==="agent"?e?.starredAgentIds:e?.starredDocumentIds;return Array.isArray(i)?i:[]}r(uN,"starredResourceIds");function _0(e){return ge({queryKey:U.resourceMemberships.mine(e??"__none__"),queryFn:r(()=>lg.listMine(e),"queryFn"),enabled:!!e})}r(_0,"useResourceMemberships");function dN(e){const t=wn(),{pushToast:i}=Ni(),l=U.resourceMemberships.mine(e??"__none__");return Kt({mutationFn:r(c=>{if(!e)throw new Error("Select an organization first.");const u={state:c.state,starred:c.starred};return c.resourceType==="project"?lg.updateProject(e,c.resourceId,u):lg.updateAgent(e,c.resourceId,u)},"mutationFn"),onMutate:r(async c=>{await t.cancelQueries({queryKey:l});const u=t.getQueryData(l);return t.setQueryData(l,dj(u,c.resourceType,c.resourceId,{state:c.state,starred:c.starred})),{previous:u}},"onMutate"),onError:r((c,u,m)=>{m?.previous&&t.setQueryData(l,m.previous);const f=u.starred!==void 0?u.starred?"star":"unstar":u.state==="left"?"leave":"join";i({title:`Couldn't ${f} ${u.resourceName}.`,body:c instanceof Error?c.message:"Try again.",tone:"error"})},"onError"),onSuccess:r((c,u)=>{t.setQueryData(l,m=>dj(m,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(dN,"useResourceMembershipMutation");var BM={healthy:"bg-emerald-500/90 text-white",warning:"bg-amber-500/95 text-amber-950",critical:"bg-red-500/90 text-white"},KM={healthy:"Budget healthy",warning:"Budget warning",critical:"Paused by budget"};function fN({title:e,level:t="critical"}){const i=e??KM[t];return(0,s.jsx)("span",{title:i,"aria-label":i,className:`ml-auto inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full shadow-(--shadow-extract-3) ${BM[t]}`,children:(0,s.jsx)(ZS,{className:"h-3 w-3"})})}r(fN,"BudgetSidebarMarker");var qM="opacity-100 sm:opacity-0 sm:transition-opacity sm:group-hover:opacity-100 sm:group-focus-within:opacity-100";function mN({starred:e,resourceName:t,pending:i=!1,error:l=!1,size:c="row",onToggle:u,quiet:m=!1,className:f,revealClassName:h}){const g=e?`Unstar ${t}`:`Star ${t}`,v=i?As:Zg;function y(j){j.preventDefault(),j.stopPropagation(),!i&&u(!e)}return r(y,"handleClick"),c==="button"?(0,s.jsx)(le,{type:"button",size:"icon-sm",variant:"ghost","aria-label":g,"aria-pressed":e,"aria-busy":i?"true":void 0,disabled:i,onClick:y,title:l?"Couldn't save — retry":void 0,className:f,children:(0,s.jsx)(v,{className:X("h-4 w-4",i&&"motion-safe:animate-spin",!i&&l&&"text-bad",!i&&e&&!l&&"fill-amber-500 text-amber-500",!i&&l&&"text-red-500")})}):(0,s.jsx)(le,{type:"button",size:"icon-xs",variant:"ghost","aria-label":g,"aria-pressed":e,"aria-busy":i?"true":void 0,disabled:i,onClick:y,title:l?"Couldn't save — retry":void 0,className:X("h-6 w-6 shrink-0",l||i||e&&!m?"opacity-100":h??qM,f),children:(0,s.jsx)(v,{className:X("h-3.5 w-3.5",i&&"motion-safe:animate-spin",!i&&l&&"text-red-500",!i&&!l&&e&&"fill-amber-500 text-amber-500",!i&&!l&&!e&&"text-ink-3")})})}r(mN,"StarToggle");var FM=3,fj=12e4,HM=[{value:"top",label:"Top"},{value:"alphabetical",label:"Alphabetical"},{value:"recent",label:"Recent"}];function _l(e,t){const i=e[t];if(!i)return 0;const l=new Date(i).getTime();return Number.isFinite(l)?l:0}r(_l,"agentTimestamp");function mj(e,t){if(t==="top")return e;const i=[...e];return t==="alphabetical"?(i.sort((l,c)=>l.name.localeCompare(c.name,void 0,{sensitivity:"base"})),i):(i.sort((l,c)=>{const u=_l(c,"lastHeartbeatAt")-_l(l,"lastHeartbeatAt");if(u!==0)return u;const m=_l(c,"updatedAt")-_l(l,"updatedAt");if(m!==0)return m;const f=_l(c,"createdAt")-_l(l,"createdAt");return f!==0?f:l.name.localeCompare(c.name,void 0,{sensitivity:"base"})}),i)}r(mj,"sortAgents");var VM="opacity-0 transition-opacity group-hover/agent:opacity-100 group-focus-within/agent:opacity-100";function WM({activeAgentId:e,activeTab:t,agent:i,disabled:l,isMobile:c,leaving:u,onLeaveAgent:m,onPauseResume:f,rail:h,runCount:g,setSidebarOpen:v,builtInStatus:y,starred:j=!1,onToggleStar:k,starPending:S=!1}){const N=ar(i),_=t?`${jd(i)}/${t}`:jd(i),I=`${jd(i)}/configuration`,D=e===N,T=i.status==="paused",C=T&&i.pauseReason==="budget",M=i.orgChainHealth?.status==="invalid_org_chain",z=T?"Resume agent":"Pause agent",K=l||i.status==="pending_approval"||C||T&&M,P=l?"Updating...":C?"Budget paused":T&&M?"Invalid org chain":z,A=y==="needs_setup"||y==="pending_approval",B=[A?`Built-in agent ${y.replace(/_/g," ")}`:null,M?"Invalid reporting chain":null].filter(Boolean).join(", ")||void 0,O=(0,s.jsx)(Ge,{to:_,label:i.name,iconNode:(0,s.jsx)(ir,{agent:i,size:16,className:"shrink-0 h-4 w-4"}),active:D,liveCount:g,labelClassName:A?"min-w-(--sz-4_5rem) flex-initial":void 0,className:X("min-w-0 flex-1",j&&!c?"pr-14":"pr-8"),trailing:A||M?(0,s.jsxs)("span",{className:"ml-1 flex shrink-0 items-center gap-1",children:[A?(0,s.jsx)(zM,{status:y,compact:!0}):null,M?(0,s.jsx)(Ja,{className:"h-3.5 w-3.5 shrink-0 text-amber-500","aria-label":"Invalid reporting chain"}):null]}):void 0,trailingLabel:B,liveAccessory:i.pauseReason==="budget"?(0,s.jsx)(fN,{title:"Agent paused by budget"}):void 0});return h?O:(0,s.jsxs)("div",{className:"group/agent relative flex items-center",children:[O,j&&!c&&k?(0,s.jsx)("span",{className:"absolute right-10 top-1/2 -translate-y-1/2",children:(0,s.jsx)(mN,{size:"row",quiet:!0,starred:!0,pending:S,resourceName:i.name,onToggle:r(()=>k(i,!1),"onToggle"),revealClassName:VM})}):null,(0,s.jsxs)(Gr,{children:[(0,s.jsx)(Wr,{asChild:!0,children:(0,s.jsx)(le,{variant:"ghost",size:"icon-xs",className:X("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 ${i.name}`,children:(0,s.jsx)(gf,{className:"h-3.5 w-3.5"})})}),(0,s.jsxs)(Qr,{align:"end",className:"w-48",children:[k?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(Cn,{onClick:r(()=>{S||k(i,!j)},"onClick"),disabled:S,children:[S?(0,s.jsx)(As,{className:"size-4 motion-safe:animate-spin"}):(0,s.jsx)(Zg,{className:X("size-4",j&&"fill-amber-500 text-amber-500")}),(0,s.jsx)("span",{children:j?"Remove from starred":"Star agent"})]}),(0,s.jsx)(ki,{})]}):null,(0,s.jsx)(Cn,{asChild:!0,children:(0,s.jsxs)(gn,{to:I,onClick:r(()=>{c&&v(!1)},"onClick"),children:[(0,s.jsx)(S0,{className:"size-4"}),(0,s.jsx)("span",{children:"Edit agent"})]})}),(0,s.jsx)(ki,{}),(0,s.jsxs)(Cn,{onClick:r(()=>{K||f(i,T?"resume":"pause")},"onClick"),disabled:K,title:C?"Agent was paused by budget limits":void 0,children:[T?(0,s.jsx)(WS,{className:"size-4"}):(0,s.jsx)(HS,{className:"size-4"}),(0,s.jsx)("span",{children:P})]}),(0,s.jsx)(ki,{}),(0,s.jsxs)(Cn,{onClick:r(()=>{u||m(i)},"onClick"),disabled:u,children:[u?(0,s.jsx)(As,{className:"size-4 motion-safe:animate-spin"}):(0,s.jsx)(wf,{className:"size-4"}),(0,s.jsx)("span",{children:u?"Leaving...":"Leave agent"})]})]})]})]})}r(WM,"SidebarAgentItem");function QM({streamlined:e=!1}={}){const[t,i]=(0,x.useState)(!0),[l,c]=(0,x.useState)(()=>new Set),[u,m]=(0,x.useState)(0),f=(0,x.useRef)(new Map),h=wn(),{selectedCompanyId:g}=vt(),v=Nf(g),{openNewAgent:y}=Pa(),{isMobile:j,setSidebarOpen:k,collapsed:S,peeking:N}=Jn(),_=S&&!N,{pushToast:I}=Ni(),D=vn(),{data:T}=ge({queryKey:U.agents.list(g),queryFn:r(()=>$s.list(g),"queryFn"),enabled:!!g}),{data:C}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn"),enabled:!!g}),M=C?.enableBuiltInAgents===!0,{data:z}=ge({queryKey:U.builtInAgents.list(g),queryFn:r(()=>LM.list(g),"queryFn"),enabled:!!g&&M}),K=(0,x.useMemo)(()=>{const je=new Map;if(!M)return je;for(const $e of z??[])$e.agentId&&je.set($e.agentId,$e.status);return je},[z,M]),{data:P}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),A=_0(g),B=dN(g),O=U.liveRuns(g),W=gc({companyId:g,resourceKey:"live-runs",queryKey:O,enabled:!!g,refetchInterval:!1,leaderOnly:!0}),{data:Y,dataUpdatedAt:ce}=ge({queryKey:O,queryFn:r(()=>vf.liveRunsForCompany(g),"queryFn"),enabled:W.enabled,refetchInterval:W.refetchInterval});xc(W,Y,ce);const oe=(0,x.useMemo)(()=>{const je=new Map;for(const $e of Y??[])je.set($e.agentId,(je.get($e.agentId)??0)+1);return je},[Y]),$=(0,x.useMemo)(()=>{const je=new Set;for(const[$e,He]of oe)He>0&&je.add($e);return je},[oe]),R=(0,x.useMemo)(()=>(T??[]).filter(je=>je.status!=="terminated"&&(!A.isSuccess||oN(A.data,"agent",je.id)!=="left")),[T,A.data,A.isSuccess]),ne=P?.user?.id??P?.session?.userId??null,ue=(0,x.useMemo)(()=>g?g3(g,ne):null,[ne,g]),[ae,Ee]=(0,x.useState)(()=>ue?$p(ue):"top"),{orderedAgents:fe}=PM({agents:R,companyId:g,userId:ne}),Ae=(0,x.useMemo)(()=>mj(fe,ae),[fe,ae]),Ce=(0,x.useMemo)(()=>new Set(Ae.map(je=>je.id)),[Ae]);(0,x.useEffect)(()=>{const je=Date.now();for(const $e of $)f.current.set($e,je);for(const $e of f.current.keys())Ce.has($e)||f.current.delete($e)},[$,Ce]);const Se=(0,x.useMemo)(()=>{const je=Date.now(),$e=f.current;return Ae.filter(He=>{if((oe.get(He.id)??0)>0)return!0;const mt=$e.get(He.id);return mt!==void 0&&je-mt<=fj})},[oe,u,Ae]),he=Se.length>0,De=e?he?Se:Ae.slice(0,FM):Ae,Ye=e&&Ae.length>0,ze=D.pathname.match(/^\/(?:[^/]+\/)?agents\/([^/]+)(?:\/([^/]+))?/),ve=ze?.[1]??null,ft=ze?.[2]??null;(0,x.useEffect)(()=>{if(!ue){Ee("top");return}Ee($p(ue))},[ue]),(0,x.useEffect)(()=>{if(!ue)return;const je=r(He=>{He.key===ue&&Ee($p(ue))},"onStorage"),$e=r(He=>{const mt=He.detail;!mt||mt.storageKey!==ue||Ee(mt.sortMode)},"onCustomEvent");return window.addEventListener("storage",je),window.addEventListener(Iy,$e),()=>{window.removeEventListener("storage",je),window.removeEventListener(Iy,$e)}},[ue]),(0,x.useEffect)(()=>{if(!e)return;const je=Date.now();let $e=null;for(const mt of Ae){if((oe.get(mt.id)??0)>0)continue;const it=f.current.get(mt.id);if(it===void 0)continue;const Qt=it+fj;Qt<je||($e=$e===null?Qt:Math.min($e,Qt))}if($e===null)return;const He=window.setTimeout(()=>{m(mt=>mt+1)},Math.max(0,$e-je+1));return()=>{window.clearTimeout(He)}},[e,Ae,oe,u]);const At=(0,x.useCallback)(je=>{const $e=je==="alphabetical"||je==="recent"?je:"top";Ee($e),ue&&x3(ue,$e)},[ue]),xt=Kt({mutationFn:r(({agent:je,action:$e})=>$e==="pause"?$s.pause(je.id,g??void 0):$s.resume(je.id,g??void 0),"mutationFn"),onMutate:r(({agent:je})=>{c($e=>{const He=new Set($e);return He.add(je.id),He})},"onMutate"),onSuccess:r(async(je,{agent:$e,action:He})=>{g&&await Promise.all([h.invalidateQueries({queryKey:U.agents.list(g)}),h.invalidateQueries({queryKey:U.liveRuns(g)}),h.invalidateQueries({queryKey:U.dashboard(g)})]),await Promise.all([h.invalidateQueries({queryKey:U.agents.detail($e.id)}),h.invalidateQueries({queryKey:U.agents.detail(ar($e))})]),I({title:He==="pause"?"Agent paused":"Agent resumed",body:$e.name,tone:"success"})},"onSuccess"),onError:r((je,{agent:$e,action:He})=>{I({title:He==="pause"?"Could not pause agent":"Could not resume agent",body:je instanceof Error?je.message:$e.name,tone:"error"})},"onError"),onSettled:r((je,$e,{agent:He})=>{c(mt=>{const it=new Set(mt);return it.delete(He.id),it})},"onSettled")}),Pt=(0,x.useCallback)(je=>B.mutate({resourceType:"agent",resourceId:je.id,resourceName:je.name,state:"left"}),[B]),de=(0,x.useCallback)(je=>B.isPending&&B.variables?.resourceType==="agent"&&B.variables.resourceId===je.id,[B.isPending,B.variables]),Oe=(0,x.useCallback)((je,$e)=>B.mutate({resourceType:"agent",resourceId:je.id,resourceName:je.name,starred:$e}),[B]),qe=(0,x.useCallback)(je=>B.isPending&&B.variables?.resourceType==="agent"&&B.variables.resourceId===je.id&&B.variables.starred!==void 0,[B.isPending,B.variables]),ut=(0,x.useMemo)(()=>new Set(uN(A.data,"agent")),[A.data]),Vt=(0,x.useMemo)(()=>mj(R.filter(je=>ut.has(je.id)),"alphabetical"),[R,ut]),Wt=(0,x.useMemo)(()=>De.filter(je=>!ut.has(je.id)),[De,ut]),H=v&&!v.loading?R.find(je=>je.id===v.primaryAgentId):void 0,rn=r((je,$e)=>(0,s.jsx)(WM,{activeAgentId:ve,activeTab:ft,agent:je,disabled:l.has(je.id),isMobile:j,leaving:de(je),onLeaveAgent:Pt,onPauseResume:r((He,mt)=>xt.mutate({agent:He,action:mt}),"onPauseResume"),rail:_,runCount:oe.get(je.id)??0,setSidebarOpen:k,builtInStatus:K.get(je.id),starred:$e||cN(A.data,"agent",je.id),onToggleStar:Oe,starPending:qe(je)},je.id),"renderAgentRow");return(0,s.jsxs)(qd,{label:"Agents",collapsible:{open:t,onOpenChange:i},headerAction:{ariaLabel:"New agent",icon:Js,onClick:y},menu:{ariaLabel:"Agents section actions",actions:[{type:"item",label:"Browse agents",icon:qr,href:"/agents/all"},{type:"separator"}],radioLabel:"Agent sort",radioChoices:HM,radioValue:ae,onRadioValueChange:At},children:[[...H?[H]:[],...Vt.filter(je=>je.id!==H?.id),...Wt.filter(je=>je.id!==H?.id)].map(je=>rn(je,ut.has(je.id))),Ye&&(()=>{const je=(0,s.jsxs)(gn,{to:"/agents/all",state:xf,"aria-label":_?"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,s.jsx)(qr,{className:"shrink-0 h-4 w-4"}),(0,s.jsx)("span",{className:_?"block w-0 min-w-0 -ms-2.5 overflow-hidden whitespace-nowrap text-transparent select-none":void 0,children:"See all agents"})]});return _?(0,s.jsxs)(Ia,{children:[(0,s.jsx)(_a,{asChild:!0,children:je}),(0,s.jsx)(Ea,{side:"right",children:"See all agents"})]}):je})()]})}r(QM,"SidebarAgents");var GM="opacity-0 transition-opacity group-hover/starred-project:opacity-100 group-focus-within/starred-project:opacity-100";function YM(){const{selectedCompanyId:e}=vt(),{isMobile:t,setSidebarOpen:i,collapsed:l,peeking:c}=Jn(),u=l&&!c,m=vn(),{data:f}=ge({queryKey:U.projects.list(e),queryFn:r(()=>rr.list(e),"queryFn"),enabled:!!e}),h=_0(e),g=dN(e),v=m.pathname.match(/^\/(?:[^/]+\/)?projects\/([^/]+)/)?.[1]??null,y=(0,x.useMemo)(()=>{if(!h.isSuccess)return[];const N=new Set(uN(h.data,"project"));if(N.size===0)return[];const _=new Map((f??[]).map(I=>[I.id,I]));return Array.from(N).map(I=>_.get(I)).filter(I=>!!I).sort((I,D)=>I.name.localeCompare(D.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,s.jsx)("div",{className:"flex flex-col gap-0.5","aria-label":"Starred projects",children:y.map(N=>{const _=Rk(N),I=v===_||v===N.id,D=S(N),T=D&&g.variables?.starred===!1,C=D&&g.variables?.state==="left",M=cN(h.data,"project",N.id),z=(0,s.jsx)(XM,{project:N,active:I,rail:u,onNavigate:r(()=>{t&&i(!1)},"onNavigate")});return(0,s.jsxs)("div",{className:"group/starred-project relative flex items-center",children:[u?(0,s.jsxs)(Ia,{children:[(0,s.jsx)(_a,{asChild:!0,children:(0,s.jsx)("div",{className:"min-w-0 flex-1",children:z})}),(0,s.jsx)(Ea,{side:"right",children:N.name})]}):z,!u&&!t?(0,s.jsx)("span",{className:"absolute right-3 top-1/2 -translate-y-1/2",children:(0,s.jsx)(mN,{size:"row",quiet:!0,starred:M,pending:T,resourceName:N.name,onToggle:r(()=>j(N),"onToggle"),revealClassName:GM})}):null,!u&&t?(0,s.jsxs)(Gr,{children:[(0,s.jsx)(Wr,{asChild:!0,children:(0,s.jsx)(le,{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,s.jsx)(gf,{className:"h-3.5 w-3.5"})})}),(0,s.jsxs)(Qr,{align:"end",className:"w-48",children:[(0,s.jsxs)(Cn,{onClick:r(()=>{D||j(N)},"onClick"),disabled:D,children:[T?(0,s.jsx)(As,{className:"size-4 motion-safe:animate-spin"}):(0,s.jsx)(Zg,{className:"size-4 fill-amber-500 text-amber-500"}),(0,s.jsx)("span",{children:"Remove from starred"})]}),(0,s.jsx)(ki,{}),(0,s.jsxs)(Cn,{onClick:r(()=>{D||k(N)},"onClick"),disabled:D,children:[C?(0,s.jsx)(As,{className:"size-4 motion-safe:animate-spin"}):(0,s.jsx)(wf,{className:"size-4"}),(0,s.jsx)("span",{children:"Leave project"})]})]})]}):null]},N.id)})})}r(YM,"SidebarStarredProjects");function XM({project:e,active:t,rail:i,onNavigate:l}){return(0,s.jsxs)(gn,{to:`/projects/${Rk(e)}/issues`,state:xf,"aria-current":t?"page":void 0,onClick:l,className:X("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",!i&&"pl-6 pr-8",t?Vl.active:X(Vl.rest,"text-ink/80")),children:[(0,s.jsx)(Xk,{color:e.color??null,icon:e.icon??null,size:"xs"}),(0,s.jsx)("span",{className:i?Lk:"flex-1 truncate",children:e.name}),!i&&e.visibility==="private"?(0,s.jsx)(Uh,{className:"size-3.5 shrink-0 text-ink-3","aria-label":"Private project"}):null,!i&&e.pauseReason==="budget"?(0,s.jsx)(fN,{title:"Project paused by budget"}):null]})}r(XM,"SidebarStarredProjectLink");var og="wardmote:recent-tasks-updated",pN="wardmote.recentTasks.v2:",ZM="wardmote.recentTasks:";function hN(e,t){return`${pN}${e}:${t??"__local_board__"}`}r(hN,"getRecentTasksStorageKey");function JM(e,t){if(!e||typeof e!="object")return!1;const i=e;return i.companyId===t&&typeof i.id=="string"&&i.id.length>0&&typeof i.title=="string"&&(i.identifier===null||typeof i.identifier=="string")&&typeof i.status=="string"&&typeof i.recordedAt=="number"&&Number.isFinite(i.recordedAt)&&(i.snapshotUpdatedAt===void 0||typeof i.snapshotUpdatedAt=="number"&&Number.isFinite(i.snapshotUpdatedAt))}r(JM,"isRecentTaskEntry");function $r(e,t){if(typeof window>"u")return[];try{const i=e.startsWith(pN)?ZM+e.slice(24):e,l=window.localStorage.getItem(e)??window.localStorage.getItem(i),c=JSON.parse(l??"[]");return Array.isArray(c)?gN(c.filter(u=>JM(u,t))):[]}catch{return[]}}r($r,"readRecentTasks");function eO(e,t){if(!(typeof window>"u")){try{if(window.localStorage.getItem(e)!==null)return}catch{return}Af(e,$r(e,t))}}r(eO,"migrateRecentTasks");function gN(e){const t=new Set;return[...e].sort((i,l)=>l.recordedAt-i.recordedAt).filter(i=>t.has(i.id)?!1:(t.add(i.id),!0)).slice(0,5)}r(gN,"normalizeRecentTasks");function tO(e,t){typeof window>"u"||window.dispatchEvent(new CustomEvent(og,{detail:{storageKey:e,entries:t}}))}r(tO,"publishRecentTasks");function Af(e,t){if(typeof window>"u")return;const i=gN(t);try{const l=JSON.stringify(i);if(window.localStorage.getItem(e)===l)return;window.localStorage.setItem(e,l)}catch{}tO(e,i)}r(Af,"writeRecentTasks");function E0(e,t){if(e.id!==t.id||e.companyId!==t.companyId)return e;const i=new Date(t.updatedAt).getTime();return!Number.isFinite(i)||e.snapshotUpdatedAt!==void 0&&i<e.snapshotUpdatedAt?e:i===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:i,recordedAt:Math.max(e.recordedAt,i)}}r(E0,"mergeRecentTaskSnapshot");function nO(e,t,i=new Date(e.updatedAt).getTime()){if(e.conversationAgentId)return;const l=hN(e.companyId,t),c=$r(l,e.companyId),u=c.find(v=>v.id===e.id),m=Number.isFinite(i)?i:u?.recordedAt??Date.now(),f=new Date(e.updatedAt).getTime(),h=u?E0(u,e):{id:e.id,companyId:e.companyId,title:e.title,identifier:e.identifier,status:e.status,externalConversationState:e.externalConversationState,recordedAt:m,...Number.isFinite(f)?{snapshotUpdatedAt:f}:{}},g={...h,recordedAt:Math.max(m,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||Af(l,u?c.map(v=>v.id===e.id?g:v):[g,...c])}r(nO,"recordRecentTask");function sO(e,t,i){if(i.size===0)return;const l=$r(e,t),c=l.filter(u=>!i.has(u.id));c.length!==l.length&&Af(e,c)}r(sO,"pruneRecentTasks");function xN(e,t,i){const l=new Map(i.map(f=>[f.id,f])),c=$r(e,t);let u=!1;const m=c.map(f=>{const h=l.get(f.id);if(!h||h.companyId!==t)return f;const g=E0(f,h);return g!==f&&(u=!0),g});u&&Af(e,m)}r(xN,"updateRecentTaskSnapshots");var aO=1e3;function iO({companyId:e,userId:t}){const i=(0,x.useMemo)(()=>e?hN(e,t):null,[e,t]),[l,c]=(0,x.useState)(()=>i&&e?$r(i,e):[]);(0,x.useEffect)(()=>{i&&e&&eO(i,e),c(i&&e?$r(i,e):[])},[e,i]),(0,x.useEffect)(()=>{if(!i||!e)return;const N=r(()=>c($r(i,e)),"sync"),_=r(D=>{D.key===i&&N()},"onStorage"),I=r(D=>{const T=D.detail;T?.storageKey===i&&c(T.entries)},"onRecentTasksUpdated");return window.addEventListener("storage",_),window.addEventListener(og,I),()=>{window.removeEventListener("storage",_),window.removeEventListener(og,I)}},[e,i]);const u=[...l].sort((N,_)=>N.id.localeCompare(_.id)),m=JSON.stringify(u.map(N=>N.id)),f=t0({queries:u.map(N=>({queryKey:U.issues.detail(N.id),queryFn:r(()=>hn.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 _=h.get(N.id);return!_||_.companyId!==e||_.hiddenAt?N:E0(N,_)}),v=f.map(N=>`${N.dataUpdatedAt}:${N.errorUpdatedAt}:${N.status}`).join("|");(0,x.useEffect)(()=>{if(!i||!e||f.length===0)return;const N=[],_=new Set;f.forEach((I,D)=>{const T=u[D];T&&(I.data?I.data.companyId!==e||I.data.hiddenAt?_.add(T.id):N.push(I.data):I.error instanceof Si&&[403,404].includes(I.error.status)&&_.add(T.id))}),xN(i,e,N),sO(i,e,_)},[e,m,v,i]);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(([I])=>I);if(JSON.stringify([...y].sort((I,D)=>I.localeCompare(D)))!==m){j(N);return}if(N.every((I,D)=>I===y[D]))return;const _=window.setTimeout(()=>j(N),aO);return()=>window.clearTimeout(_)},[k,m,y,i]);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:i}}r(iO,"useRecentTasks");var Qp="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",rO=":restart-wake-retry";function lO(e,t){return`wardmote.recentTasks:${e}:${t??"__local_board__"}${rO}`}r(lO,"restartWakeRetryStorageKey");function bN(e){if(!e)return new Set;try{const t=JSON.parse(window.localStorage.getItem(e)??"[]");return new Set(Array.isArray(t)?t.filter(i=>typeof i=="string"):[])}catch{return new Set}}r(bN,"readRestartWakeRetryIssueIds");function Gp(e,t,i){if(!e)return;const l=bN(e);i?l.add(t):l.delete(t);try{l.size>0?window.localStorage.setItem(e,JSON.stringify([...l])):window.localStorage.removeItem(e)}catch{}}r(Gp,"setRestartWakeRetryPending");function Yp(e,t){return e instanceof Error&&e.message.trim()?e.message:t}r(Yp,"errorMessage$2");function oO({companyId:e,liveIssueIds:t}){const{collapsed:i,peeking:l}=Jn(),c=i&&!l,{data:u,isPending:m}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1});if(!e||m)return null;const f=u?.user?.id??u?.session?.userId??null;return(0,s.jsx)(cO,{companyId:e,userId:f,liveIssueIds:t,rail:c},`${e}:${f??"__local_board__"}`)}r(oO,"SidebarRecentTasks");function cO({companyId:e,userId:t,liveIssueIds:i,rail:l}){const{entries:c,storageKey:u}=iO({companyId:e,userId:t}),m=wn(),f=bf(),[h,g]=(0,x.useState)(null),[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(null),S=lO(e,t);if(c.length===0)return null;const N=r(async C=>{await Promise.all([m.invalidateQueries({queryKey:U.issues.detail(C)}),m.invalidateQueries({queryKey:U.issues.list(e)}),m.invalidateQueries({queryKey:U.issues.activity(C)})])},"refreshIssueQueries"),_=r(C=>{g(C),y(C.title)},"beginRename"),I=r(async C=>{C.preventDefault();const M=v.trim();if(!h||!M||M===h.title){g(null);return}k("rename");try{const z=await hn.update(h.id,{title:M});m.setQueryData(U.issues.detail(h.id),z),u&&xN(u,e,[z]),await N(h.id),g(null),f?.pushToast({title:"Task renamed",tone:"success"})}catch(z){f?.pushToast({title:"Task rename failed",body:Yp(z,"Unable to rename this task."),tone:"error"})}finally{k(null)}},"submitRename"),D=r(async C=>{k("archive");try{await hn.archiveFromInbox(C.id),await N(C.id),await m.invalidateQueries({queryKey:U.sidebarBadges(e)}),f?.pushToast({title:"Task archived from inbox",tone:"success"})}catch(M){f?.pushToast({title:"Task archive failed",body:Yp(M,"Unable to archive this task from the inbox."),tone:"error"})}finally{k(null)}},"archiveTask"),T=r(async C=>{k("pause");try{const M=await hn.getTreeControlState(C.id);if(M.activePauseHold?.isRoot){const z=await hn.get(C.id);if(Gp(S,C.id,!0),await hn.releaseTreeHold(C.id,M.activePauseHold.holdId,{reason:"Restarted from Recent Tasks."}),z.assigneeAgentId){const K=await $s.wakeup(z.assigneeAgentId,{source:"assignment",triggerDetail:"manual",reason:"recent_task_restart",payload:{issueId:z.id}},z.companyId);if(!("id"in K))throw new Error(K.message??"The assignee wake was skipped.")}Gp(S,C.id,!1),f?.pushToast({title:"Task restarted",tone:"success"})}else{if(M.activePauseHold)throw new Error("This task is paused by a parent task. Restart it from the pause root.");if(bN(S).has(C.id)){const z=await hn.get(C.id);if(z.assigneeAgentId){const K=await $s.wakeup(z.assigneeAgentId,{source:"assignment",triggerDetail:"manual",reason:"recent_task_restart_retry",payload:{issueId:z.id}},z.companyId);if(!("id"in K))throw new Error(K.message??"The assignee wake was skipped.")}Gp(S,C.id,!1),f?.pushToast({title:"Task restarted",tone:"success"})}else await hn.createTreeHold(C.id,{mode:"pause",reason:"Paused from Recent Tasks.",releasePolicy:{strategy:"manual"}}),f?.pushToast({title:"Task paused",tone:"success"})}await m.invalidateQueries({queryKey:["issues","tree-control-state",C.id]})}catch(M){f?.pushToast({title:"Task pause update failed",body:Yp(M,"Unable to pause or restart this task."),tone:"error"})}finally{k(null)}},"toggleTaskPause");return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(qd,{label:"Recent Tasks",children:c.map(C=>(0,s.jsxs)("div",{className:"sidebar-action-row group/recent-task relative",children:[(0,s.jsx)(Ge,{to:`/issues/${C.id}`,label:C.title,trailing:C.status==="in_review"&&C.externalConversationState==="waiting"?(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Idle"}):void 0,trailingLabel:C.status==="in_review"&&C.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:i.has(C.id)?1:void 0}),l?null:(0,s.jsxs)(Gr,{children:[(0,s.jsx)(Wr,{asChild:!0,children:(0,s.jsx)(le,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`More actions for ${C.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,s.jsx)(gf,{"aria-hidden":"true"})})}),(0,s.jsxs)(Qr,{side:"right",align:"start",className:"w-(--profile-popover-width) rounded-xl p-1.5 shadow-(--shadow-profile-popover)",children:[(0,s.jsxs)(Cn,{className:Qp,onSelect:r(()=>_(C),"onSelect"),children:[(0,s.jsx)(S0,{"aria-hidden":"true"}),"Rename"]}),(0,s.jsxs)(Cn,{className:Qp,disabled:j!==null,onSelect:r(()=>{D(C)},"onSelect"),children:[(0,s.jsx)(uS,{"aria-hidden":"true"}),"Archive"]}),(0,s.jsxs)(Cn,{className:Qp,disabled:j!==null,onSelect:r(()=>{T(C)},"onSelect"),children:[(0,s.jsx)(Yr,{"aria-hidden":"true"}),"Pause/Restart"]})]})]})]},C.id))}),(0,s.jsx)(ya,{open:h!==null,onOpenChange:r(C=>{!C&&j!=="rename"&&g(null)},"onOpenChange"),children:(0,s.jsx)(za,{className:"sm:max-w-md",children:(0,s.jsxs)("form",{className:"grid gap-4",onSubmit:r(C=>{I(C)},"onSubmit"),children:[(0,s.jsxs)(Jl,{children:[(0,s.jsx)(Da,{children:"Rename task"}),(0,s.jsx)(eo,{children:"Choose a short, clear name for this task."})]}),(0,s.jsx)(Wn,{autoFocus:!0,"aria-label":"Task name",value:v,disabled:j==="rename",onChange:r(C=>y(C.target.value),"onChange")}),(0,s.jsxs)(jf,{children:[(0,s.jsx)(le,{type:"button",variant:"secondary",disabled:j==="rename",onClick:r(()=>g(null),"onClick"),children:"Cancel"}),(0,s.jsx)(le,{type:"submit",disabled:j==="rename"||!v.trim(),children:j==="rename"?"Saving...":"Save"})]})]})})})]})}r(cO,"RecentTasksList");var uO={list:r((e,t={})=>{const i=new URLSearchParams;t.includeDismissed&&i.set("includeDismissed","true"),t.archived&&i.set("archived","true"),t.all&&i.set("all","true"),t.activitySince&&i.set("activitySince",t.activitySince),t.activityUntil&&i.set("activityUntil",t.activityUntil),t.queue&&i.set("queue",t.queue),t.sort&&i.set("sort",t.sort),t.cursor&&i.set("cursor",t.cursor),t.limit!==void 0&&i.set("limit",String(t.limit));const l=i.toString();return we.get(`/companies/${e}/attention${l?`?${l}`:""}`)},"list"),count:r(e=>we.get(`/companies/${e}/attention/count`),"count")},Xu={list:r(e=>we.get(`/companies/${e}/inbox-dismissals`),"list"),dismiss:r((e,t)=>we.post(`/companies/${e}/inbox-dismissals`,{itemKey:t}),"dismiss"),snooze:r((e,t,i)=>we.post(`/companies/${e}/inbox-dismissals`,{itemKey:t,kind:"snooze",snoozedUntil:i}),"snooze"),restore:r((e,t)=>we.delete(`/companies/${e}/inbox-dismissals/${encodeURIComponent(t)}`),"restore")},vN={list:r((e,t)=>we.get(`/companies/${e}/approvals${t?`?status=${encodeURIComponent(t)}`:""}`),"list"),create:r((e,t)=>we.post(`/companies/${e}/approvals`,t),"create"),get:r(e=>we.get(`/approvals/${e}`),"get"),approve:r((e,t)=>we.post(`/approvals/${e}/approve`,{decisionNote:t}),"approve"),reject:r((e,t)=>we.post(`/approvals/${e}/reject`,{decisionNote:t}),"reject"),requestRevision:r((e,t)=>we.post(`/approvals/${e}/request-revision`,{decisionNote:t}),"requestRevision"),resubmit:r((e,t)=>we.post(`/approvals/${e}/resubmit`,{payload:t}),"resubmit"),listComments:r(e=>we.get(`/approvals/${e}/comments`),"listComments"),addComment:r((e,t)=>we.post(`/approvals/${e}/comments`,{body:t}),"addComment"),listIssues:r(e=>we.get(`/approvals/${e}/issues`),"listIssues")},dO={summary:r(e=>we.get(`/companies/${e}/dashboard`),"summary")},yN={get:r(e=>we.get(`/companies/${e}/sidebar-badges`),"get")};var fO=new Set(["failed","timed_out"]),Fd=new Set(["pending","revision_requested"]),jN="wardmote:inbox:dismissed",wN="wardmote:inbox:read-items",kN="wardmote:inbox:last-tab",mQ="wardmote:inbox:issue-columns",SN="wardmote:inbox:nesting",NN="wardmote:inbox:group-by",pQ="wardmote:inbox:filters",mO="wardmote:inbox:collapsed-groups",pO="wardmote:inbox:collapsed-parents",cg=["status","id","assignee","kickedOffBy","project","workspace","parent","labels","updated"],CN=["status","id","updated"];function AN(e){return e?`${mO}:${e}`:null}r(AN,"getInboxCollapsedGroupsStorageKey");function _N(e){return e?`${pO}:${e}`:null}r(_N,"getInboxCollapsedParentsStorageKey");function hQ(e){const t=AN(e);if(!t)return new Set;try{const i=localStorage.getItem(t);if(!i)return new Set;const l=JSON.parse(i);return new Set(Array.isArray(l)?l.filter(c=>typeof c=="string"):[])}catch{return new Set}}r(hQ,"loadCollapsedInboxGroupKeys");function gQ(e,t){const i=AN(e);if(i)try{localStorage.setItem(i,JSON.stringify([...t]))}catch{}}r(gQ,"saveCollapsedInboxGroupKeys");function xQ(e){const t=_N(e);if(!t)return new Set;try{const i=localStorage.getItem(t);if(!i)return new Set;const l=JSON.parse(i);return new Set(Array.isArray(l)?l.filter(c=>typeof c=="string"):[])}catch{return new Set}}r(xQ,"loadCollapsedInboxParentIds");function bQ(e,t){const i=_N(e);if(i)try{localStorage.setItem(i,JSON.stringify([...t]))}catch{}}r(bQ,"saveCollapsedInboxParentIds");function pj(){try{const e=localStorage.getItem(jN);if(!e)return new Set;const t=JSON.parse(e);return Array.isArray(t)?new Set(t.filter(i=>typeof i=="string"&&i.startsWith("alert:"))):new Set}catch{return new Set}}r(pj,"loadDismissedInboxAlerts");function hO(e){try{localStorage.setItem(jN,JSON.stringify([...e]))}catch{}}r(hO,"saveDismissedInboxAlerts");function gO(e){return new Map(e.map(t=>[t.itemKey,ea(t.dismissedAt)]))}r(gO,"buildInboxDismissedAtByKey");function hj(e,t,i){const l=e.get(t);return l==null?!1:l>=ea(i)}r(hj,"isInboxEntityDismissed");function gj(){try{const e=localStorage.getItem(wN);return e?new Set(JSON.parse(e)):new Set}catch{return new Set}}r(gj,"loadReadInboxItems");function xj(e){try{localStorage.setItem(wN,JSON.stringify([...e]))}catch{}}r(xj,"saveReadInboxItems");function EN(e){const t=new Set(e);return cg.filter(i=>t.has(i))}r(EN,"normalizeInboxIssueColumns");function xO(e){return e?[...cg]:cg.filter(t=>t!=="workspace")}r(xO,"getAvailableInboxIssueColumns");function vQ(){try{const e=localStorage.getItem(NN);return e==="type"||e==="assignee"||e==="project"||e==="workspace"?e:"none"}catch{return"none"}}r(vQ,"loadInboxWorkItemGroupBy");function yQ(e){try{localStorage.setItem(NN,e)}catch{}}r(yQ,"saveInboxWorkItemGroupBy");function jQ(e,t,i){return i&&e==="workspace"&&!t}r(jQ,"shouldResetInboxWorkspaceGrouping");function bO(e,t,{isolatedWorkspacesEnabled:i=!1,executionWorkspaceById:l,projectWorkspaceById:c,defaultProjectWorkspaceIdByProjectId:u}={}){const m=t.trim().toLowerCase();return!m||e.title.toLowerCase().includes(m)||e.identifier?.toLowerCase().includes(m)||e.description?.toLowerCase().includes(m)?!0:i?IN(e,{executionWorkspaceById:l,projectWorkspaceById:c,defaultProjectWorkspaceIdByProjectId:u})?.toLowerCase().includes(m)??!1:!1}r(bO,"matchesInboxIssueSearch");function wQ({visibleIssues:e,searchableIssues:t,query:i,isolatedWorkspacesEnabled:l=!1,executionWorkspaceById:c,projectWorkspaceById:u,defaultProjectWorkspaceIdByProjectId:m}){const f=i.trim();if(!f)return[];const h=new Set(e.map(g=>g.id));return t.filter(g=>!h.has(g.id)).filter(g=>bO(g,f,{isolatedWorkspacesEnabled:l,executionWorkspaceById:c,projectWorkspaceById:u,defaultProjectWorkspaceIdByProjectId:m})).sort(vc)}r(wQ,"getArchivedInboxSearchIssues");function kQ({query:e,filteredWorkItems:t,archivedSearchIssues:i,remoteIssues:l,issueFilters:c,currentUserId:u,enableRoutineVisibilityFilter:m=!1,liveIssueIds:f,issueFilterContext:h={}}){if(!e.trim())return[];const g=new Set([...t.filter(v=>v.kind==="issue").map(v=>v.issue.id),...i.map(v=>v.id)]);return AS(l,c,u,m,f,h).filter(v=>!g.has(v.id))}r(kQ,"getInboxSearchSupplementIssues");function vO(e){const t=e?.trim();return t?`${t} (default)`:"Default workspace"}r(vO,"formatDefaultWorkspaceGroupLabel");function yO(e,{projectWorkspaceById:t,defaultProjectWorkspaceIdByProjectId:i}){if(!e.projectId)return null;const l=i?.get(e.projectId)??null;return l?{id:l,label:vO(t?.get(l)?.name)}:null}r(yO,"resolveDefaultProjectWorkspaceInfo");function IN(e,{executionWorkspaceById:t,projectWorkspaceById:i,defaultProjectWorkspaceIdByProjectId:l}){const c=e.projectId?l?.get(e.projectId)??null:null;if(e.executionWorkspaceId){const u=t?.get(e.executionWorkspaceId)??null,m=u?.projectWorkspaceId??e.projectWorkspaceId??null;if(u?.mode==="shared_workspace"&&m===c)return null;const f=u?.name;if(f)return f}if(e.projectWorkspaceId){if(e.projectWorkspaceId===c)return null;const u=i?.get(e.projectWorkspaceId)?.name;if(u)return u}return null}r(IN,"resolveIssueWorkspaceName");function jO(e,{executionWorkspaceById:t,projectWorkspaceById:i,defaultProjectWorkspaceIdByProjectId:l}={}){const c=yO(e,{projectWorkspaceById:i,defaultProjectWorkspaceIdByProjectId:l});if(e.executionWorkspaceId){const u=t?.get(e.executionWorkspaceId)??null,m=u?.projectWorkspaceId??e.projectWorkspaceId??null;if(u?.mode==="shared_workspace"&&m!=null&&m===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=i?.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(jO,"resolveIssueWorkspaceGroup");function SQ(){try{return localStorage.getItem(SN)!=="false"}catch{return!0}}r(SQ,"loadInboxNesting");function NQ(e){try{localStorage.setItem(SN,String(e))}catch{}}r(NQ,"saveInboxNesting");function CQ(e,t){return e&&!t}r(CQ,"resolveInboxNestingEnabled");function bj(){try{const e=localStorage.getItem(kN);return e==="all"||e==="unread"||e==="recent"||e==="mine"||e==="blocked"?e:"mine"}catch{return"mine"}}r(bj,"loadLastInboxTab");function AQ(e){try{localStorage.setItem(kN,e)}catch{}}r(AQ,"saveLastInboxTab");function _Q(e){return e==="mine"}r(_Q,"isMineInboxTab");function EQ(e){return e==="all"}r(EQ,"shouldShowCompanyAlerts");function IQ(e,t){return t===0||e<0?-1:Math.min(e,t-1)}r(IQ,"resolveInboxSelectionIndex");function wO(e,t,i){return t===0?-1:e<0?0:i==="next"?Math.min(e+1,t-1):Math.max(e-1,0)}r(wO,"getInboxKeyboardSelectionIndex");function TQ(e){const t=[...e].sort((l,c)=>new Date(c.createdAt).getTime()-new Date(l.createdAt).getTime()),i=new Map;for(const l of t)i.has(l.agentId)||i.set(l.agentId,l);return Array.from(i.values()).filter(l=>fO.has(l.status))}r(TQ,"getLatestFailedRunsByAgent");function ea(e){if(!e)return 0;const t=new Date(e).getTime();return Number.isFinite(t)?t:0}r(ea,"normalizeTimestamp");function Hd(e){const t=ea(e.lastActivityAt);if(t>0)return t;const i=ea(e.lastExternalCommentAt);return i>0?i:ea(e.updatedAt)}r(Hd,"issueLastActivityTimestamp");function vc(e,t){const i=Hd(t)-Hd(e);return i!==0?i:ea(t.updatedAt)-ea(e.updatedAt)}r(vc,"sortIssuesByMostRecentActivity");function kO(e){return[...e].sort(vc).slice(0,100)}r(kO,"getRecentTouchedIssues");function RQ(e,t,i,l){const c=[...e].sort((u,m)=>ea(m.updatedAt)-ea(u.updatedAt));return t==="mine"?c.filter(u=>TN(u,l)):t==="recent"?c:t==="unread"?c.filter(u=>Fd.has(u.status)):i==="all"?c:c.filter(u=>{const m=Fd.has(u.status);return i==="actionable"?m:!m})}r(RQ,"getApprovalsForTab");function TN(e,t){return Fd.has(e.status)?!0:t?e.requestedByUserId===t||e.decidedByUserId===t:!1}r(TN,"isApprovalVisibleInMine");function Xp(e){const t=ea(e.updatedAt);return t>0?t:ea(e.createdAt)}r(Xp,"approvalActivityTimestamp");function DQ({issues:e,approvals:t,failedRuns:i=[],joinRequests:l=[]}){return[...e.map(c=>({kind:"issue",timestamp:Hd(c),issue:c})),...t.map(c=>({kind:"approval",timestamp:Xp(c),approval:c})),...i.map(c=>({kind:"failed_run",timestamp:ea(c.createdAt),run:c})),...l.map(c=>({kind:"join_request",timestamp:ea(c.createdAt),joinRequest:c}))].sort((c,u)=>{const m=u.timestamp-c.timestamp;return m!==0?m:c.kind==="issue"&&u.kind==="issue"?vc(c.issue,u.issue):c.kind==="approval"&&u.kind==="approval"?Xp(u.approval)-Xp(c.approval):c.kind==="approval"?-1:1})}r(DQ,"getInboxWorkItems");var SO=["issue","approval","failed_run","join_request"],RN={issue:"Tasks",approval:"Approvals",failed_run:"Failed runs",join_request:"Join requests"};function NO(e,{agentById:t,currentUserId:i,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:Ur(e.assigneeUserId,i,l)??"User"}:{key:"assignee:none",label:"Unassigned"}}r(NO,"resolveIssueAssigneeGroup");function CO(e,{projectById:t}){if(!e.projectId)return{key:"project:none",label:"No project"};const i=t?.get(e.projectId)?.name?.trim();return{key:`project:${e.projectId}`,label:i||e.projectId.slice(0,8)}}r(CO,"resolveIssueProjectGroup");function Zp(e,t){const i=new Map;for(const l of e){const c=l.kind==="issue"?t(l.issue):{key:`kind:${l.kind}`,label:RN[l.kind]},u=i.get(c.key);u?(u.items.push(l),u.latestTimestamp=Math.max(u.latestTimestamp,l.timestamp)):i.set(c.key,{label:c.label,items:[l],latestTimestamp:l.timestamp})}return[...i.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(Zp,"groupInboxWorkItemsByIssueGroup");function AO(e,t,i={}){if(t==="none")return[{key:"__all",label:null,items:e}];if(t==="workspace")return Zp(e,u=>jO(u,i));if(t==="assignee")return Zp(e,u=>NO(u,i));if(t==="project")return Zp(e,u=>CO(u,i));const l=new Map;for(const u of e){const m=l.get(u.kind)??[];m.push(u),l.set(u.kind,m)}const c=[];for(const u of SO){const m=l.get(u)??[];m.length!==0&&c.push({key:u,label:RN[u],items:m})}return c}r(AO,"groupInboxWorkItems");function _O(e){return e.replace(/^archived-search:/,"").replace(/^other-search:/,"")}r(_O,"stripInboxSearchGroupPrefix");function EO(e){return e.find(t=>t.kind==="issue")?.issue??null}r(EO,"firstIssueFromInboxWorkItems");function vj(e,t,i){return e?t.projectWorkspaceById?.get(e)?.projectId??(i?.projectWorkspaceId===e?i.projectId:null):i?.projectId??null}r(vj,"projectIdForProjectWorkspace");function MQ(e,t,i,l={}){const c=EO(i);if(!c)return null;const u=_O(e);if(t==="project"){if(!u.startsWith("project:"))return{};const m=u.slice(8);return m&&m!=="none"?{projectId:m}:{}}if(t==="assignee"){if(u.startsWith("assignee:agent:")){const m=u.slice(15);return m?{assigneeAgentId:m}:{}}if(u.startsWith("assignee:user:")){const m=u.slice(14);return m?{assigneeUserId:m}:{}}return{}}if(t==="workspace"){if(u.startsWith("workspace:execution:")){const m=u.slice(20);if(!m)return{};const f=l.executionWorkspaceById?.get(m)??null,h=f?.projectWorkspaceId??(c.executionWorkspaceId===m?c.projectWorkspaceId:null),g=f?.projectId??vj(h,l,c);return{executionWorkspaceId:m,executionWorkspaceMode:"reuse_existing",...g?{projectId:g}:{},...h?{projectWorkspaceId:h}:{}}}if(u.startsWith("workspace:project:")){const m=u.slice(18);if(!m)return{};const f=vj(m,l,c);return{...f?{projectId:f}:{},projectWorkspaceId:m}}}return{}}r(MQ,"buildInboxIssueGroupCreateDefaults");function IO(e){const t=[],i=[];for(const f of e)f.kind==="issue"?t.push(f):i.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 m=r((f,h=new Set)=>{const g=Hd(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=>m(j,v)))},"subtreeActivityTimestamp");for(const f of c.values())f.sort((h,g)=>{const v=m(g)-m(h);return v!==0?v:vc(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=>m(v)));return{...f,timestamp:Math.max(f.timestamp,g)}}),...i].sort((f,h)=>{const g=h.timestamp-f.timestamp;return g!==0?g:f.kind==="issue"&&h.kind==="issue"?vc(f.issue,h.issue):0}),childrenByIssueId:c}}r(IO,"buildInboxNesting");function OQ(e,t,i,l){const c=l?.keyPrefix??"",u=l?.searchSection??"none",m=l?.nestingEnabled??!1;return u!=="none"&&e.length===0?[]:AO(e,t,i).map(f=>{const h=m&&f.items.some(g=>g.kind==="issue")?IO(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(OQ,"buildGroupedInboxSections");function TO(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(TO,"getInboxWorkItemKey");function LQ(e,t,i){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 m=r((f,h)=>{const g=c.childrenByIssueId.get(f);if(!(!g?.length||i.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}),m(v.id,y)}},"addIssueChildren");for(const f of c.displayItems)l.push({type:"top",itemKey:`${c.key}:${TO(f)}`,item:f}),f.kind==="issue"&&m(f.issue.id,new Set([f.issue.id]))}return l}r(LQ,"buildInboxKeyboardNavEntries");function zQ({tab:e,hasItems:t,showOnMine:i,showOnRecent:l,showOnUnread:c,showOnAll:u}){return t?e==="mine"?i:e==="recent"?l:e==="unread"?c:u:!1}r(zQ,"shouldShowInboxSection");function RO({approvals:e,joinRequests:t,dashboard:i,failedRuns:l,mineIssues:c,dismissedAlerts:u,dismissedAtByKey:m,currentUserId:f}){const h=e.filter(I=>TN(I,f)&&Fd.has(I.status)&&!hj(m,`approval:${I.id}`,I.updatedAt)).length,g=t.filter(I=>!hj(m,`join:${I.id}`,I.updatedAt??I.createdAt)).length,v=c.filter(I=>I.isUnreadForMe).length,y=i?.agents.error??0,j=i?.costs.monthBudgetCents??0,k=i?.costs.monthUtilizationPercent??0,S=y>0&&l===0&&!u.has("alert:agent-errors"),N=j>0&&k>=80&&!u.has("alert:budget"),_=Number(S)+Number(N);return{inbox:h+g+l+v,approvals:h,failedRuns:l,joinRequests:g,mineIssues:v,alerts:_}}r(RO,"computeInboxBadgeData");var DO="backlog,todo,in_progress,in_review,blocked,done",MO=500,OO=3e4;function LO(){const[e,t]=(0,x.useState)(pj);return(0,x.useEffect)(()=>{const l=r(c=>{c.key==="wardmote:inbox:dismissed"&&t(pj())},"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),hO(u),u})},"dismiss")}}r(LO,"useDismissedInboxAlerts");function zO(e){const t=wn(),i=e?U.inboxDismissals(e):["inbox-dismissals","__disabled__"],{data:l=[]}=ge({queryKey:i,queryFn:r(()=>Xu.list(e),"queryFn"),enabled:!!e}),c=Kt({mutationFn:r(({itemKey:j})=>Xu.dismiss(e,j),"mutationFn"),onMutate:r(async({itemKey:j})=>{if(!e)return{previous:[]};await t.cancelQueries({queryKey:i});const k=t.getQueryData(i)??[],S=new Date;return t.setQueryData(i,[{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(i,S.previous)},"onError"),onSettled:r(()=>{e&&u()},"onSettled")});function u(){e&&(t.invalidateQueries({queryKey:i}),t.invalidateQueries({queryKey:U.sidebarBadges(e)}),t.invalidateQueries({queryKey:U.attention(e)}))}r(u,"invalidateDismissalConsumers");const m=Kt({mutationFn:r(({itemKey:j,snoozedUntil:k})=>Xu.snooze(e,j,k),"mutationFn"),onSettled:u}),f=Kt({mutationFn:r(({itemKey:j})=>Xu.restore(e,j),"mutationFn"),onSettled:u}),h=(0,x.useMemo)(()=>gO(l),[l]),g=c.mutate,v=m.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||m.isPending||f.isPending}}r(zO,"useInboxDismissals");function PQ(){const[e,t]=(0,x.useState)(gj);return(0,x.useEffect)(()=>{const c=r(u=>{u.key==="wardmote:inbox:read-items"&&t(gj())},"handleStorage");return window.addEventListener("storage",c),()=>window.removeEventListener("storage",c)},[]),{readItems:e,markRead:r(c=>{t(u=>{const m=new Set(u);return m.add(c),xj(m),m})},"markRead"),markUnread:r(c=>{t(u=>{const m=new Set(u);return m.delete(c),xj(m),m})},"markUnread")}}r(PQ,"useReadInboxItems");function I0(e){const t=v3(e),{dismissed:i}=LO(),{dismissedAtByKey:l}=zO(e),{data:c}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:u=[]}=ge({queryKey:U.approvals.list(e),queryFn:r(()=>vN.list(e),"queryFn"),enabled:!!e}),{data:m=[]}=ge({queryKey:U.access.joinRequests(e),queryFn:r(async()=>{try{return await Xa.listJoinRequests(e,"pending_approval")}catch(T){if(T instanceof Si&&(T.status===401||T.status===403))return[];throw T}},"queryFn"),enabled:!!e,retry:!1}),f=U.dashboard(e),h=gc({companyId:e,resourceKey:"dashboard",queryKey:f,enabled:!!e}),{data:g,dataUpdatedAt:v}=ge({queryKey:f,queryFn:r(()=>dO.summary(e),"queryFn"),enabled:!!e});xc(h,g,v);const y=U.issues.listMineByMe(e),j=gc({companyId:e,resourceKey:"inbox-badge:mine-issues",queryKey:y,enabled:!!e}),{data:k=[],dataUpdatedAt:S}=ge({queryKey:y,queryFn:r(()=>hn.listCompact(e,{touchedByUserId:"me",inboxArchivedByUserId:"me",status:DO,limit:MO}).then(T=>T),"queryFn"),enabled:!!e,refetchOnWindowFocus:!1,staleTime:OO});xc(j,k,S);const N=(0,x.useMemo)(()=>kO(y3(e,k)),[e,t,k]),_=c?.user.id??c?.session.userId??null,{data:I}=ge({queryKey:e?U.sidebarBadges(e):["sidebar-badges","__disabled__"],queryFn:r(async()=>{try{return await yN.get(e)}catch(T){if(T instanceof Si&&(T.status===401||T.status===403))return null;throw T}},"queryFn"),enabled:!!e,retry:!1}),D=I?.failedRuns??0;return(0,x.useMemo)(()=>RO({approvals:u,joinRequests:m,dashboard:g,failedRuns:D,mineIssues:N,dismissedAlerts:i,dismissedAtByKey:l,currentUserId:_}),[u,m,g,D,N,i,l,_])}r(I0,"useInboxBadge");var PO=new Set(["detailTab","taskDetailView","contextMenuItem","commentAnnotation","commentContextMenuItem","projectSidebarItem","toolbarButton"]),DN=["button:not([disabled])","[href]","input:not([disabled])","select:not([disabled])","textarea:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(","),UO=1e3,$O=new Set($_),MN=(0,x.createContext)(null);function BO(e){return e instanceof Error&&e.message?e.message:"Unknown error"}r(BO,"getErrorMessage");function KO(e,t,i){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:i,renderEnvironment:t}}r(KO,"buildLauncherHostContext");function qO(e){if(!e)return;const t=e.querySelector(DN);if(t){t.focus();return}e.focus()}r(qO,"focusFirstElement");function yj(e,t){if(/^https?:\/\//.test(e)||e.startsWith("/")||e.startsWith("#")||e.startsWith(".")||e.startsWith("?"))return e;const i=t.companyPrefix?.trim();return i?`/${i}/${e}`:e}r(yj,"resolveLauncherNavigationTarget");function FO(e){if(e.action.type!=="navigate"&&e.action.type!=="deepLink"||/^https?:\/\//.test(e.action.target))return null;const[t]=e.action.target.split(/[?#]/,1),i=t?.split("/").filter(Boolean).at(-1);return i?i.toLowerCase():null}r(FO,"launcherRoutePath");function HO(e,t){if(e.placementZone!=="sidebar"||!t)return e.displayName;const i=FO(e);return i?t.slots.find(l=>l.type==="routeSidebar"&&l.routePath?.toLowerCase()===i)?.displayName??e.displayName:e.displayName}r(HO,"launcherDisplayName");function VO(e,t){if(t.key!=="Tab")return;const i=Array.from(e.querySelectorAll(DN)).filter(m=>!m.hasAttribute("disabled")&&m.tabIndex!==-1);if(i.length===0){t.preventDefault(),e.focus();return}const l=i[0],c=i[i.length-1],u=document.activeElement;if(t.shiftKey&&u===l){t.preventDefault(),c.focus();return}!t.shiftKey&&u===c&&(t.preventDefault(),l.focus())}r(VO,"trapFocus");function WO(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(WO,"launcherTriggerClassName");function ON(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(ON,"launcherShellBoundsStyle");function QO(e){const t=e.sourceRect,i=ON(e.bounds).width??"min(24rem, calc(100vw - 2rem))";return t?{width:i,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:i,maxHeight:"min(70vh, 36rem)",top:"4rem",left:"50%",transform:"translateX(-50%)"}}r(QO,"launcherPopoverStyle");function GO(e){return typeof e=="string"&&$O.has(e)}r(GO,"isPluginLauncherBounds");function LN(e){const t=e.enabled??!0,{data:i,isLoading:l,error:c}=ge({queryKey:U.plugins.uiContributions,queryFn:r(()=>h0.listUiContributions(),"queryFn"),enabled:t}),u=(0,x.useMemo)(()=>[...e.placementZones].sort().join("|"),[e.placementZones]),m=(0,x.useMemo)(()=>{const f=new Map;for(const h of i??[])f.set(h.pluginId,h);return f},[i]);return{launchers:(0,x.useMemo)(()=>{const f=new Set(u.split("|").filter(Boolean)),h=[];for(const g of i??[])for(const v of g.launchers)f.has(v.placementZone)&&(PO.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},[i,e.entityType,u]),contributionsByPluginId:m,isLoading:t&&l,errorMessage:c?BO(c):null}}r(LN,"usePluginLaunchers");async function YO(e,t){const i=t.action.target,l=Oy(t.pluginKey,i);return l||(await L3(e),Oy(t.pluginKey,i))}r(YO,"resolveLauncherComponent");function XO({pluginId:e,hostContext:t,children:i}){const l=(0,x.useMemo)(()=>({pluginId:e,hostContext:t}),[e,t]);return(0,s.jsx)(z3.Provider,{value:l,children:i})}r(XO,"PluginLauncherBridgeScope");var ZO=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,s.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 JO({instance:e,renderEnvironment:t}){const i=e.component,{data:l}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),c=l?.user?.id??l?.session?.userId??null,u=(0,x.useMemo)(()=>KO(e.hostContext,t,c),[e.hostContext,t,c]);if(!i)return t.environment==="iframe"?(0,s.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,s.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(i.kind==="web-component")return(0,x.createElement)(i.tagName,{className:"block w-full",pluginLauncher:e.launcher,pluginContext:u});const m=(0,x.createElement)(i.component,{launcher:e.launcher,context:u});return(0,s.jsx)(ZO,{launcher:e.launcher,children:(0,s.jsx)(XO,{pluginId:e.launcher.pluginId,hostContext:u,children:m})})}r(JO,"LauncherRenderContent");function e5({instance:e,stackIndex:t,isTopmost:i,requestBounds:l,closeLauncher:c}){const u=(0,x.useRef)(null),m=(0,x.useId)();(0,x.useEffect)(()=>{if(!i)return;const y=requestAnimationFrame(()=>{qO(u.current)});return()=>cancelAnimationFrame(y)},[i]),(0,x.useEffect)(()=>{if(!i)return;const y=r(j=>{if(u.current){if(j.key==="Escape"){j.preventDefault(),c(e.key,{reason:"escapeKey",nativeEvent:j});return}VO(u.current,j)}},"handleKeyDown");return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[c,e.key,i]);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=UO+t*20,g=e.launcher.action.type,v=g==="openPopover"?QO(e):ON(e.bounds);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"fixed inset-0 bg-black/45",style:{zIndex:h},"aria-hidden":"true",onMouseDown:r(y=>{i&&y.target===y.currentTarget&&c(e.key,{reason:"backdrop",nativeEvent:y})},"onMouseDown")}),(0,s.jsxs)("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":m,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,s.jsxs)("div",{className:"flex items-center gap-3 border-b border-line px-4 py-3",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsx)("h2",{id:m,className:"truncate text-sm font-semibold",children:e.launcher.displayName}),(0,s.jsx)("p",{className:"truncate text-xs text-ink-3",children:e.launcher.pluginDisplayName})]}),(0,s.jsx)(le,{type:"button",variant:"ghost",size:"sm",className:"ml-auto",onClick:r(()=>{c(e.key,{reason:"programmatic"})},"onClick"),children:"Close"})]}),(0,s.jsx)("div",{className:X("overflow-auto p-4",g==="openDrawer"?"h-[calc(100%-3.5rem)]":"max-h-[calc(100vh-7rem)]"),children:(0,s.jsx)(JO,{instance:e,renderEnvironment:f})})]})]})}r(e5,"LauncherModalShell");function t5({children:e}){const[t,i]=(0,x.useState)([]),l=(0,x.useRef)(t);l.current=t;const c=vn(),u=bs(),m=(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);i(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=>m(v.key,{reason:"hostNavigation"})))},[c.key]);const f=(0,x.useCallback)(async(v,y)=>{GO(y.bounds)&&i(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(yj(v.action.target,y));return;case"deepLink":/^https?:\/\//.test(v.action.target)?window.open(v.action.target,"_blank","noopener,noreferrer"):u(yj(v.action.target,y));return;case"performAction":await h0.bridgePerformAction(v.pluginId,v.action.target,v.action.params,y.companyId??null);return;case"openModal":case"openDrawer":case"openPopover":{const S=await YO(j,v),N=k?.getBoundingClientRect()??null,_={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};i(I=>[...I,_]);return}}},[u]),g=(0,x.useMemo)(()=>({activateLauncher:h}),[h]);return(0,s.jsxs)(MN.Provider,{value:g,children:[e,t.map((v,y)=>(0,s.jsx)(e5,{instance:v,stackIndex:y,isTopmost:y===t.length-1,requestBounds:f,closeLauncher:m},v.key))]})}r(t5,"PluginLauncherProvider");function n5(){const e=(0,x.useContext)(MN);if(!e)throw new Error("usePluginLauncherRuntime must be used within PluginLauncherProvider");return e}r(n5,"usePluginLauncherRuntime");function s5({displayName:e,launcher:t,placementZone:i,onClick:l}){return(0,s.jsx)(le,{type:"button",variant:i==="toolbarButton"||i==="globalToolbarButton"?"secondary":"ghost",size:"sm",className:WO(i),onClick:l,children:e??t.displayName})}r(s5,"DefaultLauncherTrigger");function zN({placementZones:e,context:t,entityType:i,className:l,itemClassName:c,errorClassName:u,errorBehavior:m="inline"}){const{activateLauncher:f}=n5(),{launchers:h,contributionsByPluginId:g,errorMessage:v}=LN({placementZones:e,entityType:i,companyId:t.companyId,enabled:!!t.companyId});return v&&m==="inline"?(0,s.jsxs)("div",{className:X("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,s.jsx)("div",{className:l,children:h.map(y=>(0,s.jsx)("div",{className:c,children:(0,s.jsx)(s5,{displayName:HO(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(zN,"PluginLauncherOutlet");function a5(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return(0,x.useMemo)(()=>l=>{t.forEach(c=>c(l))},t)}r(a5,"useCombinedRefs");var _f=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function to(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}r(to,"isWindow");function T0(e){return"nodeType"in e}r(T0,"isNode");function Es(e){var t,i;return e?to(e)?e:T0(e)&&(t=(i=e.ownerDocument)==null?void 0:i.defaultView)!=null?t:window:window}r(Es,"getWindow");function R0(e){const{Document:t}=Es(e);return e instanceof t}r(R0,"isDocument");function Oc(e){return to(e)?!1:e instanceof Es(e).HTMLElement}r(Oc,"isHTMLElement");function PN(e){return e instanceof Es(e).SVGElement}r(PN,"isSVGElement");function no(e){return e?to(e)?e.document:T0(e)?R0(e)?e:Oc(e)||PN(e)?e.ownerDocument:document:document:document}r(no,"getOwnerDocument");var Ma=_f?x.useLayoutEffect:x.useEffect;function Ef(e){const t=(0,x.useRef)(e);return Ma(()=>{t.current=e}),(0,x.useCallback)(function(){for(var i=arguments.length,l=new Array(i),c=0;c<i;c++)l[c]=arguments[c];return t.current==null?void 0:t.current(...l)},[])}r(Ef,"useEvent");function i5(){const e=(0,x.useRef)(null);return[(0,x.useCallback)((t,i)=>{e.current=setInterval(t,i)},[]),(0,x.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}r(i5,"useInterval");function yc(e,t){t===void 0&&(t=[e]);const i=(0,x.useRef)(e);return Ma(()=>{i.current!==e&&(i.current=e)},t),i}r(yc,"useLatestValue");function Lc(e,t){const i=(0,x.useRef)();return(0,x.useMemo)(()=>{const l=e(i.current);return i.current=l,l},[...t])}r(Lc,"useLazyMemo");function Vd(e){const t=Ef(e),i=(0,x.useRef)(null);return[i,(0,x.useCallback)(l=>{l!==i.current&&t?.(l,i.current),i.current=l},[])]}r(Vd,"useNodeRef");function Wd(e){const t=(0,x.useRef)();return(0,x.useEffect)(()=>{t.current=e},[e]),t.current}r(Wd,"usePrevious");var Jp={};function zc(e,t){return(0,x.useMemo)(()=>{if(t)return t;const i=Jp[e]==null?0:Jp[e]+1;return Jp[e]=i,e+"-"+i},[e,t])}r(zc,"useUniqueId");function UN(e){return function(t){for(var i=arguments.length,l=new Array(i>1?i-1:0),c=1;c<i;c++)l[c-1]=arguments[c];return l.reduce((u,m)=>{const f=Object.entries(m);for(const[h,g]of f){const v=u[h];v!=null&&(u[h]=v+e*g)}return u},{...t})}}r(UN,"createAdjustmentFn");var Hl=UN(1),jc=UN(-1);function r5(e){return"clientX"in e&&"clientY"in e}r(r5,"hasViewportRelativeCoordinates");function If(e){if(!e)return!1;const{KeyboardEvent:t}=Es(e.target);return t&&e instanceof t}r(If,"isKeyboardEvent");function l5(e){if(!e)return!1;const{TouchEvent:t}=Es(e.target);return t&&e instanceof t}r(l5,"isTouchEvent");function Qd(e){if(l5(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:i}=e.touches[0];return{x:t,y:i}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:i}=e.changedTouches[0];return{x:t,y:i}}}return r5(e)?{x:e.clientX,y:e.clientY}:null}r(Qd,"getEventCoordinates");var Za=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:i}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(i?Math.round(i):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:i}=e;return"scaleX("+t+") scaleY("+i+")"}},Transform:{toString(e){if(e)return[Za.Translate.toString(e),Za.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:i,easing:l}=e;return t+" "+i+"ms "+l}}}),jj="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function o5(e){return e.matches(jj)?e:e.querySelector(jj)}r(o5,"findFirstFocusableNode");var c5={display:"none"};function u5(e){let{id:t,value:i}=e;return x.createElement("div",{id:t,style:c5},i)}r(u5,"HiddenText");function d5(e){let{id:t,announcement:i,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},i)}r(d5,"LiveRegion");function f5(){const[e,t]=(0,x.useState)("");return{announce:(0,x.useCallback)(i=>{i!=null&&t(i)},[]),announcement:e}}r(f5,"useAnnouncement$1");var $N=(0,x.createContext)(null);function m5(e){const t=(0,x.useContext)($N);(0,x.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}r(m5,"useDndMonitor");function p5(){const[e]=(0,x.useState)(()=>new Set),t=(0,x.useCallback)(i=>(e.add(i),()=>e.delete(i)),[e]);return[(0,x.useCallback)(i=>{let{type:l,event:c}=i;e.forEach(u=>{var m;return(m=u[l])==null?void 0:m.call(u,c)})},[e]),t]}r(p5,"useDndMonitorProvider");var h5={draggable:`
|
|
5
|
-
To pick up a draggable item, press the space bar.
|
|
6
|
-
While dragging, use the arrow keys to move the item.
|
|
7
|
-
Press space again to drop the item in its new position, or press escape to cancel.
|
|
8
|
-
`},g5={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:i}=e;return i?"Draggable item "+t.id+" was moved over droppable area "+i.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:i}=e;return i?"Draggable item "+t.id+" was dropped over droppable area "+i.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function x5(e){let{announcements:t=g5,container:i,hiddenTextDescribedById:l,screenReaderInstructions:c=h5}=e;const{announce:u,announcement:m}=f5(),f=zc("DndLiveRegion"),[h,g]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{g(!0)},[]),m5((0,x.useMemo)(()=>({onDragStart(y){let{active:j}=y;u(t.onDragStart({active:j}))},onDragMove(y){let{active:j,over:k}=y;t.onDragMove&&u(t.onDragMove({active:j,over:k}))},onDragOver(y){let{active:j,over:k}=y;u(t.onDragOver({active:j,over:k}))},onDragEnd(y){let{active:j,over:k}=y;u(t.onDragEnd({active:j,over:k}))},onDragCancel(y){let{active:j,over:k}=y;u(t.onDragCancel({active:j,over:k}))}}),[u,t])),!h)return null;const v=x.createElement(x.Fragment,null,x.createElement(u5,{id:l,value:c.draggable}),x.createElement(d5,{id:f,announcement:m}));return i?(0,Ll.createPortal)(v,i):v}r(x5,"Accessibility");var Xn;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Xn||(Xn={}));function Gd(){}r(Gd,"noop");function wc(e,t){return(0,x.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}r(wc,"useSensor");function D0(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];return(0,x.useMemo)(()=>[...t].filter(l=>l!=null),[...t])}r(D0,"useSensors");var Oa=Object.freeze({x:0,y:0});function BN(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}r(BN,"distanceBetween");function b5(e,t){const i=Qd(e);if(!i)return"0 0";const l={x:(i.x-t.left)/t.width*100,y:(i.y-t.top)/t.height*100};return l.x+"% "+l.y+"%"}r(b5,"getRelativeTransformOrigin");function KN(e,t){let{data:{value:i}}=e,{data:{value:l}}=t;return i-l}r(KN,"sortCollisionsAsc");function v5(e,t){let{data:{value:i}}=e,{data:{value:l}}=t;return l-i}r(v5,"sortCollisionsDesc");function wj(e){let{left:t,top:i,height:l,width:c}=e;return[{x:t,y:i},{x:t+c,y:i},{x:t,y:i+l},{x:t+c,y:i+l}]}r(wj,"cornersOfRectangle");function qN(e,t){if(!e||e.length===0)return null;const[i]=e;return t?i[t]:i}r(qN,"getFirstCollision");function kj(e,t,i){return t===void 0&&(t=e.left),i===void 0&&(i=e.top),{x:t+e.width*.5,y:i+e.height*.5}}r(kj,"centerOfRectangle");var FN=r(e=>{let{collisionRect:t,droppableRects:i,droppableContainers:l}=e;const c=kj(t,t.left,t.top),u=[];for(const m of l){const{id:f}=m,h=i.get(f);if(h){const g=BN(kj(h),c);u.push({id:f,data:{droppableContainer:m,value:g}})}}return u.sort(KN)},"closestCenter"),y5=r(e=>{let{collisionRect:t,droppableRects:i,droppableContainers:l}=e;const c=wj(t),u=[];for(const m of l){const{id:f}=m,h=i.get(f);if(h){const g=wj(h),v=c.reduce((j,k,S)=>j+BN(g[S],k),0),y=Number((v/4).toFixed(4));u.push({id:f,data:{droppableContainer:m,value:y}})}}return u.sort(KN)},"closestCorners");function j5(e,t){const i=Math.max(t.top,e.top),l=Math.max(t.left,e.left),c=Math.min(t.left+t.width,e.left+e.width),u=Math.min(t.top+t.height,e.top+e.height),m=c-l,f=u-i;if(l<c&&i<u){const h=t.width*t.height,g=e.width*e.height,v=m*f,y=v/(h+g-v);return Number(y.toFixed(4))}return 0}r(j5,"getIntersectionRatio");var w5=r(e=>{let{collisionRect:t,droppableRects:i,droppableContainers:l}=e;const c=[];for(const u of l){const{id:m}=u,f=i.get(m);if(f){const h=j5(f,t);h>0&&c.push({id:m,data:{droppableContainer:u,value:h}})}}return c.sort(v5)},"rectIntersection");function k5(e,t,i){return{...e,scaleX:t&&i?t.width/i.width:1,scaleY:t&&i?t.height/i.height:1}}r(k5,"adjustScale");function HN(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Oa}r(HN,"getRectDelta");function S5(e){return r(function(i){for(var l=arguments.length,c=new Array(l>1?l-1:0),u=1;u<l;u++)c[u-1]=arguments[u];return c.reduce((m,f)=>({...m,top:m.top+e*f.y,bottom:m.bottom+e*f.y,left:m.left+e*f.x,right:m.right+e*f.x}),{...i})},"adjustClientRect")}r(S5,"createRectAdjustmentFn");var N5=S5(1);function VN(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}r(VN,"parseTransform");function C5(e,t,i){const l=VN(t);if(!l)return e;const{scaleX:c,scaleY:u,x:m,y:f}=l,h=e.left-m-(1-c)*parseFloat(i),g=e.top-f-(1-u)*parseFloat(i.slice(i.indexOf(" ")+1)),v=c?e.width/c:e.width,y=u?e.height/u:e.height;return{width:v,height:y,top:g,right:h+v,bottom:g+y,left:h}}r(C5,"inverseTransform");var A5={ignoreTransform:!1};function so(e,t){t===void 0&&(t=A5);let i=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:g,transformOrigin:v}=Es(e).getComputedStyle(e);g&&(i=C5(i,g,v))}const{top:l,left:c,width:u,height:m,bottom:f,right:h}=i;return{top:l,left:c,width:u,height:m,bottom:f,right:h}}r(so,"getClientRect");function Sj(e){return so(e,{ignoreTransform:!0})}r(Sj,"getTransformAgnosticClientRect");function _5(e){const t=e.innerWidth,i=e.innerHeight;return{top:0,left:0,right:t,bottom:i,width:t,height:i}}r(_5,"getWindowClientRect");function E5(e,t){return t===void 0&&(t=Es(e).getComputedStyle(e)),t.position==="fixed"}r(E5,"isFixed");function I5(e,t){t===void 0&&(t=Es(e).getComputedStyle(e));const i=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(l=>{const c=t[l];return typeof c=="string"?i.test(c):!1})}r(I5,"isScrollable");function Tf(e,t){const i=[];function l(c){if(t!=null&&i.length>=t||!c)return i;if(R0(c)&&c.scrollingElement!=null&&!i.includes(c.scrollingElement))return i.push(c.scrollingElement),i;if(!Oc(c)||PN(c)||i.includes(c))return i;const u=Es(e).getComputedStyle(c);return c!==e&&I5(c,u)&&i.push(c),E5(c,u)?i:l(c.parentNode)}return r(l,"findScrollableAncestors"),e?l(e):i}r(Tf,"getScrollableAncestors");function WN(e){const[t]=Tf(e,1);return t??null}r(WN,"getFirstScrollableAncestor");function eh(e){return!_f||!e?null:to(e)?e:T0(e)?R0(e)||e===no(e).scrollingElement?window:Oc(e)?e:null:null}r(eh,"getScrollableElement");function QN(e){return to(e)?e.scrollX:e.scrollLeft}r(QN,"getScrollXCoordinate");function GN(e){return to(e)?e.scrollY:e.scrollTop}r(GN,"getScrollYCoordinate");function ug(e){return{x:QN(e),y:GN(e)}}r(ug,"getScrollCoordinates");var as;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(as||(as={}));function YN(e){return!_f||!e?!1:e===document.scrollingElement}r(YN,"isDocumentScrollingElement");function XN(e){const t={x:0,y:0},i=YN(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={x:e.scrollWidth-i.width,y:e.scrollHeight-i.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=l.y,isRight:e.scrollLeft>=l.x,maxScroll:l,minScroll:t}}r(XN,"getScrollPosition");var T5={x:.2,y:.2};function R5(e,t,i,l,c){let{top:u,left:m,right:f,bottom:h}=i;l===void 0&&(l=10),c===void 0&&(c=T5);const{isTop:g,isBottom:v,isLeft:y,isRight:j}=XN(e),k={x:0,y:0},S={x:0,y:0},N={height:t.height*c.y,width:t.width*c.x};return!g&&u<=t.top+N.height?(k.y=as.Backward,S.y=l*Math.abs((t.top+N.height-u)/N.height)):!v&&h>=t.bottom-N.height&&(k.y=as.Forward,S.y=l*Math.abs((t.bottom-N.height-h)/N.height)),!j&&f>=t.right-N.width?(k.x=as.Forward,S.x=l*Math.abs((t.right-N.width-f)/N.width)):!y&&m<=t.left+N.width&&(k.x=as.Backward,S.x=l*Math.abs((t.left+N.width-m)/N.width)),{direction:k,speed:S}}r(R5,"getScrollDirectionAndSpeed");function D5(e){if(e===document.scrollingElement){const{innerWidth:u,innerHeight:m}=window;return{top:0,left:0,right:u,bottom:m,width:u,height:m}}const{top:t,left:i,right:l,bottom:c}=e.getBoundingClientRect();return{top:t,left:i,right:l,bottom:c,width:e.clientWidth,height:e.clientHeight}}r(D5,"getScrollElementRect");function ZN(e){return e.reduce((t,i)=>Hl(t,ug(i)),Oa)}r(ZN,"getScrollOffsets");function M5(e){return e.reduce((t,i)=>t+QN(i),0)}r(M5,"getScrollXOffset");function O5(e){return e.reduce((t,i)=>t+GN(i),0)}r(O5,"getScrollYOffset");function JN(e,t){if(t===void 0&&(t=so),!e)return;const{top:i,left:l,bottom:c,right:u}=t(e);WN(e)&&(c<=0||u<=0||i>=window.innerHeight||l>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}r(JN,"scrollIntoViewIfNeeded");var L5=[["x",["left","right"],M5],["y",["top","bottom"],O5]],M0=class{static{r(this,"Rect")}constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const i=Tf(t),l=ZN(i);this.rect={...e},this.width=e.width,this.height=e.height;for(const[c,u,m]of L5)for(const f of u)Object.defineProperty(this,f,{get:r(()=>{const h=m(i),g=l[c]-h;return this.rect[f]+g},"get"),enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},lc=class{static{r(this,"Listeners")}constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(t=>{var i;return(i=this.target)==null?void 0:i.removeEventListener(...t)})},this.target=e}add(e,t,i){var l;(l=this.target)==null||l.addEventListener(e,t,i),this.listeners.push([e,t,i])}};function z5(e){const{EventTarget:t}=Es(e);return e instanceof t?e:no(e)}r(z5,"getEventListenerTarget");function th(e,t){const i=Math.abs(e.x),l=Math.abs(e.y);return typeof t=="number"?Math.sqrt(i**2+l**2)>t:"x"in t&&"y"in t?i>t.x&&l>t.y:"x"in t?i>t.x:"y"in t?l>t.y:!1}r(th,"hasExceededDistance");var ga;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ga||(ga={}));function Nj(e){e.preventDefault()}r(Nj,"preventDefault");function P5(e){e.stopPropagation()}r(P5,"stopPropagation");var It;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(It||(It={}));var eC={start:[It.Space,It.Enter],cancel:[It.Esc],end:[It.Space,It.Enter,It.Tab]},U5=r((e,t)=>{let{currentCoordinates:i}=t;switch(e.code){case It.Right:return{...i,x:i.x+25};case It.Left:return{...i,x:i.x-25};case It.Down:return{...i,y:i.y+25};case It.Up:return{...i,y:i.y-25}}},"defaultKeyboardCoordinateGetter"),O0=class{static{r(this,"KeyboardSensor")}constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new lc(no(t)),this.windowListeners=new lc(Es(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ga.Resize,this.handleCancel),this.windowListeners.add(ga.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ga.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:e,onStart:t}=this.props,i=e.node.current;i&&JN(i),t(Oa)}handleKeyDown(e){if(If(e)){const{active:t,context:i,options:l}=this.props,{keyboardCodes:c=eC,coordinateGetter:u=U5,scrollBehavior:m="smooth"}=l,{code:f}=e;if(c.end.includes(f)){this.handleEnd(e);return}if(c.cancel.includes(f)){this.handleCancel(e);return}const{collisionRect:h}=i.current,g=h?{x:h.left,y:h.top}:Oa;this.referenceCoordinates||(this.referenceCoordinates=g);const v=u(e,{active:t,context:i.current,currentCoordinates:g});if(v){const y=jc(v,g),j={x:0,y:0},{scrollableAncestors:k}=i.current;for(const S of k){const N=e.code,{isTop:_,isRight:I,isLeft:D,isBottom:T,maxScroll:C,minScroll:M}=XN(S),z=D5(S),K={x:Math.min(N===It.Right?z.right-z.width/2:z.right,Math.max(N===It.Right?z.left:z.left+z.width/2,v.x)),y:Math.min(N===It.Down?z.bottom-z.height/2:z.bottom,Math.max(N===It.Down?z.top:z.top+z.height/2,v.y))},P=N===It.Right&&!I||N===It.Left&&!D,A=N===It.Down&&!T||N===It.Up&&!_;if(P&&K.x!==v.x){const B=S.scrollLeft+y.x,O=N===It.Right&&B<=C.x||N===It.Left&&B>=M.x;if(O&&!y.y){S.scrollTo({left:B,behavior:m});return}O?j.x=S.scrollLeft-B:j.x=N===It.Right?S.scrollLeft-C.x:S.scrollLeft-M.x,j.x&&S.scrollBy({left:-j.x,behavior:m});break}else if(A&&K.y!==v.y){const B=S.scrollTop+y.y,O=N===It.Down&&B<=C.y||N===It.Up&&B>=M.y;if(O&&!y.x){S.scrollTo({top:B,behavior:m});return}O?j.y=S.scrollTop-B:j.y=N===It.Down?S.scrollTop-C.y:S.scrollTop-M.y,j.y&&S.scrollBy({top:-j.y,behavior:m});break}}this.handleMove(e,Hl(jc(v,this.referenceCoordinates),j))}}}handleMove(e,t){const{onMove:i}=this.props;e.preventDefault(),i(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};O0.activators=[{eventName:"onKeyDown",handler:r((e,t,i)=>{let{keyboardCodes:l=eC,onActivation:c}=t,{active:u}=i;const{code:m}=e.nativeEvent;if(l.start.includes(m)){const f=u.activatorNode.current;return f&&e.target!==f?!1:(e.preventDefault(),c?.({event:e.nativeEvent}),!0)}return!1},"handler")}];function Cj(e){return!!(e&&"distance"in e)}r(Cj,"isDistanceConstraint");function Aj(e){return!!(e&&"delay"in e)}r(Aj,"isDelayConstraint");var L0=class{static{r(this,"AbstractPointerSensor")}constructor(e,t,i){var l;i===void 0&&(i=z5(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:c}=e,{target:u}=c;this.props=e,this.events=t,this.document=no(u),this.documentListeners=new lc(this.document),this.listeners=new lc(i),this.windowListeners=new lc(Es(u)),this.initialCoordinates=(l=Qd(c))!=null?l:Oa,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:i}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(ga.Resize,this.handleCancel),this.windowListeners.add(ga.DragStart,Nj),this.windowListeners.add(ga.VisibilityChange,this.handleCancel),this.windowListeners.add(ga.ContextMenu,Nj),this.documentListeners.add(ga.Keydown,this.handleKeydown),t){if(i!=null&&i({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Aj(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Cj(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){const{active:i,onPending:l}=this.props;l(i,e,this.initialCoordinates,t)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(ga.Click,P5,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ga.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:i,initialCoordinates:l,props:c}=this,{onMove:u,options:{activationConstraint:m}}=c;if(!l)return;const f=(t=Qd(e))!=null?t:Oa,h=jc(l,f);if(!i&&m){if(Cj(m)){if(m.tolerance!=null&&th(h,m.tolerance))return this.handleCancel();if(th(h,m.distance))return this.handleStart()}if(Aj(m)&&th(h,m.tolerance))return this.handleCancel();this.handlePending(m,h);return}e.cancelable&&e.preventDefault(),u(f)}handleEnd(){const{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){const{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===It.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},$5={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Rf=class extends L0{static{r(this,"PointerSensor")}constructor(e){const{event:t}=e,i=no(t.target);super(e,$5,i)}};Rf.activators=[{eventName:"onPointerDown",handler:r((e,t)=>{let{nativeEvent:i}=e,{onActivation:l}=t;return!i.isPrimary||i.button!==0?!1:(l?.({event:i}),!0)},"handler")}];var B5={move:{name:"mousemove"},end:{name:"mouseup"}},dg;(function(e){e[e.RightClick=2]="RightClick"})(dg||(dg={}));var tC=class extends L0{static{r(this,"MouseSensor")}constructor(e){super(e,B5,no(e.event.target))}};tC.activators=[{eventName:"onMouseDown",handler:r((e,t)=>{let{nativeEvent:i}=e,{onActivation:l}=t;return i.button===dg.RightClick?!1:(l?.({event:i}),!0)},"handler")}];var nh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},nC=class extends L0{static{r(this,"TouchSensor")}constructor(e){super(e,nh)}static setup(){return window.addEventListener(nh.move.name,e,{capture:!1,passive:!1}),r(function(){window.removeEventListener(nh.move.name,e)},"teardown");function e(){}r(e,"noop")}};nC.activators=[{eventName:"onTouchStart",handler:r((e,t)=>{let{nativeEvent:i}=e,{onActivation:l}=t;const{touches:c}=i;return c.length>1?!1:(l?.({event:i}),!0)},"handler")}];var oc;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(oc||(oc={}));var Yd;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(Yd||(Yd={}));function K5(e){let{acceleration:t,activator:i=oc.Pointer,canScroll:l,draggingRect:c,enabled:u,interval:m=5,order:f=Yd.TreeOrder,pointerCoordinates:h,scrollableAncestors:g,scrollableAncestorRects:v,delta:y,threshold:j}=e;const k=F5({delta:y,disabled:!u}),[S,N]=i5(),_=(0,x.useRef)({x:0,y:0}),I=(0,x.useRef)({x:0,y:0}),D=(0,x.useMemo)(()=>{switch(i){case oc.Pointer:return h?{top:h.y,bottom:h.y,left:h.x,right:h.x}:null;case oc.DraggableRect:return c}},[i,c,h]),T=(0,x.useRef)(null),C=(0,x.useCallback)(()=>{const z=T.current;if(!z)return;const K=_.current.x*I.current.x,P=_.current.y*I.current.y;z.scrollBy(K,P)},[]),M=(0,x.useMemo)(()=>f===Yd.TreeOrder?[...g].reverse():g,[f,g]);(0,x.useEffect)(()=>{if(!u||!g.length||!D){N();return}for(const z of M){if(l?.(z)===!1)continue;const K=g.indexOf(z),P=v[K];if(!P)continue;const{direction:A,speed:B}=R5(z,P,D,t,j);for(const O of["x","y"])k[O][A[O]]||(B[O]=0,A[O]=0);if(B.x>0||B.y>0){N(),T.current=z,S(C,m),_.current=B,I.current=A;return}}_.current={x:0,y:0},I.current={x:0,y:0},N()},[t,C,l,N,u,m,JSON.stringify(D),JSON.stringify(k),S,g,M,v,JSON.stringify(j)])}r(K5,"useAutoScroller");var q5={x:{[as.Backward]:!1,[as.Forward]:!1},y:{[as.Backward]:!1,[as.Forward]:!1}};function F5(e){let{delta:t,disabled:i}=e;const l=Wd(t);return Lc(c=>{if(i||!l||!c)return q5;const u={x:Math.sign(t.x-l.x),y:Math.sign(t.y-l.y)};return{x:{[as.Backward]:c.x[as.Backward]||u.x===-1,[as.Forward]:c.x[as.Forward]||u.x===1},y:{[as.Backward]:c.y[as.Backward]||u.y===-1,[as.Forward]:c.y[as.Forward]||u.y===1}}},[i,t,l])}r(F5,"useScrollIntent");function H5(e,t){const i=t!=null?e.get(t):void 0,l=i?i.node.current:null;return Lc(c=>{var u;return t==null?null:(u=l??c)!=null?u:null},[l,t])}r(H5,"useCachedNode");function V5(e,t){return(0,x.useMemo)(()=>e.reduce((i,l)=>{const{sensor:c}=l,u=c.activators.map(m=>({eventName:m.eventName,handler:t(m.handler,l)}));return[...i,...u]},[]),[e,t])}r(V5,"useCombineActivators");var kc;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(kc||(kc={}));var fg;(function(e){e.Optimized="optimized"})(fg||(fg={}));var _j=new Map;function W5(e,t){let{dragging:i,dependencies:l,config:c}=t;const[u,m]=(0,x.useState)(null),{frequency:f,measure:h,strategy:g}=c,v=(0,x.useRef)(e),y=_(),j=yc(y),k=(0,x.useCallback)(function(I){I===void 0&&(I=[]),!j.current&&m(D=>D===null?I:D.concat(I.filter(T=>!D.includes(T))))},[j]),S=(0,x.useRef)(null),N=Lc(I=>{if(y&&!i)return _j;if(!I||I===_j||v.current!==e||u!=null){const D=new Map;for(let T of e){if(!T)continue;if(u&&u.length>0&&!u.includes(T.id)&&T.rect.current){D.set(T.id,T.rect.current);continue}const C=T.node.current,M=C?new M0(h(C),C):null;T.rect.current=M,M&&D.set(T.id,M)}return D}return I},[e,u,i,y,h]);return(0,x.useEffect)(()=>{v.current=e},[e]),(0,x.useEffect)(()=>{y||k()},[i,y]),(0,x.useEffect)(()=>{u&&u.length>0&&m(null)},[JSON.stringify(u)]),(0,x.useEffect)(()=>{y||typeof f!="number"||S.current!==null||(S.current=setTimeout(()=>{k(),S.current=null},f))},[f,y,k,...l]),{droppableRects:N,measureDroppableContainers:k,measuringScheduled:u!=null};function _(){switch(g){case kc.Always:return!1;case kc.BeforeDragging:return i;default:return!i}}r(_,"isDisabled")}r(W5,"useDroppableMeasuring");function z0(e,t){return Lc(i=>e?i||(typeof t=="function"?t(e):e):null,[t,e])}r(z0,"useInitialValue");function Q5(e,t){return z0(e,t)}r(Q5,"useInitialRect");function G5(e){let{callback:t,disabled:i}=e;const l=Ef(t),c=(0,x.useMemo)(()=>{if(i||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:u}=window;return new u(l)},[l,i]);return(0,x.useEffect)(()=>()=>c?.disconnect(),[c]),c}r(G5,"useMutationObserver");function Df(e){let{callback:t,disabled:i}=e;const l=Ef(t),c=(0,x.useMemo)(()=>{if(i||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:u}=window;return new u(l)},[i]);return(0,x.useEffect)(()=>()=>c?.disconnect(),[c]),c}r(Df,"useResizeObserver");function Y5(e){return new M0(so(e),e)}r(Y5,"defaultMeasure");function Ej(e,t,i){t===void 0&&(t=Y5);const[l,c]=(0,x.useState)(null);function u(){c(h=>{if(!e)return null;if(e.isConnected===!1){var g;return(g=h??i)!=null?g:null}const v=t(e);return JSON.stringify(h)===JSON.stringify(v)?h:v})}r(u,"measureRect");const m=G5({callback(h){if(e)for(const g of h){const{type:v,target:y}=g;if(v==="childList"&&y instanceof HTMLElement&&y.contains(e)){u();break}}}}),f=Df({callback:u});return Ma(()=>{u(),e?(f?.observe(e),m?.observe(document.body,{childList:!0,subtree:!0})):(f?.disconnect(),m?.disconnect())},[e]),l}r(Ej,"useRect");function X5(e){return HN(e,z0(e))}r(X5,"useRectDelta");var Ij=[];function Z5(e){const t=(0,x.useRef)(e),i=Lc(l=>e?l&&l!==Ij&&e&&t.current&&e.parentNode===t.current.parentNode?l:Tf(e):Ij,[e]);return(0,x.useEffect)(()=>{t.current=e},[e]),i}r(Z5,"useScrollableAncestors");function J5(e){const[t,i]=(0,x.useState)(null),l=(0,x.useRef)(e),c=(0,x.useCallback)(u=>{const m=eh(u.target);m&&i(f=>f?(f.set(m,ug(m)),new Map(f)):null)},[]);return(0,x.useEffect)(()=>{const u=l.current;if(e!==u){m(u);const f=e.map(h=>{const g=eh(h);return g?(g.addEventListener("scroll",c,{passive:!0}),[g,ug(g)]):null}).filter(h=>h!=null);i(f.length?new Map(f):null),l.current=e}return()=>{m(e),m(u)};function m(f){f.forEach(h=>{eh(h)?.removeEventListener("scroll",c)})}},[c,e]),(0,x.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((u,m)=>Hl(u,m),Oa):ZN(e):Oa,[e,t])}r(J5,"useScrollOffsets");function Tj(e,t){t===void 0&&(t=[]);const i=(0,x.useRef)(null);return(0,x.useEffect)(()=>{i.current=null},t),(0,x.useEffect)(()=>{const l=e!==Oa;l&&!i.current&&(i.current=e),!l&&i.current&&(i.current=null)},[e]),i.current?jc(e,i.current):Oa}r(Tj,"useScrollOffsetsDelta");function eL(e){(0,x.useEffect)(()=>{if(!_f)return;const t=e.map(i=>{let{sensor:l}=i;return l.setup==null?void 0:l.setup()});return()=>{for(const i of t)i?.()}},e.map(t=>{let{sensor:i}=t;return i}))}r(eL,"useSensorSetup");function tL(e,t){return(0,x.useMemo)(()=>e.reduce((i,l)=>{let{eventName:c,handler:u}=l;return i[c]=m=>{u(m,t)},i},{}),[e,t])}r(tL,"useSyntheticListeners");function sC(e){return(0,x.useMemo)(()=>e?_5(e):null,[e])}r(sC,"useWindowRect");var Rj=[];function nL(e,t){t===void 0&&(t=so);const[i]=e,l=sC(i?Es(i):null),[c,u]=(0,x.useState)(Rj);function m(){u(()=>e.length?e.map(h=>YN(h)?l:new M0(t(h),h)):Rj)}r(m,"measureRects");const f=Df({callback:m});return Ma(()=>{f?.disconnect(),m(),e.forEach(h=>f?.observe(h))},[e]),c}r(nL,"useRects");function aC(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return Oc(t)?t:e}r(aC,"getMeasurableNode");function sL(e){let{measure:t}=e;const[i,l]=(0,x.useState)(null),c=Df({callback:(0,x.useCallback)(h=>{for(const{target:g}of h)if(Oc(g)){l(v=>{const y=t(g);return v?{...v,width:y.width,height:y.height}:y});break}},[t])}),u=(0,x.useCallback)(h=>{const g=aC(h);c?.disconnect(),g&&c?.observe(g),l(g?t(g):null)},[t,c]),[m,f]=Vd(u);return(0,x.useMemo)(()=>({nodeRef:m,rect:i,setRef:f}),[i,m,f])}r(sL,"useDragOverlayMeasuring");var aL=[{sensor:Rf,options:{}},{sensor:O0,options:{}}],iL={current:{}},Sd={draggable:{measure:Sj},droppable:{measure:Sj,strategy:kc.WhileDragging,frequency:fg.Optimized},dragOverlay:{measure:so}},cc=class extends Map{static{r(this,"DroppableContainersMap")}get(e){var t;return e!=null&&(t=super.get(e))!=null?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){var t,i;return(t=(i=this.get(e))==null?void 0:i.node.current)!=null?t:void 0}},rL={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new cc,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:Gd},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Sd,measureDroppableContainers:Gd,windowRect:null,measuringScheduled:!1},iC={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:Gd,draggableNodes:new Map,over:null,measureDroppableContainers:Gd},Pc=(0,x.createContext)(iC),rC=(0,x.createContext)(rL);function lL(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new cc}}}r(lL,"getInitialState");function oL(e,t){switch(t.type){case Xn.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Xn.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Xn.DragEnd:case Xn.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Xn.RegisterDroppable:{const{element:i}=t,{id:l}=i,c=new cc(e.droppable.containers);return c.set(l,i),{...e,droppable:{...e.droppable,containers:c}}}case Xn.SetDroppableDisabled:{const{id:i,key:l,disabled:c}=t,u=e.droppable.containers.get(i);if(!u||l!==u.key)return e;const m=new cc(e.droppable.containers);return m.set(i,{...u,disabled:c}),{...e,droppable:{...e.droppable,containers:m}}}case Xn.UnregisterDroppable:{const{id:i,key:l}=t,c=e.droppable.containers.get(i);if(!c||l!==c.key)return e;const u=new cc(e.droppable.containers);return u.delete(i),{...e,droppable:{...e.droppable,containers:u}}}default:return e}}r(oL,"reducer");function cL(e){let{disabled:t}=e;const{active:i,activatorEvent:l,draggableNodes:c}=(0,x.useContext)(Pc),u=Wd(l),m=Wd(i?.id);return(0,x.useEffect)(()=>{if(!t&&!l&&u&&m!=null){if(!If(u)||document.activeElement===u.target)return;const f=c.get(m);if(!f)return;const{activatorNode:h,node:g}=f;if(!h.current&&!g.current)return;requestAnimationFrame(()=>{for(const v of[h.current,g.current]){if(!v)continue;const y=o5(v);if(y){y.focus();break}}})}},[l,t,c,m,u]),null}r(cL,"RestoreFocus");function lC(e,t){let{transform:i,...l}=t;return e!=null&&e.length?e.reduce((c,u)=>u({transform:c,...l}),i):i}r(lC,"applyModifiers");function uL(e){return(0,x.useMemo)(()=>({draggable:{...Sd.draggable,...e?.draggable},droppable:{...Sd.droppable,...e?.droppable},dragOverlay:{...Sd.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}r(uL,"useMeasuringConfiguration");function dL(e){let{activeNode:t,measure:i,initialRect:l,config:c=!0}=e;const u=(0,x.useRef)(!1),{x:m,y:f}=typeof c=="boolean"?{x:c,y:c}:c;Ma(()=>{if(!m&&!f||!t){u.current=!1;return}if(u.current||!l)return;const h=t?.node.current;if(!h||h.isConnected===!1)return;const g=HN(i(h),l);if(m||(g.x=0),f||(g.y=0),u.current=!0,Math.abs(g.x)>0||Math.abs(g.y)>0){const v=WN(h);v&&v.scrollBy({top:g.y,left:g.x})}},[t,m,f,l,i])}r(dL,"useLayoutShiftScrollCompensation");var Mf=(0,x.createContext)({...Oa,scaleX:1,scaleY:1}),Zi;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Zi||(Zi={}));var P0=(0,x.memo)(r(function(t){var i,l,c,u;let{id:m,accessibility:f,autoScroll:h=!0,children:g,sensors:v=aL,collisionDetection:y=w5,measuring:j,modifiers:k,...S}=t;const[N,_]=(0,x.useReducer)(oL,void 0,lL),[I,D]=p5(),[T,C]=(0,x.useState)(Zi.Uninitialized),M=T===Zi.Initialized,{draggable:{active:z,nodes:K,translate:P},droppable:{containers:A}}=N,B=z!=null?K.get(z):null,O=(0,x.useRef)({initial:null,translated:null}),W=(0,x.useMemo)(()=>{var Dt;return z!=null?{id:z,data:(Dt=B?.data)!=null?Dt:iL,rect:O}:null},[z,B]),Y=(0,x.useRef)(null),[ce,oe]=(0,x.useState)(null),[$,R]=(0,x.useState)(null),ne=yc(S,Object.values(S)),ue=zc("DndDescribedBy",m),ae=(0,x.useMemo)(()=>A.getEnabled(),[A]),Ee=uL(j),{droppableRects:fe,measureDroppableContainers:Ae,measuringScheduled:Ce}=W5(ae,{dragging:M,dependencies:[P.x,P.y],config:Ee.droppable}),Se=H5(K,z),he=(0,x.useMemo)(()=>$?Qd($):null,[$]),De=ln(),Ye=Q5(Se,Ee.draggable.measure);dL({activeNode:z!=null?K.get(z):null,config:De.layoutShiftCompensation,initialRect:Ye,measure:Ee.draggable.measure});const ze=Ej(Se,Ee.draggable.measure,Ye),ve=Ej(Se?Se.parentElement:null),ft=(0,x.useRef)({activatorEvent:null,active:null,activeNode:Se,collisionRect:null,collisions:null,droppableRects:fe,draggableNodes:K,draggingNode:null,draggingNodeRect:null,droppableContainers:A,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),At=A.getNodeFor((i=ft.current.over)==null?void 0:i.id),xt=sL({measure:Ee.dragOverlay.measure}),Pt=(l=xt.nodeRef.current)!=null?l:Se,de=M?(c=xt.rect)!=null?c:ze:null,Oe=!!(xt.nodeRef.current&&xt.rect),qe=X5(Oe?null:ze),ut=sC(Pt?Es(Pt):null),Vt=Z5(M?At??Se:null),Wt=nL(Vt),H=lC(k,{transform:{x:P.x-qe.x,y:P.y-qe.y,scaleX:1,scaleY:1},activatorEvent:$,active:W,activeNodeRect:ze,containerNodeRect:ve,draggingNodeRect:de,over:ft.current.over,overlayNodeRect:xt.rect,scrollableAncestors:Vt,scrollableAncestorRects:Wt,windowRect:ut}),rn=he?Hl(he,P):null,je=J5(Vt),$e=Tj(je),He=Tj(je,[ze]),mt=Hl(H,$e),it=de?N5(de,H):null,Qt=W&&it?y({active:W,collisionRect:it,droppableRects:fe,droppableContainers:ae,pointerCoordinates:rn}):null,Rn=qN(Qt,"id"),[Gt,Tt]=(0,x.useState)(null),Jt=k5(Oe?H:Hl(H,He),(u=Gt?.rect)!=null?u:null,ze),kt=(0,x.useRef)(null),Qn=(0,x.useCallback)((Dt,ht)=>{let{sensor:Mt,options:Re}=ht;if(Y.current==null)return;const Me=K.get(Y.current);if(!Me)return;const Fe=Dt.nativeEvent,St=new Mt({active:Y.current,activeNode:Me,event:Fe,options:Re,context:ft,onAbort(Ot){if(!K.get(Ot))return;const{onDragAbort:on}=ne.current,Ut={id:Ot};on?.(Ut),I({type:"onDragAbort",event:Ut})},onPending(Ot,on,Ut,en){if(!K.get(Ot))return;const{onDragPending:tn}=ne.current,fn={id:Ot,constraint:on,initialCoordinates:Ut,offset:en};tn?.(fn),I({type:"onDragPending",event:fn})},onStart(Ot){const on=Y.current;if(on==null)return;const Ut=K.get(on);if(!Ut)return;const{onDragStart:en}=ne.current,tn={activatorEvent:Fe,active:{id:on,data:Ut.data,rect:O}};(0,Ll.unstable_batchedUpdates)(()=>{en?.(tn),C(Zi.Initializing),_({type:Xn.DragStart,initialCoordinates:Ot,active:on}),I({type:"onDragStart",event:tn}),oe(kt.current),R(Fe)})},onMove(Ot){_({type:Xn.DragMove,coordinates:Ot})},onEnd:at(Xn.DragEnd),onCancel:at(Xn.DragCancel)});kt.current=St;function at(Ot){return r(async function(){const{active:Ut,collisions:en,over:tn,scrollAdjustedTranslate:fn}=ft.current;let An=null;if(Ut&&fn){const{cancelDrop:Dn}=ne.current;An={activatorEvent:Fe,active:Ut,collisions:en,delta:fn,over:tn},Ot===Xn.DragEnd&&typeof Dn=="function"&&await Promise.resolve(Dn(An))&&(Ot=Xn.DragCancel)}Y.current=null,(0,Ll.unstable_batchedUpdates)(()=>{_({type:Ot}),C(Zi.Uninitialized),Tt(null),oe(null),R(null),kt.current=null;const Dn=Ot===Xn.DragEnd?"onDragEnd":"onDragCancel";if(An){const ta=ne.current[Dn];ta?.(An),I({type:Dn,event:An})}})},"handler")}r(at,"createHandler")},[K]),pt=V5(v,(0,x.useCallback)((Dt,ht)=>(Mt,Re)=>{const Me=Mt.nativeEvent,Fe=K.get(Re);if(Y.current!==null||!Fe||Me.dndKit||Me.defaultPrevented)return;const St={active:Fe};Dt(Mt,ht.options,St)===!0&&(Me.dndKit={capturedBy:ht.sensor},Y.current=Re,Qn(Mt,ht))},[K,Qn]));eL(v),Ma(()=>{ze&&T===Zi.Initializing&&C(Zi.Initialized)},[ze,T]),(0,x.useEffect)(()=>{const{onDragMove:Dt}=ne.current,{active:ht,activatorEvent:Mt,collisions:Re,over:Me}=ft.current;if(!ht||!Mt)return;const Fe={active:ht,activatorEvent:Mt,collisions:Re,delta:{x:mt.x,y:mt.y},over:Me};(0,Ll.unstable_batchedUpdates)(()=>{Dt?.(Fe),I({type:"onDragMove",event:Fe})})},[mt.x,mt.y]),(0,x.useEffect)(()=>{const{active:Dt,activatorEvent:ht,collisions:Mt,droppableContainers:Re,scrollAdjustedTranslate:Me}=ft.current;if(!Dt||Y.current==null||!ht||!Me)return;const{onDragOver:Fe}=ne.current,St=Re.get(Rn),at=St&&St.rect.current?{id:St.id,rect:St.rect.current,data:St.data,disabled:St.disabled}:null,Ot={active:Dt,activatorEvent:ht,collisions:Mt,delta:{x:Me.x,y:Me.y},over:at};(0,Ll.unstable_batchedUpdates)(()=>{Tt(at),Fe?.(Ot),I({type:"onDragOver",event:Ot})})},[Rn]),Ma(()=>{ft.current={activatorEvent:$,active:W,activeNode:Se,collisionRect:it,collisions:Qt,droppableRects:fe,draggableNodes:K,draggingNode:Pt,draggingNodeRect:de,droppableContainers:A,over:Gt,scrollableAncestors:Vt,scrollAdjustedTranslate:mt},O.current={initial:de,translated:it}},[W,Se,Qt,it,K,Pt,de,fe,A,Gt,Vt,mt]),K5({...De,delta:P,draggingRect:it,pointerCoordinates:rn,scrollableAncestors:Vt,scrollableAncestorRects:Wt});const dn=(0,x.useMemo)(()=>({active:W,activeNode:Se,activeNodeRect:ze,activatorEvent:$,collisions:Qt,containerNodeRect:ve,dragOverlay:xt,draggableNodes:K,droppableContainers:A,droppableRects:fe,over:Gt,measureDroppableContainers:Ae,scrollableAncestors:Vt,scrollableAncestorRects:Wt,measuringConfiguration:Ee,measuringScheduled:Ce,windowRect:ut}),[W,Se,ze,$,Qt,ve,xt,K,A,fe,Gt,Ae,Vt,Wt,Ee,Ce,ut]),Rt=(0,x.useMemo)(()=>({activatorEvent:$,activators:pt,active:W,activeNodeRect:ze,ariaDescribedById:{draggable:ue},dispatch:_,draggableNodes:K,over:Gt,measureDroppableContainers:Ae}),[$,pt,W,ze,_,ue,K,Gt,Ae]);return x.createElement($N.Provider,{value:D},x.createElement(Pc.Provider,{value:Rt},x.createElement(rC.Provider,{value:dn},x.createElement(Mf.Provider,{value:Jt},g)),x.createElement(cL,{disabled:f?.restoreFocus===!1})),x.createElement(x5,{...f,hiddenTextDescribedById:ue}));function ln(){const Dt=ce?.autoScrollEnabled===!1,ht=typeof h=="object"?h.enabled===!1:h===!1,Mt=M&&!Dt&&!ht;return typeof h=="object"?{...h,enabled:Mt}:{enabled:Mt}}},"DndContext")),fL=(0,x.createContext)(null),Dj="button",mL="Draggable";function pL(e){let{id:t,data:i,disabled:l=!1,attributes:c}=e;const u=zc(mL),{activators:m,activatorEvent:f,active:h,activeNodeRect:g,ariaDescribedById:v,draggableNodes:y,over:j}=(0,x.useContext)(Pc),{role:k=Dj,roleDescription:S="draggable",tabIndex:N=0}=c??{},_=h?.id===t,I=(0,x.useContext)(_?Mf:fL),[D,T]=Vd(),[C,M]=Vd(),z=tL(m,t),K=yc(i);return Ma(()=>(y.set(t,{id:t,key:u,node:D,activatorNode:C,data:K}),()=>{const P=y.get(t);P&&P.key===u&&y.delete(t)}),[y,t]),{active:h,activatorEvent:f,activeNodeRect:g,attributes:(0,x.useMemo)(()=>({role:k,tabIndex:N,"aria-disabled":l,"aria-pressed":_&&k===Dj?!0:void 0,"aria-roledescription":S,"aria-describedby":v.draggable}),[l,k,N,_,S,v.draggable]),isDragging:_,listeners:l?void 0:z,node:D,over:j,setNodeRef:T,setActivatorNodeRef:M,transform:I}}r(pL,"useDraggable");function oC(){return(0,x.useContext)(rC)}r(oC,"useDndContext");var hL="Droppable",gL={timeout:25};function cC(e){let{data:t,disabled:i=!1,id:l,resizeObserverConfig:c}=e;const u=zc(hL),{active:m,dispatch:f,over:h,measureDroppableContainers:g}=(0,x.useContext)(Pc),v=(0,x.useRef)({disabled:i}),y=(0,x.useRef)(!1),j=(0,x.useRef)(null),k=(0,x.useRef)(null),{disabled:S,updateMeasurementsFor:N,timeout:_}={...gL,...c},I=yc(N??l),D=Df({callback:(0,x.useCallback)(()=>{if(!y.current){y.current=!0;return}k.current!=null&&clearTimeout(k.current),k.current=setTimeout(()=>{g(Array.isArray(I.current)?I.current:[I.current]),k.current=null},_)},[_]),disabled:S||!m}),T=(0,x.useCallback)((K,P)=>{D&&(P&&(D.unobserve(P),y.current=!1),K&&D.observe(K))},[D]),[C,M]=Vd(T),z=yc(t);return(0,x.useEffect)(()=>{!D||!C.current||(D.disconnect(),y.current=!1,D.observe(C.current))},[C,D]),(0,x.useEffect)(()=>(f({type:Xn.RegisterDroppable,element:{id:l,key:u,disabled:i,node:C,rect:j,data:z}}),()=>f({type:Xn.UnregisterDroppable,key:u,id:l})),[l]),(0,x.useEffect)(()=>{i!==v.current.disabled&&(f({type:Xn.SetDroppableDisabled,id:l,key:u,disabled:i}),v.current.disabled=i)},[l,u,i,f]),{active:m,rect:j,isOver:h?.id===l,node:C,over:h,setNodeRef:M}}r(cC,"useDroppable");function xL(e){let{animation:t,children:i}=e;const[l,c]=(0,x.useState)(null),[u,m]=(0,x.useState)(null),f=Wd(i);return!i&&!l&&f&&c(f),Ma(()=>{if(!u)return;const h=l?.key,g=l?.props.id;if(h==null||g==null){c(null);return}Promise.resolve(t(g,u)).then(()=>{c(null)})},[t,l,u]),x.createElement(x.Fragment,null,i,l?(0,x.cloneElement)(l,{ref:m}):null)}r(xL,"AnimationManager");var bL={x:0,y:0,scaleX:1,scaleY:1};function vL(e){let{children:t}=e;return x.createElement(Pc.Provider,{value:iC},x.createElement(Mf.Provider,{value:bL},t))}r(vL,"NullifiedContextProvider");var yL={position:"fixed",touchAction:"none"},jL=r(e=>If(e)?"transform 250ms ease":void 0,"defaultTransition$1"),wL=(0,x.forwardRef)((e,t)=>{let{as:i,activatorEvent:l,adjustScale:c,children:u,className:m,rect:f,style:h,transform:g,transition:v=jL}=e;if(!f)return null;const y=c?g:{...g,scaleX:1,scaleY:1},j={...yL,width:f.width,height:f.height,top:f.top,left:f.left,transform:Za.Transform.toString(y),transformOrigin:c&&l?b5(l,f):void 0,transition:typeof v=="function"?v(l):v,...h};return x.createElement(i,{className:m,style:j,ref:t},u)}),kL=r(e=>t=>{let{active:i,dragOverlay:l}=t;const c={},{styles:u,className:m}=e;if(u!=null&&u.active)for(const[f,h]of Object.entries(u.active))h!==void 0&&(c[f]=i.node.style.getPropertyValue(f),i.node.style.setProperty(f,h));if(u!=null&&u.dragOverlay)for(const[f,h]of Object.entries(u.dragOverlay))h!==void 0&&l.node.style.setProperty(f,h);return m!=null&&m.active&&i.node.classList.add(m.active),m!=null&&m.dragOverlay&&l.node.classList.add(m.dragOverlay),r(function(){for(const[h,g]of Object.entries(c))i.node.style.setProperty(h,g);m!=null&&m.active&&i.node.classList.remove(m.active)},"cleanup")},"defaultDropAnimationSideEffects"),SL=r(e=>{let{transform:{initial:t,final:i}}=e;return[{transform:Za.Transform.toString(t)},{transform:Za.Transform.toString(i)}]},"defaultKeyframeResolver"),NL={duration:250,easing:"ease",keyframes:SL,sideEffects:kL({styles:{active:{opacity:"0"}}})};function CL(e){let{config:t,draggableNodes:i,droppableContainers:l,measuringConfiguration:c}=e;return Ef((u,m)=>{if(t===null)return;const f=i.get(u);if(!f)return;const h=f.node.current;if(!h)return;const g=aC(m);if(!g)return;const{transform:v}=Es(m).getComputedStyle(m),y=VN(v);if(!y)return;const j=typeof t=="function"?t:AL(t);return JN(h,c.draggable.measure),j({active:{id:u,data:f.data,node:h,rect:c.draggable.measure(h)},draggableNodes:i,dragOverlay:{node:m,rect:c.dragOverlay.measure(g)},droppableContainers:l,measuringConfiguration:c,transform:y})})}r(CL,"useDropAnimation");function AL(e){const{duration:t,easing:i,sideEffects:l,keyframes:c}={...NL,...e};return u=>{let{active:m,dragOverlay:f,transform:h,...g}=u;if(!t)return;const v={x:f.rect.left-m.rect.left,y:f.rect.top-m.rect.top},y={scaleX:h.scaleX!==1?m.rect.width*h.scaleX/f.rect.width:1,scaleY:h.scaleY!==1?m.rect.height*h.scaleY/f.rect.height:1},j={x:h.x-v.x,y:h.y-v.y,...y},k=c({...g,active:m,dragOverlay:f,transform:{initial:h,final:j}}),[S]=k,N=k[k.length-1];if(JSON.stringify(S)===JSON.stringify(N))return;const _=l?.({active:m,dragOverlay:f,...g}),I=f.node.animate(k,{duration:t,easing:i,fill:"forwards"});return new Promise(D=>{I.onfinish=()=>{_?.(),D()}})}}r(AL,"createDefaultDropAnimation");var Mj=0;function _L(e){return(0,x.useMemo)(()=>{if(e!=null)return Mj++,Mj},[e])}r(_L,"useKey");var EL=x.memo(e=>{let{adjustScale:t=!1,children:i,dropAnimation:l,style:c,transition:u,modifiers:m,wrapperElement:f="div",className:h,zIndex:g=999}=e;const{activatorEvent:v,active:y,activeNodeRect:j,containerNodeRect:k,draggableNodes:S,droppableContainers:N,dragOverlay:_,over:I,measuringConfiguration:D,scrollableAncestors:T,scrollableAncestorRects:C,windowRect:M}=oC(),z=(0,x.useContext)(Mf),K=_L(y?.id),P=lC(m,{activatorEvent:v,active:y,activeNodeRect:j,containerNodeRect:k,draggingNodeRect:_.rect,over:I,overlayNodeRect:_.rect,scrollableAncestors:T,scrollableAncestorRects:C,transform:z,windowRect:M}),A=z0(j),B=CL({config:l,draggableNodes:S,droppableContainers:N,measuringConfiguration:D}),O=A?_.setRef:void 0;return x.createElement(vL,null,x.createElement(xL,{animation:B},y&&K?x.createElement(wL,{key:K,id:y.id,ref:O,as:f,activatorEvent:v,adjustScale:t,className:h,transition:u,rect:A,style:{zIndex:g,...c},transform:P},i):null))});function U0(e,t,i){const l=e.slice();return l.splice(i<0?l.length+i:i,0,l.splice(t,1)[0]),l}r(U0,"arrayMove");function IL(e,t){return e.reduce((i,l,c)=>{const u=t.get(l);return u&&(i[c]=u),i},Array(e.length))}r(IL,"getSortedRects");function Zu(e){return e!==null&&e>=0}r(Zu,"isValidIndex");function TL(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}r(TL,"itemsEqual");function RL(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}r(RL,"normalizeDisabled");var Ju={scaleX:1,scaleY:1},DL=r(e=>{var t;let{rects:i,activeNodeRect:l,activeIndex:c,overIndex:u,index:m}=e;const f=(t=i[c])!=null?t:l;if(!f)return null;const h=ML(i,m,c);if(m===c){const g=i[u];return g?{x:c<u?g.left+g.width-(f.left+f.width):g.left-f.left,y:0,...Ju}:null}return m>c&&m<=u?{x:-f.width-h,y:0,...Ju}:m<c&&m>=u?{x:f.width+h,y:0,...Ju}:{x:0,y:0,...Ju}},"horizontalListSortingStrategy");function ML(e,t,i){const l=e[t],c=e[t-1],u=e[t+1];return!l||!c&&!u?0:i<t?c?l.left-(c.left+c.width):u.left-(l.left+l.width):u?u.left-(l.left+l.width):l.left-(c.left+c.width)}r(ML,"getItemGap");var uC=r(e=>{let{rects:t,activeIndex:i,overIndex:l,index:c}=e;const u=U0(t,l,i),m=t[c],f=u[c];return!f||!m?null:{x:f.left-m.left,y:f.top-m.top,scaleX:f.width/m.width,scaleY:f.height/m.height}},"rectSortingStrategy"),ed={scaleX:1,scaleY:1},dC=r(e=>{var t;let{activeIndex:i,activeNodeRect:l,index:c,rects:u,overIndex:m}=e;const f=(t=u[i])!=null?t:l;if(!f)return null;if(c===i){const g=u[m];return g?{x:0,y:i<m?g.top+g.height-(f.top+f.height):g.top-f.top,...ed}:null}const h=OL(u,c,i);return c>i&&c<=m?{x:0,y:-f.height-h,...ed}:c<i&&c>=m?{x:0,y:f.height+h,...ed}:{x:0,y:0,...ed}},"verticalListSortingStrategy");function OL(e,t,i){const l=e[t],c=e[t-1],u=e[t+1];return l?i<t?c?l.top-(c.top+c.height):u?u.top-(l.top+l.height):0:u?u.top-(l.top+l.height):c?l.top-(c.top+c.height):0:0}r(OL,"getItemGap$1");var fC="Sortable",mC=x.createContext({activeIndex:-1,containerId:fC,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:uC,disabled:{draggable:!1,droppable:!1}});function $0(e){let{children:t,id:i,items:l,strategy:c=uC,disabled:u=!1}=e;const{active:m,dragOverlay:f,droppableRects:h,over:g,measureDroppableContainers:v}=oC(),y=zc(fC,i),j=f.rect!==null,k=(0,x.useMemo)(()=>l.map(z=>typeof z=="object"&&"id"in z?z.id:z),[l]),S=m!=null,N=m?k.indexOf(m.id):-1,_=g?k.indexOf(g.id):-1,I=(0,x.useRef)(k),D=!TL(k,I.current),T=_!==-1&&N===-1||D,C=RL(u);Ma(()=>{D&&S&&v(k)},[D,k,S,v]),(0,x.useEffect)(()=>{I.current=k},[k]);const M=(0,x.useMemo)(()=>({activeIndex:N,containerId:y,disabled:C,disableTransforms:T,items:k,overIndex:_,useDragOverlay:j,sortedRects:IL(k,h),strategy:c}),[N,y,C.draggable,C.droppable,T,k,_,h,j,c]);return x.createElement(mC.Provider,{value:M},t)}r($0,"SortableContext");var LL=r(e=>{let{id:t,items:i,activeIndex:l,overIndex:c}=e;return U0(i,l,c).indexOf(t)},"defaultNewIndexGetter"),zL=r(e=>{let{containerId:t,isSorting:i,wasDragging:l,index:c,items:u,newIndex:m,previousItems:f,previousContainerId:h,transition:g}=e;return!g||!l||f!==u&&c===m?!1:i?!0:m!==c&&t===h},"defaultAnimateLayoutChanges"),PL={duration:200,easing:"ease"},pC="transform",UL=Za.Transition.toString({property:pC,duration:0,easing:"linear"}),$L={roleDescription:"sortable"};function BL(e){let{disabled:t,index:i,node:l,rect:c}=e;const[u,m]=(0,x.useState)(null),f=(0,x.useRef)(i);return Ma(()=>{if(!t&&i!==f.current&&l.current){const h=c.current;if(h){const g=so(l.current,{ignoreTransform:!0}),v={x:h.left-g.left,y:h.top-g.top,scaleX:h.width/g.width,scaleY:h.height/g.height};(v.x||v.y)&&m(v)}}i!==f.current&&(f.current=i)},[t,i,l,c]),(0,x.useEffect)(()=>{u&&m(null)},[u]),u}r(BL,"useDerivedTransform");function B0(e){let{animateLayoutChanges:t=zL,attributes:i,disabled:l,data:c,getNewIndex:u=LL,id:m,strategy:f,resizeObserverConfig:h,transition:g=PL}=e;const{items:v,containerId:y,activeIndex:j,disabled:k,disableTransforms:S,sortedRects:N,overIndex:_,useDragOverlay:I,strategy:D}=(0,x.useContext)(mC),T=KL(l,k),C=v.indexOf(m),M=(0,x.useMemo)(()=>({sortable:{containerId:y,index:C,items:v},...c}),[y,c,C,v]),z=(0,x.useMemo)(()=>v.slice(v.indexOf(m)),[v,m]),{rect:K,node:P,isOver:A,setNodeRef:B}=cC({id:m,data:M,disabled:T.droppable,resizeObserverConfig:{updateMeasurementsFor:z,...h}}),{active:O,activatorEvent:W,activeNodeRect:Y,attributes:ce,setNodeRef:oe,listeners:$,isDragging:R,over:ne,setActivatorNodeRef:ue,transform:ae}=pL({id:m,data:M,attributes:{...$L,...i},disabled:T.draggable}),Ee=a5(B,oe),fe=!!O,Ae=fe&&!S&&Zu(j)&&Zu(_),Ce=!I&&R,Se=Ce&&Ae?ae:null,he=Ae?Se??(f??D)({rects:N,activeNodeRect:Y,activeIndex:j,overIndex:_,index:C}):null,De=Zu(j)&&Zu(_)?u({id:m,items:v,activeIndex:j,overIndex:_}):C,Ye=O?.id,ze=(0,x.useRef)({activeId:Ye,items:v,newIndex:De,containerId:y}),ve=v!==ze.current.items,ft=t({active:O,containerId:y,isDragging:R,isSorting:fe,id:m,index:C,items:v,newIndex:ze.current.newIndex,previousItems:ze.current.items,previousContainerId:ze.current.containerId,transition:g,wasDragging:ze.current.activeId!=null}),At=BL({disabled:!ft,index:C,node:P,rect:K});return(0,x.useEffect)(()=>{fe&&ze.current.newIndex!==De&&(ze.current.newIndex=De),y!==ze.current.containerId&&(ze.current.containerId=y),v!==ze.current.items&&(ze.current.items=v)},[fe,De,y,v]),(0,x.useEffect)(()=>{if(Ye===ze.current.activeId)return;if(Ye!=null&&ze.current.activeId==null){ze.current.activeId=Ye;return}const Pt=setTimeout(()=>{ze.current.activeId=Ye},50);return()=>clearTimeout(Pt)},[Ye]),{active:O,activeIndex:j,attributes:ce,data:M,rect:K,index:C,newIndex:De,items:v,isOver:A,isSorting:fe,isDragging:R,listeners:$,node:P,overIndex:_,over:ne,setNodeRef:Ee,setActivatorNodeRef:ue,setDroppableNodeRef:B,setDraggableNodeRef:oe,transform:At??he,transition:xt()};function xt(){if(At||ve&&ze.current.newIndex===C)return UL;if(!(Ce&&!If(W)||!g)&&(fe||ft))return Za.Transition.toString({...g,property:pC})}r(xt,"getTransition")}r(B0,"useSortable");function KL(e,t){var i,l;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(i=e?.draggable)!=null?i:t.draggable,droppable:(l=e?.droppable)!=null?l:t.droppable}}r(KL,"normalizeLocalDisabled");function Xd(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}r(Xd,"hasSortableData");var qL=[It.Down,It.Right,It.Up,It.Left],FL=r((e,t)=>{let{context:{active:i,collisionRect:l,droppableRects:c,droppableContainers:u,over:m,scrollableAncestors:f}}=t;if(qL.includes(e.code)){if(e.preventDefault(),!i||!l)return;const h=[];u.getEnabled().forEach(y=>{if(!y||y!=null&&y.disabled)return;const j=c.get(y.id);if(j)switch(e.code){case It.Down:l.top<j.top&&h.push(y);break;case It.Up:l.top>j.top&&h.push(y);break;case It.Left:l.left>j.left&&h.push(y);break;case It.Right:l.left<j.left&&h.push(y)}});const g=y5({active:i,collisionRect:l,droppableRects:c,droppableContainers:h,pointerCoordinates:null});let v=qN(g,"id");if(v===m?.id&&g.length>1&&(v=g[1].id),v!=null){const y=u.get(i.id),j=u.get(v),k=j?c.get(j.id):null,S=j?.node.current;if(S&&k&&y&&j){const N=Tf(S).some((C,M)=>f[M]!==C),_=hC(y,j),I=HL(y,j),D=N||!_?{x:0,y:0}:{x:I?l.width-k.width:0,y:I?l.height-k.height:0},T={x:k.left,y:k.top};return D.x&&D.y?T:jc(T,D)}}}},"sortableKeyboardCoordinates");function hC(e,t){return!Xd(e)||!Xd(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}r(hC,"isSameContainer");function HL(e,t){return!Xd(e)||!Xd(t)||!hC(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}r(HL,"isAfter");function Oj(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i+=1)if(e[i]!==t[i])return!1;return!0}r(Oj,"areEqual$1");function gC(e,t){if(e.length===0)return[];if(t.length===0)return e;const i=new Map(e.map(c=>[c.id,c])),l=[];for(const c of t){const u=i.get(c);u&&(l.push(u),i.delete(c))}for(const c of i.values())l.push(c);return l}r(gC,"sortCompaniesByOrder");function Lj(e,t){return gC(e,t).map(i=>i.id)}r(Lj,"buildOrderIds$1");function VL({companies:e,userId:t}){const i=wn(),l=(0,x.useMemo)(()=>U.sidebarPreferences.companyOrder(t??"__anon__"),[t]),{data:c}=ge({queryKey:l,queryFn:r(()=>Ud.getCompanyOrder(),"queryFn"),enabled:!!t}),[u,m]=(0,x.useState)(()=>Lj(e,[]));(0,x.useEffect)(()=>{const h=Lj(e,c?.orderedIds??[]);m(g=>Oj(g,h)?g:h)},[e,c?.orderedIds]);const f=Kt({mutationFn:r(h=>Ud.updateCompanyOrder({orderedIds:h}),"mutationFn"),onSuccess:r(h=>{i.setQueryData(l,h)},"onSuccess")});return{orderedCompanies:(0,x.useMemo)(()=>gC(e,u),[e,u]),orderedIds:u,persistOrder:(0,x.useCallback)(h=>{const g=new Set(e.map(y=>y.id)),v=h.filter(y=>g.has(y));for(const y of e)v.includes(y.id)||v.push(y.id);m(y=>Oj(y,v)?y:v),t&&(i.setQueryData(l,y=>({orderedIds:v,updatedAt:y?.updatedAt??null})),f.mutate(v))},[e,f,i,l,t])}}r(VL,"useCompanyOrder");var WL=[U.health[0]];function QL(e){return!WL.includes(e[0])}r(QL,"isAccountScopedQueryKey");function K0({onSignedOut:e}={}){const t=wn();return Kt({mutationFn:r(async()=>{await uE(),await Zn.signOut()},"mutationFn"),onSuccess:r(async()=>{e?.(),t.resetQueries({predicate:r(i=>QL(i.queryKey),"predicate")}),await t.invalidateQueries({queryKey:U.health})},"onSuccess")})}r(K0,"useSignOut");var GL=[[0,8,2,10],[12,4,14,6],[3,11,1,9],[15,7,13,5]];function YL(e){let t=2166136261;for(let i=0;i<e.length;i++)t^=e.charCodeAt(i),t=Math.imul(t,16777619);return t>>>0}r(YL,"hashString");function XL(e){let t=e>>>0;return()=>{t=t+1831565813>>>0;let i=Math.imul(t^t>>>15,1|t);return i^=i+Math.imul(i^i>>>7,61|i),((i^i>>>14)>>>0)/4294967296}}r(XL,"mulberry32");function zj(e,t,i){const l=(e%360+360)%360,c=Math.max(0,Math.min(100,t))/100,u=Math.max(0,Math.min(100,i))/100,m=(1-Math.abs(2*u-1))*c,f=m*(1-Math.abs(l/60%2-1)),h=u-m/2;let g=0,v=0,y=0;return l<60?(g=m,v=f):l<120?(g=f,v=m):l<180?(v=m,y=f):l<240?(v=f,y=m):l<300?(g=f,y=m):(g=m,y=f),[Math.round((g+h)*255),Math.round((v+h)*255),Math.round((y+h)*255)]}r(zj,"hslToRgb");function ZL(e,t=22,i=2){if(typeof document>"u")return"";const l=document.createElement("canvas");l.width=t*i,l.height=t*i;const c=l.getContext("2d");if(!c)return"";const u=XL(YL(e)),m=Math.floor(u()*360),[f,h,g]=zj(m,54+Math.floor(u()*14),36+Math.floor(u()*12)),[v,y,j]=zj(m+(u()>.5?10:-10),86+Math.floor(u()*10),82+Math.floor(u()*10)),k=(t-1)/2,S=Math.max(k,1),N=u()*Math.PI*2,_=Math.cos(N),I=Math.sin(N),D=Math.abs(_*S)+Math.abs(I*S),T=.34+u()*.12,C=.33+u()*.12,M=u()*Math.PI*2,z=u()*Math.PI*2;c.fillStyle=`rgb(${f} ${h} ${g})`,c.fillRect(0,0,l.width,l.height),c.fillStyle=`rgb(${v} ${y} ${j})`;const K=i*.46;for(let P=0;P<t;P++){const A=P-k;for(let B=0;B<t;B++){const O=B-k,W=((O*_+A*I)/D+1)*.5,Y=Math.sin((O+A)*T+M)*.5+.5,ce=Math.sin((O-A)*C+z)*.5+.5,oe=Y*.5+ce*.5,$=Math.max(0,Math.min(1,W+(oe-.5)*.22));if(Math.max(0,Math.min(15,Math.floor($*16)))<=GL[P&3][B&3])continue;const R=B*i+i/2,ne=P*i+i/2;c.beginPath(),c.arc(R,ne,K,0,Math.PI*2),c.fill()}}return l.toDataURL("image/png")}r(ZL,"makeCompanyPatternDataUrl");function xC({companyName:e,logoUrl:t,className:i,logoFit:l="cover"}){const c=e.trim().charAt(0).toUpperCase()||"?",[u,m]=(0,x.useState)(!1),f=!u&&typeof t=="string"&&t.trim().length>0?t:null;(0,x.useEffect)(()=>{m(!1)},[t]);const h=(0,x.useMemo)(()=>ZL(e.trim().toLowerCase()),[e]);return(0,s.jsxs)("div",{className:X("relative flex items-center justify-center w-11 h-11 text-base font-semibold text-white overflow-hidden",i),children:[f?(0,s.jsx)("img",{src:f,alt:`${e} logo`,onError:r(()=>m(!0),"onError"),className:X("absolute inset-0 h-full w-full",l==="contain"?"object-contain":"object-cover")}):h?(0,s.jsx)("img",{src:h,alt:"","aria-hidden":"true",className:"absolute inset-0 h-full w-full",style:{imageRendering:"pixelated"}}):(0,s.jsx)("div",{className:"absolute inset-0 bg-bg-3"}),!f&&(0,s.jsx)("span",{className:"relative z-10 drop-shadow-(--drop-shadow-extract-1)",children:c})]})}r(xC,"CompanyPatternIcon");function JL({collapsed:e}){return(0,s.jsxs)("div",{role:"status","aria-label":"Loading organization","aria-busy":"true",className:"flex h-9 min-w-0 flex-1 items-center gap-2 px-4",children:[(0,s.jsx)(lt,{className:"size-5 shrink-0"}),!e&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"min-w-0 flex-1",children:(0,s.jsx)(lt,{className:"h-4 w-20 max-w-full"})}),(0,s.jsx)(pS,{className:"size-3.5 shrink-0 text-ink-3","aria-hidden":"true"})]})]})}r(JL,"OrganizationSwitcherLoading");function e4({children:e,open:t,onOpenChange:i}){const{userId:l,settled:c,failed:u}=n0(),{selectedCompanyId:m}=vt(),f=cE(),h=f.data?.companies.find(y=>y.id===m)??null,g=c&&f.isSuccess&&!f.data?.unauthorized&&(m===null||h!==null),v=!g&&!u&&!f.isError&&!f.data?.unauthorized;return(0,s.jsx)(t4,{settled:g,loading:v,companyId:m,company:h,open:t,onOpenChange:i,children:e},JSON.stringify([l,m]))}r(e4,"PluginOrganizationSwitcher");function t4({children:e,settled:t,loading:i,companyId:l,company:c,open:u,onOpenChange:m}){const[f,h]=(0,x.useState)(!1),{isMobile:g,setSidebarOpen:v,collapsed:y,peeking:j}=Jn(),k=u??f,S=m??h;function N(){S(!1),g&&v(!1)}r(N,"closeNavigation");const _=K0({onSignedOut:N}),{slots:I,isLoading:D,errorMessage:T}=Tc({slotTypes:["organizationSwitcher"],companyId:l,enabled:t});if(i||t&&D&&!T)return(0,s.jsx)(JL,{collapsed:y&&!j});if(!t||T||I.length!==1)return e;const C={organizationSwitcher:{currentCompany:c?{name:c.name,logoUrl:c.logoUrl??null}:null,collapsed:y&&!j,open:k,onOpenChange:S,onNavigate:N,onSignOut:r(()=>_.mutate(),"onSignOut"),signingOut:_.isPending,renderIcon:r((M,z,K)=>(0,s.jsx)(xC,{companyName:M,logoUrl:z,className:K?"size-(--organization-popover-avatar-size) shrink-0 rounded-lg text-(length:--text-micro)":"size-5 shrink-0 rounded-md text-(length:--text-micro)"}),"renderIcon")}};return(0,s.jsx)(x0,{slot:I[0],context:{companyId:l,companyPrefix:c?.issuePrefix??null},componentProps:{...C},fallback:e})}r(t4,"OrganizationSwitcher");var n4="size-5 shrink-0 rounded-md text-(length:--text-micro)",s4="size-(--organization-popover-avatar-size) shrink-0 rounded-lg text-(length:--text-micro)",a4="h-(--organization-popover-company-row-height) min-w-0 gap-(--organization-popover-row-gap) rounded-lg px-2.5 py-0 text-(length:--text-compact) focus:bg-bg-3/50 focus:text-ink",sh="h-(--organization-popover-action-row-height) gap-(--organization-popover-row-gap) rounded-lg px-2.5 py-0 text-(length:--text-compact) font-medium leading-(--organization-popover-action-line-height) text-ink focus:bg-bg-3/50 focus:text-ink";function bC({company:e,inPopover:t=!1}){return(0,s.jsx)(xC,{companyName:e.name,logoUrl:e.logoUrl,className:t?s4:n4})}r(bC,"WorkspaceIcon");function i4({company:e,isEditing:t,isSelected:i,onSelect:l}){const{attributes:c,listeners:u,setActivatorNodeRef:m,setNodeRef:f,transform:h,transition:g,isDragging:v}=B0({id:e.id,disabled:!t});return(0,s.jsxs)(Cn,{ref:f,style:{transform:Za.Transform.toString(h),transition:g,zIndex:v?10:void 0},onSelect:r(y=>{if(t){y.preventDefault();return}l(e)},"onSelect"),className:X(a4,t&&"cursor-grab",v&&"opacity-80"),children:[(0,s.jsx)(bC,{company:e,inPopover:!0}),(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block truncate font-medium leading-(--organization-popover-name-line-height)",children:e.name}),t?null:(0,s.jsx)("span",{className:"block truncate text-(length:--text-nano) leading-(--organization-popover-prefix-line-height) text-ink-3",children:e.issuePrefix})]}),t?(0,s.jsx)("button",{type:"button",ref:m,"aria-label":`Reorder ${e.name}`,className:"inline-flex size-8 shrink-0 items-center justify-center rounded text-ink-3 hover:bg-bg-3 hover:text-ink focus-visible:outline-none focus-visible:ring-(length:--rad-2) focus-visible:ring-focus",onClick:r(y=>{y.preventDefault(),y.stopPropagation()},"onClick"),...c,...u,children:(0,s.jsx)($T,{className:"size-4","aria-hidden":"true"})}):(0,s.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center",children:i?(0,s.jsx)(Ta,{className:"size-4 text-ink"}):null})]})}r(i4,"SortableCompanyItem");function r4(e={}){return(0,s.jsx)(e4,{...e,children:(0,s.jsx)(l4,{...e})})}r(r4,"SidebarCompanyMenu");function l4({open:e,onOpenChange:t}){const[i,l]=(0,x.useState)(!1),[c,u]=(0,x.useState)(!1),{companies:m,selectedCompany:f,setSelectedCompanyId:h,companyListUnavailable:g,retryCompanies:v}=vt(),{openOnboarding:y}=Pa(),{isMobile:j,setSidebarOpen:k,collapsed:S,peeking:N}=Jn(),_=S&&!N,I=vn(),D=bs(),T=e??i,C=t??l,M=D0(wc(tC,{activationConstraint:{distance:8}}),wc(nC,{activationConstraint:{delay:180,tolerance:6}})),z=(0,x.useMemo)(()=>m.filter(fe=>fe.status!=="archived"),[m]),{data:K}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),P=K?.user?.id??K?.session?.userId??null,{orderedCompanies:A,persistOrder:B}=VL({companies:z,userId:P}),{hidden:O,loaded:W}=lr(),Y=W&&!Ed(O,"company.members")&&!Ed(O,"company.invites"),ce="organization",oe=f?.name??null,$=K0({onSignedOut:ne});function R(fe){fe||u(!1),C(fe)}r(R,"handleOpenChange");function ne(){C(!1),u(!1),j&&k(!1)}r(ne,"closeNavigationChrome");function ue(fe){const Ae=I.pathname.split("/")[1]?.toUpperCase(),Ce=z.some(he=>he.issuePrefix.toUpperCase()===Ae),Se=fe.id!==f?.id&&(I.pathname.startsWith("/instance/")||Ce);h(fe.id),C(!1),j&&k(!1),Se&&D(`/${fe.issuePrefix}/dashboard`)}r(ue,"selectCompany");function ae(){C(!1),j&&k(!1),y({initialStep:1})}r(ae,"addCompany");const Ee=(0,x.useCallback)(fe=>{const{active:Ae,over:Ce}=fe;if(!Ce||Ae.id===Ce.id)return;const Se=A.map(Ye=>Ye.id),he=Se.indexOf(Ae.id),De=Se.indexOf(Ce.id);he===-1||De===-1||B(U0(Se,he,De))},[A,B]);return(0,s.jsxs)(Gr,{open:T,onOpenChange:R,children:[(0,s.jsx)(Wr,{asChild:!0,children:(0,s.jsxs)(le,{variant:"ghost",className:"h-9 min-w-0 flex-1 justify-start gap-2 px-4 text-left has-[>svg]:px-4","aria-label":oe?`Open ${oe} ${ce} switcher`:`Open ${ce} switcher`,children:[(0,s.jsxs)("span",{className:X("flex min-w-0 flex-1 items-center",_?"gap-2.5":"gap-2"),children:[f?(0,s.jsx)(bC,{company:f}):null,(0,s.jsx)("span",{className:X("min-w-0 truncate text-sm font-bold text-ink",_&&"block w-0 min-w-0 -ms-2.5 overflow-hidden whitespace-nowrap text-transparent select-none"),title:oe??void 0,children:oe??`Select ${ce}`})]}),!_&&(0,s.jsx)(pS,{className:"size-3.5 shrink-0 text-ink-3"})]})}),(0,s.jsxs)(Qr,{align:"start",sideOffset:8,className:"ml-2 w-(--organization-popover-width) max-w-(--sz-calc-24) overflow-hidden rounded-xl border-line bg-bg-2 p-0 shadow-(--shadow-profile-popover)",children:[(0,s.jsxs)("div",{className:"flex h-(--organization-popover-header-height) items-center justify-between gap-2 px-3.5",children:[(0,s.jsx)(oS,{className:"p-0 text-(length:--text-compact) font-semibold text-ink",children:"Organizations"}),(0,s.jsx)("button",{type:"button",onClick:r(fe=>{fe.preventDefault(),fe.stopPropagation(),u(Ae=>!Ae)},"onClick"),className:"rounded px-1.5 py-0.5 text-xs font-medium text-ink-3 transition-colors hover:bg-bg-3 hover:text-ink",children:c?"Done":"Edit"})]}),(0,s.jsxs)("div",{className:"flex max-h-96 flex-col gap-0.5 overflow-y-auto px-2.5 pb-2 pt-1",children:[(0,s.jsx)(P0,{sensors:M,collisionDetection:FN,onDragEnd:Ee,children:(0,s.jsx)($0,{items:A.map(fe=>fe.id),strategy:dC,children:A.map(fe=>(0,s.jsx)(i4,{company:fe,isEditing:c,isSelected:fe.id===f?.id,onSelect:ue},fe.id))})}),A.length===0?g?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Cn,{disabled:!0,children:"Couldn't load organizations"}),(0,s.jsxs)(Cn,{onSelect:r(fe=>{fe.preventDefault(),v()},"onSelect"),children:[(0,s.jsx)(Yr,{className:"h-4 w-4 mr-2"}),"Try again"]})]}):(0,s.jsx)(Cn,{disabled:!0,children:"No organizations"}):null]}),(0,s.jsxs)("div",{className:"flex flex-col gap-0.5 border-t border-line px-2.5 pb-2.5 pt-2",children:[(0,s.jsxs)(Cn,{onClick:ae,className:sh,disabled:c,children:[(0,s.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,s.jsx)(Js,{className:"size-4"})}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:"Create organization"})]}),Y?(0,s.jsx)(Cn,{asChild:!0,disabled:c,className:sh,children:(0,s.jsxs)(gn,{to:"/company/settings/members?tab=invites",onClick:r(fe=>{if(c){fe.preventDefault();return}ne()},"onClick"),children:[(0,s.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,s.jsx)(W1,{className:"size-4"})}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:oe?`Invite people to ${oe}`:"Invite people"})]})}):null,K?.session?(0,s.jsxs)(Cn,{className:sh,onClick:r(()=>$.mutate(),"onClick"),disabled:c||$.isPending,children:[(0,s.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,s.jsx)(wf,{className:"size-4"})}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:$.isPending?"Signing out...":"Sign out"})]}):null]})]})]})}r(l4,"BuiltinCompanyMenu");function Pj({children:e}){const{openNewIssue:t}=Pa(),{enabled:i}=yf(),[l,c]=(0,x.useState)(!0),[u,m]=(0,x.useState)(!0),{selectedCompanyId:f,selectedCompany:h}=vt(),{collapsed:g,peeking:v}=Jn(),y=g&&!v,j=I0(f),{data:k,isFetched:S}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn")}),N=U.liveRuns(f),_=gc({companyId:f,resourceKey:"live-runs",queryKey:N,enabled:!!f,refetchInterval:!1,leaderOnly:!0}),{data:I,dataUpdatedAt:D}=ge({queryKey:N,queryFn:r(()=>vf.liveRunsForCompany(f),"queryFn"),enabled:_.enabled,refetchInterval:_.refetchInterval});xc(_,I,D);const T=I?.length??0,C=new Set((I??[]).flatMap(R=>R.issueId?[R.issueId]:[])),M=i,z=k?.enableCombinedInboxTasks===!0,K=!M&&k?.enableIsolatedWorkspaces===!0,P=k?.enablePipelines===!0,A=k?.enableStatusCards===!0,B=!S,O=k?.enableGoalsSidebarLink===!0,W=k?.enableDecisions===!0,{data:Y}=ge({queryKey:U.attentionCount(f),queryFn:r(()=>uO.count(f),"queryFn"),enabled:!!f&&W,refetchInterval:6e4}),ce=Y?.count??0,oe=k?.enableCases===!0,$={companyId:f,companyPrefix:h?.issuePrefix??null};return(0,s.jsxs)("aside",{className:X("w-full h-full min-h-0 flex flex-col",er.surface),children:[(0,s.jsxs)("div",{className:"flex h-(--sz-60px) shrink-0 items-center gap-2 px-3",children:[y?null:(0,s.jsx)(p0,{className:"size-5 shrink-0 text-ink",title:"Wardmote"}),(0,s.jsx)(r4,{})]}),(0,s.jsxs)("nav",{className:y?er.railNav:er.nav,children:[(0,s.jsxs)("div",{className:er.group,children:[(()=>{const R=(0,s.jsxs)("button",{onClick:r(()=>t(),"onClick"),"data-slot":"icon-button","aria-label":y?"New Task":void 0,className:X("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/80 transition-colors hover:bg-bg-3 hover:text-ink"),children:[(0,s.jsx)(C0,{className:"h-4 w-4 shrink-0"}),(0,s.jsx)("span",{className:y?Lk:"truncate",children:"New Task"})]});return y?(0,s.jsxs)(Ia,{children:[(0,s.jsx)(_a,{asChild:!0,children:R}),(0,s.jsx)(Ea,{side:"right",children:"New Task"})]}):R})(),(0,s.jsx)(Ge,{to:"/search",label:"Search",icon:Kr}),(0,s.jsx)(Ge,{to:"/dashboard",label:"Dashboard",icon:f0,liveCount:T}),z?null:(0,s.jsx)(Ge,{to:"/inbox",label:"Inbox",icon:u0,badge:j.inbox,badgeLabel:"unread",badgeTone:j.failedRuns>0?"danger":"default",alert:j.failedRuns>0}),i&&!M?(0,s.jsx)(Ge,{to:"/chats",label:"Chat",icon:ng}):null,W?(0,s.jsx)(Ge,{to:"/decisions",label:"Decisions",icon:qT,badge:ce,badgeLabel:"decisions"}):null,A?(0,s.jsx)(Ge,{to:"/status",label:"Status",icon:KT,textBadge:"beta"}):null]}),(0,s.jsxs)(qd,{label:"Work",collapsible:{open:l,onOpenChange:c},children:[M?(0,s.jsx)(Ge,{to:"/chats",label:"Chat",icon:ng}):null,z?(0,s.jsx)(Ge,{to:"/issues",label:"Tasks",icon:Ph,badge:j.inbox,badgeLabel:"unread",badgeTone:j.failedRuns>0?"danger":"default",alert:j.failedRuns>0}):(0,s.jsx)(Ge,{to:"/issues",label:"Tasks",icon:Ph}),(0,s.jsx)(Ge,{to:"/projects",label:"Projects",icon:jS}),(0,s.jsx)(YM,{}),(0,s.jsx)(Ge,{to:"/routines",label:"Routines",icon:kS}),(0,s.jsx)(Ge,{to:"/artifacts",label:"Artifacts",icon:CI}),oe?(0,s.jsx)(Ge,{to:"/cases",label:"Cases",icon:hf,textBadge:"beta"}):null,P?(0,s.jsx)(Ge,{to:"/pipelines",label:"Pipelines",icon:ac}):null,O?(0,s.jsx)(Ge,{to:"/goals",label:"Goals",icon:r0}):B?(0,s.jsx)("div",{"data-testid":"sidebar-goals-placeholder",className:"h-8 pointer-coarse:h-7","aria-hidden":"true"}):null,K?(0,s.jsx)(Ge,{to:"/workspaces",label:"Workspaces",icon:ac}):null,(0,s.jsx)(Ge,{to:"/terminal",label:"Terminal",icon:nR}),(0,s.jsx)(Gh,{errorBehavior:"hidden",slotTypes:["sidebar"],context:$,className:"flex flex-col gap-0.5",itemClassName:"text-(length:--text-compact) font-medium",missingBehavior:"placeholder"}),(0,s.jsx)(zN,{errorBehavior:"hidden",placementZones:["sidebar"],context:$,className:"flex flex-col gap-0.5",itemClassName:"text-(length:--text-compact) font-medium"})]}),(0,s.jsxs)(qd,{label:"Org",collapsible:{open:u,onOpenChange:m},children:[(0,s.jsx)(Ge,{to:"/agents",label:"Agents",icon:qr}),(0,s.jsx)(Ge,{to:"/skills",label:"Skills",icon:fS}),(0,s.jsx)(Ge,{to:"/apps",label:"Connectors",icon:iR}),(0,s.jsx)(Ge,{to:"/activity",label:"Audit",icon:N0})]}),e??(0,s.jsx)(QM,{streamlined:!0}),(0,s.jsx)(oO,{companyId:f,liveIssueIds:C}),(0,s.jsx)(Gh,{errorBehavior:"hidden",slotTypes:["sidebarPanel"],context:$,className:"flex flex-col gap-3",itemClassName:"rounded-lg border border-line p-3",missingBehavior:"placeholder"})]})]})}r(Pj,"Sidebar");function vC(){const e=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn")});return{enabled:!e.isError&&e.data?.enableFastResponses===!0,loaded:e.isFetched}}r(vC,"useFastResponsesEnabled");var o4="wardmote.contextualSidebar.origin";function yC(e,t){if(!t)return[];const i=e.split("/").filter(Boolean);return i.length<2?[]:i[0]?.toUpperCase()!==t.toUpperCase()?[]:i.slice(1)}r(yC,"getCompanyPathSegments");function c4(e,t){const i=yC(e,t),l=i[0]?.toLowerCase(),c=l==="company"&&["settings","export","import"].includes(i[1]?.toLowerCase()??""),u=i[1]?.toLowerCase(),m=l==="agents"&&!!u&&u!=="new"&&!["all","active","paused","error","builtin"].includes(u??""),f=l==="routines"&&i.length>=2,h=l==="skills";return{companySegments:i,isTaskDetail:(l==="issues"||l==="chats")&&i.length>=2,builtInContextualSurface:c?"settings":l==="apps"||l==="tools"?"apps":m?"agent":f?"routine":h?"skills":null}}r(c4,"classifyShellRoute");function jC(e,t){return`${o4}:${t.toUpperCase()}:${e}`}r(jC,"contextualOriginStorageKey");function wC(e,t){return e.split("/").filter(Boolean)[0]?.toUpperCase()===t.toUpperCase()}r(wC,"isCompanyPath");function u4({surface:e,companyPrefix:t,previousPathname:i}){if(!(typeof window>"u"||!wC(i,t)))try{window.sessionStorage.setItem(jC(e,t),i)}catch{}}r(u4,"rememberContextualSidebarOrigin");function d4({surface:e,companyPrefix:t,fallbackTo:i}){if(typeof window>"u"||!t)return i;try{const l=window.sessionStorage.getItem(jC(e,t));return l&&wC(l,t)?l:i}catch{return i}}r(d4,"readContextualSidebarOrigin");function Uc({surface:e,title:t,icon:i,fallbackTo:l="/dashboard",showHeader:c=!0,className:u,children:m}){const f=bs(),{selectedCompany:h}=vt(),{isMobile:g,setSidebarOpen:v}=Jn();function y(){f(d4({surface:e,companyPrefix:h?.issuePrefix,fallbackTo:l})),g&&v(!1)}return r(y,"goBack"),(0,s.jsx)(NS,{children:(0,s.jsxs)("aside",{"data-contextual-sidebar":e,className:X("flex h-full min-h-0 w-full flex-col bg-bg-3",u),children:[c?(0,s.jsxs)("div",{className:"flex shrink-0 flex-col gap-1 px-3 py-3",children:[(0,s.jsxs)("button",{type:"button",onClick:y,className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs text-ink-3 transition-colors hover:bg-bg hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus","aria-label":`Back from ${t}`,children:[(0,s.jsx)(mS,{className:"h-3.5 w-3.5 shrink-0","aria-hidden":"true"}),(0,s.jsx)("span",{className:"truncate",children:h?.name??"Organization"})]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 px-2 py-1",children:[i?(0,s.jsx)(i,{className:"h-4 w-4 shrink-0 text-ink-3","aria-hidden":"true"}):null,(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-bold text-ink",children:t})]})]}):null,m]})})}r(Uc,"ContextualSidebarFrame");function f4(e){const t=e.manifestJson.environmentDrivers??[];return t.length===0?!1:t.every(i=>i.kind==="sandbox_provider")}r(f4,"isSandboxProviderOnly");function m4(){const{selectedCompanyId:e}=vt(),{hidden:t}=lr(),{enabled:i}=vC(),l=r(g=>!t.has(g),"showPage"),c=l("instance.plugins"),{slots:u}=Tc({slotTypes:["companySettingsPage"],companyId:e,enabled:!!e}),{data:m}=ge({queryKey:e?U.sidebarBadges(e):["sidebar-badges","__disabled__"],queryFn:r(async()=>{try{return await yN.get(e)}catch(g){if(g instanceof Si&&(g.status===401||g.status===403))return null;throw g}},"queryFn"),enabled:!!e,retry:!1,refetchInterval:15e3}),{data:f}=ge({queryKey:U.plugins.all,queryFn:r(()=>h0.list(),"queryFn"),enabled:c}),h=(f??[]).filter(g=>!f4(g));return(0,s.jsxs)(Uc,{surface:"settings",title:"Settings",showHeader:!1,className:er.surface,children:[(0,s.jsx)("div",{"data-slot":"settings-sidebar-header",className:"flex h-(--sz-60px) shrink-0 items-center px-3",children:(0,s.jsx)("div",{"data-slot":"settings-back-group",className:`${er.group} w-full`,children:(0,s.jsx)(Ge,{to:"/dashboard",label:"Back to app",icon:o0})})}),(0,s.jsx)("nav",{"aria-label":"Settings","data-slot":"contextual-sidebar-nav",className:er.nav,children:(0,s.jsxs)("div",{"data-slot":"contextual-sidebar-group",className:er.group,children:[(0,s.jsx)(Ge,{to:"/company/settings",label:"General",icon:O1,end:!0}),l("instance.profile")&&(0,s.jsx)(Ge,{to:"/company/settings/instance/profile",label:"Profile",icon:lR,end:!0}),l("company.members")&&(0,s.jsx)(Ge,{to:"/company/settings/members",label:"Members",icon:qr,badge:m?.joinRequests??0,end:!0}),u.filter(g=>g.routePath).map(g=>(0,s.jsx)(Ge,{to:`/company/settings/${g.routePath}`,label:g.displayName,icon:Sy,end:!0},`${g.pluginKey}:${g.id}`)),(0,s.jsx)(Ge,{to:"/company/settings/agent-defaults",label:"Agent defaults",icon:hc}),(0,s.jsx)(Ge,{to:"/company/settings/models",label:"Models and providers",icon:fS,end:!0}),l("company.secrets")&&(0,s.jsx)(Ge,{to:"/company/settings/secrets",label:"Secrets",icon:d0,end:!0}),l("instance.environments")&&(0,s.jsx)(Ge,{to:"/company/settings/instance/environments",label:"Environments",icon:WT,end:!0}),i&&(0,s.jsx)(Ge,{to:"/company/settings/connections",label:"Connections",icon:$I,end:!0}),l("instance.access")&&(0,s.jsx)(Ge,{to:"/company/settings/instance/access",label:"Access",icon:GI,end:!0}),l("company.export")&&(0,s.jsx)(Ge,{to:"/company/export",label:"Export",icon:eg}),l("company.import")&&(0,s.jsx)(Ge,{to:"/company/import",label:"Import",icon:rR,end:!0}),l("instance.experimental")&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ge,{to:"/company/settings/instance/features",label:"Features",icon:q1}),(0,s.jsx)(Ge,{to:"/company/settings/instance/advanced",label:"Advanced",icon:a0})]}),c&&(0,s.jsx)(Ge,{to:"/company/settings/instance/plugins",label:"Plugins",icon:Sy}),c&&h.length>0?(0,s.jsx)("div",{className:"ml-4 mt-1 flex flex-col gap-0.5 border-l border-line/70 pl-3",children:h.map(g=>(0,s.jsx)(Qk,{to:`${Yi}/plugins/${g.id}`,state:xf,className:r(({isActive:v})=>X("rounded-md px-2 py-1.5 text-xs transition-colors",v?Vl.active:X(Vl.rest,"text-ink-3")),"className"),children:g.manifestJson.displayName??g.packageName},g.id))}):null,l("instance.adapters")&&(0,s.jsx)(Ge,{to:"/company/settings/instance/adapters",label:"Adapters",icon:NI})]})})]})}r(m4,"CompanySettingsSidebar");function p4({items:e,value:t,onValueChange:i,align:l="center"}){const{isMobile:c}=Jn();return c&&t!==void 0&&i?(0,s.jsxs)("div",{className:"relative inline-flex",children:[(0,s.jsx)("select",{value:t,onChange:r(u=>i(u.target.value),"onChange"),className:"h-9 appearance-none rounded-md border border-line bg-bg pl-3 pr-9 py-1 text-base focus:outline-none focus:ring-1 focus:ring-focus","aria-label":"Page section",children:e.map(u=>(0,s.jsx)("option",{value:u.value,children:typeof u.label=="string"?u.label:u.value},u.value))}),(0,s.jsx)(Br,{"aria-hidden":"true",className:"pointer-events-none absolute right-3 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ink-3"})]}):(0,s.jsx)(VE,{variant:"line",className:l==="start"?"justify-start":void 0,children:e.map(u=>(0,s.jsx)(HE,{value:u.value,children:u.label},u.value))})}r(p4,"PageTabBar");var h4=[{value:"general",label:"General",href:"/company/settings"},{value:"export",label:"Export",href:"/company/export"},{value:"import",label:"Import",href:"/company/import"},{value:"members",label:"Members",href:"/company/settings/members"},{value:"secrets",label:"Secrets",href:"/company/settings/secrets"},{value:"instance-profile",label:"Profile",href:`${Yi}/profile`},{value:"instance-environments",label:"Environments",href:`${Yi}/environments`},{value:"connections",label:"Connections",href:"/company/settings/connections"},{value:"instance-access",label:"Access",href:`${Yi}/access`},{value:"instance-features",label:"Features",href:`${Yi}/features`},{value:"instance-advanced",label:"Advanced",href:`${Yi}/advanced`},{value:"instance-plugins",label:"Plugins",href:`${Yi}/plugins`},{value:"instance-adapters",label:"Adapters",href:`${Yi}/adapters`}],g4={export:"company.export",import:"company.import",members:"company.members",secrets:"company.secrets","instance-profile":"instance.profile","instance-environments":"instance.environments","instance-access":"instance.access","instance-features":"instance.experimental","instance-advanced":"instance.experimental","instance-plugins":"instance.plugins","instance-adapters":"instance.adapters"};function x4(e){return e.includes("/company/settings/connections")?"connections":e.includes("/company/settings/instance/profile")?"instance-profile":e.includes("/company/settings/instance/environments")?"instance-environments":e.includes("/company/settings/instance/access")?"instance-access":e.includes("/company/settings/instance/features")?"instance-features":e.includes("/company/settings/instance/advanced")?"instance-advanced":e.includes("/company/settings/instance/plugins")?"instance-plugins":e.includes("/company/settings/instance/adapters")?"instance-adapters":e.includes("/company/settings/instance/general")?"general":e.includes("/company/settings/environments")?"instance-environments":e.includes("/company/export")?"export":e.includes("/company/import")?"import":e.includes("/company/settings/members")||e.includes("/company/settings/access")||e.includes("/company/settings/invites")?"members":e.includes("/company/settings/secrets")?"secrets":"general"}r(x4,"getCompanySettingsTab");function b4(){const e=vn(),t=bs(),{hidden:i}=lr(),{enabled:l}=vC(),c=x4(e.pathname),u=h4.filter(f=>{if(f.value==="connections"&&!l)return!1;const h=g4[f.value];return!h||!i.has(h)});function m(f){const h=u.find(g=>g.value===f);!h||h.value===c||t(h.href)}return r(m,"handleTabChange"),(0,s.jsx)(WE,{value:c,onValueChange:m,children:(0,s.jsx)(p4,{items:u.map(({value:f,label:h})=>({value:f,label:h})),value:c,onValueChange:m,align:"start"})})}r(b4,"CompanySettingsNav");var $n={nav:"flex min-h-0 flex-1 flex-col overflow-y-auto scrollbar-auto-hide px-3 py-2",group:"flex flex-col gap-0.5",section:"mt-4 border-t border-line pt-3",sectionLabel:"px-2 pb-1 text-(length:--text-micro) font-semibold uppercase tracking-wide text-ink-3",sectionDescription:"px-4 pb-1.5 text-(length:--text-micro) leading-snug text-ink-3/70"};function kC({endpointId:e,NavItem:t=Ge}){const i=ge({queryKey:U.chatEndpoints.detail(e),queryFn:r(()=>ES.get(e),"queryFn"),enabled:!!e});return(0,s.jsx)("aside",{className:"flex h-full min-h-0 w-full flex-col border-r border-line bg-bg",children:(0,s.jsx)("nav",{"aria-label":"Chat connection","data-slot":"contextual-sidebar-nav",className:$n.nav,children:(0,s.jsxs)("div",{"data-slot":"contextual-sidebar-group",className:$n.group,children:[(0,s.jsx)(t,{to:`/apps/chat/${e}/settings`,label:"Settings",icon:SS,end:!0}),(0,s.jsx)(t,{to:`/apps/chat/${e}/access`,label:"Access",icon:qr,end:!0}),i.data?.provider==="github"&&(0,s.jsx)(t,{to:`/apps/chat/${e}/reviews`,label:"Reviews",icon:UI}),(0,s.jsx)(t,{to:`/apps/chat/${e}/conversations`,label:"Conversations",icon:Vk,end:!0}),(0,s.jsx)(t,{to:`/apps/chat/${e}/activity`,label:"Activity",icon:l0,end:!0}),i.data?.provider==="openwa"&&(0,s.jsx)(t,{to:`/apps/chat/${e}/approvals`,label:"Approvals",icon:zd,end:!0}),i.data?.provider==="openwa"&&(0,s.jsx)(t,{to:`/apps/chat/${e}/audit`,label:"Audit",icon:HI,end:!0})]})})})}r(kC,"ChatDetailSidebar");var ss=r(e=>`/chat-endpoints/${e}/github`,"path$1"),v4={repositories:r((e,t={})=>{const i=new URLSearchParams({limit:String(t.limit??20),offset:String(t.offset??0),search:t.search??""});return we.get(`${ss(e)}/repositories?${i}`)},"repositories"),toggleAllRepositories:r((e,t)=>we.put(`${ss(e)}/repositories/access`,{enabled:t}),"toggleAllRepositories"),configuration:r(e=>we.get(`${ss(e)}/configuration`),"configuration"),save:r((e,t,i)=>we.put(`${ss(e)}/configuration`,{expectedRevision:t,configuration:i}),"save"),registration:r((e,t)=>we.post(`${ss(e)}/registration`,t),"registration"),saveDraft:r((e,t)=>we.put(`${ss(e)}/draft`,t),"saveDraft"),advance:r(e=>we.post(`${ss(e)}/setup`,{}),"advance"),startIdentity:r(e=>we.post(`${ss(e)}/identity/start`,{}),"startIdentity"),confirmIdentity:r((e,t)=>we.post(`${ss(e)}/identity/confirm`,{githubUserId:t}),"confirmIdentity"),connectApp:r((e,t)=>we.post(`${ss(e)}/app`,t),"connectApp"),refreshRepositories:r(e=>we.post(`${ss(e)}/repositories/refresh`,{}),"refreshRepositories"),verify:r(e=>we.post(`${ss(e)}/verify`,{}),"verify"),progress:r((e,t)=>we.put(`${ss(e)}/progress`,{stage:t}),"progress"),personalConnections:r(e=>we.get(`${ss(e)}/personal-connections`),"personalConnections"),identity:r((e,t,i)=>we.post(`${ss(e)}/identity`,{connectionId:t,confirmedGithubUserId:i}),"identity"),lookup:r((e,t)=>we.post(`${ss(e)}/people/lookup`,{login:t}),"lookup"),review:r((e,t)=>we.get(`${ss(e)}/reviews/${t}`),"review"),reviews:r(e=>we.get(`${ss(e)}/reviews`),"reviews")};function y4({NavItem:e=Ge}){const[t]=Uk(),i=t.get("resume"),l=ge({queryKey:["github-wizard",i],queryFn:r(()=>v4.advance(i),"queryFn"),enabled:!1});return t.get("provider")==="github"&&i&&t.get("stage")!=="identity"&&t.get("reconnect")!=="1"&&l.data?.state==="connected"?(0,s.jsx)(kC,{endpointId:i,NavItem:e}):(0,s.jsx)(n3,{})}r(y4,"ChatSetupSidebar");function UQ(e){return(0,s.jsx)(t3,{...e,labels:e.labels??["Choose agent","Connect provider","Try it"],ariaLabel:"Connection setup progress"})}r(UQ,"ChatSetupNavigation");var j4="/apps/advanced";function w4(e){return`${j4}/${e}`}r(w4,"advancedTabHref");var SC=[{key:"paste-config",label:"Paste a config",icon:hI}],NC=[{key:"gateways",label:"Gateways",icon:FI},{key:"profiles",label:"Profiles",icon:hf},{key:"smoke-lab",label:"Smoke Lab",icon:zI}],$Q=[...SC,...NC];function BQ(e){return SC.some(t=>t.key===e)}r(BQ,"isAdvancedSetupTab");function k4(e){return e==="smoke-lab"}r(k4,"isExperimentalToolTab");var Uj=null;function S4(){return Uj??=new mf,Uj}r(S4,"getDetachedClient$2");function N4(){const e=(0,x.useContext)(Jg),{data:t,isFetched:i}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn"),enabled:e!=null},e??S4());return e?{enabled:t?.enableSmokeLab===!0,loaded:i}:{enabled:!1,loaded:!0}}r(N4,"useSmokeLabEnabled");function C4(){const{selectedCompanyId:e}=vt();return ge({queryKey:U.tools.actionRequests(e??"__none__","pending"),queryFn:r(()=>Ml.listActionRequests(e,"pending"),"queryFn"),enabled:!!e,refetchInterval:2e4}).data?.actionRequests.length??0}r(C4,"useReviewCount");function A4(){const{pathname:e}=vn(),t=C4(),{enabled:i}=N4(),l=NC.filter(u=>u.key==="gateways"||u.key==="profiles"?!1:!k4(u.key)||i);if(e.endsWith("/apps/chat/connect"))return(0,s.jsx)(y4,{});const c=e.match(/\/apps\/chat\/([^/]+)(?:\/(?:settings|access|conversations|activity|approvals|audit)|\/reviews(?:\/[^/]+)?)?\/?$/);return c?(0,s.jsx)(kC,{endpointId:c[1]}):(0,s.jsx)("aside",{className:"w-full h-full min-h-0 border-r border-line bg-bg flex flex-col",children:(0,s.jsxs)("nav",{"aria-label":"Connectors","data-slot":"contextual-sidebar-nav",className:$n.nav,children:[(0,s.jsxs)("div",{"data-slot":"contextual-sidebar-group",className:$n.group,children:[(0,s.jsx)(Ge,{to:"/apps",label:"Browse",icon:sR,end:!0}),(0,s.jsx)(Ge,{to:"/apps/review",label:"Review",icon:QI,badge:t>0?t:void 0,badgeTone:"warning",badgeLabel:"waiting for your OK"})]}),l.length>0?(0,s.jsxs)("div",{"data-slot":"contextual-sidebar-section",className:$n.section,children:[(0,s.jsx)("div",{"data-slot":"contextual-sidebar-section-label",className:$n.sectionLabel,children:"Developer"}),(0,s.jsx)("p",{"data-slot":"contextual-sidebar-section-description",className:$n.sectionDescription,children:"Advanced setup for developers."}),(0,s.jsx)("div",{"data-slot":"contextual-sidebar-group",className:$n.group,children:l.map(u=>(0,s.jsx)(Ge,{to:w4(u.key),label:u.label,icon:u.icon,end:!0},u.key))})]}):null]})})}r(A4,"AppsSidebar");function $j(e){const{selectedCompanyId:t}=vt(),{isMobile:i,setSidebarOpen:l}=Jn(),c=ge({queryKey:U.tools.connection(e.kind==="connection"?e.connectionId:"__none__"),queryFn:r(()=>Ml.getConnection(e.kind==="connection"?e.connectionId:""),"queryFn"),enabled:e.kind==="connection"&&!!e.connectionId}),u=ge({queryKey:U.tools.applications(t??"__none__"),queryFn:r(()=>Ml.listApplications(t),"queryFn"),enabled:!!t}),m=ge({queryKey:U.tools.connections(t??"__none__"),queryFn:r(()=>Ml.listConnections(t),"queryFn"),enabled:e.kind==="application"&&!!t}),f=ge({queryKey:U.apps.gallery(t??"__none__"),queryFn:r(()=>Ml.listGallery(t),"queryFn"),enabled:!!t}),h=ge({queryKey:U.apps.attention(t??"__none__"),queryFn:r(()=>Ml.listAppsAttention(t),"queryFn"),enabled:!!t,refetchInterval:3e4}),g=c.data,v=e.kind==="application"?e.applicationId:g?.applicationId,y=(u.data?.applications??[]).find(T=>T.id===v)??null,j=I4(e.kind==="application"?(m.data?.connections??[]).filter(T=>T.applicationId===e.applicationId):[]),k=g?ST(g):y?.name??"App",S=E4(f.data?.apps??[],g,y??void 0),N=qk(y)??Hk(g)??(S?$h(S):null),_=g?.id??j?.id??null,I=_?h.data?.apps.find(T=>T.connection.id===_):null,D=(I?.pendingActionRequestCount??0)+((I?.quarantinedCatalogEntryCount??0)>0?1:0);return(0,s.jsxs)("aside",{className:"flex h-full min-h-0 w-full flex-col border-r border-line bg-bg",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col gap-3 px-3 py-3",children:[(0,s.jsxs)(gn,{to:"/apps",onClick:r(()=>{i&&l(!1)},"onClick"),className:"flex items-center gap-1.5 rounded-md px-2 py-1 text-xs text-ink-3 transition-colors hover:bg-bg-3/50 hover:text-ink",children:[(0,s.jsx)(mS,{className:"h-3.5 w-3.5 shrink-0"}),(0,s.jsx)("span",{className:"truncate",children:"All connectors"})]}),(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 px-2 py-1",children:[(0,s.jsx)(U3,{name:k,brandKey:N,logoUrl:yE(S),allowRemoteFallback:!u.isPending,darkLogoUrl:wE(S),size:28}),(0,s.jsx)("span",{className:"flex-1 truncate text-sm font-bold text-ink",children:k})]})]}),(0,s.jsx)("nav",{className:"scrollbar-auto-hide min-h-0 flex-1 overflow-y-auto px-3 py-2",children:(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:fE.map(T=>(0,s.jsx)(Ge,{to:_4(e,T.key),label:T.label,icon:T.icon,end:!0,badge:T.key==="review"&&D>0?D:void 0,badgeTone:"danger",badgeLabel:"needing review"},T.key))})})]})}r($j,"AppDetailSidebar");function _4(e,t){return e.kind==="connection"?bE(e.connectionId,t):pE(e.applicationId,t)}r(_4,"tabHref");function E4(e,t,i){const l=qk(i)??Hk(t);if(l){const u=e.find(m=>$h(m)===l);if(u)return u}const c=(t?.name??i?.name)?.toLowerCase();return c?e.find(u=>jE(u).toLowerCase()===c)??e.find(u=>$h(u)===c)??null:null}r(E4,"galleryEntryFor");function I4(e){const t=e.filter(i=>i.status==="archived");return t.length===0?null:t.reduce((i,l)=>{const c=new Date(i.updatedAt??i.createdAt??0).getTime();return new Date(l.updatedAt??l.createdAt??0).getTime()>c?l:i})}r(I4,"latestArchivedConnection");var T4=[{label:"Agent",items:[{value:"overview",label:"Overview"},{value:"setup",label:"Setup"},{value:"instructions",label:"Instructions"},{value:"skills",label:"Skills"}]},{label:"Runtime",items:[{value:"runtime",label:"Harness / Runtime"},{value:"secrets",label:"Secrets"},{value:"tools",label:"Tools"},{value:"channels",label:"Channels"}]},{label:"Governance",items:[{value:"permissions",label:"Permissions / Trust"},{value:"api-keys",label:"API Keys"},{value:"revisions",label:"Revisions"}]}];function KQ(e){return e==="setup"?"setup":e==="instructions"||e==="prompts"?"instructions":e==="skills"?"skills":e==="runtime"||e==="configure"||e==="configuration"?"runtime":e==="secrets"?"secrets":e==="tools"?"tools":e==="channels"?"channels":e==="permissions"||e==="trust"?"permissions":e==="api-keys"||e==="keys"?"api-keys":e==="revisions"||e==="history"?"revisions":"overview"}r(KQ,"parseAgentDetailView");function R4(e,t="overview"){return`/agents/${e}/${t}`}r(R4,"agentDetailHref");function qQ(e){return e==="runs"?"runs":e==="audit"||e==="activity"?"activity":e==="cost"||e==="costs"?"costs":e==="budget"||e==="budgets"?"budgets":null}r(qQ,"agentLegacyAuditSection");function D4(e,t){return $3(t,{mode:t==="activity"?"agents":void 0,agentId:e})}r(D4,"agentScopedAuditHref");var M4={overview:TE,setup:O1,instructions:IT,skills:tg,runtime:XT,secrets:zd,tools:a0,channels:Vk,permissions:zd,"api-keys":d0,revisions:N0},O4=[{section:"activity",label:"Activity",icon:l0},{section:"runs",label:"Runs",icon:WS},{section:"costs",label:"Costs",icon:YT},{section:"budgets",label:"Budgets",icon:_T}];function L4({agentRef:e,agentId:t,agentName:i,labels:l={secrets:"Secrets & variables"}}){const{selectedCompanyId:c}=vt(),u=!t||!i,{data:m}=ge({queryKey:[...U.agents.detail(e),c??null,"contextual-sidebar"],queryFn:r(()=>$s.get(e,c??void 0),"queryFn"),enabled:u&&!!(e&&c)}),f=t??m?.id,h=i??m?.name??"Agent";return(0,s.jsx)(Uc,{surface:"agent",title:h,fallbackTo:"/agents/all",showHeader:!1,className:"border-r border-line bg-bg",children:(0,s.jsxs)("nav",{"aria-label":`${h} navigation`,"data-slot":"contextual-sidebar-nav",className:$n.nav,children:[T4.map(g=>(0,s.jsxs)("div",{"data-slot":"contextual-sidebar-section",className:$n.section,children:[(0,s.jsx)("p",{"data-slot":"contextual-sidebar-section-label",className:$n.sectionLabel,children:g.label}),(0,s.jsx)("div",{"data-slot":"contextual-sidebar-group",className:$n.group,children:g.items.map(v=>{const y=R4(e,v.value);return(0,s.jsx)(Ge,{to:y,label:l?.[v.value]??v.label,icon:M4[v.value]},v.value)})})]},g.label)),(0,s.jsxs)("div",{"data-slot":"contextual-sidebar-section",className:$n.section,children:[(0,s.jsx)("p",{"data-slot":"contextual-sidebar-section-label",className:$n.sectionLabel,children:"Audit"}),(0,s.jsx)("div",{"data-slot":"contextual-sidebar-group",className:$n.group,children:f?O4.map(g=>(0,s.jsx)(Ge,{to:D4(f,g.section),label:g.label,icon:g.icon},g.section)):(0,s.jsx)("p",{className:"px-2 py-1.5 text-xs text-ink-3",children:"Loading audit links…"})})]})]})})}r(L4,"AgentContextualSidebar");var z4=["overview","triggers","variables","delivery","secrets","history","runs","activity"],P4=[{view:"overview",label:"Overview",icon:f0},{view:"triggers",label:"Triggers",icon:aI},{view:"variables",label:"Variables",icon:sI},{view:"delivery",label:"Delivery",icon:VI},{view:"secrets",label:"Secrets",icon:d0}];function U4(e){return z4.includes(e)}r(U4,"isRoutineDetailView");function uc(e,t="overview"){return`/routines/${e}/${t}`}r(uc,"routineDetailHref");function FQ(e){const t=e.legacyTab??e.section;return U4(t)?uc(e.routineId,t):uc(e.routineId,"overview")}r(FQ,"resolveRoutineDetailDestination");function $4({routineId:e,title:t}={}){const i=La(),l=e??i.routineId??"",{data:c}=ge({queryKey:U.routines.detail(l),queryFn:r(()=>B3.get(l),"queryFn"),enabled:!!(l&&!t)}),u=t??c?.title??"Routine";return(0,s.jsx)(Uc,{surface:"routine",title:u,icon:kS,fallbackTo:"/routines",showHeader:!1,className:"border-r border-line bg-bg",children:(0,s.jsxs)("nav",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-2","aria-label":"Routine navigation",children:[(0,s.jsx)("div",{className:"flex flex-col gap-0.5",children:P4.map(m=>(0,s.jsx)(Ge,{to:uc(l,m.view),label:m.label,icon:m.icon,end:!0},m.view))}),(0,s.jsx)("p",{className:"px-4 pb-1 pt-5 text-(length:--text-nano) font-mono font-medium uppercase tracking-widest text-ink-3/60",children:"Operate"}),(0,s.jsxs)("div",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)(Ge,{to:uc(l,"runs"),label:"Runs",icon:m0}),(0,s.jsx)(Ge,{to:uc(l,"activity"),label:"Activity",icon:l0})]})]})})}r($4,"RoutineContextualSidebar");var td={sources:"/skills/sources",installed:"/skills",discover:"/skills?tab=discover",authored:"/skills/studio"};function B4(e){return["discover","all","catalog","bundled"].includes(e??"")?"discover":"installed"}r(B4,"resolveSkillsDiscoveryView");function HQ(e,t){const i=new URLSearchParams(e);return t==="installed"?i.delete("tab"):i.set("tab","discover"),i.delete("view"),i.delete("category"),t!=="installed"&&i.delete("folder"),i}r(HQ,"withSkillsDiscoveryView");function K4(e,t=""){const i=e.split("/").filter(Boolean),l=i.findIndex(m=>m.toLowerCase()==="skills"),c=l>=0?i.slice(l+1):[];if(c[0]?.toLowerCase()==="sources")return"sources";if(c[0]?.toLowerCase()==="studio")return"authored";const u=typeof t=="string"?new URLSearchParams(t):t;return u.has("catalog")||u.get("view")==="catalog"?"discover":B4(u.get("tab"))}r(K4,"resolveSkillsNavigationView");function q4(){const e=vn(),t=K4(e.pathname,e.search);return(0,s.jsx)(Uc,{surface:"skills",title:"Skills",icon:tg,fallbackTo:"/dashboard",showHeader:!1,className:"border-r border-line bg-bg",children:(0,s.jsxs)("nav",{"aria-label":"Skills","data-slot":"contextual-sidebar-nav",className:$n.nav,children:[(0,s.jsxs)("div",{"data-slot":"contextual-sidebar-group",className:$n.group,children:[(0,s.jsx)(Ge,{to:td.installed,label:"Installed",icon:tg,active:t==="installed",end:!0}),(0,s.jsx)(Ge,{to:td.discover,label:"Discover",icon:Wk,active:t==="discover",end:!0}),(0,s.jsx)(Ge,{to:td.sources,label:"Sources",icon:K3,active:t==="sources"})]}),(0,s.jsxs)("div",{"data-slot":"contextual-sidebar-section",className:$n.section,children:[(0,s.jsx)("div",{"data-slot":"contextual-sidebar-section-label",className:$n.sectionLabel,children:"Author"}),(0,s.jsx)("p",{"data-slot":"contextual-sidebar-section-description",className:$n.sectionDescription,children:"Skills you create, edit, and test."}),(0,s.jsx)("div",{"data-slot":"contextual-sidebar-group",className:$n.group,children:(0,s.jsx)(Ge,{to:td.authored,label:"My Skills",icon:GT,active:t==="authored"})})]})]})})}r(q4,"SkillsContextualSidebar");var CC="wardmote:panel-visible",AC=(0,x.createContext)(null);function _C(){return typeof window.matchMedia=="function"&&window.matchMedia("(min-width: 768px) and (max-width: 1023px) and (min-height: 431px)").matches}r(_C,"fullPagePanel");function F4(){if(_C())return!1;try{const e=localStorage.getItem(CC);return e===null?!0:e==="true"}catch{return!0}}r(F4,"readPreference");function Bj(e){if(!_C())try{localStorage.setItem(CC,String(e))}catch{}}r(Bj,"writePreference");function H4({children:e}){const[t,i]=(0,x.useState)(null),[l,c]=(0,x.useState)("padded"),[u,m]=(0,x.useState)(F4),[f,h]=(0,x.useState)(!1),g=(0,x.useCallback)(()=>{h(!0)},[]),v=(0,x.useCallback)(()=>{h(!1)},[]),y=(0,x.useCallback)((N,_)=>{i(N),c(_?.contentMode??"padded")},[]),j=(0,x.useCallback)(()=>{i(null),c("padded")},[]),k=(0,x.useCallback)(N=>{m(N),Bj(N)},[]),S=(0,x.useCallback)(()=>{m(N=>{const _=!N;return Bj(_),_})},[]);return(0,s.jsx)(AC.Provider,{value:{panelContent:t,panelContentMode:l,panelVisible:u,openPanel:y,closePanel:j,setPanelVisible:k,togglePanelVisible:S,panelMaximizeRequested:f,requestPanelMaximize:g,clearPanelMaximizeRequest:v},children:e})}r(H4,"PanelProvider");function q0(){const e=(0,x.useContext)(AC);if(!e)throw new Error("usePanel must be used within PanelProvider");return e}r(q0,"usePanel");function V4({...e}){return(0,s.jsx)("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",...e})}r(V4,"Breadcrumb");function W4({className:e,...t}){return(0,s.jsx)("ol",{"data-slot":"breadcrumb-list",className:X("text-ink-3 flex flex-wrap items-center gap-1.5 text-sm break-words sm:gap-2.5",e),...t})}r(W4,"BreadcrumbList");function Q4({className:e,...t}){return(0,s.jsx)("li",{"data-slot":"breadcrumb-item",className:X("inline-flex items-center gap-1.5",e),...t})}r(Q4,"BreadcrumbItem");function G4({asChild:e,className:t,...i}){const l=e?UE:"a";return(0,s.jsx)(l,{"data-slot":"breadcrumb-link",className:X("hover:text-ink transition-colors",t),...i})}r(G4,"BreadcrumbLink");function Kj({className:e,...t}){return(0,s.jsx)("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:X("text-ink font-normal",e),...t})}r(Kj,"BreadcrumbPage");function Y4({children:e,className:t,...i}){return(0,s.jsx)("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:X("[&>svg]:size-3.5",t),...i,children:e??(0,s.jsx)(nr,{})})}r(Y4,"BreadcrumbSeparator");function El({identifier:e}){return e?(0,s.jsx)("span",{"data-slot":"task-title-identifier",className:"min-w-0 max-w-1/2 shrink truncate font-mono text-(length:--text-micro) text-ink-3",children:e}):null}r(El,"CrumbIdentifier");function X4({context:e,pageToolbar:t}){const{slots:i}=Tc({slotTypes:["globalToolbarButton"],companyId:e.companyId}),{launchers:l}=LN({placementZones:["globalToolbarButton"],companyId:e.companyId,enabled:!!e.companyId});return(0,s.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-1 pl-2 empty:hidden",children:[t,i.length>0?(0,s.jsx)(Gh,{slotTypes:["globalToolbarButton"],context:e,className:"flex items-center gap-1"}):null,l.length>0?(0,s.jsx)(zN,{placementZones:["globalToolbarButton"],context:e,className:"flex items-center gap-1"}):null]})}r(X4,"GlobalToolbar");function qj({taskDetailLayout:e=!1}){const{breadcrumbs:t,breadcrumbToolbar:i,breadcrumbPanelControl:l,mobileToolbar:c,setMobileTaskActionsSlot:u}=IS(),{toggleSidebar:m,isMobile:f}=Jn(),{openNewIssue:h}=Pa(),{panelVisible:g,togglePanelVisible:v}=q0(),{selectedCompanyId:y,selectedCompany:j}=vt(),k=l?.open??g,S=l?.onToggle??v,N=(0,x.useMemo)(()=>({companyId:y??null,companyPrefix:j?.issuePrefix??null}),[y,j?.issuePrefix]),_=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(X4,{context:N,pageToolbar:f?null:i}),f?(0,s.jsx)(le,{variant:"ghost",size:"icon-sm",className:"ms-1 shrink-0",onClick:r(()=>h(),"onClick"),"aria-label":"New Task",children:(0,s.jsx)(C0,{className:"h-5 w-5"})}):null]});if(f&&c)return(0,s.jsx)("div",{className:"h-(--sz-60px) shrink-0 flex items-center border-b border-line px-2",children:c});if(t.length===0)return(0,s.jsx)("div",{className:"h-(--sz-60px) shrink-0 flex items-center justify-end border-b border-line px-4 md:px-6",children:_});const I=f&&(0,s.jsx)(le,{variant:"ghost",size:"icon-sm",className:"mr-2 shrink-0",onClick:m,"aria-label":"Open sidebar",children:(0,s.jsx)(g1,{className:"h-5 w-5"})}),D=t[t.length-1];if(f&&t[0]?.label==="Tasks"&&D.identifier)return(0,s.jsxs)("div",{className:"h-(--sz-60px) shrink-0 flex items-center border-b border-line px-4",children:[I,(0,s.jsxs)("h1",{className:"flex min-w-0 flex-1 items-baseline gap-1.5 text-sm",children:[D.leading?(0,s.jsx)("span",{className:"flex shrink-0 items-center self-center",children:D.leading}):null,(0,s.jsx)("span",{className:"min-w-0 truncate",title:D.label,children:D.label}),(0,s.jsx)(El,{identifier:D.identifier})]}),(0,s.jsx)("div",{ref:u,"data-slot":"mobile-task-actions",className:"ms-1 flex shrink-0 items-center empty:hidden"}),_]});const T=(0,s.jsx)("div",{className:"min-w-0 overflow-hidden flex-1",children:(0,s.jsx)(V4,{className:"min-w-0 overflow-hidden",children:(0,s.jsx)(W4,{className:"flex-nowrap",children:t.map((C,M)=>{const z=M===t.length-1;return(0,s.jsxs)(x.Fragment,{children:[M>0&&(0,s.jsx)(Y4,{}),(0,s.jsxs)(Q4,{className:z?"min-w-0":"shrink-0",children:[z||!C.href?C.leading||C.identifier?(0,s.jsxs)(Kj,{className:X("flex min-w-0 gap-1.5",C.trailing?"items-center":"items-baseline"),children:[C.leading&&(0,s.jsx)("span",{className:"flex shrink-0 items-center self-center",children:C.leading}),e?null:(0,s.jsx)(El,{identifier:C.identifier}),(0,s.jsx)("span",{className:"min-w-0 truncate",children:C.label}),e&&z?(0,s.jsx)(El,{identifier:C.identifier}):null]}):(0,s.jsx)(Kj,{className:"truncate",children:C.label}):(0,s.jsx)(G4,{asChild:!0,children:C.leading||C.identifier?(0,s.jsxs)(gn,{to:C.href,onClick:C.onClick,className:X("flex min-w-0 items-baseline gap-1.5",M===0&&"font-semibold uppercase tracking-wider text-ink-3 hover:text-ink"),children:[C.leading&&(0,s.jsx)("span",{className:"flex shrink-0 items-center self-center",children:C.leading}),e?null:(0,s.jsx)(El,{identifier:C.identifier}),(0,s.jsx)("span",{className:"min-w-0 truncate",children:C.label}),e&&z?(0,s.jsx)(El,{identifier:C.identifier}):null]}):(0,s.jsx)(gn,{to:C.href,onClick:C.onClick,className:X("min-w-0 truncate",M===0&&"font-semibold uppercase tracking-wider text-ink-3 hover:text-ink"),children:C.label})}),C.trailing&&(0,s.jsx)("span",{className:"flex shrink-0 items-center",children:C.trailing})]})]},M)})})})});return t.length===1&&!e?(0,s.jsxs)("div",{className:"h-(--sz-60px) shrink-0 flex items-center border-b border-line px-4 md:px-6",children:[I,(0,s.jsx)("div",{className:"min-w-0 overflow-hidden flex-1",children:t[0].leading||t[0].identifier?(0,s.jsxs)("h1",{className:"flex items-baseline gap-1.5 text-sm font-semibold uppercase tracking-wider",children:[t[0].leading&&(0,s.jsx)("span",{className:"flex shrink-0 items-center self-center",children:t[0].leading}),(0,s.jsx)(El,{identifier:t[0].identifier}),(0,s.jsx)("span",{className:"truncate",children:t[0].label})]}):(0,s.jsx)("h1",{className:"text-sm font-semibold uppercase tracking-wider truncate",children:t[0].label})}),_]}):(0,s.jsxs)("div",{className:X("relative h-(--sz-60px) shrink-0 flex items-center border-b border-line","px-4 md:px-6"),children:[I,T,_,e?(0,s.jsx)(le,{variant:"ghost",size:"icon-sm",className:"ml-5 size-9 shrink-0",onClick:S,"aria-label":k?"Hide properties":"Show properties",title:k?"Hide properties":"Show properties",children:k?(0,s.jsx)(k1,{className:"h-4 w-4"}):(0,s.jsx)(N1,{className:"h-4 w-4"})}):null]})}r(qj,"BreadcrumbBar");var Z4=600;function J4(e){const t=e.trim();if(!t)return null;const i=Number.parseFloat(t);return Number.isFinite(i)?t.endsWith("s")&&!t.endsWith("ms")?i*1e3:i:null}r(J4,"parseCssTimeMs");function ez(){const e=(0,x.useRef)(null),t=(0,x.useRef)(null),i=(0,x.useCallback)(l=>{const c=l.currentTarget;t.current=c,c.dataset.scrollActive="true",e.current!==null&&window.clearTimeout(e.current);const u=J4(getComputedStyle(document.documentElement).getPropertyValue("--motion-scrollbar-idle-delay"));e.current=window.setTimeout(()=>{delete c.dataset.scrollActive,e.current=null},u??Z4)},[]);return(0,x.useEffect)(()=>()=>{e.current!==null&&window.clearTimeout(e.current),t.current&&delete t.current.dataset.scrollActive},[]),i}r(ez,"useScrollbarWhileScrolling");function tz({children:e,header:t,footer:i,trailingControls:l,presentation:c="docked",contentMode:u="padded",open:m=!0,maximized:f=!1,resizing:h=!1,label:g="Side panel",headerSize:v="default",className:y,bodyClassName:j,style:k}){const S=ez();return(0,s.jsxs)("section",{"aria-label":g,"aria-hidden":!m,"data-presentation":c,"data-open":m?"true":"false","data-maximized":f?"true":"false","data-resizing":h?"true":"false",className:X("flex min-h-0 min-w-0 flex-col overflow-hidden bg-(--side-panel-bg) text-(--side-panel-fg)",c==="docked"&&"h-full border-l border-line",c==="sheet"&&"h-full w-full",c==="embedded"&&"h-full rounded-xl border border-line",!m&&"pointer-events-none opacity-0",y),style:k,children:[t||l?(0,s.jsxs)("header",{className:X("flex h-(--side-panel-header-height) min-w-0 shrink-0 items-center gap-1 px-2"),children:[(0,s.jsx)("div",{className:"flex min-w-0 flex-1 self-stretch",children:t}),l?(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-1",children:l}):null]}):null,(0,s.jsx)("div",{"data-side-panel-content-viewport":"true",onScroll:S,className:X("min-h-0 flex-1",u==="full-bleed"?"overflow-hidden":"overflow-auto",u!=="full-bleed"&&"scrollbar-while-scrolling",u==="padded"&&"p-4",j),children:u==="prose"?(0,s.jsx)("div",{"data-side-panel-prose-content":"true",className:"mx-auto w-full max-w-4xl px-6 py-4",children:e}):e}),i?(0,s.jsx)("footer",{className:X("shrink-0",v!=="task-detail"&&"border-t border-line"),children:i}):null]})}r(tz,"SidePanelFrame");function nz({open:e,onToggle:t,shortcut:i,className:l}){const c="Toggle side panel";return(0,s.jsxs)(Ia,{children:[(0,s.jsx)(_a,{asChild:!0,children:(0,s.jsx)(le,{active:e,type:"button",variant:"ghost",size:"icon-sm","aria-label":c,"aria-pressed":e,onClick:t,className:X("h-(--side-panel-tab-height) w-(--side-panel-tab-height)",l),children:e?(0,s.jsx)(k1,{"aria-hidden":!0}):(0,s.jsx)(N1,{"aria-hidden":!0})})}),(0,s.jsx)(Ea,{side:"bottom",children:i?`${c} (${i})`:c})]})}r(nz,"SidePanelToggleButton");function sz({maximized:e,onMaximizedChange:t,onToggle:i,closeControl:l="toggle"}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(le,{type:"button",variant:"ghost",size:"icon-sm",className:"h-(--side-panel-tab-height) w-(--side-panel-tab-height)",onClick:r(()=>t(!e),"onClick"),"aria-label":e?"Restore side panel":"Maximize side panel",title:e?"Restore side panel":"Maximize side panel",children:e?(0,s.jsx)(y1,{"aria-hidden":!0}):(0,s.jsx)(wS,{"aria-hidden":!0})}),l==="close"?(0,s.jsx)(le,{type:"button",variant:"ghost",size:"icon-sm",className:"h-(--side-panel-tab-height) w-(--side-panel-tab-height)",onClick:i,"aria-label":"Close side panel",title:"Close side panel",children:(0,s.jsx)(is,{"aria-hidden":!0})}):(0,s.jsx)(nz,{open:!0,onToggle:i})]})}r(sz,"SidePanelWindowControls");function az({sections:e,onSelect:t,placeholder:i,emptyMessage:l,panel:c}){return(0,s.jsxs)(TS,{className:X(c&&"border border-line shadow-sm"),children:[(0,s.jsx)(b0,{placeholder:i,"aria-label":i}),(0,s.jsxs)(y0,{className:X(c&&"max-h-none flex-1"),children:[(0,s.jsx)(v0,{children:l}),e.map((u,m)=>(0,s.jsxs)("div",{children:[m>0?(0,s.jsx)(Xi,{}):null,(0,s.jsxs)(Wa,{heading:u.label,children:[u.loading?(0,s.jsxs)("div",{className:"flex items-center gap-2 px-2 py-3 text-sm text-ink-3",role:"status",children:[(0,s.jsx)(As,{className:"size-4 animate-spin","aria-hidden":!0}),"Loading…"]}):null,u.error?(0,s.jsxs)("div",{className:"flex items-start gap-2 px-2 py-3 text-sm text-ink-3",role:"status",children:[(0,s.jsx)(hS,{className:"mt-0.5 size-4 shrink-0","aria-hidden":!0}),(0,s.jsx)("span",{children:u.error})]}):null,u.items.map(f=>(0,s.jsxs)(jn,{value:`${f.label} ${f.description??""} ${f.searchText??""}`,disabled:f.disabled,title:f.disabledReason,onSelect:r(()=>t(f),"onSelect"),className:"min-h-10",children:[f.icon?(0,s.jsx)("span",{className:"flex size-4 shrink-0 items-center justify-center",children:f.icon}):null,(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block truncate",children:f.label}),f.description||f.disabledReason?(0,s.jsx)("span",{className:"block truncate text-xs text-ink-3",children:f.disabledReason??f.description}):null]}),f.alreadyOpen?(0,s.jsx)(Ta,{className:"size-4 text-ink-3","aria-label":"Already open"}):null,f.shortcut?(0,s.jsx)(F3,{children:f.shortcut}):null]},f.id))]})]},u.id))]})]})}r(az,"LauncherContent");function VQ({sections:e,onSelect:t,presentation:i="panel",trigger:l,open:c,onOpenChange:u,title:m="Open a side panel tab",description:f="Choose a view or resource to open.",placeholder:h="Search tabs and resources…",emptyMessage:g="No matching tabs or resources.",className:v}){const[y,j]=(0,x.useState)(!1),k=c??y,S=u??j,N=(0,s.jsx)(az,{sections:e,onSelect:r(_=>{t(_),i==="popover"&&S(!1)},"onSelect"),placeholder:h,emptyMessage:g,panel:i==="panel"});return i==="popover"?l?(0,s.jsxs)(va,{open:k,onOpenChange:S,children:[(0,s.jsx)(xa,{asChild:!0,children:l}),(0,s.jsxs)(ba,{align:"start",className:X("w-(--side-panel-launcher-width) overflow-hidden p-0",v),children:[(0,s.jsxs)("div",{className:"sr-only",children:[(0,s.jsx)("h2",{children:m}),(0,s.jsx)("p",{children:f})]}),N]})]}):null:(0,s.jsxs)("div",{className:X("mx-auto flex h-full w-full max-w-xl flex-col justify-center gap-4 p-4",v),children:[(0,s.jsxs)("div",{className:"space-y-1 text-center",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold",children:m}),(0,s.jsx)("p",{className:"text-sm text-ink-3",children:f})]}),N]})}r(VQ,"SidePanelLauncher");function iz({id:e,label:t,ariaLabel:i,icon:l,status:c,active:u,closable:m=!0,disabled:f=!1,tabRef:h,dragHandleProps:g,onSelect:v,onClose:y,onAuxClick:j,onKeyDown:k,appearance:S="default",className:N}){const _=`Close ${t}`,I=(0,x.useRef)(null),D=(0,x.useRef)(null),[T,C]=(0,x.useState)(!1),M=`${S}:${t}:${l?"icon":"no-icon"}:${c?"status":"no-status"}:${m?"closable":"fixed"}`,[z,K]=(0,x.useState)(null),P=z?.key===M;return(0,x.useLayoutEffect)(()=>{if(S==="streamlined-task"||P)return;const A=I.current?.getBoundingClientRect().width??0;A<=0||K({key:M,width:Math.ceil(A)})},[P,M]),(0,x.useEffect)(()=>{const A=D.current;if(!A)return;const B=r(()=>{C(A.scrollWidth>A.clientWidth)},"updateTruncation");if(B(),typeof ResizeObserver>"u")return;const O=new ResizeObserver(B);return O.observe(A),()=>O.disconnect()},[t]),(0,s.jsxs)("div",{ref:I,"data-side-panel-tab-wrapper":e,"data-active":u?"true":"false","data-appearance":S,style:S==="default"&&P?{width:z.width}:void 0,className:X(S==="streamlined-task"?"group/side-panel-tab relative mx-1.5 flex h-7 min-w-0 flex-1 basis-0 items-center rounded-md border border-transparent":"group/side-panel-tab relative flex h-(--side-panel-tab-height) min-w-0 shrink-0 items-center rounded-(--side-panel-tab-radius) border border-transparent","side-panel-tab-motion",u?S==="streamlined-task"?"text-ink hover:bg-bg-3/50":"bg-(--side-panel-tab-active-bg) text-ink":S==="streamlined-task"?"text-ink-3 hover:bg-bg-3/50 hover:text-ink":"text-ink-3 hover:bg-(--side-panel-tab-hover-bg) hover:text-ink",f&&"opacity-50",N),children:[(0,s.jsxs)(Ia,{open:T?void 0:!1,children:[(0,s.jsx)(_a,{asChild:!0,children:(0,s.jsxs)("button",{...g,ref:h,type:"button",role:"tab","data-side-panel-tab-target":e,"data-side-panel-tab-tooltip":T?"enabled":"disabled",id:`side-panel-tab-${e}`,"aria-controls":`side-panel-content-${e}`,"aria-selected":u,"aria-label":i??t,tabIndex:u?0:-1,disabled:f,onClick:v,onAuxClick:j,onKeyDown:k,className:X(S==="streamlined-task"?"flex h-full w-full min-w-0 items-center justify-start rounded-md px-3 text-sm font-medium outline-none":"flex h-full w-full min-w-0 items-center gap-1.5 rounded-(--side-panel-tab-radius) py-1.5 pl-2 text-xs font-medium outline-none",S==="default"&&(m&&(!P||u)?"pr-7":"pr-2.5"),"focus-visible:ring-2 focus-visible:ring-focus/60",g?.className),children:[l&&S==="default"?(0,s.jsx)("span",{className:"flex size-3.5 shrink-0 items-center justify-center [&_svg]:size-3.5",children:l}):null,(0,s.jsx)("span",{ref:D,"data-truncated":T?"true":void 0,className:X(S==="streamlined-task"?"side-panel-tab-label-close-fade task-detail-pane-tab-label min-w-0 flex-1 overflow-hidden whitespace-nowrap text-center":"overflow-hidden whitespace-nowrap",S==="default"&&(m&&P&&!u?"max-w-(--side-panel-tab-label-expanded-max-width)":"max-w-(--side-panel-tab-label-max-width)"),S==="default"&&T&&"side-panel-tab-label-fade"),children:t}),c?(0,s.jsx)("span",{className:X("flex shrink-0 items-center",S==="streamlined-task"&&"transition-opacity group-hover/side-panel-tab:opacity-0 group-focus-within/side-panel-tab:opacity-0"),children:c}):null]})}),T?(0,s.jsx)(Ea,{side:"bottom",children:t}):null]}),m&&y&&(S==="streamlined-task"||u)?(0,s.jsx)("button",{type:"button","aria-label":_,title:_,onPointerDown:r(A=>{S==="streamlined-task"&&(A.preventDefault(),A.stopPropagation())},"onPointerDown"),onClick:r(A=>{A.stopPropagation(),y()},"onClick"),className:X("side-panel-tab-close-motion absolute flex items-center justify-center text-ink-3 outline-none hover:text-ink",S==="streamlined-task"?"right-0 top-1/2 z-20 size-5 pointer-coarse:size-6 -translate-y-1/2 rounded-sm opacity-0 hover:bg-bg-3 focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-focus/60 group-hover/side-panel-tab:opacity-100":"right-1 size-6 rounded-lg hover:bg-bg/70 focus-visible:ring-2 focus-visible:ring-focus/60"),children:(0,s.jsx)(is,{className:S==="streamlined-task"?"size-3.5":"size-3","aria-hidden":!0})}):null]})}r(iz,"SidePanelTab");function rz({tab:e,active:t,appearance:i,fillAvailableWidth:l,showLeadingSeparator:c,onSelect:u,onClose:m,onAuxClick:f,onKeyDown:h}){const g=B0({id:e.id,disabled:e.disabled});return(0,s.jsxs)("div",{ref:g.setNodeRef,style:{transform:Za.Transform.toString(g.transform),transition:g.transition},className:X(i==="streamlined-task"?X("relative flex flex-1 items-center",l?"min-w-0 max-w-none basis-auto":"min-w-(--side-panel-streamlined-tab-min-width) max-w-(--side-panel-streamlined-tab-max-width) basis-0"):"relative",g.isDragging&&"z-20 opacity-80"),children:[c?(0,s.jsx)("span",{"aria-hidden":!0,"data-side-panel-tab-separator":"true",className:X("pointer-events-none absolute w-px bg-line",i==="streamlined-task"?"left-0 top-1/2 h-4 -translate-y-1/2":"inset-y-2 -left-0.5 bg-line/60")}):null,(0,s.jsx)(iz,{id:e.id,label:e.label,ariaLabel:e.ariaLabel,icon:e.icon,status:e.status,active:t,appearance:i,closable:e.closable,disabled:e.disabled,tabRef:g.setActivatorNodeRef,dragHandleProps:{...g.attributes,...g.listeners},onSelect:u,onClose:m,onAuxClick:f,onKeyDown:h})]})}r(rz,"SortableSidePanelTab");function WQ({tabs:e,activeTabId:t,onActiveTabChange:i,onCloseTab:l,onReorderTabs:c,onAddTab:u,addControl:m,addLabel:f="Open a new tab",appearance:h="default",className:g}){const[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(!1),S=(0,x.useRef)(null),N=(0,x.useRef)(null),_=(0,x.useRef)(null),I=D0(wc(Rf,{activationConstraint:{distance:4}}),wc(O0,{coordinateGetter:FL})),D=(0,x.useMemo)(()=>e.map(P=>P.id),[e]);function T(P,A){const B=A==="wrapper"?"data-side-panel-tab-wrapper":"data-side-panel-tab-target";return Array.from(S.current?.querySelectorAll(`[${B}]`)??[]).find(O=>O.getAttribute(B)===P)??null}r(T,"findTabElement"),(0,x.useEffect)(()=>{if(!t)return;const P=T(t,"wrapper"),A=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;P?.scrollIntoView({behavior:A?"auto":"smooth",block:"nearest",inline:"nearest"})},[t]),(0,x.useEffect)(()=>{const P=S.current;if(!P||h!=="streamlined-task"){k(!1);return}const A=r(()=>{const O=P.scrollWidth-P.clientWidth-P.scrollLeft;k(O>1)},"updateEndFade");A(),P.addEventListener("scroll",A,{passive:!0});const B=typeof ResizeObserver>"u"?null:new ResizeObserver(A);return B?.observe(P),P.firstElementChild&&B?.observe(P.firstElementChild),()=>{P.removeEventListener("scroll",A),B?.disconnect()}},[h,D]);function C(P){window.requestAnimationFrame(()=>{if(!P){N.current?.focus(),_.current?.querySelector("button, [href], input, [tabindex]:not([tabindex='-1'])")?.focus();return}T(P,"target")?.focus()})}r(C,"focusTab");function M(P){const A=D.indexOf(P),B=D[A+1]??D[A-1]??null;l(P),y(B?"Tab closed.":"Last tab closed. Choose something to open."),C(B)}r(M,"closeTab");function z(P,A){const B=D.indexOf(A);if(B<0)return;if(P.altKey&&P.shiftKey&&(P.key==="ArrowLeft"||P.key==="ArrowRight")){if(!c)return;P.preventDefault();const Y=P.key==="ArrowLeft"?B-1:B+1;if(Y<0||Y>=D.length)return;const ce=[...D],[oe]=ce.splice(B,1);ce.splice(Y,0,oe),c(ce),y(`Moved ${e[B]?.label??"tab"} to position ${Y+1} of ${e.length}.`),C(A);return}const O=P.key==="ArrowLeft"?Math.max(0,B-1):P.key==="ArrowRight"?Math.min(D.length-1,B+1):P.key==="Home"?0:P.key==="End"?D.length-1:-1;if(O<0||O===B)return;P.preventDefault();const W=D[O];i(W),C(W)}r(z,"handleKeyDown");function K(P){if(!c||!P.over||P.active.id===P.over.id)return;const A=D.indexOf(String(P.active.id)),B=D.indexOf(String(P.over.id));if(A<0||B<0)return;const O=[...D],[W]=O.splice(A,1);O.splice(B,0,W),c(O),y(`Moved ${e[A]?.label??"tab"} to position ${B+1} of ${e.length}.`)}return r(K,"handleDragEnd"),(0,s.jsxs)("div",{className:X("flex min-w-0 flex-1 items-center",h==="streamlined-task"?"gap-0":"gap-1",g),children:[(0,s.jsx)("div",{ref:S,role:"tablist","aria-orientation":"horizontal","data-scroll-end-fade":h==="streamlined-task"&&j?"true":void 0,className:X("side-panel-tabs-scroll min-w-0 flex-1 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",h==="streamlined-task"?"overflow-x-auto overscroll-x-contain":"overflow-x-auto"),children:(0,s.jsx)(P0,{sensors:I,collisionDetection:FN,onDragEnd:K,children:(0,s.jsx)($0,{items:D,strategy:DL,children:(0,s.jsx)("div",{className:X("flex items-center",h==="streamlined-task"?e.length===1?"w-full gap-0":"w-max min-w-full gap-0":"min-w-max gap-1 py-1"),children:e.map((P,A)=>(0,s.jsx)(rz,{tab:P,active:P.id===t,appearance:h,fillAvailableWidth:h==="streamlined-task"&&e.length===1,showLeadingSeparator:h==="streamlined-task"?A>0:A>0&&P.id!==t&&e[A-1]?.id!==t,onSelect:r(()=>i(P.id),"onSelect"),onClose:r(()=>M(P.id),"onClose"),onAuxClick:r(B=>{B.button!==1||P.closable===!1||(B.preventDefault(),M(P.id))},"onAuxClick"),onKeyDown:r(B=>z(B,P.id),"onKeyDown")},P.id))})})})}),m?(0,s.jsx)("div",{ref:_,className:"shrink-0",children:m}):u?(0,s.jsx)(le,{ref:N,type:"button",variant:"ghost",size:"icon-sm",onClick:u,"aria-label":f,title:f,className:X("shrink-0",h==="streamlined-task"?"h-(--side-panel-tab-height) w-(--side-panel-tab-height) rounded-md":"h-(--side-panel-tab-height) w-(--side-panel-tab-height) rounded-(--side-panel-control-radius)"),children:(0,s.jsx)(Js,{"aria-hidden":!0})}):null,(0,s.jsx)("div",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:v})]})}r(WQ,"SidePanelTabs");function QQ({tabs:e,activeTabId:t,onActiveTabChange:i,onCloseTab:l,addControl:c}){const[u,m]=(0,x.useState)(!1),f=(0,x.useRef)(null),h=(0,x.useRef)(null),g=e.find(y=>y.id===t);function v(y,j){const k=e.filter(_=>!_.disabled),S=k.findIndex(_=>_.id===j);let N;switch(y.key){case"ArrowDown":N=(S+1)%k.length;break;case"ArrowUp":N=(S-1+k.length)%k.length;break;case"Home":N=0;break;case"End":N=k.length-1;break;default:return}y.preventDefault(),f.current?.querySelectorAll("[data-mobile-tab-select]:not(:disabled)")[N]?.focus()}return r(v,"moveFocus"),(0,s.jsxs)("div",{ref:h,className:"flex min-w-0 flex-1 items-center gap-1",children:[(0,s.jsxs)(va,{open:u,onOpenChange:m,children:[(0,s.jsx)(xa,{asChild:!0,children:(0,s.jsxs)(le,{variant:"ghost",className:"h-(--sz-44px) min-w-0 flex-1 justify-start gap-2 px-2","aria-label":`Switch tabs, ${e.length} open`,disabled:e.length===0,children:[(0,s.jsx)("span",{id:g?`side-panel-tab-${g.id}`:void 0,className:"min-w-0 flex-1 truncate text-left",children:g?.label??"Choose a tab"}),(0,s.jsx)("span",{className:"shrink-0 rounded-md bg-bg-3 px-1.5 py-0.5 text-xs text-ink-3",children:e.length}),(0,s.jsx)(Br,{"aria-hidden":!0,className:"shrink-0"})]})}),(0,s.jsxs)(ba,{"aria-label":"Open tabs",align:"start",className:"w-(--side-panel-mobile-tabs-width) max-w-(--radix-popover-content-available-width) p-2",onOpenAutoFocus:r(y=>{y.preventDefault();const j=f.current?.querySelectorAll("[data-mobile-tab-select]:not(:disabled)");(Array.from(j??[]).find(k=>k.dataset.mobileTabSelect===t)??j?.[0])?.focus()},"onOpenAutoFocus"),onCloseAutoFocus:r(y=>{if(e.length!==0)return;const j=h.current?.querySelector('[aria-label="Open a new tab"]');j&&(y.preventDefault(),j.focus())},"onCloseAutoFocus"),children:[(0,s.jsx)("p",{className:"px-2 py-2 text-xs font-medium text-ink-3",children:"Open tabs"}),(0,s.jsx)("ul",{ref:f,"aria-label":"Open tabs",className:"max-h-(--side-panel-mobile-tabs-max-height) overflow-y-auto overscroll-contain",children:e.map(y=>(0,s.jsxs)("li",{className:X("flex items-center rounded-md",y.id===t&&"bg-bg-3"),children:[(0,s.jsxs)("button",{type:"button","data-mobile-tab-select":y.id,disabled:y.disabled,"aria-current":y.id===t?"true":void 0,"aria-label":y.ariaLabel??y.label,onKeyDown:r(j=>v(j,y.id),"onKeyDown"),onClick:r(()=>{i(y.id),m(!1)},"onClick"),className:"flex min-h-(--sz-44px) min-w-0 flex-1 items-center gap-3 rounded-md px-2 py-3 text-left text-sm hover:bg-bg-3 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus disabled:opacity-50",children:[(0,s.jsx)("span",{"aria-hidden":!0,className:"shrink-0 text-ink-3 [&_svg]:size-4",children:y.icon}),(0,s.jsx)("span",{className:"min-w-0 flex-1 break-words",children:y.label}),y.id===t?(0,s.jsx)(Ta,{"aria-hidden":!0,className:"size-4 shrink-0"}):null]}),y.closable!==!1?(0,s.jsx)(le,{variant:"ghost",size:"icon",className:"size-(--sz-44px) shrink-0","aria-label":`Close ${y.label}`,disabled:y.disabled,onClick:r(()=>{const j=Array.from(f.current?.querySelectorAll("[data-mobile-tab-select]:not(:disabled)")??[]),k=j.findIndex(S=>S.dataset.mobileTabSelect===y.id);(j[k+1]??j[k-1])?.focus(),l(y.id),e.length===1&&m(!1)},"onClick"),children:(0,s.jsx)(is,{"aria-hidden":!0})}):null]},y.id))})]})]}),c]})}r(QQ,"SidePanelMobileTabs");function EC(e){const t=new Set,i=e.tabs.filter(l=>!l.id||!l.type||t.has(l.id)?!1:(t.add(l.id),!0));return{tabs:i,activeTabId:e.activeTabId&&t.has(e.activeTabId)?e.activeTabId:i[0]?.id??null}}r(EC,"normalizeSidePanelTabsState");function lz(e,t){switch(t.type){case"open":{const i=e.tabs.find(l=>l.id===t.tab.id);return i?t.activate===!1||e.activeTabId===i.id?e:{...e,activeTabId:i.id}:{tabs:[...e.tabs,t.tab],activeTabId:t.activate===!1?e.activeTabId:t.tab.id}}case"select":return e.activeTabId===t.tabId?e:e.tabs.some(i=>i.id===t.tabId)?{...e,activeTabId:t.tabId}:e;case"close":{const i=e.tabs.findIndex(c=>c.id===t.tabId);if(i<0)return e;const l=e.tabs.filter(c=>c.id!==t.tabId);return e.activeTabId!==t.tabId?{...e,tabs:l}:{tabs:l,activeTabId:l[i]?.id??l[i-1]?.id??null}}case"close-others":{const i=e.tabs.find(l=>l.id===t.tabId);return i?{tabs:[i],activeTabId:i.id}:e}case"reorder":{if(t.orderedTabIds.length!==e.tabs.length)return e;const i=new Map(e.tabs.map(c=>[c.id,c])),l=t.orderedTabIds.map(c=>i.get(c));return l.some(c=>!c)||new Set(t.orderedTabIds).size!==e.tabs.length?e:{...e,tabs:l}}case"update":{let i=!1;const l=e.tabs.map(c=>c.id!==t.tabId?c:(i=!0,{...c,...t.patch,id:c.id}));return i?{...e,tabs:l}:e}case"reset":return EC(t.state)}}r(lz,"sidePanelTabsReducer");function GQ({initialState:e,onStateChange:t}){const[i,l]=(0,x.useReducer)(lz,e,EC);(0,x.useEffect)(()=>{t?.(i)},[t,i]);const c=(0,x.useCallback)((y,j=!0)=>{l({type:"open",tab:y,activate:j})},[]),u=(0,x.useCallback)(y=>l({type:"select",tabId:y}),[]),m=(0,x.useCallback)(y=>l({type:"close",tabId:y}),[]),f=(0,x.useCallback)(y=>l({type:"close-others",tabId:y}),[]),h=(0,x.useCallback)(y=>l({type:"reorder",orderedTabIds:y}),[]),g=(0,x.useCallback)((y,j)=>l({type:"update",tabId:y,patch:j}),[]),v=(0,x.useCallback)(y=>l({type:"reset",state:y}),[]);return{...i,openTab:c,selectTab:u,closeTab:m,closeOtherTabs:f,reorderTabs:h,updateTab:g,resetTabs:v}}r(GQ,"useSidePanelTabs");function oz({taskDetailLayout:e=!1}){const{panelContent:t,panelContentMode:i,panelVisible:l,setPanelVisible:c,panelMaximizeRequested:u,clearPanelMaximizeRequest:m}=q0(),f=e;return t?(0,s.jsx)(jz,{panelContent:t,panelContentMode:i,panelVisible:l,setPanelVisible:c,taskDetailLayout:f,maximizeRequested:u,clearMaximizeRequest:m},f?"task-detail":"default"):null}r(oz,"PropertiesPanel");var cz="properties-pane-header-slot",uz="properties-pane-footer-slot",dz="taskChatRedesign.propertiesPaneWidth",fz="taskChatRedesign.taskDetailPropertiesPaneWidth",mz=320,pz=434,Fj=260,hz=656,gz=840,xz=400;function Hj(e){const t=typeof window>"u"?Number.POSITIVE_INFINITY:Math.max(Fj,window.innerWidth-hz);return Math.min(Math.max(Math.round(e),Fj),t)}r(Hj,"clampPaneWidth");function bz(e,t){if(typeof window>"u")return t;try{const i=window.localStorage.getItem(e),l=i===null?NaN:Number(i);return Number.isFinite(l)?l:t}catch{return t}}r(bz,"readStoredPaneWidth");function vz(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,String(t))}catch{}}r(vz,"persistPaneWidth");function yz(e){if(!(typeof window>"u"))try{window.localStorage.removeItem(e)}catch{}}r(yz,"clearStoredPaneWidth");function Vj(){return typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches}r(Vj,"prefersReducedMotion");function jz({panelContent:e,panelContentMode:t,panelVisible:i,setPanelVisible:l,taskDetailLayout:c,maximizeRequested:u,clearMaximizeRequest:m}){const f=c?pz:mz,h=c?fz:dz,[g,v]=(0,x.useState)(()=>Hj(bz(h,f))),[y,j]=(0,x.useState)(!1),[k,S]=(0,x.useState)(!1),[N,_]=(0,x.useState)(null),I=(0,x.useRef)(null),D=(0,x.useRef)(g);D.current=g;const T=(0,x.useRef)(null),C=(0,x.useRef)(""),M=(0,x.useRef)(null),z=(0,x.useCallback)(()=>{M.current!==null&&(window.clearTimeout(M.current),M.current=null)},[]),K=(0,x.useCallback)(()=>{z(),_(null)},[z]);(0,x.useEffect)(()=>{i||(S(!1),K())},[i,K]),(0,x.useEffect)(()=>()=>{M.current!==null&&window.clearTimeout(M.current),T.current!==null&&(document.body.style.userSelect=C.current)},[]);const P=(0,x.useCallback)(ae=>{T.current!==null&&(T.current=null,j(!1),document.body.style.userSelect=C.current,ae&&vz(h,D.current))},[h]),A=(0,x.useCallback)(ae=>{ae.pointerType==="mouse"&&ae.button!==0||(ae.preventDefault(),ae.currentTarget.setPointerCapture(ae.pointerId),T.current={pointerId:ae.pointerId,startX:ae.clientX,startWidth:D.current},C.current=document.body.style.userSelect,document.body.style.userSelect="none",j(!0))},[]),B=(0,x.useCallback)(ae=>{const Ee=T.current;Ee===null||Ee.pointerId!==ae.pointerId||v(Hj(Ee.startWidth+(Ee.startX-ae.clientX)))},[]),O=(0,x.useCallback)(ae=>{const Ee=T.current;Ee===null||Ee.pointerId!==ae.pointerId||P(!0)},[P]),W=(0,x.useCallback)(()=>{P(!0)},[P]),Y=(0,x.useCallback)(()=>{v(f),yz(h)},[f,h]),ce=(0,x.useCallback)(()=>{const ae=I.current,Ee=ae?.parentElement;if(!ae||!Ee)return;z(),S(!0);const fe=Ee.getBoundingClientRect();_(Ae=>{if(Ae)return{...Ae,left:Ae.parentLeft};const Ce=ae.getBoundingClientRect(),Se={top:Ce.top,left:Ce.left,rightInset:Math.max(0,window.innerWidth-Ce.right),parentLeft:fe.left};return Vj()?{...Se,left:Se.parentLeft}:(window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{_(he=>he&&{...he,left:he.parentLeft})})}),Se)})},[z]),oe=(0,x.useCallback)(()=>{const ae=I.current?.parentElement;if(S(!1),Vj()){K();return}_(Ee=>{if(!Ee)return Ee;const fe=ae?ae.getBoundingClientRect().right:window.innerWidth-Ee.rightInset;return{...Ee,left:fe-D.current}}),z(),M.current=window.setTimeout(K,xz)},[z,K]);(0,x.useEffect)(()=>{!u||!i||(m(),k||ce())},[u,i,k,ce,m]);const $=(0,x.useCallback)(ae=>{ae.target!==I.current||ae.propertyName!=="left"||k||K()},[k,K]),R=N!==null,ne=s3(a3),ue=ne?"100%":g;return(0,s.jsxs)(s.Fragment,{children:[R?(0,s.jsx)("div",{"aria-hidden":!0,className:"hidden md:block shrink-0",style:{width:i?g:0}}):null,(0,s.jsxs)("aside",{ref:I,className:X("hidden md:flex bg-bg-2 flex-col",!k&&"border-l border-line",R?"tc-pane-glide fixed z-40 overflow-hidden":X(ne?"absolute inset-0 z-30 h-full":"relative h-full shrink-0",i?"overflow-visible":"overflow-hidden",!y&&"transition-(--tp-width-opacity) duration-200 ease-in-out")),style:R?{top:N.top,bottom:0,left:N.left,right:N.rightInset}:{width:i?ue:0,opacity:i?1:0},onTransitionEnd:$,children:[!R&&!ne&&i?(0,s.jsx)("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize panel","data-dragging":y?"":void 0,className:"group absolute inset-y-0 z-10 cursor-col-resize touch-none",style:{left:-4,width:8},onPointerDown:A,onPointerMove:B,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:W,onDoubleClick:Y,children:(0,s.jsx)("div",{className:X("mx-auto h-full w-0.5 transition-colors",y?"bg-focus":"bg-transparent group-hover:bg-focus")})}):null,(0,s.jsx)("div",{className:X("flex-1 flex flex-col min-h-0",R&&"w-full"),style:R?void 0:{width:ue,minWidth:ue},children:(0,s.jsx)(tz,{presentation:"docked",maximized:k,contentMode:"full-bleed",headerSize:c?"task-detail":"default",className:"flex-1 border-l-0",header:(0,s.jsx)("div",{id:cz,className:"flex min-w-0 flex-1 items-center self-stretch"}),trailingControls:(0,s.jsx)(sz,{maximized:k,closeControl:c?"close":"toggle",onMaximizedChange:r(ae=>{ae?ce():oe()},"onMaximizedChange"),onToggle:r(()=>l(!1),"onToggle")}),footer:(0,s.jsx)("div",{id:uz}),children:t==="full-bleed"?e:(0,s.jsx)(FE,{className:"h-full",children:(0,s.jsx)("div",{className:X("p-4",k&&"mx-auto w-full px-9"),style:k?{maxWidth:gz}:void 0,children:e})})})})]})]})}r(jz,"ResizablePropertiesPanel");function wz(e){return e?.enableCombinedInboxTasks===!0}r(wz,"resolveCombinedInboxTasksEnabled");var Wj=null;function kz(){return Wj??=new mf,Wj}r(kz,"getDetachedClient$1");function Of(){const e=(0,x.useContext)(Jg),t=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn"),enabled:e!=null},e??kz());return e?{enabled:wz(t.data),loaded:t.isFetched}:{enabled:!1,loaded:!0}}r(Of,"useCombinedInboxTasksEnabled");var Sz=["status","priority","assigneeAgentId","assigneeUserId","projectId","labelId","updatedWithin","updatedAfter"],Nz=["backlog","todo","in_progress","in_review","blocked"],Cz=["done","cancelled"],F0=["title","id","desc","comment","doc","text"],Az=[{key:"title",label:"Title",description:"Match the task title",kind:"text"},{key:"id",label:"ID",description:"Exact task identifier",kind:"text"},{key:"desc",label:"Description",description:"Match the task description",kind:"text"},{key:"comment",label:"Comments",description:"Match task comments",kind:"text"},{key:"doc",label:"Documents",description:"Match task documents",kind:"text"},{key:"text",label:"All text",description:"Title, ID, description, comments and documents",kind:"text"},{key:"status",label:"Status",description:"Filter by status, open or closed",kind:"picker"},{key:"priority",label:"Priority",description:"Filter by priority",kind:"picker"},{key:"assignee",label:"Assignee",description:"Filter by assignee",kind:"picker"},{key:"label",label:"Label",description:"Filter by label",kind:"picker"},{key:"project",label:"Project",description:"Filter by project",kind:"picker"},{key:"author",label:"Author",description:"Filter by who created the task",kind:"picker"},{key:"updated",label:"Updated",description:"Filter by last update",kind:"picker"}],_z=["assignee:me","is:open","updated:>7d"];function Sc(e){return e.length>=2&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e}r(Sc,"stripValueQuotes");function H0(e){const t=[];let i=0;for(;i<e.length;){for(;/\s/.test(e[i]??"");)i+=1;if(i>=e.length)break;const l=i;if(e[i]==='"'){for(i+=1;i<e.length&&e[i]!=='"';)i+=1;e[i]==='"'&&(i+=1);const u=e.slice(l,i);t.push({raw:u,value:u});continue}for(;i<e.length&&!/\s/.test(e[i]??"");){if(e[i]===":"&&e[i+1]==='"'){for(i+=2;i<e.length&&e[i]!=='"';)i+=1;e[i]==='"'&&(i+=1);break}i+=1}const c=e.slice(l,i);t.push({raw:c,value:c})}return t}r(H0,"tokenizeQuery");function ah(e){let t=0,i=!1;for(let l=0;l<e.length;l+=1){const c=e[l];c==='"'?i=!i:!i&&/\s/.test(c)&&(t=l+1)}return{start:t,token:e.slice(t)}}r(ah,"currentSearchToken");function Ez(e){const t=e.replace(/"/g,"").trim();return/[\s:]/.test(t)?`"${t}"`:t}r(Ez,"quoteSearchValue");function Pr(e,t){return`${e}:${Ez(t)}`}r(Pr,"formatSearchToken");var IC=["status","priority","assignee","label","project","author","updated","is"];function Iz(e,t){const i=/^([a-zA-Z]+):(.+)$/s.exec(e);if(!i)return!1;const l=i[1].toLowerCase();if(!F0.includes(l)&&!t.includes(l))return!1;const c=i[2];return c.startsWith('"')&&(c.length<2||!c.endsWith('"'))?!1:Sc(c).trim().length>0}r(Iz,"isCompleteScopedToken");function Jo(e,t=IC,i=!1){const l=H0(e),c=[],u=[];return l.forEach((m,f)=>{const h=f===l.length-1;!(i&&h)&&Iz(m.raw,t)?c.push(m.raw):u.push(m.raw)}),{tokens:c,text:u.join(" ")}}r(Jo,"splitSearchInput");function Tz(e,t={}){const i=Ql(e,t).pills[0];if(i)return i;const l=/^([a-zA-Z]+):(.*)$/s.exec(e);return{key:l?.[1]?.toLowerCase()??"text",value:Sc(l?.[2]??e),label:e}}r(Tz,"searchTokenPill");function ih(e){return K_(e)??e.trim().toLowerCase()}r(ih,"normalizedLookup");function nd(e,t){const i=ih(t);return e?.find(l=>l.id===t||ih(l.name)===i?!0:l.urlKey?ih(l.urlKey)===i:!1)??null}r(nd,"findByNameOrId");function Qj(e,t){return e?.includes(t)?e:[...e??[],t]}r(Qj,"addUnique");function Ns(e,t){t.trim().length>0&&e.push(t)}r(Ns,"appendText");function Rz(e){return Ic.includes(e)?e:null}r(Rz,"parseStatus");function Dz(e){return Gg.includes(e)?e:null}r(Dz,"parsePriority");function Mz(e){const t=e.startsWith(">")?e.slice(1):e;return/^[1-9]\d{0,2}(h|d|w|m)$/.test(t)?t:null}r(Mz,"parseUpdatedWithin");function ds(e,t){return`${e}:${t}`}r(ds,"operatorLabel");function Ql(e,t={}){const i=[],l={},c=[];for(const u of H0(e)){const m=/^([a-zA-Z]+):(.*)$/s.exec(u.value);if(!m){Ns(i,u.raw);continue}const f=m[1].toLowerCase(),h=m[2],g=Sc(h).trim();if(!g){Ns(i,u.raw);continue}if(F0.includes(f)){Ns(i,u.raw),c.push({key:f,value:g,label:ds(f,g)});continue}if(t.operatorKeys&&!t.operatorKeys.includes(f)){Ns(i,u.raw);continue}if(f==="status"){const v=Rz(g);if(!v){Ns(i,u.raw);continue}l.status=Qj(l.status,v),c.push({key:"status",value:v,label:ds("status",v)});continue}if(f==="priority"){const v=Dz(g);if(!v){Ns(i,u.raw);continue}l.priority=Qj(l.priority,v),c.push({key:"priority",value:v,label:ds("priority",v)});continue}if(f==="assignee"){if(g.toLowerCase()==="me"){if(t.currentAgentId){l.assigneeAgentId=t.currentAgentId,c.push({key:"assignee",value:"me",label:"assignee:me"});continue}if(t.currentUserId){l.assigneeUserId=t.currentUserId,c.push({key:"assignee",value:"me",label:"assignee:me"});continue}Ns(i,u.raw);continue}if(g.toLowerCase()==="none"){l.assigneeAgentId=null,c.push({key:"assignee",value:"none",label:"assignee:none"});continue}const v=nd(t.agents,g);if(!v){Ns(i,u.raw);continue}l.assigneeAgentId=v.id,c.push({key:"assignee",value:v.name,label:ds("assignee",v.name)});continue}if(f==="author"){if(g.toLowerCase()==="me"){if(t.currentAgentId){l.createdByAgentId=t.currentAgentId,c.push({key:"author",value:"me",label:"author:me"});continue}if(t.currentUserId){l.createdByUserId=t.currentUserId,c.push({key:"author",value:"me",label:"author:me"});continue}Ns(i,u.raw);continue}const v=nd(t.agents,g);if(!v){Ns(i,u.raw);continue}l.createdByAgentId=v.id,c.push({key:"author",value:v.name,label:ds("author",v.name)});continue}if(f==="project"){const v=nd(t.projects,g);if(!v){Ns(i,u.raw);continue}l.projectId=v.id,c.push({key:"project",value:v.name,label:ds("project",v.name)});continue}if(f==="label"){const v=nd(t.labels,g);if(v){l.labelId=v.id,c.push({key:"label",value:v.name,label:ds("label",v.name)});continue}if(zh(g)){l.labelId=g,c.push({key:"label",value:g,label:ds("label",g.slice(0,8))});continue}Ns(i,u.raw);continue}if(f==="updated"){const v=Mz(g);if(!v){Ns(i,u.raw);continue}l.updatedWithin=v,c.push({key:"updated",value:`>${v}`,label:ds("updated",`>${v}`)});continue}if(f==="is"){if(g==="open"){l.status=Nz,c.push({key:"is",value:"open",label:"is:open"});continue}if(g==="closed"){l.status=Cz,c.push({key:"is",value:"closed",label:"is:closed"});continue}Ns(i,u.raw);continue}Ns(i,u.raw)}return{query:i.join(" ").replace(/\s+/g," ").trim(),filters:l,pills:c}}r(Ql,"parseSearchQuery");function Gj(e,t,i){for(const l of i??[])e.append(t,l)}r(Gj,"appendMulti");function Oz(e){for(const t of Sz)e.delete(t)}r(Oz,"clearSearchFilterParams");function Lz(e,t){Oz(e),Gj(e,"status",t.status),Gj(e,"priority",t.priority),t.assigneeAgentId!==void 0&&e.set("assigneeAgentId",t.assigneeAgentId??"null"),t.assigneeUserId!==void 0&&e.set("assigneeUserId",t.assigneeUserId),t.projectId!==void 0&&e.set("projectId",t.projectId),t.labelId!==void 0&&e.set("labelId",t.labelId),t.updatedWithin!==void 0&&e.set("updatedWithin",t.updatedWithin),t.updatedAfter!==void 0&&e.set("updatedAfter",t.updatedAfter)}r(Lz,"applySearchFiltersToParams");function Yj(e,t){return e.filter(i=>t.includes(i))}r(Yj,"validValues");function YQ(e){const t={},i=Yj(e.getAll("status").flatMap(v=>v.split(",")),Ic),l=Yj(e.getAll("priority").flatMap(v=>v.split(",")),Gg),c=e.get("assigneeAgentId"),u=e.get("assigneeUserId"),m=e.get("projectId"),f=e.get("labelId"),h=e.get("updatedWithin"),g=e.get("updatedAfter");return i.length>0&&(t.status=i),l.length>0&&(t.priority=l),c!==null&&(t.assigneeAgentId=c==="null"?null:c),u&&(t.assigneeUserId=u),m&&zh(m)&&(t.projectId=m),f&&zh(f)&&(t.labelId=f),h&&(/^[1-9]\d{0,2}(h|d|w|m)$/.test(h)||Dk.includes(h))&&(t.updatedWithin=h),g&&!Number.isNaN(new Date(g).getTime())&&(t.updatedAfter=g),t}r(YQ,"readSearchFiltersFromParams");function TC(e){return!!(e.status?.length||e.priority?.length||e.assigneeAgentId!==void 0||e.assigneeUserId||e.projectId||e.labelId||e.updatedWithin||e.updatedAfter||e.createdByAgentId||e.createdByUserId)}r(TC,"hasSearchFilters");var zz={h:1,d:24,w:168,m:720};function RC(e,t=new Date){const i=/^(\d+)(h|d|w|m)$/.exec(e);if(!i)return null;const l=Number.parseInt(i[1],10)*zz[i[2]];return new Date(t.getTime()-l*60*60*1e3).toISOString()}r(RC,"updatedWithinToSince");function DC(e,t=new Date){const i={};e.status?.length&&(i.status=e.status.join(",")),e.priority?.length&&(i.priority=e.priority.join(",")),e.assigneeAgentId!==void 0&&(i.assigneeAgentId=e.assigneeAgentId??"null"),e.assigneeUserId&&(i.assigneeUserId=e.assigneeUserId),e.projectId&&(i.projectId=e.projectId),e.labelId&&(i.labelId=e.labelId),e.createdByAgentId&&(i.createdByAgentId=e.createdByAgentId),e.createdByUserId&&(i.createdByUserId=e.createdByUserId);const l=e.updatedAfter??(e.updatedWithin?RC(e.updatedWithin,t):null);return l&&(i.updatedSince=l),i}r(DC,"searchFiltersToIssueListParams");function Pz(e){const t={};if(e.statuses.length>0&&(t.status=e.statuses.join(",")),e.priorities.length>0&&(t.priority=e.priorities.join(",")),e.labels.length>0&&(t.labelId=e.labels.join(",")),e.projects.length===1&&(t.projectId=e.projects[0]),e.assignees.length===1){const i=e.assignees[0];i==="__me"?t.assigneeUserId="me":i!=="__unassigned"&&(t.assigneeAgentId=i)}if(e.creators.length===1){const i=e.creators[0];i.startsWith("agent:")&&(t.createdByAgentId=i.slice(6)),i.startsWith("user:")&&(t.createdByUserId=i.slice(5))}return t}r(Pz,"issueFilterStateToListParams");function MC(e){const t=[];for(const i of H0(e)){const l=/^([a-zA-Z]+):(.+)$/s.exec(i.value),c=l?.[1]?.toLowerCase();if(l&&c&&F0.includes(c)){const m=Sc(l[2]).trim().toLowerCase();m&&t.push({field:c,value:m});continue}const u=Sc(i.value).trim().toLowerCase();u&&t.push({field:null,value:u})}return t}r(MC,"localSearchTerms");function XQ(e){return MC(e).map(t=>t.value).join(" ")}r(XQ,"localSearchText");function Uz(e,t){const i=e.title.toLowerCase(),l=(e.identifier??"").toLowerCase(),c=(e.description??"").toLowerCase();return t.every(u=>u.field==="title"?i.includes(u.value):u.field==="id"?l===u.value:u.field==="desc"?c.includes(u.value):i.includes(u.value)||l.includes(u.value)||c.includes(u.value))}r(Uz,"issueMatchesLocalSearchTerms");function $z(e,t,i=new Date){if(t.status?.length&&!t.status.includes(e.status)||t.priority?.length&&!t.priority.includes(e.priority)||t.assigneeAgentId!==void 0&&(e.assigneeAgentId??null)!==t.assigneeAgentId||t.assigneeUserId&&e.assigneeUserId!==t.assigneeUserId||t.projectId&&e.projectId!==t.projectId||t.labelId&&!(e.labelIds??[]).includes(t.labelId)||t.createdByAgentId&&e.createdByAgentId!==t.createdByAgentId||t.createdByUserId&&e.createdByUserId!==t.createdByUserId)return!1;const l=t.updatedAfter??(t.updatedWithin?RC(t.updatedWithin,i):null);return!(l&&new Date(e.updatedAt).getTime()<new Date(l).getTime())}r($z,"issueMatchesSearchFilters");function rh(e,t){return e?.find(i=>i.id===t)?.name??t.slice(0,8)}r(rh,"nameForId");function ZQ(e,t={}){const i=[];for(const l of e.status??[])i.push({key:"status",value:l,label:ds("status",l)});for(const l of e.priority??[])i.push({key:"priority",value:l,label:ds("priority",l)});if(e.assigneeAgentId!==void 0){const l=e.assigneeAgentId===null?"unassigned":rh(t.agents,e.assigneeAgentId);i.push({key:"assignee",value:l,label:ds("assignee",l)})}if(e.assigneeUserId){const l=e.assigneeUserId===t.currentUserId?"me":e.assigneeUserId.slice(0,8);i.push({key:"assignee",value:l,label:ds("assignee",l)})}if(e.projectId){const l=rh(t.projects,e.projectId);i.push({key:"project",value:l,label:ds("project",l)})}if(e.labelId){const l=rh(t.labels,e.labelId);i.push({key:"label",value:l,label:ds("label",l)})}return e.updatedWithin&&i.push({key:"updated",value:`>${e.updatedWithin}`,label:ds("updated",`>${e.updatedWithin}`)}),e.updatedAfter&&i.push({key:"updated",value:e.updatedAfter,label:ds("updated",e.updatedAfter)}),i}r(ZQ,"searchFilterPills");function Bz(e,t={}){const i=Ql(e,t),l=new URLSearchParams;i.query.length>0&&l.set("q",i.query),Lz(l,i.filters);const c=l.toString();return c?`/search?${c}`:"/search"}r(Bz,"buildSearchPathFromQuery");var Kz="__wardmote-search-all__";function qz(e,t={}){return Bz(e,t)}r(qz,"buildFullSearchPath");var Fz=/\/issues\/[^/?#]+(?:$|\?|#|\/)/;function Hz(e){return Fz.test(e)}r(Hz,"isOnIssueDetail");var Vz=5,Wz=6,Qz=10,Xj=20,Gz=250;function Yz(e,t){let i=0;for(let l=0;l<t.length&&i<e.length;l+=1)t[l]===e[i]&&(i+=1);return i===e.length}r(Yz,"isSubsequence");function Xz(e,t,i){if(e===i)return 1e3;if(e.startsWith(i))return Math.max(700,900-e.length);const l=e.indexOf(i);return l>=0?700-l:t.includes(i)?400:Yz(i,e)?200:null}r(Xz,"scoreProjectMatch");function Zz(){const[e,t]=(0,x.useState)(!1),[i,l]=(0,x.useState)(""),[c,u]=(0,x.useState)(""),m=bs(),f=vn(),{selectedCompanyId:h}=vt(),{openNewIssue:g,openNewAgent:v}=Pa(),{isMobile:y,setSidebarOpen:j}=Jn(),k=i.trim(),S=Hz(f.pathname),{enabled:N}=Of(),{hidden:_}=lr(),I=!_.has("instance.experimental"),{data:D}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn"),enabled:e});(0,x.useEffect)(()=>{function he(De){De.key==="k"&&(De.metaKey||De.ctrlKey)&&(De.preventDefault(),t(!0),y&&j(!1))}return r(he,"handleKeyDown"),document.addEventListener("keydown",he),()=>document.removeEventListener("keydown",he)},[y,j]),(0,x.useEffect)(()=>{e||l("")},[e]),(0,x.useEffect)(()=>{if(i.trim().length===0){u("");return}const he=window.setTimeout(()=>u(i),Gz);return()=>window.clearTimeout(he)},[i]);const{data:T=[]}=ge({queryKey:U.agents.list(h),queryFn:r(()=>$s.list(h),"queryFn"),enabled:!!h&&e}),{data:C=[]}=ge({queryKey:U.projects.list(h),queryFn:r(()=>rr.list(h),"queryFn"),enabled:!!h&&e}),M=(0,x.useMemo)(()=>C,[C]),{data:z=[]}=ge({queryKey:U.issues.labels(h),queryFn:r(()=>hn.listLabels(h),"queryFn"),enabled:!!h&&e}),{data:K}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),enabled:e}),P=K?.user?.id??K?.session?.userId??null,A=(0,x.useMemo)(()=>({currentUserId:P,agents:T,projects:M,labels:z}),[T,P,z,M]),B=(0,x.useMemo)(()=>Ql(i,A),[A,i]).query.trim(),O=(0,x.useMemo)(()=>Ql(c,A),[c,A]),W=O.query.trim(),Y=(0,x.useMemo)(()=>DC(O.filters),[O.filters]),ce=W.length>0||TC(O.filters),{data:oe=[]}=ge({queryKey:[...U.issues.list(h),"command-palette-recent",Xj],queryFn:r(()=>hn.listCompact(h,{limit:Xj,sortField:"updated",sortDir:"desc"}),"queryFn"),enabled:!!h&&e&&k.length===0}),{data:$=[]}=ge({queryKey:[...U.issues.search(h,W,void 0,10),Y],queryFn:r(()=>hn.listCompact(h,{...Y,...W.length>0?{q:W}:{},limit:10,includeRoutineExecutions:!0}),"queryFn"),enabled:!!h&&e&&ce,placeholderData:r(he=>he,"placeholderData")});function R(he){t(!1),m(he)}r(R,"go");function ne(){R(qz(k,A))}r(ne,"goFullSearch");const ue=r(he=>he?T.find(De=>De.id===he)?.name??null:null,"agentName"),ae=(0,x.useMemo)(()=>k.length===0?oe:ce?$:[],[oe,ce,$,k]),Ee=(0,x.useMemo)(()=>{if(B.length===0)return[];const he=B.toLowerCase();return M.map(De=>({project:De,score:Xz(De.name.toLowerCase(),(De.description??"").toLowerCase(),he)})).filter(De=>De.score!==null).sort((De,Ye)=>Ye.score-De.score).slice(0,Vz).map(De=>De.project)},[M,B]),fe=k.length>0,Ae=fe&&Ee.length>0,Ce=Ae?Wz:Qz,Se=fe&&ae.length===0&&Ee.length===0;return(0,s.jsxs)(H3,{open:e,onOpenChange:r(he=>{t(he),he&&y&&j(!1)},"onOpenChange"),children:[(0,s.jsx)(b0,{placeholder:"Search tasks, agents, projects...",value:i,onValueChange:l,onKeyDown:r(he=>{if(he.key==="Enter"&&(he.metaKey||he.ctrlKey)){he.preventDefault(),ne();return}he.key==="Enter"&&Se&&(he.preventDefault(),ne())},"onKeyDown")}),(0,s.jsxs)(y0,{children:[(0,s.jsx)(v0,{children:fe?(0,s.jsxs)("span",{children:["No quick task matches. Press"," ",(0,s.jsx)("kbd",{className:"rounded border border-line bg-bg-3 px-1 py-0.5 text-(length:--text-nano)",children:"↵"})," ","to ",(0,s.jsx)("span",{className:"font-medium",children:"search all"})," or keep typing to refine."]}):"No results found."}),fe?(0,s.jsx)(Wa,{heading:"Search",children:(0,s.jsxs)(jn,{value:`${Kz} ${k}`,onSelect:ne,className:"bg-bg-3/40 border border-bg-3 data-[selected=true]:bg-bg-3/60","data-testid":"command-search-all",children:[(0,s.jsx)(Kr,{className:"mr-2 h-4 w-4"}),(0,s.jsxs)("span",{className:"flex-1 truncate",children:["Search all for ",(0,s.jsxs)("span",{className:"font-semibold",children:["“",k,"”"]})]}),(0,s.jsxs)("span",{className:"ml-auto inline-flex items-center gap-1 text-xs text-ink-3",children:[(0,s.jsx)("span",{children:"open full search"}),(0,s.jsx)("kbd",{className:"rounded border border-line bg-bg px-1 py-0.5 text-(length:--text-nano)",children:"↵"})]})]})}):null,fe?(0,s.jsx)(Xi,{}):null,(0,s.jsx)(Wa,{heading:"Quick filters",children:_z.map(he=>(0,s.jsxs)(jn,{value:`quick-filter ${he}`,onSelect:r(()=>l(De=>De.trim()?`${De.trim()} ${he}`:he),"onSelect"),"data-testid":"command-filter-chip",children:[(0,s.jsx)(Kr,{className:"mr-2 h-4 w-4"}),(0,s.jsx)("span",{className:"font-mono text-xs",children:he})]},he))}),(0,s.jsx)(Xi,{}),Ae&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Wa,{heading:"Projects",children:Ee.map(he=>(0,s.jsxs)(jn,{value:`${k} ${he.name}`,onSelect:r(()=>R(jy(he)),"onSelect"),"data-testid":"command-project-match",children:[(0,s.jsx)(Pp,{className:"mr-2 h-4 w-4 shrink-0"}),(0,s.jsx)("span",{className:"min-w-0 truncate",children:he.name}),he.description?(0,s.jsx)("span",{className:"ml-2 hidden min-w-0 flex-1 truncate text-xs text-ink-3 sm:inline",children:he.description}):null]},he.id))}),(0,s.jsx)(Xi,{})]}),(0,s.jsxs)(Wa,{heading:"Actions",children:[(0,s.jsxs)(jn,{onSelect:r(()=>{t(!1),g()},"onSelect"),children:[(0,s.jsx)(C0,{className:"mr-2 h-4 w-4"}),"Create new task",(0,s.jsx)("span",{className:"ml-auto text-xs text-ink-3",children:"C"})]}),S&&(0,s.jsxs)(jn,{onSelect:r(()=>{t(!1),window.dispatchEvent(new CustomEvent("wardmote:open-file-viewer"))},"onSelect"),children:[(0,s.jsx)(vS,{className:"mr-2 h-4 w-4"}),"Open file in this issue...",(0,s.jsx)("span",{className:"ml-auto text-xs text-ink-3",children:"g f"})]}),(0,s.jsxs)(jn,{onSelect:r(()=>{t(!1),v()},"onSelect"),children:[(0,s.jsx)(Js,{className:"mr-2 h-4 w-4"}),"Create new agent"]}),(0,s.jsxs)(jn,{onSelect:r(()=>R("/projects"),"onSelect"),children:[(0,s.jsx)(Js,{className:"mr-2 h-4 w-4"}),"Create new project"]})]}),(0,s.jsx)(Xi,{}),(0,s.jsxs)(Wa,{heading:"Pages",children:[(0,s.jsxs)(jn,{onSelect:r(()=>R("/dashboard"),"onSelect"),children:[(0,s.jsx)(f0,{className:"mr-2 h-4 w-4"}),"Dashboard"]}),(0,s.jsxs)(jn,{onSelect:r(()=>R(N?"/issues?view=mine":"/inbox"),"onSelect"),children:[(0,s.jsx)(u0,{className:"mr-2 h-4 w-4"}),N?"My work":"Inbox"]}),(0,s.jsxs)(jn,{onSelect:r(()=>R("/issues"),"onSelect"),children:[(0,s.jsx)(Ld,{className:"mr-2 h-4 w-4"}),"Tasks"]}),(0,s.jsxs)(jn,{onSelect:r(()=>R("/projects"),"onSelect"),children:[(0,s.jsx)(Pp,{className:"mr-2 h-4 w-4"}),"Projects"]}),(0,s.jsxs)(jn,{onSelect:r(()=>R("/goals"),"onSelect"),children:[(0,s.jsx)(r0,{className:"mr-2 h-4 w-4"}),"Goals"]}),(0,s.jsxs)(jn,{onSelect:r(()=>R("/agents"),"onSelect"),children:[(0,s.jsx)(hc,{className:"mr-2 h-4 w-4"}),"Agents"]}),(0,s.jsxs)(jn,{onSelect:r(()=>R("/costs"),"onSelect"),children:[(0,s.jsx)(ZS,{className:"mr-2 h-4 w-4"}),"Costs"]}),(0,s.jsxs)(jn,{onSelect:r(()=>R("/activity"),"onSelect"),children:[(0,s.jsx)(N0,{className:"mr-2 h-4 w-4"}),"Activity"]}),D?.enablePixelsOffice===!0?(0,s.jsxs)(jn,{onSelect:r(()=>R("/pixels-office"),"onSelect"),children:[(0,s.jsx)(zT,{className:"mr-2 h-4 w-4"}),"Pixels Office"]}):null,D?.enableConferenceRoomChat===!0?(0,s.jsxs)(jn,{onSelect:r(()=>R("/board-chat"),"onSelect"),children:[(0,s.jsx)(VT,{className:"mr-2 h-4 w-4"}),"Conference Room"]}):null,I?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(jn,{onSelect:r(()=>R("/company/settings/instance/features"),"onSelect"),children:[(0,s.jsx)(q1,{className:"mr-2 h-4 w-4"}),"Features"]}),(0,s.jsxs)(jn,{onSelect:r(()=>R("/company/settings/instance/advanced"),"onSelect"),children:[(0,s.jsx)(a0,{className:"mr-2 h-4 w-4"}),"Advanced settings"]})]}):null]}),ae.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Xi,{}),(0,s.jsx)(Wa,{heading:"Tasks",children:ae.slice(0,Ce).map(he=>(0,s.jsxs)(jn,{value:k.length>0?`${k} ${he.identifier??""} ${he.title}`:void 0,onSelect:r(()=>R(`/issues/${he.identifier??he.id}`),"onSelect"),children:[(0,s.jsx)(Ld,{className:"mr-2 h-4 w-4"}),(0,s.jsx)("span",{className:"text-ink-3 mr-2 font-mono text-xs",children:he.identifier??he.id.slice(0,8)}),(0,s.jsx)("span",{className:"flex-1 truncate",children:he.title}),he.assigneeAgentId&&(()=>{const De=ue(he.assigneeAgentId);return De?(0,s.jsx)(Wl,{agent:T?.find(Ye=>Ye.id===he.assigneeAgentId)??{id:he.assigneeAgentId,name:De},size:"sm",className:"ml-2 hidden sm:inline-flex"}):null})()]},he.id))})]}),T.length>0&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Xi,{}),(0,s.jsx)(Wa,{heading:"Agents",children:T.slice(0,10).map(he=>(0,s.jsxs)(jn,{onSelect:r(()=>R(jd(he)),"onSelect"),children:[(0,s.jsx)(hc,{className:"mr-2 h-4 w-4"}),he.name,(0,s.jsx)("span",{className:"text-xs text-ink-3 ml-2",children:he.role})]},he.id))})]}),M.length>0&&!fe&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Xi,{}),(0,s.jsx)(Wa,{heading:"Projects",children:M.slice(0,10).map(he=>(0,s.jsxs)(jn,{onSelect:r(()=>R(jy(he)),"onSelect"),children:[(0,s.jsx)(Pp,{className:"mr-2 h-4 w-4"}),he.name]},he.id))})]})]})]})}r(Zz,"CommandPalette");function Jz(){const{hidden:e,loaded:t}=lr();return{visible:t&&!e.has("workspaces.isolation"),loaded:t}}r(Jz,"useWorkspaceIsolationControls");function eP(e){return{...e,items:e.items.map(t=>({...t,lastUpdatedAt:new Date(t.lastUpdatedAt),primaryService:t.primaryService?{...t.primaryService,updatedAt:new Date(t.primaryService.updatedAt)}:null,linkedIssues:t.linkedIssues.map(i=>({...i,updatedAt:new Date(i.updatedAt)}))}))}}r(eP,"normalizeWorkspaceOverview");var Lf={listOverview:r(async(e,t)=>{const i=new URLSearchParams;t?.projectId&&i.set("projectId",t.projectId),t?.status?.length&&i.set("status",t.status.join(",")),t?.limit!==void 0&&i.set("limit",String(t.limit)),t?.offset!==void 0&&i.set("offset",String(t.offset));const l=i.toString();return eP(await we.get(`/companies/${e}/workspace-overview${l?`?${l}`:""}`))},"listOverview"),listSummaries:r((e,t)=>{const i=new URLSearchParams;t?.projectId&&i.set("projectId",t.projectId),t?.projectWorkspaceId&&i.set("projectWorkspaceId",t.projectWorkspaceId),t?.issueId&&i.set("issueId",t.issueId),t?.status&&i.set("status",t.status),t?.reuseEligible&&i.set("reuseEligible","true"),i.set("summary","true");const l=i.toString();return we.get(`/companies/${e}/execution-workspaces${l?`?${l}`:""}`)},"listSummaries"),list:r((e,t)=>{const i=new URLSearchParams;t?.projectId&&i.set("projectId",t.projectId),t?.projectWorkspaceId&&i.set("projectWorkspaceId",t.projectWorkspaceId),t?.issueId&&i.set("issueId",t.issueId),t?.status&&i.set("status",t.status),t?.reuseEligible&&i.set("reuseEligible","true");const l=i.toString();return we.get(`/companies/${e}/execution-workspaces${l?`?${l}`:""}`)},"list"),get:r(e=>we.get(`/execution-workspaces/${e}`),"get"),getCloseReadiness:r(e=>we.get(`/execution-workspaces/${e}/close-readiness`),"getCloseReadiness"),listWorkspaceOperations:r(e=>we.get(`/execution-workspaces/${e}/workspace-operations`),"listWorkspaceOperations"),controlRuntimeServices:r((e,t,i={})=>we.post(`/execution-workspaces/${e}/runtime-services/${t}`,Ry(i)),"controlRuntimeServices"),controlRuntimeCommands:r((e,t,i={})=>we.post(`/execution-workspaces/${e}/runtime-commands/${t}`,Ry(i)),"controlRuntimeCommands"),repair:r(e=>we.post(`/execution-workspaces/${e}/runtime-commands/repair`,{}),"repair"),requestLoginHandoff:r((e,t)=>we.post(`/execution-workspaces/${e}/login-handoff`,t?{next:t}:{}),"requestLoginHandoff"),update:r((e,t)=>we.patch(`/execution-workspaces/${e}`,t),"update"),reconcile:r((e,t)=>we.post(`/execution-workspaces/${e}/reconcile-branch`,t),"reconcile")},tP="text-violet-700 dark:text-violet-300",nP="border-violet-500/30",sP="bg-violet-500/10";function aP({className:e,label:t="User secret"}){return(0,s.jsxs)(Bn,{variant:"outline",className:X("text-(length:--text-micro)",nP,sP,tP,e),children:[(0,s.jsx)(ZI,{className:"h-3 w-3"}),t]})}r(aP,"UserSecretChip");function JQ(e){switch(e){case"set":return"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300";case"not_set":return"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300";case"inactive":return"border-bg-3 bg-bg-3 text-ink-3"}}r(JQ,"myValueTone");function eG(e){switch(e){case"set":return"Value set";case"not_set":return"Not set";case"inactive":return"Disabled"}}r(eG,"myValueLabel");function tG(e){if(!e)return"—";const t=e.configuredCount+e.missingCount+e.inactiveCount;return`${e.configuredCount} of ${t} set`}r(tG,"coverageSummaryLabel");function iP({companyId:e,definition:t,existingSecret:i,open:l,onOpenChange:c,onSaved:u}){const m=wn(),{pushToast:f}=Ni(),[h,g]=(0,x.useState)(""),[v,y]=(0,x.useState)(""),[j,k]=(0,x.useState)(null),S=t?.managedMode==="external_reference";(0,x.useEffect)(()=>{l&&(g(""),y(""),k(null))},[l,t?.id]);const N=Kt({mutationFn:r(async()=>{if(!t)throw new Error("No definition selected");const I=S?{externalRef:v.trim()}:{value:h.trim()};return i?Yh.rotateMyUserSecret(e,i.id,I):Yh.createMyUserSecret(e,{definitionId:t.id,definitionKey:t.key,...I})},"mutationFn"),onSuccess:r(I=>{m.invalidateQueries({queryKey:U.secrets.myUserSecrets(e)}),m.invalidateQueries({queryKey:U.secrets.userDefinitions(e)}),f({title:i?"Value updated":"Value saved",body:t?.name,tone:"success"}),u?.(I),c(!1)},"onSuccess"),onError:r(I=>{k(I instanceof Si||I instanceof Error?I.message:"Failed to save value")},"onError")}),_=S?v.trim().length>0:h.trim().length>0;return(0,s.jsx)(ya,{open:l,onOpenChange:c,children:(0,s.jsxs)(za,{children:[(0,s.jsxs)(Jl,{children:[(0,s.jsxs)(Da,{className:"flex items-center gap-2",children:[i?"Update your value":"Set your value",(0,s.jsx)(aP,{})]}),(0,s.jsx)(eo,{children:t?(0,s.jsxs)(s.Fragment,{children:["This value is yours only. It is used when you are the user responsible for a run that needs ",(0,s.jsx)("span",{className:"font-mono",children:t.key}),"."]}):null})]}),t?(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("div",{className:"rounded-md border border-line bg-bg-3/20 p-3 text-xs",children:[(0,s.jsx)("div",{className:"font-medium text-ink",children:t.name}),t.description?(0,s.jsx)("p",{className:"mt-1 text-ink-3",children:t.description}):null,t.usageGuidance?(0,s.jsx)("p",{className:"mt-1 text-ink-3",children:t.usageGuidance}):null]}),S?(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("label",{className:"text-xs font-medium text-ink",children:"External reference"}),(0,s.jsx)(Wn,{value:v,onChange:r(I=>y(I.target.value),"onChange"),placeholder:"provider reference or ARN",className:"font-mono text-sm",autoFocus:!0}),(0,s.jsx)("p",{className:"text-(length:--text-micro) text-ink-3",children:"Points at your own credential in the configured provider. Wardmote stores the reference, not the value."})]}):(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("label",{className:"text-xs font-medium text-ink",children:"Your value"}),(0,s.jsx)(RS,{value:h,onChange:r(I=>g(I.target.value),"onChange"),placeholder:"Paste your token or credential",className:"font-mono text-sm min-h-(--sz-80px)",autoFocus:!0}),(0,s.jsx)("p",{className:"text-(length:--text-micro) text-ink-3",children:"Stored encrypted. Never shown back to anyone, including admins."})]}),j?(0,s.jsx)("p",{className:"text-xs text-bad",children:j}):null]}):null,(0,s.jsxs)(jf,{children:[(0,s.jsx)(le,{variant:"ghost",onClick:r(()=>c(!1),"onClick"),disabled:N.isPending,children:"Cancel"}),(0,s.jsx)(le,{onClick:r(()=>N.mutate(),"onClick"),disabled:!_||N.isPending,children:N.isPending?"Saving…":i?"Update value":"Save value"})]})]})})}r(iP,"SetMyUserSecretDialog");function rP({companyId:e,definitionKeys:t,title:i="Set your user secrets",secretsPath:l,className:c}){const[u,m]=(0,x.useState)(null),f=ge({queryKey:U.secrets.myUserSecrets(e),queryFn:r(()=>Yh.listMyUserSecrets(e),"queryFn"),retry:!1}),h=t?new Set(t):null,g=(f.data??[]).filter(v=>v.definition.status==="active"&&!v.secret&&(!h||h.has(v.definition.key)));return g.length===0?null:(0,s.jsxs)("div",{className:"rounded-md border border-amber-500/40 bg-amber-500/5 p-3 text-xs text-amber-800 dark:text-amber-200"+(c?` ${c}`:""),children:[(0,s.jsxs)("div",{className:"flex items-start gap-2",children:[(0,s.jsx)(Ja,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"font-medium",children:i}),(0,s.jsxs)("p",{className:"mt-0.5 text-amber-700/90 dark:text-amber-300/90",children:[g.length," user secret",g.length===1?"":"s"," you are responsible for",g.length===1?" has":" have"," no value yet. Runs that require",g.length===1?" it":" them"," will fail until you set your value."]}),(0,s.jsx)("ul",{className:"mt-2 space-y-1.5",children:g.map(v=>(0,s.jsxs)("li",{className:"flex items-center justify-between gap-2 rounded border border-amber-500/30 bg-bg/40 px-2 py-1",children:[(0,s.jsxs)("span",{className:"min-w-0 truncate",children:[(0,s.jsx)("span",{className:"font-medium text-ink",children:v.definition.name})," ",(0,s.jsx)("code",{className:"text-(length:--text-micro) text-ink-3",children:v.definition.key})]}),(0,s.jsx)(le,{size:"sm",onClick:r(()=>m(v),"onClick"),children:"Set value"})]},v.definition.id))}),l?(0,s.jsx)(sE,{to:l,className:"mt-2 inline-block text-(length:--text-micro) font-medium underline underline-offset-2",children:"Manage all my secrets"}):null]})]}),(0,s.jsx)(iP,{companyId:e,definition:u?.definition??null,existingSecret:u?.secret??null,open:u!==null,onOpenChange:r(v=>{v||m(null)},"onOpenChange")})]})}r(rP,"MissingUserSecretsBanner");function lP(e){return e==="local-board"?"Board":e.slice(0,5)}r(lP,"fallbackUserLabel");function Gl(e){const t=e.user?.name?.trim();if(t)return t;const i=e.user?.email?.trim();return i||lP(e.principalId)}r(Gl,"baseMemberLabel");function OC(e){const t=new Map;for(const i of e??[])i.status==="active"&&(t.has(i.principalId)||t.set(i.principalId,i));return[...t.values()].sort((i,l)=>Gl(i).localeCompare(Gl(l)))}r(OC,"activeUniqueMembers");function oP(e){const t=new Map;for(const i of e??[])t.set(i.principalId,Gl(i));return t}r(oP,"buildCompanyUserLabelMap");function cP(e){const t=new Map;for(const i of e??[])t.set(i.principalId,{label:Gl(i),image:i.user?.image??null});return t}r(cP,"buildCompanyUserProfileMap");function LC(e,t){const i=new Set([...t?.excludeUserIds??[]].filter(l=>!!l));return OC(e).filter(l=>!i.has(l.principalId)).map(l=>({id:`user:${l.principalId}`,label:Gl(l),searchText:[l.user?.name,l.user?.email,l.principalId].filter(Boolean).join(" ")}))}r(LC,"buildCompanyUserInlineOptions");function uP(e){return OC(e).map(t=>({id:`user:${t.principalId}`,name:Gl(t),kind:"user",userId:t.principalId}))}r(uP,"buildCompanyUserMentionOptions");function mg(e){return e.status!=="terminated"&&e.status!=="pending_approval"&&e.orgChainHealth?.status!=="invalid_org_chain"}r(mg,"isAgentTaskTarget");function dP(e){const t=[];for(const i of e??[]){const l=i.identifier?.trim();if(!l)continue;const c=i.title?.trim()??"";t.push({id:`issue:${i.id}`,name:c?`${l} ${c}`:l,kind:"issue",issueId:i.id,issueIdentifier:l})}return t}r(dP,"buildIssueMentionOptions");function fP(e){return[...uP(e.members),...[...e.agents??[]].filter(mg).sort((t,i)=>t.name.localeCompare(i.name)).map(t=>({id:`agent:${t.id}`,name:t.name,kind:"agent",agentId:t.id,agentIcon:t.icon,agentAppearance:t.appearance})),...[...e.projects??[]].sort((t,i)=>t.name.localeCompare(i.name)).map(t=>({id:`project:${t.id}`,name:t.name,kind:"project",projectId:t.id,projectColor:t.color})),...dP(e.issues)]}r(fP,"buildMarkdownMentionOptions");function Dr(e){return e?e.executionWorkspacePolicy?.defaultProjectWorkspaceId??e.workspaces?.find(t=>t.isPrimary)?.id??e.workspaces?.[0]?.id??"":""}r(Dr,"defaultProjectWorkspaceIdForProject");function Nd(e){const t=e?.executionWorkspacePolicy?.enabled?e.executionWorkspacePolicy.defaultMode:null;return t==="isolated_workspace"||t==="operator_branch"||t==="adapter_default"?t==="adapter_default"?"agent_default":t:"shared_workspace"}r(Nd,"defaultExecutionWorkspaceModeForProject");function mP(e){return e==="isolated_workspace"||e==="operator_branch"||e==="shared_workspace"?e:e==="adapter_managed"||e==="cloud_sandbox"?"agent_default":"shared_workspace"}r(mP,"issueExecutionWorkspaceModeForExistingWorkspace");function zC(e,t){if(e.length===0)return[];if(t.length===0)return e;const i=new Map(e.map(c=>[c.id,c])),l=[];for(const c of t){const u=i.get(c);u&&(l.push(u),i.delete(c))}for(const c of i.values())l.push(c);return l}r(zC,"sortProjectsByStoredOrder");function Zj(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;i+=1)if(e[i]!==t[i])return!1;return!0}r(Zj,"areEqual");function Jj(e,t){return zC(e,t).map(i=>i.id)}r(Jj,"buildOrderIds");function PC({projects:e,companyId:t,userId:i}){const l=wn(),c=(0,x.useMemo)(()=>U.sidebarPreferences.projectOrder(t??"__none__",i??"__anon__"),[t,i]),{data:u}=ge({queryKey:c,queryFn:r(()=>Ud.getProjectOrder(t),"queryFn"),enabled:!!(t&&i)}),[m,f]=(0,x.useState)(()=>Jj(e,[]));(0,x.useEffect)(()=>{const g=Jj(e,u?.orderedIds??[]);f(v=>Zj(v,g)?v:g)},[u?.orderedIds,e]);const h=Kt({mutationFn:r(g=>Ud.updateProjectOrder(t,{orderedIds:g}),"mutationFn"),onSuccess:r(g=>{l.setQueryData(c,g)},"onSuccess")});return{orderedProjects:(0,x.useMemo)(()=>zC(e,m),[e,m]),orderedIds:m,persistOrder:(0,x.useCallback)(g=>{const v=new Set(e.map(j=>j.id)),y=g.filter(j=>v.has(j));for(const j of e)y.includes(j.id)||y.push(j.id);f(j=>Zj(j,y)?j:y),!(!t||!i)&&(l.setQueryData(c,j=>({orderedIds:y,updatedAt:j?.updatedAt??null})),h.mutate(y))},[t,h,e,l,c,i])}}r(PC,"useProjectOrder");var Zd="wardmote:recent-projects";function pg(){return V3(Zd)}r(pg,"getRecentProjectIds");function pP(e){try{return localStorage.getItem(`${Zd}:${e}`)??void 0}catch{return}}r(pP,"getLastProjectId");function Jd(e,t){if(W3(Zd,e),t)try{localStorage.setItem(`${Zd}:${t}`,e)}catch{}}r(Jd,"trackRecentProject");function ef(){const e=globalThis.crypto;if(typeof e?.randomUUID=="function")return e.randomUUID();const t=new Uint8Array(16);if(typeof e?.getRandomValues=="function")e.getRandomValues(t);else for(let l=0;l<t.length;l++)t[l]=Math.floor(Math.random()*256);t[6]=t[6]&15|64,t[8]=t[8]&63|128;const i=Array.from(t,l=>l.toString(16).padStart(2,"0"));return[i.slice(0,4).join(""),i.slice(4,6).join(""),i.slice(6,8).join(""),i.slice(8,10).join(""),i.slice(10).join("")].join("-")}r(ef,"createUuid");var hP=Z_.nullable();function UC(e){return hP.safeParse(e??null)}r(UC,"readExecutionPolicy");function ew(e){return e.type==="agent"?`agent:${e.agentId}`:`user:${e.userId}`}r(ew,"principalKey");function gP(e){const t=ql(e);return t.assigneeAgentId?{type:"agent",agentId:t.assigneeAgentId,userId:null}:t.assigneeUserId?{type:"user",userId:t.assigneeUserId,agentId:null}:null}r(gP,"principalFromSelectionValue");function xP(e){return e.type==="agent"?`agent:${e.agentId}`:`user:${e.userId}`}r(xP,"selectionValueFromPrincipal");function nG(e,t){const i=UC(e);return i.success?i.data?.stages.find(l=>l.type===t)?.participants.map(l=>xP(l))??[]:[]}r(nG,"stageParticipantValues");function tw(e,t){const i=new Map((e??[]).map(c=>[ew(c),c])),l=[];for(const c of t){const u=gP(c);if(!u)continue;const m=ew(u),f=i.get(m);l.push({id:f?.id??ef(),type:u.type,agentId:u.type==="agent"?u.agentId??null:null,userId:u.type==="user"?u.userId??null:null})}return l}r(tw,"mergeParticipants");function bP(e){const t=UC(e.existingPolicy);if(!t.success)throw new Error("Execution policy is unavailable");const i=t.data,l=i?.mode??"normal",c=[],u=e.existingPolicy?.monitor??null,m=i?.stages.find(v=>v.type==="review"),f=tw(m?.participants,e.reviewerValues);f.length>0&&c.push({id:m?.id??ef(),type:"review",approvalsNeeded:1,participants:f});const h=i?.stages.find(v=>v.type==="approval"),g=tw(h?.participants,e.approverValues);return g.length>0&&c.push({id:h?.id??ef(),type:"approval",approvalsNeeded:1,participants:g}),c.length===0&&!u&&!i?.authorizationPolicy&&!i?.reviewPreset&&i?.maxReviewRounds==null?null:{...e.existingPolicy,mode:l,commentRequired:!0,stages:c,...u?{monitor:u}:{}}}r(bP,"buildExecutionPolicy");function vP({className:e,...t}){return(0,s.jsx)("div",{className:X("relative z-0 mx-3 -mb-px overflow-hidden rounded-t-xl rounded-b-none border border-b-0 border-line/75 bg-bg-2 shadow-sm",e),...t})}r(vP,"TaskChatComposerBar");function yP(e){const t=GE(e);if(!t)return{matched:!1};const i=t.search(/\s/);if((i===-1?t:t.slice(0,i))!=="/goal")return{matched:!1};const l=i===-1?"":t.slice(i).trim();if(!l)return{matched:!0,command:{action:"focus"}};const[c,...u]=l.split(/\s+/);return["edit","pause","resume","clear"].includes(c)?u.length>0?{matched:!0,error:`/goal ${c} does not accept extra arguments.`}:{matched:!0,command:{action:c}}:{matched:!0,command:{action:"create",objective:l}}}r(yP,"parseRunnerGoalCommand");function jP(e){const t=e.trim().split(/\s+/).filter(Boolean);return t.length===0?"?":t.length===1?t[0].slice(0,2).toUpperCase():`${t[0][0]}${t[t.length-1][0]}`.toUpperCase()}r(jP,"identityInitials");function wP({assigneeValue:e,label:t,agentMap:i,userProfileMap:l,placement:c}){if(e.startsWith("agent:")){const u=e.slice(6),m=i?.get(u)?.icon??"bot";return(0,s.jsx)("span",{className:"shrink-0","data-assignee-identity":e,"data-assignee-trigger-icon":c==="trigger"?m:void 0,"data-assignee-option-icon":c==="option"?e:void 0,children:(0,s.jsx)(ir,{agent:i?.get(u)??{id:u},size:16})})}if(e.startsWith("user:")){const u=e.slice(5),m=l?.get(u),f=m?.label??t;return(0,s.jsxs)(Od,{size:"xs",className:"shrink-0","data-assignee-identity":e,"data-assignee-trigger-avatar":c==="trigger"?u:void 0,"data-assignee-option-avatar":c==="option"?e:void 0,children:[m?.image?(0,s.jsx)(Dd,{src:m.image,alt:""}):null,(0,s.jsx)(Md,{children:jP(f)})]})}return null}r(wP,"AssigneeIdentityAvatar");function kP(e,t,i){if(i)return e==="planning"?`Plan with ${t}…`:e==="ask"?`Ask ${t}…`:`Message ${t}…`;switch(e){case"planning":return`Plan with ${t} — shapes the plan doc, no code changes…`;case"ask":return`Ask ${t} a question — read-only, nothing runs…`;default:return`Message ${t} — describe what you want done…`}}r(kP,"modePlaceholder");function SP(e,t){return(e==="done"||e==="cancelled"||e==="blocked")&&t.startsWith("agent:")}r(SP,"shouldImplicitlyReopenComment");function lh(e){if(e.startsWith("agent:")){const t=e.slice(6);return t?{assigneeAgentId:t,assigneeUserId:null}:void 0}if(e.startsWith("user:")){const t=e.slice(5);return t?{assigneeAgentId:null,assigneeUserId:t}:void 0}}r(lh,"parseAssigneeValue");function nw(e){return e.replace(/[[\]]/g,"\\$&")}r(nw,"escapeMarkdownLabel");function NP({onAdd:e,creation:t,confirmedSubmissionIds:i,onStop:l,stopPending:c=!1,workMode:u,onWorkModeChange:m,disabled:f=!1,disabledReason:h,placeholder:g,onAttachImage:v,onImageUpload:y,mentions:j,enableReassign:k=!1,conversationMode:S=!1,pendingIssue:N,reassignOptions:_,agentMap:I,companyId:D,userProfileMap:T,currentAssigneeValue:C="",onPendingAssigneeChange:M,issueStatus:z,issueId:K=null,mobile:P=!1,draftKey:A,onReviewConversation:B,queuedEdit:O=null,onSaveQueuedEdit:W,onCancelQueuedEdit:Y,pause:ce=null,takeover:oe=null,pendingTakeover:$=null,runnerGoalCapability:R=null,onRunnerGoalCommand:ne,onRunnerGoalReassign:ue}){const ae=e0(),Ee=Y3(),fe=cI(l,c),[Ae,Ce]=(0,x.useState)(()=>A?Py(A):""),Se=t?t.value:Ae,[he,De]=(0,x.useState)(!1),[Ye,ze]=(0,x.useState)(!1),[ve,ft]=(0,x.useState)(()=>A?Rr(A):null),At=(0,x.useRef)(A);(0,x.useEffect)(()=>(At.current=A,ft(A?Rr(A):null),()=>{At.current=void 0}),[A]);const[xt,Pt]=(0,x.useState)(null),[de,Oe]=(0,x.useState)(!1),[qe,ut]=(0,x.useState)(null),[Vt,Wt]=(0,x.useState)(!1),[H,rn]=(0,x.useState)(null),[je,$e]=(0,x.useState)(null),[He,mt]=(0,x.useState)(u),it=t?u:He,[Qt,Rn]=(0,x.useState)(null),[Gt,Tt]=(0,x.useState)(null),Jt=gS(),kt=t?.runSettings??Jt,Qn=Jt.clear;(0,x.useEffect)(()=>{Qn()},[Qn,A,K]);const[pt,dn]=(0,x.useState)(()=>A?Ly(A).map(ie=>({...ie,id:`receipt:${ie.attachmentId}`,status:"attached"})):[]),Rt=(0,x.useRef)(pt);function ln(ie){const Ie=typeof ie=="function"?ie(Rt.current):ie;Rt.current=Ie,dn(Ie);const Le=Fe.current;Le&&Le.draftKey===A&&zy(Le.draftKey,Ie.filter(nt=>nt.status==="attached"&&nt.attachmentId).map(nt=>({...nt,inline:nt.inline===!0})),Le.attemptId)}r(ln,"setAttachments");const Dt=(0,x.useRef)(he);Dt.current=he;const ht=(0,x.useRef)(Qt);ht.current=Qt;const Mt=(0,x.useRef)(null),Re=(0,x.useRef)(null),Me=(0,x.useRef)(Se);Me.current=Se;const Fe=(0,x.useRef)(null);function St(ie){if(Me.current=ie,t){t.onChange(ie);return}Ce(ie),Pt(null);const Ie=Fe.current;!Ie||Ie.draftKey!==A||Rr(Ie.draftKey)?.attemptId!==Ie.attemptId||(yi(Ie.draftKey,ie?`${Ie.submittedBody}
|
|
9
|
-
|
|
10
|
-
${ie}`:Ie.submittedBody,Ie.attemptId),Gu(Ie.draftKey,{attemptId:Ie.attemptId,reviewed:!1,nextDraftOffset:Ie.submittedBody.length+(ie?2:0),submittedAttachmentIds:Ie.submittedAttachmentIds}))}r(St,"changeBody");const at=(0,x.useRef)(null),Ot=(0,x.useRef)(O);Ot.current=O;const on=(0,x.useRef)(null),Ut=(0,x.useRef)(null);(0,x.useEffect)(()=>{Oe(!1),ut(null)},[oe?.id]),(0,x.useEffect)(()=>{const ie=Ut.current,Ie=O,Le=Ie?.commentId??null;if(Ie&&ie!==Le)on.current||(on.current={body:Me.current,attachments:Rt.current,pendingMode:it,pendingAssignee:ht.current},A&&yi(A,Me.current)),at.current&&(clearTimeout(at.current),at.current=null),Me.current=Ie.body,Ce(Ie.body),ln([]),requestAnimationFrame(()=>Re.current?.focus());else if(!Le&&ie){const nt=on.current;nt&&(Me.current=nt.body,Ce(nt.body),ln(nt.attachments),mt(nt.pendingMode),Rn(nt.pendingAssignee),A&&yi(A,nt.body)),on.current=null,requestAnimationFrame(()=>Re.current?.focus())}Ut.current=Le},[A,it,O]),(0,x.useEffect)(()=>{!A||O||(Me.current=Py(A),Ce(Me.current))},[A,O]),(0,x.useEffect)(()=>{A&&ln(Ly(A).map(ie=>({...ie,id:`receipt:${ie.attachmentId}`,status:"attached"})))},[A]),(0,x.useEffect)(()=>{!A||O||he||ve||pt!==Rt.current||zy(A,pt.filter(ie=>ie.status==="attached"&&ie.attachmentId).map(ie=>({attachmentId:ie.attachmentId,name:ie.name,size:ie.size,inline:ie.inline===!0,contentPath:ie.contentPath})))},[pt,A,O,he]),(0,x.useEffect)(()=>{if(!A||O||he){at.current&&(clearTimeout(at.current),at.current=null);return}at.current&&clearTimeout(at.current),at.current=setTimeout(()=>{yi(A,Se)},800)},[Se,A,O,he]),(0,x.useEffect)(()=>()=>{at.current&&clearTimeout(at.current),A&&!Ot.current&&!Dt.current&&yi(A,Me.current)},[A]),(0,x.useEffect)(()=>{if(!A)return;const ie=r(()=>{!Ot.current&&!Dt.current&&yi(A,Me.current)},"flushDraft");return window.addEventListener("beforeunload",ie),()=>window.removeEventListener("beforeunload",ie)},[A]);const en=!ce&&!O&&!ve&&!!(t||v||y),tn=!!(k&&_&&_.length>0),fn=t?C:Qt??C,An=_?.find(ie=>ie.id===fn)?.label??"Unassigned",Dn=O?"Edit queued message…":g??kP(it,An==="Unassigned"?"the agent":An,P),ta=R?.availability!=="available",ms={id:"action:goal",kind:"action",command:"goal",name:"Goal",description:!R||R.verified===!1?"Support will be verified when the session starts.":"Pursue work across turns.",aliases:["goal","pursue","continue"],disabled:ta&&R!==null,disabledReason:R?.reason??"Session goals are unsupported by this agent."};function Is(ie){if(!t&&ie&&D){const Ie=lh(ie);Ie?.assigneeAgentId&&Bd(Ie.assigneeAgentId,D),Ie?.assigneeUserId&&$d(Ie.assigneeUserId,D)}Rn(ie),M?.(ie)}r(Is,"updatePendingAssignee");function na(ie){mt(ie),t&&m?.(ie)}r(na,"changeMode");async function ps(ie){const Ie=crypto.randomUUID();ln(Le=>[...Le,{id:Ie,name:ie.name,size:ie.size,inline:!0,status:"uploading"}]);try{const Le=v?await v(ie):void 0,nt=v?Le?.contentPath:await y?.(ie);if(!nt)throw new Error("Upload did not return a file URL");if(!Rt.current.some(gt=>gt.id===Ie))throw new Error("Attachment was removed");return ln(gt=>gt.map(qt=>qt.id===Ie?{...qt,attachmentId:Le?.id,contentPath:nt,status:"attached"}:qt)),nt}catch(Le){throw ln(nt=>nt.map(gt=>gt.id===Ie?{...gt,status:"error",error:Le instanceof Error?Le.message:"Upload failed"}:gt)),Le}}r(ps,"uploadInlineImage");async function bt(ie){const Ie=`${ie.name}:${ie.size}:${ie.lastModified}:${Math.random().toString(36).slice(2)}`;ln(Le=>[...Le,{id:Ie,name:ie.name,size:ie.size,status:"uploading"}]);try{if(!v){ln(gt=>gt.map(qt=>qt.id===Ie?{...qt,status:"error",error:"This file type cannot be attached here"}:qt));return}const Le=await v(ie);if(!Le?.contentPath)throw new Error("Upload did not return a file URL");const nt=Le?.originalFilename??ie.name;ln(gt=>gt.map(qt=>qt.id===Ie?{...qt,name:nt,attachmentId:Le?.id,status:"attached",contentPath:Le?.contentPath}:qt))}catch(Le){ln(nt=>nt.map(gt=>gt.id===Ie?{...gt,status:"error",error:Le instanceof Error?Le.message:"Upload failed"}:gt))}}r(bt,"attachNonImageFile");async function kn(ie){if(!ie.type.startsWith("image/")){await bt(ie);return}try{const Ie=await ps(ie);Re.current?.insertMarkdown(``)}catch{}}r(kn,"attachPickedFile");function es(ie){const Ie=ie.target.files;if(Ie&&Ie.length>0){if(t){t.onSelectFiles(Array.from(Ie)),ie.target.value="";return}(async()=>{for(const Le of Array.from(Ie))await kn(Le)})()}ie.target.value=""}r(es,"handleFileInputChange");function Ua(){const ie=Me.current.trim();St(/^\/goal(?:\s|$)/.test(ie)?ie:`/goal ${ie}`),Tt(null),requestAnimationFrame(()=>Re.current?.focus())}r(Ua,"prepareGoal");function Kn(ie){if(ce||!en)return;const Ie=Array.from(ie.clipboardData?.files??[]);if(Ie.length===0)return;if(t){if(y){const nt=Ie.filter(gt=>!gt.type.startsWith("image/"));if(nt.length===0||(t.onSelectFiles(nt),nt.length!==Ie.length))return}else t.onSelectFiles(Ie);ie.preventDefault(),ie.stopPropagation();return}const Le=Ie.filter(nt=>!nt.type.startsWith("image/"));Le.length!==0&&(Le.length===Ie.length&&(ie.preventDefault(),ie.stopPropagation()),(async()=>{for(const nt of Le)await bt(nt)})())}r(Kn,"handlePasteCapture");const ja=pt.filter(ie=>ie.status==="attached"&&ie.contentPath&&!ie.inline),Gn=pt.filter(ie=>!ie.inline||ie.status!=="attached"),Sn=!O&&!he&&Se.trim().length===0&&pt.length===0&&!!(l||fe.stopping),Bs=pt.some(ie=>ie.status==="uploading"),vs=pt.some(ie=>ie.status==="error"),Mn=!!(oe&&!ce&&!O),[Ts,_n]=(0,x.useState)(!1),[mn,$a]=(0,x.useState)(null),[Ba,hs]=(0,x.useState)(null),ys=tT(P&&Mn),[wa,Ka]=eT("dock",oe?.id??null),Lt=!!(Mn&&oe&&(wa||P&&Ba!==oe.id&&mn!==oe.id&&(Ts||ys))),sa=(0,x.useRef)(Mn);(0,x.useEffect)(()=>{sa.current&&!Mn&&!O&&requestAnimationFrame(()=>Re.current?.focus()),sa.current=Mn},[O,Mn]);const Ks=S&&!O&&Se.trim()==="/new"&&pt.length===0;async function qs(){if(f||ce&&!Ks)return;if(t){if(Dt.current||Bs||vs||t.submitDisabled||!Me.current.trim()&&!t.canSubmitWithoutBody)return;Dt.current=!0,De(!0),Tt(null);try{await t.onSubmit(Me.current,it,kt.values)}catch(Ft){Tt(Ft instanceof Error?Ft.message:"Failed to create task. Try again.")}finally{Dt.current=!1,De(!1)}return}if(!e)return;const ie=A&&!O?Rr(A):null;if(ie&&!he){ft(ie);return}const Ie=Me.current,Le=Rt.current,nt=ht.current,gt=Ie.trim(),qt=O?{matched:!1}:yP(Ie),Ds=O?{matched:!1}:XE(Ie);if(Ds.matched&&"error"in Ds){Tt(Ds.error);return}const J=Ds.matched&&"command"in Ds?Ds.command:null,_e=J?.mode,Be=J?J.prompt:Ie;if(qt.matched&&S){Tt("Create a separate task for work that needs an ongoing execution goal.");return}if(qt.matched){if("error"in qt){Tt(qt.error);return}if(Rt.current.length>0){Tt("Remove attachments before using /goal.");return}if(!ne){Tt(R?.reason??"Session goals are unsupported by this agent.");return}if(R&&R.availability!=="available"){Tt(R.reason??"Session goals are unsupported by this agent.");return}try{if(tn&&fn!==C&&qt.command.action!=="focus"){const Ft=lh(fn);if(!Ft||!ue){Tt("Select an agent before starting a session goal.");return}await ue(kt.hasValues&&Ft.assigneeAgentId?{...Ft,modelOverride:kt.values}:Ft),kt.clear(),Is(null)}await ne(qt.command),Tt(null),Me.current="",at.current&&clearTimeout(at.current),at.current=null,A&&Kp(A),Ce(""),Re.current?.clear()}catch(Ft){Tt(Ft instanceof Error?Ft.message:"The goal action could not be applied.")}return}if(!gt&&ja.length===0||Bs||vs||he||ve||f)return;const Xe=ja.map(Ft=>`[${nw(Ft.name)}](${Ft.contentPath})`).join(`
|
|
11
|
-
`),Ve=O?Ie:[Be.trim(),Xe].filter(Boolean).join(`
|
|
12
|
-
|
|
13
|
-
`),ot=tn&&fn!==C,yt=kt.hasValues?kt.values:void 0,pn=ot?lh(fn):void 0,Ln=pn?.assigneeAgentId&&yt?{...pn,modelOverride:yt}:pn,Ms=SP(z,fn)?!0:void 0;Me.current="",at.current&&(clearTimeout(at.current),at.current=null),A&&!O&&(Le.some(Ft=>Ft.status==="attached"&&Ft.attachmentId)?yi(A,Ie):Kp(A)),Ce(""),De(!0);let zn=null;try{if(O){if(!W)return;await W(O.commentId,Ve),Y?.();return}it!==u&&m&&await m(it);const Ft=A?Rr(A):null;if(Ft){ft(Ft),Ce(Ie);return}zn=crypto.randomUUID(),A&&(yi(A,Ie),Gu(A,{attemptId:zn,reviewed:!1}));const Nn=[...new Set(Le.filter(Yt=>Yt.status==="attached"&&Yt.attachmentId&&(!Yt.inline||Yt.contentPath&&Be.includes(Yt.contentPath))).map(Yt=>Yt.attachmentId))];A&&(Fe.current={draftKey:A,attemptId:zn,submittedBody:Ie,submittedAttachmentIds:Nn},St(Me.current));const ws=await e(Ve,Ms,Ln,Nn.length?Nn:void 0,zn,_e);if(Ln?.modelOverride&&kt.clear(),A&&Uy(A,zn,At.current===A?Me.current:void 0),At.current!==A)return;Pt(QE(ws));const Fs=new Set(Le.map(Yt=>Yt.id));ln(Yt=>Yt.filter(gs=>!Fs.has(gs.id))),ht.current===nt&&Is(null)}catch(Ft){if(Ln?.modelOverride&&kt.clear(),At.current!==A)return;const Nn=Me.current;if(zn&&Ft instanceof CE){const Fs={attemptId:zn,reviewed:!1,nextDraftOffset:Ie.length+(Nn?2:0),submittedAttachmentIds:Le.flatMap(Yt=>Yt.attachmentId?[Yt.attachmentId]:[])};ft(Fs),A&&Rr(A)?.attemptId===zn&&Gu(A,Fs)}else A&&zn&&Z3(A,zn);const ws=Nn?`${Ie}
|
|
14
|
-
|
|
15
|
-
${Nn}`:Ie;Me.current=ws,at.current&&(clearTimeout(at.current),at.current=null),A&&yi(A,ws,zn??void 0),Ce(ws)}finally{Fe.current?.attemptId===zn&&(Fe.current=null),De(!1)}}r(qs,"submit"),(0,x.useEffect)(()=>{if(!ve||!i?.has(ve.attemptId))return;const ie=ve.nextDraftOffset===void 0?"":Me.current.slice(ve.nextDraftOffset);A&&Uy(A,ve.attemptId,ie),ft(null),Me.current=ie,Ce(ie);const Ie=ve.submittedAttachmentIds;ln(Le=>Ie?Le.filter(nt=>!nt.attachmentId||!Ie.includes(nt.attachmentId)):[])},[i,A,ve]);async function js(){if(ve){ze(!1);try{if(!B)throw new Error("Review unavailable");if(await B(),At.current!==A)return;const ie={...ve,reviewed:!0};ft(ie),A&&Rr(A)?.attemptId===ie.attemptId&&Gu(A,ie)}catch{ze(!0)}}}r(js,"reviewUncertainSubmission");function On(){ve?.reviewed&&(A&&Kp(A,ve.attemptId),Me.current="",Ce(""),ln([]),ft(null))}r(On,"discardUncertainDraft");function ka(){oe&&(Oe(!0),ut(null),Promise.resolve(oe.onSkip()).catch(ie=>{Oe(!1),ut(ie instanceof Error?ie.message:"This request could not be skipped.")}))}r(ka,"skipTakeover");const Rs=oe?(0,s.jsxs)(le,{type:"button",size:"sm",variant:"secondary",disabled:de,onClick:ka,children:[de?(0,s.jsx)(As,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):null,"Skip"]}):null;return ce&&(!S||O)?(0,s.jsx)(Ay,{...ce,hasDraft:!!(Se.trim()||pt.length)}):(0,s.jsxs)("div",{className:X("flex min-w-0 flex-col",t?.contextBar?"gap-0":"gap-2"),children:[Lt&&oe?(0,s.jsxs)("button",{type:"button",className:"flex min-h-11 w-full min-w-0 items-center gap-2 rounded-xl border border-line bg-bg-2 px-3 text-left text-(length:--text-compact) shadow-sm dark:border-0 dark:bg-bg-3 dark:shadow-none","aria-expanded":!1,"aria-label":`Show ${oe.label}`,onMouseDown:r(ie=>ie.preventDefault(),"onMouseDown"),onClick:r(()=>{Ka(!1),hs(oe.id)},"onClick"),"data-testid":"task-chat-composer-takeover-summary",children:[(0,s.jsx)(Cy,{className:"h-4 w-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-medium text-ink",children:oe.label}),oe.pendingCount>1?(0,s.jsxs)("span",{className:"shrink-0 text-xs text-ink-3",children:[oe.pendingCount," pending"]}):null,(0,s.jsx)(iI,{className:"h-4 w-4 shrink-0 text-ink-3","aria-hidden":!0})]}):null,Mn&&oe?(0,s.jsxs)("section",{className:X("relative rounded-xl border border-line bg-bg-2 p-(--sz-18px) shadow-sm dark:border-0 dark:bg-bg-3 dark:shadow-none",P?"flex max-h-(--tc-interaction-card-max-h-mobile) flex-col overflow-hidden p-(--tc-mobile-card-padding)":"max-h-(--tc-interaction-card-max-h) overflow-y-auto scrollbar-auto-hide",Lt&&"hidden"),"aria-label":oe.label,"data-testid":"task-chat-composer-takeover",onFocus:r(()=>$a(oe.id),"onFocus"),onBlur:r(ie=>{ie.currentTarget.contains(ie.relatedTarget)||$a(null)},"onBlur"),children:[(0,s.jsxs)("div",{className:X("flex min-w-0 shrink-0 items-center gap-2",oe.hideLabel&&oe.pendingCount===1?"absolute right-0 top-0 z-10":"mb-3"),"data-testid":"task-chat-composer-takeover-header",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[!Vt&&!oe.hideLabel?(0,s.jsx)("strong",{className:"block truncate text-sm font-medium text-ink",children:oe.label}):null,(0,s.jsx)("div",{ref:rn,className:"flex min-w-0 items-center","data-testid":"task-chat-composer-takeover-title-slot"})]}),(0,s.jsxs)("div",{className:"ml-auto flex shrink-0 items-center gap-1",children:[oe.pendingCount>1?(0,s.jsxs)(le,{type:"button",size:"sm",variant:"ghost",className:"h-7 px-2",onClick:oe.onShowNext,children:[oe.pendingCount," pending"]}):null,(0,s.jsx)("div",{ref:$e,className:"flex shrink-0 items-center","data-testid":"task-chat-composer-takeover-controls-slot"}),(0,s.jsx)(le,{type:"button",size:"icon-xs",variant:"ghost","aria-label":"Hide","aria-expanded":!0,"data-testid":"task-chat-composer-takeover-hide",onClick:r(()=>{$a(null),Ka(!0)},"onClick"),children:(0,s.jsx)(Br,{"aria-hidden":!0})}),(0,s.jsx)(le,{type:"button",size:"icon-xs",variant:"ghost","aria-label":`Dismiss ${oe.label}`,disabled:de,onClick:oe.onDismiss,children:(0,s.jsx)(is,{"aria-hidden":!0})})]})]}),(0,s.jsx)("div",{className:X(oe.hideLabel&&oe.pendingCount===1?"pr-14":"pr-1",P&&"min-h-0 flex-1 overflow-y-auto overscroll-contain scrollbar-auto-hide"),"data-testid":"task-chat-composer-takeover-body","data-mobile":P||void 0,children:(0,s.jsx)(J3.Provider,{value:{skipButton:oe.inlineSkip&&!oe.hideSkip&&Rs?Rs:null,dismiss:oe.onDismiss,headerSlot:H,controlsSlot:je,setHeaderClaimed:Wt},children:oe.content})}),qe?(0,s.jsx)("p",{className:"mt-2 shrink-0 text-sm text-bad",role:"alert",children:qe}):null,!oe.inlineSkip&&!oe.hideSkip?(0,s.jsx)("div",{className:"mt-3 flex shrink-0 items-center justify-end gap-2","data-slot":"task-chat-takeover-actions",children:Rs}):null]}):null,t?.contextBar?(0,s.jsx)(vP,{className:"flex h-11 min-w-0 items-center gap-2 px-2.5","data-testid":"task-chat-composer-context",role:"group","aria-label":"Task project and worktrees",children:t.contextBar}):null,(0,s.jsxs)("div",{className:X(Ee?"wardmote-task-chat-composer rounded-(--radius-task-composer) border border-line bg-bg-2 p-(--sz-18px) shadow-(--shadow-task-composer) dark:border-0 dark:bg-bg-3 dark:shadow-none":"wardmote-task-chat-composer rounded-xl bg-bg-2 p-(--sz-18px)",P&&"p-(--tc-mobile-card-padding)"),onKeyDownCapture:r(ie=>{f||O||((ie.key==="."||ie.code==="Period")&&(ie.metaKey||ie.ctrlKey)||ie.key==="Tab"&&ie.shiftKey)&&(ie.preventDefault(),ie.stopPropagation(),na(qh(it)))},"onKeyDownCapture"),onPasteCapture:Kn,children:[t?.header,ve?(0,s.jsxs)("div",{role:"alert",className:"mb-3 space-y-2 rounded-md border border-line bg-bg-3 p-3 text-sm",children:[(0,s.jsx)("p",{children:"We couldn’t confirm whether this comment was saved. It may already be in the conversation. Review it before starting another draft."}),(0,s.jsx)(le,{type:"button",variant:"secondary",size:"sm",onClick:js,children:"Review conversation"}),Ye?(0,s.jsx)("p",{children:"Couldn’t refresh the conversation. Try reviewing it again."}):null,ve.reviewed?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{children:"Discarding this draft does not remove any saved comment or uploaded file."}),(0,s.jsx)(le,{type:"button",variant:"secondary",size:"sm",onClick:On,children:"Discard draft and start new"})]}):null]}):null,!Mn&&($||oe)?(0,s.jsxs)("button",{type:"button",className:"mb-2 flex w-full items-center gap-2 rounded-md bg-bg-3/50 px-2.5 py-2 text-left text-xs text-ink-3 transition-colors hover:bg-bg-3 hover:text-ink",onClick:$?.onOpen,"data-testid":"task-chat-pending-input-indicator",children:[(0,s.jsx)(Cy,{className:"h-4 w-4 shrink-0","aria-hidden":!0}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:$?.label??oe?.label??"Pending input"}),(0,s.jsxs)("span",{className:"shrink-0 font-medium",children:[$?.count??oe?.pendingCount??1," pending"]})]}):null,ce&&S?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(Ay,{...ce,hasDraft:!!(Se.trim()||pt.length)}),(0,s.jsx)("p",{className:"text-xs text-ink-3",children:"Send /new to start a fresh session and resume this conversation."})]}):null,(0,s.jsx)("div",{"data-testid":"task-chat-composer-input",onFocus:r(ie=>{_n(!0),ie.currentTarget.contains(ie.relatedTarget)||hs(null)},"onFocus"),onBlur:r(ie=>{ie.currentTarget.contains(ie.relatedTarget)||_n(!1)},"onBlur"),children:(0,s.jsx)(cS,{ref:Re,value:Se,onChange:St,placeholder:f?h??"Composer disabled":Dn,readOnly:f||!!ve||!!(t&&he),mentions:j,actionCommands:t?[]:S?[{id:"action:new",kind:"action",command:"new",name:"New session",description:"Start fresh context here, preserving conversation history.",aliases:["new"],disabled:f}]:[ms],onSubmit:r(()=>{qs()},"onSubmit"),imageUploadHandler:en&&(!t||y)?ps:void 0,onDropFile:en&&!t?bt:void 0,bordered:!1,className:X(f&&"opacity-60"),contentClassName:P?"max-h-(--sz-28dvh) min-h-(--tc-mobile-editor-min-h) overflow-y-auto px-1 py-1 text-base scrollbar-auto-hide":"max-h-(--sz-28dvh) min-h-(--sz-48px) overflow-y-auto px-1 py-1 text-sm scrollbar-auto-hide"})}),Gt?(0,s.jsx)("p",{className:"px-1 text-xs text-bad",role:"alert","data-testid":t?"task-chat-create-error":"task-chat-goal-error",children:Gt}):null,xt?(0,s.jsx)("p",{className:"px-1 text-xs text-ink-3",role:"status","data-testid":"task-chat-delivery-notice",children:xt}):null,Gn.length>0?(0,s.jsx)(MI,{className:"mb-1 px-1","data-testid":"task-chat-composer-attachments",children:Gn.map(ie=>{const Ie=RI(ie.name),Le=Ie.icon,nt=AI(ie.size);return(0,s.jsxs)(DI,{size:"sm",state:ie.status==="uploading"?"uploading":ie.status==="error"?"error":"done",children:[(0,s.jsx)(TI,{children:ie.status==="uploading"?(0,s.jsx)(As,{className:"animate-spin","aria-hidden":!0}):(0,s.jsx)(Le,{"aria-hidden":!0})}),(0,s.jsxs)(EI,{children:[(0,s.jsx)(II,{className:"max-w-48",children:ie.name}),(0,s.jsx)(OI,{className:"max-w-48",children:ie.status==="uploading"?"Uploading…":ie.status==="error"?ie.error??"Upload failed":[Ie.label,nt].filter(Boolean).join(" · ")})]}),(0,s.jsx)(_I,{children:(0,s.jsx)(LI,{"aria-label":`Remove ${ie.name}`,disabled:!!ve,onClick:r(()=>ln(gt=>gt.filter(qt=>qt.id!==ie.id)),"onClick"),children:(0,s.jsx)(is,{"aria-hidden":!0})})})]},ie.id)})}):null,t?.details,(0,s.jsxs)("div",{className:X("mt-2 flex items-center gap-x-2 gap-y-3",P&&!O?"flex-nowrap":"flex-wrap"),"data-testid":"task-chat-composer-actions",children:[(0,s.jsxs)("div",{className:"flex min-w-0 max-w-full items-center gap-2",children:[en?(0,s.jsx)("input",{ref:Mt,type:"file",className:"hidden",multiple:!!t,onChange:es}):null,(0,s.jsx)(pI,{privacy:t?.privacy,mode:it,onModeChange:!O&&m?na:void 0,onAttachFile:en?()=>Mt.current?.click():void 0,onGoal:!O&&!S&&pt.length===0&&R?.availability==="available"&&ne?Ua:void 0,disabled:f||!!ve,mobile:P,triggerTestId:"task-chat-composer-add",menuTestId:"task-chat-composer-add-menu"}),t?.privacy?.private?(0,s.jsx)(fI,{inherited:t.privacy.inherited,onRemove:r(()=>t.privacy.onChange(!1),"onRemove"),disabled:f}):null,O?(0,s.jsx)("span",{className:"px-1 text-xs font-medium text-ink-3",children:O.stale?"Queued message changed":"Editing queued message"}):(0,s.jsx)(dI,{mode:it,onRemove:m?()=>na("standard"):void 0,disabled:f||!!ve,testId:"task-chat-composer-mode",mobile:P})]}),(0,s.jsxs)("div",{className:X("ml-auto flex min-w-0 max-w-full items-center gap-2",P&&!O&&"flex-1 justify-end"),children:[tn&&!O?(0,s.jsx)(oI,{issueId:K,pendingIssue:N,assigneeValue:fn,currentAssigneeValue:C,options:_??[],onAssigneeChange:Is,staging:kt,subtaskRows:!t&&!S&&!!K,draft:!!t,companyId:D,footerSlot:t?.runSettingsFooter,disabled:f,mobile:P,renderAssigneeIdentity:r((ie,Ie,Le)=>(0,s.jsx)(wP,{assigneeValue:ie,label:Ie,agentMap:I,userProfileMap:T,placement:Le}),"renderAssigneeIdentity")}):null,(K||N)&&!tn&&!O?(0,s.jsx)(mI,{issueId:K,pendingIssue:N,subtaskRows:!S&&!!K,disabled:f,mobile:P}):null,O?(0,s.jsx)("button",{type:"button",onClick:Y,disabled:he,className:"h-8 shrink-0 rounded-md px-2.5 text-xs font-medium text-ink-3 transition-colors hover:bg-bg-3 hover:text-ink disabled:opacity-50",children:"Cancel"}):null,(0,s.jsx)(le,{variant:Sn?"danger":"primary",size:"icon-sm",className:"size-8 min-h-8 min-w-8 shrink-0 aspect-square rounded-full",type:"button",onClick:r(()=>{Sn?fe.stop():qs()},"onClick"),disabled:ae||(Sn?f||fe.stopping:f||!!ce&&!Ks||he||!!ve||Bs||vs||!!t?.submitDisabled||Se.trim().length===0&&ja.length===0&&!t?.canSubmitWithoutBody),title:ae?oE:Sn?fe.stopping?"Stopping…":"Stop response":O?O.stale?"Queue as new message":"Save queued message":Bs?"Waiting for upload to finish":vs?"Remove the failed attachment to send":t?`${t.submitLabel} (⌘+Enter)`:"Send (⌘+Enter)","aria-label":Sn?fe.stopping?"Stopping…":"Stop":O?O.stale?"Queue as new message":"Save queued message":t?.submitLabel??"Send","aria-busy":he,"data-testid":Sn?"task-chat-composer-stop":"task-chat-composer-send","data-slot":"icon-button",children:he||Sn&&fe.stopping?(0,s.jsx)(As,{className:"h-4 w-4 animate-spin","aria-hidden":!0}):Sn?(0,s.jsx)(YI,{className:"h-4 w-4 fill-current","aria-hidden":!0}):(0,s.jsx)(dS,{className:"h-4 w-4","aria-hidden":!0})})]})]}),fe.error?(0,s.jsx)("p",{role:"alert",className:"text-xs text-bad",children:fe.error}):null]})]})}r(NP,"TaskChatComposer");var CP=3;function Hr(e){const t=new Date(e.lastUsedAt).getTime();return Number.isFinite(t)?t:0}r(Hr,"workspaceLastUsedTime");function V0(e,t){const i=e.name.localeCompare(t.name,void 0,{numeric:!0,sensitivity:"base"});return i!==0?i:e.id.localeCompare(t.id)}r(V0,"compareWorkspaceNames");function AP(e,t){const i=Hr(t)-Hr(e);return i!==0?i:V0(e,t)}r(AP,"compareWorkspaceLastUsedDesc");function _P(e){return e.branchName??e.id.slice(0,8)}r(_P,"workspaceDescription");function EP(e){return[e.name,e.status,e.branchName,e.cwd,e.id].filter(Boolean).join(" ")}r(EP,"workspaceSearchText");function $C(e){const t=new Map;for(const i of e){const l=i.cwd??i.id,c=t.get(l);(!c||Hr(i)>Hr(c))&&t.set(l,i)}return Array.from(t.values())}r($C,"dedupeReusableExecutionWorkspaces");function IP(e){const t=$C(e).sort(V0);if(t.length<=1)return t;let i=t[0];for(const l of t.slice(1))Hr(l)>Hr(i)&&(i=l);return[i,...t.filter(l=>l.id!==i.id)]}r(IP,"orderReusableExecutionWorkspaces");function sG(e,t={}){const i=(t.now?new Date(t.now).getTime():Date.now())-(t.recentCutoffDays??CP)*24*60*60*1e3,l=$C(e),c=r((f,h)=>({key:`${h}:${f.id}`,value:f.id,workspaceId:f.id,groupId:h,label:f.name,description:_P(f),searchText:EP(f),workspace:f}),"toOption"),u=l.filter(f=>Hr(f)>=i).sort(AP).map(f=>c(f,"recent")),m=[...l].sort(V0).map(f=>c(f,"all"));return[...u.length>0?[{id:"recent",label:"Recent",options:u}]:[],{id:"all",label:"All workspaces",options:m}]}r(sG,"buildReusableExecutionWorkspaceOptionGroups");function aG(e,t){return TP(e,t)!==null}r(aG,"reusableWorkspaceOptionMatches");function TP(e,t){return aT([{text:e.label,weight:0},{text:e.description,weight:20},{text:e.searchText,weight:40}],t)}r(TP,"scoreReusableWorkspaceOptionMatch");var sw=[{key:"isolated_workspace",value:"isolated_workspace",mode:"isolated_workspace",label:"New worktree",description:"Start in an isolated checkout."},{key:"shared_workspace",value:"shared_workspace",mode:"shared_workspace",label:"Project workspace",description:"Use the project's shared checkout."},{key:"operator_branch",value:"operator_branch",mode:"operator_branch",label:"New branch",description:"Create a branch in the project workspace."},{key:"agent_default",value:"agent_default",mode:"agent_default",label:"Agent default",description:"Let the agent choose its workspace."},{key:"inherit",value:"inherit",mode:"inherit",label:"Project default",description:"Use the project's worktree settings."}];function RP({mode:e,workspaceId:t,workspaces:i,onChange:l,loading:c,error:u,onRetry:m,disabled:f,mobile:h,contentStyle:g,selectedWorkspaceLabel:v}){const y=(0,x.useMemo)(()=>[{id:"new",options:[sw[0]]},{id:"reuse",label:"Reuse a worktree",options:IP(i).map(k=>({key:`reuse:${k.id}`,value:`reuse:${k.id}`,workspaceId:k.id,mode:"reuse_existing",label:k.name,description:k.branchName??"Existing workspace",searchText:`${k.branchName??""} ${k.id}`}))},{id:"other",label:"Other options",options:sw.filter(k=>k.mode==="shared_workspace"||k.mode!=="isolated_workspace"&&k.mode===e)}],[e,i]),j=e==="reuse_existing"?`reuse:${t}`:e;return(0,s.jsx)(rI,{value:j,groups:y,onValueChange:r((k,S)=>l(S.mode,S.workspaceId??""),"onValueChange"),placeholder:"Worktrees",triggerAriaLabel:"Worktrees",mobileTitle:"Worktrees",searchPlaceholder:"Search worktrees...",emptyMessage:"No matching worktrees.",disabled:f,modal:h,contentStyle:g,contentWidth:"auto",className:"min-w-0 flex-1 sm:flex-none sm:max-w-72",triggerClassName:"h-8 gap-1.5 border-0 bg-transparent px-2 text-xs font-medium shadow-none hover:bg-bg-3 focus-visible:bg-bg-3 focus-visible:ring-0",renderValue:r(k=>(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,s.jsx)(ac,{className:"size-3.5 shrink-0","aria-hidden":!0}),(0,s.jsxs)("span",{className:"truncate",children:[(0,s.jsx)("span",{className:"hidden text-ink-3 sm:inline",children:"Worktrees · "}),k?.label??v??"Select worktree"]})]}),"renderValue"),renderOption:r(k=>{const S=k.workspaceId?ac:k.mode==="isolated_workspace"?PT:k.mode==="agent_default"?ZE:k.mode==="operator_branch"?ac:wi;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(S,{className:"size-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,s.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,s.jsx)("span",{className:"truncate",children:k.label}),(0,s.jsx)("span",{className:"truncate text-xs text-ink-3",children:k.description})]})]})},"renderOption"),listFooter:c||u||i.length===0?(0,s.jsx)("div",{className:"border-t border-line px-3 py-2 text-xs text-ink-3",role:"status",children:c?"Loading existing worktrees…":u?(0,s.jsxs)("span",{className:"flex items-center justify-between gap-2",children:["Couldn't load worktrees.",(0,s.jsx)("button",{type:"button",className:"rounded px-2 py-1 text-ink hover:bg-bg-3",onClick:m,children:"Retry"})]}):"No existing worktrees yet. Choose New worktree to start one."}):void 0})}r(RP,"ComposerWorktreePicker");var iG={standard:"Standard",low_trust_review:"Low-trust review"},rG={standard:"Organization-visible collaboration. This is the default for normal work.",low_trust_review:"Contained for hostile or untrusted input. Narrow Wardmote API, quarantined output. Use for PR review and external-content triage."};function DP(e){return e?.trustPreset==="low_trust_review"?Qa:Mk}r(DP,"getTrustPreset");function MP(e){return{...e??{},trustPreset:Qa,reviewPreset:{id:Qa,version:1,rawOutputDisposition:zk}}}r(MP,"buildLowTrustReviewPolicy");function BC(e,t){const i=e??{};if(t==="low_trust_review")return{...i,canCreateAgents:!1,trustPreset:Qa,authorizationPolicy:MP(i.authorizationPolicy)};const l={...i.authorizationPolicy??{}};return delete l.trustPreset,delete l.reviewPreset,delete l.trustBoundary,{...i,trustPreset:Mk,authorizationPolicy:l}}r(BC,"buildPermissionsForTrustPreset");function lG(e){const t=e?.authorizationPolicy?.trustBoundary;return t?.mode==="low_trust_review"?t:null}r(lG,"getLowTrustBoundary");function Nc(e){return(e?.projectIds?.length??0)+(e?.rootIssueId?1:0)+(e?.issueIds?.length??0)}r(Nc,"countBoundaryTargets");function OP(e){if(!e||Nc(e)!==1)return null;const t=e.projectIds?.[0];if(t)return{type:"project",id:t};if(e.rootIssueId)return{type:"root_issue",id:e.rootIssueId};const i=e.issueIds?.[0];return i?{type:"issue",id:i}:null}r(OP,"getSingleLowTrustBoundaryTarget");function oG(e){return Nc(e)<=1}r(oG,"isCeLowTrustBoundaryEditable");function cG(e,t,i){const l=BC(e,Qa),c=l.authorizationPolicy??{},{projectIds:u,rootIssueId:m,issueIds:f,...h}=c.trustBoundary??{mode:"low_trust_review"},g={...h,mode:Qa,companyId:t,...i.type==="project"?{projectIds:[i.id]}:{},...i.type==="root_issue"?{rootIssueId:i.id}:{},...i.type==="issue"?{issueIds:[i.id]}:{}};return{...l,authorizationPolicy:{...c,trustPreset:Qa,reviewPreset:{id:Qa,version:1,rawOutputDisposition:zk},trustBoundary:g}}}r(cG,"setSingleLowTrustBoundaryTarget");function uG(e){const t=BC(e,Qa),i=t.authorizationPolicy??{},l=i.trustBoundary;if(!l)return t;const{projectIds:c,rootIssueId:u,issueIds:m,...f}=l;return{...t,authorizationPolicy:{...i,trustBoundary:{...f,mode:Qa}}}}r(uG,"clearSingleLowTrustBoundaryTarget");function dG(e){const t=OP(e);return t?.type==="project"?`Project ${t.id.slice(0,8)}`:t?.type==="root_issue"?`Root issue ${t.id.slice(0,8)}`:t?.type==="issue"?`Issue ${t.id.slice(0,8)}`:!e||Nc(e)===0?"No boundary selected":`${Nc(e)} boundaries`}r(dG,"summarizeLowTrustBoundaryTarget");function fG(e){return Nc(e)>0}r(fG,"lowTrustBoundaryHasScope");function mG(e){return!e||e.preset!=="low_trust_review"?null:e.disposition==="promoted"?"Promoted from low-trust":"Low-trust source"}r(mG,"sourceTrustLabel");var W0="wardmote:issue-draft",LP=800;function aw(){if(typeof window>"u"||!window.visualViewport)return null;const{height:e,offsetTop:t}=window.visualViewport;return!Number.isFinite(e)||e<=0||!Number.isFinite(t)||t<0?null:{height:e,offsetTop:t,constrained:e<window.innerHeight}}r(aw,"readVisualViewportLayout");function zP(e){const[t,i]=(0,x.useState)(()=>e?aw():null);return(0,x.useEffect)(()=>{if(!e){i(null);return}const l=window.visualViewport;if(!l)return;const c=r(()=>{const u=aw();u&&i(u)},"updateLayout");return c(),l.addEventListener("resize",c),l.addEventListener("scroll",c),window.addEventListener("resize",c),()=>{l.removeEventListener("resize",c),l.removeEventListener("scroll",c),window.removeEventListener("resize",c)}},[e]),t}r(zP,"useVisualViewportLayout");function PP(){try{const e=localStorage.getItem(W0);return e?JSON.parse(e):null}catch{return null}}r(PP,"loadDraft");function UP(e){localStorage.setItem(W0,JSON.stringify(e))}r(UP,"saveDraft");function $P(){localStorage.removeItem(W0)}r($P,"clearDraft");function BP(e){const t=e.name.toLowerCase();return t.endsWith(".md")||t.endsWith(".markdown")||t.endsWith(".txt")||e.type==="text/markdown"||e.type==="text/plain"}r(BP,"isTextDocumentFile");function KP(e){return e.replace(/\.[^.]+$/,"")}r(KP,"fileBaseName");function qP(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"document"}r(qP,"slugifyDocumentKey");function FP(e){return e.split(/[-_ ]+/g).filter(Boolean).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}r(FP,"titleizeFilename");function HP(e,t){const i=new Set(t.filter(c=>c.kind==="document").map(c=>c.documentKey).filter(c=>!!c));if(!i.has(e))return e;let l=2;for(;i.has(`${e}-${l}`);)l+=1;return`${e}-${l}`}r(HP,"createUniqueDocumentKey");function iw(e){return e.size<1024?`${e.size} B`:e.size<1048576?`${(e.size/1024).toFixed(1)} KB`:`${(e.size/1048576).toFixed(1)} MB`}r(iw,"formatFileSize");function Q0(e){return!!e&&typeof e=="object"&&!Array.isArray(e)}r(Q0,"isRecord$1");function VP(e){return Q0(e)&&e.type==="user_secret_ref"&&typeof e.key=="string"&&e.key.trim().length>0&&e.required!==!1&&e.allowMissingOverride!==!0}r(VP,"isRequiredUserSecretBinding");function WP(e){return Q0(e)?Object.values(e).flatMap(t=>VP(t)?[t.key.trim()]:[]):[]}r(WP,"collectRequiredUserSecretKeysFromEnv");function QP(e){return[...new Set(e.flatMap(WP))]}r(QP,"uniqueRequiredUserSecretKeys");function GP(e,t){return!!t&&(e==="todo"||e==="in_progress")}r(GP,"shouldWarnAboutRunUserSecrets");function sd(e,t){return typeof e.executionWorkspaceId=="string"&&e.executionWorkspaceId.length>0?"reuse_existing":typeof e.executionWorkspaceMode=="string"&&e.executionWorkspaceMode.length>0?e.executionWorkspaceMode:Nd(t)}r(sd,"defaultExecutionWorkspaceModeForIssueDefaults");function YP(e){const t=e.code==="Period"||e.key===".";return(e.metaKey||e.ctrlKey)&&t}r(YP,"isWorkModePeriodShortcut");function XP(e){return e.metaKey&&e.key==="Escape"}r(XP,"isWorkModeEscapeShortcut");function ZP(){const{visible:e}=Jz(),{newIssueOpen:t,newIssueDefaults:i,closeNewIssue:l}=Mc(),c=zP(t),u=(0,x.useRef)(null),{companies:m,selectedCompanyId:f}=vt(),h=wn(),g=bs(),{pushToast:v}=Ni(),[y,j]=(0,x.useState)(""),[k,S]=(0,x.useState)(!1),[N,_]=(0,x.useState)(""),I=(0,x.useRef)(""),D=(0,x.useRef)(""),[T,C]=(0,x.useState)("todo"),[M,z]=(0,x.useState)(""),[K,P]=(0,x.useState)(""),[A,B]=(0,x.useState)(""),[O,W]=(0,x.useState)(""),[Y,ce]=(0,x.useState)(""),[oe,$]=(0,x.useState)(""),[R,ne]=(0,x.useState)(""),[ue,ae]=(0,x.useState)(""),Ee=gS(),fe=Ee.clear,Ae=Ee.set,[Ce,Se]=(0,x.useState)(!0),[he,De]=(0,x.useState)("new"),[Ye,ze]=(0,x.useState)("shared_workspace"),[ve,ft]=(0,x.useState)(""),[At,xt]=(0,x.useState)("standard"),[Pt,de]=(0,x.useState)(!1),{isMobile:Oe}=Jn(),[qe,ut]=(0,x.useState)([]),[Vt,Wt]=(0,x.useState)(!1),H=(0,x.useRef)(null),rn=(0,x.useRef)(null),je=(0,x.useRef)(null),$e=(0,x.useRef)(!1),He=(0,x.useRef)(!1),mt=(0,x.useRef)(null),it=Nf(f),Qt=!!i.parentId,Rn=i.parentIdentifier??(i.parentId?i.parentId.slice(0,8):""),Gt=i.executionWorkspaceId??"",Tt=i.parentExecutionWorkspaceLabel??Gt,{data:Jt}=ge({queryKey:U.agents.list(f),queryFn:r(()=>$s.list(f),"queryFn"),enabled:!!f&&t}),{data:kt}=ge({queryKey:U.projects.list(f),queryFn:r(()=>rr.list(f),"queryFn"),enabled:!!f&&t}),{data:Qn}=ge({queryKey:U.issues.mentionPool(f),queryFn:r(()=>hn.list(f,{limit:100,sortField:"updated",sortDir:"desc"}),"queryFn"),enabled:!!f&&t,staleTime:6e4}),{data:pt,isFetched:dn}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:Rt,isFetched:ln}=ge({queryKey:U.access.companyUserDirectory(f),queryFn:r(()=>Xa.listUserDirectory(f),"queryFn"),enabled:!!f&&t}),{data:Dt}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn"),enabled:t,retry:!1}),ht=pt?.user?.id??pt?.session?.userId??null,Mt=(0,x.useMemo)(()=>kt??[],[kt]),{orderedProjects:Re}=PC({projects:Mt,companyId:f,userId:ht}),Me=Re.find(J=>J.id===R),St=!!(Dt?.enableIsolatedWorkspaces===!0?Me?.executionWorkspacePolicy??null:null)?.enabled,at=e&&St,{data:Ot,isPending:on,isError:Ut,refetch:en}=ge({queryKey:U.executionWorkspaces.summaryList(f,{projectId:R,reuseEligible:!0}),queryFn:r(()=>Lf.listSummaries(f,{projectId:R,reuseEligible:!0}),"queryFn"),enabled:!!f&&t&&at,retry:!1}),{data:tn,isError:fn,refetch:An}=ge({queryKey:U.issues.detail(i.parentId??""),queryFn:r(()=>hn.get(i.parentId),"queryFn"),enabled:t&&!!i.parentId,retry:!1}),Dn=Qt&&!tn,ta=tn?.visibility==="private"||tn?.project?.visibility==="private",ms=(tn?.project?.visibility==="private"?tn.project:null)??(!Pt&&Me?.visibility==="private"?Me:null),Is=tn?.visibility==="private"?`Subtask of private task ${tn.title||i.parentTitle||Rn}`:ms?`In private project ${ms.name}`:void 0,na=Pt||ta||Re.some(J=>J.id===R&&J.visibility==="private"),ps=(0,x.useMemo)(()=>ql(K),[K]),bt=ps.assigneeAgentId,kn=ps.assigneeUserId,es=(0,x.useMemo)(()=>(Jt??[]).find(J=>J.id===bt)??null,[Jt,bt]),Ua=(0,x.useMemo)(()=>fP({agents:Jt,projects:Re,members:Rt?.users,issues:Qn}),[Jt,Rt?.users,Re,Qn]),Kn=Kt({mutationFn:r(async({companyId:J,stagedFiles:_e,navigateOnCreate:Be,...Xe})=>{const Ve=await hn.create(J,Xe),ot=[];for(const yt of _e)try{if(yt.kind==="document"){const pn=await yt.file.text();await hn.upsertDocument(Ve.id,yt.documentKey??"document",{title:yt.documentKey==="plan"?null:yt.title??null,format:"markdown",body:pn,baseRevisionId:null})}else await hn.uploadAttachment(J,Ve.id,yt.file)}catch(pn){ot.push({name:yt.file.name,message:pn instanceof Error?pn.message:"Upload failed"})}return{issue:Ve,companyId:J,failures:ot,navigateOnCreate:Be}},"mutationFn"),onSuccess:r(({issue:J,companyId:_e,failures:Be,navigateOnCreate:Xe})=>{Jd(J.projectId??"",_e),J.assigneeAgentId&&Bd(J.assigneeAgentId,_e),J.assigneeUserId&&$d(J.assigneeUserId,_e),nO(J,ht),h.invalidateQueries({queryKey:U.issues.list(_e)}),h.invalidateQueries({queryKey:U.issues.listMineByMe(_e)}),h.invalidateQueries({queryKey:U.issues.listTouchedByMe(_e)}),h.invalidateQueries({queryKey:U.issues.listUnreadTouchedByMe(_e)}),h.invalidateQueries({queryKey:U.sidebarBadges(_e)}),H.current&&clearTimeout(H.current);const Ve=(m.find(pn=>pn.id===_e)?.issuePrefix??"").trim(),ot=J.identifier??J.id,yt=Ve?{label:`Open ${ot}`,href:`/${Ve}/issues/${ot}`}:void 0;Be.length>0?v({title:`Created ${ot} with upload warnings`,body:`${Be.length} staged ${Be.length===1?"file":"files"} could not be added: ${Be.map(pn=>`${pn.name} (${pn.message})`).join(", ")}`,tone:"warn",action:yt}):v({title:`Created ${ot}`,tone:"success",action:yt}),$P(),vs(),l(),Xe&&g(yt?.href??`/issues/${ot}`)},"onSuccess")}),ja=(0,x.useCallback)(J=>{H.current&&clearTimeout(H.current),H.current=setTimeout(()=>{(J.title.trim()||J.description.trim())&&UP(J)},LP)},[]),Gn=(0,x.useCallback)((J,_e)=>{S(!!J),I.current=J,D.current=_e,j(J),_(_e)},[]),Sn=(0,x.useCallback)((J={})=>{if(!t)return;const _e=J.title??I.current,Be=J.description??D.current;ja({title:_e,description:Be,status:T,priority:M,assigneeValue:K,reviewerValue:A,approverValue:O,watchdogAgentId:Y,watchdogInstructions:oe,projectId:R,projectWorkspaceId:ue,executionWorkspaceMode:Ye,selectedExecutionWorkspaceId:ve,workMode:At,isPrivate:Pt,runSettings:Ee.values})},[t,ja,T,M,K,A,O,Y,oe,R,ue,Ye,ve,At,Pt,Ee.values]),Bs=(0,x.useCallback)(J=>{D.current=J,_(J),Sn({description:J})},[Sn]);(0,x.useEffect)(()=>{t&&Sn()},[T,M,K,A,O,Y,oe,R,ue,Ye,ve,At,t,Sn]),(0,x.useEffect)(()=>{if(!t){je.current=null,$e.current=!1,He.current=!1;return}const J=`${f??""}:${JSON.stringify(i)}`;if(je.current===J)return;je.current=J,rn.current=null;const _e=PP();if(He.current=i.projectId===void 0&&!i.parentId,$e.current=!i.assigneeAgentId&&!i.assigneeUserId,fe(),de(!1),Kn.reset(),i.parentId){const Be=Qu(i.workMode)?i.workMode:"standard",Xe=i.projectId??"",Ve=Re.find(Ln=>Ln.id===Xe),ot=i.projectWorkspaceId!==void 0,yt=i.projectWorkspaceId??Dr(Ve),pn=sd(i,Ve);Gn(i.title??"",i.description??""),C(i.status??"todo"),z(i.priority??""),ne(Xe),ae(yt),P(Or(i)),ze(pn),xt(Be),ft(i.executionWorkspaceId??""),rn.current=(ot||Ve)&&Xe||null}else if(i.title||i.description){const Be=Qu(i.workMode)?i.workMode:"standard";Gn(i.title??"",i.description??""),C(i.status??"todo"),z(i.priority??"");const Xe=i.projectId??"",Ve=Re.find(yt=>yt.id===Xe),ot=i.projectWorkspaceId!==void 0;ne(Xe),ae(i.projectWorkspaceId??Dr(Ve)),P(Or(i)),B(""),W(""),ce(""),$(""),ze(sd(i,Ve)),xt(Be),ft(i.executionWorkspaceId??""),rn.current=(ot||i.executionWorkspaceId||Ve)&&Xe||null}else if(_e&&(_e.title.trim()||_e.description.trim())){$e.current=!1,He.current=!1;const Be=Qu(_e.workMode)?_e.workMode:"standard",Xe=i.projectId??_e.projectId,Ve=Re.find(Ln=>Ln.id===Xe),ot=i.projectWorkspaceId!==void 0,yt=i.executionWorkspaceId!==void 0,pn=i.executionWorkspaceMode!==void 0;de(_e.isPrivate??!1),Gn(_e.title,_e.description);for(const[Ln,Ms]of Object.entries(_e.runSettings??{}))(Ln==="model"||Ln==="thinking")&&Ae(Ln,Ms??null);C(_e.status||"todo"),z(_e.priority),P(i.assigneeAgentId||i.assigneeUserId?Or(i):_e.assigneeValue??_e.assigneeId??""),B(_e.reviewerValue??""),W(_e.approverValue??""),ce(_e.watchdogAgentId??""),$(_e.watchdogInstructions??""),ne(Xe),ae(ot?i.projectWorkspaceId??"":_e.projectWorkspaceId??Dr(Ve)),ze(yt||pn?sd(i,Ve):_e.executionWorkspaceMode??(_e.useIsolatedExecutionWorkspace?"isolated_workspace":Nd(Ve))),xt(Be),ft(yt?i.executionWorkspaceId??"":_e.selectedExecutionWorkspaceId??""),rn.current=(ot||yt||_e.projectWorkspaceId||Ve)&&Xe||null}else{xt(Qu(i.workMode)?i.workMode:"standard");const Be=i.projectId??"",Xe=Re.find(ot=>ot.id===Be),Ve=i.projectWorkspaceId!==void 0;Gn("",""),C(i.status??"todo"),z(i.priority??""),ne(Be),ae(i.projectWorkspaceId??Dr(Xe)),P(Or(i)),B(""),W(""),ce(""),$(""),ze(sd(i,Xe)),ft(i.executionWorkspaceId??""),rn.current=(Ve||i.executionWorkspaceId||Xe)&&Be||null}},[t,i,Re,f,Gn,fe,Ae]),(0,x.useEffect)(()=>()=>{H.current&&clearTimeout(H.current)},[]);function vs(){mt.current=null,Gn("",""),C("todo"),z(""),P(""),B(""),W(""),ce(""),$(""),ne(""),ae(""),fe(),Se(!0),De("new"),ze("shared_workspace"),ft(""),xt("standard"),de(!1),ut([]),Wt(!1),rn.current=null,je.current=null}r(vs,"reset");async function Mn(J,_e,Be){const Xe=I.current.trim(),Ve=J.trim();if(!f||!Xe&&!Ve||Kn.isPending||qs||Dn)return;const ot=Be.model??null,yt=Be.thinking??null,pn=ot||yt?{...ot?{model:ot}:{},...yt?{thinking:yt}:{},inheritToSubtasks:Ce,subtaskScope:he}:null,Ln=Re.find(aa=>aa.id===R),Ms=e&&Dt?.enableIsolatedWorkspaces===!0?Ln?.executionWorkspacePolicy??null:null,zn=sa.find(aa=>aa.id===ve),Ft=Ye==="reuse_existing"?mP(zn?.mode):Ye,Nn=Ms?.enabled?{mode:Ft}:null,ws=at&&Ye==="reuse_existing"&&zn?zn.projectWorkspaceId:ue,Fs=!e&&i.projectId===R?i.executionWorkspaceId:void 0,Yt=bP({reviewerValues:A?[A]:[],approverValues:O?[O]:[]}),gs={companyId:f,stagedFiles:qe,...Xe?{title:Xe}:{},description:Ve||void 0,status:T,priority:M||"medium",workMode:_e,...na?{visibility:"private"}:{},...bt?{assigneeAgentId:bt}:{},...kn?{assigneeUserId:kn}:{},...i.parentId?{parentId:i.parentId}:{},...i.goalId?{goalId:i.goalId}:{},...R?{projectId:R}:{},...ws?{projectWorkspaceId:ws}:{},...pn?{modelOverride:pn}:{},...Ms?.enabled?{executionWorkspacePreference:Ye}:{},...at&&Ye==="reuse_existing"&&ve?{executionWorkspaceId:ve}:{},...Nn?{executionWorkspaceSettings:Nn}:{},...Fs?{executionWorkspaceId:Fs,executionWorkspacePreference:"reuse_existing"}:{},...Yt?{executionPolicy:Yt}:{},...Y?{watchdog:{agentId:Y,instructions:oe.trim()||null}}:{}},cr=JSON.stringify(gs);mt.current?.fingerprint!==cr&&(mt.current={fingerprint:cr,idempotencyKey:ef()}),await Kn.mutateAsync({...gs,allowDuplicate:!0,idempotencyKey:mt.current.idempotencyKey,navigateOnCreate:i.navigateOnCreate===!0})}r(Mn,"handleSubmit");function Ts(J){if(YP(J)){J.preventDefault(),xt(_e=>qh(_e));return}}r(Ts,"handleKeyDown");function _n(J){J.length===0||Kn.isPending||ut(_e=>{const Be=[..._e];for(const Xe of J){if(BP(Xe)){const Ve=KP(Xe.name),ot=HP(qP(Ve),Be);Be.push({id:`${Xe.name}:${Xe.size}:${Xe.lastModified}:${ot}`,file:Xe,kind:"document",documentKey:ot,title:FP(Ve)});continue}Be.push({id:`${Xe.name}:${Xe.size}:${Xe.lastModified}`,file:Xe,kind:"attachment"})}return Be})}r(_n,"stageFiles");function mn(J){J.dataTransfer.types.includes("Files")&&(J.preventDefault(),Wt(!0))}r(mn,"handleFileDragEnter");function $a(J){J.dataTransfer.types.includes("Files")&&(J.preventDefault(),J.dataTransfer.dropEffect="copy",Wt(!0))}r($a,"handleFileDragOver");function Ba(J){J.currentTarget.contains(J.relatedTarget)||Wt(!1)}r(Ba,"handleFileDragLeave");function hs(J){J.dataTransfer.files.length&&(J.preventDefault(),Wt(!1),_n(Array.from(J.dataTransfer.files)))}r(hs,"handleFileDrop");function ys(J){ut(_e=>_e.filter(Be=>Be.id!==J))}r(ys,"removeStagedFile");const wa=bt?(Jt??[]).find(J=>J.id===bt):null,Ka=DP(wa?.permissions)==="low_trust_review",Lt=(0,x.useMemo)(()=>GP(T,bt)?QP([Q0(wa?.adapterConfig)?wa.adapterConfig.env:null,Me?.env??null]):[],[wa?.adapterConfig,Me?.env,bt,T]),sa=Ot??[],Ks=sa.find(J=>J.id===ve),qs=at&&Ye==="reuse_existing"&&(on||Ut||!Ks),js=Qt&&St&&!!Gt&&!(Qt&&Gt&&Ye==="reuse_existing"&&ve===Gt),On=(0,x.useMemo)(()=>Q3(),[t]),ka=(0,x.useMemo)(()=>pg(),[t]),Rs=(0,x.useMemo)(()=>[..._S(ht),...LC(Rt?.users,{excludeUserIds:[ht]}),...MS((Jt??[]).filter(mg),On).map(J=>({id:Or({assigneeAgentId:J.id}),label:J.name,searchText:`${J.name} ${J.role} ${J.title??""}`}))],[Jt,Rt?.users,ht,On]);(0,x.useEffect)(()=>{if(!t||!f||!$e.current||!Jt||!dn||!ln||it?.loading)return;$e.current=!1;const J=new Set(Rs.map(ot=>ot.id)),_e=Xh(f),Be=(_e.length?_e:Xh().filter(ot=>ot.startsWith("agent:"))).find(ot=>J.has(ot)),Xe=Jt.filter(mg),Ve=Xe.find(ot=>ot.id===it?.primaryAgentId)??Xe.find(ot=>ot.role==="ceo")??Xe[0];P(Be??(Ve?Or({assigneeAgentId:Ve.id}):""))},[t,f,Jt,Rs,dn,ln,it?.loading,it?.primaryAgentId]),(0,x.useEffect)(()=>{if(!t||!f||!He.current||!kt)return;He.current=!1;const J=new Set(Re.filter(Xe=>!Xe.archivedAt).map(Xe=>Xe.id)),_e=pP(f),Be=_e!==void 0?J.has(_e)?_e:"":pg().find(Xe=>J.has(Xe))??"";ne(Be)},[t,f,kt,Re]);const ie=(0,x.useMemo)(()=>Re.map(J=>({id:J.id,label:J.name,searchText:J.description??""})),[Re]),Ie=qe.filter(J=>J.kind==="document"),Le=qe.filter(J=>J.kind==="attachment"),nt=(0,x.useCallback)(J=>{He.current=!1,Jd(J,f??void 0),ne(J);const _e=Re.find(Be=>Be.id===J);rn.current=J||null,ae(Dr(_e)),ze(Nd(_e)),ft("")},[Re,f]);(0,x.useEffect)(()=>{if(!t||!R||ve||rn.current===R)return;const J=Re.find(_e=>_e.id===R);J&&(rn.current=R,ae(Dr(J)),ze(Nd(J)),ft(""))},[t,Re,R,ve]);const gt=(0,x.useMemo)(()=>{const J={"--new-issue-dialog-top":"var(--new-issue-dialog-top-gap)","--new-issue-dialog-height":"calc(var(--new-issue-visual-viewport-height) - var(--new-issue-dialog-top-gap) - var(--new-issue-dialog-bottom-gap))"};return c?{...J,"--new-issue-visual-viewport-height":`${c.height}px`,...c.constrained?{top:"var(--new-issue-dialog-top)",maxHeight:"var(--new-issue-dialog-height)",translate:"var(--pct-neg-50)"}:{}}:J},[c]),qt=(0,x.useMemo)(()=>c?{"--mobile-entity-picker-visual-viewport-height":`${c.height}px`}:{},[c]);(0,x.useEffect)(()=>{if(!c?.constrained)return;const J=document.activeElement;if(!(J instanceof HTMLElement)||!u.current?.contains(J)||typeof J.scrollIntoView!="function")return;const _e=window.requestAnimationFrame(()=>{J.scrollIntoView({block:"nearest"})});return()=>window.cancelAnimationFrame(_e)},[c]);const Ds=(0,x.useMemo)(()=>new Map((Jt??[]).map(J=>[J.id,J])),[Jt]);return(0,s.jsx)(ya,{open:t,onOpenChange:r(J=>{!J&&!Kn.isPending&&l()},"onOpenChange"),children:(0,s.jsxs)(za,{showCloseButton:!1,"aria-describedby":void 0,style:gt,className:"flex max-h-(--new-issue-dialog-height) flex-col gap-0 overflow-hidden rounded-(--radius-task-composer) border-0 bg-transparent p-0 shadow-none sm:max-w-2xl",onKeyDown:Ts,onOpenAutoFocus:r(J=>{J.preventDefault(),u.current?.querySelector('[contenteditable="true"]')?.focus()},"onOpenAutoFocus"),onEscapeKeyDown:r(J=>{J.defaultPrevented||(XP(J)?(J.preventDefault(),xt(_e=>qh(_e))):Kn.isPending&&J.preventDefault())},"onEscapeKeyDown"),onPointerDownOutside:r(J=>{const _e=J.detail.originalEvent.target;(Kn.isPending||_e?.closest("[data-radix-popper-content-wrapper], [data-wardmote-floating-ui]"))&&J.preventDefault()},"onPointerDownOutside"),children:[(0,s.jsx)(Da,{className:"sr-only",children:Qt?"New sub-task":"New task"}),(0,s.jsx)("div",{ref:u,className:X("min-h-0 overflow-y-auto overscroll-contain",Vt&&"bg-bg-3/20"),onDragEnter:mn,onDragOver:$a,onDragLeave:Ba,onDrop:hs,children:(0,s.jsx)(X3,{mode:"streamlined",children:(0,s.jsx)(NP,{workMode:At,onWorkModeChange:xt,disabled:Kn.isPending||!f,placeholder:"Describe a task…",mobile:Oe,mentions:Ua,onImageUpload:r(async J=>{if(!f)throw new Error("No organization selected");return(await DS.uploadImage(f,J,"issues/drafts")).contentPath},"onImageUpload"),companyId:f,enableReassign:!0,reassignOptions:Rs,agentMap:Ds,currentAssigneeValue:K,onPendingAssigneeChange:r(J=>{const _e=J??"";$e.current=!1;const Be=ql(_e);Be.assigneeAgentId&&Bd(Be.assigneeAgentId,f??void 0),Be.assigneeUserId&&$d(Be.assigneeUserId,f??void 0),P(_e),fe(),_e&&T==="backlog"&&C("todo")},"onPendingAssigneeChange"),creation:{value:N,onChange:Bs,onSubmit:Mn,privacy:Dn?void 0:{private:na,inherited:Is,onChange:r(J=>{if(de(J),!J&&Me?.visibility==="private"&&nt(""),J&&!R&&ht){const _e=Re.find(Be=>Be.personalOwnerUserId===ht);_e&&nt(_e.id)}},"onChange")},submitLabel:Qt?"Create sub-task":"Create task",canSubmitWithoutBody:!!y.trim(),onSelectFiles:_n,runSettings:Ee,runSettingsFooter:(0,s.jsx)(uI,{inheritToSubtasks:Ce,subtaskScope:he,onInheritChange:Se,onScopeChange:De,testIdPrefix:"new-issue-model-override",disabled:Kn.isPending}),header:k||Qt?(0,s.jsxs)("div",{className:"mb-3 flex flex-col gap-2 text-xs",children:[k?(0,s.jsx)("input",{"aria-label":"Task title",value:y,disabled:Kn.isPending,className:"w-full bg-transparent text-sm text-ink outline-none",onChange:r(J=>{I.current=J.target.value,j(J.target.value),Sn({title:J.target.value})},"onChange")}):null,Qt?(0,s.jsx)("div",{className:"px-4 pb-2",children:(0,s.jsxs)("div",{className:"max-w-full rounded-md border border-line bg-bg-3/30 px-2.5 py-1.5 text-xs text-ink-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)(f1,{className:"h-3.5 w-3.5 shrink-0"}),(0,s.jsx)("span",{className:"shrink-0",children:"Sub-task of"}),(0,s.jsx)("span",{className:"font-medium text-ink",children:Rn})]}),i.parentTitle?(0,s.jsx)("div",{className:"pl-5 text-ink/80 truncate",children:i.parentTitle}):null]})}):null]}):void 0,details:(0,s.jsxs)(s.Fragment,{children:[Dn?(0,s.jsxs)("div",{role:fn?"alert":"status",className:"mb-2 flex items-center gap-2 text-xs text-ink-3",children:[(0,s.jsx)("span",{children:fn?"Couldn't check parent access.":"Checking parent access…"}),fn?(0,s.jsx)(le,{variant:"ghost",size:"sm",onClick:r(()=>{An()},"onClick"),children:"Retry"}):null]}):null,qs&&!on?(0,s.jsx)("p",{role:"alert",className:"mb-2 text-xs text-bad",children:Ut?"Couldn't check the selected worktree. Retry in Worktrees or choose New worktree.":"The selected worktree is no longer available. Choose another worktree or start a new one."}):null,qe.length>0?(0,s.jsxs)("div",{className:"mt-4 space-y-3 rounded-lg border border-line/70 p-3",children:[Ie.length>0?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("div",{className:"text-xs font-medium text-ink-3",children:"Documents"}),(0,s.jsx)("div",{className:"space-y-2",children:Ie.map(J=>(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3 rounded-md border border-line/70 px-3 py-2",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(Bn,{variant:"outline",className:"border-line font-mono text-(length:--text-nano) uppercase tracking-(--tracking-eyebrow) text-ink-3",children:J.documentKey}),(0,s.jsx)("span",{className:"truncate text-sm",children:J.file.name})]}),(0,s.jsxs)("div",{className:"mt-1 flex items-center gap-2 text-(length:--text-micro) text-ink-3",children:[(0,s.jsx)(yS,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:J.title||J.file.name}),(0,s.jsx)("span",{children:"•"}),(0,s.jsx)("span",{children:iw(J.file)})]})]}),(0,s.jsx)(le,{variant:"ghost",size:"icon-xs",className:"shrink-0",onClick:r(()=>ys(J.id),"onClick"),disabled:Kn.isPending,title:"Remove document",children:(0,s.jsx)(is,{className:"h-3.5 w-3.5"})})]},J.id))})]}):null,Le.length>0?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("div",{className:"text-xs font-medium text-ink-3",children:"Attachments"}),(0,s.jsx)("div",{className:"space-y-2",children:Le.map(J=>(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3 rounded-md border border-line/70 px-3 py-2",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(G3,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,s.jsx)("span",{className:"truncate text-sm",children:J.file.name})]}),(0,s.jsxs)("div",{className:"mt-1 text-(length:--text-micro) text-ink-3",children:[J.file.type||"application/octet-stream"," • ",iw(J.file)]})]}),(0,s.jsx)(le,{variant:"ghost",size:"icon-xs",className:"shrink-0",onClick:r(()=>ys(J.id),"onClick"),disabled:Kn.isPending,title:"Remove attachment",children:(0,s.jsx)(is,{className:"h-3.5 w-3.5"})})]},J.id))})]}):null]}):null,K&&T==="backlog"?(0,s.jsxs)("div",{"data-testid":"new-issue-assigned-backlog-note",className:"mx-4 mb-2 flex items-start gap-2 rounded-md border border-amber-300/70 bg-amber-50/90 px-3 py-2 text-xs text-amber-900 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100",children:[(0,s.jsx)(c0,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-300"}),(0,s.jsxs)("span",{className:"leading-snug",children:["Assigning implies executable intent - leave status as"," ",(0,s.jsx)("span",{className:"font-medium",children:"Backlog"})," only to deliberately park this. The assignee will not be woken until status moves to ",(0,s.jsx)("span",{className:"font-medium",children:"Todo"})," or"," ",(0,s.jsx)("span",{className:"font-medium",children:"In Progress"}),"."]})]}):null,es?.status==="paused"?(0,s.jsx)("div",{"data-testid":"new-issue-paused-assignee-note",className:"mx-4 mb-2",children:(0,s.jsxs)(By,{tone:"warning",icon:HS,compact:!0,children:[(0,s.jsx)("span",{className:"font-medium",children:es.name})," is paused and will not start work on this task until it is resumed",es.pauseReason==="import"?" — it arrived paused from an organization import":"",". You can resume it from the task page after creating the task."]})}):null,Ka?(0,s.jsxs)("div",{"data-testid":"new-issue-low-trust-assignee-note",className:"mx-4 mb-2 flex items-start gap-2 rounded-md border border-amber-300/70 bg-amber-50/90 px-3 py-2 text-xs text-amber-900 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-100",children:[(0,s.jsx)(WI,{className:"mt-0.5 h-3.5 w-3.5 shrink-0 text-amber-600 dark:text-amber-300"}),(0,s.jsx)("span",{className:"leading-snug",children:"Low-trust review agent. It can only act inside its assigned review boundary; task, project, or run policy defines the concrete scope."})]}):null,js?(0,s.jsx)("div",{className:"mb-2",children:(0,s.jsxs)(By,{tone:"warning",compact:!0,children:["This sub-task will no longer use the parent task workspace",Tt?` (${Tt})`:"","."]})}):null,f&&Lt.length>0?(0,s.jsx)(rP,{companyId:f,definitionKeys:Lt}):null]}),submitDisabled:qs||Dn,contextBar:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(j0,{value:R,options:ie,recentOptionIds:ka,placeholder:"Project",mobileTitle:"Select project",modal:!0,className:"h-8 min-w-0 flex-1 gap-1.5 border-0 bg-transparent px-2 text-xs shadow-none hover:bg-bg-3 focus-visible:bg-bg-3 focus-visible:ring-0 sm:max-w-64 sm:flex-none",disabled:Kn.isPending,triggerDataSlot:"new-issue-compact-control",contentStyle:qt,noneLabel:"No project",noneAtTop:!0,searchPlaceholder:"Search projects...",emptyMessage:"No projects found.",onChange:nt,renderTriggerValue:r(J=>J&&Me?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(wi,{className:"size-3.5 shrink-0",style:{color:Me.color??"var(--project-seed)"},"aria-hidden":!0}),(0,s.jsx)("span",{className:"truncate",children:J.label}),Me.visibility==="private"?(0,s.jsx)(Uh,{className:"size-3 shrink-0 text-ink-3","aria-label":"Private project"}):null,(0,s.jsx)(Br,{className:"size-3 shrink-0 text-ink-3","aria-hidden":!0})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(wi,{className:"size-3.5 shrink-0 text-ink-3","aria-hidden":!0}),(0,s.jsx)("span",{className:"truncate text-ink-3",children:"Project"}),(0,s.jsx)(Br,{className:"size-3 shrink-0 text-ink-3","aria-hidden":!0})]}),"renderTriggerValue"),renderOption:r(J=>{if(!J.id)return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(wi,{className:"size-4 shrink-0 text-ink-3","aria-hidden":!0}),(0,s.jsx)("span",{className:"truncate",children:J.label})]});const _e=Re.find(Be=>Be.id===J.id);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(wi,{className:"size-4 shrink-0",style:{color:_e?.color??"var(--project-seed)"},"aria-hidden":!0}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:J.label}),_e?.visibility==="private"?(0,s.jsx)(Uh,{className:"size-3.5 shrink-0 text-ink-3","aria-label":"Private project"}):null]})},"renderOption")}),at?(0,s.jsx)(RP,{mode:Ye,workspaceId:ve,selectedWorkspaceLabel:Ks?.name??(ve===Gt?i.parentExecutionWorkspaceLabel:void 0),workspaces:sa,onChange:r((J,_e)=>{if(ze(J),ft(_e),_e){const Be=sa.find(Xe=>Xe.id===_e);Be&&ae(Be.projectWorkspaceId??"")}else ae(Dr(Me))},"onChange"),loading:on,error:Ut,onRetry:r(()=>{en()},"onRetry"),disabled:Kn.isPending,mobile:Oe,contentStyle:qt}):null]})}})})})]})})}r(ZP,"NewIssueDialog");var KC=r(e=>["project-repositories",e],"repositoryOptionsKey");function JP({companyId:e,selected:t,onChange:i,onConnect:l,disabled:c}){const u=ge({queryKey:KC(e),queryFn:r(()=>rr.repositoryOptions(e),"queryFn"),staleTime:3e4}),m=u.isPending?"loading":u.isError?"error":u.data.connectionCount?u.data.failedConnectionCount&&!u.data.repositories.length?"error":u.data.repositories.length?"ready":"empty":"disconnected";return(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-3",children:[(0,s.jsx)(BI,{selected:t.map(f=>u.data?.repositories.find(h=>h.id===f.id)??f),onChange:i,available:u.data?.repositories,state:m,onRetry:r(()=>{u.refetch()},"onRetry"),onConnect:l,disabled:c}),!!u.data?.failedConnectionCount&&u.data.repositories.length>0&&(0,s.jsxs)("div",{role:"alert",className:"flex flex-wrap items-center gap-2 text-xs text-bad",children:["Some GitHub connections could not load. Reconnect them in Apps or try again.",(0,s.jsx)(le,{type:"button",variant:"ghost",size:"sm",disabled:u.isFetching,onClick:r(()=>{u.refetch()},"onClick"),children:"Try again"})]})]})}r(JP,"ProjectRepositoryInput");function eU(){const{newProjectOpen:e,closeNewProject:t}=Mc(),{selectedCompanyId:i}=vt();return i&&e?(0,s.jsx)(tU,{companyId:i,onClose:t},i):null}r(eU,"NewProjectDialog");function tU({companyId:e,onClose:t}){const i=wn(),[l,c]=(0,x.useState)(""),[u]=(0,x.useState)(()=>yy[Math.floor(Math.random()*yy.length)]),[m,f]=(0,x.useState)([]),[h,g]=(0,x.useState)(!1),v=(0,x.useRef)(null),y=Kt({mutationFn:r(()=>rr.create(e,{name:l.trim(),color:u,status:"planned",repositoryIds:m.map(j=>j.id)}),"mutationFn"),onSuccess:r(j=>{Jd(j.id,e),i.invalidateQueries({queryKey:U.projects.all(e)}),t()},"onSuccess")});return(0,s.jsx)(ya,{open:!0,onOpenChange:r(j=>{!j&&!y.isPending&&t()},"onOpenChange"),children:(0,s.jsx)(za,{showCloseButton:!1,"aria-describedby":void 0,className:"flex max-h-(--sz-calc-18) flex-col gap-0 overflow-hidden p-0 shadow-sm sm:max-w-lg",onOpenAutoFocus:r(j=>{j.preventDefault(),v.current?.focus()},"onOpenAutoFocus"),children:h?(0,s.jsxs)("div",{className:"min-h-0 overflow-y-auto p-5",children:[(0,s.jsx)(Da,{className:"sr-only",children:"Connect GitHub"}),(0,s.jsx)(gE,{host:"dialog",serviceSlug:"github",forceNewConnection:!0,onCancel:r(()=>g(!1),"onCancel"),onComplete:r(()=>{i.invalidateQueries({queryKey:KC(e)}),g(!1)},"onComplete")})]}):(0,s.jsxs)("form",{className:"flex min-h-0 flex-col overflow-hidden",onSubmit:r(j=>{j.preventDefault(),l.trim()&&!y.isPending&&y.mutate()},"onSubmit"),children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col gap-4 px-5 pb-4 pt-5",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)(Da,{className:"text-lg font-semibold",children:"Create project"}),(0,s.jsx)(le,{type:"button",variant:"ghost",size:"icon-sm",disabled:y.isPending,"aria-label":"Close new project",onClick:t,children:(0,s.jsx)(is,{className:"size-4"})})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded-lg border border-line-strong px-3 focus-within:border-focus focus-within:ring-1 focus-within:ring-focus",children:[(0,s.jsx)(Xk,{color:u,size:"sm"}),(0,s.jsx)("input",{ref:v,"aria-label":"Project name",value:l,disabled:y.isPending,onChange:r(j=>c(j.target.value),"onChange"),placeholder:"Project name",required:!0,className:"h-10 w-full min-w-0 border-0 bg-transparent text-base outline-none placeholder:text-ink-3 md:text-sm"})]})]}),(0,s.jsx)("div",{role:"region","aria-label":"Source repositories",tabIndex:0,className:"min-h-0 overflow-y-auto overscroll-contain px-5 pb-1 outline-none focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-focus",children:(0,s.jsx)(JP,{companyId:e,selected:m,onChange:f,onConnect:r(()=>g(!0),"onConnect"),disabled:y.isPending})}),y.isError&&(0,s.jsx)("p",{role:"alert",className:"px-5 pt-3 text-sm text-bad",children:y.error.message}),(0,s.jsxs)("div",{className:"flex shrink-0 justify-end gap-2 px-5 py-5",children:[(0,s.jsx)(le,{type:"button",variant:"ghost",disabled:y.isPending,onClick:t,children:"Cancel"}),(0,s.jsx)(le,{type:"submit",disabled:!l.trim()||y.isPending,children:y.isPending?"Creating…":"Create project"})]})]})})})}r(tU,"NewProjectForm");var rw={list:r(e=>we.get(`/companies/${e}/goals`),"list"),get:r(e=>we.get(`/goals/${e}`),"get"),create:r((e,t)=>we.post(`/companies/${e}/goals`,t),"create"),update:r((e,t)=>we.patch(`/goals/${e}`,t),"update"),remove:r(e=>we.delete(`/goals/${e}`),"remove")};function qC(e){return{"--sc":`var(${e})`}}r(qC,"scStyle");function nU(e){const t=e.replace(/_/g," ");return t.charAt(0).toUpperCase()+t.slice(1)}r(nU,"sentenceCaseStatus");function sU({status:e,label:t}){return(0,s.jsx)("span",{className:X("inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium whitespace-nowrap shrink-0",Id[e]??"bg-bg-3 text-ink-3"),children:t??e.replace(/[_-]/g," ")})}r(sU,"StatusBadge");function pG({status:e}){const t=AE[e]??"--status-agent-idle",i=e==="active"?"idle":e;return(0,s.jsx)("span",{className:"status-chip inline-flex items-center rounded-full border px-3 py-1 text-xs font-medium leading-none whitespace-nowrap shrink-0",style:qC(t),children:i.replace(/_/g," ")})}r(pG,"AgentStatusBadge");function hG({status:e,externalConversationState:t}){const i=e==="in_review"&&t==="waiting"?"idle":e,l=IE[i]??"--status-task-backlog";return(0,s.jsxs)("span",{className:X("status-chip inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs font-normal leading-none whitespace-nowrap shrink-0",i==="cancelled"&&"line-through"),style:qC(l),children:[(0,s.jsx)(LE,{status:i,size:"sm"}),nU(i)]})}r(hG,"IssueStatusBadge");var lw={company:"Organization",team:"Team",agent:"Agent",task:"Task"};function aU(){const{newGoalOpen:e,newGoalDefaults:t,closeNewGoal:i}=Mc(),{selectedCompanyId:l,selectedCompany:c}=vt(),u=wn(),[m,f]=(0,x.useState)(""),[h,g]=(0,x.useState)(""),[v,y]=(0,x.useState)("planned"),[j,k]=(0,x.useState)("task"),[S,N]=(0,x.useState)(""),[_,I]=(0,x.useState)(!1),[D,T]=(0,x.useState)(!1),[C,M]=(0,x.useState)(!1),[z,K]=(0,x.useState)(!1),P=(0,x.useRef)(null),A=S||t.parentId||"",{data:B}=ge({queryKey:U.goals.list(l),queryFn:r(()=>rw.list(l),"queryFn"),enabled:!!l&&e}),O=Kt({mutationFn:r(R=>rw.create(l,R),"mutationFn"),onSuccess:r(()=>{u.invalidateQueries({queryKey:U.goals.list(l)}),Y(),i()},"onSuccess")}),W=Kt({mutationFn:r(async R=>{if(!l)throw new Error("No organization selected");return DS.uploadImage(l,R,"goals/drafts")},"mutationFn")});function Y(){f(""),g(""),y("planned"),k("task"),N(""),I(!1)}r(Y,"reset");function ce(){!l||!m.trim()||O.mutate({title:m.trim(),description:h.trim()||void 0,status:v,level:j,...A?{parentId:A}:{}})}r(ce,"handleSubmit");function oe(R){R.key==="Enter"&&(R.metaKey||R.ctrlKey)&&(R.preventDefault(),ce())}r(oe,"handleKeyDown");const $=(B??[]).find(R=>R.id===A);return(0,s.jsx)(ya,{open:e,onOpenChange:r(R=>{R||(Y(),i())},"onOpenChange"),children:(0,s.jsxs)(za,{showCloseButton:!1,className:X("p-0 gap-0",_?"sm:max-w-2xl":"sm:max-w-lg"),onKeyDown:oe,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-2.5 border-b border-line",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm text-ink-3",children:[c&&(0,s.jsx)("span",{className:"bg-bg-3 px-1.5 py-0.5 rounded text-xs font-medium",children:c.issuePrefix}),(0,s.jsx)("span",{className:"text-ink-3/60",children:"›"}),(0,s.jsx)("span",{children:t.parentId?"New sub-goal":"New goal"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[(0,s.jsx)(le,{variant:"ghost",size:"icon-xs",onClick:r(()=>I(!_),"onClick"),children:_?(0,s.jsx)(y1,{className:"h-3.5 w-3.5"}):(0,s.jsx)(wS,{className:"h-3.5 w-3.5"})}),(0,s.jsx)(le,{variant:"ghost",size:"icon-xs",onClick:r(()=>{Y(),i()},"onClick"),children:(0,s.jsx)("span",{className:"text-lg leading-none",children:"×"})})]})]}),(0,s.jsx)("div",{className:"px-4 pt-4 pb-2 shrink-0",children:(0,s.jsx)("input",{className:"w-full text-lg font-semibold bg-transparent outline-none placeholder:text-ink-3/50",placeholder:"Goal title",value:m,onChange:r(R=>f(R.target.value),"onChange"),onKeyDown:r(R=>{R.key==="Tab"&&!R.shiftKey&&(R.preventDefault(),P.current?.focus())},"onKeyDown"),autoFocus:!0})}),(0,s.jsx)("div",{className:"px-4 pb-2 overflow-y-auto max-h-(--sz-50vh)",children:(0,s.jsx)(cS,{ref:P,value:h,onChange:g,placeholder:"Add description...",bordered:!1,contentClassName:X("text-sm text-ink-3",_?"min-h-(--sz-220px)":"min-h-(--sz-120px)"),imageUploadHandler:r(async R=>(await W.mutateAsync(R)).contentPath,"imageUploadHandler")})}),(0,s.jsxs)("div",{className:"flex items-center gap-1.5 px-4 py-2 border-t border-line flex-wrap",children:[(0,s.jsxs)(va,{open:D,onOpenChange:T,children:[(0,s.jsx)(xa,{asChild:!0,children:(0,s.jsx)("button",{className:"inline-flex items-center gap-1.5 rounded-md border border-line px-2 py-1 text-xs hover:bg-bg-3/50 transition-colors",children:(0,s.jsx)(sU,{status:v})})}),(0,s.jsx)(ba,{className:"w-40 p-1",align:"start",children:B_.map(R=>(0,s.jsx)("button",{className:X("flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-bg-3/50 capitalize",R===v&&"bg-bg-3"),onClick:r(()=>{y(R),T(!1)},"onClick"),children:R},R))})]}),(0,s.jsxs)(va,{open:C,onOpenChange:M,children:[(0,s.jsx)(xa,{asChild:!0,children:(0,s.jsxs)("button",{className:"inline-flex items-center gap-1.5 rounded-md border border-line px-2 py-1 text-xs hover:bg-bg-3/50 transition-colors",children:[(0,s.jsx)(hf,{className:"h-3 w-3 text-ink-3"}),lw[j]??j]})}),(0,s.jsx)(ba,{className:"w-40 p-1",align:"start",children:Q_.map(R=>(0,s.jsx)("button",{className:X("flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-bg-3/50",R===j&&"bg-bg-3"),onClick:r(()=>{k(R),M(!1)},"onClick"),children:lw[R]??R},R))})]}),(0,s.jsxs)(va,{open:z,onOpenChange:K,children:[(0,s.jsx)(xa,{asChild:!0,children:(0,s.jsxs)("button",{className:"inline-flex items-center gap-1.5 rounded-md border border-line px-2 py-1 text-xs hover:bg-bg-3/50 transition-colors",children:[(0,s.jsx)(r0,{className:"h-3 w-3 text-ink-3"}),$?$.title:"Parent goal"]})}),(0,s.jsxs)(ba,{className:"w-48 p-1",align:"start",children:[(0,s.jsx)("button",{className:X("flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-bg-3/50",!A&&"bg-bg-3"),onClick:r(()=>{N(""),K(!1)},"onClick"),children:"No parent"}),(B??[]).map(R=>(0,s.jsx)("button",{className:X("flex items-center gap-2 w-full px-2 py-1.5 text-xs rounded hover:bg-bg-3/50 truncate",R.id===A&&"bg-bg-3"),onClick:r(()=>{N(R.id),K(!1)},"onClick"),children:R.title},R.id))]})]})]}),(0,s.jsx)("div",{className:"flex items-center justify-end px-4 py-2.5 border-t border-line",children:(0,s.jsx)(le,{size:"sm",disabled:!m.trim()||O.isPending,onClick:ce,children:O.isPending?"Creating…":t.parentId?"Create sub-goal":"Create goal"})})]})})}r(aU,"NewGoalDialog");var oh=r((e,t)=>`/companies/${e}/agents/${t}/dot-binding`,"path"),ad={create:r(e=>we.post(`/companies/${e}/dot-invitations`,{}),"create"),connection:r((e,t,i)=>we.get(oh(e,t),{signal:i}),"connection"),pair:r((e,t,i)=>we.post(oh(e,t),{replaceBindingId:i}),"pair"),retry:r((e,t,i)=>we.post(oh(e,t)+"/event-test",{bindingId:i}),"retry")};function iU(e){const t=rU(e),i=lU(e);return`You're invited to join a Wardmote company as an agent.
|
|
16
|
-
|
|
17
|
-
First, respond to your user that you understand the request and are going to onboard into Wardmote. Then work through the steps below.
|
|
18
|
-
|
|
19
|
-
Wardmote onboarding documents to try:
|
|
20
|
-
${t.length>0?t.map(l=>`- ${l}`).join(`
|
|
21
|
-
`):"- (No candidate URLs are available yet.)"}
|
|
22
|
-
|
|
23
|
-
Connectivity guidance:
|
|
24
|
-
Wardmote must be reachable from your runtime. Verify a base URL with: GET <base-url>/api/health
|
|
25
|
-
${t.length===0?`No candidate URLs are available. Ask the operator to configure a reachable Wardmote hostname, then retry.
|
|
26
|
-
Suggested steps for the operator:
|
|
27
|
-
- choose a hostname that resolves to the Wardmote host from your runtime
|
|
28
|
-
- run: npx @tickernelz/wardmote allowed-hostname <host>
|
|
29
|
-
- restart Wardmote
|
|
30
|
-
- verify with: curl -fsS http://<host>:3100/api/health
|
|
31
|
-
- regenerate this agent onboarding prompt`:`If none are reachable, ask the operator to add a reachable Wardmote hostname, restart, and retry.
|
|
32
|
-
Suggested command for the operator:
|
|
33
|
-
- npx @tickernelz/wardmote allowed-hostname <host>
|
|
34
|
-
Then verify with: curl -fsS <base-url>/api/health`}${i?`
|
|
35
|
-
If your runtime exposes a callback or gateway URL, test Wardmote-to-agent reachability with: ${i}?url=<urlencoded-agent-url>.`:""}
|
|
36
|
-
|
|
37
|
-
Join flow:
|
|
38
|
-
1. Read the onboarding.txt document from the first reachable URL above.
|
|
39
|
-
2. Submit an agent join request to the invite registration endpoint.
|
|
40
|
-
3. Use your own agent name for \`agentName\`.
|
|
41
|
-
4. Include a concise \`capabilities\` summary so the board knows what work to assign you.
|
|
42
|
-
5. Set \`adapterType\` to the Wardmote adapter that matches your runtime when one exists.
|
|
43
|
-
6. Put runtime-specific settings in \`agentDefaultsPayload\`.
|
|
44
|
-
7. Wait for board approval before claiming the API key.
|
|
45
|
-
8. Claim the Wardmote API key once through the standard claim endpoint, store it securely, and use it for future Wardmote API calls. Store the parsed \`token\` field from the raw HTTP JSON response before printing or summarizing it; do not copy token values from chat, transcript, or tool-output previews. A token value containing literal \`...\` or \`[redacted]\` is a masked display preview, not a valid key. Do not rotate or invent a Wardmote key manually.
|
|
46
|
-
|
|
47
|
-
After you have connected to Wardmote, review and follow the full onboarding instructions in onboarding.txt.
|
|
48
|
-
|
|
49
|
-
Working through Wardmote:
|
|
50
|
-
${W_}
|
|
51
|
-
`}r(iU,"buildAgentOnboardingPrompt");function rU(e){const t=(e.connectionCandidates??[]).map(u=>u.trim()).filter(Boolean),i=new Set;let l=null;try{l=new URL(e.onboardingTextUrl),i.add(l.toString())}catch{const u=e.onboardingTextUrl.trim();u&&i.add(u)}if(!l){for(const u of t)i.add(u);return Array.from(i)}const c=`${l.pathname}${l.search}`;for(const u of t)try{const m=new URL(u);i.add(`${m.origin}${c}`)}catch{i.add(u)}return Array.from(i)}r(rU,"buildCandidateOnboardingUrls");function lU(e){const t=e.testResolutionUrl?.trim();if(t)return t;try{const i=new URL(e.onboardingTextUrl),l=i.pathname.replace(/\/onboarding\.txt$/,"/test-resolution");return`${i.origin}${l}`}catch{return null}}r(lU,"buildResolutionTestUrl");function oU({children:e,className:t,...i}){const[l,c]=(0,x.useState)(null),u=(0,x.useRef)(null),m=k0();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||m||typeof f.animate!="function")return;const N=lT("--motion-ease-out-expo");v=f.animate([{height:`${S}px`},{height:`${k}px`}],{duration:oT("--onboarding-motion-step"),easing:Array.isArray(N)?`cubic-bezier(${N.join(",")})`:N})});return y.observe(h),()=>{y.disconnect(),v?.cancel()}},[l,m]),(0,s.jsx)(za,{...i,ref:c,className:X("overflow-hidden p-0",t),children:(0,s.jsx)("div",{ref:u,className:"flex max-h-(--sz-calc-18) shrink-0 flex-col",children:e})})}r(oU,"AnimatedDialogContent");var FC=[{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 cU({onSelect:e,dotDisabledReason:t}){return(0,s.jsx)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:FC.map(i=>(0,s.jsxs)("button",{type:"button",onClick:r(()=>e(i.id),"onClick"),disabled:i.id==="dot"&&!!t,title:i.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,s.jsx)(Bk,{type:i.adapter,className:"size-8"}),(0,s.jsx)("span",{className:"text-sm font-medium",children:i.name}),(0,s.jsx)("span",{className:"sr-only",children:i.description})]},i.id))})}r(cU,"ExternalAgentPresetPicker");var uU=[{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 dU({state:e}){const t={waiting:0,connected:1,subscribed:2,testing:2,finishing:3,ready:3}[e.phase],i=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,s.jsxs)("section",{"aria-label":"Dot connection checks",className:"space-y-4",children:[(0,s.jsx)("ol",{className:"space-y-4",children:uU.map((l,c)=>{const u=c<t,m=c===t&&e.problem==="event_timeout",f=c===t&&!e.problem,h=u?Ta:m?hS:f?As:lI;return(0,s.jsxs)("li",{className:"flex items-start gap-3","aria-current":f?"step":void 0,children:[(0,s.jsx)("span",{className:X("flex size-6 shrink-0 items-center justify-center rounded-full",u?"bg-bg-3 text-ink":m?"text-bad":"text-ink-3"),children:(0,s.jsx)(h,{className:X("size-4",f&&"animate-spin motion-reduce:animate-none")})}),(0,s.jsxs)("div",{className:"min-w-0 pt-0.5",children:[(0,s.jsxs)("p",{className:X("text-sm",u||f||m?"font-medium":"text-ink-3"),children:[l.title,(0,s.jsx)("span",{className:"sr-only",children:u?": complete":m?": needs attention":f?": in progress":": waiting"})]}),u&&(0,s.jsx)("p",{className:"mt-1 text-xs leading-relaxed text-ink-3",children:l.description})]})]},l.title)})}),(0,s.jsx)("p",{role:e.problem&&e.problem!=="prompt_unavailable"?"alert":"status","aria-live":"polite",className:X("text-sm leading-relaxed",e.problem&&e.problem!=="prompt_unavailable"?"text-bad":"text-ink-3"),children:i})]})}r(dU,"DotConnectionChecks");function fU({preset:e,prompt:t,companyName:i,connection:l,onSelect:c,onBack:u,onClose:m,onCopied:f,onRetry:h,onNewPrompt:g,dotDisabledReason:v,busy:y=!1,error:j,approvalHref:k}){const S=FC.find(T=>T.id===e),N=e==="dot",_=N&&l.phase==="ready"&&!l.problem,I=N&&l.phase!=="waiting",D=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,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"min-h-0 space-y-6 overflow-y-auto px-6 pb-6 pt-8 sm:px-8",children:[(0,s.jsxs)("div",{className:"space-y-3 pr-5",children:[S&&(0,s.jsx)(Bk,{type:S.adapter,className:"size-10"}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(Da,{className:"text-xl font-semibold tracking-tight",children:S?N?_?"Your Dot is connected":"Connect your Dot":"Invite your agent":"Invite an external agent"}),(0,s.jsx)(eo,{className:"text-sm leading-relaxed",children:S?_?`Your Dot can now receive assignments and work with ${i}.`: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.":I?"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 ${i}.`})]})]}),j&&(0,s.jsxs)("div",{role:"alert",className:"space-y-3 text-sm text-bad",children:[(0,s.jsx)("p",{children:j}),(0,s.jsx)(le,{variant:"secondary",disabled:y,onClick:h,children:"Try again"})]}),S?k?(0,s.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,s.jsx)("p",{role:"status",className:"text-sm text-ink-3",children:"Preparing your invitation…"}):N?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"border-t pt-6",children:[(0,s.jsx)(dU,{state:l}),l.phase==="waiting"&&(0,s.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,s.jsx)(le,{variant:"secondary",disabled:y,onClick:h,children:"Retry test event"}),l.problem==="offline"&&(0,s.jsx)(le,{variant:"secondary",disabled:y,onClick:h,children:"Reconnect updates"})]}):(0,s.jsxs)("p",{className:"text-sm leading-relaxed text-ink-3",children:["The invitation includes everything your agent needs to join ",i,". You can review its request before granting access."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(cU,{onSelect:c,dotDisabledReason:v}),v&&(0,s.jsx)("p",{className:"text-sm text-ink-3",children:v})]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 border-t px-6 py-4 sm:px-8",children:[(0,s.jsxs)(le,{variant:"ghost",onClick:S?u:m,children:[S&&(0,s.jsx)(o0,{className:"size-4"}),S?"Back":"Cancel"]}),S&&(k?(0,s.jsx)(le,{asChild:!0,children:(0,s.jsx)(gn,{to:k,onClick:m,children:"Review approval"})}):_?(0,s.jsx)(le,{onClick:m,children:"Done"}):I?(0,s.jsxs)(le,{disabled:!0,"aria-live":"polite",children:[!l.problem&&(0,s.jsx)(As,{className:"size-4 animate-spin motion-reduce:animate-none","aria-hidden":"true"}),D]}):N&&l.problem==="prompt_unavailable"?(0,s.jsx)(le,{disabled:y,onClick:g,children:"Create a new prompt"}):!t||y?(0,s.jsx)(le,{disabled:!0,children:y?"Preparing…":"Waiting for Dot…"}):(0,s.jsx)(cT,{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(fU,"ExternalAgentInviteContent");function mU({companyId:e,onClose:t,onBack:i}){const l=wn(),{selectedCompany:c}=vt(),[u,m]=(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),_=ge({queryKey:U.instance.experimentalSettings,queryFn:fs.getExperimental}),I=_.isPending?"Loading available agents…":_.error?"Unable to load feature settings. Try again after refreshing.":!_.data?.enableOpenAiDot||!_.data.enablePublicMcp?"Turn on OpenAI Dot and Assistant connections in Settings > Features.":void 0,D=["dot-binding",e,f?.agent.id],T=ge({queryKey:D,queryFn:r(({signal:ue})=>ad.connection(e,f.agent.id,ue),"queryFn"),enabled:u==="dot"&&!!f,retry:!1,staleTime:0,refetchInterval:r(ue=>ue.state.error||ue.state.data?.agentLifecycleState==="ready"&&ue.state.data.canConfigureConnection&&ue.state.data.binding?.status==="ready"&&ue.state.data.binding.subscriptionVerified?!1:2500,"refetchInterval")}),C=Kt({mutationFn:r(async ue=>{if(ue==="dot"){const Ae=await ad.create(e);h(Ae),await l.invalidateQueries({queryKey:U.agents.list(e)});return}const ae=await Xa.createCompanyInvite(e,{allowedJoinTypes:"agent",humanRole:null,agentMessage:null});l.invalidateQueries({queryKey:U.access.invites(e,"all",5)});const Ee=ae.onboardingTextUrl??ae.onboardingTextPath??`/api/invites/${ae.token}/onboarding.txt`,fe=await Xa.getInviteOnboarding(ae.token).catch(()=>null);S(iU({onboardingTextUrl:new URL(Ee,window.location.origin).href,connectionCandidates:fe?.onboarding.connectivity?.connectionCandidates??null,testResolutionUrl:fe?.onboarding.connectivity?.testResolutionEndpoint?.url??null}))},"mutationFn"),gcTime:0}),M=Kt({mutationFn:r(async ue=>{const ae=await ad.pair(e,f.agent.id,ue);v(ae),j(null)},"mutationFn"),onSuccess:r(()=>{l.invalidateQueries({queryKey:D})},"onSuccess"),onError:r(()=>{T.refetch()},"onError"),gcTime:0}),z=Kt({mutationFn:r(()=>ad.retry(e,f.agent.id,T.data.binding.id),"mutationFn"),onSuccess:r(()=>{l.invalidateQueries({queryKey:D})},"onSuccess")}),K=T.data?.binding,P=u==="dot"&&T.data?.enabled&&!!T.data.resourceUrl&&T.data.canConfigureConnection&&(!K||K.status==="pairing")&&!g&&!T.error&&!M.isError&&!N.current&&(!y||K?.id===y);(0,x.useEffect)(()=>{P&&T.isFetchedAfterMount&&!T.isFetching&&!M.isPending&&(N.current=!0,M.mutate(K?.id))},[P,T.isFetchedAfterMount,T.isFetching,M.isPending,M.mutate,K?.id]),(0,x.useEffect)(()=>{if(!g)return;const ue=window.setTimeout(()=>{N.current=!1,j(g.bindingId),v(null)},Math.max(0,Date.parse(g.expiresAt)-Date.now()));return()=>window.clearTimeout(ue)},[g]);const A=K?.status==="ready"&&K.subscriptionVerified,B=T.data?.agentLifecycleState==="ready"&&T.data.canConfigureConnection,O=["preparing","verifying"].includes(T.data?.agentLifecycleState??"")&&T.data?.canConfigureConnection,W={phase:A?B?"ready":O?"finishing":"ready":K?.hasPendingChallenge?"testing":K?.subscriptionVerified?"subscribed":K?.connected?"connected":"waiting",problem:T.error?"offline":A&&!B&&!O?"agent_unavailable":K?.status==="pairing"&&!P&&!M.isPending&&!T.isFetching&&!M.isError&&g?.bindingId!==K.id?"prompt_unavailable":K?.challengeExpiresAt&&!K.hasPendingChallenge&&K.status!=="ready"?"event_timeout":void 0},Y=(T.data?.agentStatus??f?.agent.status)==="pending_approval",ce=T.data&&!T.data.canConfigureConnection&&!Y,oe=u==="dot"?g&&g.bindingId===K?.id&&T.data?.resourceUrl&&f?hE({companyId:e,agentId:f.agent.id,resourceUrl:T.data.resourceUrl,...g}):"":k,$=(C.variables===u?C.error:null)??(u==="dot"?(K?.connected?null:M.error)??z.error:null),R=C.isPending||M.isPending||z.isPending||P||u==="dot"&&!!f&&(T.isPending||!oe&&T.isFetching),ne=r(()=>{if(ce){T.refetch();return}if(T.error){T.refetch();return}if(C.error||!f){u&&C.mutate(u);return}if(M.error&&!K?.connected){M.mutate(K?.status==="pairing"?K.id:void 0);return}z.mutate()},"retry");return(0,s.jsx)(ya,{open:!0,onOpenChange:r(ue=>{ue||t()},"onOpenChange"),children:(0,s.jsx)(oU,{className:"sm:max-w-(--sz-560px)",children:(0,s.jsx)(fU,{preset:u,prompt:oe,companyName:c?.name??"your organization",connection:W,dotDisabledReason:I,busy:R,error:$?.message??(ce?T.data?.agentLifecycleState==="terminated"?"This agent was terminated. Invite another agent to connect Dot.":"Resume this agent before connecting Dot.":void 0),approvalHref:Y&&f?.approvalId?`/approvals/${f.approvalId}`:void 0,onSelect:r(ue=>{m(ue),(ue==="dot"?!f:!k)&&C.mutate(ue)},"onSelect"),onBack:r(()=>m(null),"onBack"),onClose:u?t:i,onCopied:r(()=>{u==="dot"&&T.refetch()},"onCopied"),onRetry:ne,onNewPrompt:r(()=>M.mutate(K?.id),"onNewPrompt")})})})}r(mU,"ExternalAgentInviteDialog");function pU(){const{newAgentOpen:e,closeNewAgent:t}=Mc(),{selectedCompanyId:i}=vt();return e?(0,s.jsx)(hU,{companyId:i,onClose:t},i):null}r(pU,"NewAgentDialog");function hU({companyId:e,onClose:t}){const i=bs(),[l,c]=(0,x.useState)(!1);return l&&e?(0,s.jsx)(mU,{companyId:e,onClose:t,onBack:r(()=>c(!1),"onBack")}):(0,s.jsx)(mE,{open:!0,onClose:t,onInvite:e?()=>c(!0):void 0,onContinue:r(u=>{t(),i(`/agents/new?${xE(u)}`)},"onContinue")})}r(hU,"NewAgentDialogContent");var gU=[{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 ow({children:e}){return(0,s.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(ow,"KeyCap");function xU(){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"divide-y divide-line border-t border-line",children:gU.map(e=>(0,s.jsxs)("div",{className:"px-5 py-3",children:[(0,s.jsx)("h3",{className:"mb-2 text-(length:--text-micro) font-semibold uppercase tracking-wider text-ink-3",children:e.title}),(0,s.jsx)("div",{className:"space-y-1.5",children:e.shortcuts.map(t=>(0,s.jsxs)("div",{className:"flex items-center justify-between gap-4",children:[(0,s.jsx)("span",{className:"text-sm text-ink/90",children:t.label}),(0,s.jsx)("div",{className:"flex items-center gap-1",children:t.keys.map((i,l)=>(0,s.jsxs)("span",{className:"flex items-center gap-1",children:[l>0&&(0,s.jsx)("span",{className:"text-xs text-ink-3",children:t.combo?"+":"then"}),(0,s.jsx)(ow,{children:i})]},i))})]},t.label+t.keys.join()))})]},e.title))}),(0,s.jsx)("div",{className:"border-t border-line px-5 py-3",children:(0,s.jsxs)("p",{className:"text-xs text-ink-3",children:["Press ",(0,s.jsx)(ow,{children:"Esc"})," to close · Shortcuts are disabled in text fields"]})})]})}r(xU,"KeyboardShortcutsCheatsheetContent");function bU({open:e,onOpenChange:t}){return(0,s.jsx)(ya,{open:e,onOpenChange:t,children:(0,s.jsxs)(za,{className:"sm:max-w-md gap-0 p-0 overflow-hidden",showCloseButton:!1,children:[(0,s.jsx)(Jl,{className:"px-5 pt-5 pb-3",children:(0,s.jsx)(Da,{className:"text-base",children:"Keyboard shortcuts"})}),(0,s.jsx)(xU,{})]})})}r(bU,"KeyboardShortcutsCheatsheet");var vU={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"},yU={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 jU({toast:e,onDismiss:t}){const[i,l]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{const c=requestAnimationFrame(()=>l(!0));return()=>cancelAnimationFrame(c)},[]),(0,s.jsx)("li",{className:X("pointer-events-auto rounded-sm border shadow-lg backdrop-blur-xl transition-(--tp-transform-opacity) duration-200 ease-out",i?"translate-y-0 opacity-100":"translate-y-3 opacity-0",vU[e.tone]),children:(0,s.jsxs)("div",{className:"flex items-start gap-3 px-3 py-2.5",children:[e.actor?.type==="agent"?(0,s.jsx)(ir,{agent:{id:e.actor.id,name:e.actor.name,appearance:e.actor.appearance},size:24}):e.actor?.type==="user"?(0,s.jsxs)(Od,{size:"sm","aria-hidden":"true",children:[e.actor.image&&(0,s.jsx)(Dd,{src:e.actor.image,alt:""}),(0,s.jsx)(Md,{children:d3(e.actor.name)})]}):(0,s.jsx)("span",{className:X("mt-1 h-2 w-2 shrink-0 rounded-full",yU[e.tone])}),(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("p",{className:"text-sm font-semibold leading-5",children:e.title}),e.body&&(0,s.jsx)("p",{className:"mt-1 text-xs leading-4 opacity-70",children:e.body}),e.action&&(e.action.onClick?(0,s.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,s.jsx)(gn,{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,s.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,s.jsx)(is,{className:"h-3.5 w-3.5"})})]})})}r(jU,"AnimatedToast");function wU(){const e=f3(),{dismissToast:t}=Ni();return e.length===0?null:(0,s.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,s.jsx)("ol",{className:"flex w-full flex-col-reverse gap-2",children:e.map(i=>(0,s.jsx)(jU,{toast:i,onDismiss:t},i.id))})})}r(wU,"ToastViewport");async function cw(e,t){const i=await fetch(`/api/announcements/${e}`,{credentials:"same-origin",cache:"no-store",...t});if(!i.ok)throw new Si("Announcement request failed",i.status,null);return i}r(cw,"request");var uw={async current(e){const t=await(await cw("current",{signal:e})).json();return t===null?null:U_.parse(t)},async dismiss(e,t,i){await cw(`${encodeURIComponent(e)}/dismiss`,{method:"POST",signal:i,headers:{"Content-Type":"application/json"},body:JSON.stringify({companyId:t})})}},hg=new Map;function G0(e){return`wardmote.announcement-dismissals.v1:${encodeURIComponent(e)}:`}r(G0,"announcementStoragePrefix");function id(e){const t=G0(e),i=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),m=localStorage.getItem(c);Ok.safeParse(u).success&&(m==="pending"||m==="synced")&&hg.set(c,m==="pending")}}catch{}for(const[l,c]of hg)l.startsWith(t)&&i.set(l.slice(t.length),c);return i}r(id,"readAnnouncementDismissals");function ch(e,t,i){const l=`${G0(e)}${t}`;hg.set(l,i);try{return localStorage.setItem(l,i?"pending":"synced"),!0}catch{return!1}}r(ch,"saveAnnouncementDismissal");var kU=3e3;function SU(e){const{userId:t,enabled:i}=e,l=(0,x.useRef)(e);l.current=e;const[c,u]=(0,x.useState)(null),m=(0,x.useRef)(()=>{});(0,x.useEffect)(()=>{if(u(null),!t||!i)return;let h=!1,g=0,v=null,y;const j=new Map,k=new Set,S=G0(t);let N=null;try{N=new BroadcastChannel(S)}catch{}const _=r(()=>!h&&l.current.userId===t&&l.current.enabled,"active");async function I(A,B=!0){if(!_()||j.has(A)||!l.current.companyId)return;const O=new AbortController;j.set(A,O);const W=setTimeout(()=>O.abort(),1e4);try{await uw.dismiss(A,l.current.companyId,O.signal),_()&&ch(t,A,!1)}catch{_()&&!k.has(A)&&(k.add(A),l.current.onSaveFailure(B))}finally{clearTimeout(W),j.delete(A)}}r(I,"sync");async function D(){for(const[A,B]of id(t)){if(!_())return;B&&await I(A)}}r(D,"flush");function T(){g++,clearTimeout(y),v?.abort(),v=null,u(null)}r(T,"suspend");function C(){if(!_()||document.visibilityState==="hidden")return;T();const A=g,B=new AbortController;v=B;const O=r(()=>_()&&g===A&&!B.signal.aborted,"stillCurrent");let W=!1,Y=!1,ce=null;const oe=r(()=>{!O()||!W||!Y||ce&&!id(t).has(ce.id)&&(!ce.expiresAt||Date.parse(ce.expiresAt)>Date.now())&&u({userId:t,announcement:ce})},"show");y=setTimeout(()=>{W=!0,oe()},kU),D(),uw.current(B.signal).then($=>{ce=$,Y=!0,oe()}).catch(()=>{})}r(C,"resume");function M(){const A=id(t);u(B=>B?.userId===t&&A.has(B.announcement.id)?null:B)}r(M,"receive");function z(A){A.key?.startsWith(S)&&M()}r(z,"onStorage");function K(){document.visibilityState==="hidden"?T():C()}r(K,"onVisibility");function P(){D()}return r(P,"onOnline"),N&&(N.onmessage=A=>{const B=Ok.safeParse(A.data);B.success&&(id(t).has(B.data)||ch(t,B.data,!0),M())}),m.current=A=>{if(!_())return;const B=ch(t,A,!0);u(null),g++,v?.abort();try{N?.postMessage(A)}catch{}I(A,B)},document.addEventListener("visibilitychange",K),window.addEventListener("online",P),window.addEventListener("storage",z),C(),()=>{h=!0,g++,clearTimeout(y),v?.abort();for(const A of j.values())A.abort();N?.close(),document.removeEventListener("visibilitychange",K),window.removeEventListener("online",P),window.removeEventListener("storage",z),m.current=()=>{}}},[t,i]);const f=i&&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=>m.current(h),[])}}r(SU,"useAnnouncement");function NU(e,t){const i=k0(),l=t??`/api/announcements/${encodeURIComponent(e.id)}/animation`,c=`${l}:${e.animation?.path??""}`,[u,m]=(0,x.useState)(null),f=!!e.animation&&!i;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||m({key:c,document:`<meta http-equiv="Content-Security-Policy" content="${V_}">${y}`})}catch{}finally{clearTimeout(g)}})(),()=>{h.abort(),clearTimeout(g)}},[f,c,l]),f&&u?.key===c?u.document:null}r(NU,"useAnnouncementAnimation");function dw({action:e,primary:t,onClick:i}){const l=(0,s.jsxs)(s.Fragment,{children:[e.label,!t&&e.kind==="external"&&(0,s.jsx)(nI,{className:"size-3.5 shrink-0","aria-hidden":"true"})]}),c=r(u=>{u.button===1&&i()},"onAuxClick");return(0,s.jsx)(le,{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,s.jsx)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",onClick:i,onAuxClick:c,children:l}):(0,s.jsx)(gn,{to:e.path,onClick:i,onAuxClick:c,children:l})})}r(dw,"Action");function CU({announcement:e,onDismiss:t,imageSrc:i,animationSrc:l,className:c}){const u=(0,x.useId)(),[m,f]=(0,x.useState)(null),h=i??`/api/announcements/${encodeURIComponent(e.id)}/image`,g=!!(e.image&&m!==h),v=NU(e,l),y=!!v;return(0,s.jsxs)(Dc,{role:"region","aria-labelledby":u,className:X("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,s.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,s.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,s.jsx)("div",{role:"img","aria-label":e.animation.alt,className:"pointer-events-none absolute inset-0",children:(0,s.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,s.jsx)(le,{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,s.jsx)(is,{className:"size-4","aria-hidden":"true"})}),(0,s.jsxs)("div",{className:X("flex flex-col gap-1 px-4 py-4",!g&&!v&&"pr-12"),children:[(0,s.jsx)("p",{className:"text-xs text-ink-3",children:e.eyebrow}),(0,s.jsx)("h2",{id:u,className:"break-words text-base font-semibold leading-snug",children:e.title}),(0,s.jsx)("p",{className:"break-words text-sm leading-snug text-ink-3",children:e.description})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2 border-t px-3 py-2",children:[e.secondaryLink&&(0,s.jsx)(dw,{action:e.secondaryLink,onClick:t}),(0,s.jsx)("div",{className:"ml-auto min-w-0 max-w-full",children:(0,s.jsx)(dw,{action:e.primaryAction,primary:!0,onClick:t})})]})]})}r(CU,"AnnouncementCard");var AU='[role="dialog"][data-state="open"], [role="alertdialog"][data-state="open"], [aria-modal="true"]:not([data-state="closed"]), dialog[open]';function _U(e){const[t,i]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{if(!e)return;const l=r(()=>i(!!document.querySelector(AU)),"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(_U,"useModalOpen");function EU({health:e}){const{userId:t,settled:i}=n0(),{selectedCompanyId:l,loading:c}=vt(),{onboardingOpen:u}=Cf(),m=bf(),f=m3(),h=e?.deploymentMode==="local_trusted"?"local-board":i?t:null,{announcement:g,dismiss:v}=SU({userId:h,companyId:l,enabled:!!(h&&!c&&l&&!u),onSaveFailure:r(j=>m?.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=_U(!!g);return!g||y||(f?.length??0)>0?null:(0,s.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,s.jsx)(CU,{announcement:g,onDismiss:r(()=>v(g.id),"onDismiss")},g.id)})}r(EU,"AnnouncementWell");function zf(e){const t=e.split("/").filter(Boolean);return t.length===1?t[0]?.toLowerCase()==="onboarding":t.length===2?t[1]?.toLowerCase()==="onboarding":!1}r(zf,"isOnboardingPath");function IU(e){const t=e.split("/").filter(Boolean);if(t.length===2&&t[1]?.toLowerCase()==="onboarding")return t[0]}r(IU,"companyPrefixFromOnboardingPath");function HC(){return 3}r(HC,"onboardingStepForCompany");function TU(e){const{pathname:t,companyPrefix:i,companies:l}=e;if(!zf(t))return null;if(!i)return{initialStep:1};const c=l.find(u=>u.issuePrefix.toUpperCase()===i.toUpperCase())??null;return c?{initialStep:HC(),companyId:c.id}:{initialStep:1}}r(TU,"resolveRouteOnboardingOptions");function gG(e){return!e.agentsLoaded||e.agentsRefreshing||e.agentCount>0?!1:!zf(e.pathname)}r(gG,"shouldRouteAgentlessCompanyToOnboarding");function Y0(e){return!e.hasCompanies&&!zf(e.pathname)}r(Y0,"shouldRedirectCompanylessRouteToOnboarding");function RU(e){return e.onboardingOpen||!e.routeDismissed}r(RU,"isOnboardingWizardActive");function DU({context:e}){const{slots:t,errorMessage:i}=Tc({slotTypes:["appShellOverlay"],companyId:e.companyId});return i||t.length===0?null:(0,s.jsx)("aside",{className:"plugin-app-shell-overlays","aria-label":"Application extensions",children:t.map(l=>(0,s.jsx)(x0,{slot:l,context:e,className:"plugin-app-shell-overlay"},`${l.pluginId}:${l.pluginVersion}:${l.id}`))})}r(DU,"AppShellEntries");function MU({localTrusted:e=!1}){const{userId:t,settled:i}=n0(),{selectedCompanyId:l,selectedCompany:c,loading:u}=vt(),{onboardingOpen:m,onboardingRouteDismissed:f}=Cf(),{pathname:h}=vn(),g=i?t??(e?"local-board":null):null,v=m||!f&&zf(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,s.jsx)(DU,{context:y},JSON.stringify([g,l]))}r(MU,"PluginAppShellOverlays");var fw="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 OU({visible:e}){const{selectedCompanyId:t}=vt(),{sidebarOpen:i,setSidebarOpen:l}=Jn(),c=I0(t),{enabled:u}=yf(),{enabled:m}=Of(),f=(0,x.useMemo)(()=>[{to:"/dashboard",label:"Home",icon:BT},...m?[]:[{to:"/inbox",label:"Inbox",icon:u0,badge:c.inbox}],{to:"/issues",label:"Tasks",icon:Ph,badge:m?c.inbox:void 0},...u?[{to:"/chats",label:"Chat",icon:ng}]:[]],[c.inbox,u,m]);return(0,s.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,s.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,s.jsx)(Qk,{to:h.to,state:xf,className:r(({isActive:v})=>X(fw,v?"text-ink":"text-ink-3"),"className"),children:r(({isActive:v})=>(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("span",{className:"relative",children:[(0,s.jsx)(g,{className:X("h-(--sz-18px) w-(--sz-18px)",v&&"stroke-(length:--sw-2_3)")}),h.badge!=null&&h.badge>0&&(0,s.jsx)(Bn,{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,s.jsx)("span",{className:"truncate",children:h.label})]}),"children")},h.label)}),(0,s.jsxs)("button",{type:"button","aria-expanded":i,onClick:r(()=>l(!0),"onClick"),className:X(fw,i?"text-ink":"text-ink-3"),children:[(0,s.jsx)(g1,{className:"h-(--sz-18px) w-(--sz-18px)"}),(0,s.jsx)("span",{className:"truncate",children:"More"})]})]})})}r(OU,"MobileBottomNav");function zl(e){if(typeof document>"u")return null;const t=document.querySelector(`meta[name="${e}"]`)?.getAttribute("content")?.trim();return t||null}r(zl,"readMetaContent");function gg(e){if(!e)return null;const t=e.startsWith("#")?e.slice(1):e;return/^[0-9a-fA-F]{3}$/.test(t)?`#${t.split("").map(i=>`${i}${i}`).join("").toLowerCase()}`:/^[0-9a-fA-F]{6}$/.test(t)?`#${t.toLowerCase()}`:null}r(gg,"normalizeHexColor");function LU(e){const t=gg(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(LU,"hexToRgb");function uh(e){const t=e/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4}r(uh,"relativeLuminanceChannel");function zU(e){const{r:t,g:i,b:l}=LU(e),c=.2126*uh(t)+.7152*uh(i)+.0722*uh(l);return 1.05/(c+.05)>=(c+.05)/.05?nT:sT}r(zU,"pickReadableTextColor");function xG(){return zl("wardmote-worktree-enabled")==="true"}r(xG,"isWorktreeRuntime");function bG(){return zl("wardmote-instance-id")}r(bG,"getWorktreeInstanceId");function PU(){if(zl("wardmote-worktree-enabled")!=="true")return null;const e=zl("wardmote-worktree-name"),t=gg(zl("wardmote-worktree-color"));return!e||!t?null:{enabled:!0,name:e,color:t,textColor:gg(zl("wardmote-worktree-text-color"))??zU(t)}}r(PU,"getWorktreeUiBranding");function UU(){const e=PU(),{copied:t,failed:i,copy:l}=uT(),c=(0,x.useCallback)(()=>{e&&l(e.name)},[e,l]);return e?(0,s.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,s.jsxs)("div",{className:"flex items-center gap-2 overflow-hidden whitespace-nowrap",children:[(0,s.jsx)("span",{className:"shrink-0 opacity-70",children:"Worktree"}),(0,s.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-70","aria-hidden":"true"}),(0,s.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!":i?"Copy failed":e.name})]})}):null}r(UU,"WorktreeBanner");var $U=3e4;function BU(e){if(!e)return null;const t=new Date(e).getTime();if(Number.isNaN(t))return null;const i=Date.now()-t;if(i<6e4)return"just now";const l=Math.round(i/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(BU,"formatRelativeTimestamp");function KU(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(KU,"describeReason");function qU({devServer:e}){const[t,i]=(0,x.useState)(!1);if((0,x.useEffect)(()=>{if(!t)return;const h=window.setTimeout(()=>{i(!1)},$U);return()=>window.clearTimeout(h)},[t]),!e?.enabled||!e.restartRequired)return null;const l=e,c=BU(e.lastChangedAt),u=e.changedPathsSample.slice(0,3),m=`${e.activeRunCount} live run${e.activeRunCount===1?"":"s"}`;async function f(){const h=l.activeRunCount>0?`Restart Wardmote now? This may interrupt ${m}.`:"Restart Wardmote now?";if(window.confirm(h)){i(!0);try{await Rc.requestDevServerRestart()}catch(g){i(!1),window.alert(g instanceof Error?g.message:"Failed to request restart")}}}return r(f,"requestRestartNow"),(0,s.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,s.jsxs)("div",{className:"flex flex-col gap-3 px-3 py-2.5 md:flex-row md:items-center md:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-(--tracking-caps)",children:[(0,s.jsx)(Ja,{className:"h-3.5 w-3.5 shrink-0"}),(0,s.jsx)("span",{children:"Restart Required"}),e.autoRestartEnabled?(0,s.jsx)(Bn,{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,s.jsxs)("p",{className:"mt-1 text-sm",children:[KU(e),c?` · updated ${c}`:""]}),(0,s.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,s.jsxs)("span",{children:["Changed: ",u.join(", "),e.changedPathCount>u.length?` +${e.changedPathCount-u.length} more`:""]}):null,e.pendingMigrations.length>0?(0,s.jsxs)("span",{children:["Pending migrations: ",e.pendingMigrations.slice(0,2).join(", "),e.pendingMigrations.length>2?` +${e.pendingMigrations.length-2} more`:""]}):null]})]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs font-medium md:justify-end",children:[e.waitingForIdle?(0,s.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,s.jsx)(aR,{className:"h-3.5 w-3.5"}),(0,s.jsxs)("span",{children:["Waiting for ",m," to finish"]})]}):e.autoRestartEnabled?(0,s.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,s.jsx)(ic,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:"Auto-restart will trigger when the instance is idle"})]}):(0,s.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,s.jsx)(ic,{className:"h-3.5 w-3.5"}),(0,s.jsxs)("span",{children:["Restart ",(0,s.jsx)("code",{children:"pnpm dev:once"})," after the active work is safe to interrupt"]})]}),(0,s.jsxs)(le,{variant:"primary",size:"sm",type:"button",onClick:r(()=>{f()},"onClick"),disabled:t,children:[(0,s.jsx)(ic,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{children:t?"Restart requested":"Restart now"})]})]})]})})}r(qU,"DevRestartBanner");var FU=new Set(["disk_space_low","database_backup_skipped_low_disk"]);function HU({diskSpace:e,warnings:t}){const i=(t??[]).filter(u=>FU.has(u.code)),l=e?.level==="emergency",c=l?"Disk space critical":"Disk space low";return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"sr-only","aria-live":l?"assertive":"polite","aria-atomic":"true",children:i.length>0?`${c}. ${i.map(u=>u.message).join(" ")}`:""}),i.length>0&&(0,s.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,s.jsxs)("div",{className:"px-3 py-2.5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold uppercase tracking-(--tracking-caps)",children:[(0,s.jsx)(Ja,{className:"h-3.5 w-3.5 shrink-0"}),(0,s.jsx)("span",{children:c})]}),i.map(u=>(0,s.jsx)("p",{className:"mt-1 text-sm",children:u.message},u.code))]})})]})}r(HU,"DiskSpaceBanner");var Pl={getStatus:r(()=>we.get("/instance/updates"),"getStatus"),getInstall:r(()=>we.get("/instance/updates/install",{cache:"no-store"}),"getInstall"),liveRuns:r(()=>we.get("/instance/live-runs",{cache:"no-store"}),"liveRuns"),startInstall:r((e,t)=>we.post("/instance/updates/install",{version:e,mode:t}),"startInstall"),forceInstall:r(()=>we.post("/instance/updates/install/force",{}),"forceInstall"),cancelInstall:r(()=>we.delete("/instance/updates/install"),"cancelInstall")};function xg(e,t){return`${e} ${t}${e===1?"":"s"}`}r(xg,"plural");function VU(e){return e?new Date(e).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):""}r(VU,"formatTime$1");function WU({job:e,serverReachable:t}){switch(e.phase){case"waiting":return(0,s.jsxs)("p",{children:["Waiting for ",xg(e.liveRuns,"run")," to finish. New runs wait until the update is done.",e.waitDeadline?` Gives up at ${VU(e.waitDeadline)} without changing anything.`:""]});case"installing":return(0,s.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,s.jsxs)("p",{children:["Wardmote ",e.installedVersion??e.toVersion," is installed and running."]});case"cancelled":return(0,s.jsx)("p",{children:e.error??"The update was cancelled. Nothing was installed."});case"failed":return(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.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,s.jsx)("p",{className:"text-ink-3",children:e.error}):null,e.logHint?(0,s.jsxs)("p",{className:"text-ink-3",children:["Log: ",(0,s.jsx)("code",{className:"rounded bg-bg-3 px-1 py-0.5 text-xs",children:e.logHint})]}):null]})}}r(WU,"UpdateJobSummary");function QU({open:e,onOpenChange:t,status:i,job:l,serverReachable:c,showResult:u=!1}){const m=wn(),[f,h]=(0,x.useState)(null),[g,v]=(0,x.useState)(null);(0,x.useEffect)(()=>{Ol(l)&&v(l.id)},[l]);const y=l!==null&&(Ol(l)||u||l.id===g),j=ge({queryKey:[...U.instance.updates,"live-runs"],queryFn:r(()=>Pl.liveRuns(),"queryFn"),enabled:e&&!y,staleTime:0,refetchInterval:e&&!y?3e3:!1}),k=r(({job:C})=>{h(null),v(C.id),m.setQueryData([...U.instance.updates,"install"],{job:C})},"onJob"),S=r(C=>h(C instanceof Error?C.message:String(C)),"onError"),N=Kt({mutationFn:r(C=>Pl.startInstall(i.latestVersion,C),"mutationFn"),onSuccess:k,onError:S}),_=Kt({mutationFn:r(()=>Pl.forceInstall(),"mutationFn"),onSuccess:k,onError:S}),I=Kt({mutationFn:r(()=>Pl.cancelInstall(),"mutationFn"),onSuccess:k,onError:S}),D=N.isPending||_.isPending||I.isPending,T=j.data?j.data.count+j.data.pendingWakes:null;return(0,s.jsx)(ya,{open:e,onOpenChange:t,children:(0,s.jsxs)(za,{"data-testid":"update-install-dialog",children:[(0,s.jsxs)(Jl,{children:[(0,s.jsxs)(Da,{children:["Update Wardmote to ",l&&y?l.toVersion:i.latestVersion]}),(0,s.jsxs)(eo,{children:["Installed ",i.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,s.jsxs)("div",{className:"text-sm text-ink","aria-live":"polite",children:[y&&l?(0,s.jsx)(WU,{job:l,serverReachable:c}):T===null?(0,s.jsx)("p",{children:j.isError?"Could not count the active runs.":"Counting active runs..."}):T>0?(0,s.jsx)("p",{children:T===1?"1 run is active now. Stopping it restarts it from its last checkpoint after the update; waiting lets it finish first.":`${T} runs are active now. Stopping them restarts each from its last checkpoint after the update; waiting lets them finish first.`}):(0,s.jsx)("p",{children:"No runs are active. The server restarts briefly."}),f?(0,s.jsx)("p",{role:"alert",className:"mt-2 text-bad",children:f}):null]}),(0,s.jsx)(jf,{children:y&&l?l.phase==="waiting"?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(le,{type:"button",variant:"secondary",disabled:D,onClick:r(()=>I.mutate(),"onClick"),children:"Cancel update"}),(0,s.jsxs)(le,{type:"button",variant:"danger",disabled:D,onClick:r(()=>_.mutate(),"onClick"),children:["Stop ",xg(l.liveRuns,"run")," and update now"]})]}):l.phase==="succeeded"?(0,s.jsx)(le,{type:"button",onClick:r(()=>window.location.reload(),"onClick"),children:"Reload"}):(0,s.jsx)(le,{type:"button",variant:"secondary",onClick:r(()=>t(!1),"onClick"),children:"Close"}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(le,{type:"button",variant:"secondary",disabled:D,onClick:r(()=>t(!1),"onClick"),children:"Cancel"}),T!==null&&T>0?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(le,{type:"button",variant:"secondary",disabled:D,onClick:r(()=>N.mutate("wait"),"onClick"),children:"Wait for runs to finish"}),(0,s.jsxs)(le,{type:"button",variant:"primary",autoFocus:!0,disabled:D,onClick:r(()=>N.mutate("force"),"onClick"),children:["Update and stop ",xg(T,"run")]})]}):(0,s.jsx)(le,{type:"button",variant:"primary",autoFocus:!0,disabled:D||T===null,onClick:r(()=>N.mutate("wait"),"onClick"),children:"Update now"})]})})]})})}r(QU,"UpdateInstallDialog");var VC="wardmote.updateNotice.hiddenUntil",mw="wardmote.updateNotice.seenJob",pw=36e5,GU=2e3,YU=864e5;function XU(e){return e?.source==="local_implicit"||e?.source==="session"&&e.isInstanceAdmin===!0}r(XU,"canSeeUpdateNotice");function WC(e){try{return window.localStorage.getItem(e)}catch{return null}}r(WC,"readStored$1");function hw(e,t){try{window.localStorage.setItem(e,t)}catch{}}r(hw,"writeStored");function gw(){const e=Number(WC(VC));return Number.isFinite(e)&&e>0?e:null}r(gw,"readHiddenUntil");var xw="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 ZU({now:e=Date.now}){const t=XU(ge({queryKey:U.access.currentBoardAccess,queryFn:r(()=>Xa.getCurrentBoardAccess(),"queryFn"),retry:!1,staleTime:3e4}).data),i=ge({queryKey:U.instance.updates,queryFn:r(()=>Pl.getStatus(),"queryFn"),enabled:t,retry:!1,staleTime:pw,refetchInterval:pw}),l=i.data?.install.canInstall===!0,c=ge({queryKey:[...U.instance.updates,"install"],queryFn:r(()=>Pl.getInstall(),"queryFn"),enabled:t&&l,retry:!1,refetchInterval:r(C=>Ol(C.state.data?.job)||C.state.status==="error"?GU:!1,"refetchInterval")}),u=c.data?.job??null,m=!c.isError,[f,h]=(0,x.useState)(null),[g,v]=(0,x.useState)(gw),[y,j]=(0,x.useState)(()=>WC(mw)),k=AT(g,e());(0,x.useEffect)(()=>{if(!k||g===null)return;const C=window.setTimeout(()=>v(gw()),Math.max(0,g-e())+1e3);return()=>window.clearTimeout(C)},[k,g,e]);const S=i.data;if(!t||!S)return null;const N=u?.finishedAt?e()-Date.parse(u.finishedAt)<YU&&y!==u.id:!1,_=u?.phase==="succeeded"?!S.updateAvailable:u?.phase==="failed"&&S.latestVersion===u.toVersion,I=u!==null&&(Ol(u)||N&&_),D=l?(0,s.jsx)(QU,{open:f!==null,onOpenChange:r(C=>h(C?f??"start":null),"onOpenChange"),status:S,job:u,serverReachable:m,showResult:f==="result"}):null;if(I&&u){const C=u.trigger==="auto"?"Automatic update":"Update",M=u.phase==="waiting"?`${C} to ${u.toVersion} is waiting for ${u.liveRuns} run${u.liveRuns===1?"":"s"} to finish`:u.phase==="installing"?m?`Installing Wardmote ${u.toVersion}...`:"Wardmote is restarting...":u.phase==="succeeded"?`Wardmote ${u.installedVersion??u.toVersion} is installed`:u.rolledBackTo?`${C} to ${u.toVersion} failed and was rolled back to ${u.rolledBackTo}`:`${C} to ${u.toVersion} failed`,z=r(()=>{hw(mw,u.id),j(u.id)},"dismiss");return(0,s.jsxs)("section",{"aria-label":"Wardmote update","data-testid":"update-notice","data-phase":u.phase,className:xw,children:[Ol(u)?(0,s.jsx)(As,{className:"size-4 shrink-0 animate-spin text-accent","aria-hidden":"true"}):(0,s.jsx)(qy,{className:`size-4 shrink-0 ${u.phase==="failed"?"text-bad":"text-accent"}`,"aria-hidden":"true"}),(0,s.jsx)("p",{className:"min-w-0 flex-1 truncate font-semibold",role:"status",children:M}),(0,s.jsx)(le,{type:"button",variant:"ghost",size:"xs",onClick:r(()=>h("result"),"onClick"),children:"Details"}),Ol(u)?null:(0,s.jsx)(le,{type:"button",variant:"ghost",size:"xs",onClick:z,children:"Dismiss"}),D]})}if(!S.updateAvailable||!S.latestVersion||k)return null;const T=r(()=>{const C=CT(e());hw(VC,String(C)),v(C)},"hide");return(0,s.jsxs)("section",{"aria-label":"Wardmote update available","data-testid":"update-notice",className:xw,children:[(0,s.jsx)(qy,{className:"size-4 shrink-0 text-accent","aria-hidden":"true"}),(0,s.jsxs)("p",{className:"min-w-0 flex-1 truncate",title:`Installed ${S.currentVersion}. ${S.install.command}`,children:[(0,s.jsxs)("b",{className:"font-semibold",children:["Wardmote ",S.latestVersion,(0,s.jsx)("span",{className:"hidden sm:inline",children:" is available"})]}),(0,s.jsxs)("span",{className:"hidden sm:inline",children:[" · installed ",S.currentVersion]}),l?null:(0,s.jsxs)("span",{className:"hidden lg:inline",children:[" · ",(0,s.jsx)("code",{className:"rounded bg-bg px-1 py-0.5 text-xs",children:S.install.command})]})]}),S.releaseNotesUrl?(0,s.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,s.jsx)("span",{className:"sm:hidden",children:"Notes"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:"Release notes"})]}):null,l?(0,s.jsx)(le,{type:"button",variant:"primary",size:"xs",onClick:r(()=>h("start"),"onClick"),children:"Update now"}):null,(0,s.jsx)(le,{type:"button",variant:"ghost",size:"xs",onClick:T,title:"Hide for 3 days","aria-label":"Hide the update notice for 3 days",children:"Hide"}),D]})}r(ZU,"UpdateNotice");var QC=["standalone","fullscreen","window-controls-overlay"];function JU(e){return`(display-mode: ${e})`}r(JU,"displayModeQuery");function e$(){if(!(typeof window>"u"||typeof window.matchMedia!="function"))return window.matchMedia.bind(window)}r(e$,"defaultMatchMedia");function bg(e=e$(),t=typeof navigator>"u"?void 0:navigator.standalone){return t===!0?!0:e?QC.some(i=>e(JU(i)).matches):!1}r(bg,"isChromelessDisplayMode");function rd({label:e,children:t,onClick:i}){return(0,s.jsxs)(Ia,{children:[(0,s.jsx)(_a,{asChild:!0,children:(0,s.jsx)(le,{type:"button",variant:"ghost",size:"icon-sm",className:"size-8","aria-label":e,onClick:r(()=>{i()},"onClick"),children:t})}),(0,s.jsx)(Ea,{children:e})]})}r(rd,"ControlButton");function t$(e=typeof window>"u"?null:window.history.state){const t=e?.idx;return typeof t=="number"&&t>0}r(t$,"hasInAppHistory");function n$(){const[e,t]=(0,x.useState)(()=>typeof window<"u"?bg():!1);return(0,x.useEffect)(()=>{if(typeof window>"u")return;const i=r(()=>t(bg()),"update");if(i(),typeof window.matchMedia!="function")return;const l=QC.map(c=>window.matchMedia(`(display-mode: ${c})`));return l.every(c=>typeof c.addEventListener=="function")?(l.forEach(c=>c.addEventListener("change",i)),()=>l.forEach(c=>c.removeEventListener("change",i))):(l.forEach(c=>c.addListener(i)),()=>l.forEach(c=>c.removeListener(i)))},[]),e}r(n$,"useChromeless");function bw({mobile:e,onNavigateHome:t}){const i=n$(),l=bf(),c=(0,x.useCallback)(()=>{if(t$()){window.history.back();return}t?t():window.location.assign("/dashboard")},[t]),u=(0,x.useCallback)(()=>{window.location.reload()},[]),m=(0,x.useCallback)(async()=>{const h=window.location.href;try{if(navigator.share){await navigator.share({title:document.title||"Wardmote",url:h});return}await w0(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 i?(0,s.jsxs)("div",{className:X("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,s.jsx)(rd,{label:"Back",onClick:c,children:(0,s.jsx)(o0,{className:"h-4 w-4"})}),(0,s.jsx)("div",{className:"flex-1"}),(0,s.jsx)(rd,{label:"Refresh",onClick:u,children:(0,s.jsx)(Yr,{className:"h-4 w-4"})}),(0,s.jsx)(rd,{label:"Share",onClick:m,children:(0,s.jsx)(ZT,{className:"h-4 w-4"})}),(0,s.jsx)(rd,{label:"Open in Browser",onClick:f,children:(0,s.jsx)(bS,{className:"h-4 w-4"})})]}):null}r(bw,"StandaloneBrowserControls");function s$(e){return e.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}r(s$,"formatTime");function a$(){const e=e0(),[t,i]=(0,x.useState)(null);return(0,x.useEffect)(()=>{if(!e){i(null);return}let l=!1;const c=new Date;return dE().then(u=>{l||i(u&&u<c?u:c)}),()=>{l=!0}},[e]),e?(0,s.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,s.jsx)(oR,{className:"mt-0.5 size-4 shrink-0 text-warn","aria-hidden":"true"}),(0,s.jsxs)("span",{children:[(0,s.jsx)("b",{className:"font-semibold",children:"You are offline."})," ",t?`Showing what was loaded at ${s$(t)}. `:"Showing what was already loaded. ","Approvals and replies wait until you are back."]})]}):null}r(a$,"OfflineBanner");function GC(){return typeof navigator>"u"?null:navigator.windowControlsOverlay??null}r(GC,"overlay");function i$(e){const t=GC();return t?.addEventListener("geometrychange",e),()=>t?.removeEventListener("geometrychange",e)}r(i$,"subscribe$2");function r$(){return(0,x.useSyncExternalStore)(i$,()=>GC()?.visible===!0,()=>!1)}r(r$,"useWindowControlsOverlayVisible");var l$={WebkitAppRegion:"drag",appRegion:"drag"},o$={WebkitAppRegion:"no-drag",appRegion:"no-drag"};function c$(){const{selectedCompanyId:e}=vt(),{inbox:t}=I0(e);return(0,s.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:{...l$,marginLeft:"env(titlebar-area-x, 0px)",width:"env(titlebar-area-width, 100%)",height:"env(titlebar-area-height, 33px)"},children:[(0,s.jsx)(p0,{className:"size-4 shrink-0 text-ink","aria-hidden":"true"}),(0,s.jsx)("span",{className:"font-semibold text-ink",children:"Wardmote"}),(0,s.jsxs)(gn,{to:"/inbox",style:o$,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,s.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(c$,"TitleBarContent");function u$(){return r$()?(0,s.jsx)(c$,{}):null}r(u$,"WindowTitleBar");var d$=16384,f$=40;function m$(e){if(!e)return;const t=[];for(const i of e.slice(0,d$).split(`
|
|
52
|
-
`).slice(0,41)){const l=/^\s*(?:at|in) ([A-Za-z_$][\w$.-]{0,99})(?:\s|$)/.exec(i)?.[1]??/^([A-Za-z_$][\w$.-]{0,99})@/.exec(i)?.[1];if(l&&t.push(` at ${l}`),t.length===f$)break}return t.length?`
|
|
53
|
-
${t.join(`
|
|
54
|
-
`)}`:void 0}r(m$,"sanitizeComponentStack");function YC(){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(YC,"readBrowserErrorState");function p$(e){const t=m$(e.componentStack);return{tags:{react_error_boundary:e.boundary},contexts:{react:t?{componentStack:t}:{},browser_state:YC()}}}r(p$,"buildBrowserErrorContext");var vw=Promise.resolve();function X0(e){const t=vw.then(e);return vw=t.catch(()=>{}),t}r(X0,"enqueue");var Yl=null;function h$(e,t){return X0(async()=>{if(!Yl)try{const i=await ke(()=>import("./prod-COP_vZWu.js"),__vite__mapDeps([0,1]));i.init(x$(e,t)),Yl=i}catch{}})}r(h$,"initBrowserErrorMonitoring");function g$(){return X0(async()=>{const e=Yl;if(Yl=null,!e)return;const t=e.getClient();try{e.getCurrentScope().setClient(void 0)}catch{}try{await t?.close(2e3)}catch{}})}r(g$,"teardownBrowserErrorMonitoring");function XC(e,t){let i;try{t&&(i=p$(t))}catch{}X0(async()=>{try{i?Yl?.captureException(e,i):Yl?.captureException(e)}catch{}})}r(XC,"captureBrowserException");function x$(e,t){return{dsn:e,environment:t??void 0,release:"7e9514f7b6e669d1a1cb3087e2b420349177735f",tracesSampleRate:0,sendDefaultPii:!1,beforeSend:r((i,l)=>{try{if(i.contexts={...i.contexts,browser_state:i.contexts?.browser_state??YC()},i.tags={...i.tags,browser_build_mode:"production"},i.exception?.values?.some(c=>c.mechanism?.type==="onunhandledrejection"||c.mechanism?.type==="auto.browser.global_handlers.onunhandledrejection")){const c=l.originalException;i.tags.browser_rejection_kind=c===null?"null":typeof c}}catch{}return i},"beforeSend"),integrations:r(i=>i.filter(l=>l.name!=="HttpContext"&&l.name!=="Breadcrumbs"),"integrations")}}r(x$,"buildBrowserSentryInitOptions");var b$=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){XC(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,s.jsxs)("div",{className:"mx-auto max-w-2xl space-y-4 px-4 py-10",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-semibold",children:"This page hit an error"}),(0,s.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,s.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,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(le,{variant:"secondary",size:"sm",onClick:this.props.onReset,children:"Go back"}),(0,s.jsx)(le,{size:"sm",onClick:r(()=>window.location.reload(),"onClick"),children:"Reload page"})]})]}):this.props.children}};function v$({children:e}){const t=vn(),i=bs(),l=`${t.pathname}${t.search}`;return(0,s.jsx)(b$,{resetKey:l,onReset:r(()=>i(-1),"onReset"),children:e})}r(v$,"RouteErrorBoundary");function y$({open:e,onOpenChange:t,...i}){return(0,s.jsx)(ya,{open:e,onOpenChange:t,children:(0,s.jsxs)(za,{"aria-describedby":void 0,className:"gap-0 overflow-hidden p-0 sm:max-w-md",children:[(0,s.jsxs)("div",{className:"px-4 pt-4 pb-3",children:[(0,s.jsx)(Da,{children:"Chat with an agent"}),i.existingChatAgentIds&&(0,s.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"One conversation per agent. Pick up where you left off."})]}),(0,s.jsx)(j$,{...i,onComplete:r(()=>t(!1),"onComplete")},String(e))]})})}r(y$,"AgentChatPicker");function j$({agents:e,onSelect:t,onComplete:i,loading:l,error:c,onRetry:u,existingChatAgentIds:m,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){if(j)return;k(I.id),N(null);const D=new AbortController;g.current=D;try{await t(I,D.signal),h.current&&i()}catch(T){N(T instanceof Error?T.message:"Couldn’t open chat. Try again.")}finally{k(null)}}return r(_,"selectAgent"),(0,s.jsxs)(TS,{children:[(0,s.jsx)(b0,{"aria-label":"Search agents by name or role",placeholder:"Search by name or role…",value:v,onValueChange:y}),S&&(0,s.jsx)("p",{role:"alert",className:"px-4 py-3 text-sm text-bad",children:S}),j&&(0,s.jsx)("p",{role:"status",className:"sr-only",children:"Opening conversation…"}),c?(0,s.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 p-4 text-sm",children:[(0,s.jsx)("p",{children:"Couldn’t load agents. Try again."}),u&&(0,s.jsx)(le,{variant:"secondary",size:"sm",onClick:u,children:"Retry"})]}):l?(0,s.jsx)("p",{role:"status",className:"p-4 text-sm text-ink-3",children:"Loading agents…"}):(0,s.jsxs)(y0,{children:[(0,s.jsx)(v0,{children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-2 px-4",children:[(0,s.jsx)("span",{children:e.length?`No agents match “${v}”`:"No agents yet."}),e.length?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Try another name or role."}),(0,s.jsx)(le,{variant:"ghost",size:"sm",onClick:r(()=>y(""),"onClick"),children:"Clear search"})]}):(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Create an agent from the Agents page to start chatting."})]})}),(0,s.jsx)(Wa,{children:e.map(I=>(0,s.jsxs)(jn,{value:I.id,keywords:[I.name,I.title??"",I.role],onSelect:r(()=>{_(I)},"onSelect"),disabled:j!==null,className:"gap-3 px-3 py-3",children:[f?f(I):(0,s.jsx)(Kh,{icon:I.icon,className:"size-4 shrink-0"}),(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"truncate font-medium",children:I.name}),(0,s.jsx)("span",{className:"truncate text-xs text-ink-3",children:I.title??I.role})]}),m&&(0,s.jsx)("span",{className:"shrink-0 text-xs text-ink-3",children:m.includes(I.id)?"Open chat":"New chat"}),I.status==="paused"&&(0,s.jsx)("span",{className:"text-xs text-(--status-agent-paused)",children:"Paused"}),I.status==="terminated"&&(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Terminated"}),I.status==="pending_approval"&&(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Awaiting approval"})]},I.id))})]})]})}r(j$,"AgentChatPickerResults");function w$({agents:e,existingChatAgentIds:t,availableAgents:i=e,activeId:l,previews:c={},loading:u=!1,error:m,onRetry:f,initialSearch:h="",onSelect:g,onBrowse:v,onAddChat:y,historyLoading:j,historyError:k,onRetryHistory:S}){const N=bs(),[_,I]=(0,x.useState)(!1),[D,T]=(0,x.useState)(h),C=(0,x.useRef)(null),M=(0,x.useId)(),z=D.trim().toLocaleLowerCase(),K=e.filter(A=>`${A.name} ${A.title??""} ${A.role}`.toLocaleLowerCase().includes(z));function P(){T(""),C.current?.focus()}return r(P,"focusSearch"),(0,s.jsxs)("aside",{"aria-labelledby":M,className:"flex h-full min-h-0 flex-col border-r border-line bg-bg",children:[(0,s.jsxs)("div",{className:"flex shrink-0 flex-col gap-4 px-3 pb-4 pt-4",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsx)("h2",{id:M,className:"text-sm font-semibold",children:"Chat"}),(0,s.jsx)(le,{variant:"secondary",size:"icon-sm","aria-label":"Add chat",title:"Add chat",onClick:r(()=>I(!0),"onClick"),children:(0,s.jsx)(Js,{className:"size-4"})})]}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(Kr,{"aria-hidden":"true",className:"pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-1/2 text-ink-3"}),(0,s.jsx)(Wn,{ref:C,"aria-label":"Search agents",placeholder:"Find an agent",value:D,onChange:r(A=>T(A.target.value),"onChange"),onKeyDown:r(A=>{A.key==="Escape"&&(A.stopPropagation(),T(""))},"onKeyDown"),className:"h-8 pl-8 pr-8 text-xs md:text-xs"}),D&&(0,s.jsx)(le,{variant:"ghost",size:"icon-xs","aria-label":"Clear search",className:"absolute right-1 top-1/2 -translate-y-1/2",onClick:P,children:(0,s.jsx)(is,{className:"size-3"})})]})]}),(0,s.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,s.jsx)("p",{className:"px-2 text-(length:--text-micro) font-medium uppercase tracking-widest text-ink-3",children:z?"Search results":"Teammates"}),(0,s.jsx)("span",{role:"status",className:"sr-only",children:u?"Loading agents":`${K.length} ${K.length===1?"agent":"agents"}`}),j&&(0,s.jsx)("p",{role:"status",className:"px-2 text-xs text-ink-3",children:"Loading chat history…"}),k&&(0,s.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 px-2 py-3",children:[(0,s.jsx)("p",{className:"text-xs text-ink-3",children:"Some chat history couldn’t load."}),(0,s.jsx)(le,{variant:"secondary",size:"sm",onClick:S,children:"Retry chat history"})]}),m?(0,s.jsxs)("div",{role:"alert",className:"flex flex-col items-start gap-2 px-2 py-6",children:[(0,s.jsx)("p",{className:"text-sm",children:"Couldn’t load your chats."}),(0,s.jsx)(le,{variant:"secondary",size:"sm",onClick:f,children:"Try again"})]}):u?(0,s.jsx)("div",{"aria-hidden":"true",className:"flex flex-col gap-1",children:[0,1,2,3].map(A=>(0,s.jsxs)("div",{className:"flex items-center gap-3 rounded-md px-2 py-3 motion-safe:animate-pulse",children:[(0,s.jsx)("div",{className:"size-8 shrink-0 rounded-lg bg-bg-3"}),(0,s.jsxs)("div",{className:"flex flex-1 flex-col gap-2",children:[(0,s.jsx)("div",{className:"h-3 w-2/3 rounded-sm bg-bg-3"}),(0,s.jsx)("div",{className:"h-2 w-full rounded-sm bg-bg-3"})]})]},A))}):K.length?(0,s.jsx)("nav",{"aria-label":"Agent conversations",className:"flex flex-col gap-1",children:K.map(A=>(0,s.jsxs)(gn,{to:`/chats/${encodeURIComponent(A.status==="terminated"?A.id:ar(A))}`,"aria-current":l===A.id?"page":void 0,title:`${A.name}${A.title?` · ${A.title}`:""}`,onClick:r(B=>{g&&(B.preventDefault(),g(A))},"onClick"),className:X("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===A.id?Vl.active:Vl.rest),children:[(0,s.jsx)(ir,{agent:A,size:32}),(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"truncate text-sm font-medium",children:A.name}),(0,s.jsx)("span",{className:"truncate text-xs text-ink-3",children:A.status==="terminated"?"Terminated":A.status==="paused"?"Paused":c[A.id]??A.title??"Start a conversation"})]})]},A.id))}):!e.length&&(j||k)?null:(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2 px-2 py-6",children:[(0,s.jsx)("p",{className:"text-sm font-medium",children:e.length?"No agents found":"No chats yet"}),(0,s.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,s.jsx)(le,{variant:"secondary",size:"sm",onClick:r(()=>I(!0),"onClick"),children:"Choose an agent"}),e.length>0&&(0,s.jsx)(le,{variant:"secondary",size:"sm",onClick:P,children:"Clear search"})]})]}),(0,s.jsx)("div",{className:"shrink-0 px-3 py-4",children:(0,s.jsx)(le,{variant:"ghost",size:"sm",className:"w-full justify-start gap-2 px-2",asChild:!v,onClick:v,children:v?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(qr,{className:"size-4"}),"Browse all agents"]}):(0,s.jsxs)(gn,{to:"/agents/all",children:[(0,s.jsx)(qr,{className:"size-4"}),"Browse all agents"]})})}),(0,s.jsx)(y$,{agents:i,open:_,onOpenChange:I,existingChatAgentIds:t??e.map(A=>A.id),loading:u,error:m,onRetry:f,renderAgentIcon:r(A=>(0,s.jsx)(ir,{agent:A,size:32}),"renderAgentIcon"),onSelect:r(async(A,B)=>{y?await y(A,B):g?await g(A,B):N(`/chats/${encodeURIComponent(ar(A))}`),B?.aborted||T("")},"onSelect")})]})}r(w$,"AgentConversationSidebar");function k$(){const{selectedCompanyId:e}=vt(),{enabled:t,loaded:i}=yf(),l=ge({queryKey:U.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:i,agents:ge({queryKey:U.agents.list(e),queryFn:r(()=>$s.list(e),"queryFn"),enabled:t&&!!e}),chats:ge({queryKey:U.agentChats.list(e,c),queryFn:r(()=>LS.list(e),"queryFn"),enabled:t&&!!e&&l.isSuccess}),session:l}}r(k$,"useAgentChatNavigation");function S$(e,t){const i=wn(),l=bs(),{isMobile:c,setSidebarOpen:u}=Jn(),m=(0,x.useRef)({companyId:e,userId:t,mounted:!0});return(0,x.useEffect)(()=>{const f={companyId:e,userId:t,mounted:!0};return m.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=m.current,v=await LS.ensure(e,f.id);i.setQueryData(U.agentChats.detail(e,t,f.id),v),i.setQueryData(U.issues.detail(v.id),v),i.setQueryData(U.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||m.current!==g||h?.aborted)&&(l(`/chats/${encodeURIComponent(ar(f))}`),c&&u(!1))},[i,e,t,l,c,u])}r(S$,"useOpenAgentChat");function N$(){const{companyId:e,userId:t,agents:i,chats:l,session:c}=k$(),u=S$(e,t),m=bs(),f=_0(e),{isMobile:h,setSidebarOpen:g}=Jn(),{pathname:v}=vn(),y=v.split("/chats/")[1]?.split("/")[0],j=i.data??[],k=i.isSuccess?[...new Set((l.data??[]).flatMap(M=>M.conversationAgentId&&!j.some(z=>z.id===M.conversationAgentId)?[M.conversationAgentId]:[]))]:[],S=t0({queries:k.map(M=>({queryKey:U.agents.detail(M),queryFn:r(()=>$s.get(M,e),"queryFn")}))}),N=new Map(j.map(M=>[M.id,M]));for(const M of S)M.data&&N.set(M.data.id,M.data);const _=[...N.values()].find(M=>M.id===y||M.status!=="terminated"&&encodeURIComponent(ar(M))===y),I=(l.data??[]).flatMap(M=>{const z=M.conversationAgentId?N.get(M.conversationAgentId):void 0;return z?[z]:[]});_&&!I.some(M=>M.id===_.id)&&I.unshift(_);const D=new Set(I.map(M=>M.id)),T=j.filter(M=>!D.has(M.id)&&M.status!=="terminated"&&(!f.isSuccess||oN(f.data,"agent",M.id)!=="left")).sort((M,z)=>M.name.localeCompare(z.name,void 0,{sensitivity:"base"})),C=Object.fromEntries((l.data??[]).filter(M=>M.conversationState==="active").map(M=>[M.conversationAgentId,"Working…"]));return(0,s.jsx)(w$,{agents:[...I,...T],availableAgents:j,existingChatAgentIds:I.map(M=>M.id),activeId:_?.id,previews:C,loading:i.isPending||l.isPending||c.isPending,error:i.error??l.error??c.error,onRetry:r(()=>{i.refetch(),l.refetch(),c.refetch()},"onRetry"),historyLoading:S.some(M=>M.isPending),historyError:S.find(M=>M.error)?.error,onRetryHistory:r(()=>{S.filter(M=>M.isError).forEach(M=>{M.refetch()})},"onRetryHistory"),onAddChat:u,onSelect:r(M=>{m(`/chats/${encodeURIComponent(M.status==="terminated"?M.id:ar(M))}`),h&&g(!1)},"onSelect")},`${e}:${t}`)}r(N$,"AgentConversationsSidebar");var ld=232,vg=208,yg=420,yw=16;function tf(e){return Math.min(yg,Math.max(vg,e))}r(tf,"clampSidebarWidth");function jw(e){if(typeof window>"u")return ld;try{const t=window.localStorage.getItem(e);if(!t)return ld;const i=Number.parseInt(t,10);return Number.isFinite(i)?tf(i):ld}catch{return ld}}r(jw,"readStoredSidebarWidth");function ww(e,t){if(!(typeof window>"u"))try{window.localStorage.setItem(e,String(tf(t)))}catch{}}r(ww,"writeStoredSidebarWidth");function C$({children:e,open:t,collapsed:i=!1,peeking:l=!1,resizable:c=!1,storageKey:u="wardmote.sidebar.width",className:m,onPanelMouseEnter:f,onPanelMouseLeave:h,onPanelFocusCapture:g,onPanelBlurCapture:v}){const[y,j]=(0,x.useState)(()=>jw(u)),[k,S]=(0,x.useState)(!1),N=(0,x.useRef)(y),_=(0,x.useRef)(null);(0,x.useEffect)(()=>{const Y=jw(u);N.current=Y,j(Y)},[u]);const I=t?y:0,D=t?i?72:I:0,T=t?i&&!l?72:I:0,C=T>D,M=c&&t&&!i,z=(0,x.useMemo)(()=>({width:`${D}px`}),[D]),K=(0,x.useMemo)(()=>({width:`${T}px`}),[T]),P=(0,x.useCallback)(Y=>{const ce=tf(Y);N.current=ce,j(ce),ww(u,ce)},[u]),A=(0,x.useCallback)(Y=>{M&&(Y.preventDefault(),Y.currentTarget.setPointerCapture(Y.pointerId),_.current={startX:Y.clientX,startWidth:N.current},S(!0))},[M]),B=(0,x.useCallback)(Y=>{if(!_.current)return;const ce=tf(_.current.startWidth+Y.clientX-_.current.startX);N.current=ce,j(ce)},[]),O=(0,x.useCallback)(()=>{_.current&&(_.current=null,S(!1),ww(u,N.current))},[u]),W=(0,x.useCallback)(Y=>{M&&(Y.key==="ArrowLeft"?(Y.preventDefault(),P(y-yw)):Y.key==="ArrowRight"?(Y.preventDefault(),P(y+yw)):Y.key==="Home"?(Y.preventDefault(),P(vg)):Y.key==="End"&&(Y.preventDefault(),P(yg)))},[M,P,y]);return(0,s.jsxs)("div",{className:X("relative h-full shrink-0",m),style:z,children:[(0,s.jsx)("div",{className:X("absolute inset-y-0 left-0 flex flex-col overflow-hidden",C?"z-30 border-r border-line bg-bg shadow-lg":"z-0"),style:K,"data-sidebar-overlay":C?"":void 0,onMouseEnter:f,onMouseLeave:h,onFocusCapture:g,onBlurCapture:v,children:e}),M?(0,s.jsx)("div",{role:"separator","aria-label":"Resize sidebar","aria-orientation":"vertical","aria-valuemin":vg,"aria-valuemax":yg,"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:A,onPointerMove:B,onPointerUp:O,onPointerCancel:O,onLostPointerCapture:O,onKeyDown:W,children:(0,s.jsx)("div",{className:X("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(C$,"SidebarShell");function od({children:e,className:t}){return(0,s.jsx)("div",{"data-secondary-sidebar":"",className:X("h-full w-full min-w-0 overflow-hidden",t),children:(0,s.jsx)(NS,{children:e})})}r(od,"SecondarySidebar");function A$(e,t){if(!t)return!1;if(t.source==="local_implicit"||t.isInstanceAdmin)return!0;if(!e)return!1;const i=t.memberships?.find(l=>l.companyId===e&&l.status==="active");return i?.membershipRole==="owner"||i?.membershipRole==="admin"||i?.membershipRole==="operator"||i?.membershipRole==="member"}r(A$,"canInviteCompanyMembers");function _$(){const e=kE(),t=ge({queryKey:U.access.currentBoardAccess,queryFn:r(()=>Xa.getCurrentBoardAccess(),"queryFn"),retry:!1,staleTime:3e4});return A$(e?.selectedCompanyId,t.data)}r(_$,"useCanInviteCompanyMembers");function E$(e){return e?.trim().toLowerCase().replace(/['"]/g,"").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||null}r(E$,"slugifyUserPart");function I$(e){const t=[e?.id,e?.name,e?.email?.split("@")[0],e?.email];for(const i of t){const l=E$(i);if(l)return`/u/${l}`}return"/u/me"}r(I$,"userProfilePath");var Cc=null,ZC=!1,jg=!1,wg=new Set;function Ac(){for(const e of wg)e()}r(Ac,"emit");function T$(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(T$,"isIosSafariLike");function R$(e=window){const t=r(l=>{l.preventDefault(),Cc=l,Ac()},"onPrompt"),i=r(()=>{Cc=null,ZC=!0,Ac()},"onInstalled");return e.addEventListener("beforeinstallprompt",t),e.addEventListener("appinstalled",i),()=>{e.removeEventListener("beforeinstallprompt",t),e.removeEventListener("appinstalled",i)}}r(R$,"captureInstallPrompt");function D$(){return ZC||bg()?"installed":Cc?"prompt":T$()?"ios-manual":"unavailable"}r(D$,"installAvailability");async function M$(){const e=Cc;if(!e)return"unavailable";Cc=null,Ac(),await e.prompt();const{outcome:t}=await e.userChoice;return t}r(M$,"promptInstall");function kg(e){jg!==e&&(jg=e,Ac())}r(kg,"setIosInstallHelpOpen");function O$(){return jg}r(O$,"iosInstallHelpOpen");function L$(){return(0,x.useSyncExternalStore)(Z0,O$,()=>!1)}r(L$,"useIosInstallHelpOpen");function Z0(e){return wg.add(e),()=>{wg.delete(e)}}r(Z0,"subscribe$1");function JC(){return(0,x.useSyncExternalStore)(Z0,D$,()=>"unavailable")}r(JC,"useInstallAvailability");function vG(e){const t=JC();return(0,x.useSyncExternalStore)(Z0,()=>U$(t,e),()=>!1)}r(vG,"useInstallNudgeVisible");var z$=2592e6,Sg="wardmote.install.visits",kw="wardmote.install.visit-counted",eA="wardmote.install.snoozed-until";function Ng(e,t){const i=Number(e.getItem(t));return Number.isFinite(i)?i:0}r(Ng,"readNumber");function P$(e=window.localStorage,t=window.sessionStorage){try{if(t.getItem(kw))return;t.setItem(kw,"1"),e.setItem(Sg,String(Ng(e,Sg)+1))}catch{return}}r(P$,"recordAppVisit");function U$(e,t,i=Date.now(),l=window.localStorage){if(e!=="prompt"&&e!=="ios-manual"||/^\/(?:[^/]+\/)?onboarding(?:\/|$)/.test(t))return!1;try{return Ng(l,Sg)>=3&&Ng(l,eA)<=i}catch{return!1}}r(U$,"installNudgeVisible");function yG(e=Date.now(),t=window.localStorage){try{t.setItem(eA,String(e+z$))}catch{return}finally{Ac()}}r(yG,"snoozeInstallNudge");var Sw="Install app",$$="Add Wardmote to your home screen or dock.";function B$({variant:e,onAfterAction:t}){const i=JC();if(i==="installed"||i==="unavailable")return null;const l=r(()=>{i==="ios-manual"?kg(!0):M$(),t?.()},"handleClick");return e==="compact-menu-action"?(0,s.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,s.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,s.jsx)(eg,{className:"size-4"})}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:Sw})]}):(0,s.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,s.jsx)("span",{className:"mt-0.5 rounded-lg border border-line bg-bg/70 p-2 text-ink-3",children:(0,s.jsx)(eg,{className:"size-4"})}),(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-ink",children:Sw}),(0,s.jsx)("span",{className:"block text-xs text-ink-3",children:$$})]})]})}r(B$,"InstallAppMenuAction");function K$(){const e=L$();return(0,s.jsx)(ya,{open:e,onOpenChange:kg,children:(0,s.jsxs)(za,{children:[(0,s.jsxs)(Jl,{children:[(0,s.jsx)(Da,{children:"Install Wardmote"}),(0,s.jsx)(eo,{children:"Add Wardmote to your Home Screen from Safari."})]}),(0,s.jsxs)("ol",{className:"space-y-3 text-sm text-ink",children:[(0,s.jsxs)(dh,{index:1,icon:(0,s.jsx)(JT,{className:"size-4"}),children:["Tap ",(0,s.jsx)("strong",{children:"Share"})," in the Safari toolbar."]}),(0,s.jsxs)(dh,{index:2,icon:(0,s.jsx)(tR,{className:"size-4"}),children:["Choose ",(0,s.jsx)("strong",{children:"Add to Home Screen"}),"."]}),(0,s.jsxs)(dh,{index:3,children:["Keep ",(0,s.jsx)("strong",{children:"Open as Web App"})," on, then tap ",(0,s.jsx)("strong",{children:"Add"}),"."]})]}),(0,s.jsx)(jf,{children:(0,s.jsx)(le,{type:"button",onClick:r(()=>kg(!1),"onClick"),children:"Done"})})]})})}r(K$,"IosInstallHelpDialog");function dh({index:e,icon:t,children:i}){return(0,s.jsxs)("li",{className:"flex items-start gap-3",children:[(0,s.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,s.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2",children:[t?(0,s.jsx)("span",{className:"text-ink-3",children:t}):null,(0,s.jsx)("span",{children:i})]})]})}r(dh,"InstallStep");function q$(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(q$,"formatTimestamp");function F$(e){return!!e&&!Number.isNaN(new Date(e).getTime())}r(F$,"isValidTimestamp");function H$(e){return e?.devServer?.lastRestartAt??e?.serverInfo?.processStartedAt??null}r(H$,"restartTimestamp");function V$(e){const t=e?.serverInfo?.git;return t?.available?`${t.shortSha} · ${t.subject}`:"Commit unavailable"}r(V$,"commitLabel");function W$(e){const t=e?.serverInfo?.git;if(!t?.available)return"Unavailable";const i=t.localChanges;if(!i||!i.available)return"Change status unavailable";if(!i.hasLocalChanges)return"Clean checkout";const l=[[i.stagedFileCount,"staged"],[i.unstagedFileCount,"unstaged"],[i.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(W$,"localChangesLabel");function fh({icon:e,label:t,value:i,dateTime:l}){return(0,s.jsxs)("div",{className:"flex w-full items-start gap-3 rounded-xl px-3 py-3 text-left",children:[(0,s.jsx)("span",{className:"mt-0.5 rounded-lg border border-line bg-bg/70 p-2 text-ink-3",children:(0,s.jsx)(e,{className:"size-4"})}),(0,s.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,s.jsx)("span",{className:"block text-sm font-medium text-ink",children:t}),l?(0,s.jsx)("time",{dateTime:l,className:"block break-words text-xs text-ink-3",children:i}):(0,s.jsx)("span",{className:"block break-words text-xs text-ink-3",children:i})]})]})}r(fh,"ServerInfoRow");function Q$(){const e=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn")}).data?.enableServerInfoDebugView===!0,t=ge({queryKey:U.health,queryFn:r(()=>Rc.get(),"queryFn"),enabled:e,refetchOnMount:"always",refetchInterval:r(v=>v.state.data?.devServer?.enabled?2e3:!1,"refetchInterval")});if(!e)return null;const i=t.data,l=t.isLoading&&!i,c=t.isError,u=H$(i),m=F$(u),f=c?"Health unavailable":l?"Loading...":q$(u),h=c?"Health unavailable":l?"Loading...":V$(i),g=c?"Health unavailable":l?"Loading...":W$(i);return(0,s.jsxs)("div",{className:"mt-2 border-t border-line pt-2",children:[(0,s.jsx)("p",{className:"px-3 pb-1 pt-1 text-(length:--text-micro) font-medium uppercase tracking-wide text-ink-3",children:"Server"}),(0,s.jsx)(fh,{icon:DT,label:"Last restarted",value:f,dateTime:!c&&!l&&m?u:null}),(0,s.jsx)(fh,{icon:UT,label:"Running commit",value:h}),(0,s.jsx)(fh,{icon:OT,label:"Checkout state",value:g})]})}r(Q$,"SidebarServerInfo");var G$="/company/settings/members?tab=invites",Y$="https://github.com/tickernelz/wardmote/tree/main/docs",X$="https://github.com/tickernelz/wardmote/issues";function Z$(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(Z$,"deriveInitials");function mh({label:e,icon:t,onClick:i,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",m=(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,s.jsx)(t,{className:"size-4"})}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e})]});return l?c?(0,s.jsx)("a",{href:l,target:"_blank",rel:"noreferrer",className:u,onClick:i,children:m}):(0,s.jsx)(gn,{to:l,className:u,onClick:i,children:m}):(0,s.jsx)("button",{type:"button",className:u,onClick:i,children:m})}r(mh,"MenuAction");function Nw({deploymentMode:e,open:t,onOpenChange:i,forceExpanded:l=!1}){const{hidden:c,loaded:u}=lr(),m=_$()?G$:null,f=u&&m!==null&&!Ed(c,"company.members")&&!Ed(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??g,{data:I}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),D=K0({onSignedOut:K}),T=I?.user.name?.trim()||"Board",C=I?.user.email?.trim()||(e==="authenticated"?"Signed in":"Local workspace board"),M=Z$(T),z=I$(I?.user);function K(){_(!1),v&&y(!1)}r(K,"closeNavigationChrome");function P(){D.mutate()}return r(P,"handleSignOut"),(0,s.jsx)("div",{className:"bg-line/50 px-3 py-2 dark:bg-bg-3",children:(0,s.jsxs)("div",{className:X("flex items-center gap-0.5",!S&&"px-2"),children:[(0,s.jsxs)(va,{open:N,onOpenChange:_,children:[(0,s.jsx)(xa,{asChild:!0,children:(0,s.jsxs)("button",{type:"button",className:X("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,s.jsxs)(Od,{size:"sm",children:[I?.user.image?(0,s.jsx)(Dd,{src:I.user.image,alt:T}):null,(0,s.jsx)(Md,{children:M})]}),(0,s.jsx)("span",{className:X("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:T})]})}),(0,s.jsxs)(ba,{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,s.jsxs)("div",{className:"relative flex h-(--profile-popover-header-height) shrink-0 items-center gap-2.5 px-3.5",children:[(0,s.jsx)(gn,{to:z,"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,s.jsxs)(Od,{className:"pointer-events-none relative size-9",children:[I?.user.image?(0,s.jsx)(Dd,{src:I.user.image,alt:T}):null,(0,s.jsx)(Md,{className:"text-xs text-ink",children:M})]}),(0,s.jsxs)("div",{className:"pointer-events-none relative min-w-0 flex-1",children:[(0,s.jsx)("h2",{className:"truncate text-sm font-semibold leading-(--profile-popover-label-line-height) text-ink",children:T}),(0,s.jsx)("p",{className:"truncate text-(length:--text-micro) leading-(--profile-popover-meta-line-height) text-ink-3",children:C})]})]}),(0,s.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,s.jsx)(mh,{label:"Settings",icon:SS,href:"/company/settings",onClick:K}),f&&m?(0,s.jsx)(mh,{label:"Invite",icon:W1,href:m,onClick:K}):null,(0,s.jsx)(mh,{label:"Documentation",icon:ET,href:Y$,external:!0,onClick:r(()=>_(!1),"onClick")}),(0,s.jsx)(qI,{variant:"compact-menu-action",onAfterToggle:r(()=>_(!1),"onAfterToggle")}),(0,s.jsx)(B$,{variant:"compact-menu-action",onAfterAction:r(()=>_(!1),"onAfterAction")}),e==="authenticated"?(0,s.jsxs)("button",{type:"button",className:X("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",D.isPending&&"cursor-not-allowed opacity-60"),onClick:P,disabled:D.isPending,children:[(0,s.jsx)("span",{className:"flex size-5 shrink-0 items-center justify-center text-ink-3",children:(0,s.jsx)(wf,{className:"size-4"})}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:D.isPending?"Signing out...":"Sign out"})]}):null,(0,s.jsx)(Q$,{})]})]})]}),S?null:(0,s.jsxs)(Ia,{children:[(0,s.jsx)(_a,{asChild:!0,children:(0,s.jsx)("a",{href:X$,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,s.jsx)(c0,{className:"h-4 w-4","aria-hidden":"true"})})}),(0,s.jsx)(Ea,{side:"top",children:"Share feedback"})]})]})})}r(Nw,"SidebarAccountMenu");var J$=["input","textarea","select","[contenteditable='true']","[contenteditable='plaintext-only']","[role='textbox']","[role='combobox']"].join(", "),eB="[data-page-search-target='true']",tB=new Set(["Shift","Meta","Control","Alt"]);function ao(e){return e instanceof HTMLElement?e.isContentEditable?!0:!!e.closest(J$):!1}r(ao,"isKeyboardShortcutTextInputTarget");function Cg(e=document){return!!e.querySelector("[role='dialog'][aria-modal='true']")}r(Cg,"hasBlockingShortcutDialog");function nB(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(nB,"isVisibleShortcutTarget");function sB(e=document){return Array.from(e.querySelectorAll(eB)).find(t=>nB(t))??null}r(sB,"findPageSearchShortcutTarget");function aB(e=document){const t=sB(e);return t?(t.focus(),(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement)&&t.select(),!0):!1}r(aB,"focusPageSearchShortcutTarget");function iB({key:e,isComposing:t}){return e==="Enter"&&!t}r(iB,"shouldBlurPageSearchOnEnter");function rB({key:e,isComposing:t,currentValue:i}){return e==="Escape"&&!t&&i.length===0}r(rB,"shouldBlurPageSearchOnEscape");function Pf(e){return tB.has(e)}r(Pf,"isModifierOnlyKey");function jG({defaultPrevented:e,key:t,metaKey:i,ctrlKey:l,altKey:c,target:u,hasOpenDialog:m,hasSelection:f}){if(e||i||l||c||Pf(t)||m||ao(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(jG,"resolveAttentionQueueKeyAction");function wG({armed:e,defaultPrevented:t,key:i,metaKey:l,ctrlKey:c,altKey:u,target:m,hasOpenDialog:f}){return!e||t||l||c||u||Pf(i)||f||ao(m)?"ignore":i.toLowerCase()==="y"?"archive":"ignore"}r(wG,"resolveInboxQuickArchiveKeyAction");function kG({hasUndoableArchive:e,defaultPrevented:t,key:i,metaKey:l,ctrlKey:c,altKey:u,target:m,hasOpenDialog:f}){return!e||t||l||c||u||Pf(i)||f||ao(m)?"ignore":i==="u"?"undo_archive":"ignore"}r(kG,"resolveInboxUndoArchiveKeyAction");function lB({armed:e,defaultPrevented:t,key:i,metaKey:l,ctrlKey:c,altKey:u,target:m,hasOpenDialog:f}){if(t)return e?"disarm":"ignore";if(l||c||u||Pf(i))return"ignore";if(f||ao(m))return e?"disarm":"ignore";const h=i.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(lB,"resolveIssueDetailGoKeyAction");function oB({onNewIssue:e,onSearch:t,onToggleSidebar:i,onTogglePanel:l,onShowShortcuts:c,onGoToInbox:u}){(0,x.useEffect)(()=>{let m=!1,f=null;const h=r(()=>{f!==null&&(window.clearTimeout(f),f=null)},"clearGoChordTimeout"),g=r(()=>{m=!1,h()},"disarmGoChord"),v=r(()=>{m=!0,h(),f=window.setTimeout(()=>{m=!1,f=null},1200)},"armGoChord");function y(S){if(S.defaultPrevented){g();return}if(u){const N=lB({armed:m,defaultPrevented:S.defaultPrevented,key:S.key,metaKey:S.metaKey,ctrlKey:S.ctrlKey,altKey:S.altKey,target:S.target,hasOpenDialog:Cg()});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(!ao(S.target)&&!Cg()){if(S.key==="/"&&!S.metaKey&&!S.ctrlKey&&!S.altKey){S.preventDefault(),aB()||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(),i?.()),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,i,l,c,u])}r(oB,"useKeyboardShortcuts");var cB=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[i]=t;return!cB.has(i)}r(tA,"isRememberableCompanyPath");function uB(e){const t=Rd(e.companyPrefix);return e.companies.find(i=>Rd(i.issuePrefix)===t)??null}r(uB,"findCompanyByPrefix");function dB(e){const t=Gk(e.pathname);return t?uB({companies:e.companies,companyPrefix:t})?.id??null:e.fallbackCompanyId}r(dB,"getRememberedPathOwnerCompanyId");function fB(e){const t=e.path?pf(e.path):"/dashboard";if(!tA(t))return"/dashboard";const[i,l]=(t.split("?")[0]??"").split("/").filter(Boolean);if(i==="issues"&&l){const c=/^([A-Za-z]+)-\d+$/.exec(l);if(c&&Rd(c[1]??"")!==Rd(e.companyPrefix))return"/dashboard"}return t}r(fB,"sanitizeRememberedPathForCompany");var nA="wardmote.companyPaths";function sA(){try{const e=localStorage.getItem(nA);if(e)return JSON.parse(e)}catch{}return{}}r(sA,"getCompanyPaths");function mB(e,t){const i=sA();i[e]=t,localStorage.setItem(nA,JSON.stringify(i))}r(mB,"saveCompanyPath");function pB(){const{companies:e,selectedCompanyId:t,selectedCompany:i,selectionSource:l}=vt(),c=vn(),u=bs(),m=(0,x.useRef)(t),f=(0,x.useMemo)(()=>dB({companies:e,pathname:c.pathname,fallbackCompanyId:m.current}),[e,c.pathname]),h=c.pathname+c.search;(0,x.useEffect)(()=>{const g=f,v=pf(h);g&&tA(v)&&mB(g,v)},[h,f]),(0,x.useEffect)(()=>{if(t){if(m.current!==null&&t!==m.current&&l!=="route_sync"&&i){const g=sA(),v=fB({path:g[t],companyPrefix:i.issuePrefix});u(`/${i.issuePrefix}${v}`,{replace:!0})}m.current=t}},[i,t,l,u])}r(pB,"useCompanyPageMemory");var hB=class{static{r(this,"MobileNavScrollTracker")}options;lastTop;lastMaxTop;visible=!0;direction=0;distance=0;constructor(e,t,i){this.options=e,this.lastTop=t,this.lastMaxTop=i}update(e,t){const i=Math.max(0,Math.min(e,t)),l=i-Math.max(this.lastTop,this.options.topZone),c=t!==this.lastMaxTop;if(this.lastTop=i,this.lastMaxTop=t,i<=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 m=u>0?this.options.hideDistance:this.options.showDistance;this.distance>=m&&(this.visible=u<0,this.distance=0)}return this.visible}};function gB(e,t){const[i,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"),m=r(()=>{const y=document.scrollingElement??document.documentElement;return{top:window.scrollY||y.scrollTop||0,max:Math.max(0,y.scrollHeight-y.clientHeight)}},"scrollBounds"),f=m(),h=new hB({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}=m(),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]),i}r(gB,"useMobileNavVisibility");function xB(e){const{matchedCompany:t,selectedCompanyId:i,companies:l}=e;return!t||t.status!=="archived"||i===t.id?null:l.find(c=>c.id===i&&c.status!=="archived")??l.find(c=>c.status!=="archived")??null}r(xB,"resolveArchivedCompanyBounce");function SG(e){const{archivedCompanyId:t,companies:i}=e,l=i.find(c=>c.id!==t&&c.status!=="archived");return l?{kind:"company",company:l}:{kind:"companies_list"}}r(SG,"resolveCompanyArchiveDeparture");function bB(e){const{selectionSource:t,selectedCompanyId:i,routeCompanyId:l}=e;return!(i===l||t==="manual"&&i)}r(bB,"shouldSyncCompanySelectionFromRoute");function vB(e,t){return e instanceof HTMLElement?!(t instanceof HTMLElement)||!document.contains(t)||t===document.body||t===document.documentElement?!0:!e.contains(t):!1}r(vB,"shouldFocusMainContentAfterNavigation");function yB(e){if(!(e instanceof HTMLElement))return()=>{};const t=window.requestAnimationFrame(()=>{vB(e,document.activeElement)&&e.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(t)}r(yB,"scheduleMainContentFocus");function jB(e=document,t=window){const i=r(()=>{e.documentElement.scrollTop!==0&&(e.documentElement.scrollTop=0),e.body.scrollTop!==0&&(e.body.scrollTop=0)},"onScroll");return t.addEventListener("scroll",i,{capture:!0}),()=>t.removeEventListener("scroll",i,{capture:!0})}r(jB,"pinDocumentScrollToZero");var wB=z_({NotFoundPage:r(()=>sr,"NotFoundPage")});function sr({scope:e="global",requestedPrefix:t}){const i=vn(),{setBreadcrumbs:l}=IS(),{companies:c,selectedCompany:u}=vt();(0,x.useEffect)(()=>{l([{label:"Not Found"}])},[l]);const m=u??c[0]??null,f=m?`/${m.issuePrefix}/dashboard`:"/",h=`${i.pathname}${i.search}${i.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,s.jsx)("div",{className:"mx-auto max-w-2xl py-10",children:(0,s.jsxs)(Dc,{className:"block p-6",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("div",{className:"rounded-md border border-bad/20 bg-bad/10 p-2",children:(0,s.jsx)(Ja,{className:"h-5 w-5 text-bad"})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-xl font-semibold",children:v}),(0,s.jsx)("p",{className:"text-sm text-ink-3",children:y})]})]}),(0,s.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,s.jsx)("code",{className:"font-mono",children:h})]}),(0,s.jsxs)("div",{className:"mt-5 flex flex-wrap gap-2",children:[(0,s.jsx)(le,{asChild:!0,children:(0,s.jsxs)(gn,{to:f,children:[(0,s.jsx)(Wk,{className:"mr-1.5 h-4 w-4"}),"Open dashboard"]})}),(0,s.jsx)(le,{variant:"secondary",asChild:!0,children:(0,s.jsx)(gn,{to:"/",children:"Go home"})})]})]})})}r(sr,"NotFoundPage$1");function kB(e,t){return yC(e,t)[0]?.toLowerCase()??null}r(kB,"getCompanyRouteSegment");var SB=new Set(["browse","connections","assistant-connection","connect","chat","vercel-connect","review","attention","gateways","advanced","app"]);function NB(e){const t=(0,x.useRef)(null);return(0,x.useLayoutEffect)(()=>{const i=t.current,l=i?.parentElement;if(!e||!i||!l)return;const c=r(()=>l.style.setProperty("--mobile-topbar-h",`${i.offsetHeight}px`),"apply");if(c(),typeof ResizeObserver>"u")return()=>l.style.removeProperty("--mobile-topbar-h");const u=new ResizeObserver(c);return u.observe(i),()=>{u.disconnect(),l.style.removeProperty("--mobile-topbar-h")}},[e]),t}r(NB,"useMobileTopbarHeightVar");function CB({sidebarSections:e}){const{sidebarOpen:t,setSidebarOpen:i,toggleSidebar:l,collapsed:c,peeking:u,setPeeking:m,isMobile:f,isTablet:h}=Jn(),g=NB(f),{openNewIssue:v,openOnboarding:y}=Pa(),{togglePanelVisible:j}=q0(),k=bf()?.pushToast??null,{companies:S,loading:N,selectedCompany:_,selectedCompanyId:I,selectionSource:D,setSelectedCompanyId:T}=vt(),{companyPrefix:C,pluginRoutePath:M,agentId:z,routineId:K}=La(),P=bs(),A=vn(),B=nE(),O=c4(A.pathname,C),W=O.builtInContextualSurface==="settings",Y=O.companySegments,ce=O.isTaskDetail,{enabled:oe}=yf(),$=oe&&Y[0]?.toLowerCase()==="chats",R=ce||$,ne=Y[0]?.toLowerCase()==="tools",ue=Y[0]?.toLowerCase()==="apps",ae=ue&&Y[1]&&!SB.has(Y[1].toLowerCase())?Y[1]:null,Ee=ue&&Y[1]?.toLowerCase()==="app"&&Y[2]?Y[2]:null,fe=(0,x.useRef)(!1),Ae=(0,x.useRef)(null),Ce=(0,x.useRef)(null),Se=(0,x.useRef)(new l3),he=(0,x.useRef)(A.key),De=gB(f&&!ce,A.pathname),[Ye,ze]=(0,x.useState)(!1),ve=(0,x.useMemo)(()=>{if(!C)return null;const Re=C.toUpperCase();return S.find(Me=>Me.issuePrefix.toUpperCase()===Re)??null},[S,C]),ft=!!C&&!N&&S.length>0&&!ve,At=(0,x.useMemo)(()=>M?.toLowerCase()??kB(A.pathname,C),[C,A.pathname,M]),xt=ve?.id??null,Pt=ve?.issuePrefix??null,{slots:de}=Tc({slotTypes:["page","routeSidebar"],companyId:xt,enabled:!!(xt&&At)}),Oe=(0,x.useMemo)(()=>I3(de,At),[At,de]),qe=(0,x.useMemo)(()=>({companyId:xt,companyPrefix:Pt}),[xt,Pt]),ut=W?(0,s.jsx)(m4,{}):ae?(0,s.jsx)($j,{kind:"connection",connectionId:ae}):Ee?(0,s.jsx)($j,{kind:"application",applicationId:Ee}):ue||ne?(0,s.jsx)(A4,{}):Oe?(0,s.jsx)(Uc,{surface:`plugin:${Oe.id}`,title:Oe.displayName,children:(0,s.jsx)(x0,{slot:Oe,context:qe,className:"min-h-0 flex-1",missingBehavior:"placeholder"})}):null,Vt=$?(0,s.jsx)(N$,{}):O.builtInContextualSurface==="agent"&&z?(0,s.jsx)(L4,{agentRef:z}):O.builtInContextualSurface==="routine"&&K?(0,s.jsx)(e3,{children:(0,s.jsx)($4,{routineId:K})}):O.builtInContextualSurface==="skills"?(0,s.jsx)(q4,{}):ut,Wt=Vt!=null,H=Wt&&($||O.builtInContextualSurface==="skills"||O.builtInContextualSurface==="agent"||O.builtInContextualSurface==="routine"||ue||ne),rn=W&&(f||h),je=Wt&&!H&&!(h&&W),$e=H,He=Wt?Oe&&!O.builtInContextualSurface?`plugin:${Oe.id}`:O.builtInContextualSurface:null,mt=(0,x.useRef)(null),{data:it}=ge({queryKey:U.health,queryFn:r(()=>Rc.get(),"queryFn"),retry:!1,refetchInterval:r(Re=>Re.state.data?.devServer?.enabled?2e3:!1,"refetchInterval"),refetchIntervalInBackground:!1});(0,x.useEffect)(()=>{const Re=mt.current;He&&C&&Re&&Re.surface!==He&&Re.pathname!==A.pathname&&u4({surface:He,companyPrefix:C,previousPathname:Re.pathname}),mt.current={pathname:A.pathname,surface:He}},[C,He,A.pathname]),(0,x.useEffect)(()=>{N||fe.current||it?.deploymentMode!=="authenticated"&&S.length===0&&(fe.current=!0,y())},[S,N,y,it?.deploymentMode]),(0,x.useEffect)(()=>{if(!C||N||S.length===0)return;if(!ve){const Me=(I?S.find(Fe=>Fe.id===I):null)??S[0]??null;Me&&I!==Me.id&&T(Me.id,{source:"route_sync"});return}if(C!==ve.issuePrefix){const Me=A.pathname.replace(/^\/[^/]+/,"");P(`/${ve.issuePrefix}${Me}${A.search}`,{replace:!0});return}const Re=xB({matchedCompany:ve,selectedCompanyId:I,companies:S});if(Re){k?.({title:`${ve.name} is archived`,body:`Switched to ${Re.name}.`,tone:"info",dedupeKey:`archived-company-bounce:${ve.id}`}),T(Re.id,{source:"route_sync"}),P(`/${Re.issuePrefix}/dashboard`,{replace:!0});return}bB({selectionSource:D,selectedCompanyId:I,routeCompanyId:ve.id})&&T(ve.id,{source:"route_sync"})},[C,S,N,ve,A.pathname,A.search,P,k,D,I,T]);const Qt=j,Rn=(0,x.useCallback)(()=>{document.dispatchEvent(new KeyboardEvent("keydown",{key:"k",metaKey:!0,bubbles:!0,cancelable:!0}))},[]),Gt=(0,x.useRef)(null),Tt=(0,x.useRef)(!1),Jt=(0,x.useRef)(!1),kt=(0,x.useCallback)(()=>{Gt.current!==null&&(window.clearTimeout(Gt.current),Gt.current=null)},[]),Qn=(0,x.useCallback)(()=>{kt(),Gt.current=window.setTimeout(()=>m(!0),50)},[kt,m]),pt=(0,x.useCallback)(()=>{kt(),m(!0)},[kt,m]),dn=(0,x.useCallback)(()=>{kt(),Gt.current=window.setTimeout(()=>m(!1),120)},[kt,m]),Rt=(0,x.useCallback)(()=>{Tt.current=!0,c&&!Jt.current&&Qn()},[c,Qn]),ln=(0,x.useCallback)(()=>{Tt.current=!1,Jt.current=!1,dn()},[dn]),Dt=(0,x.useCallback)(()=>{Jt.current||pt()},[pt]),ht=(0,x.useCallback)(()=>{Tt.current||dn()},[dn]);(0,x.useEffect)(()=>kt,[kt]);const Mt=(0,x.useRef)(c);return(0,x.useEffect)(()=>{c!==Mt.current&&(c?(kt(),m(!1),Jt.current=Tt.current):Jt.current=!1,Mt.current=c)},[c,kt,m]),(0,x.useEffect)(()=>{if(!u)return;const Re=r(Me=>{Me.key==="Escape"&&(kt(),m(!1))},"onKeyDown");return window.addEventListener("keydown",Re),()=>window.removeEventListener("keydown",Re)},[u,kt,m]),pB(),oB({onNewIssue:r(()=>v(),"onNewIssue"),onSearch:Rn,onToggleSidebar:l,onTogglePanel:Qt,onShowShortcuts:r(()=>ze(!0),"onShowShortcuts"),onGoToInbox:r(()=>P("/inbox"),"onGoToInbox")}),(0,x.useEffect)(()=>{if(!f)return;const Re=30,Me=50,Fe=75;let St=0,at=0;const Ot=r(Ut=>{const en=Ut.touches[0];St=en.clientX,at=en.clientY},"onTouchStart"),on=r(Ut=>{const en=Ut.changedTouches[0],tn=en.clientX-St;if(!(Math.abs(en.clientY-at)>Fe)){if(!t&&St<Re&&tn>Me){i(!0);return}t&&tn<-50&&i(!1)}},"onTouchEnd");return document.addEventListener("touchstart",Ot,{passive:!0}),document.addEventListener("touchend",on,{passive:!0}),()=>{document.removeEventListener("touchstart",Ot),document.removeEventListener("touchend",on)}},[f,t,i]),(0,x.useEffect)(()=>{const Re=document.body.style.overflow;return document.body.style.overflow=f?"visible":"clip",()=>{document.body.style.overflow=Re}},[f]),(0,x.useEffect)(()=>{if(!f)return jB()},[f]),(0,x.useEffect)(()=>{if(typeof document>"u")return;const Re=Ce.current;return yB(Re)},[A.pathname]),(0,x.useEffect)(()=>{const Re=Ce.current;if(!Re)return;const Me=r(()=>{Se.current.remember(he.current,Re.scrollTop)},"recordScroll");return Re.addEventListener("scroll",Me,{passive:!0}),()=>Re.removeEventListener("scroll",Me)},[]),(0,x.useLayoutEffect)(()=>{const Re=Ce.current,Me=r3({previousPathname:Ae.current,pathname:A.pathname,navigationType:B,state:A.state});Ae.current=A.pathname;const Fe=B==="POP",St=Fe?Se.current.recall(A.key):0;if(he.current=A.key,Fe){Ey(Re,St);const at=requestAnimationFrame(()=>Ey(Re,St));return()=>cancelAnimationFrame(at)}Me&&c3(Re)},[A.key,A.pathname,A.state,B]),(0,s.jsx)(JI,{children:(0,s.jsxs)("div",{"data-app-shell":"",className:X("bg-bg text-ink pt-(--sz-safe-top)",f?"min-h-dvh overflow-x-clip":"flex h-dvh flex-col overflow-clip"),children:[(0,s.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,s.jsx)(u$,{}),(0,s.jsx)(UU,{}),(0,s.jsx)(qU,{devServer:it?.devServer}),(0,s.jsx)(HU,{diskSpace:it?.diskSpace,warnings:it?.warnings}),(0,s.jsx)(ZU,{}),(0,s.jsx)(a$,{}),(0,s.jsxs)("div",{className:X("min-h-0 flex-1",f?"w-full":"flex overflow-clip"),children:[f&&t&&(0,s.jsx)("button",{type:"button",className:"fixed inset-0 z-40 bg-black/50",onClick:r(()=>i(!1),"onClick"),"aria-label":"Close sidebar"}),f?(0,s.jsxs)("div",{className:X("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,s.jsx)("div",{className:"flex flex-1 min-h-0 overflow-hidden",children:(0,s.jsx)("div",{className:"w-60 shrink-0 overflow-hidden",children:Wt?(0,s.jsx)(od,{children:Vt}):(0,s.jsx)(Pj,{children:e})})}),(0,s.jsx)(Nw,{deploymentMode:it?.deploymentMode,forceExpanded:je})]}):(0,s.jsxs)(C$,{open:t,collapsed:je?!1:c,peeking:je?!1:u,resizable:!0,onPanelMouseEnter:je?void 0:Rt,onPanelMouseLeave:je?void 0:ln,onPanelFocusCapture:!je&&c?Dt:void 0,onPanelBlurCapture:!je&&c?ht:void 0,children:[(0,s.jsx)("div",{className:"flex flex-1 min-h-0",children:je?(0,s.jsx)(od,{children:Vt}):(0,s.jsx)(Pj,{children:e})}),(0,s.jsx)(Nw,{deploymentMode:it?.deploymentMode,forceExpanded:je})]}),!f&&$e&&!H?(0,s.jsx)(od,{className:"w-60 shrink-0",children:Vt}):null,(0,s.jsxs)("div",{className:X("flex min-w-0 flex-col",f?"w-full":"h-full flex-1"),children:[(0,s.jsxs)("div",{ref:g,"data-slot":f?"mobile-topbar":void 0,className:X(!f&&R&&"hidden",f&&"sticky top-0 z-20 bg-bg/95 backdrop-blur supports-[backdrop-filter]:bg-bg/85"),children:[(0,s.jsx)(bw,{mobile:f,onNavigateHome:r(()=>P("/dashboard"),"onNavigateHome")}),(0,s.jsx)(qj,{}),rn?(0,s.jsx)("div",{className:"border-b border-line px-4 pb-3",children:(0,s.jsx)(b4,{})}):null]}),(0,s.jsxs)("div",{className:X(f?"block":"relative flex flex-1 min-h-0",!f&&R&&"streamlined-task-detail-surface"),children:[!f&&H?(0,s.jsx)(od,{className:"w-60 shrink-0 bg-bg",children:Vt}):null,(0,s.jsxs)("div",{className:X(!f&&R?"flex min-w-0 flex-1 flex-col":"contents"),children:[!f&&R?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(bw,{mobile:!1,onNavigateHome:r(()=>P("/dashboard"),"onNavigateHome")}),(0,s.jsx)(qj,{taskDetailLayout:!0})]}):null,(0,s.jsx)("main",{id:"main-content",ref:Ce,tabIndex:-1,style:f?{"--tc-composer-bottom":"var(--sz-calc-14)"}:void 0,className:X("flex-1 p-4 outline-none md:p-6",!f&&R&&"pt-0 md:pt-0",f?"overflow-visible pb-(--sz-calc-14)":"overflow-auto [scrollbar-gutter:stable]"),children:ft?(0,s.jsx)(sr,{scope:"invalid_company_prefix",requestedPrefix:C??_?.issuePrefix}):(0,s.jsx)(v$,{children:(0,s.jsx)(x.Suspense,{fallback:(0,s.jsx)(Ra,{}),children:(0,s.jsx)(Zl,{})})})})]}),(0,s.jsx)(oz,{taskDetailLayout:!f&&R})]})]})]}),f&&(0,s.jsx)(OU,{visible:De}),(0,s.jsx)(Zz,{}),(0,s.jsx)(ZP,{}),(0,s.jsx)(eU,{}),(0,s.jsx)(aU,{}),(0,s.jsx)(pU,{}),(0,s.jsx)(bU,{open:Ye,onOpenChange:ze}),(0,s.jsx)(wU,{}),(0,s.jsx)(EU,{health:it}),(0,s.jsx)(MU,{localTrusted:it?.deploymentMode==="local_trusted"})]})})}r(CB,"Layout");var Cw=null;function AB(){return Cw??=new mf,Cw}r(AB,"getDetachedClient");function _B(){const e=(0,x.useContext)(Jg),{data:t,isFetched:i}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn"),enabled:e!=null},e??AB());return e?{enabled:t?.enableConferenceRoomChat===!0,loaded:i}:{enabled:!1,loaded:!0}}r(_B,"useConferenceRoomChatEnabled");function EB(){const{enabled:e,loaded:t}=_B();return t?e?(0,s.jsx)(Zl,{}):(0,s.jsx)(Qe,{to:"/dashboard",replace:!0}):null}r(EB,"ConferenceRoomChatGate");function Gi({children:e}){const{data:t,isFetched:i}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn")});return i?t?.enablePipelines!==!0?(0,s.jsx)(Qe,{to:"/dashboard",replace:!0}):(0,s.jsx)(s.Fragment,{children:e}):null}r(Gi,"PipelinesExperimentalGate");function Aw({children:e}){const{data:t,isFetched:i}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn")});return i?t?.enableCases!==!0?(0,s.jsx)(Qe,{to:"/dashboard",replace:!0}):(0,s.jsx)(s.Fragment,{children:e}):null}r(Aw,"CasesExperimentalGate");function _w({children:e}){const{data:t,isFetched:i}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn")});return i?t?.enableStatusCards!==!0?(0,s.jsx)(Qe,{to:"/dashboard",replace:!0}):(0,s.jsx)(s.Fragment,{children:e}):null}r(_w,"StatusCardsExperimentalGate");function IB({children:e}){const{data:t,isFetched:i}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn")});return i?t?.enablePixelsOffice!==!0?(0,s.jsx)(Qe,{to:"/dashboard",replace:!0}):(0,s.jsx)(s.Fragment,{children:e}):null}r(IB,"PixelsOfficeExperimentalGate");function Aa({pageKey:e}){const{hidden:t,loaded:i}=lr();return i?t.has(e)?(0,s.jsx)(Qe,{to:"/company/settings",replace:!0}):(0,s.jsx)(Zl,{}):null}r(Aa,"HiddenSettingsPageGate");function ph(){const{data:e,isFetched:t}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn")});return t?e?.enableIsolatedWorkspaces!==!0?(0,s.jsx)(Qe,{to:"/dashboard",replace:!0}):(0,s.jsx)(Zl,{}):null}r(ph,"IsolatedWorkspacesRouteGate");function Il(){const e=vn(),{workspaceId:t}=La(),{companies:i,loading:l}=vt(),c=ge({queryKey:U.executionWorkspaces.detail(t??"__missing__"),queryFn:r(()=>Lf.get(t),"queryFn"),enabled:!!t,retry:!1});if(!t)return(0,s.jsx)(sr,{scope:"global"});if(l||c.isPending)return(0,s.jsx)(Ra,{});if(c.isError)return(0,s.jsx)(sr,{scope:"global"});const u=i.find(m=>m.id===c.data.companyId);return u?(0,s.jsx)(Qe,{to:`/${u.issuePrefix}${e.pathname}${e.search}${e.hash}`,replace:!0}):(0,s.jsx)(sr,{scope:"global"})}r(Il,"UnprefixedExecutionWorkspaceRedirect");function TB(){const{companyPrefix:e,workspaceId:t}=La(),{companies:i,loading:l}=vt(),c=ge({queryKey:U.executionWorkspaces.detail(t??"__missing__"),queryFn:r(()=>Lf.get(t),"queryFn"),enabled:!!t,retry:!1});if(!t||!e)return(0,s.jsx)(sr,{scope:"global"});if(l||c.isPending)return(0,s.jsx)(Ra,{});if(c.isError)return(0,s.jsx)(sr,{scope:"global"});const u=i.find(m=>m.issuePrefix.toUpperCase()===e.toUpperCase());return!u||u.id!==c.data.companyId?(0,s.jsx)(sr,{scope:"global"}):(0,s.jsx)(Zl,{})}r(TB,"ExecutionWorkspaceCompanyGate");var xs={status:r((e={})=>{const t=new URLSearchParams;e.command&&t.set("command",e.command),e.network&&t.set("network","1");const i=t.toString();return we.get(`/onboarding/omp${i?`?${i}`:""}`)},"status"),browse:r(e=>we.get(`/onboarding/omp/browse${e?`?path=${encodeURIComponent(e)}`:""}`),"browse"),loginProviders:r((e=!1)=>we.get(`/onboarding/omp/login/providers${e?"?refresh=1":""}`),"loginProviders"),startLogin:r(e=>we.post("/onboarding/omp/login",{provider:e}),"startLogin"),login:r(e=>we.get(`/onboarding/omp/login/${encodeURIComponent(e)}`),"login"),answerLogin:r((e,t)=>we.post(`/onboarding/omp/login/${encodeURIComponent(e)}/input`,{value:t}),"answerLogin"),cancelLogin:r(e=>we.delete(`/onboarding/omp/login/${encodeURIComponent(e)}`),"cancelLogin"),customProviders:r(()=>we.get("/onboarding/omp/custom-providers"),"customProviders"),saveCustomProvider:r((e,t)=>we.put(`/onboarding/omp/custom-providers/${encodeURIComponent(e)}`,t),"saveCustomProvider"),removeCustomProvider:r(e=>we.delete(`/onboarding/omp/custom-providers/${encodeURIComponent(e)}`),"removeCustomProvider"),fetchCustomProviderModels:r(e=>we.post("/onboarding/omp/custom-providers/models",e),"fetchCustomProviderModels"),probeCustomProvider:r(e=>we.post("/onboarding/omp/custom-providers/probe",e),"probeCustomProvider"),remote:r(e=>we.post("/onboarding/omp/remote",{address:e}),"remote")};function RB(e){return{heartbeat:{enabled:e?.heartbeatEnabled??ky.heartbeatEnabled,intervalSec:e?.intervalSec??ky.intervalSec,wakeOnDemand:!0,skipTimerWhenNoActionableWork:!0,cooldownSec:10,maxConcurrentRuns:20}}}r(RB,"buildNewAgentRuntimeConfig");function DB({className:e,...t}){return(0,s.jsx)("div",{role:"group","data-slot":"segmented",className:X("inline-flex items-center gap-0.5 rounded-md border border-line-strong bg-bg-2 p-0.5",e),...t})}r(DB,"Segmented");function MB({selected:e=!1,className:t,type:i="button",...l}){return(0,s.jsx)("button",{type:i,"data-slot":"segmented-item","aria-pressed":e,className:X("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(MB,"SegmentedItem");var OB="input:not([type=hidden]):not(:disabled), select:not(:disabled), textarea:not(:disabled)",LB="Discard your unsaved changes?",zB=2/3;function PB(e,t){const[i,l]=(0,x.useState)(null),c=(0,x.useRef)(!1),u=(0,x.useRef)(new Map),m=(0,x.useRef)(e);m.current=e;const f=(0,x.useRef)(i);f.current=i;const h=(0,x.useId)(),g=i===null?null:e(i),v=(0,x.useCallback)(D=>`${h}-row-editor-${D.replace(/\s+/g,"_")}`,[h]),y=r(()=>!c.current||window.confirm(LB),"mayDiscard"),j=(0,x.useCallback)((D=!0)=>{const T=f.current;if(c.current=!1,l(null),T===null||!D)return;const C=m.current(T);requestAnimationFrame(()=>{const M=u.current.get(C);(M?.isConnected?M:t?.current)?.focus()})},[t]),k=r(D=>g===e(D)?!0:g!==null&&!y()?!1:(c.current=!1,l(D),!0),"request"),S=r(D=>{if(g!==e(D)){k(D);return}y()&&j()},"toggle"),N=r(()=>{y()&&j()},"dismiss"),_=(0,x.useCallback)(D=>{c.current=D},[]);return{open:i,openKey:g,request:k,toggle:S,close:j,dismiss:N,setDirty:_,triggerProps:r(D=>({ref:r(T=>{T?u.current.set(D,T):u.current.delete(D)},"ref"),"aria-expanded":g===D,"aria-controls":g===D?v(D):void 0}),"triggerProps"),panelId:v}}r(PB,"useInlineRowEditor");function Ew({id:e,onEscape:t,className:i,children:l}){const c=(0,x.useRef)(null);(0,x.useEffect)(()=>{const m=c.current;if(!m)return;m.querySelector(OB)?.focus({preventScroll:!0});const f=m.getBoundingClientRect().top;if(f>=0&&f<=window.innerHeight*zB)return;const h=m.parentElement?.tagName==="LI"?m.previousElementSibling:null;h?h.scrollIntoView?.({block:"center"}):m.scrollIntoView?.({block:"start"})},[]);const u=r(m=>{m.key!=="Escape"||m.defaultPrevented||(m.preventDefault(),m.stopPropagation(),t())},"onKeyDown");return(0,s.jsx)("div",{ref:c,id:e,className:X("scroll-mt-16",i),onKeyDown:u,children:l})}r(Ew,"InlineRowEditorPanel");var UB=2e3,Iw=["omp","login-providers"];function hh(e){return e instanceof Error?e.message:"Something went wrong"}r(hh,"errorText");function Cs({tone:e,children:t}){return(0,s.jsx)("div",{role:e==="bad"?"alert":"status",className:X("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(Cs,"OmpNote");function $B({onSignedIn:e,autoFocus:t=!1}){const i=wn(),l=ge({queryKey:Iw,queryFn:r(()=>xs.loginProviders(),"queryFn"),staleTime:6e5}),[c,u]=(0,x.useState)(""),[m,f]=(0,x.useState)(null),[h,g]=(0,x.useState)(""),v=c||l.data?.providers[0]||"",y=Kt({mutationFn:r(C=>xs.startLogin(C.name),"mutationFn"),onSuccess:r((C,{popup:M})=>{g(""),f(C),M&&C.url&&C.state==="waiting"?M.location.href=C.url:M?.close()},"onSuccess"),onError:r((C,{popup:M})=>M?.close(),"onError")}),j=Kt({mutationFn:r(C=>xs.answerLogin(m.id,C),"mutationFn"),onSuccess:r(C=>{g(""),f(C)},"onSuccess")}),k=Kt({mutationFn:r(C=>xs.cancelLogin(C),"mutationFn"),onSettled:r(()=>f(null),"onSettled")}),S=m?.state==="waiting",N=ge({queryKey:["omp","login",m?.id??""],queryFn:r(()=>xs.login(m.id),"queryFn"),enabled:S,refetchInterval:UB});(0,x.useEffect)(()=>{N.data&&N.data.id===m?.id&&f(N.data)},[N.data,m?.id]);const _=(0,x.useRef)(null),I=(0,x.useRef)(e);I.current=e;const D=m?.state==="succeeded"?m.id:null;(0,x.useEffect)(()=>{!D||_.current===D||(_.current=D,i.invalidateQueries({queryKey:["agents"]}),I.current?.())},[D,i]);function T(C){C.preventDefault(),h.trim()&&j.mutate(h.trim())}return r(T,"submitAnswer"),l.isLoading?(0,s.jsx)("p",{className:"text-sm text-ink-3",children:"Asking OMP which providers it can sign in to..."}):l.error?(0,s.jsxs)(Cs,{tone:"bad",children:[hh(l.error)," ",(0,s.jsx)(le,{type:"button",variant:"link",size:"xs",onClick:r(()=>{l.refetch()},"onClick"),children:"Try again"})]}):(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[!m||!S?(0,s.jsxs)("form",{className:"flex flex-col gap-2 sm:flex-row sm:items-end",onSubmit:r(C=>{C.preventDefault(),v&&y.mutate({name:v,popup:window.open("about:blank","_blank")})},"onSubmit"),children:[(0,s.jsxs)("label",{className:"flex min-w-0 flex-1 flex-col gap-1.5 text-sm font-medium",children:["Provider",(0,s.jsx)(Zh,{value:v,onChange:r(C=>u(C.target.value),"onChange"),autoFocus:t,className:"w-full",children:l.data?.providers.map(C=>(0,s.jsx)("option",{value:C,children:C},C))})]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)(le,{type:"submit",disabled:!v||y.isPending,className:"flex-1 sm:flex-none",children:y.isPending?"Starting...":"Sign in"}),(0,s.jsx)(le,{type:"button",variant:"ghost",size:"icon","aria-label":"Reload provider list",title:"Reload provider list",onClick:r(()=>{xs.loginProviders(!0).then(C=>i.setQueryData(Iw,C))},"onClick"),children:(0,s.jsx)(Yr,{"aria-hidden":"true"})})]})]}):null,y.error?(0,s.jsx)(Cs,{tone:"bad",children:hh(y.error)}):null,m?(0,s.jsxs)("section",{"aria-label":`Sign-in to ${m.provider}`,className:"flex flex-col gap-3 rounded-lg border border-line bg-bg-2 px-4 py-3",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,s.jsx)("b",{className:"text-sm font-semibold",children:m.provider}),S?(0,s.jsx)(le,{type:"button",variant:"ghost",size:"xs",disabled:k.isPending,onClick:r(()=>k.mutate(m.id),"onClick"),children:"Cancel"}):null]}),S&&m.url?(0,s.jsxs)("ol",{className:"flex list-decimal flex-col gap-1.5 ps-5 text-sm text-ink-2",children:[(0,s.jsxs)("li",{children:[(0,s.jsxs)("a",{href:m.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,s.jsx)(bS,{"aria-hidden":"true",className:"size-3.5"})]})," ","(already opened in a new tab unless the browser blocked it) and approve access."]}),m.prompt&&!m.prompt.secret?(0,s.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,s.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&&m.prompt?(0,s.jsxs)("form",{onSubmit:T,className:"flex flex-col gap-2 sm:flex-row sm:items-end",children:[(0,s.jsxs)("label",{className:"flex min-w-0 flex-1 flex-col gap-1.5 text-sm font-medium",children:[m.prompt.label.replace(/:$/,""),(0,s.jsx)(Wn,{value:h,onChange:r(C=>g(C.target.value),"onChange"),type:m.prompt.secret?"password":"text",autoComplete:"off",spellCheck:!1,autoFocus:!m.url})]}),(0,s.jsx)(le,{type:"submit",disabled:!h.trim()||j.isPending,children:j.isPending?"Sending...":"Send"})]}):null,S&&!m.prompt&&!m.url?(0,s.jsx)("p",{className:"text-sm text-ink-3",children:"Waiting for OMP..."}):null,S&&m.message?(0,s.jsx)(Cs,{tone:"bad",children:m.message}):null,j.error?(0,s.jsx)(Cs,{tone:"bad",children:hh(j.error)}):null,m.state==="succeeded"?(0,s.jsxs)(Cs,{tone:"ok",children:[m.message??"Signed in",". Models from this provider are ready."]}):null,m.state==="failed"?(0,s.jsxs)(Cs,{tone:"bad",children:[m.message??"Sign-in failed",". Check the account on the provider's page, then press Sign in again."]}):null,S&&!m.prompt&&m.lines.length?(0,s.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:m.lines.join(`
|
|
55
|
-
`)}):null,(!S||m.prompt)&&m.lines.length?(0,s.jsxs)("details",{className:"text-xs text-ink-3",children:[(0,s.jsx)("summary",{className:"cursor-pointer select-none",children:"What OMP printed"}),(0,s.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:m.lines.join(`
|
|
56
|
-
`)})]}):null]}):null]})}r($B,"OmpSignIn");var gh=500,xh=10,BB=(0,x.memo)(r(function({result:t,savedIds:i,room:l,onAdd:c}){const[u,m]=(0,x.useState)(""),[f,h]=(0,x.useState)(()=>new Set),g=(0,x.useMemo)(()=>t.models.filter(_=>!i.has(_.id)),[t.models,i]),v=(0,x.useMemo)(()=>{if(t.truncated)return[];const _=new Set(t.models.map(I=>I.id));return[...i].filter(I=>!_.has(I))},[t.models,t.truncated,i]),y=(0,x.useMemo)(()=>{const _=u.trim().toLowerCase();return _?t.models.filter(I=>I.id.toLowerCase().includes(_)||I.name?.toLowerCase().includes(_)):t.models},[u,t.models]),j=g.filter(_=>f.has(_.id));function k(_,I){h(D=>{const T=new Set(D);return I?T.add(_):T.delete(_),T})}r(k,"toggle");function S(_){c(_),h(new Set)}r(S,"add");const N=r(_=>_>l,"overLimit");return(0,s.jsxs)("div",{className:"flex flex-col gap-2 rounded-md border border-line-soft p-3","aria-label":"Upstream models",children:[(0,s.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,s.jsxs)(Cs,{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,xh).join(", "),v.length>xh?`, and ${v.length-xh} more`:"","."]}):null,(0,s.jsx)(Wn,{value:u,onChange:r(_=>m(_.target.value),"onChange"),placeholder:"Search upstream models","aria-label":"Search upstream models",autoComplete:"off"}),(0,s.jsxs)("ul",{className:"flex max-h-72 flex-col overflow-y-auto rounded-md border border-line-soft",children:[y.slice(0,gh).map(_=>{const I=i.has(_.id);return(0,s.jsx)("li",{className:"border-b border-line-soft last:border-b-0",children:(0,s.jsxs)("label",{className:"flex items-center gap-2 px-2 py-1.5 text-sm",children:[(0,s.jsx)("input",{type:"checkbox",checked:I||f.has(_.id),disabled:I,onChange:r(D=>k(_.id,D.target.checked),"onChange"),"aria-label":_.id}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs",children:_.id}),_.name?(0,s.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:_.name}):null,I?(0,s.jsx)("span",{className:"shrink-0 text-xs text-ink-3",children:"Added"}):null]})},_.id)}),y.length===0?(0,s.jsx)("li",{className:"px-2 py-1.5 text-sm text-ink-3",children:"No upstream model matches."}):null]}),y.length>gh?(0,s.jsxs)("span",{className:"text-xs text-ink-3",children:["Showing ",gh," of ",y.length,"; search to narrow the list."]}):null,(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsxs)(le,{type:"button",size:"sm",disabled:j.length===0||N(j.length),onClick:r(()=>S(j),"onClick"),children:["Add selected",j.length?` (${j.length})`:""]}),(0,s.jsxs)(le,{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,s.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")),bh=["omp","custom-providers"],KB={"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"},qB={"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"},Cd={id:"",name:"",api:"",contextWindow:"",maxTokens:"",reasoning:!1,images:!1};function FB(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:[{...Cd}]}}r(FB,"initialState");function Ag(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(Ag,"keyInput");function Tl(e){const t=Number(e.replace(/[_,\s]/g,""));return e.trim()&&Number.isInteger(t)&&t>0?t:void 0}r(Tl,"positive");function _g(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(_g,"headersInput");function HB(e){return{baseUrl:e.baseUrl.trim(),api:e.api||null,apiKey:Ag(e),authHeader:e.authHeader,disableStrictTools:e.disableStrictTools,headers:_g(e),discovery:e.discovery?{type:e.discovery,...Tl(e.discoveryTimeout)?{timeoutMs:Tl(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}:{},...Tl(t.contextWindow)?{contextWindow:Tl(t.contextWindow)}:{},...Tl(t.maxTokens)?{maxTokens:Tl(t.maxTokens)}:{},...t.reasoning?{reasoning:!0}:{},...t.images?{images:!0}:{}}))}}r(HB,"toInput");function dc(e){if(e instanceof Si){const t=e.body?.details;if(Array.isArray(t)){const i=t.map(l=>typeof l?.message=="string"?`${Array.isArray(l.path)?`${l.path.join(".")}: `:""}${l.message}`:null).filter(l=>!!l);if(i.length)return i}return[e.message]}return[e instanceof Error?e.message:"Something went wrong"]}r(dc,"problemsOf");function ec({label:e,hint:t,children:i}){return(0,s.jsxs)("label",{className:"flex min-w-0 flex-col gap-1.5 text-sm font-medium",children:[e,i,t?(0,s.jsx)("span",{className:"text-xs font-normal text-ink-3",children:t}):null]})}r(ec,"Field");function vh({label:e,hint:t,checked:i,onChange:l}){return(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsxs)("span",{className:"flex flex-col gap-0.5 text-sm",children:[(0,s.jsx)("span",{className:"font-medium",children:e}),(0,s.jsx)("span",{className:"text-xs text-ink-3",children:t})]}),(0,s.jsx)(OS,{checked:i,onCheckedChange:l,"aria-label":e})]})}r(vh,"Toggle");function Tw({provider:e,takenNames:t,onSaved:i,onCancel:l,onDirtyChange:c}){const[u]=(0,x.useState)(()=>FB(e)),[m,f]=(0,x.useState)(u),h=JSON.stringify(m)!==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(W=>({...W,...O})),"set"),S=r((O,W)=>f(Y=>({...Y,models:Y.models.map((ce,oe)=>oe===O?{...ce,...W}:ce)})),"setModel"),N=r((O,W)=>f(Y=>({...Y,headers:Y.headers.map((ce,oe)=>oe===O?{...ce,...W}:ce)})),"setHeader"),_=e!==null,I=!_&&m.name&&!P_.test(m.name)?"Use letters, digits, dot, dash or underscore":!_&&t.includes(m.name)?"A provider with this name already exists; edit it instead":null,D=Kt({mutationFn:r(()=>xs.saveCustomProvider(m.name.trim(),HB(m)),"mutationFn"),onSuccess:i}),T=Kt({mutationFn:r(()=>xs.probeCustomProvider({..._?{name:e.name}:{},baseUrl:m.baseUrl.trim(),apiKey:Ag(m),authHeader:m.authHeader,headers:_g(m),...m.models[0]?.id.trim()?{modelId:m.models[0].id.trim()}:{}}),"mutationFn"),onSuccess:r(O=>{v(O),f(W=>({...W,api:O.suggestedApi??W.api,models:W.models.some(Y=>Y.id.trim())||!O.usedModel?W.models:[{...Cd,id:O.usedModel}]}))},"onSuccess"),onError:r(()=>v(null),"onError")}),C=Kt({mutationFn:r(()=>xs.fetchCustomProviderModels({..._?{name:e.name}:{},baseUrl:m.baseUrl.trim(),api:m.api||null,apiKey:Ag(m),authHeader:m.authHeader,headers:_g(m)}),"mutationFn"),onSuccess:j,onError:r(()=>j(null),"onError")}),M=m.models.map(O=>O.id.trim()).filter(Boolean).join(`
|
|
57
|
-
`),z=(0,x.useMemo)(()=>new Set(M?M.split(`
|
|
58
|
-
`):[]),[M]),K=(0,x.useMemo)(()=>y&&!y.error&&!y.truncated?new Set(y.models.map(O=>O.id)):null,[y]),P=(0,x.useCallback)(O=>{f(W=>{const Y=W.models.filter($=>$.id.trim()),ce=new Set(Y.map($=>$.id.trim())),oe=O.filter($=>!ce.has($.id)).map($=>({...Cd,id:$.id,name:$.name??""}));return{...W,models:[...Y,...oe]}})},[]);function A(O){O.preventDefault(),I||D.mutate()}r(A,"submit");const B=[..._&&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,s.jsxs)("form",{onSubmit:A,"aria-label":_?`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,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("h3",{className:"text-sm font-semibold",children:_?`Edit ${e.name}`:"Add a custom provider"}),(0,s.jsx)(le,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Close",onClick:l,children:(0,s.jsx)(is,{"aria-hidden":"true"})})]}),_&&e.otherKeys.length?(0,s.jsxs)("p",{className:"text-xs text-ink-3",children:["Also kept as written in models.yml: ",e.otherKeys.join(", "),"."]}):null,(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,s.jsx)(ec,{label:"Name",hint:I??"Used in model ids, e.g. my-gateway/model",children:(0,s.jsx)(Wn,{value:m.name,onChange:r(O=>k({name:O.target.value}),"onChange"),disabled:_,required:!0,"aria-invalid":!!I,placeholder:"my-gateway",autoComplete:"off"})}),(0,s.jsx)(ec,{label:"Base URL",hint:"Usually ends in /v1",children:(0,s.jsx)(Wn,{value:m.baseUrl,onChange:r(O=>k({baseUrl:O.target.value}),"onChange"),required:!0,type:"url",placeholder:"http://localhost:8000/v1",autoComplete:"off"})})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:"API key"}),(0,s.jsx)(DB,{"aria-label":"Where the key comes from",className:"flex-wrap self-start",children:B.map(({mode:O,label:W})=>(0,s.jsx)(MB,{selected:m.keyMode===O,onClick:r(()=>k({keyMode:O,keyValue:""}),"onClick"),children:W},O))}),m.keyMode==="literal"?(0,s.jsx)(Wn,{value:m.keyValue,onChange:r(O=>k({keyValue:O.target.value}),"onChange"),type:"password",autoComplete:"off",required:!0,"aria-label":"API key",placeholder:"sk-..."}):m.keyMode==="env"?(0,s.jsx)(Wn,{value:m.keyValue,onChange:r(O=>k({keyValue:O.target.value.toUpperCase()}),"onChange"),required:!0,"aria-label":"Environment variable name",placeholder:"MY_GATEWAY_KEY",autoComplete:"off"}):m.keyMode==="command"?(0,s.jsx)(Wn,{value:m.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,s.jsx)("span",{className:"text-xs text-ink-3",children:m.keyMode==="keep"?`The saved ${e?.apiKey.kind==="env"?`variable ${e.apiKey.name}`:e?.apiKey.kind==="command"?"command":"key"} stays as it is.`:m.keyMode==="env"?"OMP reads the key from this variable on the machine that runs agents.":m.keyMode==="command"?"OMP runs this command and uses what it prints.":m.keyMode==="none"?"For local servers that need no key.":"Saved in OMP's models.yml. Wardmote never shows it again."})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.jsx)(ec,{label:"Wire format (api)",hint:"Picking the wrong one is the most common mistake. Test connection suggests the right one.",children:(0,s.jsxs)(Zh,{value:m.api,onChange:r(O=>k({api:O.target.value}),"onChange"),className:"w-full",children:[(0,s.jsx)("option",{value:"",children:"Set per model"}),X_.map(O=>(0,s.jsx)("option",{value:O,children:KB[O]??O},O))]})}),(0,s.jsx)(le,{type:"button",variant:"secondary",size:"sm",className:"self-start",disabled:!m.baseUrl.trim()||T.isPending,onClick:r(()=>T.mutate(),"onClick"),children:T.isPending?"Testing...":"Test connection"}),T.error?(0,s.jsx)(Cs,{tone:"bad",children:dc(T.error).join(" ")}):null,g?(0,s.jsxs)(Cs,{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,s.jsx)("ul",{className:"mt-1 flex flex-col gap-0.5 text-xs text-ink-3",children:g.attempts.map(O=>(0,s.jsxs)("li",{className:"break-all",children:[O.api,": ",O.status??"no answer",O.detail&&!O.ok?` (${O.detail})`:""]},O.api))})]}):null]}),(0,s.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,s.jsx)("legend",{className:"mb-1.5 text-sm font-medium",children:"Models"}),m.models.map((O,W)=>(0,s.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,s.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,s.jsx)(Wn,{"aria-label":`Model ${W+1} id`,value:O.id,onChange:r(Y=>S(W,{id:Y.target.value}),"onChange"),placeholder:"model id",className:"col-span-2 sm:col-span-1",autoComplete:"off"}),(0,s.jsx)(Wn,{"aria-label":`Model ${W+1} name`,value:O.name,onChange:r(Y=>S(W,{name:Y.target.value}),"onChange"),placeholder:"Display name",className:"col-span-2 sm:col-span-1"}),(0,s.jsx)(Wn,{"aria-label":`Model ${W+1} context window`,value:O.contextWindow,onChange:r(Y=>S(W,{contextWindow:Y.target.value}),"onChange"),placeholder:"Context",inputMode:"numeric"}),(0,s.jsx)(Wn,{"aria-label":`Model ${W+1} max output tokens`,value:O.maxTokens,onChange:r(Y=>S(W,{maxTokens:Y.target.value}),"onChange"),placeholder:"Max output",inputMode:"numeric"}),(0,s.jsxs)("div",{className:"col-span-2 flex items-center justify-between gap-3 text-xs sm:col-span-1",children:[(0,s.jsxs)("label",{className:"inline-flex items-center gap-1.5",children:[(0,s.jsx)("input",{type:"checkbox",checked:O.reasoning,onChange:r(Y=>S(W,{reasoning:Y.target.checked}),"onChange")}),"Thinks"]}),(0,s.jsxs)("label",{className:"inline-flex items-center gap-1.5",children:[(0,s.jsx)("input",{type:"checkbox",checked:O.images,onChange:r(Y=>S(W,{images:Y.target.checked}),"onChange")}),"Images"]}),(0,s.jsx)(le,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`Remove model ${W+1}`,onClick:r(()=>k({models:m.models.filter((Y,ce)=>ce!==W)}),"onClick"),children:(0,s.jsx)(Fh,{"aria-hidden":"true"})})]})]},W)),(0,s.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,s.jsxs)(le,{type:"button",variant:"secondary",size:"sm",onClick:r(()=>k({models:[...m.models,{...Cd}]}),"onClick"),children:[(0,s.jsx)(Js,{"aria-hidden":"true"}),"Add model"]}),(0,s.jsxs)(le,{type:"button",variant:"secondary",size:"sm",disabled:!m.baseUrl.trim()||C.isPending,onClick:r(()=>C.mutate(),"onClick"),children:[(0,s.jsx)(MT,{"aria-hidden":"true"}),C.isPending?"Fetching...":"Fetch models"]})]}),C.error?(0,s.jsx)(Cs,{tone:"bad",children:dc(C.error).join(" ")}):null,y?.error?(0,s.jsx)(Cs,{tone:"bad",children:y.error}):null,y&&!y.error?(0,s.jsx)(BB,{result:y,savedIds:z,room:500-z.size,onAdd:P}):null,(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Leave context and max output empty when unsure; OMP fills known models in."})]}),(0,s.jsxs)("details",{className:"flex flex-col gap-3",children:[(0,s.jsx)("summary",{className:"cursor-pointer select-none text-sm font-medium",children:"Advanced"}),(0,s.jsxs)("div",{className:"mt-3 flex flex-col gap-3",children:[(0,s.jsx)(vh,{label:"Send the key as an Authorization header",hint:"OpenAI wire formats already do. Turn on for discovery or proxies that need it.",checked:m.authHeader,onChange:r(O=>k({authHeader:O}),"onChange")}),(0,s.jsx)(vh,{label:"Disable strict tools",hint:"For Anthropic-style proxies that reject strict tool schemas.",checked:m.disableStrictTools,onChange:r(O=>k({disableStrictTools:O}),"onChange")}),(0,s.jsxs)("div",{className:"grid gap-3 sm:grid-cols-2",children:[(0,s.jsx)(ec,{label:"Model discovery",hint:"Ask the server for its models instead of listing them",children:(0,s.jsxs)(Zh,{value:m.discovery,onChange:r(O=>k({discovery:O.target.value}),"onChange"),className:"w-full",children:[(0,s.jsx)("option",{value:"",children:"Off"}),H_.map(O=>(0,s.jsx)("option",{value:O,children:qB[O]??O},O))]})}),m.discovery?(0,s.jsx)(ec,{label:"Discovery timeout (ms)",children:(0,s.jsx)(Wn,{value:m.discoveryTimeout,onChange:r(O=>k({discoveryTimeout:O.target.value}),"onChange"),inputMode:"numeric",placeholder:"OMP default"})}):null]}),m.discovery==="openai-models-list"?(0,s.jsx)(vh,{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:m.injectV1,onChange:r(O=>k({injectV1:O}),"onChange")}):null,(0,s.jsxs)("fieldset",{className:"flex flex-col gap-2",children:[(0,s.jsx)("legend",{className:"mb-1.5 text-sm font-medium",children:"Extra headers"}),m.headers.map((O,W)=>(0,s.jsxs)("div",{className:"grid grid-cols-[1fr_1fr_auto] gap-2",children:[(0,s.jsx)(Wn,{"aria-label":`Header ${W+1} name`,value:O.name,onChange:r(Y=>N(W,{name:Y.target.value}),"onChange"),placeholder:"X-Header",disabled:O.saved}),(0,s.jsx)(Wn,{"aria-label":`Header ${W+1} value`,value:O.value,onChange:r(Y=>N(W,{value:Y.target.value}),"onChange"),placeholder:O.saved?"Saved; type to replace":"value",type:"password",autoComplete:"off"}),(0,s.jsx)(le,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Remove header ${W+1}`,onClick:r(()=>k({headers:m.headers.filter((Y,ce)=>ce!==W)}),"onClick"),children:(0,s.jsx)(Fh,{"aria-hidden":"true"})})]},W)),(0,s.jsxs)(le,{type:"button",variant:"secondary",size:"sm",className:"self-start",onClick:r(()=>k({headers:[...m.headers,{name:"",value:"",saved:!1}]}),"onClick"),children:[(0,s.jsx)(Js,{"aria-hidden":"true"}),"Add header"]})]})]})]}),D.error?(0,s.jsx)(Cs,{tone:"bad",children:(0,s.jsx)("ul",{className:"flex flex-col gap-0.5",children:dc(D.error).map(O=>(0,s.jsx)("li",{children:O},O))})}):null,(0,s.jsxs)("div",{className:"flex flex-wrap justify-end gap-2",children:[(0,s.jsx)(le,{type:"button",variant:"ghost",onClick:l,children:"Cancel"}),(0,s.jsx)(le,{type:"submit",disabled:D.isPending||!!I,children:D.isPending?"Checking with OMP...":"Save provider"})]})]})}r(Tw,"CustomProviderForm");function VB(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(VB,"keySummary");var Ul=":new";function WB(e){return e===Ul?Ul:e.name}r(WB,"providerKey");function QB({onChanged:e}){const t=wn(),i=ge({queryKey:bh,queryFn:r(()=>xs.customProviders(),"queryFn")}),l=PB(WB),c=Kt({mutationFn:r(h=>xs.removeCustomProvider(h),"mutationFn"),onSuccess:r((h,g)=>{t.setQueryData(bh,h),l.openKey===g&&l.close(!1),e?.()},"onSuccess")}),u=i.data?.providers??[],m=u.map(h=>h.name),f=r(h=>{t.setQueryData(bh,h),l.close(),e?.()},"onSaved");return(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[i.error?(0,s.jsx)(Cs,{tone:"bad",children:dc(i.error).join(" ")}):null,i.data?.parseError?(0,s.jsxs)(Cs,{tone:"bad",children:[i.data.parseError,". Fix ",i.data.modelsPath," by hand; Wardmote will not overwrite it."]}):null,u.length?(0,s.jsx)("ul",{"aria-label":"Custom providers",className:"flex flex-col divide-y divide-line rounded-lg border border-line",children:u.map(h=>(0,s.jsxs)("li",{children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-sm",children:[(0,s.jsx)("b",{className:"font-medium",children:h.name}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate text-xs text-ink-3",children:[h.baseUrl,h.api,VB(h),h.discovery?`discovery: ${h.discovery.type}`:`${h.models.length} ${h.models.length===1?"model":"models"}`].filter(Boolean).join(" · ")}),(0,s.jsxs)("span",{className:"flex gap-1",children:[(0,s.jsx)(le,{type:"button",variant:"ghost",size:"icon-sm","aria-label":`Edit ${h.name}`,...l.triggerProps(h.name),onClick:r(()=>l.toggle(h),"onClick"),children:(0,s.jsx)(S0,{"aria-hidden":"true"})}),(0,s.jsx)(le,{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,s.jsx)(Fh,{"aria-hidden":"true"})})]})]}),l.openKey===h.name?(0,s.jsx)(Ew,{id:l.panelId(h.name),onEscape:l.dismiss,className:"px-2 pb-2 sm:px-3 sm:pb-3",children:(0,s.jsx)(Tw,{provider:h,takenNames:m,onCancel:r(()=>l.close(),"onCancel"),onSaved:f,onDirtyChange:l.setDirty})}):null]},h.name))}):i.isLoading?(0,s.jsx)("p",{className:"text-sm text-ink-3",children:"Reading models.yml..."}):null,c.error?(0,s.jsx)(Cs,{tone:"bad",children:dc(c.error).join(" ")}):null,l.openKey===Ul?(0,s.jsx)(Ew,{id:l.panelId(Ul),onEscape:l.dismiss,children:(0,s.jsx)(Tw,{provider:null,takenNames:m,onCancel:r(()=>l.close(),"onCancel"),onSaved:f,onDirtyChange:l.setDirty})}):(0,s.jsxs)(le,{type:"button",variant:"secondary",size:"sm",className:"self-start",disabled:!!i.data?.parseError,...l.triggerProps(Ul),onClick:r(()=>l.request(Ul),"onClick"),children:[(0,s.jsx)(Js,{"aria-hidden":"true"}),"Add custom provider"]}),i.data?(0,s.jsxs)("p",{className:"text-xs text-ink-3",children:["Saved to ",i.data.modelsPath,", with the previous copy in models.yml.bak."]}):null]})}r(QB,"CustomProviders");var GB=["Check OMP","Connect a model","First task"],Eg="Atlas",YB="general";var XB="Only an instance admin can set up OMP on this server.";function yh(e){return e?e.status===403?{message:XB,retry:!1}:{message:e.message||"Could not check OMP on this server.",retry:!0}:null}r(yh,"statusFailure");var ZB={anthropic:"Anthropic",openai:"OpenAI","openai-codex":"OpenAI",openrouter:"OpenRouter",google:"Google",deepseek:"DeepSeek"};function JB(e){return e?ZB[e]??e:null}r(JB,"providerLabel");function e6(e){return e.state==="ready"?"ready":e.state==="missing"?e.network==="offline"?"offline":"install":"old"}r(e6,"checkView");function t6(e){return(e?.models.length??0)>0}r(t6,"hasModel");function n6(e){return e.state!=="ready"?null:t6(e)?2:1}r(n6,"nextStepAfterCheck");function s6(e){return!e.connected||e.state!=="ready"?null:e.modelCount>0?2:1}r(s6,"nextStepAfterRemote");function a6(e){return e.copies.slice(1).filter(t=>t.version!==e.version)}r(a6,"olderCopies");function i6(e){const t=e.trim().split(/\r?\n/,1)[0]?.trim()??"";return t.length<=120?t:`${t.slice(0,119).trimEnd()}…`}r(i6,"taskTitle");function Rw(e){const t=e?.replace(/[\\/]+$/,"").split(/[\\/]/).pop()?.trim();return t||"My company"}r(Rw,"companyNameForFolder");function r6(e){return e?.recommendedModel?e.models.find(t=>t.id===e.recommendedModel)?.label??e.recommendedModel:null}r(r6,"recommendedModelLabel");function l6(e){return e?.recommendedModel?JB(e.models.find(t=>t.id===e.recommendedModel)?.provider??e.recommendedModel.split("/",1)[0]):null}r(l6,"signedInProvider");var nf="Wardmote",aA=2e3,cd=["onboarding","omp-status"],o6={ok:(0,s.jsx)(Ta,{className:"size-3.5","aria-hidden":!0}),bad:(0,s.jsx)(is,{className:"size-3.5","aria-hidden":!0}),warn:(0,s.jsx)(Ja,{className:"size-3.5","aria-hidden":!0}),wait:(0,s.jsx)(gI,{className:"size-3.5","aria-hidden":!0}),run:(0,s.jsx)(Yr,{className:"size-3.5 motion-safe:animate-spin","aria-hidden":!0})},c6={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 $l({rows:e,label:t}){return(0,s.jsx)("section",{"aria-label":t,className:"rounded-lg border border-line-soft bg-bg-2 px-4 py-1",children:(0,s.jsx)("ul",{children:e.map(i=>(0,s.jsxs)("li",{"data-check":i.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,s.jsx)("span",{className:X("grid size-5.5 shrink-0 place-items-center rounded-full",c6[i.state]),children:o6[i.state]}),(0,s.jsx)("span",{className:"min-w-0",children:i.label}),i.value?(0,s.jsx)("span",{className:"ms-auto min-w-0 truncate font-mono text-xs text-ink-3",children:i.value}):null]},i.label))})})}r($l,"Checks");function Ig({command:e}){const[t,i]=(0,x.useState)(!1);return(0,s.jsxs)("div",{className:"flex flex-col items-start gap-2",children:[(0,s.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,s.jsxs)(le,{type:"button",variant:"secondary",size:"sm",onClick:r(()=>{w0(e).then(()=>i(!0))},"onClick"),children:[t?(0,s.jsx)(Ta,{className:"size-3.5","aria-hidden":!0}):(0,s.jsx)(SI,{className:"size-3.5","aria-hidden":!0}),t?"Copied":"Copy command"]})]})}r(Ig,"CommandBlock");function sf({tone:e,children:t}){return(0,s.jsxs)("div",{role:e==="bad"?"alert":"note",className:X("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,s.jsx)(Ja,{className:"mt-0.5 size-3.5 shrink-0","aria-hidden":!0}),(0,s.jsx)("span",{children:t})]})}r(sf,"Note");function u6({step:e}){return(0,s.jsx)("ol",{"aria-label":"Setup steps",className:"flex flex-wrap items-center gap-1.5 text-xs text-ink-2",children:GB.map((t,i)=>(0,s.jsxs)("li",{className:"flex items-center gap-1.5","aria-current":i===e?"step":void 0,children:[i>0?(0,s.jsx)("span",{"aria-hidden":!0,className:"h-px w-5.5 bg-line"}):null,(0,s.jsx)("span",{className:X("grid size-5 place-items-center rounded-full border border-line-strong text-(length:--text-micro) font-semibold",i<e&&"border-ok bg-ok text-bg",i===e&&"border-accent text-accent"),children:i<e?(0,s.jsx)(Ta,{className:"size-3","aria-hidden":!0}):i+1}),(0,s.jsx)("span",{className:X(i===e?"font-semibold text-ink":"max-sm:sr-only"),children:t})]},t))})}r(u6,"Steps");function tr({title:e,lede:t}){return(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,s.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,s.jsx)("p",{className:"max-w-130 text-base text-ink-2",children:t})]})}r(tr,"Heading");function iA({title:e,paragraphs:t}){return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:e}),t.map(i=>(0,s.jsx)("p",{className:"text-sm text-ink-2",children:i},i))]})}r(iA,"SideText");var d6=(0,s.jsx)(iA,{title:"Why OMP",paragraphs:[`${nf} runs every agent on OMP. OMP talks to the model and uses the tools; ${nf} 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 _c({children:e}){return(0,s.jsx)("div",{className:"mt-auto flex flex-wrap items-center gap-2 pt-2",children:e})}r(_c,"Actions");function Tg(e){if(e instanceof Si){const t=e.body;if(t&&typeof t.error=="string")return t.error}return e instanceof Error?e.message:String(e)}r(Tg,"errorMessage$1");function f6({open:e,onOpenChange:t,onPick:i}){const[l,c]=(0,x.useState)(null),u=ge({queryKey:["onboarding","omp-browse",l],queryFn:r(()=>xs.browse(l),"queryFn"),enabled:e});return(0,s.jsx)(ya,{open:e,onOpenChange:t,children:(0,s.jsxs)(za,{className:"sm:max-w-lg",children:[(0,s.jsxs)(Jl,{children:[(0,s.jsx)(Da,{children:"Choose omp"}),(0,s.jsx)(eo,{className:"truncate font-mono text-xs",children:u.data?.path??"…"})]}),(0,s.jsxs)("ul",{className:"-mx-2 max-h-80 overflow-y-auto",children:[u.data?.parent?(0,s.jsx)("li",{children:(0,s.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,s.jsx)(wi,{className:"size-4 text-ink-3","aria-hidden":!0}),".."]})}):null,u.data?.entries.map(m=>(0,s.jsx)("li",{children:(0,s.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(()=>{m.kind==="directory"?c(m.path):(i(m.path),t(!1))},"onClick"),children:[m.kind==="directory"?(0,s.jsx)(wi,{className:"size-4 text-ink-3","aria-hidden":!0}):(0,s.jsx)(LT,{className:"size-4 text-accent","aria-hidden":!0}),(0,s.jsx)("span",{className:"truncate",children:m.name})]})},m.path)),u.isError?(0,s.jsx)("li",{className:"px-2 py-2 text-sm text-bad",children:Tg(u.error)}):null]})]})})}r(f6,"OmpFilePicker");function m6({status:e,failure:t,command:i,onChooseCommand:l,onRemote:c,onRetry:u}){const[m,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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tr,{title:"Install OMP",lede:"Looking for OMP on this computer."}),(0,s.jsx)($l,{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,s.jsx)(sf,{tone:"bad",children:t.message}):null]});const g=e6(e);if(g==="old"){const v=a6(e);return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tr,{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. ${nf} needs OMP ${e.minVersion} or newer.`}),(0,s.jsx)(Ig,{command:e.updateCommand}),(0,s.jsx)($l,{label:"OMP checks",rows:[{state:"ok",label:"omp found",value:e.path},h(e)]}),v.length>0?(0,s.jsxs)(sf,{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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tr,{title:"You are offline",lede:"Installing needs the internet once. Connect, or point to an omp you already copied here."}),(0,s.jsx)($l,{label:"OMP checks",rows:[{state:"bad",label:"omp.sh not reachable",value:"3 tries"},i?h(e):{state:"wait",label:"Version check"}]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("span",{id:"omp-path-label",className:"text-sm font-medium",children:"Path to omp"}),(0,s.jsxs)(le,{type:"button",variant:"secondary","aria-labelledby":"omp-path-label",className:"justify-between font-normal",onClick:r(()=>f(!0),"onClick"),children:[(0,s.jsx)("span",{className:X("truncate",i?"font-mono text-xs":"text-ink-3"),children:i??"Choose file"}),(0,s.jsx)(wi,{className:"size-4","aria-hidden":!0})]})]}),(0,s.jsx)(f6,{open:m,onOpenChange:f,onPick:l}),(0,s.jsx)(_c,{children:(0,s.jsxs)(le,{type:"button",variant:"secondary",onClick:u,children:[(0,s.jsx)(Yr,{className:"size-3.5","aria-hidden":!0}),"Try again"]})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tr,{title:"Install OMP",lede:"Run this in a terminal on this computer. This page moves on by itself."}),(0,s.jsx)(Ig,{command:e.installCommand}),(0,s.jsxs)("p",{className:"text-sm text-ink-2",children:[e.os.label," detected ·"," ",(0,s.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,s.jsx)($l,{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,s.jsx)(_c,{children:(0,s.jsx)(le,{type:"button",variant:"ghost",onClick:c,children:"Run agents on another machine"})}):null]})}r(m6,"CheckOmpScreen");function p6({remote:e,pending:t,error:i,onCheck:l,onLocal:c}){const[u,m]=(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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tr,{title:"Run agents on another machine",lede:"OMP must be installed where agents run. We check it over SSH."}),(0,s.jsxs)("form",{className:"flex flex-col gap-1.5",onSubmit:r(h=>{h.preventDefault(),l(u.trim())},"onSubmit"),id:"onboarding-remote-form",children:[(0,s.jsx)("label",{htmlFor:"onboarding-ssh-address",className:"text-sm font-medium",children:"SSH address"}),(0,s.jsx)(Wn,{id:"onboarding-ssh-address",value:u,onChange:r(h=>m(h.target.value),"onChange"),placeholder:"user@host",autoComplete:"off",spellCheck:!1,"aria-describedby":"onboarding-ssh-help"}),(0,s.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,s.jsx)($l,{label:"Remote checks",rows:f}):null,i?(0,s.jsx)(sf,{tone:"bad",children:i}):null,(0,s.jsxs)(_c,{children:[(0,s.jsx)(le,{type:"button",variant:"ghost",onClick:c,children:"Use this computer"}),(0,s.jsx)("span",{className:"flex-1"}),(0,s.jsx)(le,{type:"submit",form:"onboarding-remote-form",disabled:t||u.trim().length===0,children:t?"Checking…":"Continue"})]})]})}r(p6,"RemoteScreen");function h6({remote:e,onSignedIn:t}){const[i,l]=(0,x.useState)(!1);return(0,x.useEffect)(()=>{if(!e)return;const c=window.setInterval(t,aA);return()=>window.clearInterval(c)},[e,t]),e?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tr,{title:"Connect a model",lede:`OMP on ${e.host} has no model signed in yet.`}),(0,s.jsxs)("p",{className:"text-sm text-ink-2",children:["Sign in on ",e.host,". This page moves on by itself."]}),(0,s.jsx)(Ig,{command:`ssh -t ${e.username}@${e.host}${e.port!==22?` -p ${e.port}`:""} omp login`})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(tr,{title:"Connect a model",lede:i?"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."}),i?(0,s.jsx)(QB,{onChanged:t}):(0,s.jsx)($B,{autoFocus:!0,onSignedIn:t}),(0,s.jsxs)(_c,{children:[(0,s.jsx)(le,{type:"button",variant:"link",size:"sm",onClick:r(()=>l(c=>!c),"onClick"),children:i?"Sign in to a provider instead":"Use my own server instead"}),(0,s.jsx)("span",{className:"flex-1"}),(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Moves on by itself once OMP has a model."})]})]})}r(h6,"ConnectScreen");function g6({status:e,remote:t,pending:i,error:l,onStart:c}){const[u,m]=(0,x.useState)(""),f=t?t.homeFolder:e?.projectFolder,h=t?null:r6(e);return(0,s.jsxs)("form",{className:"contents",onSubmit:r(g=>{g.preventDefault(),u.trim()&&c(u.trim())},"onSubmit"),children:[(0,s.jsx)(tr,{title:"What should your first agent do?",lede:`${Eg} starts as soon as you press Start. You can rename it and change its setup later.`}),(0,s.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,s.jsx)("label",{htmlFor:"onboarding-first-task",className:"text-sm font-medium",children:"First task"}),(0,s.jsx)(RS,{id:"onboarding-first-task",value:u,onChange:r(g=>m(g.target.value),"onChange"),rows:4,placeholder:f?`Read the README in ${f} and list the three riskiest modules.`:void 0,autoFocus:!0})]}),(0,s.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,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Agent"}),Eg,", general assistant"]}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Model"}),h?`${h} (recommended)`:"OMP default"]}),(0,s.jsxs)("div",{className:"flex min-w-0 gap-2",children:[(0,s.jsx)("span",{className:"w-21 shrink-0 text-ink-3",children:"Folder"}),(0,s.jsx)("span",{className:"min-w-0 truncate font-mono text-xs leading-5",children:f??"~"})]})]}),l?(0,s.jsx)(sf,{tone:"bad",children:l}):null,(0,s.jsxs)(_c,{children:[(0,s.jsx)("span",{className:"flex-1"}),(0,s.jsxs)(le,{type:"submit",disabled:i||u.trim().length===0,children:[(0,s.jsx)(m0,{className:"size-3.5","aria-hidden":!0}),i?"Starting…":"Start"]})]})]})}r(g6,"TaskScreen");function x6(){const{onboardingOpen:e,onboardingOptions:t,closeOnboarding:i,onboardingRouteDismissed:l,setOnboardingRouteDismissed:c}=Mc(),{companies:u,loading:m}=vt(),f=vn(),h=IU(f.pathname),g=h&&m?null:TU({pathname:f.pathname,companyPrefix:h,companies:u});if(!(e||g!==null&&!l))return null;const v=(e?t.companyId:g?.companyId)??null;return(0,s.jsx)(b6,{companyId:v,onClose:r(()=>{i(),c(!0)},"onClose")})}r(x6,"OnboardingFlow");function b6({companyId:e,onClose:t}){const i=wn(),l=bs(),{setSelectedCompanyId:c}=vt(),[u,m]=(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=ge({queryKey:[...cd,g],queryFn:r(()=>xs.status({command:g}),"queryFn"),retry:r((P,A)=>(yh(A)?.retry??!0)&&P<2,"retry"),refetchInterval:r(P=>yh(P.state.error)?.retry===!1||u===2&&P.state.data?!1:aA,"refetchInterval")}),_=N.data,I=yh(N.error),D=ge({queryKey:[...cd,"network",g],queryFn:r(()=>xs.status({command:g,network:!0}),"queryFn"),enabled:_?.state==="missing"&&f==="local",refetchInterval:3e4}),T=(0,x.useMemo)(()=>{if(_)return _.state!=="missing"?_:{..._,network:D.data?.network??null}},[_,D.data]);(0,x.useEffect)(()=>{if(f!=="local"||!_||u===2)return;const P=n6(_);P!==null&&P>u&&m(P)},[f,_,u]);const C=Kt({mutationFn:r(P=>xs.remote(P),"mutationFn"),onSuccess:r(P=>{j(P);const A=s6(P);A!==null&&m(A)},"onSuccess")}),M=(0,x.useCallback)(()=>{if(!y){i.invalidateQueries({queryKey:cd});return}xs.remote(y.address).then(P=>{j(P),P.modelCount>0&&m(2)}).catch(()=>{})},[y,i]),z=Kt({mutationFn:r(async P=>{const A=f==="remote"?y?.homeFolder??null:_?.projectFolder??null;let B=e;B||(B=(await wy.create({name:Rw(f==="remote"?y?.host:A)})).id,await i.invalidateQueries({queryKey:U.companies.all}));let O=null;f==="remote"&&y?.homeFolder&&(O=(await rT.create(B,{name:y.host,driver:"ssh",config:{host:y.host,port:y.port,username:y.username,remoteWorkspacePath:y.homeFolder}})).id);const W={};f==="local"&&_?.recommendedModel&&(W.model=_.recommendedModel),A&&(W.cwd=A),g&&(W.command=g);const Y=await $s.hire(B,{name:Eg,role:YB,appearance:Y_(),adapterType:"omp_local",adapterConfig:W,onboardingFirstAgent:!0,runtimeConfig:RB(),...O?{defaultEnvironmentId:O}:{}});Y.approval&&await vN.approve(Y.approval.id,"Approved during onboarding first-agent setup.");const ce=await rr.create(B,{name:Rw(A),status:"in_progress",...f==="local"&&A?{workspace:{sourceType:"local_path",cwd:A,isPrimary:!0}}:{}}),oe=await hn.create(B,{title:i6(P),description:P,status:"todo",assigneeAgentId:Y.agent.id,projectId:ce.id});return{companyId:B,issue:oe}},"mutationFn"),onMutate:r(()=>S(null),"onMutate"),onError:r(P=>S(Tg(P)),"onError"),onSuccess:r(async({companyId:P,issue:A})=>{await Promise.all([i.invalidateQueries({queryKey:U.companies.all}),i.invalidateQueries({queryKey:U.agents.list(P)}),i.invalidateQueries({queryKey:U.projects.list(P)}),i.invalidateQueries({queryKey:U.issues.list(P)})]);const B=(await wy.list()).find(W=>W.id===P)?.issuePrefix??null;c(P,{source:"route_sync"}),t();const O=A.identifier??A.id;l(B?`/${B}/issues/${O}`:`/issues/${O}`)},"onSuccess")}),K=u===1?(0,s.jsx)(iA,{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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("h2",{className:"text-lg font-semibold",children:f==="remote"?`Found on ${y?.host??"that machine"}`:"Found on this computer"}),(0,s.jsx)($l,{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 ${_?.version??""}`.trim()},{state:"ok",label:`${l6(_)??"Model"} signed in`,value:"imported"},{state:"ok",label:"Project folder",value:_?.projectFolder}]})]}):d6;return(0,s.jsx)(ya,{open:!0,onOpenChange:r(P=>{P||t()},"onOpenChange"),children:(0,s.jsxs)(j3,{children:[(0,s.jsx)("div",{className:"fixed inset-0 z-50 bg-bg"}),(0,s.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(P=>{P.key==="Escape"&&t()},"onKeyDown"),children:[(0,s.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,s.jsxs)("div",{className:"flex items-center gap-2.5",children:[(0,s.jsx)(p0,{className:"size-6.5 shrink-0 text-ink","aria-hidden":"true"}),(0,s.jsx)("b",{className:"text-base font-semibold",children:nf})]}),(0,s.jsx)(u6,{step:u}),u===0&&f==="local"?(0,s.jsx)(m6,{status:T,failure:I,command:g,onChooseCommand:v,onRemote:r(()=>h("remote"),"onRemote"),onRetry:r(()=>{i.invalidateQueries({queryKey:cd})},"onRetry")}):null,u===0&&f==="remote"?(0,s.jsx)(p6,{remote:y,pending:C.isPending,error:C.isError?Tg(C.error):null,onCheck:r(P=>C.mutate(P),"onCheck"),onLocal:r(()=>{h("local"),j(null)},"onLocal")}):null,u===1?(0,s.jsx)(h6,{remote:f==="remote"?y:null,onSignedIn:M}):null,u===2?(0,s.jsx)(g6,{status:_,remote:f==="remote"?y:null,pending:z.isPending,error:k,onStart:r(P=>z.mutate(P),"onStart")}):null]}),(0,s.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(b6,"OnboardingFlowDialog");function v6(){const{openNewIssue:e}=Pa();return(0,x.useEffect)(()=>{e()},[e]),(0,s.jsx)(Qe,{to:"/issues",replace:!0})}r(v6,"NewTaskShortcut");var y6="npx @tickernelz/wardmote auth bootstrap-ceo";function jh({hasActiveInvite:e=!1}){return(0,s.jsxs)("div",{className:"mt-6 border-t border-line pt-5",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 text-sm font-medium",children:[(0,s.jsx)(XI,{className:"size-4 text-ink-3","aria-hidden":!0}),(0,s.jsx)("span",{children:"Prefer to finish setup from the host?"})]}),(0,s.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,s.jsx)("pre",{className:"mt-3 overflow-x-auto rounded-md border border-line bg-bg-3/30 p-3 font-mono text-xs",children:y6})]})}r(jh,"CliFallback");function ud({children:e}){return(0,s.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,s.jsx)(Dc,{className:"block p-6",children:e})})}r(ud,"StateChrome");function j6(e){return e.user.email||e.user.name||e.user.id}r(j6,"displayIdentity");function w6(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(w6,"claimErrorCopy");function k6({claimAvailable:e,hasActiveInvite:t=!1,session:i,claimState:l,claimError:c,onClaim:u}){if(!e)return(0,s.jsxs)(ud,{children:[(0,s.jsx)("h1",{className:"text-xl font-semibold",children:"This Wardmote is waiting on its first admin"}),(0,s.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,s.jsx)(jh,{hasActiveInvite:t}),(0,s.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,s.jsxs)(ud,{children:[(0,s.jsxs)("div",{className:"flex items-start gap-3",children:[(0,s.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,s.jsx)(zd,{className:"size-5","aria-hidden":!0})}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-xl font-semibold",children:"You're the instance admin"}),(0,s.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:"Setup is complete. Taking you to onboarding to create your first organization..."})]})]}),(0,s.jsxs)("div",{className:"mt-5 flex items-center gap-3",children:[(0,s.jsx)(As,{className:"size-4 animate-spin text-ink-3","aria-hidden":!0}),(0,s.jsx)("span",{className:"text-sm text-ink-3",children:"Redirecting..."})]}),(0,s.jsx)("div",{className:"mt-5",children:(0,s.jsx)(le,{asChild:!0,variant:"secondary",children:(0,s.jsx)("a",{href:"/",children:"Continue to dashboard"})})})]});if(!i)return(0,s.jsxs)(ud,{children:[(0,s.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,s.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,s.jsx)("div",{className:"mt-5",children:(0,s.jsx)(le,{asChild:!0,children:(0,s.jsx)(gn,{to:"/auth?next=/",children:"Sign in / Create account"})})}),(0,s.jsx)(jh,{hasActiveInvite:t})]});const m=w6(c),f=l==="claiming";return(0,s.jsxs)(ud,{children:[(0,s.jsx)("h1",{className:"text-xl font-semibold",children:"Finish setting up this Wardmote"}),(0,s.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,s.jsxs)("div",{className:"mt-5 flex flex-wrap items-center gap-3",children:[(0,s.jsxs)(le,{onClick:u,disabled:f,children:[f&&(0,s.jsx)(As,{className:"mr-2 size-4 animate-spin","aria-hidden":!0}),f?"Claiming...":"Claim this instance"]}),(0,s.jsxs)("span",{className:"text-sm text-ink-3",children:["Signed in as ",(0,s.jsx)("span",{className:"font-medium text-ink",children:j6(i)})]})]}),(0,s.jsxs)("p",{className:"mt-3 text-xs text-ink-3",children:["Wrong account?"," ",(0,s.jsx)(gn,{to:"/auth?next=/",className:"underline underline-offset-2",children:"Switch account"}),"."]}),c&&(0,s.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,s.jsx)(Ja,{className:"mt-0.5 size-4 flex-shrink-0","aria-hidden":!0}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"font-medium",children:m.title}),m.body&&(0,s.jsx)("p",{className:"mt-1 text-bad/90",children:m.body})]})]}),(0,s.jsx)(jh,{hasActiveInvite:t})]})}r(k6,"BootstrapPendingPage");var dd=5e3;function S6({temporary:e,retrying:t,onRetry:i}){return(0,s.jsxs)("div",{className:"mx-auto flex max-w-xl flex-col gap-4 px-4 py-16",children:[(0,s.jsx)(Yr,{className:"size-6 text-ink-3","aria-hidden":"true"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",role:"status",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold",children:e?"Reconnecting to Wardmote":"Unable to load Wardmote"}),(0,s.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,s.jsx)("div",{children:(0,s.jsx)(le,{variant:"secondary",onClick:i,disabled:t,children:t?"Connecting…":"Try again"})})]})}r(S6,"CloudAccessError");function N6(){return(0,s.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,s.jsxs)(Dc,{className:"block p-6",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold",children:"No organization access"}),(0,s.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,s.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(N6,"NoBoardAccessPage");function Dw({allowMembershipRequest:e=!1}={}){const t=vn(),i=wn(),[l,c]=(0,x.useState)(!1),u=ge({queryKey:U.health,queryFn:r(()=>Rc.get(),"queryFn"),retry:!1,refetchInterval:r(T=>{if(T.state.error)return Tr(T.state.error)?dd:!1;const C=T.state.data;return C?.status==="starting"?dd:C?.deploymentMode==="authenticated"&&C.bootstrapStatus==="bootstrap_pending"?2e3:!1},"refetchInterval"),refetchIntervalInBackground:!0}),m=u.data?.deploymentMode==="authenticated",f=m&&u.data?.bootstrapStatus==="bootstrap_pending",h=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),enabled:m,retry:!1,refetchInterval:r(T=>Tr(T.state.error)?dd:!1,"refetchInterval"),refetchIntervalInBackground:!0}),g=ge({queryKey:U.access.currentBoardAccess,queryFn:r(()=>Xa.getCurrentBoardAccess(),"queryFn"),enabled:m&&!f&&!!h.data,retry:!1,refetchInterval:r(T=>Tr(T.state.error)?dd:!1,"refetchInterval"),refetchIntervalInBackground:!0}),v=Kt({mutationFn:r(()=>Xa.claimBootstrapAdmin(),"mutationFn"),onSuccess:r(async()=>{await i.invalidateQueries({queryKey:U.auth.session}),await i.invalidateQueries({queryKey:U.health}),await i.invalidateQueries({queryKey:U.companies.all}),await i.invalidateQueries({queryKey:U.companies.stats}),await i.invalidateQueries({queryKey:U.access.currentBoardAccess})},"onSuccess")}),y=[u,...m?[h]:[],...m&&!f&&h.data?[g]:[]],j=u.data?.status==="starting",k=j||y.some(T=>Tr(T.error)),S=y.find(T=>T.error&&!(T.data!==void 0&&Tr(T.error)))?.error,N=u.isLoading||m&&h.isLoading||m&&!f&&!!h.data&&g.isLoading,_=e||!m||!!g.data?.isInstanceAdmin||(g.data?.companyIds.length??0)>0,I=!N&&!S&&!f&&(!m||!!h.data)&&_;(0,x.useEffect)(()=>{I?u.data?.status==="ok"&&c(!0):c(!1)},[I,u.data?.status]);const D=(0,x.useRef)(!1);if((0,x.useEffect)(()=>{k?D.current=!0:D.current&&!N&&!S&&(D.current=!1,i.invalidateQueries({predicate:r(T=>Tr(T.state.error),"predicate")}))},[k,N,S,i]),S||j&&!l)return(0,s.jsx)(S6,{temporary:S?Tr(S):!0,retrying:y.some(T=>T.isFetching),onRetry:r(()=>{for(const T of y)(T.error||T===u&&j)&&T.refetch({cancelRefetch:!1})},"onRetry")});if(N)return(0,s.jsx)(Ra,{});if(f){const T=u.data;if(!T)return(0,s.jsx)(Ra,{});const C=v.error instanceof Si?{status:v.error.status,message:v.error.message}:v.error instanceof Error?{message:v.error.message}:null;return(0,s.jsx)(k6,{claimAvailable:T.deploymentExposure==="private",hasActiveInvite:T.bootstrapInviteActive,session:h.data,claimState:v.isSuccess?"success":v.isPending?"claiming":"idle",claimError:C,onClaim:r(()=>v.mutate(),"onClaim")})}if(m&&!h.data){const T=encodeURIComponent(`${t.pathname}${t.search}`);return(0,s.jsx)(Qe,{to:`/auth?next=${T}`,replace:!0})}return _?(0,s.jsxs)(s.Fragment,{children:[k&&(0,s.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,s.jsx)(Zl,{})]}):(0,s.jsx)(N6,{})}r(Dw,"CloudAccessGate");var rA=["all","active","paused","error","builtin"];function C6({endpointId:e,children:t}){const i=ge({queryKey:U.chatEndpoints.detail(e),queryFn:r(()=>ES.get(e),"queryFn")}),{enabled:l,githubEnabled:c}=s0();return i.isError?(0,s.jsxs)("div",{className:"space-y-3 p-6",children:[(0,s.jsx)("p",{role:"alert",className:"text-sm text-bad",children:i.error.message}),(0,s.jsx)(le,{variant:"secondary",onClick:r(()=>{i.refetch()},"onClick"),children:"Retry"})]}):i.data?Fk(i.data.provider,l,c)?(0,s.jsx)(s.Fragment,{children:t}):(0,s.jsx)(Qe,{to:"/apps",replace:!0}):null}r(C6,"ProviderEndpointGate");function fd({children:e}){const{enabled:t,githubEnabled:i,loaded:l}=s0(),[c]=Uk(),{endpointId:u}=La();return!u&&c.get("provider")==="agentmail"?(0,s.jsx)(s.Fragment,{children:e}):l?u?(0,s.jsx)(C6,{endpointId:u,children:e}):Fk(c.get("provider"),t,i)?(0,s.jsx)(s.Fragment,{children:e}):(0,s.jsx)(Qe,{to:"/apps",replace:!0}):null}r(fd,"ChatConnectorsExperimentalGate");Ne(()=>ke(()=>import("./TaskChatLab-B0coUvdp.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,119,120])));var A6=Ne(()=>ke(()=>import("./Cases-C-7dXrEt.js").then(e=>e.Cases),__vite__mapDeps([121,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,122,4,123,40,124,125,7,9,126,127,98,128,129,130,38,131,54]))),_6=Ne(()=>ke(()=>import("./CaseDetail-CL0FC5sG.js").then(e=>e.CaseDetail),__vite__mapDeps([132,1,3,16,17,20,133,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,93,115,116,83,84,4,41,58,59,60,61,62,43,63,64,6,34,65,66,67,68,7,9,69,70,50,38,71,72,73,117,97,14,100,54,92,91,102,36,37,134,52,135,82,85,86,87,88,89,77,90,94,95,96,76,40,136,44,46,137,138,139,140,12,103,126,141,142,143,144,145,53,47,45,18,35,48,49,51,55,13,146,120,147,127,101,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,78,163,164,165,166,167,168,169,170,171,129,172,118,119,173,98,128,174,175,176,177,178,179,130,180,181]))),E6=Ne(()=>ke(()=>import("./Dashboard--iaPJqJp.js").then(e=>e.Dashboard),__vite__mapDeps([182,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,93,76,41,183,184,7,9,57,185,92,91,60,70,186,147,127,148,187,188,37,189,190,95,128,150,164,162,78,100,177,73,191,10,13,166,58,59,61,62,4,43,63,64,6,34,65,66,67,68,69,50,38,71,72,54,126,192,167,168,169,193,194,195,111,196,197,198,199,142,200,201,52,122,110,82,83,84,85,86,87,88,89,77,90,94,96,202,101,203,144,145,40,204,205,154,206,207,115,116,117,208,156,14,209,163,210,120,176,211,212,213,98,214,102,215,216,56,12,157,107,173,217,218,219,220,221,222,223,39,224,225,226,174,175,227,228,229,230,231,232,233,234,235,236,237,36,238,239,240,11,35,153,151,241,46,81,53,97,99,242,119,104,149,243,112,244,245,103,118,155,109,246,247,160,161,165,248,249,250,251,252,106,253,80,45,18,47,48,49,51,55,254]))),I6=Ne(()=>ke(()=>import("./DashboardLive-4rGeotay.js").then(e=>e.DashboardLive),__vite__mapDeps([255,1,3,21,20,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,203,128,194,195,111,186,147,150,91,60,92,93,196,197,198,199,142,200,201,52,7,9,122,4,110,82,59,61,83,84,85,86,87,88,89,77,90,54,94,95,96,202,101,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,239,240,11,35,153,151,58,62,63,65,67,69,50,72,73,241,46,81,53,97,99,242,119,104,149,243,112,244,245,103,118,177,155,109,246,247,160,161,165,248,249,250,251,168,252,106,253,80,45,18,47,48,49,51,55]))),T6=Ne(()=>ke(()=>import("./Companies-97toQ8Cw.js").then(e=>e.Companies),__vite__mapDeps([256,1,3,20,22,21,115,25,8,26,116,83,27,84,4,41,5,143,29,117,7,9,13,173,104,54,126,98,128,177]))),R6=Ne(()=>ke(()=>import("./Agents-D5qI6yZZ.js").then(e=>e.Agents),__vite__mapDeps([257,1,3,17,16,20,195,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,122,4,135,83,84,9,76,7,48,10,56,13,100,91,60,92,93,37,70,111,142,186,147,258,101,52,54,259,260,128,223,39,224,40,176,164,162,78,174,85,86,175,230,231,233,177,261,201,262]))),wh=Ne(()=>ke(()=>import("./AgentDetail-DthxFfuB.js").then(e=>e.AgentDetail),__vite__mapDeps([263,1,3,16,17,20,264,195,197,22,198,199,142,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,239,42,44,45,18,35,46,47,48,49,50,51,53,55,265,266,267,80,58,62,63,65,67,69,72,73,81,97,99,111,148,113,134,185,127,268,269,246,165,248,249,250,155,270,271,108,272,273,274,275,261,276,277,278,279,11,280,281,282,177,283]))),D6=Ne(()=>ke(()=>import("./Projects-BTAauZr0.js").then(e=>e.Projects),__vite__mapDeps([284,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,123,4,7,9,13,127,128,177,277,278,262]))),Mr=Ne(()=>ke(()=>import("./ProjectDetail-CmmdvUHn.js").then(e=>e.ProjectDetail),__vite__mapDeps([285,1,3,16,17,20,22,197,198,199,142,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,135,143,62,286,287,177,111,186,147,127,148,187,189,190,288,289,58,63,65,67,69,50,72,73,178,179,170,277,278,290,269,291,246,292,293,103,141,276]))),M6=Ne(()=>ke(()=>import("./ProjectWorkspaceDetail-BsA0hJ-k.js").then(e=>e.ProjectWorkspaceDetail),__vite__mapDeps([294,1,3,16,17,20,139,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,140,34,7,9,12,14,103,126,141,142,135,83,84,202,101,52,54,203,4,127,187,188,37,189,190,128,177,170,87,295]))),O6=Ne(()=>ke(()=>import("./Workspaces-BTgSx9nA.js").then(e=>e.Workspaces),__vite__mapDeps([296,1,3,20,264,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,142,128,290,76,58,59,60,61,62,4,43,63,64,6,34,65,66,67,68,69,70,50,38,71,72,73,157,126,37,101,52,54,164,162,78,100,174,85,86,83,40,175,269,197,198,199,200,201,122,110,82,84,87,88,89,77,90,91,92,93,94,95,96,202,203,144,145,41,204,205,154,206,207,115,116,117,208,156,13,14,209,163,210,120,176,211,212,213,98,214,102,183,215,216,56,12,57,107,173,217,188,218,219,220,221,222,223,39,224,225,226,227,228,229,230,231,232,233,234,235,236,237,36,238,291,111,246,293,103,127,141,276]))),L6=Ne(()=>ke(()=>import("./Issues-CsmM33z_.js").then(e=>e.Issues),__vite__mapDeps([297,1,3,16,17,20,264,195,298,22,138,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,135,83,84,9,62,123,4,41,63,64,215,7,11,13,14,100,90,54,188,92,93,37,70,111,142,186,147,127,101,52,148,299,149,128,150,91,60,177,73,300,58,59,61,43,6,34,65,66,67,68,69,50,38,71,72,163,57,170,87,201,115,116,82,85,86,88,89,77,94,95,96,140,145,40,42,44,45,18,12,35,36,46,47,48,49,51,53,55,56,301,103,102,223,39,224,176,228,229,120,222,230,76,247,270,252,106,253,80,81,97,98,99]))),z6=Ne(()=>ke(()=>import("./Search-bmcm0_m_.js").then(e=>e.Search),__vite__mapDeps([302,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,122,4,115,116,83,84,41,135,9,123,40,303,46,7,13,14,100,272,90,54,188,126,91,60,92,93,70,127,98,218,128,150,35,176,73,134,52]))),P6=Ne(()=>ke(()=>import("./IssueDetail-DGdg-mB8.js").then(e=>e.t).then(e=>e.IssueDetail),__vite__mapDeps([304,1,3,25,8,16,17,20,264,195,22,197,198,199,142,21,19,23,24,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,18,35,138,239,305,108,167,168,169,133,58,62,63,65,67,69,50,72,73,97,134,249,250,306,307,308,309,135,123,53,265,266,267,80,46,45,47,48,49,51,55,81,99,111,148,113,42,44,310,136,75,79,103,104,105,303,311,312,137,139,140,141,143,146,147,127,149,150,151,152,153,155,158,159,160,161,165,166,170,171,129,106,241,242,119,243,112,244,245,11,313,15,74,109,114,118,314,186,258,299,187,189,190,268,288,253,315,316,317,196,240,177,246,247,248,251,318,319,300,179,289,178,270,320,191,10,321,271,272,192]))),U6=Ne(()=>ke(()=>import("./AgentChats-f73hodzr.js").then(e=>e.AgentChats),__vite__mapDeps([322,1,3,19,16,17,20,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,91,60,92,93,128,323]))),$6=Ne(()=>ke(()=>import("./AgentChat-BAn_ghsu.js").then(e=>e.AgentChat),__vite__mapDeps([324,1,3,16,17,20,22,304,25,8,264,195,197,198,199,142,21,19,23,24,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,18,35,138,239,305,108,167,168,169,133,58,62,63,65,67,69,50,72,73,97,134,249,250,306,307,308,309,135,123,53,265,266,267,80,46,45,47,48,49,51,55,81,99,111,148,113,42,44,310,136,75,79,103,104,105,303,311,312,137,139,140,141,143,146,147,127,149,150,151,152,153,155,158,159,160,161,165,166,170,171,129,106,241,242,119,243,112,244,245,11,313,15,74,109,114,118,314,186,258,299,187,189,190,268,288,253,315,316,317,196,240,177,246,247,248,251,318,319,300,179,289,178,270,320,191,10,321,271,272,192,325,323]))),B6=Ne(()=>ke(()=>import("./IssueChatLongThreadPerf-D0HJe6IV.js").then(e=>e.IssueChatLongThreadPerf),__vite__mapDeps([326,1,3,126,8,9,177,196,16,17,20,197,22,198,199,142,21,19,23,24,25,26,27,28,29,5,30,31,32,33,200,201,52,7,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,239,240,11,35,153,151,58,62,63,65,67,69,50,72,73,241,46,81,53,97,99,242,119,104,149,243,112,244,245,103,118,111,155,109,246,247,160,161,165,248,249,250,251,168]))),K6=Ne(()=>ke(()=>import("./Routines-4LevOfvV.js").then(e=>e.Routines),__vite__mapDeps([327,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,82,59,60,61,83,52,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,123,4,40,41,7,9,13,146,37,70,111,186,147,127,101,148,328,128,152,151,153,154,174,175,177,329,201,115,116,117,173,98,134,330,110,204,205,206,6,311,66,312,126,142,102,231,38,171]))),q6=Ne(()=>ke(()=>import("./Pipelines-CY9hGe0h.js").then(e=>e.Learnings),__vite__mapDeps([331,1,3,16,17,20,22,332,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,100,70,127,148,149,133,93,115,116,83,84,4,58,59,60,61,62,43,63,64,6,34,65,66,67,68,7,9,69,50,38,71,72,73,117,97,14,54,92,91,102,36,37,134,52,122,82,85,86,87,88,89,77,90,94,95,96,123,145,40,175,44,46,333,78,241,197,198,199,142,200,201,110,202,101,203,144,76,204,205,154,206,162,207,208,156,13,209,163,210,120,126,176,211,212,213,98,214,183,215,216,56,12,157,57,107,173,217,188,218,219,220,128,221,222,223,39,224,164,225,226,174,227,228,229,230,231,232,233,234,235,236,237,238,81,53,35,99,242,119,104,243,112,244,245,314,111,177,196,239,240,11,153,151,103,118,155,109,246,247,160,161,165,248,249,250,251,168,159,318,179,55,181,334]))),F6=Ne(()=>ke(()=>import("./Pipelines-CY9hGe0h.js").then(e=>e.PipelineItemDetail),__vite__mapDeps([331,1,3,16,17,20,22,332,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,100,70,127,148,149,133,93,115,116,83,84,4,58,59,60,61,62,43,63,64,6,34,65,66,67,68,7,9,69,50,38,71,72,73,117,97,14,54,92,91,102,36,37,134,52,122,82,85,86,87,88,89,77,90,94,95,96,123,145,40,175,44,46,333,78,241,197,198,199,142,200,201,110,202,101,203,144,76,204,205,154,206,162,207,208,156,13,209,163,210,120,126,176,211,212,213,98,214,183,215,216,56,12,157,57,107,173,217,188,218,219,220,128,221,222,223,39,224,164,225,226,174,227,228,229,230,231,232,233,234,235,236,237,238,81,53,35,99,242,119,104,243,112,244,245,314,111,177,196,239,240,11,153,151,103,118,155,109,246,247,160,161,165,248,249,250,251,168,159,318,179,55,181,334]))),H6=Ne(()=>ke(()=>import("./Pipelines-CY9hGe0h.js").then(e=>e.PipelineItemLegacyRedirect),__vite__mapDeps([331,1,3,16,17,20,22,332,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,100,70,127,148,149,133,93,115,116,83,84,4,58,59,60,61,62,43,63,64,6,34,65,66,67,68,7,9,69,50,38,71,72,73,117,97,14,54,92,91,102,36,37,134,52,122,82,85,86,87,88,89,77,90,94,95,96,123,145,40,175,44,46,333,78,241,197,198,199,142,200,201,110,202,101,203,144,76,204,205,154,206,162,207,208,156,13,209,163,210,120,126,176,211,212,213,98,214,183,215,216,56,12,157,57,107,173,217,188,218,219,220,128,221,222,223,39,224,164,225,226,174,227,228,229,230,231,232,233,234,235,236,237,238,81,53,35,99,242,119,104,243,112,244,245,314,111,177,196,239,240,11,153,151,103,118,155,109,246,247,160,161,165,248,249,250,251,168,159,318,179,55,181,334]))),kh=Ne(()=>ke(()=>import("./Pipelines-CY9hGe0h.js").then(e=>e.Pipelines),__vite__mapDeps([331,1,3,16,17,20,22,332,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,100,70,127,148,149,133,93,115,116,83,84,4,58,59,60,61,62,43,63,64,6,34,65,66,67,68,7,9,69,50,38,71,72,73,117,97,14,54,92,91,102,36,37,134,52,122,82,85,86,87,88,89,77,90,94,95,96,123,145,40,175,44,46,333,78,241,197,198,199,142,200,201,110,202,101,203,144,76,204,205,154,206,162,207,208,156,13,209,163,210,120,126,176,211,212,213,98,214,183,215,216,56,12,157,57,107,173,217,188,218,219,220,128,221,222,223,39,224,164,225,226,174,227,228,229,230,231,232,233,234,235,236,237,238,81,53,35,99,242,119,104,243,112,244,245,314,111,177,196,239,240,11,153,151,103,118,155,109,246,247,160,161,165,248,249,250,251,168,159,318,179,55,181,334]))),V6=Ne(()=>ke(()=>import("./Pipelines-CY9hGe0h.js").then(e=>e.ReviewQueue),__vite__mapDeps([331,1,3,16,17,20,22,332,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,100,70,127,148,149,133,93,115,116,83,84,4,58,59,60,61,62,43,63,64,6,34,65,66,67,68,7,9,69,50,38,71,72,73,117,97,14,54,92,91,102,36,37,134,52,122,82,85,86,87,88,89,77,90,94,95,96,123,145,40,175,44,46,333,78,241,197,198,199,142,200,201,110,202,101,203,144,76,204,205,154,206,162,207,208,156,13,209,163,210,120,126,176,211,212,213,98,214,183,215,216,56,12,157,57,107,173,217,188,218,219,220,128,221,222,223,39,224,164,225,226,174,227,228,229,230,231,232,233,234,235,236,237,238,81,53,35,99,242,119,104,243,112,244,245,314,111,177,196,239,240,11,153,151,103,118,155,109,246,247,160,161,165,248,249,250,251,168,159,318,179,55,181,334]))),W6=Ne(()=>ke(()=>import("./PipelineSettings-Dl-94FB5.js").then(e=>e.PipelineSettings),__vite__mapDeps([335,1,3,16,17,20,22,332,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,100,70,127,148,149,200,115,116,83,84,4,82,59,60,61,52,85,86,87,88,89,77,90,54,91,92,93,94,95,96,140,62,145,161,40,207,204,7,9,205,101,154,206,162,117,208,156,68,13,14,209,163,210,120,126,37,176,211,11,12,173,142,98,128,214,102,152,151,222,153,334,336,110,43,174,175]))),Mw=Ne(()=>ke(()=>import("./StatusCards-Dt3zorUZ.js").then(e=>e.StatusCards),__vite__mapDeps([337,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,122,4,115,116,83,84,41,135,9,40,58,59,60,61,62,43,63,64,6,34,65,66,67,68,7,69,70,50,38,71,72,73,117,183,13,157,100,338,120,88,86,126,91,92,93,101,52,54,98,128,102,153,151,154,164,162,78,174,85,175,134,291,111,246]))),Q6=Ne(()=>ke(()=>import("./PixelsOffice-BgyGZsiV.js").then(e=>e.PixelsOffice),__vite__mapDeps([339,1,3,20,59,60,61,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,266,83,85,86,340,34,215,7,9,11,12,313,54,188,126,37,70,111,148,94,95,128,177,134,52,341,241,197,198,199,142,200,201,122,4,110,82,84,87,88,89,77,90,91,92,93,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,176,211,212,213,98,214,102,38,183,66,216,56,157,57,107,173,100,217,218,219,220,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,63,58,62,65,67,69,50,72,73,46,81,53,97,35,99,242,119,104,149,243,112,244,245,334,292]))),Ow=Ne(()=>ke(()=>import("./RoutineDetail-BT6_GKnC.js").then(e=>e.RoutineDetail),__vite__mapDeps([342,1,3,16,17,20,133,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,93,115,116,83,84,4,41,58,59,60,61,62,43,63,64,6,34,65,66,67,68,7,9,69,70,50,38,71,72,73,117,97,14,100,54,92,91,102,36,37,134,52,110,82,85,86,87,88,89,77,90,94,95,96,140,144,267,162,207,40,204,205,101,154,206,208,156,13,209,163,210,120,126,176,211,343,12,313,146,173,344,217,188,111,127,98,148,218,128,214,152,151,222,153,226,174,175,232,177,276,279,201,11,180,345,164,78,330,311,312,142,231,171,336,200,346]))),G6=Ne(()=>ke(()=>import("./UserProfile-Dujv3qdz.js").then(e=>e.UserProfile),__vite__mapDeps([347,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,93,162,7,9,210,259,260,128]))),Rl=Ne(()=>ke(()=>import("./ExecutionWorkspaceDetail-BGV-9D5Y.js").then(e=>e.ExecutionWorkspaceDetail),__vite__mapDeps([348,1,3,16,17,20,139,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,140,34,7,9,12,14,103,126,141,142,135,83,84,4,40,6,146,100,37,70,111,186,147,127,98,187,188,189,190,94,95,128,102,38,177,170,87,276,290,76,58,59,60,61,62,43,63,64,65,66,67,68,69,50,71,72,73,157,101,52,54,164,162,78,174,85,86,175,269,197,198,199,200,201,122,110,82,88,89,77,90,91,92,93,96,202,203,144,145,41,204,205,154,206,207,115,116,117,208,156,13,209,163,210,120,176,211,212,213,214,183,215,216,56,57,107,173,217,218,219,220,221,222,223,39,224,225,226,227,228,229,230,231,232,233,234,235,236,237,36,238,291,246,295,330,311,312,152,151,153,171]))),Y6=Ne(()=>ke(()=>import("./Goals-B-_gq_Qu.js").then(e=>e.Goals),__vite__mapDeps([349,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,13,128,350,41]))),Lw=Ne(()=>ke(()=>import("./Artifacts-CK8FaygC.js").then(e=>e.Artifacts),__vite__mapDeps([351,1,3,16,17,20,264,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,115,116,83,84,41,203,7,9,54,126,98,128,321]))),X6=Ne(()=>ke(()=>import("./GoalDetail-D2VhPtvw.js").then(e=>e.GoalDetail),__vite__mapDeps([352,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,135,83,84,9,7,13,70,127,128,221,289,82,59,60,61,52,85,86,87,88,89,77,90,54,91,92,93,94,95,96,58,62,4,43,63,64,6,34,65,66,67,68,69,50,38,71,72,73,178,179,40,175,170,262,350,41]))),zw=Ne(()=>ke(()=>import("./Approvals-DZoMl7_m.js").then(e=>e.Approvals),__vite__mapDeps([353,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,135,83,84,9,57,126,70,128,319,63,64,7,150,91,60,92,93,177,300,58,59,61,62,4,43,6,34,65,66,67,68,69,50,38,71,72,73,163]))),Z6=Ne(()=>ke(()=>import("./ApprovalDetail-sfPpfdXc.js").then(e=>e.ApprovalDetail),__vite__mapDeps([354,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,41,58,59,60,61,62,4,43,63,64,6,34,65,66,67,68,7,9,69,70,50,38,71,72,73,92,93,128,150,91,102,300,163,57]))),J6=Ne(()=>ke(()=>import("./CompanyActivity-DzNrAyAb.js").then(e=>e.CompanyActivity),__vite__mapDeps([355,1,3,356,16,17,20,264,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,110,135,83,84,9,140,357,145,76,40,41,340,7,10,69,13,14,301,163,287,100,98,177,188,126,60,92,93,91,37,70,111,101,52,54,148,218,328,94,95,128,150,174,85,86,4,175,192,167,168,169,358,359,292,346,360]))),md=Ne(()=>ke(()=>import("./AuditHub-DMhunMn8.js").then(e=>e.AuditHub),__vite__mapDeps([356,1,3,16,17,20,264,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,110,135,83,84,9,140,357,145,76,40,41,340,7,10,69,13,14,301,163,287,100,98,177,188,126,60,92,93,91,37,70,111,101,52,54,148,218,328,94,95,128,150,174,85,86,4,175,192,167,168,169,358,359,292,346,360]))),e8=Ne(()=>ke(()=>import("./WhatNeedsMe-C9P2EsqQ.js").then(e=>e.WhatNeedsMe),__vite__mapDeps([361,1,3,16,17,20,22,362,264,195,59,60,61,249,250,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,122,4,115,116,83,84,41,144,123,89,40,175,63,64,58,62,43,6,34,65,66,67,68,7,9,69,70,50,38,71,72,73,117,172,241,197,198,199,142,201,52,110,82,85,86,87,88,77,90,54,91,92,93,94,95,96,202,101,203,145,76,204,205,154,206,162,207,208,156,13,14,209,163,210,120,126,37,176,211,212,213,98,214,102,183,215,216,56,12,157,57,107,173,100,217,188,218,219,220,128,221,222,223,39,224,164,78,225,226,174,227,228,229,230,231,232,233,234,235,236,237,36,238,46,81,53,97,35,99,242,119,104,149,243,112,244,245,308,363,148,167,168,169,341,111,186,147]))),t8=Ne(()=>ke(()=>import("./DecisionQueuePage-D-kNFav_.js").then(e=>e.DecisionQueuePage),__vite__mapDeps([364,1,3,16,17,20,22,362,264,195,59,60,61,249,250,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,122,4,115,116,83,84,41,144,123,89,40,175,63,64,58,62,43,6,34,65,66,67,68,7,9,69,70,50,38,71,72,73,117,172,241,197,198,199,142,201,52,110,82,85,86,87,88,77,90,54,91,92,93,94,95,96,202,101,203,145,76,204,205,154,206,162,207,208,156,13,14,209,163,210,120,126,37,176,211,212,213,98,214,102,183,215,216,56,12,157,57,107,173,100,217,188,218,219,220,128,221,222,223,39,224,164,78,225,226,174,227,228,229,230,231,232,233,234,235,236,237,36,238,46,81,53,97,35,99,242,119,104,149,243,112,244,245,308,363,148,167,168,169,341]))),n8=Ne(()=>ke(()=>import("./BoardChat-C4W8JLKB.js").then(e=>e.BoardChat),__vite__mapDeps([365,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,115,116,83,84,4,41,140,39,40,162,366,58,59,60,61,62,43,63,64,6,34,65,66,67,68,7,9,69,70,50,38,71,72,73,46,172,278,97,367,314,100,90,185,120,88,86,91,92,93,186,147,95,128,35,177,114,117,118,119,54,101,52,102,36,37,134]))),s8=Ne(()=>ke(()=>import("./CompanySettings-4JQpzuS1.js").then(e=>e.CompanySettings),__vite__mapDeps([368,1,3,16,17,20,22,21,200,25,8,26,201,52,27,7,9,40,204,23,24,4,54,205,31,101,154,206,10,13,126,37,142,98,260,128,221,222,174,85,86,83,175,229,41,43,120,88,230,76,30,244,369,197,198,199,19,28,29,5,32,33,122,110,82,59,60,61,84,87,89,77,90,91,92,93,94,95,96,202,203,144,145,162,64,6,207,115,116,117,208,156,68,14,209,163,210,176,211,34,212,213,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,223,39,224,164,78,225,226,227,228,231,232,71,233,234,235,236,237,36,238,358]))),a8=Ne(()=>ke(()=>import("./CompanyConnections-ORCH4i3U.js").then(e=>e.CompanyConnections),__vite__mapDeps([370,1,3,20,197,16,17,22,198,199,142,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,369,358,359]))),Sh=Ne(()=>ke(()=>import("./CompanyEnvironments-DphURbtb.js").then(e=>e.CompanyEnvironments),__vite__mapDeps([371,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,201,52,7,9,203,4,207,115,116,83,84,41,40,204,54,205,101,154,206,162,117,208,156,68,13,14,209,163,210,120,88,86,126,37,176,211,216,12,157,173,70,142,128,214,227,122,110,98,102,174,85,175,229,43,222,230,76,231,233,309]))),i8=Ne(()=>ke(()=>import("./BootstrapSetupUxLab-D58OwniR.js").then(e=>e.BootstrapSetupUxLab),__vite__mapDeps([372,1,3,7,8,9,57,33,100,177]))),r8=Ne(()=>ke(()=>import("./ResponsibleUserDenialUxLab-Bt9vnHJz.js").then(e=>e.ResponsibleUserDenialUxLab),__vite__mapDeps([373,1,3,177,271,239,108,272]))),l8=Ne(()=>ke(()=>import("./CrossIssueCollaborationUxLab-CEh5B2iJ.js").then(e=>e.CrossIssueCollaborationUxLab),__vite__mapDeps([374,1,3,305,239,144,64,208,57,108,167,168,169,93,25,8,26,92,177,251,120,88,86,126,9]))),o8=Ne(()=>ke(()=>import("./CompanySettingsPluginPage-cVvXh0_G.js").then(e=>e.CompanySettingsPluginPage),__vite__mapDeps([375,1,3,16,17,21,20,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,187,188,37,189,190,128]))),c8=Ne(()=>ke(()=>import("./CompanyAccess-CKhS1BaS.js").then(e=>e.CompanyAccess),__vite__mapDeps([376,1,3,16,17,20,264,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,93,135,83,84,9,4,6,7,57,173,126,37,70,101,52,54,148,187,188,189,190,259,260,128,38]))),u8=Ne(()=>ke(()=>import("./CompanyAccess-CKhS1BaS.js").then(e=>e.CompanyAccessLegacyRoute),__vite__mapDeps([376,1,3,16,17,20,264,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,93,135,83,84,9,4,6,7,57,173,126,37,70,101,52,54,148,187,188,189,190,259,260,128,38]))),Pw=Ne(()=>ke(()=>import("./AdvancedToolsRoute-BamlkE3p.js").then(e=>e.AdvancedToolsRoute),__vite__mapDeps([377,1,3,16,17,20,197,22,198,199,142,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,143,366,286,10,378,104,127,148,177,134,282,254,379,380,195]))),Uw=Ne(()=>ke(()=>import("./ProfileWizardRoute-DxLujEtD.js").then(e=>e.ProfileWizardRoute),__vite__mapDeps([381,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,122,4,110,40,41,7,9,242,13,54,126,37,98,219,128,102,225,91,60,92,93,218,174,85,86,83,175,176,282,100,177,380,195,70,127,94,95,382,163,148]))),d8=Ne(()=>ke(()=>import("./ProfileDetailRoute-BEBctbC6.js").then(e=>e.ProfileDetailRoute),__vite__mapDeps([383,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,110,143,6,7,9,57,173,169,126,37,101,52,54,98,219,128,102,282,100,177,379,380,195,70,127,94,95,382,163,148]))),f8=Ne(()=>ke(()=>import("./Browse-BDjohBak.js").then(e=>e.Browse),__vite__mapDeps([384,1,3,20,195,22,385,16,17,198,199,142,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,201,52,7,9,122,4,41,157,100,210,92,93,111,101,54,98,218,219,50,164,162,78,226,360,386,115,116,83,84,110,307,117,34,216,213,173,120,88,86,91,60,37,70,148,268,220,128,238,112,387,388,135,6,242,185,38,232,102,71]))),lA=Ne(()=>ke(()=>import("./AppsConnect-D8Gu187f.js").then(e=>e.AppsConnect),__vite__mapDeps([389,1,3,16,17,20,197,22,198,199,142,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,386,390]))),m8=Ne(()=>ke(()=>import("./ChatEndpointSetup-CM3QixMj.js").then(e=>e.ChatEndpointSetup),__vite__mapDeps([391,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,122,4,110,43,6,34,208,156,7,9,100,217,188,120,88,86,91,60,92,93,37,70,142,127,101,52,54,98,260,268,128,102,225,41,218,38,237,36,392,203,144,219,177,112,245,276,280,163,229,40,222,230,76,393]))),$w=Ne(()=>ke(()=>import("./ChatEndpointDetail-C-IYAYG8.js").then(e=>e.ChatEndpointDetail),__vite__mapDeps([394,1,3,16,17,20,264,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,201,52,7,9,122,4,115,116,83,84,41,110,82,59,60,61,85,86,87,88,89,77,90,54,91,92,93,94,95,96,140,357,145,40,43,58,62,63,64,6,34,65,66,67,68,69,70,50,38,71,72,73,117,11,12,13,157,173,100,120,126,37,101,98,148,268,219,220,128,102,222,236,235,112,276,395,225,218,226,392,203,144,127,177,245,280,163,229,230,76,393]))),p8=Ne(()=>ke(()=>import("./ChatIdentityConfirm-DCI5BnWo.js").then(e=>e.ChatIdentityConfirm),__vite__mapDeps([396,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,260,268]))),h8=Ne(()=>ke(()=>import("./AppsReview-DokFETm0.js").then(e=>e.AppsReview),__vite__mapDeps([397,1,3,21,20,22,128,398,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,4,58,59,60,61,62,43,63,64,6,34,65,66,67,68,7,9,69,70,50,38,71,72,73,241,197,198,199,142,200,201,52,122,110,82,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,207,115,116,117,208,156,13,14,209,163,210,120,126,37,176,211,212,213,98,214,102,183,215,216,56,12,157,57,107,173,100,217,188,218,219,220,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,233,234,235,236,237,36,238,46,81,53,97,35,99,242,119,104,149,243,112,244,245]))),g8=Ne(()=>ke(()=>import("./AppDetail-B6PtMl8J.js").then(e=>e.AppDetail),__vite__mapDeps([399,1,3,16,17,20,22,197,198,199,142,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,385,111,50,360,386,148,315,387,390,395,392,127,177,112,245,276,280,398,58,62,63,65,67,69,72,73,241,46,81,53,97,35,99,242,119,104,149,243,244]))),Bw=Ne(()=>ke(()=>import("./AppNotConnected-C_tGn786.js").then(e=>e.AppNotConnected),__vite__mapDeps([400,1,3,16,17,20,197,22,198,199,142,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,399,385,111,50,360,386,148,315,387,390,395,392,127,177,112,245,276,280,398,58,62,63,65,67,69,72,73,241,46,81,53,97,35,99,242,119,104,149,243,244]))),Kw=Ne(()=>ke(()=>import("./GatewaysList-B0Jq1IRC.js").then(e=>e.GatewaysList),__vite__mapDeps([401,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,70,127,98,218,219,128,222,282,100,126,177,402,140,6,68,101,52,54,38]))),x8=Ne(()=>ke(()=>import("./GatewayDetail-CdXNQ9gD.js").then(e=>e.GatewayDetail),__vite__mapDeps([403,1,3,16,17,20,264,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,76,267,4,40,53,41,175,204,7,9,54,205,52,101,154,206,43,317,6,68,286,13,367,120,88,86,37,70,127,98,218,219,128,222,38,282,100,126,177,402,140]))),b8=Ne(()=>ke(()=>import("./CompanySkills-BA_9Ztwj.js").then(e=>e.CompanySkills),__vite__mapDeps([404,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,122,4,115,116,83,84,41,135,9,82,59,60,61,52,85,86,87,88,89,77,90,54,91,92,93,94,95,96,203,40,53,162,43,58,62,63,64,6,34,65,66,67,68,7,69,70,50,38,71,72,73,317,117,156,46,183,312,216,79,11,13,157,209,314,163,57,173,100,104,185,120,126,37,127,101,98,128,150,102,164,78,225,218,236,235,36,275,276,180,405,329,201,134,406]))),qw=Ne(()=>ke(()=>import("./SkillSources-jUDjqy5i.js").then(e=>e.SkillSources),__vite__mapDeps([407,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,115,116,83,84,4,41,162,136,34,46,7,9,13,157,100,101,52,54,98,50,128,205,238,55,406,408,78,126,390]))),Nh=Ne(()=>ke(()=>import("./SkillStudio-BsqtUnzF.js").then(e=>e.SkillStudio),__vite__mapDeps([409,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,93,115,116,83,84,4,41,110,135,9,82,59,60,61,52,85,86,87,88,89,77,90,54,91,92,94,95,96,203,40,204,7,205,101,154,206,410,76,156,212,122,6,68,213,163,120,126,37,98,214,102,38,338,64,58,62,43,63,34,65,66,67,69,70,50,71,72,73,117,46,183,333,78,48,241,197,198,199,142,201,202,144,145,162,207,208,13,14,209,210,176,211,215,216,56,12,157,57,107,173,100,217,188,218,219,220,128,221,222,223,39,224,164,225,226,174,175,227,228,229,230,231,232,233,234,235,236,237,36,238,81,53,97,35,99,242,119,104,149,243,112,244,245,150,151,177,51,55,179,134,275,262,180,131,405,406,404,317,312,79,11,314,185,127,276,329,411,412]))),v8=Ne(()=>ke(()=>import("./Secrets-DfR1fBAZ.js").then(e=>e.Secrets),__vite__mapDeps([413,1,3,16,17,20,21,22,122,25,8,4,115,26,116,83,27,84,41,5,135,9,23,24,143,62,144,53,162,63,310,6,117,34,212,110,68,7,213,163,120,88,86,126,91,60,92,93,37,101,52,54,98,214,102,38,66,125,215,78,216,343,13,157,31,57,173,100,210,104,70,148,259,260,218,128,225,174,85,40,175,211,36,134]))),y8=Ne(()=>ke(()=>import("./CompanyImport-DPKpUaRa.js").then(e=>e.CompanyImport),__vite__mapDeps([414,1,3,20,22,197,16,17,198,199,142,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,58,62,63,65,67,69,50,72,73,415,416,417]))),j8=Ne(()=>ke(()=>import("./DesignGuide-D7486q4b.js").then(e=>e.DesignGuide),__vite__mapDeps([418,1,3,16,17,20,197,22,198,199,142,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238,266,135,240,11,35,153,151,58,62,63,65,67,69,50,72,73,75,42,44,45,18,46,47,48,49,51,53,55,79,80,81,97,99,103,104,105,184,106,419,241,242,119,149,243,112,244,245,420,363,185,314,177,109,111,316,317,146,299,158,289,178,179,166,170,134,277,278,281,282,262,131,405,193,194,195,186,147,150,196,239,118,155,246,247,160,161,165,248,249,250,251,168,252,253,408,345,411,412]))),w8=Ne(()=>ke(()=>import("./InstanceFeatures-DUQnBkxy.js").then(e=>e.InstanceFeatures),__vite__mapDeps([421,1,3,19,16,17,20,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,122,4,126,9,98,190,128,422,142,259,260,222]))),k8=Ne(()=>ke(()=>import("./AgentDefaults-BL1XYvEo.js").then(e=>e.AgentDefaults),__vite__mapDeps([423,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,144,70,128,273,274,7,9,14,54,126,174,85,86,83,4,40,175]))),S8=Ne(()=>ke(()=>import("./OmpAllSettings-B_Knr51Z.js").then(e=>e.n).then(e=>e.OmpAllSettingsPage),__vite__mapDeps([283,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,203,7,9,14,126,70,98,128,102,222,174,85,86,83,4,40,175,176,273,274,54]))),N8=Ne(()=>ke(()=>import("./ModelsAndProviders-gaR7HDQm.js").then(e=>e.ModelsAndProviders),__vite__mapDeps([424,1,3,20,21,22,7,8,9,13,157,70,128,273]))),C8=Ne(()=>ke(()=>import("./InstanceAdvanced-B7tDfjwG.js").then(e=>e.InstanceAdvanced),__vite__mapDeps([425,1,3,7,8,9,12,14,100,126,128,422,20,142,259,260,222]))),A8=Ne(()=>ke(()=>import("./InstanceAccess-Ns2rAmva.js").then(e=>e.InstanceAccess),__vite__mapDeps([426,1,3,20,22,122,25,8,4,7,9,57,32,37,148,128,177]))),_8=Ne(()=>ke(()=>import("./ProfileSettings-Djo7BLIj.js").then(e=>e.ProfileSettings),__vite__mapDeps([427,1,3,20,22,21,93,25,8,26,110,215,7,9,12,209,367,173,70,98,128,221,222,225,122,4,23,24,27,41,91,60,92,218,226,174,85,86,83,40,175,177]))),E8=Ne(()=>ke(()=>import("./PluginManager-4rrrAOLG.js").then(e=>e.PluginManager),__vite__mapDeps([428,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,110,183,7,9,13,378,314,173,100,126,37,101,52,54,98,189,128,177]))),I8=Ne(()=>ke(()=>import("./PluginSettings-Cm4H1JRT.js").then(e=>e.PluginSettings),__vite__mapDeps([429,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,135,83,84,9,202,101,52,7,54,203,89,63,64,66,209,163,100,344,126,189,187,188,37,190,128,227,122,4,110,40,41,162,208,156,68,13,173,98,214,102,174,85,86,175,177,170,87,141,142]))),Fw=Ne(()=>ke(()=>import("./AdapterManager-DUXWwNxv.js").then(e=>e.AdapterManager),__vite__mapDeps([430,1,3,20,21,22,110,25,8,202,33,101,52,26,27,7,9,54,30,66,13,378,157,173,100,126,37,98,128,228,23,24,40,223,39,224,4,31,176,229,41,43,120,88,86,222,230,76,234,235,177]))),Hw=Ne(()=>ke(()=>import("./PluginPage-CMA4Ei50.js").then(e=>e.PluginPage),__vite__mapDeps([431,1,3,16,17,20,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,203,7,9,189,187,188,37,190,128]))),T8=Ne(()=>ke(()=>import("./NewAgent-DBQzvxIr.js").then(e=>e.NewAgent),__vite__mapDeps([432,1,3,16,17,20,197,22,198,199,142,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,200,201,52,7,9,122,4,110,82,59,60,61,83,84,85,86,87,88,89,77,90,54,91,92,93,94,95,96,202,101,203,144,145,76,40,41,204,205,154,206,162,43,64,6,207,115,116,117,208,156,68,13,14,209,163,210,120,126,37,176,211,34,212,213,98,214,102,38,183,66,215,216,56,12,157,57,107,173,100,217,188,70,218,219,220,128,221,222,223,39,224,164,78,225,226,174,175,227,228,229,230,231,232,71,233,234,235,236,237,36,238]))),R8=Ne(()=>ke(()=>import("./Auth-_P9t1YSS.js").then(e=>e.AuthPage),__vite__mapDeps([433,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,420,363,185,72,260,434]))),D8=Ne(()=>ke(()=>import("./BoardClaim-CsomHmd6.js").then(e=>e.BoardClaimPage),__vite__mapDeps([435,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,148,177]))),M8=Ne(()=>ke(()=>import("./AssistantConnection-BlKC7jk0.js").then(e=>e.AssistantConnection),__vite__mapDeps([388,1,3,20,21,22,19,16,17,23,24,25,8,26,27,28,29,5,30,31,32,33,135,83,84,9,4,6,34,7,242,185,92,93,128,38,232,54,102,71,387]))),Vw=Ne(()=>ke(()=>import("./McpConnect-CYLP1yLX.js").then(e=>e.McpConnectPage),__vite__mapDeps([436,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,122,4,7,9,185,92,93,98,177,387]))),O8=Ne(()=>ke(()=>import("./McpConnect-CYLP1yLX.js").then(e=>e.McpDevicePage),__vite__mapDeps([436,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,122,4,7,9,185,92,93,98,177,387]))),L8=Ne(()=>ke(()=>import("./McpConnect-CYLP1yLX.js").then(e=>e.AssistantConnectionsPage),__vite__mapDeps([436,1,3,16,17,20,19,21,22,23,24,25,8,26,27,28,29,5,30,31,32,33,122,4,7,9,185,92,93,98,177,387]))),z8=Ne(()=>ke(()=>import("./CliAuth-CRG0c0EH.js").then(e=>e.CliAuthPage),__vite__mapDeps([437,1,3,16,17,20,22,19,21,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,148,177]))),P8=Ne(()=>ke(()=>import("./InviteLanding-brwa_8NC.js").then(e=>e.InviteLandingPage),__vite__mapDeps([438,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,7,9,148,260,230,76,434]))),Ww=Ne(()=>ke(()=>import("./PublicIssueSharePage-DdPjfmD9.js").then(e=>e.PublicIssueSharePage),__vite__mapDeps([439,1,3,16,17,20,203,58,59,60,61,21,22,19,23,24,25,8,26,27,28,29,5,30,31,32,33,62,4,43,63,64,6,34,65,66,67,68,7,9,69,70,50,38,71,72,73,74,46,47,92,93,218,320]))),U8=Ne(()=>ke(()=>import("./JoinRequestQueue-ZZq3jWW-.js").then(e=>e.JoinRequestQueue),__vite__mapDeps([440,1,3,20,21,22,7,8,9,126,37,148,128,177]))),oA=Ne(()=>ke(()=>Promise.resolve().then(()=>wB).then(e=>e.NotFoundPage),void 0)),tc=Ne(()=>ke(()=>import("./Inbox-zllmqRcB.js").then(e=>e.n).then(e=>e.Inbox),__vite__mapDeps([298,1,3,16,17,20,22,138,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,135,83,84,9,62,123,4,41,63,64,215,7,11,13,14,100,90,54,188,92,93,37,70,111,142,186,147,127,101,52,148,299,149,128,150,91,60,177,73,300,58,59,61,43,6,34,65,66,67,68,69,50,38,71,72,163,57,170,87]))),$8=Ne(()=>ke(()=>import("./CompanyExport-XeVCUcK3.js").then(e=>e.CompanyExport),__vite__mapDeps([441,1,3,16,17,20,22,21,19,23,24,25,8,26,27,28,29,5,30,31,32,33,58,59,60,61,62,4,43,63,64,6,34,65,66,67,68,7,9,69,70,50,38,71,72,73,14,54,37,127,128,55,417]))),B8=Ne(()=>ke(()=>import("./Terminal-NjEb5-2b.js").then(e=>e.Terminal),__vite__mapDeps([442,1,3,16,17,20,306,25,8,116,83,26,27,84,39,224,307,6,7,9,308,31,54,98,38,36,37,309,21,22,19,23,24,28,29,5,30,32,33,200,110,4,40,63,310,68,13,49,107,100,101,52,148,128,205,102,174,85,86,175,231,411])));function K8({children:e}){return(0,s.jsx)(x.Suspense,{fallback:(0,s.jsx)(Ra,{}),children:e})}r(K8,"ProductionSurface");function q8(e){const t=e;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(L,{index:!0,element:(0,s.jsx)(Qe,{to:"dashboard",replace:!0})}),(0,s.jsx)(L,{path:"dashboard",element:(0,s.jsx)(E6,{})}),(0,s.jsx)(L,{path:"dashboard/live",element:(0,s.jsx)(I6,{})}),(0,s.jsx)(L,{path:"timeline",element:(0,s.jsx)(Va,{to:"/activity/timeline"})}),(0,s.jsx)(L,{path:"onboarding",element:(0,s.jsx)(dA,{})}),(0,s.jsx)(L,{path:"companies",element:(0,s.jsx)(T6,{})}),(0,s.jsx)(L,{path:"company/settings",element:(0,s.jsx)(s8,{})}),(0,s.jsx)(L,{path:"company/settings/connections",element:(0,s.jsx)(a8,{})}),(0,s.jsx)(L,{path:"company/settings/agent-defaults",element:(0,s.jsx)(k8,{})}),(0,s.jsx)(L,{path:"company/settings/agent-defaults/all",element:(0,s.jsx)(S8,{})}),(0,s.jsx)(L,{path:"company/settings/models",element:(0,s.jsx)(N8,{})}),(0,s.jsx)(L,{path:"company/settings/environments",element:(0,s.jsx)(Qe,{to:"/company/settings/instance/environments",replace:!0})}),(0,s.jsx)(L,{path:"company/settings/cloud-upstream",element:(0,s.jsx)(Qe,{to:"/company/export",replace:!0})}),(0,s.jsxs)(L,{element:(0,s.jsx)(Aa,{pageKey:"company.members"}),children:[(0,s.jsx)(L,{path:"company/settings/members",element:(0,s.jsx)(c8,{})}),(0,s.jsx)(L,{path:"company/settings/access",element:(0,s.jsx)(u8,{})})]}),(0,s.jsx)(L,{element:(0,s.jsx)(Aa,{pageKey:"company.invites"}),children:(0,s.jsx)(L,{path:"company/settings/invites",element:(0,s.jsx)(Qe,{to:"/company/settings/members?tab=invites",replace:!0})})}),(0,s.jsx)(L,{element:(0,s.jsx)(Aa,{pageKey:"company.export"}),children:(0,s.jsx)(L,{path:"company/export/*",element:(0,s.jsx)(x.Suspense,{fallback:(0,s.jsx)(Ra,{}),children:(0,s.jsx)($8,{})})})}),(0,s.jsx)(L,{element:(0,s.jsx)(Aa,{pageKey:"company.import"}),children:(0,s.jsx)(L,{path:"company/import",element:(0,s.jsx)(y8,{})})}),(0,s.jsx)(L,{element:(0,s.jsx)(Aa,{pageKey:"company.secrets"}),children:(0,s.jsx)(L,{path:"company/settings/secrets",element:(0,s.jsx)(v8,{})})}),(0,s.jsx)(L,{path:"company/settings/tools",element:(0,s.jsx)(Yw,{})}),(0,s.jsx)(L,{path:"company/settings/tools/:tab",element:(0,s.jsx)(Yw,{})}),(0,s.jsx)(L,{path:"tools",element:(0,s.jsx)(Xw,{})}),(0,s.jsx)(L,{path:"tools/:tab",element:(0,s.jsx)(Xw,{})}),(0,s.jsx)(L,{path:"apps",element:(0,s.jsx)(f8,{})}),(0,s.jsx)(L,{path:"apps/assistant-connection",element:(0,s.jsx)(M8,{})}),(0,s.jsx)(L,{path:"apps/browse",element:(0,s.jsx)(Qe,{to:"/apps",replace:!0})}),(0,s.jsx)(L,{path:"apps/connections",element:(0,s.jsx)(Qe,{to:"/apps",replace:!0})}),(0,s.jsx)(L,{path:"apps/byo",element:(0,s.jsx)(lA,{byoOnly:!0})}),(0,s.jsx)(L,{path:"apps/vercel-connect",element:(0,s.jsx)(Qw,{credentialSource:"vercel_connect"})}),(0,s.jsx)(L,{path:"apps/connect",element:(0,s.jsx)(Qw,{})}),(0,s.jsx)(L,{path:"apps/chat/connect",element:(0,s.jsx)(fd,{children:(0,s.jsx)(m8,{})})}),(0,s.jsx)(L,{path:"apps/chat/:endpointId",element:(0,s.jsx)(fd,{children:(0,s.jsx)(Qe,{to:"settings",replace:!0})})}),(0,s.jsx)(L,{path:"apps/chat/:endpointId/reviews/:reviewId",element:(0,s.jsx)(fd,{children:(0,s.jsx)($w,{})})}),(0,s.jsx)(L,{path:"apps/chat/:endpointId/:tab",element:(0,s.jsx)(fd,{children:(0,s.jsx)($w,{})})}),(0,s.jsx)(L,{path:"apps/connect/:appKey",element:(0,s.jsx)(Qe,{to:"/apps",replace:!0})}),(0,s.jsx)(L,{path:"apps/connect/:appKey/:stage",element:(0,s.jsx)(Qe,{to:"/apps",replace:!0})}),(0,s.jsx)(L,{path:"apps/review",element:(0,s.jsx)(h8,{})}),(0,s.jsx)(L,{path:"apps/attention",element:(0,s.jsx)(Qe,{to:"/apps",replace:!0})}),(0,s.jsx)(L,{path:"apps/gateways",element:(0,s.jsx)(Kw,{})}),(0,s.jsx)(L,{path:"apps/gateways/:gatewayId",element:(0,s.jsx)(Qe,{to:"overview",replace:!0})}),(0,s.jsx)(L,{path:"apps/gateways/:gatewayId/:tab",element:(0,s.jsx)(x8,{})}),(0,s.jsx)(L,{path:"apps/advanced",element:(0,s.jsx)(Pw,{})}),(0,s.jsx)(L,{path:"apps/advanced/gateways",element:(0,s.jsx)(Kw,{})}),(0,s.jsx)(L,{path:"apps/advanced/profiles/new",element:(0,s.jsx)(Uw,{mode:"new"})}),(0,s.jsx)(L,{path:"apps/advanced/profiles/:profileId/edit",element:(0,s.jsx)(Uw,{mode:"edit"})}),(0,s.jsx)(L,{path:"apps/advanced/profiles/:profileId",element:(0,s.jsx)(d8,{})}),(0,s.jsx)(L,{path:"apps/advanced/audit",element:(0,s.jsx)(Qe,{to:"/apps",replace:!0})}),(0,s.jsx)(L,{path:"apps/advanced/run-your-own",element:(0,s.jsx)(Qe,{to:"/apps",replace:!0})}),(0,s.jsx)(L,{path:"apps/advanced/:tab",element:(0,s.jsx)(Pw,{})}),(0,s.jsx)(L,{path:"apps/app/:applicationId",element:(0,s.jsx)(Bw,{})}),(0,s.jsx)(L,{path:"apps/app/:applicationId/:tab",element:(0,s.jsx)(Bw,{})}),(0,s.jsx)(L,{path:"apps/:connectionId",element:(0,s.jsx)(Qe,{to:"permissions",replace:!0})}),(0,s.jsx)(L,{path:"apps/:connectionId/:tab",element:(0,s.jsx)(g8,{})}),(0,s.jsx)(L,{path:"company/settings/instance",element:(0,s.jsx)(Qe,{to:"/company/settings",replace:!0})}),(0,s.jsx)(L,{element:(0,s.jsx)(Aa,{pageKey:"instance.profile"}),children:(0,s.jsx)(L,{path:"company/settings/instance/profile",element:(0,s.jsx)(_8,{})})}),(0,s.jsx)(L,{path:"company/settings/instance/general",element:(0,s.jsx)(Qe,{to:"/company/settings",replace:!0})}),(0,s.jsx)(L,{path:"company/settings/instance/heartbeats",element:(0,s.jsx)(Qe,{to:"/company/settings",replace:!0})}),(0,s.jsxs)(L,{element:(0,s.jsx)(Aa,{pageKey:"instance.environments"}),children:[(0,s.jsx)(L,{path:"company/settings/instance/environments",element:(0,s.jsx)(Sh,{})}),(0,s.jsx)(L,{path:"company/settings/instance/environments/new",element:(0,s.jsx)(Sh,{mode:"create"})}),(0,s.jsx)(L,{path:"company/settings/instance/environments/:environmentId/edit",element:(0,s.jsx)(Sh,{mode:"edit"})})]}),(0,s.jsx)(L,{element:(0,s.jsx)(Aa,{pageKey:"instance.access"}),children:(0,s.jsx)(L,{path:"company/settings/instance/access",element:(0,s.jsx)(A8,{})})}),(0,s.jsxs)(L,{element:(0,s.jsx)(Aa,{pageKey:"instance.experimental"}),children:[(0,s.jsx)(L,{path:"company/settings/instance/features",element:(0,s.jsx)(w8,{})}),(0,s.jsx)(L,{path:"company/settings/instance/advanced",element:(0,s.jsx)(C8,{})}),(0,s.jsx)(L,{path:"company/settings/instance/experimental",element:(0,s.jsx)(Qe,{to:"/company/settings/instance/features",replace:!0})})]}),(0,s.jsxs)(L,{element:(0,s.jsx)(Aa,{pageKey:"instance.plugins"}),children:[(0,s.jsx)(L,{path:"company/settings/instance/plugins",element:(0,s.jsx)(E8,{})}),(0,s.jsx)(L,{path:"company/settings/instance/plugins/:pluginId",element:(0,s.jsx)(I8,{})})]}),(0,s.jsx)(L,{element:(0,s.jsx)(Aa,{pageKey:"instance.adapters"}),children:(0,s.jsx)(L,{path:"company/settings/instance/adapters",element:(0,s.jsx)(Fw,{})})}),(0,s.jsx)(L,{path:"company/settings/:settingsRoutePath/*",element:(0,s.jsx)(o8,{})}),(0,s.jsx)(L,{path:"skills/sources",element:(0,s.jsx)(qw,{})}),(0,s.jsx)(L,{path:"skills/sources/:sourceId",element:(0,s.jsx)(qw,{})}),(0,s.jsx)(L,{path:"skills/studio",element:(0,s.jsx)(Nh,{})}),(0,s.jsx)(L,{path:"skills/studio/new",element:(0,s.jsx)(Nh,{})}),(0,s.jsx)(L,{path:"skills/studio/:skillId",element:(0,s.jsx)(Nh,{})}),(0,s.jsx)(L,{path:"skills/:skillId/studio",element:(0,s.jsx)(cA,{})}),(0,s.jsx)(L,{path:"skills/*",element:(0,s.jsx)(b8,{})}),(0,s.jsx)(L,{path:"settings",element:(0,s.jsx)(Lr,{})}),(0,s.jsx)(L,{path:"settings/*",element:(0,s.jsx)(Lr,{})}),(0,s.jsx)(L,{path:"plugins/:pluginId",element:(0,s.jsx)(Hw,{})}),(0,s.jsx)(L,{path:"org",element:(0,s.jsx)(Qe,{to:"/agents/all",replace:!0})}),(0,s.jsx)(L,{path:"agents",element:(0,s.jsx)(Qe,{to:"/agents/all",replace:!0})}),rA.map(i=>(0,s.jsx)(L,{path:`agents/${i}`,element:(0,s.jsx)(R6,{})},i)),(0,s.jsx)(L,{path:"agents/new",element:(0,s.jsx)(T8,{})}),(0,s.jsx)(L,{path:"agents/:agentId",element:(0,s.jsx)(wh,{})}),(0,s.jsx)(L,{path:"agents/:agentId/:tab",element:(0,s.jsx)(wh,{})}),(0,s.jsx)(L,{path:"agents/:agentId/runs/:runId",element:(0,s.jsx)(wh,{})}),(0,s.jsx)(L,{path:"projects",element:(0,s.jsx)(D6,{})}),(0,s.jsx)(L,{path:"projects/:projectId",element:(0,s.jsx)(Mr,{})}),(0,s.jsx)(L,{path:"projects/:projectId/overview",element:(0,s.jsx)(Mr,{})}),(0,s.jsx)(L,{path:"projects/:projectId/issues",element:(0,s.jsx)(Mr,{})}),(0,s.jsx)(L,{path:"projects/:projectId/issues/:filter",element:(0,s.jsx)(Mr,{})}),(0,s.jsx)(L,{element:(0,s.jsx)(ph,{}),children:(0,s.jsx)(L,{path:"projects/:projectId/workspaces/:workspaceId",element:(0,s.jsx)(M6,{})})}),(0,s.jsx)(L,{path:"projects/:projectId/workspaces",element:(0,s.jsx)(Mr,{})}),(0,s.jsx)(L,{path:"projects/:projectId/configuration",element:(0,s.jsx)(Mr,{})}),(0,s.jsx)(L,{path:"projects/:projectId/budget",element:(0,s.jsx)(Mr,{})}),(0,s.jsx)(L,{element:(0,s.jsx)(ph,{}),children:(0,s.jsx)(L,{path:"workspaces",element:(0,s.jsx)(O6,{})})}),(0,s.jsx)(L,{path:"terminal",element:(0,s.jsx)(K8,{children:(0,s.jsx)(B8,{})})}),(0,s.jsx)(L,{path:"issues",element:(0,s.jsx)(L6,{})}),(0,s.jsx)(L,{path:"tasks",element:(0,s.jsx)(Qe,{to:"/issues",replace:!0})}),(0,s.jsx)(L,{path:"tasks/new",element:(0,s.jsx)(v6,{})}),(0,s.jsx)(L,{path:"search",element:(0,s.jsx)(z6,{})}),t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(L,{path:"issues/all",element:(0,s.jsx)(ha,{view:"all"})}),(0,s.jsx)(L,{path:"issues/active",element:(0,s.jsx)(ha,{view:"active"})}),(0,s.jsx)(L,{path:"issues/backlog",element:(0,s.jsx)(ha,{view:"backlog"})}),(0,s.jsx)(L,{path:"issues/done",element:(0,s.jsx)(ha,{view:"done"})}),(0,s.jsx)(L,{path:"issues/recent",element:(0,s.jsx)(ha,{view:"recent"})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(L,{path:"issues/all",element:(0,s.jsx)(Qe,{to:"/issues",replace:!0})}),(0,s.jsx)(L,{path:"issues/active",element:(0,s.jsx)(Qe,{to:"/issues",replace:!0})}),(0,s.jsx)(L,{path:"issues/backlog",element:(0,s.jsx)(Qe,{to:"/issues",replace:!0})}),(0,s.jsx)(L,{path:"issues/done",element:(0,s.jsx)(Qe,{to:"/issues",replace:!0})}),(0,s.jsx)(L,{path:"issues/recent",element:(0,s.jsx)(Qe,{to:"/issues",replace:!0})})]}),(0,s.jsx)(L,{path:"chats",element:(0,s.jsx)(U6,{})}),(0,s.jsx)(L,{path:"chats/:agentRef",element:(0,s.jsx)($6,{})}),(0,s.jsx)(L,{path:"issues/:issueId",element:(0,s.jsx)(P6,{})}),null,(0,s.jsx)(L,{path:"routines",element:(0,s.jsx)(K6,{})}),(0,s.jsx)(L,{path:"cases",element:(0,s.jsx)(Aw,{children:(0,s.jsx)(A6,{})})}),(0,s.jsx)(L,{path:"cases/:caseIdentifier",element:(0,s.jsx)(Aw,{children:(0,s.jsx)(_6,{})})}),(0,s.jsx)(L,{path:"pixels-office",element:(0,s.jsx)(IB,{children:(0,s.jsx)(Q6,{})})}),(0,s.jsx)(L,{path:"status",element:(0,s.jsx)(_w,{children:(0,s.jsx)(Mw,{})})}),(0,s.jsx)(L,{path:"status/:cardId",element:(0,s.jsx)(_w,{children:(0,s.jsx)(Mw,{})})}),(0,s.jsx)(L,{path:"status-cards",element:(0,s.jsx)(Zw,{})}),(0,s.jsx)(L,{path:"status-cards/:cardId",element:(0,s.jsx)(Zw,{})}),(0,s.jsx)(L,{path:"review-queue",element:(0,s.jsx)(Gi,{children:(0,s.jsx)(V6,{})})}),(0,s.jsx)(L,{path:"learnings",element:(0,s.jsx)(Gi,{children:(0,s.jsx)(q6,{})})}),(0,s.jsx)(L,{path:"pipelines",element:(0,s.jsx)(Gi,{children:(0,s.jsx)(kh,{})})}),(0,s.jsx)(L,{path:"pipelines/:pipelineId",element:(0,s.jsx)(Gi,{children:(0,s.jsx)(kh,{})})}),(0,s.jsx)(L,{path:"pipelines/:pipelineId/add",element:(0,s.jsx)(Gi,{children:(0,s.jsx)(kh,{})})}),(0,s.jsx)(L,{path:"pipelines/:pipelineId/settings",element:(0,s.jsx)(Gi,{children:(0,s.jsx)(W6,{})})}),(0,s.jsx)(L,{path:"pipelines/:pipelineId/items/:caseId",element:(0,s.jsx)(Gi,{children:(0,s.jsx)(F6,{})})}),(0,s.jsx)(L,{path:"pipelines/:pipelineId/cases/:caseId",element:(0,s.jsx)(Gi,{children:(0,s.jsx)(H6,{})})}),(0,s.jsx)(L,{path:"routines/:routineId",element:(0,s.jsx)(Ow,{})}),(0,s.jsx)(L,{path:"routines/:routineId/:section",element:(0,s.jsx)(Ow,{})}),(0,s.jsx)(L,{element:(0,s.jsx)(ph,{}),children:(0,s.jsxs)(L,{element:(0,s.jsx)(TB,{}),children:[(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId",element:(0,s.jsx)(Rl,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId/services",element:(0,s.jsx)(Rl,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId/configuration",element:(0,s.jsx)(Rl,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId/runtime-logs",element:(0,s.jsx)(Rl,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId/issues",element:(0,s.jsx)(Rl,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId/routines",element:(0,s.jsx)(Rl,{})})]})}),(0,s.jsx)(L,{path:"goals",element:(0,s.jsx)(Y6,{})}),(0,s.jsx)(L,{path:"goals/:goalId",element:(0,s.jsx)(X6,{})}),(0,s.jsx)(L,{path:"artifacts",element:(0,s.jsx)(Lw,{})}),(0,s.jsx)(L,{path:"approvals",element:(0,s.jsx)(Qe,{to:"/approvals/pending",replace:!0})}),(0,s.jsx)(L,{path:"approvals/pending",element:(0,s.jsx)(zw,{})}),(0,s.jsx)(L,{path:"approvals/all",element:(0,s.jsx)(zw,{})}),(0,s.jsx)(L,{path:"approvals/:approvalId",element:(0,s.jsx)(Z6,{})}),(0,s.jsx)(L,{path:"activity",element:(0,s.jsx)(J6,{})}),(0,s.jsx)(L,{path:"activity/runs",element:(0,s.jsx)(md,{section:"runs"})}),(0,s.jsx)(L,{path:"activity/costs",element:(0,s.jsx)(md,{section:"costs"})}),(0,s.jsx)(L,{path:"activity/budgets",element:(0,s.jsx)(md,{section:"budgets"})}),(0,s.jsx)(L,{path:"activity/timeline",element:(0,s.jsx)(md,{section:"timeline"})}),(0,s.jsx)(L,{path:"audit",element:(0,s.jsx)(Va,{to:"/activity",forceAgentMode:!0})}),(0,s.jsx)(L,{path:"audit/activity",element:(0,s.jsx)(Va,{to:"/activity"})}),(0,s.jsx)(L,{path:"audit/runs",element:(0,s.jsx)(Va,{to:"/activity/runs"})}),(0,s.jsx)(L,{path:"audit/costs",element:(0,s.jsx)(Va,{to:"/activity/costs"})}),(0,s.jsx)(L,{path:"audit/budgets",element:(0,s.jsx)(Va,{to:"/activity/budgets"})}),(0,s.jsx)(L,{path:"audit/timeline",element:(0,s.jsx)(Va,{to:"/activity/timeline"})}),(0,s.jsx)(L,{path:"runs",element:(0,s.jsx)(Va,{to:"/activity/runs"})}),(0,s.jsx)(L,{path:"costs",element:(0,s.jsx)(Va,{to:"/activity/costs"})}),(0,s.jsx)(L,{path:"budgets",element:(0,s.jsx)(Va,{to:"/activity/budgets"})}),(0,s.jsxs)(L,{element:(0,s.jsx)(EB,{}),children:[(0,s.jsx)(L,{path:"board-chat",element:(0,s.jsx)(n8,{})}),(0,s.jsx)(L,{path:"artifacts",element:(0,s.jsx)(Lw,{})})]}),null,(0,s.jsx)(L,{path:"decisions",element:(0,s.jsx)(e8,{})}),(0,s.jsx)(L,{path:"decisions/queues/:key",element:(0,s.jsx)(t8,{})}),t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(L,{path:"inbox",element:(0,s.jsx)(Gw,{})}),(0,s.jsx)(L,{path:"inbox/mine",element:(0,s.jsx)(ha,{view:"mine"})}),(0,s.jsx)(L,{path:"inbox/recent",element:(0,s.jsx)(ha,{view:"recent"})}),(0,s.jsx)(L,{path:"inbox/unread",element:(0,s.jsx)(ha,{view:"unread"})}),(0,s.jsx)(L,{path:"inbox/blocked",element:(0,s.jsx)(ha,{view:"blocked"})}),(0,s.jsx)(L,{path:"inbox/all",element:(0,s.jsx)(ha,{view:"everything"})}),(0,s.jsx)(L,{path:"inbox/new",element:(0,s.jsx)(ha,{view:"mine"})})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(L,{path:"inbox",element:(0,s.jsx)(Gw,{})}),(0,s.jsx)(L,{path:"inbox/mine",element:(0,s.jsx)(tc,{})}),(0,s.jsx)(L,{path:"inbox/recent",element:(0,s.jsx)(tc,{})}),(0,s.jsx)(L,{path:"inbox/unread",element:(0,s.jsx)(tc,{})}),(0,s.jsx)(L,{path:"inbox/blocked",element:(0,s.jsx)(tc,{})}),(0,s.jsx)(L,{path:"inbox/all",element:(0,s.jsx)(tc,{})}),(0,s.jsx)(L,{path:"inbox/new",element:(0,s.jsx)(Qe,{to:"/inbox/mine",replace:!0})})]}),(0,s.jsx)(L,{path:"inbox/requests",element:(0,s.jsx)(U8,{})}),(0,s.jsx)(L,{path:"u/:userSlug",element:(0,s.jsx)(G6,{})}),(0,s.jsx)(L,{path:"design-guide",element:(0,s.jsx)(j8,{})}),(0,s.jsx)(L,{path:"instance/settings/adapters",element:(0,s.jsx)(Fw,{})}),(0,s.jsx)(L,{path:":pluginRoutePath/*",element:(0,s.jsx)(Hw,{})}),(0,s.jsx)(L,{path:"*",element:(0,s.jsx)(oA,{scope:"board"})})]})}r(q8,"boardRoutes");function Qw({credentialSource:e="wardmote_vault"}={}){const t=vn(),i=new URLSearchParams(t.search),{enabled:l,githubEnabled:c}=s0();return dT(i,{chatConnectorsEnabled:l,githubReviewBotsEnabled:c})?(0,s.jsx)(lA,{credentialSource:e}):(0,s.jsx)(Qe,{to:"/apps",replace:!0})}r(Qw,"AppsConnectEntryRoute");function Gw(){const{enabled:e}=Of();return e?(0,s.jsx)(ha,{view:PE(bj())}):(0,s.jsx)(Qe,{to:`/inbox/${bj()}`,replace:!0})}r(Gw,"InboxRootRedirect");function ha({view:e}){const t=vn(),i=new URLSearchParams(t.search);return i.set(DE,e),(0,s.jsx)(Qe,{to:`/issues?${i.toString()}${t.hash}`,replace:!0})}r(ha,"TaskViewRedirect");function cA(){const e=vn(),{companies:t,selectedCompany:i,loading:l}=vt(),{companyPrefix:c,skillId:u}=La();if(l)return null;const m=(c?t.find(f=>f.issuePrefix.toUpperCase()===c.toUpperCase()):null)??i??t[0]??null;return!m||!u?(0,s.jsx)(Qe,{to:"/skills/studio",replace:!0}):(0,s.jsx)(Qe,{to:`/${m.issuePrefix}/skills/studio/${encodeURIComponent(u)}${e.search}${e.hash}`,replace:!0})}r(cA,"LegacySkillStudioRedirect");function Lr(){const e=vn(),{companies:t,selectedCompany:i,loading:l}=vt(),{companyPrefix:c}=La(),{hidden:u}=lr();if(l)return(0,s.jsx)(Ra,{});const m=(c?t.find(h=>h.issuePrefix.toUpperCase()===c.toUpperCase()):null)??i??t[0]??null;if(!m)return Y0({pathname:e.pathname,hasCompanies:!1})?(0,s.jsx)(Qe,{to:"/onboarding",replace:!0}):(0,s.jsx)(J0,{});const f=_3(E3(`${e.pathname}${e.search}${e.hash}`),u);return(0,s.jsx)(Qe,{to:`/${m.issuePrefix}${f}`,replace:!0})}r(Lr,"LegacySettingsRedirect");function Yw(){const{tab:e}=La();return(0,s.jsx)(Qe,{to:uA(e),replace:!0})}r(Yw,"LegacyToolsSettingsRedirect");function Xw(){const{tab:e}=La();return(0,s.jsx)(Qe,{to:uA(e),replace:!0})}r(Xw,"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 dA(){const{companies:e}=vt(),{openOnboarding:t}=Pa(),{t:i}=aN(),{onboardingOpen:l,onboardingRouteDismissed:c}=Cf(),{companyPrefix:u}=La(),m=u?e.find(g=>g.issuePrefix.toUpperCase()===u.toUpperCase())??null:null;if(RU({onboardingOpen:l,routeDismissed:c}))return null;const f=m?`Add another agent to ${m.name}`:e.length>0?"Create another organization":"Create your first organization",h=m?"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,s.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,s.jsxs)("div",{className:"rounded-lg border border-line bg-bg-2 p-6",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold",children:f}),(0,s.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:h}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(le,{onClick:r(()=>m?t({initialStep:HC(),companyId:m.id}):t(),"onClick"),children:m?"Add Agent":"Start Onboarding"})})]})})}r(dA,"OnboardingRoutePage");function F8(){const{companies:e,selectedCompany:t,loading:i}=vt(),l=vn();if(i)return(0,s.jsx)(Ra,{});const c=t??e[0]??null;return c?(0,s.jsx)(Qe,{to:`/${c.issuePrefix}/dashboard`,replace:!0}):Y0({pathname:l.pathname,hasCompanies:!1})?(0,s.jsx)(Qe,{to:"/onboarding",replace:!0}):(0,s.jsx)(J0,{})}r(F8,"CompanyRootRedirect");function Zw(){const{cardId:e}=La(),t=zE(),i=t?`/${t}`:"";return(0,s.jsx)(Qe,{to:`${i}/status${e?`/${e}`:""}`,replace:!0})}r(Zw,"StatusCardsLegacyRedirect");function Va({to:e,forceAgentMode:t=!1}){const i=vn(),l=new URLSearchParams(i.search);t&&l.set("mode","agents");const c=l.toString();return(0,s.jsx)(Qe,{to:`${e}${c?`?${c}`:""}${i.hash}`,replace:!0})}r(Va,"AuditCompatibilityRedirect");function Ze(){const e=vn(),{companies:t,selectedCompany:i,loading:l}=vt();if(l)return(0,s.jsx)(Ra,{});const c=i??t[0]??null;return c?(0,s.jsx)(Qe,{to:`/${c.issuePrefix}${e.pathname}${e.search}${e.hash}`,replace:!0}):Y0({pathname:e.pathname,hasCompanies:!1})?(0,s.jsx)(Qe,{to:"/onboarding",replace:!0}):(0,s.jsx)(J0,{})}r(Ze,"UnprefixedBoardRedirect");function J0(){const{openOnboarding:e}=Pa(),{t}=aN();return(0,s.jsx)("div",{className:"mx-auto max-w-xl py-10",children:(0,s.jsxs)("div",{className:"rounded-lg border border-line bg-bg-2 p-6",children:[(0,s.jsx)("h1",{className:"text-xl font-semibold",children:t("app.noCompanies.title",{defaultValue:"Create your first organization"})}),(0,s.jsx)("p",{className:"mt-2 text-sm text-ink-3",children:t("app.noCompanies.description",{defaultValue:"Get started by creating an organization."})}),(0,s.jsx)("div",{className:"mt-4",children:(0,s.jsx)(le,{onClick:r(()=>e(),"onClick"),children:t("app.noCompanies.newCompany",{defaultValue:"New Organization"})})})]})})}r(J0,"NoCompaniesStartPage");function H8(){const{enabled:e}=Of();return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(x.Suspense,{fallback:(0,s.jsx)(Ra,{}),children:(0,s.jsxs)(aE,{children:[(0,s.jsx)(L,{path:"auth",element:(0,s.jsx)(R8,{})}),(0,s.jsx)(L,{path:"board-claim/:token",element:(0,s.jsx)(D8,{})}),(0,s.jsx)(L,{path:"mcp-connect/:id",element:(0,s.jsx)(Vw,{})}),(0,s.jsx)(L,{path:"dot-connect/:id",element:(0,s.jsx)(Vw,{agentPairingOnly:!0})}),(0,s.jsx)(L,{path:"mcp-device",element:(0,s.jsx)(O8,{})}),(0,s.jsx)(L,{path:"assistant-connections",element:(0,s.jsx)(L8,{})}),(0,s.jsx)(L,{path:"cli-auth/:id",element:(0,s.jsx)(z8,{})}),(0,s.jsx)(L,{path:"invite/:token",element:(0,s.jsx)(P8,{})}),(0,s.jsx)(L,{path:"s/:token",element:(0,s.jsx)(Ww,{})}),(0,s.jsx)(L,{path:"s/:token/issues/:issueId",element:(0,s.jsx)(Ww,{})}),(0,s.jsx)(L,{element:(0,s.jsx)(Dw,{allowMembershipRequest:!0}),children:(0,s.jsx)(L,{path:"chat-identity/confirm",element:(0,s.jsx)(p8,{})})}),(0,s.jsx)(L,{path:"tests/perf/long-thread",element:(0,s.jsx)(B6,{})}),(0,s.jsx)(L,{path:"ux-lab/bootstrap-setup",element:(0,s.jsx)(i8,{})}),(0,s.jsx)(L,{path:"ux-lab/responsible-user-denial",element:(0,s.jsx)(r8,{})}),(0,s.jsx)(L,{path:"ux-lab/cross-issue-collaboration",element:(0,s.jsx)(l8,{})}),(0,s.jsxs)(L,{element:(0,s.jsx)(Dw,{}),children:[(0,s.jsx)(L,{index:!0,element:(0,s.jsx)(F8,{})}),(0,s.jsx)(L,{path:"onboarding",element:(0,s.jsx)(dA,{})}),(0,s.jsx)(L,{path:"instance",element:(0,s.jsx)(Lr,{})}),(0,s.jsx)(L,{path:"instance/settings",element:(0,s.jsx)(Lr,{})}),(0,s.jsx)(L,{path:"instance/settings/*",element:(0,s.jsx)(Lr,{})}),(0,s.jsx)(L,{path:"companies",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"dashboard",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"inbox/*",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"issues",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"tasks",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"tasks/new",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"issues/:issueId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"routines",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"routines/:routineId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"review-queue",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"learnings",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"cases",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"cases/:caseIdentifier",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"pixels-office",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"status",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"status/:cardId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"status-cards",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"status-cards/:cardId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"pipelines",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"pipelines/:pipelineId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"pipelines/:pipelineId/add",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"pipelines/:pipelineId/settings",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"pipelines/:pipelineId/items/:caseId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"pipelines/:pipelineId/cases/:caseId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"artifacts",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"audit",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"audit/*",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"activity",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"activity/*",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"runs",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"costs",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"budgets",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"decisions",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"u/:userSlug",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"skills/studio",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"skills/studio/new",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"skills/studio/:skillId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"skills/:skillId/studio",element:(0,s.jsx)(cA,{})}),(0,s.jsx)(L,{path:"skills/*",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"settings",element:(0,s.jsx)(Lr,{})}),(0,s.jsx)(L,{path:"settings/*",element:(0,s.jsx)(Lr,{})}),(0,s.jsx)(L,{path:"agents",element:(0,s.jsx)(Ze,{})}),rA.map(t=>(0,s.jsx)(L,{path:`agents/${t}`,element:(0,s.jsx)(Ze,{})},t)),(0,s.jsx)(L,{path:"agents/new",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"agents/:agentId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"agents/:agentId/:tab",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"agents/:agentId/runs/:runId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"projects",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"projects/:projectId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"projects/:projectId/overview",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"projects/:projectId/issues",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"projects/:projectId/issues/:filter",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"projects/:projectId/workspaces",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"projects/:projectId/workspaces/:workspaceId",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"projects/:projectId/configuration",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"workspaces",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"terminal",element:(0,s.jsx)(Ze,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId",element:(0,s.jsx)(Il,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId/services",element:(0,s.jsx)(Il,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId/configuration",element:(0,s.jsx)(Il,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId/runtime-logs",element:(0,s.jsx)(Il,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId/issues",element:(0,s.jsx)(Il,{})}),(0,s.jsx)(L,{path:"execution-workspaces/:workspaceId/routines",element:(0,s.jsx)(Il,{})}),(0,s.jsx)(L,{path:":companyPrefix",element:(0,s.jsx)(CB,{}),children:q8(e)}),(0,s.jsx)(L,{path:"*",element:(0,s.jsx)(oA,{scope:"global"})})]})]})}),(0,s.jsx)(x6,{}),(0,s.jsx)(K$,{})]})}r(H8,"App");var V8=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){XC(e,{boundary:"app",componentStack:t.componentStack})}render(){const{error:e}=this.state;return e?(0,s.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,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"text-lg font-semibold",children:"Wardmote hit an error"}),(0,s.jsx)("p",{className:"mt-1 text-sm text-ink-3",children:"Something went wrong while running the app. Reloading usually fixes this."})]}),(0,s.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,s.jsx)("div",{children:(0,s.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 W8(){const{data:e}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),t=e?.sentryDsn,i=e?.sentryEnvironment??void 0;return(0,x.useEffect)(()=>{if(t)return h$(t,i),()=>{g$()}},[t,i]),null}r(W8,"SentryGate");function Q8(){let e;return{promise:new Promise(t=>{e=t}),resolve:e}}r(Q8,"createDeferred");function G8(e,t=300){const i=new Map;let l=null,c=null;const u=r(async()=>{l!==null&&(clearTimeout(l),l=null);const h=c;if(c=null,i.size===0){h?.resolve();return}const g=[...i.values()];i.clear();try{await Promise.all(g.map(v=>e.invalidateQueries(ff().visible?v:{...v,refetchType:"none"})))}finally{h?.resolve()}},"flush");return{schedule:r(h=>(i.set(Y8(h),h),c===null&&(c=Q8()),l===null&&(l=setTimeout(()=>{u()},t)),c.promise),"schedule"),flush:u,dispose:r(()=>{l!==null&&(clearTimeout(l),l=null),i.clear(),c?.resolve(),c=null},"dispose")}}r(G8,"createInvalidationBatcher");var Jw=0;function Y8(e){if(typeof e.predicate=="function")return`__predicate__:${Jw+=1}`;try{return JSON.stringify([e.queryKey??null,e.refetchType??null,e.exact??null,e.type??null])}catch{return`__nonserializable__:${Jw+=1}`}}r(Y8,"serializeFilters");function X8(e,t){return new Proxy(e,{get(i,l){if(l==="invalidateQueries")return u=>t.schedule(u??{});const c=Reflect.get(i,l,i);return typeof c=="function"?c.bind(i):c}})}r(X8,"createCoalescingQueryClient");function Z8(e,t){if(!e)return e;const i=e.filter(l=>l.id!==t);return i.length===e.length?e:i}r(Z8,"removeRunFromList");function J8(e,t,i){if(!e)return{next:e,present:!1};let l=!1,c=!1;const u=e.map(m=>m.id!==t||(l=!0,m.status===i)?m:(c=!0,{...m,status:i}));return{next:c?u:e,present:l}}r(J8,"patchRunStatusInList");function eK(e,t){if(!e)return e;const i=e.filter(l=>l.id!==t);return i.length===e.length?e:i}r(eK,"removeLiveRunById");function tK(e,t){return!e||e.executionRunId!==t?e:{...e,executionRunId:null,executionAgentNameKey:null,executionLockedAt:null}}r(tK,"clearIssueExecutionRun");var nK=3e4,sK=["status","priority","title","assigneeAgentId","assigneeUserId","projectId","parentId"],aK=new Set(["issue.read_marked","issue.read_unmarked","issue.inbox_archived","issue.inbox_unarchived"]);function Rg(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}r(Rg,"isRecord");function ex(e){return Rg(e)&&Array.isArray(e.pages)}r(ex,"isInfiniteIssueData");function iK(e){return Array.isArray(e)?e.length:ex(e)?e.pages.reduce((t,i)=>t+(Array.isArray(i)?i.length:0),0):0}r(iK,"issueListRowCount");function rK(e){const t=e.state.data;return ex(t)||iK(t)>=100}r(rK,"isLargeIssueListQuery");function lK(e,t,i){const l={},c=Rg(t?.changes)?t.changes:null;if(e==="issue.updated"&&c)for(const u of sK){const m=c[u];!Rg(m)||m.updated===!0||!("to"in m)||(l[u]=m.to)}return i&&e&&!aK.has(e)&&!Number.isNaN(Date.parse(i))&&(l.lastActivityAt=i),l}r(lK,"readIssueListPatchFromActivity");function oK(e,t){let i=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;i??={...e},i[l]=c}return i??e}r(oK,"patchIssueRow");function ek(e,t,i){const l=e.findIndex(m=>m?.id===t);if(l<0)return e;const c=oK(e[l],i);if(c===e[l])return e;const u=e.slice();return u[l]=c,u}r(ek,"patchIssueRows");function cK(e,t,i){if(Array.isArray(e))return ek(e,t,i);if(!ex(e))return e;let l=!1;const c=e.pages.map(u=>{if(!Array.isArray(u))return u;const m=ek(u,t,i);return m!==u&&(l=!0),m});return l?{...e,pages:c}:e}r(cK,"patchIssueListData");function uK(e,t,i,l){if(Object.keys(l).length===0)return 0;let c=0;for(const[u,m]of e.getQueriesData({queryKey:U.issues.list(t)})){const f=cK(m,i,l);f!==m&&(e.setQueryData(u,f),c+=1)}return c}r(uK,"patchIssueInListCaches");function dK(e,t){for(const i of e.getQueryCache().findAll({queryKey:U.issues.list(t)}))e.invalidateQueries({queryKey:i.queryKey,exact:!0,...rK(i)?{refetchType:"none"}:{}})}r(dK,"invalidateIssueListsForActivity");function fK(e,t){const i=r(l=>l.state.isInvalidated,"predicate");return Promise.all([e.refetchQueries({queryKey:U.issues.list(t),type:"active",predicate:i}),e.refetchQueries({queryKey:U.heartbeats(t),type:"active",predicate:i})])}r(fK,"refreshInvalidatedLiveLists");function Bl(e){return typeof e=="string"&&e.length>0?e:null}r(Bl,"readString$1");function mK(e){return e.length===3&&e[0]==="issues"&&e[2]==="agent-todo"}r(mK,"isAgentTodoQueryKey");function pK(e){if(e.type!=="heartbeat.run.event")return null;const t=e.payload??{};if(t.eventType!=="agent.todo")return null;const i=Bl(t.runId),l=Bl(t.agentId),c=Bl(t.issueId),u=t.seq;if(!i||!l||!c||typeof u!="number"||!Number.isInteger(u))return null;const m=q_(t.payload);return m?{...m,runId:i,agentId:l,issueId:c,seq:u,createdAt:Bl(t.lastEventAt)??e.createdAt,runStatus:"running"}:null}r(pK,"readAgentTodoSnapshotFromLiveEvent");function tk(e,t){if(t.type==="heartbeat.run.status"){const l=t.payload??{},c=Bl(l.runId),u=Bl(l.status);if(!c||!u)return;e.setQueriesData({predicate:r(m=>mK(m.queryKey),"predicate")},m=>m&&m.runId===c&&m.runStatus!==u?{...m,runStatus:u}:m);return}const i=pK(t);i&&e.setQueryData(U.issues.agentTodo(i.issueId),l=>l&&l.runId===i.runId&&l.seq>=i.seq?l:i)}r(tk,"applyAgentTodoLiveEvent");function hK(e){const t=e.trim().toLowerCase();return t==="0.0.0.0"||t==="::"||t==="[::]"}r(hK,"isWildcardHost");function gK(e=window.location){return hK(e.hostname)?e.port?`localhost:${e.port}`:"localhost":e.host}r(gK,"browserReachableHost");function xK(e,t=window.location){const i=t.protocol==="https:"?"wss":"ws",l=e.startsWith("/")?e:`/${e}`;return`${i}://${gK(t)}${l}`}r(xK,"buildSameOriginWebSocketUrl");function bK(e){try{return new WebSocket(e)}catch{return null}}r(bK,"tryCreateWebSocket");var vK="/pwa-192x192.png",yK="/pwa-monochrome-512x512.png";function tx(){return typeof window<"u"&&"Notification"in window}r(tx,"notificationsSupported");function nx(){return tx()?Notification.permission:"unsupported"}r(nx,"notificationPermission");async function jK(){return tx()?Notification.permission!=="default"?Notification.permission:Notification.requestPermission():"unsupported"}r(jK,"requestNotificationPermission");function wK(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window}r(wK,"pushSupported");function NG(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(NG,"isIosWithoutHomeScreenInstall");async function fA(){if(typeof navigator>"u"||!("serviceWorker"in navigator))return null;try{return await navigator.serviceWorker.getRegistration()??null}catch{return null}}r(fA,"getServiceWorkerRegistration");var mA="wardmote.notifications.seen.v1",kK="wardmote.notifications.claim",SK=6e5,NK=200,CK=new Map;function AK(){let e=null;try{e=typeof localStorage>"u"?null:localStorage}catch{e=null}const t=typeof navigator<"u"&&navigator.locks?{request:r((i,l)=>navigator.locks.request(i,l),"request")}:null;return{storage:e,locks:t,now:r(()=>Date.now(),"now"),memory:CK}}r(AK,"defaultEnv");function _K(e){const t=e.storage?.getItem(mA);if(!t)return new Map(e.memory);try{const i=JSON.parse(t),l=new Map(e.memory);for(const[c,u]of Object.entries(i))typeof u=="number"&&l.set(c,u);return l}catch{return new Map(e.memory)}}r(_K,"readSeen");function Ch(e,t){const i=t.now(),l=_K(t);for(const[u,m]of l)i-m>SK&&l.delete(u);if(l.has(e))return!1;l.set(e,i);const c=[...l.entries()].sort((u,m)=>m[1]-u[1]).slice(0,NK);t.memory.clear();for(const[u,m]of c)t.memory.set(u,m);return EK(t,c),!0}r(Ch,"claimInsideLock");function EK(e,t){try{e.storage?.setItem(mA,JSON.stringify(Object.fromEntries(t)))}catch{return}}r(EK,"writeSeen");async function IK(e,t=AK()){if(!t.locks)return Ch(e,t);try{return await t.locks.request(kK,()=>Ch(e,t))}catch{return Ch(e,t)}}r(IK,"claimNotificationKey");var Ah="paperclip-notifications";function _h(e){return new Promise((t,i)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>i(e.error)})}r(_h,"settle");function TK(e){return new Promise((t,i)=>{e.oncomplete=()=>t(),e.onerror=()=>i(e.error),e.onabort=()=>i(e.error)})}r(TK,"committed");async function RK(e,t){if(typeof indexedDB.databases!="function"||!(await indexedDB.databases()).some(c=>c.name===Ah))return 0;const i=await _h(indexedDB.open(Ah));let l=0;try{if(i.objectStoreNames.contains(t)){const c=await _h(i.transaction(t,"readonly").objectStore(t).getAll()),u=new Set(await _h(e.transaction(t,"readonly").objectStore(t).getAllKeys())),m=c.filter(f=>!u.has(f.kind));if(m.length>0){const f=e.transaction(t,"readwrite"),h=f.objectStore(t);for(const g of m)h.put(g);await TK(f),l=m.length}}}finally{i.close()}return indexedDB.deleteDatabase(Ah),l}r(RK,"moveRetiredCustomSounds");var DK="wardmote-notifications",fc="custom-sounds";function MK(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(MK,"validateCustomSoundFile");function pA(e){return new Promise((t,i)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>i(e.error)})}r(pA,"requestResult");var pd=null;function OK(){if(typeof indexedDB>"u")return Promise.reject(new Error("IndexedDB is unavailable."));if(!pd){const e=indexedDB.open(DK,1);e.onupgradeneeded=()=>{e.result.objectStoreNames.contains(fc)||e.result.createObjectStore(fc,{keyPath:"kind"})},pd=pA(e).then(async t=>(await RK(t,fc).catch(()=>0),t)).catch(t=>{throw pd=null,t})}return pd}r(OK,"openDb");async function sx(e,t){return pA(t((await OK()).transaction(fc,e).objectStore(fc)))}r(sx,"withStore");var Dg=new Set;function LK(e){return Dg.add(e),()=>Dg.delete(e)}r(LK,"subscribeCustomSounds");function hA(){for(const e of Dg)e()}r(hA,"notifyCustomSoundsChanged");async function CG(e,t){const i=MK(t);if(!i.ok)throw new Error(i.error);const l={kind:e,name:t.name,type:t.type,size:t.size,blob:t,updatedAt:new Date().toISOString()};return await sx("readwrite",c=>c.put(l)),hA(),l}r(CG,"saveCustomSound");async function zK(e){try{return await sx("readonly",t=>t.get(e))??null}catch{return null}}r(zK,"loadCustomSound");async function AG(e){await sx("readwrite",t=>t.delete(e)),hA()}r(AG,"removeCustomSound");var PK=[{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"}],_G="custom",EG="none",Mg={approval:"confirmation",question:"question",comment:"pluck",assignment:"maximize",review:"glass",run_failed:"error",join_request:"bong",disk_space:"drop"},IG={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"},gA=new Set(PK.map(e=>e.id));function UK(e){return typeof e=="string"&&(gA.has(e)||e==="custom"||e==="none")}r(UK,"isKnownSoundId");function $K(e){return gA.has(e)}r($K,"isLibrarySoundId");function nk(e,t){return`/sounds/${e}.${t}`}r(nk,"librarySoundUrl");var Og=new Map,af=new Map,sk=!1,hd=null;function xA(){return typeof Audio<"u"}r(xA,"audioSupported");function ak(){return hd||(hd=new Audio().canPlayType('audio/ogg; codecs="vorbis"')?"ogg":"mp3",hd)}r(ak,"libraryFormat");function bA(e){let t=Og.get(e);return t||(t=new Audio,t.preload="auto",t.src=e,Og.set(e,t)),t}r(bA,"audioFor");function BK(){for(const e of af.values())e.then(t=>{t&&(Og.delete(t),URL.revokeObjectURL(t))});af.clear()}r(BK,"revokeCustomSounds");function KK(e){sk||(sk=!0,LK(BK));let t=af.get(e);return t||(t=zK(e).then(i=>i?URL.createObjectURL(i.blob):null),af.set(e,t)),t}r(KK,"customSoundUrl");async function vA(e,t){if(t==="none")return null;if(t==="custom"){const i=await KK(e);return i||nk(Mg[e],ak())}return nk($K(t)?t:Mg[e],ak())}r(vA,"resolveSoundUrl");async function qK(e,t,i){if(!xA())return!1;const l=await vA(e,t);if(!l)return!1;const c=bA(l);c.volume=Math.min(1,Math.max(0,i)),c.currentTime=0;try{return await c.play(),!0}catch{return!1}}r(qK,"playSound");function FK(e,t){return qK(e,t.kinds[e].soundId,t.volume)}r(FK,"playKindSound");function ik(e){if(!(!xA()||!e.enabled))for(const[t,i]of Object.entries(e.kinds))i.enabled&&vA(t,i.soundId).then(l=>{l&&bA(l)})}r(ik,"preloadNotificationSounds");var Lg={getWebPushConfig:r(()=>we.get("/notifications/web-push/config"),"getWebPushConfig"),upsertWebPushSubscription:r(e=>we.put("/notifications/web-push/subscription",e),"upsertWebPushSubscription"),deleteWebPushSubscription:r(e=>we.deleteWithBody("/notifications/web-push/subscription",e),"deleteWebPushSubscription"),sendWebPushTest:r(()=>we.post("/notifications/web-push/test",{}),"sendWebPushTest")},yA="wardmote.notifications.v1",HK=.6;function zg(){const e={};for(const t of Yg)e[t]={enabled:!0,soundId:Mg[t]};return{enabled:!0,volume:HK,pushEnabled:!0,kinds:e}}r(zg,"defaultNotificationSettings");function Eh(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}r(Eh,"asRecord");function jA(e){const t=zg(),i=Eh(e);if(!i)return t;const l=typeof i.volume=="number"&&Number.isFinite(i.volume)?Math.min(1,Math.max(0,i.volume)):t.volume,c=Eh(i.kinds)??{},u={...t.kinds};for(const m of Yg){const f=Eh(c[m]);f&&(u[m]={enabled:typeof f.enabled=="boolean"?f.enabled:t.kinds[m].enabled,soundId:UK(f.soundId)?f.soundId:t.kinds[m].soundId})}return{enabled:typeof i.enabled=="boolean"?i.enabled:t.enabled,volume:l,pushEnabled:typeof i.pushEnabled=="boolean"?i.pushEnabled:t.pushEnabled,kinds:u}}r(jA,"normalizeNotificationSettings");function rf(){try{return typeof localStorage>"u"?null:localStorage}catch{return null}}r(rf,"storage");function VK(){const e=rf()?.getItem(yA);if(!e)return zg();try{return jA(JSON.parse(e))}catch{return zg()}}r(VK,"readStored");var lf,sc=null,Ad=new Set,gd=!1;function Vr(){const e=rf()?.getItem("wardmote.notifications.v1")??null;return sc&&e===lf||(lf=e,sc=VK()),sc}r(Vr,"getNotificationSettings");function wA(){for(const e of Ad)e()}r(wA,"notify");function kA(e){const t=jA(typeof e=="function"?e(Vr()):e);try{rf()?.setItem(yA,JSON.stringify(t))}catch{lf=void 0}return sc=t,lf=rf()?.getItem("wardmote.notifications.v1")??null,wA(),t}r(kA,"setNotificationSettings");function TG(e,t){return kA(i=>({...i,kinds:{...i.kinds,[e]:{...i.kinds[e],...t}}}))}r(TG,"updateKindSettings");function WK(e){return e.enabled?Yg.filter(t=>e.kinds[t].enabled):[]}r(WK,"enabledNotificationKinds");function rk(e){e.key!==null&&e.key!=="wardmote.notifications.v1"||wA()}r(rk,"onStorage");function SA(e){return Ad.add(e),!gd&&typeof window<"u"&&(gd=!0,window.addEventListener("storage",rk)),()=>{Ad.delete(e),Ad.size===0&&gd&&typeof window<"u"&&(gd=!1,window.removeEventListener("storage",rk))}}r(SA,"subscribeNotificationSettings");function RG(){return(0,x.useSyncExternalStore)(SA,Vr,Vr)}r(RG,"useNotificationSettings");var mc={status:"unknown",error:null},Pg=new Set,Ug=null,lk=Promise.resolve();function ok(e){if(!(e.status===mc.status&&e.error===mc.error)){mc=e;for(const t of Pg)t()}}r(ok,"setPushState");function ck(){return mc}r(ck,"getPushState");function QK(){return mc.status==="active"}r(QK,"hasActivePushSubscription");function GK(e){return Pg.add(e),()=>Pg.delete(e)}r(GK,"subscribePushState");function DG(){return(0,x.useSyncExternalStore)(GK,ck,ck)}r(DG,"usePushState");function NA(e){const t=e.padEnd(e.length+(4-e.length%4)%4,"=").replace(/-/g,"+").replace(/_/g,"/"),i=atob(t),l=new Uint8Array(new ArrayBuffer(i.length));for(let c=0;c<i.length;c+=1)l[c]=i.charCodeAt(c);return l}r(NA,"urlBase64ToUint8Array");function YK(e,t){const i=e.options?.applicationServerKey;if(!i)return!0;const l=NA(t),c=new Uint8Array(i);return c.length===l.length&&c.every((u,m)=>u===l[m])}r(YK,"sameApplicationServerKey");async function uk(e){await Lg.deleteWebPushSubscription({endpoint:e.endpoint}).catch(()=>{}),await e.unsubscribe().catch(()=>!1),Ug=null}r(uk,"forgetSubscription");async function XK(e,t){if(!wK())return{status:"unsupported",error:null};const i=await fA();if(!i)return{status:"unsupported",error:null};let l=await i.pushManager.getSubscription();if(!(e.enabled&&e.pushEnabled))return l&&await uk(l),{status:"off",error:null};if(nx()!=="granted")return{status:"permission",error:null};const c=await Lg.getWebPushConfig();if(!c.enabled||!c.publicKey)return{status:"server-disabled",error:null};l&&!YK(l,c.publicKey)&&(await uk(l),l=null),l||(l=await i.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:NA(c.publicKey)}));const u=l.toJSON(),m=u.keys?.p256dh,f=u.keys?.auth;if(!m||!f)return{status:"error",error:"The browser returned an incomplete push subscription."};const h=WK(e),g=[t,l.endpoint,...h].join("|");return g!==Ug&&(await Lg.upsertWebPushSubscription({endpoint:l.endpoint,keys:{p256dh:m,auth:f},kinds:h}),Ug=g),{status:"active",error:null}}r(XK,"reconcile");function $g(e,t){const i=lk.then(async()=>{try{const l=await XK(e,t);return ok(l),l}catch(l){const c={status:"error",error:l instanceof Error?l.message:"Push subscription failed."};return ok(c),c}});return lk=i.catch(()=>{}),i}r($g,"syncPushSubscription");function CA(e,t){return t.enabled&&t.kinds[e.kind]?.enabled===!0}r(CA,"kindEnabled");function ZK(e){const{payload:t,userId:i,settings:l}=e;return!i||!t.recipientUserIds.includes(i)||!CA(t.notification,l)?"none":e.visible?"sound":e.pushActive?"none":"os"}r(ZK,"decideLiveNotification");function JK(e){return!e.visible||!CA(e.notification,e.settings)?"none":"sound"}r(JK,"decideServiceWorkerNotification");async function eq(e){if(nx()!=="granted")return;const t={body:e.body,tag:e.key,data:{url:e.url},icon:vK,badge:yK},i=await fA();if(i){await i.showNotification(e.title,t);return}new Notification(e.title,t)}r(eq,"showOsNotification");var AA={claim:r(e=>IK(e),"claim"),playSound:r((e,t)=>FK(e.kind,t),"playSound"),showOsNotification:eq};async function _A(e,t,i,l){return e==="none"?e:await l.claim(t.key)?(e==="sound"?await l.playSound(t,i):await l.showOsNotification(t),e):"none"}r(_A,"perform");function tq(e,t,i=AA,l={}){const c=l.settings??Vr();return _A(ZK({payload:e,userId:t,settings:c,visible:l.visible??ff().visible,pushActive:l.pushActive??QK()}),e.notification,c,i)}r(tq,"deliverLiveNotification");function nq(e,t=AA,i={}){const l=i.settings??Vr();return _A(JK({notification:e,settings:l,visible:i.visible??ff().visible}),e,l,t)}r(nq,"deliverServiceWorkerNotification");function EA(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(EA,"readNotification");function sq(e){if(!e||typeof e!="object")return null;const t=e,i=EA(t.notification);return!i||!Array.isArray(t.recipientUserIds)?null:{notification:i,recipientUserIds:t.recipientUserIds.filter(l=>typeof l=="string")}}r(sq,"readNotificationCreatedPayload");function aq(e){if(!e||typeof e!="object")return null;const t=e;if(t.type==="wardmote.notification"){const i=EA(t.notification);return i?{type:"notification",notification:i}:null}return t.type==="wardmote.navigate"&&typeof t.url=="string"&&t.url.startsWith("/")?{type:"navigate",url:t.url}:null}r(aq,"readServiceWorkerMessage");var iq=1e4,rq=3,lq=2e3,oq=3e5,cq=2e3,uq=15e3,dq=0,fq=1,Ec=new Set(["succeeded","interrupted","failed","cancelled","timed_out"]),IA=(0,x.createContext)(null);function mq(e,t,i){if(i.companyId===t)for(const l of Array.from(e))try{l(i)}catch{}}r(mq,"dispatchLiveEventToSubscribers");function MG(e){const t=(0,x.useContext)(IA),i=(0,x.useRef)(e);(0,x.useEffect)(()=>{i.current=e}),(0,x.useEffect)(()=>{if(t)return t.subscribe(l=>{i.current(l)})},[t])}r(MG,"useCompanyLiveEvent");function be(e){return typeof e=="string"&&e.length>0?e:null}r(be,"readString");function Xr(e){return typeof e!="object"||e===null||Array.isArray(e)?null:e}r(Xr,"readRecord");function of(e){return e.slice(0,8)}r(of,"shortId");function TA(e,t,i){const l=e.getQueryData(U.agents.list(t))?.find(c=>c.id===i);return l?.name?l.name:e.getQueryData(U.agents.detail(i))?.name??null}r(TA,"resolveAgentName");function pq(e,t,i){const l=e.getQueryData(U.access.companyUserDirectory(t));if(!l)return null;const c=l.users.find(u=>u.principalId===i);return c?.user?.name?.trim()||c?.user?.email?.trim()||null}r(pq,"resolveUserName");function zr(e,t){return e.length<=t?e:e.slice(0,t-1)+"…"}r(zr,"truncate");function hq(e,t,i,l){return i==="agent"&&l?TA(e,t,l)??`Agent ${of(l)}`:i==="system"?"System":i==="user"&&l?pq(e,t,l)??(l==="board"||l==="local-board"?"Board":`User ${of(l)}`):i==="plugin"?"Plugin":"Unknown actor"}r(hq,"resolveActorLabel");function ax(e,t,i,l){const c=new Set([i]),u=e.getQueryData(U.issues.detail(i)),m=e.getQueryData(U.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=m?.find(g=>!!(g.id===i||g.identifier&&g.identifier===i||f&&g.identifier===f));return h?.id&&c.add(h.id),h?.identifier&&c.add(h.identifier),Array.from(c)}r(ax,"resolveIssueQueryRefs");function gq(e,t,i,l){const c=ax(e,t,i,l),u=c.map(v=>e.getQueryData(U.issues.detail(v))).find(v=>!!v),m=e.getQueryData(U.issues.list(t))?.find(v=>c.some(y=>v.id===y||v.identifier===y)),f=u??m??null,h=be(l?.identifier)??be(l?.issueIdentifier)??f?.identifier??`Task ${of(i)}`,g=be(l?.title)??be(l?.issueTitle)??f?.title??null;return{ref:h,title:g,label:g?`${h} - ${zr(g,72)}`:h,href:`/issues/${f?.identifier??i}`}}r(gq,"resolveIssueToastContext");function RA(){return!(typeof document>"u"||document.visibilityState!=="visible"||typeof document.hasFocus=="function"&&!document.hasFocus())}r(RA,"isPageForegrounded");function or(e,t,i){if(!(i?.isForegrounded??RA()))return null;const l=pf(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(U.auth.session),k=j?.user?.id??j?.session?.userId??null,S=Gk(t),N=e.getQueryData(U.companies.list(k))?.companies.find(D=>D.issuePrefix.toUpperCase()===S?.toUpperCase());if(!N)return null;const _=e.getQueryData(U.agents.list(N.id))?.find(D=>D.id===c||ar(D)===c);if(!_)return null;const I=e.getQueryData(U.agentChats.detail(N.id,k,_.id));if(!I)return null;c=I.id}const u=e.getQueryData(U.issues.detail(c))??null,m=new Set([c]);u?.id&&m.add(u.id),u?.identifier&&m.add(u.identifier);function f(j,k){const S=e.getQueryData(U.issues.activeRun(j)),N=e.getQueryData(U.issues.liveRuns(j))??[],_=e.getQueryData(U.issues.runs(j))??[];S?.id&&k.add(S.id);for(const I of N)I.id&&k.add(I.id);for(const I of _)I.runId&&k.add(I.runId)}r(f,"collectCachedIssueRunIds");const h=new Set;for(const j of m)f(j,h);const g=new Set(m),v=new Set,y=new Set(h);if(u?.companyId&&u.id){const j=e.getQueryData(U.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(U.liveRuns(u.companyId))??[];for(const k of j)k.issueId&&g.has(k.issueId)&&y.add(k.id)}return{routeIssueRef:c,issueRefs:m,assigneeAgentId:u?.assigneeAgentId??null,runIds:h,subtreeIssueRefs:g,subtreeAgentIds:v,subtreeRunIds:y}}r(or,"resolveVisibleIssueRouteContext");function Uf(e,t){const i=new Set([e]),l=be(t?.identifier)??be(t?.issueIdentifier);return l&&i.add(l),i}r(Uf,"buildIssueRefsForPayload");function $f(e,t){for(const i of e)if(t.has(i))return!0;return!1}r($f,"overlaps");function xq(e,t,i,l){const c=be(i.entityType),u=be(i.entityId);if(c!=="issue"||!u)return!1;const m=or(e,t,l);return m?$f(m.subtreeIssueRefs,Uf(u,Xr(i.details))):!1}r(xq,"shouldSuppressActivityToastForVisibleIssue");function bq(e,t,i,l){if(!(l?.isForegrounded??RA()))return!1;const c=pf(t).match(/^\/agents\/[^/]+\/runs\/([^/]+)/)?.[1];if(c&&decodeURIComponent(c)===be(i.runId))return!0;const u=or(e,t,l);if(!u)return!1;const m=be(i.issueId);if(m)return u.subtreeIssueRefs.has(m);const f=be(i.runId);if(f)return u.subtreeRunIds.has(f);const h=be(i.agentId);return!!h&&(h===u.assigneeAgentId||u.subtreeAgentIds.has(h))}r(bq,"shouldSuppressRunStatusToastForVisibleIssue");function dk(e,t,i,l){const c=or(e,t,l);if(!c)return!1;const u=be(i.runId),m=be(i.agentId);if(!(u!==null&&c.runIds.has(u)||m&&c.assigneeAgentId&&m===c.assigneeAgentId))return!1;const f=be(i.status);if(u&&f&&Ec.has(f))for(const v of c.issueRefs)e.invalidateQueries({queryKey:U.issues.comments(v)}),e.setQueryData(U.issues.liveRuns(v),y=>eK(y,u)),e.setQueryData(U.issues.activeRun(v),y=>y?.id===u?null:y),e.setQueryData(U.issues.detail(v),y=>tK(y,u));const h=!!f&&Ec.has(f),g=!h&&(l?.liveStatusAlreadyPatched??!1);for(const v of c.issueRefs)e.invalidateQueries({queryKey:U.issues.detail(v)}),e.invalidateQueries({queryKey:U.issues.activity(v)}),e.invalidateQueries({queryKey:U.issues.runs(v)}),l?.runLifecycleEvent&&e.invalidateQueries({queryKey:U.issues.queuedComments(v)}),g||(e.invalidateQueries({queryKey:U.issues.liveRuns(v)}),e.invalidateQueries({queryKey:U.issues.activeRun(v)})),h&&(e.invalidateQueries({queryKey:U.issues.comments(v)}),e.invalidateQueries({queryKey:U.issues.attachments(v)}),e.invalidateQueries({queryKey:U.issues.workProducts(v)}),e.invalidateQueries({queryKey:U.issues.workProductPullRequestRefresh(v)}),e.invalidateQueries({queryKey:["issues","tree-control-state",v]}));return!0}r(dk,"invalidateVisibleIssueRunQueries");function nc(e,t){return Object.prototype.hasOwnProperty.call(e,t)}r(nc,"hasPatchKey");function DA(e,t){return e.id!==t.runId?e:{...e,...nc(t,"message")?{currentStatusMessage:t.message}:{},...nc(t,"updatedAt")?{currentStatusUpdatedAt:t.updatedAt}:{},...nc(t,"currentToolName")?{currentToolName:t.currentToolName}:{},...nc(t,"lastAssistantSnippet")?{lastAssistantSnippet:t.lastAssistantSnippet}:{},...nc(t,"lastEventAt")?{lastEventAt:t.lastEventAt}:{}}}r(DA,"applyRunLiveStatusPatch");function fk(e,t){if(!e)return e;let i=!1;const l=e.map(c=>c.id!==t.runId?c:(i=!0,DA(c,t)));return i?l:e}r(fk,"applyRunLiveStatusPatchToArray");function vq(e,t,i){const l=be(e.runId);if(!l)return null;const c={runId:l,agentId:be(e.agentId),issueId:be(e.issueId)};if(i==="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(i==="heartbeat.run.log")return c.lastEventAt=be(e.ts)??t,c;if(i==="heartbeat.run.event"){const u=be(e.message);u&&(c.message=u),c.updatedAt=be(e.updatedAt)??t;const m=be(e.currentToolName);m&&(c.currentToolName=m);const f=be(e.lastAssistantSnippet);return f&&(c.lastAssistantSnippet=f),c.lastEventAt=be(e.lastEventAt)??t,c}return null}r(vq,"readRunLiveStatusPatchFromPayload");var yq=1e3;function jq(e=yq){const t=new Map,i=new Map,l=r(c=>{const u=t.get(c);if(!u){i.delete(c);return}t.delete(c),i.set(c,setTimeout(()=>l(c),e)),u.apply(u.patch)},"release");return{submit:r((c,u)=>{if(i.has(c.runId)){t.set(c.runId,{patch:c,apply:u});return}i.set(c.runId,setTimeout(()=>l(c.runId),e)),u(c)},"submit"),dispose:r(()=>{for(const c of i.values())clearTimeout(c);i.clear(),t.clear()},"dispose")}}r(jq,"createRunLogPatchThrottle");function wq(e,t,i,l,c){let u=!1;e.setQueryData(U.liveRuns(t),h=>{const g=fk(h,l);return g!==h&&(u=!0),g});const m=new Set;if(l.issueId)for(const h of ax(e,t,l.issueId,null))m.add(h);const f=or(e,i,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)m.add(h);for(const h of m)e.setQueryData(U.issues.activeRun(h),g=>!g||g.id!==l.runId?g:(u=!0,DA(g,l))),e.setQueryData(U.issues.liveRuns(h),g=>{const v=fk(g,l);return v!==g&&(u=!0),v});return u}r(wq,"applyRunLiveStatusPatchToCaches");function kq(e,t,i,l){const c=or(e,t,l);if(!c)return!1;const u=be(i.agentId);return!!u&&(u===c.assigneeAgentId||c.subtreeAgentIds.has(u))}r(kq,"shouldSuppressAgentStatusToastForVisibleIssue");function Sq(e,t,i,l){const c=be(i.entityType),u=be(i.entityId),m=be(i.actorType),f=be(i.action),h=Xr(i.details);if(c!=="issue"||!u||m!=="agent"&&m!=="system"||f!=="issue.updated"||be(h?.source)==="comment")return!1;const g=or(e,t,l);return g?$f(g.issueRefs,Uf(u,h)):!1}r(Sq,"shouldDeferIssueRefetchForVisibleAgentActivity");function MA(e,t,i,l){const c=be(i.entityType),u=be(i.entityId),m=be(i.action),f=Xr(i.details);if(c!=="issue"||!u||m!=="issue.comment_added")return!1;const h=or(e,t,l);return h?$f(h.issueRefs,Uf(u,f)):!1}r(MA,"shouldDeferVisibleIssueCommentActivity");async function Nq(e,t,i,l){const c=be(i.entityType),u=be(i.action),m=Xr(i.details),f=be(m?.commentId);if(c!=="issue"||u!=="issue.comment_added"||!f)return!1;const h=or(e,t,l);if(!h)return!1;const g=be(i.entityId);if(!g||!$f(h.issueRefs,Uf(g,m)))return!1;try{const v=await hn.getComment(h.routeIssueRef,f);for(const y of h.issueRefs)e.setQueryData(U.issues.comments(y),j=>j?{...j,pages:ME(j.pages,v)}:{pages:[[v]],pageParams:[null]});return!0}catch{for(const v of h.issueRefs)e.invalidateQueries({queryKey:U.issues.comments(v)});return!1}}r(Nq,"hydrateVisibleIssueComment");var Cq=new Set(["issue.created","issue.updated","issue.comment_added"]),mk=new Set(["issue.document_created","issue.document_updated","issue.document_restored","issue.document_deleted"]),Aq=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"]),_q=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"]),Eq=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"]),Iq=new Set(["error"]),Tq=new Set(["failed","timed_out","cancelled"]);function Rq(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 i=be(e.reopenedFrom);t.push(i?`reopened from ${i.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(Rq,"describeIssueUpdate");function Dq(e,t,i,l){const c=be(i.entityType),u=be(i.entityId),m=be(i.action),f=Xr(i.details),h=be(i.actorId),g=be(i.actorType);if(c!=="issue"||!u||!m||!Cq.has(m))return null;const v=gq(e,t,u,f),y=be(be(i.actorName)?.trim())??hq(e,t,g,h),j=g==="agent"&&h?e.getQueryData(U.agents.list(t))?.find(K=>K.id===h)??e.getQueryData(U.agents.detail(h)):void 0,k=g==="user"&&h?e.getQueryData(U.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:i.actorImage!==void 0?be(i.actorImage):k?.image,appearance:g==="agent"?eE(i.actorAppearance!==void 0?i.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(m==="issue.created")return{actor:S,title:`${y} created ${v.ref}`,body:v.title?zr(v.title,96):void 0,tone:"success",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${m}:${u}`};if(m==="issue.updated"){if(be(f?.source)==="comment")return null;const K=Rq(f),P=K?v.title?`${zr(v.title,64)} - ${K}`:K:v.title?zr(v.title,96):v.label;return{actor:S,title:`${y} updated ${v.ref}`,body:zr(P,100),tone:"info",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${m}:${u}`}}const N=be(f?.commentId),_=be(f?.bodySnippet),I=f?.reopened===!0,D=f?.updated===!0,T=be(f?.reopenedFrom),C=I?T?`reopened from ${T.replace(/_/g," ")}`:"reopened":null,M=I?`${y} reopened and commented on ${v.ref}`:D?`${y} commented and updated ${v.ref}`:`${y} commented on ${v.ref}`,z=_?C?`${C} - ${_.replace(/^#+\s*/m,"").replace(/\n/g," ")}`:_.replace(/^#+\s*/m,"").replace(/\n/g," "):C?v.title?`${C} - ${v.title}`:C:v.title??void 0;return{actor:S,title:M,body:z?zr(z,96):void 0,tone:"info",action:{label:`View ${v.ref}`,href:v.href},dedupeKey:`activity:${m}:${u}:${N??"na"}`}}r(Dq,"buildActivityToast");function Mq(e){const t=be(e.entityType),i=be(e.action),l=be(e.entityId),c=Xr(e.details);return t!=="join_request"||!i||!l||i!=="join.requested"&&i!=="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(Mq,"buildJoinRequestToast");function Oq(e,t,i,l){const c=be(e.agentId),u=be(e.status);if(!c||!u||!Iq.has(u))return null;const m=u==="error"?"error":"info",f=t(c)??`Agent ${of(c)}`;return{title:u==="running"?`${f} started`:`${f} errored`,body:i.getQueryData(U.agents.list(l))?.find(h=>h.id===c)?.title??void 0,tone:m,action:{label:"View agent",href:`/agents/${c}`},dedupeKey:`agent-status:${c}:${u}`}}r(Oq,"buildAgentStatusToast");function Lq(e,t){const i=be(e.runId),l=be(e.agentId),c=be(e.status);if(!i||!l||!c||!Tq.has(c))return null;const u=be(e.error),m=be(e.errorCode);if(m==="operator_interrupted"||m==="workspace_busy")return null;const f=be(e.contextSource),h=be(e.triggerDetail),g=t(l)??"Agent";if(c==="failed"&&m==="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:${i}:${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=zr(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/${i}`},dedupeKey:`run-status:${i}:${c}`}}r(Lq,"buildRunStatusToast");function zq(e,t,i){const l=be(i.runId),c=be(i.status);if(!l||!c)return!1;if(e.setQueryData(U.runDetail(l),m=>{if(!m)return m;const f=r(h=>Object.prototype.hasOwnProperty.call(i,h),"has");return{...m,status:c,...f("invocationSource")?{invocationSource:be(i.invocationSource)??m.invocationSource}:{},...f("triggerDetail")?{triggerDetail:be(i.triggerDetail)}:{},...f("error")?{error:be(i.error)}:{},...f("errorCode")?{errorCode:be(i.errorCode)}:{},...f("startedAt")?{startedAt:be(i.startedAt)}:{},...f("finishedAt")?{finishedAt:be(i.finishedAt)}:{}}}),Ec.has(c))return e.setQueryData(U.liveRuns(t),m=>Z8(m,l)),!0;let u=!1;return e.setQueryData(U.liveRuns(t),m=>{const f=J8(m,l,c);return u=f.present,f.next}),u}r(zq,"applyRunLifecycleToCompanyLiveRuns");function Pq(e,t,i){const l=be(i.status);l&&Ec.has(l)&&e.invalidateQueries({queryKey:U.heartbeats(t),refetchType:"none"}),e.invalidateQueries({queryKey:U.agents.list(t)}),e.invalidateQueries({queryKey:U.dashboard(t)}),e.invalidateQueries({queryKey:["costs",t]}),e.invalidateQueries({queryKey:U.sidebarBadges(t)});const c=be(i.agentId);c&&(e.invalidateQueries({queryKey:U.agents.detail(c)}),e.invalidateQueries({queryKey:U.heartbeats(t,c)}));const u=be(i.runId);u&&e.invalidateQueries({queryKey:U.runDetail(u)})}r(Pq,"invalidateHeartbeatQueries");function Uq(e,t,i){const l=be(i.agentId);l&&e.invalidateQueries({queryKey:U.agents.detail(l)})}r(Uq,"invalidateHeartbeatProgressQueries");var $q=new Set(["approval","attention_source","budget_incident","decision","decision_queue","issue_recovery_action","join_request"]),Bq=["issue.blockers_","issue.dependency_recovery_","issue.disposition_repair_","issue.execution_recovery_","issue.interaction_","issue.recovery_action_","issue.stalled_review_","issue.thread_interaction_"],Kq=new Set(["failed","timed_out"]);function qq(e,t,i){return t?.startsWith("inbox.")||e&&$q.has(e)?!0:e!=="issue"||!t?!1:Bq.some(l=>t.startsWith(l))||t==="issue.reviewers_updated"||t==="issue.status_decision_recorded"?!0:(t==="issue.created"||t==="issue.updated")&&(i?.status!==void 0||i?.blockedByIssueIds!==void 0)}r(qq,"activityChangesAttention");function pk(e,t,i,l){return e.getQueriesData({queryKey:U.attention(t)}).some(([,c])=>c?"items"in c?Array.isArray(c.items)&&c.items.some(i):"count"in c&&l(c):!1)}r(pk,"cachedAttentionIncludes");function Bg(e,t){e.invalidateQueries({queryKey:U.attention(t)})}r(Bg,"invalidateAttentionQueries");function Fq(e,t,i,l,c){e.invalidateQueries({queryKey:U.activity(t)}),e.invalidateQueries({queryKey:U.dashboard(t)}),e.invalidateQueries({queryKey:U.sidebarBadges(t)});const u=be(i.entityType),m=be(i.entityId),f=be(i.action),h=be(i.actorType),g=be(i.actorId),v=Xr(i.details),y=h==="user"&&!!l.userId&&g===l.userId||h==="agent"&&!!l.agentId&&g===l.agentId;if(qq(u,f,v)&&Bg(e,t),u==="decision"&&(e.invalidateQueries({queryKey:["decisions",t]}),m&&e.invalidateQueries({queryKey:U.decisions.detail(m)})),(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:U.resourceMemberships.mine(t)})}if(u==="issue"){const j=U.agentChats.list(t,l.userId);if((m&&e.getQueryData(j)?.some(k=>k.id===m)||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"]}),m&&uK(e,t,m,lK(f,v,c?.occurredAt??null)),dK(e,t),vI(e,t,i),m){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&&Sq(e,c.pathname,i,{isForegrounded:c.isForegrounded}),N=!!c?.pathname&&MA(e,c.pathname,i,{isForegrounded:c.isForegrounded}),_=ax(e,t,m,v);for(const I of _){const D=k||S||N?{refetchType:"inactive"}:void 0;if(e.invalidateQueries({queryKey:U.issues.detail(I),...D}),e.invalidateQueries({queryKey:U.issues.activity(I),...D}),(f==="issue.comment_added"||f==="issue.conversation_session_started")&&e.invalidateQueries({queryKey:U.issues.comments(I),...D}),(f==="issue.comment_added"||f?.startsWith("issue.queued_comment"))&&e.invalidateQueries({queryKey:U.issues.queuedComments(I)}),(f?.startsWith("issue.attachment_")||f?.startsWith("issue.work_product_"))&&(e.invalidateQueries({queryKey:U.issues.attachments(I)}),e.invalidateQueries({queryKey:U.issues.workProducts(I)})),f==="issue.conversation_session_started"&&(e.invalidateQueries({queryKey:["issues","tree-control-state",I]}),e.invalidateQueries({queryKey:U.issues.interactions(I)})),f&&mk.has(f)){const T=be(v?.key);e.invalidateQueries({queryKey:U.issues.documents(I),...D}),T?(e.invalidateQueries({queryKey:U.issues.document(I,T),...D}),e.invalidateQueries({queryKey:U.issues.documentRevisions(I,T),...D})):(e.invalidateQueries({queryKey:["issues","document",I],...D}),e.invalidateQueries({queryKey:["issues","document-revisions",I],...D}))}if(f&&(mk.has(f)||Aq.has(f))){const T=be(v?.key)??be(v?.documentKey);e.invalidateQueries({queryKey:T?["issues","document-annotations",I,T]:["issues","document-annotations",I],...D})}(f?.startsWith("issue.thread_interaction_")||(f==="issue.updated"||f==="issue.status_decision_recorded")&&be(v?.source)==="native_status_decision")&&(e.invalidateQueries({queryKey:U.issues.interactions(I)}),e.invalidateQueries({queryKey:U.tools.actionRequests(t,"pending")}),e.invalidateQueries({queryKey:U.apps.attention(t)}),e.invalidateQueries({queryKey:U.tools.trustRules(t)}))}}return}if(u==="agent"){e.invalidateQueries({queryKey:U.agents.list(t)}),e.invalidateQueries({queryKey:U.org(t)}),m&&(e.invalidateQueries({queryKey:U.agents.detail(m)}),e.invalidateQueries({queryKey:U.heartbeats(t,m)}));return}if(u==="project"){const j=be(i.details?.sourceIssueId);j&&e.invalidateQueries({queryKey:U.issues.activity(j)}),e.invalidateQueries({queryKey:U.projects.all(t)}),m&&e.invalidateQueries({queryKey:U.projects.detail(m)});return}if(u==="company_skill"){const j=be(i.details?.sourceIssueId);j&&e.invalidateQueries({queryKey:U.issues.activity(j)}),m&&e.invalidateQueries({queryKey:U.companySkills.detail(t,m)}),e.invalidateQueries({queryKey:U.companySkills.list(t)});return}if(u==="goal"){e.invalidateQueries({queryKey:U.goals.list(t)}),m&&e.invalidateQueries({queryKey:U.goals.detail(m)});return}if(u==="approval"){e.invalidateQueries({queryKey:U.approvals.list(t)});return}if(u==="join_request"){e.invalidateQueries({queryKey:U.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:U.usageWindowSpend(t)});return}if(u==="routine"||u==="routine_trigger"||u==="routine_run"){if(e.invalidateQueries({queryKey:["routines"]}),u==="routine"&&f&&_q.has(f)&&m){const j=be(v?.key)??be(v?.documentKey)??"description",k=y?{refetchType:"inactive"}:void 0;e.invalidateQueries({queryKey:["routines","document-annotations",m,j],...k})}return}if(u==="case"){if(e.invalidateQueries({queryKey:U.cases.list(t)}),m&&(e.invalidateQueries({queryKey:U.cases.detail(m)}),e.invalidateQueries({queryKey:U.cases.events(m)}),f&&Eq.has(f))){const j=be(v?.key)??be(v?.documentKey),k=y?{refetchType:"inactive"}:void 0;e.invalidateQueries({queryKey:j?["cases","document-annotations",m,j]:["cases","document-annotations",m],...k})}return}if(u==="summary_slot"){const j=be(v?.scopeKind),k=be(v?.slotKey),S=be(v?.scopeId);j&&k&&(e.invalidateQueries({queryKey:U.summarySlots.detail(t,j,k,S)}),e.invalidateQueries({queryKey:U.summarySlots.revisions(t,j,k,S)}));return}u==="company"&&e.invalidateQueries({queryKey:U.companies.all})}r(Fq,"invalidateActivityQueries");function Hq(e,t){const i=t.payload??{},l=be(i.runId),c=be(i.status);if(!l||!c||!Ec.has(c))return!1;const u=`${t.companyId}:${l}:${c}`,m=e.observedRunOutcomes.has(u);e.observedRunOutcomes.delete(u),e.observedRunOutcomes.add(u),e.observedRunOutcomes.size>cq&&e.observedRunOutcomes.delete(e.observedRunOutcomes.values().next().value);const f=Date.parse(be(i.finishedAt)??""),h=Date.parse(t.createdAt);return m||h-f>oq}r(Hq,"observeRunOutcome");function Vq(e,t){const i=Date.now();if(i<e.suppressUntil)return!0;const l=e.cooldownHits.get(t);if(!l)return!1;const c=l.filter(u=>i-u<iq);return e.cooldownHits.set(t,c),c.length>=rq}r(Vq,"shouldSuppressToast");function Wq(e,t){const i=Date.now(),l=e.cooldownHits.get(t)??[];l.push(i),e.cooldownHits.set(t,l)}r(Wq,"recordToastHit");function Ih(e,t,i,l){Vq(e,i)||t(l)!==null&&Wq(e,i)}r(Ih,"gatedPushToast");function Qq(e,t,i,l,c,u,m,f){if(l.companyId!==t)return;const h=r(k=>TA(e,t,k),"nameOf"),g=l.payload??{},v=l.type==="heartbeat.run.status"&&(Hq(u,l)||bq(e,i,g)),y=vq(g,l.createdAt,l.type);let j=!1;if(y){const k=r(S=>{j=wq(e,t,i,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=zq(e,t,g);if(Pq(e,t,g),tk(e,l),k||e.invalidateQueries({queryKey:U.liveRuns(t)}),dk(e,i,g,{runLifecycleEvent:!0}),(l.type==="heartbeat.run.status"&&Kq.has(be(g.status)??"")||l.type==="heartbeat.run.queued"&&pk(e,t,S=>S.sourceKind==="failed_run",S=>(S.countsBySourceKind?.failed_run??0)>0))&&Bg(e,t),l.type==="heartbeat.run.status"){const S=Lq(g,h);S&&!v&&Ih(u,c,"run-status",S)}return}if(l.type==="heartbeat.run.progress"){Uq(e,t,g),dk(e,i,g,{liveStatusAlreadyPatched:j});return}if(l.type==="heartbeat.run.event"){tk(e,l);return}if(l.type==="agent.status"){e.invalidateQueries({queryKey:U.agents.list(t)}),e.invalidateQueries({queryKey:U.dashboard(t)}),e.invalidateQueries({queryKey:U.org(t)});const k=be(g.agentId);k&&e.invalidateQueries({queryKey:U.agents.detail(k)}),(be(g.status)==="error"||k&&pk(e,t,N=>N.sourceKind==="agent_error_alert"&&N.subject?.id===k,N=>N.errorAgentIds?.includes(k)===!0))&&Bg(e,t);const S=Oq(g,h,e,t);S&&!kq(e,i,g)&&Ih(u,c,"agent-status",S);return}if(l.type==="activity.logged"){Fq(e,t,g,m,{pathname:i,occurredAt:l.createdAt??null}),MA(e,i,g)&&Nq(e,i,g);const k=be(g.action),S=Dq(e,t,g,m)??Mq(g);S&&!xq(e,i,g)&&Ih(u,c,`activity:${k??"unknown"}`,S)}}}r(Qq,"handleLiveEvent");function Gq(e,t){return e&&e===t?e:null}r(Gq,"resolveLiveCompanyId");function hk(e){e.onopen=null,e.onmessage=null,e.onerror=null,e.onclose=null}r(hk,"resetSocketHandlers");function gk(e,t){if(e){if(e.readyState===dq){e.onopen=()=>{hk(e),e.close(1e3,t)},e.onmessage=null,e.onerror=()=>{},e.onclose=null;return}hk(e),e.readyState===fq&&e.close(1e3,t)}}r(gk,"closeSocketQuietly");function Yq(e,t,i){return e==="success"&&(t||i==="local_trusted")}r(Yq,"canUseLiveSession");function Xq({children:e}){const{visible:t}=$k(),i=(0,x.useRef)(!t),{selectedCompanyId:l,selectedCompany:c}=vt(),u=wn(),{pushToast:m}=Ni(),f=vn(),h=(0,x.useRef)({cooldownHits:new Map,suppressUntil:0,observedRunOutcomes:new Set}),g=(0,x.useRef)(f.pathname),{data:v,status:y}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),{data:j}=ge({queryKey:U.health,queryFn:Rc.get}),k=v?.user?.id??v?.session?.userId??(j?.deploymentMode==="local_trusted"?"local-board":null),S=v?.session?.id??k??"signed_out",N=Gq(l,c?.id??null),_=Yq(y,v!=null,j?.deploymentMode)&&N!==null,I=(0,x.useRef)({userId:k,agentId:null}),D=(0,x.useRef)(new Set),T=(0,x.useCallback)(P=>(D.current.add(P),()=>{D.current.delete(P)}),[]),C=(0,x.useMemo)(()=>({subscribe:T}),[T]),M=(0,x.useMemo)(()=>G8(u),[u]),z=(0,x.useMemo)(()=>X8(u,M),[u,M]),K=(0,x.useMemo)(()=>jq(),[]);return(0,x.useEffect)(()=>()=>{M.dispose(),K.dispose()},[M,K]),(0,x.useEffect)(()=>{g.current=f.pathname},[f.pathname]),(0,x.useEffect)(()=>{I.current={userId:k,agentId:null}},[k]),(0,x.useEffect)(()=>{if(!t||!_||!N)return;const P=window.setInterval(()=>{fK(u,N)},nK);return()=>window.clearInterval(P)},[_,N,u,t]),(0,x.useEffect)(()=>{if(!t){i.current=!0,M.dispose(),K.dispose();return}if(!_||!N)return;i.current&&(i.current=!1,u.invalidateQueries({type:"active"},{cancelRefetch:!1}));let P=!1,A=0,B=null,O=null,W=null;const Y=r(()=>{B!==null&&(window.clearTimeout(B),B=null)},"clearReconnect"),ce=r(()=>{O!==null&&(window.clearInterval(O),O=null)},"stopPolling"),oe=r(()=>{P||O!==null||(O=window.setInterval(()=>{u.invalidateQueries({type:"active"},{cancelRefetch:!1})},uq))},"startPolling"),$=r(()=>{if(P||B!==null)return;A+=1;const ue=Math.min(15e3,1e3*2**Math.min(A-1,4));B=window.setTimeout(()=>{B=null,R()},ue)},"scheduleReconnect"),R=r(()=>{if(P)return;const ue=xK(`/api/companies/${encodeURIComponent(N)}/events/ws`),ae=bK(ue);if(!ae){oe(),$();return}W=ae,ae.onopen=()=>{if(P||W!==ae){gk(ae,"stale_connection");return}ce(),A>0&&(h.current.suppressUntil=Date.now()+lq),u.invalidateQueries({type:"active"},{cancelRefetch:!1}),A=0},ae.onmessage=Ee=>{if(!ff().visible)return;const fe=typeof Ee.data=="string"?Ee.data:"";if(fe)try{const Ae=JSON.parse(fe);if(Qq(z,N,g.current,Ae,m,h.current,{userId:I.current.userId,agentId:I.current.agentId},K),mq(D.current,N,Ae),Ae.type==="notification.created"){const Ce=sq(Ae.payload);Ce&&tq(Ce,I.current.userId)}}catch{}},ae.onerror=()=>{},ae.onclose=()=>{W===ae&&(W=null,!P&&(oe(),$()))}},"connect"),ne=window.setTimeout(R,0);return()=>{P=!0,window.clearTimeout(ne),Y(),ce();const ue=W;W=null,gk(ue,"provider_unmount")}},[t,M,K,u,z,N,m,_,S]),(0,s.jsx)(IA.Provider,{value:C,children:e})}r(Xq,"LiveUpdatesProvider");function Zq(e){let t=Vr();ik(t),$g(t,e.userId);const i=SA(()=>{const u=Vr();u!==t&&(t=u,ik(u),$g(u,e.userId))}),l=typeof navigator<"u"&&"serviceWorker"in navigator?navigator.serviceWorker:null,c=r(u=>{const m=aq(u.data);m&&(m.type==="navigate"?e.navigate(m.url):nq(m.notification))},"onMessage");return l?.addEventListener("message",c),l?.startMessages(),()=>{i(),l?.removeEventListener("message",c)}}r(Zq,"startNotificationRuntime");function Jq(){const e=bs(),t=(0,x.useRef)(e),{data:i}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),l=i?.user?.id??i?.session?.userId??null;return(0,x.useEffect)(()=>{t.current=e},[e]),(0,x.useEffect)(()=>{if(l)return Zq({userId:l,navigate:r(c=>t.current(c),"navigate")})},[l]),null}r(Jq,"NotificationRuntime");var e7=36e5,t7=3e3,n7=2e3,xk="wardmote.skip-waiting",s7="wardmote.build-id",OA=null,Kg=new Set;function a7(e){OA=e;for(const t of Kg)t()}r(a7,"publishUpdate");function i7(e){return Kg.add(e),()=>{Kg.delete(e)}}r(i7,"subscribe");function r7(){return(0,x.useSyncExternalStore)(i7,()=>OA,()=>null)}r(r7,"useServiceWorkerUpdate");function l7(e){return new Promise(t=>{const i=new MessageChannel,l=r(u=>{clearTimeout(c),i.port1.close(),t(u)},"finish"),c=setTimeout(()=>l(null),n7);i.port1.onmessage=u=>{l(typeof u.data?.buildId=="string"?u.data.buildId:null)},e.postMessage({type:s7},[i.port2])})}r(l7,"requestWorkerBuildId");function o7(e={}){const t=e.container??(typeof navigator<"u"&&"serviceWorker"in navigator?navigator.serviceWorker:void 0);if(!t)return()=>{};const i=e.documentRef??document,l=e.reload??(()=>window.location.reload()),c=e.updateIntervalMs??e7,u=e.onUpdateReady??a7;let m=!!t.controller,f=!1,h=!1,g,v=!1;const y=r(async C=>e.pageBuildId?await l7(C)!==e.pageBuildId:!0,"servesNewerBuild"),j=r(()=>{h||(h=!0,g!==void 0&&clearTimeout(g),l())},"reloadOnce"),k=r(async C=>{const M=await y(C);if(!v){if(!M){C.postMessage({type:xk});return}u(()=>{f=!0,C.postMessage({type:xk}),g=setTimeout(j,t7)})}},"offerWaiting"),S=r(()=>{if(!m){m=!0;return}if(f){j();return}const C=t.controller;C&&y(C).then(M=>{M&&!v&&!f&&u(j)})},"onControllerChange");t.addEventListener("controllerchange",S);let N;const _=r(()=>{const C=N?.installing;C&&C.addEventListener("statechange",()=>{C.state==="installed"&&t.controller&&k(C)})},"watchInstalling"),I=r(()=>{N?.update().catch(()=>{})},"checkForUpdates"),D=r(()=>{i.visibilityState==="visible"&&I()},"onVisibilityChange");i.addEventListener("visibilitychange",D);const T=setInterval(I,c);return t.register("/sw.js").then(C=>{N=C,C.waiting&&t.controller&&k(C.waiting),C.addEventListener("updatefound",_)}).catch(()=>{}),()=>{v=!0,t.removeEventListener("controllerchange",S),i.removeEventListener("visibilitychange",D),N?.removeEventListener("updatefound",_),clearInterval(T),g!==void 0&&clearTimeout(g)}}r(o7,"startServiceWorkerUpdates");var LA="wardmote.notifications.asked-after-decision";function c7(){try{return window.localStorage.getItem(LA)==="1"}catch{return!0}}r(c7,"alreadyAsked");function u7(){try{window.localStorage.setItem(LA,"1")}catch{return}}r(u7,"markAsked");async function d7(e){const t=await jK();if(t!=="granted")return t;const i=kA(l=>({...l,enabled:!0,pushEnabled:!0}));return e&&await $g(i,e),t}r(d7,"enableNotificationsAfterDecision");function f7(){const{pushToast:e}=Ni(),{data:t}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),retry:!1}),i=t?.user?.id??t?.session?.userId??null;(0,x.useEffect)(()=>lE(()=>{c7()||!tx()||nx()!=="default"||(u7(),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(()=>{d7(i)},"onClick")}}))}),[e,i])}r(f7,"useFirstDecisionNotificationPrompt");var m7="wardmote-update-ready";function p7(){const{pushToast:e}=Ni(),t=r7(),i=wn(),l=e0(),c=(0,x.useRef)(l);return(0,x.useEffect)(()=>{t&&e({id:m7,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,i.invalidateQueries())},[l,i]),f7(),null}r(p7,"PwaRuntime");var zA={get:r(e=>we.get(`/companies/${e}/primary-agent/me`),"get"),set:r((e,t)=>we.put(`/companies/${e}/primary-agent/me`,t),"set")};function h7(e){const t=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),i=t.data?.user?.id??t.data?.session?.userId??"local-board",l=ge({queryKey:U.primaryAgent.mine(e??"__none__",i),queryFn:r(()=>zA.get(e),"queryFn"),enabled:!!e&&t.isSuccess});return{...l,userId:i,loading:!!e&&(t.isPending||l.isPending&&!t.error),error:t.error??l.error,retry:r(()=>t.isError?t.refetch():l.refetch(),"retry")}}r(h7,"usePrimaryAgent");function g7({children:e}){const{selectedCompanyId:t}=vt(),i=h7(t),l=wn(),{pushToast:c}=Ni(),u=(0,x.useRef)({companyId:t,userId:i.userId});u.current={companyId:t,userId:i.userId};const m=r(j=>U.primaryAgent.mine(j.companyId,j.userId),"keyFor"),f=r(j=>j.companyId===u.current.companyId&&j.userId===u.current.userId,"isCurrentScope"),h=ge({queryKey:U.agents.list(t),queryFn:r(()=>$s.list(t),"queryFn"),enabled:!!t}),g=Kt({mutationFn:r(j=>zA.set(j.companyId,{primaryAgentId:j.agentId}),"mutationFn"),onMutate:r(async j=>{const k=m(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(m(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(m(k),j),"onSuccess"),onSettled:r((j,k,S)=>{l.invalidateQueries({queryKey:m(S)}),l.invalidateQueries({queryKey:U.resourceMemberships.mine(S.companyId)})},"onSettled")}),v=h.data?.find(j=>j.id===i.data?.primaryAgentId&&j.status!=="terminated")??null,y=i.error??h.error;return(0,s.jsx)(MM,{value:t?{companyId:t,primaryAgentId:v?.id??null,primaryAgent:v,loading:i.loading||h.isPending,error:y?.message,onRetry:r(()=>{i.retry(),h.refetch()},"onRetry"),pendingAgentId:g.isPending&&f(g.variables)?g.variables.agentId:null,onChange:r(j=>g.mutate({companyId:t,userId:i.userId,agentId:j}),"onChange")}:null,children:e})}r(g7,"PrimaryAgentProvider");var bk="min-h-9",x7={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 OG(e,t){const i={name:"",path:"",kind:"dir",children:[]};for(const c of Object.keys(e)){const u=c.split("/").filter(Boolean);let m=i,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=m.children.find(j=>j.name===g);y||(y={name:g,path:f,kind:v?"file":"dir",children:[],action:v?t?.get(c)??null:null},m.children.push(y)),m=y}}function l(c){c.children.sort((u,m)=>u.kind!==m.kind?u.kind==="file"?-1:1:u.name.localeCompare(m.name)),c.children.forEach(l)}return r(l,"sortNode"),l(i),i.children}r(OG,"buildFileTree");function b7(e){let t=0;for(const i of e)i.kind==="file"?t++:t+=b7(i.children);return t}r(b7,"countFiles");function PA(e,t="all"){const i=new Set;for(const l of e){(t==="all"||l.kind===t)&&i.add(l.path);for(const c of PA(l.children,t))i.add(c)}return i}r(PA,"collectAllPaths");function v7(e){return e.endsWith(".yaml")||e.endsWith(".yml")?vS:yS}r(v7,"fileIcon");function UA(e,t,i=0){const l=[];for(const c of e)l.push({node:c,depth:i}),c.kind==="dir"&&t.has(c.path)&&l.push(...UA(c.children,t,i+1));return l}r(UA,"flattenVisibleNodes");function y7(e,t){if(e.kind==="file")return{allChecked:t.has(e.path),someChecked:!1};const i=[...PA(e.children,"file")],l=i.length>0&&i.every(c=>t.has(c));return{allChecked:l,someChecked:i.some(c=>t.has(c))&&!l}}r(y7,"checkboxState");function LG(e){const t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?([\s\S]*)$/);if(!t)return null;const i={},l=t[1],c=t[2];let u=null,m=null;for(const f of l.split(`
|
|
59
|
-
`)){const h=f.trim();if(!h||h.startsWith("#"))continue;if(h.startsWith("- ")&&u){m||(m=[]),m.push(h.slice(2).trim().replace(/^["']|["']$/g,""));continue}u&&m&&(i[u]=m,m=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?(i[v]=y,u=null):u=v}}return u&&m&&(i[u]=m),Object.keys(i).length>0?{data:i,body:c}:null}r(LG,"parseFrontmatter");var zG={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 j7({nodes:e,selectedFile:t,expandedDirs:i,checkedFiles:l,onToggleDir:c,onSelectFile:u,onToggleCheck:m,fileBadges:f,fileTones:h,renderFileExtra:g,renderLabel:v,checkboxLabel:y,getCheckboxState:j,renderNodeExtra:k,visiblePaths:S,disabled:N=!1,fileRowClassName:_,layout:I="default",showCheckboxes:D=!0,wrapLabels:T=!0,loading:C=!1,error:M,empty:z,ariaLabel:K="Files"}){const P=l??new Set,A=(0,x.useMemo)(()=>UA(e,i).filter(({node:R})=>!S||S.has(R.path)),[i,e,S]),[B,O]=(0,x.useState)(null),W=(0,x.useRef)(new Map),Y=A.some(({node:R})=>R.path===B)?B:A[0]?.node.path;function ce(R){O(R),window.requestAnimationFrame(()=>{W.current.get(R)?.focus()})}r(ce,"focusPath");function oe(R){N||(R.kind==="dir"?c(R.path):u(R.path))}r(oe,"toggleNode");function $(R,ne,ue){if(!N)switch(R.key){case"ArrowDown":{R.preventDefault();const ae=A[Math.min(ne+1,A.length-1)];ae&&ce(ae.node.path);break}case"ArrowUp":{R.preventDefault();const ae=A[Math.max(ne-1,0)];ae&&ce(ae.node.path);break}case"ArrowRight":ue.kind==="dir"&&!i.has(ue.path)&&(R.preventDefault(),c(ue.path));break;case"ArrowLeft":ue.kind==="dir"&&i.has(ue.path)&&(R.preventDefault(),c(ue.path));break;case"Enter":R.preventDefault(),oe(ue);break;case" ":D&&m&&j?.(ue)!==null&&(R.preventDefault(),m(ue.path,ue.kind))}}return r($,"handleRowKeyDown"),C?(0,s.jsx)("div",{"aria-busy":"true","aria-label":K,role:"tree",className:"py-1",children:[0,1,2,3].map(R=>(0,s.jsxs)("div",{className:X("flex items-center gap-2 px-4",bk),children:[(0,s.jsx)(lt,{className:"h-4 w-4 shrink-0 rounded-sm"}),(0,s.jsx)(lt,{className:X("h-3.5",R===1?"w-3/5":"w-4/5")})]},R))}):M?(0,s.jsx)("div",{"aria-label":K,role:"tree",className:"p-3",children:(0,s.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,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,s.jsx)(Bn,{variant:"ghost",className:X("px-2.5",Id.error??"bg-bg-3 text-ink-3"),children:"error"}),(0,s.jsx)("span",{className:"min-w-0 text-bad",children:M.message})]}),M.retry&&(0,s.jsx)(le,{type:"button",size:"xs",variant:"secondary",onClick:M.retry,children:"Retry"})]})}):A.length===0?(0,s.jsx)("div",{"aria-label":K,role:"tree",className:"p-3",children:(0,s.jsxs)("div",{className:"rounded-md border border-dashed border-line px-4 py-8 text-center",children:[(0,s.jsx)("div",{className:"text-sm font-medium",children:z?.title??"No files"}),(0,s.jsx)("div",{className:"mt-1 text-xs text-ink-3",children:z?.description??"Files will appear here when they are available."})]})}):(0,s.jsx)("div",{"aria-label":K,role:"tree",children:A.map(({node:R,depth:ne},ue)=>{const ae=R.kind==="dir"&&i.has(R.path),Ee=j?.(R),fe=D&&Ee!==null,{allChecked:Ae,someChecked:Ce}=Ee==null?y7(R,P):{allChecked:Ee==="checked",someChecked:Ee==="mixed"},Se=f?.[R.path],he=h?.[R.path]??"default",De=R.kind==="file"?_?.(R,Ae):void 0,Ye=R.kind==="file"?v7(R.name):null,ze=R.kind==="file"&&R.path===t;return(0,s.jsxs)("div",{ref:r(ve=>{ve?W.current.set(R.path,ve):W.current.delete(R.path)},"ref"),role:"treeitem","aria-level":ne+1,"aria-expanded":R.kind==="dir"?ae:void 0,"aria-selected":R.kind==="file"?ze:void 0,"aria-checked":fe?Ce?"mixed":Ae:void 0,"aria-disabled":N||void 0,tabIndex:Y===R.path?0:-1,className:X(I==="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":R.kind==="dir"?D?"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",I==="explorer"?"h-8":bk,I==="explorer"&&"file-tree-row-explorer",ze&&"text-ink bg-bg-3/20",x7[he],De,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":ne},onFocus:r(()=>O(R.path),"onFocus"),onClick:r(()=>oe(R),"onClick"),onKeyDown:r(ve=>$(ve,ue,R),"onKeyDown"),"data-file-tree-path":R.path,children:[I==="explorer"&&(R.kind==="dir"?(0,s.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(ve=>{ve.stopPropagation(),c(R.path)},"onClick"),"aria-label":ae?`Collapse ${R.name}`:`Expand ${R.name}`,children:ae?(0,s.jsx)(Br,{className:"size-3.5"}):(0,s.jsx)(nr,{className:"size-3.5"})}):(0,s.jsx)("span",{className:"size-4 shrink-0","aria-hidden":"true"})),fe?(0,s.jsx)("label",{className:X("flex items-center",I==="explorer"?"size-4 shrink-0 justify-center":"pl-2"),onClick:r(ve=>ve.stopPropagation(),"onClick"),children:(0,s.jsx)("input",{type:"checkbox","aria-label":y?.(R)??`Select ${R.path}`,disabled:N,checked:Ae,ref:r(ve=>{ve&&(ve.indeterminate=Ce)},"ref"),onChange:r(()=>m?.(R.path,R.kind),"onChange"),className:I==="explorer"?"size-3.5 shrink-0 accent-ink":"mr-2 accent-ink"})}):D&&I==="explorer"?(0,s.jsx)("span",{className:"size-4 shrink-0","aria-hidden":"true"}):null,(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 py-1 text-left",children:[(0,s.jsx)("span",{className:"flex h-4 w-4 shrink-0 items-center justify-center",children:R.kind==="dir"?ae?(0,s.jsx)(jS,{className:"h-3.5 w-3.5"}):(0,s.jsx)(wi,{className:"h-3.5 w-3.5"}):Ye?(0,s.jsx)(Ye,{className:"h-3.5 w-3.5"}):null}),(0,s.jsx)("span",{className:X("min-w-0",I==="explorer"&&"flex-1",T?"break-all leading-4":"truncate"),children:v?v(R):R.name})]}),Se&&(0,s.jsx)(Bn,{variant:"ghost",className:X("ml-3 text-(length:--text-nano) uppercase tracking-wide",Id[Se.status]??"bg-bg-3 text-ink-3"),title:Se.tooltip,children:Se.label}),k?.(R),R.kind==="file"&&g?.(R,Ae),R.kind==="dir"&&I==="default"&&(0,s.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(ve=>{ve.stopPropagation(),c(R.path)},"onClick"),"aria-label":ae?`Collapse ${R.name}`:`Expand ${R.name}`,children:ae?(0,s.jsx)(Br,{className:"h-3.5 w-3.5"}):(0,s.jsx)(nr,{className:"h-3.5 w-3.5"})})]},R.path)})})}r(j7,"FileTree");function w7(e,t){return e.visible?e.focused?t.visibleMs:t.unfocusedMs??t.visibleMs:t.hiddenMs??!1}r(w7,"resolvePollingInterval");function k7(e,t){if(e<=0)return 0;const i=Math.min(Math.max(t(),0),.999999);return Math.round(i*e)}r(k7,"computeStartupJitterMs");function S7(e){const t=$k(),i=(0,x.useRef)(null);i.current===null&&(e.jitter===!1?i.current=0:i.current=k7(Math.min(e.jitterMaxMs??1e3,Math.round(e.visibleMs*.2)),Math.random));const l=i.current;return(0,x.useMemo)(()=>{const c=w7(t,e);return c===!1?!1:c+l},[t,e.visibleMs,e.unfocusedMs,e.hiddenMs,l])}r(S7,"useVisibilityRefetchInterval");var $A={listForIssue:r(e=>we.get(`/issues/${e}/external-objects`),"listForIssue"),getIssueSummary:r(e=>we.get(`/issues/${e}/external-object-summary`),"getIssueSummary"),getIssueSummaries:r((e,t)=>we.post(`/companies/${e}/issues/external-object-summaries`,{issueIds:t}),"getIssueSummaries"),refreshIssueObjects:r((e,t)=>we.post(`/issues/${e}/external-objects/refresh`,t??{}),"refreshIssueObjects"),getProjectSummary:r(e=>we.get(`/projects/${e}/external-object-summary`),"getProjectSummary")};async function N7(e,t){const i={};for(let l=0;l<t.length;l+=500){const c=t.slice(l,l+500),u=await $A.getIssueSummaries(e,c);Object.assign(i,u.summaries)}return{summaries:i}}r(N7,"fetchIssueExternalObjectSummariesInBatches");function C7(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(C7,"formatMentionSourceLabel");function BA(){const e=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn"),retry:!1});return{isEnabled:e.data?.enableExternalObjects===!0,isLoaded:e.data!==void 0||e.isError}}r(BA,"useExternalObjectsFeature");function PG(e){const t=BA(),i=t.isEnabled&&!!e,l=ge({queryKey:U.externalObjects.byIssue(e??"__none__"),queryFn:r(()=>$A.listForIssue(e),"queryFn"),enabled:i,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(C7)));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=_y(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=_y(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]),m=(0,x.useCallback)(()=>{l.refetch()},[l.refetch]);return{isEnabled:t.isEnabled,groups:c,markdownReferences:u,isLoading:i&&l.isLoading,isError:l.isError,refetch:m}}r(PG,"useIssueExternalObjects");function A7(e,t){const i=BA(),l=(0,x.useMemo)(()=>[...new Set(t.filter(m=>m.length>0))].sort(),[t]),c=i.isEnabled&&!!e&&l.length>0,u=ge({queryKey:U.externalObjects.issueSummaries(e??"__none__",l),queryFn:r(()=>N7(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:i.isLoaded&&(!c||u.isSuccess)}}r(A7,"useIssueExternalObjectSummaries");var UG={relevance:"Relevance",updated:"Recently updated",created:"Newest created",priority:"Priority"},_7={"24h":"Last 24 hours","7d":"Last 7 days","30d":"Last 30 days","90d":"Last 90 days"};function KA(e){return _7[e]??`Updated ≤ ${e}`}r(KA,"updatedWithinLabel");var E7=new Set(F_);function $G(e){const t=e.get("sort");return t&&E7.has(t)?t:"relevance"}r($G,"parseSearchSort");function BG(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(BG,"countActiveFilters");function KG(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(KG,"assigneeToken");function qG(e,t,i){const l={...e};return delete l.assigneeAgentId,delete l.assigneeUserId,t&&(t==="none"?l.assigneeAgentId=null:t==="me"?i&&(l.assigneeUserId=i):t.startsWith("agent:")?l.assigneeAgentId=t.slice(6):t.startsWith("user:")&&(l.assigneeUserId=t.slice(5))),l}r(qG,"applyAssigneeToken");function pc(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(pc,"humanize$1");function I7(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(I7,"assigneeChipLabel");function FG(e,t){const i=[];for(const l of e.status??[])i.push({id:`status:${l}`,label:`Status: ${pc(l)}`,remove:r(c=>{const u={...c},m=(c.status??[]).filter(f=>f!==l);return m.length>0?u.status=m:delete u.status,u},"remove")});for(const l of e.priority??[])i.push({id:`priority:${l}`,label:`Priority: ${pc(l)}`,remove:r(c=>{const u={...c},m=(c.priority??[]).filter(f=>f!==l);return m.length>0?u.priority=m:delete u.priority,u},"remove")});return(e.assigneeAgentId!==void 0||e.assigneeUserId)&&i.push({id:"assignee",label:`Assignee: ${I7(e,t)}`,remove:r(l=>{const c={...l};return delete c.assigneeAgentId,delete c.assigneeUserId,c},"remove")}),e.projectId&&i.push({id:"project",label:`Project: ${t.projectName(e.projectId)??"Project"}`,remove:r(l=>{const c={...l};return delete c.projectId,c},"remove")}),e.labelId&&i.push({id:"label",label:`Label: ${t.labelName(e.labelId)??"Label"}`,remove:r(l=>{const c={...l};return delete c.labelId,c},"remove")}),e.updatedWithin&&i.push({id:"updated",label:`Updated: ${KA(e.updatedWithin)}`,remove:r(l=>{const c={...l};return delete c.updatedWithin,delete c.updatedAfter,c},"remove")}),i}r(FG,"buildFilterChips");function HG(e,t,i){switch(e){case"status":return`Status: ${t.map(pc).join(", ")}`;case"priority":return`Priority: ${t.map(pc).join(", ")}`;case"assigneeAgentId":return`Assignee: ${t.map(l=>i.agentName(l)??"Agent").join(", ")}`;case"assigneeUserId":return`Assignee: ${t.map(l=>l===i.currentUserId?"Me":i.userName(l)??"User").join(", ")}`;case"projectId":return`Project: ${t.map(l=>i.projectName(l)??"Project").join(", ")}`;case"labelId":return`Label: ${t.map(l=>i.labelName(l)??"Label").join(", ")}`;case"updatedWithin":case"updatedAfter":return"Updated window";default:return pc(e)}}r(HG,"describeLoosenSuggestion");function VG(e,t){const i={...e};switch(t){case"status":delete i.status;break;case"priority":delete i.priority;break;case"assigneeAgentId":case"assigneeUserId":delete i.assigneeAgentId,delete i.assigneeUserId;break;case"projectId":delete i.projectId;break;case"labelId":delete i.labelId;break;case"updatedWithin":case"updatedAfter":delete i.updatedWithin,delete i.updatedAfter}return i}r(VG,"clearFilterDimension");var T7='Search title, ID, description… (pick a field or type "exact phrase")';function vk(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(vk,"humanize");function Th(e,t,i,l=""){const c=t?t.kind==="text"&&i.trim()?Pr(t.key,i):"":i;return[...e,l,c].filter(u=>u.trim().length>0).join(" ")}r(Th,"composeRaw");function R7(e,t){typeof e=="function"?e(t):e&&(e.current=t)}r(R7,"assignRef");function yk(e,t,i){const l=!!(t.currentUserId||t.currentAgentId);switch(e){case"status":return[...Ic.map(c=>({id:c,label:vk(c),token:`status:${c}`})),...i.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 Gg.map(c=>({id:c,label:vk(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:Pr("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:Pr("author",c.name)}))];case"label":return(t.labels??[]).map(c=>({id:c.id,label:c.name,token:Pr("label",c.name)}));case"project":return(t.projects??[]).map(c=>({id:c.id,label:c.name,token:Pr("project",c.name)}));case"updated":return Dk.map(c=>({id:c,label:KA(c),token:`updated:>${c}`}));default:return[]}}r(yk,"pickerOptions");function D7(e,t){if(!t)return e;const i=[],l=[];for(const c of e){const u=c.label.toLowerCase();u.startsWith(t)||c.id.toLowerCase().startsWith(t)?i.push(c):u.includes(t)&&l.push(c)}return[...i,...l]}r(D7,"rankOptions");function M7({value:e,onChange:t,context:i={},operatorKeys:l=IC,debounceMs:c=250,placeholder:u=T7,ariaLabel:m="Search",className:f,fieldClassName:h,inputClassName:g,clearOnEscape:v=!1,inputRef:y,autoFocus:j,pageSearchTarget:k,trailing:S,onKeyDown:N}){const _=(0,x.useId)(),I=(0,x.useRef)(null),[D,T]=(0,x.useState)(()=>Jo(e,l).tokens),[C,M]=(0,x.useState)(()=>Jo(e,l).text),[z,K]=(0,x.useState)(null),[P,A]=(0,x.useState)(""),[B,O]=(0,x.useState)(!1),[W,Y]=(0,x.useState)(-1),ce=(0,x.useRef)(e),oe=(0,x.useRef)(i);oe.current=i;const $=(0,x.useRef)(t);$.current=t;const R=(0,x.useRef)(l);R.current=l;const ne=(0,x.useMemo)(()=>Az.filter(de=>de.kind==="text"||l.includes(de.key)),[l]),ue=Th(D,z,C,z?P:"");(0,x.useEffect)(()=>{if(e===ce.current)return;ce.current=e;const de=Jo(e,R.current);T(de.tokens),M(de.text),K(null),A("")},[e]);const ae=(0,x.useCallback)(de=>{ce.current=de;const Oe=Ql(de,{...oe.current,operatorKeys:R.current}),qe={raw:de,q:Oe.query,filters:Oe.filters};c<=0?$.current(qe):(0,x.startTransition)(()=>$.current(qe))},[c]);(0,x.useEffect)(()=>{if(ue===ce.current)return;if(c<=0){ae(ue);return}const de=window.setTimeout(()=>{ue!==ce.current&&ae(ue)},c);return()=>window.clearTimeout(de)},[c,ae,ue]);const Ee=(0,x.useCallback)(de=>ne.find(Oe=>Oe.key===de.toLowerCase())??null,[ne]),fe=(0,x.useMemo)(()=>{if(z){if(z.kind==="text")return[];const qe=C.trim().replace(/"/g,"").toLowerCase();return D7(yk(z.key,i,l),qe)}const{token:de}=ah(C);if(de.includes(":")||de.startsWith('"'))return[];const Oe=de.toLowerCase();return ne.filter(qe=>!Oe||qe.key.startsWith(Oe)||qe.label.toLowerCase().startsWith(Oe)).map(qe=>({id:qe.key,label:qe.label,description:qe.description,field:qe}))},[i,C,ne,l,z]),Ae=B&&fe.length>0;(0,x.useEffect)(()=>{Y(z&&z.kind==="picker"?0:-1)},[z,C]);const Ce=r(()=>I.current?.focus(),"focusInput"),Se=r((de,Oe)=>{A(Oe.trim()),K(de),M(""),O(!0),Ce()},"startField"),he=r(()=>{K(null),M(P?`${P} `:""),A("")},"releaseHeldText"),De=r((de,Oe=!0)=>{T(qe=>[...qe,de]),he(),O(Oe),Ce()},"commitToken"),Ye=r((de,Oe=!0)=>{if(de.field){Se(de.field,C.slice(0,ah(C).start));return}de.token&&De(de.token,Oe)},"selectOption"),ze=r(de=>{const Oe=/\s$/.test(de);if(Oe&&O(!0),z){M(de);return}const{start:qe,token:ut}=ah(de),Vt=/^([a-zA-Z]+):$/.exec(ut),Wt=Vt?Ee(Vt[1]):null;if(Wt){Se(Wt,de.slice(0,qe));return}const H=Jo(de,l,!Oe);if(H.tokens.length>0){T(rn=>[...rn,...H.tokens]),M(H.text&&Oe?`${H.text} `:H.text);return}M(de)},"handleDraftChange"),ve=r(de=>{T(Oe=>Oe.filter((qe,ut)=>ut!==de)),Ce()},"removeToken"),ft=r(()=>{if(!z)return!1;const de=C.trim();if(!de)return!1;if(z.kind==="text")return De(Pr(z.key,de)),!0;const Oe=de.toLowerCase(),qe=yk(z.key,i,l).find(ut=>ut.label.toLowerCase()===Oe||ut.id.toLowerCase()===Oe)??(Ae&&W>=0?fe[W]:void 0)??(fe.length===1?fe[0]:void 0);return qe?.token?(De(qe.token),!0):!1},"commitPendingDraft"),At=r(de=>{const Oe=de.nativeEvent.isComposing;if(!Oe&&de.key==="Tab"&&!de.shiftKey&&(z||Ae)){if(de.preventDefault(),ft())return;if(!z&&Ae&&W>=0&&fe[W]){Ye(fe[W]);return}z||O(!1);return}if(!Oe&&de.key==="ArrowDown"){if(de.preventDefault(),!B){O(!0);return}fe.length>0&&Y(qe=>(qe+1)%fe.length);return}if(!Oe&&de.key==="ArrowUp"&&Ae){de.preventDefault(),Y(qe=>qe<=0?fe.length-1:qe-1);return}if(!Oe&&de.key==="Enter"){if(Ae&&W>=0&&fe[W]){de.preventDefault(),Ye(fe[W],!1);return}let qe=ue;if(z?.kind==="text"&&C.trim()){const ut=Pr(z.key,C.trim());De(ut,!1),qe=Th([...D,ut],null,P)}else if(!z){const ut=Jo(C,l);ut.tokens.length>0&&(T([...D,...ut.tokens]),M(ut.text),qe=Th([...D,...ut.tokens],null,ut.text))}qe!==ce.current&&ae(qe),O(!1)}if(!Oe&&de.key==="Escape"&&Ae&&(O(!1),C.length>0||z)){de.preventDefault();return}if(!Oe&&de.key==="Escape"&&v&&ue.length>0){de.preventDefault(),T([]),K(null),A(""),M(""),ce.current="",$.current({raw:"",q:"",filters:{}});return}if(!Oe&&de.key==="Backspace"&&de.currentTarget.selectionStart===0&&de.currentTarget.selectionEnd===0){if(z){de.preventDefault(),he();return}if(D.length>0){de.preventDefault(),T(qe=>qe.slice(0,-1));return}}N?.(de)},"handleKeyDown"),xt=D.map(de=>Tz(de,i)),Pt=z?z.kind==="text"?`${z.label}: type text, Tab or Enter to add`:`Pick ${z.label.toLowerCase()}…`:D.length>0?"":u;return(0,s.jsxs)("div",{className:X("relative",f),"data-testid":"scoped-search",children:[(0,s.jsxs)("div",{className:X("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(de=>{de.target===de.currentTarget&&(de.preventDefault(),Ce())},"onMouseDown"),children:[(0,s.jsx)(Kr,{className:"pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-ink-3"}),xt.map((de,Oe)=>(0,s.jsxs)(Bn,{variant:"secondary",className:"max-w-56 gap-1 pr-0.5 font-normal","data-testid":"scoped-search-pill",children:[(0,s.jsx)("span",{className:"truncate",children:de.label}),(0,s.jsx)("button",{type:"button",className:"rounded-full p-0.5 hover:bg-bg/60","aria-label":`Remove ${de.label}`,onMouseDown:r(qe=>qe.preventDefault(),"onMouseDown"),onClick:r(()=>ve(Oe),"onClick"),children:(0,s.jsx)(is,{className:"h-3 w-3"})})]},`${D[Oe]}:${Oe}`)),z?(0,s.jsxs)(Bn,{variant:"outline",className:"gap-1 pr-0.5 font-normal","data-testid":"scoped-search-pending-field",children:[(0,s.jsxs)("span",{children:[z.key,":"]}),(0,s.jsx)("button",{type:"button",className:"rounded-full p-0.5 hover:bg-bg-3","aria-label":`Remove ${z.label} field`,onMouseDown:r(de=>de.preventDefault(),"onMouseDown"),onClick:r(()=>{he(),Ce()},"onClick"),children:(0,s.jsx)(is,{className:"h-3 w-3"})})]}):null,(0,s.jsx)("input",{ref:r(de=>{I.current=de,R7(y,de)},"ref"),role:"combobox","aria-label":m,"aria-expanded":Ae,"aria-controls":_,"aria-autocomplete":"list","aria-activedescendant":Ae&&W>=0?`${_}-${W}`:void 0,autoFocus:j,value:C,placeholder:Pt,"data-page-search-target":k?"true":void 0,className:X("h-full min-w-24 flex-1 bg-transparent text-base outline-none placeholder:text-ink-3 md:text-sm",g),onChange:r(de=>ze(de.target.value),"onChange"),onFocus:r(()=>O(!0),"onFocus"),onBlur:r(()=>O(!1),"onBlur"),onKeyDown:At}),S]}),Ae?(0,s.jsx)("div",{id:_,role:"listbox","aria-label":z?`${z.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:fe.map((de,Oe)=>(0,s.jsxs)("div",{id:`${_}-${Oe}`,role:"option","aria-selected":Oe===W,className:X("flex cursor-pointer items-center justify-between gap-3 rounded-sm px-2 py-1.5 text-sm",Oe===W?"bg-bg-3 text-ink":"hover:bg-bg-3/50"),onMouseDown:r(qe=>qe.preventDefault(),"onMouseDown"),onMouseEnter:r(()=>Y(Oe),"onMouseEnter"),onClick:r(()=>Ye(de),"onClick"),children:[(0,s.jsx)("span",{className:"truncate",children:de.label}),de.description?(0,s.jsx)("span",{className:"hidden truncate text-xs text-ink-3 sm:inline",children:de.description}):null]},de.id))}):null]})}r(M7,"ScopedSearchInput");function qA(e){if(e.length<=1)return[...e];const t=r((v,y)=>{const j=jk(v.createdAt),k=jk(y.createdAt);return j!==k?j-k:v.id<y.id?-1:v.id>y.id?1:0},"tieBreakAsc"),i=new Map;for(const v of e)i.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||!i.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(i.get(y),i.get(j)));const u=[];for(const v of e)c.get(v.id)===0&&u.push(v);u.sort(t);const m=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(m.has(y))continue;const j=(c.get(y)??0)-1;if(c.set(y,j),j===0){const k=i.get(y);k&&h(k)}}},"releaseSuccessors");for(;u.length>0;){let v=u.shift();for(;v&&!m.has(v.id);){f.push(v),m.add(v.id),g(v.id);const y=l.get(v.id)??[];if(y.length!==1)break;const j=y[0];if(m.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 m.size<e.length?[...e].sort(t):f}r(qA,"workflowSort");function jk(e){if(!e)return 0;const t=e instanceof Date?e.getTime():new Date(e).getTime();return Number.isFinite(t)?t:0}r(jk,"toTimestamp");var O7=2;function L7(e,t){return e===!0&&t>=O7}r(L7,"shouldRenderSubIssueProgressSummary");function z7(e){const t={},i=e.filter(f=>f.status!=="cancelled");for(const f of i)t[f.status]=(t[f.status]??0)+1;const l=qA(i),c=l.find(f=>P7(f.status))??null,u=l.filter(f=>!U7(f.status)),m=c===null&&u.length>0&&u.every(f=>f.status==="blocked")?u[0]:null;return{totalCount:i.length,doneCount:t.done??0,inProgressCount:t.in_progress??0,blockedCount:t.blocked??0,countsByStatus:t,target:c?{issue:c,kind:"next"}:m?{issue:m,kind:"blocked"}:null}}r(z7,"buildSubIssueProgressSummary");function P7(e){return e!=="done"&&e!=="cancelled"&&e!=="blocked"}r(P7,"isActionableStatus");function U7(e){return e==="done"||e==="cancelled"}r(U7,"isTerminalStatus");function Dl(e,t){const i={};for(const l of e){const c=t(l);i[c]||(i[c]=[]),i[c].push(l)}return i}r(Dl,"groupBy");function $7(e){return e==="queued"||e==="running"}r($7,"isLiveRunStatus");var B7=new Set(["done","cancelled"]);function qg(e){return B7.has(e)}r(qg,"isTerminalIssueStatus");function FA(e,t){return $7(e.status)&&!qg(t)}r(FA,"isLiveIssueRun");function K7(e){const t=new Map;for(const i of e??[]){const l={status:i.status,updatedAtMs:q7(i.updatedAt)},c=t.get(i.id);(!c||F7(c,l))&&t.set(i.id,l)}return new Map([...t].map(([i,l])=>[i,l.status]))}r(K7,"collectIssueStatusById");function q7(e){if(e==null)return null;const t=e instanceof Date?e.getTime():new Date(e).getTime();return Number.isFinite(t)?t:null}r(q7,"issueUpdatedAtMs");function F7(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!qg(e.status)&&qg(t.status)}r(F7,"shouldReplaceIssueStatusSnapshot");function H7(e,t){const i=new Set,l=K7(t);for(const c of e??[])c.issueId&&FA(c,l.get(c.issueId))&&i.add(c.issueId);return i}r(H7,"collectLiveIssueIds");function HA(e,t){const i=new Map;if(!e||e.length===0||t.size===0)return i;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 m=l.get(c)??null;for(;m&&!u.has(m);)u.add(m),i.set(m,(i.get(m)??0)+1),m=l.get(m)??null}return i}r(HA,"collectSubtreeLiveCounts");var V7=["assignee","kickedOffBy","project","workspace","parent","labels","updated"],W7={status:"Status",id:"ID",assignee:"Responsible",kickedOffBy:"Kicked off by",project:"Project",workspace:"Workspace",parent:"Parent task",labels:"Tags",updated:"Last updated"},Q7={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 G7(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.":Q7[e]}r(G7,"issueColumnDescription");function cf(e){return OE(e.lastActivityAt??e.lastExternalCommentAt??e.updatedAt)}r(cf,"issueActivityTimestamp");function Y7(e){return`Updated ${cf(e)}`}r(Y7,"issueActivityText");function X7(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(X7,"issueTrailingGridTemplate");function Z7({availableColumns:e,visibleColumnSet:t,onToggleColumn:i,showDateGroupSeparators:l,onToggleDateGroupSeparators:c,onResetColumns:u,title:m,iconOnly:f=!1,rowPresentation:h="legacy"}){return(0,s.jsxs)(Gr,{children:[(0,s.jsx)(Wr,{asChild:!0,children:(0,s.jsxs)(le,{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,s.jsx)(kI,{className:f?"h-3.5 w-3.5":"mr-1 h-3.5 w-3.5"}),!f&&"Columns"]})}),(0,s.jsxs)(Qr,{align:"end",className:"w-(--sz-300px) rounded-xl border-line/70 p-1.5 shadow-xl shadow-black/10",children:[(0,s.jsx)(oS,{className:"px-2 pb-1 pt-1.5",children:(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("div",{className:"text-(length:--text-nano) font-semibold uppercase tracking-(--tracking-caps) text-ink-3",children:"Desktop task rows"}),(0,s.jsx)("div",{className:"text-sm font-medium text-ink",children:m})]})}),(0,s.jsx)(ki,{}),e.map(g=>(0,s.jsx)(Ny,{checked:t.has(g),onSelect:r(v=>v.preventDefault(),"onSelect"),onCheckedChange:r(v=>i(g,v===!0),"onCheckedChange"),className:"items-start rounded-lg px-3 py-2.5 pl-8",children:(0,s.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-ink",children:W7[g]}),(0,s.jsx)("span",{className:"text-xs leading-relaxed text-ink-3",children:G7(g,h)})]})},g)),l!==void 0&&c?(0,s.jsx)(Ny,{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,s.jsxs)("span",{className:"flex flex-col gap-0.5",children:[(0,s.jsx)("span",{className:"text-sm font-medium text-ink",children:"Date group separators"}),(0,s.jsx)("span",{className:"text-xs leading-relaxed text-ink-3",children:"Show Today, Yesterday, and Earlier rules on newest-first task lists."})]})}):null,(0,s.jsx)(ki,{}),(0,s.jsxs)(Cn,{onSelect:u,className:"rounded-lg px-3 py-2 text-sm",children:["Reset defaults",(0,s.jsx)("span",{className:"ml-auto text-xs text-ink-3",children:"status, id, updated"})]})]})]})}r(Z7,"IssueColumnPicker");function J7(){return(0,s.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-pulse rounded-full bg-blue-400 opacity-75"}),(0,s.jsx)("span",{className:X("relative inline-flex h-2 w-2 rounded-full","bg-blue-500")})]})}r(J7,"LiveRunDot");function e9(){return(0,s.jsxs)(Bn,{variant:"ghost",className:X("px-1.5 sm:gap-1.5 sm:px-2","bg-blue-500/10"),children:[(0,s.jsx)(J7,{}),(0,s.jsx)("span",{className:X("hidden text-(length:--text-micro) font-medium sm:inline","text-blue-600 dark:text-blue-400"),children:"Live"})]})}r(e9,"LiveRunBadge");function wk({issue:e,isLive:t,subtreeLiveCount:i=0,showSubtreeLiveChip:l=!0,showStatus:c=!0,showIdentifier:u=!0,statusSlot:m,checklistStepNumber:f=null}){return(0,s.jsxs)(s.Fragment,{children:[c?(0,s.jsx)("span",{className:"hidden shrink-0 items-center sm:inline-flex",children:m??(0,s.jsx)(Ya,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention})}):null,f!==null?(0,s.jsxs)("span",{className:"shrink-0 font-mono text-xs text-ink-3","aria-hidden":"true",children:[f,"."]}):null,u?(0,s.jsx)("span",{className:"shrink-0 font-mono text-xs text-ink-3",children:e.identifier??e.id.slice(0,8)}):null,t&&(0,s.jsx)(e9,{}),l&&!t&&i>0&&(0,s.jsxs)(Bn,{variant:"outline",className:X("px-1.5 sm:gap-1.5 sm:px-2","border-line bg-transparent"),title:`${i} sub-task${i===1?"":"s"} running below`,children:[(0,s.jsx)("span",{className:X("h-2 w-2 shrink-0 rounded-full border","border-ink-3/60 bg-transparent"),"aria-hidden":"true"}),(0,s.jsxs)("span",{className:"hidden text-(length:--text-micro) font-medium text-ink-3 sm:inline",children:[i," live below"]})]})]})}r(wk,"InboxIssueMetaLeading");function t9({issue:e,columns:t,projectName:i,projectColor:l,workspaceId:c,workspaceName:u,assigneeName:m,assigneeAgent:f,creatorAgent:h,assigneeUserName:g,assigneeUserAvatarUrl:v,creatorAgentName:y,creatorUserName:j,creatorUserAvatarUrl:k,viaAgentName:S,currentUserId:N,parentIdentifier:_,parentTitle:I,assigneeContent:D,onFilterWorkspace:T}){const C=cf(e),M=g??Ur(e.assigneeUserId,N)??"User",z=Kk(e),K=z?.kind==="user"?z.id:null,P=j??Ur(K,N)??"User";return(0,s.jsx)("span",{className:"grid items-center gap-2",style:{gridTemplateColumns:X7(t)},children:t.map(A=>{if(A==="assignee")return D?(0,s.jsx)("span",{className:"min-w-0",children:D},A):e.assigneeAgentId?(0,s.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,s.jsx)(Wl,{agent:f??{id:e.assigneeAgentId,name:m??e.assigneeAgentId.slice(0,8)},size:"sm",className:"min-w-0"})},A):e.assigneeUserId?(0,s.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,s.jsx)(Hh,{name:M,avatarUrl:v,size:"sm",className:"min-w-0"})},A):(0,s.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:"Unassigned"},A);if(A==="kickedOffBy"){if(z?.kind==="agent"){const B=y??z.id.slice(0,8);return(0,s.jsxs)(Ia,{children:[(0,s.jsx)(_a,{asChild:!0,children:(0,s.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,s.jsx)(Wl,{agent:h??{id:z.id,name:B},size:"sm",className:"min-w-0"})})}),(0,s.jsx)(Ea,{side:"top",sideOffset:6,children:B})]},A)}if(z?.kind==="user"){const B=S?`${P} · via ${S}`:P;return(0,s.jsxs)(Ia,{children:[(0,s.jsx)(_a,{asChild:!0,children:(0,s.jsx)("span",{className:"min-w-0 text-xs text-ink",children:(0,s.jsx)(Hh,{name:P,avatarUrl:k,size:"sm",className:"min-w-0"})})}),(0,s.jsx)(Ea,{side:"top",sideOffset:6,children:B})]},A)}return(0,s.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:"Unknown"},A)}if(A==="project"){if(i){const B=l??"#64748b";return(0,s.jsxs)("span",{className:"inline-flex min-w-0 items-center gap-2 text-xs font-medium",style:{color:$y(B,.12)},children:[(0,s.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full",style:{backgroundColor:B}}),(0,s.jsx)("span",{className:"truncate",children:i})]},A)}return(0,s.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:"No project"},A)}return A==="labels"?(e.labels??[]).length>0?(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-1 overflow-hidden",children:[(e.labels??[]).slice(0,2).map(B=>(0,s.jsx)(Bn,{variant:"outline",className:"min-w-0 max-w-full px-1.5 py-0 text-(length:--text-nano)",style:{borderColor:B.color,color:$y(B.color,.12),backgroundColor:`${B.color}1f`},children:(0,s.jsx)("span",{className:"truncate",children:B.name})},B.id)),(e.labels??[]).length>2?(0,s.jsxs)("span",{className:"shrink-0 text-(length:--text-nano) font-medium text-ink-3",children:["+",(e.labels??[]).length-2]}):null]},A):(0,s.jsx)("span",{className:"min-w-0","aria-hidden":"true"},A):A==="workspace"?u?(0,s.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",children:c&&T?(0,s.jsxs)(Ia,{children:[(0,s.jsx)(_a,{asChild:!0,children:(0,s.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(),T(c)},"onClick"),children:u})}),(0,s.jsx)(Ea,{side:"top",sideOffset:6,children:"Filter by workspace"})]}):u},A):(0,s.jsx)("span",{className:"min-w-0","aria-hidden":"true"},A):A==="parent"?e.parentId?(0,s.jsx)("span",{className:"min-w-0 truncate text-xs text-ink-3",title:I??void 0,children:_?(0,s.jsx)("span",{className:"font-mono",children:_}):(0,s.jsx)("span",{className:"italic",children:"Sub-task"})},A):(0,s.jsx)("span",{className:"min-w-0","aria-hidden":"true"},A):A==="updated"?(0,s.jsx)("span",{className:"min-w-0 truncate text-right text-(length:--text-micro) font-medium text-ink-3",children:C},A):null})})}r(t9,"InboxIssueTrailingColumns");function n9({icon:e,title:t,message:i,description:l,action:c,onAction:u,hideActionIcon:m=!1}){return(0,s.jsxs)("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[(0,s.jsx)("div",{className:"bg-bg-3/50 p-4 mb-4",children:(0,s.jsx)(e,{className:"h-10 w-10 text-ink-3/50"})}),t?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-base font-semibold text-ink mb-1.5",children:t}),(0,s.jsx)("p",{className:"text-sm text-ink-3 mb-4 max-w-md",children:i})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"text-sm font-medium text-ink mb-1",children:i}),l&&(0,s.jsx)("p",{className:"max-w-md text-sm text-ink-3 mb-4",children:l})]}),c&&u&&(0,s.jsxs)(le,{onClick:u,children:[!m&&(0,s.jsx)(Js,{className:"h-4 w-4 mr-1.5"}),c]})]})}r(n9,"EmptyState");function s9({label:e,collapsible:t=!1,collapsed:i=!1,onToggle:l,trailing:c,className:u}){return(0,s.jsxs)("div",{className:X("flex items-center py-1.5 pl-1 pr-3",u),children:[t?(0,s.jsxs)("button",{type:"button",className:"flex min-w-0 items-center gap-2 text-left","aria-expanded":!i,onClick:l,children:[(0,s.jsx)("span",{className:"inline-flex w-4 shrink-0 items-center justify-center",children:(0,s.jsx)(nr,{className:X("h-3.5 w-3.5 shrink-0 text-ink-3 transition-transform",!i&&"rotate-90")})}),(0,s.jsx)("span",{className:"truncate text-sm font-semibold uppercase tracking-wide",children:e})]}):(0,s.jsx)("div",{className:"flex min-w-0 items-center gap-1.5",children:(0,s.jsx)("span",{className:"truncate text-sm font-semibold uppercase tracking-wide",children:e})}),c?(0,s.jsx)("div",{className:"ml-auto",children:c}):null]})}r(s9,"IssueGroupHeader");var Rh={critical:{icon:Ja,color:Wu.critical??"text-yellow-600 dark:text-yellow-400",label:"Critical"},high:{icon:dS,color:Wu.high??"text-yellow-600 dark:text-yellow-400",label:"High"},medium:{icon:KI,color:Wu.medium??"text-yellow-600 dark:text-yellow-400",label:"Medium"},low:{icon:JE,color:Wu.low??"text-yellow-600 dark:text-yellow-400",label:"Low"}},a9=["critical","high","medium","low"];function WG({priority:e,onChange:t,className:i,showLabel:l}){const[c,u]=(0,x.useState)(!1),m=Rh[e]??Rh.medium,f=m.icon,h=(0,s.jsx)("span",{className:X("inline-flex items-center justify-center shrink-0",m.color,t&&!l&&"cursor-pointer",i),children:(0,s.jsx)(f,{className:"h-3.5 w-3.5"})});if(!t)return l?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[h,(0,s.jsx)("span",{className:"text-sm",children:m.label})]}):h;const g=l?(0,s.jsxs)("button",{type:"button","aria-label":`Change priority (current: ${m.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,s.jsx)("span",{className:"text-sm",children:m.label})]}):(0,s.jsx)("button",{type:"button","data-slot":"icon-button","aria-label":`Change priority (current: ${m.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,s.jsxs)(va,{open:c,onOpenChange:u,children:[(0,s.jsx)(xa,{asChild:!0,children:g}),(0,s.jsx)(ba,{className:"w-36 p-1",align:"start",children:a9.map(v=>{const y=Rh[v],j=y.icon;return(0,s.jsxs)(le,{active:v===e,variant:"ghost",size:"sm",className:X("w-full justify-start gap-2 text-xs"),onClick:r(()=>{t(v),u(!1)},"onClick"),children:[(0,s.jsx)(j,{className:X("h-3.5 w-3.5",y.color)}),y.label]},v)})})]})}r(WG,"PriorityIcon");var i9=[["everything","All categories"],["issues_i_touched","My recent tasks"],["join_requests","Join requests"],["approvals","Approvals"],["failed_runs","Failed runs"],["alerts","Alerts"]],r9=[["all","All approval statuses"],["actionable","Needs action"],["resolved","Resolved"]],Dh=6;function Mh({value:e,onChange:t,label:i}){return(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(Kr,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-ink-3"}),(0,s.jsx)(Wn,{value:e,onChange:r(l=>t(l.target.value),"onChange"),placeholder:`Search ${i.toLowerCase()}...`,"aria-label":`Search ${i.toLowerCase()}`,className:"h-8 pl-7 text-xs"})]})}r(Mh,"FilterOptionSearch");function l9({state:e,onChange:t,activeFilterCount:i,agents:l,projects:c,labels:u,currentUserId:m,enableExternalObjectFilters:f=!0,enableRoutineVisibilityFilter:h=!1,buttonVariant:g="ghost",iconOnly:v=!1,creators:y,presentation:j="legacy",inboxScopeFilters:k}){const S=j==="streamlined",[N,_]=(0,x.useState)(""),[I,D]=(0,x.useState)(""),[T,C]=(0,x.useState)(""),[M,z]=(0,x.useState)(""),K=(0,x.useMemo)(()=>Bp(l,I,$=>$.name),[l,I]),P=(0,x.useMemo)(()=>Bp(c,T,$=>$.name),[c,T]),A=(0,x.useMemo)(()=>Bp(u,M,$=>$.name),[u,M]),B=y??[],O=(0,x.useMemo)(()=>new Map(B.map($=>[$.id,$])),[B]),W=N.trim().toLowerCase(),Y=(0,x.useMemo)(()=>W?B.filter($=>`${$.label} ${$.searchText??""}`.toLowerCase().includes(W)):B,[B,W]),ce=(0,x.useMemo)(()=>e.creators.map($=>{const R=O.get($);if(R)return R;if($.startsWith("agent:"))return{id:$,label:$.slice(6).slice(0,8),kind:"agent"};const ne=$.startsWith("user:")?$.slice(5):$;return{id:$,label:Ur(ne,m)??ne.slice(0,5),kind:"user"}}),[O,m,e.creators]),oe=r(()=>{t(CS),k?.onClear()},"clearFilters");return(0,s.jsxs)(va,{children:[(0,s.jsx)(xa,{asChild:!0,children:(0,s.jsxs)(le,{variant:g,size:v?"icon":"sm",className:`text-xs ${v?"relative h-8 w-8 shrink-0":""}`,title:v?i>0?`Filters: ${i}`:"Filter":void 0,children:[(0,s.jsx)(PI,{className:v?"h-3.5 w-3.5":"h-3.5 w-3.5 sm:h-3 sm:w-3 sm:mr-1"}),!v&&(0,s.jsx)("span",{className:"hidden sm:inline",children:i>0?`Filters: ${i}`:"Filter"}),!v&&i>0?(0,s.jsx)("span",{className:"ml-0.5 text-(length:--text-nano) font-medium sm:hidden",children:i}):null,v&&i>0?(0,s.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:i}):null,!v&&i>0?(0,s.jsx)(is,{className:"ml-1 hidden h-3 w-3 sm:block",onClick:r($=>{$.stopPropagation(),oe()},"onClick")}):null]})}),(0,s.jsx)(ba,{align:"end",className:S?"w-(--sz-calc-10) max-h-(--sz-calc-9) overflow-y-auto overscroll-contain p-0":"w-(--sz-calc-10) p-0",children:(0,s.jsxs)("div",{className:"space-y-3 p-3",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-sm font-medium",children:"Filters"}),i>0?(0,s.jsx)("button",{type:"button",className:"text-xs text-ink-3 hover:text-ink",onClick:oe,children:"Clear"}):null]}),k?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2",children:[(0,s.jsxs)("div",{className:"space-y-1","data-filter-options":"inbox-category",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Category"}),(0,s.jsx)("div",{className:"space-y-0.5",children:i9.map(([$,R])=>{const ne=k.category===$;return(0,s.jsxs)("button",{type:"button","aria-pressed":ne,className:X("flex w-full items-center justify-between rounded-sm px-2 py-1 text-left text-sm",ne?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50 hover:text-ink"),onClick:r(()=>k.onCategoryChange($),"onClick"),children:[(0,s.jsx)("span",{children:R}),ne?(0,s.jsx)(Ta,{className:"h-3.5 w-3.5"}):null]},$)})})]}),k.showApprovalStatus?(0,s.jsxs)("div",{className:"space-y-1","data-filter-options":"inbox-approval-status",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Approval status"}),(0,s.jsx)("div",{className:"space-y-0.5",children:r9.map(([$,R])=>{const ne=k.approvalStatus===$;return(0,s.jsxs)("button",{type:"button","aria-pressed":ne,className:X("flex w-full items-center justify-between rounded-sm px-2 py-1 text-left text-sm",ne?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50 hover:text-ink"),onClick:r(()=>k.onApprovalStatusChange($),"onClick"),children:[(0,s.jsx)("span",{children:R}),ne?(0,s.jsx)(Ta,{className:"h-3.5 w-3.5"}):null]},$)})})]}):null]}),(0,s.jsx)("div",{className:"border-t border-line"})]}):null,(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Quick filters"}),(0,s.jsx)("div",{className:"flex flex-wrap gap-1.5",children:N3.map($=>{const R=A3(e.statuses,$.statuses);return(0,s.jsx)(iT,{selected:R,onClick:r(()=>t({statuses:R?[]:[...$.statuses]}),"onClick"),children:$.label},$.label)})})]}),(0,s.jsx)("div",{className:"border-t border-line"}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[(0,s.jsxs)("div",{className:"min-w-0 space-y-3",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Status"}),(0,s.jsx)("div",{className:"space-y-0.5",children:Pd.map($=>(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,s.jsx)(vi,{checked:e.statuses.includes($),onCheckedChange:r(()=>t({statuses:Qi(e.statuses,$)}),"onCheckedChange")}),(0,s.jsx)(Ya,{status:$}),(0,s.jsx)("span",{className:"text-sm",children:Qh($)})]},$))})]}),!1]}),(0,s.jsxs)("div",{className:"min-w-0 space-y-3",children:[(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Responsible"}),S&&(l?.length??0)+(m?2:1)>Dh?(0,s.jsx)(Mh,{value:I,onChange:D,label:"Responsible"}):null,(0,s.jsxs)("div",{"data-filter-options":"responsible",className:S?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:[(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,s.jsx)(vi,{checked:e.assignees.includes("__unassigned"),onCheckedChange:r(()=>t({assignees:Qi(e.assignees,"__unassigned")}),"onCheckedChange")}),(0,s.jsx)("span",{className:"text-sm",children:"No responsible"})]}),m?(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,s.jsx)(vi,{checked:e.assignees.includes("__me"),onCheckedChange:r(()=>t({assignees:Qi(e.assignees,"__me")}),"onCheckedChange")}),(0,s.jsx)(Kl,{className:"h-3.5 w-3.5 text-ink-3"}),(0,s.jsx)("span",{className:"text-sm",children:"Me"})]}):null,(S?K:l??[]).map($=>(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,s.jsx)(vi,{checked:e.assignees.includes($.id),onCheckedChange:r(()=>t({assignees:Qi(e.assignees,$.id)}),"onCheckedChange")}),(0,s.jsx)("span",{className:"text-sm",children:$.name})]},$.id))]})]}),B.length>0?(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Creator"}),ce.length>0?(0,s.jsx)("div",{className:"flex flex-wrap gap-1",children:ce.map($=>(0,s.jsxs)(Bn,{variant:"secondary",className:"gap-1 pr-1",children:[$.kind==="agent"?(0,s.jsx)(hc,{className:"h-3 w-3"}):(0,s.jsx)(Kl,{className:"h-3 w-3"}),(0,s.jsx)("span",{children:$.label}),(0,s.jsx)("button",{type:"button",className:"rounded-full p-0.5 hover:bg-bg-3",onClick:r(()=>t({creators:e.creators.filter(R=>R!==$.id)}),"onClick"),"aria-label":`Remove creator ${$.label}`,children:(0,s.jsx)(is,{className:"h-3 w-3"})})]},$.id))}):null,(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)(Kr,{className:"pointer-events-none absolute left-2 top-1/2 h-3 w-3 -translate-y-1/2 text-ink-3"}),(0,s.jsx)(Wn,{value:N,onChange:r($=>_($.target.value),"onChange"),placeholder:"Search creators...",className:"h-8 pl-7 text-xs"})]}),(0,s.jsx)("div",{"data-filter-options":"creators",className:S?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:Y.length>0?Y.map($=>{const R=e.creators.includes($.id);return(0,s.jsxs)("button",{type:"button",className:`flex w-full items-center gap-2 rounded-sm px-2 py-1 text-left text-sm ${R?"bg-bg-3 text-ink":"text-ink-3 hover:bg-bg-3/50 hover:text-ink"}`,onClick:r(()=>t({creators:Qi(e.creators,$.id)}),"onClick"),children:[$.kind==="agent"?(0,s.jsx)(hc,{className:"h-3.5 w-3.5"}):(0,s.jsx)(Kl,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate",children:$.label}),R?(0,s.jsx)(is,{className:"h-3 w-3"}):null]},$.id)}):(0,s.jsx)("div",{className:"px-2 py-1 text-xs text-ink-3",children:"No creators match."})})]}):null,c&&c.length>0?(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Project"}),S&&c.length>Dh?(0,s.jsx)(Mh,{value:T,onChange:C,label:"Projects"}):null,(0,s.jsx)("div",{"data-filter-options":"projects",className:S?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:(S?P:c).map($=>(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,s.jsx)(vi,{checked:e.projects.includes($.id),onCheckedChange:r(()=>t({projects:Qi(e.projects,$.id)}),"onCheckedChange")}),(0,s.jsx)("span",{className:"text-sm",children:$.name})]},$.id))})]}):null]}),(0,s.jsxs)("div",{className:"min-w-0 space-y-3",children:[u&&u.length>0?(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Labels"}),S&&u.length>Dh?(0,s.jsx)(Mh,{value:M,onChange:z,label:"Labels"}):null,(0,s.jsx)("div",{"data-filter-options":"labels",className:S?"space-y-0.5":"max-h-32 space-y-0.5 overflow-y-auto",children:(S?A:u).map($=>(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,s.jsx)(vi,{checked:e.labels.includes($.id),onCheckedChange:r(()=>t({labels:Qi(e.labels,$.id)}),"onCheckedChange")}),(0,s.jsx)("span",{className:"h-2.5 w-2.5 rounded-full",style:{backgroundColor:$.color}}),(0,s.jsx)("span",{className:"text-sm",children:$.name})]},$.id))})]}):null,f?(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"External object status"}),(0,s.jsx)("div",{className:"space-y-0.5",children:w3.map($=>{const R=$==="failed"?"failed":$==="waiting"?"waiting":$==="running"?"running":$==="auth_required"?"auth_required":$==="unreachable"?"unreachable":$==="stale"?"unknown":"closed",ne=xS(R),ue=(NE[R]??"").split(" ").filter(ae=>ae.startsWith("text-")).join(" ");return(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,s.jsx)(vi,{checked:e.externalObjectStatuses.includes($),onCheckedChange:r(()=>t({externalObjectStatuses:Qi(e.externalObjectStatuses,$)}),"onCheckedChange")}),(0,s.jsx)(ne,{className:`h-3.5 w-3.5 shrink-0 ${ue}`,"aria-hidden":"true"}),(0,s.jsx)("span",{className:"text-sm",children:S3($)})]},$)})})]}):null,(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsx)("span",{className:"text-xs text-ink-3",children:"Visibility"}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,s.jsx)(vi,{checked:e.liveOnly,onCheckedChange:r($=>t({liveOnly:$===!0}),"onCheckedChange")}),(0,s.jsx)("span",{className:"text-sm",children:"Live runs only"})]}),h?(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1 hover:bg-bg-3/50",children:[(0,s.jsx)(vi,{checked:e.hideRoutineExecutions,onCheckedChange:r($=>t({hideRoutineExecutions:$===!0}),"onCheckedChange")}),(0,s.jsx)("span",{className:"text-sm",children:"Hide routine runs"})]}):null]})]})]})]})})]})}r(l9,"IssueFiltersPopover");function o9(e){return e.objects.find(t=>t.statusTone===e.highestSeverity)?.statusCategory??"unknown"}r(o9,"dominantCategory");function c9(e){return e.objects.find(t=>t.statusTone===e.highestSeverity)??null}r(c9,"dominantObject");function u9(e){const t=[];for(const[i,l]of Object.entries(e.byStatusCategory))l&&t.push(`${l} ${wI(i).toLowerCase()}`);return e.staleCount>0&&t.push(`${e.staleCount} stale`),t.push(`${e.total} total`),`External objects: ${t.join(", ")}`}r(u9,"buildBreakdownTitle");function kk({summary:e,compact:t,className:i}){const l=k0(),c=xI(e),u=e?.total??0;if(!e||u===0||!c)return null;const m=c9(e),f=m?.statusCategory??o9(e),h=yI(m?.statusIconKey)??xS(f),g=RE[f]??"bg-bg-3 text-ink-3",v=bI(e),y=u9(e),j=f==="running"&&!l?"animate-spin":"";return(0,s.jsxs)("span",{role:"img","aria-label":y,title:y,className:X("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",i),"data-external-status":f,"data-external-tone":c,children:[(0,s.jsx)(h,{"aria-hidden":"true",className:X("h-3 w-3 shrink-0",j)}),(0,s.jsx)("span",{children:v>0?v:u})]})}r(kk,"ExternalObjectStatusSummary");function Sk({onArchive:e,disabled:t,compact:i=!1}){return(0,s.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:X("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",i?"h-5 py-0":"py-1"),"aria-label":"Archive",children:[(0,s.jsx)(uS,{className:"h-3.5 w-3.5"}),"Archive"]})}r(Sk,"InboxArchiveButton");function d9({issue:e,issueLinkState:t,selected:i=!1,presentation:l="legacy",leadingControl:c,statusSlot:u,metadata:m,actions:f,showIdentifier:h=!0,mobileLeading:g,desktopMetaLeading:v,desktopLeadingSpacer:y=!1,mobileMeta:j,mobileTitleMeta:k,desktopTrailing:S,externalObjectSummary:N,trailingMeta:_,titleSuffix:I,titleClassName:D,checklistStepNumber:T=null,checklistCurrentStep:C=!1,checklistDependencyChips:M,checklistRowId:z,unreadState:K=null,onMarkRead:P,onArchive:A,archiveDisabled:B,className:O,onMouseEnter:W,treeGuides:Y=0,chevronInGuide:ce=!1,showDivider:oe=!1}){const $=e.identifier??e.id,R=e.identifier??e.id.slice(0,8),ne=K!=null,ue=K==="visible"||K==="fading",ae=(0,s.jsx)("button",{type:"button","data-slot":"icon-button",onClick:r(De=>{De.preventDefault(),De.stopPropagation(),P?.()},"onClick"),onKeyDown:r(De=>{(De.key==="Enter"||De.key===" ")&&(De.preventDefault(),De.stopPropagation(),P?.())},"onKeyDown"),className:X("inline-flex h-4 w-4 items-center justify-center rounded-full transition-colors",i?"hover:bg-bg-3/80":"hover:bg-blue-500/20"),"aria-label":"Mark as read",children:(0,s.jsx)("span",{className:X("block h-2 w-2 rounded-full transition-opacity duration-300",i?"bg-ink-3/70":"bg-blue-600 dark:bg-blue-400",K==="fading"?"opacity-0":"opacity-100")})}),Ee=i?"!text-ink-3 !border-ink-3":void 0,fe=i0(t,e),Ae=T!==null?(0,s.jsxs)("span",{className:"shrink-0 font-mono text-xs text-ink-3","aria-hidden":"true",children:[T,"."]}):null,Ce=e.activeRecoveryAction??null,Se=Ce&&!vE(Ce.cause)?f9(Ce,i,{scheduledRetry:e.scheduledRetry??null}):null,he=bT(e.blockedBy)?(0,s.jsxs)(Bn,{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,s.jsx)(c0,{className:"h-2.5 w-2.5","aria-hidden":!0}),"Blocked by parked work"]}):null;if(l==="task"){const De=K==="visible"||K==="fading";return(0,s.jsxs)("div",{onMouseEnter:W,"data-slot":"task-row","data-unread":De?"true":void 0,className:X("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",ne?"pl-4":"pl-2 sm:pl-4","[&_button]:relative [&_button]:z-10",i?"bg-bg-3/50 hover:bg-bg-3/50":"hover:bg-bg-3/50",C&&"bg-accent/5",O),children:[(0,s.jsx)(gn,{to:Td($),state:fe,disableIssueQuicklook:!0,issuePrefetch:e,"data-inbox-issue-link":!0,id:z,"aria-current":C?"step":void 0,onClickCapture:r(()=>Bh($,fe),"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,s.jsxs)("span",{className:"sr-only",children:["Open ",R,": ",e.title]})}),ne?(0,s.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:ue?ae:null}):null,(0,s.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:[Y>0?Array.from({length:Y},(Ye,ze)=>{const ve=ce&&ze===Y-1;return(0,s.jsx)("span",{"data-slot":"task-row-tree-guide","aria-hidden":"true",className:"relative block w-4 shrink-0 self-stretch",children:(0,s.jsx)("span",{"data-slot":"task-row-tree-connector",className:"absolute -inset-y-3 left-7 w-px bg-bg",children:ve?(0,s.jsxs)("span",{className:"absolute inset-0 flex flex-col",children:[(0,s.jsx)("span",{className:"flex-1 bg-line"}),(0,s.jsx)("span",{className:"h-3.5 shrink-0"}),(0,s.jsx)("span",{className:"flex-1 bg-line"})]}):(0,s.jsx)("span",{className:"absolute inset-0 bg-line"})})},`task-guide-${ze}`)}):null,c,u??(0,s.jsx)(Ya,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention,size:"md",className:Ee}),he]}),(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1 sm:flex-row sm:items-center sm:gap-2",children:[(0,s.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,s.jsxs)("span",{"data-slot":"task-row-title",className:X("min-w-0 line-clamp-2 text-sm sm:truncate sm:line-clamp-none",De&&"font-semibold",D),children:[e.title,I]}),Se,k?(0,s.jsx)("span",{className:"ml-auto shrink-0 whitespace-nowrap text-right text-xs text-ink-3 sm:hidden",children:k}):null]}),M?(0,s.jsx)("span",{className:"flex flex-wrap gap-1",children:M}):null,j?(0,s.jsx)("span",{className:"text-xs text-ink-3 sm:hidden",children:j}):null]}),(0,s.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,s.jsx)(kk,{summary:N,compact:!0}):null,m?(0,s.jsx)("span",{"data-slot":"task-row-metadata",className:"min-w-0",children:m}):null,S,f?(0,s.jsx)("span",{"data-slot":"task-row-actions",className:"flex shrink-0 items-center gap-1",children:f}):null,A?(0,s.jsx)(Sk,{onArchive:A,disabled:B,compact:!0}):null,h?(0,s.jsx)("span",{"data-slot":"task-row-identifier",className:"w-20 shrink-0 text-right font-mono text-xs text-ink-3",children:R}):null,_?(0,s.jsx)("span",{"data-slot":"task-row-timestamp",className:"w-24 shrink-0 truncate text-right text-xs text-ink-3",children:_}):null]})]})}return(0,s.jsxs)("div",{onMouseEnter:W,className:X("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",ne?"pl-4":"pl-2","[&_button]:relative [&_button]:z-10",oe&&"border-b border-line last:border-b-0",i?"hover:bg-transparent":"hover:bg-bg-3/50",C?"bg-accent/5":null,O),children:[(0,s.jsx)(gn,{to:Td($),state:fe,disableIssueQuicklook:!0,issuePrefetch:e,"data-inbox-issue-link":!0,id:z,"aria-current":C?"step":void 0,onClickCapture:r(()=>Bh($,fe),"onClickCapture"),className:X("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,s.jsxs)("span",{className:"sr-only",children:["Open ",R,": ",e.title]})}),(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-1 pt-px sm:hidden",children:[g??(0,s.jsx)(Ya,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention,size:"md",className:Ee}),he]}),(0,s.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col gap-1 sm:contents",children:[(0,s.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,s.jsxs)("span",{"data-slot":"task-row-title",className:X("min-w-0 line-clamp-2 text-sm sm:truncate sm:line-clamp-none",D),children:[e.title,I]}),Se]}),M?(0,s.jsx)("span",{className:"flex flex-wrap gap-1 sm:order-3 sm:ml-(--sz-calc-13)",children:M}):null,(0,s.jsxs)("span",{className:"flex items-center gap-2 self-stretch sm:order-1 sm:shrink-0",children:[ne?(0,s.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:ue?ae:null}):null,Y>0?Array.from({length:Y},(De,Ye)=>{const ze=ce&&Ye===Y-1;return(0,s.jsx)("span",{"aria-hidden":"true",className:"relative hidden w-4 shrink-0 self-stretch sm:block",children:(0,s.jsx)("span",{className:"absolute -inset-y-3 left-8 w-px bg-bg",children:ze?(0,s.jsxs)("span",{className:"absolute inset-0 flex flex-col",children:[(0,s.jsx)("span",{className:"flex-1 bg-line"}),(0,s.jsx)("span",{className:"h-3.5 shrink-0"}),(0,s.jsx)("span",{className:"flex-1 bg-line"})]}):(0,s.jsx)("span",{className:"absolute inset-0 bg-line"})})},`guide-${Ye}`)}):null,y?(0,s.jsx)("span",{className:"hidden w-3.5 shrink-0 sm:block"}):null,v??(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"hidden shrink-0 items-center gap-1 sm:inline-flex",children:(0,s.jsx)(Ya,{status:e.status,externalConversationState:e.externalConversationState,blockerAttention:e.blockerAttention,size:"md",className:Ee})}),Ae,(0,s.jsx)("span",{className:"shrink-0 font-mono text-xs text-ink-3",children:R}),he]}),j?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-xs text-ink-3 sm:hidden","aria-hidden":"true",children:"·"}),(0,s.jsx)("span",{className:"text-xs text-ink-3 sm:hidden",children:j})]}):null]})]}),A||S||_||N?(0,s.jsxs)("span",{className:"ml-auto hidden shrink-0 items-center gap-2 sm:order-3 sm:flex sm:gap-3",children:[A?(0,s.jsx)(Sk,{onArchive:A,disabled:B}):null,N?(0,s.jsx)(kk,{summary:N,compact:!0}):null,S,_?(0,s.jsx)("span",{className:"text-xs text-ink-3",children:_}):null]}):null,ue?(0,s.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:ae}):null]})}r(d9,"IssueRow");function f9(e,t,i){const l=mT(e,i);if(!l)return null;const c=hT[l],u=c.icon,m=pT(e,i),f=xT(l,e.kind,m),h=m?gT(m):null;return(0,s.jsxs)(Bn,{variant:"outline","data-testid":"issue-row-recovery-indicator","data-recovery-state":l,"data-recovery-kind":e.kind,"data-recovery-lane":m?.lane,role:"status","aria-label":h?`${f} — ${h}`:f,className:X("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,s.jsx)(u,{className:"h-2.5 w-2.5","aria-hidden":!0}),f]})}r(f9,"renderRecoveryChip");var m9="Kembali ke model utama.";function p9(e,t){return e instanceof Error&&e.message?e.message:t}r(p9,"errorMessage");function h9({issueId:e,run:t,companyId:i,taskLabel:l,className:c}){const u=wn(),[m,f]=(0,x.useState)(!1),h=t?.modelFallback??null,g=Kt({mutationFn:r(async()=>{if(!e||!t)throw new Error("This task has no run on a fallback model.");return await vf.cancel(t.id),hn.addComment(e,m9,void 0,void 0,void 0,crypto.randomUUID())},"mutationFn"),onSuccess:r(()=>{i&&u.invalidateQueries({queryKey:U.liveRuns(i)}),e&&(u.invalidateQueries({queryKey:U.issues.liveRuns(e)}),u.invalidateQueries({queryKey:U.issues.activeRun(e)}),u.invalidateQueries({queryKey:U.issues.runs(e)}),u.invalidateQueries({queryKey:U.issues.comments(e)}))},"onSuccess")});if(!e||!t||!h)return null;const v=l?` on ${l}`:"";return(0,s.jsxs)("span",{"data-slot":"restore-primary-model",className:X("inline-flex min-w-0 items-center gap-1.5",c),children:[(0,s.jsxs)(le,{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,s.jsx)(ic,{"aria-hidden":"true"}),g.isPending?"Restoring…":"Back to primary model"]}),g.error?(0,s.jsx)("span",{role:"alert",className:"text-xs text-bad",children:p9(g.error,"Couldn’t restore the primary model.")}):null,(0,s.jsx)(lS,{open:m,onOpenChange:f,children:(0,s.jsxs)(nS,{children:[(0,s.jsxs)(rS,{children:[(0,s.jsxs)(tS,{children:["Back to the primary model",v,"?"]}),(0,s.jsxs)(eS,{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,s.jsxs)(aS,{children:[(0,s.jsx)(iS,{children:"Keep running"}),(0,s.jsx)(sS,{onClick:r(()=>{f(!1),g.mutate()},"onClick"),children:"Stop and switch"})]})]})})]})}r(h9,"RestorePrimaryModelControl");function g9({context:e,search:t,controls:i,actions:l,feedback:c,className:u,ariaLabel:m="Collection controls"}){return(0,s.jsxs)("div",{"data-slot":"collection-toolbar",className:X("flex flex-col gap-2",u),role:"toolbar","aria-label":m,children:[(0,s.jsxs)("div",{className:"flex min-w-0 flex-col gap-2 sm:flex-row sm:items-center",children:[e?(0,s.jsx)("div",{"data-slot":"collection-toolbar-context",className:"min-w-0 shrink-0",children:e}):null,t?(0,s.jsx)("div",{"data-slot":"collection-toolbar-search",className:"min-w-0 flex-1",children:t}):null,i||l?(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1 sm:ml-auto sm:flex-nowrap",children:[i?(0,s.jsx)("div",{"data-slot":"collection-toolbar-controls",className:"flex min-w-0 flex-wrap items-center gap-1",children:i}):null,l?(0,s.jsx)("div",{"data-slot":"collection-toolbar-actions",className:"flex shrink-0 items-center gap-1",children:l}):null]}):null]}),c?(0,s.jsx)("div",{"data-slot":"collection-toolbar-feedback",className:"min-w-0",children:c}):null]})}r(g9,"CollectionToolbar");function x9({variant:e="list"}){return e==="dashboard"?(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(lt,{className:"h-32 w-full border border-line"}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 xl:grid-cols-4",children:Array.from({length:4}).map((t,i)=>(0,s.jsx)(lt,{className:"h-24 w-full"},i))}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-4 lg:grid-cols-4",children:Array.from({length:4}).map((t,i)=>(0,s.jsx)(lt,{className:"h-44 w-full"},i))}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,s.jsx)(lt,{className:"h-72 w-full"}),(0,s.jsx)(lt,{className:"h-72 w-full"})]})]}):e==="approvals"?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("div",{className:"flex items-center justify-between",children:(0,s.jsx)(lt,{className:"h-9 w-44"})}),(0,s.jsx)("div",{className:"grid gap-3",children:Array.from({length:3}).map((t,i)=>(0,s.jsx)(lt,{className:"h-36 w-full"},i))})]}):e==="costs"?(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:Array.from({length:6}).map((t,i)=>(0,s.jsx)(lt,{className:"h-9 w-28"},i))}),(0,s.jsx)(lt,{className:"h-40 w-full"}),(0,s.jsxs)("div",{className:"grid gap-4 md:grid-cols-2",children:[(0,s.jsx)(lt,{className:"h-72 w-full"}),(0,s.jsx)(lt,{className:"h-72 w-full"})]})]}):e==="inbox"?(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)(lt,{className:"h-9 w-56"}),(0,s.jsx)(lt,{className:"h-8 w-40"})]}),(0,s.jsx)("div",{className:"space-y-5",children:Array.from({length:3}).map((t,i)=>(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(lt,{className:"h-4 w-40"}),(0,s.jsx)("div",{className:"space-y-1 border border-line",children:Array.from({length:3}).map((l,c)=>(0,s.jsx)(lt,{className:"h-14 w-full rounded-none"},c))})]},i))})]}):e==="org-chart"?(0,s.jsx)("div",{className:"space-y-4",children:(0,s.jsx)(lt,{className:"h-(--sz-calc-17) w-full rounded-lg border border-line"})}):e==="detail"?(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(lt,{className:"h-3 w-64"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(lt,{className:"h-6 w-6"}),(0,s.jsx)(lt,{className:"h-6 w-6"}),(0,s.jsx)(lt,{className:"h-7 w-48"})]}),(0,s.jsx)(lt,{className:"h-4 w-40"})]}),(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)(lt,{className:"h-10 w-full"}),(0,s.jsx)(lt,{className:"h-32 w-full"})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(lt,{className:"h-8 w-24"}),(0,s.jsx)(lt,{className:"h-8 w-24"}),(0,s.jsx)(lt,{className:"h-8 w-24"})]}),(0,s.jsx)(lt,{className:"h-24 w-full"}),(0,s.jsx)(lt,{className:"h-24 w-full"})]})]}):e==="issues-list"?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)(lt,{className:"h-9 w-64"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(lt,{className:"h-8 w-16"}),(0,s.jsx)(lt,{className:"h-8 w-16"}),(0,s.jsx)(lt,{className:"h-8 w-16"}),(0,s.jsx)(lt,{className:"h-8 w-24"})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)(lt,{className:"h-4 w-40"}),(0,s.jsx)("div",{className:"space-y-1",children:Array.from({length:8}).map((t,i)=>(0,s.jsx)(lt,{className:"h-11 w-full rounded-none"},i))})]})]}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",children:[(0,s.jsx)(lt,{className:"h-9 w-44"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)(lt,{className:"h-8 w-20"}),(0,s.jsx)(lt,{className:"h-8 w-24"})]})]}),(0,s.jsx)("div",{className:"space-y-1",children:Array.from({length:7}).map((t,i)=>(0,s.jsx)(lt,{className:"h-11 w-full rounded-none"},i))})]})}r(x9,"PageSkeleton");var QG="issue.successful_run_handoff_required",GG="issue.successful_run_handoff_escalated";function VA(e){const t=e.successfulRunHandoff;return t?.required!==!0?!1:t.hasLiveContinuation?e.scheduledRetry?.status==="scheduled_retry":!0}r(VA,"isSuccessfulRunHandoffRequired");function YG(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)||b9(t)}r(YG,"isSuccessfulRunHandoffComment");function b9(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(b9,"isSuccessfulRunHandoffEscalationComment");function XG(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(XG,"successfulRunHandoffActivityTone");var WA=[10,25,50];var v9=["backlog","done","cancelled"],Fg=["backlog","todo","in_progress","in_review","blocked","done","cancelled"],y9={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:""},j9={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 w9(e){return j9[e]??y9}r(w9,"getKanbanColumnTone");function Oh(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())}r(Oh,"statusLabel");function k9(e,t){return Fg.includes(e)?e:t.find(i=>i.id===e)?.status??null}r(k9,"resolveKanbanTargetStatus");function S9({status:e,issues:t,agents:i,liveIssueIds:l,subtreeLiveCounts:c,compactCards:u=!1,collapsed:m=!1,visibleCount:f,revealIncrement:h,onShowMore:g}){const{setNodeRef:v,isOver:y}=cC({id:e});t.length;const j=m?[]:t.slice(0,f),k=Math.max(t.length-j.length,0),S=Math.min(h,k),N=w9(e);return m?(0,s.jsxs)("div",{ref:v,className:X("flex min-h-(--sz-220px) w-(--sz-52px) shrink-0 flex-col items-center rounded-md border px-1.5 py-2 transition-colors",N.rail,y&&N.railOver),title:`${Oh(e)}: ${t.length}`,children:[(0,s.jsx)(Ya,{status:e}),(0,s.jsx)("span",{className:X("mt-2 [writing-mode:vertical-rl] rotate-180 text-(length:--text-nano) font-semibold uppercase tracking-wide",N.header),children:Oh(e)}),(0,s.jsx)(Bn,{variant:"ghost",className:X("mt-auto bg-bg px-1.5 text-(length:--text-nano) tabular-nums",N.header),children:t.length})]}):(0,s.jsxs)("div",{className:"flex flex-col shrink-0 min-w-(--sz-260px) w-(--sz-260px)",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 mb-1",children:[(0,s.jsx)(Ya,{status:e}),(0,s.jsx)("span",{className:X("text-xs font-semibold uppercase tracking-wide",N.header),children:Oh(e)}),(0,s.jsx)("span",{className:X("ml-auto text-xs tabular-nums",N.count),children:t.length})]}),(0,s.jsxs)("div",{ref:v,className:X("flex-1 min-h-(--sz-120px) rounded-md p-2 space-y-1 transition-colors",y?N.bodyOver:N.body),children:[(0,s.jsx)($0,{items:j.map(_=>_.id),strategy:dC,children:j.map(_=>(0,s.jsx)(QA,{issue:_,agents:i,isLive:l?.has(_.id),subtreeLiveCount:c?.get(_.id)??0,compact:u,className:N.card},_.id))}),k>0?(0,s.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:g,children:["Show ",S," more"]}):null,t.length>0&&(k>0||t.length>=f)?(0,s.jsxs)("p",{className:"px-1 pt-1 text-(length:--text-micro) text-ink-3",children:["Showing ",j.length," of ",t.length]}):null]})]})}r(S9,"KanbanColumn");function QA({issue:e,agents:t,isLive:i,subtreeLiveCount:l=0,isOverlay:c,compact:u=!1,className:m}){const{attributes:f,listeners:h,setNodeRef:g,transform:v,transition:y,isDragging:j}=B0({id:e.id,data:{issue:e}}),k={transform:Za.Transform.toString(v),transition:y},S=r(N=>!N||!t?null:t.find(_=>_.id===N)?.name??null,"agentName");return(0,s.jsx)(Dc,{ref:g,style:k,...f,...h,className:X("block cursor-grab active:cursor-grabbing transition-shadow",j&&!c?"opacity-30":"",c?"shadow-lg ring-1 ring-accent/20":"hover:shadow-sm",u?"p-2":"p-2.5",m),children:(0,s.jsxs)(gn,{to:`/issues/${e.identifier??e.id}`,disableIssueQuicklook:!0,className:"block no-underline text-inherit",onClick:r(N=>{j&&N.preventDefault()},"onClick"),children:[(0,s.jsxs)("div",{className:`flex items-start gap-1.5 ${u?"mb-1":"mb-1.5"}`,children:[(0,s.jsx)("span",{className:"text-xs text-ink-3 font-mono shrink-0",children:e.identifier??e.id.slice(0,8)}),VA(e)?(0,s.jsxs)(Bn,{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,s.jsx)(Ja,{className:"h-3 w-3"}),"Next step"]}):null,i&&(0,s.jsxs)("span",{className:"inline-flex shrink-0 items-center gap-1 text-(length:--text-nano) font-medium text-blue-600 dark:text-blue-400",children:[(0,s.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,s.jsx)("span",{className:"animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"}),(0,s.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}),u?"Live":null]}),!i&&l>0&&(0,s.jsxs)(Bn,{variant:"outline",className:"border-line px-1.5 text-(length:--text-nano) text-ink-3",title:`${l} sub-task${l===1?"":"s"} running below`,children:[(0,s.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full border border-ink-3/60","aria-hidden":"true"}),l," live below"]})]}),(0,s.jsx)("p",{className:`${u?"mb-1.5 text-xs":"mb-2 text-sm"} leading-snug line-clamp-2`,children:e.title}),(0,s.jsxs)("div",{className:"flex items-center gap-2 min-w-0",children:[!1,e.assigneeAgentId&&(()=>{const N=S(e.assigneeAgentId);return N?(0,s.jsx)(Wl,{agent:t?.find(_=>_.id===e.assigneeAgentId)??{id:e.assigneeAgentId,name:N},size:"xs"}):(0,s.jsx)("span",{className:"text-xs text-ink-3 font-mono",children:e.assigneeAgentId.slice(0,8)})})()]})]})})}r(QA,"KanbanCard");function N9({issues:e,agents:t,liveIssueIds:i,compactCards:l=!1,collapsedStatuses:c=[],initialVisibleCount:u=10,revealIncrement:m=10,onUpdateIssue:f}){const[h,g]=(0,x.useState)(null),v=`${u}:${m}`,[y,j]=(0,x.useState)({paginationKey:v,counts:{}}),k=y.paginationKey===v?y.counts:{},S=(0,x.useMemo)(()=>new Set(c),[c]),N=D0(wc(Rf,{activationConstraint:{distance:5}})),_=(0,x.useMemo)(()=>{const z={};for(const K of Fg)z[K]=[];for(const K of e)z[K.status]&&z[K.status].push(K);return z},[e]),I=(0,x.useMemo)(()=>h?e.find(z=>z.id===h):null,[h,e]),D=(0,x.useMemo)(()=>HA(e,i??new Set),[e,i]);function T(z){g(z.active.id)}r(T,"handleDragStart");function C(z){g(null);const{active:K,over:P}=z;if(!P)return;const A=K.id,B=e.find(W=>W.id===A);if(!B)return;const O=k9(P.id,e);O&&O!==B.status&&f(A,{status:O})}r(C,"handleDragEnd");function M(z){}return r(M,"handleDragOver"),(0,s.jsxs)(P0,{sensors:N,onDragStart:T,onDragOver:M,onDragEnd:C,children:[(0,s.jsx)("div",{className:"flex gap-3 overflow-x-auto pb-4 -mx-2 px-2",children:Fg.map(z=>(0,s.jsx)(S9,{status:z,issues:_[z]??[],agents:t,liveIssueIds:i,subtreeLiveCounts:D,compactCards:l,collapsed:S.has(z)||S.size>0&&_[z].length===0,visibleCount:k[z]??u,revealIncrement:m,onShowMore:r(()=>{j(K=>{const P=K.paginationKey===v?K.counts:{};return{paginationKey:v,counts:{...P,[z]:(P[z]??u)+m}}})},"onShowMore")},z))}),(0,s.jsx)(EL,{children:I?(0,s.jsx)(QA,{issue:I,agents:t,isOverlay:!0,compact:l}):null})]})}r(N9,"KanbanBoard");function uf(e,t){const i=new Set(e.map(m=>m.id)),l=r(m=>!m.parentId||!i.has(m.parentId)||t?.has(m.id)===!0,"isRoot"),c=e.filter(l),u=new Map;for(const m of e)if(m.parentId&&!l(m)){const f=u.get(m.parentId)??[];f.push(m),u.set(m.parentId,f)}return{roots:c,childMap:u}}r(uf,"buildIssueTree");function GA(e,t){return(t.get(e)??[]).reduce((i,l)=>i+1+GA(l.id,t),0)}r(GA,"countDescendants");function ZG(e,t){const i=new Map;for(const m of t){if(!m.parentId)continue;const f=i.get(m.parentId)??[];f.push(m),i.set(m.parentId,f)}const l=[],c=new Set([e]);let u=[e];for(;u.length>0;){const m=[];for(const f of u)for(const h of i.get(f)??[])c.has(h.id)||(c.add(h.id),l.push(h),m.push(h.id));u=m}return l}r(ZG,"filterIssueDescendants");function C9(e,t){const i=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}:{},...i?{parentExecutionWorkspaceLabel:i}:{},...e.assigneeAgentId?{assigneeAgentId:e.assigneeAgentId}:{},...l?{assigneeUserId:l}:{}}}r(C9,"buildSubIssueDefaultsForViewer");function YA(){return typeof localStorage>"u"?null:localStorage}r(YA,"browserStorage");function Lh(e,t){if(!t)return null;try{const i=e.getItem(t);return i==null?null:JSON.parse(i)}catch{return null}}r(Lh,"parseStoredJson");function XA({companyId:e,collectionKey:t}){return`wardmote:task-collection:v1:${encodeURIComponent(e)}:${encodeURIComponent(t)}`}r(XA,"taskCollectionPreferencesStorageKey");function A9(e,t){if(!e||typeof e!="object")return!1;const i=e;return i.version===1&&i.companyId===t.companyId&&i.collectionKey===t.collectionKey&&"viewState"in i&&Array.isArray(i.columns)}r(A9,"isCurrentEnvelope");function Hg(e,t,i=YA()){if(!i)return;const l={version:1,companyId:e.companyId,collectionKey:e.collectionKey,viewState:t.viewState,viewStateSource:t.viewStateSource??"stored",columns:t.columns};try{i.setItem(XA(e),JSON.stringify(l)),e.legacyViewStorageKey&&i.setItem(e.legacyViewStorageKey,JSON.stringify(t.viewState)),e.legacyColumnsStorageKey&&i.setItem(e.legacyColumnsStorageKey,JSON.stringify(t.columns))}catch{}}r(Hg,"saveTaskCollectionPreferences");function _9({storage:e=YA(),defaultViewState:t,defaultColumns:i,normalizeViewState:l,normalizeColumns:c,...u}){if(!e)return{viewState:t,columns:i,migrated:!1,source:"default"};const m=Lh(e,XA(u));if(A9(m,u))return{viewState:l(m.viewState),columns:c(m.columns),migrated:!1,source:m.viewStateSource==="default"?"default":"current"};const f=Lh(e,u.legacyViewStorageKey),h=Lh(e,u.legacyColumnsStorageKey),g=f!==null||h!==null,v={viewState:f===null?t:l(f),columns:h===null?i:c(h)};return g&&Hg(u,{...v,viewStateSource:f===null?"default":"stored"},e),{...v,migrated:g,source:f!==null?"legacy":"default"}}r(_9,"loadTaskCollectionPreferences");var E9={today:"Today",yesterday:"Yesterday",earlier:"Earlier"};function Nk(e){return Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())}r(Nk,"localCalendarOrdinal");function I9(e,t=new Date){const i=e instanceof Date?e:new Date(e);if(Number.isNaN(i.getTime()))return"earlier";const l=Math.round((Nk(t)-Nk(i))/864e5);return l<=0?"today":l===1?"yesterday":"earlier"}r(I9,"taskDateGroup");function T9(e,t){return e===t||e===null&&t==="earlier"?null:E9[t]}r(T9,"taskDateGroupSeparator");var xd=200,bd=200;function Ck(e){const t=new Date(e.startedAt??e.createdAt).getTime();return Number.isFinite(t)?t:0}r(Ck,"runStartMs");function R9(e,t){const i=new Map(t.map(c=>[c.id,c.status])),l=new Map;for(const c of e??[]){if(!c.issueId||!c.modelFallback||!FA(c,i.get(c.issueId)))continue;const u=l.get(c.issueId);(!u||Ck(c)>Ck(u))&&l.set(c.issueId,c)}return l}r(R9,"fallbackRunsByIssueId");function vd(e){return e.type==="group"?`group:${e.key}`:`issue:${e.issue.id}`}r(vd,"issuesListNavEntryKey");function Vg(e){return typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(e):e.replace(/["\\]/g,"\\$&")}r(Vg,"escapeAttrValue");var ZA=100,D9=150,M9=320;function yd(e){if(!e||typeof window>"u")return null;let t=e.parentElement;for(;t&&t!==document.body&&t!==document.documentElement;){const i=window.getComputedStyle(t).overflowY;if(i==="auto"||i==="scroll"||i==="overlay")return t;t=t.parentElement}return null}r(yd,"findIssuesScrollContainer");var O9=12,L9=24;function JA(e){if(!e)return{top:0,bottom:window.innerHeight};const t=e.getBoundingClientRect();return{top:t.top,bottom:t.top+e.clientHeight}}r(JA,"issuesViewportBounds");function z9(e,t,i){const l=e.querySelectorAll("[data-issue-row-id]"),c=JA(t);let u=0,m=l.length;for(;u<m;){const h=u+m>>1;l[h].getBoundingClientRect().bottom<=c.top?u=h+1:m=h}const f=[];for(let h=u;h<l.length&&f.length<O9;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:i,rows:f}}r(z9,"captureIssueRowScrollAnchor");function P9(e,t,i){const l=JA(t),c=[];if(i.rows.forEach(({id:f,top:h},g)=>{const v=e.querySelector(`[data-issue-row-id="${Vg(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,m=0;for(let f=1;f<=c.length;f+=1){if(f<c.length&&c[f].shift-c[f-1].shift<=L9)continue;const h=c.slice(m,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}),m=f}return u.first.shift}r(P9,"issueRowAnchorShift");var U9=Ic,$9={backlog:"Backlog",todo:"Todo",in_progress:"In progress",in_review:"In review",done:"Done",blocked:"Blocked",cancelled:"Cancelled"},B9={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"},_d={...CS,sortField:"updated",sortDir:"desc",groupBy:"none",viewMode:"list",nestingEnabled:!0,showDateGroupSeparators:!0,collapsedGroups:[],collapsedParents:[],boardCardDensity:"auto",boardColdLaneMode:"expanded",boardColumnPageSize:10};function K9(e){return e==="compact"||e==="comfortable"||e==="auto"?e:"auto"}r(K9,"normalizeBoardCardDensity");function q9(e){return e==="collapsed"||e==="expanded"||e==="auto"?e:"auto"}r(q9,"normalizeBoardColdLaneMode");function F9(e){return WA.includes(e)?e:10}r(F9,"normalizeBoardColumnPageSize");function H9(e){const t=e&&typeof e=="object"?e:{};return{..._d,...t,...k3(t),workspaces:[],sortField:["status","priority","title","created","updated","workflow"].includes(t.sortField??"")?t.sortField:_d.sortField,sortDir:t.sortDir==="asc"?"asc":"desc",groupBy:["status","priority","assignee","project","workspace","parent","none"].includes(t.groupBy??"")?t.groupBy:_d.groupBy,viewMode:t.viewMode==="board"?"board":"list",nestingEnabled:t.nestingEnabled!==!1,showDateGroupSeparators:t.showDateGroupSeparators!==!1,collapsedGroups:Array.isArray(t.collapsedGroups)?t.collapsedGroups.filter(i=>typeof i=="string"):[],collapsedParents:Array.isArray(t.collapsedParents)?t.collapsedParents.filter(i=>typeof i=="string"):[],boardCardDensity:K9(t.boardCardDensity),boardColdLaneMode:q9(t.boardColdLaneMode),boardColumnPageSize:F9(t.boardColumnPageSize)}}r(H9,"normalizeIssueViewState");function V9(e,t,i){const l=e.source==="default"&&i?{...e.viewState,sortField:i,sortDir:"asc"}:e.viewState;return t?{...l,assignees:t,statuses:[]}:l}r(V9,"getInitialViewState");function Ak(e,t,i,l,c){const u=V9(e,t,l),m=i?{...u,workspaces:i,statuses:[]}:u;return c?{...m,statuses:c}:m}r(Ak,"getInitialWorkspaceViewState");function W9(e){return`${e}:issue-columns`}r(W9,"getIssueColumnsStorageKey");function _k(e){return _9({...e,defaultViewState:_d,defaultColumns:CN,normalizeViewState:H9,normalizeColumns:r(t=>EN(Array.isArray(t)?t:[]),"normalizeColumns")})}r(_k,"loadIssueCollectionPreferences");function Q9(e,t){if(t.sortField==="workflow"){const c=qA(e);return t.sortDir==="desc"?[...c].reverse():c}const i=[...e],l=t.sortDir==="asc"?1:-1;return i.sort((c,u)=>{switch(t.sortField){case"status":return l*(Pd.indexOf(c.status)-Pd.indexOf(u.status));case"priority":return l*(Wh.indexOf(c.priority)-Wh.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*Y9(c,u);default:return 0}}),i}r(Q9,"sortIssues");function G9(e,t,i,l){const c=Math.min(i.length,ZA);if(!e||e.identity!==t)return c;if(e.ids===i)return Math.min(i.length,Math.max(e.limit,l,c));const u=new Map;i.forEach((h,g)=>u.set(h,g));const m=Math.min(e.limit,e.ids.length);let f=-1;for(let h=0;h<m;h+=1){const g=u.get(e.ids[h]);g!==void 0&&g>f&&(f=g)}return Math.min(i.length,Math.max(f+1,l,c))}r(G9,"nextIssueRowRenderLimit");function Wg(e){return e.lastActivityAt??e.updatedAt}r(Wg,"issueRecencyDate");function Y9(e,t){const i=new Date(Wg(e)).getTime()-new Date(Wg(t)).getTime();return i!==0?i:new Date(e.updatedAt).getTime()-new Date(t.updatedAt).getTime()}r(Y9,"compareIssueRecency");function X9(e){return e.sortDir!=="desc"?null:e.sortField==="created"?t=>t.createdAt:e.sortField==="updated"?Wg:null}r(X9,"issueDateSeparatorDate");var e2=864e5,Z9=7*e2;function J9(e,t=Date.now()){const i=t-new Date(e).getTime();return i<e2?0:i<Z9?1:2}r(J9,"issueAgeBucket");function eF(e){return e===1?"Older than a day":"Older than a week"}r(eF,"issueAgeSeparatorLabel");function tF(e,t){const i=[];return e<1&&t>=1&&i.push(1),e<2&&t>=2&&i.push(2),i}r(tF,"issueAgeBucketsCrossed");function Ek({label:e}){return(0,s.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,s.jsx)("span",{className:"h-px min-w-0 flex-1 bg-line/80","aria-hidden":"true","data-date-group-rule":""}),(0,s.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,s.jsx)("span",{className:"h-px min-w-0 flex-1 bg-line/80","aria-hidden":"true","data-date-group-rule":""})]})}r(Ek,"IssueDateSeparator");function nF(e){return e!=="done"&&e!=="cancelled"&&e!=="blocked"}r(nF,"isActionableWorkflowStatus");function sF(e,t){const i=new Map;if(!t)return e.forEach((m,f)=>{i.set(m.id,String(f+1))}),i;const{roots:l,childMap:c}=uf(e),u=r((m,f)=>{m.forEach((h,g)=>{const v=f?`${f}.${g+1}`:String(g+1);i.set(h.id,v),u(c.get(h.id)??[],v)})},"visit");return u(l,null),e.forEach((m,f)=>{i.has(m.id)||i.set(m.id,String(f+1))}),i}r(sF,"buildChecklistStepNumberMap");function aF(e,t){const i=new Map;if(!t){const m=new Map;for(const f of e){if(!f.parentId)continue;const h=m.get(f.parentId);h&&i.set(f.id,h.id),m.set(f.parentId,f)}return i}const{roots:l,childMap:c}=uf(e),u=r(m=>{m.forEach((f,h)=>{const g=h>0?m[h-1]:null;f.parentId&&g?.parentId===f.parentId&&i.set(f.id,g.id),u(c.get(f.id)??[])})},"visit");return u(l),i}r(aF,"buildPreviousSiblingIssueIdMap");function iF(e,t,i){return!!(e.parentId&&i&&(e.blockedBy??[]).length===1&&t.length===1&&t[0]===i)}r(iF,"shouldSuppressSinglePreviousSiblingBlockerChip");function rF({context:e,search:t,controls:i}){return(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2 sm:gap-3",children:[(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2 sm:gap-3",children:[e,t]}),(0,s.jsx)("div",{className:"flex shrink-0 items-center gap-0.5 sm:gap-1",children:i})]})}r(rF,"LegacyIssuesToolbar");function lF({value:e,context:t,onDebouncedChange:i}){return(0,s.jsx)(M7,{value:e,context:t,onChange:r(({raw:l})=>i(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(iB({key:l.key,isComposing:l.nativeEvent.isComposing})){l.currentTarget.blur();return}rB({key:l.key,isComposing:l.nativeEvent.isComposing,currentValue:l.currentTarget.value})&&l.currentTarget.blur()},"onKeyDown")})}r(lF,"IssueSearchInput");function oF({summary:e,issueLinkState:t,parentIssueIdForCostSummary:i}){const l=e.target,c=l?.issue??null,u=c?.identifier??c?.id??"",m=c?i0(t,c):void 0,f=Ic.map(k=>({status:k,count:e.countsByStatus[k]??0})).filter(k=>k.count>0),h=e.inProgressCount>0,g=S7({visibleMs:5e3}),{data:v}=ge({queryKey:U.issues.costSummary(i??"pending",{excludeRoot:!0}),queryFn:r(()=>hn.getCostSummary(i,{excludeRoot:!0}),"queryFn"),enabled:!!i,refetchInterval:h?g:!1}),y=v?v.inputTokens+v.cachedInputTokens+v.outputTokens:0,j=!!v&&(v.runCount>0||y>0);return(0,s.jsx)("div",{className:"border border-line bg-bg p-3",children:(0,s.jsxs)("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-center lg:justify-between",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1 space-y-2",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-sm",children:[(0,s.jsxs)("span",{className:"font-medium text-ink",children:[e.doneCount,"/",e.totalCount," done"]}),(0,s.jsxs)("span",{className:"text-ink-3",children:[e.inProgressCount," in progress"]}),(0,s.jsxs)("span",{className:"text-ink-3",children:[e.blockedCount," blocked"]}),j&&(0,s.jsxs)(s.Fragment,{children:[(0,s.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:[tE(y)," tokens"]}),(0,s.jsxs)("span",{className:"text-ink-3 tabular-nums",children:[G_(v.runtimeMs)," runtime"]})]})]}),(0,s.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,s.jsx)("span",{className:X("h-full",B9[k]),style:{width:`${S/e.totalCount*100}%`},title:`${$9[k]}: ${S}`,"aria-hidden":"true"},k))})]}),(0,s.jsx)("div",{className:"min-w-0 border border-line bg-bg px-3 py-2 text-sm lg:w-72",children:l&&c?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"text-xs font-medium text-ink-3",children:l.kind==="next"?"Next up":"Waiting on blockers"}),(0,s.jsxs)(gn,{to:Td(u),state:m,issuePrefetch:c,className:"mt-1 block min-w-0 text-ink underline-offset-2 hover:underline",children:[(0,s.jsx)("span",{className:"font-mono text-xs text-ink-3",children:c.identifier??c.id.slice(0,8)})," ",(0,s.jsx)("span",{children:c.title})]})]}):e.totalCount===0?(0,s.jsx)("div",{className:"text-sm font-medium text-ink",children:"No active sub-tasks"}):e.doneCount===e.totalCount?(0,s.jsx)("div",{className:"text-sm font-medium text-ink",children:"All sub-tasks done"}):(0,s.jsx)("div",{className:"text-sm font-medium text-ink",children:"No actionable sub-tasks"})})]})})}r(oF,"SubIssueProgressSummaryStrip");var Ik=["","pl-4 sm:pl-0","pl-8 sm:pl-0","pl-12 sm:pl-0","pl-16 sm:pl-0"];function cF(e){return(0,s.jsx)(uF,{...e})}r(cF,"IssuesList");function uF({issues:e,isLoading:t,error:i,agents:l,projects:c,liveIssueIds:u,liveRuns:m,projectId:f,viewStateKey:h,issueLinkState:g,initialAssignees:v,initialWorkspaces:y,initialStatuses:j,initialSearch:k,searchFilters:S,searchWithinLoadedIssues:N=!1,baseCreateIssueDefaults:_,createIssueLabel:I,defaultSortField:D,showProgressSummary:T=!1,parentIssueIdForCostSummary:C,enableRoutineVisibilityFilter:M=!1,hasMoreIssues:z=!1,isLoadingMoreIssues:K=!1,mutedIssueIds:P,issueBadgeById:A,onLoadMoreIssues:B,onSearchChange:O,rowPresentation:W="legacy",toolbarContext:Y,toolbarPresentation:ce="legacy",listHeader:oe,onUpdateIssue:$}){const R=(0,x.useRef)(null),ne=bs(),ue=wn(),[ae,Ee]=(0,x.useState)(null),fe=(0,x.useRef)(!0);(0,x.useEffect)(()=>{const V=r(()=>{fe.current=!0},"handlePointerMove");return window.addEventListener("mousemove",V,{passive:!0}),()=>window.removeEventListener("mousemove",V)},[]);const Ae=(0,x.useRef)(null),Ce=(0,x.useCallback)(V=>{fe.current&&(Ae.current=V,Ee(Q=>Q===null?Q:null))},[]),{selectedCompanyId:Se}=vt(),{openNewIssue:he}=Pa(),{data:De}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),{data:Ye}=ge({queryKey:U.access.companyUserDirectory(Se),queryFn:r(()=>Xa.listUserDirectory(Se),"queryFn"),enabled:!!Se}),{data:ze}=ge({queryKey:U.instance.experimentalSettings,queryFn:r(()=>fs.getExperimental(),"queryFn"),retry:!1}),ve=De?.user?.id??De?.session?.userId??null,ft=ze!==void 0,At=ze?.enableIsolatedWorkspaces===!0,xt=ze?.enableExternalObjects===!0,Pt=Se?`${h}:${Se}`:h,de={companyId:Se??"__unscoped__",collectionKey:h,legacyViewStorageKey:Pt,legacyColumnsStorageKey:W9(Pt)},Oe=v?.join("|")??"",qe=y?.join("|")??"",ut=j?`set:${j.join("|")}`:"",Vt=(0,x.useRef)(null);Vt.current===null&&(Vt.current=_k(de));const Wt=Vt.current,[H,rn]=(0,x.useState)(()=>Ak(Wt,v,y,D,j)),[je,$e]=(0,x.useState)(null),[He,mt]=(0,x.useState)(""),[it,Qt]=(0,x.useState)(k??""),[Rn,Gt]=(0,x.useState)(ZA),[Tt,Jt]=(0,x.useState)(Wt.columns),kt=(0,x.useRef)(!1),[Qn,pt]=(0,x.useState)(!1),dn=(0,x.useDeferredValue)(it).trim().toLowerCase();(0,x.useEffect)(()=>{Qt(k??"")},[k]);const{data:Rt}=ge({queryKey:U.issues.labels(Se),queryFn:r(()=>hn.listLabels(Se),"queryFn"),enabled:!!Se}),ln=(0,x.useMemo)(()=>({currentUserId:ve,agents:l,projects:c,labels:Rt}),[l,ve,Rt,c]),Dt=(0,x.useMemo)(()=>Ql(dn,ln),[dn,ln]),ht=Dt.query,Mt=ht.length>0||TC(Dt.filters),Re=Mt&&!N;(0,x.useEffect)(()=>{Mt||pt(!1)},[Mt]);const Me=(0,x.useRef)(`${Pt}::${Oe}::${qe}::${ut}`);(0,x.useEffect)(()=>{const V=`${Pt}::${Oe}::${qe}::${ut}`;if(Me.current!==V){Me.current=V;const Q=_k(de);rn(Ak(Q,v,y,D,j)),Jt(Q.columns)}},[Pt,v,Oe,y,qe,j,ut,D,de.companyId,de.collectionKey,de.legacyViewStorageKey,de.legacyColumnsStorageKey]);const Fe=(0,x.useCallback)(V=>{rn(Q=>{const Z={...Q,...V};return Hg(de,{viewState:Z,columns:Tt}),Z})},[de.companyId,de.collectionKey,de.legacyColumnsStorageKey,de.legacyViewStorageKey,Tt]);(0,x.useEffect)(()=>{!ft||xt||H.externalObjectStatuses.length===0||Fe({externalObjectStatuses:[]})},[ft,xt,Fe,H.externalObjectStatuses.length]),(0,x.useEffect)(()=>{const V=new Set(e.map(Z=>Z.parentId).filter(Boolean)),Q=H.collapsedParents.filter(Z=>V.has(Z));Q.length!==H.collapsedParents.length&&Fe({collapsedParents:Q})},[e]);const St=(0,x.useMemo)(()=>{if(!Mt)return{};const V={...Pz(H),...DC(Dt.filters)};return f&&(V.projectId=f),V},[Mt,Dt.filters,f,H]),{data:at=[]}=ge({queryKey:[...U.issues.search(Se,ht,f),S??{},St,"compact",xd,M?"with-routine-executions":"without-routine-executions"],queryFn:r(({signal:V})=>hn.listCompact(Se,{...St,...ht.length>0?{q:ht}:{},projectId:f,limit:xd,...S,...M?{includeRoutineExecutions:!0}:{}},{signal:V}).then(Q=>Q),"queryFn"),enabled:!!Se&&Re,placeholderData:r(V=>V,"placeholderData")}),Ot=t0({queries:U9.map(V=>({queryKey:[...U.issues.list(Se??"__no-company__"),"board-column",V,ht,St,f??"__all-projects__",S??{},"compact",bd,M?"with-routine-executions":"without-routine-executions"],queryFn:r(({signal:Q})=>St.status&&!St.status.split(",").includes(V)?Promise.resolve([]):hn.listCompact(Se,{...St,...S,...ht.length>0?{q:ht}:{},projectId:f,status:V,limit:bd,...M?{includeRoutineExecutions:!0}:{}},{signal:Q}).then(Z=>Z),"queryFn"),enabled:!!Se&&H.viewMode==="board"&&!N,placeholderData:r(Q=>Q,"placeholderData")}))}),{data:on=[]}=ge({queryKey:Se?U.executionWorkspaces.summaryList(Se):["execution-workspaces","__disabled__"],queryFn:r(()=>Lf.listSummaries(Se),"queryFn"),enabled:!!Se&&At}),Ut=(0,x.useCallback)(V=>!V||!l?null:l.find(Q=>Q.id===V)?.name??null,[l]),en=(0,x.useMemo)(()=>oP(Ye?.users),[Ye?.users]),tn=(0,x.useMemo)(()=>cP(Ye?.users),[Ye?.users]),fn=(0,x.useMemo)(()=>{const V=new Map;for(const Q of c??[])V.set(Q.id,{name:Q.name,color:Q.color??null});return V},[c]),An=(0,x.useMemo)(()=>{const V=new Map;for(const Q of c??[])for(const Z of Q.workspaces??[])V.set(Z.id,{name:Z.name||Q.name,projectId:Q.id});return V},[c]),Dn=(0,x.useMemo)(()=>{const V=new Map;for(const Q of c??[]){const Z=Q.executionWorkspacePolicy?.defaultProjectWorkspaceId??Q.primaryWorkspace?.id??null;Z&&V.set(Q.id,Z)}return V},[c]),ta=(0,x.useMemo)(()=>new Set(Dn.values()),[Dn]),ms=(0,x.useMemo)(()=>{const V=new Map;for(const Q of on){const Z=Q.projectWorkspaceId?An.get(Q.projectWorkspaceId)??null:null;V.set(Q.id,{name:Q.name,mode:Q.mode,projectWorkspaceId:Q.projectWorkspaceId??null,projectId:Z?.projectId??null})}return V},[on,An]),Is=(0,x.useMemo)(()=>({executionWorkspaceById:ms,defaultProjectWorkspaceIdByProjectId:Dn}),[Dn,ms]),na=(0,x.useMemo)(()=>{const V=new Map;for(const[Q,Z]of An)My({id:Q},ta)&&V.set(Q,Z.name);for(const[Q,Z]of ms)My({id:Q,mode:Z.mode,projectWorkspaceId:Z.projectWorkspaceId},ta)&&V.set(Q,Z.name);return V},[ta,ms,An]),ps=(0,x.useMemo)(()=>{const V=new Map,Q=new Set;ve&&V.set(`user:${ve}`,{id:`user:${ve}`,label:ve==="local-board"?"Board":"Me",kind:"user",searchText:ve==="local-board"?"board me human local-board":`me board human ${ve}`});for(const Z of e)if(Z.createdByUserId){const Te=`user:${Z.createdByUserId}`;V.has(Te)||V.set(Te,{id:Te,label:Ur(Z.createdByUserId,ve)??Z.createdByUserId.slice(0,5),kind:"user",searchText:`${Z.createdByUserId} board user human`})}for(const Z of l??[]){Q.add(Z.id);const Te=`agent:${Z.id}`;V.has(Te)||V.set(Te,{id:Te,label:Z.name,kind:"agent",searchText:`${Z.name} ${Z.id} agent`})}for(const Z of e)if(Z.createdByAgentId&&!Q.has(Z.createdByAgentId)){const Te=`agent:${Z.createdByAgentId}`;V.has(Te)||V.set(Te,{id:Te,label:Z.createdByAgentId.slice(0,8),kind:"agent",searchText:`${Z.createdByAgentId} agent`})}return[...V.values()].sort((Z,Te)=>Z.kind!==Te.kind?Z.kind==="user"?-1:1:Z.label.localeCompare(Te.label))},[l,ve,e]),bt=(0,x.useMemo)(()=>new Set(Tt),[Tt]),kn=(0,x.useMemo)(()=>xO(At),[At]),es=(0,x.useMemo)(()=>new Set(kn),[kn]),Ua=(0,x.useMemo)(()=>HA(e,u??new Set),[e,u]),Kn=(0,x.useMemo)(()=>R9(m,e),[e,m]),ja=(0,x.useMemo)(()=>V7.filter(V=>bt.has(V)&&es.has(V)&&(W==="legacy"||V!=="updated")),[es,W,bt]),Gn=(0,x.useMemo)(()=>{const V=new Map;for(const Q of e)V.set(Q.id,Q);return V},[e]),Sn=(0,x.useMemo)(()=>{const V=new Map;for(const Q of e)V.set(Q.id,Q.identifier?`${Q.identifier}: ${Q.title}`:Q.title);return V},[e]),Bs=(0,x.useMemo)(()=>{if(H.viewMode!=="board"||N)return null;const V=new Map;let Q=!1;for(const Z of Ot){Q||=Z.isPending;for(const Te of Z.data??[])V.set(Te.id,Te)}return V.size>0?[...V.values()]:Q?e:[]},[Ot,e,N,H.viewMode]),vs=(0,x.useMemo)(()=>H.viewMode==="board"&&!N&&Ot.some(V=>(V.data?.length??0)===bd),[Ot,N,H.viewMode]),Mn=(0,x.useMemo)(()=>Bs??(Re?at:e),[Bs,e,Re,at]),Ts=(0,x.useMemo)(()=>{if(!Mt||!N)return Mn;const V=MC(ht);return Mn.filter(Q=>Uz(Q,V)&&$z(Q,Dt.filters))},[Mt,ht,Dt.filters,N,Mn]),_n=Re&&!Qn&&H.viewMode==="list",mn=H.externalObjectStatuses.length>0,$a=(0,x.useMemo)(()=>H.viewMode==="list"||mn?Ts.map(V=>V.id):[],[mn,Ts,H.viewMode]),{summaries:Ba,isLoading:hs,isReady:ys}=A7(Se,$a),wa=(0,x.useMemo)(()=>({...Is,externalObjectSummaryByIssueId:Ba,externalObjectSummariesReady:ys&&!hs}),[hs,ys,Ba,Is]),Ka=mn&&hs&&!ys,Lt=(0,x.useMemo)(()=>{const V=AS(Ts,H,ve,M,u,wa);return _n?V:Q9(V,H)},[_n,Ts,H,ve,M,u,wa]),sa=(0,x.useMemo)(()=>L7(T,e.length)?z7(e):null,[e,T]),Ks=(0,x.useMemo)(()=>D==="workflow"&&H.groupBy==="none",[D,H.groupBy]),qs=(0,x.useMemo)(()=>{if(!Ks)return null;const V=new Set(Lt.map(et=>et.id)),Q=sF(Lt,H.nestingEnabled),Z=aF(Lt,H.nestingEnabled),Te=new Map;return Lt.forEach(et=>{const zt=(et.blockedBy??[]).map(rt=>rt.id).filter(rt=>{if(!V.has(rt))return!1;const cn=Gn.get(rt);return cn?cn.status!=="done"&&cn.status!=="cancelled":!1}),En=iF(et,zt,Z.get(et.id));Te.set(et.id,En?[]:zt)}),{stepNumberByIssueId:Q,unresolvedVisibleBlockersByIssueId:Te,currentStepIssueId:(Lt.find(et=>nF(et.status))??null??Lt.find(et=>et.status==="blocked")??null)?.id??null}},[Ks,Lt,Gn,H.nestingEnabled]),js=C3(H,M),On=H.viewMode==="board"&&Lt.length>100,ka=H.boardCardDensity==="compact"||H.boardCardDensity==="auto"&&On,Rs=(0,x.useMemo)(()=>H.boardColdLaneMode==="collapsed"||H.boardColdLaneMode==="auto"&&On?[...v9]:[],[On,H.boardColdLaneMode]),ie=H.boardCardDensity!=="auto"||H.boardColdLaneMode!=="auto"||H.boardColumnPageSize!==10,Ie=(0,x.useMemo)(()=>{if(H.groupBy==="none")return[{key:"__all",label:null,items:Lt}];if(H.groupBy==="status"){const Q=Dl(Lt,Z=>Z.status);return Pd.filter(Z=>Q[Z]?.length).map(Z=>({key:Z,label:Qh(Z),items:Q[Z]}))}if(H.groupBy==="priority"){const Q=Dl(Lt,Z=>Z.priority);return Wh.filter(Z=>Q[Z]?.length).map(Z=>({key:Z,label:Qh(Z),items:Q[Z]}))}if(H.groupBy==="workspace"){const Q=Dl(Lt,Z=>Dy(Z,Is)??"__no_workspace");return Object.keys(Q).sort((Z,Te)=>Z==="__no_workspace"?1:Te==="__no_workspace"?-1:(Q[Te]?.length??0)-(Q[Z]?.length??0)).map(Z=>({key:Z,label:Z==="__no_workspace"?"No Workspace":na.get(Z)??Z.slice(0,8),items:Q[Z]}))}if(H.groupBy==="project"){const Q=Dl(Lt,Z=>Z.projectId??"__no_project");return Object.keys(Q).sort((Z,Te)=>{if(Z==="__no_project")return 1;if(Te==="__no_project")return-1;const et=fn.get(Z)?.name??Z,zt=fn.get(Te)?.name??Te;return et.localeCompare(zt)}).map(Z=>({key:Z,label:Z==="__no_project"?"No Project":fn.get(Z)?.name??Z.slice(0,8),items:Q[Z]}))}if(H.groupBy==="parent"){const Q=Dl(Lt,Z=>Z.parentId??"__no_parent");return Object.keys(Q).sort((Z,Te)=>Z==="__no_parent"?1:Te==="__no_parent"?-1:(Q[Te]?.length??0)-(Q[Z]?.length??0)).map(Z=>({key:Z,label:Z==="__no_parent"?"No Parent":Sn.get(Z)??Z.slice(0,8),items:Q[Z]}))}const V=Dl(Lt,Q=>Q.assigneeAgentId??(Q.assigneeUserId?`__user:${Q.assigneeUserId}`:"__unassigned"));return Object.keys(V).map(Q=>({key:Q,label:Q==="__unassigned"?"Unassigned":Q.startsWith("__user:")?Ur(Q.slice(7),ve,en)??"User":Ut(Q)??Q.slice(0,8),items:V[Q]}))},[Lt,Is,H.groupBy,l,Ut,ve,na,Sn,en,fn]),Le=(0,x.useMemo)(()=>JSON.stringify([Pt,dn,H.statuses,H.priorities,H.assignees,H.creators,H.labels,H.projects,H.workspaces,H.liveOnly??!1,H.externalObjectStatuses,H.hideRoutineExecutions,H.sortField,H.sortDir,H.groupBy,H.viewMode,H.nestingEnabled,_n]),[Pt,dn,H.statuses,H.priorities,H.assignees,H.creators,H.labels,H.projects,H.workspaces,H.liveOnly,H.externalObjectStatuses,H.hideRoutineExecutions,H.sortField,H.sortDir,H.groupBy,H.viewMode,H.nestingEnabled,_n]),nt=(0,x.useRef)({identity:"",keptRootIds:new Set,seenIds:new Set,knownIds:new Set}),gt=(0,x.useMemo)(()=>{const V=new Map;if(H.viewMode!=="list")return V;const Q=nt.current.identity===Le?nt.current:null;for(const Z of Ie){if(!H.nestingEnabled){V.set(Z.key,{roots:Z.items,childMap:new Map});continue}let Te;if(Q){Te=new Set(Q.keptRootIds);for(const et of Z.items)et.parentId&&!Q.knownIds.has(et.id)&&Q.seenIds.has(et.parentId)&&Te.add(et.id)}V.set(Z.key,uf(Z.items,Te))}return V},[Ie,Le,H.nestingEnabled,H.viewMode]),qt=r(V=>gt.get(V.key)??(H.nestingEnabled?uf(V.items):{roots:V.items,childMap:new Map}),"issueTreeForGroup"),Ds=(0,x.useMemo)(()=>{if(H.viewMode!=="list")return[];const V=[];let Q=0;for(const Z of Ie){const Te=!!Z.label&&H.collapsedGroups.includes(Z.key);Z.label&&V.push({type:"group",key:Z.key,collapsed:Te});const{roots:et,childMap:zt}=qt(Z),En=r(rt=>{Q+=1;const cn=zt.get(rt.id)??[],_t=!H.collapsedParents.includes(rt.id);if(Te||V.push({type:"issue",issue:rt,hasChildren:cn.length>0,expanded:_t,budgetOrdinal:Q}),_t)for(const ye of cn)En(ye)},"walk");for(const rt of et)En(rt)}return V},[Ie,H.viewMode,H.collapsedGroups,H.collapsedParents,H.nestingEnabled]),J=(0,x.useRef)({flatNavEntries:Ds,selectedNavKey:ae,viewMode:H.viewMode,issueLinkState:g,collapsedGroups:H.collapsedGroups,collapsedParents:H.collapsedParents,updateView:Fe});J.current={flatNavEntries:Ds,selectedNavKey:ae,viewMode:H.viewMode,issueLinkState:g,collapsedGroups:H.collapsedGroups,collapsedParents:H.collapsedParents,updateView:Fe};const _e=(0,x.useCallback)(V=>{if(V.startsWith("group:")){const Z=R.current?.querySelector(`[data-issues-group-key="${Vg(V.slice(6))}"]`);return Z instanceof HTMLElement?Z:null}const Q=R.current?.querySelector(`[data-issue-row-id="${Vg(V.slice(6))}"]`)?.querySelector("[data-inbox-issue-link]");return Q instanceof HTMLElement?Q:null},[]);(0,x.useEffect)(()=>{const V=r(Q=>{if(Q.defaultPrevented)return;const Z=Q.target;if(!(Z instanceof HTMLElement)||ao(Z)||Cg(document)||Q.metaKey||Q.ctrlKey||Q.altKey)return;const Te=J.current;if(Te.viewMode!=="list"||Te.flatNavEntries.length===0)return;const et=r(rt=>rt?Te.flatNavEntries.findIndex(cn=>vd(cn)===rt):-1,"indexOfKey"),zt=et(Ae.current),En=fe.current&&zt>=0?zt:et(Te.selectedNavKey);switch(Q.key){case"j":case"ArrowDown":case"k":case"ArrowUp":{Q.preventDefault(),fe.current=!1;const rt=Q.key==="j"||Q.key==="ArrowDown"?"next":"previous",cn=wO(En,Te.flatNavEntries.length,rt),_t=Te.flatNavEntries[cn];if(!_t)break;Ee(vd(_t)),_t.type==="issue"&&Gt(ye=>Math.max(ye,_t.budgetOrdinal+1));break}case"ArrowLeft":case"ArrowRight":{const rt=Te.flatNavEntries[En];if(!rt)return;const cn=Q.key==="ArrowLeft";if(rt.type==="group"){Q.preventDefault(),fe.current=!1,Ee(vd(rt)),Te.updateView({collapsedGroups:cn?Te.collapsedGroups.includes(rt.key)?Te.collapsedGroups:[...Te.collapsedGroups,rt.key]:Te.collapsedGroups.filter(_t=>_t!==rt.key)});break}if(!rt.hasChildren)return;Q.preventDefault(),fe.current=!1,Ee(vd(rt)),Te.updateView({collapsedParents:cn?Te.collapsedParents.includes(rt.issue.id)?Te.collapsedParents:[...Te.collapsedParents,rt.issue.id]:Te.collapsedParents.filter(_t=>_t!==rt.issue.id)});break}case"Enter":{const rt=Te.flatNavEntries[En];if(!rt||rt.type!=="issue")return;Q.preventDefault();const cn=rt.issue,_t=cn.identifier??cn.id,ye=i0(Te.issueLinkState,cn);Bh(_t,ye),_E(ue,_t,{issue:cn}),ne(Td(_t),{state:ye});break}default:return}},"handleKeyDown");return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[ne,ue]);const Be=(0,x.useMemo)(()=>{if(H.viewMode!=="list")return[];const V=[];for(const Q of Ie){const{roots:Z,childMap:Te}=qt(Q),et=r(zt=>{if(V.push(zt.id),!H.collapsedParents.includes(zt.id))for(const En of Te.get(zt.id)??[])et(En)},"walk");for(const zt of Z)et(zt)}return V},[Ie,H.collapsedParents,H.nestingEnabled,H.viewMode]),Xe=(0,x.useRef)(null),Ve=(0,x.useMemo)(()=>H.viewMode==="list"?G9(Xe.current,Le,Be,Rn):Rn,[Be,Le,Rn,H.viewMode]);(0,x.useLayoutEffect)(()=>{H.viewMode==="list"&&(Xe.current={identity:Le,ids:Be,limit:Ve},Rn!==Ve&&Gt(Ve))},[Be,Le,Ve,Rn,H.viewMode]),(0,x.useEffect)(()=>{ae&&_e(ae)?.scrollIntoView({block:"nearest"})},[_e,Ve,ae]),(0,x.useLayoutEffect)(()=>{if(!H.nestingEnabled||H.viewMode!=="list")return;const V=nt.current,Q=V.identity===Le?V:{identity:Le,keptRootIds:new Set,seenIds:new Set,knownIds:new Set},Z=Be.slice(0,Ve);for(const Te of Z)Q.seenIds.add(Te);for(const Te of Ie)for(const et of Te.items)Q.knownIds.add(et.id);for(const Te of gt.values())for(const et of Te.roots)et.parentId&&(Q.seenIds.has(et.id)||Q.knownIds.has(et.parentId))&&Q.keptRootIds.add(et.id);nt.current=Q},[Be,Ie,gt,Le,Ve,H.nestingEnabled,H.viewMode]);const ot=(0,x.useRef)(null),yt=(0,x.useCallback)(()=>{const V=R.current;if(!V||H.viewMode!=="list"){ot.current=null;return}ot.current=z9(V,yd(V),Le)},[Le,H.viewMode]);(0,x.useEffect)(()=>{if(H.viewMode!=="list")return;const V=yd(R.current)??window;return V.addEventListener("scroll",yt,{passive:!0}),()=>V.removeEventListener("scroll",yt)},[yt,H.viewMode]),(0,x.useLayoutEffect)(()=>{const V=R.current,Q=ot.current;if(V&&Q&&Q.identity===Le&&H.viewMode==="list"){const Z=yd(V),Te=P9(V,Z,Q);if(Te===null)return;Te!==0&&(Z?Z.scrollTop+=Te:window.scrollBy(0,Te))}yt()},[Be,yt,Le,Ve,H.viewMode]);const pn=(0,x.useRef)(null),Ln=!!oe&&H.viewMode==="list"&&!H.liveOnly&&dn.length===0;(0,x.useLayoutEffect)(()=>{const V=pn.current;if(!Ln||!V||typeof ResizeObserver>"u")return;const Q=new ResizeObserver(()=>yt());return Q.observe(V),()=>Q.disconnect()},[yt,Ln]);const Ms=H.viewMode==="list"&&Ve<Lt.length,zn=Math.max(Lt.length-Ve,0),Ft=(0,x.useCallback)(()=>{if(H.viewMode==="list"){if(Ms){Gt(Math.min(Lt.length,Ve+D9));return}z&&!K&&B?.()}},[Lt.length,z,Ms,K,B,Ve,H.viewMode]),Nn=H.viewMode==="list"&&!t&&(Ms||z&&!K);(0,x.useEffect)(()=>{if(!Nn)return;let V=null;const Q=yd(R.current),Z=Q??window,Te=r((En="scroll")=>{V===null&&(V=window.requestAnimationFrame(()=>{V=null;const rt=Q?.scrollHeight??document.documentElement.scrollHeight;if(rt===0)return;const cn=Q?.clientHeight??window.innerHeight,_t=Q?Q.scrollTop+Q.clientHeight:window.scrollY+window.innerHeight,ye=rt>cn+1;if(_t>=rt-M9){if(En==="initial"&&!Ms&&z&&!ye){if(kt.current)return;kt.current=!0}Ft()}}))},"checkScrollPosition"),et=r(()=>Te("scroll"),"handleScroll"),zt=r(()=>Te("resize"),"handleResize");return Z.addEventListener("scroll",et,{passive:!0}),window.addEventListener("resize",zt),Te("initial"),()=>{Z.removeEventListener("scroll",et),window.removeEventListener("resize",zt),V!==null&&window.cancelAnimationFrame(V)}},[Nn,z,Ms,Ft]);const ws=(0,x.useCallback)(V=>{const Q=V?.key,Z={..._??{}};if(f&&Z.projectId===void 0&&(Z.projectId=f),Q){if(H.groupBy==="status")Z.status=Q;else if(H.groupBy==="priority")Z.priority=Q;else if(H.groupBy==="assignee"&&Q!=="__unassigned")Q.startsWith("__user:")?Z.assigneeUserId=Q.slice(7):Z.assigneeAgentId=Q;else if(H.groupBy==="project"&&Q!=="__no_project")Z.projectId=Q;else if(H.groupBy==="workspace"&&Q!=="__no_workspace"){const Te=V?.items.find(zt=>zt.executionWorkspaceId===Q||zt.projectWorkspaceId===Q)??null,et=ms.get(Q);if(et){Z.executionWorkspaceId=Q,Z.executionWorkspaceMode="reuse_existing",et.projectWorkspaceId&&(Z.projectWorkspaceId=et.projectWorkspaceId);const zt=et.projectId??(et.projectWorkspaceId?An.get(et.projectWorkspaceId)?.projectId:null)??(Te?.executionWorkspaceId===Q?Te.projectId:null);zt&&(Z.projectId=zt)}else{const zt=An.get(Q);zt&&(Z.projectWorkspaceId=Q,Z.projectId=zt.projectId)}}else if(H.groupBy==="parent"&&Q!=="__no_parent"){const Te=Gn.get(Q);Te?Object.assign(Z,C9(Te,ve)):Z.parentId=Q}}return Z},[_,ve,ms,Gn,f,An,H.groupBy]),Fs=I?`Create ${I}`:"Create Task",Yt=I?`New ${I}`:"New Task",gs=(0,x.useCallback)(V=>{he(ws(V))},[ws,he]),cr=(0,x.useCallback)(V=>{Fe({workspaces:[V]})},[Fe]),aa=(0,x.useCallback)(V=>{const Q=EN(V);Jt(Q),Hg(de,{viewState:H,columns:Q})},[de.companyId,de.collectionKey,de.legacyColumnsStorageKey,de.legacyViewStorageKey,H]),$c=(0,x.useCallback)((V,Q)=>{if(Q){aa([...Tt,V]);return}aa(Tt.filter(Z=>Z!==V))},[aa,Tt]),ei=(0,x.useCallback)((V,Q,Z=null)=>{$(V,{assigneeAgentId:Q,assigneeUserId:Z}),$e(null),mt("")},[$]);let Hs=H.viewMode==="list"?Ve:Number.POSITIVE_INFINITY;return(0,s.jsxs)("div",{ref:R,className:"wardmote-issue-list space-y-4",children:[sa?(0,s.jsx)(oF,{summary:sa,issueLinkState:g,parentIssueIdForCostSummary:C}):null,(0,s.jsx)(ce==="collection"?g9:rF,{className:"wardmote-task-list-toolbar",ariaLabel:ce==="collection"?"Task controls":void 0,context:Y?(0,s.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[Y,(0,s.jsxs)(le,{size:"sm",variant:"secondary","aria-label":Yt,onClick:r(()=>gs(),"onClick"),children:[(0,s.jsx)(Js,{className:"h-4 w-4 sm:mr-1"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:Yt})]})]}):(0,s.jsxs)(le,{size:"sm",variant:"secondary","aria-label":Yt,onClick:r(()=>gs(),"onClick"),children:[(0,s.jsx)(Js,{className:"h-4 w-4 sm:mr-1"}),(0,s.jsx)("span",{className:"hidden sm:inline",children:Yt})]}),search:(0,s.jsx)(lF,{value:it,context:ln,onDebouncedChange:r(V=>{Qt(V),O?.(V)},"onDebouncedChange")}),controls:(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center border border-line rounded-md overflow-hidden mr-1",role:"group","aria-label":"View mode",children:[(0,s.jsx)("button",{className:`flex h-8 w-8 items-center justify-center transition-colors ${H.viewMode==="list"?"bg-bg-3 text-ink":"text-ink-3 hover:text-ink"}`,onClick:r(()=>Fe({viewMode:"list"}),"onClick"),title:"List view","aria-label":"List view","aria-pressed":H.viewMode==="list",children:(0,s.jsx)(HT,{className:"h-3.5 w-3.5"})}),(0,s.jsx)("button",{className:`flex h-8 w-8 items-center justify-center transition-colors ${H.viewMode==="board"?"bg-bg-3 text-ink":"text-ink-3 hover:text-ink"}`,onClick:r(()=>Fe({viewMode:"board"}),"onClick"),title:"Board view","aria-label":"Board view","aria-pressed":H.viewMode==="board",children:(0,s.jsx)(eR,{className:"h-3.5 w-3.5"})})]}),H.viewMode==="list"&&(0,s.jsx)(le,{active:H.nestingEnabled,type:"button",variant:"secondary",size:"icon",className:X("hidden h-8 w-8 shrink-0 sm:inline-flex"),onClick:r(()=>Fe({nestingEnabled:!H.nestingEnabled}),"onClick"),title:H.nestingEnabled?"Disable parent-child nesting":"Enable parent-child nesting",children:(0,s.jsx)(f1,{className:"h-3.5 w-3.5"})}),H.viewMode==="board"&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(le,{active:ka,type:"button",variant:"secondary",size:"icon",className:X("h-8 w-8 shrink-0"),onClick:r(()=>Fe({boardCardDensity:ka?"comfortable":"compact"}),"onClick"),title:ka?"Use comfortable cards":"Use compact cards",children:(0,s.jsx)(TT,{className:"h-3.5 w-3.5"})}),(0,s.jsx)(le,{active:Rs.length>0,type:"button",variant:"secondary",size:"icon",className:X("h-8 w-8 shrink-0"),onClick:r(()=>Fe({boardColdLaneMode:Rs.length>0?"expanded":"collapsed"}),"onClick"),title:Rs.length>0?"Expand cold lanes":"Collapse cold lanes",children:(0,s.jsx)(QT,{className:"h-3.5 w-3.5"})}),(0,s.jsxs)(va,{children:[(0,s.jsx)(xa,{asChild:!0,children:(0,s.jsxs)(le,{active:H.boardColumnPageSize!==10,type:"button",variant:"secondary",size:"sm",className:X("h-8 shrink-0 gap-1.5 px-2"),title:"Cards per column",children:[(0,s.jsx)(FT,{className:"h-3.5 w-3.5"}),(0,s.jsx)("span",{className:"min-w-4 text-xs tabular-nums",children:H.boardColumnPageSize})]})}),(0,s.jsx)(ba,{align:"end",className:"w-40 p-0",children:(0,s.jsx)("div",{className:"p-2 space-y-0.5",children:WA.map(V=>(0,s.jsxs)("button",{type:"button",className:X("flex w-full items-center justify-between rounded-sm px-2 py-1.5 text-sm",H.boardColumnPageSize===V?"bg-bg-3/50 text-ink":"text-ink-3 hover:bg-bg-3/50"),onClick:r(()=>Fe({boardColumnPageSize:V}),"onClick"),children:[(0,s.jsxs)("span",{children:[V," per column"]}),H.boardColumnPageSize===V&&(0,s.jsx)(Ta,{className:"h-3.5 w-3.5"})]},V))})})]}),(0,s.jsx)(le,{type:"button",variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",onClick:r(()=>Fe({boardCardDensity:"auto",boardColdLaneMode:"expanded",boardColumnPageSize:10}),"onClick"),disabled:!ie,title:"Reset board density",children:(0,s.jsx)(ic,{className:"h-3.5 w-3.5"})})]}),(0,s.jsx)(Z7,{availableColumns:kn,visibleColumnSet:bt,onToggleColumn:$c,showDateGroupSeparators:H.showDateGroupSeparators,onToggleDateGroupSeparators:r(V=>Fe({showDateGroupSeparators:V}),"onToggleDateGroupSeparators"),onResetColumns:r(()=>aa(CN),"onResetColumns"),title:"Choose which task columns stay visible",iconOnly:!0,rowPresentation:W}),(0,s.jsx)(l9,{state:H,onChange:Fe,buttonVariant:"secondary",activeFilterCount:js,agents:l,creators:ps,projects:c?.map(V=>({id:V.id,name:V.name})),labels:Rt?.map(V=>({id:V.id,name:V.name,color:V.color})),currentUserId:ve,enableExternalObjectFilters:xt,enableRoutineVisibilityFilter:M,iconOnly:!0,presentation:W==="task"?"streamlined":"legacy"}),H.viewMode==="list"&&(0,s.jsxs)(va,{children:[(0,s.jsx)(xa,{asChild:!0,children:(0,s.jsx)(le,{variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",title:"Sort",children:(0,s.jsx)(tI,{className:"h-3.5 w-3.5"})})}),(0,s.jsx)(ba,{align:"end",className:"w-48 p-0",children:(0,s.jsxs)("div",{className:"p-2 space-y-0.5",children:[Re&&(0,s.jsx)("button",{className:`flex items-center justify-between w-full px-2 py-1.5 text-sm rounded-sm ${_n?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>pt(!1),"onClick"),children:(0,s.jsx)("span",{children:"Relevance"})}),[["workflow","Workflow"],["status","Status"],["priority","Priority"],["title","Title"],["created","Created"],["updated","Updated"]].filter(([V])=>V!=="priority").map(([V,Q])=>(0,s.jsxs)("button",{className:`flex items-center justify-between w-full px-2 py-1.5 text-sm rounded-sm ${!_n&&H.sortField===V?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>{Re&&pt(!0),_n?Fe({sortField:V,sortDir:V==="updated"||V==="created"?"desc":"asc"}):H.sortField===V?Fe({sortDir:H.sortDir==="asc"?"desc":"asc"}):Fe({sortField:V,sortDir:"asc"})},"onClick"),children:[(0,s.jsx)("span",{children:Q}),!_n&&H.sortField===V&&(0,s.jsx)("span",{className:"text-xs text-ink-3",children:H.sortDir==="asc"?"↑":"↓"})]},V))]})})]}),H.viewMode==="list"&&(0,s.jsxs)(va,{children:[(0,s.jsx)(xa,{asChild:!0,children:(0,s.jsx)(le,{variant:"secondary",size:"icon",className:"h-8 w-8 shrink-0",title:"Group",children:(0,s.jsx)(hf,{className:"h-3.5 w-3.5"})})}),(0,s.jsx)(ba,{align:"end",className:"w-44 p-0",children:(0,s.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(([V])=>V!=="priority").map(([V,Q])=>(0,s.jsxs)("button",{className:`flex items-center justify-between w-full px-2 py-1.5 text-sm rounded-sm ${H.groupBy===V?"bg-bg-3/50 text-ink":"hover:bg-bg-3/50 text-ink-3"}`,onClick:r(()=>Fe({groupBy:V}),"onClick"),children:[(0,s.jsx)("span",{children:Q}),H.groupBy===V&&(0,s.jsx)(Ta,{className:"h-3.5 w-3.5"})]},V))})})]})]})}),Ln?(0,s.jsx)("div",{ref:pn,children:oe}):null,(t||Ka)&&(0,s.jsx)(x9,{variant:"issues-list"}),i&&(0,s.jsx)("p",{className:"text-sm text-bad",children:i.message}),Re&&at.length===xd&&(0,s.jsxs)("p",{className:"text-xs text-ink-3",children:["Showing up to ",xd," matches. Refine the search to narrow further."]}),vs&&(0,s.jsxs)("p",{className:"text-xs text-ink-3",children:["Some board columns are showing up to ",bd," tasks. Refine filters or search to reveal the rest."]}),!t&&!Ka&&Lt.length===0&&H.viewMode==="list"&&(0,s.jsx)(n9,{icon:Ld,message:"No tasks match the current filters or search.",action:Fs,onAction:r(()=>gs(),"onAction")}),H.viewMode==="board"?(0,s.jsx)(N9,{issues:Lt,agents:l,liveIssueIds:u,compactCards:ka,collapsedStatuses:Rs,initialVisibleCount:H.boardColumnPageSize,revealIncrement:H.boardColumnPageSize,onUpdateIssue:$}):(0,s.jsxs)("div",{className:"-mx-2 sm:mx-0",children:[Ie.map(V=>Hs<=0?null:(0,s.jsxs)(Jk,{open:!H.collapsedGroups.includes(V.key),onOpenChange:r(Q=>{Fe({collapsedGroups:Q?H.collapsedGroups.filter(Z=>Z!==V.key):[...H.collapsedGroups,V.key]})},"onOpenChange"),children:[V.label&&(0,s.jsx)("div",{"data-issues-group-key":V.key,className:X("rounded-lg px-3 sm:pl-0 sm:pr-4",ae===`group:${V.key}`?"bg-bg-3/50":"hover:bg-bg-3/50"),onClick:r(()=>Ee(`group:${V.key}`),"onClick"),onMouseEnter:r(()=>Ce(`group:${V.key}`),"onMouseEnter"),children:(0,s.jsx)(s9,{label:V.label,collapsible:!0,collapsed:H.collapsedGroups.includes(V.key),onToggle:r(()=>{Fe({collapsedGroups:H.collapsedGroups.includes(V.key)?H.collapsedGroups.filter(Q=>Q!==V.key):[...H.collapsedGroups,V.key]})},"onToggle"),trailing:(0,s.jsx)(le,{variant:"ghost",size:"icon-xs",className:"-mr-2",title:`New task in ${V.label}`,"aria-label":`New task in ${V.label}`,onClick:r(()=>gs(V),"onClick"),children:(0,s.jsx)(Js,{className:"h-3 w-3"})})})}),(0,s.jsx)(Zk,{children:(()=>{const{roots:Q,childMap:Z}=qt(V),Te=r((ye,ia)=>{if(Hs<=0)return null;Hs-=1;const rs=(Z.get(ye.id)??[]).length>0,Vs=rs?GA(ye.id,Z):0,ts=!H.collapsedParents.includes(ye.id),io=!(rs&&ts),Ci=ye.projectId?fn.get(ye.projectId)??null:null,ur=ye.parentId?Gn.get(ye.parentId)??null:null,Zr=A?.get(ye.id),Bf=P?.has(ye.id)===!0,dr=ye.assigneeUserId?tn.get(ye.assigneeUserId)??null:null,Bc=Ur(ye.assigneeUserId,ve,en)??dr?.label??null,Jr=Kk(ye),fr=Jr?.kind==="user"?Jr.id:null,Kc=Jr?.kind==="user"?Jr.viaAgentId??null:null,ro=r(Ke=>{Ke.preventDefault(),Ke.stopPropagation(),Fe({collapsedParents:ts?[...H.collapsedParents,ye.id]:H.collapsedParents.filter(ks=>ks!==ye.id)})},"toggleCollapse"),ti=qs,lo=ti?.stepNumberByIssueId.get(ye.id)??null,oo=ti?.unresolvedVisibleBlockersByIssueId.get(ye.id)??[],Kf=ti?`issue-workflow-row-${ye.id}`:void 0,qc=ti&&ye.status==="done"?"text-ink-3":void 0,co=oo.map(Ke=>{const ks=Gn.get(Ke);if(!ks)return null;const Fc=ks.identifier??ks.id.slice(0,8),ni=ti?.stepNumberByIssueId.get(Ke);return{blockerId:Ke,chipLabel:`blocked by ${Fc}${ni?` · step ${ni}`:""}`}}).filter(Ke=>Ke!==null),mr=co[0]??null,uo=Math.max(co.length-1,0),qf=uo>0?` ... and ${uo} more`:"",fo=mr?`${mr.chipLabel}${qf}`:"",mo=co.slice(1).map(Ke=>Ke.chipLabel).join(", "),Ai=uo>0?`${fo}: ${mo}`:fo,Ff=ti&&mr?(0,s.jsx)("button",{type:"button","data-slot":"icon-button",onClick:r(Ke=>{Ke.preventDefault(),Ke.stopPropagation();const ks=document.getElementById(`issue-workflow-row-${mr.blockerId}`);ks&&(ks.scrollIntoView({behavior:"smooth",block:"nearest"}),ks.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:Ai,"aria-label":Ai,children:fo},mr.blockerId):null,po=Kn.get(ye.id)??null,ho=po?(0,s.jsx)(h9,{issueId:ye.id,run:po,companyId:Se,taskLabel:ye.identifier??ye.id.slice(0,8)}):void 0;return(0,s.jsx)("div",{"data-issue-row-id":ye.id,className:X(W==="legacy"&&ia>0&&Ik[Math.min(ia,Ik.length-1)],io&&"wardmote-issue-list-row-deferred")||void 0,children:(0,s.jsx)(d9,{issue:ye,presentation:W,issueLinkState:g,selected:ae===`issue:${ye.id}`,onMouseEnter:r(()=>Ce(`issue:${ye.id}`),"onMouseEnter"),treeGuides:ia,chevronInGuide:ia>0&&rs,checklistStepNumber:lo,checklistCurrentStep:ti?.currentStepIssueId===ye.id,checklistDependencyChips:Ff,checklistRowId:Kf,titleClassName:qc,externalObjectSummary:Ba.get(ye.id)??null,titleSuffix:(0,s.jsxs)(s.Fragment,{children:[rs&&!ts?(0,s.jsxs)("span",{className:"ml-1.5 text-xs text-ink-3",children:["(",Vs," sub-task",Vs!==1?"s":"",")"]}):null,Zr?Zr==="Paused"?(0,s.jsxs)(Bn,{variant:"ghost",className:X("ml-1.5 px-1.5 text-(length:--text-nano)",Id.paused),"aria-label":"Paused",title:"Paused",children:[(0,s.jsx)(RT,{className:"h-3 w-3"}),"Paused"]}):(0,s.jsx)(Bn,{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:Zr}):null,VA(ye)?(0,s.jsxs)(Bn,{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,s.jsx)(Ld,{className:"h-3 w-3"}),"Needs next step"]}):null]}),className:X(Bf&&"opacity-70",ae===`issue:${ye.id}`&&"bg-bg-3/50 hover:bg-bg-3/50"),leadingControl:W==="task"?rs?(0,s.jsx)("button",{type:"button","data-slot":"icon-button",className:"inline-flex h-4 w-4 shrink-0 items-center justify-center","aria-label":ts?"Collapse sub-tasks":"Expand sub-tasks",onClick:ro,children:(0,s.jsx)(nr,{className:X("h-3.5 w-3.5 transition-transform",ts&&"rotate-90")})}):(0,s.jsx)("span",{"data-slot":"task-row-disclosure-spacer",className:"h-4 w-4 shrink-0","aria-hidden":"true"}):void 0,statusSlot:W==="task"?(0,s.jsxs)("span",{className:"relative inline-flex items-start self-stretch sm:items-center",onClick:r(Ke=>{Ke.preventDefault(),Ke.stopPropagation()},"onClick"),children:[(0,s.jsx)(Ya,{status:ye.status,externalConversationState:ye.externalConversationState,size:"md",blockerAttention:ye.blockerAttention,onChange:r(Ke=>$(ye.id,{status:Ke}),"onChange")}),rs&&ts?(0,s.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:W==="task"?(0,s.jsx)(wk,{issue:ye,isLive:u?.has(ye.id)===!0,subtreeLiveCount:Ua.get(ye.id)??0,showStatus:!1,showIdentifier:!1,checklistStepNumber:lo}):void 0,actions:ho,showIdentifier:bt.has("id")&&es.has("id"),mobileLeading:rs?(0,s.jsx)("button",{type:"button","data-slot":"icon-button",onClick:ro,children:(0,s.jsx)(nr,{className:X("h-3.5 w-3.5 transition-transform",ts&&"rotate-90")})}):(0,s.jsx)("span",{className:"inline-flex items-center",onClick:r(Ke=>{Ke.preventDefault(),Ke.stopPropagation()},"onClick"),children:(0,s.jsx)(Ya,{status:ye.status,externalConversationState:ye.externalConversationState,size:"md",blockerAttention:ye.blockerAttention,onChange:r(Ke=>$(ye.id,{status:Ke}),"onChange")})}),desktopMetaLeading:W==="legacy"?(0,s.jsxs)(s.Fragment,{children:[rs?(0,s.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:ro,children:(0,s.jsx)(nr,{className:X("h-3.5 w-3.5 transition-transform",ts&&"rotate-90")})}):(0,s.jsx)("span",{className:"hidden w-4 shrink-0 sm:block"}),(0,s.jsx)(wk,{issue:ye,isLive:u?.has(ye.id)===!0,subtreeLiveCount:Ua.get(ye.id)??0,showStatus:bt.has("status")&&es.has("status"),showIdentifier:bt.has("id")&&es.has("id"),checklistStepNumber:lo,statusSlot:(0,s.jsx)("span",{className:"inline-flex items-center",onClick:r(Ke=>{Ke.preventDefault(),Ke.stopPropagation()},"onClick"),children:(0,s.jsx)(Ya,{status:ye.status,externalConversationState:ye.externalConversationState,size:"md",blockerAttention:ye.blockerAttention,onChange:r(Ke=>$(ye.id,{status:Ke}),"onChange")})})})]}):void 0,mobileTitleMeta:W==="task"?cf(ye):void 0,mobileMeta:W==="legacy"?Y7(ye).toLowerCase():ho,trailingMeta:W==="task"&&bt.has("updated")&&es.has("updated")?cf(ye):void 0,desktopTrailing:ja.length>0?(0,s.jsx)(t9,{issue:ye,columns:ja,projectName:Ci?.name??null,projectColor:Ci?.color??null,workspaceId:Dy(ye,Is),workspaceName:IN(ye,{executionWorkspaceById:ms,projectWorkspaceById:An,defaultProjectWorkspaceIdByProjectId:Dn}),onFilterWorkspace:cr,assigneeName:Ut(ye.assigneeAgentId),assigneeAgent:l?.find(Ke=>Ke.id===ye.assigneeAgentId),creatorAgent:l?.find(Ke=>Ke.id===ye.createdByAgentId),assigneeUserName:Bc,assigneeUserAvatarUrl:dr?.image??null,creatorAgentName:Ut(ye.createdByAgentId),creatorUserName:fr?tn.get(fr)?.label??null:null,creatorUserAvatarUrl:fr?tn.get(fr)?.image??null:null,viaAgentName:Kc?Ut(Kc):null,currentUserId:ve,parentIdentifier:ur?.identifier??null,parentTitle:ur?.title??null,assigneeContent:(0,s.jsxs)(va,{open:je===ye.id,onOpenChange:r(Ke=>{$e(Ke?ye.id:null),Ke||mt("")},"onOpenChange"),children:[(0,s.jsx)(xa,{asChild:!0,children:(0,s.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(Ke=>{Ke.preventDefault(),Ke.stopPropagation()},"onClick"),children:ye.assigneeAgentId&&Ut(ye.assigneeAgentId)?(0,s.jsx)(Wl,{agent:l.find(Ke=>Ke.id===ye.assigneeAgentId),size:"sm",className:"min-w-0"}):ye.assigneeUserId?(0,s.jsx)(Hh,{name:Bc??"User",avatarUrl:dr?.image??null,size:"sm",className:"min-w-0"}):(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs text-ink-3",children:[(0,s.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,s.jsx)(Kl,{className:"h-3.5 w-3.5"})}),"Assignee"]})})}),(0,s.jsxs)(ba,{className:"w-56 p-1",align:"end",onClick:r(Ke=>Ke.stopPropagation(),"onClick"),onPointerDownOutside:r(()=>mt(""),"onPointerDownOutside"),children:[(0,s.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:He,onChange:r(Ke=>mt(Ke.target.value),"onChange"),autoFocus:!0}),(0,s.jsxs)("div",{className:"max-h-48 overflow-y-auto overscroll-contain",children:[(0,s.jsx)("button",{className:X("flex w-full items-center gap-2 rounded px-2 py-1.5 text-xs hover:bg-bg-3/50",!ye.assigneeAgentId&&!ye.assigneeUserId&&"bg-bg-3"),onClick:r(Ke=>{Ke.preventDefault(),Ke.stopPropagation(),ei(ye.id,null,null)},"onClick"),children:"No responsible"}),ve&&(0,s.jsxs)("button",{className:X("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-bg-3/50",ye.assigneeUserId===ve&&"bg-bg-3"),onClick:r(Ke=>{Ke.preventDefault(),Ke.stopPropagation(),ei(ye.id,null,ve)},"onClick"),children:[(0,s.jsx)(Kl,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,s.jsx)("span",{children:"Me"})]}),(l??[]).filter(Ke=>He.trim()?Ke.name.toLowerCase().includes(He.toLowerCase()):!0).map(Ke=>(0,s.jsx)("button",{className:X("flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-xs hover:bg-bg-3/50",ye.assigneeAgentId===Ke.id&&"bg-bg-3"),onClick:r(ks=>{ks.preventDefault(),ks.stopPropagation(),ei(ye.id,Ke.id,null)},"onClick"),children:(0,s.jsx)(Wl,{agent:Ke,size:"sm",className:"min-w-0"})},Ke.id))]})]})]})}):void 0})},ye.id)},"renderIssueRow"),et=H.showDateGroupSeparators&&!_n?X9(H):null,zt=new Date,En=[];let rt=null,cn=null;const _t=r((ye,ia)=>{const rs=Te(ye,ia);if(rs!==null){if(et&&W==="task"){const Vs=I9(et(ye),zt),ts=T9(rt,Vs);ts&&En.push((0,s.jsx)(Ek,{label:ts},`date-sep-${ye.id}-${Vs}`)),rt=Vs}else if(et){const Vs=J9(et(ye),zt.getTime());for(const ts of cn===null?[]:tF(cn,Vs))En.push((0,s.jsx)(Ek,{label:eF(ts)},`date-sep-${ye.id}-${ts}`));cn=Vs}if(En.push(rs),!H.collapsedParents.includes(ye.id))for(const Vs of Z.get(ye.id)??[])_t(Vs,ia+1)}},"appendIssueRow");for(const ye of Q)_t(ye,0);return En})()})]},V.key)),(zn>0||z||K)&&(0,s.jsx)("div",{className:"py-2","data-testid":"issues-load-more-sentinel",children:(0,s.jsx)("p",{className:"text-xs text-ink-3",children:K?"Loading more tasks...":zn>0?`Rendering ${Math.min(Ve,Lt.length)} of ${Lt.length} tasks`:"Scroll to load more tasks"})})]})]})}r(uF,"StreamlinedIssuesList");function dF(e){return e?new Date(e).toLocaleString():"Never"}r(dF,"formatLastRunTimestamp");function fF(e){return e?e.replaceAll("_"," "):null}r(fF,"formatRoutineRunStatus");function JG(e,t){return e==="archived"&&t||t?"active":"paused"}r(JG,"nextRoutineStatus");function mF({routine:e,projectById:t,agentById:i,runningRoutineId:l,statusMutationRoutineId:c,href:u,configureLabel:m="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:_,onSelectChange:I,onRunNow:D,onToggleEnabled:T,onToggleArchived:C}){const M=e.status==="active",z=e.status==="archived",K=c===e.id,P=e.projectId?t.get(e.projectId)??null:null,A=e.assigneeAgentId?i.get(e.assigneeAgentId)??null:null,B=!z&&!e.assigneeAgentId,O=l===e.id||z||v;return(0,s.jsxs)(gn,{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,s.jsx)("div",{className:"flex items-start pt-0.5 sm:pt-1",onClick:r(W=>{W.preventDefault(),W.stopPropagation()},"onClick"),children:(0,s.jsx)("input",{type:"checkbox",className:"h-4 w-4 rounded border-line",checked:S,"aria-label":`Select ${e.title}`,onChange:r(W=>I?.(e,W.target.checked),"onChange")})}):null,(0,s.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,s.jsx)("span",{className:"truncate text-sm font-medium",children:e.title}),z||e.status==="paused"||B?(0,s.jsx)("span",{className:"text-xs text-ink-3",children:z?"archived":B?"draft":"paused"}):null,f?(0,s.jsx)("span",{className:"text-xs text-ink-3",children:f}):null]}),(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-ink-3",children:[(0,s.jsxs)("span",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"h-2.5 w-2.5 shrink-0 rounded-sm",style:{backgroundColor:P?.color??"var(--project-none)"}}),(0,s.jsx)("span",{children:e.projectId?P?.name??"Unknown project":"No project"})]}),(0,s.jsxs)("span",{className:"flex items-center gap-2",children:[e.assigneeAgentId?(0,s.jsx)(ir,{agent:{...A,id:e.assigneeAgentId},size:16,className:"h-3.5 w-3.5 shrink-0"}):null,(0,s.jsx)("span",{children:e.assigneeAgentId?A?.name??"Unknown agent":"No default agent"})]}),(0,s.jsxs)("span",{children:[dF(e.lastRun?.triggeredAt),e.lastRun?` · ${fF(e.lastRun.status)}`:""]})]}),h?(0,s.jsx)("div",{className:"text-xs text-ink-3",children:h}):null]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",onClick:r(W=>{W.preventDefault(),W.stopPropagation()},"onClick"),children:[g?(0,s.jsxs)(le,{variant:"secondary",size:"sm",disabled:O,onClick:r(()=>D(e),"onClick"),children:[(0,s.jsx)(m0,{className:"h-3.5 w-3.5"}),l===e.id?"Running...":"Run now"]}):null,(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)(OS,{size:"lg",checked:M,onCheckedChange:r(()=>T(e,M),"onCheckedChange"),disabled:K||z||y,"aria-label":M?`Disable ${e.title}`:`Enable ${e.title}`}),(0,s.jsx)("span",{className:"w-12 text-xs text-ink-3",children:z?"Archived":B?"Draft":M?"On":"Off"})]}),(0,s.jsxs)(Gr,{children:[(0,s.jsx)(Wr,{asChild:!0,children:(0,s.jsx)(le,{variant:"ghost",size:"icon-sm","aria-label":`More actions for ${e.title}`,children:(0,s.jsx)(gf,{className:"h-4 w-4"})})}),(0,s.jsxs)(Qr,{align:"end",children:[(0,s.jsx)(Cn,{asChild:!0,children:(0,s.jsx)(gn,{to:u,children:m})}),(0,s.jsx)(Cn,{disabled:O,onClick:r(()=>D(e),"onClick"),children:l===e.id?"Running...":"Run now"}),_?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(ki,{}),_]}):null,(0,s.jsx)(ki,{}),(0,s.jsx)(Cn,{onClick:r(()=>T(e,M),"onClick"),disabled:K||z||y,children:M?"Pause":"Enable"}),!j&&C?(0,s.jsx)(Cn,{onClick:r(()=>C(e),"onClick"),disabled:K,children:e.status==="archived"?"Restore":"Archive"}):null]})]})]})]})}r(mF,"RoutineListRow");function pF(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(pF,"managedRoutineToRow");function hF({routines:e,agents:t=[],projects:i=[],pluginDisplayName:l=null,emptyMessage:c="No managed routines.",runningRoutineKey:u=null,statusMutationRoutineKey:m=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(i.map(N=>[N.id,{name:N.name,color:N.color}]));return e.length===0?(0,s.jsx)("div",{className:"rounded-lg border border-line px-3 py-8 text-center text-sm text-ink-3",children:c}):(0,s.jsx)("div",{className:"rounded-lg border border-line",children:e.map(N=>{const _=pF(N),I=N.href??(N.routineId?`/routines/${N.routineId}`:"/routines"),D=N.missingRefs??[],T=!!(N.routineId&&N.resourceKey&&D.length===0),C=N.managedByPluginDisplayName??l,M=!!(y||j);return(0,s.jsxs)("div",{className:"last:[&_a]:border-b-0",children:[(0,s.jsx)(mF,{routine:_,projectById:S,agentById:k,runningRoutineId:u,statusMutationRoutineId:m,href:I,configureLabel:"Configure",managedByLabel:C?`Managed by ${C}`:null,runNowButton:!0,hideArchiveAction:!0,disableRunNow:!T,disableToggle:!T,secondaryDetails:(0,s.jsxs)("span",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[N.resourceKey?(0,s.jsx)("span",{children:N.resourceKey}):null,N.cronExpression?(0,s.jsxs)("span",{children:["Schedule ",N.cronExpression]}):null]}),onRunNow:r(()=>g?.(N),"onRunNow"),onToggleEnabled:r(()=>v?.(N,_.status==="active"),"onToggleEnabled")}),M?(0,s.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(z=>{z.preventDefault(),z.stopPropagation()},"onClick"),children:[(0,s.jsx)("span",{children:D.length?`Missing ${D.map(z=>`${z.resourceKind}:${z.resourceKey}`).join(", ")}`:"Routine defaults can be repaired."}),(0,s.jsxs)("span",{className:"flex items-center gap-2",children:[y?(0,s.jsx)(le,{size:"sm",variant:"ghost",disabled:f===N.key,onClick:r(()=>y(N),"onClick"),children:f===N.key?"Reconciling...":"Reconcile"}):null,j?(0,s.jsx)(le,{size:"sm",variant:"ghost",disabled:h===N.key,onClick:r(()=>j(N),"onClick"),children:h===N.key?"Resetting...":"Reset"}):null]})]}):null]},N.key)})})}r(hF,"ManagedRoutinesList");function Tk(e){return new Set(e??[])}r(Tk,"toPathSet");function gF({expandedPaths:e,checkedPaths:t,selectedFile:i=null,showCheckboxes:l=!1,onToggleDir:c,onSelectFile:u,...m}){return(0,x.createElement)(j7,{...m,selectedFile:i,expandedDirs:Tk(e),checkedFiles:t?Tk(t):void 0,showCheckboxes:l,onToggleDir:c??(()=>{}),onSelectFile:u??(()=>{})})}r(gF,"PluginSdkFileTree");function xF(e){const[t,i]=(0,x.useState)(null);return(0,x.useEffect)(()=>{let l=!1;return ke(()=>import("./MarkdownEditor-DXD-Cu3u.js").then(c=>c.n).then(c=>{l||i(()=>c.MarkdownEditor)}),__vite__mapDeps([82,1,3,25,8,17,20,59,60,61,21,22,83,27,26,52,84,85,86,24,87,88,28,89,77,90,54,91,92,93,94,95,96])),()=>{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(xF,"PluginSdkMarkdownEditor");function bF(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null&&t!==""&&t!==!1))}r(bF,"compactIssueFilters");function vF({companyId:e,projectId:t=null,filters:i,viewStateKey:l="wardmote:plugin-issues-view",initialSearch:c,createIssueLabel:u,searchWithinLoadedIssues:m=!0}){const f=wn(),h=(0,x.useMemo)(()=>bF({...i??{},projectId:i?.projectId??t??void 0}),[i,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}=ge({queryKey:U.agents.list(e??"__no-company__"),queryFn:r(()=>$s.list(e),"queryFn"),enabled:!!e}),{data:k}=ge({queryKey:U.projects.list(e??"__no-company__",{includeArchived:!0}),queryFn:r(()=>rr.list(e,{includeArchived:!0}),"queryFn"),enabled:!!e}),S=U.liveRuns(e??"__no-company__"),N=gc({companyId:e,resourceKey:"live-runs",queryKey:S,enabled:!!e,refetchInterval:!1,leaderOnly:!0}),{data:_,dataUpdatedAt:I}=ge({queryKey:S,queryFn:r(()=>vf.liveRunsForCompany(e),"queryFn"),enabled:N.enabled,refetchInterval:N.refetchInterval});xc(N,_,I);const{data:D,isLoading:T,error:C}=ge({queryKey:y,queryFn:r(()=>hn.list(e,h),"queryFn"),enabled:!!e}),M=(0,x.useMemo)(()=>H7(_,D),[D,_]),z=Kt({mutationFn:r(({id:K,data:P})=>hn.update(K,P),"mutationFn"),onSuccess:r(()=>{e&&(f.invalidateQueries({queryKey:["plugins","sdk-ui","issues-list",e]}),f.invalidateQueries({queryKey:U.issues.list(e)}),v&&(f.invalidateQueries({queryKey:U.issues.listByProject(e,v)}),g&&f.invalidateQueries({queryKey:U.issues.listPluginOperationsByProject(e,v,g)})))},"onSuccess")});return e?(0,x.createElement)(cF,{issues:D??[],isLoading:T,error:C,agents:j,projects:k,liveIssueIds:M,projectId:v??void 0,viewStateKey:l,initialSearch:c,createIssueLabel:u,searchWithinLoadedIssues:m,onUpdateIssue:r((K,P)=>z.mutate({id:K,data:P}),"onUpdateIssue")}):(0,x.createElement)("div",{className:"text-sm text-ink-3"},"Select an organization to view tasks.")}r(vF,"PluginSdkIssuesList");function yF({companyId:e,value:t,onChange:i,placeholder:l="Responsible",noneLabel:c="No responsible",searchPlaceholder:u="Search responsible...",emptyMessage:m="No responsible found.",includeUsers:f=!0,includeTerminatedAgents:h=!1,className:g,onConfirm:v}){const y=g0(),j=e??y.companyId??null,{data:k}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn"),enabled:f}),S=k?.user?.id??k?.session?.userId??null,{data:N}=ge({queryKey:U.agents.list(j??"__no-company__"),queryFn:r(()=>$s.list(j),"queryFn"),enabled:!!j}),{data:_}=ge({queryKey:U.access.companyUserDirectory(j??"__no-company__"),queryFn:r(()=>Xa.listUserDirectory(j),"queryFn"),enabled:!!j&&f}),I=(0,x.useMemo)(()=>Xh(),[]),D=(0,x.useMemo)(()=>I.map(K=>K.startsWith("agent:")?K.slice(6):null).filter(K=>!!K),[I]),T=(0,x.useMemo)(()=>MS((N??[]).filter(K=>h||K.status!=="terminated"),D),[N,h,D]),C=(0,x.useMemo)(()=>[...f?_S(S):[],...f?LC(_?.users,{excludeUserIds:[S]}):[],...T.map(K=>({id:Or({assigneeAgentId:K.id}),label:K.name,searchText:`${K.name} ${K.role} ${K.title??""}`}))],[_?.users,S,f,T]),M=ql(t),z=M.assigneeAgentId?T.find(K=>K.id===M.assigneeAgentId):null;return(0,x.createElement)(j0,{value:t,options:C,recentOptionIds:I,placeholder:l,noneLabel:c,searchPlaceholder:u,emptyMessage:m,className:g,onConfirm:v,onChange:r(K=>{const P=ql(K);P.assigneeAgentId&&Bd(P.assigneeAgentId),P.assigneeUserId&&$d(P.assigneeUserId),i(K,P)},"onChange"),renderTriggerValue:r(K=>K?z?(0,x.createElement)(df,null,(0,x.createElement)(Kh,{icon:z.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 P=ql(K.id),A=P.assigneeAgentId?T.find(B=>B.id===P.assigneeAgentId):null;return(0,x.createElement)(df,null,A?(0,x.createElement)(Kh,{icon:A.icon,className:"h-3.5 w-3.5 shrink-0 text-ink-3"}):(0,x.createElement)(Kl,{className:"h-3.5 w-3.5 shrink-0 text-ink-3"}),(0,x.createElement)("span",{className:"truncate"},K.label))},"renderOption")})}r(yF,"PluginSdkAssigneePicker");function jF({companyId:e,value:t,onChange:i,placeholder:l="Project",noneLabel:c="No project",searchPlaceholder:u="Search projects...",emptyMessage:m="No projects found.",includeArchived:f=!1,className:h,onConfirm:g}){const v=g0(),y=e??v.companyId??null,{data:j}=ge({queryKey:U.auth.session,queryFn:r(()=>Zn.getSession(),"queryFn")}),k=j?.user?.id??j?.session?.userId??null,{data:S}=ge({queryKey:U.projects.list(y??"__no-company__",{includeArchived:f}),queryFn:r(()=>rr.list(y,{includeArchived:f}),"queryFn"),enabled:!!y}),N=(0,x.useMemo)(()=>(S??[]).filter(C=>f||!C.archivedAt),[f,S]),{orderedProjects:_}=PC({projects:N,companyId:y,userId:k}),I=(0,x.useMemo)(()=>pg(),[]),D=(0,x.useMemo)(()=>_.map(C=>({id:C.id,label:C.name,searchText:C.description??""})),[_]),T=_.find(C=>C.id===t)??null;return(0,x.createElement)(j0,{value:t,options:D,recentOptionIds:I,placeholder:l,noneLabel:c,searchPlaceholder:u,emptyMessage:m,className:h,onConfirm:g,onChange:r(C=>{C&&Jd(C),i(C)},"onChange"),renderTriggerValue:r(C=>!C||!T?(0,x.createElement)("span",{className:"text-ink-3"},l):(0,x.createElement)(df,null,(0,x.createElement)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:T.color??"#6366f1"}}),(0,x.createElement)("span",{className:"truncate"},C.label)),"renderTriggerValue"),renderOption:r(C=>{if(!C.id)return(0,x.createElement)("span",{className:"truncate"},C.label);const M=_.find(z=>z.id===C.id);return(0,x.createElement)(df,null,(0,x.createElement)("span",{className:"h-3.5 w-3.5 shrink-0 rounded-sm",style:{backgroundColor:M?.color??"#6366f1"}}),(0,x.createElement)("span",{className:"truncate"},C.label))},"renderOption")})}r(jF,"PluginSdkProjectPicker");function df({children:e}){return(0,x.createElement)("span",{className:"contents"},e)}r(df,"FragmentSafe");function wF({label:e,status:t}){const i={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 ${i}`},e)}r(wF,"PluginSdkStatusBadge");function kF({columns:e,rows:t,loading:i,emptyMessage:l="No rows."}){if(i)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,m)=>(0,x.createElement)("div",{key:String(u.id??m),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(kF,"PluginSdkDataTable");function SF({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(SF,"PluginSdkKeyValueList");function NF({label:e,value:t,unit:i}){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}${i??""}`))}r(NF,"PluginSdkMetricCard");function CF({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(CF,"PluginSdkJsonTree");function AF({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(AF,"PluginSdkSpinner");var _F=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 EF(e,t){globalThis.__wardmotePluginBridge__={react:e,reactJsxRuntime:s,reactDom:t,sdkUi:{usePluginData:R3,usePluginAction:T3,useHostContext:g0,useHostLocation:D3,useHostNavigation:P3,usePluginStream:O3,usePluginToast:M3,copyTextToClipboard:w0,MarkdownBlock:r(({content:i,className:l,enableWikiLinks:c,wikiLinkRoot:u,resolveWikiLinkHref:m})=>(0,x.createElement)(jI,{className:l,softBreaks:!1,enableWikiLinks:c,wikiLinkRoot:u,resolveWikiLinkHref:m,children:i}),"MarkdownBlock"),MetricCard:NF,StatusBadge:wF,DataTable:kF,KeyValueList:SF,JsonTree:CF,Spinner:AF,ErrorBoundary:_F,MarkdownEditor:xF,FileTree:gF,IssuesList:vF,AssigneePicker:yF,ProjectPicker:jF,ManagedRoutinesList:hF}}}r(EF,"initPluginBridge");var IF=1e4;function TF(e=IF){if(typeof performance>"u"||typeof performance.clearMeasures!="function")return()=>{};const i=setInterval(r(()=>{globalThis.__wardmoteKeepPerfMeasures||performance.clearMeasures()},"reap"),e);return()=>clearInterval(i)}r(TF,"startPerfMeasureReaper");var RF=Xl((e=>{function t($,R){var ne=$.length;$.push(R);e:for(;0<ne;){var ue=ne-1>>>1,ae=$[ue];if(0<c(ae,R))$[ue]=R,$[ne]=ae,ne=ue;else break e}}r(t,"push");function i($){return $.length===0?null:$[0]}r(i,"peek");function l($){if($.length===0)return null;var R=$[0],ne=$.pop();if(ne!==R){$[0]=ne;e:for(var ue=0,ae=$.length,Ee=ae>>>1;ue<Ee;){var fe=2*(ue+1)-1,Ae=$[fe],Ce=fe+1,Se=$[Ce];if(0>c(Ae,ne))Ce<ae&&0>c(Se,Ae)?($[ue]=Se,$[Ce]=ne,ue=Ce):($[ue]=Ae,$[fe]=ne,ue=fe);else if(Ce<ae&&0>c(Se,ne))$[ue]=Se,$[Ce]=ne,ue=Ce;else break e}}return R}r(l,"pop");function c($,R){var ne=$.sortIndex-R.sortIndex;return ne!==0?ne:$.id-R.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 m=Date,f=m.now();e.unstable_now=function(){return m.now()-f}}var h=[],g=[],v=1,y=null,j=3,k=!1,S=!1,N=!1,_=!1,I=typeof setTimeout=="function"?setTimeout:null,D=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function C($){for(var R=i(g);R!==null;){if(R.callback===null)l(g);else if(R.startTime<=$)l(g),R.sortIndex=R.expirationTime,t(h,R);else break;R=i(g)}}r(C,"advanceTimers");function M($){if(N=!1,C($),!S)if(i(h)!==null)S=!0,z||(z=!0,W());else{var R=i(g);R!==null&&oe(M,R.startTime-$)}}r(M,"handleTimeout");var z=!1,K=-1,P=5,A=-1;function B(){return _?!0:!(e.unstable_now()-A<P)}r(B,"shouldYieldToHost");function O(){if(_=!1,z){var $=e.unstable_now();A=$;var R=!0;try{e:{S=!1,N&&(N=!1,D(K),K=-1),k=!0;var ne=j;try{t:{for(C($),y=i(h);y!==null&&!(y.expirationTime>$&&B());){var ue=y.callback;if(typeof ue=="function"){y.callback=null,j=y.priorityLevel;var ae=ue(y.expirationTime<=$);if($=e.unstable_now(),typeof ae=="function"){y.callback=ae,C($),R=!0;break t}y===i(h)&&l(h),C($)}else l(h);y=i(h)}if(y!==null)R=!0;else{var Ee=i(g);Ee!==null&&oe(M,Ee.startTime-$),R=!1}}break e}finally{y=null,j=ne,k=!1}R=void 0}}finally{R?W():z=!1}}}r(O,"performWorkUntilDeadline");var W;if(typeof T=="function")W=r(function(){T(O)},"schedulePerformWorkUntilDeadline");else if(typeof MessageChannel<"u"){var Y=new MessageChannel,ce=Y.port2;Y.port1.onmessage=O,W=r(function(){ce.postMessage(null)},"schedulePerformWorkUntilDeadline")}else W=r(function(){I(O,0)},"schedulePerformWorkUntilDeadline");function oe($,R){K=I(function(){$(e.unstable_now())},R)}r(oe,"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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$||(P=0<$?Math.floor(1e3/$):5)},e.unstable_getCurrentPriorityLevel=function(){return j},e.unstable_next=function($){switch(j){case 1:case 2:case 3:var R=3;break;default:R=j}var ne=j;j=R;try{return $()}finally{j=ne}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function($,R){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var ne=j;j=$;try{return R()}finally{j=ne}},e.unstable_scheduleCallback=function($,R,ne){var ue=e.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?ue+ne:ue):ne=ue,$){case 1:var ae=-1;break;case 2:ae=250;break;case 5:ae=1073741823;break;case 4:ae=1e4;break;default:ae=5e3}return ae=ne+ae,$={id:v++,callback:R,priorityLevel:$,startTime:ne,expirationTime:ae,sortIndex:-1},ne>ue?($.sortIndex=ne,t(g,$),i(h)===null&&$===i(g)&&(N?(D(K),K=-1):N=!0,oe(M,ne-ue))):($.sortIndex=ae,t(h,$),S||k||(S=!0,z||(z=!0,W()))),$},e.unstable_shouldYield=B,e.unstable_wrapCallback=function($){var R=j;return function(){var ne=j;j=R;try{return $.apply(this,arguments)}finally{j=ne}}}})),DF=Xl(((e,t)=>{t.exports=RF()})),MF=Xl((e=>{var t=DF(),i=Xg(),l=Pk();function c(n){var a="https://react.dev/errors/"+n;if(1<arguments.length){a+="?args[]="+encodeURIComponent(arguments[1]);for(var o=2;o<arguments.length;o++)a+="&args[]="+encodeURIComponent(arguments[o])}return"Minified React error #"+n+"; visit "+a+" 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 m(n){var a=n,o=n;if(n.alternate)for(;a.return;)a=a.return;else{n=a;do a=n,(a.flags&4098)!==0&&(o=a.return),n=a.return;while(n)}return a.tag===3?o:null}r(m,"getNearestMountedFiber");function f(n){if(n.tag===13){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}r(f,"getSuspenseInstanceFromFiber");function h(n){if(n.tag===31){var a=n.memoizedState;if(a===null&&(n=n.alternate,n!==null&&(a=n.memoizedState)),a!==null)return a.dehydrated}return null}r(h,"getActivityInstanceFromFiber");function g(n){if(m(n)!==n)throw Error(c(188))}r(g,"assertIsMounted");function v(n){var a=n.alternate;if(!a){if(a=m(n),a===null)throw Error(c(188));return a!==n?null:n}for(var o=n,d=a;;){var p=o.return;if(p===null)break;var b=p.alternate;if(b===null){if(d=p.return,d!==null){o=d;continue}break}if(p.child===b.child){for(b=p.child;b;){if(b===o)return g(p),n;if(b===d)return g(p),a;b=b.sibling}throw Error(c(188))}if(o.return!==d.return)o=p,d=b;else{for(var w=!1,E=p.child;E;){if(E===o){w=!0,o=p,d=b;break}if(E===d){w=!0,d=p,o=b;break}E=E.sibling}if(!w){for(E=b.child;E;){if(E===o){w=!0,o=b,d=p;break}if(E===d){w=!0,d=b,o=p;break}E=E.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:a}r(v,"findCurrentFiberUsingSlowPath");function y(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n;for(n=n.child;n!==null;){if(a=y(n),a!==null)return a;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"),_=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),C=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),W=Symbol.iterator;function Y(n){return n===null||typeof n!="object"?null:(n=W&&n[W]||n["@@iterator"],typeof n=="function"?n:null)}r(Y,"getIteratorFn");var ce=Symbol.for("react.client.reference");function oe(n){if(n==null)return null;if(typeof n=="function")return n.$$typeof===ce?null:n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case _:return"Fragment";case D:return"Profiler";case I:return"StrictMode";case z:return"Suspense";case K:return"SuspenseList";case B:return"Activity"}if(typeof n=="object")switch(n.$$typeof){case N:return"Portal";case C:return n.displayName||"Context";case T:return(n._context.displayName||"Context")+".Consumer";case M:var a=n.render;return n=n.displayName,n||(n=a.displayName||a.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case P:return a=n.displayName||null,a!==null?a:oe(n.type)||"Memo";case A:a=n._payload,n=n._init;try{return oe(n(a))}catch{}}return null}r(oe,"getComponentNameFromType");var $=Array.isArray,R=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},ae=[],Ee=-1;function fe(n){return{current:n}}r(fe,"createCursor");function Ae(n){0>Ee||(n.current=ae[Ee],ae[Ee]=null,Ee--)}r(Ae,"pop");function Ce(n,a){Ee++,ae[Ee]=n.current,n.current=a}r(Ce,"push");var Se=fe(null),he=fe(null),De=fe(null),Ye=fe(null);function ze(n,a){switch(Ce(De,a),Ce(he,n),Ce(Se,null),a.nodeType){case 9:case 11:n=(n=a.documentElement)&&(n=n.namespaceURI)?Vv(n):0;break;default:if(n=a.tagName,a=a.namespaceURI)a=Vv(a),n=Wv(a,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}Ae(Se),Ce(Se,n)}r(ze,"pushHostContainer");function ve(){Ae(Se),Ae(he),Ae(De)}r(ve,"popHostContainer");function ft(n){n.memoizedState!==null&&Ce(Ye,n);var a=Se.current,o=Wv(a,n.type);a!==o&&(Ce(he,n),Ce(Se,o))}r(ft,"pushHostContext");function At(n){he.current===n&&(Ae(Se),Ae(he)),Ye.current===n&&(Ae(Ye),Qo._currentValue=ue)}r(At,"popHostContext");var xt,Pt;function de(n){if(xt===void 0)try{throw Error()}catch(o){var a=o.stack.trim().match(/\n( *(at )?)/);xt=a&&a[1]||"",Pt=-1<o.stack.indexOf(`
|
|
60
|
-
at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
61
|
-
`+xt+n+Pt}r(de,"describeBuiltInComponentFrame");var Oe=!1;function qe(n,a){if(!n||Oe)return"";Oe=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var d={DetermineComponentFrameRoot:r(function(){try{if(a){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 se=re}Reflect.construct(n,[],xe)}else{try{xe.call()}catch(re){se=re}n.call(xe.prototype)}}else{try{throw Error()}catch(re){se=re}(xe=n())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(re){if(re&&se&&typeof re.stack=="string")return[re.stack,se.stack]}return[null,null]},"DetermineComponentFrameRoot")};d.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(d.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(d.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=d.DetermineComponentFrameRoot(),w=b[0],E=b[1];if(w&&E){var q=w.split(`
|
|
62
|
-
`),te=E.split(`
|
|
63
|
-
`);for(p=d=0;d<q.length&&!q[d].includes("DetermineComponentFrameRoot");)d++;for(;p<te.length&&!te[p].includes("DetermineComponentFrameRoot");)p++;if(d===q.length||p===te.length)for(d=q.length-1,p=te.length-1;1<=d&&0<=p&&q[d]!==te[p];)p--;for(;1<=d&&0<=p;d--,p--)if(q[d]!==te[p]){if(d!==1||p!==1)do if(d--,p--,0>p||q[d]!==te[p]){var me=`
|
|
64
|
-
`+q[d].replace(" at new "," at ");return n.displayName&&me.includes("<anonymous>")&&(me=me.replace("<anonymous>",n.displayName)),me}while(1<=d&&0<=p);break}}}finally{Oe=!1,Error.prepareStackTrace=o}return(o=n?n.displayName||n.name:"")?de(o):""}r(qe,"describeNativeComponentFrame");function ut(n,a){switch(n.tag){case 26:case 27:case 5:return de(n.type);case 16:return de("Lazy");case 13:return n.child!==a&&a!==null?de("Suspense Fallback"):de("Suspense");case 19:return de("SuspenseList");case 0:case 15:return qe(n.type,!1);case 11:return qe(n.type.render,!1);case 1:return qe(n.type,!0);case 31:return de("Activity");default:return""}}r(ut,"describeFiber");function Vt(n){try{var a="",o=null;do a+=ut(n,o),o=n,n=n.return;while(n);return a}catch(d){return`
|
|
65
|
-
Error generating stack: `+d.message+`
|
|
66
|
-
`+d.stack}}r(Vt,"getStackByFiberInDevAndProd");var Wt=Object.prototype.hasOwnProperty,H=t.unstable_scheduleCallback,rn=t.unstable_cancelCallback,je=t.unstable_shouldYield,$e=t.unstable_requestPaint,He=t.unstable_now,mt=t.unstable_getCurrentPriorityLevel,it=t.unstable_ImmediatePriority,Qt=t.unstable_UserBlockingPriority,Rn=t.unstable_NormalPriority,Gt=t.unstable_LowPriority,Tt=t.unstable_IdlePriority,Jt=t.log,kt=t.unstable_setDisableYieldValue,Qn=null,pt=null;function dn(n){if(typeof Jt=="function"&&kt(n),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Qn,n)}catch{}}r(dn,"setIsStrictModeForDevtools");var Rt=Math.clz32?Math.clz32:ht,ln=Math.log,Dt=Math.LN2;function ht(n){return n>>>=0,n===0?32:31-(ln(n)/Dt|0)|0}r(ht,"clz32Fallback");var Mt=256,Re=262144,Me=4194304;function Fe(n){var a=n&42;if(a!==0)return a;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}r(Fe,"getHighestPriorityLanes");function St(n,a,o){var d=n.pendingLanes;if(d===0)return 0;var p=0,b=n.suspendedLanes,w=n.pingedLanes;n=n.warmLanes;var E=d&134217727;return E!==0?(d=E&~b,d!==0?p=Fe(d):(w&=E,w!==0?p=Fe(w):o||(o=E&~n,o!==0&&(p=Fe(o))))):(E=d&~b,E!==0?p=Fe(E):w!==0?p=Fe(w):o||(o=d&~n,o!==0&&(p=Fe(o)))),p===0?0:a!==0&&a!==p&&(a&b)===0&&(b=p&-p,o=a&-a,b>=o||b===32&&(o&4194048)!==0)?a:p}r(St,"getNextLanes");function at(n,a){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&a)===0}r(at,"checkIfRootIsPrerendering");function Ot(n,a){switch(n){case 1:case 2:case 4:case 8:case 64:return a+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}r(Ot,"computeExpirationTime");function on(){var n=Me;return Me<<=1,(Me&62914560)===0&&(Me=4194304),n}r(on,"claimNextRetryLane");function Ut(n){for(var a=[],o=0;31>o;o++)a.push(n);return a}r(Ut,"createLaneMap");function en(n,a){n.pendingLanes|=a,a!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}r(en,"markRootUpdated$1");function tn(n,a,o,d,p,b){var w=n.pendingLanes;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=o,n.entangledLanes&=o,n.errorRecoveryDisabledLanes&=o,n.shellSuspendCounter=0;var E=n.entanglements,q=n.expirationTimes,te=n.hiddenUpdates;for(o=w&~o;0<o;){var me=31-Rt(o),xe=1<<me;E[me]=0,q[me]=-1;var se=te[me];if(se!==null)for(te[me]=null,me=0;me<se.length;me++){var re=se[me];re!==null&&(re.lane&=-536870913)}o&=~xe}d!==0&&fn(n,d,0),b!==0&&p===0&&n.tag!==0&&(n.suspendedLanes|=b&~(w&~a))}r(tn,"markRootFinished");function fn(n,a,o){n.pendingLanes|=a,n.suspendedLanes&=~a;var d=31-Rt(a);n.entangledLanes|=a,n.entanglements[d]=n.entanglements[d]|1073741824|o&261930}r(fn,"markSpawnedDeferredLane");function An(n,a){var o=n.entangledLanes|=a;for(n=n.entanglements;o;){var d=31-Rt(o),p=1<<d;p&a|n[d]&a&&(n[d]|=a),o&=~p}}r(An,"markRootEntangled");function Dn(n,a){var o=a&-a;return o=(o&42)!==0?1:ta(o),(o&(n.suspendedLanes|a))!==0?0:o}r(Dn,"getBumpedLaneForHydration");function ta(n){switch(n){case 2:n=1;break;case 8:n=4;break;case 32:n=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:n=128;break;case 268435456:n=134217728;break;default:n=0}return n}r(ta,"getBumpedLaneForHydrationByLane");function ms(n){return n&=-n,2<n?8<n?(n&134217727)!==0?32:268435456:8:2}r(ms,"lanesToEventPriority");function Is(){var n=ne.p;return n!==0?n:(n=window.event,n===void 0?32:py(n.type))}r(Is,"resolveUpdatePriority");function na(n,a){var o=ne.p;try{return ne.p=n,a()}finally{ne.p=o}}r(na,"runWithPriority");var ps=Math.random().toString(36).slice(2),bt="__reactFiber$"+ps,kn="__reactProps$"+ps,es="__reactContainer$"+ps,Ua="__reactEvents$"+ps,Kn="__reactListeners$"+ps,ja="__reactHandles$"+ps,Gn="__reactResources$"+ps,Sn="__reactMarker$"+ps;function Bs(n){delete n[bt],delete n[kn],delete n[Ua],delete n[Kn],delete n[ja]}r(Bs,"detachDeletedInstance");function vs(n){var a=n[bt];if(a)return a;for(var o=n.parentNode;o;){if(a=o[es]||o[bt]){if(o=a.alternate,a.child!==null||o!==null&&o.child!==null)for(n=ey(n);n!==null;){if(o=n[bt])return o;n=ey(n)}return a}n=o,o=n.parentNode}return null}r(vs,"getClosestInstanceFromNode");function Mn(n){if(n=n[bt]||n[es]){var a=n.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return n}return null}r(Mn,"getInstanceFromNode");function Ts(n){var a=n.tag;if(a===5||a===26||a===27||a===6)return n.stateNode;throw Error(c(33))}r(Ts,"getNodeFromInstance");function _n(n){var a=n[Gn];return a||(a=n[Gn]={hoistableStyles:new Map,hoistableScripts:new Map}),a}r(_n,"getResourcesFromRoot");function mn(n){n[Sn]=!0}r(mn,"markNodeAsHoistable");var $a=new Set,Ba={};function hs(n,a){ys(n,a),ys(n+"Capture",a)}r(hs,"registerTwoPhaseEvent");function ys(n,a){for(Ba[n]=a,n=0;n<a.length;n++)$a.add(a[n])}r(ys,"registerDirectEvent");var wa=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Ka={},Lt={};function sa(n){return Wt.call(Lt,n)?!0:Wt.call(Ka,n)?!1:wa.test(n)?Lt[n]=!0:(Ka[n]=!0,!1)}r(sa,"isAttributeNameSafe");function Ks(n,a,o){if(sa(a))if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":n.removeAttribute(a);return;case"boolean":var d=a.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){n.removeAttribute(a);return}}n.setAttribute(a,""+o)}}r(Ks,"setValueForAttribute");function qs(n,a,o){if(o===null)n.removeAttribute(a);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(a);return}n.setAttribute(a,""+o)}}r(qs,"setValueForKnownAttribute");function js(n,a,o,d){if(d===null)n.removeAttribute(o);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":n.removeAttribute(o);return}n.setAttributeNS(a,o,""+d)}}r(js,"setValueForNamespacedAttribute");function On(n){switch(typeof n){case"bigint":case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}r(On,"getToStringValue");function ka(n){var a=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}r(ka,"isCheckable");function Rs(n,a,o){var d=Object.getOwnPropertyDescriptor(n.constructor.prototype,a);if(!n.hasOwnProperty(a)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var p=d.get,b=d.set;return Object.defineProperty(n,a,{configurable:!0,get:r(function(){return p.call(this)},"get"),set:r(function(w){o=""+w,b.call(this,w)},"set")}),Object.defineProperty(n,a,{enumerable:d.enumerable}),{getValue:r(function(){return o},"getValue"),setValue:r(function(w){o=""+w},"setValue"),stopTracking:r(function(){n._valueTracker=null,delete n[a]},"stopTracking")}}}r(Rs,"trackValueOnNode");function ie(n){if(!n._valueTracker){var a=ka(n)?"checked":"value";n._valueTracker=Rs(n,a,""+n[a])}}r(ie,"track");function Ie(n){if(!n)return!1;var a=n._valueTracker;if(!a)return!0;var o=a.getValue(),d="";return n&&(d=ka(n)?n.checked?"true":"false":n.value),n=d,n!==o?(a.setValue(n),!0):!1}r(Ie,"updateValueIfChanged");function Le(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}r(Le,"getActiveElement");var nt=/[\n"\\]/g;function gt(n){return n.replace(nt,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}r(gt,"escapeSelectorAttributeValueInsideDoubleQuotes");function qt(n,a,o,d,p,b,w,E){n.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?n.type=w:n.removeAttribute("type"),a!=null?w==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+On(a)):n.value!==""+On(a)&&(n.value=""+On(a)):w!=="submit"&&w!=="reset"||n.removeAttribute("value"),a!=null?J(n,w,On(a)):o!=null?J(n,w,On(o)):d!=null&&n.removeAttribute("value"),p==null&&b!=null&&(n.defaultChecked=!!b),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?n.name=""+On(E):n.removeAttribute("name")}r(qt,"updateInput");function Ds(n,a,o,d,p,b,w,E){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(n.type=b),a!=null||o!=null){if(!(b!=="submit"&&b!=="reset"||a!=null)){ie(n);return}o=o!=null?""+On(o):"",a=a!=null?""+On(a):o,E||a===n.value||(n.value=a),n.defaultValue=a}d=d??p,d=typeof d!="function"&&typeof d!="symbol"&&!!d,n.checked=E?n.checked:!!d,n.defaultChecked=!!d,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(n.name=w),ie(n)}r(Ds,"initInput");function J(n,a,o){a==="number"&&Le(n.ownerDocument)===n||n.defaultValue===""+o||(n.defaultValue=""+o)}r(J,"setDefaultValue");function _e(n,a,o,d){if(n=n.options,a){a={};for(var p=0;p<o.length;p++)a["$"+o[p]]=!0;for(o=0;o<n.length;o++)p=a.hasOwnProperty("$"+n[o].value),n[o].selected!==p&&(n[o].selected=p),p&&d&&(n[o].defaultSelected=!0)}else{for(o=""+On(o),a=null,p=0;p<n.length;p++){if(n[p].value===o){n[p].selected=!0,d&&(n[p].defaultSelected=!0);return}a!==null||n[p].disabled||(a=n[p])}a!==null&&(a.selected=!0)}}r(_e,"updateOptions");function Be(n,a,o){if(a!=null&&(a=""+On(a),a!==n.value&&(n.value=a),o==null)){n.defaultValue!==a&&(n.defaultValue=a);return}n.defaultValue=o!=null?""+On(o):""}r(Be,"updateTextarea");function Xe(n,a,o,d){if(a==null){if(d!=null){if(o!=null)throw Error(c(92));if($(d)){if(1<d.length)throw Error(c(93));d=d[0]}o=d}o??="",a=o}o=On(a),n.defaultValue=o,d=n.textContent,d===o&&d!==""&&d!==null&&(n.value=d),ie(n)}r(Xe,"initTextarea");function Ve(n,a){if(a){var o=n.firstChild;if(o&&o===n.lastChild&&o.nodeType===3){o.nodeValue=a;return}}n.textContent=a}r(Ve,"setTextContent");var ot=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function yt(n,a,o){var d=a.indexOf("--")===0;o==null||typeof o=="boolean"||o===""?d?n.setProperty(a,""):a==="float"?n.cssFloat="":n[a]="":d?n.setProperty(a,o):typeof o!="number"||o===0||ot.has(a)?a==="float"?n.cssFloat=o:n[a]=(""+o).trim():n[a]=o+"px"}r(yt,"setValueForStyle");function pn(n,a,o){if(a!=null&&typeof a!="object")throw Error(c(62));if(n=n.style,o!=null){for(var d in o)!o.hasOwnProperty(d)||a!=null&&a.hasOwnProperty(d)||(d.indexOf("--")===0?n.setProperty(d,""):d==="float"?n.cssFloat="":n[d]="");for(var p in a)d=a[p],a.hasOwnProperty(p)&&o[p]!==d&&yt(n,p,d)}else for(var b in a)a.hasOwnProperty(b)&&yt(n,b,a[b])}r(pn,"setValueForStyles");function Ln(n){if(n.indexOf("-")===-1)return!1;switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}r(Ln,"isCustomElement");var Ms=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),zn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ft(n){return zn.test(""+n)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":n}r(Ft,"sanitizeURL");function Nn(){}r(Nn,"noop$1");var ws=null;function Fs(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}r(Fs,"getEventTarget");var Yt=null,gs=null;function cr(n){var a=Mn(n);if(a&&(n=a.stateNode)){var o=n[kn]||null;e:switch(n=a.stateNode,a.type){case"input":if(qt(n,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name),a=o.name,o.type==="radio"&&a!=null){for(o=n;o.parentNode;)o=o.parentNode;for(o=o.querySelectorAll('input[name="'+gt(""+a)+'"][type="radio"]'),a=0;a<o.length;a++){var d=o[a];if(d!==n&&d.form===n.form){var p=d[kn]||null;if(!p)throw Error(c(90));qt(d,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(a=0;a<o.length;a++)d=o[a],d.form===n.form&&Ie(d)}break e;case"textarea":Be(n,o.value,o.defaultValue);break e;case"select":a=o.value,a!=null&&_e(n,!!o.multiple,a,!1)}}}r(cr,"restoreStateOfTarget");var aa=!1;function $c(n,a,o){if(aa)return n(a,o);aa=!0;try{return n(a)}finally{if(aa=!1,(Yt!==null||gs!==null)&&(Cu(),Yt&&(a=Yt,n=gs,gs=Yt=null,cr(a),n)))for(a=0;a<n.length;a++)cr(n[a])}}r($c,"batchedUpdates$1");function ei(n,a){var o=n.stateNode;if(o===null)return null;var d=o[kn]||null;if(d===null)return null;o=d[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(n=n.type,d=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!d;break e;default:n=!1}if(n)return null;if(o&&typeof o!="function")throw Error(c(231,a,typeof o));return o}r(ei,"getListener");var Hs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),V=!1;if(Hs)try{var Q={};Object.defineProperty(Q,"passive",{get:r(function(){V=!0},"get")}),window.addEventListener("test",Q,Q),window.removeEventListener("test",Q,Q)}catch{V=!1}var Z=null,Te=null,et=null;function zt(){if(et)return et;var n,a=Te,o=a.length,d,p="value"in Z?Z.value:Z.textContent,b=p.length;for(n=0;n<o&&a[n]===p[n];n++);var w=o-n;for(d=1;d<=w&&a[o-d]===p[b-d];d++);return et=p.slice(n,1<d?1-d:void 0)}r(zt,"getData");function En(n){var a=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&a===13&&(n=13)):n=a,n===10&&(n=13),32<=n||n===13?n:0}r(En,"getEventCharCode");function rt(){return!0}r(rt,"functionThatReturnsTrue");function cn(){return!1}r(cn,"functionThatReturnsFalse");function _t(n){function a(o,d,p,b,w){this._reactName=o,this._targetInst=p,this.type=d,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var E in n)n.hasOwnProperty(E)&&(o=n[E],this[E]=o?o(b):b[E]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?rt:cn,this.isPropagationStopped=cn,this}return r(a,"SyntheticBaseEvent"),j(a.prototype,{preventDefault:r(function(){this.defaultPrevented=!0;var o=this.nativeEvent;o&&(o.preventDefault?o.preventDefault():typeof o.returnValue!="unknown"&&(o.returnValue=!1),this.isDefaultPrevented=rt)},"preventDefault"),stopPropagation:r(function(){var o=this.nativeEvent;o&&(o.stopPropagation?o.stopPropagation():typeof o.cancelBubble!="unknown"&&(o.cancelBubble=!0),this.isPropagationStopped=rt)},"stopPropagation"),persist:r(function(){},"persist"),isPersistent:rt}),a}r(_t,"createSyntheticEvent");var ye={eventPhase:0,bubbles:0,cancelable:0,timeStamp:r(function(n){return n.timeStamp||Date.now()},"timeStamp"),defaultPrevented:0,isTrusted:0},ia=_t(ye),rs=j({},ye,{view:0,detail:0}),Vs=_t(rs),ts,io,Ci,ur=j({},rs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:oo,button:0,buttons:0,relatedTarget:r(function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},"relatedTarget"),movementX:r(function(n){return"movementX"in n?n.movementX:(n!==Ci&&(Ci&&n.type==="mousemove"?(ts=n.screenX-Ci.screenX,io=n.screenY-Ci.screenY):io=ts=0,Ci=n),ts)},"movementX"),movementY:r(function(n){return"movementY"in n?n.movementY:io},"movementY")}),Zr=_t(ur),Bf=_t(j({},ur,{dataTransfer:0})),dr=_t(j({},rs,{relatedTarget:0})),Bc=_t(j({},ye,{animationName:0,elapsedTime:0,pseudoElement:0})),Jr=_t(j({},ye,{clipboardData:r(function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData},"clipboardData")})),fr=_t(j({},ye,{data:0})),Kc={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ro={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ti={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lo(n){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(n):(n=ti[n])?!!a[n]:!1}r(lo,"modifierStateGetter");function oo(){return lo}r(oo,"getEventModifierState");var Kf=_t(j({},rs,{key:r(function(n){if(n.key){var a=Kc[n.key]||n.key;if(a!=="Unidentified")return a}return n.type==="keypress"?(n=En(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?ro[n.keyCode]||"Unidentified":""},"key"),code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:oo,charCode:r(function(n){return n.type==="keypress"?En(n):0},"charCode"),keyCode:r(function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},"keyCode"),which:r(function(n){return n.type==="keypress"?En(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0},"which")})),qc=_t(j({},ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),co=_t(j({},rs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:oo})),mr=_t(j({},ye,{propertyName:0,elapsedTime:0,pseudoElement:0})),uo=_t(j({},ur,{deltaX:r(function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},"deltaX"),deltaY:r(function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},"deltaY"),deltaZ:0,deltaMode:0})),qf=_t(j({},ye,{newState:0,oldState:0})),fo=[9,13,27,32],mo=Hs&&"CompositionEvent"in window,Ai=null;Hs&&"documentMode"in document&&(Ai=document.documentMode);var Ff=Hs&&"TextEvent"in window&&!Ai,po=Hs&&(!mo||Ai&&8<Ai&&11>=Ai),ho=" ",Ke=!1;function ks(n,a){switch(n){case"keyup":return fo.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}r(ks,"isFallbackCompositionEnd");function Fc(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}r(Fc,"getDataFromCustomEvent");var ni=!1;function n2(n,a){switch(n){case"compositionend":return Fc(a);case"keypress":return a.which!==32?null:(Ke=!0,ho);case"textInput":return n=a.data,n===ho&&Ke?null:n;default:return null}}r(n2,"getNativeBeforeInputChars");function s2(n,a){if(ni)return n==="compositionend"||!mo&&ks(n,a)?(n=zt(),et=Te=Z=null,ni=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return po&&a.locale!=="ko"?null:a.data;default:return null}}r(s2,"getFallbackBeforeInputChars");var a2={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ix(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a==="input"?!!a2[n.type]:a==="textarea"}r(ix,"isTextInputElement");function rx(n,a,o,d){Yt?gs?gs.push(d):gs=[d]:Yt=d,a=Du(a,"onChange"),0<a.length&&(o=new ia("onChange","change",null,o,d),n.push({event:o,listeners:a}))}r(rx,"createAndAccumulateChangeEvent");var go=null,xo=null;function i2(n){Uv(n,0)}r(i2,"runEventInBatch");function Hc(n){if(Ie(Ts(n)))return n}r(Hc,"getInstIfValueChanged");function lx(n,a){if(n==="change")return a}r(lx,"getTargetInstForChangeEvent");var ox=!1;if(Hs){var Hf;if(Hs){var Vf="oninput"in document;if(!Vf){var cx=document.createElement("div");cx.setAttribute("oninput","return;"),Vf=typeof cx.oninput=="function"}Hf=Vf}else Hf=!1;ox=Hf&&(!document.documentMode||9<document.documentMode)}function ux(){go&&(go.detachEvent("onpropertychange",dx),xo=go=null)}r(ux,"stopWatchingForValueChange");function dx(n){if(n.propertyName==="value"&&Hc(xo)){var a=[];rx(a,xo,n,Fs(n)),$c(i2,a)}}r(dx,"handlePropertyChange");function r2(n,a,o){n==="focusin"?(ux(),go=a,xo=o,go.attachEvent("onpropertychange",dx)):n==="focusout"&&ux()}r(r2,"handleEventsForInputEventPolyfill");function l2(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Hc(xo)}r(l2,"getTargetInstForInputEventPolyfill");function o2(n,a){if(n==="click")return Hc(a)}r(o2,"getTargetInstForClickEvent");function c2(n,a){if(n==="input"||n==="change")return Hc(a)}r(c2,"getTargetInstForInputOrChangeEvent");function u2(n,a){return n===a&&(n!==0||1/n===1/a)||n!==n&&a!==a}r(u2,"is");var Ws=typeof Object.is=="function"?Object.is:u2;function bo(n,a){if(Ws(n,a))return!0;if(typeof n!="object"||n===null||typeof a!="object"||a===null)return!1;var o=Object.keys(n),d=Object.keys(a);if(o.length!==d.length)return!1;for(d=0;d<o.length;d++){var p=o[d];if(!Wt.call(a,p)||!Ws(n[p],a[p]))return!1}return!0}r(bo,"shallowEqual");function fx(n){for(;n&&n.firstChild;)n=n.firstChild;return n}r(fx,"getLeafNode");function mx(n,a){var o=fx(n);n=0;for(var d;o;){if(o.nodeType===3){if(d=n+o.textContent.length,n<=a&&d>=a)return{node:o,offset:a-n};n=d}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=fx(o)}}r(mx,"getNodeForCharacterOffset");function px(n,a){return n&&a?n===a?!0:n&&n.nodeType===3?!1:a&&a.nodeType===3?px(n,a.parentNode):"contains"in n?n.contains(a):n.compareDocumentPosition?!!(n.compareDocumentPosition(a)&16):!1:!1}r(px,"containsNode");function hx(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var a=Le(n.document);a instanceof n.HTMLIFrameElement;){try{var o=typeof a.contentWindow.location.href=="string"}catch{o=!1}if(o)n=a.contentWindow;else break;a=Le(n.document)}return a}r(hx,"getActiveElementDeep");function Wf(n){var a=n&&n.nodeName&&n.nodeName.toLowerCase();return a&&(a==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||a==="textarea"||n.contentEditable==="true")}r(Wf,"hasSelectionCapabilities");var d2=Hs&&"documentMode"in document&&11>=document.documentMode,el=null,Qf=null,vo=null,Gf=!1;function gx(n,a,o){var d=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Gf||el==null||el!==Le(d)||(d=el,"selectionStart"in d&&Wf(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),vo&&bo(vo,d)||(vo=d,d=Du(Qf,"onSelect"),0<d.length&&(a=new ia("onSelect","select",null,a,o),n.push({event:a,listeners:d}),a.target=el)))}r(gx,"constructSelectEvent");function pr(n,a){var o={};return o[n.toLowerCase()]=a.toLowerCase(),o["Webkit"+n]="webkit"+a,o["Moz"+n]="moz"+a,o}r(pr,"makePrefixMap");var tl={animationend:pr("Animation","AnimationEnd"),animationiteration:pr("Animation","AnimationIteration"),animationstart:pr("Animation","AnimationStart"),transitionrun:pr("Transition","TransitionRun"),transitionstart:pr("Transition","TransitionStart"),transitioncancel:pr("Transition","TransitionCancel"),transitionend:pr("Transition","TransitionEnd")},Yf={},xx={};Hs&&(xx=document.createElement("div").style,"AnimationEvent"in window||(delete tl.animationend.animation,delete tl.animationiteration.animation,delete tl.animationstart.animation),"TransitionEvent"in window||delete tl.transitionend.transition);function hr(n){if(Yf[n])return Yf[n];if(!tl[n])return n;var a=tl[n],o;for(o in a)if(a.hasOwnProperty(o)&&o in xx)return Yf[n]=a[o];return n}r(hr,"getVendorPrefixedEventName");var bx=hr("animationend"),vx=hr("animationiteration"),yx=hr("animationstart"),f2=hr("transitionrun"),m2=hr("transitionstart"),p2=hr("transitioncancel"),jx=hr("transitionend"),wx=new Map,Xf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Xf.push("scrollEnd");function Sa(n,a){wx.set(n,a),hs(a,[n])}r(Sa,"registerSimpleEvent");var Vc=typeof reportError=="function"?reportError:function(n){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof n=="object"&&n!==null&&typeof n.message=="string"?String(n.message):String(n),error:n});if(!window.dispatchEvent(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",n);return}},ra=[],nl=0,Zf=0;function Wc(){for(var n=nl,a=Zf=nl=0;a<n;){var o=ra[a];ra[a++]=null;var d=ra[a];ra[a++]=null;var p=ra[a];ra[a++]=null;var b=ra[a];if(ra[a++]=null,d!==null&&p!==null){var w=d.pending;w===null?p.next=p:(p.next=w.next,w.next=p),d.pending=p}b!==0&&kx(o,p,b)}}r(Wc,"finishQueueingConcurrentUpdates");function Qc(n,a,o,d){ra[nl++]=n,ra[nl++]=a,ra[nl++]=o,ra[nl++]=d,Zf|=d,n.lanes|=d,n=n.alternate,n!==null&&(n.lanes|=d)}r(Qc,"enqueueUpdate$1");function Jf(n,a,o,d){return Qc(n,a,o,d),Gc(n)}r(Jf,"enqueueConcurrentHookUpdate");function gr(n,a){return Qc(n,null,null,a),Gc(n)}r(gr,"enqueueConcurrentRenderForLane");function kx(n,a,o){n.lanes|=o;var d=n.alternate;d!==null&&(d.lanes|=o);for(var p=!1,b=n.return;b!==null;)b.childLanes|=o,d=b.alternate,d!==null&&(d.childLanes|=o),b.tag===22&&(n=b.stateNode,n===null||n._visibility&1||(p=!0)),n=b,b=b.return;return n.tag===3?(b=n.stateNode,p&&a!==null&&(p=31-Rt(o),n=b.hiddenUpdates,d=n[p],d===null?n[p]=[a]:d.push(a),a.lane=o|536870912),b):null}r(kx,"markUpdateLaneFromFiberToRoot");function Gc(n){if(50<Bo)throw Bo=0,op=null,Error(c(185));for(var a=n.return;a!==null;)n=a,a=n.return;return n.tag===3?n.stateNode:null}r(Gc,"getRootForUpdatedFiber");var sl={};function h2(n,a,o,d){this.tag=n,this.key=o,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}r(h2,"FiberNode");function Qs(n,a,o,d){return new h2(n,a,o,d)}r(Qs,"createFiberImplClass");function em(n){return n=n.prototype,!(!n||!n.isReactComponent)}r(em,"shouldConstruct");function si(n,a){var o=n.alternate;return o===null?(o=Qs(n.tag,a,n.key,n.mode),o.elementType=n.elementType,o.type=n.type,o.stateNode=n.stateNode,o.alternate=n,n.alternate=o):(o.pendingProps=a,o.type=n.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=n.flags&65011712,o.childLanes=n.childLanes,o.lanes=n.lanes,o.child=n.child,o.memoizedProps=n.memoizedProps,o.memoizedState=n.memoizedState,o.updateQueue=n.updateQueue,a=n.dependencies,o.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},o.sibling=n.sibling,o.index=n.index,o.ref=n.ref,o.refCleanup=n.refCleanup,o}r(si,"createWorkInProgress");function Sx(n,a){n.flags&=65011714;var o=n.alternate;return o===null?(n.childLanes=0,n.lanes=a,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,a=o.dependencies,n.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),n}r(Sx,"resetWorkInProgress");function Yc(n,a,o,d,p,b){var w=0;if(d=n,typeof n=="function")em(n)&&(w=1);else if(typeof n=="string")w=j_(n,o,Se.current)?26:n==="html"||n==="head"||n==="body"?27:5;else e:switch(n){case B:return n=Qs(31,o,a,p),n.elementType=B,n.lanes=b,n;case _:return xr(o.children,p,b,a);case I:w=8,p|=24;break;case D:return n=Qs(12,o,a,p|2),n.elementType=D,n.lanes=b,n;case z:return n=Qs(13,o,a,p),n.elementType=z,n.lanes=b,n;case K:return n=Qs(19,o,a,p),n.elementType=K,n.lanes=b,n;default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case C:w=10;break e;case T:w=9;break e;case M:w=11;break e;case P:w=14;break e;case A:w=16,d=null;break e}w=29,o=Error(c(130,n===null?"null":typeof n,"")),d=null}return a=Qs(w,o,a,p),a.elementType=n,a.type=d,a.lanes=b,a}r(Yc,"createFiberFromTypeAndProps");function xr(n,a,o,d){return n=Qs(7,n,d,a),n.lanes=o,n}r(xr,"createFiberFromFragment");function tm(n,a,o){return n=Qs(6,n,null,a),n.lanes=o,n}r(tm,"createFiberFromText");function Nx(n){var a=Qs(18,null,null,0);return a.stateNode=n,a}r(Nx,"createFiberFromDehydratedFragment");function nm(n,a,o){return a=Qs(4,n.children!==null?n.children:[],n.key,a),a.lanes=o,a.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},a}r(nm,"createFiberFromPortal");var Cx=new WeakMap;function la(n,a){if(typeof n=="object"&&n!==null){var o=Cx.get(n);return o!==void 0?o:(a={value:n,source:a,stack:Vt(a)},Cx.set(n,a),a)}return{value:n,source:a,stack:Vt(a)}}r(la,"createCapturedValueAtFiber");var al=[],il=0,Xc=null,yo=0,oa=[],ca=0,_i=null,qa=1,Fa="";function ai(n,a){al[il++]=yo,al[il++]=Xc,Xc=n,yo=a}r(ai,"pushTreeFork");function Ax(n,a,o){oa[ca++]=qa,oa[ca++]=Fa,oa[ca++]=_i,_i=n;var d=qa;n=Fa;var p=32-Rt(d)-1;d&=~(1<<p),o+=1;var b=32-Rt(a)+p;if(30<b){var w=p-p%5;b=(d&(1<<w)-1).toString(32),d>>=w,p-=w,qa=1<<32-Rt(a)+p|o<<p|d,Fa=b+n}else qa=1<<b|o<<p|d,Fa=n}r(Ax,"pushTreeId");function sm(n){n.return!==null&&(ai(n,1),Ax(n,1,0))}r(sm,"pushMaterializedTreeId");function am(n){for(;n===Xc;)Xc=al[--il],al[il]=null,yo=al[--il],al[il]=null;for(;n===_i;)_i=oa[--ca],oa[ca]=null,Fa=oa[--ca],oa[ca]=null,qa=oa[--ca],oa[ca]=null}r(am,"popTreeContext");function _x(n,a){oa[ca++]=qa,oa[ca++]=Fa,oa[ca++]=_i,qa=a.id,Fa=a.overflow,_i=n}r(_x,"restoreSuspendedTreeContext");var ls=null,xn=null,Et=!1,Ei=null,ua=!1,im=Error(c(519));function Ii(n){throw jo(la(Error(c(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML","")),n)),im}r(Ii,"throwOnHydrationMismatch");function Ex(n){var a=n.stateNode,o=n.type,d=n.memoizedProps;switch(a[bt]=n,a[kn]=d,o){case"dialog":wt("cancel",a),wt("close",a);break;case"iframe":case"object":case"embed":wt("load",a);break;case"video":case"audio":for(o=0;o<qo.length;o++)wt(qo[o],a);break;case"source":wt("error",a);break;case"img":case"image":case"link":wt("error",a),wt("load",a);break;case"details":wt("toggle",a);break;case"input":wt("invalid",a),Ds(a,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":wt("invalid",a);break;case"textarea":wt("invalid",a),Xe(a,d.value,d.defaultValue,d.children)}o=d.children,typeof o!="string"&&typeof o!="number"&&typeof o!="bigint"||a.textContent===""+o||d.suppressHydrationWarning===!0||Fv(a.textContent,o)?(d.popover!=null&&(wt("beforetoggle",a),wt("toggle",a)),d.onScroll!=null&&wt("scroll",a),d.onScrollEnd!=null&&wt("scrollend",a),d.onClick!=null&&(a.onclick=Nn),a=!0):a=!1,a||Ii(n,!0)}r(Ex,"prepareToHydrateHostInstance");function Ix(n){for(ls=n.return;ls;)switch(ls.tag){case 5:case 31:case 13:ua=!1;return;case 27:case 3:ua=!0;return;default:ls=ls.return}}r(Ix,"popToNextHostParent");function rl(n){if(n!==ls)return!1;if(!Et)return Ix(n),Et=!0,!1;var a=n.tag,o;if((o=a!==3&&a!==27)&&((o=a===5)&&(o=n.type,o=!(o!=="form"&&o!=="button")||wp(n.type,n.memoizedProps)),o=!o),o&&xn&&Ii(n),Ix(n),a===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));xn=Jv(n)}else if(a===31){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(317));xn=Jv(n)}else a===27?(a=xn,Ki(n.type)?(n=Ap,Ap=null,xn=n):xn=a):xn=ls?ma(n.stateNode.nextSibling):null;return!0}r(rl,"popHydrationState");function br(){xn=ls=null,Et=!1}r(br,"resetHydrationState");function rm(){var n=Ei;return n!==null&&(Ps===null?Ps=n:Ps.push.apply(Ps,n),Ei=null),n}r(rm,"upgradeHydrationErrorsToRecoverable");function jo(n){Ei===null?Ei=[n]:Ei.push(n)}r(jo,"queueHydrationError");var lm=fe(null),vr=null,ii=null;function Ti(n,a,o){Ce(lm,a._currentValue),a._currentValue=o}r(Ti,"pushProvider");function ri(n){n._currentValue=lm.current,Ae(lm)}r(ri,"popProvider");function om(n,a,o){for(;n!==null;){var d=n.alternate;if((n.childLanes&a)!==a?(n.childLanes|=a,d!==null&&(d.childLanes|=a)):d!==null&&(d.childLanes&a)!==a&&(d.childLanes|=a),n===o)break;n=n.return}}r(om,"scheduleContextWorkOnParentPath");function cm(n,a,o,d){var p=n.child;for(p!==null&&(p.return=n);p!==null;){var b=p.dependencies;if(b!==null){var w=p.child;b=b.firstContext;e:for(;b!==null;){var E=b;b=p;for(var q=0;q<a.length;q++)if(E.context===a[q]){b.lanes|=o,E=b.alternate,E!==null&&(E.lanes|=o),om(b.return,o,n),d||(w=null);break e}b=E.next}}else if(p.tag===18){if(w=p.return,w===null)throw Error(c(341));w.lanes|=o,b=w.alternate,b!==null&&(b.lanes|=o),om(w,o,n),w=null}else w=p.child;if(w!==null)w.return=p;else for(w=p;w!==null;){if(w===n){w=null;break}if(p=w.sibling,p!==null){p.return=w.return,w=p;break}w=w.return}p=w}}r(cm,"propagateContextChanges");function ll(n,a,o,d){n=null;for(var p=a,b=!1;p!==null;){if(!b){if((p.flags&524288)!==0)b=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var w=p.alternate;if(w===null)throw Error(c(387));if(w=w.memoizedProps,w!==null){var E=p.type;Ws(p.pendingProps.value,w.value)||(n!==null?n.push(E):n=[E])}}else if(p===Ye.current){if(w=p.alternate,w===null)throw Error(c(387));w.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(n!==null?n.push(Qo):n=[Qo])}p=p.return}n!==null&&cm(a,n,o,d),a.flags|=262144}r(ll,"propagateParentContextChanges");function Zc(n){for(n=n.firstContext;n!==null;){if(!Ws(n.context._currentValue,n.memoizedValue))return!0;n=n.next}return!1}r(Zc,"checkIfContextChanged");function yr(n){vr=n,ii=null,n=n.dependencies,n!==null&&(n.firstContext=null)}r(yr,"prepareToReadContext");function os(n){return Tx(vr,n)}r(os,"readContext");function Jc(n,a){return vr===null&&yr(n),Tx(n,a)}r(Jc,"readContextDuringReconciliation");function Tx(n,a){var o=a._currentValue;if(a={context:a,memoizedValue:o,next:null},ii===null){if(n===null)throw Error(c(308));ii=a,n.dependencies={lanes:0,firstContext:a},n.flags|=524288}else ii=ii.next=a;return o}r(Tx,"readContextForConsumer");var g2=typeof AbortController<"u"?AbortController:function(){var n=[],a=this.signal={aborted:!1,addEventListener:r(function(o,d){n.push(d)},"addEventListener")};this.abort=function(){a.aborted=!0,n.forEach(function(o){return o()})}},x2=t.unstable_scheduleCallback,b2=t.unstable_NormalPriority,qn={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function um(){return{controller:new g2,data:new Map,refCount:0}}r(um,"createCache");function wo(n){n.refCount--,n.refCount===0&&x2(b2,function(){n.controller.abort()})}r(wo,"releaseCache");var ko=null,dm=0,ol=0,cl=null;function v2(n,a){if(ko===null){var o=ko=[];dm=0,ol=pp(),cl={status:"pending",value:void 0,then:r(function(d){o.push(d)},"then")}}return dm++,a.then(Rx,Rx),a}r(v2,"entangleAsyncAction");function Rx(){if(--dm===0&&ko!==null){cl!==null&&(cl.status="fulfilled");var n=ko;ko=null,ol=0,cl=null;for(var a=0;a<n.length;a++)(0,n[a])()}}r(Rx,"pingEngtangledActionScope");function y2(n,a){var o=[],d={status:"pending",value:null,reason:null,then:r(function(p){o.push(p)},"then")};return n.then(function(){d.status="fulfilled",d.value=a;for(var p=0;p<o.length;p++)(0,o[p])(a)},function(p){for(d.status="rejected",d.reason=p,p=0;p<o.length;p++)(0,o[p])(void 0)}),d}r(y2,"chainThenableValue");var Dx=R.S;R.S=function(n,a){mv=He(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&v2(n,a),Dx!==null&&Dx(n,a)};var jr=fe(null);function fm(){var n=jr.current;return n!==null?n:un.pooledCache}r(fm,"peekCacheFromPool");function eu(n,a){a===null?Ce(jr,jr.current):Ce(jr,a.pool)}r(eu,"pushTransition");function Mx(){var n=fm();return n===null?null:{parent:qn._currentValue,pool:n}}r(Mx,"getSuspendedCache");var ul=Error(c(460)),mm=Error(c(474)),tu=Error(c(542)),nu={then:r(function(){},"then")};function Ox(n){return n=n.status,n==="fulfilled"||n==="rejected"}r(Ox,"isThenableResolved");function Lx(n,a,o){switch(o=n[o],o===void 0?n.push(a):o!==a&&(a.then(Nn,Nn),a=o),a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Px(n),n;default:if(typeof a.status=="string")a.then(Nn,Nn);else{if(n=un,n!==null&&100<n.shellSuspendCounter)throw Error(c(482));n=a,n.status="pending",n.then(function(d){if(a.status==="pending"){var p=a;p.status="fulfilled",p.value=d}},function(d){if(a.status==="pending"){var p=a;p.status="rejected",p.reason=d}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw n=a.reason,Px(n),n}throw kr=a,ul}}r(Lx,"trackUsedThenable");function wr(n){try{var a=n._init;return a(n._payload)}catch(o){throw o!==null&&typeof o=="object"&&typeof o.then=="function"?(kr=o,ul):o}}r(wr,"resolveLazy");var kr=null;function zx(){if(kr===null)throw Error(c(459));var n=kr;return kr=null,n}r(zx,"getSuspendedThenable");function Px(n){if(n===ul||n===tu)throw Error(c(483))}r(Px,"checkIfUseWrappedInAsyncCatch");var dl=null,So=0;function su(n){var a=So;return So+=1,dl===null&&(dl=[]),Lx(dl,n,a)}r(su,"unwrapThenable");function No(n,a){a=a.props.ref,n.ref=a!==void 0?a:null}r(No,"coerceRef");function au(n,a){throw a.$$typeof===k?Error(c(525)):(n=Object.prototype.toString.call(a),Error(c(31,n==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":n)))}r(au,"throwOnInvalidObjectTypeImpl");function Ux(n){function a(G,F){if(n){var ee=G.deletions;ee===null?(G.deletions=[F],G.flags|=16):ee.push(F)}}r(a,"deleteChild");function o(G,F){if(!n)return null;for(;F!==null;)a(G,F),F=F.sibling;return null}r(o,"deleteRemainingChildren");function d(G){for(var F=new Map;G!==null;)G.key!==null?F.set(G.key,G):F.set(G.index,G),G=G.sibling;return F}r(d,"mapRemainingChildren");function p(G,F){return G=si(G,F),G.index=0,G.sibling=null,G}r(p,"useFiber");function b(G,F,ee){return G.index=ee,n?(ee=G.alternate,ee!==null?(ee=ee.index,ee<F?(G.flags|=67108866,F):ee):(G.flags|=67108866,F)):(G.flags|=1048576,F)}r(b,"placeChild");function w(G){return n&&G.alternate===null&&(G.flags|=67108866),G}r(w,"placeSingleChild");function E(G,F,ee,pe){return F===null||F.tag!==6?(F=tm(ee,G.mode,pe),F.return=G,F):(F=p(F,ee),F.return=G,F)}r(E,"updateTextNode");function q(G,F,ee,pe){var We=ee.type;return We===_?me(G,F,ee.props.children,pe,ee.key):F!==null&&(F.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===A&&wr(We)===F.type)?(F=p(F,ee.props),No(F,ee),F.return=G,F):(F=Yc(ee.type,ee.key,ee.props,null,G.mode,pe),No(F,ee),F.return=G,F)}r(q,"updateElement");function te(G,F,ee,pe){return F===null||F.tag!==4||F.stateNode.containerInfo!==ee.containerInfo||F.stateNode.implementation!==ee.implementation?(F=nm(ee,G.mode,pe),F.return=G,F):(F=p(F,ee.children||[]),F.return=G,F)}r(te,"updatePortal");function me(G,F,ee,pe,We){return F===null||F.tag!==7?(F=xr(ee,G.mode,pe,We),F.return=G,F):(F=p(F,ee),F.return=G,F)}r(me,"updateFragment");function xe(G,F,ee){if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return F=tm(""+F,G.mode,ee),F.return=G,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case S:return ee=Yc(F.type,F.key,F.props,null,G.mode,ee),No(ee,F),ee.return=G,ee;case N:return F=nm(F,G.mode,ee),F.return=G,F;case A:return F=wr(F),xe(G,F,ee)}if($(F)||Y(F))return F=xr(F,G.mode,ee,null),F.return=G,F;if(typeof F.then=="function")return xe(G,su(F),ee);if(F.$$typeof===C)return xe(G,Jc(G,F),ee);au(G,F)}return null}r(xe,"createChild");function se(G,F,ee,pe){var We=F!==null?F.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return We!==null?null:E(G,F,""+ee,pe);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case S:return ee.key===We?q(G,F,ee,pe):null;case N:return ee.key===We?te(G,F,ee,pe):null;case A:return ee=wr(ee),se(G,F,ee,pe)}if($(ee)||Y(ee))return We!==null?null:me(G,F,ee,pe,null);if(typeof ee.then=="function")return se(G,F,su(ee),pe);if(ee.$$typeof===C)return se(G,F,Jc(G,ee),pe);au(G,ee)}return null}r(se,"updateSlot");function re(G,F,ee,pe,We){if(typeof pe=="string"&&pe!==""||typeof pe=="number"||typeof pe=="bigint")return G=G.get(ee)||null,E(F,G,""+pe,We);if(typeof pe=="object"&&pe!==null){switch(pe.$$typeof){case S:return G=G.get(pe.key===null?ee:pe.key)||null,q(F,G,pe,We);case N:return G=G.get(pe.key===null?ee:pe.key)||null,te(F,G,pe,We);case A:return pe=wr(pe),re(G,F,ee,pe,We)}if($(pe)||Y(pe))return G=G.get(ee)||null,me(F,G,pe,We,null);if(typeof pe.then=="function")return re(G,F,ee,su(pe),We);if(pe.$$typeof===C)return re(G,F,ee,Jc(F,pe),We);au(F,pe)}return null}r(re,"updateFromMap");function Pe(G,F,ee,pe){for(var We=null,$t=null,Ue=F,dt=F=0,Ct=null;Ue!==null&&dt<ee.length;dt++){Ue.index>dt?(Ct=Ue,Ue=null):Ct=Ue.sibling;var Bt=se(G,Ue,ee[dt],pe);if(Bt===null){Ue===null&&(Ue=Ct);break}n&&Ue&&Bt.alternate===null&&a(G,Ue),F=b(Bt,F,dt),$t===null?We=Bt:$t.sibling=Bt,$t=Bt,Ue=Ct}if(dt===ee.length)return o(G,Ue),Et&&ai(G,dt),We;if(Ue===null){for(;dt<ee.length;dt++)Ue=xe(G,ee[dt],pe),Ue!==null&&(F=b(Ue,F,dt),$t===null?We=Ue:$t.sibling=Ue,$t=Ue);return Et&&ai(G,dt),We}for(Ue=d(Ue);dt<ee.length;dt++)Ct=re(Ue,G,dt,ee[dt],pe),Ct!==null&&(n&&Ct.alternate!==null&&Ue.delete(Ct.key===null?dt:Ct.key),F=b(Ct,F,dt),$t===null?We=Ct:$t.sibling=Ct,$t=Ct);return n&&Ue.forEach(function(Wi){return a(G,Wi)}),Et&&ai(G,dt),We}r(Pe,"reconcileChildrenArray");function tt(G,F,ee,pe){if(ee==null)throw Error(c(151));for(var We=null,$t=null,Ue=F,dt=F=0,Ct=null,Bt=ee.next();Ue!==null&&!Bt.done;dt++,Bt=ee.next()){Ue.index>dt?(Ct=Ue,Ue=null):Ct=Ue.sibling;var Wi=se(G,Ue,Bt.value,pe);if(Wi===null){Ue===null&&(Ue=Ct);break}n&&Ue&&Wi.alternate===null&&a(G,Ue),F=b(Wi,F,dt),$t===null?We=Wi:$t.sibling=Wi,$t=Wi,Ue=Ct}if(Bt.done)return o(G,Ue),Et&&ai(G,dt),We;if(Ue===null){for(;!Bt.done;dt++,Bt=ee.next())Bt=xe(G,Bt.value,pe),Bt!==null&&(F=b(Bt,F,dt),$t===null?We=Bt:$t.sibling=Bt,$t=Bt);return Et&&ai(G,dt),We}for(Ue=d(Ue);!Bt.done;dt++,Bt=ee.next())Bt=re(Ue,G,dt,Bt.value,pe),Bt!==null&&(n&&Bt.alternate!==null&&Ue.delete(Bt.key===null?dt:Bt.key),F=b(Bt,F,dt),$t===null?We=Bt:$t.sibling=Bt,$t=Bt);return n&&Ue.forEach(function(O_){return a(G,O_)}),Et&&ai(G,dt),We}r(tt,"reconcileChildrenIterator");function an(G,F,ee,pe){if(typeof ee=="object"&&ee!==null&&ee.type===_&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case S:e:{for(var We=ee.key;F!==null;){if(F.key===We){if(We=ee.type,We===_){if(F.tag===7){o(G,F.sibling),pe=p(F,ee.props.children),pe.return=G,G=pe;break e}}else if(F.elementType===We||typeof We=="object"&&We!==null&&We.$$typeof===A&&wr(We)===F.type){o(G,F.sibling),pe=p(F,ee.props),No(pe,ee),pe.return=G,G=pe;break e}o(G,F);break}else a(G,F);F=F.sibling}ee.type===_?(pe=xr(ee.props.children,G.mode,pe,ee.key),pe.return=G,G=pe):(pe=Yc(ee.type,ee.key,ee.props,null,G.mode,pe),No(pe,ee),pe.return=G,G=pe)}return w(G);case N:e:{for(We=ee.key;F!==null;){if(F.key===We)if(F.tag===4&&F.stateNode.containerInfo===ee.containerInfo&&F.stateNode.implementation===ee.implementation){o(G,F.sibling),pe=p(F,ee.children||[]),pe.return=G,G=pe;break e}else{o(G,F);break}else a(G,F);F=F.sibling}pe=nm(ee,G.mode,pe),pe.return=G,G=pe}return w(G);case A:return ee=wr(ee),an(G,F,ee,pe)}if($(ee))return Pe(G,F,ee,pe);if(Y(ee)){if(We=Y(ee),typeof We!="function")throw Error(c(150));return ee=We.call(ee),tt(G,F,ee,pe)}if(typeof ee.then=="function")return an(G,F,su(ee),pe);if(ee.$$typeof===C)return an(G,F,Jc(G,ee),pe);au(G,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,F!==null&&F.tag===6?(o(G,F.sibling),pe=p(F,ee),pe.return=G,G=pe):(o(G,F),pe=tm(ee,G.mode,pe),pe.return=G,G=pe),w(G)):o(G,F)}return r(an,"reconcileChildFibersImpl"),function(G,F,ee,pe){try{So=0;var We=an(G,F,ee,pe);return dl=null,We}catch(Ue){if(Ue===ul||Ue===tu)throw Ue;var $t=Qs(29,Ue,null,G.mode);return $t.lanes=pe,$t.return=G,$t}}}r(Ux,"createChildReconciler");var Sr=Ux(!0),$x=Ux(!1),Ri=!1;function pm(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}r(pm,"initializeUpdateQueue");function hm(n,a){n=n.updateQueue,a.updateQueue===n&&(a.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}r(hm,"cloneUpdateQueue");function Nr(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}r(Nr,"createUpdate");function Cr(n,a,o){var d=n.updateQueue;if(d===null)return null;if(d=d.shared,(Ht&2)!==0){var p=d.pending;return p===null?a.next=a:(a.next=p.next,p.next=a),d.pending=a,a=Gc(n),kx(n,null,o),a}return Qc(n,d,a,o),Gc(n)}r(Cr,"enqueueUpdate");function Co(n,a,o){if(a=a.updateQueue,a!==null&&(a=a.shared,(o&4194048)!==0)){var d=a.lanes;d&=n.pendingLanes,o|=d,a.lanes=o,An(n,o)}}r(Co,"entangleTransitions");function gm(n,a){var o=n.updateQueue,d=n.alternate;if(d!==null&&(d=d.updateQueue,o===d)){var p=null,b=null;if(o=o.firstBaseUpdate,o!==null){do{var w={lane:o.lane,tag:o.tag,payload:o.payload,callback:null,next:null};b===null?p=b=w:b=b.next=w,o=o.next}while(o!==null);b===null?p=b=a:b=b.next=a}else p=b=a;o={baseState:d.baseState,firstBaseUpdate:p,lastBaseUpdate:b,shared:d.shared,callbacks:d.callbacks},n.updateQueue=o;return}n=o.lastBaseUpdate,n===null?o.firstBaseUpdate=a:n.next=a,o.lastBaseUpdate=a}r(gm,"enqueueCapturedUpdate");var xm=!1;function Ao(){if(xm){var n=cl;if(n!==null)throw n}}r(Ao,"suspendIfUpdateReadFromEntangledAsyncAction");function _o(n,a,o,d){xm=!1;var p=n.updateQueue;Ri=!1;var b=p.firstBaseUpdate,w=p.lastBaseUpdate,E=p.shared.pending;if(E!==null){p.shared.pending=null;var q=E,te=q.next;q.next=null,w===null?b=te:w.next=te,w=q;var me=n.alternate;me!==null&&(me=me.updateQueue,E=me.lastBaseUpdate,E!==w&&(E===null?me.firstBaseUpdate=te:E.next=te,me.lastBaseUpdate=q))}if(b!==null){var xe=p.baseState;w=0,me=te=q=null,E=b;do{var se=E.lane&-536870913,re=se!==E.lane;if(re?(Nt&se)===se:(d&se)===se){se!==0&&se===ol&&(xm=!0),me!==null&&(me=me.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var Pe=n,tt=E;se=a;var an=o;switch(tt.tag){case 1:if(Pe=tt.payload,typeof Pe=="function"){xe=Pe.call(an,xe,se);break e}xe=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=tt.payload,se=typeof Pe=="function"?Pe.call(an,xe,se):Pe,se==null)break e;xe=j({},xe,se);break e;case 2:Ri=!0}}se=E.callback,se!==null&&(n.flags|=64,re&&(n.flags|=8192),re=p.callbacks,re===null?p.callbacks=[se]:re.push(se))}else re={lane:se,tag:E.tag,payload:E.payload,callback:E.callback,next:null},me===null?(te=me=re,q=xe):me=me.next=re,w|=se;if(E=E.next,E===null){if(E=p.shared.pending,E===null)break;re=E,E=re.next,re.next=null,p.lastBaseUpdate=re,p.shared.pending=null}}while(!0);me===null&&(q=xe),p.baseState=q,p.firstBaseUpdate=te,p.lastBaseUpdate=me,b===null&&(p.shared.lanes=0),zi|=w,n.lanes=w,n.memoizedState=xe}}r(_o,"processUpdateQueue");function Bx(n,a){if(typeof n!="function")throw Error(c(191,n));n.call(a)}r(Bx,"callCallback");function Kx(n,a){var o=n.callbacks;if(o!==null)for(n.callbacks=null,n=0;n<o.length;n++)Bx(o[n],a)}r(Kx,"commitCallbacks");var fl=fe(null),iu=fe(0);function qx(n,a){n=hi,Ce(iu,n),Ce(fl,a),hi=n|a.baseLanes}r(qx,"pushHiddenContext");function bm(){Ce(iu,hi),Ce(fl,fl.current)}r(bm,"reuseHiddenContextOnStack");function vm(){hi=iu.current,Ae(fl),Ae(iu)}r(vm,"popHiddenContext");var Gs=fe(null),da=null;function Di(n){var a=n.alternate;Ce(Pn,Pn.current&1),Ce(Gs,n),da===null&&(a===null||fl.current!==null||a.memoizedState!==null)&&(da=n)}r(Di,"pushPrimaryTreeSuspenseHandler");function ym(n){Ce(Pn,Pn.current),Ce(Gs,n),da===null&&(da=n)}r(ym,"pushDehydratedActivitySuspenseHandler");function Fx(n){n.tag===22?(Ce(Pn,Pn.current),Ce(Gs,n),da===null&&(da=n)):Mi(n)}r(Fx,"pushOffscreenSuspenseHandler");function Mi(){Ce(Pn,Pn.current),Ce(Gs,Gs.current)}r(Mi,"reuseSuspenseHandlerOnStack");function Ys(n){Ae(Gs),da===n&&(da=null),Ae(Pn)}r(Ys,"popSuspenseHandler");var Pn=fe(0);function ru(n){for(var a=n;a!==null;){if(a.tag===13){var o=a.memoizedState;if(o!==null&&(o=o.dehydrated,o===null||Np(o)||Cp(o)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}r(ru,"findFirstSuspended");var li=0,ct=null,nn=null,Fn=null,lu=!1,ml=!1,Ar=!1,ou=0,Eo=0,pl=null,j2=0;function In(){throw Error(c(321))}r(In,"throwInvalidHookError");function jm(n,a){if(a===null)return!1;for(var o=0;o<a.length&&o<n.length;o++)if(!Ws(n[o],a[o]))return!1;return!0}r(jm,"areHookInputsEqual");function wm(n,a,o,d,p,b){return li=b,ct=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,R.H=n===null||n.memoizedState===null?Ab:zm,Ar=!1,b=o(d,p),Ar=!1,ml&&(b=Vx(a,o,d,p)),Hx(n),b}r(wm,"renderWithHooks");function Hx(n){R.H=Ro;var a=nn!==null&&nn.next!==null;if(li=0,Fn=nn=ct=null,lu=!1,Eo=0,pl=null,a)throw Error(c(300));n===null||Hn||(n=n.dependencies,n!==null&&Zc(n)&&(Hn=!0))}r(Hx,"finishRenderingHooks");function Vx(n,a,o,d){ct=n;var p=0;do{if(ml&&(pl=null),Eo=0,ml=!1,25<=p)throw Error(c(301));if(p+=1,Fn=nn=null,n.updateQueue!=null){var b=n.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}R.H=_b,b=a(o,d)}while(ml);return b}r(Vx,"renderWithHooksAgain");function w2(){var n=R.H,a=n.useState()[0];return a=typeof a.then=="function"?Io(a):a,n=n.useState()[0],(nn!==null?nn.memoizedState:null)!==n&&(ct.flags|=1024),a}r(w2,"TransitionAwareHostComponent");function km(){var n=ou!==0;return ou=0,n}r(km,"checkDidRenderIdHook");function Sm(n,a,o){a.updateQueue=n.updateQueue,a.flags&=-2053,n.lanes&=~o}r(Sm,"bailoutHooks");function Nm(n){if(lu){for(n=n.memoizedState;n!==null;){var a=n.queue;a!==null&&(a.pending=null),n=n.next}lu=!1}li=0,Fn=nn=ct=null,ml=!1,Eo=ou=0,pl=null}r(Nm,"resetHooksOnUnwind");function Ss(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fn===null?ct.memoizedState=Fn=n:Fn=Fn.next=n,Fn}r(Ss,"mountWorkInProgressHook");function Un(){if(nn===null){var n=ct.alternate;n=n!==null?n.memoizedState:null}else n=nn.next;var a=Fn===null?ct.memoizedState:Fn.next;if(a!==null)Fn=a,nn=n;else{if(n===null)throw ct.alternate===null?Error(c(467)):Error(c(310));nn=n,n={memoizedState:nn.memoizedState,baseState:nn.baseState,baseQueue:nn.baseQueue,queue:nn.queue,next:null},Fn===null?ct.memoizedState=Fn=n:Fn=Fn.next=n}return Fn}r(Un,"updateWorkInProgressHook");function cu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}r(cu,"createFunctionComponentUpdateQueue");function Io(n){var a=Eo;return Eo+=1,pl===null&&(pl=[]),n=Lx(pl,n,a),a=ct,(Fn===null?a.memoizedState:Fn.next)===null&&(a=a.alternate,R.H=a===null||a.memoizedState===null?Ab:zm),n}r(Io,"useThenable");function uu(n){if(n!==null&&typeof n=="object"){if(typeof n.then=="function")return Io(n);if(n.$$typeof===C)return os(n)}throw Error(c(438,String(n)))}r(uu,"use");function Cm(n){var a=null,o=ct.updateQueue;if(o!==null&&(a=o.memoCache),a==null){var d=ct.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(a={data:d.data.map(function(p){return p.slice()}),index:0})))}if(a??={data:[],index:0},o===null&&(o=cu(),ct.updateQueue=o),o.memoCache=a,o=a.data[a.index],o===void 0)for(o=a.data[a.index]=Array(n),d=0;d<n;d++)o[d]=O;return a.index++,o}r(Cm,"useMemoCache");function oi(n,a){return typeof a=="function"?a(n):a}r(oi,"basicStateReducer");function du(n){return Am(Un(),nn,n)}r(du,"updateReducer");function Am(n,a,o){var d=n.queue;if(d===null)throw Error(c(311));d.lastRenderedReducer=o;var p=n.baseQueue,b=d.pending;if(b!==null){if(p!==null){var w=p.next;p.next=b.next,b.next=w}a.baseQueue=p=b,d.pending=null}if(b=n.baseState,p===null)n.memoizedState=b;else{a=p.next;var E=w=null,q=null,te=a,me=!1;do{var xe=te.lane&-536870913;if(xe!==te.lane?(Nt&xe)===xe:(li&xe)===xe){var se=te.revertLane;if(se===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),xe===ol&&(me=!0);else if((li&se)===se){te=te.next,se===ol&&(me=!0);continue}else xe={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},q===null?(E=q=xe,w=b):q=q.next=xe,ct.lanes|=se,zi|=se;xe=te.action,Ar&&o(b,xe),b=te.hasEagerState?te.eagerState:o(b,xe)}else se={lane:xe,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},q===null?(E=q=se,w=b):q=q.next=se,ct.lanes|=xe,zi|=xe;te=te.next}while(te!==null&&te!==a);if(q===null?w=b:q.next=E,!Ws(b,n.memoizedState)&&(Hn=!0,me&&(o=cl,o!==null)))throw o;n.memoizedState=b,n.baseState=w,n.baseQueue=q,d.lastRenderedState=b}return p===null&&(d.lanes=0),[n.memoizedState,d.dispatch]}r(Am,"updateReducerImpl");function _m(n){var a=Un(),o=a.queue;if(o===null)throw Error(c(311));o.lastRenderedReducer=n;var d=o.dispatch,p=o.pending,b=a.memoizedState;if(p!==null){o.pending=null;var w=p=p.next;do b=n(b,w.action),w=w.next;while(w!==p);Ws(b,a.memoizedState)||(Hn=!0),a.memoizedState=b,a.baseQueue===null&&(a.baseState=b),o.lastRenderedState=b}return[b,d]}r(_m,"rerenderReducer");function Wx(n,a,o){var d=ct,p=Un(),b=Et;if(b){if(o===void 0)throw Error(c(407));o=o()}else o=a();var w=!Ws((nn||p).memoizedState,o);if(w&&(p.memoizedState=o,Hn=!0),p=p.queue,Tm(Yx.bind(null,d,p,n),[n]),p.getSnapshot!==a||w||Fn!==null&&Fn.memoizedState.tag&1){if(d.flags|=2048,hl(9,{destroy:void 0},Gx.bind(null,d,p,o,a),null),un===null)throw Error(c(349));b||(li&127)!==0||Qx(d,a,o)}return o}r(Wx,"updateSyncExternalStore");function Qx(n,a,o){n.flags|=16384,n={getSnapshot:a,value:o},a=ct.updateQueue,a===null?(a=cu(),ct.updateQueue=a,a.stores=[n]):(o=a.stores,o===null?a.stores=[n]:o.push(n))}r(Qx,"pushStoreConsistencyCheck");function Gx(n,a,o,d){a.value=o,a.getSnapshot=d,Xx(a)&&Zx(n)}r(Gx,"updateStoreInstance");function Yx(n,a,o){return o(function(){Xx(a)&&Zx(n)})}r(Yx,"subscribeToStore");function Xx(n){var a=n.getSnapshot;n=n.value;try{var o=a();return!Ws(n,o)}catch{return!0}}r(Xx,"checkIfSnapshotChanged");function Zx(n){var a=gr(n,2);a!==null&&Us(a,n,2)}r(Zx,"forceStoreRerender");function Em(n){var a=Ss();if(typeof n=="function"){var o=n;if(n=o(),Ar){dn(!0);try{o()}finally{dn(!1)}}}return a.memoizedState=a.baseState=n,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:n},a}r(Em,"mountStateImpl");function Jx(n,a,o,d){return n.baseState=o,Am(n,nn,typeof d=="function"?d:oi)}r(Jx,"updateOptimisticImpl");function k2(n,a,o,d,p){if(pu(n))throw Error(c(485));if(n=a.action,n!==null){var b={payload:p,action:n,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:r(function(w){b.listeners.push(w)},"then")};R.T!==null?o(!0):b.isTransition=!1,d(b),o=a.pending,o===null?(b.next=a.pending=b,eb(a,b)):(b.next=o.next,a.pending=o.next=b)}}r(k2,"dispatchActionState");function eb(n,a){var o=a.action,d=a.payload,p=n.state;if(a.isTransition){var b=R.T,w={};R.T=w;try{var E=o(p,d),q=R.S;q!==null&&q(w,E),tb(n,a,E)}catch(te){Im(n,a,te)}finally{b!==null&&w.types!==null&&(b.types=w.types),R.T=b}}else try{b=o(p,d),tb(n,a,b)}catch(te){Im(n,a,te)}}r(eb,"runActionStateAction");function tb(n,a,o){o!==null&&typeof o=="object"&&typeof o.then=="function"?o.then(function(d){nb(n,a,d)},function(d){return Im(n,a,d)}):nb(n,a,o)}r(tb,"handleActionReturnValue");function nb(n,a,o){a.status="fulfilled",a.value=o,sb(a),n.state=o,a=n.pending,a!==null&&(o=a.next,o===a?n.pending=null:(o=o.next,a.next=o,eb(n,o)))}r(nb,"onActionSuccess");function Im(n,a,o){var d=n.pending;if(n.pending=null,d!==null){d=d.next;do a.status="rejected",a.reason=o,sb(a),a=a.next;while(a!==d)}n.action=null}r(Im,"onActionError");function sb(n){n=n.listeners;for(var a=0;a<n.length;a++)(0,n[a])()}r(sb,"notifyActionListeners");function ab(n,a){return a}r(ab,"actionStateReducer");function ib(n,a){if(Et){var o=un.formState;if(o!==null){e:{var d=ct;if(Et){if(xn){t:{for(var p=xn,b=ua;p.nodeType!==8;){if(!b){p=null;break t}if(p=ma(p.nextSibling),p===null){p=null;break t}}b=p.data,p=b==="F!"||b==="F"?p:null}if(p){xn=ma(p.nextSibling),d=p.data==="F!";break e}}Ii(d)}d=!1}d&&(a=o[0])}}return o=Ss(),o.memoizedState=o.baseState=a,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ab,lastRenderedState:a},o.queue=d,o=Sb.bind(null,ct,d),d.dispatch=o,d=Em(!1),b=Lm.bind(null,ct,!1,d.queue),d=Ss(),p={state:a,dispatch:null,action:n,pending:null},d.queue=p,o=k2.bind(null,ct,p,b,o),p.dispatch=o,d.memoizedState=n,[a,o,!1]}r(ib,"mountActionState");function rb(n){return lb(Un(),nn,n)}r(rb,"updateActionState");function lb(n,a,o){if(a=Am(n,a,ab)[0],n=du(oi)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var d=Io(a)}catch(w){throw w===ul?tu:w}else d=a;a=Un();var p=a.queue,b=p.dispatch;return o!==a.memoizedState&&(ct.flags|=2048,hl(9,{destroy:void 0},S2.bind(null,p,o),null)),[d,b,n]}r(lb,"updateActionStateImpl");function S2(n,a){n.action=a}r(S2,"actionStateActionEffect");function ob(n){var a=Un(),o=nn;if(o!==null)return lb(a,o,n);Un(),a=a.memoizedState,o=Un();var d=o.queue.dispatch;return o.memoizedState=n,[a,d,!1]}r(ob,"rerenderActionState");function hl(n,a,o,d){return n={tag:n,create:o,deps:d,inst:a,next:null},a=ct.updateQueue,a===null&&(a=cu(),ct.updateQueue=a),o=a.lastEffect,o===null?a.lastEffect=n.next=n:(d=o.next,o.next=n,n.next=d,a.lastEffect=n),n}r(hl,"pushSimpleEffect");function cb(){return Un().memoizedState}r(cb,"updateRef");function fu(n,a,o,d){var p=Ss();ct.flags|=n,p.memoizedState=hl(1|a,{destroy:void 0},o,d===void 0?null:d)}r(fu,"mountEffectImpl");function mu(n,a,o,d){var p=Un();d=d===void 0?null:d;var b=p.memoizedState.inst;nn!==null&&d!==null&&jm(d,nn.memoizedState.deps)?p.memoizedState=hl(a,b,o,d):(ct.flags|=n,p.memoizedState=hl(1|a,b,o,d))}r(mu,"updateEffectImpl");function ub(n,a){fu(8390656,8,n,a)}r(ub,"mountEffect");function Tm(n,a){mu(2048,8,n,a)}r(Tm,"updateEffect");function N2(n){ct.flags|=4;var a=ct.updateQueue;if(a===null)a=cu(),ct.updateQueue=a,a.events=[n];else{var o=a.events;o===null?a.events=[n]:o.push(n)}}r(N2,"useEffectEventImpl");function db(n){var a=Un().memoizedState;return N2({ref:a,nextImpl:n}),function(){if((Ht&2)!==0)throw Error(c(440));return a.impl.apply(void 0,arguments)}}r(db,"updateEvent");function fb(n,a){return mu(4,2,n,a)}r(fb,"updateInsertionEffect");function mb(n,a){return mu(4,4,n,a)}r(mb,"updateLayoutEffect");function pb(n,a){if(typeof a=="function"){n=n();var o=a(n);return function(){typeof o=="function"?o():a(null)}}if(a!=null)return n=n(),a.current=n,function(){a.current=null}}r(pb,"imperativeHandleEffect");function hb(n,a,o){o=o!=null?o.concat([n]):null,mu(4,4,pb.bind(null,a,n),o)}r(hb,"updateImperativeHandle");function Rm(){}r(Rm,"mountDebugValue");function gb(n,a){var o=Un();a=a===void 0?null:a;var d=o.memoizedState;return a!==null&&jm(a,d[1])?d[0]:(o.memoizedState=[n,a],n)}r(gb,"updateCallback");function xb(n,a){var o=Un();a=a===void 0?null:a;var d=o.memoizedState;if(a!==null&&jm(a,d[1]))return d[0];if(d=n(),Ar){dn(!0);try{n()}finally{dn(!1)}}return o.memoizedState=[d,a],d}r(xb,"updateMemo");function Dm(n,a,o){return o===void 0||(li&1073741824)!==0&&(Nt&261930)===0?n.memoizedState=a:(n.memoizedState=o,n=hv(),ct.lanes|=n,zi|=n,o)}r(Dm,"mountDeferredValueImpl");function bb(n,a,o,d){return Ws(o,a)?o:fl.current!==null?(n=Dm(n,o,d),Ws(n,a)||(Hn=!0),n):(li&42)===0||(li&1073741824)!==0&&(Nt&261930)===0?(Hn=!0,n.memoizedState=o):(n=hv(),ct.lanes|=n,zi|=n,a)}r(bb,"updateDeferredValueImpl");function vb(n,a,o,d,p){var b=ne.p;ne.p=b!==0&&8>b?b:8;var w=R.T,E={};R.T=E,Lm(n,!1,a,o);try{var q=p(),te=R.S;te!==null&&te(E,q),q!==null&&typeof q=="object"&&typeof q.then=="function"?To(n,a,y2(q,d),fa(n)):To(n,a,d,fa(n))}catch(me){To(n,a,{then:r(function(){},"then"),status:"rejected",reason:me},fa())}finally{ne.p=b,w!==null&&E.types!==null&&(w.types=E.types),R.T=w}}r(vb,"startTransition");function C2(){}r(C2,"noop");function Mm(n,a,o,d){if(n.tag!==5)throw Error(c(476));var p=yb(n).queue;vb(n,p,a,ue,o===null?C2:function(){return jb(n),o(d)})}r(Mm,"startHostTransition");function yb(n){var a=n.memoizedState;if(a!==null)return a;a={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:ue},next:null};var o={};return a.next={memoizedState:o,baseState:o,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:oi,lastRenderedState:o},next:null},n.memoizedState=a,n=n.alternate,n!==null&&(n.memoizedState=a),a}r(yb,"ensureFormComponentIsStateful");function jb(n){var a=yb(n);a.next===null&&(a=n.alternate.memoizedState),To(n,a.next.queue,{},fa())}r(jb,"requestFormReset$1");function Om(){return os(Qo)}r(Om,"useHostTransitionStatus");function wb(){return Un().memoizedState}r(wb,"updateId");function kb(){return Un().memoizedState}r(kb,"updateRefresh");function A2(n){for(var a=n.return;a!==null;){switch(a.tag){case 24:case 3:var o=fa();n=Nr(o);var d=Cr(a,n,o);d!==null&&(Us(d,a,o),Co(d,a,o)),a={cache:um()},n.payload=a;return}a=a.return}}r(A2,"refreshCache");function _2(n,a,o){var d=fa();o={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},pu(n)?Nb(a,o):(o=Jf(n,a,o,d),o!==null&&(Us(o,n,d),Cb(o,a,d)))}r(_2,"dispatchReducerAction");function Sb(n,a,o){To(n,a,o,fa())}r(Sb,"dispatchSetState");function To(n,a,o,d){var p={lane:d,revertLane:0,gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null};if(pu(n))Nb(a,p);else{var b=n.alternate;if(n.lanes===0&&(b===null||b.lanes===0)&&(b=a.lastRenderedReducer,b!==null))try{var w=a.lastRenderedState,E=b(w,o);if(p.hasEagerState=!0,p.eagerState=E,Ws(E,w))return Qc(n,a,p,0),un===null&&Wc(),!1}catch{}if(o=Jf(n,a,p,d),o!==null)return Us(o,n,d),Cb(o,a,d),!0}return!1}r(To,"dispatchSetStateInternal");function Lm(n,a,o,d){if(d={lane:2,revertLane:pp(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},pu(n)){if(a)throw Error(c(479))}else a=Jf(n,o,d,2),a!==null&&Us(a,n,2)}r(Lm,"dispatchOptimisticSetState");function pu(n){var a=n.alternate;return n===ct||a!==null&&a===ct}r(pu,"isRenderPhaseUpdate");function Nb(n,a){ml=lu=!0;var o=n.pending;o===null?a.next=a:(a.next=o.next,o.next=a),n.pending=a}r(Nb,"enqueueRenderPhaseUpdate");function Cb(n,a,o){if((o&4194048)!==0){var d=a.lanes;d&=n.pendingLanes,o|=d,a.lanes=o,An(n,o)}}r(Cb,"entangleTransitionUpdate");var Ro={readContext:os,use:uu,useCallback:In,useContext:In,useEffect:In,useImperativeHandle:In,useLayoutEffect:In,useInsertionEffect:In,useMemo:In,useReducer:In,useRef:In,useState:In,useDebugValue:In,useDeferredValue:In,useTransition:In,useSyncExternalStore:In,useId:In,useHostTransitionStatus:In,useFormState:In,useActionState:In,useOptimistic:In,useMemoCache:In,useCacheRefresh:In};Ro.useEffectEvent=In;var Ab={readContext:os,use:uu,useCallback:r(function(n,a){return Ss().memoizedState=[n,a===void 0?null:a],n},"useCallback"),useContext:os,useEffect:ub,useImperativeHandle:r(function(n,a,o){o=o!=null?o.concat([n]):null,fu(4194308,4,pb.bind(null,a,n),o)},"useImperativeHandle"),useLayoutEffect:r(function(n,a){return fu(4194308,4,n,a)},"useLayoutEffect"),useInsertionEffect:r(function(n,a){fu(4,2,n,a)},"useInsertionEffect"),useMemo:r(function(n,a){var o=Ss();a=a===void 0?null:a;var d=n();if(Ar){dn(!0);try{n()}finally{dn(!1)}}return o.memoizedState=[d,a],d},"useMemo"),useReducer:r(function(n,a,o){var d=Ss();if(o!==void 0){var p=o(a);if(Ar){dn(!0);try{o(a)}finally{dn(!1)}}}else p=a;return d.memoizedState=d.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},d.queue=n,n=n.dispatch=_2.bind(null,ct,n),[d.memoizedState,n]},"useReducer"),useRef:r(function(n){var a=Ss();return n={current:n},a.memoizedState=n},"useRef"),useState:r(function(n){n=Em(n);var a=n.queue,o=Sb.bind(null,ct,a);return a.dispatch=o,[n.memoizedState,o]},"useState"),useDebugValue:Rm,useDeferredValue:r(function(n,a){return Dm(Ss(),n,a)},"useDeferredValue"),useTransition:r(function(){var n=Em(!1);return n=vb.bind(null,ct,n.queue,!0,!1),Ss().memoizedState=n,[!1,n]},"useTransition"),useSyncExternalStore:r(function(n,a,o){var d=ct,p=Ss();if(Et){if(o===void 0)throw Error(c(407));o=o()}else{if(o=a(),un===null)throw Error(c(349));(Nt&127)!==0||Qx(d,a,o)}p.memoizedState=o;var b={value:o,getSnapshot:a};return p.queue=b,ub(Yx.bind(null,d,b,n),[n]),d.flags|=2048,hl(9,{destroy:void 0},Gx.bind(null,d,b,o,a),null),o},"useSyncExternalStore"),useId:r(function(){var n=Ss(),a=un.identifierPrefix;if(Et){var o=Fa,d=qa;o=(d&~(1<<32-Rt(d)-1)).toString(32)+o,a="_"+a+"R_"+o,o=ou++,0<o&&(a+="H"+o.toString(32)),a+="_"}else o=j2++,a="_"+a+"r_"+o.toString(32)+"_";return n.memoizedState=a},"useId"),useHostTransitionStatus:Om,useFormState:ib,useActionState:ib,useOptimistic:r(function(n){var a=Ss();a.memoizedState=a.baseState=n;var o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=o,a=Lm.bind(null,ct,!0,o),o.dispatch=a,[n,a]},"useOptimistic"),useMemoCache:Cm,useCacheRefresh:r(function(){return Ss().memoizedState=A2.bind(null,ct)},"useCacheRefresh"),useEffectEvent:r(function(n){var a=Ss(),o={impl:n};return a.memoizedState=o,function(){if((Ht&2)!==0)throw Error(c(440));return o.impl.apply(void 0,arguments)}},"useEffectEvent")},zm={readContext:os,use:uu,useCallback:gb,useContext:os,useEffect:Tm,useImperativeHandle:hb,useInsertionEffect:fb,useLayoutEffect:mb,useMemo:xb,useReducer:du,useRef:cb,useState:r(function(){return du(oi)},"useState"),useDebugValue:Rm,useDeferredValue:r(function(n,a){return bb(Un(),nn.memoizedState,n,a)},"useDeferredValue"),useTransition:r(function(){var n=du(oi)[0],a=Un().memoizedState;return[typeof n=="boolean"?n:Io(n),a]},"useTransition"),useSyncExternalStore:Wx,useId:wb,useHostTransitionStatus:Om,useFormState:rb,useActionState:rb,useOptimistic:r(function(n,a){return Jx(Un(),nn,n,a)},"useOptimistic"),useMemoCache:Cm,useCacheRefresh:kb};zm.useEffectEvent=db;var _b={readContext:os,use:uu,useCallback:gb,useContext:os,useEffect:Tm,useImperativeHandle:hb,useInsertionEffect:fb,useLayoutEffect:mb,useMemo:xb,useReducer:_m,useRef:cb,useState:r(function(){return _m(oi)},"useState"),useDebugValue:Rm,useDeferredValue:r(function(n,a){var o=Un();return nn===null?Dm(o,n,a):bb(o,nn.memoizedState,n,a)},"useDeferredValue"),useTransition:r(function(){var n=_m(oi)[0],a=Un().memoizedState;return[typeof n=="boolean"?n:Io(n),a]},"useTransition"),useSyncExternalStore:Wx,useId:wb,useHostTransitionStatus:Om,useFormState:ob,useActionState:ob,useOptimistic:r(function(n,a){var o=Un();return nn!==null?Jx(o,nn,n,a):(o.baseState=n,[n,o.queue.dispatch])},"useOptimistic"),useMemoCache:Cm,useCacheRefresh:kb};_b.useEffectEvent=db;function Pm(n,a,o,d){a=n.memoizedState,o=o(d,a),o=o==null?a:j({},a,o),n.memoizedState=o,n.lanes===0&&(n.updateQueue.baseState=o)}r(Pm,"applyDerivedStateFromProps");var Um={enqueueSetState:r(function(n,a,o){n=n._reactInternals;var d=fa(),p=Nr(d);p.payload=a,o!=null&&(p.callback=o),a=Cr(n,p,d),a!==null&&(Us(a,n,d),Co(a,n,d))},"enqueueSetState"),enqueueReplaceState:r(function(n,a,o){n=n._reactInternals;var d=fa(),p=Nr(d);p.tag=1,p.payload=a,o!=null&&(p.callback=o),a=Cr(n,p,d),a!==null&&(Us(a,n,d),Co(a,n,d))},"enqueueReplaceState"),enqueueForceUpdate:r(function(n,a){n=n._reactInternals;var o=fa(),d=Nr(o);d.tag=2,a!=null&&(d.callback=a),a=Cr(n,d,o),a!==null&&(Us(a,n,o),Co(a,n,o))},"enqueueForceUpdate")};function Eb(n,a,o,d,p,b,w){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(d,b,w):a.prototype&&a.prototype.isPureReactComponent?!bo(o,d)||!bo(p,b):!0}r(Eb,"checkShouldComponentUpdate");function Ib(n,a,o,d){n=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(o,d),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(o,d),a.state!==n&&Um.enqueueReplaceState(a,a.state,null)}r(Ib,"callComponentWillReceiveProps");function _r(n,a){var o=a;if("ref"in a){o={};for(var d in a)d!=="ref"&&(o[d]=a[d])}if(n=n.defaultProps){o===a&&(o=j({},o));for(var p in n)o[p]===void 0&&(o[p]=n[p])}return o}r(_r,"resolveClassComponentProps");function E2(n){Vc(n)}r(E2,"defaultOnUncaughtError");function I2(n){}r(I2,"defaultOnCaughtError");function T2(n){Vc(n)}r(T2,"defaultOnRecoverableError");function hu(n,a){try{var o=n.onUncaughtError;o(a.value,{componentStack:a.stack})}catch(d){setTimeout(function(){throw d})}}r(hu,"logUncaughtError");function Tb(n,a,o){try{var d=n.onCaughtError;d(o.value,{componentStack:o.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(p){setTimeout(function(){throw p})}}r(Tb,"logCaughtError");function $m(n,a,o){return o=Nr(o),o.tag=3,o.payload={element:null},o.callback=function(){hu(n,a)},o}r($m,"createRootErrorUpdate");function Rb(n){return n=Nr(n),n.tag=3,n}r(Rb,"createClassErrorUpdate");function Db(n,a,o,d){var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var b=d.value;n.payload=function(){return p(b)},n.callback=function(){Tb(a,o,d)}}var w=o.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(n.callback=function(){Tb(a,o,d),typeof p!="function"&&(Pi===null?Pi=new Set([this]):Pi.add(this));var E=d.stack;this.componentDidCatch(d.value,{componentStack:E!==null?E:""})})}r(Db,"initializeClassErrorUpdate");function R2(n,a,o,d,p){if(o.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(a=o.alternate,a!==null&&ll(a,o,p,!0),o=Gs.current,o!==null){switch(o.tag){case 31:case 13:return da===null?Au():o.alternate===null&&Tn===0&&(Tn=3),o.flags&=-257,o.flags|=65536,o.lanes=p,d===nu?o.flags|=16384:(a=o.updateQueue,a===null?o.updateQueue=new Set([d]):a.add(d),dp(n,d,p)),!1;case 22:return o.flags|=65536,d===nu?o.flags|=16384:(a=o.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([d])},o.updateQueue=a):(o=a.retryQueue,o===null?a.retryQueue=new Set([d]):o.add(d)),dp(n,d,p)),!1}throw Error(c(435,o.tag))}return dp(n,d,p),Au(),!1}if(Et)return a=Gs.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=p,d!==im&&(n=Error(c(422),{cause:d}),jo(la(n,o)))):(d!==im&&(a=Error(c(423),{cause:d}),jo(la(a,o))),n=n.current.alternate,n.flags|=65536,p&=-p,n.lanes|=p,d=la(d,o),p=$m(n.stateNode,d,p),gm(n,p),Tn!==4&&(Tn=2)),!1;var b=Error(c(520),{cause:d});if(b=la(b,o),$o===null?$o=[b]:$o.push(b),Tn!==4&&(Tn=2),a===null)return!0;d=la(d,o),o=a;do{switch(o.tag){case 3:return o.flags|=65536,n=p&-p,o.lanes|=n,n=$m(o.stateNode,d,n),gm(o,n),!1;case 1:if(a=o.type,b=o.stateNode,(o.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(Pi===null||!Pi.has(b))))return o.flags|=65536,p&=-p,o.lanes|=p,p=Rb(p),Db(p,n,o,d),gm(o,p),!1}o=o.return}while(o!==null);return!1}r(R2,"throwException");var Bm=Error(c(461)),Hn=!1;function cs(n,a,o,d){a.child=n===null?$x(a,null,o,d):Sr(a,n.child,o,d)}r(cs,"reconcileChildren");function Mb(n,a,o,d,p){o=o.render;var b=a.ref;if("ref"in d){var w={};for(var E in d)E!=="ref"&&(w[E]=d[E])}else w=d;return yr(a),d=wm(n,a,o,w,b,p),E=km(),n!==null&&!Hn?(Sm(n,a,p),ci(n,a,p)):(Et&&E&&sm(a),a.flags|=1,cs(n,a,d,p),a.child)}r(Mb,"updateForwardRef");function Ob(n,a,o,d,p){if(n===null){var b=o.type;return typeof b=="function"&&!em(b)&&b.defaultProps===void 0&&o.compare===null?(a.tag=15,a.type=b,Lb(n,a,b,d,p)):(n=Yc(o.type,null,d,a,a.mode,p),n.ref=a.ref,n.return=a,a.child=n)}if(b=n.child,!Gm(n,p)){var w=b.memoizedProps;if(o=o.compare,o=o!==null?o:bo,o(w,d)&&n.ref===a.ref)return ci(n,a,p)}return a.flags|=1,n=si(b,d),n.ref=a.ref,n.return=a,a.child=n}r(Ob,"updateMemoComponent");function Lb(n,a,o,d,p){if(n!==null){var b=n.memoizedProps;if(bo(b,d)&&n.ref===a.ref)if(Hn=!1,a.pendingProps=d=b,Gm(n,p))(n.flags&131072)!==0&&(Hn=!0);else return a.lanes=n.lanes,ci(n,a,p)}return Km(n,a,o,d,p)}r(Lb,"updateSimpleMemoComponent");function zb(n,a,o,d){var p=d.children,b=n!==null?n.memoizedState:null;if(n===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((a.flags&128)!==0){if(b=b!==null?b.baseLanes|o:o,n!==null){for(d=a.child=n.child,p=0;d!==null;)p=p|d.lanes|d.childLanes,d=d.sibling;d=p&~b}else d=0,a.child=null;return Pb(n,a,b,o,d)}if((o&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},n!==null&&eu(a,b!==null?b.cachePool:null),b!==null?qx(a,b):bm(),Fx(a);else return d=a.lanes=536870912,Pb(n,a,b!==null?b.baseLanes|o:o,o,d)}else b!==null?(eu(a,b.cachePool),qx(a,b),Mi(a),a.memoizedState=null):(n!==null&&eu(a,null),bm(),Mi(a));return cs(n,a,p,o),a.child}r(zb,"updateOffscreenComponent");function Do(n,a){return n!==null&&n.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}r(Do,"bailoutOffscreenComponent");function Pb(n,a,o,d,p){var b=fm();return b=b===null?null:{parent:qn._currentValue,pool:b},a.memoizedState={baseLanes:o,cachePool:b},n!==null&&eu(a,null),bm(),Fx(a),n!==null&&ll(n,a,d,!0),a.childLanes=p,null}r(Pb,"deferHiddenOffscreenComponent");function gu(n,a){return a=bu({mode:a.mode,children:a.children},n.mode),a.ref=n.ref,n.child=a,a.return=n,a}r(gu,"mountActivityChildren");function Ub(n,a,o){return Sr(a,n.child,null,o),n=gu(a,a.pendingProps),n.flags|=2,Ys(a),a.memoizedState=null,n}r(Ub,"retryActivityComponentWithoutHydrating");function D2(n,a,o){var d=a.pendingProps,p=(a.flags&128)!==0;if(a.flags&=-129,n===null){if(Et){if(d.mode==="hidden")return n=gu(a,d),a.lanes=536870912,Do(null,n);if(ym(a),(n=xn)?(n=Zv(n,ua),n=n!==null&&n.data==="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:_i!==null?{id:qa,overflow:Fa}:null,retryLane:536870912,hydrationErrors:null},o=Nx(n),o.return=a,a.child=o,ls=a,xn=null)):n=null,n===null)throw Ii(a);return a.lanes=536870912,null}return gu(a,d)}var b=n.memoizedState;if(b!==null){var w=b.dehydrated;if(ym(a),p)if(a.flags&256)a.flags&=-257,a=Ub(n,a,o);else if(a.memoizedState!==null)a.child=n.child,a.flags|=128,a=null;else throw Error(c(558));else if(Hn||ll(n,a,o,!1),p=(o&n.childLanes)!==0,Hn||p){if(d=un,d!==null&&(w=Dn(d,o),w!==0&&w!==b.retryLane))throw b.retryLane=w,gr(n,w),Us(d,n,w),Bm;Au(),a=Ub(n,a,o)}else n=b.treeContext,xn=ma(w.nextSibling),ls=a,Et=!0,Ei=null,ua=!1,n!==null&&_x(a,n),a=gu(a,d),a.flags|=4096;return a}return n=si(n.child,{mode:d.mode,children:d.children}),n.ref=a.ref,a.child=n,n.return=a,n}r(D2,"updateActivityComponent");function xu(n,a){var o=a.ref;if(o===null)n!==null&&n.ref!==null&&(a.flags|=4194816);else{if(typeof o!="function"&&typeof o!="object")throw Error(c(284));(n===null||n.ref!==o)&&(a.flags|=4194816)}}r(xu,"markRef");function Km(n,a,o,d,p){return yr(a),o=wm(n,a,o,d,void 0,p),d=km(),n!==null&&!Hn?(Sm(n,a,p),ci(n,a,p)):(Et&&d&&sm(a),a.flags|=1,cs(n,a,o,p),a.child)}r(Km,"updateFunctionComponent");function $b(n,a,o,d,p,b){return yr(a),a.updateQueue=null,o=Vx(a,d,o,p),Hx(n),d=km(),n!==null&&!Hn?(Sm(n,a,b),ci(n,a,b)):(Et&&d&&sm(a),a.flags|=1,cs(n,a,o,b),a.child)}r($b,"replayFunctionComponent");function Bb(n,a,o,d,p){if(yr(a),a.stateNode===null){var b=sl,w=o.contextType;typeof w=="object"&&w!==null&&(b=os(w)),b=new o(d,b),a.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=Um,a.stateNode=b,b._reactInternals=a,b=a.stateNode,b.props=d,b.state=a.memoizedState,b.refs={},pm(a),w=o.contextType,b.context=typeof w=="object"&&w!==null?os(w):sl,b.state=a.memoizedState,w=o.getDerivedStateFromProps,typeof w=="function"&&(Pm(a,o,w,d),b.state=a.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(w=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),w!==b.state&&Um.enqueueReplaceState(b,b.state,null),_o(a,d,b,p),Ao(),b.state=a.memoizedState),typeof b.componentDidMount=="function"&&(a.flags|=4194308),d=!0}else if(n===null){b=a.stateNode;var E=a.memoizedProps,q=_r(o,E);b.props=q;var te=b.context,me=o.contextType;w=sl,typeof me=="object"&&me!==null&&(w=os(me));var xe=o.getDerivedStateFromProps;me=typeof xe=="function"||typeof b.getSnapshotBeforeUpdate=="function",E=a.pendingProps!==E,me||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E||te!==w)&&Ib(a,b,d,w),Ri=!1;var se=a.memoizedState;b.state=se,_o(a,d,b,p),Ao(),te=a.memoizedState,E||se!==te||Ri?(typeof xe=="function"&&(Pm(a,o,xe,d),te=a.memoizedState),(q=Ri||Eb(a,o,q,d,se,te,w))?(me||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(a.flags|=4194308)):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=d,a.memoizedState=te),b.props=d,b.state=te,b.context=w,d=q):(typeof b.componentDidMount=="function"&&(a.flags|=4194308),d=!1)}else{b=a.stateNode,hm(n,a),w=a.memoizedProps,me=_r(o,w),b.props=me,xe=a.pendingProps,se=b.context,te=o.contextType,q=sl,typeof te=="object"&&te!==null&&(q=os(te)),E=o.getDerivedStateFromProps,(te=typeof E=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==xe||se!==q)&&Ib(a,b,d,q),Ri=!1,se=a.memoizedState,b.state=se,_o(a,d,b,p),Ao();var re=a.memoizedState;w!==xe||se!==re||Ri||n!==null&&n.dependencies!==null&&Zc(n.dependencies)?(typeof E=="function"&&(Pm(a,o,E,d),re=a.memoizedState),(me=Ri||Eb(a,o,me,d,se,re,q)||n!==null&&n.dependencies!==null&&Zc(n.dependencies))?(te||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(d,re,q),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(d,re,q)),typeof b.componentDidUpdate=="function"&&(a.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof b.componentDidUpdate!="function"||w===n.memoizedProps&&se===n.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&se===n.memoizedState||(a.flags|=1024),a.memoizedProps=d,a.memoizedState=re),b.props=d,b.state=re,b.context=q,d=me):(typeof b.componentDidUpdate!="function"||w===n.memoizedProps&&se===n.memoizedState||(a.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===n.memoizedProps&&se===n.memoizedState||(a.flags|=1024),d=!1)}return b=d,xu(n,a),d=(a.flags&128)!==0,b||d?(b=a.stateNode,o=d&&typeof o.getDerivedStateFromError!="function"?null:b.render(),a.flags|=1,n!==null&&d?(a.child=Sr(a,n.child,null,p),a.child=Sr(a,null,o,p)):cs(n,a,o,p),a.memoizedState=b.state,n=a.child):n=ci(n,a,p),n}r(Bb,"updateClassComponent");function Kb(n,a,o,d){return br(),a.flags|=256,cs(n,a,o,d),a.child}r(Kb,"mountHostRootWithoutHydrating");var qm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fm(n){return{baseLanes:n,cachePool:Mx()}}r(Fm,"mountSuspenseOffscreenState");function Hm(n,a,o){return n=n!==null?n.childLanes&~o:0,a&&(n|=Zs),n}r(Hm,"getRemainingWorkInPrimaryTree");function qb(n,a,o){var d=a.pendingProps,p=!1,b=(a.flags&128)!==0,w;if((w=b)||(w=n!==null&&n.memoizedState===null?!1:(Pn.current&2)!==0),w&&(p=!0,a.flags&=-129),w=(a.flags&32)!==0,a.flags&=-33,n===null){if(Et){if(p?Di(a):Mi(a),(n=xn)?(n=Zv(n,ua),n=n!==null&&n.data!=="&"?n:null,n!==null&&(a.memoizedState={dehydrated:n,treeContext:_i!==null?{id:qa,overflow:Fa}:null,retryLane:536870912,hydrationErrors:null},o=Nx(n),o.return=a,a.child=o,ls=a,xn=null)):n=null,n===null)throw Ii(a);return Cp(n)?a.lanes=32:a.lanes=536870912,null}var E=d.children;return d=d.fallback,p?(Mi(a),p=a.mode,E=bu({mode:"hidden",children:E},p),d=xr(d,p,o,null),E.return=a,d.return=a,E.sibling=d,a.child=E,d=a.child,d.memoizedState=Fm(o),d.childLanes=Hm(n,w,o),a.memoizedState=qm,Do(null,d)):(Di(a),Vm(a,E))}var q=n.memoizedState;if(q!==null&&(E=q.dehydrated,E!==null)){if(b)a.flags&256?(Di(a),a.flags&=-257,a=Wm(n,a,o)):a.memoizedState!==null?(Mi(a),a.child=n.child,a.flags|=128,a=null):(Mi(a),E=d.fallback,p=a.mode,d=bu({mode:"visible",children:d.children},p),E=xr(E,p,o,null),E.flags|=2,d.return=a,E.return=a,d.sibling=E,a.child=d,Sr(a,n.child,null,o),d=a.child,d.memoizedState=Fm(o),d.childLanes=Hm(n,w,o),a.memoizedState=qm,a=Do(null,d));else if(Di(a),Cp(E)){if(w=E.nextSibling&&E.nextSibling.dataset,w)var te=w.dgst;w=te,d=Error(c(419)),d.stack="",d.digest=w,jo({value:d,source:null,stack:null}),a=Wm(n,a,o)}else if(Hn||ll(n,a,o,!1),w=(o&n.childLanes)!==0,Hn||w){if(w=un,w!==null&&(d=Dn(w,o),d!==0&&d!==q.retryLane))throw q.retryLane=d,gr(n,d),Us(w,n,d),Bm;Np(E)||Au(),a=Wm(n,a,o)}else Np(E)?(a.flags|=192,a.child=n.child,a=null):(n=q.treeContext,xn=ma(E.nextSibling),ls=a,Et=!0,Ei=null,ua=!1,n!==null&&_x(a,n),a=Vm(a,d.children),a.flags|=4096);return a}return p?(Mi(a),E=d.fallback,p=a.mode,q=n.child,te=q.sibling,d=si(q,{mode:"hidden",children:d.children}),d.subtreeFlags=q.subtreeFlags&65011712,te!==null?E=si(te,E):(E=xr(E,p,o,null),E.flags|=2),E.return=a,d.return=a,d.sibling=E,a.child=d,Do(null,d),d=a.child,E=n.child.memoizedState,E===null?E=Fm(o):(p=E.cachePool,p!==null?(q=qn._currentValue,p=p.parent!==q?{parent:q,pool:q}:p):p=Mx(),E={baseLanes:E.baseLanes|o,cachePool:p}),d.memoizedState=E,d.childLanes=Hm(n,w,o),a.memoizedState=qm,Do(n.child,d)):(Di(a),o=n.child,n=o.sibling,o=si(o,{mode:"visible",children:d.children}),o.return=a,o.sibling=null,n!==null&&(w=a.deletions,w===null?(a.deletions=[n],a.flags|=16):w.push(n)),a.child=o,a.memoizedState=null,o)}r(qb,"updateSuspenseComponent");function Vm(n,a){return a=bu({mode:"visible",children:a},n.mode),a.return=n,n.child=a}r(Vm,"mountSuspensePrimaryChildren");function bu(n,a){return n=Qs(22,n,null,a),n.lanes=0,n}r(bu,"mountWorkInProgressOffscreenFiber");function Wm(n,a,o){return Sr(a,n.child,null,o),n=Vm(a,a.pendingProps.children),n.flags|=2,a.memoizedState=null,n}r(Wm,"retrySuspenseComponentWithoutHydrating");function Fb(n,a,o){n.lanes|=a;var d=n.alternate;d!==null&&(d.lanes|=a),om(n.return,a,o)}r(Fb,"scheduleSuspenseWorkOnFiber");function Qm(n,a,o,d,p,b){var w=n.memoizedState;w===null?n.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:d,tail:o,tailMode:p,treeForkCount:b}:(w.isBackwards=a,w.rendering=null,w.renderingStartTime=0,w.last=d,w.tail=o,w.tailMode=p,w.treeForkCount=b)}r(Qm,"initSuspenseListRenderState");function Hb(n,a,o){var d=a.pendingProps,p=d.revealOrder,b=d.tail;d=d.children;var w=Pn.current,E=(w&2)!==0;if(E?(w=w&1|2,a.flags|=128):w&=1,Ce(Pn,w),cs(n,a,d,o),d=Et?yo:0,!E&&n!==null&&(n.flags&128)!==0)e:for(n=a.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Fb(n,o,a);else if(n.tag===19)Fb(n,o,a);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===a)break e;for(;n.sibling===null;){if(n.return===null||n.return===a)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}switch(p){case"forwards":for(o=a.child,p=null;o!==null;)n=o.alternate,n!==null&&ru(n)===null&&(p=o),o=o.sibling;o=p,o===null?(p=a.child,a.child=null):(p=o.sibling,o.sibling=null),Qm(a,!1,p,o,b,d);break;case"backwards":case"unstable_legacy-backwards":for(o=null,p=a.child,a.child=null;p!==null;){if(n=p.alternate,n!==null&&ru(n)===null){a.child=p;break}n=p.sibling,p.sibling=o,o=p,p=n}Qm(a,!0,o,null,b,d);break;case"together":Qm(a,!1,null,null,void 0,d);break;default:a.memoizedState=null}return a.child}r(Hb,"updateSuspenseListComponent");function ci(n,a,o){if(n!==null&&(a.dependencies=n.dependencies),zi|=a.lanes,(o&a.childLanes)===0)if(n!==null){if(ll(n,a,o,!1),(o&a.childLanes)===0)return null}else return null;if(n!==null&&a.child!==n.child)throw Error(c(153));if(a.child!==null){for(n=a.child,o=si(n,n.pendingProps),a.child=o,o.return=a;n.sibling!==null;)n=n.sibling,o=o.sibling=si(n,n.pendingProps),o.return=a;o.sibling=null}return a.child}r(ci,"bailoutOnAlreadyFinishedWork");function Gm(n,a){return(n.lanes&a)!==0?!0:(n=n.dependencies,!!(n!==null&&Zc(n)))}r(Gm,"checkScheduledUpdateOrContext");function M2(n,a,o){switch(a.tag){case 3:ze(a,a.stateNode.containerInfo),Ti(a,qn,n.memoizedState.cache),br();break;case 27:case 5:ft(a);break;case 4:ze(a,a.stateNode.containerInfo);break;case 10:Ti(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,ym(a),null;break;case 13:var d=a.memoizedState;if(d!==null)return d.dehydrated!==null?(Di(a),a.flags|=128,null):(o&a.child.childLanes)!==0?qb(n,a,o):(Di(a),n=ci(n,a,o),n!==null?n.sibling:null);Di(a);break;case 19:var p=(n.flags&128)!==0;if(d=(o&a.childLanes)!==0,d||(ll(n,a,o,!1),d=(o&a.childLanes)!==0),p){if(d)return Hb(n,a,o);a.flags|=128}if(p=a.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),Ce(Pn,Pn.current),d)break;return null;case 22:return a.lanes=0,zb(n,a,o,a.pendingProps);case 24:Ti(a,qn,n.memoizedState.cache)}return ci(n,a,o)}r(M2,"attemptEarlyBailoutIfNoScheduledUpdate");function Vb(n,a,o){if(n!==null)if(n.memoizedProps!==a.pendingProps)Hn=!0;else{if(!Gm(n,o)&&(a.flags&128)===0)return Hn=!1,M2(n,a,o);Hn=(n.flags&131072)!==0}else Hn=!1,Et&&(a.flags&1048576)!==0&&Ax(a,yo,a.index);switch(a.lanes=0,a.tag){case 16:e:{var d=a.pendingProps;if(n=wr(a.elementType),a.type=n,typeof n=="function")em(n)?(d=_r(n,d),a.tag=1,a=Bb(null,a,n,d,o)):(a.tag=0,a=Km(null,a,n,d,o));else{if(n!=null){var p=n.$$typeof;if(p===M){a.tag=11,a=Mb(null,a,n,d,o);break e}else if(p===P){a.tag=14,a=Ob(null,a,n,d,o);break e}}throw a=oe(n)||n,Error(c(306,a,""))}}return a;case 0:return Km(n,a,a.type,a.pendingProps,o);case 1:return d=a.type,p=_r(d,a.pendingProps),Bb(n,a,d,p,o);case 3:e:{if(ze(a,a.stateNode.containerInfo),n===null)throw Error(c(387));d=a.pendingProps;var b=a.memoizedState;p=b.element,hm(n,a),_o(a,d,null,o);var w=a.memoizedState;if(d=w.cache,Ti(a,qn,d),d!==b.cache&&cm(a,[qn],o,!0),Ao(),d=w.element,b.isDehydrated)if(b={element:d,isDehydrated:!1,cache:w.cache},a.updateQueue.baseState=b,a.memoizedState=b,a.flags&256){a=Kb(n,a,d,o);break e}else if(d!==p){p=la(Error(c(424)),a),jo(p),a=Kb(n,a,d,o);break e}else for(n=a.stateNode.containerInfo,n.nodeType===9?n=n.body:n=n.nodeName==="HTML"?n.ownerDocument.body:n,xn=ma(n.firstChild),ls=a,Et=!0,Ei=null,ua=!0,o=$x(a,null,d,o),a.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(br(),d===p){a=ci(n,a,o);break e}cs(n,a,d,o)}a=a.child}return a;case 26:return xu(n,a),n===null?(o=ay(a.type,null,a.pendingProps,null))?a.memoizedState=o:Et||(o=a.type,n=a.pendingProps,d=Mu(De.current).createElement(o),d[bt]=a,d[kn]=n,us(d,o,n),mn(d),a.stateNode=d):a.memoizedState=ay(a.type,n.memoizedProps,a.pendingProps,n.memoizedState),null;case 27:return ft(a),n===null&&Et&&(d=a.stateNode=ty(a.type,a.pendingProps,De.current),ls=a,ua=!0,p=xn,Ki(a.type)?(Ap=p,xn=ma(d.firstChild)):xn=p),cs(n,a,a.pendingProps.children,o),xu(n,a),n===null&&(a.flags|=4194304),a.child;case 5:return n===null&&Et&&((p=d=xn)&&(d=o_(d,a.type,a.pendingProps,ua),d!==null?(a.stateNode=d,ls=a,xn=ma(d.firstChild),ua=!1,p=!0):p=!1),p||Ii(a)),ft(a),p=a.type,b=a.pendingProps,w=n!==null?n.memoizedProps:null,d=b.children,wp(p,b)?d=null:w!==null&&wp(p,w)&&(a.flags|=32),a.memoizedState!==null&&(p=wm(n,a,w2,null,null,o),Qo._currentValue=p),xu(n,a),cs(n,a,d,o),a.child;case 6:return n===null&&Et&&((n=o=xn)&&(o=c_(o,a.pendingProps,ua),o!==null?(a.stateNode=o,ls=a,xn=null,n=!0):n=!1),n||Ii(a)),null;case 13:return qb(n,a,o);case 4:return ze(a,a.stateNode.containerInfo),d=a.pendingProps,n===null?a.child=Sr(a,null,d,o):cs(n,a,d,o),a.child;case 11:return Mb(n,a,a.type,a.pendingProps,o);case 7:return cs(n,a,a.pendingProps,o),a.child;case 8:return cs(n,a,a.pendingProps.children,o),a.child;case 12:return cs(n,a,a.pendingProps.children,o),a.child;case 10:return d=a.pendingProps,Ti(a,a.type,d.value),cs(n,a,d.children,o),a.child;case 9:return p=a.type._context,d=a.pendingProps.children,yr(a),p=os(p),d=d(p),a.flags|=1,cs(n,a,d,o),a.child;case 14:return Ob(n,a,a.type,a.pendingProps,o);case 15:return Lb(n,a,a.type,a.pendingProps,o);case 19:return Hb(n,a,o);case 31:return D2(n,a,o);case 22:return zb(n,a,o,a.pendingProps);case 24:return yr(a),d=os(qn),n===null?(p=fm(),p===null&&(p=un,b=um(),p.pooledCache=b,b.refCount++,b!==null&&(p.pooledCacheLanes|=o),p=b),a.memoizedState={parent:d,cache:p},pm(a),Ti(a,qn,p)):((n.lanes&o)!==0&&(hm(n,a),_o(a,null,null,o),Ao()),p=n.memoizedState,b=a.memoizedState,p.parent!==d?(p={parent:d,cache:d},a.memoizedState=p,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=p),Ti(a,qn,d)):(d=b.cache,Ti(a,qn,d),d!==p.cache&&cm(a,[qn],o,!0))),cs(n,a,a.pendingProps.children,o),a.child;case 29:throw a.pendingProps}throw Error(c(156,a.tag))}r(Vb,"beginWork");function ui(n){n.flags|=4}r(ui,"markUpdate");function Ym(n,a,o,d,p){if((a=(n.mode&32)!==0)&&(a=!1),a){if(n.flags|=16777216,(p&335544128)===p)if(n.stateNode.complete)n.flags|=8192;else if(vv())n.flags|=8192;else throw kr=nu,mm}else n.flags&=-16777217}r(Ym,"preloadInstanceAndSuspendIfNeeded");function Wb(n,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)n.flags&=-16777217;else if(n.flags|=16777216,!cy(a))if(vv())n.flags|=8192;else throw kr=nu,mm}r(Wb,"preloadResourceAndSuspendIfNeeded");function vu(n,a){a!==null&&(n.flags|=4),n.flags&16384&&(a=n.tag!==22?on():536870912,n.lanes|=a,vl|=a)}r(vu,"scheduleRetryEffect");function Mo(n,a){if(!Et)switch(n.tailMode){case"hidden":a=n.tail;for(var o=null;a!==null;)a.alternate!==null&&(o=a),a=a.sibling;o===null?n.tail=null:o.sibling=null;break;case"collapsed":o=n.tail;for(var d=null;o!==null;)o.alternate!==null&&(d=o),o=o.sibling;d===null?a||n.tail===null?n.tail=null:n.tail.sibling=null:d.sibling=null}}r(Mo,"cutOffTailIfNeeded");function bn(n){var a=n.alternate!==null&&n.alternate.child===n.child,o=0,d=0;if(a)for(var p=n.child;p!==null;)o|=p.lanes|p.childLanes,d|=p.subtreeFlags&65011712,d|=p.flags&65011712,p.return=n,p=p.sibling;else for(p=n.child;p!==null;)o|=p.lanes|p.childLanes,d|=p.subtreeFlags,d|=p.flags,p.return=n,p=p.sibling;return n.subtreeFlags|=d,n.childLanes=o,a}r(bn,"bubbleProperties");function O2(n,a,o){var d=a.pendingProps;switch(am(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return bn(a),null;case 1:return bn(a),null;case 3:return o=a.stateNode,d=null,n!==null&&(d=n.memoizedState.cache),a.memoizedState.cache!==d&&(a.flags|=2048),ri(qn),ve(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(n===null||n.child===null)&&(rl(a)?ui(a):n===null||n.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,rm())),bn(a),null;case 26:var p=a.type,b=a.memoizedState;return n===null?(ui(a),b!==null?(bn(a),Wb(a,b)):(bn(a),Ym(a,p,null,d,o))):b?b!==n.memoizedState?(ui(a),bn(a),Wb(a,b)):(bn(a),a.flags&=-16777217):(n=n.memoizedProps,n!==d&&ui(a),bn(a),Ym(a,p,n,d,o)),null;case 27:if(At(a),o=De.current,p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==d&&ui(a);else{if(!d){if(a.stateNode===null)throw Error(c(166));return bn(a),null}n=Se.current,rl(a)?Ex(a,n):(n=ty(p,d,o),a.stateNode=n,ui(a))}return bn(a),null;case 5:if(At(a),p=a.type,n!==null&&a.stateNode!=null)n.memoizedProps!==d&&ui(a);else{if(!d){if(a.stateNode===null)throw Error(c(166));return bn(a),null}if(b=Se.current,rl(a))Ex(a,b);else{var w=Mu(De.current);switch(b){case 1:b=w.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:b=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":b=w.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":b=w.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":b=w.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof d.is=="string"?w.createElement("select",{is:d.is}):w.createElement("select"),d.multiple?b.multiple=!0:d.size&&(b.size=d.size);break;default:b=typeof d.is=="string"?w.createElement(p,{is:d.is}):w.createElement(p)}}b[bt]=a,b[kn]=d;e:for(w=a.child;w!==null;){if(w.tag===5||w.tag===6)b.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===a)break e;for(;w.sibling===null;){if(w.return===null||w.return===a)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}a.stateNode=b;e:switch(us(b,p,d),p){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&ui(a)}}return bn(a),Ym(a,a.type,n===null?null:n.memoizedProps,a.pendingProps,o),null;case 6:if(n&&a.stateNode!=null)n.memoizedProps!==d&&ui(a);else{if(typeof d!="string"&&a.stateNode===null)throw Error(c(166));if(n=De.current,rl(a)){if(n=a.stateNode,o=a.memoizedProps,d=null,p=ls,p!==null)switch(p.tag){case 27:case 5:d=p.memoizedProps}n[bt]=a,n=!!(n.nodeValue===o||d!==null&&d.suppressHydrationWarning===!0||Fv(n.nodeValue,o)),n||Ii(a,!0)}else n=Mu(n).createTextNode(d),n[bt]=a,a.stateNode=n}return bn(a),null;case 31:if(o=a.memoizedState,n===null||n.memoizedState!==null){if(d=rl(a),o!==null){if(n===null){if(!d)throw Error(c(318));if(n=a.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(c(557));n[bt]=a}else br(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;bn(a),n=!1}else o=rm(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=o),n=!0;if(!n)return a.flags&256?(Ys(a),a):(Ys(a),null);if((a.flags&128)!==0)throw Error(c(558))}return bn(a),null;case 13:if(d=a.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=rl(a),d!==null&&d.dehydrated!==null){if(n===null){if(!p)throw Error(c(318));if(p=a.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(c(317));p[bt]=a}else br(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;bn(a),p=!1}else p=rm(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return a.flags&256?(Ys(a),a):(Ys(a),null)}return Ys(a),(a.flags&128)!==0?(a.lanes=o,a):(o=d!==null,n=n!==null&&n.memoizedState!==null,o&&(d=a.child,p=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(p=d.alternate.memoizedState.cachePool.pool),b=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(b=d.memoizedState.cachePool.pool),b!==p&&(d.flags|=2048)),o!==n&&o&&(a.child.flags|=8192),vu(a,a.updateQueue),bn(a),null);case 4:return ve(),n===null&&$v(a.stateNode.containerInfo),bn(a),null;case 10:return ri(a.type),bn(a),null;case 19:if(Ae(Pn),d=a.memoizedState,d===null)return bn(a),null;if(p=(a.flags&128)!==0,b=d.rendering,b===null)if(p)Mo(d,!1);else{if(Tn!==0||n!==null&&(n.flags&128)!==0)for(n=a.child;n!==null;){if(b=ru(n),b!==null){for(a.flags|=128,Mo(d,!1),n=b.updateQueue,a.updateQueue=n,vu(a,n),a.subtreeFlags=0,n=o,o=a.child;o!==null;)Sx(o,n),o=o.sibling;return Ce(Pn,Pn.current&1|2),Et&&ai(a,d.treeForkCount),a.child}n=n.sibling}d.tail!==null&&He()>Su&&(a.flags|=128,p=!0,Mo(d,!1),a.lanes=4194304)}else{if(!p)if(n=ru(b),n!==null){if(a.flags|=128,p=!0,n=n.updateQueue,a.updateQueue=n,vu(a,n),Mo(d,!0),d.tail===null&&d.tailMode==="hidden"&&!b.alternate&&!Et)return bn(a),null}else 2*He()-d.renderingStartTime>Su&&o!==536870912&&(a.flags|=128,p=!0,Mo(d,!1),a.lanes=4194304);d.isBackwards?(b.sibling=a.child,a.child=b):(n=d.last,n!==null?n.sibling=b:a.child=b,d.last=b)}return d.tail!==null?(n=d.tail,d.rendering=n,d.tail=n.sibling,d.renderingStartTime=He(),n.sibling=null,o=Pn.current,Ce(Pn,p?o&1|2:o&1),Et&&ai(a,d.treeForkCount),n):(bn(a),null);case 22:case 23:return Ys(a),vm(),d=a.memoizedState!==null,n!==null?n.memoizedState!==null!==d&&(a.flags|=8192):d&&(a.flags|=8192),d?(o&536870912)!==0&&(a.flags&128)===0&&(bn(a),a.subtreeFlags&6&&(a.flags|=8192)):bn(a),o=a.updateQueue,o!==null&&vu(a,o.retryQueue),o=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),d=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),d!==o&&(a.flags|=2048),n!==null&&Ae(jr),null;case 24:return o=null,n!==null&&(o=n.memoizedState.cache),a.memoizedState.cache!==o&&(a.flags|=2048),ri(qn),bn(a),null;case 25:return null;case 30:return null}throw Error(c(156,a.tag))}r(O2,"completeWork");function L2(n,a){switch(am(a),a.tag){case 1:return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 3:return ri(qn),ve(),n=a.flags,(n&65536)!==0&&(n&128)===0?(a.flags=n&-65537|128,a):null;case 26:case 27:case 5:return At(a),null;case 31:if(a.memoizedState!==null){if(Ys(a),a.alternate===null)throw Error(c(340));br()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 13:if(Ys(a),n=a.memoizedState,n!==null&&n.dehydrated!==null){if(a.alternate===null)throw Error(c(340));br()}return n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 19:return Ae(Pn),null;case 4:return ve(),null;case 10:return ri(a.type),null;case 22:case 23:return Ys(a),vm(),n!==null&&Ae(jr),n=a.flags,n&65536?(a.flags=n&-65537|128,a):null;case 24:return ri(qn),null;case 25:return null;default:return null}}r(L2,"unwindWork");function Qb(n,a){switch(am(a),a.tag){case 3:ri(qn),ve();break;case 26:case 27:case 5:At(a);break;case 4:ve();break;case 31:a.memoizedState!==null&&Ys(a);break;case 13:Ys(a);break;case 19:Ae(Pn);break;case 10:ri(a.type);break;case 22:case 23:Ys(a),vm(),n!==null&&Ae(jr);break;case 24:ri(qn)}}r(Qb,"unwindInterruptedWork");function Oo(n,a){try{var o=a.updateQueue,d=o!==null?o.lastEffect:null;if(d!==null){var p=d.next;o=p;do{if((o.tag&n)===n){d=void 0;var b=o.create,w=o.inst;d=b(),w.destroy=d}o=o.next}while(o!==p)}}catch(E){Zt(a,a.return,E)}}r(Oo,"commitHookEffectListMount");function Oi(n,a,o){try{var d=a.updateQueue,p=d!==null?d.lastEffect:null;if(p!==null){var b=p.next;d=b;do{if((d.tag&n)===n){var w=d.inst,E=w.destroy;if(E!==void 0){w.destroy=void 0,p=a;var q=o,te=E;try{te()}catch(me){Zt(p,q,me)}}}d=d.next}while(d!==b)}}catch(me){Zt(a,a.return,me)}}r(Oi,"commitHookEffectListUnmount");function Gb(n){var a=n.updateQueue;if(a!==null){var o=n.stateNode;try{Kx(a,o)}catch(d){Zt(n,n.return,d)}}}r(Gb,"commitClassCallbacks");function Yb(n,a,o){o.props=_r(n.type,n.memoizedProps),o.state=n.memoizedState;try{o.componentWillUnmount()}catch(d){Zt(n,a,d)}}r(Yb,"safelyCallComponentWillUnmount");function Lo(n,a){try{var o=n.ref;if(o!==null){switch(n.tag){case 26:case 27:case 5:var d=n.stateNode;break;case 30:d=n.stateNode;break;default:d=n.stateNode}typeof o=="function"?n.refCleanup=o(d):o.current=d}}catch(p){Zt(n,a,p)}}r(Lo,"safelyAttachRef");function Ha(n,a){var o=n.ref,d=n.refCleanup;if(o!==null)if(typeof d=="function")try{d()}catch(p){Zt(n,a,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof o=="function")try{o(null)}catch(p){Zt(n,a,p)}else o.current=null}r(Ha,"safelyDetachRef");function Xb(n){var a=n.type,o=n.memoizedProps,d=n.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":o.autoFocus&&d.focus();break e;case"img":o.src?d.src=o.src:o.srcSet&&(d.srcset=o.srcSet)}}catch(p){Zt(n,n.return,p)}}r(Xb,"commitHostMount");function Xm(n,a,o){try{var d=n.stateNode;n_(d,n.type,o,a),d[kn]=a}catch(p){Zt(n,n.return,p)}}r(Xm,"commitHostUpdate");function Zb(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&Ki(n.type)||n.tag===4}r(Zb,"isHostParent");function Zm(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Zb(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&Ki(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}r(Zm,"getHostSibling");function Jm(n,a,o){var d=n.tag;if(d===5||d===6)n=n.stateNode,a?(o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o).insertBefore(n,a):(a=o.nodeType===9?o.body:o.nodeName==="HTML"?o.ownerDocument.body:o,a.appendChild(n),o=o._reactRootContainer,o!=null||a.onclick!==null||(a.onclick=Nn));else if(d!==4&&(d===27&&Ki(n.type)&&(o=n.stateNode,a=null),n=n.child,n!==null))for(Jm(n,a,o),n=n.sibling;n!==null;)Jm(n,a,o),n=n.sibling}r(Jm,"insertOrAppendPlacementNodeIntoContainer");function yu(n,a,o){var d=n.tag;if(d===5||d===6)n=n.stateNode,a?o.insertBefore(n,a):o.appendChild(n);else if(d!==4&&(d===27&&Ki(n.type)&&(o=n.stateNode),n=n.child,n!==null))for(yu(n,a,o),n=n.sibling;n!==null;)yu(n,a,o),n=n.sibling}r(yu,"insertOrAppendPlacementNode");function Jb(n){var a=n.stateNode,o=n.memoizedProps;try{for(var d=n.type,p=a.attributes;p.length;)a.removeAttributeNode(p[0]);us(a,d,o),a[bt]=n,a[kn]=o}catch(b){Zt(n,n.return,b)}}r(Jb,"commitHostSingletonAcquisition");var di=!1,Vn=!1,ep=!1,ev=typeof WeakSet=="function"?WeakSet:Set,ns=null;function z2(n,a){if(n=n.containerInfo,yp=Bu,n=hx(n),Wf(n)){if("selectionStart"in n)var o={start:n.selectionStart,end:n.selectionEnd};else e:{o=(o=n.ownerDocument)&&o.defaultView||window;var d=o.getSelection&&o.getSelection();if(d&&d.rangeCount!==0){o=d.anchorNode;var p=d.anchorOffset,b=d.focusNode;d=d.focusOffset;try{o.nodeType,b.nodeType}catch{o=null;break e}var w=0,E=-1,q=-1,te=0,me=0,xe=n,se=null;t:for(;;){for(var re;xe!==o||p!==0&&xe.nodeType!==3||(E=w+p),xe!==b||d!==0&&xe.nodeType!==3||(q=w+d),xe.nodeType===3&&(w+=xe.nodeValue.length),(re=xe.firstChild)!==null;)se=xe,xe=re;for(;;){if(xe===n)break t;if(se===o&&++te===p&&(E=w),se===b&&++me===d&&(q=w),(re=xe.nextSibling)!==null)break;xe=se,se=xe.parentNode}xe=re}o=E===-1||q===-1?null:{start:E,end:q}}else o=null}o=o||{start:0,end:0}}else o=null;for(jp={focusedElem:n,selectionRange:o},Bu=!1,ns=a;ns!==null;)if(a=ns,n=a.child,(a.subtreeFlags&1028)!==0&&n!==null)n.return=a,ns=n;else for(;ns!==null;){switch(a=ns,b=a.alternate,n=a.flags,a.tag){case 0:if((n&4)!==0&&(n=a.updateQueue,n=n!==null?n.events:null,n!==null))for(o=0;o<n.length;o++)p=n[o],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((n&1024)!==0&&b!==null){n=void 0,o=a,p=b.memoizedProps,b=b.memoizedState,d=o.stateNode;try{var Pe=_r(o.type,p);n=d.getSnapshotBeforeUpdate(Pe,b),d.__reactInternalSnapshotBeforeUpdate=n}catch(tt){Zt(o,o.return,tt)}}break;case 3:if((n&1024)!==0){if(n=a.stateNode.containerInfo,o=n.nodeType,o===9)Sp(n);else if(o===1)switch(n.nodeName){case"HEAD":case"HTML":case"BODY":Sp(n);break;default:n.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((n&1024)!==0)throw Error(c(163))}if(n=a.sibling,n!==null){n.return=a.return,ns=n;break}ns=a.return}}r(z2,"commitBeforeMutationEffects");function tv(n,a,o){var d=o.flags;switch(o.tag){case 0:case 11:case 15:mi(n,o),d&4&&Oo(5,o);break;case 1:if(mi(n,o),d&4)if(n=o.stateNode,a===null)try{n.componentDidMount()}catch(w){Zt(o,o.return,w)}else{var p=_r(o.type,a.memoizedProps);a=a.memoizedState;try{n.componentDidUpdate(p,a,n.__reactInternalSnapshotBeforeUpdate)}catch(w){Zt(o,o.return,w)}}d&64&&Gb(o),d&512&&Lo(o,o.return);break;case 3:if(mi(n,o),d&64&&(n=o.updateQueue,n!==null)){if(a=null,o.child!==null)switch(o.child.tag){case 27:case 5:a=o.child.stateNode;break;case 1:a=o.child.stateNode}try{Kx(n,a)}catch(w){Zt(o,o.return,w)}}break;case 27:a===null&&d&4&&Jb(o);case 26:case 5:mi(n,o),a===null&&d&4&&Xb(o),d&512&&Lo(o,o.return);break;case 12:mi(n,o);break;case 31:mi(n,o),d&4&&av(n,o);break;case 13:mi(n,o),d&4&&iv(n,o),d&64&&(n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null&&(o=V2.bind(null,o),u_(n,o))));break;case 22:if(d=o.memoizedState!==null||di,!d){a=a!==null&&a.memoizedState!==null||Vn,p=di;var b=Vn;di=d,(Vn=a)&&!b?pi(n,o,(o.subtreeFlags&8772)!==0):mi(n,o),di=p,Vn=b}break;case 30:break;default:mi(n,o)}}r(tv,"commitLayoutEffectOnFiber");function nv(n){var a=n.alternate;a!==null&&(n.alternate=null,nv(a)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(a=n.stateNode,a!==null&&Bs(a)),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}r(nv,"detachFiberAfterEffects");var yn=null,Os=!1;function fi(n,a,o){for(o=o.child;o!==null;)sv(n,a,o),o=o.sibling}r(fi,"recursivelyTraverseDeletionEffects");function sv(n,a,o){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Qn,o)}catch{}switch(o.tag){case 26:Vn||Ha(o,a),fi(n,a,o),o.memoizedState?o.memoizedState.count--:o.stateNode&&(o=o.stateNode,o.parentNode.removeChild(o));break;case 27:Vn||Ha(o,a);var d=yn,p=Os;Ki(o.type)&&(yn=o.stateNode,Os=!1),fi(n,a,o),Ho(o.stateNode),yn=d,Os=p;break;case 5:Vn||Ha(o,a);case 6:if(d=yn,p=Os,yn=null,fi(n,a,o),yn=d,Os=p,yn!==null)if(Os)try{(yn.nodeType===9?yn.body:yn.nodeName==="HTML"?yn.ownerDocument.body:yn).removeChild(o.stateNode)}catch(b){Zt(o,a,b)}else try{yn.removeChild(o.stateNode)}catch(b){Zt(o,a,b)}break;case 18:yn!==null&&(Os?(n=yn,Yv(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,o.stateNode),Al(n)):Yv(yn,o.stateNode));break;case 4:d=yn,p=Os,yn=o.stateNode.containerInfo,Os=!0,fi(n,a,o),yn=d,Os=p;break;case 0:case 11:case 14:case 15:Oi(2,o,a),Vn||Oi(4,o,a),fi(n,a,o);break;case 1:Vn||(Ha(o,a),d=o.stateNode,typeof d.componentWillUnmount=="function"&&Yb(o,a,d)),fi(n,a,o);break;case 21:fi(n,a,o);break;case 22:Vn=(d=Vn)||o.memoizedState!==null,fi(n,a,o),Vn=d;break;default:fi(n,a,o)}}r(sv,"commitDeletionEffectsOnFiber");function av(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null))){n=n.dehydrated;try{Al(n)}catch(o){Zt(a,a.return,o)}}}r(av,"commitActivityHydrationCallbacks");function iv(n,a){if(a.memoizedState===null&&(n=a.alternate,n!==null&&(n=n.memoizedState,n!==null&&(n=n.dehydrated,n!==null))))try{Al(n)}catch(o){Zt(a,a.return,o)}}r(iv,"commitSuspenseHydrationCallbacks");function P2(n){switch(n.tag){case 31:case 13:case 19:var a=n.stateNode;return a===null&&(a=n.stateNode=new ev),a;case 22:return n=n.stateNode,a=n._retryCache,a===null&&(a=n._retryCache=new ev),a;default:throw Error(c(435,n.tag))}}r(P2,"getRetryCache");function ju(n,a){var o=P2(n);a.forEach(function(d){if(!o.has(d)){o.add(d);var p=W2.bind(null,n,d);d.then(p,p)}})}r(ju,"attachSuspenseRetryListeners");function Ls(n,a){var o=a.deletions;if(o!==null)for(var d=0;d<o.length;d++){var p=o[d],b=n,w=a,E=w;e:for(;E!==null;){switch(E.tag){case 27:if(Ki(E.type)){yn=E.stateNode,Os=!1;break e}break;case 5:yn=E.stateNode,Os=!1;break e;case 3:case 4:yn=E.stateNode.containerInfo,Os=!0;break e}E=E.return}if(yn===null)throw Error(c(160));sv(b,w,p),yn=null,Os=!1,b=p.alternate,b!==null&&(b.return=null),p.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)rv(a,n),a=a.sibling}r(Ls,"recursivelyTraverseMutationEffects");var Na=null;function rv(n,a){var o=n.alternate,d=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:Ls(a,n),zs(n),d&4&&(Oi(3,n,n.return),Oo(3,n),Oi(5,n,n.return));break;case 1:Ls(a,n),zs(n),d&512&&(Vn||o===null||Ha(o,o.return)),d&64&&di&&(n=n.updateQueue,n!==null&&(d=n.callbacks,d!==null&&(o=n.shared.hiddenCallbacks,n.shared.hiddenCallbacks=o===null?d:o.concat(d))));break;case 26:var p=Na;if(Ls(a,n),zs(n),d&512&&(Vn||o===null||Ha(o,o.return)),d&4){var b=o!==null?o.memoizedState:null;if(d=n.memoizedState,o===null)if(d===null)if(n.stateNode===null){e:{d=n.type,o=n.memoizedProps,p=p.ownerDocument||p;t:switch(d){case"title":b=p.getElementsByTagName("title")[0],(!b||b[Sn]||b[bt]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=p.createElement(d),p.head.insertBefore(b,p.querySelector("head > title"))),us(b,d,o),b[bt]=n,mn(b),d=b;break e;case"link":var w=ly("link","href",p).get(d+(o.href||""));if(w){for(var E=0;E<w.length;E++)if(b=w[E],b.getAttribute("href")===(o.href==null||o.href===""?null:o.href)&&b.getAttribute("rel")===(o.rel==null?null:o.rel)&&b.getAttribute("title")===(o.title==null?null:o.title)&&b.getAttribute("crossorigin")===(o.crossOrigin==null?null:o.crossOrigin)){w.splice(E,1);break t}}b=p.createElement(d),us(b,d,o),p.head.appendChild(b);break;case"meta":if(w=ly("meta","content",p).get(d+(o.content||""))){for(E=0;E<w.length;E++)if(b=w[E],b.getAttribute("content")===(o.content==null?null:""+o.content)&&b.getAttribute("name")===(o.name==null?null:o.name)&&b.getAttribute("property")===(o.property==null?null:o.property)&&b.getAttribute("http-equiv")===(o.httpEquiv==null?null:o.httpEquiv)&&b.getAttribute("charset")===(o.charSet==null?null:o.charSet)){w.splice(E,1);break t}}b=p.createElement(d),us(b,d,o),p.head.appendChild(b);break;default:throw Error(c(468,d))}b[bt]=n,mn(b),d=b}n.stateNode=d}else oy(p,n.type,n.stateNode);else n.stateNode=ry(p,d,n.memoizedProps);else b!==d?(b===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):b.count--,d===null?oy(p,n.type,n.stateNode):ry(p,d,n.memoizedProps)):d===null&&n.stateNode!==null&&Xm(n,n.memoizedProps,o.memoizedProps)}break;case 27:Ls(a,n),zs(n),d&512&&(Vn||o===null||Ha(o,o.return)),o!==null&&d&4&&Xm(n,n.memoizedProps,o.memoizedProps);break;case 5:if(Ls(a,n),zs(n),d&512&&(Vn||o===null||Ha(o,o.return)),n.flags&32){p=n.stateNode;try{Ve(p,"")}catch(Pe){Zt(n,n.return,Pe)}}d&4&&n.stateNode!=null&&(p=n.memoizedProps,Xm(n,p,o!==null?o.memoizedProps:p)),d&1024&&(ep=!0);break;case 6:if(Ls(a,n),zs(n),d&4){if(n.stateNode===null)throw Error(c(162));d=n.memoizedProps,o=n.stateNode;try{o.nodeValue=d}catch(Pe){Zt(n,n.return,Pe)}}break;case 3:if(zu=null,p=Na,Na=Ou(a.containerInfo),Ls(a,n),Na=p,zs(n),d&4&&o!==null&&o.memoizedState.isDehydrated)try{Al(a.containerInfo)}catch(Pe){Zt(n,n.return,Pe)}ep&&(ep=!1,lv(n));break;case 4:d=Na,Na=Ou(n.stateNode.containerInfo),Ls(a,n),zs(n),Na=d;break;case 12:Ls(a,n),zs(n);break;case 31:Ls(a,n),zs(n),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,ju(n,d)));break;case 13:Ls(a,n),zs(n),n.child.flags&8192&&n.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(ku=He()),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,ju(n,d)));break;case 22:p=n.memoizedState!==null;var q=o!==null&&o.memoizedState!==null,te=di,me=Vn;if(di=te||p,Vn=me||q,Ls(a,n),Vn=me,di=te,zs(n),d&8192)e:for(a=n.stateNode,a._visibility=p?a._visibility&-2:a._visibility|1,p&&(o===null||q||di||Vn||Er(n)),o=null,a=n;;){if(a.tag===5||a.tag===26){if(o===null){q=o=a;try{if(b=q.stateNode,p)w=b.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{E=q.stateNode;var xe=q.memoizedProps.style,se=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;E.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(Pe){Zt(q,q.return,Pe)}}}else if(a.tag===6){if(o===null){q=a;try{q.stateNode.nodeValue=p?"":q.memoizedProps}catch(Pe){Zt(q,q.return,Pe)}}}else if(a.tag===18){if(o===null){q=a;try{var re=q.stateNode;p?Xv(re,!0):Xv(q.stateNode,!1)}catch(Pe){Zt(q,q.return,Pe)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===n)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===n)break e;for(;a.sibling===null;){if(a.return===null||a.return===n)break e;o===a&&(o=null),a=a.return}o===a&&(o=null),a.sibling.return=a.return,a=a.sibling}d&4&&(d=n.updateQueue,d!==null&&(o=d.retryQueue,o!==null&&(d.retryQueue=null,ju(n,o))));break;case 19:Ls(a,n),zs(n),d&4&&(d=n.updateQueue,d!==null&&(n.updateQueue=null,ju(n,d)));break;case 30:break;case 21:break;default:Ls(a,n),zs(n)}}r(rv,"commitMutationEffectsOnFiber");function zs(n){var a=n.flags;if(a&2){try{for(var o,d=n.return;d!==null;){if(Zb(d)){o=d;break}d=d.return}if(o==null)throw Error(c(160));switch(o.tag){case 27:var p=o.stateNode;yu(n,Zm(n),p);break;case 5:var b=o.stateNode;o.flags&32&&(Ve(b,""),o.flags&=-33),yu(n,Zm(n),b);break;case 3:case 4:var w=o.stateNode.containerInfo;Jm(n,Zm(n),w);break;default:throw Error(c(161))}}catch(E){Zt(n,n.return,E)}n.flags&=-3}a&4096&&(n.flags&=-4097)}r(zs,"commitReconciliationEffects");function lv(n){if(n.subtreeFlags&1024)for(n=n.child;n!==null;){var a=n;lv(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),n=n.sibling}}r(lv,"recursivelyResetForms");function mi(n,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)tv(n,a.alternate,a),a=a.sibling}r(mi,"recursivelyTraverseLayoutEffects");function Er(n){for(n=n.child;n!==null;){var a=n;switch(a.tag){case 0:case 11:case 14:case 15:Oi(4,a,a.return),Er(a);break;case 1:Ha(a,a.return);var o=a.stateNode;typeof o.componentWillUnmount=="function"&&Yb(a,a.return,o),Er(a);break;case 27:Ho(a.stateNode);case 26:case 5:Ha(a,a.return),Er(a);break;case 22:a.memoizedState===null&&Er(a);break;case 30:Er(a);break;default:Er(a)}n=n.sibling}}r(Er,"recursivelyTraverseDisappearLayoutEffects");function pi(n,a,o){for(o=o&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var d=a.alternate,p=n,b=a,w=b.flags;switch(b.tag){case 0:case 11:case 15:pi(p,b,o),Oo(4,b);break;case 1:if(pi(p,b,o),d=b,p=d.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(te){Zt(d,d.return,te)}if(d=b,p=d.updateQueue,p!==null){var E=d.stateNode;try{var q=p.shared.hiddenCallbacks;if(q!==null)for(p.shared.hiddenCallbacks=null,p=0;p<q.length;p++)Bx(q[p],E)}catch(te){Zt(d,d.return,te)}}o&&w&64&&Gb(b),Lo(b,b.return);break;case 27:Jb(b);case 26:case 5:pi(p,b,o),o&&d===null&&w&4&&Xb(b),Lo(b,b.return);break;case 12:pi(p,b,o);break;case 31:pi(p,b,o),o&&w&4&&av(p,b);break;case 13:pi(p,b,o),o&&w&4&&iv(p,b);break;case 22:b.memoizedState===null&&pi(p,b,o),Lo(b,b.return);break;case 30:break;default:pi(p,b,o)}a=a.sibling}}r(pi,"recursivelyTraverseReappearLayoutEffects");function tp(n,a){var o=null;n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),n=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(n=a.memoizedState.cachePool.pool),n!==o&&(n!=null&&n.refCount++,o!=null&&wo(o))}r(tp,"commitOffscreenPassiveMountEffects");function np(n,a){n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&wo(n))}r(np,"commitCachePassiveMountEffect");function Ca(n,a,o,d){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)ov(n,a,o,d),a=a.sibling}r(Ca,"recursivelyTraversePassiveMountEffects");function ov(n,a,o,d){var p=a.flags;switch(a.tag){case 0:case 11:case 15:Ca(n,a,o,d),p&2048&&Oo(9,a);break;case 1:Ca(n,a,o,d);break;case 3:Ca(n,a,o,d),p&2048&&(n=null,a.alternate!==null&&(n=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==n&&(a.refCount++,n!=null&&wo(n)));break;case 12:if(p&2048){Ca(n,a,o,d),n=a.stateNode;try{var b=a.memoizedProps,w=b.id,E=b.onPostCommit;typeof E=="function"&&E(w,a.alternate===null?"mount":"update",n.passiveEffectDuration,-0)}catch(q){Zt(a,a.return,q)}}else Ca(n,a,o,d);break;case 31:Ca(n,a,o,d);break;case 13:Ca(n,a,o,d);break;case 23:break;case 22:b=a.stateNode,w=a.alternate,a.memoizedState!==null?b._visibility&2?Ca(n,a,o,d):zo(n,a):b._visibility&2?Ca(n,a,o,d):(b._visibility|=2,gl(n,a,o,d,(a.subtreeFlags&10256)!==0||!1)),p&2048&&tp(w,a);break;case 24:Ca(n,a,o,d),p&2048&&np(a.alternate,a);break;default:Ca(n,a,o,d)}}r(ov,"commitPassiveMountOnFiber");function gl(n,a,o,d,p){for(p=p&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var b=n,w=a,E=o,q=d,te=w.flags;switch(w.tag){case 0:case 11:case 15:gl(b,w,E,q,p),Oo(8,w);break;case 23:break;case 22:var me=w.stateNode;w.memoizedState!==null?me._visibility&2?gl(b,w,E,q,p):zo(b,w):(me._visibility|=2,gl(b,w,E,q,p)),p&&te&2048&&tp(w.alternate,w);break;case 24:gl(b,w,E,q,p),p&&te&2048&&np(w.alternate,w);break;default:gl(b,w,E,q,p)}a=a.sibling}}r(gl,"recursivelyTraverseReconnectPassiveEffects");function zo(n,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var o=n,d=a,p=d.flags;switch(d.tag){case 22:zo(o,d),p&2048&&tp(d.alternate,d);break;case 24:zo(o,d),p&2048&&np(d.alternate,d);break;default:zo(o,d)}a=a.sibling}}r(zo,"recursivelyTraverseAtomicPassiveEffects");var Po=8192;function xl(n,a,o){if(n.subtreeFlags&Po)for(n=n.child;n!==null;)cv(n,a,o),n=n.sibling}r(xl,"recursivelyAccumulateSuspenseyCommit");function cv(n,a,o){switch(n.tag){case 26:xl(n,a,o),n.flags&Po&&n.memoizedState!==null&&w_(o,Na,n.memoizedState,n.memoizedProps);break;case 5:xl(n,a,o);break;case 3:case 4:var d=Na;Na=Ou(n.stateNode.containerInfo),xl(n,a,o),Na=d;break;case 22:n.memoizedState===null&&(d=n.alternate,d!==null&&d.memoizedState!==null?(d=Po,Po=16777216,xl(n,a,o),Po=d):xl(n,a,o));break;default:xl(n,a,o)}}r(cv,"accumulateSuspenseyCommitOnFiber");function uv(n){var a=n.alternate;if(a!==null&&(n=a.child,n!==null)){a.child=null;do a=n.sibling,n.sibling=null,n=a;while(n!==null)}}r(uv,"detachAlternateSiblings");function Uo(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o];ns=d,fv(d,n)}uv(n)}if(n.subtreeFlags&10256)for(n=n.child;n!==null;)dv(n),n=n.sibling}r(Uo,"recursivelyTraversePassiveUnmountEffects");function dv(n){switch(n.tag){case 0:case 11:case 15:Uo(n),n.flags&2048&&Oi(9,n,n.return);break;case 3:Uo(n);break;case 12:Uo(n);break;case 22:var a=n.stateNode;n.memoizedState!==null&&a._visibility&2&&(n.return===null||n.return.tag!==13)?(a._visibility&=-3,wu(n)):Uo(n);break;default:Uo(n)}}r(dv,"commitPassiveUnmountOnFiber");function wu(n){var a=n.deletions;if((n.flags&16)!==0){if(a!==null)for(var o=0;o<a.length;o++){var d=a[o];ns=d,fv(d,n)}uv(n)}for(n=n.child;n!==null;){switch(a=n,a.tag){case 0:case 11:case 15:Oi(8,a,a.return),wu(a);break;case 22:o=a.stateNode,o._visibility&2&&(o._visibility&=-3,wu(a));break;default:wu(a)}n=n.sibling}}r(wu,"recursivelyTraverseDisconnectPassiveEffects");function fv(n,a){for(;ns!==null;){var o=ns;switch(o.tag){case 0:case 11:case 15:Oi(8,o,a);break;case 23:case 22:if(o.memoizedState!==null&&o.memoizedState.cachePool!==null){var d=o.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:wo(o.memoizedState.cache)}if(d=o.child,d!==null)d.return=o,ns=d;else e:for(o=n;ns!==null;){d=ns;var p=d.sibling,b=d.return;if(nv(d),d===o){ns=null;break e}if(p!==null){p.return=b,ns=p;break e}ns=b}}}r(fv,"commitPassiveUnmountEffectsInsideOfDeletedTree_begin");var U2={getCacheForType:r(function(n){var a=os(qn),o=a.data.get(n);return o===void 0&&(o=n(),a.data.set(n,o)),o},"getCacheForType"),cacheSignal:r(function(){return os(qn).controller.signal},"cacheSignal")},$2=typeof WeakMap=="function"?WeakMap:Map,Ht=0,un=null,jt=null,Nt=0,Xt=0,Xs=null,Li=!1,bl=!1,sp=!1,hi=0,Tn=0,zi=0,Ir=0,ap=0,Zs=0,vl=0,$o=null,Ps=null,ip=!1,ku=0,mv=0,Su=1/0,Nu=null,Pi=null,Yn=0,Ui=null,yl=null,gi=0,rp=0,lp=null,pv=null,Bo=0,op=null;function fa(){return(Ht&2)!==0&&Nt!==0?Nt&-Nt:R.T!==null?pp():Is()}r(fa,"requestUpdateLane");function hv(){if(Zs===0)if((Nt&536870912)===0||Et){var n=Re;Re<<=1,(Re&3932160)===0&&(Re=262144),Zs=n}else Zs=536870912;return n=Gs.current,n!==null&&(n.flags|=32),Zs}r(hv,"requestDeferredLane");function Us(n,a,o){(n===un&&(Xt===2||Xt===9)||n.cancelPendingCommit!==null)&&(jl(n,0),$i(n,Nt,Zs,!1)),en(n,o),((Ht&2)===0||n!==un)&&(n===un&&((Ht&2)===0&&(Ir|=o),Tn===4&&$i(n,Nt,Zs,!1)),xi(n))}r(Us,"scheduleUpdateOnFiber");function gv(n,a,o){if((Ht&6)!==0)throw Error(c(327));var d=!o&&(a&127)===0&&(a&n.expiredLanes)===0||at(n,a),p=d?q2(n,a):up(n,a,!0),b=d;do{if(p===0){bl&&!d&&$i(n,a,0,!1);break}else{if(o=n.current.alternate,b&&!B2(o)){p=up(n,a,!1),b=!1;continue}if(p===2){if(b=a,n.errorRecoveryDisabledLanes&b)var w=0;else w=n.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){a=w;e:{var E=n;p=$o;var q=E.current.memoizedState.isDehydrated;if(q&&(jl(E,w).flags|=256),w=up(E,w,!1),w!==2){if(sp&&!q){E.errorRecoveryDisabledLanes|=b,Ir|=b,p=4;break e}b=Ps,Ps=p,b!==null&&(Ps===null?Ps=b:Ps.push.apply(Ps,b))}p=w}if(b=!1,p!==2)continue}}if(p===1){jl(n,0),$i(n,a,0,!0);break}e:{switch(d=n,b=p,b){case 0:case 1:throw Error(c(345));case 4:if((a&4194048)!==a)break;case 6:$i(d,a,Zs,!Li);break e;case 2:Ps=null;break;case 3:case 5:break;default:throw Error(c(329))}if((a&62914560)===a&&(p=ku+300-He(),10<p)){if($i(d,a,Zs,!Li),St(d,0,!0)!==0)break e;gi=a,d.timeoutHandle=Qv(xv.bind(null,d,o,Ps,Nu,ip,a,Zs,Ir,vl,Li,b,"Throttled",-0,0),p);break e}xv(d,o,Ps,Nu,ip,a,Zs,Ir,vl,Li,b,null,-0,0)}}break}while(!0);xi(n)}r(gv,"performWorkOnRoot");function xv(n,a,o,d,p,b,w,E,q,te,me,xe,se,re){if(n.timeoutHandle=-1,xe=a.subtreeFlags,xe&8192||(xe&16785408)===16785408){xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Nn},cv(a,b,xe);var Pe=(b&62914560)===b?ku-He():(b&4194048)===b?mv-He():0;if(Pe=k_(xe,Pe),Pe!==null){gi=b,n.cancelPendingCommit=Pe(Nv.bind(null,n,a,b,o,d,p,w,E,q,me,xe,null,se,re)),$i(n,b,w,!te);return}}Nv(n,a,b,o,d,p,w,E,q)}r(xv,"commitRootWhenReady");function B2(n){for(var a=n;;){var o=a.tag;if((o===0||o===11||o===15)&&a.flags&16384&&(o=a.updateQueue,o!==null&&(o=o.stores,o!==null)))for(var d=0;d<o.length;d++){var p=o[d],b=p.getSnapshot;p=p.value;try{if(!Ws(b(),p))return!1}catch{return!1}}if(o=a.child,a.subtreeFlags&16384&&o!==null)o.return=a,a=o;else{if(a===n)break;for(;a.sibling===null;){if(a.return===null||a.return===n)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}r(B2,"isRenderConsistentWithExternalStores");function $i(n,a,o,d){a&=~ap,a&=~Ir,n.suspendedLanes|=a,n.pingedLanes&=~a,d&&(n.warmLanes|=a),d=n.expirationTimes;for(var p=a;0<p;){var b=31-Rt(p),w=1<<b;d[b]=-1,p&=~w}o!==0&&fn(n,o,a)}r($i,"markRootSuspended");function Cu(){return(Ht&6)===0?(Ko(0,!1),!1):!0}r(Cu,"flushSyncWork$1");function cp(){if(jt!==null){if(Xt===0)var n=jt.return;else n=jt,ii=vr=null,Nm(n),dl=null,So=0,n=jt;for(;n!==null;)Qb(n.alternate,n),n=n.return;jt=null}}r(cp,"resetWorkInProgressStack");function jl(n,a){var o=n.timeoutHandle;o!==-1&&(n.timeoutHandle=-1,i_(o)),o=n.cancelPendingCommit,o!==null&&(n.cancelPendingCommit=null,o()),gi=0,cp(),un=n,jt=o=si(n.current,null),Nt=a,Xt=0,Xs=null,Li=!1,bl=at(n,a),sp=!1,vl=Zs=ap=Ir=zi=Tn=0,Ps=$o=null,ip=!1,(a&8)!==0&&(a|=a&32);var d=n.entangledLanes;if(d!==0)for(n=n.entanglements,d&=a;0<d;){var p=31-Rt(d),b=1<<p;a|=n[p],d&=~b}return hi=a,Wc(),o}r(jl,"prepareFreshStack");function bv(n,a){ct=null,R.H=Ro,a===ul||a===tu?(a=zx(),Xt=3):a===mm?(a=zx(),Xt=4):Xt=a===Bm?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,Xs=a,jt===null&&(Tn=1,hu(n,la(a,n.current)))}r(bv,"handleThrow");function vv(){var n=Gs.current;return n===null?!0:(Nt&4194048)===Nt?da===null:(Nt&62914560)===Nt||(Nt&536870912)!==0?n===da:!1}r(vv,"shouldRemainOnPreviousScreen");function yv(){var n=R.H;return R.H=Ro,n===null?Ro:n}r(yv,"pushDispatcher");function jv(){var n=R.A;return R.A=U2,n}r(jv,"pushAsyncDispatcher");function Au(){Tn=4,Li||(Nt&4194048)!==Nt&&Gs.current!==null||(bl=!0),(zi&134217727)===0&&(Ir&134217727)===0||un===null||$i(un,Nt,Zs,!1)}r(Au,"renderDidSuspendDelayIfPossible");function up(n,a,o){var d=Ht;Ht|=2;var p=yv(),b=jv();(un!==n||Nt!==a)&&(Nu=null,jl(n,a)),a=!1;var w=Tn;e:do try{if(Xt!==0&&jt!==null){var E=jt,q=Xs;switch(Xt){case 8:cp(),w=6;break e;case 3:case 2:case 9:case 6:Gs.current===null&&(a=!0);var te=Xt;if(Xt=0,Xs=null,wl(n,E,q,te),o&&bl){w=0;break e}break;default:te=Xt,Xt=0,Xs=null,wl(n,E,q,te)}}K2(),w=Tn;break}catch(me){bv(n,me)}while(!0);return a&&n.shellSuspendCounter++,ii=vr=null,Ht=d,R.H=p,R.A=b,jt===null&&(un=null,Nt=0,Wc()),w}r(up,"renderRootSync");function K2(){for(;jt!==null;)wv(jt)}r(K2,"workLoopSync");function q2(n,a){var o=Ht;Ht|=2;var d=yv(),p=jv();un!==n||Nt!==a?(Nu=null,Su=He()+500,jl(n,a)):bl=at(n,a);e:do try{if(Xt!==0&&jt!==null){a=jt;var b=Xs;t:switch(Xt){case 1:Xt=0,Xs=null,wl(n,a,b,1);break;case 2:case 9:if(Ox(b)){Xt=0,Xs=null,kv(a);break}a=r(function(){Xt!==2&&Xt!==9||un!==n||(Xt=7),xi(n)},"lanes"),b.then(a,a);break e;case 3:Xt=7;break e;case 4:Xt=5;break e;case 7:Ox(b)?(Xt=0,Xs=null,kv(a)):(Xt=0,Xs=null,wl(n,a,b,7));break;case 5:var w=null;switch(jt.tag){case 26:w=jt.memoizedState;case 5:case 27:var E=jt;if(w?cy(w):E.stateNode.complete){Xt=0,Xs=null;var q=E.sibling;if(q!==null)jt=q;else{var te=E.return;te!==null?(jt=te,_u(te)):jt=null}break t}}Xt=0,Xs=null,wl(n,a,b,5);break;case 6:Xt=0,Xs=null,wl(n,a,b,6);break;case 8:cp(),Tn=6;break e;default:throw Error(c(462))}}F2();break}catch(me){bv(n,me)}while(!0);return ii=vr=null,R.H=d,R.A=p,Ht=o,jt!==null?0:(un=null,Nt=0,Wc(),Tn)}r(q2,"renderRootConcurrent");function F2(){for(;jt!==null&&!je();)wv(jt)}r(F2,"workLoopConcurrentByScheduler");function wv(n){var a=Vb(n.alternate,n,hi);n.memoizedProps=n.pendingProps,a===null?_u(n):jt=a}r(wv,"performUnitOfWork");function kv(n){var a=n,o=a.alternate;switch(a.tag){case 15:case 0:a=$b(o,a,a.pendingProps,a.type,void 0,Nt);break;case 11:a=$b(o,a,a.pendingProps,a.type.render,a.ref,Nt);break;case 5:Nm(a);default:Qb(o,a),a=jt=Sx(a,hi),a=Vb(o,a,hi)}n.memoizedProps=n.pendingProps,a===null?_u(n):jt=a}r(kv,"replaySuspendedUnitOfWork");function wl(n,a,o,d){ii=vr=null,Nm(a),dl=null,So=0;var p=a.return;try{if(R2(n,p,a,o,Nt)){Tn=1,hu(n,la(o,n.current)),jt=null;return}}catch(b){if(p!==null)throw jt=p,b;Tn=1,hu(n,la(o,n.current)),jt=null;return}a.flags&32768?(Et||d===1?n=!0:bl||(Nt&536870912)!==0?n=!1:(Li=n=!0,(d===2||d===9||d===3||d===6)&&(d=Gs.current,d!==null&&d.tag===13&&(d.flags|=16384))),Sv(a,n)):_u(a)}r(wl,"throwAndUnwindWorkLoop");function _u(n){var a=n;do{if((a.flags&32768)!==0){Sv(a,Li);return}n=a.return;var o=O2(a.alternate,a,hi);if(o!==null){jt=o;return}if(a=a.sibling,a!==null){jt=a;return}jt=a=n}while(a!==null);Tn===0&&(Tn=5)}r(_u,"completeUnitOfWork");function Sv(n,a){do{var o=L2(n.alternate,n);if(o!==null){o.flags&=32767,jt=o;return}if(o=n.return,o!==null&&(o.flags|=32768,o.subtreeFlags=0,o.deletions=null),!a&&(n=n.sibling,n!==null)){jt=n;return}jt=n=o}while(n!==null);Tn=6,jt=null}r(Sv,"unwindUnitOfWork");function Nv(n,a,o,d,p,b,w,E,q){n.cancelPendingCommit=null;do Eu();while(Yn!==0);if((Ht&6)!==0)throw Error(c(327));if(a!==null){if(a===n.current)throw Error(c(177));if(b=a.lanes|a.childLanes,b|=Zf,tn(n,o,b,w,E,q),n===un&&(jt=un=null,Nt=0),yl=a,Ui=n,gi=o,rp=b,lp=p,pv=d,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(n.callbackNode=null,n.callbackPriority=0,Q2(Rn,function(){return Iv(),null})):(n.callbackNode=null,n.callbackPriority=0),d=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||d){d=R.T,R.T=null,p=ne.p,ne.p=2,w=Ht,Ht|=4;try{z2(n,a,o)}finally{Ht=w,ne.p=p,R.T=d}}Yn=1,Cv(),Av(),_v()}}r(Nv,"commitRoot");function Cv(){if(Yn===1){Yn=0;var n=Ui,a=yl,o=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||o){o=R.T,R.T=null;var d=ne.p;ne.p=2;var p=Ht;Ht|=4;try{rv(a,n);var b=jp,w=hx(n.containerInfo),E=b.focusedElem,q=b.selectionRange;if(w!==E&&E&&E.ownerDocument&&px(E.ownerDocument.documentElement,E)){if(q!==null&&Wf(E)){var te=q.start,me=q.end;if(me===void 0&&(me=te),"selectionStart"in E)E.selectionStart=te,E.selectionEnd=Math.min(me,E.value.length);else{var xe=E.ownerDocument||document,se=xe&&xe.defaultView||window;if(se.getSelection){var re=se.getSelection(),Pe=E.textContent.length,tt=Math.min(q.start,Pe),an=q.end===void 0?tt:Math.min(q.end,Pe);!re.extend&&tt>an&&(w=an,an=tt,tt=w);var G=mx(E,tt),F=mx(E,an);if(G&&F&&(re.rangeCount!==1||re.anchorNode!==G.node||re.anchorOffset!==G.offset||re.focusNode!==F.node||re.focusOffset!==F.offset)){var ee=xe.createRange();ee.setStart(G.node,G.offset),re.removeAllRanges(),tt>an?(re.addRange(ee),re.extend(F.node,F.offset)):(ee.setEnd(F.node,F.offset),re.addRange(ee))}}}}for(xe=[],re=E;re=re.parentNode;)re.nodeType===1&&xe.push({element:re,left:re.scrollLeft,top:re.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<xe.length;E++){var pe=xe[E];pe.element.scrollLeft=pe.left,pe.element.scrollTop=pe.top}}Bu=!!yp,jp=yp=null}finally{Ht=p,ne.p=d,R.T=o}}n.current=a,Yn=2}}r(Cv,"flushMutationEffects");function Av(){if(Yn===2){Yn=0;var n=Ui,a=yl,o=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||o){o=R.T,R.T=null;var d=ne.p;ne.p=2;var p=Ht;Ht|=4;try{tv(n,a.alternate,a)}finally{Ht=p,ne.p=d,R.T=o}}Yn=3}}r(Av,"flushLayoutEffects");function _v(){if(Yn===4||Yn===3){Yn=0,$e();var n=Ui,a=yl,o=gi,d=pv;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Yn=5:(Yn=0,yl=Ui=null,Ev(n,n.pendingLanes));var p=n.pendingLanes;if(p===0&&(Pi=null),ms(o),a=a.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Qn,a,void 0,(a.current.flags&128)===128)}catch{}if(d!==null){a=R.T,p=ne.p,ne.p=2,R.T=null;try{for(var b=n.onRecoverableError,w=0;w<d.length;w++){var E=d[w];b(E.value,{componentStack:E.stack})}}finally{R.T=a,ne.p=p}}(gi&3)!==0&&Eu(),xi(n),p=n.pendingLanes,(o&261930)!==0&&(p&42)!==0?n===op?Bo++:(Bo=0,op=n):Bo=0,Ko(0,!1)}}r(_v,"flushSpawnedWork");function Ev(n,a){(n.pooledCacheLanes&=a)===0&&(a=n.pooledCache,a!=null&&(n.pooledCache=null,wo(a)))}r(Ev,"releaseRootPooledCache");function Eu(){return Cv(),Av(),_v(),Iv()}r(Eu,"flushPendingEffects");function Iv(){if(Yn!==5)return!1;var n=Ui,a=rp;rp=0;var o=ms(gi),d=R.T,p=ne.p;try{ne.p=32>o?32:o,R.T=null,o=lp,lp=null;var b=Ui,w=gi;if(Yn=0,yl=Ui=null,gi=0,(Ht&6)!==0)throw Error(c(331));var E=Ht;if(Ht|=4,dv(b.current),ov(b,b.current,w,o),Ht=E,Ko(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Qn,b)}catch{}return!0}finally{ne.p=p,R.T=d,Ev(n,a)}}r(Iv,"flushPassiveEffects");function Tv(n,a,o){a=la(o,a),a=$m(n.stateNode,a,2),n=Cr(n,a,2),n!==null&&(en(n,2),xi(n))}r(Tv,"captureCommitPhaseErrorOnRoot");function Zt(n,a,o){if(n.tag===3)Tv(n,n,o);else for(;a!==null;){if(a.tag===3){Tv(a,n,o);break}else if(a.tag===1){var d=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Pi===null||!Pi.has(d))){n=la(o,n),o=Rb(2),d=Cr(a,o,2),d!==null&&(Db(o,d,a,n),en(d,2),xi(d));break}}a=a.return}}r(Zt,"captureCommitPhaseError");function dp(n,a,o){var d=n.pingCache;if(d===null){d=n.pingCache=new $2;var p=new Set;d.set(a,p)}else p=d.get(a),p===void 0&&(p=new Set,d.set(a,p));p.has(o)||(sp=!0,p.add(o),n=H2.bind(null,n,a,o),a.then(n,n))}r(dp,"attachPingListener");function H2(n,a,o){var d=n.pingCache;d!==null&&d.delete(a),n.pingedLanes|=n.suspendedLanes&o,n.warmLanes&=~o,un===n&&(Nt&o)===o&&(Tn===4||Tn===3&&(Nt&62914560)===Nt&&300>He()-ku?(Ht&2)===0&&jl(n,0):ap|=o,vl===Nt&&(vl=0)),xi(n)}r(H2,"pingSuspendedRoot");function Rv(n,a){a===0&&(a=on()),n=gr(n,a),n!==null&&(en(n,a),xi(n))}r(Rv,"retryTimedOutBoundary");function V2(n){var a=n.memoizedState,o=0;a!==null&&(o=a.retryLane),Rv(n,o)}r(V2,"retryDehydratedSuspenseBoundary");function W2(n,a){var o=0;switch(n.tag){case 31:case 13:var d=n.stateNode,p=n.memoizedState;p!==null&&(o=p.retryLane);break;case 19:d=n.stateNode;break;case 22:d=n.stateNode._retryCache;break;default:throw Error(c(314))}d!==null&&d.delete(a),Rv(n,o)}r(W2,"resolveRetryWakeable");function Q2(n,a){return H(n,a)}r(Q2,"scheduleCallback$1");var Iu=null,kl=null,fp=!1,Tu=!1,mp=!1,Bi=0;function xi(n){n!==kl&&n.next===null&&(kl===null?Iu=kl=n:kl=kl.next=n),Tu=!0,fp||(fp=!0,Y2())}r(xi,"ensureRootIsScheduled");function Ko(n,a){if(!mp&&Tu){mp=!0;do for(var o=!1,d=Iu;d!==null;){if(!a)if(n!==0){var p=d.pendingLanes;if(p===0)var b=0;else{var w=d.suspendedLanes,E=d.pingedLanes;b=(1<<31-Rt(42|n)+1)-1,b&=p&~(w&~E),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(o=!0,Lv(d,b))}else b=Nt,b=St(d,d===un?b:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(b&3)===0||at(d,b)||(o=!0,Lv(d,b));d=d.next}while(o);mp=!1}}r(Ko,"flushSyncWorkAcrossRoots_impl");function G2(){Dv()}r(G2,"processRootScheduleInImmediateTask");function Dv(){Tu=fp=!1;var n=0;Bi!==0&&a_()&&(n=Bi);for(var a=He(),o=null,d=Iu;d!==null;){var p=d.next,b=Mv(d,a);b===0?(d.next=null,o===null?Iu=p:o.next=p,p===null&&(kl=o)):(o=d,(n!==0||(b&3)!==0)&&(Tu=!0)),d=p}Yn!==0&&Yn!==5||Ko(n,!1),Bi!==0&&(Bi=0)}r(Dv,"processRootScheduleInMicrotask");function Mv(n,a){for(var o=n.suspendedLanes,d=n.pingedLanes,p=n.expirationTimes,b=n.pendingLanes&-62914561;0<b;){var w=31-Rt(b),E=1<<w,q=p[w];q===-1?((E&o)===0||(E&d)!==0)&&(p[w]=Ot(E,a)):q<=a&&(n.expiredLanes|=E),b&=~E}if(a=un,o=Nt,o=St(n,n===a?o:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),d=n.callbackNode,o===0||n===a&&(Xt===2||Xt===9)||n.cancelPendingCommit!==null)return d!==null&&d!==null&&rn(d),n.callbackNode=null,n.callbackPriority=0;if((o&3)===0||at(n,o)){if(a=o&-o,a===n.callbackPriority)return a;switch(d!==null&&rn(d),ms(o)){case 2:case 8:o=Qt;break;case 32:o=Rn;break;case 268435456:o=Tt;break;default:o=Rn}return d=Ov.bind(null,n),o=H(o,d),n.callbackPriority=a,n.callbackNode=o,a}return d!==null&&d!==null&&rn(d),n.callbackPriority=2,n.callbackNode=null,2}r(Mv,"scheduleTaskForRootDuringMicrotask");function Ov(n,a){if(Yn!==0&&Yn!==5)return n.callbackNode=null,n.callbackPriority=0,null;var o=n.callbackNode;if(Eu()&&n.callbackNode!==o)return null;var d=Nt;return d=St(n,n===un?d:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),d===0?null:(gv(n,d,a),Mv(n,He()),n.callbackNode!=null&&n.callbackNode===o?Ov.bind(null,n):null)}r(Ov,"performWorkOnRootViaSchedulerTask");function Lv(n,a){if(Eu())return null;gv(n,a,!0)}r(Lv,"performSyncWorkOnRoot");function Y2(){r_(function(){(Ht&6)!==0?H(it,G2):Dv()})}r(Y2,"scheduleImmediateRootScheduleTask");function pp(){if(Bi===0){var n=ol;n===0&&(n=Mt,Mt<<=1,(Mt&261888)===0&&(Mt=256)),Bi=n}return Bi}r(pp,"requestTransitionLane");function zv(n){return n==null||typeof n=="symbol"||typeof n=="boolean"?null:typeof n=="function"?n:Ft(""+n)}r(zv,"coerceFormActionProp");function Pv(n,a){var o=a.ownerDocument.createElement("input");return o.name=a.name,o.value=a.value,n.id&&o.setAttribute("form",n.id),a.parentNode.insertBefore(o,a),n=new FormData(n),o.parentNode.removeChild(o),n}r(Pv,"createFormDataWithSubmitter");function X2(n,a,o,d,p){if(a==="submit"&&o&&o.stateNode===p){var b=zv((p[kn]||null).action),w=d.submitter;w&&(a=(a=w[kn]||null)?zv(a.formAction):w.getAttribute("formAction"),a!==null&&(b=a,w=null));var E=new ia("action","action",null,d,p);n.push({event:E,listeners:[{instance:null,listener:r(function(){if(d.defaultPrevented){if(Bi!==0){var q=w?Pv(p,w):new FormData(p);Mm(o,{pending:!0,data:q,method:p.method,action:b},null,q)}}else typeof b=="function"&&(E.preventDefault(),q=w?Pv(p,w):new FormData(p),Mm(o,{pending:!0,data:q,method:p.method,action:b},b,q))},"listener"),currentTarget:p}]})}}r(X2,"extractEvents$1");for(var hp=0;hp<Xf.length;hp++){var gp=Xf[hp];Sa(gp.toLowerCase(),"on"+(gp[0].toUpperCase()+gp.slice(1)))}Sa(bx,"onAnimationEnd"),Sa(vx,"onAnimationIteration"),Sa(yx,"onAnimationStart"),Sa("dblclick","onDoubleClick"),Sa("focusin","onFocus"),Sa("focusout","onBlur"),Sa(f2,"onTransitionRun"),Sa(m2,"onTransitionStart"),Sa(p2,"onTransitionCancel"),Sa(jx,"onTransitionEnd"),ys("onMouseEnter",["mouseout","mouseover"]),ys("onMouseLeave",["mouseout","mouseover"]),ys("onPointerEnter",["pointerout","pointerover"]),ys("onPointerLeave",["pointerout","pointerover"]),hs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),hs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),hs("onBeforeInput",["compositionend","keypress","textInput","paste"]),hs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),hs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),hs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Z2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qo));function Uv(n,a){a=(a&4)!==0;for(var o=0;o<n.length;o++){var d=n[o],p=d.event;d=d.listeners;e:{var b=void 0;if(a)for(var w=d.length-1;0<=w;w--){var E=d[w],q=E.instance,te=E.currentTarget;if(E=E.listener,q!==b&&p.isPropagationStopped())break e;b=E,p.currentTarget=te;try{b(p)}catch(me){Vc(me)}p.currentTarget=null,b=q}else for(w=0;w<d.length;w++){if(E=d[w],q=E.instance,te=E.currentTarget,E=E.listener,q!==b&&p.isPropagationStopped())break e;b=E,p.currentTarget=te;try{b(p)}catch(me){Vc(me)}p.currentTarget=null,b=q}}}}r(Uv,"processDispatchQueue");function wt(n,a){var o=a[Ua];o===void 0&&(o=a[Ua]=new Set);var d=n+"__bubble";o.has(d)||(Bv(a,n,2,!1),o.add(d))}r(wt,"listenToNonDelegatedEvent");function xp(n,a,o){var d=0;a&&(d|=4),Bv(o,n,d,a)}r(xp,"listenToNativeEvent");var Ru="_reactListening"+Math.random().toString(36).slice(2);function $v(n){if(!n[Ru]){n[Ru]=!0,$a.forEach(function(o){o!=="selectionchange"&&(Z2.has(o)||xp(o,!1,n),xp(o,!0,n))});var a=n.nodeType===9?n:n.ownerDocument;a===null||a[Ru]||(a[Ru]=!0,xp("selectionchange",!1,a))}}r($v,"listenToAllSupportedEvents");function Bv(n,a,o,d){switch(py(a)){case 2:var p=__;break;case 8:p=E_;break;default:p=Rp}o=p.bind(null,a,o,n),p=void 0,!V||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(p=!0),d?p!==void 0?n.addEventListener(a,o,{capture:!0,passive:p}):n.addEventListener(a,o,!0):p!==void 0?n.addEventListener(a,o,{passive:p}):n.addEventListener(a,o,!1)}r(Bv,"addTrappedEventListener");function bp(n,a,o,d,p){var b=d;if((a&1)===0&&(a&2)===0&&d!==null)e:for(;;){if(d===null)return;var w=d.tag;if(w===3||w===4){var E=d.stateNode.containerInfo;if(E===p)break;if(w===4)for(w=d.return;w!==null;){var q=w.tag;if((q===3||q===4)&&w.stateNode.containerInfo===p)return;w=w.return}for(;E!==null;){if(w=vs(E),w===null)return;if(q=w.tag,q===5||q===6||q===26||q===27){d=b=w;continue e}E=E.parentNode}}d=d.return}$c(function(){var te=b,me=Fs(o),xe=[];e:{var se=wx.get(n);if(se!==void 0){var re=ia,Pe=n;switch(n){case"keypress":if(En(o)===0)break e;case"keydown":case"keyup":re=Kf;break;case"focusin":Pe="focus",re=dr;break;case"focusout":Pe="blur",re=dr;break;case"beforeblur":case"afterblur":re=dr;break;case"click":if(o.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":re=Zr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":re=Bf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":re=co;break;case bx:case vx:case yx:re=Bc;break;case jx:re=mr;break;case"scroll":case"scrollend":re=Vs;break;case"wheel":re=uo;break;case"copy":case"cut":case"paste":re=Jr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":re=qc;break;case"toggle":case"beforetoggle":re=qf}var tt=(a&4)!==0,an=!tt&&(n==="scroll"||n==="scrollend"),G=tt?se!==null?se+"Capture":null:se;tt=[];for(var F=te,ee;F!==null;){var pe=F;if(ee=pe.stateNode,pe=pe.tag,pe!==5&&pe!==26&&pe!==27||ee===null||G===null||(pe=ei(F,G),pe!=null&&tt.push(Fo(F,pe,ee))),an)break;F=F.return}0<tt.length&&(se=new re(se,Pe,null,o,me),xe.push({event:se,listeners:tt}))}}if((a&7)===0){e:{if(se=n==="mouseover"||n==="pointerover",re=n==="mouseout"||n==="pointerout",se&&o!==ws&&(Pe=o.relatedTarget||o.fromElement)&&(vs(Pe)||Pe[es]))break e;if((re||se)&&(se=me.window===me?me:(se=me.ownerDocument)?se.defaultView||se.parentWindow:window,re?(Pe=o.relatedTarget||o.toElement,re=te,Pe=Pe?vs(Pe):null,Pe!==null&&(an=m(Pe),tt=Pe.tag,Pe!==an||tt!==5&&tt!==27&&tt!==6)&&(Pe=null)):(re=null,Pe=te),re!==Pe)){if(tt=Zr,pe="onMouseLeave",G="onMouseEnter",F="mouse",(n==="pointerout"||n==="pointerover")&&(tt=qc,pe="onPointerLeave",G="onPointerEnter",F="pointer"),an=re==null?se:Ts(re),ee=Pe==null?se:Ts(Pe),se=new tt(pe,F+"leave",re,o,me),se.target=an,se.relatedTarget=ee,pe=null,vs(me)===te&&(tt=new tt(G,F+"enter",Pe,o,me),tt.target=ee,tt.relatedTarget=an,pe=tt),an=pe,re&&Pe)t:{for(tt=J2,G=re,F=Pe,ee=0,pe=G;pe;pe=tt(pe))ee++;pe=0;for(var We=F;We;We=tt(We))pe++;for(;0<ee-pe;)G=tt(G),ee--;for(;0<pe-ee;)F=tt(F),pe--;for(;ee--;){if(G===F||F!==null&&G===F.alternate){tt=G;break t}G=tt(G),F=tt(F)}tt=null}else tt=null;re!==null&&Kv(xe,se,re,tt,!1),Pe!==null&&an!==null&&Kv(xe,an,Pe,tt,!0)}}e:{if(se=te?Ts(te):window,re=se.nodeName&&se.nodeName.toLowerCase(),re==="select"||re==="input"&&se.type==="file")var $t=lx;else if(ix(se))if(ox)$t=c2;else{$t=l2;var Ue=r2}else re=se.nodeName,!re||re.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?te&&Ln(te.elementType)&&($t=lx):$t=o2;if($t&&($t=$t(n,te))){rx(xe,$t,o,me);break e}Ue&&Ue(n,se,te),n==="focusout"&&te&&se.type==="number"&&te.memoizedProps.value!=null&&J(se,"number",se.value)}switch(Ue=te?Ts(te):window,n){case"focusin":(ix(Ue)||Ue.contentEditable==="true")&&(el=Ue,Qf=te,vo=null);break;case"focusout":vo=Qf=el=null;break;case"mousedown":Gf=!0;break;case"contextmenu":case"mouseup":case"dragend":Gf=!1,gx(xe,o,me);break;case"selectionchange":if(d2)break;case"keydown":case"keyup":gx(xe,o,me)}var dt;if(mo)e:{switch(n){case"compositionstart":var Ct="onCompositionStart";break e;case"compositionend":Ct="onCompositionEnd";break e;case"compositionupdate":Ct="onCompositionUpdate";break e}Ct=void 0}else ni?ks(n,o)&&(Ct="onCompositionEnd"):n==="keydown"&&o.keyCode===229&&(Ct="onCompositionStart");Ct&&(po&&o.locale!=="ko"&&(ni||Ct!=="onCompositionStart"?Ct==="onCompositionEnd"&&ni&&(dt=zt()):(Z=me,Te="value"in Z?Z.value:Z.textContent,ni=!0)),Ue=Du(te,Ct),0<Ue.length&&(Ct=new fr(Ct,n,null,o,me),xe.push({event:Ct,listeners:Ue}),dt?Ct.data=dt:(dt=Fc(o),dt!==null&&(Ct.data=dt)))),(dt=Ff?n2(n,o):s2(n,o))&&(Ct=Du(te,"onBeforeInput"),0<Ct.length&&(Ue=new fr("onBeforeInput","beforeinput",null,o,me),xe.push({event:Ue,listeners:Ct}),Ue.data=dt)),X2(xe,n,te,o,me)}Uv(xe,a)})}r(bp,"dispatchEventForPluginEventSystem");function Fo(n,a,o){return{instance:n,listener:a,currentTarget:o}}r(Fo,"createDispatchListener");function Du(n,a){for(var o=a+"Capture",d=[];n!==null;){var p=n,b=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||b===null||(p=ei(n,o),p!=null&&d.unshift(Fo(n,p,b)),p=ei(n,a),p!=null&&d.push(Fo(n,p,b))),n.tag===3)return d;n=n.return}return[]}r(Du,"accumulateTwoPhaseListeners");function J2(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5&&n.tag!==27);return n||null}r(J2,"getParent");function Kv(n,a,o,d,p){for(var b=a._reactName,w=[];o!==null&&o!==d;){var E=o,q=E.alternate,te=E.stateNode;if(E=E.tag,q!==null&&q===d)break;E!==5&&E!==26&&E!==27||te===null||(q=te,p?(te=ei(o,b),te!=null&&w.unshift(Fo(o,te,q))):p||(te=ei(o,b),te!=null&&w.push(Fo(o,te,q)))),o=o.return}w.length!==0&&n.push({event:a,listeners:w})}r(Kv,"accumulateEnterLeaveListenersForEvent");var e_=/\r\n?/g,t_=/\u0000|\uFFFD/g;function qv(n){return(typeof n=="string"?n:""+n).replace(e_,`
|
|
67
|
-
`).replace(t_,"")}r(qv,"normalizeMarkupForTextOrAttribute");function Fv(n,a){return a=qv(a),qv(n)===a}r(Fv,"checkForUnmatchedText");function sn(n,a,o,d,p,b){switch(o){case"children":typeof d=="string"?a==="body"||a==="textarea"&&d===""||Ve(n,d):(typeof d=="number"||typeof d=="bigint")&&a!=="body"&&Ve(n,""+d);break;case"className":qs(n,"class",d);break;case"tabIndex":qs(n,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":qs(n,o,d);break;case"style":pn(n,d,b);break;case"data":if(a!=="object"){qs(n,"data",d);break}case"src":case"href":if(d===""&&(a!=="a"||o!=="href")){n.removeAttribute(o);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){n.removeAttribute(o);break}d=Ft(""+d),n.setAttribute(o,d);break;case"action":case"formAction":if(typeof d=="function"){n.setAttribute(o,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(o==="formAction"?(a!=="input"&&sn(n,a,"name",p.name,p,null),sn(n,a,"formEncType",p.formEncType,p,null),sn(n,a,"formMethod",p.formMethod,p,null),sn(n,a,"formTarget",p.formTarget,p,null)):(sn(n,a,"encType",p.encType,p,null),sn(n,a,"method",p.method,p,null),sn(n,a,"target",p.target,p,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){n.removeAttribute(o);break}d=Ft(""+d),n.setAttribute(o,d);break;case"onClick":d!=null&&(n.onclick=Nn);break;case"onScroll":d!=null&&wt("scroll",n);break;case"onScrollEnd":d!=null&&wt("scrollend",n);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(c(61));if(o=d.__html,o!=null){if(p.children!=null)throw Error(c(60));n.innerHTML=o}}break;case"multiple":n.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":n.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){n.removeAttribute("xlink:href");break}o=Ft(""+d),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":d!=null&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(o,""+d):n.removeAttribute(o);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":d&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(o,""):n.removeAttribute(o);break;case"capture":case"download":d===!0?n.setAttribute(o,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?n.setAttribute(o,d):n.removeAttribute(o);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?n.setAttribute(o,d):n.removeAttribute(o);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?n.removeAttribute(o):n.setAttribute(o,d);break;case"popover":wt("beforetoggle",n),wt("toggle",n),Ks(n,"popover",d);break;case"xlinkActuate":js(n,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":js(n,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":js(n,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":js(n,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":js(n,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":js(n,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":js(n,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":js(n,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":js(n,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Ks(n,"is",d);break;case"innerText":case"textContent":break;default:(!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(o=Ms.get(o)||o,Ks(n,o,d))}}r(sn,"setProp");function vp(n,a,o,d,p,b){switch(o){case"style":pn(n,d,b);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(c(61));if(o=d.__html,o!=null){if(p.children!=null)throw Error(c(60));n.innerHTML=o}}break;case"children":typeof d=="string"?Ve(n,d):(typeof d=="number"||typeof d=="bigint")&&Ve(n,""+d);break;case"onScroll":d!=null&&wt("scroll",n);break;case"onScrollEnd":d!=null&&wt("scrollend",n);break;case"onClick":d!=null&&(n.onclick=Nn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ba.hasOwnProperty(o))e:{if(o[0]==="o"&&o[1]==="n"&&(p=o.endsWith("Capture"),a=o.slice(2,p?o.length-7:void 0),b=n[kn]||null,b=b!=null?b[o]:null,typeof b=="function"&&n.removeEventListener(a,b,p),typeof d=="function")){typeof b!="function"&&b!==null&&(o in n?n[o]=null:n.hasAttribute(o)&&n.removeAttribute(o)),n.addEventListener(a,d,p);break e}o in n?n[o]=d:d===!0?n.setAttribute(o,""):Ks(n,o,d)}}}r(vp,"setPropOnCustomElement");function us(n,a,o){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":wt("error",n),wt("load",n);var d=!1,p=!1,b;for(b in o)if(o.hasOwnProperty(b)){var w=o[b];if(w!=null)switch(b){case"src":d=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(c(137,a));default:sn(n,a,b,w,o,null)}}p&&sn(n,a,"srcSet",o.srcSet,o,null),d&&sn(n,a,"src",o.src,o,null);return;case"input":wt("invalid",n);var E=b=w=p=null,q=null,te=null;for(d in o)if(o.hasOwnProperty(d)){var me=o[d];if(me!=null)switch(d){case"name":p=me;break;case"type":w=me;break;case"checked":q=me;break;case"defaultChecked":te=me;break;case"value":b=me;break;case"defaultValue":E=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(c(137,a));break;default:sn(n,a,d,me,o,null)}}Ds(n,b,E,q,te,w,p,!1);return;case"select":wt("invalid",n),d=w=b=null;for(p in o)if(o.hasOwnProperty(p)&&(E=o[p],E!=null))switch(p){case"value":b=E;break;case"defaultValue":w=E;break;case"multiple":d=E;default:sn(n,a,p,E,o,null)}a=b,o=w,n.multiple=!!d,a!=null?_e(n,!!d,a,!1):o!=null&&_e(n,!!d,o,!0);return;case"textarea":wt("invalid",n),b=p=d=null;for(w in o)if(o.hasOwnProperty(w)&&(E=o[w],E!=null))switch(w){case"value":d=E;break;case"defaultValue":p=E;break;case"children":b=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(c(91));break;default:sn(n,a,w,E,o,null)}Xe(n,d,p,b);return;case"option":for(q in o)o.hasOwnProperty(q)&&(d=o[q],d!=null)&&(q==="selected"?n.selected=d&&typeof d!="function"&&typeof d!="symbol":sn(n,a,q,d,o,null));return;case"dialog":wt("beforetoggle",n),wt("toggle",n),wt("cancel",n),wt("close",n);break;case"iframe":case"object":wt("load",n);break;case"video":case"audio":for(d=0;d<qo.length;d++)wt(qo[d],n);break;case"image":wt("error",n),wt("load",n);break;case"details":wt("toggle",n);break;case"embed":case"source":case"link":wt("error",n),wt("load",n);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(te in o)if(o.hasOwnProperty(te)&&(d=o[te],d!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(c(137,a));default:sn(n,a,te,d,o,null)}return;default:if(Ln(a)){for(me in o)o.hasOwnProperty(me)&&(d=o[me],d!==void 0&&vp(n,a,me,d,o,void 0));return}}for(E in o)o.hasOwnProperty(E)&&(d=o[E],d!=null&&sn(n,a,E,d,o,null))}r(us,"setInitialProperties");function n_(n,a,o,d){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,b=null,w=null,E=null,q=null,te=null,me=null;for(re in o){var xe=o[re];if(o.hasOwnProperty(re)&&xe!=null)switch(re){case"checked":break;case"value":break;case"defaultValue":q=xe;default:d.hasOwnProperty(re)||sn(n,a,re,null,d,xe)}}for(var se in d){var re=d[se];if(xe=o[se],d.hasOwnProperty(se)&&(re!=null||xe!=null))switch(se){case"type":b=re;break;case"name":p=re;break;case"checked":te=re;break;case"defaultChecked":me=re;break;case"value":w=re;break;case"defaultValue":E=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(c(137,a));break;default:re!==xe&&sn(n,a,se,re,d,xe)}}qt(n,w,E,q,te,me,b,p);return;case"select":re=w=E=se=null;for(b in o)if(q=o[b],o.hasOwnProperty(b)&&q!=null)switch(b){case"value":break;case"multiple":re=q;default:d.hasOwnProperty(b)||sn(n,a,b,null,d,q)}for(p in d)if(b=d[p],q=o[p],d.hasOwnProperty(p)&&(b!=null||q!=null))switch(p){case"value":se=b;break;case"defaultValue":E=b;break;case"multiple":w=b;default:b!==q&&sn(n,a,p,b,d,q)}a=E,o=w,d=re,se!=null?_e(n,!!o,se,!1):!!d!=!!o&&(a!=null?_e(n,!!o,a,!0):_e(n,!!o,o?[]:"",!1));return;case"textarea":re=se=null;for(E in o)if(p=o[E],o.hasOwnProperty(E)&&p!=null&&!d.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:sn(n,a,E,null,d,p)}for(w in d)if(p=d[w],b=o[w],d.hasOwnProperty(w)&&(p!=null||b!=null))switch(w){case"value":se=p;break;case"defaultValue":re=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(c(91));break;default:p!==b&&sn(n,a,w,p,d,b)}Be(n,se,re);return;case"option":for(var Pe in o)se=o[Pe],o.hasOwnProperty(Pe)&&se!=null&&!d.hasOwnProperty(Pe)&&(Pe==="selected"?n.selected=!1:sn(n,a,Pe,null,d,se));for(q in d)se=d[q],re=o[q],d.hasOwnProperty(q)&&se!==re&&(se!=null||re!=null)&&(q==="selected"?n.selected=se&&typeof se!="function"&&typeof se!="symbol":sn(n,a,q,se,d,re));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var tt in o)se=o[tt],o.hasOwnProperty(tt)&&se!=null&&!d.hasOwnProperty(tt)&&sn(n,a,tt,null,d,se);for(te in d)if(se=d[te],re=o[te],d.hasOwnProperty(te)&&se!==re&&(se!=null||re!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(c(137,a));break;default:sn(n,a,te,se,d,re)}return;default:if(Ln(a)){for(var an in o)se=o[an],o.hasOwnProperty(an)&&se!==void 0&&!d.hasOwnProperty(an)&&vp(n,a,an,void 0,d,se);for(me in d)se=d[me],re=o[me],!d.hasOwnProperty(me)||se===re||se===void 0&&re===void 0||vp(n,a,me,se,d,re);return}}for(var G in o)se=o[G],o.hasOwnProperty(G)&&se!=null&&!d.hasOwnProperty(G)&&sn(n,a,G,null,d,se);for(xe in d)se=d[xe],re=o[xe],!d.hasOwnProperty(xe)||se===re||se==null&&re==null||sn(n,a,xe,se,d,re)}r(n_,"updateProperties");function Hv(n){switch(n){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}r(Hv,"isLikelyStaticResource");function s_(){if(typeof performance.getEntriesByType=="function"){for(var n=0,a=0,o=performance.getEntriesByType("resource"),d=0;d<o.length;d++){var p=o[d],b=p.transferSize,w=p.initiatorType,E=p.duration;if(b&&E&&Hv(w)){for(w=0,E=p.responseEnd,d+=1;d<o.length;d++){var q=o[d],te=q.startTime;if(te>E)break;var me=q.transferSize,xe=q.initiatorType;me&&Hv(xe)&&(q=q.responseEnd,w+=me*(q<E?1:(E-te)/(q-te)))}if(--d,a+=8*(b+w)/(p.duration/1e3),n++,10<n)break}}if(0<n)return a/n/1e6}return navigator.connection&&(n=navigator.connection.downlink,typeof n=="number")?n:5}r(s_,"estimateBandwidth");var yp=null,jp=null;function Mu(n){return n.nodeType===9?n:n.ownerDocument}r(Mu,"getOwnerDocumentFromRootContainer");function Vv(n){switch(n){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}r(Vv,"getOwnHostContext");function Wv(n,a){if(n===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return n===1&&a==="foreignObject"?0:n}r(Wv,"getChildHostContextProd");function wp(n,a){return n==="textarea"||n==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}r(wp,"shouldSetTextContent");var kp=null;function a_(){var n=window.event;return n&&n.type==="popstate"?n===kp?!1:(kp=n,!0):(kp=null,!1)}r(a_,"shouldAttemptEagerTransition");var Qv=typeof setTimeout=="function"?setTimeout:void 0,i_=typeof clearTimeout=="function"?clearTimeout:void 0,Gv=typeof Promise=="function"?Promise:void 0,r_=typeof queueMicrotask=="function"?queueMicrotask:typeof Gv<"u"?function(n){return Gv.resolve(null).then(n).catch(l_)}:Qv;function l_(n){setTimeout(function(){throw n})}r(l_,"handleErrorInNextTick");function Ki(n){return n==="head"}r(Ki,"isSingletonScope");function Yv(n,a){var o=a,d=0;do{var p=o.nextSibling;if(n.removeChild(o),p&&p.nodeType===8)if(o=p.data,o==="/$"||o==="/&"){if(d===0){n.removeChild(p),Al(a);return}d--}else if(o==="$"||o==="$?"||o==="$~"||o==="$!"||o==="&")d++;else if(o==="html")Ho(n.ownerDocument.documentElement);else if(o==="head"){o=n.ownerDocument.head,Ho(o);for(var b=o.firstChild;b;){var w=b.nextSibling,E=b.nodeName;b[Sn]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&b.rel.toLowerCase()==="stylesheet"||o.removeChild(b),b=w}}else o==="body"&&Ho(n.ownerDocument.body);o=p}while(o);Al(a)}r(Yv,"clearHydrationBoundary");function Xv(n,a){var o=n;n=0;do{var d=o.nextSibling;if(o.nodeType===1?a?(o._stashedDisplay=o.style.display,o.style.display="none"):(o.style.display=o._stashedDisplay||"",o.getAttribute("style")===""&&o.removeAttribute("style")):o.nodeType===3&&(a?(o._stashedText=o.nodeValue,o.nodeValue=""):o.nodeValue=o._stashedText||""),d&&d.nodeType===8)if(o=d.data,o==="/$"){if(n===0)break;n--}else o!=="$"&&o!=="$?"&&o!=="$~"&&o!=="$!"||n++;o=d}while(o)}r(Xv,"hideOrUnhideDehydratedBoundary");function Sp(n){var a=n.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var o=a;switch(a=a.nextSibling,o.nodeName){case"HTML":case"HEAD":case"BODY":Sp(o),Bs(o);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(o.rel.toLowerCase()==="stylesheet")continue}n.removeChild(o)}}r(Sp,"clearContainerSparingly");function o_(n,a,o,d){for(;n.nodeType===1;){var p=o;if(n.nodeName.toLowerCase()!==a.toLowerCase()){if(!d&&(n.nodeName!=="INPUT"||n.type!=="hidden"))break}else if(d){if(!n[Sn])switch(a){case"meta":if(!n.hasAttribute("itemprop"))break;return n;case"link":if(b=n.getAttribute("rel"),b==="stylesheet"&&n.hasAttribute("data-precedence"))break;if(b!==p.rel||n.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||n.getAttribute("title")!==(p.title==null?null:p.title))break;return n;case"style":if(n.hasAttribute("data-precedence"))break;return n;case"script":if(b=n.getAttribute("src"),(b!==(p.src==null?null:p.src)||n.getAttribute("type")!==(p.type==null?null:p.type)||n.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&b&&n.hasAttribute("async")&&!n.hasAttribute("itemprop"))break;return n;default:return n}}else if(a==="input"&&n.type==="hidden"){var b=p.name==null?null:""+p.name;if(p.type==="hidden"&&n.getAttribute("name")===b)return n}else return n;if(n=ma(n.nextSibling),n===null)break}return null}r(o_,"canHydrateInstance");function c_(n,a,o){if(a==="")return null;for(;n.nodeType!==3;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!o||(n=ma(n.nextSibling),n===null))return null;return n}r(c_,"canHydrateTextInstance");function Zv(n,a){for(;n.nodeType!==8;)if((n.nodeType!==1||n.nodeName!=="INPUT"||n.type!=="hidden")&&!a||(n=ma(n.nextSibling),n===null))return null;return n}r(Zv,"canHydrateHydrationBoundary");function Np(n){return n.data==="$?"||n.data==="$~"}r(Np,"isSuspenseInstancePending");function Cp(n){return n.data==="$!"||n.data==="$?"&&n.ownerDocument.readyState!=="loading"}r(Cp,"isSuspenseInstanceFallback");function u_(n,a){var o=n.ownerDocument;if(n.data==="$~")n._reactRetry=a;else if(n.data!=="$?"||o.readyState!=="loading")a();else{var d=r(function(){a(),o.removeEventListener("DOMContentLoaded",d)},"listener");o.addEventListener("DOMContentLoaded",d),n._reactRetry=d}}r(u_,"registerSuspenseInstanceRetry");function ma(n){for(;n!=null;n=n.nextSibling){var a=n.nodeType;if(a===1||a===3)break;if(a===8){if(a=n.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return n}r(ma,"getNextHydratable");var Ap=null;function Jv(n){n=n.nextSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="/$"||o==="/&"){if(a===0)return ma(n.nextSibling);a--}else o!=="$"&&o!=="$!"&&o!=="$?"&&o!=="$~"&&o!=="&"||a++}n=n.nextSibling}return null}r(Jv,"getNextHydratableInstanceAfterHydrationBoundary");function ey(n){n=n.previousSibling;for(var a=0;n;){if(n.nodeType===8){var o=n.data;if(o==="$"||o==="$!"||o==="$?"||o==="$~"||o==="&"){if(a===0)return n;a--}else o!=="/$"&&o!=="/&"||a++}n=n.previousSibling}return null}r(ey,"getParentHydrationBoundary");function ty(n,a,o){switch(a=Mu(o),n){case"html":if(n=a.documentElement,!n)throw Error(c(452));return n;case"head":if(n=a.head,!n)throw Error(c(453));return n;case"body":if(n=a.body,!n)throw Error(c(454));return n;default:throw Error(c(451))}}r(ty,"resolveSingletonInstance");function Ho(n){for(var a=n.attributes;a.length;)n.removeAttributeNode(a[0]);Bs(n)}r(Ho,"releaseSingletonInstance");var pa=new Map,ny=new Set;function Ou(n){return typeof n.getRootNode=="function"?n.getRootNode():n.nodeType===9?n:n.ownerDocument}r(Ou,"getHoistableRoot");var bi=ne.d;ne.d={f:d_,r:f_,D:m_,C:p_,L:h_,m:g_,X:b_,S:x_,M:v_};function d_(){var n=bi.f(),a=Cu();return n||a}r(d_,"flushSyncWork");function f_(n){var a=Mn(n);a!==null&&a.tag===5&&a.type==="form"?jb(a):bi.r(n)}r(f_,"requestFormReset");var Sl=typeof document>"u"?null:document;function sy(n,a,o){var d=Sl;if(d&&typeof a=="string"&&a){var p=gt(a);p='link[rel="'+n+'"][href="'+p+'"]',typeof o=="string"&&(p+='[crossorigin="'+o+'"]'),ny.has(p)||(ny.add(p),n={rel:n,crossOrigin:o,href:a},d.querySelector(p)===null&&(a=d.createElement("link"),us(a,"link",n),mn(a),d.head.appendChild(a)))}}r(sy,"preconnectAs");function m_(n){bi.D(n),sy("dns-prefetch",n,null)}r(m_,"prefetchDNS");function p_(n,a){bi.C(n,a),sy("preconnect",n,a)}r(p_,"preconnect");function h_(n,a,o){bi.L(n,a,o);var d=Sl;if(d&&n&&a){var p='link[rel="preload"][as="'+gt(a)+'"]';a==="image"&&o&&o.imageSrcSet?(p+='[imagesrcset="'+gt(o.imageSrcSet)+'"]',typeof o.imageSizes=="string"&&(p+='[imagesizes="'+gt(o.imageSizes)+'"]')):p+='[href="'+gt(n)+'"]';var b=p;switch(a){case"style":b=Nl(n);break;case"script":b=Cl(n)}pa.has(b)||(n=j({rel:"preload",href:a==="image"&&o&&o.imageSrcSet?void 0:n,as:a},o),pa.set(b,n),d.querySelector(p)!==null||a==="style"&&d.querySelector(Vo(b))||a==="script"&&d.querySelector(Wo(b))||(a=d.createElement("link"),us(a,"link",n),mn(a),d.head.appendChild(a)))}}r(h_,"preload");function g_(n,a){bi.m(n,a);var o=Sl;if(o&&n){var d=a&&typeof a.as=="string"?a.as:"script",p='link[rel="modulepreload"][as="'+gt(d)+'"][href="'+gt(n)+'"]',b=p;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Cl(n)}if(!pa.has(b)&&(n=j({rel:"modulepreload",href:n},a),pa.set(b,n),o.querySelector(p)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(o.querySelector(Wo(b)))return}d=o.createElement("link"),us(d,"link",n),mn(d),o.head.appendChild(d)}}}r(g_,"preloadModule");function x_(n,a,o){bi.S(n,a,o);var d=Sl;if(d&&n){var p=_n(d).hoistableStyles,b=Nl(n);a=a||"default";var w=p.get(b);if(!w){var E={loading:0,preload:null};if(w=d.querySelector(Vo(b)))E.loading=5;else{n=j({rel:"stylesheet",href:n,"data-precedence":a},o),(o=pa.get(b))&&_p(n,o);var q=w=d.createElement("link");mn(q),us(q,"link",n),q._p=new Promise(function(te,me){q.onload=te,q.onerror=me}),q.addEventListener("load",function(){E.loading|=1}),q.addEventListener("error",function(){E.loading|=2}),E.loading|=4,Lu(w,a,d)}w={type:"stylesheet",instance:w,count:1,state:E},p.set(b,w)}}}r(x_,"preinitStyle");function b_(n,a){bi.X(n,a);var o=Sl;if(o&&n){var d=_n(o).hoistableScripts,p=Cl(n),b=d.get(p);b||(b=o.querySelector(Wo(p)),b||(n=j({src:n,async:!0},a),(a=pa.get(p))&&Ep(n,a),b=o.createElement("script"),mn(b),us(b,"link",n),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(p,b))}}r(b_,"preinitScript");function v_(n,a){bi.M(n,a);var o=Sl;if(o&&n){var d=_n(o).hoistableScripts,p=Cl(n),b=d.get(p);b||(b=o.querySelector(Wo(p)),b||(n=j({src:n,async:!0,type:"module"},a),(a=pa.get(p))&&Ep(n,a),b=o.createElement("script"),mn(b),us(b,"link",n),o.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},d.set(p,b))}}r(v_,"preinitModuleScript");function ay(n,a,o,d){var p=(p=De.current)?Ou(p):null;if(!p)throw Error(c(446));switch(n){case"meta":case"title":return null;case"style":return typeof o.precedence=="string"&&typeof o.href=="string"?(a=Nl(o.href),o=_n(p).hoistableStyles,d=o.get(a),d||(d={type:"style",instance:null,count:0,state:null},o.set(a,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(o.rel==="stylesheet"&&typeof o.href=="string"&&typeof o.precedence=="string"){n=Nl(o.href);var b=_n(p).hoistableStyles,w=b.get(n);if(w||(p=p.ownerDocument||p,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(n,w),(b=p.querySelector(Vo(n)))&&!b._p&&(w.instance=b,w.state.loading=5),pa.has(n)||(o={rel:"preload",as:"style",href:o.href,crossOrigin:o.crossOrigin,integrity:o.integrity,media:o.media,hrefLang:o.hrefLang,referrerPolicy:o.referrerPolicy},pa.set(n,o),b||y_(p,n,o,w.state))),a&&d===null)throw Error(c(528,""));return w}if(a&&d!==null)throw Error(c(529,""));return null;case"script":return a=o.async,o=o.src,typeof o=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Cl(o),o=_n(p).hoistableScripts,d=o.get(a),d||(d={type:"script",instance:null,count:0,state:null},o.set(a,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(c(444,n))}}r(ay,"getResource");function Nl(n){return'href="'+gt(n)+'"'}r(Nl,"getStyleKey");function Vo(n){return'link[rel="stylesheet"]['+n+"]"}r(Vo,"getStylesheetSelectorFromKey");function iy(n){return j({},n,{"data-precedence":n.precedence,precedence:null})}r(iy,"stylesheetPropsFromRawProps");function y_(n,a,o,d){n.querySelector('link[rel="preload"][as="style"]['+a+"]")?d.loading=1:(a=n.createElement("link"),d.preload=a,a.addEventListener("load",function(){return d.loading|=1}),a.addEventListener("error",function(){return d.loading|=2}),us(a,"link",o),mn(a),n.head.appendChild(a))}r(y_,"preloadStylesheet");function Cl(n){return'[src="'+gt(n)+'"]'}r(Cl,"getScriptKey");function Wo(n){return"script[async]"+n}r(Wo,"getScriptSelectorFromKey");function ry(n,a,o){if(a.count++,a.instance===null)switch(a.type){case"style":var d=n.querySelector('style[data-href~="'+gt(o.href)+'"]');if(d)return a.instance=d,mn(d),d;var p=j({},o,{"data-href":o.href,"data-precedence":o.precedence,href:null,precedence:null});return d=(n.ownerDocument||n).createElement("style"),mn(d),us(d,"style",p),Lu(d,o.precedence,n),a.instance=d;case"stylesheet":p=Nl(o.href);var b=n.querySelector(Vo(p));if(b)return a.state.loading|=4,a.instance=b,mn(b),b;d=iy(o),(p=pa.get(p))&&_p(d,p),b=(n.ownerDocument||n).createElement("link"),mn(b);var w=b;return w._p=new Promise(function(E,q){w.onload=E,w.onerror=q}),us(b,"link",d),a.state.loading|=4,Lu(b,o.precedence,n),a.instance=b;case"script":return b=Cl(o.src),(p=n.querySelector(Wo(b)))?(a.instance=p,mn(p),p):(d=o,(p=pa.get(b))&&(d=j({},o),Ep(d,p)),n=n.ownerDocument||n,p=n.createElement("script"),mn(p),us(p,"link",d),n.head.appendChild(p),a.instance=p);case"void":return null;default:throw Error(c(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(d=a.instance,a.state.loading|=4,Lu(d,o.precedence,n));return a.instance}r(ry,"acquireResource");function Lu(n,a,o){for(var d=o.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=d.length?d[d.length-1]:null,b=p,w=0;w<d.length;w++){var E=d[w];if(E.dataset.precedence===a)b=E;else if(b!==p)break}b?b.parentNode.insertBefore(n,b.nextSibling):(a=o.nodeType===9?o.head:o,a.insertBefore(n,a.firstChild))}r(Lu,"insertStylesheet");function _p(n,a){n.crossOrigin??=a.crossOrigin,n.referrerPolicy??=a.referrerPolicy,n.title??=a.title}r(_p,"adoptPreloadPropsForStylesheet");function Ep(n,a){n.crossOrigin??=a.crossOrigin,n.referrerPolicy??=a.referrerPolicy,n.integrity??=a.integrity}r(Ep,"adoptPreloadPropsForScript");var zu=null;function ly(n,a,o){if(zu===null){var d=new Map,p=zu=new Map;p.set(o,d)}else p=zu,d=p.get(o),d||(d=new Map,p.set(o,d));if(d.has(n))return d;for(d.set(n,null),o=o.getElementsByTagName(n),p=0;p<o.length;p++){var b=o[p];if(!(b[Sn]||b[bt]||n==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var w=b.getAttribute(a)||"";w=n+w;var E=d.get(w);E?E.push(b):d.set(w,[b])}}return d}r(ly,"getHydratableHoistableCache");function oy(n,a,o){n=n.ownerDocument||n,n.head.insertBefore(o,a==="title"?n.querySelector("head > title"):null)}r(oy,"mountHoistable");function j_(n,a,o){if(o===1||a.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(n=a.disabled,typeof a.precedence=="string"&&n==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}r(j_,"isHostHoistableType");function cy(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}r(cy,"preloadResource");function w_(n,a,o,d){if(o.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(o.state.loading&4)===0){if(o.instance===null){var p=Nl(d.href),b=a.querySelector(Vo(p));if(b){a=b._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(n.count++,n=Pu.bind(n),a.then(n,n)),o.state.loading|=4,o.instance=b,mn(b);return}b=a.ownerDocument||a,d=iy(d),(p=pa.get(p))&&_p(d,p),b=b.createElement("link"),mn(b);var w=b;w._p=new Promise(function(E,q){w.onload=E,w.onerror=q}),us(b,"link",d),o.instance=b}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(o,a),(a=o.state.preload)&&(o.state.loading&3)===0&&(n.count++,o=Pu.bind(n),a.addEventListener("load",o),a.addEventListener("error",o))}}r(w_,"suspendResource");var Ip=0;function k_(n,a){return n.stylesheets&&n.count===0&&$u(n,n.stylesheets),0<n.count||0<n.imgCount?function(o){var d=setTimeout(function(){if(n.stylesheets&&$u(n,n.stylesheets),n.unsuspend){var b=n.unsuspend;n.unsuspend=null,b()}},6e4+a);0<n.imgBytes&&Ip===0&&(Ip=62500*s_());var p=setTimeout(function(){if(n.waitingForImages=!1,n.count===0&&(n.stylesheets&&$u(n,n.stylesheets),n.unsuspend)){var b=n.unsuspend;n.unsuspend=null,b()}},(n.imgBytes>Ip?50:800)+a);return n.unsuspend=o,function(){n.unsuspend=null,clearTimeout(d),clearTimeout(p)}}:null}r(k_,"waitForCommitToBeReady");function Pu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$u(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}r(Pu,"onUnsuspend");var Uu=null;function $u(n,a){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Uu=new Map,a.forEach(S_,n),Uu=null,Pu.call(n))}r($u,"insertSuspendedStylesheets");function S_(n,a){if(!(a.state.loading&4)){var o=Uu.get(n);if(o)var d=o.get(null);else{o=new Map,Uu.set(n,o);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<p.length;b++){var w=p[b];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(o.set(w.dataset.precedence,w),d=w)}d&&o.set(null,d)}p=a.instance,w=p.getAttribute("data-precedence"),b=o.get(w)||d,b===d&&o.set(null,p),o.set(w,p),this.count++,d=Pu.bind(this),p.addEventListener("load",d),p.addEventListener("error",d),b?b.parentNode.insertBefore(p,b.nextSibling):(n=n.nodeType===9?n.head:n,n.insertBefore(p,n.firstChild)),a.state.loading|=4}}r(S_,"insertStylesheetIntoRoot");var Qo={$$typeof:C,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function N_(n,a,o,d,p,b,w,E,q){this.tag=1,this.containerInfo=n,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ut(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ut(0),this.hiddenUpdates=Ut(null),this.identifierPrefix=d,this.onUncaughtError=p,this.onCaughtError=b,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.incompleteTransitions=new Map}r(N_,"FiberRootNode");function C_(n,a,o,d,p,b,w,E,q,te,me,xe){return n=new N_(n,a,o,w,q,te,me,xe,E),a=1,b===!0&&(a|=24),b=Qs(3,null,null,a),n.current=b,b.stateNode=n,a=um(),a.refCount++,n.pooledCache=a,a.refCount++,b.memoizedState={element:d,isDehydrated:o,cache:a},pm(b),n}r(C_,"createFiberRoot");function A_(n){return n?(n=sl,n):sl}r(A_,"getContextForSubtree");function uy(n,a,o,d,p,b){p=A_(p),d.context===null?d.context=p:d.pendingContext=p,d=Nr(a),d.payload={element:o},b=b===void 0?null:b,b!==null&&(d.callback=b),o=Cr(n,d,a),o!==null&&(Us(o,n,a),Co(o,n,a))}r(uy,"updateContainerImpl");function dy(n,a){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var o=n.retryLane;n.retryLane=o!==0&&o<a?o:a}}r(dy,"markRetryLaneImpl");function Tp(n,a){dy(n,a),(n=n.alternate)&&dy(n,a)}r(Tp,"markRetryLaneIfNotHydrated");function fy(n){if(n.tag===13||n.tag===31){var a=gr(n,67108864);a!==null&&Us(a,n,67108864),Tp(n,67108864)}}r(fy,"attemptContinuousHydration");function my(n){if(n.tag===13||n.tag===31){var a=fa();a=ta(a);var o=gr(n,a);o!==null&&Us(o,n,a),Tp(n,a)}}r(my,"attemptHydrationAtCurrentPriority");var Bu=!0;function __(n,a,o,d){var p=R.T;R.T=null;var b=ne.p;try{ne.p=2,Rp(n,a,o,d)}finally{ne.p=b,R.T=p}}r(__,"dispatchDiscreteEvent");function E_(n,a,o,d){var p=R.T;R.T=null;var b=ne.p;try{ne.p=8,Rp(n,a,o,d)}finally{ne.p=b,R.T=p}}r(E_,"dispatchContinuousEvent");function Rp(n,a,o,d){if(Bu){var p=Dp(d);if(p===null)bp(n,a,d,Ku,o),hy(n,d);else if(T_(p,n,a,o,d))d.stopPropagation();else if(hy(n,d),a&4&&-1<I_.indexOf(n)){for(;p!==null;){var b=Mn(p);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var w=Fe(b.pendingLanes);if(w!==0){var E=b;for(E.pendingLanes|=2,E.entangledLanes|=2;w;){var q=1<<31-Rt(w);E.entanglements[1]|=q,w&=~q}xi(b),(Ht&6)===0&&(Su=He()+500,Ko(0,!1))}}break;case 31:case 13:E=gr(b,2),E!==null&&Us(E,b,2),Cu(),Tp(b,2)}if(b=Dp(d),b===null&&bp(n,a,d,Ku,o),b===p)break;p=b}p!==null&&d.stopPropagation()}else bp(n,a,d,null,o)}}r(Rp,"dispatchEvent");function Dp(n){return n=Fs(n),Mp(n)}r(Dp,"findInstanceBlockingEvent");var Ku=null;function Mp(n){if(Ku=null,n=vs(n),n!==null){var a=m(n);if(a===null)n=null;else{var o=a.tag;if(o===13){if(n=f(a),n!==null)return n;n=null}else if(o===31){if(n=h(a),n!==null)return n;n=null}else if(o===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;n=null}else a!==n&&(n=null)}}return Ku=n,null}r(Mp,"findInstanceBlockingTarget");function py(n){switch(n){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(mt()){case it:return 2;case Qt:return 8;case Rn:case Gt:return 32;case Tt:return 268435456;default:return 32}default:return 32}}r(py,"getEventPriority");var Op=!1,qi=null,Fi=null,Hi=null,Go=new Map,Yo=new Map,Vi=[],I_="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function hy(n,a){switch(n){case"focusin":case"focusout":qi=null;break;case"dragenter":case"dragleave":Fi=null;break;case"mouseover":case"mouseout":Hi=null;break;case"pointerover":case"pointerout":Go.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yo.delete(a.pointerId)}}r(hy,"clearIfContinuousEvent");function Xo(n,a,o,d,p,b){return n===null||n.nativeEvent!==b?(n={blockedOn:a,domEventName:o,eventSystemFlags:d,nativeEvent:b,targetContainers:[p]},a!==null&&(a=Mn(a),a!==null&&fy(a)),n):(n.eventSystemFlags|=d,a=n.targetContainers,p!==null&&a.indexOf(p)===-1&&a.push(p),n)}r(Xo,"accumulateOrCreateContinuousQueuedReplayableEvent");function T_(n,a,o,d,p){switch(a){case"focusin":return qi=Xo(qi,n,a,o,d,p),!0;case"dragenter":return Fi=Xo(Fi,n,a,o,d,p),!0;case"mouseover":return Hi=Xo(Hi,n,a,o,d,p),!0;case"pointerover":var b=p.pointerId;return Go.set(b,Xo(Go.get(b)||null,n,a,o,d,p)),!0;case"gotpointercapture":return b=p.pointerId,Yo.set(b,Xo(Yo.get(b)||null,n,a,o,d,p)),!0}return!1}r(T_,"queueIfContinuousEvent");function gy(n){var a=vs(n.target);if(a!==null){var o=m(a);if(o!==null){if(a=o.tag,a===13){if(a=f(o),a!==null){n.blockedOn=a,na(n.priority,function(){my(o)});return}}else if(a===31){if(a=h(o),a!==null){n.blockedOn=a,na(n.priority,function(){my(o)});return}}else if(a===3&&o.stateNode.current.memoizedState.isDehydrated){n.blockedOn=o.tag===3?o.stateNode.containerInfo:null;return}}}n.blockedOn=null}r(gy,"attemptExplicitHydrationTarget");function qu(n){if(n.blockedOn!==null)return!1;for(var a=n.targetContainers;0<a.length;){var o=Dp(n.nativeEvent);if(o===null){o=n.nativeEvent;var d=new o.constructor(o.type,o);ws=d,o.target.dispatchEvent(d),ws=null}else return a=Mn(o),a!==null&&fy(a),n.blockedOn=o,!1;a.shift()}return!0}r(qu,"attemptReplayContinuousQueuedEvent");function xy(n,a,o){qu(n)&&o.delete(a)}r(xy,"attemptReplayContinuousQueuedEventInMap");function R_(){Op=!1,qi!==null&&qu(qi)&&(qi=null),Fi!==null&&qu(Fi)&&(Fi=null),Hi!==null&&qu(Hi)&&(Hi=null),Go.forEach(xy),Yo.forEach(xy)}r(R_,"replayUnblockedEvents");function Fu(n,a){n.blockedOn===a&&(n.blockedOn=null,Op||(Op=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,R_)))}r(Fu,"scheduleCallbackIfUnblocked");var Hu=null;function by(n){Hu!==n&&(Hu=n,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Hu===n&&(Hu=null);for(var a=0;a<n.length;a+=3){var o=n[a],d=n[a+1],p=n[a+2];if(typeof d!="function"){if(Mp(d||o)===null)continue;break}var b=Mn(o);b!==null&&(n.splice(a,3),a-=3,Mm(b,{pending:!0,data:p,method:o.method,action:d},d,p))}}))}r(by,"scheduleReplayQueueIfNeeded");function Al(n){function a(q){return Fu(q,n)}r(a,"unblock"),qi!==null&&Fu(qi,n),Fi!==null&&Fu(Fi,n),Hi!==null&&Fu(Hi,n),Go.forEach(a),Yo.forEach(a);for(var o=0;o<Vi.length;o++){var d=Vi[o];d.blockedOn===n&&(d.blockedOn=null)}for(;0<Vi.length&&(o=Vi[0],o.blockedOn===null);)gy(o),o.blockedOn===null&&Vi.shift();if(o=(n.ownerDocument||n).$$reactFormReplay,o!=null)for(d=0;d<o.length;d+=3){var p=o[d],b=o[d+1],w=p[kn]||null;if(typeof b=="function")w||by(o);else if(w){var E=null;if(b&&b.hasAttribute("formAction")){if(p=b,w=b[kn]||null)E=w.formAction;else if(Mp(p)!==null)continue}else E=w.action;typeof E=="function"?o[d+1]=E:(o.splice(d,3),d-=3),by(o)}}}r(Al,"retryIfBlockedOn");function D_(){function n(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:r(function(){return new Promise(function(w){return p=w})},"handler"),focusReset:"manual",scroll:"manual"})}r(n,"handleNavigate");function a(){p!==null&&(p(),p=null),d||setTimeout(o,20)}r(a,"handleNavigateComplete");function o(){if(!d&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(r(o,"startFakeNavigation"),typeof navigation=="object"){var d=!1,p=null;return navigation.addEventListener("navigate",n),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(o,100),function(){d=!0,navigation.removeEventListener("navigate",n),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),p!==null&&(p(),p=null)}}}r(D_,"defaultOnDefaultTransitionIndicator");function Lp(n){this._internalRoot=n}r(Lp,"ReactDOMRoot"),zp.prototype.render=Lp.prototype.render=function(n){var a=this._internalRoot;if(a===null)throw Error(c(409));var o=a.current;uy(o,fa(),n,a,null,null)},zp.prototype.unmount=Lp.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var a=n.containerInfo;uy(n.current,2,null,n,null,null),Cu(),a[es]=null}};function zp(n){this._internalRoot=n}r(zp,"ReactDOMHydrationRoot"),zp.prototype.unstable_scheduleHydration=function(n){if(n){var a=Is();n={blockedOn:null,target:n,priority:a};for(var o=0;o<Vi.length&&a!==0&&a<Vi[o].priority;o++);Vi.splice(o,0,n),o===0&&gy(n)}};var vy=i.version;if(vy!=="19.2.8")throw Error(c(527,vy,"19.2.8"));ne.findDOMNode=function(n){var a=n._reactInternals;if(a===void 0)throw typeof n.render=="function"?Error(c(188)):(n=Object.keys(n).join(","),Error(c(268,n)));return n=v(a),n=n!==null?y(n):null,n=n===null?null:n.stateNode,n};var M_={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{Qn=Vu.inject(M_),pt=Vu}catch{}}e.createRoot=function(n,a){if(!u(n))throw Error(c(299));var o=!1,d="",p=E2,b=I2,w=T2;return a!=null&&(a.unstable_strictMode===!0&&(o=!0),a.identifierPrefix!==void 0&&(d=a.identifierPrefix),a.onUncaughtError!==void 0&&(p=a.onUncaughtError),a.onCaughtError!==void 0&&(b=a.onCaughtError),a.onRecoverableError!==void 0&&(w=a.onRecoverableError)),a=C_(n,1,!1,null,null,o,d,null,p,b,w,D_),n[es]=a.current,$v(n),new Lp(a)}})),OF=Xl(((e,t)=>{function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch{}}r(i,"checkDCE"),i(),t.exports=MF()})),LF=OF();function zF(e,t,i=LF.createRoot){const l=e;if(l.__wardmoteReactRoot)return l.__wardmoteReactRoot;const c=i(t);return l.__wardmoteReactRoot=c,c}r(zF,"getOrCreateWardmoteReactRoot");function PF(e){return(e.split("/").pop()??"").replace(/\.js$/,"").replace(/[^A-Za-z0-9_-]/g,"-")||"build"}r(PF,"serviceWorkerBuildIdFromFileName");EF(x,Ll);TF();R$();P$();window.addEventListener("load",()=>{o7({pageBuildId:PF(new URL(import.meta.url).pathname)})});var UF=new mf({defaultOptions:{queries:{staleTime:3e4,gcTime:3e5,refetchOnWindowFocus:!0,networkMode:"offlineFirst"},mutations:{networkMode:"always"}}});function $F({children:e}){const{selectedCompany:t}=vt();return(0,s.jsx)(q3,{companyName:t?.name??null,children:e})}r($F,"CompanyAwareBreadcrumbProvider");var t2=document.getElementById("root");if(!t2)throw new Error("Wardmote root element is missing");zF(window,t2).render((0,s.jsx)(x.StrictMode,{children:(0,s.jsx)(V8,{children:(0,s.jsxs)(rE,{client:UF,children:[(0,s.jsx)(W8,{}),(0,s.jsx)(fT,{children:(0,s.jsx)(iE,{children:(0,s.jsx)(SE,{children:(0,s.jsx)(YE,{children:(0,s.jsx)(p3,{children:(0,s.jsx)(g7,{children:(0,s.jsxs)(Xq,{children:[(0,s.jsx)(Jq,{}),(0,s.jsx)(p7,{}),(0,s.jsx)(u3,{children:(0,s.jsx)($F,{children:(0,s.jsx)(i3,{children:(0,s.jsx)(H4,{children:(0,s.jsx)(t5,{children:(0,s.jsx)(OM,{children:(0,s.jsx)(H8,{})})})})})})})]})})})})})})})]})})}));export{PA as $,nO as $i,eG as $n,B0 as $r,S$ as $t,cf as A,HT as Aa,kO as Ai,$C as An,HQ as Ar,QB as At,KG as B,DT as Ba,IQ as Bi,Jd as Bn,SC as Br,ao as Bt,WG as C,XT as Ca,wQ as Ci,DP as Cn,Q4 as Cr,wK as Ct,t9 as D,N1 as Da,TO as Di,mG as Dn,Y4 as Dr,rA as Dt,wk as E,S0 as Ea,kQ as Ei,cG as En,Kj as Er,xK as Et,qg as F,$T as Fa,SQ as Fi,vP as Fn,R4 as Fr,MB as Ft,$G as G,ET as Ga,yQ as Gi,LC as Gn,v4 as Gr,iB as Gt,VG as H,HS as Ha,gQ as Hi,Nd as Hn,w4 as Hr,wG as Ht,Dl as I,UT as Ia,vQ as Ii,bP as In,qQ as Ir,RB as It,PG as J,vT as Ja,EQ as Ji,fP as Jn,xC as Jr,kg as Jt,KA as K,YW as Ka,AQ as Ki,oP as Kn,p4 as Kr,rB as Kt,M7 as L,PT as La,bO as Li,UC as Ln,D4 as Lr,sr as Lt,H7 as M,qT as Ma,_Q as Mi,aG as Mn,FQ as Mr,Ew as Mt,HA as N,KT as Na,hQ as Ni,TP as Nn,uc as Nr,PB as Nt,Z7 as O,ng as Oa,DQ as Oi,dG as On,q0 as Or,S6 as Ot,FA as P,BT as Pa,xQ as Pi,NP as Pn,T4 as Pr,DB as Pt,OG as Q,uO as Qi,tG as Qn,FL as Qr,k$ as Qt,UG as R,eg as Ra,EN as Ri,nG as Rn,KQ as Rr,SG as Rt,l9 as S,ZT as Sa,RQ as Si,OP as Sn,V4 as Sr,nx as St,n9 as T,YT as Ta,wO as Ti,fG as Tn,W4 as Tr,bK as Tt,BG as U,qy as Ua,bQ as Ui,Dr as Un,BQ as Ur,kG as Ut,FG as V,WS as Va,IN as Vi,PC as Vn,$Q as Vr,jG as Vt,HG as W,IT as Wa,NQ as Wi,mP as Wn,UQ as Wr,lB as Wt,zG as X,dO as Xi,iP as Xn,$0 as Xr,JC as Xt,S7 as Y,zQ as Yi,mg as Yn,K0 as Yr,yG as Yt,j7 as Z,vN as Zi,aP as Zn,U0 as Zr,vG as Zt,x9 as _,iR as _a,pQ as _i,rG as _n,QQ as _r,AG as _t,I9 as a,PM as aa,FN as ai,HC as an,TC as ar,Vr as at,Sk as b,eR as ba,MQ as bi,uG as bn,nz as br,MK as bt,Hg as c,Pa as ca,D0 as ci,dU as cn,MC as cr,RG as ct,GG as d,fQ as da,LO as di,pG as dn,YQ as dr,_G as dt,mN as ea,dC as ei,w$ as en,JQ as er,b7 as et,QG as f,Nf as fa,I0 as fi,hG as fn,ZQ as fr,Mg as ft,XG as g,rR as ga,CN as gi,KC as gn,GQ as gr,zK as gt,VA as h,W1 as ha,Fd as hi,JP as hn,cz as hr,EG as ht,yd as i,_0 as ia,Rf as ii,xG as in,Lz as ir,DG as it,V7 as j,f1 as ja,hj as ji,IP as jn,U4 as jr,$B as jt,J7 as k,wf as ka,TQ as ki,sG as kn,B4 as kr,y6 as kt,C9 as l,Cf as la,Za as li,cU as ln,XQ as lr,Lg as lt,b9 as m,lR as ma,PQ as mi,rw as mn,Of as mr,PK as mt,JG as n,oN as na,EL as ni,XC as nn,Jz as nr,MG as nt,T9 as o,zM as oa,cC as oi,gG as on,Uz as or,kA as ot,YG as p,Ne as pa,zO as pi,sU as pn,DC as pr,IG as pt,A7 as q,ST as qa,jQ as qi,cP as qn,vC as qr,M$ as qt,cF as r,dN as ra,O0 as ri,bG as rn,IC as rr,$g as rt,_9 as s,LM as sa,wc as si,CU as sn,$z as sr,TG as st,mF as t,cN as ta,P0 as ti,y$ as tn,Lf as tr,LG as tt,ZG as u,dQ as ua,zN as ui,oU as un,Ql as ur,qK as ut,g9 as v,sR as va,mQ as vi,iG as vn,WQ as vr,CG as vt,s9 as w,N0 as wa,xO as wi,oG as wn,G4 as wr,jK as wt,d9 as x,O1 as xa,LQ as xi,lG as xn,ez as xr,NG as xt,h9 as y,nR as ya,OQ as yi,BC as yn,VQ as yr,LK as yt,qG as z,ZS as za,CQ as zi,pg as zn,N4 as zr,Cg as zt};
|