hex-audit 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/README.md +22 -1
  2. package/dashboard/.next/BUILD_ID +1 -1
  3. package/dashboard/.next/app-build-manifest.json +20 -20
  4. package/dashboard/.next/app-path-routes-manifest.json +1 -1
  5. package/dashboard/.next/build-manifest.json +4 -4
  6. package/dashboard/.next/next-server.js.nft.json +1 -1
  7. package/dashboard/.next/prerender-manifest.js +1 -1
  8. package/dashboard/.next/prerender-manifest.json +1 -1
  9. package/dashboard/.next/required-server-files.json +1 -1
  10. package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  11. package/dashboard/.next/server/app/_not-found.html +1 -1
  12. package/dashboard/.next/server/app/_not-found.rsc +1 -1
  13. package/dashboard/.next/server/app/access/page_client-reference-manifest.js +1 -1
  14. package/dashboard/.next/server/app/api/notes/done/route.js +1 -0
  15. package/dashboard/.next/server/app/api/notes/done/route.js.nft.json +1 -0
  16. package/dashboard/.next/server/app/api/notes/lead/route.js +1 -0
  17. package/dashboard/.next/server/app/api/notes/lead/route.js.nft.json +1 -0
  18. package/dashboard/.next/server/app/api/notes/question/route.js +1 -0
  19. package/dashboard/.next/server/app/api/notes/question/route.js.nft.json +1 -0
  20. package/dashboard/.next/server/app/api/notes/record/route.js +3 -3
  21. package/dashboard/.next/server/app/api/notes/route.js +2 -2
  22. package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +1 -1
  23. package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +1 -1
  24. package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +1 -1
  25. package/dashboard/.next/server/app/diagram.html +1 -1
  26. package/dashboard/.next/server/app/diagram.rsc +1 -1
  27. package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +1 -1
  28. package/dashboard/.next/server/app/flows.html +1 -1
  29. package/dashboard/.next/server/app/flows.rsc +1 -1
  30. package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +1 -1
  31. package/dashboard/.next/server/app/issues/page.js +4 -4
  32. package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -1
  33. package/dashboard/.next/server/app/notes/page.js +3 -3
  34. package/dashboard/.next/server/app/notes/page_client-reference-manifest.js +1 -1
  35. package/dashboard/.next/server/app/overleaf/page_client-reference-manifest.js +1 -1
  36. package/dashboard/.next/server/app/page.js +2 -2
  37. package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -1
  38. package/dashboard/.next/server/app/progress/page.js +1 -1
  39. package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +1 -1
  40. package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +1 -1
  41. package/dashboard/.next/server/app-paths-manifest.json +8 -5
  42. package/dashboard/.next/server/chunks/530.js +1 -1
  43. package/dashboard/.next/server/chunks/622.js +3 -0
  44. package/dashboard/.next/server/functions-config-manifest.json +1 -1
  45. package/dashboard/.next/server/middleware-build-manifest.js +1 -1
  46. package/dashboard/.next/server/pages/404.html +1 -1
  47. package/dashboard/.next/server/pages/500.html +1 -1
  48. package/dashboard/.next/server/server-reference-manifest.js +1 -1
  49. package/dashboard/.next/server/server-reference-manifest.json +1 -1
  50. package/dashboard/.next/static/chunks/app/issues/{page-abb062e4cf118340.js → page-72089090c04e96ee.js} +1 -1
  51. package/dashboard/.next/static/chunks/app/notes/page-17af94c67ba79c00.js +1 -0
  52. package/dashboard/.next/static/chunks/app/page-24bac51dfe007c66.js +1 -0
  53. package/dashboard/.next/static/chunks/app/progress/page-427fb18da3afb061.js +1 -0
  54. package/dashboard/.next/static/chunks/{main-a6cc6e599cefa893.js → main-9a811c95265dbd11.js} +1 -1
  55. package/dashboard/.next/static/css/4a38d8f6f6b7a68f.css +3 -0
  56. package/dashboard/app/api/notes/done/route.ts +26 -0
  57. package/dashboard/app/api/notes/lead/route.ts +40 -0
  58. package/dashboard/app/api/notes/question/route.ts +30 -0
  59. package/dashboard/app/api/notes/record/route.ts +10 -2
  60. package/dashboard/app/notes/NotesClient.tsx +494 -77
  61. package/dashboard/app/notes/page.tsx +5 -2
  62. package/dashboard/app/progress/ProgressClient.tsx +29 -8
  63. package/dashboard/app/progress/page.tsx +2 -0
  64. package/dashboard/components/MarkdownRenderer.tsx +31 -0
  65. package/dashboard/next.config.mjs +11 -0
  66. package/dashboard/whisper-server.py +85 -0
  67. package/dist/commands/dashboard.d.ts.map +1 -1
  68. package/dist/commands/dashboard.js +23 -1
  69. package/dist/commands/dashboard.js.map +1 -1
  70. package/dist/commands/note.d.ts.map +1 -1
  71. package/dist/commands/note.js +55 -2
  72. package/dist/commands/note.js.map +1 -1
  73. package/dist/core/notes.d.ts +68 -0
  74. package/dist/core/notes.d.ts.map +1 -1
  75. package/dist/core/notes.js +167 -0
  76. package/dist/core/notes.js.map +1 -1
  77. package/dist/core/review.d.ts +14 -0
  78. package/dist/core/review.d.ts.map +1 -0
  79. package/dist/core/review.js +80 -0
  80. package/dist/core/review.js.map +1 -0
  81. package/dist/core/whisper.d.ts +8 -0
  82. package/dist/core/whisper.d.ts.map +1 -1
  83. package/dist/core/whisper.js +55 -0
  84. package/dist/core/whisper.js.map +1 -1
  85. package/dist/skills/diane.md +48 -66
  86. package/dist/skills/ingest-aa-report.md +4 -4
  87. package/package.json +2 -1
  88. package/dashboard/.next/static/chunks/app/notes/page-bc458d3e1639c526.js +0 -1
  89. package/dashboard/.next/static/chunks/app/page-1226422e170d8895.js +0 -1
  90. package/dashboard/.next/static/chunks/app/progress/page-f07ac39d1d27b480.js +0 -1
  91. package/dashboard/.next/static/css/23b3f575e87bea75.css +0 -3
  92. /package/dashboard/.next/static/{JIjye0HUTWALF3gbtaZF8 → ZvCvC4cMbL3GR8kloB9OJ}/_buildManifest.js +0 -0
  93. /package/dashboard/.next/static/{JIjye0HUTWALF3gbtaZF8 → ZvCvC4cMbL3GR8kloB9OJ}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-78c92fac7aa8fdd8.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:["static/JIjye0HUTWALF3gbtaZF8/_buildManifest.js","static/JIjye0HUTWALF3gbtaZF8/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-08869f2b18792e51.js","static/chunks/618f8807-547c5614e1318888.js","static/chunks/3205-728c260fbb4f89c6.js","static/chunks/main-app-9d2f6b8a47133e9b.js"],pages:{"/_app":["static/chunks/webpack-08869f2b18792e51.js","static/chunks/framework-cf6f5bdca6ba0184.js","static/chunks/main-a6cc6e599cefa893.js","static/chunks/pages/_app-6ad2b50514c24ab4.js"],"/_error":["static/chunks/webpack-08869f2b18792e51.js","static/chunks/framework-cf6f5bdca6ba0184.js","static/chunks/main-a6cc6e599cefa893.js","static/chunks/pages/_error-d5eb11c5c4626811.js"]},ampFirstPages:[]};
1
+ self.__BUILD_MANIFEST={polyfillFiles:["static/chunks/polyfills-78c92fac7aa8fdd8.js"],devFiles:[],ampDevFiles:[],lowPriorityFiles:["static/ZvCvC4cMbL3GR8kloB9OJ/_buildManifest.js","static/ZvCvC4cMbL3GR8kloB9OJ/_ssgManifest.js"],rootMainFiles:["static/chunks/webpack-08869f2b18792e51.js","static/chunks/618f8807-547c5614e1318888.js","static/chunks/3205-728c260fbb4f89c6.js","static/chunks/main-app-9d2f6b8a47133e9b.js"],pages:{"/_app":["static/chunks/webpack-08869f2b18792e51.js","static/chunks/framework-cf6f5bdca6ba0184.js","static/chunks/main-9a811c95265dbd11.js","static/chunks/pages/_app-6ad2b50514c24ab4.js"],"/_error":["static/chunks/webpack-08869f2b18792e51.js","static/chunks/framework-cf6f5bdca6ba0184.js","static/chunks/main-9a811c95265dbd11.js","static/chunks/pages/_error-d5eb11c5c4626811.js"]},ampFirstPages:[]};
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/4c9affa5bc8f420e-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bb3ef058b751a6ad-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/23b3f575e87bea75.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-08869f2b18792e51.js"/><script src="/_next/static/chunks/618f8807-547c5614e1318888.js" async=""></script><script src="/_next/static/chunks/3205-728c260fbb4f89c6.js" async=""></script><script src="/_next/static/chunks/main-app-9d2f6b8a47133e9b.js" async=""></script><script src="/_next/static/chunks/7498-ea83cb9e30ec5491.js" async=""></script><script src="/_next/static/chunks/app/layout-a95b696089e278c3.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Hex</title><meta name="description" content="Local dashboard for Solidity smart contract audits"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__variable_73ee6c __variable_3c557b min-h-screen bg-surface-0 text-text-primary font-sans"><script>((e,t,r,n,o,l,a,u)=>{let i=document.documentElement,s=["light","dark"];function c(t){(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&l?o.map(e=>l[e]||e):o;r?(i.classList.remove(...n),i.classList.add(l&&l[t]?l[t]:t)):i.setAttribute(e,t)}),u&&s.includes(t)&&(i.style.colorScheme=t)}if(n)c(n);else try{let e=localStorage.getItem(t)||r,n=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(n)}catch(e){}})("data-theme","theme","dark",null,["light","dark"],null,false,true)</script><div class="min-h-screen"><button type="button" aria-label="Toggle navigation" class="fixed left-3 top-3 z-[60] flex h-10 w-10 items-center justify-center rounded-md bg-surface-1 border border-border-default text-text-secondary hover:text-text-primary md:hidden"><svg class="h-5 w-5" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path></svg></button><nav aria-label="Main navigation" class="fixed left-0 top-0 z-50 flex h-screen w-[220px] flex-col border-r border-border-subtle bg-surface-1 transition-transform duration-200 -translate-x-full md:translate-x-0"><div class="px-5 pb-4 pt-6"><div class="flex items-baseline gap-2"><span class="text-title font-semibold text-text-primary">Hex</span><span class="text-caption text-text-tertiary">v<!-- -->0.5.4</span></div></div><div class="flex-1 overflow-y-auto px-3 pb-4"><div class="mt-6 first:mt-0"><div class="mb-1.5 px-3 text-caption font-medium text-text-tertiary">Recon</div><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="m2.25 12 8.954-8.955a1.126 1.126 0 0 1 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"></path></svg><span>Home</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/progress"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15a2.25 2.25 0 0 1 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"></path></svg><span>Progress</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/stats"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"></path></svg><span>Stats</span></a></div><div class="mt-6 first:mt-0"><div class="mb-1.5 px-3 text-caption font-medium text-text-tertiary">Analysis</div><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/access"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"></path></svg><span>Access Control</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/functions"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"></path></svg><span>Functions</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/calls"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"></path></svg><span>Ext Calls</span></a></div><div class="mt-6 first:mt-0"><div class="mb-1.5 px-3 text-caption font-medium text-text-tertiary">Reasoning</div><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/conformance"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375"></path></svg><span>Spec Conformance</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/notes"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"></path></svg><span>Notes</span></a></div><div class="mt-6 first:mt-0"><div class="mb-1.5 px-3 text-caption font-medium text-text-tertiary">Visual</div><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/diagram"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0 1 20.25 6v1.5m0 9V18A2.25 2.25 0 0 1 18 20.25h-1.5m-9 0H6A2.25 2.25 0 0 1 3.75 18v-1.5M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path></svg><span>Diagram</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/flows"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5"></path></svg><span>Flows</span></a></div><div class="mt-6 first:mt-0"><div class="mb-1.5 px-3 text-caption font-medium text-text-tertiary">Issues</div><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/issues"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"></path></svg><span>Board</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/overleaf"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"></path></svg><span>Overleaf</span></a></div></div><div class="border-t border-border-subtle px-3 py-3 space-y-1"><div class="px-3 py-1 text-caption text-text-tertiary" aria-live="polite"><div class="flex items-center gap-2" title="Last refresh 3:37:08 PM — watcher disconnected"><span class="inline-block h-1.5 w-1.5 rounded-full bg-[var(--medium)]" aria-hidden="true"></span><span>Reconnecting…</span></div></div><div class="h-9"></div><div class="flex items-center gap-1.5 px-3 py-1 text-caption text-text-tertiary"><kbd class="rounded border border-border-default bg-surface-2 px-1.5 py-0.5 text-[11px]">⌘K</kbd><span>Quick nav</span></div></div></nav><main class="min-h-screen bg-surface-0 p-6 pt-16 md:ml-[220px] md:pt-6"><div class="mx-auto max-w-6xl"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div></div></main></div><script src="/_next/static/chunks/webpack-08869f2b18792e51.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/4c9affa5bc8f420e-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/bb3ef058b751a6ad-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/css/23b3f575e87bea75.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[5268,[],\"\"]\n6:I[5276,[],\"\"]\n7:I[3297,[],\"\"]\n8:I[4595,[\"7498\",\"static/chunks/7498-ea83cb9e30ec5491.js\",\"3185\",\"static/chunks/app/layout-a95b696089e278c3.js\"],\"ThemeProvider\"]\n9:I[2198,[\"7498\",\"static/chunks/7498-ea83cb9e30ec5491.js\",\"3185\",\"static/chunks/app/layout-a95b696089e278c3.js\"],\"CommandPalette\"]\na:I[1187,[\"7498\",\"static/chunks/7498-ea83cb9e30ec5491.js\",\"3185\",\"static/chunks/app/layout-a95b696089e278c3.js\"],\"DashboardLayout\"]\n10:I[9690,[],\"\"]\nb:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\nc:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\nd:{\"display\":\"inline-block\"}\ne:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n11:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/23b3f575e87bea75.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"JIjye0HUTWALF3gbtaZF8\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/_not-found\",\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],null],null]},[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_73ee6c __variable_3c557b min-h-screen bg-surface-0 text-text-primary font-sans\",\"children\":[\"$\",\"$L8\",null,{\"attribute\":\"data-theme\",\"defaultTheme\":\"dark\",\"enableSystem\":false,\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"$La\",null,{\"version\":\"0.5.4\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$b\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$c\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$d\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$e\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]}]]}]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lf\"],\"globalErrorComponent\":\"$10\",\"missingSlots\":\"$W11\"}]]\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Hex\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Local dashboard for Solidity smart contract audits\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" href="/_next/static/media/4c9affa5bc8f420e-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/bb3ef058b751a6ad-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/4a38d8f6f6b7a68f.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-08869f2b18792e51.js"/><script src="/_next/static/chunks/618f8807-547c5614e1318888.js" async=""></script><script src="/_next/static/chunks/3205-728c260fbb4f89c6.js" async=""></script><script src="/_next/static/chunks/main-app-9d2f6b8a47133e9b.js" async=""></script><script src="/_next/static/chunks/7498-ea83cb9e30ec5491.js" async=""></script><script src="/_next/static/chunks/app/layout-a95b696089e278c3.js" async=""></script><meta name="robots" content="noindex"/><title>404: This page could not be found.</title><title>Hex</title><meta name="description" content="Local dashboard for Solidity smart contract audits"/><meta name="next-size-adjust"/><script src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js" noModule=""></script></head><body class="__variable_73ee6c __variable_3c557b min-h-screen bg-surface-0 text-text-primary font-sans"><script>((e,t,r,n,o,l,a,u)=>{let i=document.documentElement,s=["light","dark"];function c(t){(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&l?o.map(e=>l[e]||e):o;r?(i.classList.remove(...n),i.classList.add(l&&l[t]?l[t]:t)):i.setAttribute(e,t)}),u&&s.includes(t)&&(i.style.colorScheme=t)}if(n)c(n);else try{let e=localStorage.getItem(t)||r,n=a&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;c(n)}catch(e){}})("data-theme","theme","dark",null,["light","dark"],null,false,true)</script><div class="min-h-screen"><button type="button" aria-label="Toggle navigation" class="fixed left-3 top-3 z-[60] flex h-10 w-10 items-center justify-center rounded-md bg-surface-1 border border-border-default text-text-secondary hover:text-text-primary md:hidden"><svg class="h-5 w-5" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"></path></svg></button><nav aria-label="Main navigation" class="fixed left-0 top-0 z-50 flex h-screen w-[220px] flex-col border-r border-border-subtle bg-surface-1 transition-transform duration-200 -translate-x-full md:translate-x-0"><div class="px-5 pb-4 pt-6"><div class="flex items-baseline gap-2"><span class="text-title font-semibold text-text-primary">Hex</span><span class="text-caption text-text-tertiary">v<!-- -->0.5.5</span></div></div><div class="flex-1 overflow-y-auto px-3 pb-4"><div class="mt-6 first:mt-0"><div class="mb-1.5 px-3 text-caption font-medium text-text-tertiary">Recon</div><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="m2.25 12 8.954-8.955a1.126 1.126 0 0 1 1.591 0L21.75 12M4.5 9.75v10.125c0 .621.504 1.125 1.125 1.125H9.75v-4.875c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21h4.125c.621 0 1.125-.504 1.125-1.125V9.75M8.25 21h8.25"></path></svg><span>Home</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/progress"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M11.35 3.836c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75 2.25 2.25 0 0 0-.1-.664m-5.8 0A2.251 2.251 0 0 1 13.5 2.25H15a2.25 2.25 0 0 1 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m8.9-4.414c.376.023.75.05 1.124.08 1.131.094 1.976 1.057 1.976 2.192V16.5A2.25 2.25 0 0 1 18 18.75h-2.25m-7.5-10.5H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V18.75m-7.5-10.5h6.375c.621 0 1.125.504 1.125 1.125v9.375m-8.25-3 1.5 1.5 3-3.75"></path></svg><span>Progress</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/stats"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M3 13.125C3 12.504 3.504 12 4.125 12h2.25c.621 0 1.125.504 1.125 1.125v6.75C7.5 20.496 6.996 21 6.375 21h-2.25A1.125 1.125 0 0 1 3 19.875v-6.75ZM9.75 8.625c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125v11.25c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V8.625ZM16.5 4.125c0-.621.504-1.125 1.125-1.125h2.25C20.496 3 21 3.504 21 4.125v15.75c0 .621-.504 1.125-1.125 1.125h-2.25a1.125 1.125 0 0 1-1.125-1.125V4.125Z"></path></svg><span>Stats</span></a></div><div class="mt-6 first:mt-0"><div class="mb-1.5 px-3 text-caption font-medium text-text-tertiary">Analysis</div><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/access"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 1 0-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 0 0 2.25-2.25v-6.75a2.25 2.25 0 0 0-2.25-2.25H6.75a2.25 2.25 0 0 0-2.25 2.25v6.75a2.25 2.25 0 0 0 2.25 2.25Z"></path></svg><span>Access Control</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/functions"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"></path></svg><span>Functions</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/calls"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"></path></svg><span>Ext Calls</span></a></div><div class="mt-6 first:mt-0"><div class="mb-1.5 px-3 text-caption font-medium text-text-tertiary">Reasoning</div><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/conformance"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M10.125 2.25h-4.5c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125v-9M10.125 2.25h.375a9 9 0 0 1 9 9v.375M10.125 2.25A3.375 3.375 0 0 1 13.5 5.625v1.5c0 .621.504 1.125 1.125 1.125h1.5a3.375 3.375 0 0 1 3.375 3.375"></path></svg><span>Spec Conformance</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/notes"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 1 1 2.652 2.652L10.582 16.07a4.5 4.5 0 0 1-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 0 1 1.13-1.897l8.932-8.931Zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0 1 15.75 21H5.25A2.25 2.25 0 0 1 3 18.75V8.25A2.25 2.25 0 0 1 5.25 6H10"></path></svg><span>Notes</span></a></div><div class="mt-6 first:mt-0"><div class="mb-1.5 px-3 text-caption font-medium text-text-tertiary">Visual</div><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/diagram"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M7.5 3.75H6A2.25 2.25 0 0 0 3.75 6v1.5M16.5 3.75H18A2.25 2.25 0 0 1 20.25 6v1.5m0 9V18A2.25 2.25 0 0 1 18 20.25h-1.5m-9 0H6A2.25 2.25 0 0 1 3.75 18v-1.5M15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"></path></svg><span>Diagram</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/flows"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 3v11.25A2.25 2.25 0 0 0 6 16.5h2.25M3.75 3h-1.5m1.5 0h16.5m0 0h1.5m-1.5 0v11.25A2.25 2.25 0 0 1 18 16.5h-2.25m-7.5 0h7.5m-7.5 0-1 3m8.5-3 1 3m0 0 .5 1.5m-.5-1.5h-9.5m0 0-.5 1.5"></path></svg><span>Flows</span></a></div><div class="mt-6 first:mt-0"><div class="mb-1.5 px-3 text-caption font-medium text-text-tertiary">Issues</div><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/issues"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M8.25 6.75h12M8.25 12h12m-12 5.25h12M3.75 6.75h.007v.008H3.75V6.75Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0ZM3.75 12h.007v.008H3.75V12Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm-.375 5.25h.007v.008H3.75v-.008Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"></path></svg><span>Board</span></a><a class="group flex items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary" href="/overleaf"><svg class="h-4 w-4 shrink-0" aria-hidden="true" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126ZM12 15.75h.007v.008H12v-.008Z"></path></svg><span>Overleaf</span></a></div></div><div class="border-t border-border-subtle px-3 py-3 space-y-1"><div class="px-3 py-1 text-caption text-text-tertiary" aria-live="polite"><div class="flex items-center gap-2" title="Last refresh 6:47:45 PM — watcher disconnected"><span class="inline-block h-1.5 w-1.5 rounded-full bg-[var(--medium)]" aria-hidden="true"></span><span>Reconnecting…</span></div></div><div class="h-9"></div><div class="flex items-center gap-1.5 px-3 py-1 text-caption text-text-tertiary"><kbd class="rounded border border-border-default bg-surface-2 px-1.5 py-0.5 text-[11px]">⌘K</kbd><span>Quick nav</span></div></div></nav><main class="min-h-screen bg-surface-0 p-6 pt-16 md:ml-[220px] md:pt-6"><div class="mx-auto max-w-6xl"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div></div></main></div><script src="/_next/static/chunks/webpack-08869f2b18792e51.js" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0]);self.__next_f.push([2,null])</script><script>self.__next_f.push([1,"1:HL[\"/_next/static/media/4c9affa5bc8f420e-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n2:HL[\"/_next/static/media/bb3ef058b751a6ad-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n3:HL[\"/_next/static/css/4a38d8f6f6b7a68f.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"4:I[5268,[],\"\"]\n6:I[5276,[],\"\"]\n7:I[3297,[],\"\"]\n8:I[4595,[\"7498\",\"static/chunks/7498-ea83cb9e30ec5491.js\",\"3185\",\"static/chunks/app/layout-a95b696089e278c3.js\"],\"ThemeProvider\"]\n9:I[2198,[\"7498\",\"static/chunks/7498-ea83cb9e30ec5491.js\",\"3185\",\"static/chunks/app/layout-a95b696089e278c3.js\"],\"CommandPalette\"]\na:I[1187,[\"7498\",\"static/chunks/7498-ea83cb9e30ec5491.js\",\"3185\",\"static/chunks/app/layout-a95b696089e278c3.js\"],\"DashboardLayout\"]\n10:I[9690,[],\"\"]\nb:{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"}\nc:{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"}\nd:{\"display\":\"inline-block\"}\ne:{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0}\n11:[]\n"])</script><script>self.__next_f.push([1,"0:[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/4a38d8f6f6b7a68f.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"buildId\":\"ZvCvC4cMbL3GR8kloB9OJ\",\"assetPrefix\":\"\",\"initialCanonicalUrl\":\"/_not-found\",\"initialTree\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],\"initialSeedData\":[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{},[[\"$L5\",[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]]],null],null]},[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\",\"/_not-found\",\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"notFoundStyles\":\"$undefined\",\"styles\":null}],null]},[[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_73ee6c __variable_3c557b min-h-screen bg-surface-0 text-text-primary font-sans\",\"children\":[\"$\",\"$L8\",null,{\"attribute\":\"data-theme\",\"defaultTheme\":\"dark\",\"enableSystem\":false,\"children\":[[\"$\",\"$L9\",null,{}],[\"$\",\"$La\",null,{\"version\":\"0.5.5\",\"children\":[\"$\",\"$L6\",null,{\"parallelRouterKey\":\"children\",\"segmentPath\":[\"children\"],\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L7\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$b\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$c\",\"children\":\"404\"}],[\"$\",\"div\",null,{\"style\":\"$d\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$e\",\"children\":\"This page could not be found.\"}]}]]}]}]],\"notFoundStyles\":[],\"styles\":null}]}]]}]}]}],null],null],\"couldBeIntercepted\":false,\"initialHead\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],\"$Lf\"],\"globalErrorComponent\":\"$10\",\"missingSlots\":\"$W11\"}]]\n"])</script><script>self.__next_f.push([1,"f:[[\"$\",\"meta\",\"0\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}],[\"$\",\"meta\",\"1\",{\"charSet\":\"utf-8\"}],[\"$\",\"title\",\"2\",{\"children\":\"Hex\"}],[\"$\",\"meta\",\"3\",{\"name\":\"description\",\"content\":\"Local dashboard for Solidity smart contract audits\"}],[\"$\",\"meta\",\"4\",{\"name\":\"next-size-adjust\"}]]\n5:null\n"])</script></body></html>
@@ -1 +1 @@
1
- <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-08869f2b18792e51.js" defer=""></script><script src="/_next/static/chunks/framework-cf6f5bdca6ba0184.js" defer=""></script><script src="/_next/static/chunks/main-a6cc6e599cefa893.js" defer=""></script><script src="/_next/static/chunks/pages/_app-6ad2b50514c24ab4.js" defer=""></script><script src="/_next/static/chunks/pages/_error-d5eb11c5c4626811.js" defer=""></script><script src="/_next/static/JIjye0HUTWALF3gbtaZF8/_buildManifest.js" defer=""></script><script src="/_next/static/JIjye0HUTWALF3gbtaZF8/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"JIjye0HUTWALF3gbtaZF8","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
1
+ <!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width"/><title>500: Internal Server Error</title><meta name="next-head-count" content="3"/><noscript data-n-css=""></noscript><script defer="" nomodule="" src="/_next/static/chunks/polyfills-78c92fac7aa8fdd8.js"></script><script src="/_next/static/chunks/webpack-08869f2b18792e51.js" defer=""></script><script src="/_next/static/chunks/framework-cf6f5bdca6ba0184.js" defer=""></script><script src="/_next/static/chunks/main-9a811c95265dbd11.js" defer=""></script><script src="/_next/static/chunks/pages/_app-6ad2b50514c24ab4.js" defer=""></script><script src="/_next/static/chunks/pages/_error-d5eb11c5c4626811.js" defer=""></script><script src="/_next/static/ZvCvC4cMbL3GR8kloB9OJ/_buildManifest.js" defer=""></script><script src="/_next/static/ZvCvC4cMbL3GR8kloB9OJ/_ssgManifest.js" defer=""></script></head><body><div id="__next"><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error<!-- -->.</h2></div></div></div></div><script id="__NEXT_DATA__" type="application/json">{"props":{"pageProps":{"statusCode":500}},"page":"/_error","query":{},"buildId":"ZvCvC4cMbL3GR8kloB9OJ","nextExport":true,"isFallback":false,"gip":true,"scriptLoader":[]}</script></body></html>
@@ -1 +1 @@
1
- self.__RSC_SERVER_MANIFEST="{\"node\":{},\"edge\":{},\"encryptionKey\":\"/S9DF3jbB2wbpcWSPaPtZFCi4KwqS0SmUv678V1zmp8=\"}"
1
+ self.__RSC_SERVER_MANIFEST="{\"node\":{},\"edge\":{},\"encryptionKey\":\"BpP3UUl0w4TL3umTfDxubG1LXNmjyQ5e7bbf2udUKcs=\"}"
@@ -1 +1 @@
1
- {"node":{},"edge":{},"encryptionKey":"/S9DF3jbB2wbpcWSPaPtZFCi4KwqS0SmUv678V1zmp8="}
1
+ {"node":{},"edge":{},"encryptionKey":"BpP3UUl0w4TL3umTfDxubG1LXNmjyQ5e7bbf2udUKcs="}
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4521],{4260:function(e,t,n){Promise.resolve().then(n.bind(n,7063))},7063:function(e,t,n){"use strict";n.d(t,{IssuesBoardClient:function(){return m}});var r=n(7821),a=n(8078),o=n(3924);let s={Critical:"bg-[var(--critical)]/18 text-[var(--critical)]",High:"bg-[var(--high)]/18 text-[var(--high)]",Medium:"bg-[var(--medium)]/18 text-[var(--medium)]",Low:"bg-[var(--low)]/18 text-[var(--low)]",Info:"bg-[var(--info)]/18 text-[var(--info)]"};function i(e){var t;let{severity:n}=e,a=null!==(t=s[n])&&void 0!==t?t:s.Info;return(0,r.jsx)("span",{className:"inline-flex items-center rounded-md px-2 py-0.5 text-caption font-medium ".concat(a),children:n})}var c=n(9487);function l(e,t){var n;let r=new Set,a=e.code_locations.map(e=>e.file).filter(e=>e&&!r.has(e)&&r.add(e)).map(e=>(function(e,t){if(t.repositoryUrl&&t.commit){let n=t.repositoryUrl.replace(/\/+$/,"");return"[`".concat(e,"`](").concat(n,"/blob/").concat(t.commit,"/").concat(e,")")}return"[`".concat(e,"`]()")})(e,t)).join(", "),o=e.resolution||"Unresolved",s=null!==(n=e.update_from_client)&&void 0!==n?n:"";return["**File(s)**: ".concat(a),"","**Description**: ".concat(function(e){if(!e)return e;let t=!1,n="";return e.split("\n").map(e=>{let r=e.match(/^\s*(```+|~~~+)/);if(r)return t?r[1][0]===n&&(t=!1,n=""):(t=!0,n=r[1][0]),e;if(t)return e;let a=e.match(/^\s*#{1,6}\s+(.*\S)\s*$/);return a?"**".concat(a[1],"**"):/^\s*(-{3,}|\*{3,}|_{3,})\s*$/.test(e)?"":e}).join("\n")}(e.description)),"","**Recommendation(s)**: ".concat(e.recommendation),"","**Status**: ".concat(o),"","**Update from the client**: ".concat(s)].join("\n")}let d=[{id:"potential",label:"Potential",description:"Awaiting validation"},{id:"verified",label:"Verified",description:"Confirmed, ready to push"},{id:"synced",label:"Synced to GitHub",description:"On GitHub — edit there, not here"},{id:"invalid",label:"Invalid",description:"Rejected after review"},{id:"duplicate",label:"Duplicate",description:"Covered by another entry"}],u={Critical:0,High:1,Medium:2,Low:3,Info:4},x=["Critical","High","Medium","Low","Info"],p=["Fixed","Mitigated","Acknowledged","Not Fixed","Unresolved"];function m(e){var t;let{issues:n,formatCtx:s={}}=e,[i,c]=(0,a.useState)(n),[l,x]=(0,a.useState)(null),[p,m]=(0,a.useState)("all");(0,a.useEffect)(()=>{c(n)},[n]);let h=(0,o.Dy)((0,o.VT)(o.we,{activationConstraint:{distance:4}})),y=(0,a.useMemo)(()=>"all"===p?i:i.filter(e=>e.source===p),[i,p]),v=(0,a.useMemo)(()=>{let e={potential:[],verified:[],synced:[],invalid:[],duplicate:[]};for(let t of y)e[t.column].push(t);for(let t of Object.values(e))t.sort((e,t)=>{var n,r;return(null!==(n=u[e.severity])&&void 0!==n?n:5)-(null!==(r=u[t.severity])&&void 0!==r?r:5)||e.id.localeCompare(t.id)});return e},[y]),j=(0,a.useMemo)(()=>{let e={potential:0,verified:0,synced:0,invalid:0,duplicate:0};for(let t of i)e[t.column]++;return e},[i]),N=(0,a.useCallback)(async(e,t)=>{c(n=>n.map(n=>n.id===e?{...n,column:t,status:function(e){switch(e){case"potential":return"pending_validation";case"verified":return"verified";case"synced":return"synced";case"invalid":return"rejected";case"duplicate":return"duplicate"}}(t),duplicate_of:"duplicate"===t?n.duplicate_of:null}:n));try{let n=await fetch("/api/issues/".concat(encodeURIComponent(e),"/move"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({column:t})});if(!n.ok){var r;let e=await n.json().catch(()=>({}));throw Error(null!==(r=e.error)&&void 0!==r?r:"move failed")}}catch(t){console.error(t),c(t=>t.map(t=>{var r;return t.id===e&&null!==(r=n.find(t=>t.id===e))&&void 0!==r?r:t}))}},[n]),w=(0,a.useCallback)(async(e,t)=>{c(n=>n.map(n=>n.id===e?{...n,...t}:n));try{let r=await fetch("/api/issues/".concat(encodeURIComponent(e)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){var n;let e=await r.json().catch(()=>({}));throw Error(null!==(n=e.error)&&void 0!==n?n:"update failed")}}catch(e){console.error(e)}},[]),_=null!==(t=i.find(e=>e.id===l))&&void 0!==t?t:null;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("header",{className:"mb-6 flex flex-wrap items-end justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-title font-semibold text-text-primary",children:"Issues"}),(0,r.jsxs)("p",{className:"mt-1 text-body text-text-secondary",children:[i.length," total — ",j.potential," potential, ",j.verified," verified,"," ",j.synced," synced, ",j.invalid," invalid, ",j.duplicate," duplicate. Drag a card between columns; click to edit. Synced cards are read-only (edit on GitHub)."]})]}),(0,r.jsx)(b,{value:p,onChange:m})]}),(0,r.jsx)(o.LB,{sensors:h,onDragEnd:e=>{let{active:t,over:n}=e;if(!n)return;let r=n.id,a=t.id,o=i.find(e=>e.id===a);o&&o.column!==r&&"synced"!==r&&"synced"!==o.column&&N(a,r)},children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-5",children:d.map(e=>(0,r.jsx)(f,{column:e,issues:v[e.id],onOpen:x},e.id))})}),_&&(0,r.jsx)(g,{issue:_,formatCtx:s,onClose:()=>x(null),onSave:e=>w(_.id,e)})]})}function b(e){let{value:t,onChange:n}=e;return(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:[{id:"all",label:"All sources"},{id:"manual",label:"Manual"},{id:"auditagent",label:"AuditAgent"},{id:"conformance",label:"Conformance"},{id:"github",label:"GitHub"}].map(e=>{let a=t===e.id;return(0,r.jsx)("button",{type:"button",onClick:()=>n(e.id),className:"rounded-md px-2.5 py-1 text-caption font-medium ".concat(a?"bg-accent text-surface-0":"bg-surface-2 text-text-secondary hover:text-text-primary"),children:e.label},e.id)})})}function f(e){let{column:t,issues:n,onOpen:a}=e,{isOver:s,setNodeRef:i}=(0,o.Zj)({id:t.id,disabled:"synced"===t.id});return(0,r.jsxs)("section",{ref:i,"aria-label":t.label,className:"flex flex-col gap-2 rounded-lg border bg-surface-1 p-3 transition-colors ".concat(s?"border-accent bg-surface-2":"border-border-subtle"),children:[(0,r.jsxs)("header",{className:"flex items-baseline justify-between",children:[(0,r.jsx)("h2",{className:"text-heading font-medium text-text-primary",children:t.label}),(0,r.jsx)("span",{className:"text-caption text-text-tertiary",children:n.length})]}),(0,r.jsx)("p",{className:"text-caption text-text-tertiary",children:t.description}),(0,r.jsxs)("div",{className:"mt-1 flex flex-col gap-2",children:[n.map(e=>(0,r.jsx)(h,{issue:e,onOpen:a},e.id)),0===n.length&&(0,r.jsx)("div",{className:"rounded-md border border-dashed border-border-subtle py-6 text-center text-caption text-text-tertiary",children:"Empty"})]})]})}function h(e){let{issue:t,onOpen:n}=e,a="synced"===t.column,{attributes:s,listeners:c,setNodeRef:l,isDragging:d,transform:u}=(0,o.O1)({id:t.id,disabled:a}),x=u?{transform:"translate3d(".concat(u.x,"px, ").concat(u.y,"px, 0)"),zIndex:30}:{};return(0,r.jsxs)("article",{ref:l,style:x,...a?{}:s,...a?{}:c,onClick:e=>{u||(e.stopPropagation(),n(t.id))},className:"group rounded-md border bg-surface-0 p-3 text-left ".concat(a?"cursor-pointer":"cursor-grab active:cursor-grabbing"," ").concat(d?"border-accent shadow-lg":"border-border-subtle hover:border-border-default"),children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsx)("span",{className:"font-mono text-caption text-text-tertiary",children:t.id}),(0,r.jsx)(i,{severity:t.severity})]}),(0,r.jsx)("h3",{title:t.title,className:"mt-1 text-body font-medium text-text-primary line-clamp-3",children:t.title}),(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5 text-caption",children:[(0,r.jsx)(y,{source:t.source}),(0,r.jsx)(v,{issue:t}),t.duplicate_of&&(0,r.jsxs)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-secondary",children:["dup of ",t.duplicate_of]}),"passing"===t.poc_status&&(0,r.jsx)("span",{className:"rounded-md bg-[var(--low)]/15 px-1.5 py-0.5 text-[var(--low)]",children:"PoC ✓"}),"failing"===t.poc_status&&(0,r.jsx)("span",{className:"rounded-md bg-[var(--critical)]/15 px-1.5 py-0.5 text-[var(--critical)]",children:"PoC ✕"}),t.resolution&&(0,r.jsx)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-secondary",children:t.resolution})]}),t.match_signals&&(0,r.jsx)("div",{className:"mt-2 text-caption text-text-tertiary",children:(0,r.jsx)("span",{className:"font-mono",children:[t.match_signals.contract?"contract":null,t.match_signals.function?"function":null,"different"!==t.match_signals.root_cause?"rc:".concat(t.match_signals.root_cause):null,"different"!==t.match_signals.attack_vector?"av:".concat(t.match_signals.attack_vector):null].filter(Boolean).join(" \xb7 ")})})]})}function y(e){var t;let{source:n}=e;return(0,r.jsx)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-tertiary",children:null!==(t=({manual:"Manual",auditagent:"AuditAgent",conformance:"Conformance",github:"GitHub"})[n])&&void 0!==t?t:n})}function v(e){var t,n;let{issue:a}=e,o=null!==(t=a.sync_state)&&void 0!==t?t:"none";if("none"===o)return null;if("unsynced"===o)return(0,r.jsx)("span",{title:"Run /sync-issues to push verified findings to GitHub.",className:"rounded-md border border-dashed border-border-default px-1.5 py-0.5 text-text-tertiary",children:"GH unsynced"});if("conflict"===o)return(0,r.jsx)("span",{title:"Local and remote diverged. Re-run /sync-issues to reconcile.",className:"rounded-md bg-[var(--critical)]/15 px-1.5 py-0.5 text-[var(--critical)]",children:"GH conflict"});let s="synced_closed"===o,i="GH #".concat(null!==(n=a.github_issue_number)&&void 0!==n?n:"?"," ").concat(s?"closed":"open"),c=s?"bg-surface-2 text-text-tertiary":"bg-[var(--low)]/15 text-[var(--low)]";return a.github_issue_url?(0,r.jsx)("a",{href:a.github_issue_url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"rounded-md px-1.5 py-0.5 hover:underline ".concat(c),children:i}):(0,r.jsx)("span",{className:"rounded-md px-1.5 py-0.5 ".concat(c),children:i})}function g(e){var t,n,o;let{issue:s,formatCtx:i,onClose:d,onSave:u}=e,[m,b]=(0,a.useState)(s.title),[f,h]=(0,a.useState)(s.severity),[g,N]=(0,a.useState)(s.description),[w,_]=(0,a.useState)(s.recommendation),[C,k]=(0,a.useState)(null!==(t=s.resolution)&&void 0!==t?t:""),[S,H]=(0,a.useState)(null!==(n=s.update_from_client)&&void 0!==n?n:""),[M,G]=(0,a.useState)(!1),[E,I]=(0,a.useState)(!1),[R,O]=(0,a.useState)(!1),P=(0,a.useRef)(null),T="synced"===s.status;(0,a.useEffect)(()=>{var e;null===(e=P.current)||void 0===e||e.focus()},[]);let D=async()=>{let e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"## [".concat(e.severity,"] ").concat(e.title,"\n\n").concat(l(e,t),"\n\n---\n")}({...s,title:m,severity:f,description:g,recommendation:w,resolution:C||void 0,update_from_client:S||void 0},i);try{await navigator.clipboard.writeText(e),I(!0),setTimeout(()=>I(!1),1500)}catch(e){}},U=async()=>{G(!0),await u({title:m,severity:f,description:g,recommendation:w,resolution:C||void 0,update_from_client:S||void 0}),G(!1),O(!1)};return(0,r.jsx)("div",{ref:P,tabIndex:-1,className:"fixed inset-0 z-50 flex items-center justify-center p-4 outline-none",style:{background:"var(--overlay-bg)"},onClick:d,onKeyDown:e=>{"Escape"===e.key&&d()},children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Issue ".concat(s.id),className:"relative flex h-[85vh] w-full max-w-4xl flex-col overflow-hidden border border-border-emphasis bg-surface-1 shadow-2xl",style:{borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-accent)"},onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-border-default bg-surface-2 px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-caption",children:[(0,r.jsx)("span",{className:"font-mono text-body text-text-tertiary",children:s.id}),(0,r.jsx)(y,{source:s.source}),(0,r.jsx)(v,{issue:s})]}),(0,r.jsx)("button",{type:"button",onClick:d,"aria-label":"Close",className:"rounded p-1 text-text-tertiary hover:bg-surface-3 hover:text-text-primary",children:(0,r.jsx)("svg",{className:"h-5 w-5","aria-hidden":"true",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[T&&(0,r.jsxs)("div",{className:"mb-4 rounded-md border border-border-default bg-surface-2 px-3 py-2 text-caption text-text-secondary",children:["This issue is synced to GitHub and is read-only here. Edit it on GitHub, then run"," ",(0,r.jsx)("span",{className:"font-mono",children:"/sync-issues"})," to pull the changes back."]}),R?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{label:"Title",children:(0,r.jsx)("input",{type:"text",value:m,onChange:e=>b(e.target.value),disabled:T,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-3",children:[(0,r.jsx)(j,{label:"Severity",children:(0,r.jsx)("select",{value:f,onChange:e=>h(e.target.value),disabled:T,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60",children:x.map(e=>(0,r.jsx)("option",{value:e,children:e},e))})}),(0,r.jsx)(j,{label:"Resolution (verified only)",children:(0,r.jsxs)("select",{value:C,onChange:e=>k(e.target.value),disabled:T,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60",children:[(0,r.jsx)("option",{value:"",children:"— none —"}),p.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})})]}),(0,r.jsx)(j,{label:"Description",className:"mt-3",children:(0,r.jsx)("textarea",{value:g,onChange:e=>N(e.target.value),rows:8,disabled:T,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsx)(j,{label:"Recommendation",className:"mt-3",children:(0,r.jsx)("textarea",{value:w,onChange:e=>_(e.target.value),rows:4,disabled:T,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsx)(j,{label:"Update from the client",className:"mt-3",children:(0,r.jsx)("textarea",{value:S,onChange:e=>H(e.target.value),rows:4,disabled:T,placeholder:"How the client responded — used by /generate-overleaf.",className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c.MarkdownRenderer,{content:"**Title**: ".concat(s.title,"\n\n**Severity**: ").concat(s.severity,"\n\n").concat(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(e,t)}(s,i))})}),s.code_locations.length>0&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption font-medium text-text-tertiary",children:"Code locations"}),(0,r.jsx)("ul",{className:"space-y-1 font-mono text-caption text-text-secondary",children:s.code_locations.map((e,t)=>(0,r.jsx)("li",{children:e.file},"".concat(e.file,"-").concat(t)))})]}),s.match_signals&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption font-medium text-text-tertiary",children:"Duplicate signals"}),(0,r.jsx)("p",{className:"text-caption text-text-secondary",children:null!==(o=s.reasoning)&&void 0!==o?o:"Matched against another entry."}),(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1.5 font-mono text-caption text-text-tertiary",children:[(0,r.jsxs)("span",{children:["contract: ",s.match_signals.contract?"✓":"—"]}),(0,r.jsxs)("span",{children:["function: ",s.match_signals.function?"✓":"—"]}),(0,r.jsxs)("span",{children:["root_cause: ",s.match_signals.root_cause]}),(0,r.jsxs)("span",{children:["attack_vector: ",s.match_signals.attack_vector]})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-border-default bg-surface-2 px-4 py-3",children:[(0,r.jsx)("button",{type:"button",onClick:D,className:"rounded-md border border-border-default px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:E?"Copied!":"Copy as HackMD"}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:R?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>O(!1),className:"rounded-md px-3 py-1.5 text-body text-text-secondary hover:text-text-primary",children:"Cancel"}),(0,r.jsx)("button",{type:"button",onClick:U,disabled:M,className:"rounded-md bg-accent px-3 py-1.5 text-body font-medium text-surface-0 hover:bg-accent-secondary disabled:opacity-50",children:M?"Saving…":"Save"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:d,className:"rounded-md px-3 py-1.5 text-body text-text-secondary hover:text-text-primary",children:"Close"}),(0,r.jsx)("button",{type:"button",onClick:()=>O(!0),disabled:T,title:T?"Synced to GitHub — edit it there, then run /sync-issues to pull the changes back.":void 0,className:"rounded-md bg-accent px-3 py-1.5 text-body font-medium text-surface-0 hover:bg-accent-secondary disabled:cursor-not-allowed disabled:opacity-40",children:"Edit"})]})})]})]})})}function j(e){let{label:t,className:n,children:a}=e;return(0,r.jsxs)("label",{className:"block ".concat(null!=n?n:""),children:[(0,r.jsx)("span",{className:"mb-1 block text-caption font-medium text-text-tertiary",children:t}),a]})}},9487:function(e,t,n){"use strict";n.d(t,{MarkdownRenderer:function(){return s}});var r=n(7821),a=n(8525),o=n(5592);function s(e){let{content:t,className:n}=e;return(0,r.jsx)("div",{className:"prose max-w-none\n prose-headings:text-text-primary\n prose-p:text-text-secondary\n prose-strong:text-text-primary\n prose-code:text-accent\n prose-code:before:content-none\n prose-code:after:content-none\n prose-pre:bg-surface-0\n prose-pre:border\n prose-pre:border-border-default\n prose-a:text-accent\n prose-a:no-underline\n hover:prose-a:underline\n prose-th:text-text-primary\n prose-td:text-text-secondary\n prose-hr:border-border-default\n prose-blockquote:border-border-emphasis\n prose-blockquote:text-text-secondary\n prose-li:text-text-secondary\n ".concat(null!=n?n:""),children:(0,r.jsx)(a.UG,{remarkPlugins:[o.Z],children:t})})}}},function(e){e.O(0,[7397,3924,7115,3205,1744],function(){return e(e.s=4260)}),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4521],{4260:function(e,t,n){Promise.resolve().then(n.bind(n,7063))},7063:function(e,t,n){"use strict";n.d(t,{IssuesBoardClient:function(){return m}});var r=n(7821),a=n(8078),o=n(3924);let s={Critical:"bg-[var(--critical)]/18 text-[var(--critical)]",High:"bg-[var(--high)]/18 text-[var(--high)]",Medium:"bg-[var(--medium)]/18 text-[var(--medium)]",Low:"bg-[var(--low)]/18 text-[var(--low)]",Info:"bg-[var(--info)]/18 text-[var(--info)]"};function i(e){var t;let{severity:n}=e,a=null!==(t=s[n])&&void 0!==t?t:s.Info;return(0,r.jsx)("span",{className:"inline-flex items-center rounded-md px-2 py-0.5 text-caption font-medium ".concat(a),children:n})}var c=n(9487);function l(e,t){var n;let r=new Set,a=e.code_locations.map(e=>e.file).filter(e=>e&&!r.has(e)&&r.add(e)).map(e=>(function(e,t){if(t.repositoryUrl&&t.commit){let n=t.repositoryUrl.replace(/\/+$/,"");return"[`".concat(e,"`](").concat(n,"/blob/").concat(t.commit,"/").concat(e,")")}return"[`".concat(e,"`]()")})(e,t)).join(", "),o=e.resolution||"Unresolved",s=null!==(n=e.update_from_client)&&void 0!==n?n:"";return["**File(s)**: ".concat(a),"","**Description**: ".concat(function(e){if(!e)return e;let t=!1,n="";return e.split("\n").map(e=>{let r=e.match(/^\s*(```+|~~~+)/);if(r)return t?r[1][0]===n&&(t=!1,n=""):(t=!0,n=r[1][0]),e;if(t)return e;let a=e.match(/^\s*#{1,6}\s+(.*\S)\s*$/);return a?"**".concat(a[1],"**"):/^\s*(-{3,}|\*{3,}|_{3,})\s*$/.test(e)?"":e}).join("\n")}(e.description)),"","**Recommendation(s)**: ".concat(e.recommendation),"","**Status**: ".concat(o),"","**Update from the client**: ".concat(s)].join("\n")}let d=[{id:"potential",label:"Potential",description:"Awaiting validation"},{id:"verified",label:"Verified",description:"Confirmed, ready to push"},{id:"synced",label:"Synced to GitHub",description:"On GitHub — edit there, not here"},{id:"invalid",label:"Invalid",description:"Rejected after review"},{id:"duplicate",label:"Duplicate",description:"Covered by another entry"}],u={Critical:0,High:1,Medium:2,Low:3,Info:4},x=["Critical","High","Medium","Low","Info"],p=["Fixed","Mitigated","Acknowledged","Not Fixed","Unresolved"];function m(e){var t;let{issues:n,formatCtx:s={}}=e,[i,c]=(0,a.useState)(n),[l,x]=(0,a.useState)(null),[p,m]=(0,a.useState)("all");(0,a.useEffect)(()=>{c(n)},[n]);let h=(0,o.Dy)((0,o.VT)(o.we,{activationConstraint:{distance:4}})),y=(0,a.useMemo)(()=>"all"===p?i:i.filter(e=>e.source===p),[i,p]),v=(0,a.useMemo)(()=>{let e={potential:[],verified:[],synced:[],invalid:[],duplicate:[]};for(let t of y)e[t.column].push(t);for(let t of Object.values(e))t.sort((e,t)=>{var n,r;return(null!==(n=u[e.severity])&&void 0!==n?n:5)-(null!==(r=u[t.severity])&&void 0!==r?r:5)||e.id.localeCompare(t.id)});return e},[y]),j=(0,a.useMemo)(()=>{let e={potential:0,verified:0,synced:0,invalid:0,duplicate:0};for(let t of i)e[t.column]++;return e},[i]),N=(0,a.useCallback)(async(e,t)=>{c(n=>n.map(n=>n.id===e?{...n,column:t,status:function(e){switch(e){case"potential":return"pending_validation";case"verified":return"verified";case"synced":return"synced";case"invalid":return"rejected";case"duplicate":return"duplicate"}}(t),duplicate_of:"duplicate"===t?n.duplicate_of:null}:n));try{let n=await fetch("/api/issues/".concat(encodeURIComponent(e),"/move"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({column:t})});if(!n.ok){var r;let e=await n.json().catch(()=>({}));throw Error(null!==(r=e.error)&&void 0!==r?r:"move failed")}}catch(t){console.error(t),c(t=>t.map(t=>{var r;return t.id===e&&null!==(r=n.find(t=>t.id===e))&&void 0!==r?r:t}))}},[n]),w=(0,a.useCallback)(async(e,t)=>{c(n=>n.map(n=>n.id===e?{...n,...t}:n));try{let r=await fetch("/api/issues/".concat(encodeURIComponent(e)),{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!r.ok){var n;let e=await r.json().catch(()=>({}));throw Error(null!==(n=e.error)&&void 0!==n?n:"update failed")}}catch(e){console.error(e)}},[]),_=null!==(t=i.find(e=>e.id===l))&&void 0!==t?t:null;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("header",{className:"mb-6 flex flex-wrap items-end justify-between gap-3",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-title font-semibold text-text-primary",children:"Issues"}),(0,r.jsxs)("p",{className:"mt-1 text-body text-text-secondary",children:[i.length," total — ",j.potential," potential, ",j.verified," verified,"," ",j.synced," synced, ",j.invalid," invalid, ",j.duplicate," duplicate. Drag a card between columns; click to edit. Synced cards are read-only (edit on GitHub)."]})]}),(0,r.jsx)(f,{value:p,onChange:m})]}),(0,r.jsx)(o.LB,{sensors:h,onDragEnd:e=>{let{active:t,over:n}=e;if(!n)return;let r=n.id,a=t.id,o=i.find(e=>e.id===a);o&&o.column!==r&&"synced"!==r&&"synced"!==o.column&&N(a,r)},children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 xl:grid-cols-5",children:d.map(e=>(0,r.jsx)(b,{column:e,issues:v[e.id],onOpen:x},e.id))})}),_&&(0,r.jsx)(g,{issue:_,formatCtx:s,onClose:()=>x(null),onSave:e=>w(_.id,e)})]})}function f(e){let{value:t,onChange:n}=e;return(0,r.jsx)("div",{className:"flex flex-wrap gap-1.5",children:[{id:"all",label:"All sources"},{id:"manual",label:"Manual"},{id:"auditagent",label:"AuditAgent"},{id:"conformance",label:"Conformance"},{id:"github",label:"GitHub"}].map(e=>{let a=t===e.id;return(0,r.jsx)("button",{type:"button",onClick:()=>n(e.id),className:"rounded-md px-2.5 py-1 text-caption font-medium ".concat(a?"bg-accent text-surface-0":"bg-surface-2 text-text-secondary hover:text-text-primary"),children:e.label},e.id)})})}function b(e){let{column:t,issues:n,onOpen:a}=e,{isOver:s,setNodeRef:i}=(0,o.Zj)({id:t.id,disabled:"synced"===t.id});return(0,r.jsxs)("section",{ref:i,"aria-label":t.label,className:"flex flex-col gap-2 rounded-lg border bg-surface-1 p-3 transition-colors ".concat(s?"border-accent bg-surface-2":"border-border-subtle"),children:[(0,r.jsxs)("header",{className:"flex items-baseline justify-between",children:[(0,r.jsx)("h2",{className:"text-heading font-medium text-text-primary",children:t.label}),(0,r.jsx)("span",{className:"text-caption text-text-tertiary",children:n.length})]}),(0,r.jsx)("p",{className:"text-caption text-text-tertiary",children:t.description}),(0,r.jsxs)("div",{className:"mt-1 flex flex-col gap-2",children:[n.map(e=>(0,r.jsx)(h,{issue:e,onOpen:a},e.id)),0===n.length&&(0,r.jsx)("div",{className:"rounded-md border border-dashed border-border-subtle py-6 text-center text-caption text-text-tertiary",children:"Empty"})]})]})}function h(e){let{issue:t,onOpen:n}=e,a="synced"===t.column,{attributes:s,listeners:c,setNodeRef:l,isDragging:d,transform:u}=(0,o.O1)({id:t.id,disabled:a}),x=u?{transform:"translate3d(".concat(u.x,"px, ").concat(u.y,"px, 0)"),zIndex:30}:{};return(0,r.jsxs)("article",{ref:l,style:x,...a?{}:s,...a?{}:c,onClick:e=>{u||(e.stopPropagation(),n(t.id))},className:"group rounded-md border bg-surface-0 p-3 text-left ".concat(a?"cursor-pointer":"cursor-grab active:cursor-grabbing"," ").concat(d?"border-accent shadow-lg":"border-border-subtle hover:border-border-default"),children:[(0,r.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,r.jsx)("span",{className:"font-mono text-caption text-text-tertiary",children:t.id}),(0,r.jsx)(i,{severity:t.severity})]}),(0,r.jsx)("h3",{title:t.title,className:"mt-1 text-body font-medium text-text-primary line-clamp-3",children:t.title}),(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5 text-caption",children:[(0,r.jsx)(y,{source:t.source}),(0,r.jsx)(v,{issue:t}),t.duplicate_of&&(0,r.jsxs)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-secondary",children:["dup of ",t.duplicate_of]}),"passing"===t.poc_status&&(0,r.jsx)("span",{className:"rounded-md bg-[var(--low)]/15 px-1.5 py-0.5 text-[var(--low)]",children:"PoC ✓"}),"failing"===t.poc_status&&(0,r.jsx)("span",{className:"rounded-md bg-[var(--critical)]/15 px-1.5 py-0.5 text-[var(--critical)]",children:"PoC ✕"}),t.resolution&&(0,r.jsx)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-secondary",children:t.resolution})]}),t.match_signals&&(0,r.jsx)("div",{className:"mt-2 text-caption text-text-tertiary",children:(0,r.jsx)("span",{className:"font-mono",children:[t.match_signals.contract?"contract":null,t.match_signals.function?"function":null,"different"!==t.match_signals.root_cause?"rc:".concat(t.match_signals.root_cause):null,"different"!==t.match_signals.attack_vector?"av:".concat(t.match_signals.attack_vector):null].filter(Boolean).join(" \xb7 ")})})]})}function y(e){var t;let{source:n}=e;return(0,r.jsx)("span",{className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-tertiary",children:null!==(t=({manual:"Manual",auditagent:"AuditAgent",conformance:"Conformance",github:"GitHub"})[n])&&void 0!==t?t:n})}function v(e){var t,n;let{issue:a}=e,o=null!==(t=a.sync_state)&&void 0!==t?t:"none";if("none"===o)return null;if("unsynced"===o)return(0,r.jsx)("span",{title:"Run /sync-issues to push verified findings to GitHub.",className:"rounded-md border border-dashed border-border-default px-1.5 py-0.5 text-text-tertiary",children:"GH unsynced"});if("conflict"===o)return(0,r.jsx)("span",{title:"Local and remote diverged. Re-run /sync-issues to reconcile.",className:"rounded-md bg-[var(--critical)]/15 px-1.5 py-0.5 text-[var(--critical)]",children:"GH conflict"});let s="synced_closed"===o,i="GH #".concat(null!==(n=a.github_issue_number)&&void 0!==n?n:"?"," ").concat(s?"closed":"open"),c=s?"bg-surface-2 text-text-tertiary":"bg-[var(--low)]/15 text-[var(--low)]";return a.github_issue_url?(0,r.jsx)("a",{href:a.github_issue_url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"rounded-md px-1.5 py-0.5 hover:underline ".concat(c),children:i}):(0,r.jsx)("span",{className:"rounded-md px-1.5 py-0.5 ".concat(c),children:i})}function g(e){var t,n,o;let{issue:s,formatCtx:i,onClose:d,onSave:u}=e,[m,f]=(0,a.useState)(s.title),[b,h]=(0,a.useState)(s.severity),[g,N]=(0,a.useState)(s.description),[w,_]=(0,a.useState)(s.recommendation),[C,k]=(0,a.useState)(null!==(t=s.resolution)&&void 0!==t?t:""),[S,H]=(0,a.useState)(null!==(n=s.update_from_client)&&void 0!==n?n:""),[M,G]=(0,a.useState)(!1),[E,I]=(0,a.useState)(!1),[R,P]=(0,a.useState)(!1),T=(0,a.useRef)(null),O="synced"===s.status;(0,a.useEffect)(()=>{var e;null===(e=T.current)||void 0===e||e.focus()},[]);let U=async()=>{let e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return"## [".concat(e.severity,"] ").concat(e.title,"\n\n").concat(l(e,t),"\n\n---\n")}({...s,title:m,severity:b,description:g,recommendation:w,resolution:C||void 0,update_from_client:S||void 0},i);try{await navigator.clipboard.writeText(e),I(!0),setTimeout(()=>I(!1),1500)}catch(e){}},D=async()=>{G(!0),await u({title:m,severity:b,description:g,recommendation:w,resolution:C||void 0,update_from_client:S||void 0}),G(!1),P(!1)};return(0,r.jsx)("div",{ref:T,tabIndex:-1,className:"fixed inset-0 z-50 flex items-center justify-center p-4 outline-none",style:{background:"var(--overlay-bg)"},onClick:d,onKeyDown:e=>{"Escape"===e.key&&d()},children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Issue ".concat(s.id),className:"relative flex h-[85vh] w-full max-w-4xl flex-col overflow-hidden border border-border-emphasis bg-surface-1 shadow-2xl",style:{borderRadius:"var(--radius-md)",boxShadow:"var(--shadow-accent)"},onClick:e=>e.stopPropagation(),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between border-b border-border-default bg-surface-2 px-4 py-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-caption",children:[(0,r.jsx)("span",{className:"font-mono text-body text-text-tertiary",children:s.id}),(0,r.jsx)(y,{source:s.source}),(0,r.jsx)(v,{issue:s})]}),(0,r.jsx)("button",{type:"button",onClick:d,"aria-label":"Close",className:"rounded p-1 text-text-tertiary hover:bg-surface-3 hover:text-text-primary",children:(0,r.jsx)("svg",{className:"h-5 w-5","aria-hidden":"true",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})})]}),(0,r.jsxs)("div",{className:"flex-1 overflow-y-auto p-4",children:[O&&(0,r.jsxs)("div",{className:"mb-4 rounded-md border border-border-default bg-surface-2 px-3 py-2 text-caption text-text-secondary",children:["This issue is synced to GitHub and is read-only here. Edit it on GitHub, then run"," ",(0,r.jsx)("span",{className:"font-mono",children:"/sync-issues"})," to pull the changes back."]}),R?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(j,{label:"Title",children:(0,r.jsx)("input",{type:"text",value:m,onChange:e=>f(e.target.value),disabled:O,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-3",children:[(0,r.jsx)(j,{label:"Severity",children:(0,r.jsx)("select",{value:b,onChange:e=>h(e.target.value),disabled:O,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60",children:x.map(e=>(0,r.jsx)("option",{value:e,children:e},e))})}),(0,r.jsx)(j,{label:"Resolution (verified only)",children:(0,r.jsxs)("select",{value:C,onChange:e=>k(e.target.value),disabled:O,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 text-body text-text-primary focus:border-accent focus:outline-none disabled:opacity-60",children:[(0,r.jsx)("option",{value:"",children:"— none —"}),p.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})})]}),(0,r.jsx)(j,{label:"Description",className:"mt-3",children:(0,r.jsx)("textarea",{value:g,onChange:e=>N(e.target.value),rows:8,disabled:O,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsx)(j,{label:"Recommendation",className:"mt-3",children:(0,r.jsx)("textarea",{value:w,onChange:e=>_(e.target.value),rows:4,disabled:O,className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})}),(0,r.jsx)(j,{label:"Update from the client",className:"mt-3",children:(0,r.jsx)("textarea",{value:S,onChange:e=>H(e.target.value),rows:4,disabled:O,placeholder:"How the client responded — used by /generate-overleaf.",className:"w-full rounded-md border border-border-default bg-surface-0 px-3 py-2 font-mono text-caption text-text-primary focus:border-accent focus:outline-none disabled:opacity-60"})})]}):(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(c.MarkdownRenderer,{content:"**Title**: ".concat(s.title,"\n\n**Severity**: ").concat(s.severity,"\n\n").concat(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return l(e,t)}(s,i))})}),s.code_locations.length>0&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption font-medium text-text-tertiary",children:"Code locations"}),(0,r.jsx)("ul",{className:"space-y-1 font-mono text-caption text-text-secondary",children:s.code_locations.map((e,t)=>(0,r.jsx)("li",{children:e.file},"".concat(e.file,"-").concat(t)))})]}),s.match_signals&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption font-medium text-text-tertiary",children:"Duplicate signals"}),(0,r.jsx)("p",{className:"text-caption text-text-secondary",children:null!==(o=s.reasoning)&&void 0!==o?o:"Matched against another entry."}),(0,r.jsxs)("div",{className:"mt-1 flex flex-wrap gap-1.5 font-mono text-caption text-text-tertiary",children:[(0,r.jsxs)("span",{children:["contract: ",s.match_signals.contract?"✓":"—"]}),(0,r.jsxs)("span",{children:["function: ",s.match_signals.function?"✓":"—"]}),(0,r.jsxs)("span",{children:["root_cause: ",s.match_signals.root_cause]}),(0,r.jsxs)("span",{children:["attack_vector: ",s.match_signals.attack_vector]})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-border-default bg-surface-2 px-4 py-3",children:[(0,r.jsx)("button",{type:"button",onClick:U,className:"rounded-md border border-border-default px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:E?"Copied!":"Copy as HackMD"}),(0,r.jsx)("div",{className:"flex items-center gap-2",children:R?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:()=>P(!1),className:"rounded-md px-3 py-1.5 text-body text-text-secondary hover:text-text-primary",children:"Cancel"}),(0,r.jsx)("button",{type:"button",onClick:D,disabled:M,className:"rounded-md bg-accent px-3 py-1.5 text-body font-medium text-surface-0 hover:bg-accent-secondary disabled:opacity-50",children:M?"Saving…":"Save"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button",onClick:d,className:"rounded-md px-3 py-1.5 text-body text-text-secondary hover:text-text-primary",children:"Close"}),(0,r.jsx)("button",{type:"button",onClick:()=>P(!0),disabled:O,title:O?"Synced to GitHub — edit it there, then run /sync-issues to pull the changes back.":void 0,className:"rounded-md bg-accent px-3 py-1.5 text-body font-medium text-surface-0 hover:bg-accent-secondary disabled:cursor-not-allowed disabled:opacity-40",children:"Edit"})]})})]})]})})}function j(e){let{label:t,className:n,children:a}=e;return(0,r.jsxs)("label",{className:"block ".concat(null!=n?n:""),children:[(0,r.jsx)("span",{className:"mb-1 block text-caption font-medium text-text-tertiary",children:t}),a]})}},9487:function(e,t,n){"use strict";n.d(t,{MarkdownRenderer:function(){return s},T:function(){return i}});var r=n(7821),a=n(8525),o=n(5592);function s(e){let{content:t,className:n}=e;return(0,r.jsx)("div",{className:"prose max-w-none\n prose-headings:text-text-primary\n prose-p:text-text-secondary\n prose-strong:text-text-primary\n prose-code:text-accent\n prose-code:before:content-none\n prose-code:after:content-none\n prose-pre:bg-surface-0\n prose-pre:border\n prose-pre:border-border-default\n prose-a:text-accent\n prose-a:no-underline\n hover:prose-a:underline\n prose-th:text-text-primary\n prose-td:text-text-secondary\n prose-hr:border-border-default\n prose-blockquote:border-border-emphasis\n prose-blockquote:text-text-secondary\n prose-li:text-text-secondary\n ".concat(null!=n?n:""),children:(0,r.jsx)(a.UG,{remarkPlugins:[o.Z],children:t})})}function i(e){let{children:t}=e;return(0,r.jsx)(a.UG,{remarkPlugins:[o.Z],components:{p:e=>{let{children:t}=e;return(0,r.jsx)(r.Fragment,{children:t})},code:e=>{let{children:t}=e;return(0,r.jsx)("code",{className:"rounded bg-surface-0 px-1 py-0.5 font-mono text-[0.85em] text-accent",children:t})},strong:e=>{let{children:t}=e;return(0,r.jsx)("strong",{className:"font-semibold text-text-primary",children:t})},a:e=>{let{href:t,children:n}=e;return(0,r.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",className:"text-accent hover:underline",children:n})}},children:t})}}},function(e){e.O(0,[7397,3924,7115,3205,1744],function(){return e(e.s=4260)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9151],{3152:function(e,t,r){Promise.resolve().then(r.bind(r,2024))},2024:function(e,t,r){"use strict";r.d(t,{NotesClient:function(){return l}});var s=r(7821),n=r(8078),a=r(168),o=r(9487);let i="__other__",c="general";function l(e){var t,r;let{general:o,contractNotes:l,contractOptions:x,activeContract:p,unprocessedCount:m}=e,h=(0,a.useRouter)(),b=(0,n.useMemo)(()=>[{key:c,label:"General"},...l.map(e=>({key:e.contract,label:e.contract}))],[l]),y=p&&b.some(e=>e.key===p)?p:c,[f,j]=(0,n.useState)(y),g=null!==(t=l.find(e=>e.contract===f))&&void 0!==t?t:null,[N,v]=(0,n.useState)("idle"),[k,w]=(0,n.useState)(null!==(r=null!=p?p:x[0])&&void 0!==r?r:i),[C,S]=(0,n.useState)(""),[R,T]=(0,n.useState)(0),[q,_]=(0,n.useState)(null),P=(0,n.useRef)(null),E=(0,n.useRef)([]),M=(0,n.useRef)(null),L=(0,n.useRef)(null),O=(k===i?C:k).trim(),B=(0,n.useCallback)(async()=>{v("transcribing"),_("Transcribing locally…");try{let t=new Blob(E.current,{type:"audio/webm"}),r=new FormData;r.append("audio",t,"narration.webm"),r.append("contract",O||"general");let s=await fetch("/api/notes/record",{method:"POST",body:r}),n=await s.json().catch(()=>({}));if(422===s.status&&n.whisperMissing)_("Audio saved (".concat(n.audioSaved,") but no local Whisper engine is installed. ").concat(n.error));else if(s.ok)_("Session saved for ".concat(n.contract,". Run /diane in Claude Code to process it.")),h.refresh();else{var e;_(null!==(e=n.error)&&void 0!==e?e:"Recording failed")}}catch(e){_(e instanceof Error?e.message:"Recording failed")}finally{v("idle")}},[O,h]),G=(0,n.useCallback)(async()=>{_(null);try{let e=await navigator.mediaDevices.getUserMedia({audio:!0});M.current=e,E.current=[];let t=new MediaRecorder(e);t.ondataavailable=e=>{e.data.size>0&&E.current.push(e.data)},t.onstop=()=>{var e;null===(e=M.current)||void 0===e||e.getTracks().forEach(e=>e.stop()),L.current&&clearInterval(L.current),B()},P.current=t,t.start(),T(0),L.current=setInterval(()=>T(e=>e+1),1e3),v("recording")}catch(e){_("Could not access the microphone. Grant permission and try again.")}},[B]),I=(0,n.useCallback)(()=>{var e;null===(e=P.current)||void 0===e||e.stop()},[]),D="idle"===N&&O.length>0;return(0,s.jsxs)("div",{className:"space-y-sp-5",children:[(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-1 p-4",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,s.jsx)("span",{className:"text-heading font-medium text-text-primary",children:"Record narration"}),(0,s.jsxs)("select",{value:k,onChange:e=>w(e.target.value),disabled:"idle"!==N,className:"rounded-md border border-border-default bg-surface-2 px-3 py-1.5 text-body text-text-primary focus:outline-none focus:ring-2 focus:ring-accent disabled:opacity-50",children:[x.map(e=>(0,s.jsx)("option",{value:e,children:e},e)),(0,s.jsx)("option",{value:i,children:"Other…"})]}),k===i&&(0,s.jsx)("input",{type:"text",placeholder:"Contract name",value:C,onChange:e=>S(e.target.value),disabled:"idle"!==N,className:"rounded-md border border-border-default bg-surface-2 px-3 py-1.5 text-body text-text-primary focus:outline-none focus:ring-2 focus:ring-accent disabled:opacity-50"}),"recording"===N?(0,s.jsxs)("button",{type:"button",onClick:I,className:"flex items-center gap-2 rounded-md bg-severity-critical px-3 py-1.5 text-body font-medium text-surface-0",children:[(0,s.jsx)("span",{className:"h-2.5 w-2.5 rounded-sm bg-surface-0"}),"Stop \xb7 ","".concat(Math.floor(R/60),":").concat(String(R%60).padStart(2,"0"))]}):(0,s.jsxs)("button",{type:"button",onClick:G,disabled:!D,className:"flex items-center gap-2 rounded-md bg-accent px-3 py-1.5 text-body font-medium text-surface-0 transition-opacity duration-200 hover:opacity-90 disabled:opacity-40",children:[(0,s.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-surface-0"}),"transcribing"===N?"Transcribing…":"Record"]})]}),q&&(0,s.jsx)("p",{className:"mt-3 text-caption text-text-secondary",children:q}),m>0&&(0,s.jsxs)("p",{className:"mt-2 text-caption text-accent",children:[m," narration session",m>1?"s":""," waiting — run"," ",(0,s.jsx)("code",{className:"font-mono",children:"/diane"})," in Claude Code to process."]})]}),(0,s.jsxs)("div",{className:"flex gap-sp-5",children:[(0,s.jsx)("nav",{className:"w-44 shrink-0 space-y-0.5",children:b.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>j(e.key),className:"block w-full truncate rounded-md px-3 py-1.5 text-left text-body transition-colors duration-200 ".concat(e.key===f?"bg-accent-subtle font-medium text-accent":"text-text-secondary hover:bg-surface-2 hover:text-text-primary"),children:e.label},e.key))}),(0,s.jsx)("div",{className:"min-w-0 flex-1",children:f===c?(0,s.jsx)(d,{body:o}):(0,s.jsx)(u,{note:g,contract:f,onMutate:()=>h.refresh()})})]})]})}function d(e){let{body:t}=e;return(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-1 p-5",children:[(0,s.jsx)("div",{className:"mb-3 text-heading font-medium text-text-primary",children:"General"}),t.trim()?(0,s.jsx)(o.MarkdownRenderer,{content:t}):(0,s.jsxs)("p",{className:"text-body text-text-tertiary",children:["No protocol-wide notes yet. Record a narration above against"," ",(0,s.jsx)("span",{className:"font-medium",children:"Other…"})," as ",(0,s.jsx)("code",{className:"font-mono",children:"general"})," and run ",(0,s.jsx)("code",{className:"font-mono",children:"/diane"}),"."]})]})}let x=[{id:"leads",label:"Leads"},{id:"description",label:"Description"},{id:"questions",label:"Questions"}];function u(e){let{note:t,contract:r,onMutate:a}=e,[o,i]=(0,n.useState)(!1),c=(0,n.useCallback)(async(e,t)=>{i(!0);try{var r;let s=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok)throw Error(null!==(r=(await s.json().catch(()=>({}))).error)&&void 0!==r?r:"request failed");a()}catch(e){}finally{i(!1)}},[a]),l=!t||0===t.leads.length&&0===t.questions.length&&0===t.description.purpose.length&&0===t.description.inheritance.length&&0===t.description.storage.length&&0===t.description.roles.length&&0===t.description.functions.length;return(0,s.jsxs)("div",{className:"rounded-lg border border-border-subtle bg-surface-1 p-5",children:[(0,s.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("span",{className:"text-heading font-medium text-text-primary",children:r}),(null==t?void 0:t.file)&&(0,s.jsx)("span",{className:"font-mono text-caption text-text-tertiary",children:t.file})]}),(0,s.jsxs)("label",{className:"flex cursor-pointer items-center gap-2 text-caption text-text-secondary",children:[(0,s.jsx)("input",{type:"checkbox",checked:!!(null==t?void 0:t.marked_done),disabled:o||!t,onChange:e=>c("/api/notes/done",{contract:r,done:e.target.checked}),className:"h-4 w-4 rounded border-border-emphasis bg-surface-1 accent-[var(--accent)]"}),"Mark done reading"]})]}),l?(0,s.jsxs)("p",{className:"text-body text-text-tertiary",children:["No notes yet — record a narration above and run ",(0,s.jsx)("code",{className:"font-mono",children:"/diane"}),"."]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("nav",{className:"mb-5 flex flex-wrap items-center gap-1 border-b border-border-subtle pb-3 text-caption",children:x.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>{var t,r;return t=e.id,void(null===(r=document.getElementById("note-".concat(t)))||void 0===r||r.scrollIntoView({behavior:"smooth",block:"start"}))},className:"rounded-md px-2 py-1 text-text-secondary transition-colors duration-200 hover:bg-surface-2 hover:text-text-primary",children:e.label},e.id))}),(0,s.jsxs)("div",{className:"space-y-6",children:[(0,s.jsx)(p,{leads:t.leads,contract:r,busy:o,post:c}),(0,s.jsx)(h,{note:t}),(0,s.jsx)(y,{questions:t.questions,contract:r,busy:o,post:c})]})]})]})}function p(e){let{leads:t,contract:r,busy:a,post:i}=e,c=t.filter(e=>"open"===e.status),l=t.filter(e=>"open"!==e.status),[d,x]=(0,n.useState)(!1);return(0,s.jsxs)("section",{id:"note-leads",children:[(0,s.jsx)("h3",{className:"mb-2 text-heading font-medium text-text-primary",children:"Leads"}),0===c.length?(0,s.jsx)("p",{className:"text-body text-text-tertiary",children:"No open leads."}):(0,s.jsx)("ul",{className:"space-y-2",children:c.map(e=>(0,s.jsxs)("li",{className:"flex items-start justify-between gap-3 rounded-md border border-border-subtle bg-surface-2 px-3 py-2",children:[(0,s.jsx)("span",{className:"min-w-0 flex-1 text-body text-text-primary",children:(0,s.jsx)(o.T,{children:e.text})}),(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>i("/api/notes/lead",{contract:r,id:e.id,action:"close",status:"dismissed"}),className:"shrink-0 rounded-md border border-border-default px-2.5 py-1 text-caption text-text-secondary transition-colors duration-200 hover:bg-surface-3 hover:text-text-primary disabled:opacity-50",children:"Close"})]},e.id))}),l.length>0&&(0,s.jsxs)("div",{className:"mt-3",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>x(e=>!e),className:"flex items-center gap-1.5 text-caption text-text-tertiary transition-colors duration-200 hover:text-text-secondary",children:[(0,s.jsx)("svg",{className:"h-3.5 w-3.5 transition-transform duration-200 ".concat(d?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 5 7 7-7 7"})}),"Closed (",l.length,")"]}),d&&(0,s.jsx)("ul",{className:"mt-2 space-y-1.5",children:l.map(e=>(0,s.jsxs)("li",{className:"flex items-start justify-between gap-3 rounded-md px-3 py-1.5",children:[(0,s.jsxs)("span",{className:"min-w-0 flex-1 text-caption text-text-tertiary",children:[(0,s.jsx)("span",{className:"line-through",children:(0,s.jsx)(o.T,{children:e.text})}),"logged"===e.status&&e.ref&&(0,s.jsxs)("span",{className:"ml-2 font-mono text-text-secondary",children:["→ ",e.ref]}),"dismissed"===e.status&&(0,s.jsx)("span",{className:"ml-2 text-text-tertiary",children:"dismissed"})]}),(0,s.jsx)("button",{type:"button",disabled:a,onClick:()=>i("/api/notes/lead",{contract:r,id:e.id,action:"reopen"}),className:"shrink-0 rounded-md px-2 py-0.5 text-caption text-text-secondary transition-colors duration-200 hover:text-accent disabled:opacity-50",children:"Reopen"})]},e.id))})]})]})}function m(e){let{label:t,items:r}=e;return 0===r.length?null:(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"mb-1 text-body font-medium text-text-secondary",children:t}),(0,s.jsx)("ul",{className:"list-disc space-y-0.5 pl-5 text-body text-text-primary",children:r.map((e,t)=>(0,s.jsx)("li",{children:(0,s.jsx)(o.T,{children:e})},t))})]})}function h(e){let{note:t}=e,{purpose:r,inheritance:n,storage:a,roles:o,functions:i}=t.description,c=r.length>0||n.length>0||a.length>0||o.length>0||i.length>0;return(0,s.jsxs)("section",{id:"note-description",children:[(0,s.jsx)("h3",{className:"mb-3 text-heading font-medium text-text-primary",children:"Description"}),c?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(m,{label:"Purpose",items:r}),(0,s.jsx)(m,{label:"Inheritance",items:n}),(0,s.jsx)(m,{label:"Storage",items:a}),(0,s.jsx)(m,{label:"Roles & modifiers",items:o}),i.length>0&&(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"mb-1.5 text-body font-medium text-text-secondary",children:"Functions"}),(0,s.jsx)("div",{className:"space-y-1.5",children:i.map(e=>(0,s.jsx)(b,{fn:e},e.id))})]})]}):(0,s.jsx)("p",{className:"text-body text-text-tertiary",children:"No description recorded yet."})]})}function b(e){let{fn:t}=e,[r,a]=(0,n.useState)(!1),i=[["Purpose",t.purpose],["Access",t.access],["Effects",t.effects]];return(0,s.jsxs)("div",{className:"rounded-md border border-border-subtle",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>a(e=>!e),className:"flex w-full items-center gap-2 rounded-md bg-surface-2 px-3 py-2 text-left transition-colors duration-200 hover:bg-surface-3",children:[(0,s.jsx)("svg",{className:"h-4 w-4 shrink-0 text-text-tertiary transition-transform duration-200 ".concat(r?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 5 7 7-7 7"})}),(0,s.jsx)("span",{className:"min-w-0 truncate font-mono text-body text-text-primary",children:t.sig}),t.warnings.length>0&&(0,s.jsxs)("span",{className:"ml-auto shrink-0 text-caption text-[var(--high)]",children:["⚠ ",t.warnings.length]})]}),r&&(0,s.jsxs)("div",{className:"space-y-2 px-3 py-2.5",children:[i.filter(e=>{let[,t]=e;return t&&t.trim()}).map(e=>{let[t,r]=e;return(0,s.jsxs)("p",{className:"text-body text-text-primary",children:[(0,s.jsxs)("span",{className:"text-text-secondary",children:[t,": "]}),(0,s.jsx)(o.T,{children:r})]},t)}),t.notes.length>0&&(0,s.jsx)("ul",{className:"list-disc space-y-0.5 pl-5 text-body text-text-primary",children:t.notes.map((e,t)=>(0,s.jsx)("li",{children:(0,s.jsx)(o.T,{children:e})},t))}),t.warnings.length>0&&(0,s.jsx)("ul",{className:"space-y-1",children:t.warnings.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-start gap-1.5 rounded-md bg-[var(--high)]/10 px-2 py-1 text-body text-[var(--high)]",children:[(0,s.jsx)("span",{"aria-hidden":!0,children:"⚠"}),(0,s.jsx)("span",{className:"min-w-0 flex-1",children:(0,s.jsx)(o.T,{children:e})})]},t))})]})]})}function y(e){let{questions:t,contract:r,busy:n,post:a}=e;return(0,s.jsxs)("section",{id:"note-questions",children:[(0,s.jsx)("h3",{className:"mb-2 text-heading font-medium text-text-primary",children:"Questions"}),0===t.length?(0,s.jsx)("p",{className:"text-body text-text-tertiary",children:"No questions recorded yet."}):(0,s.jsx)("div",{className:"space-y-1.5",children:t.map(e=>(0,s.jsx)(f,{question:e,contract:r,busy:n,post:a},e.id))})]})}function f(e){var t;let{question:r,contract:a,busy:i,post:c}=e,l=!!(r.answer&&r.answer.trim()),[d,x]=(0,n.useState)(!1),[u,p]=(0,n.useState)(!1),[m,h]=(0,n.useState)(null!==(t=r.answer)&&void 0!==t?t:"");return(0,s.jsxs)("div",{className:"rounded-md border border-border-subtle",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>x(e=>!e),className:"flex w-full items-center gap-2 rounded-md bg-surface-2 px-3 py-2 text-left transition-colors duration-200 hover:bg-surface-3",children:[(0,s.jsx)("svg",{className:"h-4 w-4 shrink-0 text-text-tertiary transition-transform duration-200 ".concat(d?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,s.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 5 7 7-7 7"})}),(0,s.jsx)("span",{className:"min-w-0 flex-1 text-body ".concat(l?"text-text-primary":"text-text-tertiary"),children:(0,s.jsx)(o.T,{children:r.q})}),!l&&(0,s.jsx)("span",{className:"shrink-0 text-caption text-text-tertiary",children:"open"})]}),d&&(0,s.jsx)("div",{className:"space-y-2 px-3 py-2.5",children:u?(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("textarea",{value:m,onChange:e=>h(e.target.value),rows:3,className:"w-full resize-y rounded-md border border-border-default bg-surface-0 p-2 text-body text-text-primary focus:outline-none focus:ring-2 focus:ring-accent"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[(0,s.jsx)("button",{type:"button",onClick:()=>{var e;p(!1),h(null!==(e=r.answer)&&void 0!==e?e:"")},className:"rounded-md px-2.5 py-1 text-caption text-text-secondary transition-colors duration-200 hover:text-text-primary",children:"Cancel"}),(0,s.jsx)("button",{type:"button",disabled:i||!m.trim(),onClick:async()=>{await c("/api/notes/question",{contract:a,id:r.id,answer:m.trim()}),p(!1)},className:"rounded-md bg-accent px-2.5 py-1 text-caption font-medium text-surface-0 transition-opacity duration-200 hover:opacity-90 disabled:opacity-50",children:"Save answer"})]})]}):(0,s.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,s.jsx)("p",{className:"min-w-0 flex-1 text-body ".concat(l?"text-text-primary":"text-text-tertiary"),children:l?(0,s.jsx)(o.T,{children:r.answer}):"— open"}),(0,s.jsx)("button",{type:"button",onClick:()=>p(!0),className:"shrink-0 rounded-md border border-border-default px-2.5 py-1 text-caption text-text-secondary transition-colors duration-200 hover:bg-surface-3 hover:text-text-primary",children:l?"Edit":"Answer"})]})})]})}},9487:function(e,t,r){"use strict";r.d(t,{MarkdownRenderer:function(){return o},T:function(){return i}});var s=r(7821),n=r(8525),a=r(5592);function o(e){let{content:t,className:r}=e;return(0,s.jsx)("div",{className:"prose max-w-none\n prose-headings:text-text-primary\n prose-p:text-text-secondary\n prose-strong:text-text-primary\n prose-code:text-accent\n prose-code:before:content-none\n prose-code:after:content-none\n prose-pre:bg-surface-0\n prose-pre:border\n prose-pre:border-border-default\n prose-a:text-accent\n prose-a:no-underline\n hover:prose-a:underline\n prose-th:text-text-primary\n prose-td:text-text-secondary\n prose-hr:border-border-default\n prose-blockquote:border-border-emphasis\n prose-blockquote:text-text-secondary\n prose-li:text-text-secondary\n ".concat(null!=r?r:""),children:(0,s.jsx)(n.UG,{remarkPlugins:[a.Z],children:t})})}function i(e){let{children:t}=e;return(0,s.jsx)(n.UG,{remarkPlugins:[a.Z],components:{p:e=>{let{children:t}=e;return(0,s.jsx)(s.Fragment,{children:t})},code:e=>{let{children:t}=e;return(0,s.jsx)("code",{className:"rounded bg-surface-0 px-1 py-0.5 font-mono text-[0.85em] text-accent",children:t})},strong:e=>{let{children:t}=e;return(0,s.jsx)("strong",{className:"font-semibold text-text-primary",children:t})},a:e=>{let{href:t,children:r}=e;return(0,s.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",className:"text-accent hover:underline",children:r})}},children:t})}},168:function(e,t,r){"use strict";var s=r(7462);r.o(s,"usePathname")&&r.d(t,{usePathname:function(){return s.usePathname}}),r.o(s,"useRouter")&&r.d(t,{useRouter:function(){return s.useRouter}})}},function(e){e.O(0,[7397,7115,3205,1744],function(){return e(e.s=3152)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1931],{9778:function(e,r,n){Promise.resolve().then(n.bind(n,9487)),Promise.resolve().then(n.t.bind(n,7498,23))},9487:function(e,r,n){"use strict";n.d(r,{MarkdownRenderer:function(){return c},T:function(){return a}});var t=n(7821),o=n(8525),s=n(5592);function c(e){let{content:r,className:n}=e;return(0,t.jsx)("div",{className:"prose max-w-none\n prose-headings:text-text-primary\n prose-p:text-text-secondary\n prose-strong:text-text-primary\n prose-code:text-accent\n prose-code:before:content-none\n prose-code:after:content-none\n prose-pre:bg-surface-0\n prose-pre:border\n prose-pre:border-border-default\n prose-a:text-accent\n prose-a:no-underline\n hover:prose-a:underline\n prose-th:text-text-primary\n prose-td:text-text-secondary\n prose-hr:border-border-default\n prose-blockquote:border-border-emphasis\n prose-blockquote:text-text-secondary\n prose-li:text-text-secondary\n ".concat(null!=n?n:""),children:(0,t.jsx)(o.UG,{remarkPlugins:[s.Z],children:r})})}function a(e){let{children:r}=e;return(0,t.jsx)(o.UG,{remarkPlugins:[s.Z],components:{p:e=>{let{children:r}=e;return(0,t.jsx)(t.Fragment,{children:r})},code:e=>{let{children:r}=e;return(0,t.jsx)("code",{className:"rounded bg-surface-0 px-1 py-0.5 font-mono text-[0.85em] text-accent",children:r})},strong:e=>{let{children:r}=e;return(0,t.jsx)("strong",{className:"font-semibold text-text-primary",children:r})},a:e=>{let{href:r,children:n}=e;return(0,t.jsx)("a",{href:r,target:"_blank",rel:"noreferrer",className:"text-accent hover:underline",children:n})}},children:r})}}},function(e){e.O(0,[7397,7498,7115,3205,1744],function(){return e(e.s=9778)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7092],{5534:function(e,t,s){Promise.resolve().then(s.bind(s,7701))},7701:function(e,t,s){"use strict";s.d(t,{ProgressClient:function(){return x}});var a=s(7821),r=s(8078);function i(e){return"".concat(e.file,"::").concat(e.contract)}function n(e){return e>=67?"text-[var(--success)]":e>=34?"text-[var(--medium)]":"text-[var(--critical)]"}let l={contract:0,abstract:1,library:2,interface:3},c={contract:"bg-[var(--low)]/15 text-[var(--low)]",interface:"bg-[var(--info)]/15 text-[var(--info)]",library:"bg-[var(--info)]/15 text-[var(--info)]",abstract:"bg-[var(--high)]/15 text-[var(--high)]"},d=["Critical","High","Medium","Low","Info","Gas"],o={Critical:"bg-[var(--critical)]/15 text-[var(--critical)]",High:"bg-[var(--high)]/15 text-[var(--high)]",Medium:"bg-[var(--medium)]/15 text-[var(--medium)]",Low:"bg-[var(--low)]/15 text-[var(--low)]",Info:"bg-[var(--info)]/15 text-[var(--info)]",Gas:"bg-surface-3 text-text-secondary"};function x(e){let{contracts:t,totalsNsloc:s,reviewedContracts:x,dianeReviewed:p,auditSteps:m,findingsTotal:u,findingsBySeverity:h,findingsTracked:v}=e,[f,b]=(0,r.useState)(x),[g,j]=(0,r.useState)("all"),y=e=>!!f[e]||!!p[e],N=(0,r.useMemo)(()=>t.filter(e=>y(i(e))).reduce((e,t)=>e+t.nsloc,0),[t,f,p]),w=(0,r.useMemo)(()=>t.filter(e=>y(i(e))).length,[t,f,p]),C=s>0?N/s*100:0,k=m.filter(e=>e.completed).length/m.length*100,M=u>0?v/u*100:100,O=.7*C+.2*k+.1*M,S=(0,r.useMemo)(()=>{let e=[...t].sort((e,t)=>{var s,a;let r=null!==(s=l[e.type])&&void 0!==s?s:99,i=null!==(a=l[t.type])&&void 0!==a?a:99;return r!==i?r-i:t.nsloc-e.nsloc});return"all"===g?e:e.filter(e=>{let t=y(i(e));return"checked"===g?t:!t})},[t,g,f,p]),L=(0,r.useMemo)(()=>Math.max(...t.map(e=>e.nsloc),1),[t]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-sp-5 rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,a.jsxs)("div",{className:"mb-2 flex items-baseline justify-between gap-sp-2",children:[(0,a.jsxs)("span",{className:"text-display font-semibold ".concat(n(O)),children:[O.toFixed(0),"%"]}),(0,a.jsxs)("span",{className:"text-caption text-text-tertiary inline-flex items-center gap-1.5",title:"Overall progress is a weighted average: 70% nSLOC reviewed (contract review), 20% audit-step completion, 10% findings triage.","aria-label":"Overall progress formula: 70% contract review by nSLOC, 20% step completion, 10% findings triage",children:["Contract Review ",C.toFixed(0),"% \xb7 Steps ",k.toFixed(0),"% \xb7 Triage ",M.toFixed(0),"%",(0,a.jsx)("svg",{className:"h-3.5 w-3.5 text-text-tertiary","aria-hidden":"true",viewBox:"0 0 16 16",fill:"currentColor",children:(0,a.jsx)("path",{d:"M8 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13zM7.25 7.25a.75.75 0 0 1 1.5 0v3.5a.75.75 0 0 1-1.5 0v-3.5zM8 4.5a.875.875 0 1 1 0 1.75A.875.875 0 0 1 8 4.5z"})})]})]}),(0,a.jsx)("div",{className:"h-3 w-full overflow-hidden rounded-full bg-surface-3",children:(0,a.jsx)("div",{className:"h-full rounded-full transition-all duration-300 ".concat(O>=67?"bg-[var(--success)]":O>=34?"bg-[var(--medium)]":"bg-[var(--critical)]"),style:{width:"".concat(Math.min(O,100),"%")},role:"progressbar","aria-valuenow":Math.round(O),"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Overall audit progress"})}),(0,a.jsx)("p",{className:"mt-2 text-caption text-text-tertiary",children:"Weighted: 70% nSLOC reviewed \xb7 20% audit steps \xb7 10% findings triage. Hover the breakdown for details."})]}),(0,a.jsxs)("div",{className:"mb-sp-5 grid grid-cols-2 gap-sp-3 lg:grid-cols-4",children:[(0,a.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,a.jsxs)("div",{className:"text-display ".concat(n(O)),children:[O.toFixed(0),"%"]}),(0,a.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:"Overall Progress"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,a.jsxs)("div",{className:"text-display text-text-primary",children:[w," / ",t.length]}),(0,a.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:"Contracts Reviewed"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,a.jsxs)("div",{className:"text-display text-text-primary",children:[N.toLocaleString()," / ",s.toLocaleString()]}),(0,a.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:"nSLOC Reviewed"})]}),(0,a.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,a.jsx)("div",{className:"text-display text-text-primary",children:u}),(0,a.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:"Findings"}),Object.keys(h).length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:d.filter(e=>h[e]).map(e=>{var t;return(0,a.jsxs)("span",{className:"inline-flex items-center rounded-md px-2 py-0.5 text-caption font-medium ".concat(null!==(t=o[e])&&void 0!==t?t:"bg-surface-3 text-text-secondary"),children:[h[e]," ",e]},e)})})]})]}),(0,a.jsxs)("div",{className:"mb-sp-5",children:[(0,a.jsx)("h3",{className:"mb-sp-2 text-heading font-medium text-text-primary",children:"Audit Steps"}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2",children:m.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center gap-1.5 rounded-full px-3 py-1 text-caption font-medium ".concat(e.completed?"bg-[var(--success)]/15 text-[var(--success)]":"bg-surface-3 text-text-tertiary"),children:[e.completed?(0,a.jsx)("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",clipRule:"evenodd"})}):(0,a.jsx)("svg",{className:"h-3.5 w-3.5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,a.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm.75-11.25a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z",clipRule:"evenodd"})}),e.label]},e.label))})]}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"mb-sp-2 flex items-center justify-between",children:[(0,a.jsx)("h3",{className:"text-heading font-medium text-text-primary",children:"Contract Checklist"}),(0,a.jsx)("div",{className:"inline-flex rounded-md bg-surface-3 p-0.5",children:["all","unchecked","checked"].map(e=>(0,a.jsx)("button",{type:"button",onClick:()=>j(e),className:"rounded-sm px-2.5 py-1 text-caption font-medium ".concat(g===e?"bg-surface-2 text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"),children:"all"===e?"All (".concat(t.length,")"):"checked"===e?"Reviewed (".concat(w,")"):"Remaining (".concat(t.length-w,")")},e))})]}),(0,a.jsx)("div",{className:"overflow-x-auto rounded-md border border-border-default",children:(0,a.jsxs)("table",{className:"w-full text-left text-body",children:[(0,a.jsx)("thead",{className:"border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary",children:(0,a.jsxs)("tr",{children:[(0,a.jsx)("th",{className:"w-10 px-sp-3 py-sp-2"}),(0,a.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Contract"}),(0,a.jsx)("th",{className:"px-sp-4 py-sp-2",children:"File"}),(0,a.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Type"}),(0,a.jsx)("th",{className:"px-sp-4 py-sp-2 text-right",children:"nSLOC"}),(0,a.jsx)("th",{className:"w-32 px-sp-4 py-sp-2",children:"Weight"})]})}),(0,a.jsx)("tbody",{className:"divide-y divide-border-subtle",children:S.map(e=>{var t;let s=i(e),r=!!f[s],n=!!p[s],l=r||n,d=n&&!r,o=e.nsloc/L*100;return(0,a.jsxs)("tr",{className:"h-9 transition-colors ".concat(l?"bg-[var(--success)]/5":"bg-surface-1"," hover:bg-surface-3"),children:[(0,a.jsx)("td",{className:"px-sp-3 py-sp-2",children:(0,a.jsx)("button",{type:"button",onClick:()=>(function(e){let t=i(e),s=!f[t];b(e=>({...e,[t]:s})),fetch("/api/progress",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({reviewed_contracts:{[t]:s}})}).catch(()=>{})})(e),className:"flex h-5 w-5 items-center justify-center rounded border transition-colors ".concat(l?"border-[var(--accent)] bg-[var(--accent)] text-surface-0":"border-border-emphasis bg-surface-1 hover:border-[var(--accent)]"),children:l&&(0,a.jsx)("svg",{className:"h-3 w-3",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:2,children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M2.5 6l2.5 2.5 4.5-5"})})})}),(0,a.jsx)("td",{className:"px-sp-4 py-sp-2 font-medium text-text-primary",children:(0,a.jsxs)("span",{className:"inline-flex items-center gap-2",children:[e.contract,d&&(0,a.jsx)("span",{className:"inline-flex items-center rounded-md bg-accent-subtle px-1.5 py-0.5 text-caption font-medium text-accent",title:"Auto-reviewed from Diane notes: done + no open leads + no unanswered questions",children:"auto"})]})}),(0,a.jsx)("td",{className:"max-w-[200px] truncate px-sp-4 py-sp-2 font-mono text-caption text-text-tertiary",children:e.file}),(0,a.jsx)("td",{className:"px-sp-4 py-sp-2",children:(0,a.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(null!==(t=c[e.type])&&void 0!==t?t:"bg-surface-3 text-text-secondary"),children:e.type})}),(0,a.jsx)("td",{className:"px-sp-4 py-sp-2 text-right font-mono tabular-nums text-text-secondary",children:e.nsloc}),(0,a.jsx)("td",{className:"px-sp-4 py-sp-2",children:(0,a.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-surface-3",children:(0,a.jsx)("div",{className:"h-full rounded-full bg-[var(--accent)]",style:{width:"".concat(o,"%")}})})})]},s)})})]})})]})]})}}},function(e){e.O(0,[7115,3205,1744],function(){return e(e.s=5534)}),_N_E=e.O()}]);