0sec-cli 0.21.4 → 0.22.1

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 (251) hide show
  1. package/0.js +56 -56
  2. package/README.md +48 -63
  3. package/chunks/{adapt-loop-IGBRQAXO.js → adapt-loop-J6QCZZTB.js} +4 -4
  4. package/chunks/{artifact-scraper-LNQJUORS.js → artifact-scraper-MFKT6OI4.js} +2 -2
  5. package/chunks/{assumption-mining-4MJTP6H5.js → assumption-mining-646LYSJY.js} +16 -16
  6. package/chunks/{chunk-Z3IKZX3X.js → chunk-23DG5YKS.js} +1 -1
  7. package/chunks/{chunk-2WSXFFJZ.js → chunk-3E2KALZ5.js} +2 -2
  8. package/chunks/{chunk-TF46UWFU.js → chunk-4G7OVYJX.js} +1 -1
  9. package/chunks/{chunk-E2UOY5PJ.js → chunk-5BTJMINS.js} +12 -70
  10. package/chunks/{chunk-QZVG3BG4.js → chunk-5IBCBQEH.js} +1 -2
  11. package/chunks/{chunk-YA4PUM4H.js → chunk-7XCKYNLO.js} +1 -1
  12. package/chunks/{chunk-BACXRTQ4.js → chunk-AV2LG2L7.js} +87 -767
  13. package/chunks/{chunk-IMGWPNQM.js → chunk-BCSRRQG5.js} +76 -593
  14. package/chunks/{chunk-NOPBXZUV.js → chunk-BOUGKEKA.js} +1 -1
  15. package/chunks/{chunk-RF5QGKLR.js → chunk-CPWA6RWE.js} +3 -3
  16. package/chunks/{chunk-P6YG6TEZ.js → chunk-DKSCN2AB.js} +1 -1
  17. package/chunks/{chunk-YPOA3W4O.js → chunk-GOEA3NW6.js} +877 -110
  18. package/chunks/{chunk-ANDKY54G.js → chunk-HHPWRY2M.js} +4019 -7299
  19. package/chunks/{chunk-NDJU5ZZ7.js → chunk-IFME676H.js} +3 -3
  20. package/chunks/{chunk-HBKCGJAV.js → chunk-IVQV574Y.js} +1 -1
  21. package/chunks/{chunk-W4JOXE4N.js → chunk-IXT64DV5.js} +709 -1929
  22. package/chunks/{chunk-PC6RCKQV.js → chunk-KAU6NLGP.js} +59 -26
  23. package/chunks/{chunk-FAH6V4QM.js → chunk-LGCASF2C.js} +1117 -2291
  24. package/chunks/{chunk-CAJJRUTV.js → chunk-NLH4LMWH.js} +1 -1
  25. package/chunks/chunk-OHHCGDJ2.js +5523 -0
  26. package/chunks/{chunk-YHWWF4QY.js → chunk-OSBPGWTE.js} +3 -3
  27. package/chunks/{chunk-G34QP2XW.js → chunk-TM74SSHC.js} +1 -1
  28. package/chunks/{chunk-VOAXLO4A.js → chunk-TO35Y326.js} +5 -721
  29. package/chunks/{chunk-FWAYJ2IV.js → chunk-TV27OWIW.js} +8 -8
  30. package/chunks/chunk-UELXHK2Y.js +1950 -0
  31. package/chunks/{chunk-CL5KAUM6.js → chunk-V6GHX34G.js} +274 -8
  32. package/chunks/{chunk-WZISK5VC.js → chunk-VWITLWXB.js} +53 -7
  33. package/chunks/{chunk-ER3SUMYJ.js → chunk-W6UWZFKL.js} +0 -195
  34. package/chunks/chunk-WSDDGFA6.js +114 -0
  35. package/chunks/{chunk-5T6D5BVY.js → chunk-WZRVS7SB.js} +1 -1
  36. package/chunks/chunk-X7LAEEUW.js +2143 -0
  37. package/chunks/chunk-XA2O4WXA.js +1228 -0
  38. package/chunks/{chunk-Y5H6E24H.js → chunk-XCISCI4T.js} +1 -1
  39. package/chunks/{chunk-WPQLBN4S.js → chunk-XDKB2P5X.js} +1 -1
  40. package/chunks/{chunk-SBMB4OL3.js → chunk-YL6YAGLL.js} +62 -8
  41. package/chunks/{chunk-O6SD4A36.js → chunk-ZKQ2I3S2.js} +1 -1
  42. package/chunks/{codex-models-TYYV4JNN.js → codex-models-NHQW45SO.js} +5 -3
  43. package/chunks/{commands-WF5RG4I2.js → commands-N6GN5SBF.js} +2152 -3643
  44. package/chunks/{db-U3WQZVAO.js → db-5IWEJUYV.js} +3 -3
  45. package/chunks/{disclose-67GZCDBO.js → disclose-LDNKAVRH.js} +10 -8
  46. package/chunks/{dist-ACC3DZUZ.js → dist-BS4CY4RG.js} +3 -1
  47. package/chunks/{dist-EVTN3UTT.js → dist-FSS7MBDF.js} +2 -2
  48. package/chunks/{dist-F6X62TQK.js → dist-L3XJWWZ6.js} +225 -192
  49. package/chunks/{eval-runner-SA6OUGHZ.js → eval-runner-EMEGF24P.js} +11 -11
  50. package/chunks/{exploit-agent-36Q7XQFP.js → exploit-agent-KW4EB7BE.js} +1 -1
  51. package/chunks/{exploit-autoclimb-J4OTSTZ6.js → exploit-autoclimb-CXJ2ERRO.js} +1 -1
  52. package/chunks/{exploit-climb-PYEJDIC4.js → exploit-climb-TJWLY4XC.js} +2 -2
  53. package/chunks/fix-UUKPXCFB.js +26 -0
  54. package/chunks/{harness-GDUMKGSE.js → harness-C5HOKIEV.js} +3 -3
  55. package/chunks/{hunt-scan-UDJSCISU.js → hunt-scan-KZZ444V2.js} +14 -14
  56. package/chunks/{identity-JTIVJSV7.js → identity-62SVRW4H.js} +1 -1
  57. package/chunks/{kernel-primitive-F2IXUFAX.js → kernel-primitive-Z77IR7YS.js} +2 -2
  58. package/chunks/{kernel-vm-runner-276LHIOV.js → kernel-vm-runner-JW77P276.js} +2 -2
  59. package/chunks/{memsafety-scan-NHUOGTEX.js → memsafety-scan-FCPAXIZE.js} +2 -2
  60. package/chunks/{native-loop-3BSYVDUI.js → native-loop-P6P5GYVJ.js} +10 -10
  61. package/chunks/{npm-detectors-VIYJXKFQ.js → npm-detectors-Z2ZIQCN4.js} +2 -2
  62. package/chunks/orchestrate-DWWUT5RC.js +58 -0
  63. package/chunks/{process-PNMC36JI.js → process-N245QIQG.js} +1 -4
  64. package/chunks/{run-CBGE6DRQ.js → run-GAFKBCTN.js} +14935 -17598
  65. package/chunks/{runtime-PXO5G6UV.js → runtime-H7YBR5IZ.js} +4 -5
  66. package/chunks/{scope-NJHIDDTN.js → scope-QWY4VQZ7.js} +4 -1
  67. package/chunks/{session-store-46WBZM22.js → session-store-XIDFGG7K.js} +2 -2
  68. package/chunks/{variant-candidates-UH2WC2HA.js → variant-candidates-7D4F5E4H.js} +3 -3
  69. package/chunks/{web-recon-prepass-SFXU44SS.js → web-recon-prepass-VXXBPDAV.js} +3 -3
  70. package/cli-path-traversal-fixture.js +352 -0
  71. package/dashboard/assets/bot-Bg1Tp9_d.js +1 -0
  72. package/dashboard/assets/dist-B_dDCPbu.js +1 -0
  73. package/dashboard/assets/findings-page-mayGhNx6.js +5 -0
  74. package/dashboard/assets/format--susmHX7.js +1 -0
  75. package/dashboard/assets/input-TuVPR3Zl.js +1 -0
  76. package/dashboard/assets/jsx-runtime-MGseXjj5.js +3 -0
  77. package/dashboard/assets/live-page-HWWHX99U.js +1 -0
  78. package/dashboard/assets/meta-tile-ckHo-w7k.js +1 -0
  79. package/dashboard/assets/operations-BxZ0OoXO.js +10 -0
  80. package/dashboard/assets/operations-app-D3d35rgo.js +46 -0
  81. package/dashboard/assets/overview-page-W_4IteEr.js +1 -0
  82. package/dashboard/assets/page-header-Bw9AJgBV.js +1 -0
  83. package/dashboard/assets/scans-page-CgzVXHnn.js +1 -0
  84. package/dashboard/assets/siren-KQj8QAnJ.js +1 -0
  85. package/dashboard/assets/table-8EDklulN.js +1 -0
  86. package/dashboard/assets/tabs-CFHPOwg8.js +1 -0
  87. package/dashboard/index.html +2 -3
  88. package/node_modules/node-addon-api/LICENSE.md +9 -0
  89. package/node_modules/node-addon-api/README.md +95 -0
  90. package/node_modules/node-addon-api/common.gypi +21 -0
  91. package/node_modules/node-addon-api/except.gypi +25 -0
  92. package/node_modules/node-addon-api/index.js +14 -0
  93. package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
  94. package/node_modules/node-addon-api/napi-inl.h +7250 -0
  95. package/node_modules/node-addon-api/napi.h +3463 -0
  96. package/node_modules/node-addon-api/node_addon_api.gyp +42 -0
  97. package/node_modules/node-addon-api/node_api.gyp +9 -0
  98. package/node_modules/node-addon-api/noexcept.gypi +26 -0
  99. package/node_modules/node-addon-api/nothing.c +0 -0
  100. package/node_modules/node-addon-api/package-support.json +21 -0
  101. package/node_modules/node-addon-api/package.json +481 -0
  102. package/node_modules/node-addon-api/tools/README.md +73 -0
  103. package/node_modules/node-addon-api/tools/check-napi.js +99 -0
  104. package/node_modules/node-addon-api/tools/clang-format.js +71 -0
  105. package/node_modules/node-addon-api/tools/conversion.js +301 -0
  106. package/node_modules/node-gyp-build/LICENSE +21 -0
  107. package/node_modules/node-gyp-build/README.md +58 -0
  108. package/node_modules/node-gyp-build/SECURITY.md +5 -0
  109. package/node_modules/node-gyp-build/bin.js +84 -0
  110. package/node_modules/node-gyp-build/build-test.js +19 -0
  111. package/node_modules/node-gyp-build/index.js +6 -0
  112. package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  113. package/node_modules/node-gyp-build/optional.js +7 -0
  114. package/node_modules/node-gyp-build/package.json +43 -0
  115. package/node_modules/tree-sitter/LICENSE +21 -0
  116. package/node_modules/tree-sitter/README.md +90 -0
  117. package/node_modules/tree-sitter/binding.gyp +76 -0
  118. package/node_modules/tree-sitter/index.js +895 -0
  119. package/node_modules/tree-sitter/package.json +62 -0
  120. package/node_modules/tree-sitter/prebuilds/darwin-arm64/tree-sitter.node +0 -0
  121. package/node_modules/tree-sitter/prebuilds/darwin-x64/tree-sitter.node +0 -0
  122. package/node_modules/tree-sitter/prebuilds/linux-x64/tree-sitter.node +0 -0
  123. package/node_modules/tree-sitter/prebuilds/win32-x64/tree-sitter.node +0 -0
  124. package/node_modules/tree-sitter/src/addon_data.h +47 -0
  125. package/node_modules/tree-sitter/src/binding.cc +35 -0
  126. package/node_modules/tree-sitter/src/conversions.cc +140 -0
  127. package/node_modules/tree-sitter/src/conversions.h +22 -0
  128. package/node_modules/tree-sitter/src/language.cc +106 -0
  129. package/node_modules/tree-sitter/src/language.h +17 -0
  130. package/node_modules/tree-sitter/src/logger.cc +70 -0
  131. package/node_modules/tree-sitter/src/logger.h +19 -0
  132. package/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
  133. package/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
  134. package/node_modules/tree-sitter/src/node.cc +1056 -0
  135. package/node_modules/tree-sitter/src/node.h +30 -0
  136. package/node_modules/tree-sitter/src/parser.cc +298 -0
  137. package/node_modules/tree-sitter/src/parser.h +35 -0
  138. package/node_modules/tree-sitter/src/query.cc +383 -0
  139. package/node_modules/tree-sitter/src/query.h +39 -0
  140. package/node_modules/tree-sitter/src/tree.cc +307 -0
  141. package/node_modules/tree-sitter/src/tree.h +45 -0
  142. package/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
  143. package/node_modules/tree-sitter/src/tree_cursor.h +52 -0
  144. package/node_modules/tree-sitter/tree-sitter.d.ts +211 -0
  145. package/node_modules/tree-sitter/vendor/tree-sitter/LICENSE +21 -0
  146. package/node_modules/tree-sitter/vendor/tree-sitter/README.md +21 -0
  147. package/node_modules/tree-sitter/vendor/tree-sitter/lib/README.md +6 -0
  148. package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +1266 -0
  149. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
  150. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
  151. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +290 -0
  152. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
  153. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
  154. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +11 -0
  155. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +501 -0
  156. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +36 -0
  157. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
  158. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +221 -0
  159. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +299 -0
  160. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
  161. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +419 -0
  162. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +49 -0
  163. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +14 -0
  164. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +774 -0
  165. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2151 -0
  166. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +230 -0
  167. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +62 -0
  168. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4134 -0
  169. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +34 -0
  170. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +95 -0
  171. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +899 -0
  172. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +133 -0
  173. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1060 -0
  174. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +382 -0
  175. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +165 -0
  176. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
  177. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +714 -0
  178. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +48 -0
  179. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +1 -0
  180. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
  181. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +29 -0
  182. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +1 -0
  183. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +448 -0
  184. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +1 -0
  185. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +1 -0
  186. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +733 -0
  187. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +881 -0
  188. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +50 -0
  189. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +23 -0
  190. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +109 -0
  191. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +1294 -0
  192. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +1823 -0
  193. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +31 -0
  194. package/node_modules/tree-sitter/vendor/tree-sitter/test/fixtures/grammars/.gitkeep +0 -0
  195. package/node_modules/tree-sitter-c/LICENSE +21 -0
  196. package/node_modules/tree-sitter-c/README.md +18 -0
  197. package/node_modules/tree-sitter-c/binding.gyp +20 -0
  198. package/node_modules/tree-sitter-c/bindings/node/binding.cc +20 -0
  199. package/node_modules/tree-sitter-c/bindings/node/index.d.ts +28 -0
  200. package/node_modules/tree-sitter-c/bindings/node/index.js +7 -0
  201. package/node_modules/tree-sitter-c/grammar.js +1463 -0
  202. package/node_modules/tree-sitter-c/package.json +108 -0
  203. package/node_modules/tree-sitter-c/prebuilds/darwin-arm64/tree-sitter-c.node +0 -0
  204. package/node_modules/tree-sitter-c/prebuilds/darwin-x64/tree-sitter-c.node +0 -0
  205. package/node_modules/tree-sitter-c/prebuilds/linux-x64/tree-sitter-c.node +0 -0
  206. package/node_modules/tree-sitter-c/prebuilds/win32-x64/tree-sitter-c.node +0 -0
  207. package/node_modules/tree-sitter-c/queries/highlights.scm +81 -0
  208. package/node_modules/tree-sitter-c/queries/tags.scm +9 -0
  209. package/node_modules/tree-sitter-c/src/grammar.json +9682 -0
  210. package/node_modules/tree-sitter-c/src/node-types.json +4556 -0
  211. package/node_modules/tree-sitter-c/src/parser.c +113852 -0
  212. package/node_modules/tree-sitter-c/src/tree_sitter/alloc.h +54 -0
  213. package/node_modules/tree-sitter-c/src/tree_sitter/array.h +290 -0
  214. package/node_modules/tree-sitter-c/src/tree_sitter/parser.h +265 -0
  215. package/package.json +10 -3
  216. package/vendor/tree-sitter-0.21.1-node24.json +16 -0
  217. package/vendor/tree-sitter-0.21.1-node24.tgz +0 -0
  218. package/chunks/chunk-CGHCEN7W.js +0 -169
  219. package/chunks/chunk-CXKDWFNO.js +0 -102
  220. package/chunks/chunk-GIQKESMN.js +0 -687
  221. package/chunks/chunk-HPQZHOIU.js +0 -67
  222. package/chunks/chunk-PD2BBBKT.js +0 -245
  223. package/chunks/chunk-WF5W75WY.js +0 -1070
  224. package/chunks/fix-J2KBRJDV.js +0 -12
  225. package/chunks/orchestrate-DHBFRTSI.js +0 -59
  226. package/chunks/replay-runner-LK2XFIVG.js +0 -39
  227. package/dashboard/assets/bot-yILPnRgD.js +0 -1
  228. package/dashboard/assets/chevron-down-BeDJ-Vka.js +0 -1
  229. package/dashboard/assets/circle-alert-BEnMBMT-.js +0 -1
  230. package/dashboard/assets/client-DRYsuOGl.js +0 -9
  231. package/dashboard/assets/copy-Bi5vzoF9.js +0 -1
  232. package/dashboard/assets/desktop-BT7RkC4q.js +0 -32
  233. package/dashboard/assets/desktop-OaBI0E0e.css +0 -1
  234. package/dashboard/assets/dist-CmX-h7a4.js +0 -1
  235. package/dashboard/assets/dist-DAwYQmf_.js +0 -45
  236. package/dashboard/assets/findings-page-B4rwF6fZ.js +0 -5
  237. package/dashboard/assets/format-LNQSSpn6.js +0 -1
  238. package/dashboard/assets/jsx-runtime-C7oxC63R.js +0 -1
  239. package/dashboard/assets/live-page-DoNwpPAO.js +0 -1
  240. package/dashboard/assets/meta-tile-BMtBC-Qq.js +0 -1
  241. package/dashboard/assets/operations-app-ER0gg7GN.js +0 -2
  242. package/dashboard/assets/operations-e2CGYKB1.js +0 -4
  243. package/dashboard/assets/overview-page-CmeWH17A.js +0 -1
  244. package/dashboard/assets/page-header-CIJyycfz.js +0 -1
  245. package/dashboard/assets/play-Dwo-9xt6.js +0 -1
  246. package/dashboard/assets/scans-page-CuhzWhHx.js +0 -1
  247. package/dashboard/assets/search-CiooTLck.js +0 -1
  248. package/dashboard/assets/siren-CCBwTSuk.js +0 -1
  249. package/dashboard/assets/table-BgsSBdke.js +0 -1
  250. package/dashboard/assets/tabs-vn6v7Bk6.js +0 -1
  251. package/dashboard/desktop.html +0 -21
@@ -0,0 +1,5 @@
1
+ import{c as e,f as t,l as n,m as r,t as i}from"./jsx-runtime-MGseXjj5.js";import{D as a,E as o,O as s,h as c,n as l}from"./format--susmHX7.js";import{r as u}from"./dist-B_dDCPbu.js";import{t as d,y as f}from"./operations-BxZ0OoXO.js";import{_ as p,c as m,d as h,f as g,h as _,m as v,n as y,o as b,p as x,r as S,s as C,t as w,u as T}from"./input-TuVPR3Zl.js";import{t as E}from"./bot-Bg1Tp9_d.js";import{a as D,i as ee,n as O,r as te,t as ne}from"./tabs-CFHPOwg8.js";import{n as k,r as re,t as A}from"./meta-tile-ckHo-w7k.js";import{a as ie,c as j,d as M,f as N,i as P,l as F,n as ae,o as I,p as L,r as R,s as oe,t as z,u as B}from"./table-8EDklulN.js";import{t as se}from"./page-header-Bw9AJgBV.js";import{a as ce,c as V,f as H,i as le,l as ue,n as de,o as fe,p as U,r as pe,s as W,t as me,u as he}from"./operations-app-D3d35rgo.js";var ge=p(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),_e=p(`grip-vertical`,[[`circle`,{cx:`9`,cy:`12`,r:`1`,key:`1vctgf`}],[`circle`,{cx:`9`,cy:`5`,r:`1`,key:`hp0tcf`}],[`circle`,{cx:`9`,cy:`19`,r:`1`,key:`fkjjf6`}],[`circle`,{cx:`15`,cy:`12`,r:`1`,key:`1tmaij`}],[`circle`,{cx:`15`,cy:`5`,r:`1`,key:`19l28e`}],[`circle`,{cx:`15`,cy:`19`,r:`1`,key:`f4zoj3`}]]),ve=p(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),ye=p(`shield-question-mark`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3`,key:`mhlwft`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),be=p(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),xe=p(`user-round`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),G=p(`wand-sparkles`,[[`path`,{d:`m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72`,key:`ul74o6`}],[`path`,{d:`m14 7 3 3`,key:`1r5n42`}],[`path`,{d:`M5 6v4`,key:`ilb8ba`}],[`path`,{d:`M19 14v4`,key:`blhpug`}],[`path`,{d:`M10 2v2`,key:`7u0qdc`}],[`path`,{d:`M7 8H3`,key:`zfb6yr`}],[`path`,{d:`M21 16h-4`,key:`1cnmox`}],[`path`,{d:`M11 3H9`,key:`1obp7u`}]]),K=r(t()),q=i();function Se({request:e,response:t,analysis:n}){return(0,q.jsxs)(ne,{defaultValue:`request`,className:`space-y-4`,children:[(0,q.jsx)(te,{children:[[`request`,`Evidence request`],[`response`,`Evidence response`],[`analysis`,`Analysis`]].map(([e,t])=>(0,q.jsx)(ee,{value:e,children:t},e))}),(0,q.jsx)(O,{value:`request`,children:(0,q.jsx)(b,{children:(0,q.jsx)(C,{className:`p-4`,children:(0,q.jsx)(`pre`,{className:`text-sm leading-6 text-muted-foreground`,children:e})})})}),(0,q.jsx)(O,{value:`response`,children:(0,q.jsx)(b,{children:(0,q.jsx)(C,{className:`p-4`,children:(0,q.jsx)(`pre`,{className:`text-sm leading-6 text-muted-foreground`,children:t})})})}),(0,q.jsx)(O,{value:`analysis`,children:(0,q.jsx)(b,{children:(0,q.jsx)(C,{className:`p-4`,children:(0,q.jsx)(`pre`,{className:`text-sm leading-6 text-muted-foreground`,children:n??`No evidence analysis recorded.`})})})})]})}var Ce=r(f());function J(){var e=[...arguments];return(0,K.useMemo)(()=>t=>{e.forEach(e=>e(t))},e)}var we=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Te(e){let t=Object.prototype.toString.call(e);return t===`[object Window]`||t===`[object global]`}function Ee(e){return`nodeType`in e}function Y(e){return e?Te(e)?e:Ee(e)?e.ownerDocument?.defaultView??window:window:window}function De(e){let{Document:t}=Y(e);return e instanceof t}function Oe(e){return!Te(e)&&e instanceof Y(e).HTMLElement}function ke(e){return e instanceof Y(e).SVGElement}function Ae(e){return e?Te(e)?e.document:Ee(e)?De(e)?e:Oe(e)||ke(e)?e.ownerDocument:document:document:document}var je=we?K.useLayoutEffect:K.useEffect;function Me(e){let t=(0,K.useRef)(e);return je(()=>{t.current=e}),(0,K.useCallback)(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function Ne(){let e=(0,K.useRef)(null);return[(0,K.useCallback)((t,n)=>{e.current=setInterval(t,n)},[]),(0,K.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[])]}function Pe(e,t){t===void 0&&(t=[e]);let n=(0,K.useRef)(e);return je(()=>{n.current!==e&&(n.current=e)},t),n}function Fe(e,t){let n=(0,K.useRef)();return(0,K.useMemo)(()=>{let t=e(n.current);return n.current=t,t},[...t])}function Ie(e){let t=Me(e),n=(0,K.useRef)(null);return[n,(0,K.useCallback)(e=>{e!==n.current&&t?.(e,n.current),n.current=e},[])]}function Le(e){let t=(0,K.useRef)();return(0,K.useEffect)(()=>{t.current=e},[e]),t.current}var Re={};function ze(e,t){return(0,K.useMemo)(()=>{if(t)return t;let n=Re[e]==null?0:Re[e]+1;return Re[e]=n,e+`-`+n},[e,t])}function Be(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>{let r=Object.entries(n);for(let[n,i]of r){let r=t[n];r!=null&&(t[n]=r+e*i)}return t},{...t})}}var Ve=Be(1),He=Be(-1);function Ue(e){return`clientX`in e&&`clientY`in e}function We(e){if(!e)return!1;let{KeyboardEvent:t}=Y(e.target);return t&&e instanceof t}function Ge(e){if(!e)return!1;let{TouchEvent:t}=Y(e.target);return t&&e instanceof t}function Ke(e){if(Ge(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return Ue(e)?{x:e.clientX,y:e.clientY}:null}var qe=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:n}=e;return`translate3d(`+(t?Math.round(t):0)+`px, `+(n?Math.round(n):0)+`px, 0)`}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:n}=e;return`scaleX(`+t+`) scaleY(`+n+`)`}},Transform:{toString(e){if(e)return[qe.Translate.toString(e),qe.Scale.toString(e)].join(` `)}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+` `+n+`ms `+r}}}),Je=`a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]`;function Ye(e){return e.matches(Je)?e:e.querySelector(Je)}var Xe={display:`none`};function Ze(e){let{id:t,value:n}=e;return K.createElement(`div`,{id:t,style:Xe},n)}function Qe(e){let{id:t,announcement:n,ariaLiveType:r=`assertive`}=e;return K.createElement(`div`,{id:t,style:{position:`fixed`,top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:`hidden`,clip:`rect(0 0 0 0)`,clipPath:`inset(100%)`,whiteSpace:`nowrap`},role:`status`,"aria-live":r,"aria-atomic":!0},n)}function $e(){let[e,t]=(0,K.useState)(``);return{announce:(0,K.useCallback)(e=>{e!=null&&t(e)},[]),announcement:e}}var et=(0,K.createContext)(null);function tt(e){let t=(0,K.useContext)(et);(0,K.useEffect)(()=>{if(!t)throw Error(`useDndMonitor must be used within a children of <DndContext>`);return t(e)},[e,t])}function nt(){let[e]=(0,K.useState)(()=>new Set),t=(0,K.useCallback)(t=>(e.add(t),()=>e.delete(t)),[e]);return[(0,K.useCallback)(t=>{let{type:n,event:r}=t;e.forEach(e=>e[n]?.call(e,r))},[e]),t]}var rt={draggable:`
2
+ To pick up a draggable item, press the space bar.
3
+ While dragging, use the arrow keys to move the item.
4
+ Press space again to drop the item in its new position, or press escape to cancel.
5
+ `},it={onDragStart(e){let{active:t}=e;return`Picked up draggable item `+t.id+`.`},onDragOver(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was moved over droppable area `+n.id+`.`:`Draggable item `+t.id+` is no longer over a droppable area.`},onDragEnd(e){let{active:t,over:n}=e;return n?`Draggable item `+t.id+` was dropped over droppable area `+n.id:`Draggable item `+t.id+` was dropped.`},onDragCancel(e){let{active:t}=e;return`Dragging was cancelled. Draggable item `+t.id+` was dropped.`}};function at(e){let{announcements:t=it,container:n,hiddenTextDescribedById:r,screenReaderInstructions:i=rt}=e,{announce:a,announcement:o}=$e(),s=ze(`DndLiveRegion`),[c,l]=(0,K.useState)(!1);if((0,K.useEffect)(()=>{l(!0)},[]),tt((0,K.useMemo)(()=>({onDragStart(e){let{active:n}=e;a(t.onDragStart({active:n}))},onDragMove(e){let{active:n,over:r}=e;t.onDragMove&&a(t.onDragMove({active:n,over:r}))},onDragOver(e){let{active:n,over:r}=e;a(t.onDragOver({active:n,over:r}))},onDragEnd(e){let{active:n,over:r}=e;a(t.onDragEnd({active:n,over:r}))},onDragCancel(e){let{active:n,over:r}=e;a(t.onDragCancel({active:n,over:r}))}}),[a,t])),!c)return null;let u=K.createElement(K.Fragment,null,K.createElement(Ze,{id:r,value:i.draggable}),K.createElement(Qe,{id:s,announcement:o}));return n?(0,Ce.createPortal)(u,n):u}var X;(function(e){e.DragStart=`dragStart`,e.DragMove=`dragMove`,e.DragEnd=`dragEnd`,e.DragCancel=`dragCancel`,e.DragOver=`dragOver`,e.RegisterDroppable=`registerDroppable`,e.SetDroppableDisabled=`setDroppableDisabled`,e.UnregisterDroppable=`unregisterDroppable`})(X||={});function ot(){}function st(e,t){return(0,K.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function ct(){var e=[...arguments];return(0,K.useMemo)(()=>[...e].filter(e=>e!=null),[...e])}var Z=Object.freeze({x:0,y:0});function lt(e,t){let n=Ke(e);if(!n)return`0 0`;let r={x:(n.x-t.left)/t.width*100,y:(n.y-t.top)/t.height*100};return r.x+`% `+r.y+`%`}function ut(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function dt(e,t){if(!e||e.length===0)return null;let[n]=e;return t?n[t]:n}function ft(e,t){let n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),i=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),o=i-r,s=a-n;if(r<i&&n<a){let n=t.width*t.height,r=e.width*e.height,i=o*s,a=i/(n+r-i);return Number(a.toFixed(4))}return 0}var pt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e,i=[];for(let e of r){let{id:r}=e,a=n.get(r);if(a){let n=ft(a,t);n>0&&i.push({id:r,data:{droppableContainer:e,value:n}})}}return i.sort(ut)};function mt(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function ht(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Z}function gt(e){return function(t){return[...arguments].slice(1).reduce((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x}),{...t})}}var _t=gt(1);function vt(e){if(e.startsWith(`matrix3d(`)){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith(`matrix(`)){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function yt(e,t,n){let r=vt(t);if(!r)return e;let{scaleX:i,scaleY:a,x:o,y:s}=r,c=e.left-o-(1-i)*parseFloat(n),l=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(` `)+1)),u=i?e.width/i:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c}}var bt={ignoreTransform:!1};function xt(e,t){t===void 0&&(t=bt);let n=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:t,transformOrigin:r}=Y(e).getComputedStyle(e);t&&(n=yt(n,t,r))}let{top:r,left:i,width:a,height:o,bottom:s,right:c}=n;return{top:r,left:i,width:a,height:o,bottom:s,right:c}}function St(e){return xt(e,{ignoreTransform:!0})}function Ct(e){let t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function wt(e,t){return t===void 0&&(t=Y(e).getComputedStyle(e)),t.position===`fixed`}function Tt(e,t){t===void 0&&(t=Y(e).getComputedStyle(e));let n=/(auto|scroll|overlay)/;return[`overflow`,`overflowX`,`overflowY`].some(e=>{let r=t[e];return typeof r==`string`&&n.test(r)})}function Et(e,t){let n=[];function r(i){if(t!=null&&n.length>=t||!i)return n;if(De(i)&&i.scrollingElement!=null&&!n.includes(i.scrollingElement))return n.push(i.scrollingElement),n;if(!Oe(i)||ke(i)||n.includes(i))return n;let a=Y(e).getComputedStyle(i);return i!==e&&Tt(i,a)&&n.push(i),wt(i,a)?n:r(i.parentNode)}return e?r(e):n}function Dt(e){let[t]=Et(e,1);return t??null}function Ot(e){return!we||!e?null:Te(e)?e:Ee(e)?De(e)||e===Ae(e).scrollingElement?window:Oe(e)?e:null:null}function kt(e){return Te(e)?e.scrollX:e.scrollLeft}function At(e){return Te(e)?e.scrollY:e.scrollTop}function jt(e){return{x:kt(e),y:At(e)}}var Q;(function(e){e[e.Forward=1]=`Forward`,e[e.Backward=-1]=`Backward`})(Q||={});function Mt(e){return!we||!e?!1:e===document.scrollingElement}function Nt(e){let t={x:0,y:0},n=Mt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=r.y,isRight:e.scrollLeft>=r.x,maxScroll:r,minScroll:t}}var Pt={x:.2,y:.2};function Ft(e,t,n,r,i){let{top:a,left:o,right:s,bottom:c}=n;r===void 0&&(r=10),i===void 0&&(i=Pt);let{isTop:l,isBottom:u,isLeft:d,isRight:f}=Nt(e),p={x:0,y:0},m={x:0,y:0},h={height:t.height*i.y,width:t.width*i.x};return!l&&a<=t.top+h.height?(p.y=Q.Backward,m.y=r*Math.abs((t.top+h.height-a)/h.height)):!u&&c>=t.bottom-h.height&&(p.y=Q.Forward,m.y=r*Math.abs((t.bottom-h.height-c)/h.height)),!f&&s>=t.right-h.width?(p.x=Q.Forward,m.x=r*Math.abs((t.right-h.width-s)/h.width)):!d&&o<=t.left+h.width&&(p.x=Q.Backward,m.x=r*Math.abs((t.left+h.width-o)/h.width)),{direction:p,speed:m}}function It(e){if(e===document.scrollingElement){let{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}let{top:t,left:n,right:r,bottom:i}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:i,width:e.clientWidth,height:e.clientHeight}}function Lt(e){return e.reduce((e,t)=>Ve(e,jt(t)),Z)}function Rt(e){return e.reduce((e,t)=>e+kt(t),0)}function zt(e){return e.reduce((e,t)=>e+At(t),0)}function Bt(e,t){if(t===void 0&&(t=xt),!e)return;let{top:n,left:r,bottom:i,right:a}=t(e);Dt(e)&&(i<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:`center`,inline:`center`})}var Vt=[[`x`,[`left`,`right`],Rt],[`y`,[`top`,`bottom`],zt]],Ht=class{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let n=Et(t),r=Lt(n);this.rect={...e},this.width=e.width,this.height=e.height;for(let[e,t,i]of Vt)for(let a of t)Object.defineProperty(this,a,{get:()=>{let t=i(n),o=r[e]-t;return this.rect[a]+o},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},Ut=class{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(e=>this.target?.removeEventListener(...e))},this.target=e}add(e,t,n){var r;(r=this.target)==null||r.addEventListener(e,t,n),this.listeners.push([e,t,n])}};function Wt(e){let{EventTarget:t}=Y(e);return e instanceof t?e:Ae(e)}function Gt(e,t){let n=Math.abs(e.x),r=Math.abs(e.y);return typeof t==`number`?Math.sqrt(n**2+r**2)>t:`x`in t&&`y`in t?n>t.x&&r>t.y:`x`in t?n>t.x:`y`in t&&r>t.y}var Kt;(function(e){e.Click=`click`,e.DragStart=`dragstart`,e.Keydown=`keydown`,e.ContextMenu=`contextmenu`,e.Resize=`resize`,e.SelectionChange=`selectionchange`,e.VisibilityChange=`visibilitychange`})(Kt||={});function qt(e){e.preventDefault()}function Jt(e){e.stopPropagation()}var $;(function(e){e.Space=`Space`,e.Down=`ArrowDown`,e.Right=`ArrowRight`,e.Left=`ArrowLeft`,e.Up=`ArrowUp`,e.Esc=`Escape`,e.Enter=`Enter`,e.Tab=`Tab`})($||={});var Yt={start:[$.Space,$.Enter],cancel:[$.Esc],end:[$.Space,$.Enter,$.Tab]},Xt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $.Right:return{...n,x:n.x+25};case $.Left:return{...n,x:n.x-25};case $.Down:return{...n,y:n.y+25};case $.Up:return{...n,y:n.y-25}}},Zt=class{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;let{event:{target:t}}=e;this.props=e,this.listeners=new Ut(Ae(t)),this.windowListeners=new Ut(Y(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Kt.Resize,this.handleCancel),this.windowListeners.add(Kt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Kt.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&Bt(n),t(Z)}handleKeyDown(e){if(We(e)){let{active:t,context:n,options:r}=this.props,{keyboardCodes:i=Yt,coordinateGetter:a=Xt,scrollBehavior:o=`smooth`}=r,{code:s}=e;if(i.end.includes(s)){this.handleEnd(e);return}if(i.cancel.includes(s)){this.handleCancel(e);return}let{collisionRect:c}=n.current,l=c?{x:c.left,y:c.top}:Z;this.referenceCoordinates||=l;let u=a(e,{active:t,context:n.current,currentCoordinates:l});if(u){let t=He(u,l),r={x:0,y:0},{scrollableAncestors:i}=n.current;for(let n of i){let i=e.code,{isTop:a,isRight:s,isLeft:c,isBottom:l,maxScroll:d,minScroll:f}=Nt(n),p=It(n),m={x:Math.min(i===$.Right?p.right-p.width/2:p.right,Math.max(i===$.Right?p.left:p.left+p.width/2,u.x)),y:Math.min(i===$.Down?p.bottom-p.height/2:p.bottom,Math.max(i===$.Down?p.top:p.top+p.height/2,u.y))},h=i===$.Right&&!s||i===$.Left&&!c,g=i===$.Down&&!l||i===$.Up&&!a;if(h&&m.x!==u.x){let e=n.scrollLeft+t.x,a=i===$.Right&&e<=d.x||i===$.Left&&e>=f.x;if(a&&!t.y){n.scrollTo({left:e,behavior:o});return}r.x=a?n.scrollLeft-e:i===$.Right?n.scrollLeft-d.x:n.scrollLeft-f.x,r.x&&n.scrollBy({left:-r.x,behavior:o});break}if(g&&m.y!==u.y){let e=n.scrollTop+t.y,a=i===$.Down&&e<=d.y||i===$.Up&&e>=f.y;if(a&&!t.x){n.scrollTo({top:e,behavior:o});return}r.y=a?n.scrollTop-e:i===$.Down?n.scrollTop-d.y:n.scrollTop-f.y,r.y&&n.scrollBy({top:-r.y,behavior:o});break}}this.handleMove(e,Ve(He(u,this.referenceCoordinates),r))}}}handleMove(e,t){let{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){let{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){let{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};Zt.activators=[{eventName:`onKeyDown`,handler:(e,t,n)=>{let{keyboardCodes:r=Yt,onActivation:i}=t,{active:a}=n,{code:o}=e.nativeEvent;if(r.start.includes(o)){let t=a.activatorNode.current;return t&&e.target!==t?!1:(e.preventDefault(),i?.({event:e.nativeEvent}),!0)}return!1}}];function Qt(e){return!!(e&&`distance`in e)}function $t(e){return!!(e&&`delay`in e)}var en=class{constructor(e,t,n){n===void 0&&(n=Wt(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;let{event:r}=e,{target:i}=r;this.props=e,this.events=t,this.document=Ae(i),this.documentListeners=new Ut(this.document),this.listeners=new Ut(n),this.windowListeners=new Ut(Y(i)),this.initialCoordinates=Ke(r)??Z,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),e.cancel&&this.listeners.add(e.cancel.name,this.handleCancel),this.windowListeners.add(Kt.Resize,this.handleCancel),this.windowListeners.add(Kt.DragStart,qt),this.windowListeners.add(Kt.VisibilityChange,this.handleCancel),this.windowListeners.add(Kt.ContextMenu,qt),this.documentListeners.add(Kt.Keydown,this.handleKeydown),t){if(n!=null&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if($t(t)){this.timeoutId=setTimeout(this.handleStart,t.delay),this.handlePending(t);return}if(Qt(t)){this.handlePending(t);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(e,t){let{active:n,onPending:r}=this.props;r(n,e,this.initialCoordinates,t)}handleStart(){let{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Kt.Click,Jt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Kt.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){let{activated:t,initialCoordinates:n,props:r}=this,{onMove:i,options:{activationConstraint:a}}=r;if(!n)return;let o=Ke(e)??Z,s=He(n,o);if(!t&&a){if(Qt(a)){if(a.tolerance!=null&&Gt(s,a.tolerance))return this.handleCancel();if(Gt(s,a.distance))return this.handleStart()}if($t(a)&&Gt(s,a.tolerance))return this.handleCancel();this.handlePending(a,s);return}e.cancelable&&e.preventDefault(),i(o)}handleEnd(){let{onAbort:e,onEnd:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleCancel(){let{onAbort:e,onCancel:t}=this.props;this.detach(),this.activated||e(this.props.active),t()}handleKeydown(e){e.code===$.Esc&&this.handleCancel()}removeTextSelection(){var e;(e=this.document.getSelection())==null||e.removeAllRanges()}},tn={cancel:{name:`pointercancel`},move:{name:`pointermove`},end:{name:`pointerup`}},nn=class extends en{constructor(e){let{event:t}=e,n=Ae(t.target);super(e,tn,n)}};nn.activators=[{eventName:`onPointerDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r?.({event:n}),!0)}}];var rn={move:{name:`mousemove`},end:{name:`mouseup`}},an;(function(e){e[e.RightClick=2]=`RightClick`})(an||={});var on=class extends en{constructor(e){super(e,rn,Ae(e.event.target))}};on.activators=[{eventName:`onMouseDown`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button!==an.RightClick&&(r?.({event:n}),!0)}}];var sn={cancel:{name:`touchcancel`},move:{name:`touchmove`},end:{name:`touchend`}},cn=class extends en{constructor(e){super(e,sn)}static setup(){return window.addEventListener(sn.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(sn.move.name,e)};function e(){}}};cn.activators=[{eventName:`onTouchStart`,handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t,{touches:i}=n;return i.length>1?!1:(r?.({event:n}),!0)}}];var ln;(function(e){e[e.Pointer=0]=`Pointer`,e[e.DraggableRect=1]=`DraggableRect`})(ln||={});var un;(function(e){e[e.TreeOrder=0]=`TreeOrder`,e[e.ReversedTreeOrder=1]=`ReversedTreeOrder`})(un||={});function dn(e){let{acceleration:t,activator:n=ln.Pointer,canScroll:r,draggingRect:i,enabled:a,interval:o=5,order:s=un.TreeOrder,pointerCoordinates:c,scrollableAncestors:l,scrollableAncestorRects:u,delta:d,threshold:f}=e,p=pn({delta:d,disabled:!a}),[m,h]=Ne(),g=(0,K.useRef)({x:0,y:0}),_=(0,K.useRef)({x:0,y:0}),v=(0,K.useMemo)(()=>{switch(n){case ln.Pointer:return c?{top:c.y,bottom:c.y,left:c.x,right:c.x}:null;case ln.DraggableRect:return i}},[n,i,c]),y=(0,K.useRef)(null),b=(0,K.useCallback)(()=>{let e=y.current;if(!e)return;let t=g.current.x*_.current.x,n=g.current.y*_.current.y;e.scrollBy(t,n)},[]),x=(0,K.useMemo)(()=>s===un.TreeOrder?[...l].reverse():l,[s,l]);(0,K.useEffect)(()=>{if(!a||!l.length||!v){h();return}for(let e of x){if(r?.(e)===!1)continue;let n=l.indexOf(e),i=u[n];if(!i)continue;let{direction:a,speed:s}=Ft(e,i,v,t,f);for(let e of[`x`,`y`])p[e][a[e]]||(s[e]=0,a[e]=0);if(s.x>0||s.y>0){h(),y.current=e,m(b,o),g.current=s,_.current=a;return}}g.current={x:0,y:0},_.current={x:0,y:0},h()},[t,b,r,h,a,o,JSON.stringify(v),JSON.stringify(p),m,l,x,u,JSON.stringify(f)])}var fn={x:{[Q.Backward]:!1,[Q.Forward]:!1},y:{[Q.Backward]:!1,[Q.Forward]:!1}};function pn(e){let{delta:t,disabled:n}=e,r=Le(t);return Fe(e=>{if(n||!r||!e)return fn;let i={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Q.Backward]:e.x[Q.Backward]||i.x===-1,[Q.Forward]:e.x[Q.Forward]||i.x===1},y:{[Q.Backward]:e.y[Q.Backward]||i.y===-1,[Q.Forward]:e.y[Q.Forward]||i.y===1}}},[n,t,r])}function mn(e,t){let n=t==null?void 0:e.get(t),r=n?n.node.current:null;return Fe(e=>t==null?null:r??e??null,[r,t])}function hn(e,t){return(0,K.useMemo)(()=>e.reduce((e,n)=>{let{sensor:r}=n,i=r.activators.map(e=>({eventName:e.eventName,handler:t(e.handler,n)}));return[...e,...i]},[]),[e,t])}var gn;(function(e){e[e.Always=0]=`Always`,e[e.BeforeDragging=1]=`BeforeDragging`,e[e.WhileDragging=2]=`WhileDragging`})(gn||={});var _n;(function(e){e.Optimized=`optimized`})(_n||={});var vn=new Map;function yn(e,t){let{dragging:n,dependencies:r,config:i}=t,[a,o]=(0,K.useState)(null),{frequency:s,measure:c,strategy:l}=i,u=(0,K.useRef)(e),d=g(),f=Pe(d),p=(0,K.useCallback)(function(e){e===void 0&&(e=[]),!f.current&&o(t=>t===null?e:t.concat(e.filter(e=>!t.includes(e))))},[f]),m=(0,K.useRef)(null),h=Fe(t=>{if(d&&!n)return vn;if(!t||t===vn||u.current!==e||a!=null){let t=new Map;for(let n of e){if(!n)continue;if(a&&a.length>0&&!a.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}let e=n.node.current,r=e?new Ht(c(e),e):null;n.rect.current=r,r&&t.set(n.id,r)}return t}return t},[e,a,n,d,c]);return(0,K.useEffect)(()=>{u.current=e},[e]),(0,K.useEffect)(()=>{d||p()},[n,d]),(0,K.useEffect)(()=>{a&&a.length>0&&o(null)},[JSON.stringify(a)]),(0,K.useEffect)(()=>{d||typeof s!=`number`||m.current!==null||(m.current=setTimeout(()=>{p(),m.current=null},s))},[s,d,p,...r]),{droppableRects:h,measureDroppableContainers:p,measuringScheduled:a!=null};function g(){switch(l){case gn.Always:return!1;case gn.BeforeDragging:return n;default:return!n}}}function bn(e,t){return Fe(n=>e?n||(typeof t==`function`?t(e):e):null,[t,e])}function xn(e,t){return bn(e,t)}function Sn(e){let{callback:t,disabled:n}=e,r=Me(t),i=(0,K.useMemo)(()=>{if(n||typeof window>`u`||window.MutationObserver===void 0)return;let{MutationObserver:e}=window;return new e(r)},[r,n]);return(0,K.useEffect)(()=>()=>i?.disconnect(),[i]),i}function Cn(e){let{callback:t,disabled:n}=e,r=Me(t),i=(0,K.useMemo)(()=>{if(n||typeof window>`u`||window.ResizeObserver===void 0)return;let{ResizeObserver:e}=window;return new e(r)},[n]);return(0,K.useEffect)(()=>()=>i?.disconnect(),[i]),i}function wn(e){return new Ht(xt(e),e)}function Tn(e,t,n){t===void 0&&(t=wn);let[r,i]=(0,K.useState)(null);function a(){i(r=>{if(!e)return null;if(e.isConnected===!1)return r??n??null;let i=t(e);return JSON.stringify(r)===JSON.stringify(i)?r:i})}let o=Sn({callback(t){if(e)for(let n of t){let{type:t,target:r}=n;if(t===`childList`&&r instanceof HTMLElement&&r.contains(e)){a();break}}}}),s=Cn({callback:a});return je(()=>{a(),e?(s?.observe(e),o?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),o?.disconnect())},[e]),r}function En(e){return ht(e,bn(e))}var Dn=[];function On(e){let t=(0,K.useRef)(e),n=Fe(n=>e?n&&n!==Dn&&e&&t.current&&e.parentNode===t.current.parentNode?n:Et(e):Dn,[e]);return(0,K.useEffect)(()=>{t.current=e},[e]),n}function kn(e){let[t,n]=(0,K.useState)(null),r=(0,K.useRef)(e),i=(0,K.useCallback)(e=>{let t=Ot(e.target);t&&n(e=>e?(e.set(t,jt(t)),new Map(e)):null)},[]);return(0,K.useEffect)(()=>{let t=r.current;if(e!==t){a(t);let o=e.map(e=>{let t=Ot(e);return t?(t.addEventListener(`scroll`,i,{passive:!0}),[t,jt(t)]):null}).filter(e=>e!=null);n(o.length?new Map(o):null),r.current=e}return()=>{a(e),a(t)};function a(e){e.forEach(e=>{Ot(e)?.removeEventListener(`scroll`,i)})}},[i,e]),(0,K.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((e,t)=>Ve(e,t),Z):Lt(e):Z,[e,t])}function An(e,t){t===void 0&&(t=[]);let n=(0,K.useRef)(null);return(0,K.useEffect)(()=>{n.current=null},t),(0,K.useEffect)(()=>{let t=e!==Z;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)},[e]),n.current?He(e,n.current):Z}function jn(e){(0,K.useEffect)(()=>{if(!we)return;let t=e.map(e=>{let{sensor:t}=e;return t.setup==null?void 0:t.setup()});return()=>{for(let e of t)e?.()}},e.map(e=>{let{sensor:t}=e;return t}))}function Mn(e,t){return(0,K.useMemo)(()=>e.reduce((e,n)=>{let{eventName:r,handler:i}=n;return e[r]=e=>{i(e,t)},e},{}),[e,t])}function Nn(e){return(0,K.useMemo)(()=>e?Ct(e):null,[e])}var Pn=[];function Fn(e,t){t===void 0&&(t=xt);let[n]=e,r=Nn(n?Y(n):null),[i,a]=(0,K.useState)(Pn);function o(){a(()=>e.length?e.map(e=>Mt(e)?r:new Ht(t(e),e)):Pn)}let s=Cn({callback:o});return je(()=>{s?.disconnect(),o(),e.forEach(e=>s?.observe(e))},[e]),i}function In(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Oe(t)?t:e}function Ln(e){let{measure:t}=e,[n,r]=(0,K.useState)(null),i=Cn({callback:(0,K.useCallback)(e=>{for(let{target:n}of e)if(Oe(n)){r(e=>{let r=t(n);return e?{...e,width:r.width,height:r.height}:r});break}},[t])}),[a,o]=Ie((0,K.useCallback)(e=>{let n=In(e);i?.disconnect(),n&&i?.observe(n),r(n?t(n):null)},[t,i]));return(0,K.useMemo)(()=>({nodeRef:a,rect:n,setRef:o}),[n,a,o])}var Rn=[{sensor:nn,options:{}},{sensor:Zt,options:{}}],zn={current:{}},Bn={draggable:{measure:St},droppable:{measure:St,strategy:gn.WhileDragging,frequency:_n.Optimized},dragOverlay:{measure:xt}},Vn=class extends Map{get(e){return e==null?void 0:super.get(e)??void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(e=>{let{disabled:t}=e;return!t})}getNodeFor(e){return this.get(e)?.node.current??void 0}},Hn={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new Vn,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:ot},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Bn,measureDroppableContainers:ot,windowRect:null,measuringScheduled:!1},Un={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:``},dispatch:ot,draggableNodes:new Map,over:null,measureDroppableContainers:ot},Wn=(0,K.createContext)(Un),Gn=(0,K.createContext)(Hn);function Kn(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new Vn}}}function qn(e,t){switch(t.type){case X.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case X.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case X.DragEnd:case X.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case X.RegisterDroppable:{let{element:n}=t,{id:r}=n,i=new Vn(e.droppable.containers);return i.set(r,n),{...e,droppable:{...e.droppable,containers:i}}}case X.SetDroppableDisabled:{let{id:n,key:r,disabled:i}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;let o=new Vn(e.droppable.containers);return o.set(n,{...a,disabled:i}),{...e,droppable:{...e.droppable,containers:o}}}case X.UnregisterDroppable:{let{id:n,key:r}=t,i=e.droppable.containers.get(n);if(!i||r!==i.key)return e;let a=new Vn(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Jn(e){let{disabled:t}=e,{active:n,activatorEvent:r,draggableNodes:i}=(0,K.useContext)(Wn),a=Le(r),o=Le(n?.id);return(0,K.useEffect)(()=>{if(!t&&!r&&a&&o!=null){if(!We(a)||document.activeElement===a.target)return;let e=i.get(o);if(!e)return;let{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame(()=>{for(let e of[t.current,n.current]){if(!e)continue;let t=Ye(e);if(t){t.focus();break}}})}},[r,t,i,o,a]),null}function Yn(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((e,t)=>t({transform:e,...r}),n):n}function Xn(e){return(0,K.useMemo)(()=>({draggable:{...Bn.draggable,...e?.draggable},droppable:{...Bn.droppable,...e?.droppable},dragOverlay:{...Bn.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function Zn(e){let{activeNode:t,measure:n,initialRect:r,config:i=!0}=e,a=(0,K.useRef)(!1),{x:o,y:s}=typeof i==`boolean`?{x:i,y:i}:i;je(()=>{if(!o&&!s||!t){a.current=!1;return}if(a.current||!r)return;let e=t?.node.current;if(!e||e.isConnected===!1)return;let i=ht(n(e),r);if(o||(i.x=0),s||(i.y=0),a.current=!0,Math.abs(i.x)>0||Math.abs(i.y)>0){let t=Dt(e);t&&t.scrollBy({top:i.y,left:i.x})}},[t,o,s,r,n])}var Qn=(0,K.createContext)({...Z,scaleX:1,scaleY:1}),$n;(function(e){e[e.Uninitialized=0]=`Uninitialized`,e[e.Initializing=1]=`Initializing`,e[e.Initialized=2]=`Initialized`})($n||={});var er=(0,K.memo)(function(e){let{id:t,accessibility:n,autoScroll:r=!0,children:i,sensors:a=Rn,collisionDetection:o=pt,measuring:s,modifiers:c,...l}=e,[u,d]=(0,K.useReducer)(qn,void 0,Kn),[f,p]=nt(),[m,h]=(0,K.useState)($n.Uninitialized),g=m===$n.Initialized,{draggable:{active:_,nodes:v,translate:y},droppable:{containers:b}}=u,x=_==null?null:v.get(_),S=(0,K.useRef)({initial:null,translated:null}),C=(0,K.useMemo)(()=>_==null?null:{id:_,data:x?.data??zn,rect:S},[_,x]),w=(0,K.useRef)(null),[T,E]=(0,K.useState)(null),[D,ee]=(0,K.useState)(null),O=Pe(l,Object.values(l)),te=ze(`DndDescribedBy`,t),ne=(0,K.useMemo)(()=>b.getEnabled(),[b]),k=Xn(s),{droppableRects:re,measureDroppableContainers:A,measuringScheduled:ie}=yn(ne,{dragging:g,dependencies:[y.x,y.y],config:k.droppable}),j=mn(v,_),M=(0,K.useMemo)(()=>D?Ke(D):null,[D]),N=Se(),P=xn(j,k.draggable.measure);Zn({activeNode:_==null?null:v.get(_),config:N.layoutShiftCompensation,initialRect:P,measure:k.draggable.measure});let F=Tn(j,k.draggable.measure,P),ae=Tn(j?j.parentElement:null),I=(0,K.useRef)({activatorEvent:null,active:null,activeNode:j,collisionRect:null,collisions:null,droppableRects:re,draggableNodes:v,draggingNode:null,draggingNodeRect:null,droppableContainers:b,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),L=b.getNodeFor(I.current.over?.id),R=Ln({measure:k.dragOverlay.measure}),oe=R.nodeRef.current??j,z=g?R.rect??F:null,B=!!(R.nodeRef.current&&R.rect),se=En(B?null:F),ce=Nn(oe?Y(oe):null),V=On(g?L??j:null),H=Fn(V),le=Yn(c,{transform:{x:y.x-se.x,y:y.y-se.y,scaleX:1,scaleY:1},activatorEvent:D,active:C,activeNodeRect:F,containerNodeRect:ae,draggingNodeRect:z,over:I.current.over,overlayNodeRect:R.rect,scrollableAncestors:V,scrollableAncestorRects:H,windowRect:ce}),ue=M?Ve(M,y):null,de=kn(V),fe=An(de),U=An(de,[F]),pe=Ve(le,fe),W=z?_t(z,le):null,me=C&&W?o({active:C,collisionRect:W,droppableRects:re,droppableContainers:ne,pointerCoordinates:ue}):null,he=dt(me,`id`),[ge,_e]=(0,K.useState)(null),ve=mt(B?le:Ve(le,U),ge?.rect??null,F),ye=(0,K.useRef)(null),be=(0,K.useCallback)((e,t)=>{let{sensor:n,options:r}=t;if(w.current==null)return;let i=v.get(w.current);if(!i)return;let a=e.nativeEvent,o=new n({active:w.current,activeNode:i,event:a,options:r,context:I,onAbort(e){if(!v.get(e))return;let{onDragAbort:t}=O.current,n={id:e};t?.(n),f({type:`onDragAbort`,event:n})},onPending(e,t,n,r){if(!v.get(e))return;let{onDragPending:i}=O.current,a={id:e,constraint:t,initialCoordinates:n,offset:r};i?.(a),f({type:`onDragPending`,event:a})},onStart(e){let t=w.current;if(t==null)return;let n=v.get(t);if(!n)return;let{onDragStart:r}=O.current,i={activatorEvent:a,active:{id:t,data:n.data,rect:S}};(0,Ce.unstable_batchedUpdates)(()=>{r?.(i),h($n.Initializing),d({type:X.DragStart,initialCoordinates:e,active:t}),f({type:`onDragStart`,event:i}),E(ye.current),ee(a)})},onMove(e){d({type:X.DragMove,coordinates:e})},onEnd:s(X.DragEnd),onCancel:s(X.DragCancel)});ye.current=o;function s(e){return async function(){let{active:t,collisions:n,over:r,scrollAdjustedTranslate:i}=I.current,o=null;if(t&&i){let{cancelDrop:s}=O.current;o={activatorEvent:a,active:t,collisions:n,delta:i,over:r},e===X.DragEnd&&typeof s==`function`&&await Promise.resolve(s(o))&&(e=X.DragCancel)}w.current=null,(0,Ce.unstable_batchedUpdates)(()=>{d({type:e}),h($n.Uninitialized),_e(null),E(null),ee(null),ye.current=null;let t=e===X.DragEnd?`onDragEnd`:`onDragCancel`;if(o){let e=O.current[t];e?.(o),f({type:t,event:o})}})}}},[v]),xe=hn(a,(0,K.useCallback)((e,t)=>(n,r)=>{let i=n.nativeEvent,a=v.get(r);if(w.current!==null||!a||i.dndKit||i.defaultPrevented)return;let o={active:a};e(n,t.options,o)===!0&&(i.dndKit={capturedBy:t.sensor},w.current=r,be(n,t))},[v,be]));jn(a),je(()=>{F&&m===$n.Initializing&&h($n.Initialized)},[F,m]),(0,K.useEffect)(()=>{let{onDragMove:e}=O.current,{active:t,activatorEvent:n,collisions:r,over:i}=I.current;if(!t||!n)return;let a={active:t,activatorEvent:n,collisions:r,delta:{x:pe.x,y:pe.y},over:i};(0,Ce.unstable_batchedUpdates)(()=>{e?.(a),f({type:`onDragMove`,event:a})})},[pe.x,pe.y]),(0,K.useEffect)(()=>{let{active:e,activatorEvent:t,collisions:n,droppableContainers:r,scrollAdjustedTranslate:i}=I.current;if(!e||w.current==null||!t||!i)return;let{onDragOver:a}=O.current,o=r.get(he),s=o&&o.rect.current?{id:o.id,rect:o.rect.current,data:o.data,disabled:o.disabled}:null,c={active:e,activatorEvent:t,collisions:n,delta:{x:i.x,y:i.y},over:s};(0,Ce.unstable_batchedUpdates)(()=>{_e(s),a?.(c),f({type:`onDragOver`,event:c})})},[he]),je(()=>{I.current={activatorEvent:D,active:C,activeNode:j,collisionRect:W,collisions:me,droppableRects:re,draggableNodes:v,draggingNode:oe,draggingNodeRect:z,droppableContainers:b,over:ge,scrollableAncestors:V,scrollAdjustedTranslate:pe},S.current={initial:z,translated:W}},[C,j,me,W,v,oe,z,re,b,ge,V,pe]),dn({...N,delta:y,draggingRect:W,pointerCoordinates:ue,scrollableAncestors:V,scrollableAncestorRects:H});let G=(0,K.useMemo)(()=>({active:C,activeNode:j,activeNodeRect:F,activatorEvent:D,collisions:me,containerNodeRect:ae,dragOverlay:R,draggableNodes:v,droppableContainers:b,droppableRects:re,over:ge,measureDroppableContainers:A,scrollableAncestors:V,scrollableAncestorRects:H,measuringConfiguration:k,measuringScheduled:ie,windowRect:ce}),[C,j,F,D,me,ae,R,v,b,re,ge,A,V,H,k,ie,ce]),q=(0,K.useMemo)(()=>({activatorEvent:D,activators:xe,active:C,activeNodeRect:F,ariaDescribedById:{draggable:te},dispatch:d,draggableNodes:v,over:ge,measureDroppableContainers:A}),[D,xe,C,F,d,te,v,ge,A]);return K.createElement(et.Provider,{value:p},K.createElement(Wn.Provider,{value:q},K.createElement(Gn.Provider,{value:G},K.createElement(Qn.Provider,{value:ve},i)),K.createElement(Jn,{disabled:n?.restoreFocus===!1})),K.createElement(at,{...n,hiddenTextDescribedById:te}));function Se(){let e=T?.autoScrollEnabled===!1,t=typeof r==`object`?r.enabled===!1:r===!1,n=g&&!e&&!t;return typeof r==`object`?{...r,enabled:n}:{enabled:n}}}),tr=(0,K.createContext)(null),nr=`button`,rr=`Draggable`;function ir(e){let{id:t,data:n,disabled:r=!1,attributes:i}=e,a=ze(rr),{activators:o,activatorEvent:s,active:c,activeNodeRect:l,ariaDescribedById:u,draggableNodes:d,over:f}=(0,K.useContext)(Wn),{role:p=nr,roleDescription:m=`draggable`,tabIndex:h=0}=i??{},g=c?.id===t,_=(0,K.useContext)(g?Qn:tr),[v,y]=Ie(),[b,x]=Ie(),S=Mn(o,t),C=Pe(n);return je(()=>(d.set(t,{id:t,key:a,node:v,activatorNode:b,data:C}),()=>{let e=d.get(t);e&&e.key===a&&d.delete(t)}),[d,t]),{active:c,activatorEvent:s,activeNodeRect:l,attributes:(0,K.useMemo)(()=>({role:p,tabIndex:h,"aria-disabled":r,"aria-pressed":g&&p===nr?!0:void 0,"aria-roledescription":m,"aria-describedby":u.draggable}),[r,p,h,g,m,u.draggable]),isDragging:g,listeners:r?void 0:S,node:v,over:f,setNodeRef:y,setActivatorNodeRef:x,transform:_}}function ar(){return(0,K.useContext)(Gn)}var or=`Droppable`,sr={timeout:25};function cr(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:i}=e,a=ze(or),{active:o,dispatch:s,over:c,measureDroppableContainers:l}=(0,K.useContext)(Wn),u=(0,K.useRef)({disabled:n}),d=(0,K.useRef)(!1),f=(0,K.useRef)(null),p=(0,K.useRef)(null),{disabled:m,updateMeasurementsFor:h,timeout:g}={...sr,...i},_=Pe(h??r),v=Cn({callback:(0,K.useCallback)(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{l(Array.isArray(_.current)?_.current:[_.current]),p.current=null},g)},[g]),disabled:m||!o}),[y,b]=Ie((0,K.useCallback)((e,t)=>{v&&(t&&(v.unobserve(t),d.current=!1),e&&v.observe(e))},[v])),x=Pe(t);return(0,K.useEffect)(()=>{!v||!y.current||(v.disconnect(),d.current=!1,v.observe(y.current))},[y,v]),(0,K.useEffect)(()=>(s({type:X.RegisterDroppable,element:{id:r,key:a,disabled:n,node:y,rect:f,data:x}}),()=>s({type:X.UnregisterDroppable,key:a,id:r})),[r]),(0,K.useEffect)(()=>{n!==u.current.disabled&&(s({type:X.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:o,rect:f,isOver:c?.id===r,node:y,over:c,setNodeRef:b}}function lr(e){let{animation:t,children:n}=e,[r,i]=(0,K.useState)(null),[a,o]=(0,K.useState)(null),s=Le(n);return!n&&!r&&s&&i(s),je(()=>{if(!a)return;let e=r?.key,n=r?.props.id;if(e==null||n==null){i(null);return}Promise.resolve(t(n,a)).then(()=>{i(null)})},[t,r,a]),K.createElement(K.Fragment,null,n,r?(0,K.cloneElement)(r,{ref:o}):null)}var ur={x:0,y:0,scaleX:1,scaleY:1};function dr(e){let{children:t}=e;return K.createElement(Wn.Provider,{value:Un},K.createElement(Qn.Provider,{value:ur},t))}var fr={position:`fixed`,touchAction:`none`},pr=e=>We(e)?`transform 250ms ease`:void 0,mr=(0,K.forwardRef)((e,t)=>{let{as:n,activatorEvent:r,adjustScale:i,children:a,className:o,rect:s,style:c,transform:l,transition:u=pr}=e;if(!s)return null;let d=i?l:{...l,scaleX:1,scaleY:1},f={...fr,width:s.width,height:s.height,top:s.top,left:s.left,transform:qe.Transform.toString(d),transformOrigin:i&&r?lt(r,s):void 0,transition:typeof u==`function`?u(r):u,...c};return K.createElement(n,{className:o,style:f,ref:t},a)}),hr={duration:250,easing:`ease`,keyframes:e=>{let{transform:{initial:t,final:n}}=e;return[{transform:qe.Transform.toString(t)},{transform:qe.Transform.toString(n)}]},sideEffects:(e=>t=>{let{active:n,dragOverlay:r}=t,i={},{styles:a,className:o}=e;if(a!=null&&a.active)for(let[e,t]of Object.entries(a.active))t!==void 0&&(i[e]=n.node.style.getPropertyValue(e),n.node.style.setProperty(e,t));if(a!=null&&a.dragOverlay)for(let[e,t]of Object.entries(a.dragOverlay))t!==void 0&&r.node.style.setProperty(e,t);return o!=null&&o.active&&n.node.classList.add(o.active),o!=null&&o.dragOverlay&&r.node.classList.add(o.dragOverlay),function(){for(let[e,t]of Object.entries(i))n.node.style.setProperty(e,t);o!=null&&o.active&&n.node.classList.remove(o.active)}})({styles:{active:{opacity:`0`}}})};function gr(e){let{config:t,draggableNodes:n,droppableContainers:r,measuringConfiguration:i}=e;return Me((e,a)=>{if(t===null)return;let o=n.get(e);if(!o)return;let s=o.node.current;if(!s)return;let c=In(a);if(!c)return;let{transform:l}=Y(a).getComputedStyle(a),u=vt(l);if(!u)return;let d=typeof t==`function`?t:_r(t);return Bt(s,i.draggable.measure),d({active:{id:e,data:o.data,node:s,rect:i.draggable.measure(s)},draggableNodes:n,dragOverlay:{node:a,rect:i.dragOverlay.measure(c)},droppableContainers:r,measuringConfiguration:i,transform:u})})}function _r(e){let{duration:t,easing:n,sideEffects:r,keyframes:i}={...hr,...e};return e=>{let{active:a,dragOverlay:o,transform:s,...c}=e;if(!t)return;let l={x:o.rect.left-a.rect.left,y:o.rect.top-a.rect.top},u={scaleX:s.scaleX===1?1:a.rect.width*s.scaleX/o.rect.width,scaleY:s.scaleY===1?1:a.rect.height*s.scaleY/o.rect.height},d={x:s.x-l.x,y:s.y-l.y,...u},f=i({...c,active:a,dragOverlay:o,transform:{initial:s,final:d}}),[p]=f,m=f[f.length-1];if(JSON.stringify(p)===JSON.stringify(m))return;let h=r?.({active:a,dragOverlay:o,...c}),g=o.node.animate(f,{duration:t,easing:n,fill:`forwards`});return new Promise(e=>{g.onfinish=()=>{h?.(),e()}})}}var vr=0;function yr(e){return(0,K.useMemo)(()=>{if(e!=null)return vr++,vr},[e])}var br=K.memo(e=>{let{adjustScale:t=!1,children:n,dropAnimation:r,style:i,transition:a,modifiers:o,wrapperElement:s=`div`,className:c,zIndex:l=999}=e,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggableNodes:m,droppableContainers:h,dragOverlay:g,over:_,measuringConfiguration:v,scrollableAncestors:y,scrollableAncestorRects:b,windowRect:x}=ar(),S=(0,K.useContext)(Qn),C=yr(d?.id),w=Yn(o,{activatorEvent:u,active:d,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:g.rect,over:_,overlayNodeRect:g.rect,scrollableAncestors:y,scrollableAncestorRects:b,transform:S,windowRect:x}),T=bn(f),E=gr({config:r,draggableNodes:m,droppableContainers:h,measuringConfiguration:v}),D=T?g.setRef:void 0;return K.createElement(dr,null,K.createElement(lr,{animation:E},d&&C?K.createElement(mr,{key:C,id:d.id,ref:D,as:s,activatorEvent:u,adjustScale:t,className:c,transition:a,rect:T,style:{zIndex:l,...i},transform:w},n):null))});function xr(e,t,n){let r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function Sr(e,t){return e.reduce((e,n,r)=>{let i=t.get(n);return i&&(e[r]=i),e},Array(e.length))}function Cr(e){return e!==null&&e>=0}function wr(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Tr(e){return typeof e==`boolean`?{draggable:e,droppable:e}:e}var Er=e=>{let{rects:t,activeIndex:n,overIndex:r,index:i}=e,a=xr(t,r,n),o=t[i],s=a[i];return!s||!o?null:{x:s.left-o.left,y:s.top-o.top,scaleX:s.width/o.width,scaleY:s.height/o.height}},Dr={scaleX:1,scaleY:1},Or=e=>{let{activeIndex:t,activeNodeRect:n,index:r,rects:i,overIndex:a}=e,o=i[t]??n;if(!o)return null;if(r===t){let e=i[a];return e?{x:0,y:t<a?e.top+e.height-(o.top+o.height):e.top-o.top,...Dr}:null}let s=kr(i,r,t);return r>t&&r<=a?{x:0,y:-o.height-s,...Dr}:r<t&&r>=a?{x:0,y:o.height+s,...Dr}:{x:0,y:0,...Dr}};function kr(e,t,n){let r=e[t],i=e[t-1],a=e[t+1];return r?n<t?i?r.top-(i.top+i.height):a?a.top-(r.top+r.height):0:a?a.top-(r.top+r.height):i?r.top-(i.top+i.height):0:0}var Ar=`Sortable`,jr=K.createContext({activeIndex:-1,containerId:Ar,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Er,disabled:{draggable:!1,droppable:!1}});function Mr(e){let{children:t,id:n,items:r,strategy:i=Er,disabled:a=!1}=e,{active:o,dragOverlay:s,droppableRects:c,over:l,measureDroppableContainers:u}=ar(),d=ze(Ar,n),f=s.rect!==null,p=(0,K.useMemo)(()=>r.map(e=>typeof e==`object`&&`id`in e?e.id:e),[r]),m=o!=null,h=o?p.indexOf(o.id):-1,g=l?p.indexOf(l.id):-1,_=(0,K.useRef)(p),v=!wr(p,_.current),y=g!==-1&&h===-1||v,b=Tr(a);je(()=>{v&&m&&u(p)},[v,p,m,u]),(0,K.useEffect)(()=>{_.current=p},[p]);let x=(0,K.useMemo)(()=>({activeIndex:h,containerId:d,disabled:b,disableTransforms:y,items:p,overIndex:g,useDragOverlay:f,sortedRects:Sr(p,c),strategy:i}),[h,d,b.draggable,b.droppable,y,p,g,c,f,i]);return K.createElement(jr.Provider,{value:x},t)}var Nr=e=>{let{id:t,items:n,activeIndex:r,overIndex:i}=e;return xr(n,r,i).indexOf(t)},Pr=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:i,items:a,newIndex:o,previousItems:s,previousContainerId:c,transition:l}=e;return!l||!r||s!==a&&i===o?!1:n?!0:o!==i&&t===c},Fr={duration:200,easing:`ease`},Ir=`transform`,Lr=qe.Transition.toString({property:Ir,duration:0,easing:`linear`}),Rr={roleDescription:`sortable`};function zr(e){let{disabled:t,index:n,node:r,rect:i}=e,[a,o]=(0,K.useState)(null),s=(0,K.useRef)(n);return je(()=>{if(!t&&n!==s.current&&r.current){let e=i.current;if(e){let t=xt(r.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&o(n)}}n!==s.current&&(s.current=n)},[t,n,r,i]),(0,K.useEffect)(()=>{a&&o(null)},[a]),a}function Br(e){let{animateLayoutChanges:t=Pr,attributes:n,disabled:r,data:i,getNewIndex:a=Nr,id:o,strategy:s,resizeObserverConfig:c,transition:l=Fr}=e,{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:m,sortedRects:h,overIndex:g,useDragOverlay:_,strategy:v}=(0,K.useContext)(jr),y=Vr(r,p),b=u.indexOf(o),x=(0,K.useMemo)(()=>({sortable:{containerId:d,index:b,items:u},...i}),[d,i,b,u]),S=(0,K.useMemo)(()=>u.slice(u.indexOf(o)),[u,o]),{rect:C,node:w,isOver:T,setNodeRef:E}=cr({id:o,data:x,disabled:y.droppable,resizeObserverConfig:{updateMeasurementsFor:S,...c}}),{active:D,activatorEvent:ee,activeNodeRect:O,attributes:te,setNodeRef:ne,listeners:k,isDragging:re,over:A,setActivatorNodeRef:ie,transform:j}=ir({id:o,data:x,attributes:{...Rr,...n},disabled:y.draggable}),M=J(E,ne),N=!!D,P=N&&!m&&Cr(f)&&Cr(g),F=!_&&re,ae=P?(F&&P?j:null)??(s??v)({rects:h,activeNodeRect:O,activeIndex:f,overIndex:g,index:b}):null,I=Cr(f)&&Cr(g)?a({id:o,items:u,activeIndex:f,overIndex:g}):b,L=D?.id,R=(0,K.useRef)({activeId:L,items:u,newIndex:I,containerId:d}),oe=u!==R.current.items,z=t({active:D,containerId:d,isDragging:re,isSorting:N,id:o,index:b,items:u,newIndex:R.current.newIndex,previousItems:R.current.items,previousContainerId:R.current.containerId,transition:l,wasDragging:R.current.activeId!=null}),B=zr({disabled:!z,index:b,node:w,rect:C});return(0,K.useEffect)(()=>{N&&R.current.newIndex!==I&&(R.current.newIndex=I),d!==R.current.containerId&&(R.current.containerId=d),u!==R.current.items&&(R.current.items=u)},[N,I,d,u]),(0,K.useEffect)(()=>{if(L===R.current.activeId)return;if(L!=null&&R.current.activeId==null){R.current.activeId=L;return}let e=setTimeout(()=>{R.current.activeId=L},50);return()=>clearTimeout(e)},[L]),{active:D,activeIndex:f,attributes:te,data:x,rect:C,index:b,newIndex:I,items:u,isOver:T,isSorting:N,isDragging:re,listeners:k,node:w,overIndex:g,over:A,setNodeRef:M,setActivatorNodeRef:ie,setDroppableNodeRef:E,setDraggableNodeRef:ne,transform:B??ae,transition:se()};function se(){if(B||oe&&R.current.newIndex===b)return Lr;if(!(F&&!We(ee)||!l)&&(N||z))return qe.Transition.toString({...l,property:Ir})}}function Vr(e,t){return typeof e==`boolean`?{draggable:e,droppable:!1}:{draggable:e?.draggable??t.draggable,droppable:e?.droppable??t.droppable}}$.Down,$.Right,$.Up,$.Left;var Hr=[{status:`backlog`,label:`Backlog`,description:`New finding families discovered by the pipeline.`},{status:`todo`,label:`Todo`,description:`Queued for a worker or follow-up pass.`},{status:`in_progress`,label:`In Progress`,description:`Autonomous execution is actively running now.`},{status:`blocked`,label:`Blocked`,description:`Needs more access, context, or a better PoC.`},{status:`done`,label:`Done`,description:`Accepted, verified, or reported.`},{status:`cancelled`,label:`Cancelled`,description:`Suppressed or resolved as false positive.`}];function Ur({groups:e,selectedFingerprint:t,pendingFingerprint:n,onSelect:r,onMove:i}){let[a,o]=(0,K.useState)(null),s=ct(st(nn,{activationConstraint:{distance:6}})),c=(0,K.useMemo)(()=>{let t=new Map;for(let e of Hr)t.set(e.status,[]);for(let n of e)t.get(n.workflow.phase)?.push(n);return t},[e]),l=(0,K.useMemo)(()=>a?e.find(e=>e.fingerprint===a)??null:null,[a,e]);function u(e){o(String(e.active.id))}function d(t){o(null);let{active:n,over:r}=t;if(!r)return;let a=String(n.id),s=e.find(e=>e.fingerprint===a);if(!s)return;let c=null,l=String(r.id);if(Hr.some(e=>e.status===l))c=l;else{let t=e.find(e=>e.fingerprint===l);t&&(c=t.workflow.phase)}c&&c!==s.workflow.phase&&i(a,c)}return(0,q.jsxs)(b,{className:`overflow-hidden`,children:[(0,q.jsx)(h,{className:`border-b border-border`,children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(T,{children:`Finding board`}),(0,q.jsx)(v,{className:`mt-2`,children:`Finding workflow board`}),(0,q.jsx)(m,{children:`Use this secondary view only when the queue does not make the next action clear.`})]})}),(0,q.jsx)(C,{className:`px-0 pb-0`,children:(0,q.jsxs)(er,{sensors:s,onDragStart:u,onDragEnd:d,children:[(0,q.jsx)(`div`,{className:`overflow-x-auto pb-4`,children:(0,q.jsx)(`div`,{className:`flex min-w-max gap-4 px-6 pb-6`,children:Hr.map(e=>(0,q.jsx)(Wr,{column:e,groups:c.get(e.status)??[],selectedFingerprint:t,pendingFingerprint:n??null,onSelect:r},e.status))})}),(0,q.jsx)(br,{children:l?(0,q.jsx)(Gr,{group:l,selected:t===l.fingerprint,onSelect:r,isOverlay:!0}):null})]})})]})}function Wr({column:e,groups:t,selectedFingerprint:n,pendingFingerprint:r,onSelect:i}){let{setNodeRef:a,isOver:o}=cr({id:e.status});return(0,q.jsxs)(`section`,{className:`flex w-[20rem] shrink-0 flex-col gap-3`,children:[(0,q.jsx)(`div`,{className:`rounded-md border border-border bg-muted/25 px-3 py-3`,children:(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(`div`,{className:`text-xs font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:e.label}),(0,q.jsx)(`p`,{className:`mt-1 text-xs leading-5 text-muted-foreground`,children:e.description})]}),(0,q.jsx)(`div`,{className:`rounded-sm border border-border bg-background px-2 py-1 text-xs text-muted-foreground`,children:t.length})]})}),(0,q.jsxs)(`div`,{ref:a,className:_(`flex min-h-[20rem] flex-col gap-3 rounded-md border border-dashed border-border bg-muted/15 p-2 transition-colors`,o&&`border-primary/40 bg-primary/7`),children:[(0,q.jsx)(Mr,{items:t.map(e=>e.fingerprint),strategy:Or,children:t.map(e=>(0,q.jsx)(Gr,{group:e,selected:n===e.fingerprint,saving:r===e.fingerprint,onSelect:i},e.fingerprint))}),t.length===0?(0,q.jsx)(`div`,{className:`flex flex-1 items-center justify-center rounded-md border border-dashed border-border/70 bg-background/70 px-4 py-8 text-center text-xs text-muted-foreground`,children:`Drop a finding family here.`}):null]})]})}function Gr({group:e,selected:t,saving:n=!1,onSelect:r,isOverlay:i=!1}){let{attributes:a,listeners:o,setNodeRef:s,transform:c,transition:l,isDragging:u}=Br({id:e.fingerprint,data:{group:e}}),d={transform:qe.Transform.toString(c),transition:l},f=n?`Syncing workflow update...`:e.workflow.updatedAt?`Updated ${new Date(e.workflow.updatedAt).toLocaleString()}`:`No workflow activity yet`,p=e.workflow.assignee??e.workflow.activeAgentRoles[0]??`Unassigned`,m=e.workflow.persistedStatus!==e.workflow.phase&&e.workflow.persistedStatus!==e.workflow.reviewGate,h=e.workflow.reviewGate===`human_review`?`Waiting on human review`:e.workflow.reviewGate===`agent_review`?`Waiting on agent review`:e.workflow.phase===`in_progress`?`Execution running`:e.workflow.phase===`blocked`?`Blocked`:`${e.count} hit${e.count>1?`s`:``} · ${e.scanCount} scan${e.scanCount>1?`s`:``}`;return(0,q.jsxs)(`button`,{ref:s,type:`button`,style:d,onClick:()=>r(e.fingerprint),...a,...o,className:_(`rounded-md border border-border bg-card p-3 text-left transition-[border-color,background-color,box-shadow]`,`cursor-grab active:cursor-grabbing hover:border-primary/20 hover:bg-primary/4 hover:shadow-sm`,t&&`border-primary/35 bg-primary/6 shadow-sm ring-1 ring-primary/15`,u&&!i&&`opacity-30`,i&&`shadow-lg ring-1 ring-primary/20`,n&&`border-primary/30 bg-primary/6`),children:[(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,q.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground`,children:[(0,q.jsx)(_e,{className:`size-3.5`}),e.latest.category,t?(0,q.jsx)(`span`,{className:`rounded-sm bg-primary/10 px-1.5 py-0.5 text-primary-text`,children:`Open`}):null]}),(0,q.jsx)(`div`,{className:`line-clamp-2 text-sm font-semibold leading-5 text-foreground`,children:e.latest.title}),(0,q.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:h})]}),(0,q.jsx)(B,{severity:e.latest.severity})]}),(0,q.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[e.workflow.reviewGate===`none`?null:(0,q.jsx)(F,{value:e.workflow.reviewGate}),(0,q.jsx)(oe,{value:e.workflow.consensus}),(0,q.jsx)(M,{value:e.workflow.evidenceSignal}),m?(0,q.jsx)(L,{value:e.workflow.persistedStatus}):null]}),(0,q.jsxs)(`div`,{className:`mt-3 grid gap-2 text-xs text-muted-foreground sm:grid-cols-3`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-sm bg-muted/35 px-2.5 py-2`,children:[(0,q.jsx)(ye,{className:`size-3.5`}),(0,q.jsxs)(`span`,{children:[e.count,` hit`,e.count>1?`s`:``]})]}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-sm bg-muted/35 px-2.5 py-2`,children:[(0,q.jsx)(xe,{className:`size-3.5`}),(0,q.jsx)(`span`,{children:p})]}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2 rounded-sm bg-muted/35 px-2.5 py-2`,children:[(0,q.jsx)(D,{className:`size-3.5`}),(0,q.jsx)(`span`,{children:f})]})]})]})}function Kr({className:e,...t}){return(0,q.jsx)(`textarea`,{"data-slot":`textarea`,className:_(`flex field-sizing-content min-h-16 w-full resize-none rounded-md border border-input bg-background px-3 py-3 text-base transition-[color,box-shadow,border-color] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function qr(e,t){if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return n?JSON.parse(n):t}catch{return t}}function Jr(e,t){let[n,r]=(0,K.useState)(()=>qr(e,t));return(0,K.useEffect)(()=>{try{window.localStorage.setItem(e,JSON.stringify(n))}catch{}},[e,n]),[n,r]}var Yr=[{value:`backlog`,label:`Backlog`},{value:`todo`,label:`Todo`},{value:`in_progress`,label:`In progress`},{value:`blocked`,label:`Blocked`},{value:`done`,label:`Done`},{value:`cancelled`,label:`Cancelled`}],Xr=[{value:`all`,label:`All consensus`},{value:`pending`,label:`Pending`},{value:`verified`,label:`Verified`},{value:`disputed`,label:`Disputed`},{value:`false-positive`,label:`False positive`}],Zr={search:``,workflowFilter:`all`,reviewFilter:`all`,severityFilter:`all`,consensusFilter:`all`,assigneeFilter:`all`,activeOnly:!1,viewMode:`inbox`,queueSort:`attention`};function Qr(e,t){return[e.latest.title,e.latest.category,e.latest.severity,e.latest.triageStatus,e.workflow.status,e.workflow.phase,e.workflow.reviewGate,e.workflow.persistedStatus,e.workflow.recommendedStatus,e.workflow.reviewReason??``,e.workflow.consensus,e.workflow.assignee??``,e.workflow.activeAgentRoles.join(` `),e.fingerprint].join(` `).toLowerCase().includes(t)}function $r(e,t){let n=t.workflowAssignee.trim()||null,r=t.workflowStatus===`done`||t.workflowStatus===`cancelled`?t.workflowStatus:e.recommendedStatus,i=t.optimisticStatus??(t.workflowStatus===`done`||t.workflowStatus===`cancelled`?t.workflowStatus:e.status),a=_i(t.workflowStatus);return{...e,status:i,persistedStatus:t.workflowStatus,recommendedStatus:r,phase:a,assignee:n,updatedAt:new Date().toISOString()}}function ei(e,t){return{...e,groups:e.groups.map(e=>e.fingerprint===t.fingerprint?{...e,latest:{...e.latest,workflowStatus:t.workflowStatus,workflowAssignee:t.workflowAssignee.trim()||null,workflowUpdatedAt:new Date().toISOString()},workflow:$r(e.workflow,t)}:e)}}function ti(e,t){return e.fingerprint===t.fingerprint?{...e,latest:{...e.latest,workflowStatus:t.workflowStatus,workflowAssignee:t.workflowAssignee.trim()||null,workflowUpdatedAt:new Date().toISOString()},workflow:$r(e.workflow,t)}:e}function ni({dashboard:t}){let{fingerprint:r}=n(),i=e(),l=d(),{openPanel:f,clearPanel:p}=he(),[g,_]=(0,K.useState)(null),[x,D]=Jr(`0:threads:console-state`,Zr),{search:O,workflowFilter:k,reviewFilter:A,severityFilter:ie,consensusFilter:j,assigneeFilter:M,activeOnly:N,viewMode:P,queueSort:F}=x,[ae,I]=(0,K.useState)(!1),L=(0,K.useDeferredValue)(O),R=(0,K.useMemo)(()=>[`all`,...new Set(t.groups.map(e=>e.latest.severity.toLowerCase()))],[t.groups]),oe=(0,K.useMemo)(()=>[`all`,...new Set(t.groups.map(e=>e.workflow.assignee).filter(Boolean))],[t.groups]),z=(0,K.useMemo)(()=>{let e=new Set;for(let n of t.groups){n.workflow.assignee&&e.add(n.workflow.assignee);for(let t of n.workflow.activeAgentRoles)e.add(t)}return[...e].sort((e,t)=>e.localeCompare(t))},[t.groups]),B=(0,K.useMemo)(()=>{let e=L.trim().toLowerCase();return t.groups.filter(t=>!(e&&!Qr(t,e)||k!==`all`&&t.workflow.phase!==k||A!==`all`&&t.workflow.reviewGate!==A||ie!==`all`&&t.latest.severity.toLowerCase()!==ie||j!==`all`&&t.workflow.consensus!==j||M!==`all`&&(t.workflow.assignee??``)!==M&&!t.workflow.activeAgentRoles.includes(M)||N&&t.workflow.activeAgentRoles.length===0))},[N,M,j,t.groups,L,A,ie,k]),H=(0,K.useMemo)(()=>B.filter(e=>e.workflow.reviewGate!==`none`),[B]),U=(0,K.useMemo)(()=>{let e=[...B];return e.sort((e,t)=>F===`newest`?t.latest.timestamp-e.latest.timestamp:F===`severity`?hi(t.latest.severity)-hi(e.latest.severity):gi(t)-gi(e)),e},[B,F]),me=(0,K.useMemo)(()=>U.filter(e=>e.workflow.reviewGate===`none`&&(e.workflow.phase===`todo`||e.workflow.phase===`backlog`)),[U]),ge=(0,K.useMemo)(()=>U.filter(e=>e.workflow.phase===`in_progress`||e.workflow.activeAgentRoles.length>0),[U]),_e=(0,K.useMemo)(()=>U.filter(e=>e.workflow.phase===`blocked`),[U]),ve=(0,K.useMemo)(()=>H.filter(e=>e.workflow.reviewGate===`agent_review`),[H]),ye=(0,K.useMemo)(()=>H.filter(e=>e.workflow.reviewGate===`human_review`),[H]),xe=P===`review`?H:P===`board`?B:U,G=r??null,Se=s({queryKey:[`finding-family`,G],queryFn:()=>c(G),enabled:!!G}),Ce=u({mutationFn:({triageStatus:e,triageNote:t})=>o(G,e,t),onSuccess:async()=>{await Promise.all([l.invalidateQueries({queryKey:[`dashboard`]}),l.invalidateQueries({queryKey:[`finding-family`,G]})])}}),J=u({mutationFn:({fingerprint:e,workflowStatus:t,workflowAssignee:n})=>a(e,t,n),onMutate:async e=>{await Promise.all([l.cancelQueries({queryKey:[`dashboard`]}),l.cancelQueries({queryKey:[`finding-family`,e.fingerprint]})]);let t=l.getQueryData([`dashboard`]),n=l.getQueryData([`finding-family`,e.fingerprint]);return l.setQueryData([`dashboard`],t=>t&&ei(t,e)),l.setQueryData([`finding-family`,e.fingerprint],t=>t&&ti(t,e)),{previousDashboard:t,previousFamily:n,fingerprint:e.fingerprint}},onError:(e,t,n)=>{n?.previousDashboard&&l.setQueryData([`dashboard`],n.previousDashboard),n?.previousFamily&&l.setQueryData([`finding-family`,n.fingerprint],n.previousFamily)},onSettled:async(e,t,n)=>{await Promise.all([l.invalidateQueries({queryKey:[`dashboard`]}),l.invalidateQueries({queryKey:[`finding-family`,n.fingerprint]})])}}),we=t.groups.find(e=>e.fingerprint===G)??null,Te=xe.some(e=>e.fingerprint===G),Ee=O.trim().length>0||k!==`all`||A!==`all`||ie!==`all`||j!==`all`||M!==`all`||N,Y=[k===`all`?null:Yr.find(e=>e.value===k)?.label??k,A===`all`?null:A.replaceAll(`_`,` `),ie===`all`?null:ie,j===`all`?null:j.replaceAll(`-`,` `),M===`all`?null:M,N?`active agents`:null].filter(Boolean),De=P===`review`?`${H.length} review families`:P===`board`?`${B.length} board families`:`${U.length} queued families`;function Oe(){D(e=>({...e,search:``,workflowFilter:`all`,reviewFilter:`all`,severityFilter:`all`,consensusFilter:`all`,assigneeFilter:`all`,activeOnly:!1}))}return(0,K.useEffect)(()=>{G!==g&&_(null)},[g,G]),(0,K.useEffect)(()=>{if(!G||G===g){p();return}let e;return e=Se.isLoading?(0,q.jsx)(ue,{label:`Finding detail`}):Se.error?(0,q.jsx)(V,{error:Se.error}):Se.data?(0,q.jsx)(ri,{data:Se.data,assigneeSuggestions:z,selectedSummary:we?.workflow??null,reviewMode:P===`review`,isSaving:Ce.isPending||J.isPending,onTriage:(e,t)=>Ce.mutate({triageStatus:e,triageNote:t}),onWorkflow:(e,t,n,r)=>J.mutate({fingerprint:e,workflowStatus:t,workflowAssignee:n,optimisticStatus:r})}):(0,q.jsx)(W,{title:`Finding unavailable`,body:`The selected finding family could not be loaded from the local database.`}),f({title:we?.latest.title??`Finding detail`,description:`Inspect this finding family as one execution record with ownership, evidence, chat handoff, and review posture.`,content:(0,q.jsx)(`div`,{className:`p-6`,children:e}),onClose:()=>{_(G),i(`/findings`)}}),()=>{p()}},[z,p,Se.data,Se.error,Se.isLoading,i,f,G,we?.latest.title,we?.workflow,g,Ce.isPending,J.isPending,P]),(0,q.jsxs)(`div`,{className:`space-y-6`,children:[(0,q.jsx)(se,{eyebrow:`Findings`,title:`Findings workspace`,summary:`A finding family groups repeated observations across runs. Start from evidence and the recommended next action; use the scoped chat workspace when the case needs judgment.`,actions:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(y,{variant:`outline`,onClick:()=>I(!0),children:[(0,q.jsx)(be,{className:`size-4`}),`Filters`,Ee?(0,q.jsx)(S,{variant:`neutral`,children:Y.length+ +!!O.trim()}):null]}),G?(0,q.jsx)(y,{variant:`outline`,onClick:()=>i(`/findings`),children:`Close finding`}):null]})}),(0,q.jsxs)(b,{children:[(0,q.jsx)(h,{children:(0,q.jsxs)(`div`,{className:`space-y-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(T,{children:`Work queues`}),(0,q.jsx)(v,{className:`mt-2`,children:`Start with what needs a decision`}),(0,q.jsx)(m,{children:`Keep autonomous execution separate from evidence review. The board remains a secondary view, not a second workflow to maintain.`})]}),(0,q.jsx)(ne,{value:P,onValueChange:e=>D(t=>({...t,viewMode:e})),children:(0,q.jsxs)(te,{children:[(0,q.jsx)(ee,{value:`inbox`,children:`Queue`}),(0,q.jsx)(ee,{value:`review`,children:`Review`}),(0,q.jsx)(ee,{value:`board`,children:`Board`})]})})]})}),(0,q.jsxs)(C,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-4`,children:[(0,q.jsx)(ci,{label:`Ready now`,value:`${me.length}`,meta:`Queued for the next autonomous step.`}),(0,q.jsx)(ci,{label:`Running now`,value:`${ge.length}`,meta:`Finding families with live worker activity.`}),(0,q.jsx)(ci,{label:`Blocked`,value:`${_e.length}`,meta:`Need more access, context, or a better PoC.`}),(0,q.jsx)(ci,{label:`Review`,value:`${H.length}`,meta:`Waiting on agent or human sign-off.`})]})]}),(0,q.jsx)(b,{size:`sm`,children:(0,q.jsxs)(C,{className:`space-y-4`,children:[(0,q.jsxs)(`div`,{className:`grid gap-3 lg:grid-cols-[minmax(0,1fr)_auto] lg:items-center`,children:[(0,q.jsxs)(`div`,{className:`relative`,children:[(0,q.jsx)(re,{className:`pointer-events-none absolute top-1/2 left-3 size-4 -translate-y-1/2 text-muted-foreground`}),(0,q.jsx)(w,{value:O,onChange:e=>D(t=>({...t,search:e.target.value})),placeholder:`Search findings, workflow state, assignee, severity, consensus, or fingerprint`,className:`pl-9`})]}),(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm text-muted-foreground`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(E,{className:`size-4`}),De]}),(0,q.jsxs)(S,{variant:`neutral`,children:[t.groups.length,` total`]}),G?(0,q.jsx)(S,{variant:Te?`accent`:`warning`,children:Te?`Finding open`:`Selected finding hidden by filters`}):null]})]}),Ee||O.trim()?(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[O.trim()?(0,q.jsxs)(S,{variant:`outline`,children:[`query: `,O.trim()]}):null,Y.map(e=>(0,q.jsx)(S,{variant:`outline`,children:e},e)),(0,q.jsx)(y,{variant:`ghost`,size:`sm`,onClick:Oe,children:`Clear filters`})]}):null]})}),(0,q.jsx)(`div`,{className:`min-w-0 space-y-4`,children:P===`board`?(0,q.jsx)(Ur,{groups:B,selectedFingerprint:G,pendingFingerprint:J.isPending?J.variables?.fingerprint??null:null,onSelect:e=>i(`/findings/${e}`),onMove:(e,n)=>{G!==e&&i(`/findings/${e}`),J.mutate({fingerprint:e,workflowStatus:n,workflowAssignee:t.groups.find(t=>t.fingerprint===e)?.workflow.assignee??``,optimisticStatus:n})}}):P===`review`?(0,q.jsx)(ai,{agentReviewGroups:ve,humanReviewGroups:ye,selectedFingerprint:G,pendingFingerprint:J.isPending?J.variables?.fingerprint??null:null,onSelect:e=>i(`/findings/${e}`)}):(0,q.jsx)(ii,{groups:U,readyGroups:me,activeGroups:ge,blockedGroups:_e,selectedFingerprint:G,queueSort:F,pendingFingerprint:J.isPending?J.variables?.fingerprint??null:null,onSortChange:e=>D(t=>({...t,queueSort:e})),onSelect:e=>i(`/findings/${e}`)})}),(0,q.jsx)(de,{open:ae,onOpenChange:I,children:(0,q.jsxs)(pe,{side:`right`,className:`w-full overflow-y-auto p-0 sm:max-w-xl`,children:[(0,q.jsxs)(ce,{className:`border-b border-border pr-12`,children:[(0,q.jsx)(fe,{children:`Finding filters`}),(0,q.jsx)(le,{children:`Scope finding families by phase, review gate, severity, ownership, or live worker activity.`})]}),(0,q.jsxs)(`div`,{className:`space-y-5 p-6`,children:[(0,q.jsxs)(`label`,{className:`block space-y-2`,children:[(0,q.jsx)(T,{children:`Search`}),(0,q.jsx)(w,{value:O,onChange:e=>D(t=>({...t,search:e.target.value})),placeholder:`Search workflow, evidence, assignee, or fingerprint`})]}),(0,q.jsxs)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:[(0,q.jsxs)(vi,{label:`Workflow`,children:[(0,q.jsx)(yi,{active:k===`all`,onClick:()=>D(e=>({...e,workflowFilter:`all`})),children:`All phases`}),Yr.map(e=>(0,q.jsx)(yi,{active:k===e.value,onClick:()=>D(t=>({...t,workflowFilter:e.value})),children:e.label},e.value))]}),(0,q.jsxs)(vi,{label:`Review gate`,children:[(0,q.jsx)(yi,{active:A===`all`,onClick:()=>D(e=>({...e,reviewFilter:`all`})),children:`All review states`}),(0,q.jsx)(yi,{active:A===`agent_review`,onClick:()=>D(e=>({...e,reviewFilter:`agent_review`})),children:`Agent review`}),(0,q.jsx)(yi,{active:A===`human_review`,onClick:()=>D(e=>({...e,reviewFilter:`human_review`})),children:`Human review`})]}),(0,q.jsx)(vi,{label:`Severity`,children:R.map(e=>(0,q.jsx)(yi,{active:ie===e,onClick:()=>D(t=>({...t,severityFilter:e})),children:e===`all`?`All severities`:e[0]?.toUpperCase()+e.slice(1)},e))}),(0,q.jsx)(vi,{label:`Consensus`,children:Xr.map(e=>(0,q.jsx)(yi,{active:j===e.value,onClick:()=>D(t=>({...t,consensusFilter:e.value})),children:e.label},e.value))}),(0,q.jsxs)(vi,{label:`Ownership`,className:`md:col-span-2`,children:[(0,q.jsx)(yi,{active:M===`all`,onClick:()=>D(e=>({...e,assigneeFilter:`all`})),children:`All assignees`}),oe.filter(e=>e!==`all`).map(e=>(0,q.jsx)(yi,{active:M===e,onClick:()=>D(t=>({...t,assigneeFilter:e})),children:e},e)),(0,q.jsx)(yi,{active:N,onClick:()=>D(e=>({...e,activeOnly:!e.activeOnly})),children:`Active agents only`})]})]}),(0,q.jsxs)(`div`,{className:`flex items-center justify-between gap-3 border-t border-border pt-4`,children:[(0,q.jsxs)(`div`,{className:`text-sm text-muted-foreground`,children:[xe.length,` of `,t.groups.length,` finding families visible`]}),(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(y,{variant:`ghost`,size:`sm`,onClick:Oe,children:`Reset`}),(0,q.jsx)(y,{size:`sm`,onClick:()=>I(!1),children:`Apply`})]})]})]})]})})]})}function ri({data:e,assigneeSuggestions:t,selectedSummary:n,reviewMode:r,onTriage:i,onWorkflow:a,isSaving:o}){let[s,c]=(0,K.useState)(e.latest.triageNote??``),[u,d]=(0,K.useState)(e.workflow.assignee??``),[f,p]=(0,K.useState)(null),g=`assignee-suggestions-${e.fingerprint}`,_=(0,K.useMemo)(()=>{let n=new Set;e.workflow.assignee&&n.add(e.workflow.assignee);for(let t of e.workflow.activeAgentRoles)n.add(t);for(let e of t)n.add(e);return[...n].slice(0,8)},[t,e.workflow.activeAgentRoles,e.workflow.assignee]),x=e.workItems.find(e=>e.status===`in_progress`)??null,E=e.workItems.find(e=>e.status===`blocked`)??null,D=e.workItems.find(e=>e.status===`todo`||e.status===`backlog`)??null,re=x?.owner??e.workflow.assignee??e.workflow.activeAgentRoles[0]??E?.owner??`Unassigned`,L=E?`Execution is blocked.`:x?`Execution is actively running.`:D?`Execution is queued for the next step.`:e.workflow.reviewGate===`none`?`Execution has no active work item yet.`:`Execution is waiting on review.`,se=E?E.summary||e.workflow.reviewReason||`A blocked step needs operator intervention.`:x?x.summary||e.workflow.reviewReason||`An agent-owned execution step is in progress.`:D?D.summary||`The next queued step is ready to run.`:e.workflow.reviewReason||`No explicit runbook activity is available yet.`,ce=e.case?.targetType===`repository`&&e.workflow.consensus===`verified`?`draft_fix`:e.workflow.reviewGate===`human_review`?`verify`:`investigate`,V=e.consoleCommand.replace(`--finding-intent investigate`,`--finding-intent ${ce}`),le=ce===`draft_fix`?`Plan a source fix in chat`:ce===`verify`?`Review the evidence in chat`:`Investigate in chat`,ue=ce===`draft_fix`?`The chat will establish root cause and propose a patch and regression test. It cannot apply a patch from this handoff.`:ce===`verify`?`The chat will independently assess the evidence before you accept or suppress this finding.`:`The chat starts with this finding's evidence and asks for the next smallest authorized step.`,de=async()=>{try{if(!navigator.clipboard?.writeText)throw Error(`Clipboard access is unavailable.`);await navigator.clipboard.writeText(V),p(`Copied. Run the command in a terminal to continue with the same finding context.`)}catch{p(`Copy is unavailable here. Select the command below and run it in a terminal.`)}};return(0,K.useEffect)(()=>{c(e.latest.triageNote??``)},[e.fingerprint,e.latest.triageNote]),(0,K.useEffect)(()=>{d(e.workflow.assignee??``)},[e.fingerprint,e.workflow.assignee]),(0,K.useEffect)(()=>{p(null)},[e.fingerprint]),(0,q.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[(0,q.jsxs)(k,{className:r?`order-2`:`order-1`,eyebrow:r?`Review`:`Operator`,title:r?e.workflow.reviewGate===`human_review`?`Evidence and disposition`:`Evidence and next action`:`Finding controls`,description:r?`Inspect the evidence first. Operator controls remain available after the review record.`:`Review evidence, route the next action into the console, and make a final disposition only when the proof is sufficient.`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,q.jsx)(B,{severity:e.latest.severity}),(0,q.jsx)(j,{value:e.workflow.phase}),(0,q.jsx)(F,{value:e.workflow.reviewGate}),(0,q.jsx)(oe,{value:e.workflow.consensus}),(0,q.jsx)(M,{value:e.workflow.evidenceSignal}),(0,q.jsx)(N,{value:e.latest.triageStatus})]}),(0,q.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-2 xl:grid-cols-3`,children:[(0,q.jsx)(di,{label:`Case`,value:e.case?.target??`Unlinked`}),(0,q.jsx)(di,{label:`Case type`,value:e.case?mi(e.case.targetType):`Unknown`}),(0,q.jsx)(di,{label:`Fingerprint`,value:e.fingerprint,mono:!0}),(0,q.jsx)(di,{label:`Category`,value:e.latest.category}),(0,q.jsx)(di,{label:`Occurrences`,value:String(e.rows.length)}),(0,q.jsx)(di,{label:`Review gate`,value:e.workflow.reviewGate.replaceAll(`_`,` `)}),(0,q.jsx)(di,{label:`Active agents`,value:e.workflow.activeAgentRoles.length>0?e.workflow.activeAgentRoles.join(`, `):`None`})]}),(0,q.jsxs)(`div`,{className:`rounded-md border border-border bg-muted/20 p-4`,children:[(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(T,{children:`Execution snapshot`}),(0,q.jsx)(`div`,{className:`mt-2 text-sm font-medium text-foreground`,children:L}),(0,q.jsx)(`div`,{className:`mt-1 text-sm leading-6 text-muted-foreground`,children:se}),D?(0,q.jsx)(`div`,{className:`mt-3 text-xs leading-5 text-muted-foreground`,children:"Queued autonomous stages are claimed automatically by a live daemon once dependencies clear. If a finding stalls here, check `Operations` for queue health or worker heartbeats."}):null]}),E?(0,q.jsx)(li,{value:E.status}):x?(0,q.jsx)(li,{value:x.status}):null]}),(0,q.jsxs)(`div`,{className:`mt-4 grid gap-3 md:grid-cols-2 xl:grid-cols-4`,children:[(0,q.jsx)(di,{label:`Current step`,value:x?x.title:E?E.title:`No live step`}),(0,q.jsx)(di,{label:`Owner`,value:re}),(0,q.jsx)(di,{label:`Next step`,value:D?D.title:e.workflow.reviewGate===`none`?`No queued step`:`Review gate`}),(0,q.jsx)(di,{label:`Blocked by`,value:E?E.title:e.workflow.phase===`blocked`?e.workflow.reviewReason??`Operator input`:`Clear`})]})]}),(0,q.jsx)(`div`,{className:`rounded-md border border-primary/30 bg-primary/5 p-4`,children:(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`min-w-0 space-y-2`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,q.jsx)(ve,{className:`size-4 text-primary-text`}),(0,q.jsx)(T,{children:`Continue in console`})]}),(0,q.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:le}),(0,q.jsx)(`div`,{className:`text-sm leading-6 text-muted-foreground`,children:ue}),(0,q.jsx)(`code`,{className:`block overflow-x-auto rounded bg-background/80 px-3 py-2 font-mono text-xs text-foreground`,children:V}),f?(0,q.jsx)(`div`,{className:`text-xs leading-5 text-muted-foreground`,children:f}):null]}),(0,q.jsxs)(y,{variant:`outline`,size:`sm`,onClick:()=>void de(),children:[(0,q.jsx)(ge,{className:`size-4`}),`Copy command`]})]})}),(0,q.jsxs)(`label`,{className:`block space-y-2`,children:[(0,q.jsx)(T,{children:`Finding owner`}),(0,q.jsxs)(`div`,{className:`flex gap-2`,children:[(0,q.jsx)(w,{list:g,value:u,onChange:e=>d(e.target.value),placeholder:`security-verifier / model owner / person`}),(0,q.jsx)(`datalist`,{id:g,children:_.map(e=>(0,q.jsx)(`option`,{value:e},e))}),(0,q.jsxs)(y,{variant:`outline`,onClick:()=>a(e.fingerprint,e.workflow.phase,u),disabled:o,children:[(0,q.jsx)(xe,{className:`size-4`}),`Assign`]})]})]}),_.length>0?(0,q.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:_.map(e=>(0,q.jsx)(y,{variant:u===e?`default`:`outline`,size:`sm`,onClick:()=>d(e),disabled:o,children:e},e))}):null,(0,q.jsx)(`div`,{className:`rounded-md border border-border bg-muted/20 p-4`,children:(0,q.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`max-w-2xl space-y-2`,children:[(0,q.jsx)(T,{children:`Operator disposition`}),(0,q.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`Keep execution state derived from real work.`}),(0,q.jsx)(`div`,{className:`text-sm leading-6 text-muted-foreground`,children:`The queue and console own investigation and remediation planning. Use a disposition only after the evidence is sufficient to accept or suppress this finding family.`})]}),(0,q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,q.jsxs)(y,{variant:`success`,onClick:()=>i(`accepted`,s),disabled:o,children:[(0,q.jsx)(U,{className:`size-4`}),`Accept`]}),(0,q.jsxs)(y,{variant:`warning`,onClick:()=>i(`suppressed`,s),disabled:o,children:[(0,q.jsx)(H,{className:`size-4`}),`Suppress`]}),(0,q.jsxs)(y,{variant:`outline`,onClick:()=>i(`new`,s),disabled:o,children:[(0,q.jsx)(ye,{className:`size-4`}),`Reset triage`]})]})]})}),e.workflow.reviewGate!==`none`||e.workflow.persistedStatus!==e.workflow.phase?(0,q.jsxs)(`div`,{className:`rounded-lg border border-border bg-muted/35 px-3 py-3 text-sm text-muted-foreground`,children:[(0,q.jsxs)(`div`,{className:`flex items-center gap-2 font-medium text-foreground`,children:[(0,q.jsx)(G,{className:`size-4 text-primary-text`}),`Autonomous workflow signal`]}),(0,q.jsxs)(`div`,{className:`mt-1`,children:[`Live execution is currently in `,(0,q.jsx)(`span`,{className:`text-foreground`,children:e.workflow.phase}),e.workflow.reviewGate===`none`?`.`:` with ${e.workflow.reviewGate.replaceAll(`_`,` `)}.`,e.workflow.reviewReason?` ${e.workflow.reviewReason}`:``,n&&n.persistedStatus!==n.phase?` The saved operator workflow is ${n.persistedStatus}.`:``]})]}):null,(0,q.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-3`,children:[(0,q.jsx)(A,{label:`Consensus`,value:e.workflow.consensus}),(0,q.jsx)(A,{label:`Evidence signal`,value:e.workflow.evidenceSignal}),(0,q.jsx)(A,{label:`True positive votes`,value:String(e.workflow.verdictCounts.truePositive)}),(0,q.jsx)(A,{label:`False positive votes`,value:String(e.workflow.verdictCounts.falsePositive)}),(0,q.jsx)(A,{label:`Unsure votes`,value:String(e.workflow.verdictCounts.unsure)}),(0,q.jsx)(A,{label:`Assignee`,value:e.workflow.assignee??`Unassigned`})]}),(0,q.jsxs)(`label`,{className:`block space-y-2`,children:[(0,q.jsx)(T,{children:`Triage note`}),(0,q.jsx)(Kr,{value:s,onChange:e=>c(e.target.value),placeholder:`Capture why this finding is actionable, benign, needs another agent pass, or is waiting on a human call.`})]})]}),(0,q.jsx)(k,{className:r?`order-1`:`order-2`,eyebrow:r?`Review evidence`:`Execution`,title:r?`Evidence before disposition`:`Execution record`,description:r?`Start with the captured proof, then inspect the work chain or make a disposition.`:`Open the runbook, evidence, and occurrence detail only when this finding needs deeper inspection.`,children:(0,q.jsxs)(ne,{defaultValue:r?`evidence`:`runbook`,className:`gap-4`,children:[(0,q.jsxs)(te,{children:[(0,q.jsx)(ee,{value:`runbook`,children:`Runbook`}),(0,q.jsx)(ee,{value:`evidence`,children:`Evidence`}),(0,q.jsx)(ee,{value:`occurrences`,children:`Occurrences`})]}),(0,q.jsxs)(O,{value:`runbook`,className:`space-y-5`,children:[(0,q.jsxs)(`div`,{className:`space-y-3`,children:[(0,q.jsx)(T,{children:`Work chain`}),e.workItems.length===0?(0,q.jsx)(`div`,{className:`rounded-md border border-dashed border-border bg-muted/20 px-4 py-8 text-sm text-muted-foreground`,children:`No persisted work graph exists yet for this finding.`}):(0,q.jsx)(ui,{items:e.workItems,activeWorkItemId:x?.id??null,blockedWorkItemId:E?.id??null})]}),(0,q.jsxs)(`div`,{className:`space-y-3`,children:[(0,q.jsx)(T,{children:`Shared artifacts`}),e.artifacts.length===0?(0,q.jsx)(`div`,{className:`rounded-md border border-dashed border-border bg-muted/20 px-4 py-8 text-sm text-muted-foreground`,children:`No shared artifacts have been persisted for this finding yet.`}):(0,q.jsx)(`div`,{className:`grid gap-3`,children:e.artifacts.map(e=>(0,q.jsx)(`div`,{className:`rounded-md border border-border bg-card px-4 py-3`,children:(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:e.label}),(0,q.jsx)(`div`,{className:`mt-1 text-xs leading-5 text-muted-foreground`,children:e.summary})]}),(0,q.jsx)(S,{variant:`outline`,children:fi(e.kind)})]})},e.id))})]})]}),(0,q.jsx)(O,{value:`evidence`,children:(0,q.jsxs)(`div`,{className:`space-y-3`,children:[(0,q.jsx)(T,{children:`Finding evidence`}),(0,q.jsx)(Se,{request:e.latest.evidenceRequest,response:e.latest.evidenceResponse,analysis:e.latest.evidenceAnalysis})]})}),(0,q.jsx)(O,{value:`occurrences`,children:(0,q.jsxs)(b,{className:`overflow-hidden`,children:[(0,q.jsx)(h,{children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(T,{children:`Occurrences`}),(0,q.jsx)(v,{className:`mt-2`,children:`Matching findings`}),(0,q.jsx)(m,{children:`Each row is an occurrence grouped into this finding family.`})]})}),(0,q.jsx)(C,{children:(0,q.jsxs)(z,{children:[(0,q.jsx)(ie,{children:(0,q.jsxs)(I,{className:`hover:bg-transparent`,children:[(0,q.jsx)(P,{children:`Finding`}),(0,q.jsx)(P,{children:`Scan`}),(0,q.jsx)(P,{children:`Time`}),(0,q.jsx)(P,{className:`w-[8rem]`,children:`Status`})]})}),(0,q.jsx)(ae,{children:e.rows.map(e=>(0,q.jsxs)(I,{children:[(0,q.jsx)(R,{className:`font-mono text-xs text-foreground`,children:e.id.slice(0,8)}),(0,q.jsx)(R,{className:`font-mono text-xs text-muted-foreground`,children:e.scanId.slice(0,8)}),(0,q.jsx)(R,{className:`text-xs text-muted-foreground`,children:l(e.timestamp)}),(0,q.jsx)(R,{children:(0,q.jsx)(N,{value:e.status})})]},e.id))})]})})]})})]})})]})}function ii({groups:e,readyGroups:t,activeGroups:n,blockedGroups:r,selectedFingerprint:i,queueSort:a,pendingFingerprint:o,onSortChange:s,onSelect:c}){return(0,q.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)]`,children:[(0,q.jsxs)(b,{className:`overflow-hidden`,children:[(0,q.jsxs)(h,{children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(T,{children:`Autonomous queue`}),(0,q.jsx)(v,{className:`mt-2`,children:`What can move next`}),(0,q.jsx)(m,{children:`This queue separates runnable work from active execution. Open a finding when evidence needs a human decision or chat handoff.`})]}),(0,q.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,q.jsx)(y,{variant:a===`attention`?`default`:`outline`,size:`xs`,onClick:()=>s(`attention`),children:`Needs attention`}),(0,q.jsx)(y,{variant:a===`newest`?`default`:`outline`,size:`xs`,onClick:()=>s(`newest`),children:`Newest`}),(0,q.jsx)(y,{variant:a===`severity`?`default`:`outline`,size:`xs`,onClick:()=>s(`severity`),children:`Severity`})]})]}),(0,q.jsx)(C,{className:`space-y-4`,children:e.length===0?(0,q.jsx)(W,{title:`No finding families in the queue`,body:`Adjust filters or launch a run to populate the finding queue.`}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(oi,{eyebrow:`Ready`,title:`Ready to claim`,description:`Runnable finding families with no review gate. These are the next autonomous work candidates.`,count:t.length,emptyLabel:`No ready finding families under the active filters.`,children:t.map(e=>(0,q.jsx)(si,{group:e,selected:i===e.fingerprint,saving:o===e.fingerprint,mode:`inbox`,onSelect:c},e.fingerprint))}),(0,q.jsx)(oi,{eyebrow:`Running`,title:`Live execution`,description:`Finding families currently owned by a worker or marked in progress.`,count:n.length,emptyLabel:`No live execution right now.`,children:n.map(e=>(0,q.jsx)(si,{group:e,selected:i===e.fingerprint,saving:o===e.fingerprint,mode:`inbox`,onSelect:c},e.fingerprint))})]})})]}),(0,q.jsxs)(`div`,{className:`space-y-4`,children:[(0,q.jsxs)(b,{className:`overflow-hidden`,children:[(0,q.jsx)(h,{children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(T,{children:`Blocked work`}),(0,q.jsx)(v,{className:`mt-2`,children:`Needs intervention`}),(0,q.jsx)(m,{children:`Finding families that need context, access, or a better exploit path before the worker can continue.`})]})}),(0,q.jsx)(C,{className:`px-0 pb-0`,children:r.length===0?(0,q.jsx)(`div`,{className:`px-6 pb-6`,children:(0,q.jsx)(W,{title:`Nothing is blocked`,body:`The current finding set has no blocked execution paths.`})}):(0,q.jsx)(me,{className:`max-h-[38rem]`,children:(0,q.jsx)(g,{children:r.map(e=>(0,q.jsx)(si,{group:e,selected:i===e.fingerprint,saving:o===e.fingerprint,mode:`review`,onSelect:c},e.fingerprint))})})})]}),(0,q.jsxs)(b,{children:[(0,q.jsx)(h,{children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(T,{children:`Reading model`}),(0,q.jsx)(v,{className:`mt-2`,children:`How to use findings`}),(0,q.jsx)(m,{children:`Runs create evidence. Finding families group related observations over time. Workers claim runnable work until a review gate or blocker stops them.`})]})}),(0,q.jsxs)(C,{className:`grid gap-3`,children:[(0,q.jsx)(ci,{label:`Filtered families`,value:`${e.length}`,meta:`Current queue scope after search and filters.`}),(0,q.jsx)(ci,{label:`Ready plus running`,value:`${t.length+n.length}`,meta:`Work automation can touch without human sign-off.`}),(0,q.jsx)(ci,{label:`Blocked plus review`,value:`${r.length}`,meta:`Cases outside the autonomous happy path.`})]})]})]})]})}function ai({agentReviewGroups:e,humanReviewGroups:t,selectedFingerprint:n,pendingFingerprint:r,onSelect:i}){return(0,q.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,q.jsxs)(b,{className:`overflow-hidden`,children:[(0,q.jsx)(h,{children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(T,{children:`Agent review`}),(0,q.jsx)(v,{className:`mt-2`,children:`Consensus and replication`}),(0,q.jsx)(m,{children:`Finding families that need another autonomous pass, conflict resolution, or a stronger PoC before operator review.`})]})}),(0,q.jsx)(C,{className:`px-0 pb-0`,children:e.length===0?(0,q.jsx)(`div`,{className:`px-6 pb-6`,children:(0,q.jsx)(W,{title:`No agent-review families`,body:`Nothing currently needs another agent pass under the active filters.`})}):(0,q.jsx)(me,{className:`max-h-[70vh]`,children:(0,q.jsx)(g,{children:e.map(e=>(0,q.jsx)(si,{group:e,selected:n===e.fingerprint,saving:r===e.fingerprint,mode:`review`,onSelect:i},e.fingerprint))})})})]}),(0,q.jsxs)(b,{className:`overflow-hidden`,children:[(0,q.jsx)(h,{children:(0,q.jsxs)(`div`,{children:[(0,q.jsx)(T,{children:`Human review`}),(0,q.jsx)(v,{className:`mt-2`,children:`Operator sign-off`}),(0,q.jsx)(m,{children:`Finding families with enough signal for a final human disposition or report.`})]})}),(0,q.jsx)(C,{className:`px-0 pb-0`,children:t.length===0?(0,q.jsx)(`div`,{className:`px-6 pb-6`,children:(0,q.jsx)(W,{title:`No human-review families`,body:`No finding families currently require operator sign-off under the active filters.`})}):(0,q.jsx)(me,{className:`max-h-[70vh]`,children:(0,q.jsx)(g,{children:t.map(e=>(0,q.jsx)(si,{group:e,selected:n===e.fingerprint,saving:r===e.fingerprint,mode:`review`,onSelect:i},e.fingerprint))})})})]})]})}function oi({eyebrow:e,title:t,description:n,count:r,emptyLabel:i,children:a}){return(0,q.jsxs)(b,{className:`overflow-hidden`,size:`sm`,children:[(0,q.jsx)(h,{className:`border-b border-border`,children:(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,q.jsxs)(`div`,{children:[(0,q.jsx)(T,{children:e}),(0,q.jsx)(v,{className:`mt-2`,children:t}),(0,q.jsx)(m,{children:n})]}),(0,q.jsx)(S,{variant:`neutral`,children:r})]})}),(0,q.jsx)(C,{className:`px-0 pb-0`,children:r===0?(0,q.jsx)(`div`,{className:`px-4 pb-4`,children:(0,q.jsx)(W,{title:i,body:`The queue will repopulate here as runs produce finding work.`})}):(0,q.jsx)(g,{children:a})})]})}function si({group:e,selected:t,saving:n,mode:r,onSelect:i}){let a=r===`review`?e.workflow.reviewGate===`agent_review`?`Needs agent replication or conflict resolution.`:`Needs operator decision before final disposition.`:e.workflow.reviewReason?e.workflow.reviewReason:e.workflow.phase===`in_progress`?`Execution is active now.`:e.workflow.phase===`blocked`?`Execution is blocked and needs intervention.`:`Ready for the next autonomous step.`;return(0,q.jsx)(x,{interactive:!0,selected:t,className:`p-0`,children:(0,q.jsxs)(`button`,{type:`button`,onClick:()=>i(e.fingerprint),className:`w-full px-4 py-4 text-left`,children:[(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,q.jsxs)(`div`,{className:`min-w-0 space-y-1`,children:[(0,q.jsx)(`div`,{className:`text-sm font-semibold leading-5 text-foreground`,children:e.latest.title}),(0,q.jsx)(`div`,{className:`text-xs leading-5 text-muted-foreground`,children:a})]}),(0,q.jsxs)(`div`,{className:`flex shrink-0 flex-wrap justify-end gap-2`,children:[e.workflow.reviewGate===`none`?null:(0,q.jsx)(F,{value:e.workflow.reviewGate}),(0,q.jsx)(B,{severity:e.latest.severity})]})]}),(0,q.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,q.jsx)(j,{value:e.workflow.phase}),(0,q.jsx)(oe,{value:e.workflow.consensus}),(0,q.jsx)(M,{value:e.workflow.evidenceSignal}),(0,q.jsx)(N,{value:e.latest.triageStatus}),e.workflow.persistedStatus!==e.workflow.phase&&e.workflow.persistedStatus!==e.workflow.reviewGate?(0,q.jsx)(L,{value:e.workflow.persistedStatus}):null]}),(0,q.jsxs)(`div`,{className:`mt-3 grid gap-2 text-xs text-muted-foreground md:grid-cols-4`,children:[(0,q.jsxs)(`div`,{children:[`Owner: `,e.workflow.assignee??`Unassigned`]}),(0,q.jsxs)(`div`,{children:[`Coverage: `,e.count,` hits · `,e.scanCount,` scans`]}),(0,q.jsxs)(`div`,{children:[`Agents: `,e.workflow.activeAgentRoles.length>0?e.workflow.activeAgentRoles.join(`, `):`None`]}),(0,q.jsxs)(`div`,{className:`inline-flex items-center gap-1.5`,children:[(0,q.jsx)(D,{className:`size-3.5`}),n?`Saving workflow...`:`Updated ${l(e.workflow.updatedAt??e.latest.timestamp)}`]})]})]})})}function ci({label:e,value:t,meta:n}){return(0,q.jsxs)(`div`,{className:`rounded-md border border-border bg-card px-4 py-3`,children:[(0,q.jsx)(`div`,{className:`text-[10px] font-medium uppercase tracking-widest text-muted-foreground/70`,children:e}),(0,q.jsx)(`div`,{className:`mt-2 text-2xl font-semibold text-foreground`,children:t}),(0,q.jsx)(`div`,{className:`mt-1 text-xs text-muted-foreground`,children:n})]})}function li({value:e}){return(0,q.jsx)(S,{variant:e===`done`?`success`:e===`blocked`||e===`cancelled`?`danger`:e===`in_progress`?`accent`:e===`todo`?`warning`:`neutral`,children:e.replaceAll(`_`,` `)})}function ui({items:e,activeWorkItemId:t,blockedWorkItemId:n}){return(0,q.jsx)(`div`,{className:`grid gap-3 md:grid-cols-2`,children:e.map(e=>{let r=t===e.id,i=n===e.id;return(0,q.jsxs)(`div`,{className:`rounded-md border px-4 py-3 ${i?`border-destructive/30 bg-destructive/5`:r?`border-primary/30 bg-primary/5`:`border-border bg-card`}`,children:[(0,q.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,q.jsxs)(`div`,{className:`min-w-0`,children:[(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,q.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:e.title}),r?(0,q.jsx)(S,{variant:`accent`,children:`Current`}):null,i?(0,q.jsx)(S,{variant:`danger`,children:`Blocked`}):null]}),(0,q.jsx)(`div`,{className:`mt-1 text-xs leading-5 text-muted-foreground`,children:e.summary})]}),(0,q.jsx)(li,{value:e.status})]}),(0,q.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[(0,q.jsx)(S,{variant:`outline`,children:pi(e.kind)}),(0,q.jsx)(S,{variant:`outline`,children:e.owner??`Unassigned`})]})]},e.id)})})}function di({label:e,value:t,mono:n=!1}){return(0,q.jsxs)(`div`,{className:`rounded-md border border-border bg-card px-4 py-3`,children:[(0,q.jsx)(`div`,{className:`text-[10px] font-medium uppercase tracking-widest text-muted-foreground/70`,children:e}),(0,q.jsx)(`div`,{className:n?`mt-2 truncate font-mono text-xs text-foreground`:`mt-2 text-sm font-medium text-foreground`,children:t})]})}function fi(e){return e.replaceAll(`_`,` `)}function pi(e){return e.replaceAll(`_`,` `)}function mi(e){return e.replaceAll(`-`,` `)}function hi(e){let t=e.toLowerCase();return t===`critical`?5:t===`high`?4:t===`medium`?3:t===`low`?2:1}function gi(e){let t=0;return e.workflow.reviewGate===`human_review`?t+=100:e.workflow.reviewGate===`agent_review`?t+=90:e.workflow.phase===`blocked`?t+=80:e.workflow.phase===`in_progress`?t+=70:e.workflow.phase===`todo`?t+=60:e.workflow.phase===`backlog`&&(t+=50),e.workflow.assignee||(t+=15),e.workflow.consensus===`disputed`&&(t+=12),e.workflow.activeAgentRoles.length>0&&(t+=8),t*1e6+e.latest.timestamp+hi(e.latest.severity)*1e3}function _i(e){return e===`done`||e===`cancelled`||e===`blocked`||e===`in_progress`||e===`todo`?e:`backlog`}function vi({label:e,className:t,children:n}){return(0,q.jsxs)(`div`,{className:`space-y-3 rounded-md border border-border bg-card px-4 py-4 ${t??``}`,children:[(0,q.jsx)(T,{children:e}),(0,q.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n})]})}function yi({active:e,onClick:t,children:n}){return(0,q.jsx)(y,{variant:e?`default`:`outline`,size:`xs`,onClick:t,children:n})}export{ni as FindingsPage};
@@ -0,0 +1 @@
1
+ import{f as e,m as t,t as n}from"./jsx-runtime-MGseXjj5.js";import{_ as r,a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,o as p,p as m,r as h,t as g,u as _,v,y}from"./operations-BxZ0OoXO.js";import{a as b,i as x}from"./input-TuVPR3Zl.js";var S=class extends v{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=i(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),w(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return T(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return T(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof o(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!m(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&E(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||o(this.options.enabled,this.#t)!==o(t.enabled,this.#t)||s(this.options.staleTime,this.#t)!==s(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||o(this.options.enabled,this.#t)!==o(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return O(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(d)),t}#g(){this.#b();let e=s(this.options.staleTime,this.#t);if(p.isServer()||this.#r.isStale||!a(e))return;let t=l(this.#r.dataUpdatedAt,e)+1;this.#d=c.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(p.isServer()||o(this.options.enabled,this.#t)===!1||!a(this.#p)||this.#p===0)&&(this.#f=c.setInterval(()=>{(this.options.refetchIntervalInBackground||r.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(c.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(c.clearInterval(this.#f),this.#f=void 0)}createResult(e,t){let n=this.#t,r=this.options,a=this.#r,s=this.#i,c=this.#a,l=e===n?this.#n:e.state,{state:u}=e,d={...u},f=!1,p;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&w(e,t),o=i&&E(e,n,t,r);(a||o)&&(d={...d,...h(u.data,e.options)}),t._optimisticResults===`isRestoring`&&(d.fetchStatus=`idle`)}let{error:m,errorUpdatedAt:g,status:v}=d;p=d.data;let y=!1;if(t.placeholderData!==void 0&&p===void 0&&v===`pending`){let e;a?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=a.data,y=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(v=`success`,p=_(a?.data,e,t),f=!0)}if(t.select&&p!==void 0&&!y){if(a&&p===s?.data&&t.select===this.#c)p=this.#l;else try{this.#c=t.select,p=t.select(p),p=_(a?.data,p,t),this.#l=p,this.#s=null}catch(e){this.#s=e}}this.#s&&(m=this.#s,p=this.#l,g=Date.now(),v=`error`);let b=d.fetchStatus===`fetching`,x=v===`pending`,S=v===`error`,C=x&&b,T=p!==void 0,O={status:v,fetchStatus:d.fetchStatus,isPending:x,isSuccess:v===`success`,isError:S,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:d.dataUpdatedAt,error:m,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:b,isRefetching:b&&!x,isLoadingError:S&&!T,isPaused:d.fetchStatus===`paused`,isPlaceholderData:f,isRefetchError:S&&T,isStale:D(e,t),refetch:this.refetch,promise:this.#o,isEnabled:o(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=O.data!==void 0,r=O.status===`error`&&!t,a=e=>{r?e.reject(O.error):t&&e.resolve(O.data)},o=()=>{let e=this.#o=O.promise=i();a(e)},s=this.#o;switch(s.status){case`pending`:e.queryHash===n.queryHash&&a(s);break;case`fulfilled`:(r||O.data!==s.value)&&o();break;case`rejected`:(!r||O.error!==s.reason)&&o()}}return O}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!m(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){u.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function C(e,t){return o(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||o(t.retryOnMount,e)!==!1)}function w(e,t){return C(e,t)||e.state.data!==void 0&&T(e,t,t.refetchOnMount)}function T(e,t,n){if(o(t.enabled,e)!==!1&&s(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&D(e,t)}return!1}function E(e,t,n,r){return(e!==t||o(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&D(e,n)}function D(e,t){return o(t.enabled,e)!==!1&&e.isStaleByTime(s(t.staleTime,e))}function O(e,t){return!m(e.getCurrentResult(),t)}var k=n(),A=t(e(),1),j=A.createContext(!1),M=()=>A.useContext(j);j.Provider;function N(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ee=A.createContext(N()),te=()=>A.useContext(ee),ne=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?f(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},re=e=>{A.useEffect(()=>{e.clearReset()},[e])},ie=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||f(n,[e.error,r])),ae=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},P=(e,t)=>e.isLoading&&e.isFetching&&!t,F=(e,t)=>e?.suspense&&t.isPending,I=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function L(e,t,n){let r=M(),i=te(),a=g(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,ae(o),ne(o,i,s),re(i);let l=!a.getQueryCache().get(o.queryHash),[f]=A.useState(()=>new t(a,o)),m=f.getOptimisticResult(o),h=!r&&c;if(A.useSyncExternalStore(A.useCallback(e=>{let t=h?f.subscribe(u.batchCalls(e)):d;return f.updateResult(),t},[f,h]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),A.useEffect(()=>{f.setOptions(o)},[o,f]),F(o,m))throw I(o,f,i);if(ie({result:m,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw m.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,m),o.experimental_prefetchInRender&&!p.isServer()&&P(m,r)&&(l?I(o,f,i):s?.promise)?.catch(d).finally(()=>{f.updateResult()}),o.notifyOnChangeProps?m:f.trackResult(m)}function R(e,t){return L(e,S,t)}function z(){return document.querySelector(`meta[name="0-control-token"]`)?.getAttribute(`content`)??null}async function B(e,t){let n={"Content-Type":`application/json`,...t?.headers??{}},r=z();r&&(n[`X-0-Control-Token`]=r);let i=await fetch(e,{...t,headers:n});if(!i.ok){let e=`${i.status} ${i.statusText}`;try{let t=await i.json();t.error&&(e=t.error)}catch{}throw Error(e)}let a=i.headers.get(`content-type`)??``;if(!a.includes(`json`))throw Error(`Dashboard API returned ${a||`non-JSON content`} for ${e}. Serve the UI through \`0 dashboard\`.`);return i.json()}function V(){return B(`/api/dashboard`)}async function H(){return(await B(`/api/scans`)).scans}function U(e){return B(`/api/scans/${encodeURIComponent(e)}/events`)}function W(e=20){return B(`/api/events/recent?limit=${encodeURIComponent(String(e))}`)}function G(e){return B(`/api/scans/${encodeURIComponent(e)}/findings`)}function K(e){return B(`/api/finding-family/${encodeURIComponent(e)}`)}function q(e,t,n){return B(`/api/finding-family/${encodeURIComponent(e)}/triage`,{method:`POST`,body:JSON.stringify({triageStatus:t,triageNote:n})})}function J(e,t,n){return B(`/api/finding-family/${encodeURIComponent(e)}/workflow`,{method:`POST`,body:JSON.stringify({workflowStatus:t,workflowAssignee:n})})}function oe(e=3e4){return B(`/api/control/recover-stale-workers`,{method:`POST`,body:JSON.stringify({staleAfterMs:e})})}function se(){return B(`/api/control/prune-stopped-workers`,{method:`POST`,body:JSON.stringify({})})}function ce(e){return B(`/api/control/reset-database`,{method:`POST`,body:JSON.stringify({seed:e})})}function le(e){return B(`/api/control/start-daemon`,{method:`POST`,body:JSON.stringify(e??{})})}function ue(){return B(`/api/control/stop-daemon`,{method:`POST`,body:JSON.stringify({})})}function de(e){return B(`/api/control/launch-run`,{method:`POST`,body:JSON.stringify(e)})}typeof window<`u`&&window.document&&window.document.createElement;function fe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function pe(e,t){let n=A.createContext(t),r=e=>{let{children:t,...r}=e,i=A.useMemo(()=>r,Object.values(r));return(0,k.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=A.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function me(e,t=[]){let n=[];function r(t,r){let i=A.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=A.useMemo(()=>o,Object.values(o));return(0,k.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=A.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>A.createContext(e));return function(n){let r=n?.[e]||t;return A.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,he(i,...t)]}function he(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var ge=t(y(),1);function Y(e){let t=_e(e),n=A.forwardRef((e,n)=>{let{children:r,...i}=e,a=A.Children.toArray(r),o=a.find(ye);if(o){let e=o.props.children,r=a.map(t=>t===o?A.Children.count(e)>1?A.Children.only(null):A.isValidElement(e)?e.props.children:null:t);return(0,k.jsx)(t,{...i,ref:n,children:A.isValidElement(e)?A.cloneElement(e,void 0,r):null})}return(0,k.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function _e(e){let t=A.forwardRef((e,t)=>{let{children:n,...r}=e;if(A.isValidElement(n)){let e=xe(n),i=be(r,n.props);return n.type!==A.Fragment&&(i.ref=t?x(t,e):e),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ve=Symbol(`radix.slottable`);function ye(e){return A.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ve}function be(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function xe(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var X=globalThis?.document?A.useLayoutEffect:()=>{},Se=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Y(`Primitive.${t}`),r=A.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,k.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Z(e,t){e&&ge.flushSync(()=>e.dispatchEvent(t))}function Ce(e){let t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...e)=>t.current?.(...e),[])}var we=A.createContext(void 0);function Te(e){let t=A.useContext(we);return e||t||`ltr`}function Ee(e,t){return A.useReducer((e,n)=>t[e][n]??e,e)}var Q=e=>{let{present:t,children:n}=e,r=De(t),i=typeof n==`function`?n({present:r.isPresent}):A.Children.only(n),a=b(r.ref,Oe(i));return typeof n==`function`||r.isPresent?A.cloneElement(i,{ref:a}):null};Q.displayName=`Presence`;function De(e){let[t,n]=A.useState(),r=A.useRef(null),i=A.useRef(e),a=A.useRef(`none`),[o,s]=Ee(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return A.useEffect(()=>{let e=$(r.current);a.current=o===`mounted`?e:`none`},[o]),X(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=$(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),X(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=$(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=$(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:A.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function $(e){return e?.animationName||`none`}function Oe(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ke(e){return new Date(e).toLocaleString()}function Ae(e){if(!e||e<=0)return`n/a`;if(e<1e3)return`${e}ms`;let t=Math.round(e/1e3),n=Math.floor(t/60),r=t%60;return n===0?`${t}s`:`${n}m ${r}s`}function je(e){return!e||Object.keys(e).length===0?`No payload`:typeof e.summary==`string`&&e.summary.trim()?e.summary.trim():Array.isArray(e.tools)&&e.tools.length>0?`${typeof e.turn==`number`?`turn ${e.turn} · `:``}tools: ${e.tools.join(`, `)}`:typeof e.excerpt==`string`&&e.excerpt.trim()?`${typeof e.turn==`number`?`turn ${e.turn} · `:``}no tool calls · ${e.excerpt.trim().slice(0,120)}`:Object.entries(e).slice(0,3).map(([e,t])=>`${e}: ${Me(t)}`).join(` · `)}function Me(e){return typeof e==`string`?e:typeof e==`number`||typeof e==`boolean`?String(e):Array.isArray(e)?`${e.length} items`:e&&typeof e==`object`?`${Object.keys(e).length} fields`:`n/a`}export{ce as C,J as D,q as E,R as O,oe as S,ue as T,U as _,Te as a,de as b,Z as c,pe as d,me as f,W as g,K as h,Q as i,X as l,V as m,ke as n,Ce as o,fe as p,je as r,Se as s,Ae as t,Y as u,G as v,le as w,se as x,H as y};
@@ -0,0 +1 @@
1
+ import{f as e,m as t,t as n}from"./jsx-runtime-MGseXjj5.js";var r=t(e(),1),i=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),a=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),o=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),s=e=>{let t=o(e);return t.charAt(0).toUpperCase()+t.slice(1)},c={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},l=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},u=(0,r.createContext)({}),d=()=>(0,r.useContext)(u),f=(0,r.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:a,className:o=``,children:s,iconNode:u,...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,color:_=`currentColor`,className:v=``}=d()??{},y=a??g?Number(n??h)*24/Number(t??m):n??h;return(0,r.createElement)(`svg`,{ref:p,...c,width:t??m??c.width,height:t??m??c.height,stroke:e??_,strokeWidth:y,className:i(`lucide`,v,o),...!s&&!l(f)&&{"aria-hidden":`true`},...f},[...u.map(([e,t])=>(0,r.createElement)(e,t)),...Array.isArray(s)?s:[s]])}),p=(e,t)=>{let n=(0,r.forwardRef)(({className:n,...o},c)=>(0,r.createElement)(f,{ref:c,iconNode:t,className:i(`lucide-${a(s(e))}`,`lucide-${e}`,n),...o}));return n.displayName=s(e),n};function m(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=m(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function h(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=m(e))&&(r&&(r+=` `),r+=t);return r}var g=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,_=h,v=(e,t)=>n=>{if(t?.variants==null)return _(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=g(t)||g(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return _(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},y=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},b=(e,t)=>({classGroupId:e,validator:t}),x=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),S=`-`,C=[],w=`arbitrary..`,T=e=>{let t=E(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return te(e);let n=e.split(S);return ee(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?y(i,t):t:i||C}return n[e]||C}}},ee=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=ee(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(S):e.slice(t).join(S),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},te=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?w+r:void 0})(),E=e=>{let{theme:t,classGroups:n}=e;return ne(n,t)},ne=(e,t)=>{let n=x();for(let r in e){let i=e[r];D(i,n,r,t)}return n},D=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];O(i,t,n,r)}},O=(e,t,n,r)=>{if(typeof e==`string`){k(e,t,n);return}if(typeof e==`function`){A(e,t,n,r);return}re(e,t,n,r)},k=(e,t,n)=>{let r=e===``?t:j(t,e);r.classGroupId=n},A=(e,t,n,r)=>{if(M(e)){D(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(b(n,e))},re=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];D(o,j(t,a),n,r)}},j=(e,t)=>{let n=e,r=t.split(S),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=x(),n.nextPart.set(t,i)),n=i}return n},M=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,ie=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},N=`!`,ae=`:`,oe=[],P=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),F=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===ae){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(N)?(c=s.slice(0,-1),l=!0):s.startsWith(N)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return P(t,l,c,u)};if(t){let e=t+ae,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):P(oe,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},se=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},ce=e=>({cache:ie(e.cacheSize),parseClassName:F(e),sortModifiers:se(e),postfixLookupClassGroupIds:I(e),...T(e)}),I=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},le=/\s+/,L=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(le),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+N:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},R=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=z(n))&&(i&&(i+=` `),i+=r);return i},z=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=z(e[r]))&&(n&&(n+=` `),n+=t);return n},B=(e,...t)=>{let n,r,i,a,o=o=>(n=ce(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=L(e,n);return i(e,a),a};return a=o,(...e)=>a(R(...e))},ue=[],V=e=>{let t=t=>t[e]||ue;return t.isThemeGetter=!0,t},de=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fe=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,me=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,he=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ge=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,H=e=>pe.test(e),U=e=>!!e&&!Number.isNaN(Number(e)),W=e=>!!e&&Number.isInteger(Number(e)),ye=e=>e.endsWith(`%`)&&U(e.slice(0,-1)),G=e=>me.test(e),be=()=>!0,xe=e=>he.test(e)&&!ge.test(e),Se=()=>!1,Ce=e=>_e.test(e),we=e=>ve.test(e),Te=e=>!K(e)&&!J(e),Ee=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),De=e=>X(e,He,Se),K=e=>de.test(e),q=e=>X(e,Ue,xe),Oe=e=>X(e,We,U),ke=e=>X(e,Ke,be),Ae=e=>X(e,Ge,Se),je=e=>X(e,Be,Se),Me=e=>X(e,Ve,we),Ne=e=>X(e,qe,Ce),J=e=>fe.test(e),Y=e=>Z(e,Ue),Pe=e=>Z(e,Ge),Fe=e=>Z(e,Be),Ie=e=>Z(e,He),Le=e=>Z(e,Ve),Re=e=>Z(e,qe,!0),ze=e=>Z(e,Ke,!0),X=(e,t,n)=>{let r=de.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Z=(e,t,n=!1)=>{let r=fe.exec(e);return r?r[1]?t(r[1]):n:!1},Be=e=>e===`position`||e===`percentage`,Ve=e=>e===`image`||e===`url`,He=e=>e===`length`||e===`size`||e===`bg-size`,Ue=e=>e===`length`,We=e=>e===`number`,Ge=e=>e===`family-name`,Ke=e=>e===`number`||e===`weight`,qe=e=>e===`shadow`,Je=B(()=>{let e=V(`color`),t=V(`font`),n=V(`text`),r=V(`font-weight`),i=V(`tracking`),a=V(`leading`),o=V(`breakpoint`),s=V(`container`),c=V(`spacing`),l=V(`radius`),u=V(`shadow`),d=V(`inset-shadow`),f=V(`text-shadow`),p=V(`drop-shadow`),m=V(`blur`),h=V(`perspective`),g=V(`aspect`),_=V(`ease`),v=V(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),J,K],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,K,c],T=()=>[H,`full`,`auto`,...w()],ee=()=>[W,`none`,`subgrid`,J,K],te=()=>[`auto`,{span:[`full`,W,J,K]},W,J,K],E=()=>[W,`auto`,J,K],ne=()=>[`auto`,`min`,`max`,`fr`,J,K],D=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],O=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],k=()=>[`auto`,...w()],A=()=>[H,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],re=()=>[H,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],j=()=>[H,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],M=()=>[e,J,K],ie=()=>[...b(),Fe,je,{position:[J,K]}],N=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],ae=()=>[`auto`,`cover`,`contain`,Ie,De,{size:[J,K]}],oe=()=>[ye,Y,q],P=()=>[``,`none`,`full`,l,J,K],F=()=>[``,U,Y,q],se=()=>[`solid`,`dashed`,`dotted`,`double`],ce=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],I=()=>[U,ye,Fe,je],le=()=>[``,`none`,m,J,K],L=()=>[`none`,U,J,K],R=()=>[`none`,U,J,K],z=()=>[U,J,K],B=()=>[H,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[G],breakpoint:[G],color:[be],container:[G],"drop-shadow":[G],ease:[`in`,`out`,`in-out`],font:[Te],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[G],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[G],shadow:[G],spacing:[`px`,U],text:[G],"text-shadow":[G],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,H,K,J,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,J,K]}],"container-named":[Ee],columns:[{columns:[U,K,J,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[W,`auto`,J,K]}],basis:[{basis:[H,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[U,H,`auto`,`initial`,`none`,K]}],grow:[{grow:[``,U,J,K]}],shrink:[{shrink:[``,U,J,K]}],order:[{order:[W,`first`,`last`,`none`,J,K]}],"grid-cols":[{"grid-cols":ee()}],"col-start-end":[{col:te()}],"col-start":[{"col-start":E()}],"col-end":[{"col-end":E()}],"grid-rows":[{"grid-rows":ee()}],"row-start-end":[{row:te()}],"row-start":[{"row-start":E()}],"row-end":[{"row-end":E()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":ne()}],"auto-rows":[{"auto-rows":ne()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...D(),`normal`]}],"justify-items":[{"justify-items":[...O(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...O()]}],"align-content":[{content:[`normal`,...D()]}],"align-items":[{items:[...O(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...O(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":D()}],"place-items":[{"place-items":[...O(),`baseline`]}],"place-self":[{"place-self":[`auto`,...O()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:k()}],mx:[{mx:k()}],my:[{my:k()}],ms:[{ms:k()}],me:[{me:k()}],mbs:[{mbs:k()}],mbe:[{mbe:k()}],mt:[{mt:k()}],mr:[{mr:k()}],mb:[{mb:k()}],ml:[{ml:k()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:A()}],"inline-size":[{inline:[`auto`,...re()]}],"min-inline-size":[{"min-inline":[`auto`,...re()]}],"max-inline-size":[{"max-inline":[`none`,...re()]}],"block-size":[{block:[`auto`,...j()]}],"min-block-size":[{"min-block":[`auto`,...j()]}],"max-block-size":[{"max-block":[`none`,...j()]}],w:[{w:[s,`screen`,...A()]}],"min-w":[{"min-w":[s,`screen`,`none`,...A()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...A()]}],h:[{h:[`screen`,`lh`,...A()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...A()]}],"max-h":[{"max-h":[`screen`,`lh`,...A()]}],"font-size":[{text:[`base`,n,Y,q]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,ze,ke]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ye,K]}],"font-family":[{font:[Pe,Ae,t]}],"font-features":[{"font-features":[K]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,J,K]}],"line-clamp":[{"line-clamp":[U,`none`,J,Oe]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,J,K]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,K]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...se(),`wavy`]}],"text-decoration-thickness":[{decoration:[U,`from-font`,`auto`,J,q]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[U,`auto`,J,K]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[W,J,K]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,K]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,J,K]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ie()}],"bg-repeat":[{bg:N()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},W,J,K],radial:[``,J,K],conic:[W,J,K]},Le,Me]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:P()}],"rounded-s":[{"rounded-s":P()}],"rounded-e":[{"rounded-e":P()}],"rounded-t":[{"rounded-t":P()}],"rounded-r":[{"rounded-r":P()}],"rounded-b":[{"rounded-b":P()}],"rounded-l":[{"rounded-l":P()}],"rounded-ss":[{"rounded-ss":P()}],"rounded-se":[{"rounded-se":P()}],"rounded-ee":[{"rounded-ee":P()}],"rounded-es":[{"rounded-es":P()}],"rounded-tl":[{"rounded-tl":P()}],"rounded-tr":[{"rounded-tr":P()}],"rounded-br":[{"rounded-br":P()}],"rounded-bl":[{"rounded-bl":P()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-bs":[{"border-bs":F()}],"border-w-be":[{"border-be":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":F()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...se(),`hidden`,`none`]}],"divide-style":[{divide:[...se(),`hidden`,`none`]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...se(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[U,J,K]}],"outline-w":[{outline:[``,U,Y,q]}],"outline-color":[{outline:M()}],shadow:[{shadow:[``,`none`,u,Re,Ne]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":[`none`,d,Re,Ne]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:F()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[U,q]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":[`none`,f,Re,Ne]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[U,J,K]}],"mix-blend":[{"mix-blend":[...ce(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ce()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[U]}],"mask-image-linear-from-pos":[{"mask-linear-from":I()}],"mask-image-linear-to-pos":[{"mask-linear-to":I()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":I()}],"mask-image-t-to-pos":[{"mask-t-to":I()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":I()}],"mask-image-r-to-pos":[{"mask-r-to":I()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":I()}],"mask-image-b-to-pos":[{"mask-b-to":I()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":I()}],"mask-image-l-to-pos":[{"mask-l-to":I()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":I()}],"mask-image-x-to-pos":[{"mask-x-to":I()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":I()}],"mask-image-y-to-pos":[{"mask-y-to":I()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[J,K]}],"mask-image-radial-from-pos":[{"mask-radial-from":I()}],"mask-image-radial-to-pos":[{"mask-radial-to":I()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[U]}],"mask-image-conic-from-pos":[{"mask-conic-from":I()}],"mask-image-conic-to-pos":[{"mask-conic-to":I()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ie()}],"mask-repeat":[{mask:N()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,K]}],filter:[{filter:[``,`none`,J,K]}],blur:[{blur:le()}],brightness:[{brightness:[U,J,K]}],contrast:[{contrast:[U,J,K]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Re,Ne]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:[``,U,J,K]}],"hue-rotate":[{"hue-rotate":[U,J,K]}],invert:[{invert:[``,U,J,K]}],saturate:[{saturate:[U,J,K]}],sepia:[{sepia:[``,U,J,K]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,K]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[U,J,K]}],"backdrop-contrast":[{"backdrop-contrast":[U,J,K]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,U,J,K]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[U,J,K]}],"backdrop-invert":[{"backdrop-invert":[``,U,J,K]}],"backdrop-opacity":[{"backdrop-opacity":[U,J,K]}],"backdrop-saturate":[{"backdrop-saturate":[U,J,K]}],"backdrop-sepia":[{"backdrop-sepia":[``,U,J,K]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,J,K]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[U,`initial`,J,K]}],ease:[{ease:[`linear`,`initial`,_,J,K]}],delay:[{delay:[U,J,K]}],animate:[{animate:[`none`,v,J,K]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,K]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:L()}],"rotate-x":[{"rotate-x":L()}],"rotate-y":[{"rotate-y":L()}],"rotate-z":[{"rotate-z":L()}],scale:[{scale:R()}],"scale-x":[{"scale-x":R()}],"scale-y":[{"scale-y":R()}],"scale-z":[{"scale-z":R()}],"scale-3d":[`scale-3d`],skew:[{skew:z()}],"skew-x":[{"skew-x":z()}],"skew-y":[{"skew-y":z()}],transform:[{transform:[J,K,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:B()}],"translate-x":[{"translate-x":B()}],"translate-y":[{"translate-y":B()}],"translate-z":[{"translate-z":B()}],"translate-none":[`translate-none`],zoom:[{zoom:[W,J,K]}],accent:[{accent:M()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom-in`,`zoom-out`,J,K]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":M()}],"scrollbar-track-color":[{"scrollbar-track":M()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,J,K]}],fill:[{fill:[`none`,...M()]}],"stroke-w":[{stroke:[U,Y,q,Oe]}],stroke:[{stroke:[`none`,...M()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function Q(...e){return Je(h(e))}var $=n();function Ye({className:e,size:t=`default`,...n}){return(0,$.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:Q(`group/card flex flex-col gap-6 overflow-hidden rounded-lg border border-border bg-card py-6 text-sm text-card-foreground has-[>img:first-child]:pt-0 data-[size=sm]:gap-4 data-[size=sm]:py-4 *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg`,e),...n})}function Xe({className:e,...t}){return(0,$.jsx)(`div`,{"data-slot":`card-header`,className:Q(`group/card-header @container/card-header grid auto-rows-min items-start gap-1.5 rounded-t-lg px-6 group-data-[size=sm]/card:px-4 has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-6 group-data-[size=sm]/card:[.border-b]:pb-4`,e),...t})}function Ze({className:e,...t}){return(0,$.jsx)(`div`,{"data-slot":`card-title`,className:Q(`font-heading text-base font-medium`,e),...t})}function Qe({className:e,...t}){return(0,$.jsx)(`div`,{"data-slot":`card-description`,className:Q(`text-sm text-muted-foreground`,e),...t})}function $e({className:e,...t}){return(0,$.jsx)(`div`,{"data-slot":`card-content`,className:Q(`px-6 group-data-[size=sm]/card:px-4`,e),...t})}function et({className:e,...t}){return(0,$.jsx)(`div`,{"data-slot":`card-eyebrow`,className:Q(`text-[10px] font-semibold uppercase tracking-[0.2em] text-muted-foreground`,e),...t})}function tt({className:e,...t}){return(0,$.jsx)(`div`,{"data-slot":`card-list`,className:Q(`divide-y divide-border`,e),...t})}var nt=v(`px-4 py-3 text-sm transition-colors`,{variants:{interactive:{true:`hover:bg-primary/5 hover:text-foreground`,false:``},selected:{true:`bg-primary/8 text-foreground`,false:``}},defaultVariants:{interactive:!1,selected:!1}});function rt({className:e,interactive:t,selected:n,...r}){return(0,$.jsx)(`div`,{"data-slot":`card-list-item`,className:Q(nt({interactive:t,selected:n}),e),...r})}function it({className:e,...t}){return(0,$.jsx)(`div`,{"data-slot":`card-empty`,className:Q(`rounded-md border border-dashed border-border bg-muted/30 px-4 py-10 text-center text-sm text-muted-foreground`,e),...t})}function at(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ot(...e){return t=>{let n=!1,r=e.map(e=>{let r=at(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():at(e[t],null)}}}}function st(...e){return r.useCallback(ot(...e),e)}var ct=Symbol.for(`react.lazy`),lt=r.use;function ut(e){return typeof e==`object`&&!!e&&`then`in e}function dt(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===ct&&`_payload`in e&&ut(e._payload)}function ft(e){let t=mt(e),n=r.forwardRef((e,n)=>{let{children:i,...a}=e;dt(i)&&typeof lt==`function`&&(i=lt(i._payload));let o=r.Children.toArray(i),s=o.find(gt);if(s){let e=s.props.children,i=o.map(t=>t===s?r.Children.count(e)>1?r.Children.only(null):r.isValidElement(e)?e.props.children:null:t);return(0,$.jsx)(t,{...a,ref:n,children:r.isValidElement(e)?r.cloneElement(e,void 0,i):null})}return(0,$.jsx)(t,{...a,ref:n,children:i})});return n.displayName=`${e}.Slot`,n}var pt=ft(`Slot`);function mt(e){let t=r.forwardRef((e,t)=>{let{children:n,...i}=e;if(dt(n)&&typeof lt==`function`&&(n=lt(n._payload)),r.isValidElement(n)){let e=vt(n),a=_t(i,n.props);return n.type!==r.Fragment&&(a.ref=t?ot(t,e):e),r.cloneElement(n,a)}return r.Children.count(n)>1?r.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ht=Symbol(`radix.slottable`);function gt(e){return r.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ht}function _t(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function vt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var yt=v(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-sm border border-transparent px-2 py-0.5 text-[11px] font-medium whitespace-nowrap transition-[background-color,border-color,color,box-shadow] focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/40 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,neutral:`border-border bg-muted text-foreground [a]:hover:bg-secondary/80`,accent:`bg-primary/12 text-primary-text dark:bg-primary/18`,success:`bg-emerald-500/12 text-emerald-700 dark:bg-emerald-500/18 dark:text-emerald-200`,warning:`bg-amber-500/12 text-amber-700 dark:bg-amber-500/18 dark:text-amber-200`,danger:`bg-destructive/12 text-destructive dark:bg-destructive/18 dark:text-destructive`,info:`bg-sky-500/12 text-sky-700 dark:bg-sky-500/18 dark:text-sky-200`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border bg-background text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-foreground dark:hover:bg-muted/50`,link:`text-primary-text underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function bt({className:e,variant:t=`default`,asChild:n=!1,...r}){return(0,$.jsx)(n?pt:`span`,{"data-slot":`badge`,"data-variant":t,className:Q(yt({variant:t}),e),...r})}var xt=v(`group/button inline-flex shrink-0 items-center justify-center rounded-sm border border-transparent text-sm font-medium whitespace-nowrap transition-[background-color,border-color,color,box-shadow] outline-none select-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/92`,outline:`border-border bg-background hover:border-primary/20 hover:bg-primary/6 hover:text-foreground aria-expanded:border-primary/20 aria-expanded:bg-primary/8 aria-expanded:text-foreground dark:bg-transparent`,secondary:`bg-secondary text-secondary-foreground hover:bg-secondary/85 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-primary/6 hover:text-foreground aria-expanded:bg-primary/8 aria-expanded:text-foreground`,accent:`bg-primary text-primary-foreground hover:bg-primary/92`,success:`border-emerald-500/20 bg-emerald-500/10 text-emerald-700 hover:bg-emerald-500/16 dark:bg-emerald-500/18 dark:text-emerald-200 dark:hover:bg-emerald-500/24`,warning:`border-amber-500/20 bg-amber-500/10 text-amber-700 hover:bg-amber-500/16 dark:bg-amber-500/18 dark:text-amber-200 dark:hover:bg-amber-500/24`,danger:`border-destructive/20 bg-destructive/10 text-destructive hover:bg-destructive/16 dark:bg-destructive/20 dark:text-destructive`,destructive:`bg-destructive text-destructive-foreground hover:bg-destructive/92 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40`,link:`text-primary-text underline-offset-4 hover:underline`},size:{default:`h-9 gap-1.5 px-3 has-data-[icon=inline-end]:pr-2.5 has-data-[icon=inline-start]:pl-2.5`,xs:`h-6 gap-1 px-2.5 text-xs has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2 [&_svg:not([class*='size-'])]:size-3`,sm:`h-8 gap-1 px-3 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,lg:`h-10 gap-1.5 px-4 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3`,icon:`size-9`,"icon-xs":`size-6 [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-8`,"icon-lg":`size-10`}},defaultVariants:{variant:`default`,size:`default`}});function St({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){return(0,$.jsx)(r?pt:`button`,{"data-slot":`button`,"data-variant":t,"data-size":n,className:Q(xt({variant:t,size:n,className:e})),...i})}function Ct({className:e,type:t,...n}){return(0,$.jsx)(`input`,{type:t,"data-slot":`input`,className:Q(`h-9 w-full min-w-0 rounded-md border border-input bg-background px-3 py-1 text-base transition-[color,box-shadow,border-color] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring/30 disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-2 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}export{p as _,st as a,Qe as c,Xe as d,tt as f,v as g,Q as h,ot as i,it as l,Ze as m,St as n,Ye as o,rt as p,bt as r,$e as s,Ct as t,et as u};
@@ -0,0 +1,3 @@
1
+ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,o)=>(o=n==null?{}:e(i(n)),s(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?ee(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+A(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+A(a,u),c+=j(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+A(a,u++),c+=j(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return j(te(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ne(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var re=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ie={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ne}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,re)}catch(e){re(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),u=o(((e,t)=>{t.exports=l()})),d=c(u(),1),f=`modulepreload`,p=function(e){return`/`+e},m={},h=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=p(t,n),t=s(t),t in m)return;m[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:f,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},g=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,_=/^[\\/]{2}/;function v(e,t){return t+e.replace(/\\/g,`/`)}var y=`popstate`;function b(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function x(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return E(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:D(t)}return ee(t,n,null,e)}function S(e,t){if(e===!1||e==null)throw Error(t)}function C(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function w(){return Math.random().toString(36).substring(2,10)}function T(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function E(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?O(t):t,state:n,key:t&&t.key||r||w(),mask:i}}function D({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function O(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function ee(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=b(e)?e:E(h.location,e,t);n&&n(r,e),l=u()+1;let d=T(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=b(e)?e:E(h.location,e,t);n&&n(r,e),l=u();let i=T(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return k(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(y,d),c=e,()=>{i.removeEventListener(y,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function k(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),S(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:D(t);return i=i.replace(/ $/,`%20`),!n&&_.test(i)&&(i=r+i),new URL(i,r)}function A(e,t,n=`/`){return te(e,t,n,!1)}function te(e,t,n,r,i){let a=P((typeof t==`string`?O(t):t).pathname||`/`,n);if(a==null)return null;let o=i??j(e),s=null,c=ge(a);for(let e=0;s==null&&e<o.length;++e)s=pe(o[e],c,r);return s}function j(e){let t=M(e);return re(t),t}function M(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;S(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=L([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(S(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),M(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:de(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=he(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of ne(e.path))a(e,t,!0,n)}),t}function ne(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=ne(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function re(e){e.sort((e,t)=>e.score===t.score?fe(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var ie=/^:[\w-]+$/,ae=3,oe=2,se=1,ce=10,le=-2,ue=e=>e===`*`;function de(e,t){let n=e.split(`/`),r=n.length;return n.some(ue)&&(r+=le),t&&(r+=oe),n.filter(e=>!ue(e)).reduce((e,t)=>e+(ie.test(t)?ae:t===``?se:ce),r)}function fe(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function pe(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?me(u,l,s.matcher,s.compiledParams):N(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=N({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:L([a,d.pathname]),pathnameBase:Se(L([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=L([a,d.pathnameBase]))}return o}function N(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=he(e.path,e.caseSensitive,e.end);return me(e,t,n,r)}function me(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function he(e,t=!1,n=!0){C(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function ge(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return C(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function P(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function _e(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?O(e):e,a;return n?(n=xe(n),a=n.startsWith(`/`)?ve(n.substring(1),`/`):ve(n,t)):a=t,{pathname:a,search:Ce(r),hash:we(i)}}function ve(e,t){let n=R(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function F(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function ye(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function be(e){let t=ye(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function I(e,t,n,r=!1){let i;typeof e==`string`?i=O(e):(i={...e},S(!i.pathname||!i.pathname.includes(`?`),F(`?`,`pathname`,`search`,i)),S(!i.pathname||!i.pathname.includes(`#`),F(`#`,`pathname`,`hash`,i)),S(!i.search||!i.search.includes(`#`),F(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=_e(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var xe=e=>e.replace(/[\\/]{2,}/g,`/`),L=e=>xe(e.join(`/`)),R=e=>e.replace(/\/+$/,``),Se=e=>R(e).replace(/^\/*/,`/`),Ce=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,we=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Te=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ee(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function De(e){return L(e.map(e=>e.route.path).filter(Boolean))||`/`}var Oe=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function ke(e,t){let n=e;if(typeof n!=`string`||!g.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Oe)try{let e=new URL(window.location.href),r=_.test(n)?new URL(v(n,e.protocol)):new URL(n),a=P(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{C(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Ae=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Ae);var je=[`GET`,...Ae];new Set(je);var Me=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Ne(e){try{return Me.includes(new URL(e).protocol)}catch{return!1}}var z=d.createContext(null);z.displayName=`DataRouter`;var B=d.createContext(null);B.displayName=`DataRouterState`;var Pe=d.createContext(!1);function Fe(){return d.useContext(Pe)}var Ie=d.createContext({isTransitioning:!1});Ie.displayName=`ViewTransition`;var Le=d.createContext(new Map);Le.displayName=`Fetchers`;var Re=d.createContext(null);Re.displayName=`Await`;var V=d.createContext(null);V.displayName=`Navigation`;var H=d.createContext(null);H.displayName=`Location`;var U=d.createContext({outlet:null,matches:[],isDataRoute:!1});U.displayName=`Route`;var ze=d.createContext(null);ze.displayName=`RouteError`;var Be=`REACT_ROUTER_ERROR`,Ve=`REDIRECT`,He=`ROUTE_ERROR_RESPONSE`;function Ue(e){if(e.startsWith(`${Be}:${Ve}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function We(e){if(e.startsWith(`${Be}:${He}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Te(t.status,t.statusText,t.data)}catch{}}function Ge(e,{relative:t}={}){S(W(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=d.useContext(V),{hash:i,pathname:a,search:o}=q(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:L([n,a])),r.createHref({pathname:s,search:o,hash:i})}function W(){return d.useContext(H)!=null}function G(){return S(W(),`useLocation() may be used only in the context of a <Router> component.`),d.useContext(H).location}var Ke=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function qe(e){d.useContext(V).static||d.useLayoutEffect(e)}function K(){let{isDataRoute:e}=d.useContext(U);return e?ft():Je()}function Je(){S(W(),`useNavigate() may be used only in the context of a <Router> component.`);let e=d.useContext(z),{basename:t,navigator:n}=d.useContext(V),{matches:r}=d.useContext(U),{pathname:i}=G(),a=JSON.stringify(be(r)),o=d.useRef(!1);return qe(()=>{o.current=!0}),d.useCallback((r,s={})=>{if(C(o.current,Ke),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=I(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:L([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}d.createContext(null);function Ye(){let{matches:e}=d.useContext(U);return e[e.length-1]?.params??{}}function q(e,{relative:t}={}){let{matches:n}=d.useContext(U),{pathname:r}=G(),i=JSON.stringify(be(n));return d.useMemo(()=>I(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function Xe(e,t){return Ze(e,t)}function Ze(e,t,n){S(W(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=d.useContext(V),{matches:i}=d.useContext(U),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;mt(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
2
+
3
+ Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=G(),f;if(t){let e=typeof t==`string`?O(t):t;S(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),f=e}else f=u;let p=f.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let h=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):A(e,{pathname:m});C(l||h!=null,`No routes matched location "${f.pathname}${f.search}${f.hash}" `),C(h==null||h[h.length-1].route.element!==void 0||h[h.length-1].route.Component!==void 0||h[h.length-1].route.lazy!==void 0,`Matched leaf route at location "${f.pathname}${f.search}${f.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let g=it(h&&h.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:L([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:L([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&g?d.createElement(H.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...f},navigationType:`POP`}},g):g}function Qe(){let e=dt(),t=Ee(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},o=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),o=d.createElement(d.Fragment,null,d.createElement(`p`,null,`💿 Hey developer 👋`),d.createElement(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,d.createElement(`code`,{style:a},`ErrorBoundary`),` or`,` `,d.createElement(`code`,{style:a},`errorElement`),` prop on your route.`)),d.createElement(d.Fragment,null,d.createElement(`h2`,null,`Unexpected Application Error!`),d.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?d.createElement(`pre`,{style:i},n):null,o)}var $e=d.createElement(Qe,null),et=class extends d.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=We(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:d.createElement(U.Provider,{value:this.props.routeContext},d.createElement(ze.Provider,{value:e,children:this.props.component}));return this.context?d.createElement(nt,{error:e},t):t}};et.contextType=Pe;var tt=new WeakMap;function nt({children:e,error:t}){let{basename:n}=d.useContext(V);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=Ue(t.digest);if(e){let r=tt.get(t);if(r)throw r;let i=ke(e.location,n),a=i.absoluteURL||i.to;if(Ne(a))throw Error(`Invalid redirect location`);if(Oe&&!tt.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw tt.set(t,n),n}}return d.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function rt({routeContext:e,match:t,children:n}){let r=d.useContext(z);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),d.createElement(U.Provider,{value:e},n)}function it(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);S(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:De(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,f=!1,p=null,m=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,p=n.route.errorElement||$e,o&&(s<0&&c===0?(mt(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),f=!0,m=null):s===c&&(f=!0,m=n.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?p:f?m:n.route.Component?d.createElement(n.route.Component,null):n.route.element?n.route.element:e,d.createElement(rt,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?d.createElement(et,{location:r.location,revalidation:r.revalidation,component:p,error:u,children:g(),routeContext:{outlet:null,matches:h,isDataRoute:!0},onError:l}):g()},null)}function at(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ot(e){let t=d.useContext(z);return S(t,at(e)),t}function st(e){let t=d.useContext(B);return S(t,at(e)),t}function ct(e){let t=d.useContext(U);return S(t,at(e)),t}function lt(e){let t=ct(e),n=t.matches[t.matches.length-1];return S(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function ut(){return lt(`useRouteId`)}function dt(){let e=d.useContext(ze),t=st(`useRouteError`),n=lt(`useRouteError`);return e===void 0?t.errors?.[n]:e}function ft(){let{router:e}=ot(`useNavigate`),t=lt(`useNavigate`),n=d.useRef(!1);return qe(()=>{n.current=!0}),d.useCallback(async(r,i={})=>{C(n.current,Ke),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var pt={};function mt(e,t,n){!t&&!pt[e]&&(pt[e]=!0,C(!1,n))}d.memo(ht);function ht({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return Ze(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function gt({to:e,replace:t,state:n,relative:r}){S(W(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=d.useContext(V);C(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=d.useContext(U),{pathname:o}=G(),s=K(),c=I(e,be(a),o,r===`path`),l=JSON.stringify(c);return d.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function _t(e){S(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function vt({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){S(!W(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=d.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=O(n));let{pathname:l=`/`,search:u=``,hash:f=``,state:p=null,key:m=`default`,mask:h}=n,g=d.useMemo(()=>{let e=P(l,s);return e==null?null:{location:{pathname:e,search:u,hash:f,state:p,key:m,mask:h},navigationType:r}},[s,l,u,f,p,m,r,h]);return C(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${f}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:d.createElement(V.Provider,{value:c},d.createElement(H.Provider,{children:t,value:g}))}function yt({children:e,location:t}){return Xe(bt(e),t)}d.Component;function bt(e,t=[]){let n=[];return d.Children.forEach(e,(e,r)=>{if(!d.isValidElement(e))return;let i=[...t,r];if(e.type===d.Fragment){n.push.apply(n,bt(e.props.children,i));return}S(e.type===_t,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),S(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=bt(e.props.children,i)),n.push(a)}),n}var J=`get`,Y=`application/x-www-form-urlencoded`;function X(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function xt(e){return X(e)&&e.tagName.toLowerCase()===`button`}function St(e){return X(e)&&e.tagName.toLowerCase()===`form`}function Ct(e){return X(e)&&e.tagName.toLowerCase()===`input`}function wt(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Tt(e,t){return e.button===0&&(!t||t===`_self`)&&!wt(e)}function Et(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Dt(e,t){let n=Et(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Z=null;function Ot(){if(Z===null)try{new FormData(document.createElement(`form`),0),Z=!1}catch{Z=!0}return Z}var kt=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function At(e){return e!=null&&!kt.has(e)?(C(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Y}"`),null):e}function jt(e,t){let n,r,i,a,o;if(St(e)){let o=e.getAttribute(`action`);r=o?P(o,t):null,n=e.getAttribute(`method`)||J,i=At(e.getAttribute(`enctype`))||Y,a=new FormData(e)}else if(xt(e)||Ct(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?P(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||J,i=At(e.getAttribute(`formenctype`))||At(o.getAttribute(`enctype`))||Y,a=new FormData(o,e),!Ot()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(X(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=J,r=null,i=Y,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);function Mt(e,t){if(e===!1||e==null)throw Error(t)}function Nt(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return i.pathname=n?i.pathname.endsWith(`/`)?`${i.pathname}_.${r}`:`${i.pathname}.${r}`:i.pathname===`/`?`_root.${r}`:t&&P(i.pathname,t)===`/`?`${R(t)}/_root.${r}`:`${R(i.pathname)}.${r}`,i}async function Pt(e,t){if(e.id in t)return t[e.id];try{let n=await h(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Ft(e){return e!=null&&typeof e.page==`string`}function It(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function Lt(e,t,n){return Ht((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await Pt(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(It).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function Rt(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function zt(e,t,{includeHydrateFallback:n}={}){return Bt(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function Bt(e){return[...new Set(e)]}function Vt(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Ht(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!Ft(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(Vt(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Ut(){let e=d.useContext(z);return Mt(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function Wt(){let e=d.useContext(B);return Mt(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Gt=d.createContext(void 0);Gt.displayName=`FrameworkContext`;function Q(){let e=d.useContext(Gt);return Mt(e,`You must render this element inside a <HydratedRouter> element`),e}function Kt(e,t){let n=d.useContext(Gt),[r,i]=d.useState(!1),[a,o]=d.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:f}=t,p=d.useRef(null);d.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return p.current&&e.observe(p.current),()=>{e.disconnect()}}},[e]),d.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let m=()=>{i(!0)},h=()=>{i(!1),o(!1)};return n?e===`intent`?[a,p,{onFocus:$(s,m),onBlur:$(c,h),onMouseEnter:$(l,m),onMouseLeave:$(u,h),onTouchStart:$(f,m)}]:[a,p,{}]:[!1,p,{}]}function $(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function qt({page:e,...t}){let n=Fe(),{nonce:r}=Q(),{router:i}=Ut(),a=d.useMemo(()=>A(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?d.createElement(Yt,{page:e,matches:a,...t}):d.createElement(Xt,{page:e,matches:a,...t})):null}function Jt(e){let{manifest:t,routeModules:n}=Q(),[r,i]=d.useState([]);return d.useEffect(()=>{let r=!1;return Lt(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Yt({page:e,matches:t,...n}){let r=G(),{future:i}=Q(),{basename:a}=Ut(),o=d.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=Nt(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]);return d.createElement(d.Fragment,null,o.map(e=>d.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Xt({page:e,matches:t,...n}){let r=G(),{future:i,manifest:a,routeModules:o}=Q(),{basename:s}=Ut(),{loaderData:c,matches:l}=Wt(),u=d.useMemo(()=>Rt(e,t,l,a,r,`data`),[e,t,l,a,r]),f=d.useMemo(()=>Rt(e,t,l,a,r,`assets`),[e,t,l,a,r]),p=d.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,l=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!u.some(t=>t.route.id===e.route.id)&&e.route.id in c&&o[e.route.id]?.shouldRevalidate||t.hasClientLoader?l=!0:n.add(e.route.id))}),n.size===0)return[];let d=Nt(e,s,i.v8_trailingSlashAwareDataRequests,`data`);return l&&n.size>0&&d.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[d.pathname+d.search]},[s,i.v8_trailingSlashAwareDataRequests,c,r,a,u,t,e,o]),m=d.useMemo(()=>zt(f,a),[f,a]),h=Jt(f);return d.createElement(d.Fragment,null,p.map(e=>d.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>d.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),h.map(({key:e,link:t})=>d.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Zt(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}d.Component;var Qt=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Qt&&(window.__reactRouterVersion=`7.18.2`)}catch{}function $t({basename:e,children:t,useTransitions:n,window:r}){let i=d.useRef();i.current??=x({window:r,v5Compat:!0});let a=i.current,[o,s]=d.useState({action:a.action,location:a.location}),c=d.useCallback(e=>{n===!1?s(e):d.startTransition(()=>s(e))},[n]);return d.useLayoutEffect(()=>a.listen(c),[a,c]),d.createElement(vt,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}var en=d.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:f,defaultShouldRevalidate:p,...m},h){let{basename:_,navigator:v,useTransitions:y}=d.useContext(V),b=typeof l==`string`&&g.test(l),x=ke(l,_);l=x.to;let S=Ge(l,{relative:r}),C=G(),w=null;if(o){let e=I(o,[],C.mask?C.mask.pathname:`/`,!0);_!==`/`&&(e.pathname=e.pathname===`/`?_:L([_,e.pathname])),w=v.createHref(e)}let[T,E,D]=Kt(n,m),O=on(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:f,defaultShouldRevalidate:p,useTransitions:y});function ee(t){e&&e(t),t.defaultPrevented||O(t)}let k=!(x.isExternal||i),A=d.createElement(`a`,{...m,...D,href:(k?w:void 0)||x.absoluteURL||S,onClick:k?ee:e,ref:Zt(h,E),target:c,"data-discover":!b&&t===`render`?`true`:void 0});return T&&!b?d.createElement(d.Fragment,null,A,d.createElement(qt,{page:S})):A});en.displayName=`Link`;var tn=d.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=q(a,{relative:c.relative}),f=G(),p=d.useContext(B),{navigator:m,basename:h}=d.useContext(V),g=p!=null&&fn(u)&&o===!0,_=m.encodeLocation?m.encodeLocation(u).pathname:u.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=P(y,h)||y);let b=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,x=v===_||!r&&v.startsWith(_)&&v.charAt(b)===`/`,S=y!=null&&(y===_||!r&&y.startsWith(_)&&y.charAt(_.length)===`/`),C={isActive:x,isPending:S,isTransitioning:g},w=x?e:void 0,T;T=typeof n==`function`?n(C):[n,x?`active`:null,S?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let E=typeof i==`function`?i(C):i;return d.createElement(en,{...c,"aria-current":w,className:T,ref:l,style:E,to:a,viewTransition:o},typeof s==`function`?s(C):s)});tn.displayName=`NavLink`;var nn=d.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=J,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:f,defaultShouldRevalidate:p,...m},h)=>{let{useTransitions:_}=d.useContext(V),v=un(),y=dn(s,{relative:l}),b=o.toLowerCase()===`get`?`get`:`post`,x=typeof s==`string`&&g.test(s);return d.createElement(`form`,{ref:h,method:b,action:y,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,m=()=>v(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:f,defaultShouldRevalidate:p});_&&n!==!1?d.startTransition(()=>m()):m()},...m,"data-discover":!x&&e===`render`?`true`:void 0})});nn.displayName=`Form`;function rn(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function an(e){let t=d.useContext(z);return S(t,rn(e)),t}function on(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=K(),f=G(),p=q(e,{relative:o});return d.useCallback(m=>{if(Tt(m,t)){m.preventDefault();let t=n===void 0?D(f)===D(p):n,h=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?d.startTransition(()=>h()):h()}},[f,u,p,n,r,i,t,e,a,o,s,c,l])}function sn(e){C(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=d.useRef(Et(e)),n=d.useRef(!1),r=G(),i=d.useMemo(()=>Dt(r.search,n.current?null:t.current),[r.search]),a=K();return[i,d.useCallback((e,t)=>{let r=Et(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var cn=0,ln=()=>`__${String(++cn)}__`;function un(){let{router:e}=an(`useSubmit`),{basename:t}=d.useContext(V),n=ut(),r=e.fetch,i=e.navigate;return d.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=jt(e,t);if(a.navigate===!1){let e=a.fetcherKey||ln();await r(e,n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync})}else await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function dn(e,{relative:t}={}){let{basename:n}=d.useContext(V),r=d.useContext(U);S(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...q(e||`.`,{relative:t})},o=G();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:L([n,a.pathname])),D(a)}function fn(e,{relative:t}={}){let n=d.useContext(Ie);S(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=an(`useViewTransitionState`),i=q(e,{relative:t});if(!n.isTransitioning)return!1;let a=P(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=P(n.nextLocation.pathname,r)||n.nextLocation.pathname;return N(i.pathname,o)!=null||N(i.pathname,a)!=null}var pn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),mn=o(((e,t)=>{t.exports=pn()}));export{_t as a,K as c,h as d,u as f,gt as i,Ye as l,c as m,$t as n,yt as o,o as p,tn as r,G as s,mn as t,sn as u};
@@ -0,0 +1 @@
1
+ import{f as e,m as t,r as n,t as r,u as i}from"./jsx-runtime-MGseXjj5.js";import{_ as a,c as o,d as s,h as c,l,m as u,n as d,o as f,r as p,s as m,t as h,u as g}from"./input-TuVPR3Zl.js";import{t as _}from"./bot-Bg1Tp9_d.js";import{t as ee}from"./page-header-Bw9AJgBV.js";import{_ as v,d as y,h as b}from"./operations-app-D3d35rgo.js";var x=a(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),te=a(`beaker`,[[`path`,{d:`M4.5 3h15`,key:`c7n0jr`}],[`path`,{d:`M6 3v16a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V3`,key:`m1uhx7`}],[`path`,{d:`M6 14h12`,key:`4cwo0f`}]]),S=a(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),C=a(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),w=a(`target`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`circle`,{cx:`12`,cy:`12`,r:`6`,key:`1vlfrh`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),T=a(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),E=a(`zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),D=t(e(),1),O=/([A-Za-z0-9._/\\\-]+(?:\.[A-Za-z0-9]+))[:\s]+L?(\d+)/;function k(e){if(!e)return null;let t=O.exec(e);if(!t)return null;let n=t[1],r=Number.parseInt(t[2],10);return!Number.isFinite(r)||r<=0||!n.includes(`/`)&&!/\.(ts|tsx|js|jsx|py|go|rs|java|rb|php|c|cc|cpp|h|hpp|sh|sql)$/i.test(n)?null:{file:n,line:r}}function ne(e){let t;try{t=JSON.parse(e)}catch{return null}if(!t||typeof t!=`object`)return null;let n=t;if(n.schema===`0.events/v1`&&typeof n.kind==`string`)return A(n);if(n.protocol===`0.presentation/v1`&&n.kind===`event`&&typeof n.eventType==`string`&&n.payload&&typeof n.payload==`object`&&!Array.isArray(n.payload)){let e={...n.payload};if(typeof e.ts!=`number`&&typeof n.at==`string`){let t=Date.parse(n.at);Number.isFinite(t)&&(e.ts=t/1e3)}return j(n.eventType,e)}return typeof n.type==`string`&&n.payload&&typeof n.payload==`object`?j(n.type,n.payload):null}function A(e){let t=e.kind,n=typeof e.ts==`number`?e.ts:Date.now()/1e3;if(t===`tool_use`){let t=typeof e.args_preview==`string`?e.args_preview:void 0,r=k(t);return{schema:`0.events/v1`,kind:`tool_use`,ts:n,tool:typeof e.tool==`string`?e.tool:`?`,turn:typeof e.turn==`number`?e.turn:void 0,args_preview:t,file:typeof e.file==`string`?e.file:r?.file,line:typeof e.line==`number`?e.line:r?.line,status:e.status===`ok`||e.status===`error`||e.status===`running`?e.status:`running`,duration_ms:typeof e.duration_ms==`number`?e.duration_ms:void 0}}if(t===`finding`)return{schema:`0.events/v1`,kind:`finding`,ts:n,finding_id:typeof e.finding_id==`string`?e.finding_id:void 0,title:typeof e.title==`string`?e.title:`Finding`,severity:typeof e.severity==`string`?e.severity:void 0,category:typeof e.category==`string`?e.category:void 0,confidence:typeof e.confidence==`number`?e.confidence:void 0,file:typeof e.file==`string`?e.file:void 0,line:typeof e.line==`number`?e.line:void 0};if(t===`stage`){let t=e.transition===`completed`?`completed`:`started`;return{schema:`0.events/v1`,kind:`stage`,ts:n,stage:typeof e.stage==`string`?e.stage:`stage`,transition:t,role:typeof e.role==`string`?e.role:void 0,turn:typeof e.turn==`number`?e.turn:void 0,duration_ms:typeof e.duration_ms==`number`?e.duration_ms:void 0}}return null}function j(e,t){let n=typeof t.ts==`number`?t.ts:Date.now()/1e3;if(e===`tool_call_started`||e===`tool_call_completed`){let r=typeof t.args_preview==`string`?t.args_preview:void 0,i=k(r),a=e===`tool_call_started`?`running`:t.status===`error`?`error`:`ok`;return{schema:`0.events/v1`,kind:`tool_use`,ts:n,tool:typeof t.tool==`string`?t.tool:`?`,turn:typeof t.turn==`number`?t.turn:void 0,args_preview:r,file:i?.file,line:i?.line,status:a,duration_ms:typeof t.duration_ms==`number`?t.duration_ms:void 0}}return e===`finding_ingested`?{schema:`0.events/v1`,kind:`finding`,ts:n,finding_id:typeof t.finding_id==`string`?t.finding_id:void 0,title:typeof t.title==`string`?t.title:`Finding`,severity:typeof t.severity==`string`?t.severity.toLowerCase():void 0,category:typeof t.category==`string`?t.category:void 0,confidence:typeof t.confidence==`number`?t.confidence:void 0,file:typeof t.file==`string`?t.file:void 0,line:typeof t.line==`number`?t.line:void 0}:e===`step_started`||e===`step_completed`?{schema:`0.events/v1`,kind:`stage`,ts:n,stage:typeof t.step==`string`?t.step:`stage`,transition:e===`step_started`?`started`:`completed`,duration_ms:typeof t.duration_ms==`number`?t.duration_ms:void 0}:e===`agent_turn_started`||e===`agent_turn_completed`?{schema:`0.events/v1`,kind:`stage`,ts:n,stage:`turn ${typeof t.turn==`number`?t.turn:`?`}`,transition:e===`agent_turn_started`?`started`:`completed`,role:typeof t.role==`string`?t.role:void 0,turn:typeof t.turn==`number`?t.turn:void 0,duration_ms:typeof t.duration_ms==`number`?t.duration_ms:void 0}:null}var M=r(),re=24,ie=60,ae=80;function N(e){return e>=.9?`text-destructive`:e>=.75?`text-amber-600 dark:text-amber-400`:e>=.5?`text-sky-600 dark:text-sky-400`:`text-muted-foreground`}function P(e){return e>=.9?`bg-destructive/12`:e>=.75?`bg-amber-500/12`:e>=.5?`bg-sky-500/12`:``}function F(e){return e.toFixed(2)}function I(e,t){if(t===null)return new Date(e*1e3).toLocaleTimeString();let n=e-t;return n<0?`${n.toFixed(1)}s`:`+${n.toFixed(1)}s`}function L(e){let t=(e??``).toLowerCase();return t===`critical`||t===`high`?`danger`:t===`medium`?`warning`:t===`low`||t===`info`?`info`:`neutral`}function R(e,t,n){let r=null;for(let i of e){if(!i.file.endsWith(t)&&!t.endsWith(i.file)||n<i.start_line-20||n>i.end_line+20)continue;if(!r){r=i;continue}let e=Math.max(0,r.start_line-n,n-r.end_line);Math.max(0,i.start_line-n,n-i.end_line)<e&&(r=i)}return r}function oe(){let e=Date.now()/1e3,t=e=>e;return[t({schema:`gemmaforge.events/v1`,kind:`scan.start`,ts:e,repo:`examples/express-app`,model_id:`google/gemma-4-E2B-it`,layer:17,chunker:`function`}),t({schema:`gemmaforge.events/v1`,kind:`scan.file`,ts:e+.4,file:`src/router.js`,chunks:12}),t({schema:`gemmaforge.events/v1`,kind:`probe.token`,ts:e+.6,token:`app.get(`,score:.14,position:1}),t({schema:`gemmaforge.events/v1`,kind:`probe.token`,ts:e+.7,token:`'/u/:id'`,score:.31,position:2}),t({schema:`gemmaforge.events/v1`,kind:`probe.token`,ts:e+.8,token:` db.query(`,score:.72,position:12}),t({schema:`gemmaforge.events/v1`,kind:`probe.token`,ts:e+.9,token:`'SELECT * FROM users WHERE id='`,score:.84,position:18}),t({schema:`gemmaforge.events/v1`,kind:`probe.token`,ts:e+1,token:` + req.params.id`,score:.93,position:23}),t({schema:`gemmaforge.events/v1`,kind:`probe.alarm`,ts:e+1.05,window:[38,52],top_cwe:`CWE-89`,confidence:.93}),t({schema:`gemmaforge.events/v1`,kind:`scan.lead`,ts:e+1.1,file:`src/router.js`,start_line:38,end_line:52,confidence:.93,top_cwe:`CWE-89`,rank:0}),t({schema:`gemmaforge.events/v1`,kind:`scan.file`,ts:e+1.4,file:`src/exec.js`,chunks:4}),t({schema:`gemmaforge.events/v1`,kind:`probe.token`,ts:e+1.6,token:`child_process.exec(`,score:.81,position:4}),t({schema:`gemmaforge.events/v1`,kind:`probe.token`,ts:e+1.7,token:" `ping ${host}`",score:.88,position:7}),t({schema:`gemmaforge.events/v1`,kind:`probe.alarm`,ts:e+1.78,window:[12,22],top_cwe:`CWE-78`,confidence:.87}),t({schema:`gemmaforge.events/v1`,kind:`scan.lead`,ts:e+1.82,file:`src/exec.js`,start_line:12,end_line:22,confidence:.87,top_cwe:`CWE-78`,rank:1}),t({schema:`gemmaforge.events/v1`,kind:`scan.end`,ts:e+2.4,files_seen:2,chunks_scored:16,leads_emitted:2,elapsed_seconds:2.4})]}function se(e){return[{schema:`0.events/v1`,kind:`stage`,ts:e+1.2,stage:`audit`,transition:`started`,role:`attack`},{schema:`0.events/v1`,kind:`tool_use`,ts:e+1.3,tool:`read_file`,turn:1,args_preview:`src/router.js:38`,file:`src/router.js`,line:38,status:`ok`,duration_ms:14},{schema:`0.events/v1`,kind:`tool_use`,ts:e+1.5,tool:`shell`,turn:1,args_preview:`grep -n 'db.query' src/router.js`,status:`ok`,duration_ms:47},{schema:`0.events/v1`,kind:`finding`,ts:e+1.9,finding_id:`f-001`,title:`SQL injection via req.params.id`,severity:`high`,category:`injection`,confidence:.92,file:`src/router.js`,line:42},{schema:`0.events/v1`,kind:`tool_use`,ts:e+2,tool:`read_file`,turn:2,args_preview:`src/exec.js:12`,file:`src/exec.js`,line:12,status:`ok`,duration_ms:9},{schema:`0.events/v1`,kind:`finding`,ts:e+2.3,finding_id:`f-002`,title:`Command injection in ping handler`,severity:`critical`,category:`rce`,confidence:.88,file:`src/exec.js`,line:17},{schema:`0.events/v1`,kind:`stage`,ts:e+2.5,stage:`audit`,transition:`completed`,role:`attack`,duration_ms:1300}]}function z(){let[e,t]=i(),n=e.get(`events`)??``,r=e.get(`huntEvents`)??`/api/v1/presentation/events`,a=e.get(`demo`)===`1`,[c,l]=(0,D.useState)([]),[_,v]=(0,D.useState)([]),[y,x]=(0,D.useState)([]),[S,C]=(0,D.useState)([]),[w,T]=(0,D.useState)(null),[E,O]=(0,D.useState)([]),[A,j]=(0,D.useState)(null),[N,P]=(0,D.useState)(`idle`),[F,I]=(0,D.useState)(`idle`),[L,z]=(0,D.useState)(null),[V,H]=(0,D.useState)(null),[U,W]=(0,D.useState)(n),[G,de]=(0,D.useState)(r),K=(0,D.useRef)(null),q=(0,D.useRef)(null),fe=(0,D.useRef)(0),J=(0,D.useRef)([]);(0,D.useEffect)(()=>{J.current=y},[y]);let Y=(0,D.useCallback)(()=>(fe.current+=1,`evt-${fe.current}`),[]),X=(0,D.useCallback)(e=>{switch(q.current===null&&typeof e.ts==`number`&&(q.current=e.ts),e.kind){case`scan.start`:T({repo:e.repo,model_id:e.model_id,layer:e.layer}),j(null),O([]);break;case`scan.file`:O(t=>t.includes(e.file)?t:[...t,e.file].slice(-12));break;case`probe.token`:{let t={id:Y(),ts:e.ts,token:e.token,score:e.score,position:e.position??null};l(e=>[...e,t].slice(-240));break}case`probe.alarm`:{let t={id:Y(),ts:e.ts,window:e.window,top_cwe:e.top_cwe??null,confidence:e.confidence};K.current=t,v(e=>[t,...e].slice(0,re));break}case`scan.lead`:{let t={id:Y(),ts:e.ts,file:e.file,start_line:e.start_line,end_line:e.end_line,confidence:e.confidence,top_cwe:e.top_cwe??null,rank:e.rank??null,originatingAlarmId:K.current?.id??null};x(e=>[t,...e].slice(0,ie));break}case`scan.end`:j({files_seen:e.files_seen,chunks_scored:e.chunks_scored,leads_emitted:e.leads_emitted,elapsed_seconds:e.elapsed_seconds})}},[Y]),Z=(0,D.useCallback)(e=>{q.current===null&&typeof e.ts==`number`&&(q.current=e.ts);let t=null;if((e.kind===`tool_use`||e.kind===`finding`)&&e.file&&typeof e.line==`number`)t=R(J.current,e.file,e.line)?.id??null;else if(e.kind===`tool_use`&&e.args_preview){let n=k(e.args_preview);n&&(t=R(J.current,n.file,n.line)?.id??null)}let n={id:Y(),ts:e.ts,event:e,citedLeadId:t};C(e=>[n,...e].slice(0,ae))},[Y]),Q=(0,D.useCallback)(()=>{l([]),v([]),x([]),C([]),T(null),O([]),j(null),H(null),z(null),K.current=null,q.current=null},[]);(0,D.useEffect)(()=>{if(!a)return;Q(),P(`open`),I(`open`);let e=oe(),t=e[0]?.ts??Date.now()/1e3,n=se(t),r=[];for(let n of e){let e=Math.max(0,(n.ts-t)*1e3);r.push(setTimeout(()=>X(n),e))}for(let e of n){let n=Math.max(0,(e.ts-t)*1e3);r.push(setTimeout(()=>Z(e),n))}let i=((e.at(-1)?.ts??t)-t)*1e3+300;return r.push(setTimeout(()=>{P(`closed`),I(`closed`)},i)),()=>{for(let e of r)clearTimeout(e)}},[a,X,Z,Q]),(0,D.useEffect)(()=>{if(a||!n)return;l([]),v([]),x([]),T(null),O([]),j(null),H(null),K.current=null,q.current=null,P(`connecting`);let e=null;try{e=new EventSource(n)}catch(e){P(`error`),z(e instanceof Error?e.message:String(e));return}return e.onopen=()=>P(`open`),e.onerror=()=>{P(`error`),z(`EventSource error (connection dropped or refused).`)},e.onmessage=e=>{let t=typeof e.data==`string`?e.data.trim():``;if(t)try{let e=JSON.parse(t);if(e.schema!==`gemmaforge.events/v1`)return;X(e)}catch(e){z(e instanceof Error?e.message:String(e))}},()=>{e?.close(),P(`closed`)}},[a,n,X]),(0,D.useEffect)(()=>{if(a||!r)return;C([]),I(`connecting`);let e=null;try{e=new EventSource(r)}catch(e){I(`error`),z(e instanceof Error?e.message:String(e));return}e.onopen=()=>I(`open`),e.onerror=()=>{I(`error`),z(`Hunt EventSource error (connection dropped or refused).`)};let t=e=>{let t=typeof e.data==`string`?e.data.trim():``;if(!t)return;let n=ne(t);n&&Z(n)};return e.onmessage=t,e.addEventListener(`presentation`,t),()=>{e?.close(),I(`closed`)}},[a,r,Z]);let pe=(0,D.useCallback)(()=>{let n=new URLSearchParams(e);n.delete(`demo`),U.trim()?n.set(`events`,U.trim()):n.delete(`events`),G.trim()?n.set(`huntEvents`,G.trim()):n.delete(`huntEvents`),t(n,{replace:!0})},[e,t,U,G]),me=(0,D.useCallback)(()=>{let n=new URLSearchParams(e);n.delete(`events`),n.delete(`huntEvents`),n.set(`demo`,`1`),t(n,{replace:!0})},[e,t]),he=(0,D.useCallback)(()=>{let n=new URLSearchParams(e);n.delete(`events`),n.delete(`huntEvents`),n.delete(`demo`),t(n,{replace:!0}),Q(),P(`idle`),I(`idle`)},[e,Q,t]),$=(0,D.useMemo)(()=>y.find(e=>e.id===V)??null,[y,V]),ge=$?.originatingAlarmId??null,_e=(0,D.useMemo)(()=>{let e=[N,F];return e.includes(`open`)?`open`:e.includes(`connecting`)?`connecting`:e.includes(`error`)?`error`:e.includes(`closed`)?`closed`:`idle`},[N,F]),ve=(0,D.useCallback)(e=>{e.citedLeadId&&H(t=>t===e.citedLeadId?null:e.citedLeadId)},[]);return(0,M.jsxs)(`div`,{className:`space-y-6`,children:[(0,M.jsx)(ee,{eyebrow:`GemmaForge × 0`,title:`Live workflow`,summary:`Watch the probe → seed leads → agent hunt pipeline in real time. Probe firings stream from gemmaforge.events/v1, leads accumulate to the worklist, and 0's hunters surface tool calls and findings as they happen.`,actions:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(B,{state:_e}),(0,M.jsxs)(d,{variant:a?`outline`:`accent`,onClick:me,children:[(0,M.jsx)(te,{}),`Demo replay`]}),(0,M.jsx)(d,{variant:`outline`,onClick:he,disabled:_e===`idle`,children:`Stop`})]})}),(0,M.jsxs)(f,{className:`overflow-hidden`,children:[(0,M.jsx)(s,{children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(g,{children:`Event sources`}),(0,M.jsx)(u,{className:`mt-2`,children:`SSE endpoints`}),(0,M.jsxs)(o,{children:[`The probe + lead lanes consume `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`gemmaforge.events/v1`}),`; the hunt lane consumes `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`0.events/v1`}),`. Run`,` `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`node scripts/serve-events.mjs <gemma.ndjson> --0-log <0.log>`}),` `,`to expose both at `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`/events`}),` and `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`/hunt-events`}),`.`]})]})}),(0,M.jsxs)(m,{className:`space-y-3`,children:[(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-widest text-muted-foreground/70 w-24`,children:`gemmaforge`}),(0,M.jsx)(h,{value:U,onChange:e=>W(e.target.value),placeholder:`http://localhost:8765/events`,className:`min-w-[16rem] flex-1`}),(0,M.jsx)(B,{state:N})]}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-widest text-muted-foreground/70 w-24`,children:`0`}),(0,M.jsx)(h,{value:G,onChange:e=>de(e.target.value),placeholder:`http://localhost:8765/hunt-events`,className:`min-w-[16rem] flex-1`}),(0,M.jsx)(B,{state:F})]}),(0,M.jsx)(`div`,{className:`flex justify-end`,children:(0,M.jsxs)(d,{onClick:pe,disabled:!U.trim()&&!G.trim(),children:[(0,M.jsx)(b,{}),`Connect`]})}),w?(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2 text-xs text-muted-foreground`,children:[w.repo?(0,M.jsxs)(p,{variant:`neutral`,children:[`repo `,w.repo]}):null,w.model_id?(0,M.jsxs)(p,{variant:`neutral`,children:[`model `,w.model_id]}):null,w.layer===void 0?null:(0,M.jsxs)(p,{variant:`neutral`,children:[`layer `,w.layer]}),E.length>0?(0,M.jsxs)(`span`,{className:`text-muted-foreground`,children:[`files: `,(0,M.jsx)(`span`,{className:`font-mono`,children:E.slice(-4).join(`, `)})]}):null]}):null,A?(0,M.jsxs)(`div`,{className:`flex flex-wrap gap-2 text-xs`,children:[(0,M.jsx)(p,{variant:`success`,children:`scan complete`}),(0,M.jsxs)(`span`,{className:`text-muted-foreground`,children:[A.files_seen??`?`,` files · `,A.chunks_scored??`?`,` chunks · `,A.leads_emitted??`?`,` leads · `,A.elapsed_seconds?.toFixed(1)??`?`,`s`]})]}):null,L?(0,M.jsx)(`div`,{className:`rounded-md border border-destructive/20 bg-destructive/5 px-3 py-2 text-xs text-destructive`,children:L}):null]})]}),(0,M.jsxs)(`section`,{className:`grid gap-4 xl:grid-cols-3`,children:[(0,M.jsx)(ce,{tokens:c,alarms:_,highlightedAlarmId:ge,baseTs:q.current,onClearSelection:()=>H(null),hasSelection:$!==null}),(0,M.jsx)(le,{leads:y,baseTs:q.current,selectedLeadId:V,onSelectLead:e=>H(t=>t===e?null:e)}),(0,M.jsx)(ue,{cards:S,selectedLead:$,selectedLeadId:V,baseTs:q.current,onCardClick:ve})]})]})}function B({state:e}){return e===`open`?(0,M.jsxs)(p,{variant:`success`,className:`gap-1.5`,children:[(0,M.jsx)(b,{className:`size-3`}),` live`]}):e===`connecting`?(0,M.jsxs)(p,{variant:`warning`,className:`gap-1.5`,children:[(0,M.jsx)(b,{className:`size-3`}),` connecting`]}):e===`error`?(0,M.jsxs)(p,{variant:`danger`,className:`gap-1.5`,children:[(0,M.jsx)(b,{className:`size-3`}),` error`]}):e===`closed`?(0,M.jsxs)(p,{variant:`neutral`,className:`gap-1.5`,children:[(0,M.jsx)(b,{className:`size-3`}),` closed`]}):(0,M.jsxs)(p,{variant:`neutral`,className:`gap-1.5`,children:[(0,M.jsx)(b,{className:`size-3`}),` idle`]})}function ce({tokens:e,alarms:t,highlightedAlarmId:n,baseTs:r,onClearSelection:i,hasSelection:a}){let l=(0,D.useRef)(null);return(0,D.useEffect)(()=>{let e=l.current;e&&(e.scrollTop=e.scrollHeight)},[e.length]),(0,M.jsxs)(f,{className:`flex flex-col overflow-hidden`,children:[(0,M.jsx)(s,{children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(g,{children:`Lane 1 · Probe`}),(0,M.jsxs)(u,{className:`mt-2 flex items-center gap-2`,children:[(0,M.jsx)(E,{className:`size-4 text-primary-text`}),`Probe firings`]}),(0,M.jsxs)(o,{children:[`Per-token probe scores from `,(0,M.jsx)(`code`,{className:`font-mono text-xs`,children:`stream_with_probe.py`}),`. Alarms pin to the top when the rolling score crosses threshold.`]})]})}),(0,M.jsxs)(m,{className:`flex flex-1 flex-col gap-3`,children:[t.length===0?null:(0,M.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,M.jsxs)(`div`,{className:`text-[10px] font-medium uppercase tracking-widest text-muted-foreground/70`,children:[`Alarms `,(0,M.jsxs)(`span`,{className:`text-muted-foreground/40`,children:[`(`,t.length,`)`]})]}),(0,M.jsx)(`div`,{className:`space-y-1.5`,children:t.slice(0,4).map(e=>(0,M.jsxs)(`div`,{className:c(`rounded-md border px-3 py-2 transition-colors`,n===e.id?`border-primary/40 bg-primary/8 ring-1 ring-primary/30`:`border-destructive/20 bg-destructive/5`),children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(y,{className:`size-3.5 text-destructive`}),(0,M.jsxs)(`span`,{className:`font-mono`,children:[`L`,e.window[0],`–`,e.window[1]]}),e.top_cwe?(0,M.jsx)(p,{variant:`danger`,children:e.top_cwe}):null]}),(0,M.jsx)(`span`,{className:`font-mono text-destructive`,children:F(e.confidence)})]}),(0,M.jsxs)(`div`,{className:`mt-1 text-[10px] text-muted-foreground`,children:[I(e.ts,r),n===e.id?` · originating fire`:``]})]},e.id))}),a?(0,M.jsx)(d,{variant:`ghost`,size:`xs`,onClick:i,children:`Clear lead selection`}):null]}),(0,M.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,M.jsxs)(`div`,{className:`text-[10px] font-medium uppercase tracking-widest text-muted-foreground/70`,children:[`Token stream `,(0,M.jsxs)(`span`,{className:`text-muted-foreground/40`,children:[`(`,e.length,`)`]})]}),(0,M.jsx)(`div`,{ref:l,className:`max-h-[28rem] min-h-[12rem] overflow-y-auto rounded-md border border-border bg-muted/10 px-3 py-3 font-mono text-xs leading-relaxed`,children:e.length===0?(0,M.jsx)(`div`,{className:`text-muted-foreground`,children:`Waiting for probe.token events…`}):(0,M.jsx)(`div`,{className:`flex flex-wrap gap-x-0.5 gap-y-1`,children:e.map(e=>(0,M.jsx)(`span`,{title:`score ${F(e.score)} · pos ${e.position??`?`}`,className:c(`rounded-sm px-1 py-0.5`,N(e.score),P(e.score)),children:e.token},e.id))})}),(0,M.jsxs)(`div`,{className:`flex items-center gap-3 text-[10px] text-muted-foreground`,children:[(0,M.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(`span`,{className:`size-2 rounded-full bg-muted-foreground/50`}),` <0.5`]}),(0,M.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(`span`,{className:`size-2 rounded-full bg-sky-500`}),` 0.5–0.75`]}),(0,M.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(`span`,{className:`size-2 rounded-full bg-amber-500`}),` 0.75–0.9`]}),(0,M.jsxs)(`span`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(`span`,{className:`size-2 rounded-full bg-destructive`}),` ≥0.9`]})]})]})]})]})}function le({leads:e,baseTs:t,selectedLeadId:n,onSelectLead:r}){return(0,M.jsxs)(f,{className:`flex flex-col overflow-hidden`,children:[(0,M.jsx)(s,{children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(g,{children:`Lane 2 · Leads`}),(0,M.jsxs)(u,{className:`mt-2 flex items-center gap-2`,children:[(0,M.jsx)(v,{className:`size-4 text-primary-text`}),`Seed worklist`]}),(0,M.jsx)(o,{children:"Regions that passed `--min-confidence` and shipped to the leads file. Click a lead to highlight the probe firing that originated it; click a hunt tool-call to highlight the lead it cites."})]})}),(0,M.jsx)(m,{className:`flex flex-1 flex-col`,children:e.length===0?(0,M.jsx)(l,{children:`Waiting for scan.lead events…`}):(0,M.jsx)(`div`,{className:`max-h-[36rem] space-y-2 overflow-y-auto pr-1`,children:e.map(e=>{let i=e.id===n;return(0,M.jsxs)(`button`,{type:`button`,onClick:()=>r(e.id),className:c(`w-full rounded-md border px-3 py-3 text-left transition-colors`,i?`border-primary/40 bg-primary/8 ring-1 ring-primary/30`:`border-border bg-background hover:border-primary/20 hover:bg-primary/4`),children:[(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,M.jsxs)(`div`,{className:`min-w-0`,children:[(0,M.jsx)(`div`,{className:`truncate font-mono text-xs text-foreground`,children:e.file}),(0,M.jsxs)(`div`,{className:`mt-0.5 text-[11px] text-muted-foreground`,children:[`lines `,e.start_line,`–`,e.end_line,e.rank===null?``:` · rank #${e.rank}`,` · `,I(e.ts,t)]})]}),(0,M.jsxs)(`div`,{className:`flex shrink-0 flex-col items-end gap-1`,children:[(0,M.jsx)(p,{variant:`accent`,className:`font-mono`,children:F(e.confidence)}),e.top_cwe?(0,M.jsx)(p,{variant:`danger`,children:e.top_cwe}):null]})]}),i?(0,M.jsxs)(`div`,{className:`mt-2 flex items-center gap-1 text-[10px] text-primary-text`,children:[(0,M.jsx)(C,{className:`size-3`}),`probe lane is highlighting the originating fire`,(0,M.jsx)(x,{className:`ml-auto size-3`}),(0,M.jsx)(S,{className:`size-3`}),`hunt lane is targeting this lead`]}):null]},e.id)})})})]})}function ue({cards:e,selectedLead:t,selectedLeadId:r,baseTs:i,onCardClick:a}){return(0,M.jsxs)(f,{className:`flex flex-col overflow-hidden`,children:[(0,M.jsx)(s,{children:(0,M.jsxs)(`div`,{children:[(0,M.jsx)(g,{children:`Lane 3 · Hunt`}),(0,M.jsxs)(u,{className:`mt-2 flex items-center gap-2`,children:[(0,M.jsx)(_,{className:`size-4 text-primary-text`}),`Agent activity`]}),(0,M.jsx)(o,{children:`Live 0 scan events — tool calls, findings, and stage transitions. Click a card that cites a file:line to highlight the originating lead in lane 2.`})]})}),(0,M.jsxs)(m,{className:`flex flex-1 flex-col gap-3`,children:[t?(0,M.jsxs)(`div`,{className:`rounded-md border border-primary/20 bg-primary/4 px-3 py-3`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-2 text-[10px] font-medium uppercase tracking-widest text-primary-text`,children:[(0,M.jsx)(w,{className:`size-3`}),`Targeting lead`]}),(0,M.jsx)(`div`,{className:`mt-1 truncate font-mono text-xs text-foreground`,children:t.file}),(0,M.jsxs)(`div`,{className:`text-[11px] text-muted-foreground`,children:[`lines `,t.start_line,`–`,t.end_line,` · `,F(t.confidence),t.top_cwe?` · ${t.top_cwe}`:``]})]}):null,e.length===0?(0,M.jsx)(l,{children:`Waiting for 0 hunt events…`}):(0,M.jsx)(`div`,{className:`max-h-[36rem] space-y-2 overflow-y-auto pr-1`,children:e.map(e=>(0,M.jsx)(V,{card:e,baseTs:i,highlightLead:r!==null&&e.citedLeadId===r,onClick:()=>a(e)},e.id))}),(0,M.jsx)(`div`,{className:`mt-auto pt-2`,children:(0,M.jsx)(d,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,M.jsx)(n,{to:`/findings`,children:`Open findings workspace`})})})]})]})}function V({card:e,baseTs:t,highlightLead:n,onClick:r}){let i=e.event,a=e.citedLeadId!==null,o=c(`block w-full rounded-md border px-3 py-3 text-left transition-colors`,n?`border-primary/40 bg-primary/8 ring-1 ring-primary/30`:a?`border-border bg-background hover:border-primary/20 hover:bg-primary/4 cursor-pointer`:`border-border bg-background`),s=i.kind===`tool_use`?(0,M.jsx)(H,{event:i}):i.kind===`finding`?(0,M.jsx)(U,{event:i}):(0,M.jsx)(W,{event:i}),l=(0,M.jsxs)(`div`,{className:`mt-2 flex items-center justify-between text-[10px] text-muted-foreground`,children:[(0,M.jsx)(`span`,{children:I(e.ts,t)}),a?(0,M.jsxs)(`span`,{className:`flex items-center gap-1 text-primary-text`,children:[(0,M.jsx)(x,{className:`size-3`}),n?`linked to selected lead`:`click to highlight lead`]}):null]});return a?(0,M.jsxs)(`button`,{type:`button`,onClick:r,className:o,children:[s,l]}):(0,M.jsxs)(`div`,{className:o,children:[s,l]})}function H({event:e}){let t=e.status===`ok`?`success`:e.status===`error`?`danger`:`warning`;return(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(T,{className:`size-3.5 shrink-0 text-primary-text`}),(0,M.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e.tool}),typeof e.turn==`number`?(0,M.jsxs)(`span`,{className:`font-mono text-[10px] text-muted-foreground`,children:[`turn `,e.turn]}):null]}),(0,M.jsx)(p,{variant:t,children:e.status??`running`})]}),e.args_preview?(0,M.jsx)(`div`,{className:`truncate font-mono text-[11px] text-muted-foreground`,title:e.args_preview,children:e.args_preview}):null,e.file?(0,M.jsxs)(`div`,{className:`font-mono text-[11px] text-primary-text`,children:[e.file,typeof e.line==`number`?`:${e.line}`:``]}):null]})}function U({event:e}){return(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(y,{className:`size-3.5 shrink-0 text-destructive`}),(0,M.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e.title})]}),(0,M.jsxs)(`div`,{className:`flex shrink-0 flex-col items-end gap-1`,children:[e.severity?(0,M.jsx)(p,{variant:L(e.severity),children:e.severity}):null,typeof e.confidence==`number`?(0,M.jsx)(p,{variant:`accent`,className:`font-mono`,children:F(e.confidence)}):null]})]}),e.category?(0,M.jsx)(`div`,{className:`text-[11px] text-muted-foreground`,children:e.category}):null,e.file?(0,M.jsxs)(`div`,{className:`font-mono text-[11px] text-primary-text`,children:[e.file,typeof e.line==`number`?`:${e.line}`:``]}):null]})}function W({event:e}){let t=e.transition===`completed`?`success`:`neutral`;return(0,M.jsxs)(`div`,{className:`space-y-1`,children:[(0,M.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(S,{className:`size-3.5 shrink-0 text-muted-foreground`}),(0,M.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e.stage}),e.role?(0,M.jsx)(p,{variant:`neutral`,children:e.role}):null]}),(0,M.jsx)(p,{variant:t,children:e.transition})]}),typeof e.duration_ms==`number`&&e.duration_ms>0?(0,M.jsxs)(`div`,{className:`font-mono text-[11px] text-muted-foreground`,children:[e.duration_ms,`ms`]}):null]})}export{z as LivePage};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-MGseXjj5.js";import{_ as t,c as n,d as r,h as i,m as a,o,p as s,s as c,u as l}from"./input-TuVPR3Zl.js";var u=t(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),d=e();function f({eyebrow:e,title:t,description:s,actions:u,children:f,className:p}){return(0,d.jsxs)(o,{className:i(`overflow-hidden`,p),children:[(0,d.jsxs)(r,{children:[(0,d.jsxs)(`div`,{className:`min-w-0`,children:[(0,d.jsx)(l,{children:e}),(0,d.jsx)(a,{className:`mt-2`,children:t}),(0,d.jsx)(n,{children:s})]}),u?(0,d.jsx)(`div`,{className:`shrink-0`,children:u}):null]}),(0,d.jsx)(c,{className:`space-y-4`,children:f})]})}function p({label:e,value:t,mono:n=!1}){return(0,d.jsxs)(s,{className:`px-0 py-3 first:pt-0 last:pb-0`,children:[(0,d.jsx)(`div`,{className:`text-[10px] font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:e}),(0,d.jsx)(`div`,{className:`mt-2 text-sm text-foreground ${n?`font-mono`:``}`,children:t})]})}export{f as n,u as r,p as t};