/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/12.pack (3307846B)
wpc:y2§webpack/lib/cache/PackFileCacheStrategyPackContentItems € ResolverCachePlugin|normal|default|alias=|false|dependencyType=|esm|modules=[|0=|node_modules|]|fallback=|false|exportsFields=[|0=|exports|]|importsFields=[|0=|imports|]|conditionNames=[|0=|node|1=|import|]|descriptionFiles=[|0=|package.json|]|extensions=[|0=|.js|1=|.json|2=|.node|]|enforceExtensions=|false|symlinks=|true|mainFields=[|0=|main|]|mainFiles=[|0=|index|]|roots=[|]|fullySpecified=|true|preferRelative=|false|preferAbsolute=|false|restrictions=[|]|path=|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app|request=|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.jsxResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/empty|client-only$=|next/dist/compiled/client-only/error|next/dist/compiled/server-only$=|next/dist/compiled/server-only/empty|next/dist/compiled/client-only$=|next/dist/compiled/client-only/error|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\head.js=|next/dist/client/components/noop-head|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\image.js=|next/dist/api/image|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\constants.js=|next/dist/api/constants|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\router.js=|next/dist/api/router|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\dynamic.js=|next/dist/api/app-dynamic|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\script.js=|next/dist/api/script|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\link.js=|next/dist/client/app-dir/link|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\form.js=|next/dist/client/app-dir/form|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\navigation.js=|next/dist/api/navigation.react-server|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\headers.js=|next/dist/api/headers|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\og.js=|next/dist/api/og|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\server.js=|next/dist/api/server|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\document.js=|next/dist/api/document|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\app.js=|next/dist/api/app|next=|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|]|dependencyType=|esm|path=|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app|request=|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§Compilation/modules|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-loader\index.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[4].use[0]!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|rscResolverCachePlugin|normal|default|alias=[|server-only$=|next/dist/compiled/server-only/index|client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/client-only$=|next/dist/compiled/client-only/index|next/dist/compiled/server-only=|next/dist/compiled/server-only/index|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\head.js=|next/dist/client/components/noop-head|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\image.js=|next/dist/api/image|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\constants.js=|next/dist/api/constants|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\router.js=|next/dist/api/router|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\dynamic.js=|next/dist/api/app-dynamic|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\script.js=|next/dist/api/script|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\link.js=|next/dist/client/app-dir/link|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\form.js=|next/dist/client/app-dir/form|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\navigation.js=|next/dist/api/navigation|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\headers.js=|next/dist/api/headers|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\og.js=|next/dist/api/og|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\server.js=|next/dist/api/server|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\document.js=|next/dist/api/document|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\app.js=|next/dist/api/app|next=|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|]|dependencyType=|esm|path=|C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app|request=|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¯Compilation/modules|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ˇFlagDependencyExportsPlugin|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×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|8ec055afadaf2c53|webpack-runtimeœCompilation/assets|chunk5105ŽMinifierWebpackPlugin|../app/dashboard/page.jsĨwebpack/lib/cache/ResolverCachePlugin€€`_ResolverCachePluginCacheMiss‡context„path‡request…queryˆfragment†module‰directory„fileˆinternalŽfullySpecified“descriptionFilePath“descriptionFileData“descriptionFileRootŒrelativePath  Ŧ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€€0žC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\application\saas-app\package.json„name‡version‡private‹description‡scriptsŒdependenciesdevDependencies‡engines“cosmic-ai-risk-saas…0.1.0 ˛Commercial SaaS rebuild of the COSMIC AI-Risk Dashboard with multi-tenant workspaces, PostgreSQL, Prisma, invite-only auth, billing entitlements, and enterprise-ready boundaries.`ƒdev…build…start„lint„testprisma:generateŠdb:migrate‡db:push‡db:seedŒcheck:configŠtest:localŽlocal:fallback‰mock-oidc‡dev:sso‰sso:setupnext dev -p 8091Šnext build’next start -p 8091‰next lintęnode tests/saas-domain.test.js && node tests/tenant-security.test.js && node tests/idempotency.test.js && node tests/metrics.test.js && node tests/oidc.test.js && node tests/rate-limit.test.js && node tests/integration-service.test.jsprisma generate•prisma migrate deployŽprisma db push“node prisma/seed.jsœnode scripts/check-config.jsŸnode tests/local-server.test.js”node local-server.jsšnode mock-oidc-provider.js¨node mock-oidc-provider.js & npm run devūŽ@prisma/clientˆbcryptjs„next…react‰react-dom†stripeƒzod‡^5.22.0†^2.4.3‡^15.0.3‡^19.0.0˙‡^17.3.1‡^3.23.8†eslint’eslint-config-next†prisma‡^9.14.0öô„node‰>=20.11.0‘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šwebpack/lib/FileSystemInfoˆSnapshot@‰ pŊ?ĸķyB€ pŊ?ĸķyB`ļĩŖ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™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•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øˆC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze\applicationüC:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk Dashboard\Step 12 is complete Final QA, Demo Readiness, and Submission Freeze¸C:\Users\abd_b\OneDrive\Desktop\COSMIC AI-Risk DashboardŸC:\Users\abd_b\OneDrive\Desktop—C:\Users\abd_b\OneDriveŽC:\Users\abd_bˆC:\UsersƒC:\ˆsafeTime‰timestamp„hash!€Ņœ†ķyB@˜†ķyB404ac705cc6d108aũ!āô=ĸķyBĐô=ĸķyB5ccd5cbd07a49194û˜ú—ų–ø•÷”ö“õ’ô‘ķōņŽđ@€°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\package.jsonĻ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\package.jsonĸ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\package.jsonŠ †issuer‹issuerLayerˆcompiler€ƒrsc†server…€€ †ĘËĖ@ đž?ĸķyBīô˜webpack/lib/NormalModuleĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceT// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"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\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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", "default", ); ‹exportsType‰namespace javascript/autoōÅ…aliasŠmainFieldsŽconditionNamesp˙˙˙`$Œserver-only$Œclient-only$Ÿnext/dist/compiled/server-only$Ÿnext/dist/compiled/client-only$Ģ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\head.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\image.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\constants.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\router.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\dynamic.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\script.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\link.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\form.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\navigation.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\headers.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\og.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\server.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\document.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\app.js†react$—react/compiler-runtime$–react/jsx-dev-runtime$’react/jsx-runtime$Šreact-dom$‘react-dom/client$‘react-dom/server$™react-dom/server.browser$–react-dom/server.edge$‘react-dom/static$™react-dom/static.browser$–react-dom/static.edge$ react-server-dom-webpack/client$ react-server-dom-webpack/server$Ĩreact-server-dom-webpack/server.node$ react-server-dom-webpack/static$É@vercel/turbopack-ecmascript-runtime/browser/dev/hmr-client/hmr-client.ts‚¤next/dist/compiled/server-only/empty¤next/dist/compiled/client-only/errorū˙Ĩnext/dist/client/components/noop-head“next/dist/api/image—next/dist/api/constants”next/dist/api/router™next/dist/api/app-dynamic”next/dist/api/scriptnext/dist/client/app-dir/linknext/dist/client/app-dir/formĨnext/dist/api/navigation.react-server•next/dist/api/headersnext/dist/api/og”next/dist/api/server–next/dist/api/document‘next/dist/api/appēnext/dist/server/route-modules/app-page/vendored/rsc/reactËnext/dist/server/route-modules/app-page/vendored/rsc/react-compiler-runtimeĘnext/dist/server/route-modules/app-page/vendored/rsc/react-jsx-dev-runtimeÆnext/dist/server/route-modules/app-page/vendored/rsc/react-jsx-runtimežnext/dist/server/route-modules/app-page/vendored/rsc/react-domŖnext/dist/compiled/react-dom/client¨next/dist/compiled/react-dom/server.nodeĢnext/dist/compiled/react-dom/server.browserąnext/dist/build/webpack/alias/react-dom-server.js¨next/dist/compiled/react-dom/static.nodeĢnext/dist/compiled/react-dom/static.browser¨next/dist/compiled/react-dom/static.edgeˇnext/dist/compiled/react-server-dom-webpack/client.nodeÔnext/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-server˙Ônext/dist/server/route-modules/app-page/vendored/rsc/react-server-dom-webpack-static§next/dist/client/dev/noop-turbopack-hmrŖ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%˙˙˙„mainŒreact-serverƒ... ­`‰cacheable†parsedfileDependencies“contextDependencies“missingDependencies‘buildDependencies‘valueDependencies{˙˙˙†assetsŠassetsInfo™†strictexportsArgument”topLevelDeclarationsˆsnapshot ˜webpack/lib/util/LazySetÚ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-loader\index.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 ™webpack/DefinePlugin_hashˆb5546dede6530496aff90673„type‰actionIdsŠclientRefsclientEntryType‹isClientRef†client‡default„auto  “__webpack_exports__‰*default* đĨ?ĸķyB ˙˙˙d˙˙˙ˇwebpack/lib/dependencies/HarmonyCompatibilityDependency d˙˙ũ¨webpack/lib/dependencies/ConstDependency€`=@‡ `Jļwebpack/lib/dependencies/HarmonyExportHeaderDependency A—R AˆS  ēwebpack/lib/dependencies/HarmonyImportSideEffectDependencyŸreact-server-dom-webpack/server˙ `Jēwebpack/lib/dependencies/HarmonyExportExpressionDependency`úû€ šwebpack/lib/dependencies/HarmonyImportSpecifierDependencya —registerClientReferenceū A—Ž  ųųū b&  đū˙˙  i˙˙˙€ƒssrj˙˙˙đū˙˙€€ ņū˙˙5˙˙˙6˙˙˙7˙˙˙ @ Ņ?ĸķyB Z˙˙˙_˙˙˙ ÃN/* __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, useSearchParams } from 'next/navigation'; import { api } from '../../lib/api-client'; import ErrorBoundary from '../../components/ErrorBoundary'; const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; 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 FormField({ label, children }) { return /*#__PURE__*/ _jsxs("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ _jsx("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ _jsx("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ _jsxs("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ _jsx("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ _jsx("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } 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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Risk" }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { 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 [showCreate, setShowCreate] = useState(false); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); 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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__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: ()=>openDetail(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" }) }), showCreate && /*#__PURE__*/ _jsx(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, 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: RISK_STATUSES.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" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Mitigation" }), /*#__PURE__*/ _jsx(FormField, { label: "Risk *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('progressPercent'); const [sortDir, setSortDir] = useState('asc'); const [showCreate, setShowCreate] = useState(false); const [selectedMitigation, setSelectedMitigation] = useState(null); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); const mitigations = useMemo(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = useMemo(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); 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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__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", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, 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" }) }), showCreate && /*#__PURE__*/ _jsx(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = useState(false); const [showDecision, setShowDecision] = useState(false); const [decisionForm, setDecisionForm] = useState({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = useState(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); 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: "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, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Gate Decision" }), /*#__PURE__*/ _jsx(FormField, { label: "Decision", children: /*#__PURE__*/ _jsx(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reason", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Integration" }), /*#__PURE__*/ _jsx(FormField, { label: "Provider", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Base URL", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Auth Mode", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = useState(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("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: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__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: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ _jsx("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ _jsx("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ _jsx(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ _jsx("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ _jsx("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const load = useCallback(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Audit Log" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__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: "Date" }), /*#__PURE__*/ _jsx("th", { children: "Action" }), /*#__PURE__*/ _jsx("th", { children: "Entity" }), /*#__PURE__*/ _jsx("th", { children: "Actor" }), /*#__PURE__*/ _jsx("th", { children: "Details" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: events.map((e)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ _jsxs("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ _jsxs("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "All Projects" }), /*#__PURE__*/ _jsxs("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__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: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ _jsx("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Project Settings" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Subtitle", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Project" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Project Type", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ _jsxs("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("th", { children: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", {}) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet" }) }), /*#__PURE__*/ _jsx("div", { className: "modal-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } export default function DashboardPage() { const router = useRouter(); const searchParams = useSearchParams(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = useState(null); const [projects, setProjects] = useState([]); const [selectedProjectId, setSelectedProjectId] = useState(searchParams.get('projectId') || null); const [dashboard, setDashboard] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [retryCount, setRetryCount] = useState(0); const [showProjectSettings, setShowProjectSettings] = useState(false); const [showProjectManager, setShowProjectManager] = useState(false); const [workspaceId, setWorkspaceId] = useState(null); const { toasts, add } = useToast(); const onRefresh = useCallback(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = useCallback(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsx("p", { children: error }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ _jsx("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ _jsxs("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__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}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ _jsx(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ _jsx(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ _jsx(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ _jsx(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ _jsx(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ _jsx(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ _jsx(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ _jsx(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ _jsx(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ _jsx(ToastContainer, { toasts: toasts }) ] }); } `  k˙˙˙ŽsideEffectFreej˙˙˙  k˙˙˙ô1˙˙˙  l˙˙˙ßū˙˙m˙˙˙  `$o˙˙˙p˙˙˙r˙˙˙žnext/dist/compiled/server-onlyr˙˙˙s˙˙˙t˙˙˙u˙˙˙v˙˙˙w˙˙˙x˙˙˙y˙˙˙z˙˙˙{˙˙˙|˙˙˙}˙˙˙~˙˙˙˙˙˙€‚ƒ„…†‡ˆ‰Š‹ŒŽ˙˙˙¤next/dist/compiled/server-only/index¤next/dist/compiled/client-only/index˙ū‘’“”•–—˜˜next/dist/api/navigation™š›œēnext/dist/server/route-modules/app-page/vendored/ssr/reactËnext/dist/server/route-modules/app-page/vendored/ssr/react-compiler-runtimeĘnext/dist/server/route-modules/app-page/vendored/ssr/react-jsx-dev-runtimeÆnext/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtimežnext/dist/server/route-modules/app-page/vendored/ssr/react-domžŸ ĄĸŖ¤Ônext/dist/server/route-modules/app-page/vendored/ssr/react-server-dom-webpack-clientˇnext/dist/compiled/react-server-dom-webpack/server.node˙ˇnext/dist/compiled/react-server-dom-webpack/static.nodeĨĻ ¨î š â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ēģŧ094f6529d47e5eaf  ŊžÁ  Æ `ˆuseToastŽToastContainer‹SearchInputˆsortData…Badge‰FormField‹InlineInputŒInlineSelectConfirmDelete‹OverviewTabRiskFormModalˆRisksTab“MitigationFormModalŽMitigationsTab‡GateTab”IntegrationFormModalIntegrationsTabˆAuditTab‹ProjectsTab”ProjectSettingsModalNewProjectModal“ProjectManagerModal„TABS‰PAGE_SIZEŠDIMENSIONSLIFECYCLE_PHASESRISK_STATUSES“MITIGATION_STATUSESĢDashboardPage đĨ?ĸķyB˛ū˙˙˙˙˙  d˙˙ũ€ `=@“ a=@“€ A”Ö `B€ A× `=€ A@ `+€ AA| `; A¤N Aõ¤N @Ģ @Ø  @c‘react/jsx-runtime˙ a=@“Îū˙˙Îū˙˙ `Bnext/navigation˙ `=”../../lib/api-client˙ `+ž../../components/ErrorBoundary˙ `;ąwebpack/lib/dependencies/PureExpressionDependencya AŠų ˆ a A$x … c A“× ‚ c Aī0 ˙˙˙ c" AN’ |˙˙˙ c#( ˆuseStateū AĘŌ   v˙˙˙ŗū˙˙ŗū˙˙ũ c* *( ‹useCallbackū Ačķ  úŽū˙˙Žū˙˙ū c++ ƒjsx„_jsx Aëī   j˙˙˙××ũ c>> ųú AOS  ûĶĶū c@0@4 „jsxs…_jsxs A!&   _˙˙˙ĖĖũ cGG îī A€„  ûČČū cJJ ęë A  ÷ÄÄū cNN æį A˛ ļ    R˙˙˙ŋŋũ cdd ėí AX ]    M˙˙˙ēēũ cjj ÜŨ AÎ Ō   ûļļū coo ØŲ Ak o    D˙˙˙ąąũ c}} Ūß Aāå   ?˙˙˙ŦŦũ @Œ`@Œ` ÎĪ AšŊ  û¨¨ū @”`@”` ĘË Aāä  ÷¤¤ū @›`%@›`) ÆĮ AËĪ   2˙˙˙ŸŸũ @¤`@¤` ĖÍ A8=  û››ū @§` @§`% ČÉ A  ÷——ū @Ž`@Ž`# šē Aâæ  ķ““ū @ĩ`@ĩ`" ĀÁ Aßä  īū @ŧ`@ŧ`# ą˛ Adh  ë‹‹ū @ŋ`&@ŋ`* ­Ž AVZ  ᇇū @Ä`&@Ä`* ‡useMemoū A §   ˙˙˙Qū˙˙Qū˙˙ũ @Õ`@Õ` Ŗ¤ Agk  û}˙˙˙}˙˙˙ū @ô`)@ô`- Ÿ  Aˇģ  ÷y˙˙˙y˙˙˙ū @ö` @ö`$ ϧ A!&  ķu˙˙˙u˙˙˙ū @ú`@ú` ˆFragment‰_Fragment A'0 4ío˙˙˙o˙˙˙ū @ú`@ú`( ‘’ Abf  ék˙˙˙k˙˙˙ū @ü`@ü` ˜™ AG L   åg˙˙˙g˙˙˙ū @`8@`= ‰Š AÖ Ú   ác˙˙˙c˙˙˙ū @`*@`. …† A_!c!  Ũ_˙˙˙_˙˙˙ū @`*@`. ‚ A-"1"  Ų[˙˙˙[˙˙˙ū @ `*@ `. ˆ‰ A(#-#  ÕW˙˙˙W˙˙˙ū @`@` „… A$$  ŅS˙˙˙S˙˙˙ū @`"@`' u˙˙˙v˙˙˙ AŖ$§$  ÍO˙˙˙O˙˙˙ū @`*@`. |˙˙˙}˙˙˙ AY%^%  ÉK˙˙˙K˙˙˙ū @`R@`W x˙˙˙y˙˙˙ A[&`&  ÅG˙˙˙G˙˙˙ū @$`6@$`; i˙˙˙j˙˙˙ A((  ÁC˙˙˙C˙˙˙ū @+`>@+`B e˙˙˙f˙˙˙ A—)›)  Ŋ?˙˙˙?˙˙˙ū @1`>@1`B a˙˙˙b˙˙˙ Al+p+  š;˙˙˙;˙˙˙ū @9`6@9`: ]˙˙˙^˙˙˙ A,,  ĩ7˙˙˙7˙˙˙ū @;`D@;`H d˙˙˙e˙˙˙ A´.š.  ą3˙˙˙3˙˙˙ū @G`"@G`' U˙˙˙V˙˙˙ A=/A/  ­/˙˙˙/˙˙˙ū @J`*@J`. \˙˙˙]˙˙˙ Aķ/ø/  Š+˙˙˙+˙˙˙ū @M`S@M`X X˙˙˙Y˙˙˙ Aõ0ú0  Ĩ'˙˙˙'˙˙˙ū @R`6@R`; I˙˙˙J˙˙˙ A°2´2  Ą#˙˙˙#˙˙˙ū @Y`>@Y`B P˙˙˙Q˙˙˙ A3484  ˙˙˙˙˙˙ū @_`>@_`C A˙˙˙B˙˙˙ A7 7  ™˙˙˙˙˙˙ū @k`6@k`: =˙˙˙>˙˙˙ A›7Ÿ7  •˙˙˙˙˙˙ū @m`D@m`H .˙˙˙-˙˙˙ Aæ:î:   Ĩū˙˙âũ˙˙âũ˙˙ũ @` @`( )˙˙˙(˙˙˙ A;;  ûŪũ˙˙Ūũ˙˙ū @€`@€`$ ƒapi„postũ AÅ=Í=  AÅ=Č=  ô ˙˙˙ ˙˙˙ũ @š`@š` )˙˙˙*˙˙˙ Aī>ķ>  đ˙˙˙˙˙˙ū @Ŗ`@Ŗ` 0˙˙˙1˙˙˙ A[?`?  ė˙ū˙˙˙ū˙˙ū @Ļ` @Ļ`% !˙˙˙"˙˙˙ A1@5@  čûū˙˙ûū˙˙ū @­`@­`" ˙˙˙˙˙˙ A™@@  ä÷ū˙˙÷ū˙˙ū @°`@°`" ˙˙˙˙˙˙ Aũ@A  āķū˙˙ķū˙˙ū @˛`,@˛`0 ˙˙˙˙˙˙ A´A¸A  Üīū˙˙īū˙˙ū @ˇ`@ˇ`" ˙˙˙˙˙˙ AB B  Øëū˙˙ëū˙˙ū @š`,@š`0 ˙˙˙˙˙˙ AÖCÛC  Ôįū˙˙įū˙˙ū @Ä`@Ä`#  ˙˙˙ ˙˙˙ AßDãD  Đãū˙˙ãū˙˙ū @Ë`&@Ë`* ˙˙˙˙˙˙ AWE[E  Ėßū˙˙ßū˙˙ū @Í`4@Í`8 ˙˙˙˙˙˙ AtFxF  ČÛū˙˙Ûū˙˙ū @Ķ`&@Ķ`* ũū˙˙ūū˙˙ AįFëF  Ä×ū˙˙×ū˙˙ū @Õ`4@Õ`8 ųū˙˙úū˙˙ AéGíG  ĀĶū˙˙Ķū˙˙ū @Ü`@Ü`" õū˙˙öū˙˙ AUHYH  ŧĪū˙˙Īū˙˙ū @Ū`,@Ū`0 üū˙˙ũū˙˙ ARIWI  ¸Ëū˙˙Ëū˙˙ū @ä`@ä`# íū˙˙îū˙˙ A_JcJ  ´Įū˙˙Įū˙˙ū @ë`&@ë`* éū˙˙ęū˙˙ A×JÛJ  °Ãū˙˙Ãū˙˙ū @í`4@í`8 åū˙˙æū˙˙ ADLHL  Ŧŋū˙˙ŋū˙˙ū @õ`&@õ`* áū˙˙âū˙˙ AˇLģL  ¨ģū˙˙ģū˙˙ū @÷`4@÷`8 Ũū˙˙Ūū˙˙ ANN  ¤ˇū˙˙ˇū˙˙ū @˙`&@˙`* Ųū˙˙Úū˙˙ A”N˜N   ŗū˙˙ŗū˙˙ū @`4@`8 Õū˙˙Öū˙˙ A&P*P  œ¯ū˙˙¯ū˙˙ū @ `@ `" Ņū˙˙Ōū˙˙ AˆPŒP  ˜Ģū˙˙Ģū˙˙ū @ `,@ `0 Øū˙˙Ųū˙˙ AUQZQ  ”§ū˙˙§ū˙˙ū @`@`# Éū˙˙Ęū˙˙ AÚQŪQ  Ŗū˙˙Ŗū˙˙ū @`&@`* Åū˙˙Æū˙˙ AËRĪR  ŒŸū˙˙Ÿū˙˙ū @`&@`* ļū˙˙ĩū˙˙ A‚TŠT   -ū˙˙jũ˙˙jũ˙˙ũ @'` @'`( ąū˙˙°ū˙˙ A˛TēT  ûfũ˙˙fũ˙˙ū @(`"@(`* ­ū˙˙Ŧū˙˙ AņTųT  ÷bũ˙˙bũ˙˙ū @)`"@)`* Šū˙˙¨ū˙˙ AU'U  ķ^ũ˙˙^ũ˙˙ū @*`@*`$ Ĩū˙˙¤ū˙˙ AXU`U  īZũ˙˙Zũ˙˙ū @+`,@+`4 Ąū˙˙ ū˙˙ AU˜U  ëVũ˙˙Vũ˙˙ū @,`(@,`0 ū˙˙œū˙˙ AÃUËU  įRũ˙˙Rũ˙˙ū @-`"@-`* ™ū˙˙˜ū˙˙ AøUV  ãNũ˙˙Nũ˙˙ū @.`$@.`, •ū˙˙”ū˙˙ A*V2V  ßJũ˙˙Jũ˙˙ū @/`$@/`, ‘ū˙˙ū˙˙ AhVpV  ÛFũ˙˙Fũ˙˙ū @0`.@0`6 ū˙˙Œū˙˙ AœV¤V  ×Bũ˙˙Bũ˙˙ū @1`$@1`, ëū˙˙ęū˙˙ AŋVÆV  Ķ>ũ˙˙>ũ˙˙ū @2`@2` įū˙˙æū˙˙ A“WšW  Ī:ũ˙˙:ũ˙˙ū @:`@:` \˙˙˙…patchZ˙˙˙ A’\›\  A’\•\  Éiū˙˙iū˙˙ũ @]`@]` V˙˙˙úU˙˙˙ A¯^¸^  A¯^˛^  Ädū˙˙dū˙˙ũ @p`@p` Q˙˙˙ƒdelO˙˙˙ AB`I`  AB`E`  ž^ū˙˙^ū˙˙ũ @}`@}` {ū˙˙|ū˙˙ A¸aŧa  ēUū˙˙Uū˙˙ū @ˆ`)@ˆ`- wū˙˙xū˙˙ Ab b  ļQū˙˙Qū˙˙ū @Š` @Š`$ ~ū˙˙ū˙˙ Acbhb  ˛Mū˙˙Mū˙˙ū @Ž`@Ž`Ųū˙˙Úū˙˙ Aibrb 4¯Jū˙˙Jū˙˙ū @Ž`@Ž`( wū˙˙xū˙˙ A¤bŠb  ĢFū˙˙Fū˙˙ū @`@` hū˙˙iū˙˙ Aƒc‡c  §Bū˙˙Bū˙˙ū @—`"@—`& dū˙˙eū˙˙ Awd{d  Ŗ>ū˙˙>ū˙˙ū @œ`"@œ`& `ū˙˙aū˙˙ Awe{e  Ÿ:ū˙˙:ū˙˙ū @Ŗ`@Ŗ` gū˙˙hū˙˙ AÖeÛe  ›6ū˙˙6ū˙˙ū @Ĩ`(@Ĩ`- Xū˙˙Yū˙˙ AUfYf  —2ū˙˙2ū˙˙ū @¨`&@¨`* Tū˙˙Uū˙˙ A™ff  “.ū˙˙.ū˙˙ū @Š`4@Š`8 [ū˙˙\ū˙˙ Am m  *ū˙˙*ū˙˙ū @Ë`;@Ë`@ Lū˙˙Mū˙˙ A\o`o  ‹&ū˙˙&ū˙˙ū @Ö`&@Ö`* Sū˙˙Tū˙˙ A˛oˇo  ‡"ū˙˙"ū˙˙ū @×`F@×`K Dū˙˙Eū˙˙ Aipmp  ƒū˙˙ū˙˙ū @Ú`6@Ú`: @ū˙˙Aū˙˙ A rr  ˙˙˙ū˙˙ū˙˙ū @á`6@á`: <ū˙˙=ū˙˙ A^rbr  {˙˙˙ū˙˙ū˙˙ū @â`D@â`H 8ū˙˙9ū˙˙ AEsIs  w˙˙˙ū˙˙ū˙˙ū @æ`6@æ`: 4ū˙˙5ū˙˙ A–sšs  s˙˙˙ū˙˙ū˙˙ū @į`D@į`H 0ū˙˙1ū˙˙ AØtÜt  o˙˙˙ ū˙˙ ū˙˙ū @ė`6@ė`: ,ū˙˙-ū˙˙ A2v6v  k˙˙˙ū˙˙ū˙˙ū @ō`6@ō`: (ū˙˙)ū˙˙ Aƒv‡v  g˙˙˙ū˙˙ū˙˙ū @ķ`D@ķ`H $ū˙˙%ū˙˙ Atwxw  c˙˙˙ūũ˙˙ūũ˙˙ū @÷`6@÷`:  ū˙˙!ū˙˙ AÅwÉw  _˙˙˙úũ˙˙úũ˙˙ū @ø`D@ø`H ū˙˙ū˙˙ AÁyÅy  [˙˙˙öũ˙˙öũ˙˙ū @˙`6@˙`: ū˙˙ū˙˙ Azz  W˙˙˙ōũ˙˙ōũ˙˙ū @`D@`H ū˙˙ū˙˙ Ac{g{  S˙˙˙îũ˙˙îũ˙˙ū @`6@`: ū˙˙ū˙˙ A´{¸{  O˙˙˙ęũ˙˙ęũ˙˙ū @`D@`H  ū˙˙ ū˙˙ A›}Ÿ}  K˙˙˙æũ˙˙æũ˙˙ū @`<@`@ ū˙˙ū˙˙ AH~M~  G˙˙˙âũ˙˙âũ˙˙ū @`(@`- ū˙˙ū˙˙ AÕŲ  C˙˙˙Ūũ˙˙Ūũ˙˙ū @ `.@ `2 ū˙˙ū˙˙ A5€9€  ?˙˙˙Úũ˙˙Úũ˙˙ū @"`(@"`, üũ˙˙ũũ˙˙ AĮ€Ë€  ;˙˙˙Öũ˙˙Öũ˙˙ū @&`(@&`, øũ˙˙ųũ˙˙ A‚‚  7˙˙˙Ōũ˙˙Ōũ˙˙ū @/`<@/`@ ˙ũ˙˙ū˙˙ AŽ‚ŗ‚  3˙˙˙Îũ˙˙Îũ˙˙ū @2`(@2`- ûũ˙˙üũ˙˙ AŧƒÁƒ  /˙˙˙Ęũ˙˙Ęũ˙˙ū @9`&@9`+ ėũ˙˙íũ˙˙ A ……  +˙˙˙Æũ˙˙Æũ˙˙ū @@`.@@`2 čũ˙˙éũ˙˙ A2†6†  '˙˙˙Âũ˙˙Âũ˙˙ū @F`.@F`2 īũ˙˙đũ˙˙ A¨‡­‡  #˙˙˙žũ˙˙žũ˙˙ū @M`0@M`5Jū˙˙Kū˙˙ Aއˇ‡ 4 ˙˙˙ģũ˙˙ģũ˙˙ū @M`6@M`? čũ˙˙éũ˙˙ Aˆˆ  ˙˙˙ˇũ˙˙ˇũ˙˙ū @O`.@O`3 Ųũ˙˙Úũ˙˙ A‰‰  ˙˙˙ŗũ˙˙ŗũ˙˙ū @T`6@T`: Õũ˙˙Öũ˙˙ A¤‰¨‰  ˙˙˙¯ũ˙˙¯ũ˙˙ū @V`D@V`H Ņũ˙˙Ōũ˙˙ AϋNj  ˙˙˙Ģũ˙˙Ģũ˙˙ū @^`6@^`: Íũ˙˙Îũ˙˙ A>ŒBŒ   ˙˙˙§ũ˙˙§ũ˙˙ū @``D@``H Ôũ˙˙Õũ˙˙ AˏЏ  ˙˙˙Ŗũ˙˙Ŗũ˙˙ū @n`6@n`; Åũ˙˙Æũ˙˙ A|‘€‘  ˙˙˙Ÿũ˙˙Ÿũ˙˙ū @u`>@u`B Áũ˙˙Âũ˙˙ A"’&’  ˙˙˙›ũ˙˙›ũ˙˙ū @w`L@w`P Ŋũ˙˙žũ˙˙ Aē”ž”  üū˙˙—ũ˙˙—ũ˙˙ū @€`>@€`B šũ˙˙ēũ˙˙ A]•a•  øū˙˙“ũ˙˙“ũ˙˙ū @‚`L@‚`P ĩũ˙˙ļũ˙˙ Aō—ö—  ôū˙˙ũ˙˙ũ˙˙ū @Œ`6@Œ`: ąũ˙˙˛ũ˙˙ AŽ˜’˜  đū˙˙‹ũ˙˙‹ũ˙˙ū @Ž`D@Ž`H ¸ũ˙˙šũ˙˙ Aîšķš  ėū˙˙‡ũ˙˙‡ũ˙˙ū @—`6@—`; Šũ˙˙Ēũ˙˙ AŖœ§œ  čū˙˙ƒũ˙˙ƒũ˙˙ū @ž`>@ž`B Ĩũ˙˙Ļũ˙˙ AKO  äū˙˙ũ˙˙ũ˙˙ū @ `L@ `P Ąũ˙˙ĸũ˙˙ Ak o   āū˙˙{ũ˙˙{ũ˙˙ū @Ģ`>@Ģ`B ũ˙˙žũ˙˙ AĄĄ  Üū˙˙wũ˙˙wũ˙˙ū @­`L@­`P ™ũ˙˙šũ˙˙ A$¤(¤  Øū˙˙sũ˙˙sũ˙˙ū @¸`>@¸`B •ũ˙˙–ũ˙˙ AÎ¤Ō¤  Ôū˙˙oũ˙˙oũ˙˙ū @ē`L@ē`P ‘ũ˙˙’ũ˙˙ AC¨G¨  Đū˙˙kũ˙˙kũ˙˙ū @Į`6@Į`: ũ˙˙Žũ˙˙ AÕ¨Ų¨  Ėū˙˙gũ˙˙gũ˙˙ū @É`D@É`H ”ũ˙˙•ũ˙˙ A.Ģ3Ģ  Čū˙˙cũ˙˙cũ˙˙ū @Ķ`.@Ķ`3 …ũ˙˙†ũ˙˙ AãĢįĢ  Äū˙˙_ũ˙˙_ũ˙˙ū @Ö`6@Ö`: ũ˙˙‚ũ˙˙ A6­:­  Āū˙˙[ũ˙˙[ũ˙˙ū @Û`6@Û`: }ũ˙˙~ũ˙˙ AãŽįŽ  ŧū˙˙Wũ˙˙Wũ˙˙ū @á`6@á`: „ũ˙˙…ũ˙˙ AÃąČą  ¸ū˙˙Sũ˙˙Sũ˙˙ū @î`+@î`0ßũ˙˙āũ˙˙ AÉąŌą 4ĩū˙˙Pũ˙˙Pũ˙˙ū @î`1@î`: }ũ˙˙~ũ˙˙ A,˛1˛  ąū˙˙Lũ˙˙Lũ˙˙ū @đ`.@đ`3 yũ˙˙zũ˙˙ A´´  ­ū˙˙Hũ˙˙Hũ˙˙ū @ų`6@ų`; jũ˙˙kũ˙˙ A˜´œ´  Šū˙˙Dũ˙˙Dũ˙˙ū @û`>@û`B fũ˙˙gũ˙˙ AĢĩ¯ĩ  Ĩū˙˙@ũ˙˙@ũ˙˙ū @˙`>@˙`B mũ˙˙nũ˙˙ A’ļ—ļ  Ąū˙˙<ũ˙˙<ũ˙˙ū @`6@`; ^ũ˙˙_ũ˙˙ Aˇˇ  ū˙˙8ũ˙˙8ũ˙˙ū @`>@`B Zũ˙˙[ũ˙˙ A&¸*¸  ™ū˙˙4ũ˙˙4ũ˙˙ū @ `>@ `B aũ˙˙bũ˙˙ Ašš  •ū˙˙0ũ˙˙0ũ˙˙ū @ `6@ `; Rũ˙˙Sũ˙˙ A—š›š  ‘ū˙˙,ũ˙˙,ũ˙˙ū @`>@`B Nũ˙˙Oũ˙˙ AŦē°ē  ū˙˙(ũ˙˙(ũ˙˙ū @`>@`B Uũ˙˙Vũ˙˙ A•ģšģ  ‰ū˙˙$ũ˙˙$ũ˙˙ū @`6@`; Fũ˙˙Gũ˙˙ Aŧŧ  …ū˙˙ ũ˙˙ ũ˙˙ū @`>@`B Bũ˙˙Cũ˙˙ A*Ŋ.Ŋ  ū˙˙ũ˙˙ũ˙˙ū @`>@`B Iũ˙˙Jũ˙˙ Ažž  }ū˙˙ũ˙˙ũ˙˙ū @!`6@!`; :ũ˙˙;ũ˙˙ A“ž—ž  yū˙˙ũ˙˙ũ˙˙ū @#`>@#`B 6ũ˙˙7ũ˙˙ AĒŋŽŋ  uū˙˙ũ˙˙ũ˙˙ū @'`>@'`B =ũ˙˙>ũ˙˙ A•ĀšĀ  qū˙˙ ũ˙˙ ũ˙˙ū @+`6@+`; .ũ˙˙/ũ˙˙ AÁÁ  mū˙˙ũ˙˙ũ˙˙ū @-`>@-`B *ũ˙˙+ũ˙˙ A)Â-  iū˙˙ũ˙˙ũ˙˙ū @1`>@1`B &ũ˙˙'ũ˙˙ AwÂ{  eū˙˙ũ˙˙ũ˙˙ū @2`>@2`B -ũ˙˙.ũ˙˙ AĻÃĢà  aū˙˙üü˙˙üü˙˙ū @7`6@7`; ũ˙˙ũ˙˙ A+Ä/Ä  ]ū˙˙øü˙˙øü˙˙ū @9`>@9`B ũ˙˙ũ˙˙ A=ÅAÅ  Yū˙˙ôü˙˙ôü˙˙ū @=`>@=`B !ũ˙˙"ũ˙˙ A(Æ-Æ  Uū˙˙đü˙˙đü˙˙ū @A`6@A`; ũ˙˙ũ˙˙ A­ÆąÆ  Qū˙˙ėü˙˙ėü˙˙ū @C`>@C`B ũ˙˙ũ˙˙ AŧĮĀĮ  Mū˙˙čü˙˙čü˙˙ū @G`>@G`B ũ˙˙ũ˙˙ AÉÉ  Iū˙˙äü˙˙äü˙˙ū @M`J@M`O ũ˙˙ũ˙˙ ACĘGĘ  Eū˙˙āü˙˙āü˙˙ū @S`6@S`: ũ˙˙ũ˙˙ A8Ë<Ë  Aū˙˙Üü˙˙Üü˙˙ū @W`6@W`:  ũ˙˙ ũ˙˙ AĖĖ  =ū˙˙Øü˙˙Øü˙˙ū @[`.@[`3 úü˙˙ûü˙˙ AÍÍ  9ū˙˙Ôü˙˙Ôü˙˙ū @``6@``: öü˙˙÷ü˙˙ A™ÎÎ  5ū˙˙Đü˙˙Đü˙˙ū @g`6@g`: ōü˙˙ķü˙˙ A^ĐbĐ  1ū˙˙Ėü˙˙Ėü˙˙ū @n`[@n`_ îü˙˙īü˙˙ AĖŌĐŌ  -ū˙˙Čü˙˙Čü˙˙ū @w`.@w`2 ęü˙˙ëü˙˙ AVĶZĶ  )ū˙˙Äü˙˙Äü˙˙ū @y`<@y`@ æü˙˙įü˙˙ A!Õ%Õ  %ū˙˙Āü˙˙Āü˙˙ū @„`+@„`/ ×ü˙˙Öü˙˙ AlÖtÖ   Nü˙˙‹û˙˙‹û˙˙ũ @Ž` @Ž`( Ōü˙˙Ņü˙˙ A™ÖĄÖ  û‡û˙˙‡û˙˙ū @`@`$ Šũ˙˙Ēũ˙˙¨ũ˙˙ A€ÚˆÚ  A€ÚƒÚ  öˇü˙˙ˇü˙˙ũ @¯`@¯` Ôü˙˙Õü˙˙ AēÛžÛ  ōŽü˙˙Žü˙˙ū @¸`@¸` Ûü˙˙Üü˙˙ A&Ü+Ü  îĒü˙˙Ēü˙˙ū @ģ` @ģ`% Ėü˙˙Íü˙˙ AüÜŨ  ęĻü˙˙Ļü˙˙ū @Â`@Â`" Čü˙˙Éü˙˙ AjŨnŨ  æĸü˙˙ĸü˙˙ū @Å`@Å`" Äü˙˙Åü˙˙ AÍŨŅŨ  âžü˙˙žü˙˙ū @Į`,@Į`0 Āü˙˙Áü˙˙ A?ßCß  Ūšü˙˙šü˙˙ū @Đ`@Đ`" ŧü˙˙Ŋü˙˙ AŖß§ß  Ú–ü˙˙–ü˙˙ū @Ō`,@Ō`0 ¸ü˙˙šü˙˙ AZā^ā  Ö’ü˙˙’ü˙˙ū @×`@×`" ´ü˙˙ĩü˙˙ AÂāÆā  ŌŽü˙˙Žü˙˙ū @Ų`,@Ų`0 °ü˙˙ąü˙˙ A|â€â  Ίü˙˙Šü˙˙ū @ä`@ä`" Ŧü˙˙­ü˙˙ Aßâãâ  Ę†ü˙˙†ü˙˙ū @æ`,@æ`0 ŗü˙˙´ü˙˙ AĪãÔã  Æ‚ü˙˙‚ü˙˙ū @ė`@ė`# ¤ü˙˙Ĩü˙˙ AØäÜä  Â~ü˙˙~ü˙˙ū @ķ`&@ķ`*  ü˙˙Ąü˙˙ AOåSå  žzü˙˙zü˙˙ū @õ`4@õ`8 œü˙˙ü˙˙ AĿȿ  ēvü˙˙vü˙˙ū @ũ`&@ũ`* ˜ü˙˙™ü˙˙ A@įDį  ļrü˙˙rü˙˙ū @˙`4@˙`8 ”ü˙˙•ü˙˙ Aāčäč  ˛nü˙˙nü˙˙ū @ `@ `" ü˙˙‘ü˙˙ AEéIé  Žjü˙˙jü˙˙ū @ `,@ `0 Œü˙˙ü˙˙ A&ę*ę  Ēfü˙˙fü˙˙ū @`@`" ˆü˙˙‰ü˙˙ AˆęŒę  Ļbü˙˙bü˙˙ū @`,@`0 ü˙˙ü˙˙ AUëZë  ĸ^ü˙˙^ü˙˙ū @`@`# €ü˙˙ü˙˙ AÚëŪë  žZü˙˙Zü˙˙ū @`&@`* |ü˙˙}ü˙˙ AËėĪė  šVü˙˙Vü˙˙ū @ `&@ `* mü˙˙lü˙˙ AŽî–î   äû˙˙!û˙˙!û˙˙ũ @-` @-`( hü˙˙gü˙˙ AžîÆî  ûû˙˙û˙˙ū @.`"@.`* dü˙˙cü˙˙ Aũîī  ÷û˙˙û˙˙ū @/`"@/`* `ü˙˙_ü˙˙ A6ī>ī  ķû˙˙û˙˙ū @0`(@0`0 \ü˙˙[ü˙˙ Aī‡ī  īû˙˙û˙˙ū @1`8@1`@ Xü˙˙Wü˙˙ Aąīšī  ë û˙˙ û˙˙ū @2`"@2`* Tü˙˙Sü˙˙ Aæīîī  į û˙˙ û˙˙ū @3`$@3`, Pü˙˙Oü˙˙ Ađ đ  ãû˙˙û˙˙ū @4`$@4`, Lü˙˙Kü˙˙ AVđ^đ  ßû˙˙û˙˙ū @5`.@5`6 Hü˙˙Gü˙˙ AŠđ’đ  Ûũú˙˙ũú˙˙ū @6`$@6`, Ļü˙˙Ĩü˙˙ Aŗđēđ  ×ųú˙˙ųú˙˙ū @7`@7` ĸü˙˙Ąü˙˙ AŠņ‘ņ  Ķõú˙˙õú˙˙ū @?`@?` žü˙˙ü˙˙ A ō'ō  Īņú˙˙ņú˙˙ū @E`@E` ũ˙˙ˇũ˙˙ũ˙˙ A1ø:ø  A1ø4ø  Ę!ü˙˙!ü˙˙ũ @p`@p` ũ˙˙Ŋũ˙˙ ũ˙˙ AØųßų  AØųÛų  Åü˙˙ü˙˙ũ @}`@}` 9ü˙˙:ü˙˙ A`ûdû  Áü˙˙ü˙˙ū @ˆ`)@ˆ`- 5ü˙˙6ü˙˙ A°û´û  Ŋü˙˙ü˙˙ū @Š` @Š`$ <ü˙˙=ü˙˙ A üü  š ü˙˙ ü˙˙ū @Ž`@Ž`—ü˙˙˜ü˙˙ Aüü 4ļü˙˙ü˙˙ū @Ž`@Ž`( 5ü˙˙6ü˙˙ ALüQü  ˛ü˙˙ü˙˙ū @`@` &ü˙˙'ü˙˙ A+ũ/ũ  Žü˙˙ü˙˙ū @—`"@—`& "ü˙˙#ü˙˙ A ūū  Ēüû˙˙üû˙˙ū @œ`"@œ`& ü˙˙ü˙˙ A˙˙  Ļøû˙˙øû˙˙ū @Ŗ`@Ŗ` %ü˙˙&ü˙˙ Ao˙t˙  ĸôû˙˙ôû˙˙ū @Ĩ`(@Ĩ`- ü˙˙ü˙˙ Aî˙ō˙  žđû˙˙đû˙˙ū @¨`&@¨`* ü˙˙ü˙˙ A26  šėû˙˙ėû˙˙ū @Š`4@Š`8 ü˙˙ü˙˙ A5:  –čû˙˙čû˙˙ū @Ã`;@Ã`@  ü˙˙ ü˙˙ A‰  ’äû˙˙äû˙˙ū @Î`&@Î`* ü˙˙ü˙˙ Aėņ  Žāû˙˙āû˙˙ū @Ī`S@Ī`X ü˙˙ü˙˙ A. 2   ŠÜû˙˙Üû˙˙ū @Õ`6@Õ`: ūû˙˙˙û˙˙ A ƒ   †Øû˙˙Øû˙˙ū @Ö`D@Ö`H úû˙˙ûû˙˙ Ac g   ‚Ôû˙˙Ôû˙˙ū @Ú`6@Ú`: öû˙˙÷û˙˙ A´ ¸   ~˙˙˙Đû˙˙Đû˙˙ū @Û`D@Û`H ōû˙˙ķû˙˙ AŪ â   z˙˙˙Ėû˙˙Ėû˙˙ū @ā`6@ā`: îû˙˙īû˙˙ A/ 3   v˙˙˙Čû˙˙Čû˙˙ū @á`D@á`H ęû˙˙ëû˙˙ Az ~   r˙˙˙Äû˙˙Äû˙˙ū @æ`6@æ`: ņû˙˙ōû˙˙ AË Đ   n˙˙˙Āû˙˙Āû˙˙ū @į`D@į`I âû˙˙ãû˙˙ AŽ’  j˙˙˙ŧû˙˙ŧû˙˙ū @î`B@î`F Ūû˙˙ßû˙˙ AEI  f˙˙˙¸û˙˙¸û˙˙ū @ô`P@ô`T åû˙˙æû˙˙ A   b˙˙˙´û˙˙´û˙˙ū @`6@`; Öû˙˙×û˙˙ A_c  ^˙˙˙°û˙˙°û˙˙ū @`6@`: Ōû˙˙Ķû˙˙ A°´  Z˙˙˙Ŧû˙˙Ŧû˙˙ū @`D@`H Îû˙˙Īû˙˙ Aƒ‡  V˙˙˙¨û˙˙¨û˙˙ū @`.@`2 Ęû˙˙Ëû˙˙ Aãį  R˙˙˙¤û˙˙¤û˙˙ū @`(@`, Æû˙˙Įû˙˙ Aos  N˙˙˙ û˙˙ û˙˙ū @`(@`, Âû˙˙Ãû˙˙ Aęî  J˙˙˙œû˙˙œû˙˙ū @#`B@#`F Éû˙˙Ęû˙˙ A†‹  F˙˙˙˜û˙˙˜û˙˙ū @&`(@&`- ēû˙˙ģû˙˙ A”˜  B˙˙˙”û˙˙”û˙˙ū @-`&@-`* Áû˙˙Âû˙˙ AŽŗ  >˙˙˙û˙˙û˙˙ū @3`&@3`+ ˛û˙˙ŗû˙˙ A…‰  :˙˙˙Œû˙˙Œû˙˙ū @8`.@8`2 Žû˙˙¯û˙˙ A    6˙˙˙ˆû˙˙ˆû˙˙ū @:`<@:`@ Ēû˙˙Ģû˙˙ AË Ī   2˙˙˙„û˙˙„û˙˙ū @B`.@B`2 Ļû˙˙§û˙˙ AS!W!  .˙˙˙€û˙˙€û˙˙ū @D`<@D`@ ĸû˙˙Ŗû˙˙ Ap$t$  *˙˙˙|û˙˙|û˙˙ū @R`.@R`2 žû˙˙Ÿû˙˙ Aķ$÷$  &˙˙˙xû˙˙xû˙˙ū @T`<@T`@ Ĩû˙˙Ļû˙˙ Aū&'  "˙˙˙tû˙˙tû˙˙ū @]`.@]`3 –û˙˙—û˙˙ Aw({(  ˙˙˙pû˙˙pû˙˙ū @d`6@d`: ’û˙˙“û˙˙ A))  ˙˙˙lû˙˙lû˙˙ū @f`D@f`H Žû˙˙û˙˙ AŪ+â+  ˙˙˙hû˙˙hû˙˙ū @q`6@q`: Šû˙˙‹û˙˙ Az,~,  ˙˙˙dû˙˙dû˙˙ū @s`D@s`H †û˙˙‡û˙˙ A•/™/  ˙˙˙`û˙˙`û˙˙ū @€`.@€`2 ‚û˙˙ƒû˙˙ A00   ˙˙˙\û˙˙\û˙˙ū @‚`<@‚`@ ~û˙˙û˙˙ A22  ˙˙˙Xû˙˙Xû˙˙ū @‹`.@‹`2 zû˙˙{û˙˙ A˜2œ2  ˙˙˙Tû˙˙Tû˙˙ū @`<@`@ û˙˙‚û˙˙ AĄ4Ļ4  ūū˙˙Pû˙˙Pû˙˙ū @—`&@—`+ rû˙˙sû˙˙ A>5B5  úū˙˙Lû˙˙Lû˙˙ū @š`.@š`2 nû˙˙oû˙˙ Ao6s6  öū˙˙Hû˙˙Hû˙˙ū @Ÿ`.@Ÿ`2 jû˙˙kû˙˙ Aė7đ7  ōū˙˙Dû˙˙Dû˙˙ū @Ĩ`.@Ĩ`2 fû˙˙gû˙˙ A•:™:  îū˙˙@û˙˙@û˙˙ū @´`+@´`/ Wû˙˙Vû˙˙ Aß;į;   Îú˙˙ ú˙˙ ú˙˙ũ @ž`(@ž`0 Rû˙˙Qû˙˙ A<$<  ûú˙˙ú˙˙ū @ŋ`,@ŋ`4 Nû˙˙Mû˙˙ AY<a<  ÷ú˙˙ú˙˙ū @Ā`,@Ā`4 Jû˙˙Iû˙˙ Aį<ī<  ķ˙ų˙˙˙ų˙˙ū @Å`0@Å`8 !ü˙˙"ü˙˙ ü˙˙ A_>g>  A_>b>  î/û˙˙/û˙˙ũ @Í`@Í` ü˙˙ü˙˙ü˙˙ An@v@  An@q@  é*û˙˙*û˙˙ũ @Ũ`@Ũ` Gû˙˙Hû˙˙ AåAéA  å!û˙˙!û˙˙ū @į`)@į`- Cû˙˙Dû˙˙ A5B9B  áû˙˙û˙˙ū @é` @é`$ Jû˙˙Kû˙˙ AB•B  Ũû˙˙û˙˙ū @í`@í`Ĩû˙˙Ļû˙˙ A–BŸB 4Úû˙˙û˙˙ū @í`@í`( Cû˙˙Dû˙˙ AŅBÖB  Öû˙˙û˙˙ū @ī`@ī` ?û˙˙@û˙˙ AHCMC  Ōû˙˙û˙˙ū @ō`"@ō`' 0û˙˙1û˙˙ AĨCŠC  Î û˙˙ û˙˙ū @ô`*@ô`. ,û˙˙-û˙˙ A8D˙˙˙zú˙˙zú˙˙ū @•`.@•`2 œú˙˙ú˙˙ AĻbĒb  :˙˙˙vú˙˙vú˙˙ū @š`.@š`2 ú˙˙Œú˙˙ Aédņd   ú˙˙Aų˙˙Aų˙˙ũ @Š` @Š`( ˆú˙˙‡ú˙˙ Aee  û=ų˙˙=ų˙˙ū @Ē`@Ē`$ _û˙˙`û˙˙^û˙˙ A:gBg  A:g=g  ömú˙˙mú˙˙ũ @ŧ`@ŧ` Šú˙˙‹ú˙˙ Auhyh  ōdú˙˙dú˙˙ū @Å`@Å` ‘ú˙˙’ú˙˙ Aáhæh  î`ú˙˙`ú˙˙ū @Č` @Č`% ‚ú˙˙ƒú˙˙ Aˇiģi  ę\ú˙˙\ú˙˙ū @Ī`@Ī`" ~ú˙˙ú˙˙ A&j*j  æXú˙˙Xú˙˙ū @Ō`@Ō`" zú˙˙{ú˙˙ A‹jj  âTú˙˙Tú˙˙ū @Ô`,@Ô`0 vú˙˙wú˙˙ A&l*l  ŪPú˙˙Pú˙˙ū @ß`@ß`" rú˙˙sú˙˙ A“l—l  ÚLú˙˙Lú˙˙ū @á`,@á`0 nú˙˙oú˙˙ AZm^m  ÖHú˙˙Hú˙˙ū @æ`@æ`" jú˙˙kú˙˙ AŋmÃm  ŌDú˙˙Dú˙˙ū @č`,@č`0 fú˙˙gú˙˙ Azn~n  Î@ú˙˙@ú˙˙ū @í`@í`" bú˙˙cú˙˙ Aānän  Ę<ú˙˙<ú˙˙ū @ī`,@ī`0 iú˙˙jú˙˙ ALpQp  Æ8ú˙˙8ú˙˙ū @ų`@ų`# Zú˙˙[ú˙˙ AŅpÕp  Â4ú˙˙4ú˙˙ū @ü`&@ü`* Vú˙˙Wú˙˙ AÂqÆq  ž0ú˙˙0ú˙˙ū @`&@`* Gú˙˙Fú˙˙ As—s   žų˙˙ûø˙˙ûø˙˙ũ @`(@`0 Xú˙˙Yú˙˙ Aņsös  û'ú˙˙'ú˙˙ū @`@`ŗú˙˙´ú˙˙ A÷st 4ø$ú˙˙$ú˙˙ū @`@`( Qú˙˙Rú˙˙ A2t7t  ô ú˙˙ ú˙˙ū @`@` Mú˙˙Nú˙˙ AŠtŽt  đú˙˙ú˙˙ū @`"@`' >ú˙˙?ú˙˙ Au u  ėú˙˙ú˙˙ū @`*@`. :ú˙˙;ú˙˙ A–ušu  čú˙˙ú˙˙ū @`*@`. 6ú˙˙7ú˙˙ A§vĢv  äú˙˙ú˙˙ū @ `"@ `& 2ú˙˙3ú˙˙ Aww  ā ú˙˙ ú˙˙ū @"`0@"`4 .ú˙˙/ú˙˙ AFxJx  Üú˙˙ú˙˙ū @*`@*` 5ú˙˙6ú˙˙ A1z6z  Øú˙˙ú˙˙ū @6`)@6`. &ú˙˙'ú˙˙ A&{*{  Ôú˙˙ú˙˙ū @<`*@<`. "ú˙˙#ú˙˙ Aĩ|š|  Đüų˙˙üų˙˙ū @C`*@C`. ú˙˙ú˙˙ AĶ}×}  Ėøų˙˙øų˙˙ū @I`*@I`. ú˙˙ú˙˙ Aqu  Čôų˙˙ôų˙˙ū @Q`*@Q`. ú˙˙ú˙˙ AŦ€°€  Äđų˙˙đų˙˙ū @W`C@W`G ú˙˙ú˙˙ Aīķ  Āėų˙˙ėų˙˙ū @\`3@\`7 ú˙˙ú˙˙ A’ƒ–ƒ  ŧčų˙˙čų˙˙ū @f`(@f`,  ú˙˙ ú˙˙ A… …  ¸äų˙˙äų˙˙ū @p`2@p`6 ú˙˙ú˙˙ AŠ…Ž…  ´āų˙˙āų˙˙ū @t`(@t`, ÷ų˙˙öų˙˙ Aį†ī†   nų˙˙Ģø˙˙Ģø˙˙ũ @` @`( ōų˙˙ņų˙˙ A‡‡  û§ø˙˙§ø˙˙ū @€`"@€`* îų˙˙íų˙˙ AE‡M‡  ÷Ŗø˙˙Ŗø˙˙ū @`@`& đų˙˙īų˙˙ Af‡q‡  ķŸø˙˙Ÿø˙˙ū @‚`@‚` Áú˙˙ƒgetŋú˙˙ Aû‡ˆ  Aû‡ū‡  íÎų˙˙Îų˙˙ũ @‡`@‡`& ‰useEffectū AA‰J‰  蔸˙˙”ø˙˙ū @‘`7@‘`@ æų˙˙įų˙˙ AĨ‰Љ  äĀų˙˙Āų˙˙ū @–`&@–`* âų˙˙ãų˙˙ Aõ‰ų‰  āŧų˙˙ŧų˙˙ū @˜` @˜`$ Ūų˙˙ßų˙˙ AeŠiŠ  ܸų˙˙¸ų˙˙ū @œ`$@œ`( Úų˙˙Ûų˙˙ AĩŠšŠ  Ø´ų˙˙´ų˙˙ū @ž` @ž`$ Öų˙˙×ų˙˙ A‹!‹  Ô°ų˙˙°ų˙˙ū @ĸ`-@ĸ`1 Ōų˙˙Ķų˙˙ Am‹q‹  ĐŦų˙˙Ŧų˙˙ū @¤` @¤`$ Ųų˙˙Úų˙˙ Aڋߋ  ˍų˙˙¨ų˙˙ū @¨`@¨`4ú˙˙5ú˙˙ Aā‹é‹ 4ÉĨų˙˙Ĩų˙˙ū @¨`@¨`( Ōų˙˙Ķų˙˙ AŒ Œ  ÅĄų˙˙Ąų˙˙ū @Ē`@Ē` Îų˙˙Īų˙˙ A’Œ—Œ  Áų˙˙ų˙˙ū @­`"@­`' ŋų˙˙Āų˙˙ AīŒķŒ  Ŋ™ų˙˙™ų˙˙ū @¯`*@¯`. ģų˙˙ŧų˙˙ A|€  š•ų˙˙•ų˙˙ū @˛`*@˛`. ˇų˙˙¸ų˙˙ AtŽxŽ  ĩ‘ų˙˙‘ų˙˙ū @¸`"@¸`& ŗų˙˙´ų˙˙ AåŽéŽ  ąų˙˙ų˙˙ū @ē`0@ē`4 ¯ų˙˙°ų˙˙ A  ­‰ų˙˙‰ų˙˙ū @Â`@Â` ļų˙˙ˇų˙˙ A_d  Š…ų˙˙…ų˙˙ū @Ä`(@Ä`- §ų˙˙¨ų˙˙ Aې␠ Ĩų˙˙ų˙˙ū @Į`&@Į`* Žų˙˙¯ų˙˙ A"‘'‘  Ą}ų˙˙}ų˙˙ū @Č`4@Č`9 Ÿų˙˙ ų˙˙ AŽ‘’‘  yų˙˙yų˙˙ū @Ę`2@Ę`6 ›ų˙˙œų˙˙ A.’2’  ™uų˙˙uų˙˙ū @Í`2@Í`6 —ų˙˙˜ų˙˙ AВԒ  •qų˙˙qų˙˙ū @Đ`2@Đ`6 “ų˙˙”ų˙˙ Ar“v“  ‘mų˙˙mų˙˙ū @Ķ`2@Ķ`6 ų˙˙ų˙˙ A””  ių˙˙ių˙˙ū @Ö`2@Ö`6 ‹ų˙˙Œų˙˙ A• •  ‰eų˙˙eų˙˙ū @Ü`&@Ü`* ’ų˙˙“ų˙˙ AZ•_•  …aų˙˙aų˙˙ū @Ũ`D@Ũ`I ƒų˙˙„ų˙˙ AΕŌ•  ]ų˙˙]ų˙˙ū @ß`6@ß`: ų˙˙€ų˙˙ A—…—  }˙˙˙Yų˙˙Yų˙˙ū @æ`6@æ`: {ų˙˙|ų˙˙ AŌ—֗  y˙˙˙Uų˙˙Uų˙˙ū @į`D@į`H ‚ų˙˙ƒų˙˙ A™"™  u˙˙˙Qų˙˙Qų˙˙ū @ė`6@ė`; ~ų˙˙ų˙˙ Aĩšēš  q˙˙˙Mų˙˙Mų˙˙ū @ķ`>@ķ`C oų˙˙pų˙˙ A  m˙˙˙Ių˙˙Ių˙˙ū @ũ`6@ũ`: kų˙˙lų˙˙ Apžtž  i˙˙˙Eų˙˙Eų˙˙ū @ `6@ `: \ų˙˙[ų˙˙ AÄĄĖĄ   Ķø˙˙ø˙˙ø˙˙ũ @ `$@ `, Wų˙˙Vų˙˙ Aĸ ĸ  û ø˙˙ ø˙˙ū @ `.@ `6 Sų˙˙Rų˙˙ A4ĸ<ĸ  ÷ø˙˙ø˙˙ū @ `"@ `* *ú˙˙Ųú˙˙)ú˙˙ AĨĸŦĸ  AĨĸ¨ĸ  ō8ų˙˙8ų˙˙ũ @ `@ ` `ų˙˙aų˙˙ A¤¤  î/ų˙˙/ų˙˙ū @& `@& `ģų˙˙ŧų˙˙ A¤¤ 4ë,ų˙˙,ų˙˙ū @& `@& `( Yų˙˙Zų˙˙ AO¤T¤  į(ų˙˙(ų˙˙ū @( `@( ` Uų˙˙Vų˙˙ AƤˤ  ã$ų˙˙$ų˙˙ū @+ `"@+ `' Fų˙˙Gų˙˙ A#Ĩ'Ĩ  ß ų˙˙ ų˙˙ū @- `*@- `. Mų˙˙Nų˙˙ AŗĨ¸Ĩ  Ûų˙˙ų˙˙ū @0 `*@0 `/ >ų˙˙?ų˙˙ A)§-§  ×ų˙˙ų˙˙ū @9 `"@9 `& :ų˙˙;ų˙˙ Aš§ž§  Ķų˙˙ų˙˙ū @; `0@; `4 6ų˙˙7ų˙˙ AÁ¨Ũ  Īų˙˙ų˙˙ū @C `@C ` =ų˙˙>ų˙˙ A Š%Š  Ë ų˙˙ ų˙˙ū @E `(@E `- .ų˙˙/ų˙˙ AŸŠŖŠ  Įų˙˙ų˙˙ū @H `&@H `* 5ų˙˙6ų˙˙ AãŠčŠ  Ãų˙˙ų˙˙ū @I `4@I `9 &ų˙˙'ų˙˙ AOĒSĒ  ŋų˙˙ų˙˙ū @K `2@K `6 "ų˙˙#ų˙˙ AīĒķĒ  ģüø˙˙üø˙˙ū @N `2@N `6 ų˙˙ų˙˙ A‘Ģ•Ģ  ˇøø˙˙øø˙˙ū @Q `2@Q `6 ų˙˙ų˙˙ A1Ŧ5Ŧ  ŗôø˙˙ôø˙˙ū @T `2@T `6 ų˙˙ų˙˙ AÔŦØŦ  ¯đø˙˙đø˙˙ū @W `2@W `6 ų˙˙ų˙˙ AĮ­Ë­  Ģėø˙˙ėø˙˙ū @] `&@] `* ų˙˙ų˙˙ AœŽĄŽ  §čø˙˙čø˙˙ū @` `q@` `v ų˙˙ų˙˙ Aί͝  Ŗäø˙˙äø˙˙ū @e `6@e `; ų˙˙ų˙˙ AR°V°  Ÿāø˙˙āø˙˙ū @g `>@g `B ų˙˙ų˙˙ A6ą:ą  ›Üø˙˙Üø˙˙ū @j `Z@j `^ ūø˙˙˙ø˙˙ A^ŗbŗ  —Øø˙˙Øø˙˙ū @r `N@r `R úø˙˙ûø˙˙ Aĩ…ĩ  “Ôø˙˙Ôø˙˙ū @{ `6@{ `: öø˙˙÷ø˙˙ AŌĩÖĩ  Đø˙˙Đø˙˙ū @| `D@| `H ōø˙˙ķø˙˙ Aˇ ˇ  ‹Ėø˙˙Ėø˙˙ū @ `6@ `: îø˙˙īø˙˙ A\¸`¸  ‡Čø˙˙Čø˙˙ū @‡ `6@‡ `: õø˙˙öø˙˙ AÍšŌš  ƒÄø˙˙Äø˙˙ū @ `6@ `; æø˙˙įø˙˙ A[ģ_ģ  ˙˙˙Āø˙˙Āø˙˙ū @“ `[@“ `_ âø˙˙ãø˙˙ AˆŊŒŊ  {˙˙˙ŧø˙˙ŧø˙˙ū @› `>@› `B Ūø˙˙ßø˙˙ ACÁGÁ  w˙˙˙¸ø˙˙¸ø˙˙ū @­ `.@­ `2 Úø˙˙Ûø˙˙ AŖÁ§Á  s˙˙˙´ø˙˙´ø˙˙ū @¯ `(@¯ `, Öø˙˙×ø˙˙ ACÂG  o˙˙˙°ø˙˙°ø˙˙ū @ŗ `%@ŗ `) Ōø˙˙Ķø˙˙ A‡Ã‹Ã  k˙˙˙Ŧø˙˙Ŧø˙˙ū @ŧ `+@ŧ `/ Ųø˙˙Úø˙˙ AÄ#Ä  g˙˙˙¨ø˙˙¨ø˙˙ū @ŋ `(@ŋ `- Õø˙˙Öø˙˙ A,Å1Å  c˙˙˙¤ø˙˙¤ø˙˙ū @Æ `&@Æ `+ Æø˙˙Įø˙˙ AGÆKÆ  _˙˙˙ ø˙˙ ø˙˙ū @Í `&@Í `* Íø˙˙Îø˙˙ A´ĮšĮ  [˙˙˙œø˙˙œø˙˙ū @Ô `&@Ô `+ žø˙˙ŋø˙˙ AQČUČ  W˙˙˙˜ø˙˙˜ø˙˙ū @× `.@× `2 ēø˙˙ģø˙˙ A}ÉÉ  S˙˙˙”ø˙˙”ø˙˙ū @Ü `.@Ü `2 Ģø˙˙Ēø˙˙ AwĖĖ   "ø˙˙_÷˙˙_÷˙˙ũ @ī ` @ī `( Ļø˙˙Ĩø˙˙ A¤ĖŦĖ  û[÷˙˙[÷˙˙ū @đ `@đ `$ }ų˙˙!ú˙˙|ų˙˙ A9ÎBÎ  A9Î<Î  ö‹ø˙˙‹ø˙˙ũ @ũ `@ũ ` ¨ø˙˙Šø˙˙ AdĪhĪ  ō‚ø˙˙‚ø˙˙ū @ `@ ` ¯ø˙˙°ø˙˙ AĐĪÕĪ  î~ø˙˙~ø˙˙ū @ ` @ `%  ø˙˙Ąø˙˙ AĻĐĒĐ  ęzø˙˙zø˙˙ū @ `@ `" œø˙˙ø˙˙ AŅŅ  ævø˙˙vø˙˙ū @ `@ `" ˜ø˙˙™ø˙˙ AyŅ}Ņ  ârø˙˙rø˙˙ū @ `,@ `0 ”ø˙˙•ø˙˙ AąŌĩŌ  Ūnø˙˙nø˙˙ū @ `@ `" ø˙˙‘ø˙˙ AĶĶ  Újø˙˙jø˙˙ū @ `,@ `0 Œø˙˙ø˙˙ AVÔZÔ  Öfø˙˙fø˙˙ū @' `@' `" ˆø˙˙‰ø˙˙ AžÔÂÔ  Ōbø˙˙bø˙˙ū @) `,@) `0 „ø˙˙…ø˙˙ AķÖ÷Ö  Î^ø˙˙^ø˙˙ū @7 `@7 `" €ø˙˙ø˙˙ AV×Z×  ĘZø˙˙Zø˙˙ū @9 `,@9 `0 ‡ø˙˙ˆø˙˙ AEŲJŲ  ÆVø˙˙Vø˙˙ū @F `@F `# xø˙˙yø˙˙ AĘŲÎŲ  ÂRø˙˙Rø˙˙ū @I `&@I `* tø˙˙uø˙˙ AģÚŋÚ  žNø˙˙Nø˙˙ū @N `&@N `* eø˙˙dø˙˙ AzÜ‚Ü   Ü÷˙˙÷˙˙÷˙˙ũ @[ ` @[ `( `ø˙˙_ø˙˙ A§Ü¯Ü  û÷˙˙÷˙˙ū @\ `@\ `$ 7ų˙˙8ų˙˙6ų˙˙ AŪŨæŨ  AŪŨáŨ  öEø˙˙Eø˙˙ũ @h `@h ` bø˙˙cø˙˙ Aßß  ō<ø˙˙<ø˙˙ū @q `@q ` iø˙˙jø˙˙ A€ß…ß  î8ø˙˙8ø˙˙ū @t ` @t `% Zø˙˙[ø˙˙ AVāZā  ę4ø˙˙4ø˙˙ū @{ `@{ `" Vø˙˙Wø˙˙ AÁāÅā  æ0ø˙˙0ø˙˙ū @~ `@~ `" Rø˙˙Sø˙˙ A$á(á  â,ø˙˙,ø˙˙ū @€ `,@€ `0 Nø˙˙Oø˙˙ A\â`â  Ū(ø˙˙(ø˙˙ū @ˆ `@ˆ `" Jø˙˙Kø˙˙ AÄâČâ  Ú$ø˙˙$ø˙˙ū @Š `,@Š `0 Fø˙˙Gø˙˙ Aųäũä  Ö ø˙˙ ø˙˙ū @˜ `@˜ `" Bø˙˙Cø˙˙ Abåfå  Ōø˙˙ø˙˙ū @š `,@š `0 Iø˙˙Jø˙˙ A’į—į  Îø˙˙ø˙˙ū @¨ `@¨ `# :ø˙˙;ø˙˙ Ačč  Ęø˙˙ø˙˙ū @Ģ `&@Ģ `* 6ø˙˙7ø˙˙ Aé é  Æø˙˙ø˙˙ū @° `&@° `* 'ø˙˙&ø˙˙ A÷ę˙ę   ž÷˙˙Ûö˙˙Ûö˙˙ũ @Ŋ `$@Ŋ `, "ø˙˙!ø˙˙ A5ë=ë  û×ö˙˙×ö˙˙ū @ž `.@ž `6 ø˙˙ø˙˙ Agëoë  ÷Ķö˙˙Ķö˙˙ū @ŋ `"@ŋ `* õø˙˙¤ų˙˙ôø˙˙ AØëßë  AØëÛë  ōø˙˙ø˙˙ũ @à `@à ` +ø˙˙,ø˙˙ A?íDí  îú÷˙˙ú÷˙˙ū @Í `@Í ` 'ø˙˙(ø˙˙ Aēíŋí  ęö÷˙˙ö÷˙˙ū @Ņ `@Ņ ` #ø˙˙$ø˙˙ Aųîūî  æō÷˙˙ō÷˙˙ū @Ú `"@Ú `' ø˙˙ø˙˙ A-đ1đ  âî÷˙˙î÷˙˙ū @á `*@á `. ø˙˙ø˙˙ A7ņ;ņ  Ūę÷˙˙ę÷˙˙ū @į `*@į `. ø˙˙ø˙˙ Aoōtō  Úæ÷˙˙æ÷˙˙ū @î `"@î `' ø˙˙ ø˙˙ Aôô  Öâ÷˙˙â÷˙˙ū @ų `"@ų `& ø˙˙ø˙˙ Ačôíô  ŌŪ÷˙˙Ū÷˙˙ū @ū `0@ū `5 ø˙˙ø˙˙ Aõƒõ  ÎÚ÷˙˙Ú÷˙˙ū @ `.@ `2 ø˙˙ø˙˙ AËõĐõ  ĘÖ÷˙˙Ö÷˙˙ū @ `<@ `A ø÷˙˙ų÷˙˙ AGöKö  ÆŌ÷˙˙Ō÷˙˙ū @ `:@ `> ô÷˙˙õ÷˙˙ A˙ö÷  ÂÎ÷˙˙Î÷˙˙ū @ `:@ `> đ÷˙˙ņ÷˙˙ Aš÷Ŋ÷  žĘ÷˙˙Ę÷˙˙ū @ `:@ `> ė÷˙˙í÷˙˙ Aqøuø  ēÆ÷˙˙Æ÷˙˙ū @ `:@ `> č÷˙˙é÷˙˙ A,ų0ų  ļÂ÷˙˙Â÷˙˙ū @ `:@ `> ä÷˙˙å÷˙˙ AŪųâų  ˛ž÷˙˙ž÷˙˙ū @ `.@ `2 ë÷˙˙ė÷˙˙ AËúĐú  Žē÷˙˙ē÷˙˙ū @ `y@ `~ į÷˙˙č÷˙˙ A%ü*ü  Ēļ÷˙˙ļ÷˙˙ū @ `>@ `C Ø÷˙˙Ų÷˙˙ AšüŊü  Ϟ÷˙˙˛÷˙˙ū @ `F@ `J Ô÷˙˙Õ÷˙˙ Aĩũšũ  ĸŽ÷˙˙Ž÷˙˙ū @! `b@! `f Đ÷˙˙Ņ÷˙˙ Anr  žĒ÷˙˙Ē÷˙˙ū @+ `>@+ `B Ė÷˙˙Í÷˙˙ AĮË  šĻ÷˙˙Ļ÷˙˙ū @, `L@, `P Č÷˙˙É÷˙˙ A%)  –ĸ÷˙˙ĸ÷˙˙ū @1 `>@1 `B Ä÷˙˙Å÷˙˙ AŠ­  ’ž÷˙˙ž÷˙˙ū @7 `>@7 `B Ë÷˙˙Ė÷˙˙ AJO  Žš÷˙˙š÷˙˙ū @= `>@= `C ŧ÷˙˙Ŋ÷˙˙ A   Š–÷˙˙–÷˙˙ū @C `c@C `g ¸÷˙˙š÷˙˙ AA E   †’÷˙˙’÷˙˙ū @N `F@N `J ´÷˙˙ĩ÷˙˙ A‡‹  ‚Ž÷˙˙Ž÷˙˙ū @` `6@` `: °÷˙˙ą÷˙˙ A÷û  ~˙˙˙Š÷˙˙Š÷˙˙ū @b `0@b `4 Ŧ÷˙˙­÷˙˙ A”  z˙˙˙†÷˙˙†÷˙˙ū @f `"@f `& ¨÷˙˙Š÷˙˙ A  v˙˙˙‚÷˙˙‚÷˙˙ū @h `0@h `4 ¤÷˙˙Ĩ÷˙˙ A/3  r˙˙˙~÷˙˙~÷˙˙ū @p `+@p `/ Ģ÷˙˙Ŧ÷˙˙ AÆË  n˙˙˙z÷˙˙z÷˙˙ū @s `(@s `- §÷˙˙¨÷˙˙ AÔŲ  j˙˙˙v÷˙˙v÷˙˙ū @z `&@z `+ ˜÷˙˙™÷˙˙ Aīķ  f˙˙˙r÷˙˙r÷˙˙ū @ `&@ `* Ÿ÷˙˙ ÷˙˙ A\a  b˙˙˙n÷˙˙n÷˙˙ū @ˆ `&@ˆ `+ ÷˙˙‘÷˙˙ Aųũ  ^˙˙˙j÷˙˙j÷˙˙ū @‹ `.@‹ `2 Œ÷˙˙÷˙˙ A%)  Z˙˙˙f÷˙˙f÷˙˙ū @ `.@ `2 ˆ÷˙˙‰÷˙˙ AËĪ  V˙˙˙b÷˙˙b÷˙˙ū @Ÿ `%@Ÿ `)šwebpack/lib/dependencies/HarmonyExportSpecifierDependency@M÷˙˙ķö˙˙ @Ģ @Ø ‰useRouterūA2;  îö˙˙^÷˙˙^÷˙˙ũ @Ŧ `@Ŧ `useSearchParamsūAXg úY÷˙˙Y÷˙˙ū @­ `@­ `(m÷˙˙l÷˙˙Aėô ö"ö˙˙"ö˙˙ū @¯ `"@¯ `*i÷˙˙h÷˙˙A ( ōö˙˙ö˙˙ū @° `$@° `,e÷˙˙d÷˙˙Adl îö˙˙ö˙˙ū @ą `6@ą `>a÷˙˙`÷˙˙Aģà ęö˙˙ö˙˙ū @˛ `&@˛ `.]÷˙˙\÷˙˙Aíõ æö˙˙ö˙˙ū @ŗ `"@ŗ `*Y÷˙˙X÷˙˙A# âö˙˙ö˙˙ū @´ `@´ `&U÷˙˙T÷˙˙AS[ Ū ö˙˙ ö˙˙ū @ĩ `(@ĩ `0Q÷˙˙P÷˙˙Ašĸ Úö˙˙ö˙˙ū @ļ `:@ļ `BM÷˙˙L÷˙˙Aãë Öö˙˙ö˙˙ū @ˇ `8@ˇ `@I÷˙˙H÷˙˙A& Ōūõ˙˙ūõ˙˙ū @¸ `*@¸ `2K÷˙˙J÷˙˙Alw Îúõ˙˙úõ˙˙ū @ē `@ē `!G÷˙˙F÷˙˙AļÁ Ęöõ˙˙öõ˙˙ū @ģ `@ģ `%ø˙˙Wũ˙˙ø˙˙A9@A9<  Å&÷˙˙&÷˙˙ũ @ŋ `"@ŋ `)ø˙˙Rũ˙˙ø˙˙A9!@!A9!@ũ `C$÷˙˙%÷˙˙AŦ)°) ĸūö˙˙ūö˙˙ū @ `@ ` ÷˙˙!÷˙˙A+*/* žúö˙˙úö˙˙ū @ `@ `÷˙˙÷˙˙A*…* šöö˙˙öö˙˙ū @ `@ `#÷˙˙$÷˙˙AŠ+Ž+ –ōö˙˙ōö˙˙ū @ `@ `~÷˙˙÷˙˙A¯+¸+4“īö˙˙īö˙˙ū @ `@ `(÷˙˙÷˙˙Aę+ī+ ëö˙˙ëö˙˙ū @ `@ ` ÷˙˙÷˙˙Aa,e, ‹įö˙˙įö˙˙ū @ `"@ `&÷˙˙÷˙˙A^-c- ‡ãö˙˙ãö˙˙ū @ `0@ `5÷˙˙÷˙˙AÃ-Č- ƒßö˙˙ßö˙˙ū @ `.@ `3÷˙˙÷˙˙A2/6/ ˙˙˙Ûö˙˙Ûö˙˙ū @% `6@% `:÷˙˙ ÷˙˙A§2Ŧ2 {˙˙˙×ö˙˙×ö˙˙ū @2 `V@2 `[ųö˙˙úö˙˙Aî4ō4 w˙˙˙Ķö˙˙Ķö˙˙ū @; `6@; `:õö˙˙öö˙˙Ao7s7 s˙˙˙Īö˙˙Īö˙˙ū @E `6@E `:ņö˙˙ōö˙˙A 99 o˙˙˙Ëö˙˙Ëö˙˙ū @L `.@L `2øö˙˙ųö˙˙AÉ:Î: k˙˙˙Įö˙˙Įö˙˙ū @V `"@V `'éö˙˙ęö˙˙AY;]; g˙˙˙Ãö˙˙Ãö˙˙ū @Y `*@Y `.åö˙˙æö˙˙Aļ<ē< c˙˙˙ŋö˙˙ŋö˙˙ū @_ `*@_ `.áö˙˙âö˙˙AU>Y> _˙˙˙ģö˙˙ģö˙˙ū @i `@i `Ũö˙˙Ūö˙˙Aŧ>Ā> [˙˙˙ˇö˙˙ˇö˙˙ū @k `6@k `:Ųö˙˙Úö˙˙A@ @ W˙˙˙ŗö˙˙ŗö˙˙ū @q `0@q `4Dö˙˙ErrorBoundaryA @@4R˙˙˙ĩö˙˙ĩö˙˙ū @q `5@q `BĐö˙˙Ņö˙˙Ah@l@ N˙˙˙Ēö˙˙Ēö˙˙ū @s `(@s `,Ėö˙˙Íö˙˙A*A.A J˙˙˙Ļö˙˙Ļö˙˙ū @x `0@x `4ķôA/A¤ö˙˙Ĩö˙˙AŧFĀF "˙˙˙~ö˙˙~ö˙˙ū @ `(@ `, ö˙˙Ąö˙˙AôGøG ˙˙˙zö˙˙zö˙˙ū @Ļ `4@Ļ `8ĮČAųGH4˙˙˙~ö˙˙~ö˙˙ū @Ļ `9@Ļ `F™ö˙˙šö˙˙AXH\H ˙˙˙sö˙˙sö˙˙ū @¨ `(@¨ `,•ö˙˙–ö˙˙A™II ˙˙˙oö˙˙oö˙˙ū @ą `-@ą `1ŧŊAžIĢI4˙˙˙sö˙˙sö˙˙ū @ą `2@ą `?Žö˙˙ö˙˙AöIúI  ˙˙˙hö˙˙hö˙˙ū @ŗ `(@ŗ `,Šö˙˙‹ö˙˙AŲJŨJ ˙˙˙dö˙˙dö˙˙ū @ē `1@ē `5†ö˙˙‡ö˙˙A]LaL ˙˙˙`ö˙˙`ö˙˙ū @Å `0@Å `4‚ö˙˙ƒö˙˙ALNPN ˙˙˙\ö˙˙\ö˙˙ū @Ķ `@Ķ `—webpack/lib/ModuleGraph“RestoreProvidedDataúô˙˙ˆprovidedcanMangleProvideterminalBinding‹exportsInfoåõ˙˙ ‡sources„data“runtimeRequirementsŠjavascriptĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource %ĐĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceĀ// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(1124); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(8301); // EXTERNAL MODULE: ./node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(2378); // EXTERNAL MODULE: ./src/lib/api-client.js var api_client = __webpack_require__(4194); ;// ./src/components/ErrorBoundary.jsx Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource  Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource5/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Component } from 'react'; export default class ErrorBoundary extends Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsxs("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } }  b={}Nž ŽË͌ĸĻžÁúũ€€€Ō__WEBPACK_MODULE_REFERENCE__1_5b22436f6d706f6e656e74225d_directImport_asiSafe1__._Í__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._Ë__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._ū˙˙€†buffer†source„size„maps„hashs /* __next_internal_client_entry_do_not_use__ default auto */ class ErrorBoundary extends __WEBPACK_MODULE_REFERENCE__1_5b22436f6d706f6e656e74225d_directImport_asiSafe1__._ { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } €•{"finalSource":false}ƒmap‹bufferedMap ReplaceSourceRawSource5/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Component } from 'react'; export default class ErrorBoundary extends Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsxs("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } W61123undefined125158undefined160174undefined203211__WEBPACK_MODULE_REFERENCE__1_5b22436f6d706f6e656e74225d_directImport_asiSafe1__._undefined652656__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined771774__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined930934__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined12141217__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined15301533__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined`[JŦeą$n Vn¸ņ;react.Componentš(0,react_jsx_runtime.jsxs)™(0,react_jsx_runtime.jsx)ū˙˙" ;// ./src/app/dashboard/page.jsx   mĢwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceÃN/* __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, useSearchParams } from 'next/navigation'; import { api } from '../../lib/api-client'; import ErrorBoundary from '../../components/ErrorBoundary'; const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; 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 FormField({ label, children }) { return /*#__PURE__*/ _jsxs("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ _jsx("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ _jsx("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ _jsxs("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ _jsx("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ _jsx("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } 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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Risk" }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { 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 [showCreate, setShowCreate] = useState(false); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); 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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__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: ()=>openDetail(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" }) }), showCreate && /*#__PURE__*/ _jsx(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, 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: RISK_STATUSES.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" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Mitigation" }), /*#__PURE__*/ _jsx(FormField, { label: "Risk *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('progressPercent'); const [sortDir, setSortDir] = useState('asc'); const [showCreate, setShowCreate] = useState(false); const [selectedMitigation, setSelectedMitigation] = useState(null); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); const mitigations = useMemo(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = useMemo(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); 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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__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", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, 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" }) }), showCreate && /*#__PURE__*/ _jsx(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = useState(false); const [showDecision, setShowDecision] = useState(false); const [decisionForm, setDecisionForm] = useState({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = useState(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); 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: "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, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Gate Decision" }), /*#__PURE__*/ _jsx(FormField, { label: "Decision", children: /*#__PURE__*/ _jsx(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reason", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Integration" }), /*#__PURE__*/ _jsx(FormField, { label: "Provider", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Base URL", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Auth Mode", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = useState(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("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: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__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: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ _jsx("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ _jsx("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ _jsx(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ _jsx("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ _jsx("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const load = useCallback(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Audit Log" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__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: "Date" }), /*#__PURE__*/ _jsx("th", { children: "Action" }), /*#__PURE__*/ _jsx("th", { children: "Entity" }), /*#__PURE__*/ _jsx("th", { children: "Actor" }), /*#__PURE__*/ _jsx("th", { children: "Details" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: events.map((e)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ _jsxs("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ _jsxs("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "All Projects" }), /*#__PURE__*/ _jsxs("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__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: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ _jsx("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Project Settings" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Subtitle", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Project" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Project Type", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ _jsxs("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("th", { children: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", {}) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet" }) }), /*#__PURE__*/ _jsx("div", { className: "modal-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } export default function DashboardPage() { const router = useRouter(); const searchParams = useSearchParams(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = useState(null); const [projects, setProjects] = useState([]); const [selectedProjectId, setSelectedProjectId] = useState(searchParams.get('projectId') || null); const [dashboard, setDashboard] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [retryCount, setRetryCount] = useState(0); const [showProjectSettings, setShowProjectSettings] = useState(false); const [showProjectManager, setShowProjectManager] = useState(false); const [workspaceId, setWorkspaceId] = useState(null); const { toasts, add } = useToast(); const onRefresh = useCallback(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = useCallback(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsx("p", { children: error }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ _jsx("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ _jsxs("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__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}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ _jsx(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ _jsx(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ _jsx(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ _jsx(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ _jsx(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ _jsx(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ _jsx(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ _jsx(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ _jsx(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ _jsx(ToastContainer, { toasts: toasts }) ] }); } @^`=_’”Õ×?A{ĘŅčōëîOR!%€ƒ˛ ĩ X \ Î Ņ k n ā_äšŧāãËÎ8<âåßãdgVY Ļgjˇē!%'/beG _K Ö Ų _!b!-"0"(#,#$$Ŗ$Ļ$Y%]%[&_&((—)š)l+o+,,´.¸.=/@/ķ/÷/õ0_ų0°2ŗ234747 7›7ž7æ:í:;;Å=Į=ī>ō>[?_?1@4@™@œ@ũ@A´AˇABBÖCÚCßD_âDWEZEtFwFįFęFéGėGUHXHRIVI_JbJ×JÚJDLGLˇLēLNN”N—N&P)PˆP‹PUQYQÚQ_ŨQËRÎR‚T‰T˛TšTņTøTU&UXU_UU—UÃUĘUøU˙U*V1VhVoVœVŖVŋVÅV“W™W’\”\¯^_ą^B`D`¸aģab bcbgbibqb¤b¨bƒc†cwdzdwezeÖeÚeUfXf™fœfm m\o_o˛oļoip_lp rr^rarEsHs–s™sØtÛt2v5vƒv†vtwwwÅwČwÁyÄyzzc{f{´{ˇ{›}ž}H~L~Õ_Ø5€8€Į€Ę€‚‚Ž‚˛‚ŧƒĀƒ ……2†5†¨‡Ŧ‡Ž‡ļ‡ˆˆ‰‰¤‰§‰Ļ‹Š‹>ŒAŒËĪ|‘_‘"’%’ē”Ŋ”]•`•ō—õ—Ž˜‘˜îšōšŖœĻœKNk n ĄĄ$¤'¤Î¤Ņ¤C¨F¨Õ¨Ø¨.Ģ2ĢãĢ_æĢ6­9­ãŽæŽÃąĮąÉąŅą,˛0˛´´˜´›´ĢĩŽĩ’ļ–&¸)¸šš—šššŦē¯ē•ģ™ģŧ_ŧ*Ŋ-Ŋžž“ž–žĒŋ­ŋ•Ā™ĀÁÁ)Â,ÂwÂzÂĻÃĒÃ+Ä.Ä=Å@Å(Æ,ƭưÆŧĮŋĮÉÉCĘ_FĘ8Ë;ËĖĖÍ͙ΜÎ^ĐaĐĖŌĪŌVĶYĶ!Õ$ÕlÖs֙֠րڂÚēÛŊÛ&Ü*ÜüÜ˙ÜjŨmŨÍŨ_ĐŨ?ßBßŖßĻßZā]āÂāÅā|ââßâââĪãĶãØäÛäOåRåÄæĮæ@įCįāčãčEéHé&ę)ęˆę‹ęUë_YëÚëŨëËėÎėŽî•îžîÅîũîī6ī=īī†īąī¸īæīíīđđVđ]đŠđ‘đŗđšđŠņņ ō&ō1ø_3øØųÚų`ûcû°ûŗû üüüüLüPü+ũ.ũ ū ū˙˙o˙s˙î˙ņ˙2559‰Œėđ. _1  ‚ c f ´ ˇ Ū á / 2 z } Ë Ī Ž‘EH _b°ŗƒ†ãæorę_톊”—ޞ…ˆ  Ë Î S!V!p$s$ķ$ö$ū&'w(z())Ū+á+z,},•/˜/0_022˜2›2Ą4Ĩ4>5A5o6r6ė7ī7•:˜:ß;æ;<#<Y<`<į<î<_>a>n@p@åAčA5B8BB_”B–BžBŅBÕBHCLCĨC¨C8D;DCEFE´EˇEGGsGwGōGõG6H:HĸHĨHGIJIëIîIJJK_‚KÕKŲKILLLšLL}M€M-N0NÛNŪN,O/O˙PQ_QbQįQëQéRėR!T$TUUiVlVWWX_X“X–XY YĢ[Ž['\*\ŋ]Â]2^5^Ũ`á`za}aĻbŠbédđdee:gX>ŧ>ŋ>@ @ @@h@k@*A-A/A;AŠAA)C,C.C:C†C‰CŋDÂDÄDZĐD"E%E`FcFeFqFŧFŋFôG÷GųGHXH[H™IœIžIĒIöIųIŲJÜJ]L`LLNON€€€€€Õ__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._Û__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._Ë__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._˙Í__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._ūūū˙ūū˙ūūū˙˙ū˙ūūĶ__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._ũũūĐ__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._üũüüüũũüũũüüüüũüũũüũüüúúž__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._ûüûûûûûüûûûûûûüûûûûûûûûüûûųųųųųųųųųųųũũ˙˙˙ûûüūüûûûüûûüûüûûûûûûûûûûûûûûûüûûûûüüûûüūüûûûûüûûûûûûüûûûûûûûûüûûûüūüüûûüûûüûûüûûüûûüûûûüûûüûûüûûüûûûûûûųų˙ûüûûûûûûûûûüûûûûûûûûüûûųųųųųųųųųųũũũ˙˙ûûüūüûûûüûûüûüûûûûûûûüûûüûûûûûûüûüûûûûûûüûûûûûûûûüûûûûųųųų˙˙ûûüūüüûûûûûüûüûûûûûüûûûûûûûûüûûûûüûûûûûûûüûûųų˙ûüûûûûûûûûûüûûųüūüüûûûûûüûûûûûûûûûųųųú˙×__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._úúúúúúûũûûúúúúúûúûúúúúúúûúúúûûúúøøøūûũûûúûúúúûúûúúúúúúûûúúúúúúúûúúúúúúûûúûúúøøūúûúúúúúúúúúûúúøøūúûúúúúúúúûúúøøøūûûûúúûúûúûúúúúúúûûúúúúúúûúúúúúúúûûúûúúú€×__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._ã__WEBPACK_MODULE_REFERENCE__2_5b22757365536561726368506172616d73225d_call_directImport_asiSafe1__._öööööööööö÷÷üüüüũøøųøøøųûųøųųøųøøøųøøøøøÎ__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._÷÷˙÷÷˙÷÷˙÷÷˙÷÷˙÷÷˙÷÷÷÷ėüô/* __next_internal_client_entry_do_not_use__ default auto */ const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; function useToast() { const [toasts, setToasts] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const add = __WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._((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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "toast-container", children: toasts.map((t)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: `toast ${t.type}`, children: t.message }, t.id)) }); } function SearchInput({ value, onChange, placeholder }) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "search-wrap", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "search-icon", children: "⌕" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: `badge ${className || ''}`, children: children }); } function FormField({ label, children }) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } function OverviewTab({ project, dashboard }) { const panels = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ 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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "Loading dashboard data..." }) }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))' }, children: panels.map((p)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "metric-card", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h3", { children: p.label }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: `metric-value ${p.cls}`, children: p.value }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "metric-sub", children: p.sub }) ] }, p.label)) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "grid", style: { gridTemplateColumns: '1fr 1fr', marginTop: 18 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "panel", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "Dimensions" }), (dashboard.dimensions || []).map((dim)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { style: { fontSize: 13 }, children: dim.name }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { style: { fontSize: 13 }, children: dim.score }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "bar-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "panel", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "Lifecycle" }), (dashboard.lifecycle || []).map((phase)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { style: { fontSize: 13 }, children: phase.name }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "muted", style: { fontSize: 12 }, children: [ phase.openRisks, " open" ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "bar-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [form, setForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "New Risk" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Title *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Dimension *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Domain", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Probability", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Impact", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Detectability", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Owner", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(''); const [sortKey, setSortKey] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._('normalizedScore'); const [sortDir, setSortDir] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._('desc'); const [page, setPage] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(0); const [selectedRisk, setSelectedRisk] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [showCreate, setShowCreate] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [editing, setEditing] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [editForm, setEditForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({}); const [updating, setUpdating] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [confirmDelete, setConfirmDelete] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [deleting, setDeleting] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const risks = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ if (!dashboard?.topRisks) return []; return sortData(dashboard.topRisks, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ 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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "Loading..." }) }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: paged.map((risk)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { onClick: ()=>openDetail(risk), children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontFamily: 'monospace', fontSize: 12 }, children: risk.id?.slice(0, 8) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: risk.title }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: risk.dimension?.toLowerCase(), children: risk.dimension }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: risk.lifecyclePhase }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: risk.normalizedScore }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { style: { color: risk.residualScore >= 50 ? 'var(--danger)' : risk.residualScore >= 25 ? 'var(--warn)' : 'var(--accent)' }, children: risk.residualScore }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: risk.status?.toLowerCase().replace(/\s+/g, '-'), children: risk.status }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: risk.ownerDisplayName || '-' }) }) ] }, risk.id)) }) ] }) }), filtered.length > paged.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { textAlign: 'center', marginTop: 12 }, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setPage((p)=>p + 1), children: [ "Show more (", filtered.length - paged.length, " remaining)" ] }) }), !filtered.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No risks match your search" }) }), showCreate && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Title *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Dimension", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Domain", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Probability", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Impact", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Detectability", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Owner", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Dimension" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.dimension ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Phase" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.lifecyclePhase ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Probability" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.probability ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Impact" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.impact ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Detectability" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.detectability ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Score" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: selectedRisk.normalizedScore }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Residual" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.residualScore ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Owner" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.ownerDisplayName || '-' ] }) ] }), selectedRisk.description && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 12, fontSize: 13 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Description" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.description ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 16 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", style: { fontSize: 12 }, children: "Update status:" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', gap: 6, marginTop: 6, flexWrap: 'wrap' }, children: RISK_STATUSES.map((s)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: `button small ${s === 'OPEN' ? 'secondary' : ''}`, onClick: ()=>updateStatus(selectedRisk.id, s), disabled: updating === selectedRisk.id, children: s.replace('_', ' ') }, s)) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Close" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [form, setForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "New Mitigation" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Risk *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Title *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Status", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Progress %", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Due Date", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Owner", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(''); const [sortKey, setSortKey] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._('progressPercent'); const [sortDir, setSortDir] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._('asc'); const [showCreate, setShowCreate] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [selectedMitigation, setSelectedMitigation] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [editing, setEditing] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [editForm, setEditForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({}); const [updating, setUpdating] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [confirmDelete, setConfirmDelete] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [deleting, setDeleting] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const mitigations = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); const filtered = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ 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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "Loading..." }) }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: filtered.slice(0, 50).map((m)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: m.title }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: m.riskTitle }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: m.status?.toLowerCase().replace(/\s+/g, '-'), children: m.status }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "bar-wrap", style: { flex: 1, maxWidth: 80 }, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { children: [ m.effectivenessPercent || 0, "%" ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: m.ownerDisplayName || '-' }) }) ] }, m.id)) }) ] }) }), !filtered.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No mitigations found" }) }), showCreate && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Title *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Status", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Progress %", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Due Date", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Owner", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [showDecision, setShowDecision] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [decisionForm, setDecisionForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "Loading..." }) }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-header", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h1", { children: "Deployment Gate" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", children: "Gate evaluation for AI deployment readiness" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "dash-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: `metric-value ${gateCls}`, style: { fontSize: 28 }, children: gateStatus }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Criterion" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Required" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Actual" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Status" }) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: criteria.map((c)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: c.name }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: c.required }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: c.actual }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: c.status?.toLowerCase(), children: c.status }) }) ] }, c.name)) }) ] }) }), !criteria.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No gate criteria evaluated yet" }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 16, display: 'flex', gap: 8, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "Gate Decision" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Decision", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Reason", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [form, setForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "New Integration" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Provider", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Base URL", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Auth Mode", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-header", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h1", { children: "Integrations" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", children: "Connect Trello, Jira, Asana, or Microsoft Planner" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "dash-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "panel", style: { textAlign: 'center' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { fontSize: 32, marginBottom: 8 }, children: provider === 'TRELLO' ? '⊞' : provider === 'JIRA' ? '◆' : provider === 'ASANA' ? '◇' : 'â–Ŗ' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h3", { style: { margin: '0 0 4px' }, children: provider.replace('_', ' ') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", style: { fontSize: 12, margin: '0 0 12px' }, children: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const [loading, setLoading] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(true); const [error, setError] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const load = __WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-header", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h1", { children: "Audit Log" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "dash-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Date" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Action" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Entity" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Actor" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Details" }) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: events.map((e)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [confirmDelete, setConfirmDelete] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [showNew, setShowNew] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const handleDelete = async ()=>{ setDeleting(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-header", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h1", { children: "All Projects" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "dash-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Name" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Status" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Type" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Created" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [form, setForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "Project Settings" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Name *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Subtitle", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Status", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [form, setForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "New Project" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Name *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Project Type", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [confirmDelete, setConfirmDelete] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [showNew, setShowNew] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const handleDelete = async ()=>{ setDeleting(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Name" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Status" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Type" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Created" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", {}) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No projects yet" }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } function DashboardPage() { const router = __WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._(); const searchParams = __WEBPACK_MODULE_REFERENCE__2_5b22757365536561726368506172616d73225d_call_directImport_asiSafe1__._(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [projects, setProjects] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const [selectedProjectId, setSelectedProjectId] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(searchParams.get('projectId') || null); const [dashboard, setDashboard] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [loading, setLoading] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(true); const [error, setError] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [retryCount, setRetryCount] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(0); const [showProjectSettings, setShowProjectSettings] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [showProjectManager, setShowProjectManager] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [workspaceId, setWorkspaceId] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const { toasts, add } = useToast(); const onRefresh = __WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = __WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._(async (projectId)=>{ setLoading(true); setError(null); try { const session = await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "shell-loading", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: error }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-header", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: `/api/projects/${project?.id}/reports/executive.html`, className: "button secondary small", target: "_blank", children: "Report" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: `/api/projects/${project?.id}/reports/risk-register.csv`, className: "button secondary small", target: "_blank", children: "CSV" }) ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "tabs", children: TABS.map((t)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: `tab ${tab === t ? 'active' : ''}`, onClick: ()=>router.push(`/dashboard?tab=${t}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Overview", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Projects", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Risks", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Mitigations", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Gate", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Integrations", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Audit", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ToastContainer, { toasts: toasts }) ] }); } íđ ņÃN/* __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, useSearchParams } from 'next/navigation'; import { api } from '../../lib/api-client'; import ErrorBoundary from '../../components/ErrorBoundary'; const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; 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 FormField({ label, children }) { return /*#__PURE__*/ _jsxs("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ _jsx("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ _jsx("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ _jsxs("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ _jsx("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ _jsx("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } 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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Risk" }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { 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 [showCreate, setShowCreate] = useState(false); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); 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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__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: ()=>openDetail(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" }) }), showCreate && /*#__PURE__*/ _jsx(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, 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: RISK_STATUSES.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" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Mitigation" }), /*#__PURE__*/ _jsx(FormField, { label: "Risk *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('progressPercent'); const [sortDir, setSortDir] = useState('asc'); const [showCreate, setShowCreate] = useState(false); const [selectedMitigation, setSelectedMitigation] = useState(null); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); const mitigations = useMemo(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = useMemo(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); 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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__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", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, 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" }) }), showCreate && /*#__PURE__*/ _jsx(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = useState(false); const [showDecision, setShowDecision] = useState(false); const [decisionForm, setDecisionForm] = useState({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = useState(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); 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: "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, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Gate Decision" }), /*#__PURE__*/ _jsx(FormField, { label: "Decision", children: /*#__PURE__*/ _jsx(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reason", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Integration" }), /*#__PURE__*/ _jsx(FormField, { label: "Provider", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Base URL", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Auth Mode", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = useState(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("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: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__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: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ _jsx("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ _jsx("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ _jsx(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ _jsx("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ _jsx("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const load = useCallback(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Audit Log" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__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: "Date" }), /*#__PURE__*/ _jsx("th", { children: "Action" }), /*#__PURE__*/ _jsx("th", { children: "Entity" }), /*#__PURE__*/ _jsx("th", { children: "Actor" }), /*#__PURE__*/ _jsx("th", { children: "Details" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: events.map((e)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ _jsxs("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ _jsxs("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "All Projects" }), /*#__PURE__*/ _jsxs("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__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: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ _jsx("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Project Settings" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Subtitle", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Project" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Project Type", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ _jsxs("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("th", { children: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", {}) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet" }) }), /*#__PURE__*/ _jsx("div", { className: "modal-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } export default function DashboardPage() { const router = useRouter(); const searchParams = useSearchParams(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = useState(null); const [projects, setProjects] = useState([]); const [selectedProjectId, setSelectedProjectId] = useState(searchParams.get('projectId') || null); const [dashboard, setDashboard] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [retryCount, setRetryCount] = useState(0); const [showProjectSettings, setShowProjectSettings] = useState(false); const [showProjectManager, setShowProjectManager] = useState(false); const [workspaceId, setWorkspaceId] = useState(null); const { toasts, add } = useToast(); const onRefresh = useCallback(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = useCallback(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsx("p", { children: error }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ _jsx("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ _jsxs("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__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}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ _jsx(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ _jsx(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ _jsx(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ _jsx(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ _jsx(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ _jsx(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ _jsx(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ _jsx(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ _jsx(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ _jsx(ToastContainer, { toasts: toasts }) ] }); } 7á61146undefined148213undefined215275undefined277319undefined321379undefined970977__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined10001010__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined15151518__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined16151618__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined18251829__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined19201923__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined20492052__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined27382741__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined29042908__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined30223025__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined34353438__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined38083812__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined40254028__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined43204323__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined45554558__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46644668__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined48784882__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined50905093__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined53435347__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined54765479__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined57185721__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined63046310__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined77837786__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined78637866__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined79697973__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined79757983__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined80348037__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined82638267__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined84068409__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined85438546__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined87498752__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined90009004__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined92429246__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined93799382__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined95619565__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined98199823__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1026210265__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1064710650__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1111611119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1126511268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1195611960__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1209312096__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1227512279__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1253312537__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1297612979__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1336313367__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1408614089__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1423514238__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1507815085__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined1512315130__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined1581315815__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined1611116114__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1621916223__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1643316436__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1653716540__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1663716640__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1682016823__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1692416927__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1736617370__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1763117634__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1775117754__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1803618039__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1815118154__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1840918412__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1851718520__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1877018774__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1903919042__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1915919162__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1952419527__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1963919642__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1999419997__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2011620119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2051820521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2061620619__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2082120825__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2095420957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2119521198__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2163421641__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2168221689__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2174521752__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2179121798__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2184821855__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2190421911__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2195521962__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2200822015__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2205822065__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2212022127__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2217222179__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2220722213__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined2241922425__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined2369823700__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2423924241__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2464224644__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2501625019__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2509625099__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2518725191__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2519325201__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined2525225256__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2547525478__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2571925722__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2597525978__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2607026074__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2619726200__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2626526268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2791227916__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2850828511__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2859428598__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2877728780__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2919729200__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2927829281__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2950929512__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2959029593__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2991229915__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3025830261__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3033930342__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3058030583__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3066130664__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3116931172__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3125031253__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3158731590__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3166831671__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3215532158__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3232832332__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3272532728__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3282132824__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3296732970__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3330433307__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3345433458__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3372433728__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3406034063__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3435434357__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3472834732__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3473434742__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined3483334837__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3508835091__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3523635239__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3575035753__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3590235905__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3681136815__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3724437247__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3741037413__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3807438077__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3823738240__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3889838901__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3905439057__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3966239666__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4009940102__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4026740270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4106741070__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4123041233__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4202042023__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4219042193__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4307543078__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4322143224__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4382243826__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4400344006__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4434244345__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4477144774__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4550745511__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4551345521__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined4561245616__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4609946103__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4623246235__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4650746510__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4673846742__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4687146874__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4714247145__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4737847382__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4751147514__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4778847791__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4802148025__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4815448157__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4842648429__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4865448658__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4878748790__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4906649069__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4930149305__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4943449437__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4970549708__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4978349786__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5008650090__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5021950222__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5049350496__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5072850732__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5086150864__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5113251135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5147051474__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5177951782__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5202452027__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5222552229__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5248052483__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5288952892__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5334253345__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5396453967__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5410254105__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5456154564__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5489254899__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined5493754944__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined5593655938__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined5625056253__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5635856362__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5657256575__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5668256685__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5678156784__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5715157154__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5725157254__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5743457437__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5753857541__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5798057983__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5807958082__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5831958323__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5858458587__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5870358706__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5907659079__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5920059203__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5961659619__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5971759720__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5994259945__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6004060043__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6024560249__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6037860381__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6061960622__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6107061077__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6111861125__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6118161188__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6123861245__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6131161318__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6136161368__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6141461421__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6146461471__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6152661533__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6157861585__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6161961625__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6183461840__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6198461990__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6353763539__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined6396063962__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined6435264355__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6443264435__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6452364527__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6452964537__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined6458864592__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6481164814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6503465037__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6529665299__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6539165395__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6551865521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6558665589__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6686966873__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6746567468__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6756467568__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6788667889__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6796767970__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6819568198__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6827668279__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6857468577__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6865568658__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6898668989__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6906769071__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6951869521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6995769960__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7092070924__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7126371266__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7134471347__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7181171814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7190771910__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7204772050__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7242672429__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7258272586__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7285272855__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7313473138__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7334973352__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7348173484__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7393173934__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7406774070__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7486474867__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7499574998__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7551875522__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7589575898__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7604676049__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7676676769__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7692276925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7771777720__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7785077853__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7835878361__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7848878491__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7900979013__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7916679169__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7947179474__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7985279855__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8053380536__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8086380870__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8092480931__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8098580992__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8112781134__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8150381505__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined8203082032__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined8240582408__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8248582488__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8257682580__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8258282590__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined8264182645__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8276082764__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8285382856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8300083003__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8326783270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8338083383__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8373283735__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8382783831__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8395483957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8402284026__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8413084133__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8429584298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8445984462__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8462184624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8486384866__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8494984953__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8506585068__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8514685149__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8537385376__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8554985552__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8572385726__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8580485807__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8627186274__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8636786370__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8650386507__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8676186764__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8707387076__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8731887321__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8765787660__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8780887812__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8807888081__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8821188214__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8832888331__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8900389006__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8912789130__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8953589538__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8965089653__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9033390337__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9049090493__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9079090793__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9136991376__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9141491421__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9196291964__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined9227792280__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9238592389__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9259992602__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9271092713__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9281192814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9322293225__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9333193334__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9353093533__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9363193634__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9381893821__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9392093923__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9428494288__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9441794420__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9465894661__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9511995126__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9521795221__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9522395231__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined9528295286__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9540195405__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9549495497__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9563895641__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9591195914__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9602496027__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9632696329__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9681796821__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9706297065__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9746197464__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9774797750__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9816198164__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9847698479__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9879998802__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9921899221__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9959099593__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9972299725__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100071100078__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100119100126__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100165100172__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100198100208__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined100347100349__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined100673100681__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined100773100776__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100853100856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100965100968__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101045101048__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101149101152__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101229101232__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101338101342__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101344101352__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined101403101407__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101522101526__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101615101618__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101756101759__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102004102007__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102117102120__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102400102403__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102495102499__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined102622102625__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102690102694__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined102798102801__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102958102961__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103120103123__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103282103285__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103443103446__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103686103689__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103770103774__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined103886103889__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104321104324__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104402104405__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104733104737__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined105141105145__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined105744105747__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined106096106099__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined106948106955__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107010107017__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107060107067__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107173107175__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined107534107538__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107540107548__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined107599107603__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107718107722__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107811107814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined107955107959__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined108329108332__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108442108445__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108737108740__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108832108836__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined108959108962__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109027109031__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined109135109138__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109295109298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109457109460__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109617109620__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109780109783__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110023110026__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110236110240__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined110542110546__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined110674110677__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110902110905__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined111454111457__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112001112004__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112082112085__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112392112395__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112732112735__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined113101113105__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined113499113502__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined114056114059__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115011115014__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115107115110__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115267115270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115591115594__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115742115746__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116012116016__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116295116298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined116660116664__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116817116820__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined117117117120__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined117879117886__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined117924117931__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined118329118331__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined118628118631__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined118736118740__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined118950118953__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119062119065__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119161119164__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119473119476__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119574119577__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119894119897__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119998120001__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined120563120566__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined120662120665__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121157121161__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined121290121293__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121531121534__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121978121985__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined122023122030__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined122334122336__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined122644122647__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined122752122756__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined122966122969__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123073123076__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123172123175__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123484123487__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123588123591__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124153124156__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124258124261__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124818124822__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined124951124954__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined125192125195__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined125687125694__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125749125756__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125799125806__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125912125914__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined126271126275__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined126394126398__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined126713126717__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined127021127024__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined127287127290__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined127599127603__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128019128022__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128232128236__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128383128386__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128459128463__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128583128586__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128767128770__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128953128956__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129137129140__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129324129327__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129502129505__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129739129743__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined130085130089__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined130233130236__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined130485130488__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131182131185__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131271131274__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131621131624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined132009132012__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined132426132430__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined132872132875__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined133697133700__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined134791134794__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined134903134906__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135056135059__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135170135173__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135471135474__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135622135626__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined135892135896__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined136175136178__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined136540136544__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined136697136700__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined136997137000__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined137675137678__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined137973137987undefined138034138042__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._undefined138072138086__WEBPACK_MODULE_REFERENCE__2_5b22757365536561726368506172616d73225d_call_directImport_asiSafe1__._undefined138220138227__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138272138279__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138340138347__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138427138434__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138477138484__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138523138530__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138579138586__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138650138657__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138723138730__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138782138789__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138860138870__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined138934138944__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined139065139067__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined139577139579__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined139931139933__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined140765140767__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined141087141095__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined141435141438__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141517141520__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141645141649__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined141740141743__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141867141870__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141953141956__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined142249142253__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142255142263__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined142314142318__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142433142436__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined142686142690__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142787142791__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined143154143157__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined144039144043__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined144622144625__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined145263145266__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined145675145678__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined146121146125__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined146265146268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined146614146617__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147029147032__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147132147135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147464147467__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147469147481__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined147560147563__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147754147757__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147759147771__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined147850147853__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148265148268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148270148282__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined148358148361__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148671148674__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148676148688__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined148770148773__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149088149091__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149093149105__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined149180149183__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149492149495__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149497149509__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined149592149595__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149913149916__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149918149930__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined150006150009__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined150233150236__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined150621150624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined151116151119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined_XãúTM—øB]¸€Ęx  e ą # m QÃä.Rœ„Î8_„VĸrŧļƒÍŧMŸ`#Ē#÷#A$¨$ô$ö$E%x%Â%¤&đ&{'Å'K(•(`)Ē)ĸ*_î*Ü+(,­,÷,Ē-ö-ô.@/÷0A1ŋ2 3Û4%5ˇ56ą8ũ8‚9Ė9:Ë:É;<Ė=>–?â?ąBûBC_×CGsG™GíG˜JÕJũKGL°LüLÎMN}NĮN(OrO&PpPÕPQÖR"S'TqTæT0UJV”VWNWMX_—XYJYDZZ™[ã[X\ĸ\ ^V^Æ^_p`ē`1a{a cTcŗcũcĮde”eŪeĖfgĘhiGi›iĶi_'jNjĸjÔj(kYk­kŲk-l[l¯lÚl.memšmæm:nVn¨nvoČoÁtūtwVwįx$y˜zâz/{y{Ņ{_||n|Ą|í|Č}~MJ€”€đ€<ˇ‚B‚Œ‚øˆD‰”‹Ū‹1Œ}Œ0zeŗũá+‘y‘_Ñ“L“Ŗ”í”;•…•s–Ŋ– —U—N™˜™æ™0š~›Č›œ`œDžŽž8Ÿ„Ÿ ĄWĄ´ĄūĄĸ×ĸ%¤o¤Ĩ_NĨXϤĻđ§:¨]ЧŠĢfĢh̎ĢŦ^ŦY­Ŗ­4Ž~Ž}°Į°\ąĻą0ĩ|ĩ)ˇsˇ¸`¸õē?ģßģ)ŧģž_ŋžŋčŋE‘ÂBČÄ1Å{ŘČâȂÉĖÉßĖ)ÍĐÍΌŅÖŅeŌ¯ŌÕQÕÖL֜׿אŲÚŲˇÜŨŨ_TŨ¯ŨûŨŪß*āĢāõāâOâ3ããäJäVå å‰æÕæVį į˛čüčâé.ę¯ęųęėPė1í}íūíHî\ī_ĻīŽđÚđ[ņĨņąōûōFķķŧôõ‰õĶõâö,÷ø`øáø+ų7úúĐûüMũ—ũ‰ūĶū™˙å˙ā*Ā_ ˁËRœd Ž ö J p Ä ¤ácĖę4ŸéI“L­÷ĢõZ_¤[ĨO<ˆ×K•!Q!Ę!"ą#û#]$§$…%Ī%.&x&B'Ž'(Y(G)‘)Q+Ĩ+Î+_",Z,Ž,ā,4-v-Ę-õ-I.w.Ë.ö.J//Õ/0V0x0Ę0›1í1}2Ī2Ú89ŧ:ų:<É<=`=¸=_>>U>ˆ>Ô>¯?ų?Õ@A"BlBČBCCŲCDdDdI°ILJLĒLöL4N~NĖNO÷OAPPŲPR_JR˜RâR*TtTÂTUÍVWËXYÕ\!]t^ž^ _V_&apaÍab bębbdŦdEe‘e›fåfügHhi_eiæi0jīk9lžlm"plpėp6q>sŠs˙tIuŨu'vôx>y×y!z9}ƒ}~O~H€’€[aƒ­ƒF„_„ž…†‚‡ˇrŠŧŠŒWŒŒáŒkōFގô’>’ŗ“ũ“J”””ė”8•:•‰•ŧ•–{–Į– —_j—ú—D˜L™–™šNšĢ›õ›QœœbŖīWžĄžCŸŸ. x ĄaĄPĸšĸíĸ9ŖŠŖķŖA¤‹¤kĨ_ĩĨbĻŦĻW§Ą§ī§9¨ ĒSǰĒúĒĢËĢÉŦ­HŽ’Ž„¯ίąhąüąH˛Rŗœŗ´h´Ú´$ĩġ¸‡¸_ҏfē°ē ģjģž^ž÷žAŋjĀ´ĀôÂHÃnÃÂÃßÅÆUĮŸĮČTČ&ÉpÉÜÉ&ĘˆĘŌĘjĖ´ĖÍhÍ,Î_vÎØÎ"ĪÚĪ$ЇĐŅĐ:Ō†ŌĶQĶ?Ô‰ÔSÖ§Ö×N×Pן×Ōר‘ØŨØ6Ų€Ų ÚWÚeÛ¯ÛÜgÜ’Ũ_ÜŨÄßāáKá×â!ã<ä†ä!ækæŖįíį-éwéëaëŌėííįíAī•īžīđ9đđ§đņŒņÉņ ķ_cķŋķ ôVô ô õWõ¤õîõSööęö4÷ž÷ę÷ė÷;ønøēø-ųyųŌųúĻúđúåû/üüįü˙ũIūĨū_ņūl˙ļ˙÷˙CĢõ’Ü{ÅdŽL–†Đ!mŨ'×! o š  M á - „Î+_uÆQĨĐ$ŽË2~€ĪNÁ f°=‰ûEŗũ!kĮ Ž Ø !_e!Í!"´"ū"#į#„$Î$n%¸%¨&ō&Ä'(>)Š) *T*5++¤-î-0X0Ļ0đ0#2m2ž34v5_Â5L7–7Ā9 :Â= >i>ŗ>P?š?Û@%AšABC[CrDŧD&FrF GUG~HČHŋKL9LLNXNO_ËO4P€PRQœQ RSRŗRũR2T|TŪT(UeV¯VW^WYÚY:Z„Zp\ŧ\=]‡]u^ŋ^{`Ī`õ`Iayb_ļbęc4ddédģefmfˇfgag–hāhEiiÁk lqlģlčn4oĩo˙oíp7q#swsŽst-ttët_(uvŲvPwœw×x#ySzz¤{î{#}o}Y+€w€ Téa‚Ģ‚`ƒǃa„Ģ„`…Ē…b†Ŧ†[‡_Ĩ‡ˆۈ1Š}Š ‹W‹PŒšŒPšđ:•‘ߑ`“Ē“H•”•N—˜—Κ›[ŸĨŸ \ ō <ĄĢĄõĄŖ_iŖũŖI¤SĨŸĨļϧj¨ļ¨OŠ™ŠÂĒ Ģ¯­ų­N¯¤¯¯$°ǰū°+ąąŧą˛`˛´˛߲3ŗZŗŽŗßŗ_3´s´Į´ ĩ]ĩ‘ĩåĩ,ļ†ļÆļ ˇ™ˇÖˇÔšēqģŽģîž+ŋkĀÁĀÂ_ÂŽÂøÂuÃÁÃÄfÄâÄ,ÅÅ_ÉÅîÆ:Į<Į‹ĮžĮ Č}ČĮČÁÉ ĘnĘēĘ%ĖoĖáĪ-ĐpŌēŌ8Õ‚Õ×e× ŲlŲøŲBÚœÛæÛ‚ŨĖŨ0Ū_zŪÃß āā\āĢāõā´áūáâMâœâæâ‚äĖäÎäågåąåįæ1į3į€įŌįčWéĄéŖéđé;ę…ęēëPėėSėĻėđė.îxîzîĮîī]ī=đ‡đōRō>ôˆô’(0,react.useState)•(0,react.useCallback)ōōņōōōņōōņōōōņņōņōō‘(0,react.useMemo)ņņđšreact_jsx_runtime.Fragmentđīđđđīīđīīđđđđīđīīđīđđüü–api_client/* api */.FHīîīīīīīîīīīīīīîīīīīīīīīîīīûûûûûûûûûûûũũ˙˙˙īīîūîīīīîīīîīîīīīīīīīīīīīīīīīîīīīīîîīīîūîīīīīîīīīīīīîīīīīīīīīîīīīîūîîīīîīīîīīîīīîīīîīīīîīīîīīîīīîīīīīīīûû˙īîīīīīīīīīīîīīīīīīīīîīīûûûûûûûûûûũũũ˙˙īīîūîīīīîīīîīîīīīīīīīîīīîīīīīīīîīîīīīīīīîīīīīīīīīîīīīīûûûû˙˙īīîūîîīīīīīîīîīīīīīîīīīīīīīīîīīīīîīīīīīīīîīīûû˙īîīīīīīīīīīîīīûîūîîīīīīīîīīīīīīīīīûûûü˙“(0,react.useEffect)îîîîîîíũííîîîîîíîíîîîîîîíîîîííîîúúúūíũííîíîîîíîíîîîîîîííîîîîîîîíîîîîîîííîíîîúúūîíîîîîîîîîîíîîúúūîíîîîîîîîíîîúúúūíííîîíîíîíîîîîîîííîîîîîîíîîîîîîîííîíîîî˜(0,navigation.useRouter)ž(0,navigation.useSearchParams)øøøøøøøøøøųųüüüüũėėëėėėëûëėëëėëėėėëėėėėėErrorBoundaryëë˙ëë˙ëë˙ëë˙ëë˙ëë˙ëëëë†buffer†source„size„maps?õ˙˙î…// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(1124); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(8301); // EXTERNAL MODULE: ./node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(2378); // EXTERNAL MODULE: ./src/lib/api-client.js var api_client = __webpack_require__(4194); ;// ./src/components/ErrorBoundary.jsx /* __next_internal_client_entry_do_not_use__ default auto */ class ErrorBoundary extends react.Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "empty-state", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } ;// ./src/app/dashboard/page.jsx /* __next_internal_client_entry_do_not_use__ default auto */ const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; function useToast() { const [toasts, setToasts] = (0,react.useState)([]); const add = (0,react.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.jsx)("div", { className: "toast-container", children: toasts.map((t)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `toast ${t.type}`, children: t.message }, t.id)) }); } function SearchInput({ value, onChange, placeholder }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "search-wrap", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "search-icon", children: "⌕" }), /*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("span", { className: `badge ${className || ''}`, children: children }); } function FormField({ label, children }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } function OverviewTab({ project, dashboard }) { const panels = (0,react.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.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading dashboard data..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))' }, children: panels.map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "metric-card", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h3", { children: p.label }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `metric-value ${p.cls}`, children: p.value }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "metric-sub", children: p.sub }) ] }, p.label)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "grid", style: { gridTemplateColumns: '1fr 1fr', marginTop: 18 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "panel", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Dimensions" }), (dashboard.dimensions || []).map((dim)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { fontSize: 13 }, children: dim.name }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { style: { fontSize: 13 }, children: dim.score }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("div", { className: "panel", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Lifecycle" }), (dashboard.lifecycle || []).map((phase)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { fontSize: 13 }, children: phase.name }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "muted", style: { fontSize: 12 }, children: [ phase.openRisks, " open" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Risk" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Dimension *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Domain", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Probability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Impact", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Detectability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = (0,react.useState)(''); const [sortKey, setSortKey] = (0,react.useState)('normalizedScore'); const [sortDir, setSortDir] = (0,react.useState)('desc'); const [page, setPage] = (0,react.useState)(0); const [selectedRisk, setSelectedRisk] = (0,react.useState)(null); const [showCreate, setShowCreate] = (0,react.useState)(false); const [editing, setEditing] = (0,react.useState)(false); const [editForm, setEditForm] = (0,react.useState)({}); const [updating, setUpdating] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [deleting, setDeleting] = (0,react.useState)(false); const risks = (0,react.useMemo)(()=>{ if (!dashboard?.topRisks) return []; return sortData(dashboard.topRisks, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = (0,react.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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api_client/* api */.FH.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api_client/* api */.FH.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: paged.map((risk)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { onClick: ()=>openDetail(risk), children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontFamily: 'monospace', fontSize: 12 }, children: risk.id?.slice(0, 8) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: risk.title }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: risk.dimension?.toLowerCase(), children: risk.dimension }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: risk.lifecyclePhase }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: risk.normalizedScore }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { color: risk.residualScore >= 50 ? 'var(--danger)' : risk.residualScore >= 25 ? 'var(--warn)' : 'var(--accent)' }, children: risk.residualScore }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: risk.status?.toLowerCase().replace(/\s+/g, '-'), children: risk.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: risk.ownerDisplayName || '-' }) }) ] }, risk.id)) }) ] }) }), filtered.length > paged.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { textAlign: 'center', marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No risks match your search" }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Dimension", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Domain", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Probability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Impact", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Detectability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Dimension" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.dimension ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Phase" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.lifecyclePhase ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Probability" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.probability ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Impact" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.impact ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Detectability" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.detectability ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Score" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: selectedRisk.normalizedScore }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Residual" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.residualScore ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Owner" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.ownerDisplayName || '-' ] }) ] }), selectedRisk.description && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12, fontSize: 13 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Description" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.description ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 16 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 12 }, children: "Update status:" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', gap: 6, marginTop: 6, flexWrap: 'wrap' }, children: RISK_STATUSES.map((s)=>/*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("div", { className: "modal-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Close" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api_client/* api */.FH.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Mitigation" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Risk *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Progress %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Due Date", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = (0,react.useState)(''); const [sortKey, setSortKey] = (0,react.useState)('progressPercent'); const [sortDir, setSortDir] = (0,react.useState)('asc'); const [showCreate, setShowCreate] = (0,react.useState)(false); const [selectedMitigation, setSelectedMitigation] = (0,react.useState)(null); const [editing, setEditing] = (0,react.useState)(false); const [editForm, setEditForm] = (0,react.useState)({}); const [updating, setUpdating] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [deleting, setDeleting] = (0,react.useState)(false); const mitigations = (0,react.useMemo)(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = (0,react.useMemo)(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); const filtered = (0,react.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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api_client/* api */.FH.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: filtered.slice(0, 50).map((m)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: m.title }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: m.riskTitle }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: m.status?.toLowerCase().replace(/\s+/g, '-'), children: m.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", style: { flex: 1, maxWidth: 80 }, children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("td", { children: [ m.effectivenessPercent || 0, "%" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: m.ownerDisplayName || '-' }) }) ] }, m.id)) }) ] }) }), !filtered.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No mitigations found" }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Progress %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Due Date", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = (0,react.useState)(false); const [showDecision, setShowDecision] = (0,react.useState)(false); const [decisionForm, setDecisionForm] = (0,react.useState)({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = (0,react.useState)(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api_client/* api */.FH.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api_client/* api */.FH.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Deployment Gate" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Gate evaluation for AI deployment readiness" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `metric-value ${gateCls}`, style: { fontSize: 28 }, children: gateStatus }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Criterion" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Required" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actual" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: criteria.map((c)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: c.name }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: c.required }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: c.actual }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: c.status?.toLowerCase(), children: c.status }) }) ] }, c.name)) }) ] }) }), !criteria.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No gate criteria evaluated yet" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 16, display: 'flex', gap: 8, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Gate Decision" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Decision", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Reason", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Integration" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Provider", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Base URL", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Auth Mode", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = (0,react.useState)(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Integrations" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Connect Trello, Jira, Asana, or Microsoft Planner" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "panel", style: { textAlign: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { fontSize: 32, marginBottom: 8 }, children: provider === 'TRELLO' ? '⊞' : provider === 'JIRA' ? '◆' : provider === 'ASANA' ? '◇' : 'â–Ŗ' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h3", { style: { margin: '0 0 4px' }, children: provider.replace('_', ' ') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { fontSize: 12, margin: '0 0 12px' }, children: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = (0,react.useState)([]); const [loading, setLoading] = (0,react.useState)(true); const [error, setError] = (0,react.useState)(null); const load = (0,react.useCallback)(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api_client/* api */.FH.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Audit Log" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Date" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Action" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Entity" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actor" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Details" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: events.map((e)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [showNew, setShowNew] = (0,react.useState)(false); const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "All Projects" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Name" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Type" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Created" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Project Settings" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Subtitle", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Project" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Project Type", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [showNew, setShowNew] = (0,react.useState)(false); const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Name" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Type" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Created" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", {}) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No projects yet" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } function DashboardPage() { const router = (0,navigation.useRouter)(); const searchParams = (0,navigation.useSearchParams)(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = (0,react.useState)(null); const [projects, setProjects] = (0,react.useState)([]); const [selectedProjectId, setSelectedProjectId] = (0,react.useState)(searchParams.get('projectId') || null); const [dashboard, setDashboard] = (0,react.useState)(null); const [loading, setLoading] = (0,react.useState)(true); const [error, setError] = (0,react.useState)(null); const [retryCount, setRetryCount] = (0,react.useState)(0); const [showProjectSettings, setShowProjectSettings] = (0,react.useState)(false); const [showProjectManager, setShowProjectManager] = (0,react.useState)(false); const [workspaceId, setWorkspaceId] = (0,react.useState)(null); const { toasts, add } = useToast(); const onRefresh = (0,react.useCallback)(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = (0,react.useCallback)(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api_client/* api */.FH.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api_client/* api */.FH.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api_client/* api */.FH.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api_client/* api */.FH.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "shell-loading", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "empty-state", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: error }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/reports/executive.html`, className: "button secondary small", target: "_blank", children: "Report" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/reports/risk-register.csv`, className: "button secondary small", target: "_blank", children: "CSV" }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "tabs", children: TABS.map((t)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: `tab ${tab === t ? 'active' : ''}`, onClick: ()=>router.push(`/dashboard?tab=${t}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ToastContainer, { toasts: toasts }) ] }); } ”{"finalSource":true}ƒmap‹bufferedMap ` ConcatSourceRawSourceĀ// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(1124); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(8301); // EXTERNAL MODULE: ./node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(2378); // EXTERNAL MODULE: ./src/lib/api-client.js var api_client = __webpack_require__(4194); ;// ./src/components/ErrorBoundary.jsx  ReplaceSourceReplaceSourceRawSource5/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Component } from 'react'; export default class ErrorBoundary extends Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsxs("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } W61123undefined125158undefined160174undefined203211__WEBPACK_MODULE_REFERENCE__1_5b22436f6d706f6e656e74225d_directImport_asiSafe1__._undefined652656__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined771774__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined930934__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined12141217__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined15301533__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefinedö91172react.Componentundefined613689(0,react_jsx_runtime.jsxs)undefined804878(0,react_jsx_runtime.jsx)undefined10341110(0,react_jsx_runtime.jsxs)undefined13901464(0,react_jsx_runtime.jsx)undefined17771851(0,react_jsx_runtime.jsx)undefinedRawSource" ;// ./src/app/dashboard/page.jsx úûëõ˙˙7á61146undefined148213undefined215275undefined277319undefined321379undefined970977__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined10001010__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined15151518__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined16151618__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined18251829__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined19201923__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined20492052__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined27382741__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined29042908__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined30223025__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined34353438__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined38083812__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined40254028__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined43204323__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined45554558__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46644668__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined48784882__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined50905093__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined53435347__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined54765479__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined57185721__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined63046310__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined77837786__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined78637866__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined79697973__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined79757983__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined80348037__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined82638267__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined84068409__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined85438546__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined87498752__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined90009004__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined92429246__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined93799382__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined95619565__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined98199823__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1026210265__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1064710650__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1111611119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1126511268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1195611960__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1209312096__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1227512279__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1253312537__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1297612979__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1336313367__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1408614089__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1423514238__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1507815085__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined1512315130__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined1581315815__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined1611116114__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1621916223__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1643316436__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1653716540__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1663716640__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1682016823__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1692416927__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1736617370__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1763117634__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1775117754__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1803618039__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1815118154__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1840918412__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1851718520__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1877018774__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1903919042__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1915919162__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1952419527__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1963919642__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1999419997__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2011620119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2051820521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2061620619__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2082120825__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2095420957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2119521198__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2163421641__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2168221689__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2174521752__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2179121798__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2184821855__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2190421911__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2195521962__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2200822015__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2205822065__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2212022127__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2217222179__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2220722213__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined2241922425__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined2369823700__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2423924241__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2464224644__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2501625019__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2509625099__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2518725191__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2519325201__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined2525225256__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2547525478__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2571925722__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2597525978__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2607026074__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2619726200__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2626526268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2791227916__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2850828511__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2859428598__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2877728780__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2919729200__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2927829281__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2950929512__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2959029593__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2991229915__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3025830261__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3033930342__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3058030583__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3066130664__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3116931172__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3125031253__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3158731590__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3166831671__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3215532158__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3232832332__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3272532728__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3282132824__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3296732970__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3330433307__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3345433458__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3372433728__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3406034063__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3435434357__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3472834732__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3473434742__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined3483334837__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3508835091__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3523635239__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3575035753__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3590235905__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3681136815__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3724437247__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3741037413__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3807438077__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3823738240__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3889838901__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3905439057__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3966239666__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4009940102__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4026740270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4106741070__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4123041233__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4202042023__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4219042193__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4307543078__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4322143224__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4382243826__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4400344006__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4434244345__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4477144774__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4550745511__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4551345521__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined4561245616__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4609946103__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4623246235__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4650746510__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4673846742__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4687146874__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4714247145__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4737847382__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4751147514__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4778847791__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4802148025__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4815448157__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4842648429__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4865448658__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4878748790__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4906649069__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4930149305__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4943449437__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4970549708__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4978349786__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5008650090__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5021950222__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5049350496__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5072850732__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5086150864__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5113251135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5147051474__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5177951782__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5202452027__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5222552229__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5248052483__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5288952892__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5334253345__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5396453967__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5410254105__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5456154564__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5489254899__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined5493754944__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined5593655938__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined5625056253__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5635856362__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5657256575__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5668256685__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5678156784__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5715157154__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5725157254__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5743457437__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5753857541__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5798057983__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5807958082__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5831958323__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5858458587__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5870358706__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5907659079__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5920059203__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5961659619__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5971759720__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5994259945__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6004060043__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6024560249__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6037860381__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6061960622__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6107061077__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6111861125__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6118161188__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6123861245__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6131161318__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6136161368__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6141461421__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6146461471__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6152661533__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6157861585__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6161961625__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6183461840__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6198461990__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6353763539__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined6396063962__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined6435264355__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6443264435__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6452364527__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6452964537__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined6458864592__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6481164814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6503465037__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6529665299__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6539165395__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6551865521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6558665589__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6686966873__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6746567468__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6756467568__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6788667889__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6796767970__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6819568198__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6827668279__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6857468577__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6865568658__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6898668989__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6906769071__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6951869521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6995769960__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7092070924__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7126371266__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7134471347__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7181171814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7190771910__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7204772050__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7242672429__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7258272586__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7285272855__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7313473138__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7334973352__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7348173484__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7393173934__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7406774070__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7486474867__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7499574998__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7551875522__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7589575898__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7604676049__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7676676769__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7692276925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7771777720__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7785077853__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7835878361__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7848878491__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7900979013__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7916679169__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7947179474__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7985279855__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8053380536__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8086380870__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8092480931__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8098580992__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8112781134__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8150381505__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined8203082032__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined8240582408__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8248582488__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8257682580__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8258282590__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined8264182645__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8276082764__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8285382856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8300083003__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8326783270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8338083383__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8373283735__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8382783831__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8395483957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8402284026__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8413084133__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8429584298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8445984462__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8462184624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8486384866__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8494984953__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8506585068__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8514685149__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8537385376__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8554985552__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8572385726__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8580485807__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8627186274__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8636786370__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8650386507__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8676186764__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8707387076__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8731887321__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8765787660__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8780887812__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8807888081__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8821188214__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8832888331__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8900389006__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8912789130__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8953589538__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8965089653__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9033390337__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9049090493__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9079090793__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9136991376__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9141491421__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9196291964__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined9227792280__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9238592389__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9259992602__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9271092713__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9281192814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9322293225__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9333193334__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9353093533__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9363193634__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9381893821__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9392093923__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9428494288__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9441794420__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9465894661__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9511995126__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9521795221__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9522395231__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined9528295286__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9540195405__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9549495497__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9563895641__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9591195914__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9602496027__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9632696329__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9681796821__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9706297065__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9746197464__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9774797750__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9816198164__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9847698479__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9879998802__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9921899221__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9959099593__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9972299725__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100071100078__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100119100126__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100165100172__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100198100208__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined100347100349__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined100673100681__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined100773100776__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100853100856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100965100968__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101045101048__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101149101152__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101229101232__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101338101342__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101344101352__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined101403101407__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101522101526__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101615101618__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101756101759__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102004102007__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102117102120__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102400102403__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102495102499__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined102622102625__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102690102694__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined102798102801__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102958102961__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103120103123__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103282103285__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103443103446__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103686103689__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103770103774__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined103886103889__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104321104324__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104402104405__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104733104737__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined105141105145__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined105744105747__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined106096106099__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined106948106955__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107010107017__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107060107067__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107173107175__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined107534107538__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107540107548__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined107599107603__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107718107722__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107811107814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined107955107959__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined108329108332__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108442108445__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108737108740__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108832108836__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined108959108962__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109027109031__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined109135109138__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109295109298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109457109460__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109617109620__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109780109783__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110023110026__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110236110240__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined110542110546__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined110674110677__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110902110905__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined111454111457__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112001112004__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112082112085__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112392112395__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112732112735__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined113101113105__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined113499113502__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined114056114059__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115011115014__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115107115110__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115267115270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115591115594__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115742115746__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116012116016__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116295116298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined116660116664__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116817116820__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined117117117120__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined117879117886__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined117924117931__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined118329118331__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined118628118631__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined118736118740__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined118950118953__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119062119065__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119161119164__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119473119476__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119574119577__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119894119897__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119998120001__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined120563120566__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined120662120665__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121157121161__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined121290121293__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121531121534__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121978121985__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined122023122030__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined122334122336__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined122644122647__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined122752122756__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined122966122969__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123073123076__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123172123175__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123484123487__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123588123591__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124153124156__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124258124261__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124818124822__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined124951124954__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined125192125195__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined125687125694__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125749125756__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125799125806__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125912125914__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined126271126275__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined126394126398__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined126713126717__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined127021127024__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined127287127290__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined127599127603__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128019128022__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128232128236__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128383128386__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128459128463__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128583128586__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128767128770__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128953128956__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129137129140__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129324129327__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129502129505__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129739129743__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined130085130089__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined130233130236__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined130485130488__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131182131185__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131271131274__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131621131624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined132009132012__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined132426132430__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined132872132875__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined133697133700__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined134791134794__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined134903134906__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135056135059__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135170135173__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135471135474__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135622135626__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined135892135896__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined136175136178__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined136540136544__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined136697136700__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined136997137000__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined137675137678__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined137973137987undefined138034138042__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._undefined138072138086__WEBPACK_MODULE_REFERENCE__2_5b22757365536561726368506172616d73225d_call_directImport_asiSafe1__._undefined138220138227__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138272138279__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138340138347__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138427138434__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138477138484__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138523138530__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138579138586__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138650138657__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138723138730__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138782138789__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138860138870__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined138934138944__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined139065139067__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined139577139579__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined139931139933__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined140765140767__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined141087141095__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined141435141438__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141517141520__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141645141649__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined141740141743__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141867141870__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141953141956__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined142249142253__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142255142263__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined142314142318__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142433142436__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined142686142690__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142787142791__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined143154143157__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined144039144043__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined144622144625__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined145263145266__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined145675145678__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined146121146125__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined146265146268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined146614146617__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147029147032__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147132147135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147464147467__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147469147481__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined147560147563__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147754147757__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147759147771__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined147850147853__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148265148268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148270148282__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined148358148361__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148671148674__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148676148688__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined148770148773__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149088149091__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149093149105__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined149180149183__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149492149495__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149497149509__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined149592149595__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149913149916__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149918149930__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined150006150009__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined150233150236__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined150621150624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined151116151119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefinedtg655739(0,react.useState)undefined762852(0,react.useCallback)undefined13571431(0,react_jsx_runtime.jsx)undefined15281602(0,react_jsx_runtime.jsx)undefined18091885(0,react_jsx_runtime.jsxs)undefined19762050(0,react_jsx_runtime.jsx)undefined21762250(0,react_jsx_runtime.jsx)undefined29363010(0,react_jsx_runtime.jsx)undefined31733249(0,react_jsx_runtime.jsxs)undefined33633437(0,react_jsx_runtime.jsx)undefined38473921(0,react_jsx_runtime.jsx)undefined42914367(0,react_jsx_runtime.jsxs)undefined45804654(0,react_jsx_runtime.jsx)undefined49465020(0,react_jsx_runtime.jsx)undefined52525326(0,react_jsx_runtime.jsx)undefined54325508(0,react_jsx_runtime.jsxs)undefined57185794(0,react_jsx_runtime.jsxs)undefined60026076(0,react_jsx_runtime.jsx)undefined63266402(0,react_jsx_runtime.jsxs)undefined65316605(0,react_jsx_runtime.jsx)undefined68446918(0,react_jsx_runtime.jsx)undefined75017583(0,react.useMemo)undefined90569130(0,react_jsx_runtime.jsx)undefined92079281(0,react_jsx_runtime.jsx)undefined93849460(0,react_jsx_runtime.jsxs)undefined94629541react_jsx_runtime.Fragmentundefined95929666(0,react_jsx_runtime.jsx)undefined98929968(0,react_jsx_runtime.jsxs)undefined1010710181(0,react_jsx_runtime.jsx)undefined1031510389(0,react_jsx_runtime.jsx)undefined1059210666(0,react_jsx_runtime.jsx)undefined1091410990(0,react_jsx_runtime.jsxs)undefined1122811304(0,react_jsx_runtime.jsxs)undefined1143711511(0,react_jsx_runtime.jsx)undefined1169011766(0,react_jsx_runtime.jsxs)undefined1202012096(0,react_jsx_runtime.jsxs)undefined1253512609(0,react_jsx_runtime.jsx)undefined1299113065(0,react_jsx_runtime.jsx)undefined1353113605(0,react_jsx_runtime.jsx)undefined1375113825(0,react_jsx_runtime.jsx)undefined1451314589(0,react_jsx_runtime.jsxs)undefined1472214796(0,react_jsx_runtime.jsx)undefined1497515051(0,react_jsx_runtime.jsxs)undefined1530515381(0,react_jsx_runtime.jsxs)undefined1582015894(0,react_jsx_runtime.jsx)undefined1627816354(0,react_jsx_runtime.jsxs)undefined1707317147(0,react_jsx_runtime.jsx)undefined1729317367(0,react_jsx_runtime.jsx)undefined1820718291(0,react.useState)undefined1832918413(0,react.useState)undefined1909619157api_client/* api */.FHundefined1945319527(0,react_jsx_runtime.jsx)undefined1963219708(0,react_jsx_runtime.jsxs)undefined1991819992(0,react_jsx_runtime.jsx)undefined2009320167(0,react_jsx_runtime.jsx)undefined2026420338(0,react_jsx_runtime.jsx)undefined2051820592(0,react_jsx_runtime.jsx)undefined2069320767(0,react_jsx_runtime.jsx)undefined2120621282(0,react_jsx_runtime.jsxs)undefined2154321617(0,react_jsx_runtime.jsx)undefined2173421808(0,react_jsx_runtime.jsx)undefined2209022164(0,react_jsx_runtime.jsx)undefined2227622350(0,react_jsx_runtime.jsx)undefined2260522679(0,react_jsx_runtime.jsx)undefined2278422858(0,react_jsx_runtime.jsx)undefined2310823184(0,react_jsx_runtime.jsxs)undefined2344923523(0,react_jsx_runtime.jsx)undefined2364023714(0,react_jsx_runtime.jsx)undefined2407624150(0,react_jsx_runtime.jsx)undefined2426224336(0,react_jsx_runtime.jsx)undefined2468824762(0,react_jsx_runtime.jsx)undefined2488124955(0,react_jsx_runtime.jsx)undefined2535425428(0,react_jsx_runtime.jsx)undefined2552325597(0,react_jsx_runtime.jsx)undefined2579925875(0,react_jsx_runtime.jsxs)undefined2600426078(0,react_jsx_runtime.jsx)undefined2631626390(0,react_jsx_runtime.jsx)undefined2682626910(0,react.useState)undefined2695127035(0,react.useState)undefined2709127175(0,react.useState)undefined2721427298(0,react.useState)undefined2734827432(0,react.useState)undefined2748127565(0,react.useState)undefined2760927693(0,react.useState)undefined2773927823(0,react.useState)undefined2786627950(0,react.useState)undefined2800528089(0,react.useState)undefined2813428218(0,react.useState)undefined2824628328(0,react.useMemo)undefined2853428616(0,react.useMemo)undefined2988929950api_client/* api */.FHundefined3048930550api_client/* api */.FHundefined3095131012api_client/* api */.FHundefined3138431458(0,react_jsx_runtime.jsx)undefined3153531609(0,react_jsx_runtime.jsx)undefined3169731773(0,react_jsx_runtime.jsxs)undefined3177531854react_jsx_runtime.Fragmentundefined3190531981(0,react_jsx_runtime.jsxs)undefined3220032274(0,react_jsx_runtime.jsx)undefined3251532589(0,react_jsx_runtime.jsx)undefined3284232916(0,react_jsx_runtime.jsx)undefined3300833084(0,react_jsx_runtime.jsxs)undefined3320733281(0,react_jsx_runtime.jsx)undefined3334633420(0,react_jsx_runtime.jsx)undefined3506435140(0,react_jsx_runtime.jsxs)undefined3573235806(0,react_jsx_runtime.jsx)undefined3588935965(0,react_jsx_runtime.jsxs)undefined3614436218(0,react_jsx_runtime.jsx)undefined3663536709(0,react_jsx_runtime.jsx)undefined3678736861(0,react_jsx_runtime.jsx)undefined3708937163(0,react_jsx_runtime.jsx)undefined3724137315(0,react_jsx_runtime.jsx)undefined3763437708(0,react_jsx_runtime.jsx)undefined3805138125(0,react_jsx_runtime.jsx)undefined3820338277(0,react_jsx_runtime.jsx)undefined3851538589(0,react_jsx_runtime.jsx)undefined3866738741(0,react_jsx_runtime.jsx)undefined3924639320(0,react_jsx_runtime.jsx)undefined3939839472(0,react_jsx_runtime.jsx)undefined3980639880(0,react_jsx_runtime.jsx)undefined3995840032(0,react_jsx_runtime.jsx)undefined4051640590(0,react_jsx_runtime.jsx)undefined4076040836(0,react_jsx_runtime.jsxs)undefined4122941303(0,react_jsx_runtime.jsx)undefined4139641470(0,react_jsx_runtime.jsx)undefined4161341687(0,react_jsx_runtime.jsx)undefined4202142095(0,react_jsx_runtime.jsx)undefined4224242318(0,react_jsx_runtime.jsxs)undefined4258442660(0,react_jsx_runtime.jsxs)undefined4299243066(0,react_jsx_runtime.jsx)undefined4335743431(0,react_jsx_runtime.jsx)undefined4380243878(0,react_jsx_runtime.jsxs)undefined4388043959react_jsx_runtime.Fragmentundefined4405044126(0,react_jsx_runtime.jsxs)undefined4437744451(0,react_jsx_runtime.jsx)undefined4459644670(0,react_jsx_runtime.jsx)undefined4518145255(0,react_jsx_runtime.jsx)undefined4540445478(0,react_jsx_runtime.jsx)undefined4638446460(0,react_jsx_runtime.jsxs)undefined4688946963(0,react_jsx_runtime.jsx)undefined4712647200(0,react_jsx_runtime.jsx)undefined4786147935(0,react_jsx_runtime.jsx)undefined4809548169(0,react_jsx_runtime.jsx)undefined4882748901(0,react_jsx_runtime.jsx)undefined4905449128(0,react_jsx_runtime.jsx)undefined4973349809(0,react_jsx_runtime.jsxs)undefined5024250316(0,react_jsx_runtime.jsx)undefined5048150555(0,react_jsx_runtime.jsx)undefined5135251426(0,react_jsx_runtime.jsx)undefined5158651660(0,react_jsx_runtime.jsx)undefined5244752521(0,react_jsx_runtime.jsx)undefined5268852762(0,react_jsx_runtime.jsx)undefined5364453718(0,react_jsx_runtime.jsx)undefined5386153935(0,react_jsx_runtime.jsx)undefined5453354609(0,react_jsx_runtime.jsxs)undefined5478654860(0,react_jsx_runtime.jsx)undefined5519655270(0,react_jsx_runtime.jsx)undefined5569655770(0,react_jsx_runtime.jsx)undefined5650356579(0,react_jsx_runtime.jsxs)undefined5658156660react_jsx_runtime.Fragmentundefined5675156827(0,react_jsx_runtime.jsxs)undefined5731057386(0,react_jsx_runtime.jsxs)undefined5751557589(0,react_jsx_runtime.jsx)undefined5786157935(0,react_jsx_runtime.jsx)undefined5816358239(0,react_jsx_runtime.jsxs)undefined5836858442(0,react_jsx_runtime.jsx)undefined5871058784(0,react_jsx_runtime.jsx)undefined5901759093(0,react_jsx_runtime.jsxs)undefined5922259296(0,react_jsx_runtime.jsx)undefined5957059644(0,react_jsx_runtime.jsx)undefined5987459950(0,react_jsx_runtime.jsxs)undefined6007960153(0,react_jsx_runtime.jsx)undefined6042260496(0,react_jsx_runtime.jsx)undefined6072160797(0,react_jsx_runtime.jsxs)undefined6092661000(0,react_jsx_runtime.jsx)undefined6127661350(0,react_jsx_runtime.jsx)undefined6158261658(0,react_jsx_runtime.jsxs)undefined6178761861(0,react_jsx_runtime.jsx)undefined6212962203(0,react_jsx_runtime.jsx)undefined6227862352(0,react_jsx_runtime.jsx)undefined6265262728(0,react_jsx_runtime.jsxs)undefined6285762931(0,react_jsx_runtime.jsx)undefined6320263276(0,react_jsx_runtime.jsx)undefined6350863584(0,react_jsx_runtime.jsxs)undefined6371363787(0,react_jsx_runtime.jsx)undefined6405564129(0,react_jsx_runtime.jsx)undefined6446464540(0,react_jsx_runtime.jsxs)undefined6484564919(0,react_jsx_runtime.jsx)undefined6516165235(0,react_jsx_runtime.jsx)undefined6543365509(0,react_jsx_runtime.jsxs)undefined6576065834(0,react_jsx_runtime.jsx)undefined6624066314(0,react_jsx_runtime.jsx)undefined6676466838(0,react_jsx_runtime.jsx)undefined6745767531(0,react_jsx_runtime.jsx)undefined6766667740(0,react_jsx_runtime.jsx)undefined6819668270(0,react_jsx_runtime.jsx)undefined6859868682(0,react.useState)undefined6872068804(0,react.useState)undefined6979669857api_client/* api */.FHundefined7016970243(0,react_jsx_runtime.jsx)undefined7034870424(0,react_jsx_runtime.jsxs)undefined7063470708(0,react_jsx_runtime.jsx)undefined7081570889(0,react_jsx_runtime.jsx)undefined7098571059(0,react_jsx_runtime.jsx)undefined7142671500(0,react_jsx_runtime.jsx)undefined7159771671(0,react_jsx_runtime.jsx)undefined7185171925(0,react_jsx_runtime.jsx)undefined7202672100(0,react_jsx_runtime.jsx)undefined7253972613(0,react_jsx_runtime.jsx)undefined7270972783(0,react_jsx_runtime.jsx)undefined7302073096(0,react_jsx_runtime.jsxs)undefined7335773431(0,react_jsx_runtime.jsx)undefined7354773621(0,react_jsx_runtime.jsx)undefined7399174065(0,react_jsx_runtime.jsx)undefined7418674260(0,react_jsx_runtime.jsx)undefined7467374747(0,react_jsx_runtime.jsx)undefined7484574919(0,react_jsx_runtime.jsx)undefined7514175215(0,react_jsx_runtime.jsx)undefined7531075384(0,react_jsx_runtime.jsx)undefined7558675662(0,react_jsx_runtime.jsxs)undefined7579175865(0,react_jsx_runtime.jsx)undefined7610376177(0,react_jsx_runtime.jsx)undefined7662576709(0,react.useState)undefined7675076834(0,react.useState)undefined7689076974(0,react.useState)undefined7702477108(0,react.useState)undefined7717477258(0,react.useState)undefined7730177385(0,react.useState)undefined7743177515(0,react.useState)undefined7755877642(0,react.useState)undefined7769777781(0,react.useState)undefined7782677910(0,react.useState)undefined7794478026(0,react.useMemo)undefined7823578317(0,react.useMemo)undefined7846178543(0,react.useMemo)undefined8009080151api_client/* api */.FHundefined8057280633api_client/* api */.FHundefined8102381097(0,react_jsx_runtime.jsx)undefined8117481248(0,react_jsx_runtime.jsx)undefined8133681412(0,react_jsx_runtime.jsxs)undefined8141481493react_jsx_runtime.Fragmentundefined8154481620(0,react_jsx_runtime.jsxs)undefined8183981913(0,react_jsx_runtime.jsx)undefined8213382207(0,react_jsx_runtime.jsx)undefined8246682540(0,react_jsx_runtime.jsx)undefined8263282708(0,react_jsx_runtime.jsxs)undefined8283182905(0,react_jsx_runtime.jsx)undefined8297083044(0,react_jsx_runtime.jsx)undefined8432484400(0,react_jsx_runtime.jsxs)undefined8499285066(0,react_jsx_runtime.jsx)undefined8516285238(0,react_jsx_runtime.jsxs)undefined8555685630(0,react_jsx_runtime.jsx)undefined8570885782(0,react_jsx_runtime.jsx)undefined8600786081(0,react_jsx_runtime.jsx)undefined8615986233(0,react_jsx_runtime.jsx)undefined8652886602(0,react_jsx_runtime.jsx)undefined8668086754(0,react_jsx_runtime.jsx)undefined8708287156(0,react_jsx_runtime.jsx)undefined8723487310(0,react_jsx_runtime.jsxs)undefined8775787831(0,react_jsx_runtime.jsx)undefined8826788341(0,react_jsx_runtime.jsx)undefined8930189377(0,react_jsx_runtime.jsxs)undefined8971689790(0,react_jsx_runtime.jsx)undefined8986889942(0,react_jsx_runtime.jsx)undefined9040690480(0,react_jsx_runtime.jsx)undefined9057390647(0,react_jsx_runtime.jsx)undefined9078490858(0,react_jsx_runtime.jsx)undefined9123491308(0,react_jsx_runtime.jsx)undefined9146191537(0,react_jsx_runtime.jsxs)undefined9180391877(0,react_jsx_runtime.jsx)undefined9215692232(0,react_jsx_runtime.jsxs)undefined9244392517(0,react_jsx_runtime.jsx)undefined9264692720(0,react_jsx_runtime.jsx)undefined9316793241(0,react_jsx_runtime.jsx)undefined9337493448(0,react_jsx_runtime.jsx)undefined9424294316(0,react_jsx_runtime.jsx)undefined9444494518(0,react_jsx_runtime.jsx)undefined9503895114(0,react_jsx_runtime.jsxs)undefined9548795561(0,react_jsx_runtime.jsx)undefined9570995783(0,react_jsx_runtime.jsx)undefined9650096574(0,react_jsx_runtime.jsx)undefined9672796801(0,react_jsx_runtime.jsx)undefined9759397667(0,react_jsx_runtime.jsx)undefined9779797871(0,react_jsx_runtime.jsx)undefined9837698450(0,react_jsx_runtime.jsx)undefined9857798651(0,react_jsx_runtime.jsx)undefined9916999245(0,react_jsx_runtime.jsxs)undefined9939899472(0,react_jsx_runtime.jsx)undefined9977499848(0,react_jsx_runtime.jsx)undefined100226100300(0,react_jsx_runtime.jsx)undefined100978101052(0,react_jsx_runtime.jsx)undefined101379101463(0,react.useState)undefined101517101601(0,react.useState)undefined101655101739(0,react.useState)undefined101874101958(0,react.useState)undefined102327102388api_client/* api */.FHundefined102913102974api_client/* api */.FHundefined103347103421(0,react_jsx_runtime.jsx)undefined103498103572(0,react_jsx_runtime.jsx)undefined103660103736(0,react_jsx_runtime.jsxs)undefined103738103817react_jsx_runtime.Fragmentundefined103868103944(0,react_jsx_runtime.jsxs)undefined104059104135(0,react_jsx_runtime.jsxs)undefined104224104298(0,react_jsx_runtime.jsx)undefined104442104516(0,react_jsx_runtime.jsx)undefined104780104854(0,react_jsx_runtime.jsx)undefined104964105038(0,react_jsx_runtime.jsx)undefined105387105461(0,react_jsx_runtime.jsx)undefined105553105629(0,react_jsx_runtime.jsxs)undefined105752105826(0,react_jsx_runtime.jsx)undefined105891105967(0,react_jsx_runtime.jsxs)undefined106071106145(0,react_jsx_runtime.jsx)undefined106307106381(0,react_jsx_runtime.jsx)undefined106542106616(0,react_jsx_runtime.jsx)undefined106775106849(0,react_jsx_runtime.jsx)undefined107088107162(0,react_jsx_runtime.jsx)undefined107245107321(0,react_jsx_runtime.jsxs)undefined107433107507(0,react_jsx_runtime.jsx)undefined107585107659(0,react_jsx_runtime.jsx)undefined107883107957(0,react_jsx_runtime.jsx)undefined108130108204(0,react_jsx_runtime.jsx)undefined108375108449(0,react_jsx_runtime.jsx)undefined108527108601(0,react_jsx_runtime.jsx)undefined109065109139(0,react_jsx_runtime.jsx)undefined109232109306(0,react_jsx_runtime.jsx)undefined109439109515(0,react_jsx_runtime.jsxs)undefined109769109843(0,react_jsx_runtime.jsx)undefined110152110226(0,react_jsx_runtime.jsx)undefined110468110542(0,react_jsx_runtime.jsx)undefined110878110952(0,react_jsx_runtime.jsx)undefined111100111176(0,react_jsx_runtime.jsxs)undefined111442111516(0,react_jsx_runtime.jsx)undefined111646111720(0,react_jsx_runtime.jsx)undefined111834111908(0,react_jsx_runtime.jsx)undefined112580112654(0,react_jsx_runtime.jsx)undefined112775112849(0,react_jsx_runtime.jsx)undefined113254113328(0,react_jsx_runtime.jsx)undefined113440113514(0,react_jsx_runtime.jsx)undefined114194114270(0,react_jsx_runtime.jsxs)undefined114423114497(0,react_jsx_runtime.jsx)undefined114794114868(0,react_jsx_runtime.jsx)undefined115444115528(0,react.useState)undefined115566115650(0,react.useState)undefined116191116252api_client/* api */.FHundefined116565116639(0,react_jsx_runtime.jsx)undefined116744116820(0,react_jsx_runtime.jsxs)undefined117030117104(0,react_jsx_runtime.jsx)undefined117212117286(0,react_jsx_runtime.jsx)undefined117384117458(0,react_jsx_runtime.jsx)undefined117866117940(0,react_jsx_runtime.jsx)undefined118046118120(0,react_jsx_runtime.jsx)undefined118316118390(0,react_jsx_runtime.jsx)undefined118488118562(0,react_jsx_runtime.jsx)undefined118746118820(0,react_jsx_runtime.jsx)undefined118919118993(0,react_jsx_runtime.jsx)undefined119354119430(0,react_jsx_runtime.jsxs)undefined119559119633(0,react_jsx_runtime.jsx)undefined119871119945(0,react_jsx_runtime.jsx)undefined120403120487(0,react.useState)undefined120578120654(0,react_jsx_runtime.jsxs)undefined120656120735react_jsx_runtime.Fragmentundefined120786120862(0,react_jsx_runtime.jsxs)undefined120977121053(0,react_jsx_runtime.jsxs)undefined121142121216(0,react_jsx_runtime.jsx)undefined121357121431(0,react_jsx_runtime.jsx)undefined121701121775(0,react_jsx_runtime.jsx)undefined121885121959(0,react_jsx_runtime.jsx)undefined122258122332(0,react_jsx_runtime.jsx)undefined122820122896(0,react_jsx_runtime.jsxs)undefined123137123211(0,react_jsx_runtime.jsx)undefined123607123681(0,react_jsx_runtime.jsx)undefined123964124038(0,react_jsx_runtime.jsx)undefined124449124523(0,react_jsx_runtime.jsx)undefined124835124909(0,react_jsx_runtime.jsx)undefined125229125303(0,react_jsx_runtime.jsx)undefined125719125793(0,react_jsx_runtime.jsx)undefined126162126236(0,react_jsx_runtime.jsx)undefined126365126439(0,react_jsx_runtime.jsx)undefined126785126869(0,react.useState)undefined126910126994(0,react.useState)undefined127033127117(0,react.useState)undefined127143127233(0,react.useCallback)undefined127372127433api_client/* api */.FHundefined127757127843(0,react.useEffect)undefined127935128009(0,react_jsx_runtime.jsx)undefined128086128160(0,react_jsx_runtime.jsx)undefined128269128343(0,react_jsx_runtime.jsx)undefined128420128494(0,react_jsx_runtime.jsx)undefined128595128669(0,react_jsx_runtime.jsx)undefined128746128820(0,react_jsx_runtime.jsx)undefined128926129002(0,react_jsx_runtime.jsxs)undefined129004129083react_jsx_runtime.Fragmentundefined129134129210(0,react_jsx_runtime.jsxs)undefined129325129401(0,react_jsx_runtime.jsxs)undefined129490129564(0,react_jsx_runtime.jsx)undefined129702129776(0,react_jsx_runtime.jsx)undefined130021130095(0,react_jsx_runtime.jsx)undefined130205130279(0,react_jsx_runtime.jsx)undefined130559130633(0,react_jsx_runtime.jsx)undefined130725130801(0,react_jsx_runtime.jsxs)undefined130924130998(0,react_jsx_runtime.jsx)undefined131063131139(0,react_jsx_runtime.jsxs)undefined131243131317(0,react_jsx_runtime.jsx)undefined131474131548(0,react_jsx_runtime.jsx)undefined131707131781(0,react_jsx_runtime.jsx)undefined131940132014(0,react_jsx_runtime.jsx)undefined132172132246(0,react_jsx_runtime.jsx)undefined132486132560(0,react_jsx_runtime.jsx)undefined132641132717(0,react_jsx_runtime.jsxs)undefined132829132903(0,react_jsx_runtime.jsx)undefined133335133409(0,react_jsx_runtime.jsx)undefined133487133561(0,react_jsx_runtime.jsx)undefined133889133965(0,react_jsx_runtime.jsxs)undefined134369134445(0,react_jsx_runtime.jsxs)undefined135044135118(0,react_jsx_runtime.jsx)undefined135467135541(0,react_jsx_runtime.jsx)undefined136390136474(0,react.useState)undefined136529136613(0,react.useState)undefined136656136740(0,react.useState)undefined136846136907api_client/* api */.FHundefined137266137342(0,react_jsx_runtime.jsxs)undefined137344137423react_jsx_runtime.Fragmentundefined137474137550(0,react_jsx_runtime.jsxs)undefined137665137741(0,react_jsx_runtime.jsxs)undefined137830137904(0,react_jsx_runtime.jsx)undefined138045138121(0,react_jsx_runtime.jsxs)undefined138491138565(0,react_jsx_runtime.jsx)undefined138675138749(0,react_jsx_runtime.jsx)undefined139041139115(0,react_jsx_runtime.jsx)undefined139207139283(0,react_jsx_runtime.jsxs)undefined139406139480(0,react_jsx_runtime.jsx)undefined139545139621(0,react_jsx_runtime.jsxs)undefined139725139799(0,react_jsx_runtime.jsx)undefined139956140030(0,react_jsx_runtime.jsx)undefined140189140263(0,react_jsx_runtime.jsx)undefined140420140494(0,react_jsx_runtime.jsx)undefined140654140728(0,react_jsx_runtime.jsx)undefined140968141042(0,react_jsx_runtime.jsx)undefined141252141328(0,react_jsx_runtime.jsxs)undefined141630141706(0,react_jsx_runtime.jsxs)undefined141834141908(0,react_jsx_runtime.jsx)undefined142133142207(0,react_jsx_runtime.jsx)undefined142756142830(0,react_jsx_runtime.jsx)undefined143374143448(0,react_jsx_runtime.jsx)undefined143526143600(0,react_jsx_runtime.jsx)undefined143907143981(0,react_jsx_runtime.jsx)undefined144318144392(0,react_jsx_runtime.jsx)undefined144758144834(0,react_jsx_runtime.jsxs)undefined145228145302(0,react_jsx_runtime.jsx)undefined145856145930(0,react_jsx_runtime.jsx)undefined146882146956(0,react_jsx_runtime.jsx)undefined147049147123(0,react_jsx_runtime.jsx)undefined147280147354(0,react_jsx_runtime.jsx)undefined147675147749(0,react_jsx_runtime.jsx)undefined147897147973(0,react_jsx_runtime.jsxs)undefined148239148315(0,react_jsx_runtime.jsxs)undefined148594148668(0,react_jsx_runtime.jsx)undefined149030149106(0,react_jsx_runtime.jsxs)undefined149259149333(0,react_jsx_runtime.jsx)undefined149630149704(0,react_jsx_runtime.jsx)undefined150463150547(0,react.useState)undefined150585150669(0,react.useState)undefined151067151128api_client/* api */.FHundefined151425151499(0,react_jsx_runtime.jsx)undefined151604151680(0,react_jsx_runtime.jsxs)undefined151890151964(0,react_jsx_runtime.jsx)undefined152073152147(0,react_jsx_runtime.jsx)undefined152243152317(0,react_jsx_runtime.jsx)undefined152626152700(0,react_jsx_runtime.jsx)undefined152798152872(0,react_jsx_runtime.jsx)undefined153189153263(0,react_jsx_runtime.jsx)undefined153364153438(0,react_jsx_runtime.jsx)undefined154000154074(0,react_jsx_runtime.jsx)undefined154170154244(0,react_jsx_runtime.jsx)undefined154736154812(0,react_jsx_runtime.jsxs)undefined154941155015(0,react_jsx_runtime.jsx)undefined155253155327(0,react_jsx_runtime.jsx)undefined155771155855(0,react.useState)undefined155893155977(0,react.useState)undefined156281156342api_client/* api */.FHundefined156650156724(0,react_jsx_runtime.jsx)undefined156829156905(0,react_jsx_runtime.jsxs)undefined157115157189(0,react_jsx_runtime.jsx)undefined157293157367(0,react_jsx_runtime.jsx)undefined157463157537(0,react_jsx_runtime.jsx)undefined157846157920(0,react_jsx_runtime.jsx)undefined158021158095(0,react_jsx_runtime.jsx)undefined158657158731(0,react_jsx_runtime.jsx)undefined158833158907(0,react_jsx_runtime.jsx)undefined159464159540(0,react_jsx_runtime.jsxs)undefined159669159743(0,react_jsx_runtime.jsx)undefined159981160055(0,react_jsx_runtime.jsx)undefined160547160631(0,react.useState)undefined160686160770(0,react.useState)undefined160813160897(0,react.useState)undefined161003161064api_client/* api */.FHundefined161421161497(0,react_jsx_runtime.jsxs)undefined161616161692(0,react_jsx_runtime.jsxs)undefined162007162083(0,react_jsx_runtime.jsxs)undefined162387162461(0,react_jsx_runtime.jsx)undefined162724162798(0,react_jsx_runtime.jsx)undefined163107163183(0,react_jsx_runtime.jsxs)undefined163599163673(0,react_jsx_runtime.jsx)undefined163883163959(0,react_jsx_runtime.jsxs)undefined164106164180(0,react_jsx_runtime.jsx)undefined164253164329(0,react_jsx_runtime.jsxs)undefined164449164523(0,react_jsx_runtime.jsx)undefined164704164778(0,react_jsx_runtime.jsx)undefined164961165035(0,react_jsx_runtime.jsx)undefined165216165290(0,react_jsx_runtime.jsx)undefined165474165548(0,react_jsx_runtime.jsx)undefined165723165797(0,react_jsx_runtime.jsx)undefined166031166107(0,react_jsx_runtime.jsxs)undefined166449166525(0,react_jsx_runtime.jsxs)undefined166669166743(0,react_jsx_runtime.jsx)undefined166992167066(0,react_jsx_runtime.jsx)undefined167760167834(0,react_jsx_runtime.jsx)undefined167920167994(0,react_jsx_runtime.jsx)undefined168341168415(0,react_jsx_runtime.jsx)undefined168800168874(0,react_jsx_runtime.jsx)undefined169288169364(0,react_jsx_runtime.jsxs)undefined169806169880(0,react_jsx_runtime.jsx)undefined170702170776(0,react_jsx_runtime.jsx)undefined171867171941(0,react_jsx_runtime.jsx)undefined172050172124(0,react_jsx_runtime.jsx)undefined172274172348(0,react_jsx_runtime.jsx)undefined172459172533(0,react_jsx_runtime.jsx)undefined172831172905(0,react_jsx_runtime.jsx)undefined173053173129(0,react_jsx_runtime.jsxs)undefined173395173471(0,react_jsx_runtime.jsxs)undefined173750173824(0,react_jsx_runtime.jsx)undefined174186174262(0,react_jsx_runtime.jsxs)undefined174415174489(0,react_jsx_runtime.jsx)undefined174786174860(0,react_jsx_runtime.jsx)undefined175535175609(0,react_jsx_runtime.jsx)undefined175950176036(0,navigation.useRouter)undefined176066176164(0,navigation.useSearchParams)undefined176298176382(0,react.useState)undefined176427176511(0,react.useState)undefined176572176656(0,react.useState)undefined176736176820(0,react.useState)undefined176863176947(0,react.useState)undefined176986177070(0,react.useState)undefined177119177203(0,react.useState)undefined177267177351(0,react.useState)undefined177417177501(0,react.useState)undefined177553177637(0,react.useState)undefined177708177798(0,react.useCallback)undefined177862177952(0,react.useCallback)undefined178073178134api_client/* api */.FHundefined178644178705api_client/* api */.FHundefined179057179118api_client/* api */.FHundefined179950180011api_client/* api */.FHundefined180331180417(0,react.useEffect)undefined180757180831(0,react_jsx_runtime.jsx)undefined180910180984(0,react_jsx_runtime.jsx)undefined181109181185(0,react_jsx_runtime.jsxs)undefined181276181350(0,react_jsx_runtime.jsx)undefined181474181548(0,react_jsx_runtime.jsx)undefined181631181705(0,react_jsx_runtime.jsx)undefined181998182074(0,react_jsx_runtime.jsxs)undefined182076182155react_jsx_runtime.Fragmentundefined182206182282(0,react_jsx_runtime.jsxs)undefined182397182471(0,react_jsx_runtime.jsx)undefined182721182797(0,react_jsx_runtime.jsxs)undefined182894182970(0,react_jsx_runtime.jsxs)undefined183333183407(0,react_jsx_runtime.jsx)undefined184289184365(0,react_jsx_runtime.jsxs)undefined184944185018(0,react_jsx_runtime.jsx)undefined185656185730(0,react_jsx_runtime.jsx)undefined186139186213(0,react_jsx_runtime.jsx)undefined186656186732(0,react_jsx_runtime.jsxs)undefined186872186946(0,react_jsx_runtime.jsx)undefined187292187366(0,react_jsx_runtime.jsx)undefined187778187852(0,react_jsx_runtime.jsx)undefined187952188026(0,react_jsx_runtime.jsx)undefined188355188429(0,react_jsx_runtime.jsx)undefined188431188508ErrorBoundaryundefined188587188661(0,react_jsx_runtime.jsx)undefined188852188926(0,react_jsx_runtime.jsx)undefined188928189005ErrorBoundaryundefined189084189158(0,react_jsx_runtime.jsx)undefined189570189644(0,react_jsx_runtime.jsx)undefined189646189723ErrorBoundaryundefined189799189873(0,react_jsx_runtime.jsx)undefined190183190257(0,react_jsx_runtime.jsx)undefined190259190336ErrorBoundaryundefined190418190492(0,react_jsx_runtime.jsx)undefined190807190881(0,react_jsx_runtime.jsx)undefined190883190960ErrorBoundaryundefined191035191109(0,react_jsx_runtime.jsx)undefined191418191492(0,react_jsx_runtime.jsx)undefined191494191571ErrorBoundaryundefined191654191728(0,react_jsx_runtime.jsx)undefined192046192120(0,react_jsx_runtime.jsx)undefined192122192199ErrorBoundaryundefined192275192349(0,react_jsx_runtime.jsx)undefined192573192647(0,react_jsx_runtime.jsx)undefined193032193106(0,react_jsx_runtime.jsx)undefined193598193672(0,react_jsx_runtime.jsx)undefined˛õ˙˙`(‘react_jsx_runtimeĄreact_jsx_runtime_namespaceObject™react_jsx_runtime_defaultūô˙˙•react_namespaceObjectreact_defaultŠnavigationŠapi_clienty˙˙˙ErrorBoundary_namespaceObjectö˙˙ö˙˙ö˙˙ö˙˙ö˙˙ö˙˙ųõ˙˙úõ˙˙ûõ˙˙üõ˙˙ũõ˙˙ūõ˙˙˙õ˙˙ö˙˙ö˙˙ö˙˙ö˙˙ö˙˙ö˙˙ö˙˙ö˙˙ö˙˙ ö˙˙ ö˙˙ ö˙˙ ö˙˙ ö˙˙ö˙˙ö˙˙”page_namespaceObjectŧõ˙˙•__webpack_require__.d•__webpack_require__.r“__webpack_require__ %Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€`=Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourced(() => { var exports = {}; exports.id = 5105; exports.ids = [5105]; exports.modules = { /***/ 261: Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource 'Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; Hmodule.exports = require("next/dist/shared/lib/router/utils/app-paths");  /***/ }) €†buffer†source„size„maps„hashv/***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/app-paths"); /***/ }) €”{"finalSource":true}ƒmap‹bufferedMap ConcatSourceRawSource$/***/ ((module) => { "use strict";  RawSourceHmodule.exports = require("next/dist/shared/lib/router/utils/app-paths");ū /***/ }), /***/ 846:  3Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; Tmodule.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");  /***/ }) î‚/***/ ((module) => { "use strict"; module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js"); /***/ }) īō ķôõTmodule.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");ôö, /***/ 1025:  @Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; amodule.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js");  /***/ }) å/***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js"); /***/ }) æé ęëėamodule.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js");ëí, /***/ 1135:  4Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource/***/ (() => { Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource €†buffer†source„size„maps„hash €”{"finalSource":true}ƒmap‹bufferedMap ReplaceSourceRawSource˙ /***/ }) Ü/***/ (() => { /***/ }) Ũā á/***/ (() => { ReplaceSourceRawSource˙āâ, /***/ 1459:  4Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource/***/ (() => { Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource €†buffer†source„size„maps„hash €”{"finalSource":true}ƒmap‹bufferedMap ReplaceSourceRawSource˙ /***/ }) Ņõ ĶÖ ×ö÷øøŲÛ, /***/ 1619:  Č Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceV/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource Í Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceK import(/* webpackMode: "eager" */ "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\\client\\components\\builtin\\global-error.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-page.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-segment.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\http-access-fallback\\error-boundary.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\layout-router.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\metadata\\async-metadata.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\render-from-template-context.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\framework\\boundary-components.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\metadata\\generate\\icon-mark.js");  P   !&#(05AFEJH åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3597, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6893, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9748, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6060, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7184, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9576, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3041, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1384, 23))€†buffer†source„size„maps„hash¯Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3597, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6893, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9748, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6060, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7184, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9576, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3041, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1384, 23)); €”{"finalSource":true}ƒmap‹bufferedMap ReplaceSourceRawSourceK import(/* webpackMode: "eager" */ "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\\client\\components\\builtin\\global-error.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-page.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-segment.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\http-access-fallback\\error-boundary.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\layout-router.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\metadata\\async-metadata.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\render-from-template-context.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\framework\\boundary-components.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\metadata\\generate\\icon-mark.js"); 0261Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23))undefined266517Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3597, 23))undefined522776Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6893, 23))undefined7811057Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9748, 23))undefined10621315Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6060, 23))undefined13201584Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7184, 23))undefined15891857Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9576, 23))undefined18622117Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3041, 23))undefined21222376Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1384, 23))undefined /***/ }) Ę/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3597, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6893, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9748, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6060, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7184, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9576, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3041, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1384, 23)); /***/ }) ËÎ ĪV/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { îK import(/* webpackMode: "eager" */ "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\\client\\components\\builtin\\global-error.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-page.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-segment.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\http-access-fallback\\error-boundary.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\layout-router.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\metadata\\async-metadata.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\render-from-template-context.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\framework\\boundary-components.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\metadata\\generate\\icon-mark.js"); 0261Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23))undefined266517Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3597, 23))undefined522776Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6893, 23))undefined7811057Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9748, 23))undefined10621315Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6060, 23))undefined13201584Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7184, 23))undefined15891857Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9576, 23))undefined18622117Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3041, 23))undefined21222376Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1384, 23))undefinedÎĐ, /***/ 1662:  YĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource Ģ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 */ RootLayout), /* harmony export */ metadata: () => (/* binding */ metadata) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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 _globals_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1135); /* harmony import */ var _globals_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_globals_css__WEBPACK_IMPORTED_MODULE_1__); Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource¨import { jsx as _jsx } from "react/jsx-runtime"; import "./globals.css"; export const metadata = { title: "COSMIC AI-Risk SaaS", description: "Commercial multi-tenant COSMIC AI-Risk governance platform" }; export default function RootLayout({ children }) { return /*#__PURE__*/ _jsx("html", { lang: "en", children: /*#__PURE__*/ _jsx("body", { children: children }) }); } d/1GIOEÖä"%eh€€€€ļ(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)˙€†buffer†source„size„maps„hashÁ__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ RootLayout), /* harmony export */ metadata: () => (/* binding */ metadata) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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 _globals_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1135); /* harmony import */ var _globals_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_globals_css__WEBPACK_IMPORTED_MODULE_1__); const metadata = { title: "COSMIC AI-Risk SaaS", description: "Commercial multi-tenant COSMIC AI-Risk governance platform" }; function RootLayout({ children }) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("html", { lang: "en", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("body", { children: children }) }); } €”{"finalSource":true}ƒmap‹bufferedMap ConcatSourceRawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ RootLayout), /* harmony export */ metadata: () => (/* binding */ metadata) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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 _globals_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1135); /* harmony import */ var _globals_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_globals_css__WEBPACK_IMPORTED_MODULE_1__); ReplaceSourceRawSource¨import { jsx as _jsx } from "react/jsx-runtime"; import "./globals.css"; export const metadata = { title: "COSMIC AI-Risk SaaS", description: "Commercial multi-tenant COSMIC AI-Risk governance platform" }; export default function RootLayout({ children }) { return /*#__PURE__*/ _jsx("html", { lang: "en", children: /*#__PURE__*/ _jsx("body", { children: children }) }); } ŋ047undefined4971undefined7379undefined214228undefined290293(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined357360(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined /***/ }) ŋ*/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ RootLayout), /* harmony export */ metadata: () => (/* binding */ metadata) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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 _globals_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1135); /* harmony import */ var _globals_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_globals_css__WEBPACK_IMPORTED_MODULE_1__); const metadata = { title: "COSMIC AI-Risk SaaS", description: "Commercial multi-tenant COSMIC AI-Risk governance platform" }; function RootLayout({ children }) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("html", { lang: "en", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("body", { children: children }) }); } /***/ }) Āà  Ä_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ã__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ RootLayout), /* harmony export */ metadata: () => (/* binding */ metadata) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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 _globals_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1135); /* harmony import */ var _globals_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_globals_css__WEBPACK_IMPORTED_MODULE_1__); â¨import { jsx as _jsx } from "react/jsx-runtime"; import "./globals.css"; export const metadata = { title: "COSMIC AI-Risk SaaS", description: "Commercial multi-tenant COSMIC AI-Risk governance platform" }; export default function RootLayout({ children }) { return /*#__PURE__*/ _jsx("html", { lang: "en", children: /*#__PURE__*/ _jsx("body", { children: children }) }); } ŋ047undefined4971undefined7379undefined214228undefined290293(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined357360(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefinedÂÄ, /***/ 2378:  VĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource ĖĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourcey/* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1330); /* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useRouter")) __webpack_require__.d(__webpack_exports__, { useRouter: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useRouter; } }); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useSearchParams")) __webpack_require__.d(__webpack_exports__, { useSearchParams: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useSearchParams; } }); Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceXexport * from '../client/components/navigation'; //# sourceMappingURL=navigation.js.map `/€€†buffer†source„size„maps„hashĄ/* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1330); /* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useRouter")) __webpack_require__.d(__webpack_exports__, { useRouter: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useRouter; } }); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useSearchParams")) __webpack_require__.d(__webpack_exports__, { useSearchParams: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useSearchParams; } }); //# sourceMappingURL=navigation.js.map €”{"finalSource":true}ƒmap‹bufferedMap ConcatSourceRawSourcey/* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1330); /* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useRouter")) __webpack_require__.d(__webpack_exports__, { useRouter: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useRouter; } }); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useSearchParams")) __webpack_require__.d(__webpack_exports__, { useSearchParams: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useSearchParams; } }); ReplaceSourceRawSourceXexport * from '../client/components/navigation'; //# sourceMappingURL=navigation.js.map 047undefined /***/ }) ŗ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1330); /* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useRouter")) __webpack_require__.d(__webpack_exports__, { useRouter: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useRouter; } }); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useSearchParams")) __webpack_require__.d(__webpack_exports__, { useSearchParams: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useSearchParams; } }); //# sourceMappingURL=navigation.js.map /***/ }) ´ˇ  ¸ô¸y/* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1330); /* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useRouter")) __webpack_require__.d(__webpack_exports__, { useRouter: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useRouter; } }); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useSearchParams")) __webpack_require__.d(__webpack_exports__, { useSearchParams: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useSearchParams; } }); ×Xexport * from '../client/components/navigation'; //# sourceMappingURL=navigation.js.map 047undefinedˇš, /***/ 3033:  ;Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; \module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");  /***/ }) ¨Š/***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js"); /***/ }) ŠŦ ­Ž¯\module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");ް, /***/ 3295:  <Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; ]module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js");  /***/ }) Ÿ‹/***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js"); /***/ })  Ŗ ¤ĨĻ]module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js");Ĩ§, /***/ 3676:  ­Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceV/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceüimport(/* webpackMode: "eager", webpackExports: ["default"] */ "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\\components\\AppShell.jsx"); @ųßPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 4744))€†buffer†source„size„maps„hashaPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 4744)); €”{"finalSource":true}ƒmap‹bufferedMap ReplaceSourceRawSourceüimport(/* webpackMode: "eager", webpackExports: ["default"] */ "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\\components\\AppShell.jsx"); l0249Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 4744))undefined /***/ }) –Á/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 4744)); /***/ }) —š ›Ėģüimport(/* webpackMode: "eager", webpackExports: ["default"] */ "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\\components\\AppShell.jsx"); l0249Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 4744))undefined›, /***/ 4194:  ˙Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource WĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FH: () => (/* binding */ api), /* harmony export */ Ht: () => (/* binding */ getSession), /* harmony export */ ri: () => (/* binding */ logout) /* harmony export */ }); Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSource<const BASE = ''; async function request(method, path, body) { const opts = { method, headers: { 'Content-Type': 'application/json' } }; if (body) opts.body = JSON.stringify(body); const res = await fetch(`${BASE}${path}`, opts); const data = res.headers.get('content-type')?.includes('application/json') ? await res.json() : await res.text(); if (!res.ok) throw new Error(data?.error || data?.message || `Request failed (${res.status})`); return data; } export const api = { get: (path)=>request('GET', path), post: (path, body)=>request('POST', path, body), put: (path, body)=>request('PUT', path, body), patch: (path, body)=>request('PATCH', path, body), del: (path)=>request('DELETE', path) }; export async function getSession() { try { const data = await api.get('/api/auth/session'); return data.user || data.actor || null; } catch { return null; } } export async function logout() { await api.post('/api/auth/logout'); window.location.href = '/'; } E  Ņ×€€€€†buffer†source„size„maps„hash-/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FH: () => (/* binding */ api), /* harmony export */ Ht: () => (/* binding */ getSession), /* harmony export */ ri: () => (/* binding */ logout) /* harmony export */ }); const BASE = ''; async function request(method, path, body) { const opts = { method, headers: { 'Content-Type': 'application/json' } }; if (body) opts.body = JSON.stringify(body); const res = await fetch(`${BASE}${path}`, opts); const data = res.headers.get('content-type')?.includes('application/json') ? await res.json() : await res.text(); if (!res.ok) throw new Error(data?.error || data?.message || `Request failed (${res.status})`); return data; } const api = { get: (path)=>request('GET', path), post: (path, body)=>request('POST', path, body), put: (path, body)=>request('PUT', path, body), patch: (path, body)=>request('PATCH', path, body), del: (path)=>request('DELETE', path) }; async function getSession() { try { const data = await api.get('/api/auth/session'); return data.user || data.actor || null; } catch { return null; } } async function logout() { await api.post('/api/auth/logout'); window.location.href = '/'; } €”{"finalSource":true}ƒmap‹bufferedMap ConcatSourceRawSource/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FH: () => (/* binding */ api), /* harmony export */ Ht: () => (/* binding */ getSession), /* harmony export */ ri: () => (/* binding */ logout) /* harmony export */ }); ReplaceSourceRawSource<const BASE = ''; async function request(method, path, body) { const opts = { method, headers: { 'Content-Type': 'application/json' } }; if (body) opts.body = JSON.stringify(body); const res = await fetch(`${BASE}${path}`, opts); const data = res.headers.get('content-type')?.includes('application/json') ? await res.json() : await res.text(); if (!res.ok) throw new Error(data?.error || data?.message || `Request failed (${res.status})`); return data; } export const api = { get: (path)=>request('GET', path), post: (path, body)=>request('POST', path, body), put: (path, body)=>request('PUT', path, body), patch: (path, body)=>request('PATCH', path, body), del: (path)=>request('DELETE', path) }; export async function getSession() { try { const data = await api.get('/api/auth/session'); return data.user || data.actor || null; } catch { return null; } } export async function logout() { await api.post('/api/auth/logout'); window.location.href = '/'; } -518524undefined781787undefined977983undefined /***/ }) Œ–/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FH: () => (/* binding */ api), /* harmony export */ Ht: () => (/* binding */ getSession), /* harmony export */ ri: () => (/* binding */ logout) /* harmony export */ }); const BASE = ''; async function request(method, path, body) { const opts = { method, headers: { 'Content-Type': 'application/json' } }; if (body) opts.body = JSON.stringify(body); const res = await fetch(`${BASE}${path}`, opts); const data = res.headers.get('content-type')?.includes('application/json') ? await res.json() : await res.text(); if (!res.ok) throw new Error(data?.error || data?.message || `Request failed (${res.status})`); return data; } const api = { get: (path)=>request('GET', path), post: (path, body)=>request('POST', path, body), put: (path, body)=>request('PUT', path, body), patch: (path, body)=>request('PATCH', path, body), del: (path)=>request('DELETE', path) }; async function getSession() { try { const data = await api.get('/api/auth/session'); return data.user || data.actor || null; } catch { return null; } } async function logout() { await api.post('/api/auth/logout'); window.location.href = '/'; } /***/ })   ‘Í‘/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FH: () => (/* binding */ api), /* harmony export */ Ht: () => (/* binding */ getSession), /* harmony export */ ri: () => (/* binding */ logout) /* harmony export */ }); °<const BASE = ''; async function request(method, path, body) { const opts = { method, headers: { 'Content-Type': 'application/json' } }; if (body) opts.body = JSON.stringify(body); const res = await fetch(`${BASE}${path}`, opts); const data = res.headers.get('content-type')?.includes('application/json') ? await res.json() : await res.text(); if (!res.ok) throw new Error(data?.error || data?.message || `Request failed (${res.status})`); return data; } export const api = { get: (path)=>request('GET', path), post: (path, body)=>request('POST', path, body), put: (path, body)=>request('PUT', path, body), patch: (path, body)=>request('PATCH', path, body), del: (path)=>request('DELETE', path) }; export async function getSession() { try { const data = await api.get('/api/auth/session'); return data.user || data.actor || null; } catch { return null; } } export async function logout() { await api.post('/api/auth/logout'); window.location.href = '/'; } -518524undefined781787undefined977983undefined’, /***/ 4744:  YĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource îĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceÕ/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceR// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"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\\\\components\\\\AppShell.jsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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\\components\\AppShell.jsx", "default", ); `=G†ˆ–ˆ–—­P „Š@€Á/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (€Ø(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)‚);€†buffer†source„size„maps„hashQ/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); // This file is generated by the Webpack next-flight-loader. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)( function() { throw new Error("Attempted to call the default export of \"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\\\\components\\\\AppShell.jsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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\\components\\AppShell.jsx", "default", )); €”{"finalSource":true}ƒmap‹bufferedMap ConcatSourceRawSourceÕ/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); ReplaceSourceRawSourceR// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"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\\\\components\\\\AppShell.jsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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\\components\\AppShell.jsx", "default", ); į61134undefined136150/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined136150undefined151173(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)undefined848848.5);undefined /***/ }) ē/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); // This file is generated by the Webpack next-flight-loader. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)( function() { throw new Error("Attempted to call the default export of \"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\\\\components\\\\AppShell.jsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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\\components\\AppShell.jsx", "default", )); /***/ }) ‚…  †Â†Õ/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); ĨR// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"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\\\\components\\\\AppShell.jsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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\\components\\AppShell.jsx", "default", ); į61134undefined136150/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined136150undefined151173(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)undefined848848.5);undefined…‡, /***/ 5498:  sĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceV/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource ãĢwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceßimport(/* webpackMode: "eager" */ "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"); @ÜßPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9672))€†buffer†source„size„maps„hashaPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9672)); €”{"finalSource":true}ƒmap‹bufferedMap ReplaceSourceRawSourceßimport(/* webpackMode: "eager" */ "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"); l0220Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9672))undefined /***/ }) v˙˙˙Á/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9672)); /***/ }) w˙˙˙z˙˙˙ {˙˙˙Ŧ›ßimport(/* webpackMode: "eager" */ "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"); l0220Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9672))undefined{˙˙˙}˙˙˙, /***/ 5883:  4Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource/***/ (() => { Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource €†buffer†source„size„maps„hash €”{"finalSource":true}ƒmap‹bufferedMap ReplaceSourceRawSource˙ /***/ }) l˙˙˙ n˙˙˙q˙˙˙ r˙˙˙‘’““t˙˙˙v˙˙˙, /***/ 6114:  sĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceV/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource ãĢwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceßimport(/* webpackMode: "eager" */ "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"); @ÜßPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610))€†buffer†source„size„maps„hashaPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610)); €”{"finalSource":true}ƒmap‹bufferedMap ReplaceSourceRawSourceßimport(/* webpackMode: "eager" */ "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"); l0220Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610))undefined /***/ }) e˙˙˙Á/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610)); /***/ }) f˙˙˙i˙˙˙ j˙˙˙›Šīl0220Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610))undefinedk˙˙˙m˙˙˙, /***/ 6439:  +Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; Lmodule.exports = require("next/dist/shared/lib/no-fallback-error.external");  /***/ }) \˙˙˙z/***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/no-fallback-error.external"); /***/ }) ]˙˙˙`˙˙˙ a˙˙˙b˙˙˙c˙˙˙Lmodule.exports = require("next/dist/shared/lib/no-fallback-error.external");b˙˙˙d˙˙˙, /***/ 6713:  $Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; Emodule.exports = require("next/dist/shared/lib/router/utils/is-bot");  /***/ }) S˙˙˙s/***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/is-bot"); /***/ }) T˙˙˙W˙˙˙ X˙˙˙Y˙˙˙Z˙˙˙Emodule.exports = require("next/dist/shared/lib/router/utils/is-bot");Y˙˙˙[˙˙˙, /***/ 7228:  ­Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceV/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceüimport(/* webpackMode: "eager", webpackExports: ["default"] */ "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\\components\\AppShell.jsx"); @ųßPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8698))€†buffer†source„size„maps„hashaPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8698)); €”{"finalSource":true}ƒmap‹bufferedMap ReplaceSourceRawSourceüimport(/* webpackMode: "eager", webpackExports: ["default"] */ "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\\components\\AppShell.jsx"); l0249Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8698))undefined /***/ }) J˙˙˙Á/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8698)); /***/ }) K˙˙˙N˙˙˙ O˙˙˙€o˙˙˙´l0249Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8698))undefinedP˙˙˙R˙˙˙, /***/ 7275:  ļ Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceV/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource Į Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceK import(/* webpackMode: "eager" */ "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\\client\\components\\builtin\\global-error.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-page.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-segment.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\http-access-fallback\\error-boundary.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\layout-router.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\metadata\\async-metadata.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\render-from-template-context.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\framework\\boundary-components.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\metadata\\generate\\icon-mark.js");  P   !&#(05AFEJH åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 4160, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1603, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8495, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 5170, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7526, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8922, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9234, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2263, 23))ßPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2146))€†buffer†source„size„maps„hashŠPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 4160, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1603, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8495, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 5170, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7526, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8922, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9234, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2263, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2146)); €”{"finalSource":true}ƒmap‹bufferedMap ReplaceSourceRawSourceK import(/* webpackMode: "eager" */ "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\\client\\components\\builtin\\global-error.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-page.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-segment.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\http-access-fallback\\error-boundary.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\layout-router.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\metadata\\async-metadata.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\render-from-template-context.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\framework\\boundary-components.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\metadata\\generate\\icon-mark.js"); 0261Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 4160, 23))undefined266517Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1603, 23))undefined522776Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8495, 23))undefined7811057Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 5170, 23))undefined10621315Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7526, 23))undefined13201584Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8922, 23))undefined15891857Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9234, 23))undefined18622117Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2263, 23))undefined21222376Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2146))undefined /***/ }) A˙˙˙ /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 4160, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1603, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8495, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 5170, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7526, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8922, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9234, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2263, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2146)); /***/ }) B˙˙˙E˙˙˙ F˙˙˙w˙˙˙f˙˙˙x˙˙˙0261Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 4160, 23))undefined266517Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1603, 23))undefined522776Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8495, 23))undefined7811057Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 5170, 23))undefined10621315Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7526, 23))undefined13201584Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8922, 23))undefined15891857Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9234, 23))undefined18622117Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2263, 23))undefined21222376Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2146))undefinedG˙˙˙I˙˙˙, /***/ 7513:   Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource *Ģ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 */ DashboardLayout) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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__(4515); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_AppShell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4744); Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceimport { jsx as _jsx } from "react/jsx-runtime"; import { Suspense } from 'react'; import AppShell from '../../components/AppShell'; export default function DashboardLayout({ children }) { return /*#__PURE__*/ _jsx(Suspense, { fallback: /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }), children: /*#__PURE__*/ _jsx(AppShell, { children: children }) }); }  c/1QSNƒ…“ÖŲÛâ adĪŌÔÛ€€€€ļ(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)Ģreact__WEBPACK_IMPORTED_MODULE_1__.Suspenseūūūŧ_components_AppShell__WEBPACK_IMPORTED_MODULE_2__["default"]€†buffer†source„size„maps„hashË__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ DashboardLayout) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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__(4515); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_AppShell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4744); function DashboardLayout({ children }) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, { fallback: /*#__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" }) }), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_AppShell__WEBPACK_IMPORTED_MODULE_2__["default"], { children: children }) }); } €”{"finalSource":true}ƒmap‹bufferedMap ConcatSourceRawSource)__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ DashboardLayout) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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__(4515); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_AppShell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4744); ReplaceSourceRawSourceimport { jsx as _jsx } from "react/jsx-runtime"; import { Suspense } from 'react'; import AppShell from '../../components/AppShell'; export default function DashboardLayout({ children }) { return /*#__PURE__*/ _jsx(Suspense, { fallback: /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }), children: /*#__PURE__*/ _jsx(AppShell, { children: children }) }); } Ī047undefined4981undefined83131undefined133147undefined214217(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined219226react__WEBPACK_IMPORTED_MODULE_1__.Suspenseundefined263266(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined353356(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined463466(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined468475_components_AppShell__WEBPACK_IMPORTED_MODULE_2__["default"]undefined /***/ }) 8˙˙˙4/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ DashboardLayout) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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__(4515); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_AppShell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4744); function DashboardLayout({ children }) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, { fallback: /*#__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" }) }), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_AppShell__WEBPACK_IMPORTED_MODULE_2__["default"], { children: children }) }); } /***/ }) 9˙˙˙<˙˙˙  =˙˙˙y˙˙˙=˙˙˙)__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ DashboardLayout) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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__(4515); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_AppShell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4744); \˙˙˙import { jsx as _jsx } from "react/jsx-runtime"; import { Suspense } from 'react'; import AppShell from '../../components/AppShell'; export default function DashboardLayout({ children }) { return /*#__PURE__*/ _jsx(Suspense, { fallback: /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }), children: /*#__PURE__*/ _jsx(AppShell, { children: children }) }); } Ī047undefined4981undefined83131undefined133147undefined214217(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined219226react__WEBPACK_IMPORTED_MODULE_1__.Suspenseundefined263266(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined353356(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined463466(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined468475_components_AppShell__WEBPACK_IMPORTED_MODULE_2__["default"]undefined<˙˙˙>˙˙˙, /***/ 8354:  Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; !module.exports = require("util");  /***/ }) -˙˙˙O/***/ ((module) => { "use strict"; module.exports = require("util"); /***/ }) .˙˙˙1˙˙˙ 2˙˙˙3˙˙˙4˙˙˙!module.exports = require("util");3˙˙˙5˙˙˙, /***/ 8698:  ĻQĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceT/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ AppShell) /* 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/registerExternalSerializerwebpack-sources/ReplaceSource_/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useRouter, useSearchParams } from 'next/navigation'; import { getSession, logout } from '../lib/api-client'; const NAV_ITEMS = [ { label: 'Overview', tab: 'Overview', icon: '◇' }, { label: 'Risks', tab: 'Risks', icon: '⚠' }, { label: 'Mitigations', tab: 'Mitigations', icon: '●' }, { label: 'Gate', tab: 'Gate', icon: '⊞' }, { label: 'Integrations', tab: 'Integrations', icon: '⇆' } ]; export default function AppShell({ children }) { const [user, setUser] = useState(null); const [sidebarOpen, setSidebarOpen] = useState(false); const [loading, setLoading] = useState(true); const router = useRouter(); const searchParams = useSearchParams(); const currentTab = searchParams.get('tab') || 'Overview'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ getSession().then((u)=>{ if (!u) { router.replace('/login'); return; } setUser(u); setLoading(false); }); }, [ router ]); if (loading) { return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); } return /*#__PURE__*/ _jsxs("div", { className: "app-shell", children: [ /*#__PURE__*/ _jsx("button", { className: "sidebar-toggle", onClick: ()=>setSidebarOpen(!sidebarOpen), children: sidebarOpen ? '✕' : '☰' }), /*#__PURE__*/ _jsxs("aside", { className: `sidebar ${sidebarOpen ? 'open' : ''}`, children: [ /*#__PURE__*/ _jsx("div", { className: "sidebar-brand", children: "COSMIC" }), /*#__PURE__*/ _jsxs("div", { className: "sidebar-user", children: [ /*#__PURE__*/ _jsx("div", { className: "sidebar-user-name", children: user.displayName }), /*#__PURE__*/ _jsx("div", { className: "sidebar-user-email", children: user.email }) ] }), /*#__PURE__*/ _jsx("nav", { className: "sidebar-nav", children: NAV_ITEMS.map((item)=>{ const active = currentTab === item.tab; return /*#__PURE__*/ _jsxs("a", { href: `/dashboard?tab=${item.tab}`, className: `sidebar-link ${active ? 'active' : ''}`, onClick: (e)=>{ e.preventDefault(); setSidebarOpen(false); router.push(`/dashboard?tab=${item.tab}`); }, children: [ /*#__PURE__*/ _jsx("span", { className: "sidebar-icon", children: item.icon }), item.label ] }, item.tab); }) }), /*#__PURE__*/ _jsx("div", { className: "sidebar-footer", children: /*#__PURE__*/ _jsx("button", { className: "sidebar-logout", onClick: logout, children: "Sign out" }) }) ] }), sidebarOpen && /*#__PURE__*/ _jsx("div", { className: "sidebar-overlay", onClick: ()=>setSidebarOpen(false) }), /*#__PURE__*/ _jsx("main", { className: "app-main", children: children }) ] }); } c={}_¨ĒæčÕã")\c–˛ēØæ`hxŠäįQUŽąƒ‡VŧĀL O  "    !¤§†‹<?ÕØ€€€€€¯(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)˙˙ē(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)Ā(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)°(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)Å(0,_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .getSession */ .Ht)ļ(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)˙ˇ(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)ū˙ū˙ūūū˙ūūūŊ_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .logout */ .riũũ€†buffer†source„size„maps„hashU/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ AppShell) /* 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 NAV_ITEMS = [ { label: 'Overview', tab: 'Overview', icon: '◇' }, { label: 'Risks', tab: 'Risks', icon: '⚠' }, { label: 'Mitigations', tab: 'Mitigations', icon: '●' }, { label: 'Gate', tab: 'Gate', icon: '⊞' }, { label: 'Integrations', tab: 'Integrations', icon: '⇆' } ]; function AppShell({ children }) { const [user, setUser] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [sidebarOpen, setSidebarOpen] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true); const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const searchParams = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(); const currentTab = searchParams.get('tab') || 'Overview'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ (0,_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .getSession */ .Ht)().then((u)=>{ if (!u) { router.replace('/login'); return; } setUser(u); setLoading(false); }); }, [ router ]); 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" }) }); } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "app-shell", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: "sidebar-toggle", onClick: ()=>setSidebarOpen(!sidebarOpen), children: sidebarOpen ? '✕' : '☰' }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("aside", { className: `sidebar ${sidebarOpen ? 'open' : ''}`, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-brand", children: "COSMIC" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "sidebar-user", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-user-name", children: user.displayName }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-user-email", children: user.email }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("nav", { className: "sidebar-nav", children: NAV_ITEMS.map((item)=>{ const active = currentTab === item.tab; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("a", { href: `/dashboard?tab=${item.tab}`, className: `sidebar-link ${active ? 'active' : ''}`, onClick: (e)=>{ e.preventDefault(); setSidebarOpen(false); router.push(`/dashboard?tab=${item.tab}`); }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "sidebar-icon", children: item.icon }), item.label ] }, item.tab); }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-footer", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: "sidebar-logout", onClick: _lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .logout */ .ri, children: "Sign out" }) }) ] }), sidebarOpen && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-overlay", onClick: ()=>setSidebarOpen(false) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("main", { className: "app-main", children: children }) ] }); } €”{"finalSource":true}ƒmap‹bufferedMap ConcatSourceRawSourceT/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ AppShell) /* 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 } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useRouter, useSearchParams } from 'next/navigation'; import { getSession, logout } from '../lib/api-client'; const NAV_ITEMS = [ { label: 'Overview', tab: 'Overview', icon: '◇' }, { label: 'Risks', tab: 'Risks', icon: '⚠' }, { label: 'Mitigations', tab: 'Mitigations', icon: '●' }, { label: 'Gate', tab: 'Gate', icon: '⊞' }, { label: 'Integrations', tab: 'Integrations', icon: '⇆' } ]; export default function AppShell({ children }) { const [user, setUser] = useState(null); const [sidebarOpen, setSidebarOpen] = useState(false); const [loading, setLoading] = useState(true); const router = useRouter(); const searchParams = useSearchParams(); const currentTab = searchParams.get('tab') || 'Overview'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ getSession().then((u)=>{ if (!u) { router.replace('/login'); return; } setUser(u); setLoading(false); }); }, [ router ]); if (loading) { return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); } return /*#__PURE__*/ _jsxs("div", { className: "app-shell", children: [ /*#__PURE__*/ _jsx("button", { className: "sidebar-toggle", onClick: ()=>setSidebarOpen(!sidebarOpen), children: sidebarOpen ? '✕' : '☰' }), /*#__PURE__*/ _jsxs("aside", { className: `sidebar ${sidebarOpen ? 'open' : ''}`, children: [ /*#__PURE__*/ _jsx("div", { className: "sidebar-brand", children: "COSMIC" }), /*#__PURE__*/ _jsxs("div", { className: "sidebar-user", children: [ /*#__PURE__*/ _jsx("div", { className: "sidebar-user-name", children: user.displayName }), /*#__PURE__*/ _jsx("div", { className: "sidebar-user-email", children: user.email }) ] }), /*#__PURE__*/ _jsx("nav", { className: "sidebar-nav", children: NAV_ITEMS.map((item)=>{ const active = currentTab === item.tab; return /*#__PURE__*/ _jsxs("a", { href: `/dashboard?tab=${item.tab}`, className: `sidebar-link ${active ? 'active' : ''}`, onClick: (e)=>{ e.preventDefault(); setSidebarOpen(false); router.push(`/dashboard?tab=${item.tab}`); }, children: [ /*#__PURE__*/ _jsx("span", { className: "sidebar-icon", children: item.icon }), item.label ] }, item.tab); }) }), /*#__PURE__*/ _jsx("div", { className: "sidebar-footer", children: /*#__PURE__*/ _jsx("button", { className: "sidebar-logout", onClick: logout, children: "Sign out" }) }) ] }), sidebarOpen && /*#__PURE__*/ _jsx("div", { className: "sidebar-overlay", onClick: ()=>setSidebarOpen(false) }), /*#__PURE__*/ _jsx("main", { className: "app-main", children: children }) ] }); } õ61123undefined125168undefined170230undefined232286undefined725739undefined802809(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined860867(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined911918(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined946954(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined984998(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)undefined11201128(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined11441153(0,_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .getSession */ .Ht)undefined14181421(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined15081511(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined16171621(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined17101713(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined19231927(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined20692072(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined22362240(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined23802383(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined25912594(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined28382841(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined30773081(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined36143617(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined40044007(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined41194122(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined42304235_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .logout */ .riundefined44124415(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined45654568(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined /***/ }) $˙˙˙ž/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ AppShell) /* 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 NAV_ITEMS = [ { label: 'Overview', tab: 'Overview', icon: '◇' }, { label: 'Risks', tab: 'Risks', icon: '⚠' }, { label: 'Mitigations', tab: 'Mitigations', icon: '●' }, { label: 'Gate', tab: 'Gate', icon: '⊞' }, { label: 'Integrations', tab: 'Integrations', icon: '⇆' } ]; function AppShell({ children }) { const [user, setUser] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [sidebarOpen, setSidebarOpen] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true); const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const searchParams = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(); const currentTab = searchParams.get('tab') || 'Overview'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ (0,_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .getSession */ .Ht)().then((u)=>{ if (!u) { router.replace('/login'); return; } setUser(u); setLoading(false); }); }, [ router ]); 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" }) }); } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "app-shell", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: "sidebar-toggle", onClick: ()=>setSidebarOpen(!sidebarOpen), children: sidebarOpen ? '✕' : '☰' }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("aside", { className: `sidebar ${sidebarOpen ? 'open' : ''}`, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-brand", children: "COSMIC" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "sidebar-user", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-user-name", children: user.displayName }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-user-email", children: user.email }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("nav", { className: "sidebar-nav", children: NAV_ITEMS.map((item)=>{ const active = currentTab === item.tab; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("a", { href: `/dashboard?tab=${item.tab}`, className: `sidebar-link ${active ? 'active' : ''}`, onClick: (e)=>{ e.preventDefault(); setSidebarOpen(false); router.push(`/dashboard?tab=${item.tab}`); }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "sidebar-icon", children: item.icon }), item.label ] }, item.tab); }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-footer", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: "sidebar-logout", onClick: _lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .logout */ .ri, children: "Sign out" }) }) ] }), sidebarOpen && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-overlay", onClick: ()=>setSidebarOpen(false) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("main", { className: "app-main", children: children }) ] }); } /***/ }) %˙˙˙(˙˙˙  )˙˙˙e˙˙˙)˙˙˙T/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ AppShell) /* 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); H˙˙˙_/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useRouter, useSearchParams } from 'next/navigation'; import { getSession, logout } from '../lib/api-client'; const NAV_ITEMS = [ { label: 'Overview', tab: 'Overview', icon: '◇' }, { label: 'Risks', tab: 'Risks', icon: '⚠' }, { label: 'Mitigations', tab: 'Mitigations', icon: '●' }, { label: 'Gate', tab: 'Gate', icon: '⊞' }, { label: 'Integrations', tab: 'Integrations', icon: '⇆' } ]; export default function AppShell({ children }) { const [user, setUser] = useState(null); const [sidebarOpen, setSidebarOpen] = useState(false); const [loading, setLoading] = useState(true); const router = useRouter(); const searchParams = useSearchParams(); const currentTab = searchParams.get('tab') || 'Overview'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ getSession().then((u)=>{ if (!u) { router.replace('/login'); return; } setUser(u); setLoading(false); }); }, [ router ]); if (loading) { return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); } return /*#__PURE__*/ _jsxs("div", { className: "app-shell", children: [ /*#__PURE__*/ _jsx("button", { className: "sidebar-toggle", onClick: ()=>setSidebarOpen(!sidebarOpen), children: sidebarOpen ? '✕' : '☰' }), /*#__PURE__*/ _jsxs("aside", { className: `sidebar ${sidebarOpen ? 'open' : ''}`, children: [ /*#__PURE__*/ _jsx("div", { className: "sidebar-brand", children: "COSMIC" }), /*#__PURE__*/ _jsxs("div", { className: "sidebar-user", children: [ /*#__PURE__*/ _jsx("div", { className: "sidebar-user-name", children: user.displayName }), /*#__PURE__*/ _jsx("div", { className: "sidebar-user-email", children: user.email }) ] }), /*#__PURE__*/ _jsx("nav", { className: "sidebar-nav", children: NAV_ITEMS.map((item)=>{ const active = currentTab === item.tab; return /*#__PURE__*/ _jsxs("a", { href: `/dashboard?tab=${item.tab}`, className: `sidebar-link ${active ? 'active' : ''}`, onClick: (e)=>{ e.preventDefault(); setSidebarOpen(false); router.push(`/dashboard?tab=${item.tab}`); }, children: [ /*#__PURE__*/ _jsx("span", { className: "sidebar-icon", children: item.icon }), item.label ] }, item.tab); }) }), /*#__PURE__*/ _jsx("div", { className: "sidebar-footer", children: /*#__PURE__*/ _jsx("button", { className: "sidebar-logout", onClick: logout, children: "Sign out" }) }) ] }), sidebarOpen && /*#__PURE__*/ _jsx("div", { className: "sidebar-overlay", onClick: ()=>setSidebarOpen(false) }), /*#__PURE__*/ _jsx("main", { className: "app-main", children: children }) ] }); } õ61123undefined125168undefined170230undefined232286undefined725739undefined802809(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined860867(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined911918(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined946954(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined984998(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)undefined11201128(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined11441153(0,_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .getSession */ .Ht)undefined14181421(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined15081511(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined16171621(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined17101713(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined19231927(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined20692072(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined22362240(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined23802383(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined25912594(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined28382841(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined30773081(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined36143617(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined40044007(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined41194122(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined42304235_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .logout */ .riundefined44124415(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined45654568(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined(˙˙˙*˙˙˙, /***/ 9108:  Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource ģĢ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 */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9754); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9117); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6595); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2324); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9326); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8928); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(175); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4290); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2696); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2574); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2802); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7533); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5229); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2822); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(6453); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2474); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(6713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(1356); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(2685); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(6225); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(3446); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(2762); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(5742); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(6439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(1170); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(2506); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(1203); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĀËconst module0 = () => import(/* webpackMode: "eager" */ "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\\layout.jsx"); const module1 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/global-error.js"); const module2 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/not-found.js"); const module3 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module4 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const module5 = () => import(/* webpackMode: "eager" */ "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\\layout.jsx"); const page6 = () => import(/* webpackMode: "eager" */ "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"); import { AppPageRouteModule } from "next/dist/server/route-modules/app-page/module.compiled" with { 'turbopack-transition': 'next-ssr' }; import { RouteKind } from "next/dist/server/route-kind" with { 'turbopack-transition': 'next-server-utility' }; import { getRevalidateReason } from "next/dist/server/instrumentation/utils"; import { getTracer, SpanKind } from "next/dist/server/lib/trace/tracer"; import { getRequestMeta } from "next/dist/server/request-meta"; import { BaseServerSpan } from "next/dist/server/lib/trace/constants"; import { interopDefault } from "next/dist/server/app-render/interop-default"; import { stripFlightHeaders } from "next/dist/server/app-render/strip-flight-headers"; import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; import { checkIsAppPPREnabled } from "next/dist/server/lib/experimental/ppr"; import { isRSCRequestHeader } from "next/dist/server/lib/is-rsc-request"; import { getFallbackRouteParams } from "next/dist/server/request/fallback-params"; import { setReferenceManifestsSingleton } from "next/dist/server/app-render/encryption-utils"; import { isHtmlBotRequest, shouldServeStreamingMetadata } from "next/dist/server/lib/streaming-metadata"; import { createServerModuleMap } from "next/dist/server/app-render/action-utils"; import { normalizeAppPath } from "next/dist/shared/lib/router/utils/app-paths"; import { getIsPossibleServerAction } from "next/dist/server/lib/server-action-request-meta"; import { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_IS_PRERENDER_HEADER, NEXT_DID_POSTPONE_HEADER, RSC_CONTENT_TYPE_HEADER } from "next/dist/client/components/app-router-headers"; import { getBotType, isBot } from "next/dist/shared/lib/router/utils/is-bot"; import { CachedRouteKind } from "next/dist/server/response-cache"; import { FallbackMode, parseFallbackField } from "next/dist/lib/fallback"; import RenderResult from "next/dist/server/render-result"; import { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, NEXT_CACHE_TAGS_HEADER } from "next/dist/lib/constants"; import { ENCODED_TAGS } from "next/dist/server/stream-utils/encoded-tags"; import { sendRenderResult } from "next/dist/server/send-payload"; import { NoFallbackError } from "next/dist/shared/lib/no-fallback-error.external"; // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ 'dashboard', { children: ['__PAGE__', {}, { page: [page6, "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"], }] }, { 'layout': [module5, "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\\layout.jsx"], } ] }, { 'layout': [module0, "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\\layout.jsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "next/dist/client/components/builtin/not-found.js"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], } ] }.children; const pages = ["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"]; export { tree, pages }; import GlobalError from "next/dist/client/components/builtin/global-error.js" with { 'turbopack-transition': 'next-server-utility' }; export { GlobalError }; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() export const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; import * as entryBase from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; import { RedirectStatusCode } from "next/dist/client/components/redirect-status-code"; export * from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; // Create and export the route module that will be consumed. export const routeModule = new AppPageRouteModule({ definition: { kind: RouteKind.APP_PAGE, page: "/dashboard/page", pathname: "/dashboard", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '', relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '' }); export async function handler(req, res, ctx) { var _this; let srcPage = "/dashboard/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (process.env.TURBOPACK) { srcPage = srcPage.replace(/\/index$/, '') || '/'; } else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE; const initialPostponed = getRequestMeta(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = getRequestMeta(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = normalizeAppPath(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = getBotType(userAgent); const isHtmlBot = isHtmlBotRequest(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = getRequestMeta(req, 'isPrefetchRSCRequest') ?? req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = getRequestMeta(req, 'isRSCRequest') ?? isRSCRequestHeader(req.headers[RSC_HEADER]); const isPossibleServerAction = getIsPossibleServerAction(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = checkIsAppPPREnabled(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' && typeof query.__nextppronly !== 'undefined' && couldSupportPPR; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { stripFlightHeaders(req.headers); } const ComponentMod = { ...entryBase, tree, pages, GlobalError, handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = getTracer(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new NodeNextRequest(req); const nextRes = new NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (process.env.NODE_ENV === 'development') { if (nextConfig.experimental.cacheComponents && !isPrefetchRSCRequest && !context.renderOpts.isPossibleServerAction) { const warmup = await routeModule.warmup(nextReq, nextRes, context); // If the warmup is successful, we should use the resume data // cache from the warmup. if (warmup.metadata.renderResumeDataCache) { context.renderOpts.renderResumeDataCache = warmup.metadata.renderResumeDataCache; } } } return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: getRequestMeta(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: interopDefault(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: process.env.NEXT_RUNTIME === 'nodejs' ? require('path').join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : `${process.cwd()}/${routeModule.relativeProjectDir}`, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: getRequestMeta(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: getRequestMeta(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = parseFallbackField(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === FallbackMode.NOT_FOUND) { throw new NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? getFallbackRouteParams(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: CachedRouteKind.PAGES, html: RenderResult.EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && (getRequestMeta(req, 'renderFallbackShell') || isDebugFallbackShell) ? getFallbackRouteParams(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(matchedSegment, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = getRequestMeta(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: getRequestMeta(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(cachedData.rscData, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled && body.contentType === HTML_CONTENT_TYPE_HEADER) { // As we're in minimal mode, the static part would have already been // streamed first. The only part that this streams is the dynamic part // so we should FIRST stream the sentinel and THEN the dynamic part. body.unshift(createPPRBoundarySentinel()); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE) { body.push(createPPRBoundarySentinel()); } // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: getRevalidateReason({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map @‹`_éYrÆß3LŖŧšą’Ūā')giްüūSU¨Ē_öø@B“•ōô\ ^ Ž ° ū [ ]   ` b Ŗ Ĩ î đ ) + • — ā â " $ _u e{}<NˆŽķqsČĘ;z€™ĒÎÖŪ"HTZv_ŠÍ_†Ļŗ(Ģ´Øįx … ŗ Í €!!§!¸!Æ!Ī!÷!"Ã"Ö"–#$$_$ --š.ĩ.Ž5ŋ5û566656Ļ7Ã7G8[8á8é8:#:K:Z:>;c;f;Ĩ=į?ô?3D@DWEdE3H_WH[HnHŊHđHąLžLīSüS¤UšUX[f[D`U`vaaa”aūa bģcÆc ddodzdfšfĮfÕfai_iiSlhl`rnr•r r–tŖtÜtņt0w8w˙| }U‚l‚ŒŒCQÄÛë‘’v’‹’q“€“d”o”Œ”_ĸ”2—A—˜˜#™0™đšũšcžxžįĄüĄjĸĸ¨¤š¤…ĨœĨŠ+Š/­>­ŽŽ:ŽPŽąąąî˛ŗTŗÆļŅļXˇgˇĘšåščš.ēJŋXŋôÂÃnÆ{ÆŪÆåÆåĮķĮĮČŲČßPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 1662))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7028, 23))äPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 461, 23))åPromise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2768, 23))ßPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 7513))ßPromise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610))€€€€€€€€€€€€€€€€€€€€€€€€€€€€€“__webpack_require__€€€€€įnext_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModuleÂnext_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind‡".next"0† false€…false‚{}ūÍ(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)˙Ū(0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__.normalizeAppPath)Õ(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.getBotType)Ú(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.isHtmlBotRequest)üčnext_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_ROUTER_PREFETCH_HEADERûá(0,next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__/* .isRSCRequestHeader */ .f)×next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_HEADERë(0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__.getIsPossibleServerAction)Û(0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)ô0÷æ(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.shouldServeStreamingMetadata)í(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)Änext_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__ß: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default())í(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__.setReferenceManifestsSingleton)ā(0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__.createServerModuleMap)Ė(0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)Ėnext_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequestÍnext_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponseėíĐnext_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpaníä(0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)… true (__webpack_require__(9902).join)0ęęĖnext_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERÍnext_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindË(0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.parseFallbackField)Ánext_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeĐ(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.isBot)ūūūūūŨnext_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackErrorßę(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)úĮnext_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]âūŨųånext_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_IS_PRERENDER_HEADERÄnext_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.CACHE_ONE_YEAR÷ånext_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADERõõĐ(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)ûänext_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADERūúŨŨķķķánext_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__.RedirectStatusCodeüũũųūÚÛũÕnext_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__.ENCODED_TAGSüŲÚōüíĮnext_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKindõä(0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)€†buffer†source„size„maps„hash=ō__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9754); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9117); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6595); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2324); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9326); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8928); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(175); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4290); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2696); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2574); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2802); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7533); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5229); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2822); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(6453); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2474); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(6713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(1356); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(2685); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(6225); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(3446); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(2762); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(5742); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(6439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(1170); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(2506); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(1203); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); const module0 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 1662)); const module1 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23)); const module2 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7028, 23)); const module3 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 461, 23)); const module4 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2768, 23)); const module5 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 7513)); const page6 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610)); // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ 'dashboard', { children: ['__PAGE__', {}, { page: [page6, "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"], }] }, { 'layout': [module5, "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\\layout.jsx"], } ] }, { 'layout': [module0, "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\\layout.jsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "next/dist/client/components/builtin/not-found.js"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], } ] }.children; const pages = ["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"]; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; // Create and export the route module that will be consumed. const routeModule = new next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModule({ definition: { kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, page: "/dashboard/page", pathname: "/dashboard", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: ".next" || 0, relativeProjectDir: false || '' }); async function handler(req, res, ctx) { var _this; let srcPage = "/dashboard/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (false) {} else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = false; const initialPostponed = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__.normalizeAppPath)(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.getBotType)(userAgent); const isHtmlBot = (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.isHtmlBotRequest)(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isPrefetchRSCRequest') ?? req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isRSCRequest') ?? (0,next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__/* .isRSCRequestHeader */ .f)(req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_HEADER]); const isPossibleServerAction = (0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__.getIsPossibleServerAction)(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = (0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = false && 0; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.shouldServeStreamingMetadata)(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { (0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)(req.headers); } const ComponentMod = { ...next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__, tree, pages, GlobalError: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default()), handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { (0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__.setReferenceManifestsSingleton)({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: (0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__.createServerModuleMap)({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequest(req); const nextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (false) {} return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: (0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: true ? (__webpack_require__(9902).join)(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : 0, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = (0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.parseFallbackField)(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.PRERENDER && (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.isBot)(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.NOT_FOUND) { throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.PAGES, html: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && ((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'renderFallbackShell') || isDebugFallbackShell) ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].fromStatic(matchedSegment, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__.RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].fromStatic(cachedData.rscData, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__.ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map €”{"finalSource":true}ƒmap‹bufferedMap ConcatSourceRawSourceō#__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9754); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9117); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6595); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2324); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9326); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8928); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(175); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4290); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2696); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2574); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2802); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7533); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5229); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2822); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(6453); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2474); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(6713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(1356); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(2685); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(6225); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(3446); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(2762); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(5742); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(6439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(1170); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(2506); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(1203); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); ReplaceSourceRawSourceĀËconst module0 = () => import(/* webpackMode: "eager" */ "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\\layout.jsx"); const module1 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/global-error.js"); const module2 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/not-found.js"); const module3 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module4 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const module5 = () => import(/* webpackMode: "eager" */ "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\\layout.jsx"); const page6 = () => import(/* webpackMode: "eager" */ "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"); import { AppPageRouteModule } from "next/dist/server/route-modules/app-page/module.compiled" with { 'turbopack-transition': 'next-ssr' }; import { RouteKind } from "next/dist/server/route-kind" with { 'turbopack-transition': 'next-server-utility' }; import { getRevalidateReason } from "next/dist/server/instrumentation/utils"; import { getTracer, SpanKind } from "next/dist/server/lib/trace/tracer"; import { getRequestMeta } from "next/dist/server/request-meta"; import { BaseServerSpan } from "next/dist/server/lib/trace/constants"; import { interopDefault } from "next/dist/server/app-render/interop-default"; import { stripFlightHeaders } from "next/dist/server/app-render/strip-flight-headers"; import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; import { checkIsAppPPREnabled } from "next/dist/server/lib/experimental/ppr"; import { isRSCRequestHeader } from "next/dist/server/lib/is-rsc-request"; import { getFallbackRouteParams } from "next/dist/server/request/fallback-params"; import { setReferenceManifestsSingleton } from "next/dist/server/app-render/encryption-utils"; import { isHtmlBotRequest, shouldServeStreamingMetadata } from "next/dist/server/lib/streaming-metadata"; import { createServerModuleMap } from "next/dist/server/app-render/action-utils"; import { normalizeAppPath } from "next/dist/shared/lib/router/utils/app-paths"; import { getIsPossibleServerAction } from "next/dist/server/lib/server-action-request-meta"; import { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_IS_PRERENDER_HEADER, NEXT_DID_POSTPONE_HEADER, RSC_CONTENT_TYPE_HEADER } from "next/dist/client/components/app-router-headers"; import { getBotType, isBot } from "next/dist/shared/lib/router/utils/is-bot"; import { CachedRouteKind } from "next/dist/server/response-cache"; import { FallbackMode, parseFallbackField } from "next/dist/lib/fallback"; import RenderResult from "next/dist/server/render-result"; import { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, NEXT_CACHE_TAGS_HEADER } from "next/dist/lib/constants"; import { ENCODED_TAGS } from "next/dist/server/stream-utils/encoded-tags"; import { sendRenderResult } from "next/dist/server/send-payload"; import { NoFallbackError } from "next/dist/shared/lib/no-fallback-error.external"; // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ 'dashboard', { children: ['__PAGE__', {}, { page: [page6, "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"], }] }, { 'layout': [module5, "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\\layout.jsx"], } ] }, { 'layout': [module0, "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\\layout.jsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "next/dist/client/components/builtin/not-found.js"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], } ] }.children; const pages = ["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"]; export { tree, pages }; import GlobalError from "next/dist/client/components/builtin/global-error.js" with { 'turbopack-transition': 'next-server-utility' }; export { GlobalError }; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() export const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; import * as entryBase from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; import { RedirectStatusCode } from "next/dist/client/components/redirect-status-code"; export * from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; // Create and export the route module that will be consumed. export const routeModule = new AppPageRouteModule({ definition: { kind: RouteKind.APP_PAGE, page: "/dashboard/page", pathname: "/dashboard", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '', relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '' }); export async function handler(req, res, ctx) { var _this; let srcPage = "/dashboard/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (process.env.TURBOPACK) { srcPage = srcPage.replace(/\/index$/, '') || '/'; } else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE; const initialPostponed = getRequestMeta(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = getRequestMeta(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = normalizeAppPath(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = getBotType(userAgent); const isHtmlBot = isHtmlBotRequest(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = getRequestMeta(req, 'isPrefetchRSCRequest') ?? req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = getRequestMeta(req, 'isRSCRequest') ?? isRSCRequestHeader(req.headers[RSC_HEADER]); const isPossibleServerAction = getIsPossibleServerAction(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = checkIsAppPPREnabled(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' && typeof query.__nextppronly !== 'undefined' && couldSupportPPR; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { stripFlightHeaders(req.headers); } const ComponentMod = { ...entryBase, tree, pages, GlobalError, handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = getTracer(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new NodeNextRequest(req); const nextRes = new NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (process.env.NODE_ENV === 'development') { if (nextConfig.experimental.cacheComponents && !isPrefetchRSCRequest && !context.renderOpts.isPossibleServerAction) { const warmup = await routeModule.warmup(nextReq, nextRes, context); // If the warmup is successful, we should use the resume data // cache from the warmup. if (warmup.metadata.renderResumeDataCache) { context.renderOpts.renderResumeDataCache = warmup.metadata.renderResumeDataCache; } } } return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: getRequestMeta(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: interopDefault(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: process.env.NEXT_RUNTIME === 'nodejs' ? require('path').join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : `${process.cwd()}/${routeModule.relativeProjectDir}`, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: getRequestMeta(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: getRequestMeta(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = parseFallbackField(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === FallbackMode.NOT_FOUND) { throw new NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? getFallbackRouteParams(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: CachedRouteKind.PAGES, html: RenderResult.EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && (getRequestMeta(req, 'renderFallbackShell') || isDebugFallbackShell) ? getFallbackRouteParams(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(matchedSegment, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = getRequestMeta(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: getRequestMeta(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(cachedData.rscData, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled && body.contentType === HTML_CONTENT_TYPE_HEADER) { // As we're in minimal mode, the static part would have already been // streamed first. The only part that this streams is the dynamic part // so we should FIRST stream the sentinel and THEN the dynamic part. body.unshift(createPPRBoundarySentinel()); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE) { body.push(createPPRBoundarySentinel()); } // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: getRevalidateReason({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map [&22233Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 1662))undefined258345Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23))undefined370454Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7028, 23))undefined479563Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 461, 23))undefined588675Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2768, 23))undefined700922Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 7513))undefined9451165Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610))undefined11681308undefined13101424undefined14261502undefined15041575undefined15771639undefined16411710undefined17121788undefined17901875undefined18771960undefined19622038undefined20402112undefined21142195undefined21972290undefined22922396undefined23982478undefined24802558undefined25602651undefined26532834undefined28362912undefined29142979undefined29813054undefined30563113undefined31153221undefined32233296undefined32983362undefined33643445undefined49654987undefined49895125undefined51275149undefined51805198__webpack_require__undefined52565262undefined53635489undefined54915576undefined55785691undefined57545760undefined57855802next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModuleundefined58385846next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined61106145".next"undefined615061510undefined61786216 falseundefined62286234undefined65186538falseundefined65416605{}undefined67516790falseundefined68226835(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined69266939(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined77057720(0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__.normalizeAppPath)undefined81078116(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.getBotType)undefined81528167(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.isHtmlBotRequest)undefined83128325(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined83718397next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_ROUTER_PREFETCH_HEADERundefined85768589(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined86158632(0,next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__/* .isRSCRequestHeader */ .f)undefined86468655next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_HEADERundefined86958719(0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__.getIsPossibleServerAction)undefined88998918(0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)undefined91109217 falseundefined922292360undefined1153211545(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1193011957(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.shouldServeStreamingMetadata)undefined1374213759(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)undefined1381913827next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__undefined1387813877: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default())undefined1424614275(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__.setReferenceManifestsSingleton)undefined1440714427(0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__.createServerModuleMap)undefined1456114569(0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)undefined1486914883next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequestundefined1492314938next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponseundefined1516615203falseundefined1520615781{}undefined1635916372next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined1745917472(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1775117764(0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)undefined1848318519 trueundefined1852318542(__webpack_require__(9902).join)undefined18621186720undefined1963319646(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2148721500(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2192421945next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined2338423398next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined2464424661(0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.parseFallbackField)undefined2495024961next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2497624980(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.isBot)undefined2508625097next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2553125542next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2561125622next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2571125722next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2625526266next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2631126325next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackErrorundefined2697726985next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined2773127752(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)undefined2928029294next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined2933329344next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined2984629859(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2991629937(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)undefined3051230520next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined3199932013next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined3336533388next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_IS_PRERENDER_HEADERundefined3585535868next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.CACHE_ONE_YEARundefined3616336177next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined3706037083next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADERundefined3735537376next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined3749437515next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined3774537760(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined3798837999next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined3802838050next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADERundefined3870638721(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined3892938940next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined3920339216(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined3966439677(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined4054740568next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined4144741468next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined4157841599next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined4215242169next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__.RedirectStatusCodeundefined4237342396next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADERundefined4329243307(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4433544350(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4455844569next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined4460244624next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADERundefined4534145453falseundefined4545645806{}undefined4583145846(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4679046801next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__.ENCODED_TAGSundefined4693646951(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4756247589falseundefined4759247662{}undefined4897048984next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined4990849923(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined5079850811next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined5091050917next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKindundefined5117351187next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackErrorundefined5139951417(0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)undefined /***/ }) ˙˙˙Ļō/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9754); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9117); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6595); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2324); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9326); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8928); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(175); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4290); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2696); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2574); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2802); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7533); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5229); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2822); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(6453); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2474); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(6713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(1356); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(2685); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(6225); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(3446); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(2762); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(5742); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(6439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(1170); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(2506); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(1203); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); const module0 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 1662)); const module1 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23)); const module2 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7028, 23)); const module3 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 461, 23)); const module4 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2768, 23)); const module5 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 7513)); const page6 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610)); // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ 'dashboard', { children: ['__PAGE__', {}, { page: [page6, "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"], }] }, { 'layout': [module5, "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\\layout.jsx"], } ] }, { 'layout': [module0, "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\\layout.jsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "next/dist/client/components/builtin/not-found.js"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], } ] }.children; const pages = ["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"]; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; // Create and export the route module that will be consumed. const routeModule = new next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModule({ definition: { kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, page: "/dashboard/page", pathname: "/dashboard", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: ".next" || 0, relativeProjectDir: false || '' }); async function handler(req, res, ctx) { var _this; let srcPage = "/dashboard/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (false) {} else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = false; const initialPostponed = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__.normalizeAppPath)(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.getBotType)(userAgent); const isHtmlBot = (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.isHtmlBotRequest)(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isPrefetchRSCRequest') ?? req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isRSCRequest') ?? (0,next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__/* .isRSCRequestHeader */ .f)(req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_HEADER]); const isPossibleServerAction = (0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__.getIsPossibleServerAction)(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = (0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = false && 0; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.shouldServeStreamingMetadata)(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { (0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)(req.headers); } const ComponentMod = { ...next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__, tree, pages, GlobalError: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default()), handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { (0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__.setReferenceManifestsSingleton)({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: (0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__.createServerModuleMap)({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequest(req); const nextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (false) {} return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: (0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: true ? (__webpack_require__(9902).join)(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : 0, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = (0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.parseFallbackField)(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.PRERENDER && (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.isBot)(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.NOT_FOUND) { throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.PAGES, html: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && ((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'renderFallbackShell') || isDebugFallbackShell) ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].fromStatic(matchedSegment, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__.RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].fromStatic(cachedData.rscData, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__.ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map /***/ }) ˙˙˙˙˙˙  ˙˙˙Z˙˙˙˙˙˙ō#__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9754); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9117); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6595); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2324); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9326); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8928); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(175); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4290); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2696); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2574); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2802); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7533); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5229); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2822); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(6453); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2474); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(6713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(1356); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(2685); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(6225); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(3446); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(2762); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(5742); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(6439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(1170); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(2506); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(1203); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); =˙˙˙ĀËconst module0 = () => import(/* webpackMode: "eager" */ "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\\layout.jsx"); const module1 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/global-error.js"); const module2 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/not-found.js"); const module3 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module4 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const module5 = () => import(/* webpackMode: "eager" */ "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\\layout.jsx"); const page6 = () => import(/* webpackMode: "eager" */ "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"); import { AppPageRouteModule } from "next/dist/server/route-modules/app-page/module.compiled" with { 'turbopack-transition': 'next-ssr' }; import { RouteKind } from "next/dist/server/route-kind" with { 'turbopack-transition': 'next-server-utility' }; import { getRevalidateReason } from "next/dist/server/instrumentation/utils"; import { getTracer, SpanKind } from "next/dist/server/lib/trace/tracer"; import { getRequestMeta } from "next/dist/server/request-meta"; import { BaseServerSpan } from "next/dist/server/lib/trace/constants"; import { interopDefault } from "next/dist/server/app-render/interop-default"; import { stripFlightHeaders } from "next/dist/server/app-render/strip-flight-headers"; import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; import { checkIsAppPPREnabled } from "next/dist/server/lib/experimental/ppr"; import { isRSCRequestHeader } from "next/dist/server/lib/is-rsc-request"; import { getFallbackRouteParams } from "next/dist/server/request/fallback-params"; import { setReferenceManifestsSingleton } from "next/dist/server/app-render/encryption-utils"; import { isHtmlBotRequest, shouldServeStreamingMetadata } from "next/dist/server/lib/streaming-metadata"; import { createServerModuleMap } from "next/dist/server/app-render/action-utils"; import { normalizeAppPath } from "next/dist/shared/lib/router/utils/app-paths"; import { getIsPossibleServerAction } from "next/dist/server/lib/server-action-request-meta"; import { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_IS_PRERENDER_HEADER, NEXT_DID_POSTPONE_HEADER, RSC_CONTENT_TYPE_HEADER } from "next/dist/client/components/app-router-headers"; import { getBotType, isBot } from "next/dist/shared/lib/router/utils/is-bot"; import { CachedRouteKind } from "next/dist/server/response-cache"; import { FallbackMode, parseFallbackField } from "next/dist/lib/fallback"; import RenderResult from "next/dist/server/render-result"; import { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, NEXT_CACHE_TAGS_HEADER } from "next/dist/lib/constants"; import { ENCODED_TAGS } from "next/dist/server/stream-utils/encoded-tags"; import { sendRenderResult } from "next/dist/server/send-payload"; import { NoFallbackError } from "next/dist/shared/lib/no-fallback-error.external"; // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ 'dashboard', { children: ['__PAGE__', {}, { page: [page6, "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"], }] }, { 'layout': [module5, "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\\layout.jsx"], } ] }, { 'layout': [module0, "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\\layout.jsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "next/dist/client/components/builtin/not-found.js"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], } ] }.children; const pages = ["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"]; export { tree, pages }; import GlobalError from "next/dist/client/components/builtin/global-error.js" with { 'turbopack-transition': 'next-server-utility' }; export { GlobalError }; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() export const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; import * as entryBase from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; import { RedirectStatusCode } from "next/dist/client/components/redirect-status-code"; export * from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; // Create and export the route module that will be consumed. export const routeModule = new AppPageRouteModule({ definition: { kind: RouteKind.APP_PAGE, page: "/dashboard/page", pathname: "/dashboard", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '', relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '' }); export async function handler(req, res, ctx) { var _this; let srcPage = "/dashboard/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (process.env.TURBOPACK) { srcPage = srcPage.replace(/\/index$/, '') || '/'; } else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE; const initialPostponed = getRequestMeta(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = getRequestMeta(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = normalizeAppPath(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = getBotType(userAgent); const isHtmlBot = isHtmlBotRequest(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = getRequestMeta(req, 'isPrefetchRSCRequest') ?? req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = getRequestMeta(req, 'isRSCRequest') ?? isRSCRequestHeader(req.headers[RSC_HEADER]); const isPossibleServerAction = getIsPossibleServerAction(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = checkIsAppPPREnabled(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' && typeof query.__nextppronly !== 'undefined' && couldSupportPPR; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { stripFlightHeaders(req.headers); } const ComponentMod = { ...entryBase, tree, pages, GlobalError, handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = getTracer(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new NodeNextRequest(req); const nextRes = new NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (process.env.NODE_ENV === 'development') { if (nextConfig.experimental.cacheComponents && !isPrefetchRSCRequest && !context.renderOpts.isPossibleServerAction) { const warmup = await routeModule.warmup(nextReq, nextRes, context); // If the warmup is successful, we should use the resume data // cache from the warmup. if (warmup.metadata.renderResumeDataCache) { context.renderOpts.renderResumeDataCache = warmup.metadata.renderResumeDataCache; } } } return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: getRequestMeta(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: interopDefault(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: process.env.NEXT_RUNTIME === 'nodejs' ? require('path').join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : `${process.cwd()}/${routeModule.relativeProjectDir}`, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: getRequestMeta(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: getRequestMeta(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = parseFallbackField(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === FallbackMode.NOT_FOUND) { throw new NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? getFallbackRouteParams(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: CachedRouteKind.PAGES, html: RenderResult.EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && (getRequestMeta(req, 'renderFallbackShell') || isDebugFallbackShell) ? getFallbackRouteParams(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(matchedSegment, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = getRequestMeta(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: getRequestMeta(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(cachedData.rscData, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled && body.contentType === HTML_CONTENT_TYPE_HEADER) { // As we're in minimal mode, the static part would have already been // streamed first. The only part that this streams is the dynamic part // so we should FIRST stream the sentinel and THEN the dynamic part. body.unshift(createPPRBoundarySentinel()); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE) { body.push(createPPRBoundarySentinel()); } // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: getRevalidateReason({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map [&22233Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 1662))undefined258345Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23))undefined370454Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7028, 23))undefined479563Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 461, 23))undefined588675Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2768, 23))undefined700922Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 7513))undefined9451165Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610))undefined11681308undefined13101424undefined14261502undefined15041575undefined15771639undefined16411710undefined17121788undefined17901875undefined18771960undefined19622038undefined20402112undefined21142195undefined21972290undefined22922396undefined23982478undefined24802558undefined25602651undefined26532834undefined28362912undefined29142979undefined29813054undefined30563113undefined31153221undefined32233296undefined32983362undefined33643445undefined49654987undefined49895125undefined51275149undefined51805198__webpack_require__undefined52565262undefined53635489undefined54915576undefined55785691undefined57545760undefined57855802next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModuleundefined58385846next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined61106145".next"undefined615061510undefined61786216 falseundefined62286234undefined65186538falseundefined65416605{}undefined67516790falseundefined68226835(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined69266939(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined77057720(0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__.normalizeAppPath)undefined81078116(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.getBotType)undefined81528167(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.isHtmlBotRequest)undefined83128325(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined83718397next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_ROUTER_PREFETCH_HEADERundefined85768589(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined86158632(0,next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__/* .isRSCRequestHeader */ .f)undefined86468655next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_HEADERundefined86958719(0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__.getIsPossibleServerAction)undefined88998918(0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)undefined91109217 falseundefined922292360undefined1153211545(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1193011957(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.shouldServeStreamingMetadata)undefined1374213759(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)undefined1381913827next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__undefined1387813877: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default())undefined1424614275(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__.setReferenceManifestsSingleton)undefined1440714427(0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__.createServerModuleMap)undefined1456114569(0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)undefined1486914883next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequestundefined1492314938next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponseundefined1516615203falseundefined1520615781{}undefined1635916372next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined1745917472(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1775117764(0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)undefined1848318519 trueundefined1852318542(__webpack_require__(9902).join)undefined18621186720undefined1963319646(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2148721500(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2192421945next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined2338423398next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined2464424661(0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.parseFallbackField)undefined2495024961next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2497624980(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.isBot)undefined2508625097next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2553125542next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2561125622next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2571125722next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2625526266next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2631126325next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackErrorundefined2697726985next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined2773127752(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)undefined2928029294next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined2933329344next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined2984629859(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2991629937(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)undefined3051230520next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined3199932013next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined3336533388next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_IS_PRERENDER_HEADERundefined3585535868next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.CACHE_ONE_YEARundefined3616336177next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined3706037083next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADERundefined3735537376next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined3749437515next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined3774537760(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined3798837999next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined3802838050next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADERundefined3870638721(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined3892938940next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined3920339216(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined3966439677(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined4054740568next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined4144741468next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined4157841599next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined4215242169next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__.RedirectStatusCodeundefined4237342396next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADERundefined4329243307(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4433544350(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4455844569next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined4460244624next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADERundefined4534145453falseundefined4545645806{}undefined4583145846(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4679046801next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__.ENCODED_TAGSundefined4693646951(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4756247589falseundefined4759247662{}undefined4897048984next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined4990849923(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined5079850811next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined5091050917next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKindundefined5117351187next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackErrorundefined5139951417(0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)undefined˙˙˙˙˙˙, /***/ 9121:  8Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; Ymodule.exports = require("next/dist/server/app-render/action-async-storage.external.js");  /***/ }) ˙˙˙‡/***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/action-async-storage.external.js"); /***/ }) ˙˙˙˙˙˙ ˙˙˙˙˙˙˙˙˙Ymodule.exports = require("next/dist/server/app-render/action-async-storage.external.js");˙˙˙˙˙˙, /***/ 9294:  6Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; Wmodule.exports = require("next/dist/server/app-render/work-async-storage.external.js");  /***/ }) ˙˙˙…/***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/work-async-storage.external.js"); /***/ }) ˙˙˙ ˙˙˙  ˙˙˙ ˙˙˙ ˙˙˙Wmodule.exports = require("next/dist/server/app-render/work-async-storage.external.js"); ˙˙˙ ˙˙˙, /***/ 9610:  ãĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource Ģ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": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceT// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"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\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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", "default", ); `=G†ˆ–ˆ–—­R ”Š@€Á/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (€Ø(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)‚);€†buffer†source„size„maps„hash__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); // This file is generated by the Webpack next-flight-loader. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)( function() { throw new Error("Attempted to call the default export of \"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\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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", "default", )); €”{"finalSource":true}ƒmap‹bufferedMap ConcatSourceRawSource__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); ReplaceSourceRawSourceT// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"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\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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", "default", ); į61134undefined136150/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined136150undefined151173(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)undefined850850.5);undefined /***/ }) üū˙˙č/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); // This file is generated by the Webpack next-flight-loader. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)( function() { throw new Error("Attempted to call the default export of \"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\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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", "default", )); /***/ }) ũū˙˙˙˙˙  ˙˙˙=˙˙˙˙˙˙__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__);  ˙˙˙T// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"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\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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", "default", ); į61134undefined136150/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined136150undefined151173(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)undefined850850.5);undefined˙˙˙˙˙˙, /***/ 9672:  !ūĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource %ĐĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceĀ// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(1124); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(8301); // EXTERNAL MODULE: ./node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(2378); // EXTERNAL MODULE: ./src/lib/api-client.js var api_client = __webpack_require__(4194); ;// ./src/components/ErrorBoundary.jsx Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializerœwebpack-sources/CachedSource  Ģwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource5/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Component } from 'react'; export default class ErrorBoundary extends Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsxs("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } }  b={}Nž ŽË͌ĸĻžÁúũ€€€Ō__WEBPACK_MODULE_REFERENCE__1_5b22436f6d706f6e656e74225d_directImport_asiSafe1__._Í__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._Ë__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._ū˙˙€†buffer†source„size„maps„hashs /* __next_internal_client_entry_do_not_use__ default auto */ class ErrorBoundary extends __WEBPACK_MODULE_REFERENCE__1_5b22436f6d706f6e656e74225d_directImport_asiSafe1__._ { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } €•{"finalSource":false}ƒmap‹bufferedMap ReplaceSourceRawSource5/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Component } from 'react'; export default class ErrorBoundary extends Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsxs("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } W61123undefined125158undefined160174undefined203211__WEBPACK_MODULE_REFERENCE__1_5b22436f6d706f6e656e74225d_directImport_asiSafe1__._undefined652656__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined771774__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined930934__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined12141217__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined15301533__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined`[JŦeą$n Vn¸ņ;react.Componentš(0,react_jsx_runtime.jsxs)™(0,react_jsx_runtime.jsx)ū˙˙" ;// ./src/app/dashboard/page.jsx   mĢwebpack/lib/util/registerExternalSerializerwebpack-sources/ReplaceSourceĢwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSourceÃN/* __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, useSearchParams } from 'next/navigation'; import { api } from '../../lib/api-client'; import ErrorBoundary from '../../components/ErrorBoundary'; const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; 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 FormField({ label, children }) { return /*#__PURE__*/ _jsxs("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ _jsx("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ _jsx("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ _jsxs("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ _jsx("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ _jsx("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } 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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Risk" }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { 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 [showCreate, setShowCreate] = useState(false); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); 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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__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: ()=>openDetail(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" }) }), showCreate && /*#__PURE__*/ _jsx(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, 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: RISK_STATUSES.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" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Mitigation" }), /*#__PURE__*/ _jsx(FormField, { label: "Risk *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('progressPercent'); const [sortDir, setSortDir] = useState('asc'); const [showCreate, setShowCreate] = useState(false); const [selectedMitigation, setSelectedMitigation] = useState(null); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); const mitigations = useMemo(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = useMemo(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); 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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__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", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, 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" }) }), showCreate && /*#__PURE__*/ _jsx(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = useState(false); const [showDecision, setShowDecision] = useState(false); const [decisionForm, setDecisionForm] = useState({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = useState(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); 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: "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, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Gate Decision" }), /*#__PURE__*/ _jsx(FormField, { label: "Decision", children: /*#__PURE__*/ _jsx(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reason", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Integration" }), /*#__PURE__*/ _jsx(FormField, { label: "Provider", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Base URL", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Auth Mode", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = useState(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("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: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__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: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ _jsx("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ _jsx("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ _jsx(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ _jsx("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ _jsx("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const load = useCallback(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Audit Log" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__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: "Date" }), /*#__PURE__*/ _jsx("th", { children: "Action" }), /*#__PURE__*/ _jsx("th", { children: "Entity" }), /*#__PURE__*/ _jsx("th", { children: "Actor" }), /*#__PURE__*/ _jsx("th", { children: "Details" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: events.map((e)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ _jsxs("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ _jsxs("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "All Projects" }), /*#__PURE__*/ _jsxs("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__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: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ _jsx("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Project Settings" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Subtitle", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Project" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Project Type", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ _jsxs("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("th", { children: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", {}) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet" }) }), /*#__PURE__*/ _jsx("div", { className: "modal-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } export default function DashboardPage() { const router = useRouter(); const searchParams = useSearchParams(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = useState(null); const [projects, setProjects] = useState([]); const [selectedProjectId, setSelectedProjectId] = useState(searchParams.get('projectId') || null); const [dashboard, setDashboard] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [retryCount, setRetryCount] = useState(0); const [showProjectSettings, setShowProjectSettings] = useState(false); const [showProjectManager, setShowProjectManager] = useState(false); const [workspaceId, setWorkspaceId] = useState(null); const { toasts, add } = useToast(); const onRefresh = useCallback(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = useCallback(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsx("p", { children: error }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ _jsx("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ _jsxs("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__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}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ _jsx(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ _jsx(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ _jsx(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ _jsx(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ _jsx(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ _jsx(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ _jsx(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ _jsx(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ _jsx(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ _jsx(ToastContainer, { toasts: toasts }) ] }); } @^`=_’”Õ×?A{ĘŅčōëîOR!%€ƒ˛ ĩ X \ Î Ņ k n ā_äšŧāãËÎ8<âåßãdgVY Ļgjˇē!%'/beG _K Ö Ų _!b!-"0"(#,#$$Ŗ$Ļ$Y%]%[&_&((—)š)l+o+,,´.¸.=/@/ķ/÷/õ0_ų0°2ŗ234747 7›7ž7æ:í:;;Å=Į=ī>ō>[?_?1@4@™@œ@ũ@A´AˇABBÖCÚCßD_âDWEZEtFwFįFęFéGėGUHXHRIVI_JbJ×JÚJDLGLˇLēLNN”N—N&P)PˆP‹PUQYQÚQ_ŨQËRÎR‚T‰T˛TšTņTøTU&UXU_UU—UÃUĘUøU˙U*V1VhVoVœVŖVŋVÅV“W™W’\”\¯^_ą^B`D`¸aģab bcbgbibqb¤b¨bƒc†cwdzdwezeÖeÚeUfXf™fœfm m\o_o˛oļoip_lp rr^rarEsHs–s™sØtÛt2v5vƒv†vtwwwÅwČwÁyÄyzzc{f{´{ˇ{›}ž}H~L~Õ_Ø5€8€Į€Ę€‚‚Ž‚˛‚ŧƒĀƒ ……2†5†¨‡Ŧ‡Ž‡ļ‡ˆˆ‰‰¤‰§‰Ļ‹Š‹>ŒAŒËĪ|‘_‘"’%’ē”Ŋ”]•`•ō—õ—Ž˜‘˜îšōšŖœĻœKNk n ĄĄ$¤'¤Î¤Ņ¤C¨F¨Õ¨Ø¨.Ģ2ĢãĢ_æĢ6­9­ãŽæŽÃąĮąÉąŅą,˛0˛´´˜´›´ĢĩŽĩ’ļ–&¸)¸šš—šššŦē¯ē•ģ™ģŧ_ŧ*Ŋ-Ŋžž“ž–žĒŋ­ŋ•Ā™ĀÁÁ)Â,ÂwÂzÂĻÃĒÃ+Ä.Ä=Å@Å(Æ,ƭưÆŧĮŋĮÉÉCĘ_FĘ8Ë;ËĖĖÍ͙ΜÎ^ĐaĐĖŌĪŌVĶYĶ!Õ$ÕlÖs֙֠րڂÚēÛŊÛ&Ü*ÜüÜ˙ÜjŨmŨÍŨ_ĐŨ?ßBßŖßĻßZā]āÂāÅā|ââßâââĪãĶãØäÛäOåRåÄæĮæ@įCįāčãčEéHé&ę)ęˆę‹ęUë_YëÚëŨëËėÎėŽî•îžîÅîũîī6ī=īī†īąī¸īæīíīđđVđ]đŠđ‘đŗđšđŠņņ ō&ō1ø_3øØųÚų`ûcû°ûŗû üüüüLüPü+ũ.ũ ū ū˙˙o˙s˙î˙ņ˙2559‰Œėđ. _1  ‚ c f ´ ˇ Ū á / 2 z } Ë Ī Ž‘EH _b°ŗƒ†ãæorę_톊”—ޞ…ˆ  Ë Î S!V!p$s$ķ$ö$ū&'w(z())Ū+á+z,},•/˜/0_022˜2›2Ą4Ĩ4>5A5o6r6ė7ī7•:˜:ß;æ;<#<Y<`<į<î<_>a>n@p@åAčA5B8BB_”B–BžBŅBÕBHCLCĨC¨C8D;DCEFE´EˇEGGsGwGōGõG6H:HĸHĨHGIJIëIîIJJK_‚KÕKŲKILLLšLL}M€M-N0NÛNŪN,O/O˙PQ_QbQįQëQéRėR!T$TUUiVlVWWX_X“X–XY YĢ[Ž['\*\ŋ]Â]2^5^Ũ`á`za}aĻbŠbédđdee:gX>ŧ>ŋ>@ @ @@h@k@*A-A/A;AŠAA)C,C.C:C†C‰CŋDÂDÄDZĐD"E%E`FcFeFqFŧFŋFôG÷GųGHXH[H™IœIžIĒIöIųIŲJÜJ]L`LLNON€€€€€Õ__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._Û__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._Ë__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._˙Í__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._ūūū˙ūū˙ūūū˙˙ū˙ūūĶ__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._ũũūĐ__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._üũüüüũũüũũüüüüũüũũüũüüúúž__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._ûüûûûûûüûûûûûûüûûûûûûûûüûûųųųųųųųųųųųũũ˙˙˙ûûüūüûûûüûûüûüûûûûûûûûûûûûûûûüûûûûüüûûüūüûûûûüûûûûûûüûûûûûûûûüûûûüūüüûûüûûüûûüûûüûûüûûûüûûüûûüûûüûûûûûûųų˙ûüûûûûûûûûûüûûûûûûûûüûûųųųųųųųųųųũũũ˙˙ûûüūüûûûüûûüûüûûûûûûûüûûüûûûûûûüûüûûûûûûüûûûûûûûûüûûûûųųųų˙˙ûûüūüüûûûûûüûüûûûûûüûûûûûûûûüûûûûüûûûûûûûüûûųų˙ûüûûûûûûûûûüûûųüūüüûûûûûüûûûûûûûûûųųųú˙×__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._úúúúúúûũûûúúúúúûúûúúúúúúûúúúûûúúøøøūûũûûúûúúúûúûúúúúúúûûúúúúúúúûúúúúúúûûúûúúøøūúûúúúúúúúúúûúúøøūúûúúúúúúúûúúøøøūûûûúúûúûúûúúúúúúûûúúúúúúûúúúúúúúûûúûúúú€×__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._ã__WEBPACK_MODULE_REFERENCE__2_5b22757365536561726368506172616d73225d_call_directImport_asiSafe1__._öööööööööö÷÷üüüüũøøųøøøųûųøųųøųøøøųøøøøøÎ__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._÷÷˙÷÷˙÷÷˙÷÷˙÷÷˙÷÷˙÷÷÷÷ėüô/* __next_internal_client_entry_do_not_use__ default auto */ const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; function useToast() { const [toasts, setToasts] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const add = __WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._((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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "toast-container", children: toasts.map((t)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: `toast ${t.type}`, children: t.message }, t.id)) }); } function SearchInput({ value, onChange, placeholder }) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "search-wrap", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "search-icon", children: "⌕" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: `badge ${className || ''}`, children: children }); } function FormField({ label, children }) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } function OverviewTab({ project, dashboard }) { const panels = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ 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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "Loading dashboard data..." }) }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))' }, children: panels.map((p)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "metric-card", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h3", { children: p.label }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: `metric-value ${p.cls}`, children: p.value }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "metric-sub", children: p.sub }) ] }, p.label)) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "grid", style: { gridTemplateColumns: '1fr 1fr', marginTop: 18 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "panel", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "Dimensions" }), (dashboard.dimensions || []).map((dim)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { style: { fontSize: 13 }, children: dim.name }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { style: { fontSize: 13 }, children: dim.score }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "bar-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "panel", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "Lifecycle" }), (dashboard.lifecycle || []).map((phase)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { style: { fontSize: 13 }, children: phase.name }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "muted", style: { fontSize: 12 }, children: [ phase.openRisks, " open" ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "bar-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [form, setForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "New Risk" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Title *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Dimension *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Domain", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Probability", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Impact", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Detectability", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Owner", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(''); const [sortKey, setSortKey] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._('normalizedScore'); const [sortDir, setSortDir] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._('desc'); const [page, setPage] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(0); const [selectedRisk, setSelectedRisk] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [showCreate, setShowCreate] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [editing, setEditing] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [editForm, setEditForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({}); const [updating, setUpdating] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [confirmDelete, setConfirmDelete] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [deleting, setDeleting] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const risks = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ if (!dashboard?.topRisks) return []; return sortData(dashboard.topRisks, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ 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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "Loading..." }) }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: paged.map((risk)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { onClick: ()=>openDetail(risk), children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontFamily: 'monospace', fontSize: 12 }, children: risk.id?.slice(0, 8) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: risk.title }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: risk.dimension?.toLowerCase(), children: risk.dimension }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: risk.lifecyclePhase }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: risk.normalizedScore }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { style: { color: risk.residualScore >= 50 ? 'var(--danger)' : risk.residualScore >= 25 ? 'var(--warn)' : 'var(--accent)' }, children: risk.residualScore }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: risk.status?.toLowerCase().replace(/\s+/g, '-'), children: risk.status }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: risk.ownerDisplayName || '-' }) }) ] }, risk.id)) }) ] }) }), filtered.length > paged.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { textAlign: 'center', marginTop: 12 }, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setPage((p)=>p + 1), children: [ "Show more (", filtered.length - paged.length, " remaining)" ] }) }), !filtered.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No risks match your search" }) }), showCreate && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Title *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Dimension", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Domain", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Probability", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Impact", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Detectability", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Owner", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Dimension" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.dimension ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Phase" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.lifecyclePhase ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Probability" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.probability ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Impact" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.impact ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Detectability" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.detectability ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Score" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: selectedRisk.normalizedScore }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Residual" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.residualScore ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Owner" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.ownerDisplayName || '-' ] }) ] }), selectedRisk.description && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 12, fontSize: 13 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: "Description" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("br", {}), selectedRisk.description ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 16 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", style: { fontSize: 12 }, children: "Update status:" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', gap: 6, marginTop: 6, flexWrap: 'wrap' }, children: RISK_STATUSES.map((s)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: `button small ${s === 'OPEN' ? 'secondary' : ''}`, onClick: ()=>updateStatus(selectedRisk.id, s), disabled: updating === selectedRisk.id, children: s.replace('_', ' ') }, s)) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Close" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [form, setForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "New Mitigation" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Risk *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Title *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Status", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Progress %", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Due Date", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Owner", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(''); const [sortKey, setSortKey] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._('progressPercent'); const [sortDir, setSortDir] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._('asc'); const [showCreate, setShowCreate] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [selectedMitigation, setSelectedMitigation] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [editing, setEditing] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [editForm, setEditForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({}); const [updating, setUpdating] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [confirmDelete, setConfirmDelete] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [deleting, setDeleting] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const mitigations = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); const filtered = __WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._(()=>{ 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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "Loading..." }) }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: filtered.slice(0, 50).map((m)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: m.title }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: m.riskTitle }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: m.status?.toLowerCase().replace(/\s+/g, '-'), children: m.status }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "bar-wrap", style: { flex: 1, maxWidth: 80 }, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("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__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { children: [ m.effectivenessPercent || 0, "%" ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", children: m.ownerDisplayName || '-' }) }) ] }, m.id)) }) ] }) }), !filtered.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No mitigations found" }) }), showCreate && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Title *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Status", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Progress %", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Due Date", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Owner", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [showDecision, setShowDecision] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [decisionForm, setDecisionForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "Loading..." }) }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-header", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h1", { children: "Deployment Gate" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", children: "Gate evaluation for AI deployment readiness" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "dash-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: `metric-value ${gateCls}`, style: { fontSize: 28 }, children: gateStatus }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Criterion" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Required" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Actual" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Status" }) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: criteria.map((c)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: c.name }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: c.required }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: c.actual }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: c.status?.toLowerCase(), children: c.status }) }) ] }, c.name)) }) ] }) }), !criteria.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No gate criteria evaluated yet" }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 16, display: 'flex', gap: 8, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "Gate Decision" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Decision", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Reason", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [form, setForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "New Integration" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Provider", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Base URL", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Auth Mode", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-header", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h1", { children: "Integrations" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", children: "Connect Trello, Jira, Asana, or Microsoft Planner" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "dash-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "panel", style: { textAlign: 'center' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { fontSize: 32, marginBottom: 8 }, children: provider === 'TRELLO' ? '⊞' : provider === 'JIRA' ? '◆' : provider === 'ASANA' ? '◇' : 'â–Ŗ' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h3", { style: { margin: '0 0 4px' }, children: provider.replace('_', ' ') }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", style: { fontSize: 12, margin: '0 0 12px' }, children: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const [loading, setLoading] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(true); const [error, setError] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const load = __WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-header", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h1", { children: "Audit Log" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "dash-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Date" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Action" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Entity" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Actor" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Details" }) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: events.map((e)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [confirmDelete, setConfirmDelete] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [showNew, setShowNew] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const handleDelete = async ()=>{ setDeleting(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-header", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h1", { children: "All Projects" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "dash-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Name" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Status" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Type" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Created" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [form, setForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "Project Settings" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Name *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Subtitle", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Status", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [form, setForm] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { children: "New Project" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Name *", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Description", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(FormField, { label: "Project Type", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [confirmDelete, setConfirmDelete] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [showNew, setShowNew] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const handleDelete = async ()=>{ setDeleting(true); try { await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("table", { className: "table", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("thead", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Name" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Status" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Type" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", { children: "Created" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("th", {}) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: "No projects yet" }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "modal-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } function DashboardPage() { const router = __WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._(); const searchParams = __WEBPACK_MODULE_REFERENCE__2_5b22757365536561726368506172616d73225d_call_directImport_asiSafe1__._(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [projects, setProjects] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._([]); const [selectedProjectId, setSelectedProjectId] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(searchParams.get('projectId') || null); const [dashboard, setDashboard] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [loading, setLoading] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(true); const [error, setError] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const [retryCount, setRetryCount] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(0); const [showProjectSettings, setShowProjectSettings] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [showProjectManager, setShowProjectManager] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(false); const [workspaceId, setWorkspaceId] = __WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._(null); const { toasts, add } = useToast(); const onRefresh = __WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = __WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._(async (projectId)=>{ setLoading(true); setError(null); try { const session = await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await __WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && __WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "shell-loading", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "empty-state", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { children: error }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._, { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-header", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._("div", { className: "dash-actions", children: [ /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: `/api/projects/${project?.id}/reports/executive.html`, className: "button secondary small", target: "_blank", children: "Report" }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("a", { href: `/api/projects/${project?.id}/reports/risk-register.csv`, className: "button secondary small", target: "_blank", children: "CSV" }) ] }) ] }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("div", { className: "tabs", children: TABS.map((t)=>/*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._("button", { className: `tab ${tab === t ? 'active' : ''}`, onClick: ()=>router.push(`/dashboard?tab=${t}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Overview", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Projects", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Risks", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Mitigations", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Gate", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Integrations", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._, { name: "Audit", children: /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ __WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._(ToastContainer, { toasts: toasts }) ] }); } íđ ņÃN/* __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, useSearchParams } from 'next/navigation'; import { api } from '../../lib/api-client'; import ErrorBoundary from '../../components/ErrorBoundary'; const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; 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 FormField({ label, children }) { return /*#__PURE__*/ _jsxs("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ _jsx("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ _jsx("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ _jsxs("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ _jsx("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ _jsx("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } 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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Risk" }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { 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 [showCreate, setShowCreate] = useState(false); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); 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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__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: ()=>openDetail(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" }) }), showCreate && /*#__PURE__*/ _jsx(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, 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: RISK_STATUSES.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" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Mitigation" }), /*#__PURE__*/ _jsx(FormField, { label: "Risk *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('progressPercent'); const [sortDir, setSortDir] = useState('asc'); const [showCreate, setShowCreate] = useState(false); const [selectedMitigation, setSelectedMitigation] = useState(null); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); const mitigations = useMemo(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = useMemo(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); 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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__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", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, 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" }) }), showCreate && /*#__PURE__*/ _jsx(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = useState(false); const [showDecision, setShowDecision] = useState(false); const [decisionForm, setDecisionForm] = useState({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = useState(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); 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: "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, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Gate Decision" }), /*#__PURE__*/ _jsx(FormField, { label: "Decision", children: /*#__PURE__*/ _jsx(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reason", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Integration" }), /*#__PURE__*/ _jsx(FormField, { label: "Provider", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Base URL", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Auth Mode", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = useState(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("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: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__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: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ _jsx("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ _jsx("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ _jsx(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ _jsx("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ _jsx("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const load = useCallback(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Audit Log" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__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: "Date" }), /*#__PURE__*/ _jsx("th", { children: "Action" }), /*#__PURE__*/ _jsx("th", { children: "Entity" }), /*#__PURE__*/ _jsx("th", { children: "Actor" }), /*#__PURE__*/ _jsx("th", { children: "Details" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: events.map((e)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ _jsxs("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ _jsxs("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "All Projects" }), /*#__PURE__*/ _jsxs("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__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: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ _jsx("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Project Settings" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Subtitle", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Project" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Project Type", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ _jsxs("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("th", { children: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", {}) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet" }) }), /*#__PURE__*/ _jsx("div", { className: "modal-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } export default function DashboardPage() { const router = useRouter(); const searchParams = useSearchParams(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = useState(null); const [projects, setProjects] = useState([]); const [selectedProjectId, setSelectedProjectId] = useState(searchParams.get('projectId') || null); const [dashboard, setDashboard] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [retryCount, setRetryCount] = useState(0); const [showProjectSettings, setShowProjectSettings] = useState(false); const [showProjectManager, setShowProjectManager] = useState(false); const [workspaceId, setWorkspaceId] = useState(null); const { toasts, add } = useToast(); const onRefresh = useCallback(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = useCallback(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsx("p", { children: error }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ _jsx("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ _jsxs("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__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}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ _jsx(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ _jsx(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ _jsx(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ _jsx(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ _jsx(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ _jsx(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ _jsx(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ _jsx(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ _jsx(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ _jsx(ToastContainer, { toasts: toasts }) ] }); } 7á61146undefined148213undefined215275undefined277319undefined321379undefined970977__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined10001010__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined15151518__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined16151618__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined18251829__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined19201923__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined20492052__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined27382741__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined29042908__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined30223025__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined34353438__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined38083812__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined40254028__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined43204323__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined45554558__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46644668__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined48784882__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined50905093__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined53435347__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined54765479__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined57185721__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined63046310__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined77837786__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined78637866__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined79697973__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined79757983__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined80348037__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined82638267__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined84068409__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined85438546__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined87498752__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined90009004__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined92429246__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined93799382__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined95619565__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined98199823__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1026210265__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1064710650__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1111611119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1126511268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1195611960__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1209312096__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1227512279__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1253312537__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1297612979__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1336313367__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1408614089__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1423514238__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1507815085__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined1512315130__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined1581315815__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined1611116114__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1621916223__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1643316436__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1653716540__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1663716640__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1682016823__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1692416927__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1736617370__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1763117634__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1775117754__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1803618039__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1815118154__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1840918412__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1851718520__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1877018774__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1903919042__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1915919162__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1952419527__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1963919642__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1999419997__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2011620119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2051820521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2061620619__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2082120825__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2095420957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2119521198__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2163421641__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2168221689__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2174521752__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2179121798__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2184821855__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2190421911__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2195521962__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2200822015__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2205822065__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2212022127__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2217222179__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2220722213__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined2241922425__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined2369823700__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2423924241__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2464224644__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2501625019__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2509625099__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2518725191__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2519325201__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined2525225256__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2547525478__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2571925722__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2597525978__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2607026074__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2619726200__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2626526268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2791227916__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2850828511__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2859428598__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2877728780__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2919729200__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2927829281__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2950929512__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2959029593__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2991229915__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3025830261__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3033930342__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3058030583__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3066130664__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3116931172__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3125031253__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3158731590__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3166831671__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3215532158__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3232832332__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3272532728__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3282132824__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3296732970__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3330433307__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3345433458__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3372433728__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3406034063__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3435434357__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3472834732__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3473434742__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined3483334837__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3508835091__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3523635239__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3575035753__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3590235905__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3681136815__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3724437247__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3741037413__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3807438077__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3823738240__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3889838901__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3905439057__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3966239666__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4009940102__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4026740270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4106741070__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4123041233__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4202042023__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4219042193__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4307543078__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4322143224__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4382243826__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4400344006__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4434244345__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4477144774__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4550745511__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4551345521__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined4561245616__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4609946103__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4623246235__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4650746510__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4673846742__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4687146874__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4714247145__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4737847382__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4751147514__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4778847791__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4802148025__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4815448157__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4842648429__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4865448658__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4878748790__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4906649069__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4930149305__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4943449437__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4970549708__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4978349786__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5008650090__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5021950222__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5049350496__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5072850732__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5086150864__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5113251135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5147051474__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5177951782__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5202452027__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5222552229__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5248052483__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5288952892__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5334253345__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5396453967__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5410254105__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5456154564__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5489254899__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined5493754944__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined5593655938__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined5625056253__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5635856362__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5657256575__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5668256685__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5678156784__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5715157154__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5725157254__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5743457437__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5753857541__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5798057983__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5807958082__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5831958323__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5858458587__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5870358706__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5907659079__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5920059203__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5961659619__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5971759720__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5994259945__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6004060043__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6024560249__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6037860381__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6061960622__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6107061077__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6111861125__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6118161188__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6123861245__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6131161318__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6136161368__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6141461421__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6146461471__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6152661533__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6157861585__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6161961625__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6183461840__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6198461990__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6353763539__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined6396063962__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined6435264355__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6443264435__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6452364527__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6452964537__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined6458864592__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6481164814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6503465037__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6529665299__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6539165395__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6551865521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6558665589__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6686966873__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6746567468__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6756467568__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6788667889__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6796767970__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6819568198__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6827668279__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6857468577__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6865568658__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6898668989__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6906769071__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6951869521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6995769960__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7092070924__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7126371266__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7134471347__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7181171814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7190771910__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7204772050__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7242672429__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7258272586__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7285272855__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7313473138__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7334973352__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7348173484__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7393173934__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7406774070__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7486474867__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7499574998__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7551875522__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7589575898__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7604676049__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7676676769__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7692276925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7771777720__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7785077853__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7835878361__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7848878491__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7900979013__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7916679169__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7947179474__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7985279855__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8053380536__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8086380870__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8092480931__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8098580992__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8112781134__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8150381505__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined8203082032__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined8240582408__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8248582488__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8257682580__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8258282590__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined8264182645__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8276082764__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8285382856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8300083003__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8326783270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8338083383__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8373283735__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8382783831__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8395483957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8402284026__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8413084133__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8429584298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8445984462__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8462184624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8486384866__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8494984953__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8506585068__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8514685149__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8537385376__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8554985552__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8572385726__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8580485807__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8627186274__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8636786370__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8650386507__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8676186764__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8707387076__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8731887321__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8765787660__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8780887812__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8807888081__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8821188214__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8832888331__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8900389006__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8912789130__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8953589538__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8965089653__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9033390337__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9049090493__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9079090793__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9136991376__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9141491421__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9196291964__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined9227792280__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9238592389__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9259992602__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9271092713__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9281192814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9322293225__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9333193334__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9353093533__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9363193634__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9381893821__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9392093923__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9428494288__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9441794420__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9465894661__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9511995126__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9521795221__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9522395231__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined9528295286__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9540195405__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9549495497__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9563895641__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9591195914__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9602496027__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9632696329__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9681796821__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9706297065__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9746197464__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9774797750__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9816198164__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9847698479__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9879998802__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9921899221__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9959099593__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9972299725__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100071100078__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100119100126__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100165100172__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100198100208__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined100347100349__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined100673100681__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined100773100776__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100853100856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100965100968__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101045101048__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101149101152__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101229101232__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101338101342__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101344101352__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined101403101407__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101522101526__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101615101618__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101756101759__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102004102007__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102117102120__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102400102403__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102495102499__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined102622102625__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102690102694__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined102798102801__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102958102961__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103120103123__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103282103285__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103443103446__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103686103689__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103770103774__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined103886103889__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104321104324__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104402104405__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104733104737__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined105141105145__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined105744105747__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined106096106099__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined106948106955__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107010107017__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107060107067__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107173107175__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined107534107538__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107540107548__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined107599107603__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107718107722__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107811107814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined107955107959__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined108329108332__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108442108445__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108737108740__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108832108836__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined108959108962__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109027109031__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined109135109138__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109295109298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109457109460__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109617109620__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109780109783__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110023110026__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110236110240__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined110542110546__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined110674110677__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110902110905__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined111454111457__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112001112004__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112082112085__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112392112395__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112732112735__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined113101113105__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined113499113502__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined114056114059__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115011115014__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115107115110__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115267115270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115591115594__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115742115746__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116012116016__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116295116298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined116660116664__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116817116820__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined117117117120__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined117879117886__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined117924117931__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined118329118331__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined118628118631__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined118736118740__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined118950118953__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119062119065__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119161119164__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119473119476__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119574119577__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119894119897__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119998120001__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined120563120566__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined120662120665__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121157121161__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined121290121293__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121531121534__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121978121985__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined122023122030__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined122334122336__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined122644122647__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined122752122756__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined122966122969__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123073123076__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123172123175__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123484123487__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123588123591__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124153124156__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124258124261__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124818124822__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined124951124954__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined125192125195__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined125687125694__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125749125756__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125799125806__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125912125914__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined126271126275__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined126394126398__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined126713126717__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined127021127024__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined127287127290__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined127599127603__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128019128022__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128232128236__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128383128386__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128459128463__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128583128586__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128767128770__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128953128956__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129137129140__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129324129327__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129502129505__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129739129743__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined130085130089__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined130233130236__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined130485130488__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131182131185__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131271131274__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131621131624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined132009132012__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined132426132430__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined132872132875__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined133697133700__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined134791134794__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined134903134906__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135056135059__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135170135173__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135471135474__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135622135626__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined135892135896__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined136175136178__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined136540136544__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined136697136700__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined136997137000__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined137675137678__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined137973137987undefined138034138042__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._undefined138072138086__WEBPACK_MODULE_REFERENCE__2_5b22757365536561726368506172616d73225d_call_directImport_asiSafe1__._undefined138220138227__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138272138279__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138340138347__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138427138434__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138477138484__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138523138530__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138579138586__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138650138657__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138723138730__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138782138789__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138860138870__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined138934138944__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined139065139067__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined139577139579__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined139931139933__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined140765140767__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined141087141095__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined141435141438__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141517141520__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141645141649__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined141740141743__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141867141870__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141953141956__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined142249142253__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142255142263__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined142314142318__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142433142436__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined142686142690__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142787142791__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined143154143157__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined144039144043__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined144622144625__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined145263145266__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined145675145678__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined146121146125__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined146265146268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined146614146617__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147029147032__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147132147135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147464147467__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147469147481__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined147560147563__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147754147757__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147759147771__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined147850147853__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148265148268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148270148282__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined148358148361__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148671148674__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148676148688__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined148770148773__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149088149091__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149093149105__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined149180149183__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149492149495__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149497149509__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined149592149595__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149913149916__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149918149930__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined150006150009__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined150233150236__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined150621150624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined151116151119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined_XãúTM—øB]¸€Ęx  e ą # m QÃä.Rœ„Î8_„VĸrŧļƒÍŧMŸ`#Ē#÷#A$¨$ô$ö$E%x%Â%¤&đ&{'Å'K(•(`)Ē)ĸ*_î*Ü+(,­,÷,Ē-ö-ô.@/÷0A1ŋ2 3Û4%5ˇ56ą8ũ8‚9Ė9:Ë:É;<Ė=>–?â?ąBûBC_×CGsG™GíG˜JÕJũKGL°LüLÎMN}NĮN(OrO&PpPÕPQÖR"S'TqTæT0UJV”VWNWMX_—XYJYDZZ™[ã[X\ĸ\ ^V^Æ^_p`ē`1a{a cTcŗcũcĮde”eŪeĖfgĘhiGi›iĶi_'jNjĸjÔj(kYk­kŲk-l[l¯lÚl.memšmæm:nVn¨nvoČoÁtūtwVwįx$y˜zâz/{y{Ņ{_||n|Ą|í|Č}~MJ€”€đ€<ˇ‚B‚Œ‚øˆD‰”‹Ū‹1Œ}Œ0zeŗũá+‘y‘_Ñ“L“Ŗ”í”;•…•s–Ŋ– —U—N™˜™æ™0š~›Č›œ`œDžŽž8Ÿ„Ÿ ĄWĄ´ĄūĄĸ×ĸ%¤o¤Ĩ_NĨXϤĻđ§:¨]ЧŠĢfĢh̎ĢŦ^ŦY­Ŗ­4Ž~Ž}°Į°\ąĻą0ĩ|ĩ)ˇsˇ¸`¸õē?ģßģ)ŧģž_ŋžŋčŋE‘ÂBČÄ1Å{ŘČâȂÉĖÉßĖ)ÍĐÍΌŅÖŅeŌ¯ŌÕQÕÖL֜׿אŲÚŲˇÜŨŨ_TŨ¯ŨûŨŪß*āĢāõāâOâ3ããäJäVå å‰æÕæVį į˛čüčâé.ę¯ęųęėPė1í}íūíHî\ī_ĻīŽđÚđ[ņĨņąōûōFķķŧôõ‰õĶõâö,÷ø`øáø+ų7úúĐûüMũ—ũ‰ūĶū™˙å˙ā*Ā_ ˁËRœd Ž ö J p Ä ¤ácĖę4ŸéI“L­÷ĢõZ_¤[ĨO<ˆ×K•!Q!Ę!"ą#û#]$§$…%Ī%.&x&B'Ž'(Y(G)‘)Q+Ĩ+Î+_",Z,Ž,ā,4-v-Ę-õ-I.w.Ë.ö.J//Õ/0V0x0Ę0›1í1}2Ī2Ú89ŧ:ų:<É<=`=¸=_>>U>ˆ>Ô>¯?ų?Õ@A"BlBČBCCŲCDdDdI°ILJLĒLöL4N~NĖNO÷OAPPŲPR_JR˜RâR*TtTÂTUÍVWËXYÕ\!]t^ž^ _V_&apaÍab bębbdŦdEe‘e›fåfügHhi_eiæi0jīk9lžlm"plpėp6q>sŠs˙tIuŨu'vôx>y×y!z9}ƒ}~O~H€’€[aƒ­ƒF„_„ž…†‚‡ˇrŠŧŠŒWŒŒáŒkōFގô’>’ŗ“ũ“J”””ė”8•:•‰•ŧ•–{–Į– —_j—ú—D˜L™–™šNšĢ›õ›QœœbŖīWžĄžCŸŸ. x ĄaĄPĸšĸíĸ9ŖŠŖķŖA¤‹¤kĨ_ĩĨbĻŦĻW§Ą§ī§9¨ ĒSǰĒúĒĢËĢÉŦ­HŽ’Ž„¯ίąhąüąH˛Rŗœŗ´h´Ú´$ĩġ¸‡¸_ҏfē°ē ģjģž^ž÷žAŋjĀ´ĀôÂHÃnÃÂÃßÅÆUĮŸĮČTČ&ÉpÉÜÉ&ĘˆĘŌĘjĖ´ĖÍhÍ,Î_vÎØÎ"ĪÚĪ$ЇĐŅĐ:Ō†ŌĶQĶ?Ô‰ÔSÖ§Ö×N×Pן×Ōר‘ØŨØ6Ų€Ų ÚWÚeÛ¯ÛÜgÜ’Ũ_ÜŨÄßāáKá×â!ã<ä†ä!ækæŖįíį-éwéëaëŌėííįíAī•īžīđ9đđ§đņŒņÉņ ķ_cķŋķ ôVô ô õWõ¤õîõSööęö4÷ž÷ę÷ė÷;ønøēø-ųyųŌųúĻúđúåû/üüįü˙ũIūĨū_ņūl˙ļ˙÷˙CĢõ’Ü{ÅdŽL–†Đ!mŨ'×! o š  M á - „Î+_uÆQĨĐ$ŽË2~€ĪNÁ f°=‰ûEŗũ!kĮ Ž Ø !_e!Í!"´"ū"#į#„$Î$n%¸%¨&ō&Ä'(>)Š) *T*5++¤-î-0X0Ļ0đ0#2m2ž34v5_Â5L7–7Ā9 :Â= >i>ŗ>P?š?Û@%AšABC[CrDŧD&FrF GUG~HČHŋKL9LLNXNO_ËO4P€PRQœQ RSRŗRũR2T|TŪT(UeV¯VW^WYÚY:Z„Zp\ŧ\=]‡]u^ŋ^{`Ī`õ`Iayb_ļbęc4ddédģefmfˇfgag–hāhEiiÁk lqlģlčn4oĩo˙oíp7q#swsŽst-ttët_(uvŲvPwœw×x#ySzz¤{î{#}o}Y+€w€ Téa‚Ģ‚`ƒǃa„Ģ„`…Ē…b†Ŧ†[‡_Ĩ‡ˆۈ1Š}Š ‹W‹PŒšŒPšđ:•‘ߑ`“Ē“H•”•N—˜—Κ›[ŸĨŸ \ ō <ĄĢĄõĄŖ_iŖũŖI¤SĨŸĨļϧj¨ļ¨OŠ™ŠÂĒ Ģ¯­ų­N¯¤¯¯$°ǰū°+ąąŧą˛`˛´˛߲3ŗZŗŽŗßŗ_3´s´Į´ ĩ]ĩ‘ĩåĩ,ļ†ļÆļ ˇ™ˇÖˇÔšēqģŽģîž+ŋkĀÁĀÂ_ÂŽÂøÂuÃÁÃÄfÄâÄ,ÅÅ_ÉÅîÆ:Į<Į‹ĮžĮ Č}ČĮČÁÉ ĘnĘēĘ%ĖoĖáĪ-ĐpŌēŌ8Õ‚Õ×e× ŲlŲøŲBÚœÛæÛ‚ŨĖŨ0Ū_zŪÃß āā\āĢāõā´áūáâMâœâæâ‚äĖäÎäågåąåįæ1į3į€įŌįčWéĄéŖéđé;ę…ęēëPėėSėĻėđė.îxîzîĮîī]ī=đ‡đōRō>ôˆô’(0,react.useState)•(0,react.useCallback)ōōņōōōņōōņōōōņņōņōō‘(0,react.useMemo)ņņđšreact_jsx_runtime.Fragmentđīđđđīīđīīđđđđīđīīđīđđüü–api_client/* api */.FHīîīīīīīîīīīīīīîīīīīīīīīîīīûûûûûûûûûûûũũ˙˙˙īīîūîīīīîīīîīîīīīīīīīīīīīīīīīîīīīīîîīīîūîīīīīîīīīīīīîīīīīīīīīîīīīîūîîīīîīīîīīîīīîīīîīīīîīīîīīîīīîīīīīīīûû˙īîīīīīīīīīīîīīīīīīīīîīīûûûûûûûûûûũũũ˙˙īīîūîīīīîīīîīîīīīīīīīîīīîīīīīīīîīîīīīīīīîīīīīīīīīîīīīīûûûû˙˙īīîūîîīīīīīîīîīīīīīîīīīīīīīīîīīīīîīīīīīīīîīīûû˙īîīīīīīīīīīîīīûîūîîīīīīīîīīīīīīīīīûûûü˙“(0,react.useEffect)îîîîîîíũííîîîîîíîíîîîîîîíîîîííîîúúúūíũííîíîîîíîíîîîîîîííîîîîîîîíîîîîîîííîíîîúúūîíîîîîîîîîîíîîúúūîíîîîîîîîíîîúúúūíííîîíîíîíîîîîîîííîîîîîîíîîîîîîîííîíîîî˜(0,navigation.useRouter)ž(0,navigation.useSearchParams)øøøøøøøøøøųųüüüüũėėëėėėëûëėëëėëėėėëėėėėėErrorBoundaryëë˙ëë˙ëë˙ëë˙ëë˙ëë˙ëëë뀆buffer†source„size„maps„hashî…// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(1124); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(8301); // EXTERNAL MODULE: ./node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(2378); // EXTERNAL MODULE: ./src/lib/api-client.js var api_client = __webpack_require__(4194); ;// ./src/components/ErrorBoundary.jsx /* __next_internal_client_entry_do_not_use__ default auto */ class ErrorBoundary extends react.Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "empty-state", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } ;// ./src/app/dashboard/page.jsx /* __next_internal_client_entry_do_not_use__ default auto */ const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; function useToast() { const [toasts, setToasts] = (0,react.useState)([]); const add = (0,react.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.jsx)("div", { className: "toast-container", children: toasts.map((t)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `toast ${t.type}`, children: t.message }, t.id)) }); } function SearchInput({ value, onChange, placeholder }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "search-wrap", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "search-icon", children: "⌕" }), /*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("span", { className: `badge ${className || ''}`, children: children }); } function FormField({ label, children }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } function OverviewTab({ project, dashboard }) { const panels = (0,react.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.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading dashboard data..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))' }, children: panels.map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "metric-card", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h3", { children: p.label }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `metric-value ${p.cls}`, children: p.value }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "metric-sub", children: p.sub }) ] }, p.label)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "grid", style: { gridTemplateColumns: '1fr 1fr', marginTop: 18 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "panel", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Dimensions" }), (dashboard.dimensions || []).map((dim)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { fontSize: 13 }, children: dim.name }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { style: { fontSize: 13 }, children: dim.score }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("div", { className: "panel", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Lifecycle" }), (dashboard.lifecycle || []).map((phase)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { fontSize: 13 }, children: phase.name }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "muted", style: { fontSize: 12 }, children: [ phase.openRisks, " open" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Risk" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Dimension *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Domain", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Probability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Impact", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Detectability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = (0,react.useState)(''); const [sortKey, setSortKey] = (0,react.useState)('normalizedScore'); const [sortDir, setSortDir] = (0,react.useState)('desc'); const [page, setPage] = (0,react.useState)(0); const [selectedRisk, setSelectedRisk] = (0,react.useState)(null); const [showCreate, setShowCreate] = (0,react.useState)(false); const [editing, setEditing] = (0,react.useState)(false); const [editForm, setEditForm] = (0,react.useState)({}); const [updating, setUpdating] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [deleting, setDeleting] = (0,react.useState)(false); const risks = (0,react.useMemo)(()=>{ if (!dashboard?.topRisks) return []; return sortData(dashboard.topRisks, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = (0,react.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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api_client/* api */.FH.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api_client/* api */.FH.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: paged.map((risk)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { onClick: ()=>openDetail(risk), children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontFamily: 'monospace', fontSize: 12 }, children: risk.id?.slice(0, 8) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: risk.title }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: risk.dimension?.toLowerCase(), children: risk.dimension }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: risk.lifecyclePhase }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: risk.normalizedScore }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { color: risk.residualScore >= 50 ? 'var(--danger)' : risk.residualScore >= 25 ? 'var(--warn)' : 'var(--accent)' }, children: risk.residualScore }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: risk.status?.toLowerCase().replace(/\s+/g, '-'), children: risk.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: risk.ownerDisplayName || '-' }) }) ] }, risk.id)) }) ] }) }), filtered.length > paged.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { textAlign: 'center', marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No risks match your search" }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Dimension", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Domain", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Probability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Impact", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Detectability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Dimension" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.dimension ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Phase" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.lifecyclePhase ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Probability" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.probability ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Impact" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.impact ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Detectability" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.detectability ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Score" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: selectedRisk.normalizedScore }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Residual" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.residualScore ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Owner" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.ownerDisplayName || '-' ] }) ] }), selectedRisk.description && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12, fontSize: 13 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Description" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.description ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 16 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 12 }, children: "Update status:" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', gap: 6, marginTop: 6, flexWrap: 'wrap' }, children: RISK_STATUSES.map((s)=>/*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("div", { className: "modal-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Close" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api_client/* api */.FH.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Mitigation" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Risk *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Progress %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Due Date", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = (0,react.useState)(''); const [sortKey, setSortKey] = (0,react.useState)('progressPercent'); const [sortDir, setSortDir] = (0,react.useState)('asc'); const [showCreate, setShowCreate] = (0,react.useState)(false); const [selectedMitigation, setSelectedMitigation] = (0,react.useState)(null); const [editing, setEditing] = (0,react.useState)(false); const [editForm, setEditForm] = (0,react.useState)({}); const [updating, setUpdating] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [deleting, setDeleting] = (0,react.useState)(false); const mitigations = (0,react.useMemo)(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = (0,react.useMemo)(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); const filtered = (0,react.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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api_client/* api */.FH.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: filtered.slice(0, 50).map((m)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: m.title }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: m.riskTitle }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: m.status?.toLowerCase().replace(/\s+/g, '-'), children: m.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", style: { flex: 1, maxWidth: 80 }, children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("td", { children: [ m.effectivenessPercent || 0, "%" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: m.ownerDisplayName || '-' }) }) ] }, m.id)) }) ] }) }), !filtered.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No mitigations found" }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Progress %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Due Date", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = (0,react.useState)(false); const [showDecision, setShowDecision] = (0,react.useState)(false); const [decisionForm, setDecisionForm] = (0,react.useState)({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = (0,react.useState)(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api_client/* api */.FH.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api_client/* api */.FH.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Deployment Gate" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Gate evaluation for AI deployment readiness" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `metric-value ${gateCls}`, style: { fontSize: 28 }, children: gateStatus }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Criterion" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Required" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actual" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: criteria.map((c)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: c.name }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: c.required }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: c.actual }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: c.status?.toLowerCase(), children: c.status }) }) ] }, c.name)) }) ] }) }), !criteria.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No gate criteria evaluated yet" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 16, display: 'flex', gap: 8, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Gate Decision" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Decision", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Reason", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Integration" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Provider", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Base URL", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Auth Mode", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = (0,react.useState)(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Integrations" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Connect Trello, Jira, Asana, or Microsoft Planner" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "panel", style: { textAlign: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { fontSize: 32, marginBottom: 8 }, children: provider === 'TRELLO' ? '⊞' : provider === 'JIRA' ? '◆' : provider === 'ASANA' ? '◇' : 'â–Ŗ' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h3", { style: { margin: '0 0 4px' }, children: provider.replace('_', ' ') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { fontSize: 12, margin: '0 0 12px' }, children: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = (0,react.useState)([]); const [loading, setLoading] = (0,react.useState)(true); const [error, setError] = (0,react.useState)(null); const load = (0,react.useCallback)(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api_client/* api */.FH.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Audit Log" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Date" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Action" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Entity" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actor" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Details" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: events.map((e)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [showNew, setShowNew] = (0,react.useState)(false); const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "All Projects" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Name" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Type" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Created" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Project Settings" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Subtitle", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Project" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Project Type", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [showNew, setShowNew] = (0,react.useState)(false); const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Name" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Type" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Created" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", {}) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No projects yet" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } function DashboardPage() { const router = (0,navigation.useRouter)(); const searchParams = (0,navigation.useSearchParams)(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = (0,react.useState)(null); const [projects, setProjects] = (0,react.useState)([]); const [selectedProjectId, setSelectedProjectId] = (0,react.useState)(searchParams.get('projectId') || null); const [dashboard, setDashboard] = (0,react.useState)(null); const [loading, setLoading] = (0,react.useState)(true); const [error, setError] = (0,react.useState)(null); const [retryCount, setRetryCount] = (0,react.useState)(0); const [showProjectSettings, setShowProjectSettings] = (0,react.useState)(false); const [showProjectManager, setShowProjectManager] = (0,react.useState)(false); const [workspaceId, setWorkspaceId] = (0,react.useState)(null); const { toasts, add } = useToast(); const onRefresh = (0,react.useCallback)(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = (0,react.useCallback)(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api_client/* api */.FH.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api_client/* api */.FH.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api_client/* api */.FH.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api_client/* api */.FH.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "shell-loading", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "empty-state", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: error }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/reports/executive.html`, className: "button secondary small", target: "_blank", children: "Report" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/reports/risk-register.csv`, className: "button secondary small", target: "_blank", children: "CSV" }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "tabs", children: TABS.map((t)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: `tab ${tab === t ? 'active' : ''}`, onClick: ()=>router.push(`/dashboard?tab=${t}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ToastContainer, { toasts: toasts }) ] }); } €”{"finalSource":true}ƒmap‹bufferedMap ` ConcatSourceRawSourceĀ// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(1124); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(8301); // EXTERNAL MODULE: ./node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(2378); // EXTERNAL MODULE: ./src/lib/api-client.js var api_client = __webpack_require__(4194); ;// ./src/components/ErrorBoundary.jsx  ReplaceSourceReplaceSourceRawSource5/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Component } from 'react'; export default class ErrorBoundary extends Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsxs("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } W61123undefined125158undefined160174undefined203211__WEBPACK_MODULE_REFERENCE__1_5b22436f6d706f6e656e74225d_directImport_asiSafe1__._undefined652656__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined771774__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined930934__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined12141217__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined15301533__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefinedö91172react.Componentundefined613689(0,react_jsx_runtime.jsxs)undefined804878(0,react_jsx_runtime.jsx)undefined10341110(0,react_jsx_runtime.jsxs)undefined13901464(0,react_jsx_runtime.jsx)undefined17771851(0,react_jsx_runtime.jsx)undefinedRawSource" ;// ./src/app/dashboard/page.jsx úûÃN/* __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, useSearchParams } from 'next/navigation'; import { api } from '../../lib/api-client'; import ErrorBoundary from '../../components/ErrorBoundary'; const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; 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 FormField({ label, children }) { return /*#__PURE__*/ _jsxs("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ _jsx("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ _jsx("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ _jsxs("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ _jsx("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ _jsx("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } 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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Risk" }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { 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 [showCreate, setShowCreate] = useState(false); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); 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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__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: ()=>openDetail(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" }) }), showCreate && /*#__PURE__*/ _jsx(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, 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: RISK_STATUSES.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" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Mitigation" }), /*#__PURE__*/ _jsx(FormField, { label: "Risk *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('progressPercent'); const [sortDir, setSortDir] = useState('asc'); const [showCreate, setShowCreate] = useState(false); const [selectedMitigation, setSelectedMitigation] = useState(null); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); const mitigations = useMemo(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = useMemo(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); 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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__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", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, 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" }) }), showCreate && /*#__PURE__*/ _jsx(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = useState(false); const [showDecision, setShowDecision] = useState(false); const [decisionForm, setDecisionForm] = useState({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = useState(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); 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: "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, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Gate Decision" }), /*#__PURE__*/ _jsx(FormField, { label: "Decision", children: /*#__PURE__*/ _jsx(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reason", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Integration" }), /*#__PURE__*/ _jsx(FormField, { label: "Provider", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Base URL", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Auth Mode", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = useState(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("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: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__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: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ _jsx("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ _jsx("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ _jsx(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ _jsx("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ _jsx("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const load = useCallback(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Audit Log" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__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: "Date" }), /*#__PURE__*/ _jsx("th", { children: "Action" }), /*#__PURE__*/ _jsx("th", { children: "Entity" }), /*#__PURE__*/ _jsx("th", { children: "Actor" }), /*#__PURE__*/ _jsx("th", { children: "Details" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: events.map((e)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ _jsxs("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ _jsxs("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "All Projects" }), /*#__PURE__*/ _jsxs("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__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: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ _jsx("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Project Settings" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Subtitle", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Project" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Project Type", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ _jsxs("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("th", { children: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", {}) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet" }) }), /*#__PURE__*/ _jsx("div", { className: "modal-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } export default function DashboardPage() { const router = useRouter(); const searchParams = useSearchParams(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = useState(null); const [projects, setProjects] = useState([]); const [selectedProjectId, setSelectedProjectId] = useState(searchParams.get('projectId') || null); const [dashboard, setDashboard] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [retryCount, setRetryCount] = useState(0); const [showProjectSettings, setShowProjectSettings] = useState(false); const [showProjectManager, setShowProjectManager] = useState(false); const [workspaceId, setWorkspaceId] = useState(null); const { toasts, add } = useToast(); const onRefresh = useCallback(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = useCallback(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsx("p", { children: error }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ _jsx("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ _jsxs("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__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}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ _jsx(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ _jsx(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ _jsx(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ _jsx(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ _jsx(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ _jsx(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ _jsx(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ _jsx(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ _jsx(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ _jsx(ToastContainer, { toasts: toasts }) ] }); } 7á61146undefined148213undefined215275undefined277319undefined321379undefined970977__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined10001010__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined15151518__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined16151618__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined18251829__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined19201923__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined20492052__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined27382741__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined29042908__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined30223025__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined34353438__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined38083812__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined40254028__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined43204323__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined45554558__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46644668__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined48784882__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined50905093__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined53435347__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined54765479__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined57185721__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined63046310__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined77837786__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined78637866__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined79697973__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined79757983__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined80348037__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined82638267__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined84068409__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined85438546__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined87498752__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined90009004__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined92429246__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined93799382__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined95619565__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined98199823__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1026210265__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1064710650__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1111611119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1126511268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1195611960__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1209312096__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1227512279__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1253312537__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1297612979__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1336313367__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1408614089__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1423514238__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1507815085__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined1512315130__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined1581315815__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined1611116114__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1621916223__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1643316436__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1653716540__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1663716640__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1682016823__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1692416927__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1736617370__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1763117634__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1775117754__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1803618039__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1815118154__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1840918412__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1851718520__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1877018774__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1903919042__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1915919162__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1952419527__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1963919642__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1999419997__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2011620119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2051820521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2061620619__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2082120825__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2095420957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2119521198__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2163421641__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2168221689__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2174521752__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2179121798__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2184821855__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2190421911__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2195521962__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2200822015__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2205822065__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2212022127__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2217222179__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2220722213__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined2241922425__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined2369823700__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2423924241__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2464224644__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2501625019__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2509625099__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2518725191__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2519325201__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined2525225256__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2547525478__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2571925722__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2597525978__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2607026074__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2619726200__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2626526268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2791227916__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2850828511__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2859428598__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2877728780__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2919729200__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2927829281__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2950929512__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2959029593__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2991229915__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3025830261__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3033930342__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3058030583__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3066130664__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3116931172__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3125031253__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3158731590__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3166831671__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3215532158__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3232832332__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3272532728__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3282132824__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3296732970__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3330433307__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3345433458__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3372433728__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3406034063__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3435434357__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3472834732__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3473434742__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined3483334837__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3508835091__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3523635239__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3575035753__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3590235905__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3681136815__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3724437247__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3741037413__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3807438077__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3823738240__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3889838901__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3905439057__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3966239666__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4009940102__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4026740270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4106741070__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4123041233__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4202042023__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4219042193__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4307543078__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4322143224__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4382243826__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4400344006__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4434244345__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4477144774__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4550745511__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4551345521__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined4561245616__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4609946103__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4623246235__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4650746510__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4673846742__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4687146874__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4714247145__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4737847382__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4751147514__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4778847791__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4802148025__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4815448157__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4842648429__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4865448658__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4878748790__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4906649069__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4930149305__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4943449437__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4970549708__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4978349786__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5008650090__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5021950222__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5049350496__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5072850732__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5086150864__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5113251135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5147051474__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5177951782__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5202452027__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5222552229__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5248052483__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5288952892__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5334253345__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5396453967__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5410254105__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5456154564__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5489254899__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined5493754944__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined5593655938__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined5625056253__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5635856362__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5657256575__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5668256685__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5678156784__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5715157154__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5725157254__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5743457437__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5753857541__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5798057983__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5807958082__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5831958323__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5858458587__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5870358706__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5907659079__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5920059203__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5961659619__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5971759720__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5994259945__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6004060043__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6024560249__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6037860381__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6061960622__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6107061077__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6111861125__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6118161188__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6123861245__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6131161318__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6136161368__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6141461421__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6146461471__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6152661533__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6157861585__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6161961625__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6183461840__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6198461990__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6353763539__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined6396063962__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined6435264355__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6443264435__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6452364527__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6452964537__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined6458864592__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6481164814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6503465037__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6529665299__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6539165395__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6551865521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6558665589__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6686966873__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6746567468__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6756467568__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6788667889__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6796767970__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6819568198__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6827668279__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6857468577__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6865568658__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6898668989__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6906769071__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6951869521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6995769960__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7092070924__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7126371266__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7134471347__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7181171814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7190771910__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7204772050__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7242672429__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7258272586__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7285272855__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7313473138__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7334973352__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7348173484__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7393173934__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7406774070__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7486474867__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7499574998__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7551875522__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7589575898__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7604676049__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7676676769__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7692276925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7771777720__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7785077853__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7835878361__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7848878491__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7900979013__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7916679169__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7947179474__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7985279855__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8053380536__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8086380870__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8092480931__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8098580992__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8112781134__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8150381505__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined8203082032__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined8240582408__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8248582488__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8257682580__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8258282590__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined8264182645__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8276082764__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8285382856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8300083003__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8326783270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8338083383__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8373283735__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8382783831__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8395483957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8402284026__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8413084133__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8429584298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8445984462__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8462184624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8486384866__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8494984953__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8506585068__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8514685149__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8537385376__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8554985552__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8572385726__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8580485807__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8627186274__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8636786370__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8650386507__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8676186764__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8707387076__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8731887321__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8765787660__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8780887812__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8807888081__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8821188214__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8832888331__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8900389006__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8912789130__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8953589538__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8965089653__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9033390337__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9049090493__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9079090793__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9136991376__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9141491421__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9196291964__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined9227792280__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9238592389__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9259992602__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9271092713__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9281192814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9322293225__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9333193334__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9353093533__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9363193634__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9381893821__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9392093923__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9428494288__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9441794420__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9465894661__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9511995126__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9521795221__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9522395231__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined9528295286__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9540195405__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9549495497__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9563895641__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9591195914__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9602496027__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9632696329__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9681796821__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9706297065__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9746197464__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9774797750__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9816198164__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9847698479__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9879998802__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9921899221__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9959099593__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9972299725__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100071100078__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100119100126__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100165100172__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100198100208__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined100347100349__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined100673100681__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined100773100776__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100853100856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100965100968__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101045101048__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101149101152__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101229101232__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101338101342__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101344101352__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined101403101407__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101522101526__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101615101618__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101756101759__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102004102007__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102117102120__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102400102403__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102495102499__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined102622102625__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102690102694__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined102798102801__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102958102961__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103120103123__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103282103285__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103443103446__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103686103689__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103770103774__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined103886103889__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104321104324__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104402104405__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104733104737__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined105141105145__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined105744105747__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined106096106099__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined106948106955__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107010107017__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107060107067__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107173107175__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined107534107538__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107540107548__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined107599107603__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107718107722__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107811107814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined107955107959__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined108329108332__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108442108445__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108737108740__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108832108836__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined108959108962__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109027109031__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined109135109138__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109295109298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109457109460__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109617109620__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109780109783__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110023110026__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110236110240__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined110542110546__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined110674110677__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110902110905__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined111454111457__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112001112004__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112082112085__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112392112395__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112732112735__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined113101113105__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined113499113502__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined114056114059__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115011115014__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115107115110__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115267115270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115591115594__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115742115746__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116012116016__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116295116298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined116660116664__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116817116820__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined117117117120__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined117879117886__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined117924117931__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined118329118331__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined118628118631__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined118736118740__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined118950118953__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119062119065__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119161119164__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119473119476__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119574119577__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119894119897__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119998120001__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined120563120566__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined120662120665__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121157121161__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined121290121293__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121531121534__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121978121985__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined122023122030__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined122334122336__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined122644122647__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined122752122756__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined122966122969__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123073123076__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123172123175__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123484123487__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123588123591__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124153124156__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124258124261__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124818124822__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined124951124954__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined125192125195__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined125687125694__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125749125756__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125799125806__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125912125914__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined126271126275__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined126394126398__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined126713126717__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined127021127024__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined127287127290__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined127599127603__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128019128022__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128232128236__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128383128386__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128459128463__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128583128586__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128767128770__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128953128956__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129137129140__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129324129327__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129502129505__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129739129743__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined130085130089__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined130233130236__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined130485130488__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131182131185__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131271131274__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131621131624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined132009132012__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined132426132430__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined132872132875__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined133697133700__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined134791134794__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined134903134906__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135056135059__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135170135173__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135471135474__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135622135626__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined135892135896__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined136175136178__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined136540136544__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined136697136700__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined136997137000__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined137675137678__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined137973137987undefined138034138042__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._undefined138072138086__WEBPACK_MODULE_REFERENCE__2_5b22757365536561726368506172616d73225d_call_directImport_asiSafe1__._undefined138220138227__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138272138279__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138340138347__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138427138434__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138477138484__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138523138530__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138579138586__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138650138657__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138723138730__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138782138789__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138860138870__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined138934138944__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined139065139067__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined139577139579__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined139931139933__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined140765140767__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined141087141095__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined141435141438__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141517141520__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141645141649__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined141740141743__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141867141870__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141953141956__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined142249142253__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142255142263__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined142314142318__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142433142436__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined142686142690__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142787142791__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined143154143157__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined144039144043__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined144622144625__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined145263145266__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined145675145678__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined146121146125__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined146265146268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined146614146617__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147029147032__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147132147135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147464147467__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147469147481__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined147560147563__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147754147757__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147759147771__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined147850147853__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148265148268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148270148282__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined148358148361__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148671148674__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148676148688__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined148770148773__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149088149091__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149093149105__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined149180149183__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149492149495__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149497149509__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined149592149595__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149913149916__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149918149930__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined150006150009__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined150233150236__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined150621150624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined151116151119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefinedtg655739(0,react.useState)undefined762852(0,react.useCallback)undefined13571431(0,react_jsx_runtime.jsx)undefined15281602(0,react_jsx_runtime.jsx)undefined18091885(0,react_jsx_runtime.jsxs)undefined19762050(0,react_jsx_runtime.jsx)undefined21762250(0,react_jsx_runtime.jsx)undefined29363010(0,react_jsx_runtime.jsx)undefined31733249(0,react_jsx_runtime.jsxs)undefined33633437(0,react_jsx_runtime.jsx)undefined38473921(0,react_jsx_runtime.jsx)undefined42914367(0,react_jsx_runtime.jsxs)undefined45804654(0,react_jsx_runtime.jsx)undefined49465020(0,react_jsx_runtime.jsx)undefined52525326(0,react_jsx_runtime.jsx)undefined54325508(0,react_jsx_runtime.jsxs)undefined57185794(0,react_jsx_runtime.jsxs)undefined60026076(0,react_jsx_runtime.jsx)undefined63266402(0,react_jsx_runtime.jsxs)undefined65316605(0,react_jsx_runtime.jsx)undefined68446918(0,react_jsx_runtime.jsx)undefined75017583(0,react.useMemo)undefined90569130(0,react_jsx_runtime.jsx)undefined92079281(0,react_jsx_runtime.jsx)undefined93849460(0,react_jsx_runtime.jsxs)undefined94629541react_jsx_runtime.Fragmentundefined95929666(0,react_jsx_runtime.jsx)undefined98929968(0,react_jsx_runtime.jsxs)undefined1010710181(0,react_jsx_runtime.jsx)undefined1031510389(0,react_jsx_runtime.jsx)undefined1059210666(0,react_jsx_runtime.jsx)undefined1091410990(0,react_jsx_runtime.jsxs)undefined1122811304(0,react_jsx_runtime.jsxs)undefined1143711511(0,react_jsx_runtime.jsx)undefined1169011766(0,react_jsx_runtime.jsxs)undefined1202012096(0,react_jsx_runtime.jsxs)undefined1253512609(0,react_jsx_runtime.jsx)undefined1299113065(0,react_jsx_runtime.jsx)undefined1353113605(0,react_jsx_runtime.jsx)undefined1375113825(0,react_jsx_runtime.jsx)undefined1451314589(0,react_jsx_runtime.jsxs)undefined1472214796(0,react_jsx_runtime.jsx)undefined1497515051(0,react_jsx_runtime.jsxs)undefined1530515381(0,react_jsx_runtime.jsxs)undefined1582015894(0,react_jsx_runtime.jsx)undefined1627816354(0,react_jsx_runtime.jsxs)undefined1707317147(0,react_jsx_runtime.jsx)undefined1729317367(0,react_jsx_runtime.jsx)undefined1820718291(0,react.useState)undefined1832918413(0,react.useState)undefined1909619157api_client/* api */.FHundefined1945319527(0,react_jsx_runtime.jsx)undefined1963219708(0,react_jsx_runtime.jsxs)undefined1991819992(0,react_jsx_runtime.jsx)undefined2009320167(0,react_jsx_runtime.jsx)undefined2026420338(0,react_jsx_runtime.jsx)undefined2051820592(0,react_jsx_runtime.jsx)undefined2069320767(0,react_jsx_runtime.jsx)undefined2120621282(0,react_jsx_runtime.jsxs)undefined2154321617(0,react_jsx_runtime.jsx)undefined2173421808(0,react_jsx_runtime.jsx)undefined2209022164(0,react_jsx_runtime.jsx)undefined2227622350(0,react_jsx_runtime.jsx)undefined2260522679(0,react_jsx_runtime.jsx)undefined2278422858(0,react_jsx_runtime.jsx)undefined2310823184(0,react_jsx_runtime.jsxs)undefined2344923523(0,react_jsx_runtime.jsx)undefined2364023714(0,react_jsx_runtime.jsx)undefined2407624150(0,react_jsx_runtime.jsx)undefined2426224336(0,react_jsx_runtime.jsx)undefined2468824762(0,react_jsx_runtime.jsx)undefined2488124955(0,react_jsx_runtime.jsx)undefined2535425428(0,react_jsx_runtime.jsx)undefined2552325597(0,react_jsx_runtime.jsx)undefined2579925875(0,react_jsx_runtime.jsxs)undefined2600426078(0,react_jsx_runtime.jsx)undefined2631626390(0,react_jsx_runtime.jsx)undefined2682626910(0,react.useState)undefined2695127035(0,react.useState)undefined2709127175(0,react.useState)undefined2721427298(0,react.useState)undefined2734827432(0,react.useState)undefined2748127565(0,react.useState)undefined2760927693(0,react.useState)undefined2773927823(0,react.useState)undefined2786627950(0,react.useState)undefined2800528089(0,react.useState)undefined2813428218(0,react.useState)undefined2824628328(0,react.useMemo)undefined2853428616(0,react.useMemo)undefined2988929950api_client/* api */.FHundefined3048930550api_client/* api */.FHundefined3095131012api_client/* api */.FHundefined3138431458(0,react_jsx_runtime.jsx)undefined3153531609(0,react_jsx_runtime.jsx)undefined3169731773(0,react_jsx_runtime.jsxs)undefined3177531854react_jsx_runtime.Fragmentundefined3190531981(0,react_jsx_runtime.jsxs)undefined3220032274(0,react_jsx_runtime.jsx)undefined3251532589(0,react_jsx_runtime.jsx)undefined3284232916(0,react_jsx_runtime.jsx)undefined3300833084(0,react_jsx_runtime.jsxs)undefined3320733281(0,react_jsx_runtime.jsx)undefined3334633420(0,react_jsx_runtime.jsx)undefined3506435140(0,react_jsx_runtime.jsxs)undefined3573235806(0,react_jsx_runtime.jsx)undefined3588935965(0,react_jsx_runtime.jsxs)undefined3614436218(0,react_jsx_runtime.jsx)undefined3663536709(0,react_jsx_runtime.jsx)undefined3678736861(0,react_jsx_runtime.jsx)undefined3708937163(0,react_jsx_runtime.jsx)undefined3724137315(0,react_jsx_runtime.jsx)undefined3763437708(0,react_jsx_runtime.jsx)undefined3805138125(0,react_jsx_runtime.jsx)undefined3820338277(0,react_jsx_runtime.jsx)undefined3851538589(0,react_jsx_runtime.jsx)undefined3866738741(0,react_jsx_runtime.jsx)undefined3924639320(0,react_jsx_runtime.jsx)undefined3939839472(0,react_jsx_runtime.jsx)undefined3980639880(0,react_jsx_runtime.jsx)undefined3995840032(0,react_jsx_runtime.jsx)undefined4051640590(0,react_jsx_runtime.jsx)undefined4076040836(0,react_jsx_runtime.jsxs)undefined4122941303(0,react_jsx_runtime.jsx)undefined4139641470(0,react_jsx_runtime.jsx)undefined4161341687(0,react_jsx_runtime.jsx)undefined4202142095(0,react_jsx_runtime.jsx)undefined4224242318(0,react_jsx_runtime.jsxs)undefined4258442660(0,react_jsx_runtime.jsxs)undefined4299243066(0,react_jsx_runtime.jsx)undefined4335743431(0,react_jsx_runtime.jsx)undefined4380243878(0,react_jsx_runtime.jsxs)undefined4388043959react_jsx_runtime.Fragmentundefined4405044126(0,react_jsx_runtime.jsxs)undefined4437744451(0,react_jsx_runtime.jsx)undefined4459644670(0,react_jsx_runtime.jsx)undefined4518145255(0,react_jsx_runtime.jsx)undefined4540445478(0,react_jsx_runtime.jsx)undefined4638446460(0,react_jsx_runtime.jsxs)undefined4688946963(0,react_jsx_runtime.jsx)undefined4712647200(0,react_jsx_runtime.jsx)undefined4786147935(0,react_jsx_runtime.jsx)undefined4809548169(0,react_jsx_runtime.jsx)undefined4882748901(0,react_jsx_runtime.jsx)undefined4905449128(0,react_jsx_runtime.jsx)undefined4973349809(0,react_jsx_runtime.jsxs)undefined5024250316(0,react_jsx_runtime.jsx)undefined5048150555(0,react_jsx_runtime.jsx)undefined5135251426(0,react_jsx_runtime.jsx)undefined5158651660(0,react_jsx_runtime.jsx)undefined5244752521(0,react_jsx_runtime.jsx)undefined5268852762(0,react_jsx_runtime.jsx)undefined5364453718(0,react_jsx_runtime.jsx)undefined5386153935(0,react_jsx_runtime.jsx)undefined5453354609(0,react_jsx_runtime.jsxs)undefined5478654860(0,react_jsx_runtime.jsx)undefined5519655270(0,react_jsx_runtime.jsx)undefined5569655770(0,react_jsx_runtime.jsx)undefined5650356579(0,react_jsx_runtime.jsxs)undefined5658156660react_jsx_runtime.Fragmentundefined5675156827(0,react_jsx_runtime.jsxs)undefined5731057386(0,react_jsx_runtime.jsxs)undefined5751557589(0,react_jsx_runtime.jsx)undefined5786157935(0,react_jsx_runtime.jsx)undefined5816358239(0,react_jsx_runtime.jsxs)undefined5836858442(0,react_jsx_runtime.jsx)undefined5871058784(0,react_jsx_runtime.jsx)undefined5901759093(0,react_jsx_runtime.jsxs)undefined5922259296(0,react_jsx_runtime.jsx)undefined5957059644(0,react_jsx_runtime.jsx)undefined5987459950(0,react_jsx_runtime.jsxs)undefined6007960153(0,react_jsx_runtime.jsx)undefined6042260496(0,react_jsx_runtime.jsx)undefined6072160797(0,react_jsx_runtime.jsxs)undefined6092661000(0,react_jsx_runtime.jsx)undefined6127661350(0,react_jsx_runtime.jsx)undefined6158261658(0,react_jsx_runtime.jsxs)undefined6178761861(0,react_jsx_runtime.jsx)undefined6212962203(0,react_jsx_runtime.jsx)undefined6227862352(0,react_jsx_runtime.jsx)undefined6265262728(0,react_jsx_runtime.jsxs)undefined6285762931(0,react_jsx_runtime.jsx)undefined6320263276(0,react_jsx_runtime.jsx)undefined6350863584(0,react_jsx_runtime.jsxs)undefined6371363787(0,react_jsx_runtime.jsx)undefined6405564129(0,react_jsx_runtime.jsx)undefined6446464540(0,react_jsx_runtime.jsxs)undefined6484564919(0,react_jsx_runtime.jsx)undefined6516165235(0,react_jsx_runtime.jsx)undefined6543365509(0,react_jsx_runtime.jsxs)undefined6576065834(0,react_jsx_runtime.jsx)undefined6624066314(0,react_jsx_runtime.jsx)undefined6676466838(0,react_jsx_runtime.jsx)undefined6745767531(0,react_jsx_runtime.jsx)undefined6766667740(0,react_jsx_runtime.jsx)undefined6819668270(0,react_jsx_runtime.jsx)undefined6859868682(0,react.useState)undefined6872068804(0,react.useState)undefined6979669857api_client/* api */.FHundefined7016970243(0,react_jsx_runtime.jsx)undefined7034870424(0,react_jsx_runtime.jsxs)undefined7063470708(0,react_jsx_runtime.jsx)undefined7081570889(0,react_jsx_runtime.jsx)undefined7098571059(0,react_jsx_runtime.jsx)undefined7142671500(0,react_jsx_runtime.jsx)undefined7159771671(0,react_jsx_runtime.jsx)undefined7185171925(0,react_jsx_runtime.jsx)undefined7202672100(0,react_jsx_runtime.jsx)undefined7253972613(0,react_jsx_runtime.jsx)undefined7270972783(0,react_jsx_runtime.jsx)undefined7302073096(0,react_jsx_runtime.jsxs)undefined7335773431(0,react_jsx_runtime.jsx)undefined7354773621(0,react_jsx_runtime.jsx)undefined7399174065(0,react_jsx_runtime.jsx)undefined7418674260(0,react_jsx_runtime.jsx)undefined7467374747(0,react_jsx_runtime.jsx)undefined7484574919(0,react_jsx_runtime.jsx)undefined7514175215(0,react_jsx_runtime.jsx)undefined7531075384(0,react_jsx_runtime.jsx)undefined7558675662(0,react_jsx_runtime.jsxs)undefined7579175865(0,react_jsx_runtime.jsx)undefined7610376177(0,react_jsx_runtime.jsx)undefined7662576709(0,react.useState)undefined7675076834(0,react.useState)undefined7689076974(0,react.useState)undefined7702477108(0,react.useState)undefined7717477258(0,react.useState)undefined7730177385(0,react.useState)undefined7743177515(0,react.useState)undefined7755877642(0,react.useState)undefined7769777781(0,react.useState)undefined7782677910(0,react.useState)undefined7794478026(0,react.useMemo)undefined7823578317(0,react.useMemo)undefined7846178543(0,react.useMemo)undefined8009080151api_client/* api */.FHundefined8057280633api_client/* api */.FHundefined8102381097(0,react_jsx_runtime.jsx)undefined8117481248(0,react_jsx_runtime.jsx)undefined8133681412(0,react_jsx_runtime.jsxs)undefined8141481493react_jsx_runtime.Fragmentundefined8154481620(0,react_jsx_runtime.jsxs)undefined8183981913(0,react_jsx_runtime.jsx)undefined8213382207(0,react_jsx_runtime.jsx)undefined8246682540(0,react_jsx_runtime.jsx)undefined8263282708(0,react_jsx_runtime.jsxs)undefined8283182905(0,react_jsx_runtime.jsx)undefined8297083044(0,react_jsx_runtime.jsx)undefined8432484400(0,react_jsx_runtime.jsxs)undefined8499285066(0,react_jsx_runtime.jsx)undefined8516285238(0,react_jsx_runtime.jsxs)undefined8555685630(0,react_jsx_runtime.jsx)undefined8570885782(0,react_jsx_runtime.jsx)undefined8600786081(0,react_jsx_runtime.jsx)undefined8615986233(0,react_jsx_runtime.jsx)undefined8652886602(0,react_jsx_runtime.jsx)undefined8668086754(0,react_jsx_runtime.jsx)undefined8708287156(0,react_jsx_runtime.jsx)undefined8723487310(0,react_jsx_runtime.jsxs)undefined8775787831(0,react_jsx_runtime.jsx)undefined8826788341(0,react_jsx_runtime.jsx)undefined8930189377(0,react_jsx_runtime.jsxs)undefined8971689790(0,react_jsx_runtime.jsx)undefined8986889942(0,react_jsx_runtime.jsx)undefined9040690480(0,react_jsx_runtime.jsx)undefined9057390647(0,react_jsx_runtime.jsx)undefined9078490858(0,react_jsx_runtime.jsx)undefined9123491308(0,react_jsx_runtime.jsx)undefined9146191537(0,react_jsx_runtime.jsxs)undefined9180391877(0,react_jsx_runtime.jsx)undefined9215692232(0,react_jsx_runtime.jsxs)undefined9244392517(0,react_jsx_runtime.jsx)undefined9264692720(0,react_jsx_runtime.jsx)undefined9316793241(0,react_jsx_runtime.jsx)undefined9337493448(0,react_jsx_runtime.jsx)undefined9424294316(0,react_jsx_runtime.jsx)undefined9444494518(0,react_jsx_runtime.jsx)undefined9503895114(0,react_jsx_runtime.jsxs)undefined9548795561(0,react_jsx_runtime.jsx)undefined9570995783(0,react_jsx_runtime.jsx)undefined9650096574(0,react_jsx_runtime.jsx)undefined9672796801(0,react_jsx_runtime.jsx)undefined9759397667(0,react_jsx_runtime.jsx)undefined9779797871(0,react_jsx_runtime.jsx)undefined9837698450(0,react_jsx_runtime.jsx)undefined9857798651(0,react_jsx_runtime.jsx)undefined9916999245(0,react_jsx_runtime.jsxs)undefined9939899472(0,react_jsx_runtime.jsx)undefined9977499848(0,react_jsx_runtime.jsx)undefined100226100300(0,react_jsx_runtime.jsx)undefined100978101052(0,react_jsx_runtime.jsx)undefined101379101463(0,react.useState)undefined101517101601(0,react.useState)undefined101655101739(0,react.useState)undefined101874101958(0,react.useState)undefined102327102388api_client/* api */.FHundefined102913102974api_client/* api */.FHundefined103347103421(0,react_jsx_runtime.jsx)undefined103498103572(0,react_jsx_runtime.jsx)undefined103660103736(0,react_jsx_runtime.jsxs)undefined103738103817react_jsx_runtime.Fragmentundefined103868103944(0,react_jsx_runtime.jsxs)undefined104059104135(0,react_jsx_runtime.jsxs)undefined104224104298(0,react_jsx_runtime.jsx)undefined104442104516(0,react_jsx_runtime.jsx)undefined104780104854(0,react_jsx_runtime.jsx)undefined104964105038(0,react_jsx_runtime.jsx)undefined105387105461(0,react_jsx_runtime.jsx)undefined105553105629(0,react_jsx_runtime.jsxs)undefined105752105826(0,react_jsx_runtime.jsx)undefined105891105967(0,react_jsx_runtime.jsxs)undefined106071106145(0,react_jsx_runtime.jsx)undefined106307106381(0,react_jsx_runtime.jsx)undefined106542106616(0,react_jsx_runtime.jsx)undefined106775106849(0,react_jsx_runtime.jsx)undefined107088107162(0,react_jsx_runtime.jsx)undefined107245107321(0,react_jsx_runtime.jsxs)undefined107433107507(0,react_jsx_runtime.jsx)undefined107585107659(0,react_jsx_runtime.jsx)undefined107883107957(0,react_jsx_runtime.jsx)undefined108130108204(0,react_jsx_runtime.jsx)undefined108375108449(0,react_jsx_runtime.jsx)undefined108527108601(0,react_jsx_runtime.jsx)undefined109065109139(0,react_jsx_runtime.jsx)undefined109232109306(0,react_jsx_runtime.jsx)undefined109439109515(0,react_jsx_runtime.jsxs)undefined109769109843(0,react_jsx_runtime.jsx)undefined110152110226(0,react_jsx_runtime.jsx)undefined110468110542(0,react_jsx_runtime.jsx)undefined110878110952(0,react_jsx_runtime.jsx)undefined111100111176(0,react_jsx_runtime.jsxs)undefined111442111516(0,react_jsx_runtime.jsx)undefined111646111720(0,react_jsx_runtime.jsx)undefined111834111908(0,react_jsx_runtime.jsx)undefined112580112654(0,react_jsx_runtime.jsx)undefined112775112849(0,react_jsx_runtime.jsx)undefined113254113328(0,react_jsx_runtime.jsx)undefined113440113514(0,react_jsx_runtime.jsx)undefined114194114270(0,react_jsx_runtime.jsxs)undefined114423114497(0,react_jsx_runtime.jsx)undefined114794114868(0,react_jsx_runtime.jsx)undefined115444115528(0,react.useState)undefined115566115650(0,react.useState)undefined116191116252api_client/* api */.FHundefined116565116639(0,react_jsx_runtime.jsx)undefined116744116820(0,react_jsx_runtime.jsxs)undefined117030117104(0,react_jsx_runtime.jsx)undefined117212117286(0,react_jsx_runtime.jsx)undefined117384117458(0,react_jsx_runtime.jsx)undefined117866117940(0,react_jsx_runtime.jsx)undefined118046118120(0,react_jsx_runtime.jsx)undefined118316118390(0,react_jsx_runtime.jsx)undefined118488118562(0,react_jsx_runtime.jsx)undefined118746118820(0,react_jsx_runtime.jsx)undefined118919118993(0,react_jsx_runtime.jsx)undefined119354119430(0,react_jsx_runtime.jsxs)undefined119559119633(0,react_jsx_runtime.jsx)undefined119871119945(0,react_jsx_runtime.jsx)undefined120403120487(0,react.useState)undefined120578120654(0,react_jsx_runtime.jsxs)undefined120656120735react_jsx_runtime.Fragmentundefined120786120862(0,react_jsx_runtime.jsxs)undefined120977121053(0,react_jsx_runtime.jsxs)undefined121142121216(0,react_jsx_runtime.jsx)undefined121357121431(0,react_jsx_runtime.jsx)undefined121701121775(0,react_jsx_runtime.jsx)undefined121885121959(0,react_jsx_runtime.jsx)undefined122258122332(0,react_jsx_runtime.jsx)undefined122820122896(0,react_jsx_runtime.jsxs)undefined123137123211(0,react_jsx_runtime.jsx)undefined123607123681(0,react_jsx_runtime.jsx)undefined123964124038(0,react_jsx_runtime.jsx)undefined124449124523(0,react_jsx_runtime.jsx)undefined124835124909(0,react_jsx_runtime.jsx)undefined125229125303(0,react_jsx_runtime.jsx)undefined125719125793(0,react_jsx_runtime.jsx)undefined126162126236(0,react_jsx_runtime.jsx)undefined126365126439(0,react_jsx_runtime.jsx)undefined126785126869(0,react.useState)undefined126910126994(0,react.useState)undefined127033127117(0,react.useState)undefined127143127233(0,react.useCallback)undefined127372127433api_client/* api */.FHundefined127757127843(0,react.useEffect)undefined127935128009(0,react_jsx_runtime.jsx)undefined128086128160(0,react_jsx_runtime.jsx)undefined128269128343(0,react_jsx_runtime.jsx)undefined128420128494(0,react_jsx_runtime.jsx)undefined128595128669(0,react_jsx_runtime.jsx)undefined128746128820(0,react_jsx_runtime.jsx)undefined128926129002(0,react_jsx_runtime.jsxs)undefined129004129083react_jsx_runtime.Fragmentundefined129134129210(0,react_jsx_runtime.jsxs)undefined129325129401(0,react_jsx_runtime.jsxs)undefined129490129564(0,react_jsx_runtime.jsx)undefined129702129776(0,react_jsx_runtime.jsx)undefined130021130095(0,react_jsx_runtime.jsx)undefined130205130279(0,react_jsx_runtime.jsx)undefined130559130633(0,react_jsx_runtime.jsx)undefined130725130801(0,react_jsx_runtime.jsxs)undefined130924130998(0,react_jsx_runtime.jsx)undefined131063131139(0,react_jsx_runtime.jsxs)undefined131243131317(0,react_jsx_runtime.jsx)undefined131474131548(0,react_jsx_runtime.jsx)undefined131707131781(0,react_jsx_runtime.jsx)undefined131940132014(0,react_jsx_runtime.jsx)undefined132172132246(0,react_jsx_runtime.jsx)undefined132486132560(0,react_jsx_runtime.jsx)undefined132641132717(0,react_jsx_runtime.jsxs)undefined132829132903(0,react_jsx_runtime.jsx)undefined133335133409(0,react_jsx_runtime.jsx)undefined133487133561(0,react_jsx_runtime.jsx)undefined133889133965(0,react_jsx_runtime.jsxs)undefined134369134445(0,react_jsx_runtime.jsxs)undefined135044135118(0,react_jsx_runtime.jsx)undefined135467135541(0,react_jsx_runtime.jsx)undefined136390136474(0,react.useState)undefined136529136613(0,react.useState)undefined136656136740(0,react.useState)undefined136846136907api_client/* api */.FHundefined137266137342(0,react_jsx_runtime.jsxs)undefined137344137423react_jsx_runtime.Fragmentundefined137474137550(0,react_jsx_runtime.jsxs)undefined137665137741(0,react_jsx_runtime.jsxs)undefined137830137904(0,react_jsx_runtime.jsx)undefined138045138121(0,react_jsx_runtime.jsxs)undefined138491138565(0,react_jsx_runtime.jsx)undefined138675138749(0,react_jsx_runtime.jsx)undefined139041139115(0,react_jsx_runtime.jsx)undefined139207139283(0,react_jsx_runtime.jsxs)undefined139406139480(0,react_jsx_runtime.jsx)undefined139545139621(0,react_jsx_runtime.jsxs)undefined139725139799(0,react_jsx_runtime.jsx)undefined139956140030(0,react_jsx_runtime.jsx)undefined140189140263(0,react_jsx_runtime.jsx)undefined140420140494(0,react_jsx_runtime.jsx)undefined140654140728(0,react_jsx_runtime.jsx)undefined140968141042(0,react_jsx_runtime.jsx)undefined141252141328(0,react_jsx_runtime.jsxs)undefined141630141706(0,react_jsx_runtime.jsxs)undefined141834141908(0,react_jsx_runtime.jsx)undefined142133142207(0,react_jsx_runtime.jsx)undefined142756142830(0,react_jsx_runtime.jsx)undefined143374143448(0,react_jsx_runtime.jsx)undefined143526143600(0,react_jsx_runtime.jsx)undefined143907143981(0,react_jsx_runtime.jsx)undefined144318144392(0,react_jsx_runtime.jsx)undefined144758144834(0,react_jsx_runtime.jsxs)undefined145228145302(0,react_jsx_runtime.jsx)undefined145856145930(0,react_jsx_runtime.jsx)undefined146882146956(0,react_jsx_runtime.jsx)undefined147049147123(0,react_jsx_runtime.jsx)undefined147280147354(0,react_jsx_runtime.jsx)undefined147675147749(0,react_jsx_runtime.jsx)undefined147897147973(0,react_jsx_runtime.jsxs)undefined148239148315(0,react_jsx_runtime.jsxs)undefined148594148668(0,react_jsx_runtime.jsx)undefined149030149106(0,react_jsx_runtime.jsxs)undefined149259149333(0,react_jsx_runtime.jsx)undefined149630149704(0,react_jsx_runtime.jsx)undefined150463150547(0,react.useState)undefined150585150669(0,react.useState)undefined151067151128api_client/* api */.FHundefined151425151499(0,react_jsx_runtime.jsx)undefined151604151680(0,react_jsx_runtime.jsxs)undefined151890151964(0,react_jsx_runtime.jsx)undefined152073152147(0,react_jsx_runtime.jsx)undefined152243152317(0,react_jsx_runtime.jsx)undefined152626152700(0,react_jsx_runtime.jsx)undefined152798152872(0,react_jsx_runtime.jsx)undefined153189153263(0,react_jsx_runtime.jsx)undefined153364153438(0,react_jsx_runtime.jsx)undefined154000154074(0,react_jsx_runtime.jsx)undefined154170154244(0,react_jsx_runtime.jsx)undefined154736154812(0,react_jsx_runtime.jsxs)undefined154941155015(0,react_jsx_runtime.jsx)undefined155253155327(0,react_jsx_runtime.jsx)undefined155771155855(0,react.useState)undefined155893155977(0,react.useState)undefined156281156342api_client/* api */.FHundefined156650156724(0,react_jsx_runtime.jsx)undefined156829156905(0,react_jsx_runtime.jsxs)undefined157115157189(0,react_jsx_runtime.jsx)undefined157293157367(0,react_jsx_runtime.jsx)undefined157463157537(0,react_jsx_runtime.jsx)undefined157846157920(0,react_jsx_runtime.jsx)undefined158021158095(0,react_jsx_runtime.jsx)undefined158657158731(0,react_jsx_runtime.jsx)undefined158833158907(0,react_jsx_runtime.jsx)undefined159464159540(0,react_jsx_runtime.jsxs)undefined159669159743(0,react_jsx_runtime.jsx)undefined159981160055(0,react_jsx_runtime.jsx)undefined160547160631(0,react.useState)undefined160686160770(0,react.useState)undefined160813160897(0,react.useState)undefined161003161064api_client/* api */.FHundefined161421161497(0,react_jsx_runtime.jsxs)undefined161616161692(0,react_jsx_runtime.jsxs)undefined162007162083(0,react_jsx_runtime.jsxs)undefined162387162461(0,react_jsx_runtime.jsx)undefined162724162798(0,react_jsx_runtime.jsx)undefined163107163183(0,react_jsx_runtime.jsxs)undefined163599163673(0,react_jsx_runtime.jsx)undefined163883163959(0,react_jsx_runtime.jsxs)undefined164106164180(0,react_jsx_runtime.jsx)undefined164253164329(0,react_jsx_runtime.jsxs)undefined164449164523(0,react_jsx_runtime.jsx)undefined164704164778(0,react_jsx_runtime.jsx)undefined164961165035(0,react_jsx_runtime.jsx)undefined165216165290(0,react_jsx_runtime.jsx)undefined165474165548(0,react_jsx_runtime.jsx)undefined165723165797(0,react_jsx_runtime.jsx)undefined166031166107(0,react_jsx_runtime.jsxs)undefined166449166525(0,react_jsx_runtime.jsxs)undefined166669166743(0,react_jsx_runtime.jsx)undefined166992167066(0,react_jsx_runtime.jsx)undefined167760167834(0,react_jsx_runtime.jsx)undefined167920167994(0,react_jsx_runtime.jsx)undefined168341168415(0,react_jsx_runtime.jsx)undefined168800168874(0,react_jsx_runtime.jsx)undefined169288169364(0,react_jsx_runtime.jsxs)undefined169806169880(0,react_jsx_runtime.jsx)undefined170702170776(0,react_jsx_runtime.jsx)undefined171867171941(0,react_jsx_runtime.jsx)undefined172050172124(0,react_jsx_runtime.jsx)undefined172274172348(0,react_jsx_runtime.jsx)undefined172459172533(0,react_jsx_runtime.jsx)undefined172831172905(0,react_jsx_runtime.jsx)undefined173053173129(0,react_jsx_runtime.jsxs)undefined173395173471(0,react_jsx_runtime.jsxs)undefined173750173824(0,react_jsx_runtime.jsx)undefined174186174262(0,react_jsx_runtime.jsxs)undefined174415174489(0,react_jsx_runtime.jsx)undefined174786174860(0,react_jsx_runtime.jsx)undefined175535175609(0,react_jsx_runtime.jsx)undefined175950176036(0,navigation.useRouter)undefined176066176164(0,navigation.useSearchParams)undefined176298176382(0,react.useState)undefined176427176511(0,react.useState)undefined176572176656(0,react.useState)undefined176736176820(0,react.useState)undefined176863176947(0,react.useState)undefined176986177070(0,react.useState)undefined177119177203(0,react.useState)undefined177267177351(0,react.useState)undefined177417177501(0,react.useState)undefined177553177637(0,react.useState)undefined177708177798(0,react.useCallback)undefined177862177952(0,react.useCallback)undefined178073178134api_client/* api */.FHundefined178644178705api_client/* api */.FHundefined179057179118api_client/* api */.FHundefined179950180011api_client/* api */.FHundefined180331180417(0,react.useEffect)undefined180757180831(0,react_jsx_runtime.jsx)undefined180910180984(0,react_jsx_runtime.jsx)undefined181109181185(0,react_jsx_runtime.jsxs)undefined181276181350(0,react_jsx_runtime.jsx)undefined181474181548(0,react_jsx_runtime.jsx)undefined181631181705(0,react_jsx_runtime.jsx)undefined181998182074(0,react_jsx_runtime.jsxs)undefined182076182155react_jsx_runtime.Fragmentundefined182206182282(0,react_jsx_runtime.jsxs)undefined182397182471(0,react_jsx_runtime.jsx)undefined182721182797(0,react_jsx_runtime.jsxs)undefined182894182970(0,react_jsx_runtime.jsxs)undefined183333183407(0,react_jsx_runtime.jsx)undefined184289184365(0,react_jsx_runtime.jsxs)undefined184944185018(0,react_jsx_runtime.jsx)undefined185656185730(0,react_jsx_runtime.jsx)undefined186139186213(0,react_jsx_runtime.jsx)undefined186656186732(0,react_jsx_runtime.jsxs)undefined186872186946(0,react_jsx_runtime.jsx)undefined187292187366(0,react_jsx_runtime.jsx)undefined187778187852(0,react_jsx_runtime.jsx)undefined187952188026(0,react_jsx_runtime.jsx)undefined188355188429(0,react_jsx_runtime.jsx)undefined188431188508ErrorBoundaryundefined188587188661(0,react_jsx_runtime.jsx)undefined188852188926(0,react_jsx_runtime.jsx)undefined188928189005ErrorBoundaryundefined189084189158(0,react_jsx_runtime.jsx)undefined189570189644(0,react_jsx_runtime.jsx)undefined189646189723ErrorBoundaryundefined189799189873(0,react_jsx_runtime.jsx)undefined190183190257(0,react_jsx_runtime.jsx)undefined190259190336ErrorBoundaryundefined190418190492(0,react_jsx_runtime.jsx)undefined190807190881(0,react_jsx_runtime.jsx)undefined190883190960ErrorBoundaryundefined191035191109(0,react_jsx_runtime.jsx)undefined191418191492(0,react_jsx_runtime.jsx)undefined191494191571ErrorBoundaryundefined191654191728(0,react_jsx_runtime.jsx)undefined192046192120(0,react_jsx_runtime.jsx)undefined192122192199ErrorBoundaryundefined192275192349(0,react_jsx_runtime.jsx)undefined192573192647(0,react_jsx_runtime.jsx)undefined193032193106(0,react_jsx_runtime.jsx)undefined193598193672(0,react_jsx_runtime.jsx)undefined /***/ }) ņū˙˙W†/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(1124); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(8301); // EXTERNAL MODULE: ./node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(2378); // EXTERNAL MODULE: ./src/lib/api-client.js var api_client = __webpack_require__(4194); ;// ./src/components/ErrorBoundary.jsx /* __next_internal_client_entry_do_not_use__ default auto */ class ErrorBoundary extends react.Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "empty-state", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } ;// ./src/app/dashboard/page.jsx /* __next_internal_client_entry_do_not_use__ default auto */ const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; function useToast() { const [toasts, setToasts] = (0,react.useState)([]); const add = (0,react.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.jsx)("div", { className: "toast-container", children: toasts.map((t)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `toast ${t.type}`, children: t.message }, t.id)) }); } function SearchInput({ value, onChange, placeholder }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "search-wrap", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "search-icon", children: "⌕" }), /*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("span", { className: `badge ${className || ''}`, children: children }); } function FormField({ label, children }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } function OverviewTab({ project, dashboard }) { const panels = (0,react.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.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading dashboard data..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))' }, children: panels.map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "metric-card", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h3", { children: p.label }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `metric-value ${p.cls}`, children: p.value }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "metric-sub", children: p.sub }) ] }, p.label)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "grid", style: { gridTemplateColumns: '1fr 1fr', marginTop: 18 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "panel", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Dimensions" }), (dashboard.dimensions || []).map((dim)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { fontSize: 13 }, children: dim.name }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { style: { fontSize: 13 }, children: dim.score }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("div", { className: "panel", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Lifecycle" }), (dashboard.lifecycle || []).map((phase)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { fontSize: 13 }, children: phase.name }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "muted", style: { fontSize: 12 }, children: [ phase.openRisks, " open" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Risk" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Dimension *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Domain", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Probability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Impact", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Detectability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = (0,react.useState)(''); const [sortKey, setSortKey] = (0,react.useState)('normalizedScore'); const [sortDir, setSortDir] = (0,react.useState)('desc'); const [page, setPage] = (0,react.useState)(0); const [selectedRisk, setSelectedRisk] = (0,react.useState)(null); const [showCreate, setShowCreate] = (0,react.useState)(false); const [editing, setEditing] = (0,react.useState)(false); const [editForm, setEditForm] = (0,react.useState)({}); const [updating, setUpdating] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [deleting, setDeleting] = (0,react.useState)(false); const risks = (0,react.useMemo)(()=>{ if (!dashboard?.topRisks) return []; return sortData(dashboard.topRisks, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = (0,react.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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api_client/* api */.FH.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api_client/* api */.FH.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: paged.map((risk)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { onClick: ()=>openDetail(risk), children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontFamily: 'monospace', fontSize: 12 }, children: risk.id?.slice(0, 8) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: risk.title }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: risk.dimension?.toLowerCase(), children: risk.dimension }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: risk.lifecyclePhase }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: risk.normalizedScore }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { color: risk.residualScore >= 50 ? 'var(--danger)' : risk.residualScore >= 25 ? 'var(--warn)' : 'var(--accent)' }, children: risk.residualScore }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: risk.status?.toLowerCase().replace(/\s+/g, '-'), children: risk.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: risk.ownerDisplayName || '-' }) }) ] }, risk.id)) }) ] }) }), filtered.length > paged.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { textAlign: 'center', marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No risks match your search" }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Dimension", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Domain", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Probability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Impact", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Detectability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Dimension" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.dimension ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Phase" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.lifecyclePhase ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Probability" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.probability ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Impact" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.impact ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Detectability" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.detectability ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Score" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: selectedRisk.normalizedScore }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Residual" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.residualScore ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Owner" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.ownerDisplayName || '-' ] }) ] }), selectedRisk.description && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12, fontSize: 13 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Description" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.description ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 16 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 12 }, children: "Update status:" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', gap: 6, marginTop: 6, flexWrap: 'wrap' }, children: RISK_STATUSES.map((s)=>/*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("div", { className: "modal-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Close" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api_client/* api */.FH.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Mitigation" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Risk *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Progress %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Due Date", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = (0,react.useState)(''); const [sortKey, setSortKey] = (0,react.useState)('progressPercent'); const [sortDir, setSortDir] = (0,react.useState)('asc'); const [showCreate, setShowCreate] = (0,react.useState)(false); const [selectedMitigation, setSelectedMitigation] = (0,react.useState)(null); const [editing, setEditing] = (0,react.useState)(false); const [editForm, setEditForm] = (0,react.useState)({}); const [updating, setUpdating] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [deleting, setDeleting] = (0,react.useState)(false); const mitigations = (0,react.useMemo)(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = (0,react.useMemo)(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); const filtered = (0,react.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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api_client/* api */.FH.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: filtered.slice(0, 50).map((m)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: m.title }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: m.riskTitle }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: m.status?.toLowerCase().replace(/\s+/g, '-'), children: m.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", style: { flex: 1, maxWidth: 80 }, children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("td", { children: [ m.effectivenessPercent || 0, "%" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: m.ownerDisplayName || '-' }) }) ] }, m.id)) }) ] }) }), !filtered.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No mitigations found" }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Progress %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Due Date", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = (0,react.useState)(false); const [showDecision, setShowDecision] = (0,react.useState)(false); const [decisionForm, setDecisionForm] = (0,react.useState)({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = (0,react.useState)(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api_client/* api */.FH.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api_client/* api */.FH.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Deployment Gate" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Gate evaluation for AI deployment readiness" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `metric-value ${gateCls}`, style: { fontSize: 28 }, children: gateStatus }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Criterion" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Required" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actual" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: criteria.map((c)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: c.name }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: c.required }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: c.actual }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: c.status?.toLowerCase(), children: c.status }) }) ] }, c.name)) }) ] }) }), !criteria.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No gate criteria evaluated yet" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 16, display: 'flex', gap: 8, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Gate Decision" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Decision", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Reason", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Integration" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Provider", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Base URL", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Auth Mode", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = (0,react.useState)(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Integrations" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Connect Trello, Jira, Asana, or Microsoft Planner" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "panel", style: { textAlign: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { fontSize: 32, marginBottom: 8 }, children: provider === 'TRELLO' ? '⊞' : provider === 'JIRA' ? '◆' : provider === 'ASANA' ? '◇' : 'â–Ŗ' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h3", { style: { margin: '0 0 4px' }, children: provider.replace('_', ' ') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { fontSize: 12, margin: '0 0 12px' }, children: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = (0,react.useState)([]); const [loading, setLoading] = (0,react.useState)(true); const [error, setError] = (0,react.useState)(null); const load = (0,react.useCallback)(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api_client/* api */.FH.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Audit Log" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Date" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Action" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Entity" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actor" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Details" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: events.map((e)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [showNew, setShowNew] = (0,react.useState)(false); const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "All Projects" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Name" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Type" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Created" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Project Settings" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Subtitle", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Project" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Project Type", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [showNew, setShowNew] = (0,react.useState)(false); const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Name" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Type" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Created" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", {}) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No projects yet" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } function DashboardPage() { const router = (0,navigation.useRouter)(); const searchParams = (0,navigation.useSearchParams)(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = (0,react.useState)(null); const [projects, setProjects] = (0,react.useState)([]); const [selectedProjectId, setSelectedProjectId] = (0,react.useState)(searchParams.get('projectId') || null); const [dashboard, setDashboard] = (0,react.useState)(null); const [loading, setLoading] = (0,react.useState)(true); const [error, setError] = (0,react.useState)(null); const [retryCount, setRetryCount] = (0,react.useState)(0); const [showProjectSettings, setShowProjectSettings] = (0,react.useState)(false); const [showProjectManager, setShowProjectManager] = (0,react.useState)(false); const [workspaceId, setWorkspaceId] = (0,react.useState)(null); const { toasts, add } = useToast(); const onRefresh = (0,react.useCallback)(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = (0,react.useCallback)(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api_client/* api */.FH.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api_client/* api */.FH.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api_client/* api */.FH.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api_client/* api */.FH.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "shell-loading", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "empty-state", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: error }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/reports/executive.html`, className: "button secondary small", target: "_blank", children: "Report" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/reports/risk-register.csv`, className: "button secondary small", target: "_blank", children: "CSV" }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "tabs", children: TABS.map((t)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: `tab ${tab === t ? 'active' : ''}`, onClick: ()=>router.push(`/dashboard?tab=${t}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ToastContainer, { toasts: toasts }) ] }); } /***/ }) ōū˙˙õū˙˙ `öū˙˙2˙˙˙öū˙˙Ā// ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(1124); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(8301); // EXTERNAL MODULE: ./node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(2378); // EXTERNAL MODULE: ./src/lib/api-client.js var api_client = __webpack_require__(4194); ;// ./src/components/ErrorBoundary.jsx  ReplaceSource˙˙˙5/* __next_internal_client_entry_do_not_use__ default auto */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { Component } from 'react'; export default class ErrorBoundary extends Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsxs("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } W61123undefined125158undefined160174undefined203211__WEBPACK_MODULE_REFERENCE__1_5b22436f6d706f6e656e74225d_directImport_asiSafe1__._undefined652656__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined771774__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined930934__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined12141217__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined15301533__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefinedö91172react.Componentundefined613689(0,react_jsx_runtime.jsxs)undefined804878(0,react_jsx_runtime.jsx)undefined10341110(0,react_jsx_runtime.jsxs)undefined13901464(0,react_jsx_runtime.jsx)undefined17771851(0,react_jsx_runtime.jsx)undefinedRawSource" ;// ./src/app/dashboard/page.jsx û˙˙˙ÃN/* __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, useSearchParams } from 'next/navigation'; import { api } from '../../lib/api-client'; import ErrorBoundary from '../../components/ErrorBoundary'; const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; 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 FormField({ label, children }) { return /*#__PURE__*/ _jsxs("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ _jsx("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ _jsx("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ _jsxs("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ _jsx("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ _jsx("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } 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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Risk" }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { 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 [showCreate, setShowCreate] = useState(false); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); 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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__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: ()=>openDetail(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" }) }), showCreate && /*#__PURE__*/ _jsx(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Dimension", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ _jsx(FormField, { label: "Domain", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Probability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Impact", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Detectability", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, 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: RISK_STATUSES.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" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Mitigation" }), /*#__PURE__*/ _jsx(FormField, { label: "Risk *", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = useState(''); const [sortKey, setSortKey] = useState('progressPercent'); const [sortDir, setSortDir] = useState('asc'); const [showCreate, setShowCreate] = useState(false); const [selectedMitigation, setSelectedMitigation] = useState(null); const [editing, setEditing] = useState(false); const [editForm, setEditForm] = useState({}); const [updating, setUpdating] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [deleting, setDeleting] = useState(false); const mitigations = useMemo(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = useMemo(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); 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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ _jsx(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__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", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, 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" }) }), showCreate && /*#__PURE__*/ _jsx(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ _jsxs("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Title *", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ _jsxs("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ _jsx(FormField, { label: "Progress %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ _jsx(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ _jsx(FormField, { label: "Due Date", children: /*#__PURE__*/ _jsx(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Owner", children: /*#__PURE__*/ _jsx(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ _jsx(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = useState(false); const [showDecision, setShowDecision] = useState(false); const [decisionForm, setDecisionForm] = useState({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = useState(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading..." }) }); 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: "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, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ _jsx("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Gate Decision" }), /*#__PURE__*/ _jsx(FormField, { label: "Decision", children: /*#__PURE__*/ _jsx(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Reason", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Integration" }), /*#__PURE__*/ _jsx(FormField, { label: "Provider", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ _jsx(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Base URL", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ _jsx(FormField, { label: "Auth Mode", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = useState(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("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: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ _jsx("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__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: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ _jsx("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ _jsx("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ _jsx(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ _jsx("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ _jsx("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = useState([]); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const load = useCallback(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "Audit Log" }), /*#__PURE__*/ _jsx("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__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: "Date" }), /*#__PURE__*/ _jsx("th", { children: "Action" }), /*#__PURE__*/ _jsx("th", { children: "Entity" }), /*#__PURE__*/ _jsx("th", { children: "Actor" }), /*#__PURE__*/ _jsx("th", { children: "Details" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: events.map((e)=>/*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ _jsxs("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ _jsxs("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsx("h1", { children: "All Projects" }), /*#__PURE__*/ _jsxs("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ _jsx("div", { className: "dash-actions", children: /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__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: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ _jsx("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "Project Settings" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Subtitle", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Status", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = useState(false); const [form, setForm] = useState({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ _jsx("h2", { children: "New Project" }), /*#__PURE__*/ _jsx(FormField, { label: "Name *", children: /*#__PURE__*/ _jsx(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ _jsx(FormField, { label: "Description", children: /*#__PURE__*/ _jsx("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ _jsx(FormField, { label: "Project Type", children: /*#__PURE__*/ _jsx(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = useState(null); const [confirmDelete, setConfirmDelete] = useState(null); const [showNew, setShowNew] = useState(false); const handleDelete = async ()=>{ setDeleting(true); try { await api.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ _jsxs("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ _jsx("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ _jsx("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ _jsxs("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ _jsx("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ _jsxs("table", { className: "table", children: [ /*#__PURE__*/ _jsx("thead", { children: /*#__PURE__*/ _jsxs("tr", { children: [ /*#__PURE__*/ _jsx("th", { children: "Name" }), /*#__PURE__*/ _jsx("th", { children: "Status" }), /*#__PURE__*/ _jsx("th", { children: "Type" }), /*#__PURE__*/ _jsx("th", { children: "Created" }), /*#__PURE__*/ _jsx("th", {}) ] }) }), /*#__PURE__*/ _jsx("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ _jsxs("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ _jsxs("td", { children: [ /*#__PURE__*/ _jsx("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ _jsx("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ _jsx("td", { children: /*#__PURE__*/ _jsx(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ _jsx("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ _jsxs("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ _jsx("div", { className: "empty-state", children: /*#__PURE__*/ _jsx("p", { children: "No projects yet" }) }), /*#__PURE__*/ _jsx("div", { className: "modal-actions", children: /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ _jsx("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ _jsxs("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ _jsxs("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ _jsx("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ _jsxs("div", { className: "modal-actions", children: [ /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ _jsx("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ _jsx(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } export default function DashboardPage() { const router = useRouter(); const searchParams = useSearchParams(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = useState(null); const [projects, setProjects] = useState([]); const [selectedProjectId, setSelectedProjectId] = useState(searchParams.get('projectId') || null); const [dashboard, setDashboard] = useState(null); const [loading, setLoading] = useState(true); const [error, setError] = useState(null); const [retryCount, setRetryCount] = useState(0); const [showProjectSettings, setShowProjectSettings] = useState(false); const [showProjectManager, setShowProjectManager] = useState(false); const [workspaceId, setWorkspaceId] = useState(null); const { toasts, add } = useToast(); const onRefresh = useCallback(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = useCallback(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ _jsxs("div", { className: "empty-state", children: [ /*#__PURE__*/ _jsx("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ _jsx("p", { children: error }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ _jsxs(_Fragment, { children: [ /*#__PURE__*/ _jsxs("div", { className: "dash-header", children: [ /*#__PURE__*/ _jsx("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ _jsxs("div", { children: [ /*#__PURE__*/ _jsxs("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ _jsx("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ _jsxs("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ _jsx("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ _jsx("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__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}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ _jsx(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ _jsx(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ _jsx(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ _jsx(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ _jsx(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ _jsx(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ _jsx(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ _jsx(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ _jsx(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ _jsx(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ _jsx(ToastContainer, { toasts: toasts }) ] }); } 7á61146undefined148213undefined215275undefined277319undefined321379undefined970977__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined10001010__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined15151518__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined16151618__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined18251829__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined19201923__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined20492052__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined27382741__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined29042908__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined30223025__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined34353438__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined38083812__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined40254028__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined43204323__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined45554558__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined46644668__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined48784882__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined50905093__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined53435347__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined54765479__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined57185721__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined63046310__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined77837786__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined78637866__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined79697973__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined79757983__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined80348037__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined82638267__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined84068409__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined85438546__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined87498752__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined90009004__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined92429246__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined93799382__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined95619565__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined98199823__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1026210265__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1064710650__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1111611119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1126511268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1195611960__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1209312096__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1227512279__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1253312537__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1297612979__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1336313367__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1408614089__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1423514238__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1507815085__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined1512315130__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined1581315815__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined1611116114__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1621916223__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1643316436__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1653716540__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1663716640__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1682016823__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1692416927__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1736617370__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1763117634__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1775117754__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1803618039__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1815118154__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1840918412__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1851718520__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1877018774__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined1903919042__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1915919162__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1952419527__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1963919642__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined1999419997__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2011620119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2051820521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2061620619__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2082120825__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2095420957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2119521198__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2163421641__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2168221689__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2174521752__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2179121798__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2184821855__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2190421911__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2195521962__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2200822015__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2205822065__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2212022127__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2217222179__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined2220722213__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined2241922425__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined2369823700__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2423924241__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2464224644__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined2501625019__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2509625099__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2518725191__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2519325201__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined2525225256__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2547525478__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2571925722__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2597525978__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2607026074__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2619726200__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2626526268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2791227916__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2850828511__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2859428598__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined2877728780__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2919729200__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2927829281__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2950929512__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2959029593__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined2991229915__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3025830261__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3033930342__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3058030583__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3066130664__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3116931172__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3125031253__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3158731590__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3166831671__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3215532158__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3232832332__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3272532728__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3282132824__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3296732970__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3330433307__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3345433458__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3372433728__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3406034063__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3435434357__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3472834732__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3473434742__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined3483334837__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3508835091__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3523635239__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3575035753__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3590235905__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3681136815__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined3724437247__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3741037413__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3807438077__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3823738240__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3889838901__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3905439057__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined3966239666__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4009940102__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4026740270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4106741070__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4123041233__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4202042023__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4219042193__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4307543078__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4322143224__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4382243826__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4400344006__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4434244345__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4477144774__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4550745511__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4551345521__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined4561245616__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4609946103__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4623246235__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4650746510__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4673846742__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4687146874__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4714247145__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4737847382__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4751147514__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4778847791__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4802148025__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4815448157__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4842648429__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4865448658__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4878748790__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4906649069__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4930149305__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined4943449437__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4970549708__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined4978349786__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5008650090__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5021950222__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5049350496__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5072850732__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5086150864__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5113251135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5147051474__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5177951782__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5202452027__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5222552229__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5248052483__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5288952892__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5334253345__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5396453967__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5410254105__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5456154564__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5489254899__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined5493754944__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined5593655938__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined5625056253__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5635856362__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5657256575__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5668256685__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5678156784__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5715157154__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5725157254__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5743457437__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5753857541__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5798057983__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5807958082__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5831958323__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined5858458587__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5870358706__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5907659079__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5920059203__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5961659619__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5971759720__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined5994259945__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6004060043__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6024560249__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6037860381__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6061960622__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6107061077__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6111861125__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6118161188__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6123861245__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6131161318__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6136161368__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6141461421__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6146461471__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6152661533__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6157861585__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined6161961625__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6183461840__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6198461990__WEBPACK_MODULE_REFERENCE__1_5b227573654d656d6f225d_call_directImport_asiSafe1__._undefined6353763539__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined6396063962__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined6435264355__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6443264435__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6452364527__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6452964537__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined6458864592__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6481164814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6503465037__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6529665299__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6539165395__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6551865521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6558665589__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6686966873__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6746567468__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6756467568__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6788667889__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6796767970__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6819568198__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6827668279__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6857468577__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6865568658__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6898668989__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6906769071__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined6951869521__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined6995769960__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7092070924__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7126371266__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7134471347__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7181171814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7190771910__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7204772050__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7242672429__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7258272586__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7285272855__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7313473138__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7334973352__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7348173484__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7393173934__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7406774070__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7486474867__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7499574998__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7551875522__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7589575898__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7604676049__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7676676769__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7692276925__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7771777720__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7785077853__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7835878361__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7848878491__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7900979013__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined7916679169__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7947179474__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined7985279855__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8053380536__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8086380870__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8092480931__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8098580992__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8112781134__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined8150381505__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined8203082032__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined8240582408__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8248582488__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8257682580__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8258282590__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined8264182645__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8276082764__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8285382856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8300083003__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8326783270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8338083383__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8373283735__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8382783831__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8395483957__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8402284026__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8413084133__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8429584298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8445984462__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8462184624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8486384866__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8494984953__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8506585068__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8514685149__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8537385376__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8554985552__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8572385726__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8580485807__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8627186274__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8636786370__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8650386507__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8676186764__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8707387076__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8731887321__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8765787660__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8780887812__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined8807888081__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8821188214__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8832888331__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8900389006__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8912789130__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8953589538__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined8965089653__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9033390337__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9049090493__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9079090793__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9136991376__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9141491421__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9196291964__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined9227792280__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9238592389__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9259992602__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9271092713__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9281192814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9322293225__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9333193334__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9353093533__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9363193634__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9381893821__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9392093923__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9428494288__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9441794420__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9465894661__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9511995126__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined9521795221__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9522395231__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined9528295286__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9540195405__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9549495497__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9563895641__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9591195914__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9602496027__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9632696329__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9681796821__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined9706297065__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9746197464__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9774797750__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9816198164__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9847698479__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9879998802__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9921899221__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9959099593__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined9972299725__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100071100078__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100119100126__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100165100172__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined100198100208__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined100347100349__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined100673100681__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined100773100776__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100853100856__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined100965100968__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101045101048__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101149101152__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101229101232__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101338101342__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101344101352__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined101403101407__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101522101526__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined101615101618__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined101756101759__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102004102007__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102117102120__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102400102403__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102495102499__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined102622102625__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102690102694__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined102798102801__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined102958102961__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103120103123__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103282103285__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103443103446__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103686103689__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined103770103774__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined103886103889__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104321104324__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104402104405__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined104733104737__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined105141105145__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined105744105747__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined106096106099__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined106948106955__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107010107017__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107060107067__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined107173107175__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined107534107538__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107540107548__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined107599107603__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107718107722__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined107811107814__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined107955107959__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined108329108332__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108442108445__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108737108740__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined108832108836__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined108959108962__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109027109031__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined109135109138__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109295109298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109457109460__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109617109620__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined109780109783__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110023110026__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110236110240__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined110542110546__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined110674110677__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined110902110905__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined111454111457__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112001112004__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112082112085__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112392112395__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined112732112735__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined113101113105__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined113499113502__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined114056114059__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115011115014__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115107115110__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115267115270__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115591115594__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined115742115746__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116012116016__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116295116298__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined116660116664__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined116817116820__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined117117117120__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined117879117886__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined117924117931__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined118329118331__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined118628118631__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined118736118740__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined118950118953__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119062119065__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119161119164__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119473119476__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119574119577__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119894119897__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined119998120001__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined120563120566__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined120662120665__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121157121161__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined121290121293__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121531121534__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined121978121985__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined122023122030__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined122334122336__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined122644122647__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined122752122756__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined122966122969__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123073123076__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123172123175__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123484123487__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined123588123591__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124153124156__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124258124261__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined124818124822__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined124951124954__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined125192125195__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined125687125694__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125749125756__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125799125806__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined125912125914__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined126271126275__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined126394126398__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined126713126717__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined127021127024__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined127287127290__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined127599127603__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128019128022__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128232128236__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128383128386__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128459128463__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined128583128586__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128767128770__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined128953128956__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129137129140__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129324129327__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129502129505__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined129739129743__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined130085130089__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined130233130236__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined130485130488__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131182131185__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131271131274__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined131621131624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined132009132012__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined132426132430__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined132872132875__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined133697133700__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined134791134794__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined134903134906__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135056135059__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135170135173__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135471135474__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined135622135626__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined135892135896__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined136175136178__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined136540136544__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined136697136700__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined136997137000__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined137675137678__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined137973137987undefined138034138042__WEBPACK_MODULE_REFERENCE__2_5b22757365526f75746572225d_call_directImport_asiSafe1__._undefined138072138086__WEBPACK_MODULE_REFERENCE__2_5b22757365536561726368506172616d73225d_call_directImport_asiSafe1__._undefined138220138227__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138272138279__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138340138347__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138427138434__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138477138484__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138523138530__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138579138586__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138650138657__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138723138730__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138782138789__WEBPACK_MODULE_REFERENCE__1_5b227573655374617465225d_call_directImport_asiSafe1__._undefined138860138870__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined138934138944__WEBPACK_MODULE_REFERENCE__1_5b2275736543616c6c6261636b225d_call_directImport_asiSafe1__._undefined139065139067__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined139577139579__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined139931139933__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined140765140767__WEBPACK_MODULE_REFERENCE__3_5b22617069225d_call_asiSafe1__._undefined141087141095__WEBPACK_MODULE_REFERENCE__1_5b22757365456666656374225d_call_directImport_asiSafe1__._undefined141435141438__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141517141520__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141645141649__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined141740141743__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141867141870__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined141953141956__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined142249142253__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142255142263__WEBPACK_MODULE_REFERENCE__0_5b22467261676d656e74225d_directImport_asiSafe1__._undefined142314142318__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142433142436__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined142686142690__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined142787142791__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined143154143157__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined144039144043__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined144622144625__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined145263145266__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined145675145678__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined146121146125__WEBPACK_MODULE_REFERENCE__0_5b226a737873225d_call_directImport_asiSafe1__._undefined146265146268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined146614146617__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147029147032__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147132147135__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147464147467__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147469147481__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined147560147563__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147754147757__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined147759147771__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined147850147853__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148265148268__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148270148282__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined148358148361__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148671148674__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined148676148688__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined148770148773__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149088149091__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149093149105__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined149180149183__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149492149495__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149497149509__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined149592149595__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149913149916__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined149918149930__WEBPACK_MODULE_REFERENCE__4_5b2264656661756c74225d_directImport_asiSafe1__._undefined150006150009__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined150233150236__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined150621150624__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefined151116151119__WEBPACK_MODULE_REFERENCE__0_5b226a7378225d_call_directImport_asiSafe1__._undefinedtg655739(0,react.useState)undefined762852(0,react.useCallback)undefined13571431(0,react_jsx_runtime.jsx)undefined15281602(0,react_jsx_runtime.jsx)undefined18091885(0,react_jsx_runtime.jsxs)undefined19762050(0,react_jsx_runtime.jsx)undefined21762250(0,react_jsx_runtime.jsx)undefined29363010(0,react_jsx_runtime.jsx)undefined31733249(0,react_jsx_runtime.jsxs)undefined33633437(0,react_jsx_runtime.jsx)undefined38473921(0,react_jsx_runtime.jsx)undefined42914367(0,react_jsx_runtime.jsxs)undefined45804654(0,react_jsx_runtime.jsx)undefined49465020(0,react_jsx_runtime.jsx)undefined52525326(0,react_jsx_runtime.jsx)undefined54325508(0,react_jsx_runtime.jsxs)undefined57185794(0,react_jsx_runtime.jsxs)undefined60026076(0,react_jsx_runtime.jsx)undefined63266402(0,react_jsx_runtime.jsxs)undefined65316605(0,react_jsx_runtime.jsx)undefined68446918(0,react_jsx_runtime.jsx)undefined75017583(0,react.useMemo)undefined90569130(0,react_jsx_runtime.jsx)undefined92079281(0,react_jsx_runtime.jsx)undefined93849460(0,react_jsx_runtime.jsxs)undefined94629541react_jsx_runtime.Fragmentundefined95929666(0,react_jsx_runtime.jsx)undefined98929968(0,react_jsx_runtime.jsxs)undefined1010710181(0,react_jsx_runtime.jsx)undefined1031510389(0,react_jsx_runtime.jsx)undefined1059210666(0,react_jsx_runtime.jsx)undefined1091410990(0,react_jsx_runtime.jsxs)undefined1122811304(0,react_jsx_runtime.jsxs)undefined1143711511(0,react_jsx_runtime.jsx)undefined1169011766(0,react_jsx_runtime.jsxs)undefined1202012096(0,react_jsx_runtime.jsxs)undefined1253512609(0,react_jsx_runtime.jsx)undefined1299113065(0,react_jsx_runtime.jsx)undefined1353113605(0,react_jsx_runtime.jsx)undefined1375113825(0,react_jsx_runtime.jsx)undefined1451314589(0,react_jsx_runtime.jsxs)undefined1472214796(0,react_jsx_runtime.jsx)undefined1497515051(0,react_jsx_runtime.jsxs)undefined1530515381(0,react_jsx_runtime.jsxs)undefined1582015894(0,react_jsx_runtime.jsx)undefined1627816354(0,react_jsx_runtime.jsxs)undefined1707317147(0,react_jsx_runtime.jsx)undefined1729317367(0,react_jsx_runtime.jsx)undefined1820718291(0,react.useState)undefined1832918413(0,react.useState)undefined1909619157api_client/* api */.FHundefined1945319527(0,react_jsx_runtime.jsx)undefined1963219708(0,react_jsx_runtime.jsxs)undefined1991819992(0,react_jsx_runtime.jsx)undefined2009320167(0,react_jsx_runtime.jsx)undefined2026420338(0,react_jsx_runtime.jsx)undefined2051820592(0,react_jsx_runtime.jsx)undefined2069320767(0,react_jsx_runtime.jsx)undefined2120621282(0,react_jsx_runtime.jsxs)undefined2154321617(0,react_jsx_runtime.jsx)undefined2173421808(0,react_jsx_runtime.jsx)undefined2209022164(0,react_jsx_runtime.jsx)undefined2227622350(0,react_jsx_runtime.jsx)undefined2260522679(0,react_jsx_runtime.jsx)undefined2278422858(0,react_jsx_runtime.jsx)undefined2310823184(0,react_jsx_runtime.jsxs)undefined2344923523(0,react_jsx_runtime.jsx)undefined2364023714(0,react_jsx_runtime.jsx)undefined2407624150(0,react_jsx_runtime.jsx)undefined2426224336(0,react_jsx_runtime.jsx)undefined2468824762(0,react_jsx_runtime.jsx)undefined2488124955(0,react_jsx_runtime.jsx)undefined2535425428(0,react_jsx_runtime.jsx)undefined2552325597(0,react_jsx_runtime.jsx)undefined2579925875(0,react_jsx_runtime.jsxs)undefined2600426078(0,react_jsx_runtime.jsx)undefined2631626390(0,react_jsx_runtime.jsx)undefined2682626910(0,react.useState)undefined2695127035(0,react.useState)undefined2709127175(0,react.useState)undefined2721427298(0,react.useState)undefined2734827432(0,react.useState)undefined2748127565(0,react.useState)undefined2760927693(0,react.useState)undefined2773927823(0,react.useState)undefined2786627950(0,react.useState)undefined2800528089(0,react.useState)undefined2813428218(0,react.useState)undefined2824628328(0,react.useMemo)undefined2853428616(0,react.useMemo)undefined2988929950api_client/* api */.FHundefined3048930550api_client/* api */.FHundefined3095131012api_client/* api */.FHundefined3138431458(0,react_jsx_runtime.jsx)undefined3153531609(0,react_jsx_runtime.jsx)undefined3169731773(0,react_jsx_runtime.jsxs)undefined3177531854react_jsx_runtime.Fragmentundefined3190531981(0,react_jsx_runtime.jsxs)undefined3220032274(0,react_jsx_runtime.jsx)undefined3251532589(0,react_jsx_runtime.jsx)undefined3284232916(0,react_jsx_runtime.jsx)undefined3300833084(0,react_jsx_runtime.jsxs)undefined3320733281(0,react_jsx_runtime.jsx)undefined3334633420(0,react_jsx_runtime.jsx)undefined3506435140(0,react_jsx_runtime.jsxs)undefined3573235806(0,react_jsx_runtime.jsx)undefined3588935965(0,react_jsx_runtime.jsxs)undefined3614436218(0,react_jsx_runtime.jsx)undefined3663536709(0,react_jsx_runtime.jsx)undefined3678736861(0,react_jsx_runtime.jsx)undefined3708937163(0,react_jsx_runtime.jsx)undefined3724137315(0,react_jsx_runtime.jsx)undefined3763437708(0,react_jsx_runtime.jsx)undefined3805138125(0,react_jsx_runtime.jsx)undefined3820338277(0,react_jsx_runtime.jsx)undefined3851538589(0,react_jsx_runtime.jsx)undefined3866738741(0,react_jsx_runtime.jsx)undefined3924639320(0,react_jsx_runtime.jsx)undefined3939839472(0,react_jsx_runtime.jsx)undefined3980639880(0,react_jsx_runtime.jsx)undefined3995840032(0,react_jsx_runtime.jsx)undefined4051640590(0,react_jsx_runtime.jsx)undefined4076040836(0,react_jsx_runtime.jsxs)undefined4122941303(0,react_jsx_runtime.jsx)undefined4139641470(0,react_jsx_runtime.jsx)undefined4161341687(0,react_jsx_runtime.jsx)undefined4202142095(0,react_jsx_runtime.jsx)undefined4224242318(0,react_jsx_runtime.jsxs)undefined4258442660(0,react_jsx_runtime.jsxs)undefined4299243066(0,react_jsx_runtime.jsx)undefined4335743431(0,react_jsx_runtime.jsx)undefined4380243878(0,react_jsx_runtime.jsxs)undefined4388043959react_jsx_runtime.Fragmentundefined4405044126(0,react_jsx_runtime.jsxs)undefined4437744451(0,react_jsx_runtime.jsx)undefined4459644670(0,react_jsx_runtime.jsx)undefined4518145255(0,react_jsx_runtime.jsx)undefined4540445478(0,react_jsx_runtime.jsx)undefined4638446460(0,react_jsx_runtime.jsxs)undefined4688946963(0,react_jsx_runtime.jsx)undefined4712647200(0,react_jsx_runtime.jsx)undefined4786147935(0,react_jsx_runtime.jsx)undefined4809548169(0,react_jsx_runtime.jsx)undefined4882748901(0,react_jsx_runtime.jsx)undefined4905449128(0,react_jsx_runtime.jsx)undefined4973349809(0,react_jsx_runtime.jsxs)undefined5024250316(0,react_jsx_runtime.jsx)undefined5048150555(0,react_jsx_runtime.jsx)undefined5135251426(0,react_jsx_runtime.jsx)undefined5158651660(0,react_jsx_runtime.jsx)undefined5244752521(0,react_jsx_runtime.jsx)undefined5268852762(0,react_jsx_runtime.jsx)undefined5364453718(0,react_jsx_runtime.jsx)undefined5386153935(0,react_jsx_runtime.jsx)undefined5453354609(0,react_jsx_runtime.jsxs)undefined5478654860(0,react_jsx_runtime.jsx)undefined5519655270(0,react_jsx_runtime.jsx)undefined5569655770(0,react_jsx_runtime.jsx)undefined5650356579(0,react_jsx_runtime.jsxs)undefined5658156660react_jsx_runtime.Fragmentundefined5675156827(0,react_jsx_runtime.jsxs)undefined5731057386(0,react_jsx_runtime.jsxs)undefined5751557589(0,react_jsx_runtime.jsx)undefined5786157935(0,react_jsx_runtime.jsx)undefined5816358239(0,react_jsx_runtime.jsxs)undefined5836858442(0,react_jsx_runtime.jsx)undefined5871058784(0,react_jsx_runtime.jsx)undefined5901759093(0,react_jsx_runtime.jsxs)undefined5922259296(0,react_jsx_runtime.jsx)undefined5957059644(0,react_jsx_runtime.jsx)undefined5987459950(0,react_jsx_runtime.jsxs)undefined6007960153(0,react_jsx_runtime.jsx)undefined6042260496(0,react_jsx_runtime.jsx)undefined6072160797(0,react_jsx_runtime.jsxs)undefined6092661000(0,react_jsx_runtime.jsx)undefined6127661350(0,react_jsx_runtime.jsx)undefined6158261658(0,react_jsx_runtime.jsxs)undefined6178761861(0,react_jsx_runtime.jsx)undefined6212962203(0,react_jsx_runtime.jsx)undefined6227862352(0,react_jsx_runtime.jsx)undefined6265262728(0,react_jsx_runtime.jsxs)undefined6285762931(0,react_jsx_runtime.jsx)undefined6320263276(0,react_jsx_runtime.jsx)undefined6350863584(0,react_jsx_runtime.jsxs)undefined6371363787(0,react_jsx_runtime.jsx)undefined6405564129(0,react_jsx_runtime.jsx)undefined6446464540(0,react_jsx_runtime.jsxs)undefined6484564919(0,react_jsx_runtime.jsx)undefined6516165235(0,react_jsx_runtime.jsx)undefined6543365509(0,react_jsx_runtime.jsxs)undefined6576065834(0,react_jsx_runtime.jsx)undefined6624066314(0,react_jsx_runtime.jsx)undefined6676466838(0,react_jsx_runtime.jsx)undefined6745767531(0,react_jsx_runtime.jsx)undefined6766667740(0,react_jsx_runtime.jsx)undefined6819668270(0,react_jsx_runtime.jsx)undefined6859868682(0,react.useState)undefined6872068804(0,react.useState)undefined6979669857api_client/* api */.FHundefined7016970243(0,react_jsx_runtime.jsx)undefined7034870424(0,react_jsx_runtime.jsxs)undefined7063470708(0,react_jsx_runtime.jsx)undefined7081570889(0,react_jsx_runtime.jsx)undefined7098571059(0,react_jsx_runtime.jsx)undefined7142671500(0,react_jsx_runtime.jsx)undefined7159771671(0,react_jsx_runtime.jsx)undefined7185171925(0,react_jsx_runtime.jsx)undefined7202672100(0,react_jsx_runtime.jsx)undefined7253972613(0,react_jsx_runtime.jsx)undefined7270972783(0,react_jsx_runtime.jsx)undefined7302073096(0,react_jsx_runtime.jsxs)undefined7335773431(0,react_jsx_runtime.jsx)undefined7354773621(0,react_jsx_runtime.jsx)undefined7399174065(0,react_jsx_runtime.jsx)undefined7418674260(0,react_jsx_runtime.jsx)undefined7467374747(0,react_jsx_runtime.jsx)undefined7484574919(0,react_jsx_runtime.jsx)undefined7514175215(0,react_jsx_runtime.jsx)undefined7531075384(0,react_jsx_runtime.jsx)undefined7558675662(0,react_jsx_runtime.jsxs)undefined7579175865(0,react_jsx_runtime.jsx)undefined7610376177(0,react_jsx_runtime.jsx)undefined7662576709(0,react.useState)undefined7675076834(0,react.useState)undefined7689076974(0,react.useState)undefined7702477108(0,react.useState)undefined7717477258(0,react.useState)undefined7730177385(0,react.useState)undefined7743177515(0,react.useState)undefined7755877642(0,react.useState)undefined7769777781(0,react.useState)undefined7782677910(0,react.useState)undefined7794478026(0,react.useMemo)undefined7823578317(0,react.useMemo)undefined7846178543(0,react.useMemo)undefined8009080151api_client/* api */.FHundefined8057280633api_client/* api */.FHundefined8102381097(0,react_jsx_runtime.jsx)undefined8117481248(0,react_jsx_runtime.jsx)undefined8133681412(0,react_jsx_runtime.jsxs)undefined8141481493react_jsx_runtime.Fragmentundefined8154481620(0,react_jsx_runtime.jsxs)undefined8183981913(0,react_jsx_runtime.jsx)undefined8213382207(0,react_jsx_runtime.jsx)undefined8246682540(0,react_jsx_runtime.jsx)undefined8263282708(0,react_jsx_runtime.jsxs)undefined8283182905(0,react_jsx_runtime.jsx)undefined8297083044(0,react_jsx_runtime.jsx)undefined8432484400(0,react_jsx_runtime.jsxs)undefined8499285066(0,react_jsx_runtime.jsx)undefined8516285238(0,react_jsx_runtime.jsxs)undefined8555685630(0,react_jsx_runtime.jsx)undefined8570885782(0,react_jsx_runtime.jsx)undefined8600786081(0,react_jsx_runtime.jsx)undefined8615986233(0,react_jsx_runtime.jsx)undefined8652886602(0,react_jsx_runtime.jsx)undefined8668086754(0,react_jsx_runtime.jsx)undefined8708287156(0,react_jsx_runtime.jsx)undefined8723487310(0,react_jsx_runtime.jsxs)undefined8775787831(0,react_jsx_runtime.jsx)undefined8826788341(0,react_jsx_runtime.jsx)undefined8930189377(0,react_jsx_runtime.jsxs)undefined8971689790(0,react_jsx_runtime.jsx)undefined8986889942(0,react_jsx_runtime.jsx)undefined9040690480(0,react_jsx_runtime.jsx)undefined9057390647(0,react_jsx_runtime.jsx)undefined9078490858(0,react_jsx_runtime.jsx)undefined9123491308(0,react_jsx_runtime.jsx)undefined9146191537(0,react_jsx_runtime.jsxs)undefined9180391877(0,react_jsx_runtime.jsx)undefined9215692232(0,react_jsx_runtime.jsxs)undefined9244392517(0,react_jsx_runtime.jsx)undefined9264692720(0,react_jsx_runtime.jsx)undefined9316793241(0,react_jsx_runtime.jsx)undefined9337493448(0,react_jsx_runtime.jsx)undefined9424294316(0,react_jsx_runtime.jsx)undefined9444494518(0,react_jsx_runtime.jsx)undefined9503895114(0,react_jsx_runtime.jsxs)undefined9548795561(0,react_jsx_runtime.jsx)undefined9570995783(0,react_jsx_runtime.jsx)undefined9650096574(0,react_jsx_runtime.jsx)undefined9672796801(0,react_jsx_runtime.jsx)undefined9759397667(0,react_jsx_runtime.jsx)undefined9779797871(0,react_jsx_runtime.jsx)undefined9837698450(0,react_jsx_runtime.jsx)undefined9857798651(0,react_jsx_runtime.jsx)undefined9916999245(0,react_jsx_runtime.jsxs)undefined9939899472(0,react_jsx_runtime.jsx)undefined9977499848(0,react_jsx_runtime.jsx)undefined100226100300(0,react_jsx_runtime.jsx)undefined100978101052(0,react_jsx_runtime.jsx)undefined101379101463(0,react.useState)undefined101517101601(0,react.useState)undefined101655101739(0,react.useState)undefined101874101958(0,react.useState)undefined102327102388api_client/* api */.FHundefined102913102974api_client/* api */.FHundefined103347103421(0,react_jsx_runtime.jsx)undefined103498103572(0,react_jsx_runtime.jsx)undefined103660103736(0,react_jsx_runtime.jsxs)undefined103738103817react_jsx_runtime.Fragmentundefined103868103944(0,react_jsx_runtime.jsxs)undefined104059104135(0,react_jsx_runtime.jsxs)undefined104224104298(0,react_jsx_runtime.jsx)undefined104442104516(0,react_jsx_runtime.jsx)undefined104780104854(0,react_jsx_runtime.jsx)undefined104964105038(0,react_jsx_runtime.jsx)undefined105387105461(0,react_jsx_runtime.jsx)undefined105553105629(0,react_jsx_runtime.jsxs)undefined105752105826(0,react_jsx_runtime.jsx)undefined105891105967(0,react_jsx_runtime.jsxs)undefined106071106145(0,react_jsx_runtime.jsx)undefined106307106381(0,react_jsx_runtime.jsx)undefined106542106616(0,react_jsx_runtime.jsx)undefined106775106849(0,react_jsx_runtime.jsx)undefined107088107162(0,react_jsx_runtime.jsx)undefined107245107321(0,react_jsx_runtime.jsxs)undefined107433107507(0,react_jsx_runtime.jsx)undefined107585107659(0,react_jsx_runtime.jsx)undefined107883107957(0,react_jsx_runtime.jsx)undefined108130108204(0,react_jsx_runtime.jsx)undefined108375108449(0,react_jsx_runtime.jsx)undefined108527108601(0,react_jsx_runtime.jsx)undefined109065109139(0,react_jsx_runtime.jsx)undefined109232109306(0,react_jsx_runtime.jsx)undefined109439109515(0,react_jsx_runtime.jsxs)undefined109769109843(0,react_jsx_runtime.jsx)undefined110152110226(0,react_jsx_runtime.jsx)undefined110468110542(0,react_jsx_runtime.jsx)undefined110878110952(0,react_jsx_runtime.jsx)undefined111100111176(0,react_jsx_runtime.jsxs)undefined111442111516(0,react_jsx_runtime.jsx)undefined111646111720(0,react_jsx_runtime.jsx)undefined111834111908(0,react_jsx_runtime.jsx)undefined112580112654(0,react_jsx_runtime.jsx)undefined112775112849(0,react_jsx_runtime.jsx)undefined113254113328(0,react_jsx_runtime.jsx)undefined113440113514(0,react_jsx_runtime.jsx)undefined114194114270(0,react_jsx_runtime.jsxs)undefined114423114497(0,react_jsx_runtime.jsx)undefined114794114868(0,react_jsx_runtime.jsx)undefined115444115528(0,react.useState)undefined115566115650(0,react.useState)undefined116191116252api_client/* api */.FHundefined116565116639(0,react_jsx_runtime.jsx)undefined116744116820(0,react_jsx_runtime.jsxs)undefined117030117104(0,react_jsx_runtime.jsx)undefined117212117286(0,react_jsx_runtime.jsx)undefined117384117458(0,react_jsx_runtime.jsx)undefined117866117940(0,react_jsx_runtime.jsx)undefined118046118120(0,react_jsx_runtime.jsx)undefined118316118390(0,react_jsx_runtime.jsx)undefined118488118562(0,react_jsx_runtime.jsx)undefined118746118820(0,react_jsx_runtime.jsx)undefined118919118993(0,react_jsx_runtime.jsx)undefined119354119430(0,react_jsx_runtime.jsxs)undefined119559119633(0,react_jsx_runtime.jsx)undefined119871119945(0,react_jsx_runtime.jsx)undefined120403120487(0,react.useState)undefined120578120654(0,react_jsx_runtime.jsxs)undefined120656120735react_jsx_runtime.Fragmentundefined120786120862(0,react_jsx_runtime.jsxs)undefined120977121053(0,react_jsx_runtime.jsxs)undefined121142121216(0,react_jsx_runtime.jsx)undefined121357121431(0,react_jsx_runtime.jsx)undefined121701121775(0,react_jsx_runtime.jsx)undefined121885121959(0,react_jsx_runtime.jsx)undefined122258122332(0,react_jsx_runtime.jsx)undefined122820122896(0,react_jsx_runtime.jsxs)undefined123137123211(0,react_jsx_runtime.jsx)undefined123607123681(0,react_jsx_runtime.jsx)undefined123964124038(0,react_jsx_runtime.jsx)undefined124449124523(0,react_jsx_runtime.jsx)undefined124835124909(0,react_jsx_runtime.jsx)undefined125229125303(0,react_jsx_runtime.jsx)undefined125719125793(0,react_jsx_runtime.jsx)undefined126162126236(0,react_jsx_runtime.jsx)undefined126365126439(0,react_jsx_runtime.jsx)undefined126785126869(0,react.useState)undefined126910126994(0,react.useState)undefined127033127117(0,react.useState)undefined127143127233(0,react.useCallback)undefined127372127433api_client/* api */.FHundefined127757127843(0,react.useEffect)undefined127935128009(0,react_jsx_runtime.jsx)undefined128086128160(0,react_jsx_runtime.jsx)undefined128269128343(0,react_jsx_runtime.jsx)undefined128420128494(0,react_jsx_runtime.jsx)undefined128595128669(0,react_jsx_runtime.jsx)undefined128746128820(0,react_jsx_runtime.jsx)undefined128926129002(0,react_jsx_runtime.jsxs)undefined129004129083react_jsx_runtime.Fragmentundefined129134129210(0,react_jsx_runtime.jsxs)undefined129325129401(0,react_jsx_runtime.jsxs)undefined129490129564(0,react_jsx_runtime.jsx)undefined129702129776(0,react_jsx_runtime.jsx)undefined130021130095(0,react_jsx_runtime.jsx)undefined130205130279(0,react_jsx_runtime.jsx)undefined130559130633(0,react_jsx_runtime.jsx)undefined130725130801(0,react_jsx_runtime.jsxs)undefined130924130998(0,react_jsx_runtime.jsx)undefined131063131139(0,react_jsx_runtime.jsxs)undefined131243131317(0,react_jsx_runtime.jsx)undefined131474131548(0,react_jsx_runtime.jsx)undefined131707131781(0,react_jsx_runtime.jsx)undefined131940132014(0,react_jsx_runtime.jsx)undefined132172132246(0,react_jsx_runtime.jsx)undefined132486132560(0,react_jsx_runtime.jsx)undefined132641132717(0,react_jsx_runtime.jsxs)undefined132829132903(0,react_jsx_runtime.jsx)undefined133335133409(0,react_jsx_runtime.jsx)undefined133487133561(0,react_jsx_runtime.jsx)undefined133889133965(0,react_jsx_runtime.jsxs)undefined134369134445(0,react_jsx_runtime.jsxs)undefined135044135118(0,react_jsx_runtime.jsx)undefined135467135541(0,react_jsx_runtime.jsx)undefined136390136474(0,react.useState)undefined136529136613(0,react.useState)undefined136656136740(0,react.useState)undefined136846136907api_client/* api */.FHundefined137266137342(0,react_jsx_runtime.jsxs)undefined137344137423react_jsx_runtime.Fragmentundefined137474137550(0,react_jsx_runtime.jsxs)undefined137665137741(0,react_jsx_runtime.jsxs)undefined137830137904(0,react_jsx_runtime.jsx)undefined138045138121(0,react_jsx_runtime.jsxs)undefined138491138565(0,react_jsx_runtime.jsx)undefined138675138749(0,react_jsx_runtime.jsx)undefined139041139115(0,react_jsx_runtime.jsx)undefined139207139283(0,react_jsx_runtime.jsxs)undefined139406139480(0,react_jsx_runtime.jsx)undefined139545139621(0,react_jsx_runtime.jsxs)undefined139725139799(0,react_jsx_runtime.jsx)undefined139956140030(0,react_jsx_runtime.jsx)undefined140189140263(0,react_jsx_runtime.jsx)undefined140420140494(0,react_jsx_runtime.jsx)undefined140654140728(0,react_jsx_runtime.jsx)undefined140968141042(0,react_jsx_runtime.jsx)undefined141252141328(0,react_jsx_runtime.jsxs)undefined141630141706(0,react_jsx_runtime.jsxs)undefined141834141908(0,react_jsx_runtime.jsx)undefined142133142207(0,react_jsx_runtime.jsx)undefined142756142830(0,react_jsx_runtime.jsx)undefined143374143448(0,react_jsx_runtime.jsx)undefined143526143600(0,react_jsx_runtime.jsx)undefined143907143981(0,react_jsx_runtime.jsx)undefined144318144392(0,react_jsx_runtime.jsx)undefined144758144834(0,react_jsx_runtime.jsxs)undefined145228145302(0,react_jsx_runtime.jsx)undefined145856145930(0,react_jsx_runtime.jsx)undefined146882146956(0,react_jsx_runtime.jsx)undefined147049147123(0,react_jsx_runtime.jsx)undefined147280147354(0,react_jsx_runtime.jsx)undefined147675147749(0,react_jsx_runtime.jsx)undefined147897147973(0,react_jsx_runtime.jsxs)undefined148239148315(0,react_jsx_runtime.jsxs)undefined148594148668(0,react_jsx_runtime.jsx)undefined149030149106(0,react_jsx_runtime.jsxs)undefined149259149333(0,react_jsx_runtime.jsx)undefined149630149704(0,react_jsx_runtime.jsx)undefined150463150547(0,react.useState)undefined150585150669(0,react.useState)undefined151067151128api_client/* api */.FHundefined151425151499(0,react_jsx_runtime.jsx)undefined151604151680(0,react_jsx_runtime.jsxs)undefined151890151964(0,react_jsx_runtime.jsx)undefined152073152147(0,react_jsx_runtime.jsx)undefined152243152317(0,react_jsx_runtime.jsx)undefined152626152700(0,react_jsx_runtime.jsx)undefined152798152872(0,react_jsx_runtime.jsx)undefined153189153263(0,react_jsx_runtime.jsx)undefined153364153438(0,react_jsx_runtime.jsx)undefined154000154074(0,react_jsx_runtime.jsx)undefined154170154244(0,react_jsx_runtime.jsx)undefined154736154812(0,react_jsx_runtime.jsxs)undefined154941155015(0,react_jsx_runtime.jsx)undefined155253155327(0,react_jsx_runtime.jsx)undefined155771155855(0,react.useState)undefined155893155977(0,react.useState)undefined156281156342api_client/* api */.FHundefined156650156724(0,react_jsx_runtime.jsx)undefined156829156905(0,react_jsx_runtime.jsxs)undefined157115157189(0,react_jsx_runtime.jsx)undefined157293157367(0,react_jsx_runtime.jsx)undefined157463157537(0,react_jsx_runtime.jsx)undefined157846157920(0,react_jsx_runtime.jsx)undefined158021158095(0,react_jsx_runtime.jsx)undefined158657158731(0,react_jsx_runtime.jsx)undefined158833158907(0,react_jsx_runtime.jsx)undefined159464159540(0,react_jsx_runtime.jsxs)undefined159669159743(0,react_jsx_runtime.jsx)undefined159981160055(0,react_jsx_runtime.jsx)undefined160547160631(0,react.useState)undefined160686160770(0,react.useState)undefined160813160897(0,react.useState)undefined161003161064api_client/* api */.FHundefined161421161497(0,react_jsx_runtime.jsxs)undefined161616161692(0,react_jsx_runtime.jsxs)undefined162007162083(0,react_jsx_runtime.jsxs)undefined162387162461(0,react_jsx_runtime.jsx)undefined162724162798(0,react_jsx_runtime.jsx)undefined163107163183(0,react_jsx_runtime.jsxs)undefined163599163673(0,react_jsx_runtime.jsx)undefined163883163959(0,react_jsx_runtime.jsxs)undefined164106164180(0,react_jsx_runtime.jsx)undefined164253164329(0,react_jsx_runtime.jsxs)undefined164449164523(0,react_jsx_runtime.jsx)undefined164704164778(0,react_jsx_runtime.jsx)undefined164961165035(0,react_jsx_runtime.jsx)undefined165216165290(0,react_jsx_runtime.jsx)undefined165474165548(0,react_jsx_runtime.jsx)undefined165723165797(0,react_jsx_runtime.jsx)undefined166031166107(0,react_jsx_runtime.jsxs)undefined166449166525(0,react_jsx_runtime.jsxs)undefined166669166743(0,react_jsx_runtime.jsx)undefined166992167066(0,react_jsx_runtime.jsx)undefined167760167834(0,react_jsx_runtime.jsx)undefined167920167994(0,react_jsx_runtime.jsx)undefined168341168415(0,react_jsx_runtime.jsx)undefined168800168874(0,react_jsx_runtime.jsx)undefined169288169364(0,react_jsx_runtime.jsxs)undefined169806169880(0,react_jsx_runtime.jsx)undefined170702170776(0,react_jsx_runtime.jsx)undefined171867171941(0,react_jsx_runtime.jsx)undefined172050172124(0,react_jsx_runtime.jsx)undefined172274172348(0,react_jsx_runtime.jsx)undefined172459172533(0,react_jsx_runtime.jsx)undefined172831172905(0,react_jsx_runtime.jsx)undefined173053173129(0,react_jsx_runtime.jsxs)undefined173395173471(0,react_jsx_runtime.jsxs)undefined173750173824(0,react_jsx_runtime.jsx)undefined174186174262(0,react_jsx_runtime.jsxs)undefined174415174489(0,react_jsx_runtime.jsx)undefined174786174860(0,react_jsx_runtime.jsx)undefined175535175609(0,react_jsx_runtime.jsx)undefined175950176036(0,navigation.useRouter)undefined176066176164(0,navigation.useSearchParams)undefined176298176382(0,react.useState)undefined176427176511(0,react.useState)undefined176572176656(0,react.useState)undefined176736176820(0,react.useState)undefined176863176947(0,react.useState)undefined176986177070(0,react.useState)undefined177119177203(0,react.useState)undefined177267177351(0,react.useState)undefined177417177501(0,react.useState)undefined177553177637(0,react.useState)undefined177708177798(0,react.useCallback)undefined177862177952(0,react.useCallback)undefined178073178134api_client/* api */.FHundefined178644178705api_client/* api */.FHundefined179057179118api_client/* api */.FHundefined179950180011api_client/* api */.FHundefined180331180417(0,react.useEffect)undefined180757180831(0,react_jsx_runtime.jsx)undefined180910180984(0,react_jsx_runtime.jsx)undefined181109181185(0,react_jsx_runtime.jsxs)undefined181276181350(0,react_jsx_runtime.jsx)undefined181474181548(0,react_jsx_runtime.jsx)undefined181631181705(0,react_jsx_runtime.jsx)undefined181998182074(0,react_jsx_runtime.jsxs)undefined182076182155react_jsx_runtime.Fragmentundefined182206182282(0,react_jsx_runtime.jsxs)undefined182397182471(0,react_jsx_runtime.jsx)undefined182721182797(0,react_jsx_runtime.jsxs)undefined182894182970(0,react_jsx_runtime.jsxs)undefined183333183407(0,react_jsx_runtime.jsx)undefined184289184365(0,react_jsx_runtime.jsxs)undefined184944185018(0,react_jsx_runtime.jsx)undefined185656185730(0,react_jsx_runtime.jsx)undefined186139186213(0,react_jsx_runtime.jsx)undefined186656186732(0,react_jsx_runtime.jsxs)undefined186872186946(0,react_jsx_runtime.jsx)undefined187292187366(0,react_jsx_runtime.jsx)undefined187778187852(0,react_jsx_runtime.jsx)undefined187952188026(0,react_jsx_runtime.jsx)undefined188355188429(0,react_jsx_runtime.jsx)undefined188431188508ErrorBoundaryundefined188587188661(0,react_jsx_runtime.jsx)undefined188852188926(0,react_jsx_runtime.jsx)undefined188928189005ErrorBoundaryundefined189084189158(0,react_jsx_runtime.jsx)undefined189570189644(0,react_jsx_runtime.jsx)undefined189646189723ErrorBoundaryundefined189799189873(0,react_jsx_runtime.jsx)undefined190183190257(0,react_jsx_runtime.jsx)undefined190259190336ErrorBoundaryundefined190418190492(0,react_jsx_runtime.jsx)undefined190807190881(0,react_jsx_runtime.jsx)undefined190883190960ErrorBoundaryundefined191035191109(0,react_jsx_runtime.jsx)undefined191418191492(0,react_jsx_runtime.jsx)undefined191494191571ErrorBoundaryundefined191654191728(0,react_jsx_runtime.jsx)undefined192046192120(0,react_jsx_runtime.jsx)undefined192122192199ErrorBoundaryundefined192275192349(0,react_jsx_runtime.jsx)undefined192573192647(0,react_jsx_runtime.jsx)undefined193032193106(0,react_jsx_runtime.jsx)undefined193598193672(0,react_jsx_runtime.jsx)undefinedīū˙˙ņū˙˙, /***/ 9902:  Ģwebpack/lib/util/registerExternalSerializerœwebpack-sources/ConcatSource€Ģwebpack/lib/util/registerExternalSerializer™webpack-sources/RawSource$/***/ ((module) => { "use strict"; !module.exports = require("path");  /***/ }) āū˙˙O/***/ ((module) => { "use strict"; module.exports = require("path"); /***/ }) áū˙˙äū˙˙ åū˙˙æū˙˙įū˙˙!module.exports = require("path");æū˙˙čū˙˙w }; ; // load runtime var __webpack_require__ = require("../../webpack-runtime.js"); __webpack_require__.C(exports); žvar __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = __webpack_require__.X(0, [5873,4792], () => (__webpack_exec__(9108))); ,module.exports = __webpack_exports__; })(); Ú`Į(() => { var exports = {}; exports.id = 5105; exports.ids = [5105]; exports.modules = { /***/ 261: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/app-paths"); /***/ }), /***/ 846: /***/ ((module) => { "use strict"; module.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js"); /***/ }), /***/ 1025: /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js"); /***/ }), /***/ 1135: /***/ (() => { /***/ }), /***/ 1459: /***/ (() => { /***/ }), /***/ 1619: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3597, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6893, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9748, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6060, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7184, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9576, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3041, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1384, 23)); /***/ }), /***/ 1662: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ RootLayout), /* harmony export */ metadata: () => (/* binding */ metadata) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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 _globals_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1135); /* harmony import */ var _globals_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_globals_css__WEBPACK_IMPORTED_MODULE_1__); const metadata = { title: "COSMIC AI-Risk SaaS", description: "Commercial multi-tenant COSMIC AI-Risk governance platform" }; function RootLayout({ children }) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("html", { lang: "en", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("body", { children: children }) }); } /***/ }), /***/ 2378: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1330); /* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useRouter")) __webpack_require__.d(__webpack_exports__, { useRouter: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useRouter; } }); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useSearchParams")) __webpack_require__.d(__webpack_exports__, { useSearchParams: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useSearchParams; } }); //# sourceMappingURL=navigation.js.map /***/ }), /***/ 3033: /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js"); /***/ }), /***/ 3295: /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js"); /***/ }), /***/ 3676: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 4744)); /***/ }), /***/ 4194: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FH: () => (/* binding */ api), /* harmony export */ Ht: () => (/* binding */ getSession), /* harmony export */ ri: () => (/* binding */ logout) /* harmony export */ }); const BASE = ''; async function request(method, path, body) { const opts = { method, headers: { 'Content-Type': 'application/json' } }; if (body) opts.body = JSON.stringify(body); const res = await fetch(`${BASE}${path}`, opts); const data = res.headers.get('content-type')?.includes('application/json') ? await res.json() : await res.text(); if (!res.ok) throw new Error(data?.error || data?.message || `Request failed (${res.status})`); return data; } const api = { get: (path)=>request('GET', path), post: (path, body)=>request('POST', path, body), put: (path, body)=>request('PUT', path, body), patch: (path, body)=>request('PATCH', path, body), del: (path)=>request('DELETE', path) }; async function getSession() { try { const data = await api.get('/api/auth/session'); return data.user || data.actor || null; } catch { return null; } } async function logout() { await api.post('/api/auth/logout'); window.location.href = '/'; } /***/ }), /***/ 4744: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); // This file is generated by the Webpack next-flight-loader. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)( function() { throw new Error("Attempted to call the default export of \"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\\\\components\\\\AppShell.jsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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\\components\\AppShell.jsx", "default", )); /***/ }), /***/ 5498: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9672)); /***/ }), /***/ 5883: /***/ (() => { /***/ }), /***/ 6114: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610)); /***/ }), /***/ 6439: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/no-fallback-error.external"); /***/ }), /***/ 6713: /***/ ((module) => { "use strict"; module.exports = require("next/dist/shared/lib/router/utils/is-bot"); /***/ }), /***/ 7228: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8698)); /***/ }), /***/ 7275: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 4160, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1603, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8495, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 5170, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7526, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8922, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9234, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2263, 23)); ; Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2146)); /***/ }), /***/ 7513: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ DashboardLayout) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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__(4515); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_AppShell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4744); function DashboardLayout({ children }) { return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(react__WEBPACK_IMPORTED_MODULE_1__.Suspense, { fallback: /*#__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" }) }), children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_AppShell__WEBPACK_IMPORTED_MODULE_2__["default"], { children: children }) }); } /***/ }), /***/ 8354: /***/ ((module) => { "use strict"; module.exports = require("util"); /***/ }), /***/ 8698: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ AppShell) /* 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 NAV_ITEMS = [ { label: 'Overview', tab: 'Overview', icon: '◇' }, { label: 'Risks', tab: 'Risks', icon: '⚠' }, { label: 'Mitigations', tab: 'Mitigations', icon: '●' }, { label: 'Gate', tab: 'Gate', icon: '⊞' }, { label: 'Integrations', tab: 'Integrations', icon: '⇆' } ]; function AppShell({ children }) { const [user, setUser] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [sidebarOpen, setSidebarOpen] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [loading, setLoading] = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true); const router = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)(); const searchParams = (0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)(); const currentTab = searchParams.get('tab') || 'Overview'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(()=>{ (0,_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .getSession */ .Ht)().then((u)=>{ if (!u) { router.replace('/login'); return; } setUser(u); setLoading(false); }); }, [ router ]); 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" }) }); } return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "app-shell", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: "sidebar-toggle", onClick: ()=>setSidebarOpen(!sidebarOpen), children: sidebarOpen ? '✕' : '☰' }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("aside", { className: `sidebar ${sidebarOpen ? 'open' : ''}`, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-brand", children: "COSMIC" }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("div", { className: "sidebar-user", children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-user-name", children: user.displayName }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-user-email", children: user.email }) ] }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("nav", { className: "sidebar-nav", children: NAV_ITEMS.map((item)=>{ const active = currentTab === item.tab; return /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)("a", { href: `/dashboard?tab=${item.tab}`, className: `sidebar-link ${active ? 'active' : ''}`, onClick: (e)=>{ e.preventDefault(); setSidebarOpen(false); router.push(`/dashboard?tab=${item.tab}`); }, children: [ /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("span", { className: "sidebar-icon", children: item.icon }), item.label ] }, item.tab); }) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-footer", children: /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("button", { className: "sidebar-logout", onClick: _lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .logout */ .ri, children: "Sign out" }) }) ] }), sidebarOpen && /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("div", { className: "sidebar-overlay", onClick: ()=>setSidebarOpen(false) }), /*#__PURE__*/ (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)("main", { className: "app-main", children: children }) ] }); } /***/ }), /***/ 9108: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9754); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9117); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6595); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2324); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9326); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8928); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(175); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4290); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2696); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2574); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2802); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7533); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5229); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2822); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(6453); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2474); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(6713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(1356); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(2685); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(6225); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(3446); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(2762); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(5742); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(6439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(1170); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(2506); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(1203); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); const module0 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 1662)); const module1 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23)); const module2 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7028, 23)); const module3 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 461, 23)); const module4 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2768, 23)); const module5 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 7513)); const page6 = () => Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610)); // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ 'dashboard', { children: ['__PAGE__', {}, { page: [page6, "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"], }] }, { 'layout': [module5, "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\\layout.jsx"], } ] }, { 'layout': [module0, "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\\layout.jsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "next/dist/client/components/builtin/not-found.js"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], } ] }.children; const pages = ["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"]; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; // Create and export the route module that will be consumed. const routeModule = new next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModule({ definition: { kind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, page: "/dashboard/page", pathname: "/dashboard", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: ".next" || 0, relativeProjectDir: false || '' }); async function handler(req, res, ctx) { var _this; let srcPage = "/dashboard/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (false) {} else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = false; const initialPostponed = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = (0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__.normalizeAppPath)(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.getBotType)(userAgent); const isHtmlBot = (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.isHtmlBotRequest)(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isPrefetchRSCRequest') ?? req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'isRSCRequest') ?? (0,next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__/* .isRSCRequestHeader */ .f)(req.headers[next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_HEADER]); const isPossibleServerAction = (0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__.getIsPossibleServerAction)(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = (0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = false && 0; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : (0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.shouldServeStreamingMetadata)(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { (0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)(req.headers); } const ComponentMod = { ...next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__, tree, pages, GlobalError: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default()), handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { (0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__.setReferenceManifestsSingleton)({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: (0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__.createServerModuleMap)({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = (0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequest(req); const nextRes = new next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (false) {} return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: (0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: true ? (__webpack_require__(9902).join)(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : 0, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = (0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.parseFallbackField)(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.PRERENDER && (0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.isBot)(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackMode.NOT_FOUND) { throw new next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.PAGES, html: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && ((0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'renderFallbackShell') || isDebugFallbackShell) ? (0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].fromStatic(matchedSegment, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: (0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__.RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"].fromStatic(cachedData.rscData, next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__.ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (false) {} // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return (0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: (0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map /***/ }), /***/ 9121: /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/action-async-storage.external.js"); /***/ }), /***/ 9294: /***/ ((module) => { "use strict"; module.exports = require("next/dist/server/app-render/work-async-storage.external.js"); /***/ }), /***/ 9610: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); // This file is generated by the Webpack next-flight-loader. /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)( function() { throw new Error("Attempted to call the default export of \"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\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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", "default", )); /***/ }), /***/ 9672: /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; // ESM COMPAT FLAG __webpack_require__.r(__webpack_exports__); // EXPORTS __webpack_require__.d(__webpack_exports__, { "default": () => (/* binding */ DashboardPage) }); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.js var react_jsx_runtime = __webpack_require__(1124); // EXTERNAL MODULE: ./node_modules/next/dist/server/route-modules/app-page/vendored/ssr/react.js var react = __webpack_require__(8301); // EXTERNAL MODULE: ./node_modules/next/dist/api/navigation.js var navigation = __webpack_require__(2378); // EXTERNAL MODULE: ./src/lib/api-client.js var api_client = __webpack_require__(4194); ;// ./src/components/ErrorBoundary.jsx /* __next_internal_client_entry_do_not_use__ default auto */ class ErrorBoundary extends react.Component { constructor(props){ super(props); this.state = { error: null }; } static getDerivedStateFromError(error) { return { error }; } render() { if (this.state.error) { const { fallback } = this.props; if (fallback) return typeof fallback === 'function' ? fallback(this.state.error) : fallback; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "empty-state", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { children: [ "Something went wrong in ", this.props.name || 'this section', "." ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: this.state.error.message }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>{ this.setState({ error: null }); this.props.onRetry?.(); }, children: "Retry" }) ] }); } return this.props.children; } } ;// ./src/app/dashboard/page.jsx /* __next_internal_client_entry_do_not_use__ default auto */ const TABS = [ 'Overview', 'Projects', 'Risks', 'Mitigations', 'Gate', 'Integrations', 'Audit' ]; const PAGE_SIZE = 20; const DIMENSIONS = [ 'Technical', 'Governance', 'Legal', 'Ethical', 'Operational' ]; const LIFECYCLE_PHASES = [ 'Design', 'Development', 'Testing', 'Deployment' ]; const RISK_STATUSES = [ 'OPEN', 'IN_MITIGATION', 'ACCEPTED', 'CLOSED' ]; const MITIGATION_STATUSES = [ 'NOT_STARTED', 'IN_PROGRESS', 'DONE', 'REJECTED' ]; function useToast() { const [toasts, setToasts] = (0,react.useState)([]); const add = (0,react.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.jsx)("div", { className: "toast-container", children: toasts.map((t)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `toast ${t.type}`, children: t.message }, t.id)) }); } function SearchInput({ value, onChange, placeholder }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "search-wrap", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "search-icon", children: "⌕" }), /*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("span", { className: `badge ${className || ''}`, children: children }); } function FormField({ label, children }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 10 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("label", { style: { display: 'block', fontSize: 12, color: 'var(--muted)', marginBottom: 3 }, children: label }), children ] }); } function InlineInput({ value, onChange, type = 'text', min, max, style: extraStyle }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("input", { className: "input", type: type, value: value, onChange: (e)=>onChange(e.target.value), min: min, max: max, style: { width: '100%', ...extraStyle } }); } function InlineSelect({ value, onChange, options }) { const items = options || []; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("select", { className: "input", value: value, onChange: (e)=>onChange(e.target.value), style: { width: '100%' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("option", { value: "", children: "— Select —" }), items.map((o)=>{ const val = typeof o === 'object' ? o.value : o; const lbl = typeof o === 'object' ? o.label : o; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("option", { value: val, children: lbl }, val); }) ] }); } function ConfirmDelete({ label, onConfirm, onCancel, deleting }) { return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onCancel, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ "Delete ", label, "?" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This cannot be undone." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onCancel, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: onConfirm, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete' }) ] }) ] }) }); } function OverviewTab({ project, dashboard }) { const panels = (0,react.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.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading dashboard data..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))' }, children: panels.map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "metric-card", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h3", { children: p.label }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `metric-value ${p.cls}`, children: p.value }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "metric-sub", children: p.sub }) ] }, p.label)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "grid", style: { gridTemplateColumns: '1fr 1fr', marginTop: 18 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "panel", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Dimensions" }), (dashboard.dimensions || []).map((dim)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { fontSize: 13 }, children: dim.name }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { style: { fontSize: 13 }, children: dim.score }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("div", { className: "panel", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Lifecycle" }), (dashboard.lifecycle || []).map((phase)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', marginBottom: 4 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { fontSize: 13 }, children: phase.name }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "muted", style: { fontSize: 12 }, children: [ phase.openRisks, " open" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.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 RiskFormModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ title: '', description: '', dimension: '', domain: '', lifecyclePhase: '', probability: 50, impact: 50, detectability: 50, ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.dimension) { toast.add('Dimension is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/projects/${project.id}/risks`, form); toast.add('Risk created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create risk', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Risk" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Dimension *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.dimension, onChange: set('dimension'), options: DIMENSIONS }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Domain", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.domain, onChange: set('domain') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.lifecyclePhase, onChange: set('lifecyclePhase'), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Probability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.probability, onChange: set('probability') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Impact", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.impact, onChange: set('impact') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Detectability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.detectability, onChange: set('detectability') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Risk' }) ] }) ] }) }); } function RisksTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = (0,react.useState)(''); const [sortKey, setSortKey] = (0,react.useState)('normalizedScore'); const [sortDir, setSortDir] = (0,react.useState)('desc'); const [page, setPage] = (0,react.useState)(0); const [selectedRisk, setSelectedRisk] = (0,react.useState)(null); const [showCreate, setShowCreate] = (0,react.useState)(false); const [editing, setEditing] = (0,react.useState)(false); const [editForm, setEditForm] = (0,react.useState)({}); const [updating, setUpdating] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [deleting, setDeleting] = (0,react.useState)(false); const risks = (0,react.useMemo)(()=>{ if (!dashboard?.topRisks) return []; return sortData(dashboard.topRisks, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const filtered = (0,react.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 openDetail = (risk)=>{ setSelectedRisk(risk); setEditForm({ title: risk.title || '', description: risk.description || '', dimension: risk.dimension || '', domain: risk.domain || '', lifecyclePhase: risk.lifecyclePhase || '', probability: risk.probability ?? 50, impact: risk.impact ?? 50, detectability: risk.detectability ?? 50, ownerDisplayName: risk.ownerDisplayName || '' }); setEditing(false); setConfirmDelete(null); }; const updateStatus = async (riskId, status)=>{ setUpdating(riskId); try { await api_client/* api */.FH.patch(`/api/risks/${riskId}`, { status }); toast.add(`Risk status updated to ${status}`); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message, 'error'); } finally{ setUpdating(null); } }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { await api_client/* api */.FH.patch(`/api/risks/${selectedRisk.id}`, editForm); toast.add('Risk updated'); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/risks/${confirmDelete.id}`); toast.add('Risk deleted'); setConfirmDelete(null); setSelectedRisk(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(SearchInput, { value: search, onChange: setSearch, placeholder: "Search risks by title, dimension, owner..." }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Risk" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: paged.map((risk)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { onClick: ()=>openDetail(risk), children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontFamily: 'monospace', fontSize: 12 }, children: risk.id?.slice(0, 8) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: risk.title }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: risk.dimension?.toLowerCase(), children: risk.dimension }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: risk.lifecyclePhase }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: risk.normalizedScore }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { style: { color: risk.residualScore >= 50 ? 'var(--danger)' : risk.residualScore >= 25 ? 'var(--warn)' : 'var(--accent)' }, children: risk.residualScore }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: risk.status?.toLowerCase().replace(/\s+/g, '-'), children: risk.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: risk.ownerDisplayName || '-' }) }) ] }, risk.id)) }) ] }) }), filtered.length > paged.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { textAlign: 'center', marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No risks match your search" }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(RiskFormModal, { project: project, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedRisk && !confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setSelectedRisk(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 520 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: selectedRisk.title }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setEditing(!editing), children: editing ? 'View' : 'Edit' }) ] }), editing ? /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Dimension", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.dimension, onChange: (v)=>setEditForm((f)=>({ ...f, dimension: v })), options: DIMENSIONS }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Domain", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.domain, onChange: (v)=>setEditForm((f)=>({ ...f, domain: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Lifecycle Phase", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.lifecyclePhase, onChange: (v)=>setEditForm((f)=>({ ...f, lifecyclePhase: v })), options: LIFECYCLE_PHASES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Probability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.probability, onChange: (v)=>setEditForm((f)=>({ ...f, probability: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Impact", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.impact, onChange: (v)=>setEditForm((f)=>({ ...f, impact: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Detectability", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.detectability, onChange: (v)=>setEditForm((f)=>({ ...f, detectability: Number(v) })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedRisk), children: "Delete" }) ] }) ] }) : /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 12, fontSize: 13, marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Dimension" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.dimension ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Phase" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.lifecyclePhase ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Probability" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.probability ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Impact" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.impact ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Detectability" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.detectability ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Score" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: selectedRisk.normalizedScore }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Residual" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.residualScore ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Owner" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.ownerDisplayName || '-' ] }) ] }), selectedRisk.description && /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12, fontSize: 13 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: "Description" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("br", {}), selectedRisk.description ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 16 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 12 }, children: "Update status:" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', gap: 6, marginTop: 6, flexWrap: 'wrap' }, children: RISK_STATUSES.map((s)=>/*#__PURE__*/ (0,react_jsx_runtime.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.jsx)("div", { className: "modal-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedRisk(null), children: "Close" }) }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ConfirmDelete, { label: "this risk", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function MitigationFormModal({ project, risks, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ riskId: '', title: '', description: '', status: 'NOT_STARTED', progressPercent: 0, effectivenessPercent: 0, dueDate: '', ownerDisplayName: '' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const handleSave = async ()=>{ if (!form.title.trim()) { toast.add('Title is required', 'error'); return; } if (!form.riskId) { toast.add('Please select a risk', 'error'); return; } setSaving(true); try { const body = { ...form, progressPercent: Number(form.progressPercent), effectivenessPercent: Number(form.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else delete body.dueDate; await api_client/* api */.FH.post(`/api/risks/${form.riskId}/mitigations`, body); toast.add('Mitigation created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create mitigation', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Mitigation" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Risk *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.riskId, onChange: set('riskId'), options: (risks || []).map((r)=>({ value: r.id, label: r.title })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.title, onChange: set('title') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>set('description')(e.target.value), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.status, onChange: set('status'), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Progress %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.progressPercent, onChange: set('progressPercent') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: form.effectivenessPercent, onChange: set('effectivenessPercent') }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Due Date", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "date", value: form.dueDate, onChange: set('dueDate') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.ownerDisplayName, onChange: set('ownerDisplayName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Mitigation' }) ] }) ] }) }); } function MitigationsTab({ project, dashboard, toast, onRefresh }) { const [search, setSearch] = (0,react.useState)(''); const [sortKey, setSortKey] = (0,react.useState)('progressPercent'); const [sortDir, setSortDir] = (0,react.useState)('asc'); const [showCreate, setShowCreate] = (0,react.useState)(false); const [selectedMitigation, setSelectedMitigation] = (0,react.useState)(null); const [editing, setEditing] = (0,react.useState)(false); const [editForm, setEditForm] = (0,react.useState)({}); const [updating, setUpdating] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [deleting, setDeleting] = (0,react.useState)(false); const mitigations = (0,react.useMemo)(()=>{ if (!dashboard?.mitigations) return []; return sortData(dashboard.mitigations, sortKey, sortDir); }, [ dashboard, sortKey, sortDir ]); const risks = (0,react.useMemo)(()=>{ if (!dashboard?.topRisks) return []; return dashboard.topRisks; }, [ dashboard ]); const filtered = (0,react.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'); } }; const openDetail = (m)=>{ setSelectedMitigation(m); setEditForm({ title: m.title || '', description: m.description || '', status: m.status || 'NOT_STARTED', progressPercent: m.progressPercent ?? 0, effectivenessPercent: m.effectivenessPercent ?? 0, dueDate: m.dueDate ? m.dueDate.slice(0, 10) : '', ownerDisplayName: m.ownerDisplayName || '' }); setEditing(true); setConfirmDelete(null); }; const saveEdit = async ()=>{ if (!editForm.title.trim()) { toast.add('Title is required', 'error'); return; } setUpdating('edit'); try { const body = { ...editForm, progressPercent: Number(editForm.progressPercent), effectivenessPercent: Number(editForm.effectivenessPercent) }; if (body.dueDate) body.dueDate = new Date(body.dueDate).toISOString(); else body.dueDate = null; await api_client/* api */.FH.patch(`/api/mitigations/${selectedMitigation.id}`, body); toast.add('Mitigation updated'); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to update', 'error'); } finally{ setUpdating(null); } }; const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/mitigations/${confirmDelete.id}`); toast.add('Mitigation deleted'); setConfirmDelete(null); setSelectedMitigation(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete', 'error'); } finally{ setDeleting(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', gap: 8, marginBottom: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(SearchInput, { value: search, onChange: setSearch, placeholder: "Search mitigations..." }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Mitigation" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("th", { className: "sortable", onClick: ()=>handleSort(col.key), children: [ col.label, " ", sortKey === col.key ? sortDir === 'asc' ? '▲' : 'â–ŧ' : '' ] }, col.key)) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: filtered.slice(0, 50).map((m)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { onClick: ()=>openDetail(m), style: { cursor: 'pointer' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: m.title }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: m.riskTitle }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: m.status?.toLowerCase().replace(/\s+/g, '-'), children: m.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "bar-wrap", style: { flex: 1, maxWidth: 80 }, children: /*#__PURE__*/ (0,react_jsx_runtime.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.jsxs)("td", { children: [ m.effectivenessPercent || 0, "%" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", children: m.ownerDisplayName || '-' }) }) ] }, m.id)) }) ] }) }), !filtered.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No mitigations found" }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(MitigationFormModal, { project: project, risks: risks, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), selectedMitigation && !confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setSelectedMitigation(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 500 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: editing ? 'Edit Mitigation' : selectedMitigation.title }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 12 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Title *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.title, onChange: (v)=>setEditForm((f)=>({ ...f, title: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: editForm.description, onChange: (e)=>setEditForm((f)=>({ ...f, description: e.target.value })), rows: 2, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: editForm.status, onChange: (v)=>setEditForm((f)=>({ ...f, status: v })), options: MITIGATION_STATUSES }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Progress %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.progressPercent, onChange: (v)=>setEditForm((f)=>({ ...f, progressPercent: Number(v) })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Effectiveness %", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "number", min: 0, max: 100, value: editForm.effectivenessPercent, onChange: (v)=>setEditForm((f)=>({ ...f, effectivenessPercent: Number(v) })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Due Date", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { type: "date", value: editForm.dueDate, onChange: (v)=>setEditForm((f)=>({ ...f, dueDate: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Owner", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: editForm.ownerDisplayName, onChange: (v)=>setEditForm((f)=>({ ...f, ownerDisplayName: v })) }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setSelectedMitigation(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: saveEdit, disabled: updating === 'edit', children: updating === 'edit' ? 'Saving...' : 'Save Changes' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff', marginLeft: 'auto' }, onClick: ()=>setConfirmDelete(selectedMitigation), children: "Delete" }) ] }) ] }) }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ConfirmDelete, { label: "this mitigation", onConfirm: handleDelete, onCancel: ()=>setConfirmDelete(null), deleting: deleting }) ] }); } function GateTab({ project, dashboard, toast, onRefresh }) { const [evaluating, setEvaluating] = (0,react.useState)(false); const [showDecision, setShowDecision] = (0,react.useState)(false); const [decisionForm, setDecisionForm] = (0,react.useState)({ decision: 'APPROVED', reviewerName: '', reason: '' }); const [savingDecision, setSavingDecision] = (0,react.useState)(false); const criteria = dashboard?.gate?.criteria || []; const gateStatus = dashboard?.summary?.gateStatus || 'Unknown'; const gateId = dashboard?.gate?.id; const gateCls = gateStatus === 'Ready' ? 'good' : gateStatus === 'Warning' ? 'warn' : 'bad'; const handleEvaluate = async ()=>{ setEvaluating(true); try { await api_client/* api */.FH.post(`/api/projects/${project.id}/gate/evaluate`, {}); toast.add('Gate evaluated'); onRefresh(); } catch (e) { toast.add(e.message || 'Evaluation failed', 'error'); } finally{ setEvaluating(false); } }; const submitDecision = async ()=>{ if (!decisionForm.reviewerName.trim()) { toast.add('Reviewer name is required', 'error'); return; } setSavingDecision(true); try { await api_client/* api */.FH.post(`/api/gates/${gateId}/decisions`, decisionForm); toast.add('Decision submitted'); setShowDecision(false); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to submit decision', 'error'); } finally{ setSavingDecision(false); } }; if (!dashboard) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading..." }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Deployment Gate" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Gate evaluation for AI deployment readiness" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: `metric-value ${gateCls}`, style: { fontSize: 28 }, children: gateStatus }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Criterion" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Required" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actual" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: criteria.map((c)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: c.name }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: c.required }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: c.actual }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: c.status?.toLowerCase(), children: c.status }) }) ] }, c.name)) }) ] }) }), !criteria.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No gate criteria evaluated yet" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { marginTop: 16, display: 'flex', gap: 8, flexWrap: 'wrap' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleEvaluate, disabled: evaluating, children: evaluating ? 'Evaluating...' : 'Evaluate Gate' }), gateId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowDecision(true), children: "Add Decision" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/gate/history`, className: "button secondary small", target: "_blank", children: "History (API)" }) ] }), showDecision && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setShowDecision(false), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 400 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Gate Decision" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Decision", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: decisionForm.decision, onChange: (v)=>setDecisionForm((f)=>({ ...f, decision: v })), options: [ 'APPROVED', 'REJECTED', 'ACCEPTED', 'NEEDS_CHANGES' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Reviewer Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: decisionForm.reviewerName, onChange: (v)=>setDecisionForm((f)=>({ ...f, reviewerName: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Reason", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: decisionForm.reason, onChange: (e)=>setDecisionForm((f)=>({ ...f, reason: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowDecision(false), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: submitDecision, disabled: savingDecision, children: savingDecision ? 'Saving...' : 'Submit Decision' }) ] }) ] }) }) ] }); } function IntegrationFormModal({ project, dashboard, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ provider: 'TRELLO', workspaceName: '', baseUrl: '', authMode: 'API_KEY' }); const set = (key)=>(value)=>setForm((f)=>({ ...f, [key]: value })); const wsId = dashboard?.gate?.workspaceId || project?.workspaceId; const handleSave = async ()=>{ if (!form.workspaceName.trim()) { toast.add('Workspace name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/workspaces/${wsId}/integrations`, form); toast.add('Integration created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create integration', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Integration" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Provider", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.provider, onChange: set('provider'), options: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Workspace Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.workspaceName, onChange: set('workspaceName') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Base URL", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.baseUrl, onChange: set('baseUrl') }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Auth Mode", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.authMode, onChange: set('authMode'), options: [ 'API_KEY', 'OAUTH', 'BASIC' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Integration' }) ] }) ] }) }); } function IntegrationsTab({ project, dashboard, toast, onRefresh }) { const [showCreate, setShowCreate] = (0,react.useState)(false); const integrations = dashboard?.integrations || []; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Integrations" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Connect Trello, Jira, Asana, or Microsoft Planner" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowCreate(true), children: "+ New Integration" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "grid", style: { gridTemplateColumns: 'repeat(auto-fit, minmax(240px, 1fr))' }, children: [ 'TRELLO', 'JIRA', 'ASANA', 'MICROSOFT_PLANNER' ].map((provider)=>{ const existing = integrations.find((i)=>i.provider === provider); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "panel", style: { textAlign: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { fontSize: 32, marginBottom: 8 }, children: provider === 'TRELLO' ? '⊞' : provider === 'JIRA' ? '◆' : provider === 'ASANA' ? '◇' : 'â–Ŗ' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h3", { style: { margin: '0 0 4px' }, children: provider.replace('_', ' ') }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { fontSize: 12, margin: '0 0 12px' }, children: existing ? existing.workspaceName : 'Not configured' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', gap: 6, justifyContent: 'center' }, children: existing ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/integrations/${existing.id}`, className: "button secondary small", target: "_blank", children: "Manage" }) : /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowCreate(true), children: "Configure" }) }) ] }, provider); }) }), showCreate && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(IntegrationFormModal, { project: project, dashboard: dashboard, onClose: ()=>setShowCreate(false), onSaved: ()=>{ setShowCreate(false); onRefresh(); }, toast: toast }), !integrations.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: "/api/integration-providers", className: "button secondary small", target: "_blank", children: "Integration providers (API)" }) }) ] }); } function AuditTab({ project, toast }) { const [events, setEvents] = (0,react.useState)([]); const [loading, setLoading] = (0,react.useState)(true); const [error, setError] = (0,react.useState)(null); const load = (0,react.useCallback)(async ()=>{ if (!project) return; setLoading(true); setError(null); try { const resp = await api_client/* api */.FH.get(`/api/projects/${project.id}/audit`); setEvents(resp.auditEvents || []); } catch (e) { setError(e.message || 'Failed to load audit log'); } finally{ setLoading(false); } }, [ project ]); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ load(); }, [ load ]); if (loading) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "Loading audit log..." }) }); if (error) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: error }) }); if (!events.length) return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No audit events recorded yet" }) }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "Audit Log" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", children: "Project activity history" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: load, children: "Refresh" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Date" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Action" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Entity" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actor" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Details" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: events.map((e)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12, whiteSpace: 'nowrap' }, children: new Date(e.createdAt).toLocaleString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: e.action?.toLowerCase().replace(/\s+/g, '-'), children: e.action }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { fontSize: 12 }, children: [ e.entityType, " ", /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("span", { className: "muted", children: [ "(", e.entityId?.slice(0, 8), ")" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: e.actorUserId || 'system' }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12, maxWidth: 300, overflow: 'hidden', textOverflow: 'ellipsis' }, children: e.afterJson ? JSON.stringify(e.afterJson).slice(0, 80) : '-' }) ] }, e.id)) }) ] }) }) ] }); } function ProjectsTab({ projects, workspaceId, currentProjectId, onSwitch, onRefresh, toast }) { const [deleting, setDeleting] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [showNew, setShowNew] = (0,react.useState)(false); const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onRefresh(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h1", { children: "All Projects" }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "muted", children: [ projects.length, " project(s) in workspace" ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "dash-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Name" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Type" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Created" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Actions" }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '', p.description ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "muted", style: { fontSize: 11 }, children: p.description }) : '' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>onSwitch(p.id), children: "Open" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "Delete" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No projects yet. Create one to get started." }) }), showNew && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onRefresh(); }, toast: toast }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }) ] }); } function ProjectSettingsModal({ project, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ name: project?.name || '', description: project?.description || '', subtitle: project?.subtitle || '', status: project?.status || 'Active' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.patch(`/api/projects/${project.id}`, form); toast.add('Project updated'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to update project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "Project Settings" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Subtitle", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.subtitle, onChange: (v)=>setForm((f)=>({ ...f, subtitle: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Status", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.status, onChange: (v)=>setForm((f)=>({ ...f, status: v })), options: [ 'Active', 'Archived', 'On Hold' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Save Changes' }) ] }) ] }) }); } function NewProjectModal({ workspaceId, onClose, onSaved, toast }) { const [saving, setSaving] = (0,react.useState)(false); const [form, setForm] = (0,react.useState)({ name: '', description: '', projectType: 'AI-Enabler' }); const handleSave = async ()=>{ if (!form.name.trim()) { toast.add('Project name is required', 'error'); return; } setSaving(true); try { await api_client/* api */.FH.post(`/api/workspaces/${workspaceId}/projects`, form); toast.add('Project created'); onSaved(); } catch (e) { toast.add(e.message || 'Failed to create project', 'error'); } finally{ setSaving(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: onClose, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 450 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { children: "New Project" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Name *", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineInput, { value: form.name, onChange: (v)=>setForm((f)=>({ ...f, name: v })) }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Description", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("textarea", { className: "input", value: form.description, onChange: (e)=>setForm((f)=>({ ...f, description: e.target.value })), rows: 3, style: { width: '100%', resize: 'vertical' } }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(FormField, { label: "Project Type", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(InlineSelect, { value: form.projectType, onChange: (v)=>setForm((f)=>({ ...f, projectType: v })), options: [ 'AI-Enabler', 'GENERATIVE_AI', 'ML-Pipeline', 'Automation' ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: handleSave, disabled: saving, children: saving ? 'Saving...' : 'Create Project' }) ] }) ] }) }); } function ProjectManagerModal({ projects, workspaceId, currentProjectId, onClose, onSwitch, onSaved, toast }) { const [deleting, setDeleting] = (0,react.useState)(null); const [confirmDelete, setConfirmDelete] = (0,react.useState)(null); const [showNew, setShowNew] = (0,react.useState)(false); const handleDelete = async ()=>{ setDeleting(true); try { await api_client/* api */.FH.del(`/api/projects/${confirmDelete.id}`); toast.add(`Project "${confirmDelete.name}" deleted`); setConfirmDelete(null); onSaved(); } catch (e) { toast.add(e.message || 'Failed to delete project', 'error'); } finally{ setDeleting(false); } }; return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-overlay", onClick: onClose, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 700, maxHeight: '80vh', overflow: 'auto' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("h2", { style: { margin: 0 }, children: "All Projects" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", onClick: ()=>setShowNew(true), children: "+ New Project" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("p", { className: "muted", style: { fontSize: 12, marginTop: 4 }, children: [ projects.length, " project(s) in workspace" ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "table-wrap", style: { marginTop: 12 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("table", { className: "table", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("thead", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Name" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Status" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Type" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", { children: "Created" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("th", {}) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("tbody", { children: [ ...projects ].sort((a, b)=>new Date(b.createdAt) - new Date(a.createdAt)).map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("tr", { style: { background: p.id === currentProjectId ? 'var(--surface-alt)' : '' }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("strong", { children: p.name }), p.id === currentProjectId ? /*#__PURE__*/ (0,react_jsx_runtime.jsx)("span", { className: "muted", style: { fontSize: 11, marginLeft: 6 }, children: "(current)" }) : '' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(Badge, { className: p.status?.toLowerCase(), children: p.status }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: p.projectType }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("td", { style: { fontSize: 12 }, children: new Date(p.createdAt).toLocaleDateString() }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("td", { style: { textAlign: 'right', whiteSpace: 'nowrap' }, children: [ p.id !== currentProjectId && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginRight: 6 }, onClick: ()=>{ onSwitch(p.id); onClose(); }, children: "Open" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: ()=>setConfirmDelete(p), disabled: deleting === p.id, children: "✕" }) ] }) ] }, p.id)) }) ] }) }), !projects.length && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-state", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: "No projects yet" }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-actions", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: onClose, children: "Close" }) }) ] }), confirmDelete && /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "modal-overlay", onClick: ()=>setConfirmDelete(null), children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal", onClick: (e)=>e.stopPropagation(), style: { maxWidth: 380 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("h3", { children: [ 'Delete "', confirmDelete.name, '"?' ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { style: { fontSize: 13, color: 'var(--muted)' }, children: "This permanently deletes the project and all its risks, mitigations, and data." }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "modal-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setConfirmDelete(null), children: "Cancel" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button small", style: { background: 'var(--danger)', color: '#fff' }, onClick: handleDelete, disabled: deleting, children: deleting ? 'Deleting...' : 'Delete Project' }) ] }) ] }) }), showNew && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(NewProjectModal, { workspaceId: workspaceId, onClose: ()=>setShowNew(false), onSaved: ()=>{ setShowNew(false); onSaved(); }, toast: toast }) ] }); } function DashboardPage() { const router = (0,navigation.useRouter)(); const searchParams = (0,navigation.useSearchParams)(); const tab = TABS.includes(searchParams.get('tab')) ? searchParams.get('tab') : 'Overview'; const [project, setProject] = (0,react.useState)(null); const [projects, setProjects] = (0,react.useState)([]); const [selectedProjectId, setSelectedProjectId] = (0,react.useState)(searchParams.get('projectId') || null); const [dashboard, setDashboard] = (0,react.useState)(null); const [loading, setLoading] = (0,react.useState)(true); const [error, setError] = (0,react.useState)(null); const [retryCount, setRetryCount] = (0,react.useState)(0); const [showProjectSettings, setShowProjectSettings] = (0,react.useState)(false); const [showProjectManager, setShowProjectManager] = (0,react.useState)(false); const [workspaceId, setWorkspaceId] = (0,react.useState)(null); const { toasts, add } = useToast(); const onRefresh = (0,react.useCallback)(()=>setRetryCount((c)=>c + 1), []); const loadDashboard = (0,react.useCallback)(async (projectId)=>{ setLoading(true); setError(null); try { const session = await api_client/* api */.FH.get('/api/auth/session'); if (!session?.authenticated) { setError('Not authenticated.'); setLoading(false); return; } const membership = session.memberships?.[0]; if (!membership) { setError('No organization membership found.'); setLoading(false); return; } const orgId = membership.organizationId; const workspacesResp = await api_client/* api */.FH.get(`/api/workspaces?organizationId=${orgId}`); const ws = workspacesResp.workspaces?.[0]; if (!ws) { setError('No workspace found — create one to get started.'); setLoading(false); return; } setWorkspaceId(ws.id); const projectsResp = await api_client/* api */.FH.get(`/api/workspaces/${ws.id}/projects`); const allProjects = projectsResp.projects || []; if (!allProjects.length) { setError('No project found — create a project to get started.'); setLoading(false); return; } setProjects(allProjects); let proj = projectId ? allProjects.find((p)=>p.id === projectId) : null; if (!proj) proj = allProjects[0]; setProject(proj); if (proj.id !== selectedProjectId) { setSelectedProjectId(proj.id); const currentTab = new URLSearchParams(window.location.search).get('tab') || 'Overview'; router.replace(`/dashboard?tab=${currentTab}&projectId=${proj.id}`); } const dashResp = await api_client/* api */.FH.get(`/api/projects/${proj.id}/dashboard`); setDashboard(dashResp.dashboard); setLoading(false); } catch (e) { setError(e.message || 'Failed to load dashboard data'); setLoading(false); } }, []); process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && (0,react.useEffect)(()=>{ loadDashboard(selectedProjectId); }, [ loadDashboard, retryCount, selectedProjectId ]); const switchProject = (pid)=>{ setSelectedProjectId(pid); router.push(`/dashboard?tab=${tab}&projectId=${pid}`); }; if (loading && tab !== 'Integrations') return /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "shell-loading", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "spinner" }) }); if (error && tab !== 'Integrations') return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "empty-state", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "empty-icon", children: "!" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { children: error }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { marginTop: 12 }, onClick: ()=>setRetryCount((c)=>c + 1), children: "Retry" }) ] }); return /*#__PURE__*/ (0,react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-header", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { style: { display: 'flex', alignItems: 'center', gap: 10 }, children: /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { style: { display: 'flex', alignItems: 'center', gap: 6 }, children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("select", { className: "input", value: project?.id || '', onChange: (e)=>switchProject(e.target.value), style: { fontSize: 16, fontWeight: 700, width: 'auto', minWidth: 200, border: 'none', background: 'transparent', cursor: 'pointer' }, children: projects.map((p)=>/*#__PURE__*/ (0,react_jsx_runtime.jsxs)("option", { value: p.id, children: [ p.name, " ", p.status !== 'Active' ? `(${p.status})` : '' ] }, p.id)) }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", style: { fontSize: 14, padding: '2px 8px' }, onClick: ()=>setShowProjectSettings(true), title: "Project settings", children: "⚙" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: "button secondary small", onClick: ()=>setShowProjectManager(true), children: "Projects" }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("p", { className: "muted", style: { margin: 0 }, children: project?.subtitle || project?.description || '' }) ] }) }), /*#__PURE__*/ (0,react_jsx_runtime.jsxs)("div", { className: "dash-actions", children: [ /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/reports/executive.html`, className: "button secondary small", target: "_blank", children: "Report" }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("a", { href: `/api/projects/${project?.id}/reports/risk-register.csv`, className: "button secondary small", target: "_blank", children: "CSV" }) ] }) ] }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)("div", { className: "tabs", children: TABS.map((t)=>/*#__PURE__*/ (0,react_jsx_runtime.jsx)("button", { className: `tab ${tab === t ? 'active' : ''}`, onClick: ()=>router.push(`/dashboard?tab=${t}${project ? `&projectId=${project.id}` : ''}`), children: t }, t)) }), tab === 'Overview' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Overview", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(OverviewTab, { project: project, dashboard: dashboard }) }, "overview"), tab === 'Projects' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Projects", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectsTab, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onSwitch: switchProject, onRefresh: onRefresh, toast: { add } }) }, "projects"), tab === 'Risks' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Risks", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(RisksTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "risks"), tab === 'Mitigations' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Mitigations", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(MitigationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "mitigations"), tab === 'Gate' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Gate", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(GateTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "gate"), tab === 'Integrations' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Integrations", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(IntegrationsTab, { project: project, dashboard: dashboard, toast: { add }, onRefresh: onRefresh }) }, "integrations"), tab === 'Audit' && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ErrorBoundary, { name: "Audit", children: /*#__PURE__*/ (0,react_jsx_runtime.jsx)(AuditTab, { project: project, toast: { add } }) }, "audit"), showProjectSettings && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectSettingsModal, { project: project, onClose: ()=>setShowProjectSettings(false), onSaved: ()=>{ setShowProjectSettings(false); onRefresh(); }, toast: { add } }), showProjectManager && /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ProjectManagerModal, { projects: projects, workspaceId: workspaceId, currentProjectId: project?.id, onClose: ()=>setShowProjectManager(false), onSwitch: switchProject, onSaved: ()=>{ setShowProjectManager(false); onRefresh(); }, toast: { add } }), /*#__PURE__*/ (0,react_jsx_runtime.jsx)(ToastContainer, { toasts: toasts }) ] }); } /***/ }), /***/ 9902: /***/ ((module) => { "use strict"; module.exports = require("path"); /***/ }) }; ; // load runtime var __webpack_require__ = require("../../webpack-runtime.js"); __webpack_require__.C(exports); var __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = __webpack_require__.X(0, [5873,4792], () => (__webpack_exec__(9108))); module.exports = __webpack_exports__; })(); ‚{}Ũ @Ūd(() => { var exports = {}; exports.id = 5105; exports.ids = [5105]; exports.modules = { /***/ 261: Ũ$/***/ ((module) => { "use strict";  RawSourceHmodule.exports = require("next/dist/shared/lib/router/utils/app-paths");ū /***/ })ũ, /***/ 846: ØûüTmodule.exports = require("next/dist/compiled/next-server/app-page.runtime.prod.js");ûũû, /***/ 1025: Öųúamodule.exports = require("next/dist/server/app-render/dynamic-access-async-storage.external.js");ųûų, /***/ 1135: Ô/***/ (() => { Ö˙öøö, /***/ 1459: ŅũÔūūõ÷õ, /***/ 1619: ĐV/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { ŌK import(/* webpackMode: "eager" */ "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\\client\\components\\builtin\\global-error.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-page.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\client-segment.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\http-access-fallback\\error-boundary.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\layout-router.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\metadata\\async-metadata.js"); ; import(/* webpackMode: "eager" */ "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\\client\\components\\render-from-template-context.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\framework\\boundary-components.js"); ; import(/* webpackMode: "eager" */ "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\\lib\\metadata\\generate\\icon-mark.js"); 0261Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23))undefined266517Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3597, 23))undefined522776Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6893, 23))undefined7811057Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9748, 23))undefined10621315Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 6060, 23))undefined13201584Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7184, 23))undefined15891857Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9576, 23))undefined18622117Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 3041, 23))undefined21222376Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1384, 23))undefinedņķņ, /***/ 1662: Ė_/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; Ë__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ RootLayout), /* harmony export */ metadata: () => (/* binding */ metadata) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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 _globals_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1135); /* harmony import */ var _globals_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_globals_css__WEBPACK_IMPORTED_MODULE_1__); ͨimport { jsx as _jsx } from "react/jsx-runtime"; import "./globals.css"; export const metadata = { title: "COSMIC AI-Risk SaaS", description: "Commercial multi-tenant COSMIC AI-Risk governance platform" }; export default function RootLayout({ children }) { return /*#__PURE__*/ _jsx("html", { lang: "en", children: /*#__PURE__*/ _jsx("body", { children: children }) }); } ŋ047undefined4971undefined7379undefined214228undefined290293(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined357360(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefinedėîė, /***/ 2378: ĮûĮy/* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1330); /* harmony import */ var _client_components_navigation__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useRouter")) __webpack_require__.d(__webpack_exports__, { useRouter: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useRouter; } }); /* harmony reexport (checked) */ if(__webpack_require__.o(_client_components_navigation__WEBPACK_IMPORTED_MODULE_0__, "useSearchParams")) __webpack_require__.d(__webpack_exports__, { useSearchParams: function() { return _client_components_navigation__WEBPACK_IMPORTED_MODULE_0__.useSearchParams; } }); ÉXexport * from '../client/components/navigation'; //# sourceMappingURL=navigation.js.map 047undefinedčęč, /***/ 3033: Ãæį\module.exports = require("next/dist/server/app-render/work-unit-async-storage.external.js");æčæ, /***/ 3295: Áäå]module.exports = require("next/dist/server/app-render/after-task-async-storage.external.js");äæä, /***/ 3676: ŋīÂüimport(/* webpackMode: "eager", webpackExports: ["default"] */ "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\\components\\AppShell.jsx"); l0249Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 4744))undefinedáãá, /***/ 4194: ŧđŧ/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FH: () => (/* binding */ api), /* harmony export */ Ht: () => (/* binding */ getSession), /* harmony export */ ri: () => (/* binding */ logout) /* harmony export */ }); ž<const BASE = ''; async function request(method, path, body) { const opts = { method, headers: { 'Content-Type': 'application/json' } }; if (body) opts.body = JSON.stringify(body); const res = await fetch(`${BASE}${path}`, opts); const data = res.headers.get('content-type')?.includes('application/json') ? await res.json() : await res.text(); if (!res.ok) throw new Error(data?.error || data?.message || `Request failed (${res.status})`); return data; } export const api = { get: (path)=>request('GET', path), post: (path, body)=>request('POST', path, body), put: (path, body)=>request('PUT', path, body), patch: (path, body)=>request('PATCH', path, body), del: (path)=>request('DELETE', path) }; export async function getSession() { try { const data = await api.get('/api/auth/session'); return data.user || data.actor || null; } catch { return null; } } export async function logout() { await api.post('/api/auth/logout'); window.location.href = '/'; } -518524undefined781787undefined977983undefinedŨßŨ, /***/ 4744: ¸ė¸Õ/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); ēR// This file is generated by the Webpack next-flight-loader. import { registerClientReference } from "react-server-dom-webpack/server"; export default registerClientReference( function() { throw new Error("Attempted to call the default export of \"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\\\\components\\\\AppShell.jsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component."); }, "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\\components\\AppShell.jsx", "default", ); į61134undefined136150/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined136150undefined151173(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)undefined848848.5);undefinedŲÛŲ, /***/ 5498: ´äˇßimport(/* webpackMode: "eager" */ "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"); l0220Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9672))undefinedÖØÖ, /***/ 5883: ąŨ´ŪŪÕ×Õ, /***/ 6114: °āŗül0220Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610))undefinedĶÕĶ, /***/ 6439: ŽŅŌLmodule.exports = require("next/dist/shared/lib/no-fallback-error.external");ŅĶŅ, /***/ 6713: ŦĪĐEmodule.exports = require("next/dist/shared/lib/router/utils/is-bot");ĪŅĪ, /***/ 7228: ĒÚ­ël0249Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 8698))undefinedÍĪÍ, /***/ 7275: ¨ØĢŲ0261Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 4160, 23))undefined266517Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1603, 23))undefined522776Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8495, 23))undefined7811057Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 5170, 23))undefined10621315Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7526, 23))undefined13201584Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 8922, 23))undefined15891857Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 9234, 23))undefined18622117Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2263, 23))undefined21222376Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 2146))undefinedËÍË, /***/ 7513: ĻÚĻ)__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ DashboardLayout) /* harmony export */ }); /* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5338); /* 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__(4515); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_AppShell__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(4744); ¨import { jsx as _jsx } from "react/jsx-runtime"; import { Suspense } from 'react'; import AppShell from '../../components/AppShell'; export default function DashboardLayout({ children }) { return /*#__PURE__*/ _jsx(Suspense, { fallback: /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }), children: /*#__PURE__*/ _jsx(AppShell, { children: children }) }); } Ī047undefined4981undefined83131undefined133147undefined214217(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined219226react__WEBPACK_IMPORTED_MODULE_1__.Suspenseundefined263266(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined353356(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined463466(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined468475_components_AppShell__WEBPACK_IMPORTED_MODULE_2__["default"]undefinedĮÉĮ, /***/ 8354: ĸÅÆ!module.exports = require("util");ÅĮÅ, /***/ 8698:  Ô T/* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ AppShell) /* 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 */ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { useEffect, useState } from 'react'; import { useRouter, useSearchParams } from 'next/navigation'; import { getSession, logout } from '../lib/api-client'; const NAV_ITEMS = [ { label: 'Overview', tab: 'Overview', icon: '◇' }, { label: 'Risks', tab: 'Risks', icon: '⚠' }, { label: 'Mitigations', tab: 'Mitigations', icon: '●' }, { label: 'Gate', tab: 'Gate', icon: '⊞' }, { label: 'Integrations', tab: 'Integrations', icon: '⇆' } ]; export default function AppShell({ children }) { const [user, setUser] = useState(null); const [sidebarOpen, setSidebarOpen] = useState(false); const [loading, setLoading] = useState(true); const router = useRouter(); const searchParams = useSearchParams(); const currentTab = searchParams.get('tab') || 'Overview'; process.env.__NEXT_PRIVATE_MINIMIZE_MACRO_FALSE && useEffect(()=>{ getSession().then((u)=>{ if (!u) { router.replace('/login'); return; } setUser(u); setLoading(false); }); }, [ router ]); if (loading) { return /*#__PURE__*/ _jsx("div", { className: "shell-loading", children: /*#__PURE__*/ _jsx("div", { className: "spinner" }) }); } return /*#__PURE__*/ _jsxs("div", { className: "app-shell", children: [ /*#__PURE__*/ _jsx("button", { className: "sidebar-toggle", onClick: ()=>setSidebarOpen(!sidebarOpen), children: sidebarOpen ? '✕' : '☰' }), /*#__PURE__*/ _jsxs("aside", { className: `sidebar ${sidebarOpen ? 'open' : ''}`, children: [ /*#__PURE__*/ _jsx("div", { className: "sidebar-brand", children: "COSMIC" }), /*#__PURE__*/ _jsxs("div", { className: "sidebar-user", children: [ /*#__PURE__*/ _jsx("div", { className: "sidebar-user-name", children: user.displayName }), /*#__PURE__*/ _jsx("div", { className: "sidebar-user-email", children: user.email }) ] }), /*#__PURE__*/ _jsx("nav", { className: "sidebar-nav", children: NAV_ITEMS.map((item)=>{ const active = currentTab === item.tab; return /*#__PURE__*/ _jsxs("a", { href: `/dashboard?tab=${item.tab}`, className: `sidebar-link ${active ? 'active' : ''}`, onClick: (e)=>{ e.preventDefault(); setSidebarOpen(false); router.push(`/dashboard?tab=${item.tab}`); }, children: [ /*#__PURE__*/ _jsx("span", { className: "sidebar-icon", children: item.icon }), item.label ] }, item.tab); }) }), /*#__PURE__*/ _jsx("div", { className: "sidebar-footer", children: /*#__PURE__*/ _jsx("button", { className: "sidebar-logout", onClick: logout, children: "Sign out" }) }) ] }), sidebarOpen && /*#__PURE__*/ _jsx("div", { className: "sidebar-overlay", onClick: ()=>setSidebarOpen(false) }), /*#__PURE__*/ _jsx("main", { className: "app-main", children: children }) ] }); } õ61123undefined125168undefined170230undefined232286undefined725739undefined802809(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined860867(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined911918(0,react__WEBPACK_IMPORTED_MODULE_1__.useState)undefined946954(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useRouter)undefined984998(0,next_navigation__WEBPACK_IMPORTED_MODULE_2__.useSearchParams)undefined11201128(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)undefined11441153(0,_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .getSession */ .Ht)undefined14181421(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined15081511(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined16171621(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined17101713(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined19231927(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined20692072(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined22362240(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined23802383(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined25912594(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined28382841(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined30773081(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)undefined36143617(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined40044007(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined41194122(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined42304235_lib_api_client__WEBPACK_IMPORTED_MODULE_3__/* .logout */ .riundefined44124415(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefined45654568(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)undefinedÁÃÁ, /***/ 9108: œĐœō#__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ GlobalError: () => (/* reexport default from dynamic */ next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default.a), /* harmony export */ __next_app__: () => (/* binding */ __next_app__), /* harmony export */ handler: () => (/* binding */ handler), /* harmony export */ pages: () => (/* binding */ pages), /* harmony export */ routeModule: () => (/* binding */ routeModule), /* harmony export */ tree: () => (/* binding */ tree) /* harmony export */ }); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9754); /* harmony import */ var next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9117); /* harmony import */ var next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6595); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2324); /* harmony import */ var next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9326); /* harmony import */ var next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8928); /* harmony import */ var next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(175); /* harmony import */ var next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(12); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(4290); /* harmony import */ var next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(2696); /* harmony import */ var next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(2574); /* harmony import */ var next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2802); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(7533); /* harmony import */ var next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(5229); /* harmony import */ var next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2822); /* harmony import */ var next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(261); /* harmony import */ var next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(6453); /* harmony import */ var next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(2474); /* harmony import */ var next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(6713); /* harmony import */ var next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(1356); /* harmony import */ var next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(2685); /* harmony import */ var next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__); /* harmony import */ var next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(6225); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(3446); /* harmony import */ var next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__); /* harmony import */ var next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(2762); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(5742); /* harmony import */ var next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(6439); /* harmony import */ var next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(1170); /* harmony import */ var next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26__); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(2506); /* harmony import */ var next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(1203); /* harmony import */ var next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__); /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {}; /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__) if(["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__[__WEBPACK_IMPORT_KEY__] /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__); žĀËconst module0 = () => import(/* webpackMode: "eager" */ "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\\layout.jsx"); const module1 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/global-error.js"); const module2 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/not-found.js"); const module3 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/forbidden.js"); const module4 = () => import(/* webpackMode: "eager" */ "next/dist/client/components/builtin/unauthorized.js"); const module5 = () => import(/* webpackMode: "eager" */ "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\\layout.jsx"); const page6 = () => import(/* webpackMode: "eager" */ "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"); import { AppPageRouteModule } from "next/dist/server/route-modules/app-page/module.compiled" with { 'turbopack-transition': 'next-ssr' }; import { RouteKind } from "next/dist/server/route-kind" with { 'turbopack-transition': 'next-server-utility' }; import { getRevalidateReason } from "next/dist/server/instrumentation/utils"; import { getTracer, SpanKind } from "next/dist/server/lib/trace/tracer"; import { getRequestMeta } from "next/dist/server/request-meta"; import { BaseServerSpan } from "next/dist/server/lib/trace/constants"; import { interopDefault } from "next/dist/server/app-render/interop-default"; import { stripFlightHeaders } from "next/dist/server/app-render/strip-flight-headers"; import { NodeNextRequest, NodeNextResponse } from "next/dist/server/base-http/node"; import { checkIsAppPPREnabled } from "next/dist/server/lib/experimental/ppr"; import { isRSCRequestHeader } from "next/dist/server/lib/is-rsc-request"; import { getFallbackRouteParams } from "next/dist/server/request/fallback-params"; import { setReferenceManifestsSingleton } from "next/dist/server/app-render/encryption-utils"; import { isHtmlBotRequest, shouldServeStreamingMetadata } from "next/dist/server/lib/streaming-metadata"; import { createServerModuleMap } from "next/dist/server/app-render/action-utils"; import { normalizeAppPath } from "next/dist/shared/lib/router/utils/app-paths"; import { getIsPossibleServerAction } from "next/dist/server/lib/server-action-request-meta"; import { RSC_HEADER, NEXT_ROUTER_PREFETCH_HEADER, NEXT_IS_PRERENDER_HEADER, NEXT_DID_POSTPONE_HEADER, RSC_CONTENT_TYPE_HEADER } from "next/dist/client/components/app-router-headers"; import { getBotType, isBot } from "next/dist/shared/lib/router/utils/is-bot"; import { CachedRouteKind } from "next/dist/server/response-cache"; import { FallbackMode, parseFallbackField } from "next/dist/lib/fallback"; import RenderResult from "next/dist/server/render-result"; import { CACHE_ONE_YEAR, HTML_CONTENT_TYPE_HEADER, NEXT_CACHE_TAGS_HEADER } from "next/dist/lib/constants"; import { ENCODED_TAGS } from "next/dist/server/stream-utils/encoded-tags"; import { sendRenderResult } from "next/dist/server/send-payload"; import { NoFallbackError } from "next/dist/shared/lib/no-fallback-error.external"; // We inject the tree and pages here so that we can use them in the route // module. const tree = { children: [ '', { children: [ 'dashboard', { children: ['__PAGE__', {}, { page: [page6, "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"], }] }, { 'layout': [module5, "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\\layout.jsx"], } ] }, { 'layout': [module0, "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\\layout.jsx"], 'global-error': [module1, "next/dist/client/components/builtin/global-error.js"], 'not-found': [module2, "next/dist/client/components/builtin/not-found.js"], 'forbidden': [module3, "next/dist/client/components/builtin/forbidden.js"], 'unauthorized': [module4, "next/dist/client/components/builtin/unauthorized.js"], } ] }.children; const pages = ["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"]; export { tree, pages }; import GlobalError from "next/dist/client/components/builtin/global-error.js" with { 'turbopack-transition': 'next-server-utility' }; export { GlobalError }; const __next_app_require__ = __webpack_require__ const __next_app_load_chunk__ = () => Promise.resolve() export const __next_app__ = { require: __next_app_require__, loadChunk: __next_app_load_chunk__ }; import * as entryBase from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; import { RedirectStatusCode } from "next/dist/client/components/redirect-status-code"; export * from "next/dist/server/app-render/entry-base" with { 'turbopack-transition': 'next-server-utility' }; // Create and export the route module that will be consumed. export const routeModule = new AppPageRouteModule({ definition: { kind: RouteKind.APP_PAGE, page: "/dashboard/page", pathname: "/dashboard", // The following aren't used in production. bundlePath: '', filename: '', appPaths: [] }, userland: { loaderTree: tree }, distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '', relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '' }); export async function handler(req, res, ctx) { var _this; let srcPage = "/dashboard/page"; // turbopack doesn't normalize `/index` in the page name // so we need to to process dynamic routes properly // TODO: fix turbopack providing differing value from webpack if (process.env.TURBOPACK) { srcPage = srcPage.replace(/\/index$/, '') || '/'; } else if (srcPage === '/index') { // we always normalize /index specifically srcPage = '/'; } const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE; const initialPostponed = getRequestMeta(req, 'postponed'); // TODO: replace with more specific flags const minimalMode = getRequestMeta(req, 'minimalMode'); const prepareResult = await routeModule.prepare(req, res, { srcPage, multiZoneDraftMode }); if (!prepareResult) { res.statusCode = 400; res.end('Bad Request'); ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve()); return null; } const { buildId, query, params, parsedUrl, pageIsDynamic, buildManifest, nextFontManifest, reactLoadableManifest, serverActionsManifest, clientReferenceManifest, subresourceIntegrityManifest, prerenderManifest, isDraftMode, resolvedPathname, revalidateOnlyGenerated, routerServerContext, nextConfig, interceptionRoutePatterns } = prepareResult; const pathname = parsedUrl.pathname || '/'; const normalizedSrcPage = normalizeAppPath(srcPage); let { isOnDemandRevalidate } = prepareResult; const prerenderInfo = routeModule.match(pathname, prerenderManifest); const isPrerendered = !!prerenderManifest.routes[resolvedPathname]; let isSSG = Boolean(prerenderInfo || isPrerendered || prerenderManifest.routes[normalizedSrcPage]); const userAgent = req.headers['user-agent'] || ''; const botType = getBotType(userAgent); const isHtmlBot = isHtmlBotRequest(req); /** * If true, this indicates that the request being made is for an app * prefetch request. */ const isPrefetchRSCRequest = getRequestMeta(req, 'isPrefetchRSCRequest') ?? req.headers[NEXT_ROUTER_PREFETCH_HEADER] === '1' // exclude runtime prefetches, which use '2' ; // NOTE: Don't delete headers[RSC] yet, it still needs to be used in renderToHTML later const isRSCRequest = getRequestMeta(req, 'isRSCRequest') ?? isRSCRequestHeader(req.headers[RSC_HEADER]); const isPossibleServerAction = getIsPossibleServerAction(req); /** * If the route being rendered is an app page, and the ppr feature has been * enabled, then the given route _could_ support PPR. */ const couldSupportPPR = checkIsAppPPREnabled(nextConfig.experimental.ppr); // When enabled, this will allow the use of the `?__nextppronly` query to // enable debugging of the static shell. const hasDebugStaticShellQuery = process.env.__NEXT_EXPERIMENTAL_STATIC_SHELL_DEBUGGING === '1' && typeof query.__nextppronly !== 'undefined' && couldSupportPPR; // When enabled, this will allow the use of the `?__nextppronly` query // to enable debugging of the fallback shell. const hasDebugFallbackShellQuery = hasDebugStaticShellQuery && query.__nextppronly === 'fallback'; // This page supports PPR if it is marked as being `PARTIALLY_STATIC` in the // prerender manifest and this is an app page. const isRoutePPREnabled = couldSupportPPR && (((_this = prerenderManifest.routes[normalizedSrcPage] ?? prerenderManifest.dynamicRoutes[normalizedSrcPage]) == null ? void 0 : _this.renderingMode) === 'PARTIALLY_STATIC' || // Ideally we'd want to check the appConfig to see if this page has PPR // enabled or not, but that would require plumbing the appConfig through // to the server during development. We assume that the page supports it // but only during development. hasDebugStaticShellQuery && (routeModule.isDev === true || (routerServerContext == null ? void 0 : routerServerContext.experimentalTestProxy) === true)); const isDebugStaticShell = hasDebugStaticShellQuery && isRoutePPREnabled; // We should enable debugging dynamic accesses when the static shell // debugging has been enabled and we're also in development mode. const isDebugDynamicAccesses = isDebugStaticShell && routeModule.isDev === true; const isDebugFallbackShell = hasDebugFallbackShellQuery && isRoutePPREnabled; // If we're in minimal mode, then try to get the postponed information from // the request metadata. If available, use it for resuming the postponed // render. const minimalPostponed = isRoutePPREnabled ? initialPostponed : undefined; // If PPR is enabled, and this is a RSC request (but not a prefetch), then // we can use this fact to only generate the flight data for the request // because we can't cache the HTML (as it's also dynamic). const isDynamicRSCRequest = isRoutePPREnabled && isRSCRequest && !isPrefetchRSCRequest; // Need to read this before it's stripped by stripFlightHeaders. We don't // need to transfer it to the request meta because it's only read // within this function; the static segment data should have already been // generated, so we will always either return a static response or a 404. const segmentPrefetchHeader = getRequestMeta(req, 'segmentPrefetchRSCRequest'); // TODO: investigate existing bug with shouldServeStreamingMetadata always // being true for a revalidate due to modifying the base-server this.renderOpts // when fixing this to correct logic it causes hydration issue since we set // serveStreamingMetadata to true during export let serveStreamingMetadata = !userAgent ? true : shouldServeStreamingMetadata(userAgent, nextConfig.htmlLimitedBots); if (isHtmlBot && isRoutePPREnabled) { isSSG = false; serveStreamingMetadata = false; } // In development, we always want to generate dynamic HTML. let supportsDynamicResponse = // If we're in development, we always support dynamic HTML, unless it's // a data request, in which case we only produce static HTML. routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports // dynamic HTML. !isSSG || // If this request has provided postponed data, it supports dynamic // HTML. typeof initialPostponed === 'string' || // If this is a dynamic RSC request, then this render supports dynamic // HTML (it's dynamic). isDynamicRSCRequest; // When html bots request PPR page, perform the full dynamic rendering. const shouldWaitOnAllReady = isHtmlBot && isRoutePPREnabled; let ssgCacheKey = null; if (!isDraftMode && isSSG && !supportsDynamicResponse && !isPossibleServerAction && !minimalPostponed && !isDynamicRSCRequest) { ssgCacheKey = resolvedPathname; } // the staticPathKey differs from ssgCacheKey since // ssgCacheKey is null in dev since we're always in "dynamic" // mode in dev to bypass the cache, but we still need to honor // dynamicParams = false in dev mode let staticPathKey = ssgCacheKey; if (!staticPathKey && routeModule.isDev) { staticPathKey = resolvedPathname; } // If this is a request for an app path that should be statically generated // and we aren't in the edge runtime, strip the flight headers so it will // generate the static response. if (!routeModule.isDev && !isDraftMode && isSSG && isRSCRequest && !isDynamicRSCRequest) { stripFlightHeaders(req.headers); } const ComponentMod = { ...entryBase, tree, pages, GlobalError, handler, routeModule, __next_app__ }; // Before rendering (which initializes component tree modules), we have to // set the reference manifests to our global store so Server Action's // encryption util can access to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page: srcPage, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const method = req.method || 'GET'; const tracer = getTracer(); const activeSpan = tracer.getActiveScopeSpan(); try { const varyHeader = routeModule.getVaryHeader(resolvedPathname, interceptionRoutePatterns); res.setHeader('Vary', varyHeader); const invokeRouteModule = async (span, context)=>{ const nextReq = new NodeNextRequest(req); const nextRes = new NodeNextResponse(res); // TODO: adapt for putting the RDC inside the postponed data // If we're in dev, and this isn't a prefetch or a server action, // we should seed the resume data cache. if (process.env.NODE_ENV === 'development') { if (nextConfig.experimental.cacheComponents && !isPrefetchRSCRequest && !context.renderOpts.isPossibleServerAction) { const warmup = await routeModule.warmup(nextReq, nextRes, context); // If the warmup is successful, we should use the resume data // cache from the warmup. if (warmup.metadata.renderResumeDataCache) { context.renderOpts.renderResumeDataCache = warmup.metadata.renderResumeDataCache; } } } return routeModule.render(nextReq, nextRes, context).finally(()=>{ if (!span) return; span.setAttributes({ 'http.status_code': res.statusCode, 'next.rsc': false }); const rootSpanAttributes = tracer.getRootSpanAttributes(); // We were unable to get attributes, probably OTEL is not enabled if (!rootSpanAttributes) { return; } if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) { console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`); return; } const route = rootSpanAttributes.get('next.route'); if (route) { const name = `${method} ${route}`; span.setAttributes({ 'next.route': route, 'http.route': route, 'next.span_name': name }); span.updateName(name); } else { span.updateName(`${method} ${req.url}`); } }); }; const doRender = async ({ span, postponed, fallbackRouteParams })=>{ const context = { query, params, page: normalizedSrcPage, sharedContext: { buildId }, serverComponentsHmrCache: getRequestMeta(req, 'serverComponentsHmrCache'), fallbackRouteParams, renderOpts: { App: ()=>null, Document: ()=>null, pageConfig: {}, ComponentMod, Component: interopDefault(ComponentMod), params, routeModule, page: srcPage, postponed, shouldWaitOnAllReady, serveStreamingMetadata, supportsDynamicResponse: typeof postponed === 'string' || supportsDynamicResponse, buildManifest, nextFontManifest, reactLoadableManifest, subresourceIntegrityManifest, serverActionsManifest, clientReferenceManifest, setIsrStatus: routerServerContext == null ? void 0 : routerServerContext.setIsrStatus, dir: process.env.NEXT_RUNTIME === 'nodejs' ? require('path').join(/* turbopackIgnore: true */ process.cwd(), routeModule.relativeProjectDir) : `${process.cwd()}/${routeModule.relativeProjectDir}`, isDraftMode, isRevalidate: isSSG && !postponed && !isDynamicRSCRequest, botType, isOnDemandRevalidate, isPossibleServerAction, assetPrefix: nextConfig.assetPrefix, nextConfigOutput: nextConfig.output, crossOrigin: nextConfig.crossOrigin, trailingSlash: nextConfig.trailingSlash, previewProps: prerenderManifest.preview, deploymentId: nextConfig.deploymentId, enableTainting: nextConfig.experimental.taint, htmlLimitedBots: nextConfig.htmlLimitedBots, devtoolSegmentExplorer: nextConfig.experimental.devtoolSegmentExplorer, reactMaxHeadersLength: nextConfig.reactMaxHeadersLength, multiZoneDraftMode, incrementalCache: getRequestMeta(req, 'incrementalCache'), cacheLifeProfiles: nextConfig.experimental.cacheLife, basePath: nextConfig.basePath, serverActions: nextConfig.experimental.serverActions, ...isDebugStaticShell || isDebugDynamicAccesses ? { nextExport: true, supportsDynamicResponse: false, isStaticGeneration: true, isRevalidate: true, isDebugDynamicAccesses: isDebugDynamicAccesses } : {}, experimental: { isRoutePPREnabled, expireTime: nextConfig.expireTime, staleTimes: nextConfig.experimental.staleTimes, cacheComponents: Boolean(nextConfig.experimental.cacheComponents), clientSegmentCache: Boolean(nextConfig.experimental.clientSegmentCache), clientParamParsing: Boolean(nextConfig.experimental.clientParamParsing), dynamicOnHover: Boolean(nextConfig.experimental.dynamicOnHover), inlineCss: Boolean(nextConfig.experimental.inlineCss), authInterrupts: Boolean(nextConfig.experimental.authInterrupts), clientTraceMetadata: nextConfig.experimental.clientTraceMetadata || [] }, waitUntil: ctx.waitUntil, onClose: (cb)=>{ res.on('close', cb); }, onAfterTaskError: ()=>{}, onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext), err: getRequestMeta(req, 'invokeError'), dev: routeModule.isDev } }; const result = await invokeRouteModule(span, context); const { metadata } = result; const { cacheControl, headers = {}, // Add any fetch tags that were on the page to the response headers. fetchTags: cacheTags } = metadata; if (cacheTags) { headers[NEXT_CACHE_TAGS_HEADER] = cacheTags; } // Pull any fetch metrics from the render onto the request. ; req.fetchMetrics = metadata.fetchMetrics; // we don't throw static to dynamic errors in dev as isSSG // is a best guess in dev since we don't have the prerender pass // to know whether the path is actually static or not if (isSSG && (cacheControl == null ? void 0 : cacheControl.revalidate) === 0 && !routeModule.isDev && !isRoutePPREnabled) { const staticBailoutInfo = metadata.staticBailoutInfo; const err = Object.defineProperty(new Error(`Page changed from static to dynamic at runtime ${resolvedPathname}${(staticBailoutInfo == null ? void 0 : staticBailoutInfo.description) ? `, reason: ${staticBailoutInfo.description}` : ``}` + `\nsee more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`), "__NEXT_ERROR_CODE", { value: "E132", enumerable: false, configurable: true }); if (staticBailoutInfo == null ? void 0 : staticBailoutInfo.stack) { const stack = staticBailoutInfo.stack; err.stack = err.message + stack.substring(stack.indexOf('\n')); } throw err; } return { value: { kind: CachedRouteKind.APP_PAGE, html: result, headers, rscData: metadata.flightData, postponed: metadata.postponed, status: metadata.statusCode, segmentData: metadata.segmentData }, cacheControl }; }; const responseGenerator = async ({ hasResolved, previousCacheEntry, isRevalidating, span })=>{ const isProduction = routeModule.isDev === false; const didRespond = hasResolved || res.writableEnded; // skip on-demand revalidate if cache is not present and // revalidate-if-generated is set if (isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry && !minimalMode) { if (routerServerContext == null ? void 0 : routerServerContext.render404) { await routerServerContext.render404(req, res); } else { res.statusCode = 404; res.end('This page could not be found'); } return null; } let fallbackMode; if (prerenderInfo) { fallbackMode = parseFallbackField(prerenderInfo.fallback); } // When serving a HTML bot request, we want to serve a blocking render and // not the prerendered page. This ensures that the correct content is served // to the bot in the head. if (fallbackMode === FallbackMode.PRERENDER && isBot(userAgent)) { if (!isRoutePPREnabled || isHtmlBot) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } } if ((previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) === -1) { isOnDemandRevalidate = true; } // TODO: adapt for PPR // only allow on-demand revalidate for fallback: true/blocking // or for prerendered fallback: false paths if (isOnDemandRevalidate && (fallbackMode !== FallbackMode.NOT_FOUND || previousCacheEntry)) { fallbackMode = FallbackMode.BLOCKING_STATIC_RENDER; } if (!minimalMode && fallbackMode !== FallbackMode.BLOCKING_STATIC_RENDER && staticPathKey && !didRespond && !isDraftMode && pageIsDynamic && (isProduction || !isPrerendered)) { // if the page has dynamicParams: false and this pathname wasn't // prerendered trigger the no fallback handling if (// In development, fall through to render to handle missing // getStaticPaths. (isProduction || prerenderInfo) && // When fallback isn't present, abort this render so we 404 fallbackMode === FallbackMode.NOT_FOUND) { throw new NoFallbackError(); } let fallbackResponse; if (isRoutePPREnabled && !isRSCRequest) { const cacheKey = typeof (prerenderInfo == null ? void 0 : prerenderInfo.fallback) === 'string' ? prerenderInfo.fallback : isProduction ? normalizedSrcPage : null; // We use the response cache here to handle the revalidation and // management of the fallback shell. fallbackResponse = await routeModule.handleResponse({ cacheKey, req, nextConfig, routeKind: RouteKind.APP_PAGE, isFallback: true, prerenderManifest, isRoutePPREnabled, responseGenerator: async ()=>doRender({ span, // We pass `undefined` as rendering a fallback isn't resumed // here. postponed: undefined, fallbackRouteParams: // If we're in production or we're debugging the fallback // shell then we should postpone when dynamic params are // accessed. isProduction || isDebugFallbackShell ? getFallbackRouteParams(normalizedSrcPage) : null }), waitUntil: ctx.waitUntil }); // If the fallback response was set to null, then we should return null. if (fallbackResponse === null) return null; // Otherwise, if we did get a fallback response, we should return it. if (fallbackResponse) { // Remove the cache control from the response to prevent it from being // used in the surrounding cache. delete fallbackResponse.cacheControl; return fallbackResponse; } } } // Only requests that aren't revalidating can be resumed. If we have the // minimal postponed data, then we should resume the render with it. const postponed = !isOnDemandRevalidate && !isRevalidating && minimalPostponed ? minimalPostponed : undefined; // When we're in minimal mode, if we're trying to debug the static shell, // we should just return nothing instead of resuming the dynamic render. if ((isDebugStaticShell || isDebugDynamicAccesses) && typeof postponed !== 'undefined') { return { cacheControl: { revalidate: 1, expire: undefined }, value: { kind: CachedRouteKind.PAGES, html: RenderResult.EMPTY, pageData: {}, headers: undefined, status: undefined } }; } // If this is a dynamic route with PPR enabled and the default route // matches were set, then we should pass the fallback route params to // the renderer as this is a fallback revalidation request. const fallbackRouteParams = pageIsDynamic && isRoutePPREnabled && (getRequestMeta(req, 'renderFallbackShell') || isDebugFallbackShell) ? getFallbackRouteParams(pathname) : null; // Perform the render. return doRender({ span, postponed, fallbackRouteParams }); }; const handleResponse = async (span)=>{ var _cacheEntry_value, _cachedData_headers; const cacheEntry = await routeModule.handleResponse({ cacheKey: ssgCacheKey, responseGenerator: (c)=>responseGenerator({ span, ...c }), routeKind: RouteKind.APP_PAGE, isOnDemandRevalidate, isRoutePPREnabled, req, nextConfig, prerenderManifest, waitUntil: ctx.waitUntil }); if (isDraftMode) { res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate'); } // In dev, we should not cache pages for any reason. if (routeModule.isDev) { res.setHeader('Cache-Control', 'no-store, must-revalidate'); } if (!cacheEntry) { if (ssgCacheKey) { // A cache entry might not be generated if a response is written // in `getInitialProps` or `getServerSideProps`, but those shouldn't // have a cache key. If we do have a cache key but we don't end up // with a cache entry, then either Next.js or the application has a // bug that needs fixing. throw Object.defineProperty(new Error('invariant: cache entry required but not generated'), "__NEXT_ERROR_CODE", { value: "E62", enumerable: false, configurable: true }); } return null; } if (((_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_PAGE) { var _cacheEntry_value1; throw Object.defineProperty(new Error(`Invariant app-page handler received invalid cache entry ${(_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E707", enumerable: false, configurable: true }); } const didPostpone = typeof cacheEntry.value.postponed === 'string'; if (isSSG && // We don't want to send a cache header for requests that contain dynamic // data. If this is a Dynamic RSC request or wasn't a Prefetch RSC // request, then we should set the cache header. !isDynamicRSCRequest && (!didPostpone || isPrefetchRSCRequest)) { if (!minimalMode) { // set x-nextjs-cache header to match the header // we set for the image-optimizer res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT'); } // Set a header used by the client router to signal the response is static // and should respect the `static` cache staleTime value. res.setHeader(NEXT_IS_PRERENDER_HEADER, '1'); } const { value: cachedData } = cacheEntry; // Coerce the cache control parameter from the render. let cacheControl; // If this is a resume request in minimal mode it is streamed with dynamic // content and should not be cached. if (minimalPostponed) { cacheControl = { revalidate: 0, expire: undefined }; } else if (minimalMode && isRSCRequest && !isPrefetchRSCRequest && isRoutePPREnabled) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!routeModule.isDev) { // If this is a preview mode request, we shouldn't cache it if (isDraftMode) { cacheControl = { revalidate: 0, expire: undefined }; } else if (!isSSG) { if (!res.getHeader('Cache-Control')) { cacheControl = { revalidate: 0, expire: undefined }; } } else if (cacheEntry.cacheControl) { // If the cache entry has a cache control with a revalidate value that's // a number, use it. if (typeof cacheEntry.cacheControl.revalidate === 'number') { var _cacheEntry_cacheControl; if (cacheEntry.cacheControl.revalidate < 1) { throw Object.defineProperty(new Error(`Invalid revalidate configuration provided: ${cacheEntry.cacheControl.revalidate} < 1`), "__NEXT_ERROR_CODE", { value: "E22", enumerable: false, configurable: true }); } cacheControl = { revalidate: cacheEntry.cacheControl.revalidate, expire: ((_cacheEntry_cacheControl = cacheEntry.cacheControl) == null ? void 0 : _cacheEntry_cacheControl.expire) ?? nextConfig.expireTime }; } else { cacheControl = { revalidate: CACHE_ONE_YEAR, expire: undefined }; } } } cacheEntry.cacheControl = cacheControl; if (typeof segmentPrefetchHeader === 'string' && (cachedData == null ? void 0 : cachedData.kind) === CachedRouteKind.APP_PAGE && cachedData.segmentData) { var _cachedData_headers1; // This is a prefetch request issued by the client Segment Cache. These // should never reach the application layer (lambda). We should either // respond from the cache (HIT) or respond with 204 No Content (MISS). // Set a header to indicate that PPR is enabled for this route. This // lets the client distinguish between a regular cache miss and a cache // miss due to PPR being disabled. In other contexts this header is used // to indicate that the response contains dynamic data, but here we're // only using it to indicate that the feature is enabled — the segment // response itself contains whether the data is dynamic. res.setHeader(NEXT_DID_POSTPONE_HEADER, '2'); // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers1 = cachedData.headers) == null ? void 0 : _cachedData_headers1[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } const matchedSegment = cachedData.segmentData.get(segmentPrefetchHeader); if (matchedSegment !== undefined) { // Cache hit return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(matchedSegment, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // Cache miss. Either a cache entry for this route has not been generated // (which technically should not be possible when PPR is enabled, because // at a minimum there should always be a fallback entry) or there's no // match for the requested segment. Respond with a 204 No Content. We // don't bother to respond with 404, because these requests are only // issued as part of a prefetch. res.statusCode = 204; return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.EMPTY, cacheControl: cacheEntry.cacheControl }); } // If there's a callback for `onCacheEntry`, call it with the cache entry // and the revalidate options. const onCacheEntry = getRequestMeta(req, 'onCacheEntry'); if (onCacheEntry) { const finished = await onCacheEntry({ ...cacheEntry, // TODO: remove this when upstream doesn't // always expect this value to be "PAGE" value: { ...cacheEntry.value, kind: 'PAGE' } }, { url: getRequestMeta(req, 'initURL') }); if (finished) { // TODO: maybe we have to end the request? return null; } } // If the request has a postponed state and it's a resume request we // should error. if (didPostpone && minimalPostponed) { throw Object.defineProperty(new Error('Invariant: postponed state should not be present on a resume request'), "__NEXT_ERROR_CODE", { value: "E396", enumerable: false, configurable: true }); } if (cachedData.headers) { const headers = { ...cachedData.headers }; if (!minimalMode || !isSSG) { delete headers[NEXT_CACHE_TAGS_HEADER]; } for (let [key, value] of Object.entries(headers)){ if (typeof value === 'undefined') continue; if (Array.isArray(value)) { for (const v of value){ res.appendHeader(key, v); } } else if (typeof value === 'number') { value = value.toString(); res.appendHeader(key, value); } else { res.appendHeader(key, value); } } } // Add the cache tags header to the response if it exists and we're in // minimal mode while rendering a static page. const tags = (_cachedData_headers = cachedData.headers) == null ? void 0 : _cachedData_headers[NEXT_CACHE_TAGS_HEADER]; if (minimalMode && isSSG && tags && typeof tags === 'string') { res.setHeader(NEXT_CACHE_TAGS_HEADER, tags); } // If the request is a data request, then we shouldn't set the status code // from the response because it should always be 200. This should be gated // behind the experimental PPR flag. if (cachedData.status && (!isRSCRequest || !isRoutePPREnabled)) { res.statusCode = cachedData.status; } // Redirect information is encoded in RSC payload, so we don't need to use redirect status codes if (!minimalMode && cachedData.status && RedirectStatusCode[cachedData.status] && isRSCRequest) { res.statusCode = 200; } // Mark that the request did postpone. if (didPostpone) { res.setHeader(NEXT_DID_POSTPONE_HEADER, '1'); } // we don't go through this block when preview mode is true // as preview mode is a dynamic request (bypasses cache) and doesn't // generate both HTML and payloads in the same request so continue to just // return the generated payload if (isRSCRequest && !isDraftMode) { // If this is a dynamic RSC request, then stream the response. if (typeof cachedData.rscData === 'undefined') { if (cachedData.postponed) { throw Object.defineProperty(new Error('Invariant: Expected postponed to be undefined'), "__NEXT_ERROR_CODE", { value: "E372", enumerable: false, configurable: true }); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: cachedData.html, // Dynamic RSC responses cannot be cached, even if they're // configured with `force-static` because we have no way of // distinguishing between `force-static` and pages that have no // postponed state. // TODO: distinguish `force-static` from pages with no postponed state (static) cacheControl: isDynamicRSCRequest ? { revalidate: 0, expire: undefined } : cacheEntry.cacheControl }); } // As this isn't a prefetch request, we should serve the static flight // data. return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: RenderResult.fromStatic(cachedData.rscData, RSC_CONTENT_TYPE_HEADER), cacheControl: cacheEntry.cacheControl }); } // This is a request for HTML data. let body = cachedData.html; // If there's no postponed state, we should just serve the HTML. This // should also be the case for a resume request because it's completed // as a server render (rather than a static render). if (!didPostpone || minimalMode || isRSCRequest) { // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE && minimalMode && isRoutePPREnabled && body.contentType === HTML_CONTENT_TYPE_HEADER) { // As we're in minimal mode, the static part would have already been // streamed first. The only part that this streams is the dynamic part // so we should FIRST stream the sentinel and THEN the dynamic part. body.unshift(createPPRBoundarySentinel()); } return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: cacheEntry.cacheControl }); } // If we're debugging the static shell or the dynamic API accesses, we // should just serve the HTML without resuming the render. The returned // HTML will be the static shell so all the Dynamic API's will be used // during static generation. if (isDebugStaticShell || isDebugDynamicAccesses) { // Since we're not resuming the render, we need to at least add the // closing body and html tags to create valid HTML. body.push(new ReadableStream({ start (controller) { controller.enqueue(ENCODED_TAGS.CLOSED.BODY_AND_HTML); controller.close(); } })); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, cacheControl: { revalidate: 0, expire: undefined } }); } // If we're in test mode, we should add a sentinel chunk to the response // that's between the static and dynamic parts so we can compare the // chunks and add assertions. if (process.env.__NEXT_TEST_MODE) { body.push(createPPRBoundarySentinel()); } // This request has postponed, so let's create a new transformer that the // dynamic data can pipe to that will attach the dynamic data to the end // of the response. const transformer = new TransformStream(); body.push(transformer.readable); // Perform the render again, but this time, provide the postponed state. // We don't await because we want the result to start streaming now, and // we've already chained the transformer's readable to the render result. doRender({ span, postponed: cachedData.postponed, // This is a resume render, not a fallback render, so we don't need to // set this. fallbackRouteParams: null }).then(async (result)=>{ var _result_value; if (!result) { throw Object.defineProperty(new Error('Invariant: expected a result to be returned'), "__NEXT_ERROR_CODE", { value: "E463", enumerable: false, configurable: true }); } if (((_result_value = result.value) == null ? void 0 : _result_value.kind) !== CachedRouteKind.APP_PAGE) { var _result_value1; throw Object.defineProperty(new Error(`Invariant: expected a page response, got ${(_result_value1 = result.value) == null ? void 0 : _result_value1.kind}`), "__NEXT_ERROR_CODE", { value: "E305", enumerable: false, configurable: true }); } // Pipe the resume result to the transformer. await result.value.html.pipeTo(transformer.writable); }).catch((err)=>{ // An error occurred during piping or preparing the render, abort // the transformers writer so we can terminate the stream. transformer.writable.abort(err).catch((e)=>{ console.error("couldn't abort transformer", e); }); }); return sendRenderResult({ req, res, generateEtags: nextConfig.generateEtags, poweredByHeader: nextConfig.poweredByHeader, result: body, // We don't want to cache the response if it has postponed data because // the response being sent to the client it's dynamic parts are streamed // to the client on the same request. cacheControl: { revalidate: 0, expire: undefined } }); }; // TODO: activeSpan code path is for when wrapped by // next-server can be removed when this is no longer used if (activeSpan) { await handleResponse(activeSpan); } else { return await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, { spanName: `${method} ${req.url}`, kind: SpanKind.SERVER, attributes: { 'http.method': method, 'http.target': req.url } }, handleResponse)); } } catch (err) { if (!(err instanceof NoFallbackError)) { await routeModule.onRequestError(req, err, { routerKind: 'App Router', routePath: srcPage, routeType: 'render', revalidateReason: getRevalidateReason({ isRevalidate: isSSG, isOnDemandRevalidate }) }, routerServerContext); } // rethrow so that we can handle serving error page throw err; } } // TODO: omit this from production builds, only test builds should include it /** * Creates a readable stream that emits a PPR boundary sentinel. * * @returns A readable stream that emits a PPR boundary sentinel. */ function createPPRBoundarySentinel() { return new ReadableStream({ start (controller) { controller.enqueue(new TextEncoder().encode('')); controller.close(); } }); } //# sourceMappingURL=app-page.js.map [&22233Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 1662))undefined258345Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 1170, 23))undefined370454Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 7028, 23))undefined479563Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 461, 23))undefined588675Promise.resolve(/* import() eager */).then(__webpack_require__.t.bind(__webpack_require__, 2768, 23))undefined700922Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 7513))undefined9451165Promise.resolve(/* import() eager */).then(__webpack_require__.bind(__webpack_require__, 9610))undefined11681308undefined13101424undefined14261502undefined15041575undefined15771639undefined16411710undefined17121788undefined17901875undefined18771960undefined19622038undefined20402112undefined21142195undefined21972290undefined22922396undefined23982478undefined24802558undefined25602651undefined26532834undefined28362912undefined29142979undefined29813054undefined30563113undefined31153221undefined32233296undefined32983362undefined33643445undefined49654987undefined49895125undefined51275149undefined51805198__webpack_require__undefined52565262undefined53635489undefined54915576undefined55785691undefined57545760undefined57855802next_dist_server_route_modules_app_page_module_compiled__WEBPACK_IMPORTED_MODULE_0__.AppPageRouteModuleundefined58385846next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined61106145".next"undefined615061510undefined61786216 falseundefined62286234undefined65186538falseundefined65416605{}undefined67516790falseundefined68226835(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined69266939(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined77057720(0,next_dist_shared_lib_router_utils_app_paths__WEBPACK_IMPORTED_MODULE_15__.normalizeAppPath)undefined81078116(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.getBotType)undefined81528167(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.isHtmlBotRequest)undefined83128325(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined83718397next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_ROUTER_PREFETCH_HEADERundefined85768589(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined86158632(0,next_dist_server_lib_is_rsc_request__WEBPACK_IMPORTED_MODULE_10__/* .isRSCRequestHeader */ .f)undefined86468655next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_HEADERundefined86958719(0,next_dist_server_lib_server_action_request_meta__WEBPACK_IMPORTED_MODULE_16__.getIsPossibleServerAction)undefined88998918(0,next_dist_server_lib_experimental_ppr__WEBPACK_IMPORTED_MODULE_9__.checkIsAppPPREnabled)undefined91109217 falseundefined922292360undefined1153211545(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1193011957(0,next_dist_server_lib_streaming_metadata__WEBPACK_IMPORTED_MODULE_13__.shouldServeStreamingMetadata)undefined1374213759(0,next_dist_server_app_render_strip_flight_headers__WEBPACK_IMPORTED_MODULE_7__/* .stripFlightHeaders */ .d)undefined1381913827next_dist_server_app_render_entry_base__WEBPACK_IMPORTED_MODULE_27__undefined1387813877: (next_dist_client_components_builtin_global_error_js__WEBPACK_IMPORTED_MODULE_26___default())undefined1424614275(0,next_dist_server_app_render_encryption_utils__WEBPACK_IMPORTED_MODULE_12__.setReferenceManifestsSingleton)undefined1440714427(0,next_dist_server_app_render_action_utils__WEBPACK_IMPORTED_MODULE_14__.createServerModuleMap)undefined1456114569(0,next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.getTracer)undefined1486914883next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextRequestundefined1492314938next_dist_server_base_http_node__WEBPACK_IMPORTED_MODULE_8__.NodeNextResponseundefined1516615203falseundefined1520615781{}undefined1635916372next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined1745917472(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined1775117764(0,next_dist_server_app_render_interop_default__WEBPACK_IMPORTED_MODULE_6__/* .interopDefault */ .T)undefined1848318519 trueundefined1852318542(__webpack_require__(9902).join)undefined18621186720undefined1963319646(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2148721500(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2192421945next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined2338423398next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined2464424661(0,next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.parseFallbackField)undefined2495024961next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2497624980(0,next_dist_shared_lib_router_utils_is_bot__WEBPACK_IMPORTED_MODULE_18__.isBot)undefined2508625097next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2553125542next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2561125622next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2571125722next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2625526266next_dist_lib_fallback__WEBPACK_IMPORTED_MODULE_20__.FallbackModeundefined2631126325next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackErrorundefined2697726985next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined2773127752(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)undefined2928029294next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined2933329344next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined2984629859(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined2991629937(0,next_dist_server_request_fallback_params__WEBPACK_IMPORTED_MODULE_11__/* .getFallbackRouteParams */ .u)undefined3051230520next_dist_server_route_kind__WEBPACK_IMPORTED_MODULE_1__.RouteKindundefined3199932013next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined3336533388next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_IS_PRERENDER_HEADERundefined3585535868next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.CACHE_ONE_YEARundefined3616336177next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined3706037083next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADERundefined3735537376next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined3749437515next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined3774537760(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined3798837999next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined3802838050next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADERundefined3870638721(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined3892938940next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined3920339216(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined3966439677(0,next_dist_server_request_meta__WEBPACK_IMPORTED_MODULE_4__.getRequestMeta)undefined4054740568next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined4144741468next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined4157841599next_dist_lib_constants__WEBPACK_IMPORTED_MODULE_22__.NEXT_CACHE_TAGS_HEADERundefined4215242169next_dist_client_components_redirect_status_code__WEBPACK_IMPORTED_MODULE_28__.RedirectStatusCodeundefined4237342396next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.NEXT_DID_POSTPONE_HEADERundefined4329243307(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4433544350(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4455844569next_dist_server_render_result__WEBPACK_IMPORTED_MODULE_21__["default"]undefined4460244624next_dist_client_components_app_router_headers__WEBPACK_IMPORTED_MODULE_17__.RSC_CONTENT_TYPE_HEADERundefined4534145453falseundefined4545645806{}undefined4583145846(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4679046801next_dist_server_stream_utils_encoded_tags__WEBPACK_IMPORTED_MODULE_23__.ENCODED_TAGSundefined4693646951(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined4756247589falseundefined4759247662{}undefined4897048984next_dist_server_response_cache__WEBPACK_IMPORTED_MODULE_19__.CachedRouteKindundefined4990849923(0,next_dist_server_send_payload__WEBPACK_IMPORTED_MODULE_24__.sendRenderResult)undefined5079850811next_dist_server_lib_trace_constants__WEBPACK_IMPORTED_MODULE_5__.BaseServerSpanundefined5091050917next_dist_server_lib_trace_tracer__WEBPACK_IMPORTED_MODULE_3__.SpanKindundefined5117351187next_dist_shared_lib_no_fallback_error_external__WEBPACK_IMPORTED_MODULE_25__.NoFallbackErrorundefined5139951417(0,next_dist_server_instrumentation_utils__WEBPACK_IMPORTED_MODULE_2__/* .getRevalidateReason */ .c)undefinedŊŋŊ, /***/ 9121: ˜ģŧYmodule.exports = require("next/dist/server/app-render/action-async-storage.external.js");ģŊģ, /***/ 9294: –šēWmodule.exports = require("next/dist/server/app-render/work-async-storage.external.js");šģš, /***/ 9610: ”Č”__webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7954); /* harmony import */ var react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__); –ņô˙˙į61134undefined136150/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (undefined136150undefined151173(0,react_server_dom_webpack_server__WEBPACK_IMPORTED_MODULE_0__.registerClientReference)undefined850850.5);undefinedļ¸ļ, /***/ 9672: ‘Å‘’“”•–—˜“”„õ˙˙™šĩˇĩ, /***/ 9902: ŗ´!module.exports = require("path");ŗĩŗw }; ; // load runtime var __webpack_require__ = require("../../webpack-runtime.js"); __webpack_require__.C(exports); ˛žvar __webpack_exec__ = (moduleId) => (__webpack_require__(__webpack_require__.s = moduleId)) var __webpack_exports__ = __webpack_require__.X(0, [5873,4792], () => (__webpack_exec__(9108))); ą,module.exports = __webpack_exports__; })();~˙˙˙  (()=>{var a={};a.id=5105,a.ids=[5105],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1025:a=>{"use strict";a.exports=require("next/dist/server/app-render/dynamic-access-async-storage.external.js")},1135:()=>{},1459:()=>{},1619:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,1170,23)),Promise.resolve().then(c.t.bind(c,3597,23)),Promise.resolve().then(c.t.bind(c,6893,23)),Promise.resolve().then(c.t.bind(c,9748,23)),Promise.resolve().then(c.t.bind(c,6060,23)),Promise.resolve().then(c.t.bind(c,7184,23)),Promise.resolve().then(c.t.bind(c,9576,23)),Promise.resolve().then(c.t.bind(c,3041,23)),Promise.resolve().then(c.t.bind(c,1384,23))},1662:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>f,metadata:()=>e});var d=c(5338);c(1135);let e={title:"COSMIC AI-Risk SaaS",description:"Commercial multi-tenant COSMIC AI-Risk governance platform"};function f({children:a}){return(0,d.jsx)("html",{lang:"en",children:(0,d.jsx)("body",{children:a})})}},2378:(a,b,c)=>{"use strict";var d=c(1330);c.o(d,"useRouter")&&c.d(b,{useRouter:function(){return d.useRouter}}),c.o(d,"useSearchParams")&&c.d(b,{useSearchParams:function(){return d.useSearchParams}})},3033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},3676:(a,b,c)=>{Promise.resolve().then(c.bind(c,4744))},4194:(a,b,c)=>{"use strict";async function d(a,b,c){let d={method:a,headers:{"Content-Type":"application/json"}};c&&(d.body=JSON.stringify(c));let e=await fetch(`${b}`,d),f=e.headers.get("content-type")?.includes("application/json")?await e.json():await e.text();if(!e.ok)throw Error(f?.error||f?.message||`Request failed (${e.status})`);return f}c.d(b,{FH:()=>e,Ht:()=>f,ri:()=>g});let e={get:a=>d("GET",a),post:(a,b)=>d("POST",a,b),put:(a,b)=>d("PUT",a,b),patch:(a,b)=>d("PATCH",a,b),del:a=>d("DELETE",a)};async function f(){try{let a=await e.get("/api/auth/session");return a.user||a.actor||null}catch{return null}}async function g(){await e.post("/api/auth/logout"),window.location.href="/"}},4744:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(7954).registerClientReference)(function(){throw Error("Attempted to call the default export of \"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\\\\components\\\\AppShell.jsx\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"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\\components\\AppShell.jsx","default")},5498:(a,b,c)=>{Promise.resolve().then(c.bind(c,9672))},5883:()=>{},6114:(a,b,c)=>{Promise.resolve().then(c.bind(c,9610))},6439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},6713:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/is-bot")},7228:(a,b,c)=>{Promise.resolve().then(c.bind(c,8698))},7275:(a,b,c)=>{Promise.resolve().then(c.t.bind(c,4160,23)),Promise.resolve().then(c.t.bind(c,1603,23)),Promise.resolve().then(c.t.bind(c,8495,23)),Promise.resolve().then(c.t.bind(c,5170,23)),Promise.resolve().then(c.t.bind(c,7526,23)),Promise.resolve().then(c.t.bind(c,8922,23)),Promise.resolve().then(c.t.bind(c,9234,23)),Promise.resolve().then(c.t.bind(c,2263,23)),Promise.resolve().then(c.bind(c,2146))},7513:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>g});var d=c(5338),e=c(4515),f=c(4744);function g({children:a}){return(0,d.jsx)(e.Suspense,{fallback:(0,d.jsx)("div",{className:"shell-loading",children:(0,d.jsx)("div",{className:"spinner"})}),children:(0,d.jsx)(f.default,{children:a})})}},8354:a=>{"use strict";a.exports=require("util")},8698:(a,b,c)=>{"use strict";c.d(b,{default:()=>i});var d=c(1124),e=c(8301),f=c(2378),g=c(4194);let h=[{label:"Overview",tab:"Overview",icon:"◇"},{label:"Risks",tab:"Risks",icon:"⚠"},{label:"Mitigations",tab:"Mitigations",icon:"●"},{label:"Gate",tab:"Gate",icon:"⊞"},{label:"Integrations",tab:"Integrations",icon:"⇆"}];function i({children:a}){let[b,c]=(0,e.useState)(null),[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)(!0),m=(0,f.useRouter)(),n=(0,f.useSearchParams)().get("tab")||"Overview";return k?(0,d.jsx)("div",{className:"shell-loading",children:(0,d.jsx)("div",{className:"spinner"})}):(0,d.jsxs)("div",{className:"app-shell",children:[(0,d.jsx)("button",{className:"sidebar-toggle",onClick:()=>j(!i),children:i?"✕":"☰"}),(0,d.jsxs)("aside",{className:`sidebar ${i?"open":""}`,children:[(0,d.jsx)("div",{className:"sidebar-brand",children:"COSMIC"}),(0,d.jsxs)("div",{className:"sidebar-user",children:[(0,d.jsx)("div",{className:"sidebar-user-name",children:b.displayName}),(0,d.jsx)("div",{className:"sidebar-user-email",children:b.email})]}),(0,d.jsx)("nav",{className:"sidebar-nav",children:h.map(a=>{let b=n===a.tab;return(0,d.jsxs)("a",{href:`/dashboard?tab=${a.tab}`,className:`sidebar-link ${b?"active":""}`,onClick:b=>{b.preventDefault(),j(!1),m.push(`/dashboard?tab=${a.tab}`)},children:[(0,d.jsx)("span",{className:"sidebar-icon",children:a.icon}),a.label]},a.tab)})}),(0,d.jsx)("div",{className:"sidebar-footer",children:(0,d.jsx)("button",{className:"sidebar-logout",onClick:g.ri,children:"Sign out"})})]}),i&&(0,d.jsx)("div",{className:"sidebar-overlay",onClick:()=>j(!1)}),(0,d.jsx)("main",{className:"app-main",children:a})]})}},9108:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GlobalError:()=>E.a,__next_app__:()=>K,handler:()=>M,pages:()=>J,routeModule:()=>L,tree:()=>I});var d=c(9754),e=c(9117),f=c(6595),g=c(2324),h=c(9326),i=c(8928),j=c(175),k=c(12),l=c(4290),m=c(2696),n=c(2574),o=c(2802),p=c(7533),q=c(5229),r=c(2822),s=c(261),t=c(6453),u=c(2474),v=c(6713),w=c(1356),x=c(2685),y=c(6225),z=c(3446),A=c(2762),B=c(5742),C=c(6439),D=c(1170),E=c.n(D),F=c(2506),G=c(1203),H={};for(let a in F)0>["default","tree","pages","GlobalError","__next_app__","routeModule","handler"].indexOf(a)&&(H[a]=()=>F[a]);c.d(b,H);let I={children:["",{children:["dashboard",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(c.bind(c,9610)),"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"]}]},{layout:[()=>Promise.resolve().then(c.bind(c,7513)),"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\\layout.jsx"]}]},{layout:[()=>Promise.resolve().then(c.bind(c,1662)),"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\\layout.jsx"],"global-error":[()=>Promise.resolve().then(c.t.bind(c,1170,23)),"next/dist/client/components/builtin/global-error.js"],"not-found":[()=>Promise.resolve().then(c.t.bind(c,7028,23)),"next/dist/client/components/builtin/not-found.js"],forbidden:[()=>Promise.resolve().then(c.t.bind(c,461,23)),"next/dist/client/components/builtin/forbidden.js"],unauthorized:[()=>Promise.resolve().then(c.t.bind(c,2768,23)),"next/dist/client/components/builtin/unauthorized.js"]}]}.children,J=["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"],K={require:c,loadChunk:()=>Promise.resolve()},L=new d.AppPageRouteModule({definition:{kind:e.RouteKind.APP_PAGE,page:"/dashboard/page",pathname:"/dashboard",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:I},distDir:".next",relativeProjectDir:""});async function M(a,b,d){var D;let H="/dashboard/page";"/index"===H&&(H="/");let N=(0,h.getRequestMeta)(a,"postponed"),O=(0,h.getRequestMeta)(a,"minimalMode"),P=await L.prepare(a,b,{srcPage:H,multiZoneDraftMode:!1});if(!P)return b.statusCode=400,b.end("Bad Request"),null==d.waitUntil||d.waitUntil.call(d,Promise.resolve()),null;let{buildId:Q,query:R,params:S,parsedUrl:T,pageIsDynamic:U,buildManifest:V,nextFontManifest:W,reactLoadableManifest:X,serverActionsManifest:Y,clientReferenceManifest:Z,subresourceIntegrityManifest:$,prerenderManifest:_,isDraftMode:aa,resolvedPathname:ab,revalidateOnlyGenerated:ac,routerServerContext:ad,nextConfig:ae,interceptionRoutePatterns:af}=P,ag=T.pathname||"/",ah=(0,s.normalizeAppPath)(H),{isOnDemandRevalidate:ai}=P,aj=L.match(ag,_),ak=!!_.routes[ab],al=!!(aj||ak||_.routes[ah]),am=a.headers["user-agent"]||"",an=(0,v.getBotType)(am),ao=(0,q.isHtmlBotRequest)(a),ap=(0,h.getRequestMeta)(a,"isPrefetchRSCRequest")??"1"===a.headers[u.NEXT_ROUTER_PREFETCH_HEADER],aq=(0,h.getRequestMeta)(a,"isRSCRequest")??(0,n.f)(a.headers[u.RSC_HEADER]),ar=(0,t.getIsPossibleServerAction)(a),as=(0,m.checkIsAppPPREnabled)(ae.experimental.ppr)&&(null==(D=_.routes[ah]??_.dynamicRoutes[ah])?void 0:D.renderingMode)==="PARTIALLY_STATIC",at=!1,au=!1,av=as?N:void 0,aw=as&&aq&&!ap,ax=(0,h.getRequestMeta)(a,"segmentPrefetchRSCRequest"),ay=!am||(0,q.shouldServeStreamingMetadata)(am,ae.htmlLimitedBots);ao&&as&&(al=!1,ay=!1);let az=!0===L.isDev||!al||"string"==typeof N||aw,aA=ao&&as,aB=null;aa||!al||az||ar||av||aw||(aB=ab);let aC=aB;!aC&&L.isDev&&(aC=ab),L.isDev||aa||!al||!aq||aw||(0,k.d)(a.headers);let aD={...F,tree:I,pages:J,GlobalError:E(),handler:M,routeModule:L,__next_app__:K};Y&&Z&&(0,p.setReferenceManifestsSingleton)({page:H,clientReferenceManifest:Z,serverActionsManifest:Y,serverModuleMap:(0,r.createServerModuleMap)({serverActionsManifest:Y})});let aE=a.method||"GET",aF=(0,g.getTracer)(),aG=aF.getActiveScopeSpan();try{let f=L.getVaryHeader(ab,af);b.setHeader("Vary",f);let k=async(c,d)=>{let e=new l.NodeNextRequest(a),f=new l.NodeNextResponse(b);return L.render(e,f,d).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=aF.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==i.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${aE} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${aE} ${a.url}`)})},m=async({span:e,postponed:f,fallbackRouteParams:g})=>{let i={query:R,params:S,page:ah,sharedContext:{buildId:Q},serverComponentsHmrCache:(0,h.getRequestMeta)(a,"serverComponentsHmrCache"),fallbackRouteParams:g,renderOpts:{App:()=>null,Document:()=>null,pageConfig:{},ComponentMod:aD,Component:(0,j.T)(aD),params:S,routeModule:L,page:H,postponed:f,shouldWaitOnAllReady:aA,serveStreamingMetadata:ay,supportsDynamicResponse:"string"==typeof f||az,buildManifest:V,nextFontManifest:W,reactLoadableManifest:X,subresourceIntegrityManifest:$,serverActionsManifest:Y,clientReferenceManifest:Z,setIsrStatus:null==ad?void 0:ad.setIsrStatus,dir:c(9902).join(process.cwd(),L.relativeProjectDir),isDraftMode:aa,isRevalidate:al&&!f&&!aw,botType:an,isOnDemandRevalidate:ai,isPossibleServerAction:ar,assetPrefix:ae.assetPrefix,nextConfigOutput:ae.output,crossOrigin:ae.crossOrigin,trailingSlash:ae.trailingSlash,previewProps:_.preview,deploymentId:ae.deploymentId,enableTainting:ae.experimental.taint,htmlLimitedBots:ae.htmlLimitedBots,devtoolSegmentExplorer:ae.experimental.devtoolSegmentExplorer,reactMaxHeadersLength:ae.reactMaxHeadersLength,multiZoneDraftMode:!1,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:ae.experimental.cacheLife,basePath:ae.basePath,serverActions:ae.experimental.serverActions,...at?{nextExport:!0,supportsDynamicResponse:!1,isStaticGeneration:!0,isRevalidate:!0,isDebugDynamicAccesses:at}:{},experimental:{isRoutePPREnabled:as,expireTime:ae.expireTime,staleTimes:ae.experimental.staleTimes,cacheComponents:!!ae.experimental.cacheComponents,clientSegmentCache:!!ae.experimental.clientSegmentCache,clientParamParsing:!!ae.experimental.clientParamParsing,dynamicOnHover:!!ae.experimental.dynamicOnHover,inlineCss:!!ae.experimental.inlineCss,authInterrupts:!!ae.experimental.authInterrupts,clientTraceMetadata:ae.experimental.clientTraceMetadata||[]},waitUntil:d.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:()=>{},onInstrumentationRequestError:(b,c,d)=>L.onRequestError(a,b,d,ad),err:(0,h.getRequestMeta)(a,"invokeError"),dev:L.isDev}},l=await k(e,i),{metadata:m}=l,{cacheControl:n,headers:o={},fetchTags:p}=m;if(p&&(o[z.NEXT_CACHE_TAGS_HEADER]=p),a.fetchMetrics=m.fetchMetrics,al&&(null==n?void 0:n.revalidate)===0&&!L.isDev&&!as){let a=m.staticBailoutInfo,b=Object.defineProperty(Error(`Page changed from static to dynamic at runtime ${ab}${(null==a?void 0:a.description)?`, reason: ${a.description}`:""} see more here https://nextjs.org/docs/messages/app-static-to-dynamic-error`),"__NEXT_ERROR_CODE",{value:"E132",enumerable:!1,configurable:!0});if(null==a?void 0:a.stack){let c=a.stack;b.stack=b.message+c.substring(c.indexOf("\n"))}throw b}return{value:{kind:w.CachedRouteKind.APP_PAGE,html:l,headers:o,rscData:m.flightData,postponed:m.postponed,status:m.statusCode,segmentData:m.segmentData},cacheControl:n}},n=async({hasResolved:c,previousCacheEntry:f,isRevalidating:g,span:i})=>{let j,k=!1===L.isDev,l=c||b.writableEnded;if(ai&&ac&&!f&&!O)return(null==ad?void 0:ad.render404)?await ad.render404(a,b):(b.statusCode=404,b.end("This page could not be found")),null;if(aj&&(j=(0,x.parseFallbackField)(aj.fallback)),j===x.FallbackMode.PRERENDER&&(0,v.isBot)(am)&&(!as||ao)&&(j=x.FallbackMode.BLOCKING_STATIC_RENDER),(null==f?void 0:f.isStale)===-1&&(ai=!0),ai&&(j!==x.FallbackMode.NOT_FOUND||f)&&(j=x.FallbackMode.BLOCKING_STATIC_RENDER),!O&&j!==x.FallbackMode.BLOCKING_STATIC_RENDER&&aC&&!l&&!aa&&U&&(k||!ak)){let b;if((k||aj)&&j===x.FallbackMode.NOT_FOUND)throw new C.NoFallbackError;if(as&&!aq){let c="string"==typeof(null==aj?void 0:aj.fallback)?aj.fallback:k?ah:null;if(b=await L.handleResponse({cacheKey:c,req:a,nextConfig:ae,routeKind:e.RouteKind.APP_PAGE,isFallback:!0,prerenderManifest:_,isRoutePPREnabled:as,responseGenerator:async()=>m({span:i,postponed:void 0,fallbackRouteParams:k||au?(0,o.u)(ah):null}),waitUntil:d.waitUntil}),null===b)return null;if(b)return delete b.cacheControl,b}}let n=ai||g||!av?void 0:av;if(at&&void 0!==n)return{cacheControl:{revalidate:1,expire:void 0},value:{kind:w.CachedRouteKind.PAGES,html:y.default.EMPTY,pageData:{},headers:void 0,status:void 0}};let p=U&&as&&((0,h.getRequestMeta)(a,"renderFallbackShell")||au)?(0,o.u)(ag):null;return m({span:i,postponed:n,fallbackRouteParams:p})},p=async c=>{var f,g,i,j,k;let l,o=await L.handleResponse({cacheKey:aB,responseGenerator:a=>n({span:c,...a}),routeKind:e.RouteKind.APP_PAGE,isOnDemandRevalidate:ai,isRoutePPREnabled:as,req:a,nextConfig:ae,prerenderManifest:_,waitUntil:d.waitUntil});if(aa&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate"),L.isDev&&b.setHeader("Cache-Control","no-store, must-revalidate"),!o){if(aB)throw Object.defineProperty(Error("invariant: cache entry required but not generated"),"__NEXT_ERROR_CODE",{value:"E62",enumerable:!1,configurable:!0});return null}if((null==(f=o.value)?void 0:f.kind)!==w.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant app-page handler received invalid cache entry ${null==(i=o.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E707",enumerable:!1,configurable:!0});let p="string"==typeof o.value.postponed;al&&!aw&&(!p||ap)&&(O||b.setHeader("x-nextjs-cache",ai?"REVALIDATED":o.isMiss?"MISS":o.isStale?"STALE":"HIT"),b.setHeader(u.NEXT_IS_PRERENDER_HEADER,"1"));let{value:q}=o;if(av)l={revalidate:0,expire:void 0};else if(O&&aq&&!ap&&as)l={revalidate:0,expire:void 0};else if(!L.isDev)if(aa)l={revalidate:0,expire:void 0};else if(al){if(o.cacheControl)if("number"==typeof o.cacheControl.revalidate){if(o.cacheControl.revalidate<1)throw Object.defineProperty(Error(`Invalid revalidate configuration provided: ${o.cacheControl.revalidate} < 1`),"__NEXT_ERROR_CODE",{value:"E22",enumerable:!1,configurable:!0});l={revalidate:o.cacheControl.revalidate,expire:(null==(j=o.cacheControl)?void 0:j.expire)??ae.expireTime}}else l={revalidate:z.CACHE_ONE_YEAR,expire:void 0}}else b.getHeader("Cache-Control")||(l={revalidate:0,expire:void 0});if(o.cacheControl=l,"string"==typeof ax&&(null==q?void 0:q.kind)===w.CachedRouteKind.APP_PAGE&&q.segmentData){b.setHeader(u.NEXT_DID_POSTPONE_HEADER,"2");let c=null==(k=q.headers)?void 0:k[z.NEXT_CACHE_TAGS_HEADER];O&&al&&c&&"string"==typeof c&&b.setHeader(z.NEXT_CACHE_TAGS_HEADER,c);let d=q.segmentData.get(ax);return void 0!==d?(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.fromStatic(d,u.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl}):(b.statusCode=204,(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.EMPTY,cacheControl:o.cacheControl}))}let r=(0,h.getRequestMeta)(a,"onCacheEntry");if(r&&await r({...o,value:{...o.value,kind:"PAGE"}},{url:(0,h.getRequestMeta)(a,"initURL")}))return null;if(p&&av)throw Object.defineProperty(Error("Invariant: postponed state should not be present on a resume request"),"__NEXT_ERROR_CODE",{value:"E396",enumerable:!1,configurable:!0});if(q.headers){let a={...q.headers};for(let[c,d]of(O&&al||delete a[z.NEXT_CACHE_TAGS_HEADER],Object.entries(a)))if(void 0!==d)if(Array.isArray(d))for(let a of d)b.appendHeader(c,a);else"number"==typeof d&&(d=d.toString()),b.appendHeader(c,d)}let s=null==(g=q.headers)?void 0:g[z.NEXT_CACHE_TAGS_HEADER];if(O&&al&&s&&"string"==typeof s&&b.setHeader(z.NEXT_CACHE_TAGS_HEADER,s),!q.status||aq&&as||(b.statusCode=q.status),!O&&q.status&&G.RedirectStatusCode[q.status]&&aq&&(b.statusCode=200),p&&b.setHeader(u.NEXT_DID_POSTPONE_HEADER,"1"),aq&&!aa){if(void 0===q.rscData){if(q.postponed)throw Object.defineProperty(Error("Invariant: Expected postponed to be undefined"),"__NEXT_ERROR_CODE",{value:"E372",enumerable:!1,configurable:!0});return(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:q.html,cacheControl:aw?{revalidate:0,expire:void 0}:o.cacheControl})}return(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:y.default.fromStatic(q.rscData,u.RSC_CONTENT_TYPE_HEADER),cacheControl:o.cacheControl})}let t=q.html;if(!p||O||aq)return(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:t,cacheControl:o.cacheControl});if(at)return t.push(new ReadableStream({start(a){a.enqueue(A.ENCODED_TAGS.CLOSED.BODY_AND_HTML),a.close()}})),(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:t,cacheControl:{revalidate:0,expire:void 0}});let v=new TransformStream;return t.push(v.readable),m({span:c,postponed:q.postponed,fallbackRouteParams:null}).then(async a=>{var b,c;if(!a)throw Object.defineProperty(Error("Invariant: expected a result to be returned"),"__NEXT_ERROR_CODE",{value:"E463",enumerable:!1,configurable:!0});if((null==(b=a.value)?void 0:b.kind)!==w.CachedRouteKind.APP_PAGE)throw Object.defineProperty(Error(`Invariant: expected a page response, got ${null==(c=a.value)?void 0:c.kind}`),"__NEXT_ERROR_CODE",{value:"E305",enumerable:!1,configurable:!0});await a.value.html.pipeTo(v.writable)}).catch(a=>{v.writable.abort(a).catch(a=>{console.error("couldn't abort transformer",a)})}),(0,B.sendRenderResult)({req:a,res:b,generateEtags:ae.generateEtags,poweredByHeader:ae.poweredByHeader,result:t,cacheControl:{revalidate:0,expire:void 0}})};if(!aG)return await aF.withPropagatedContext(a.headers,()=>aF.trace(i.BaseServerSpan.handleRequest,{spanName:`${aE} ${a.url}`,kind:g.SpanKind.SERVER,attributes:{"http.method":aE,"http.target":a.url}},p));await p(aG)}catch(b){throw b instanceof C.NoFallbackError||await L.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"render",revalidateReason:(0,f.c)({isRevalidate:al,isOnDemandRevalidate:ai})},ad),b}}},9121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},9294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9610:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>d});let d=(0,c(7954).registerClientReference)(function(){throw Error("Attempted to call the default export of \"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\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"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","default")},9672:(a,b,c)=>{"use strict";c.r(b),c.d(b,{default:()=>I});var d=c(1124),e=c(8301),f=c(2378),g=c(4194);class h extends e.Component{constructor(a){super(a),this.state={error:null}}static getDerivedStateFromError(a){return{error:a}}render(){if(this.state.error){let{fallback:a}=this.props;return a?"function"==typeof a?a(this.state.error):a:(0,d.jsxs)("div",{className:"empty-state",children:[(0,d.jsx)("div",{className:"empty-icon",children:"!"}),(0,d.jsxs)("p",{children:["Something went wrong in ",this.props.name||"this section","."]}),(0,d.jsx)("p",{className:"muted",style:{fontSize:12,marginTop:4},children:this.state.error.message}),(0,d.jsx)("button",{className:"button secondary small",style:{marginTop:12},onClick:()=>{this.setState({error:null}),this.props.onRetry?.()},children:"Retry"})]})}return this.props.children}}let i=["Overview","Projects","Risks","Mitigations","Gate","Integrations","Audit"],j=["Technical","Governance","Legal","Ethical","Operational"],k=["Design","Development","Testing","Deployment"],l=["OPEN","IN_MITIGATION","ACCEPTED","CLOSED"],m=["NOT_STARTED","IN_PROGRESS","DONE","REJECTED"];function n({toasts:a}){return a.length?(0,d.jsx)("div",{className:"toast-container",children:a.map(a=>(0,d.jsx)("div",{className:`toast ${a.type}`,children:a.message},a.id))}):null}function o({value:a,onChange:b,placeholder:c}){return(0,d.jsxs)("div",{className:"search-wrap",children:[(0,d.jsx)("span",{className:"search-icon",children:"⌕"}),(0,d.jsx)("input",{className:"input",value:a,onChange:a=>b(a.target.value),placeholder:c||"Search..."})]})}function p(a,b,c){return b?[...a].sort((a,d)=>{let e=a[b],f=d[b];if(null==e)return 1;if(null==f)return -1;let g="number"==typeof e?e-f:String(e).localeCompare(String(f));return"asc"===c?g:-g}):a}function q({children:a,className:b}){return(0,d.jsx)("span",{className:`badge ${b||""}`,children:a})}function r({label:a,children:b}){return(0,d.jsxs)("div",{style:{marginBottom:10},children:[(0,d.jsx)("label",{style:{display:"block",fontSize:12,color:"var(--muted)",marginBottom:3},children:a}),b]})}function s({value:a,onChange:b,type:c="text",min:e,max:f,style:g}){return(0,d.jsx)("input",{className:"input",type:c,value:a,onChange:a=>b(a.target.value),min:e,max:f,style:{width:"100%",...g}})}function t({value:a,onChange:b,options:c}){return(0,d.jsxs)("select",{className:"input",value:a,onChange:a=>b(a.target.value),style:{width:"100%"},children:[(0,d.jsx)("option",{value:"",children:"— Select —"}),(c||[]).map(a=>{let b="object"==typeof a?a.value:a,c="object"==typeof a?a.label:a;return(0,d.jsx)("option",{value:b,children:c},b)})]})}function u({label:a,onConfirm:b,onCancel:c,deleting:e}){return(0,d.jsx)("div",{className:"modal-overlay",onClick:c,children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:380},children:[(0,d.jsxs)("h3",{children:["Delete ",a,"?"]}),(0,d.jsx)("p",{style:{fontSize:13,color:"var(--muted)"},children:"This cannot be undone."}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:c,children:"Cancel"}),(0,d.jsx)("button",{className:"button small",style:{background:"var(--danger)",color:"#fff"},onClick:b,disabled:e,children:e?"Deleting...":"Delete"})]})]})})}function v({project:a,dashboard:b}){let c=(0,e.useMemo)(()=>b?[{label:"Overall Score",value:b.summary?.overallScore??"-",cls:b.summary?.overallScore>=75?"bad":b.summary?.overallScore>=50?"warn":"good",sub:`Risk level: ${b.summary?.riskLevel||"-"}`},{label:"Deployment Gate",value:b.summary?.gateStatus??"-",cls:b.summary?.gateStatus==="Ready"?"good":b.summary?.gateStatus==="Warning"?"warn":"bad",sub:b.gate?.message||""},{label:"Open Risks",value:b.summary?.openRisks??0,cls:(b.summary?.openRisks||0)>5?"bad":(b.summary?.openRisks||0)>2?"warn":"good",sub:`${b.summary?.totalRisks||0} total risks`},{label:"Mitigation",value:`${b.summary?.mitigationCompletion??0}%`,cls:40>(b.summary?.mitigationCompletion||0)?"bad":70>(b.summary?.mitigationCompletion||0)?"warn":"good",sub:"Average active-risk completion"}]:[],[b]);return b?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("div",{className:"grid",style:{gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))"},children:c.map(a=>(0,d.jsxs)("div",{className:"metric-card",children:[(0,d.jsx)("h3",{children:a.label}),(0,d.jsx)("div",{className:`metric-value ${a.cls}`,children:a.value}),(0,d.jsx)("div",{className:"metric-sub",children:a.sub})]},a.label))}),(0,d.jsxs)("div",{className:"grid",style:{gridTemplateColumns:"1fr 1fr",marginTop:18},children:[(0,d.jsxs)("div",{className:"panel",children:[(0,d.jsx)("h2",{children:"Dimensions"}),(b.dimensions||[]).map(a=>(0,d.jsxs)("div",{style:{marginBottom:12},children:[(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[(0,d.jsx)("span",{style:{fontSize:13},children:a.name}),(0,d.jsx)("strong",{style:{fontSize:13},children:a.score})]}),(0,d.jsx)("div",{className:"bar-wrap",children:(0,d.jsx)("div",{className:"bar-fill",style:{width:`${Math.min(a.score,100)}%`,background:a.score>=50?"var(--danger)":a.score>=25?"var(--warn)":"var(--accent)"}})})]},a.name))]}),(0,d.jsxs)("div",{className:"panel",children:[(0,d.jsx)("h2",{children:"Lifecycle"}),(b.lifecycle||[]).map(a=>(0,d.jsxs)("div",{style:{marginBottom:12},children:[(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:4},children:[(0,d.jsx)("span",{style:{fontSize:13},children:a.name}),(0,d.jsxs)("span",{className:"muted",style:{fontSize:12},children:[a.openRisks," open"]})]}),(0,d.jsx)("div",{className:"bar-wrap",children:(0,d.jsx)("div",{className:"bar-fill",style:{width:`${Math.min(a.riskScore||0,100)}%`,background:(a.riskScore||0)>=50?"var(--danger)":(a.riskScore||0)>=25?"var(--warn)":"var(--accent)"}})})]},a.name))]})]})]}):(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"Loading dashboard data..."})})}function w({project:a,onClose:b,onSaved:c,toast:f}){let[h,i]=(0,e.useState)(!1),[l,m]=(0,e.useState)({title:"",description:"",dimension:"",domain:"",lifecyclePhase:"",probability:50,impact:50,detectability:50,ownerDisplayName:""}),n=a=>b=>m(c=>({...c,[a]:b})),o=async()=>{if(!l.title.trim())return void f.add("Title is required","error");if(!l.dimension)return void f.add("Dimension is required","error");i(!0);try{await g.FH.post(`/api/projects/${a.id}/risks`,l),f.add("Risk created"),c()}catch(a){f.add(a.message||"Failed to create risk","error")}finally{i(!1)}};return(0,d.jsx)("div",{className:"modal-overlay",onClick:b,children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:500},children:[(0,d.jsx)("h2",{children:"New Risk"}),(0,d.jsx)(r,{label:"Title *",children:(0,d.jsx)(s,{value:l.title,onChange:n("title")})}),(0,d.jsx)(r,{label:"Description",children:(0,d.jsx)("textarea",{className:"input",value:l.description,onChange:a=>n("description")(a.target.value),rows:3,style:{width:"100%",resize:"vertical"}})}),(0,d.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[(0,d.jsx)(r,{label:"Dimension *",children:(0,d.jsx)(t,{value:l.dimension,onChange:n("dimension"),options:j})}),(0,d.jsx)(r,{label:"Domain",children:(0,d.jsx)(s,{value:l.domain,onChange:n("domain")})})]}),(0,d.jsx)(r,{label:"Lifecycle Phase",children:(0,d.jsx)(t,{value:l.lifecyclePhase,onChange:n("lifecyclePhase"),options:k})}),(0,d.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:8},children:[(0,d.jsx)(r,{label:"Probability",children:(0,d.jsx)(s,{type:"number",min:0,max:100,value:l.probability,onChange:n("probability")})}),(0,d.jsx)(r,{label:"Impact",children:(0,d.jsx)(s,{type:"number",min:0,max:100,value:l.impact,onChange:n("impact")})}),(0,d.jsx)(r,{label:"Detectability",children:(0,d.jsx)(s,{type:"number",min:0,max:100,value:l.detectability,onChange:n("detectability")})})]}),(0,d.jsx)(r,{label:"Owner",children:(0,d.jsx)(s,{value:l.ownerDisplayName,onChange:n("ownerDisplayName")})}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:b,children:"Cancel"}),(0,d.jsx)("button",{className:"button small",onClick:o,disabled:h,children:h?"Saving...":"Create Risk"})]})]})})}function x({project:a,dashboard:b,toast:c,onRefresh:f}){let[h,i]=(0,e.useState)(""),[m,n]=(0,e.useState)("normalizedScore"),[v,x]=(0,e.useState)("desc"),[y,z]=(0,e.useState)(0),[A,B]=(0,e.useState)(null),[C,D]=(0,e.useState)(!1),[E,F]=(0,e.useState)(!1),[G,H]=(0,e.useState)({}),[I,J]=(0,e.useState)(null),[K,L]=(0,e.useState)(null),[M,N]=(0,e.useState)(!1),O=(0,e.useMemo)(()=>b?.topRisks?p(b.topRisks,m,v):[],[b,m,v]),P=(0,e.useMemo)(()=>{if(!h)return O;let a=h.toLowerCase();return O.filter(b=>(b.title||"").toLowerCase().includes(a)||(b.dimension||"").toLowerCase().includes(a)||(b.ownerDisplayName||"").toLowerCase().includes(a))},[O,h]),Q=P.slice(0,(y+1)*20),R=async(a,b)=>{J(a);try{await g.FH.patch(`/api/risks/${a}`,{status:b}),c.add(`Risk status updated to ${b}`),B(null),f()}catch(a){c.add(a.message,"error")}finally{J(null)}},S=async()=>{if(!G.title.trim())return void c.add("Title is required","error");J("edit");try{await g.FH.patch(`/api/risks/${A.id}`,G),c.add("Risk updated"),B(null),f()}catch(a){c.add(a.message||"Failed to update","error")}finally{J(null)}},T=async()=>{N(!0);try{await g.FH.del(`/api/risks/${K.id}`),c.add("Risk deleted"),L(null),B(null),f()}catch(a){c.add(a.message||"Failed to delete","error")}finally{N(!1)}};return b?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{style:{display:"flex",gap:8,marginBottom:12},children:[(0,d.jsx)(o,{value:h,onChange:i,placeholder:"Search risks by title, dimension, owner..."}),(0,d.jsx)("button",{className:"button small",onClick:()=>D(!0),children:"+ New Risk"})]}),(0,d.jsx)("div",{className:"table-wrap",children:(0,d.jsxs)("table",{className:"table",children:[(0,d.jsx)("thead",{children:(0,d.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(a=>(0,d.jsxs)("th",{className:"sortable",onClick:()=>{var b;m===(b=a.key)?x(a=>"asc"===a?"desc":"asc"):(n(b),x("asc"))},children:[a.label," ",m===a.key?"asc"===v?"▲":"â–ŧ":""]},a.key))})}),(0,d.jsx)("tbody",{children:Q.map(a=>(0,d.jsxs)("tr",{onClick:()=>{B(a),H({title:a.title||"",description:a.description||"",dimension:a.dimension||"",domain:a.domain||"",lifecyclePhase:a.lifecyclePhase||"",probability:a.probability??50,impact:a.impact??50,detectability:a.detectability??50,ownerDisplayName:a.ownerDisplayName||""}),F(!1),L(null)},children:[(0,d.jsx)("td",{style:{fontFamily:"monospace",fontSize:12},children:a.id?.slice(0,8)}),(0,d.jsx)("td",{children:(0,d.jsx)("strong",{children:a.title})}),(0,d.jsx)("td",{children:(0,d.jsx)(q,{className:a.dimension?.toLowerCase(),children:a.dimension})}),(0,d.jsx)("td",{style:{fontSize:12},children:a.lifecyclePhase}),(0,d.jsx)("td",{children:(0,d.jsx)("strong",{children:a.normalizedScore})}),(0,d.jsx)("td",{children:(0,d.jsx)("span",{style:{color:a.residualScore>=50?"var(--danger)":a.residualScore>=25?"var(--warn)":"var(--accent)"},children:a.residualScore})}),(0,d.jsx)("td",{children:(0,d.jsx)(q,{className:a.status?.toLowerCase().replace(/\s+/g,"-"),children:a.status})}),(0,d.jsx)("td",{children:(0,d.jsx)("span",{className:"muted",children:a.ownerDisplayName||"-"})})]},a.id))})]})}),P.length>Q.length&&(0,d.jsx)("div",{style:{textAlign:"center",marginTop:12},children:(0,d.jsxs)("button",{className:"button secondary small",onClick:()=>z(a=>a+1),children:["Show more (",P.length-Q.length," remaining)"]})}),!P.length&&(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"No risks match your search"})}),C&&(0,d.jsx)(w,{project:a,onClose:()=>D(!1),onSaved:()=>{D(!1),f()},toast:c}),A&&!K&&(0,d.jsx)("div",{className:"modal-overlay",onClick:()=>B(null),children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:520},children:[(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,d.jsx)("h2",{style:{margin:0},children:A.title}),(0,d.jsx)("button",{className:"button secondary small",onClick:()=>F(!E),children:E?"View":"Edit"})]}),E?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{style:{marginTop:12},children:[(0,d.jsx)(r,{label:"Title *",children:(0,d.jsx)(s,{value:G.title,onChange:a=>H(b=>({...b,title:a}))})}),(0,d.jsx)(r,{label:"Description",children:(0,d.jsx)("textarea",{className:"input",value:G.description,onChange:a=>H(b=>({...b,description:a.target.value})),rows:2,style:{width:"100%",resize:"vertical"}})}),(0,d.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[(0,d.jsx)(r,{label:"Dimension",children:(0,d.jsx)(t,{value:G.dimension,onChange:a=>H(b=>({...b,dimension:a})),options:j})}),(0,d.jsx)(r,{label:"Domain",children:(0,d.jsx)(s,{value:G.domain,onChange:a=>H(b=>({...b,domain:a}))})})]}),(0,d.jsx)(r,{label:"Lifecycle Phase",children:(0,d.jsx)(t,{value:G.lifecyclePhase,onChange:a=>H(b=>({...b,lifecyclePhase:a})),options:k})}),(0,d.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",gap:8},children:[(0,d.jsx)(r,{label:"Probability",children:(0,d.jsx)(s,{type:"number",min:0,max:100,value:G.probability,onChange:a=>H(b=>({...b,probability:Number(a)}))})}),(0,d.jsx)(r,{label:"Impact",children:(0,d.jsx)(s,{type:"number",min:0,max:100,value:G.impact,onChange:a=>H(b=>({...b,impact:Number(a)}))})}),(0,d.jsx)(r,{label:"Detectability",children:(0,d.jsx)(s,{type:"number",min:0,max:100,value:G.detectability,onChange:a=>H(b=>({...b,detectability:Number(a)}))})})]}),(0,d.jsx)(r,{label:"Owner",children:(0,d.jsx)(s,{value:G.ownerDisplayName,onChange:a=>H(b=>({...b,ownerDisplayName:a}))})})]}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:()=>B(null),children:"Cancel"}),(0,d.jsx)("button",{className:"button small",onClick:S,disabled:"edit"===I,children:"edit"===I?"Saving...":"Save Changes"}),(0,d.jsx)("button",{className:"button small",style:{background:"var(--danger)",color:"#fff",marginLeft:"auto"},onClick:()=>L(A),children:"Delete"})]})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12,fontSize:13,marginTop:12},children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"muted",children:"Dimension"}),(0,d.jsx)("br",{}),A.dimension]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"muted",children:"Phase"}),(0,d.jsx)("br",{}),A.lifecyclePhase]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"muted",children:"Probability"}),(0,d.jsx)("br",{}),A.probability]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"muted",children:"Impact"}),(0,d.jsx)("br",{}),A.impact]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"muted",children:"Detectability"}),(0,d.jsx)("br",{}),A.detectability]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"muted",children:"Score"}),(0,d.jsx)("br",{}),(0,d.jsx)("strong",{children:A.normalizedScore})]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"muted",children:"Residual"}),(0,d.jsx)("br",{}),A.residualScore]}),(0,d.jsxs)("div",{children:[(0,d.jsx)("span",{className:"muted",children:"Owner"}),(0,d.jsx)("br",{}),A.ownerDisplayName||"-"]})]}),A.description&&(0,d.jsxs)("div",{style:{marginTop:12,fontSize:13},children:[(0,d.jsx)("span",{className:"muted",children:"Description"}),(0,d.jsx)("br",{}),A.description]}),(0,d.jsxs)("div",{style:{marginTop:16},children:[(0,d.jsx)("span",{className:"muted",style:{fontSize:12},children:"Update status:"}),(0,d.jsx)("div",{style:{display:"flex",gap:6,marginTop:6,flexWrap:"wrap"},children:l.map(a=>(0,d.jsx)("button",{className:`button small ${"OPEN"===a?"secondary":""}`,onClick:()=>R(A.id,a),disabled:I===A.id,children:a.replace("_"," ")},a))})]}),(0,d.jsx)("div",{className:"modal-actions",children:(0,d.jsx)("button",{className:"button secondary small",onClick:()=>B(null),children:"Close"})})]})]})}),K&&(0,d.jsx)(u,{label:"this risk",onConfirm:T,onCancel:()=>L(null),deleting:M})]}):(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"Loading..."})})}function y({project:a,risks:b,onClose:c,onSaved:f,toast:h}){let[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)({riskId:"",title:"",description:"",status:"NOT_STARTED",progressPercent:0,effectivenessPercent:0,dueDate:"",ownerDisplayName:""}),n=a=>b=>l(c=>({...c,[a]:b})),o=async()=>{if(!k.title.trim())return void h.add("Title is required","error");if(!k.riskId)return void h.add("Please select a risk","error");j(!0);try{let a={...k,progressPercent:Number(k.progressPercent),effectivenessPercent:Number(k.effectivenessPercent)};a.dueDate?a.dueDate=new Date(a.dueDate).toISOString():delete a.dueDate,await g.FH.post(`/api/risks/${k.riskId}/mitigations`,a),h.add("Mitigation created"),f()}catch(a){h.add(a.message||"Failed to create mitigation","error")}finally{j(!1)}};return(0,d.jsx)("div",{className:"modal-overlay",onClick:c,children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:500},children:[(0,d.jsx)("h2",{children:"New Mitigation"}),(0,d.jsx)(r,{label:"Risk *",children:(0,d.jsx)(t,{value:k.riskId,onChange:n("riskId"),options:(b||[]).map(a=>({value:a.id,label:a.title}))})}),(0,d.jsx)(r,{label:"Title *",children:(0,d.jsx)(s,{value:k.title,onChange:n("title")})}),(0,d.jsx)(r,{label:"Description",children:(0,d.jsx)("textarea",{className:"input",value:k.description,onChange:a=>n("description")(a.target.value),rows:2,style:{width:"100%",resize:"vertical"}})}),(0,d.jsx)(r,{label:"Status",children:(0,d.jsx)(t,{value:k.status,onChange:n("status"),options:m})}),(0,d.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[(0,d.jsx)(r,{label:"Progress %",children:(0,d.jsx)(s,{type:"number",min:0,max:100,value:k.progressPercent,onChange:n("progressPercent")})}),(0,d.jsx)(r,{label:"Effectiveness %",children:(0,d.jsx)(s,{type:"number",min:0,max:100,value:k.effectivenessPercent,onChange:n("effectivenessPercent")})})]}),(0,d.jsx)(r,{label:"Due Date",children:(0,d.jsx)(s,{type:"date",value:k.dueDate,onChange:n("dueDate")})}),(0,d.jsx)(r,{label:"Owner",children:(0,d.jsx)(s,{value:k.ownerDisplayName,onChange:n("ownerDisplayName")})}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:c,children:"Cancel"}),(0,d.jsx)("button",{className:"button small",onClick:o,disabled:i,children:i?"Saving...":"Create Mitigation"})]})]})})}function z({project:a,dashboard:b,toast:c,onRefresh:f}){let[h,i]=(0,e.useState)(""),[j,k]=(0,e.useState)("progressPercent"),[l,n]=(0,e.useState)("asc"),[v,w]=(0,e.useState)(!1),[x,z]=(0,e.useState)(null),[A,B]=(0,e.useState)(!1),[C,D]=(0,e.useState)({}),[E,F]=(0,e.useState)(null),[G,H]=(0,e.useState)(null),[I,J]=(0,e.useState)(!1),K=(0,e.useMemo)(()=>b?.mitigations?p(b.mitigations,j,l):[],[b,j,l]),L=(0,e.useMemo)(()=>b?.topRisks?b.topRisks:[],[b]),M=(0,e.useMemo)(()=>{if(!h)return K;let a=h.toLowerCase();return K.filter(b=>(b.title||"").toLowerCase().includes(a)||(b.riskTitle||"").toLowerCase().includes(a))},[K,h]),N=async()=>{if(!C.title.trim())return void c.add("Title is required","error");F("edit");try{let a={...C,progressPercent:Number(C.progressPercent),effectivenessPercent:Number(C.effectivenessPercent)};a.dueDate?a.dueDate=new Date(a.dueDate).toISOString():a.dueDate=null,await g.FH.patch(`/api/mitigations/${x.id}`,a),c.add("Mitigation updated"),z(null),f()}catch(a){c.add(a.message||"Failed to update","error")}finally{F(null)}},O=async()=>{J(!0);try{await g.FH.del(`/api/mitigations/${G.id}`),c.add("Mitigation deleted"),H(null),z(null),f()}catch(a){c.add(a.message||"Failed to delete","error")}finally{J(!1)}};return b?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{style:{display:"flex",gap:8,marginBottom:12},children:[(0,d.jsx)(o,{value:h,onChange:i,placeholder:"Search mitigations..."}),(0,d.jsx)("button",{className:"button small",onClick:()=>w(!0),children:"+ New Mitigation"})]}),(0,d.jsx)("div",{className:"table-wrap",children:(0,d.jsxs)("table",{className:"table",children:[(0,d.jsx)("thead",{children:(0,d.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(a=>(0,d.jsxs)("th",{className:"sortable",onClick:()=>{var b;j===(b=a.key)?n(a=>"asc"===a?"desc":"asc"):(k(b),n("asc"))},children:[a.label," ",j===a.key?"asc"===l?"▲":"â–ŧ":""]},a.key))})}),(0,d.jsx)("tbody",{children:M.slice(0,50).map(a=>(0,d.jsxs)("tr",{onClick:()=>{z(a),D({title:a.title||"",description:a.description||"",status:a.status||"NOT_STARTED",progressPercent:a.progressPercent??0,effectivenessPercent:a.effectivenessPercent??0,dueDate:a.dueDate?a.dueDate.slice(0,10):"",ownerDisplayName:a.ownerDisplayName||""}),B(!0),H(null)},style:{cursor:"pointer"},children:[(0,d.jsx)("td",{children:(0,d.jsx)("strong",{children:a.title})}),(0,d.jsx)("td",{children:(0,d.jsx)("span",{className:"muted",children:a.riskTitle})}),(0,d.jsx)("td",{children:(0,d.jsx)(q,{className:a.status?.toLowerCase().replace(/\s+/g,"-"),children:a.status})}),(0,d.jsx)("td",{children:(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,d.jsx)("div",{className:"bar-wrap",style:{flex:1,maxWidth:80},children:(0,d.jsx)("div",{className:"bar-fill",style:{width:`${a.progressPercent||0}%`,background:(a.progressPercent||0)>=80?"var(--accent)":(a.progressPercent||0)>=30?"var(--warn)":"var(--danger)"}})}),a.progressPercent||0,"%"]})}),(0,d.jsxs)("td",{children:[a.effectivenessPercent||0,"%"]}),(0,d.jsx)("td",{children:(0,d.jsx)("span",{className:"muted",children:a.ownerDisplayName||"-"})})]},a.id))})]})}),!M.length&&(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"No mitigations found"})}),v&&(0,d.jsx)(y,{project:a,risks:L,onClose:()=>w(!1),onSaved:()=>{w(!1),f()},toast:c}),x&&!G&&(0,d.jsx)("div",{className:"modal-overlay",onClick:()=>z(null),children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:500},children:[(0,d.jsx)("h2",{style:{margin:0},children:A?"Edit Mitigation":x.title}),(0,d.jsxs)("div",{style:{marginTop:12},children:[(0,d.jsx)(r,{label:"Title *",children:(0,d.jsx)(s,{value:C.title,onChange:a=>D(b=>({...b,title:a}))})}),(0,d.jsx)(r,{label:"Description",children:(0,d.jsx)("textarea",{className:"input",value:C.description,onChange:a=>D(b=>({...b,description:a.target.value})),rows:2,style:{width:"100%",resize:"vertical"}})}),(0,d.jsx)(r,{label:"Status",children:(0,d.jsx)(t,{value:C.status,onChange:a=>D(b=>({...b,status:a})),options:m})}),(0,d.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:8},children:[(0,d.jsx)(r,{label:"Progress %",children:(0,d.jsx)(s,{type:"number",min:0,max:100,value:C.progressPercent,onChange:a=>D(b=>({...b,progressPercent:Number(a)}))})}),(0,d.jsx)(r,{label:"Effectiveness %",children:(0,d.jsx)(s,{type:"number",min:0,max:100,value:C.effectivenessPercent,onChange:a=>D(b=>({...b,effectivenessPercent:Number(a)}))})})]}),(0,d.jsx)(r,{label:"Due Date",children:(0,d.jsx)(s,{type:"date",value:C.dueDate,onChange:a=>D(b=>({...b,dueDate:a}))})}),(0,d.jsx)(r,{label:"Owner",children:(0,d.jsx)(s,{value:C.ownerDisplayName,onChange:a=>D(b=>({...b,ownerDisplayName:a}))})})]}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:()=>z(null),children:"Cancel"}),(0,d.jsx)("button",{className:"button small",onClick:N,disabled:"edit"===E,children:"edit"===E?"Saving...":"Save Changes"}),(0,d.jsx)("button",{className:"button small",style:{background:"var(--danger)",color:"#fff",marginLeft:"auto"},onClick:()=>H(x),children:"Delete"})]})]})}),G&&(0,d.jsx)(u,{label:"this mitigation",onConfirm:O,onCancel:()=>H(null),deleting:I})]}):(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"Loading..."})})}function A({project:a,dashboard:b,toast:c,onRefresh:f}){let[h,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)(!1),[l,m]=(0,e.useState)({decision:"APPROVED",reviewerName:"",reason:""}),[n,o]=(0,e.useState)(!1),p=b?.gate?.criteria||[],u=b?.summary?.gateStatus||"Unknown",v=b?.gate?.id,w="Ready"===u?"good":"Warning"===u?"warn":"bad",x=async()=>{i(!0);try{await g.FH.post(`/api/projects/${a.id}/gate/evaluate`,{}),c.add("Gate evaluated"),f()}catch(a){c.add(a.message||"Evaluation failed","error")}finally{i(!1)}},y=async()=>{if(!l.reviewerName.trim())return void c.add("Reviewer name is required","error");o(!0);try{await g.FH.post(`/api/gates/${v}/decisions`,l),c.add("Decision submitted"),k(!1),f()}catch(a){c.add(a.message||"Failed to submit decision","error")}finally{o(!1)}};return b?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"dash-header",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{children:"Deployment Gate"}),(0,d.jsx)("p",{className:"muted",children:"Gate evaluation for AI deployment readiness"})]}),(0,d.jsx)("div",{className:"dash-actions",children:(0,d.jsx)("div",{className:`metric-value ${w}`,style:{fontSize:28},children:u})})]}),(0,d.jsx)("div",{className:"table-wrap",children:(0,d.jsxs)("table",{className:"table",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{children:"Criterion"}),(0,d.jsx)("th",{children:"Required"}),(0,d.jsx)("th",{children:"Actual"}),(0,d.jsx)("th",{children:"Status"})]})}),(0,d.jsx)("tbody",{children:p.map(a=>(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{children:(0,d.jsx)("strong",{children:a.name})}),(0,d.jsx)("td",{children:a.required}),(0,d.jsx)("td",{children:a.actual}),(0,d.jsx)("td",{children:(0,d.jsx)(q,{className:a.status?.toLowerCase(),children:a.status})})]},a.name))})]})}),!p.length&&(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"No gate criteria evaluated yet"})}),(0,d.jsxs)("div",{style:{marginTop:16,display:"flex",gap:8,flexWrap:"wrap"},children:[(0,d.jsx)("button",{className:"button small",onClick:x,disabled:h,children:h?"Evaluating...":"Evaluate Gate"}),v&&(0,d.jsx)("button",{className:"button secondary small",onClick:()=>k(!0),children:"Add Decision"}),(0,d.jsx)("a",{href:`/api/projects/${a?.id}/gate/history`,className:"button secondary small",target:"_blank",children:"History (API)"})]}),j&&(0,d.jsx)("div",{className:"modal-overlay",onClick:()=>k(!1),children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:400},children:[(0,d.jsx)("h2",{children:"Gate Decision"}),(0,d.jsx)(r,{label:"Decision",children:(0,d.jsx)(t,{value:l.decision,onChange:a=>m(b=>({...b,decision:a})),options:["APPROVED","REJECTED","ACCEPTED","NEEDS_CHANGES"]})}),(0,d.jsx)(r,{label:"Reviewer Name *",children:(0,d.jsx)(s,{value:l.reviewerName,onChange:a=>m(b=>({...b,reviewerName:a}))})}),(0,d.jsx)(r,{label:"Reason",children:(0,d.jsx)("textarea",{className:"input",value:l.reason,onChange:a=>m(b=>({...b,reason:a.target.value})),rows:3,style:{width:"100%",resize:"vertical"}})}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:()=>k(!1),children:"Cancel"}),(0,d.jsx)("button",{className:"button small",onClick:y,disabled:n,children:n?"Saving...":"Submit Decision"})]})]})})]}):(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"Loading..."})})}function B({project:a,dashboard:b,onClose:c,onSaved:f,toast:h}){let[i,j]=(0,e.useState)(!1),[k,l]=(0,e.useState)({provider:"TRELLO",workspaceName:"",baseUrl:"",authMode:"API_KEY"}),m=a=>b=>l(c=>({...c,[a]:b})),n=b?.gate?.workspaceId||a?.workspaceId,o=async()=>{if(!k.workspaceName.trim())return void h.add("Workspace name is required","error");j(!0);try{await g.FH.post(`/api/workspaces/${n}/integrations`,k),h.add("Integration created"),f()}catch(a){h.add(a.message||"Failed to create integration","error")}finally{j(!1)}};return(0,d.jsx)("div",{className:"modal-overlay",onClick:c,children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:450},children:[(0,d.jsx)("h2",{children:"New Integration"}),(0,d.jsx)(r,{label:"Provider",children:(0,d.jsx)(t,{value:k.provider,onChange:m("provider"),options:["TRELLO","JIRA","ASANA","MICROSOFT_PLANNER"]})}),(0,d.jsx)(r,{label:"Workspace Name *",children:(0,d.jsx)(s,{value:k.workspaceName,onChange:m("workspaceName")})}),(0,d.jsx)(r,{label:"Base URL",children:(0,d.jsx)(s,{value:k.baseUrl,onChange:m("baseUrl")})}),(0,d.jsx)(r,{label:"Auth Mode",children:(0,d.jsx)(t,{value:k.authMode,onChange:m("authMode"),options:["API_KEY","OAUTH","BASIC"]})}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:c,children:"Cancel"}),(0,d.jsx)("button",{className:"button small",onClick:o,disabled:i,children:i?"Saving...":"Create Integration"})]})]})})}function C({project:a,dashboard:b,toast:c,onRefresh:f}){let[g,h]=(0,e.useState)(!1),i=b?.integrations||[];return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"dash-header",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{children:"Integrations"}),(0,d.jsx)("p",{className:"muted",children:"Connect Trello, Jira, Asana, or Microsoft Planner"})]}),(0,d.jsx)("div",{className:"dash-actions",children:(0,d.jsx)("button",{className:"button small",onClick:()=>h(!0),children:"+ New Integration"})})]}),(0,d.jsx)("div",{className:"grid",style:{gridTemplateColumns:"repeat(auto-fit, minmax(240px, 1fr))"},children:["TRELLO","JIRA","ASANA","MICROSOFT_PLANNER"].map(a=>{let b=i.find(b=>b.provider===a);return(0,d.jsxs)("div",{className:"panel",style:{textAlign:"center"},children:[(0,d.jsx)("div",{style:{fontSize:32,marginBottom:8},children:"TRELLO"===a?"⊞":"JIRA"===a?"◆":"ASANA"===a?"◇":"â–Ŗ"}),(0,d.jsx)("h3",{style:{margin:"0 0 4px"},children:a.replace("_"," ")}),(0,d.jsx)("p",{className:"muted",style:{fontSize:12,margin:"0 0 12px"},children:b?b.workspaceName:"Not configured"}),(0,d.jsx)("div",{style:{display:"flex",gap:6,justifyContent:"center"},children:b?(0,d.jsx)("a",{href:`/api/integrations/${b.id}`,className:"button secondary small",target:"_blank",children:"Manage"}):(0,d.jsx)("button",{className:"button secondary small",onClick:()=>h(!0),children:"Configure"})})]},a)})}),g&&(0,d.jsx)(B,{project:a,dashboard:b,onClose:()=>h(!1),onSaved:()=>{h(!1),f()},toast:c}),!i.length&&(0,d.jsx)("div",{style:{marginTop:12},children:(0,d.jsx)("a",{href:"/api/integration-providers",className:"button secondary small",target:"_blank",children:"Integration providers (API)"})})]})}function D({project:a,toast:b}){let[c,f]=(0,e.useState)([]),[h,i]=(0,e.useState)(!0),[j,k]=(0,e.useState)(null),l=(0,e.useCallback)(async()=>{if(a){i(!0),k(null);try{let b=await g.FH.get(`/api/projects/${a.id}/audit`);f(b.auditEvents||[])}catch(a){k(a.message||"Failed to load audit log")}finally{i(!1)}}},[a]);return h?(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"Loading audit log..."})}):j?(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:j})}):c.length?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"dash-header",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{children:"Audit Log"}),(0,d.jsx)("p",{className:"muted",children:"Project activity history"})]}),(0,d.jsx)("div",{className:"dash-actions",children:(0,d.jsx)("button",{className:"button secondary small",onClick:l,children:"Refresh"})})]}),(0,d.jsx)("div",{className:"table-wrap",children:(0,d.jsxs)("table",{className:"table",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{children:"Date"}),(0,d.jsx)("th",{children:"Action"}),(0,d.jsx)("th",{children:"Entity"}),(0,d.jsx)("th",{children:"Actor"}),(0,d.jsx)("th",{children:"Details"})]})}),(0,d.jsx)("tbody",{children:c.map(a=>(0,d.jsxs)("tr",{children:[(0,d.jsx)("td",{style:{fontSize:12,whiteSpace:"nowrap"},children:new Date(a.createdAt).toLocaleString()}),(0,d.jsx)("td",{children:(0,d.jsx)(q,{className:a.action?.toLowerCase().replace(/\s+/g,"-"),children:a.action})}),(0,d.jsxs)("td",{style:{fontSize:12},children:[a.entityType," ",(0,d.jsxs)("span",{className:"muted",children:["(",a.entityId?.slice(0,8),")"]})]}),(0,d.jsx)("td",{style:{fontSize:12},children:a.actorUserId||"system"}),(0,d.jsx)("td",{style:{fontSize:12,maxWidth:300,overflow:"hidden",textOverflow:"ellipsis"},children:a.afterJson?JSON.stringify(a.afterJson).slice(0,80):"-"})]},a.id))})]})})]}):(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"No audit events recorded yet"})})}function E({projects:a,workspaceId:b,currentProjectId:c,onSwitch:f,onRefresh:h,toast:i}){let[j,k]=(0,e.useState)(null),[l,m]=(0,e.useState)(null),[n,o]=(0,e.useState)(!1),p=async()=>{k(!0);try{await g.FH.del(`/api/projects/${l.id}`),i.add(`Project "${l.name}" deleted`),m(null),h()}catch(a){i.add(a.message||"Failed to delete project","error")}finally{k(!1)}};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"dash-header",children:[(0,d.jsxs)("div",{children:[(0,d.jsx)("h1",{children:"All Projects"}),(0,d.jsxs)("p",{className:"muted",children:[a.length," project(s) in workspace"]})]}),(0,d.jsx)("div",{className:"dash-actions",children:(0,d.jsx)("button",{className:"button small",onClick:()=>o(!0),children:"+ New Project"})})]}),(0,d.jsx)("div",{className:"table-wrap",children:(0,d.jsxs)("table",{className:"table",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{children:"Name"}),(0,d.jsx)("th",{children:"Status"}),(0,d.jsx)("th",{children:"Type"}),(0,d.jsx)("th",{children:"Created"}),(0,d.jsx)("th",{children:"Actions"})]})}),(0,d.jsx)("tbody",{children:[...a].sort((a,b)=>new Date(b.createdAt)-new Date(a.createdAt)).map(a=>(0,d.jsxs)("tr",{style:{background:a.id===c?"var(--surface-alt)":""},children:[(0,d.jsxs)("td",{children:[(0,d.jsx)("strong",{children:a.name}),a.id===c?(0,d.jsx)("span",{className:"muted",style:{fontSize:11,marginLeft:6},children:"(current)"}):"",a.description?(0,d.jsx)("div",{className:"muted",style:{fontSize:11},children:a.description}):""]}),(0,d.jsx)("td",{children:(0,d.jsx)(q,{className:a.status?.toLowerCase(),children:a.status})}),(0,d.jsx)("td",{style:{fontSize:12},children:a.projectType}),(0,d.jsx)("td",{style:{fontSize:12},children:new Date(a.createdAt).toLocaleDateString()}),(0,d.jsxs)("td",{style:{textAlign:"right",whiteSpace:"nowrap"},children:[a.id!==c&&(0,d.jsx)("button",{className:"button secondary small",style:{marginRight:6},onClick:()=>f(a.id),children:"Open"}),(0,d.jsx)("button",{className:"button small",style:{background:"var(--danger)",color:"#fff"},onClick:()=>m(a),disabled:j===a.id,children:"Delete"})]})]},a.id))})]})}),!a.length&&(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"No projects yet. Create one to get started."})}),n&&(0,d.jsx)(G,{workspaceId:b,onClose:()=>o(!1),onSaved:()=>{o(!1),h()},toast:i}),l&&(0,d.jsx)("div",{className:"modal-overlay",onClick:()=>m(null),children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:380},children:[(0,d.jsxs)("h3",{children:['Delete "',l.name,'"?']}),(0,d.jsx)("p",{style:{fontSize:13,color:"var(--muted)"},children:"This permanently deletes the project and all its risks, mitigations, and data."}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:()=>m(null),children:"Cancel"}),(0,d.jsx)("button",{className:"button small",style:{background:"var(--danger)",color:"#fff"},onClick:p,disabled:j,children:j?"Deleting...":"Delete Project"})]})]})})]})}function F({project:a,onClose:b,onSaved:c,toast:f}){let[h,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)({name:a?.name||"",description:a?.description||"",subtitle:a?.subtitle||"",status:a?.status||"Active"}),l=async()=>{if(!j.name.trim())return void f.add("Project name is required","error");i(!0);try{await g.FH.patch(`/api/projects/${a.id}`,j),f.add("Project updated"),c()}catch(a){f.add(a.message||"Failed to update project","error")}finally{i(!1)}};return(0,d.jsx)("div",{className:"modal-overlay",onClick:b,children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:450},children:[(0,d.jsx)("h2",{children:"Project Settings"}),(0,d.jsx)(r,{label:"Name *",children:(0,d.jsx)(s,{value:j.name,onChange:a=>k(b=>({...b,name:a}))})}),(0,d.jsx)(r,{label:"Subtitle",children:(0,d.jsx)(s,{value:j.subtitle,onChange:a=>k(b=>({...b,subtitle:a}))})}),(0,d.jsx)(r,{label:"Description",children:(0,d.jsx)("textarea",{className:"input",value:j.description,onChange:a=>k(b=>({...b,description:a.target.value})),rows:3,style:{width:"100%",resize:"vertical"}})}),(0,d.jsx)(r,{label:"Status",children:(0,d.jsx)(t,{value:j.status,onChange:a=>k(b=>({...b,status:a})),options:["Active","Archived","On Hold"]})}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:b,children:"Cancel"}),(0,d.jsx)("button",{className:"button small",onClick:l,disabled:h,children:h?"Saving...":"Save Changes"})]})]})})}function G({workspaceId:a,onClose:b,onSaved:c,toast:f}){let[h,i]=(0,e.useState)(!1),[j,k]=(0,e.useState)({name:"",description:"",projectType:"AI-Enabler"}),l=async()=>{if(!j.name.trim())return void f.add("Project name is required","error");i(!0);try{await g.FH.post(`/api/workspaces/${a}/projects`,j),f.add("Project created"),c()}catch(a){f.add(a.message||"Failed to create project","error")}finally{i(!1)}};return(0,d.jsx)("div",{className:"modal-overlay",onClick:b,children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:450},children:[(0,d.jsx)("h2",{children:"New Project"}),(0,d.jsx)(r,{label:"Name *",children:(0,d.jsx)(s,{value:j.name,onChange:a=>k(b=>({...b,name:a}))})}),(0,d.jsx)(r,{label:"Description",children:(0,d.jsx)("textarea",{className:"input",value:j.description,onChange:a=>k(b=>({...b,description:a.target.value})),rows:3,style:{width:"100%",resize:"vertical"}})}),(0,d.jsx)(r,{label:"Project Type",children:(0,d.jsx)(t,{value:j.projectType,onChange:a=>k(b=>({...b,projectType:a})),options:["AI-Enabler","GENERATIVE_AI","ML-Pipeline","Automation"]})}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:b,children:"Cancel"}),(0,d.jsx)("button",{className:"button small",onClick:l,disabled:h,children:h?"Saving...":"Create Project"})]})]})})}function H({projects:a,workspaceId:b,currentProjectId:c,onClose:f,onSwitch:h,onSaved:i,toast:j}){let[k,l]=(0,e.useState)(null),[m,n]=(0,e.useState)(null),[o,p]=(0,e.useState)(!1),r=async()=>{l(!0);try{await g.FH.del(`/api/projects/${m.id}`),j.add(`Project "${m.name}" deleted`),n(null),i()}catch(a){j.add(a.message||"Failed to delete project","error")}finally{l(!1)}};return(0,d.jsxs)("div",{className:"modal-overlay",onClick:f,children:[(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:700,maxHeight:"80vh",overflow:"auto"},children:[(0,d.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,d.jsx)("h2",{style:{margin:0},children:"All Projects"}),(0,d.jsx)("button",{className:"button small",onClick:()=>p(!0),children:"+ New Project"})]}),(0,d.jsxs)("p",{className:"muted",style:{fontSize:12,marginTop:4},children:[a.length," project(s) in workspace"]}),(0,d.jsx)("div",{className:"table-wrap",style:{marginTop:12},children:(0,d.jsxs)("table",{className:"table",children:[(0,d.jsx)("thead",{children:(0,d.jsxs)("tr",{children:[(0,d.jsx)("th",{children:"Name"}),(0,d.jsx)("th",{children:"Status"}),(0,d.jsx)("th",{children:"Type"}),(0,d.jsx)("th",{children:"Created"}),(0,d.jsx)("th",{})]})}),(0,d.jsx)("tbody",{children:[...a].sort((a,b)=>new Date(b.createdAt)-new Date(a.createdAt)).map(a=>(0,d.jsxs)("tr",{style:{background:a.id===c?"var(--surface-alt)":""},children:[(0,d.jsxs)("td",{children:[(0,d.jsx)("strong",{children:a.name}),a.id===c?(0,d.jsx)("span",{className:"muted",style:{fontSize:11,marginLeft:6},children:"(current)"}):""]}),(0,d.jsx)("td",{children:(0,d.jsx)(q,{className:a.status?.toLowerCase(),children:a.status})}),(0,d.jsx)("td",{style:{fontSize:12},children:a.projectType}),(0,d.jsx)("td",{style:{fontSize:12},children:new Date(a.createdAt).toLocaleDateString()}),(0,d.jsxs)("td",{style:{textAlign:"right",whiteSpace:"nowrap"},children:[a.id!==c&&(0,d.jsx)("button",{className:"button secondary small",style:{marginRight:6},onClick:()=>{h(a.id),f()},children:"Open"}),(0,d.jsx)("button",{className:"button small",style:{background:"var(--danger)",color:"#fff"},onClick:()=>n(a),disabled:k===a.id,children:"✕"})]})]},a.id))})]})}),!a.length&&(0,d.jsx)("div",{className:"empty-state",children:(0,d.jsx)("p",{children:"No projects yet"})}),(0,d.jsx)("div",{className:"modal-actions",children:(0,d.jsx)("button",{className:"button secondary small",onClick:f,children:"Close"})})]}),m&&(0,d.jsx)("div",{className:"modal-overlay",onClick:()=>n(null),children:(0,d.jsxs)("div",{className:"modal",onClick:a=>a.stopPropagation(),style:{maxWidth:380},children:[(0,d.jsxs)("h3",{children:['Delete "',m.name,'"?']}),(0,d.jsx)("p",{style:{fontSize:13,color:"var(--muted)"},children:"This permanently deletes the project and all its risks, mitigations, and data."}),(0,d.jsxs)("div",{className:"modal-actions",children:[(0,d.jsx)("button",{className:"button secondary small",onClick:()=>n(null),children:"Cancel"}),(0,d.jsx)("button",{className:"button small",style:{background:"var(--danger)",color:"#fff"},onClick:r,disabled:k,children:k?"Deleting...":"Delete Project"})]})]})}),o&&(0,d.jsx)(G,{workspaceId:b,onClose:()=>p(!1),onSaved:()=>{p(!1),i()},toast:j})]})}function I(){let a=(0,f.useRouter)(),b=(0,f.useSearchParams)(),c=i.includes(b.get("tab"))?b.get("tab"):"Overview",[j,k]=(0,e.useState)(null),[l,m]=(0,e.useState)([]),[o,p]=(0,e.useState)(b.get("projectId")||null),[q,r]=(0,e.useState)(null),[s,t]=(0,e.useState)(!0),[u,w]=(0,e.useState)(null),[y,B]=(0,e.useState)(0),[G,I]=(0,e.useState)(!1),[J,K]=(0,e.useState)(!1),[L,M]=(0,e.useState)(null),{toasts:N,add:O}=function(){let[a,b]=(0,e.useState)([]);return{toasts:a,add:(0,e.useCallback)((a,c="success")=>{let d=Date.now()+Math.random();b(b=>[...b,{id:d,message:a,type:c}]),setTimeout(()=>b(a=>a.filter(a=>a.id!==d)),3e3)},[])}}(),P=(0,e.useCallback)(()=>B(a=>a+1),[]);(0,e.useCallback)(async b=>{t(!0),w(null);try{let c=await g.FH.get("/api/auth/session");if(!c?.authenticated){w("Not authenticated."),t(!1);return}let d=c.memberships?.[0];if(!d){w("No organization membership found."),t(!1);return}let e=d.organizationId,f=await g.FH.get(`/api/workspaces?organizationId=${e}`),h=f.workspaces?.[0];if(!h){w("No workspace found — create one to get started."),t(!1);return}M(h.id);let i=(await g.FH.get(`/api/workspaces/${h.id}/projects`)).projects||[];if(!i.length){w("No project found — create a project to get started."),t(!1);return}m(i);let j=b?i.find(a=>a.id===b):null;if(j||(j=i[0]),k(j),j.id!==o){p(j.id);let b=new URLSearchParams(window.location.search).get("tab")||"Overview";a.replace(`/dashboard?tab=${b}&projectId=${j.id}`)}let l=await g.FH.get(`/api/projects/${j.id}/dashboard`);r(l.dashboard),t(!1)}catch(a){w(a.message||"Failed to load dashboard data"),t(!1)}},[]);let Q=b=>{p(b),a.push(`/dashboard?tab=${c}&projectId=${b}`)};return s&&"Integrations"!==c?(0,d.jsx)("div",{className:"shell-loading",children:(0,d.jsx)("div",{className:"spinner"})}):u&&"Integrations"!==c?(0,d.jsxs)("div",{className:"empty-state",children:[(0,d.jsx)("div",{className:"empty-icon",children:"!"}),(0,d.jsx)("p",{children:u}),(0,d.jsx)("button",{className:"button secondary small",style:{marginTop:12},onClick:()=>B(a=>a+1),children:"Retry"})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"dash-header",children:[(0,d.jsx)("div",{style:{display:"flex",alignItems:"center",gap:10},children:(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,d.jsx)("select",{className:"input",value:j?.id||"",onChange:a=>Q(a.target.value),style:{fontSize:16,fontWeight:700,width:"auto",minWidth:200,border:"none",background:"transparent",cursor:"pointer"},children:l.map(a=>(0,d.jsxs)("option",{value:a.id,children:[a.name," ","Active"!==a.status?`(${a.status})`:""]},a.id))}),(0,d.jsx)("button",{className:"button secondary small",style:{fontSize:14,padding:"2px 8px"},onClick:()=>I(!0),title:"Project settings",children:"⚙"}),(0,d.jsx)("button",{className:"button secondary small",onClick:()=>K(!0),children:"Projects"})]}),(0,d.jsx)("p",{className:"muted",style:{margin:0},children:j?.subtitle||j?.description||""})]})}),(0,d.jsxs)("div",{className:"dash-actions",children:[(0,d.jsx)("a",{href:`/api/projects/${j?.id}/reports/executive.html`,className:"button secondary small",target:"_blank",children:"Report"}),(0,d.jsx)("a",{href:`/api/projects/${j?.id}/reports/risk-register.csv`,className:"button secondary small",target:"_blank",children:"CSV"})]})]}),(0,d.jsx)("div",{className:"tabs",children:i.map(b=>(0,d.jsx)("button",{className:`tab ${c===b?"active":""}`,onClick:()=>a.push(`/dashboard?tab=${b}${j?`&projectId=${j.id}`:""}`),children:b},b))}),"Overview"===c&&(0,d.jsx)(h,{name:"Overview",children:(0,d.jsx)(v,{project:j,dashboard:q})},"overview"),"Projects"===c&&(0,d.jsx)(h,{name:"Projects",children:(0,d.jsx)(E,{projects:l,workspaceId:L,currentProjectId:j?.id,onSwitch:Q,onRefresh:P,toast:{add:O}})},"projects"),"Risks"===c&&(0,d.jsx)(h,{name:"Risks",children:(0,d.jsx)(x,{project:j,dashboard:q,toast:{add:O},onRefresh:P})},"risks"),"Mitigations"===c&&(0,d.jsx)(h,{name:"Mitigations",children:(0,d.jsx)(z,{project:j,dashboard:q,toast:{add:O},onRefresh:P})},"mitigations"),"Gate"===c&&(0,d.jsx)(h,{name:"Gate",children:(0,d.jsx)(A,{project:j,dashboard:q,toast:{add:O},onRefresh:P})},"gate"),"Integrations"===c&&(0,d.jsx)(h,{name:"Integrations",children:(0,d.jsx)(C,{project:j,dashboard:q,toast:{add:O},onRefresh:P})},"integrations"),"Audit"===c&&(0,d.jsx)(h,{name:"Audit",children:(0,d.jsx)(D,{project:j,toast:{add:O}})},"audit"),G&&(0,d.jsx)(F,{project:j,onClose:()=>I(!1),onSaved:()=>{I(!1),P()},toast:{add:O}}),J&&(0,d.jsx)(H,{projects:l,workspaceId:L,currentProjectId:j?.id,onClose:()=>K(!1),onSwitch:Q,onSaved:()=>{K(!1),P()},toast:{add:O}}),(0,d.jsx)(n,{toasts:N})]})}},9902:a=>{"use strict";a.exports=require("path")}};var b=require("../../webpack-runtime.js");b.C(a);var c=b.X(0,[5873,4792],()=>b(b.s=9108));module.exports=c})();