claude-code-workflow 7.2.26 → 7.2.28
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/.ccw/specs/architecture-constraints.md +5 -0
- package/.claude/skills/_shared/SKILL-DESIGN-SPEC.md +140 -0
- package/.claude/skills/investigate/SKILL.md +110 -0
- package/.claude/skills/investigate/phases/01-root-cause-investigation.md +132 -0
- package/.claude/skills/investigate/phases/02-pattern-analysis.md +126 -0
- package/.claude/skills/investigate/phases/03-hypothesis-testing.md +177 -0
- package/.claude/skills/investigate/phases/04-implementation.md +139 -0
- package/.claude/skills/investigate/phases/05-verification-report.md +153 -0
- package/.claude/skills/investigate/specs/debug-report-format.md +226 -0
- package/.claude/skills/investigate/specs/iron-law.md +101 -0
- package/.claude/skills/security-audit/SKILL.md +125 -0
- package/.claude/skills/security-audit/phases/01-supply-chain-scan.md +139 -0
- package/.claude/skills/security-audit/phases/02-owasp-review.md +156 -0
- package/.claude/skills/security-audit/phases/03-threat-modeling.md +180 -0
- package/.claude/skills/security-audit/phases/04-report-tracking.md +177 -0
- package/.claude/skills/security-audit/specs/owasp-checklist.md +442 -0
- package/.claude/skills/security-audit/specs/scoring-gates.md +141 -0
- package/.claude/skills/ship/SKILL.md +105 -0
- package/.claude/skills/ship/phases/01-preflight-checks.md +121 -0
- package/.claude/skills/ship/phases/02-code-review.md +137 -0
- package/.claude/skills/ship/phases/03-version-bump.md +171 -0
- package/.claude/skills/ship/phases/04-changelog-commit.md +167 -0
- package/.claude/skills/ship/phases/05-pr-creation.md +163 -0
- package/.claude/skills/skill-generator/templates/sequential-phase.md +10 -0
- package/.claude/skills/skill-generator/templates/skill-md.md +4 -0
- package/.claude/skills/team-arch-opt/SKILL.md +1 -1
- package/.claude/skills/team-arch-opt/roles/coordinator/commands/monitor.md +3 -1
- package/.claude/skills/team-arch-opt/roles/refactorer/role.md +3 -1
- package/.claude/skills/team-arch-opt/specs/team-config.json +2 -2
- package/.claude/skills/team-coordinate/SKILL.md +4 -3
- package/.claude/skills/team-coordinate/roles/coordinator/commands/analyze-task.md +1 -1
- package/.claude/skills/team-coordinate/roles/coordinator/commands/dispatch.md +3 -2
- package/.claude/skills/team-coordinate/roles/coordinator/commands/monitor.md +3 -2
- package/.claude/skills/team-coordinate/roles/coordinator/role.md +16 -15
- package/.claude/skills/team-coordinate/specs/pipelines.md +7 -4
- package/.claude/skills/team-coordinate/specs/role-spec-template.md +1 -0
- package/.claude/skills/team-interactive-craft/SKILL.md +127 -0
- package/.claude/skills/team-interactive-craft/roles/a11y-tester/role.md +159 -0
- package/.claude/skills/team-interactive-craft/roles/builder/role.md +216 -0
- package/.claude/skills/team-interactive-craft/roles/coordinator/commands/analyze.md +71 -0
- package/.claude/skills/team-interactive-craft/roles/coordinator/commands/dispatch.md +192 -0
- package/.claude/skills/team-interactive-craft/roles/coordinator/commands/monitor.md +183 -0
- package/.claude/skills/team-interactive-craft/roles/coordinator/role.md +166 -0
- package/.claude/skills/team-interactive-craft/roles/interaction-designer/role.md +144 -0
- package/.claude/skills/team-interactive-craft/roles/researcher/role.md +131 -0
- package/.claude/skills/team-interactive-craft/specs/interaction-patterns.md +362 -0
- package/.claude/skills/team-interactive-craft/specs/pipelines.md +85 -0
- package/.claude/skills/team-interactive-craft/specs/team-config.json +105 -0
- package/.claude/skills/team-interactive-craft/specs/vanilla-constraints.md +83 -0
- package/.claude/skills/team-lifecycle-v4/SKILL.md +1 -1
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/dispatch.md +14 -2
- package/.claude/skills/team-lifecycle-v4/roles/coordinator/commands/monitor.md +24 -2
- package/.claude/skills/team-lifecycle-v4/roles/executor/role.md +3 -1
- package/.claude/skills/team-motion-design/SKILL.md +129 -0
- package/.claude/skills/team-motion-design/roles/animator/role.md +194 -0
- package/.claude/skills/team-motion-design/roles/choreographer/role.md +164 -0
- package/.claude/skills/team-motion-design/roles/coordinator/commands/analyze.md +64 -0
- package/.claude/skills/team-motion-design/roles/coordinator/commands/dispatch.md +203 -0
- package/.claude/skills/team-motion-design/roles/coordinator/commands/monitor.md +184 -0
- package/.claude/skills/team-motion-design/roles/coordinator/role.md +167 -0
- package/.claude/skills/team-motion-design/roles/motion-researcher/role.md +115 -0
- package/.claude/skills/team-motion-design/roles/motion-tester/role.md +175 -0
- package/.claude/skills/team-motion-design/specs/gpu-constraints.md +114 -0
- package/.claude/skills/team-motion-design/specs/motion-tokens.md +128 -0
- package/.claude/skills/team-motion-design/specs/pipelines.md +74 -0
- package/.claude/skills/team-motion-design/specs/reduced-motion.md +129 -0
- package/.claude/skills/team-motion-design/specs/team-config.json +99 -0
- package/.claude/skills/team-perf-opt/SKILL.md +1 -1
- package/.claude/skills/team-perf-opt/roles/optimizer/role.md +3 -1
- package/.claude/skills/team-perf-opt/specs/team-config.json +2 -2
- package/.claude/skills/team-quality-assurance/SKILL.md +1 -1
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/dispatch.md +4 -2
- package/.claude/skills/team-quality-assurance/roles/coordinator/commands/monitor.md +4 -2
- package/.claude/skills/team-quality-assurance/roles/executor/role.md +3 -1
- package/.claude/skills/team-testing/SKILL.md +1 -1
- package/.claude/skills/team-testing/roles/coordinator/commands/dispatch.md +5 -2
- package/.claude/skills/team-testing/roles/coordinator/commands/monitor.md +4 -2
- package/.claude/skills/team-testing/roles/executor/role.md +3 -1
- package/.claude/skills/team-ui-polish/SKILL.md +127 -0
- package/.claude/skills/team-ui-polish/roles/coordinator/commands/analyze.md +77 -0
- package/.claude/skills/team-ui-polish/roles/coordinator/commands/dispatch.md +194 -0
- package/.claude/skills/team-ui-polish/roles/coordinator/commands/monitor.md +180 -0
- package/.claude/skills/team-ui-polish/roles/coordinator/role.md +170 -0
- package/.claude/skills/team-ui-polish/roles/diagnostician/role.md +160 -0
- package/.claude/skills/team-ui-polish/roles/optimizer/role.md +225 -0
- package/.claude/skills/team-ui-polish/roles/scanner/role.md +356 -0
- package/.claude/skills/team-ui-polish/roles/verifier/role.md +142 -0
- package/.claude/skills/team-ui-polish/specs/anti-patterns.md +141 -0
- package/.claude/skills/team-ui-polish/specs/design-standards.md +356 -0
- package/.claude/skills/team-ui-polish/specs/fix-strategies.md +235 -0
- package/.claude/skills/team-ui-polish/specs/pipelines.md +81 -0
- package/.claude/skills/team-ui-polish/specs/scoring-guide.md +162 -0
- package/.claude/skills/team-ui-polish/specs/team-config.json +73 -0
- package/.claude/skills/team-uidesign/SKILL.md +6 -1
- package/.claude/skills/team-uidesign/roles/designer/role.md +28 -4
- package/.claude/skills/team-uidesign/roles/implementer/role.md +25 -3
- package/.claude/skills/team-uidesign/roles/researcher/role.md +21 -2
- package/.claude/skills/team-uidesign/roles/reviewer/role.md +19 -17
- package/.claude/skills/team-uidesign/specs/anti-patterns.md +211 -0
- package/.claude/skills/team-uidesign/specs/design-standards.md +329 -0
- package/.claude/skills/team-uidesign/specs/scoring-guide.md +114 -0
- package/.claude/skills/team-uidesign/specs/team-config.json +1 -1
- package/.claude/skills/team-uidesign/specs/ux-writing.md +86 -0
- package/.claude/skills/team-ux-improve/SKILL.md +3 -0
- package/.claude/skills/team-ux-improve/roles/designer/role.md +30 -0
- package/.claude/skills/team-ux-improve/roles/diagnoser/role.md +16 -1
- package/.claude/skills/team-ux-improve/roles/scanner/role.md +43 -1
- package/.claude/skills/team-ux-improve/specs/anti-patterns.md +103 -0
- package/.claude/skills/team-ux-improve/specs/design-standards.md +54 -0
- package/.claude/skills/team-ux-improve/specs/heuristics.md +88 -0
- package/.claude/skills/team-ux-improve/wisdom/anti-patterns/common-ux-pitfalls.md +40 -8
- package/.claude/skills/team-ux-improve/wisdom/patterns/state-management.md +32 -12
- package/.claude/skills/team-ux-improve/wisdom/patterns/ui-feedback.md +35 -11
- package/.claude/skills/team-ux-improve/wisdom/principles/general-ux.md +36 -9
- package/.claude/skills/team-visual-a11y/SKILL.md +143 -0
- package/.claude/skills/team-visual-a11y/roles/color-auditor/role.md +178 -0
- package/.claude/skills/team-visual-a11y/roles/coordinator/commands/analyze.md +72 -0
- package/.claude/skills/team-visual-a11y/roles/coordinator/commands/dispatch.md +250 -0
- package/.claude/skills/team-visual-a11y/roles/coordinator/commands/monitor.md +204 -0
- package/.claude/skills/team-visual-a11y/roles/coordinator/role.md +169 -0
- package/.claude/skills/team-visual-a11y/roles/fix-implementer/role.md +246 -0
- package/.claude/skills/team-visual-a11y/roles/focus-auditor/role.md +222 -0
- package/.claude/skills/team-visual-a11y/roles/remediation-planner/role.md +206 -0
- package/.claude/skills/team-visual-a11y/roles/typo-auditor/role.md +185 -0
- package/.claude/skills/team-visual-a11y/specs/focus-patterns.md +325 -0
- package/.claude/skills/team-visual-a11y/specs/oklch-standards.md +130 -0
- package/.claude/skills/team-visual-a11y/specs/pipelines.md +98 -0
- package/.claude/skills/team-visual-a11y/specs/team-config.json +109 -0
- package/.claude/skills/team-visual-a11y/specs/typography-scale.md +165 -0
- package/.claude/skills/team-visual-a11y/specs/wcag-matrix.md +133 -0
- package/.codex/skills/investigate/agents/investigator.md +392 -0
- package/.codex/skills/investigate/orchestrator.md +362 -0
- package/.codex/skills/investigate/phases/01-root-cause-investigation.md +212 -0
- package/.codex/skills/investigate/phases/02-pattern-analysis.md +181 -0
- package/.codex/skills/investigate/phases/03-hypothesis-testing.md +214 -0
- package/.codex/skills/investigate/phases/04-implementation.md +195 -0
- package/.codex/skills/investigate/phases/05-verification-report.md +240 -0
- package/.codex/skills/security-audit/agents/security-auditor.md +341 -0
- package/.codex/skills/security-audit/orchestrator.md +384 -0
- package/.codex/skills/security-audit/phases/01-supply-chain-scan.md +226 -0
- package/.codex/skills/security-audit/phases/02-owasp-review.md +232 -0
- package/.codex/skills/security-audit/phases/03-threat-modeling.md +249 -0
- package/.codex/skills/security-audit/phases/04-report-tracking.md +300 -0
- package/.codex/skills/ship/agents/ship-operator.md +318 -0
- package/.codex/skills/ship/orchestrator.md +426 -0
- package/.codex/skills/ship/phases/01-preflight-checks.md +198 -0
- package/.codex/skills/ship/phases/02-code-review.md +228 -0
- package/.codex/skills/ship/phases/03-version-bump.md +259 -0
- package/.codex/skills/ship/phases/04-changelog-commit.md +263 -0
- package/.codex/skills/ship/phases/05-pr-creation.md +280 -0
- package/.codex/skills/team-interactive-craft/SKILL.md +220 -0
- package/.codex/skills/team-interactive-craft/roles/a11y-tester/role.md +159 -0
- package/.codex/skills/team-interactive-craft/roles/builder/role.md +216 -0
- package/.codex/skills/team-interactive-craft/roles/coordinator/commands/analyze.md +71 -0
- package/.codex/skills/team-interactive-craft/roles/coordinator/commands/dispatch.md +162 -0
- package/.codex/skills/team-interactive-craft/roles/coordinator/commands/monitor.md +233 -0
- package/.codex/skills/team-interactive-craft/roles/coordinator/role.md +209 -0
- package/.codex/skills/team-interactive-craft/roles/interaction-designer/role.md +144 -0
- package/.codex/skills/team-interactive-craft/roles/researcher/role.md +131 -0
- package/.codex/skills/team-interactive-craft/specs/interaction-patterns.md +362 -0
- package/.codex/skills/team-interactive-craft/specs/pipelines.md +85 -0
- package/.codex/skills/team-interactive-craft/specs/team-config.json +105 -0
- package/.codex/skills/team-interactive-craft/specs/vanilla-constraints.md +83 -0
- package/.codex/skills/team-motion-design/SKILL.md +222 -0
- package/.codex/skills/team-motion-design/roles/animator/role.md +194 -0
- package/.codex/skills/team-motion-design/roles/choreographer/role.md +164 -0
- package/.codex/skills/team-motion-design/roles/coordinator/commands/analyze.md +64 -0
- package/.codex/skills/team-motion-design/roles/coordinator/commands/dispatch.md +168 -0
- package/.codex/skills/team-motion-design/roles/coordinator/commands/monitor.md +242 -0
- package/.codex/skills/team-motion-design/roles/coordinator/role.md +210 -0
- package/.codex/skills/team-motion-design/roles/motion-researcher/role.md +115 -0
- package/.codex/skills/team-motion-design/roles/motion-tester/role.md +175 -0
- package/.codex/skills/team-motion-design/specs/gpu-constraints.md +114 -0
- package/.codex/skills/team-motion-design/specs/motion-tokens.md +128 -0
- package/.codex/skills/team-motion-design/specs/pipelines.md +74 -0
- package/.codex/skills/team-motion-design/specs/reduced-motion.md +129 -0
- package/.codex/skills/team-motion-design/specs/team-config.json +99 -0
- package/.codex/skills/team-ui-polish/SKILL.md +218 -0
- package/.codex/skills/team-ui-polish/roles/coordinator/commands/analyze.md +77 -0
- package/.codex/skills/team-ui-polish/roles/coordinator/commands/dispatch.md +167 -0
- package/.codex/skills/team-ui-polish/roles/coordinator/commands/monitor.md +230 -0
- package/.codex/skills/team-ui-polish/roles/coordinator/role.md +213 -0
- package/.codex/skills/team-ui-polish/roles/diagnostician/role.md +164 -0
- package/.codex/skills/team-ui-polish/roles/optimizer/role.md +229 -0
- package/.codex/skills/team-ui-polish/roles/scanner/role.md +360 -0
- package/.codex/skills/team-ui-polish/roles/verifier/role.md +142 -0
- package/.codex/skills/team-ui-polish/specs/anti-patterns.md +141 -0
- package/.codex/skills/team-ui-polish/specs/design-standards.md +356 -0
- package/.codex/skills/team-ui-polish/specs/fix-strategies.md +235 -0
- package/.codex/skills/team-ui-polish/specs/pipelines.md +81 -0
- package/.codex/skills/team-ui-polish/specs/scoring-guide.md +162 -0
- package/.codex/skills/team-ui-polish/specs/team-config.json +73 -0
- package/.codex/skills/team-visual-a11y/SKILL.md +319 -0
- package/.codex/skills/team-visual-a11y/roles/color-auditor/role.md +178 -0
- package/.codex/skills/team-visual-a11y/roles/coordinator/commands/analyze.md +72 -0
- package/.codex/skills/team-visual-a11y/roles/coordinator/commands/dispatch.md +188 -0
- package/.codex/skills/team-visual-a11y/roles/coordinator/commands/monitor.md +281 -0
- package/.codex/skills/team-visual-a11y/roles/coordinator/role.md +213 -0
- package/.codex/skills/team-visual-a11y/roles/fix-implementer/role.md +246 -0
- package/.codex/skills/team-visual-a11y/roles/focus-auditor/role.md +222 -0
- package/.codex/skills/team-visual-a11y/roles/remediation-planner/role.md +206 -0
- package/.codex/skills/team-visual-a11y/roles/typo-auditor/role.md +185 -0
- package/.codex/skills/team-visual-a11y/specs/focus-patterns.md +325 -0
- package/.codex/skills/team-visual-a11y/specs/oklch-standards.md +130 -0
- package/.codex/skills/team-visual-a11y/specs/pipelines.md +98 -0
- package/.codex/skills/team-visual-a11y/specs/team-config.json +109 -0
- package/.codex/skills/team-visual-a11y/specs/typography-scale.md +165 -0
- package/.codex/skills/team-visual-a11y/specs/wcag-matrix.md +133 -0
- package/README.md +8 -0
- package/ccw/dist/core/hooks/hook-templates.d.ts.map +1 -1
- package/ccw/dist/core/hooks/hook-templates.js +114 -1
- package/ccw/dist/core/hooks/hook-templates.js.map +1 -1
- package/ccw/dist/core/routes/cli-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/cli-routes.js +34 -0
- package/ccw/dist/core/routes/cli-routes.js.map +1 -1
- package/ccw/dist/core/routes/system-routes.js +2 -2
- package/ccw/dist/core/routes/system-routes.js.map +1 -1
- package/ccw/frontend/dist/assets/{AlertDialog-Bf1jdqax.js → AlertDialog-BjP1ydDR.js} +2 -2
- package/ccw/frontend/dist/assets/{AlertDialog-Bf1jdqax.js.map → AlertDialog-BjP1ydDR.js.map} +1 -1
- package/ccw/frontend/dist/assets/{AnalysisPage-C8niKdp4.js → AnalysisPage-CAX3xqMf.js} +2 -2
- package/ccw/frontend/dist/assets/{AnalysisPage-C8niKdp4.js.map → AnalysisPage-CAX3xqMf.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ApiSettingsPage-BL2c3UNS.js → ApiSettingsPage-CtWlmztq.js} +2 -2
- package/ccw/frontend/dist/assets/{ApiSettingsPage-BL2c3UNS.js.map → ApiSettingsPage-CtWlmztq.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliModeToggle-BePBFynD.js → CliModeToggle-hR4a-eLX.js} +2 -2
- package/ccw/frontend/dist/assets/{CliModeToggle-BePBFynD.js.map → CliModeToggle-hR4a-eLX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliSessionSharePage-7cYtX6FT.js → CliSessionSharePage-DzNPkFN9.js} +2 -2
- package/ccw/frontend/dist/assets/{CliSessionSharePage-7cYtX6FT.js.map → CliSessionSharePage-DzNPkFN9.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliViewerPage-CBwg1mPL.js → CliViewerPage-BPEGN4TT.js} +2 -2
- package/ccw/frontend/dist/assets/{CliViewerPage-CBwg1mPL.js.map → CliViewerPage-BPEGN4TT.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CodexLensPage-Bt74xORP.js → CodexLensPage-Cf0r2RHY.js} +2 -2
- package/ccw/frontend/dist/assets/{CodexLensPage-Bt74xORP.js.map → CodexLensPage-Cf0r2RHY.js.map} +1 -1
- package/ccw/frontend/dist/assets/{Collapsible-Wrs87QT7.js → Collapsible-DEm1rJ4h.js} +2 -2
- package/ccw/frontend/dist/assets/{Collapsible-Wrs87QT7.js.map → Collapsible-DEm1rJ4h.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CommandsManagerPage-ChQjmPWZ.js → CommandsManagerPage-BpeWw8HO.js} +2 -2
- package/ccw/frontend/dist/assets/{CommandsManagerPage-ChQjmPWZ.js.map → CommandsManagerPage-BpeWw8HO.js.map} +1 -1
- package/ccw/frontend/dist/assets/{DeepWikiPage-dEO5wi6X.js → DeepWikiPage-BEsmh2vF.js} +2 -2
- package/ccw/frontend/dist/assets/{DeepWikiPage-dEO5wi6X.js.map → DeepWikiPage-BEsmh2vF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{EndpointsPage-4zq269xY.js → EndpointsPage-B30SFdtU.js} +2 -2
- package/ccw/frontend/dist/assets/{EndpointsPage-4zq269xY.js.map → EndpointsPage-B30SFdtU.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ExplorerPage-B0YTENhA.js → ExplorerPage-BVvMpg1O.js} +2 -2
- package/ccw/frontend/dist/assets/{ExplorerPage-B0YTENhA.js.map → ExplorerPage-BVvMpg1O.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FixSessionPage-CwGs6dhz.js → FixSessionPage-CL73dHbh.js} +2 -2
- package/ccw/frontend/dist/assets/{FixSessionPage-CwGs6dhz.js.map → FixSessionPage-CL73dHbh.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FloatingFileBrowser-COZRBslc.js → FloatingFileBrowser-BL-28lMZ.js} +2 -2
- package/ccw/frontend/dist/assets/{FloatingFileBrowser-COZRBslc.js.map → FloatingFileBrowser-BL-28lMZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FloatingPanel-DYvgQZRD.js → FloatingPanel-BzZDciHZ.js} +2 -2
- package/ccw/frontend/dist/assets/{FloatingPanel-DYvgQZRD.js.map → FloatingPanel-BzZDciHZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{GraphExplorerPage-ewMHQGem.js → GraphExplorerPage-CDp6-d8P.js} +2 -2
- package/ccw/frontend/dist/assets/{GraphExplorerPage-ewMHQGem.js.map → GraphExplorerPage-CDp6-d8P.js.map} +1 -1
- package/ccw/frontend/dist/assets/{HistoryPage-BMeR0PrK.js → HistoryPage-fZY_7O9n.js} +2 -2
- package/ccw/frontend/dist/assets/{HistoryPage-BMeR0PrK.js.map → HistoryPage-fZY_7O9n.js.map} +1 -1
- package/ccw/frontend/dist/assets/{HookManagerPage-DBW2LnRm.js → HookManagerPage-4LJeC9bq.js} +2 -2
- package/ccw/frontend/dist/assets/{HookManagerPage-DBW2LnRm.js.map → HookManagerPage-4LJeC9bq.js.map} +1 -1
- package/ccw/frontend/dist/assets/{InstallationsPage--pMj0QEH.js → InstallationsPage-Bpigrbhw.js} +2 -2
- package/ccw/frontend/dist/assets/{InstallationsPage--pMj0QEH.js.map → InstallationsPage-Bpigrbhw.js.map} +1 -1
- package/ccw/frontend/dist/assets/{IssueHubPage-C_QMpQSR.js → IssueHubPage-BP0zJc1R.js} +2 -2
- package/ccw/frontend/dist/assets/{IssueHubPage-C_QMpQSR.js.map → IssueHubPage-BP0zJc1R.js.map} +1 -1
- package/ccw/frontend/dist/assets/{LiteTasksPage-CSWFdQ2-.js → LiteTasksPage-CSt2oVKQ.js} +2 -2
- package/ccw/frontend/dist/assets/{LiteTasksPage-CSWFdQ2-.js.map → LiteTasksPage-CSt2oVKQ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{McpManagerPage-Dvv8NtGy.js → McpManagerPage-B-xaMA0w.js} +2 -2
- package/ccw/frontend/dist/assets/{McpManagerPage-Dvv8NtGy.js.map → McpManagerPage-B-xaMA0w.js.map} +1 -1
- package/ccw/frontend/dist/assets/{MemoryPage-YO8WZzZO.js → MemoryPage-CJqo_7DY.js} +2 -2
- package/ccw/frontend/dist/assets/{MemoryPage-YO8WZzZO.js.map → MemoryPage-CJqo_7DY.js.map} +1 -1
- package/ccw/frontend/dist/assets/{NotFoundPage-quUJw0CD.js → NotFoundPage-ibZeQA-Y.js} +2 -2
- package/ccw/frontend/dist/assets/{NotFoundPage-quUJw0CD.js.map → NotFoundPage-ibZeQA-Y.js.map} +1 -1
- package/ccw/frontend/dist/assets/{OrchestratorPage-tuThWPID.js → OrchestratorPage-DgJ4ctPQ.js} +2 -2
- package/ccw/frontend/dist/assets/{OrchestratorPage-tuThWPID.js.map → OrchestratorPage-DgJ4ctPQ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ProjectOverviewPage-shTilwiT.js → ProjectOverviewPage-Cit0Yq0D.js} +2 -2
- package/ccw/frontend/dist/assets/{ProjectOverviewPage-shTilwiT.js.map → ProjectOverviewPage-Cit0Yq0D.js.map} +1 -1
- package/ccw/frontend/dist/assets/{PromptHistoryPage-6rQnsI8l.js → PromptHistoryPage-Ce1HDIK0.js} +2 -2
- package/ccw/frontend/dist/assets/{PromptHistoryPage-6rQnsI8l.js.map → PromptHistoryPage-Ce1HDIK0.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ReviewSessionPage-JOmzjVbT.js → ReviewSessionPage-J1KikNrk.js} +2 -2
- package/ccw/frontend/dist/assets/{ReviewSessionPage-JOmzjVbT.js.map → ReviewSessionPage-J1KikNrk.js.map} +1 -1
- package/ccw/frontend/dist/assets/{RulesManagerPage-Cayfywqi.js → RulesManagerPage-CdBjTmth.js} +2 -2
- package/ccw/frontend/dist/assets/{RulesManagerPage-Cayfywqi.js.map → RulesManagerPage-CdBjTmth.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SessionDetailPage-iMn0k84i.js → SessionDetailPage-B9ZK7LvX.js} +2 -2
- package/ccw/frontend/dist/assets/{SessionDetailPage-iMn0k84i.js.map → SessionDetailPage-B9ZK7LvX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SessionsPage-Ciqjy9kz.js → SessionsPage-CW_nS5UR.js} +2 -2
- package/ccw/frontend/dist/assets/{SessionsPage-Ciqjy9kz.js.map → SessionsPage-CW_nS5UR.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SettingsPage-BPDbXPSM.js → SettingsPage-B2PYzSoO.js} +35 -35
- package/ccw/frontend/dist/assets/SettingsPage-B2PYzSoO.js.map +1 -0
- package/ccw/frontend/dist/assets/{SkillsManagerPage-D3LzbpJY.js → SkillsManagerPage-CTnWrrwp.js} +2 -2
- package/ccw/frontend/dist/assets/{SkillsManagerPage-D3LzbpJY.js.map → SkillsManagerPage-CTnWrrwp.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SpecsSettingsPage-BpkJctzo.js → SpecsSettingsPage-DJpi9XQL.js} +2 -2
- package/ccw/frontend/dist/assets/{SpecsSettingsPage-BpkJctzo.js.map → SpecsSettingsPage-DJpi9XQL.js.map} +1 -1
- package/ccw/frontend/dist/assets/{Switch-BpB9h__9.js → Switch-Ac6Ov7uy.js} +2 -2
- package/ccw/frontend/dist/assets/{Switch-BpB9h__9.js.map → Switch-Ac6Ov7uy.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TabsNavigation-BGsKy7DO.js → TabsNavigation-DZAAspqR.js} +2 -2
- package/ccw/frontend/dist/assets/{TabsNavigation-BGsKy7DO.js.map → TabsNavigation-DZAAspqR.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TaskDrawer-bYIlbM0Q.js → TaskDrawer-BJkwfhIZ.js} +2 -2
- package/ccw/frontend/dist/assets/{TaskDrawer-bYIlbM0Q.js.map → TaskDrawer-BJkwfhIZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TeamPage-CihtQ6LQ.js → TeamPage-BJgjxBgb.js} +2 -2
- package/ccw/frontend/dist/assets/{TeamPage-CihtQ6LQ.js.map → TeamPage-BJgjxBgb.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TerminalDashboardPage-BDnNF_ud.js → TerminalDashboardPage-D1WekoOy.js} +2 -2
- package/ccw/frontend/dist/assets/{TerminalDashboardPage-BDnNF_ud.js.map → TerminalDashboardPage-D1WekoOy.js.map} +1 -1
- package/ccw/frontend/dist/assets/{archive-CQJ86bQp.js → archive-DxemgIhF.js} +2 -2
- package/ccw/frontend/dist/assets/{archive-CQJ86bQp.js.map → archive-DxemgIhF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{archive-restore-BhTfDbPU.js → archive-restore-CjS83f1V.js} +2 -2
- package/ccw/frontend/dist/assets/{archive-restore-BhTfDbPU.js.map → archive-restore-CjS83f1V.js.map} +1 -1
- package/ccw/frontend/dist/assets/{arrow-right-eUAZnT9C.js → arrow-right-B5PUcn8I.js} +2 -2
- package/ccw/frontend/dist/assets/{arrow-right-eUAZnT9C.js.map → arrow-right-B5PUcn8I.js.map} +1 -1
- package/ccw/frontend/dist/assets/{bookmark-plus-ilF5-V-k.js → bookmark-plus-DCc9aPbb.js} +2 -2
- package/ccw/frontend/dist/assets/{bookmark-plus-ilF5-V-k.js.map → bookmark-plus-DCc9aPbb.js.map} +1 -1
- package/ccw/frontend/dist/assets/{bot-BLkaQscs.js → bot-DOwFtzak.js} +2 -2
- package/ccw/frontend/dist/assets/{bot-BLkaQscs.js.map → bot-DOwFtzak.js.map} +1 -1
- package/ccw/frontend/dist/assets/{braces-D9HdgsO6.js → braces-96qH3aFh.js} +2 -2
- package/ccw/frontend/dist/assets/{braces-D9HdgsO6.js.map → braces-96qH3aFh.js.map} +1 -1
- package/ccw/frontend/dist/assets/{circle-stop-C3ZF1okQ.js → circle-stop-CCxSuil1.js} +2 -2
- package/ccw/frontend/dist/assets/{circle-stop-C3ZF1okQ.js.map → circle-stop-CCxSuil1.js.map} +1 -1
- package/ccw/frontend/dist/assets/{cpu-B-QjaSjm.js → cpu-CZNSJFdq.js} +2 -2
- package/ccw/frontend/dist/assets/{cpu-B-QjaSjm.js.map → cpu-CZNSJFdq.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ellipsis-vertical-CbNlw2gS.js → ellipsis-vertical-h8xtvw2_.js} +2 -2
- package/ccw/frontend/dist/assets/{ellipsis-vertical-CbNlw2gS.js.map → ellipsis-vertical-h8xtvw2_.js.map} +1 -1
- package/ccw/frontend/dist/assets/{eye-yAy69Cnn.js → eye-D3NY0bm6.js} +2 -2
- package/ccw/frontend/dist/assets/{eye-yAy69Cnn.js.map → eye-D3NY0bm6.js.map} +1 -1
- package/ccw/frontend/dist/assets/{eye-off-D5uzLZyP.js → eye-off-Cy2vkc8p.js} +2 -2
- package/ccw/frontend/dist/assets/{eye-off-D5uzLZyP.js.map → eye-off-Cy2vkc8p.js.map} +1 -1
- package/ccw/frontend/dist/assets/{file-json-rwo1NowL.js → file-json-Bzq3U1Mx.js} +2 -2
- package/ccw/frontend/dist/assets/{file-json-rwo1NowL.js.map → file-json-Bzq3U1Mx.js.map} +1 -1
- package/ccw/frontend/dist/assets/{file-text-DRkrjie9.js → file-text-DwuwPDPi.js} +2 -2
- package/ccw/frontend/dist/assets/{file-text-DRkrjie9.js.map → file-text-DwuwPDPi.js.map} +1 -1
- package/ccw/frontend/dist/assets/{filter-BOe-OTu1.js → filter-q9g-bknU.js} +2 -2
- package/ccw/frontend/dist/assets/{filter-BOe-OTu1.js.map → filter-q9g-bknU.js.map} +1 -1
- package/ccw/frontend/dist/assets/{folder-BaWZWn_r.js → folder-CL6vb42J.js} +2 -2
- package/ccw/frontend/dist/assets/{folder-BaWZWn_r.js.map → folder-CL6vb42J.js.map} +1 -1
- package/ccw/frontend/dist/assets/{gauge-kazFexTr.js → gauge-BkrcQBly.js} +2 -2
- package/ccw/frontend/dist/assets/{gauge-kazFexTr.js.map → gauge-BkrcQBly.js.map} +1 -1
- package/ccw/frontend/dist/assets/{globe-BuHeEjxd.js → globe-BQbwyNeV.js} +2 -2
- package/ccw/frontend/dist/assets/{globe-BuHeEjxd.js.map → globe-BQbwyNeV.js.map} +1 -1
- package/ccw/frontend/dist/assets/{grid-3x3-DbhuUu4V.js → grid-3x3-x5_7DrN7.js} +2 -2
- package/ccw/frontend/dist/assets/{grid-3x3-DbhuUu4V.js.map → grid-3x3-x5_7DrN7.js.map} +1 -1
- package/ccw/frontend/dist/assets/{hard-drive-AoLGL0z4.js → hard-drive-DTyWXwzf.js} +2 -2
- package/ccw/frontend/dist/assets/{hard-drive-AoLGL0z4.js.map → hard-drive-DTyWXwzf.js.map} +1 -1
- package/ccw/frontend/dist/assets/{hash-Dpo1exMB.js → hash-80O0kJO7.js} +2 -2
- package/ccw/frontend/dist/assets/{hash-Dpo1exMB.js.map → hash-80O0kJO7.js.map} +1 -1
- package/ccw/frontend/dist/assets/{history-ujQnmMC9.js → history-DDlN2Bwa.js} +2 -2
- package/ccw/frontend/dist/assets/{history-ujQnmMC9.js.map → history-DDlN2Bwa.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-CxzXz6o1.js → index-B9A3Hnrk.js} +2 -2
- package/ccw/frontend/dist/assets/{index-CxzXz6o1.js.map → index-B9A3Hnrk.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-B76AGix5.js → index-Bs80iCX0.js} +2 -2
- package/ccw/frontend/dist/assets/{index-B76AGix5.js.map → index-Bs80iCX0.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-C_Yf5fZ4.js → index-mbeo62f8.js} +2 -2
- package/ccw/frontend/dist/assets/{index-C_Yf5fZ4.js.map → index-mbeo62f8.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-Dff4bg3u.js → index-rLgoBCfV.js} +3 -3
- package/ccw/frontend/dist/assets/{index-Dff4bg3u.js.map → index-rLgoBCfV.js.map} +1 -1
- package/ccw/frontend/dist/assets/{layout-grid-CBdE4K8h.js → layout-grid-C1niOWJx.js} +2 -2
- package/ccw/frontend/dist/assets/{layout-grid-CBdE4K8h.js.map → layout-grid-C1niOWJx.js.map} +1 -1
- package/ccw/frontend/dist/assets/{lightbulb-B9K6ZgRp.js → lightbulb-BTmI7SUg.js} +2 -2
- package/ccw/frontend/dist/assets/{lightbulb-B9K6ZgRp.js.map → lightbulb-BTmI7SUg.js.map} +1 -1
- package/ccw/frontend/dist/assets/{link-2-Oea4xHJl.js → link-2-CB9HKeuZ.js} +2 -2
- package/ccw/frontend/dist/assets/{link-2-Oea4xHJl.js.map → link-2-CB9HKeuZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{link-5yXdZBch.js → link-koEYiemK.js} +2 -2
- package/ccw/frontend/dist/assets/{link-5yXdZBch.js.map → link-koEYiemK.js.map} +1 -1
- package/ccw/frontend/dist/assets/{list-9lHhC_U_.js → list-v2_GaLdC.js} +2 -2
- package/ccw/frontend/dist/assets/{list-9lHhC_U_.js.map → list-v2_GaLdC.js.map} +1 -1
- package/ccw/frontend/dist/assets/{map-pin-B6Io5kmB.js → map-pin-BQNfAqG_.js} +2 -2
- package/ccw/frontend/dist/assets/{map-pin-B6Io5kmB.js.map → map-pin-BQNfAqG_.js.map} +1 -1
- package/ccw/frontend/dist/assets/{messages-square-BT000aD3.js → messages-square-Dzq5LGg9.js} +2 -2
- package/ccw/frontend/dist/assets/{messages-square-BT000aD3.js.map → messages-square-Dzq5LGg9.js.map} +1 -1
- package/ccw/frontend/dist/assets/{minimize-2-DO-zbT3a.js → minimize-2-CtkoJXcz.js} +2 -2
- package/ccw/frontend/dist/assets/{minimize-2-DO-zbT3a.js.map → minimize-2-CtkoJXcz.js.map} +1 -1
- package/ccw/frontend/dist/assets/{package-BjOw1ldU.js → package-CH3smL37.js} +2 -2
- package/ccw/frontend/dist/assets/{package-BjOw1ldU.js.map → package-CH3smL37.js.map} +1 -1
- package/ccw/frontend/dist/assets/{plug-9dAARpE1.js → plug-CZ0aL_yF.js} +2 -2
- package/ccw/frontend/dist/assets/{plug-9dAARpE1.js.map → plug-CZ0aL_yF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{power-K2S39x7f.js → power-F2A_J4l6.js} +2 -2
- package/ccw/frontend/dist/assets/{power-K2S39x7f.js.map → power-F2A_J4l6.js.map} +1 -1
- package/ccw/frontend/dist/assets/{save-D9-CoT3x.js → save-Byxot0YU.js} +2 -2
- package/ccw/frontend/dist/assets/{save-D9-CoT3x.js.map → save-Byxot0YU.js.map} +1 -1
- package/ccw/frontend/dist/assets/{send-Bunw9NtC.js → send-JjqhUkpw.js} +2 -2
- package/ccw/frontend/dist/assets/{send-Bunw9NtC.js.map → send-JjqhUkpw.js.map} +1 -1
- package/ccw/frontend/dist/assets/{settings-2-osl4EXFf.js → settings-2--SuN9rAt.js} +2 -2
- package/ccw/frontend/dist/assets/{settings-2-osl4EXFf.js.map → settings-2--SuN9rAt.js.map} +1 -1
- package/ccw/frontend/dist/assets/{square-check-big-Dl5gYkjR.js → square-check-big-BbngGB2h.js} +2 -2
- package/ccw/frontend/dist/assets/{square-check-big-Dl5gYkjR.js.map → square-check-big-BbngGB2h.js.map} +1 -1
- package/ccw/frontend/dist/assets/{square-pen-Bue1chJR.js → square-pen-CgrHgZSl.js} +2 -2
- package/ccw/frontend/dist/assets/{square-pen-Bue1chJR.js.map → square-pen-CgrHgZSl.js.map} +1 -1
- package/ccw/frontend/dist/assets/{star-Bk7EC7FB.js → star-BU3TQr7Z.js} +2 -2
- package/ccw/frontend/dist/assets/{star-Bk7EC7FB.js.map → star-BU3TQr7Z.js.map} +1 -1
- package/ccw/frontend/dist/assets/{style-BbREPmRj.js → style-CKs7nnn3.js} +2 -2
- package/ccw/frontend/dist/assets/{style-BbREPmRj.js.map → style-CKs7nnn3.js.map} +1 -1
- package/ccw/frontend/dist/assets/{target-CElrCVhR.js → target-DW5tsDW6.js} +2 -2
- package/ccw/frontend/dist/assets/{target-CElrCVhR.js.map → target-DW5tsDW6.js.map} +1 -1
- package/ccw/frontend/dist/assets/{test-tube-wciJaoas.js → test-tube-BHm7w3ON.js} +2 -2
- package/ccw/frontend/dist/assets/{test-tube-wciJaoas.js.map → test-tube-BHm7w3ON.js.map} +1 -1
- package/ccw/frontend/dist/assets/{upload-BD1F07wG.js → upload-DYR7PWwt.js} +2 -2
- package/ccw/frontend/dist/assets/{upload-BD1F07wG.js.map → upload-DYR7PWwt.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useApiSettings-D23HVEt8.js → useApiSettings-D0TVgQD_.js} +2 -2
- package/ccw/frontend/dist/assets/{useApiSettings-D23HVEt8.js.map → useApiSettings-D0TVgQD_.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useCli-BGDd_lXD.js → useCli-DfY8mAP8.js} +2 -2
- package/ccw/frontend/dist/assets/{useCli-BGDd_lXD.js.map → useCli-DfY8mAP8.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useCommands-B-m_HxPB.js → useCommands-CGusDp0F.js} +2 -2
- package/ccw/frontend/dist/assets/{useCommands-B-m_HxPB.js.map → useCommands-CGusDp0F.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useDebounce-Z18-PHZr.js → useDebounce-CIwh0fF1.js} +2 -2
- package/ccw/frontend/dist/assets/{useDebounce-Z18-PHZr.js.map → useDebounce-CIwh0fF1.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useFileExplorer-D4gPp-LB.js → useFileExplorer-FMyFv39K.js} +2 -2
- package/ccw/frontend/dist/assets/{useFileExplorer-D4gPp-LB.js.map → useFileExplorer-FMyFv39K.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useLocale-DJ62jjFa.js → useLocale-B2qhsoTb.js} +2 -2
- package/ccw/frontend/dist/assets/{useLocale-DJ62jjFa.js.map → useLocale-B2qhsoTb.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useSkills-B8NPs9__.js → useSkills-cxKXMBm3.js} +3 -3
- package/ccw/frontend/dist/assets/{useSkills-B8NPs9__.js.map → useSkills-cxKXMBm3.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useSystemSettings-CVi7nKGJ.js → useSystemSettings-B-xUT_z-.js} +2 -2
- package/ccw/frontend/dist/assets/{useSystemSettings-CVi7nKGJ.js.map → useSystemSettings-B-xUT_z-.js.map} +1 -1
- package/ccw/frontend/dist/assets/{wand-sparkles-CLjPiU5w.js → wand-sparkles-DZV_3lPr.js} +2 -2
- package/ccw/frontend/dist/assets/{wand-sparkles-CLjPiU5w.js.map → wand-sparkles-DZV_3lPr.js.map} +1 -1
- package/ccw/frontend/dist/index.html +1 -1
- package/package.json +105 -105
- package/ccw/frontend/dist/assets/SettingsPage-BPDbXPSM.js.map +0 -1
package/ccw/frontend/dist/assets/{InstallationsPage--pMj0QEH.js → InstallationsPage-Bpigrbhw.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as b,r as w,j as s,e as x,R as M,c as d,C as o,M as y,K as S,b as R,I as D,aq as E,ar as Q,as as V,at as q,au as N,m as A,B as v,T as K,an as X}from"./index-
|
|
2
|
-
//# sourceMappingURL=InstallationsPage
|
|
1
|
+
import{u as b,r as w,j as s,e as x,R as M,c as d,C as o,M as y,K as S,b as R,I as D,aq as E,ar as Q,as as V,at as q,au as N,m as A,B as v,T as K,an as X}from"./index-rLgoBCfV.js";import{e as G,f as H,g as J,h as O}from"./useCli-DfY8mAP8.js";import{P as u}from"./package-CH3smL37.js";import{U as W}from"./upload-DYR7PWwt.js";import"./useLocale-B2qhsoTb.js";import"./errorSanitizer-IY9pf5g4.js";function Y({installation:e,onInstall:i,onUninstall:h,onUpgrade:c,isInstalling:f,isUninstalling:g,isUpgrading:m}){const{formatMessage:a}=b(),l={active:{icon:y,color:"text-green-600",label:"cliInstallations.status.active"},inactive:{icon:S,color:"text-muted-foreground",label:"cliInstallations.status.inactive"},error:{icon:A,color:"text-destructive",label:"cliInstallations.status.error"}}[e.status],j=l.icon,r=f||g||m;return s.jsx(o,{className:d("p-4",!e.installed&&"opacity-60"),children:s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[s.jsxs("div",{className:"flex items-start gap-3",children:[s.jsx("div",{className:d("p-2 rounded-lg",e.installed?"bg-primary/10":"bg-muted"),children:s.jsx(u,{className:d("w-5 h-5",e.installed?"text-primary":"text-muted-foreground")})}),s.jsxs("div",{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground",children:e.name}),e.version&&s.jsxs(v,{variant:"outline",className:"text-xs",children:["v",e.version]}),s.jsxs(v,{variant:"outline",className:d("text-xs",l.color),children:[s.jsx(j,{className:"w-3 h-3 mr-1"}),a({id:l.label})]}),e.installed&&s.jsx(v,{variant:"outline",className:"text-xs text-green-600",children:a({id:"cliInstallations.installed"})})]}),e.path&&s.jsx("p",{className:"text-xs text-muted-foreground mt-1 font-mono",children:e.path}),e.lastChecked&&s.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[a({id:"cliInstallations.lastChecked"}),": ",new Date(e.lastChecked).toLocaleString()]})]})]}),s.jsx("div",{className:"flex items-center gap-2",children:e.installed?s.jsxs(s.Fragment,{children:[s.jsxs(x,{variant:"outline",size:"sm",onClick:()=>c(e.name),disabled:r,children:[s.jsx(W,{className:"w-4 h-4 mr-1"}),a({id:"cliInstallations.actions.upgrade"})]}),s.jsxs(x,{variant:"outline",size:"sm",onClick:()=>h(e.name),disabled:r,className:"text-destructive hover:text-destructive",children:[s.jsx(K,{className:"w-4 h-4 mr-1"}),a({id:"cliInstallations.actions.uninstall"})]})]}):s.jsxs(x,{variant:"default",size:"sm",onClick:()=>i(e.name),disabled:r,children:[s.jsx(X,{className:"w-4 h-4 mr-1"}),a({id:"cliInstallations.actions.install"})]})})]})})}function as(){const{formatMessage:e}=b(),[i,h]=w.useState(""),[c,f]=w.useState("all"),{installations:g,totalCount:m,installedCount:a,isLoading:I,isFetching:l,refetch:j}=G(),{installTool:r,isInstalling:U}=H(),{uninstallTool:k,isUninstalling:T}=J(),{upgradeTool:L,isUpgrading:B}=O(),F=t=>{r(t)},P=t=>{confirm(e({id:"cliInstallations.uninstallConfirm"},{name:t}))&&k(t)},z=t=>{L(t)},C=(()=>{let t=g;if(c==="installed"?t=t.filter(n=>n.installed):c==="not-installed"&&(t=t.filter(n=>!n.installed)),i){const n=i.toLowerCase();t=t.filter(p=>p.name.toLowerCase().includes(n)||p.version&&p.version.toLowerCase().includes(n))}return t})();return s.jsxs("div",{className:"space-y-6",children:[s.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4",children:[s.jsxs("div",{children:[s.jsxs("h1",{className:"text-2xl font-bold text-foreground flex items-center gap-2",children:[s.jsx(u,{className:"w-6 h-6 text-primary"}),e({id:"cliInstallations.title"})]}),s.jsx("p",{className:"text-muted-foreground mt-1",children:e({id:"cliInstallations.description"})})]}),s.jsxs(x,{variant:"outline",onClick:()=>j(),disabled:l,children:[s.jsx(M,{className:d("w-4 h-4 mr-2",l&&"animate-spin")}),e({id:"common.actions.refresh"})]})]}),s.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[s.jsxs(o,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(u,{className:"w-5 h-5 text-primary"}),s.jsx("span",{className:"text-2xl font-bold",children:m})]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"cliInstallations.stats.total"})})]}),s.jsxs(o,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(y,{className:"w-5 h-5 text-green-600"}),s.jsx("span",{className:"text-2xl font-bold",children:a})]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"cliInstallations.stats.installed"})})]}),s.jsxs(o,{className:"p-4",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx(S,{className:"w-5 h-5 text-muted-foreground"}),s.jsx("span",{className:"text-2xl font-bold",children:m-a})]}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"cliInstallations.stats.available"})})]})]}),s.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[s.jsxs("div",{className:"relative flex-1",children:[s.jsx(R,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),s.jsx(D,{placeholder:e({id:"cliInstallations.filters.searchPlaceholder"}),value:i,onChange:t=>h(t.target.value),className:"pl-9"})]}),s.jsxs(E,{value:c,onValueChange:t=>f(t),children:[s.jsx(Q,{className:"w-[180px]",children:s.jsx(V,{placeholder:e({id:"cliInstallations.filters.status"})})}),s.jsxs(q,{children:[s.jsx(N,{value:"all",children:e({id:"cliInstallations.filters.all"})}),s.jsx(N,{value:"installed",children:e({id:"cliInstallations.filters.installed"})}),s.jsx(N,{value:"not-installed",children:e({id:"cliInstallations.filters.notInstalled"})})]})]})]}),I?s.jsx("div",{className:"space-y-3",children:[1,2,3,4].map(t=>s.jsx("div",{className:"h-20 bg-muted animate-pulse rounded-lg"},t))}):C.length===0?s.jsxs(o,{className:"p-8 text-center",children:[s.jsx(u,{className:"w-12 h-12 mx-auto text-muted-foreground/50"}),s.jsx("h3",{className:"mt-4 text-lg font-medium text-foreground",children:e({id:"cliInstallations.emptyState.title"})}),s.jsx("p",{className:"mt-2 text-muted-foreground",children:e({id:"cliInstallations.emptyState.message"})})]}):s.jsx("div",{className:"space-y-3",children:C.map(t=>s.jsx(Y,{installation:t,onInstall:F,onUninstall:P,onUpgrade:z,isInstalling:U,isUninstalling:T,isUpgrading:B},t.name))})]})}export{as as InstallationsPage,as as default};
|
|
2
|
+
//# sourceMappingURL=InstallationsPage-Bpigrbhw.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstallationsPage--pMj0QEH.js","sources":["../../src/pages/InstallationsPage.tsx"],"sourcesContent":["// ========================================\n// CLI Installations Page\n// ========================================\n// Manage CCW CLI tool installations (install, upgrade, uninstall)\n\nimport { useState } from 'react';\nimport { useIntl } from 'react-intl';\nimport {\n Download,\n Upload,\n Trash2,\n Search,\n RefreshCw,\n CheckCircle,\n XCircle,\n AlertCircle,\n Package,\n} from 'lucide-react';\nimport { Card } from '@/components/ui/Card';\nimport { Button } from '@/components/ui/Button';\nimport { Input } from '@/components/ui/Input';\nimport { Badge } from '@/components/ui/Badge';\nimport { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@/components/ui/Select';\nimport {\n useCliInstallations,\n useInstallCliTool,\n useUninstallCliTool,\n useUpgradeCliTool,\n} from '@/hooks';\nimport type { CliInstallation } from '@/lib/api';\nimport { cn } from '@/lib/utils';\n\n// ========== Installation Card Component ==========\n\ninterface InstallationCardProps {\n installation: CliInstallation;\n onInstall: (toolName: string) => void;\n onUninstall: (toolName: string) => void;\n onUpgrade: (toolName: string) => void;\n isInstalling: boolean;\n isUninstalling: boolean;\n isUpgrading: boolean;\n}\n\nfunction InstallationCard({\n installation,\n onInstall,\n onUninstall,\n onUpgrade,\n isInstalling,\n isUninstalling,\n isUpgrading,\n}: InstallationCardProps) {\n const { formatMessage } = useIntl();\n\n const statusConfig = {\n active: { icon: CheckCircle, color: 'text-green-600', label: 'cliInstallations.status.active' },\n inactive: { icon: XCircle, color: 'text-muted-foreground', label: 'cliInstallations.status.inactive' },\n error: { icon: AlertCircle, color: 'text-destructive', label: 'cliInstallations.status.error' },\n };\n\n const config = statusConfig[installation.status];\n const StatusIcon = config.icon;\n\n const isLoading = isInstalling || isUninstalling || isUpgrading;\n\n return (\n <Card className={cn('p-4', !installation.installed && 'opacity-60')}>\n <div className=\"flex items-start justify-between gap-4\">\n <div className=\"flex items-start gap-3\">\n <div className={cn(\n 'p-2 rounded-lg',\n installation.installed ? 'bg-primary/10' : 'bg-muted'\n )}>\n <Package className={cn(\n 'w-5 h-5',\n installation.installed ? 'text-primary' : 'text-muted-foreground'\n )} />\n </div>\n <div>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-medium text-foreground\">\n {installation.name}\n </span>\n {installation.version && (\n <Badge variant=\"outline\" className=\"text-xs\">\n v{installation.version}\n </Badge>\n )}\n <Badge variant=\"outline\" className={cn('text-xs', config.color)}>\n <StatusIcon className=\"w-3 h-3 mr-1\" />\n {formatMessage({ id: config.label })}\n </Badge>\n {installation.installed && (\n <Badge variant=\"outline\" className=\"text-xs text-green-600\">\n {formatMessage({ id: 'cliInstallations.installed' })}\n </Badge>\n )}\n </div>\n {installation.path && (\n <p className=\"text-xs text-muted-foreground mt-1 font-mono\">\n {installation.path}\n </p>\n )}\n {installation.lastChecked && (\n <p className=\"text-xs text-muted-foreground mt-1\">\n {formatMessage({ id: 'cliInstallations.lastChecked' })}: {new Date(installation.lastChecked).toLocaleString()}\n </p>\n )}\n </div>\n </div>\n\n <div className=\"flex items-center gap-2\">\n {installation.installed ? (\n <>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onUpgrade(installation.name)}\n disabled={isLoading}\n >\n <Upload className=\"w-4 h-4 mr-1\" />\n {formatMessage({ id: 'cliInstallations.actions.upgrade' })}\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onUninstall(installation.name)}\n disabled={isLoading}\n className=\"text-destructive hover:text-destructive\"\n >\n <Trash2 className=\"w-4 h-4 mr-1\" />\n {formatMessage({ id: 'cliInstallations.actions.uninstall' })}\n </Button>\n </>\n ) : (\n <Button\n variant=\"default\"\n size=\"sm\"\n onClick={() => onInstall(installation.name)}\n disabled={isLoading}\n >\n <Download className=\"w-4 h-4 mr-1\" />\n {formatMessage({ id: 'cliInstallations.actions.install' })}\n </Button>\n )}\n </div>\n </div>\n </Card>\n );\n}\n\n// ========== Main Page Component ==========\n\nexport function InstallationsPage() {\n const { formatMessage } = useIntl();\n const [searchQuery, setSearchQuery] = useState('');\n const [statusFilter, setStatusFilter] = useState<'all' | 'installed' | 'not-installed'>('all');\n\n const {\n installations,\n totalCount,\n installedCount,\n isLoading,\n isFetching,\n refetch,\n } = useCliInstallations();\n\n const { installTool, isInstalling } = useInstallCliTool();\n const { uninstallTool, isUninstalling } = useUninstallCliTool();\n const { upgradeTool, isUpgrading } = useUpgradeCliTool();\n\n const handleInstall = (toolName: string) => {\n installTool(toolName);\n };\n\n const handleUninstall = (toolName: string) => {\n if (confirm(formatMessage({ id: 'cliInstallations.uninstallConfirm' }, { name: toolName }))) {\n uninstallTool(toolName);\n }\n };\n\n const handleUpgrade = (toolName: string) => {\n upgradeTool(toolName);\n };\n\n // Filter installations by search query and status\n const filteredInstallations = (() => {\n let filtered = installations;\n\n if (statusFilter === 'installed') {\n filtered = filtered.filter((i) => i.installed);\n } else if (statusFilter === 'not-installed') {\n filtered = filtered.filter((i) => !i.installed);\n }\n\n if (searchQuery) {\n const searchLower = searchQuery.toLowerCase();\n filtered = filtered.filter((i) =>\n i.name.toLowerCase().includes(searchLower) ||\n (i.version && i.version.toLowerCase().includes(searchLower))\n );\n }\n\n return filtered;\n })();\n\n return (\n <div className=\"space-y-6\">\n {/* Page Header */}\n <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4\">\n <div>\n <h1 className=\"text-2xl font-bold text-foreground flex items-center gap-2\">\n <Package className=\"w-6 h-6 text-primary\" />\n {formatMessage({ id: 'cliInstallations.title' })}\n </h1>\n <p className=\"text-muted-foreground mt-1\">\n {formatMessage({ id: 'cliInstallations.description' })}\n </p>\n </div>\n <Button variant=\"outline\" onClick={() => refetch()} disabled={isFetching}>\n <RefreshCw className={cn('w-4 h-4 mr-2', isFetching && 'animate-spin')} />\n {formatMessage({ id: 'common.actions.refresh' })}\n </Button>\n </div>\n\n {/* Stats Cards */}\n <div className=\"grid grid-cols-2 md:grid-cols-3 gap-4\">\n <Card className=\"p-4\">\n <div className=\"flex items-center gap-2\">\n <Package className=\"w-5 h-5 text-primary\" />\n <span className=\"text-2xl font-bold\">{totalCount}</span>\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">{formatMessage({ id: 'cliInstallations.stats.total' })}</p>\n </Card>\n <Card className=\"p-4\">\n <div className=\"flex items-center gap-2\">\n <CheckCircle className=\"w-5 h-5 text-green-600\" />\n <span className=\"text-2xl font-bold\">{installedCount}</span>\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">{formatMessage({ id: 'cliInstallations.stats.installed' })}</p>\n </Card>\n <Card className=\"p-4\">\n <div className=\"flex items-center gap-2\">\n <XCircle className=\"w-5 h-5 text-muted-foreground\" />\n <span className=\"text-2xl font-bold\">{totalCount - installedCount}</span>\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">{formatMessage({ id: 'cliInstallations.stats.available' })}</p>\n </Card>\n </div>\n\n {/* Filters and Search */}\n <div className=\"flex flex-col sm:flex-row gap-3\">\n <div className=\"relative flex-1\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground\" />\n <Input\n placeholder={formatMessage({ id: 'cliInstallations.filters.searchPlaceholder' })}\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"pl-9\"\n />\n </div>\n <Select value={statusFilter} onValueChange={(v: typeof statusFilter) => setStatusFilter(v)}>\n <SelectTrigger className=\"w-[180px]\">\n <SelectValue placeholder={formatMessage({ id: 'cliInstallations.filters.status' })} />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">{formatMessage({ id: 'cliInstallations.filters.all' })}</SelectItem>\n <SelectItem value=\"installed\">{formatMessage({ id: 'cliInstallations.filters.installed' })}</SelectItem>\n <SelectItem value=\"not-installed\">{formatMessage({ id: 'cliInstallations.filters.notInstalled' })}</SelectItem>\n </SelectContent>\n </Select>\n </div>\n\n {/* Installations List */}\n {isLoading ? (\n <div className=\"space-y-3\">\n {[1, 2, 3, 4].map((i) => (\n <div key={i} className=\"h-20 bg-muted animate-pulse rounded-lg\" />\n ))}\n </div>\n ) : filteredInstallations.length === 0 ? (\n <Card className=\"p-8 text-center\">\n <Package className=\"w-12 h-12 mx-auto text-muted-foreground/50\" />\n <h3 className=\"mt-4 text-lg font-medium text-foreground\">{formatMessage({ id: 'cliInstallations.emptyState.title' })}</h3>\n <p className=\"mt-2 text-muted-foreground\">\n {formatMessage({ id: 'cliInstallations.emptyState.message' })}\n </p>\n </Card>\n ) : (\n <div className=\"space-y-3\">\n {filteredInstallations.map((installation) => (\n <InstallationCard\n key={installation.name}\n installation={installation}\n onInstall={handleInstall}\n onUninstall={handleUninstall}\n onUpgrade={handleUpgrade}\n isInstalling={isInstalling}\n isUninstalling={isUninstalling}\n isUpgrading={isUpgrading}\n />\n ))}\n </div>\n )}\n </div>\n );\n}\n\nexport default InstallationsPage;\n"],"names":["InstallationCard","installation","onInstall","onUninstall","onUpgrade","isInstalling","isUninstalling","isUpgrading","formatMessage","useIntl","config","CheckCircle","XCircle","AlertCircle","StatusIcon","isLoading","jsx","Card","cn","jsxs","Package","Badge","Fragment","Button","Upload","Trash2","Download","InstallationsPage","searchQuery","setSearchQuery","useState","statusFilter","setStatusFilter","installations","totalCount","installedCount","isFetching","refetch","useCliInstallations","installTool","useInstallCliTool","uninstallTool","useUninstallCliTool","upgradeTool","useUpgradeCliTool","handleInstall","toolName","handleUninstall","handleUpgrade","filteredInstallations","filtered","i","searchLower","RefreshCw","Search","Input","e","Select","v","SelectTrigger","SelectValue","SelectContent","SelectItem"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"InstallationsPage-Bpigrbhw.js","sources":["../../src/pages/InstallationsPage.tsx"],"sourcesContent":["// ========================================\n// CLI Installations Page\n// ========================================\n// Manage CCW CLI tool installations (install, upgrade, uninstall)\n\nimport { useState } from 'react';\nimport { useIntl } from 'react-intl';\nimport {\n Download,\n Upload,\n Trash2,\n Search,\n RefreshCw,\n CheckCircle,\n XCircle,\n AlertCircle,\n Package,\n} from 'lucide-react';\nimport { Card } from '@/components/ui/Card';\nimport { Button } from '@/components/ui/Button';\nimport { Input } from '@/components/ui/Input';\nimport { Badge } from '@/components/ui/Badge';\nimport { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@/components/ui/Select';\nimport {\n useCliInstallations,\n useInstallCliTool,\n useUninstallCliTool,\n useUpgradeCliTool,\n} from '@/hooks';\nimport type { CliInstallation } from '@/lib/api';\nimport { cn } from '@/lib/utils';\n\n// ========== Installation Card Component ==========\n\ninterface InstallationCardProps {\n installation: CliInstallation;\n onInstall: (toolName: string) => void;\n onUninstall: (toolName: string) => void;\n onUpgrade: (toolName: string) => void;\n isInstalling: boolean;\n isUninstalling: boolean;\n isUpgrading: boolean;\n}\n\nfunction InstallationCard({\n installation,\n onInstall,\n onUninstall,\n onUpgrade,\n isInstalling,\n isUninstalling,\n isUpgrading,\n}: InstallationCardProps) {\n const { formatMessage } = useIntl();\n\n const statusConfig = {\n active: { icon: CheckCircle, color: 'text-green-600', label: 'cliInstallations.status.active' },\n inactive: { icon: XCircle, color: 'text-muted-foreground', label: 'cliInstallations.status.inactive' },\n error: { icon: AlertCircle, color: 'text-destructive', label: 'cliInstallations.status.error' },\n };\n\n const config = statusConfig[installation.status];\n const StatusIcon = config.icon;\n\n const isLoading = isInstalling || isUninstalling || isUpgrading;\n\n return (\n <Card className={cn('p-4', !installation.installed && 'opacity-60')}>\n <div className=\"flex items-start justify-between gap-4\">\n <div className=\"flex items-start gap-3\">\n <div className={cn(\n 'p-2 rounded-lg',\n installation.installed ? 'bg-primary/10' : 'bg-muted'\n )}>\n <Package className={cn(\n 'w-5 h-5',\n installation.installed ? 'text-primary' : 'text-muted-foreground'\n )} />\n </div>\n <div>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-sm font-medium text-foreground\">\n {installation.name}\n </span>\n {installation.version && (\n <Badge variant=\"outline\" className=\"text-xs\">\n v{installation.version}\n </Badge>\n )}\n <Badge variant=\"outline\" className={cn('text-xs', config.color)}>\n <StatusIcon className=\"w-3 h-3 mr-1\" />\n {formatMessage({ id: config.label })}\n </Badge>\n {installation.installed && (\n <Badge variant=\"outline\" className=\"text-xs text-green-600\">\n {formatMessage({ id: 'cliInstallations.installed' })}\n </Badge>\n )}\n </div>\n {installation.path && (\n <p className=\"text-xs text-muted-foreground mt-1 font-mono\">\n {installation.path}\n </p>\n )}\n {installation.lastChecked && (\n <p className=\"text-xs text-muted-foreground mt-1\">\n {formatMessage({ id: 'cliInstallations.lastChecked' })}: {new Date(installation.lastChecked).toLocaleString()}\n </p>\n )}\n </div>\n </div>\n\n <div className=\"flex items-center gap-2\">\n {installation.installed ? (\n <>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onUpgrade(installation.name)}\n disabled={isLoading}\n >\n <Upload className=\"w-4 h-4 mr-1\" />\n {formatMessage({ id: 'cliInstallations.actions.upgrade' })}\n </Button>\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => onUninstall(installation.name)}\n disabled={isLoading}\n className=\"text-destructive hover:text-destructive\"\n >\n <Trash2 className=\"w-4 h-4 mr-1\" />\n {formatMessage({ id: 'cliInstallations.actions.uninstall' })}\n </Button>\n </>\n ) : (\n <Button\n variant=\"default\"\n size=\"sm\"\n onClick={() => onInstall(installation.name)}\n disabled={isLoading}\n >\n <Download className=\"w-4 h-4 mr-1\" />\n {formatMessage({ id: 'cliInstallations.actions.install' })}\n </Button>\n )}\n </div>\n </div>\n </Card>\n );\n}\n\n// ========== Main Page Component ==========\n\nexport function InstallationsPage() {\n const { formatMessage } = useIntl();\n const [searchQuery, setSearchQuery] = useState('');\n const [statusFilter, setStatusFilter] = useState<'all' | 'installed' | 'not-installed'>('all');\n\n const {\n installations,\n totalCount,\n installedCount,\n isLoading,\n isFetching,\n refetch,\n } = useCliInstallations();\n\n const { installTool, isInstalling } = useInstallCliTool();\n const { uninstallTool, isUninstalling } = useUninstallCliTool();\n const { upgradeTool, isUpgrading } = useUpgradeCliTool();\n\n const handleInstall = (toolName: string) => {\n installTool(toolName);\n };\n\n const handleUninstall = (toolName: string) => {\n if (confirm(formatMessage({ id: 'cliInstallations.uninstallConfirm' }, { name: toolName }))) {\n uninstallTool(toolName);\n }\n };\n\n const handleUpgrade = (toolName: string) => {\n upgradeTool(toolName);\n };\n\n // Filter installations by search query and status\n const filteredInstallations = (() => {\n let filtered = installations;\n\n if (statusFilter === 'installed') {\n filtered = filtered.filter((i) => i.installed);\n } else if (statusFilter === 'not-installed') {\n filtered = filtered.filter((i) => !i.installed);\n }\n\n if (searchQuery) {\n const searchLower = searchQuery.toLowerCase();\n filtered = filtered.filter((i) =>\n i.name.toLowerCase().includes(searchLower) ||\n (i.version && i.version.toLowerCase().includes(searchLower))\n );\n }\n\n return filtered;\n })();\n\n return (\n <div className=\"space-y-6\">\n {/* Page Header */}\n <div className=\"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4\">\n <div>\n <h1 className=\"text-2xl font-bold text-foreground flex items-center gap-2\">\n <Package className=\"w-6 h-6 text-primary\" />\n {formatMessage({ id: 'cliInstallations.title' })}\n </h1>\n <p className=\"text-muted-foreground mt-1\">\n {formatMessage({ id: 'cliInstallations.description' })}\n </p>\n </div>\n <Button variant=\"outline\" onClick={() => refetch()} disabled={isFetching}>\n <RefreshCw className={cn('w-4 h-4 mr-2', isFetching && 'animate-spin')} />\n {formatMessage({ id: 'common.actions.refresh' })}\n </Button>\n </div>\n\n {/* Stats Cards */}\n <div className=\"grid grid-cols-2 md:grid-cols-3 gap-4\">\n <Card className=\"p-4\">\n <div className=\"flex items-center gap-2\">\n <Package className=\"w-5 h-5 text-primary\" />\n <span className=\"text-2xl font-bold\">{totalCount}</span>\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">{formatMessage({ id: 'cliInstallations.stats.total' })}</p>\n </Card>\n <Card className=\"p-4\">\n <div className=\"flex items-center gap-2\">\n <CheckCircle className=\"w-5 h-5 text-green-600\" />\n <span className=\"text-2xl font-bold\">{installedCount}</span>\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">{formatMessage({ id: 'cliInstallations.stats.installed' })}</p>\n </Card>\n <Card className=\"p-4\">\n <div className=\"flex items-center gap-2\">\n <XCircle className=\"w-5 h-5 text-muted-foreground\" />\n <span className=\"text-2xl font-bold\">{totalCount - installedCount}</span>\n </div>\n <p className=\"text-sm text-muted-foreground mt-1\">{formatMessage({ id: 'cliInstallations.stats.available' })}</p>\n </Card>\n </div>\n\n {/* Filters and Search */}\n <div className=\"flex flex-col sm:flex-row gap-3\">\n <div className=\"relative flex-1\">\n <Search className=\"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground\" />\n <Input\n placeholder={formatMessage({ id: 'cliInstallations.filters.searchPlaceholder' })}\n value={searchQuery}\n onChange={(e) => setSearchQuery(e.target.value)}\n className=\"pl-9\"\n />\n </div>\n <Select value={statusFilter} onValueChange={(v: typeof statusFilter) => setStatusFilter(v)}>\n <SelectTrigger className=\"w-[180px]\">\n <SelectValue placeholder={formatMessage({ id: 'cliInstallations.filters.status' })} />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value=\"all\">{formatMessage({ id: 'cliInstallations.filters.all' })}</SelectItem>\n <SelectItem value=\"installed\">{formatMessage({ id: 'cliInstallations.filters.installed' })}</SelectItem>\n <SelectItem value=\"not-installed\">{formatMessage({ id: 'cliInstallations.filters.notInstalled' })}</SelectItem>\n </SelectContent>\n </Select>\n </div>\n\n {/* Installations List */}\n {isLoading ? (\n <div className=\"space-y-3\">\n {[1, 2, 3, 4].map((i) => (\n <div key={i} className=\"h-20 bg-muted animate-pulse rounded-lg\" />\n ))}\n </div>\n ) : filteredInstallations.length === 0 ? (\n <Card className=\"p-8 text-center\">\n <Package className=\"w-12 h-12 mx-auto text-muted-foreground/50\" />\n <h3 className=\"mt-4 text-lg font-medium text-foreground\">{formatMessage({ id: 'cliInstallations.emptyState.title' })}</h3>\n <p className=\"mt-2 text-muted-foreground\">\n {formatMessage({ id: 'cliInstallations.emptyState.message' })}\n </p>\n </Card>\n ) : (\n <div className=\"space-y-3\">\n {filteredInstallations.map((installation) => (\n <InstallationCard\n key={installation.name}\n installation={installation}\n onInstall={handleInstall}\n onUninstall={handleUninstall}\n onUpgrade={handleUpgrade}\n isInstalling={isInstalling}\n isUninstalling={isUninstalling}\n isUpgrading={isUpgrading}\n />\n ))}\n </div>\n )}\n </div>\n );\n}\n\nexport default InstallationsPage;\n"],"names":["InstallationCard","installation","onInstall","onUninstall","onUpgrade","isInstalling","isUninstalling","isUpgrading","formatMessage","useIntl","config","CheckCircle","XCircle","AlertCircle","StatusIcon","isLoading","jsx","Card","cn","jsxs","Package","Badge","Fragment","Button","Upload","Trash2","Download","InstallationsPage","searchQuery","setSearchQuery","useState","statusFilter","setStatusFilter","installations","totalCount","installedCount","isFetching","refetch","useCliInstallations","installTool","useInstallCliTool","uninstallTool","useUninstallCliTool","upgradeTool","useUpgradeCliTool","handleInstall","toolName","handleUninstall","handleUpgrade","filteredInstallations","filtered","i","searchLower","RefreshCw","Search","Input","e","Select","v","SelectTrigger","SelectValue","SelectContent","SelectItem"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{O as tt,a9 as st,aa as rt,b2 as Ft,r as b,b3 as Vs,b4 as ts,u as z,j as r,m as Se,e as T,c as M,C as _,D as xi,d as bi,f as vi,g as lt,l as je,M as ce,T as Kr,B,b5 as hs,av as ss,aw as nt,K as xs,N as ie,b6 as Qr,ad as rs,X as bs,a2 as It,a3 as Dt,a4 as oe,aP as Te,a5 as ae,ak as yi,b7 as Yr,b8 as ji,b9 as Ni,aG as Q,ba as wi,bb as Jr,bc as Ct,bd as Xr,b as Zr,I as Et,aq as fe,ar as ge,as as he,at as xe,au as L,ai as Si,ap as Ii,ao as Di,be as Ci,a1 as Hs,x as ns,y as is,z as os,A as as,G as Us,bf as Ei,k as Ai,bg as en,a as Pi,n as Ri,bh as Oi,R as He,a7 as vs,a$ as Ti,bi as Mi,bj as Bi,bk as Li,aW as ki,bl as _i,aX as zs,a_ as Ks,bm as ys,bn as Fi,bo as Gi,bp as tn,aR as $i,bq as Qs,af as Wi,an as qi,a8 as Vi,br as Hi,bs as Ui,al as zi,o as Ys,s as Ki,bt as Qi,bu as $e,bv as Yi}from"./index-
|
|
1
|
+
import{O as tt,a9 as st,aa as rt,b2 as Ft,r as b,b3 as Vs,b4 as ts,u as z,j as r,m as Se,e as T,c as M,C as _,D as xi,d as bi,f as vi,g as lt,l as je,M as ce,T as Kr,B,b5 as hs,av as ss,aw as nt,K as xs,N as ie,b6 as Qr,ad as rs,X as bs,a2 as It,a3 as Dt,a4 as oe,aP as Te,a5 as ae,ak as yi,b7 as Yr,b8 as ji,b9 as Ni,aG as Q,ba as wi,bb as Jr,bc as Ct,bd as Xr,b as Zr,I as Et,aq as fe,ar as ge,as as he,at as xe,au as L,ai as Si,ap as Ii,ao as Di,be as Ci,a1 as Hs,x as ns,y as is,z as os,A as as,G as Us,bf as Ei,k as Ai,bg as en,a as Pi,n as Ri,bh as Oi,R as He,a7 as vs,a$ as Ti,bi as Mi,bj as Bi,bk as Li,aW as ki,bl as _i,aX as zs,a_ as Ks,bm as ys,bn as Fi,bo as Gi,bp as tn,aR as $i,bq as Qs,af as Wi,an as qi,a8 as Vi,br as Hi,bs as Ui,al as zi,o as Ys,s as Ki,bt as Qi,bu as $e,bv as Yi}from"./index-rLgoBCfV.js";import{L as At}from"./layout-grid-C1niOWJx.js";import{E as Ji}from"./ellipsis-vertical-h8xtvw2_.js";import{S as Xi}from"./square-pen-CgrHgZSl.js";import{F as Pe}from"./file-text-DwuwPDPi.js";import{H as Js}from"./history-DDlN2Bwa.js";import{H as Zi}from"./hash-80O0kJO7.js";import{L as eo}from"./list-v2_GaLdC.js";import{A as to}from"./arrow-right-B5PUcn8I.js";import{A as so,a as ro,b as no,c as io,d as oo,e as ao,f as lo,g as co}from"./AlertDialog-BjP1ydDR.js";import{M as uo}from"./map-pin-BQNfAqG_.js";import{L as mo}from"./lightbulb-BTmI7SUg.js";import{T as po}from"./target-DW5tsDW6.js";import{U as fo}from"./upload-DYR7PWwt.js";import{M as go,a as ho}from"./minimize-2-CtkoJXcz.js";/**
|
|
2
2
|
* @license lucide-react v0.460.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -90,4 +90,4 @@ ${we.current.stack}
|
|
|
90
90
|
overflow-anchor: none;
|
|
91
91
|
`}}];return{always:qe(a,"always"),resting:qe(a,"resting"),dragging:qe(a,"dragging"),dropAnimating:qe(a,"dropAnimating"),userCancel:qe(a,"userCancel")}};const ue=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?b.useLayoutEffect:b.useEffect,Yt=()=>{const e=document.querySelector("head");return e||S(),e},Mr=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Xc(e,t){const s=F(()=>Jc(e),[e]),n=b.useRef(null),i=b.useRef(null),o=R(J(u=>{const p=i.current;p||S(),p.textContent=u}),[]),a=R(u=>{const p=n.current;p||S(),p.textContent=u},[]);ue(()=>{!n.current&&!i.current||S();const u=Mr(t),p=Mr(t);return n.current=u,i.current=p,u.setAttribute(`${Be}-always`,e),p.setAttribute(`${Be}-dynamic`,e),Yt().appendChild(u),Yt().appendChild(p),a(s.always),o(s.resting),()=>{const f=h=>{const g=h.current;g||S(),Yt().removeChild(g),h.current=null};f(n),f(i)}},[t,a,o,s.always,s.resting,e]);const l=R(()=>o(s.dragging),[o,s.dragging]),d=R(u=>{if(u==="DROP"){o(s.dropAnimating);return}o(s.userCancel)},[o,s.dropAnimating,s.userCancel]),c=R(()=>{i.current&&o(s.resting)},[o,s.resting]);return F(()=>({dragging:l,dropping:d,resting:c}),[l,d,c])}function Zn(e,t){return Array.from(e.querySelectorAll(t))}var ei=e=>e&&e.ownerDocument&&e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;function Mt(e){return e instanceof ei(e).HTMLElement}function Zc(e,t){const s=`[${Le.contextId}="${e}"]`,n=Zn(document,s);if(!n.length)return null;const i=n.find(o=>o.getAttribute(Le.draggableId)===t);return!i||!Mt(i)?null:i}function ed(e){const t=b.useRef({}),s=b.useRef(null),n=b.useRef(null),i=b.useRef(!1),o=R(function(p,f){const h={id:p,focus:f};return t.current[p]=h,function(){const x=t.current;x[p]!==h&&delete x[p]}},[]),a=R(function(p){const f=Zc(e,p);f&&f!==document.activeElement&&f.focus()},[e]),l=R(function(p,f){s.current===p&&(s.current=f)},[]),d=R(function(){n.current||i.current&&(n.current=requestAnimationFrame(()=>{n.current=null;const p=s.current;p&&a(p)}))},[a]),c=R(function(p){s.current=null;const f=document.activeElement;f&&f.getAttribute(Le.draggableId)===p&&(s.current=p)},[]);return ue(()=>(i.current=!0,function(){i.current=!1;const p=n.current;p&&cancelAnimationFrame(p)}),[]),F(()=>({register:o,tryRecordFocus:c,tryRestoreFocusRecorded:d,tryShiftRecord:l}),[o,c,d,l])}function td(){const e={draggables:{},droppables:{}},t=[];function s(u){return t.push(u),function(){const f=t.indexOf(u);f!==-1&&t.splice(f,1)}}function n(u){t.length&&t.forEach(p=>p(u))}function i(u){return e.draggables[u]||null}function o(u){const p=i(u);return p||S(),p}const a={register:u=>{e.draggables[u.descriptor.id]=u,n({type:"ADDITION",value:u})},update:(u,p)=>{const f=e.draggables[p.descriptor.id];f&&f.uniqueId===u.uniqueId&&(delete e.draggables[p.descriptor.id],e.draggables[u.descriptor.id]=u)},unregister:u=>{const p=u.descriptor.id,f=i(p);f&&u.uniqueId===f.uniqueId&&(delete e.draggables[p],e.droppables[u.descriptor.droppableId]&&n({type:"REMOVAL",value:u}))},getById:o,findById:i,exists:u=>!!i(u),getAllByType:u=>Object.values(e.draggables).filter(p=>p.descriptor.type===u)};function l(u){return e.droppables[u]||null}function d(u){const p=l(u);return p||S(),p}const c={register:u=>{e.droppables[u.descriptor.id]=u},unregister:u=>{const p=l(u.descriptor.id);p&&u.uniqueId===p.uniqueId&&delete e.droppables[u.descriptor.id]},getById:d,findById:l,exists:u=>!!l(u),getAllByType:u=>Object.values(e.droppables).filter(p=>p.descriptor.type===u)};function m(){e.draggables={},e.droppables={},t.length=0}return{draggable:a,droppable:c,subscribe:s,clean:m}}function sd(){const e=F(td,[]);return b.useEffect(()=>function(){e.clean()},[e]),e}var Fs=Q.createContext(null),wt=()=>{const e=document.body;return e||S(),e};const rd={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"},nd=e=>`rfd-announcement-${e}`;function id(e){const t=F(()=>nd(e),[e]),s=b.useRef(null);return b.useEffect(function(){const o=document.createElement("div");return s.current=o,o.id=t,o.setAttribute("aria-live","assertive"),o.setAttribute("aria-atomic","true"),ht(o.style,rd),wt().appendChild(o),function(){setTimeout(function(){const d=wt();d.contains(o)&&d.removeChild(o),o===s.current&&(s.current=null)})}},[t]),R(i=>{const o=s.current;if(o){o.textContent=i;return}},[])}const od={separator:"::"};function Gs(e,t=od){const s=Q.useId();return F(()=>`${e}${t.separator}${s}`,[t.separator,e,s])}function ad({contextId:e,uniqueId:t}){return`rfd-hidden-text-${e}-${t}`}function ld({contextId:e,text:t}){const s=Gs("hidden-text",{separator:"-"}),n=F(()=>ad({contextId:e,uniqueId:s}),[s,e]);return b.useEffect(function(){const o=document.createElement("div");return o.id=n,o.textContent=t,o.style.display="none",wt().appendChild(o),function(){const l=wt();l.contains(o)&&l.removeChild(o)}},[n,t]),n}var Bt=Q.createContext(null);function ti(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),t}function cd(){let e=null;function t(){return!!e}function s(a){return a===e}function n(a){e&&S();const l={abandon:a};return e=l,l}function i(){e||S(),e=null}function o(){e&&(e.abandon(),i())}return{isClaimed:t,isActive:s,claim:n,release:i,tryAbandon:o}}function et(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}const dd=9,ud=13,$s=27,si=32,md=33,pd=34,fd=35,gd=36,hd=37,xd=38,bd=39,vd=40,yd={[ud]:!0,[dd]:!0};var ri=e=>{yd[e.keyCode]&&e.preventDefault()};const Lt=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(n=>`on${n}`in document)||e})(),ni=0,Br=5;function jd(e,t){return Math.abs(t.x-e.x)>=Br||Math.abs(t.y-e.y)>=Br}const Lr={type:"IDLE"};function Nd({cancel:e,completed:t,getPhase:s,setPhase:n}){return[{eventName:"mousemove",fn:i=>{const{button:o,clientX:a,clientY:l}=i;if(o!==ni)return;const d={x:a,y:l},c=s();if(c.type==="DRAGGING"){i.preventDefault(),c.actions.move(d);return}c.type!=="PENDING"&&S();const m=c.point;if(!jd(m,d))return;i.preventDefault();const u=c.actions.fluidLift(d);n({type:"DRAGGING",actions:u})}},{eventName:"mouseup",fn:i=>{const o=s();if(o.type!=="DRAGGING"){e();return}i.preventDefault(),o.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"mousedown",fn:i=>{s().type==="DRAGGING"&&i.preventDefault(),e()}},{eventName:"keydown",fn:i=>{if(s().type==="PENDING"){e();return}if(i.keyCode===$s){i.preventDefault(),e();return}ri(i)}},{eventName:"resize",fn:e},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{s().type==="PENDING"&&e()}},{eventName:"webkitmouseforcedown",fn:i=>{const o=s();if(o.type==="IDLE"&&S(),o.actions.shouldRespectForcePress()){e();return}i.preventDefault()}},{eventName:Lt,fn:e}]}function wd(e){const t=b.useRef(Lr),s=b.useRef(Ie),n=F(()=>({eventName:"mousedown",fn:function(u){if(u.defaultPrevented||u.button!==ni||u.ctrlKey||u.metaKey||u.shiftKey||u.altKey)return;const p=e.findClosestDraggableId(u);if(!p)return;const f=e.tryGetLock(p,a,{sourceEvent:u});if(!f)return;u.preventDefault();const h={x:u.clientX,y:u.clientY};s.current(),c(f,h)}}),[e]),i=F(()=>({eventName:"webkitmouseforcewillbegin",fn:m=>{if(m.defaultPrevented)return;const u=e.findClosestDraggableId(m);if(!u)return;const p=e.findOptionsForDraggable(u);p&&(p.shouldRespectForcePress||e.canGetLock(u)&&m.preventDefault())}}),[e]),o=R(function(){const u={passive:!1,capture:!0};s.current=be(window,[i,n],u)},[i,n]),a=R(()=>{t.current.type!=="IDLE"&&(t.current=Lr,s.current(),o())},[o]),l=R(()=>{const m=t.current;a(),m.type==="DRAGGING"&&m.actions.cancel({shouldBlockNextClick:!0}),m.type==="PENDING"&&m.actions.abort()},[a]),d=R(function(){const u={capture:!0,passive:!1},p=Nd({cancel:l,completed:a,getPhase:()=>t.current,setPhase:f=>{t.current=f}});s.current=be(window,p,u)},[l,a]),c=R(function(u,p){t.current.type!=="IDLE"&&S(),t.current={type:"PENDING",point:p,actions:u},d()},[d]);ue(function(){return o(),function(){s.current()}},[o])}function Sd(){}const Id={[pd]:!0,[md]:!0,[gd]:!0,[fd]:!0};function Dd(e,t){function s(){t(),e.cancel()}function n(){t(),e.drop()}return[{eventName:"keydown",fn:i=>{if(i.keyCode===$s){i.preventDefault(),s();return}if(i.keyCode===si){i.preventDefault(),n();return}if(i.keyCode===vd){i.preventDefault(),e.moveDown();return}if(i.keyCode===xd){i.preventDefault(),e.moveUp();return}if(i.keyCode===bd){i.preventDefault(),e.moveRight();return}if(i.keyCode===hd){i.preventDefault(),e.moveLeft();return}if(Id[i.keyCode]){i.preventDefault();return}ri(i)}},{eventName:"mousedown",fn:s},{eventName:"mouseup",fn:s},{eventName:"click",fn:s},{eventName:"touchstart",fn:s},{eventName:"resize",fn:s},{eventName:"wheel",fn:s,options:{passive:!0}},{eventName:Lt,fn:s}]}function Cd(e){const t=b.useRef(Sd),s=F(()=>({eventName:"keydown",fn:function(o){if(o.defaultPrevented||o.keyCode!==si)return;const a=e.findClosestDraggableId(o);if(!a)return;const l=e.tryGetLock(a,m,{sourceEvent:o});if(!l)return;o.preventDefault();let d=!0;const c=l.snapLift();t.current();function m(){d||S(),d=!1,t.current(),n()}t.current=be(window,Dd(c,m),{capture:!0,passive:!1})}}),[e]),n=R(function(){const o={passive:!1,capture:!0};t.current=be(window,[s],o)},[s]);ue(function(){return n(),function(){t.current()}},[n])}const Jt={type:"IDLE"},Ed=120,Ad=.15;function Pd({cancel:e,getPhase:t}){return[{eventName:"orientationchange",fn:e},{eventName:"resize",fn:e},{eventName:"contextmenu",fn:s=>{s.preventDefault()}},{eventName:"keydown",fn:s=>{if(t().type!=="DRAGGING"){e();return}s.keyCode===$s&&s.preventDefault(),e()}},{eventName:Lt,fn:e}]}function Rd({cancel:e,completed:t,getPhase:s}){return[{eventName:"touchmove",options:{capture:!1},fn:n=>{const i=s();if(i.type!=="DRAGGING"){e();return}i.hasMoved=!0;const{clientX:o,clientY:a}=n.touches[0],l={x:o,y:a};n.preventDefault(),i.actions.move(l)}},{eventName:"touchend",fn:n=>{const i=s();if(i.type!=="DRAGGING"){e();return}n.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),t()}},{eventName:"touchcancel",fn:n=>{if(s().type!=="DRAGGING"){e();return}n.preventDefault(),e()}},{eventName:"touchforcechange",fn:n=>{const i=s();i.type==="IDLE"&&S();const o=n.touches[0];if(!o||!(o.force>=Ad))return;const l=i.actions.shouldRespectForcePress();if(i.type==="PENDING"){l&&e();return}if(l){if(i.hasMoved){n.preventDefault();return}e();return}n.preventDefault()}},{eventName:Lt,fn:e}]}function Od(e){const t=b.useRef(Jt),s=b.useRef(Ie),n=R(function(){return t.current},[]),i=R(function(f){t.current=f},[]),o=F(()=>({eventName:"touchstart",fn:function(f){if(f.defaultPrevented)return;const h=e.findClosestDraggableId(f);if(!h)return;const g=e.tryGetLock(h,l,{sourceEvent:f});if(!g)return;const x=f.touches[0],{clientX:v,clientY:j}=x,N={x:v,y:j};s.current(),u(g,N)}}),[e]),a=R(function(){const f={capture:!0,passive:!1};s.current=be(window,[o],f)},[o]),l=R(()=>{const p=t.current;p.type!=="IDLE"&&(p.type==="PENDING"&&clearTimeout(p.longPressTimerId),i(Jt),s.current(),a())},[a,i]),d=R(()=>{const p=t.current;l(),p.type==="DRAGGING"&&p.actions.cancel({shouldBlockNextClick:!0}),p.type==="PENDING"&&p.actions.abort()},[l]),c=R(function(){const f={capture:!0,passive:!1},h={cancel:d,completed:l,getPhase:n},g=be(window,Rd(h),f),x=be(window,Pd(h),f);s.current=function(){g(),x()}},[d,n,l]),m=R(function(){const f=n();f.type!=="PENDING"&&S();const h=f.actions.fluidLift(f.point);i({type:"DRAGGING",actions:h,hasMoved:!1})},[n,i]),u=R(function(f,h){n().type!=="IDLE"&&S();const g=setTimeout(m,Ed);i({type:"PENDING",point:h,actions:f,longPressTimerId:g}),c()},[c,n,i,m]);ue(function(){return a(),function(){s.current();const h=n();h.type==="PENDING"&&(clearTimeout(h.longPressTimerId),i(Jt))}},[n,a,i]),ue(function(){return be(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])},[])}const Td=["input","button","textarea","select","option","optgroup","video","audio"];function ii(e,t){if(t==null)return!1;if(Td.includes(t.tagName.toLowerCase()))return!0;const n=t.getAttribute("contenteditable");return n==="true"||n===""?!0:t===e?!1:ii(e,t.parentElement)}function Md(e,t){const s=t.target;return Mt(s)?ii(e,s):!1}var Bd=e=>Ne(e.getBoundingClientRect()).center;function Ld(e){return e instanceof ei(e).Element}const kd=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(n=>n in Element.prototype)||e})();function oi(e,t){return e==null?null:e[kd](t)?e:oi(e.parentElement,t)}function _d(e,t){return e.closest?e.closest(t):oi(e,t)}function Fd(e){return`[${Le.contextId}="${e}"]`}function Gd(e,t){const s=t.target;if(!Ld(s))return null;const n=Fd(e),i=_d(s,n);return!i||!Mt(i)?null:i}function $d(e,t){const s=Gd(e,t);return s?s.getAttribute(Le.draggableId):null}function Wd(e,t){const s=`[${fs.contextId}="${e}"]`,i=Zn(document,s).find(o=>o.getAttribute(fs.id)===t);return!i||!Mt(i)?null:i}function qd(e){e.preventDefault()}function dt({expected:e,phase:t,isLockActive:s,shouldWarn:n}){return!(!s()||e!==t)}function ai({lockAPI:e,store:t,registry:s,draggableId:n}){if(e.isClaimed())return!1;const i=s.draggable.findById(n);return!(!i||!i.options.isEnabled||!Qn(t.getState(),n))}function Vd({lockAPI:e,contextId:t,store:s,registry:n,draggableId:i,forceSensorStop:o,sourceEvent:a}){if(!ai({lockAPI:e,store:s,registry:n,draggableId:i}))return null;const d=n.draggable.getById(i),c=Wd(t,d.descriptor.id);if(!c||a&&!d.options.canDragInteractiveElements&&Md(c,a))return null;const m=e.claim(o||Ie);let u="PRE_DRAG";function p(){return d.options.shouldRespectForcePress}function f(){return e.isActive(m)}function h(I,D){dt({expected:I,phase:u,isLockActive:f,shouldWarn:!0})&&s.dispatch(D())}const g=h.bind(null,"DRAGGING");function x(I){function D(){e.release(),u="COMPLETED"}u!=="PRE_DRAG"&&(D(),S()),s.dispatch(_l(I.liftActionArgs)),u="DRAGGING";function w(A,C={shouldBlockNextClick:!1}){if(I.cleanup(),C.shouldBlockNextClick){const P=be(window,[{eventName:"click",fn:qd,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(P)}D(),s.dispatch($n({reason:A}))}return{isActive:()=>dt({expected:"DRAGGING",phase:u,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:p,drop:A=>w("DROP",A),cancel:A=>w("CANCEL",A),...I.actions}}function v(I){const D=Ke(A=>{g(()=>Gn({client:A}))});return{...x({liftActionArgs:{id:i,clientSelection:I,movementMode:"FLUID"},cleanup:()=>D.cancel(),actions:{move:D}}),move:D}}function j(){const I={moveUp:()=>g(zl),moveRight:()=>g(Ql),moveDown:()=>g(Kl),moveLeft:()=>g(Yl)};return x({liftActionArgs:{id:i,clientSelection:Bd(c),movementMode:"SNAP"},cleanup:Ie,actions:I})}function N(){dt({expected:"PRE_DRAG",phase:u,isLockActive:f,shouldWarn:!0})&&e.release()}return{isActive:()=>dt({expected:"PRE_DRAG",phase:u,isLockActive:f,shouldWarn:!1}),shouldRespectForcePress:p,fluidLift:v,snapLift:j,abort:N}}const Hd=[wd,Cd,Od];function Ud({contextId:e,store:t,registry:s,customSensors:n,enableDefaultSensors:i}){const o=[...i?Hd:[],...n||[]],a=b.useState(()=>cd())[0],l=R(function(x,v){et(x)&&!et(v)&&a.tryAbandon()},[a]);ue(function(){let x=t.getState();return t.subscribe(()=>{const j=t.getState();l(x,j),x=j})},[a,t,l]),ue(()=>a.tryAbandon,[a.tryAbandon]);const d=R(g=>ai({lockAPI:a,registry:s,store:t,draggableId:g}),[a,s,t]),c=R((g,x,v)=>Vd({lockAPI:a,registry:s,contextId:e,store:t,draggableId:g,forceSensorStop:x||null,sourceEvent:v&&v.sourceEvent?v.sourceEvent:null}),[e,a,s,t]),m=R(g=>$d(e,g),[e]),u=R(g=>{const x=s.draggable.findById(g);return x?x.options:null},[s.draggable]),p=R(function(){a.isClaimed()&&(a.tryAbandon(),t.getState().phase!=="IDLE"&&t.dispatch(Os()))},[a,t]),f=R(()=>a.isClaimed(),[a]),h=F(()=>({canGetLock:d,tryGetLock:c,findClosestDraggableId:m,findOptionsForDraggable:u,tryReleaseLock:p,isLockClaimed:f}),[d,c,m,u,p,f]);for(let g=0;g<o.length;g++)o[g](h)}const zd=e=>({onBeforeCapture:t=>{const s=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};Jr.flushSync(s)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),Kd=e=>({...Ze,...e.autoScrollerOptions,durationDampening:{...Ze.durationDampening,...e.autoScrollerOptions}});function Ve(e){return e.current||S(),e.current}function Qd(e){const{contextId:t,setCallbacks:s,sensors:n,nonce:i,dragHandleUsageInstructions:o}=e,a=b.useRef(null),l=ti(e),d=R(()=>zd(l.current),[l]),c=R(()=>Kd(l.current),[l]),m=id(t),u=ld({contextId:t,text:o}),p=Xc(t,i),f=R(P=>{Ve(a).dispatch(P)},[]),h=F(()=>lr({publishWhileDragging:Gl,updateDroppableScroll:Wl,updateDroppableIsEnabled:ql,updateDroppableIsCombineEnabled:Vl,collectionStarting:$l},f),[f]),g=sd(),x=F(()=>Pc(g,h),[g,h]),v=F(()=>zc({scrollWindow:Rc,scrollDroppable:x.scrollDroppable,getAutoScrollerOptions:c,...lr({move:Gn},f)}),[x.scrollDroppable,f,c]),j=ed(t),N=F(()=>Dc({announce:m,autoScroller:v,dimensionMarshal:x,focusMarshal:j,getResponders:d,styleMarshal:p}),[m,v,x,j,d,p]);a.current=N;const y=R(()=>{const P=Ve(a);P.getState().phase!=="IDLE"&&P.dispatch(Os())},[]),I=R(()=>{const P=Ve(a).getState();return P.phase==="DROP_ANIMATING"?!0:P.phase==="IDLE"?!1:P.isDragging},[]),D=F(()=>({isDragging:I,tryAbort:y}),[I,y]);s(D);const w=R(P=>Qn(Ve(a).getState(),P),[]),A=R(()=>Ae(Ve(a).getState()),[]),C=F(()=>({marshal:x,focus:j,contextId:t,canLift:w,isMovementAllowed:A,dragHandleUsageInstructionsId:u,registry:g}),[t,x,u,j,w,A,g]);return Ud({contextId:t,store:N,registry:g,customSensors:n||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),b.useEffect(()=>y,[y]),Q.createElement(Bt.Provider,{value:C},Q.createElement(Na,{context:Fs,store:N},e.children))}function Yd(){return Q.useId()}function Jd(e){const t=Yd(),s=e.dragHandleUsageInstructions||pt.dragHandleUsageInstructions;return Q.createElement(Ca,null,n=>Q.createElement(Qd,{nonce:e.nonce,contextId:t,setCallbacks:n,dragHandleUsageInstructions:s,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const kr={dragging:5e3,dropAnimating:4500},Xd=(e,t)=>t?ze.drop(t.duration):e?ze.snap:ze.fluid,Zd=(e,t)=>{if(e)return t?Xe.opacity.drop:Xe.opacity.combining},eu=e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP";function tu(e){const s=e.dimension.client,{offset:n,combineWith:i,dropping:o}=e,a=!!i,l=eu(e),d=!!o,c=d?ms.drop(n,a):ms.moveTo(n);return{position:"fixed",top:s.marginBox.top,left:s.marginBox.left,boxSizing:"border-box",width:s.borderBox.width,height:s.borderBox.height,transition:Xd(l,o),transform:c,opacity:Zd(a,d),zIndex:d?kr.dropAnimating:kr.dragging,pointerEvents:"none"}}function su(e){return{transform:ms.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}function ru(e){return e.type==="DRAGGING"?tu(e):su(e)}function nu(e,t,s=X){const n=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=fn(i,n),a=vt(o,s),l={client:o,tagName:t.tagName.toLowerCase(),display:n.display},d={x:o.marginBox.width,y:o.marginBox.height};return{descriptor:e,placeholder:l,displaceBy:d,client:o,page:a}}function iu(e){const t=Gs("draggable"),{descriptor:s,registry:n,getDraggableRef:i,canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:l}=e,d=F(()=>({canDragInteractiveElements:o,shouldRespectForcePress:a,isEnabled:l}),[o,l,a]),c=R(f=>{const h=i();return h||S(),nu(s,h,f)},[s,i]),m=F(()=>({uniqueId:t,descriptor:s,options:d,getDimension:c}),[s,c,d,t]),u=b.useRef(m),p=b.useRef(!0);ue(()=>(n.draggable.register(u.current),()=>n.draggable.unregister(u.current)),[n.draggable]),ue(()=>{if(p.current){p.current=!1;return}const f=u.current;u.current=m,n.draggable.update(m,f)},[m,n.draggable])}var Ws=Q.createContext(null);function St(e){const t=b.useContext(e);return t||S(),t}function ou(e){e.preventDefault()}const au=e=>{const t=b.useRef(null),s=R((D=null)=>{t.current=D},[]),n=R(()=>t.current,[]),{contextId:i,dragHandleUsageInstructionsId:o,registry:a}=St(Bt),{type:l,droppableId:d}=St(Ws),c=F(()=>({id:e.draggableId,index:e.index,type:l,droppableId:d}),[e.draggableId,e.index,l,d]),{children:m,draggableId:u,isEnabled:p,shouldRespectForcePress:f,canDragInteractiveElements:h,isClone:g,mapped:x,dropAnimationFinished:v}=e;if(!g){const D=F(()=>({descriptor:c,registry:a,getDraggableRef:n,canDragInteractiveElements:h,shouldRespectForcePress:f,isEnabled:p}),[c,a,n,h,f,p]);iu(D)}const j=F(()=>p?{tabIndex:0,role:"button","aria-describedby":o,"data-rfd-drag-handle-draggable-id":u,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:ou}:null,[i,o,u,p]),N=R(D=>{x.type==="DRAGGING"&&x.dropping&&D.propertyName==="transform"&&Jr.flushSync(v)},[v,x]),y=F(()=>{const D=ru(x),w=x.type==="DRAGGING"&&x.dropping?N:void 0;return{innerRef:s,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":u,style:D,onTransitionEnd:w},dragHandleProps:j}},[i,j,u,x,N,s]),I=F(()=>({draggableId:c.id,type:c.type,source:{index:c.index,droppableId:c.droppableId}}),[c.droppableId,c.id,c.index,c.type]);return Q.createElement(Q.Fragment,null,m(y,x.snapshot,I))};var li=(e,t)=>e===t,ci=e=>{const{combine:t,destination:s}=e;return s?s.droppableId:t?t.droppableId:null};const lu=e=>e.combine?e.combine.draggableId:null,cu=e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null;function du(){const e=J((i,o)=>({x:i,y:o})),t=J((i,o,a=null,l=null,d=null)=>({isDragging:!0,isClone:o,isDropAnimating:!!d,dropAnimation:d,mode:i,draggingOver:a,combineWith:l,combineTargetFor:null})),s=J((i,o,a,l,d=null,c=null,m=null)=>({mapped:{type:"DRAGGING",dropping:null,draggingOver:d,combineWith:c,mode:o,offset:i,dimension:a,forceShouldAnimate:m,snapshot:t(o,l,d,c,null)}}));return(i,o)=>{if(et(i)){if(i.critical.draggable.id!==o.draggableId)return null;const a=i.current.client.offset,l=i.dimensions.draggables[o.draggableId],d=de(i.impact),c=cu(i.impact),m=i.forceShouldAnimate;return s(e(a.x,a.y),i.movementMode,l,o.isClone,d,c,m)}if(i.phase==="DROP_ANIMATING"){const a=i.completed;if(a.result.draggableId!==o.draggableId)return null;const l=o.isClone,d=i.dimensions.draggables[o.draggableId],c=a.result,m=c.mode,u=ci(c),p=lu(c),h={duration:i.dropDuration,curve:Ms.drop,moveTo:i.newHomeClientOffset,opacity:p?Xe.opacity.drop:null,scale:p?Xe.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:d,dropping:h,draggingOver:u,combineWith:p,mode:m,forceShouldAnimate:null,snapshot:t(m,l,u,p,h)}}}return null}}function di(e=null){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const uu={mapped:{type:"SECONDARY",offset:X,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:di(null)}};function mu(){const e=J((a,l)=>({x:a,y:l})),t=J(di),s=J((a,l=null,d)=>({mapped:{type:"SECONDARY",offset:a,combineTargetFor:l,shouldAnimateDisplacement:d,snapshot:t(l)}})),n=a=>a?s(X,a,!0):null,i=(a,l,d,c)=>{const m=d.displaced.visible[a],u=!!(c.inVirtualList&&c.effected[a]),p=Rt(d),f=p&&p.draggableId===a?l:null;if(!m){if(!u)return n(f);if(d.displaced.invisible[a])return null;const x=ke(c.displacedBy.point),v=e(x.x,x.y);return s(v,f,!0)}if(u)return n(f);const h=d.displacedBy.point,g=e(h.x,h.y);return s(g,f,m.shouldAnimate)};return(a,l)=>{if(et(a))return a.critical.draggable.id===l.draggableId?null:i(l.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){const d=a.completed;return d.result.draggableId===l.draggableId?null:i(l.draggableId,d.result.draggableId,d.impact,d.afterCritical)}return null}}const pu=()=>{const e=du(),t=mu();return(n,i)=>e(n,i)||t(n,i)||uu},fu={dropAnimationFinished:Wn},gu=pn(pu,fu,null,{context:Fs,areStatePropsEqual:li})(au);function ui(e){return St(Ws).isUsingCloneFor===e.draggableId&&!e.isClone?null:Q.createElement(gu,e)}function hu(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,s=!!e.disableInteractiveElementBlocking,n=!!e.shouldRespectForcePress;return Q.createElement(ui,ht({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:s,shouldRespectForcePress:n}))}const mi=e=>t=>e===t,xu=mi("scroll"),bu=mi("auto"),_r=(e,t)=>t(e.overflowX)||t(e.overflowY),vu=e=>{const t=window.getComputedStyle(e),s={overflowX:t.overflowX,overflowY:t.overflowY};return _r(s,xu)||_r(s,bu)},yu=()=>!1,pi=e=>e==null?null:e===document.body?yu()?e:null:e===document.documentElement?null:vu(e)?e:pi(e.parentElement);var gs=e=>({x:e.scrollLeft,y:e.scrollTop});const fi=e=>e?window.getComputedStyle(e).position==="fixed"?!0:fi(e.parentElement):!1;var ju=e=>{const t=pi(e),s=fi(e);return{closestScrollable:t,isFixedOnPage:s}},Nu=({descriptor:e,isEnabled:t,isCombineEnabled:s,isFixedOnPage:n,direction:i,client:o,page:a,closest:l})=>{const d=(()=>{if(!l)return null;const{scrollSize:p,client:f}=l,h=Un({scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth,height:f.paddingBox.height,width:f.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:f,scrollSize:p,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:h,diff:{value:X,displacement:X}}}})(),c=i==="vertical"?Cs:In,m=Me({page:a,withPlaceholder:null,axis:c,frame:d});return{descriptor:e,isCombineEnabled:s,isFixedOnPage:n,axis:c,isEnabled:t,client:o,page:a,frame:d,subject:m}};const wu=(e,t)=>{const s=gn(e);if(!t||e!==t)return s;const n=s.paddingBox.top-t.scrollTop,i=s.paddingBox.left-t.scrollLeft,o=n+t.scrollHeight,a=i+t.scrollWidth,d=ws({top:n,right:a,bottom:o,left:i},s.border);return Ss({borderBox:d,margin:s.margin,border:s.border,padding:s.padding})};var Su=({ref:e,descriptor:t,env:s,windowScroll:n,direction:i,isDropDisabled:o,isCombineEnabled:a,shouldClipSubject:l})=>{const d=s.closestScrollable,c=wu(e,d),m=vt(c,n),u=(()=>{if(!d)return null;const f=gn(d),h={scrollHeight:d.scrollHeight,scrollWidth:d.scrollWidth};return{client:f,page:vt(f,n),scroll:gs(d),scrollSize:h,shouldClipSubject:l}})();return Nu({descriptor:t,isEnabled:!o,isCombineEnabled:a,isFixedOnPage:s.isFixedOnPage,direction:i,client:c,page:m,closest:u})};const Iu={passive:!1},Du={passive:!0};var Fr=e=>e.shouldPublishImmediately?Iu:Du;const ut=e=>e&&e.env.closestScrollable||null;function Cu(e){const t=b.useRef(null),s=St(Bt),n=Gs("droppable"),{registry:i,marshal:o}=s,a=ti(e),l=F(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),d=b.useRef(l),c=F(()=>J((y,I)=>{t.current||S();const D={x:y,y:I};o.updateDroppableScroll(l.id,D)}),[l.id,o]),m=R(()=>{const y=t.current;return!y||!y.env.closestScrollable?X:gs(y.env.closestScrollable)},[]),u=R(()=>{const y=m();c(y.x,y.y)},[m,c]),p=F(()=>Ke(u),[u]),f=R(()=>{const y=t.current,I=ut(y);if(y&&I||S(),y.scrollOptions.shouldPublishImmediately){u();return}p()},[p,u]),h=R((y,I)=>{t.current&&S();const D=a.current,w=D.getDroppableRef();w||S();const A=ju(w),C={ref:w,descriptor:l,env:A,scrollOptions:I};t.current=C;const P=Su({ref:w,descriptor:l,env:A,windowScroll:y,direction:D.direction,isDropDisabled:D.isDropDisabled,isCombineEnabled:D.isCombineEnabled,shouldClipSubject:!D.ignoreContainerClipping}),O=A.closestScrollable;return O&&(O.setAttribute(Tr.contextId,s.contextId),O.addEventListener("scroll",f,Fr(C.scrollOptions))),P},[s.contextId,l,f,a]),g=R(()=>{const y=t.current,I=ut(y);return y&&I||S(),gs(I)},[]),x=R(()=>{const y=t.current;y||S();const I=ut(y);t.current=null,I&&(p.cancel(),I.removeAttribute(Tr.contextId),I.removeEventListener("scroll",f,Fr(y.scrollOptions)))},[f,p]),v=R(y=>{const I=t.current;I||S();const D=ut(I);D||S(),D.scrollTop+=y.y,D.scrollLeft+=y.x},[]),j=F(()=>({getDimensionAndWatchScroll:h,getScrollWhileDragging:g,dragStopped:x,scroll:v}),[x,h,g,v]),N=F(()=>({uniqueId:n,descriptor:l,callbacks:j}),[j,l,n]);ue(()=>(d.current=N.descriptor,i.droppable.register(N),()=>{t.current&&x(),i.droppable.unregister(N)}),[j,l,x,N,o,i.droppable]),ue(()=>{t.current&&o.updateDroppableIsEnabled(d.current.id,!e.isDropDisabled)},[e.isDropDisabled,o]),ue(()=>{t.current&&o.updateDroppableIsCombineEnabled(d.current.id,e.isCombineEnabled)},[e.isCombineEnabled,o])}function Xt(){}const Gr={width:0,height:0,margin:Ma},Eu=({isAnimatingOpenOnMount:e,placeholder:t,animate:s})=>e||s==="close"?Gr:{height:t.client.borderBox.height,width:t.client.borderBox.width,margin:t.client.margin},Au=({isAnimatingOpenOnMount:e,placeholder:t,animate:s})=>{const n=Eu({isAnimatingOpenOnMount:e,placeholder:t,animate:s});return{display:t.display,boxSizing:"border-box",width:n.width,height:n.height,marginTop:n.margin.top,marginRight:n.margin.right,marginBottom:n.margin.bottom,marginLeft:n.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:s!=="none"?ze.placeholder:null}},Pu=e=>{const t=b.useRef(null),s=R(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:n,onTransitionEnd:i,onClose:o,contextId:a}=e,[l,d]=b.useState(e.animate==="open");b.useEffect(()=>l?n!=="open"?(s(),d(!1),Xt):t.current?Xt:(t.current=setTimeout(()=>{t.current=null,d(!1)}),s):Xt,[n,l,s]);const c=R(u=>{u.propertyName==="height"&&(i(),n==="close"&&o())},[n,o,i]),m=Au({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return Q.createElement(e.placeholder.tagName,{style:m,"data-rfd-placeholder-context-id":a,onTransitionEnd:c,ref:e.innerRef})};var Ru=Q.memo(Pu);class Ou extends Q.PureComponent{constructor(...t){super(...t),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,s){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:s.isVisible?{isVisible:!0,data:s.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}}const Tu=e=>{const t=b.useContext(Bt);t||S();const{contextId:s,isMovementAllowed:n}=t,i=b.useRef(null),o=b.useRef(null),{children:a,droppableId:l,type:d,mode:c,direction:m,ignoreContainerClipping:u,isDropDisabled:p,isCombineEnabled:f,snapshot:h,useClone:g,updateViewportMaxScroll:x,getContainerForClone:v}=e,j=R(()=>i.current,[]),N=R((O=null)=>{i.current=O},[]);R(()=>o.current,[]);const y=R((O=null)=>{o.current=O},[]),I=R(()=>{n()&&x({maxScroll:Kn()})},[n,x]);Cu({droppableId:l,type:d,mode:c,direction:m,isDropDisabled:p,isCombineEnabled:f,ignoreContainerClipping:u,getDroppableRef:j});const D=F(()=>Q.createElement(Ou,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},({onClose:O,data:k,animate:E})=>Q.createElement(Ru,{placeholder:k,onClose:O,innerRef:y,animate:E,contextId:s,onTransitionEnd:I})),[s,I,e.placeholder,e.shouldAnimatePlaceholder,y]),w=F(()=>({innerRef:N,placeholder:D,droppableProps:{"data-rfd-droppable-id":l,"data-rfd-droppable-context-id":s}}),[s,l,D,N]),A=g?g.dragging.draggableId:null,C=F(()=>({droppableId:l,type:d,isUsingCloneFor:A}),[l,A,d]);function P(){if(!g)return null;const{dragging:O,render:k}=g,E=Q.createElement(ui,{draggableId:O.draggableId,index:O.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(q,H)=>k(q,H,O));return wi.createPortal(E,v())}return Q.createElement(Ws.Provider,{value:C},a(w,h),P())};function Mu(){return document.body||S(),document.body}const $r={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:Mu},gi=e=>{let t={...e},s;for(s in $r)e[s]===void 0&&(t={...t,[s]:$r[s]});return t},Zt=(e,t)=>e===t.droppable.type,Wr=(e,t)=>t.draggables[e.draggable.id],Bu=()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},s=J(o=>({draggableId:o.id,type:o.type,source:{index:o.index,droppableId:o.droppableId}})),n=J((o,a,l,d,c,m)=>{const u=c.descriptor.id;if(c.descriptor.droppableId===o){const h=m?{render:m,dragging:s(c.descriptor)}:null,g={isDraggingOver:l,draggingOverWith:l?u:null,draggingFromThisWith:u,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!1,snapshot:g,useClone:h}}if(!a)return t;if(!d)return e;const f={isDraggingOver:l,draggingOverWith:u,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:c.placeholder,shouldAnimatePlaceholder:!0,snapshot:f,useClone:null}});return(o,a)=>{const l=gi(a),d=l.droppableId,c=l.type,m=!l.isDropDisabled,u=l.renderClone;if(et(o)){const p=o.critical;if(!Zt(c,p))return t;const f=Wr(p,o.dimensions),h=de(o.impact)===d;return n(d,m,h,h,f,u)}if(o.phase==="DROP_ANIMATING"){const p=o.completed;if(!Zt(c,p.critical))return t;const f=Wr(p.critical,o.dimensions);return n(d,m,ci(p.result)===d,de(p.impact)===d,f,u)}if(o.phase==="IDLE"&&o.completed&&!o.shouldFlush){const p=o.completed;if(!Zt(c,p.critical))return t;const f=de(p.impact)===d,h=!!(p.impact.at&&p.impact.at.type==="COMBINE"),g=p.critical.droppable.id===d;return f?h?e:t:g?e:t}return t}},Lu={updateViewportMaxScroll:Ul},ku=pn(Bu,Lu,(e,t,s)=>({...gi(s),...e,...t}),{context:Fs,areStatePropsEqual:li})(Tu);function _u({item:e,provided:t,onClick:s,className:n}){return r.jsx("div",{ref:t.innerRef,...t.draggableProps,...t.dragHandleProps,onClick:s,className:M("p-3 bg-card border border-border rounded-lg shadow-sm cursor-pointer","hover:shadow-md hover:border-primary/50 transition-all","focus:outline-none focus:ring-2 focus:ring-primary/50",n),children:r.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:e.title||e.id})})}function Fu({column:e,onItemClick:t,renderItem:s,itemClassName:n,emptyMessage:i}){return r.jsx(ku,{droppableId:e.id,children:(o,a)=>r.jsxs("div",{ref:o.innerRef,...o.droppableProps,className:M("min-h-[200px] p-2 space-y-2 rounded-lg transition-colors",a.isDraggingOver&&"bg-primary/5"),children:[e.items.length===0?r.jsx("p",{className:"text-center text-sm text-muted-foreground py-8",children:i||"No items"}):e.items.map((l,d)=>r.jsx(hu,{draggableId:l.id,index:d,children:c=>s?s(l,c):r.jsx(_u,{item:l,provided:c,onClick:()=>t==null?void 0:t(l),className:n})},l.id)),o.placeholder]})})}function hi({columns:e,onDragEnd:t,onItemClick:s,renderItem:n,className:i,columnClassName:o,itemClassName:a,emptyColumnMessage:l,isLoading:d=!1}){const c=b.useCallback(m=>{if(!m.destination)return;const{source:u,destination:p}=m;u.droppableId===p.droppableId&&u.index===p.index||t==null||t(m,u.droppableId,p.droppableId)},[t]);return d?r.jsx("div",{className:M("grid gap-4",i),style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:e.map(m=>r.jsxs(_,{className:M("p-4",o),children:[r.jsx("div",{className:"h-6 w-24 bg-muted animate-pulse rounded mb-4"}),r.jsx("div",{className:"space-y-2",children:[1,2,3].map(u=>r.jsx("div",{className:"h-16 bg-muted animate-pulse rounded"},u))})]},m.id))}):r.jsx(Jd,{onDragEnd:c,children:r.jsx("div",{className:M("grid gap-4",i),style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:e.map(m=>r.jsxs(_,{className:M("p-4",o),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[m.icon,r.jsx("h3",{className:"font-medium text-foreground",children:m.title})]}),r.jsx(B,{variant:"secondary",className:M(m.color&&`bg-${m.color}/10 text-${m.color}`),children:m.items.length})]}),r.jsx(Fu,{column:m,onItemClick:s,renderItem:n,itemClassName:a,emptyMessage:l})]},m.id))})})}const qs=[{id:"registered",titleKey:"issues.status.registered",defaultLabel:"新注册"},{id:"planning",titleKey:"issues.status.planning",defaultLabel:"规划中"},{id:"planned",titleKey:"issues.status.planned",defaultLabel:"已规划"},{id:"executing",titleKey:"issues.status.executing",defaultLabel:"执行中"},{id:"completed",titleKey:"issues.status.completed",defaultLabel:"已完成"}];function Gu({issues:e,isLoading:t,onIssueClick:s,onIssueEdit:n,onIssueDelete:i,onStatusChange:o}){const{formatMessage:a}=z();return t?r.jsx("div",{className:"space-y-3",children:[1,2,3].map(l=>r.jsx("div",{className:"h-32 bg-muted animate-pulse rounded-lg"},l))}):e.length===0?r.jsxs(_,{className:"p-8 text-center",children:[r.jsx(Se,{className:"w-12 h-12 mx-auto text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-medium text-foreground",children:a({id:"issues.emptyState.title"})}),r.jsx("p",{className:"mt-2 text-muted-foreground",children:a({id:"issues.emptyState.message"})})]}):r.jsx("div",{className:"grid gap-3 md:grid-cols-2 lg:grid-cols-3",children:e.map(l=>r.jsx(rn,{issue:l,onClick:s,onEdit:n,onDelete:i,onStatusChange:o},l.id))})}function qr(e){return`ccw.issues.board.order:${e?encodeURIComponent(e):"global"}`}function $u(e){if(!e)return{};try{const t=JSON.parse(e);return!t||typeof t!="object"?{}:t}catch{return{}}}function Wu(e,t,s){const n=new Map(e.map(o=>[o.id,o])),i=[];for(const o of qs){const a=(t[o.id]??[]).map(m=>n.get(m)).filter(Boolean),l=new Set(a.map(m=>m.id)),d=e.filter(m=>m.status===o.id&&!l.has(m.id)).sort((m,u)=>{const p=m.updatedAt||m.createdAt||"";return(u.updatedAt||u.createdAt||"").localeCompare(p)}),c=[...a,...d].map(m=>({...m,id:m.id,title:m.title,status:m.status}));i.push({id:o.id,title:s(o.id),items:c,icon:r.jsx(At,{className:"w-4 h-4"})})}return i}function qu(e,t){const s=new Map(t.map(i=>[i.id,i.status])),n={};for(const{id:i}of qs){const a=(e[i]??[]).filter(c=>s.get(c)===i),l=new Set(a),d=t.filter(c=>c.status===i&&!l.has(c.id)).map(c=>c.id);n[i]=[...a,...d]}return n}function Vu(e,t,s){const n=[...e],[i]=n.splice(t,1);return i===void 0?e:(n.splice(s,0,i),n)}function Hu({onCreateIssue:e}){const{formatMessage:t}=z(),s=st(rt),[n,i]=b.useState("list"),[o,a]=b.useState(""),[l,d]=b.useState("all"),[c,m]=b.useState("all"),[u,p]=b.useState(null),[f,h]=b.useState({});b.useEffect(()=>{const E=qr(s),q=$u(localStorage.getItem(E));h(q)},[s]);const{issues:g,criticalCount:x,isLoading:v}=Ct({filter:{search:o||void 0,status:l!=="all"?[l]:void 0,priority:c!=="all"?[c]:void 0}}),{updateIssue:j,deleteIssue:N}=Xr();b.useEffect(()=>{h(E=>qu(E,g))},[g]),b.useEffect(()=>{const E=qr(s);try{localStorage.setItem(E,JSON.stringify(f))}catch{}},[f,s]);const y=b.useMemo(()=>({all:g.length,registered:g.filter(E=>E.status==="registered").length,planning:g.filter(E=>E.status==="planning").length,planned:g.filter(E=>E.status==="planned").length,executing:g.filter(E=>E.status==="executing").length,completed:g.filter(E=>E.status==="completed").length,failed:g.filter(E=>E.status==="failed").length}),[g]),I=b.useMemo(()=>Wu(g,f,E=>{const q=qs.find(H=>H.id===E);return q?t({id:q.titleKey,defaultMessage:q.defaultLabel}):E}),[g,f,t]),D=b.useMemo(()=>{const E={};for(const q of I)E[q.id]=q.items.map(H=>H.id);return E},[I]),w=E=>{},A=async E=>{confirm(`Delete issue "${E.title}"?`)&&await N(E.id)},C=async(E,q)=>{await j(E.id,{status:q})},P=E=>{p(E)},O=()=>{p(null)},k=b.useCallback(async(E,q,H)=>{const ye=E.draggableId;if(!g.find(K=>K.id===ye))return;const U=q,Y=H,$=D[U]??[],Z=D[Y]??[];if(h(K=>{const ee={...K};if(U===Y)return ee[U]=Vu($,E.source.index,E.destination.index),ee;const V=[...$];V.splice(E.source.index,1);const se=[...Z];return se.splice(E.destination.index,0,ye),ee[U]=V,ee[Y]=se,ee}),U!==Y)try{await j(ye,{status:Y})}catch(K){console.error("Failed to update issue status:",K)}},[g,D,j]);return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(Se,{className:"w-5 h-5 text-info"}),r.jsx("span",{className:"text-2xl font-bold",children:y.registered})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t({id:"issues.status.registered",defaultMessage:"新注册"})})]}),r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(je,{className:"w-5 h-5 text-warning"}),r.jsx("span",{className:"text-2xl font-bold",children:y.executing})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t({id:"issues.status.executing",defaultMessage:"执行中"})})]}),r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(nt,{className:"w-5 h-5 text-destructive"}),r.jsx("span",{className:"text-2xl font-bold",children:x})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t({id:"issues.priority.critical"})})]}),r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ce,{className:"w-5 h-5 text-success"}),r.jsx("span",{className:"text-2xl font-bold",children:y.completed})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:t({id:"issues.status.completed",defaultMessage:"已完成"})})]})]}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx(Zr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),r.jsx(Et,{placeholder:t({id:"common.actions.searchIssues"}),value:o,onChange:E=>a(E.target.value),className:"pl-9"})]}),r.jsxs("div",{className:"flex border border-border rounded-md overflow-hidden",children:[r.jsxs(T,{variant:n==="list"?"default":"ghost",size:"sm",className:"rounded-none",onClick:()=>i("list"),children:[r.jsx(eo,{className:"w-4 h-4 mr-1"}),t({id:"common.view.list",defaultMessage:"列表"})]}),r.jsxs(T,{variant:n==="board"?"default":"ghost",size:"sm",className:"rounded-none",onClick:()=>i("board"),children:[r.jsx(At,{className:"w-4 h-4 mr-1"}),t({id:"common.view.board",defaultMessage:"看板"})]})]}),r.jsxs("div",{className:"flex gap-2",children:[r.jsxs(fe,{value:l,onValueChange:E=>d(E),children:[r.jsx(ge,{className:"w-[140px]",children:r.jsx(he,{placeholder:t({id:"common.status.label"})})}),r.jsxs(xe,{children:[r.jsx(L,{value:"all",children:t({id:"issues.filters.all"})}),r.jsx(L,{value:"registered",children:t({id:"issues.status.registered",defaultMessage:"新注册"})}),r.jsx(L,{value:"planning",children:t({id:"issues.status.planning",defaultMessage:"规划中"})}),r.jsx(L,{value:"planned",children:t({id:"issues.status.planned",defaultMessage:"已规划"})}),r.jsx(L,{value:"executing",children:t({id:"issues.status.executing",defaultMessage:"执行中"})}),r.jsx(L,{value:"completed",children:t({id:"issues.status.completed",defaultMessage:"已完成"})}),r.jsx(L,{value:"failed",children:t({id:"issues.status.failed",defaultMessage:"失败"})})]})]}),r.jsxs(fe,{value:c,onValueChange:E=>m(E),children:[r.jsx(ge,{className:"w-[140px]",children:r.jsx(he,{placeholder:t({id:"issues.priority.label"})})}),r.jsxs(xe,{children:[r.jsx(L,{value:"all",children:t({id:"issues.filters.byPriority"})}),r.jsx(L,{value:"critical",children:t({id:"issues.priority.critical"})}),r.jsx(L,{value:"high",children:t({id:"issues.priority.high"})}),r.jsx(L,{value:"medium",children:t({id:"issues.priority.medium"})}),r.jsx(L,{value:"low",children:t({id:"issues.priority.low"})})]})]})]})]}),n==="list"&&r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsxs(T,{variant:l==="all"?"default":"outline",size:"sm",onClick:()=>d("all"),children:[t({id:"issues.filters.all"})," (",y.all,")"]}),r.jsxs(T,{variant:l==="registered"?"default":"outline",size:"sm",onClick:()=>d("registered"),children:[r.jsx(B,{variant:"info",className:"mr-2",children:y.registered}),t({id:"issues.status.registered",defaultMessage:"新注册"})]}),r.jsxs(T,{variant:l==="executing"?"default":"outline",size:"sm",onClick:()=>d("executing"),children:[r.jsx(B,{variant:"warning",className:"mr-2",children:y.executing}),t({id:"issues.status.executing",defaultMessage:"执行中"})]}),r.jsxs(T,{variant:c==="critical"?"destructive":"outline",size:"sm",onClick:()=>{m(c==="critical"?"all":"critical"),d("all")},children:[r.jsx(B,{variant:"destructive",className:"mr-2",children:x}),t({id:"issues.priority.critical"})]})]}),n==="list"?r.jsx(Gu,{issues:g,isLoading:v,onIssueClick:P,onIssueEdit:w,onIssueDelete:A,onStatusChange:C}):r.jsx(hi,{columns:I,onDragEnd:k,onItemClick:E=>P(E),isLoading:v,emptyColumnMessage:t({id:"issues.emptyState.message"}),className:M("gap-4","grid"),renderItem:(E,q)=>r.jsx(rn,{issue:E,compact:!0,showActions:!1,onClick:H=>P(H),innerRef:q.innerRef,draggableProps:q.draggableProps,dragHandleProps:q.dragHandleProps,className:"w-full"})}),r.jsx(nn,{issue:u,isOpen:u!==null,onClose:O})]})}function Uu({group:e,items:t,type:s="sequential",onItemClick:n}){const{formatMessage:i}=z(),[o,a]=b.useState(!1),l=s==="parallel";return r.jsxs(_,{className:"overflow-hidden",children:[r.jsx(Si,{className:"py-3 px-4 cursor-pointer hover:bg-muted/50 transition-colors",onClick:()=>a(!o),children:r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[o?r.jsx(Ii,{className:"w-4 h-4 text-muted-foreground"}):r.jsx(Di,{className:"w-4 h-4 text-muted-foreground"}),r.jsxs(B,{variant:l?"info":"secondary",className:"gap-1",children:[l?r.jsx(sn,{className:"w-3 h-3"}):r.jsx(to,{className:"w-3 h-3"}),e]}),r.jsx("span",{className:"text-sm text-muted-foreground",children:i(l?{id:"issues.queue.parallelGroup"}:{id:"issues.queue.sequentialGroup"})})]}),r.jsx(B,{variant:"outline",className:"text-xs",children:i({id:"issues.queue.itemCount"},{count:t.length})})]})}),o&&r.jsx("div",{className:"px-4 pb-4 pt-0",children:r.jsx("div",{className:M("space-y-1 mt-2",l?"grid grid-cols-1 sm:grid-cols-2 gap-2":"space-y-1"),children:t.map((d,c)=>{const[m,...u]=d.item_id.split("-"),p=u.join("-"),f=m==="issue"?i({id:"issues.solution.shortIssue"}):m==="solution"?i({id:"issues.solution.shortSolution"}):m;return r.jsxs("div",{onClick:()=>n==null?void 0:n(d),className:M("flex items-center gap-2 p-2 rounded-md bg-muted/50 text-sm","hover:bg-muted transition-colors cursor-pointer"),children:[r.jsx("span",{className:"text-muted-foreground text-xs w-6",children:l?"":`${c+1}.`}),r.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:f}),r.jsx("span",{className:"font-mono text-xs truncate flex-1",children:p}),r.jsx(B,{variant:"outline",className:"text-xs shrink-0",children:i({id:`issues.queue.status.${d.status}`})})]},d.item_id)})})})]})}function zu({queue:e,queueId:t,isActive:s=!1,onActivate:n,onDeactivate:i,onDelete:o,onMerge:a,onSplit:l,isActivating:d=!1,isDeactivating:c=!1,isDeleting:m=!1,isMerging:u=!1,isSplitting:p=!1}){var U,Y;const{formatMessage:f}=z(),[h,g]=b.useState(!1),[x,v]=b.useState(!1),[j,N]=b.useState(!1),[y,I]=b.useState(""),[D,w]=b.useState([]),A=t,C=Object.values(e.grouped_items||{}).flat(),P=()=>{A&&(o==null||o(A),g(!1))},O=()=>{if(y.trim()){if(!A)return;a==null||a(A,y.trim()),v(!1),I("")}},k=()=>{if(D.length>0&&D.length<C.length){if(!A)return;l==null||l(A,D),N(!1),w([])}},E=$=>{w(Z=>Z.includes($)?Z.filter(K=>K!==$):[...Z,$])},q=()=>{w(C.map($=>$.item_id))},H=()=>{w([])},G=(((U=e.tasks)==null?void 0:U.length)||0)+(((Y=e.solutions)==null?void 0:Y.length)||0)>1;return r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"flex items-center gap-1",children:[!s&&n&&r.jsx(T,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>{A&&n(A)},disabled:d||!A,title:f({id:"issues.queue.actions.activate"}),children:d?r.jsx(ie,{className:"w-4 h-4 animate-spin"}):r.jsx(Yr,{className:"w-4 h-4 text-success"})}),s&&i&&r.jsx(T,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>i(),disabled:c,title:f({id:"issues.queue.actions.deactivate"}),children:c?r.jsx(ie,{className:"w-4 h-4 animate-spin"}):r.jsx(Ci,{className:"w-4 h-4 text-warning"})}),r.jsx(T,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>v(!0),disabled:u||!A,title:f({id:"issues.queue.actions.merge"}),children:u?r.jsx(ie,{className:"w-4 h-4 animate-spin"}):r.jsx(Xs,{className:"w-4 h-4 text-info"})}),G&&r.jsx(T,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>N(!0),disabled:p||!A,title:f({id:"issues.queue.actions.split"}),children:p?r.jsx(ie,{className:"w-4 h-4 animate-spin"}):r.jsx(Hs,{className:"w-4 h-4 text-muted-foreground"})}),r.jsx(T,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:()=>g(!0),disabled:m||!A,title:f({id:"issues.queue.actions.delete"}),children:m?r.jsx(ie,{className:"w-4 h-4 animate-spin text-destructive"}):r.jsx(Kr,{className:"w-4 h-4 text-destructive"})})]}),r.jsx(so,{open:h,onOpenChange:g,children:r.jsxs(ro,{children:[r.jsxs(no,{children:[r.jsx(io,{children:f({id:"issues.queue.deleteDialog.title"})}),r.jsx(oo,{children:f({id:"issues.queue.deleteDialog.description"})})]}),r.jsxs(ao,{children:[r.jsx(lo,{children:f({id:"common.actions.cancel"})}),r.jsx(co,{onClick:P,className:"bg-destructive hover:bg-destructive/90",children:m?r.jsxs(r.Fragment,{children:[r.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),f({id:"common.actions.deleting"})]}):f({id:"issues.queue.actions.delete"})})]})]})}),r.jsx(ns,{open:x,onOpenChange:v,children:r.jsxs(is,{children:[r.jsx(os,{children:r.jsx(as,{children:f({id:"issues.queue.mergeDialog.title"})})}),r.jsx("div",{className:"space-y-4 py-4",children:r.jsxs("div",{children:[r.jsx("label",{htmlFor:"merge-target",className:"text-sm font-medium text-foreground",children:f({id:"issues.queue.mergeDialog.targetQueueLabel"})}),r.jsx(Et,{id:"merge-target",value:y,onChange:$=>I($.target.value),placeholder:f({id:"issues.queue.mergeDialog.targetQueuePlaceholder"}),className:"mt-1"})]})}),r.jsxs(Us,{children:[r.jsx(T,{variant:"outline",onClick:()=>{v(!1),I("")},children:f({id:"common.actions.cancel"})}),r.jsx(T,{onClick:O,disabled:!y.trim()||u,children:u?r.jsxs(r.Fragment,{children:[r.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),f({id:"common.actions.merging"})]}):r.jsxs(r.Fragment,{children:[r.jsx(Xs,{className:"w-4 h-4 mr-2"}),f({id:"issues.queue.actions.merge"})]})})]})]})}),r.jsx(ns,{open:j,onOpenChange:N,children:r.jsxs(is,{className:"max-w-2xl max-h-[80vh] overflow-hidden flex flex-col",children:[r.jsx(os,{children:r.jsx(as,{children:f({id:"issues.queue.splitDialog.title"})})}),r.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col py-4",children:[r.jsxs("div",{className:"flex items-center justify-between mb-4 pb-4 border-b",children:[r.jsx("span",{className:"text-sm text-muted-foreground",children:f({id:"issues.queue.splitDialog.selected"},{count:D.length,total:C.length})}),r.jsxs("div",{className:"flex gap-2",children:[r.jsx(T,{variant:"outline",size:"sm",onClick:q,children:f({id:"issues.queue.splitDialog.selectAll"})}),r.jsx(T,{variant:"outline",size:"sm",onClick:H,children:f({id:"issues.queue.splitDialog.clearAll"})})]})]}),r.jsx("div",{className:"flex-1 overflow-y-auto space-y-2 pr-2",children:C.map($=>{const Z=D.includes($.item_id);return r.jsxs("div",{className:M("flex items-center gap-3 p-3 rounded-md border transition-colors cursor-pointer",Z?"bg-primary/10 border-primary":"bg-card hover:bg-muted/50"),onClick:()=>E($.item_id),children:[r.jsx(Ei,{checked:Z,onChange:()=>E($.item_id)}),r.jsx("span",{className:"font-mono text-xs flex-1 truncate",children:$.item_id}),r.jsx("span",{className:"text-xs text-muted-foreground",children:f({id:`issues.queue.status.${$.status}`})})]},$.item_id)})}),D.length===0&&r.jsx("p",{className:"text-sm text-muted-foreground text-center py-2",children:f({id:"issues.queue.splitDialog.noSelection"})}),D.length>=C.length&&r.jsx("p",{className:"text-sm text-destructive text-center py-2",children:f({id:"issues.queue.splitDialog.cannotSplitAll"})})]}),r.jsxs(Us,{children:[r.jsx(T,{variant:"outline",onClick:()=>{N(!1),w([])},children:f({id:"common.actions.cancel"})}),r.jsx(T,{onClick:k,disabled:D.length===0||D.length>=C.length||p,children:p?r.jsxs(r.Fragment,{children:[r.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),f({id:"common.actions.splitting"})]}):r.jsxs(r.Fragment,{children:[r.jsx(Hs,{className:"w-4 h-4 mr-2"}),f({id:"issues.queue.actions.split"})]})})]})]})})]})}function Ku({queue:e,isActive:t=!1,onActivate:s,onDeactivate:n,onDelete:i,onMerge:o,onSplit:a,onItemClick:l,isActivating:d=!1,isDeactivating:c=!1,isDeleting:m=!1,isMerging:u=!1,isSplitting:p=!1,className:f}){var D,w,A;const{formatMessage:h}=z(),g=e.id,x=((D=e.tasks)==null?void 0:D.length)||0,v=((w=e.solutions)==null?void 0:w.length)||0,j=((A=e.conflicts)==null?void 0:A.length)||0,N=x+v,y=Object.keys(e.grouped_items||{}).length,I=Object.entries(e.grouped_items||{}).map(([C,P])=>({id:C,type:C.toLowerCase().includes("parallel")?"parallel":"sequential",items:P||[]}));return r.jsxs(_,{className:M("p-4 transition-all",t&&"border-primary shadow-sm",f),children:[r.jsxs("div",{className:"flex items-start justify-between gap-3 mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[r.jsx("div",{className:M("p-2 rounded-lg",t?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:r.jsx(ft,{className:"w-5 h-5"})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsx("h3",{className:"font-medium text-foreground truncate",children:h({id:"issues.queue.title"})}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[(g||"legacy").substring(0,20),(g||"legacy").length>20?"...":""]})]})]}),t&&r.jsxs(B,{variant:"success",className:"gap-1 shrink-0",children:[r.jsx(Ai,{className:"w-3 h-3"}),h({id:"issues.queue.status.active"})]}),r.jsx(zu,{queue:e,queueId:g,isActive:t,onActivate:s,onDeactivate:n,onDelete:i,onMerge:o,onSplit:a,isActivating:d,isDeactivating:c,isDeleting:m,isMerging:u,isSplitting:p})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-4",children:[r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsxs("span",{className:"text-muted-foreground",children:[h({id:"issues.queue.items"}),":"]}),r.jsx("span",{className:"font-medium",children:N})]}),r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsxs("span",{className:"text-muted-foreground",children:[h({id:"issues.queue.groups"}),":"]}),r.jsx("span",{className:"font-medium",children:y})]})]}),j>0&&r.jsxs("div",{className:"flex items-center gap-2 p-2 mb-4 bg-destructive/10 rounded-md",children:[r.jsx(Se,{className:"w-4 h-4 text-destructive shrink-0"}),r.jsxs("span",{className:"text-sm text-destructive",children:[j," ",h({id:"issues.queue.conflicts"})]})]}),I.length>0&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-xs font-medium text-muted-foreground uppercase",children:h({id:"issues.queue.executionGroups"})}),r.jsx("div",{className:"space-y-2",children:I.map(C=>r.jsx(Uu,{group:C.id,items:C.items,type:C.type,onItemClick:l},C.id))})]}),I.length===0&&N===0&&r.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:[r.jsx(ft,{className:"w-8 h-8 mx-auto mb-2 opacity-50"}),r.jsx("p",{className:"text-sm",children:h({id:"issues.queue.empty"})})]})]})}function Vr(e){var s;const t=parseInt(((s=e.match(/\d+/))==null?void 0:s[0])||"999");return[Number.isFinite(t)?t:999,e]}function Qu(e){const t=Object.entries(e.grouped_items||{});return t.sort(([s],[n])=>{const[i,o]=Vr(s),[a,l]=Vr(n);return i!==a?i-a:o.localeCompare(l)}),t.map(([s,n])=>{const o=[...n||[]].sort((a,l)=>(a.execution_order||0)-(l.execution_order||0)).map(a=>({...a,id:a.item_id,title:`${a.issue_id} · ${a.solution_id}`,status:a.status}));return{id:s,title:s,items:o,icon:r.jsx(At,{className:"w-4 h-4"})}})}function Yu(e,t){if(!t.destination)return e;const{source:s,destination:n,draggableId:i}=t,o=e.find(m=>m.id===s.droppableId),a=e.find(m=>m.id===n.droppableId);if(!o||!a)return e;const l=o.items.find(m=>m.id===i);if(!l)return e;if(o.id===a.id){const m=[...o.items],[u]=m.splice(s.index,1);return m.splice(n.index,0,u),e.map(p=>p.id===o.id?{...p,items:m}:p)}const d=o.items.filter(m=>m.id!==i),c=[...a.items.slice(0,n.index),l,...a.items.slice(n.index)];return e.map(m=>m.id===o.id?{...m,items:d}:m.id===a.id?{...m,items:c}:m)}function Ju({queue:e,onItemClick:t,className:s}){const{formatMessage:n}=z(),i=st(rt),{reorderQueueGroup:o,moveQueueItem:a,isReordering:l,isMoving:d}=en(),c=b.useMemo(()=>Qu(e),[e]),[m,u]=b.useState(c);b.useEffect(()=>{u(c)},[c]);const p=b.useCallback(async(f,h,g)=>{if(i&&f.destination&&!(h===g&&f.source.index===f.destination.index))try{const x=Yu(m,f);u(x);const v=f.draggableId;if(h===g){const j=x.find(y=>y.id===h),N=((j==null?void 0:j.items)??[]).map(y=>y.item_id);await o(h,N)}else await a(v,g,f.destination.index)}catch{u(c)}},[c,m,a,i,o]);return r.jsxs("div",{className:M("space-y-2",s),children:[r.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[r.jsx(B,{variant:"secondary",className:"gap-1",children:n({id:"issues.queue.stats.executionGroups"})}),(l||d)&&r.jsx("span",{children:n({id:"common.status.running"})})]}),r.jsx(hi,{columns:m,onDragEnd:p,onItemClick:f=>t==null?void 0:t(f),emptyColumnMessage:n({id:"issues.queue.empty"}),renderItem:(f,h)=>{var g;return r.jsxs("div",{ref:h.innerRef,...h.draggableProps,...h.dragHandleProps,onClick:()=>t==null?void 0:t(f),className:M("p-3 bg-card border border-border rounded-lg shadow-sm cursor-pointer","hover:shadow-md hover:border-primary/50 transition-all",f.status==="blocked"&&"border-destructive/50 bg-destructive/5",f.status==="failed"&&"border-destructive/50 bg-destructive/5",f.status==="executing"&&"border-primary/40"),children:[r.jsxs("div",{className:"flex items-start justify-between gap-2",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-xs font-mono text-muted-foreground",children:f.item_id}),r.jsxs("div",{className:"text-sm font-medium text-foreground truncate",children:[f.issue_id," · ",f.solution_id]})]}),r.jsx(B,{variant:"outline",className:"text-xs shrink-0",children:n({id:`issues.queue.status.${f.status}`})})]}),(g=f.depends_on)!=null&&g.length?r.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:[n({id:"issues.solution.overview.dependencies"}),": ",f.depends_on.length]}):null]})}})]})}const Xu=["claude","codex","gemini","qwen"];function Zu({tool:e,mode:t,resumeStrategy:s,onToolChange:n,onModeChange:i,onResumeStrategyChange:o,toolOptions:a=Xu,className:l}){const{formatMessage:d}=z();return r.jsx(_,{className:M("",l),children:r.jsx(Pi,{className:"p-4",children:r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-muted-foreground mb-1",children:d({id:"issues.terminal.exec.tool"})}),r.jsxs(fe,{value:e,onValueChange:c=>n(c),children:[r.jsx(ge,{children:r.jsx(he,{})}),r.jsx(xe,{children:a.map(c=>r.jsx(L,{value:c,children:c},c))})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-muted-foreground mb-1",children:d({id:"issues.terminal.exec.mode"})}),r.jsxs(fe,{value:t,onValueChange:c=>i(c),children:[r.jsx(ge,{children:r.jsx(he,{})}),r.jsxs(xe,{children:[r.jsx(L,{value:"analysis",children:"analysis"}),r.jsx(L,{value:"write",children:"write"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-muted-foreground mb-1",children:d({id:"issues.terminal.exec.resumeStrategy"})}),r.jsxs(fe,{value:s,onValueChange:c=>o(c),children:[r.jsx(ge,{children:r.jsx(he,{})}),r.jsxs(xe,{children:[r.jsx(L,{value:"nativeResume",children:"nativeResume"}),r.jsx(L,{value:"promptConcat",children:"promptConcat"})]})]})]})]})})})}function Hr(e,t){const s=[];if(s.push(`Queue Item: ${e.item_id}`),s.push(`Issue: ${e.issue_id}`),s.push(`Solution: ${e.solution_id}`),e.task_id&&s.push(`Task: ${e.task_id}`),s.push(""),t){t.title&&s.push(`Title: ${t.title}`),t.context&&(s.push(""),s.push("Context:"),s.push(String(t.context)));const n=Array.isArray(t.solutions)?t.solutions.find(i=>(i==null?void 0:i.id)===e.solution_id):void 0;if(n){s.push(""),s.push("Solution Description:"),n.description&&s.push(String(n.description)),n.approach&&(s.push(""),s.push("Approach:"),s.push(String(n.approach)));const i=Array.isArray(n.tasks)?n.tasks:[],o=e.task_id?i.find(a=>(a==null?void 0:a.id)===e.task_id):void 0;o&&(s.push(""),s.push("Task:"),o.title&&s.push(`- ${o.title}`),o.description&&s.push(String(o.description)))}}return s.push(""),s.push("Instruction:"),s.push("Implement the above queue item in this repository. Prefer small, testable changes; run relevant tests; report blockers if any."),s.join(`
|
|
92
92
|
`)}function Ur(e){return`${e}-${Date.now()}-${Math.random().toString(36).slice(2,10)}`}function em({item:e,className:t}){const{formatMessage:s}=z(),n=Ri(),i=st(rt),{issues:o}=Ct(),a=b.useMemo(()=>o.find(G=>G.id===e.issue_id),[o,e.issue_id]),{sessions:l,selectedSessionKey:d,setSelectedSessionKey:c,refreshSessions:m,ensureSession:u,handleCreateSession:p,isLoading:f,error:h}=bo({autoSelectLast:!0,resumeKey:e.issue_id}),[g,x]=b.useState("claude"),[v,j]=b.useState("write"),[N,y]=b.useState("nativeResume"),[I,D]=b.useState("session"),[w,A]=b.useState(!1),[C,P]=b.useState(null),[O,k]=b.useState(null),E=C||h||null,q=Oi(G=>G.addExecution),H=async()=>{A(!0),P(null),k(null);try{const G=await u(),U=Hr(e,a),Y=await Mi(G,{tool:g,prompt:U,mode:v,workingDir:i,category:"user",resumeKey:e.issue_id,resumeStrategy:N},i),$={id:Y.executionId,queueItemId:e.item_id,issueId:e.issue_id,solutionId:e.solution_id,type:"session",sessionKey:G,tool:g,mode:v,status:"running",startedAt:new Date().toISOString()};q($),k(Y.executionId),Bi.getState().openTerminal(G)}catch(G){P(G instanceof Error?G.message:String(G))}finally{A(!1)}},ye=async()=>{A(!0),P(null),k(null);try{const G=await u(),U=Hr(e,a),Y=Ur("node"),$=`Queue ${e.issue_id} / ${e.solution_id}${e.task_id?` / ${e.task_id}`:""}`,Z=`Queue item ${e.item_id} -> Orchestrator`,K=await Li({name:$,description:Z,version:"1.0.0",nodes:[{id:Y,type:"prompt-template",position:{x:100,y:100},data:{label:$,instruction:U,tool:g,mode:v,delivery:"sendToSession",targetSessionKey:G,resumeKey:e.issue_id,resumeStrategy:N,tags:["queue",e.item_id,e.issue_id,e.solution_id].filter(Boolean)}}],edges:[],variables:{},metadata:{source:"local",tags:["queue",e.item_id,e.issue_id,e.solution_id].filter(Boolean)}},i||void 0);if(!K.success)throw new Error("Failed to create flow");const ee=K.data,V=parseInt(String(ee.version??"1"),10),se={...ee,version:Number.isFinite(V)?V:1};ki.getState().setCurrentFlow(se);const we=await _i(K.data.id,{},i||void 0);if(!we.success)throw new Error("Failed to execute flow");const Oe=we.data.execId;zs.getState().startExecution(Oe,K.data.id),zs.getState().setMonitorPanelOpen(!0);const kt={id:Ur("qexec"),queueItemId:e.item_id,issueId:e.issue_id,solutionId:e.solution_id,type:"orchestrator",flowId:K.data.id,execId:Oe,tool:g,mode:v,status:"running",startedAt:new Date().toISOString()};q(kt),k(`${K.data.id} / ${Oe}`),Ks.success(s({id:"issues.queue.orchestrator.sentTitle"}),s({id:"issues.queue.orchestrator.sentDesc"},{flowId:K.data.id})),n("/orchestrator")}catch(G){const U=G instanceof Error?G.message:String(G);P(U),Ks.error(s({id:"issues.queue.orchestrator.sendFailed"}),U)}finally{A(!1)}};return r.jsxs("div",{className:M("space-y-3",t),children:[r.jsxs("div",{className:"flex items-center justify-between gap-2",children:[r.jsx("h3",{className:"text-sm font-semibold text-foreground",children:s({id:"issues.queue.exec.title"})}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs(T,{variant:"outline",size:"sm",onClick:m,disabled:f,className:"gap-2",children:[r.jsx(He,{className:M("h-4 w-4",f&&"animate-spin")}),s({id:"issues.terminal.session.refresh"})]}),r.jsxs(T,{variant:"outline",size:"sm",onClick:p,className:"gap-2",children:[r.jsx(vs,{className:"h-4 w-4"}),s({id:"issues.terminal.session.new"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"block text-xs font-medium text-muted-foreground mb-1",children:s({id:"issues.terminal.session.select"})}),r.jsxs(fe,{value:d,onValueChange:c,children:[r.jsx(ge,{children:r.jsx(he,{placeholder:s({id:"issues.terminal.session.none"})})}),r.jsx(xe,{children:l.length===0?r.jsx(L,{value:"__none__",disabled:!0,children:s({id:"issues.terminal.session.none"})}):l.map(G=>r.jsx(L,{value:G.sessionKey,children:(G.tool||"cli")+" · "+G.sessionKey},G.sessionKey))})]})]}),r.jsx(Zu,{tool:g,mode:v,resumeStrategy:N,onToolChange:x,onModeChange:j,onResumeStrategyChange:y}),r.jsxs(It,{value:I,onValueChange:G=>D(G),className:"w-full",children:[r.jsxs(Dt,{className:"w-full",children:[r.jsxs(oe,{value:"session",className:"flex-1 gap-2",children:[r.jsx(Te,{className:"h-4 w-4"}),s({id:"issues.queue.exec.sessionTab"})]}),r.jsxs(oe,{value:"orchestrator",className:"flex-1 gap-2",children:[r.jsx(Ti,{className:"h-4 w-4"}),s({id:"issues.queue.exec.orchestratorTab"})]})]}),r.jsx(ae,{value:"session",className:"mt-3",children:r.jsx("div",{className:"flex items-center justify-end",children:r.jsx(T,{onClick:H,disabled:w||!i,className:"gap-2",children:w?r.jsxs(r.Fragment,{children:[r.jsx(He,{className:"h-4 w-4 animate-spin"}),s({id:"issues.terminal.exec.run"})]}):s({id:"issues.terminal.exec.run"})})})}),r.jsx(ae,{value:"orchestrator",className:"mt-3",children:r.jsx("div",{className:"flex items-center justify-end",children:r.jsx(T,{onClick:ye,disabled:w||!i,className:"gap-2",children:w?r.jsxs(r.Fragment,{children:[r.jsx(He,{className:"h-4 w-4 animate-spin"}),s({id:"issues.queue.orchestrator.sending"})]}):s({id:"issues.queue.orchestrator.send"})})})})]}),E&&r.jsx("div",{className:"text-sm text-destructive",children:E}),O&&r.jsx("div",{className:"text-xs text-muted-foreground font-mono break-all",children:O})]})}const mt={pending:{label:"issues.queue.status.pending",variant:"secondary",icon:rs},ready:{label:"issues.queue.status.ready",variant:"info",icon:je},executing:{label:"issues.queue.status.executing",variant:"warning",icon:ie},completed:{label:"issues.queue.status.completed",variant:"success",icon:ce},failed:{label:"issues.queue.status.failed",variant:"destructive",icon:xs},blocked:{label:"issues.queue.status.blocked",variant:"destructive",icon:nt}};function tm({item:e,isOpen:t,onClose:s}){const{formatMessage:n}=z(),i=Qr(),[o,a]=b.useState("overview"),{data:l}=ys(),d=e==null?void 0:e.item_id,c=e==null?void 0:e.solution_id;b.useEffect(()=>{if(!t)return;const h=g=>{g.key==="Escape"&&s()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[t,s]),b.useEffect(()=>{!t||!d||a("overview")},[d,t]);const m=b.useMemo(()=>{if(!c)return[];const h=Object.values((l==null?void 0:l.grouped_items)||{}).flat(),g=x=>!!x.task_id||x.item_id.startsWith("task-");return h.filter(x=>x.solution_id===c&&g(x)).sort((x,v)=>x.execution_order-v.execution_order)},[l==null?void 0:l.grouped_items,c]);if(!e||!t)return null;const u=mt[e.status]||mt.pending,p=u.icon,f=e.issue_id;return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:M("fixed inset-0 bg-black/40 transition-opacity z-40",t?"opacity-100":"opacity-0 pointer-events-none"),onClick:s,"aria-hidden":"true"}),r.jsxs("div",{className:M("fixed top-0 right-0 h-full w-1/2 bg-background border-l border-border shadow-2xl z-50 flex flex-col transition-transform duration-300 ease-in-out",t?"translate-x-0":"translate-x-full"),role:"dialog","aria-modal":"true",style:{minWidth:"400px",maxWidth:"800px"},children:[r.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-border bg-card",children:[r.jsxs("div",{className:"flex-1 min-w-0 mr-4",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[r.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:e.item_id}),r.jsxs(B,{variant:u.variant,className:"gap-1",children:[r.jsx(p,{className:"h-3 w-3"}),n({id:u.label})]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsxs("p",{className:"text-sm text-muted-foreground",children:[n({id:"issues.solution.issue"}),": ",r.jsx("span",{className:"font-mono",children:f})]}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:[n({id:"issues.solution.solution"}),": ",r.jsx("span",{className:"font-mono",children:c})]})]})]}),r.jsx(T,{variant:"ghost",size:"icon",onClick:s,className:"flex-shrink-0 hover:bg-secondary",children:r.jsx(bs,{className:"h-5 w-5"})})]}),r.jsx("div",{className:"px-6 pt-4 bg-card",children:r.jsxs(It,{value:o,onValueChange:h=>a(h),className:"w-full",children:[r.jsxs(Dt,{className:"w-full",children:[r.jsxs(oe,{value:"overview",className:"flex-1",children:[r.jsx(Pe,{className:"h-4 w-4 mr-2"}),n({id:"issues.solution.tabs.overview"})]}),r.jsxs(oe,{value:"tasks",className:"flex-1",children:[r.jsx(ce,{className:"h-4 w-4 mr-2"}),n({id:"issues.solution.tabs.tasks"})]}),r.jsxs(oe,{value:"terminal",className:"flex-1",children:[r.jsx(Te,{className:"h-4 w-4 mr-2"}),n({id:"issues.solution.tabs.terminal"})]}),r.jsxs(oe,{value:"json",className:"flex-1",children:[r.jsx(Pe,{className:"h-4 w-4 mr-2"}),n({id:"issues.solution.tabs.json"})]})]}),r.jsxs("div",{className:"overflow-y-auto pr-2",style:{height:"calc(100vh - 200px)"},children:[r.jsx(ae,{value:"overview",className:"mt-4 pb-6 focus-visible:outline-none",children:r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-semibold text-foreground mb-3",children:n({id:"issues.solution.overview.executionInfo"})}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{className:"p-3 bg-muted/50 rounded-md",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:n({id:"issues.solution.overview.executionOrder"})}),r.jsx("p",{className:"text-lg font-semibold",children:e.execution_order})]}),r.jsxs("div",{className:"p-3 bg-muted/50 rounded-md",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:n({id:"issues.solution.overview.semanticPriority"})}),r.jsx("p",{className:"text-lg font-semibold",children:e.semantic_priority})]}),r.jsxs("div",{className:"p-3 bg-muted/50 rounded-md",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:n({id:"issues.solution.overview.group"})}),r.jsx("p",{className:"text-sm font-mono truncate",children:e.execution_group})]}),r.jsxs("div",{className:"p-3 bg-muted/50 rounded-md",children:[r.jsx("p",{className:"text-xs text-muted-foreground",children:n({id:"issues.solution.overview.taskCount"})}),r.jsx("p",{className:"text-lg font-semibold",children:e.task_count||"-"})]})]})]}),r.jsx(em,{item:e}),e.depends_on&&e.depends_on.length>0&&r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-semibold text-foreground mb-2",children:n({id:"issues.solution.overview.dependencies"})}),r.jsx("div",{className:"flex flex-wrap gap-2",children:e.depends_on.map((h,g)=>r.jsx(B,{variant:"outline",className:"font-mono text-xs",children:h},g))})]}),e.files_touched&&e.files_touched.length>0&&r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-semibold text-foreground mb-2",children:n({id:"issues.solution.overview.filesTouched"})}),r.jsx("div",{className:"space-y-1",children:e.files_touched.map((h,g)=>r.jsx("div",{className:"p-2 bg-muted/50 rounded-md",children:r.jsx("span",{className:"text-sm font-mono",children:h})},g))})]})]})}),r.jsx(ae,{value:"tasks",className:"mt-4 pb-6 focus-visible:outline-none",children:m.length===0?r.jsxs("div",{className:"text-center py-12 text-muted-foreground",children:[r.jsx(Pe,{className:"h-12 w-12 mx-auto mb-4 opacity-50"}),r.jsx("p",{className:"text-sm",children:n({id:"issues.solution.tasks.empty"})})]}):r.jsx("div",{className:"space-y-2",children:m.map(h=>{const g=mt[h.status]||mt.pending,x=g.icon,v=h.task_id||h.item_id;return r.jsxs("div",{className:"flex items-center justify-between gap-3 p-3 bg-muted/50 rounded-md",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("p",{className:"text-sm font-mono truncate",children:v}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:[n({id:"issues.solution.overview.executionOrder"}),": ",h.execution_order," · ",n({id:"issues.solution.overview.group"}),": ",h.execution_group]})]}),r.jsxs(B,{variant:g.variant,className:"gap-1 shrink-0",children:[r.jsx(x,{className:M("h-3 w-3",h.status==="executing"&&"animate-spin")}),n({id:g.label})]})]},h.item_id)})})}),r.jsx(ae,{value:"terminal",className:"mt-4 pb-6 focus-visible:outline-none",children:r.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[r.jsx(Te,{className:"h-12 w-12 mb-4 opacity-50"}),r.jsx("p",{className:"text-sm mb-4",children:n({id:"home.terminalPanel.openInPanel"})}),r.jsxs(T,{onClick:()=>{i(f),s()},children:[r.jsx(Te,{className:"h-4 w-4 mr-2"}),n({id:"home.terminalPanel.openInPanel"})]})]})}),r.jsx(ae,{value:"json",className:"mt-4 pb-6 focus-visible:outline-none",children:r.jsx("pre",{className:"p-4 bg-muted rounded-md overflow-x-auto text-xs",children:JSON.stringify(e,null,2)})})]})]})})]})]})}function sm(){return r.jsxs("div",{className:"space-y-6",children:[r.jsx("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[1,2,3,4].map(e=>r.jsxs(_,{className:"p-4",children:[r.jsx("div",{className:"h-6 bg-muted animate-pulse rounded w-16 mb-2"}),r.jsx("div",{className:"h-4 bg-muted animate-pulse rounded w-24"})]},e))}),r.jsx("div",{className:"grid gap-4 md:grid-cols-2",children:[1,2].map(e=>r.jsxs(_,{className:"p-4",children:[r.jsx("div",{className:"h-6 bg-muted animate-pulse rounded w-32 mb-4"}),r.jsx("div",{className:"h-4 bg-muted animate-pulse rounded w-full mb-2"}),r.jsx("div",{className:"h-4 bg-muted animate-pulse rounded w-3/4"})]},e))})]})}function rm(){const{formatMessage:e}=z();return r.jsxs(_,{className:"p-12 text-center",children:[r.jsx(Se,{className:"w-16 h-16 mx-auto text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-medium text-foreground",children:e({id:"issues.queue.emptyState.title"})}),r.jsx("p",{className:"mt-2 text-muted-foreground",children:e({id:"issues.queue.emptyState.description"})})]})}function nm(){var Z,K,ee;const{formatMessage:e}=z(),[t,s]=b.useState(null),[n,i]=b.useState(""),o=ys(),{data:a}=Fi(),l=Gi(n),{activateQueue:d,deactivateQueue:c,deleteQueue:m,mergeQueues:u,splitQueue:p,isActivating:f,isDeactivating:h,isDeleting:g,isMerging:x,isSplitting:v}=en(),j=n&&l.data?l.data:o.data,N=o.isLoading||(n?l.isLoading&&!l.data:!1),y=o.error||l.error,I=((Z=j==null?void 0:j.tasks)==null?void 0:Z.length)||0,D=((K=j==null?void 0:j.solutions)==null?void 0:K.length)||0,w=((ee=j==null?void 0:j.conflicts)==null?void 0:ee.length)||0,A=Object.keys((j==null?void 0:j.grouped_items)||{}).length,C=I+D,P=(a==null?void 0:a.active_queue_id)||null,O=(a==null?void 0:a.active_queue_ids)||[],k=j==null?void 0:j.id;b.useEffect(()=>{n||(P?i(P):k&&i(k))},[P,k,n]);const E=async V=>{try{await d(V)}catch(se){console.error("Failed to activate queue:",se)}},q=async()=>{try{await c()}catch(V){console.error("Failed to deactivate queue:",V)}},H=async V=>{try{await m(V)}catch(se){console.error("Failed to delete queue:",se)}},ye=async(V,se)=>{try{await u(V,se)}catch(we){console.error("Failed to merge queues:",we)}},G=async(V,se)=>{try{await p(V,se)}catch(we){console.error("Failed to split queue:",we)}},U=V=>{s(V)},Y=()=>{s(null)};if(N)return r.jsx(sm,{});if(y)return r.jsxs(_,{className:"p-12 text-center",children:[r.jsx(Se,{className:"w-16 h-16 mx-auto text-destructive/50"}),r.jsx("h3",{className:"mt-4 text-lg font-medium text-foreground",children:e({id:"issues.queue.error.title"})}),r.jsx("p",{className:"mt-2 text-muted-foreground",children:y.message||e({id:"issues.queue.error.message"})})]});if(!j||C===0)return r.jsx(rm,{});const $=k?O.includes(k):C>0&&w===0;return r.jsxs("div",{className:"space-y-6",children:[a&&r.jsx(_,{className:"p-4",children:r.jsxs("div",{className:"flex flex-col md:flex-row md:items-center gap-3 justify-between",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-sm font-semibold text-foreground",children:e({id:"issues.queue.history.title"})}),r.jsxs("div",{className:"text-xs text-muted-foreground mt-1 font-mono",children:[e({id:"issues.queue.history.active"}),":"," ",P||"—"]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs(fe,{value:n,onValueChange:V=>i(V),children:[r.jsx(ge,{className:"w-[260px]",children:r.jsx(he,{placeholder:e({id:"issues.queue.history.select"})})}),r.jsx(xe,{children:(a.queues||[]).length===0?r.jsx(L,{value:"__none__",disabled:!0,children:e({id:"issues.queue.history.empty"})}):a.queues.map(V=>r.jsx(L,{value:V.id,children:V.id},V.id))})]}),r.jsx(T,{variant:"outline",disabled:!n||f,onClick:()=>d(n),children:e({id:"issues.queue.history.activate"})}),r.jsx(T,{variant:"outline",disabled:h,onClick:()=>c(),children:e({id:"issues.queue.actions.deactivate"})})]})]})}),r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ft,{className:"w-5 h-5 text-info"}),r.jsx("span",{className:"text-2xl font-bold",children:C})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"issues.queue.stats.totalItems"})})]}),r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(sn,{className:"w-5 h-5 text-warning"}),r.jsx("span",{className:"text-2xl font-bold",children:A})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"issues.queue.stats.groups"})})]}),r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(je,{className:"w-5 h-5 text-warning"}),r.jsx("span",{className:"text-2xl font-bold",children:I})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"issues.queue.stats.tasks"})})]}),r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(ce,{className:"w-5 h-5 text-success"}),r.jsx("span",{className:"text-2xl font-bold",children:D})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"issues.queue.stats.solutions"})})]})]}),w>0&&r.jsx(_,{className:"p-4 border-destructive/50 bg-destructive/5",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(Se,{className:"w-5 h-5 text-destructive shrink-0"}),r.jsxs("div",{className:"flex-1",children:[r.jsx("h4",{className:"font-medium text-destructive",children:e({id:"issues.queue.conflicts.title"})}),r.jsxs("p",{className:"text-sm text-muted-foreground mt-1",children:[w," ",e({id:"issues.queue.conflicts.description"})]})]})]})}),r.jsx(Ku,{queue:j,isActive:$,onActivate:E,onDeactivate:q,onDelete:H,onMerge:ye,onSplit:G,onItemClick:U,isActivating:f,isDeactivating:h,isDeleting:g,isMerging:x,isSplitting:v},j.id||"legacy"),r.jsx(Ju,{queue:j,onItemClick:U}),r.jsx(tm,{item:t,isOpen:t!==null,onClose:Y}),r.jsxs("div",{className:"flex items-center justify-between p-4 bg-muted/50 rounded-lg",children:[r.jsx("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:$?r.jsxs(r.Fragment,{children:[r.jsx(ce,{className:"w-4 h-4 text-success"}),e({id:"issues.queue.status.ready"})]}):r.jsxs(r.Fragment,{children:[r.jsx(je,{className:"w-4 h-4 text-warning"}),e({id:"issues.queue.status.pending"})]})}),r.jsxs(B,{variant:$?"success":"secondary",className:"gap-1",children:[$?r.jsx(ce,{className:"w-3 h-3"}):r.jsx(je,{className:"w-3 h-3"}),e($?{id:"issues.queue.status.active"}:{id:"issues.queue.status.inactive"})]})]})]})}const im={running:{icon:je,variant:"warning",label:"issues.discovery.session.status.running"},completed:{icon:ce,variant:"success",label:"issues.discovery.session.status.completed"},failed:{icon:xs,variant:"destructive",label:"issues.discovery.session.status.failed"}};function om({session:e,isActive:t,onClick:s}){const{formatMessage:n}=z(),i=im[e.status],o=i.icon,a=l=>new Date(l).toLocaleString();return r.jsxs(_,{className:M("p-4 cursor-pointer transition-all hover:shadow-md",t&&"ring-2 ring-primary"),onClick:s,children:[r.jsxs("div",{className:"flex items-start justify-between mb-3",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-1 min-w-0",children:[r.jsx(gt,{className:"w-5 h-5 text-primary flex-shrink-0"}),r.jsx("h3",{className:"font-medium text-foreground truncate",children:e.name})]}),r.jsxs(B,{variant:i.variant,className:"flex-shrink-0",children:[r.jsx(o,{className:"w-3 h-3 mr-1"}),n({id:i.label})]})]}),e.status==="running"&&r.jsxs("div",{className:"mb-3",children:[r.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground mb-1",children:[r.jsx("span",{children:n({id:"issues.discovery.progress"})}),r.jsxs("span",{children:[e.progress,"%"]})]}),r.jsx(tn,{value:e.progress,className:"h-2"})]}),r.jsxs("div",{className:"flex items-center justify-between text-sm",children:[r.jsx("div",{className:"flex items-center gap-4",children:r.jsxs("div",{className:"flex items-center gap-1",children:[r.jsxs("span",{className:"text-muted-foreground",children:[n({id:"issues.discovery.session.findings"},{count:e.findings_count}),":"]}),r.jsx("span",{className:"font-medium text-foreground",children:e.findings_count})]})}),r.jsx("span",{className:"text-xs text-muted-foreground",children:a(e.created_at)})]})]})}const am={critical:{label:"issues.discovery.findings.severity.critical",variant:"destructive"},high:{label:"issues.discovery.findings.severity.high",variant:"destructive"},medium:{label:"issues.discovery.findings.severity.medium",variant:"warning"},low:{label:"issues.discovery.findings.severity.low",variant:"secondary"}};function lm(e){return am[e]||{label:"issues.discovery.findings.severity.unknown",variant:"outline"}}function cm({finding:e,isOpen:t,onClose:s}){const{formatMessage:n}=z();if(b.useEffect(()=>{if(!t)return;const o=a=>{a.key==="Escape"&&s()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[t,s]),!e||!t)return null;const i=lm(e.severity);return r.jsxs(r.Fragment,{children:[r.jsx("div",{className:M("fixed inset-0 bg-black/40 transition-opacity z-40",t?"opacity-100":"opacity-0 pointer-events-none"),onClick:s,"aria-hidden":"true"}),r.jsxs("div",{className:M("fixed top-0 right-0 h-full w-1/2 bg-background border-l border-border shadow-2xl z-50 flex flex-col transition-transform duration-300 ease-in-out",t?"translate-x-0":"translate-x-full"),role:"dialog","aria-modal":"true",style:{minWidth:"400px",maxWidth:"800px"},children:[r.jsxs("div",{className:"flex items-start justify-between p-6 border-b border-border bg-card",children:[r.jsxs("div",{className:"flex-1 min-w-0 mr-4",children:[r.jsxs("div",{className:"flex items-center gap-2 mb-2 flex-wrap",children:[r.jsx("span",{className:"text-xs font-mono text-muted-foreground",children:e.id}),r.jsx(B,{variant:i.variant,children:n({id:i.label})}),e.type&&r.jsx(B,{variant:"outline",children:e.type}),e.category&&r.jsx(B,{variant:"info",children:e.category})]}),r.jsx("h2",{className:"text-lg font-semibold text-foreground",children:e.title})]}),r.jsx(T,{variant:"ghost",size:"icon",onClick:s,className:"flex-shrink-0 hover:bg-secondary",children:r.jsx(bs,{className:"h-5 w-5"})})]}),r.jsxs("div",{className:"flex-1 overflow-y-auto p-6 space-y-6",children:[r.jsxs("div",{children:[r.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-2 flex items-center gap-2",children:[r.jsx(nt,{className:"h-4 w-4"}),n({id:"issues.discovery.findings.description"})]}),r.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:e.description})]}),e.file&&r.jsxs("div",{children:[r.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-2 flex items-center gap-2",children:[r.jsx(uo,{className:"h-4 w-4"}),n({id:"issues.discovery.findings.location"})]}),r.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[r.jsx(Pe,{className:"h-4 w-4 text-muted-foreground"}),r.jsxs("code",{className:"px-2 py-1 bg-muted rounded text-xs",children:[e.file,e.line&&`:${e.line}`]})]})]}),e.code_snippet&&r.jsxs("div",{children:[r.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-2 flex items-center gap-2",children:[r.jsx($i,{className:"h-4 w-4"}),n({id:"issues.discovery.findings.codeSnippet"})]}),r.jsx("pre",{className:"p-3 bg-muted rounded-md overflow-x-auto text-xs border border-border",children:r.jsx("code",{children:e.code_snippet})})]}),e.suggested_issue&&r.jsxs("div",{children:[r.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-2 flex items-center gap-2",children:[r.jsx(mo,{className:"h-4 w-4"}),n({id:"issues.discovery.findings.suggestedFix"})]}),r.jsx("p",{className:"text-sm text-muted-foreground whitespace-pre-wrap",children:e.suggested_issue})]}),e.confidence!==void 0&&r.jsxs("div",{children:[r.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-2 flex items-center gap-2",children:[r.jsx(po,{className:"h-4 w-4"}),n({id:"issues.discovery.findings.confidence"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("div",{className:"flex-1 h-2 bg-muted rounded-full overflow-hidden",children:r.jsx("div",{className:M("h-full transition-all",e.confidence>=.9?"bg-green-500":e.confidence>=.7?"bg-yellow-500":"bg-red-500"),style:{width:`${e.confidence*100}%`}})}),r.jsxs("span",{className:"text-sm font-medium",children:[Math.round(e.confidence*100),"%"]})]})]}),e.reference&&r.jsxs("div",{children:[r.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-2 flex items-center gap-2",children:[r.jsx(hs,{className:"h-4 w-4"}),n({id:"issues.discovery.findings.reference"})]}),r.jsx("a",{href:e.reference,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary hover:underline break-all",children:e.reference})]}),e.perspective&&r.jsx("div",{className:"pt-4 border-t border-border",children:r.jsxs(B,{variant:"secondary",className:"text-xs",children:[n({id:"issues.discovery.findings.perspective"}),": ",e.perspective]})})]})]})]})}const dm={critical:{variant:"destructive",label:"issues.discovery.findings.severity.critical"},high:{variant:"destructive",label:"issues.discovery.findings.severity.high"},medium:{variant:"warning",label:"issues.discovery.findings.severity.medium"},low:{variant:"secondary",label:"issues.discovery.findings.severity.low"}};function um(e){return dm[e]||{variant:"outline",label:"issues.discovery.findings.severity.unknown"}}function mm({findings:e,filters:t,onFilterChange:s,onFindingClick:n,selectedIds:i=[],onSelectionChange:o}){const{formatMessage:a}=z(),[l,d]=b.useState(new Set),c=o?new Set(i):l,m=g=>{const x=new Set(c);x.has(g)?x.delete(g):x.add(g),o?o(Array.from(x)):d(x)},u=()=>{const x=c.size===e.length&&e.length>0?new Set:new Set(e.map(v=>v.id));o?o(Array.from(x)):d(x)},p=e.length>0&&c.size===e.length,f=c.size>0&&c.size<e.length,h=Array.from(new Set(e.map(g=>g.type))).sort();return e.length===0?r.jsxs(_,{className:"p-8 text-center",children:[r.jsx(nt,{className:"w-12 h-12 mx-auto text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-medium text-foreground",children:a({id:"issues.discovery.findings.noFindings"})}),r.jsx("p",{className:"mt-2 text-muted-foreground",children:a({id:"issues.discovery.findings.noFindingsDescription"})})]}):r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex flex-col sm:flex-row gap-3",children:[r.jsxs("div",{className:"relative flex-1",children:[r.jsx(Zr,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),r.jsx(Et,{placeholder:a({id:"issues.discovery.findings.searchPlaceholder"}),value:t.search||"",onChange:g=>s({...t,search:g.target.value||void 0}),className:"pl-9"})]}),r.jsxs(fe,{value:t.severity||"all",onValueChange:g=>s({...t,severity:g==="all"?void 0:g}),children:[r.jsx(ge,{className:"w-[140px]",children:r.jsx(he,{placeholder:a({id:"issues.discovery.findings.filterBySeverity"})})}),r.jsxs(xe,{children:[r.jsx(L,{value:"all",children:a({id:"issues.discovery.findings.severity.all"})}),r.jsx(L,{value:"critical",children:a({id:"issues.discovery.findings.severity.critical"})}),r.jsx(L,{value:"high",children:a({id:"issues.discovery.findings.severity.high"})}),r.jsx(L,{value:"medium",children:a({id:"issues.discovery.findings.severity.medium"})}),r.jsx(L,{value:"low",children:a({id:"issues.discovery.findings.severity.low"})})]})]}),h.length>0&&r.jsxs(fe,{value:t.type||"all",onValueChange:g=>s({...t,type:g==="all"?void 0:g}),children:[r.jsx(ge,{className:"w-[140px]",children:r.jsx(he,{placeholder:a({id:"issues.discovery.findings.filterByType"})})}),r.jsxs(xe,{children:[r.jsx(L,{value:"all",children:a({id:"issues.discovery.findings.type.all"})}),h.map(g=>r.jsx(L,{value:g,children:g},g))]})]}),r.jsxs(fe,{value:t.exported===void 0?"all":t.exported?"exported":"notExported",onValueChange:g=>{s(g==="all"?{...t,exported:void 0}:g==="exported"?{...t,exported:!0}:{...t,exported:!1})},children:[r.jsx(ge,{className:"w-[140px]",children:r.jsx(he,{placeholder:a({id:"issues.discovery.findings.filterByExported"})})}),r.jsxs(xe,{children:[r.jsx(L,{value:"all",children:a({id:"issues.discovery.findings.exportedStatus.all"})}),r.jsx(L,{value:"exported",children:a({id:"issues.discovery.findings.exportedStatus.exported"})}),r.jsx(L,{value:"notExported",children:a({id:"issues.discovery.findings.exportedStatus.notExported"})})]})]}),r.jsxs(fe,{value:t.hasIssue===void 0?"all":t.hasIssue?"hasIssue":"noIssue",onValueChange:g=>{s(g==="all"?{...t,hasIssue:void 0}:g==="hasIssue"?{...t,hasIssue:!0}:{...t,hasIssue:!1})},children:[r.jsx(ge,{className:"w-[140px]",children:r.jsx(he,{placeholder:a({id:"issues.discovery.findings.filterByIssue"})})}),r.jsxs(xe,{children:[r.jsx(L,{value:"all",children:a({id:"issues.discovery.findings.issueStatus.all"})}),r.jsx(L,{value:"hasIssue",children:a({id:"issues.discovery.findings.issueStatus.hasIssue"})}),r.jsx(L,{value:"noIssue",children:a({id:"issues.discovery.findings.issueStatus.noIssue"})})]})]})]}),o&&r.jsxs("button",{onClick:u,className:"flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[r.jsx("div",{className:"w-4 h-4 border rounded flex items-center justify-center",children:p?r.jsx(Qs,{className:"w-3 h-3"}):f?r.jsx("div",{className:"w-2 h-2 bg-foreground rounded-sm"}):null}),a(p?{id:"issues.discovery.findings.deselectAll"}:{id:"issues.discovery.findings.selectAll"})]}),r.jsx("div",{className:"space-y-3",children:e.map(g=>{const x=um(g.severity),v=c.has(g.id);return r.jsx(_,{className:M("p-4 transition-colors",n&&"cursor-pointer hover:bg-muted/50"),onClick:j=>{j.target.closest(".selection-checkbox")||n==null||n(g)},children:r.jsxs("div",{className:"flex items-start gap-3",children:[o&&r.jsx("div",{className:"selection-checkbox flex-shrink-0 mt-1",onClick:j=>{j.stopPropagation(),m(g.id)},children:r.jsx("div",{className:M("w-4 h-4 border rounded flex items-center justify-center cursor-pointer transition-colors",v?"bg-primary border-primary":"border-border hover:border-primary"),children:v&&r.jsx(Qs,{className:"w-3 h-3 text-primary-foreground"})})}),r.jsxs("div",{className:"flex-1 min-w-0",children:[r.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[r.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[r.jsx(B,{variant:x.variant,children:a({id:x.label})}),g.type&&r.jsx(B,{variant:"outline",className:"text-xs",children:g.type}),g.exported&&r.jsxs(B,{variant:"success",className:"text-xs gap-1",children:[r.jsx(hs,{className:"w-3 h-3"}),a({id:"issues.discovery.findings.exported"})]}),g.issue_id&&r.jsxs(B,{variant:"info",className:"text-xs",children:[a({id:"issues.discovery.findings.hasIssue"}),": ",g.issue_id]})]}),g.file&&r.jsxs("div",{className:"flex items-center gap-1 text-xs text-muted-foreground",children:[r.jsx(Wi,{className:"w-3 h-3"}),r.jsx("span",{children:g.file}),g.line&&r.jsxs("span",{children:[":",g.line]})]})]}),r.jsx("h4",{className:"font-medium text-foreground mb-1",children:g.title}),r.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:g.description}),g.code_snippet&&r.jsx("pre",{className:"mt-2 p-2 bg-muted rounded text-xs overflow-x-auto",children:r.jsx("code",{children:g.code_snippet})})]})]})},g.id)})}),r.jsx("div",{className:"text-center text-sm text-muted-foreground",children:a({id:"issues.discovery.findings.showingCount"},{count:e.length})})]})}function pm({sessionId:e,session:t,findings:s,filters:n,onFilterChange:i,onExport:o,onExportSelected:a,isExporting:l=!1,issues:d=[]}){const{formatMessage:c}=z(),[m,u]=b.useState("findings"),[p,f]=b.useState(null),[h,g]=b.useState(null),[x,v]=b.useState([]),j=C=>{if(C.issue_id){const P=d.find(O=>O.id===C.issue_id);if(P){f(P);return}}g(C)},N=()=>{f(null)},y=()=>{g(null)},I=async()=>{a&&x.length>0&&(await a(x),v([]))};if(!t)return r.jsxs(_,{className:"p-8 text-center",children:[r.jsx(Pe,{className:"w-12 h-12 mx-auto text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-medium text-foreground",children:c({id:"issues.discovery.noSessionSelected"})}),r.jsx("p",{className:"mt-2 text-muted-foreground",children:c({id:"issues.discovery.selectSession"})})]});const D=s.reduce((C,P)=>(C[P.severity]=(C[P.severity]||0)+1,C),{critical:0,high:0,medium:0,low:0}),w=s.reduce((C,P)=>(C[P.type]=(C[P.type]||0)+1,C),{}),A=C=>new Date(C).toLocaleString();return r.jsxs("div",{className:"space-y-4",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h2",{className:"text-lg font-semibold text-foreground",children:t.name}),r.jsxs("p",{className:"text-sm text-muted-foreground",children:[c({id:"issues.discovery.sessionId"}),": ",t.id]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[x.length>0&&a&&r.jsxs(T,{variant:"default",onClick:I,disabled:l||x.length===0,children:[r.jsx(fo,{className:"w-4 h-4 mr-2"}),l?c({id:"issues.discovery.exporting"}):c({id:"issues.discovery.exportSelected"},{count:x.length})]}),r.jsxs(T,{variant:"outline",onClick:o,disabled:s.length===0,children:[r.jsx(qi,{className:"w-4 h-4 mr-2"}),c({id:"issues.discovery.export"})]})]})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx(B,{variant:t.status==="completed"?"success":t.status==="failed"?"destructive":"warning",children:c({id:`issues.discovery.session.status.${t.status}`})}),r.jsxs("span",{className:"text-sm text-muted-foreground",children:[c({id:"issues.discovery.createdAt"}),": ",A(t.created_at)]}),t.completed_at&&r.jsxs("span",{className:"text-sm text-muted-foreground",children:[c({id:"issues.discovery.completedAt"}),": ",A(t.completed_at)]})]}),t.status==="running"&&r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center justify-between text-sm mb-2",children:[r.jsx("span",{className:"text-muted-foreground",children:c({id:"issues.discovery.progress"})}),r.jsxs("span",{className:"font-medium",children:[t.progress,"%"]})]}),r.jsx(tn,{value:t.progress,className:"h-2"})]}),r.jsxs(It,{value:m,onValueChange:u,children:[r.jsxs(Dt,{children:[r.jsxs(oe,{value:"findings",children:[r.jsx(Pe,{className:"w-4 h-4 mr-2"}),c({id:"issues.discovery.tabFindings"})," (",s.length,")"]}),r.jsxs(oe,{value:"progress",children:[r.jsx(Vi,{className:"w-4 h-4 mr-2"}),c({id:"issues.discovery.tabProgress"})]}),r.jsxs(oe,{value:"info",children:[r.jsx(ss,{className:"w-4 h-4 mr-2"}),c({id:"issues.discovery.tabInfo"})]})]}),r.jsx(ae,{value:"findings",className:"mt-4",children:r.jsx(mm,{findings:s,filters:n,onFilterChange:i,onFindingClick:j,selectedIds:x,onSelectionChange:a?v:void 0})}),r.jsxs(ae,{value:"progress",className:"mt-4 space-y-4",children:[r.jsxs(_,{className:"p-6",children:[r.jsx("h3",{className:"text-lg font-medium text-foreground mb-4",children:c({id:"issues.discovery.severityBreakdown"})}),r.jsx("div",{className:"space-y-3",children:Object.entries(D).map(([C,P])=>r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(B,{variant:C==="critical"||C==="high"?"destructive":C==="medium"?"warning":"secondary",children:c({id:`issues.discovery.findings.severity.${C}`})}),r.jsx("span",{className:"font-medium",children:P})]},C))})]}),Object.keys(w).length>0&&r.jsxs(_,{className:"p-6",children:[r.jsx("h3",{className:"text-lg font-medium text-foreground mb-4",children:c({id:"issues.discovery.typeBreakdown"})}),r.jsx("div",{className:"space-y-3",children:Object.entries(w).sort(([,C],[,P])=>P-C).map(([C,P])=>r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(B,{variant:"outline",children:C}),r.jsx("span",{className:"font-medium",children:P})]},C))})]})]}),r.jsx(ae,{value:"info",className:"mt-4",children:r.jsxs(_,{className:"p-6 space-y-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-1",children:c({id:"issues.discovery.sessionId"})}),r.jsx("p",{className:"text-foreground font-mono text-sm",children:t.id})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-1",children:c({id:"issues.discovery.name"})}),r.jsx("p",{className:"text-foreground",children:t.name})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-1",children:c({id:"issues.discovery.status"})}),r.jsx(B,{variant:t.status==="completed"?"success":t.status==="failed"?"destructive":"warning",children:c({id:`issues.discovery.session.status.${t.status}`})})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-1",children:c({id:"issues.discovery.progress"})}),r.jsxs("p",{className:"text-foreground",children:[t.progress,"%"]})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-1",children:c({id:"issues.discovery.findingsCount"})}),r.jsx("p",{className:"text-foreground",children:t.findings_count})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-1",children:c({id:"issues.discovery.createdAt"})}),r.jsx("p",{className:"text-foreground",children:A(t.created_at)})]}),t.completed_at&&r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-medium text-muted-foreground mb-1",children:c({id:"issues.discovery.completedAt"})}),r.jsx("p",{className:"text-foreground",children:A(t.completed_at)})]})]})})]}),r.jsx(nn,{issue:p,isOpen:p!==null,onClose:N}),r.jsx(cm,{finding:h,isOpen:h!==null,onClose:y})]})}function fm(){const{formatMessage:e}=z(),{sessions:t,activeSession:s,findings:n,isLoadingSessions:i,isLoadingFindings:o,error:a,filters:l,setFilters:d,selectSession:c,exportFindings:m,exportSelectedFindings:u,isExporting:p}=Hi({refetchInterval:3e3}),{issues:f}=Ct({filter:void 0});return a?r.jsxs(_,{className:"p-8 text-center",children:[r.jsx(Se,{className:"w-12 h-12 mx-auto text-destructive"}),r.jsx("h3",{className:"mt-4 text-lg font-medium text-foreground",children:e({id:"common.error"})}),r.jsx("p",{className:"mt-2 text-muted-foreground",children:a.message})]}):r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(gt,{className:"w-5 h-5 text-primary"}),r.jsx("span",{className:"text-2xl font-bold",children:t.length})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"issues.discovery.totalSessions"})})]}),r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(B,{variant:"success",className:"w-5 h-5 flex items-center justify-center p-0",children:t.filter(h=>h.status==="completed").length}),r.jsx("span",{className:"text-2xl font-bold",children:t.filter(h=>h.status==="completed").length})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"issues.discovery.completedSessions"})})]}),r.jsxs(_,{className:"p-4",children:[r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx(B,{variant:"warning",className:"w-5 h-5 flex items-center justify-center p-0",children:t.filter(h=>h.status==="running").length}),r.jsx("span",{className:"text-2xl font-bold",children:t.filter(h=>h.status==="running").length})]}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"issues.discovery.runningSessions"})})]}),r.jsxs(_,{className:"p-4",children:[r.jsx("div",{className:"flex items-center gap-2",children:r.jsx("span",{className:"text-2xl font-bold",children:t.reduce((h,g)=>h+g.findings_count,0)})}),r.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e({id:"issues.discovery.totalFindings"})})]})]}),r.jsxs("div",{className:"grid md:grid-cols-3 gap-6",children:[r.jsxs("div",{className:"md:col-span-1 space-y-4",children:[r.jsx("h2",{className:"text-lg font-medium text-foreground",children:e({id:"issues.discovery.sessionList"})}),i?r.jsx("div",{className:"space-y-3",children:[1,2,3].map(h=>r.jsx("div",{className:"h-32 bg-muted animate-pulse rounded-lg"},h))}):t.length===0?r.jsxs(_,{className:"p-8 text-center",children:[r.jsx(gt,{className:"w-12 h-12 mx-auto text-muted-foreground/50"}),r.jsx("h3",{className:"mt-4 text-lg font-medium text-foreground",children:e({id:"issues.discovery.noSessions"})}),r.jsx("p",{className:"mt-2 text-sm text-muted-foreground",children:e({id:"issues.discovery.noSessionsDescription"})})]}):r.jsx("div",{className:"space-y-3",children:t.map(h=>r.jsx(om,{session:h,isActive:(s==null?void 0:s.id)===h.id,onClick:()=>c(h.id)},h.id))})]}),r.jsxs("div",{className:"md:col-span-2 space-y-4",children:[r.jsx("h2",{className:"text-lg font-medium text-foreground",children:e({id:"issues.discovery.findingsDetail"})}),o?r.jsx("div",{className:"flex items-center justify-center p-8",children:r.jsx(ie,{className:"w-8 h-8 animate-spin text-muted-foreground"})}):r.jsx(pm,{sessionId:(s==null?void 0:s.id)||"",session:s,findings:n,filters:l,onFilterChange:d,onExport:m,onExportSelected:u,isExporting:p,issues:f})]})]})]})}const zr=["issues","queue","discovery"],es={bug:{label:"Bug",description:"功能异常或错误",color:"bg-red-500"},feature:{label:"Feature",description:"新功能需求",color:"bg-green-500"},improvement:{label:"Improvement",description:"现有功能改进",color:"bg-blue-500"},other:{label:"Other",description:"其他类型",color:"bg-gray-500"}};function gm({open:e,onOpenChange:t,onSubmit:s,isCreating:n}){const{formatMessage:i}=z(),[o,a]=b.useState(""),[l,d]=b.useState(""),[c,m]=b.useState("medium"),[u,p]=b.useState("other"),[f,h]=b.useState([]),[g,x]=b.useState(!1),v=w=>{if(!w)return;const A=Array.from(w).filter(C=>["image/","text/","application/pdf",".md",".txt",".json"].some(O=>C.type.includes(O)||C.name.endsWith(O)));h(C=>[...C,...A])},j=w=>{h(A=>A.filter((C,P)=>P!==w))},N=w=>{w.preventDefault(),o.trim()&&(s({title:o.trim(),context:l.trim()||void 0,priority:c,type:u,attachments:f.length>0?f:void 0}),a(""),d(""),m("medium"),p("other"),h([]),t(!1))},y=w=>{w.preventDefault(),x(!0)},I=()=>{x(!1)},D=w=>{w.preventDefault(),x(!1),v(w.dataTransfer.files)};return r.jsx(ns,{open:e,onOpenChange:t,children:r.jsxs(is,{className:"sm:max-w-[600px] max-h-[90vh] overflow-y-auto",children:[r.jsx(os,{children:r.jsx(as,{children:i({id:"issues.createDialog.title"})})}),r.jsxs("form",{onSubmit:N,className:"space-y-5 mt-4",children:[r.jsxs("div",{children:[r.jsxs($e,{className:"text-sm font-medium",children:[i({id:"issues.createDialog.labels.title"}),r.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),r.jsx(Et,{value:o,onChange:w=>a(w.target.value),placeholder:i({id:"issues.createDialog.placeholders.title"}),className:"mt-1.5",required:!0,autoFocus:!0}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[o.length,"/200"]})]}),r.jsxs("div",{children:[r.jsx($e,{className:"text-sm font-medium",children:i({id:"issues.createDialog.labels.context"})}),r.jsx("textarea",{value:l,onChange:w=>d(w.target.value),placeholder:i({id:"issues.createDialog.placeholders.context"}),className:"mt-1.5 w-full min-h-[120px] p-3 bg-background border border-input rounded-md text-sm resize-y focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"}),r.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:[l.length,"/10000"]})]}),r.jsxs("div",{children:[r.jsx($e,{className:"text-sm font-medium",children:i({id:"issues.createDialog.labels.type",defaultMessage:"类型"})}),r.jsx("div",{className:"grid grid-cols-4 gap-2 mt-1.5",children:Object.keys(es).map(w=>r.jsx("button",{type:"button",onClick:()=>p(w),className:M("px-3 py-2 rounded-md border text-sm transition-all",u===w?"border-primary bg-primary/10 ring-1 ring-primary":"border-border hover:border-primary/50 hover:bg-muted/50"),children:r.jsxs("div",{className:"flex items-center justify-center gap-1.5",children:[r.jsx("span",{className:M("w-2 h-2 rounded-full",es[w].color)}),r.jsx("span",{children:es[w].label})]})},w))})]}),r.jsxs("div",{children:[r.jsx($e,{className:"text-sm font-medium",children:i({id:"issues.createDialog.labels.priority"})}),r.jsxs(fe,{value:c,onValueChange:w=>m(w),children:[r.jsx(ge,{className:"mt-1.5",children:r.jsx(he,{})}),r.jsxs(xe,{children:[r.jsx(L,{value:"low",children:i({id:"issues.priority.low"})}),r.jsx(L,{value:"medium",children:i({id:"issues.priority.medium"})}),r.jsx(L,{value:"high",children:i({id:"issues.priority.high"})}),r.jsx(L,{value:"critical",children:i({id:"issues.priority.critical"})})]})]})]}),r.jsxs("div",{children:[r.jsx($e,{className:"text-sm font-medium",children:i({id:"issues.createDialog.labels.attachments",defaultMessage:"附件"})}),r.jsx("div",{className:M("mt-1.5 border-2 border-dashed rounded-lg p-4 transition-colors cursor-pointer",g?"border-primary bg-primary/5":"border-border hover:border-primary/50"),onDragOver:y,onDragLeave:I,onDrop:D,onClick:()=>{const w=document.createElement("input");w.type="file",w.multiple=!0,w.accept="image/*,.md,.txt,.json,.pdf",w.onchange=A=>v(A.target.files),w.click()},children:r.jsxs("div",{className:"flex flex-col items-center justify-center text-muted-foreground py-2",children:[r.jsx("svg",{className:"w-8 h-8 mb-2",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r.jsx("p",{className:"text-sm",children:"拖拽文件到此处,或点击上传"}),r.jsx("p",{className:"text-xs mt-1",children:"支持图片、Markdown、文本、PDF"})]})}),f.length>0&&r.jsx("div",{className:"mt-2 space-y-1.5",children:f.map((w,A)=>r.jsxs("div",{className:"flex items-center justify-between p-2 bg-muted/50 rounded-md",children:[r.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[w.type.startsWith("image/")?r.jsx("img",{src:URL.createObjectURL(w),alt:w.name,className:"w-8 h-8 object-cover rounded"}):r.jsx("svg",{className:"w-8 h-8 text-muted-foreground",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),r.jsx("span",{className:"text-sm truncate",children:w.name}),r.jsxs("span",{className:"text-xs text-muted-foreground",children:[(w.size/1024).toFixed(1),"KB"]})]}),r.jsx("button",{type:"button",onClick:C=>{C.stopPropagation(),j(A)},className:"text-muted-foreground hover:text-destructive transition-colors",children:r.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]},A))})]}),r.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[r.jsx(T,{type:"button",variant:"outline",onClick:()=>t(!1),children:i({id:"issues.createDialog.buttons.cancel"})}),r.jsx(T,{type:"submit",disabled:n||!o.trim(),children:n?r.jsxs(r.Fragment,{children:[r.jsx(ie,{className:"w-4 h-4 mr-2 animate-spin"}),i({id:"issues.createDialog.buttons.creating"})]}):r.jsxs(r.Fragment,{children:[r.jsx(vs,{className:"w-4 h-4 mr-2"}),i({id:"issues.createDialog.buttons.create"})]})})]})]})]})})}function Om(){const{formatMessage:e}=z(),[t,s]=Ui(),n=t.get("tab"),i=zr.includes(n)?n:"issues",{error:o,success:a}=zi();b.useEffect(()=>{zr.includes(n)||s({tab:"issues"})},[n,s]);const[l,d]=b.useState(!1),[c,m]=b.useState(!1),[u,p]=b.useState(!1),f=Ys(Ki),h=Ys(O=>O.toggleImmersiveMode),{refetch:g,isFetching:x}=Ct(),{refetch:v,isFetching:j}=ys(),{createIssue:N,isCreating:y}=Xr(),I=O=>{s({tab:O})},D=b.useCallback(()=>{g()},[g]),w=b.useCallback(async()=>{m(!0);try{const O=await Qi({state:"open",limit:100});a(e({id:"issues.notifications.githubSyncSuccess"},{count:O.total})),await g()}catch(O){o(e({id:"issues.notifications.githubSyncFailed"}),O instanceof Error?O.message:String(O)),console.error("GitHub sync failed:",O)}finally{m(!1)}},[g,a,o,e]),A=async O=>{try{const k=await N({title:O.title,context:O.context,priority:O.priority});if(a(e({id:"issues.notifications.createSuccess"}),k.id),O.attachments&&O.attachments.length>0&&k.id){p(!0);try{await Yi(k.id,O.attachments),a(e({id:"issues.notifications.attachmentSuccess"}))}catch(E){o(e({id:"issues.notifications.attachmentFailed"}),E instanceof Error?E.message:String(E)),console.error("Failed to upload attachments:",E)}finally{p(!1)}}d(!1)}catch(k){o(e({id:"issues.notifications.createFailed"}),k instanceof Error?k.message:String(k)),console.error("Failed to create issue:",k)}},C=b.useCallback(()=>{v()},[v]),P=()=>{switch(i){case"issues":return r.jsxs(r.Fragment,{children:[r.jsxs(T,{variant:"outline",onClick:D,disabled:x,children:[r.jsx(He,{className:M("w-4 h-4 mr-2",x&&"animate-spin")}),e({id:"common.actions.refresh"})]}),r.jsxs(T,{variant:"outline",onClick:w,disabled:c,children:[r.jsx(xo,{className:M("w-4 h-4 mr-2",c&&"animate-spin")}),e({id:"issues.actions.github"})]}),r.jsxs(T,{onClick:()=>d(!0),children:[r.jsx(vs,{className:"w-4 h-4 mr-2"}),e({id:"issues.actions.create"})]})]});case"queue":return r.jsx(r.Fragment,{children:r.jsxs(T,{variant:"outline",onClick:C,disabled:j,children:[r.jsx(He,{className:M("w-4 h-4 mr-2",j&&"animate-spin")}),e({id:"common.actions.refresh"})]})});case"discovery":return null;default:return null}};return r.jsxs("div",{className:M("space-y-6",f&&"h-screen overflow-hidden"),children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx(vo,{currentTab:i}),r.jsxs("div",{className:"flex items-center gap-2",children:[P(),r.jsx("button",{onClick:h,className:M("p-2 rounded-md transition-colors",f?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"),title:e(f?{id:"issueHub.exitFullscreen",defaultMessage:"Exit Fullscreen"}:{id:"issueHub.fullscreen",defaultMessage:"Fullscreen"}),children:f?r.jsx(go,{className:"w-4 h-4"}):r.jsx(ho,{className:"w-4 h-4"})})]})]}),r.jsx(yo,{currentTab:i,onTabChange:I}),i==="issues"&&r.jsx(Hu,{onCreateIssue:()=>d(!0)}),i==="queue"&&r.jsx(nm,{}),i==="discovery"&&r.jsx(fm,{}),r.jsx(gm,{open:l,onOpenChange:d,onSubmit:A,isCreating:y||u})]})}export{Om as IssueHubPage,Om as default};
|
|
93
|
-
//# sourceMappingURL=IssueHubPage-
|
|
93
|
+
//# sourceMappingURL=IssueHubPage-BP0zJc1R.js.map
|