/home/techb158/balavpn.abdallabala.com/.next/cache/webpack/server-production
NameSizeModeActions
0.pack75919080666editdlrm
1.pack13755910666editdlrm
2.pack2103570666editdlrm
3.pack435023240666editdlrm
4.pack8831030666editdlrm
5.pack2236720666editdlrm
6.pack124000666editdlrm
7.pack1863090666editdlrm
8.pack2143630666editdlrm
9.pack7358150666editdlrm
10.pack2358320666editdlrm
11.pack30785860666editdlrm
12.pack33078460666editdlrm
index.pack85782510666editdlrm
index.pack.old85783080666editdlrm
Edit: /home/techb158/balavpn.abdallabala.com/.next/cache/webpack/server-production/7.pack (186309B)
wpc¹×§webpack/lib/cache/PackFileCacheStrategyPackContentItems €ÆCompilation/codeGeneration|javascript/auto|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-flight-client-module-loader.js!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\node_modules\next\dist\build\webpack\loaders\next-swc-loader.js??ruleSet[1].rules[16].oneOf[7].use[1]!C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\src\app\dashboard\page.jsx|ssr|webpack-runtime€€‡sources“runtimeRequirements„dataŠjavascript«webpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource VÖ«webpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€«webpack/lib/util/registerExternalSerializer™webpack-sources/RawSource…__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ DashboardPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1124); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8301); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2378); /* harmony import */ var _lib_api_client__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4194); «webpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource*Æ/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; import { useEffect, useState, useCallback, useMemo } from 'react'; import { useRouter } from 'next/navigation'; import { api } from '../../lib/api-client'; const TABS = [ 'Overview', 'Risks', 'Mitigations', 'Gate', 'Integrations' ]; const PAGE_SIZE = 20; function useToast() { const [toasts, setToasts] = useState([]); const add = useCallback((message, type = 'success')=>{ const id = Date.now() + Math.random(); setToasts((prev)=>[ ...prev, { id, message, type } ]); setTimeout(()=>setToasts((prev)=>prev.filter((t)=>t.id !== id)), 3000); }, []); return { toasts, add }; } function ToastContainer({ toasts }) { if (!toasts.length) return null; return /*#__PURE__*/ _jsx("div", { className: "toast-container", children: toasts.map((t)=>/*#__PURE__*/ _jsx("div", { className: `toast ${t.type}`, children: t.message }, t.id)) }); } function SearchInput({ value, onChange, placeholder }) { return /*#__PURE__*/ _jsxs("div", { className: "search-wrap", children: [ /*#__PURE__*/ _jsx("span", { className: "search-icon", children: "⌕" }), /*#__PURE__*/ _jsx("input", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), placeholder: placeholder || 'Search...' }) ] }); } function sortData(list, sortKey, sortDir) { if (!sortKey) return list; return [ ...list ].sort((a, b)=>{ const va = a[sortKey], vb = b[sortKey]; if (va == null) return 1; if (vb == null) return -1; const cmp = typeof va === 'number' ? va - vb : String(va).localeCompare(String(vb)); return sortDir === 'asc' ? cmp : -cmp; }); } function Badge({ children, className }) { return /*#__PURE__*/ _jsx("span", { className: `badge ${className || ''}`, children: children }); } function OverviewTab({ project, dashboard }) { const panels = useMemo(()=>{ if (!dashboard) return []; return [ { label: 'Overall Score', value: dashboard.summary?.overallScore ?? '-', cls: dashboard.summary?.overallScore >= 75 ? 'bad' : dashboard.summary?.overallScore >= 50 ? 'warn' : 'good', sub: `Risk level: ${dashboard.summary?.riskLevel || '-'}` }, { label: 'Deployment Gate', value: dashboard.summary?.gateStatus ?? '-', cls: dashboard.summary?.gateStatus === 'Ready' ? 'good' : dashboard.summary?.gateStatus === 'Warning' ? 'warn' : 'bad', sub: dashboard.gate?.message || '' }, { label: 'Open Risks', value: dashboard.summary?.openRisks ?? 0, cls: (dashboard.summary?.openRisks || 0) > 5 ? 'bad' : (dashboard.summary?.openRisks || 0) > 2 ? 'warn' : 'good', sub: `${dashboard.summary?.totalRisks || 0} total risks` }, { label: 'Mitigation', value: `${dashboard.summary?.mitigationCompletion ?? 0}%`, cls: (dashboard.summary?.mitigationCompletion || 0) < 40 ? 'bad' : (dashboard.summary?.mitigationCompletion || 0) < 70 ? 'warn' : 'good', sub: 'Average active-risk completion' } ]; }, [ dashboard ]); if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading dashboard data..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))' }, children: panels.map((p)=>/*#__PURE__*/ _jsxs("div", { className: "metric-card", children: [ /*#__PURE__*/ _jsx("h3", { children: p.label }), /*#__PURE__*/ _jsx("div", { className: `metric-value ${p.cls}`, children: p.value }), /*#__PURE__*/ _jsx("div", { className: "metric-sub", children: p.sub }) ] }, p.label)) }), /*#__PURE__*/ _jsxs("div", { className: "grid", style: { gridTemplateColumns: '1fr 1fr', marginTop: 18 }, children: [ /*#__PURE__*/ _jsxs("div", { className: "panel", children: [ /*#__PURE__*/ _jsx("h2", { children: "Dimensions" }), (dashboard.dimensions || []).map((dim)=>/*#__PURE__*/ _jsxs("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ _jsx("span", { style: { fontSize: 13 }, children: dim.name }), /*#__PURE__*/ _jsx("strong", { style: { fontSize: 13 }, children: dim.score }) ] }), /*#__PURE__*/ _jsx("div", { className: "bar-wrap", children: /*#__PURE__*/ _jsx("div", { className: "bar-fill", style: { width: `${Math.min(dim.score, 100)}%`, background: dim.score >= 50 ? 'var(--danger)' : dim.score >= 25 ? 'var(--warn)' : 'var(--accent)' } }) }) ] }, dim.name)) ] }), /*#__PURE__*/ _jsxs("div", { className: "panel", children: [ /*#__PURE__*/ _jsx("h2", { children: "Lifecycle" }), (dashboard.lifecycle || []).map((phase)=>/*#__PURE__*/ _jsxs("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ _jsx("span", { style: { fontSize: 13 }, children: phase.name }), /*#__PURE__*/ _jsxs("span", { className: "muted", style: { fontSize: 12 }, children: [ phase.openRisks, " open" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "bar-wrap", children: /*#__PURE__*/ _jsx("div", { className: "bar-fill", style: { width: `${Math.min(phase.riskScore || 0, 100)}%`, background: (phase.riskScore || 0) >= 50 ? 'var(--danger)' : (phase.riskScore || 0) >= 25 ? 'var(--warn)' : 'var(--accent)' } }) }) ] }, phase.name)) ] }) ] }) ] }); } function RisksTab({ project, dashboard, toast }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('normalizedScore'); const [sortDir, setSortDir] = useState('desc'); const [page, setPage] = useState(0); const [selectedRisk, setSelectedRisk] = useState(null); const [updating, setUpdating] = useState(null); const risks = useMemo(()=>{ if (!dashboard?.topRisks) return []; return sortData(dashboard.topRisks, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = useMemo(()=>{ if (!search) return risks; const q = search.toLowerCase(); return risks.filter((r)=>(r.title || '').toLowerCase().includes(q) || (r.dimension || '').toLowerCase().includes(q) || (r.ownerDisplayName || '').toLowerCase().includes(q)); }, [ risks, search ]); const paged = filtered.slice(0, (page + 1) * PAGE_SIZE); const handleSort = (key)=>{ if (sortKey === key) setSortDir((d)=>d === 'asc' ? 'desc' : 'asc'); else { setSortKey(key); setSortDir('asc'); } }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsx("tr", { children: [ { key: 'id', label: 'ID' }, { key: 'title', label: 'Risk' }, { key: 'dimension', label: 'Dimension' }, { key: 'lifecyclePhase', label: 'Phase' }, { key: 'normalizedScore', label: 'Score' }, { key: 'residualScore', label: 'Residual' }, { key: 'status', label: 'Status' }, { key: 'ownerDisplayName', label: 'Owner' } ].map((col)=>/*#__PURE__*/ _jsxs("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? 'â–²' : 'â–¼' : '' ] }, col.key)) }) }), /*#__PURE__*/ _jsx("tbody", { children: paged.map((risk)=>/*#__PURE__*/ _jsxs("tr", { onClick: ()=>setSelectedRisk(risk), children: [ /*#__PURE__*/ _jsx("td", { style: { fontFamily: 'monospace', fontSize: 12 }, children: risk.id?.slice(0, 8) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("strong", { children: risk.title }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: risk.dimension?.toLowerCase(), children: risk.dimension }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: risk.lifecyclePhase }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("strong", { children: risk.normalizedScore }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("span", { style: { color: risk.residualScore >= 50 ? 'var(--danger)' : risk.residualScore >= 25 ? 'var(--warn)' : 'var(--accent)' }, children: risk.residualScore }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: risk.status?.toLowerCase().replace(/\s+/g, '-'), children: risk.status }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("span", { className: "muted", children: risk.ownerDisplayName || '-' }) }) ] }, risk.id)) }) ] }) }), filtered.length > paged.length && /*#__PURE__*/ _jsx("div", { style: { textAlign: 'center', marginTop: 12 }, children: /*#__PURE__*/ _jsxs("button", { className: "button secondary small", onClick: ()=>setPage((p)=>p + 1), children: [ "Show more (", filtered.length - paged.length, " remaining)" ] }) }), !filtered.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No risks match your search" }) }), selectedRisk && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("h2", { children: selectedRisk.title }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13 }, children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Dimension" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.dimension ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Phase" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.lifecyclePhase ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Probability" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.probability ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Impact" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.impact ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Detectability" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.detectability ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Score" }), /*#__PURE__*/ _jsx("br", {}), /*#__PURE__*/ _jsx("strong", { children: selectedRisk.normalizedScore }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Residual" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.residualScore ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Owner" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.ownerDisplayName || '-' ] }) ] }), selectedRisk.description && /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12, fontSize: 13 }, children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Description" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.description ] }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 16 }, children: [ /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 12 }, children: "Update status:" }), /*#__PURE__*/ _jsx("div", { style: { display: 'flex', gap: 6, marginTop: 6, flexWrap: 'wrap' }, children: [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ].map((s)=>/*#__PURE__*/ _jsx("button", { className: `button small ${s === 'OPEN' ? 'secondary' : ''}`, onClick: ()=>updateStatus(selectedRisk.id, s), disabled: updating === selectedRisk.id, children: s.replace('_', ' ') }, s)) }) ] }), /*#__PURE__*/ _jsx("div", { className: "modal-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Close" }) }) ] }) }) ] }); } function MitigationsTab({ project, dashboard, toast }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('progressPercent'); const [sortDir, setSortDir] = useState('asc'); const mitigations = useMemo(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = useMemo(()=>{ if (!search) return mitigations; const q = search.toLowerCase(); return mitigations.filter((m)=>(m.title || '').toLowerCase().includes(q) || (m.riskTitle || '').toLowerCase().includes(q)); }, [ mitigations, search ]); const handleSort = (key)=>{ if (sortKey === key) setSortDir((d)=>d === 'asc' ? 'desc' : 'asc'); else { setSortKey(key); setSortDir('asc'); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsx("tr", { children: [ { key: 'title', label: 'Title' }, { key: 'riskTitle', label: 'Risk' }, { key: 'status', label: 'Status' }, { key: 'progressPercent', label: 'Progress' }, { key: 'effectivenessPercent', label: 'Effectiveness' }, { key: 'ownerDisplayName', label: 'Owner' } ].map((col)=>/*#__PURE__*/ _jsxs("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? 'â–²' : 'â–¼' : '' ] }, col.key)) }) }), /*#__PURE__*/ _jsx("tbody", { children: filtered.slice(0, 50).map((m)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("strong", { children: m.title }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("span", { className: "muted", children: m.riskTitle }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: m.status?.toLowerCase().replace(/\s+/g, '-'), children: m.status }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [ /*#__PURE__*/ _jsx("div", { className: "bar-wrap", style: { flex: 1, maxWidth: 80 }, children: /*#__PURE__*/ _jsx("div", { className: "bar-fill", style: { width: `${m.progressPercent || 0}%`, background: (m.progressPercent || 0) >= 80 ? 'var(--accent)' : (m.progressPercent || 0) >= 30 ? 'var(--warn)' : 'var(--danger)' } }) }), m.progressPercent || 0, "%" ] }) }), /*#__PURE__*/ _jsxs("td", { children: [ m.effectivenessPercent || 0, "%" ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("span", { className: "muted", children: m.ownerDisplayName || '-' }) }) ] }, m.id)) }) ] }) }), !filtered.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No mitigations found" }) }) ] }); } function GateTab({ project, dashboard }) { if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); const criteria = dashboard.gate?.criteria || []; const gateStatus = dashboard.summary?.gateStatus || 'Unknown'; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Deployment Gate" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Nine-criteria gate evaluation for AI deployment readiness" }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("div", { className: `metric-value ${gateCls}`, style: { fontSize: 28 }, children: gateStatus }) }) ] }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("th", { children: "Criterion" }), /*#__PURE__*/ _jsx("th", { children: "Required" }), /*#__PURE__*/ _jsx("th", { children: "Actual" }), /*#__PURE__*/ _jsx("th", { children: "Status" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: criteria.map((c)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("strong", { children: c.name }) }), /*#__PURE__*/ _jsx("td", { children: c.required }), /*#__PURE__*/ _jsx("td", { children: c.actual }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: c.status?.toLowerCase(), children: c.status }) }) ] }, c.name)) }) ] }) }), !criteria.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No gate criteria evaluated yet" }) }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 16, display: 'flex', gap: 8 }, children: [ /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/evaluate`, className: "button secondary small", target: "_blank", children: "Evaluate (API)" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }) ] }); } function IntegrationsTab({ project, dashboard }) { return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx("div", { className: "dash-header", children: /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Integrations" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Connect Trello, Jira, Asana, or Microsoft Planner" }) ] }) }), /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>/*#__PURE__*/ _jsxs("div", { className: "panel", style: { textAlign: 'center' }, children: [ /*#__PURE__*/ _jsx("div", { style: { fontSize: 32, marginBottom: 8 }, children: provider === 'TRELLO' ? '⊞' : provider === 'JIRA' ? 'â—†' : provider === 'ASANA' ? 'â—‡' : 'â–£' }), /*#__PURE__*/ _jsx("h3", { style: { margin: '0 0 4px' }, children: provider.replace('_', ' ') }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { fontSize: 12, margin: '0 0 12px' }, children: "Project management sync" }), /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: [ /*#__PURE__*/ _jsx("a", { href: `/api/integration-providers`, className: "button secondary small", children: "Configure" }), /*#__PURE__*/ _jsx("a", { href: `/api/integrations`, className: "button secondary small", children: "Manage" }) ] }) ] }, provider)) }), /*#__PURE__*/ _jsx("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ _jsx("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } export default function DashboardPage() { const router = useRouter(); const [tab, setTab] = useState('Overview'); const [project, setProject] = useState(null); const [dashboard, setDashboard] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const { toasts, add } = useToast(); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ const params = new URLSearchParams(window.location.search); const t = params.get('tab'); if (t && TABS.includes(t)) setTab(t); }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ (async ()=>{ try { const workspaces = await api.get('/api/workspaces'); const ws = workspaces?.[0]; if (!ws) { setError('No workspace found'); setLoading(false); return; } const projects = await api.get(`/api/workspaces/${ws.id}/projects`); const proj = projects?.[0]; if (!proj) { setError('No project found'); setLoading(false); return; } setProject(proj); const dash = await api.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dash); setLoading(false); } catch (e) { setError(e.message); setLoading(false); } })(); }, []); if (loading) return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); if (error) return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsx("p", { children: error }) ] }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: project?.name || 'Dashboard' }), /*#__PURE__*/ _jsx("p", { className: "muted", children: project?.subtitle || '' }) ] }), /*#__PURE__*/ _jsxs("div", { className: "dash-actions", children: [ /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/reports/executive.html`, className: "button secondary small", target: "_blank", children: "Report" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/reports/risk-register.csv`, className: "button secondary small", target: "_blank", children: "CSV" }) ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "tabs", children: TABS.map((t)=>/*#__PURE__*/ _jsx("button", { className: `tab ${tab === t ? 'active' : ''}`, onClick: ()=>router.push(`/dashboard?tab=${t}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ _jsx(OverviewTab, { project: project, dashboard: dashboard }), tab === 'Risks' && /*#__PURE__*/ _jsx(RisksTab, { project: project, dashboard: dashboard, toast: { add } }), tab === 'Mitigations' && /*#__PURE__*/ _jsx(MitigationsTab, { project: project, dashboard: dashboard, toast: { add } }), tab === 'Gate' && /*#__PURE__*/ _jsx(GateTab, { project: project, dashboard: dashboard }), tab === 'Integrations' && /*#__PURE__*/ _jsx(IntegrationsTab, { project: project, dashboard: dashboard }), /*#__PURE__*/ _jsx(ToastContainer, { toasts: toasts }) ] }); } @å`=_’”Õ×.Ýäûþbe48“–ÅÈj p 14„ëïñ_ù,/ £),÷úòöäèmp#'%)àãad69ËÎ~‚ _ ½ Á ¿!Ã!z#}#ý$%Ð'Ó'e(h(¤+«+Ô+Û+,,A,H,z,,®,µ,Ð,Ö,¤-ª-W0Y0­1_°1ý12X2\2^2f2™2œ2e3h3Ä3È3C4F4‡4Š4ö:ú:J=M= =¤=\>_>@@Q@T@8A;A‰A_ŒAËBÎB%D(DvDyDgEjE¸E»E´G·GHHVIYI§IªIŽK‘K;L?LÈMËM(N+N¼N¿NROVOP_ PŽP’PþQRsRvRfSiS-T1T¢T¥T‘U”U]VaVÒVÕVÇWÊWX”XYYõYøY¹Z½Z.[1[%\_(\ð\ô\e]h]T^W^š^^¡_¥_``a aÓa×aHbKb7c:cYd]d^eae3f6fÜfàf³g¶gi_i‰kŒk¯m²m)n,nÔoÛop pCpJplprpFqLqOsRsŸs¢súsþstt;t>tòtõtQuUuÐu_Óuvv{{k}n}Î}Ò}B~E~“~–~wzÈËò€õ€CFŽ‚‘‚߂ア„¥„Y†\†Š Šs‹_v‹Ä‹Ç‹—š÷úÂŽÅŽFJLT‡‹þ‘[‘^‘î‘ñ‘“ “x“{“ؔ۔7•;•¶•_¹•ú•þ•f–i– ——¯—²—Q˜T˜C™F™™™™ šš^šašA›D›ñ›ô›Ÿœ¢œðœóœÃžÆž#Ÿ&Ÿ«Ÿ_¯Ÿ‡ Š ³¡¶¡;£?£A£I£|££Ü£à£1¤4¤µ¤¸¤¹¥¼¥1§5§&¨)¨µ©¸©ÓªÖªV¬Z¬­­°­ê®_í®°’°±±(²6²e²m²Œ²“²Ä²Ë²ú²³,³3³Z³a³É³Ñ³³´»´µµ&¶(¶i·k·¸’¸á¸_ä¸G¹K¹¦¹©¹%º(º‹ºº‘º™ºÌºÐºC»G» »£»>¼A¼3½7½Ã½Æ½ ¿#¿¿ÀÂÀ&Á)ÁFÂIÂÞÂHá½ÃÀÛĞÄ6Å9Å¿ÅÂÅ€€€€¯(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)²(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)¶(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)ÿ·(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)þþþ®(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)ýýþ·react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmentüýüüüýýüýýüüüüýüýýüýüüúúúúúúþþº_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .api */ .FHûûüþûûüûûüûüûûûûûûûûûûûûûûûüûûûüûüüûûüûûüûûüûûüûûüûûûüûûüûûüûûüûûûûûùùùýýûûüþûûüûûüûüûûûûûûûüûûüûûûûûûüþüüûûûûûüûüûûûûûüûûûûûûûûüûûüþûüûûûüûûûüûûûû€º(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)øøøøø°(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)ÿýýýùùúùùúüúúùùúùùùùùùùùùù†buffer†source„size„maps„hashoó__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ DashboardPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1124); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8301); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2378); /* harmony import */ var _lib_api_client__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4194); /* __next_internal_client_entry_do_not_use__ default auto */ const TABS = [ 'Overview', 'Risks', 'Mitigations', 'Gate', 'Integrations' ]; const PAGE_SIZE = 20; function useToast() { const [toasts, setToasts] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const add = (0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)((message, type = 'success')=>{ const id = Date.now() + Math.random(); setToasts((prev)=>[ ...prev, { id, message, type } ]); setTimeout(()=>setToasts((prev)=>prev.filter((t)=>t.id !== id)), 3000); }, []); return { toasts, add }; } function ToastContainer({ toasts }) { if (!toasts.length) return null; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "toast-container", children: toasts.map((t)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: `toast ${t.type}`, children: t.message }, t.id)) }); } function SearchInput({ value, onChange, placeholder }) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "search-wrap", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "search-icon", children: "⌕" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("input", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), placeholder: placeholder || 'Search...' }) ] }); } function sortData(list, sortKey, sortDir) { if (!sortKey) return list; return [ ...list ].sort((a, b)=>{ const va = a[sortKey], vb = b[sortKey]; if (va == null) return 1; if (vb == null) return -1; const cmp = typeof va === 'number' ? va - vb : String(va).localeCompare(String(vb)); return sortDir === 'asc' ? cmp : -cmp; }); } function Badge({ children, className }) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: `badge ${className || ''}`, children: children }); } function OverviewTab({ project, dashboard }) { const panels = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{ if (!dashboard) return []; return [ { label: 'Overall Score', value: dashboard.summary?.overallScore ?? '-', cls: dashboard.summary?.overallScore >= 75 ? 'bad' : dashboard.summary?.overallScore >= 50 ? 'warn' : 'good', sub: `Risk level: ${dashboard.summary?.riskLevel || '-'}` }, { label: 'Deployment Gate', value: dashboard.summary?.gateStatus ?? '-', cls: dashboard.summary?.gateStatus === 'Ready' ? 'good' : dashboard.summary?.gateStatus === 'Warning' ? 'warn' : 'bad', sub: dashboard.gate?.message || '' }, { label: 'Open Risks', value: dashboard.summary?.openRisks ?? 0, cls: (dashboard.summary?.openRisks || 0) > 5 ? 'bad' : (dashboard.summary?.openRisks || 0) > 2 ? 'warn' : 'good', sub: `${dashboard.summary?.totalRisks || 0} total risks` }, { label: 'Mitigation', value: `${dashboard.summary?.mitigationCompletion ?? 0}%`, cls: (dashboard.summary?.mitigationCompletion || 0) < 40 ? 'bad' : (dashboard.summary?.mitigationCompletion || 0) < 70 ? 'warn' : 'good', sub: 'Average active-risk completion' } ]; }, [ dashboard ]); if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "Loading dashboard data..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))' }, children: panels.map((p)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "metric-card", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3", { children: p.label }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: `metric-value ${p.cls}`, children: p.value }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "metric-sub", children: p.sub }) ] }, p.label)) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "grid", style: { gridTemplateColumns: '1fr 1fr', marginTop: 18 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "panel", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { children: "Dimensions" }), (dashboard.dimensions || []).map((dim)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { style: { fontSize: 13 }, children: dim.name }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("strong", { style: { fontSize: 13 }, children: dim.score }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bar-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bar-fill", style: { width: `${Math.min(dim.score, 100)}%`, background: dim.score >= 50 ? 'var(--danger)' : dim.score >= 25 ? 'var(--warn)' : 'var(--accent)' } }) }) ] }, dim.name)) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "panel", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { children: "Lifecycle" }), (dashboard.lifecycle || []).map((phase)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { style: { fontSize: 13 }, children: phase.name }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("span", { className: "muted", style: { fontSize: 12 }, children: [ phase.openRisks, " open" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bar-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bar-fill", style: { width: `${Math.min(phase.riskScore || 0, 100)}%`, background: (phase.riskScore || 0) >= 50 ? 'var(--danger)' : (phase.riskScore || 0) >= 25 ? 'var(--warn)' : 'var(--accent)' } }) }) ] }, phase.name)) ] }) ] }) ] }); } function RisksTab({ project, dashboard, toast }) { const [search, setSearch] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''); const [sortKey, setSortKey] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('normalizedScore'); const [sortDir, setSortDir] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('desc'); const [page, setPage] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(0); const [selectedRisk, setSelectedRisk] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [updating, setUpdating] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const risks = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{ if (!dashboard?.topRisks) return []; return sortData(dashboard.topRisks, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{ if (!search) return risks; const q = search.toLowerCase(); return risks.filter((r)=>(r.title || '').toLowerCase().includes(q) || (r.dimension || '').toLowerCase().includes(q) || (r.ownerDisplayName || '').toLowerCase().includes(q)); }, [ risks, search ]); const paged = filtered.slice(0, (page + 1) * PAGE_SIZE); const handleSort = (key)=>{ if (sortKey === key) setSortDir((d)=>d === 'asc' ? 'desc' : 'asc'); else { setSortKey(key); setSortDir('asc'); } }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await _lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .api */ .FH.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("tr", { children: [ { key: 'id', label: 'ID' }, { key: 'title', label: 'Risk' }, { key: 'dimension', label: 'Dimension' }, { key: 'lifecyclePhase', label: 'Phase' }, { key: 'normalizedScore', label: 'Score' }, { key: 'residualScore', label: 'Residual' }, { key: 'status', label: 'Status' }, { key: 'ownerDisplayName', label: 'Owner' } ].map((col)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? 'â–²' : 'â–¼' : '' ] }, col.key)) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("tbody", { children: paged.map((risk)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("tr", { onClick: ()=>setSelectedRisk(risk), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { style: { fontFamily: 'monospace', fontSize: 12 }, children: risk.id?.slice(0, 8) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("strong", { children: risk.title }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Badge, { className: risk.dimension?.toLowerCase(), children: risk.dimension }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { style: { fontSize: 12 }, children: risk.lifecyclePhase }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("strong", { children: risk.normalizedScore }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { style: { color: risk.residualScore >= 50 ? 'var(--danger)' : risk.residualScore >= 25 ? 'var(--warn)' : 'var(--accent)' }, children: risk.residualScore }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Badge, { className: risk.status?.toLowerCase().replace(/\s+/g, '-'), children: risk.status }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: risk.ownerDisplayName || '-' }) }) ] }, risk.id)) }) ] }) }), filtered.length > paged.length && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { style: { textAlign: 'center', marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("button", { className: "button secondary small", onClick: ()=>setPage((p)=>p + 1), children: [ "Show more (", filtered.length - paged.length, " remaining)" ] }) }), !filtered.length && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "No risks match your search" }) }), selectedRisk && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h2", { children: selectedRisk.title }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: "Dimension" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("br", {}), selectedRisk.dimension ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: "Phase" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("br", {}), selectedRisk.lifecyclePhase ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: "Probability" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("br", {}), selectedRisk.probability ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: "Impact" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("br", {}), selectedRisk.impact ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: "Detectability" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("br", {}), selectedRisk.detectability ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: "Score" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("br", {}), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("strong", { children: selectedRisk.normalizedScore }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: "Residual" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("br", {}), selectedRisk.residualScore ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: "Owner" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("br", {}), selectedRisk.ownerDisplayName || '-' ] }) ] }), selectedRisk.description && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: { marginTop: 12, fontSize: 13 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: "Description" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("br", {}), selectedRisk.description ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: { marginTop: 16 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", style: { fontSize: 12 }, children: "Update status:" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { style: { display: 'flex', gap: 6, marginTop: 6, flexWrap: 'wrap' }, children: [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ].map((s)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: `button small ${s === 'OPEN' ? 'secondary' : ''}`, onClick: ()=>updateStatus(selectedRisk.id, s), disabled: updating === selectedRisk.id, children: s.replace('_', ' ') }, s)) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "modal-actions", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Close" }) }) ] }) }) ] }); } function MitigationsTab({ project, dashboard, toast }) { const [search, setSearch] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''); const [sortKey, setSortKey] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('progressPercent'); const [sortDir, setSortDir] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('asc'); const mitigations = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = (0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)(()=>{ if (!search) return mitigations; const q = search.toLowerCase(); return mitigations.filter((m)=>(m.title || '').toLowerCase().includes(q) || (m.riskTitle || '').toLowerCase().includes(q)); }, [ mitigations, search ]); const handleSort = (key)=>{ if (sortKey === key) setSortDir((d)=>d === 'asc' ? 'desc' : 'asc'); else { setSortKey(key); setSortDir('asc'); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("tr", { children: [ { key: 'title', label: 'Title' }, { key: 'riskTitle', label: 'Risk' }, { key: 'status', label: 'Status' }, { key: 'progressPercent', label: 'Progress' }, { key: 'effectivenessPercent', label: 'Effectiveness' }, { key: 'ownerDisplayName', label: 'Owner' } ].map((col)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? 'â–²' : 'â–¼' : '' ] }, col.key)) }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("tbody", { children: filtered.slice(0, 50).map((m)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("strong", { children: m.title }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: m.riskTitle }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Badge, { className: m.status?.toLowerCase().replace(/\s+/g, '-'), children: m.status }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bar-wrap", style: { flex: 1, maxWidth: 80 }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "bar-fill", style: { width: `${m.progressPercent || 0}%`, background: (m.progressPercent || 0) >= 80 ? 'var(--accent)' : (m.progressPercent || 0) >= 30 ? 'var(--warn)' : 'var(--danger)' } }) }), m.progressPercent || 0, "%" ] }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("td", { children: [ m.effectivenessPercent || 0, "%" ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "muted", children: m.ownerDisplayName || '-' }) }) ] }, m.id)) }) ] }) }), !filtered.length && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "No mitigations found" }) }) ] }); } function GateTab({ project, dashboard }) { if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "Loading..." }) }); const criteria = dashboard.gate?.criteria || []; const gateStatus = dashboard.summary?.gateStatus || 'Unknown'; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { children: "Deployment Gate" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "muted", children: "Nine-criteria gate evaluation for AI deployment readiness" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: `metric-value ${gateCls}`, style: { fontSize: 28 }, children: gateStatus }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("th", { children: "Criterion" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("th", { children: "Required" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("th", { children: "Actual" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("th", { children: "Status" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("tbody", { children: criteria.map((c)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("strong", { children: c.name }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: c.required }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: c.actual }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(Badge, { className: c.status?.toLowerCase(), children: c.status }) }) ] }, c.name)) }) ] }) }), !criteria.length && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: "No gate criteria evaluated yet" }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: { marginTop: 16, display: 'flex', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: `/api/projects/${project?.id}/gate/evaluate`, className: "button secondary small", target: "_blank", children: "Evaluate (API)" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }) ] }); } function IntegrationsTab({ project, dashboard }) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "dash-header", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { children: "Integrations" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "muted", children: "Connect Trello, Jira, Asana, or Microsoft Planner" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "panel", style: { textAlign: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { style: { fontSize: 32, marginBottom: 8 }, children: provider === 'TRELLO' ? '⊞' : provider === 'JIRA' ? 'â—†' : provider === 'ASANA' ? 'â—‡' : 'â–£' }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h3", { style: { margin: '0 0 4px' }, children: provider.replace('_', ' ') }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "muted", style: { fontSize: 12, margin: '0 0 12px' }, children: "Project management sync" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: `/api/integration-providers`, className: "button secondary small", children: "Configure" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: `/api/integrations`, className: "button secondary small", children: "Manage" }) ] }) ] }, provider)) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function DashboardPage() { const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const [tab, setTab] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)('Overview'); const [project, setProject] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [dashboard, setDashboard] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true); const [error, setError] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const { toasts, add } = useToast(); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ const params = new URLSearchParams(window.location.search); const t = params.get('tab'); if (t && TABS.includes(t)) setTab(t); }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ (async ()=>{ try { const workspaces = await _lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .api */ .FH.get('/api/workspaces'); const ws = workspaces?.[0]; if (!ws) { setError('No workspace found'); setLoading(false); return; } const projects = await _lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .api */ .FH.get(`/api/workspaces/${ws.id}/projects`); const proj = projects?.[0]; if (!proj) { setError('No project found'); setLoading(false); return; } setProject(proj); const dash = await _lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .api */ .FH.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dash); setLoading(false); } catch (e) { setError(e.message); setLoading(false); } })(); }, []); if (loading) return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "shell-loading", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "spinner" }) }); if (error) return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "empty-state", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { children: error }) ] }); return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("h1", { children: project?.name || 'Dashboard' }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("p", { className: "muted", children: project?.subtitle || '' }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "dash-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: `/api/projects/${project?.id}/reports/executive.html`, className: "button secondary small", target: "_blank", children: "Report" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("a", { href: `/api/projects/${project?.id}/reports/risk-register.csv`, className: "button secondary small", target: "_blank", children: "CSV" }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "tabs", children: TABS.map((t)=>/*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: `tab ${tab === t ? 'active' : ''}`, onClick: ()=>router.push(`/dashboard?tab=${t}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(OverviewTab, { project: project, dashboard: dashboard }), tab === 'Risks' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(RisksTab, { project: project, dashboard: dashboard, toast: { add } }), tab === 'Mitigations' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(MitigationsTab, { project: project, dashboard: dashboard, toast: { add } }), tab === 'Gate' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(GateTab, { project: project, dashboard: dashboard }), tab === 'Integrations' && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(IntegrationsTab, { project: project, dashboard: dashboard }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(ToastContainer, { toasts: toasts }) ] }); } ”{"finalSource":true}ƒmap‹bufferedMap ConcatSourceRawSource…__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ DashboardPage) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1124); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8301); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var next_navigation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2378); /* harmony import */ var _lib_api_client__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4194); ReplaceSourceRawSource*Æ/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; import { useEffect, useState, useCallback, useMemo } from 'react'; import { useRouter } from 'next/navigation'; import { api } from '../../lib/api-client'; const TABS = [ 'Overview', 'Risks', 'Mitigations', 'Gate', 'Integrations' ]; const PAGE_SIZE = 20; function useToast() { const [toasts, setToasts] = useState([]); const add = useCallback((message, type = 'success')=>{ const id = Date.now() + Math.random(); setToasts((prev)=>[ ...prev, { id, message, type } ]); setTimeout(()=>setToasts((prev)=>prev.filter((t)=>t.id !== id)), 3000); }, []); return { toasts, add }; } function ToastContainer({ toasts }) { if (!toasts.length) return null; return /*#__PURE__*/ _jsx("div", { className: "toast-container", children: toasts.map((t)=>/*#__PURE__*/ _jsx("div", { className: `toast ${t.type}`, children: t.message }, t.id)) }); } function SearchInput({ value, onChange, placeholder }) { return /*#__PURE__*/ _jsxs("div", { className: "search-wrap", children: [ /*#__PURE__*/ _jsx("span", { className: "search-icon", children: "⌕" }), /*#__PURE__*/ _jsx("input", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), placeholder: placeholder || 'Search...' }) ] }); } function sortData(list, sortKey, sortDir) { if (!sortKey) return list; return [ ...list ].sort((a, b)=>{ const va = a[sortKey], vb = b[sortKey]; if (va == null) return 1; if (vb == null) return -1; const cmp = typeof va === 'number' ? va - vb : String(va).localeCompare(String(vb)); return sortDir === 'asc' ? cmp : -cmp; }); } function Badge({ children, className }) { return /*#__PURE__*/ _jsx("span", { className: `badge ${className || ''}`, children: children }); } function OverviewTab({ project, dashboard }) { const panels = useMemo(()=>{ if (!dashboard) return []; return [ { label: 'Overall Score', value: dashboard.summary?.overallScore ?? '-', cls: dashboard.summary?.overallScore >= 75 ? 'bad' : dashboard.summary?.overallScore >= 50 ? 'warn' : 'good', sub: `Risk level: ${dashboard.summary?.riskLevel || '-'}` }, { label: 'Deployment Gate', value: dashboard.summary?.gateStatus ?? '-', cls: dashboard.summary?.gateStatus === 'Ready' ? 'good' : dashboard.summary?.gateStatus === 'Warning' ? 'warn' : 'bad', sub: dashboard.gate?.message || '' }, { label: 'Open Risks', value: dashboard.summary?.openRisks ?? 0, cls: (dashboard.summary?.openRisks || 0) > 5 ? 'bad' : (dashboard.summary?.openRisks || 0) > 2 ? 'warn' : 'good', sub: `${dashboard.summary?.totalRisks || 0} total risks` }, { label: 'Mitigation', value: `${dashboard.summary?.mitigationCompletion ?? 0}%`, cls: (dashboard.summary?.mitigationCompletion || 0) < 40 ? 'bad' : (dashboard.summary?.mitigationCompletion || 0) < 70 ? 'warn' : 'good', sub: 'Average active-risk completion' } ]; }, [ dashboard ]); if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading dashboard data..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))' }, children: panels.map((p)=>/*#__PURE__*/ _jsxs("div", { className: "metric-card", children: [ /*#__PURE__*/ _jsx("h3", { children: p.label }), /*#__PURE__*/ _jsx("div", { className: `metric-value ${p.cls}`, children: p.value }), /*#__PURE__*/ _jsx("div", { className: "metric-sub", children: p.sub }) ] }, p.label)) }), /*#__PURE__*/ _jsxs("div", { className: "grid", style: { gridTemplateColumns: '1fr 1fr', marginTop: 18 }, children: [ /*#__PURE__*/ _jsxs("div", { className: "panel", children: [ /*#__PURE__*/ _jsx("h2", { children: "Dimensions" }), (dashboard.dimensions || []).map((dim)=>/*#__PURE__*/ _jsxs("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ _jsx("span", { style: { fontSize: 13 }, children: dim.name }), /*#__PURE__*/ _jsx("strong", { style: { fontSize: 13 }, children: dim.score }) ] }), /*#__PURE__*/ _jsx("div", { className: "bar-wrap", children: /*#__PURE__*/ _jsx("div", { className: "bar-fill", style: { width: `${Math.min(dim.score, 100)}%`, background: dim.score >= 50 ? 'var(--danger)' : dim.score >= 25 ? 'var(--warn)' : 'var(--accent)' } }) }) ] }, dim.name)) ] }), /*#__PURE__*/ _jsxs("div", { className: "panel", children: [ /*#__PURE__*/ _jsx("h2", { children: "Lifecycle" }), (dashboard.lifecycle || []).map((phase)=>/*#__PURE__*/ _jsxs("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ _jsx("span", { style: { fontSize: 13 }, children: phase.name }), /*#__PURE__*/ _jsxs("span", { className: "muted", style: { fontSize: 12 }, children: [ phase.openRisks, " open" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "bar-wrap", children: /*#__PURE__*/ _jsx("div", { className: "bar-fill", style: { width: `${Math.min(phase.riskScore || 0, 100)}%`, background: (phase.riskScore || 0) >= 50 ? 'var(--danger)' : (phase.riskScore || 0) >= 25 ? 'var(--warn)' : 'var(--accent)' } }) }) ] }, phase.name)) ] }) ] }) ] }); } function RisksTab({ project, dashboard, toast }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('normalizedScore'); const [sortDir, setSortDir] = useState('desc'); const [page, setPage] = useState(0); const [selectedRisk, setSelectedRisk] = useState(null); const [updating, setUpdating] = useState(null); const risks = useMemo(()=>{ if (!dashboard?.topRisks) return []; return sortData(dashboard.topRisks, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = useMemo(()=>{ if (!search) return risks; const q = search.toLowerCase(); return risks.filter((r)=>(r.title || '').toLowerCase().includes(q) || (r.dimension || '').toLowerCase().includes(q) || (r.ownerDisplayName || '').toLowerCase().includes(q)); }, [ risks, search ]); const paged = filtered.slice(0, (page + 1) * PAGE_SIZE); const handleSort = (key)=>{ if (sortKey === key) setSortDir((d)=>d === 'asc' ? 'desc' : 'asc'); else { setSortKey(key); setSortDir('asc'); } }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsx("tr", { children: [ { key: 'id', label: 'ID' }, { key: 'title', label: 'Risk' }, { key: 'dimension', label: 'Dimension' }, { key: 'lifecyclePhase', label: 'Phase' }, { key: 'normalizedScore', label: 'Score' }, { key: 'residualScore', label: 'Residual' }, { key: 'status', label: 'Status' }, { key: 'ownerDisplayName', label: 'Owner' } ].map((col)=>/*#__PURE__*/ _jsxs("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? 'â–²' : 'â–¼' : '' ] }, col.key)) }) }), /*#__PURE__*/ _jsx("tbody", { children: paged.map((risk)=>/*#__PURE__*/ _jsxs("tr", { onClick: ()=>setSelectedRisk(risk), children: [ /*#__PURE__*/ _jsx("td", { style: { fontFamily: 'monospace', fontSize: 12 }, children: risk.id?.slice(0, 8) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("strong", { children: risk.title }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: risk.dimension?.toLowerCase(), children: risk.dimension }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: risk.lifecyclePhase }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("strong", { children: risk.normalizedScore }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("span", { style: { color: risk.residualScore >= 50 ? 'var(--danger)' : risk.residualScore >= 25 ? 'var(--warn)' : 'var(--accent)' }, children: risk.residualScore }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: risk.status?.toLowerCase().replace(/\s+/g, '-'), children: risk.status }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("span", { className: "muted", children: risk.ownerDisplayName || '-' }) }) ] }, risk.id)) }) ] }) }), filtered.length > paged.length && /*#__PURE__*/ _jsx("div", { style: { textAlign: 'center', marginTop: 12 }, children: /*#__PURE__*/ _jsxs("button", { className: "button secondary small", onClick: ()=>setPage((p)=>p + 1), children: [ "Show more (", filtered.length - paged.length, " remaining)" ] }) }), !filtered.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No risks match your search" }) }), selectedRisk && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), children: [ /*#__PURE__*/ _jsx("h2", { children: selectedRisk.title }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13 }, children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Dimension" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.dimension ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Phase" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.lifecyclePhase ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Probability" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.probability ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Impact" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.impact ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Detectability" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.detectability ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Score" }), /*#__PURE__*/ _jsx("br", {}), /*#__PURE__*/ _jsx("strong", { children: selectedRisk.normalizedScore }) ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Residual" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.residualScore ] }), /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Owner" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.ownerDisplayName || '-' ] }) ] }), selectedRisk.description && /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12, fontSize: 13 }, children: [ /*#__PURE__*/ _jsx("span", { className: "muted", children: "Description" }), /*#__PURE__*/ _jsx("br", {}), selectedRisk.description ] }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 16 }, children: [ /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 12 }, children: "Update status:" }), /*#__PURE__*/ _jsx("div", { style: { display: 'flex', gap: 6, marginTop: 6, flexWrap: 'wrap' }, children: [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ].map((s)=>/*#__PURE__*/ _jsx("button", { className: `button small ${s === 'OPEN' ? 'secondary' : ''}`, onClick: ()=>updateStatus(selectedRisk.id, s), disabled: updating === selectedRisk.id, children: s.replace('_', ' ') }, s)) }) ] }), /*#__PURE__*/ _jsx("div", { className: "modal-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Close" }) }) ] }) }) ] }); } function MitigationsTab({ project, dashboard, toast }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('progressPercent'); const [sortDir, setSortDir] = useState('asc'); const mitigations = useMemo(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = useMemo(()=>{ if (!search) return mitigations; const q = search.toLowerCase(); return mitigations.filter((m)=>(m.title || '').toLowerCase().includes(q) || (m.riskTitle || '').toLowerCase().includes(q)); }, [ mitigations, search ]); const handleSort = (key)=>{ if (sortKey === key) setSortDir((d)=>d === 'asc' ? 'desc' : 'asc'); else { setSortKey(key); setSortDir('asc'); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsx("tr", { children: [ { key: 'title', label: 'Title' }, { key: 'riskTitle', label: 'Risk' }, { key: 'status', label: 'Status' }, { key: 'progressPercent', label: 'Progress' }, { key: 'effectivenessPercent', label: 'Effectiveness' }, { key: 'ownerDisplayName', label: 'Owner' } ].map((col)=>/*#__PURE__*/ _jsxs("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? 'â–²' : 'â–¼' : '' ] }, col.key)) }) }), /*#__PURE__*/ _jsx("tbody", { children: filtered.slice(0, 50).map((m)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("strong", { children: m.title }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("span", { className: "muted", children: m.riskTitle }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: m.status?.toLowerCase().replace(/\s+/g, '-'), children: m.status }) }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [ /*#__PURE__*/ _jsx("div", { className: "bar-wrap", style: { flex: 1, maxWidth: 80 }, children: /*#__PURE__*/ _jsx("div", { className: "bar-fill", style: { width: `${m.progressPercent || 0}%`, background: (m.progressPercent || 0) >= 80 ? 'var(--accent)' : (m.progressPercent || 0) >= 30 ? 'var(--warn)' : 'var(--danger)' } }) }), m.progressPercent || 0, "%" ] }) }), /*#__PURE__*/ _jsxs("td", { children: [ m.effectivenessPercent || 0, "%" ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("span", { className: "muted", children: m.ownerDisplayName || '-' }) }) ] }, m.id)) }) ] }) }), !filtered.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No mitigations found" }) }) ] }); } function GateTab({ project, dashboard }) { if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); const criteria = dashboard.gate?.criteria || []; const gateStatus = dashboard.summary?.gateStatus || 'Unknown'; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Deployment Gate" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Nine-criteria gate evaluation for AI deployment readiness" }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("div", { className: `metric-value ${gateCls}`, style: { fontSize: 28 }, children: gateStatus }) }) ] }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("th", { children: "Criterion" }), /*#__PURE__*/ _jsx("th", { children: "Required" }), /*#__PURE__*/ _jsx("th", { children: "Actual" }), /*#__PURE__*/ _jsx("th", { children: "Status" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: criteria.map((c)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx("strong", { children: c.name }) }), /*#__PURE__*/ _jsx("td", { children: c.required }), /*#__PURE__*/ _jsx("td", { children: c.actual }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: c.status?.toLowerCase(), children: c.status }) }) ] }, c.name)) }) ] }) }), !criteria.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No gate criteria evaluated yet" }) }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 16, display: 'flex', gap: 8 }, children: [ /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/evaluate`, className: "button secondary small", target: "_blank", children: "Evaluate (API)" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }) ] }); } function IntegrationsTab({ project, dashboard }) { return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsx("div", { className: "dash-header", children: /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Integrations" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Connect Trello, Jira, Asana, or Microsoft Planner" }) ] }) }), /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>/*#__PURE__*/ _jsxs("div", { className: "panel", style: { textAlign: 'center' }, children: [ /*#__PURE__*/ _jsx("div", { style: { fontSize: 32, marginBottom: 8 }, children: provider === 'TRELLO' ? '⊞' : provider === 'JIRA' ? 'â—†' : provider === 'ASANA' ? 'â—‡' : 'â–£' }), /*#__PURE__*/ _jsx("h3", { style: { margin: '0 0 4px' }, children: provider.replace('_', ' ') }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { fontSize: 12, margin: '0 0 12px' }, children: "Project management sync" }), /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: [ /*#__PURE__*/ _jsx("a", { href: `/api/integration-providers`, className: "button secondary small", children: "Configure" }), /*#__PURE__*/ _jsx("a", { href: `/api/integrations`, className: "button secondary small", children: "Manage" }) ] }) ] }, provider)) }), /*#__PURE__*/ _jsx("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ _jsx("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } export default function DashboardPage() { const router = useRouter(); const [tab, setTab] = useState('Overview'); const [project, setProject] = useState(null); const [dashboard, setDashboard] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const { toasts, add } = useToast(); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ const params = new URLSearchParams(window.location.search); const t = params.get('tab'); if (t && TABS.includes(t)) setTab(t); }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ (async ()=>{ try { const workspaces = await api.get('/api/workspaces'); const ws = workspaces?.[0]; if (!ws) { setError('No workspace found'); setLoading(false); return; } const projects = await api.get(`/api/workspaces/${ws.id}/projects`); const proj = projects?.[0]; if (!proj) { setError('No project found'); setLoading(false); return; } setProject(proj); const dash = await api.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dash); setLoading(false); } catch (e) { setError(e.message); setLoading(false); } })(); }, []); if (loading) return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); if (error) return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsx("p", { children: error }) ] }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: project?.name || 'Dashboard' }), /*#__PURE__*/ _jsx("p", { className: "muted", children: project?.subtitle || '' }) ] }), /*#__PURE__*/ _jsxs("div", { className: "dash-actions", children: [ /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/reports/executive.html`, className: "button secondary small", target: "_blank", children: "Report" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/reports/risk-register.csv`, className: "button secondary small", target: "_blank", children: "CSV" }) ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "tabs", children: TABS.map((t)=>/*#__PURE__*/ _jsx("button", { className: `tab ${tab === t ? 'active' : ''}`, onClick: ()=>router.push(`/dashboard?tab=${t}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ _jsx(OverviewTab, { project: project, dashboard: dashboard }), tab === 'Risks' && /*#__PURE__*/ _jsx(RisksTab, { project: project, dashboard: dashboard, toast: { add } }), tab === 'Mitigations' && /*#__PURE__*/ _jsx(MitigationsTab, { project: project, dashboard: dashboard, toast: { add } }), tab === 'Gate' && /*#__PURE__*/ _jsx(GateTab, { project: project, dashboard: dashboard }), tab === 'Integrations' && /*#__PURE__*/ _jsx(IntegrationsTab, { project: project, dashboard: dashboard }), /*#__PURE__*/ _jsx(ToastContainer, { toasts: toasts }) ] }); } “?61146undefined148213undefined215258undefined260302undefined477484(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined507517(0,react__WEBPACK_IMPORTED_MODULE_1__.useCallback)undefined10221025(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined11221125(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined13321336(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined14271430(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined15561559(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined22452248(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined24102416(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)undefined38893892(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined39693972(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined40754079(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined40814089react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmentundefined41404143(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined43694373(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined45124515(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined46494652(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined48554858(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined51065110(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined53485352(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined54855488(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined56675671(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined59255929(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined63686371(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined67536756(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined72227225(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined73717374(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined80628066(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined81998202(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined83818385(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined86398643(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined90829085(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined94699473(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1019210195(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1034110344(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1117211179(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined1122011227(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined1128311290(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined1132911336(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined1138611393(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined1143811445(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined1147211478(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)undefined1168411690(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)undefined1237512377_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .api */ .FHundefined1271712720(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1279712800(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1288812892(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1289412902react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmentundefined1295312956(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1315713160(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1325213256(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1337913382(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1344713450(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1509415098(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1569015693(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1577615780(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1596415967(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1638416387(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1646516468(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1669616699(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1677716780(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1709917102(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1744517448(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1752617529(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1776717770(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1784817851(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1835618359(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1843718440(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1877418777(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1885518858(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1934219345(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined1951519519(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined1991219915(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2000820011(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2015620159(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2030620310(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2048620489(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2062220626(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2099020994(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2110721110(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2135021353(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2154921553(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2166621669(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2190521908(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2210922113(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2222622229(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2247122474(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2267222676(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2278922792(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2302923032(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2322523229(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2334223345(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2358923592(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2379223796(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2390923912(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2414824151(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2421824221(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2448124485(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2459824601(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2484024843(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2504325047(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2516025163(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2539925402(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2568925693(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2595025953(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2616326166(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2633226336(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2654726550(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2690026903(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2752927532(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2807928082(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2820128204(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2862828635(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined2867628683(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined2873928746(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined2878028786(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)undefined2899829004(0,react__WEBPACK_IMPORTED_MODULE_1__.useMemo)undefined2951929522(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2959929602(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2969029694(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined2969629704react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmentundefined2975529758(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined2993829941(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3003330037(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3016030163(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3022830231(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3151131515(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3210732110(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3220632210(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3232232325(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3240332406(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3263132634(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3271232715(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3301033013(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3309133094(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3342233425(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3350333507(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3395433957(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3439334396(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3535635360(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3569935702(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3578035783(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3624736250(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3634336346(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3654636549(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3662636629(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3693436938(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3694036948react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmentundefined3699937003(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3711837122(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3721137214(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3735837361(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3763937642(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3775237755(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3810438107(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3819938203(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3832638329(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3839438398(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3850238505(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3866738670(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3883138834(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3899338996(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3923539238(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3932139325(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined3943739440(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3951839521(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3974539748(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined3992139924(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4009540098(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4017640179(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4064340646(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4073940742(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4087540879(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4109541098(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4139541398(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4178741791(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4179341801react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmentundefined4185241855(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4194841952(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4203342036(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4216542168(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4242542428(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4280142805(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4304643049(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4344543448(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4373143734(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4411844122(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4446144464(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4477844781(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4519945202(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4533145334(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4560845622undefined4566945677(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined4570845715(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined4576445771(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined4581845825(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined4586845875(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined4591445921(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined4602546033(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined4625946267(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined4635546357_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .api */ .FHundefined4663046632_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .api */ .FHundefined4695346955_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .api */ .FHundefined4724747250(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4732947332(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4743147435(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4752647529(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4765347656(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4775547759(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4776147769react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.Fragmentundefined4782047824(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4793947943(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4803248035(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4819048193(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4843548439(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined4857948582(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4892848931(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4934349346(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4944649449(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4973449737(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined4988649889(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5010950112(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5033150334(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5048650489(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined5062350626(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined€“__webpack_require__•__webpack_require__.n•__webpack_require__.r“__webpack_exports__•__webpack_require__.d