prism0x2a 0.7.1 → 0.7.2

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 (300) hide show
  1. package/.next/standalone/.next/BUILD_ID +1 -1
  2. package/.next/standalone/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/standalone/.next/build-manifest.json +3 -3
  4. package/.next/standalone/.next/prerender-manifest.json +24 -0
  5. package/.next/standalone/.next/required-server-files.json +1 -1
  6. package/.next/standalone/.next/routes-manifest.json +6 -0
  7. package/.next/standalone/.next/server/app/_global-error.html +1 -1
  8. package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  12. package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  13. package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  14. package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/standalone/.next/server/app/_not-found.html +1 -1
  16. package/.next/standalone/.next/server/app/_not-found.rsc +2 -2
  17. package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  18. package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  19. package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  20. package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  21. package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  22. package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  23. package/.next/standalone/.next/server/app/amber/capabilities/[id]/page_client-reference-manifest.js +1 -1
  24. package/.next/standalone/.next/server/app/amber/capabilities/page_client-reference-manifest.js +1 -1
  25. package/.next/standalone/.next/server/app/amber/capabilities.html +1 -1
  26. package/.next/standalone/.next/server/app/amber/capabilities.rsc +3 -3
  27. package/.next/standalone/.next/server/app/amber/capabilities.segments/_full.segment.rsc +3 -3
  28. package/.next/standalone/.next/server/app/amber/capabilities.segments/_head.segment.rsc +1 -1
  29. package/.next/standalone/.next/server/app/amber/capabilities.segments/_index.segment.rsc +2 -2
  30. package/.next/standalone/.next/server/app/amber/capabilities.segments/_tree.segment.rsc +2 -2
  31. package/.next/standalone/.next/server/app/amber/capabilities.segments/amber/capabilities/__PAGE__.segment.rsc +2 -2
  32. package/.next/standalone/.next/server/app/amber/capabilities.segments/amber/capabilities.segment.rsc +1 -1
  33. package/.next/standalone/.next/server/app/amber/capabilities.segments/amber.segment.rsc +1 -1
  34. package/.next/standalone/.next/server/app/amber/coverage/page_client-reference-manifest.js +1 -1
  35. package/.next/standalone/.next/server/app/amber/coverage.html +1 -1
  36. package/.next/standalone/.next/server/app/amber/coverage.rsc +3 -3
  37. package/.next/standalone/.next/server/app/amber/coverage.segments/_full.segment.rsc +3 -3
  38. package/.next/standalone/.next/server/app/amber/coverage.segments/_head.segment.rsc +1 -1
  39. package/.next/standalone/.next/server/app/amber/coverage.segments/_index.segment.rsc +2 -2
  40. package/.next/standalone/.next/server/app/amber/coverage.segments/_tree.segment.rsc +2 -2
  41. package/.next/standalone/.next/server/app/amber/coverage.segments/amber/coverage/__PAGE__.segment.rsc +2 -2
  42. package/.next/standalone/.next/server/app/amber/coverage.segments/amber/coverage.segment.rsc +1 -1
  43. package/.next/standalone/.next/server/app/amber/coverage.segments/amber.segment.rsc +1 -1
  44. package/.next/standalone/.next/server/app/amber/files/page_client-reference-manifest.js +1 -1
  45. package/.next/standalone/.next/server/app/amber/files.html +1 -1
  46. package/.next/standalone/.next/server/app/amber/files.rsc +3 -3
  47. package/.next/standalone/.next/server/app/amber/files.segments/_full.segment.rsc +3 -3
  48. package/.next/standalone/.next/server/app/amber/files.segments/_head.segment.rsc +1 -1
  49. package/.next/standalone/.next/server/app/amber/files.segments/_index.segment.rsc +2 -2
  50. package/.next/standalone/.next/server/app/amber/files.segments/_tree.segment.rsc +2 -2
  51. package/.next/standalone/.next/server/app/amber/files.segments/amber/files/__PAGE__.segment.rsc +2 -2
  52. package/.next/standalone/.next/server/app/amber/files.segments/amber/files.segment.rsc +1 -1
  53. package/.next/standalone/.next/server/app/amber/files.segments/amber.segment.rsc +1 -1
  54. package/.next/standalone/.next/server/app/amber/page_client-reference-manifest.js +1 -1
  55. package/.next/standalone/.next/server/app/amber.html +1 -1
  56. package/.next/standalone/.next/server/app/amber.rsc +3 -3
  57. package/.next/standalone/.next/server/app/amber.segments/_full.segment.rsc +3 -3
  58. package/.next/standalone/.next/server/app/amber.segments/_head.segment.rsc +1 -1
  59. package/.next/standalone/.next/server/app/amber.segments/_index.segment.rsc +2 -2
  60. package/.next/standalone/.next/server/app/amber.segments/_tree.segment.rsc +2 -2
  61. package/.next/standalone/.next/server/app/amber.segments/amber/__PAGE__.segment.rsc +2 -2
  62. package/.next/standalone/.next/server/app/amber.segments/amber.segment.rsc +1 -1
  63. package/.next/standalone/.next/server/app/api/amber/scan/route.js.nft.json +1 -1
  64. package/.next/standalone/.next/server/app/api/blue/scan/route.js.nft.json +1 -1
  65. package/.next/standalone/.next/server/app/api/green/cross-layer/route.js.nft.json +1 -1
  66. package/.next/standalone/.next/server/app/api/green/queries/[id]/run/route.js.nft.json +1 -1
  67. package/.next/standalone/.next/server/app/api/monorepo/route.js.nft.json +1 -1
  68. package/.next/standalone/.next/server/app/blue/page_client-reference-manifest.js +1 -1
  69. package/.next/standalone/.next/server/app/blue/recommendations/[id]/page_client-reference-manifest.js +1 -1
  70. package/.next/standalone/.next/server/app/blue/recommendations/page_client-reference-manifest.js +1 -1
  71. package/.next/standalone/.next/server/app/blue/recommendations.html +1 -1
  72. package/.next/standalone/.next/server/app/blue/recommendations.rsc +3 -3
  73. package/.next/standalone/.next/server/app/blue/recommendations.segments/_full.segment.rsc +3 -3
  74. package/.next/standalone/.next/server/app/blue/recommendations.segments/_head.segment.rsc +1 -1
  75. package/.next/standalone/.next/server/app/blue/recommendations.segments/_index.segment.rsc +2 -2
  76. package/.next/standalone/.next/server/app/blue/recommendations.segments/_tree.segment.rsc +2 -2
  77. package/.next/standalone/.next/server/app/blue/recommendations.segments/blue/recommendations/__PAGE__.segment.rsc +2 -2
  78. package/.next/standalone/.next/server/app/blue/recommendations.segments/blue/recommendations.segment.rsc +1 -1
  79. package/.next/standalone/.next/server/app/blue/recommendations.segments/blue.segment.rsc +1 -1
  80. package/.next/standalone/.next/server/app/blue/sessions/[id]/page_client-reference-manifest.js +1 -1
  81. package/.next/standalone/.next/server/app/blue/sessions/page_client-reference-manifest.js +1 -1
  82. package/.next/standalone/.next/server/app/blue/sessions.html +1 -1
  83. package/.next/standalone/.next/server/app/blue/sessions.rsc +3 -3
  84. package/.next/standalone/.next/server/app/blue/sessions.segments/_full.segment.rsc +3 -3
  85. package/.next/standalone/.next/server/app/blue/sessions.segments/_head.segment.rsc +1 -1
  86. package/.next/standalone/.next/server/app/blue/sessions.segments/_index.segment.rsc +2 -2
  87. package/.next/standalone/.next/server/app/blue/sessions.segments/_tree.segment.rsc +2 -2
  88. package/.next/standalone/.next/server/app/blue/sessions.segments/blue/sessions/__PAGE__.segment.rsc +2 -2
  89. package/.next/standalone/.next/server/app/blue/sessions.segments/blue/sessions.segment.rsc +1 -1
  90. package/.next/standalone/.next/server/app/blue/sessions.segments/blue.segment.rsc +1 -1
  91. package/.next/standalone/.next/server/app/blue.html +1 -1
  92. package/.next/standalone/.next/server/app/blue.rsc +3 -3
  93. package/.next/standalone/.next/server/app/blue.segments/_full.segment.rsc +3 -3
  94. package/.next/standalone/.next/server/app/blue.segments/_head.segment.rsc +1 -1
  95. package/.next/standalone/.next/server/app/blue.segments/_index.segment.rsc +2 -2
  96. package/.next/standalone/.next/server/app/blue.segments/_tree.segment.rsc +2 -2
  97. package/.next/standalone/.next/server/app/blue.segments/blue/__PAGE__.segment.rsc +2 -2
  98. package/.next/standalone/.next/server/app/blue.segments/blue.segment.rsc +1 -1
  99. package/.next/standalone/.next/server/app/green/cross-layer/page_client-reference-manifest.js +1 -1
  100. package/.next/standalone/.next/server/app/green/cross-layer.html +1 -1
  101. package/.next/standalone/.next/server/app/green/cross-layer.rsc +3 -3
  102. package/.next/standalone/.next/server/app/green/cross-layer.segments/_full.segment.rsc +3 -3
  103. package/.next/standalone/.next/server/app/green/cross-layer.segments/_head.segment.rsc +1 -1
  104. package/.next/standalone/.next/server/app/green/cross-layer.segments/_index.segment.rsc +2 -2
  105. package/.next/standalone/.next/server/app/green/cross-layer.segments/_tree.segment.rsc +2 -2
  106. package/.next/standalone/.next/server/app/green/cross-layer.segments/green/cross-layer/__PAGE__.segment.rsc +2 -2
  107. package/.next/standalone/.next/server/app/green/cross-layer.segments/green/cross-layer.segment.rsc +1 -1
  108. package/.next/standalone/.next/server/app/green/cross-layer.segments/green.segment.rsc +1 -1
  109. package/.next/standalone/.next/server/app/green/insights/[id]/page_client-reference-manifest.js +1 -1
  110. package/.next/standalone/.next/server/app/green/insights/page_client-reference-manifest.js +1 -1
  111. package/.next/standalone/.next/server/app/green/insights.html +1 -1
  112. package/.next/standalone/.next/server/app/green/insights.rsc +3 -3
  113. package/.next/standalone/.next/server/app/green/insights.segments/_full.segment.rsc +3 -3
  114. package/.next/standalone/.next/server/app/green/insights.segments/_head.segment.rsc +1 -1
  115. package/.next/standalone/.next/server/app/green/insights.segments/_index.segment.rsc +2 -2
  116. package/.next/standalone/.next/server/app/green/insights.segments/_tree.segment.rsc +2 -2
  117. package/.next/standalone/.next/server/app/green/insights.segments/green/insights/__PAGE__.segment.rsc +2 -2
  118. package/.next/standalone/.next/server/app/green/insights.segments/green/insights.segment.rsc +1 -1
  119. package/.next/standalone/.next/server/app/green/insights.segments/green.segment.rsc +1 -1
  120. package/.next/standalone/.next/server/app/green/page_client-reference-manifest.js +1 -1
  121. package/.next/standalone/.next/server/app/green/queries/[id]/page_client-reference-manifest.js +1 -1
  122. package/.next/standalone/.next/server/app/green/queries/page_client-reference-manifest.js +1 -1
  123. package/.next/standalone/.next/server/app/green/queries.html +1 -1
  124. package/.next/standalone/.next/server/app/green/queries.rsc +3 -3
  125. package/.next/standalone/.next/server/app/green/queries.segments/_full.segment.rsc +3 -3
  126. package/.next/standalone/.next/server/app/green/queries.segments/_head.segment.rsc +1 -1
  127. package/.next/standalone/.next/server/app/green/queries.segments/_index.segment.rsc +2 -2
  128. package/.next/standalone/.next/server/app/green/queries.segments/_tree.segment.rsc +2 -2
  129. package/.next/standalone/.next/server/app/green/queries.segments/green/queries/__PAGE__.segment.rsc +2 -2
  130. package/.next/standalone/.next/server/app/green/queries.segments/green/queries.segment.rsc +1 -1
  131. package/.next/standalone/.next/server/app/green/queries.segments/green.segment.rsc +1 -1
  132. package/.next/standalone/.next/server/app/green.html +1 -1
  133. package/.next/standalone/.next/server/app/green.rsc +3 -3
  134. package/.next/standalone/.next/server/app/green.segments/_full.segment.rsc +3 -3
  135. package/.next/standalone/.next/server/app/green.segments/_head.segment.rsc +1 -1
  136. package/.next/standalone/.next/server/app/green.segments/_index.segment.rsc +2 -2
  137. package/.next/standalone/.next/server/app/green.segments/_tree.segment.rsc +2 -2
  138. package/.next/standalone/.next/server/app/green.segments/green/__PAGE__.segment.rsc +2 -2
  139. package/.next/standalone/.next/server/app/green.segments/green.segment.rsc +1 -1
  140. package/.next/standalone/.next/server/app/index.html +1 -1
  141. package/.next/standalone/.next/server/app/index.rsc +3 -3
  142. package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
  143. package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +3 -3
  144. package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
  145. package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +2 -2
  146. package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  147. package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
  148. package/.next/standalone/.next/server/app/pricing/page/app-paths-manifest.json +3 -0
  149. package/.next/standalone/.next/server/app/pricing/page/build-manifest.json +16 -0
  150. package/.next/standalone/.next/server/app/pricing/page/next-font-manifest.json +10 -0
  151. package/.next/standalone/.next/server/app/pricing/page/react-loadable-manifest.json +1 -0
  152. package/.next/standalone/.next/server/app/pricing/page/server-reference-manifest.json +4 -0
  153. package/.next/standalone/.next/server/app/pricing/page.js +14 -0
  154. package/.next/standalone/.next/server/app/pricing/page.js.map +5 -0
  155. package/.next/standalone/.next/server/app/pricing/page.js.nft.json +1 -0
  156. package/.next/standalone/.next/server/app/pricing/page_client-reference-manifest.js +3 -0
  157. package/.next/standalone/.next/server/app/pricing.html +1 -0
  158. package/.next/standalone/.next/server/app/pricing.meta +15 -0
  159. package/.next/standalone/.next/server/app/pricing.rsc +21 -0
  160. package/.next/standalone/.next/server/app/pricing.segments/_full.segment.rsc +21 -0
  161. package/.next/standalone/.next/server/app/pricing.segments/_head.segment.rsc +6 -0
  162. package/.next/standalone/.next/server/app/pricing.segments/_index.segment.rsc +5 -0
  163. package/.next/standalone/.next/server/app/pricing.segments/_tree.segment.rsc +3 -0
  164. package/.next/standalone/.next/server/app/pricing.segments/pricing/__PAGE__.segment.rsc +9 -0
  165. package/.next/standalone/.next/server/app/pricing.segments/pricing.segment.rsc +5 -0
  166. package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
  167. package/.next/standalone/.next/server/app/settings.html +2 -2
  168. package/.next/standalone/.next/server/app/settings.rsc +3 -3
  169. package/.next/standalone/.next/server/app/settings.segments/_full.segment.rsc +3 -3
  170. package/.next/standalone/.next/server/app/settings.segments/_head.segment.rsc +1 -1
  171. package/.next/standalone/.next/server/app/settings.segments/_index.segment.rsc +2 -2
  172. package/.next/standalone/.next/server/app/settings.segments/_tree.segment.rsc +2 -2
  173. package/.next/standalone/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
  174. package/.next/standalone/.next/server/app/settings.segments/settings.segment.rsc +1 -1
  175. package/.next/standalone/.next/server/app-paths-manifest.json +1 -0
  176. package/.next/standalone/.next/server/chunks/[root-of-the-server]__08rxe0c._.js +1 -1
  177. package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0es1n-0._.js +3 -0
  178. package/.next/standalone/.next/server/chunks/ssr/_0a2egyj._.js +1 -1
  179. package/.next/standalone/.next/server/chunks/ssr/_next-internal_server_app_pricing_page_actions_0gvv0qw.js +3 -0
  180. package/.next/standalone/.next/server/chunks/ssr/app_amber_capabilities_[id]_page_tsx_12~.miw._.js +1 -1
  181. package/.next/standalone/.next/server/chunks/ssr/app_amber_capabilities_page_tsx_0.t9mpr._.js +1 -1
  182. package/.next/standalone/.next/server/chunks/ssr/app_amber_coverage_page_tsx_01yia_n._.js +1 -1
  183. package/.next/standalone/.next/server/chunks/ssr/app_amber_files_page_tsx_00pdkc~._.js +1 -1
  184. package/.next/standalone/.next/server/chunks/ssr/app_amber_page_tsx_0ihx6zl._.js +1 -1
  185. package/.next/standalone/.next/server/chunks/ssr/app_blue_page_tsx_0zg5eg-._.js +1 -1
  186. package/.next/standalone/.next/server/chunks/ssr/app_blue_recommendations_[id]_page_tsx_10zzlnx._.js +1 -1
  187. package/.next/standalone/.next/server/chunks/ssr/app_blue_recommendations_page_tsx_08w-50l._.js +1 -1
  188. package/.next/standalone/.next/server/chunks/ssr/app_blue_sessions_[id]_page_tsx_0_~w1xj._.js +1 -1
  189. package/.next/standalone/.next/server/chunks/ssr/app_blue_sessions_page_tsx_0kbuf.c._.js +1 -1
  190. package/.next/standalone/.next/server/chunks/ssr/app_green_cross-layer_page_tsx_0a80o-~._.js +1 -1
  191. package/.next/standalone/.next/server/chunks/ssr/app_green_insights_[id]_page_tsx_0se6uk1._.js +1 -1
  192. package/.next/standalone/.next/server/chunks/ssr/app_green_insights_page_tsx_04g8_lf._.js +1 -1
  193. package/.next/standalone/.next/server/chunks/ssr/app_green_page_tsx_10g2g6w._.js +1 -1
  194. package/.next/standalone/.next/server/chunks/ssr/app_green_queries_[id]_page_tsx_0hg.qma._.js +1 -1
  195. package/.next/standalone/.next/server/chunks/ssr/app_green_queries_page_tsx_0.p0r7z._.js +1 -1
  196. package/.next/standalone/.next/server/chunks/ssr/app_page_tsx_0es_sk2._.js +1 -1
  197. package/.next/standalone/.next/server/chunks/ssr/app_pricing_page_tsx_0uxncj9._.js +3 -0
  198. package/.next/standalone/.next/server/chunks/ssr/app_settings_page_tsx_0~q~t-v._.js +1 -1
  199. package/.next/standalone/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_09d0h78.js +4 -0
  200. package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
  201. package/.next/standalone/.next/server/next-font-manifest.js +1 -1
  202. package/.next/standalone/.next/server/next-font-manifest.json +3 -0
  203. package/.next/standalone/.next/server/pages/404.html +1 -1
  204. package/.next/standalone/.next/server/pages/500.html +1 -1
  205. package/.next/standalone/.next/static/chunks/{084jj1qvspd5q.js → 0-nogwaahf00r.js} +1 -1
  206. package/.next/standalone/.next/static/chunks/{060eaovbkat-h.js → 0-ozct-0~_~y0.js} +1 -1
  207. package/.next/{static/chunks/0z5b7hbocrn0k.js → standalone/.next/static/chunks/0043va.q9c120.js} +1 -1
  208. package/.next/standalone/.next/static/{static/chunks/13gu~y8285gmc.js → chunks/0062k_6y6ie8k.js} +1 -1
  209. package/.next/standalone/.next/static/chunks/{0~fd5.2v15..-.js → 01x6uo5zvt23j.js} +1 -1
  210. package/.next/standalone/.next/static/chunks/03f4g06bhu.q-.js +1 -0
  211. package/.next/standalone/.next/static/chunks/06ciexs8mfsoh.js +1 -0
  212. package/.next/standalone/.next/static/{static/chunks/0bn7nidxp0z1s.js → chunks/06lbhw~p794rn.js} +1 -1
  213. package/.next/standalone/.next/static/{static/chunks/0pzddagh.5c96.js → chunks/0921_~z_rxr9h.js} +1 -1
  214. package/.next/standalone/.next/static/chunks/{025srq69s.4vw.js → 0_uy4bqezjrpu.js} +1 -1
  215. package/.next/standalone/.next/static/chunks/0aqr1e8db8tr2.js +1 -0
  216. package/.next/{static/chunks/0r_f617o--_ew.js → standalone/.next/static/chunks/0gtjarbzj_b0s.js} +1 -1
  217. package/.next/standalone/.next/static/chunks/0i826dpus7xfj.js +1 -0
  218. package/.next/standalone/.next/static/chunks/0l.f7bl92nc~2.css +2 -0
  219. package/.next/{static/chunks/040ishla0m-l2.js → standalone/.next/static/chunks/0mtsra7dpsxy_.js} +1 -1
  220. package/.next/{static/chunks/03pm.ery8hgop.js → standalone/.next/static/chunks/0nc15zt~yfrj3.js} +1 -1
  221. package/.next/{static/chunks/154-kyu.ej3ea.js → standalone/.next/static/chunks/0ptkiyk6p_hgq.js} +1 -1
  222. package/.next/standalone/.next/static/{static/chunks/05dd-x8ti6pfs.js → chunks/0vsoyv8nkj.rx.js} +1 -1
  223. package/.next/{static/chunks/0xyj3.tdpvqe4.js → standalone/.next/static/chunks/0zpu7b02c6huw.js} +1 -1
  224. package/.next/standalone/.next/static/chunks/{0vuk.7e07_u10.js → 10ibvf69namr1.js} +1 -1
  225. package/.next/standalone/.next/static/{static/chunks/0ck1t6t3dy~gs.js → chunks/1655x4_8fq5li.js} +1 -1
  226. package/.next/standalone/.next/static/static/chunks/{084jj1qvspd5q.js → 0-nogwaahf00r.js} +1 -1
  227. package/.next/{static/chunks/060eaovbkat-h.js → standalone/.next/static/static/chunks/0-ozct-0~_~y0.js} +1 -1
  228. package/.next/standalone/.next/static/static/chunks/{0z5b7hbocrn0k.js → 0043va.q9c120.js} +1 -1
  229. package/.next/{static/chunks/13gu~y8285gmc.js → standalone/.next/static/static/chunks/0062k_6y6ie8k.js} +1 -1
  230. package/.next/{static/chunks/0~fd5.2v15..-.js → standalone/.next/static/static/chunks/01x6uo5zvt23j.js} +1 -1
  231. package/.next/standalone/.next/static/static/chunks/03f4g06bhu.q-.js +1 -0
  232. package/.next/standalone/.next/static/static/chunks/06ciexs8mfsoh.js +1 -0
  233. package/.next/{static/chunks/0bn7nidxp0z1s.js → standalone/.next/static/static/chunks/06lbhw~p794rn.js} +1 -1
  234. package/.next/standalone/.next/static/{chunks/0pzddagh.5c96.js → static/chunks/0921_~z_rxr9h.js} +1 -1
  235. package/.next/{static/chunks/025srq69s.4vw.js → standalone/.next/static/static/chunks/0_uy4bqezjrpu.js} +1 -1
  236. package/.next/standalone/.next/static/static/chunks/0aqr1e8db8tr2.js +1 -0
  237. package/.next/standalone/.next/static/static/chunks/{0r_f617o--_ew.js → 0gtjarbzj_b0s.js} +1 -1
  238. package/.next/standalone/.next/static/static/chunks/0i826dpus7xfj.js +1 -0
  239. package/.next/standalone/.next/static/static/chunks/0l.f7bl92nc~2.css +2 -0
  240. package/.next/standalone/.next/static/static/chunks/{040ishla0m-l2.js → 0mtsra7dpsxy_.js} +1 -1
  241. package/.next/standalone/.next/static/{chunks/03pm.ery8hgop.js → static/chunks/0nc15zt~yfrj3.js} +1 -1
  242. package/.next/standalone/.next/static/static/chunks/{154-kyu.ej3ea.js → 0ptkiyk6p_hgq.js} +1 -1
  243. package/.next/{static/chunks/05dd-x8ti6pfs.js → standalone/.next/static/static/chunks/0vsoyv8nkj.rx.js} +1 -1
  244. package/.next/standalone/.next/static/{chunks/0xyj3.tdpvqe4.js → static/chunks/0zpu7b02c6huw.js} +1 -1
  245. package/.next/standalone/.next/static/static/chunks/{0vuk.7e07_u10.js → 10ibvf69namr1.js} +1 -1
  246. package/.next/{static/chunks/0ck1t6t3dy~gs.js → standalone/.next/static/static/chunks/1655x4_8fq5li.js} +1 -1
  247. package/.next/standalone/CHANGELOG.md +12 -0
  248. package/.next/standalone/app/pricing/page.tsx +289 -0
  249. package/.next/standalone/app/settings/page.tsx +8 -4
  250. package/.next/standalone/components/PrismDock.tsx +1 -0
  251. package/.next/standalone/components/pricing/BillingToggle.tsx +53 -0
  252. package/.next/standalone/components/pricing/FeatureList.tsx +19 -0
  253. package/.next/standalone/components/pricing/PricingCard.tsx +120 -0
  254. package/.next/standalone/package.json +1 -1
  255. package/.next/standalone/server.js +1 -1
  256. package/.next/standalone/tsconfig.tsbuildinfo +1 -1
  257. package/.next/static/chunks/{084jj1qvspd5q.js → 0-nogwaahf00r.js} +1 -1
  258. package/.next/{standalone/.next/static/static/chunks/060eaovbkat-h.js → static/chunks/0-ozct-0~_~y0.js} +1 -1
  259. package/.next/{standalone/.next/static/chunks/0z5b7hbocrn0k.js → static/chunks/0043va.q9c120.js} +1 -1
  260. package/.next/{standalone/.next/static/chunks/13gu~y8285gmc.js → static/chunks/0062k_6y6ie8k.js} +1 -1
  261. package/.next/{standalone/.next/static/static/chunks/0~fd5.2v15..-.js → static/chunks/01x6uo5zvt23j.js} +1 -1
  262. package/.next/static/chunks/03f4g06bhu.q-.js +1 -0
  263. package/.next/static/chunks/06ciexs8mfsoh.js +1 -0
  264. package/.next/{standalone/.next/static/chunks/0bn7nidxp0z1s.js → static/chunks/06lbhw~p794rn.js} +1 -1
  265. package/.next/static/chunks/{0pzddagh.5c96.js → 0921_~z_rxr9h.js} +1 -1
  266. package/.next/{standalone/.next/static/static/chunks/025srq69s.4vw.js → static/chunks/0_uy4bqezjrpu.js} +1 -1
  267. package/.next/static/chunks/0aqr1e8db8tr2.js +1 -0
  268. package/.next/{standalone/.next/static/chunks/0r_f617o--_ew.js → static/chunks/0gtjarbzj_b0s.js} +1 -1
  269. package/.next/static/chunks/0i826dpus7xfj.js +1 -0
  270. package/.next/static/chunks/0l.f7bl92nc~2.css +2 -0
  271. package/.next/{standalone/.next/static/chunks/040ishla0m-l2.js → static/chunks/0mtsra7dpsxy_.js} +1 -1
  272. package/.next/{standalone/.next/static/static/chunks/03pm.ery8hgop.js → static/chunks/0nc15zt~yfrj3.js} +1 -1
  273. package/.next/{standalone/.next/static/chunks/154-kyu.ej3ea.js → static/chunks/0ptkiyk6p_hgq.js} +1 -1
  274. package/.next/{standalone/.next/static/chunks/05dd-x8ti6pfs.js → static/chunks/0vsoyv8nkj.rx.js} +1 -1
  275. package/.next/{standalone/.next/static/static/chunks/0xyj3.tdpvqe4.js → static/chunks/0zpu7b02c6huw.js} +1 -1
  276. package/.next/static/chunks/{0vuk.7e07_u10.js → 10ibvf69namr1.js} +1 -1
  277. package/.next/{standalone/.next/static/chunks/0ck1t6t3dy~gs.js → static/chunks/1655x4_8fq5li.js} +1 -1
  278. package/CHANGELOG.md +12 -0
  279. package/package.json +1 -1
  280. package/.next/standalone/.next/static/chunks/0-u-st8-.soco.js +0 -1
  281. package/.next/standalone/.next/static/chunks/07bef4gh~ubvq.js +0 -1
  282. package/.next/standalone/.next/static/chunks/07~.mame73grt.js +0 -1
  283. package/.next/standalone/.next/static/chunks/0ddo77uynla4l.css +0 -2
  284. package/.next/standalone/.next/static/static/chunks/0-u-st8-.soco.js +0 -1
  285. package/.next/standalone/.next/static/static/chunks/07bef4gh~ubvq.js +0 -1
  286. package/.next/standalone/.next/static/static/chunks/07~.mame73grt.js +0 -1
  287. package/.next/standalone/.next/static/static/chunks/0ddo77uynla4l.css +0 -2
  288. package/.next/static/chunks/0-u-st8-.soco.js +0 -1
  289. package/.next/static/chunks/07bef4gh~ubvq.js +0 -1
  290. package/.next/static/chunks/07~.mame73grt.js +0 -1
  291. package/.next/static/chunks/0ddo77uynla4l.css +0 -2
  292. /package/.next/standalone/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_buildManifest.js +0 -0
  293. /package/.next/standalone/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_clientMiddlewareManifest.js +0 -0
  294. /package/.next/standalone/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_ssgManifest.js +0 -0
  295. /package/.next/standalone/.next/static/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_buildManifest.js +0 -0
  296. /package/.next/standalone/.next/static/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_clientMiddlewareManifest.js +0 -0
  297. /package/.next/standalone/.next/static/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_ssgManifest.js +0 -0
  298. /package/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_buildManifest.js +0 -0
  299. /package/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_clientMiddlewareManifest.js +0 -0
  300. /package/.next/static/{NZmaO_6ZZEbF4JCKrJtF0 → W2AhxwlOVhsTt-b4T3Mjc}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var l in s)Object.defineProperty(r,l,{enumerable:!0,get:s[l]});let a=e.r(90809)._(e.r(98183)),n=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",l=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(a.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||n.test(s))&&!1!==c?(c="//"+(c||""),l&&"/"!==l[0]&&(l="/"+l)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),l=l.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${s}${c}${l}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let s=e.r(71645);function l(e,t){let r=(0,s.useRef)(null),l=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=a(e,s)),t&&(l.current=a(t,s))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let s=e.r(18967),l=e.r(52817);function a(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,l.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return b},useLinkStatus:function(){return y}};for(var l in s)Object.defineProperty(r,l,{enumerable:!0,get:s[l]});let a=e.r(90809),n=e.r(43476),o=a._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),m=e.r(73668),h=e.r(9396);function b(t){var r,s;let l,a,b,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:k,children:w,prefetch:S=null,passHref:_,replace:C,shallow:P,scroll:E,onClick:R,onMouseEnter:T,onTouchStart:O,legacyBehavior:L=!1,onNavigate:A,transitionTypes:U,ref:$,unstable_dynamicOnHover:I,...M}=t;l=w,L&&("string"==typeof l||"number"==typeof l)&&(l=(0,n.jsx)("a",{children:l}));let B=o.default.useContext(c.AppRouterContext),D=!1!==S,F=!1!==S?null===(s=S)||"auto"===s?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,K="string"==typeof(r=k||N)?r:(0,i.formatUrl)(r);if(L){if(l?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(l)}let W=L?a&&"object"==typeof a&&a.ref:$,z=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),q={ref:(0,u.useMergedRef)(z,W),onClick(t){L||"function"!=typeof R||R(t),L&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!B||t.defaultPrevented||function(t,r,s,l,a,n,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){l&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),n){let e=!1;if(n({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,l?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,s.current,i)})}}(t,K,v,C,E,A,U)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){L||"function"!=typeof O||O(e),L&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(K)?q.href=K:L&&!_&&("a"!==a.type||"href"in a.props)||(q.href=(0,p.addBasePath)(K)),b=L?o.default.cloneElement(a,q):(0,n.jsx)("a",{...M,...q,children:l}),(0,n.jsx)(g.Provider,{value:y,children:b})}e.r(84508);let g=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),s=e.i(18566),l=e.i(71645);let a={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function n(e){return"free"!==a[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,n],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:s,isPro:a=!1}){let[c,u]=(0,l.useState)(!1),d=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=n("monorepo")&&!a;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,l.useState)(""),[r,s]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>s(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,l.useState)(null),[s,a]=(0,l.useState)(null),[n,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),a(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,l.useCallback)(async t=>{a(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=s?`&workspace=${encodeURIComponent(s)}`:"";return{monorepo:t,activeWorkspace:s,setActiveWorkspace:i,ready:n,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,l.useState)(null),[s,a]=(0,l.useState)(!1),[n,o]=(0,l.useState)(0);(0,l.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>a(!0))},[e,n]);let i=(0,l.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:s,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,s.usePathname)(),{tq:l}=c(),{monorepo:a,activeWorkspace:n,setActiveWorkspace:o}=u(l),{isPro:d}=p(l);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:s,label:l,color:a})=>{let n=e.startsWith(s);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:s,className:"text-sm font-medium transition-colors px-1",style:{color:n?a??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:l})]},s)}),a&&"single"!==a.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:a,activeWorkspace:n,onSelect:o,isPro:d})]})]})}],50667)},9919,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(22016),l=e.i(18566),a=e.i(50667);let n={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},o={draft:"rgba(148,163,184,0.9)",approved:"rgb(52,211,153)",rejected:"rgb(248,113,113)"},i={low:"rgb(52,211,153)",medium:"rgb(251,191,36)",high:"rgb(248,113,113)"};function c({label:e,children:r}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:e}),(0,t.jsx)("div",{className:"text-sm text-slate-300 leading-relaxed",children:r})]})}e.s(["default",0,function({params:e}){let{id:u}=(0,r.use)(e),d=(0,l.useRouter)(),[p,f]=(0,r.useState)(null),[x,m]=(0,r.useState)(!0),[h,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[j,v]=(0,r.useState)(!1);async function N(e){if(p){y(!0);try{let t=await fetch(`/api/blue/recommendations/${u}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:e})}),r=await t.json();f(r.recommendation)}finally{y(!1)}}}async function k(){if(p){v(!0);try{let e=await fetch("/api/blue/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:`Session: ${p.title}`,rec_id:p.id})}),t=await e.json();d.push(`/blue/sessions/${t.session.id}`)}catch{v(!1)}}}return((0,r.useEffect)(()=>{fetch(`/api/blue/recommendations/${u}`).then(async e=>{404===e.status?b(!0):f((await e.json()).recommendation)}).catch(()=>b(!0)).finally(()=>m(!1))},[u]),x)?(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(a.PrismDock,{}),(0,t.jsx)("main",{className:"flex-1 flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-slate-500 text-sm",children:"Loading…"})})]}):h||!p?(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(a.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center justify-center gap-4",children:[(0,t.jsx)("p",{className:"text-slate-400",children:"Recommendation not found."}),(0,t.jsx)(s.default,{href:"/blue/recommendations",className:"text-blue-400 text-sm hover:underline",children:"← Back to Recommendations"})]})]}):(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(a.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full flex items-center gap-2 text-sm",children:[(0,t.jsx)(s.default,{href:"/blue",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"BLUE"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)(s.default,{href:"/blue/recommendations",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"Recommendations"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)("span",{className:"text-slate-400 truncate max-w-xs",children:p.title})]}),(0,t.jsxs)("div",{className:"w-full flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold text-slate-100 leading-snug flex-1",children:p.title}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,t.jsxs)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full",style:{background:i[p.risk_level]+"20",color:i[p.risk_level],border:`1px solid ${i[p.risk_level]}40`},children:[p.risk_level," risk"]}),(0,t.jsx)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full",style:{background:o[p.status]+"18",color:o[p.status],border:`1px solid ${o[p.status]}30`},children:p.status})]})]}),(0,t.jsxs)("p",{className:"text-xs text-slate-500 font-mono",children:["llm-generated"===p.source?"✦ AI-generated":"User-created"," · ",new Date(p.created_at).toLocaleString()]})]}),(0,t.jsxs)("div",{className:"w-full rounded-xl p-6 flex flex-col gap-5",style:n,children:[(0,t.jsx)(c,{label:"Summary",children:p.summary}),(0,t.jsx)("div",{className:"border-t",style:{borderColor:"var(--border-default)"}}),(0,t.jsx)(c,{label:"Problem",children:p.problem}),(0,t.jsx)("div",{className:"border-t",style:{borderColor:"var(--border-default)"}}),(0,t.jsx)(c,{label:"Expected Impact",children:p.expected_impact}),p.suggested_files.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"border-t",style:{borderColor:"var(--border-default)"}}),(0,t.jsx)(c,{label:"Suggested Files",children:(0,t.jsx)("div",{className:"flex flex-col gap-1 mt-0.5",children:p.suggested_files.map(e=>(0,t.jsx)("span",{className:"text-xs font-mono text-slate-400 bg-slate-800/60 px-2 py-1 rounded",children:e},e))})})]})]}),(0,t.jsxs)("div",{className:"w-full flex flex-wrap items-center gap-3",children:[(0,t.jsx)("button",{onClick:k,disabled:j,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50 flex items-center gap-2",style:{background:"rgb(59,130,246)",color:"#fff"},children:j?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"animate-spin inline-block w-3 h-3 border border-white border-t-transparent rounded-full"}),"Starting…"]}):"💬 Start session"}),"approved"!==p.status&&(0,t.jsx)("button",{onClick:()=>N("approved"),disabled:g,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",style:{background:"rgba(52,211,153,0.12)",color:"rgb(52,211,153)",border:"1px solid rgba(52,211,153,0.3)"},children:"Approve"}),"rejected"!==p.status&&(0,t.jsx)("button",{onClick:()=>N("rejected"),disabled:g,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",style:{background:"rgba(248,113,113,0.1)",color:"rgb(248,113,113)",border:"1px solid rgba(248,113,113,0.25)"},children:"Reject"}),"draft"!==p.status&&(0,t.jsx)("button",{onClick:()=>N("draft"),disabled:g,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",style:{background:"rgba(148,163,184,0.1)",color:"rgba(148,163,184,0.9)",border:"1px solid rgba(148,163,184,0.2)"},children:"Reset to draft"})]})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.1"," · BLUE / Recommendations"]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var l in s)Object.defineProperty(r,l,{enumerable:!0,get:s[l]});let a=e.r(90809)._(e.r(98183)),n=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",l=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(a.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||n.test(s))&&!1!==c?(c="//"+(c||""),l&&"/"!==l[0]&&(l="/"+l)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),l=l.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${s}${c}${l}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let s=e.r(71645);function l(e,t){let r=(0,s.useRef)(null),l=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=a(e,s)),t&&(l.current=a(t,s))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let s=e.r(18967),l=e.r(52817);function a(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,l.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return b},useLinkStatus:function(){return y}};for(var l in s)Object.defineProperty(r,l,{enumerable:!0,get:s[l]});let a=e.r(90809),n=e.r(43476),o=a._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),m=e.r(73668),h=e.r(9396);function b(t){var r,s;let l,a,b,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:k,children:w,prefetch:S=null,passHref:_,replace:C,shallow:P,scroll:E,onClick:R,onMouseEnter:T,onTouchStart:O,legacyBehavior:L=!1,onNavigate:A,transitionTypes:U,ref:$,unstable_dynamicOnHover:I,...M}=t;l=w,L&&("string"==typeof l||"number"==typeof l)&&(l=(0,n.jsx)("a",{children:l}));let B=o.default.useContext(c.AppRouterContext),D=!1!==S,F=!1!==S?null===(s=S)||"auto"===s?h.FetchStrategy.PPR:h.FetchStrategy.Full:h.FetchStrategy.PPR,K="string"==typeof(r=k||N)?r:(0,i.formatUrl)(r);if(L){if(l?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(l)}let W=L?a&&"object"==typeof a&&a.ref:$,z=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),q={ref:(0,u.useMergedRef)(z,W),onClick(t){L||"function"!=typeof R||R(t),L&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!B||t.defaultPrevented||function(t,r,s,l,a,n,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){l&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),n){let e=!1;if(n({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,l?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,s.current,i)})}}(t,K,v,C,E,A,U)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)},onTouchStart:function(e){L||"function"!=typeof O||O(e),L&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===I)}};return(0,d.isAbsoluteUrl)(K)?q.href=K:L&&!_&&("a"!==a.type||"href"in a.props)||(q.href=(0,p.addBasePath)(K)),b=L?o.default.cloneElement(a,q):(0,n.jsx)("a",{...M,...q,children:l}),(0,n.jsx)(g.Provider,{value:y,children:b})}e.r(84508);let g=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(g);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),s=e.i(18566),l=e.i(71645);let a={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function n(e){return"free"!==a[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,n],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:s,isPro:a=!1}){let[c,u]=(0,l.useState)(!1),d=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=n("monorepo")&&!a;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,l.useState)(""),[r,s]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>s(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,l.useState)(null),[s,a]=(0,l.useState)(null),[n,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),a(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,l.useCallback)(async t=>{a(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=s?`&workspace=${encodeURIComponent(s)}`:"";return{monorepo:t,activeWorkspace:s,setActiveWorkspace:i,ready:n,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,l.useState)(null),[s,a]=(0,l.useState)(!1),[n,o]=(0,l.useState)(0);(0,l.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>a(!0))},[e,n]);let i=(0,l.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:s,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/pricing",label:"Plans",color:"rgb(167,139,250)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,s.usePathname)(),{tq:l}=c(),{monorepo:a,activeWorkspace:n,setActiveWorkspace:o}=u(l),{isPro:d}=p(l);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:s,label:l,color:a})=>{let n=e.startsWith(s);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:s,className:"text-sm font-medium transition-colors px-1",style:{color:n?a??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:l})]},s)}),a&&"single"!==a.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:a,activeWorkspace:n,onSelect:o,isPro:d})]})]})}],50667)},9919,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(22016),l=e.i(18566),a=e.i(50667);let n={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},o={draft:"rgba(148,163,184,0.9)",approved:"rgb(52,211,153)",rejected:"rgb(248,113,113)"},i={low:"rgb(52,211,153)",medium:"rgb(251,191,36)",high:"rgb(248,113,113)"};function c({label:e,children:r}){return(0,t.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,t.jsx)("span",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:e}),(0,t.jsx)("div",{className:"text-sm text-slate-300 leading-relaxed",children:r})]})}e.s(["default",0,function({params:e}){let{id:u}=(0,r.use)(e),d=(0,l.useRouter)(),[p,f]=(0,r.useState)(null),[x,m]=(0,r.useState)(!0),[h,b]=(0,r.useState)(!1),[g,y]=(0,r.useState)(!1),[j,v]=(0,r.useState)(!1);async function N(e){if(p){y(!0);try{let t=await fetch(`/api/blue/recommendations/${u}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:e})}),r=await t.json();f(r.recommendation)}finally{y(!1)}}}async function k(){if(p){v(!0);try{let e=await fetch("/api/blue/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:`Session: ${p.title}`,rec_id:p.id})}),t=await e.json();d.push(`/blue/sessions/${t.session.id}`)}catch{v(!1)}}}return((0,r.useEffect)(()=>{fetch(`/api/blue/recommendations/${u}`).then(async e=>{404===e.status?b(!0):f((await e.json()).recommendation)}).catch(()=>b(!0)).finally(()=>m(!1))},[u]),x)?(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(a.PrismDock,{}),(0,t.jsx)("main",{className:"flex-1 flex items-center justify-center",children:(0,t.jsx)("span",{className:"text-slate-500 text-sm",children:"Loading…"})})]}):h||!p?(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(a.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center justify-center gap-4",children:[(0,t.jsx)("p",{className:"text-slate-400",children:"Recommendation not found."}),(0,t.jsx)(s.default,{href:"/blue/recommendations",className:"text-blue-400 text-sm hover:underline",children:"← Back to Recommendations"})]})]}):(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(a.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full flex items-center gap-2 text-sm",children:[(0,t.jsx)(s.default,{href:"/blue",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"BLUE"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)(s.default,{href:"/blue/recommendations",className:"text-slate-500 hover:text-slate-300 transition-colors",children:"Recommendations"}),(0,t.jsx)("span",{className:"text-slate-700",children:"/"}),(0,t.jsx)("span",{className:"text-slate-400 truncate max-w-xs",children:p.title})]}),(0,t.jsxs)("div",{className:"w-full flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,t.jsx)("h1",{className:"text-xl font-semibold text-slate-100 leading-snug flex-1",children:p.title}),(0,t.jsxs)("div",{className:"flex items-center gap-2 flex-shrink-0",children:[(0,t.jsxs)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full",style:{background:i[p.risk_level]+"20",color:i[p.risk_level],border:`1px solid ${i[p.risk_level]}40`},children:[p.risk_level," risk"]}),(0,t.jsx)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full",style:{background:o[p.status]+"18",color:o[p.status],border:`1px solid ${o[p.status]}30`},children:p.status})]})]}),(0,t.jsxs)("p",{className:"text-xs text-slate-500 font-mono",children:["llm-generated"===p.source?"✦ AI-generated":"User-created"," · ",new Date(p.created_at).toLocaleString()]})]}),(0,t.jsxs)("div",{className:"w-full rounded-xl p-6 flex flex-col gap-5",style:n,children:[(0,t.jsx)(c,{label:"Summary",children:p.summary}),(0,t.jsx)("div",{className:"border-t",style:{borderColor:"var(--border-default)"}}),(0,t.jsx)(c,{label:"Problem",children:p.problem}),(0,t.jsx)("div",{className:"border-t",style:{borderColor:"var(--border-default)"}}),(0,t.jsx)(c,{label:"Expected Impact",children:p.expected_impact}),p.suggested_files.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"border-t",style:{borderColor:"var(--border-default)"}}),(0,t.jsx)(c,{label:"Suggested Files",children:(0,t.jsx)("div",{className:"flex flex-col gap-1 mt-0.5",children:p.suggested_files.map(e=>(0,t.jsx)("span",{className:"text-xs font-mono text-slate-400 bg-slate-800/60 px-2 py-1 rounded",children:e},e))})})]})]}),(0,t.jsxs)("div",{className:"w-full flex flex-wrap items-center gap-3",children:[(0,t.jsx)("button",{onClick:k,disabled:j,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50 flex items-center gap-2",style:{background:"rgb(59,130,246)",color:"#fff"},children:j?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"animate-spin inline-block w-3 h-3 border border-white border-t-transparent rounded-full"}),"Starting…"]}):"💬 Start session"}),"approved"!==p.status&&(0,t.jsx)("button",{onClick:()=>N("approved"),disabled:g,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",style:{background:"rgba(52,211,153,0.12)",color:"rgb(52,211,153)",border:"1px solid rgba(52,211,153,0.3)"},children:"Approve"}),"rejected"!==p.status&&(0,t.jsx)("button",{onClick:()=>N("rejected"),disabled:g,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",style:{background:"rgba(248,113,113,0.1)",color:"rgb(248,113,113)",border:"1px solid rgba(248,113,113,0.25)"},children:"Reject"}),"draft"!==p.status&&(0,t.jsx)("button",{onClick:()=>N("draft"),disabled:g,className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-50",style:{background:"rgba(148,163,184,0.1)",color:"rgba(148,163,184,0.9)",border:"1px solid rgba(148,163,184,0.2)"},children:"Reset to draft"})]})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.2"," · BLUE / Recommendations"]})]})}])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",l=e.pathname||"",s=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(a.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==c?(c="//"+(c||""),l&&"/"!==l[0]&&(l="/"+l)):c||(c=""),s&&"#"!==s[0]&&(s="#"+s),u&&"?"!==u[0]&&(u="?"+u),l=l.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${l}${u}${s}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return s(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t){let r=(0,n.useRef)(null),l=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=a(e,n)),t&&(l.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),l=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,l.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return y}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(90809),o=e.r(43476),s=a._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),p=e.r(18967),d=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),m=e.r(9396);function g(t){var r,n;let l,a,g,[y,v]=(0,s.useOptimistic)(x.IDLE_LINK_STATUS),j=(0,s.useRef)(null),{href:k,as:N,children:S,prefetch:w=null,passHref:_,replace:P,shallow:C,scroll:E,onClick:T,onMouseEnter:R,onTouchStart:O,legacyBehavior:A=!1,onNavigate:L,transitionTypes:M,ref:I,unstable_dynamicOnHover:U,...$}=t;l=S,A&&("string"==typeof l||"number"==typeof l)&&(l=(0,o.jsx)("a",{children:l}));let B=s.default.useContext(c.AppRouterContext),D=!1!==w,F=!1!==w?null===(n=w)||"auto"===n?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=N||k)?r:(0,i.formatUrl)(r);if(A){if(l?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=s.default.Children.only(l)}let W=A?a&&"object"==typeof a&&a.ref:I,z=s.default.useCallback(e=>(null!==B&&(j.current=(0,x.mountLinkInstance)(e,K,B,F,D,v)),()=>{j.current&&((0,x.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,v]),G={ref:(0,u.useMergedRef)(z,W),onClick(t){A||"function"!=typeof T||T(t),A&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!B||t.defaultPrevented||function(t,r,n,l,a,o,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){l&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:p}=e.r(99781);s.default.startTransition(()=>{p(r,l?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,i)})}}(t,K,j,P,E,L,M)},onMouseEnter(e){A||"function"!=typeof R||R(e),A&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===U)},onTouchStart:function(e){A||"function"!=typeof O||O(e),A&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===U)}};return(0,p.isAbsoluteUrl)(K)?G.href=K:A&&!_&&("a"!==a.type||"href"in a.props)||(G.href=(0,d.addBasePath)(K)),g=A?s.default.cloneElement(a,G):(0,o.jsx)("a",{...$,...G,children:l}),(0,o.jsx)(b.Provider,{value:y,children:g})}e.r(84508);let b=(0,s.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,s.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),n=e.i(18566),l=e.i(71645);let a={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function o(e){return"free"!==a[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,o],36528);let s=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:n,isPro:a=!1}){let[c,u]=(0,l.useState)(!1),p=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){p.current&&!p.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let d=o("monorepo")&&!a;return(0,t.jsxs)("div",{className:"relative",ref:p,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),d&&(0,t.jsx)(s,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{n(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{n(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,l.useState)(""),[r,n]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>n(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,l.useState)(null),[n,a]=(0,l.useState)(null),[o,s]=(0,l.useState)(!1);(0,l.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),a(t.workspace??null)}).finally(()=>s(!0))},[e]);let i=(0,l.useCallback)(async t=>{a(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=n?`&workspace=${encodeURIComponent(n)}`:"";return{monorepo:t,activeWorkspace:n,setActiveWorkspace:i,ready:o,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let p={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function d(e){let[t,r]=(0,l.useState)(null),[n,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(0);(0,l.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(p)).finally(()=>a(!0))},[e,o]);let i=(0,l.useCallback)(()=>s(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:n,refresh:i,isPro:c}}e.s(["useLicense",0,d],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,n.usePathname)(),{tq:l}=c(),{monorepo:a,activeWorkspace:o,setActiveWorkspace:s}=u(l),{isPro:p}=d(l);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:n,label:l,color:a})=>{let o=e.startsWith(n);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:n,className:"text-sm font-medium transition-colors px-1",style:{color:o?a??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:l})]},n)}),a&&"single"!==a.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:a,activeWorkspace:o,onSelect:s,isPro:p})]})]})}],50667)},31713,e=>{"use strict";var t=e.i(47167),r=e.i(43476),n=e.i(71645),l=e.i(50667);e.s(["default",0,function(){let[e,a]=(0,n.useState)(t.default.env.PRISM_TARGET??""),[o,s]=(0,n.useState)(null),[i,c]=(0,n.useState)(!1),[u,p]=(0,n.useState)(null);async function d(){if(e.trim()){c(!0),p(null),s(null);try{let t=await fetch("/api/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({targetPath:e.trim()})}),r=await t.json();if(!t.ok)throw Error(r.error??"Scan failed");s(JSON.stringify(r,null,2))}catch(e){p(e instanceof Error?e.message:String(e))}finally{c(!1)}}}return(0,r.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,r.jsx)(l.PrismDock,{}),(0,r.jsxs)("main",{className:"flex-1 flex flex-col items-center justify-center px-6 gap-8",style:{paddingTop:"var(--dock-clearance-top)"},children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("h1",{className:"text-2xl font-semibold text-slate-100 tracking-tight",children:["prism",(0,r.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-slate-400",children:["The answer to your codebase. —"," ",(0,r.jsx)("span",{className:"text-sky-400 font-mono",children:"prismlens"})]}),t.default.env.PRISM_TARGET&&(0,r.jsxs)("p",{className:"mt-1 text-xs text-slate-500 font-mono",children:["Scanning: ",t.default.env.PRISM_TARGET]})]}),(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-xl p-6 flex flex-col gap-4",style:{background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-slate-300 uppercase tracking-widest",children:"Scan a directory"}),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)("label",{className:"text-xs text-slate-400",htmlFor:"targetPath",children:"Absolute path"}),(0,r.jsx)("input",{id:"targetPath",type:"text",value:e,onChange:e=>a(e.target.value),placeholder:"/Users/you/your-project",className:"w-full rounded-lg px-3 py-2 text-sm font-mono text-slate-200 outline-none focus:ring-2 focus:ring-sky-500/50",style:{background:"rgba(2,6,23,0.6)",border:"1px solid var(--border-default)"},onKeyDown:e=>"Enter"===e.key&&d()})]}),(0,r.jsx)("button",{onClick:d,disabled:i||!e.trim(),className:"w-full py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"rgb(14,165,233)",color:"#020617"},children:i?"Scanning…":"Run cycle detection"})]}),(o||u)&&(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-xl p-6 flex flex-col gap-3",style:{background:"var(--surface-panel)",border:`1px solid ${u?"rgba(239,68,68,0.3)":"var(--border-default)"}`},children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-slate-300 uppercase tracking-widest",children:"Results"}),u&&(0,r.jsx)("p",{className:"text-sm text-red-400 font-mono",children:u}),o&&(0,r.jsx)("pre",{className:"text-xs font-mono text-slate-300 overflow-auto max-h-96 leading-relaxed",style:{whiteSpace:"pre-wrap",wordBreak:"break-all"},children:o})]})]}),(0,r.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",style:{marginBottom:"var(--infobar-clearance-bottom)"},children:["prism",(0,r.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.1"]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return s},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(90809)._(e.r(98183)),o=/https?|ftp|gopher|file/;function s(e){let{auth:t,hostname:r}=e,n=e.protocol||"",l=e.pathname||"",s=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(a.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||o.test(n))&&!1!==c?(c="//"+(c||""),l&&"/"!==l[0]&&(l="/"+l)):c||(c=""),s&&"#"!==s[0]&&(s="#"+s),u&&"?"!==u[0]&&(u="?"+u),l=l.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${l}${u}${s}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return s(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let n=e.r(71645);function l(e,t){let r=(0,n.useRef)(null),l=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=a(e,n)),t&&(l.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(18967),l=e.r(52817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,l.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return g},useLinkStatus:function(){return y}};for(var l in n)Object.defineProperty(r,l,{enumerable:!0,get:n[l]});let a=e.r(90809),o=e.r(43476),s=a._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),p=e.r(18967),d=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),m=e.r(9396);function g(t){var r,n;let l,a,g,[y,v]=(0,s.useOptimistic)(x.IDLE_LINK_STATUS),j=(0,s.useRef)(null),{href:k,as:N,children:S,prefetch:w=null,passHref:_,replace:P,shallow:C,scroll:E,onClick:T,onMouseEnter:R,onTouchStart:O,legacyBehavior:A=!1,onNavigate:L,transitionTypes:M,ref:I,unstable_dynamicOnHover:U,...$}=t;l=S,A&&("string"==typeof l||"number"==typeof l)&&(l=(0,o.jsx)("a",{children:l}));let B=s.default.useContext(c.AppRouterContext),D=!1!==w,F=!1!==w?null===(n=w)||"auto"===n?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=N||k)?r:(0,i.formatUrl)(r);if(A){if(l?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=s.default.Children.only(l)}let W=A?a&&"object"==typeof a&&a.ref:I,z=s.default.useCallback(e=>(null!==B&&(j.current=(0,x.mountLinkInstance)(e,K,B,F,D,v)),()=>{j.current&&((0,x.unmountLinkForCurrentNavigation)(j.current),j.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,v]),G={ref:(0,u.useMergedRef)(z,W),onClick(t){A||"function"!=typeof T||T(t),A&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!B||t.defaultPrevented||function(t,r,n,l,a,o,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){l&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),o){let e=!1;if(o({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:p}=e.r(99781);s.default.startTransition(()=>{p(r,l?"replace":"push",!1===a?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,n.current,i)})}}(t,K,j,P,E,L,M)},onMouseEnter(e){A||"function"!=typeof R||R(e),A&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===U)},onTouchStart:function(e){A||"function"!=typeof O||O(e),A&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===U)}};return(0,p.isAbsoluteUrl)(K)?G.href=K:A&&!_&&("a"!==a.type||"href"in a.props)||(G.href=(0,d.addBasePath)(K)),g=A?s.default.cloneElement(a,G):(0,o.jsx)("a",{...$,...G,children:l}),(0,o.jsx)(b.Provider,{value:y,children:g})}e.r(84508);let b=(0,s.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,s.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),n=e.i(18566),l=e.i(71645);let a={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function o(e){return"free"!==a[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,o],36528);let s=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:n,isPro:a=!1}){let[c,u]=(0,l.useState)(!1),p=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){p.current&&!p.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let d=o("monorepo")&&!a;return(0,t.jsxs)("div",{className:"relative",ref:p,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),d&&(0,t.jsx)(s,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{n(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{n(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,l.useState)(""),[r,n]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>n(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,l.useState)(null),[n,a]=(0,l.useState)(null),[o,s]=(0,l.useState)(!1);(0,l.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),a(t.workspace??null)}).finally(()=>s(!0))},[e]);let i=(0,l.useCallback)(async t=>{a(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=n?`&workspace=${encodeURIComponent(n)}`:"";return{monorepo:t,activeWorkspace:n,setActiveWorkspace:i,ready:o,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let p={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function d(e){let[t,r]=(0,l.useState)(null),[n,a]=(0,l.useState)(!1),[o,s]=(0,l.useState)(0);(0,l.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(p)).finally(()=>a(!0))},[e,o]);let i=(0,l.useCallback)(()=>s(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:n,refresh:i,isPro:c}}e.s(["useLicense",0,d],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/pricing",label:"Plans",color:"rgb(167,139,250)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,n.usePathname)(),{tq:l}=c(),{monorepo:a,activeWorkspace:o,setActiveWorkspace:s}=u(l),{isPro:p}=d(l);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:n,label:l,color:a})=>{let o=e.startsWith(n);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:n,className:"text-sm font-medium transition-colors px-1",style:{color:o?a??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:l})]},n)}),a&&"single"!==a.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:a,activeWorkspace:o,onSelect:s,isPro:p})]})]})}],50667)},31713,e=>{"use strict";var t=e.i(47167),r=e.i(43476),n=e.i(71645),l=e.i(50667);e.s(["default",0,function(){let[e,a]=(0,n.useState)(t.default.env.PRISM_TARGET??""),[o,s]=(0,n.useState)(null),[i,c]=(0,n.useState)(!1),[u,p]=(0,n.useState)(null);async function d(){if(e.trim()){c(!0),p(null),s(null);try{let t=await fetch("/api/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({targetPath:e.trim()})}),r=await t.json();if(!t.ok)throw Error(r.error??"Scan failed");s(JSON.stringify(r,null,2))}catch(e){p(e instanceof Error?e.message:String(e))}finally{c(!1)}}}return(0,r.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,r.jsx)(l.PrismDock,{}),(0,r.jsxs)("main",{className:"flex-1 flex flex-col items-center justify-center px-6 gap-8",style:{paddingTop:"var(--dock-clearance-top)"},children:[(0,r.jsxs)("div",{className:"text-center",children:[(0,r.jsxs)("h1",{className:"text-2xl font-semibold text-slate-100 tracking-tight",children:["prism",(0,r.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-slate-400",children:["The answer to your codebase. —"," ",(0,r.jsx)("span",{className:"text-sky-400 font-mono",children:"prismlens"})]}),t.default.env.PRISM_TARGET&&(0,r.jsxs)("p",{className:"mt-1 text-xs text-slate-500 font-mono",children:["Scanning: ",t.default.env.PRISM_TARGET]})]}),(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-xl p-6 flex flex-col gap-4",style:{background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-slate-300 uppercase tracking-widest",children:"Scan a directory"}),(0,r.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,r.jsx)("label",{className:"text-xs text-slate-400",htmlFor:"targetPath",children:"Absolute path"}),(0,r.jsx)("input",{id:"targetPath",type:"text",value:e,onChange:e=>a(e.target.value),placeholder:"/Users/you/your-project",className:"w-full rounded-lg px-3 py-2 text-sm font-mono text-slate-200 outline-none focus:ring-2 focus:ring-sky-500/50",style:{background:"rgba(2,6,23,0.6)",border:"1px solid var(--border-default)"},onKeyDown:e=>"Enter"===e.key&&d()})]}),(0,r.jsx)("button",{onClick:d,disabled:i||!e.trim(),className:"w-full py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"rgb(14,165,233)",color:"#020617"},children:i?"Scanning…":"Run cycle detection"})]}),(o||u)&&(0,r.jsxs)("div",{className:"w-full max-w-lg rounded-xl p-6 flex flex-col gap-3",style:{background:"var(--surface-panel)",border:`1px solid ${u?"rgba(239,68,68,0.3)":"var(--border-default)"}`},children:[(0,r.jsx)("h2",{className:"text-sm font-semibold text-slate-300 uppercase tracking-widest",children:"Results"}),u&&(0,r.jsx)("p",{className:"text-sm text-red-400 font-mono",children:u}),o&&(0,r.jsx)("pre",{className:"text-xs font-mono text-slate-300 overflow-auto max-h-96 leading-relaxed",style:{whiteSpace:"pre-wrap",wordBreak:"break-all"},children:o})]})]}),(0,r.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",style:{marginBottom:"var(--infobar-clearance-bottom)"},children:["prism",(0,r.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.2"]})]})}])}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,32545,e=>{"use strict";let t;e.i(47167);var a,s,r,i,n,d,o,l=e.i(43476),c=e.i(71645),u=e.i(22016);e.s([],38570),e.i(38570),(a=i||(i={})).assertEqual=e=>{},a.assertIs=function(e){},a.assertNever=function(e){throw Error()},a.arrayToEnum=e=>{let t={};for(let a of e)t[a]=a;return t},a.getValidEnumValues=e=>{let t=a.objectKeys(e).filter(t=>"number"!=typeof e[e[t]]),s={};for(let a of t)s[a]=e[a];return a.objectValues(s)},a.objectValues=e=>a.objectKeys(e).map(function(t){return e[t]}),a.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.push(a);return t},a.find=(e,t)=>{for(let a of e)if(t(a))return a},a.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,a.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},a.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t,(n||(n={})).mergeShapes=(e,t)=>({...e,...t});let h=i.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),p=e=>{switch(typeof e){case"undefined":return h.undefined;case"string":return h.string;case"number":return Number.isNaN(e)?h.nan:h.number;case"boolean":return h.boolean;case"function":return h.function;case"bigint":return h.bigint;case"symbol":return h.symbol;case"object":if(Array.isArray(e))return h.array;if(null===e)return h.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return h.promise;if("u">typeof Map&&e instanceof Map)return h.map;if("u">typeof Set&&e instanceof Set)return h.set;if("u">typeof Date&&e instanceof Date)return h.date;return h.object;default:return h.unknown}};e.s(["ZodParsedType",0,h,"getParsedType",0,p,"objectUtil",0,n,"util",0,i],4783);let m=i.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),f=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class g extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},a={_errors:[]},s=e=>{for(let r of e.issues)if("invalid_union"===r.code)r.unionErrors.map(s);else if("invalid_return_type"===r.code)s(r.returnTypeError);else if("invalid_arguments"===r.code)s(r.argumentsError);else if(0===r.path.length)a._errors.push(t(r));else{let e=a,s=0;for(;s<r.path.length;){let a=r.path[s];s===r.path.length-1?(e[a]=e[a]||{_errors:[]},e[a]._errors.push(t(r))):e[a]=e[a]||{_errors:[]},e=e[a],s++}}};return s(this),a}static assert(e){if(!(e instanceof g))throw Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,i.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){let t={},a=[];for(let s of this.issues)if(s.path.length>0){let a=s.path[0];t[a]=t[a]||[],t[a].push(e(s))}else a.push(e(s));return{formErrors:a,fieldErrors:t}}get formErrors(){return this.flatten()}}g.create=e=>new g(e),e.s(["ZodError",0,g,"ZodIssueCode",0,m,"quotelessJson",0,f],69790);let y=(e,t)=>{let a;switch(e.code){case m.invalid_type:a=e.received===h.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case m.invalid_literal:a=`Invalid literal value, expected ${JSON.stringify(e.expected,i.jsonStringifyReplacer)}`;break;case m.unrecognized_keys:a=`Unrecognized key(s) in object: ${i.joinValues(e.keys,", ")}`;break;case m.invalid_union:a="Invalid input";break;case m.invalid_union_discriminator:a=`Invalid discriminator value. Expected ${i.joinValues(e.options)}`;break;case m.invalid_enum_value:a=`Invalid enum value. Expected ${i.joinValues(e.options)}, received '${e.received}'`;break;case m.invalid_arguments:a="Invalid function arguments";break;case m.invalid_return_type:a="Invalid function return type";break;case m.invalid_date:a="Invalid date";break;case m.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(a=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(a=`${a} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?a=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?a=`Invalid input: must end with "${e.validation.endsWith}"`:i.assertNever(e.validation):a="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case m.too_small:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case m.too_big:a="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case m.custom:a="Invalid input";break;case m.invalid_intersection_types:a="Intersection results could not be merged";break;case m.not_multiple_of:a=`Number must be a multiple of ${e.multipleOf}`;break;case m.not_finite:a="Number must be finite";break;default:a=t.defaultError,i.assertNever(e)}return{message:a}},v=y;function _(e){v=e}function x(){return v}e.s(["getErrorMap",0,x,"setErrorMap",0,_],37904),e.i(37904),e.s(["defaultErrorMap",0,y,"getErrorMap",0,x,"setErrorMap",0,_],77290),e.i(77290);let b=e=>{let{data:t,path:a,errorMaps:s,issueData:r}=e,i=[...a,...r.path||[]],n={...r,path:i};if(void 0!==r.message)return{...r,path:i,message:r.message};let d="";for(let e of s.filter(e=>!!e).slice().reverse())d=e(n,{data:t,defaultError:d}).message;return{...r,path:i,message:d}},k=[];function w(e,t){let a=x(),s=b({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,a,a===y?void 0:y].filter(e=>!!e)});e.common.issues.push(s)}class j{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let a=[];for(let s of t){if("aborted"===s.status)return N;"dirty"===s.status&&e.dirty(),a.push(s.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,t){let a=[];for(let e of t){let t=await e.key,s=await e.value;a.push({key:t,value:s})}return j.mergeObjectSync(e,a)}static mergeObjectSync(e,t){let a={};for(let s of t){let{key:t,value:r}=s;if("aborted"===t.status||"aborted"===r.status)return N;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==r.value||s.alwaysSet)&&(a[t.value]=r.value)}return{status:e.value,value:a}}}let N=Object.freeze({status:"aborted"}),Z=e=>({status:"dirty",value:e}),T=e=>({status:"valid",value:e}),S=e=>"aborted"===e.status,C=e=>"dirty"===e.status,O=e=>"valid"===e.status,A=e=>"u">typeof Promise&&e instanceof Promise;e.s(["DIRTY",0,Z,"EMPTY_PATH",0,k,"INVALID",0,N,"OK",0,T,"ParseStatus",0,j,"addIssueToContext",0,w,"isAborted",0,S,"isAsync",0,A,"isDirty",0,C,"isValid",0,O,"makeIssue",0,b],65354),e.i(65354),e.s([],27404),e.i(27404),e.i(4783),(s=d||(d={})).errToObj=e=>"string"==typeof e?{message:e}:e||{},s.toString=e=>"string"==typeof e?e:e?.message;class E{constructor(e,t,a,s){this._cachedPath=[],this.parent=e,this.data=t,this._path=a,this._key=s}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let I=(e,t)=>{if(O(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new g(e.common.issues);return this._error=t,this._error}}};function P(e){if(!e)return{};let{errorMap:t,invalid_type_error:a,required_error:s,description:r}=e;if(t&&(a||s))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:r}:{errorMap:(t,r)=>{let{message:i}=e;return"invalid_enum_value"===t.code?{message:i??r.defaultError}:void 0===r.data?{message:i??s??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:i??a??r.defaultError}},description:r}}class ${get description(){return this._def.description}_getType(e){return p(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:p(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new j,ctx:{common:e.parent.common,data:e.data,parsedType:p(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(A(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let a=this.safeParse(e,t);if(a.success)return a.data;throw a.error}safeParse(e,t){let a={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:p(e)},s=this._parseSync({data:e,path:a.path,parent:a});return I(a,s)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:p(e)};if(!this["~standard"].async)try{let a=this._parseSync({data:e,path:[],parent:t});return O(a)?{value:a.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>O(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let a=await this.safeParseAsync(e,t);if(a.success)return a.data;throw a.error}async safeParseAsync(e,t){let a={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:p(e)},s=this._parse({data:e,path:a.path,parent:a});return I(a,await (A(s)?s:Promise.resolve(s)))}refine(e,t){return this._refinement((a,s)=>{let r=e(a),i=()=>s.addIssue({code:m.custom,..."string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(a):t});return"u">typeof Promise&&r instanceof Promise?r.then(e=>!!e||(i(),!1)):!!r||(i(),!1)})}refinement(e,t){return this._refinement((a,s)=>!!e(a)||(s.addIssue("function"==typeof t?t(a,s):t),!1))}_refinement(e){return new eC({schema:this,typeName:o.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return eO.create(this,this._def)}nullable(){return eA.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eh.create(this)}promise(){return eS.create(this,this._def)}or(e){return em.create([this,e],this._def)}and(e){return ey.create(this,e,this._def)}transform(e){return new eC({...P(this._def),schema:this,typeName:o.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eE({...P(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:o.ZodDefault})}brand(){return new eR({typeName:o.ZodBranded,type:this,...P(this._def)})}catch(e){return new eI({...P(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:o.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eM.create(this,e)}readonly(){return eF.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let R=/^c[^\s-]{8,}$/i,M=/^[0-9a-z]+$/,F=/^[0-9A-HJKMNP-TV-Z]{26}$/i,L=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,D=/^[a-z0-9_-]{21}$/i,z=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,U=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,V=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,K=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,X=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,B=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,W=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,q=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,J=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Y="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",H=RegExp(`^${Y}$`);function G(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let a=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${a}`}function Q(e){let t=`${Y}T${G(e)}`,a=[];return a.push(e.local?"Z?":"Z"),e.offset&&a.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${a.join("|")})`,RegExp(`^${t}$`)}class ee extends ${_parse(e){var a,s,r,n;let d;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==h.string){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.string,received:t.parsedType}),N}let o=new j;for(let l of this._def.checks)if("min"===l.kind)e.data.length<l.value&&(w(d=this._getOrReturnCtx(e,d),{code:m.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("max"===l.kind)e.data.length>l.value&&(w(d=this._getOrReturnCtx(e,d),{code:m.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!1,message:l.message}),o.dirty());else if("length"===l.kind){let t=e.data.length>l.value,a=e.data.length<l.value;(t||a)&&(d=this._getOrReturnCtx(e,d),t?w(d,{code:m.too_big,maximum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}):a&&w(d,{code:m.too_small,minimum:l.value,type:"string",inclusive:!0,exact:!0,message:l.message}),o.dirty())}else if("email"===l.kind)V.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"email",code:m.invalid_string,message:l.message}),o.dirty());else if("emoji"===l.kind)t||(t=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),t.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"emoji",code:m.invalid_string,message:l.message}),o.dirty());else if("uuid"===l.kind)L.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"uuid",code:m.invalid_string,message:l.message}),o.dirty());else if("nanoid"===l.kind)D.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"nanoid",code:m.invalid_string,message:l.message}),o.dirty());else if("cuid"===l.kind)R.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"cuid",code:m.invalid_string,message:l.message}),o.dirty());else if("cuid2"===l.kind)M.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"cuid2",code:m.invalid_string,message:l.message}),o.dirty());else if("ulid"===l.kind)F.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"ulid",code:m.invalid_string,message:l.message}),o.dirty());else if("url"===l.kind)try{new URL(e.data)}catch{w(d=this._getOrReturnCtx(e,d),{validation:"url",code:m.invalid_string,message:l.message}),o.dirty()}else"regex"===l.kind?(l.regex.lastIndex=0,l.regex.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"regex",code:m.invalid_string,message:l.message}),o.dirty())):"trim"===l.kind?e.data=e.data.trim():"includes"===l.kind?e.data.includes(l.value,l.position)||(w(d=this._getOrReturnCtx(e,d),{code:m.invalid_string,validation:{includes:l.value,position:l.position},message:l.message}),o.dirty()):"toLowerCase"===l.kind?e.data=e.data.toLowerCase():"toUpperCase"===l.kind?e.data=e.data.toUpperCase():"startsWith"===l.kind?e.data.startsWith(l.value)||(w(d=this._getOrReturnCtx(e,d),{code:m.invalid_string,validation:{startsWith:l.value},message:l.message}),o.dirty()):"endsWith"===l.kind?e.data.endsWith(l.value)||(w(d=this._getOrReturnCtx(e,d),{code:m.invalid_string,validation:{endsWith:l.value},message:l.message}),o.dirty()):"datetime"===l.kind?Q(l).test(e.data)||(w(d=this._getOrReturnCtx(e,d),{code:m.invalid_string,validation:"datetime",message:l.message}),o.dirty()):"date"===l.kind?H.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{code:m.invalid_string,validation:"date",message:l.message}),o.dirty()):"time"===l.kind?RegExp(`^${G(l)}$`).test(e.data)||(w(d=this._getOrReturnCtx(e,d),{code:m.invalid_string,validation:"time",message:l.message}),o.dirty()):"duration"===l.kind?U.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"duration",code:m.invalid_string,message:l.message}),o.dirty()):"ip"===l.kind?(a=e.data,!(("v4"===(s=l.version)||!s)&&K.test(a)||("v6"===s||!s)&&B.test(a))&&1&&(w(d=this._getOrReturnCtx(e,d),{validation:"ip",code:m.invalid_string,message:l.message}),o.dirty())):"jwt"===l.kind?!function(e,t){if(!z.test(e))return!1;try{let[a]=e.split(".");if(!a)return!1;let s=a.replace(/-/g,"+").replace(/_/g,"/").padEnd(a.length+(4-a.length%4)%4,"="),r=JSON.parse(atob(s));if("object"!=typeof r||null===r||"typ"in r&&r?.typ!=="JWT"||!r.alg||t&&r.alg!==t)return!1;return!0}catch{return!1}}(e.data,l.alg)&&(w(d=this._getOrReturnCtx(e,d),{validation:"jwt",code:m.invalid_string,message:l.message}),o.dirty()):"cidr"===l.kind?(r=e.data,!(("v4"===(n=l.version)||!n)&&X.test(r)||("v6"===n||!n)&&W.test(r))&&1&&(w(d=this._getOrReturnCtx(e,d),{validation:"cidr",code:m.invalid_string,message:l.message}),o.dirty())):"base64"===l.kind?q.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"base64",code:m.invalid_string,message:l.message}),o.dirty()):"base64url"===l.kind?J.test(e.data)||(w(d=this._getOrReturnCtx(e,d),{validation:"base64url",code:m.invalid_string,message:l.message}),o.dirty()):i.assertNever(l);return{status:o.value,value:e.data}}_regex(e,t,a){return this.refinement(t=>e.test(t),{validation:t,code:m.invalid_string,...d.errToObj(a)})}_addCheck(e){return new ee({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...d.errToObj(e)})}url(e){return this._addCheck({kind:"url",...d.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...d.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...d.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...d.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...d.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...d.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...d.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...d.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...d.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...d.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...d.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...d.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...d.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...d.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...d.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...d.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...d.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...d.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...d.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...d.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...d.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...d.errToObj(t)})}nonempty(e){return this.min(1,d.errToObj(e))}trim(){return new ee({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ee({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ee.create=e=>new ee({checks:[],typeName:o.ZodString,coerce:e?.coerce??!1,...P(e)});class et extends ${constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==h.number){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.number,received:t.parsedType}),N}let a=new j;for(let s of this._def.checks)"int"===s.kind?i.isInteger(e.data)||(w(t=this._getOrReturnCtx(e,t),{code:m.invalid_type,expected:"integer",received:"float",message:s.message}),a.dirty()):"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),a.dirty()):"multipleOf"===s.kind?0!==function(e,t){let a=(e.toString().split(".")[1]||"").length,s=(t.toString().split(".")[1]||"").length,r=a>s?a:s;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}(e.data,s.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):"finite"===s.kind?Number.isFinite(e.data)||(w(t=this._getOrReturnCtx(e,t),{code:m.not_finite,message:s.message}),a.dirty()):i.assertNever(s);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,d.toString(t))}gt(e,t){return this.setLimit("min",e,!1,d.toString(t))}lte(e,t){return this.setLimit("max",e,!0,d.toString(t))}lt(e,t){return this.setLimit("max",e,!1,d.toString(t))}setLimit(e,t,a,s){return new et({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:d.toString(s)}]})}_addCheck(e){return new et({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:d.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:d.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:d.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:d.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:d.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:d.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:d.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:d.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:d.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&i.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let a of this._def.checks)if("finite"===a.kind||"int"===a.kind||"multipleOf"===a.kind)return!0;else"min"===a.kind?(null===t||a.value>t)&&(t=a.value):"max"===a.kind&&(null===e||a.value<e)&&(e=a.value);return Number.isFinite(t)&&Number.isFinite(e)}}et.create=e=>new et({checks:[],typeName:o.ZodNumber,coerce:e?.coerce||!1,...P(e)});class ea extends ${constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==h.bigint)return this._getInvalidInput(e);let a=new j;for(let s of this._def.checks)"min"===s.kind?(s.inclusive?e.data<s.value:e.data<=s.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):"max"===s.kind?(s.inclusive?e.data>s.value:e.data>=s.value)&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),a.dirty()):"multipleOf"===s.kind?e.data%s.value!==BigInt(0)&&(w(t=this._getOrReturnCtx(e,t),{code:m.not_multiple_of,multipleOf:s.value,message:s.message}),a.dirty()):i.assertNever(s);return{status:a.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.bigint,received:t.parsedType}),N}gte(e,t){return this.setLimit("min",e,!0,d.toString(t))}gt(e,t){return this.setLimit("min",e,!1,d.toString(t))}lte(e,t){return this.setLimit("max",e,!0,d.toString(t))}lt(e,t){return this.setLimit("max",e,!1,d.toString(t))}setLimit(e,t,a,s){return new ea({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:a,message:d.toString(s)}]})}_addCheck(e){return new ea({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:d.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:d.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:d.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:d.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:d.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ea.create=e=>new ea({checks:[],typeName:o.ZodBigInt,coerce:e?.coerce??!1,...P(e)});class es extends ${_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==h.boolean){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.boolean,received:t.parsedType}),N}return T(e.data)}}es.create=e=>new es({typeName:o.ZodBoolean,coerce:e?.coerce||!1,...P(e)});class er extends ${_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==h.date){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.date,received:t.parsedType}),N}if(Number.isNaN(e.data.getTime()))return w(this._getOrReturnCtx(e),{code:m.invalid_date}),N;let a=new j;for(let s of this._def.checks)"min"===s.kind?e.data.getTime()<s.value&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),a.dirty()):"max"===s.kind?e.data.getTime()>s.value&&(w(t=this._getOrReturnCtx(e,t),{code:m.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),a.dirty()):i.assertNever(s);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new er({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:d.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:d.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}er.create=e=>new er({checks:[],coerce:e?.coerce||!1,typeName:o.ZodDate,...P(e)});class ei extends ${_parse(e){if(this._getType(e)!==h.symbol){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.symbol,received:t.parsedType}),N}return T(e.data)}}ei.create=e=>new ei({typeName:o.ZodSymbol,...P(e)});class en extends ${_parse(e){if(this._getType(e)!==h.undefined){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.undefined,received:t.parsedType}),N}return T(e.data)}}en.create=e=>new en({typeName:o.ZodUndefined,...P(e)});class ed extends ${_parse(e){if(this._getType(e)!==h.null){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.null,received:t.parsedType}),N}return T(e.data)}}ed.create=e=>new ed({typeName:o.ZodNull,...P(e)});class eo extends ${constructor(){super(...arguments),this._any=!0}_parse(e){return T(e.data)}}eo.create=e=>new eo({typeName:o.ZodAny,...P(e)});class el extends ${constructor(){super(...arguments),this._unknown=!0}_parse(e){return T(e.data)}}el.create=e=>new el({typeName:o.ZodUnknown,...P(e)});class ec extends ${_parse(e){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.never,received:t.parsedType}),N}}ec.create=e=>new ec({typeName:o.ZodNever,...P(e)});class eu extends ${_parse(e){if(this._getType(e)!==h.undefined){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.void,received:t.parsedType}),N}return T(e.data)}}eu.create=e=>new eu({typeName:o.ZodVoid,...P(e)});class eh extends ${_parse(e){let{ctx:t,status:a}=this._processInputParams(e),s=this._def;if(t.parsedType!==h.array)return w(t,{code:m.invalid_type,expected:h.array,received:t.parsedType}),N;if(null!==s.exactLength){let e=t.data.length>s.exactLength.value,r=t.data.length<s.exactLength.value;(e||r)&&(w(t,{code:e?m.too_big:m.too_small,minimum:r?s.exactLength.value:void 0,maximum:e?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),a.dirty())}if(null!==s.minLength&&t.data.length<s.minLength.value&&(w(t,{code:m.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),a.dirty()),null!==s.maxLength&&t.data.length>s.maxLength.value&&(w(t,{code:m.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),a.dirty()),t.common.async)return Promise.all([...t.data].map((e,a)=>s.type._parseAsync(new E(t,e,t.path,a)))).then(e=>j.mergeArray(a,e));let r=[...t.data].map((e,a)=>s.type._parseSync(new E(t,e,t.path,a)));return j.mergeArray(a,r)}get element(){return this._def.type}min(e,t){return new eh({...this._def,minLength:{value:e,message:d.toString(t)}})}max(e,t){return new eh({...this._def,maxLength:{value:e,message:d.toString(t)}})}length(e,t){return new eh({...this._def,exactLength:{value:e,message:d.toString(t)}})}nonempty(e){return this.min(1,e)}}eh.create=(e,t)=>new eh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:o.ZodArray,...P(t)});class ep extends ${constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=i.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==h.object){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.object,received:t.parsedType}),N}let{status:t,ctx:a}=this._processInputParams(e),{shape:s,keys:r}=this._getCached(),i=[];if(!(this._def.catchall instanceof ec&&"strip"===this._def.unknownKeys))for(let e in a.data)r.includes(e)||i.push(e);let n=[];for(let e of r){let t=s[e],r=a.data[e];n.push({key:{status:"valid",value:e},value:t._parse(new E(a,r,a.path,e)),alwaysSet:e in a.data})}if(this._def.catchall instanceof ec){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of i)n.push({key:{status:"valid",value:e},value:{status:"valid",value:a.data[e]}});else if("strict"===e)i.length>0&&(w(a,{code:m.unrecognized_keys,keys:i}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of i){let s=a.data[t];n.push({key:{status:"valid",value:t},value:e._parse(new E(a,s,a.path,t)),alwaysSet:t in a.data})}}return a.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of n){let a=await t.key,s=await t.value;e.push({key:a,value:s,alwaysSet:t.alwaysSet})}return e}).then(e=>j.mergeObjectSync(t,e)):j.mergeObjectSync(t,n)}get shape(){return this._def.shape()}strict(e){return d.errToObj,new ep({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,a)=>{let s=this._def.errorMap?.(t,a).message??a.defaultError;return"unrecognized_keys"===t.code?{message:d.errToObj(e).message??s}:{message:s}}}:{}})}strip(){return new ep({...this._def,unknownKeys:"strip"})}passthrough(){return new ep({...this._def,unknownKeys:"passthrough"})}extend(e){return new ep({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ep({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:o.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ep({...this._def,catchall:e})}pick(e){let t={};for(let a of i.objectKeys(e))e[a]&&this.shape[a]&&(t[a]=this.shape[a]);return new ep({...this._def,shape:()=>t})}omit(e){let t={};for(let a of i.objectKeys(this.shape))e[a]||(t[a]=this.shape[a]);return new ep({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ep){let a={};for(let s in t.shape){let r=t.shape[s];a[s]=eO.create(e(r))}return new ep({...t._def,shape:()=>a})}if(t instanceof eh)return new eh({...t._def,type:e(t.element)});if(t instanceof eO)return eO.create(e(t.unwrap()));if(t instanceof eA)return eA.create(e(t.unwrap()));if(t instanceof ev)return ev.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let a of i.objectKeys(this.shape)){let s=this.shape[a];e&&!e[a]?t[a]=s:t[a]=s.optional()}return new ep({...this._def,shape:()=>t})}required(e){let t={};for(let a of i.objectKeys(this.shape))if(e&&!e[a])t[a]=this.shape[a];else{let e=this.shape[a];for(;e instanceof eO;)e=e._def.innerType;t[a]=e}return new ep({...this._def,shape:()=>t})}keyof(){return eN(i.objectKeys(this.shape))}}ep.create=(e,t)=>new ep({shape:()=>e,unknownKeys:"strip",catchall:ec.create(),typeName:o.ZodObject,...P(t)}),ep.strictCreate=(e,t)=>new ep({shape:()=>e,unknownKeys:"strict",catchall:ec.create(),typeName:o.ZodObject,...P(t)}),ep.lazycreate=(e,t)=>new ep({shape:e,unknownKeys:"strip",catchall:ec.create(),typeName:o.ZodObject,...P(t)});class em extends ${_parse(e){let{ctx:t}=this._processInputParams(e),a=this._def.options;if(t.common.async)return Promise.all(a.map(async e=>{let a={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:a}),ctx:a}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let a of e)if("dirty"===a.result.status)return t.common.issues.push(...a.ctx.common.issues),a.result;let a=e.map(e=>new g(e.ctx.common.issues));return w(t,{code:m.invalid_union,unionErrors:a}),N});{let e,s=[];for(let r of a){let a={...t,common:{...t.common,issues:[]},parent:null},i=r._parseSync({data:t.data,path:t.path,parent:a});if("valid"===i.status)return i;"dirty"!==i.status||e||(e={result:i,ctx:a}),a.common.issues.length&&s.push(a.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let r=s.map(e=>new g(e));return w(t,{code:m.invalid_union,unionErrors:r}),N}}get options(){return this._def.options}}em.create=(e,t)=>new em({options:e,typeName:o.ZodUnion,...P(t)});let ef=e=>{if(e instanceof ew)return ef(e.schema);if(e instanceof eC)return ef(e.innerType());if(e instanceof ej)return[e.value];if(e instanceof eZ)return e.options;if(e instanceof eT)return i.objectValues(e.enum);else if(e instanceof eE)return ef(e._def.innerType);else if(e instanceof en)return[void 0];else if(e instanceof ed)return[null];else if(e instanceof eO)return[void 0,...ef(e.unwrap())];else if(e instanceof eA)return[null,...ef(e.unwrap())];else if(e instanceof eR)return ef(e.unwrap());else if(e instanceof eF)return ef(e.unwrap());else if(e instanceof eI)return ef(e._def.innerType);else return[]};class eg extends ${_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.object)return w(t,{code:m.invalid_type,expected:h.object,received:t.parsedType}),N;let a=this.discriminator,s=t.data[a],r=this.optionsMap.get(s);return r?t.common.async?r._parseAsync({data:t.data,path:t.path,parent:t}):r._parseSync({data:t.data,path:t.path,parent:t}):(w(t,{code:m.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[a]}),N)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,a){let s=new Map;for(let a of t){let t=ef(a.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let r of t){if(s.has(r))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);s.set(r,a)}}return new eg({typeName:o.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:s,...P(a)})}}class ey extends ${_parse(e){let{status:t,ctx:a}=this._processInputParams(e),s=(e,s)=>{if(S(e)||S(s))return N;let r=function e(t,a){let s=p(t),r=p(a);if(t===a)return{valid:!0,data:t};if(s===h.object&&r===h.object){let s=i.objectKeys(a),r=i.objectKeys(t).filter(e=>-1!==s.indexOf(e)),n={...t,...a};for(let s of r){let r=e(t[s],a[s]);if(!r.valid)return{valid:!1};n[s]=r.data}return{valid:!0,data:n}}if(s===h.array&&r===h.array){if(t.length!==a.length)return{valid:!1};let s=[];for(let r=0;r<t.length;r++){let i=e(t[r],a[r]);if(!i.valid)return{valid:!1};s.push(i.data)}return{valid:!0,data:s}}if(s===h.date&&r===h.date&&+t==+a)return{valid:!0,data:t};return{valid:!1}}(e.value,s.value);return r.valid?((C(e)||C(s))&&t.dirty(),{status:t.value,value:r.data}):(w(a,{code:m.invalid_intersection_types}),N)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([e,t])=>s(e,t)):s(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}ey.create=(e,t,a)=>new ey({left:e,right:t,typeName:o.ZodIntersection,...P(a)});class ev extends ${_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==h.array)return w(a,{code:m.invalid_type,expected:h.array,received:a.parsedType}),N;if(a.data.length<this._def.items.length)return w(a,{code:m.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),N;!this._def.rest&&a.data.length>this._def.items.length&&(w(a,{code:m.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let s=[...a.data].map((e,t)=>{let s=this._def.items[t]||this._def.rest;return s?s._parse(new E(a,e,a.path,t)):null}).filter(e=>!!e);return a.common.async?Promise.all(s).then(e=>j.mergeArray(t,e)):j.mergeArray(t,s)}get items(){return this._def.items}rest(e){return new ev({...this._def,rest:e})}}ev.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new ev({items:e,typeName:o.ZodTuple,rest:null,...P(t)})};class e_ extends ${get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==h.object)return w(a,{code:m.invalid_type,expected:h.object,received:a.parsedType}),N;let s=[],r=this._def.keyType,i=this._def.valueType;for(let e in a.data)s.push({key:r._parse(new E(a,e,a.path,e)),value:i._parse(new E(a,a.data[e],a.path,e)),alwaysSet:e in a.data});return a.common.async?j.mergeObjectAsync(t,s):j.mergeObjectSync(t,s)}get element(){return this._def.valueType}static create(e,t,a){return new e_(t instanceof $?{keyType:e,valueType:t,typeName:o.ZodRecord,...P(a)}:{keyType:ee.create(),valueType:e,typeName:o.ZodRecord,...P(t)})}}class ex extends ${get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==h.map)return w(a,{code:m.invalid_type,expected:h.map,received:a.parsedType}),N;let s=this._def.keyType,r=this._def.valueType,i=[...a.data.entries()].map(([e,t],i)=>({key:s._parse(new E(a,e,a.path,[i,"key"])),value:r._parse(new E(a,t,a.path,[i,"value"]))}));if(a.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let a of i){let s=await a.key,r=await a.value;if("aborted"===s.status||"aborted"===r.status)return N;("dirty"===s.status||"dirty"===r.status)&&t.dirty(),e.set(s.value,r.value)}return{status:t.value,value:e}})}{let e=new Map;for(let a of i){let s=a.key,r=a.value;if("aborted"===s.status||"aborted"===r.status)return N;("dirty"===s.status||"dirty"===r.status)&&t.dirty(),e.set(s.value,r.value)}return{status:t.value,value:e}}}}ex.create=(e,t,a)=>new ex({valueType:t,keyType:e,typeName:o.ZodMap,...P(a)});class eb extends ${_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.parsedType!==h.set)return w(a,{code:m.invalid_type,expected:h.set,received:a.parsedType}),N;let s=this._def;null!==s.minSize&&a.data.size<s.minSize.value&&(w(a,{code:m.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),t.dirty()),null!==s.maxSize&&a.data.size>s.maxSize.value&&(w(a,{code:m.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),t.dirty());let r=this._def.valueType;function i(e){let a=new Set;for(let s of e){if("aborted"===s.status)return N;"dirty"===s.status&&t.dirty(),a.add(s.value)}return{status:t.value,value:a}}let n=[...a.data.values()].map((e,t)=>r._parse(new E(a,e,a.path,t)));return a.common.async?Promise.all(n).then(e=>i(e)):i(n)}min(e,t){return new eb({...this._def,minSize:{value:e,message:d.toString(t)}})}max(e,t){return new eb({...this._def,maxSize:{value:e,message:d.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}eb.create=(e,t)=>new eb({valueType:e,minSize:null,maxSize:null,typeName:o.ZodSet,...P(t)});class ek extends ${constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==h.function)return w(t,{code:m.invalid_type,expected:h.function,received:t.parsedType}),N;function a(e,a){return b({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,x(),y].filter(e=>!!e),issueData:{code:m.invalid_arguments,argumentsError:a}})}function s(e,a){return b({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,x(),y].filter(e=>!!e),issueData:{code:m.invalid_return_type,returnTypeError:a}})}let r={errorMap:t.common.contextualErrorMap},i=t.data;if(this._def.returns instanceof eS){let e=this;return T(async function(...t){let n=new g([]),d=await e._def.args.parseAsync(t,r).catch(e=>{throw n.addIssue(a(t,e)),n}),o=await Reflect.apply(i,this,d);return await e._def.returns._def.type.parseAsync(o,r).catch(e=>{throw n.addIssue(s(o,e)),n})})}{let e=this;return T(function(...t){let n=e._def.args.safeParse(t,r);if(!n.success)throw new g([a(t,n.error)]);let d=Reflect.apply(i,this,n.data),o=e._def.returns.safeParse(d,r);if(!o.success)throw new g([s(d,o.error)]);return o.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ek({...this._def,args:ev.create(e).rest(el.create())})}returns(e){return new ek({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,a){return new ek({args:e||ev.create([]).rest(el.create()),returns:t||el.create(),typeName:o.ZodFunction,...P(a)})}}class ew extends ${get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ew.create=(e,t)=>new ew({getter:e,typeName:o.ZodLazy,...P(t)});class ej extends ${_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return w(t,{received:t.data,code:m.invalid_literal,expected:this._def.value}),N}return{status:"valid",value:e.data}}get value(){return this._def.value}}function eN(e,t){return new eZ({values:e,typeName:o.ZodEnum,...P(t)})}ej.create=(e,t)=>new ej({value:e,typeName:o.ZodLiteral,...P(t)});class eZ extends ${_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),a=this._def.values;return w(t,{expected:i.joinValues(a),received:t.parsedType,code:m.invalid_type}),N}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),a=this._def.values;return w(t,{received:t.data,code:m.invalid_enum_value,options:a}),N}return T(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return eZ.create(e,{...this._def,...t})}exclude(e,t=this._def){return eZ.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}eZ.create=eN;class eT extends ${_parse(e){let t=i.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==h.string&&a.parsedType!==h.number){let e=i.objectValues(t);return w(a,{expected:i.joinValues(e),received:a.parsedType,code:m.invalid_type}),N}if(this._cache||(this._cache=new Set(i.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=i.objectValues(t);return w(a,{received:a.data,code:m.invalid_enum_value,options:e}),N}return T(e.data)}get enum(){return this._def.values}}eT.create=(e,t)=>new eT({values:e,typeName:o.ZodNativeEnum,...P(t)});class eS extends ${unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==h.promise&&!1===t.common.async?(w(t,{code:m.invalid_type,expected:h.promise,received:t.parsedType}),N):T((t.parsedType===h.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eS.create=(e,t)=>new eS({type:e,typeName:o.ZodPromise,...P(t)});class eC extends ${innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===o.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:a}=this._processInputParams(e),s=this._def.effect||null,r={addIssue:e=>{w(a,e),e.fatal?t.abort():t.dirty()},get path(){return a.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===s.type){let e=s.transform(a.data,r);if(a.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return N;let s=await this._def.schema._parseAsync({data:e,path:a.path,parent:a});return"aborted"===s.status?N:"dirty"===s.status||"dirty"===t.value?Z(s.value):s});{if("aborted"===t.value)return N;let s=this._def.schema._parseSync({data:e,path:a.path,parent:a});return"aborted"===s.status?N:"dirty"===s.status||"dirty"===t.value?Z(s.value):s}}if("refinement"===s.type){let e=e=>{let t=s.refinement(e,r);if(a.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==a.common.async)return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(a=>"aborted"===a.status?N:("dirty"===a.status&&t.dirty(),e(a.value).then(()=>({status:t.value,value:a.value}))));{let s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===s.status?N:("dirty"===s.status&&t.dirty(),e(s.value),{status:t.value,value:s.value})}}if("transform"===s.type)if(!1!==a.common.async)return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(e=>O(e)?Promise.resolve(s.transform(e.value,r)).then(e=>({status:t.value,value:e})):N);else{let e=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!O(e))return N;let i=s.transform(e.value,r);if(i instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}i.assertNever(s)}}eC.create=(e,t,a)=>new eC({schema:e,typeName:o.ZodEffects,effect:t,...P(a)}),eC.createWithPreprocess=(e,t,a)=>new eC({schema:t,effect:{type:"preprocess",transform:e},typeName:o.ZodEffects,...P(a)});class eO extends ${_parse(e){return this._getType(e)===h.undefined?T(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eO.create=(e,t)=>new eO({innerType:e,typeName:o.ZodOptional,...P(t)});class eA extends ${_parse(e){return this._getType(e)===h.null?T(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eA.create=(e,t)=>new eA({innerType:e,typeName:o.ZodNullable,...P(t)});class eE extends ${_parse(e){let{ctx:t}=this._processInputParams(e),a=t.data;return t.parsedType===h.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eE.create=(e,t)=>new eE({innerType:e,typeName:o.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...P(t)});class eI extends ${_parse(e){let{ctx:t}=this._processInputParams(e),a={...t,common:{...t.common,issues:[]}},s=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return A(s)?s.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new g(a.common.issues)},input:a.data})})):{status:"valid",value:"valid"===s.status?s.value:this._def.catchValue({get error(){return new g(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}eI.create=(e,t)=>new eI({innerType:e,typeName:o.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...P(t)});class eP extends ${_parse(e){if(this._getType(e)!==h.nan){let t=this._getOrReturnCtx(e);return w(t,{code:m.invalid_type,expected:h.nan,received:t.parsedType}),N}return{status:"valid",value:e.data}}}eP.create=e=>new eP({typeName:o.ZodNaN,...P(e)});let e$=Symbol("zod_brand");class eR extends ${_parse(e){let{ctx:t}=this._processInputParams(e),a=t.data;return this._def.type._parse({data:a,path:t.path,parent:t})}unwrap(){return this._def.type}}class eM extends ${_parse(e){let{status:t,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?N:"dirty"===e.status?(t.dirty(),Z(e.value)):this._def.out._parseAsync({data:e.value,path:a.path,parent:a})})();{let e=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return"aborted"===e.status?N:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:a.path,parent:a})}}static create(e,t){return new eM({in:e,out:t,typeName:o.ZodPipeline})}}class eF extends ${_parse(e){let t=this._def.innerType._parse(e),a=e=>(O(e)&&(e.value=Object.freeze(e.value)),e);return A(t)?t.then(e=>a(e)):a(t)}unwrap(){return this._def.innerType}}function eL(e,t){let a="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof a?{message:a}:a}function eD(e,t={},a){return e?eo.create().superRefine((s,r)=>{let i=e(s);if(i instanceof Promise)return i.then(e=>{if(!e){let e=eL(t,s),i=e.fatal??a??!0;r.addIssue({code:"custom",...e,fatal:i})}});if(!i){let e=eL(t,s),i=e.fatal??a??!0;r.addIssue({code:"custom",...e,fatal:i})}}):eo.create()}eF.create=(e,t)=>new eF({innerType:e,typeName:o.ZodReadonly,...P(t)});let ez={object:ep.lazycreate};(r=o||(o={})).ZodString="ZodString",r.ZodNumber="ZodNumber",r.ZodNaN="ZodNaN",r.ZodBigInt="ZodBigInt",r.ZodBoolean="ZodBoolean",r.ZodDate="ZodDate",r.ZodSymbol="ZodSymbol",r.ZodUndefined="ZodUndefined",r.ZodNull="ZodNull",r.ZodAny="ZodAny",r.ZodUnknown="ZodUnknown",r.ZodNever="ZodNever",r.ZodVoid="ZodVoid",r.ZodArray="ZodArray",r.ZodObject="ZodObject",r.ZodUnion="ZodUnion",r.ZodDiscriminatedUnion="ZodDiscriminatedUnion",r.ZodIntersection="ZodIntersection",r.ZodTuple="ZodTuple",r.ZodRecord="ZodRecord",r.ZodMap="ZodMap",r.ZodSet="ZodSet",r.ZodFunction="ZodFunction",r.ZodLazy="ZodLazy",r.ZodLiteral="ZodLiteral",r.ZodEnum="ZodEnum",r.ZodEffects="ZodEffects",r.ZodNativeEnum="ZodNativeEnum",r.ZodOptional="ZodOptional",r.ZodNullable="ZodNullable",r.ZodDefault="ZodDefault",r.ZodCatch="ZodCatch",r.ZodPromise="ZodPromise",r.ZodBranded="ZodBranded",r.ZodPipeline="ZodPipeline",r.ZodReadonly="ZodReadonly";let eU=(e,t={message:`Input not instance of ${e.name}`})=>eD(t=>t instanceof e,t),eV=ee.create,eK=et.create,eX=eP.create,eB=ea.create,eW=es.create,eq=er.create,eJ=ei.create,eY=en.create,eH=ed.create,eG=eo.create,eQ=el.create,e0=ec.create,e1=eu.create,e4=eh.create,e2=ep.create,e5=ep.strictCreate,e9=em.create,e3=eg.create,e6=ey.create,e8=ev.create,e7=e_.create,te=ex.create,tt=eb.create,ta=ek.create,ts=ew.create,tr=ej.create,ti=eZ.create,tn=eT.create,td=eS.create,to=eC.create,tl=eO.create,tc=eA.create,tu=eC.createWithPreprocess,th=eM.create,tp=()=>eV().optional(),tm=()=>eK().optional(),tf=()=>eW().optional(),tg={string:e=>ee.create({...e,coerce:!0}),number:e=>et.create({...e,coerce:!0}),boolean:e=>es.create({...e,coerce:!0}),bigint:e=>ea.create({...e,coerce:!0}),date:e=>er.create({...e,coerce:!0})};e.s(["BRAND",0,e$,"NEVER",0,N,"Schema",0,$,"ZodAny",0,eo,"ZodArray",0,eh,"ZodBigInt",0,ea,"ZodBoolean",0,es,"ZodBranded",0,eR,"ZodCatch",0,eI,"ZodDate",0,er,"ZodDefault",0,eE,"ZodDiscriminatedUnion",0,eg,"ZodEffects",0,eC,"ZodEnum",0,eZ,"ZodFirstPartyTypeKind",0,o,"ZodFunction",0,ek,"ZodIntersection",0,ey,"ZodLazy",0,ew,"ZodLiteral",0,ej,"ZodMap",0,ex,"ZodNaN",0,eP,"ZodNativeEnum",0,eT,"ZodNever",0,ec,"ZodNull",0,ed,"ZodNullable",0,eA,"ZodNumber",0,et,"ZodObject",0,ep,"ZodOptional",0,eO,"ZodPipeline",0,eM,"ZodPromise",0,eS,"ZodReadonly",0,eF,"ZodRecord",0,e_,"ZodSchema",0,$,"ZodSet",0,eb,"ZodString",0,ee,"ZodSymbol",0,ei,"ZodTransformer",0,eC,"ZodTuple",0,ev,"ZodType",0,$,"ZodUndefined",0,en,"ZodUnion",0,em,"ZodUnknown",0,el,"ZodVoid",0,eu,"any",0,eG,"array",0,e4,"bigint",0,eB,"boolean",0,eW,"coerce",0,tg,"custom",0,eD,"date",0,eq,"datetimeRegex",0,Q,"discriminatedUnion",0,e3,"effect",0,to,"enum",0,ti,"function",0,ta,"instanceof",0,eU,"intersection",0,e6,"late",0,ez,"lazy",0,ts,"literal",0,tr,"map",0,te,"nan",0,eX,"nativeEnum",0,tn,"never",0,e0,"null",0,eH,"nullable",0,tc,"number",0,eK,"object",0,e2,"oboolean",0,tf,"onumber",0,tm,"optional",0,tl,"ostring",0,tp,"pipeline",0,th,"preprocess",0,tu,"promise",0,td,"record",0,e7,"set",0,tt,"strictObject",0,e5,"string",0,eV,"symbol",0,eJ,"transformer",0,to,"tuple",0,e8,"undefined",0,eY,"union",0,e9,"unknown",0,eQ,"void",0,e1],65638),e.i(65638),e.i(69790),e.s(["BRAND",0,e$,"DIRTY",0,Z,"EMPTY_PATH",0,k,"INVALID",0,N,"NEVER",0,N,"OK",0,T,"ParseStatus",0,j,"Schema",0,$,"ZodAny",0,eo,"ZodArray",0,eh,"ZodBigInt",0,ea,"ZodBoolean",0,es,"ZodBranded",0,eR,"ZodCatch",0,eI,"ZodDate",0,er,"ZodDefault",0,eE,"ZodDiscriminatedUnion",0,eg,"ZodEffects",0,eC,"ZodEnum",0,eZ,"ZodError",0,g,"ZodFirstPartyTypeKind",0,o,"ZodFunction",0,ek,"ZodIntersection",0,ey,"ZodIssueCode",0,m,"ZodLazy",0,ew,"ZodLiteral",0,ej,"ZodMap",0,ex,"ZodNaN",0,eP,"ZodNativeEnum",0,eT,"ZodNever",0,ec,"ZodNull",0,ed,"ZodNullable",0,eA,"ZodNumber",0,et,"ZodObject",0,ep,"ZodOptional",0,eO,"ZodParsedType",0,h,"ZodPipeline",0,eM,"ZodPromise",0,eS,"ZodReadonly",0,eF,"ZodRecord",0,e_,"ZodSchema",0,$,"ZodSet",0,eb,"ZodString",0,ee,"ZodSymbol",0,ei,"ZodTransformer",0,eC,"ZodTuple",0,ev,"ZodType",0,$,"ZodUndefined",0,en,"ZodUnion",0,em,"ZodUnknown",0,el,"ZodVoid",0,eu,"addIssueToContext",0,w,"any",0,eG,"array",0,e4,"bigint",0,eB,"boolean",0,eW,"coerce",0,tg,"custom",0,eD,"date",0,eq,"datetimeRegex",0,Q,"defaultErrorMap",0,y,"discriminatedUnion",0,e3,"effect",0,to,"enum",0,ti,"function",0,ta,"getErrorMap",0,x,"getParsedType",0,p,"instanceof",0,eU,"intersection",0,e6,"isAborted",0,S,"isAsync",0,A,"isDirty",0,C,"isValid",0,O,"late",0,ez,"lazy",0,ts,"literal",0,tr,"makeIssue",0,b,"map",0,te,"nan",0,eX,"nativeEnum",0,tn,"never",0,e0,"null",0,eH,"nullable",0,tc,"number",0,eK,"object",0,e2,"objectUtil",0,n,"oboolean",0,tf,"onumber",0,tm,"optional",0,tl,"ostring",0,tp,"pipeline",0,th,"preprocess",0,tu,"promise",0,td,"quotelessJson",0,f,"record",0,e7,"set",0,tt,"setErrorMap",0,_,"strictObject",0,e5,"string",0,eV,"symbol",0,eJ,"transformer",0,to,"tuple",0,e8,"undefined",0,eY,"union",0,e9,"unknown",0,eQ,"util",0,i,"void",0,e1],88685);var ty=e.i(88685),ty=ty;let tv=ty.object({apiKey:ty.string().min(1),model:ty.string().default("claude-opus-4-7"),baseUrl:ty.string().url().optional()}),t_=ty.object({provider:ty.enum(["anthropic-direct","atlas-embedded"]).default("anthropic-direct"),anthropic:tv.optional()}),tx=ty.object({include:ty.array(ty.string()).default(["src/**/*.{ts,tsx}"]),exclude:ty.array(ty.string()).default(["node_modules",".next","dist"])});ty.object({version:ty.literal(1).default(1),llm:t_.default({}),scan:tx.default({})}).parse({version:1,llm:{provider:"anthropic-direct"},scan:{include:["src/**/*.{ts,tsx}"],exclude:["node_modules",".next","dist"]}});let tb=[{id:"claude-opus-4-7",label:"Claude Opus 4.7"},{id:"claude-sonnet-4-6",label:"Claude Sonnet 4.6"},{id:"claude-haiku-4-5-20251001",label:"Claude Haiku 4.5"}];var tk=e.i(50667),tw=e.i(13121),tj=e.i(25010);let tN={background:"var(--bg-app)"},tZ="w-full max-w-lg",tT="rounded-xl p-6 flex flex-col gap-5",tS={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},tC="text-xs font-semibold text-slate-400 uppercase tracking-widest",tO="text-xs text-slate-400",tA="w-full rounded-lg px-3 py-2 text-sm font-mono text-slate-200 outline-none focus:ring-2 focus:ring-sky-500/50",tE={background:"rgba(2,6,23,0.6)",border:"1px solid var(--border-default)"},tI="px-4 py-2 rounded-lg text-sm font-semibold transition-all disabled:opacity-40 disabled:cursor-not-allowed",tP={background:"rgb(14,165,233)",color:"#020617"},t$="px-4 py-2 rounded-lg text-sm font-semibold transition-all border",tR={background:"transparent",border:"1px solid var(--border-default)",color:"var(--text-secondary, rgb(148,163,184))"},tM="w-full rounded-lg px-3 py-2 text-sm font-mono text-slate-200 outline-none focus:ring-2 focus:ring-sky-500/50 resize-none";function tF({state:e}){return"idle"===e.status?null:"testing"===e.status?(0,l.jsxs)("span",{className:"text-xs text-sky-400 flex items-center gap-1",children:[(0,l.jsx)("span",{className:"animate-spin inline-block w-3 h-3 border border-sky-400 border-t-transparent rounded-full"}),"Testing…"]}):"success"===e.status?(0,l.jsxs)("span",{className:"text-xs text-emerald-400",children:["Connected — ",e.model," (",e.latency,"ms)"]}):(0,l.jsxs)("span",{className:"text-xs text-red-400 font-mono break-all",children:["Failed — ",e.message]})}function tL({isConfigured:e,testState:t}){return"success"===t.status?(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full font-medium",style:{background:"rgba(52,211,153,0.1)",color:"rgb(52,211,153)",border:"1px solid rgba(52,211,153,0.25)"},children:[(0,l.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-emerald-400 inline-block"}),"Connected"]}):e?(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full font-medium",style:{background:"rgba(251,191,36,0.1)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.25)"},children:[(0,l.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 inline-block"}),"Configured — run Test Connection to verify"]}):(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 text-xs px-2 py-0.5 rounded-full font-medium",style:{background:"rgba(148,163,184,0.08)",color:"rgb(148,163,184)",border:"1px solid rgba(148,163,184,0.2)"},children:[(0,l.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-slate-500 inline-block"}),"Not configured"]})}let tD={free:{bg:"rgba(148,163,184,0.08)",text:"rgb(148,163,184)",border:"rgba(148,163,184,0.2)"},pro:{bg:"rgba(59,130,246,0.12)",text:"rgb(96,165,250)",border:"rgba(59,130,246,0.3)"},"forge-pro":{bg:"rgba(236,72,153,0.12)",text:"rgb(244,114,182)",border:"rgba(236,72,153,0.3)"},spectrum:{bg:"rgba(99,102,241,0.12)",text:"rgb(167,139,250)",border:"rgba(99,102,241,0.3)"},team:{bg:"rgba(52,211,153,0.1)",text:"rgb(52,211,153)",border:"rgba(52,211,153,0.25)"},enterprise:{bg:"rgba(251,191,36,0.1)",text:"rgb(251,191,36)",border:"rgba(251,191,36,0.25)"}},tz={free:"Free",pro:"Pro","forge-pro":"forge Pro",spectrum:"Spectrum 0x55",team:"Team",enterprise:"Enterprise"};function tU({tier:e}){let t=tD[e];return"spectrum"===e?(0,l.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs px-2.5 py-1 rounded-full font-semibold tracking-wide",style:{background:"linear-gradient(90deg, rgba(59,130,246,0.15), rgba(236,72,153,0.15))",color:"rgb(167,139,250)",border:"1px solid rgba(167,139,250,0.35)"},children:[(0,l.jsx)("span",{className:"w-1.5 h-1.5 rounded-full inline-block",style:{background:"linear-gradient(90deg, rgb(96,165,250), rgb(244,114,182))"}}),"Spectrum 0x55"]}):(0,l.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-xs px-2.5 py-1 rounded-full font-semibold uppercase tracking-wide",style:{background:t.bg,color:t.text,border:`1px solid ${t.border}`},children:[(0,l.jsx)("span",{className:"w-1.5 h-1.5 rounded-full inline-block",style:{background:t.text}}),tz[e]]})}function tV(e){return e?new Date(1e3*e).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"}):"—"}e.s(["default",0,function(){let{tq:e}=(0,tj.useTargetPath)(),{license:t,isPro:a,refresh:s}=(0,tw.useLicense)(e),[r,i]=(0,c.useState)(""),[n,d]=(0,c.useState)(!1),[o,h]=(0,c.useState)(!1),[p,m]=(0,c.useState)(null);async function f(){if(r.trim()){d(!0),m(null);try{let t=await fetch(`/api/license/activate${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({licenseKey:r.trim()})}),a=await t.json();if(!t.ok)throw Error(a.error??"Activation failed");m({ok:!0,text:`Activated — ${a.productName} (${a.tier})`}),i(""),s()}catch(e){m({ok:!1,text:e instanceof Error?e.message:String(e)})}finally{d(!1)}}}async function g(){h(!0),m(null);try{let t=await fetch(`/api/license/validate${e}`,{method:"POST"}),a=await t.json();if(!t.ok)throw Error(a.error??"Re-validation failed");m({ok:!0,text:`Validated — ${a.tier}, last check: now`}),s()}catch(e){m({ok:!1,text:e instanceof Error?e.message:String(e)})}finally{h(!1)}}async function y(){m(null);try{let t=await fetch(`/api/license/deactivate${e}`,{method:"POST"});if(!t.ok){let e=await t.json();throw Error(e.error??"Deactivation failed")}s()}catch(e){m({ok:!1,text:e instanceof Error?e.message:String(e)})}}let[v,_]=(0,c.useState)("anthropic-direct"),[x,b]=(0,c.useState)(""),[k,w]=(0,c.useState)(!1),[j,N]=(0,c.useState)(""),[Z,T]=(0,c.useState)(!1),[S,C]=(0,c.useState)(!1),[O,A]=(0,c.useState)(tb[0].id),[E,I]=(0,c.useState)("src/**/*.{ts,tsx}"),[P,$]=(0,c.useState)("node_modules\n.next\ndist"),[R,M]=(0,c.useState)(!1),[F,L]=(0,c.useState)(!1),[D,z]=(0,c.useState)(!1),[U,V]=(0,c.useState)(!1),[K,X]=(0,c.useState)({status:"idle"});(0,c.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(({config:e,apiKeyConfigured:t})=>{e&&(e.llm.provider&&_(e.llm.provider),e.llm.anthropic?.model&&A(e.llm.anthropic.model),t&&(w(!0),N(e.llm.anthropic?.apiKey??"")),e.scan?.include?.length&&I(e.scan.include.join("\n")),e.scan?.exclude?.length&&$(e.scan.exclude.join("\n")))}).catch(()=>{})},[]);let B=(0,c.useCallback)(()=>({version:1,llm:{provider:v,..."anthropic-direct"===v?{anthropic:{...x.trim()?{apiKey:x.trim()}:{},model:O}}:{}},scan:{include:E.split("\n").map(e=>e.trim()).filter(Boolean),exclude:P.split("\n").map(e=>e.trim()).filter(Boolean)}}),[v,x,O,E,P]);async function W(){X({status:"testing"});try{let e=await fetch("/api/config/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:B()})}),t=await e.json();t.success?X({status:"success",latency:t.latency,model:t.model}):X({status:"error",message:t.error??"Unknown error"})}catch(e){X({status:"error",message:e instanceof Error?e.message:String(e)})}}async function q(){M(!0),z(!1);try{(await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:B()})})).ok&&(x.trim()&&(w(!0),N(x.replace(/(?<=^.{10}).*(?=.{4}$)/,"***")),b(""),T(!1)),z(!0),setTimeout(()=>z(!1),2e3))}finally{M(!1)}}async function J(){L(!0),V(!1);try{await fetch("/api/config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:B()})}),V(!0),setTimeout(()=>V(!1),2e3)}finally{L(!1)}}let Y=k||!!x.trim();return(0,l.jsxs)("div",{className:"flex flex-col min-h-screen",style:tN,children:[(0,l.jsx)(tk.PrismDock,{}),(0,l.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",children:[(0,l.jsxs)("div",{className:`${tZ} text-center`,children:[(0,l.jsxs)("h1",{className:"text-2xl font-semibold text-slate-100 tracking-tight",children:[(0,l.jsx)("span",{className:"font-semibold",children:"prism"}),(0,l.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]}),(0,l.jsxs)("p",{className:"mt-0.5 text-xs text-slate-500 font-mono",children:["Settings · v","0.7.2"," · powered by prismlens"]})]}),(0,l.jsxs)("div",{className:`${tZ} ${tT}`,style:tS,children:[(0,l.jsx)("h2",{className:tC,children:"LLM Provider"}),(0,l.jsx)("div",{className:"flex flex-col gap-3",children:["anthropic-direct","atlas-embedded"].map(e=>(0,l.jsxs)("label",{className:"flex items-center gap-3 cursor-pointer group",onClick:()=>_(e),children:[(0,l.jsx)("div",{className:"w-4 h-4 rounded-full flex items-center justify-center flex-shrink-0",style:{border:`2px solid ${v===e?"rgb(14,165,233)":"rgba(71,85,105,0.6)"}`,background:v===e?"rgb(14,165,233)":"transparent"},children:v===e&&(0,l.jsx)("div",{className:"w-1.5 h-1.5 rounded-full",style:{background:"#020617"}})}),(0,l.jsx)("span",{className:"text-sm text-slate-300",children:"anthropic-direct"===e?"Standalone (Anthropic SDK direct)":"Atlas-embedded (auto-detect)"})]},e))}),"anthropic-direct"===v&&(0,l.jsxs)("div",{className:"flex flex-col gap-4 pt-1",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("label",{className:tO,htmlFor:"apiKey",children:"Anthropic API Key"}),(0,l.jsx)(tL,{isConfigured:k,testState:K})]}),k&&!Z?(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("div",{className:`${tA} flex-1 text-slate-500 select-none`,style:{...tE,cursor:"default"},"aria-label":"API key configured (masked)",children:j||"••••••••••••••••••••"}),(0,l.jsx)("button",{type:"button",onClick:()=>{T(!0),b("")},className:"px-3 py-2 rounded-lg text-xs font-semibold text-slate-300 hover:text-white transition-colors flex-shrink-0",style:{background:"rgba(51,65,85,0.5)",border:"1px solid rgba(51,65,85,0.6)"},children:"Replace"})]}):(0,l.jsx)("div",{className:"flex flex-col gap-1.5",children:(0,l.jsxs)("div",{className:"relative",children:[(0,l.jsx)("input",{id:"apiKey",type:S?"text":"password",value:x,onChange:e=>b(e.target.value),placeholder:Z?"Paste new key to replace the configured one":"Paste your Anthropic API key here (sk-ant-...)",className:`${tA} pr-24`,style:tE,autoComplete:"off",autoFocus:Z}),(0,l.jsxs)("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex items-center gap-1",children:[(0,l.jsx)("button",{type:"button",onClick:()=>C(e=>!e),className:"text-xs text-slate-500 hover:text-slate-300 transition-colors px-1",children:S?"hide":"show"}),Z&&(0,l.jsx)("button",{type:"button",onClick:()=>{T(!1),b("")},className:"text-xs text-slate-500 hover:text-red-400 transition-colors px-1",children:"cancel"})]})]})})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsx)("label",{className:tO,htmlFor:"model",children:"Model"}),(0,l.jsx)("select",{id:"model",value:O,onChange:e=>A(e.target.value),className:tA,style:tE,children:tb.map(e=>(0,l.jsx)("option",{value:e.id,children:e.label},e.id))})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3 pt-1",children:[(0,l.jsx)("button",{onClick:W,disabled:!Y||"testing"===K.status,className:t$,style:tR,children:"Test Connection"}),(0,l.jsx)(tF,{state:K})]})]}),(0,l.jsx)("div",{className:"pt-1 border-t",style:{borderColor:"var(--border-default)"},children:(0,l.jsx)("button",{onClick:q,disabled:R,className:tI,style:tP,children:R?"Saving…":D?"Saved ✓":"Save"})})]}),(0,l.jsxs)("div",{className:`${tZ} ${tT}`,style:tS,children:[(0,l.jsx)("h2",{className:tC,children:"Scan Configuration"}),(0,l.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsx)("label",{className:tO,htmlFor:"include",children:"Include patterns (one per line)"}),(0,l.jsx)("textarea",{id:"include",rows:3,value:E,onChange:e=>I(e.target.value),className:tM,style:tE})]}),(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsx)("label",{className:tO,htmlFor:"exclude",children:"Exclude patterns (one per line)"}),(0,l.jsx)("textarea",{id:"exclude",rows:3,value:P,onChange:e=>$(e.target.value),className:tM,style:tE})]})]}),(0,l.jsx)("div",{className:"pt-1 border-t",style:{borderColor:"var(--border-default)"},children:(0,l.jsx)("button",{onClick:J,disabled:F,className:tI,style:tP,children:F?"Saving…":U?"Saved ✓":"Save"})})]}),(0,l.jsxs)("div",{className:`${tZ} ${tT}`,style:tS,children:[(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("h2",{className:tC,children:"License"}),t&&(0,l.jsx)(tU,{tier:t.tier})]}),n&&(0,l.jsxs)("div",{className:"flex items-center gap-2 text-sm text-slate-400",children:[(0,l.jsx)("span",{className:"animate-spin inline-block w-4 h-4 border-2 border-indigo-400 border-t-transparent rounded-full"}),"Activating with Lemonsqueezy…"]}),!n&&a&&t&&(0,l.jsxs)("div",{className:"flex flex-col gap-2.5 text-xs text-slate-500",children:[t.productName&&(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{children:"Product"}),(0,l.jsx)("span",{className:"text-slate-300 font-medium",children:t.productName})]}),t.userId&&(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{children:"Account"}),(0,l.jsx)("span",{className:"font-mono text-slate-400 truncate max-w-48",children:t.userId})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{children:"Last validated"}),(0,l.jsx)("span",{className:"font-mono text-slate-400",children:function(e){if(!e)return"never";let t=Math.floor(Date.now()/1e3)-e;return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:`${Math.floor(t/86400)}d ago`}(t.validatedAt)})]}),(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{children:"Subscription"}),(0,l.jsx)("span",{className:`font-medium ${"active"===t.subscriptionStatus?"text-emerald-400":"text-amber-400"}`,children:"active"===t.subscriptionStatus?"Active":"cancelled"===t.subscriptionStatus?`Cancelled${t.expiresAt?`, active until ${tV(t.expiresAt)}`:""}`:t.subscriptionStatus??"Unknown"})]}),t.instanceId&&(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{children:"Instance"}),(0,l.jsx)("span",{className:"font-mono text-slate-500 text-[10px] truncate max-w-40",children:t.instanceId})]}),null!==t.activationLimit&&null!==t.activationUsage&&(0,l.jsxs)("div",{className:"flex items-center justify-between",children:[(0,l.jsx)("span",{children:"Activations"}),(0,l.jsxs)("span",{className:"font-mono text-slate-400",children:[t.activationUsage," / ",t.activationLimit??"∞"]})]}),"grace"===t.cacheStatus&&(0,l.jsxs)("p",{className:"text-amber-400 text-xs",children:["Cache expired — re-validation overdue. Running in 7-day grace period.",t.gracePeriodEnd&&` Expires ${tV(t.gracePeriodEnd)}.`]}),t.isExpired&&(0,l.jsx)("p",{className:"text-red-400 text-xs",children:"Subscription expired — downgraded to free tier."})]}),!n&&a&&(0,l.jsxs)("div",{className:"flex flex-wrap items-center gap-3 pt-1 border-t",style:{borderColor:"var(--border-default)"},children:[(0,l.jsx)("button",{onClick:g,disabled:o,className:t$,style:tR,children:o?"Checking…":"Validate now"}),(0,l.jsx)("a",{href:"https://prism0x2a.lemonsqueezy.com/billing",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:"Manage subscription →"}),(0,l.jsx)("button",{onClick:y,className:"text-xs text-red-400 hover:text-red-300 transition-colors ml-auto",children:"Deactivate this instance"})]}),!n&&!a&&(0,l.jsxs)("div",{className:"flex flex-col gap-3 pt-1 border-t",style:{borderColor:"var(--border-default)"},children:[(0,l.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,l.jsx)("label",{className:tO,children:"License Key"}),(0,l.jsx)("input",{type:"text",value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"===e.key&&f()},placeholder:"LS-XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX",className:tA,style:tE,spellCheck:!1})]}),(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)("button",{onClick:f,disabled:!r.trim(),className:tI,style:{background:"rgb(99,102,241)",color:"#fff",opacity:r.trim()?1:.4},children:"Activate"}),(0,l.jsx)(u.default,{href:"/pricing",className:"text-xs text-indigo-400 hover:text-indigo-300 transition-colors",children:"View Plans →"}),(0,l.jsx)("a",{href:"https://prism0x2a.lemonsqueezy.com",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-slate-500 hover:text-slate-400 transition-colors",children:"Get a license →"})]})]}),p&&(0,l.jsx)("p",{className:`text-xs font-mono ${p.ok?"text-emerald-400":"text-red-400"}`,children:p.text})]})]}),(0,l.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",style:{marginBottom:"var(--infobar-clearance-bottom)"},children:[(0,l.jsx)("span",{className:"font-mono",children:"0x2A = 42."})," The answer to all questions."]})]})}],32545)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var l in s)Object.defineProperty(r,l,{enumerable:!0,get:s[l]});let n=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",l=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(n.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||a.test(s))&&!1!==c?(c="//"+(c||""),l&&"/"!==l[0]&&(l="/"+l)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),l=l.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${s}${c}${l}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let s=e.r(71645);function l(e,t){let r=(0,s.useRef)(null),l=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=n(e,s)),t&&(l.current=n(t,s))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return n}});let s=e.r(18967),l=e.r(52817);function n(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,l.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return g},useLinkStatus:function(){return y}};for(var l in s)Object.defineProperty(r,l,{enumerable:!0,get:s[l]});let n=e.r(90809),a=e.r(43476),o=n._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),m=e.r(9396);function g(t){var r,s;let l,n,g,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:k,children:_,prefetch:w=null,passHref:E,replace:S,shallow:C,scroll:R,onClick:P,onMouseEnter:T,onTouchStart:A,legacyBehavior:L=!1,onNavigate:O,transitionTypes:$,ref:I,unstable_dynamicOnHover:M,...U}=t;l=_,L&&("string"==typeof l||"number"==typeof l)&&(l=(0,a.jsx)("a",{children:l}));let B=o.default.useContext(c.AppRouterContext),D=!1!==w,F=!1!==w?null===(s=w)||"auto"===s?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=k||N)?r:(0,i.formatUrl)(r);if(L){if(l?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=o.default.Children.only(l)}let W=L?n&&"object"==typeof n&&n.ref:I,G=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),q={ref:(0,u.useMergedRef)(G,W),onClick(t){L||"function"!=typeof P||P(t),L&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!B||t.defaultPrevented||function(t,r,s,l,n,a,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){l&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,l?"replace":"push",!1===n?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,s.current,i)})}}(t,K,v,S,R,O,$)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)},onTouchStart:function(e){L||"function"!=typeof A||A(e),L&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)}};return(0,d.isAbsoluteUrl)(K)?q.href=K:L&&!E&&("a"!==n.type||"href"in n.props)||(q.href=(0,p.addBasePath)(K)),g=L?o.default.cloneElement(n,q):(0,a.jsx)("a",{...U,...q,children:l}),(0,a.jsx)(b.Provider,{value:y,children:g})}e.r(84508);let b=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),s=e.i(18566),l=e.i(71645);let n={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function a(e){return"free"!==n[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,a],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:s,isPro:n=!1}){let[c,u]=(0,l.useState)(!1),d=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=a("monorepo")&&!n;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,l.useState)(""),[r,s]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>s(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,l.useState)(null),[s,n]=(0,l.useState)(null),[a,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),n(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,l.useCallback)(async t=>{n(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=s?`&workspace=${encodeURIComponent(s)}`:"";return{monorepo:t,activeWorkspace:s,setActiveWorkspace:i,ready:a,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,l.useState)(null),[s,n]=(0,l.useState)(!1),[a,o]=(0,l.useState)(0);(0,l.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>n(!0))},[e,a]);let i=(0,l.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:s,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,s.usePathname)(),{tq:l}=c(),{monorepo:n,activeWorkspace:a,setActiveWorkspace:o}=u(l),{isPro:d}=p(l);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:s,label:l,color:n})=>{let a=e.startsWith(s);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:s,className:"text-sm font-medium transition-colors px-1",style:{color:a?n??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:l})]},s)}),n&&"single"!==n.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:n,activeWorkspace:a,onSelect:o,isPro:d})]})]})}],50667)},67334,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(22016),l=e.i(50667),n=e.i(25010),a=e.i(60888);let o="rgb(52,211,153)",i={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},c={background:"rgba(15,23,42,0.5)",border:"1px solid rgba(51,65,85,0.4)"};function u({label:e,value:r,accent:s}){return(0,t.jsxs)("div",{className:"rounded-lg px-4 py-3 flex flex-col gap-0.5",style:c,children:[(0,t.jsx)("span",{className:"text-xs text-slate-500 uppercase tracking-widest",children:e}),(0,t.jsx)("span",{className:"text-xl font-semibold font-mono",style:{color:s??"rgb(226,232,240)"},children:r})]})}e.s(["default",0,function(){let{tq:e,ready:c}=(0,n.useTargetPath)(),{wq:d}=(0,a.useActiveWorkspace)(e),[p,f]=(0,r.useState)(null),[x,h]=(0,r.useState)(null),[m,g]=(0,r.useState)(!0);(0,r.useEffect)(()=>{c&&(fetch(`/api/green/insights${e}${d}`).then(e=>e.json()).then(({counts:e})=>f(e??null)).catch(()=>{}),fetch(`/api/green/cross-layer${e}${d}`).then(e=>e.json()).then(({snapshot:e})=>h(e??null)).catch(()=>{}).finally(()=>g(!1)))},[c,d]);let b=[{href:"/green/insights",label:"Insights",icon:"✦",desc:p?`${p.stock} stock \xb7 ${p.auto} auto \xb7 ${p.custom} custom`:"Stock + AI-generated + custom"},{href:"/green/cross-layer",label:"Cross-Layer",icon:"🔗",desc:x?`${x.capability_count} caps \xb7 ${x.drifted_capability_count} drifted`:"BLUE + AMBER + GREEN view"},{href:"/green/queries",label:"Custom Queries",icon:"🔍",desc:p?`${p.custom} saved`:"User-defined GREEN queries"}];return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("h1",{className:"text-xl font-semibold text-slate-100 tracking-tight",children:[(0,t.jsx)("span",{className:"font-mono",style:{color:o},children:"GREEN"}),(0,t.jsx)("span",{className:"text-slate-400 text-sm font-normal ml-2",children:"Insights + Cross-Layer + Queries"})]}),x&&(0,t.jsxs)("p",{className:"text-xs text-slate-500 mt-0.5 font-mono",children:["Cross-layer snapshot: ",new Date(x.generated_at).toLocaleString()]})]}),p&&(0,t.jsxs)("div",{className:"w-full grid grid-cols-3 gap-3",children:[(0,t.jsx)(u,{label:"Stock Queries",value:p.stock,accent:o}),(0,t.jsx)(u,{label:"Auto Insights",value:p.auto,accent:p.auto>0?o:"rgb(148,163,184)"}),(0,t.jsx)(u,{label:"Custom Queries",value:p.custom,accent:p.custom>0?o:"rgb(148,163,184)"})]}),x&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-5 flex flex-col gap-3",style:i,children:[(0,t.jsx)("h2",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:"Cross-Layer Context"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs text-slate-500 uppercase tracking-widest",children:"Capabilities"}),(0,t.jsx)("p",{className:"text-xl font-mono font-semibold",style:{color:o},children:x.capability_count})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs text-slate-500 uppercase tracking-widest",children:"Drifted"}),(0,t.jsx)("p",{className:"text-xl font-mono font-semibold",style:{color:x.drifted_capability_count>0?"rgb(248,113,113)":o},children:x.drifted_capability_count})]})]}),(0,t.jsx)(s.default,{href:"/green/cross-layer",className:"text-xs mt-1 hover:underline",style:{color:o},children:"→ View full cross-layer analysis"})]}),!m&&!x&&!p&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-8 text-center flex flex-col items-center gap-3",style:i,children:[(0,t.jsx)("span",{className:"text-4xl",children:"✦"}),(0,t.jsx)("p",{className:"text-slate-300 font-medium",children:"GREEN not yet initialized"}),(0,t.jsx)("p",{className:"text-slate-500 text-sm max-w-sm",children:"Run an AMBER scan first to build the cross-layer context. Then visit Insights to discover AI patterns."}),(0,t.jsx)("div",{className:"flex gap-3 mt-2",children:(0,t.jsx)(s.default,{href:"/amber",className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all",style:{background:"rgba(251,191,36,0.12)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.25)"},children:"→ Run AMBER scan"})})]}),(0,t.jsx)("div",{className:"w-full grid grid-cols-3 gap-3",children:b.map(({href:e,label:r,icon:l,desc:n})=>(0,t.jsxs)(s.default,{href:e,className:"rounded-xl p-5 flex flex-col gap-2 transition-all hover:brightness-110",style:{...i,borderColor:o+"30"},children:[(0,t.jsx)("span",{className:"text-xl font-mono",style:{color:o},children:l}),(0,t.jsx)("span",{className:"text-sm font-semibold",style:{color:o},children:r}),(0,t.jsx)("span",{className:"text-xs text-slate-500",children:n})]},e))})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.1"," · GREEN"]})]})}])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return i}};for(var l in s)Object.defineProperty(r,l,{enumerable:!0,get:s[l]});let n=e.r(90809)._(e.r(98183)),a=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,s=e.protocol||"",l=e.pathname||"",o=e.hash||"",i=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),i&&"object"==typeof i&&(i=String(n.urlQueryToSearchParams(i)));let u=e.search||i&&`?${i}`||"";return s&&!s.endsWith(":")&&(s+=":"),e.slashes||(!s||a.test(s))&&!1!==c?(c="//"+(c||""),l&&"/"!==l[0]&&(l="/"+l)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),l=l.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${s}${c}${l}${u}${o}`}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},18581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return l}});let s=e.r(71645);function l(e,t){let r=(0,s.useRef)(null),l=(0,s.useRef)(null);return(0,s.useCallback)(s=>{if(null===s){let e=r.current;e&&(r.current=null,e());let t=l.current;t&&(l.current=null,t())}else e&&(r.current=n(e,s)),t&&(l.current=n(t,s))},[e,t])}function n(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},73668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return n}});let s=e.r(18967),l=e.r(52817);function n(e){if(!(0,s.isAbsoluteUrl)(e))return!0;try{let t=(0,s.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,l.hasBasePath)(r.pathname)}catch(e){return!1}}},84508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},22016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var s={default:function(){return g},useLinkStatus:function(){return y}};for(var l in s)Object.defineProperty(r,l,{enumerable:!0,get:s[l]});let n=e.r(90809),a=e.r(43476),o=n._(e.r(71645)),i=e.r(95057),c=e.r(8372),u=e.r(18581),d=e.r(18967),p=e.r(5550);e.r(33525);let f=e.r(88540),x=e.r(91949),h=e.r(73668),m=e.r(9396);function g(t){var r,s;let l,n,g,[y,j]=(0,o.useOptimistic)(x.IDLE_LINK_STATUS),v=(0,o.useRef)(null),{href:N,as:k,children:_,prefetch:w=null,passHref:E,replace:S,shallow:C,scroll:P,onClick:R,onMouseEnter:T,onTouchStart:A,legacyBehavior:L=!1,onNavigate:O,transitionTypes:$,ref:I,unstable_dynamicOnHover:M,...U}=t;l=_,L&&("string"==typeof l||"number"==typeof l)&&(l=(0,a.jsx)("a",{children:l}));let B=o.default.useContext(c.AppRouterContext),D=!1!==w,F=!1!==w?null===(s=w)||"auto"===s?m.FetchStrategy.PPR:m.FetchStrategy.Full:m.FetchStrategy.PPR,K="string"==typeof(r=k||N)?r:(0,i.formatUrl)(r);if(L){if(l?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});n=o.default.Children.only(l)}let W=L?n&&"object"==typeof n&&n.ref:I,G=o.default.useCallback(e=>(null!==B&&(v.current=(0,x.mountLinkInstance)(e,K,B,F,D,j)),()=>{v.current&&((0,x.unmountLinkForCurrentNavigation)(v.current),v.current=null),(0,x.unmountPrefetchableInstance)(e)}),[D,K,B,F,j]),q={ref:(0,u.useMergedRef)(G,W),onClick(t){L||"function"!=typeof R||R(t),L&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(t),!B||t.defaultPrevented||function(t,r,s,l,n,a,i){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,h.isLocalURL)(r)){l&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(99781);o.default.startTransition(()=>{d(r,l?"replace":"push",!1===n?f.ScrollBehavior.NoScroll:f.ScrollBehavior.Default,s.current,i)})}}(t,K,v,S,P,O,$)},onMouseEnter(e){L||"function"!=typeof T||T(e),L&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)},onTouchStart:function(e){L||"function"!=typeof A||A(e),L&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),B&&D&&(0,x.onNavigationIntent)(e.currentTarget,!0===M)}};return(0,d.isAbsoluteUrl)(K)?q.href=K:L&&!E&&("a"!==n.type||"href"in n.props)||(q.href=(0,p.addBasePath)(K)),g=L?o.default.cloneElement(n,q):(0,a.jsx)("a",{...U,...q,children:l}),(0,a.jsx)(b.Provider,{value:y,children:g})}e.r(84508);let b=(0,o.createContext)(x.IDLE_LINK_STATUS),y=()=>(0,o.useContext)(b);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},18566,(e,t,r)=>{t.exports=e.r(76562)},50667,36528,25010,60888,13121,e=>{"use strict";var t=e.i(43476),r=e.i(22016),s=e.i(18566),l=e.i(71645);let n={monorepo:{tier:"pro",label:"Monorepo support"},aggregate_scan:{tier:"pro",label:"Aggregate workspace scan"},cross_workspace_insights:{tier:"pro",label:"Cross-workspace insights"},llm_insights:{tier:"pro",label:"AI-powered insights"},custom_queries:{tier:"pro",label:"Custom GREEN queries"},cross_layer_context:{tier:"pro",label:"Cross-layer context"},auto_insights:{tier:"pro",label:"Auto-generated insights"},team_sync:{tier:"team",label:"Team sync"},ci_integration:{tier:"team",label:"CI integration"},forge_unlimited:{tier:"forge-pro",label:"forge0x2B unlimited"},forge_unlimited_generation:{tier:"forge-pro",label:"forge0x2B unlimited generation"}};function a(e){return"free"!==n[e].tier}e.s(["FREE_TIER_LOC_LIMIT",0,5e4,"showProBadge",0,a],36528);let o=()=>(0,t.jsx)("span",{className:"text-[10px] font-bold px-1 py-0.5 rounded leading-none",style:{background:"rgba(251,191,36,0.15)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.3)"},children:"PRO"});function i({monorepo:e,activeWorkspace:r,onSelect:s,isPro:n=!1}){let[c,u]=(0,l.useState)(!1),d=(0,l.useRef)(null);if((0,l.useEffect)(()=>{function e(e){d.current&&!d.current.contains(e.target)&&u(!1)}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),!e||"single"===e.type||0===e.packages.length)return null;let p=a("monorepo")&&!n;return(0,t.jsxs)("div",{className:"relative",ref:d,children:[(0,t.jsxs)("button",{onClick:()=>u(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-medium transition-colors",style:{background:c?"rgba(51,65,85,0.5)":"rgba(51,65,85,0.25)",border:"1px solid rgba(51,65,85,0.5)",color:"rgb(148,163,184)"},title:`Monorepo: ${e.type}`,children:[(0,t.jsx)("span",{className:"font-mono",style:{color:"rgb(52,211,153)",fontSize:10},children:e.type.toUpperCase()}),(0,t.jsx)("span",{className:"max-w-[80px] truncate",children:r??"all workspaces"}),p&&(0,t.jsx)(o,{}),(0,t.jsx)("svg",{width:"8",height:"8",viewBox:"0 0 8 8",fill:"currentColor",className:"opacity-60",children:(0,t.jsx)("path",{d:"M1 2.5l3 3 3-3",stroke:"currentColor",strokeWidth:"1.2",fill:"none",strokeLinecap:"round"})})]}),c&&(0,t.jsxs)("div",{className:"absolute top-full mt-1 right-0 z-50 rounded-xl overflow-hidden py-1 min-w-[180px]",style:{background:"rgba(15,23,42,0.95)",backdropFilter:"blur(20px)",border:"1px solid rgba(51,65,85,0.5)",boxShadow:"0 4px 24px rgba(0,0,0,0.4)"},children:[(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:null===r?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(null),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-60",children:"∑"}),"All workspaces",null===r&&(0,t.jsx)("span",{className:"ml-auto text-[10px] opacity-60",children:"✓"})]}),(0,t.jsx)("div",{className:"my-1",style:{borderTop:"1px solid rgba(51,65,85,0.3)"}}),e.packages.map(e=>(0,t.jsxs)("button",{className:"w-full text-left px-3 py-2 text-xs flex items-center gap-2 transition-colors hover:bg-white/5",style:{color:r===e.name?"rgb(52,211,153)":"rgb(148,163,184)"},onClick:()=>{s(e.name),u(!1)},children:[(0,t.jsx)("span",{className:"font-mono text-[10px] opacity-50",children:"pkg"}),(0,t.jsx)("span",{className:"flex-1 truncate",children:e.name}),void 0!==e.loc&&(0,t.jsxs)("span",{className:"text-[10px] font-mono opacity-40",children:[(e.loc/1e3).toFixed(1),"k"]}),r===e.name&&(0,t.jsx)("span",{className:"text-[10px] opacity-60",children:"✓"})]},e.path))]})]})}function c(){let[e,t]=(0,l.useState)(""),[r,s]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{fetch("/api/config").then(e=>e.json()).then(e=>{let r=e.targetPath??"";t(r?`?target=${encodeURIComponent(r)}`:"")}).catch(()=>{}).finally(()=>s(!0))},[]),{tq:e,ready:r}}function u(e){let[t,r]=(0,l.useState)(null),[s,n]=(0,l.useState)(null),[a,o]=(0,l.useState)(!1);(0,l.useEffect)(()=>{Promise.all([fetch(`/api/monorepo${e}`).then(e=>e.json()).catch(()=>({monorepo:null})),fetch(`/api/monorepo/active${e}`).then(e=>e.json()).catch(()=>({workspace:null}))]).then(([e,t])=>{r(e.monorepo??null),n(t.workspace??null)}).finally(()=>o(!0))},[e]);let i=(0,l.useCallback)(async t=>{n(t),await fetch(`/api/monorepo/active${e}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({workspace:t})}).catch(()=>{})},[e]),c=s?`&workspace=${encodeURIComponent(s)}`:"";return{monorepo:t,activeWorkspace:s,setActiveWorkspace:i,ready:a,wq:c}}e.s(["useTargetPath",0,c],25010),e.s(["useActiveWorkspace",0,u],60888);let d={tier:"free",issuedAt:null,expiresAt:null,userId:null,features:[],isValid:!1,isExpired:!1,licenseKey:null,instanceId:null,productName:null,subscriptionStatus:null,validatedAt:null,revalidationDue:null,gracePeriodEnd:null,activationLimit:null,activationUsage:null,cacheStatus:"no-cache",daysSinceValidation:null};function p(e){let[t,r]=(0,l.useState)(null),[s,n]=(0,l.useState)(!1),[a,o]=(0,l.useState)(0);(0,l.useEffect)(()=>{fetch(`/api/license${e}`).then(e=>e.json()).then(e=>r(e)).catch(()=>r(d)).finally(()=>n(!0))},[e,a]);let i=(0,l.useCallback)(()=>o(e=>e+1),[]),c=!!t&&"free"!==t.tier&&"forge-pro"!==t.tier&&t.isValid&&!t.isExpired&&"expired"!==t.cacheStatus;return{license:t,ready:s,refresh:i,isPro:c}}e.s(["useLicense",0,p],13121);let f=[{href:"/blue",label:"BLUE",color:"rgb(59,130,246)"},{href:"/amber",label:"AMBER",color:"rgb(251,191,36)"},{href:"/green",label:"GREEN",color:"rgb(52,211,153)"},{href:"/pricing",label:"Plans",color:"rgb(167,139,250)"},{href:"/settings",label:"⚙",color:void 0}];e.s(["PrismDock",0,function(){let e=(0,s.usePathname)(),{tq:l}=c(),{monorepo:n,activeWorkspace:a,setActiveWorkspace:o}=u(l),{isPro:d}=p(l);return(0,t.jsxs)("div",{className:"fixed top-3 left-1/2 -translate-x-1/2 z-50 flex items-center gap-2 px-4 py-2 rounded-full",style:{background:"linear-gradient(to bottom, rgba(15,23,42,0.4), rgba(2,6,23,0.5))",backdropFilter:"blur(24px) saturate(1.5)",border:"1px solid rgba(51,65,85,0.3)",boxShadow:"0 1px 2px rgba(15,23,42,.06),0 4px 12px rgba(15,23,42,.12),0 16px 40px rgba(15,23,42,.18),inset 0 1px 0 rgba(255,255,255,.08),inset 0 -1px 0 rgba(15,23,42,.4)"},children:[(0,t.jsxs)(r.default,{href:"/",className:"flex items-center gap-1.5 group",children:[(0,t.jsx)("span",{className:"text-sky-400 text-lg select-none",children:"✦"}),(0,t.jsxs)("span",{className:"text-slate-200 text-sm font-semibold tracking-tight group-hover:text-white transition-colors",children:["prism",(0,t.jsx)("span",{className:"font-mono text-sky-500",children:"0x2A"})]})]}),f.map(({href:s,label:l,color:n})=>{let a=e.startsWith(s);return(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(r.default,{href:s,className:"text-sm font-medium transition-colors px-1",style:{color:a?n??"rgb(226,232,240)":"rgba(148,163,184,0.8)"},children:l})]},s)}),n&&"single"!==n.type&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"w-px h-4",style:{background:"rgba(51,65,85,0.6)"}}),(0,t.jsx)(i,{monorepo:n,activeWorkspace:a,onSelect:o,isPro:d})]})]})}],50667)},67334,e=>{"use strict";var t=e.i(43476),r=e.i(71645),s=e.i(22016),l=e.i(50667),n=e.i(25010),a=e.i(60888);let o="rgb(52,211,153)",i={background:"var(--surface-panel)",border:"1px solid var(--border-default)",boxShadow:"0 1px 2px rgba(15,23,42,.05),0 4px 16px rgba(15,23,42,.08),inset 0 1px 0 rgba(255,255,255,.04)"},c={background:"rgba(15,23,42,0.5)",border:"1px solid rgba(51,65,85,0.4)"};function u({label:e,value:r,accent:s}){return(0,t.jsxs)("div",{className:"rounded-lg px-4 py-3 flex flex-col gap-0.5",style:c,children:[(0,t.jsx)("span",{className:"text-xs text-slate-500 uppercase tracking-widest",children:e}),(0,t.jsx)("span",{className:"text-xl font-semibold font-mono",style:{color:s??"rgb(226,232,240)"},children:r})]})}e.s(["default",0,function(){let{tq:e,ready:c}=(0,n.useTargetPath)(),{wq:d}=(0,a.useActiveWorkspace)(e),[p,f]=(0,r.useState)(null),[x,h]=(0,r.useState)(null),[m,g]=(0,r.useState)(!0);(0,r.useEffect)(()=>{c&&(fetch(`/api/green/insights${e}${d}`).then(e=>e.json()).then(({counts:e})=>f(e??null)).catch(()=>{}),fetch(`/api/green/cross-layer${e}${d}`).then(e=>e.json()).then(({snapshot:e})=>h(e??null)).catch(()=>{}).finally(()=>g(!1)))},[c,d]);let b=[{href:"/green/insights",label:"Insights",icon:"✦",desc:p?`${p.stock} stock \xb7 ${p.auto} auto \xb7 ${p.custom} custom`:"Stock + AI-generated + custom"},{href:"/green/cross-layer",label:"Cross-Layer",icon:"🔗",desc:x?`${x.capability_count} caps \xb7 ${x.drifted_capability_count} drifted`:"BLUE + AMBER + GREEN view"},{href:"/green/queries",label:"Custom Queries",icon:"🔍",desc:p?`${p.custom} saved`:"User-defined GREEN queries"}];return(0,t.jsxs)("div",{className:"flex flex-col min-h-screen",style:{background:"var(--bg-app)"},children:[(0,t.jsx)(l.PrismDock,{}),(0,t.jsxs)("main",{className:"flex-1 flex flex-col items-center px-6 pt-32 pb-16 gap-6",style:{maxWidth:720,margin:"0 auto",width:"100%"},children:[(0,t.jsxs)("div",{className:"w-full",children:[(0,t.jsxs)("h1",{className:"text-xl font-semibold text-slate-100 tracking-tight",children:[(0,t.jsx)("span",{className:"font-mono",style:{color:o},children:"GREEN"}),(0,t.jsx)("span",{className:"text-slate-400 text-sm font-normal ml-2",children:"Insights + Cross-Layer + Queries"})]}),x&&(0,t.jsxs)("p",{className:"text-xs text-slate-500 mt-0.5 font-mono",children:["Cross-layer snapshot: ",new Date(x.generated_at).toLocaleString()]})]}),p&&(0,t.jsxs)("div",{className:"w-full grid grid-cols-3 gap-3",children:[(0,t.jsx)(u,{label:"Stock Queries",value:p.stock,accent:o}),(0,t.jsx)(u,{label:"Auto Insights",value:p.auto,accent:p.auto>0?o:"rgb(148,163,184)"}),(0,t.jsx)(u,{label:"Custom Queries",value:p.custom,accent:p.custom>0?o:"rgb(148,163,184)"})]}),x&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-5 flex flex-col gap-3",style:i,children:[(0,t.jsx)("h2",{className:"text-xs font-semibold text-slate-400 uppercase tracking-widest",children:"Cross-Layer Context"}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs text-slate-500 uppercase tracking-widest",children:"Capabilities"}),(0,t.jsx)("p",{className:"text-xl font-mono font-semibold",style:{color:o},children:x.capability_count})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{className:"text-xs text-slate-500 uppercase tracking-widest",children:"Drifted"}),(0,t.jsx)("p",{className:"text-xl font-mono font-semibold",style:{color:x.drifted_capability_count>0?"rgb(248,113,113)":o},children:x.drifted_capability_count})]})]}),(0,t.jsx)(s.default,{href:"/green/cross-layer",className:"text-xs mt-1 hover:underline",style:{color:o},children:"→ View full cross-layer analysis"})]}),!m&&!x&&!p&&(0,t.jsxs)("div",{className:"w-full rounded-xl p-8 text-center flex flex-col items-center gap-3",style:i,children:[(0,t.jsx)("span",{className:"text-4xl",children:"✦"}),(0,t.jsx)("p",{className:"text-slate-300 font-medium",children:"GREEN not yet initialized"}),(0,t.jsx)("p",{className:"text-slate-500 text-sm max-w-sm",children:"Run an AMBER scan first to build the cross-layer context. Then visit Insights to discover AI patterns."}),(0,t.jsx)("div",{className:"flex gap-3 mt-2",children:(0,t.jsx)(s.default,{href:"/amber",className:"px-4 py-2 rounded-lg text-sm font-semibold transition-all",style:{background:"rgba(251,191,36,0.12)",color:"rgb(251,191,36)",border:"1px solid rgba(251,191,36,0.25)"},children:"→ Run AMBER scan"})})]}),(0,t.jsx)("div",{className:"w-full grid grid-cols-3 gap-3",children:b.map(({href:e,label:r,icon:l,desc:n})=>(0,t.jsxs)(s.default,{href:e,className:"rounded-xl p-5 flex flex-col gap-2 transition-all hover:brightness-110",style:{...i,borderColor:o+"30"},children:[(0,t.jsx)("span",{className:"text-xl font-mono",style:{color:o},children:l}),(0,t.jsx)("span",{className:"text-sm font-semibold",style:{color:o},children:r}),(0,t.jsx)("span",{className:"text-xs text-slate-500",children:n})]},e))})]}),(0,t.jsxs)("footer",{className:"text-center py-4 text-xs text-slate-600",children:["prism",(0,t.jsx)("span",{className:"font-mono",children:"0x2A"})," v","0.7.2"," · GREEN"]})]})}])}]);