hex-audit 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (486) hide show
  1. package/CLAUDE.md +105 -0
  2. package/DEMO.md +141 -0
  3. package/README.md +378 -0
  4. package/dashboard/.next/BUILD_ID +1 -0
  5. package/dashboard/.next/app-build-manifest.json +99 -0
  6. package/dashboard/.next/app-path-routes-manifest.json +1 -0
  7. package/dashboard/.next/build-manifest.json +32 -0
  8. package/dashboard/.next/cache/.tsbuildinfo +1 -0
  9. package/dashboard/.next/cache/webpack/client-production/0.pack +0 -0
  10. package/dashboard/.next/cache/webpack/client-production/index.pack +0 -0
  11. package/dashboard/.next/cache/webpack/edge-server-production/0.pack +0 -0
  12. package/dashboard/.next/cache/webpack/edge-server-production/index.pack +0 -0
  13. package/dashboard/.next/cache/webpack/server-production/0.pack +0 -0
  14. package/dashboard/.next/cache/webpack/server-production/1.pack +0 -0
  15. package/dashboard/.next/cache/webpack/server-production/2.pack +0 -0
  16. package/dashboard/.next/cache/webpack/server-production/index.pack +0 -0
  17. package/dashboard/.next/cache/webpack/server-production/index.pack.old +0 -0
  18. package/dashboard/.next/export-marker.json +1 -0
  19. package/dashboard/.next/images-manifest.json +1 -0
  20. package/dashboard/.next/next-minimal-server.js.nft.json +1 -0
  21. package/dashboard/.next/next-server.js.nft.json +1 -0
  22. package/dashboard/.next/package.json +1 -0
  23. package/dashboard/.next/prerender-manifest.js +1 -0
  24. package/dashboard/.next/prerender-manifest.json +1 -0
  25. package/dashboard/.next/react-loadable-manifest.json +300 -0
  26. package/dashboard/.next/required-server-files.json +1 -0
  27. package/dashboard/.next/routes-manifest.json +1 -0
  28. package/dashboard/.next/server/app/_not-found/page.js +1 -0
  29. package/dashboard/.next/server/app/_not-found/page.js.nft.json +1 -0
  30. package/dashboard/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  31. package/dashboard/.next/server/app/_not-found.html +1 -0
  32. package/dashboard/.next/server/app/_not-found.meta +6 -0
  33. package/dashboard/.next/server/app/_not-found.rsc +12 -0
  34. package/dashboard/.next/server/app/access/page.js +1 -0
  35. package/dashboard/.next/server/app/access/page.js.nft.json +1 -0
  36. package/dashboard/.next/server/app/access/page_client-reference-manifest.js +1 -0
  37. package/dashboard/.next/server/app/access.html +1 -0
  38. package/dashboard/.next/server/app/access.meta +5 -0
  39. package/dashboard/.next/server/app/access.rsc +8 -0
  40. package/dashboard/.next/server/app/api/code/route.js +1 -0
  41. package/dashboard/.next/server/app/api/code/route.js.nft.json +1 -0
  42. package/dashboard/.next/server/app/api/flows/route.js +1 -0
  43. package/dashboard/.next/server/app/api/flows/route.js.nft.json +1 -0
  44. package/dashboard/.next/server/app/api/flows.body +1 -0
  45. package/dashboard/.next/server/app/api/flows.meta +1 -0
  46. package/dashboard/.next/server/app/api/github-status/route.js +1 -0
  47. package/dashboard/.next/server/app/api/github-status/route.js.nft.json +1 -0
  48. package/dashboard/.next/server/app/api/issues/[id]/move/route.js +1 -0
  49. package/dashboard/.next/server/app/api/issues/[id]/move/route.js.nft.json +1 -0
  50. package/dashboard/.next/server/app/api/issues/[id]/route.js +1 -0
  51. package/dashboard/.next/server/app/api/issues/[id]/route.js.nft.json +1 -0
  52. package/dashboard/.next/server/app/api/mermaid/route.js +1 -0
  53. package/dashboard/.next/server/app/api/mermaid/route.js.nft.json +1 -0
  54. package/dashboard/.next/server/app/api/progress/route.js +1 -0
  55. package/dashboard/.next/server/app/api/progress/route.js.nft.json +1 -0
  56. package/dashboard/.next/server/app/api/watch/route.js +3 -0
  57. package/dashboard/.next/server/app/api/watch/route.js.nft.json +1 -0
  58. package/dashboard/.next/server/app/calls/page.js +1 -0
  59. package/dashboard/.next/server/app/calls/page.js.nft.json +1 -0
  60. package/dashboard/.next/server/app/calls/page_client-reference-manifest.js +1 -0
  61. package/dashboard/.next/server/app/calls.html +1 -0
  62. package/dashboard/.next/server/app/calls.meta +5 -0
  63. package/dashboard/.next/server/app/calls.rsc +8 -0
  64. package/dashboard/.next/server/app/conformance/page.js +1 -0
  65. package/dashboard/.next/server/app/conformance/page.js.nft.json +1 -0
  66. package/dashboard/.next/server/app/conformance/page_client-reference-manifest.js +1 -0
  67. package/dashboard/.next/server/app/conformance.html +1 -0
  68. package/dashboard/.next/server/app/conformance.meta +5 -0
  69. package/dashboard/.next/server/app/conformance.rsc +8 -0
  70. package/dashboard/.next/server/app/diagram/page.js +1 -0
  71. package/dashboard/.next/server/app/diagram/page.js.nft.json +1 -0
  72. package/dashboard/.next/server/app/diagram/page_client-reference-manifest.js +1 -0
  73. package/dashboard/.next/server/app/diagram.html +1 -0
  74. package/dashboard/.next/server/app/diagram.meta +5 -0
  75. package/dashboard/.next/server/app/diagram.rsc +10 -0
  76. package/dashboard/.next/server/app/flows/page.js +1 -0
  77. package/dashboard/.next/server/app/flows/page.js.nft.json +1 -0
  78. package/dashboard/.next/server/app/flows/page_client-reference-manifest.js +1 -0
  79. package/dashboard/.next/server/app/flows.html +1 -0
  80. package/dashboard/.next/server/app/flows.meta +5 -0
  81. package/dashboard/.next/server/app/flows.rsc +10 -0
  82. package/dashboard/.next/server/app/functions/page.js +1 -0
  83. package/dashboard/.next/server/app/functions/page.js.nft.json +1 -0
  84. package/dashboard/.next/server/app/functions/page_client-reference-manifest.js +1 -0
  85. package/dashboard/.next/server/app/functions.html +1 -0
  86. package/dashboard/.next/server/app/functions.meta +5 -0
  87. package/dashboard/.next/server/app/functions.rsc +8 -0
  88. package/dashboard/.next/server/app/icon.svg/route.js +12 -0
  89. package/dashboard/.next/server/app/icon.svg/route.js.nft.json +1 -0
  90. package/dashboard/.next/server/app/icon.svg.body +18 -0
  91. package/dashboard/.next/server/app/icon.svg.meta +1 -0
  92. package/dashboard/.next/server/app/index.html +1 -0
  93. package/dashboard/.next/server/app/index.meta +5 -0
  94. package/dashboard/.next/server/app/index.rsc +9 -0
  95. package/dashboard/.next/server/app/issues/page.js +1 -0
  96. package/dashboard/.next/server/app/issues/page.js.nft.json +1 -0
  97. package/dashboard/.next/server/app/issues/page_client-reference-manifest.js +1 -0
  98. package/dashboard/.next/server/app/issues.html +1 -0
  99. package/dashboard/.next/server/app/issues.meta +5 -0
  100. package/dashboard/.next/server/app/issues.rsc +8 -0
  101. package/dashboard/.next/server/app/page.js +20 -0
  102. package/dashboard/.next/server/app/page.js.nft.json +1 -0
  103. package/dashboard/.next/server/app/page_client-reference-manifest.js +1 -0
  104. package/dashboard/.next/server/app/progress/page.js +1 -0
  105. package/dashboard/.next/server/app/progress/page.js.nft.json +1 -0
  106. package/dashboard/.next/server/app/progress/page_client-reference-manifest.js +1 -0
  107. package/dashboard/.next/server/app/progress.html +1 -0
  108. package/dashboard/.next/server/app/progress.meta +5 -0
  109. package/dashboard/.next/server/app/progress.rsc +8 -0
  110. package/dashboard/.next/server/app/stats/page.js +1 -0
  111. package/dashboard/.next/server/app/stats/page.js.nft.json +1 -0
  112. package/dashboard/.next/server/app/stats/page_client-reference-manifest.js +1 -0
  113. package/dashboard/.next/server/app/stats.html +1 -0
  114. package/dashboard/.next/server/app/stats.meta +5 -0
  115. package/dashboard/.next/server/app/stats.rsc +8 -0
  116. package/dashboard/.next/server/app-paths-manifest.json +22 -0
  117. package/dashboard/.next/server/chunks/431.js +1 -0
  118. package/dashboard/.next/server/chunks/557.js +1 -0
  119. package/dashboard/.next/server/chunks/645.js +6 -0
  120. package/dashboard/.next/server/chunks/649.js +2 -0
  121. package/dashboard/.next/server/chunks/665.js +13 -0
  122. package/dashboard/.next/server/chunks/786.js +12 -0
  123. package/dashboard/.next/server/chunks/818.js +6 -0
  124. package/dashboard/.next/server/chunks/916.js +2 -0
  125. package/dashboard/.next/server/chunks/font-manifest.json +1 -0
  126. package/dashboard/.next/server/font-manifest.json +1 -0
  127. package/dashboard/.next/server/functions-config-manifest.json +1 -0
  128. package/dashboard/.next/server/interception-route-rewrite-manifest.js +1 -0
  129. package/dashboard/.next/server/middleware-build-manifest.js +1 -0
  130. package/dashboard/.next/server/middleware-manifest.json +6 -0
  131. package/dashboard/.next/server/middleware-react-loadable-manifest.js +1 -0
  132. package/dashboard/.next/server/next-font-manifest.js +1 -0
  133. package/dashboard/.next/server/next-font-manifest.json +1 -0
  134. package/dashboard/.next/server/pages/404.html +1 -0
  135. package/dashboard/.next/server/pages/500.html +1 -0
  136. package/dashboard/.next/server/pages/_app.js +1 -0
  137. package/dashboard/.next/server/pages/_app.js.nft.json +1 -0
  138. package/dashboard/.next/server/pages/_document.js +1 -0
  139. package/dashboard/.next/server/pages/_document.js.nft.json +1 -0
  140. package/dashboard/.next/server/pages/_error.js +1 -0
  141. package/dashboard/.next/server/pages/_error.js.nft.json +1 -0
  142. package/dashboard/.next/server/pages-manifest.json +1 -0
  143. package/dashboard/.next/server/server-reference-manifest.js +1 -0
  144. package/dashboard/.next/server/server-reference-manifest.json +1 -0
  145. package/dashboard/.next/server/webpack-runtime.js +1 -0
  146. package/dashboard/.next/static/0IZAlhEwk5-v4myUvWKBd/_buildManifest.js +1 -0
  147. package/dashboard/.next/static/0IZAlhEwk5-v4myUvWKBd/_ssgManifest.js +1 -0
  148. package/dashboard/.next/static/chunks/1.8868c4d131111be7.js +36 -0
  149. package/dashboard/.next/static/chunks/1015.3ab89142e5f44120.js +226 -0
  150. package/dashboard/.next/static/chunks/1151.b6ef5c786e587ed7.js +1 -0
  151. package/dashboard/.next/static/chunks/1199.a072929dbec89965.js +148 -0
  152. package/dashboard/.next/static/chunks/1375.d4d2f7fc9c9c2ff1.js +43 -0
  153. package/dashboard/.next/static/chunks/1799.83206776abbbf1fc.js +9 -0
  154. package/dashboard/.next/static/chunks/20154aaa.ccc347c04ab5ad4a.js +1 -0
  155. package/dashboard/.next/static/chunks/2077.7011a570c87aa7b1.js +1 -0
  156. package/dashboard/.next/static/chunks/2166.cc0fabeb2e89b840.js +215 -0
  157. package/dashboard/.next/static/chunks/2291.85a70cb0c228157b.js +29 -0
  158. package/dashboard/.next/static/chunks/2325.2c55cb9a6282ae3f.js +24 -0
  159. package/dashboard/.next/static/chunks/2383.62c035a052272594.js +1 -0
  160. package/dashboard/.next/static/chunks/2694.92bbe252063e4786.js +1 -0
  161. package/dashboard/.next/static/chunks/275.0d761aa0e5b030b8.js +34 -0
  162. package/dashboard/.next/static/chunks/2781.8536b644a480aede.js +93 -0
  163. package/dashboard/.next/static/chunks/2805.a8d71d2f92bb6ba9.js +1 -0
  164. package/dashboard/.next/static/chunks/2879.51436986f93981d9.js +1 -0
  165. package/dashboard/.next/static/chunks/3017.e55781da9dd32d37.js +1 -0
  166. package/dashboard/.next/static/chunks/3205-728c260fbb4f89c6.js +2 -0
  167. package/dashboard/.next/static/chunks/3236.dff44fa7961d9d5e.js +1 -0
  168. package/dashboard/.next/static/chunks/3480.9451396ad7ee7613.js +1 -0
  169. package/dashboard/.next/static/chunks/3626.ba1cf848a9f2e93d.js +64 -0
  170. package/dashboard/.next/static/chunks/3865.a432a7910a2f5281.js +90 -0
  171. package/dashboard/.next/static/chunks/3887.c22cbfa3f095826c.js +1 -0
  172. package/dashboard/.next/static/chunks/3924-4a05057b5450abe1.js +1 -0
  173. package/dashboard/.next/static/chunks/3948.fe3c7d758568d98b.js +287 -0
  174. package/dashboard/.next/static/chunks/4728.07d87640a3e7dd0d.js +24 -0
  175. package/dashboard/.next/static/chunks/4787.4e5f6a0e0e40a583.js +23 -0
  176. package/dashboard/.next/static/chunks/5060.baca226af35ed016.js +1 -0
  177. package/dashboard/.next/static/chunks/5284.f949ac90c95ff143.js +1 -0
  178. package/dashboard/.next/static/chunks/5715.1524bcc9591e180b.js +115 -0
  179. package/dashboard/.next/static/chunks/6014.700ae4969b64d728.js +104 -0
  180. package/dashboard/.next/static/chunks/6024.4d23707c65514679.js +79 -0
  181. package/dashboard/.next/static/chunks/6052.033a6f1013c666eb.js +141 -0
  182. package/dashboard/.next/static/chunks/6177.e5c84cfc4c0dea51.js +1 -0
  183. package/dashboard/.next/static/chunks/618f8807-547c5614e1318888.js +1 -0
  184. package/dashboard/.next/static/chunks/6434.9481771c33195d29.js +1 -0
  185. package/dashboard/.next/static/chunks/6468.f4a3e8fa6accc6da.js +77 -0
  186. package/dashboard/.next/static/chunks/6540.86f367d7390738d4.js +1 -0
  187. package/dashboard/.next/static/chunks/6549.4d0d472df96429a5.js +1 -0
  188. package/dashboard/.next/static/chunks/690f35d0.3e40ca0930e4bbdb.js +119 -0
  189. package/dashboard/.next/static/chunks/7020.831e16e26d91abc1.js +166 -0
  190. package/dashboard/.next/static/chunks/7397-f6f4dddc7a20bfc1.js +1 -0
  191. package/dashboard/.next/static/chunks/7498-ea83cb9e30ec5491.js +1 -0
  192. package/dashboard/.next/static/chunks/7802.89aec9ee11680850.js +80 -0
  193. package/dashboard/.next/static/chunks/7973.8b526f589aca5d84.js +79 -0
  194. package/dashboard/.next/static/chunks/7a04ac15.1c6cea694301806c.js +62 -0
  195. package/dashboard/.next/static/chunks/8216.1bead812eb126c35.js +5 -0
  196. package/dashboard/.next/static/chunks/8233babc.780b8e272eda298f.js +92 -0
  197. package/dashboard/.next/static/chunks/8452-e616b5f43bceb95f.js +13 -0
  198. package/dashboard/.next/static/chunks/8645.a5ca76f11edc9633.js +1 -0
  199. package/dashboard/.next/static/chunks/8928-60c623ee89d2e6ad.js +1 -0
  200. package/dashboard/.next/static/chunks/9173.2486ffca31131ec5.js +1 -0
  201. package/dashboard/.next/static/chunks/9178.469341860bf8caec.js +1 -0
  202. package/dashboard/.next/static/chunks/9466.e904660d38c03eea.js +1 -0
  203. package/dashboard/.next/static/chunks/9660.84a85811380c5f33.js +1 -0
  204. package/dashboard/.next/static/chunks/9717.6cf5c8c89403b651.js +1 -0
  205. package/dashboard/.next/static/chunks/9720.67d4d0d15a96d691.js +1 -0
  206. package/dashboard/.next/static/chunks/9811.65e1d080c2d256af.js +1 -0
  207. package/dashboard/.next/static/chunks/app/_not-found/page-548ab392d0e890d1.js +1 -0
  208. package/dashboard/.next/static/chunks/app/access/page-3668562e7464eb5d.js +1 -0
  209. package/dashboard/.next/static/chunks/app/calls/page-d07f5b8664cc8303.js +1 -0
  210. package/dashboard/.next/static/chunks/app/conformance/page-2fede1d7b5f9265d.js +1 -0
  211. package/dashboard/.next/static/chunks/app/diagram/page-b228444265546495.js +1 -0
  212. package/dashboard/.next/static/chunks/app/flows/page-fa67783d8cd79cab.js +1 -0
  213. package/dashboard/.next/static/chunks/app/functions/page-686f0296639133a3.js +1 -0
  214. package/dashboard/.next/static/chunks/app/issues/page-dc110d4cc0a5c398.js +1 -0
  215. package/dashboard/.next/static/chunks/app/layout-e7b50543ba216d12.js +1 -0
  216. package/dashboard/.next/static/chunks/app/page-a0f25953d4457935.js +1 -0
  217. package/dashboard/.next/static/chunks/app/progress/page-f07ac39d1d27b480.js +1 -0
  218. package/dashboard/.next/static/chunks/app/stats/page-db81f600a086f252.js +1 -0
  219. package/dashboard/.next/static/chunks/b7167ec1.7afbab6f609e3326.js +153 -0
  220. package/dashboard/.next/static/chunks/c7ea4e13.5effeeba6618bdb7.js +1 -0
  221. package/dashboard/.next/static/chunks/framework-cf6f5bdca6ba0184.js +33 -0
  222. package/dashboard/.next/static/chunks/main-70c6d841ad572657.js +1 -0
  223. package/dashboard/.next/static/chunks/main-app-9d2f6b8a47133e9b.js +1 -0
  224. package/dashboard/.next/static/chunks/pages/_app-6ad2b50514c24ab4.js +1 -0
  225. package/dashboard/.next/static/chunks/pages/_error-d5eb11c5c4626811.js +1 -0
  226. package/dashboard/.next/static/chunks/polyfills-78c92fac7aa8fdd8.js +1 -0
  227. package/dashboard/.next/static/chunks/webpack-08869f2b18792e51.js +1 -0
  228. package/dashboard/.next/static/css/e6cb67f77f13ae8e.css +3 -0
  229. package/dashboard/.next/static/media/0aa834ed78bf6d07-s.woff2 +0 -0
  230. package/dashboard/.next/static/media/438aa629764e75f3-s.woff2 +0 -0
  231. package/dashboard/.next/static/media/4c9affa5bc8f420e-s.p.woff2 +0 -0
  232. package/dashboard/.next/static/media/51251f8b9793cdb3-s.woff2 +0 -0
  233. package/dashboard/.next/static/media/67957d42bae0796d-s.woff2 +0 -0
  234. package/dashboard/.next/static/media/875ae681bfde4580-s.woff2 +0 -0
  235. package/dashboard/.next/static/media/886030b0b59bc5a7-s.woff2 +0 -0
  236. package/dashboard/.next/static/media/939c4f875ee75fbb-s.woff2 +0 -0
  237. package/dashboard/.next/static/media/bb3ef058b751a6ad-s.p.woff2 +0 -0
  238. package/dashboard/.next/static/media/cc978ac5ee68c2b6-s.woff2 +0 -0
  239. package/dashboard/.next/static/media/e857b654a2caa584-s.woff2 +0 -0
  240. package/dashboard/.next/static/media/f911b923c6adde36-s.woff2 +0 -0
  241. package/dashboard/.next/trace +80 -0
  242. package/dashboard/.next/types/app/access/page.ts +79 -0
  243. package/dashboard/.next/types/app/api/code/route.ts +343 -0
  244. package/dashboard/.next/types/app/api/flows/route.ts +343 -0
  245. package/dashboard/.next/types/app/api/github-status/route.ts +343 -0
  246. package/dashboard/.next/types/app/api/issues/[id]/move/route.ts +343 -0
  247. package/dashboard/.next/types/app/api/issues/[id]/route.ts +343 -0
  248. package/dashboard/.next/types/app/api/mermaid/route.ts +343 -0
  249. package/dashboard/.next/types/app/api/progress/route.ts +343 -0
  250. package/dashboard/.next/types/app/api/watch/route.ts +343 -0
  251. package/dashboard/.next/types/app/calls/page.ts +79 -0
  252. package/dashboard/.next/types/app/conformance/page.ts +79 -0
  253. package/dashboard/.next/types/app/diagram/page.ts +79 -0
  254. package/dashboard/.next/types/app/flows/page.ts +79 -0
  255. package/dashboard/.next/types/app/functions/page.ts +79 -0
  256. package/dashboard/.next/types/app/issues/page.ts +79 -0
  257. package/dashboard/.next/types/app/page.ts +79 -0
  258. package/dashboard/.next/types/app/progress/page.ts +79 -0
  259. package/dashboard/.next/types/app/stats/page.ts +79 -0
  260. package/dashboard/.next/types/package.json +1 -0
  261. package/dashboard/app/access/AccessClient.tsx +402 -0
  262. package/dashboard/app/access/ReadOnlyFunctions.tsx +114 -0
  263. package/dashboard/app/access/page.tsx +118 -0
  264. package/dashboard/app/api/code/route.ts +35 -0
  265. package/dashboard/app/api/flows/route.ts +28 -0
  266. package/dashboard/app/api/github-status/route.ts +23 -0
  267. package/dashboard/app/api/issues/[id]/move/route.ts +74 -0
  268. package/dashboard/app/api/issues/[id]/route.ts +109 -0
  269. package/dashboard/app/api/mermaid/route.ts +25 -0
  270. package/dashboard/app/api/progress/route.ts +36 -0
  271. package/dashboard/app/api/watch/route.ts +52 -0
  272. package/dashboard/app/calls/CallsClient.tsx +170 -0
  273. package/dashboard/app/calls/page.tsx +50 -0
  274. package/dashboard/app/conformance/ConformanceTable.tsx +214 -0
  275. package/dashboard/app/conformance/page.tsx +179 -0
  276. package/dashboard/app/diagram/page.tsx +65 -0
  277. package/dashboard/app/flows/page.tsx +102 -0
  278. package/dashboard/app/functions/FunctionsClient.tsx +167 -0
  279. package/dashboard/app/functions/page.tsx +171 -0
  280. package/dashboard/app/globals.css +157 -0
  281. package/dashboard/app/icon.svg +18 -0
  282. package/dashboard/app/issues/IssuesBoardClient.tsx +636 -0
  283. package/dashboard/app/issues/page.tsx +239 -0
  284. package/dashboard/app/layout.tsx +40 -0
  285. package/dashboard/app/page.tsx +259 -0
  286. package/dashboard/app/progress/ProgressClient.tsx +333 -0
  287. package/dashboard/app/progress/page.tsx +118 -0
  288. package/dashboard/app/stats/StatsClient.tsx +452 -0
  289. package/dashboard/app/stats/page.tsx +43 -0
  290. package/dashboard/components/AutoRefresh.tsx +37 -0
  291. package/dashboard/components/CodeReference.tsx +129 -0
  292. package/dashboard/components/CommandPalette.tsx +135 -0
  293. package/dashboard/components/ConfidenceBadge.tsx +53 -0
  294. package/dashboard/components/DashboardLayout.tsx +450 -0
  295. package/dashboard/components/FilterableTable.tsx +293 -0
  296. package/dashboard/components/LiveStatus.tsx +99 -0
  297. package/dashboard/components/MarkdownRenderer.tsx +40 -0
  298. package/dashboard/components/MermaidViewer.tsx +267 -0
  299. package/dashboard/components/NotYetGenerated.tsx +32 -0
  300. package/dashboard/components/SeverityBadge.tsx +28 -0
  301. package/dashboard/components/SignalBars.tsx +27 -0
  302. package/dashboard/components/SortableTable.tsx +122 -0
  303. package/dashboard/lib/conformance-tokens.ts +49 -0
  304. package/dashboard/lib/data.ts +102 -0
  305. package/dashboard/lib/watcher.ts +45 -0
  306. package/dashboard/next-env.d.ts +5 -0
  307. package/dashboard/next.config.mjs +9 -0
  308. package/dashboard/postcss.config.cjs +6 -0
  309. package/dashboard/tailwind.config.ts +79 -0
  310. package/dashboard/tsconfig.json +21 -0
  311. package/dist/analysis/access-control.d.ts +24 -0
  312. package/dist/analysis/access-control.d.ts.map +1 -0
  313. package/dist/analysis/access-control.js +378 -0
  314. package/dist/analysis/access-control.js.map +1 -0
  315. package/dist/analysis/attack-surface.d.ts +51 -0
  316. package/dist/analysis/attack-surface.d.ts.map +1 -0
  317. package/dist/analysis/attack-surface.js +206 -0
  318. package/dist/analysis/attack-surface.js.map +1 -0
  319. package/dist/analysis/constraint-extraction.d.ts +25 -0
  320. package/dist/analysis/constraint-extraction.d.ts.map +1 -0
  321. package/dist/analysis/constraint-extraction.js +398 -0
  322. package/dist/analysis/constraint-extraction.js.map +1 -0
  323. package/dist/analysis/context-assembler.d.ts +16 -0
  324. package/dist/analysis/context-assembler.d.ts.map +1 -0
  325. package/dist/analysis/context-assembler.js +88 -0
  326. package/dist/analysis/context-assembler.js.map +1 -0
  327. package/dist/analysis/dependency-graph.d.ts +31 -0
  328. package/dist/analysis/dependency-graph.d.ts.map +1 -0
  329. package/dist/analysis/dependency-graph.js +223 -0
  330. package/dist/analysis/dependency-graph.js.map +1 -0
  331. package/dist/analysis/erc-detection.d.ts +16 -0
  332. package/dist/analysis/erc-detection.d.ts.map +1 -0
  333. package/dist/analysis/erc-detection.js +81 -0
  334. package/dist/analysis/erc-detection.js.map +1 -0
  335. package/dist/analysis/external-calls.d.ts +8 -0
  336. package/dist/analysis/external-calls.d.ts.map +1 -0
  337. package/dist/analysis/external-calls.js +124 -0
  338. package/dist/analysis/external-calls.js.map +1 -0
  339. package/dist/analysis/nsloc.d.ts +46 -0
  340. package/dist/analysis/nsloc.d.ts.map +1 -0
  341. package/dist/analysis/nsloc.js +106 -0
  342. package/dist/analysis/nsloc.js.map +1 -0
  343. package/dist/analysis/pattern-detection.d.ts +20 -0
  344. package/dist/analysis/pattern-detection.d.ts.map +1 -0
  345. package/dist/analysis/pattern-detection.js +236 -0
  346. package/dist/analysis/pattern-detection.js.map +1 -0
  347. package/dist/analysis/state-variables.d.ts +33 -0
  348. package/dist/analysis/state-variables.d.ts.map +1 -0
  349. package/dist/analysis/state-variables.js +179 -0
  350. package/dist/analysis/state-variables.js.map +1 -0
  351. package/dist/commands/access.d.ts +3 -0
  352. package/dist/commands/access.d.ts.map +1 -0
  353. package/dist/commands/access.js +99 -0
  354. package/dist/commands/access.js.map +1 -0
  355. package/dist/commands/ai-status.d.ts +3 -0
  356. package/dist/commands/ai-status.d.ts.map +1 -0
  357. package/dist/commands/ai-status.js +172 -0
  358. package/dist/commands/ai-status.js.map +1 -0
  359. package/dist/commands/analyze.d.ts +3 -0
  360. package/dist/commands/analyze.d.ts.map +1 -0
  361. package/dist/commands/analyze.js +101 -0
  362. package/dist/commands/analyze.js.map +1 -0
  363. package/dist/commands/calls.d.ts +3 -0
  364. package/dist/commands/calls.d.ts.map +1 -0
  365. package/dist/commands/calls.js +92 -0
  366. package/dist/commands/calls.js.map +1 -0
  367. package/dist/commands/claude.d.ts +3 -0
  368. package/dist/commands/claude.d.ts.map +1 -0
  369. package/dist/commands/claude.js +42 -0
  370. package/dist/commands/claude.js.map +1 -0
  371. package/dist/commands/constraints.d.ts +3 -0
  372. package/dist/commands/constraints.d.ts.map +1 -0
  373. package/dist/commands/constraints.js +32 -0
  374. package/dist/commands/constraints.js.map +1 -0
  375. package/dist/commands/context.d.ts +3 -0
  376. package/dist/commands/context.d.ts.map +1 -0
  377. package/dist/commands/context.js +57 -0
  378. package/dist/commands/context.js.map +1 -0
  379. package/dist/commands/dashboard.d.ts +3 -0
  380. package/dist/commands/dashboard.d.ts.map +1 -0
  381. package/dist/commands/dashboard.js +95 -0
  382. package/dist/commands/dashboard.js.map +1 -0
  383. package/dist/commands/deps.d.ts +3 -0
  384. package/dist/commands/deps.d.ts.map +1 -0
  385. package/dist/commands/deps.js +67 -0
  386. package/dist/commands/deps.js.map +1 -0
  387. package/dist/commands/doctor.d.ts +17 -0
  388. package/dist/commands/doctor.d.ts.map +1 -0
  389. package/dist/commands/doctor.js +154 -0
  390. package/dist/commands/doctor.js.map +1 -0
  391. package/dist/commands/init.d.ts +3 -0
  392. package/dist/commands/init.d.ts.map +1 -0
  393. package/dist/commands/init.js +330 -0
  394. package/dist/commands/init.js.map +1 -0
  395. package/dist/commands/patterns.d.ts +3 -0
  396. package/dist/commands/patterns.d.ts.map +1 -0
  397. package/dist/commands/patterns.js +40 -0
  398. package/dist/commands/patterns.js.map +1 -0
  399. package/dist/commands/state.d.ts +3 -0
  400. package/dist/commands/state.d.ts.map +1 -0
  401. package/dist/commands/state.js +92 -0
  402. package/dist/commands/state.js.map +1 -0
  403. package/dist/commands/stats.d.ts +3 -0
  404. package/dist/commands/stats.d.ts.map +1 -0
  405. package/dist/commands/stats.js +347 -0
  406. package/dist/commands/stats.js.map +1 -0
  407. package/dist/commands/surface.d.ts +3 -0
  408. package/dist/commands/surface.d.ts.map +1 -0
  409. package/dist/commands/surface.js +45 -0
  410. package/dist/commands/surface.js.map +1 -0
  411. package/dist/commands/update-skills.d.ts +3 -0
  412. package/dist/commands/update-skills.d.ts.map +1 -0
  413. package/dist/commands/update-skills.js +40 -0
  414. package/dist/commands/update-skills.js.map +1 -0
  415. package/dist/commands/update.d.ts +3 -0
  416. package/dist/commands/update.d.ts.map +1 -0
  417. package/dist/commands/update.js +157 -0
  418. package/dist/commands/update.js.map +1 -0
  419. package/dist/core/config.d.ts +24 -0
  420. package/dist/core/config.d.ts.map +1 -0
  421. package/dist/core/config.js +70 -0
  422. package/dist/core/config.js.map +1 -0
  423. package/dist/core/errors.d.ts +17 -0
  424. package/dist/core/errors.d.ts.map +1 -0
  425. package/dist/core/errors.js +113 -0
  426. package/dist/core/errors.js.map +1 -0
  427. package/dist/core/external-tools.d.ts +39 -0
  428. package/dist/core/external-tools.d.ts.map +1 -0
  429. package/dist/core/external-tools.js +151 -0
  430. package/dist/core/external-tools.js.map +1 -0
  431. package/dist/core/logger.d.ts +16 -0
  432. package/dist/core/logger.d.ts.map +1 -0
  433. package/dist/core/logger.js +22 -0
  434. package/dist/core/logger.js.map +1 -0
  435. package/dist/core/output.d.ts +13 -0
  436. package/dist/core/output.d.ts.map +1 -0
  437. package/dist/core/output.js +45 -0
  438. package/dist/core/output.js.map +1 -0
  439. package/dist/core/paths.d.ts +21 -0
  440. package/dist/core/paths.d.ts.map +1 -0
  441. package/dist/core/paths.js +32 -0
  442. package/dist/core/paths.js.map +1 -0
  443. package/dist/core/progress.d.ts +34 -0
  444. package/dist/core/progress.d.ts.map +1 -0
  445. package/dist/core/progress.js +119 -0
  446. package/dist/core/progress.js.map +1 -0
  447. package/dist/core/schema.d.ts +3197 -0
  448. package/dist/core/schema.d.ts.map +1 -0
  449. package/dist/core/schema.js +420 -0
  450. package/dist/core/schema.js.map +1 -0
  451. package/dist/core/skills.d.ts +28 -0
  452. package/dist/core/skills.d.ts.map +1 -0
  453. package/dist/core/skills.js +82 -0
  454. package/dist/core/skills.js.map +1 -0
  455. package/dist/index.d.ts +3 -0
  456. package/dist/index.d.ts.map +1 -0
  457. package/dist/index.js +43 -0
  458. package/dist/index.js.map +1 -0
  459. package/dist/parsers/lcov.d.ts +27 -0
  460. package/dist/parsers/lcov.d.ts.map +1 -0
  461. package/dist/parsers/lcov.js +68 -0
  462. package/dist/parsers/lcov.js.map +1 -0
  463. package/dist/parsers/slither.d.ts +63 -0
  464. package/dist/parsers/slither.d.ts.map +1 -0
  465. package/dist/parsers/slither.js +160 -0
  466. package/dist/parsers/slither.js.map +1 -0
  467. package/dist/parsers/solc.d.ts +19 -0
  468. package/dist/parsers/solc.d.ts.map +1 -0
  469. package/dist/parsers/solc.js +43 -0
  470. package/dist/parsers/solc.js.map +1 -0
  471. package/dist/parsers/solidity-parser.d.ts +77 -0
  472. package/dist/parsers/solidity-parser.d.ts.map +1 -0
  473. package/dist/parsers/solidity-parser.js +357 -0
  474. package/dist/parsers/solidity-parser.js.map +1 -0
  475. package/dist/skills/generate-overleaf.md +326 -0
  476. package/dist/skills/generate-poc.md +186 -0
  477. package/dist/skills/ingest-aa-report.md +172 -0
  478. package/dist/skills/init-audit.md +271 -0
  479. package/dist/skills/sync-issues.md +266 -0
  480. package/dist/skills/validate-issue.md +149 -0
  481. package/dist/skills/write-finding.md +142 -0
  482. package/dist/types/index.d.ts +30 -0
  483. package/dist/types/index.d.ts.map +1 -0
  484. package/dist/types/index.js +2 -0
  485. package/dist/types/index.js.map +1 -0
  486. package/package.json +81 -0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2980],{7455:function(e,t,n){Promise.resolve().then(n.bind(n,9745))},9745:function(e,t,n){"use strict";n.d(t,{AccessClient:function(){return p}});var a=n(7821),s=n(8078),i=n(5640),c=n(3775);let r={high:"bg-[var(--success)]/15 text-[var(--success)]",medium:"bg-[var(--medium)]/15 text-[var(--medium)]",low:"bg-[var(--critical)]/15 text-[var(--critical)]"};function l(e){var t;let{level:n,derivedFrom:i}=e,[c,l]=(0,s.useState)(!1),o=null!==(t=r[n.toLowerCase()])&&void 0!==t?t:r.low,d=i?"confidence-".concat(n,"-").concat(i.replace(/\W+/g,"-")):void 0,u=i?"".concat(n," confidence, derived from ").concat(i):"".concat(n," confidence");return(0,a.jsxs)("span",{className:"relative inline-block focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent rounded-md",tabIndex:i?0:void 0,role:i?"group":void 0,"aria-label":u,"aria-describedby":c&&d?d:void 0,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),onFocus:()=>l(!0),onBlur:()=>l(!1),children:[(0,a.jsx)("span",{className:"inline-flex items-center rounded-md px-2 py-0.5 text-caption font-medium ".concat(o),children:n}),i&&c&&(0,a.jsxs)("span",{id:d,role:"tooltip",className:"absolute bottom-full left-1/2 z-50 mb-2 -translate-x-1/2 whitespace-nowrap rounded-md border border-border-default bg-surface-3 px-2 py-1 text-caption text-text-secondary shadow-lg",children:["Derived from: ",i]})]})}let o={access_control:"bg-accent-subtle text-accent",state_check:"bg-[var(--medium)]/15 text-[var(--medium)]",guard:"bg-[var(--low)]/15 text-[var(--low)]",unknown:"bg-[var(--neutral)]/15 text-[var(--neutral)]"};function d(e){var t;return null===(t=e.is_likely_access_control)||void 0===t||t}let u={external:"bg-[var(--critical)]/15 text-[var(--critical)]",public:"bg-[var(--high)]/15 text-[var(--high)]",internal:"bg-[var(--low)]/15 text-[var(--low)]",private:"bg-[var(--neutral)]/15 text-[var(--neutral)]"};function m(e){var t;let{visibility:n}=e,s=null!==(t=u[n])&&void 0!==t?t:"bg-[var(--neutral)]/15 text-[var(--neutral)]";return(0,a.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(s),children:n})}let x=["All","State-Changing","Read-Only"];function p(e){let{writeFunctions:t,readOnlyFunctions:n,anyoneFnKeys:r,otherRoles:u,allRoles:p}=e,[f,h]=(0,s.useState)("All"),[b,v]=(0,s.useState)(!1),[g,y]=(0,s.useState)(!1),j=(0,s.useMemo)(()=>new Set(r),[r]),N=(0,s.useMemo)(()=>u.filter(e=>!d(e)),[u]),w=(0,s.useMemo)(()=>g?u:u.filter(d),[u,g]),C=(0,s.useMemo)(()=>{let e=new Map;for(let n of p)if(d(n))for(let a of n.functions){var t;let s="".concat(a.contract,"::").concat(a.function),i=null!==(t=e.get(s))&&void 0!==t?t:[];i.push(n.role),e.set(s,i)}return e},[p]),_=(0,s.useMemo)(()=>[...t,...n],[t,n]),k=(0,s.useMemo)(()=>t.filter(e=>j.has("".concat(e.contract,"::").concat(e.function))),[t,j]),M=(0,s.useMemo)(()=>{switch(f){case"All":return _;case"State-Changing":return b?k:t;case"Read-Only":return n}},[f,b,_,t,n,k]),S="All"===f||"Read-Only"===f,A=(0,s.useMemo)(()=>(function(e,t,n){let s=[{id:"contract",header:"Contract",accessorKey:"contract",enableColumnFilter:!0,cell:e=>(0,a.jsx)("span",{className:"font-medium text-text-primary",children:e.contract})},{id:"function",header:"Function",accessorKey:"function",cell:e=>(0,a.jsx)("span",{className:"font-mono text-body text-text-secondary",children:e.function})},{id:"caller",header:"Who can call",accessorKey:"function",cell:n=>{var s;let i="".concat(n.contract,"::").concat(n.function),c=null!==(s=t.get(i))&&void 0!==s?s:[],r=e.has(i);return 0!==c.length||r?(0,a.jsxs)("div",{className:"flex flex-wrap gap-1",children:[r&&(0,a.jsx)("span",{className:"inline-flex items-center rounded-md bg-[var(--critical)]/10 px-2 py-0.5 text-caption font-medium text-[var(--critical)]",children:"Anyone"}),c.filter(e=>"anyone"!==e.toLowerCase()&&"public"!==e.toLowerCase()).map(e=>(0,a.jsx)("span",{className:"inline-flex items-center rounded-md bg-accent-subtle px-2 py-0.5 text-caption font-medium text-accent",children:e},e))]}):(0,a.jsx)("span",{className:"text-text-tertiary",children:"--"})}},{id:"visibility",header:"Visibility",accessorKey:"visibility",enableColumnFilter:!0,cell:e=>(0,a.jsx)(m,{visibility:e.visibility})}];return n&&s.push({id:"mutability",header:"Mutability",accessorKey:"state_mutability",cell:e=>{var t;return(0,a.jsx)("span",{className:"text-caption text-text-tertiary",children:null!==(t=e.state_mutability)&&void 0!==t?t:"--"})}}),s.push({id:"modifiers",header:"Modifiers",accessorKey:"modifiers",cell:e=>e.modifiers.length>0?(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:e.modifiers.map(e=>(0,a.jsx)("span",{className:"inline-flex items-center rounded-sm bg-surface-3 px-2 py-0.5 text-caption text-text-secondary",children:e},e))}):(0,a.jsx)("span",{className:"text-text-tertiary",children:"--"})},{id:"location",header:"Location",accessorKey:"evidence",cell:e=>(0,a.jsx)(c.i,{file:e.evidence.file,lineStart:e.evidence.line_start,lineEnd:e.evidence.line_end,snippet:e.evidence.snippet})}),s})(j,C,S),[j,C,S]);return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"mb-sp-5 flex flex-wrap items-center gap-sp-3",children:[(0,a.jsx)("div",{className:"inline-flex overflow-x-auto rounded-md bg-surface-3 p-1",children:x.map(e=>(0,a.jsxs)("button",{type:"button",onClick:()=>{h(e),"State-Changing"!==e&&v(!1)},className:"whitespace-nowrap rounded-sm px-sp-3 py-1.5 text-body font-medium ".concat(f===e?"bg-surface-2 text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"),children:[e,(0,a.jsxs)("span",{className:"ml-1.5 text-caption opacity-60",children:["All"===e&&_.length,"State-Changing"===e&&t.length,"Read-Only"===e&&n.length]})]},e))}),"State-Changing"===f&&k.length>0&&(0,a.jsxs)("button",{type:"button",onClick:()=>v(e=>!e),className:"rounded-sm px-sp-3 py-1.5 text-body font-medium ".concat(b?"bg-[var(--critical)]/15 text-[var(--critical)] shadow-sm":"bg-surface-3 text-text-secondary hover:text-text-primary"),children:["Unprotected only",(0,a.jsx)("span",{className:"ml-1.5 text-caption opacity-60",children:k.length})]})]}),(0,a.jsx)("div",{className:"mb-sp-6",children:(0,a.jsx)(i.v,{columns:A,data:M,defaultOpen:!0,rowClassName:e=>{let t="".concat(e.contract,"::").concat(e.function);return j.has(t)?"bg-[var(--critical)]/5 hover:bg-[var(--critical)]/10":"bg-surface-1 hover:bg-surface-3"}})}),u.length>0&&(0,a.jsxs)("div",{className:"mb-sp-6",children:[(0,a.jsxs)("div",{className:"mb-sp-3 flex items-center justify-between gap-sp-3",children:[(0,a.jsxs)("h3",{className:"text-heading font-medium text-text-primary",children:["Roles",(0,a.jsxs)("span",{className:"ml-2 text-caption font-normal text-text-tertiary",children:[w.length," shown \xb7 ",N.length," inferred / unknown hidden"]})]}),N.length>0&&(0,a.jsxs)("button",{type:"button",onClick:()=>y(e=>!e),"aria-pressed":g,className:"rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ".concat(g?"bg-accent text-surface-0":"bg-surface-3 text-text-secondary hover:text-text-primary"),children:[g?"Hide":"Show"," inferred / unknown (",N.length,")"]})]}),(0,a.jsx)("div",{className:"grid gap-sp-3 sm:grid-cols-2",children:w.map(e=>(0,a.jsxs)("div",{className:"rounded-md border bg-surface-2 p-sp-4 ".concat(d(e)?"border-border-default":"border-dashed border-border-emphasis opacity-90"),children:[(0,a.jsxs)("div",{className:"mb-sp-2 flex items-center justify-between gap-sp-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-sp-2",children:[(0,a.jsx)("h4",{className:"text-heading font-medium text-text-primary",children:e.role}),e.kind&&(0,a.jsx)("span",{className:"inline-flex items-center rounded-md px-2 py-0.5 text-caption font-medium ".concat(o[e.kind]),children:e.kind.replace("_"," ")})]}),(0,a.jsx)(l,{level:e.confidence,derivedFrom:e.derived_from})]}),(0,a.jsx)("p",{className:"mb-sp-3 text-body text-text-secondary",children:e.description}),e.modifier&&(0,a.jsxs)("p",{className:"mb-sp-2 text-caption text-text-tertiary",children:["Modifier:"," ",(0,a.jsx)("code",{className:"rounded-sm bg-surface-0 px-1.5 py-0.5 text-text-secondary",children:e.modifier})]}),e.functions.length>0&&(0,a.jsxs)("div",{className:"mb-sp-2",children:[(0,a.jsxs)("p",{className:"mb-1 text-caption font-medium uppercase text-text-tertiary",children:["Functions (",e.functions.length,")"]}),(0,a.jsx)("div",{className:"flex flex-wrap gap-1",children:e.functions.map(e=>(0,a.jsxs)("span",{className:"inline-flex items-center rounded-sm bg-surface-3 px-2 py-0.5 font-mono text-caption text-text-secondary",children:[e.contract,".",e.function]},"".concat(e.contract,"::").concat(e.function)))})]}),e.warnings.length>0&&(0,a.jsx)("div",{className:"mt-sp-2 space-y-1 border-t border-border-subtle pt-sp-2",children:e.warnings.map((e,t)=>(0,a.jsx)("p",{className:"text-caption text-[var(--medium)]",children:e},t))})]},e.role))})]})]})}}},function(e){e.O(0,[8452,8928,7115,3205,1744],function(){return e(e.s=7455)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1780],{8883:function(e,t,r){Promise.resolve().then(r.bind(r,3362))},3362:function(e,t,r){"use strict";r.d(t,{CallsClient:function(){return i}});var l=r(7821),s=r(5640);let n={external:"bg-[var(--critical)]/15 text-[var(--critical)]",untrusted:"bg-[var(--critical)]/15 text-[var(--critical)]","semi-trusted":"bg-[var(--medium)]/15 text-[var(--medium)]",semi_trusted:"bg-[var(--medium)]/15 text-[var(--medium)]",trusted:"bg-[var(--success)]/15 text-[var(--success)]"};function a(e){var t;let{trust:r}=e,s=null!==(t=n[r.toLowerCase()])&&void 0!==t?t:"bg-[var(--neutral)]/15 text-[var(--neutral)]";return(0,l.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(s),children:r})}let c=[{id:"contract",header:"Contract",accessorKey:"contract",enableColumnFilter:!0,cell:e=>(0,l.jsx)("span",{className:"font-medium text-text-primary",children:e.contract})},{id:"function",header:"Function",accessorKey:"fn",cell:e=>(0,l.jsx)("span",{className:"font-mono text-body text-text-secondary",children:e.fn})},{id:"call",header:"Call",accessorKey:"call",cell:e=>(0,l.jsx)("span",{className:"font-mono text-body text-text-secondary",children:e.call})},{id:"return_checked",header:"Return Checked",accessorKey:"return_checked",cell:e=>(0,l.jsx)("span",{className:e.return_checked?"text-[var(--success)]":"text-[var(--critical)]",children:e.return_checked?"Yes":"No"})},{id:"call_type",header:"Call Type",accessorKey:"call_type",enableColumnFilter:!0,cell:e=>(0,l.jsx)("span",{className:"inline-flex items-center rounded-sm bg-surface-3 px-2 py-0.5 text-caption text-text-secondary",children:e.call_type})},{id:"trust",header:"Trust",accessorKey:"trust",enableColumnFilter:!0,cell:e=>(0,l.jsx)(a,{trust:e.trust})}];function i(e){let{calls:t}=e,r=t.map(e=>{var t;return{contract:e.contract,fn:e.function,call:"".concat(e.target,".").concat(e.method,"()"),return_checked:!0===(t=e.return_checked.value)||"true"===t||"yes"===t,call_type:e.call_type,trust:String(e.trust_level.value)}}),n={};for(let e of r){var i;n[e.trust]=(null!==(i=n[e.trust])&&void 0!==i?i:0)+1}let o=r.filter(e=>!e.return_checked).length;return(0,l.jsxs)("div",{children:[(0,l.jsx)("h2",{className:"mb-sp-5 text-title font-semibold text-text-primary",children:"External Calls"}),(0,l.jsxs)("p",{className:"mb-sp-3 text-body text-text-secondary",children:[r.length," external call",1!==r.length?"s":""," found"]}),(0,l.jsxs)("div",{className:"mb-sp-5 grid grid-cols-2 gap-sp-3 sm:grid-cols-4",children:[Object.entries(n).map(e=>{let[t,r]=e;return(0,l.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,l.jsx)("div",{className:"text-display text-text-primary",children:r}),(0,l.jsx)("div",{className:"mt-1",children:(0,l.jsx)(a,{trust:t})})]},t)}),o>0&&(0,l.jsxs)("div",{className:"rounded-md border border-[var(--critical)]/30 bg-[var(--critical)]/5 p-sp-4",children:[(0,l.jsx)("div",{className:"text-display text-[var(--critical)]",children:o}),(0,l.jsx)("div",{className:"mt-1 text-caption text-[var(--critical)]/70",children:"Unchecked returns"})]})]}),(0,l.jsx)(s.v,{columns:c,data:r,defaultOpen:!0})]})}},5640:function(e,t,r){"use strict";r.d(t,{v:function(){return c}});var l=r(7821),s=r(8078),n=r(8452),a=r(3299);function c(e){let{columns:t,data:r,title:c,defaultOpen:i=!0,rowClassName:o,onRowClick:d,expandedRow:u}=e,[x,m]=(0,s.useState)(i),[p,f]=(0,s.useState)([]),[h,v]=(0,s.useState)([]),[b,g]=(0,s.useState)(null),y=(0,s.useMemo)(()=>t.map(e=>{var t;return{id:e.id,accessorKey:e.accessorKey,header:e.header,enableColumnFilter:null!==(t=e.enableColumnFilter)&&void 0!==t&&t,filterFn:e.enableColumnFilter?"equalsString":void 0,...e.sortingFn?{sortingFn:e.sortingFn}:{},cell:e.cell?t=>{let{row:r}=t;return e.cell(r.original)}:e=>{var t;let{getValue:r}=e;return(0,l.jsx)("span",{className:"text-text-primary",children:String(null!==(t=r())&&void 0!==t?t:"")})}}}),[t]),j=(0,n.b7)({data:r,columns:y,state:{sorting:p,columnFilters:h},onSortingChange:f,onColumnFiltersChange:v,getCoreRowModel:(0,a.sC)(),getFilteredRowModel:(0,a.vL)(),getSortedRowModel:(0,a.tj)()}),N=(0,s.useMemo)(()=>{let e={};for(let l of t){if(!l.enableColumnFilter)continue;let t=new Set;for(let e of r){let r=e[l.accessorKey];null!=r&&t.add(String(r))}let s=[...t];if(l.filterOrder){let e=l.filterOrder;s.sort((t,r)=>{let l=e.indexOf(t),s=e.indexOf(r);return(-1===l?999:l)-(-1===s?999:s)})}else s.sort();e[l.id]=s}return e},[t,r]),C=t.filter(e=>e.enableColumnFilter);return(0,l.jsxs)("div",{className:"overflow-hidden border border-border-default",style:{borderRadius:"var(--radius-sm)"},children:[c&&(0,l.jsxs)("button",{type:"button",onClick:()=>m(!x),"aria-expanded":x,className:"flex w-full items-center justify-between bg-surface-2 px-sp-4 py-sp-3 text-left hover:bg-surface-3",children:[(0,l.jsxs)("span",{className:"text-heading font-medium text-text-primary",children:[c," (",r.length,")"]}),(0,l.jsx)("svg",{className:"h-4 w-4 text-text-tertiary ".concat(x?"rotate-180":""),"aria-hidden":"true",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19 9-7 7-7-7"})})]}),x&&(0,l.jsxs)(l.Fragment,{children:[C.length>0&&(0,l.jsx)("div",{className:"flex flex-wrap gap-2 border-b border-border-subtle bg-surface-1 px-sp-4 py-sp-2",children:C.map(e=>{var t;let s=h.find(t=>t.id===e.id);return(0,l.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,l.jsxs)("button",{type:"button",onClick:()=>v(t=>t.filter(t=>t.id!==e.id)),"aria-pressed":!(null==s?void 0:s.value),className:"rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ".concat((null==s?void 0:s.value)?"bg-surface-3 text-text-secondary hover:text-text-primary":"bg-accent text-surface-0"),children:["All ",e.header]}),(null!==(t=N[e.id])&&void 0!==t?t:[]).map(t=>{let n=r.filter(r=>String(r[e.accessorKey])===t).length,a=(null==s?void 0:s.value)===t;return(0,l.jsxs)("button",{type:"button",onClick:()=>v(r=>{let l=r.filter(t=>t.id!==e.id);return a?l:[...l,{id:e.id,value:t}]}),"aria-pressed":a,className:"rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ".concat(a?"bg-accent text-surface-0":"bg-surface-3 text-text-secondary hover:text-text-primary"),children:[t,(0,l.jsx)("span",{className:"ml-1 opacity-60",children:n})]},t)})]},e.id)})}),(0,l.jsx)("div",{className:"overflow-x-auto",children:(0,l.jsxs)("table",{className:"w-full text-left text-body",children:[(0,l.jsx)("thead",{className:"border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary",children:(0,l.jsx)("tr",{children:j.getHeaderGroups().map(e=>e.headers.map(e=>(0,l.jsx)("th",{scope:"col","aria-sort":"asc"===e.column.getIsSorted()?"ascending":"desc"===e.column.getIsSorted()?"descending":void 0,className:"cursor-pointer select-none px-sp-4 py-sp-2 hover:text-text-secondary",onClick:e.column.getToggleSortingHandler(),children:(0,l.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.ie)(e.column.columnDef.header,e.getContext()),"asc"===e.column.getIsSorted()&&(0,l.jsx)("svg",{className:"h-3 w-3","aria-hidden":"true",viewBox:"0 0 12 12",fill:"currentColor",children:(0,l.jsx)("path",{d:"M6 2l4 5H2z"})}),"desc"===e.column.getIsSorted()&&(0,l.jsx)("svg",{className:"h-3 w-3","aria-hidden":"true",viewBox:"0 0 12 12",fill:"currentColor",children:(0,l.jsx)("path",{d:"M6 10l4-5H2z"})})]})},e.id)))})}),(0,l.jsx)("tbody",{className:"divide-y divide-border-subtle",children:j.getRowModel().rows.map(e=>{let r=e.original,a=r.id?String(r.id):e.id,c=b===a,i=!!d||!!u;return(0,l.jsxs)(s.Fragment,{children:[(0,l.jsx)("tr",{className:"".concat(o?o(r):"bg-surface-1 hover:bg-surface-3"," ").concat(i?"cursor-pointer":""),role:i?"button":void 0,tabIndex:i?0:void 0,"aria-expanded":u?c:void 0,onClick:()=>{u&&g(c?null:a),null==d||d(r)},onKeyDown:i?e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),u&&g(c?null:a),null==d||d(r))}:void 0,children:e.getVisibleCells().map(e=>(0,l.jsx)("td",{className:"h-9 px-sp-4 py-sp-2",children:(0,n.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),u&&c&&(0,l.jsx)("tr",{children:(0,l.jsx)("td",{colSpan:t.length,className:"bg-surface-0 px-sp-5 py-sp-4",children:u(r)})})]},e.id)})})]})})]})]})}}},function(e){e.O(0,[8452,7115,3205,1744],function(){return e(e.s=8883)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2464],{4676:function(e,t,s){Promise.resolve().then(s.bind(s,7542))},7542:function(e,t,s){"use strict";s.d(t,{ConformanceTable:function(){return o}});var c=s(7821),a=s(8078);let n={DEVIATES:"bg-[var(--critical)]/18 text-[var(--critical)]",PARTIAL:"bg-[var(--medium)]/18 text-[var(--medium)]",UNVERIFIABLE:"bg-accent/18 text-accent",UNDOCUMENTED:"bg-[var(--neutral)]/18 text-[var(--neutral)]",CONFORMS:"bg-[var(--success)]/18 text-[var(--success)]"},i={DEVIATES:"bg-[var(--critical)]/5",PARTIAL:"bg-[var(--medium)]/5",UNVERIFIABLE:"bg-accent/5",UNDOCUMENTED:"bg-surface-1",CONFORMS:"bg-[var(--success)]/5"},r={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)]"},l={external_docs:"Docs",natspec:"NatSpec",interface:"Interface",erc_eip:"ERC/EIP"};function o(e){let{checks:t}=e,[s,o]=(0,a.useState)(new Set),[d,x]=(0,a.useState)(null);function p(e){o(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})}let u=d?t.filter(e=>e.status===d):t;return(0,c.jsxs)("div",{children:[(0,c.jsxs)("div",{className:"mb-sp-3 flex flex-wrap gap-1",children:[(0,c.jsx)("button",{type:"button",onClick:()=>x(null),"aria-pressed":!d,className:"rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ".concat(d?"bg-surface-3 text-text-secondary hover:text-text-primary":"bg-accent text-surface-0"),children:"All"}),["DEVIATES","PARTIAL","UNVERIFIABLE","UNDOCUMENTED","CONFORMS"].map(e=>{let s=t.filter(t=>t.status===e).length;if(0===s)return null;let a=d===e;return(0,c.jsxs)("button",{type:"button",onClick:()=>x(a?null:e),"aria-pressed":a,className:"rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ".concat(a?"bg-accent text-surface-0":"bg-surface-3 text-text-secondary hover:text-text-primary"),children:[e," ",(0,c.jsx)("span",{className:"opacity-60",children:s})]},e)})]}),(0,c.jsx)("div",{className:"overflow-x-auto rounded-md border border-border-default",children:(0,c.jsxs)("table",{className:"w-full text-left text-body",children:[(0,c.jsx)("thead",{className:"border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary",children:(0,c.jsxs)("tr",{children:[(0,c.jsx)("th",{scope:"col",className:"w-8 px-2 py-sp-2"}),(0,c.jsx)("th",{scope:"col",className:"w-24 px-sp-4 py-sp-2",children:"ID"}),(0,c.jsx)("th",{scope:"col",className:"px-sp-4 py-sp-2",children:"Requirement"}),(0,c.jsx)("th",{scope:"col",className:"w-32 px-sp-4 py-sp-2",children:"Status"}),(0,c.jsx)("th",{scope:"col",className:"w-24 px-sp-4 py-sp-2",children:"Source"})]})}),(0,c.jsx)("tbody",{className:"divide-y divide-border-subtle",children:u.map(e=>{var t,o,d,x,u,m;let h=s.has(e.id),f=null!==(t=n[e.status])&&void 0!==t?t:n.UNDOCUMENTED,v=null!==(o=i[e.status])&&void 0!==o?o:i.UNDOCUMENTED;return(0,c.jsxs)(a.Fragment,{children:[(0,c.jsxs)("tr",{role:"button",tabIndex:0,"aria-expanded":h,onClick:()=>p(e.id),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&(t.preventDefault(),p(e.id))},className:"".concat(v," cursor-pointer hover:bg-surface-3"),children:[(0,c.jsx)("td",{className:"w-8 px-2 py-sp-2 text-text-tertiary",children:(0,c.jsx)("svg",{"aria-hidden":"true",className:"h-4 w-4 ".concat(h?"rotate-90":""),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,c.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 5 7 7-7 7"})})}),(0,c.jsx)("td",{className:"whitespace-nowrap px-sp-4 py-sp-2 font-mono text-caption text-text-secondary",children:e.id}),(0,c.jsx)("td",{className:"px-sp-4 py-sp-2 text-text-primary",children:e.requirement}),(0,c.jsx)("td",{className:"px-sp-4 py-sp-2",children:(0,c.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(f),children:e.status})}),(0,c.jsx)("td",{className:"px-sp-4 py-sp-2 text-caption text-text-tertiary",children:e.source?null!==(d=l[e.source])&&void 0!==d?d:e.source:null!==(x=e.spec_section)&&void 0!==x?x:"-"})]}),h&&(0,c.jsx)("tr",{className:"".concat(v),children:(0,c.jsxs)("td",{colSpan:5,className:"bg-surface-0 px-sp-6 py-sp-4",children:[(0,c.jsxs)("div",{className:"text-body text-text-secondary",children:[(0,c.jsx)("h4",{className:"mb-sp-2 text-caption font-medium uppercase text-text-tertiary",children:"Details"}),(0,c.jsx)("p",{className:"whitespace-pre-wrap",children:e.details})]}),(0,c.jsxs)("div",{className:"mt-sp-3 flex flex-wrap gap-sp-3",children:[e.confidence&&(0,c.jsxs)("div",{children:[(0,c.jsx)("span",{className:"text-caption text-text-tertiary",children:"Confidence: "}),(0,c.jsx)("span",{className:"text-caption text-text-secondary",children:e.confidence})]}),e.severity_hint&&(0,c.jsxs)("div",{children:[(0,c.jsx)("span",{className:"text-caption text-text-tertiary",children:"Severity: "}),(0,c.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(null!==(u=r[e.severity_hint])&&void 0!==u?u:r.Info),children:e.severity_hint})]}),e.code_location&&(0,c.jsxs)("div",{children:[(0,c.jsx)("span",{className:"text-caption text-text-tertiary",children:"Location: "}),(0,c.jsxs)("code",{className:"rounded-sm bg-surface-3 px-1.5 py-0.5 text-caption text-text-secondary",children:[e.code_location.file,":",e.code_location.line_start,e.code_location.line_end!==e.code_location.line_start&&"-".concat(e.code_location.line_end)]})]}),e.spec_url&&(0,c.jsxs)("div",{children:[(0,c.jsx)("span",{className:"text-caption text-text-tertiary",children:"Spec: "}),(0,c.jsx)("a",{href:e.spec_url,target:"_blank",rel:"noopener noreferrer",className:"text-caption text-accent hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent rounded-sm",children:null!==(m=e.spec_anchor)&&void 0!==m?m:e.spec_url.replace(/^https?:\/\//,"")})]})]})]})})]},e.id)})})]})})]})}}},function(e){e.O(0,[7115,3205,1744],function(){return e(e.s=4676)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7805],{8885:function(e,t,r){Promise.resolve().then(r.bind(r,3719))},3719:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return i}});var a=r(7821),s=r(8078),n=r(6870);function i(){let[e,t]=(0,s.useState)(null),[r,i]=(0,s.useState)(!1),[l,o]=(0,s.useState)(!0);return((0,s.useEffect)(()=>{fetch("/api/mermaid?file=diagram.mmd").then(e=>{if(404===e.status)return i(!0),o(!1),null;if(!e.ok)throw Error("Failed to load diagram");return e.json()}).then(e=>{(null==e?void 0:e.syntax)&&t(e.syntax),o(!1)}).catch(()=>{i(!0),o(!1)})},[]),l)?(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"mb-sp-5 text-title font-semibold text-text-primary",children:"Diagram"}),(0,a.jsx)("div",{className:"flex h-[600px] items-center justify-center rounded-md border border-border-default bg-surface-1",children:(0,a.jsx)(n.T,{label:"Loading diagram..."})})]}):r||!e?(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"mb-sp-5 text-title font-semibold text-text-primary",children:"Diagram"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-md border border-dashed border-border-emphasis bg-surface-1 py-sp-8",children:[(0,a.jsx)("p",{className:"mb-2 text-heading font-medium text-text-primary",children:"Not Yet Generated"}),(0,a.jsx)("p",{className:"text-body text-text-tertiary",children:"Use the diagram skill to generate diagram.mmd"})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"mb-sp-5 text-title font-semibold text-text-primary",children:"Diagram"}),(0,a.jsx)(n.D,{syntax:e})]})}},6870:function(e,t,r){"use strict";r.d(t,{D:function(){return i},T:function(){return n}});var a=r(7821),s=r(8078);function n(e){let{label:t="loading..."}=e;return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-sp-8",children:[(0,a.jsxs)("svg",{className:"h-5 w-5 animate-spin text-accent",viewBox:"0 0 24 24",fill:"none",children:[(0,a.jsx)("circle",{className:"opacity-20",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,a.jsx)("span",{className:"text-body text-text-secondary",children:t})]})}function i(e){let{syntax:t}=e,i=(0,s.useRef)(null),l=(0,s.useRef)(null),[o,c]=(0,s.useState)(null),[d,u]=(0,s.useState)(!0),[x,m]=(0,s.useState)(1),[f,h]=(0,s.useState)({x:0,y:0}),[b,p]=(0,s.useState)(!1),y=(0,s.useRef)({x:0,y:0}),g=(0,s.useRef)({x:0,y:0}),v=(0,s.useMemo)(()=>(function(e){let t=e.split("\n"),r=[],a=[],s=[],n=!1;for(let e of t){if(n){e.startsWith("%%")&&a.push(e.replace(/^%%\s*/,""));continue}if(e.trim().startsWith("%% --- Legend")){n=!0;continue}e.startsWith("%%")&&0===s.length?r.push(e.replace(/^%%\s*/,"")):s.push(e)}return{overview:r.join(" ").trim(),legend:a.filter(e=>e.trim()).map(e=>e.trim()),syntax:s.join("\n")}})(t),[t]);(0,s.useEffect)(()=>{let e=!1;return u(!0),async function(){try{let t=(await Promise.all([r.e(8382),r.e(6629),r.e(7973)]).then(r.bind(r,4282))).default;t.initialize({startOnLoad:!1,theme:"base",themeVariables:{background:"#1c1c1e",mainBkg:"#27272a",primaryColor:"#27272a",primaryBorderColor:"rgba(91,108,240,0.35)",primaryTextColor:"#ecedf0",lineColor:"rgba(91,108,240,0.45)",secondaryColor:"#313135",tertiaryColor:"#3c3c42",clusterBkg:"#222225",clusterBorder:"rgba(91,108,240,0.15)",edgeLabelBackground:"#1c1c1e",titleColor:"#9b9ca6",fontFamily:"Manrope, system-ui, sans-serif",fontSize:"12px",labelTextColor:"#ecedf0",nodeBorder:"rgba(91,108,240,0.35)",actorBkg:"#27272a",actorBorder:"rgba(91,108,240,0.35)",actorTextColor:"#ecedf0",actorLineColor:"rgba(91,108,240,0.25)",signalColor:"rgba(91,108,240,0.45)",signalTextColor:"#9b9ca6"},securityLevel:"loose",fontFamily:"Manrope, system-ui, sans-serif"});let a="mermaid-".concat(Date.now()),{svg:s}=await t.render(a,v.syntax);if(!e&&l.current){l.current.innerHTML=s;let e=l.current.querySelector("svg");if(e&&(e.style.maxWidth="none",e.style.height="auto",i.current)){let t=i.current.clientWidth-48,r=i.current.clientHeight-48,a=e.width.baseVal.value||e.getBoundingClientRect().width,s=e.height.baseVal.value||e.getBoundingClientRect().height;a>0&&s>0&&(m(Math.min(t/a,r/s,1)),h({x:0,y:0}))}u(!1)}}catch(t){e||(c(t instanceof Error?t.message:String(t)),u(!1))}}(),()=>{e=!0}},[v.syntax]);let j=(0,s.useCallback)(e=>{m(t=>Math.min(Math.max(.25,t+e),4))},[]),N=(0,s.useCallback)(()=>{m(1),h({x:0,y:0})},[]),C=(0,s.useCallback)(e=>{e.preventDefault(),j(e.deltaY>0?-.1:.1)},[j]),k=(0,s.useCallback)(e=>{0===e.button&&(p(!0),y.current={x:e.clientX,y:e.clientY},g.current={...f})},[f]),w=(0,s.useCallback)(e=>{b&&h({x:g.current.x+(e.clientX-y.current.x),y:g.current.y+(e.clientY-y.current.y)})},[b]),M=(0,s.useCallback)(()=>{p(!1)},[]);return o?(0,a.jsx)("div",{className:"flex h-[600px] items-center justify-center rounded-md border border-severity-critical/30 bg-severity-critical/5",children:(0,a.jsxs)("div",{className:"max-w-lg text-center",children:[(0,a.jsx)("p",{className:"mb-2 text-severity-critical",children:"Failed to render diagram"}),(0,a.jsx)("pre",{className:"whitespace-pre-wrap text-caption text-severity-critical/60",children:o})]})}):(0,a.jsxs)("div",{children:[v.overview&&(0,a.jsx)("p",{className:"mb-2 text-body text-text-secondary",children:v.overview}),(0,a.jsxs)("div",{className:"relative rounded-md border border-border-default bg-surface-1",children:[d&&(0,a.jsx)("div",{className:"absolute inset-0 z-20 flex items-center justify-center bg-surface-1",children:(0,a.jsx)(n,{label:"rendering diagram"})}),(0,a.jsx)("div",{ref:i,className:"h-[700px] overflow-hidden cursor-grab active:cursor-grabbing",onWheel:C,onMouseDown:k,onMouseMove:w,onMouseUp:M,onMouseLeave:M,children:(0,a.jsx)("div",{ref:l,className:"flex h-full w-full items-center justify-center p-sp-6",style:{transform:"translate(".concat(f.x,"px, ").concat(f.y,"px) scale(").concat(x,")"),transformOrigin:"center center",transition:b?"none":"transform 0.1s ease-out"}})}),(0,a.jsxs)("div",{className:"absolute bottom-3 right-3 z-10 flex items-center gap-1 rounded-md bg-surface-2 p-1 shadow-lg border border-border-default",children:[(0,a.jsx)("button",{type:"button",onClick:()=>j(.2),"aria-label":"Zoom in",className:"rounded px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:"+"}),(0,a.jsx)("button",{type:"button",onClick:()=>j(-.2),"aria-label":"Zoom out",className:"rounded px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:"−"}),(0,a.jsx)("button",{type:"button",onClick:N,"aria-label":"Reset zoom",className:"rounded px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:"⟳"}),(0,a.jsxs)("span",{className:"px-2 text-caption text-text-tertiary",children:[Math.round(100*x),"%"]})]}),v.legend.length>0&&(0,a.jsx)("div",{className:"absolute bottom-3 left-3 z-10 flex flex-wrap gap-x-3 gap-y-1 rounded-md bg-surface-2 px-3 py-2 text-caption font-mono text-text-tertiary border border-border-default",children:v.legend.map((e,t)=>(0,a.jsx)("span",{children:e},t))})]})]})}}},function(e){e.O(0,[7115,3205,1744],function(){return e(e.s=8885)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6805],{6674:function(e,t,r){Promise.resolve().then(r.bind(r,3443))},3443:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return l}});var a=r(7821),s=r(8078),n=r(6870);function l(){var e;let[t,r]=(0,s.useState)([]),[l,o]=(0,s.useState)(0),[i,c]=(0,s.useState)(null),[d,u]=(0,s.useState)(!0);return((0,s.useEffect)(()=>{fetch("/api/flows").then(e=>e.json()).then(e=>{var t;r(null!==(t=e.flows)&&void 0!==t?t:[]),u(!1)}).catch(()=>u(!1))},[]),(0,s.useEffect)(()=>{if(0===t.length)return;let e=t[l];e&&(c(null),fetch("/api/mermaid?file=".concat(encodeURIComponent(e.filename))).then(e=>{if(!e.ok)throw Error("Failed to load flow");return e.json()}).then(e=>{var t;return c(null!==(t=e.syntax)&&void 0!==t?t:null)}).catch(()=>c(null)))},[t,l]),d)?(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"mb-sp-5 text-title font-semibold text-text-primary",children:"Flows"}),(0,a.jsx)("div",{className:"flex h-[600px] items-center justify-center rounded-md border border-border-default bg-surface-1",children:(0,a.jsx)(n.T,{label:"Loading flows..."})})]}):0===t.length?(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"mb-sp-5 text-title font-semibold text-text-primary",children:"Flows"}),(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-md border border-dashed border-border-emphasis bg-surface-1 py-sp-8",children:[(0,a.jsx)("p",{className:"mb-2 text-heading font-medium text-text-primary",children:"Not Yet Generated"}),(0,a.jsx)("p",{className:"text-body text-text-tertiary",children:"Use the flows skill to generate flow diagrams"})]})]}):(0,a.jsxs)("div",{children:[(0,a.jsx)("h2",{className:"mb-sp-5 text-title font-semibold text-text-primary",children:"Flows"}),t.length>1&&(0,a.jsx)("div",{className:"mb-sp-4 inline-flex overflow-x-auto rounded-md bg-surface-3 p-1",children:t.map((e,t)=>(0,a.jsx)("button",{type:"button",onClick:()=>o(t),className:"whitespace-nowrap rounded-sm px-sp-3 py-1.5 text-body font-medium ".concat(l===t?"bg-surface-2 text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"),children:e.name},e.filename))}),i?(0,a.jsx)(n.D,{syntax:i},null===(e=t[l])||void 0===e?void 0:e.filename):(0,a.jsx)("div",{className:"flex h-[600px] items-center justify-center rounded-md border border-border-default bg-surface-1",children:(0,a.jsx)(n.T,{label:"Loading flow diagram..."})})]})}},6870:function(e,t,r){"use strict";r.d(t,{D:function(){return l},T:function(){return n}});var a=r(7821),s=r(8078);function n(e){let{label:t="loading..."}=e;return(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center gap-3 py-sp-8",children:[(0,a.jsxs)("svg",{className:"h-5 w-5 animate-spin text-accent",viewBox:"0 0 24 24",fill:"none",children:[(0,a.jsx)("circle",{className:"opacity-20",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,a.jsx)("span",{className:"text-body text-text-secondary",children:t})]})}function l(e){let{syntax:t}=e,l=(0,s.useRef)(null),o=(0,s.useRef)(null),[i,c]=(0,s.useState)(null),[d,u]=(0,s.useState)(!0),[x,m]=(0,s.useState)(1),[f,h]=(0,s.useState)({x:0,y:0}),[b,p]=(0,s.useState)(!1),y=(0,s.useRef)({x:0,y:0}),g=(0,s.useRef)({x:0,y:0}),v=(0,s.useMemo)(()=>(function(e){let t=e.split("\n"),r=[],a=[],s=[],n=!1;for(let e of t){if(n){e.startsWith("%%")&&a.push(e.replace(/^%%\s*/,""));continue}if(e.trim().startsWith("%% --- Legend")){n=!0;continue}e.startsWith("%%")&&0===s.length?r.push(e.replace(/^%%\s*/,"")):s.push(e)}return{overview:r.join(" ").trim(),legend:a.filter(e=>e.trim()).map(e=>e.trim()),syntax:s.join("\n")}})(t),[t]);(0,s.useEffect)(()=>{let e=!1;return u(!0),async function(){try{let t=(await Promise.all([r.e(8382),r.e(6629),r.e(7973)]).then(r.bind(r,4282))).default;t.initialize({startOnLoad:!1,theme:"base",themeVariables:{background:"#1c1c1e",mainBkg:"#27272a",primaryColor:"#27272a",primaryBorderColor:"rgba(91,108,240,0.35)",primaryTextColor:"#ecedf0",lineColor:"rgba(91,108,240,0.45)",secondaryColor:"#313135",tertiaryColor:"#3c3c42",clusterBkg:"#222225",clusterBorder:"rgba(91,108,240,0.15)",edgeLabelBackground:"#1c1c1e",titleColor:"#9b9ca6",fontFamily:"Manrope, system-ui, sans-serif",fontSize:"12px",labelTextColor:"#ecedf0",nodeBorder:"rgba(91,108,240,0.35)",actorBkg:"#27272a",actorBorder:"rgba(91,108,240,0.35)",actorTextColor:"#ecedf0",actorLineColor:"rgba(91,108,240,0.25)",signalColor:"rgba(91,108,240,0.45)",signalTextColor:"#9b9ca6"},securityLevel:"loose",fontFamily:"Manrope, system-ui, sans-serif"});let a="mermaid-".concat(Date.now()),{svg:s}=await t.render(a,v.syntax);if(!e&&o.current){o.current.innerHTML=s;let e=o.current.querySelector("svg");if(e&&(e.style.maxWidth="none",e.style.height="auto",l.current)){let t=l.current.clientWidth-48,r=l.current.clientHeight-48,a=e.width.baseVal.value||e.getBoundingClientRect().width,s=e.height.baseVal.value||e.getBoundingClientRect().height;a>0&&s>0&&(m(Math.min(t/a,r/s,1)),h({x:0,y:0}))}u(!1)}}catch(t){e||(c(t instanceof Error?t.message:String(t)),u(!1))}}(),()=>{e=!0}},[v.syntax]);let j=(0,s.useCallback)(e=>{m(t=>Math.min(Math.max(.25,t+e),4))},[]),w=(0,s.useCallback)(()=>{m(1),h({x:0,y:0})},[]),N=(0,s.useCallback)(e=>{e.preventDefault(),j(e.deltaY>0?-.1:.1)},[j]),C=(0,s.useCallback)(e=>{0===e.button&&(p(!0),y.current={x:e.clientX,y:e.clientY},g.current={...f})},[f]),k=(0,s.useCallback)(e=>{b&&h({x:g.current.x+(e.clientX-y.current.x),y:g.current.y+(e.clientY-y.current.y)})},[b]),M=(0,s.useCallback)(()=>{p(!1)},[]);return i?(0,a.jsx)("div",{className:"flex h-[600px] items-center justify-center rounded-md border border-severity-critical/30 bg-severity-critical/5",children:(0,a.jsxs)("div",{className:"max-w-lg text-center",children:[(0,a.jsx)("p",{className:"mb-2 text-severity-critical",children:"Failed to render diagram"}),(0,a.jsx)("pre",{className:"whitespace-pre-wrap text-caption text-severity-critical/60",children:i})]})}):(0,a.jsxs)("div",{children:[v.overview&&(0,a.jsx)("p",{className:"mb-2 text-body text-text-secondary",children:v.overview}),(0,a.jsxs)("div",{className:"relative rounded-md border border-border-default bg-surface-1",children:[d&&(0,a.jsx)("div",{className:"absolute inset-0 z-20 flex items-center justify-center bg-surface-1",children:(0,a.jsx)(n,{label:"rendering diagram"})}),(0,a.jsx)("div",{ref:l,className:"h-[700px] overflow-hidden cursor-grab active:cursor-grabbing",onWheel:N,onMouseDown:C,onMouseMove:k,onMouseUp:M,onMouseLeave:M,children:(0,a.jsx)("div",{ref:o,className:"flex h-full w-full items-center justify-center p-sp-6",style:{transform:"translate(".concat(f.x,"px, ").concat(f.y,"px) scale(").concat(x,")"),transformOrigin:"center center",transition:b?"none":"transform 0.1s ease-out"}})}),(0,a.jsxs)("div",{className:"absolute bottom-3 right-3 z-10 flex items-center gap-1 rounded-md bg-surface-2 p-1 shadow-lg border border-border-default",children:[(0,a.jsx)("button",{type:"button",onClick:()=>j(.2),"aria-label":"Zoom in",className:"rounded px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:"+"}),(0,a.jsx)("button",{type:"button",onClick:()=>j(-.2),"aria-label":"Zoom out",className:"rounded px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:"−"}),(0,a.jsx)("button",{type:"button",onClick:w,"aria-label":"Reset zoom",className:"rounded px-3 py-1.5 text-body text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:"⟳"}),(0,a.jsxs)("span",{className:"px-2 text-caption text-text-tertiary",children:[Math.round(100*x),"%"]})]}),v.legend.length>0&&(0,a.jsx)("div",{className:"absolute bottom-3 left-3 z-10 flex flex-wrap gap-x-3 gap-y-1 rounded-md bg-surface-2 px-3 py-2 text-caption font-mono text-text-tertiary border border-border-default",children:v.legend.map((e,t)=>(0,a.jsx)("span",{children:e},t))})]})]})}}},function(e){e.O(0,[7115,3205,1744],function(){return e(e.s=6674)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5419],{8750:function(e,t,a){Promise.resolve().then(a.bind(a,7780))},7780:function(e,t,a){"use strict";a.d(t,{FunctionsClient:function(){return d}});var n=a(7821),i=a(5640),l=a(3775);let r={external:"bg-[var(--critical)]/15 text-[var(--critical)]",public:"bg-[var(--high)]/15 text-[var(--high)]",internal:"bg-[var(--low)]/15 text-[var(--low)]",private:"bg-[var(--neutral)]/15 text-[var(--neutral)]"};function c(e){var t;let{visibility:a}=e,i=null!==(t=r[a])&&void 0!==t?t:"bg-[var(--neutral)]/15 text-[var(--neutral)]";return(0,n.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(i),children:a})}function s(e){let{items:t,color:a="default"}=e;if(0===t.length)return(0,n.jsx)("span",{className:"text-text-tertiary",children:"--"});let i="yellow"===a?"bg-[var(--medium)]/10 text-[var(--medium)]":"red"===a?"bg-[var(--critical)]/10 text-[var(--critical)]":"bg-surface-3 text-text-secondary";return(0,n.jsx)("div",{className:"flex flex-wrap gap-1",children:t.map(e=>(0,n.jsx)("span",{className:"inline-flex items-center rounded-sm px-1.5 py-0.5 font-mono text-caption ".concat(i),children:e},e))})}let o=[{id:"contract",header:"Contract",accessorKey:"contract",enableColumnFilter:!0,cell:e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("span",{className:"font-medium text-text-primary",children:e.contract}),e.inherited_from&&(0,n.jsxs)("span",{className:"ml-1.5 text-caption text-text-tertiary",children:["← ",e.inherited_from]})]})},{id:"name",header:"Function",accessorKey:"name",cell:e=>(0,n.jsx)("span",{className:"font-mono text-body text-text-secondary",children:e.name})},{id:"visibility",header:"Visibility",accessorKey:"visibility",enableColumnFilter:!0,cell:e=>(0,n.jsx)(c,{visibility:e.visibility})},{id:"state",header:"State",accessorKey:"state",enableColumnFilter:!0,cell:e=>{let t="writable"===e.state?"bg-[var(--high)]/15 text-[var(--high)]":"bg-[var(--low)]/15 text-[var(--low)]";return(0,n.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(t),children:e.state})}},{id:"payable",header:"Payable",accessorKey:"payable",enableColumnFilter:!0,cell:e=>{let t="payable"===e.payable?"bg-[var(--success)]/15 text-[var(--success)]":"bg-[var(--neutral)]/15 text-[var(--neutral)]";return(0,n.jsx)("span",{className:"inline-flex items-center rounded-sm px-2 py-0.5 text-caption font-medium ".concat(t),children:e.payable})}},{id:"modifiers",header:"Modifiers",accessorKey:"modifiers",cell:e=>(0,n.jsx)(s,{items:e.modifiers})},{id:"external_calls",header:"External Calls",accessorKey:"external_calls",cell:e=>(0,n.jsx)(s,{items:e.external_calls,color:"red"})},{id:"location",header:"Location",accessorKey:"evidence",cell:e=>(0,n.jsx)(l.i,{file:e.evidence.file,lineStart:e.evidence.line_start,lineEnd:e.evidence.line_end,snippet:e.evidence.snippet})}];function d(e){let{rows:t}=e;return(0,n.jsx)(i.v,{columns:o,data:t,defaultOpen:!0})}}},function(e){e.O(0,[8452,8928,7115,3205,1744],function(){return e(e.s=8750)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4521],{4260:function(e,t,a){Promise.resolve().then(a.bind(a,6310))},6310:function(e,t,a){"use strict";a.d(t,{IssuesBoardClient:function(){return x}});var r=a(7821),n=a(8078),s=a(3924);let i={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 o(e){var t;let{severity:a}=e,n=null!==(t=i[a])&&void 0!==t?t:i.Info;return(0,r.jsx)("span",{className:"inline-flex items-center rounded-md px-2 py-0.5 text-caption font-medium ".concat(n),children:a})}let l=[{id:"potential",label:"Potential",description:"Awaiting validation"},{id:"verified",label:"Verified",description:"Confirmed issues ready to report"},{id:"invalid",label:"Invalid",description:"Rejected after review"},{id:"duplicate",label:"Duplicate",description:"Covered by another entry"}],c={Critical:0,High:1,Medium:2,Low:3,Info:4},d=["Critical","High","Medium","Low","Info"],u=["Fixed","Mitigated","Acknowledged","Not Fixed","Unresolved"];function x(e){var t;let{issues:a}=e,[i,o]=(0,n.useState)(a),[d,u]=(0,n.useState)(null),[x,f]=(0,n.useState)("all");(0,n.useEffect)(()=>{o(a)},[a]);let b=(0,s.Dy)((0,s.VT)(s.we,{activationConstraint:{distance:4}})),v=(0,n.useMemo)(()=>"all"===x?i:i.filter(e=>e.source===x),[i,x]),g=(0,n.useMemo)(()=>{let e={potential:[],verified:[],invalid:[],duplicate:[]};for(let t of v)e[t.column].push(t);for(let t of Object.values(e))t.sort((e,t)=>{var a,r;return(null!==(a=c[e.severity])&&void 0!==a?a:5)-(null!==(r=c[t.severity])&&void 0!==r?r:5)||e.id.localeCompare(t.id)});return e},[v]),y=(0,n.useMemo)(()=>{let e={potential:0,verified:0,invalid:0,duplicate:0};for(let t of i)e[t.column]++;return e},[i]),j=(0,n.useCallback)(async(e,t)=>{o(a=>a.map(a=>a.id===e?{...a,column:t,status:function(e){switch(e){case"potential":return"pending_validation";case"verified":return"verified";case"invalid":return"rejected";case"duplicate":return"duplicate"}}(t),duplicate_of:"duplicate"===t?a.duplicate_of:null}:a));try{let a=await fetch("/api/issues/".concat(encodeURIComponent(e),"/move"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({column:t})});if(!a.ok){var r;let e=await a.json().catch(()=>({}));throw Error(null!==(r=e.error)&&void 0!==r?r:"move failed")}}catch(t){console.error(t),o(t=>t.map(t=>{var r;return t.id===e&&null!==(r=a.find(t=>t.id===e))&&void 0!==r?r:t}))}},[a]),N=(0,n.useCallback)(async(e,t)=>{o(a=>a.map(a=>a.id===e?{...a,...t}:a));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 a;let e=await r.json().catch(()=>({}));throw Error(null!==(a=e.error)&&void 0!==a?a:"update failed")}}catch(e){console.error(e)}},[]),w=null!==(t=i.find(e=>e.id===d))&&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 — ",y.potential," potential, ",y.verified," verified,"," ",y.invalid," invalid, ",y.duplicate," duplicate. Drag a card to change column; click to edit."]})]}),(0,r.jsx)(m,{value:x,onChange:f})]}),(0,r.jsx)(s.LB,{sensors:b,onDragEnd:e=>{let{active:t,over:a}=e;if(!a)return;let r=a.id,n=t.id,s=i.find(e=>e.id===n);s&&s.column!==r&&j(n,r)},children:(0,r.jsx)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-4",children:l.map(e=>(0,r.jsx)(p,{column:e,issues:g[e.id],onOpen:u},e.id))})}),w&&(0,r.jsx)(h,{issue:w,onClose:()=>u(null),onSave:e=>N(w.id,e)})]})}function m(e){let{value:t,onChange:a}=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 n=t===e.id;return(0,r.jsx)("button",{type:"button",onClick:()=>a(e.id),className:"rounded-md px-2.5 py-1 text-caption font-medium ".concat(n?"bg-accent text-surface-0":"bg-surface-2 text-text-secondary hover:text-text-primary"),children:e.label},e.id)})})}function p(e){let{column:t,issues:a,onOpen:n}=e,{isOver:i,setNodeRef:o}=(0,s.Zj)({id:t.id});return(0,r.jsxs)("section",{ref:o,"aria-label":t.label,className:"flex flex-col gap-2 rounded-lg border bg-surface-1 p-3 transition-colors ".concat(i?"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:a.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:[a.map(e=>(0,r.jsx)(f,{issue:e,onOpen:n},e.id)),0===a.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 f(e){let{issue:t,onOpen:a}=e,{attributes:n,listeners:i,setNodeRef:l,isDragging:c,transform:d}=(0,s.O1)({id:t.id}),u=d?{transform:"translate3d(".concat(d.x,"px, ").concat(d.y,"px, 0)"),zIndex:30}:{};return(0,r.jsxs)("article",{ref:l,style:u,...n,...i,onClick:e=>{d||(e.stopPropagation(),a(t.id))},className:"group cursor-grab rounded-md border bg-surface-0 p-3 text-left active:cursor-grabbing ".concat(c?"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)(o,{severity:t.severity})]}),(0,r.jsx)("h3",{className:"mt-1 text-body font-medium text-text-primary line-clamp-2",children:t.title}),(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5 text-caption",children:[(0,r.jsx)(b,{source:t.source}),t.github_synced&&(0,r.jsxs)("a",{href:t.github_issue_url,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"rounded-md bg-surface-2 px-1.5 py-0.5 text-text-secondary hover:bg-surface-3 hover:text-text-primary",children:["GH ","closed"===t.github_state?"✕":"✓"]}),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 b(e){var t;let{source:a}=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"})[a])&&void 0!==t?t:a})}function h(e){var t,a,s;let{issue:i,onClose:o,onSave:l}=e,[c,x]=(0,n.useState)(i.title),[m,p]=(0,n.useState)(i.severity),[f,h]=(0,n.useState)(i.description),[g,y]=(0,n.useState)(i.recommendation),[j,N]=(0,n.useState)(null!==(t=i.resolution)&&void 0!==t?t:""),[w,_]=(0,n.useState)(null!==(a=i.update_from_client)&&void 0!==a?a:""),[C,k]=(0,n.useState)(!1),S=(0,n.useRef)(null);(0,n.useEffect)(()=>{var e;null===(e=S.current)||void 0===e||e.focus()},[]);let M=async()=>{k(!0),await l({title:c,severity:m,description:f,recommendation:g,resolution:j||void 0,update_from_client:w||void 0}),k(!1),o()};return(0,r.jsx)("div",{ref:S,tabIndex:-1,className:"fixed inset-0 z-50 flex items-center justify-center p-4 outline-none",style:{background:"var(--overlay-bg)"},onClick:o,onKeyDown:e=>{"Escape"===e.key&&o()},children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Edit issue ".concat(i.id),className:"relative flex max-h-[90vh] w-full max-w-2xl 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",children:[(0,r.jsx)("span",{className:"font-mono text-body text-text-tertiary",children:i.id}),(0,r.jsx)(b,{source:i.source}),i.github_synced&&i.github_issue_url&&(0,r.jsx)("a",{href:i.github_issue_url,target:"_blank",rel:"noopener noreferrer",className:"rounded-md bg-surface-3 px-1.5 py-0.5 text-caption text-text-secondary hover:text-text-primary",children:"GitHub issue"})]}),(0,r.jsx)("button",{type:"button",onClick:o,"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:[(0,r.jsx)(v,{label:"Title",children:(0,r.jsx)("input",{type:"text",value:c,onChange:e=>x(e.target.value),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"})}),(0,r.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-3",children:[(0,r.jsx)(v,{label:"Severity",children:(0,r.jsx)("select",{value:m,onChange:e=>p(e.target.value),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",children:d.map(e=>(0,r.jsx)("option",{value:e,children:e},e))})}),(0,r.jsx)(v,{label:"Resolution (verified only)",children:(0,r.jsxs)("select",{value:j,onChange:e=>N(e.target.value),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",children:[(0,r.jsx)("option",{value:"",children:"— none —"}),u.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})})]}),(0,r.jsx)(v,{label:"Description",className:"mt-3",children:(0,r.jsx)("textarea",{value:f,onChange:e=>h(e.target.value),rows:8,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"})}),(0,r.jsx)(v,{label:"Recommendation",className:"mt-3",children:(0,r.jsx)("textarea",{value:g,onChange:e=>y(e.target.value),rows:4,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"})}),(0,r.jsx)(v,{label:"Update from the client",className:"mt-3",children:(0,r.jsx)("textarea",{value:w,onChange:e=>_(e.target.value),rows:4,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"})}),i.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:i.code_locations.map((e,t)=>(0,r.jsx)("li",{children:e.file},"".concat(e.file,"-").concat(t)))})]}),i.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!==(s=i.reasoning)&&void 0!==s?s:"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: ",i.match_signals.contract?"✓":"—"]}),(0,r.jsxs)("span",{children:["function: ",i.match_signals.function?"✓":"—"]}),(0,r.jsxs)("span",{children:["root_cause: ",i.match_signals.root_cause]}),(0,r.jsxs)("span",{children:["attack_vector: ",i.match_signals.attack_vector]})]})]})]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-border-default bg-surface-2 px-4 py-3",children:[(0,r.jsx)("button",{type:"button",onClick:o,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:M,disabled:C,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:C?"Saving…":"Save"})]})]})})}function v(e){let{label:t,className:a,children:n}=e;return(0,r.jsxs)("label",{className:"block ".concat(null!=a?a:""),children:[(0,r.jsx)("span",{className:"mb-1 block text-caption font-medium text-text-tertiary",children:t}),n]})}}},function(e){e.O(0,[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([[3185],{9640:function(e,t,r){Promise.resolve().then(r.t.bind(r,3812,23)),Promise.resolve().then(r.bind(r,2198)),Promise.resolve().then(r.bind(r,1187)),Promise.resolve().then(r.bind(r,4595)),Promise.resolve().then(r.t.bind(r,8414,23)),Promise.resolve().then(r.t.bind(r,5256,23))},2198:function(e,t,r){"use strict";r.d(t,{CommandPalette:function(){return i}});var n=r(7821),a=r(8078),s=r(168);let o=r(1187).p.flatMap(e=>e.items.map(t=>({href:t.href,label:"".concat(e.label," / ").concat(t.label)})));function i(){let[e,t]=(0,a.useState)(!1),[r,i]=(0,a.useState)(""),[l,c]=(0,a.useState)(0),d=(0,a.useRef)(null),u=(0,s.useRouter)(),h=r.trim()?o.filter(e=>e.label.toLowerCase().includes(r.toLowerCase())||e.href.includes(r.toLowerCase())):o;(0,a.useEffect)(()=>{let e=e=>{(e.ctrlKey||e.metaKey)&&"k"===e.key&&(e.preventDefault(),t(e=>!e),i(""),c(0)),"Escape"===e.key&&t(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),(0,a.useEffect)(()=>{e&&setTimeout(()=>{var e;return null===(e=d.current)||void 0===e?void 0:e.focus()},50)},[e]),(0,a.useEffect)(()=>c(0),[r]);let m=e=>{u.push(e),t(!1),i("")};return e?(0,n.jsx)("div",{className:"fixed inset-0 z-[9000] flex items-start justify-center px-4 pt-[12vh]",style:{background:"var(--overlay-bg)"},onClick:()=>t(!1),children:(0,n.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Quick navigation",className:"w-full max-w-lg rounded-lg border border-border-default bg-surface-1 shadow-lg",onClick:e=>e.stopPropagation(),children:[(0,n.jsxs)("div",{className:"flex items-center border-b border-border-default px-4 py-3 gap-2",children:[(0,n.jsx)("span",{className:"text-accent text-body font-medium shrink-0","aria-hidden":"true",children:">"}),(0,n.jsx)("input",{ref:d,type:"text",value:r,onChange:e=>i(e.target.value),placeholder:"search pages...","aria-label":"Search pages",className:"flex-1 bg-transparent text-body text-text-primary placeholder-text-tertiary outline-none",onKeyDown:e=>{"ArrowDown"===e.key?(e.preventDefault(),c(e=>Math.min(e+1,h.length-1))):"ArrowUp"===e.key?(e.preventDefault(),c(e=>Math.max(e-1,0))):"Enter"===e.key&&h[l]?m(h[l].href):"Tab"===e.key&&e.preventDefault()}}),(0,n.jsx)("kbd",{className:"shrink-0 border border-border-default px-1.5 py-0.5 text-caption text-text-tertiary",style:{borderRadius:"var(--radius-sm)"},children:"ESC"})]}),(0,n.jsx)("div",{className:"max-h-72 overflow-y-auto py-1",children:0===h.length?(0,n.jsx)("div",{className:"px-4 py-3 text-body text-text-tertiary",children:"no results"}):h.map((e,t)=>(0,n.jsxs)("button",{type:"button",className:"flex w-full items-center gap-3 px-4 py-2.5 text-left text-body focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-accent ".concat(t===l?"bg-accent-subtle text-accent":"text-text-secondary hover:bg-surface-2 hover:text-text-primary"),onClick:()=>m(e.href),onMouseEnter:()=>c(t),children:[(0,n.jsx)("span",{className:"text-text-tertiary text-caption shrink-0",children:t===l?">":" "}),(0,n.jsx)("span",{children:e.label}),(0,n.jsx)("span",{className:"ml-auto text-caption text-text-tertiary shrink-0",children:e.href})]},e.href))})]})}):null}},1187:function(e,t,r){"use strict";r.d(t,{DashboardLayout:function(){return p},p:function(){return f}});var n=r(7821),a=r(7498),s=r.n(a),o=r(168),i=r(4595),l=r(8078);function c(e,t){let r=Math.round((t.getTime()-e.getTime())/1e3);return r<5?"just now":r<60?"".concat(r,"s ago"):r<3600?"".concat(Math.round(r/60),"m ago"):"".concat(Math.round(r/3600),"h ago")}function d(){let e=(0,o.useRouter)(),[t,r]=(0,l.useState)(()=>new Date),[a,s]=(0,l.useState)(!1),[i,d]=(0,l.useState)(()=>new Date),[u,h]=(0,l.useState)(null),m=(0,l.useRef)(null),f=()=>{fetch("/api/github-status",{cache:"no-store"}).then(e=>e.ok?e.json():null).then(e=>{if(e&&"string"==typeof e.last_synced_at){var t;h({repo:null!==(t=e.repo)&&void 0!==t?t:"",last_synced_at:e.last_synced_at})}else h(null)}).catch(()=>h(null))};(0,l.useEffect)(()=>{f();let e=new EventSource("/api/watch");return e.onopen=()=>s(!0),e.onmessage=()=>{r(new Date),f()},e.onerror=()=>s(!1),()=>e.close()},[e]),(0,l.useEffect)(()=>{let e=setInterval(()=>d(new Date),3e4);return()=>clearInterval(e)},[]),(0,l.useEffect)(()=>()=>{m.current&&clearTimeout(m.current)},[]);let x=a?"Updated ".concat(c(t,i)):"Reconnecting…";return(0,n.jsxs)("div",{className:"px-3 py-1 text-caption text-text-tertiary","aria-live":"polite",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",title:"Last refresh ".concat(t.toLocaleTimeString()).concat(a?"":" — watcher disconnected"),children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full ".concat(a?"bg-[var(--success)]":"bg-[var(--medium)]"),"aria-hidden":"true"}),(0,n.jsx)("span",{children:x})]}),u&&(0,n.jsxs)("div",{className:"mt-1 flex items-center gap-2",title:"GitHub sync with ".concat(u.repo," at ").concat(new Date(u.last_synced_at).toLocaleTimeString()),children:[(0,n.jsx)("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-accent","aria-hidden":"true"}),(0,n.jsxs)("span",{children:["GitHub ",c(new Date(u.last_synced_at),i)]})]})]})}function u(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})})}function h(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})})}function m(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})})}let f=[{label:"Recon",items:[{href:"/",label:"Home",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"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"})})}},{href:"/progress",label:"Progress",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"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"})})}},{href:"/stats",label:"Stats",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"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"})})}}]},{label:"Analysis",items:[{href:"/access",label:"Access Control",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"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"})})}},{href:"/functions",label:"Functions",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"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"})})}},{href:"/calls",label:"Ext Calls",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 21 3 16.5m0 0L7.5 12M3 16.5h13.5m0-13.5L21 7.5m0 0L16.5 12M21 7.5H7.5"})})}}]},{label:"Reasoning",items:[{href:"/conformance",label:"Spec Conformance",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"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"})})}}]},{label:"Visual",items:[{href:"/diagram",label:"Diagram",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"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"})})}},{href:"/flows",label:"Flows",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"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"})})}}]},{label:"Issues",items:[{href:"/issues",label:"Board",icon:function(e){return(0,n.jsx)("svg",{...e,"aria-hidden":"true",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"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"})})}}]}];function x(){let{theme:e,setTheme:t}=(0,i.F)(),[r,a]=(0,l.useState)(!1);return((0,l.useEffect)(()=>a(!0),[]),r)?(0,n.jsxs)("button",{type:"button",onClick:()=>t("dark"===e?"light":"dark"),"aria-label":"Switch to ".concat("dark"===e?"light":"dark"," mode"),className:"flex w-full items-center gap-2.5 rounded-md px-3 py-2 text-body text-text-secondary hover:bg-surface-2 hover:text-text-primary",children:[(0,n.jsx)("light"===e?h:m,{className:"h-4 w-4 shrink-0"}),(0,n.jsx)("span",{children:"light"===e?"Light":"Dark"})]}):(0,n.jsx)("div",{className:"h-9"})}function p(e){let{children:t}=e,r=(0,o.usePathname)(),[a,i]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{i(!1)},[r]),(0,n.jsxs)("div",{className:"min-h-screen",children:[(0,n.jsx)("button",{type:"button","aria-label":"Toggle navigation",onClick:()=>i(!a),className:"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",children:(0,n.jsx)(u,{className:"h-5 w-5"})}),a&&(0,n.jsx)("div",{className:"fixed inset-0 z-40 md:hidden",style:{background:"var(--overlay-bg)"},onClick:()=>i(!1)}),(0,n.jsxs)("nav",{"aria-label":"Main navigation",className:"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 ".concat(a?"translate-x-0":"-translate-x-full"," md:translate-x-0"),children:[(0,n.jsx)("div",{className:"px-5 pb-4 pt-6",children:(0,n.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,n.jsx)("span",{className:"text-title font-semibold text-text-primary",children:"Hex"}),(0,n.jsx)("span",{className:"text-caption text-text-tertiary",children:"v0.4.0"})]})}),(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-3 pb-4",children:f.map(e=>(0,n.jsxs)("div",{className:"mt-6 first:mt-0",children:[(0,n.jsx)("div",{className:"mb-1.5 px-3 text-caption font-medium text-text-tertiary",children:e.label}),e.items.map(e=>{let t=r===e.href;return(0,n.jsxs)(s(),{href:e.href,"aria-current":t?"page":void 0,className:"group flex items-center gap-2.5 rounded-md px-3 py-2 text-body ".concat(t?"bg-accent-subtle text-accent font-medium":"text-text-secondary hover:bg-surface-2 hover:text-text-primary"),children:[(0,n.jsx)(e.icon,{className:"h-4 w-4 shrink-0"}),(0,n.jsx)("span",{children:e.label})]},e.href)})]},e.label))}),(0,n.jsxs)("div",{className:"border-t border-border-subtle px-3 py-3 space-y-1",children:[(0,n.jsx)(d,{}),(0,n.jsx)(x,{}),(0,n.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-1 text-caption text-text-tertiary",children:[(0,n.jsx)("kbd",{className:"rounded border border-border-default bg-surface-2 px-1.5 py-0.5 text-[11px]",children:"⌘K"}),(0,n.jsx)("span",{children:"Quick nav"})]})]})]}),(0,n.jsx)("main",{className:"min-h-screen bg-surface-0 p-6 pt-16 md:ml-[220px] md:pt-6",children:(0,n.jsx)("div",{className:"mx-auto max-w-6xl",children:t})})]})}},168:function(e,t,r){"use strict";var n=r(7462);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})},3812:function(){},5256:function(e){e.exports={style:{fontFamily:"'__JetBrains_Mono_3c557b', '__JetBrains_Mono_Fallback_3c557b'",fontStyle:"normal"},className:"__className_3c557b",variable:"__variable_3c557b"}},8414:function(e){e.exports={style:{fontFamily:"'__Manrope_73ee6c', '__Manrope_Fallback_73ee6c'",fontStyle:"normal"},className:"__className_73ee6c",variable:"__variable_73ee6c"}},4595:function(e,t,r){"use strict";r.d(t,{F:function(){return d},ThemeProvider:function(){return u}});var n=r(8078),a=(e,t,r,n,a,s,o,i)=>{let l=document.documentElement,c=["light","dark"];function d(t){(Array.isArray(e)?e:[e]).forEach(e=>{let r="class"===e,n=r&&s?a.map(e=>s[e]||e):a;r?(l.classList.remove(...n),l.classList.add(s&&s[t]?s[t]:t)):l.setAttribute(e,t)}),i&&c.includes(t)&&(l.style.colorScheme=t)}if(n)d(n);else try{let e=localStorage.getItem(t)||r,n=o&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e;d(n)}catch(e){}},s=["light","dark"],o="(prefers-color-scheme: dark)",i="undefined"==typeof window,l=n.createContext(void 0),c={setTheme:e=>{},themes:[]},d=()=>{var e;return null!=(e=n.useContext(l))?e:c},u=e=>n.useContext(l)?n.createElement(n.Fragment,null,e.children):n.createElement(m,{...e}),h=["light","dark"],m=e=>{let{forcedTheme:t,disableTransitionOnChange:r=!1,enableSystem:a=!0,enableColorScheme:i=!0,storageKey:c="theme",themes:d=h,defaultTheme:u=a?"system":"light",attribute:m="data-theme",value:b,children:y,nonce:k,scriptProps:g}=e,[j,w]=n.useState(()=>x(c,u)),[L,C]=n.useState(()=>"system"===j?v():j),M=b?Object.values(b):d,N=n.useCallback(e=>{let t=e;if(!t)return;"system"===e&&a&&(t=v());let n=b?b[t]:t,o=r?p(k):null,l=document.documentElement,c=e=>{"class"===e?(l.classList.remove(...M),n&&l.classList.add(n)):e.startsWith("data-")&&(n?l.setAttribute(e,n):l.removeAttribute(e))};if(Array.isArray(m)?m.forEach(c):c(m),i){let e=s.includes(u)?u:null,r=s.includes(t)?t:e;l.style.colorScheme=r}null==o||o()},[k]),_=n.useCallback(e=>{let t="function"==typeof e?e(j):e;w(t);try{localStorage.setItem(c,t)}catch(e){}},[j]),S=n.useCallback(e=>{C(v(e)),"system"===j&&a&&!t&&N("system")},[j,t]);n.useEffect(()=>{let e=window.matchMedia(o);return e.addListener(S),S(e),()=>e.removeListener(S)},[S]),n.useEffect(()=>{let e=e=>{e.key===c&&(e.newValue?w(e.newValue):_(u))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[_]),n.useEffect(()=>{N(null!=t?t:j)},[t,j]);let E=n.useMemo(()=>({theme:j,setTheme:_,forcedTheme:t,resolvedTheme:"system"===j?L:j,themes:a?[...d,"system"]:d,systemTheme:a?L:void 0}),[j,_,t,L,a,d]);return n.createElement(l.Provider,{value:E},n.createElement(f,{forcedTheme:t,storageKey:c,attribute:m,enableSystem:a,enableColorScheme:i,defaultTheme:u,value:b,themes:d,nonce:k,scriptProps:g}),y)},f=n.memo(e=>{let{forcedTheme:t,storageKey:r,attribute:s,enableSystem:o,enableColorScheme:i,defaultTheme:l,value:c,themes:d,nonce:u,scriptProps:h}=e,m=JSON.stringify([s,r,l,t,d,c,o,i]).slice(1,-1);return n.createElement("script",{...h,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?u:"",dangerouslySetInnerHTML:{__html:"(".concat(a.toString(),")(").concat(m,")")}})}),x=(e,t)=>{let r;if(!i){try{r=localStorage.getItem(e)||void 0}catch(e){}return r||t}},p=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},v=e=>(e||(e=window.matchMedia(o)),e.matches?"dark":"light")}},function(e){e.O(0,[5116,7498,7115,3205,1744],function(){return e(e.s=9640)}),_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}});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(e){e.O(0,[7498,7397,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 l(e){return e>=67?"text-[var(--success)]":e>=34?"text-[var(--medium)]":"text-[var(--critical)]"}let c={contract:0,abstract:1,library:2,interface:3},n={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,auditSteps:p,findingsTotal:m,findingsBySeverity:u,findingsTracked:h}=e,[v,f]=(0,r.useState)(x),[b,g]=(0,r.useState)("all"),j=(0,r.useMemo)(()=>t.filter(e=>v[i(e)]).reduce((e,t)=>e+t.nsloc,0),[t,v]),y=(0,r.useMemo)(()=>t.filter(e=>v[i(e)]).length,[t,v]),N=s>0?j/s*100:0,w=p.filter(e=>e.completed).length/p.length*100,C=m>0?h/m*100:100,k=.7*N+.2*w+.1*C,M=(0,r.useMemo)(()=>{let e=[...t].sort((e,t)=>{var s,a;let r=null!==(s=c[e.type])&&void 0!==s?s:99,i=null!==(a=c[t.type])&&void 0!==a?a:99;return r!==i?r-i:t.nsloc-e.nsloc});return"all"===b?e:e.filter(e=>{let t=!!v[i(e)];return"checked"===b?t:!t})},[t,b,v]),O=(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(l(k)),children:[k.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 ",N.toFixed(0),"% \xb7 Steps ",w.toFixed(0),"% \xb7 Triage ",C.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(k>=67?"bg-[var(--success)]":k>=34?"bg-[var(--medium)]":"bg-[var(--critical)]"),style:{width:"".concat(Math.min(k,100),"%")},role:"progressbar","aria-valuenow":Math.round(k),"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(l(k)),children:[k.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:[y," / ",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:[j.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:m}),(0,a.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:"Findings"}),Object.keys(u).length>0&&(0,a.jsx)("div",{className:"mt-2 flex flex-wrap gap-1.5",children:d.filter(e=>u[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:[u[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:p.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:()=>g(e),className:"rounded-sm px-2.5 py-1 text-caption font-medium ".concat(b===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(y,")"):"Remaining (".concat(t.length-y,")")},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:M.map(e=>{var t;let s=i(e),r=!!v[s],l=e.nsloc/O*100;return(0,a.jsxs)("tr",{className:"h-9 transition-colors ".concat(r?"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=!v[t];f(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(r?"border-[var(--accent)] bg-[var(--accent)] text-surface-0":"border-border-emphasis bg-surface-1 hover:border-[var(--accent)]"),children:r&&(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:e.contract}),(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=n[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(l,"%")}})})})]},s)})})]})})]})]})}}},function(e){e.O(0,[7115,3205,1744],function(){return e(e.s=5534)}),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2740],{8908:function(e,t,s){Promise.resolve().then(s.bind(s,9922))},9922:function(e,t,s){"use strict";s.d(t,{StatsClient:function(){return o}});var r=s(7821),a=s(8078),n=s(5640);function l(e){return e>=80?"bg-[var(--success)]":e>=50?"bg-[var(--medium)]":"bg-[var(--critical)]"}let 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)]"},i=["Summary","Per-Contract","Coverage","Dependencies"];function o(e){let{totals:t,per_contract:s,erc_eip_usage:n,dependencies:l,test_coverage:c}=e,[o,p]=(0,a.useState)("Summary");return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"mb-sp-5 inline-flex overflow-x-auto rounded-md bg-surface-3 p-1",children:i.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>p(e),className:"whitespace-nowrap rounded-sm px-sp-3 py-1.5 text-body font-medium ".concat(o===e?"bg-surface-2 text-text-primary shadow-sm":"text-text-secondary hover:text-text-primary"),children:e},e))}),"Summary"===o&&(0,r.jsx)(d,{totals:t,per_contract:s,erc_eip_usage:n}),"Per-Contract"===o&&(0,r.jsx)(x,{per_contract:s}),"Coverage"===o&&(0,r.jsx)(u,{test_coverage:c}),"Dependencies"===o&&(0,r.jsx)(m,{dependencies:l})]})}function d(e){let{totals:t,per_contract:s,erc_eip_usage:a}=e;return(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-sp-6 grid grid-cols-2 gap-sp-3 sm:grid-cols-3 lg:grid-cols-6",children:[(0,r.jsx)(p,{label:"Contracts",value:t.contracts}),(0,r.jsx)(p,{label:"nSLOC",value:t.nsloc.toLocaleString()}),(0,r.jsx)(p,{label:"Functions",value:s.reduce((e,t)=>e+t.functions,0)}),(0,r.jsx)(p,{label:"Modifiers",value:s.reduce((e,t)=>e+t.modifiers,0)}),(0,r.jsx)(p,{label:"Events",value:s.reduce((e,t)=>e+t.events,0)}),(0,r.jsx)(p,{label:"Assembly",value:t.assembly_lines})]}),a.length>0&&(0,r.jsxs)("div",{className:"mb-sp-6",children:[(0,r.jsx)("h3",{className:"mb-sp-2 text-heading font-medium text-text-primary",children:"ERC / EIP Usage"}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:a.map(e=>(0,r.jsx)("span",{className:"inline-flex items-center rounded-sm bg-[var(--info)]/15 px-2.5 py-1 text-caption font-medium text-[var(--info)]",children:e},e))})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-sp-4 text-caption text-text-tertiary",children:[(0,r.jsxs)("span",{children:["Total Lines: ",t.total_lines.toLocaleString()]}),(0,r.jsxs)("span",{children:["Comments: ",t.comment_lines.toLocaleString()]}),(0,r.jsxs)("span",{children:["Blank: ",t.blank_lines.toLocaleString()]}),(0,r.jsxs)("span",{children:["Files: ",t.files]}),(0,r.jsxs)("span",{children:["Interfaces: ",t.interfaces]}),(0,r.jsxs)("span",{children:["Libraries: ",t.libraries]}),(0,r.jsxs)("span",{children:["Abstract: ",t.abstract_contracts]})]})]})}function x(e){let{per_contract:t}=e,s=(0,a.useMemo)(()=>[{id:"file",header:"File",accessorKey:"file",cell:e=>(0,r.jsx)("span",{className:"max-w-[200px] truncate font-mono text-caption text-text-tertiary",children:e.file})},{id:"contract",header:"Contract",accessorKey:"contract",enableColumnFilter:!0,cell:e=>(0,r.jsx)("span",{className:"font-medium text-text-primary",children:e.contract})},{id:"type",header:"Type",accessorKey:"type",enableColumnFilter:!0,cell:e=>{var t;return(0,r.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})}},{id:"nsloc",header:"nSLOC",accessorKey:"nsloc",cell:e=>(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-secondary",children:e.nsloc})},{id:"functions",header:"Functions",accessorKey:"functions",cell:e=>(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-secondary",children:e.functions})},{id:"modifiers",header:"Modifiers",accessorKey:"modifiers",cell:e=>(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-secondary",children:e.modifiers})},{id:"events",header:"Events",accessorKey:"events",cell:e=>(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-secondary",children:e.events})},{id:"errors",header:"Errors",accessorKey:"errors",cell:e=>(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-secondary",children:e.errors})},{id:"assembly_lines",header:"Assembly",accessorKey:"assembly_lines",cell:e=>e.assembly_lines>0?(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-[var(--medium)]",children:e.assembly_lines}):(0,r.jsx)("span",{className:"text-right font-mono tabular-nums text-text-tertiary",children:"0"})},{id:"inherits",header:"Inherits",accessorKey:"inherits",cell:e=>(0,r.jsx)("span",{className:"max-w-[200px] truncate text-caption text-text-tertiary",children:e.inherits.length>0?e.inherits.join(", "):"--"})}],[]),l=(0,a.useMemo)(()=>({nsloc:t.reduce((e,t)=>e+t.nsloc,0),functions:t.reduce((e,t)=>e+t.functions,0),modifiers:t.reduce((e,t)=>e+t.modifiers,0),events:t.reduce((e,t)=>e+t.events,0),errors:t.reduce((e,t)=>e+t.errors,0),assembly:t.reduce((e,t)=>e+t.assembly_lines,0)}),[t]);return(0,r.jsxs)("div",{children:[(0,r.jsx)(n.v,{columns:s,data:t,defaultOpen:!0}),(0,r.jsxs)("div",{className:"mt-sp-3 flex flex-wrap gap-sp-4 rounded-md border border-border-default bg-surface-2 px-sp-4 py-sp-3 text-body font-medium text-text-primary",children:[(0,r.jsxs)("span",{children:["Total (",t.length," contracts)"]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["nSLOC: ",l.nsloc]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["Functions: ",l.functions]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["Modifiers: ",l.modifiers]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["Events: ",l.events]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["Errors: ",l.errors]}),(0,r.jsxs)("span",{className:"font-mono tabular-nums",children:["Assembly: ",l.assembly]})]})]})}function u(e){let{test_coverage:t}=e;return t&&"available"===t.status?(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-sp-3 grid grid-cols-2 gap-sp-3 sm:grid-cols-4",children:[null!=t.overall_line_pct&&(0,r.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption text-text-secondary",children:"Line Coverage"}),(0,r.jsxs)("div",{className:"text-display text-text-primary",children:[t.overall_line_pct.toFixed(1),"%"]}),(0,r.jsx)("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-surface-3",children:(0,r.jsx)("div",{className:"h-full rounded-full ".concat(l(t.overall_line_pct)),style:{width:"".concat(Math.min(t.overall_line_pct,100),"%")}})})]}),null!=t.overall_branch_pct&&(0,r.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,r.jsx)("div",{className:"mb-1 text-caption text-text-secondary",children:"Branch Coverage"}),(0,r.jsxs)("div",{className:"text-display text-text-primary",children:[t.overall_branch_pct.toFixed(1),"%"]}),(0,r.jsx)("div",{className:"mt-2 h-1.5 w-full overflow-hidden rounded-full bg-surface-3",children:(0,r.jsx)("div",{className:"h-full rounded-full ".concat(l(t.overall_branch_pct)),style:{width:"".concat(Math.min(t.overall_branch_pct,100),"%")}})})]})]}),t.per_contract.length>0&&(0,r.jsx)("div",{className:"overflow-x-auto rounded-md border border-border-default",children:(0,r.jsxs)("table",{className:"w-full text-left text-body",children:[(0,r.jsx)("thead",{className:"border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Contract"}),(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"File"}),(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Line %"}),(0,r.jsx)("th",{className:"w-48 px-sp-4 py-sp-2",children:"Line Coverage"}),(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Branch %"}),(0,r.jsx)("th",{className:"w-48 px-sp-4 py-sp-2",children:"Branch Coverage"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border-subtle",children:t.per_contract.map(e=>(0,r.jsxs)("tr",{className:"h-9 bg-surface-1 hover:bg-surface-3",children:[(0,r.jsx)("td",{className:"px-sp-4 py-sp-2 font-medium text-text-primary",children:e.contract}),(0,r.jsx)("td",{className:"max-w-[200px] truncate px-sp-4 py-sp-2 font-mono text-caption text-text-tertiary",children:e.file}),(0,r.jsxs)("td",{className:"px-sp-4 py-sp-2 font-mono tabular-nums text-text-secondary",children:[e.line_pct.toFixed(1),"%"]}),(0,r.jsx)("td",{className:"px-sp-4 py-sp-2",children:(0,r.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-surface-3",children:(0,r.jsx)("div",{className:"h-full rounded-full ".concat(l(e.line_pct)),style:{width:"".concat(Math.min(e.line_pct,100),"%")}})})}),(0,r.jsxs)("td",{className:"px-sp-4 py-sp-2 font-mono tabular-nums text-text-secondary",children:[e.branch_pct.toFixed(1),"%"]}),(0,r.jsx)("td",{className:"px-sp-4 py-sp-2",children:(0,r.jsx)("div",{className:"h-1.5 w-full overflow-hidden rounded-full bg-surface-3",children:(0,r.jsx)("div",{className:"h-full rounded-full ".concat(l(e.branch_pct)),style:{width:"".concat(Math.min(e.branch_pct,100),"%")}})})})]},"".concat(e.file,":").concat(e.contract)))})]})})]}):(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-md border border-dashed border-border-emphasis bg-surface-1 py-sp-8",children:[(0,r.jsx)("p",{className:"mb-2 text-heading font-medium text-text-primary",children:"No Coverage Data"}),(0,r.jsx)("p",{className:"text-body text-text-tertiary",children:"Run tests with coverage enabled to see results here."})]})}function m(e){let{dependencies:t}=e;return 0===t.length?(0,r.jsxs)("div",{className:"flex flex-col items-center justify-center rounded-md border border-dashed border-border-emphasis bg-surface-1 py-sp-8",children:[(0,r.jsx)("p",{className:"mb-2 text-heading font-medium text-text-primary",children:"No Dependencies"}),(0,r.jsx)("p",{className:"text-body text-text-tertiary",children:"No external dependencies were detected."})]}):(0,r.jsx)("div",{className:"overflow-x-auto rounded-md border border-border-default",children:(0,r.jsxs)("table",{className:"w-full text-left text-body",children:[(0,r.jsx)("thead",{className:"border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary",children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Package"}),(0,r.jsx)("th",{className:"px-sp-4 py-sp-2",children:"Version"}),(0,r.jsx)("th",{className:"px-sp-4 py-sp-2 text-right",children:"Imports"})]})}),(0,r.jsx)("tbody",{className:"divide-y divide-border-subtle",children:t.map(e=>{var t;return(0,r.jsxs)("tr",{className:"h-9 bg-surface-1 hover:bg-surface-3",children:[(0,r.jsx)("td",{className:"px-sp-4 py-sp-2 font-medium text-text-primary",children:e.package}),(0,r.jsx)("td",{className:"px-sp-4 py-sp-2 font-mono text-body text-text-tertiary",children:null!==(t=e.version)&&void 0!==t?t:"--"}),(0,r.jsx)("td",{className:"px-sp-4 py-sp-2 text-right font-mono tabular-nums text-text-secondary",children:e.imports})]},e.package)})})]})})}function p(e){let{label:t,value:s}=e;return(0,r.jsxs)("div",{className:"rounded-md border border-border-default bg-surface-2 p-sp-4",children:[(0,r.jsx)("div",{className:"text-display text-text-primary",children:s}),(0,r.jsx)("div",{className:"mt-1 text-caption text-text-secondary",children:t})]})}},5640:function(e,t,s){"use strict";s.d(t,{v:function(){return c}});var r=s(7821),a=s(8078),n=s(8452),l=s(3299);function c(e){let{columns:t,data:s,title:c,defaultOpen:i=!0,rowClassName:o,onRowClick:d,expandedRow:x}=e,[u,m]=(0,a.useState)(i),[p,h]=(0,a.useState)([]),[f,b]=(0,a.useState)([]),[v,y]=(0,a.useState)(null),j=(0,a.useMemo)(()=>t.map(e=>{var t;return{id:e.id,accessorKey:e.accessorKey,header:e.header,enableColumnFilter:null!==(t=e.enableColumnFilter)&&void 0!==t&&t,filterFn:e.enableColumnFilter?"equalsString":void 0,...e.sortingFn?{sortingFn:e.sortingFn}:{},cell:e.cell?t=>{let{row:s}=t;return e.cell(s.original)}:e=>{var t;let{getValue:s}=e;return(0,r.jsx)("span",{className:"text-text-primary",children:String(null!==(t=s())&&void 0!==t?t:"")})}}}),[t]),g=(0,n.b7)({data:s,columns:j,state:{sorting:p,columnFilters:f},onSortingChange:h,onColumnFiltersChange:b,getCoreRowModel:(0,l.sC)(),getFilteredRowModel:(0,l.vL)(),getSortedRowModel:(0,l.tj)()}),N=(0,a.useMemo)(()=>{let e={};for(let r of t){if(!r.enableColumnFilter)continue;let t=new Set;for(let e of s){let s=e[r.accessorKey];null!=s&&t.add(String(s))}let a=[...t];if(r.filterOrder){let e=r.filterOrder;a.sort((t,s)=>{let r=e.indexOf(t),a=e.indexOf(s);return(-1===r?999:r)-(-1===a?999:a)})}else a.sort();e[r.id]=a}return e},[t,s]),w=t.filter(e=>e.enableColumnFilter);return(0,r.jsxs)("div",{className:"overflow-hidden border border-border-default",style:{borderRadius:"var(--radius-sm)"},children:[c&&(0,r.jsxs)("button",{type:"button",onClick:()=>m(!u),"aria-expanded":u,className:"flex w-full items-center justify-between bg-surface-2 px-sp-4 py-sp-3 text-left hover:bg-surface-3",children:[(0,r.jsxs)("span",{className:"text-heading font-medium text-text-primary",children:[c," (",s.length,")"]}),(0,r.jsx)("svg",{className:"h-4 w-4 text-text-tertiary ".concat(u?"rotate-180":""),"aria-hidden":"true",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19 9-7 7-7-7"})})]}),u&&(0,r.jsxs)(r.Fragment,{children:[w.length>0&&(0,r.jsx)("div",{className:"flex flex-wrap gap-2 border-b border-border-subtle bg-surface-1 px-sp-4 py-sp-2",children:w.map(e=>{var t;let a=f.find(t=>t.id===e.id);return(0,r.jsxs)("div",{className:"flex flex-wrap gap-1",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>b(t=>t.filter(t=>t.id!==e.id)),"aria-pressed":!(null==a?void 0:a.value),className:"rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ".concat((null==a?void 0:a.value)?"bg-surface-3 text-text-secondary hover:text-text-primary":"bg-accent text-surface-0"),children:["All ",e.header]}),(null!==(t=N[e.id])&&void 0!==t?t:[]).map(t=>{let n=s.filter(s=>String(s[e.accessorKey])===t).length,l=(null==a?void 0:a.value)===t;return(0,r.jsxs)("button",{type:"button",onClick:()=>b(s=>{let r=s.filter(t=>t.id!==e.id);return l?r:[...r,{id:e.id,value:t}]}),"aria-pressed":l,className:"rounded-md px-3 py-1.5 text-caption font-medium focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-accent ".concat(l?"bg-accent text-surface-0":"bg-surface-3 text-text-secondary hover:text-text-primary"),children:[t,(0,r.jsx)("span",{className:"ml-1 opacity-60",children:n})]},t)})]},e.id)})}),(0,r.jsx)("div",{className:"overflow-x-auto",children:(0,r.jsxs)("table",{className:"w-full text-left text-body",children:[(0,r.jsx)("thead",{className:"border-b border-border-default bg-surface-2 text-caption font-medium uppercase tracking-wider text-text-tertiary",children:(0,r.jsx)("tr",{children:g.getHeaderGroups().map(e=>e.headers.map(e=>(0,r.jsx)("th",{scope:"col","aria-sort":"asc"===e.column.getIsSorted()?"ascending":"desc"===e.column.getIsSorted()?"descending":void 0,className:"cursor-pointer select-none px-sp-4 py-sp-2 hover:text-text-secondary",onClick:e.column.getToggleSortingHandler(),children:(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[(0,n.ie)(e.column.columnDef.header,e.getContext()),"asc"===e.column.getIsSorted()&&(0,r.jsx)("svg",{className:"h-3 w-3","aria-hidden":"true",viewBox:"0 0 12 12",fill:"currentColor",children:(0,r.jsx)("path",{d:"M6 2l4 5H2z"})}),"desc"===e.column.getIsSorted()&&(0,r.jsx)("svg",{className:"h-3 w-3","aria-hidden":"true",viewBox:"0 0 12 12",fill:"currentColor",children:(0,r.jsx)("path",{d:"M6 10l4-5H2z"})})]})},e.id)))})}),(0,r.jsx)("tbody",{className:"divide-y divide-border-subtle",children:g.getRowModel().rows.map(e=>{let s=e.original,l=s.id?String(s.id):e.id,c=v===l,i=!!d||!!x;return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsx)("tr",{className:"".concat(o?o(s):"bg-surface-1 hover:bg-surface-3"," ").concat(i?"cursor-pointer":""),role:i?"button":void 0,tabIndex:i?0:void 0,"aria-expanded":x?c:void 0,onClick:()=>{x&&y(c?null:l),null==d||d(s)},onKeyDown:i?e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),x&&y(c?null:l),null==d||d(s))}:void 0,children:e.getVisibleCells().map(e=>(0,r.jsx)("td",{className:"h-9 px-sp-4 py-sp-2",children:(0,n.ie)(e.column.columnDef.cell,e.getContext())},e.id))}),x&&c&&(0,r.jsx)("tr",{children:(0,r.jsx)("td",{colSpan:t.length,className:"bg-surface-0 px-sp-5 py-sp-4",children:x(s)})})]},e.id)})})]})})]})]})}}},function(e){e.O(0,[8452,7115,3205,1744],function(){return e(e.s=8908)}),_N_E=e.O()}]);